@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.
Files changed (65) hide show
  1. package/README.md +28 -7
  2. package/package.json +11 -1
  3. package/src/public-contract/browser-native/generated-contract.json +3 -3
  4. package/src/public-contract/browser-native/sections/contract.json +2 -2
  5. package/src/public-contract/browser-native/whole.js +30 -1
  6. package/src/public-contract/browser-protected/request.js +77 -0
  7. package/src/public-contract/browser-protected/state.js +200 -0
  8. package/src/public-contract/browserwhole06/contract.json +2 -2
  9. package/src/public-contract/creation06/contract.json +2 -2
  10. package/src/public-contract/creation06/generation-manifest.json +8 -8
  11. package/src/public-contract/execution06/contract.json +2 -2
  12. package/src/public-contract/execution06/generation-manifest.json +8 -8
  13. package/src/public-contract/generated-contract.json +3 -3
  14. package/src/public-contract/issuer-contract.generated.json +6 -6
  15. package/src/public-contract/issuer-validators.generated.js +7 -7
  16. package/src/public-contract/key-grant-issuer-node.d.ts +1 -1
  17. package/src/public-contract/package-set-contract.generated.json +5 -5
  18. package/src/public-contract/package-set-node.d.ts +1 -1
  19. package/src/public-contract/package-set-validators.generated.js +9 -9
  20. package/src/public-contract/packageset06/contract.json +2 -2
  21. package/src/public-contract/packageset06/generation-manifest.json +8 -8
  22. package/src/public-contract/protected-browser-contract/contract.json +11824 -0
  23. package/src/public-contract/protected-browser-contract/descriptor.json +5 -0
  24. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedAdmissionResult.json +443 -0
  25. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedAuthorityContext.json +939 -0
  26. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedBinding.json +156 -0
  27. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedCallResult.json +10489 -0
  28. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedDeliveryToken.json +10 -0
  29. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedExpansionHandle.json +320 -0
  30. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedHostContext.json +677 -0
  31. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedHostObservation.json +208 -0
  32. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedReadAuthority.json +10 -0
  33. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedReadResult.json +10795 -0
  34. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedRequest.json +539 -0
  35. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedRequestAdmission.json +1016 -0
  36. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedSignaturePolicy.json +35 -0
  37. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedSnapshotData.json +8451 -0
  38. package/src/public-contract/protected-browser-contract/schemas/BrowserProtectedTransportCommitResult.json +304 -0
  39. package/src/public-contract/protected-browser-contract/schemas/TrustedBrowserProtectedHost.json +10 -0
  40. package/src/public-contract/protected-browser-contract/types.d.ts +389 -0
  41. package/src/public-contract/protected-browser-contract/validators.cjs +223756 -0
  42. package/src/public-contract/protected-sections-browser.d.ts +11 -0
  43. package/src/public-contract/protected-sections-browser.js +22 -0
  44. package/src/public-contract/protected-sections-browser.mjs +2 -0
  45. package/src/public-contract/protected-source-contract.generated.json +8 -8
  46. package/src/public-contract/protected-source-node.d.ts +1 -1
  47. package/src/public-contract/protection-admission-browser.js +21 -3
  48. package/src/public-contract/protection-contract.generated.json +9 -9
  49. package/src/public-contract/protection-envelope-codec.js +16 -12
  50. package/src/public-contract/protection-node.d.ts +2 -2
  51. package/src/public-contract/protection-validators.generated.js +5 -5
  52. package/src/public-contract/public-contract.d.ts +13 -0
  53. package/src/public-contract/public-contract.js +32 -0
  54. package/src/public-contract/public-contract.mjs +2 -0
  55. package/src/public-contract/retained/contract.json +2 -2
  56. package/src/public-contract/retained/generation-manifest.json +8 -8
  57. package/src/public-contract/retained-browser06/contract.json +2 -2
  58. package/src/public-contract/sectionbytes/contract.json +2 -2
  59. package/src/public-contract/sectionbytes/generation-manifest.json +8 -8
  60. package/src/public-contract/sections/contract.json +2 -2
  61. package/src/public-contract/sections/generation-manifest.json +8 -8
  62. package/src/public-contract/sections-bytes-node.js +31 -0
  63. package/src/public-contract/sections-node.js +36 -1
  64. package/src/public-contract/source-validators.generated.js +6 -6
  65. package/src/public-contract/source06/contract.json +2 -2
