Commit Graph
53 Commits
Author SHA1 Message Date
GitHub Action a82cbd4f14 docs(changelog): update for v0.6.39 [skip ci] 2026-01-07 01:32:43 +00:00
GitHub Action a8d6c81ef9 docs(changelog): update for v0.6.38 [skip ci] 2026-01-06 03:30:55 +00:00
GitHub Action 14ee940249 docs(changelog): update for v0.4.6 [skip ci] 2025-10-30 09:31:35 +00:00
James Peter 816b9a9920 feat(process-hardening): share hardening crate and update proxy 2025-09-30 08:23:01 +10:00
GitHub Action 7248a9525f docs(changelog): update for v0.2.175 [skip ci] 2025-09-29 11:36:33 +00:00
GitHub Action e82a92628e docs(changelog): update for v0.2.166 [skip ci] 2025-09-25 12:20:57 +00:00
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 5780936247 docs(changelog): update for v0.2.159 [skip ci] 2025-09-22 09:33:17 +00:00
GitHub Action b6f8678615 docs(changelog): update for v0.2.157 [skip ci] 2025-09-22 03:20:16 +00:00
GitHub Action 1a8292a9c7 docs(changelog): update for v0.2.154 [skip ci] 2025-09-18 07:02:07 +00:00
GitHub Action 6cf3fff657 docs(changelog): update for v0.2.149 [skip ci] 2025-09-16 07:39:01 +00:00
GitHub Action 61e3d53216 docs(changelog): update for v0.2.148 [skip ci] 2025-09-14 09:49:48 +00:00
GitHub Action f48b0fa74d docs(changelog): update for v0.2.147 [skip ci] 2025-09-14 09:31:57 +00:00
GitHub Action 4ba4104736 docs(changelog): update for v0.2.146 [skip ci] 2025-09-14 03:05:31 +00:00
GitHub Action 24f86d3cc7 docs(changelog): update for v0.2.144 [skip ci] 2025-09-13 09:35:31 +00:00
GitHub Action 785fe6cb17 docs(changelog): update for v0.2.143 [skip ci] 2025-09-13 04:14:29 +00:00
GitHub Action e28823a8e2 docs(changelog): update for v0.2.142 [skip ci] 2025-09-12 16:57:28 +00:00
GitHub Action abf0ae327a docs(changelog): update for v0.2.139 [skip ci] 2025-09-12 15:07:38 +00:00
GitHub Action 55fad1c8b2 docs(changelog): update for v0.2.137 [skip ci] 2025-09-12 14:12:15 +00:00
GitHub Action 4f98420a42 docs(changelog): update for v0.2.120 [skip ci] 2025-09-11 09:23:46 +00:00
GitHub Action 38a7b85dd2 docs(changelog): update for v0.2.118 [skip ci] 2025-09-11 00:03:01 +00:00
GitHub Action 9f8d7c29b3 docs(changelog): update for v0.2.117 [skip ci] 2025-09-10 12:10:47 +00:00
GitHub Action 39b3ed1a12 docs(changelog): update for v0.2.114 [skip ci] 2025-09-10 08:21:37 +00:00
GitHub Action ff43ea0b04 docs(changelog): update for v0.2.108 [skip ci] 2025-09-10 00:09:16 +00:00
GitHub Action f851dbce60 docs(changelog): update for v0.2.107 [skip ci] 2025-09-09 22:38:38 +00:00
GitHub Action 9d4d095719 docs(changelog): update for v0.2.106 [skip ci] 2025-09-09 10:47:55 +00:00
GitHub Action b700f58be1 docs(changelog): update for v0.2.104 [skip ci] 2025-09-09 06:22:57 +00:00
GitHub Action 77f94221ee docs(changelog): update for v0.2.97 [skip ci] 2025-09-08 22:42:38 +00:00
GitHub Action 6651ee2151 docs(changelog): update for v0.2.92 [skip ci] 2025-09-08 09:31:39 +00:00
GitHub Action 1add595790 docs(changelog): update for v0.2.91 [skip ci] 2025-09-08 03:06:51 +00:00
GitHub Action a07e8248ee docs(changelog): update for v0.2.87 [skip ci] 2025-09-08 00:48:56 +00:00
GitHub Action 7268f37583 docs(changelog): update for v0.2.83 [skip ci] 2025-09-07 20:49:23 +00:00
GitHub Action d20ba59802 docs(changelog): update for v0.2.81 [skip ci] 2025-09-07 19:56:00 +00:00
GitHub Action d879fa6766 docs(changelog): update for v0.2.75 [skip ci] 2025-09-07 01:15:35 +00:00
GitHub Action 5562663449 docs(changelog): update for v0.2.73 [skip ci] 2025-09-06 13:55:12 +00:00
GitHub Action b02fc23e0a docs(changelog): update for v0.2.72 [skip ci] 2025-09-06 12:24:49 +00:00
GitHub Action 2bb1938387 docs(changelog): update for v0.2.71 [skip ci] 2025-09-06 11:35:38 +00:00
GitHub Action a497313d0e docs(changelog): update for v0.2.69 [skip ci] 2025-09-06 04:29:21 +00:00
GitHub Action bd142d4ace docs(changelog): update for v0.2.59 2025-09-05 09:32:51 +00:00
DylanandGitHub 518791f03f [codex-cli] Add ripgrep as a dependency for node environment (#2237)
## Summary
Ripgrep is our preferred tool for file search. When users install via
`brew install codex`, it's automatically installed as a dependency. We
want to ensure that users running via an npm install also have this
tool! Microsoft has already solved this problem for VS Code - let's not
reinvent the wheel.

This approach of appending to the PATH directly might be a bit
heavy-handed, but feels reasonably robust to a variety of environment
concerns. Open to thoughts on better approaches here!

## Testing
- [x] confirmed this import approach works with `node -e "const { rgPath
} = require('@vscode/ripgrep'); require('child_process').spawn(rgPath,
['--version'], { stdio: 'inherit' })"`
- [x] Ran codex.js locally with `rg` uninstalled, asked it to run `which
rg`. Output below:

```
âš¡ Ran command which rg; echo $?
  ⎿ /Users/dylan.hurd/code/dh--npm-rg/node_modules/@vscode/ripgrep/bin/rg
    0

codex
Re-running to confirm the path and exit code.

- Path: `/Users/dylan.hurd/code/dh--npm-rg/node_modules/@vscode/ripgrep/bin/rg`
- Exit code: `0`
```
2025-08-13 13:49:27 -07:00
Alpha DiopandGitHub 7659c5957c chore: migrate to pnpm for improved monorepo management (#287)
# Migrate to pnpm for improved monorepo management

## Summary
This PR migrates the Codex repository from npm to pnpm, providing faster
dependency installation, better disk space usage, and improved monorepo
management.

## Changes
- Added `pnpm-workspace.yaml` to define workspace packages
- Added `.npmrc` with optimal pnpm configuration
- Updated root package.json with workspace scripts
- Moved resolutions and overrides to the root package.json
- Updated scripts to use pnpm instead of npm
- Added documentation for the migration
- Updated GitHub Actions workflow for pnpm

## Benefits
- **Faster installations**: pnpm is significantly faster than npm
- **Disk space savings**: pnpm's content-addressable store avoids
duplication
- **Strict dependency management**: prevents phantom dependencies
- **Simplified monorepo management**: better workspace coordination
- **Preparation for Turborepo**: as discussed, this is the first step
before adding Turborepo

## Testing
- Verified that `pnpm install` works correctly
- Verified that `pnpm run build` completes successfully
- Ensured all existing functionality is preserved

## Documentation
Added a detailed migration guide in `PNPM_MIGRATION.md` explaining:
- Why we're migrating to pnpm
- How to use pnpm with this repository
- Common commands and workspace-specific commands
- Monorepo structure and configuration

## Next Steps
As discussed, once this change is stable, we can consider adding
Turborepo as a follow-up enhancement.
2025-04-18 16:25:15 -07:00
Fouad MatinandGitHub 0daa0a098e bump(version): 0.1.2504172351 (#310)
Release `@openai/[email protected]`
2025-04-17 23:53:41 -07:00
Fouad MatinandGitHub bb9a079b99 add: changelog (#308)
- Release `@openai/[email protected]`
- Add changelog
2025-04-17 23:34:05 -07:00
fa3b862ad9 bump(version): 0.1.2504161551 (#254)
Bump version

---------

Signed-off-by: Fouad Matin <[email protected]>
Co-authored-by: Jon Church <[email protected]>
2025-04-17 20:54:40 -07:00
Brayden MoonandGitHub 457d336448 feat: shell command explanation option (#173)
# Shell Command Explanation Option

## Description
This PR adds an option to explain shell commands when the user is
prompted to approve them (Fixes #110). When reviewing a shell command,
users can now select "Explain this command" to get a detailed
explanation of what the command does before deciding whether to approve
or reject it.

## Changes
- Added a new "EXPLAIN" option to the `ReviewDecision` enum
- Updated the command review UI to include an "Explain this command (x)"
option
- Implemented the logic to send the command to the LLM for explanation
using the same model as the agent
- Added a display for the explanation in the command review UI
- Updated all relevant components to pass the explanation through the
component tree

## Benefits
- Improves user understanding of shell commands before approving them
- Reduces the risk of approving potentially harmful commands
- Enhances the educational aspect of the tool, helping users learn about
shell commands
- Maintains the same workflow with minimal UI changes

## Testing
- Manually tested the explanation feature with various shell commands
- Verified that the explanation is displayed correctly in the UI
- Confirmed that the user can still approve or reject the command after
viewing the explanation

## Screenshots

![improved_shell_explanation_demo](https://github.com/user-attachments/assets/05923481-29db-4eba-9cc6-5e92301d2be0)


## Additional Notes
The explanation is generated using the same model as the agent, ensuring
consistency in the quality and style of explanations.

---------

Signed-off-by: crazywolf132 <[email protected]>
2025-04-17 13:28:58 -07:00
Alpha DiopandGitHub 88afde498f Feat/add husky (#223)
# Add Husky and lint-staged for automated code quality checks

## Description
This PR adds Husky Git hooks and lint-staged to automate code quality
checks during the development workflow.

## Features Added
- Pre-commit hook that runs lint-staged to check files before committing
- Pre-push hook that runs tests and type checking before pushing
- Configuration for lint-staged to format and lint different file types
- Documentation explaining the Husky setup and usage
- Updated README.md with information about Git hooks

## Benefits
- Ensures consistent code style across the project
- Prevents pushing code with failing tests or type errors
- Reduces the need for style-related code review comments
- Improves overall code quality

## Implementation Details
- Added Husky and lint-staged as dev dependencies
- Created pre-commit and pre-push hooks
- Added configuration for lint-staged
- Added documentation in HUSKY.md
- Updated README.md with a new section on Git hooks

## Testing
The hooks have been tested locally and work as expected:
- Pre-commit hook runs ESLint and Prettier on staged files
- Pre-push hook runs tests and type checking

I have read the CLA Document and I hereby sign the CLA

---------

Signed-off-by: Alpha Diop <[email protected]>
2025-04-17 07:18:43 -07:00
Thibault SottiauxandGitHub ab2cb61845 (fix) do not transitively rely on deprecated lodash deps (#175)
Signed-off-by: Thibault Sottiaux <[email protected]>
2025-04-16 20:52:35 -07:00
Thibault SottiauxandGitHub 444c72afd8 (feat) expontential back-off when encountering rate limit errors (#153)
...and try to parse the suggested time from the error message while we
don't yet have this in a structured way

---------

Signed-off-by: Thibault Sottiaux <[email protected]>
2025-04-16 17:37:12 -07:00
Aron JonesandGitHub dadc063837 dotenv support (#122)
Signed-off-by: Aron Jones <[email protected]>
2025-04-16 15:33:12 -07:00