@kbediako/codex-orchestrator 0.1.9 → 0.1.11

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
@@ -8,44 +8,66 @@ Codex Orchestrator is the CLI + runtime that coordinates Codex-driven runs, pipe
8
8
  ```bash
9
9
  npm i -g @kbediako/codex-orchestrator
10
10
  ```
11
+ - After install, use either `codex-orchestrator` or the short alias `codex-orch`:
12
+ ```bash
13
+ codex-orchestrator --version
14
+ ```
11
15
  - Or run via npx:
12
16
  ```bash
13
- npx codex-orchestrator --version
17
+ npx @kbediako/codex-orchestrator --version
14
18
  ```
15
19
 
16
20
  Node.js >= 20 is required.
17
21
 
18
22
  ## Quick start
19
23
 
20
- 1. Set a task id so artifacts land under `.runs/<task-id>/`:
24
+ 1. Run a pipeline with a task id so artifacts are grouped under `.runs/<task-id>/`:
21
25
  ```bash
22
- export MCP_RUNNER_TASK_ID=<task-id>
26
+ codex-orch start diagnostics --format json --task <task-id>
23
27
  ```
24
- 2. Run a pipeline:
28
+ The command prints the `run_id` plus the manifest path under `.runs/<task-id>/cli/<run-id>/manifest.json`.
29
+ 2. Watch status:
25
30
  ```bash
26
- npx codex-orchestrator start diagnostics --format json
31
+ codex-orch status --run <run-id> --watch --interval 10
27
32
  ```
28
- 3. Watch status:
33
+ 3. Resume if needed:
29
34
  ```bash
30
- npx codex-orchestrator status --run <run-id> --watch --interval 10
31
- ```
32
- 4. Resume if needed:
33
- ```bash
34
- npx codex-orchestrator resume --run <run-id>
35
+ codex-orch resume --run <run-id>
35
36
  ```
37
+ > Tip: if you prefer `npx`, replace `codex-orch` with `npx @kbediako/codex-orchestrator`.
38
+ > Tip: for multiple commands, you can also `export MCP_RUNNER_TASK_ID=<task-id>` once.
36
39
 
37
40
  ## Delegation MCP server
38
41
 
39
42
  Run the delegation MCP server over stdio:
40
43
  ```bash
41
- codex-orchestrator delegate-server --repo /path/to/repo --mode question_only
44
+ codex-orchestrator delegate-server --repo /path/to/repo
42
45
  ```
46
+ Optional: add `--mode question_only` to disable `delegate.spawn/pause/cancel`, keeping only `delegate.question.*` + `delegate.status` in the delegate namespace. GitHub tools remain available when GitHub integration is enabled.
43
47
 
44
48
  Register it with Codex once, then enable per run:
45
49
  ```bash
46
- codex mcp add delegation -- codex-orchestrator delegation-server --repo /path/to/repo
50
+ codex mcp add delegation -- codex-orchestrator delegate-server --repo /path/to/repo
47
51
  codex -c 'mcp_servers.delegation.enabled=true' ...
48
52
  ```
53
+ `delegate-server` is the canonical name; `delegation-server` is supported as an alias (older docs may use it).
54
+
55
+ ## Delegation flow
56
+
57
+ ```mermaid
58
+ flowchart LR
59
+ A["Parent Codex run\n(MCP disabled by default)"]
60
+ B["Background Codex run\n(delegation enabled)"]
61
+ C["Delegation MCP server"]
62
+ D["delegate.spawn"]
63
+ E["Child run"]
64
+ F["delegate.question.enqueue / poll\n(optional back to parent)"]
65
+ G["Artifacts\n.runs/<task-id>/cli/<run-id>/manifest.json"]
66
+
67
+ A --> B --> C --> D --> E
68
+ E -. optional .-> F -.-> A
69
+ E --> G
70
+ ```
49
71
 
50
72
  ## Skills (bundled)
51
73
 
@@ -58,7 +80,7 @@ Options:
58
80
  - `--force` overwrites existing files.
59
81
  - `--codex-home <path>` targets a different Codex home directory.
60
82
 
61
- Current bundled skills:
83
+ Bundled skills (may vary by release):
62
84
  - `delegation-usage`
63
85
 
64
86
  ## DevTools readiness
@@ -90,5 +112,5 @@ codex-orchestrator devtools setup
90
112
 
91
113
  ## Repository + contributor guide
92
114
 
93
- Repo internals, development workflows, and deeper architecture notes live here:
115
+ Repo internals, development workflows, and deeper architecture notes live in the GitHub repository:
94
116
  - `docs/README.md`
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@kbediako/codex-orchestrator",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "type": "module",
6
6
  "bin": {
7
- "codex-orchestrator": "dist/bin/codex-orchestrator.js"
7
+ "codex-orchestrator": "dist/bin/codex-orchestrator.js",
8
+ "codex-orch": "dist/bin/codex-orchestrator.js"
8
9
  },
