/** * Active-dispatches index. Per-session JSON file at * `.peaks/_sub_agents//active-dispatches.json`. Map. Updated on dispatch + completion. */ export interface ActiveDispatchEntry { readonly recordPath: string; readonly requestId: string; readonly role: string; readonly batchId: string; readonly createdAt: string; readonly status: 'queued' | 'running' | 'finalizing' | 'done' | 'failed' | 'cancelled' | 'stale' | 'no-execution' | 'never-started' | 'unreadable'; } export declare function activeDispatchIndexPath(projectRoot: string, sessionId: string): string; export declare function registerActiveDispatch(input: { projectRoot: string; sessionId: string; recordPath: string; requestId: string; role: string; batchId: string; now: () => Date; }): void; export declare function unregisterActiveDispatch(input: { projectRoot: string; sessionId: string; recordPath: string; status: ActiveDispatchEntry['status']; }): void; /** * for a session. Returns the current map. Used * by the LLM-side runner to discover in-flight records on restart. * Returns an empty map when the index file is missing or corrupt * (the on-disk records directory is the next fallback). */ export declare function readActiveDispatchIndex(projectRoot: string, sessionId: string): Record;