@volter/supercode-orchestrator 0.4.159 → 0.4.160
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 +6 -4
- package/package.json +1 -1
package/board/dispatch.mjs
CHANGED
|
@@ -147,7 +147,10 @@ const sessionAlive = (fleet, session) => fleet.native?.has(addressOf(session)) ?
|
|
|
147
147
|
/** Native activity comes from the machine's harness discovery, not catalogue age. */
|
|
148
148
|
function nativeSessions(machine, harness) {
|
|
149
149
|
if (offlineMachine(machine)) throw unavailable(`native liveness unavailable: machine ${normalMachine(machine)} is offline`);
|
|
150
|
-
const
|
|
150
|
+
const args = normalMachine(machine) === localMachine()
|
|
151
|
+
? ['teams', 'rpc', 'sessions.discover', JSON.stringify({ harnesses: [harness], limit: 2000 })]
|
|
152
|
+
: ['discover', '--on', machine, '--harness', harness, '--limit', '2000'];
|
|
153
|
+
const result = sc(args, { timeout: 120_000 });
|
|
151
154
|
const page = result.code === 0 ? lastJson(result.stdout) : null;
|
|
152
155
|
if (!Array.isArray(page?.sessions)) throw unavailable(`native liveness unavailable on ${machine}: ${(result.stderr || result.stdout).trim().slice(-300)}`);
|
|
153
156
|
return page.sessions;
|
|
@@ -1427,8 +1430,7 @@ function adoptSession(board, id, who, { workspace = null, ttl, assignee = null,
|
|
|
1427
1430
|
// the session's own working directory, as discovery records it (where `--resume` finds it), else its pane's
|
|
1428
1431
|
let dir = workspace ?? native?.row?.cwd;
|
|
1429
1432
|
if (!dir) {
|
|
1430
|
-
|
|
1431
|
-
dir = (json(r.stdout.trim(), {})?.sessions ?? []).find((x) => x.locator?.session_id === sessionId)?.cwd ?? null;
|
|
1433
|
+
dir = nativeSessions(host, harness).find((x) => x.locator?.session_id === sessionId)?.cwd ?? null;
|
|
1432
1434
|
}
|
|
1433
1435
|
if (!dir && found.pane) {
|
|
1434
1436
|
const r = sc(['teams', 'panes', 'ls', '--machine', host], { timeout: 60_000 });
|
|
@@ -1457,7 +1459,7 @@ function adoptSession(board, id, who, { workspace = null, ttl, assignee = null,
|
|
|
1457
1459
|
if (implementer?.session_id === sessionId) throw new Error('a reviewer must be independent of the implementer session');
|
|
1458
1460
|
}
|
|
1459
1461
|
event(db, id, 'dispatch_released', { reason: 'verified adoption', session: found.address });
|
|
1460
|
-
if (!beforeRun) fire(db, board, entry, id, entry.workflow.run ? entry.workflow.dispatch.start : 'adopt', { roles: ['manager'], payload: { lock: claimer() } });
|
|
1462
|
+
if (!beforeRun) fire(db, board, entry, id, entry.workflow.run ? entry.workflow.dispatch.start : 'adopt', { roles: [entry.workflow.run ? 'platform' : 'manager'], payload: { lock: claimer() } });
|
|
1461
1463
|
const runId = getTask(db, id).current_run_id;
|
|
1462
1464
|
if (!runId) throw new Error(`${id} waits on parents that are not done`);
|
|
1463
1465
|
const session = { surface: found.pane ? 'pane' : 'native', session_id: sessionId, harness, machine: host, pane: found.pane ?? null, address: found.address, mode: 'adopt', launched_at: now(), seen_at: now() };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-orchestrator",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.160",
|
|
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": {
|