@kbediako/codex-orchestrator 0.1.25 → 0.1.27

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/README.md CHANGED
@@ -89,7 +89,7 @@ Delegation guard profile:
89
89
  ## Delegation + RLM flow
90
90
 
91
91
  RLM (Recursive Language Model) is the long-horizon loop used by the `rlm` pipeline (`codex-orchestrator rlm "<goal>"` or `codex-orchestrator start rlm --goal "<goal>"`). Delegated runs only enter RLM when the child is launched with the `rlm` pipeline (or the rlm runner directly). In auto mode it resolves to symbolic when delegated, when `RLM_CONTEXT_PATH` is set, or when the context exceeds `RLM_SYMBOLIC_MIN_BYTES`; otherwise it stays iterative. The runner writes state to `.runs/<task-id>/cli/<run-id>/rlm/state.json` and stops when the validator passes or budgets are exhausted.
92
- Symbolic subcalls can optionally use collab tools. Fast path: `codex-orchestrator rlm --collab "<goal>"` (sets `RLM_SYMBOLIC_COLLAB=1` and implies symbolic mode). Collab requires `collab=true` in `codex features list`. Collab tool calls parsed from `codex exec --json --enable collab` are stored in `manifest.collab_tool_calls` (bounded by `CODEX_ORCHESTRATOR_COLLAB_MAX_EVENTS`, set to `0` to disable). `codex-orchestrator codex setup` remains available when you want a managed/pinned CLI path.
92
+ Symbolic subcalls can optionally use collab tools. Fast path: `codex-orchestrator rlm --collab auto "<goal>"` (sets `RLM_SYMBOLIC_COLLAB=1` and implies symbolic mode). Collab requires `collab=true` in `codex features list`. Collab tool calls parsed from `codex exec --json --enable collab` are stored in `manifest.collab_tool_calls` (bounded by `CODEX_ORCHESTRATOR_COLLAB_MAX_EVENTS`, set to `0` to disable). `codex-orchestrator codex setup` remains available when you want a managed/pinned CLI path.
93
93
 
94
94
  ### Delegation flow
95
95
  ```mermaid
@@ -178,7 +178,7 @@ codex-orchestrator doctor --usage
178
178
  - Bootstrap + wire everything: `codex-orchestrator setup --yes`
179
179
  - Validate + measure adoption locally: `codex-orchestrator doctor --usage --format json`
180
180
  - Delegation: `codex-orchestrator doctor --apply --yes`, then enable for a Codex run with: `codex -c 'mcp_servers.delegation.enabled=true' ...`
181
- - Collab (symbolic RLM subagents): `codex-orchestrator rlm "<goal>" --collab auto` (requires collab feature enabled in Codex)
181
+ - Collab (symbolic RLM subagents): `codex-orchestrator rlm --collab auto "<goal>"` (requires collab feature enabled in Codex)
182
182
  - Cloud: set `CODEX_CLOUD_ENV_ID` (and optional `CODEX_CLOUD_BRANCH`), then run: `codex-orchestrator start <pipeline> --cloud --target <stage-id>`
183
183
 
184
184
  Print DevTools MCP setup guidance:
@@ -330,6 +330,10 @@ async function handlePlan(orchestrator, rawArgs) {
330
330
  }
331
331
  async function handleRlm(orchestrator, rawArgs) {
332
332
  const { positionals, flags } = parseArgs(rawArgs);
333
+ if (isHelpRequest(positionals, flags)) {
334
+ printRlmHelp();
335
+ return;
336
+ }
333
337
  const goalFromArgs = positionals.length > 0 ? positionals.join(' ') : undefined;
334
338
  const goal = goalFromArgs ?? readStringFlag(flags, 'goal') ?? process.env.RLM_GOAL?.trim();
335
339
  if (!goal) {
@@ -465,7 +469,8 @@ function emitRunOutput(result, format, label) {
465
469
  status: result.manifest.status,
466
470
  artifact_root: result.manifest.artifact_root,
467
471
  manifest: `${result.manifest.artifact_root}/manifest.json`,
468
- log_path: result.manifest.log_path
472
+ log_path: result.manifest.log_path,
473
+ summary: result.manifest.summary ?? null
469
474
  };
470
475
  if (format === 'json') {
471
476
  console.log(JSON.stringify(payload, null, 2));
@@ -475,6 +480,12 @@ function emitRunOutput(result, format, label) {
475
480
  console.log(`Status: ${payload.status}`);
476
481
  console.log(`Manifest: ${payload.manifest}`);
477
482
  console.log(`Log: ${payload.log_path}`);
483
+ if (payload.summary) {
484
+ console.log('Summary:');
485
+ for (const line of payload.summary.split(/\r?\n/u)) {
486
+ console.log(` ${line}`);
487
+ }
488
+ }
478
489
  }
479
490
  async function handleExec(rawArgs) {
480
491
  const parsed = parseExecArgs(rawArgs);
@@ -1097,7 +1108,9 @@ function splitShellLikeCommand(command) {
1097
1108
  return tokens;
1098
1109
  }
1099
1110
  function isHelpRequest(positionals, flags) {
1100
- if (flags['help'] === true) {
1111
+ // Treat any `--help` presence as a help request, even if a user accidentally
1112
+ // supplies a value (our minimal argv parser would otherwise treat it as `--help <value>`).
1113
+ if (flags['help'] !== undefined) {
1101
1114
  return true;
1102
1115
  }
1103
1116
  const first = positionals[0];
@@ -1285,3 +1298,21 @@ Examples:
1285
1298
  codex-orchestrator pr watch-merge --pr 211 --auto-merge --merge-method squash
1286
1299
  `);
