/** * Memory Agent initialization. * * Extracted from cli/commands/start.ts to keep the orchestrator thin. * All logic and function signatures are unchanged. * * Responsibilities: * 1. Loads memory agent persona via ensureMemoryPersona() * 2. Creates memoryAgentContext (AgentContext) * 3. Constructs a new AgentLoop for the memory agent (model: claude-sonnet-4-6, maxTurns: 3, tools: mama_search/mama_save) * 4. Creates memoryProcessManager with getSharedProcess().sendMessage() implementation: * - Bootstrap delivery (first-time only, with lock) * - Decision count tracking (before/after) * - buildMemoryAuditAckFromAgentResult for ack classification * 5. Wires to messageRouter.setMemoryAgent() */ import type { MAMAConfig } from '../config/types.js'; import type { OAuthManager } from '../../auth/index.js'; import { AgentLoop } from '../../agent/index.js'; import type { MessageRouter } from '../../gateways/message-router.js'; import type { MAMAApiShape } from './types.js'; import type { MamaApiClient } from '../../gateways/context-injector.js'; /** * Result returned by initMemoryAgent. */ export interface MemoryAgentInitResult { memoryAgentLoop: AgentLoop | null; } /** * Initialize the memory agent (persistent process for fact extraction). * * On success, wires memoryProcessManager into messageRouter via setMemoryAgent(). * On failure, logs a non-fatal warning and returns { memoryAgentLoop: null }. */ export declare function initMemoryAgent(oauthManager: OAuthManager, config: MAMAConfig, mamaApi: MAMAApiShape, mamaApiClient: MamaApiClient, messageRouter: MessageRouter, _runtimeBackend: string): Promise; //# sourceMappingURL=memory-agent-init.d.ts.map