Commit Graph
530 Commits
Author SHA1 Message Date
James Peter ff63c4d0a9 fix(cli/postinstall): restore shim detector 2025-09-25 17:01:19 +10:00
James Peter c80b0bc745 merge code-branch-20250925-045812 via /merge 2025-09-25 16:30:29 +10:00
James Peter 480640fa58 fix(cli/postinstall): avoid overwriting existing code shim 2025-09-25 15:43:26 +10:00
James Peter 6ac2d0046e merge main into code-branch-20250925-040059 before merge 2025-09-25 14:59:28 +10:00
James Peter ce317cbf7b fix(cli/postinstall): preserve external code shims
Closes #239
2025-09-25 14:35:16 +10:00
GitHub Action 934ed32d93 chore(release): 0.2.163 [skip ci] 2025-09-25 04:31:52 +00:00
just-every-code 7a46dc6274 merge(upstream): merge upstream/main into upstream-merge (by-bucket)\n\n- Keep ours: codex-cli (resolve package.json, drop upstream rg/installer scripts)\n- Keep ours: workflows (ci.yml, rust-release.yml remain deleted)\n- Adopt upstream elsewhere; no core/tooling regressions\n\nBuild: verify.sh build_fast=ok api_check=ok 2025-09-24 06:36:58 +00:00
Michael BolinandGitHub af37785bca fix: vendor ripgrep in the npm module (#3660)
We try to ensure ripgrep (`rg`) is provided with Codex.

- For `brew`, we declare it as a dependency of our formula:

https://github.com/Homebrew/homebrew-core/blob/08d82d8b006a19efbe234477bc8b18d35b5fef50/Formula/c/codex.rb#L24
- For `npm`, we declare `@vscode/ripgrep` as a dependency, which
installs the platform-specific binary as part of a `postinstall` script:

https://github.com/openai/codex/blob/fdb8dadcae9f8eec91bc3eb5a17b3f9b19e28505/codex-cli/package.json#L22
- Users who download the CLI directly from GitHub Releases are on their
own.

In practice, I have seen `@vscode/ripgrep` fail on occasion. Here is a
trace from a GitHub workflow:

```
npm error code 1
npm error path /Users/runner/hostedtoolcache/node/20.19.5/arm64/lib/node_modules/@openai/codex/node_modules/@vscode/ripgrep
npm error command failed
npm error command sh -c node ./lib/postinstall.js
npm error Finding release for v13.0.0-13
npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
npm error Deleting invalid download cache
npm error Download attempt 1 failed, retrying in 2 seconds...
npm error Finding release for v13.0.0-13
npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
npm error Deleting invalid download cache
npm error Download attempt 2 failed, retrying in 4 seconds...
npm error Finding release for v13.0.0-13
npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
npm error Deleting invalid download cache
npm error Download attempt 3 failed, retrying in 8 seconds...
npm error Finding release for v13.0.0-13
npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
npm error Deleting invalid download cache
npm error Download attempt 4 failed, retrying in 16 seconds...
npm error Finding release for v13.0.0-13
npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
npm error Deleting invalid download cache
npm error Error: Request failed: 403
```

To eliminate this error, this PR changes things so that we vendor the
`rg` binary into https://www.npmjs.com/package/@openai/codex so it is
guaranteed to be included when a user runs `npm i -g @openai/codex`.

The downside of this approach is the increase in package size: we
include the `rg` executable for six architectures (in addition to the
six copies of `codex` we already include). In a follow-up, I plan to add
support for "slices" of our npm module, so that soon users will be able
to do:

```
npm install -g @openai/codex@aarch64-apple-darwin
```

Admittedly, this is a sizable change and I tried to clean some things up
in the process:

- `install_native_deps.sh` has been replaced by `install_native_deps.py`
- `stage_release.sh` and `stage_rust_release.py` has been replaced by
`build_npm_package.py`

We now vendor in a DotSlash file for ripgrep (as a modest attempt to
facilitate local testing) and then build up the extension by:

- creating a temp directory and copying `package.json` over to it with
the target value for `"version"`
- finding the GitHub workflow that corresponds to the
`--release-version` and copying the various `codex` artifacts to
respective `vendor/TARGET_TRIPLE/codex` folder
- downloading the `rg` artifacts specified in the DotSlash file and
copying them over to the respective `vendor/TARGET_TRIPLE/path` folder
- if `--pack-output` is specified, runs `npm pack` on the temp directory

To test, I downloaded the artifact produced by this CI job:


https://github.com/openai/codex/actions/runs/17961595388/job/51085840022?pr=3660

and verified that `node ./bin/codex.js 'which -a rg'` worked as
intended.
2025-09-23 23:00:33 -07:00
GitHub Action 62fcef7a7f chore(release): 0.2.162 [skip ci] 2025-09-22 12:16:22 +00:00
GitHub Action 1f1fbf5078 chore(release): 0.2.161 [skip ci] 2025-09-22 11:22:46 +00:00
GitHub Action 62c78152c7 chore(release): 0.2.160 [skip ci] 2025-09-22 10:57:11 +00:00
GitHub Action c5d895c0b2 docs(changelog): update for v0.2.159 [skip ci] 2025-09-22 09:33:17 +00:00
GitHub Action 2e77ed9468 chore(release): 0.2.159 [skip ci] 2025-09-22 09:29:51 +00:00
GitHub Action 988b94e941 chore(release): 0.2.158 [skip ci] 2025-09-22 09:01:39 +00:00
James Peter d41e9064c8 feat(cli): add acp alias for mcp subcommand 2025-09-22 15:42:26 +10:00
James Peter f15d2e2fd9 feat(cli): expose mcp via code subcommand 2025-09-22 15:16:49 +10:00
James Peter 33f498e19b feat(cli): ship code-mcp-server with npm install 2025-09-22 15:02:41 +10:00
GitHub Action 566a474313 docs(changelog): update for v0.2.157 [skip ci] 2025-09-22 03:20:16 +00:00
GitHub Action 08ff9e4ec4 chore(release): 0.2.157 [skip ci] 2025-09-22 03:19:10 +00:00
GitHub Action 1b5b138da4 chore(release): 0.2.156 [skip ci] 2025-09-22 01:48:44 +00:00
James Peter fab2f6ba89 fix(cli/postinstall): restore code shim on npm global installs
Closes #199.
2025-09-20 06:05:32 +10:00
GitHub Action 8f03adf5e1 chore(release): 0.2.155 [skip ci] 2025-09-18 08:45:55 +00:00
GitHub Action dbbc34dba1 docs(changelog): update for v0.2.154 [skip ci] 2025-09-18 07:02:07 +00:00
GitHub Action c041b7d7f2 chore(release): 0.2.154 [skip ci] 2025-09-18 07:00:42 +00:00
GitHub Action df4b095193 chore(release): 0.2.153 [skip ci] 2025-09-18 04:35:17 +00:00
GitHub Action c2d666d553 chore(release): 0.2.152 [skip ci] 2025-09-17 06:20:42 +00:00
Michael BolinandGitHub 791d7b125f fix: make GitHub Action publish to npm using trusted publishing (#3431) 2025-09-16 20:33:59 -07:00
GitHub Action ca7c35e7d2 chore(release): 0.2.151 [skip ci] 2025-09-16 17:38:59 +00:00
GitHub Action d8bd295609 chore(release): 0.2.150 [skip ci] 2025-09-16 17:05:13 +00:00
GitHub Action f764700ca8 docs(changelog): update for v0.2.149 [skip ci] 2025-09-16 07:39:01 +00:00
GitHub Action 3f490b39c6 chore(release): 0.2.149 [skip ci] 2025-09-16 07:37:13 +00:00
James Peter 025b905b48 fix(tui/events): revert CodeEvent/CodeOp to CodexEvent/CodexOp; align with fork naming policy
- Rename enum variants and all call sites in TUI
- Keep branding guide-only; avoid renaming code identifiers
- Update CLI description to 'fork of OpenAI Codex'

Build: ./build-fast.sh PASS (no warnings)
2025-09-15 21:18:53 +10:00
just-every-code dbe4634282 Merge remote-tracking branch 'origin/main' into upstream-merge 2025-09-14 13:41:46 +00:00
GitHub Action a84ebc6470 docs(changelog): update for v0.2.148 [skip ci] 2025-09-14 09:49:48 +00:00
GitHub Action 714e6a6170 chore(release): 0.2.148 [skip ci] 2025-09-14 09:48:25 +00:00
GitHub Action 4784d1dafd docs(changelog): update for v0.2.147 [skip ci] 2025-09-14 09:31:57 +00:00
GitHub Action d200c20490 chore(release): 0.2.147 [skip ci] 2025-09-14 09:30:52 +00:00
github-actions[bot] 2ca13b135a chore(merge): auto-rebrand user-visible strings ('Codex'→'Code') in TUI/CLI files 2025-09-14 03:12:02 +00:00
GitHub Action 84762cc02a docs(changelog): update for v0.2.146 [skip ci] 2025-09-14 03:05:31 +00:00
GitHub Action bdcdf63775 chore(release): 0.2.146 [skip ci] 2025-09-14 03:04:39 +00:00
GitHub Action d655d8a651 chore(release): 0.2.145 [skip ci] 2025-09-13 19:53:42 +00:00
GitHub Action 5e96511cfd docs(changelog): update for v0.2.144 [skip ci] 2025-09-13 09:35:31 +00:00
GitHub Action 4d02532c7f chore(release): 0.2.144 [skip ci] 2025-09-13 09:34:51 +00:00
GitHub Action 6a38adf8ac docs(changelog): update for v0.2.143 [skip ci] 2025-09-13 04:14:29 +00:00
GitHub Action f1304a83e8 chore(release): 0.2.143 [skip ci] 2025-09-13 04:13:16 +00:00
GitHub Action dd3ee63e2d docs(changelog): update for v0.2.142 [skip ci] 2025-09-12 16:57:28 +00:00
GitHub Action 82b9055f9f chore(release): 0.2.142 [skip ci] 2025-09-12 16:56:19 +00:00
GitHub Action b206266159 chore(release): 0.2.141 [skip ci] 2025-09-12 16:29:48 +00:00
GitHub Action d5378b6f88 chore(release): 0.2.140 [skip ci] 2025-09-12 16:11:26 +00:00
GitHub Action 4dc57f481c docs(changelog): update for v0.2.139 [skip ci] 2025-09-12 15:07:38 +00:00