@vincemakes/kiso-code 0.24.4 → 0.25.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.
Files changed (2) hide show
  1. package/dist/dispatch.js +22 -45
  2. package/package.json +14 -14
package/dist/dispatch.js CHANGED
@@ -82,51 +82,28 @@ export function dispatch(line, ctx) {
82
82
  return;
83
83
  }
84
84
  if (trimmed === "\x12expand") {
85
- // W15: the expand key (ctrl+o) — /last aimed at a chosen cell.
86
- // The TARGET is picked at press time: a LIVE tool cell toggles
87
- // IMMEDIATELY in place (the compositor owns those rows and
88
- // redraws them — the approval pause is exactly when the user
89
- // reads a cut diff, and the key must answer then, never after
90
- // the run). A COMMITTED cell can never toggle — history is never
91
- // rewritten (ADR-0046) — so its expanded block and the empty
92
- // answer queue on the chain like /last: the block lands as new
93
- // content after any in-flight turn. The sentinel carries the
94
- // control char so a typed "expand" turn is never intercepted.
95
- const r = body.expandNext();
96
- if (r.kind === "toggled") {
97
- ctx.input.prompt(); // in place — the frame already repainted
98
- return;
99
- }
100
- const land = async () => {
101
- if (r.kind === "appended") {
102
- // DC-51 — ONE CALL, because one call is ONE CELL.
103
- //
104
- // This was a loop, one `bodyLog` per line, and each call
105
- // makes its own raw cell — so D1 put a blank between every
106
- // pair and the expansion came out laced with unpainted
107
- // rows, twice the height of the card it is meant to be.
108
- // The owner saw it as stripes.
109
- //
110
- // It only became wrong when the block became RENDERED ROWS
111
- // (0.24.2 ③). Before that the lines were a header and two
112
- // multi-line payloads — four cells, and the payloads' own
113
- // newlines kept their rows inside one cell each.
114
- //
115
- // `bodyLog` splits on newlines, and a rendered row may not
116
- // contain one (invariant ①b throws on it), so joining is
117
- // exactly reversible here.
118
- bodyLog(r.lines.join("\n"));
119
- }
120
- else if (r.kind === "none") {
121
- // DC-35: "nothing to expand" was said in two situations and
122
- // was only true in one of them. A reader who pressed the key
123
- // on a ring of one had something to open — they were already
124
- // looking at it — and the old line told them the opposite.
125
- bodyLog(r.why === "already-last" ? "[that expansion is already the last thing on screen — ctrl+r opens the transcript]" : "[nothing to expand]");
126
- }
127
- ctx.input.prompt();
128
- };
129
- ctx.chainRef.current = ctx.chainRef.current.then(land);
85
+ // DC-50 / R14 — ONE SWITCH, AND THE SESSION IS PRINTED AGAIN.
86
+ //
87
+ // What stood here: the key picked a TARGET at press time. A live
88
+ // tool cell toggled in place; a committed one could not, because
89
+ // ADR-0046 §3 forbade rewriting history — so its body was
90
+ // APPENDED as new content, chained behind any in-flight turn,
91
+ // with a ring choosing which card was next, `#opened` keeping the
92
+ // ring from repeating, `#lastAppend` stopping a held key printing
93
+ // the same rows three times (DC-35), and a two-branch "nothing to
94
+ // expand" message for the two ways it could decline.
95
+ //
96
+ // Amendment 1 removes the premise the whole apparatus served: the
97
+ // terminal's scrollback is ours to erase, so a committed card can
98
+ // be re-rendered where it stands. The key flips one boolean and
99
+ // the session is reprinted; every settled card obeys it, running
100
+ // cards keep their own window (E2/DC-43).
101
+ //
102
+ // It no longer chains. There is no content to land after an
103
+ // in-flight turn — nothing is appended — so the repaint is
104
+ // immediate, exactly as the live-cell toggle always was.
105
+ body.toggleExpanded();
106
+ ctx.input.prompt();
130
107
  return;
131
108
  }
132
109
  if (trimmed === "/rewrap") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-code",
3
- "version": "0.24.4",
3
+ "version": "0.25.0",
4
4
  "description": "kiso CLI — the durable coding agent that survives kill -9: kiso chat / kiso resume / kiso sessions.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,19 +18,19 @@
18
18
  "test": "vitest run"
19
19
  },
20
20
  "dependencies": {
21
- "@vincemakes/kiso-ask-ext": "0.24.4",
22
- "@vincemakes/kiso-core": "0.24.4",
23
- "@vincemakes/kiso-evals": "0.24.4",
24
- "@vincemakes/kiso-mcp-ext": "0.24.4",
25
- "@vincemakes/kiso-provider-anthropic": "0.24.4",
26
- "@vincemakes/kiso-provider-openai": "0.24.4",
27
- "@vincemakes/kiso-runtime": "0.24.4",
28
- "@vincemakes/kiso-skills-ext": "0.24.4",
29
- "@vincemakes/kiso-subagent-ext": "0.24.4",
30
- "@vincemakes/kiso-task-ext": "0.24.4",
31
- "@vincemakes/kiso-tools-node": "0.24.4",
32
- "@vincemakes/kiso-tui": "0.24.4",
33
- "@vincemakes/kiso-tui-cells": "0.24.4"
21
+ "@vincemakes/kiso-ask-ext": "0.25.0",
22
+ "@vincemakes/kiso-core": "0.25.0",
23
+ "@vincemakes/kiso-evals": "0.25.0",
24
+ "@vincemakes/kiso-mcp-ext": "0.25.0",
25
+ "@vincemakes/kiso-provider-anthropic": "0.25.0",
26
+ "@vincemakes/kiso-provider-openai": "0.25.0",
27
+ "@vincemakes/kiso-runtime": "0.25.0",
28
+ "@vincemakes/kiso-skills-ext": "0.25.0",
29
+ "@vincemakes/kiso-subagent-ext": "0.25.0",
30
+ "@vincemakes/kiso-task-ext": "0.25.0",
31
+ "@vincemakes/kiso-tools-node": "0.25.0",
32
+ "@vincemakes/kiso-tui": "0.25.0",
33
+ "@vincemakes/kiso-tui-cells": "0.25.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26.1.2",