@volter/supercode-orchestrator 0.4.66 → 0.4.67
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 +3 -1
- package/board/dispatch.mjs +2 -0
- package/board/store.mjs +7 -1
- package/package.json +1 -1
package/board/cli.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { basename, join, resolve } from 'node:path';
|
|
|
10
10
|
import { tmpdir } from 'node:os';
|
|
11
11
|
import { read } from '../orchestration.mjs';
|
|
12
12
|
import { holdDispatcherLock } from '../hermes-locks.mjs';
|
|
13
|
-
import { backingOf, boardExists, boardPath, DEFAULT_BOARD, event, json, listBoards, logsDir, now, openBoard, tx } from './store.mjs';
|
|
13
|
+
import { backingOf, boardExists, boardPath, DEFAULT_BOARD, event, json, listBoards, logsDir, now, openBoard, setActor, tx } from './store.mjs';
|
|
14
14
|
import * as engine from './engine.mjs';
|
|
15
15
|
import { adoptSession, boardAddress, boardLabel, boardSettings, callerSession, lanesOf, localMachine, observeFleet, paused, plan, startCard, tick } from './dispatch.mjs';
|
|
16
16
|
import { loadWorkflow, statusOf, useWorkflow, workflowEntry, workflowFor } from './workflow.mjs';
|
|
@@ -234,6 +234,8 @@ export async function runWorkflow(argv) {
|
|
|
234
234
|
|
|
235
235
|
// a caller that is a card's own session (its harness names it; the board recorded which session it launched)
|
|
236
236
|
const sid = callerSession();
|
|
237
|
+
// what this command records is the calling session's act (its address, as its subscriptions name it)
|
|
238
|
+
if (sid) setActor(`sc:${localMachine()}:${sid === process.env.CODEX_THREAD_ID ? 'codex' : 'claude-code'}:${sid}`);
|
|
237
239
|
if (sid && !READS.has(verb) && boardExists(root, slug)) {
|
|
238
240
|
withBoard((b) => { const own = ownCard(b.db, sid); if (own) authorize(b.db, verb, rest, args, own); });
|
|
239
241
|
}
|
package/board/dispatch.mjs
CHANGED
|
@@ -931,6 +931,8 @@ async function notify(board, fleet, report, entry) {
|
|
|
931
931
|
try {
|
|
932
932
|
for (const ev of events) {
|
|
933
933
|
const p = json(ev.payload, {}) ?? {};
|
|
934
|
+
// nobody is told of their own act
|
|
935
|
+
if (p.by && p.by === sub.chat_id) { cursor = ev.id; continue; }
|
|
934
936
|
let text;
|
|
935
937
|
if (ev.kind === 'commented') {
|
|
936
938
|
if (p.author === sub.chat_id) { cursor = ev.id; continue; }
|
package/board/store.mjs
CHANGED
|
@@ -196,8 +196,14 @@ export function json(text, fallback = null) {
|
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
/** Append one event to a card's thread (Hermes's `task_events`); answers its id. */
|
|
199
|
+
// the session whose command this process runs (its address), set by the CLI: each event it records says who acted
|
|
200
|
+
// (`by`), so the session is not told of its own act
|
|
201
|
+
let actor = null;
|
|
202
|
+
export function setActor(address) { actor = address || null; }
|
|
203
|
+
|
|
199
204
|
export function event(db, taskId, kind, payload = null, runId = null) {
|
|
205
|
+
const said = actor && !(payload && 'by' in payload) ? { ...(payload ?? {}), by: actor } : payload;
|
|
200
206
|
const r = db.prepare('INSERT INTO task_events (task_id, run_id, kind, payload, created_at) VALUES (?, ?, ?, ?, ?)')
|
|
201
|
-
.run(taskId, runId, kind,
|
|
207
|
+
.run(taskId, runId, kind, said ? JSON.stringify(said) : null, now());
|
|
202
208
|
return Number(r.lastInsertRowid);
|
|
203
209
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/supercode-orchestrator",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.67",
|
|
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": {
|