export declare function withGitLock(fn: () => T | Promise): Promise; export interface TaskRepoOptions { /** Skip git-add/commit/push after mutations — for tests. Defaults to false. */ skipGit?: boolean; } export declare class TaskRepo { private tasks; private taskMutex; private initialized; private readonly skipGit; constructor(opts?: TaskRepoOptions); /** Load all tasks from TASKS.yaml files into memory */ load(): void; /** Reload tasks from files (e.g. after external edit or git pull) */ refresh(): void; /** * WARNING: this refreshes from disk on every call — `load()` walks every TASKS.yaml. * task-dispatcher invokes this on every dispatch tick, so this is a * hot path. If you observe dispatcher latency regression, this is the first * suspect — consider caching or splitting into a `getActionableCached()` fast-path. */ getActionable(): any[]; getAll(project?: string): any[]; getById(taskId: string): any | null; getStats(): any; getGpuBusyMachines(): Map; runExclusive(fn: () => T | Promise): Promise; /** * Wait for any in-flight `runExclusive` / mutation to drain. * Acquire-release the mutex; FIFO ordering guarantees all preceding * operations have completed when this resolves. * Git sync is synchronous so it's always done by the time mutex releases. * Known limitation: asyncPush errors may be lost during SIGTERM drain — * matching current task-store.ts behavior. */ flush(): Promise; /** Commit TASKS.yaml changes and push to origin/main */ commitAndPush(message: string): void; private asyncPush; } export declare const taskStore: TaskRepo;