@intentius/chant 0.95.0 → 0.96.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.
- package/dist/cli/main.d.ts.map +1 -1
- package/dist/cli/mcp/server.d.ts +10 -4
- package/dist/cli/mcp/server.d.ts.map +1 -1
- package/dist/cli/registry.d.ts +9 -1
- package/dist/cli/registry.d.ts.map +1 -1
- package/dist/lifecycle/run-ledger.d.ts +2 -0
- package/dist/lifecycle/run-ledger.d.ts.map +1 -1
- package/dist/op/activities/shell.d.ts.map +1 -1
- package/dist/op/index.d.ts +2 -0
- package/dist/op/index.d.ts.map +1 -1
- package/dist/op/local-executor.d.ts.map +1 -1
- package/dist/op/operator.d.ts.map +1 -1
- package/dist/op/run-live.d.ts +127 -0
- package/dist/op/run-live.d.ts.map +1 -0
- package/dist/op/runtime.d.ts +2 -0
- package/dist/op/runtime.d.ts.map +1 -1
- package/dist/workspace/checks/diagrams.d.ts +5 -0
- package/dist/workspace/checks/diagrams.d.ts.map +1 -1
- package/dist/workspace/declaration.d.ts +5 -5
- package/dist/workspace/declaration.d.ts.map +1 -1
- package/dist/workspace/declaration.schema.json +50 -7
- package/dist/workspace/intent-cli.d.ts +6 -0
- package/dist/workspace/intent-cli.d.ts.map +1 -1
- package/dist/workspace/intent-record.d.ts +145 -0
- package/dist/workspace/intent-record.d.ts.map +1 -0
- package/dist/workspace/intent.d.ts +46 -1
- package/dist/workspace/intent.d.ts.map +1 -1
- package/dist/workspace/ls.d.ts +2 -2
- package/dist/workspace/ls.d.ts.map +1 -1
- package/dist/workspace/patch.d.ts +122 -0
- package/dist/workspace/patch.d.ts.map +1 -0
- package/dist/workspace/points-cli.d.ts +8 -0
- package/dist/workspace/points-cli.d.ts.map +1 -1
- package/dist/workspace/reason-codes.d.ts +2 -0
- package/dist/workspace/reason-codes.d.ts.map +1 -1
- package/dist/workspace/record-decided.d.ts +36 -0
- package/dist/workspace/record-decided.d.ts.map +1 -0
- package/dist/workspace/records-cli.d.ts +8 -0
- package/dist/workspace/records-cli.d.ts.map +1 -1
- package/dist/workspace/status-stewards.d.ts +79 -12
- package/dist/workspace/status-stewards.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/cli/main.test.ts +16 -0
- package/src/cli/main.ts +34 -3
- package/src/cli/mcp/server.test.ts +14 -0
- package/src/cli/mcp/server.ts +10 -4
- package/src/cli/registry.ts +9 -1
- package/src/lifecycle/run-ledger.ts +7 -1
- package/src/op/activities/shell.ts +4 -1
- package/src/op/index.ts +2 -0
- package/src/op/local-executor.ts +51 -3
- package/src/op/operator.ts +2 -11
- package/src/op/run-live.test.ts +111 -0
- package/src/op/run-live.ts +305 -0
- package/src/op/runtime.ts +2 -0
- package/src/op/steward-points.test.ts +81 -0
- package/src/workspace/checks/diagrams.test.ts +24 -0
- package/src/workspace/checks/diagrams.ts +10 -3
- package/src/workspace/declaration.schema.json +50 -7
- package/src/workspace/declaration.test.ts +18 -0
- package/src/workspace/declaration.ts +7 -7
- package/src/workspace/intent-cli.ts +47 -1
- package/src/workspace/intent-record.schema.json +529 -0
- package/src/workspace/intent-record.test.ts +257 -0
- package/src/workspace/intent-record.ts +371 -0
- package/src/workspace/intent.schema.json +33 -1
- package/src/workspace/intent.ts +29 -12
- package/src/workspace/ls-contract.test.ts +14 -0
- package/src/workspace/ls.schema.json +3 -3
- package/src/workspace/ls.ts +3 -3
- package/src/workspace/patch.schema.json +321 -0
- package/src/workspace/patch.test.ts +198 -0
- package/src/workspace/patch.ts +377 -0
- package/src/workspace/points-cli.ts +18 -0
- package/src/workspace/read-contract.test.ts +29 -1
- package/src/workspace/reason-codes.test.ts +2 -0
- package/src/workspace/reason-codes.ts +3 -0
- package/src/workspace/record-decided.ts +107 -0
- package/src/workspace/records-cli.ts +12 -0
- package/src/workspace/records.schema.json +15 -0
- package/src/workspace/status-contract.test.ts +76 -2
- package/src/workspace/status-stewards.ts +149 -27
- package/src/workspace/status.schema.json +69 -6
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"type": "array",
|
|
205
205
|
"items": {
|
|
206
206
|
"type": "object",
|
|
207
|
-
"required": ["name", "schedule", "env", "lastRun", "lastTick", "changesCheckout", "workLease", "beside"],
|
|
207
|
+
"required": ["name", "schedule", "env", "lastRun", "inFlight", "lastTick", "changesCheckout", "workLease", "beside"],
|
|
208
208
|
"properties": {
|
|
209
209
|
"name": { "type": "string" },
|
|
210
210
|
"schedule": {
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
{ "type": "null" },
|
|
226
226
|
{
|
|
227
227
|
"type": "object",
|
|
228
|
-
"required": ["id", "status", "started", "ended", "gate", "point"],
|
|
228
|
+
"required": ["id", "status", "started", "ended", "gate", "point", "phases"],
|
|
229
229
|
"properties": {
|
|
230
230
|
"id": { "type": "string" },
|
|
231
231
|
"status": { "enum": ["ok", "fail", "gated", "waiting"], "description": "waiting: an activity asked a decision point that is still open (#2749), and the run stopped there." },
|
|
@@ -247,8 +247,62 @@
|
|
|
247
247
|
]
|
|
248
248
|
},
|
|
249
249
|
"point": {
|
|
250
|
-
"description": "The
|
|
250
|
+
"description": "The decision point a waiting run stopped on (#2749), or null. Its state is the question's now, as `points` reads it: `answered` once a person has answered it. When the questions can't be read, or the answer record is gone, it is the state the run ledger recorded.",
|
|
251
251
|
"oneOf": [{ "type": "null" }, { "$ref": "#/$defs/stewardWait" }]
|
|
252
|
+
},
|
|
253
|
+
"phases": {
|
|
254
|
+
"description": "Each phase of the run in execution order, with its verdict and its wall-clock time in milliseconds. For a record written before chant kept phase times, durationMs is the sum of its steps' times. A phase skipped whole has 0. Added by chant 0.96.0.",
|
|
255
|
+
"type": "array",
|
|
256
|
+
"items": { "$ref": "#/$defs/runPhase" }
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
"inFlight": {
|
|
263
|
+
"description": "The run of the Op in flight now, or null when none is. A run that writes to the run ledger keeps a record beside the checkout's git directory while it runs and removes it once its ledger record is written; a record whose process on this host is gone is not in flight. phase and step are what it is doing now (step is the newest step still running, named by its id, or its activity when it has none), phases the phases it has finished, and activity the newest lines its steps reported (a shell step appends them to the file in CHANT_RUN_ACTIVITY), with seq counting from 1 over the run and total the count so far. item is the work item its lease holds, once claimed. Added by chant 0.96.0.",
|
|
264
|
+
"oneOf": [
|
|
265
|
+
{ "type": "null" },
|
|
266
|
+
{
|
|
267
|
+
"type": "object",
|
|
268
|
+
"required": ["id", "started", "updated", "steward", "item", "phase", "step", "phases", "activity"],
|
|
269
|
+
"properties": {
|
|
270
|
+
"id": { "type": "string", "description": "The run's id: the id its ledger record will have." },
|
|
271
|
+
"started": { "type": "string" },
|
|
272
|
+
"updated": { "type": "string", "description": "When the run last changed its record." },
|
|
273
|
+
"steward": { "type": ["string", "null"] },
|
|
274
|
+
"item": { "type": ["string", "null"] },
|
|
275
|
+
"phase": {
|
|
276
|
+
"oneOf": [
|
|
277
|
+
{ "type": "null" },
|
|
278
|
+
{ "type": "object", "required": ["name", "started"], "properties": { "name": { "type": "string" }, "started": { "type": "string" } } }
|
|
279
|
+
]
|
|
280
|
+
},
|
|
281
|
+
"step": {
|
|
282
|
+
"oneOf": [
|
|
283
|
+
{ "type": "null" },
|
|
284
|
+
{
|
|
285
|
+
"type": "object",
|
|
286
|
+
"required": ["name", "fn", "started"],
|
|
287
|
+
"properties": { "name": { "type": "string" }, "fn": { "type": "string" }, "started": { "type": "string" } }
|
|
288
|
+
}
|
|
289
|
+
]
|
|
290
|
+
},
|
|
291
|
+
"phases": { "type": "array", "items": { "$ref": "#/$defs/runPhase" } },
|
|
292
|
+
"activity": {
|
|
293
|
+
"type": "object",
|
|
294
|
+
"required": ["total", "lines"],
|
|
295
|
+
"properties": {
|
|
296
|
+
"total": { "type": "integer" },
|
|
297
|
+
"lines": {
|
|
298
|
+
"type": "array",
|
|
299
|
+
"items": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"required": ["seq", "at", "text"],
|
|
302
|
+
"properties": { "seq": { "type": "integer" }, "at": { "type": ["string", "null"] }, "text": { "type": "string" } }
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
}
|
|
252
306
|
}
|
|
253
307
|
}
|
|
254
308
|
}
|
|
@@ -363,7 +417,7 @@
|
|
|
363
417
|
}
|
|
364
418
|
},
|
|
365
419
|
"waiting": {
|
|
366
|
-
"description": "The open decision points the steward waits on (#2749): one for each Op whose newest run is the steward's own (its ledger record names the steward) and stopped on a question: the steward's own Ops in ops order, then any other Op of the member, such as one the steward's process starts itself (studio#137), by name. The state is the question's
|
|
420
|
+
"description": "The open decision points the steward waits on (#2749): one for each Op whose newest run is the steward's own (its ledger record names the steward) and stopped on a question that is still open: the steward's own Ops in ops order, then any other Op of the member, such as one the steward's process starts itself (studio#137), by name. The state is the question's now, as `chant workspace points --open` reads it, where hud asks a person. A question answered since, or whose answer record is gone, is not listed, and nor is one whose Op has a newer run in flight: the Op's lease or one of its work leases was taken after the waiting run ended and is still held. When the questions can't be read, the run ledger's state stands. The steward never answers one, and runs an Op it lists again on the first round after it is answered (an Op beside its turns, in a process of its own, #2861).",
|
|
367
421
|
"type": "array",
|
|
368
422
|
"items": {
|
|
369
423
|
"allOf": [
|
|
@@ -371,20 +425,29 @@
|
|
|
371
425
|
{
|
|
372
426
|
"type": "object",
|
|
373
427
|
"required": ["op", "run"],
|
|
374
|
-
"properties": { "op": { "type": "string" }, "run": { "type": "string", "description": "The waiting run's id." } }
|
|
428
|
+
"properties": { "op": { "type": "string" }, "run": { "type": "string", "description": "The waiting run's id." }, "state": { "enum": ["escalated", "proposed"] } }
|
|
375
429
|
}
|
|
376
430
|
]
|
|
377
431
|
}
|
|
378
432
|
}
|
|
379
433
|
}
|
|
380
434
|
},
|
|
435
|
+
"runPhase": {
|
|
436
|
+
"type": "object",
|
|
437
|
+
"required": ["name", "status", "durationMs"],
|
|
438
|
+
"properties": {
|
|
439
|
+
"name": { "type": "string" },
|
|
440
|
+
"status": { "enum": ["ok", "fail", "skipped"] },
|
|
441
|
+
"durationMs": { "type": "number" }
|
|
442
|
+
}
|
|
443
|
+
},
|
|
381
444
|
"stewardWait": {
|
|
382
445
|
"type": "object",
|
|
383
446
|
"required": ["id", "point", "state", "path", "subject", "since"],
|
|
384
447
|
"properties": {
|
|
385
448
|
"id": { "type": "string", "description": "The answer record's id, as `points` lists the question and `points answer` names it." },
|
|
386
449
|
"point": { "type": "string" },
|
|
387
|
-
"state": { "enum": ["escalated", "proposed"] },
|
|
450
|
+
"state": { "enum": ["escalated", "proposed", "answered"], "description": "The question's state now, as `points` reads it, or the state the run ledger recorded when the questions can't be read or the record is gone. Never `answered` in a steward's `waiting`." },
|
|
388
451
|
"path": { "type": "string", "description": "The answer record, from the repository root." },
|
|
389
452
|
"subject": { "type": ["string", "null"] },
|
|
390
453
|
"since": { "type": "string", "description": "When the run stopped on it." }
|