agent-afk 5.183.1 → 5.184.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,15 @@
1
+ import type { ElicitationHandler } from '../elicitation-router.js';
2
+ export interface DaemonElicitationOpts {
3
+ taskId: string;
4
+ originalCommand: string;
5
+ queueDir?: string;
6
+ handoffsDir?: string;
7
+ }
8
+ export declare function makeDaemonElicitationHandler(opts: DaemonElicitationOpts): ElicitationHandler;
9
+ export interface RecoveryResult {
10
+ renotified: number;
11
+ expired: number;
12
+ }
13
+ export declare function recoverPendingHandoffs(handoffsDir?: string, queueDir?: string): Promise<RecoveryResult>;
14
+ export declare function answerHandoff(taskId: string, answer: unknown, source: string, handoffsDir?: string): Promise<boolean>;
15
+ export declare function cleanupHandoff(taskId: string, handoffsDir?: string): Promise<void>;
@@ -1,7 +1,8 @@
1
1
  import { type QueuedTask } from './queue-store.js';
2
- import { type TaskRecord } from './task-lifecycle.js';
2
+ import { type TaskRecord, type TaskState } from './task-lifecycle.js';
3
3
  export declare function leaseTask(task: QueuedTask, srcPath: string, leaseTtlMs?: number, queueDir?: string): TaskRecord;
4
4
  export declare function renewLease(taskId: string, leaseTtlMs?: number, queueDir?: string): void;
5
+ export declare function setLeaseState(taskId: string, state: TaskState, queueDir?: string): void;
5
6
  export declare function completeTask(taskId: string, status: 'succeeded' | 'failed', error?: string, queueDir?: string): void;
6
7
  export declare function recoverExpiredLeases(queueDir?: string): TaskRecord[];
7
8
  export declare function getTaskRecord(taskId: string, queueDir?: string): TaskRecord | null;