import type { ExtensionAPI, ExtensionContext, SessionStartEvent } from "@earendil-works/pi-coding-agent"; import { FileTodoStore } from "./store.ts"; import type { TodoDefinition, TodoListDocument, TodoListView } from "./types.ts"; export declare const TODO_BINDING_ENTRY = "pi-todo-binding"; export declare const TODO_DIGEST_MESSAGE = "pi-todo-digest"; export declare const AGENT_STATUS_REQUEST_CHANNEL = "pi:agent:status-request"; export interface TodoRuntimeOptions { dataDir?: string; } export declare class TodoRuntime { readonly store: FileTodoStore; private readonly pi; private binding; private unboundListId; private context; private agentContext; private readonly liveOwners; private readonly pendingOwnerEvidence; private readonly pendingReconcile; private ownerReconciliationPending; private digestActive; private turnsSinceReminder; constructor(pi: ExtensionAPI, options?: TodoRuntimeOptions); getListId(): string | undefined; getTaskContext(): { listId: string; taskId: string; agentId?: string; } | undefined; initialize(event: SessionStartEvent, ctx: ExtensionContext): Promise; restoreTree(ctx: ExtensionContext): Promise; replace(globalDirection: string, items: readonly TodoDefinition[]): Promise; add(items: readonly TodoDefinition[], globalDirection?: string): Promise; update(taskId: string, patch: Parameters[2]): Promise; claim(taskId: string, owner?: string, expectedRevision?: number): Promise; release(taskId: string): Promise; transfer(taskId: string, owner: string): Promise; confirmOwnerLive(taskId: string, owner: string): Promise; syncCurrent(): Promise; releaseIfOwned(taskId: string, owner: string): Promise; reconcileOwners(): Promise; delete(taskId: string): Promise; clear(): Promise; view(): Promise; getTask(taskId: string): Promise; /** * Records that a worker reported completion for a task that is not checked * off yet. Keyed by task id so duplicate lifecycle events do not repeat the * entry; surfaced in the next digest as a "Needs reconciliation" section. */ recordPendingReconcile(taskId: string, agentId: string): void; digest(): Promise; injectDigest(deliverAs?: "followUp" | "nextTurn"): Promise; onTurnEnd(): Promise; cancelDigest(_listId?: string | null | undefined): void; refresh(): Promise; private withMissingListUnbind; private unbind; private record; private prunePendingReconcile; private setBinding; private requireListId; private waitForOwnerEvidence; } //# sourceMappingURL=runtime.d.ts.map