@monoes/monomindcli 2.9.20 → 2.9.22
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/.claude/helpers/control-start.cjs +7 -1
- package/.claude/skills/mastermind-createorg/SKILL.md +26 -3
- package/dist/src/commands/events.d.ts +9 -0
- package/dist/src/commands/events.d.ts.map +1 -0
- package/dist/src/commands/events.js +89 -0
- package/dist/src/commands/events.js.map +1 -0
- package/dist/src/commands/index.d.ts +1 -1
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +2 -1
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/org-observe.d.ts +21 -0
- package/dist/src/commands/org-observe.d.ts.map +1 -1
- package/dist/src/commands/org-observe.js +88 -6
- package/dist/src/commands/org-observe.js.map +1 -1
- package/dist/src/commands/org.d.ts.map +1 -1
- package/dist/src/commands/org.js +20 -0
- package/dist/src/commands/org.js.map +1 -1
- package/dist/src/orgrt/approvals.d.ts +16 -1
- package/dist/src/orgrt/approvals.d.ts.map +1 -1
- package/dist/src/orgrt/approvals.js +44 -2
- package/dist/src/orgrt/approvals.js.map +1 -1
- package/dist/src/orgrt/copilot-runner.d.ts +14 -0
- package/dist/src/orgrt/copilot-runner.d.ts.map +1 -0
- package/dist/src/orgrt/copilot-runner.js +250 -0
- package/dist/src/orgrt/copilot-runner.js.map +1 -0
- package/dist/src/orgrt/crush-runner.d.ts +24 -0
- package/dist/src/orgrt/crush-runner.d.ts.map +1 -0
- package/dist/src/orgrt/crush-runner.js +251 -0
- package/dist/src/orgrt/crush-runner.js.map +1 -0
- package/dist/src/orgrt/daemon.d.ts +40 -1
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +68 -4
- package/dist/src/orgrt/daemon.js.map +1 -1
- package/dist/src/orgrt/grok-runner.d.ts +18 -0
- package/dist/src/orgrt/grok-runner.d.ts.map +1 -0
- package/dist/src/orgrt/grok-runner.js +323 -0
- package/dist/src/orgrt/grok-runner.js.map +1 -0
- package/dist/src/orgrt/pi-rpc-runner.d.ts +68 -0
- package/dist/src/orgrt/pi-rpc-runner.d.ts.map +1 -0
- package/dist/src/orgrt/pi-rpc-runner.js +400 -0
- package/dist/src/orgrt/pi-rpc-runner.js.map +1 -0
- package/dist/src/orgrt/pi-runner.d.ts +16 -0
- package/dist/src/orgrt/pi-runner.d.ts.map +1 -0
- package/dist/src/orgrt/pi-runner.js +264 -0
- package/dist/src/orgrt/pi-runner.js.map +1 -0
- package/dist/src/orgrt/qwen-runner.d.ts +18 -0
- package/dist/src/orgrt/qwen-runner.d.ts.map +1 -0
- package/dist/src/orgrt/qwen-runner.js +267 -0
- package/dist/src/orgrt/qwen-runner.js.map +1 -0
- package/dist/src/orgrt/session.js +1 -1
- package/dist/src/orgrt/session.js.map +1 -1
- package/dist/src/orgrt/types.d.ts +21 -0
- package/dist/src/orgrt/types.d.ts.map +1 -1
- package/dist/src/orgrt/types.js +9 -2
- package/dist/src/orgrt/types.js.map +1 -1
- package/dist/src/orgrt/usage-proxy.d.ts +32 -0
- package/dist/src/orgrt/usage-proxy.d.ts.map +1 -0
- package/dist/src/orgrt/usage-proxy.js +226 -0
- package/dist/src/orgrt/usage-proxy.js.map +1 -0
- package/dist/src/ui/dashboard.html +63 -0
- package/dist/src/ui/orgs.html +8 -1
- package/dist/src/ui/routes-org.mjs +26 -0
- package/dist/src/utils/resource-governor.d.ts.map +1 -1
- package/dist/src/utils/resource-governor.js +11 -2
- package/dist/src/utils/resource-governor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -342,10 +342,16 @@ async function main() {
|
|
|
342
342
|
|
|
343
343
|
// Adopt an already-listening server (e.g. started manually or by another session)
|
|
344
344
|
// instead of spawning a duplicate that would bind port+1 and clobber control.json.
|
|
345
|
+
// probeStatus() returns the string 'unauthorized' (not null) for a server that
|
|
346
|
+
// answers but rejects our dashboard-token (added for the staleAuth check above,
|
|
347
|
+
// #150) — a non-empty string is truthy in JS, so `if (live)` alone would "adopt"
|
|
348
|
+
// an auth-mismatched server exactly like a healthy one, writing pid:0 (a string
|
|
349
|
+
// has no .pid) and leaving the mismatch in place instead of fixing it. Skip it
|
|
350
|
+
// and keep scanning for an actually-adoptable server on a later port instead.
|
|
345
351
|
for (let delta = 0; delta <= 10; delta++) {
|
|
346
352
|
const p = DEFAULT_PORT + delta;
|
|
347
353
|
const live = await probeStatus(p);
|
|
348
|
-
if (live) {
|
|
354
|
+
if (live && live !== 'unauthorized') {
|
|
349
355
|
writeStatus(live.pid || 0, p);
|
|
350
356
|
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") process.stdout.write(`[control] adopted running server on port ${p} (pid ${live.pid || 'unknown'})\n`);
|
|
351
357
|
process.exit(0);
|
|
@@ -131,7 +131,7 @@ Only include `adapter_config`, `provider`, or `policy` on a role when Step 2.3 p
|
|
|
131
131
|
|
|
132
132
|
## Step 4 — Show Plan and Confirm (confirm mode)
|
|
133
133
|
|
|
134
|
-
Render the org plan in a clear human-readable format:
|
|
134
|
+
Render the org plan in a clear human-readable format. **The model assigned to each role is the single most important thing for the user to review here** — give it its own table, not just a line buried inside each role's block, so it can't be skimmed past:
|
|
135
135
|
|
|
136
136
|
```
|
|
137
137
|
╔══════════════════════════════════════════════════╗
|
|
@@ -139,6 +139,19 @@ Render the org plan in a clear human-readable format:
|
|
|
139
139
|
║ GOAL: <goal> ║
|
|
140
140
|
╚══════════════════════════════════════════════════╝
|
|
141
141
|
|
|
142
|
+
MODELS ← review this first
|
|
143
|
+
────────────────────────────────────────────────────
|
|
144
|
+
ROLE MODEL
|
|
145
|
+
────────────────── ────────────────────────────
|
|
146
|
+
boss claude-opus-5
|
|
147
|
+
content-writer (runtime default)
|
|
148
|
+
content-reviewer (runtime default)
|
|
149
|
+
|
|
150
|
+
Only roles with an explicit adapter_config.model show a value; "(runtime
|
|
151
|
+
default)" roles inherit whatever resolveModel() picks for their
|
|
152
|
+
runtime/vendor at run time. To pin a role to a specific model, say so now
|
|
153
|
+
(e.g. "put content-writer on glm-5.2").
|
|
154
|
+
|
|
142
155
|
ROLES (N roles — exactly one boss, every reports_to resolves to a real role id)
|
|
143
156
|
─────
|
|
144
157
|
• [boss] CEO / Boss (type: boss, reports_to: none)
|
|
@@ -156,10 +169,10 @@ Max run: <run_config.max_run, or "schedule interval" when unset>
|
|
|
156
169
|
Memory namespace: org:<org_name>
|
|
157
170
|
Schedule: <"every <N> <unit>" if schedule set; otherwise "manual — run with `monomind org run <org_name>`">
|
|
158
171
|
|
|
159
|
-
Type "go" to
|
|
172
|
+
Type "go" to accept (including the models above as shown), or describe changes.
|
|
160
173
|
```
|
|
161
174
|
|
|
162
|
-
In **auto** mode, skip the confirmation
|
|
175
|
+
In **auto** mode, skip this confirmation prompt entirely — but still surface the same MODELS table, non-blocking, appended to the Step 6 save confirmation (see Step 6).
|
|
163
176
|
|
|
164
177
|
If the user requests changes, apply them and re-render. Repeat until confirmed.
|
|
165
178
|
|
|
@@ -254,6 +267,16 @@ If `schedule` was set, also print:
|
|
|
254
267
|
Schedule: every <N> <unit> — pick it up with: monomind org serve
|
|
255
268
|
```
|
|
256
269
|
|
|
270
|
+
In **auto** mode (where Step 4's plan/model confirmation was skipped), always also print the models table so the user still sees — after the fact — what each role will run on, even though nothing blocked on it:
|
|
271
|
+
```
|
|
272
|
+
Models:
|
|
273
|
+
boss claude-opus-5
|
|
274
|
+
content-writer (runtime default)
|
|
275
|
+
content-reviewer (runtime default)
|
|
276
|
+
Adjust with: /mastermind:org-settings, or edit .monomind/orgs/<org_name>.json directly
|
|
277
|
+
```
|
|
278
|
+
In **confirm** mode this table was already shown and accepted in Step 4 — do not repeat it here.
|
|
279
|
+
|
|
257
280
|
---
|
|
258
281
|
|
|
259
282
|
## Step 7 — Brain Write (standalone only)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `monomind events` — headless JSONL tail of the dashboard's live event
|
|
3
|
+
* stream (/api/mastermind-stream), so scripts can pipe it into jq or a log
|
|
4
|
+
* file without opening a browser. Uses the same control.json/dashboard-token
|
|
5
|
+
* auth pattern `org mark-complete` already uses (org.ts).
|
|
6
|
+
*/
|
|
7
|
+
import type { Command } from '../types.js';
|
|
8
|
+
export declare const eventsCommand: Command;
|
|
9
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/commands/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAG1E,eAAO,MAAM,aAAa,EAAE,OAmF3B,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `monomind events` — headless JSONL tail of the dashboard's live event
|
|
3
|
+
* stream (/api/mastermind-stream), so scripts can pipe it into jq or a log
|
|
4
|
+
* file without opening a browser. Uses the same control.json/dashboard-token
|
|
5
|
+
* auth pattern `org mark-complete` already uses (org.ts).
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync } from 'node:fs';
|
|
8
|
+
import { join, resolve } from 'node:path';
|
|
9
|
+
import { output } from '../output.js';
|
|
10
|
+
export const eventsCommand = {
|
|
11
|
+
name: 'events',
|
|
12
|
+
description: 'Stream live org events from the dashboard as JSONL (headless, for piping into other tools)',
|
|
13
|
+
examples: [
|
|
14
|
+
{ command: 'monomind events', description: 'Stream events from the running dashboard to stdout as JSONL' },
|
|
15
|
+
{ command: 'monomind events | jq .type', description: 'Pipe events into jq for filtering' },
|
|
16
|
+
],
|
|
17
|
+
action: async (ctx) => {
|
|
18
|
+
const cwd = resolve(ctx.cwd || process.cwd());
|
|
19
|
+
let ctrlUrl = 'http://localhost:4242';
|
|
20
|
+
try {
|
|
21
|
+
const ctl = JSON.parse(readFileSync(join(cwd, '.monomind', 'control.json'), 'utf8'));
|
|
22
|
+
if (ctl.url)
|
|
23
|
+
ctrlUrl = ctl.url;
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
/* default */
|
|
27
|
+
}
|
|
28
|
+
let auth = '';
|
|
29
|
+
try {
|
|
30
|
+
auth = readFileSync(join(cwd, '.monomind', 'dashboard-token'), 'utf8').trim();
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
/* server may be pre-auth */
|
|
34
|
+
}
|
|
35
|
+
const streamUrl = `${ctrlUrl}/api/mastermind-stream?project=${encodeURIComponent(cwd)}`;
|
|
36
|
+
const controller = new AbortController();
|
|
37
|
+
let res;
|
|
38
|
+
try {
|
|
39
|
+
res = await fetch(streamUrl, {
|
|
40
|
+
headers: auth ? { 'x-monomind-token': auth } : {},
|
|
41
|
+
signal: controller.signal,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
output.printError(`Dashboard unreachable at ${ctrlUrl} — is "monomind ui" running?`, err instanceof Error ? err.message : String(err));
|
|
46
|
+
return { success: false, exitCode: 1 };
|
|
47
|
+
}
|
|
48
|
+
if (!res.ok || !res.body) {
|
|
49
|
+
output.printError(`Dashboard rejected the events stream (HTTP ${res.status})`);
|
|
50
|
+
return { success: false, exitCode: 1 };
|
|
51
|
+
}
|
|
52
|
+
const reader = res.body.getReader();
|
|
53
|
+
const decoder = new TextDecoder();
|
|
54
|
+
let buffer = '';
|
|
55
|
+
const onSigint = () => controller.abort();
|
|
56
|
+
process.once('SIGINT', onSigint);
|
|
57
|
+
try {
|
|
58
|
+
while (true) {
|
|
59
|
+
const { done, value } = await reader.read();
|
|
60
|
+
if (done)
|
|
61
|
+
break;
|
|
62
|
+
buffer += decoder.decode(value, { stream: true });
|
|
63
|
+
let sepIndex;
|
|
64
|
+
while ((sepIndex = buffer.indexOf('\n\n')) !== -1) {
|
|
65
|
+
const frame = buffer.slice(0, sepIndex);
|
|
66
|
+
buffer = buffer.slice(sepIndex + 2);
|
|
67
|
+
for (const line of frame.split('\n')) {
|
|
68
|
+
if (line.startsWith('data:')) {
|
|
69
|
+
const payload = line.slice(5).trim();
|
|
70
|
+
if (payload)
|
|
71
|
+
process.stdout.write(payload + '\n');
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
if (!controller.signal.aborted) {
|
|
79
|
+
output.printError('Events stream ended unexpectedly', err instanceof Error ? err.message : String(err));
|
|
80
|
+
return { success: false, exitCode: 1 };
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
finally {
|
|
84
|
+
process.removeListener('SIGINT', onSigint);
|
|
85
|
+
}
|
|
86
|
+
return { success: true };
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/commands/events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,4FAA4F;IACzG,QAAQ,EAAE;QACR,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,6DAA6D,EAAE;QAC1G,EAAE,OAAO,EAAE,4BAA4B,EAAE,WAAW,EAAE,mCAAmC,EAAE;KAC5F;IACD,MAAM,EAAE,KAAK,EAAE,GAAmB,EAA0B,EAAE;QAC5D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;QAE9C,IAAI,OAAO,GAAG,uBAAuB,CAAC;QACtC,IAAI,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,CAAC;4BACrC,IAAI,OAAO;gCAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;wBACpD,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC;gBAC/B,MAAM,CAAC,UAAU,CAAC,kCAAkC,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;gBACxG,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;YACzC,CAAC;QACH,CAAC;gBAAS,CAAC;YACT,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC7C,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF,CAAC"}
|
|
@@ -17,7 +17,7 @@ import type { Command } from '../types.js';
|
|
|
17
17
|
declare const CATEGORY_NAMES: {
|
|
18
18
|
readonly primary: readonly ['init', 'start', 'status', 'ui', 'agent', 'swarm', 'org', 'memory', 'doc', 'task', 'session', 'mcp', 'hooks'];
|
|
19
19
|
readonly advanced: readonly ['security', 'performance', 'guidance', 'autopilot', 'design'];
|
|
20
|
-
readonly utility: readonly ['config', 'doctor', 'completions', 'report-crash', 'crash-reporting'];
|
|
20
|
+
readonly utility: readonly ['config', 'doctor', 'completions', 'report-crash', 'crash-reporting', 'events'];
|
|
21
21
|
readonly analysis: readonly ['analyze', 'route', 'monograph', 'tokens', 'search'];
|
|
22
22
|
readonly management: readonly ['providers', 'update', 'cleanup', 'platforms', 'browse', 'download-embeddings'];
|
|
23
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAuD3C;;;;;GAKG;AACH,QAAA,MAAM,cAAc;aAClB,OAAO,YACL,MAAM,EACN,OAAO,EACP,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,OAAO,EACP,KAAK,EACL,QAAQ,EACR,KAAK,EACL,MAAM,EACN,SAAS,EACT,KAAK,EACL,OAAO;aAET,QAAQ,YAAG,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,WAAW,EAAE,QAAQ;aACvE,OAAO,YAAG,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,cAAc,EAAE,iBAAiB,EAAE,QAAQ;aACxF,QAAQ,YAAG,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ;aAC9D,UAAU,YAAG,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,qBAAqB;CACnF,CAAC;AA0BX;;;GAGG;AACH,eAAO,MAAM,eAAe,sBAAiB,CAAC;AAE9C,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAE5D;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAEhF;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhD;AAED,wBAAgB,eAAe,IAAI,MAAM,EAAE,CAE1C;AAED;;;GAGG;AACH,wBAAsB,eAAe,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAI1D;AAED,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC,CAG5D;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CACpD,MAAM,CAAC,MAAM,OAAO,cAAc,EAAE,OAAO,EAAE,CAAC,CAC/C,CASA;AAED;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE;IAAE,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAK9F"}
|
|
@@ -41,6 +41,7 @@ const COMMAND_LOADERS = {
|
|
|
41
41
|
doc: async () => (await import('./doc.js')).docCommand,
|
|
42
42
|
org: async () => (await import('./org.js')).orgCommand,
|
|
43
43
|
ui: async () => (await import('./ui.js')).uiCommand,
|
|
44
|
+
events: async () => (await import('./events.js')).eventsCommand,
|
|
44
45
|
'download-embeddings': async () => (await import('./download-embeddings.js')).downloadEmbeddingsCommand,
|
|
45
46
|
};
|
|
46
47
|
// Top-level command aliases -> canonical loader key. Kept as a static table
|
|
@@ -77,7 +78,7 @@ const CATEGORY_NAMES = {
|
|
|
77
78
|
'hooks',
|
|
78
79
|
],
|
|
79
80
|
advanced: ['security', 'performance', 'guidance', 'autopilot', 'design'],
|
|
80
|
-
utility: ['config', 'doctor', 'completions', 'report-crash', 'crash-reporting'],
|
|
81
|
+
utility: ['config', 'doctor', 'completions', 'report-crash', 'crash-reporting', 'events'],
|
|
81
82
|
analysis: ['analyze', 'route', 'monograph', 'tokens', 'search'],
|
|
82
83
|
management: ['providers', 'update', 'cleanup', 'platforms', 'browse', 'download-embeddings'],
|
|
83
84
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,MAAM,eAAe,GAAkC;IACrD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,MAAM,MAAM,CAAC,WAAW,CAAC,CAA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(ctx: CommandContext) => Promise<CommandResult>;
|
|
6
6
|
/** `org logs <name> [--run id] [--role r] [--filter-tool t] [--filter-role r] [--tools-only] [--audit-filter allow|deny] [--follow]` — formatted bus.jsonl tail. */
|
|
7
7
|
export declare const logsAction: (ctx: CommandContext, name: string) => Promise<CommandResult>;
|
|
8
|
+
/**
|
|
9
|
+
* `org watch <name> <role> [--verbose] [--stats]` — live-tail one role's
|
|
10
|
+
* assistant chat text.
|
|
11
|
+
*
|
|
12
|
+
* Every runner (Claude included — this isn't specific to the subprocess CLI
|
|
13
|
+
* runners) funnels through session.ts's shared message loop, which emits
|
|
14
|
+
* each assistant-text chunk onto the bus as a `chat` event. This command is
|
|
15
|
+
* just `logsAction` pre-filtered to that event type + role and formatted as
|
|
16
|
+
* a plain transcript instead of the full annotated event line — a friendlier
|
|
17
|
+
* front door onto infrastructure that already exists and already covers
|
|
18
|
+
* every runtime uniformly. For the fuller event stream (tool calls, audit
|
|
19
|
+
* decisions) use `org logs <name> --role <role> --follow` directly.
|
|
20
|
+
*
|
|
21
|
+
* --verbose additionally interleaves that role's `status` events (session
|
|
22
|
+
* start/end, restart/crash/backoff, state changes) into the transcript, so
|
|
23
|
+
* a human watching sees WHY a role went quiet instead of just silence.
|
|
24
|
+
* --stats prints a running token/cost line off that role's `usage` events
|
|
25
|
+
* (emitted per turn by session.ts, same as --verbose: already-existing bus
|
|
26
|
+
* data, no new instrumentation).
|
|
27
|
+
*/
|
|
28
|
+
export declare const watchAction: (ctx: CommandContext, name: string) => Promise<CommandResult>;
|
|
8
29
|
/** `org report <name> [--run id] [--all] [--by-role] [--format mermaid]` — summarize a run (or list run history). */
|
|
9
30
|
export declare const reportAction: (ctx: CommandContext, name: string) => Promise<CommandResult>;
|
|
10
31
|
/** `org questions <name> [--all]` — list pending (or all) ask_human questions. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org-observe.d.ts","sourceRoot":"","sources":["../../../src/commands/org-observe.ts"],"names":[],"mappings":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eAAO,MAAM,iBAAiB,QAAe,cAAc,QAAQ,MAAM,YAAY,OAAO,KAAG,OAAO,CAAC,aAAa,CAkCnH,CAAC"}
|
|
@@ -129,6 +129,85 @@ export const logsAction = async (ctx, name) => {
|
|
|
129
129
|
});
|
|
130
130
|
return { success: true };
|
|
131
131
|
};
|
|
132
|
+
/**
|
|
133
|
+
* `org watch <name> <role> [--verbose] [--stats]` — live-tail one role's
|
|
134
|
+
* assistant chat text.
|
|
135
|
+
*
|
|
136
|
+
* Every runner (Claude included — this isn't specific to the subprocess CLI
|
|
137
|
+
* runners) funnels through session.ts's shared message loop, which emits
|
|
138
|
+
* each assistant-text chunk onto the bus as a `chat` event. This command is
|
|
139
|
+
* just `logsAction` pre-filtered to that event type + role and formatted as
|
|
140
|
+
* a plain transcript instead of the full annotated event line — a friendlier
|
|
141
|
+
* front door onto infrastructure that already exists and already covers
|
|
142
|
+
* every runtime uniformly. For the fuller event stream (tool calls, audit
|
|
143
|
+
* decisions) use `org logs <name> --role <role> --follow` directly.
|
|
144
|
+
*
|
|
145
|
+
* --verbose additionally interleaves that role's `status` events (session
|
|
146
|
+
* start/end, restart/crash/backoff, state changes) into the transcript, so
|
|
147
|
+
* a human watching sees WHY a role went quiet instead of just silence.
|
|
148
|
+
* --stats prints a running token/cost line off that role's `usage` events
|
|
149
|
+
* (emitted per turn by session.ts, same as --verbose: already-existing bus
|
|
150
|
+
* data, no new instrumentation).
|
|
151
|
+
*/
|
|
152
|
+
export const watchAction = async (ctx, name) => {
|
|
153
|
+
const role = ctx.args[1];
|
|
154
|
+
if (!role)
|
|
155
|
+
return { success: false, message: 'usage: monomind org watch <org> <role>' };
|
|
156
|
+
const run = resolveRun(ctx.cwd, name, ctx.flags['run']);
|
|
157
|
+
if (!run)
|
|
158
|
+
return { success: false, message: `no runs found for org ${name} — start one with: monomind org run ${name}` };
|
|
159
|
+
const file = join(ctx.cwd, ORG_DIR, name, run, 'bus.jsonl');
|
|
160
|
+
const verbose = ctx.flags['verbose'] === true;
|
|
161
|
+
const stats = ctx.flags['stats'] === true;
|
|
162
|
+
let totalTokens = 0;
|
|
163
|
+
let totalCostUsd = 0;
|
|
164
|
+
const show = (e) => {
|
|
165
|
+
if (e.from !== role)
|
|
166
|
+
return;
|
|
167
|
+
if (e.type === 'chat') {
|
|
168
|
+
log(`${output.info(role + ':')} ${e.msg ?? ''}`);
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (verbose && e.type === 'status') {
|
|
172
|
+
log(output.warning(`[${e.reason ?? 'status'}] ${e.msg ?? ''}`));
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
if (stats && e.type === 'usage') {
|
|
176
|
+
const tokens = typeof e.data?.tokens === 'number' ? e.data.tokens : 0;
|
|
177
|
+
const costDelta = typeof e.data?.cost_usd === 'number' ? e.data.cost_usd : 0;
|
|
178
|
+
totalTokens += tokens;
|
|
179
|
+
totalCostUsd += costDelta;
|
|
180
|
+
log(output.info(`[stats] +${tokens} tokens (total ${totalTokens}) · +$${costDelta.toFixed(4)} (total $${totalCostUsd.toFixed(4)})`));
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
log(output.info(`watching ${name}/${role} — ${run} (Ctrl-C to stop; org logs ${name} --role ${role} --follow for the full event stream)`));
|
|
184
|
+
let seenLines = 0;
|
|
185
|
+
const drain = () => {
|
|
186
|
+
if (!existsSync(file))
|
|
187
|
+
return;
|
|
188
|
+
const lines = readFileSync(file, 'utf8').split('\n').filter(Boolean);
|
|
189
|
+
for (let i = seenLines; i < lines.length; i++) {
|
|
190
|
+
try {
|
|
191
|
+
show(JSON.parse(lines[i]));
|
|
192
|
+
seenLines = i + 1;
|
|
193
|
+
}
|
|
194
|
+
catch {
|
|
195
|
+
if (i === lines.length - 1)
|
|
196
|
+
break; // only the final line may be a mid-append partial write
|
|
197
|
+
seenLines = i + 1;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
drain();
|
|
202
|
+
if (ctx.flags['follow'] === false)
|
|
203
|
+
return { success: true }; // --follow=false opts out of the default live tail
|
|
204
|
+
await new Promise(resolve => {
|
|
205
|
+
const iv = setInterval(drain, 500);
|
|
206
|
+
process.once('SIGINT', () => { clearInterval(iv); resolve(); });
|
|
207
|
+
process.once('SIGTERM', () => { clearInterval(iv); resolve(); });
|
|
208
|
+
});
|
|
209
|
+
return { success: true };
|
|
210
|
+
};
|
|
132
211
|
/** `org report <name> [--run id] [--all] [--by-role] [--format mermaid]` — summarize a run (or list run history). */
|
|
133
212
|
export const reportAction = async (ctx, name) => {
|
|
134
213
|
if (ctx.flags['all'] === true) {
|
|
@@ -354,12 +433,13 @@ export const answerAction = async (ctx, name) => {
|
|
|
354
433
|
if (q.answer !== null)
|
|
355
434
|
return { success: false, message: `question "${questionId}" was already answered` };
|
|
356
435
|
// Live path: the hosting daemon updates questions.json and pushes into the role's mailbox.
|
|
357
|
-
const { lookupOrg } = await import('../orgrt/broker.js');
|
|
436
|
+
const { lookupOrg, normalizeCredential } = await import('../orgrt/broker.js');
|
|
358
437
|
const remote = lookupOrg(name);
|
|
359
438
|
if (remote) {
|
|
439
|
+
const cred = normalizeCredential(remote.credential);
|
|
360
440
|
try {
|
|
361
441
|
const res = await fetch(`${remote.url}/api/answer-question`, {
|
|
362
|
-
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
442
|
+
method: 'POST', headers: { 'Content-Type': 'application/json', ...(cred ? { 'x-monomind-cred': cred } : {}) },
|
|
363
443
|
body: JSON.stringify({ org: name, role: q.role, questionId, answer }),
|
|
364
444
|
signal: AbortSignal.timeout(10_000),
|
|
365
445
|
});
|
|
@@ -659,12 +739,13 @@ export const flowAction = async (ctx, name) => {
|
|
|
659
739
|
* the daemon is unreachable — mirrors answerAction's live-then-offline shape. */
|
|
660
740
|
async function resolveApproval(ctx, name, role, action, approved) {
|
|
661
741
|
const verb = approved ? 'approved' : 'denied';
|
|
662
|
-
const { lookupOrg } = await import('../orgrt/broker.js');
|
|
742
|
+
const { lookupOrg, normalizeCredential } = await import('../orgrt/broker.js');
|
|
663
743
|
const remote = lookupOrg(name);
|
|
664
744
|
if (remote) {
|
|
745
|
+
const cred = normalizeCredential(remote.credential);
|
|
665
746
|
try {
|
|
666
747
|
const res = await fetch(`${remote.url}/api/set-approval`, {
|
|
667
|
-
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
748
|
+
method: 'POST', headers: { 'Content-Type': 'application/json', ...(cred ? { 'x-monomind-cred': cred } : {}) },
|
|
668
749
|
body: JSON.stringify({ org: name, role, action, approved }),
|
|
669
750
|
signal: AbortSignal.timeout(10_000),
|
|
670
751
|
});
|
|
@@ -856,12 +937,13 @@ export const gateResolveAction = async (ctx, name, approved) => {
|
|
|
856
937
|
return { success: false, message: `gate "${gateId}" not found for org "${name}"` };
|
|
857
938
|
if (gate.status !== 'pending')
|
|
858
939
|
return { success: false, message: `gate "${gateId}" already resolved (${gate.status})` };
|
|
859
|
-
const { lookupOrg } = await import('../orgrt/broker.js');
|
|
940
|
+
const { lookupOrg, normalizeCredential } = await import('../orgrt/broker.js');
|
|
860
941
|
const remote = lookupOrg(name);
|
|
861
942
|
if (remote) {
|
|
943
|
+
const cred = normalizeCredential(remote.credential);
|
|
862
944
|
try {
|
|
863
945
|
const res = await fetch(`${remote.url}/api/resolve-gate`, {
|
|
864
|
-
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
|
946
|
+
method: 'POST', headers: { 'Content-Type': 'application/json', ...(cred ? { 'x-monomind-cred': cred } : {}) },
|
|
865
947
|
body: JSON.stringify({ org: name, gateId, approved, resolution }),
|
|
866
948
|
signal: AbortSignal.timeout(10_000),
|
|
867
949
|
});
|