/** * MAMA Core API initialization. * * Extracted from cli/commands/start.ts to keep the orchestrator thin. * All logic and function signatures are unchanged. * * Responsibilities: * 1. Dynamically require mama-core (initDB, getAdapter, mamaCore) * 2. Wire up connectorExtractionFn via PersistentClaudeProcess (lazy-init + lifecycle) * 3. Normalize the MAMA API shape into mamaApi * 4. Build search() / searchForContext() wrapper functions with fallback handling * 5. Build loadCheckpointForContext / listDecisionsForContext wrappers * 6. Assemble and return the mamaApiClient object */ import type { MAMAConfig } from '../config/types.js'; import type { MamaApiClient } from '../../gateways/context-injector.js'; import type { MAMAApiShape } from './types.js'; /** * Result returned by initMamaCore. */ export interface MamaCoreInitResult { mamaApi: MAMAApiShape; mamaApiClient: MamaApiClient; connectorExtractionFn: ((prompt: string) => Promise) | null; } /** * Initialize the MAMA Core API. * * Reads `config.database.path`, boots the mama-core DB, sets up the * connector extraction process (if supported), normalises the API shape, * and returns the three values that the rest of runAgentLoop() consumes. */ export declare function initMamaCore(config: MAMAConfig): Promise; //# sourceMappingURL=mama-core-init.d.ts.map