agent-afk 5.321.3 → 5.321.4
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.
- package/dist/agent/daemon/handoff-expiry.d.ts +2 -1
- package/dist/agent/daemon/handoff-maintenance.d.ts +2 -0
- package/dist/agent/daemon/lease-reclaim.d.ts +2 -0
- package/dist/agent/daemon/lease-store.d.ts +1 -0
- package/dist/cli.mjs +432 -432
- package/dist/index.mjs +190 -190
- package/dist/telegram.mjs +201 -201
- package/package.json +1 -1
|
@@ -7,11 +7,12 @@ export interface ExpireHandoffOpts {
|
|
|
7
7
|
queueDir?: string;
|
|
8
8
|
ttlMs?: number;
|
|
9
9
|
now?: number;
|
|
10
|
+
isInFlight?: (taskId: string) => boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare function isHandoffStale(record: Pick<HandoffRecord, 'createdAt'>, now: number, ttlMs?: number): boolean;
|
|
12
13
|
export declare function expireHandoff(taskId: string, opts?: ExpireHandoffOpts): Promise<boolean>;
|
|
13
14
|
export declare function expireStaleHandoffs(opts?: ExpireHandoffOpts): Promise<number>;
|
|
14
|
-
export declare function sweepExpiredHandoffs(queueDir: string, now?: number, handoffsDir?: string): void;
|
|
15
|
+
export declare function sweepExpiredHandoffs(queueDir: string, now?: number, handoffsDir?: string, isInFlight?: (taskId: string) => boolean): void;
|
|
15
16
|
export declare function resetExpirySweepThrottleForTests(): void;
|
|
16
17
|
export declare function expiryNoticeRoute(route: unknown): {
|
|
17
18
|
target: number;
|
|
@@ -8,6 +8,8 @@ export interface HandoffMaintenanceOpts {
|
|
|
8
8
|
handoffsDir?: string;
|
|
9
9
|
bot?: Telegraf;
|
|
10
10
|
drainResumeQueue: (resumeDir: string) => Promise<void>;
|
|
11
|
+
recoverMainQueue?: () => void;
|
|
12
|
+
isInFlight?: (taskId: string) => boolean;
|
|
11
13
|
intervalMs?: number;
|
|
12
14
|
}
|
|
13
15
|
export interface HandoffMaintenanceHandle {
|
|
@@ -7,3 +7,4 @@ export declare function completeTask(taskId: string, status: 'succeeded' | 'fail
|
|
|
7
7
|
export declare function recoverExpiredLeases(queueDir?: string): TaskRecord[];
|
|
8
8
|
export declare function getTaskRecord(taskId: string, queueDir?: string): TaskRecord | null;
|
|
9
9
|
export declare function listActiveTasks(queueDir?: string): TaskRecord[];
|
|
10
|
+
export declare function reEnqueueRecord(record: TaskRecord, queueDir: string): void;
|