@volter/supercode-orchestrator 0.4.40 → 0.4.42
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/dispatch.mjs +8 -9
- package/board/workflow.mjs +1 -1
- package/package.json +1 -1
package/board/dispatch.mjs
CHANGED
|
@@ -595,10 +595,10 @@ function launchPane(board, task, runId, lane, fleet, { input = null, slot = 'wor
|
|
|
595
595
|
tx(board, (db) => {
|
|
596
596
|
setRunSession(db, runId, session);
|
|
597
597
|
event(db, task.id, kind, { session_id: session.session_id, machine, pane: session.pane, address: session.address, mode: session.mode, ...(replaced ? { replaced } : {}) }, runId);
|
|
598
|
-
// the working session hears updates to its card;
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
598
|
+
// the working session hears updates to its card; the slot's previous session no longer does (a reviewer starting
|
|
599
|
+
// leaves the implementer's, and a subtask's arc session's, subscription alone)
|
|
600
|
+
const before = prev ? prev.address ?? `sc:${prev.machine}:claude-code:${prev.session_id}` : null;
|
|
601
|
+
if (before && before !== session.address) db.prepare("DELETE FROM kanban_notify_subs WHERE task_id = ? AND platform = 'supercode' AND chat_id = ?").run(task.id, before);
|
|
602
602
|
subscribeIn(db, task.id, session.address, 'worker');
|
|
603
603
|
// it sees the cards its own depends on change, and works its subtasks
|
|
604
604
|
for (const p of db.prepare('SELECT parent_id FROM task_links WHERE child_id = ?').all(task.id)) subscribeIn(db, p.parent_id, session.address, 'dependency');
|
|
@@ -783,11 +783,10 @@ async function notify(board, fleet, report, entry) {
|
|
|
783
783
|
// each subscription's notices go in order; different subscribers are told side by side
|
|
784
784
|
await pool(subscriptions(board.db).filter((sub) => sub.platform === 'supercode'), SEND_CONCURRENCY, async (sub) => {
|
|
785
785
|
const role = ['worker', 'dependency'].includes(sub.delivery_metadata?.role) ? sub.delivery_metadata.role : 'creator';
|
|
786
|
-
// a session
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}
|
|
786
|
+
// a session the fleet does not list this tick is told next tick: one reading is not a loss (a loaded box drops
|
|
787
|
+
// sessions from a read, and a dropped subscription never came back), and a session that is replaced on its card
|
|
788
|
+
// has its subscription moved when the new one starts
|
|
789
|
+
if (role !== 'creator' && fleet.ok && !fleet.alive.has(sub.chat_id)) return;
|
|
791
790
|
const kinds = heardBy(entry, role);
|
|
792
791
|
if (!kinds.length) return;
|
|
793
792
|
const events = board.db.prepare(`SELECT id, kind, payload, created_at FROM task_events WHERE task_id = ? AND id > ? AND kind IN (${kinds.map(() => '?').join(', ')}) ORDER BY id`)
|
package/board/workflow.mjs
CHANGED
|
@@ -94,7 +94,7 @@ export function scopeOf(db, board, task, { params, event = {}, extra = {} } = {}
|
|
|
94
94
|
goal_mode: Boolean(task.goal_mode),
|
|
95
95
|
implementer: asked.implementer ?? task.assignee,
|
|
96
96
|
last_reviewer: changes.reviewer ?? null,
|
|
97
|
-
arc: task.subtask_of ? one(db, 'SELECT id, status, title, assignee FROM tasks WHERE id = ?', task.subtask_of) ?? null : null,
|
|
97
|
+
arc: task.subtask_of ? one(db, 'SELECT id, status, title, body, assignee FROM tasks WHERE id = ?', task.subtask_of) ?? null : null,
|
|
98
98
|
// the cards filed as its subtasks (`create --subtask-of`), in the order they were filed
|
|
99
99
|
subtasks: all(db, 'SELECT t.id, t.status, t.title, t.assignee FROM tasks t JOIN supercode_cards c ON c.task_id = t.id WHERE c.subtask_of = ? ORDER BY t.created_at', task.id),
|
|
100
100
|
queue_reason: json(one(db, "SELECT payload FROM task_events WHERE task_id = ? AND kind = 'respawn_guarded' AND created_at >= ? ORDER BY id DESC LIMIT 1",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-orchestrator",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.42",
|
|
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": {
|