Codex.Plugins.Manifest (Codex SDK v0.16.1)

Copy Markdown View Source

Local authoring model for .codex-plugin/plugin.json.

Summary

Functions

Compatibility alias for parse!/1.

Parses manifest data into a %Codex.Plugins.Manifest{} struct.

Parses manifest data and raises on invalid input.

Returns the schema used to validate manifest data.

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

Types

author_t()

@type author_t() :: %{
  name: String.t() | nil,
  email: String.t() | nil,
  url: String.t() | nil,
  extra: map()
}

interface_t()

@type interface_t() :: %{
  display_name: String.t() | nil,
  short_description: String.t() | nil,
  long_description: String.t() | nil,
  developer_name: String.t() | nil,
  category: String.t() | nil,
  capabilities: [String.t()] | nil,
  website_url: String.t() | nil,
  privacy_policy_url: String.t() | nil,
  terms_of_service_url: String.t() | nil,
  default_prompt: [String.t()] | nil,
  brand_color: String.t() | nil,
  composer_icon: String.t() | nil,
  logo: String.t() | nil,
  screenshots: [String.t()] | nil,
  extra: map()
}

t()

@type t() :: %Codex.Plugins.Manifest{
  apps: (String.t() | nil) | nil,
  author: (author_t() | nil) | nil,
  description: (String.t() | nil) | nil,
  extra: map(),
  homepage: (String.t() | nil) | nil,
  hooks: (String.t() | nil) | nil,
  interface: (interface_t() | nil) | nil,
  keywords: ([String.t()] | nil) | nil,
  license: (String.t() | nil) | nil,
  mcp_servers: (String.t() | nil) | nil,
  name: String.t(),
  repository: (String.t() | nil) | nil,
  skills: (String.t() | nil) | nil,
  version: (String.t() | nil) | nil
}

Functions

from_map(data)

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

Compatibility alias for parse!/1.

parse(value)

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

Parses manifest data into a %Codex.Plugins.Manifest{} struct.

parse!(data)

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

Parses manifest data and raises on invalid input.

schema()

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

Returns the schema used to validate manifest data.

to_map(value)

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

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