@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
|
@@ -1,12 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://kdna.ai/specs/
|
|
4
|
-
"title": "KDNA
|
|
3
|
+
"$id": "https://kdna.ai/specs/external-key-grant.schema.json",
|
|
4
|
+
"title": "KDNA Account/Device External Key Grant",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": false,
|
|
7
|
-
"required": [
|
|
7
|
+
"required": [
|
|
8
|
+
"profile",
|
|
9
|
+
"contract_version",
|
|
10
|
+
"grant_id",
|
|
11
|
+
"issuer",
|
|
12
|
+
"signing_key_id",
|
|
13
|
+
"entitlement_id",
|
|
14
|
+
"account_id",
|
|
15
|
+
"device_id",
|
|
16
|
+
"device_public_key",
|
|
17
|
+
"device_signing_public_key",
|
|
18
|
+
"asset",
|
|
19
|
+
"issued_at",
|
|
20
|
+
"refresh_after",
|
|
21
|
+
"offline_grace_until",
|
|
22
|
+
"expires_at",
|
|
23
|
+
"status",
|
|
24
|
+
"status_version",
|
|
25
|
+
"wrap",
|
|
26
|
+
"signature"
|
|
27
|
+
],
|
|
8
28
|
"properties": {
|
|
9
|
-
"profile": { "const": "kdna-key
|
|
29
|
+
"profile": { "const": "kdna.grant.external-key" },
|
|
30
|
+
"contract_version": { "const": "0.1.0" },
|
|
10
31
|
"grant_id": { "$ref": "#/$defs/id" },
|
|
11
32
|
"issuer": { "type": "string", "format": "uri", "maxLength": 256 },
|
|
12
33
|
"signing_key_id": { "$ref": "#/$defs/id" },
|
|
@@ -16,8 +37,18 @@
|
|
|
16
37
|
"device_public_key": { "type": "string", "pattern": "^x25519:[A-Za-z0-9_-]{43}$" },
|
|
17
38
|
"device_signing_public_key": { "type": "string", "pattern": "^ed25519:[A-Za-z0-9_-]{43}$" },
|
|
18
39
|
"asset": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": [
|
|
43
|
+
"asset_id",
|
|
44
|
+
"asset_uid",
|
|
45
|
+
"version",
|
|
46
|
+
"digest",
|
|
47
|
+
"entry_path",
|
|
48
|
+
"ciphertext_digest",
|
|
49
|
+
"key_ref",
|
|
50
|
+
"issuer_key_id"
|
|
51
|
+
],
|
|
21
52
|
"properties": {
|
|
22
53
|
"asset_id": { "type": "string", "minLength": 1, "maxLength": 256 },
|
|
23
54
|
"asset_uid": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
@@ -36,7 +67,8 @@
|
|
|
36
67
|
"status": { "enum": ["active", "revoked", "expired"] },
|
|
37
68
|
"status_version": { "type": "integer", "minimum": 1 },
|
|
38
69
|
"wrap": {
|
|
39
|
-
"type": "object",
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
40
72
|
"required": ["alg", "ephemeral_public_key", "salt", "wrapped_cek"],
|
|
41
73
|
"properties": {
|
|
42
74
|
"alg": { "const": "X25519-HKDF-SHA256+A256KW" },
|