agent-afk 5.280.0 → 5.281.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.
@@ -52,6 +52,7 @@ export declare class StreamRenderer {
52
52
  setSoftStopping(active: boolean): void;
53
53
  stripPendingTerminalState(headingOffset: number): boolean;
54
54
  getPendingBuffer(): string;
55
+ getLastCapturePath(): string | undefined;
55
56
  setBashOutputTail(toolUseId: string, tail: string | undefined): void;
56
57
  notifyFirstContent(): void;
57
58
  private buildOrchestratorCtx;
@@ -0,0 +1,31 @@
1
+ export declare function _setConfinementRootForTest(root: string | null): void;
2
+ export declare const VIEWER_MAX_LINES = 20000;
3
+ export interface ViewerState {
4
+ lines: readonly string[];
5
+ truncated: boolean;
6
+ totalLines: number;
7
+ scrollTop: number;
8
+ viewportRows: number;
9
+ searchQuery: string;
10
+ matchIndices: readonly number[];
11
+ matchCursor: number;
12
+ }
13
+ export type ViewerLoadResult = {
14
+ ok: true;
15
+ state: ViewerState;
16
+ } | {
17
+ ok: false;
18
+ error: ViewerLoadError;
19
+ };
20
+ export type ViewerLoadError = 'missing' | 'expired' | 'read_error';
21
+ export declare function loadViewer(capturePath: string | undefined, viewportRows: number): ViewerLoadResult;
22
+ export declare function maxScrollTop(state: ViewerState): number;
23
+ export declare function scrollUp(state: ViewerState, delta: number): ViewerState;
24
+ export declare function scrollDown(state: ViewerState, delta: number): ViewerState;
25
+ export declare function scrollHome(state: ViewerState): ViewerState;
26
+ export declare function scrollEnd(state: ViewerState): ViewerState;
27
+ export declare function applySearch(state: ViewerState, query: string): ViewerState;
28
+ export declare function nextMatch(state: ViewerState): ViewerState;
29
+ export declare function prevMatch(state: ViewerState): ViewerState;
30
+ export declare function clearSearch(state: ViewerState): ViewerState;
31
+ export declare function resize(state: ViewerState, viewportRows: number): ViewerState;
@@ -0,0 +1,2 @@
1
+ import type { PickerHost } from '../../render/picker.js';
2
+ export declare function runBashOutputViewer(host: PickerHost, capturePath: string | undefined, signal?: AbortSignal): Promise<void>;
@@ -5,6 +5,14 @@ import { TrustedSkillLedger } from '../../trusted-skill-ledger.js';
5
5
  import type { InputSurface } from '../../input/input-surface.js';
6
6
  export declare function wireTrustedSkillEvents(completionWriter: CompletionWriter, ledger: TrustedSkillLedger): () => void;
7
7
  export declare function wireProviderGrants(startupProvider: ModelProvider): void;
8
+ export declare function createTurnBridgeRefs(): {
9
+ bashTailSetter: {
10
+ current: ((toolUseId: string, tail: string | undefined) => void) | undefined;
11
+ };
12
+ capturePathRef: {
13
+ current: string | undefined;
14
+ };
15
+ };
8
16
  export declare function createReplInput(): {
9
17
  rl: readline.Interface;
10
18
  inputSurfaceRef: {
@@ -62,6 +62,9 @@ export interface InteractiveCtx {
62
62
  bashTailSetter: {
63
63
  current: ((toolUseId: string, tail: string | undefined) => void) | undefined;
64
64
  };
65
+ capturePathRef: {
66
+ current: string | undefined;
67
+ };
65
68
  mcpManager?: import('../../../agent/mcp/index.js').McpManager;
66
69
  backgroundRegistry: BackgroundAgentRegistry;
67
70
  subagentManager: SubagentManager;
@@ -124,6 +127,9 @@ export interface TurnHandles {
124
127
  bashTailSetter?: {
125
128
  current: ((toolUseId: string, tail: string | undefined) => void) | undefined;
126
129
  };
130
+ capturePathRef?: {
131
+ current: string | undefined;
132
+ };
127
133
  onTextDelta?(charCount: number): void;
128
134
  }
129
135
  export declare const REPL_SPINNER_OPTIONS: {
@@ -0,0 +1,4 @@
1
+ import type { TerminalCompositor } from '../../terminal-compositor.js';
2
+ export declare function buildOutputViewerCallback(capturePathRef: {
3
+ current: string | undefined;
4
+ }, getCompositor: () => TerminalCompositor | null): () => void;
@@ -13,6 +13,8 @@ export declare class ToolLane {
13
13
  private lastElapsedSecond;
14
14
  private activeTools;
15
15
  flash: ToolLaneFlash | null;
16
+ private lastCapturePath;
17
+ getLastCapturePath(): string | undefined;
16
18
  fade: ElementFade | null;
17
19
  compactScrollback: boolean;
18
20
  addStart(toolUseId: string, toolName: string, toolInput: string): void;
@@ -0,0 +1,2 @@
1
+ import type { Entry } from './tool-lane-render.js';
2
+ export declare function elapsedDisplayNeedsUpdate(entries: ReadonlyMap<string, Entry>, order: readonly string[], lastElapsedSecond: Map<string, number>): boolean;
@@ -0,0 +1,4 @@
1
+ import type { StreamRenderer } from '../../_lib/stream-renderer.js';
2
+ export declare function syncCapturePathRef(capturePathRef: {
3
+ current: string | undefined;
4
+ }, renderer: StreamRenderer): void;
@@ -31,6 +31,7 @@ export interface InputSurfaceArmOpts {
31
31
  onCancel: () => void;
32
32
  onShiftTab?: () => void;
33
33
  onOpenEditor?: () => void;
34
+ onOpenOutputViewer?: () => void;
34
35
  scrollRegion?: CompositorScrollRegionGuard;
35
36
  stdout?: NodeJS.WriteStream;
36
37
  stdin?: NodeJS.ReadStream;
@@ -12,6 +12,7 @@ export type ApiHost = InputModeHost & RenderHost & AutocompleteHost & KeyDispatc
12
12
  onRewindRequest?: () => void;
13
13
  onIdleEscape?: () => void;
14
14
  onOpenEditor?: () => void;
15
+ onInputModeTransition?: () => void;
15
16
  flushPendingRepaint(): void;
16
17
  };
17
18
  export declare function setOnSubmit(self: ApiHost, handler: ((payload: SubmissionPayload) => void) | null): void;
@@ -19,6 +20,7 @@ export declare function setOnCancel(self: ApiHost, handler: (() => void) | null)
19
20
  export declare function getOnCancel(self: ApiHost): (() => void) | undefined;
20
21
  export declare function setOnRewindRequest(self: ApiHost, handler: (() => void) | null): void;
21
22
  export declare function setOnIdleEscape(self: ApiHost, handler: (() => void) | null): void;
23
+ export declare function setOnInputModeTransition(self: ApiHost, handler: (() => void) | null): void;
22
24
  export declare function setOnOpenEditor(self: ApiHost, handler: (() => void) | null): void;
23
25
  export declare function enterPickerMode(self: ApiHost, controller: PickerController): void;
24
26
  export declare function exitPickerMode(self: ApiHost): void;
@@ -20,11 +20,13 @@ export declare class TerminalCompositor {
20
20
  onBackground?: () => void;
21
21
  onRewindRequest?: () => void;
22
22
  onIdleEscape?: () => void;
23
+ onInputModeTransition?: () => void;
23
24
  lastIdleEscAt: number;
24
25
  onPauseInterrupt?: () => void;
25
26
  onShiftTab?: () => void;
26
27
  onTaskView?: () => boolean;
27
28
  onOpenEditor?: () => void;
29
+ onOpenOutputViewer?: () => void;
28
30
  readonly promptTextFn: (buffer: string) => string;
29
31
  readonly history?: IHistoryRing;
30
32
  readonly autocompleteState?: AutocompleteState;
@@ -106,6 +108,7 @@ export declare class TerminalCompositor {
106
108
  getOnCancel(): (() => void) | undefined;
107
109
  setOnRewindRequest(handler: (() => void) | null): void;
108
110
  setOnIdleEscape(handler: (() => void) | null): void;
111
+ setOnInputModeTransition(handler: (() => void) | null): void;
109
112
  setOnOpenEditor(handler: (() => void) | null): void;
110
113
  enterPickerMode(controller: PickerController): void;
111
114
  exitPickerMode(): void;
@@ -46,6 +46,7 @@ export interface KeyDispatchHost {
46
46
  readonly onShiftTab?: () => void;
47
47
  readonly onTaskView?: () => boolean;
48
48
  readonly onOpenEditor?: () => void;
49
+ readonly onOpenOutputViewer?: () => void;
49
50
  readonly onSubmit?: (payload: SubmissionPayload) => void;
50
51
  }
51
52
  export declare function applyEdit(self: KeyDispatchHost, next: InputCoreState): boolean;
@@ -0,0 +1,3 @@
1
+ import type { KeyDispatchHost } from './terminal-compositor.input-dispatch.js';
2
+ import type { KeyInfo } from './terminal-compositor.types.js';
3
+ export declare function handleOpenEditor(self: KeyDispatchHost, key: KeyInfo): boolean;
@@ -0,0 +1,3 @@
1
+ import type { KeyDispatchHost } from './terminal-compositor.input-dispatch.js';
2
+ import type { KeyInfo } from './terminal-compositor.types.js';
3
+ export declare function handleOpenOutputViewer(self: KeyDispatchHost, key: KeyInfo): boolean;
@@ -21,6 +21,7 @@ export interface InputModeHost {
21
21
  readonly pasteRegistry: Map<string, string>;
22
22
  readonly pasteStartCursor: number;
23
23
  readonly onSubmit?: (payload: SubmissionPayload) => void;
24
+ onInputModeTransition?: () => void;
24
25
  }
25
26
  export declare function enterPickerMode(self: InputModeHost, controller: PickerController): void;
26
27
  export declare function exitPickerMode(self: InputModeHost): void;
@@ -67,6 +67,7 @@ export interface TerminalCompositorOptions {
67
67
  onShiftTab?: () => void;
68
68
  onTaskView?: () => boolean;
69
69
  onOpenEditor?: () => void;
70
+ onOpenOutputViewer?: () => void;
70
71
  onSubmit?: (payload: SubmissionPayload) => void;
71
72
  promptText?: string | ((buffer: string) => string);
72
73
  history?: IHistoryRing;