@vincemakes/kiso-subagent-ext 0.26.1 → 0.26.3
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/kiso-subagent.mjs +16 -3
- package/package.json +2 -2
package/dist/kiso-subagent.mjs
CHANGED
|
@@ -363,14 +363,27 @@ export async function extractChildResult(sessionsDir, childId, diag) {
|
|
|
363
363
|
};
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
+
/** The canonical projection's void scope (core `project.ts`, the R-E 0.1.44
|
|
367
|
+
* sentence): a `model_output_abandoned` marker voids (voidFromSeq, seq] —
|
|
368
|
+
* the abandoned draft's events. A voided text_delta is not the child's
|
|
369
|
+
* answer and a voided tool_call_end never ran; both are skipped here
|
|
370
|
+
* exactly as the kernel skips them when it builds the next request. (The
|
|
371
|
+
* 2026-09-07 review's P2: the old extractor glued a discarded draft onto
|
|
372
|
+
* the final answer and counted its calls — and reported success.) */
|
|
373
|
+
function committed(events) {
|
|
374
|
+
const voids = events.filter((e) => e.type === "model_output_abandoned").map((e) => ({ from: e.voidFromSeq, to: e.seq }));
|
|
375
|
+
return events.filter((e) => !voids.some((r) => e.seq > r.from && e.seq <= r.to));
|
|
376
|
+
}
|
|
377
|
+
|
|
366
378
|
function countToolCalls(events) {
|
|
367
|
-
return events.filter((e) => e.type === "tool_call_end").length;
|
|
379
|
+
return committed(events).filter((e) => e.type === "tool_call_end").length;
|
|
368
380
|
}
|
|
369
381
|
|
|
370
|
-
/** Projection-equivalent: the assistant text since the last flush boundary
|
|
382
|
+
/** Projection-equivalent: the assistant text since the last flush boundary,
|
|
383
|
+
* over the COMMITTED events only. */
|
|
371
384
|
function finalText(events) {
|
|
372
385
|
let text = "";
|
|
373
|
-
for (const e of events) {
|
|
386
|
+
for (const e of committed(events)) {
|
|
374
387
|
if (e.type === "text_delta") text += e.text;
|
|
375
388
|
else if (e.type === "tool_result" || e.type === "user_input") text = "";
|
|
376
389
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-subagent-ext",
|
|
3
|
-
"version": "0.26.
|
|
3
|
+
"version": "0.26.3",
|
|
4
4
|
"description": "kiso official subagent extension — child kiso processes with role policies, kernel untouched",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"test": "vitest run"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@vincemakes/kiso-core": "0.26.
|
|
26
|
+
"@vincemakes/kiso-core": "0.26.3",
|
|
27
27
|
"@types/node": "^26.1.2",
|
|
28
28
|
"typescript": "^5.7.2",
|
|
29
29
|
"vitest": "^3.0.0"
|