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

Canonical local authoring paths for plugin manifests and marketplaces.

# `scope`

```elixir
@type scope() :: :repo | :personal
```

# `manifest_path`

```elixir
@spec manifest_path(Path.t()) :: Path.t()
```

Resolves the canonical manifest path for a plugin root or manifest path.

# `marketplace_path`

```elixir
@spec marketplace_path(
  scope(),
  keyword()
) :: {:ok, Path.t()} | {:error, term()}
```

Resolves the canonical marketplace path for a scope.

# `marketplace_root`

```elixir
@spec marketplace_root(Path.t()) :: {:ok, Path.t()} | {:error, term()}
```

Returns the root directory that owns a canonical marketplace file.

# `normalize_marketplace_source_path`

```elixir
@spec normalize_marketplace_source_path(term()) ::
  {:ok, String.t()} | {:error, String.t()}
```

Validates a marketplace source path before resolving it against the marketplace root.

# `normalize_relative_path`

```elixir
@spec normalize_relative_path(term()) :: {:ok, String.t()} | {:error, String.t()}
```

Validates a manifest or marketplace relative path.

# `plugin_root`

```elixir
@spec plugin_root(scope(), String.t(), keyword()) ::
  {:ok, Path.t()} | {:error, term()}
```

Resolves the canonical plugin root for a scope and plugin name.

# `relative_plugin_source_path`

```elixir
@spec relative_plugin_source_path(Path.t(), Path.t()) ::
  {:ok, String.t()} | {:error, term()}
```

Resolves a plugin root into a marketplace-relative `./...` source path.

# `resolve_marketplace_source_path`

```elixir
@spec resolve_marketplace_source_path(String.t(), String.t()) ::
  {:ok, String.t()} | {:error, term()}
```

Resolves a marketplace entry source path to an absolute path under its root.

# `scope_root`

```elixir
@spec scope_root(
  scope(),
  keyword()
) :: {:ok, Path.t()} | {:error, term()}
```

Resolves the root directory for a repo or personal plugin scope.

---

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