@vincemakes/kiso-code 0.1.29 → 0.1.31

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/state.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 手感批 B4 — the CLI's shared process state. The module split (dispatch/
2
+ * The ergonomics batch B4 — the CLI's shared process state. The module split (dispatch/
3
3
  * chat/resume/trust-ui/faux-glue) is a PURE MOVE: every piece that more
4
4
  * than one module touches lives here as a live ESM binding. index.ts
5
5
  * creates the mutable ones (setBody / setAgentModel / setExtensionLists);
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { Dock, type Body } from "@vincemakes/kiso-tui";
9
9
  import type { KisoExtension } from "@vincemakes/kiso-runtime";
10
- /** 发现#11: KISO_HOME is the ONE root — every default path derives from
10
+ /** finding #11: KISO_HOME is the ONE root — every default path derives from
11
11
  * it (sessions, trust, extensions, mcp config, skills). The dedicated
12
12
  * env vars (KISO_EXTENSIONS_DIR / KISO_MCP_CONFIG / KISO_SKILLS_DIR)
13
13
  * still override their own path; nothing hard-codes ~/.kiso anymore. */
@@ -52,19 +52,19 @@ export declare function bodyLog(text: string): void;
52
52
  /** The model name for the status bar — set by makeAgent. */
53
53
  export declare let agentModel: string;
54
54
  export declare function setAgentModel(value: string): void;
55
- /** 合并轮 B: whether the agent runs on the faux provider (no real key) —
55
+ /** merge round B: whether the agent runs on the faux provider (no real key) —
56
56
  * set inside makeAgent, read by main for chat/resume's exhaustion check. */
57
57
  export declare let currentFaux: boolean;
58
58
  export declare function setCurrentFaux(value: boolean): void;
59
- /** 合并轮 B: the merged config (user + trusted project) as resolved by the
59
+ /** merge round B: the merged config (user + trusted project) as resolved by the
60
60
  * LAST makeAgent — /model and autoCompact resolve against it. */
61
61
  export declare let mergedConfig: import("./config.js").KisoConfig;
62
62
  export declare function setMergedConfig(value: import("./config.js").KisoConfig): void;
63
- /** 合并轮 B: the resolved context window (env > config.contextWindow) —
63
+ /** merge round B: the resolved context window (env > config.contextWindow) —
64
64
  * chat.ts's contextWindowTokens() consults it before the env. */
65
65
  export declare let configuredWindow: number | undefined;
66
66
  export declare function setConfiguredWindow(value: number | undefined): void;
67
- /** 合并轮 B: the merged config (user + trusted project) + the current
67
+ /** merge round B: the merged config (user + trusted project) + the current
68
68
  * model's NAME — /model lists and switches against them. */
69
69
  export declare let configModels: Readonly<Record<string, import("./config.js").ModelProfile>>;
70
70
  export declare function setConfigModels(models: Readonly<Record<string, import("./config.js").ModelProfile>>): void;
@@ -85,7 +85,7 @@ export declare function setExtensionLists(user: readonly KisoExtension[], projec
85
85
  export declare const mergedTempPaths: string[];
86
86
  /** The CLI's own version — read from the package.json next to the build. */
87
87
  export declare const VERSION: string;
88
- /** 十: a question cancelled by Ctrl+C — NEVER the empty string, which is a
88
+ /** round 10: a question cancelled by Ctrl+C — NEVER the empty string, which is a
89
89
  * real user answer (the empty line). The empty answer and the cancellation
90
90
  * are distinct facts. */
91
91
  export declare const CANCELLED: unique symbol;
package/dist/state.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 手感批 B4 — the CLI's shared process state. The module split (dispatch/
2
+ * The ergonomics batch B4 — the CLI's shared process state. The module split (dispatch/
3
3
  * chat/resume/trust-ui/faux-glue) is a PURE MOVE: every piece that more
4
4
  * than one module touches lives here as a live ESM binding. index.ts
5
5
  * creates the mutable ones (setBody / setAgentModel / setExtensionLists);
@@ -10,7 +10,7 @@ import { homedir } from "node:os";
10
10
  import { dirname, join } from "node:path";
11
11
  import { fileURLToPath } from "node:url";
