@kbediako/codex-orchestrator 0.1.34 → 0.1.35

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
@@ -145,6 +145,7 @@ Delegation guard profile:
145
145
  ## Delegation + RLM flow
146
146
 
147
147
  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 only when context is large (`RLM_SYMBOLIC_MIN_BYTES`) and an explicit context signal is present (`RLM_CONTEXT_PATH` or delegated run); 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.
148
+ For symbolic mode, the Option 2 alignment checker is enabled by default (`RLM_ALIGNMENT_CHECKER=1`) and writes append-only alignment artifacts under `.runs/<task-id>/cli/<run-id>/rlm/alignment/` (ledger + projection). Rollback toggle: set `RLM_ALIGNMENT_CHECKER=0`. Enforcement is opt-in via `RLM_ALIGNMENT_CHECKER_ENFORCE=1`.
148
149
  Symbolic subcalls can optionally use collab tools. Fast path: `codex-orchestrator rlm --multi-agent auto "<goal>"` (legacy alias: `--collab auto`; sets `RLM_SYMBOLIC_MULTI_AGENT=1` plus legacy `RLM_SYMBOLIC_COLLAB=1` for compatibility, and implies symbolic mode). Collab requires `multi_agent=true` in `codex features list` (`collab` remains a legacy alias). Collab tool calls parsed from `codex exec --json --enable multi_agent` are stored in `manifest.collab_tool_calls` (bounded by `CODEX_ORCHESTRATOR_COLLAB_MAX_EVENTS`, set to `0` to disable). For auditable role routing, prefix spawned prompts with `[agent_type:<role>]` and set `spawn_agent.agent_type` when supported; lifecycle validation enforces prompt-role evidence and validates `agent_type` when present (`RLM_SYMBOLIC_MULTI_AGENT_ROLE_POLICY=warn|off`, legacy alias `RLM_COLLAB_ROLE_POLICY`; `RLM_SYMBOLIC_MULTI_AGENT_ALLOW_DEFAULT_ROLE=1`, legacy alias `RLM_COLLAB_ALLOW_DEFAULT_ROLE`). `codex-orchestrator codex setup` remains available when you want a managed/pinned CLI path (opt-in via `CODEX_CLI_USE_MANAGED=1`).
149
150
 
150
151
  ### Delegation flow
@@ -612,6 +612,12 @@ async function handleStart(orchestrator, rawArgs) {
612
612
  })
613
613
  : { issueLog: null, issueLogError: null };
614
614
  emitRunOutput(result, format, 'Run started', issueLogCapture);
615
+ if (result.manifest.status === 'succeeded' && result.manifest.pipeline_id !== 'rlm') {
616
+ await maybeEmitRunAdoptionHint({
617
+ format,
618
+ taskFilter: resolveTaskFilter(result.manifest.task_id, taskIdOverride)
619
+ });
620
+ }
615
621
  });
616
622
  }
617
623
  catch (error) {
@@ -773,6 +779,10 @@ async function handleFlow(orchestrator, rawArgs) {
773
779
  return;
774
780
  }
775
781
  console.log('Flow complete: docs-review -> implementation-gate.');
782
+ await maybeEmitRunAdoptionHint({
783
+ format,
784
+ taskFilter: resolveTaskFilter(implementationGateResult.manifest.task_id, taskId)
785
+ });
776
786
  });
777
787
  }
778
788
  catch (error) {
@@ -1026,7 +1036,7 @@ async function handleExec(rawArgs) {
1026
1036
  await maybeEmitExecAdoptionHint(env.taskId);
1027
1037
  }
1028
1038
  }
1029
- async function shouldScanExecAdoptionHint(taskFilter) {
1039
+ async function shouldScanAdoptionHint(taskFilter) {
1030
1040
  if (!taskFilter) {
1031
1041
  return false;
1032
1042
  }
@@ -1056,9 +1066,9 @@ async function shouldScanExecAdoptionHint(taskFilter) {
1056
1066
  }
1057
1067
  }
1058
1068
  }
