agent-afk 5.111.2 → 5.111.3
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/abort-graph.d.ts +1 -0
- package/dist/agent/subagent/constants.d.ts +1 -0
- package/dist/agent/subagent.d.ts +7 -1
- package/dist/agent/types/config-types.d.ts +1 -0
- package/dist/cli/commands/interactive/bootstrap-session-builder.d.ts +2 -0
- package/dist/cli.mjs +528 -528
- package/dist/index.mjs +160 -160
- package/dist/telegram.mjs +233 -233
- package/package.json +1 -1
|
@@ -11,6 +11,7 @@ export declare class AbortGraph {
|
|
|
11
11
|
constructor(traceWriter?: TraceWriter);
|
|
12
12
|
setTraceWriter(writer: TraceWriter | undefined): void;
|
|
13
13
|
register(id: string, controller: AbortController): void;
|
|
14
|
+
rearm(id: string, controller: AbortController): void;
|
|
14
15
|
has(id: string): boolean;
|
|
15
16
|
getController(id: string): AbortController | undefined;
|
|
16
17
|
childrenOf(id: string): string[];
|
|
@@ -6,3 +6,4 @@ export declare function resolveSubagentTimeoutMs(): number;
|
|
|
6
6
|
export declare const SUBAGENT_DEFAULT_IDLE_TIMEOUT_MS: number;
|
|
7
7
|
export declare function resolveSubagentIdleTimeoutMs(): number;
|
|
8
8
|
export declare const SUBAGENT_BACKGROUND_TIMEOUT_MS: number;
|
|
9
|
+
export declare const SUBAGENT_DRAIN_TIMEOUT_MS = 5000;
|
package/dist/agent/subagent.d.ts
CHANGED
|
@@ -22,9 +22,10 @@ export declare class SubagentManager {
|
|
|
22
22
|
private readonly worktreeMainRootCache;
|
|
23
23
|
private parentTraceWriter;
|
|
24
24
|
private readonly parentSurface;
|
|
25
|
+
private readonly parentAbortSignal;
|
|
25
26
|
private readonly abortGraph;
|
|
26
27
|
private readonly rootId;
|
|
27
|
-
private
|
|
28
|
+
private rootController;
|
|
28
29
|
private counter;
|
|
29
30
|
private onSubagentSucceededCb;
|
|
30
31
|
constructor(options?: SubagentManagerOptions);
|
|
@@ -40,5 +41,10 @@ export declare class SubagentManager {
|
|
|
40
41
|
forkSubagent<T = unknown>(options: ForkSubagentOptions<T>): Promise<SubagentHandle<T>>;
|
|
41
42
|
kill(id: string): Promise<boolean>;
|
|
42
43
|
killAll(): Promise<void>;
|
|
44
|
+
abortAllAndDrain(reason?: unknown, origin?: AbortOrigin, timeoutMs?: number, rearm?: boolean): Promise<{
|
|
45
|
+
drained: number;
|
|
46
|
+
timedOut: boolean;
|
|
47
|
+
}>;
|
|
48
|
+
private rearmRoot;
|
|
43
49
|
teardownAll(): Promise<void>;
|
|
44
50
|
}
|
|
@@ -69,6 +69,7 @@ export interface AgentConfig {
|
|
|
69
69
|
hookRegistry?: HookRegistry;
|
|
70
70
|
planExitControls?: PlanExitControls;
|
|
71
71
|
traceWriter?: TraceWriter;
|
|
72
|
+
drainSubagents?: (reason: string) => Promise<unknown>;
|
|
72
73
|
isSubagentFork?: true;
|
|
73
74
|
provider?: ModelProvider;
|
|
74
75
|
providerFactory?: (model: string | undefined) => ModelProvider;
|
|
@@ -18,6 +18,7 @@ export interface BuildAgentSessionDeps {
|
|
|
18
18
|
providerFactory: (model: string | undefined) => ModelProvider;
|
|
19
19
|
hookRegistry: HookRegistry;
|
|
20
20
|
traceWriter: TraceWriter | undefined;
|
|
21
|
+
drainSubagents?: ((reason: string) => Promise<unknown>) | undefined;
|
|
21
22
|
cwd: string | undefined;
|
|
22
23
|
maxTurns: number;
|
|
23
24
|
autoResumeOnUsageLimit: boolean | undefined;
|
|
@@ -38,6 +39,7 @@ export declare function buildSharedDeps(a: {
|
|
|
38
39
|
providerFactory: (m: string | undefined) => ModelProvider;
|
|
39
40
|
hookRegistry: HookRegistry;
|
|
40
41
|
traceWriter: TraceWriter | undefined;
|
|
42
|
+
drainSubagents?: ((reason: string) => Promise<unknown>) | undefined;
|
|
41
43
|
effectiveCwd: string | undefined;
|
|
42
44
|
maxTurns: string;
|
|
43
45
|
initialPermissionMode: PermissionMode | undefined;
|