@prismer/runtime 2.0.0 → 2.0.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/CHANGELOG.md CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## v2.0.1 — 2026-05-21 — Skill multi-file manifest protocol (§A.7 Phase 1) + URL asset fetch
6
+
7
+ Coordinated v2.0.1 patch release. `/VERSION` → 2.0.1. Internal preview only;
8
+ open-source npm publish deferred.
9
+
10
+ ### Added — Multi-file Skill Manifest protocol (agentskills.io 合规)
11
+
12
+ `src/daemon/skill-sync.ts` extended for the §A.7 multi-file manifest
13
+ protocol. Existing single-file callers stay functional via dual-write on
14
+ cloud side.
15
+
16
+ - **New wire shape**: cloud `/api/im/skills/installed` now returns
17
+ `skill.contentManifest` (JSON `files[]`) + `skill.contentManifestRevision`
18
+ (merkle). Daemon parses files[], per-file writes to
19
+ `<skillsRoot>/<slug>/<path>`, per-file sha256 verifies, computes merkle,
20
+ acks back to cloud.
21
+ - **`computeMerkle(files)`** export — sha256 of sorted `"path:sha256\n"`
22
+ lines. Same formula the cloud uses, so
23
+ `IMAgentSkill.installedRevision == manifestRevision` after ack.
24
+ - **Hybrid inline/url storage** — files ≤ 100 KB inline as base64;
25
+ > threshold goes to S3 presigned URL (env-overridable via
26
+ `PRISMER_SKILL_INLINE_THRESHOLD_BYTES`).
27
+ - **Path traversal guard** — `isSafeRelativePath` rejects `..`, absolute
28
+ paths, symlink-escaping joins. Double-checked at the writeFile call site.
29
+ - **Legacy single-file fallback** — when cloud row has `contentManifest=null`
30
+ (pre-migration 400), daemon synthesises a single-file manifest
31
+ `[{path:"SKILL.md", sha256: sha256(content)}]` and acks the same merkle
32
+ the cloud computes (cloud side aligned in this release too).
33
+
34
+ ### Added — `AssetCache.getOrFetchUrl()` — public URL fetch with SSRF + size + redirect guards
35
+
36
+ `src/asset-cache.ts` new helper mirrors `getOrFetch` shape but takes a URL.
37
+ Hash computed after download; cache-key = sha256 of body bytes.
38
+
39
+ - **SSRF guard**: DNS-resolves host before each hop, rejects loopback /
40
+ RFC1918 / link-local / cloud-metadata IPv4 + IPv6 ULA/link-local.
41
+ Cross-host redirects re-validate before following.
42
+ - **Manual redirect chain** — max 3 hops; refuses loops.
43
+ - **Hard timeout** — default 15 s, override via env
44
+ `PRISMER_URL_FETCH_TIMEOUT_MS`.
45
+ - **Streaming read with abort-at-limit** — default 5 MiB, override via env
46
+ `PRISMER_URL_FETCH_MAX_BYTES`. Truncated bodies are NOT cached.
47
+ - Non-2xx throws; caller surfaces an `error` observation.
48
+
49
+ ### Tests
50
+
51
+ - 11 new `test/skill-sync-multifile.test.ts` (mocked cloud, real file
52
+ writes to tmpdir, sha256 + merkle verification).
53
+ - Runtime vitest 362/362 PASS.
54
+
5
55
  ## v2.0.0 — 2026-05-19 — `prismer` daemon bin retained + Skill Gate GA
6
56
 
7
57
  Coordinated v2.0.0 GA. `/VERSION` (single source of truth) → 2.0.0 via