@aikdna/kdna-core 0.18.0 → 0.19.0
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 +128 -94
- package/README.md +109 -215
- package/package.json +7 -2
- package/schema/agent-host-capabilities.schema.json +62 -0
- package/schema/agent-host-receipt.schema.json +371 -0
- package/schema/agent-host-request.schema.json +223 -0
- package/schema/{bundle-profile-v1.schema.json → bundle-profile.schema.json} +9 -5
- package/schema/checksums.schema.json +8 -8
- package/schema/consumption-plan.schema.json +428 -0
- package/schema/digest-evidence.schema.json +115 -26
- package/schema/{kdna-envelope-external-grant-v1.schema.json → external-grant-envelope.schema.json} +17 -4
- package/schema/{kdna-key-grant-v1.schema.json → external-key-grant.schema.json} +39 -7
- package/schema/judgment-trace.schema.json +1251 -0
- package/schema/load-plan.schema.json +5 -3
- package/schema/manifest.schema.json +70 -10
- package/schema/{payload-profile-v1.schema.json → payload-profile.schema.json} +30 -6
- package/schema/{runtime-capsule-2.schema.json → runtime-capsule.schema.json} +7 -31
- package/src/asset-reader.js +8 -2
- package/src/{v1 → container}/index.js +385 -198
- package/src/container/index.mjs +20 -0
- package/src/container-dispatcher.js +6 -6
- package/src/crypto-profile.js +37 -107
- package/src/external-key-grant.js +41 -15
- package/src/index.js +11 -8
- package/src/index.mjs +49 -45
- package/src/loader-compatibility.js +59 -0
- package/src/loader.js +1 -1
- package/src/public-api.js +5 -5
- package/src/remote-runtime.d.ts +13 -0
- package/src/remote-runtime.js +27 -0
- package/src/remote-runtime.mjs +3 -0
- package/src/runtime-api.js +5 -5
- package/src/{capsule-v2.js → runtime-capsule.js} +96 -254
- package/src/{execution-contract-v1.js → runtime-contract.js} +184 -152
- package/src/types.d.ts +200 -277
- package/src/workpack-pure.js +1 -1
- package/schema/agent-host-2-receipt.schema.json +0 -206
- package/schema/agent-host-2-request.schema.json +0 -135
- package/schema/agent-host-capabilities-1.schema.json +0 -40
- package/schema/consumption-plan-1.schema.json +0 -280
- package/schema/judgment-trace-1.schema.json +0 -748
- package/schema/runtime-capsule-1.schema.json +0 -68
- package/src/lint-pure.js +0 -433
- package/src/v1/index.mjs +0 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,70 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## Unreleased
|
|
4
4
|
|
|
5
5
|
### Added
|
|
6
6
|
|
|
7
|
-
- Add
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
- Add the separate `@aikdna/kdna-core/remote-runtime` package subpath for a
|
|
8
|
+
deployer-controlled, single packaged remote asset. It validates and loads one
|
|
9
|
+
immutable byte snapshot into a fixed full JSON Runtime Capsule while the
|
|
10
|
+
package-root consumer loaders continue to return
|
|
11
|
+
`KDNA_AUTH_REMOTE_RUNTIME_REQUIRED`.
|
|
12
|
+
|
|
13
|
+
## 0.19.0 (2026-07-16)
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Enforce `compatibility.min_loader_version` as a strict `x.y.z` loader package
|
|
18
|
+
coordinate across inspect, validate, default verification, LoadPlan, and
|
|
19
|
+
load. Requirements above Core `0.19.0` now fail closed with
|
|
20
|
+
`KDNA_LOADER_VERSION_UNSUPPORTED` before projection; malformed coordinates
|
|
21
|
+
remain schema failures, and arbitrary-size components compare without
|
|
22
|
+
numeric overflow.
|
|
23
|
+
|
|
24
|
+
- Require the manifest encryption profile and compatibility coordinate to
|
|
25
|
+
identify a supported contract, and reject a missing, unknown, or
|
|
26
|
+
envelope-mismatched `profile_version` before decryption.
|
|
27
|
+
- Bind encrypted payloads to a required manifest encryption declaration and
|
|
28
|
+
the sole supported `payload.kdnab` entry instead of accepting a missing or
|
|
29
|
+
unrelated encrypted-entry list.
|
|
30
|
+
- Keep the canonical JudgmentTrace schema's blocked Runtime negotiation codes
|
|
31
|
+
identical to the Runtime implementation, TypeScript declarations, and
|
|
32
|
+
conformance fixtures.
|
|
33
|
+
- Accept only `reasoning.self_check` in judgment payloads and fail closed on
|
|
34
|
+
the deprecated plural field or malformed entries.
|
|
35
|
+
- Preserve each validated self-check string or structured question exactly in
|
|
36
|
+
compact Runtime Capsule projection instead of silently dropping or changing
|
|
37
|
+
its shape.
|
|
38
|
+
- Keep the canonical and packaged payload schemas byte-for-byte identical, and
|
|
39
|
+
regenerate the committed CBOR and authorization conformance fixtures with
|
|
40
|
+
matching checksums and digest evidence.
|
|
41
|
+
|
|
42
|
+
## 0.18.0 (2026-07-15)
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
- Introduce experimental Runtime Capsule and Host-contract candidates. These
|
|
47
|
+
candidates and their one-way adapter were superseded by the sole stable,
|
|
48
|
+
responsibility-named contracts; they are not supported aliases.
|
|
49
|
+
- Add digest-evidence schemas, RFC 8785 JCS delivery hashing, independent
|
|
50
|
+
expected A/C/E comparisons, digest-specific mismatch codes, and committed
|
|
51
|
+
A/C/E/P conformance goldens.
|
|
52
|
+
- Add committed negotiation, Plan/P recomputation, terminal Trace,
|
|
53
|
+
exact-budget, source-directory block, required-null, and cross-document
|
|
54
|
+
tamper vectors for ConsumptionPlan, Agent Host, and JudgmentTrace.
|
|
21
55
|
- Bind Trace elapsed evidence to the correlated Host receipt, make
|
|
22
56
|
unobserved finite limits propagate to an honest `not_observed` overall
|
|
23
57
|
comparison, and record Host-side P mismatch as a correlated pre-execution
|
|
24
58
|
rejection instead of an impossible terminal state.
|
|
25
|
-
- Expose
|
|
26
|
-
|
|
27
|
-
The conformance runner now consumes this single packaged implementation.
|
|
59
|
+
- Expose ConsumptionPlan, Agent Host, budget-evidence, and JudgmentTrace
|
|
60
|
+
builders and validators from CJS, ESM, and TypeScript.
|
|
28
61
|
- Add a dedicated pre-Host budget-blocked Trace builder and validator. They
|
|
29
62
|
preserve projected A/C/E/P, profile, and exact character evidence without
|
|
30
63
|
exposing an over-budget Host request; calls within budget fail closed.
|
|
31
|
-
- Add a bounded
|
|
64
|
+
- Add a bounded runtime-contract JSON parser that rejects duplicate
|
|
32
65
|
decoded keys, invalid UTF-8 and Unicode, BOMs, hostile-key prototype
|
|
33
66
|
mutation, non-finite numbers, and trailing or non-RFC JSON input before
|
|
34
|
-
Host
|
|
67
|
+
Agent Host object validation.
|
|
35
68
|
|
|
36
69
|
### Changed
|
|
37
70
|
|
|
@@ -61,7 +94,7 @@
|
|
|
61
94
|
|
|
62
95
|
### Fixed
|
|
63
96
|
|
|
64
|
-
- Restrict Core publication to canonical `
|
|
97
|
+
- Restrict Core publication to canonical `core/<package-version>` published-release
|
|
65
98
|
events, require the exact version tag to identify the workflow commit, and
|
|
66
99
|
make already-published versions idempotent only when registry `gitHead` and
|
|
67
100
|
artifact integrity and SHA-1 shasum match the current release evidence. Only
|
|
@@ -85,7 +118,7 @@
|
|
|
85
118
|
so package-manager lifecycle behavior cannot introduce network or build-tool
|
|
86
119
|
dependencies into the offline release gate.
|
|
87
120
|
- Require a non-null independently trusted Plan digest throughout the strict
|
|
88
|
-
|
|
121
|
+
ConsumptionPlan / Agent Host chain, snapshot hostile validation contexts without invoking
|
|
89
122
|
accessors, and keep pre-Host budget enforcement unavailable as a public
|
|
90
123
|
bypass option.
|
|
91
124
|
- Require matched Host receipts to correlate sender, Host-recomputed, echoed,
|
|
@@ -95,16 +128,13 @@
|
|
|
95
128
|
- Check internal C/E declarations and canonical/legacy alias agreement before
|
|
96
129
|
independent expected values, so external matches cannot hide conflicting
|
|
97
130
|
asset declarations.
|
|
98
|
-
- Validate
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
checksums are absent, share the same pure E implementation across checksum
|
|
106
|
-
build/verify and both Capsule generations, and reject Capsule 1 builder
|
|
107
|
-
inputs that disagree with their manifest or digest evidence.
|
|
131
|
+
- Validate Runtime Capsule builder inputs and outputs against packaged schemas
|
|
132
|
+
and cross-field success invariants.
|
|
133
|
+
- Fail closed when access metadata is unknown or internally inconsistent.
|
|
134
|
+
- Compute E directly from Runtime manifest and payload bytes when checksums are
|
|
135
|
+
absent, share the same pure E implementation across checksum build and
|
|
136
|
+
verification, and reject builder inputs that disagree with their manifest
|
|
137
|
+
or digest evidence.
|
|
108
138
|
- Sort canonical content-tree and signing entry paths by UTF-8 bytes while
|
|
109
139
|
retaining the existing UTF-16 JSON object-key order. U+E000/U+10000 vectors
|
|
110
140
|
freeze the distinction.
|
|
@@ -118,7 +148,7 @@
|
|
|
118
148
|
now fails explicitly rather than pretending current payloads are old source
|
|
119
149
|
files.
|
|
120
150
|
|
|
121
|
-
##
|
|
151
|
+
## 0.17.0 (2026-07-14)
|
|
122
152
|
|
|
123
153
|
### Added
|
|
124
154
|
|
|
@@ -151,7 +181,7 @@
|
|
|
151
181
|
- Derive web-package readiness expectations from the declared current Core
|
|
152
182
|
version rather than a stale hard-coded release number.
|
|
153
183
|
|
|
154
|
-
##
|
|
184
|
+
## 0.16.0 (2026-07-13)
|
|
155
185
|
|
|
156
186
|
### Added
|
|
157
187
|
|
|
@@ -178,29 +208,30 @@
|
|
|
178
208
|
- Revoked, expired, tampered, digest/version/account/device mismatches fail
|
|
179
209
|
closed before Runtime Capsule projection.
|
|
180
210
|
|
|
181
|
-
##
|
|
211
|
+
## 0.15.12 (2026-07-12)
|
|
182
212
|
|
|
183
213
|
**Single-format refactor + CBOR wire contract + Runtime Capsule.**
|
|
184
214
|
|
|
185
215
|
### Breaking changes
|
|
186
216
|
|
|
187
|
-
-
|
|
188
|
-
|
|
217
|
+
- Remove generation-qualified mimetype constants and source-directory helpers
|
|
218
|
+
from the public API. Use `MIMETYPE`, `isKdnaSourceDir`, and
|
|
219
|
+
`detectContainerFormat`.
|
|
189
220
|
- `detectContainerFormat` returns only `"kdna"` or `null`.
|
|
190
|
-
-
|
|
221
|
+
- Remove the parallel legacy container discriminator. The current contract is
|
|
222
|
+
now represented solely by `format_version`.
|
|
191
223
|
- `payload.encoding` accepts only `"cbor"`. JSON payload bytes are rejected;
|
|
192
224
|
there is no production JSON fallback.
|
|
193
|
-
- Version-qualified public APIs
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
(`type: "kdna.context.capsule"`) instead of raw `{status, content}`.
|
|
225
|
+
- Version-qualified public APIs and the generation-qualified subpath export
|
|
226
|
+
are removed. Use the stable APIs below.
|
|
227
|
+
- `kdna load --as=json` returns a Runtime Capsule instead of raw
|
|
228
|
+
`{status, content}`.
|
|
198
229
|
|
|
199
230
|
### Added
|
|
200
231
|
|
|
201
232
|
- `REQUIRED_DIR_ENTRIES`, `readLayout`, `buildChecksums`, `load`, and
|
|
202
233
|
`loadAsset` are the sole public container/loading APIs.
|
|
203
|
-
- `buildCapsule(loadResult,
|
|
234
|
+
- `buildCapsule(loadResult, pre-cutover, profile, opts)` — wraps load output as
|
|
204
235
|
`kdna.context.capsule` per `specs/runtime-capsule.md`.
|
|
205
236
|
- `parsePayloadEntry` — strict CBOR decoding for `payload.kdnab`.
|
|
206
237
|
|
|
@@ -208,27 +239,27 @@
|
|
|
208
239
|
|
|
209
240
|
- Producer/consumer encoding alignment: `dev-pack.js`, `studio.js` write CBOR;
|
|
210
241
|
validation and loading decode CBOR, including encrypted envelopes.
|
|
211
|
-
- `
|
|
242
|
+
- `loadAssetUnsafe` extends/deps processing occurs before Capsule wrapping (Story 12 fix).
|
|
212
243
|
- All test fixtures converted to CBOR; golden files regenerated.
|
|
213
244
|
|
|
214
|
-
##
|
|
245
|
+
## 0.15.11 (2026-07-03)
|
|
215
246
|
|
|
216
|
-
**Fix**: repair Core
|
|
247
|
+
**Fix**: repair Core container dispatcher module resolution in the
|
|
217
248
|
published package layout.
|
|
218
249
|
|
|
219
250
|
- Corrects internal `src/container-dispatcher.js` imports so the dispatcher can
|
|
220
|
-
load sibling `asset-reader` and
|
|
221
|
-
-
|
|
251
|
+
load sibling `asset-reader` and container modules after npm packaging.
|
|
252
|
+
- Load Runtime schemas through package-relative static imports before falling
|
|
222
253
|
back to disk discovery, so bundled server environments do not look for
|
|
223
254
|
KDNA schemas in the host application directory.
|
|
224
|
-
-
|
|
255
|
+
- Add regression coverage for loading a source asset through the dispatcher
|
|
225
256
|
from the package `src/` layout and for validating from a non-repository cwd.
|
|
226
257
|
- Fix webpack bundler warning: use `eval('require')` for ajv meta-schema import
|
|
227
258
|
so webpack does not try to statically resolve the JSON file at build time.
|
|
228
259
|
|
|
229
260
|
No public API changes.
|
|
230
261
|
|
|
231
|
-
##
|
|
262
|
+
## 0.15.10 (2026-06-30)
|
|
232
263
|
|
|
233
264
|
**API**: export `parseSemver`, `compareSemver`, `satisfies` from public module.
|
|
234
265
|
|
|
@@ -243,9 +274,9 @@ a parallel copy.
|
|
|
243
274
|
|
|
244
275
|
No breaking changes. Purely additive.
|
|
245
276
|
|
|
246
|
-
##
|
|
277
|
+
## 0.15.9 (2026-06-28)
|
|
247
278
|
|
|
248
|
-
Story 12 — Asset inheritance (`extends` field, RFC #148
|
|
279
|
+
Story 12 — Asset inheritance (`extends` field, RFC #148 later pre-cutover.x Phase 3).
|
|
249
280
|
|
|
250
281
|
- **`extends` field in `manifest.schema.json`**: assets may declare
|
|
251
282
|
`extends: "@scope/name@^1.0.0"` (string) or `extends: { name, version }`
|
|
@@ -255,9 +286,9 @@ Story 12 — Asset inheritance (`extends` field, RFC #148 v2.x Phase 3).
|
|
|
255
286
|
and the manifest declares `extends`, `planLoad` resolves the base asset and
|
|
256
287
|
records `extends_chain` in the plan output. Non-blocking — missing base
|
|
257
288
|
emits a WARNING issue, not a blocking error.
|
|
258
|
-
- **`loadAuthorized` passes `extends_chain`** from the plan to `
|
|
289
|
+
- **`loadAuthorized` passes `extends_chain`** from the plan to `loadAssetUnsafe`
|
|
259
290
|
so the inheritance merge is applied at load time.
|
|
260
|
-
- **`
|
|
291
|
+
- **`loadAssetUnsafe` inheritance merge**: when `extendsChain` is non-empty, the
|
|
261
292
|
base asset's content is loaded and merged with the child's content. Merge
|
|
262
293
|
rules: child axioms override parent axioms with the same `id`; parent axioms
|
|
263
294
|
not in child are inherited; same for boundaries (by `scope` text);
|
|
@@ -266,9 +297,9 @@ Story 12 — Asset inheritance (`extends` field, RFC #148 v2.x Phase 3).
|
|
|
266
297
|
to load output when inheritance is applied.
|
|
267
298
|
- Blocks Story 13 (trust levels) per Section 6 sequencing.
|
|
268
299
|
|
|
269
|
-
##
|
|
300
|
+
## 0.15.8 (2026-06-28)
|
|
270
301
|
|
|
271
|
-
Story 11 — RAG namespace isolation (RFC #148
|
|
302
|
+
Story 11 — RAG namespace isolation (RFC #148 later pre-cutover.x Phase 3).
|
|
272
303
|
|
|
273
304
|
- **`rag_namespace`** field added to each entry in `resolved_dependencies`.
|
|
274
305
|
Format: `name@version` (or bare `name` when version is absent). Provides a
|
|
@@ -284,7 +315,7 @@ Story 11 — RAG namespace isolation (RFC #148 v2.x Phase 3).
|
|
|
284
315
|
- No breaking changes to existing single-asset load output or to
|
|
285
316
|
`resolved_dependencies` shape (fields are additive only).
|
|
286
317
|
|
|
287
|
-
##
|
|
318
|
+
## 0.15.7 (2026-06-28)
|
|
288
319
|
|
|
289
320
|
Story 6 — dependencies runtime. Supports semver-matching local/registry dependency resolution and topological sort-based loading order.
|
|
290
321
|
|
|
@@ -292,25 +323,28 @@ Story 6 — dependencies runtime. Supports semver-matching local/registry depend
|
|
|
292
323
|
- **Topological Sorting Resolver**: Added a robust, pure post-order DFS topological sorter with circular cycle, missing dependency, and version range mismatch checks.
|
|
293
324
|
- **Topological Prompt Composition**: Enabled recursive, multi-domain prompt composition and flat topological JSON return inside `loadAuthorized`.
|
|
294
325
|
|
|
295
|
-
##
|
|
326
|
+
## 0.15.6 (2026-06-28)
|
|
296
327
|
|
|
297
|
-
Story 5 — Bundle payload type.
|
|
328
|
+
Story 5 — Bundle payload type. This historical release introduced the bundle
|
|
329
|
+
payload profile while the project was still using removed generation-labelled
|
|
330
|
+
container vocabulary.
|
|
298
331
|
|
|
299
332
|
- **Bundle asset_type support:** added `"bundle"` to `asset_type` enum and `VALID_ASSET_TYPE` check.
|
|
300
|
-
- **
|
|
301
|
-
|
|
333
|
+
- **Schema support:** added the then-current bundle manifest shape. The sole
|
|
334
|
+
current Runtime schema has since replaced it.
|
|
335
|
+
- **Bundle profile support:** added `kdna.payload.bundle` payload profile and validator.
|
|
302
336
|
|
|
303
|
-
##
|
|
337
|
+
## 0.15.5 (2026-06-28)
|
|
304
338
|
|
|
305
339
|
Phase 12 audit follow-up. Closes 3 issues filed against this
|
|
306
340
|
repo (#145, #146, #147).
|
|
307
341
|
|
|
308
342
|
- **#145** The `compilePatterns` output for `misunderstanding`
|
|
309
|
-
cards was already preserved (the
|
|
343
|
+
cards was already preserved (the container round-trip fix in 0.15.4
|
|
310
344
|
carried `failure_risk` / `applies_when` / `does_not_apply_when`).
|
|
311
345
|
The audit confirmed the fix is in place. No code change required;
|
|
312
346
|
this entry documents the verification.
|
|
313
|
-
- **#146**
|
|
347
|
+
- **#146** The Studio CLI payload-card projection now
|
|
314
348
|
infers a `type` for `payload.patterns` entries that omit it,
|
|
315
349
|
by inspecting the field set. Misunderstandings (which have
|
|
316
350
|
`wrong` + `correct`), terms (have `term` + `definition`),
|
|
@@ -328,7 +362,7 @@ repo (#145, #146, #147).
|
|
|
328
362
|
warn producers/verifiers that any new exclusion MUST be added
|
|
329
363
|
to both paths in the same change.
|
|
330
364
|
|
|
331
|
-
##
|
|
365
|
+
## 0.15.4 (2026-06-28)
|
|
332
366
|
|
|
333
367
|
Audit follow-ups (2026-06-28 round-trip verification). This release
|
|
334
368
|
keeps the canonicalisation paths in sync across producers (studio-cli
|
|
@@ -346,18 +380,18 @@ signature generated by one tool is accepted by every other.
|
|
|
346
380
|
for the list of fields the signing payload excludes. Documented
|
|
347
381
|
in `docs/CANONICALIZATION.md`.
|
|
348
382
|
|
|
349
|
-
##
|
|
383
|
+
## 0.15.3 (2026-06-27)
|
|
350
384
|
|
|
351
385
|
- Fix (PC-2, real): `renderPromptItem` now actually ships the
|
|
352
|
-
boundary card branch. The previous
|
|
386
|
+
boundary card branch. The previous 0.15.2 release (ee20c5e)
|
|
353
387
|
bumped package.json and added a CHANGELOG entry but did NOT
|
|
354
|
-
include the source change to `src/
|
|
388
|
+
include the source change to `src/container/index.js`. This release
|
|
355
389
|
re-bundles the fix that landed in 46047fb (PC-1/PC-4 cleanup).
|
|
356
390
|
Verified end-to-end: `kdna-studio card add boundary` with
|
|
357
391
|
non-empty `scope` + `out_of_scope` → `kdna load` now prints
|
|
358
392
|
`in scope: X; out of scope: Y` instead of the UUID `id`.
|
|
359
393
|
|
|
360
|
-
##
|
|
394
|
+
## 0.15.2 (2026-06-27)
|
|
361
395
|
|
|
362
396
|
- Fix (PC-2): `renderPromptItem` now renders boundary cards as
|
|
363
397
|
`in scope: X; out of scope: Y; exceptions: ...` instead of
|
|
@@ -369,27 +403,27 @@ signature generated by one tool is accepted by every other.
|
|
|
369
403
|
matches returns `(unrendered card: <type>)` instead of the
|
|
370
404
|
UUID `id`, so any unrecognized card shape is visible.
|
|
371
405
|
|
|
372
|
-
##
|
|
406
|
+
## 0.15.1 (2026-06-27)
|
|
373
407
|
|
|
374
408
|
- Fix: package.json `files` array now includes `CHANGELOG.md`. The
|
|
375
|
-
|
|
409
|
+
0.15.0 tarball was published without the changelog, leaving
|
|
376
410
|
consumers with no way to read release notes from `npm install`.
|
|
377
411
|
Adding it now is a no-op for code but resolves the docs gap.
|
|
378
412
|
|
|
379
|
-
##
|
|
413
|
+
## 0.15.0 (2026-06-27)
|
|
380
414
|
|
|
381
|
-
- B2: scrypt password profile `kdna
|
|
415
|
+
- B2: scrypt password profile `kdna.encryption.password.scrypt` (ADR-007)
|
|
382
416
|
- encryptProtectedEntryScrypt / decryptProtectedEntryScrypt (zero new deps, Node crypto.scryptSync)
|
|
383
417
|
- AES-256-GCM + AES-256-KW envelope encryption, same CEK model as RFC-0008
|
|
384
418
|
- scrypt N=32768 r=8 p=1, 32B KEK, 16B random salt
|
|
385
419
|
- planLoad inferEntitlementProfile detects scrypt profile
|
|
386
420
|
- decrypt dispatch routes Argon2id vs scrypt by envelope profile field
|
|
387
|
-
- recovery slot deferred to
|
|
421
|
+
- recovery slot deferred to 0.2; 0.1: single password slot
|
|
388
422
|
- B5: conformance:canonical npm script (threshold #8)
|
|
389
423
|
|
|
390
|
-
##
|
|
424
|
+
## 0.14.0 (2026-06-25)
|
|
391
425
|
|
|
392
|
-
- B1: unified container dispatcher (readAsset —
|
|
426
|
+
- B1: unified container dispatcher (readAsset — pre-cutover/later pre-cutover/ dir → CanonicalAssetModel)
|
|
393
427
|
- B4: loadAuthorized decryption orchestration (opts.password, opts.decryptEntry)
|
|
394
428
|
- B4: encrypted payload detection in runValidate (backward compatible)
|
|
395
429
|
- B8: cross-language golden vectors (test-vectors/golden-vectors.js — 8/8)
|
|
@@ -398,14 +432,14 @@ signature generated by one tool is accepted by every other.
|
|
|
398
432
|
- Wave 3a: CQ-T2/T3 symmetric compact rendering, scenario null consistency
|
|
399
433
|
- Add: engines.node >=18.0.0
|
|
400
434
|
|
|
401
|
-
##
|
|
435
|
+
## 0.13.3 (2026-06-22)
|
|
402
436
|
|
|
403
437
|
- Fix: index profile includes max_tokens_hint
|
|
404
438
|
- Fix: compact profile falls back to full_statement for TBD placeholders
|
|
405
439
|
|
|
406
440
|
Packages: `@aikdna/kdna-core`
|
|
407
441
|
|
|
408
|
-
##
|
|
442
|
+
## 0.13.2 (2026-06-21)
|
|
409
443
|
|
|
410
444
|
### Fixed
|
|
411
445
|
|
|
@@ -421,7 +455,7 @@ Packages: `@aikdna/kdna-core`
|
|
|
421
455
|
|
|
422
456
|
---
|
|
423
457
|
|
|
424
|
-
##
|
|
458
|
+
## 0.13.1 (2026-06-21)
|
|
425
459
|
|
|
426
460
|
### Fixed
|
|
427
461
|
|
|
@@ -430,13 +464,13 @@ Packages: `@aikdna/kdna-core`
|
|
|
430
464
|
|
|
431
465
|
### Changed
|
|
432
466
|
|
|
433
|
-
- Public API provenance and profile split clarified: `loadKDNA` / `loadKDNASync` are the stable entry points for runtime consumers. Lower-level `
|
|
467
|
+
- Public API provenance and profile split clarified: `loadKDNA` / `loadKDNASync` are the stable entry points for runtime consumers. Lower-level `generation-qualified layout reader`, `runValidate`, and `planLoad` are exported for advanced tooling but carry no backward-compatibility guarantee.
|
|
434
468
|
- Access enum values normalized everywhere: `public`, `licensed`, `remote`. Legacy aliases (`open` → `public`, `protected` → `licensed`, `runtime` → `remote`) are mapped transparently with an info-level issue in the LoadPlan.
|
|
435
469
|
- `verifyAsset` / `verifyAssetSync`, `verifyDigest` / `verifyDigestSync`, and `verifySignature` / `verifySignatureSync` are now documented as the stable verification API surface.
|
|
436
470
|
|
|
437
471
|
---
|
|
438
472
|
|
|
439
|
-
##
|
|
473
|
+
## 0.13.0 (2026-06-19)
|
|
440
474
|
|
|
441
475
|
### Added
|
|
442
476
|
|
|
@@ -453,15 +487,15 @@ Packages: `@aikdna/kdna-core`
|
|
|
453
487
|
- `input_fingerprint` capturing the source digest, has-password signal, and entitlement status for cache keying
|
|
454
488
|
- `source.kind` and `source.path` indicating whether the input was a source directory or `.kdna` container
|
|
455
489
|
- **`loadAuthorized(inputPath, opts)`** — a higher-level loader that calls `planLoad` first and blocks load when `can_load_now` is false. Throws `KDNA_LOAD_NOT_AUTHORIZED` with the first issue's code. This is the recommended entry point for agent runtimes.
|
|
456
|
-
- **`
|
|
457
|
-
- **KDNA Core
|
|
458
|
-
- **KDNA Core
|
|
490
|
+
- **`loadAsset(inputPath, opts)`** — renders judgment content into agent-ready prompt text. Supports profiles (`index`, `compact`, `scenario`, `full`) and output formats (`json`, `prompt`). The `prompt` format produces a flat text block suitable for agent context windows with proper axiom applicability rendering.
|
|
491
|
+
- **KDNA Core inspect module.** `inspect(inputPath)` returns a content-neutral manifest summary including `asset_id`, `asset_uid`, `kdna_version`, `payload_encrypted`, `profile`, `load_contract_default_profile`, and signature count. Output is always JSON. Banned terms (`trusted`, `recommended`, `high_quality`, `officially_approved`) are enforced by an automatic assertion.
|
|
492
|
+
- **KDNA Core validate module.** `validate(inputPath)` runs four independent gates:
|
|
459
493
|
1. **Format gate:** required entries present (`mimetype`, `kdna.json`, `payload.kdnab`), mimetype content correct, lineage is an object not an array
|
|
460
494
|
2. **Schema gate:** `kdna.json` against `manifest.schema.json` via AJV 2020-12
|
|
461
|
-
3. **Payload gate:** `payload.kdnab` against `payload-profile
|
|
495
|
+
3. **Payload gate:** `payload.kdnab` against `payload-profile.schema.json`
|
|
462
496
|
4. **Checksums gate:** when `checksums.json` is present, computed digests are compared against declared values for `kdna.json`, `payload.kdnab`, and the combined asset digest
|
|
463
|
-
- **KDNA Core
|
|
464
|
-
- **KDNA Core
|
|
497
|
+
- **KDNA Core pack module.** `pack(sourceDir, outputPath)` produces a canonical-order `.kdna` container: fixed DOS epoch timestamps, alphabetical entry order, mimetype first (STORED, method 0). Package bytes are reproducible with one pinned packer toolchain and compressor; DEFLATE output may differ across compressors or zlib versions.
|
|
498
|
+
- **KDNA Core unpack module.** `unpack(inputPath, outputDir)` extracts a `.kdna` container to a directory with path-traversal protection.
|
|
465
499
|
- **Container security hardening.** ZIP reader enforces:
|
|
466
500
|
- Maximum container size (25 MiB), max entries (128), max entry size (5 MiB), max total uncompressed (12 MiB)
|
|
467
501
|
- Max compression ratio (100:1) to prevent zip bombs
|
|
@@ -471,17 +505,17 @@ Packages: `@aikdna/kdna-core`
|
|
|
471
505
|
- Symlink and device/special file rejection
|
|
472
506
|
- **Digest matching verification.** When `checksums.json` includes `manifest_digest`, `payload_digest`, or `asset_digest`, the validate module computes actual SHA-256 hashes and compares them. Mismatch produces a `KDNA_INTEGRITY_DIGEST_FAILED` issue.
|
|
473
507
|
- **Load contract validation.** When the manifest includes a `load_contract` block, it is validated against `load-contract.schema.json`. A missing load contract is not an error — it simply means no specialization.
|
|
474
|
-
- **Dual CJS/ESM exports.** `src/index.js` (CommonJS) and `src/index.mjs` (ES module) with matching `exports` map. The
|
|
508
|
+
- **Dual CJS/ESM exports.** `src/index.js` (CommonJS) and `src/index.mjs` (ES module) with matching `exports` map. The pre-cutover module is also available at `@aikdna/kdna-core/pre-cutover`.
|
|
475
509
|
- **TypeScript declarations.** `src/types.d.ts` exports type definitions for the stable public API surface.
|
|
476
510
|
|
|
477
511
|
### Changed
|
|
478
512
|
|
|
479
|
-
- **
|
|
480
|
-
- `validate` and `planLoad` reject
|
|
513
|
+
- **Pre-cutover is the only active format path.** The later pre-cutover reader (`readDataMapSync`, `readDataMap`) remains in the codebase for migration compatibility but is no longer the default path. All new integrations should use the pre-cutover API: `inspect`, `validate`, `planLoad`, `loadAuthorized`.
|
|
514
|
+
- `validate` and `planLoad` reject later pre-cutover containers (`application/vnd.aikdna.kdna+zip`) with a format error.
|
|
481
515
|
- Access model normalized to the three-tier `public` | `licensed` | `remote` enum. The LoadPlan maps legacy values transparently with an info-level issue.
|
|
482
|
-
- Container format detection (`detectContainerFormat`) reads only the first central-directory entry to determine
|
|
516
|
+
- Container format detection (`detectContainerFormat`) reads only the first central-directory entry to determine pre-cutover vs later pre-cutover, preventing malicious later entries from causing format confusion.
|
|
483
517
|
|
|
484
518
|
### Removed
|
|
485
519
|
|
|
486
|
-
- Legacy
|
|
487
|
-
- `readDataMapSync` / `readDataMap` deprecated for new use. Use `planLoad` + `
|
|
520
|
+
- Legacy pre-cutover compatibility shims removed. later pre-cutover is the only legacy format and is handled through the existing `asset-reader.js` module.
|
|
521
|
+
- `readDataMapSync` / `readDataMap` deprecated for new use. Use `planLoad` + `loadAsset` for runtime loading or `validate` + `inspect` for diagnostics.
|