Commit Graph
1594 Commits
Author SHA1 Message Date
GitHub Action 3166690ebb chore(release): 0.2.59 [skip ci] 2025-09-05 09:31:33 +00:00
James Peter bbde3435d1 ci(smoke): remove stray status echo causing 'unbound variable' under set -u 2025-09-05 19:23:40 +10:00
James Peter fcc7d82d26 ci(smoke): use a trivial prompt (ls + brief description) to avoid toolchain/build steps and finish quickly 2025-09-05 19:20:58 +10:00
James Peter 7f937dc17a ci(smoke): default to live run with OPENAI_API_KEY and default model; remove use_api/model inputs 2025-09-05 19:17:04 +10:00
James Peter 3906ba74c3 ci(smoke): add options to use OPENAI_API_KEY + model for live request; keep default parse-only mode 2025-09-05 19:15:06 +10:00
James Peter b0baa3bd3d ci(smoke): switch to npx @just-every/code to test published release; fix inputs context and minor typo 2025-09-05 19:09:09 +10:00
James Peter 4f7701c8e9 ci(smoke): add fast workflow to validate 'code exec --cd' parsing and stdin redirection without full release pipeline 2025-09-05 19:05:44 +10:00
James Peter 0f67da510e ci(release): use 'exec --cd' instead of unknown top-level '--cwd' and verify locally 2025-09-05 19:02:33 +10:00
James Peter cef240fd85 ci(release): publish npm packages last; bump codex-cli to 0.2.58 and compute version across all npm targets to avoid E403 overwrite 2025-09-05 18:51:00 +10:00
James Peter d497a1aaf4 fix(tui/sanitize): centralize diff/output sanitization; strip OSC/DCS/C1/zero-width and expand tabs via shared util\n\n- Add with and modes\n- Expand tabs (Unicode-aware) and remove zero-width/BiDi controls\n- Strip OSC/DCS/APC/PM/SOS strings and raw C0/C1 bytes; keep CSI when preserving ANSI\n- Apply to diff_render (plain) and history_cell (ANSI-preserving)\n\nValidated with ./build-fast.sh (no warnings).\n\nFixes #22 2025-09-05 17:50:39 +10:00
James Peter c2a24afe04 feat(tui/streaming): animate streaming ellipsis as rotating three dots\n\nReplace static ellipsis (… ) in StreamingContentCell with a subtle three-dot\nanimation using a middle dot (·) cycling through frames: ..., ·.., .·., ..·, ...\nShown only while streaming, in the same places the previous ellipsis appeared.\nFrame cadence ~200ms. Validated via ./build-fast.sh (no warnings). 2025-09-05 17:34:15 +10:00
James Peter 7373a34fe4 ci(release): fix YAML by indenting heredoc content in run block 2025-09-05 17:26:02 +10:00
James Peter f673599221 feat(tui/history): add WebFetchToolCell and fix streaming header\n\n- Preserve first content line during streaming by prepending hidden header when absent\n- Replace tool call lines with sectioned web_fetch preview and dim styling\n- Update release notes guidance in workflow docs\n\nValidated with ./build-fast.sh (no warnings) 2025-09-05 17:22:25 +10:00
James Peter ef397e4f35 ci(release): align CLI agent prompt with new CHANGELOG/notes house style and idempotent update rules 2025-09-05 16:58:16 +10:00
James Peter 6647b24a2d docs(changelog): add v0.1.7–v0.1.2 entries 2025-09-05 16:53:35 +10:00
James Peter e6e0834931 docs(changelog): add v0.1.13–v0.1.8 entries 2025-09-05 16:53:07 +10:00
James Peter fbc1d7201d docs(changelog): add v0.2.9–v0.2.1 entries 2025-09-05 16:52:16 +10:00
James Peter 70e6650715 docs(changelog): add v0.2.24–v0.2.10 entries 2025-09-05 16:51:39 +10:00
James Peter e65582f4f4 docs(changelog): add v0.2.36–v0.2.25 entries from tag ranges 2025-09-05 16:50:19 +10:00
James Peter d4b921253f docs(changelog): add v0.2.46–v0.2.37 and correct v0.2.38/0.2.37 mapping 2025-09-05 16:49:08 +10:00
James Peter aebff2db96 docs(changelog): reconstruct notes for v0.2.47–v0.2.56 from tags and commit history 2025-09-05 16:43:40 +10:00
James Peter bae1b9b6c3 fix(tui/history): guard missing OrderMeta; synthesize order keys
- Make `order_key_from_order_meta` take `&OrderMeta` to remove panicking unwraps.
- Replace `ensure_stream_order_key_strict` with `try_stream_order_key`; synthesize keys via `next_internal_key()` when id/key is missing.
- Add guarded fallbacks across Answer/Reasoning/PlanUpdate/Exec/MCP paths, logging warnings rather than panicking to preserve strict per‑turn ordering.
- Interrupt manager tolerates missing metadata for queued Exec begin/end.
- Update exec_tools call sites for new signature.
- Refresh CHANGELOG with 0.2.56 summaries and ordering notes.
2025-09-05 16:42:21 +10:00
James Peter b2fce65e44 fix(tui/render): clamp bottom spacer compensation to 1 row at end of viewport
Users saw blank bottom when final/user messages inserted: our targeted spacer compensation used full gap (content_y - scroll_pos) which could push the draw cursor past the viewport. Clamp strictly to a single spacer row when at bottom and rendering the last item. No ordering changes.
2025-09-05 16:25:17 +10:00
James Peter 7c71037d38 feat(tui/history): enforce strict global ordering and stream IDs
- Replace legacy turn-window logic with stable  per insert
- Require non-empty stream IDs; seed order keys per (kind,id)
- Pair out-of-order ExecEnd/Begin and drop canceled execs
- Surface init/submit errors as BackgroundEvent diagnostics
- Improve status panes, borders, and preview truncation by display width
- Update release workflow; docs: AGENTS.md, prompt_coder.md; add MERGE.md and postmortem

