agent-afk 5.324.4 → 5.325.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/terminal-compositor.reflow-shift.d.ts +45 -0
- package/dist/cli.mjs +397 -394
- package/dist/config/env.d.ts +22 -0
- package/dist/config/env.telegram.d.ts +22 -0
- package/dist/index.mjs +202 -202
- package/dist/telegram/audio-transcriber.d.ts +34 -0
- package/dist/telegram/bot.audio-handler.d.ts +6 -0
- package/dist/telegram/bot.d.ts +2 -0
- package/dist/telegram/handlers/voice.d.ts +8 -0
- package/dist/telegram.mjs +218 -218
- package/package.json +1 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { BandRowMeta } from './terminal-compositor.types.js';
|
|
2
|
+
import { type BandReflowCache } from './terminal-compositor.band-reflow.js';
|
|
3
|
+
export interface ReflowLine {
|
|
4
|
+
row: number;
|
|
5
|
+
width: number;
|
|
6
|
+
hard: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function computeReflowShift(lines: readonly ReflowLine[], oldCols: number, newCols: number): number | null;
|
|
9
|
+
export declare function setReflowShiftGateForTests(gate: (() => boolean) | null): void;
|
|
10
|
+
export interface ReflowHost {
|
|
11
|
+
readonly stdout: NodeJS.WriteStream;
|
|
12
|
+
lastKnownCols: number;
|
|
13
|
+
lastMeasuredFrameBottom: number;
|
|
14
|
+
anchorRow: number | undefined;
|
|
15
|
+
committedBand: string[];
|
|
16
|
+
committedBandMeta: BandRowMeta[];
|
|
17
|
+
committedBandTopRow: number;
|
|
18
|
+
committedBandBottomRow: number;
|
|
19
|
+
committedBandPaintedRows: number;
|
|
20
|
+
committedBandArchivedPrefix: number;
|
|
21
|
+
bandReflowCache: BandReflowCache | null;
|
|
22
|
+
pendingResizeErase: {
|
|
23
|
+
top: number;
|
|
24
|
+
bottom: number;
|
|
25
|
+
origin?: 'width-only' | 'expand';
|
|
26
|
+
} | null;
|
|
27
|
+
}
|
|
28
|
+
export type SnapshotHost = Omit<ReflowHost, 'bandReflowCache'>;
|
|
29
|
+
export interface BandSnapshot {
|
|
30
|
+
rows: readonly string[];
|
|
31
|
+
marginCols: number;
|
|
32
|
+
}
|
|
33
|
+
export interface ReflowPrediction {
|
|
34
|
+
n: number;
|
|
35
|
+
lines: readonly ReflowLine[];
|
|
36
|
+
oldCols: number;
|
|
37
|
+
newCols: number;
|
|
38
|
+
band?: BandSnapshot;
|
|
39
|
+
}
|
|
40
|
+
export declare function recordRenderedFrame(self: object, text: string, bottom: number, cols: number): void;
|
|
41
|
+
export declare function noteResizeForReflow(self: SnapshotHost, newCols: number, freshBurst: boolean, rowShrink?: boolean): void;
|
|
42
|
+
export declare function takeReflowPrediction(self: object): ReflowPrediction | null;
|
|
43
|
+
export declare function historyRows(bandTop: number, delta: number, n: number): number;
|
|
44
|
+
export declare function wholeRowsInHistory(rows: readonly string[], marginCols: number, oldCols: number, newCols: number, hist: number): number | null;
|
|
45
|
+
export declare function applyReflowShift(self: ReflowHost, pred: ReflowPrediction, delta: number, preBandTop: number): boolean;
|