@vincemakes/kiso-tui 0.1.39 → 0.1.41
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/approval-panel.d.ts +6 -0
- package/dist/approval-panel.js +6 -0
- package/dist/components.d.ts +4 -222
- package/dist/components.js +4 -884
- package/dist/compositor.d.ts +31 -8
- package/dist/compositor.js +371 -100
- package/dist/diff.d.ts +4 -32
- package/dist/diff.js +4 -122
- package/dist/editor.d.ts +14 -0
- package/dist/editor.js +266 -7
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -1
- package/dist/render.d.ts +11 -122
- package/dist/render.js +15 -292
- package/dist/width.d.ts +4 -15
- package/dist/width.js +4 -59
- package/package.json +5 -2
package/dist/compositor.d.ts
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* The model:
|
|
9
9
|
* - cells (the CLI's mutation surface) → components → lines;
|
|
10
10
|
* - `lines[] + commitIndex` (the scrollback fork — the departure from
|
|
11
|
-
*
|
|
11
|
+
* the reference implementation's model): a line COMMITS (leaves the
|
|
12
|
+
* live region) via the real-LF
|
|
12
13
|
* scroll at the last row (`\x1b[1B\n` — CUP-free) when its cell is
|
|
13
14
|
* DONE and the region needs the room. Committed bytes are never
|
|
14
15
|
* re-emitted — the native scrollback gets them, reflow-safe, and
|
|
@@ -19,8 +20,8 @@
|
|
|
19
20
|
* commits the oldest live line regardless of done-ness — the one
|
|
20
21
|
* sharp edge (asserted by the VT-emulator gate);
|
|
21
22
|
* - two crash invariants: ① every emitted line's visible width ≤ W
|
|
22
|
-
* (components fold; a violation THROWS with diagnostics —
|
|
23
|
-
*
|
|
23
|
+
* (components fold; a violation THROWS with diagnostics — the
|
|
24
|
+
* no-silent-truncate ruling); ② every steady-
|
|
24
25
|
* frame CUP lands in the CONTENT area (rows ≤ H−4−menu — the
|
|
25
26
|
* committed band, the stale/gap ELs, and the LIVE lines at their
|
|
26
27
|
* model rows; fix C's sanctioned reinterpretation, ADR-0046) — the
|
|
@@ -42,6 +43,7 @@
|
|
|
42
43
|
* line-mode bytes byte-for-byte (the e2e guards them).
|
|
43
44
|
*/
|
|
44
45
|
import { type MenuItem } from "./editor.js";
|
|
46
|
+
import { type PanelState } from "./approval-panel.js";
|
|
45
47
|
import { type ResumeMeta } from "./render.js";
|
|
46
48
|
/** The cursor marker — an APC private sequence the focus component
|
|
47
49
|
* embeds at the edit position; the compositor strips it and moves
|
|
@@ -73,6 +75,16 @@ export declare class Body {
|
|
|
73
75
|
thinkingEnd(): void;
|
|
74
76
|
toolStart(name: string, callId: string, input: Record<string, unknown>): void;
|
|
75
77
|
toolApproval(callId: string, diff: import("./diff.js").DiffResult | null): void;
|
|
78
|
+
/** A5: the approval verdict — the permission_decided event binds into
|
|
79
|
+
* the cell (the aggregated head row: name + status + decidedBy in
|
|
80
|
+
* ONE row; no free-standing ` approved` orphan). The decision lands
|
|
81
|
+
* after the panel closes (the streamed event) — the cell is usually
|
|
82
|
+
* running by then; the record rides the settled row (`· approved by
|
|
83
|
+
* X` on an extension's auto-approval, `· by X` on its denial). A
|
|
84
|
+
* verdict with no live cell is dropped — the registry holds only
|
|
85
|
+
* in-flight calls, and the committed cells already told their
|
|
86
|
+
* outcome. */
|
|
87
|
+
toolVerdict(callId: string, decision: "approved" | "denied", decidedBy?: string, reason?: string): void;
|
|
76
88
|
toolRunning(callId: string): void;
|
|
77
89
|
toolSucceeded(callId: string): void;
|
|
78
90
|
toolFailed(callId: string, error: string): void;
|
|
@@ -165,8 +177,10 @@ export declare class Body {
|
|
|
165
177
|
* must survive repaints). */
|
|
166
178
|
setStatus(text: string, hint?: string | null): void;
|
|
167
179
|
setTail(tail: string): void;
|
|
168
|
-
|
|
169
|
-
|
|
180
|
+
/** Bind the editor's panel state — the PanelSelect slot occupant
|
|
181
|
+
* (W21: the panel replaces the live region + the input lead while
|
|
182
|
+
* up; the old ApprovalPrompt's question slot retires with it). */
|
|
183
|
+
bindApproval(state: () => PanelState | null): void;
|
|
170
184
|
/** Bind the CURRENT input line's state — the focus component reads it. */
|
|
171
185
|
bindInput(state: () => {
|
|
172
186
|
line: string;
|
|
@@ -178,6 +192,10 @@ export declare class Body {
|
|
|
178
192
|
items: readonly MenuItem[];
|
|
179
193
|
selected: number;
|
|
180
194
|
} | null): void;
|
|
195
|
+
/** Bind the pending-turn queue — the CLI's live slots (chat.ts):
|
|
196
|
+
* the chips render in the menu-rows family, the live caps shrink
|
|
197
|
+
* by their rows, and the +N queued hint rides the status row. */
|
|
198
|
+
bindQueue(state: () => readonly string[]): void;
|
|
181
199
|
/** The input line's edit column — the old dock's API. v6: the CURSOR
|
|
182
200
|
* derives from the frame's marker; this is the same value computed
|
|
183
201
|
* from the bound input state (the CLI's BodyOptions.editCol callback
|
|
@@ -200,15 +218,16 @@ export declare class Body {
|
|
|
200
218
|
* input/menu bindings, which the CLI performs BEFORE the Body exists,
|
|
201
219
|
* are buffered and applied by the Body's constructor. */
|
|
202
220
|
export declare class Dock {
|
|
203
|
-
#private;
|
|
204
221
|
get active(): boolean;
|
|
205
222
|
enter(): void;
|
|
206
223
|
exit(): void;
|
|
207
224
|
onResize(): void;
|
|
208
225
|
setStatus(text: string, hint?: string | null): void;
|
|
209
226
|
setTail(tail: string): void;
|
|
210
|
-
|
|
211
|
-
|
|
227
|
+
/** W21: bind the editor's panel state — the PanelSelect slot
|
|
228
|
+
* occupant (the panel replaces the live region + the input lead
|
|
229
|
+
* while up; the old ApprovalPrompt's question slot retires). */
|
|
230
|
+
bindApproval(state: () => PanelState | null): void;
|
|
212
231
|
bindInput(state: () => {
|
|
213
232
|
line: string;
|
|
214
233
|
cursor: number;
|
|
@@ -217,6 +236,10 @@ export declare class Dock {
|
|
|
217
236
|
items: readonly MenuItem[];
|
|
218
237
|
selected: number;
|
|
219
238
|
} | null): void;
|
|
239
|
+
/** W22: bind the pending-turn queue — the chips + the +N queued
|
|
240
|
+
* hint (the CLI binds it from chat(); the editor's pop keys ride
|
|
241
|
+
* the LineInput's own bindQueue). */
|
|
242
|
+
bindQueue(state: () => readonly string[]): void;
|
|
220
243
|
editCol(): number;
|
|
221
244
|
redraw(): void;
|
|
222
245
|
}
|