@vincemakes/kiso-runtime 0.15.0 → 0.15.2

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 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(options = {}) {
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 serializedInput = serializeCovered({ events, prevPoint, boundary });
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,57 +1,57 @@
1
1
  {
2
- "name": "@vincemakes/kiso-runtime",
3
- "version": "0.15.0",
4
- "description": "kiso runtime durable multi-turn agent sessions: AgentDefinition, AgentRuntime, AgentSession, Run, append-only JSONL store.",
5
- "type": "module",
6
- "license": "MIT",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "default": "./dist/index.js"
11
- },
12
- "./internal": {
13
- "types": "./dist/internal.d.ts",
14
- "default": "./dist/internal.js"
15
- }
16
- },
17
- "files": [
18
- "dist",
19
- "README.md",
20
- "LICENSE"
21
- ],
22
- "scripts": {
23
- "build": "tsc -p tsconfig.build.json",
24
- "typecheck": "tsc -p tsconfig.json",
25
- "test": "vitest run"
26
- },
27
- "dependencies": {
28
- "@vincemakes/kiso-core": "0.15.0"
29
- },
30
- "peerDependencies": {
31
- "@vincemakes/kiso-provider-anthropic": "0.15.0",
32
- "@vincemakes/kiso-provider-openai": "0.15.0"
33
- },
34
- "peerDependenciesMeta": {
35
- "@vincemakes/kiso-provider-anthropic": {
36
- "optional": true
37
- },
38
- "@vincemakes/kiso-provider-openai": {
39
- "optional": true
40
- }
41
- },
42
- "devDependencies": {
43
- "@vincemakes/kiso-evals": "0.15.0",
44
- "@types/node": "^26.1.2",
45
- "typescript": "^5.7.2",
46
- "vitest": "^3.0.0"
47
- },
48
- "repository": {
49
- "type": "git",
50
- "url": "https://github.com/vincemakes/kiso.git",
51
- "directory": "packages/runtime"
52
- },
53
- "bugs": {
54
- "url": "https://github.com/vincemakes/kiso/issues"
55
- },
56
- "homepage": "https://github.com/vincemakes/kiso/tree/main/packages/runtime#readme"
2
+ "name": "@vincemakes/kiso-runtime",
3
+ "version": "0.15.2",
4
+ "description": "kiso runtime \u2014 durable multi-turn agent sessions: AgentDefinition, AgentRuntime, AgentSession, Run, append-only JSONL store.",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./internal": {
13
+ "types": "./dist/internal.d.ts",
14
+ "default": "./dist/internal.js"
15
+ }
16
+ },
17
+ "files": [
18
+ "dist",
19
+ "README.md",
20
+ "LICENSE"
21
+ ],
22
+ "scripts": {
23
+ "build": "tsc -p tsconfig.build.json",
24
+ "typecheck": "tsc -p tsconfig.json",
25
+ "test": "vitest run"
26
+ },
27
+ "dependencies": {
28
+ "@vincemakes/kiso-core": "0.15.2"
29
+ },
30
+ "peerDependencies": {
31
+ "@vincemakes/kiso-provider-anthropic": "0.15.2",
32
+ "@vincemakes/kiso-provider-openai": "0.15.2"
33
+ },
34
+ "peerDependenciesMeta": {
35
+ "@vincemakes/kiso-provider-anthropic": {
36
+ "optional": true
37
+ },
38
+ "@vincemakes/kiso-provider-openai": {
39
+ "optional": true
40
+ }
41
+ },
42
+ "devDependencies": {
43
+ "@vincemakes/kiso-evals": "0.15.2",
44
+ "@types/node": "^26.1.2",
45
+ "typescript": "^5.7.2",
46
+ "vitest": "^3.0.0"
47
+ },
48
+ "repository": {
49
+ "type": "git",
50
+ "url": "https://github.com/vincemakes/kiso.git",
51
+ "directory": "packages/runtime"
52
+ },
53
+ "bugs": {
54
+ "url": "https://github.com/vincemakes/kiso/issues"
55
+ },
56
+ "homepage": "https://github.com/vincemakes/kiso/tree/main/packages/runtime#readme"
57
57
  }