@intentius/chant 0.90.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 (164) 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/main.d.ts.map +1 -1
  7. package/dist/cli/mcp/workspace-tools.d.ts +6 -4
  8. package/dist/cli/mcp/workspace-tools.d.ts.map +1 -1
  9. package/dist/cli/registry.d.ts +31 -0
  10. package/dist/cli/registry.d.ts.map +1 -1
  11. package/dist/components/verbs/vuln-scan.d.ts +72 -0
  12. package/dist/components/verbs/vuln-scan.d.ts.map +1 -1
  13. package/dist/lifecycle/git.d.ts +40 -5
  14. package/dist/lifecycle/git.d.ts.map +1 -1
  15. package/dist/lifecycle/lease.d.ts +72 -16
  16. package/dist/lifecycle/lease.d.ts.map +1 -1
  17. package/dist/lifecycle/member-ledger.d.ts +3 -2
  18. package/dist/lifecycle/member-ledger.d.ts.map +1 -1
  19. package/dist/lifecycle/plan-ledger.d.ts +114 -0
  20. package/dist/lifecycle/plan-ledger.d.ts.map +1 -0
  21. package/dist/lifecycle/work-lease.d.ts +140 -0
  22. package/dist/lifecycle/work-lease.d.ts.map +1 -0
  23. package/dist/op/activities/activity-contracts.d.ts +2 -2
  24. package/dist/op/builders.d.ts.map +1 -1
  25. package/dist/op/discover.d.ts +25 -0
  26. package/dist/op/discover.d.ts.map +1 -1
  27. package/dist/op/index.d.ts +9 -3
  28. package/dist/op/index.d.ts.map +1 -1
  29. package/dist/op/lifecycle-receipt-store.d.ts +34 -0
  30. package/dist/op/lifecycle-receipt-store.d.ts.map +1 -0
  31. package/dist/op/local-executor.d.ts +19 -0
  32. package/dist/op/local-executor.d.ts.map +1 -1
  33. package/dist/op/local-output.d.ts.map +1 -1
  34. package/dist/op/op-ir.d.ts +10 -1
  35. package/dist/op/op-ir.d.ts.map +1 -1
  36. package/dist/op/operator.d.ts +29 -0
  37. package/dist/op/operator.d.ts.map +1 -1
  38. package/dist/op/runtime.d.ts +9 -0
  39. package/dist/op/runtime.d.ts.map +1 -1
  40. package/dist/op/runtimes/local.d.ts.map +1 -1
  41. package/dist/op/step-output-ref.d.ts +2 -2
  42. package/dist/op/step-output-ref.d.ts.map +1 -1
  43. package/dist/op/steward.d.ts +140 -0
  44. package/dist/op/steward.d.ts.map +1 -0
  45. package/dist/op/types.d.ts +51 -0
  46. package/dist/op/types.d.ts.map +1 -1
  47. package/dist/op/work-lease-decl.d.ts +18 -0
  48. package/dist/op/work-lease-decl.d.ts.map +1 -0
  49. package/dist/op/work-lease-run.d.ts +173 -0
  50. package/dist/op/work-lease-run.d.ts.map +1 -0
  51. package/dist/workspace/box-isolation.d.ts +99 -0
  52. package/dist/workspace/box-isolation.d.ts.map +1 -0
  53. package/dist/workspace/checks/box-isolation.d.ts +18 -0
  54. package/dist/workspace/checks/box-isolation.d.ts.map +1 -0
  55. package/dist/workspace/checks/boxes.d.ts +71 -0
  56. package/dist/workspace/checks/boxes.d.ts.map +1 -0
  57. package/dist/workspace/checks/records.d.ts +1 -0
  58. package/dist/workspace/checks/records.d.ts.map +1 -1
  59. package/dist/workspace/checks.d.ts +10 -1
  60. package/dist/workspace/checks.d.ts.map +1 -1
  61. package/dist/workspace/decide.d.ts +184 -0
  62. package/dist/workspace/decide.d.ts.map +1 -0
  63. package/dist/workspace/decision-points.schema.json +137 -0
  64. package/dist/workspace/declaration.d.ts +51 -0
  65. package/dist/workspace/declaration.d.ts.map +1 -1
  66. package/dist/workspace/declaration.schema.json +172 -0
  67. package/dist/workspace/declared-kinds.d.ts +12 -0
  68. package/dist/workspace/declared-kinds.d.ts.map +1 -1
  69. package/dist/workspace/points-cli.d.ts +113 -0
  70. package/dist/workspace/points-cli.d.ts.map +1 -0
  71. package/dist/workspace/points.d.ts +320 -0
  72. package/dist/workspace/points.d.ts.map +1 -0
  73. package/dist/workspace/reason-codes.d.ts +26 -0
  74. package/dist/workspace/reason-codes.d.ts.map +1 -1
  75. package/dist/workspace/record-assets.d.ts.map +1 -1
  76. package/dist/workspace/records-cli.d.ts +12 -0
  77. package/dist/workspace/records-cli.d.ts.map +1 -1
  78. package/dist/workspace/records.d.ts +8 -2
  79. package/dist/workspace/records.d.ts.map +1 -1
  80. package/dist/workspace/status-stewards.d.ts +121 -0
  81. package/dist/workspace/status-stewards.d.ts.map +1 -0
  82. package/dist/workspace/status.d.ts +52 -1
  83. package/dist/workspace/status.d.ts.map +1 -1
  84. package/dist/workspace/work-cli.d.ts +78 -0
  85. package/dist/workspace/work-cli.d.ts.map +1 -0
  86. package/package.json +1 -1
  87. package/src/cli/handlers/components.test.ts +93 -0
  88. package/src/cli/handlers/components.ts +44 -3
  89. package/src/cli/handlers/operator.ts +107 -2
  90. package/src/cli/handlers/run.test.ts +19 -0
  91. package/src/cli/handlers/run.ts +53 -1
  92. package/src/cli/main.test.ts +40 -0
  93. package/src/cli/main.ts +78 -2
  94. package/src/cli/mcp/workspace-tools.test.ts +14 -1
  95. package/src/cli/mcp/workspace-tools.ts +49 -5
  96. package/src/cli/registry.ts +31 -0
  97. package/src/components/verbs/vuln-scan.test.ts +124 -1
  98. package/src/components/verbs/vuln-scan.ts +142 -1
  99. package/src/lifecycle/git.ts +65 -15
  100. package/src/lifecycle/lease.test.ts +22 -0
  101. package/src/lifecycle/lease.ts +133 -29
  102. package/src/lifecycle/member-ledger.ts +3 -2
  103. package/src/lifecycle/plan-ledger.test.ts +148 -0
  104. package/src/lifecycle/plan-ledger.ts +158 -0
  105. package/src/lifecycle/work-lease.test.ts +236 -0
  106. package/src/lifecycle/work-lease.ts +426 -0
  107. package/src/op/builders.ts +5 -0
  108. package/src/op/discover.ts +71 -0
  109. package/src/op/index.ts +16 -3
  110. package/src/op/lifecycle-receipt-store.test.ts +60 -0
  111. package/src/op/lifecycle-receipt-store.ts +61 -0
  112. package/src/op/local-executor.ts +216 -18
  113. package/src/op/local-output.ts +13 -0
  114. package/src/op/op-ir.ts +14 -0
  115. package/src/op/operator.ts +75 -4
  116. package/src/op/runtime.ts +6 -0
  117. package/src/op/runtimes/local.ts +3 -0
  118. package/src/op/step-output-ref.ts +6 -2
  119. package/src/op/steward.test.ts +212 -0
  120. package/src/op/steward.ts +253 -0
  121. package/src/op/types.ts +53 -0
  122. package/src/op/work-lease-decl.ts +80 -0
  123. package/src/op/work-lease-run.test.ts +326 -0
  124. package/src/op/work-lease-run.ts +395 -0
  125. package/src/workspace/box-isolation.test.ts +261 -0
  126. package/src/workspace/box-isolation.ts +205 -0
  127. package/src/workspace/check-contract.test.ts +3 -1
  128. package/src/workspace/check.schema.json +15 -7
  129. package/src/workspace/checks/box-isolation.ts +68 -0
  130. package/src/workspace/checks/boxes.test.ts +197 -0
  131. package/src/workspace/checks/boxes.ts +307 -0
  132. package/src/workspace/checks/records.ts +25 -0
  133. package/src/workspace/checks.test.ts +7 -0
  134. package/src/workspace/checks.ts +19 -2
  135. package/src/workspace/decide.test.ts +224 -0
  136. package/src/workspace/decide.ts +576 -0
  137. package/src/workspace/decision-points.schema.json +137 -0
  138. package/src/workspace/declaration.schema.json +172 -0
  139. package/src/workspace/declaration.ts +137 -0
  140. package/src/workspace/declared-kinds.ts +25 -2
  141. package/src/workspace/intent.schema.json +4 -1
  142. package/src/workspace/point-answer.schema.json +95 -0
  143. package/src/workspace/points-cli.ts +273 -0
  144. package/src/workspace/points-write.schema.json +489 -0
  145. package/src/workspace/points.schema.json +710 -0
  146. package/src/workspace/points.test.ts +264 -0
  147. package/src/workspace/points.ts +564 -0
  148. package/src/workspace/read-contract.test.ts +18 -1
  149. package/src/workspace/reason-codes.test.ts +14 -1
  150. package/src/workspace/reason-codes.ts +33 -0
  151. package/src/workspace/record-assets.test.ts +3 -2
  152. package/src/workspace/record-assets.ts +4 -1
  153. package/src/workspace/records-cli.ts +15 -2
  154. package/src/workspace/records-contract.test.ts +3 -2
  155. package/src/workspace/records.schema.json +17 -0
  156. package/src/workspace/records.ts +33 -3
  157. package/src/workspace/status-contract.test.ts +178 -0
  158. package/src/workspace/status-stewards.ts +225 -0
  159. package/src/workspace/status.schema.json +230 -4
  160. package/src/workspace/status.ts +106 -5
  161. package/src/workspace/work-cli.test.ts +180 -0
  162. package/src/workspace/work-cli.ts +246 -0
  163. package/src/workspace/work-lease.schema.json +233 -0
  164. package/src/workspace/work-readiness-chud.test.ts +145 -0
