@vincemakes/kiso-code 0.47.3 → 0.48.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/chat.js CHANGED
@@ -1779,6 +1779,7 @@ export async function chat(session, faux, input, autoCompact, nav, seed) {
1779
1779
  ? () => { }
1780
1780
  : session.useTasks(taskManager, {
1781
1781
  wake: mergedConfig.taskWake !== false,
1782
+ ...(mergedConfig.maxWakes !== undefined ? { maxWakes: mergedConfig.maxWakes } : {}),
1782
1783
  onWake: (w) => queueTurn(w.content, w.via),
1783
1784
  // Amendment 8: a loss is said when kiso concludes it — the
1784
1785
  // model's notice still rides the next run, and is not said again
package/dist/config.d.ts CHANGED
@@ -105,6 +105,9 @@ export interface KisoConfig {
105
105
  /** ADR-0058 §8.4: false turns every task wake into a notice that waits
106
106
  * for your next message. Default on. */
107
107
  readonly taskWake?: boolean;
108
+ /** ADR-0058 Amendment 9: autonomous wakes allowed after one message of yours
109
+ * before a task's end only notifies. Default 20. */
110
+ readonly maxWakes?: number;
108
111
  readonly projectTrust?: "ask" | "never";
109
112
  /** DC-3 §3 rung 1, persisted. The terminal's light/dark, for terminals
110
113
  * that answer neither `CSI ? 996 n` nor OSC 11. USER-LEVEL ONLY: a
package/dist/config.js CHANGED
@@ -235,6 +235,11 @@ export function parseConfig(text, source) {
235
235
  fail("taskWake", "expected true or false");
236
236
  out.taskWake = obj.taskWake;
237
237
  }
238
+ if (obj.maxWakes !== undefined) {
239
+ if (typeof obj.maxWakes !== "number" || !Number.isInteger(obj.maxWakes) || obj.maxWakes < 0)
240
+ fail("maxWakes", "expected a whole number, 0 or more");
241
+ out.maxWakes = obj.maxWakes;
242
+ }
238
243
  if (obj.projectTrust !== undefined) {
239
244
  if (obj.projectTrust !== "ask" && obj.projectTrust !== "never")
240
245
  fail("projectTrust", 'expected "ask" or "never" (there is deliberately no "always")');
@@ -312,6 +317,8 @@ export function mergeConfigs(user, project) {
312
317
  ...(p.autoCompact !== undefined ? { autoCompact: p.autoCompact } : {}),
313
318
  ...(u.taskWake !== undefined ? { taskWake: u.taskWake } : {}),
314
319
  ...(p.taskWake !== undefined ? { taskWake: p.taskWake } : {}),
320
+ ...(u.maxWakes !== undefined ? { maxWakes: u.maxWakes } : {}),
321
+ ...(p.maxWakes !== undefined ? { maxWakes: p.maxWakes } : {}),
315
322
  ...(u.projectTrust !== undefined ? { projectTrust: u.projectTrust } : {}),
316
323
  ...(p.projectTrust !== undefined ? { projectTrust: p.projectTrust } : {}),
317
324
  // DT-1a: checks merge per name — a (trusted) project's check wins over the user's
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@
25
25
  */
26
26
  import { type SessionRoute } from "./projects.js";
27
27
  export { contextPolicyFromEnv } from "./create-coding-agent.js";
28
- export { SYSTEM_PROMPT, composeSystemPrompt, readProjectInstructions } from "./coding-prompt.js";
28
+ export { SYSTEM_PROMPT, CODING_TOOL_RULES, composeSystemPrompt, readProjectInstructions } from "./coding-prompt.js";
29
29
  export { applyProjectMerges } from "./trust-ui.js";
30
30
  export { workspaceRoot } from "./state.js";
31
31
  /**
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ import { clipboardImage } from "./clipboard.js";
63
63
  import { cardsFromListings } from "./session-cards.js";
64
64
  import { createCodingAgent } from "./create-coding-agent.js";
65
65
  export { contextPolicyFromEnv } from "./create-coding-agent.js";
66
- export { SYSTEM_PROMPT, composeSystemPrompt, readProjectInstructions } from "./coding-prompt.js";
66
+ export { SYSTEM_PROMPT, CODING_TOOL_RULES, composeSystemPrompt, readProjectInstructions } from "./coding-prompt.js";
67
67
  // The moved exports stay reachable from this entry — the test imports
68
68
  // (project-trust, coding-agent) never change (B4: zero assertion changes).
69
69
  export { applyProjectMerges } from "./trust-ui.js";
package/dist/state.d.ts CHANGED
@@ -34,6 +34,9 @@ export declare function codingToolOptions(): {
34
34
  readonly secretEnvNames: readonly string[];
35
35
  readonly protectedFiles: readonly string[];
36
36
  readonly tasks: (sessionId: string | undefined) => ShellTasks | undefined;
37
+ readonly limits?: {
38
+ readonly minForegroundMs: number;
39
+ };
37
40
  };
38
41
  /** Amendment 8: what a session's task ran — a lost task's transcript row
39
42
  * names it. Undefined when the task or its journal cannot be read. */
package/dist/state.js CHANGED
@@ -42,7 +42,18 @@ export function secretEnvNamesOf(models) {
42
42
  ];
43
43
  }
44
44
  export function codingToolOptions() {
45
- return { workspaceRoot: process.cwd(), excludeRoots: [kisoHome()], secretEnvNames: secretEnvNamesOf(configModels), protectedFiles: protectedFiles(), tasks: tasksFor };
45
+ // KISO_MIN_FOREGROUND_MS — the test rigs' knob (like KISO_AUTO_DETACH_MS):
46
+ // the least foreground wait (ADR-0058 Amendment 10, default 60 s). The
47
+ // rigs that promote a command by a short wait lower it; nothing else does.
48
+ const minForeground = Number.parseInt(process.env.KISO_MIN_FOREGROUND_MS ?? "", 10);
49
+ return {
50
+ workspaceRoot: process.cwd(),
51
+ excludeRoots: [kisoHome()],
52
+ secretEnvNames: secretEnvNamesOf(configModels),
53
+ protectedFiles: protectedFiles(),
54
+ tasks: tasksFor,
55
+ ...(Number.isFinite(minForeground) && minForeground >= 0 ? { limits: { minForegroundMs: minForeground } } : {}),
56
+ };
46
57
  }
47
58
  /** ADR-0058 (3b): one TaskManager per session, its directory beside the
48
59
  * session's log (`<store dir>/<session>.tasks/`). A call without a session
@@ -268,7 +279,10 @@ export function readContextLedger(sessionId, window) {
268
279
  const turnSegments = manifest.filter((s) => s.role === "turn" || s.role === "current_turn");
269
280
  return {
270
281
  window,
271
- systemPrompt: sum((s) => s === "system:base" || (s.startsWith("system:ext:") && !isSkills(s))),
282
+ // RG-F2: the generated tool table (system:tools) is system-prompt
283
+ // text the model reads on every request; it had no ledger line, so
284
+ // this row was short by it
285
+ systemPrompt: sum((s) => s === "system:base" || s === "system:tools" || (s.startsWith("system:ext:") && !isSkills(s))),
272
286
  systemBase: sum((s) => s === "system:base"),
273
287
  appends: count((s) => s.startsWith("system:ext:") && !isSkills(s)),
274
288
  toolTable: sum((s) => s.startsWith("tool:")),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-code",
3
- "version": "0.47.3",
3
+ "version": "0.48.0",
4
4
  "description": "kiso-code \u2014 the coding agent on kiso, the durable runtime for AI agents: 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.47.3",
22
- "@vincemakes/kiso-core": "0.47.3",
23
- "@vincemakes/kiso-evals": "0.47.3",
24
- "@vincemakes/kiso-mcp-ext": "0.47.3",
25
- "@vincemakes/kiso-provider-anthropic": "0.47.3",
26
- "@vincemakes/kiso-provider-openai": "0.47.3",
27
- "@vincemakes/kiso-provider-openai-responses": "0.47.3",
28
- "@vincemakes/kiso-runtime": "0.47.3",
29
- "@vincemakes/kiso-skills-ext": "0.47.3",
30
- "@vincemakes/kiso-subagent-ext": "0.47.3",
31
- "@vincemakes/kiso-tools-node": "0.47.3",
32
- "@vincemakes/kiso-tui": "0.47.3",
33
- "@vincemakes/kiso-tui-cells": "0.47.3"
21
+ "@vincemakes/kiso-ask-ext": "0.48.0",
22
+ "@vincemakes/kiso-core": "0.48.0",
23
+ "@vincemakes/kiso-evals": "0.48.0",
24
+ "@vincemakes/kiso-mcp-ext": "0.48.0",
25
+ "@vincemakes/kiso-provider-anthropic": "0.48.0",
26
+ "@vincemakes/kiso-provider-openai": "0.48.0",
27
+ "@vincemakes/kiso-provider-openai-responses": "0.48.0",
28
+ "@vincemakes/kiso-runtime": "0.48.0",
29
+ "@vincemakes/kiso-skills-ext": "0.48.0",
30
+ "@vincemakes/kiso-subagent-ext": "0.48.0",
31
+ "@vincemakes/kiso-tools-node": "0.48.0",
32
+ "@vincemakes/kiso-tui": "0.48.0",
33
+ "@vincemakes/kiso-tui-cells": "0.48.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26.1.2",