agent-afk 5.84.15 → 5.84.16
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/cli/_lib/child-activity-select.d.ts +30 -0
- package/dist/cli/_lib/stream-renderer-contexts.d.ts +3 -0
- package/dist/cli/_lib/stream-renderer-lifecycle.d.ts +3 -0
- package/dist/cli/_lib/stream-renderer-orchestrator.d.ts +3 -0
- package/dist/cli/_lib/stream-renderer-source.d.ts +1 -0
- package/dist/cli/_lib/stream-renderer.d.ts +2 -0
- package/dist/cli/input/spinner.d.ts +2 -0
- package/dist/cli/input/work-derived-verb.d.ts +21 -0
- package/dist/cli/terminal-compositor.d.ts +2 -0
- package/dist/cli.mjs +512 -512
- package/dist/index.mjs +1 -1
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type SourceState } from './stream-renderer-source.js';
|
|
2
|
+
import type { ProgressEvent } from '../../agent/types.js';
|
|
3
|
+
export declare const STICKY_HOLD_MS = 3000;
|
|
4
|
+
export declare const CHILD_QUIET_MS = 30000;
|
|
5
|
+
export interface ChildActivity {
|
|
6
|
+
sourceId: string;
|
|
7
|
+
label: string;
|
|
8
|
+
clause: string;
|
|
9
|
+
quiet: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare class ChildActivityTracker {
|
|
12
|
+
private prev;
|
|
13
|
+
select(sources: ReadonlyMap<string, SourceState>, now?: number): ChildActivity | undefined;
|
|
14
|
+
reset(): void;
|
|
15
|
+
}
|
|
16
|
+
export declare function formatChildActivity(activity: ChildActivity): string;
|
|
17
|
+
export interface ChildBannerStats {
|
|
18
|
+
toolUses: number;
|
|
19
|
+
totalTokens: number;
|
|
20
|
+
durationMs: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function deriveChildBanner(ctx: {
|
|
23
|
+
sources?: ReadonlyMap<string, SourceState>;
|
|
24
|
+
childActivity?: ChildActivityTracker;
|
|
25
|
+
}, now?: number): {
|
|
26
|
+
activity: string;
|
|
27
|
+
stats: ChildBannerStats;
|
|
28
|
+
} | undefined;
|
|
29
|
+
export declare const CHILD_BANNER_TASK_ID = "__child_activity__";
|
|
30
|
+
export declare function childBannerEvent(stats: ChildBannerStats): ProgressEvent;
|
|
@@ -10,6 +10,7 @@ import type { Writer } from '../slash/types.js';
|
|
|
10
10
|
import type { StageTrackerState } from '../commands/interactive/loop-stage.js';
|
|
11
11
|
import type { CommitCoordinator } from './commit-coordinator.js';
|
|
12
12
|
import type { SourceState } from './stream-renderer-source.js';
|
|
13
|
+
import type { ChildActivityTracker } from './child-activity-select.js';
|
|
13
14
|
export declare function makeOrchestratorCtx(args: {
|
|
14
15
|
out: Writer;
|
|
15
16
|
isTTY: boolean;
|
|
@@ -25,6 +26,8 @@ export declare function makeOrchestratorCtx(args: {
|
|
|
25
26
|
stageTracker?: StageTrackerState;
|
|
26
27
|
activeSkillName?: string;
|
|
27
28
|
lastProgressByTask: Map<string, ProgressEvent>;
|
|
29
|
+
sources?: ReadonlyMap<string, SourceState>;
|
|
30
|
+
childActivity?: ChildActivityTracker;
|
|
28
31
|
}): OrchestratorCtx;
|
|
29
32
|
export declare function makeSubagentCtx(args: {
|
|
30
33
|
isTTY: boolean;
|
|
@@ -2,6 +2,7 @@ import type { TerminalCompositor } from '../terminal-compositor.js';
|
|
|
2
2
|
import { OverlayComposer } from './overlay-composer.js';
|
|
3
3
|
import { createStageTracker } from '../commands/interactive/loop-stage.js';
|
|
4
4
|
import type { SourceState } from './stream-renderer-source.js';
|
|
5
|
+
import { type ChildActivityTracker } from './child-activity-select.js';
|
|
5
6
|
import type { ToolLane } from '../commands/interactive/tool-lane.js';
|
|
6
7
|
import type { ThinkingLane } from '../commands/interactive/thinking-lane.js';
|
|
7
8
|
import type { StreamingMarkdownRenderer } from '../markdown-stream.js';
|
|
@@ -26,6 +27,8 @@ export interface LifecycleContext {
|
|
|
26
27
|
resizeUnsub: (() => void) | null;
|
|
27
28
|
}
|
|
28
29
|
export declare function registerOverlaySlots(overlayComposer: OverlayComposer, ctx: Readonly<Pick<LifecycleContext, 'stageTracker' | 'thinkingMode' | 'thinkingLane' | 'streamingMarkdownRef' | 'toolLane' | 'lastProgressByTask'>> & {
|
|
30
|
+
sources?: ReadonlyMap<string, SourceState>;
|
|
31
|
+
childActivity?: ChildActivityTracker;
|
|
29
32
|
getInterrupting: () => boolean;
|
|
30
33
|
getSoftStopping: () => boolean;
|
|
31
34
|
}): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { OutputEvent, ProgressEvent } from '../../agent/types.js';
|
|
2
2
|
import type { SourceState } from './stream-renderer-source.js';
|
|
3
|
+
import { type ChildActivityTracker } from './child-activity-select.js';
|
|
3
4
|
import type { Writer } from '../slash/types.js';
|
|
4
5
|
import type { TerminalCompositor } from '../terminal-compositor.js';
|
|
5
6
|
import type { ToolLane } from '../commands/interactive/tool-lane.js';
|
|
@@ -25,6 +26,8 @@ export interface OrchestratorCtx {
|
|
|
25
26
|
skillBadgeEmitted?: boolean;
|
|
26
27
|
coordinator?: CommitCoordinator;
|
|
27
28
|
lastProgressByTask: Map<string, ProgressEvent>;
|
|
29
|
+
sources?: ReadonlyMap<string, SourceState>;
|
|
30
|
+
childActivity?: ChildActivityTracker;
|
|
28
31
|
}
|
|
29
32
|
export declare function handleOrchestratorEvent(event: OutputEvent, source: SourceState, ctx: OrchestratorCtx): void;
|
|
30
33
|
export declare function setComposedOverlay(ctx: OrchestratorCtx): void;
|
|
@@ -2,6 +2,7 @@ export interface SpinnerControllerOptions {
|
|
|
2
2
|
captureMode: boolean;
|
|
3
3
|
onTick: () => void;
|
|
4
4
|
goblin?: boolean;
|
|
5
|
+
workVerb?: () => string | undefined;
|
|
5
6
|
}
|
|
6
7
|
export declare class SpinnerController {
|
|
7
8
|
private state;
|
|
@@ -9,6 +10,7 @@ export declare class SpinnerController {
|
|
|
9
10
|
private readonly captureMode;
|
|
10
11
|
private readonly onTick;
|
|
11
12
|
private readonly goblin;
|
|
13
|
+
private readonly workVerb;
|
|
12
14
|
constructor(opts: SpinnerControllerOptions);
|
|
13
15
|
private pickVerb;
|
|
14
16
|
set(config: {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare function verbForToolName(toolName: string | undefined): string | undefined;
|
|
2
|
+
export declare class InFlightToolTracker {
|
|
3
|
+
private readonly inFlight;
|
|
4
|
+
start(toolUseId: string, toolName: string): void;
|
|
5
|
+
finish(toolUseId: string): void;
|
|
6
|
+
current(): string | undefined;
|
|
7
|
+
reset(): void;
|
|
8
|
+
}
|
|
9
|
+
export interface ActiveToolNameSink {
|
|
10
|
+
setActiveToolName?(toolName: string | undefined): void;
|
|
11
|
+
}
|
|
12
|
+
interface MaybeToolEvent {
|
|
13
|
+
type: string;
|
|
14
|
+
chunk?: {
|
|
15
|
+
type: string;
|
|
16
|
+
toolUseId?: string;
|
|
17
|
+
toolName?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare function noteToolEvent(event: MaybeToolEvent, tracker: InFlightToolTracker, sink: ActiveToolNameSink | null | undefined): boolean;
|
|
21
|
+
export {};
|
|
@@ -56,6 +56,7 @@ export declare class TerminalCompositor {
|
|
|
56
56
|
resizeUnsub: (() => void) | null;
|
|
57
57
|
resizeImmediateUnsub: (() => void) | null;
|
|
58
58
|
readonly spinnerController: SpinnerController;
|
|
59
|
+
private activeToolName;
|
|
59
60
|
readonly caretBlinkController: CaretBlinkController;
|
|
60
61
|
repaintCount: number;
|
|
61
62
|
pendingTrailingRepaint: boolean;
|
|
@@ -103,6 +104,7 @@ export declare class TerminalCompositor {
|
|
|
103
104
|
enabled: boolean;
|
|
104
105
|
rotateVerbEveryMs?: number;
|
|
105
106
|
}): void;
|
|
107
|
+
setActiveToolName(toolName: string | undefined): void;
|
|
106
108
|
commitAbove(text: string): void;
|
|
107
109
|
clearCommittedBand(): void;
|
|
108
110
|
flushResizeGhostErase(): void;
|