@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio
44 lines (43 loc) • 1.74 kB
TypeScript
/**
* FileTaskStore — File-based persistence for TaskManager.
* Used automatically when backend is "node-timeout".
*
* Storage layout:
* {storePath} — tasks.json (all task definitions)
* {logsPath}/{taskId}.jsonl — run log per task (append-only)
* Continuation history is in-memory only (lost on restart).
*/
import { type Task, type TaskStatus, type TaskRunResult, type TaskStore, type TaskManagerConfig, type ConversationEntry } from "../../types/index.js";
export declare class FileTaskStore implements TaskStore {
readonly type: "file";
private storePath;
private logsPath;
private maxRunLogs;
private maxHistoryEntries;
private tasks;
/** In-memory only — lost on restart */
private history;
private flushQueue;
constructor(config: TaskManagerConfig);
initialize(): Promise<void>;
shutdown(): Promise<void>;
save(task: Task): Promise<void>;
get(taskId: string): Promise<Task | null>;
list(filter?: {
status?: TaskStatus;
}): Promise<Task[]>;
update(taskId: string, updates: Partial<Task>): Promise<Task>;
delete(taskId: string): Promise<void>;
appendRun(taskId: string, run: TaskRunResult): Promise<void>;
getRuns(taskId: string, options?: {
limit?: number;
status?: string;
}): Promise<TaskRunResult[]>;
appendHistory(taskId: string, messages: ConversationEntry[]): Promise<void>;
getHistory(taskId: string): Promise<ConversationEntry[]>;
clearHistory(taskId: string): Promise<void>;
/** Write all tasks to disk atomically, serialized via promise queue */
private flush;
/** Prune run log if it exceeds maxRunLogs entries */
private pruneRunLog;
}