@vincemakes/kiso-code 0.40.4 → 0.40.5
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 +8 -1
- package/dist/dispatch.js +5 -1
- package/dist/stale-version.d.ts +14 -0
- package/dist/stale-version.js +52 -0
- package/package.json +15 -15
package/dist/chat.js
CHANGED
|
@@ -14,8 +14,9 @@ import { canonicalizeUsage } from "@vincemakes/kiso-runtime";
|
|
|
14
14
|
import { canonicalizeUsageForModel, requestBudget } from "@vincemakes/kiso-runtime/internal";
|
|
15
15
|
import { dispatch, abortBangCommand } from "./dispatch.js";
|
|
16
16
|
import { paintWindowTitle } from "./window-title.js";
|
|
17
|
-
import { agentBaseUrl, agentModel, body, bodyLog, configuredWindow, dock, retryOnRow, retryShown, setRetryShown, floorOn, protectedFiles, upstreamOf } from "./state.js";
|
|
17
|
+
import { agentBaseUrl, agentModel, body, bodyLog, configuredWindow, dock, retryOnRow, retryShown, setRetryShown, floorOn, protectedFiles, upstreamOf, VERSION } from "./state.js";
|
|
18
18
|
import { attachImages } from "./attachments.js";
|
|
19
|
+
import { installedVersion, staleVersionNotice } from "./stale-version.js";
|
|
19
20
|
import { learnedWindowFor } from "./learned-windows.js";
|
|
20
21
|
import { lookupContextWindow, lookupModelMetadata } from "@vincemakes/kiso-runtime/internal";
|
|
21
22
|
import { addDontAskAgainRule, askPanel, fixHintFor, pendingAsk, resolveUncertains } from "./trust-ui.js";
|
|
@@ -1365,6 +1366,12 @@ export async function chat(session, faux, input, autoCompact, nav, seed) {
|
|
|
1365
1366
|
stopSpinner();
|
|
1366
1367
|
paintIdle();
|
|
1367
1368
|
currentRun = null;
|
|
1369
|
+
// 0.40.5: the kiso on disk may no longer be the one this
|
|
1370
|
+
// session runs (an upgrade since it started) — said once per
|
|
1371
|
+
// installed version (stale-version.ts).
|
|
1372
|
+
const stale = staleVersionNotice(installedVersion(), VERSION, session.id);
|
|
1373
|
+
if (stale !== null)
|
|
1374
|
+
body.notice(stale);
|
|
1368
1375
|
// round 8: a faux script that ran out of declared turns exits
|
|
1369
1376
|
// loudly with a non-zero status — never a silent status 0.
|
|
1370
1377
|
// round 4 (adversarial): the exhaustion is a CONTROLLED rejection of
|
package/dist/dispatch.js
CHANGED
|
@@ -9,9 +9,10 @@ import { buildAdapter, lookupModelMetadata, resolveContinuationScope, resolveRea
|
|
|
9
9
|
import { MODES, MODE_NOTE, OFFERED_MODES, getMode, setMode } from "./mode.js";
|
|
10
10
|
import { clipboardWrite, lastAnswer } from "./clipboard.js";
|
|
11
11
|
import { protectedBangReason, protectedShellVerdict } from "./protected-shell.js";
|
|
12
|
-
import { agentBaseUrl, currentProfileName, setCurrentProfileName, currentModelName, agentModel, body, bodyLog, codingToolOptions, protectedFiles, kisoHome, configModels, dock, lastBinding, loadedSkillsCatalog, mergedConfig, readContextLedger, retryOnRow, sessionsDir, setAgentModel, setConfiguredWindow, setCurrentModelName, setModelChoice, setRetryShown, upstreamOf, setLastBinding } from "./state.js";
|
|
12
|
+
import { agentBaseUrl, currentProfileName, setCurrentProfileName, currentModelName, agentModel, body, bodyLog, codingToolOptions, protectedFiles, kisoHome, configModels, dock, lastBinding, loadedSkillsCatalog, mergedConfig, readContextLedger, retryOnRow, sessionsDir, setAgentModel, setConfiguredWindow, setCurrentModelName, setModelChoice, setRetryShown, upstreamOf, VERSION, setLastBinding } from "./state.js";
|
|
13
13
|
import { adapterOptionsFor } from "./auth/adapter-options.js";
|
|
14
14
|
import { profileProviderLabel, providerLabel } from "./provider-label.js";
|
|
15
|
+
import { installedVersion, versionStatusLine } from "./stale-version.js";
|
|
15
16
|
import { queuedSwitchLines } from "./state.js";
|
|
16
17
|
import { contextWindowTokens, microcompactThresholdFor, startStatusSpinner, statedContextWindow, windowSourceNote } from "./chat.js";
|
|
17
18
|
import { authForProfile, directWriteProfile, profileAvailable, resolveContextWindow, unavailableReason } from "./config.js";
|
|
@@ -514,6 +515,9 @@ export function dispatch(line, ctx) {
|
|
|
514
515
|
// variable; until then, a label that cannot lie.)
|
|
515
516
|
const profileOf = currentProfileName === null ? "" : ` · profile ${currentProfileName}`;
|
|
516
517
|
bodyLog(`model ${agentModel}${providerLabel(agentBaseUrl, upstreamOf(agentBaseUrl))}${profileOf}`);
|
|
518
|
+
// 0.40.5: the version this session RUNS, and the installed one when
|
|
519
|
+
// an upgrade (or a rollback) since start-up made them differ.
|
|
520
|
+
bodyLog(versionStatusLine(installedVersion(), VERSION));
|
|
517
521
|
ctx.input.prompt();
|
|
518
522
|
});
|
|
519
523
|
return;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** The version of the kiso installed where this one was loaded from, read
|
|
2
|
+
* now — null on any failure, never a guess. KISO_INSTALLED_PACKAGE_JSON
|
|
3
|
+
* names another file: the test rigs' knob (like KISO_FAUX_SCRIPT), so an
|
|
4
|
+
* end-to-end run can "upgrade" underneath a live session without touching
|
|
5
|
+
* the checkout's own package.json. */
|
|
6
|
+
export declare function installedVersion(pkgPath?: string): string | null;
|
|
7
|
+
/** The transcript notice, once per installed version that differs from the
|
|
8
|
+
* running one (a newer install, or a rollback); null otherwise. */
|
|
9
|
+
export declare function staleVersionNotice(installed: string | null, running: string, sessionId: string): string | null;
|
|
10
|
+
/** /status's version line: the running version, and the installed one when
|
|
11
|
+
* they differ. */
|
|
12
|
+
export declare function versionStatusLine(installed: string | null, running: string): string;
|
|
13
|
+
/** Tests: forget which version was noticed. */
|
|
14
|
+
export declare function resetStaleVersionNotice(): void;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 0.40.5 — a session says when the kiso on disk is not the kiso it runs.
|
|
3
|
+
*
|
|
4
|
+
* The owner, 2026-09-23: "I am on 0.40.3 — why does edit_file still fail?"
|
|
5
|
+
* The session's process had started at 13:03 on 0.40.2; 0.40.3 was
|
|
6
|
+
* installed at ~14:05. The process kept the code it loaded, so its
|
|
7
|
+
* edit_file still refused overlapping hunks, while `kiso --version` in
|
|
8
|
+
* another shell printed the version ON DISK. Nothing in the session said
|
|
9
|
+
* otherwise. A process that loads a module lazily after an upgrade (a
|
|
10
|
+
* provider on its first /model switch) would also mix the new version with
|
|
11
|
+
* the old — the notice is the cue to restart before that.
|
|
12
|
+
*
|
|
13
|
+
* `VERSION` (state.ts) is read once at start-up from the package.json next
|
|
14
|
+
* to the build; a global install replaces that file, so reading it AGAIN
|
|
15
|
+
* sees what a new start would run. One small read per turn and per
|
|
16
|
+
* /status; no timer, no watcher, no network.
|
|
17
|
+
*/
|
|
18
|
+
import { readFileSync } from "node:fs";
|
|
19
|
+
import { dirname, join } from "node:path";
|
|
20
|
+
import { fileURLToPath } from "node:url";
|
|
21
|
+
/** The version of the kiso installed where this one was loaded from, read
|
|
22
|
+
* now — null on any failure, never a guess. KISO_INSTALLED_PACKAGE_JSON
|
|
23
|
+
* names another file: the test rigs' knob (like KISO_FAUX_SCRIPT), so an
|
|
24
|
+
* end-to-end run can "upgrade" underneath a live session without touching
|
|
25
|
+
* the checkout's own package.json. */
|
|
26
|
+
export function installedVersion(pkgPath = process.env.KISO_INSTALLED_PACKAGE_JSON ?? join(dirname(fileURLToPath(import.meta.url)), "..", "package.json")) {
|
|
27
|
+
try {
|
|
28
|
+
const v = JSON.parse(readFileSync(pkgPath, "utf8")).version;
|
|
29
|
+
return typeof v === "string" && v !== "" ? v : null;
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
let lastNoticed = null;
|
|
36
|
+
/** The transcript notice, once per installed version that differs from the
|
|
37
|
+
* running one (a newer install, or a rollback); null otherwise. */
|
|
38
|
+
export function staleVersionNotice(installed, running, sessionId) {
|
|
39
|
+
if (installed === null || installed === running || running === "?" || installed === lastNoticed)
|
|
40
|
+
return null;
|
|
41
|
+
lastNoticed = installed;
|
|
42
|
+
return `✦ kiso ${installed} is installed — this session runs ${running}; exit and resume it (kiso resume ${sessionId}) to use it`;
|
|
43
|
+
}
|
|
44
|
+
/** /status's version line: the running version, and the installed one when
|
|
45
|
+
* they differ. */
|
|
46
|
+
export function versionStatusLine(installed, running) {
|
|
47
|
+
return installed === null || installed === running ? `version ${running}` : `version ${running} (running) · ${installed} installed — restart to use it`;
|
|
48
|
+
}
|
|
49
|
+
/** Tests: forget which version was noticed. */
|
|
50
|
+
export function resetStaleVersionNotice() {
|
|
51
|
+
lastNoticed = null;
|
|
52
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-code",
|
|
3
|
-
"version": "0.40.
|
|
3
|
+
"version": "0.40.5",
|
|
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,20 +18,20 @@
|
|
|
18
18
|
"test": "vitest run"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@vincemakes/kiso-ask-ext": "0.40.
|
|
22
|
-
"@vincemakes/kiso-core": "0.40.
|
|
23
|
-
"@vincemakes/kiso-evals": "0.40.
|
|
24
|
-
"@vincemakes/kiso-mcp-ext": "0.40.
|
|
25
|
-
"@vincemakes/kiso-provider-anthropic": "0.40.
|
|
26
|
-
"@vincemakes/kiso-provider-openai": "0.40.
|
|
27
|
-
"@vincemakes/kiso-provider-openai-responses": "0.40.
|
|
28
|
-
"@vincemakes/kiso-runtime": "0.40.
|
|
29
|
-
"@vincemakes/kiso-skills-ext": "0.40.
|
|
30
|
-
"@vincemakes/kiso-subagent-ext": "0.40.
|
|
31
|
-
"@vincemakes/kiso-task-ext": "0.40.
|
|
32
|
-
"@vincemakes/kiso-tools-node": "0.40.
|
|
33
|
-
"@vincemakes/kiso-tui": "0.40.
|
|
34
|
-
"@vincemakes/kiso-tui-cells": "0.40.
|
|
21
|
+
"@vincemakes/kiso-ask-ext": "0.40.5",
|
|
22
|
+
"@vincemakes/kiso-core": "0.40.5",
|
|
23
|
+
"@vincemakes/kiso-evals": "0.40.5",
|
|
24
|
+
"@vincemakes/kiso-mcp-ext": "0.40.5",
|
|
25
|
+
"@vincemakes/kiso-provider-anthropic": "0.40.5",
|
|
26
|
+
"@vincemakes/kiso-provider-openai": "0.40.5",
|
|
27
|
+
"@vincemakes/kiso-provider-openai-responses": "0.40.5",
|
|
28
|
+
"@vincemakes/kiso-runtime": "0.40.5",
|
|
29
|
+
"@vincemakes/kiso-skills-ext": "0.40.5",
|
|
30
|
+
"@vincemakes/kiso-subagent-ext": "0.40.5",
|
|
31
|
+
"@vincemakes/kiso-task-ext": "0.40.5",
|
|
32
|
+
"@vincemakes/kiso-tools-node": "0.40.5",
|
|
33
|
+
"@vincemakes/kiso-tui": "0.40.5",
|
|
34
|
+
"@vincemakes/kiso-tui-cells": "0.40.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^26.1.2",
|