@volter/supercode-orchestrator 0.5.102 → 0.5.104

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/call.mjs CHANGED
@@ -16,7 +16,7 @@ import { AsyncLocalStorage } from 'node:async_hooks';
16
16
 
17
17
  const calls = new AsyncLocalStorage();
18
18
  // what a call learns as it runs, and the workflow it read (pinned: a reload while it runs does not change its basis)
19
- const fresh = () => ({ actor: null, principal: null, roles: () => ['manager'], recorded: null, workflows: new Map(), said: new Set() });
19
+ const fresh = () => ({ actor: null, principal: null, roles: () => ['manager'], recorded: null, workflows: new Map(), agentMains: new Map(), said: new Set() });
20
20
  // the process's own context pins no workflow (it lives as long as the process): its reads always take the latest
21
21
  const unpinned = { get: () => undefined, set: () => {} };
22
22
  const own = { kind: 'own', caller: null, facts: process.env, ...fresh(), workflows: unpinned, get cwd() { return process.cwd(); }, get stdin() { return readFileSync(0, 'utf8'); }, out: (text) => process.stdout.write(text), err: (text) => process.stderr.write(text) };
package/board/cli.mjs CHANGED
@@ -1375,8 +1375,10 @@ const READS = new Set(['list', 'ls', 'show', 'context', 'runs', 'log', 'tail', '
1375
1375
  /** The main session of each agent the workflow names a manager (`sc:<machine>:agent:<name>`), asked of this machine's
1376
1376
  * daemon, which keeps agents' records (mail step 1c), once per call before its verb runs: a manager named by its agent
1377
1377
  * address is that agent's main session on the board. None for an agent the daemon does not know, or when it is down. */
1378
- const agentMains = new Map();
1379
1378
  async function readAgentMains(root) {
1379
+ // A lookup belongs to this call, including a refusal. A startup miss must not become the resident owner's
1380
+ // permanent answer, and a replacement main must revoke the old main's manager role on the next call.
1381
+ const agentMains = current().agentMains = new Map();
1380
1382
  const managers = [(await loadWorkflow(root).catch(() => null))?.params?.managers ?? []].flat().map(String);
1381
1383
  for (const address of managers) {
1382
1384
  const name = /^sc:[^:\s]+:agent:([^:\s]+)$/.exec(address)?.[1];
@@ -1387,7 +1389,7 @@ async function readAgentMains(root) {
1387
1389
  agentMains.set(address, typeof main === 'string' && main ? main : null);
1388
1390
  }
1389
1391
  }
1390
- function agentMain(address) { return agentMains.get(address) ?? null; }
1392
+ function agentMain(address) { return current().agentMains.get(address) ?? null; }
1391
1393
 
1392
1394
  /**
1393
1395
  * Who a caller is on card `cardId`, in the workflow's roles: a signed-in terminal person retains their creator role;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volter/supercode-orchestrator",
3
- "version": "0.5.102",
3
+ "version": "0.5.104",
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.41",
28
+ "@volter/teams": "0.2.42",
29
29
  "@volter/ztrack": "^2.4.23",
30
30
  "yaml": "^2.9.0"
31
31
  },