@volter/supercode-orchestrator 0.4.72 → 0.4.73

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/board/cli.mjs CHANGED
@@ -391,9 +391,14 @@ export async function runWorkflow(argv) {
391
391
  if (t.result) out.push('', 'Result:', t.result);
392
392
  else if (latest) out.push('', 'Latest summary:', latest);
393
393
  if (card.comments.length) { out.push('', `Comments (${card.comments.length}):`); for (const c of card.comments) out.push(` [${ts(c.created_at)}] ${c.author}: ${c.body}`); }
394
- if (card.events.length) {
395
- out.push('', `Events (${card.events.length}):`);
396
- for (const e of card.events.slice(-20)) out.push(` [${ts(e.created_at)}]${e.run_id ? ` [run ${e.run_id}]` : ''} ${e.kind}${e.payload ? ` ${JSON.stringify(e.payload)}` : ''}`);
394
+ // the card's history, without the board's own bookkeeping (a claim, a session kept or started, a goal ask, a
395
+ // message queued); `--all` shows every event, `--json` always does
396
+ const PLUMBING = new Set(['claimed', 'session_started', 'session_resumed', 'session_adopted', 'session_replaced', 'session_closed',
397
+ 'goal_set', 'goal_continued', 'decision_asked', 'board_message', 'board_message_sent', 'heartbeat', 'promoted', 'respawn_guarded']);
398
+ const history = args.all ? card.events : card.events.filter((e) => !PLUMBING.has(e.kind));
399
+ if (history.length) {
400
+ out.push('', `Events (${history.length}${history.length < card.events.length ? ` of ${card.events.length}; --all shows every one` : ''}):`);
401
+ for (const e of history.slice(-20)) out.push(` [${ts(e.created_at)}]${e.run_id ? ` [run ${e.run_id}]` : ''} ${e.kind}${e.payload ? ` ${JSON.stringify(e.payload)}` : ''}`);
397
402
  }
398
403
  if (card.runs.length) {
399
404
  out.push('', `Runs (${card.runs.length}):`);
@@ -92,15 +92,20 @@ function answerTo(id) {
92
92
  }
93
93
 
94
94
  const OPEN_OUTCOME = /^(\s*[-*] )\[ \] (.+)$/;
95
- /** Whether `body` is `was` with only outcomes ticked: each changed line was `- [ ] X` and is now `- [x] X` or
96
- * `- [x] X: <pointer>`; no other line added, removed or changed. */
95
+ /** Whether `body` is `was` with only outcomes ticked: each changed line is under the Acceptance heading, was `- [ ] X`
96
+ * and is now `- [x] X` or `- [x] X: <pointer>`; no other line added, removed or changed. */
97
97
  function onlyTicks(was, body) {
98
98
  if (typeof body !== 'string') return false;
99
99
  const before = String(was ?? '').split('\n');
100
100
  const after = body.split('\n');
101
101
  if (before.length !== after.length) return false;
102
+ // an outcome is a line of the card's Acceptance section (its heading at any level), not a task or any other checkbox
103
+ let section = null;
102
104
  return before.every((line, i) => {
105
+ const heading = /^#{1,6}\s+(.+?)\s*$/.exec(line);
106
+ if (heading) section = heading[1].toLowerCase();
103
107
  if (line === after[i]) return true;
108
+ if (section !== 'acceptance') return false;
104
109
  const open = OPEN_OUTCOME.exec(line);
105
110
  if (!open) return false;
106
111
  const ticked = `${open[1]}[x] ${open[2]}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-orchestrator",
3
- "version": "0.4.72",
3
+ "version": "0.4.73",
4
4
  "type": "module",
5
5
  "description": "The orchestrator runtime over the Volter Harness ontology: one typed operational model whose folder is its serialization, read and written through the harness orchestration doors (docs/ORCHESTRATOR-IR.md)",
6
6
  "exports": {