1287
1300
  }
1301
+ function printRlmHelp() {
1302
+ console.log(`Usage: codex-orchestrator rlm "<goal>" [options]
1303
+
1304
+ Options:
1305
+ --goal "<goal>" Alternate way to set the goal (positional is preferred).
1306
+ --task <id> Override task identifier (defaults to MCP_RUNNER_TASK_ID).
1307
+ --collab [auto|true|false] Enable collab subagents (implies symbolic mode).
1308
+ --validator <cmd|none> Set validator command or disable validation.
1309
+ --max-iterations <n> Override max iterations (0 = unlimited with validator).
1310
+ --max-minutes <n> Optional time-based guardrail in minutes.
1311
+ --roles <single|triad> Choose single or triad role split.
1312
+ --parent-run <id> Link run to parent run id.
1313
+ --approval-policy <p> Record approval policy metadata.
1314
+ --interactive | --ui Enable read-only HUD when running in a TTY.
1315
+ --no-interactive Force disable HUD.
1316
+ --help Show this message.
1317
+ `);
1318
+ }
@@ -97,7 +97,7 @@ export function runDoctor(cwd = process.cwd()) {
97
97
  status: collabStatus,
98
98
  enabled: collabEnabled,
99
99
  enablement: [
100
- 'Enable collab for symbolic RLM runs with: codex-orchestrator rlm --collab "<goal>"',
100
+ 'Enable collab for symbolic RLM runs with: codex-orchestrator rlm --collab auto "<goal>"',
101
101
  'Or set: RLM_SYMBOLIC_COLLAB=1 (implies symbolic mode when using --collab).',
102
102
  'If collab is disabled in codex features: codex features enable collab'
103
103
  ]
@@ -109,7 +109,8 @@ export function runDoctor(cwd = process.cwd()) {
109
109
  enablement: [
110
110
  'Set CODEX_CLOUD_ENV_ID to a valid Codex Cloud environment id.',
111
111
  'Optional: set CODEX_CLOUD_BRANCH (must exist on origin).',
112
- 'Then run a pipeline stage in cloud mode with: codex-orchestrator start <pipeline> --cloud --target <stage-id>'
112
+ 'Then run a pipeline stage in cloud mode with: codex-orchestrator start <pipeline> --cloud --target <stage-id>',
113
+ 'If cloud preflight fails, CO falls back to mcp and records the reason in manifest.summary (surfaced in start output).'
113
114
  ]
114
115
  },
115
116
  delegation: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbediako/codex-orchestrator",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",