9
10
  "files": [
10
11
  "dist/bin/**",
@@ -4,7 +4,7 @@ Use this guide for deeper context on delegation behavior, tool surfaces, and tro
4
4
 
5
5
  ## Mental model
6
6
 
7
- - The delegation MCP server is a local stdio process (`codex-orchestrator delegation-server`).
7
+ - The delegation MCP server is a local stdio process (`codex-orchestrator delegate-server`; `delegation-server` is an alias).
8
8
  - It does **not** provide general tools itself; it only exposes `delegate.*` + optional `github.*` tools.
9
9
  - Child runs get tools based on `delegate.mode` + `delegate.tool_profile` + repo caps.
10
10
 
@@ -25,6 +25,17 @@ Notes:
25
25
  - If the run needs `delegate.spawn/pause/cancel`, add `-c 'delegate.mode=full'`.
26
26
  - If it only needs `delegate.question.*` (and optional `delegate.status`), add `-c 'delegate.mode=question_only'`.
27
27
  - Non-interactive runs can still require approvals; resolve them via the UI/TUI and the run will resume.
28
+ - `codex exec` does **not** create `.runs/<task>/cli/<run>/manifest.json` on its own. If the child must call `delegate.question.*` or `delegate.status/pause/cancel`, pass a real manifest path (e.g., run `codex-orch start diagnostics --format json --task <task-id>` and reuse the manifest path; or `export MCP_RUNNER_TASK_ID=<task-id>` if you prefer env vars).
29
+
30
+ ## Runner + task id (short form)
31
+
32
+ Prefer a direct task flag instead of an exported env var:
33
+
34
+ ```
35
+ codex-orch start diagnostics --format json --task <task-id>
36
+ ```
37
+
38
+ This produces `.runs/<task-id>/cli/<run-id>/manifest.json`, which you can reuse as `parent_manifest_path` for question queue calls.
28
39
 
29
40
  ## Minimal tool surface
30
41
 
@@ -43,7 +54,7 @@ Delegation MCP expects JSONL. Use `codex-orchestrator >= 0.1.8`.
43
54
 
44
55
  - Check: `codex-orchestrator --version`
45
56
  - Update global: `npm i -g @kbediako/codex-orchestrator@0.1.8`
46
- - Or pin via npx: `npx -y @kbediako/codex-orchestrator@0.1.8 delegation-server`
57
+ - Or pin via npx: `npx -y @kbediako/codex-orchestrator@0.1.8 delegate-server`
47
58
 
48
59
  ## Common failures
49
60
 
@@ -26,6 +26,7 @@ Optional (only if you need it):
26
26
  - Add `-c 'delegate.mode=full'` when the child needs `delegate.spawn/pause/cancel` (nested delegation / run control).
27
27
 
28
28
  For deeper background patterns and troubleshooting, see `DELEGATION_GUIDE.md`.
29
+ For runner + delegation coordination (short `--task` flow), see `docs/delegation-runner-workflow.md`.
29
30
 
30
31
  ## Delegation‑first policy
31
32
 
@@ -41,8 +42,9 @@ For deeper background patterns and troubleshooting, see `DELEGATION_GUIDE.md`.
41
42
  ### 0) One-time setup (register the MCP server)
42
43
 
43
44
  - Register the delegation server once:
44
- - `codex mcp add delegation -- codex-orchestrator delegation-server`
45
+ - `codex mcp add delegation -- codex-orchestrator delegate-server`
45
46
  - Optional (recommended for repo-scoped config): append `--repo /path/to/repo` to the args.
47
+ - `delegate-server` is the canonical name; `delegation-server` is supported as an alias.
46
48
  - Per-run `-c 'mcp_servers.delegation.enabled=true'` only works **after** registration.
47
49
  - If `delegate.*` tools are missing mid-task, start a new run with:
48
50
  - `codex -c 'mcp_servers.delegation.enabled=true' ...`
@@ -74,6 +76,7 @@ Guidance for background runs:
74
76
  - Use `--json` for JSONL events, or `-o <path>` to write the final message to a file while still printing to stdout.
75
77
  - If you need a multi-step run, use `codex exec resume --last "<follow-up>"` to continue the same session.
76
78
  - Non-interactive runs can still hit `confirmation_required`; approvals happen via the UI/TUI and the run resumes after approval.
79
+ - `codex exec` does **not** create an orchestrator manifest. If the child must call `delegate.question.*` or `delegate.status/pause/cancel`, pass a real `.runs/<task>/cli/<run>/manifest.json` via `parent_manifest_path`/`manifest_path` (e.g., run `codex-orch start diagnostics --format json --task <task-id>` to get one; or use `export MCP_RUNNER_TASK_ID=<task-id>` if you prefer env vars).
77
80
 
78
81
  ### 1) Enable delegation only for the run you need
79
82
 
@@ -81,6 +84,7 @@ Guidance for background runs:
81
84
  - Enable per run:
82
85
  - Example: `codex -c 'mcp_servers.delegation.enabled=true' ...`
83
86
  - Using `-c` keeps your default config unchanged, so delegation is off again next run.
87
+ - Prefer `codex-orch start <pipeline> --format json --task <task-id>` over `export MCP_RUNNER_TASK_ID=...` for a shorter, explicit task id.
84
88
 
85
89
  ### 2) Spawn a delegate run (delegate.spawn)
86
90