@vincemakes/kiso-core 0.1.20 → 0.1.23
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/kernel/loop.js +7 -2
- package/package.json +3 -3
package/dist/kernel/loop.js
CHANGED
|
@@ -35,7 +35,7 @@ import { validateArgs } from "../tools/validate.js";
|
|
|
35
35
|
import { NoOpHooks } from "./hooks.js";
|
|
36
36
|
import { resolveModeProfile } from "./mode.js";
|
|
37
37
|
import { denialResult } from "./permission.js";
|
|
38
|
-
import { messagesToEvents, MICROCOMPACTABLE, projectMessages } from "./project.js";
|
|
38
|
+
import { messagesToEvents, MICROCOMPACTABLE, DO_NOT_COMPACT, projectMessages } from "./project.js";
|
|
39
39
|
export const DEFAULT_MAX_TURNS = 10;
|
|
40
40
|
export const DEFAULT_MAX_RETRIES = 2;
|
|
41
41
|
export async function* loop(config) {
|
|
@@ -844,7 +844,12 @@ function microcompactBoundarySeq(events, keepResults) {
|
|
|
844
844
|
if (ev.type !== "tool_result" || ev.seq <= lastCleared)
|
|
845
845
|
continue;
|
|
846
846
|
const name = callName.get(ev.callId);
|
|
847
|
-
|
|
847
|
+
// 手感批 C6 (P4): the do-not-compact tag makes a result UN-CLEARABLE
|
|
848
|
+
// (the projection keeps it) — the count must EXCLUDE it, exactly like
|
|
849
|
+
// the clearing side. A tagged result counted here would steal a keep
|
|
850
|
+
// window slot forever and could anchor the boundary at a result the
|
|
851
|
+
// projection refuses to clear (计数与清除口径一致).
|
|
852
|
+
if (name !== undefined && MICROCOMPACTABLE.has(name) && !(ev.tags ?? []).includes(DO_NOT_COMPACT))
|
|
848
853
|
visible.push(ev.seq);
|
|
849
854
|
}
|
|
850
855
|
if (visible.length <= keepResults)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-core",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "kiso(
|
|
3
|
+
"version": "0.1.23",
|
|
4
|
+
"description": "kiso(\u57fa\u790e) core \u2014 protocol, event log, loop, hooks, modes, permissions, compaction, delivery truth. The 2,000-line kernel at the bottom of the kiso framework.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"exports": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"openai"
|
|
34
34
|
],
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@vincemakes/kiso-evals": "0.1.
|
|
36
|
+
"@vincemakes/kiso-evals": "0.1.23",
|
|
37
37
|
"@types/node": "^26.1.2",
|
|
38
38
|
"typescript": "^5.7.2",
|
|
39
39
|
"vitest": "^3.0.0"
|