Commit Graph
10252 Commits
Author SHA1 Message Date
Michael Bolin 18c664919c Merge 03a23002e8 into sapling-pr-archive-bolinfest 2026-03-26 22:42:07 -07:00
Michael Bolin 03a23002e8 ci: add Bazel clippy workflow for codex-rs 2026-03-26 22:41:51 -07:00
Michael Bolin 1664d0a7e6 chore: move pty and windows sandbox to Rust 2024 2026-03-26 22:41:51 -07:00
Michael Bolin 083ba4c82c Merge 9ae14c4390 into sapling-pr-archive-bolinfest 2026-03-26 22:33:57 -07:00
Michael Bolin 9ae14c4390 ci: enable the Windows Bazel workflow path 2026-03-26 22:33:46 -07:00
Michael Bolin 99b1837479 Merge a6932eb88a into sapling-pr-archive-bolinfest 2026-03-26 22:25:36 -07:00
Michael Bolin a6932eb88a ci: add Bazel clippy workflow for codex-rs 2026-03-26 22:25:24 -07:00
Michael Bolin 987742a6db chore: move pty and windows sandbox to Rust 2024 2026-03-26 22:25:24 -07:00
Michael Bolin 5157b6daa5 merge commit for archive created by Sapling 2026-03-26 22:20:28 -07:00
Michael Bolin 0add39b43d ci: enable the Windows Bazel workflow path 2026-03-26 22:20:10 -07:00
Michael Bolin 9548b9b7f4 Merge 34542eb511 into sapling-pr-archive-bolinfest 2026-03-26 22:19:38 -07:00
Michael Bolin ff4198f0ad Merge 68af048a5f into sapling-pr-archive-bolinfest 2026-03-26 22:19:24 -07:00
Michael Bolin 34542eb511 ci: add Bazel clippy workflow for codex-rs 2026-03-26 22:16:18 -07:00
Michael Bolin 68af048a5f chore: move pty and windows sandbox to Rust 2024 2026-03-26 22:16:13 -07:00
Michael Bolin b83e814bbe Merge d5db735682 into sapling-pr-archive-bolinfest 2026-03-26 22:07:43 -07:00
Michael Bolin d5db735682 codex-tools: introduce named tool definitions 2026-03-26 21:56:20 -07:00
Michael Bolin 36531fea0e Merge 4d84919f26 into sapling-pr-archive-bolinfest 2026-03-26 21:54:49 -07:00
Michael Bolin 4d84919f26 ci: enable the Windows Bazel workflow path 2026-03-26 21:54:44 -07:00
Michael Bolin a7315772c5 Merge 4086ec990f into sapling-pr-archive-bolinfest 2026-03-26 21:51:37 -07:00
Michael Bolin 4086ec990f ci: enable windows bazel workflow 2026-03-26 21:51:22 -07:00
rhan-oai 21a03f1671 [app-server-protocol] introduce generic ClientResponse for app-server-protocol (#15921)
- introduces `ClientResponse` as the symmetrical typed response union to
`ClientRequest` for app-server-protocol
- enables scalable event stream ingestion for use cases such as
analytics
- no runtime behavior changes, protocol/schema plumbing only
2026-03-26 21:33:25 -07:00
Michael Bolin f6f8ada11b merge commit for archive created by Sapling 2026-03-26 21:20:04 -07:00
Michael Bolin f9451bde24 codex-tools: extract dynamic tool adapters 2026-03-26 21:19:44 -07:00
Michael Bolin 41fe98b185 fix: increase timeout for rust-ci to 45 minutes for now (#15948)
https://github.com/openai/codex/pull/15478 raised the timeout to 35
minutes for `windows-arm64` only, though I just hit 35 minutes on
https://github.com/openai/codex/actions/runs/23628986591/job/68826740108?pr=15944,
so let's just increase it to 45 minutes. As noted, I'm hoping that we
can bring it back down once we no longer have two copies of the `tui`
crate.
2026-03-26 20:54:55 -07:00
Michael Bolin e191d9e898 Merge 99fe9ab8e8 into sapling-pr-archive-bolinfest 2026-03-26 20:50:28 -07:00
Michael Bolin 99fe9ab8e8 fix: increase timeout for rust-ci to 45 minutes for now 2026-03-26 20:50:19 -07:00
Michael Bolin 5f06b045dc Merge 03f6dda330 into sapling-pr-archive-bolinfest 2026-03-26 19:59:07 -07:00
Michael Bolin 03f6dda330 codex-tools: extract dynamic tool adapters 2026-03-26 19:57:41 -07:00
Michael Bolin be5afc65d3 codex-tools: extract MCP schema adapters (#15928)
## Why

`codex-tools` already owns the shared tool input schema model and parser
from the first extraction step, but `core/src/tools/spec.rs` still owned
the MCP-specific adapter that normalizes `rmcp::model::Tool` schemas and
wraps `structuredContent` into the call result output schema.

Keeping that adapter in `codex-core` means the reusable MCP schema path
is still split across crates, and the unit tests for that logic stay
anchored in `codex-core` even though the runtime orchestration does not
need to move yet.

This change takes the next small step by moving the reusable MCP schema
adapter into `codex-tools` while leaving `ResponsesApiTool` assembly in
`codex-core`.

## What changed

- added `tools/src/mcp_tool.rs` and sibling
`tools/src/mcp_tool_tests.rs`
- introduced `ParsedMcpTool`, `parse_mcp_tool()`, and
`mcp_call_tool_result_output_schema()` in `codex-tools`
- updated `core/src/tools/spec.rs` to consume parsed MCP tool parts from
`codex-tools`
- removed the now-redundant MCP schema unit tests from
`core/src/tools/spec_tests.rs`
- expanded `codex-rs/tools/README.md` to describe this second migration
step

## Test plan

- `cargo test -p codex-tools`
- `cargo test -p codex-core --lib tools::spec::`
2026-03-26 19:57:26 -07:00
Michael Bolin 12dac1c06c merge commit for archive created by Sapling 2026-03-26 19:43:54 -07:00
Michael Bolin 00a3cea3bb permissions: start using PermissionProfile as the canonical runtime model 2026-03-26 19:43:49 -07:00
Michael Bolin 384b0527ac merge commit for archive created by Sapling 2026-03-26 19:08:05 -07:00
Michael Bolin 82bebb3212 permissions: start using PermissionProfile as the canonical runtime model 2026-03-26 19:06:03 -07:00
Michael Bolin d838c23867 fix: use matrix.target instead of matrix.os for actions/cache build action (#15933)
This seems like a more precise cache key.
2026-03-27 01:32:13 +00:00
Michael Bolin d76124d656 fix: make MACOS_DEFAULT_PREFERENCES_POLICY part of MACOS_SEATBELT_BASE_POLICY (#15931) 2026-03-26 18:23:14 -07:00
Michael Bolin 758ffbd095 Merge 82f8680619 into sapling-pr-archive-bolinfest 2026-03-26 17:55:59 -07:00
Michael Bolin 82f8680619 permissions: start using PermissionProfile as the canonical runtime model 2026-03-26 17:55:53 -07:00
Michael Bolin 9698a8c553 Merge eb3dbd0a5f into sapling-pr-archive-bolinfest 2026-03-26 17:31:26 -07:00
Michael Bolin eb3dbd0a5f fix: use matrix.target instead of matrix.os for actions/cache build action 2026-03-26 17:31:19 -07:00
viyatb-oaiandCodex 81fa04783a feat(windows-sandbox): add network proxy support (#12220)
## Summary

This PR makes Windows sandbox proxying enforceable by routing proxy-only
runs through the existing `offline` sandbox user and reserving direct
network access for the existing `online` sandbox user.

In brief:

- if a Windows sandbox run should be proxy-enforced, we run it as the
`offline` user
- the `offline` user gets firewall rules that block direct outbound
traffic and only permit the configured localhost proxy path
- if a Windows sandbox run should have true direct network access, we
run it as the `online` user
- no new sandbox identity is introduced

This brings Windows in line with the intended model: proxy use is not
just env-based, it is backed by OS-level egress controls. Windows
already has two sandbox identities:

- `offline`: intended to have no direct network egress
- `online`: intended to have full network access

This PR makes proxy-enforced runs use that model directly.

### Proxy-enforced runs

When proxy enforcement is active:

- the run is assigned to the `offline` identity
- setup extracts the loopback proxy ports from the sandbox env
- Windows setup programs firewall rules for the `offline` user that:
  - block all non-loopback outbound traffic
  - block loopback UDP
  - block loopback TCP except for the configured proxy ports
- optionally allow broader localhost access when `allow_local_binding=1`

So the sandboxed process can only talk to the local proxy. It cannot
open direct outbound sockets or do local UDP-based DNS on its own.The
proxy then performs the real outbound network access outside that
restricted sandbox identity.

### Direct-network runs

When proxy enforcement is not active and full network access is allowed:

- the run is assigned to the `online` identity
- no proxy-only firewall restrictions are applied
- the process gets normal direct network access

### Unelevated vs elevated

The restricted-token / unelevated path cannot enforce per-identity
firewall policy by itself.

So for Windows proxy-enforced runs, we transparently use the logon-user
sandbox path under the hood, even if the caller started from the
unelevated mode. That keeps enforcement real instead of best-effort.

---------

Co-authored-by: Codex <noreply@openai.com>
2026-03-26 17:27:38 -07:00
Michael Bolin da382a3297 Merge 0c3493cf3e into sapling-pr-archive-bolinfest 2026-03-26 17:22:01 -07:00
Michael Bolin 0c3493cf3e fix: make MACOS_DEFAULT_PREFERENCES_POLICY part of MACOS_SEATBELT_BASE_POLICY 2026-03-26 17:21:52 -07:00
Michael Bolin 4a9cff84a4 merge commit for archive created by Sapling 2026-03-26 17:15:26 -07:00
Michael Bolin ffbbe793bc fix: make MACOS_DEFAULT_PREFERENCES_POLICY part of MACOS_SEATBELT_BASE_POLICY 2026-03-26 17:14:30 -07:00
Michael Bolin e6e2999209 permissions: remove macOS seatbelt extension profiles (#15918)
## Why

`PermissionProfile` should only describe the per-command permissions we
still want to grant dynamically. Keeping
`MacOsSeatbeltProfileExtensions` in that surface forced extra macOS-only
approval, protocol, schema, and TUI branches for a capability we no
longer want to expose.

## What changed

- Removed the macOS-specific permission-profile types from
`codex-protocol`, the app-server v2 API, and the generated
schema/TypeScript artifacts.
- Deleted the core and sandboxing plumbing that threaded
`MacOsSeatbeltProfileExtensions` through execution requests and seatbelt
construction.
- Simplified macOS seatbelt generation so it always includes the fixed
read-only preferences allowlist instead of carrying a configurable
profile extension.
- Removed the macOS additional-permissions UI/docs/test coverage and
deleted the obsolete macOS permission modules.
- Tightened `request_permissions` intersection handling so explicitly
empty requested read lists are preserved only when that field was
actually granted, avoiding zero-grant responses being stored as active
permissions.
2026-03-26 17:12:45 -07:00
Michael Bolin 71934d3b15 Merge 2be6954608 into sapling-pr-archive-bolinfest 2026-03-26 17:08:41 -07:00
Michael Bolin 2be6954608 codex-tools: extract MCP schema adapters 2026-03-26 17:08:30 -07:00
Michael Bolin 44d28f500f codex-tools: extract shared tool schema parsing (#15923)
## Why

`parse_tool_input_schema` and the supporting `JsonSchema` model were
living in `core/src/tools/spec.rs`, but they already serve callers
outside `codex-core`.

Keeping that shared schema parsing logic inside `codex-core` makes the
crate boundary harder to reason about and works against the guidance in
`AGENTS.md` to avoid growing `codex-core` when reusable code can live
elsewhere.

This change takes the first extraction step by moving the schema parsing
primitive into its own crate while keeping the rest of the tool-spec
assembly in `codex-core`.

## What changed

- added a new `codex-tools` crate under `codex-rs/tools`
- moved the shared tool input schema model and sanitizer/parser into
`tools/src/json_schema.rs`
- kept `tools/src/lib.rs` exports-only, with the module-level unit tests
split into `json_schema_tests.rs`
- updated `codex-core` to use `codex-tools::JsonSchema` and re-export
`parse_tool_input_schema`
- updated `codex-app-server` dynamic tool validation to depend on
`codex-tools` directly instead of reaching through `codex-core`
- wired the new crate into the Cargo workspace and Bazel build graph
2026-03-27 00:03:35 +00:00
Son Luong Ngoc a27cd2d281 bazel: re-organize bazelrc (#15522)
Replaced ci.bazelrc and v8-ci.bazelrc by custom configs inside the main
.bazelrc file. As a result, github workflows setup is simplified down to
a single '--config=<foo>' flag usage.

Moved the build metadata flags to config=ci.
Added custom tags metadata to help differentiate invocations based on
workflow (bazel vs v8) and os (linux/macos/windows).

Enabled users to override the default values in .bazelrc by using a
user.bazelrc file locally.
Added user.bazelrc to gitignore.
2026-03-26 16:50:07 -07:00
Michael Bolin a5beab59bd Merge 46988862f3 into sapling-pr-archive-bolinfest 2026-03-26 16:41:23 -07:00