@vincemakes/kiso-runtime 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/trust.d.ts CHANGED
@@ -6,8 +6,10 @@
6
6
  * dies the moment the files change.
7
7
  *
8
8
  * projectArtifacts(cwd) discovers <cwd>/.kiso/{extensions/*.mjs, mcp.json,
9
- * skills/<name>/SKILL.md} — the exact three artifact kinds — and returns a
10
- * manifest (one sha256 per file) plus a BUNDLE digest: sha256 over the
9
+ * skills/<name>/SKILL.md, config.json} — the four artifact kinds (config
10
+ * since 0.1.23, ADR-0045: the project config rides the trust package)
11
+ * and returns a manifest (one sha256 per file) plus a BUNDLE digest:
12
+ * sha256 over the
11
13
  * sorted relative paths and their contents. Any file change changes the
12
14
  * bundle digest, which invalidates every prior trust record.
13
15
  *
@@ -32,7 +34,7 @@ export interface TrustRecord {
32
34
  export interface ProjectArtifact {
33
35
  /** path relative to the .kiso dir, e.g. "extensions/lint-rules.mjs". */
34
36
  readonly path: string;
35
- readonly kind: "extension" | "mcp" | "skill";
37
+ readonly kind: "extension" | "mcp" | "skill" | "config";
36
38
  /** sha256 (hex) of this file's content — the listing shows a short prefix. */
37
39
  readonly digest: string;
38
40
  }
package/dist/trust.js CHANGED
@@ -6,8 +6,10 @@
6
6
  * dies the moment the files change.
7
7
  *
8
8
  * projectArtifacts(cwd) discovers <cwd>/.kiso/{extensions/*.mjs, mcp.json,
9
- * skills/<name>/SKILL.md} — the exact three artifact kinds — and returns a
10
- * manifest (one sha256 per file) plus a BUNDLE digest: sha256 over the
9
+ * skills/<name>/SKILL.md, config.json} — the four artifact kinds (config
10
+ * since 0.1.23, ADR-0045: the project config rides the trust package)
11
+ * and returns a manifest (one sha256 per file) plus a BUNDLE digest:
12
+ * sha256 over the
11
13
  * sorted relative paths and their contents. Any file change changes the
12
14
  * bundle digest, which invalidates every prior trust record.
13
15
  *
@@ -81,6 +83,16 @@ export async function projectArtifacts(cwd) {
81
83
  throw err; // a file named like a dir → ENOTDIR: inert, skip
82
84
  }
83
85
  }
86
+ // 合并轮 B: the project's config.json is an artifact of the trust
87
+ // package — trusting the package trusts its config, and a CHANGED
88
+ // config is a changed digest (the trust decision re-evaluates).
89
+ try {
90
+ entries.push({ path: "config.json", buf: await readFile(join(root, "config.json")) });
91
+ }
92
+ catch (err) {
93
+ if (!isMissing(err))
94
+ throw err;
95
+ }
84
96
  if (entries.length === 0)
85
97
  return null;
86
98
  entries.sort((a, b) => (a.path < b.path ? -1 : a.path > b.path ? 1 : 0));
@@ -105,6 +117,8 @@ function kindOf(path) {
105
117
  return "extension";
106
118
  if (path === "mcp.json")
107
119
  return "mcp";
120
+ if (path === "config.json")
121
+ return "config";
108
122
  return "skill";
109
123
  }
110
124
  async function readdirOrEmpty(dir) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vincemakes/kiso-runtime",
3
- "version": "0.1.20",
4
- "description": "kiso runtime durable multi-turn agent sessions: AgentDefinition, AgentRuntime, AgentSession, Run, append-only JSONL store.",
3
+ "version": "0.1.23",
4
+ "description": "kiso runtime \u2014 durable multi-turn agent sessions: AgentDefinition, AgentRuntime, AgentSession, Run, append-only JSONL store.",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "exports": {
@@ -21,11 +21,11 @@
21
21
  "test": "vitest run"
22
22
  },
23
23
  "dependencies": {
24
- "@vincemakes/kiso-core": "0.1.20"
24
+ "@vincemakes/kiso-core": "0.1.23"
25
25
  },
26
26
  "peerDependencies": {
27
- "@vincemakes/kiso-provider-anthropic": "0.1.20",
28
- "@vincemakes/kiso-provider-openai": "0.1.20"
27
+ "@vincemakes/kiso-provider-anthropic": "0.1.23",
28
+ "@vincemakes/kiso-provider-openai": "0.1.23"
29
29
  },
30
30
  "peerDependenciesMeta": {
31
31
  "@vincemakes/kiso-provider-anthropic": {
@@ -36,7 +36,7 @@
36
36
  }
37
37
  },
38
38
  "devDependencies": {
39
- "@vincemakes/kiso-evals": "0.1.20",
39
+ "@vincemakes/kiso-evals": "0.1.23",
40
40
  "@types/node": "^26.1.2",
41
41
  "typescript": "^5.7.2",
42
42
  "vitest": "^3.0.0"