Build: ./build-fast.sh passes locally with no warnings.
2025-09-05 16:13:31 +10:00
James Peter b61d2028b5 chore: commit all code 2025-09-05 13:05:25 +10:00
James Peter a2b747d09b fix(tui/status): remove duplicate 'Ctrl+R hide reasoning' hint from top bar (footer already shows it) 2025-09-05 10:12:35 +10:00
James Peter 7350fd1bd6 fix(tui/redraw): ensure scheduled animation frames are not suppressed by debounce
- Add  flag independent of
- Arm exactly one timer for AppEvent::ScheduleFrameIn while allowing immediate redraw debounce
- Prevents welcome logo animation from stalling until input

Also: revert intro color fade profile to original (no visual change request).
2025-09-05 08:21:47 +10:00
James Peter 7fb2815445 fix(tui/animation): ensure intro logo visibly completes without perf cost
- Remove per-frame debug log in intro renderer
- Delay internal fade to last ~2% and force final frame vivid
- Defer any fade-out to AnimatedWelcomeCell alpha blending

Keeps animation smooth and visually complete on all terminals.
2025-09-05 08:17:03 +10:00
James Peter 7577fe4b60 feat(tui/order): enforce strict global ordering and remove turn-window logic\n\n- Add strict and global ordered inserts\n- Require for LLM/tool events; panic if missing\n- Replace unordered pushes with ordered using synthetic internal keys (out=-1)\n- Remove turn-window fields/logic; delete legacy helpers\n- Seed per-stream keys from ; enforce for Answer/Reasoning/MCP\n- Carry with pending ExecEnd and flush with correct order\n- Simplify interrupts queue; drop window fields and pass through \n- Clean up dead code and fix warnings (0 warnings)\n\nValidated with ./build-fast.sh (no warnings). 2025-09-04 11:50:16 +10:00
James Peter 9fe8adfd94 fix(tui/chrome): import Clear and paint themed background for selection dialog 2025-09-04 09:31:13 +10:00
James Peter 977d3e6391 fix(tui/dialogs): ensure all popups use theme bg/fg and border; update /resume, list/verbosity/reasoning selections, Chrome options, and diff confirm dialog 2025-09-04 09:30:21 +10:00
James Peter d11f9bb603 fix(tui/diff-confirm): theme-aware dialog (bg/fg + border) and paint inner area 2025-09-04 09:28:24 +10:00
James Peter f7e857d5b3 chore(tui): revert unrelated streaming/history changes from previous commit; keep resume dialog theming only 2025-09-04 09:26:33 +10:00
James Peter 538e3e1091 fix(tui/resume): apply theme bg/fg + border to dialog block for consistent theming across all popups 2025-09-04 09:26:01 +10:00
James Peter 165d52d2e6 feat(tui/reasoning): render expanded reasoning dim with a subtle left border; implement custom_render_with_skip for CollapsibleReasoningCell 2025-09-04 09:13:56 +10:00
James Peter d362d096e9 fix(core/reasoning): separate reasoning summary streams by summary_index and raw content by content_index; include index in stream id (item_id#s<idx>/#c<idx>) and de-dup keys; propagate indices through events 2025-09-04 08:50:19 +10:00
James Peter c25146b596 chore(tui/reasoning): append live title snapshot to --order overlay; add debug_title_overlay() on CollapsibleReasoningCell 2025-09-04 08:36:14 +10:00
James Peter e937255f95 Merge merge/upstream-main-2025-09-04 into main: upstream core sync; TUI unchanged 2025-09-04 07:21:55 +10:00
James Peter 94a9aa5131 fix(core): complete upstream integration
- Update all AuthManager::shared and CodexAuth::from_codex_home call sites with originator
- Use rollout::policy helper to filter persisted items
- Fix shell tool description formatting and UA helper reference
- Remove unused import in chatgpt_client

Build: ./build-fast.sh clean with zero warnings
2025-09-04 07:21:34 +10:00
James Peter 8e1973e460 merge(core): integrate upstream main, adopt default_client UA; fix auth originator and tool docs
- Resolve upstream delete of user_agent.rs; use default_client::get_codex_user_agent
- Switch client construction to default_client with originator header
- Update AuthManager::shared and CodexAuth::from_codex_home call sites to pass originator
- Fix openai_tools shell tool description formatting and include writable roots
- Deduplicate/repair config_types derives; import Serialize/Display early
- Use rollout::policy::is_persisted_response_item and remove dead import
- Keep our TUI architecture intact; no functional UI changes

Build: ./build-fast.sh passes with zero warnings
2025-09-04 07:21:05 +10:00
DylanandGitHub db5276f8e6 chore: Clean up verbosity config (#3056)
## Summary
It appears that #2108 hit a merge conflict with #2355 - I failed to
notice the path difference when re-reviewing the former. This PR
rectifies that, and consolidates it into the protocol package, in line
with our philosophy of specifying types in one place.

## Testing
- [x] Adds config test for model_verbosity
2025-09-03 12:20:31 -07:00
Anton PanasenkoandGitHub 77fb9f3465 [codex] document use_experimental_reasoning_summary toml key config (#3118)
Follow up on https://github.com/openai/codex/issues/3101
2025-09-03 11:16:07 -07:00
0e827b6598 Auto-approve DangerFullAccess patches on non-sandboxed platforms (#2988)
**What?**
Auto-approve patches when `SandboxPolicy::DangerFullAccess` is enabled
on platforms without sandbox support.
Changes in `codex-rs/core/src/safety.rs`: return
`SafetyCheck::AutoApprove { sandbox_type: SandboxType::None }` when no
sandbox is available and DangerFullAccess is set.

**Why?**
On platforms lacking sandbox support, requiring explicit user approval
despite `DangerFullAccess` being explicitly enabled adds friction
without additional safety. This aligns behavior with the stated policy
intent.

**How?**
Extend `assess_patch_safety` match:

* If `get_platform_sandbox()` returns `Some`, keep `AutoApprove {
sandbox_type }`.
* If `None` **and** `SandboxPolicy::DangerFullAccess`, return
`AutoApprove { SandboxType::None }`.
* Otherwise, fall back to `AskUser`.

**Tests**

* Local checks:
  ```bash
cargo test && cargo clippy --tests && cargo fmt -- --config
imports_granularity=Item
  ```
(Additionally: `just fmt`, `just fix -p codex-core`, `cargo check -p
codex-core`.)

**Docs**
No user-facing CLI changes. No README/help updates needed.

**Risk/Impact**
Reduces prompts on non-sandboxed platforms when DangerFullAccess is
explicitly chosen; consistent with policy semantics.

---------

Co-authored-by: Michael Bolin <[email protected]>
2025-09-03 10:57:47 -07:00
Ahmed IbrahimandGitHub daaadfb260 Introduce Rollout Policy (#3116)
Have a helper function for deciding if we are rolling out a function or
not
2025-09-03 17:37:07 +00:00
pakrym-oaiandGitHub c636f821ae Add a common way to create HTTP client (#3110)
Ensure User-Agent and originator are always sent.
2025-09-03 10:11:02 -07:00
Lionel ChengandGitHub af338cc505 Improve @ file search: include specific hidden dirs such as .github, .gitlab (#2981)
# Improve @ file search: include specific hidden dirs

This should close #2980

## What
- Extend `@` fuzzy file search to include select top-level hidden
directories:
`.github`, `.gitlab`, `.circleci`, `.devcontainer`, `.azuredevops`,
`.vscode`, `.cursor`.
- Keep all other hidden directories excluded to avoid noise and heavy
traversals.

## Why
- Common project config lives under these dot-dirs (CI, editor,
devcontainer); users expect `@.github/...` and similar paths to resolve.
- Prior behavior hid all dot-dirs, making these files undiscoverable.

## How
- In `codex-file-search` walker:
  - Enable hidden entries via `WalkBuilder.hidden(false)`.
- Add `filter_entry` to only allow those specific root dot-directories;
other hidden paths remain filtered out.
  - Preserve `.gitignore` semantics and existing exclude handling.

## Local checks
- Ran formatting: `just fmt`
- Ran lint (scoped): `just fix -p codex-file-search`
- Ran tests:
  - `cargo test -p codex-file-search`
  - `cargo test -p codex-tui`

## Readiness
- Branch is up-to-date locally; tests pass; lint/format applied.
- No merge conflicts expected.
- Marking Ready for review.

---------

Signed-off-by: lionelchg <[email protected]>
2025-09-03 10:03:57 -07:00
Jeremy RoseandGitHub 97000c6e6d core: correct sandboxed shell tool description (reads allowed anywhere) (#3069)
Correct the `shell` tool description for sandboxed runs and add targeted
tests.

- Fix the WorkspaceWrite description to clearly state that writes
outside the writable roots require escalated permissions; reads are not
restricted. The previous wording/formatting could be read as restricting
reads outside the workspace.
- Render the writable roots list on its own lines under a newline after
"writable roots:" for clarity.
- Show the "Commands that require network access" note only in
WorkspaceWrite when network is disabled.
- Add focused tests that call `create_shell_tool_for_sandbox` directly
and assert the exact description text for WorkspaceWrite, ReadOnly, and
DangerFullAccess.
- Update AGENTS.md to note that `just fmt` can be run automatically
without asking.
2025-09-03 10:02:34 -07:00
Gabriel PealandGitHub fb5dfe3396 Update guidance on API key permissions (#3112)
Fixes https://github.com/openai/codex/issues/3108
2025-09-03 12:44:16 -04:00
James Peter 0ec16f00c8 refactor(core/tools): introduce ToolCallCtx and centralize ordered event emission
- Add ToolCallCtx { sub_id, call_id, output_index, seq_hint } with helper to build OrderMeta
- Add Session::send_ordered_from_ctx and migrate all tool handlers to ctx signature
- Replace execute_custom_tool signature to take &ToolCallCtx, auto-emit begin/end with OrderMeta
- Update plan/update_plan and MCP tool calls to use ctx
- Simplifies plumbing and prevents missing ordering fields across handlers

Build: ./build-fast.sh passes with zero warnings.
2025-09-03 23:23:43 +10:00
James Peter d7c767d452 fix(core/events): preserve request/output ordering for tool events
- Add Session::send_ordered_event helper to stamp OrderMeta and send
- Emit OrderMeta for CustomToolCallBegin/End (all browser_*, agent_*, web_fetch)
- Thread seq_hint+output_index through function-call handlers
- MCP tool calls (Begin/End) now sent with OrderMeta
- Plan tool: emit PlanUpdate via ordered event to avoid sinking to bottom

Ensures multiple tool calls (e.g., repeated web_fetch) and subsequent
assistant output render in correct order in the TUI.
2025-09-03 23:07:51 +10:00