/** * mama start command — thin orchestrator. * * This file contains two functions: * - startCommand() — CLI entry point (config load, foreground/daemon decision) * - runAgentLoop() — linear orchestrator that calls all init functions in order * * All heavy lifting is delegated to modules in ../runtime/. */ import { loadConfig } from '../config/config-manager.js'; import type { GatewayToolExecutionContext } from '../../agent/types.js'; import type { CodeActExecutionContext } from '../../api/graph-api-types.js'; import { type MemoryScopeRef } from '../../memory/scope-context.js'; import { type AgentPersonaConfig } from '../config/types.js'; import type { DBManagerAdapter as DatabaseAdapter } from '@jungjaehoon/mama-core'; export declare function deriveCodeActToolPolicy(requestContext: CodeActExecutionContext | undefined, agentConfig: Omit | undefined): { allowedTools?: string[]; blockedTools?: string[]; }; export declare function resolveCodeActAgentPolicy(requestContext: CodeActExecutionContext | undefined, agents: Record> | undefined, defaultAgentId: string): { agentId: string; agentConfig?: Omit; policy?: { allowedTools?: string[]; blockedTools?: string[]; }; error?: string; }; export declare function resolveCodeActRawConnectors(enabledConnectorNames: readonly string[] | undefined): string[]; export declare function resolveCodeActMemoryScopes(baseScopes: readonly MemoryScopeRef[], adapter?: Pick): MemoryScopeRef[]; type CodeActModelRunAdapter = Pick; type CodeActExecutionResultLike = { success?: boolean; error?: { message?: string; } | string; }; export interface CodeActParentModelRunOptions { inputSnapshotRef: string; inputRefs: Record; } export declare function bindCodeActParentModelRun(adapter: CodeActModelRunAdapter, executionContext: GatewayToolExecutionContext | null, options: CodeActParentModelRunOptions): { executionContext: GatewayToolExecutionContext | null; modelRunId: string | null; }; export declare function finalizeCodeActParentModelRun(adapter: CodeActModelRunAdapter, modelRunId: string | null, result: CodeActExecutionResultLike): void; export declare function failCodeActParentModelRun(adapter: CodeActModelRunAdapter, modelRunId: string | null, error: unknown): void; /** * Options for start command */ export interface StartOptions { /** Run in foreground (not as daemon) */ foreground?: boolean; } export declare function buildSystemAgentProcessDefaults(config: { multi_agent?: { dangerouslySkipPermissions?: boolean; }; }): { dangerouslySkipPermissions: boolean; }; /** * Execute start command */ export declare function startCommand(options?: StartOptions): Promise; /** * Run agent loop (for foreground and daemon mode). * * This is the linear orchestrator — each phase calls one or more * init functions and threads their results into the next phase. * * Phase 1: Foundation (config, db, oauth, metrics) * Phase 2: Session + Tool + Agent Loop * Phase 3: MAMA Core API * Phase 4: Memory Agent + MessageRouter * Phase 5: Graph Handler + Embedding * Phase 6: Cron Scheduler * Phase 7: Gateways * Phase 8: Gateway Wiring * Phase 9: Heartbeat + Connectors * Phase 10: API Server + Routes * Phase 11: Server Start + Shutdown */ export declare function runAgentLoop(config: Awaited>, options?: { osAgentMode?: boolean; }): Promise; export {}; //# sourceMappingURL=start.d.ts.map