agent-afk 5.131.1 → 5.132.1

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.
@@ -22,6 +22,7 @@ export interface RegisterArgs {
22
22
  prompt: string;
23
23
  model: string;
24
24
  parentSessionId?: string | undefined;
25
+ onCleanup?: () => Promise<void>;
25
26
  }
26
27
  export declare class BackgroundJobCapError extends Error {
27
28
  constructor(running: number, cap: number);
@@ -53,7 +54,6 @@ export declare class BackgroundAgentRegistry extends EventEmitter<BackgroundRegi
53
54
  getTranscript(jobId: string): string | undefined;
54
55
  private nextJobId;
55
56
  private markTerminal;
56
- private _sweepOldJobs;
57
57
  private statusFromResult;
58
58
  private snapshot;
59
59
  }
@@ -0,0 +1 @@
1
+ export declare function sweepOldBgJobs(): Promise<void>;
@@ -0,0 +1,7 @@
1
+ import { type IsolatedTeardownResult } from './worktree-managed.js';
2
+ export declare function lockWorktreeForBackground(repoRoot: string, worktreePath: string): Promise<void>;
3
+ export declare function unlockWorktreeForPromotion(repoRoot: string, worktreePath: string): Promise<void>;
4
+ export declare function teardownBackgroundWorktree(args: {
5
+ repoRoot: string;
6
+ worktreePath: string;
7
+ }): Promise<IsolatedTeardownResult>;
@@ -9,6 +9,11 @@ export interface RunBackgroundBranchArgs {
9
9
  model: string | undefined;
10
10
  parentSessionId: string | undefined;
11
11
  onSettled?: (isError: boolean) => void;
12
+ onCleanup?: () => Promise<void>;
13
+ isolationTeardown?: {
14
+ repoRoot: string;
15
+ worktreePath: string;
16
+ };
12
17
  }
13
18
  export declare function runBackgroundBranch(args: RunBackgroundBranchArgs): Promise<ToolResult>;
14
19
  export {};
@@ -6,6 +6,8 @@ import type { TraceSink } from '../../trace/index.js';
6
6
  import type { ToolResult } from '../types.js';
7
7
  import type { PromotedSubagentInfo } from '../subagent-executor.js';
8
8
  import { type QueuedNoteClaim } from './queued-note.js';
9
+ import { withProvenanceHeader } from './foreground-promotion.provenance.js';
10
+ export { withProvenanceHeader };
9
11
  type ForkedHandle = Awaited<ReturnType<SubagentManager['forkSubagent']>>;
10
12
  export interface PromotionTrigger {
11
13
  fire: (queuedNote?: QueuedNoteClaim) => void;
@@ -37,6 +39,4 @@ export interface RunForegroundArgs {
37
39
  worktreePath: string;
38
40
  };
39
41
  }
40
- export declare function withProvenanceHeader(content: string, model: string | undefined, parentModel: string | undefined): string;
41
42
  export declare function runForegroundWithPromotion(args: RunForegroundArgs): Promise<ToolResult>;
42
- export {};
@@ -0,0 +1 @@
1
+ export declare function withProvenanceHeader(content: string, model: string | undefined, parentModel: string | undefined): string;