@@ -0,0 +1,489 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://intentius.io/chant/schemas/workspace/points-write/v1/points-write.schema.json",
4
+ "title": "chant workspace points ask and answer output",
5
+ "description": "What `chant workspace points ask` and `points answer` print (ws-058, #2739): the answer record asked for or written, as `points --json` lists a question. ask returns the record that is there when the same point, declaration and inputs were answered or proposed before (reused), and otherwise writes one: answered from a table, proposed from a model at or above its threshold, escalated to people below it. answer records people's answer to an open question once the point's quorum is met. Nothing is committed, and nothing is written on a refusal or with --dry-run. The error codes are a closed list, each in the one closed list of `reason-codes.ts`. Written at contract version 1 of the write documents.",
6
+ "oneOf": [
7
+ {
8
+ "$ref": "#/$defs/result"
9
+ },
10
+ {
11
+ "$ref": "#/$defs/failure"
12
+ }
13
+ ],
14
+ "$defs": {
15
+ "result": {
16
+ "description": "The record was found or written. Exit code 0.",
17
+ "type": "object",
18
+ "required": [
19
+ "$schema",
20
+ "contract",
21
+ "verb",
22
+ "kind",
23
+ "id",
24
+ "path",
25
+ "reused",
26
+ "written",
27
+ "dryRun",
28
+ "question"
29
+ ],
30
+ "properties": {
31
+ "$schema": {
32
+ "const": "https://intentius.io/chant/schemas/workspace/points-write/v1/points-write.schema.json"
33
+ },
34
+ "contract": {
35
+ "const": 1
36
+ },
37
+ "verb": {
38
+ "enum": [
39
+ "ask",
40
+ "answer"
41
+ ]
42
+ },
43
+ "kind": {
44
+ "type": "object",
45
+ "required": [
46
+ "name",
47
+ "schema",
48
+ "file"
49
+ ],
50
+ "properties": {
51
+ "name": {
52
+ "type": "string"
53
+ },
54
+ "schema": {
55
+ "type": "string"
56
+ },
57
+ "file": {
58
+ "type": "string"
59
+ }
60
+ }
61
+ },
62
+ "id": {
63
+ "type": "string"
64
+ },
65
+ "path": {
66
+ "type": "string",
67
+ "description": "The record file, from the repository root."
68
+ },
69
+ "reused": {
70
+ "type": "boolean",
71
+ "description": "The record was already there, and nothing new was written."
72
+ },
73
+ "written": {
74
+ "type": "boolean",
75
+ "description": "A file was written: false when reused, and with --dry-run."
76
+ },
77
+ "dryRun": {
78
+ "type": "boolean"
79
+ },
80
+ "question": {
81
+ "$ref": "#/$defs/question"
82
+ },
83
+ "text": {
84
+ "type": "string",
85
+ "description": "With --dry-run, the text that would be written."
86
+ },
87
+ "error": false
88
+ }
89
+ },
90
+ "question": {
91
+ "type": "object",
92
+ "required": [
93
+ "id",
94
+ "path",
95
+ "point",
96
+ "title",
97
+ "subject",
98
+ "state",
99
+ "open",
100
+ "questionType",
101
+ "candidates",
102
+ "inputs",
103
+ "inputsHash",
104
+ "pointVersion",
105
+ "current",
106
+ "answer",
107
+ "decider",
108
+ "probabilities",
109
+ "confidence",
110
+ "threshold",
111
+ "model",
112
+ "escalations",
113
+ "answeredBy",
114
+ "askedOn",
115
+ "answeredOn",
116
+ "valid",
117
+ "warnings"
118
+ ],
119
+ "properties": {
120
+ "id": {
121
+ "type": "string"
122
+ },
123
+ "path": {
124
+ "type": "string"
125
+ },
126
+ "point": {
127
+ "type": "string"
128
+ },
129
+ "title": {
130
+ "type": "string"
131
+ },
132
+ "subject": {
133
+ "type": [
134
+ "string",
135
+ "null"
136
+ ],
137
+ "description": "What the question is about, such as a work item's id."
138
+ },
139
+ "state": {
140
+ "enum": [
141
+ "escalated",
142
+ "proposed",
143
+ "answered"
144
+ ]
145
+ },
146
+ "open": {
147
+ "type": "boolean",
148
+ "description": "Escalated to people, or proposed by a model and not yet confirmed."
149
+ },
150
+ "questionType": {
151
+ "type": "string"
152
+ },
153
+ "candidates": {
154
+ "type": "array",
155
+ "items": {
156
+ "oneOf": [
157
+ {
158
+ "type": "string"
159
+ },
160
+ {
161
+ "type": "boolean"
162
+ }
163
+ ]
164
+ }
165
+ },
166
+ "inputs": {
167
+ "type": "object"
168
+ },
169
+ "inputsHash": {
170
+ "type": "string"
171
+ },
172
+ "pointVersion": {
173
+ "type": "string"
174
+ },
175
+ "current": {
176
+ "type": [
177
+ "boolean",
178
+ "null"
179
+ ],
180
+ "description": "The point is still declared as it was when asked; null when the points file no longer declares it."
181
+ },
182
+ "answer": {
183
+ "oneOf": [
184
+ {
185
+ "type": "string"
186
+ },
187
+ {
188
+ "type": "boolean"
189
+ },
190
+ {
191
+ "type": "null"
192
+ }
193
+ ]
194
+ },
195
+ "decider": {
196
+ "type": "object",
197
+ "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."
198
+ },
199
+ "probabilities": {
200
+ "oneOf": [
201
+ {
202
+ "type": "null"
203
+ },
204
+ {
205
+ "type": "object",
206
+ "additionalProperties": {
207
+ "type": "number",
208
+ "minimum": 0,
209
+ "maximum": 1
210
+ }
211
+ }
212
+ ]
213
+ },
214
+ "confidence": {
215
+ "oneOf": [
216
+ {
217
+ "type": "null"
218
+ },
219
+ {
220
+ "type": "number",
221
+ "minimum": 0,
222
+ "maximum": 1
223
+ }
224
+ ]
225
+ },
226
+ "threshold": {
227
+ "oneOf": [
228
+ {
229
+ "type": "null"
230
+ },
231
+ {
232
+ "type": "number",
233
+ "minimum": 0,
234
+ "maximum": 1
235
+ }
236
+ ]
237
+ },
238
+ "model": {
239
+ "description": "Any model answer: the proposal (observed), or the last answer below a model decider's threshold (not observed). null when no model answered.",
240
+ "oneOf": [
241
+ {
242
+ "type": "null"
243
+ },
244
+ {
245
+ "type": "object",
246
+ "required": [
247
+ "answer",
248
+ "confidence",
249
+ "threshold",
250
+ "model",
251
+ "backend",
252
+ "observed"
253
+ ],
254
+ "properties": {
255
+ "answer": {
256
+ "oneOf": [
257
+ {
258
+ "type": "string"
259
+ },
260
+ {
261
+ "type": "boolean"
262
+ },
263
+ {
264
+ "type": "null"
265
+ }
266
+ ]
267
+ },
268
+ "confidence": {
269
+ "oneOf": [
270
+ {
271
+ "type": "null"
272
+ },
273
+ {
274
+ "type": "number",
275
+ "minimum": 0,
276
+ "maximum": 1
277
+ }
278
+ ]
279
+ },
280
+ "threshold": {
281
+ "oneOf": [
282
+ {
283
+ "type": "null"
284
+ },
285
+ {
286
+ "type": "number",
287
+ "minimum": 0,
288
+ "maximum": 1
289
+ }
290
+ ]
291
+ },
292
+ "model": {
293
+ "type": [
294
+ "string",
295
+ "null"
296
+ ]
297
+ },
298
+ "backend": {
299
+ "type": [
300
+ "string",
301
+ "null"
302
+ ]
303
+ },
304
+ "observed": {
305
+ "type": "boolean"
306
+ }
307
+ }
308
+ }
309
+ ]
310
+ },
311
+ "escalations": {
312
+ "type": "array",
313
+ "items": {
314
+ "type": "object",
315
+ "required": [
316
+ "kind",
317
+ "reason"
318
+ ],
319
+ "properties": {
320
+ "kind": {
321
+ "enum": [
322
+ "table",
323
+ "model"
324
+ ]
325
+ },
326
+ "reason": {
327
+ "type": "string"
328
+ },
329
+ "backend": {
330
+ "type": "string"
331
+ },
332
+ "model": {
333
+ "type": "string"
334
+ },
335
+ "answer": {
336
+ "oneOf": [
337
+ {
338
+ "type": "string"
339
+ },
340
+ {
341
+ "type": "boolean"
342
+ },
343
+ {
344
+ "type": "null"
345
+ }
346
+ ]
347
+ },
348
+ "probabilities": {
349
+ "type": "object",
350
+ "additionalProperties": {
351
+ "type": "number",
352
+ "minimum": 0,
353
+ "maximum": 1
354
+ }
355
+ },
356
+ "confidence": {
357
+ "type": "number",
358
+ "minimum": 0,
359
+ "maximum": 1
360
+ },
361
+ "threshold": {
362
+ "type": "number",
363
+ "minimum": 0,
364
+ "maximum": 1
365
+ }
366
+ }
367
+ }
368
+ },
369
+ "answeredBy": {
370
+ "type": "array",
371
+ "items": {
372
+ "type": "string"
373
+ }
374
+ },
375
+ "askedOn": {
376
+ "type": [
377
+ "string",
378
+ "null"
379
+ ]
380
+ },
381
+ "answeredOn": {
382
+ "type": [
383
+ "string",
384
+ "null"
385
+ ]
386
+ },
387
+ "valid": {
388
+ "type": "boolean"
389
+ },
390
+ "warnings": {
391
+ "type": "array",
392
+ "items": {
393
+ "type": "object",
394
+ "required": [
395
+ "code",
396
+ "message"
397
+ ],
398
+ "properties": {
399
+ "code": {
400
+ "enum": [
401
+ "asset-drift",
402
+ "asset-missing",
403
+ "asset-stale",
404
+ "record-supersedes-pending",
405
+ "record-no-evidence",
406
+ "review-undigested",
407
+ "source-transcript-drift",
408
+ "answer-points-unreadable",
409
+ "answer-point-unknown",
410
+ "answer-point-changed",
411
+ "record-unattested"
412
+ ]
413
+ },
414
+ "message": {
415
+ "type": "string"
416
+ }
417
+ }
418
+ }
419
+ }
420
+ }
421
+ },
422
+ "failure": {
423
+ "description": "Nothing was written. Exit code 1.",
424
+ "type": "object",
425
+ "required": [
426
+ "$schema",
427
+ "contract",
428
+ "verb",
429
+ "error"
430
+ ],
431
+ "properties": {
432
+ "$schema": {
433
+ "const": "https://intentius.io/chant/schemas/workspace/points-write/v1/points-write.schema.json"
434
+ },
435
+ "contract": {
436
+ "const": 1
437
+ },
438
+ "verb": {
439
+ "enum": [
440
+ "ask",
441
+ "answer"
442
+ ]
443
+ },
444
+ "error": {
445
+ "type": "object",
446
+ "required": [
447
+ "code",
448
+ "message"
449
+ ],
450
+ "properties": {
451
+ "code": {
452
+ "enum": [
453
+ "kind-unreadable",
454
+ "kind-invalid",
455
+ "schema-unreadable",
456
+ "schema-id-mismatch",
457
+ "schema-invalid",
458
+ "location-missing",
459
+ "write-usage-invalid",
460
+ "write-input-invalid",
461
+ "points-undeclared",
462
+ "points-invalid",
463
+ "point-unknown",
464
+ "point-inputs-invalid",
465
+ "point-decider-failed",
466
+ "answer-not-candidate",
467
+ "quorum-not-met",
468
+ "record-not-found",
469
+ "record-closed",
470
+ "record-id-taken",
471
+ "record-unparseable",
472
+ "record-schema-invalid",
473
+ "record-id-duplicate",
474
+ "record-supersedes-unknown",
475
+ "record-supersedes-conflict",
476
+ "session-seal-mismatch",
477
+ "session-verdict-unknown-record"
478
+ ]
479
+ },
480
+ "message": {
481
+ "type": "string"
482
+ }
483
+ }
484
+ },
485
+ "question": false
486
+ }
487
+ }
488
+ }
489
+ }