agent-afk 5.239.0 → 5.239.1
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/markdown-stream-buffer.d.ts +43 -0
- package/dist/cli/markdown-stream.d.ts +1 -5
- package/dist/cli/terminal-compositor.frame.d.ts +1 -1
- package/dist/cli/terminal-compositor.frame.layout.d.ts +21 -0
- package/dist/cli/terminal-compositor.frame.lines.d.ts +3 -0
- package/dist/cli/terminal-compositor.frame.position.d.ts +7 -0
- package/dist/cli/terminal-compositor.lifecycle.d.ts +1 -1
- package/dist/cli/terminal-compositor.lifecycle.mode.d.ts +5 -0
- package/dist/cli/terminal-compositor.lifecycle.resize.d.ts +3 -0
- package/dist/cli/terminal-compositor.lifecycle.teardown.d.ts +3 -0
- package/dist/cli.mjs +247 -248
- package/dist/index.mjs +109 -109
- package/dist/telegram.mjs +127 -127
- package/package.json +1 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface InputBufferState {
|
|
2
|
+
inputBuffer: string;
|
|
3
|
+
inputBufferTimer: NodeJS.Timeout | null;
|
|
4
|
+
lastInputFlushTime: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function createInputBufferState(): InputBufferState;
|
|
7
|
+
export interface PipelineCallbacks {
|
|
8
|
+
onBatch(batched: string): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function pushChunk(state: InputBufferState, chunk: string, bufferMs: number, callbacks: PipelineCallbacks): void;
|
|
11
|
+
export declare function drainInputBuffer(state: InputBufferState, callbacks: PipelineCallbacks): void;
|
|
12
|
+
export declare function discardInputBuffer(state: InputBufferState): void;
|
|
13
|
+
export interface ParsePipelineCallbacks {
|
|
14
|
+
onPreCommit(newBuffer: string): void;
|
|
15
|
+
onCommitBlock(blockText: string): void;
|
|
16
|
+
onScheduleRepaint(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function runParsePipeline(buffer: string, chunk: string, callbacks: ParsePipelineCallbacks): string;
|
|
19
|
+
export interface LogUpdateFunction {
|
|
20
|
+
(str: string): void;
|
|
21
|
+
clear: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface RepaintParams {
|
|
24
|
+
flushing: boolean;
|
|
25
|
+
overlayComposer: OverlayComposerLike | null | undefined;
|
|
26
|
+
compositor: CompositorLike | null;
|
|
27
|
+
logUpdate: LogUpdateFunction | null;
|
|
28
|
+
renderPending(): string;
|
|
29
|
+
initLogUpdate(): Promise<LogUpdateFunction | null>;
|
|
30
|
+
onLogUpdateReady(fn: LogUpdateFunction | null): void;
|
|
31
|
+
}
|
|
32
|
+
export declare function executeRepaint(p: RepaintParams): Promise<void>;
|
|
33
|
+
export interface CompositorLike {
|
|
34
|
+
setOverlay(str: string): void;
|
|
35
|
+
}
|
|
36
|
+
export interface OverlayComposerLike {
|
|
37
|
+
markDirty(slot: string): void;
|
|
38
|
+
flush(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare function clearOverlay(overlayComposer: OverlayComposerLike | null | undefined, compositor: CompositorLike | null, logUpdate: {
|
|
41
|
+
clear(): void;
|
|
42
|
+
} | null): void;
|
|
43
|
+
export declare function syncPendingOverlay(overlayComposer: OverlayComposerLike | null | undefined, compositor: CompositorLike | null, renderPending: () => string): void;
|
|
@@ -23,9 +23,7 @@ export declare class StreamingMarkdownRenderer {
|
|
|
23
23
|
private overlayComposer;
|
|
24
24
|
private resizeUnsub;
|
|
25
25
|
private bufferMs;
|
|
26
|
-
private
|
|
27
|
-
private inputBufferTimer;
|
|
28
|
-
private lastInputFlushTime;
|
|
26
|
+
private inputState;
|
|
29
27
|
constructor(opts?: StreamingMarkdownRendererOptions);
|
|
30
28
|
private initLogUpdate;
|
|
31
29
|
private commitBlock;
|
|
@@ -34,8 +32,6 @@ export declare class StreamingMarkdownRenderer {
|
|
|
34
32
|
private syncPendingOverlay;
|
|
35
33
|
private repaint;
|
|
36
34
|
push(chunk: string): void;
|
|
37
|
-
private drainInputBuffer;
|
|
38
|
-
private discardInputBuffer;
|
|
39
35
|
private pushDirect;
|
|
40
36
|
flush(): Promise<void>;
|
|
41
37
|
getCommittedOutput(): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ImageAttachment } from './input/attachments.js';
|
|
2
1
|
import type { SpinnerController } from './input/spinner.js';
|
|
3
2
|
import type { BandRowMeta, CompositorInputMode, CompositorScrollRegionGuard, FramePlacementMode, LogUpdateFn, PickerController } from './terminal-compositor.types.js';
|
|
4
3
|
import { type BandReflowCache } from './terminal-compositor.band-reflow.js';
|
|
4
|
+
import { type ImageAttachment } from './input/attachments.js';
|
|
5
5
|
export interface FrameHost {
|
|
6
6
|
flushResizeGhostErase(): void;
|
|
7
7
|
renderInputLine(): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ImageAttachment } from './input/attachments.js';
|
|
2
|
+
import type { SpinnerController } from './input/spinner.js';
|
|
3
|
+
import type { CompositorScrollRegionGuard } from './terminal-compositor.types.js';
|
|
4
|
+
export interface ChromeRows {
|
|
5
|
+
overlayLines: string[];
|
|
6
|
+
spinnerRow: string | null;
|
|
7
|
+
tipRow: string | null;
|
|
8
|
+
attachmentRow: string | null;
|
|
9
|
+
}
|
|
10
|
+
export declare function gatherChromeRows(overlay: string, spinnerController: SpinnerController, attachments: ImageAttachment[], clipboardFailureMsgRef: {
|
|
11
|
+
value: string | null;
|
|
12
|
+
}, cols: number): ChromeRows;
|
|
13
|
+
export interface ViewportLayout {
|
|
14
|
+
maxLines: number;
|
|
15
|
+
gapRows: number;
|
|
16
|
+
trimmedOverlay: string[];
|
|
17
|
+
renderGap: boolean;
|
|
18
|
+
extraRows: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function computeViewportLayout(chrome: ChromeRows, dropdownLength: number, hasHintRow: boolean, rows: number, scrollRegion: CompositorScrollRegionGuard | undefined): ViewportLayout;
|
|
21
|
+
export declare function computePickerViewportLayout(chrome: ChromeRows, pickerRowCount: number, rows: number, scrollRegion: CompositorScrollRegionGuard | undefined): Omit<ViewportLayout, 'gapRows'>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ChromeRows } from './terminal-compositor.frame.layout.js';
|
|
2
|
+
export declare function buildFrameLines(chrome: ChromeRows, trimmedOverlay: string[], renderGap: boolean, dropdownRows: string[], hintRow: string | null, inputLine: string): string[];
|
|
3
|
+
export declare function buildPickerFrameLines(chrome: ChromeRows, trimmedOverlay: string[], renderGap: boolean, pickerRows: string[]): string[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LogUpdateFn, FramePlacementMode } from './terminal-compositor.types.js';
|
|
2
|
+
export interface FramePosition {
|
|
3
|
+
desiredTopRow: number;
|
|
4
|
+
targetBottomRow: number;
|
|
5
|
+
physicalRows: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function computeFramePosition(frame: string, frameLines: string[], absoluteBottom: number, placementMode: FramePlacementMode, anchorRow: number | undefined, logUpdate: LogUpdateFn): FramePosition;
|
|
@@ -4,6 +4,7 @@ import type { CaretBlinkController } from './input/caret-blink.js';
|
|
|
4
4
|
import type { SuggestEngine } from './terminal-compositor.types.js';
|
|
5
5
|
import type { BandRowMeta, CompositorScrollRegionGuard, KeyInfo, LogUpdateFn } from './terminal-compositor.types.js';
|
|
6
6
|
import type { KeyDispatchHost } from './terminal-compositor.input-dispatch.js';
|
|
7
|
+
export { endTurnFlush } from './terminal-compositor.lifecycle.teardown.js';
|
|
7
8
|
export interface LifecycleHost {
|
|
8
9
|
repaint(): void;
|
|
9
10
|
resetState(): void;
|
|
@@ -44,4 +45,3 @@ export declare function suspendInput(self: LifecycleHost): void;
|
|
|
44
45
|
export declare function resumeInput(self: LifecycleHost): void;
|
|
45
46
|
export declare function arm(self: LifecycleHost & KeyDispatchHost): Promise<void>;
|
|
46
47
|
export declare function disarm(self: LifecycleHost): void;
|
|
47
|
-
export declare function endTurnFlush(self: LifecycleHost): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LifecycleHost } from './terminal-compositor.lifecycle.js';
|
|
2
|
+
export declare function enterRawMode(self: LifecycleHost): void;
|
|
3
|
+
export declare function exitRawMode(self: LifecycleHost): void;
|
|
4
|
+
export declare function enableBracketedPasteAndScrollKey(self: LifecycleHost): void;
|
|
5
|
+
export declare function disableBracketedPasteAndScrollKey(self: LifecycleHost): void;
|