mirror of
https://github.com/openai/codex.git
synced 2026-10-29 19:08:43 +00:00
Ship the standalone executor in release packages (#57837)
## What changed - Include `codex-exec-server` in canonical CLI and app-server packages and advertise its path through `execServer` in `codex-package.json`. - Build and sign the executor in release workflows, preserve signed prebuilt inputs, and verify packaged signatures. Use empty entitlements for the macOS executor. - Have installers check for the executor when package metadata advertises it, while continuing to accept older packages. - Omit the standalone executor and its manifest entry from npm packages to stay within npm's package size limit. Keep `codex exec-server` and its runtime helpers available. ## Testing Add package smoke tests for executor initialization, version reporting, filesystem and process sandbox enforcement, and invalid-argument/configuration parity with `codex exec-server`. Extend archive, npm staging, and macOS signing tests to cover executor contents, executable permissions, preserved bytes, and entitlement verification. GitOrigin-RevId: bc741fe7faa6fe631d076de18d448c55247c23c7
This commit is contained in:
committed by
copyberry
parent
d359945843
commit
b91f2515f5
@@ -18,6 +18,12 @@ 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.
|
||||
|
||||
The npm variants omit the standalone `codex-exec-server` executable and its
|
||||
`execServer` manifest entry to keep uploads within npm's package size limit.
|
||||
They retain `codex exec-server` through the CLI, the code-mode host, and the
|
||||
platform sandbox helpers. Canonical release archives retain the standalone
|
||||
executor; npm staging changes only the package copy.
|
||||
|
||||
Direct `build_npm_package.py` invocations are still useful for package-specific
|
||||
debugging, but native packages expect `--vendor-src` to point at a prehydrated
|
||||
`vendor/` tree. Release packaging should use `scripts/stage_npm_packages.py`
|
||||
|
||||
@@ -391,6 +391,16 @@ def copy_native_binaries(
|
||||
if dest_target_dir.exists():
|
||||
shutil.rmtree(dest_target_dir)
|
||||
shutil.copytree(target_dir, dest_target_dir)
|
||||
# standalone exec-server is a binary that is equal to codex exec-server, do not publish it to npm
|
||||
for name in ("codex-exec-server", "codex-exec-server.exe"):
|
||||
(dest_target_dir / "bin" / name).unlink(missing_ok=True)
|
||||
metadata_path = dest_target_dir / "codex-package.json"
|
||||
if metadata_path.is_file():
|
||||
metadata = json.loads(metadata_path.read_text(encoding="utf-8"))
|
||||
metadata.pop("execServer", None)
|
||||
metadata_path.write_text(
|
||||
json.dumps(metadata, indent=2) + "\n", encoding="utf-8"
|
||||
)
|
||||
else:
|
||||
dest_target_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user