assertledger 1.3.1 → 1.5.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.
Files changed (107) hide show
  1. package/README.fr.md +6 -3
  2. package/README.md +6 -3
  3. package/conformance/schema-extensions.json +15 -0
  4. package/dist/build-info.json +1 -1
  5. package/dist/cli.d.ts.map +1 -1
  6. package/dist/cli.js +218 -8
  7. package/dist/cli.js.map +1 -1
  8. package/dist/contracts/index.d.ts +467 -4
  9. package/dist/contracts/index.d.ts.map +1 -1
  10. package/dist/contracts/index.js +256 -3
  11. package/dist/contracts/index.js.map +1 -1
  12. package/dist/contracts/qualification.d.ts +528 -0
  13. package/dist/contracts/qualification.d.ts.map +1 -0
  14. package/dist/contracts/qualification.js +357 -0
  15. package/dist/contracts/qualification.js.map +1 -0
  16. package/dist/core/index.d.ts +9 -0
  17. package/dist/core/index.d.ts.map +1 -1
  18. package/dist/core/index.js +46 -2
  19. package/dist/core/index.js.map +1 -1
  20. package/dist/core/qualification.d.ts +17 -0
  21. package/dist/core/qualification.d.ts.map +1 -0
  22. package/dist/core/qualification.js +571 -0
  23. package/dist/core/qualification.js.map +1 -0
  24. package/dist/diagnostics.d.ts.map +1 -1
  25. package/dist/diagnostics.js +81 -4
  26. package/dist/diagnostics.js.map +1 -1
  27. package/dist/engine/adapters/bun-native.d.ts +35 -0
  28. package/dist/engine/adapters/bun-native.d.ts.map +1 -0
  29. package/dist/engine/adapters/bun-native.js +179 -0
  30. package/dist/engine/adapters/bun-native.js.map +1 -0
  31. package/dist/engine/adapters/bun-test-designated-profile.d.ts +23 -0
  32. package/dist/engine/adapters/bun-test-designated-profile.d.ts.map +1 -0
  33. package/dist/engine/adapters/bun-test-designated-profile.js +24 -0
  34. package/dist/engine/adapters/bun-test-designated-profile.js.map +1 -0
  35. package/dist/engine/container.d.ts +7 -0
  36. package/dist/engine/container.d.ts.map +1 -1
  37. package/dist/engine/container.js +22 -7
  38. package/dist/engine/container.js.map +1 -1
  39. package/dist/engine/git-regression.d.ts.map +1 -1
  40. package/dist/engine/git-regression.js +9 -2
  41. package/dist/engine/git-regression.js.map +1 -1
  42. package/dist/engine/index.d.ts +14 -0
  43. package/dist/engine/index.d.ts.map +1 -1
  44. package/dist/engine/index.js +828 -97
  45. package/dist/engine/index.js.map +1 -1
  46. package/dist/engine/qualification.d.ts +154 -0
  47. package/dist/engine/qualification.d.ts.map +1 -0
  48. package/dist/engine/qualification.js +725 -0
  49. package/dist/engine/qualification.js.map +1 -0
  50. package/dist/engine/test-closure.d.ts +39 -0
  51. package/dist/engine/test-closure.d.ts.map +1 -0
  52. package/dist/engine/test-closure.js +513 -0
  53. package/dist/engine/test-closure.js.map +1 -0
  54. package/dist/engine/witness-import.d.ts +31 -0
  55. package/dist/engine/witness-import.d.ts.map +1 -0
  56. package/dist/engine/witness-import.js +224 -0
  57. package/dist/engine/witness-import.js.map +1 -0
  58. package/dist/index.d.ts +3 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +3 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/mcp/index.d.ts.map +1 -1
  63. package/dist/mcp/index.js +65 -0
  64. package/dist/mcp/index.js.map +1 -1
  65. package/dist/sdk/index.d.ts +292 -3
  66. package/dist/sdk/index.d.ts.map +1 -1
  67. package/dist/sdk/index.js +39 -1
  68. package/dist/sdk/index.js.map +1 -1
  69. package/docs/container-isolation.md +6 -0
  70. package/docs/migration-orchestration-qualification-v1.md +109 -0
  71. package/docs/migration-verification-v4.md +94 -0
  72. package/docs/orchestration-qualification.md +167 -0
  73. package/docs/reference.md +13 -0
  74. package/docs/witness-import.md +67 -0
  75. package/examples/orchestration/README.md +68 -0
  76. package/examples/orchestration/consumer-obligations.json +101 -0
  77. package/examples/orchestration/workspace/bitbucket-pipelines.yml +10 -0
  78. package/examples/orchestration/workspace/command-shape.test.mjs +25 -0
  79. package/examples/orchestration/workspace/commands.mjs +14 -0
  80. package/examples/orchestration/workspace/completion.mjs +39 -0
  81. package/examples/orchestration/workspace/faults.json +1 -0
  82. package/examples/orchestration/workspace/native.test.ts +4 -0
  83. package/examples/orchestration/workspace/package.json +6 -0
  84. package/examples/orchestration/workspace/packages/app/package.json +12 -0
  85. package/examples/orchestration/workspace/packages/app/verdict.txt +1 -0
  86. package/examples/orchestration/workspace/packages/leaf/package.json +9 -0
  87. package/examples/orchestration/workspace/packages/leaf/verdict.txt +1 -0
  88. package/examples/orchestration/workspace/pnpm-lock.yaml +170 -0
  89. package/examples/orchestration/workspace/pnpm-workspace.yaml +2 -0
  90. package/examples/orchestration/workspace/task.mjs +23 -0
  91. package/examples/orchestration/workspace/turbo.json +38 -0
  92. package/examples/orchestration/workspace/wrapper.mjs +45 -0
  93. package/integrations/bun/driver.d.mts +30 -1
  94. package/integrations/bun/driver.mjs +215 -6
  95. package/integrations/bun/preload.mjs +186 -5
  96. package/integrations/bun-native/README.md +86 -0
  97. package/integrations/bun-native/driver.mjs +396 -0
  98. package/integrations/bun-native/preload.mjs +375 -0
  99. package/integrations/skill/SKILL.md +25 -5
  100. package/package.json +1 -1
  101. package/schemas/evidence-manifest.v4.json +995 -0
  102. package/schemas/qualification-execution-request.v1.json +571 -0
  103. package/schemas/qualification-plan.v1.json +528 -0
  104. package/schemas/qualification-receipt.v1.json +821 -0
  105. package/schemas/qualification-replay-result.v1.json +37 -0
  106. package/schemas/verification-request.v4.json +590 -0
  107. package/schemas/witness-import-request.v1.json +231 -0