12
12
  import { Dock } from "@vincemakes/kiso-tui";
13
- /** 发现#11: KISO_HOME is the ONE root — every default path derives from
13
+ /** finding #11: KISO_HOME is the ONE root — every default path derives from
14
14
  * it (sessions, trust, extensions, mcp config, skills). The dedicated
15
15
  * env vars (KISO_EXTENSIONS_DIR / KISO_MCP_CONFIG / KISO_SKILLS_DIR)
16
16
  * still override their own path; nothing hard-codes ~/.kiso anymore. */
@@ -46,25 +46,25 @@ export let agentModel = "faux";
46
46
  export function setAgentModel(value) {
47
47
  agentModel = value;
48
48
  }
49
- /** 合并轮 B: whether the agent runs on the faux provider (no real key) —
49
+ /** merge round B: whether the agent runs on the faux provider (no real key) —
50
50
  * set inside makeAgent, read by main for chat/resume's exhaustion check. */
51
51
  export let currentFaux = true;
52
52
  export function setCurrentFaux(value) {
53
53
  currentFaux = value;
54
54
  }
55
- /** 合并轮 B: the merged config (user + trusted project) as resolved by the
55
+ /** merge round B: the merged config (user + trusted project) as resolved by the
56
56
  * LAST makeAgent — /model and autoCompact resolve against it. */
57
57
  export let mergedConfig = {};
58
58
  export function setMergedConfig(value) {
59
59
  mergedConfig = value;
60
60
  }
61
- /** 合并轮 B: the resolved context window (env > config.contextWindow) —
61
+ /** merge round B: the resolved context window (env > config.contextWindow) —
62
62
  * chat.ts's contextWindowTokens() consults it before the env. */
63
63
  export let configuredWindow;
64
64
  export function setConfiguredWindow(value) {
65
65
  configuredWindow = value;
66
66
  }
67
- /** 合并轮 B: the merged config (user + trusted project) + the current
67
+ /** merge round B: the merged config (user + trusted project) + the current
68
68
  * model's NAME — /model lists and switches against them. */
69
69
  export let configModels = {};
70
70
  export function setConfigModels(models) {
@@ -102,7 +102,7 @@ export const VERSION = (() => {
102
102
  return "?";
103
103
  }
104
104
  })();
105
- /** 十: a question cancelled by Ctrl+C — NEVER the empty string, which is a
105
+ /** round 10: a question cancelled by Ctrl+C — NEVER the empty string, which is a
106
106
  * real user answer (the empty line). The empty answer and the cancellation
107
107
  * are distinct facts. */
108
108
  export const CANCELLED = Symbol("kiso-question-cancelled");
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 手感批 B4 (pure move) — the human-facing question UI: the E3 project
2
+ * The ergonomics batch B4 (pure move) — the human-facing question UI: the E3 project
3
3
  * trust gate (ADR-0037), the mcp/skills env merges, the generic ask()
4
4
  * (approvals, trust, uncertain resolutions), and the uncertain-execution
5
5
  * decisions. All bodies moved verbatim from index.ts.
@@ -17,7 +17,7 @@ export declare function interactivePrompt(): string;
17
17
  * forever: approvals auto-deny and uncertain executions auto-abandon, both
18
18
  * printed loudly — never silently ignored, never hung (Area 7).
19
19
  *
20
- * 八/十: the question is ABORTABLE — a pending rl.question is registered in
20
+ * rounds 8/10: the question is ABORTABLE — a pending rl.question is registered in
21
21
  * `pendingAsk` and the SIGINT handler resolves it with the CANCELLED
22
22
  * sentinel. The rl.question callback is NOT left dangling: an input that
23
23
  * arrives after the cancellation is re-emitted as a fresh "line" — it
package/dist/trust-ui.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * 手感批 B4 (pure move) — the human-facing question UI: the E3 project
2
+ * The ergonomics batch B4 (pure move) — the human-facing question UI: the E3 project
3
3
  * trust gate (ADR-0037), the mcp/skills env merges, the generic ask()
4
4
  * (approvals, trust, uncertain resolutions), and the uncertain-execution
5
5
  * decisions. All bodies moved verbatim from index.ts.
