{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "/schemas/chroma-plugins/chroma-fs.schema.json",
  "title": "Chroma-Fs Storage Config",
  "description": "App-level storage configuration read by @chroma/fs bootstrapFs/createStorage. Placed at project root as chroma-fs.json. Parsed by Chroma-Fs/src/config.ts parseConfig(). Consumers: Targ-Apps-Finance, Chroma-CLI examples (static/dynamic/standard), Chroma-Fs/.",
  "type": "object",
  "additionalProperties": false,
  "required": ["storage"],
  "properties": {
    "storage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "backend": {
          "type": "string",
          "enum": ["indexeddb", "filesystem"],
          "description": "Explicit backend override. When omitted, resolveBackend() picks filesystem on desktop and indexeddb on static hosts."
        },
        "basePath": {
          "type": "string",
          "description": "Root directory for filesystem backend. Defaults to ./data.",
          "examples": ["./data"]
        },
        "indexedDb": {
          "type": "object",
          "description": "IndexedDB database settings for static/browser storage.",
          "additionalProperties": false,
          "properties": {
            "dbName": {
              "type": "string",
              "description": "IndexedDB database name. Defaults to chroma-fs.",
              "examples": ["chroma-fs", "targ-apps-finance", "chroma-app"]
            },
            "storeName": {
              "type": "string",
              "description": "Object store name. Defaults to files.",
              "examples": ["files"]
            }
          }
        }
      }
    }
  }
}