@@ -0,0 +1,571 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "root": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 4096
9
+ },
10
+ "plan": {
11
+ "type": "object",
12
+ "properties": {
13
+ "schemaVersion": {
14
+ "type": "string",
15
+ "const": "1.0.0"
16
+ },
17
+ "profileId": {
18
+ "type": "string",
19
+ "minLength": 1,
20
+ "maxLength": 128,
21
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
22
+ },
23
+ "subject": {
24
+ "type": "object",
25
+ "properties": {
26
+ "commit": {
27
+ "type": "string",
28
+ "minLength": 1,
29
+ "maxLength": 128
30
+ },
31
+ "baseCommit": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 128
35
+ },
36
+ "candidateDigest": {
37
+ "type": "string",
38
+ "pattern": "^sha256:[a-f0-9]{64}$"
39
+ },
40
+ "inputDigest": {
41
+ "type": "string",
42
+ "pattern": "^sha256:[a-f0-9]{64}$"
43
+ }
44
+ },
45
+ "required": ["commit", "baseCommit", "candidateDigest", "inputDigest"],
46
+ "additionalProperties": false
47
+ },
48
+ "ciTrust": {
49
+ "type": "object",
50
+ "properties": {
51
+ "repositoryId": {
52
+ "type": "string",
53
+ "minLength": 1,
54
+ "maxLength": 512
55
+ },
56
+ "observerId": {
57
+ "type": "string",
58
+ "minLength": 1,
59
+ "maxLength": 128,
60
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
61
+ },
62
+ "publicKeyPem": {
63
+ "type": "string",
64
+ "minLength": 1,
65
+ "maxLength": 8192
66
+ },
67
+ "requiredSteps": {
68
+ "minItems": 1,
69
+ "maxItems": 1000,
70
+ "type": "array",
71
+ "items": {
72
+ "type": "object",
73
+ "properties": {
74
+ "id": {
75
+ "type": "string",
76
+ "minLength": 1,
77
+ "maxLength": 128,
78
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
79
+ },
80
+ "commandDigest": {
81
+ "type": "string",
82
+ "pattern": "^sha256:[a-f0-9]{64}$"
83
+ }
84
+ },
85
+ "required": ["id", "commandDigest"],
86
+ "additionalProperties": false
87
+ }
88
+ }
89
+ },
90
+ "required": ["repositoryId", "observerId", "publicKeyPem", "requiredSteps"],
91
+ "additionalProperties": false
92
+ },
93
+ "tools": {
94
+ "minItems": 1,
95
+ "maxItems": 100,
96
+ "type": "array",
97
+ "items": {
98
+ "type": "object",
99
+ "properties": {
100
+ "id": {
101
+ "type": "string",
102
+ "minLength": 1,
103
+ "maxLength": 128,
104
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
105
+ },
106
+ "version": {
107
+ "type": "string",
108
+ "minLength": 1,
109
+ "maxLength": 128
110
+ },
111
+ "digest": {
112
+ "type": "string",
113
+ "pattern": "^sha256:[a-f0-9]{64}$"
114
+ },
115
+ "identityPath": {
116
+ "type": "string",
117
+ "minLength": 1,
118
+ "maxLength": 4096
119
+ },
120
+ "versionCommand": {
121
+ "type": "object",
122
+ "properties": {
123
+ "executable": {
124
+ "type": "string",
125
+ "minLength": 1,
126
+ "maxLength": 4096
127
+ },
128
+ "arguments": {
129
+ "maxItems": 100,
130
+ "type": "array",
131
+ "items": {
132
+ "type": "string",
133
+ "maxLength": 8192
134
+ }
135
+ }
136
+ },
137
+ "required": ["executable", "arguments"],
138
+ "additionalProperties": false
139
+ }
140
+ },
141
+ "required": ["id", "version", "digest"],
142
+ "additionalProperties": false
143
+ }
144
+ },
145
+ "suites": {
146
+ "maxItems": 1000,
147
+ "type": "array",
148
+ "items": {
149
+ "type": "object",
150
+ "properties": {
151
+ "id": {
152
+ "type": "string",
153
+ "minLength": 1,
154
+ "maxLength": 128,
155
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
156
+ },
157
+ "files": {
158
+ "maxItems": 1000,
159
+ "type": "array",
160
+ "items": {
161
+ "type": "string",
162
+ "minLength": 1,
163
+ "maxLength": 512
164
+ }
165
+ },
166
+ "extraction": {
167
+ "type": "string",
168
+ "enum": ["COMPLETE", "UNAVAILABLE", "OMITTED"]
169
+ }
170
+ },
171
+ "required": ["id", "files", "extraction"],
172
+ "additionalProperties": false
173
+ }
174
+ },
175
+ "obligations": {
176
+ "minItems": 1,
177
+ "maxItems": 1000,
178
+ "type": "array",
179
+ "items": {
180
+ "type": "object",
181
+ "properties": {
182
+ "id": {
183
+ "type": "string",
184
+ "minLength": 1,
185
+ "maxLength": 128,
186
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
187
+ },
188
+ "kind": {
189
+ "type": "string",
190
+ "enum": [
191
+ "tests",
192
+ "selection",
193
+ "cache",
194
+ "propagation",
195
+ "wrapper",
196
+ "ci-config",
197
+ "ci-local",
198
+ "ci-live"
199
+ ]
200
+ },
201
+ "required": {
202
+ "type": "boolean"
203
+ },
204
+ "suiteIds": {
205
+ "maxItems": 1000,
206
+ "type": "array",
207
+ "items": {
208
+ "type": "string",
209
+ "minLength": 1,
210
+ "maxLength": 128,
211
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
212
+ }
213
+ },
214
+ "checks": {
215
+ "minItems": 1,
216
+ "maxItems": 1000,
217
+ "type": "array",
218
+ "items": {
219
+ "type": "object",
220
+ "properties": {
221
+ "id": {
222
+ "type": "string",
223
+ "minLength": 1,
224
+ "maxLength": 128,
225
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
226
+ },
227
+ "actionId": {
228
+ "type": "string",
229
+ "minLength": 1,
230
+ "maxLength": 128,
231
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
232
+ },
233
+ "field": {
234
+ "type": "string",
235
+ "minLength": 1,
236
+ "maxLength": 512
237
+ },
238
+ "expected": {
239
+ "$ref": "#/$defs/__schema0"
240
+ }
241
+ },
242
+ "required": ["id", "actionId", "field", "expected"],
243
+ "additionalProperties": false
244
+ }
245
+ },
246
+ "limits": {
247
+ "maxItems": 100,
248
+ "type": "array",
249
+ "items": {
250
+ "type": "string",
251
+ "minLength": 1,
252
+ "maxLength": 2048
253
+ }
254
+ }
255
+ },
256
+ "required": ["id", "kind", "required", "suiteIds", "checks", "limits"],
257
+ "additionalProperties": false
258
+ }
259
+ },
260
+ "actions": {
261
+ "minItems": 1,
262
+ "maxItems": 1000,
263
+ "type": "array",
264
+ "items": {
265
+ "type": "object",
266
+ "properties": {
267
+ "id": {
268
+ "type": "string",
269
+ "minLength": 1,
270
+ "maxLength": 128,
271
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
272
+ },
273
+ "adapter": {
274
+ "type": "string",
275
+ "enum": ["command", "turbo", "node-test", "bun-native", "ci-config"]
276
+ },
277
+ "executable": {
278
+ "type": "string",
279
+ "minLength": 1,
280
+ "maxLength": 1024
281
+ },
282
+ "arguments": {
283
+ "maxItems": 100,
284
+ "type": "array",
285
+ "items": {
286
+ "type": "string",
287
+ "maxLength": 8192
288
+ }
289
+ },
290
+ "environment": {
291
+ "type": "object",
292
+ "propertyNames": {
293
+ "type": "string",
294
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
295
+ },
296
+ "additionalProperties": {
297
+ "type": "string",
298
+ "maxLength": 8192
299
+ }
300
+ },
301
+ "prepareFiles": {
302
+ "maxItems": 1000,
303
+ "type": "array",
304
+ "items": {
305
+ "type": "object",
306
+ "properties": {
307
+ "path": {
308
+ "type": "string",
309
+ "minLength": 1,
310
+ "maxLength": 512
311
+ },
312
+ "content": {
313
+ "type": "string",
314
+ "maxLength": 1048576
315
+ }
316
+ },
317
+ "required": ["path", "content"],
318
+ "additionalProperties": false
319
+ }
320
+ },
321
+ "removePaths": {
322
+ "maxItems": 1000,
323
+ "type": "array",
324
+ "items": {
325
+ "type": "string",
326
+ "minLength": 1,
327
+ "maxLength": 512
328
+ }
329
+ },
330
+ "observe": {
331
+ "type": "object",
332
+ "properties": {
333
+ "trace": {
334
+ "type": "boolean"
335
+ },
336
+ "outputs": {
337
+ "maxItems": 1000,
338
+ "type": "array",
339
+ "items": {
340
+ "type": "string",
341
+ "minLength": 1,
342
+ "maxLength": 512
343
+ }
344
+ },
345
+ "report": {
346
+ "anyOf": [
347
+ {
348
+ "type": "string",
349
+ "minLength": 1,
350
+ "maxLength": 512
351
+ },
352
+ {
353
+ "type": "null"
354
+ }
355
+ ]
356
+ }
357
+ },
358
+ "required": ["trace", "outputs", "report"],
359
+ "additionalProperties": false
360
+ }
361
+ },
362
+ "required": [
363
+ "id",
364
+ "adapter",
365
+ "executable",
366
+ "arguments",
367
+ "environment",
368
+ "prepareFiles",
369
+ "removePaths",
370
+ "observe"
371
+ ],
372
+ "additionalProperties": false
373
+ }
374
+ },
375
+ "worlds": {
376
+ "minItems": 2,
377
+ "maxItems": 1000,
378
+ "type": "array",
379
+ "items": {
380
+ "type": "object",
381
+ "properties": {
382
+ "id": {
383
+ "type": "string",
384
+ "minLength": 1,
385
+ "maxLength": 128,
386
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
387
+ },
388
+ "kind": {
389
+ "type": "string",
390
+ "enum": ["REFERENCE", "TARGET", "NEUTRAL"]
391
+ },
392
+ "files": {
393
+ "maxItems": 1000,
394
+ "type": "array",
395
+ "items": {
396
+ "type": "object",
397
+ "properties": {
398
+ "path": {
399
+ "type": "string",
400
+ "minLength": 1,
401
+ "maxLength": 512
402
+ },
403
+ "content": {
404
+ "type": "string",
405
+ "maxLength": 1048576
406
+ }
407
+ },
408
+ "required": ["path", "content"],
409
+ "additionalProperties": false
410
+ }
411
+ },
412
+ "discriminants": {
413
+ "maxItems": 1000,
414
+ "type": "array",
415
+ "items": {
416
+ "type": "object",
417
+ "properties": {
418
+ "obligationId": {
419
+ "type": "string",
420
+ "minLength": 1,
421
+ "maxLength": 128,
422
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
423
+ },
424
+ "checkIds": {
425
+ "minItems": 1,
426
+ "maxItems": 1000,
427
+ "type": "array",
428
+ "items": {
429
+ "type": "string",
430
+ "minLength": 1,
431
+ "maxLength": 128,
432
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
433
+ }
434
+ }
435
+ },
436
+ "required": ["obligationId", "checkIds"],
437
+ "additionalProperties": false
438
+ }
439
+ }
440
+ },
441
+ "required": ["id", "kind", "files", "discriminants"],
442
+ "additionalProperties": false
443
+ }
444
+ },
445
+ "requiredAttempts": {
446
+ "type": "integer",
447
+ "minimum": 2,
448
+ "maximum": 10
449
+ },
450
+ "timeoutMs": {
451
+ "type": "integer",
452
+ "minimum": 1,
453
+ "maximum": 600000
454
+ },
455
+ "maximumOutputBytes": {
456
+ "type": "integer",
457
+ "minimum": 1,
458
+ "maximum": 16777216
459
+ },
460
+ "isolation": {
461
+ "type": "object",
462
+ "properties": {
463
+ "kind": {
464
+ "type": "string",
465
+ "const": "trusted-local"
466
+ },
467
+ "acknowledgedUnsafeExecution": {
468
+ "type": "boolean",
469
+ "const": true
470
+ }
471
+ },
472
+ "required": ["kind", "acknowledgedUnsafeExecution"],
473
+ "additionalProperties": false
474
+ },
475
+ "allowedCandidatePaths": {
476
+ "maxItems": 1000,
477
+ "type": "array",
478
+ "items": {
479
+ "type": "string",
480
+ "minLength": 1,
481
+ "maxLength": 512
482
+ }
483
+ }
484
+ },
485
+ "required": [
486
+ "schemaVersion",
487
+ "profileId",
488
+ "subject",
489
+ "tools",
490
+ "suites",
491
+ "obligations",
492
+ "actions",
493
+ "worlds",
494
+ "requiredAttempts",
495
+ "timeoutMs",
496
+ "maximumOutputBytes",
497
+ "isolation",
498
+ "allowedCandidatePaths"
499
+ ],
500
+ "additionalProperties": false
501
+ },
502
+ "planDigest": {
503
+ "type": "string",
504
+ "pattern": "^sha256:[a-f0-9]{64}$"
505
+ },
506
+ "candidate": {
507
+ "type": "object",
508
+ "properties": {
509
+ "files": {
510
+ "maxItems": 1000,
511
+ "type": "array",
512
+ "items": {
513
+ "type": "object",
514
+ "properties": {
515
+ "path": {
516
+ "type": "string",
517
+ "minLength": 1,
518
+ "maxLength": 512
519
+ },
520
+ "content": {
521
+ "type": "string",
522
+ "maxLength": 1048576
523
+ }
524
+ },
525
+ "required": ["path", "content"],
526
+ "additionalProperties": false
527
+ }
528
+ }
529
+ },
530
+ "required": ["files"],
531
+ "additionalProperties": false
532
+ }
533
+ },
534
+ "required": ["root", "plan", "planDigest", "candidate"],
535
+ "additionalProperties": false,
536
+ "$defs": {
537
+ "__schema0": {
538
+ "anyOf": [
539
+ {
540
+ "type": "string"
541
+ },
542
+ {
543
+ "type": "number"
544
+ },
545
+ {
546
+ "type": "boolean"
547
+ },
548
+ {
549
+ "type": "null"
550
+ },
551
+ {
552
+ "type": "array",
553
+ "items": {
554
+ "$ref": "#/$defs/__schema0"
555
+ }
556
+ },
557
+ {
558
+ "type": "object",
559
+ "propertyNames": {
560
+ "type": "string"
561
+ },
562
+ "additionalProperties": {
563
+ "$ref": "#/$defs/__schema0"
564
+ }
565
+ }
566
+ ]
567
+ }
568
+ },
569
+ "$id": "https://testforge.dev/schemas/qualification-execution-request.v1.json",
570
+ "title": "Orchestration qualification execution request v1"
571
+ }