@vincemakes/kiso-runtime 0.15.0 → 0.15.1
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/session.d.ts +1 -0
- package/dist/session.js +7 -2
- package/package.json +5 -5
package/dist/session.d.ts
CHANGED
|
@@ -201,6 +201,7 @@ export declare class AgentSession {
|
|
|
201
201
|
signal?: AbortSignalLike;
|
|
202
202
|
onStart?: (info: CompactInfo) => void;
|
|
203
203
|
drop?: boolean;
|
|
204
|
+
focus?: string;
|
|
204
205
|
}): Promise<SummarizeResult | null>;
|
|
205
206
|
/**
|
|
206
207
|
* E6 — the run-start context policy (candidate A + the crux drop arm).
|
package/dist/session.js
CHANGED
|
@@ -315,7 +315,11 @@ export class AgentSession {
|
|
|
315
315
|
* worth covering yet). Crash semantics: a crash BEFORE the persist is
|
|
316
316
|
* "nothing happened"; after it, a resume projects the compressed view.
|
|
317
317
|
*/
|
|
318
|
-
async summarize(
|
|
318
|
+
async summarize(
|
|
319
|
+
// R3a: `focus` — an optional steer for the summary call ("keep the
|
|
320
|
+
// auth details"). Rides the serialized input as ONE instruction
|
|
321
|
+
// line; absent = byte-identical to the pre-round call.
|
|
322
|
+
options = {}) {
|
|
319
323
|
this.ensureHealthy();
|
|
320
324
|
const keepRounds = options.keepRounds ?? KEEP_RECENT_ROUNDS;
|
|
321
325
|
// W18: the signal is observed at EVERY phase boundary — the cancel
|
|
@@ -336,7 +340,8 @@ export class AgentSession {
|
|
|
336
340
|
// messages still feed the pre-call token estimate and the savings
|
|
337
341
|
// figure (estimate-only, never the model input).
|
|
338
342
|
const covered = projectMessages(events.filter((e) => e.seq > prevPoint && e.seq <= boundary && e.type !== "summarized"));
|
|
339
|
-
const
|
|
343
|
+
const serialized0 = serializeCovered({ events, prevPoint, boundary });
|
|
344
|
+
const serializedInput = options.focus === undefined ? serialized0 : `Focus the summary on: ${options.focus}\n\n${serialized0}`;
|
|
340
345
|
// W18: the indicator's pre-call data — rounds + the token estimate
|
|
341
346
|
// are knowable BEFORE the adapter call; the summary itself is ONE
|
|
342
347
|
// call with no fraction (kiso never invents a percentage here).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-runtime",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.1",
|
|
4
4
|
"description": "kiso runtime — durable multi-turn agent sessions: AgentDefinition, AgentRuntime, AgentSession, Run, append-only JSONL store.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"test": "vitest run"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@vincemakes/kiso-core": "0.15.
|
|
28
|
+
"@vincemakes/kiso-core": "0.15.1"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@vincemakes/kiso-provider-anthropic": "0.15.
|
|
32
|
-
"@vincemakes/kiso-provider-openai": "0.15.
|
|
31
|
+
"@vincemakes/kiso-provider-anthropic": "0.15.1",
|
|
32
|
+
"@vincemakes/kiso-provider-openai": "0.15.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependenciesMeta": {
|
|
35
35
|
"@vincemakes/kiso-provider-anthropic": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@vincemakes/kiso-evals": "0.15.
|
|
43
|
+
"@vincemakes/kiso-evals": "0.15.1",
|
|
44
44
|
"@types/node": "^26.1.2",
|
|
45
45
|
"typescript": "^5.7.2",
|
|
46
46
|
"vitest": "^3.0.0"
|