Support Always Allow for MCP app messages

This commit is contained in:
Leo Shimonaka
2026-05-05 16:54:39 -07:00
parent d7de4dd3ac
commit dd6239a46d
30 changed files with 434 additions and 2 deletions
@@ -6089,6 +6089,16 @@
"boolean",
"null"
]
},
"mcp_app_message_approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/v2/McpAppMessageApprovalMode"
},
{
"type": "null"
}
]
}
},
"type": "object"
@@ -10866,6 +10876,13 @@
"title": "MarketplaceUpgradeResponse",
"type": "object"
},
"McpAppMessageApprovalMode": {
"enum": [
"auto",
"approve_in_thread"
],
"type": "string"
},
"McpAuthStatus": {
"enum": [
"unsupported",
@@ -10990,6 +11007,62 @@
"title": "McpServerOauthLoginResponse",
"type": "object"
},
"McpServerProvider": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"codex-apps"
],
"title": "CodexAppsMcpServerProviderType",
"type": "string"
}
},
"required": [
"type"
],
"title": "CodexAppsMcpServerProvider",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"mcp"
],
"title": "McpMcpServerProviderType",
"type": "string"
}
},
"required": [
"type"
],
"title": "McpMcpServerProvider",
"type": "object"
},
{
"properties": {
"pluginId": {
"type": "string"
},
"type": {
"enum": [
"plugin-mcp"
],
"title": "PluginMcpMcpServerProviderType",
"type": "string"
}
},
"required": [
"pluginId",
"type"
],
"title": "PluginMcpMcpServerProvider",
"type": "object"
}
]
},
"McpServerRefreshResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "McpServerRefreshResponse",
@@ -11012,6 +11085,9 @@
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/v2/McpServerProvider"
},
"resourceTemplates": {
"items": {
"$ref": "#/definitions/v2/ResourceTemplate"
@@ -11034,6 +11110,7 @@
"required": [
"authStatus",
"name",
"provider",
"resourceTemplates",
"resources",
"tools"
@@ -668,6 +668,16 @@
"boolean",
"null"
]
},
"mcp_app_message_approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/McpAppMessageApprovalMode"
},
{
"type": "null"
}
]
}
},
"type": "object"
@@ -7477,6 +7487,13 @@
"title": "MarketplaceUpgradeResponse",
"type": "object"
},
"McpAppMessageApprovalMode": {
"enum": [
"auto",
"approve_in_thread"
],
"type": "string"
},
"McpAuthStatus": {
"enum": [
"unsupported",
@@ -7601,6 +7618,62 @@
"title": "McpServerOauthLoginResponse",
"type": "object"
},
"McpServerProvider": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"codex-apps"
],
"title": "CodexAppsMcpServerProviderType",
"type": "string"
}
},
"required": [
"type"
],
"title": "CodexAppsMcpServerProvider",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"mcp"
],
"title": "McpMcpServerProviderType",
"type": "string"
}
},
"required": [
"type"
],
"title": "McpMcpServerProvider",
"type": "object"
},
{
"properties": {
"pluginId": {
"type": "string"
},
"type": {
"enum": [
"plugin-mcp"
],
"title": "PluginMcpMcpServerProviderType",
"type": "string"
}
},
"required": [
"pluginId",
"type"
],
"title": "PluginMcpMcpServerProvider",
"type": "object"
}
]
},
"McpServerRefreshResponse": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "McpServerRefreshResponse",
@@ -7623,6 +7696,9 @@
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/McpServerProvider"
},
"resourceTemplates": {
"items": {
"$ref": "#/definitions/ResourceTemplate"
@@ -7645,6 +7721,7 @@
"required": [
"authStatus",
"name",
"provider",
"resourceTemplates",
"resources",
"tools"
@@ -89,6 +89,16 @@
"boolean",
"null"
]
},
"mcp_app_message_approval_mode": {
"anyOf": [
{
"$ref": "#/definitions/McpAppMessageApprovalMode"
},
{
"type": "null"
}
]
}
},
"type": "object"
@@ -585,6 +595,13 @@
],
"type": "string"
},
"McpAppMessageApprovalMode": {
"enum": [
"auto",
"approve_in_thread"
],
"type": "string"
},
"ProfileV2": {
"additionalProperties": true,
"properties": {
@@ -10,6 +10,62 @@
],
"type": "string"
},
"McpServerProvider": {
"oneOf": [
{
"properties": {
"type": {
"enum": [
"codex-apps"
],
"title": "CodexAppsMcpServerProviderType",
"type": "string"
}
},
"required": [
"type"
],
"title": "CodexAppsMcpServerProvider",
"type": "object"
},
{
"properties": {
"type": {
"enum": [
"mcp"
],
"title": "McpMcpServerProviderType",
"type": "string"
}
},
"required": [
"type"
],
"title": "McpMcpServerProvider",
"type": "object"
},
{
"properties": {
"pluginId": {
"type": "string"
},
"type": {
"enum": [
"plugin-mcp"
],
"title": "PluginMcpMcpServerProviderType",
"type": "string"
}
},
"required": [
"pluginId",
"type"
],
"title": "PluginMcpMcpServerProvider",
"type": "object"
}
]
},
"McpServerStatus": {
"properties": {
"authStatus": {
@@ -18,6 +74,9 @@
"name": {
"type": "string"
},
"provider": {
"$ref": "#/definitions/McpServerProvider"
},
"resourceTemplates": {
"items": {
"$ref": "#/definitions/ResourceTemplate"
@@ -40,6 +99,7 @@
"required": [
"authStatus",
"name",
"provider",
"resourceTemplates",
"resources",
"tools"
@@ -2,5 +2,6 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { AppToolApproval } from "./AppToolApproval";
import type { McpAppMessageApprovalMode } from "./McpAppMessageApprovalMode";
export type AppToolsConfig = { [key in string]?: { enabled: boolean | null, approval_mode: AppToolApproval | null, } };
export type AppToolsConfig = { [key in string]?: { enabled: boolean | null, approval_mode: AppToolApproval | null, mcp_app_message_approval_mode: McpAppMessageApprovalMode | null, } };
@@ -0,0 +1,5 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type McpAppMessageApprovalMode = "auto" | "approve_in_thread";
@@ -0,0 +1,5 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type McpServerProvider = { "type": "codex-apps" } | { "type": "mcp" } | { "type": "plugin-mcp", pluginId: string, };
@@ -5,5 +5,6 @@ import type { Resource } from "../Resource";
import type { ResourceTemplate } from "../ResourceTemplate";
import type { Tool } from "../Tool";
import type { McpAuthStatus } from "./McpAuthStatus";
import type { McpServerProvider } from "./McpServerProvider";
export type McpServerStatus = { name: string, tools: { [key in string]?: Tool }, resources: Array<Resource>, resourceTemplates: Array<ResourceTemplate>, authStatus: McpAuthStatus, };
export type McpServerStatus = { name: string, provider: McpServerProvider, tools: { [key in string]?: Tool }, resources: Array<Resource>, resourceTemplates: Array<ResourceTemplate>, authStatus: McpAuthStatus, };
@@ -191,6 +191,7 @@ export type { MarketplaceRemoveResponse } from "./MarketplaceRemoveResponse";
export type { MarketplaceUpgradeErrorInfo } from "./MarketplaceUpgradeErrorInfo";
export type { MarketplaceUpgradeParams } from "./MarketplaceUpgradeParams";
export type { MarketplaceUpgradeResponse } from "./MarketplaceUpgradeResponse";
export type { McpAppMessageApprovalMode } from "./McpAppMessageApprovalMode";
export type { McpAuthStatus } from "./McpAuthStatus";
export type { McpElicitationArrayType } from "./McpElicitationArrayType";
export type { McpElicitationBooleanSchema } from "./McpElicitationBooleanSchema";
@@ -223,6 +224,7 @@ export type { McpServerMigration } from "./McpServerMigration";
export type { McpServerOauthLoginCompletedNotification } from "./McpServerOauthLoginCompletedNotification";
export type { McpServerOauthLoginParams } from "./McpServerOauthLoginParams";
export type { McpServerOauthLoginResponse } from "./McpServerOauthLoginResponse";
export type { McpServerProvider } from "./McpServerProvider";
export type { McpServerRefreshResponse } from "./McpServerRefreshResponse";
export type { McpServerStartupState } from "./McpServerStartupState";
export type { McpServerStatus } from "./McpServerStatus";
@@ -166,6 +166,14 @@ pub enum AppToolApproval {
Approve,
}
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
#[ts(export_to = "v2/")]
pub enum McpAppMessageApprovalMode {
Auto,
ApproveInThread,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "snake_case")]
#[ts(export_to = "v2/")]
@@ -184,6 +192,7 @@ pub struct AppsDefaultConfig {
pub struct AppToolConfig {
pub enabled: Option<bool>,
pub approval_mode: Option<AppToolApproval>,
pub mcp_app_message_approval_mode: Option<McpAppMessageApprovalMode>,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
@@ -46,11 +46,28 @@ pub enum McpServerStatusDetail {
ToolsAndAuthOnly,
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, JsonSchema, TS)]
#[serde(tag = "type")]
#[ts(tag = "type")]
#[ts(export_to = "v2/")]
pub enum McpServerProvider {
#[serde(rename = "codex-apps")]
#[ts(rename = "codex-apps")]
CodexApps,
#[serde(rename = "mcp")]
#[ts(rename = "mcp")]
Mcp,
#[serde(rename = "plugin-mcp", rename_all = "camelCase")]
#[ts(rename = "plugin-mcp", rename_all = "camelCase")]
PluginMcp { plugin_id: String },
}
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
#[serde(rename_all = "camelCase")]
#[ts(export_to = "v2/")]
pub struct McpServerStatus {
pub name: String,
pub provider: McpServerProvider,
pub tools: std::collections::HashMap<String, McpTool>,
pub resources: Vec<McpResource>,
pub resource_templates: Vec<McpResourceTemplate>,