{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.targapps.xyz/schemas/chroma/chroma-pkg.schema.json",
  "title": "Chroma WASM engine package manifest",
  "description": "package.json emitted by wasm-pack into pkg/ and vendored into Chroma apps at engine.vendorDir. Derived from Chroma/pkg/package.json.",
  "type": "object",
  "additionalProperties": false,
  "required": ["name", "type", "version", "main", "types", "files"],
  "properties": {
    "$schema": { "type": "string", "format": "uri" },
    "name": {
      "type": "string",
      "const": "chroma",
      "description": "Fixed package name for the WASM engine."
    },
    "type": {
      "type": "string",
      "const": "module"
    },
    "description": {
      "type": "string"
    },
    "version": {
      "type": "string",
      "description": "Engine semver; kept in sync with Chroma/VERSION."
    },
    "license": {
      "type": "string",
      "description": "SPDX license identifier (e.g. GPL-3.0-or-later)."
    },
    "files": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": ["chroma_bg.wasm", "chroma.js", "chroma.d.ts"]
      },
      "minItems": 3,
      "uniqueItems": true
    },
    "main": {
      "type": "string",
      "const": "chroma.js"
    },
    "types": {
      "type": "string",
      "const": "chroma.d.ts"
    },
    "sideEffects": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^\\./snippets/"
      },
      "description": "wasm-bindgen snippet paths marked as side-effectful."
    }
  }
}
