app

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 76 Imported by: 0

Documentation

Overview

Package app provides the Application service layer that owns the full Genie lifecycle: config → bootstrap → start → close. It is the single place where all dependencies (DB, tools, codeowner, messenger, cron, background worker, HTTP server) are wired together.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

Application orchestrates the Genie lifecycle. Create one with NewApplication, call Bootstrap to initialise all dependencies, then Start to run the HTTP server. Call Close to release resources.

func NewApplication

func NewApplication(
	config config.GenieConfig,
	workingDir string,
) (*Application, error)

NewApplication creates a new Application with validated parameters. No side-effects — heavy initialisation happens in Bootstrap.

func (*Application) Bootstrap

func (a *Application) Bootstrap(ctx context.Context) error

Bootstrap initialises all dependencies: database, tools, vector memory, audit logger, HITL approval store, cron store, messenger, and the CodeOwner agent. Call exactly once after NewApplication.

func (*Application) Close

func (a *Application) Close(ctx context.Context)

Close releases all resources acquired during Bootstrap. Safe to call even if Bootstrap was only partially successful.

func (*Application) Start

func (a *Application) Start(ctx context.Context) error

Start creates the BackgroundWorker, wires the cron dispatcher through it, creates the AG-UI HTTP server, starts the cron scheduler, sets up the messenger receive loop, and blocks until the context is cancelled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL