refactor(app-server): simplify permission confirmation flow

Replace the per-method v1 app-server capability with a single
`permissionConfirmations` opt-in. Route both permission request
flows through that capability.

Collapse the separate preset tool feature into
`request_permissions_tool`, and make core apply accepted preset
responses so clients only confirm the user decision.
This commit is contained in:
Felipe Coury
2026-04-13 19:50:22 -03:00
parent 0fbcf6600c
commit 39474c7eab
47 changed files with 209 additions and 1118 deletions
+1 -9
View File
@@ -95,10 +95,8 @@ pub enum Feature {
ExecPermissionApprovals,
/// Enable Claude-style lifecycle hooks loaded from hooks.json files.
CodexHooks,
/// Expose the built-in request_permissions tool.
/// Expose built-in conversational permission tools.
RequestPermissionsTool,
/// Expose the built-in request_permission_preset tool.
RequestPermissionPresetTool,
/// Allow the model to request web searches that fetch live content.
WebSearchRequest,
/// Allow the model to request web searches that fetch cached content.
@@ -711,12 +709,6 @@ pub const FEATURES: &[FeatureSpec] = &[
stage: Stage::Stable,
default_enabled: true,
},
FeatureSpec {
id: Feature::RequestPermissionPresetTool,
key: "request_permission_preset_tool",
stage: Stage::Stable,
default_enabled: true,
},
FeatureSpec {
id: Feature::UseLinuxSandboxBwrap,
key: "use_linux_sandbox_bwrap",
-6
View File
@@ -112,12 +112,6 @@ fn request_permissions_tool_is_stable_and_enabled_by_default() {
assert_eq!(Feature::RequestPermissionsTool.default_enabled(), true);
}
#[test]
fn request_permission_preset_tool_is_stable_and_enabled_by_default() {
assert_eq!(Feature::RequestPermissionPresetTool.stage(), Stage::Stable);
assert_eq!(Feature::RequestPermissionPresetTool.default_enabled(), true);
}
#[test]
fn tool_suggest_is_stable_and_enabled_by_default() {
assert_eq!(Feature::ToolSuggest.stage(), Stage::Stable);