mirror of
https://github.com/openai/codex.git
synced 2026-09-06 15:29:32 +00:00
## Summary
The npm platform packages should stop carrying a bespoke native layout now that the release workflow builds canonical Codex package archives. Keeping npm on the same `bin/`, `codex-resources/`, and `codex-path/` structure lets the Rust package-layout detection behave consistently across standalone, npm, and future DotSlash installs.
This changes platform npm packages to stage the `codex-package` artifact for each target under `vendor/<target>`. The Node launcher now resolves `bin/codex` and prepends `codex-path`, while retaining legacy `vendor/<target>/codex` and `vendor/<target>/path` fallback support for local development and migration. The npm staging helper downloads `codex-package` archives instead of rebuilding the CLI payload from individual `codex`, `rg`, `bwrap`, and sandbox helper artifacts.
## Test plan
- `python3 -m py_compile codex-cli/scripts/build_npm_package.py codex-cli/scripts/install_native_deps.py scripts/stage_npm_packages.py`
- `node --check codex-cli/bin/codex.js`
- `ruby -e 'require "yaml"; YAML.load_file(".github/workflows/rust-release.yml"); puts "ok"'`
- Staged a synthetic `codex-linux-x64` platform package from a canonical vendor tree and verified it copied only `bin/`, `codex-path/`, `codex-resources/`, and `codex-package.json`.
- Imported `install_native_deps.py` and extracted a synthetic `codex-package-x86_64-unknown-linux-musl.tar.gz` into `vendor/<target>`.
- `node codex-cli/bin/codex.js --version`
24 lines
918 B
Markdown
24 lines
918 B
Markdown
# npm releases
|
|
|
|
Use the staging helper in the repo root to generate npm tarballs for a release. For
|
|
example, to stage the CLI, responses proxy, and SDK packages for version `0.6.0`:
|
|
|
|
```bash
|
|
./scripts/stage_npm_packages.py \
|
|
--release-version 0.6.0 \
|
|
--package codex \
|
|
--package codex-responses-api-proxy \
|
|
--package codex-sdk
|
|
```
|
|
|
|
This downloads the native package archive artifacts once, hydrates `vendor/` for each
|
|
package, and writes tarballs to `dist/npm/`.
|
|
|
|
When `--package codex` is provided, the staging helper builds the lightweight
|
|
`@openai/codex` meta package plus all platform-native `@openai/codex` variants
|
|
that are later published under platform-specific dist-tags.
|
|
|
|
If you need to invoke `build_npm_package.py` directly, run
|
|
`codex-cli/scripts/install_native_deps.py --component codex-package` first and pass
|
|
`--vendor-src` pointing to the directory that contains the populated `vendor/` tree.
|