/** * MCP Task Store (spec v2025-11-25) * * File-based persistence at ~/.photon/tasks/. * Each task is a JSON file: {taskId}.json * EventEmitter for state change notifications. */ import { EventEmitter } from 'events'; import { type Task } from './types.js'; /** Event emitter for task state changes */ export declare const taskEvents: EventEmitter<[never]>; export declare function registerController(taskId: string, controller: AbortController): void; export declare function unregisterController(taskId: string): void; export declare function getController(taskId: string): AbortController | undefined; export declare function createTask(photon: string, method: string, params?: Record, ttl?: number): Task; export declare function getTask(id: string): Task | null; export declare function updateTask(id: string, updates: Partial>): Task | null; export declare function listTasks(photon?: string): Task[]; /** * Clean expired task records. * * Only terminal task records are eligible. Active tasks may legitimately wait * for long-running work or user input, so cleanup must not remove them merely * because their retention window has elapsed. */ export declare function cleanExpiredTasks(ttlOverride?: number): number; /** Return the current tasks dir — resolves per call so tests can switch PHOTON_DIR. */ export declare function _getTasksDir(): string; //# sourceMappingURL=store.d.ts.map