Requirements
Mirage mounts an existing ChromaDB collection as a read-only virtual filesystem. The collection must already contain:- One path tree document with ID
__path_tree__. - One or more page chunk documents.
- A metadata field that maps each chunk to a virtual file path slug.
- A metadata field that orders chunks within each file.
AsyncHttpClient.
Path Tree Document
The path tree document defines the filesystem tree. Store it in Chroma with the ID__path_tree__. Its document content must be either plain JSON or
gzip-compressed base64 JSON.
- Do not use an empty path.
- Do not use
.,.., or empty path segments. - Keep every path unique after trimming leading and trailing slashes.
- Do not use a path both as a file and as a directory prefix. For example,
guidesandguides/quickstart.mdcannot both be files.
size, created_at, and
updated_at when present.
Chunk Documents
Each file is materialized from one or more Chroma documents. Every chunk must include metadata that identifies the file slug and chunk order:| Field | Default | Purpose |
|---|---|---|
| Slug field | page_slug | File path in the virtual tree |
| Chunk index field | chunk_index | Sort order when assembling file content |
ChromaConfig(slug_field="...", chunk_index_field="...").