@kaiba-cloud/orbital-harness-codex 0.0.0-stage → 0.0.2

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
@@ -1,3 +1,145 @@
1
- # Temporary Holding Version
1
+ # Orbital harness: Codex
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `@kaiba-cloud/orbital-harness-codex` runs the agents of an [Orbital](https://www.npmjs.com/package/@kaiba-cloud/orbital) team on the OpenAI Codex CLI.
4
+ It is a harness plugin for the `harnesses` port of Orbital.
5
+ It has the harness id `codex` and the harness folder `.codex`.
6
+
7
+ Each turn runs `codex exec --json` in the workspace of the session.
8
+ Codex signs in with its own login, so Orbital asks for no provider key.
9
+ Codex has its own shell and file edits.
10
+ The turn also gives Codex the orbital tools over MCP.
11
+
12
+ The package is not a program of its own.
13
+ It needs `@kaiba-cloud/orbital`, and Orbital runs it.
14
+ It also needs the `codex` program on the machine, signed in.
15
+
16
+ ## Install
17
+
18
+ 1. Install Orbital.
19
+
20
+ ```bash
21
+ npm i -g @kaiba-cloud/orbital
22
+ ```
23
+
24
+ 2. In your repository, install the harness.
25
+
26
+ ```bash
27
+ orbital install codex
28
+ ```
29
+
30
+ The command does these steps:
31
+
32
+ - It installs `@kaiba-cloud/orbital-harness-codex` at the version of Orbital in the plugin cache of the Orbital home.
33
+ - It writes `.codex/orbital.yaml` when the file is absent.
34
+ - It names the plugin in `.codex/orbital.yaml` as `npm:@kaiba-cloud/orbital-harness-codex@<version>`, so a clone of the project finds it.
35
+ - It writes the MCP server `orbital` in `.codex/config.toml`.
36
+
37
+ The block in `.codex/config.toml` is:
38
+
39
+ ```toml
40
+ [mcp_servers.orbital]
41
+ command = "orbital"
42
+ args = ["mcp", "--attach", "--harness", "codex", "--agent", "codex"]
43
+ ```
44
+
45
+ The install keeps every other line of the file.
46
+ A second run writes nothing.
47
+ If the file defines `orbital` in another way, the install keeps the file and prints a note.
48
+ Add `--force` to replace the definition of `orbital` when it differs.
49
+
50
+ | Flag | Meaning |
51
+ |---|---|
52
+ | `--plugin <source>` | Take the adapter from this plugin: an npm package, a git URL or a folder. |
53
+ | `--user` | Name the plugin in your user config, not in `.codex/orbital.yaml`. |
54
+ | `--force` | Overwrite a file or a setting that Orbital did not write. |
55
+ | `--workspace <path>` | The project. Default: the current directory. |
56
+
57
+ A Codex turn that Orbital runs reaches the orbital tools through `-c mcp_servers.orbital.*` options of the turn.
58
+ So the block in `.codex/config.toml` serves a person who runs Codex by hand in the project.
59
+
60
+ ## The login
61
+
62
+ Codex uses its own login, not a key of Orbital.
63
+ Sign in to Codex on the machine first.
64
+ Then `auth.json` is in your Codex home.
65
+
66
+ - The Codex home is `CODEX_HOME` when the turn environment has it, and `~/.codex` otherwise.
67
+ - Each turn runs Codex with a home in the session folder, `codex/home`.
68
+ - That home links `auth.json` and `config.toml` of your Codex home. No other file of your Codex home is linked.
69
+ - Orbital asks for no provider key for a member on `codex`, and passes it none.
70
+ - The harness asks the sandbox for the hosts `api.openai.com`, `chatgpt.com` and `auth.openai.com`.
71
+
72
+ ## The model
73
+
74
+ Write the model in the agent file as `<provider>:<model>`.
75
+ A provider other than `openai` selects the model provider of that id in your `config.toml`.
76
+ If the agent has no model, Codex uses its own default model.
77
+
78
+ ## An agent on Codex
79
+
80
+ An agent file in `.codex/agents` runs on `codex` by default.
81
+ The body of the file is the system prompt.
82
+ The turn gives it to Codex as `developer_instructions`.
83
+
84
+ ```markdown
85
+ ---
86
+ name: reviewer
87
+ description: Reviews a change and reports the problems.
88
+ ---
89
+ You review a change in the workspace. You report each problem with its file and line.
90
+ ```
91
+
92
+ ## A team member on Codex
93
+
94
+ A member of a team runs on the harness that its charter names.
95
+ The charter is a harness folder file, such as `.claude/teams/review/CHARTER.md`.
96
+ The member `reviewer` runs on Codex, and the lead runs on Claude Code:
97
+
98
+ ```markdown
99
+ ---
100
+ apiVersion: orbital/v1alpha1
101
+ name: review
102
+ objective: Review each change before it merges.
103
+ lead: lead
104
+ members:
105
+ - name: lead
106
+ harness: claude
107
+ - name: reviewer
108
+ harness: codex
109
+ ---
110
+ The lead hands each change to the reviewer and reports the result.
111
+ ```
112
+
113
+ The agent file of `reviewer` can be in any harness folder of the project.
114
+ An agent name is unique in a project.
115
+ Run `orbital check` to check the team.
116
+
117
+ ## What the harness supports
118
+
119
+ | Feature | Support |
120
+ |---|---|
121
+ | Transcript | Supported. A reasoning summary is a thinking part. A message is a text part. A command is a tool call named `Bash`. A file change is a tool call named `apply_patch`. An orbital tool call is named `mcp__<server>__<tool>`. Each call has a tool result, and a command or tool that fails gives a result marked as an error. |
122
+ | Tools | Codex runs its own shell and file edits. The orbital tools come from the MCP server `orbital`. The turn turns off the sub-agent tools and the goal tools of Codex, so the children of an agent stay sessions of the node. |
123
+ | Telemetry | Supported. Each turn reports the input, output, cache read and cache write tokens, and one model call. The cost is zero, because Codex reports no cost. |
124
+ | Resume | Supported. The harness keeps the thread id of Codex in `codex/state.json` of the session folder. A later turn runs `codex exec resume` on that thread. |
125
+ | Stop | Supported. SIGTERM goes to the Codex process, SIGKILL follows after three seconds, and the turn exits with code 143. |
126
+ | Shared browser | Supported. See below. |
127
+
128
+ ### The shared browser
129
+
130
+ The harness declares `browser: true`, so a turn gets the shared browser of the node.
131
+ The turn writes a `config.toml` in the session home.
132
+ In that file, the shared browser replaces each `chrome-devtools` MCP server of your `config.toml`.
133
+ Your own file stays as it is.
134
+ If your `config.toml` has no `chrome-devtools` server, the session gets no browser tools.
135
+ To let your own Codex sessions share the connection, run `orbital browser install`.
136
+
137
+ ## Known limits
138
+
139
+ - A turn runs Codex with `--dangerously-bypass-approvals-and-sandbox`. The sandbox of the node isolates the turn, and a run with no person cannot answer an approval.
140
+ - Codex reports the token total of the thread. The usage of a turn is the difference from the stored total.
141
+ - If the Codex thread id is not stored, the next turn starts a new thread.
142
+ - The cost of a turn is zero in the telemetry of Orbital.
143
+ - A turn fails when `codex` is not on the machine. The error is `codex exited with code 127.`
144
+ - A turn that ends with no completed answer fails with `Codex answered nothing.`
145
+ - The harness lists three hosts as egress: `api.openai.com`, `chatgpt.com` and `auth.openai.com`.