assertledger 1.0.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 (203) hide show
  1. package/CONTRIBUTING.md +31 -0
  2. package/LICENSE +21 -0
  3. package/README.fr.md +236 -0
  4. package/README.md +224 -0
  5. package/SECURITY.md +51 -0
  6. package/benchmarks/agentic-profile/README.md +15 -0
  7. package/benchmarks/agentic-profile/public/README.md +5 -0
  8. package/benchmarks/self-hosted-core/README.md +113 -0
  9. package/benchmarks/self-hosted-core/adapter.mjs +293 -0
  10. package/benchmarks/self-hosted-core/builder.ts +193 -0
  11. package/benchmarks/self-hosted-core/campaign.ts +233 -0
  12. package/benchmarks/self-hosted-core/existing-tests-builder.ts +217 -0
  13. package/benchmarks/self-hosted-core/existing-tests.ts +146 -0
  14. package/benchmarks/self-hosted-core/liveness.test.mjs +8 -0
  15. package/conformance/v1/bundle.json +104 -0
  16. package/conformance/v1/expected/canonical-order-a.json +4 -0
  17. package/conformance/v1/expected/canonical-order-b.json +4 -0
  18. package/conformance/v1/expected/create-benchmark-v1-measured.json +575 -0
  19. package/conformance/v1/expected/create-profile-v1-qualified.json +280 -0
  20. package/conformance/v1/expected/decide-collection-failure-non-kill.json +192 -0
  21. package/conformance/v1/expected/decide-compile-failure-non-kill.json +192 -0
  22. package/conformance/v1/expected/decide-infra-error-non-kill.json +192 -0
  23. package/conformance/v1/expected/decide-no-test-discovered-non-kill.json +192 -0
  24. package/conformance/v1/expected/decide-process-crash-non-kill.json +192 -0
  25. package/conformance/v1/expected/decide-timeout-non-kill.json +192 -0
  26. package/conformance/v1/expected/decide-verified.json +192 -0
  27. package/conformance/v1/expected/replay-benchmark-v1-resealed-summary-forgery.json +12 -0
  28. package/conformance/v1/expected/replay-evidence-raw-tamper.json +6 -0
  29. package/conformance/v1/expected/replay-evidence-resealed-semantic-forgery.json +6 -0
  30. package/conformance/v1/inputs/canonical-order-a.json +8 -0
  31. package/conformance/v1/inputs/canonical-order-b.json +8 -0
  32. package/conformance/v1/inputs/create-benchmark-v1-measured.json +459 -0
  33. package/conformance/v1/inputs/create-profile-v1-qualified.json +228 -0
  34. package/conformance/v1/inputs/decide-collection-failure-non-kill.json +143 -0
  35. package/conformance/v1/inputs/decide-compile-failure-non-kill.json +143 -0
  36. package/conformance/v1/inputs/decide-infra-error-non-kill.json +143 -0
  37. package/conformance/v1/inputs/decide-no-test-discovered-non-kill.json +143 -0
  38. package/conformance/v1/inputs/decide-process-crash-non-kill.json +143 -0
  39. package/conformance/v1/inputs/decide-timeout-non-kill.json +143 -0
  40. package/conformance/v1/inputs/decide-verified.json +143 -0
  41. package/conformance/v1/inputs/replay-benchmark-v1-resealed-summary-forgery.json +575 -0
  42. package/conformance/v1/inputs/replay-evidence-raw-tamper.json +201 -0
  43. package/conformance/v1/inputs/replay-evidence-resealed-semantic-forgery.json +192 -0
  44. package/conformance/v1/schemas/expected-digests.json +175 -0
  45. package/dist/cli.d.ts +9 -0
  46. package/dist/cli.d.ts.map +1 -0
  47. package/dist/cli.js +951 -0
  48. package/dist/cli.js.map +1 -0
  49. package/dist/contracts/diagnostics.d.ts +18 -0
  50. package/dist/contracts/diagnostics.d.ts.map +1 -0
  51. package/dist/contracts/diagnostics.js +13 -0
  52. package/dist/contracts/diagnostics.js.map +1 -0
  53. package/dist/contracts/index.d.ts +3908 -0
  54. package/dist/contracts/index.d.ts.map +1 -0
  55. package/dist/contracts/index.js +2569 -0
  56. package/dist/contracts/index.js.map +1 -0
  57. package/dist/contracts/runtime-doctor.d.ts +107 -0
  58. package/dist/contracts/runtime-doctor.d.ts.map +1 -0
  59. package/dist/contracts/runtime-doctor.js +91 -0
  60. package/dist/contracts/runtime-doctor.js.map +1 -0
  61. package/dist/core/index.d.ts +200 -0
  62. package/dist/core/index.d.ts.map +1 -0
  63. package/dist/core/index.js +2587 -0
  64. package/dist/core/index.js.map +1 -0
  65. package/dist/diagnostics.d.ts +7 -0
  66. package/dist/diagnostics.d.ts.map +1 -0
  67. package/dist/diagnostics.js +252 -0
  68. package/dist/diagnostics.js.map +1 -0
  69. package/dist/engine/adapters/node-test-profile.d.ts +14 -0
  70. package/dist/engine/adapters/node-test-profile.d.ts.map +1 -0
  71. package/dist/engine/adapters/node-test-profile.js +14 -0
  72. package/dist/engine/adapters/node-test-profile.js.map +1 -0
  73. package/dist/engine/adapters/node-test-runtime.d.ts +39 -0
  74. package/dist/engine/adapters/node-test-runtime.d.ts.map +1 -0
  75. package/dist/engine/adapters/node-test-runtime.js +173 -0
  76. package/dist/engine/adapters/node-test-runtime.js.map +1 -0
  77. package/dist/engine/adapters/runtime-facts.d.ts +26 -0
  78. package/dist/engine/adapters/runtime-facts.d.ts.map +1 -0
  79. package/dist/engine/adapters/runtime-facts.js +73 -0
  80. package/dist/engine/adapters/runtime-facts.js.map +1 -0
  81. package/dist/engine/connection.d.ts +22 -0
  82. package/dist/engine/connection.d.ts.map +1 -0
  83. package/dist/engine/connection.js +343 -0
  84. package/dist/engine/connection.js.map +1 -0
  85. package/dist/engine/git-regression.d.ts +25 -0
  86. package/dist/engine/git-regression.d.ts.map +1 -0
  87. package/dist/engine/git-regression.js +803 -0
  88. package/dist/engine/git-regression.js.map +1 -0
  89. package/dist/engine/index.d.ts +55 -0
  90. package/dist/engine/index.d.ts.map +1 -0
  91. package/dist/engine/index.js +2782 -0
  92. package/dist/engine/index.js.map +1 -0
  93. package/dist/engine/node-test-reporter.d.ts +2 -0
  94. package/dist/engine/node-test-reporter.d.ts.map +1 -0
  95. package/dist/engine/node-test-reporter.js +70 -0
  96. package/dist/engine/node-test-reporter.js.map +1 -0
  97. package/dist/engine/runtime-doctor.d.ts +16 -0
  98. package/dist/engine/runtime-doctor.d.ts.map +1 -0
  99. package/dist/engine/runtime-doctor.js +100 -0
  100. package/dist/engine/runtime-doctor.js.map +1 -0
  101. package/dist/evaluation/agentic-corpus.d.ts +161 -0
  102. package/dist/evaluation/agentic-corpus.d.ts.map +1 -0
  103. package/dist/evaluation/agentic-corpus.js +710 -0
  104. package/dist/evaluation/agentic-corpus.js.map +1 -0
  105. package/dist/index.d.ts +8 -0
  106. package/dist/index.d.ts.map +1 -0
  107. package/dist/index.js +8 -0
  108. package/dist/index.js.map +1 -0
  109. package/dist/mcp/index.d.ts +13 -0
  110. package/dist/mcp/index.d.ts.map +1 -0
  111. package/dist/mcp/index.js +391 -0
  112. package/dist/mcp/index.js.map +1 -0
  113. package/dist/mcp/stdio.d.ts +3 -0
  114. package/dist/mcp/stdio.d.ts.map +1 -0
  115. package/dist/mcp/stdio.js +13 -0
  116. package/dist/mcp/stdio.js.map +1 -0
  117. package/dist/sdk/index.d.ts +52 -0
  118. package/dist/sdk/index.d.ts.map +1 -0
  119. package/dist/sdk/index.js +224 -0
  120. package/dist/sdk/index.js.map +1 -0
  121. package/dist/version.d.ts +2 -0
  122. package/dist/version.d.ts.map +1 -0
  123. package/dist/version.js +10 -0
  124. package/dist/version.js.map +1 -0
  125. package/docs/adapter-protocol.md +196 -0
  126. package/docs/agentic-benchmark.md +118 -0
  127. package/docs/agentic-corpus-experiment-h3.md +89 -0
  128. package/docs/agentic-corpus-plan.md +105 -0
  129. package/docs/agentic-corpus-provenance.md +59 -0
  130. package/docs/agentic-test-profile-pilot.md +57 -0
  131. package/docs/agentic-test-profile-v2.md +116 -0
  132. package/docs/agentic-test-profile.md +274 -0
  133. package/docs/architecture.md +157 -0
  134. package/docs/ci.md +37 -0
  135. package/docs/client-connections.md +61 -0
  136. package/docs/conformance-v1.md +72 -0
  137. package/docs/decisions/0001-typescript-runtime.md +24 -0
  138. package/docs/developer-experience.md +55 -0
  139. package/docs/diagnostics.md +35 -0
  140. package/docs/distribution.md +40 -0
  141. package/docs/git-regression.md +39 -0
  142. package/docs/migration-repository-validation-order.md +35 -0
  143. package/docs/migration-testforge-to-assertledger.md +64 -0
  144. package/docs/project-intent.md +173 -0
  145. package/docs/proof-model.md +116 -0
  146. package/docs/reference.md +336 -0
  147. package/docs/release-1.0.md +63 -0
  148. package/docs/repository-audit.md +52 -0
  149. package/docs/repository-init.md +60 -0
  150. package/docs/research-basis.md +27 -0
  151. package/docs/roadmap.md +74 -0
  152. package/docs/runtime-doctor.md +65 -0
  153. package/docs/testexplora-calibration.md +71 -0
  154. package/examples/agentic-benchmark/benchmark-request.mjs +19 -0
  155. package/examples/agentic-benchmark/structured-phase-adapter-fixture.mjs +35 -0
  156. package/examples/agentic-profile/profile-benchmark.mjs +34 -0
  157. package/examples/agentic-profile/profile-manifest.mjs +28 -0
  158. package/examples/git-history/README.md +44 -0
  159. package/examples/git-history/create-demo.mjs +128 -0
  160. package/examples/git-history/escape-string-regexp/LICENSE +9 -0
  161. package/examples/git-history/escape-string-regexp/before.cjs.txt +11 -0
  162. package/examples/git-history/escape-string-regexp/fixed.cjs.txt +13 -0
  163. package/examples/git-history/escape-string-regexp/provenance.json +28 -0
  164. package/examples/node-test/repository/package.json +5 -0
  165. package/examples/node-test/repository/src/is-even.js +3 -0
  166. package/examples/node-test/repository/tests/base.test.js +6 -0
  167. package/examples/node-test/request.json +93 -0
  168. package/integrations/skill/SKILL.md +51 -0
  169. package/package.json +88 -0
  170. package/schemas/agentic-benchmark-acquisition-replay-result.v1.json +70 -0
  171. package/schemas/agentic-benchmark-acquisition-request.v1.json +564 -0
  172. package/schemas/agentic-benchmark-acquisition-result.v1.json +1409 -0
  173. package/schemas/agentic-benchmark-artifact.v1.json +1251 -0
  174. package/schemas/agentic-benchmark-replay-result.v1.json +84 -0
  175. package/schemas/agentic-benchmark-request.v1.json +1034 -0
  176. package/schemas/agentic-corpus-allocation-commitment-replay-result.v1.json +58 -0
  177. package/schemas/agentic-corpus-allocation-commitment.v1.json +141 -0
  178. package/schemas/agentic-corpus-allocation-replay-result.v1.json +34 -0
  179. package/schemas/agentic-corpus-allocation-request.v1.json +65 -0
  180. package/schemas/agentic-corpus-allocation-reveal.v1.json +66 -0
  181. package/schemas/agentic-corpus-allocation.v1.json +167 -0
  182. package/schemas/agentic-corpus-experiment-artifact.v1.json +329 -0
  183. package/schemas/agentic-corpus-experiment-plan-replay-result.v1.json +50 -0
  184. package/schemas/agentic-corpus-experiment-plan.v1.json +424 -0
  185. package/schemas/agentic-corpus-experiment-replay-request.v1.json +336 -0
  186. package/schemas/agentic-corpus-experiment-replay-result.v1.json +106 -0
  187. package/schemas/agentic-corpus-experiment-request.v1.json +204 -0
  188. package/schemas/agentic-corpus-provenance.v1.json +143 -0
  189. package/schemas/agentic-corpus-trust-policy.v1.json +133 -0
  190. package/schemas/agentic-profile-replay-result.v1.json +56 -0
  191. package/schemas/agentic-profile-replay-result.v2.json +63 -0
  192. package/schemas/agentic-profile-report.v1.json +961 -0
  193. package/schemas/agentic-profile-report.v2.json +1674 -0
  194. package/schemas/agentic-profile-request.v1.json +671 -0
  195. package/schemas/agentic-profile-request.v2.json +1338 -0
  196. package/schemas/evidence-manifest.v1.json +636 -0
  197. package/schemas/replay-result.v1.json +49 -0
  198. package/schemas/repository-analysis.v1.json +119 -0
  199. package/schemas/repository-audit.v1.json +811 -0
  200. package/schemas/repository-init-config.v1.json +183 -0
  201. package/schemas/repository-init-lock.v1.json +162 -0
  202. package/schemas/repository-init-result.v1.json +212 -0
  203. package/schemas/verification-request.v1.json +389 -0
