core-agent-ide/codex-rs/app-server/src
Michael Bolin a4cc1a4a85
feat: introduce Permissions (#11633)
## Why
We currently carry multiple permission-related concepts directly on
`Config` for shell/unified-exec behavior (`approval_policy`,
`sandbox_policy`, `network`, `shell_environment_policy`,
`windows_sandbox_mode`).

Consolidating these into one in-memory struct makes permission handling
easier to reason about and sets up the next step: supporting named
permission profiles (`[permissions.PROFILE_NAME]`) without changing
behavior now.

This change is mostly mechanical: it updates existing callsites to go
through `config.permissions`, but it does not yet refactor those
callsites to take a single `Permissions` value in places where multiple
permission fields are still threaded separately.

This PR intentionally **does not** change the on-disk `config.toml`
format yet and keeps compatibility with legacy config keys.

## What Changed
- Introduced `Permissions` in `core/src/config/mod.rs`.
- Added `Config::permissions` and moved effective runtime permission
fields under it:
  - `approval_policy`
  - `sandbox_policy`
  - `network`
  - `shell_environment_policy`
  - `windows_sandbox_mode`
- Updated config loading/building so these effective values are still
derived from the same existing config inputs and constraints.
- Updated Windows sandbox helpers/resolution to read/write via
`permissions`.
- Threaded the new field through all permission consumers across core
runtime, app-server, CLI/exec, TUI, and sandbox summary code.
- Updated affected tests to reference `config.permissions.*`.
- Renamed the struct/field from
`EffectivePermissions`/`effective_permissions` to
`Permissions`/`permissions` and aligned variable naming accordingly.

## Verification
- `just fix -p codex-core -p codex-tui -p codex-cli -p codex-app-server
-p codex-exec -p codex-utils-sandbox-summary`
- `cargo build -p codex-core -p codex-tui -p codex-cli -p
codex-app-server -p codex-exec -p codex-utils-sandbox-summary`
2026-02-12 14:42:54 -08:00
..
bespoke_event_handling.rs feat(app-server): experimental flag to persist extended history (#11227) 2026-02-12 19:34:22 +00:00
codex_message_processor.rs feat: introduce Permissions (#11633) 2026-02-12 14:42:54 -08:00
config_api.rs feat(core): add network constraints schema to requirements.toml (#10958) 2026-02-07 19:48:24 +00:00
dynamic_tools.rs feat(app-server, core): allow text + image content items for dynamic tool outputs (#10567) 2026-02-04 16:12:47 -08:00
error_code.rs Reapply "Add app-server transport layer with websocket support" (#11370) 2026-02-11 18:13:39 +00:00
filters.rs [app-server] feat: add filtering on thread list (#9897) 2026-01-26 21:54:19 +00:00
fuzzy_file_search.rs app-server: add fuzzy search sessions for streaming file search (#10268) 2026-02-12 10:49:44 -08:00
lib.rs app-server: thread resume subscriptions (#11474) 2026-02-11 16:21:13 -08:00
main.rs Reapply "Add app-server transport layer with websocket support" (#11370) 2026-02-11 18:13:39 +00:00
message_processor.rs app-server: thread resume subscriptions (#11474) 2026-02-11 16:21:13 -08:00
models.rs Feat: add upgrade to app server modelList (#10556) 2026-02-03 14:53:36 -08:00
outgoing_message.rs app-server: thread resume subscriptions (#11474) 2026-02-11 16:21:13 -08:00
thread_state.rs app-server: thread resume subscriptions (#11474) 2026-02-11 16:21:13 -08:00
transport.rs app-server: thread resume subscriptions (#11474) 2026-02-11 16:21:13 -08:00