@vincemakes/kiso-code 0.16.2 → 0.16.3

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/index.js +40 -3
  2. package/package.json +15 -15
package/dist/index.js CHANGED
@@ -28,7 +28,7 @@ import { newSessionId } from "./session-id.js";
28
28
  import { createInterface } from "node:readline";
29
29
  import { fileURLToPath } from "node:url";
30
30
  import { join } from "node:path";
31
- import { BADGE_GLYPH, Body, Editor, bannerLines, escapeTerminal, extensionsBannerText, idColumn, idleStatus, interactivePrompt, palette, renderSessionLine, sessionListFooter, sessionListRow } from "@vincemakes/kiso-tui";
31
+ import { BADGE_GLYPH, Body, Editor, bannerLines, currentGround, resolveGround, setGround, escapeTerminal, extensionsBannerText, idColumn, idleStatus, interactivePrompt, palette, renderSessionLine, sessionListFooter, sessionListRow } from "@vincemakes/kiso-tui";
32
32
  import { createAgent, disposeExtensions, loadExtensions, loadProjectExtensions, SessionStore, } from "@vincemakes/kiso-runtime";
33
33
  import { createFauxProvider } from "@vincemakes/kiso-evals";
34
34
  import { createCodingTools } from "@vincemakes/kiso-tools-node";
@@ -43,7 +43,7 @@ import { loadProjectConfig, loadUserConfig, mergeConfigs, resolveAutoCompact, re
43
43
  import { resume } from "./resume.js";
44
44
  import { resumeTail } from "./resume-tail.js";
45
45
  import { armByteTrace } from "./byte-trace.js";
46
- import { tmpdir } from "node:os";
46
+ import { tmpdir, homedir } from "node:os";
47
47
  import { clipboardImage } from "./clipboard.js";
48
48
  import { collectSessionCards, projectSessionCard } from "./session-cards.js";
49
49
  // The moved exports stay reachable from this entry — the test imports
@@ -233,6 +233,31 @@ function makeLineInput() {
233
233
  if (process.stdin.isTTY) {
234
234
  const editor = new Editor(() => (dock.active ? dock.redraw() : editor.selfRender()));
235
235
  editor.enter();
236
+ // DC-3: ask the terminal what its background is, and paint the
237
+ // first frame without waiting for the answer.
238
+ //
239
+ // Every grey in the palette is a claim about the background, and
240
+ // kiso had never established one — inline code was chosen on a dark
241
+ // terminal and measured 1.54:1 on a white one. The question is one
242
+ // write; the answer comes back through the editor, which is already
243
+ // the process's single reader of stdin (DC-7 taught it to swallow
244
+ // OSC rather than type it into the draft). No timer, no second
245
+ // reader, nothing blocking: an answer that never arrives leaves the
246
+ // ground `unknown`, and `unknown` is a supported palette, not a
247
+ // failure — see packages/tui-cells/src/ground.ts.
248
+ editor.onOsc((reply) => {
249
+ const next = resolveGround({ theme: process.env.KISO_THEME, osc: reply, colorfgbg: process.env.COLORFGBG });
250
+ if (next === currentGround())
251
+ return;
252
+ setGround(next);
253
+ body.onGroundChange();
254
+ });
255
+ // The query is COLOUR machinery, so it obeys the colour gate: a piped
256
+ // stdout and NO_COLOR both carry zero ANSI, and an OSC written into a
257
+ // pipe would be the first byte to break that. `palette().bold` is the
258
+ // same test the dock activates on — one gate, not a second opinion.
259
+ if (palette().bold !== "" && process.stdout.isTTY)
260
+ process.stdout.write("\x1b]11;?\x07");
236
261
  // W6: the box's prompt goes light — "› " (the box already says
237
262
  // "input lives here"; the line-mode path keeps the brick ▌, so
238
263
  // pipe bytes do not change)
@@ -274,7 +299,19 @@ function extensionsBanner(resume = []) {
274
299
  bodyLog(`${text}\n`);
275
300
  return;
276
301
  }
277
- body.banner(VERSION, text.replace(/^ · /, ""), resume);
302
+ // R2: the opening answers the three questions a first screen is asked.
303
+ // The model and the tier come from the same state the status line reads
304
+ // (one source, so the two can never disagree); the workspace is the
305
+ // home-relative cwd, because `~/Desktop/devv/kiso` is what a human
306
+ // calls the place and `/Users/vinve/Desktop/devv/kiso` is what a
307
+ // filesystem calls it.
308
+ const home = homedir();
309
+ const cwd = process.cwd();
310
+ body.banner(VERSION, text.replace(/^ · /, ""), resume, {
311
+ model: agentModel,
312
+ mode: getMode() === "plan" ? "plan (read-only)" : getMode(),
313
+ cwd: cwd.startsWith(home) ? `~${cwd.slice(home.length)}` : cwd,
314
+ });
278
315
  }
279
316
  /** W5: the opening-screen resume list — up to 3 recent sessions, newest
280
317
  * first, the CURRENT session excluded (it is not something to pick back
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-code",
3
- "version": "0.16.2",
4
- "description": "kiso CLI \u2014 the durable coding agent that survives kill -9: kiso chat / kiso resume / kiso sessions.",
3
+ "version": "0.16.3",
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",
7
7
  "bin": {
@@ -18,19 +18,19 @@
18
18
  "test": "vitest run"
19
19
  },
20
20
  "dependencies": {
21
- "@vincemakes/kiso-ask-ext": "0.16.2",
22
- "@vincemakes/kiso-core": "0.16.2",
23
- "@vincemakes/kiso-evals": "0.16.2",
24
- "@vincemakes/kiso-mcp-ext": "0.16.2",
25
- "@vincemakes/kiso-provider-anthropic": "0.16.2",
26
- "@vincemakes/kiso-provider-openai": "0.16.2",
27
- "@vincemakes/kiso-runtime": "0.16.2",
28
- "@vincemakes/kiso-skills-ext": "0.16.2",
29
- "@vincemakes/kiso-subagent-ext": "0.16.2",
30
- "@vincemakes/kiso-task-ext": "0.16.2",
31
- "@vincemakes/kiso-tools-node": "0.16.2",
32
- "@vincemakes/kiso-tui": "0.16.2",
33
- "@vincemakes/kiso-tui-cells": "0.16.2"
21
+ "@vincemakes/kiso-ask-ext": "0.16.3",
22
+ "@vincemakes/kiso-core": "0.16.3",
23
+ "@vincemakes/kiso-evals": "0.16.3",
24
+ "@vincemakes/kiso-mcp-ext": "0.16.3",
25
+ "@vincemakes/kiso-provider-anthropic": "0.16.3",
26
+ "@vincemakes/kiso-provider-openai": "0.16.3",
27
+ "@vincemakes/kiso-runtime": "0.16.3",
28
+ "@vincemakes/kiso-skills-ext": "0.16.3",
29
+ "@vincemakes/kiso-subagent-ext": "0.16.3",
30
+ "@vincemakes/kiso-task-ext": "0.16.3",
31
+ "@vincemakes/kiso-tools-node": "0.16.3",
32
+ "@vincemakes/kiso-tui": "0.16.3",
33
+ "@vincemakes/kiso-tui-cells": "0.16.3"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26.1.2",