Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5232,11 +5232,15 @@
},
"name": {
"type": "string"
},
"needsAuth": {
"type": "boolean"
}
},
"required": [
"id",
"name"
"name",
"needsAuth"
],
"type": "object"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,11 +492,15 @@
},
"name": {
"type": "string"
},
"needsAuth": {
"type": "boolean"
}
},
"required": [
"id",
"name"
"name",
"needsAuth"
],
"type": "object"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@
},
"name": {
"type": "string"
},
"needsAuth": {
"type": "boolean"
}
},
"required": [
"id",
"name"
"name",
"needsAuth"
],
"type": "object"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,15 @@
},
"name": {
"type": "string"
},
"needsAuth": {
"type": "boolean"
}
},
"required": [
"id",
"name"
"name",
"needsAuth"
],
"type": "object"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
/**
* EXPERIMENTAL - app metadata summary for plugin responses.
*/
export type AppSummary = { id: string, name: string, description: string | null, installUrl: string | null, };
export type AppSummary = { id: string, name: string, description: string | null, installUrl: string | null, needsAuth: boolean, };
2 changes: 2 additions & 0 deletions codex-rs/app-server-protocol/src/protocol/v2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2035,6 +2035,7 @@ pub struct AppSummary {
pub name: String,
pub description: Option<String>,
pub install_url: Option<String>,
pub needs_auth: bool,
}

impl From<AppInfo> for AppSummary {
Expand All @@ -2044,6 +2045,7 @@ impl From<AppInfo> for AppSummary {
name: value.name,
description: value.description,
install_url: value.install_url,
needs_auth: false,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion codex-rs/app-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Example with notification opt-out:
- `collaborationMode/list` — list available collaboration mode presets (experimental, no pagination). This response omits built-in developer instructions; clients should either pass `settings.developer_instructions: null` when setting a mode to use Codex's built-in instructions, or provide their own instructions explicitly.
- `skills/list` — list skills for one or more `cwd` values (optional `forceReload`).
- `plugin/list` — list discovered plugin marketplaces and plugin state, including effective marketplace install/auth policy metadata and best-effort `featuredPluginIds` for the official curated marketplace. `interface.category` uses the marketplace category when present; otherwise it falls back to the plugin manifest category. Pass `forceRemoteSync: true` to refresh curated plugin state before listing (**under development; do not call from production clients yet**).
- `plugin/read` — read one plugin by `marketplacePath` plus `pluginName`, returning marketplace info, a list-style `summary`, manifest descriptions/interface metadata, and bundled skills/apps/MCP server names (**under development; do not call from production clients yet**).
- `plugin/read` — read one plugin by `marketplacePath` plus `pluginName`, returning marketplace info, a list-style `summary`, manifest descriptions/interface metadata, and bundled skills/apps/MCP server names. Plugin app summaries also include `needsAuth` when the server can determine connector accessibility (**under development; do not call from production clients yet**).
- `skills/changed` — notification emitted when watched local skill files change.
- `app/list` — list available apps.
- `skills/config/write` — write user-level skill config by path.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,47 @@ pub(super) async fn load_plugin_app_summaries(
}
};

connectors::connectors_for_plugin_apps(connectors, plugin_apps)
let plugin_connectors = connectors::connectors_for_plugin_apps(connectors, plugin_apps);

let accessible_connectors =
match connectors::list_accessible_connectors_from_mcp_tools_with_options_and_status(
config, /*force_refetch*/ false,
)
.await
{
Ok(status) if status.codex_apps_ready => status.connectors,
Ok(_) => {
return plugin_connectors
.into_iter()
.map(AppSummary::from)
.collect();
}
Err(err) => {
warn!("failed to load app auth state for plugin/read: {err:#}");
return plugin_connectors
.into_iter()
.map(AppSummary::from)
.collect();
}
};

let accessible_ids = accessible_connectors
.iter()
.map(|connector| connector.id.as_str())
.collect::<HashSet<_>>();

plugin_connectors
.into_iter()
.map(AppSummary::from)
.map(|connector| {
let needs_auth = !accessible_ids.contains(connector.id.as_str());
AppSummary {
id: connector.id,
name: connector.name,
description: connector.description,
install_url: connector.install_url,
needs_auth,
}
})
.collect()
}

Expand Down Expand Up @@ -58,7 +96,13 @@ pub(super) fn plugin_apps_needing_auth(
&& !accessible_ids.contains(connector.id.as_str())
})
.cloned()
.map(AppSummary::from)
.map(|connector| AppSummary {
id: connector.id,
name: connector.name,
description: connector.description,
install_url: connector.install_url,
needs_auth: true,
})
.collect()
}

Expand Down
2 changes: 2 additions & 0 deletions codex-rs/app-server/tests/suite/v2/plugin_install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ async fn plugin_install_returns_apps_needing_auth() -> Result<()> {
name: "Alpha".to_string(),
description: Some("Alpha connector".to_string()),
install_url: Some("https://chatgpt.com/apps/alpha/alpha".to_string()),
needs_auth: true,
}],
}
);
Expand Down Expand Up @@ -518,6 +519,7 @@ async fn plugin_install_filters_disallowed_apps_needing_auth() -> Result<()> {
name: "Alpha".to_string(),
description: Some("Alpha connector".to_string()),
install_url: Some("https://chatgpt.com/apps/alpha/alpha".to_string()),
needs_auth: true,
}],
}
);
Expand Down
Loading
Loading