@vincemakes/kiso-code 0.50.0 → 0.50.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.
package/dist/chat.js CHANGED
@@ -9,7 +9,7 @@ import { escapeTerminal, cacheHitPct, decodeRate, palette, renderEvent, renderRe
9
9
  import { askView, coldResumeLine, coldResumeView, deletionRiskHint, editFileHunksDiff, hunksOf, writeFileDiff } from "@vincemakes/kiso-tui";
10
10
  import { canonicalTargetPath, isProtectedPath, protectedIdentity, shellProgressPath } from "@vincemakes/kiso-tools-node";
11
11
  import { deliveryLines, liveTasks, lostToldOf, mergedConfig, queuedSwitchLines, setExitTasks, tasksFor, taskWhatOf } from "./state.js";
12
- import { budgetSpentLine, taskCounts, taskNoticeLines, taskNoticeRows, tasksForDisplay } from "./task-notice.js";
12
+ import { budgetSpentLine, cappedWaitLine, taskCounts, taskNoticeLines, taskNoticeRows, tasksForDisplay } from "./task-notice.js";
13
13
  import { current as inRunCompaction, takeKept as takeKeptCompaction } from "./in-run-compaction.js";
14
14
  import { echoText } from "@vincemakes/kiso-tui-cells/render";
15
15
  import { canonicalizeUsage, RunClosedError } from "@vincemakes/kiso-runtime";
@@ -1063,6 +1063,9 @@ onInputLanded) {
1063
1063
  reason = m[1];
1064
1064
  }
1065
1065
  body.toolResult(ev.callId, { content: text, isError: ev.isError, reason, ...((ev.tags ?? []).includes("created") ? { created: true } : {}) });
1066
+ const capped = ev.isError ? null : cappedWaitLine(text);
1067
+ if (capped !== null)
1068
+ body.notice(capped);
1066
1069
  break;
1067
1070
  }
1068
1071
  case "text_delta":
package/dist/index.js CHANGED
@@ -45,7 +45,7 @@ import { activeStoreDir, setActiveStoreDir, agentModel, atFiles, body, bodyLog,
45
45
  import { fauxSkip, readFauxScript } from "./faux-glue.js";
46
46
  import { barFor, chat, contextWindowTokens, displayCtxRatio, microcompactThresholdFor, statusModelLabel } from "./chat.js";
47
47
  import { preferences, usePreferences } from "./preferences.js";
48
- import { settingsLayers, setChildTurnBudget, stopAllTasks, tasksFor } from "./state.js";
48
+ import { settingsLayers, setChildTurnBudget, setPrintRun, stopAllTasks, tasksFor } from "./state.js";
49
49
  import { tasksForDisplay } from "./task-notice.js";
50
50
  import { finishChild } from "./child-result.js";
51
51
  import { loadUserConfig, resolveAutoCompact } from "./config.js";
@@ -1305,6 +1305,7 @@ async function main() {
1305
1305
  process.exit(2);
1306
1306
  }
1307
1307
  args.splice(printIdx, 2);
1308
+ setPrintRun();
1308
1309
  }
1309
1310
  // merge round B: --model <profile|provider/model> — the top of the model
1310
1311
  // precedence chain; the value flows into createCodingAgent's config resolution.
package/dist/replay.js CHANGED
@@ -21,7 +21,7 @@
21
21
  */
22
22
  import { echoText } from "@vincemakes/kiso-tui-cells/render";
23
23
  import { bandHeader } from "@vincemakes/kiso-tui-cells/strings";
24
- import { taskNoticeLines, taskNoticeRows, taskWhat } from "./task-notice.js";
24
+ import { cappedWaitLine, taskNoticeLines, taskNoticeRows, taskWhat } from "./task-notice.js";
25
25
  /** How many turns stay on screen in full. */
26
26
  const FULL_TURNS = 2;
