@vincemakes/kiso-tui 0.1.36 → 0.1.38
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/components.d.ts +113 -7
- package/dist/components.js +471 -66
- package/dist/compositor.d.ts +58 -5
- package/dist/compositor.js +475 -58
- package/dist/editor.d.ts +3 -6
- package/dist/editor.js +27 -54
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/render.d.ts +46 -5
- package/dist/render.js +150 -30
- package/dist/width.d.ts +15 -0
- package/dist/width.js +59 -0
- package/package.json +1 -1
package/dist/compositor.d.ts
CHANGED
|
@@ -35,12 +35,14 @@
|
|
|
35
35
|
* scheduler — a one-shot setTimeout re-armed only while a running
|
|
36
36
|
* tool exists (the #14/#15 zero-output contract is structural).
|
|
37
37
|
*
|
|
38
|
-
* Layout at H rows (V6-3 — the design §03 chrome):
|
|
39
|
-
* 1..H−4,
|
|
38
|
+
* Layout at H rows (V6-3 — the design §03 chrome; W6 — the box):
|
|
39
|
+
* content rows 1..H−4, box top H−3, editor (the slot) H−2, box
|
|
40
|
+
* bottom H−1, status H.
|
|
40
41
|
* Pipes / NO_COLOR: the passthrough branches below keep the v2a/v2b
|
|
41
42
|
* line-mode bytes byte-for-byte (the e2e guards them).
|
|
42
43
|
*/
|
|
43
44
|
import { type MenuItem } from "./editor.js";
|
|
45
|
+
import { type ResumeMeta } from "./render.js";
|
|
44
46
|
/** The cursor marker — an APC private sequence the focus component
|
|
45
47
|
* embeds at the edit position; the compositor strips it and moves
|
|
46
48
|
* relatively (it never reaches the terminal). */
|
|
@@ -77,15 +79,44 @@ export declare class Body {
|
|
|
77
79
|
toolResult(callId: string, result: {
|
|
78
80
|
content: string;
|
|
79
81
|
isError: boolean;
|
|
82
|
+
reason?: string | null;
|
|
80
83
|
}): void;
|
|
81
84
|
textAppend(text: string): void;
|
|
82
85
|
textEnd(): void;
|
|
86
|
+
/** W14 — the turn boundary's END: the CLI calls this at the run's
|
|
87
|
+
* terminal event, once per run, BEFORE the recap (so the fold line
|
|
88
|
+
* commits before the recap in the cell order). `thoughtSeconds` is
|
|
89
|
+
* the CLI's wall-clocked thinking window. The QUIET turn (ended, no
|
|
90
|
+
* text) releases its held cells as the ONE fold line; a turn with
|
|
91
|
+
* text releases them as individual commits (the W13 rollups). The
|
|
92
|
+
* release is LAZY — the held cells commit at the next frame, when
|
|
93
|
+
* the fold/rollup decision runs. */
|
|
94
|
+
endTurn(thoughtSeconds: number): void;
|
|
83
95
|
terminal(label: string, statusLineText: string): void;
|
|
84
96
|
notice(text: string): void;
|
|
97
|
+
/** W20 — the todo checklist as STATE, not events: the FIRST call of a
|
|
98
|
+
* turn creates the ONE live block (done:false — the commit loop only
|
|
99
|
+
* takes done cells, so it stays in the live region); later calls of
|
|
100
|
+
* the SAME turn MUTATE that block in place — same position, same
|
|
101
|
+
* height, zero committed rows (the W8 fixed-window rule generalised
|
|
102
|
+
* to state). An unchanged whole-table replace (the todo extension's
|
|
103
|
+
* idempotent shape) is a no-op — no mark, no frame. The block commits
|
|
104
|
+
* ONCE at the turn's end (endTurn); the next turn's first call starts
|
|
105
|
+
* a fresh block — one settled block per turn that touched the list,
|
|
106
|
+
* never one per update. The pipe path stays per-call (byte-linear —
|
|
107
|
+
* every write is final; there is no in-place redraw in a pipe). */
|
|
85
108
|
checklist(header: string, items: {
|
|
86
109
|
text: string;
|
|
87
110
|
status: "pending" | "active" | "done";
|
|
88
111
|
}[]): void;
|
|
112
|
+
/** The startup banner (W1): a LIVE cell — the tier re-derives per
|
|
113
|
+
* frame (bannerLines with the CURRENT W and H), so a resize re-tiers
|
|
114
|
+
* the art instead of re-folding frozen rows (a window below 40 cols
|
|
115
|
+
* never paints the logo). W5: the resume metas ride the cell — the
|
|
116
|
+
* list re-gates with the tier (BIG only) and re-times with the
|
|
117
|
+
* frame. The inactive path keeps the historical bytes (no resume —
|
|
118
|
+
* the pipe contract). */
|
|
119
|
+
banner(version: string, extensionsText: string, resume?: ResumeMeta[]): void;
|
|
89
120
|
raw(lines: string[]): void;
|
|
90
121
|
/** The last COMPLETE thinking block, for /think. */
|
|
91
122
|
lastThinking(): string | null;
|
|
@@ -98,6 +129,23 @@ export declare class Body {
|
|
|
98
129
|
isError: boolean;
|
|
99
130
|
};
|
|
100
131
|
} | null;
|
|
132
|
+
/** W15 — the expand key's target (ctrl+r). A cell still in the LIVE
|
|
133
|
+
* region (the newest live tool) TOGGLES in place — the compositor
|
|
134
|
+
* owns those rows and redraws them (the body flips to the full
|
|
135
|
+
* form, no cap). A committed cell can never toggle — history is
|
|
136
|
+
* never rewritten (ADR-0046) — so the key APPENDS a fresh expanded
|
|
137
|
+
* block at the bottom instead, the /last idiom aimed at a chosen
|
|
138
|
+
* cell: the pointer cycles the collapsed history, newest first, and
|
|
139
|
+
* the header names the target ("N turns back" — the user cells
|
|
140
|
+
* after it), so every press tells the user what they got. */
|
|
141
|
+
expandNext(): {
|
|
142
|
+
kind: "toggled";
|
|
143
|
+
} | {
|
|
144
|
+
kind: "appended";
|
|
145
|
+
lines: string[];
|
|
146
|
+
} | {
|
|
147
|
+
kind: "none";
|
|
148
|
+
};
|
|
101
149
|
/** Docked = the chrome is live (a color TTY with a real size). */
|
|
102
150
|
get active(): boolean;
|
|
103
151
|
enter(): void;
|
|
@@ -112,7 +160,10 @@ export declare class Body {
|
|
|
112
160
|
* top: external writes (the CLI's console.error CRLF) can shift the
|
|
113
161
|
* committed content down, and a formula-top ED0 would clear it. */
|
|
114
162
|
onResize(): void;
|
|
115
|
-
|
|
163
|
+
/** W18: the status row's right-aligned hint is part of the status
|
|
164
|
+
* state — the compacting row passes "esc to cancel" (the affordance
|
|
165
|
+
* must survive repaints). */
|
|
166
|
+
setStatus(text: string, hint?: string | null): void;
|
|
116
167
|
setTail(tail: string): void;
|
|
117
168
|
showQuestion(question: string): void;
|
|
118
169
|
clearQuestion(): void;
|
|
@@ -138,7 +189,9 @@ export declare class Body {
|
|
|
138
189
|
/** Teardown — flush a pending frame, stop the timers. */
|
|
139
190
|
close(): void;
|
|
140
191
|
/** The live region's scalar — the unit tests assert the cap directly
|
|
141
|
-
* (the e2e gate pins the screen consequence).
|
|
192
|
+
* (the e2e gate pins the screen consequence). W11: the formula's
|
|
193
|
+
* blanks are join artifacts — the count includes them (they are real
|
|
194
|
+
* screen rows), threaded against the previous sibling's OWN rows. */
|
|
142
195
|
liveCount(): number;
|
|
143
196
|
render(): void;
|
|
144
197
|
}
|
|
@@ -152,7 +205,7 @@ export declare class Dock {
|
|
|
152
205
|
enter(): void;
|
|
153
206
|
exit(): void;
|
|
154
207
|
onResize(): void;
|
|
155
|
-
setStatus(text: string): void;
|
|
208
|
+
setStatus(text: string, hint?: string | null): void;
|
|
156
209
|
setTail(tail: string): void;
|
|
157
210
|
showQuestion(question: string): void;
|
|
158
211
|
clearQuestion(): void;
|