Commit Graph
524 Commits
Author SHA1 Message Date
just-every-code e4384eaacd 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 92b1dcf0cc 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/05228dc189389b9b3939ae60a749221413375d3e/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 a28bb80ee1 chore(release): 0.2.162 [skip ci] 2025-09-22 12:16:22 +00:00
GitHub Action ec10bd4cb9 chore(release): 0.2.161 [skip ci] 2025-09-22 11:22:46 +00:00
GitHub Action 6031c40563 chore(release): 0.2.160 [skip ci] 2025-09-22 10:57:11 +00:00
GitHub Action 5780936247 docs(changelog): update for v0.2.159 [skip ci] 2025-09-22 09:33:17 +00:00
GitHub Action e7b3986d40 chore(release): 0.2.159 [skip ci] 2025-09-22 09:29:51 +00:00
GitHub Action 369345d2ad chore(release): 0.2.158 [skip ci] 2025-09-22 09:01:39 +00:00
James Peter a894d4a8a9 feat(cli): add acp alias for mcp subcommand 2025-09-22 15:42:26 +10:00
James Peter 2a3331ea3c feat(cli): expose mcp via code subcommand 2025-09-22 15:16:49 +10:00
James Peter ea3b6f6b6f feat(cli): ship code-mcp-server with npm install 2025-09-22 15:02:41 +10:00
GitHub Action b6f8678615 docs(changelog): update for v0.2.157 [skip ci] 2025-09-22 03:20:16 +00:00
GitHub Action 95943a8f3e chore(release): 0.2.157 [skip ci] 2025-09-22 03:19:10 +00:00
GitHub Action 0ee852e8d5 chore(release): 0.2.156 [skip ci] 2025-09-22 01:48:44 +00:00
James Peter d15ed8b929 fix(cli/postinstall): restore code shim on npm global installs
Closes #199.
2025-09-20 06:05:32 +10:00
GitHub Action 2ff6ed68b5 chore(release): 0.2.155 [skip ci] 2025-09-18 08:45:55 +00:00
GitHub Action 1a8292a9c7 docs(changelog): update for v0.2.154 [skip ci] 2025-09-18 07:02:07 +00:00
GitHub Action 9f1f4b756e chore(release): 0.2.154 [skip ci] 2025-09-18 07:00:42 +00:00
GitHub Action 09916d7f45 chore(release): 0.2.153 [skip ci] 2025-09-18 04:35:17 +00:00
GitHub Action 5e433c3904 chore(release): 0.2.152 [skip ci] 2025-09-17 06:20:42 +00:00
Michael BolinandGitHub f56f35b26f fix: make GitHub Action publish to npm using trusted publishing (#3431) 2025-09-16 20:33:59 -07:00
GitHub Action e3c82be286 chore(release): 0.2.151 [skip ci] 2025-09-16 17:38:59 +00:00
GitHub Action 2d1bfd803d chore(release): 0.2.150 [skip ci] 2025-09-16 17:05:13 +00:00
GitHub Action 6cf3fff657 docs(changelog): update for v0.2.149 [skip ci] 2025-09-16 07:39:01 +00:00
GitHub Action e762c044ce chore(release): 0.2.149 [skip ci] 2025-09-16 07:37:13 +00:00
James Peter b42f8286cf 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 5caa8d8788 Merge remote-tracking branch 'origin/main' into upstream-merge 2025-09-14 13:41:46 +00:00
GitHub Action 61e3d53216 docs(changelog): update for v0.2.148 [skip ci] 2025-09-14 09:49:48 +00:00
GitHub Action f9e19b3acd chore(release): 0.2.148 [skip ci] 2025-09-14 09:48:25 +00:00
GitHub Action f48b0fa74d docs(changelog): update for v0.2.147 [skip ci] 2025-09-14 09:31:57 +00:00
GitHub Action a436cb9659 chore(release): 0.2.147 [skip ci] 2025-09-14 09:30:52 +00:00
github-actions[bot] 8ec551a4a1 chore(merge): auto-rebrand user-visible strings ('Codex'→'Code') in TUI/CLI files 2025-09-14 03:12:02 +00:00
GitHub Action 4ba4104736 docs(changelog): update for v0.2.146 [skip ci] 2025-09-14 03:05:31 +00:00
GitHub Action 66c287fabf chore(release): 0.2.146 [skip ci] 2025-09-14 03:04:39 +00:00
GitHub Action 7bd8bcc4de chore(release): 0.2.145 [skip ci] 2025-09-13 19:53:42 +00:00
GitHub Action 24f86d3cc7 docs(changelog): update for v0.2.144 [skip ci] 2025-09-13 09:35:31 +00:00
GitHub Action be9da1a884 chore(release): 0.2.144 [skip ci] 2025-09-13 09:34:51 +00:00
GitHub Action 785fe6cb17 docs(changelog): update for v0.2.143 [skip ci] 2025-09-13 04:14:29 +00:00
GitHub Action c75f6b1c6e chore(release): 0.2.143 [skip ci] 2025-09-13 04:13:16 +00:00
GitHub Action e28823a8e2 docs(changelog): update for v0.2.142 [skip ci] 2025-09-12 16:57:28 +00:00
GitHub Action 6410aa3a00 chore(release): 0.2.142 [skip ci] 2025-09-12 16:56:19 +00:00
GitHub Action 55df64caac chore(release): 0.2.141 [skip ci] 2025-09-12 16:29:48 +00:00
GitHub Action c5e4f325cf chore(release): 0.2.140 [skip ci] 2025-09-12 16:11:26 +00:00
GitHub Action abf0ae327a docs(changelog): update for v0.2.139 [skip ci] 2025-09-12 15:07:38 +00:00
GitHub Action c1b65c3a55 chore(release): 0.2.139 [skip ci] 2025-09-12 15:06:38 +00:00
GitHub Action b895411f80 chore(release): 0.2.138 [skip ci] 2025-09-12 14:43:33 +00:00
GitHub Action 55fad1c8b2 docs(changelog): update for v0.2.137 [skip ci] 2025-09-12 14:12:15 +00:00
GitHub Action 374cdfaac9 chore(release): 0.2.137 [skip ci] 2025-09-12 14:10:47 +00:00
GitHub Action 97bd3c3b49 chore(release): 0.2.136 [skip ci] 2025-09-12 13:21:10 +00:00
GitHub Action 5f9154476f chore(release): 0.2.135 [skip ci] 2025-09-12 12:53:09 +00:00