27
27
  /** A user turn's opening line, or null when this input does not open one
@@ -101,6 +101,10 @@ function replayTurn(body, turn, tasks) {
101
101
  const created = (e.tags ?? []).includes("created");
102
102
  body.toolResult(String(e.callId), { content: text, isError: e.isError === true, reason, untimed: true, ...(created ? { created: true } : {}) });
103
103
  results.add(String(e.callId));
104
+ // 0.50.1: the capped wait's TASK row, as the live run drew it
105
+ const capped = e.isError === true ? null : cappedWaitLine(text);
106
+ if (capped !== null)
107
+ body.notice(capped);
104
108
  break;
105
109
  }
106
110
  case "text_delta":
package/dist/state.d.ts CHANGED
@@ -29,6 +29,7 @@ export declare function kisoHome(): string;
29
29
  * these state setters have run.
30
30
  */
31
31
  export declare function secretEnvNamesOf(models: Readonly<Record<string, unknown>>): readonly string[];
32
+ export declare function setPrintRun(): void;
32
33
  export declare function codingToolOptions(): {
33
34
  readonly workspaceRoot: string;
34
35
  readonly excludeRoots: readonly string[];
@@ -37,7 +38,8 @@ export declare function codingToolOptions(): {
37
38
  readonly tasks: (sessionId: string | undefined) => ShellTasks | undefined;
38
39
  readonly observedRevision: (sessionId: string | undefined, full: string, kind?: "edit" | "write") => string | undefined;
39
40
  readonly limits?: {
40
- readonly minForegroundMs: number;
41
+ readonly minForegroundMs?: number;
42
+ readonly maxForegroundMs?: number;
41
43
  };
42
44
  };
43
45
  /** Amendment 8: what a session's task ran — a lost task's transcript row
package/dist/state.js CHANGED
@@ -43,11 +43,25 @@ export function secretEnvNamesOf(models) {
43
43
  .filter((n) => typeof n === "string" && n.length > 0)),
44
44
  ];
45
45
  }
46
+ /** 0.50.1 (ADR-0058 Amendment 16): `kiso -p` runs with nobody watching and
47
+ * stops its tasks when the one turn ends, so the foreground wait keeps the
48
+ * model's value — no ceiling. Set once, where `-p` is parsed. */
49
+ let printRun = false;
50
+ export function setPrintRun() {
51
+ printRun = true;
52
+ }
46
53
  export function codingToolOptions() {
47
54
  // KISO_MIN_FOREGROUND_MS — the test rigs' knob (like KISO_AUTO_DETACH_MS):
48
55
  // the least foreground wait (ADR-0058 Amendment 10, default 60 s). The
49
56
  // rigs that promote a command by a short wait lower it; nothing else does.
50
57
  const minForeground = Number.parseInt(process.env.KISO_MIN_FOREGROUND_MS ?? "", 10);
58
+ // KISO_MAX_FOREGROUND_MS — the rigs' knob for the ceiling (Amendment 15,
59
+ // default 5 min). `-p` has none whatever the knob says (Amendment 16).
60
+ const maxForeground = Number.parseInt(process.env.KISO_MAX_FOREGROUND_MS ?? "", 10);
61
+ const limits = {
62
+ ...(Number.isFinite(minForeground) && minForeground >= 0 ? { minForegroundMs: minForeground } : {}),
63
+ ...(printRun ? { maxForegroundMs: 0 } : Number.isFinite(maxForeground) && maxForeground >= 0 ? { maxForegroundMs: maxForeground } : {}),
64
+ };
51
65
  return {
52
66
  workspaceRoot: process.cwd(),
53
67
  excludeRoots: [kisoHome()],
@@ -55,7 +69,7 @@ export function codingToolOptions() {
55
69
  protectedFiles: protectedFiles(),
56
70
  tasks: tasksFor,
57
71
  observedRevision: observedRevisionFromLog,
58
- ...(Number.isFinite(minForeground) && minForeground >= 0 ? { limits: { minForegroundMs: minForeground } } : {}),
72
+ ...(Object.keys(limits).length > 0 ? { limits } : {}),
59
73
  };
60
74
  }
61
75
  /** ADR-0058 (3b): one TaskManager per session, its directory beside the
@@ -7,6 +7,13 @@ import type { NoticeMark } from "@vincemakes/kiso-tui";
7
7
  * (<what>) — ` — the parenthesis only when the command is known — and the
8
8
  * LAST ` — ` part opening with "it may still be running". One line each. */
9
9
  export declare function taskNoticeLines(items: readonly TaskDeliveryItem[], what?: (taskId: string) => string | undefined): string[];
10
+ /** 0.50.1: a command promoted at the foreground ceiling — its shell result
11
+ * opens `still running after <wait> ms (the limit; you asked <asked> ms);
12
+ * continued as background task <id>` — is said to the person as one TASK
13
+ * row: `t3 · moved to the background at the 5m limit · asked 6m 40s`. Only
14
+ * this case: every other promotion stays rowless (the task-start row is
15
+ * deferred, owner 2026-10-14). */
16
+ export declare function cappedWaitLine(result: string): string | null;
10
17
  /** Finding 0480-F9: the chain budget is spent — said to the person once,
11
18
  * so a chain that went quiet on its budget does not look idle. */
12
19
  export declare function budgetSpentLine(info: {
@@ -36,6 +36,19 @@ export function taskNoticeLines(items, what) {
36
36
  }
37
37
  return rows;
38
38
  }
39
+ /** 0.50.1: a command promoted at the foreground ceiling — its shell result
40
+ * opens `still running after <wait> ms (the limit; you asked <asked> ms);
41
+ * continued as background task <id>` — is said to the person as one TASK
42
+ * row: `t3 · moved to the background at the 5m limit · asked 6m 40s`. Only
43
+ * this case: every other promotion stays rowless (the task-start row is
44
+ * deferred, owner 2026-10-14). */
45
+ export function cappedWaitLine(result) {
46
+ const m = /^still running after (\d+) ms \(the limit; you asked (\d+) ms\); continued as background task (\S+) /.exec(result);
47
+ if (m === null)
48
+ return null;
49
+ const limit = elapsedLabel(Number(m[1]) / 1000).replace(/(?<=m) 0s$/, "");
50
+ return `✦ task ${m[3]} · moved to the background at the ${limit} limit · asked ${elapsedLabel(Number(m[2]) / 1000)}`;
51
+ }
39
52
  /** Finding 0480-F9: the chain budget is spent — said to the person once,
40
53
  * so a chain that went quiet on its budget does not look idle. */
41
54
  export function budgetSpentLine(info) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-code",
3
- "version": "0.50.0",
3
+ "version": "0.50.1",
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.50.0",
22
- "@vincemakes/kiso-core": "0.50.0",
23
- "@vincemakes/kiso-evals": "0.50.0",
24
- "@vincemakes/kiso-mcp-ext": "0.50.0",
25
- "@vincemakes/kiso-provider-anthropic": "0.50.0",
26
- "@vincemakes/kiso-provider-openai": "0.50.0",
27
- "@vincemakes/kiso-provider-openai-responses": "0.50.0",
28
- "@vincemakes/kiso-runtime": "0.50.0",
29
- "@vincemakes/kiso-skills-ext": "0.50.0",
30
- "@vincemakes/kiso-subagent-ext": "0.50.0",
31
- "@vincemakes/kiso-tools-node": "0.50.0",
32
- "@vincemakes/kiso-tui": "0.50.0",
33
- "@vincemakes/kiso-tui-cells": "0.50.0"
21
+ "@vincemakes/kiso-ask-ext": "0.50.1",
22
+ "@vincemakes/kiso-core": "0.50.1",
23
+ "@vincemakes/kiso-evals": "0.50.1",
24
+ "@vincemakes/kiso-mcp-ext": "0.50.1",
25
+ "@vincemakes/kiso-provider-anthropic": "0.50.1",
26
+ "@vincemakes/kiso-provider-openai": "0.50.1",
27
+ "@vincemakes/kiso-provider-openai-responses": "0.50.1",
28
+ "@vincemakes/kiso-runtime": "0.50.1",
29
+ "@vincemakes/kiso-skills-ext": "0.50.1",
30
+ "@vincemakes/kiso-subagent-ext": "0.50.1",
31
+ "@vincemakes/kiso-tools-node": "0.50.1",
32
+ "@vincemakes/kiso-tui": "0.50.1",
33
+ "@vincemakes/kiso-tui-cells": "0.50.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^26.1.2",