# `Codex.Plugins.Marketplace`
[🔗](https://github.com/nshkrdotcom/codex_sdk/blob/v0.16.1/lib/codex/plugins/marketplace.ex#L1)

Local authoring model for `.agents/plugins/marketplace.json`.

# `interface_t`

```elixir
@type interface_t() :: %{display_name: String.t() | nil, extra: map()}
```

# `plugin_t`

```elixir
@type plugin_t() :: %{
  name: String.t(),
  source: source_t(),
  policy: policy_t(),
  category: String.t(),
  extra: map()
}
```

# `policy_t`

```elixir
@type policy_t() :: %{
  installation: Codex.Protocol.Plugin.InstallPolicy.t(),
  authentication: Codex.Protocol.Plugin.AuthPolicy.t(),
  products: [String.t()] | nil,
  extra: map()
}
```

# `source_t`

```elixir
@type source_t() :: %{source: :local, path: String.t(), extra: map()}
```

# `t`

```elixir
@type t() :: %Codex.Plugins.Marketplace{
  extra: map(),
  interface: (interface_t() | nil) | nil,
  name: String.t(),
  plugins: [plugin_t()]
}
```

# `from_map`

```elixir
@spec from_map(map() | keyword() | t()) :: t()
```

Compatibility alias for `parse!/1`.

# `parse`

```elixir
@spec parse(map() | keyword() | t()) ::
  {:ok, t()}
  | {:error,
     {:invalid_plugin_marketplace, CliSubprocessCore.Schema.error_detail()}}
```

Parses marketplace data into a `%Codex.Plugins.Marketplace{}` struct.

# `parse!`

```elixir
@spec parse!(map() | keyword() | t()) :: t()
```

Parses marketplace data and raises on invalid input.

# `parse_plugin`

```elixir
@spec parse_plugin(map() | keyword() | plugin_t()) ::
  {:ok, plugin_t()}
  | {:error,
     {:invalid_plugin_marketplace_plugin,
      CliSubprocessCore.Schema.error_detail()}}
```

Parses a single marketplace entry for add/update flows.

# `schema`

```elixir
@spec schema() :: Zoi.schema()
```

Returns the schema used to validate marketplace data.

# `to_map`

```elixir
@spec to_map(t()) :: map()
```

Serializes a marketplace struct back into canonical JSON-compatible data.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
