@vincemakes/kiso-core 0.2.0 → 0.6.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/kernel/project.d.ts +6 -0
- package/dist/kernel/project.js +13 -2
- package/package.json +2 -2
package/dist/kernel/project.d.ts
CHANGED
|
@@ -34,6 +34,12 @@ import type { AssistantBlock, Message, MessageSource } from "../protocol/message
|
|
|
34
34
|
export declare const MICROCOMPACTABLE: Set<string>;
|
|
35
35
|
/** The tag that makes a tool result un-clearable (C area). */
|
|
36
36
|
export declare const DO_NOT_COMPACT = "do-not-compact";
|
|
37
|
+
/** E6 (e) — the summary renders as a USER message with this framing (the
|
|
38
|
+
* boundary honesty): the model reads the compressed history as context,
|
|
39
|
+
* not as a reply it produced. The text rides verbatim after the frame —
|
|
40
|
+
* no transcript path pointer (the workspace jail would refuse a path
|
|
41
|
+
* outside cwd; transcript recall is a separate surface). */
|
|
42
|
+
export declare const SUMMARY_FRAMING = "The previous conversation history has been compressed into the summary below. Recent messages are kept verbatim.";
|
|
37
43
|
/**
|
|
38
44
|
* Rebuild the message array from events. Deterministic and order-sensitive:
|
|
39
45
|
* replaying the same log always produces the same messages — BYTE FOR BYTE
|
package/dist/kernel/project.js
CHANGED
|
@@ -31,6 +31,12 @@
|
|
|
31
31
|
export const MICROCOMPACTABLE = new Set(["read_file", "list_dir", "search_text", "shell"]);
|
|
32
32
|
/** The tag that makes a tool result un-clearable (C area). */
|
|
33
33
|
export const DO_NOT_COMPACT = "do-not-compact";
|
|
34
|
+
/** E6 (e) — the summary renders as a USER message with this framing (the
|
|
35
|
+
* boundary honesty): the model reads the compressed history as context,
|
|
36
|
+
* not as a reply it produced. The text rides verbatim after the frame —
|
|
37
|
+
* no transcript path pointer (the workspace jail would refuse a path
|
|
38
|
+
* outside cwd; transcript recall is a separate surface). */
|
|
39
|
+
export const SUMMARY_FRAMING = "The previous conversation history has been compressed into the summary below. Recent messages are kept verbatim.";
|
|
34
40
|
/**
|
|
35
41
|
* C area: the fixed placeholder for a cleared tool output, derived ONLY from
|
|
36
42
|
* the event stream (deterministic across replay): the tool's name and its
|
|
@@ -234,9 +240,14 @@ export function projectMessages(events) {
|
|
|
234
240
|
ev.seq > summaryRanges[renderedSummaries].to) {
|
|
235
241
|
flushAssistant();
|
|
236
242
|
flushResults(); // the results follow the assistant in reading order
|
|
243
|
+
// E6 (e): the summary is a USER message carrying the framing +
|
|
244
|
+
// the text (the boundary honesty — the model reads the compressed
|
|
245
|
+
// history as context, never as a reply it produced). The kept
|
|
246
|
+
// rounds follow as [user summary][user input]: consecutive user
|
|
247
|
+
// messages, legal across both providers (the fresh2 family).
|
|
237
248
|
out.push({
|
|
238
|
-
role: "
|
|
239
|
-
|
|
249
|
+
role: "user",
|
|
250
|
+
content: `${SUMMARY_FRAMING}\n\n${summaryRanges[renderedSummaries].summary}`,
|
|
240
251
|
});
|
|
241
252
|
renderedSummaries += 1;
|
|
242
253
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "kiso (foundation) core — 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",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"openai"
|
|
34
34
|
],
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@vincemakes/kiso-evals": "0.
|
|
36
|
+
"@vincemakes/kiso-evals": "0.6.0",
|
|
37
37
|
"@types/node": "^26.1.2",
|
|
38
38
|
"typescript": "^5.7.2",
|
|
39
39
|
"vitest": "^3.0.0"
|