[plugins] Expose marketplace source in marketplace list JSON (#27009)

## Summary
- Follow-up to #26417 and #26631
- Add `marketplaceSource` to `codex plugin marketplace list --json`
entries for configured marketplaces
- Reuse the existing `marketplaceSource` shape from `codex plugin list
--json`
- Keep human-readable marketplace list output unchanged
- Add CLI coverage for configured local and git marketplace sources

Example:

```json
{
  "marketplaces": [
    {
      "name": "debug",
      "root": "/path/to/.codex/.tmp/marketplaces/debug",
      "marketplaceSource": {
        "sourceType": "git",
        "source": "https://example.com/acme/agent-skills.git"
      }
    }
  ]
}
```

## Validation
- `just fmt`
- `just fix -p codex-cli`
- `just test -p codex-cli marketplace_list`
- `just test -p codex-cli`
This commit is contained in:
mpc-oai
2026-06-08 13:37:55 -05:00
committed by GitHub
Unverified
parent 6d8e12ac42
commit 0aa9931aea
3 changed files with 158 additions and 5 deletions
+2 -2
View File
@@ -437,12 +437,12 @@ impl JsonPluginSource {
#[derive(Debug, Clone, Serialize)]
#[serde(rename_all = "camelCase")]
struct JsonMarketplaceSource {
pub(crate) struct JsonMarketplaceSource {
source_type: String,
source: String,
}
fn configured_marketplace_sources(
pub(crate) fn configured_marketplace_sources(
plugins_input: &PluginsConfigInput,
) -> HashMap<String, JsonMarketplaceSource> {
let Some(user_config) = plugins_input.config_layer_stack.effective_user_config() else {