felixxia-oai
7e0dce91df
[codex] Centralize plugin auth capability filtering ( #27902 )
...
## Summary
This is the first step in making plugin auth routing consistent. The
rule should not live as one-off checks in every place that loads or
displays plugin capabilities.
This PR introduces a small resolver for the auth-level policy: given a
plugin's declared apps, MCP servers, current auth mode, and active
state, return the capabilities that are actually usable in that context.
## Why
Product rule:
- SiWC auth can use app connectors, so app declarations stay available.
- API-key/direct auth cannot use app connectors, so app declarations are
removed.
- When an active plugin has both an app and an MCP server with the same
name, the app route wins for Codex-backed auth and the conflicting MCP
server is hidden.
Putting that rule in `capabilities.rs` gives the rest of the stack one
place to ask instead of duplicating auth checks in loader, manager,
marketplace, and details code.
## Validation
- `cargo fmt`
- `cargo test -p codex-core-plugins`
2026-06-16 00:13:27 +00:00
..
2026-06-08 11:39:08 +02:00
2026-06-09 12:48:04 -07:00
2026-05-26 20:59:47 -07:00
2026-06-11 18:16:39 -07:00
2026-04-28 12:35:00 -07:00
2026-06-15 16:32:38 -07:00
2026-05-07 15:44:17 -07:00
2026-06-15 16:15:58 -07:00
2026-06-15 13:25:42 -07:00
2026-06-11 21:28:52 -07:00
2026-06-15 16:15:58 -07:00
2026-06-15 15:35:57 +00:00
2026-06-12 20:10:12 -07:00
2026-06-12 16:58:42 -07:00
2026-06-15 21:30:32 +00:00
2026-06-11 18:16:39 -07:00
2026-05-08 04:07:59 +00:00
2026-06-15 21:54:01 +00:00
2026-06-13 21:43:39 -07:00
2026-06-15 13:50:08 +01:00
2026-06-15 21:30:32 +00:00
2026-06-12 21:23:50 +00:00
2026-06-12 21:23:50 +00:00
2026-06-11 18:16:39 -07:00
2026-06-11 18:16:39 -07:00
2026-06-12 02:49:17 -07:00
2026-06-11 22:37:26 -07:00
2026-06-12 02:49:17 -07:00
2026-06-16 00:08:39 +00:00
2026-06-01 21:25:42 -07:00
2026-06-15 19:11:26 +02:00
2026-05-07 15:44:17 -07:00
2026-06-11 19:28:47 +00:00
2026-06-15 16:07:01 -04:00
2026-06-13 21:43:39 -07:00
2026-06-12 20:10:12 -07:00
2026-06-15 15:24:33 -07:00
2026-06-15 15:05:28 -07:00
2026-06-16 00:08:39 +00:00
2026-06-15 16:39:41 -07:00
2026-06-16 00:13:27 +00:00
2026-06-13 21:43:39 -07:00
2026-06-05 15:41:13 -07:00
2026-06-14 00:14:26 -07:00
2026-06-15 23:55:23 +00:00
2026-06-07 17:35:33 -07:00
2026-06-13 21:43:39 -07:00
2026-06-15 23:55:23 +00:00
2026-06-04 14:16:03 -04:00
2026-06-15 15:05:28 -07:00
2026-06-15 08:23:02 -07:00
2026-05-26 15:59:25 -07:00
2026-05-07 15:44:17 -07:00
2026-06-15 23:55:23 +00:00
2026-05-28 23:09:55 -07:00
2026-06-12 16:58:42 -07:00
2026-06-15 15:12:26 -07:00
2026-06-03 19:08:19 -07:00
2026-06-12 19:52:49 +00:00
2026-06-05 09:34:36 -07:00
2026-05-07 15:44:17 -07:00
2026-06-15 10:56:53 -07:00
2026-06-11 19:28:47 +00:00
2026-06-15 15:05:28 -07:00
2026-06-04 09:53:08 -04:00
2026-06-11 18:16:39 -07:00
2026-06-05 17:36:18 -07:00
2026-06-13 21:43:39 -07:00
2026-06-11 18:16:39 -07:00
2026-06-04 09:53:08 -04:00
2026-06-15 17:10:52 -07:00
2026-06-15 11:52:05 +02:00
2026-05-25 17:26:10 -03:00
2026-06-13 21:43:39 -07:00
2026-06-15 23:55:23 +00:00
2026-05-07 15:44:17 -07:00
2026-04-22 22:24:12 -07:00
2026-05-07 15:44:17 -07:00
2026-06-13 20:56:42 +00:00
2026-06-15 15:05:28 -07:00
2026-06-15 15:05:28 -07:00
2026-06-13 21:43:39 -07:00
2026-05-26 20:59:47 -07:00
2026-06-12 19:52:49 +00:00
2026-06-15 08:28:02 -07:00
2026-06-11 18:16:39 -07:00
2026-06-13 21:43:39 -07:00
2026-06-15 23:55:23 +00:00
2026-05-07 15:44:17 -07:00
2026-05-13 21:23:19 +00:00
2026-05-07 15:44:17 -07:00
2026-06-12 18:11:13 +00:00
2026-06-15 23:55:23 +00:00
2026-06-15 15:05:28 -07:00
2026-06-15 15:05:28 -07:00
2026-05-07 15:44:17 -07:00
2026-06-15 11:32:13 -07:00
2026-06-13 21:43:39 -07:00
2026-06-13 21:43:39 -07:00
2026-06-15 21:30:32 +00:00
2026-04-24 17:49:29 -07:00
2026-06-15 23:55:23 +00:00
2026-06-15 16:39:41 -07:00
2026-04-20 22:41:54 -07:00
2026-02-20 19:32:15 -08:00
2026-06-11 18:16:39 -07:00
2026-06-04 09:16:03 -07:00
2026-05-26 20:59:47 -07:00