@vincemakes/kiso-tui 0.25.0 → 0.26.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/ask-panel.js CHANGED
@@ -29,7 +29,7 @@
29
29
  */
30
30
  import { panelBlockLayout, panelAffordance as basePanelAffordance, panelBlockRows as basePanelBlockRows, panelLead as basePanelLead, panelLeadPlain as basePanelLeadPlain, panelStatus as basePanelStatus, pickAffordance, pickBlockRows, pickLead, pickLeadPlain, pickStatus, } from "./approval-panel.js";
31
31
  import { cutLine, selectionBar, visibleWidth, widthCut } from "@vincemakes/kiso-tui-cells/components";
32
- import { escapeTerminal, palette } from "./render.js";
32
+ import { escapeTerminal, palette } from "./lines.js";
33
33
  /** The schema's own bounds — the registry refuses anything outside them
34
34
  * (extensions/ask validates; these are the numbers it validates to). */
35
35
  export const ASK_MAX_QUESTIONS = 4;
package/dist/at-picker.js CHANGED
@@ -12,7 +12,7 @@
12
12
  * lexical order of the path (never localeCompare, whose result depends
13
13
  * on the machine's locale).
14
14
  */
15
- import { escapeTerminal, palette } from "./render.js";
15
+ import { escapeTerminal, palette } from "./lines.js";
16
16
  import { selectionBar, visibleWidth, widthCut } from "./components.js";
17
17
  import { bandHeader } from "@vincemakes/kiso-tui-cells/strings";
18
18
  /**
@@ -2,5 +2,5 @@
2
2
  * Amendment 4) — this module is the re-export shim: the compositor's
3
3
  * and index.ts's imports (./components.js) stay verbatim. */
4
4
  export * from "@vincemakes/kiso-tui-cells/components";
5
- export { foldCountsObjects, foldTerms } from "@vincemakes/kiso-tui-cells/components";
5
+ export { foldTerms } from "@vincemakes/kiso-tui-cells/components";
6
6
  export { MOTION_FRAMES, TWINKLE, breathFrame, twinkleFrame } from "@vincemakes/kiso-tui-cells/render";
@@ -4,5 +4,5 @@
4
4
  export * from "@vincemakes/kiso-tui-cells/components";
5
5
  // R3 (design §5.2): the two motion cycles reach the compositor through
6
6
  // the same shim every other cell primitive does.
7
- export { foldCountsObjects, foldTerms } from "@vincemakes/kiso-tui-cells/components";
7
+ export { foldTerms } from "@vincemakes/kiso-tui-cells/components";
8
8
  export { MOTION_FRAMES, TWINKLE, breathFrame, twinkleFrame } from "@vincemakes/kiso-tui-cells/render";
@@ -11,14 +11,17 @@
11
11
  * the reference implementation's model): a line COMMITS (leaves the
12
12
  * live region) via the real-LF
13
13
  * scroll at the last row (`\x1b[1B\n` — CUP-free) when its cell is
14
- * DONE and the region needs the room. Committed bytes are never
15
- * re-emitted — the native scrollback gets them, reflow-safe, and
16
- * the user's shell history is never touched (zero \x1b[3J, zero
17
- * replay);
14
+ * DONE and the region needs the room. Within a geometry, committed
15
+ * bytes are never re-emitted — the native scrollback gets them. The
16
+ * one exception is a SETTLED RESIZE (ADR-0046 Amendment 1, R14):
17
+ * `2J H 3J`, then the whole session reprinted from the model, so the
18
+ * terminal holds exactly one rendering; the shell history the
19
+ * terminal held before kiso started is the declared cost;
18
20
  * - the live region (content + chrome + menu) is hard-capped: the
19
21
  * content at H−4 (V6-3 — the four-row chrome); overflow FORCE-
20
- * commits the oldest live line regardless of done-nessthe one
21
- * sharp edge (asserted by the VT-emulator gate);
22
+ * commits the oldest live cell that has a committed form never a
23
+ * tool call still running (DC-53); a running card's window shrinks
24
+ * to the room instead (DC-43);
22
25
  * - two crash invariants: ① every emitted line's visible width ≤ W
23
26
  * (components fold; a violation THROWS with diagnostics — the
24
27
  * no-silent-truncate ruling); ② every steady-
@@ -52,7 +55,7 @@ export interface AtPanelState {
52
55
  readonly selected: number;
53
56
  readonly capped: boolean;
54
57
  }
