agent-afk 5.310.12 → 5.310.14

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.
@@ -18,6 +18,7 @@ export interface HandoffRecord {
18
18
  answer?: unknown;
19
19
  answeredAt?: string;
20
20
  answerSource?: string;
21
+ responderIdentity?: string;
21
22
  originalCommand: string;
22
23
  telegramMessageId?: number;
23
24
  }
@@ -26,5 +27,5 @@ export declare function readHandoff(taskId: string, handoffsDir?: string): Promi
26
27
  export declare function deleteHandoff(taskId: string, handoffsDir?: string): Promise<void>;
27
28
  export declare function listPendingHandoffs(handoffsDir?: string): Promise<HandoffRecord[]>;
28
29
  export declare function withHandoffLock<T>(taskId: string, handoffsDir: string, cb: () => Promise<T>): Promise<T | null>;
29
- export declare function updateHandoffAnswer(taskId: string, answer: unknown, source: string, handoffsDir?: string): Promise<UpdateHandoffResult>;
30
+ export declare function updateHandoffAnswer(taskId: string, answer: unknown, source: string, handoffsDir?: string, responderIdentity?: string): Promise<UpdateHandoffResult>;
30
31
  export {};
@@ -15,5 +15,5 @@ export interface RecoveryResult {
15
15
  expired: number;
16
16
  }
17
17
  export declare function recoverPendingHandoffs(handoffsDir?: string, queueDir?: string, bot?: Telegraf): Promise<RecoveryResult>;
18
- export declare function answerHandoff(taskId: string, answer: unknown, source: string, handoffsDir?: string): Promise<boolean>;
18
+ export declare function answerHandoff(taskId: string, answer: unknown, source: string, handoffsDir?: string, responderIdentity?: string): Promise<boolean>;
19
19
  export declare function cleanupHandoff(taskId: string, handoffsDir?: string): Promise<void>;
