@vincemakes/kiso-core 0.1.7 → 0.1.9

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.
@@ -110,6 +110,8 @@ export interface LoopConfig {
110
110
  readonly extension: string;
111
111
  readonly policy: ApprovalPolicy;
112
112
  }[];
113
+ /** P3: the session's id — carried to tools via ToolContext.sessionId. */
114
+ readonly sessionId?: string;
113
115
  }
114
116
  export declare const DEFAULT_MAX_TURNS = 10;
115
117
  export declare const DEFAULT_MAX_RETRIES = 2;
@@ -363,7 +363,7 @@ export async function* loop(config) {
363
363
  }
364
364
  let currentExecutionId;
365
365
  try {
366
- for await (const ev of executeOne(call, registry, hooks, { signal: signal ?? NEVER_ABORT }, log, config.resolveApproval, config.approvalVerdict, signal, config.approvalPolicies)) {
366
+ for await (const ev of executeOne(call, registry, hooks, { signal: signal ?? NEVER_ABORT, ...(config.sessionId !== undefined ? { sessionId: config.sessionId } : {}) }, log, config.resolveApproval, config.approvalVerdict, signal, config.approvalPolicies)) {
367
367
  // 四: the identity of THIS execution comes from the stream —
368
368
  // a historical same-callId execution must never be mistaken
369
369
  // for this call's (the provider callId may repeat across runs).
@@ -59,4 +59,10 @@ export interface KisoExtension {
59
59
  readonly systemPrompt?: {
60
60
  readonly append: string;
61
61
  };
62
+ /**
63
+ * 发现#8 (P1): the extension's shutdown action — the closing of external
64
+ * resources it holds (child processes, connections). The LOADER is
65
+ * responsible for calling it.
66
+ */
67
+ readonly dispose?: () => Promise<void> | void;
62
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-core",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "kiso(基礎) 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.1.7",
36
+ "@vincemakes/kiso-evals": "0.1.9",
37
37
  "@types/node": "^26.1.2",
38
38
  "typescript": "^5.7.2",
39
39
  "vitest": "^3.0.0"