/** * Shared runtime initialization for agentd. * * Extracts the common initialization logic from cli/start.ts into a reusable * factory. Both stdio and `vess daemon start` (HTTP) transports use this. * * createEngine(clientName) resolves Agent DID per (project, clientName) via * AgentIdentityResolver, then creates an ExecutionEngine with that identity. * * createMcpServer(clientName) creates ExecutionEngine + McpAdapter + McpServer * for a given client. */ import Database from 'better-sqlite3'; import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { ExecutionEngine } from './execution-engine'; import { SyncScheduler } from './sync-scheduler'; export interface RuntimeComponents { /** Create an ExecutionEngine for a given client name (per-client Agent DID) */ createEngine: (clientName: string) => Promise; /** Create a full MCP server (Engine + Adapter + McpServer) for a given client */ createMcpServer: (clientName: string) => Promise<{ server: McpServer; setClientInfo: (info: { name: string; version: string; }) => void; }>; /** Sync scheduler (shared across all clients) */ syncScheduler: SyncScheduler; /** SQLite database handle */ db: Database.Database; /** Cleanup function: stops scheduler, closes DB */ cleanup: () => void; } /** * Initialize the agentd runtime. * * This sets up all shared infrastructure (config, DB, policies, wallet, audit, * gateway client, identity resolver, sync scheduler) and returns factories * for creating per-client engines and MCP servers. */ export declare function initializeRuntime(): Promise; //# sourceMappingURL=runtime.d.ts.map