@@ -24,7 +24,7 @@ export function interactivePrompt() {
24
24
  * forever: approvals auto-deny and uncertain executions auto-abandon, both
25
25
  * printed loudly — never silently ignored, never hung (Area 7).
26
26
  *
27
- * 八/十: the question is ABORTABLE — a pending rl.question is registered in
27
+ * rounds 8/10: the question is ABORTABLE — a pending rl.question is registered in
28
28
  * `pendingAsk` and the SIGINT handler resolves it with the CANCELLED
29
29
  * sentinel. The rl.question callback is NOT left dangling: an input that
30
30
  * arrives after the cancellation is re-emitted as a fresh "line" — it
@@ -91,7 +91,7 @@ export async function resolveProjectTrust(input) {
91
91
  const artifacts = await projectArtifacts(process.cwd());
92
92
  if (artifacts === null)
93
93
  return null; // no .kiso artifacts — nothing to gate
94
- // 合并轮 B: projectTrust "never" (user config) — the gate auto-refuses:
94
+ // merge round B: projectTrust "never" (user config) — the gate auto-refuses:
95
95
  // no ask, no record, nothing loads. There is deliberately no "always".
96
96
  if (resolveProjectTrustPolicy(loadUserConfig() ?? {}) === "never") {
97
97
  bodyLog(`[project .kiso] projectTrust: never — ${artifacts.root} not loaded`);
@@ -214,7 +214,7 @@ export async function resolveUncertains(session, input, isCancelled) {
214
214
  for (const uncertain of session.uncertainExecutions()) {
215
215
  const answer = await ask(input, `⚠ interrupted execution: ${escapeTerminal(uncertain.name)} (${uncertain.executionId}) — did it apply? (r)erun / (a)bandon: `);
216
216
  if (isCancelled() || answer === CANCELLED) {
217
- // 十: a cancellation NEVER records a verdict — the execution
217
+ // round 10: a cancellation NEVER records a verdict — the execution
218
218
  // stays uncertain and durable; no rerun/abandoned is fabricated.
219
219
  return;
220
220
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-code",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "kiso CLI — the coding-agent reference product: kiso chat / kiso resume / kiso sessions.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -18,13 +18,13 @@
18
18
  "test": "vitest run"
19
19
  },
20
20
  "dependencies": {
21
- "@vincemakes/kiso-core": "0.1.29",
22
- "@vincemakes/kiso-evals": "0.1.29",
23
- "@vincemakes/kiso-provider-anthropic": "0.1.29",
24
- "@vincemakes/kiso-provider-openai": "0.1.29",
25
- "@vincemakes/kiso-runtime": "0.1.29",
26
- "@vincemakes/kiso-tools-node": "0.1.29",
27
- "@vincemakes/kiso-tui": "0.1.29"
21
+ "@vincemakes/kiso-core": "0.1.30",
22
+ "@vincemakes/kiso-evals": "0.1.31",
23
+ "@vincemakes/kiso-provider-anthropic": "0.1.31",
24
+ "@vincemakes/kiso-provider-openai": "0.1.31",
25
+ "@vincemakes/kiso-runtime": "0.1.31",
26
+ "@vincemakes/kiso-tools-node": "0.1.31",
27
+ "@vincemakes/kiso-tui": "0.1.30"
28
28
  },
29
29
  "devDependencies": {
30
30
  "@types/node": "^26.1.2",
package/dist/body.d.ts DELETED
@@ -1,121 +0,0 @@
1
- /**
2
- * v2d — the body renderer: ONE writer for the stdout scroll region.
3
- *
4
- * The v2b/v2c body writes streamed directly (each event wrote its bytes),
5
- * so the tool lines, thinking folds, and text deltas could interleave in
6
- * the same frame — and a tool's life was scattered across several writes
7
- * (the "leak"). v2d: every event handler ONLY mutates cell state; the
8
- * Body's render loop is the only thing that writes the region.
9
- *
10
- * Frozen semantics: a completed cell prints its final form into the
11
- * scroll region ONCE and is never touched again. The ACTIVE TAIL — the
12
- * unfinished cells — renders at the region's bottom (between the frozen
13
- * area and the dock) and redraws in place, CSI 2026 wrapped. State
14
- * changes coalesce to ≥16ms frames; a 200ms heartbeat drives the running
15
- * spinners and elapsed timers. An over-height tail (rare) overflows to
16
- * freeze by completion order.
17
- *
18
- * Pipes / NO_COLOR: the Body runs in PASSTHROUGH — every mutation writes
19
- * the v2b/v2c line-mode bytes immediately, byte-for-byte (the existing
20
- * e2e guards it). The cell renderer never activates.
21
- *
22
- * The cell model is ours (UserCell / ThinkingCell / ToolCell / TextCell /
23
- * NoticeCell / raw block) — deliberately NOT pi's Component interface
24
- * shape (ADR-0040).
25
- */
26
- /** One completed-or-active body line. The renderer's only state. */
27
- export type BodyCell = {
28
- kind: "user";
29
- text: string;
30
- done: true;
31
- } | {
32
- kind: "thinking";
33
- text: string;
34
- done: boolean;
35
- } | {
36
- kind: "tool";
37
- name: string;
38
- input: string;
39
- state: "pending" | "approval" | "running" | "done";
40
- isError: boolean;
41
- resultText: string;
42
- diff: import("./diff.js").DiffLine[] | null;
43
- added: number;
44
- removed: number;
45
- startedAt: number | null;
46
- doneAt: number | null;
47
- done: boolean;
48
- } | {
49
- kind: "text";
50
- text: string;
51
- done: boolean;
52
- } | {
53
- kind: "notice";
54
- text: string;
55
- done: true;
56
- } | {
57
- kind: "raw";
58
- lines: string[];
59
- done: true;
60
- } | {
61
- kind: "terminal";
62
- label: string;
63
- line: string;
64
- done: true;
65
- };
66
- export interface BodyOptions {
67
- /** Is the cell renderer live? A color TTY with a real size — checked
68
- * per mutation (the TIOCSWINSZ can land after main constructs us). */
69
- active: () => boolean;
70
- /** The terminal height (rows) — live, for the region geometry. */
71
- height: () => number;
72
- /** The terminal width (cols) — live, for wrap estimates. */
73
- width: () => number;
74
- /** The input line's edit column — the render's cursor home. */
75
- editCol: () => number;
76
- /** The dock's redraw (the bottom three rows) — the body never writes
77
- * below the region, but the frame may call it to re-pin the chrome. */
78
- onDock?: () => void;
79
- /** The stdout writer — injectable for unit tests (default: stdout). */
80
- write?: (s: string) => void;
81
- }
82
- export declare class Body {
83
- #private;
84
- constructor(opts: BodyOptions);
85
- /** Teardown — flush a pending frame, stop the timers. */
86
- close(): void;
87
- /** The last COMPLETE thinking block, for /think. */
88
- lastThinking(): string | null;
89
- /** The last completed tool call, for /last. */
90
- lastTool(): {
91
- name: string;
92
- input: Record<string, unknown>;
93
- result: {
94
- content: string;
95
- isError: boolean;
96
- };
97
- } | null;
98
- userLine(text: string): void;
99
- thinkingAppend(text: string): void;
100
- thinkingEnd(): void;
101
- toolStart(name: string, callId: string, input: Record<string, unknown>): void;
102
- toolApproval(callId: string, diff: import("./diff.js").DiffResult | null): void;
103
- toolRunning(callId: string): void;
104
- toolSucceeded(callId: string): void;
105
- toolFailed(callId: string, error: string): void;
106
- toolResult(callId: string, result: {
107
- content: string;
108
- isError: boolean;
109
- }): void;
110
- textAppend(text: string): void;
111
- textEnd(): void;
112
- /** The terminal's status line + the rhythm gap (one blank). */
113
- terminal(label: string, statusLine: string): void;
114
- notice(text: string): void;
115
- /** A pre-rendered block (the banner, the session line, slash-command
116
- * outputs) — frozen immediately. */
117
- raw(lines: string[]): void;
118
- /** The one writer. Frozen cells print once; the tail redraws in place,
119
- * CSI 2026 wrapped; the cursor lands at the input edit column. */
120
- render(): void;
121
- }