@vincemakes/kiso-tui-cells 0.23.0 → 0.24.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.
@@ -8,7 +8,15 @@
8
8
  * lives HERE: every line a component returns must fit the terminal
9
9
  * width — the compositor's crash-on-violation invariant backs it up
10
10
  * (a component that forgets to fold CRASHES with a diagnostic, never
11
- * silently truncates — the crash is the contract, not a symptom).
11
+ * silently truncates — the crash is the contract UNDER TEST; in the
12
+ * field the row is cut and the fact is said, once, through the notice
13
+ * channel. DECLARED REVERSAL of "the crash is the contract, not a
14
+ * symptom" (owner-lane, 2026-09-04): two instances of this class in two
15
+ * days, one caught by a gate (DC-45) and one by the owner on the first
16
+ * frame of an ordinary command (DC-48). In a gate the crash is right; in
17
+ * a human's hands it costs them the composer and the session to save
18
+ * them a row one column too wide. `KISO_INVARIANTS=throw` is what every
19
+ * suite here runs under).
12
20
  *
13
21
  * The fold is SGR-AWARE: a line whose bold/dim span would straddle a
14
22
  * fold boundary closes the span at the break and reopens it on the
@@ -44,6 +52,13 @@ export interface FrameCtx {
44
52
  * for the whole stretch, which is the fact it is there to carry:
45
53
  * work is in flight. Owner-ruled 2026-08-31. */
46
54
  readonly grouped?: boolean;
55
+ /** R13 E2 / DC-43 — how many PREVIEW rows a running card may take this
56
+ * frame. Undefined is the full window (`CAP_PREVIEW`); the compositor
57
+ * lowers it when the live region is tight, and 0 degrades the card to
58
+ * its head row alone. It is a frame input, not a property of the
59
+ * cell: the same call renders taller or shorter as the room changes,
60
+ * and never as its own content changes. */
61
+ readonly liveWindow?: number;
47
62
  }
48
63
  /** ONE screen line a component emits (raw, SGR included). */
49
64
  export type RenderLine = string;
@@ -122,24 +137,6 @@ export type BodyCell = {
122
137
  * created this cell (the fold-hold's owner; −1 when no turn
123
138
  * exists yet — the pre-turn cells never hold). */
124
139
  turn: number;
125
- /** W13: the rolled-up group summary — set at COMMIT time when
126
- * the head of an N > 2 same-tool run renders the group (the
127
- * work order's claimed shape: "✓ read 5 files (2.4k lines,
128
- * 1.1s)" + the target children). The members carry null — the
129
- * compositor's rolled-heads bookkeeping renders them [].
130
- * TUI2-R1 (B): `parts` is set when the run spans MORE THAN ONE
131
- * read-only tool — the same mechanism, the exploration row.
132
- * Absent (a single-name run) keeps W13's row byte for byte. */
133
- rolled: null | {
134
- count: number;
135
- lines: number;
136
- elapsed: string;
137
- targets: string[];
138
- parts?: readonly {
139
- name: string;
140
- subjects: readonly string[];
141
- }[];
142
- };
143
140
  /** W19: a DENIED call's reason (the CLI extracted it from the
144
141
  * result's "[Permission denied] " prefix, keyed on the "denied"
145
142
  * tag). Non-null renders the pinned row — the full call name,
@@ -279,20 +276,6 @@ export declare const ROLLUP_NOUN: Readonly<Record<string, string>>;
279
276
  * side effects is a list of things that HAPPENED, and every row of it
280
277
  * carries meaning). */
281
278
  export declare function isExploreTool(name: string): boolean;
282
- /** "8 files · 14 searches" — the per-tool counts in first-call order. */
283
- export declare function exploreCounts(parts: readonly {
284
- name: string;
285
- subjects: readonly string[];
286
- }[]): string;
287
- /** TUI2-R1 (B) — the expanded list: ONE row per tool, the verb column
288
- * then the distinct subjects in first-call order, a repeated subject
289
- * carrying its ×count, the first three shown and the rest counted.
290
- * A search's subject is its PATTERN (quoted — the thing that was
291
- * looked for); a read's or a list's is its path. */
292
- export declare function exploreRows(parts: readonly {
293
- name: string;
294
- subjects: readonly string[];
295
- }[], W: number): string[];
296
279
  /** Does this tool's fold term count distinct targets rather than calls? */
297
280
  export declare function foldCountsObjects(name: string): boolean;
298
281
  export declare function foldTerms(reads: number, edits: number, others: readonly [string, number][]): string[];
@@ -382,41 +365,17 @@ export interface StretchTerms {
382
365
  /** the live mark; the caller passes the spinner's current frame. */
383
366
  readonly mark?: string;
384
367
  }
385
- /**
386
- * R4 (C1) the fold NAMES ITS OWN TARGET.
387
- *
388
- * `ctrl+o` used to be printed identically on every fold on the screen,
389
- * and the key walked a ring whose order nothing on screen expressed —
390
- * so the owner's report was exact: "there is no way to know which
391
- * stretch it opens". The tint that marks the next target can only be
392
- * drawn on a LIVE row, and every fold worth reopening is, by
393
- * construction, in the scrollback where nothing can be tinted.
394
- *
395
- * A pointer cannot fix this either, and the bound is worth stating
396
- * once: SGR mouse reports address the VIEWPORT, so a fold that has
397
- * scrolled into the terminal's own scrollback is unreachable by any
398
- * pointer, permanently, on the primary screen. The ordinal is not a
399
- * cheaper substitute for clicking — it is the form of the affordance
400
- * that reaches every fold, and it survives a pipe as characters.
401
- *
402
- * The number rides the KEY, inside the width ladder, so it is paid for
403
- * by the same give-way order as every other span (law: the key never
404
- * gives way — it just got two characters longer).
405
- */
406
- export declare function stretchLine(t: StretchTerms & {
407
- readonly phase: "thinking" | "acting" | "settled";
408
- readonly mark?: string;
409
- }, W: number): string[];
410
- /** R6/D3: the quiet turn's fold wears no mark either — the SECOND
411
- * emission site, and the one the D3 brief did not name. Same ruling,
412
- * same two-space indent; see stretchLine above for the argument. */
413
- export declare function turnFold(t: {
414
- words: string;
415
- thoughtSeconds: number;
416
- reads: number;
417
- edits: number;
418
- others: [string, number][];
419
- }, W: number): string[];
368
+ /** The caps — screen rows counted AFTER the fold, at the current width
369
+ * (the W7 table). The renderer-cut row is inside the cap. */
370
+ /** R13 — ONE preview cap, every tool. It was the shell's alone while
371
+ * the shell was the only settled call with rows on screen. */
372
+ export declare const CAP_PREVIEW = 5;
373
+ /** DC-46 the running window's ceiling is the SETTLED preview's, and a
374
+ * running card reaches it by growing rather than by being handed it.
375
+ * `LIVE_WINDOW` (CAP_PREVIEW + 1) retires with the allocation it sized. */
376
+ /** The rows a card costs besides its window: two pads, the head, two
377
+ * blanks and the status row. Below this there is no card (DC-43). */
378
+ export declare const CARD_CHROME = 6;
420
379
  /**
421
380
  * R4 — the standing act slot.
422
381
  *