@intentius/chant 0.89.0 → 0.91.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 (194) hide show
  1. package/dist/cli/handlers/components.d.ts +8 -0
  2. package/dist/cli/handlers/components.d.ts.map +1 -1
  3. package/dist/cli/handlers/operator.d.ts +14 -0
  4. package/dist/cli/handlers/operator.d.ts.map +1 -1
  5. package/dist/cli/handlers/run.d.ts.map +1 -1
  6. package/dist/cli/handlers/serve.d.ts.map +1 -1
  7. package/dist/cli/main.d.ts.map +1 -1
  8. package/dist/cli/mcp/server.d.ts +10 -5
  9. package/dist/cli/mcp/server.d.ts.map +1 -1
  10. package/dist/cli/mcp/types.d.ts +13 -5
  11. package/dist/cli/mcp/types.d.ts.map +1 -1
  12. package/dist/cli/mcp/workspace-tools.d.ts +55 -0
  13. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -0
  14. package/dist/cli/registry.d.ts +31 -0
  15. package/dist/cli/registry.d.ts.map +1 -1
  16. package/dist/components/verbs/vuln-scan.d.ts +72 -0
  17. package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
  18. package/dist/lifecycle/git.d.ts +40 -5
  19. package/dist/lifecycle/git.d.ts.map +1 -1
  20. package/dist/lifecycle/lease.d.ts +72 -16
  21. package/dist/lifecycle/lease.d.ts.map +1 -1
  22. package/dist/lifecycle/member-ledger.d.ts +3 -2
  23. package/dist/lifecycle/member-ledger.d.ts.map +1 -1
  24. package/dist/lifecycle/plan-ledger.d.ts +114 -0
  25. package/dist/lifecycle/plan-ledger.d.ts.map +1 -0
  26. package/dist/lifecycle/work-lease.d.ts +140 -0
  27. package/dist/lifecycle/work-lease.d.ts.map +1 -0
  28. package/dist/op/activities/activity-contracts.d.ts +2 -2
  29. package/dist/op/builders.d.ts.map +1 -1
  30. package/dist/op/discover.d.ts +25 -0
  31. package/dist/op/discover.d.ts.map +1 -1
  32. package/dist/op/index.d.ts +9 -3
  33. package/dist/op/index.d.ts.map +1 -1
  34. package/dist/op/lifecycle-receipt-store.d.ts +34 -0
  35. package/dist/op/lifecycle-receipt-store.d.ts.map +1 -0
  36. package/dist/op/local-executor.d.ts +19 -0
  37. package/dist/op/local-executor.d.ts.map +1 -1
  38. package/dist/op/local-output.d.ts.map +1 -1
  39. package/dist/op/op-ir.d.ts +10 -1
  40. package/dist/op/op-ir.d.ts.map +1 -1
  41. package/dist/op/op-verb-class.d.ts.map +1 -1
  42. package/dist/op/operator.d.ts +29 -0
  43. package/dist/op/operator.d.ts.map +1 -1
  44. package/dist/op/runtime.d.ts +9 -0
  45. package/dist/op/runtime.d.ts.map +1 -1
  46. package/dist/op/runtimes/local.d.ts.map +1 -1
  47. package/dist/op/step-output-ref.d.ts +2 -2
  48. package/dist/op/step-output-ref.d.ts.map +1 -1
  49. package/dist/op/steward.d.ts +140 -0
  50. package/dist/op/steward.d.ts.map +1 -0
  51. package/dist/op/types.d.ts +51 -0
  52. package/dist/op/types.d.ts.map +1 -1
  53. package/dist/op/work-lease-decl.d.ts +18 -0
  54. package/dist/op/work-lease-decl.d.ts.map +1 -0
  55. package/dist/op/work-lease-run.d.ts +173 -0
  56. package/dist/op/work-lease-run.d.ts.map +1 -0
  57. package/dist/workspace/box-isolation.d.ts +99 -0
  58. package/dist/workspace/box-isolation.d.ts.map +1 -0
  59. package/dist/workspace/checks/box-isolation.d.ts +18 -0
  60. package/dist/workspace/checks/box-isolation.d.ts.map +1 -0
  61. package/dist/workspace/checks/boxes.d.ts +71 -0
  62. package/dist/workspace/checks/boxes.d.ts.map +1 -0
  63. package/dist/workspace/checks/records.d.ts +1 -0
  64. package/dist/workspace/checks/records.d.ts.map +1 -1
  65. package/dist/workspace/checks.d.ts +10 -1
  66. package/dist/workspace/checks.d.ts.map +1 -1
  67. package/dist/workspace/conformance/index.d.ts +42 -2
  68. package/dist/workspace/conformance/index.d.ts.map +1 -1
  69. package/dist/workspace/conformance/vitest.d.ts.map +1 -1
  70. package/dist/workspace/decide.d.ts +184 -0
  71. package/dist/workspace/decide.d.ts.map +1 -0
  72. package/dist/workspace/decision-points.schema.json +137 -0
  73. package/dist/workspace/declaration.d.ts +51 -0
  74. package/dist/workspace/declaration.d.ts.map +1 -1
  75. package/dist/workspace/declaration.schema.json +172 -0
  76. package/dist/workspace/declared-kinds.d.ts +12 -0
  77. package/dist/workspace/declared-kinds.d.ts.map +1 -1
  78. package/dist/workspace/points-cli.d.ts +113 -0
  79. package/dist/workspace/points-cli.d.ts.map +1 -0
  80. package/dist/workspace/points.d.ts +320 -0
  81. package/dist/workspace/points.d.ts.map +1 -0
  82. package/dist/workspace/reason-codes.d.ts +29 -0
  83. package/dist/workspace/reason-codes.d.ts.map +1 -1
  84. package/dist/workspace/record-assets.d.ts.map +1 -1
  85. package/dist/workspace/records-cli.d.ts +12 -0
  86. package/dist/workspace/records-cli.d.ts.map +1 -1
  87. package/dist/workspace/records-write.d.ts +35 -3
  88. package/dist/workspace/records-write.d.ts.map +1 -1
  89. package/dist/workspace/records.d.ts +12 -3
  90. package/dist/workspace/records.d.ts.map +1 -1
  91. package/dist/workspace/source-block.d.ts +85 -0
  92. package/dist/workspace/source-block.d.ts.map +1 -0
  93. package/dist/workspace/status-stewards.d.ts +121 -0
  94. package/dist/workspace/status-stewards.d.ts.map +1 -0
  95. package/dist/workspace/status.d.ts +52 -1
  96. package/dist/workspace/status.d.ts.map +1 -1
  97. package/dist/workspace/work-cli.d.ts +78 -0
  98. package/dist/workspace/work-cli.d.ts.map +1 -0
  99. package/package.json +1 -1
  100. package/src/cli/handlers/components.test.ts +93 -0
  101. package/src/cli/handlers/components.ts +44 -3
  102. package/src/cli/handlers/operator.ts +107 -2
  103. package/src/cli/handlers/run.test.ts +19 -0
  104. package/src/cli/handlers/run.ts +53 -1
  105. package/src/cli/handlers/serve.ts +2 -1
  106. package/src/cli/main.test.ts +40 -0
  107. package/src/cli/main.ts +78 -2
  108. package/src/cli/mcp/docs-parity.test.ts +20 -2
  109. package/src/cli/mcp/server.ts +23 -6
  110. package/src/cli/mcp/types.ts +15 -2
  111. package/src/cli/mcp/workspace-tools.test.ts +211 -0
  112. package/src/cli/mcp/workspace-tools.ts +449 -0
  113. package/src/cli/registry.ts +31 -0
  114. package/src/components/verbs/vuln-scan.test.ts +124 -1
  115. package/src/components/verbs/vuln-scan.ts +142 -1
  116. package/src/lifecycle/git.ts +65 -15
  117. package/src/lifecycle/lease.test.ts +22 -0
  118. package/src/lifecycle/lease.ts +133 -29
  119. package/src/lifecycle/member-ledger.ts +3 -2
  120. package/src/lifecycle/plan-ledger.test.ts +148 -0
  121. package/src/lifecycle/plan-ledger.ts +158 -0
  122. package/src/lifecycle/work-lease.test.ts +236 -0
  123. package/src/lifecycle/work-lease.ts +426 -0
  124. package/src/op/builders.ts +5 -0
  125. package/src/op/discover.ts +71 -0
  126. package/src/op/index.ts +16 -3
  127. package/src/op/lifecycle-receipt-store.test.ts +60 -0
  128. package/src/op/lifecycle-receipt-store.ts +61 -0
  129. package/src/op/local-executor.ts +216 -18
  130. package/src/op/local-output.ts +13 -0
  131. package/src/op/op-ir.ts +14 -0
  132. package/src/op/op-verb-class.ts +6 -0
  133. package/src/op/operator.ts +75 -4
  134. package/src/op/runtime.ts +6 -0
  135. package/src/op/runtimes/local.ts +3 -0
  136. package/src/op/step-output-ref.ts +6 -2
  137. package/src/op/steward.test.ts +212 -0
  138. package/src/op/steward.ts +253 -0
  139. package/src/op/types.ts +53 -0
  140. package/src/op/work-lease-decl.ts +80 -0
  141. package/src/op/work-lease-run.test.ts +326 -0
  142. package/src/op/work-lease-run.ts +395 -0
  143. package/src/workspace/box-isolation.test.ts +261 -0
  144. package/src/workspace/box-isolation.ts +205 -0
  145. package/src/workspace/check-contract.test.ts +3 -1
  146. package/src/workspace/check.schema.json +15 -7
  147. package/src/workspace/checks/box-isolation.ts +68 -0
  148. package/src/workspace/checks/boxes.test.ts +197 -0
  149. package/src/workspace/checks/boxes.ts +307 -0
  150. package/src/workspace/checks/records.ts +25 -0
  151. package/src/workspace/checks.test.ts +7 -0
  152. package/src/workspace/checks.ts +19 -2
  153. package/src/workspace/conformance/__fixture__/decisions/decision.kind.mjs +4 -0
  154. package/src/workspace/conformance/__fixture__/decisions/decision.schema.json +100 -6
  155. package/src/workspace/conformance/index.mjs +3 -0
  156. package/src/workspace/conformance/index.ts +185 -7
  157. package/src/workspace/conformance/vitest.ts +17 -8
  158. package/src/workspace/decide.test.ts +224 -0
  159. package/src/workspace/decide.ts +576 -0
  160. package/src/workspace/decision-points.schema.json +137 -0
  161. package/src/workspace/declaration.schema.json +172 -0
  162. package/src/workspace/declaration.ts +137 -0
  163. package/src/workspace/declared-kinds.ts +25 -2
  164. package/src/workspace/intent.schema.json +4 -1
  165. package/src/workspace/point-answer.schema.json +95 -0
  166. package/src/workspace/points-cli.ts +273 -0
  167. package/src/workspace/points-write.schema.json +489 -0
  168. package/src/workspace/points.schema.json +710 -0
  169. package/src/workspace/points.test.ts +264 -0
  170. package/src/workspace/points.ts +564 -0
  171. package/src/workspace/read-contract.test.ts +18 -1
  172. package/src/workspace/reason-codes.test.ts +14 -1
  173. package/src/workspace/reason-codes.ts +36 -0
  174. package/src/workspace/record-assets.test.ts +3 -2
  175. package/src/workspace/record-assets.ts +4 -1
  176. package/src/workspace/records-amend.schema.json +2 -1
  177. package/src/workspace/records-cli.ts +15 -2
  178. package/src/workspace/records-close.schema.json +2 -1
  179. package/src/workspace/records-contract.test.ts +3 -2
  180. package/src/workspace/records-new.schema.json +4 -1
  181. package/src/workspace/records-review.schema.json +2 -1
  182. package/src/workspace/records-write.ts +85 -7
  183. package/src/workspace/records.schema.json +18 -0
  184. package/src/workspace/records.ts +61 -3
  185. package/src/workspace/source-block.test.ts +167 -0
  186. package/src/workspace/source-block.ts +129 -0
  187. package/src/workspace/status-contract.test.ts +178 -0
  188. package/src/workspace/status-stewards.ts +225 -0
  189. package/src/workspace/status.schema.json +230 -4
  190. package/src/workspace/status.ts +106 -5
  191. package/src/workspace/work-cli.test.ts +180 -0
  192. package/src/workspace/work-cli.ts +246 -0
  193. package/src/workspace/work-lease.schema.json +233 -0
  194. package/src/workspace/work-readiness-chud.test.ts +145 -0