@@ -6,6 +6,7 @@ export interface ResolvedComposeAgent {
6
6
  replaySafe?: boolean;
7
7
  systemPrompt?: string;
8
8
  leafNotice?: string;
9
+ strippedTools?: string[];
9
10
  namedAgentModel?: string;
10
11
  canUseTool?: CanUseTool;
11
12
  namedAgentAllowedTools?: string[];
@@ -1,4 +1,5 @@
1
1
  import type { ExecFileFn } from '../../worktree/worktree-sweep.js';
2
+ import { type SetupCommandRunner, type WorktreeSetupResult } from '../../worktree/worktree-setup.js';
2
3
  export declare const defaultExecFile: ExecFileFn;
3
4
  export interface RepoContext {
4
5
  repoRoot: string;
@@ -15,12 +16,15 @@ export interface CreateManagedWorktreeArgs {
15
16
  branch: string;
16
17
  baseRef: string;
17
18
  owner?: string;
19
+ signal?: AbortSignal;
20
+ setupRunner?: SetupCommandRunner;
18
21
  }
19
22
  export interface ManagedWorktreeInfo {
20
23
  path: string;
21
24
  branch: string;
22
25
  baseRef: string;
23
26
  baseSha: string;
27
+ setup?: WorktreeSetupResult;
24
28
  }
25
29
  export declare function createManagedWorktree(args: CreateManagedWorktreeArgs): Promise<ManagedWorktreeInfo>;
26
30
  export declare function isManagedWorktreeDirty(execFile: ExecFileFn, worktreePath: string): Promise<boolean>;
@@ -54,6 +58,8 @@ export declare function createIsolatedWorktree(args: {
54
58
  cwd: string;
55
59
  slugHint: string;
56
60
  baseRef?: string;
61
+ signal?: AbortSignal;
62
+ setupRunner?: SetupCommandRunner;
57
63
  }): Promise<ManagedWorktreeInfo & {
58
64
  repoRoot: string;
59
65
  }>;
@@ -15,6 +15,7 @@ export interface IsolationWorktreeResult {
15
15
  repoRoot: string;
16
16
  worktreePath: string;
17
17
  };
18
+ setupNotice?: string;
18
19
  }
19
20
  export interface SetupIsolationWorktreeArgs {
20
21
  parsed: AgentInput;
@@ -26,6 +27,7 @@ export interface SetupIsolationWorktreeArgs {
26
27
  childWriteCapable: boolean;
27
28
  probe: StreamCutProbe | undefined;
28
29
  budgetReceipt: SpawnReceipt | undefined;
30
+ signal?: AbortSignal;
29
31
  }
30
32
  export declare function setupIsolationWorktree(args: SetupIsolationWorktreeArgs): Promise<IsolationWorktreeResult | {
31
33
  skipped: true;
@@ -0,0 +1,38 @@
1
+ export declare const DEFAULT_WORKTREE_SETUP_TIMEOUT_MS: number;
2
+ export type WorktreeSetupStatus = 'none' | 'ok' | 'failed' | 'timeout' | 'aborted' | 'invalid';
3
+ export interface WorktreeSetupResult {
4
+ status: WorktreeSetupStatus;
5
+ command?: string;
6
+ detail?: string;
7
+ completed?: string[];
8
+ }
9
+ export interface WorktreeSetupDeclaration {
10
+ commands: string[];
11
+ timeoutMs: number;
12
+ }
13
+ export type SetupCommandOutcome = {
14
+ kind: 'ok';
15
+ } | {
16
+ kind: 'failed';
17
+ detail: string;
18
+ } | {
19
+ kind: 'timeout';
20
+ } | {
21
+ kind: 'aborted';
22
+ };
23
+ export type SetupCommandRunner = (command: string, opts: {
24
+ cwd: string;
25
+ timeoutMs: number;
26
+ signal?: AbortSignal;
27
+ }) => Promise<SetupCommandOutcome>;
28
+ export declare function readWorktreeSetupDeclaration(worktreePath: string): Promise<WorktreeSetupDeclaration | undefined | string>;
29
+ export declare const defaultSetupCommandRunner: SetupCommandRunner;
30
+ export declare function runWorktreeSetup(args: {
31
+ worktreePath: string;
32
+ signal?: AbortSignal;
33
+ runCommand?: SetupCommandRunner;
34
+ }): Promise<WorktreeSetupResult>;
35
+ export declare function describeWorktreeSetupFailure(result: WorktreeSetupResult | undefined, worktreePath: string): string | undefined;
36
+ export declare function prependSetupNotice<T extends {
37
+ content: string;
38
+ }>(notice: string | undefined, result: T): T;
@@ -21,9 +21,7 @@ export declare function installPeerBoundary(opts: PeerBoundaryOpts): () => void;
21
21
  export declare function reinstallPeerBoundary(opts: PeerBoundaryOpts, prevDispose: (() => void) | undefined): () => void;
22
22
  export declare function drainAdmissionQueueFallback(text: string, q: AdmissionQueue): string;
23
23
  export declare function applyDeferPeers(runText: string, queuedHumanTurn: boolean, surface: Pick<InputSurface, 'getCompositor'>, shellPassthrough: InjectionSource, bgResultNotifier: InjectionSource, peerNotifier: InjectionSource, admissionQueue: AdmissionQueue, processJobNotifier?: InjectionSource): string;
24
- export declare function setupPeerBoundary(ctx: InteractiveCtx, surface: InputSurface, peerNotifier: PeerInboxNotifier, isQueuedHumanTurn: () => boolean, processJobNotifier?: InjectionSource & {
25
- hasPendingInjections(): boolean;
26
- }): {
24
+ export declare function setupPeerBoundary(ctx: InteractiveCtx, surface: InputSurface, peerNotifier: PeerInboxNotifier, isQueuedHumanTurn: () => boolean, processJobNotifier?: InjectionSource): {
27
25
  admissionQueue: AdmissionQueue;
28
26
  reinstall: () => void;
29
27
  };