/** * Memory-session bridge — creates a BRAIN observation of type 'session-summary' * when a session ends, and links it to all tasks completed/created in the session * via the brain_task_observations join table. * * This enables `cleo memory find` queries to surface session context without * needing the handoff text. * * @task T1615 * @epic T1611 */ /** Session data needed to create a memory bridge observation. */ export interface SessionBridgeData { sessionId: string; scope: string; tasksCompleted: string[]; duration: number; /** Tasks created during the session (optional, defaults to []). */ tasksCreated?: string[]; /** Optional human-authored note from session end. */ note?: string; } /** Result from bridgeSessionToMemory. */ export interface SessionBridgeResult { /** The observation ID written to brain.db, or null if skipped. */ observationId: string | null; /** Number of task links written to brain_task_observations. */ taskLinksCreated: number; } /** * Bridge session end data to brain.db as a 'session-summary' observation. * * Creates one brain_observations row of type 'session-summary' linked to the * ending session, then inserts rows into brain_task_observations for every task * that was completed or created during the session. This makes the session * context discoverable via `cleo memory find` queries without reading any * markdown handoff file. * * The function is best-effort — all errors are caught and the caller never sees * a rejection (sessions/index.ts wraps calls with `.catch(() => {})`). * * @param projectRoot - Absolute path to the project root directory * @param sessionData - Session metadata: ID, scope, tasks, duration, optional note * @returns Result with observation ID and count of task links created */ export declare function bridgeSessionToMemory(projectRoot: string, sessionData: SessionBridgeData): Promise; //# sourceMappingURL=session-memory-bridge.d.ts.map