@monoes/monomindcli 2.9.27 → 2.10.1
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/dist/src/commands/agent-exec.d.ts +19 -0
- package/dist/src/commands/agent-exec.d.ts.map +1 -0
- package/dist/src/commands/agent-exec.js +301 -0
- package/dist/src/commands/agent-exec.js.map +1 -0
- package/dist/src/commands/agent.d.ts.map +1 -1
- package/dist/src/commands/agent.js +12 -0
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/org-observe.d.ts +11 -0
- package/dist/src/commands/org-observe.d.ts.map +1 -1
- package/dist/src/commands/org-observe.js +200 -2
- 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 +154 -0
- package/dist/src/commands/org.js.map +1 -1
- package/dist/src/index.d.ts +3 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +10 -3
- package/dist/src/index.js.map +1 -1
- package/dist/src/orgrt/agent-exec.d.ts +71 -0
- package/dist/src/orgrt/agent-exec.d.ts.map +1 -0
- package/dist/src/orgrt/agent-exec.js +463 -0
- package/dist/src/orgrt/agent-exec.js.map +1 -0
- package/dist/src/orgrt/kimicode-runner.d.ts.map +1 -1
- package/dist/src/orgrt/kimicode-runner.js +8 -2
- package/dist/src/orgrt/kimicode-runner.js.map +1 -1
- package/dist/src/orgrt/pi-runner.d.ts.map +1 -1
- package/dist/src/orgrt/pi-runner.js +25 -16
- package/dist/src/orgrt/pi-runner.js.map +1 -1
- package/dist/src/orgrt/runner-registry.d.ts +62 -0
- package/dist/src/orgrt/runner-registry.d.ts.map +1 -0
- package/dist/src/orgrt/runner-registry.js +201 -0
- package/dist/src/orgrt/runner-registry.js.map +1 -0
- package/dist/src/protocol-capabilities.d.ts +29 -0
- package/dist/src/protocol-capabilities.d.ts.map +1 -0
- package/dist/src/protocol-capabilities.js +31 -0
- package/dist/src/protocol-capabilities.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `monomind agent exec|scan|test` — the Agent Exec Protocol CLI surface
|
|
3
|
+
* (doc/agent-exec-protocol.md). These join the existing `agent` swarm
|
|
4
|
+
* namespace (commands/agent.ts); `agent list` stays with swarm lifecycle —
|
|
5
|
+
* the installed-only runner view is `agent scan --installed`.
|
|
6
|
+
*
|
|
7
|
+
* stdout purity (§3): `exec` and `test` write protocol NDJSON to stdout and
|
|
8
|
+
* nothing else; all diagnostics go to stderr. `scan` emits JSON on stdout
|
|
9
|
+
* with `--json` (or the global `--format json`).
|
|
10
|
+
*/
|
|
11
|
+
import type { Command } from '../types.js';
|
|
12
|
+
/** Parse a duration flag: plain number = seconds; `45s`/`10m`/`2h` suffixes. */
|
|
13
|
+
export declare function parseDuration(raw: unknown, flag: string): number | undefined;
|
|
14
|
+
/** Parse repeatable --env KEY=V into a record. */
|
|
15
|
+
export declare function parseEnvFlags(raw: unknown): Record<string, string>;
|
|
16
|
+
export declare const execCommand: Command;
|
|
17
|
+
export declare const scanCommand: Command;
|
|
18
|
+
export declare const testCommand: Command;
|
|
19
|
+
//# sourceMappingURL=agent-exec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-exec.d.ts","sourceRoot":"","sources":["../../../src/commands/agent-exec.ts"],"names":[],"mappings":"AACA;;;;;;;;;GASG;AAOH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAM1E,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAgB5E;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAUlE;AAmJD,eAAO,MAAM,WAAW,EAAE,OAsCzB,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,OA4CzB,CAAC;AAIF,eAAO,MAAM,WAAW,EAAE,OAwBzB,CAAC"}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
// packages/@monomind/cli/src/commands/agent-exec.ts
|
|
2
|
+
/**
|
|
3
|
+
* `monomind agent exec|scan|test` — the Agent Exec Protocol CLI surface
|
|
4
|
+
* (doc/agent-exec-protocol.md). These join the existing `agent` swarm
|
|
5
|
+
* namespace (commands/agent.ts); `agent list` stays with swarm lifecycle —
|
|
6
|
+
* the installed-only runner view is `agent scan --installed`.
|
|
7
|
+
*
|
|
8
|
+
* stdout purity (§3): `exec` and `test` write protocol NDJSON to stdout and
|
|
9
|
+
* nothing else; all diagnostics go to stderr. `scan` emits JSON on stdout
|
|
10
|
+
* with `--json` (or the global `--format json`).
|
|
11
|
+
*/
|
|
12
|
+
import { readFileSync } from 'node:fs';
|
|
13
|
+
import { resolve } from 'node:path';
|
|
14
|
+
import { runAgentExec } from '../orgrt/agent-exec.js';
|
|
15
|
+
import { scanInstalled } from '../orgrt/runner-registry.js';
|
|
16
|
+
import { output } from '../output.js';
|
|
17
|
+
const errOut = (text) => {
|
|
18
|
+
process.stderr.write(`${text}\n`);
|
|
19
|
+
};
|
|
20
|
+
/** Parse a duration flag: plain number = seconds; `45s`/`10m`/`2h` suffixes. */
|
|
21
|
+
export function parseDuration(raw, flag) {
|
|
22
|
+
if (raw === undefined || raw === null || raw === '')
|
|
23
|
+
return undefined;
|
|
24
|
+
const s = String(raw).trim();
|
|
25
|
+
const m = /^(\d+(?:\.\d+)?)(ms|s|m|h)?$/.exec(s);
|
|
26
|
+
if (!m)
|
|
27
|
+
throw new Error(`invalid --${flag} duration: "${s}" (use e.g. 45s, 10m, 2h)`);
|
|
28
|
+
const n = Number(m[1]);
|
|
29
|
+
switch (m[2]) {
|
|
30
|
+
case 'ms':
|
|
31
|
+
return Math.round(n);
|
|
32
|
+
case 'm':
|
|
33
|
+
return Math.round(n * 60_000);
|
|
34
|
+
case 'h':
|
|
35
|
+
return Math.round(n * 3_600_000);
|
|
36
|
+
default:
|
|
37
|
+
return Math.round(n * 1000);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
/** Parse repeatable --env KEY=V into a record. */
|
|
41
|
+
export function parseEnvFlags(raw) {
|
|
42
|
+
const env = {};
|
|
43
|
+
const list = Array.isArray(raw) ? raw : raw !== undefined ? [raw] : [];
|
|
44
|
+
for (const item of list) {
|
|
45
|
+
const s = String(item);
|
|
46
|
+
const eq = s.indexOf('=');
|
|
47
|
+
if (eq <= 0)
|
|
48
|
+
throw new Error(`invalid --env entry: "${s}" (expected KEY=V)`);
|
|
49
|
+
env[s.slice(0, eq)] = s.slice(eq + 1);
|
|
50
|
+
}
|
|
51
|
+
return env;
|
|
52
|
+
}
|
|
53
|
+
/** Load tool specs from --tools-file JSON: [{name, description, schema}]. */
|
|
54
|
+
function loadToolSpecs(file) {
|
|
55
|
+
if (!file)
|
|
56
|
+
return [];
|
|
57
|
+
let parsed;
|
|
58
|
+
try {
|
|
59
|
+
parsed = JSON.parse(readFileSync(resolve(file), 'utf8'));
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
throw new Error(`--tools-file unreadable: ${e instanceof Error ? e.message : String(e)}`);
|
|
63
|
+
}
|
|
64
|
+
if (!Array.isArray(parsed))
|
|
65
|
+
throw new Error('--tools-file must be a JSON array of tool definitions');
|
|
66
|
+
return parsed.map((t, i) => {
|
|
67
|
+
const tool = t;
|
|
68
|
+
if (typeof tool.name !== 'string' || !tool.name) {
|
|
69
|
+
throw new Error(`--tools-file entry ${i}: "name" (string) is required`);
|
|
70
|
+
}
|
|
71
|
+
if (typeof tool.description !== 'string') {
|
|
72
|
+
throw new Error(`--tools-file entry ${i} ("${tool.name}"): "description" (string) is required`);
|
|
73
|
+
}
|
|
74
|
+
if (tool.schema !== undefined && (typeof tool.schema !== 'object' || tool.schema === null)) {
|
|
75
|
+
throw new Error(`--tools-file entry ${i} ("${tool.name}"): "schema" must be a JSON Schema object`);
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
name: tool.name,
|
|
79
|
+
description: tool.description,
|
|
80
|
+
schema: tool.schema,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** Tool specs from --tool-names csv (§4.2 caller-described, schema-less). */
|
|
85
|
+
function toolNamesSpecs(raw) {
|
|
86
|
+
if (!raw)
|
|
87
|
+
return [];
|
|
88
|
+
return String(raw)
|
|
89
|
+
.split(',')
|
|
90
|
+
.map((n) => n.trim())
|
|
91
|
+
.filter(Boolean)
|
|
92
|
+
.map((name) => ({
|
|
93
|
+
name,
|
|
94
|
+
description: 'Caller-provided tool (described in the system prompt).',
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
97
|
+
async function runExec(ctx, overrides) {
|
|
98
|
+
const runtime = String(ctx.flags.runtime ?? '');
|
|
99
|
+
const promptFlag = ctx.flags.prompt;
|
|
100
|
+
const promptFile = ctx.flags['prompt-file'];
|
|
101
|
+
const diagnostics = [];
|
|
102
|
+
const usageError = (msg) => {
|
|
103
|
+
errOut(output.error(`agent exec: ${msg}`));
|
|
104
|
+
return 2;
|
|
105
|
+
};
|
|
106
|
+
if (!runtime)
|
|
107
|
+
return usageError('--runtime is required');
|
|
108
|
+
if (overrides.prompt === undefined) {
|
|
109
|
+
if (Boolean(promptFlag) === Boolean(promptFile)) {
|
|
110
|
+
return usageError('exactly one of --prompt or --prompt-file is required');
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const protocol = ctx.flags.protocol;
|
|
114
|
+
if (protocol !== undefined && String(protocol) !== '1') {
|
|
115
|
+
return usageError(`--protocol ${protocol} unsupported (this build implements v1)`);
|
|
116
|
+
}
|
|
117
|
+
let toolSpecs = [];
|
|
118
|
+
const toolsMode = String(ctx.flags.tools ?? 'none');
|
|
119
|
+
if (toolsMode !== 'none' && toolsMode !== 'stdio') {
|
|
120
|
+
return usageError(`--tools must be "stdio" or "none" (got "${toolsMode}")`);
|
|
121
|
+
}
|
|
122
|
+
if (toolsMode === 'stdio') {
|
|
123
|
+
const toolsFile = ctx.flags['tools-file'];
|
|
124
|
+
const toolNames = ctx.flags['tool-names'];
|
|
125
|
+
if (toolsFile && toolNames) {
|
|
126
|
+
return usageError('--tools-file and --tool-names are mutually exclusive');
|
|
127
|
+
}
|
|
128
|
+
toolSpecs = toolsFile ? loadToolSpecs(toolsFile) : toolNamesSpecs(toolNames);
|
|
129
|
+
if (toolsFile && toolSpecs.length === 0)
|
|
130
|
+
diagnostics.push('--tools-file contained no tool definitions');
|
|
131
|
+
}
|
|
132
|
+
else if (ctx.flags['tools-file'] || ctx.flags['tool-names']) {
|
|
133
|
+
return usageError('--tools-file/--tool-names require --tools stdio');
|
|
134
|
+
}
|
|
135
|
+
let systemPrompt;
|
|
136
|
+
const systemFile = ctx.flags['system-file'];
|
|
137
|
+
if (systemFile) {
|
|
138
|
+
try {
|
|
139
|
+
systemPrompt = readFileSync(resolve(systemFile), 'utf8');
|
|
140
|
+
}
|
|
141
|
+
catch (e) {
|
|
142
|
+
return usageError(`--system-file unreadable: ${e instanceof Error ? e.message : String(e)}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
let timeoutMs;
|
|
146
|
+
let toolTimeoutMs = 120_000;
|
|
147
|
+
try {
|
|
148
|
+
timeoutMs = overrides.timeoutMs ?? parseDuration(ctx.flags.timeout, 'timeout');
|
|
149
|
+
toolTimeoutMs = parseDuration(ctx.flags['tool-timeout'], 'tool-timeout') ?? 120_000;
|
|
150
|
+
}
|
|
151
|
+
catch (e) {
|
|
152
|
+
return usageError(e instanceof Error ? e.message : String(e));
|
|
153
|
+
}
|
|
154
|
+
let env = {};
|
|
155
|
+
try {
|
|
156
|
+
env = parseEnvFlags(ctx.flags.env);
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
return usageError(e instanceof Error ? e.message : String(e));
|
|
160
|
+
}
|
|
161
|
+
const prompt = overrides.prompt ??
|
|
162
|
+
(promptFile ? readFileSync(resolve(promptFile), 'utf8') : promptFlag);
|
|
163
|
+
for (const d of diagnostics)
|
|
164
|
+
errOut(output.warning(d));
|
|
165
|
+
const exitCode = await runAgentExec({
|
|
166
|
+
runtime,
|
|
167
|
+
prompt,
|
|
168
|
+
systemPrompt,
|
|
169
|
+
model: ctx.flags.model ? String(ctx.flags.model) : undefined,
|
|
170
|
+
cwd: ctx.flags.cwd ? resolve(String(ctx.flags.cwd)) : undefined,
|
|
171
|
+
resume: ctx.flags.resume ? String(ctx.flags.resume) : undefined,
|
|
172
|
+
maxTurns: Number(ctx.flags['max-turns'] ?? 25) || 25,
|
|
173
|
+
timeoutMs,
|
|
174
|
+
toolTimeoutMs,
|
|
175
|
+
budgetUsd: ctx.flags['budget-usd'] !== undefined ? Number(ctx.flags['budget-usd']) : undefined,
|
|
176
|
+
env,
|
|
177
|
+
toolSpecs: toolSpecs.length ? toolSpecs : null,
|
|
178
|
+
emit: (ev) => {
|
|
179
|
+
process.stdout.write(`${JSON.stringify(ev)}\n`);
|
|
180
|
+
},
|
|
181
|
+
...overrides,
|
|
182
|
+
});
|
|
183
|
+
return exitCode;
|
|
184
|
+
}
|
|
185
|
+
/** Flush queued stdout writes (pipes are async) before an explicit exit. */
|
|
186
|
+
function flushStdout() {
|
|
187
|
+
return new Promise((resolve) => {
|
|
188
|
+
process.stdout.write('', () => resolve());
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
// ─── exec ────────────────────────────────────────────────────────────────────
|
|
192
|
+
export const execCommand = {
|
|
193
|
+
name: 'exec',
|
|
194
|
+
description: 'Run one agent turn via a local runner (Agent Exec Protocol — NDJSON on stdout)',
|
|
195
|
+
options: [
|
|
196
|
+
{ name: 'runtime', short: 'r', description: 'Runner id (claude, codex, kimicode, qwen, …)', type: 'string' },
|
|
197
|
+
{ name: 'prompt', short: 'p', description: 'Prompt text', type: 'string' },
|
|
198
|
+
{ name: 'prompt-file', description: 'Read the prompt from a file', type: 'string' },
|
|
199
|
+
{ name: 'system-file', description: 'System prompt file', type: 'string' },
|
|
200
|
+
{ name: 'tools', description: 'Tool mode: stdio (caller executes) or none', type: 'string', choices: ['stdio', 'none'] },
|
|
201
|
+
{ name: 'tools-file', description: 'Tool definitions JSON [{name, description, schema}] (requires --tools stdio)', type: 'string' },
|
|
202
|
+
{ name: 'tool-names', description: 'CSV of tool names for caller-described tools (requires --tools stdio)', type: 'string' },
|
|
203
|
+
{ name: 'tool-timeout', description: 'Max wait per caller tool_result frame (default 120s)', type: 'string' },
|
|
204
|
+
{ name: 'model', short: 'm', description: 'Model override', type: 'string' },
|
|
205
|
+
{ name: 'cwd', description: 'Working dir for the agent (default: cwd)', type: 'string' },
|
|
206
|
+
{ name: 'resume', description: 'Session/thread id to resume', type: 'string' },
|
|
207
|
+
{ name: 'max-turns', description: 'Cap agent turns (default 25)', type: 'number' },
|
|
208
|
+
{ name: 'timeout', description: 'Overall wall-clock timeout, e.g. 10m (exit 124 on expiry)', type: 'string' },
|
|
209
|
+
{ name: 'budget-usd', description: 'Spend cap for this turn (error code "budget" on breach)', type: 'number' },
|
|
210
|
+
{ name: 'env', description: 'Extra env for the agent process, KEY=V (repeatable)', type: 'array' },
|
|
211
|
+
{ name: 'protocol', description: 'Protocol version pin (1)', type: 'string' },
|
|
212
|
+
],
|
|
213
|
+
examples: [
|
|
214
|
+
{
|
|
215
|
+
command: 'monomind agent exec --runtime codex --prompt "summarize ./README"',
|
|
216
|
+
description: 'One codex turn, NDJSON events on stdout',
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
command: 'monomind agent exec --runtime claude --tools stdio --tools-file tools.json --prompt-file task.md',
|
|
220
|
+
description: 'Claude turn with caller-side tools over stdio frames',
|
|
221
|
+
},
|
|
222
|
+
],
|
|
223
|
+
action: async (ctx) => {
|
|
224
|
+
const code = await runExec(ctx, {});
|
|
225
|
+
await flushStdout();
|
|
226
|
+
// Always exit explicitly: a runner's internal timers (turn ladders,
|
|
227
|
+
// startup grace) can keep the event loop alive after the turn is done.
|
|
228
|
+
process.exit(code);
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
// ─── scan ────────────────────────────────────────────────────────────────────
|
|
232
|
+
export const scanCommand = {
|
|
233
|
+
name: 'scan',
|
|
234
|
+
description: 'Detect locally installed agent runtimes (exit 0 always)',
|
|
235
|
+
options: [
|
|
236
|
+
{ name: 'json', description: 'Emit the protocol JSON shape (see agent-exec-protocol.md §6)', type: 'boolean' },
|
|
237
|
+
{ name: 'installed', description: 'Only list installed runtimes', type: 'boolean' },
|
|
238
|
+
],
|
|
239
|
+
examples: [
|
|
240
|
+
{ command: 'monomind agent scan --json', description: 'Full detection report as JSON' },
|
|
241
|
+
{ command: 'monomind agent scan --installed --json', description: 'Installed-only view' },
|
|
242
|
+
],
|
|
243
|
+
action: async (ctx) => {
|
|
244
|
+
const result = await scanInstalled({});
|
|
245
|
+
const agents = ctx.flags.installed ? result.agents.filter((a) => a.installed) : result.agents;
|
|
246
|
+
const payload = { v: 1, agents };
|
|
247
|
+
if (ctx.flags.json || ctx.flags.format === 'json') {
|
|
248
|
+
output.printJson(payload);
|
|
249
|
+
return { success: true, data: payload };
|
|
250
|
+
}
|
|
251
|
+
output.writeln();
|
|
252
|
+
output.writeln(output.bold('Agent Runtimes'));
|
|
253
|
+
output.writeln();
|
|
254
|
+
output.printTable({
|
|
255
|
+
columns: [
|
|
256
|
+
{ key: 'id', header: 'Runtime', width: 14 },
|
|
257
|
+
{ key: 'installed', header: 'Installed', width: 10 },
|
|
258
|
+
{ key: 'version', header: 'Version', width: 24 },
|
|
259
|
+
{ key: 'binary', header: 'Binary', width: 40 },
|
|
260
|
+
],
|
|
261
|
+
data: agents.map((a) => ({
|
|
262
|
+
id: a.id,
|
|
263
|
+
installed: a.installed ? output.success('yes') : output.dim('no'),
|
|
264
|
+
version: a.version ?? '—',
|
|
265
|
+
binary: a.binary ?? '—',
|
|
266
|
+
})),
|
|
267
|
+
});
|
|
268
|
+
output.writeln();
|
|
269
|
+
for (const a of agents.filter((x) => !x.installed)) {
|
|
270
|
+
output.writeln(output.dim(` ${a.id}: ${a.install_hint}`));
|
|
271
|
+
}
|
|
272
|
+
return { success: true, data: payload };
|
|
273
|
+
},
|
|
274
|
+
};
|
|
275
|
+
// ─── test ────────────────────────────────────────────────────────────────────
|
|
276
|
+
export const testCommand = {
|
|
277
|
+
name: 'test',
|
|
278
|
+
description: 'Smoke-test a runtime with one tiny turn (also verifies auth)',
|
|
279
|
+
options: [
|
|
280
|
+
{ name: 'timeout', description: 'Overall timeout (default 90s)', type: 'string' },
|
|
281
|
+
],
|
|
282
|
+
examples: [
|
|
283
|
+
{ command: 'monomind agent test codex', description: 'One smoke turn through the codex runner' },
|
|
284
|
+
],
|
|
285
|
+
action: async (ctx) => {
|
|
286
|
+
const runtime = ctx.args[0];
|
|
287
|
+
if (!runtime) {
|
|
288
|
+
output.printError('runtime id required: monomind agent test <id> (see agent scan)');
|
|
289
|
+
return { success: false, exitCode: 2 };
|
|
290
|
+
}
|
|
291
|
+
ctx.flags.runtime = runtime;
|
|
292
|
+
ctx.flags['max-turns'] = 3;
|
|
293
|
+
const code = await runExec(ctx, {
|
|
294
|
+
prompt: 'Reply with the single word: ok',
|
|
295
|
+
timeoutMs: parseDuration(ctx.flags.timeout, 'timeout') ?? 90_000,
|
|
296
|
+
});
|
|
297
|
+
await flushStdout();
|
|
298
|
+
process.exit(code);
|
|
299
|
+
},
|
|
300
|
+
};
|
|
301
|
+
//# sourceMappingURL=agent-exec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-exec.js","sourceRoot":"","sources":["../../../src/commands/agent-exec.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD;;;;;;;;;GASG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC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CAAC,GAAG,CAAC,CAAC;QAC3B,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,GAAG,EAAE;YAC9B,MAAM,EAAE,gCAAgC;YACxC,SAAS,EAAE,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,IAAI,MAAM;SACjE,CAAC,CAAC;QACH,MAAM,WAAW,EAAE,CAAC;QACpB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrB,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/commands/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../../../src/commands/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAiC,MAAM,aAAa,CAAC;AAK1E,eAAO,MAAM,YAAY,EAAE,OAiD1B,CAAC;eAEa,YAAY"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Agent management commands for spawning, listing, and controlling agents
|
|
4
4
|
*/
|
|
5
5
|
import { output } from '../output.js';
|
|
6
|
+
import { execCommand, scanCommand, testCommand } from './agent-exec.js';
|
|
6
7
|
import { listCommand, spawnCommand, statusCommand, stopCommand } from './agent-lifecycle.js';
|
|
7
8
|
import { healthCommand, metricsCommand, poolCommand } from './agent-ops.js';
|
|
8
9
|
export const agentCommand = {
|
|
@@ -16,12 +17,20 @@ export const agentCommand = {
|
|
|
16
17
|
metricsCommand,
|
|
17
18
|
poolCommand,
|
|
18
19
|
healthCommand,
|
|
20
|
+
execCommand,
|
|
21
|
+
scanCommand,
|
|
22
|
+
testCommand,
|
|
19
23
|
],
|
|
20
24
|
options: [],
|
|
21
25
|
examples: [
|
|
22
26
|
{ command: 'monomind agent spawn -t coder', description: 'Spawn a coder agent' },
|
|
23
27
|
{ command: 'monomind agent list', description: 'List all agents' },
|
|
24
28
|
{ command: 'monomind agent status agent-001', description: 'Show agent status' },
|
|
29
|
+
{ command: 'monomind agent scan --json', description: 'Detect installed agent runtimes' },
|
|
30
|
+
{
|
|
31
|
+
command: 'monomind agent exec --runtime codex --prompt "hi"',
|
|
32
|
+
description: 'One agent turn via the Agent Exec Protocol',
|
|
33
|
+
},
|
|
25
34
|
],
|
|
26
35
|
action: async (_ctx) => {
|
|
27
36
|
output.writeln();
|
|
@@ -38,6 +47,9 @@ export const agentCommand = {
|
|
|
38
47
|
`${output.highlight('metrics')} - Show agent metrics`,
|
|
39
48
|
`${output.highlight('pool')} - Manage agent pool`,
|
|
40
49
|
`${output.highlight('health')} - Show agent health`,
|
|
50
|
+
`${output.highlight('exec')} - Run one agent turn via a local runner (NDJSON protocol)`,
|
|
51
|
+
`${output.highlight('scan')} - Detect installed agent runtimes`,
|
|
52
|
+
`${output.highlight('test')} - Smoke-test a runtime`,
|
|
41
53
|
]);
|
|
42
54
|
output.writeln();
|
|
43
55
|
output.writeln('Run "monomind agent <subcommand> --help" for subcommand help');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent.js","sourceRoot":"","sources":["../../../src/commands/agent.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5E,MAAM,CAAC,MAAM,YAAY,GAAY;IACnC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE;QACX,YAAY;QACZ,WAAW;QACX,aAAa;QACb,WAAW;QACX,cAAc;QACd,WAAW;QACX,aAAa;
|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M,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAC/B,MAAM,CAAC,SAAS,CAAC;YACf,GAAG,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,8BAA8B;YAC1D,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,oCAAoC;YAC/D,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,sCAAsC;YACnE,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,kCAAkC;YAC7D,GAAG,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,6BAA6B;YAC3D,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,+BAA+B;YAC1D,GAAG,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,6BAA6B;YAC1D,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,qEAAqE;YAChG,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,6CAA6C;YACxE,GAAG,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,kCAAkC;SAC9D,CAAC,CAAC;QACH,MAAM,CAAC,OAAO,EAAE,CAAC;QACjB,MAAM,CAAC,OAAO,CAAC,8DAA8D,CAAC,CAAC;QAC/E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3B,CAAC;CACF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import type { CommandContext, CommandResult } from '../types.js';
|
|
2
|
+
/** True when this invocation asked for protocol JSON output. */
|
|
3
|
+
export declare const orgJson: (ctx: CommandContext) => boolean;
|
|
4
|
+
/** Print one protocol JSON payload on stdout (compact — one line, NDJSON-safe
|
|
5
|
+
* for line-oriented callers) and return a success result. */
|
|
6
|
+
export declare const printOrgJson: (payload: Record<string, unknown>) => CommandResult;
|
|
2
7
|
/** Validate org config(s) against OrgDefSchema — the exact parse `org run`/`org serve`
|
|
3
8
|
* perform — plus the structural invariants the runtime assumes but the schema can't
|
|
4
9
|
* express (single root role, resolvable reports_to, unique ids, parseable schedule). */
|
|
@@ -72,4 +77,10 @@ export declare const branchAction: (ctx: CommandContext, name: string) => Promis
|
|
|
72
77
|
export declare const decisionsAction: (ctx: CommandContext, name: string) => Promise<CommandResult>;
|
|
73
78
|
export declare const gatesAction: (ctx: CommandContext, name: string) => Promise<CommandResult>;
|
|
74
79
|
export declare const gateResolveAction: (ctx: CommandContext, name: string, approved: boolean) => Promise<CommandResult>;
|
|
80
|
+
/** `org events <name> [--run id] [--follow] [--since <eventId|iso>] [--ndjson]`
|
|
81
|
+
* — live tail of a run's bus.jsonl as NDJSON, one BusEvent per line
|
|
82
|
+
* (protocol §7.3). This is the machine streaming surface; `org logs` stays
|
|
83
|
+
* the human one. NDJSON is the only output mode (--ndjson accepted for
|
|
84
|
+
* spec symmetry). */
|
|
85
|
+
export declare const eventsAction: (ctx: CommandContext, name: string) => Promise<CommandResult>;
|
|
75
86
|
//# sourceMappingURL=org-observe.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org-observe.d.ts","sourceRoot":"","sources":["../../../src/commands/org-observe.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"org-observe.d.ts","sourceRoot":"","sources":["../../../src/commands/org-observe.ts"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAYjE,gEAAgE;AAChE,eAAO,MAAM,OAAO,QAAS,cAAc,KAAG,OAAsC,CAAC;AAErF;8DAC8D;AAC9D,eAAO,MAAM,YAAY,YAAa,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,aAG/D,CAAC;AAEF;;wFAEwF;AACxF,eAAO,MAAM,cAAc,QAAe,cAAc,KAAG,OAAO,CAAC,aAAa,CAo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