Skip to content

app-server-protocol: remove PermissionProfile from API#22924

Merged
bolinfest merged 1 commit into
mainfrom
pr22924
May 16, 2026
Merged

app-server-protocol: remove PermissionProfile from API#22924
bolinfest merged 1 commit into
mainfrom
pr22924

Conversation

@bolinfest
Copy link
Copy Markdown
Collaborator

@bolinfest bolinfest commented May 15, 2026

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.

@bolinfest bolinfest requested a review from viyatb-oai May 15, 2026 23:21
@bolinfest bolinfest changed the title app-server-protocol: use active permission profile for command exec app-server-protocol: remove PermissionProfile from API May 15, 2026
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a850df1e1e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/app-server/src/request_processors/command_exec_processor.rs Outdated
Comment thread codex-rs/app-server/src/request_processors/command_exec_processor.rs Outdated
Comment on lines +103 to +109
/// Optional active permissions profile for this command.
///
/// Defaults to the user's configured permissions when omitted. Cannot be
/// combined with `sandboxPolicy`.
#[experimental("command/exec.permissionProfile")]
#[ts(optional = nullable)]
pub permission_profile: Option<PermissionProfile>,
pub permission_profile: Option<ActivePermissionProfile>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update command/exec permissionProfile docs

After changing permissionProfile to ActivePermissionProfile, the app-server docs still show clients sending a full managed profile object (type, fileSystem, network) in codex-rs/app-server/README.md:929-936. That old example now fails because this field expects an active profile object with an id, so clients following the documented command/exec example will send invalid requests; update the README example/notes along with this API shape change.

Useful? React with 👍 / 👎.

@bolinfest bolinfest force-pushed the pr22924 branch 2 times, most recently from 78674c0 to 07b7e3c Compare May 15, 2026 23:43
@bolinfest bolinfest merged commit 9025550 into main May 16, 2026
46 checks passed
@bolinfest bolinfest deleted the pr22924 branch May 16, 2026 00:10
@github-actions github-actions Bot locked and limited conversation to collaborators May 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants