Commit Graph
42 Commits
Author SHA1 Message Date
James Peter 1a8db38d16 fix(scripts/test-responses): prefer .code directory 2025-09-19 14:41:25 +10:00
James Peter b01e2b389e feat: add long run calculator script 2025-09-18 17:15:28 +10:00
James Peter 54af37365a ci(upstream-merge): make branding guide-only
- Remove auto-branding worktree + commit and failing guard
- Keep perma-deleted guard; generate VERIFY_branding.log for guidance
- verify.sh: record branding findings as notice, never fail rc; write branding log

Rationale: branding should be a suggestion, not a gate. Code/maintainers can
apply suggested changes explicitly in follow-ups while upstream merge is gated
solely by build + API invariants.
2025-09-15 10:25:20 +10:00
James Peter f20aee3441 chore(ci/upstream-merge): add branding guard + auto-fix step for TUI/CLI\n\nAdd non-fixing verify step to flag newly introduced user-visible 'Codex' strings\nunder TUI/CLI paths vs origin/<branch>. Add CI job to auto-fix branding in the\nmerge worktree using a safe single-line quoted-string replacement script. 2025-09-13 13:47:39 +10:00
James Peter a00308b391 fix(core/client): switch tool type to 'web_search' to avoid 400 Unsupported tool error\n\nThe Responses API rejects 'web_search_preview' with 400 (Unsupported tool type).\nUse the supported 'web_search' tool id. Update test payload generator accordingly. 2025-09-13 13:47:34 +10:00
James Peter e3f313b796 fix(tui/spinner): use active auth preference for custom spinner generation\n\n- Prefer ChatGPT auth when session uses ChatGPT; otherwise use API key\n- Avoids 401 retry loops when background thread created a fresh AuthManager\n- Matches request shape that succeeds in harness (responses=v1, session handling) 2025-09-13 00:33:37 +10:00
James Peter 79c69f9642 feat(dev): add scripts/test-responses.js to probe Responses API with ChatGPT/API-key auth\n\n- Reads /auth.json; supports --auth chatgpt|api-key|auto\n- Tests: base, json-schema, tools-web-search, tools-web-search-preview, store\n- Uses Responses v1; non-streaming by default for clear error capture\n- Prints status + x-request-id and error excerpts 2025-09-13 00:02:33 +10:00
James Peter acfaeb7dd5 ci(proxy): set Responses v1 and fail-fast on 5xx\n\n- scripts/openai-proxy.js default RESPONSES_BETA=responses=v1\n- Workflows (issue-code, issue-comment, release, upstream-merge): EXIT_ON_5XX=1 and RESPONSES_BETA=responses=v1\n\nFix: API-key 2nd-call 500s addressed in client; proxy now aligned with production headers 2025-09-12 23:57:18 +10:00
James Peter 1ddedb8b48 chore(proxy): add STRICT_HEADERS and RESPONSES_BETA override; minimal allowlist mode 2025-09-12 23:24:59 +10:00
James Peter a88f97c681 chore(proxy): add debug toggles and error-body logging\n\n- Options: DISABLE_KEEPALIVE, FORCE_CLOSE, NO_GZIP, STRIP_SESSION_ID, IDEMPOTENCY_KEY=auto, LOG_ERROR_BODY(+_BYTES)\n- Helps isolate Responses API 500s on subsequent requests 2025-09-12 23:11:31 +10:00
James Peter 7304efeb2b ci(proxy): centralize OpenAI proxy to scripts/openai-proxy.js and use across workflows\n\n- Replace inline JS proxies in upstream-merge, issue-code, issue-comment, release\n- Shared behavior: SSE defaults, allowlist, header scrubbing, structured logs\n- Supports PORT/OPENAI_BASE_URL/LOG_DEST/EXIT_ON_5XX via env\n- Keeps existing port assignments (5055/5056/5057/5058)\n 2025-09-12 22:43:05 +10:00
James Peter 7e9203c225 chore(dev): add local OpenAI proxy script replicating upstream-merge settings\n\n- scripts/openai-proxy.js mirrors CI proxy (allowlist, SSE defaults, header scrubbing)\n- Usage docs in file header; supports PORT and OPENAI_BASE_URL\n- For local runs: set proxy with real OPENAI_API_KEY; run code with OPENAI_BASE_URL=http://127.0.0.1:<port>/v1 and dummy key 2025-09-12 22:18:08 +10:00
James Peter fd38d777bc fix(release/homebrew): use local artifacts for sha256; add retry/backoff on remote fetch; avoid failing on CDN propagation
- Prefer release-assets/* when present to compute sha256 for Homebrew formula.\n- Retry curl with backoff if local file missing; print warnings instead of failing.\n- Keep formula URLs pointing to GitHub Releases; add best-effort HEAD checks.\n- Eliminates 404-induced failures right after uploading assets.
2025-09-12 21:51:05 +10:00
James Peter f69ea8b525 fix(core/mcp): honor per-server startup_timeout_ms and make tools/list failures non-fatal; add test MCP server + smoke harness to validate slow/fast scenarios
- Add  to  and parse/write in config
- Apply per-server timeout to  and initial
- Treat per-server  errors as non-fatal; record and skip those servers
- Keep manager creation successful even if some servers time out
- Export  so local smoke tool can exercise it
- Add  (stdio JSON-RPC) and  binary for manual validation
- Update TUI  to set  by default

This resolves GitHub issue #91 where a slow MCP server caused manager creation to time out and fail entirely.
2025-09-12 00:10:56 +10:00
James Peter 742ddc152c Merge upstream-merge into main: restore fork features and keep upstream improvements
- Core: keep browser_*/agent_* tool exposure and web_fetch in openai_tools; preserve browser gating + screenshot UX; adapt recorder API
- Protocol: keep TS model changes for protocol-ts; align image shape
- Default client: reinstate UA helpers (USER_AGENT_SUFFIX, get_codex_user_agent_default)
- CI/Docs: carry remote minor updates

Build: ./build-fast.sh clean
2025-09-11 20:55:52 +10:00
James Peter 7961c09a98 ci(upstream-merge): expand agent context with fork enhancements + generic guards
- Add docs/fork-enhancements.md (initial list; instruct agent to scan repo for more)
- Inject the overview into the merge prompt
- Generalize verify guards to handler↔tool parity by family (browser_*, agent_*, web_fetch), and keep UA/version check

Prevents silent loss of fork features and gives the agent richer context.
2025-09-11 20:12:17 +10:00
James Peter 569f15e758 ci(upstream-merge): preserve fork features via policy + guards
- Policy: prefer ours for core files that contain forked functionality (openai_tools, codex.rs, agent_tool, default_client, protocol models)
- Verify: add static guards to fail if browser/agent tools are dropped or UA/version handling is removed
- Workflow: embed explicit invariants in agent prompt (browser/agent tools, screenshot queue, version UA); reference verify guards

Keeps our model-driven tools and UX intact while still adopting safe upstream changes.
2025-09-11 19:34:32 +10:00
just-every-code 09f501b063 Merge remote-tracking branch 'origin/main' into upstream-merge 2025-09-10 02:39:25 +00:00
James Peter 085fe5f3c1 ux(spinners): keep grouped order and render group headers as dim title rows; add selector arrow back\n\n- Sort spinners by (group,name) from JSON (grouped or flat)\n- Spinner list shows dim group header rows (non-selectable) between groups\n- Selected row gets '› ' arrow and info-colored preview; others dim\n- Add Node script to upgrade spinners.json to grouped format with labels 2025-09-10 12:11:41 +10:00
James Peter 81f99a71ad chore(spinners): add labels + groups to spinners.json via Node script; keep runtime fallbacks\n\n- Script: scripts/upgrade-spinners.js (idempotent; --dry-run supported)\n- JSON now includes {label, group} for each spinner; easier to curate manually\n- spinner.rs reads label/group (with humanize/derive fallback) 2025-09-10 11:57:20 +10:00
just-every-code 7ebb17bd0f merge(upstream): merge upstream/main into upstream-merge with policy
- Keep ours for  (resume picker not reintroduced)
- Initially took upstream for core, but reverted to ours to maintain API compatibility and pass build
- Adopted upstream elsewhere where non-conflicting
- Guard: keep codex-core re-exports and models alias intact
- Verify script: disable sccache outside GHA to allow local verify
- Fix: remove unused imports in theme selection view (warnings-as-failure policy)

Build: scripts/upstream-merge/verify.sh => build_fast=ok api_check=ok
2025-09-10 01:15:15 +00:00
just-every-code 37eb04668f Merge remote-tracking branch 'origin/main' into upstream-merge 2025-09-10 01:02:55 +00:00
James Peter 9e7c7deeec ci(upstream-merge): unify Cargo env/caches; drop duplicate caches; keep sccache
Use one CARGO_HOME/CARGO_TARGET_DIR across agent and verify. Remove redundant actions/cache steps; rely on Swatinem/rust-cache and sccache GHA backend for incremental builds. verify.sh now respects env and uses KEEP_ENV=1 so builds share caches.
2025-09-10 08:17:45 +10:00
just-every-code b57d270d5a merge(upstream): incorporate openai/codex@2a76a08a9 (by-bucket)
- Prefer ours for TUI/CLI and workflows; theirs for protocol where safe
- Adopt upstream rollout_path in NewConversationResponse; wire through SessionConfiguredEvent
- Add TS derives for protocol types to satisfy upstream TS schema
- Keep core API re-exports and models alias intact

Verification: scripts/upstream-merge/verify.sh passed; ./build-fast.sh clean (no warnings)
2025-09-09 07:34:28 +00:00
just-every-code 8f2081ee70 merge(upstream): merge upstream/main into upstream-merge (by-bucket)
- Keep ours for TUI/CLI/workflows/docs; purge reintroduced rust-ci.yml
- Prefer theirs in protocol/deps; add serde_bytes + ICU/sys-locale/serde_with
- Keep our core codex/shell to preserve API; fix exec AuthMode import
- Make verify.sh CI-safe (no sccache; local CARGO dirs); check api_surface only

Build: ok; Verify: ok
2025-09-09 01:56:14 +00:00
James Peter 42c252c0fd ci(upstream-merge): add scripts/upstream-merge/verify.sh and switch checks/remediation to use it; agent instructed to run verify before pushing 2025-09-09 11:37:05 +10:00
James Peter a97b84609a ci(release): add preflight E2E tests and per-target post-build smokes; fix duplicate workflow block 2025-09-09 10:59:49 +10:00
James Peter aa6a9498fc revert: drop unintended preflight test files and release.yml edits; keep only core API tests and upstream-merge prompt/checks 2025-09-09 10:56:07 +10:00
James Peter 7b4b4c099e test(core/api): add compile-only API surface checks for core re-exports and models alias 2025-09-09 10:54:43 +10:00
James Peter 1e68223812 chore(repo,tui): remove labels/scripts; update TUI sources
- Remove obsolete GitHub label templates and demo assets
- Remove unused helper scripts under `scripts/`
- Update Rust TUI sources (`codex-rs/tui/src/*`)

Staged summary:

 .github/codex/labels/codex-attempt.md     |   9 --
 .github/codex/labels/codex-review.md      |   7 --
 .github/codex/labels/codex-rust-review.md | 139 ------------------------------
 .github/codex/labels/codex-triage.md      |   7 --
 .github/demo.gif                          | Bin 19750111 -> 0 bytes
 .github/pull_request_template.md          |   6 --
 codex-rs/tui/src/app.rs                   |   7 ++
 codex-rs/tui/src/app_event.rs             |   4 +
 codex-rs/tui/src/bottom_pane/mod.rs       |  52 ++++++-----
 codex-rs/tui/src/chatwidget.rs            |  48 ++++++++++-
 codex-rs/tui/src/history_cell.rs          |  26 ++++--
 codex-rs/tui/src/user_approval_widget.rs  |  71 ++++-----------
 scripts/asciicheck.py                     | 127 ---------------------------
 scripts/pr-cleanup.sh                     | 131 ----------------------------
 scripts/publish_to_npm.py                 | 118 -------------------------
 scripts/readme_toc.py                     | 119 -------------------------
 16 files changed, 123 insertions(+), 748 deletions(-)
2025-09-08 22:15:28 +10:00
James Peter a68765ed08 chore: restore files removed unintentionally in previous commit
Re-add .github/codex labels, .vscode config, and root scripts that were dropped while updating upstream-merge workflow. Only intended change is the PR zero-diff guard.
2025-09-08 09:02:26 +10:00
James Peter 858e0d1d46 ci(upstream-merge): skip PR on zero diff; close existing no-op PRs
- Guard PR step when upstream merge is a true no-op (no file deltas vs base).
- Add workflow-level 'if' on PR step to honor earlier skip short-circuit.
- Leaves agent + policy steps unchanged; avoids empty PRs like #83.
2025-09-08 09:01:51 +10:00
James Peter f2f9b21549 ci(pr-cleanup): remove GitHub Actions cleanup workflow; use scripts/pr-cleanup.sh for local maintenance 2025-09-07 11:06:34 +10:00
James Peter 5b722e0732 fix(tui/input): normalize KeyEvent kind on non-enhanced terminals to restore typing on Git Bash/mintty (Windows)
This maps Release-only key events to Press when keyboard enhancement flags are unsupported, fixing unresponsive input and Ctrl+C on some Windows terminals.

Closes #18. Closes #14.
2025-09-03 21:44:29 +10:00
James Peter b1b01d09a6 Merge upstream/main into fork (prefer ours), integrate pager overlay; keep our transcript_app.rs for now 2025-08-29 11:50:50 +10:00
459363e17b README / docs refactor (#2724)
This PR cleans up the monolithic README by breaking it into a set
navigable pages under docs/ (install, getting started, configuration,
authentication, sandboxing and approvals, platform details, FAQ, ZDR,
contributing, license). The top‑level README is now more concise and
intuitive, (with corrected screenshots).

It also consolidates overlapping content from codex-rs/README.md into
the top‑level docs and updates links accordingly. The codex-rs README
remains in place for now as a pointer and for continuity.

Finally, added an extensive config reference table at the bottom of
docs/config.md.

---------

Co-authored-by: easong-openai <[email protected]>
2025-08-27 10:30:39 -07:00
James Peter baa1d52e2b chore: commit all pending changes 2025-08-23 19:23:58 +10:00
James Peter 430da705b3 fix(release): ensure GitHub Release + correct artifacts and repo refs
- Build code/code-tui/code-exec in rust-release workflow
- Always create/push v<tag>; remove skip gate for GH release
- Add permissions: contents: write
- Point staging to just-every/code and code-* artifacts
- Update checker accepts rust-vX.Y.Z or vX.Y.Z and refreshes cache
2025-08-19 03:19:43 +10:00
James Peter 752efaab5e chore: commit all current changes 2025-08-18 16:28:18 +10:00
Michael BolinandGitHub e87974ae83 fix: improve npm release process (#2055)
This improves the release process by introducing
`scripts/publish_to_npm.py` to automate publishing to npm (modulo the
human 2fac step).

As part of this, it updates `.github/workflows/rust-release.yml` to
create the artifact for npm using `npm pack`.

And finally, while it is long overdue, this memorializes the release
process in `docs/release_management.md`.
2025-08-08 19:07:36 -07:00
Michael BolinandGitHub 9b06fb48a7 add check to ensure ToC in README.md matches headings in the file (#541)
This introduces a Python script (written by Codex!) to verify that the
table of contents in the root `README.md` matches the headings. Like
`scripts/asciicheck.py` in https://github.com/openai/codex/pull/513, it
reports differences by default (and exits non-zero if there are any) and
also has a `--fix` option to synchronize the ToC with the headings.

This will be enforced by CI and the changes to `README.md` in this PR
were generated by the script, so you can see that our ToC was missing
some entries prior to this PR.
2025-04-22 09:38:12 -07:00
Michael BolinandGitHub c00ae2dcc1 Enforce ASCII in README.md (#513)
This all started because I was going to write a script to autogenerate
the Table of Contents in the root `README.md`, but I noticed that the
`href` for the "Why Codex?" heading was `#whycodex` instead of
`#why-codex`. This piqued my curiosity and it turned out that the space
in "Why Codex?" was not an ASCII space but **U+00A0**, a non-breaking
space, and so GitHub ignored it when generating the `href` for the
heading.

This also meant that when I did a text search for `why codex` in the
`README.md` in VS Code, the "Why Codex" heading did not match because of
the presence of **U+00A0**.

In short, these types of Unicode characters seem like a hazard, so I
decided to introduce this script to flag them, and if desired, to
replace them with "good enough" ASCII equivalents. For now, this only
applies to the root `README.md` file, but I think we should ultimately
apply this across our source code, as well, as we seem to have quite a
lot of non-ASCII Unicode and it's probably going to cause `rg` to miss
things.

Contributions of this PR:

* `./scripts/asciicheck.py`, which takes a list of filepaths and returns
non-zero if any of them contain non-ASCII characters. (Currently, there
is one exception for ✨ aka **U+2728**, though I would like to default to
an empty allowlist and then require all exceptions to be specified as
flags.)
* A `--fix` option that will attempt to rewrite files with violations
using a equivalents from a hardcoded substitution list.
* An update to `ci.yml` to verify `./scripts/asciicheck.py README.md`
succeeds.
* A cleanup of `README.md` using the `--fix` option as well as some
editorial decisions on my part.
* I tried to update the `href`s in the Table of Contents to reflect the
changes in the heading titles. (TIL that if a heading has a character
like `&` surrounded by spaces, it becomes `--` in the generated `href`.)
2025-04-22 10:07:40 -04:00