Files
oh-my-opencode/dist/features/background-agent/task-poller.d.ts
T
2026-03-14 04:56:50 +00:00

22 lines
944 B
TypeScript

import type { BackgroundTaskConfig } from "../../config/schema";
import type { BackgroundTask } from "./types";
import type { ConcurrencyManager } from "./concurrency";
import type { OpencodeClient } from "./opencode-client";
export declare function pruneStaleTasksAndNotifications(args: {
tasks: Map<string, BackgroundTask>;
notifications: Map<string, BackgroundTask[]>;
onTaskPruned: (taskId: string, task: BackgroundTask, errorMessage: string) => void;
}): void;
export type SessionStatusMap = Record<string, {
type: string;
}>;
export declare function checkAndInterruptStaleTasks(args: {
tasks: Iterable<BackgroundTask>;
client: OpencodeClient;
config: BackgroundTaskConfig | undefined;
concurrencyManager: ConcurrencyManager;
notifyParentSession: (task: BackgroundTask) => Promise<void>;
sessionStatuses?: SessionStatusMap;
onTaskInterrupted?: (task: BackgroundTask) => void;
}): Promise<void>;