Enrich V2 capability discovery with resolved plugin and skill metadata (#53763)

## What changed

- Return qualified skill names such as `team:deploy` and parsed `dependencies` and `policy` instead of a separate namespace and raw metadata file. Share `agents/openai.yaml` parsing and validation between skill loaders and executor discovery.
- Include each standalone skill's search-root ID and path in `discoveryRoot`, while accepting responses from older executors that omit it.
- Add plugin `displayName`, falling back to the manifest name or installation directory.
- Materialize inline MCP declarations in `mcpConfig` with the manifest as their source path, and report incomplete discovery when declared MCP or Apps configuration files have no returned contents.

## Testing

Add coverage for JSON round trips, omitted `discoveryRoot`, optional and invalid skill metadata, qualified names, display-name fallbacks, and inline MCP configuration. Verify standalone search roots survive cached discovery and sandboxed RPC responses.

GitOrigin-RevId: 4124972444ad7c2fb8c6418acbf9a589d797fad2
This commit is contained in:
Anthony Tafoya
2026-10-13 20:40:38 +00:00
committed by copyberry
parent 21c1616119
commit 20b4ff2f35
20 changed files with 621 additions and 233 deletions
@@ -147,11 +147,13 @@ impl Executor {
.iter().map(|root| json!({"id":root["id"],"path":root["path"]})).collect::<Vec<_>>()
})),
Some("capabilities/discoverV2") => Some(json!({
"plugins":[{"id":"inert-sentinel@market","remotePluginId":null,
"plugins":[{"id":"inert-sentinel@market","displayName":"inert-sentinel","remotePluginId":null,
"version":"1","root":"file:///inert-sentinel",
"files":{"manifest":{"path":"file:///inert-sentinel/.codex-plugin/plugin.json",
"contents":"{\"name\":\"inert-sentinel\",\"mcpServers\":{\"inert-sentinel\":{\"command\":\"never-run\"}}}"},
"mcpConfig":null,"appsConfig":null},"skills":[]}],
"mcpConfig":{"path":"file:///inert-sentinel/.codex-plugin/plugin.json",
"contents":"{\"inert-sentinel\":{\"command\":\"never-run\"}}"},
"appsConfig":null},"skills":[]}],
"skills":[{"name":"inert-sentinel","description":"must not enter the prompt",
"shortDescription":null,"path":"file:///inert-sentinel/SKILL.md","metadata":null}],
"warnings":[]