1059
- async function maybeEmitExecAdoptionHint(taskFilter) {
1069
+ async function maybeEmitAdoptionHint(taskFilter) {
1060
1070
  try {
1061
- if (!(await shouldScanExecAdoptionHint(taskFilter))) {
1071
+ if (!(await shouldScanAdoptionHint(taskFilter))) {
1062
1072
  return;
1063
1073
  }
1064
1074
  const usage = await runDoctorUsage({ windowDays: 7, taskFilter });
@@ -1072,6 +1082,15 @@ async function maybeEmitExecAdoptionHint(taskFilter) {
1072
1082
  // Exec command behavior should not fail when usage telemetry cannot be read.
1073
1083
  }
1074
1084
  }
1085
+ async function maybeEmitRunAdoptionHint(params) {
1086
+ if (params.format !== 'text') {
1087
+ return;
1088
+ }
1089
+ await maybeEmitAdoptionHint(params.taskFilter);
1090
+ }
1091
+ async function maybeEmitExecAdoptionHint(taskFilter) {
1092
+ await maybeEmitAdoptionHint(taskFilter);
1093
+ }
1075
1094
  async function handleSelfCheck(rawArgs) {
1076
1095
  const { flags } = parseArgs(rawArgs);
1077
1096
  const format = flags['format'] === 'json' ? 'json' : 'text';
@@ -2025,6 +2044,12 @@ Commands:
2025
2044
 
2026
2045
  help Show this message.
2027
2046
 
2047
+ Quickstart (agent-first):
2048
+ codex-orchestrator flow --task <task-id>
2049
+ codex-orchestrator doctor --usage --window-days 30
2050
+ codex-orchestrator rlm --multi-agent auto "<goal>"
2051
+ codex-orchestrator start implementation-gate --cloud --target <stage-id>
2052
+
2028
2053
  Notes:
2029
2054
  RLM recursion guidance: docs/guides/rlm-recursion-v2.md
2030
2055
  Cloud-mode preflight/fallback guide: docs/guides/cloud-mode-preflight.md
@@ -2156,6 +2181,13 @@ Options:
2156
2181
  --repo-config-required [true|false] Require repo-local codex.orchestrator.json (no package fallback).
2157
2182
  --interactive | --ui Enable read-only HUD when running in a TTY.
2158
2183
  --no-interactive Force disable HUD.
2184
+
2185
+ Examples:
2186
+ codex-orchestrator flow --task <task-id>
2187
+ codex-orchestrator flow --task <task-id> --cloud --target implementation-gate:review
2188
+
2189
+ Post-run check:
2190
+ codex-orchestrator doctor --usage --window-days 30 --task <task-id>
2159
2191
  `);
2160
2192
  }
2161
2193
  function printStartHelp() {
@@ -2182,6 +2214,13 @@ Options:
2182
2214
  --roles <single|triad> When pipeline is rlm, set role split.
2183
2215
  --interactive | --ui Enable read-only HUD when running in a TTY.
2184
2216
  --no-interactive Force disable HUD.
2217
+
2218
+ Examples:
2219
+ codex-orchestrator start docs-review --task <task-id>
2220
+ codex-orchestrator start implementation-gate --task <task-id> --cloud --target review
2221
+
2222
+ Post-run check:
2223
+ codex-orchestrator doctor --usage --window-days 30 --task <task-id>
2185
2224
  `);
2186
2225
  }
2187
2226
  function printPlanHelp() {
@@ -411,7 +411,10 @@ function buildAdoptionRecommendations(params) {
411
411
  if (params.cloudConfigured && params.cloudRuns === 0) {
412
412
  hints.push('CODEX_CLOUD_ENV_ID is configured but no cloud runs were observed; route one long-running stage through cloud: `codex-orchestrator start <pipeline> --cloud --target <stage-id>`.');
413
413
  }
414
- if (params.cloudConfigured && params.cloudRuns > 0 && cloudShare < 0.1) {
414
+ else if (params.cloudRuns === 0) {
415
+ hints.push('No cloud runs detected; configure CODEX_CLOUD_ENV_ID and run `codex-orchestrator start <pipeline> --cloud --target <stage-id>` for long-running stages.');
416
+ }
417
+ else if (params.cloudConfigured && cloudShare < 0.1) {
415
418
  hints.push(`Cloud is configured but adoption is low (${Math.round(cloudShare * 1000) / 10}%); prefer cloud for heavy stages and confirm readiness with \`codex-orchestrator doctor --cloud-preflight\`.`);
416
419
  }
417
420
  if (params.rlmRuns === 0) {
@@ -420,9 +423,6 @@ function buildAdoptionRecommendations(params) {
420
423
  if (params.rlmRuns > 0 && rlmShare < 0.1) {
421
424
  hints.push(`RLM usage is low (${Math.round(rlmShare * 1000) / 10}%); route multi-step ambiguous work through \`codex-orchestrator rlm --multi-agent auto "<goal>"\`.`);
422
425
  }
423
- if (params.cloudRuns === 0) {
424
- hints.push('No cloud runs detected; configure CODEX_CLOUD_ENV_ID and run `codex-orchestrator start <pipeline> --cloud --target <stage-id>` for long-running stages.');
425
- }
426
426
  if (params.rlmRuns > 0 && params.collabRunsWithToolCalls === 0) {
427
427
  hints.push('RLM is used without collab activity; ensure multi-agent is enabled (`codex features enable multi_agent`, legacy alias: `collab`).');
428
428
  }