@aikdna/kdna-core 0.37.0 → 0.37.2
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/README.md +28 -7
- package/package.json +11 -1
- package/src/public-contract/browser-native/generated-contract.json +3 -3
- package/src/public-contract/browser-native/sections/contract.json +2 -2
- package/src/public-contract/browser-native/whole.js +30 -1
- package/src/public-contract/browser-protected/request.js +77 -0
- package/src/public-contract/browser-protected/state.js +200 -0
- package/src/public-contract/browserwhole06/contract.json +2 -2
- package/src/public-contract/creation06/contract.json +2 -2
- package/src/public-contract/creation06/generation-manifest.json +8 -8
- package/src/public-contract/execution06/contract.json +2 -2
- package/src/public-contract/execution06/generation-manifest.json +8 -8
- package/src/public-contract/generated-contract.json +3 -3
- package/src/public-contract/issuer-contract.generated.json +6 -6
- package/src/public-contract/issuer-validators.generated.js +7 -7
- package/src/public-contract/key-grant-issuer-node.d.ts +1 -1
- package/src/public-contract/package-set-contract.generated.json +5 -5
- package/src/public-contract/package-set-node.d.ts +1 -1
- package/src/public-contract/package-set-validators.generated.js +9 -9
- package/src/public-contract/packageset06/contract.json +2 -2
- package/src/public-contract/packageset06/generation-manifest.json +8 -8
- package/src/public-contract/protected-browser-contract/contract.json +11824 -0
- package/src/public-contract/protected-browser-contract/descriptor.json +5 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedAdmissionResult.json +443 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedAuthorityContext.json +939 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedBinding.json +156 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedCallResult.json +10489 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedDeliveryToken.json +10 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedExpansionHandle.json +320 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedHostContext.json +677 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedHostObservation.json +208 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedReadAuthority.json +10 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedReadResult.json +10795 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedRequest.json +539 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedRequestAdmission.json +1016 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedSignaturePolicy.json +35 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedSnapshotData.json +8451 -0
- package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedTransportCommitResult.json +304 -0
- package/src/public-contract/protected-browser-contract/schemas/TrustedBrowserProtectedHost.json +10 -0
- package/src/public-contract/protected-browser-contract/types.d.ts +389 -0
- package/src/public-contract/protected-browser-contract/validators.cjs +223756 -0
- package/src/public-contract/protected-sections-browser.d.ts +11 -0
- package/src/public-contract/protected-sections-browser.js +22 -0
- package/src/public-contract/protected-sections-browser.mjs +2 -0
- package/src/public-contract/protected-source-contract.generated.json +8 -8
- package/src/public-contract/protected-source-node.d.ts +1 -1
- package/src/public-contract/protection-admission-browser.js +21 -3
- package/src/public-contract/protection-contract.generated.json +9 -9
- package/src/public-contract/protection-envelope-codec.js +16 -12
- package/src/public-contract/protection-node.d.ts +2 -2
- package/src/public-contract/protection-validators.generated.js +5 -5
- package/src/public-contract/public-contract.d.ts +13 -0
- package/src/public-contract/public-contract.js +32 -0
- package/src/public-contract/public-contract.mjs +2 -0
- package/src/public-contract/retained/contract.json +2 -2
- package/src/public-contract/retained/generation-manifest.json +8 -8
- package/src/public-contract/retained-browser06/contract.json +2 -2
- package/src/public-contract/sectionbytes/contract.json +2 -2
- package/src/public-contract/sectionbytes/generation-manifest.json +8 -8
- package/src/public-contract/sections/contract.json +2 -2
- package/src/public-contract/sections/generation-manifest.json +8 -8
- package/src/public-contract/sections-bytes-node.js +31 -0
- package/src/public-contract/sections-node.js +36 -1
- package/src/public-contract/source-validators.generated.js +6 -6
- package/src/public-contract/source06/contract.json +2 -2
package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedAdmissionResult.json
ADDED
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:kdna:candidate:protected-browser:BrowserProtectedAdmissionResult",
|
|
4
|
+
"title": "BrowserProtectedAdmissionResult",
|
|
5
|
+
"description": "Browser protected retained projection contract. Original base tuple and host-supplied-triple provenance; no native authentication claims.",
|
|
6
|
+
"$ref": "#/$defs/BrowserProtectedAdmissionResult",
|
|
7
|
+
"$defs": {
|
|
8
|
+
"AdmittedBrowserProtectedRequest": false,
|
|
9
|
+
"AssetIdentity": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"asset_id": {
|
|
13
|
+
"$ref": "#/$defs/Identifier"
|
|
14
|
+
},
|
|
15
|
+
"asset_version": {
|
|
16
|
+
"$ref": "#/$defs/VersionLabel"
|
|
17
|
+
},
|
|
18
|
+
"judgment_version": {
|
|
19
|
+
"$ref": "#/$defs/VersionLabel"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"required": [
|
|
23
|
+
"asset_id",
|
|
24
|
+
"asset_version",
|
|
25
|
+
"judgment_version"
|
|
26
|
+
],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
},
|
|
29
|
+
"BrowserProtectedAdmissionAccepted": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"properties": {
|
|
32
|
+
"status": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"const": "accepted"
|
|
35
|
+
},
|
|
36
|
+
"request": {
|
|
37
|
+
"$ref": "#/$defs/AdmittedBrowserProtectedRequest"
|
|
38
|
+
},
|
|
39
|
+
"snapshot": {
|
|
40
|
+
"$ref": "#/$defs/BrowserProtectedSnapshot"
|
|
41
|
+
},
|
|
42
|
+
"operation": {
|
|
43
|
+
"$ref": "#/$defs/BrowserProtectedOperation"
|
|
44
|
+
},
|
|
45
|
+
"receipt": {
|
|
46
|
+
"$ref": "#/$defs/BrowserProtectedReceipt"
|
|
47
|
+
},
|
|
48
|
+
"observation": {
|
|
49
|
+
"$ref": "#/$defs/BrowserProtectedObservation"
|
|
50
|
+
},
|
|
51
|
+
"disclosure": {
|
|
52
|
+
"$ref": "#/$defs/BrowserProtectedAdmissionDisclosure"
|
|
53
|
+
},
|
|
54
|
+
"physical_reads": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"const": "none"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"required": [
|
|
60
|
+
"status",
|
|
61
|
+
"request",
|
|
62
|
+
"snapshot",
|
|
63
|
+
"operation",
|
|
64
|
+
"receipt",
|
|
65
|
+
"observation",
|
|
66
|
+
"disclosure",
|
|
67
|
+
"physical_reads"
|
|
68
|
+
],
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
},
|
|
71
|
+
"BrowserProtectedAdmissionDisclosure": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"slot_selection": {
|
|
75
|
+
"type": "object",
|
|
76
|
+
"properties": {
|
|
77
|
+
"slotIndex": {
|
|
78
|
+
"$ref": "#/$defs/UInt"
|
|
79
|
+
},
|
|
80
|
+
"slot": {
|
|
81
|
+
"$ref": "#/$defs/Identifier"
|
|
82
|
+
},
|
|
83
|
+
"kdf_profile": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"enum": [
|
|
86
|
+
"scrypt-sha256",
|
|
87
|
+
"argon2id"
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"slotIndex",
|
|
93
|
+
"slot",
|
|
94
|
+
"kdf_profile"
|
|
95
|
+
],
|
|
96
|
+
"additionalProperties": false
|
|
97
|
+
},
|
|
98
|
+
"observation_not_authority": {
|
|
99
|
+
"type": "boolean",
|
|
100
|
+
"const": true
|
|
101
|
+
},
|
|
102
|
+
"provenance": {
|
|
103
|
+
"type": "string",
|
|
104
|
+
"const": "host_supplied_triple"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": [
|
|
108
|
+
"slot_selection",
|
|
109
|
+
"observation_not_authority",
|
|
110
|
+
"provenance"
|
|
111
|
+
],
|
|
112
|
+
"additionalProperties": false
|
|
113
|
+
},
|
|
114
|
+
"BrowserProtectedAdmissionFailed": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"status": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"const": "protection_failed"
|
|
120
|
+
},
|
|
121
|
+
"diagnostic": {
|
|
122
|
+
"$ref": "#/$defs/BrowserProtectedDiagnostic"
|
|
123
|
+
},
|
|
124
|
+
"checked_at_ms": {
|
|
125
|
+
"type": "null",
|
|
126
|
+
"const": null
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"required": [
|
|
130
|
+
"status",
|
|
131
|
+
"diagnostic",
|
|
132
|
+
"checked_at_ms"
|
|
133
|
+
],
|
|
134
|
+
"additionalProperties": false
|
|
135
|
+
},
|
|
136
|
+
"BrowserProtectedAdmissionResult": {
|
|
137
|
+
"oneOf": [
|
|
138
|
+
{
|
|
139
|
+
"$ref": "#/$defs/BrowserProtectedAdmissionAccepted"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"$ref": "#/$defs/BrowserProtectedAdmissionFailed"
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"BrowserProtectedDiagnostic": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"properties": {
|
|
149
|
+
"code": {
|
|
150
|
+
"$ref": "#/$defs/Identifier"
|
|
151
|
+
},
|
|
152
|
+
"stage": {
|
|
153
|
+
"$ref": "#/$defs/Identifier"
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"required": [
|
|
157
|
+
"code",
|
|
158
|
+
"stage"
|
|
159
|
+
],
|
|
160
|
+
"additionalProperties": false
|
|
161
|
+
},
|
|
162
|
+
"BrowserProtectedIntegrity": {
|
|
163
|
+
"type": "object",
|
|
164
|
+
"properties": {
|
|
165
|
+
"checksums": {
|
|
166
|
+
"type": "string",
|
|
167
|
+
"enum": [
|
|
168
|
+
"absent",
|
|
169
|
+
"verified_document_1"
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
"signature": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"enum": [
|
|
175
|
+
"absent",
|
|
176
|
+
"verified_self_key",
|
|
177
|
+
"verified_pinned_key"
|
|
178
|
+
]
|
|
179
|
+
},
|
|
180
|
+
"signature_content_digest": {
|
|
181
|
+
"anyOf": [
|
|
182
|
+
{
|
|
183
|
+
"$ref": "#/$defs/Digest"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"type": "null",
|
|
187
|
+
"const": null
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
"public_key": {
|
|
192
|
+
"anyOf": [
|
|
193
|
+
{
|
|
194
|
+
"type": "string",
|
|
195
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "null",
|
|
199
|
+
"const": null
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"required": [
|
|
205
|
+
"checksums",
|
|
206
|
+
"signature",
|
|
207
|
+
"signature_content_digest",
|
|
208
|
+
"public_key"
|
|
209
|
+
],
|
|
210
|
+
"additionalProperties": false
|
|
211
|
+
},
|
|
212
|
+
"BrowserProtectedObservation": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"properties": {
|
|
215
|
+
"snapshot_id": {
|
|
216
|
+
"$ref": "#/$defs/Identifier"
|
|
217
|
+
},
|
|
218
|
+
"tuple": {
|
|
219
|
+
"$ref": "#/$defs/VersionTuple"
|
|
220
|
+
},
|
|
221
|
+
"asset": {
|
|
222
|
+
"$ref": "#/$defs/AssetIdentity"
|
|
223
|
+
},
|
|
224
|
+
"A": {
|
|
225
|
+
"$ref": "#/$defs/Digest"
|
|
226
|
+
},
|
|
227
|
+
"C": {
|
|
228
|
+
"$ref": "#/$defs/Digest"
|
|
229
|
+
},
|
|
230
|
+
"E": {
|
|
231
|
+
"$ref": "#/$defs/Digest"
|
|
232
|
+
},
|
|
233
|
+
"ir_digest": {
|
|
234
|
+
"$ref": "#/$defs/Digest"
|
|
235
|
+
},
|
|
236
|
+
"integrity": {
|
|
237
|
+
"$ref": "#/$defs/BrowserProtectedIntegrity"
|
|
238
|
+
},
|
|
239
|
+
"unlock_observation": {
|
|
240
|
+
"$ref": "#/$defs/BrowserProtectedUnlockObservation"
|
|
241
|
+
},
|
|
242
|
+
"disclosure": {
|
|
243
|
+
"$ref": "#/$defs/BrowserProtectedAdmissionDisclosure"
|
|
244
|
+
},
|
|
245
|
+
"physical_reads": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"const": "none"
|
|
248
|
+
},
|
|
249
|
+
"new_decryption": {
|
|
250
|
+
"type": "boolean",
|
|
251
|
+
"const": false
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
"required": [
|
|
255
|
+
"snapshot_id",
|
|
256
|
+
"tuple",
|
|
257
|
+
"asset",
|
|
258
|
+
"A",
|
|
259
|
+
"C",
|
|
260
|
+
"E",
|
|
261
|
+
"ir_digest",
|
|
262
|
+
"integrity",
|
|
263
|
+
"unlock_observation",
|
|
264
|
+
"disclosure",
|
|
265
|
+
"physical_reads",
|
|
266
|
+
"new_decryption"
|
|
267
|
+
],
|
|
268
|
+
"additionalProperties": false
|
|
269
|
+
},
|
|
270
|
+
"BrowserProtectedOperation": false,
|
|
271
|
+
"BrowserProtectedReceipt": {
|
|
272
|
+
"type": "object",
|
|
273
|
+
"properties": {
|
|
274
|
+
"contract": {
|
|
275
|
+
"type": "string",
|
|
276
|
+
"const": "kdna.protected-browser-observation/0.1.0-candidate"
|
|
277
|
+
},
|
|
278
|
+
"operation_id": {
|
|
279
|
+
"$ref": "#/$defs/Identifier"
|
|
280
|
+
},
|
|
281
|
+
"snapshot_id": {
|
|
282
|
+
"$ref": "#/$defs/Identifier"
|
|
283
|
+
},
|
|
284
|
+
"A": {
|
|
285
|
+
"$ref": "#/$defs/Digest"
|
|
286
|
+
},
|
|
287
|
+
"C": {
|
|
288
|
+
"$ref": "#/$defs/Digest"
|
|
289
|
+
},
|
|
290
|
+
"E": {
|
|
291
|
+
"$ref": "#/$defs/Digest"
|
|
292
|
+
},
|
|
293
|
+
"checked_at_ms": {
|
|
294
|
+
"$ref": "#/$defs/UInt"
|
|
295
|
+
},
|
|
296
|
+
"proof": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"const": "observation_not_authority"
|
|
299
|
+
},
|
|
300
|
+
"provenance": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"const": "host_supplied_triple"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"required": [
|
|
306
|
+
"contract",
|
|
307
|
+
"operation_id",
|
|
308
|
+
"snapshot_id",
|
|
309
|
+
"A",
|
|
310
|
+
"C",
|
|
311
|
+
"E",
|
|
312
|
+
"checked_at_ms",
|
|
313
|
+
"proof",
|
|
314
|
+
"provenance"
|
|
315
|
+
],
|
|
316
|
+
"additionalProperties": false
|
|
317
|
+
},
|
|
318
|
+
"BrowserProtectedSnapshot": false,
|
|
319
|
+
"BrowserProtectedUnlockObservation": {
|
|
320
|
+
"type": "object",
|
|
321
|
+
"properties": {
|
|
322
|
+
"kind": {
|
|
323
|
+
"type": "string",
|
|
324
|
+
"const": "consumer_unlock_observation"
|
|
325
|
+
},
|
|
326
|
+
"proof": {
|
|
327
|
+
"type": "string",
|
|
328
|
+
"const": "observation_not_authority"
|
|
329
|
+
},
|
|
330
|
+
"checked_at_ms": {
|
|
331
|
+
"$ref": "#/$defs/UInt"
|
|
332
|
+
},
|
|
333
|
+
"selection": {
|
|
334
|
+
"type": "object",
|
|
335
|
+
"properties": {
|
|
336
|
+
"slotIndex": {
|
|
337
|
+
"$ref": "#/$defs/UInt"
|
|
338
|
+
},
|
|
339
|
+
"slot": {
|
|
340
|
+
"$ref": "#/$defs/Identifier"
|
|
341
|
+
},
|
|
342
|
+
"kdf_profile": {
|
|
343
|
+
"type": "string",
|
|
344
|
+
"enum": [
|
|
345
|
+
"scrypt-sha256",
|
|
346
|
+
"argon2id"
|
|
347
|
+
]
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"required": [
|
|
351
|
+
"slotIndex",
|
|
352
|
+
"slot",
|
|
353
|
+
"kdf_profile"
|
|
354
|
+
],
|
|
355
|
+
"additionalProperties": false
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
"required": [
|
|
359
|
+
"kind",
|
|
360
|
+
"proof",
|
|
361
|
+
"checked_at_ms",
|
|
362
|
+
"selection"
|
|
363
|
+
],
|
|
364
|
+
"additionalProperties": false
|
|
365
|
+
},
|
|
366
|
+
"Digest": {
|
|
367
|
+
"type": "string",
|
|
368
|
+
"pattern": "^sha256:[0-9a-f]{64}$"
|
|
369
|
+
},
|
|
370
|
+
"Identifier": {
|
|
371
|
+
"type": "string",
|
|
372
|
+
"minLength": 1,
|
|
373
|
+
"maxLength": 256,
|
|
374
|
+
"pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\ud800-\\udfff]+$"
|
|
375
|
+
},
|
|
376
|
+
"UInt": {
|
|
377
|
+
"type": "integer",
|
|
378
|
+
"minimum": 0,
|
|
379
|
+
"maximum": 9007199254740991
|
|
380
|
+
},
|
|
381
|
+
"VersionLabel": {
|
|
382
|
+
"$ref": "#/$defs/Identifier"
|
|
383
|
+
},
|
|
384
|
+
"VersionTuple": {
|
|
385
|
+
"type": "object",
|
|
386
|
+
"properties": {
|
|
387
|
+
"container": {
|
|
388
|
+
"const": "0.5.0",
|
|
389
|
+
"type": "string"
|
|
390
|
+
},
|
|
391
|
+
"payload_profile": {
|
|
392
|
+
"const": "kdna.payload.judgment",
|
|
393
|
+
"type": "string"
|
|
394
|
+
},
|
|
395
|
+
"payload_version": {
|
|
396
|
+
"const": "0.5.1",
|
|
397
|
+
"type": "string"
|
|
398
|
+
},
|
|
399
|
+
"core": {
|
|
400
|
+
"const": "kdna.core/0.8.2",
|
|
401
|
+
"type": "string"
|
|
402
|
+
},
|
|
403
|
+
"ir": {
|
|
404
|
+
"const": "kdna.canonical-ir/0.6.1",
|
|
405
|
+
"type": "string"
|
|
406
|
+
},
|
|
407
|
+
"runtime": {
|
|
408
|
+
"const": "kdna.runtime-capsule/0.3.1",
|
|
409
|
+
"type": "string"
|
|
410
|
+
},
|
|
411
|
+
"plan": {
|
|
412
|
+
"const": "kdna.consumption-plan/0.3.1",
|
|
413
|
+
"type": "string"
|
|
414
|
+
},
|
|
415
|
+
"host": {
|
|
416
|
+
"const": "kdna.agent-host/0.3.1",
|
|
417
|
+
"type": "string"
|
|
418
|
+
},
|
|
419
|
+
"trace": {
|
|
420
|
+
"const": "kdna.judgment-trace/0.3.1",
|
|
421
|
+
"type": "string"
|
|
422
|
+
},
|
|
423
|
+
"read": {
|
|
424
|
+
"const": "kdna.read/0.6.4",
|
|
425
|
+
"type": "string"
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
"required": [
|
|
429
|
+
"container",
|
|
430
|
+
"payload_profile",
|
|
431
|
+
"payload_version",
|
|
432
|
+
"core",
|
|
433
|
+
"ir",
|
|
434
|
+
"runtime",
|
|
435
|
+
"plan",
|
|
436
|
+
"host",
|
|
437
|
+
"trace",
|
|
438
|
+
"read"
|
|
439
|
+
],
|
|
440
|
+
"additionalProperties": false
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|