agent-afk 5.310.12 → 5.310.13
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/tools/handlers/worktree-managed.d.ts +6 -0
- package/dist/agent/tools/subagent-executor.execute-once.helpers.d.ts +2 -0
- package/dist/agent/worktree/worktree-setup.d.ts +38 -0
- package/dist/cli.mjs +388 -380
- package/dist/index.mjs +188 -180
- package/dist/paths.d.ts +1 -0
- package/dist/telegram.mjs +202 -194
- package/package.json +1 -1
|
@@ -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;
|