@@ -0,0 +1,671 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "$ref": "#/$defs/__schema0"
7
+ },
8
+ "manifest": {
9
+ "$ref": "#/$defs/__schema1"
10
+ },
11
+ "policy": {
12
+ "$ref": "#/$defs/__schema11"
13
+ }
14
+ },
15
+ "required": ["schemaVersion", "manifest", "policy"],
16
+ "additionalProperties": false,
17
+ "title": "TestForge Agentic Test Profile request",
18
+ "description": "A replay-valid evidence manifest and repository-scoped feedback policy.",
19
+ "$defs": {
20
+ "__schema0": {
21
+ "type": "string",
22
+ "const": "1.0.0"
23
+ },
24
+ "__schema1": {
25
+ "type": "object",
26
+ "properties": {
27
+ "schemaVersion": {
28
+ "type": "string",
29
+ "const": "1.0.0"
30
+ },
31
+ "repositoryDigest": {
32
+ "anyOf": [
33
+ {
34
+ "$ref": "#/$defs/__schema2"
35
+ },
36
+ {
37
+ "type": "string",
38
+ "const": "invalid"
39
+ }
40
+ ]
41
+ },
42
+ "evidenceContext": {
43
+ "type": "object",
44
+ "properties": {
45
+ "engine": {
46
+ "type": "object",
47
+ "properties": {
48
+ "name": {
49
+ "type": "string",
50
+ "minLength": 1,
51
+ "maxLength": 128
52
+ },
53
+ "version": {
54
+ "type": "string",
55
+ "minLength": 1,
56
+ "maxLength": 128
57
+ }
58
+ },
59
+ "required": ["name", "version"],
60
+ "additionalProperties": false
61
+ },
62
+ "adapter": {
63
+ "type": "object",
64
+ "properties": {
65
+ "name": {
66
+ "type": "string",
67
+ "minLength": 1,
68
+ "maxLength": 128
69
+ },
70
+ "version": {
71
+ "type": "string",
72
+ "minLength": 1,
73
+ "maxLength": 128
74
+ },
75
+ "configuration": {
76
+ "$ref": "#/$defs/__schema3"
77
+ }
78
+ },
79
+ "required": ["name", "version", "configuration"],
80
+ "additionalProperties": false
81
+ },
82
+ "execution": {
83
+ "type": "object",
84
+ "properties": {
85
+ "isolation": {
86
+ "type": "string",
87
+ "minLength": 1,
88
+ "maxLength": 128
89
+ },
90
+ "environmentAllowlist": {
91
+ "maxItems": 100,
92
+ "type": "array",
93
+ "items": {
94
+ "$ref": "#/$defs/__schema4"
95
+ }
96
+ },
97
+ "budgets": {
98
+ "$ref": "#/$defs/__schema5"
99
+ },
100
+ "candidateRoots": {
101
+ "maxItems": 100,
102
+ "type": "array",
103
+ "items": {
104
+ "$ref": "#/$defs/__schema6"
105
+ }
106
+ }
107
+ },
108
+ "required": ["isolation", "environmentAllowlist", "budgets", "candidateRoots"],
109
+ "additionalProperties": false
110
+ },
111
+ "worlds": {
112
+ "type": "array",
113
+ "items": {
114
+ "type": "object",
115
+ "properties": {
116
+ "id": {
117
+ "$ref": "#/$defs/__schema7"
118
+ },
119
+ "provenance": {
120
+ "type": "string",
121
+ "minLength": 1,
122
+ "maxLength": 1024
123
+ },
124
+ "digest": {
125
+ "$ref": "#/$defs/__schema2"
126
+ }
127
+ },
128
+ "required": ["id", "provenance", "digest"],
129
+ "additionalProperties": false
130
+ }
131
+ }
132
+ },
133
+ "required": ["engine", "adapter", "execution", "worlds"],
134
+ "additionalProperties": false
135
+ },
136
+ "policy": {
137
+ "anyOf": [
138
+ {
139
+ "type": "object",
140
+ "properties": {
141
+ "policyVersion": {
142
+ "type": "string",
143
+ "const": "1.0.0"
144
+ },
145
+ "requiredAttempts": {
146
+ "type": "integer",
147
+ "minimum": 1,
148
+ "maximum": 1000
149
+ },
150
+ "minimumTargetWeightPermille": {
151
+ "type": "integer",
152
+ "minimum": 1,
153
+ "maximum": 1000
154
+ },
155
+ "maximumSelectedCandidates": {
156
+ "type": "integer",
157
+ "minimum": 1,
158
+ "maximum": 1000
159
+ },
160
+ "acceptedTargetOutcomes": {
161
+ "minItems": 1,
162
+ "maxItems": 1,
163
+ "type": "array",
164
+ "items": {
165
+ "$ref": "#/$defs/__schema8"
166
+ }
167
+ }
168
+ },
169
+ "required": [
170
+ "policyVersion",
171
+ "requiredAttempts",
172
+ "minimumTargetWeightPermille",
173
+ "maximumSelectedCandidates",
174
+ "acceptedTargetOutcomes"
175
+ ],
176
+ "additionalProperties": false
177
+ },
178
+ {
179
+ "type": "object",
180
+ "properties": {
181
+ "policyVersion": {
182
+ "type": "string",
183
+ "const": "invalid"
184
+ },
185
+ "requiredAttempts": {
186
+ "type": "number",
187
+ "const": 1
188
+ },
189
+ "minimumTargetWeightPermille": {
190
+ "type": "number",
191
+ "const": 1000
192
+ },
193
+ "maximumSelectedCandidates": {
194
+ "type": "number",
195
+ "const": 0
196
+ },
197
+ "acceptedTargetOutcomes": {
198
+ "maxItems": 0,
199
+ "type": "array",
200
+ "items": {
201
+ "$ref": "#/$defs/__schema9"
202
+ }
203
+ }
204
+ },
205
+ "required": [
206
+ "policyVersion",
207
+ "requiredAttempts",
208
+ "minimumTargetWeightPermille",
209
+ "maximumSelectedCandidates",
210
+ "acceptedTargetOutcomes"
211
+ ],
212
+ "additionalProperties": false
213
+ }
214
+ ]
215
+ },
216
+ "worlds": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "object",
220
+ "properties": {
221
+ "id": {
222
+ "$ref": "#/$defs/__schema7"
223
+ },
224
+ "kind": {
225
+ "type": "string",
226
+ "enum": ["REFERENCE", "TARGET", "NEUTRAL"]
227
+ },
228
+ "required": {
229
+ "type": "boolean"
230
+ },
231
+ "weight": {
232
+ "type": "integer",
233
+ "minimum": 0,
234
+ "maximum": 1000000
235
+ }
236
+ },
237
+ "required": ["id", "kind", "required", "weight"],
238
+ "additionalProperties": false
239
+ }
240
+ },
241
+ "candidates": {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "object",
245
+ "properties": {
246
+ "id": {
247
+ "$ref": "#/$defs/__schema7"
248
+ },
249
+ "digest": {
250
+ "$ref": "#/$defs/__schema2"
251
+ },
252
+ "sizeBytes": {
253
+ "type": "integer",
254
+ "minimum": 0,
255
+ "maximum": 9007199254740991
256
+ },
257
+ "status": {
258
+ "type": "string",
259
+ "enum": ["ELIGIBLE", "UNSTABLE", "INCONCLUSIVE", "INVALID", "WEAK_ORACLE"]
260
+ },
261
+ "killedTargetIds": {
262
+ "type": "array",
263
+ "items": {
264
+ "$ref": "#/$defs/__schema7"
265
+ }
266
+ },
267
+ "targetWeightKilled": {
268
+ "type": "integer",
269
+ "minimum": 0,
270
+ "maximum": 9007199254740991
271
+ },
272
+ "gates": {
273
+ "type": "array",
274
+ "items": {
275
+ "type": "object",
276
+ "properties": {
277
+ "name": {
278
+ "type": "string",
279
+ "enum": [
280
+ "COMPLETENESS",
281
+ "STABILITY",
282
+ "DISCOVERY",
283
+ "REFERENCE",
284
+ "NEUTRAL",
285
+ "TARGET_STRENGTH"
286
+ ]
287
+ },
288
+ "status": {
289
+ "type": "string",
290
+ "enum": ["PASSED", "FAILED", "NOT_RUN"]
291
+ },
292
+ "evidenceRunIds": {
293
+ "type": "array",
294
+ "items": {
295
+ "type": "string",
296
+ "minLength": 1,
297
+ "maxLength": 512
298
+ }
299
+ },
300
+ "reasonCodes": {
301
+ "type": "array",
302
+ "items": {
303
+ "$ref": "#/$defs/__schema10"
304
+ }
305
+ }
306
+ },
307
+ "required": ["name", "status", "evidenceRunIds", "reasonCodes"],
308
+ "additionalProperties": false
309
+ }
310
+ },
311
+ "reasonCodes": {
312
+ "type": "array",
313
+ "items": {
314
+ "$ref": "#/$defs/__schema10"
315
+ }
316
+ }
317
+ },
318
+ "required": [
319
+ "id",
320
+ "digest",
321
+ "sizeBytes",
322
+ "status",
323
+ "killedTargetIds",
324
+ "targetWeightKilled",
325
+ "gates",
326
+ "reasonCodes"
327
+ ],
328
+ "additionalProperties": false
329
+ }
330
+ },
331
+ "observations": {
332
+ "type": "array",
333
+ "items": {
334
+ "type": "object",
335
+ "properties": {
336
+ "runId": {
337
+ "type": "string",
338
+ "minLength": 1,
339
+ "maxLength": 512
340
+ },
341
+ "candidateId": {
342
+ "anyOf": [
343
+ {
344
+ "$ref": "#/$defs/__schema7"
345
+ },
346
+ {
347
+ "type": "null"
348
+ }
349
+ ]
350
+ },
351
+ "worldId": {
352
+ "$ref": "#/$defs/__schema7"
353
+ },
354
+ "attempt": {
355
+ "type": "integer",
356
+ "minimum": 1,
357
+ "maximum": 9007199254740991
358
+ },
359
+ "outcome": {
360
+ "type": "string",
361
+ "enum": [
362
+ "PASS",
363
+ "ASSERTION_FAILURE",
364
+ "COLLECTION_FAILURE",
365
+ "COMPILE_FAILURE",
366
+ "PROCESS_CRASH",
367
+ "TIMEOUT",
368
+ "INFRA_ERROR",
369
+ "NO_TEST_DISCOVERED"
370
+ ]
371
+ },
372
+ "testsDiscovered": {
373
+ "type": "integer",
374
+ "minimum": 0,
375
+ "maximum": 9007199254740991
376
+ },
377
+ "candidateTestsDiscovered": {
378
+ "type": "integer",
379
+ "minimum": 0,
380
+ "maximum": 9007199254740991
381
+ },
382
+ "attributed": {
383
+ "type": "boolean"
384
+ },
385
+ "durationMs": {
386
+ "type": "number",
387
+ "minimum": 0
388
+ },
389
+ "exitCode": {
390
+ "anyOf": [
391
+ {
392
+ "type": "integer",
393
+ "minimum": 0,
394
+ "maximum": 9007199254740991
395
+ },
396
+ {
397
+ "type": "null"
398
+ }
399
+ ]
400
+ },
401
+ "stdoutDigest": {
402
+ "$ref": "#/$defs/__schema2"
403
+ },
404
+ "stderrDigest": {
405
+ "$ref": "#/$defs/__schema2"
406
+ }
407
+ },
408
+ "required": [
409
+ "runId",
410
+ "candidateId",
411
+ "worldId",
412
+ "attempt",
413
+ "outcome",
414
+ "testsDiscovered",
415
+ "candidateTestsDiscovered",
416
+ "attributed"
417
+ ],
418
+ "additionalProperties": false
419
+ }
420
+ },
421
+ "decision": {
422
+ "type": "object",
423
+ "properties": {
424
+ "status": {
425
+ "type": "string",
426
+ "enum": ["VERIFIED", "REJECTED", "INCONCLUSIVE", "ENGINE_ERROR"]
427
+ },
428
+ "selectedCandidateIds": {
429
+ "type": "array",
430
+ "items": {
431
+ "$ref": "#/$defs/__schema7"
432
+ }
433
+ },
434
+ "reasonCodes": {
435
+ "type": "array",
436
+ "items": {
437
+ "$ref": "#/$defs/__schema10"
438
+ }
439
+ }
440
+ },
441
+ "required": ["status", "selectedCandidateIds", "reasonCodes"],
442
+ "additionalProperties": false
443
+ },
444
+ "decisionDigest": {
445
+ "$ref": "#/$defs/__schema2"
446
+ },
447
+ "artifactDigest": {
448
+ "$ref": "#/$defs/__schema2"
449
+ },
450
+ "adapter": {
451
+ "oneOf": [
452
+ {
453
+ "type": "object",
454
+ "properties": {
455
+ "kind": {
456
+ "type": "string",
457
+ "const": "node-test"
458
+ }
459
+ },
460
+ "required": ["kind"],
461
+ "additionalProperties": false
462
+ },
463
+ {
464
+ "type": "object",
465
+ "properties": {
466
+ "kind": {
467
+ "type": "string",
468
+ "const": "testforge-command"
469
+ },
470
+ "protocolVersion": {
471
+ "type": "string",
472
+ "const": "1.0.0"
473
+ }
474
+ },
475
+ "required": ["kind", "protocolVersion"],
476
+ "additionalProperties": false
477
+ }
478
+ ]
479
+ },
480
+ "isolation": {
481
+ "type": "object",
482
+ "properties": {
483
+ "kind": {
484
+ "type": "string",
485
+ "const": "trusted-local"
486
+ },
487
+ "level": {
488
+ "type": "string",
489
+ "const": "UNSANDBOXED"
490
+ },
491
+ "acknowledgedUnsafeExecution": {
492
+ "type": "boolean",
493
+ "const": true
494
+ }
495
+ },
496
+ "required": ["kind", "level", "acknowledgedUnsafeExecution"],
497
+ "additionalProperties": false
498
+ },
499
+ "limitations": {
500
+ "type": "array",
501
+ "items": {
502
+ "type": "string",
503
+ "minLength": 1,
504
+ "maxLength": 2048
505
+ }
506
+ }
507
+ },
508
+ "required": [
509
+ "schemaVersion",
510
+ "repositoryDigest",
511
+ "evidenceContext",
512
+ "policy",
513
+ "worlds",
514
+ "candidates",
515
+ "observations",
516
+ "decision",
517
+ "decisionDigest",
518
+ "artifactDigest",
519
+ "adapter",
520
+ "isolation",
521
+ "limitations"
522
+ ],
523
+ "additionalProperties": false
524
+ },
525
+ "__schema2": {
526
+ "type": "string",
527
+ "pattern": "^sha256:[a-f0-9]{64}$"
528
+ },
529
+ "__schema3": {
530
+ "anyOf": [
531
+ {
532
+ "type": "string"
533
+ },
534
+ {
535
+ "type": "number"
536
+ },
537
+ {
538
+ "type": "boolean"
539
+ },
540
+ {
541
+ "type": "null"
542
+ },
543
+ {
544
+ "type": "array",
545
+ "items": {
546
+ "$ref": "#/$defs/__schema3"
547
+ }
548
+ },
549
+ {
550
+ "type": "object",
551
+ "propertyNames": {
552
+ "type": "string"
553
+ },
554
+ "additionalProperties": {
555
+ "$ref": "#/$defs/__schema3"
556
+ }
557
+ }
558
+ ]
559
+ },
560
+ "__schema4": {
561
+ "type": "string",
562
+ "minLength": 1,
563
+ "maxLength": 128
564
+ },
565
+ "__schema5": {
566
+ "anyOf": [
567
+ {
568
+ "type": "string"
569
+ },
570
+ {
571
+ "type": "number"
572
+ },
573
+ {
574
+ "type": "boolean"
575
+ },
576
+ {
577
+ "type": "null"
578
+ },
579
+ {
580
+ "type": "array",
581
+ "items": {
582
+ "$ref": "#/$defs/__schema5"
583
+ }
584
+ },
585
+ {
586
+ "type": "object",
587
+ "propertyNames": {
588
+ "type": "string"
589
+ },
590
+ "additionalProperties": {
591
+ "$ref": "#/$defs/__schema5"
592
+ }
593
+ }
594
+ ]
595
+ },
596
+ "__schema6": {
597
+ "type": "string",
598
+ "minLength": 1,
599
+ "maxLength": 512
600
+ },
601
+ "__schema7": {
602
+ "type": "string",
603
+ "minLength": 1,
604
+ "maxLength": 128,
605
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
606
+ },
607
+ "__schema8": {
608
+ "type": "string",
609
+ "const": "ASSERTION_FAILURE"
610
+ },
611
+ "__schema9": {
612
+ "type": "string",
613
+ "const": "ASSERTION_FAILURE"
614
+ },
615
+ "__schema10": {
616
+ "type": "string",
617
+ "minLength": 1,
618
+ "maxLength": 128,
619
+ "pattern": "^[A-Z][A-Z0-9_]*$"
620
+ },
621
+ "__schema11": {
622
+ "type": "object",
623
+ "properties": {
624
+ "profileVersion": {
625
+ "type": "string",
626
+ "const": "1.0.0"
627
+ },
628
+ "profileId": {
629
+ "type": "string",
630
+ "minLength": 1,
631
+ "maxLength": 256
632
+ },
633
+ "mode": {
634
+ "type": "string",
635
+ "const": "HARDENING"
636
+ },
637
+ "minimumTimingSamples": {
638
+ "type": "integer",
639
+ "minimum": 1,
640
+ "maximum": 1000
641
+ },
642
+ "lanes": {
643
+ "minItems": 1,
644
+ "maxItems": 100,
645
+ "type": "array",
646
+ "items": {
647
+ "$ref": "#/$defs/__schema12"
648
+ }
649
+ }
650
+ },
651
+ "required": ["profileVersion", "profileId", "mode", "minimumTimingSamples", "lanes"],
652
+ "additionalProperties": false
653
+ },
654
+ "__schema12": {
655
+ "type": "object",
656
+ "properties": {
657
+ "id": {
658
+ "$ref": "#/$defs/__schema7"
659
+ },
660
+ "maximumReferenceP95Ms": {
661
+ "type": "integer",
662
+ "minimum": 1,
663
+ "maximum": 86400000
664
+ }
665
+ },
666
+ "required": ["id", "maximumReferenceP95Ms"],
667
+ "additionalProperties": false
668
+ }
669
+ },
670
+ "$id": "https://testforge.dev/schemas/agentic-profile-request.v1.json"
671
+ }