Commit Graph
15868 Commits
Author SHA1 Message Date
Michael Bolin a307620b5d merge commit for archive created by Sapling 2026-05-16 08:55:44 -07:00
Michael Bolin 7779e7f1f7 test: reduce core sandbox policy test setup 2026-05-16 08:55:30 -07:00
Michael Bolin 44f167ffa8 test: construct permission profiles directly 2026-05-16 08:55:30 -07:00
Michael Bolin a855113712 Merge 8dcdebc675 into sapling-pr-archive-bolinfest 2026-05-16 08:07:57 -07:00
Michael Bolin e793e531b3 Merge 220d415ede into sapling-pr-archive-bolinfest 2026-05-16 08:05:18 -07:00
Michael Bolin 8dcdebc675 test: reduce core sandbox policy test setup 2026-05-16 08:05:08 -07:00
Michael Bolin 220d415ede test: construct permission profiles directly 2026-05-16 08:05:08 -07:00
Michael Bolin 2c611aba2f Merge 6ace6c2827 into sapling-pr-archive-bolinfest 2026-05-16 07:51:31 -07:00
Michael Bolin 6ace6c2827 test: construct permission profiles directly 2026-05-16 07:51:16 -07:00
Michael Bolin e5e148b087 Merge 12a3e8cd25 into sapling-pr-archive-bolinfest 2026-05-16 07:46:07 -07:00
Michael Bolin 12a3e8cd25 test: construct permission profiles directly 2026-05-16 07:45:52 -07:00
Michael Bolin 8f033b4abe merge commit for archive created by Sapling 2026-05-16 07:34:55 -07:00
Michael Bolin 8bd521e0bf test: construct permission profiles directly 2026-05-16 07:34:47 -07:00
Michael Bolin 6e2cd91fa6 merge commit for archive created by Sapling 2026-05-16 07:28:36 -07:00
Michael Bolin 7003cff49e test: construct permission profiles directly 2026-05-16 07:28:16 -07:00
Michael Bolin 108234b5eb core: set permission profiles from snapshots (#22920)
## Why

#22891 moved the TUI turn-command path to pass `ActivePermissionProfile`
instead of the full `PermissionProfile`, but the remaining
config/session bridge still accepted the concrete `PermissionProfile`
and active profile id as separate arguments. That shape made it too easy
for future callers to update the concrete profile and active profile id
out of sync.

This PR makes the trusted session snapshot path pass one coherent value
into `Permissions`, while keeping `requirements.toml` enforcement owned
by the existing constrained permission state.

## What Changed

- Added `PermissionProfileSnapshot` as the public snapshot value for
trusted session/config synchronization.
- Changed `Permissions::set_permission_profile_from_session_snapshot()`
and `replace_permission_profile_from_session_snapshot()` to take a
`PermissionProfileSnapshot`.
- Updated the replacement path to derive its constrained
`PermissionProfile` from the snapshot, so callers cannot pass a separate
profile that disagrees with the snapshot.
- Removed the internal tuple-style
`PermissionProfileState::set_active_permission_profile()` mutation path.
- Updated core session projection and TUI call sites to construct
explicit legacy or active snapshots.
- Documented the snapshot constructors so legacy use and id/profile
mismatch hazards are called out at the API boundary.
- Added a focused config test that verifies snapshot updates still
respect existing permission constraints.

## How To Review

1. Start with `codex-rs/core/src/config/resolved_permission_profile.rs`;
`PermissionProfileSnapshot` is the public wrapper, while
`ResolvedPermissionProfile` stays internal.
2. Check `codex-rs/core/src/config/mod.rs` to confirm both
session-snapshot setters validate through `PermissionProfileState` and
no longer accept loose profile/id pairs.
3. Skim `codex-rs/core/src/session/session.rs` for the session
projection path; it now builds the snapshot before installing it.
4. Skim the TUI changes as call-site migration from loose argument pairs
to explicit snapshot construction.

## Verification

- `cargo test -p codex-core
permission_snapshot_setter_preserves_permission_constraints`
- `cargo test -p codex-tui status_permissions_`
- `cargo test -p codex-tui
session_configured_preserves_profile_workspace_roots`
- `just fix -p codex-core -p codex-tui`
2026-05-16 07:26:18 -07:00
Eric Traut de9c5c0226 Fix Windows doctor npm root probe (#22967)
## Why
On Windows npm-managed installs expose the working shim as `npm.cmd`.
`codex doctor` probed bare `npm`, which could incorrectly report that
npm global-root inspection was unavailable even when the install was
healthy.

Fixes #22964.

## What changed
- Use `npm.cmd` for the doctor npm-root probe on Windows.
- Keep the existing `npm` probe on non-Windows platforms.
2026-05-16 00:39:27 -07:00
Ahmed Ibrahim 326e31ab65 [codex] Refine Python SDK user-facing docs (#22941)
## Summary
- Remove maintainer and release-process wording from the Python SDK
README and docs.
- Rewrite SDK-facing comments/docstrings so they read as standalone
product documentation.
- Add a real app-server integration smoke that follows the public
quickstart-style `Codex() -> thread_start() -> run()` path.

## Integration coverage
- Add `test_real_quickstart_style_flow_smoke` in the real app-server
integration suite.

## Validation
- Local tests were not run per repo guidance. CI should validate this
branch once the PR is online.
2026-05-15 19:55:05 -07:00
Michael Bolin b12d16f952 merge commit for archive created by Sapling 2026-05-15 17:38:25 -07:00
Michael Bolin 49a9062253 windows-sandbox: drive write roots from resolved permissions 2026-05-15 17:38:07 -07:00
Michael Bolin f8724cf510 merge commit for archive created by Sapling 2026-05-15 17:33:32 -07:00
Michael Bolin 3d98e859e5 core: set permission profiles from snapshots 2026-05-15 17:31:52 -07:00
Michael Bolin 5bf17a4827 Merge c42e3703b3 into sapling-pr-archive-bolinfest 2026-05-15 17:21:09 -07:00
Michael Bolin c42e3703b3 windows-sandbox: drive write roots from resolved permissions 2026-05-15 17:21:02 -07:00
Michael Bolin 9025550709 app-server-protocol: remove PermissionProfile from API (#22924)
## Why

The app server API should expose permission profile identity, not the
lower-level runtime permission model. `PermissionProfile` is the
compiled sandbox/network representation that the server uses internally;
exposing it through app-server-protocol forces clients to understand
details that should remain implementation-level.

The API boundary should prefer `ActivePermissionProfile`: a stable
profile id, plus future parent-profile metadata, that clients can pass
back when they want to select the same active permissions. This also
avoids schema generation collisions between the app-server v2 API type
space and the core protocol model.

Incidentally, while PR makes a number of changes to `command/exec`, note
that we are hoping to deprecate this API in favor of `process/spawn`, so
we don't need to be too finicky about these changes.

## What Changed

- Removed `PermissionProfile` from the app-server-protocol API surface,
including generated schema and TypeScript exports.
- Changed `CommandExecParams.permissionProfile` to
`ActivePermissionProfile`.
- Resolve command exec profile ids through `ConfigManager` for the
command cwd, matching turn override selection semantics.
- Updated downstream TUI tests/helpers to use core permission types
directly instead of app-server-protocol `PermissionProfile` shims.
2026-05-15 17:10:15 -07:00
Michael Bolin f11f3e4ef8 merge commit for archive created by Sapling 2026-05-15 17:03:29 -07:00
Michael Bolin de5a796e9a windows-sandbox: drive write roots from resolved permissions 2026-05-15 17:03:11 -07:00
Michael Bolin b90513496b merge commit for archive created by Sapling 2026-05-15 16:54:07 -07:00
Michael Bolin 70a7dcacd4 app-server-protocol: use active permission profile for command exec 2026-05-15 16:53:59 -07:00
Michael Bolin 89a88a9982 merge commit for archive created by Sapling 2026-05-15 16:43:44 -07:00
Michael Bolin 07b7e3c426 app-server-protocol: use active permission profile for command exec 2026-05-15 16:43:35 -07:00
Michael Bolin 62fb720137 merge commit for archive created by Sapling 2026-05-15 16:39:11 -07:00
Michael Bolin 78674c0f52 app-server-protocol: use active permission profile for command exec 2026-05-15 16:39:02 -07:00
Michael Bolin f39835bb73 merge commit for archive created by Sapling 2026-05-15 16:37:35 -07:00
Michael Bolin 21f3ede082 windows-sandbox: drive write roots from resolved permissions 2026-05-15 16:37:19 -07:00
Michael Bolin f1c9aaa637 Merge 72d41e5db2 into sapling-pr-archive-bolinfest 2026-05-15 16:33:04 -07:00
Michael Bolin 72d41e5db2 core: set permission profiles from snapshots 2026-05-15 16:32:55 -07:00
Michael Bolin c264a97c85 merge commit for archive created by Sapling 2026-05-15 16:25:58 -07:00
Michael Bolin f4ff44e042 app-server-protocol: use active permission profile for command exec 2026-05-15 16:25:49 -07:00
Michael Bolin bfd6054051 merge commit for archive created by Sapling 2026-05-15 16:21:44 -07:00
Michael Bolin 5e076c4a3a windows-sandbox: drive write roots from resolved permissions 2026-05-15 16:21:24 -07:00
Michael Bolin 2c409f53c4 merge commit for archive created by Sapling 2026-05-15 16:20:04 -07:00
Michael Bolin a850df1e1e app-server-protocol: use active permission profile for command exec 2026-05-15 16:19:44 -07:00
Michael Bolin 6349e1ba5c merge commit for archive created by Sapling 2026-05-15 16:14:08 -07:00
Michael Bolin a4be788173 windows-sandbox: drive write roots from resolved permissions 2026-05-15 16:13:43 -07:00
Michael Bolin b10098c496 Merge b2d0a5a785 into sapling-pr-archive-bolinfest 2026-05-15 15:58:24 -07:00
Michael Bolin b2d0a5a785 core: set permission profiles from snapshots 2026-05-15 15:58:13 -07:00
Michael Bolin 8ce09d64e1 merge commit for archive created by Sapling 2026-05-15 15:57:49 -07:00
Michael Bolin dce80187ae core: set permission profiles from snapshots 2026-05-15 15:57:25 -07:00
Michael Bolin eb7790a7b7 merge commit for archive created by Sapling 2026-05-15 15:50:50 -07:00