{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://static-agent-marketplace.org/schemas/draft/install-prompt.schema.json",
  "title": "Static Agent Marketplace install prompt",
  "description": "A prompt a user can paste into their own agent to install one package. Generated from the catalog; see section 12 of the specification.",
  "type": "object",
  "required": ["host", "text", "commands", "sha256", "requiresApproval"],
  "properties": {
    "host": {
      "description": "The installer the prompt targets. Core values are claude and agent-skills; the annex values apply only when host packages are produced.",
      "enum": ["claude", "agent-skills", "codex", "antigravity", "gemini", "grok"]
    },
    "text": {
      "description": "The prompt, lines separated by LF, no trailing newline. Must not ask the agent to pipe a download into a shell.",
      "type": "string",
      "minLength": 1,
      "allOf": [
        {"pattern": "^Install the \"[a-z0-9-]+\" (plugin|skill), version [^ ]+, "},
        {"pattern": "\nDo not run any other download or shell command\\.$"},
        {"not": {"pattern": "Run: ([Cc]url|[Ww]get|Invoke-WebRequest|iwr|iex)\\b"}},
        {"not": {"pattern": "Run: [^\\n]*\\|\\s*(sudo\\s+)?(sh|bash|zsh|pwsh|powershell|python[0-9.]*)\\b"}}
      ]
    },
    "commands": {
      "description": "The commands the prompt asks the agent to run, in order. Each must appear verbatim in text.",
      "type": "array",
      "minItems": 1,
      "items": {"type": "string", "minLength": 1, "pattern": "^[^\\n]+$"}
    },
    "sha256": {
      "description": "Lowercase hex SHA-256 of the archive the prompt installs. Must appear verbatim in text.",
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "requiresApproval": {
      "description": "True when the package can run code on install or use (hooks, MCP servers, skill scripts); text then asks for explicit approval.",
      "type": "boolean"
    }
  },
  "additionalProperties": false
}