55
- import { type BannerMeta, type ResumeMeta } from "./render.js";
58
+ import { type BannerMeta, type ResumeMeta } from "./lines.js";
56
59
  /** The cursor marker — an APC private sequence the focus component
57
60
  * embeds at the edit position; the compositor strips it and moves
58
61
  * relatively (it never reaches the terminal). */
@@ -94,8 +97,6 @@ export interface BodyOptions {
94
97
  /** The stdout writer — injectable for unit tests (default: stdout). */
95
98
  write?: (s: string) => void;
96
99
  }
97
- /** The one compositor — implements the Body façade AND the Dock chrome
98
- * API (see the class comments on each method group). */
99
100
  export declare class Body {
100
101
  #private;
101
102
  constructor(opts: BodyOptions);
@@ -138,14 +139,9 @@ export declare class Body {
138
139
  }): void;
139
140
  textAppend(text: string): void;
140
141
  textEnd(): void;
141
- /** W14 — the turn boundary's END: the CLI calls this at the run's
142
- * terminal event, once per run, BEFORE the recap (so the fold line
143
- * commits before the recap in the cell order). `thoughtSeconds` is
144
- * the CLI's wall-clocked thinking window. The QUIET turn (ended, no
145
- * text) releases its held cells as the ONE fold line; a turn with
146
- * text releases them as individual commits (the W13 rollups). The
147
- * release is LAZY — the held cells commit at the next frame, when
148
- * the fold/rollup decision runs. */
142
+ /** The turn boundary's END: the CLI calls this at the run's terminal
143
+ * event, once per run, BEFORE the recap. `thoughtSeconds` is the
144
+ * CLI's wall-clocked thinking window. */
149
145
  endTurn(thoughtSeconds: number): void;
150
146
  terminal(label: string, statusLineText: string): void;
151
147
  notice(text: string): void;
@@ -185,34 +181,18 @@ export declare class Body {
185
181
  };
186
182
  } | null;
187
183
  /**
188
- * R4 (C4d) — THE APPEND-ONLY RE-WRAP.
189
- *
190
- * The owner's report: resize the window and the reference
191
- * implementation's text re-wraps to the new width while kiso's does
192
- * not. It is true, and it is not a bug to be fixed — it is the price
193
- * of ADR-0046, and the price is worth naming precisely.
194
- *
195
- * A terminal can only reflow a SOFT-wrapped line: one long logical
196
- * line the terminal itself wrapped as the cursor flowed past the last
197
- * column. Every row kiso commits is either painted by cursor
198
- * addressing (#emitDiff) or scrolled out by a bare LF (#emitScroll),
199
- * and frames run with autowrap OFF — so no byte kiso commits can ever
200
- * carry a continuation flag, and nothing downstream can rejoin rows an
201
- * application hard-split. That same LF is what makes the transcript
202
- * the TERMINAL's: it survives kiso's death, a pipe, and tmux. A
203
- * product whose transcript reflows is a product that repaints its
204
- * transcript from its own memory, and that transcript dies with it.
205
- *
206
- * What kiso can do — and this is all it can do — is APPEND. The
207
- * committed cells are still in memory; re-render them at the current
208
- * width and put them at the BOTTOM, where writing is allowed. Nothing
209
- * above is rewritten, so ADR-0046 holds exactly.
184
+ * R4 (C4d) — `/rewrap`: the recent PROSE, re-rendered at the current
185
+ * width and APPENDED at the bottom. Committed rows carry no soft-wrap
186
+ * flag (autowrap is OFF; every row is painted or scrolled out by a
187
+ * bare LF), so the terminal cannot reflow them itself. R14
188
+ * (ADR-0046 Amendment 1, D-B3) made a settled resize reprint the
189
+ * whole session from the model on its own; this stays as the
190
+ * user-invoked form, and it still appends rather than erasing —
191
+ * nothing above the append is rewritten.
210
192
  *
211
193
  * Scoped to PROSE. Text is what reads badly at the wrong width — a
212
194
  * paragraph folded for 120 columns and read at 60 is the complaint.
213
- * Tool rows, folds and chips are short, already carry their own
214
- * width ladders, and re-printing them would duplicate work the folds
215
- * exist to state once.
195
+ * Cards and chips are short and carry their own width ladders.
216
196
  */
217
197
  rewrap(): {
218
198
  lines: string[];