agent-afk 5.200.0 → 5.201.0
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-store.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/build-dispatcher.d.ts +1 -0
- package/dist/agent/tools/dispatcher.d.ts +2 -0
- package/dist/agent/tools/handlers/_rolling-tail.d.ts +18 -0
- package/dist/agent/tools/types.d.ts +1 -0
- package/dist/agent/types/config-types.d.ts +1 -0
- package/dist/cli/_lib/stream-renderer.d.ts +1 -0
- package/dist/cli/commands/interactive/bootstrap-session-builder.d.ts +2 -0
- package/dist/cli/commands/interactive/shared.d.ts +6 -0
- package/dist/cli/commands/interactive/tool-lane-render.d.ts +1 -0
- package/dist/cli/commands/interactive/tool-lane.d.ts +1 -0
- package/dist/cli.mjs +690 -687
- package/dist/index.mjs +257 -255
- package/dist/telegram.mjs +323 -321
- package/package.json +1 -1
|
@@ -25,4 +25,5 @@ export declare function writeHandoff(record: HandoffRecord, handoffsDir?: string
|
|
|
25
25
|
export declare function readHandoff(taskId: string, handoffsDir?: string): Promise<HandoffRecord | null>;
|
|
26
26
|
export declare function deleteHandoff(taskId: string, handoffsDir?: string): Promise<void>;
|
|
27
27
|
export declare function listPendingHandoffs(handoffsDir?: string): Promise<HandoffRecord[]>;
|
|
28
|
+
export declare function withHandoffLock<T>(taskId: string, handoffsDir: string, cb: () => Promise<T>): Promise<T | null>;
|
|
28
29
|
export declare function updateHandoffAnswer(taskId: string, answer: unknown, source: string, handoffsDir?: string): Promise<UpdateHandoffResult>;
|
|
@@ -29,6 +29,7 @@ export interface BuildDispatcherOptions {
|
|
|
29
29
|
hookRegistry?: HookRegistry;
|
|
30
30
|
planExitControls?: PlanExitControls;
|
|
31
31
|
spawnedPidRegistry?: SpawnedPidRegistry;
|
|
32
|
+
bashOutputTailReporter?: (toolUseId: string) => (tail: string | undefined) => void;
|
|
32
33
|
}
|
|
33
34
|
export interface BuildDispatcherDeps {
|
|
34
35
|
memoryStore: MemoryStore;
|
|
@@ -41,6 +41,7 @@ export interface SessionToolDispatcherOptions {
|
|
|
41
41
|
readOnlyBash?: boolean;
|
|
42
42
|
maxOutputBytes?: number;
|
|
43
43
|
spawnedPidRegistry?: SpawnedPidRegistry;
|
|
44
|
+
bashOutputTailReporter?: (toolUseId: string) => (tail: string | undefined) => void;
|
|
44
45
|
}
|
|
45
46
|
export declare class SessionToolDispatcher implements ToolDispatcher {
|
|
46
47
|
private readonly handlers;
|
|
@@ -66,6 +67,7 @@ export declare class SessionToolDispatcher implements ToolDispatcher {
|
|
|
66
67
|
private readonly readOnlyBash;
|
|
67
68
|
private readonly maxOutputBytes;
|
|
68
69
|
private readonly spawnedPidRegistry;
|
|
70
|
+
private readonly bashOutputTailReporter;
|
|
69
71
|
private repeatBreaker;
|
|
70
72
|
private readonly repeatFailureGuard;
|
|
71
73
|
private denialBreaker;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const TAIL_MAX_LINES = 5;
|
|
2
|
+
export declare const TAIL_THROTTLE_MS = 300;
|
|
3
|
+
export type TailCallback = (tail: string | undefined) => void;
|
|
4
|
+
export declare class RollingTailBuffer {
|
|
5
|
+
private readonly onChange;
|
|
6
|
+
private readonly maxLines;
|
|
7
|
+
private readonly throttleMs;
|
|
8
|
+
private lines;
|
|
9
|
+
private lastNotifiedAt;
|
|
10
|
+
private pendingFlush;
|
|
11
|
+
private cleared;
|
|
12
|
+
constructor(onChange: TailCallback, maxLines?: number, throttleMs?: number);
|
|
13
|
+
push(raw: string): void;
|
|
14
|
+
peek(): string | undefined;
|
|
15
|
+
clear(): void;
|
|
16
|
+
private scheduleNotify;
|
|
17
|
+
private fireNotify;
|
|
18
|
+
}
|
|
@@ -16,6 +16,7 @@ export interface ToolHandlerContext {
|
|
|
16
16
|
toolUseId?: string;
|
|
17
17
|
sessionId?: string;
|
|
18
18
|
spawnedPidRegistry?: SpawnedPidRegistry;
|
|
19
|
+
onBashOutputTail?: (tail: string | undefined) => void;
|
|
19
20
|
}
|
|
20
21
|
export type ToolHandler = (input: unknown, signal: AbortSignal, context?: ToolHandlerContext) => Promise<ToolResult>;
|
|
21
22
|
export type ConcurrencyClassifier = (toolName: string, input?: unknown) => boolean;
|
|
@@ -75,6 +75,7 @@ export interface AgentConfig {
|
|
|
75
75
|
hookRegistry?: HookRegistry;
|
|
76
76
|
planExitControls?: PlanExitControls;
|
|
77
77
|
traceWriter?: TraceSink;
|
|
78
|
+
bashOutputTailReporter?: (toolUseId: string) => (tail: string | undefined) => void;
|
|
78
79
|
drainSubagents?: (reason: string) => Promise<unknown>;
|
|
79
80
|
isSubagentFork?: true;
|
|
80
81
|
provider?: ModelProvider;
|
|
@@ -53,6 +53,7 @@ export declare class StreamRenderer {
|
|
|
53
53
|
setSoftStopping(active: boolean): void;
|
|
54
54
|
stripPendingTerminalState(headingOffset: number): boolean;
|
|
55
55
|
getPendingBuffer(): string;
|
|
56
|
+
setBashOutputTail(toolUseId: string, tail: string | undefined): void;
|
|
56
57
|
notifyFirstContent(): void;
|
|
57
58
|
private buildOrchestratorCtx;
|
|
58
59
|
process(event: OutputEvent, meta?: SubagentProgressMeta): void;
|
|
@@ -19,6 +19,7 @@ export interface BuildAgentSessionDeps {
|
|
|
19
19
|
hookRegistry: HookRegistry;
|
|
20
20
|
traceWriter: TraceWriter | undefined;
|
|
21
21
|
drainSubagents?: ((reason: string) => Promise<unknown>) | undefined;
|
|
22
|
+
bashOutputTailReporter?: (toolUseId: string) => (tail: string | undefined) => void;
|
|
22
23
|
cwd: string | undefined;
|
|
23
24
|
maxTurns: number;
|
|
24
25
|
autoResumeOnUsageLimit: boolean | undefined;
|
|
@@ -42,6 +43,7 @@ export declare function buildSharedDeps(a: {
|
|
|
42
43
|
hookRegistry: HookRegistry;
|
|
43
44
|
traceWriter: TraceWriter | undefined;
|
|
44
45
|
drainSubagents?: ((reason: string) => Promise<unknown>) | undefined;
|
|
46
|
+
bashOutputTailReporter?: (toolUseId: string) => (tail: string | undefined) => void;
|
|
45
47
|
effectiveCwd: string | undefined;
|
|
46
48
|
maxTurns: string;
|
|
47
49
|
initialPermissionMode: PermissionMode | undefined;
|
|
@@ -58,6 +58,9 @@ export interface InteractiveCtx {
|
|
|
58
58
|
resumeTarget?: ResolvedResumeTarget;
|
|
59
59
|
teardownTrustedSkillEvents?: () => void;
|
|
60
60
|
bootWarnings: string[];
|
|
61
|
+
bashTailSetter: {
|
|
62
|
+
current: ((toolUseId: string, tail: string | undefined) => void) | undefined;
|
|
63
|
+
};
|
|
61
64
|
mcpManager?: import('../../../agent/mcp/index.js').McpManager;
|
|
62
65
|
backgroundRegistry: BackgroundAgentRegistry;
|
|
63
66
|
subagentControl?: SubagentControl;
|
|
@@ -115,6 +118,9 @@ export interface TurnHandles {
|
|
|
115
118
|
onContextProgress?(): void | Promise<void>;
|
|
116
119
|
onStageChange?(stage: import('./loop-stage.js').LoopStage, signals?: import('./loop-stage.js').StageSignals): void;
|
|
117
120
|
addPreviewDiffRef?: PreviewDiffRef;
|
|
121
|
+
bashTailSetter?: {
|
|
122
|
+
current: ((toolUseId: string, tail: string | undefined) => void) | undefined;
|
|
123
|
+
};
|
|
118
124
|
}
|
|
119
125
|
export declare const REPL_SPINNER_OPTIONS: {
|
|
120
126
|
readonly stream: NodeJS.WriteStream & {
|
|
@@ -16,6 +16,7 @@ export declare class ToolLane {
|
|
|
16
16
|
setAgentContext(toolUseId: string, agentContext: string | undefined): void;
|
|
17
17
|
setAgentResultSummary(toolUseId: string, summary: string): void;
|
|
18
18
|
setThinkingTail(toolUseId: string, tail: string | undefined): void;
|
|
19
|
+
setBashOutputTail(toolUseId: string, tail: string | undefined): void;
|
|
19
20
|
addResult(toolUseId: string, chunk: ToolResultChunk): void;
|
|
20
21
|
notifyToolActivity(activeCount: number, activeToolUseIds: string[]): void;
|
|
21
22
|
addDiff(toolUseId: string, diff: DiffPayload): void;
|