{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "/schemas/chroma/chroma-fs.schema.json",
  "title": "Chroma-Fs storage config",
  "description": "Storage backend configuration for @chroma/fs. Created by chroma fs init and read by createStorage({ configPath: './chroma-fs.json' }). Derived from Chroma-Fs/src/types.ts and Chroma/cli/chroma.sh cmd_fs_init.",
  "type": "object",
  "additionalProperties": false,
  "required": ["storage"],
  "properties": {
    "storage": {
      "$ref": "#/$defs/storage"
    }
  },
  "$defs": {
    "storage": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "backend": {
          "type": "string",
          "enum": ["indexeddb", "filesystem"],
          "description": "Storage backend. Defaults to indexeddb on static apps and filesystem on dynamic apps when created via chroma fs init."
        },
        "basePath": {
          "type": "string",
          "description": "Root directory for the filesystem backend (e.g. ./data)."
        },
        "indexedDb": {
          "$ref": "#/$defs/indexedDb"
        }
      }
    },
    "indexedDb": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "dbName": {
          "type": "string",
          "description": "IndexedDB database name."
        },
        "storeName": {
          "type": "string",
          "description": "IndexedDB object store name."
        }
      }
    }
  }
}
