@vincemakes/kiso-code 0.43.0 → 0.44.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/builtin.js +5 -6
- package/dist/chat.js +9 -117
- package/dist/index.js +2 -1
- package/dist/state.d.ts +2 -2
- package/dist/state.js +2 -2
- package/dist/trust-ui.js +2 -2
- package/package.json +14 -15
package/dist/builtin.js
CHANGED
|
@@ -7,12 +7,11 @@
|
|
|
7
7
|
*
|
|
8
8
|
* E5 (the composition round, finding E5-F1/F2): the task extension left
|
|
9
9
|
* the default composition — on 13 consecutive real-provider sessions it
|
|
10
|
-
* paid its rent (
|
|
11
|
-
* was never called, not even on the guidance's own designed trigger
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* to shadow or collide with).
|
|
10
|
+
* paid its rent (its guidance and its tool on every request) and
|
|
11
|
+
* was never called, not even on the guidance's own designed trigger —
|
|
12
|
+
* and 0.44.0 retired it outright (no host used it either). A user or
|
|
13
|
+
* project extension named "task" is a plain extension — no built-in to
|
|
14
|
+
* shadow or collide with.
|
|
16
15
|
*
|
|
17
16
|
* - a user extension may SHADOW a built-in by name — the user's deliberate
|
|
18
17
|
* install wins (a built-in cannot be uninstalled), loudly, and the
|
package/dist/chat.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* estimates. All bodies moved verbatim from index.ts.
|
|
6
6
|
*/
|
|
7
7
|
import { readFileSync, statSync } from "node:fs";
|
|
8
|
-
import { escapeTerminal, cacheHitPct, decodeRate, idleStatus, palette, renderEvent, renderRecap, runningStatus, toolTarget,
|
|
8
|
+
import { escapeTerminal, cacheHitPct, decodeRate, idleStatus, palette, renderEvent, renderRecap, runningStatus, toolTarget, STATUS_GLYPHS, kUnit, } from "@vincemakes/kiso-tui";
|
|
9
9
|
import { askView, coldResumeLine, coldResumeView, deletionRiskHint, editFileDiff, writeFileDiff } from "@vincemakes/kiso-tui";
|
|
10
10
|
import { canonicalTargetPath, isProtectedPath, protectedIdentity, shellProgressPath } from "@vincemakes/kiso-tools-node";
|
|
11
11
|
import { queuedSwitchLines } from "./state.js";
|
|
@@ -756,21 +756,6 @@ export function parseSaferOptions(text) {
|
|
|
756
756
|
}
|
|
757
757
|
return out.length === 0 ? null : out;
|
|
758
758
|
}
|
|
759
|
-
/** TV-1B — the plain-word verdict tail for the settled checklist.
|
|
760
|
-
* "no passing check yet" covers both never-ran and ran-and-failed
|
|
761
|
-
* without lying; "outdated" claims only what the trajectory proves. */
|
|
762
|
-
function taskVerdictWords(kind) {
|
|
763
|
-
switch (kind) {
|
|
764
|
-
case "verified":
|
|
765
|
-
return "checked \u2713";
|
|
766
|
-
case "stale":
|
|
767
|
-
return "check outdated \u2014 work may have changed after it";
|
|
768
|
-
case "none":
|
|
769
|
-
return "no passing check yet";
|
|
770
|
-
case "unreadable":
|
|
771
|
-
return "task list unreadable";
|
|
772
|
-
}
|
|
773
|
-
}
|
|
774
759
|
/** W21 — the panel view for a permission_requested: the rule line (the
|
|
775
760
|
* why-asked speaker + the §3.5 fix hint), the toolTarget title, the
|
|
776
761
|
* "❯ run paused" status, and the ALWAYS-verbose args. */
|
|
@@ -821,34 +806,6 @@ function approvalArgs(name, input) {
|
|
|
821
806
|
* stream here. Events without a render (stop, expired, resolved, …) → null,
|
|
822
807
|
* and the consumer skips them — the pipe bytes stay identical.
|
|
823
808
|
*/
|
|
824
|
-
/**
|
|
825
|
-
* round 6 (the task round): translate a do-not-compact-tagged tool result whose
|
|
826
|
-
* content follows the task echo contract (a [task] header line + one
|
|
827
|
-
* `[pending|active|done] text` line per item) into the checklist cell's
|
|
828
|
-
* structured items. Null = not a checklist — the ordinary result cell
|
|
829
|
-
* renders. Keyed on the TAG (what the extension declared), never on a
|
|
830
|
-
* tool name; the parse is graceful so a foreign tagged result still
|
|
831
|
-
* renders normally.
|
|
832
|
-
*/
|
|
833
|
-
function parseChecklist(tags, content) {
|
|
834
|
-
if (!(tags ?? []).includes("do-not-compact"))
|
|
835
|
-
return null;
|
|
836
|
-
const items = [];
|
|
837
|
-
let header = "";
|
|
838
|
-
for (const line of content.split("\n")) {
|
|
839
|
-
const head = /^\[task\] (.*)$/.exec(line);
|
|
840
|
-
if (head !== null) {
|
|
841
|
-
header = head[1];
|
|
842
|
-
continue;
|
|
843
|
-
}
|
|
844
|
-
const m = /^\[(pending|active|done)\] (.*)$/.exec(line);
|
|
845
|
-
if (m !== null)
|
|
846
|
-
items.push({ text: m[2], status: m[1] });
|
|
847
|
-
}
|
|
848
|
-
if (items.length === 0)
|
|
849
|
-
return null;
|
|
850
|
-
return { header, items };
|
|
851
|
-
}
|
|
852
809
|
function toRenderInput(ev) {
|
|
853
810
|
switch (ev.type) {
|
|
854
811
|
case "user_input":
|
|
@@ -984,7 +941,9 @@ submitTurn) {
|
|
|
984
941
|
// TV-1B: a system-sourced input is PRODUCT MACHINERY — visible
|
|
985
942
|
// (every durable input renders) but never painted as the
|
|
986
943
|
// user's words. Provenance is honest on screen, not only in
|
|
987
|
-
// the log.
|
|
944
|
+
// the log. Since 0.44.0 (the verify offer retired) the CLI
|
|
945
|
+
// starts no such run itself; the branch keeps the rule for
|
|
946
|
+
// any run that carries one, as replay.ts does for old logs.
|
|
988
947
|
if (ev.source === "system") {
|
|
989
948
|
// R2 (law 1.3): the ◆ said nothing the words did not. What
|
|
990
949
|
// makes this row honest is that it NAMES itself machinery.
|
|
@@ -1033,8 +992,7 @@ submitTurn) {
|
|
|
1033
992
|
const text = typeof ev.content === "string" ? ev.content : "";
|
|
1034
993
|
// W19: a DENIED call carries its reason — extracted from the
|
|
1035
994
|
// result's "[Permission denied] " prefix, keyed on the
|
|
1036
|
-
// "denied" tag (the
|
|
1037
|
-
// declares, the prefix confirms). The ToolCell renders the
|
|
995
|
+
// "denied" tag (the tag declares, the prefix confirms). The ToolCell renders the
|
|
1038
996
|
// pinned row (full name, target, reason, no timing).
|
|
1039
997
|
let reason = null;
|
|
1040
998
|
if ((ev.tags ?? []).includes("denied")) {
|
|
@@ -1043,14 +1001,6 @@ submitTurn) {
|
|
|
1043
1001
|
reason = m[1];
|
|
1044
1002
|
}
|
|
1045
1003
|
body.toolResult(ev.callId, { content: text, isError: ev.isError, reason });
|
|
1046
|
-
// round 6 (the task round): a result tagged do-not-compact whose content
|
|
1047
|
-
// follows the checklist shape also renders as the durable
|
|
1048
|
-
// checklist cell (the CLI translates Event → the tui's own
|
|
1049
|
-
// shape; a non-matching parse falls back to the ordinary
|
|
1050
|
-
// result cell — never hide information).
|
|
1051
|
-
const checklist = parseChecklist(ev.tags, text);
|
|
1052
|
-
if (checklist !== null)
|
|
1053
|
-
body.checklist(checklist.header, checklist.items);
|
|
1054
1004
|
break;
|
|
1055
1005
|
}
|
|
1056
1006
|
case "text_delta":
|
|
@@ -1202,19 +1152,6 @@ submitTurn) {
|
|
|
1202
1152
|
// events (zero tokens). The dock's status bar still paints.
|
|
1203
1153
|
statusCb?.(turnUsage() ?? UNKNOWN_USAGE, displayCtxRatio(session));
|
|
1204
1154
|
const ratio = displayCtxRatio(session);
|
|
1205
|
-
// TV-1B: the settle verdict — the checklist stops lying. When
|
|
1206
|
-
// every item is CLAIMED done, the settled block's tail says
|
|
1207
|
-
// what the projection actually proves ("no passing check yet"
|
|
1208
|
-
// covers never-ran AND ran-and-failed; "may have changed"
|
|
1209
|
-
// claims trajectory knowledge, never filesystem knowledge).
|
|
1210
|
-
// A run that emitted no task_set still gets the block: the
|
|
1211
|
-
// claims live in the durable log, and the settle SYNTHESIZES
|
|
1212
|
-
// the display from session.assessTasks() — a UI projection,
|
|
1213
|
-
// never a new durable fact.
|
|
1214
|
-
const tv = session.assessTasks();
|
|
1215
|
-
if (tv.claims.length > 0 && tv.allClaimedDone) {
|
|
1216
|
-
body.checklist(taskVerdictWords(tv.evidence.kind), tv.claims.map((c) => ({ text: c.text, status: c.status })));
|
|
1217
|
-
}
|
|
1218
1155
|
// W14: the turn record closes HERE — before the recap logs, so
|
|
1219
1156
|
// the commit loop folds the quiet turn's held cells first (the
|
|
1220
1157
|
// fold line lands above the recap, natural cell order).
|
|
@@ -1328,13 +1265,11 @@ export async function chat(session, faux, input, autoCompact, nav, seed) {
|
|
|
1328
1265
|
console.log("\n[exit requested]");
|
|
1329
1266
|
input.close();
|
|
1330
1267
|
};
|
|
1331
|
-
const turn = (text,
|
|
1268
|
+
const turn = (text, via) => new Promise((resolve, reject) => {
|
|
1332
1269
|
queued = Math.max(0, queued - 1); // a queued turn starts
|
|
1333
1270
|
// REL-0152-D11: a turn that names an image file carries it. The
|
|
1334
1271
|
// scan returns the STRING unchanged when it finds nothing, so a
|
|
1335
1272
|
// turn without one is byte-identical to before the feature.
|
|
1336
|
-
// Seeded turns are the product's own words and are never
|
|
1337
|
-
// scanned — nothing it writes to itself is an attachment.
|
|
1338
1273
|
// REL-0152-D16: the capsules' files come from the editor, which
|
|
1339
1274
|
// is the only thing that knows which number stands for which
|
|
1340
1275
|
// screenshot.
|
|
@@ -1342,8 +1277,8 @@ export async function chat(session, faux, input, autoCompact, nav, seed) {
|
|
|
1342
1277
|
// 0.40.0: a skill turn is not scanned either — its text is a
|
|
1343
1278
|
// SKILL.md body, and a body that mentions `diagram.png` must not
|
|
1344
1279
|
// attach a file from the workspace the person never pointed at.
|
|
1345
|
-
const content =
|
|
1346
|
-
const run =
|
|
1280
|
+
const content = via !== undefined ? text : attachImages(text, input.attachments?.(), protectedFiles());
|
|
1281
|
+
const run = via !== undefined ? session.run(content, { via }) : session.run(content);
|
|
1347
1282
|
currentRun = run;
|
|
1348
1283
|
turnNo += 1;
|
|
1349
1284
|
const myTurn = turnNo;
|
|
@@ -1381,41 +1316,6 @@ export async function chat(session, faux, input, autoCompact, nav, seed) {
|
|
|
1381
1316
|
// exit, so the release always runs.
|
|
1382
1317
|
if (eotSeen)
|
|
1383
1318
|
exitAtEmptyPrompt();
|
|
1384
|
-
// TV-1B — the thin task driver. A VERIFICATION turn settling
|
|
1385
|
-
// consumes the task-set identity it produced (a verifier's
|
|
1386
|
-
// own task_set belongs to the SAME accepted offer) and never
|
|
1387
|
-
// opens another offer. A normal COMPLETED settle may offer —
|
|
1388
|
-
// gated so the suggestion always yields to human intent.
|
|
1389
|
-
if (seedSource === "system") {
|
|
1390
|
-
const after = session.assessTasks();
|
|
1391
|
-
if (after.lastTaskSetSeq !== null)
|
|
1392
|
-
offeredTaskSeqs.add(after.lastTaskSetSeq);
|
|
1393
|
-
}
|
|
1394
|
-
else if (last?.type === "terminal" &&
|
|
1395
|
-
last.outcome.kind === "completed" &&
|
|
1396
|
-
process.stdin.isTTY &&
|
|
1397
|
-
!cancelled &&
|
|
1398
|
-
!eotSeen &&
|
|
1399
|
-
pendingAsk === null &&
|
|
1400
|
-
pendingTurns.length === 0 &&
|
|
1401
|
-
input.line() === "") {
|
|
1402
|
-
const tv = session.assessTasks();
|
|
1403
|
-
if (tv.claims.length > 0 &&
|
|
1404
|
-
tv.allClaimedDone &&
|
|
1405
|
-
(tv.evidence.kind === "none" || tv.evidence.kind === "stale") &&
|
|
1406
|
-
tv.lastTaskSetSeq !== null &&
|
|
1407
|
-
!offeredTaskSeqs.has(tv.lastTaskSetSeq)) {
|
|
1408
|
-
const verdict = await askPanel(input, verifyOfferView());
|
|
1409
|
-
// an explicit answer — Yes, Not now, OR Esc — consumes
|
|
1410
|
-
// the offer for THIS claims-set; only gate-suppression
|
|
1411
|
-
// (above) leaves it live for a later settle.
|
|
1412
|
-
offeredTaskSeqs.add(tv.lastTaskSetSeq);
|
|
1413
|
-
if (verdict.action === "allow") {
|
|
1414
|
-
queued += 1; // turn() decrements — keep the ledger honest
|
|
1415
|
-
chainRef.current = chainRef.current.then(() => turn(VERIFY_SEED, "system"));
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
}
|
|
1419
1319
|
// round 8: after EVERY turn the prompt is re-armed — the human
|
|
1420
1320
|
// never types blind after the first turn.
|
|
1421
1321
|
input.prompt();
|
|
@@ -1542,14 +1442,6 @@ export async function chat(session, faux, input, autoCompact, nav, seed) {
|
|
|
1542
1442
|
// the editor — for a skill, the line the person TYPED; `content` is
|
|
1543
1443
|
// what the turn submits (the skill's body and args).
|
|
1544
1444
|
const pendingTurns = [];
|
|
1545
|
-
// TV-1B — the offer memory: session-local BY DESIGN (a dead process's
|
|
1546
|
-
// "not now" should not silence a live one; resume re-offers once,
|
|
1547
|
-
// honestly), keyed by the assessed claims' identity.
|
|
1548
|
-
const offeredTaskSeqs = new Set();
|
|
1549
|
-
// The fixed verification seed — durable with source:"system": WHO asked
|
|
1550
|
-
// is provenance in the log; on the provider wire it stays an ordinary
|
|
1551
|
-
// user-role message (never a system-prompt escalation).
|
|
1552
|
-
const VERIFY_SEED = "Verify the completed work: run the project's checks and report what passes and what fails.";
|
|
1553
1445
|
// v2b: the live status bar (docked only). Modes: /mode switches repaint
|
|
1554
1446
|
// it immediately through paintStatus (the last turn stats are kept).
|
|
1555
1447
|
// v3 §03: the status bar has TWO states. Idle: the mode is ALWAYS
|
|
@@ -1674,7 +1566,7 @@ export async function chat(session, faux, input, autoCompact, nav, seed) {
|
|
|
1674
1566
|
if (session.uncertainExecutions().length > 0)
|
|
1675
1567
|
await resolveUncertains(session, input, () => cancelled);
|
|
1676
1568
|
if (session.uncertainExecutions().length === 0)
|
|
1677
|
-
return turn(line,
|
|
1569
|
+
return turn(line, via);
|
|
1678
1570
|
// The human declined (round 10: a cancelled ask records NOTHING —
|
|
1679
1571
|
// the execution stays uncertain and durable), so the turn does not
|
|
1680
1572
|
// start. It is never swallowed in silence: the held text is
|
package/dist/index.js
CHANGED
|
@@ -477,7 +477,8 @@ function makeLineInput() {
|
|
|
477
477
|
* the user-level names, then the project-level ones marked `project:`.
|
|
478
478
|
* The built-in column is the banner's truthful face of the built-in layer:
|
|
479
479
|
* a fresh install reads `[3 extensions: built-in: mcp, skills, subagent]`
|
|
480
|
-
* with zero disk setup (
|
|
480
|
+
* with zero disk setup (the task extension, opt-in from E5, was
|
|
481
|
+
* retired in 0.44.0). */
|
|
481
482
|
function bannerExtensionText() {
|
|
482
483
|
// KC3.5 slice ⓪ (the extraction): the composition moved to the
|
|
483
484
|
// terminal layer (extensionsBannerText — a pure function of the three
|
package/dist/state.d.ts
CHANGED
|
@@ -318,8 +318,8 @@ export declare function setNeverInherited(value: (call: import("@vincemakes/kiso
|
|
|
318
318
|
export declare let loadedExtensions: readonly KisoExtension[];
|
|
319
319
|
/** R-D 0.1.45: the BUILT-IN layer — the three default official extensions,
|
|
320
320
|
* shipped with the cli (module imports, never a disk scan; builtin.ts).
|
|
321
|
-
*
|
|
322
|
-
* column; a user extension may shadow a built-in. */
|
|
321
|
+
* The task extension, opt-in from E5, was retired in 0.44.0. The
|
|
322
|
+
* banner's marked column; a user extension may shadow a built-in. */
|
|
323
323
|
export declare let builtInExtensions: readonly KisoExtension[];
|
|
324
324
|
/** E1: the USER-level extensions alone — the banner's unmarked part (E3:
|
|
325
325
|
* loadedExtensions later includes the project-level ones too). */
|
package/dist/state.js
CHANGED
|
@@ -420,8 +420,8 @@ export function setNeverInherited(value) {
|
|
|
420
420
|
export let loadedExtensions = [];
|
|
421
421
|
/** R-D 0.1.45: the BUILT-IN layer — the three default official extensions,
|
|
422
422
|
* shipped with the cli (module imports, never a disk scan; builtin.ts).
|
|
423
|
-
*
|
|
424
|
-
* column; a user extension may shadow a built-in. */
|
|
423
|
+
* The task extension, opt-in from E5, was retired in 0.44.0. The
|
|
424
|
+
* banner's marked column; a user extension may shadow a built-in. */
|
|
425
425
|
export let builtInExtensions = [];
|
|
426
426
|
/** E1: the USER-level extensions alone — the banner's unmarked part (E3:
|
|
427
427
|
* loadedExtensions later includes the project-level ones too). */
|
package/dist/trust-ui.js
CHANGED
|
@@ -87,8 +87,8 @@ opts) {
|
|
|
87
87
|
// line typed at it was discarded anyway.
|
|
88
88
|
//
|
|
89
89
|
// The y/n fallback below still serves the views that really
|
|
90
|
-
// do take a yes or no — the uncertainty gate
|
|
91
|
-
// prompt
|
|
90
|
+
// do take a yes or no — the uncertainty gate and the trust
|
|
91
|
+
// prompt. Those have a dock-less form.
|
|
92
92
|
settled = true;
|
|
93
93
|
pendingAsk = null;
|
|
94
94
|
bodyLog(view.fallbackQuestion);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.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,20 +18,19 @@
|
|
|
18
18
|
"test": "vitest run"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@vincemakes/kiso-ask-ext": "0.
|
|
22
|
-
"@vincemakes/kiso-core": "0.
|
|
23
|
-
"@vincemakes/kiso-evals": "0.
|
|
24
|
-
"@vincemakes/kiso-mcp-ext": "0.
|
|
25
|
-
"@vincemakes/kiso-provider-anthropic": "0.
|
|
26
|
-
"@vincemakes/kiso-provider-openai": "0.
|
|
27
|
-
"@vincemakes/kiso-provider-openai-responses": "0.
|
|
28
|
-
"@vincemakes/kiso-runtime": "0.
|
|
29
|
-
"@vincemakes/kiso-skills-ext": "0.
|
|
30
|
-
"@vincemakes/kiso-subagent-ext": "0.
|
|
31
|
-
"@vincemakes/kiso-
|
|
32
|
-
"@vincemakes/kiso-
|
|
33
|
-
"@vincemakes/kiso-tui": "0.
|
|
34
|
-
"@vincemakes/kiso-tui-cells": "0.43.0"
|
|
21
|
+
"@vincemakes/kiso-ask-ext": "0.44.0",
|
|
22
|
+
"@vincemakes/kiso-core": "0.44.0",
|
|
23
|
+
"@vincemakes/kiso-evals": "0.44.0",
|
|
24
|
+
"@vincemakes/kiso-mcp-ext": "0.44.0",
|
|
25
|
+
"@vincemakes/kiso-provider-anthropic": "0.44.0",
|
|
26
|
+
"@vincemakes/kiso-provider-openai": "0.44.0",
|
|
27
|
+
"@vincemakes/kiso-provider-openai-responses": "0.44.0",
|
|
28
|
+
"@vincemakes/kiso-runtime": "0.44.0",
|
|
29
|
+
"@vincemakes/kiso-skills-ext": "0.44.0",
|
|
30
|
+
"@vincemakes/kiso-subagent-ext": "0.44.0",
|
|
31
|
+
"@vincemakes/kiso-tools-node": "0.44.0",
|
|
32
|
+
"@vincemakes/kiso-tui": "0.44.0",
|
|
33
|
+
"@vincemakes/kiso-tui-cells": "0.44.0"
|
|
35
34
|
},
|
|
36
35
|
"devDependencies": {
|
|
37
36
|
"@types/node": "^26.1.2",
|