@volter/supercode-orchestrator 0.5.89 → 0.5.91
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 +2 -2
- package/board/engine.mjs +4 -2
- package/board/workflow.mjs +5 -1
- package/package.json +2 -2
package/board/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// `supercode workflow <verb>` (docs/architecture/orchestrator.md §2.9): supercode's own board, in Hermes Kanban's
|
|
2
2
|
// format, and its dispatcher. Every verb of `hermes kanban` is here under its own name, with its own flags and its own
|
|
3
|
-
// output lines, so a caller of Hermes's CLI calls this one unchanged; supercode's own verbs (`
|
|
3
|
+
// output lines, so a caller of Hermes's CLI calls this one unchanged; supercode's own verbs (`set`, `adopt`, `close`,
|
|
4
4
|
// `serve`, `--at`) are added beside them. The Rust CLI hands every verb but `load` to `bin/orchestrator.mjs workflow`,
|
|
5
5
|
// which lands here. The home is `--root`, else `SUPERCODE_ORCHESTRATOR_HOME`; the board is
|
|
6
6
|
// `--board <slug>`, else `HERMES_KANBAN_BOARD`, else the home's current board (`kanban/current`), else `default`.
|
|
@@ -123,7 +123,7 @@ And:
|
|
|
123
123
|
create … --machine M --subtask-of ARC --notify ADDRESS|--no-notify --no-start
|
|
124
124
|
With a pane lane and room, a card starts at once and answers "started" with its session; else it answers why it
|
|
125
125
|
waits, and its creator is told when it starts. A subtask is worked by its arc's session and never starts alone.
|
|
126
|
-
|
|
126
|
+
adopt <id> <session> [--assignee P] [--role ROLE] close <id> serve (= daemon) list --machine M
|
|
127
127
|
notify-subscribe <id> --address sc:<machine>:<harness>:<id> [--role creator|worker|dependency]
|
|
128
128
|
notify-subscribe <dependency> --for-card <your-arc>: subscribe only your arc's session to dependency notices.
|
|
129
129
|
notify-unsubscribe <dependency> --for-card <your-arc>: remove that arc's subscription only.
|
package/board/engine.mjs
CHANGED
|
@@ -327,7 +327,9 @@ function wouldCycle(db, parent, child) {
|
|
|
327
327
|
/**
|
|
328
328
|
* Set one of a card's properties (`assignee`, `machine`, `model`, `every`) through the workflow's `set` verb, whose
|
|
329
329
|
* rules say who may and what follows: a change to how its session runs ends a live run and lets the dispatcher start
|
|
330
|
-
* the next one itself.
|
|
330
|
+
* the next one itself. Every workflow the board ships declares `set`, Hermes's built-in one too. A built-in workflow
|
|
331
|
+
* from a native binary released before its `set` (the orchestrator and the native install separately) still has a verb
|
|
332
|
+
* per property: it is answered so until that native is gone from the fleet, then this fallback is deleted (t_530ce43e).
|
|
331
333
|
*/
|
|
332
334
|
export const SETTABLE = ['assignee', 'machine', 'model', 'every'];
|
|
333
335
|
export function set(board, id, field, value, { provider = null, roles } = {}) {
|
|
@@ -978,7 +980,7 @@ export function diagnose(db, task, { failureLimit = DEFAULT_FAILURE_LIMIT, stran
|
|
|
978
980
|
out.push({ kind: 'prose_phantom_refs', severity: 'warning', title: 'its completion summary names card ids no card has', data: json(phantom.payload, {}) ?? {}, actions: [`supercode workflow edit ${task.id} --result <corrected>`] });
|
|
979
981
|
}
|
|
980
982
|
const lost = events.filter((e) => e.kind === 'session_lost' && t - e.created_at < 24 * 3600).length;
|
|
981
|
-
if (lost >= 2) out.push({ kind: 'repeated_session_loss', severity: 'warning', title: `its session was lost ${lost}x in 24h`, data: { lost }, actions: [`supercode workflow
|
|
983
|
+
if (lost >= 2) out.push({ kind: 'repeated_session_loss', severity: 'warning', title: `its session was lost ${lost}x in 24h`, data: { lost }, actions: [`supercode workflow set ${task.id} machine <machine>`] });
|
|
982
984
|
const crashes = events.filter((e) => e.kind === 'crashed' && t - e.created_at < 24 * 3600).length;
|
|
983
985
|
if (crashes >= 2) out.push({ kind: 'repeated_crashes', severity: 'error', title: `its worker crashed ${crashes}x in 24h`, data: { crashes }, actions: [`supercode workflow log ${task.id}`] });
|
|
984
986
|
if (task.status === 'blocked') {
|
package/board/workflow.mjs
CHANGED
|
@@ -562,6 +562,10 @@ export function fire(db, board, entry, id, name, { roles = [], payload = {}, ext
|
|
|
562
562
|
throw new Error(`${id} is ${from}; ${name.replace(/_/g, '-')} there is for ${[...new Set(candidates.flatMap((t) => t.by ?? []))].join(' or ')}. ${candidates.map((t) => t.description).filter(Boolean).join(' ')}${request}`);
|
|
563
563
|
}
|
|
564
564
|
const taken = allowed.find((t) => holds(t.guard ?? null, scope));
|
|
565
|
+
// none of the sender's rules holds, but another role's does (one verb with a rule per case, as `set` has one per
|
|
566
|
+
// field): it is that role's to send
|
|
567
|
+
const theirs = taken ? [] : candidates.filter((t) => !allowed.includes(t) && holds(t.guard ?? null, scope));
|
|
568
|
+
if (theirs.length) throw new Error(`${id} is ${from}; ${name.replace(/_/g, '-')} there is for ${[...new Set(theirs.flatMap((t) => t.by ?? []))].join(' or ')}. ${theirs.map((t) => t.description).filter(Boolean).join(' ')}`);
|
|
565
569
|
if (!taken) {
|
|
566
570
|
const state = scope.card;
|
|
567
571
|
const reasons = [state.paused && `paused: ${state.paused.reason ?? 'manager pause'}`,
|
|
@@ -745,7 +749,7 @@ const FORMAT = {
|
|
|
745
749
|
decomposed: ({ e }) => ({ children: e.children ?? [], author: e.author ?? 'user' }),
|
|
746
750
|
edited: ({ e }) => ({ fields: ['result', 'summary', ...(e.metadata !== undefined ? ['metadata'] : [])], result_len: e.result ? String(e.result).length : 0, summary: firstLine(e.summary ?? e.result) }),
|
|
747
751
|
assigned: ({ after }) => ({ assignee: after.assignee ?? null }),
|
|
748
|
-
model_override_set: ({ e }) => ({ model: e.model || null, provider: e.provider || null }),
|
|
752
|
+
model_override_set: ({ e }) => ({ model: (e.field === 'model' ? e.value : e.model) || null, provider: e.provider || null }),
|
|
749
753
|
goal_set: ({ after }) => ({ goal_mode: Boolean(after.goal_mode), goal_max_turns: after.goal_mode ? after.goal_max_turns ?? null : null }),
|
|
750
754
|
heartbeat: ({ e }) => (e.note || e.until ? { ...(e.note ? { note: e.note } : {}), ...(e.until ? { until: Number(e.until) } : {}) } : null),
|
|
751
755
|
commented: ({ e }) => ({ author: String(e.author ?? 'user').trim(), len: String(e.body ?? '').length }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-orchestrator",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.91",
|
|
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": {
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@volter/supercode-harness-sdk": "^0.3.60",
|
|
28
|
-
"@volter/teams": "0.2.
|
|
28
|
+
"@volter/teams": "0.2.34",
|
|
29
29
|
"@volter/ztrack": "^2.4.23",
|
|
30
30
|
"yaml": "^2.9.0"
|
|
31
31
|
},
|