app

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 87 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config *config.Config

	// Core Components
	Agent   *adk.Agent
	Gateway *gateway.Server
	Store   session.Store

	// Browser (optional, io.Closer)
	Browser io.Closer

	// Security Components (optional)
	Crypto  security.CryptoProvider
	Keys    *security.KeyRegistry
	Secrets *security.SecretsStore

	// Approval Provider (composite, routes to channel-specific providers)
	ApprovalProvider approval.Provider
	GrantStore       *approval.GrantStore

	// Self-Learning Components
	KnowledgeStore *knowledge.Store
	LearningEngine *learning.Engine
	SkillRegistry  *skill.Registry

	// Agent Memory Components (optional, per-agent persistent memory)
	AgentMemoryStore agentmemory.Store

	// Observational Memory Components (optional)
	MemoryStore  *memory.Store
	MemoryBuffer *memory.Buffer

	// Embedding / RAG Components (optional)
	EmbeddingBuffer *embedding.EmbeddingBuffer
	RAGService      *embedding.RAGService

	// Conversation Analysis Components (optional)
	AnalysisBuffer *learning.AnalysisBuffer

	// Proactive Librarian Components (optional)
	LibrarianInquiryStore    *librarian.InquiryStore
	LibrarianProactiveBuffer *librarian.ProactiveBuffer

	// Graph Components (optional)
	GraphStore  graph.Store
	GraphBuffer *graph.GraphBuffer

	// Payment Components (optional)
	WalletProvider  wallet.WalletProvider
	PaymentService  *payment.Service
	X402Interceptor *x402pkg.Interceptor

	// Cron Scheduling Components (optional)
	CronScheduler *cronpkg.Scheduler

	// Background Task Components (optional)
	BackgroundManager *background.Manager

	// Workflow Engine Components (optional)
	WorkflowEngine *workflow.Engine

	// MCP Components (optional, external MCP server integration)
	MCPManager *mcp.ServerManager

	// Tool Catalog (built-in tool discovery + dynamic dispatch)
	ToolCatalog *toolcatalog.Catalog

	// P2P Components (optional)
	P2PNode            *p2p.Node
	P2PAgentPool       *agentpool.Pool
	P2PTeamCoordinator *team.Coordinator
	P2PAgentProvider   agentpool.DynamicAgentProvider

	// Event Bus (app-level, for hooks and cross-component communication)
	EventBus *eventbus.Bus

	// Agent Registry (dynamic agent definitions)
	AgentRegistry *agentregistry.Registry

	// Hook Registry (tool execution hooks)
	HookRegistry *toolchain.HookRegistry

	// Channels
	Channels []Channel
	// contains filtered or unexported fields
}

App is the root application structure

func New

func New(boot *bootstrap.Result) (*App, error)

New creates a new application instance from a bootstrap result.

func (*App) Start

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

Start starts the application services using the lifecycle registry.

func (*App) Stop

func (a *App) Stop(ctx context.Context) error

Stop stops the application services and waits for all goroutines to exit.

type Channel

type Channel interface {
	Start(ctx context.Context) error
	Stop()
}

Channel represents a communication channel (Telegram, Discord, Slack)

Jump to

Keyboard shortcuts

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