{
  "$defs": {
    "PluginRuntime": {
      "description": "How a plugin process is launched.",
      "oneOf": [
        {
          "const": "python",
          "description": "Python with uv-managed PEP 723 inline dependencies.",
          "type": "string"
        },
        {
          "const": "exec",
          "description": "The manifest's `command` array, verbatim.",
          "type": "string"
        }
      ]
    },
    "PluginTileDef": {
      "description": "One tile a plugin contributes to the bar.",
      "properties": {
        "accent": {
          "description": "Branding accent color for this tile (any simple CSS color value);\noverrides `--sb-accent` inside the plugin's tile, flyout and popup —\nonly while `appearance.pluginAccent` is `plugin`. The default `theme`\nkeeps every plugin on the active theme's accent.",
          "type": [
            "string",
            "null"
          ]
        },
        "accent2": {
          "description": "Secondary branding color (`--sb-accent-2`); falls back to `accent`.",
          "type": [
            "string",
            "null"
          ]
        },
        "accentFg": {
          "description": "Text color on accent surfaces (`--sb-on-accent`).",
          "type": [
            "string",
            "null"
          ]
        },
        "hasFlyout": {
          "default": false,
          "type": "boolean"
        },
        "iconSvg": {
          "description": "Optional custom branding icon. The shell accepts exactly one SVG root\nand runs it through the plugin-markup sanitizer before rendering it.",
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "tile": {
          "anyOf": [
            {
              "$ref": "#/$defs/TileChrome"
            },
            {
              "type": "null"
            }
          ],
          "description": "Optional tile chrome override; the global appearance setting applies\nwhen omitted."
        },
        "tileScale": {
          "anyOf": [
            {
              "$ref": "#/$defs/TileScale"
            },
            {
              "type": "null"
            }
          ],
          "description": "Optional base text size for a two-line tile; `m` when omitted."
        },
        "usePluginIcon": {
          "default": false,
          "description": "Prepend the plugin-folder icon to this cover. Defaults to false;\na usable `iconSvg` takes precedence. Settings use the icon independently.",
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "type": "object"
    },
    "TileChrome": {
      "description": "Background chrome used for tile tiles.",
      "enum": [
        "card",
        "flat"
      ],
      "type": "string"
    },
    "TileScale": {
      "description": "Base text size of a two-line bar tile (`sb-tile-stack`), as a step rather\nthan a pixel value: the shell scales it against the height the bar\nactually grants a tile, so the text follows the bar's size.",
      "enum": [
        "s",
        "m",
        "l"
      ],
      "type": "string"
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Parsed and validated `smabar.json`.",
  "properties": {
    "command": {
      "default": [],
      "description": "Program plus arguments (exec runtime).",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "description": {
      "default": null,
      "type": [
        "string",
        "null"
      ]
    },
    "entry": {
      "default": null,
      "description": "Script file relative to the plugin folder (python runtime).",
      "type": [
        "string",
        "null"
      ]
    },
    "id": {
      "description": "Stable plugin id, `[a-z0-9-]` — the key for settings, logs, events.",
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "protocolVersion": {
      "format": "uint32",
      "minimum": 0,
      "type": "integer"
    },
    "runtime": {
      "$ref": "#/$defs/PluginRuntime"
    },
    "settingsSchema": {
      "default": null,
      "description": "JSON Schema of the plugin's settings, for MCP and the settings UI."
    },
    "tiles": {
      "items": {
        "$ref": "#/$defs/PluginTileDef"
      },
      "type": "array"
    },
    "version": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "name",
    "version",
    "protocolVersion",
    "runtime",
    "tiles"
  ],
  "title": "PluginManifest",
  "type": "object"
}