@@ -0,0 +1,539 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:kdna:candidate:protected-browser:BrowserProtectedRequest",
4
+ "title": "BrowserProtectedRequest",
5
+ "description": "Browser protected retained projection contract. Original base tuple and host-supplied-triple provenance; no native authentication claims.",
6
+ "$ref": "#/$defs/BrowserProtectedRequest",
7
+ "$defs": {
8
+ "AssetIdentity": {
9
+ "type": "object",
10
+ "properties": {
11
+ "asset_id": {
12
+ "$ref": "#/$defs/Identifier"
13
+ },
14
+ "asset_version": {
15
+ "$ref": "#/$defs/VersionLabel"
16
+ },
17
+ "judgment_version": {
18
+ "$ref": "#/$defs/VersionLabel"
19
+ }
20
+ },
21
+ "required": [
22
+ "asset_id",
23
+ "asset_version",
24
+ "judgment_version"
25
+ ],
26
+ "additionalProperties": false
27
+ },
28
+ "BrowserProtectedExpansionHandle": {
29
+ "oneOf": [
30
+ {
31
+ "$ref": "#/$defs/BrowserProtectedWholeHandle"
32
+ },
33
+ {
34
+ "$ref": "#/$defs/BrowserProtectedSetHandle"
35
+ }
36
+ ]
37
+ },
38
+ "BrowserProtectedRequest": {
39
+ "oneOf": [
40
+ {
41
+ "$ref": "#/$defs/BrowserProtectedRequest_whole_asset"
42
+ },
43
+ {
44
+ "$ref": "#/$defs/BrowserProtectedRequest_catalog"
45
+ },
46
+ {
47
+ "$ref": "#/$defs/BrowserProtectedRequest_exact_selection"
48
+ },
49
+ {
50
+ "$ref": "#/$defs/BrowserProtectedRequest_expand"
51
+ }
52
+ ]
53
+ },
54
+ "BrowserProtectedRequest_catalog": {
55
+ "type": "object",
56
+ "properties": {
57
+ "request_id": {
58
+ "$ref": "#/$defs/Identifier"
59
+ },
60
+ "tuple": {
61
+ "$ref": "#/$defs/VersionTuple"
62
+ },
63
+ "budget_bytes": {
64
+ "$ref": "#/$defs/UInt"
65
+ },
66
+ "mode": {
67
+ "const": "catalog",
68
+ "type": "string"
69
+ },
70
+ "selection": {
71
+ "const": null,
72
+ "type": "null"
73
+ },
74
+ "handle": {
75
+ "type": "null",
76
+ "const": null
77
+ }
78
+ },
79
+ "required": [
80
+ "request_id",
81
+ "tuple",
82
+ "budget_bytes",
83
+ "mode",
84
+ "selection",
85
+ "handle"
86
+ ],
87
+ "additionalProperties": false
88
+ },
89
+ "BrowserProtectedRequest_exact_selection": {
90
+ "type": "object",
91
+ "properties": {
92
+ "request_id": {
93
+ "$ref": "#/$defs/Identifier"
94
+ },
95
+ "tuple": {
96
+ "$ref": "#/$defs/VersionTuple"
97
+ },
98
+ "budget_bytes": {
99
+ "$ref": "#/$defs/UInt"
100
+ },
101
+ "mode": {
102
+ "const": "exact_selection",
103
+ "type": "string"
104
+ },
105
+ "selection": {
106
+ "$ref": "#/$defs/BrowserProtectedSelection"
107
+ },
108
+ "handle": {
109
+ "type": "null",
110
+ "const": null
111
+ }
112
+ },
113
+ "required": [
114
+ "request_id",
115
+ "tuple",
116
+ "budget_bytes",
117
+ "mode",
118
+ "selection",
119
+ "handle"
120
+ ],
121
+ "additionalProperties": false
122
+ },
123
+ "BrowserProtectedRequest_expand": {
124
+ "type": "object",
125
+ "properties": {
126
+ "request_id": {
127
+ "$ref": "#/$defs/Identifier"
128
+ },
129
+ "tuple": {
130
+ "$ref": "#/$defs/VersionTuple"
131
+ },
132
+ "budget_bytes": {
133
+ "$ref": "#/$defs/UInt"
134
+ },
135
+ "mode": {
136
+ "type": "string",
137
+ "const": "expand"
138
+ },
139
+ "selection": {
140
+ "anyOf": [
141
+ {
142
+ "$ref": "#/$defs/BrowserProtectedSelection"
143
+ },
144
+ {
145
+ "type": "null",
146
+ "const": null
147
+ }
148
+ ]
149
+ },
150
+ "handle": {
151
+ "$ref": "#/$defs/BrowserProtectedExpansionHandle"
152
+ }
153
+ },
154
+ "required": [
155
+ "request_id",
156
+ "tuple",
157
+ "budget_bytes",
158
+ "mode",
159
+ "selection",
160
+ "handle"
161
+ ],
162
+ "additionalProperties": false
163
+ },
164
+ "BrowserProtectedRequest_whole_asset": {
165
+ "type": "object",
166
+ "properties": {
167
+ "request_id": {
168
+ "$ref": "#/$defs/Identifier"
169
+ },
170
+ "tuple": {
171
+ "$ref": "#/$defs/VersionTuple"
172
+ },
173
+ "budget_bytes": {
174
+ "$ref": "#/$defs/UInt"
175
+ },
176
+ "mode": {
177
+ "const": "whole_asset",
178
+ "type": "string"
179
+ },
180
+ "selection": {
181
+ "const": null,
182
+ "type": "null"
183
+ },
184
+ "handle": {
185
+ "type": "null",
186
+ "const": null
187
+ }
188
+ },
189
+ "required": [
190
+ "request_id",
191
+ "tuple",
192
+ "budget_bytes",
193
+ "mode",
194
+ "selection",
195
+ "handle"
196
+ ],
197
+ "additionalProperties": false
198
+ },
199
+ "BrowserProtectedSelection": {
200
+ "type": "object",
201
+ "properties": {
202
+ "asset_id": {
203
+ "$ref": "#/$defs/Identifier"
204
+ },
205
+ "asset_version": {
206
+ "$ref": "#/$defs/VersionLabel"
207
+ },
208
+ "judgment_ids": {
209
+ "type": "array",
210
+ "items": {
211
+ "$ref": "#/$defs/Identifier"
212
+ },
213
+ "minItems": 1
214
+ }
215
+ },
216
+ "required": [
217
+ "asset_id",
218
+ "asset_version",
219
+ "judgment_ids"
220
+ ],
221
+ "additionalProperties": false
222
+ },
223
+ "BrowserProtectedSetHandle": {
224
+ "type": "object",
225
+ "properties": {
226
+ "handle_id": {
227
+ "$ref": "#/$defs/Identifier"
228
+ },
229
+ "asset_id": {
230
+ "$ref": "#/$defs/Identifier"
231
+ },
232
+ "asset_version": {
233
+ "$ref": "#/$defs/VersionLabel"
234
+ },
235
+ "A": {
236
+ "$ref": "#/$defs/Digest"
237
+ },
238
+ "C": {
239
+ "$ref": "#/$defs/Digest"
240
+ },
241
+ "snapshot_id": {
242
+ "$ref": "#/$defs/Identifier"
243
+ },
244
+ "core_version": {
245
+ "$ref": "#/$defs/Identifier"
246
+ },
247
+ "ir_version": {
248
+ "$ref": "#/$defs/Identifier"
249
+ },
250
+ "read_version": {
251
+ "$ref": "#/$defs/Identifier"
252
+ },
253
+ "target": {
254
+ "$ref": "#/$defs/Ref"
255
+ },
256
+ "scope": {
257
+ "type": "array",
258
+ "items": {
259
+ "$ref": "#/$defs/Identifier"
260
+ },
261
+ "minItems": 1,
262
+ "uniqueItems": true
263
+ },
264
+ "issued_at": {
265
+ "$ref": "#/$defs/UInt"
266
+ },
267
+ "expires_at": {
268
+ "$ref": "#/$defs/UInt"
269
+ },
270
+ "host_id": {
271
+ "$ref": "#/$defs/Identifier"
272
+ },
273
+ "host_epoch": {
274
+ "$ref": "#/$defs/Identifier"
275
+ },
276
+ "anchor": {
277
+ "type": "object",
278
+ "properties": {
279
+ "kind": {
280
+ "type": "string",
281
+ "const": "selection_set"
282
+ },
283
+ "selection": {
284
+ "$ref": "#/$defs/BrowserProtectedSelection"
285
+ }
286
+ },
287
+ "required": [
288
+ "kind",
289
+ "selection"
290
+ ],
291
+ "additionalProperties": false
292
+ },
293
+ "binding_kind": {
294
+ "type": "string",
295
+ "const": "protected_selection_set"
296
+ },
297
+ "operation_id": {
298
+ "$ref": "#/$defs/Identifier"
299
+ },
300
+ "capture_id": {
301
+ "$ref": "#/$defs/Identifier"
302
+ }
303
+ },
304
+ "required": [
305
+ "handle_id",
306
+ "asset_id",
307
+ "asset_version",
308
+ "A",
309
+ "C",
310
+ "snapshot_id",
311
+ "core_version",
312
+ "ir_version",
313
+ "read_version",
314
+ "anchor",
315
+ "target",
316
+ "scope",
317
+ "issued_at",
318
+ "expires_at",
319
+ "host_id",
320
+ "host_epoch",
321
+ "binding_kind",
322
+ "operation_id",
323
+ "capture_id"
324
+ ],
325
+ "additionalProperties": false
326
+ },
327
+ "BrowserProtectedWholeHandle": {
328
+ "type": "object",
329
+ "properties": {
330
+ "handle_id": {
331
+ "$ref": "#/$defs/Identifier"
332
+ },
333
+ "asset_id": {
334
+ "$ref": "#/$defs/Identifier"
335
+ },
336
+ "asset_version": {
337
+ "$ref": "#/$defs/VersionLabel"
338
+ },
339
+ "A": {
340
+ "$ref": "#/$defs/Digest"
341
+ },
342
+ "C": {
343
+ "$ref": "#/$defs/Digest"
344
+ },
345
+ "snapshot_id": {
346
+ "$ref": "#/$defs/Identifier"
347
+ },
348
+ "core_version": {
349
+ "$ref": "#/$defs/Identifier"
350
+ },
351
+ "ir_version": {
352
+ "$ref": "#/$defs/Identifier"
353
+ },
354
+ "read_version": {
355
+ "$ref": "#/$defs/Identifier"
356
+ },
357
+ "target": {
358
+ "$ref": "#/$defs/Ref"
359
+ },
360
+ "scope": {
361
+ "type": "array",
362
+ "items": {
363
+ "$ref": "#/$defs/Identifier"
364
+ },
365
+ "minItems": 1,
366
+ "uniqueItems": true
367
+ },
368
+ "issued_at": {
369
+ "$ref": "#/$defs/UInt"
370
+ },
371
+ "expires_at": {
372
+ "$ref": "#/$defs/UInt"
373
+ },
374
+ "host_id": {
375
+ "$ref": "#/$defs/Identifier"
376
+ },
377
+ "host_epoch": {
378
+ "$ref": "#/$defs/Identifier"
379
+ },
380
+ "anchor": {
381
+ "type": "object",
382
+ "properties": {
383
+ "kind": {
384
+ "type": "string",
385
+ "const": "asset"
386
+ }
387
+ },
388
+ "required": [
389
+ "kind"
390
+ ],
391
+ "additionalProperties": false
392
+ }
393
+ },
394
+ "required": [
395
+ "handle_id",
396
+ "asset_id",
397
+ "asset_version",
398
+ "A",
399
+ "C",
400
+ "snapshot_id",
401
+ "core_version",
402
+ "ir_version",
403
+ "read_version",
404
+ "anchor",
405
+ "target",
406
+ "scope",
407
+ "issued_at",
408
+ "expires_at",
409
+ "host_id",
410
+ "host_epoch"
411
+ ],
412
+ "additionalProperties": false
413
+ },
414
+ "Digest": {
415
+ "type": "string",
416
+ "pattern": "^sha256:[0-9a-f]{64}$"
417
+ },
418
+ "Identifier": {
419
+ "type": "string",
420
+ "minLength": 1,
421
+ "maxLength": 256,
422
+ "pattern": "^[^\\u0000-\\u001f\\u007f-\\u009f\\ud800-\\udfff]+$"
423
+ },
424
+ "Ref": {
425
+ "type": "object",
426
+ "properties": {
427
+ "kind": {
428
+ "type": "string",
429
+ "enum": [
430
+ "asset",
431
+ "judgment",
432
+ "result",
433
+ "contract",
434
+ "condition",
435
+ "component",
436
+ "unit",
437
+ "plan",
438
+ "plan_node",
439
+ "policy",
440
+ "branch_entry",
441
+ "candidate",
442
+ "material",
443
+ "shared_declaration",
444
+ "boundary",
445
+ "exception",
446
+ "misuse",
447
+ "reason",
448
+ "source",
449
+ "source_use",
450
+ "resource",
451
+ "relationship",
452
+ "dependency",
453
+ "example",
454
+ "example_result",
455
+ "revision",
456
+ "actor"
457
+ ]
458
+ },
459
+ "id": {
460
+ "$ref": "#/$defs/Identifier"
461
+ },
462
+ "asset": {
463
+ "$ref": "#/$defs/AssetIdentity"
464
+ }
465
+ },
466
+ "required": [
467
+ "kind",
468
+ "id"
469
+ ],
470
+ "additionalProperties": false
471
+ },
472
+ "UInt": {
473
+ "type": "integer",
474
+ "minimum": 0,
475
+ "maximum": 9007199254740991
476
+ },
477
+ "VersionLabel": {
478
+ "$ref": "#/$defs/Identifier"
479
+ },
480
+ "VersionTuple": {
481
+ "type": "object",
482
+ "properties": {
483
+ "container": {
484
+ "const": "0.5.0",
485
+ "type": "string"
486
+ },
487
+ "payload_profile": {
488
+ "const": "kdna.payload.judgment",
489
+ "type": "string"
490
+ },
491
+ "payload_version": {
492
+ "const": "0.5.1",
493
+ "type": "string"
494
+ },
495
+ "core": {
496
+ "const": "kdna.core/0.8.2",
497
+ "type": "string"
498
+ },
499
+ "ir": {
500
+ "const": "kdna.canonical-ir/0.6.1",
501
+ "type": "string"
502
+ },
503
+ "runtime": {
504
+ "const": "kdna.runtime-capsule/0.3.1",
505
+ "type": "string"
506
+ },
507
+ "plan": {
508
+ "const": "kdna.consumption-plan/0.3.1",
509
+ "type": "string"
510
+ },
511
+ "host": {
512
+ "const": "kdna.agent-host/0.3.1",
513
+ "type": "string"
514
+ },
515
+ "trace": {
516
+ "const": "kdna.judgment-trace/0.3.1",
517
+ "type": "string"
518
+ },
519
+ "read": {
520
+ "const": "kdna.read/0.6.4",
521
+ "type": "string"
522
+ }
523
+ },
524
+ "required": [
525
+ "container",
526
+ "payload_profile",
527
+ "payload_version",
528
+ "core",
529
+ "ir",
530
+ "runtime",
531
+ "plan",
532
+ "host",
533
+ "trace",
534
+ "read"
535
+ ],
536
+ "additionalProperties": false
537
+ }
538
+ }
539
+ }