/** * App Registry - Global registration point for user-defined application code. * * Framework core files call the getRegistered*() functions to access user code * instead of importing directly from user files. This enables the framework * to be distributed as an npm package while still accessing user-defined * agents, entities, routes, etc. * * Users register their code via createApp() which calls setAppConfig() internally. */ import type { AgentDefinition } from './core-agent'; import type { EntityClass } from './core-entities'; import type { ScheduledJob } from './core-scheduler'; import type { WorkflowDefinition } from './core-workflow-types'; import type { EndpointDefinition } from './core-endpoints'; import type { IntegrationRequirement } from './core-integrations'; import type { Hono } from 'hono'; import type { Env } from './core-utils'; /** Component metadata for workspace registration */ export interface ComponentMetadata { tag: string; description?: string; attributes?: Record; } /** Component definition for registerable UI components */ export interface ComponentDefinition { name: string; title: string; description?: string; chatId?: string; frontend: boolean; backend: boolean; metadata: ComponentMetadata; } /** A user-defined route function or an EndpointDefinition */ export type AppRoute = (app: Hono<{ Bindings: Env; }>) => void; export type RouteEntry = AppRoute | EndpointDefinition; /** * Configuration for all registerable application features. */ export interface AppConfig { agents: AgentDefinition[]; entities: Array>; routes: RouteEntry[]; endpoints: EndpointDefinition[]; workflows: WorkflowDefinition[]; schedules: ScheduledJob[]; integrationRequirements: IntegrationRequirement[]; components: ComponentDefinition[]; } /** * Store the app configuration. Called internally by createApp(). * Should not be called directly by user code. */ export declare function setAppConfig(config: AppConfig): void; /** * Retrieve the full app configuration. * Throws if createApp() has not been called yet. */ export declare function getAppConfig(): AppConfig; export declare function getRegisteredAgents(): AgentDefinition[]; export declare function getRegisteredEntities(): Array>; export declare function getRegisteredRoutes(): RouteEntry[]; export declare function getRegisteredEndpoints(): EndpointDefinition[]; export declare function getRegisteredWorkflows(): WorkflowDefinition[]; export declare function getRegisteredSchedules(): ScheduledJob[]; export declare function getRegisteredIntegrationRequirements(): IntegrationRequirement[]; export declare function getRegisteredComponents(): ComponentDefinition[];