agent-afk 5.151.1 → 5.152.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/cli/commands/interactive/interrupt-picker.d.ts +3 -1
- package/dist/cli/commands/interactive/repl-loop-shared.d.ts +3 -0
- package/dist/cli/input/input-surface.d.ts +4 -1
- package/dist/cli/terminal-compositor.d.ts +2 -0
- package/dist/cli/terminal-compositor.input-dispatch.d.ts +1 -0
- package/dist/cli.mjs +501 -501
- package/dist/index.mjs +1 -1
- package/dist/telegram.mjs +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { TerminalCompositor } from '../../terminal-compositor.js';
|
|
2
2
|
import type { TurnState } from './repl-loop-shared.js';
|
|
3
|
-
export type InterruptChoice = 'stop' | 'cancel' | 'dismissed';
|
|
3
|
+
export type InterruptChoice = 'stop' | 'cancel' | 'steer' | 'dismissed';
|
|
4
4
|
export interface InterruptPickerOptions {
|
|
5
5
|
compositor: TerminalCompositor;
|
|
6
6
|
signal: AbortSignal;
|
|
7
7
|
onStop: () => void;
|
|
8
8
|
onCancel: () => void;
|
|
9
|
+
onSteer?: () => void;
|
|
9
10
|
}
|
|
10
11
|
export declare function showInterruptPicker(opts: InterruptPickerOptions): Promise<InterruptChoice>;
|
|
11
12
|
export interface LaunchInterruptPickerOptions {
|
|
@@ -13,5 +14,6 @@ export interface LaunchInterruptPickerOptions {
|
|
|
13
14
|
turnState: TurnState;
|
|
14
15
|
onStop: () => void;
|
|
15
16
|
onCancel: () => void;
|
|
17
|
+
onSteer?: () => void;
|
|
16
18
|
}
|
|
17
19
|
export declare function launchInterruptPicker(opts: LaunchInterruptPickerOptions): void;
|
|
@@ -7,5 +7,8 @@ export interface TurnState {
|
|
|
7
7
|
notifyInterrupting?: ((active: boolean) => void) | null;
|
|
8
8
|
requestSoftStop?: (() => void) | null;
|
|
9
9
|
interruptPickerAbort?: AbortController | null;
|
|
10
|
+
pendingSteerText?: string | null;
|
|
11
|
+
pendingSteerRead?: Promise<string | null> | null;
|
|
12
|
+
steerReadLine?: ((signal?: AbortSignal) => Promise<string>) | null;
|
|
10
13
|
}
|
|
11
14
|
export declare function buildPrompt(mode: PermissionMode): string;
|
|
@@ -15,6 +15,7 @@ export interface InputSurfaceOptions {
|
|
|
15
15
|
export interface InputSurfaceReadOpts {
|
|
16
16
|
promptFn: () => string;
|
|
17
17
|
onSigint?: () => void;
|
|
18
|
+
onEscape?: () => void;
|
|
18
19
|
onShiftTab?: () => void;
|
|
19
20
|
initialBuffer?: string;
|
|
20
21
|
compositor?: TerminalCompositor;
|
|
@@ -65,7 +66,9 @@ export declare class InputSurface {
|
|
|
65
66
|
readLine(opts: InputSurfaceReadOpts): Promise<ReadWithAutocompleteResult>;
|
|
66
67
|
isAwaitingInput(): boolean;
|
|
67
68
|
bufferIsEmpty(): boolean;
|
|
68
|
-
abortPendingRead(
|
|
69
|
+
abortPendingRead(opts?: {
|
|
70
|
+
clearBuffer?: boolean;
|
|
71
|
+
}): void;
|
|
69
72
|
requestRewind(): boolean;
|
|
70
73
|
toRunTurnRefs(promptText: string): InputSurfaceRefs;
|
|
71
74
|
}
|
|
@@ -19,6 +19,7 @@ export declare class TerminalCompositor {
|
|
|
19
19
|
postEscPayload: SubmissionPayload | null;
|
|
20
20
|
onBackground?: () => void;
|
|
21
21
|
onRewindRequest?: () => void;
|
|
22
|
+
onIdleEscape?: () => void;
|
|
22
23
|
lastIdleEscAt: number;
|
|
23
24
|
onPauseInterrupt?: () => void;
|
|
24
25
|
onShiftTab?: () => void;
|
|
@@ -93,6 +94,7 @@ export declare class TerminalCompositor {
|
|
|
93
94
|
setOnCancel(handler: (() => void) | null): void;
|
|
94
95
|
getOnCancel(): (() => void) | undefined;
|
|
95
96
|
setOnRewindRequest(handler: (() => void) | null): void;
|
|
97
|
+
setOnIdleEscape(handler: (() => void) | null): void;
|
|
96
98
|
setOnOpenEditor(handler: (() => void) | null): void;
|
|
97
99
|
enterPickerMode(controller: PickerController): void;
|
|
98
100
|
exitPickerMode(): void;
|
|
@@ -39,6 +39,7 @@ export interface KeyDispatchHost {
|
|
|
39
39
|
readonly onCancel?: () => void;
|
|
40
40
|
readonly onSoftStop?: () => void;
|
|
41
41
|
readonly onBackground?: () => void;
|
|
42
|
+
readonly onIdleEscape?: () => void;
|
|
42
43
|
readonly onRewindRequest?: () => void;
|
|
43
44
|
readonly onPauseInterrupt?: () => void;
|
|
44
45
|
readonly onShiftTab?: () => void;
|