@@ -0,0 +1,710 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://intentius.io/chant/schemas/workspace/points/v1/points.schema.json",
4
+ "title": "chant workspace points output",
5
+ "description": "What `chant workspace points --json` prints (ws-058, #2739): the decision points each declared answer kind's points file declares, and the questions asked of them, each an answer record. A question is open while it is escalated to people, or proposed by a model and not yet confirmed; it carries any model's answer with its confidence and threshold, so a reader can prompt a person. With --open only open questions are listed. chant never calls a model to print this. Readers ignore fields they do not know; a field is only ever added within a version. The reason and error codes are closed lists, each in the one closed list of `reason-codes.ts`. Contract version 1 is written by chant 0.81.0 and newer, and this document was added to it by #2739; a chant without it refuses the command.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/result"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/failure"
12
+ }
13
+ ],
14
+ "$defs": {
15
+ "result": {
16
+ "description": "The declaration was read. Exit code 0; an answer kind whose points or records could not be read is listed in sources with its reason.",
17
+ "type": "object",
18
+ "required": [
19
+ "$schema",
20
+ "contract",
21
+ "chant",
22
+ "at",
23
+ "workspace",
24
+ "open",
25
+ "sources",
26
+ "points",
27
+ "questions",
28
+ "summary"
29
+ ],
30
+ "properties": {
31
+ "$schema": {
32
+ "const": "https://intentius.io/chant/schemas/workspace/points/v1/points.schema.json"
33
+ },
34
+ "contract": {
35
+ "const": 1
36
+ },
37
+ "chant": {
38
+ "type": "string",
39
+ "description": "The chant that wrote the document."
40
+ },
41
+ "at": {
42
+ "description": "The full commit id read (--at), or null for the working tree.",
43
+ "type": [
44
+ "string",
45
+ "null"
46
+ ],
47
+ "pattern": "^[0-9a-f]{40,64}$"
48
+ },
49
+ "workspace": {
50
+ "type": "object",
51
+ "required": [
52
+ "name",
53
+ "root"
54
+ ],
55
+ "properties": {
56
+ "name": {
57
+ "type": "string"
58
+ },
59
+ "root": {
60
+ "type": "string"
61
+ }
62
+ }
63
+ },
64
+ "error": false,
65
+ "open": {
66
+ "type": "boolean",
67
+ "description": "Whether only open questions are listed (--open)."
68
+ },
69
+ "sources": {
70
+ "type": "array",
71
+ "description": "Each answer kind read, declared or given with --kind.",
72
+ "items": {
73
+ "$ref": "#/$defs/source"
74
+ }
75
+ },
76
+ "points": {
77
+ "type": "array",
78
+ "description": "Every point the points files declare, in file order.",
79
+ "items": {
80
+ "$ref": "#/$defs/point"
81
+ }
82
+ },
83
+ "questions": {
84
+ "type": "array",
85
+ "description": "The answer records, in path order; with --open, only the open ones.",
86
+ "items": {
87
+ "$ref": "#/$defs/question"
88
+ }
89
+ },
90
+ "summary": {
91
+ "type": "object",
92
+ "required": [
93
+ "points",
94
+ "questions",
95
+ "open",
96
+ "escalated",
97
+ "proposed",
98
+ "answered"
99
+ ],
100
+ "properties": {
101
+ "points": {
102
+ "type": "integer",
103
+ "minimum": 0
104
+ },
105
+ "questions": {
106
+ "type": "integer",
107
+ "minimum": 0
108
+ },
109
+ "open": {
110
+ "type": "integer",
111
+ "minimum": 0
112
+ },
113
+ "escalated": {
114
+ "type": "integer",
115
+ "minimum": 0
116
+ },
117
+ "proposed": {
118
+ "type": "integer",
119
+ "minimum": 0
120
+ },
121
+ "answered": {
122
+ "type": "integer",
123
+ "minimum": 0
124
+ }
125
+ }
126
+ }
127
+ }
128
+ },
129
+ "source": {
130
+ "type": "object",
131
+ "required": [
132
+ "kind",
133
+ "points",
134
+ "reason"
135
+ ],
136
+ "properties": {
137
+ "kind": {
138
+ "type": "string",
139
+ "description": "The answer kind file, from the workspace root as declared, or as given with --kind."
140
+ },
141
+ "points": {
142
+ "type": [
143
+ "string",
144
+ "null"
145
+ ],
146
+ "description": "The points file from the repository root, or null when the kind could not be loaded."
147
+ },
148
+ "reason": {
149
+ "oneOf": [
150
+ {
151
+ "type": "null"
152
+ },
153
+ {
154
+ "$ref": "#/$defs/reason"
155
+ }
156
+ ]
157
+ }
158
+ }
159
+ },
160
+ "reason": {
161
+ "type": "object",
162
+ "required": [
163
+ "code",
164
+ "message"
165
+ ],
166
+ "properties": {
167
+ "code": {
168
+ "enum": [
169
+ "kind-unreadable",
170
+ "kind-invalid",
171
+ "schema-unreadable",
172
+ "schema-id-mismatch",
173
+ "schema-invalid",
174
+ "location-missing",
175
+ "points-invalid"
176
+ ]
177
+ },
178
+ "message": {
179
+ "type": "string"
180
+ }
181
+ }
182
+ },
183
+ "point": {
184
+ "type": "object",
185
+ "required": [
186
+ "name",
187
+ "title",
188
+ "kind",
189
+ "file",
190
+ "version",
191
+ "questionType",
192
+ "instructions",
193
+ "candidates",
194
+ "inputs",
195
+ "deciders",
196
+ "quorum"
197
+ ],
198
+ "properties": {
199
+ "name": {
200
+ "type": "string"
201
+ },
202
+ "title": {
203
+ "type": "string"
204
+ },
205
+ "kind": {
206
+ "type": "string"
207
+ },
208
+ "file": {
209
+ "type": "string"
210
+ },
211
+ "version": {
212
+ "type": "string",
213
+ "pattern": "^[0-9a-f]{64}$",
214
+ "description": "sha256 of the point's declaration."
215
+ },
216
+ "questionType": {
217
+ "enum": [
218
+ "noul",
219
+ "choice",
220
+ "score"
221
+ ]
222
+ },
223
+ "instructions": {
224
+ "type": "string"
225
+ },
226
+ "candidates": {
227
+ "type": "array",
228
+ "items": {
229
+ "oneOf": [
230
+ {
231
+ "type": "string"
232
+ },
233
+ {
234
+ "type": "boolean"
235
+ }
236
+ ]
237
+ }
238
+ },
239
+ "inputs": {
240
+ "type": "array",
241
+ "items": {
242
+ "type": "object",
243
+ "required": [
244
+ "name",
245
+ "output",
246
+ "description"
247
+ ],
248
+ "properties": {
249
+ "name": {
250
+ "type": "string"
251
+ },
252
+ "output": {
253
+ "type": "string",
254
+ "description": "The read-contract output the input names: record, decision, work-item, finding, region, commit, member, gate, release, environment or component."
255
+ },
256
+ "description": {
257
+ "type": "string"
258
+ }
259
+ }
260
+ }
261
+ },
262
+ "deciders": {
263
+ "type": "array",
264
+ "description": "The chain as declared: table, model and quorum deciders, the quorum last.",
265
+ "items": {
266
+ "type": "object",
267
+ "required": [
268
+ "kind"
269
+ ],
270
+ "properties": {
271
+ "kind": {
272
+ "enum": [
273
+ "table",
274
+ "model",
275
+ "quorum"
276
+ ]
277
+ }
278
+ }
279
+ }
280
+ },
281
+ "quorum": {
282
+ "type": "object",
283
+ "required": [
284
+ "count"
285
+ ],
286
+ "properties": {
287
+ "count": {
288
+ "type": "integer",
289
+ "minimum": 1
290
+ },
291
+ "roles": {
292
+ "type": "array",
293
+ "items": {
294
+ "type": "string"
295
+ }
296
+ }
297
+ }
298
+ }
299
+ }
300
+ },
301
+ "question": {
302
+ "type": "object",
303
+ "required": [
304
+ "id",
305
+ "path",
306
+ "point",
307
+ "title",
308
+ "subject",
309
+ "state",
310
+ "open",
311
+ "questionType",
312
+ "candidates",
313
+ "inputs",
314
+ "inputsHash",
315
+ "pointVersion",
316
+ "current",
317
+ "answer",
318
+ "decider",
319
+ "probabilities",
320
+ "confidence",
321
+ "threshold",
322
+ "model",
323
+ "escalations",
324
+ "answeredBy",
325
+ "askedOn",
326
+ "answeredOn",
327
+ "valid",
328
+ "warnings"
329
+ ],
330
+ "properties": {
331
+ "id": {
332
+ "type": "string"
333
+ },
334
+ "path": {
335
+ "type": "string"
336
+ },
337
+ "point": {
338
+ "type": "string"
339
+ },
340
+ "title": {
341
+ "type": "string"
342
+ },
343
+ "subject": {
344
+ "type": [
345
+ "string",
346
+ "null"
347
+ ],
348
+ "description": "What the question is about, such as a work item's id."
349
+ },
350
+ "state": {
351
+ "enum": [
352
+ "escalated",
353
+ "proposed",
354
+ "answered"
355
+ ]
356
+ },
357
+ "open": {
358
+ "type": "boolean",
359
+ "description": "Escalated to people, or proposed by a model and not yet confirmed."
360
+ },
361
+ "questionType": {
362
+ "type": "string"
363
+ },
364
+ "candidates": {
365
+ "type": "array",
366
+ "items": {
367
+ "oneOf": [
368
+ {
369
+ "type": "string"
370
+ },
371
+ {
372
+ "type": "boolean"
373
+ }
374
+ ]
375
+ }
376
+ },
377
+ "inputs": {
378
+ "type": "object"
379
+ },
380
+ "inputsHash": {
381
+ "type": "string"
382
+ },
383
+ "pointVersion": {
384
+ "type": "string"
385
+ },
386
+ "current": {
387
+ "type": [
388
+ "boolean",
389
+ "null"
390
+ ],
391
+ "description": "The point is still declared as it was when asked; null when the points file no longer declares it."
392
+ },
393
+ "answer": {
394
+ "oneOf": [
395
+ {
396
+ "type": "string"
397
+ },
398
+ {
399
+ "type": "boolean"
400
+ },
401
+ {
402
+ "type": "null"
403
+ }
404
+ ]
405
+ },
406
+ "decider": {
407
+ "type": "object",
408
+ "description": "Who answered: a table row, a model with its backend and model id, or a quorum, with who answered once people did. For an escalated question, the quorum it waits on."
409
+ },
410
+ "probabilities": {
411
+ "oneOf": [
412
+ {
413
+ "type": "null"
414
+ },
415
+ {
416
+ "type": "object",
417
+ "additionalProperties": {
418
+ "type": "number",
419
+ "minimum": 0,
420
+ "maximum": 1
421
+ }
422
+ }
423
+ ]
424
+ },
425
+ "confidence": {
426
+ "oneOf": [
427
+ {
428
+ "type": "null"
429
+ },
430
+ {
431
+ "type": "number",
432
+ "minimum": 0,
433
+ "maximum": 1
434
+ }
435
+ ]
436
+ },
437
+ "threshold": {
438
+ "oneOf": [
439
+ {
440
+ "type": "null"
441
+ },
442
+ {
443
+ "type": "number",
444
+ "minimum": 0,
445
+ "maximum": 1
446
+ }
447
+ ]
448
+ },
449
+ "model": {
450
+ "description": "Any model answer: the proposal (observed), or the last answer below a model decider's threshold (not observed). null when no model answered.",
451
+ "oneOf": [
452
+ {
453
+ "type": "null"
454
+ },
455
+ {
456
+ "type": "object",
457
+ "required": [
458
+ "answer",
459
+ "confidence",
460
+ "threshold",
461
+ "model",
462
+ "backend",
463
+ "observed"
464
+ ],
465
+ "properties": {
466
+ "answer": {
467
+ "oneOf": [
468
+ {
469
+ "type": "string"
470
+ },
471
+ {
472
+ "type": "boolean"
473
+ },
474
+ {
475
+ "type": "null"
476
+ }
477
+ ]
478
+ },
479
+ "confidence": {
480
+ "oneOf": [
481
+ {
482
+ "type": "null"
483
+ },
484
+ {
485
+ "type": "number",
486
+ "minimum": 0,
487
+ "maximum": 1
488
+ }
489
+ ]
490
+ },
491
+ "threshold": {
492
+ "oneOf": [
493
+ {
494
+ "type": "null"
495
+ },
496
+ {
497
+ "type": "number",
498
+ "minimum": 0,
499
+ "maximum": 1
500
+ }
501
+ ]
502
+ },
503
+ "model": {
504
+ "type": [
505
+ "string",
506
+ "null"
507
+ ]
508
+ },
509
+ "backend": {
510
+ "type": [
511
+ "string",
512
+ "null"
513
+ ]
514
+ },
515
+ "observed": {
516
+ "type": "boolean"
517
+ }
518
+ }
519
+ }
520
+ ]
521
+ },
522
+ "escalations": {
523
+ "type": "array",
524
+ "items": {
525
+ "type": "object",
526
+ "required": [
527
+ "kind",
528
+ "reason"
529
+ ],
530
+ "properties": {
531
+ "kind": {
532
+ "enum": [
533
+ "table",
534
+ "model"
535
+ ]
536
+ },
537
+ "reason": {
538
+ "type": "string"
539
+ },
540
+ "backend": {
541
+ "type": "string"
542
+ },
543
+ "model": {
544
+ "type": "string"
545
+ },
546
+ "answer": {
547
+ "oneOf": [
548
+ {
549
+ "type": "string"
550
+ },
551
+ {
552
+ "type": "boolean"
553
+ },
554
+ {
555
+ "type": "null"
556
+ }
557
+ ]
558
+ },
559
+ "probabilities": {
560
+ "type": "object",
561
+ "additionalProperties": {
562
+ "type": "number",
563
+ "minimum": 0,
564
+ "maximum": 1
565
+ }
566
+ },
567
+ "confidence": {
568
+ "type": "number",
569
+ "minimum": 0,
570
+ "maximum": 1
571
+ },
572
+ "threshold": {
573
+ "type": "number",
574
+ "minimum": 0,
575
+ "maximum": 1
576
+ }
577
+ }
578
+ }
579
+ },
580
+ "answeredBy": {
581
+ "type": "array",
582
+ "items": {
583
+ "type": "string"
584
+ }
585
+ },
586
+ "askedOn": {
587
+ "type": [
588
+ "string",
589
+ "null"
590
+ ]
591
+ },
592
+ "answeredOn": {
593
+ "type": [
594
+ "string",
595
+ "null"
596
+ ]
597
+ },
598
+ "valid": {
599
+ "type": "boolean"
600
+ },
601
+ "warnings": {
602
+ "type": "array",
603
+ "items": {
604
+ "type": "object",
605
+ "required": [
606
+ "code",
607
+ "message"
608
+ ],
609
+ "properties": {
610
+ "code": {
611
+ "enum": [
612
+ "asset-drift",
613
+ "asset-missing",
614
+ "asset-stale",
615
+ "record-supersedes-pending",
616
+ "record-no-evidence",
617
+ "review-undigested",
618
+ "source-transcript-drift",
619
+ "answer-points-unreadable",
620
+ "answer-point-unknown",
621
+ "answer-point-changed",
622
+ "record-unattested"
623
+ ]
624
+ },
625
+ "message": {
626
+ "type": "string"
627
+ }
628
+ }
629
+ }
630
+ }
631
+ }
632
+ },
633
+ "failure": {
634
+ "description": "The declaration could not be read, and nothing was read. Exit code 1.",
635
+ "type": "object",
636
+ "required": [
637
+ "$schema",
638
+ "contract",
639
+ "chant",
640
+ "error"
641
+ ],
642
+ "properties": {
643
+ "$schema": {
644
+ "const": "https://intentius.io/chant/schemas/workspace/points/v1/points.schema.json"
645
+ },
646
+ "contract": {
647
+ "const": 1
648
+ },
649
+ "chant": {
650
+ "type": "string"
651
+ },
652
+ "error": {
653
+ "type": "object",
654
+ "required": [
655
+ "code",
656
+ "message",
657
+ "location"
658
+ ],
659
+ "properties": {
660
+ "code": {
661
+ "enum": [
662
+ "declaration-missing",
663
+ "declaration-ambiguous",
664
+ "declaration-unparseable",
665
+ "declaration-invalid",
666
+ "placement-invalid",
667
+ "reader-too-old",
668
+ "root-chant-required",
669
+ "not-a-git-repository",
670
+ "revision-unknown"
671
+ ]
672
+ },
673
+ "message": {
674
+ "type": "string"
675
+ },
676
+ "location": {
677
+ "oneOf": [
678
+ {
679
+ "type": "null"
680
+ },
681
+ {
682
+ "type": "object",
683
+ "required": [
684
+ "file",
685
+ "line",
686
+ "column"
687
+ ],
688
+ "properties": {
689
+ "file": {
690
+ "type": "string"
691
+ },
692
+ "line": {
693
+ "type": "integer",
694
+ "minimum": 1
695
+ },
696
+ "column": {
697
+ "type": "integer",
698
+ "minimum": 1
699
+ }
700
+ }
701
+ }
702
+ ]
703
+ }
704
+ }
705
+ },
706
+ "points": false
707
+ }
708
+ }
709
+ }
710
+ }