core-agent-ide/codex-rs/state/src
Michael Bolin abbd74e2be
feat: make sandbox read access configurable with ReadOnlyAccess (#11387)
`SandboxPolicy::ReadOnly` previously implied broad read access and could
not express a narrower read surface.
This change introduces an explicit read-access model so we can support
user-configurable read restrictions in follow-up work, while preserving
current behavior today.

It also ensures unsupported backends fail closed for restricted-read
policies instead of silently granting broader access than intended.

## What

- Added `ReadOnlyAccess` in protocol with:
  - `Restricted { include_platform_defaults, readable_roots }`
  - `FullAccess`
- Updated `SandboxPolicy` to carry read-access configuration:
  - `ReadOnly { access: ReadOnlyAccess }`
  - `WorkspaceWrite { ..., read_only_access: ReadOnlyAccess }`
- Preserved existing behavior by defaulting current construction paths
to `ReadOnlyAccess::FullAccess`.
- Threaded the new fields through sandbox policy consumers and call
sites across `core`, `tui`, `linux-sandbox`, `windows-sandbox`, and
related tests.
- Updated Seatbelt policy generation to honor restricted read roots by
emitting scoped read rules when full read access is not granted.
- Added fail-closed behavior on Linux and Windows backends when
restricted read access is requested but not yet implemented there
(`UnsupportedOperation`).
- Regenerated app-server protocol schema and TypeScript artifacts,
including `ReadOnlyAccess`.

## Compatibility / rollout

- Runtime behavior remains unchanged by default (`FullAccess`).
- API/schema changes are in place so future config wiring can enable
restricted read access without another policy-shape migration.
2026-02-11 18:31:14 -08:00
..
bin Migrate state DB path helpers to versioned filename (#10623) 2026-02-04 14:31:12 +00:00
model feat: make sandbox read access configurable with ReadOnlyAccess (#11387) 2026-02-11 18:31:14 -08:00
runtime feat: new memory prompts (#11439) 2026-02-11 13:57:52 +00:00
extract.rs Leverage state DB metadata for thread summaries (#10621) 2026-02-05 16:39:11 +00:00
lib.rs feat: mem v2 - PR5 (#11372) 2026-02-10 23:22:55 +00:00
log_db.rs feat: add log retention and delete them after 90 days (#10151) 2026-01-29 16:55:01 +01:00
migrations.rs feat: sqlite 1 (#10004) 2026-01-28 15:29:14 +01:00
paths.rs feat: sqlite 1 (#10004) 2026-01-28 15:29:14 +01:00
runtime.rs feat: make sandbox read access configurable with ReadOnlyAccess (#11387) 2026-02-11 18:31:14 -08:00