@volter/supercode-orchestrator 0.5.123 → 0.5.124
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 +18 -0
- package/package.json +1 -1
package/board/dispatch.mjs
CHANGED
|
@@ -274,6 +274,21 @@ async function discoverNative(machine, harness, sessionId) {
|
|
|
274
274
|
const complete = page.subagent_rows === 'own' && !(Array.isArray(page.failed) && page.failed.length) && !page.receipt?.truncated && page.next_cursor == null;
|
|
275
275
|
return { sessions: page.sessions, complete };
|
|
276
276
|
}
|
|
277
|
+
/**
|
|
278
|
+
* Whether `session`'s machine holds no session of that id at all: its discovery was read whole (every source, nothing
|
|
279
|
+
* truncated) and has no row for it. A launch that stopped before its first turn (a question on its screen that no
|
|
280
|
+
* input answers) leaves a pane and no transcript, and a harness asked to resume that id exits at once. A reading not
|
|
281
|
+
* taken, or not whole, says nothing.
|
|
282
|
+
*/
|
|
283
|
+
async function nativeAbsent(session) {
|
|
284
|
+
if (!session?.session_id || !session.machine) return false;
|
|
285
|
+
const harness = session.harness ?? 'claude-code';
|
|
286
|
+
try {
|
|
287
|
+
const rows = await readNative(session.machine, harness, session.session_id);
|
|
288
|
+
return discoveries.get(nativeKey(session.machine, harness, session.session_id))?.complete === true
|
|
289
|
+
&& !rows.some((r) => r.locator?.session_id === session.session_id);
|
|
290
|
+
} catch { return false; }
|
|
291
|
+
}
|
|
277
292
|
function nativeReading(rows, session) {
|
|
278
293
|
const row = rows.find(r => r.locator?.session_id === session.session_id && r.locator?.harness === session.harness);
|
|
279
294
|
const presence = row?.activity?.presence;
|
|
@@ -1868,6 +1883,9 @@ async function launchPane(board, task, runId, lane, fleet, { input = null, slot
|
|
|
1868
1883
|
});
|
|
1869
1884
|
// filed in its mailbox, which delivers it
|
|
1870
1885
|
if (input) { assertRunCurrent(board, task.id, runId); await fileMail(board, addressOf(prev), input, `board-run-${task.id}-r${runId}`); }
|
|
1886
|
+
} else if (prev.resumable !== false && await nativeAbsent(prev)) {
|
|
1887
|
+
// nothing to resume and no context to keep: the slot's next session starts fresh
|
|
1888
|
+
replaced = { session_id: prev.session_id, why: `${prev.machine} holds no ${prev.harness ?? 'claude-code'} session of that id (it never took a first turn)`, letGo: true };
|
|
1871
1889
|
} else if (prev.resumable !== false) {
|
|
1872
1890
|
const authorization = view(board, db => currentRun(db,task.id)?.metadata?.supercode?.restart_authorized);
|
|
1873
1891
|
const released = view(board,db=>{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-orchestrator",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.124",
|
|
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": {
|