Skip to content

armgit / xerj

Public Imported from GitHub
0

AI search engine and MCP server for bots and agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

223 KB
Raw Blame
[
  {
    "id": "01-boot-health",
    "doc": "install / quickstart",
    "title": "Boot & health — one binary is up",
    "steps": [
      {
        "label": "cluster identity (ES-wire)",
        "cmd": "curl -s \"http://localhost:9200/\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"name\": \"local\",\n  \"cluster_name\": \"xerj\",\n  \"cluster_uuid\": \"xerj-cluster-0000-0000-0000-000000000000\",\n  \"version\": {\n    \"number\": \"8.13.0\",\n    \"build_flavor\": \"default\",\n    \"build_type\": \"tar\",\n    \"build_hash\": \"00000000\",\n    \"build_date\": \"2024-03-22T00:00:00.000Z\",\n    \"build_snapshot\": false,\n    \"lucene_version\": \"9.10.0\",\n    \"minimum_wire_compatibility_version\": \"7.17.0\",\n    \"minimum_index_compatibility_version\": \"7.0.0\"\n  },\n  \"tagline\": \"You Know, for Search\"\n}"
      },
      {
        "label": "cluster health is green",
        "cmd": "curl -s \"http://localhost:9200/_cluster/health\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"active_primary_shards\": 15,\n  \"active_shards\": 15,\n  \"active_shards_percent_as_number\": 100,\n  \"cluster_name\": \"xerj\",\n  \"delayed_unassigned_shards\": 0,\n  \"initializing_shards\": 0,\n  \"number_of_data_nodes\": 1,\n  \"number_of_in_flight_fetch\": 0,\n  \"number_of_nodes\": 1,\n  \"number_of_pending_tasks\": 0,\n  \"relocating_shards\": 0,\n  \"status\": \"green\",\n  \"task_max_waiting_in_queue_millis\": 0,\n  \"timed_out\": false,\n  \"unassigned_primary_shards\": 0,\n  \"unassigned_shards\": 0\n}"
      },
      {
        "label": "nodes listing",
        "cmd": "curl -s \"http://localhost:9200/_cat/nodes?v\"",
        "status": 200,
        "pass": true,
        "output": "127.0.0.1 0 6 2 0.59 1.01 1.79 cdfhilmrstw * local"
      },
      {
        "label": "native health (:8080)",
        "cmd": "curl -s \"http://localhost:8080/v1/health\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"data\": {\n    \"status\": \"yellow\",\n    \"index_count\": 15,\n    \"total_docs\": 4009,\n    \"version\": \"1.0.0-rc.1\"\n  },\n  \"took_ms\": 0,\n  \"request_id\": \"06f4fb44-7296-46c0-ac9d-d16f9f653aea\"\n}"
      },
      {
        "label": "prometheus metrics (:8080)",
        "cmd": "curl -s \"http://localhost:8080/v1/metrics\"",
        "status": 200,
        "pass": true,
        "output": "# HELP xerj_active_searches Number of searches currently in flight\n# TYPE xerj_active_searches gauge\nxerj_active_searches 0\n# HELP xerj_bytes_read_total Total bytes read from segment files (uncompressed)\n# TYPE xerj_bytes_read_total counter\nxerj_bytes_read_total 0\n# HELP xerj_bytes_written_total Total bytes written to segment files (uncompressed)\n# TYPE xerj_bytes_written_total counter\nxerj_bytes_written_total 0\n# HELP xerj_doc_count Total live documents across all indices\n# TYPE xerj_doc_count gauge\nxerj_doc_count 0\n# HELP xerj_docs_indexed_total Total number of documents successfully indexed\n# TYPE xerj_docs_indexed_total counter\nxerj_docs_indexed_total 0\n# HELP xerj_flush_duration_seconds Time to flush an in-memory buffer to a segment\n# TYPE xerj_flush_duration_seconds histogram\nxerj_flush_duration_seconds_bucket{le=\"0.01\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.02\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.04\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.08\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.16\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.32\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.64\"} 0\nxerj_flush_duration_seconds_bucket{le=\"1.28\"} 0\nxerj_flush_duration_seconds_bucket{le=\"2.56\"} 0\nxerj_flush_duration_seconds_bucket{le=\"5.12\"} 0\nxerj_flush_duration_seconds_bucket{le=\"10.24\"} 0\nxerj_flush_duration_seconds_bucket{le=\"20.48\"} 0\nxerj_flush_duration_seconds_bucket{le=\"40.96\"} 0\nxerj_flush_duration_seconds_bucket{le=\"81.92\"} 0\nxerj_flush_duration_seconds_bucket{le=\"163.84\"} 0\nxerj_flush_duration_seconds_bucket{le=\"+Inf\"} 0\nxerj_flush_duration_seconds_sum 0\nxerj_flush_duration_seconds_count 0\n# HELP xerj_index_latency_seconds End-to-end document indexing latency\n# TYPE xerj_index_latency_seconds histogram\nxerj_index_latency_seconds_bucket{le=\"0.0005\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.001\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.002\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.004\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.008\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.016\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.032\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.064\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.128\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.256\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.512\"} 0\nxerj_index_latency_seconds_bucket{le=\"1.024\"} 0\nxerj_index_latency_seconds_bucket{le=\"2.048\"} 0\nxerj_index_latency_seconds_bucket{le=\"4.096\"} 0\nxerj_index_latency_seconds_bucket{le=\"8.192\"} 0\nxerj_index_latency_seconds_bucket{le=\"+Inf\"} 0\nxerj_index_latency_seconds_sum 0\nxerj_index_latency_seconds_count 0\n# HELP xerj_memory_usage_bytes Approximate engine memory usage in bytes\n# TYPE xerj_memory_usage_bytes gauge\nxerj_memory_usage_bytes 0\n# HELP xerj_merge_duration_seconds Time to complete a segment merge operation\n# TYPE xerj_merge_duration_seconds histogram\nxerj_merge_duration_seconds_bucket{le=\"0.01\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.02\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.04\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.08\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.16\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.32\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.64\"} 0\nxerj_merge_duration_seconds_bucket{le=\"1.28\"} 0\nxerj_merge_duration_seconds_bucket{le=\"2.56\"} 0\nxerj_merge_duration_seconds_bucket{le=\"5.12\"} 0\nxerj_merge_duration_seconds_bucket{le=\"10.24\"} 0\nxerj_merge_duration_seconds_bucket{le=\"20.48\"} 0\nxerj_merge_duration_seconds_bucket{le=\"40.96\"} 0\nxerj_merge_duration_seconds_bucket{le=\"81.92\"} 0\nxerj_merge_duration_seconds_bucket{le=\"163.84\"} 0\nxerj_merge_duration_seconds_bucket{le=\"+Inf\"} 0\nxerj_merge_duration_seconds_sum 0\nxerj_merge_duration_seconds_count 0\n# HELP xerj_queries_executed_total Total number of search queries executed\n# TYPE xerj_queries_executed_total counter\nxerj_queries_executed_total 0\n# HELP xerj_query_latency_seconds End-to-end query latency\n# TYPE xerj_query_latency_seconds histogram\nxerj_query_latency_seconds_bucket{le=\"0.0005\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.001\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.002\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.004\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.008\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.016\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.032\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.064\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.128\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.256\"} 0\nxerj_query_latency_seconds_bucket{le=\"0.512\"} 0\nxerj_query_latency_seconds_bucket{le=\"1.024\"} 0\nxerj_query_latency_seconds_bucket{le=\"2.048\"} 0\nxerj_query_latency_seconds_bucket{le=\"4.096\"} 0\nxerj_query_latency_seconds_bucket{le=\"8.192\"} 0\nxerj_query_latency_seconds_bucket{le=\"+Inf\"} 0\nxerj_query_latency_seconds_sum 0\nxerj_query_latency_seconds_count 0\n# HELP xerj_segment_count Number of open segments across all indices\n# TYPE xerj_segment_count gauge\nxerj_segment_count 0\n# HELP xerj_wal_size_bytes Current WAL size on disk in bytes\n# TYPE xerj_wal_size_bytes gauge\nxerj_wal_size_bytes 0\n# HELP xerj_wal_write_latency_seconds WAL write latency\n# TYPE xerj_wal_write_latency_seconds histogram\nxerj_wal_write_latency_seconds_bucket{le=\"0.0005\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.001\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.002\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.004\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.008\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.016\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.032\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.064\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.128\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.256\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.512\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"1.024\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"2.048\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"4.096\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"8.192\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"+Inf\"} 0\nxerj_wal_write_latency_seconds_sum 0\nxerj_wal_write_latency_seconds_count 0"
      }
    ]
  },
  {
    "id": "02-quickstart-crud",
    "doc": "quickstart",
    "title": "Quickstart — index, document, get, search",
    "steps": [
      {
        "label": "create index w/ mapping",
        "cmd": "curl -s -XPUT \"http://localhost:9200/articles\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"mappings\":{\"properties\":{\"title\":{\"type\":\"text\"},\"body\":{\"type\":\"text\"},\"views\":{\"type\":\"integer\"},\"tag\":{\"type\":\"keyword\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"acknowledged\": true,\n  \"shards_acknowledged\": true,\n  \"index\": \"articles\"\n}"
      },
      {
        "label": "index a document",
        "cmd": "curl -s -XPUT \"http://localhost:9200/articles/_doc/1\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"title\":\"Hello Xerj\",\"body\":\"one binary for search\",\"views\":42,\"tag\":\"intro\"}'",
        "status": 201,
        "pass": true,
        "output": "{\n  \"_index\": \"articles\",\n  \"_id\": \"1\",\n  \"_version\": 1,\n  \"result\": \"created\",\n  \"_shards\": {\n    \"total\": 1,\n    \"successful\": 1,\n    \"failed\": 0\n  },\n  \"_seq_no\": 1,\n  \"_primary_term\": 1\n}"
      },
      {
        "label": "get the document",
        "cmd": "curl -s \"http://localhost:9200/articles/_doc/1\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_index\": \"articles\",\n  \"_id\": \"1\",\n  \"_version\": 1,\n  \"_seq_no\": 1,\n  \"_primary_term\": 1,\n  \"found\": true,\n  \"_source\": {\n    \"body\": \"one binary for search\",\n    \"tag\": \"intro\",\n    \"title\": \"Hello Xerj\",\n    \"views\": 42\n  }\n}"
      },
      {
        "label": "search it",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"match\":{\"body\":\"binary\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"1\",\n        \"_index\": \"articles\",\n        \"_score\": 0.28768211603164673,\n        \"_source\": {\n          \"body\": \"one binary for search\",\n          \"tag\": \"intro\",\n          \"title\": \"Hello Xerj\",\n          \"views\": 42\n        }\n      }\n    ],\n    \"max_score\": 0.28768211603164673,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 1\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      }
    ]
  },
  {
    "id": "03-ingest-bulk",
    "doc": "ingest",
    "title": "Bulk ingest — ES /_bulk wire protocol",
    "steps": [
      {
        "label": "bulk index 4 docs",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_bulk\" \\\n  -H 'content-type: application/x-ndjson' \\\n  --data-binary $'{\"index\":{}}\\n{\"title\":\"A\",\"body\":\"alpha vector\",\"views\":10,\"tag\":\"a\"}\\n{\"index\":{}}\\n{\"title\":\"B\",\"body\":\"beta search\",\"views\":20,\"tag\":\"b\"}\\n{\"index\":{}}\\n{\"title\":\"C\",\"body\":\"gamma logs\",\"views\":30,\"tag\":\"a\"}\\n{\"index\":{}}\\n{\"title\":\"D\",\"body\":\"delta agg\",\"views\":40,\"tag\":\"b\"}\\n'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"errors\": false,\n  \"items\": [\n    {\n      \"index\": {\n        \"_id\": \"a42a64ea-0f2c-44b2-b4af-3db93b145cf3\",\n        \"_index\": \"articles\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459332453,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    },\n    {\n      \"index\": {\n        \"_id\": \"e8953ed6-3cfa-411f-b585-c141cbb28f0f\",\n        \"_index\": \"articles\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459332454,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    },\n    {\n      \"index\": {\n        \"_id\": \"7e9e9f67-1d1b-4dbb-a833-06052cb89393\",\n        \"_index\": \"articles\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459332454,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    },\n    {\n      \"index\": {\n        \"_id\": \"f5644d8f-b189-4f4e-bbec-e5dbcc4ccaf8\",\n        \"_index\": \"articles\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459332455,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    }\n  ],\n  \"took\": 0\n}"
      },
      {
        "label": "refresh to make searchable",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_refresh\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  }\n}"
      },
      {
        "label": "count documents",
        "cmd": "curl -s \"http://localhost:9200/articles/_count\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"count\": 5\n}"
      },
      {
        "label": "cat indices",
        "cmd": "curl -s \"http://localhost:9200/_cat/indices?v\"",
        "status": 200,
        "pass": true,
        "output": "green open .xerj_views c1085939-2ee4-4c41-84f0-27c8b4055587 1 0 0 0 256b 256b\ngreen open .xerj_passkeys 34737b04-ab94-4c61-921a-c60e0a22bb55 1 0 0 0 256b 256b\ngreen open .xerj_sessions c7f50939-f76f-4a8d-a123-54c14c04ff0b 1 0 0 0 256b 256b\ngreen open .xerj_dashboards 7c555883-6604-4697-84bc-6ff2c9a6e17c 1 0 0 0 256b 256b\ngreen open articles 6d2b5789-63af-46e7-905d-ae8dfae790d1 1 0 5 0 8284b 8284b\ngreen open .xerj_idp_config 554ed071-9c2e-47af-8980-5a5080155506 1 0 0 0 256b 256b\ngreen open .xerj_alert_rules 2298aee0-3b18-45d1-bac1-3840853af691 1 0 0 0 256b 256b\ngreen open .xerj_connections 834427c7-47cf-4a43-ab48-9f41a9120fc0 1 0 0 0 256b 256b\ngreen open .xerj_cluster_state 97013a17-d8d0-4a54-bcb1-2c9b47afe9b2 1 0 0 0 256b 256b\ngreen open .xerj_alert_fires 3d76692a-d8c0-49b1-a69b-aea7440024cd 1 0 0 0 256b 256b\ngreen open .xerj_prefs 4aca1cac-4822-4c01-b36b-a812a27847c3 1 0 0 0 256b 256b\ngreen open .xerj_magic_links 4274efef-5f1e-464c-aa02-ba74f792b486 1 0 1 0 3429b 3429b\ngreen open .xerj_users 1900ef80-d755-40cc-bb3b-efd7e809455d 1 0 0 0 256b 256b\ngreen open bench c1992e47-4719-4f8f-9918-0f00a6ce8b61 1 0 4008 0 849235b 849235b\ngreen open .xerj_audit afc96921-442b-4598-a6e9-c5d0d3478152 1 0 0 0 256b 256b\ngreen open .xerj_api_tokens 23ba90e9-8efa-4c1a-a6d7-8b1985a9058e 1 0 0 0 256b 256b"
      }
    ]
  },
  {
    "id": "04-full-text",
    "doc": "queries / playbooks/full-text",
    "title": "Full-text search — the ES query families",
    "steps": [
      {
        "label": "match",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"match\":{\"body\":\"search\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"1\",\n        \"_index\": \"articles\",\n        \"_score\": 0.28768211603164673,\n        \"_source\": {\n          \"body\": \"one binary for search\",\n          \"tag\": \"intro\",\n          \"title\": \"Hello Xerj\",\n          \"views\": 42\n        }\n      },\n      {\n        \"_id\": \"e8953ed6-3cfa-411f-b585-c141cbb28f0f\",\n        \"_index\": \"articles\",\n        \"_score\": 0.28768211603164673,\n        \"_source\": {\n          \"body\": \"beta search\",\n          \"tag\": \"b\",\n          \"title\": \"B\",\n          \"views\": 20\n        }\n      }\n    ],\n    \"max_score\": 0.28768211603164673,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 2\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 1\n}"
      },
      {
        "label": "match_phrase",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"match_phrase\":{\"body\":\"alpha vector\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"a42a64ea-0f2c-44b2-b4af-3db93b145cf3\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"alpha vector\",\n          \"tag\": \"a\",\n          \"title\": \"A\",\n          \"views\": 10\n        }\n      }\n    ],\n    \"max_score\": 1,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 1\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 1\n}"
      },
      {
        "label": "term (keyword)",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"term\":{\"tag\":\"a\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"a42a64ea-0f2c-44b2-b4af-3db93b145cf3\",\n        \"_index\": \"articles\",\n        \"_score\": 1.6931471824645996,\n        \"_source\": {\n          \"body\": \"alpha vector\",\n          \"tag\": \"a\",\n          \"title\": \"A\",\n          \"views\": 10\n        }\n      },\n      {\n        \"_id\": \"7e9e9f67-1d1b-4dbb-a833-06052cb89393\",\n        \"_index\": \"articles\",\n        \"_score\": 1.6931471824645996,\n        \"_source\": {\n          \"body\": \"gamma logs\",\n          \"tag\": \"a\",\n          \"title\": \"C\",\n          \"views\": 30\n        }\n      }\n    ],\n    \"max_score\": 1.6931471824645996,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 2\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "terms",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"terms\":{\"tag\":[\"a\",\"b\"]}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"a42a64ea-0f2c-44b2-b4af-3db93b145cf3\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"alpha vector\",\n          \"tag\": \"a\",\n          \"title\": \"A\",\n          \"views\": 10\n        }\n      },\n      {\n        \"_id\": \"e8953ed6-3cfa-411f-b585-c141cbb28f0f\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"beta search\",\n          \"tag\": \"b\",\n          \"title\": \"B\",\n          \"views\": 20\n        }\n      },\n      {\n        \"_id\": \"7e9e9f67-1d1b-4dbb-a833-06052cb89393\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"gamma logs\",\n          \"tag\": \"a\",\n          \"title\": \"C\",\n          \"views\": 30\n        }\n      },\n      {\n        \"_id\": \"f5644d8f-b189-4f4e-bbec-e5dbcc4ccaf8\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"delta agg\",\n          \"tag\": \"b\",\n          \"title\": \"D\",\n          \"views\": 40\n        }\n      }\n    ],\n    \"max_score\": 1,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 4\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "range",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"range\":{\"views\":{\"gte\":20}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"1\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"one binary for search\",\n          \"tag\": \"intro\",\n          \"title\": \"Hello Xerj\",\n          \"views\": 42\n        }\n      },\n      {\n        \"_id\": \"e8953ed6-3cfa-411f-b585-c141cbb28f0f\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"beta search\",\n          \"tag\": \"b\",\n          \"title\": \"B\",\n          \"views\": 20\n        }\n      },\n      {\n        \"_id\": \"7e9e9f67-1d1b-4dbb-a833-06052cb89393\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"gamma logs\",\n          \"tag\": \"a\",\n          \"title\": \"C\",\n          \"views\": 30\n        }\n      },\n      {\n        \"_id\": \"f5644d8f-b189-4f4e-bbec-e5dbcc4ccaf8\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"delta agg\",\n          \"tag\": \"b\",\n          \"title\": \"D\",\n          \"views\": 40\n        }\n      }\n    ],\n    \"max_score\": 1,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 4\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "bool must+filter",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"bool\":{\"must\":[{\"match\":{\"body\":\"logs\"}}],\"filter\":[{\"term\":{\"tag\":\"a\"}}]}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"7e9e9f67-1d1b-4dbb-a833-06052cb89393\",\n        \"_index\": \"articles\",\n        \"_score\": 0.9741763472557068,\n        \"_source\": {\n          \"body\": \"gamma logs\",\n          \"tag\": \"a\",\n          \"title\": \"C\",\n          \"views\": 30\n        }\n      }\n    ],\n    \"max_score\": 0.9741763472557068,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 1\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 1\n}"
      },
      {
        "label": "prefix",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"prefix\":{\"body\":\"alp\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"a42a64ea-0f2c-44b2-b4af-3db93b145cf3\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"alpha vector\",\n          \"tag\": \"a\",\n          \"title\": \"A\",\n          \"views\": 10\n        }\n      }\n    ],\n    \"max_score\": 1,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 1\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "wildcard",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"wildcard\":{\"body\":\"sea*\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"1\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"one binary for search\",\n          \"tag\": \"intro\",\n          \"title\": \"Hello Xerj\",\n          \"views\": 42\n        }\n      },\n      {\n        \"_id\": \"e8953ed6-3cfa-411f-b585-c141cbb28f0f\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"beta search\",\n          \"tag\": \"b\",\n          \"title\": \"B\",\n          \"views\": 20\n        }\n      }\n    ],\n    \"max_score\": 1,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 2\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "exists",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"exists\":{\"field\":\"title\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"1\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"one binary for search\",\n          \"tag\": \"intro\",\n          \"title\": \"Hello Xerj\",\n          \"views\": 42\n        }\n      },\n      {\n        \"_id\": \"a42a64ea-0f2c-44b2-b4af-3db93b145cf3\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"alpha vector\",\n          \"tag\": \"a\",\n          \"title\": \"A\",\n          \"views\": 10\n        }\n      },\n      {\n        \"_id\": \"e8953ed6-3cfa-411f-b585-c141cbb28f0f\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"beta search\",\n          \"tag\": \"b\",\n          \"title\": \"B\",\n          \"views\": 20\n        }\n      },\n      {\n        \"_id\": \"7e9e9f67-1d1b-4dbb-a833-06052cb89393\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"gamma logs\",\n          \"tag\": \"a\",\n          \"title\": \"C\",\n          \"views\": 30\n        }\n      },\n      {\n        \"_id\": \"f5644d8f-b189-4f4e-bbec-e5dbcc4ccaf8\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"delta agg\",\n          \"tag\": \"b\",\n          \"title\": \"D\",\n          \"views\": 40\n        }\n      }\n    ],\n    \"max_score\": 1,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "highlight + sort + _source",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"match\":{\"body\":\"vector\"}},\"highlight\":{\"fields\":{\"body\":{}}},\"sort\":[{\"views\":\"desc\"}],\"_source\":[\"title\",\"views\"]}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"a42a64ea-0f2c-44b2-b4af-3db93b145cf3\",\n        \"_index\": \"articles\",\n        \"_score\": 0.28768211603164673,\n        \"_source\": {\n          \"title\": \"A\",\n          \"views\": 10\n        },\n        \"sort\": [\n          10\n        ]\n      }\n    ],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 1\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 1\n}"
      }
    ]
  },
  {
    "id": "05-aggregations",
    "doc": "aggregations",
    "title": "Aggregations — the boardroom view",
    "steps": [
      {
        "label": "terms",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"by_tag\":{\"terms\":{\"field\":\"tag\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"by_tag\": {\n      \"buckets\": [\n        {\n          \"doc_count\": 2,\n          \"key\": \"a\"\n        },\n        {\n          \"doc_count\": 2,\n          \"key\": \"b\"\n        },\n        {\n          \"doc_count\": 1,\n          \"key\": \"intro\"\n        }\n      ],\n      \"doc_count_error_upper_bound\": 0,\n      \"sum_other_doc_count\": 0\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "stats",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"v\":{\"stats\":{\"field\":\"views\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"v\": {\n      \"avg\": 28.4,\n      \"count\": 5,\n      \"max\": 42,\n      \"min\": 10,\n      \"sum\": 142\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "sum / avg / max / min",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"s\":{\"sum\":{\"field\":\"views\"}},\"a\":{\"avg\":{\"field\":\"views\"}},\"mx\":{\"max\":{\"field\":\"views\"}},\"mn\":{\"min\":{\"field\":\"views\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"a\": {\n      \"value\": 28.4\n    },\n    \"mn\": {\n      \"value\": 10\n    },\n    \"mx\": {\n      \"value\": 42\n    },\n    \"s\": {\n      \"value\": 142\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "cardinality",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"uniq\":{\"cardinality\":{\"field\":\"tag\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"uniq\": {\n      \"value\": 3\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "value_count",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"c\":{\"value_count\":{\"field\":\"views\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"c\": {\n      \"value\": 5\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "histogram",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"h\":{\"histogram\":{\"field\":\"views\",\"interval\":10}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"h\": {\n      \"buckets\": [\n        {\n          \"doc_count\": 1,\n          \"key\": 10\n        },\n        {\n          \"doc_count\": 1,\n          \"key\": 20\n        },\n        {\n          \"doc_count\": 1,\n          \"key\": 30\n        },\n        {\n          \"doc_count\": 2,\n          \"key\": 40\n        }\n      ]\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "range",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"r\":{\"range\":{\"field\":\"views\",\"ranges\":[{\"to\":20},{\"from\":20}]}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"r\": {\n      \"buckets\": [\n        {\n          \"doc_count\": 1,\n          \"key\": \"*-20.0\",\n          \"to\": 20\n        },\n        {\n          \"doc_count\": 4,\n          \"from\": 20,\n          \"key\": \"20.0-*\"\n        }\n      ]\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "percentiles",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"p\":{\"percentiles\":{\"field\":\"views\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"p\": {\n      \"values\": {\n        \"1.0\": 10.4,\n        \"25.0\": 20,\n        \"5.0\": 12,\n        \"50.0\": 30,\n        \"75.0\": 40,\n        \"95.0\": 41.6,\n        \"99.0\": 41.92\n      }\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "terms + nested avg",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"by_tag\":{\"terms\":{\"field\":\"tag\"},\"aggs\":{\"avg_views\":{\"avg\":{\"field\":\"views\"}}}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"by_tag\": {\n      \"buckets\": [\n        {\n          \"avg_views\": {\n            \"value\": 20\n          },\n          \"doc_count\": 2,\n          \"key\": \"a\"\n        },\n        {\n          \"avg_views\": {\n            \"value\": 30\n          },\n          \"doc_count\": 2,\n          \"key\": \"b\"\n        },\n        {\n          \"avg_views\": {\n            \"value\": 42\n          },\n          \"doc_count\": 1,\n          \"key\": \"intro\"\n        }\n      ],\n      \"doc_count_error_upper_bound\": 0,\n      \"sum_other_doc_count\": 0\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      }
    ]
  },
  {
    "id": "06-vector-search",
    "doc": "vectors / playbooks/vector-search",
    "title": "Vector search — kNN, no Pinecone",
    "steps": [
      {
        "label": "create vector index",
        "cmd": "curl -s -XPUT \"http://localhost:9200/vstore\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"mappings\":{\"properties\":{\"text\":{\"type\":\"text\"},\"embedding\":{\"type\":\"dense_vector\",\"dims\":4}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"acknowledged\": true,\n  \"shards_acknowledged\": true,\n  \"index\": \"vstore\"\n}"
      },
      {
        "label": "bulk index vectors",
        "cmd": "curl -s -XPOST \"http://localhost:9200/vstore/_bulk\" \\\n  -H 'content-type: application/x-ndjson' \\\n  --data-binary $'{\"index\":{}}\\n{\"text\":\"red apple\",\"embedding\":[0.9,0.1,0.0,0.1]}\\n{\"index\":{}}\\n{\"text\":\"green pear\",\"embedding\":[0.1,0.9,0.1,0.0]}\\n{\"index\":{}}\\n{\"text\":\"blue car\",\"embedding\":[0.0,0.1,0.9,0.1]}\\n'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"errors\": false,\n  \"items\": [\n    {\n      \"index\": {\n        \"_id\": \"7cecbafd-9619-4452-ae2a-7d750fe23c9a\",\n        \"_index\": \"vstore\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459635957,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    },\n    {\n      \"index\": {\n        \"_id\": \"977f6978-af18-4919-8271-181518685d57\",\n        \"_index\": \"vstore\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459635958,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    },\n    {\n      \"index\": {\n        \"_id\": \"0a20a023-22db-4fc1-ba93-eb880ed9771a\",\n        \"_index\": \"vstore\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459635958,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    }\n  ],\n  \"took\": 0\n}"
      },
      {
        "label": "refresh",
        "cmd": "curl -s -XPOST \"http://localhost:9200/vstore/_refresh\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  }\n}"
      },
      {
        "label": "kNN nearest to [0.9,0.1,0,0.1]",
        "cmd": "curl -s -XPOST \"http://localhost:9200/vstore/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"knn\":{\"field\":\"embedding\",\"query_vector\":[0.9,0.1,0,0.1],\"k\":2,\"num_candidates\":10}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"7cecbafd-9619-4452-ae2a-7d750fe23c9a\",\n        \"_index\": \"vstore\",\n        \"_score\": 1,\n        \"_source\": {\n          \"embedding\": [\n            0.9,\n            0.1,\n            0,\n            0.1\n          ],\n          \"text\": \"red apple\"\n        }\n      },\n      {\n        \"_id\": \"977f6978-af18-4919-8271-181518685d57\",\n        \"_index\": \"vstore\",\n        \"_score\": 0.608433723449707,\n        \"_source\": {\n          \"embedding\": [\n            0.1,\n            0.9,\n            0.1,\n            0\n          ],\n          \"text\": \"green pear\"\n        }\n      }\n    ],\n    \"max_score\": 1,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 2\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      }
    ]
  },
  {
    "id": "07-analyzers",
    "doc": "analyzers",
    "title": "Analyzers — _analyze",
    "steps": [
      {
        "label": "standard analyzer",
        "cmd": "curl -s -XPOST \"http://localhost:9200/_analyze\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"analyzer\":\"standard\",\"text\":\"The Quick, Brown Fox!\"}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"tokens\": [\n    {\n      \"end_offset\": 3,\n      \"position\": 0,\n      \"start_offset\": 0,\n      \"token\": \"the\",\n      \"type\": \"word\"\n    },\n    {\n      \"end_offset\": 9,\n      \"position\": 1,\n      \"start_offset\": 4,\n      \"token\": \"quick\",\n      \"type\": \"word\"\n    },\n    {\n      \"end_offset\": 16,\n      \"position\": 2,\n      \"start_offset\": 11,\n      \"token\": \"brown\",\n      \"type\": \"word\"\n    },\n    {\n      \"end_offset\": 20,\n      \"position\": 3,\n      \"start_offset\": 17,\n      \"token\": \"fox\",\n      \"type\": \"word\"\n    }\n  ]\n}"
      },
      {
        "label": "keyword analyzer",
        "cmd": "curl -s -XPOST \"http://localhost:9200/_analyze\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"analyzer\":\"keyword\",\"text\":\"The Quick, Brown Fox!\"}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"tokens\": [\n    {\n      \"end_offset\": 21,\n      \"position\": 0,\n      \"start_offset\": 0,\n      \"token\": \"The Quick, Brown Fox!\",\n      \"type\": \"word\"\n    }\n  ]\n}"
      },
      {
        "label": "whitespace analyzer",
        "cmd": "curl -s -XPOST \"http://localhost:9200/_analyze\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"analyzer\":\"whitespace\",\"text\":\"The Quick, Brown Fox!\"}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"tokens\": [\n    {\n      \"end_offset\": 3,\n      \"position\": 0,\n      \"start_offset\": 0,\n      \"token\": \"The\",\n      \"type\": \"word\"\n    },\n    {\n      \"end_offset\": 10,\n      \"position\": 1,\n      \"start_offset\": 4,\n      \"token\": \"Quick,\",\n      \"type\": \"word\"\n    },\n    {\n      \"end_offset\": 16,\n      \"position\": 2,\n      \"start_offset\": 11,\n      \"token\": \"Brown\",\n      \"type\": \"word\"\n    },\n    {\n      \"end_offset\": 21,\n      \"position\": 3,\n      \"start_offset\": 17,\n      \"token\": \"Fox!\",\n      \"type\": \"word\"\n    }\n  ]\n}"
      }
    ]
  },
  {
    "id": "08-mappings-templates-aliases",
    "doc": "config / operations",
    "title": "Mappings, templates & aliases",
    "steps": [
      {
        "label": "get mapping",
        "cmd": "curl -s \"http://localhost:9200/articles/_mapping\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"articles\": {\n    \"mappings\": {\n      \"properties\": {\n        \"body\": {\n          \"type\": \"text\"\n        },\n        \"tag\": {\n          \"type\": \"keyword\"\n        },\n        \"title\": {\n          \"type\": \"text\"\n        },\n        \"views\": {\n          \"type\": \"integer\"\n        }\n      }\n    }\n  }\n}"
      },
      {
        "label": "put index template",
        "cmd": "curl -s -XPUT \"http://localhost:9200/_index_template/logs_tpl\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"index_patterns\":[\"logs-*\"],\"template\":{\"mappings\":{\"properties\":{\"@timestamp\":{\"type\":\"date\"},\"level\":{\"type\":\"keyword\"},\"msg\":{\"type\":\"text\"}}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"acknowledged\": true\n}"
      },
      {
        "label": "add alias",
        "cmd": "curl -s -XPOST \"http://localhost:9200/_aliases\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"actions\":[{\"add\":{\"index\":\"articles\",\"alias\":\"articles_live\"}}]}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"acknowledged\": true\n}"
      },
      {
        "label": "search via alias",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles_live/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"query\":{\"match_all\":{}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      }
    ]
  },
  {
    "id": "09-log-analytics",
    "doc": "playbooks/log-analytics",
    "title": "Log analytics — Splunk/Kibana workload",
    "steps": [
      {
        "label": "bulk ingest logs (template applies)",
        "cmd": "curl -s -XPOST \"http://localhost:9200/logs-2026-04/_bulk\" \\\n  -H 'content-type: application/x-ndjson' \\\n  --data-binary $'{\"index\":{}}\\n{\"@timestamp\":\"2026-04-26T19:47:24Z\",\"level\":\"info\",\"msg\":\"request ok\",\"svc\":\"api\"}\\n{\"index\":{}}\\n{\"@timestamp\":\"2026-04-26T19:47:24Z\",\"level\":\"error\",\"msg\":\"timeout\",\"svc\":\"api\"}\\n{\"index\":{}}\\n{\"@timestamp\":\"2026-04-26T19:47:24Z\",\"level\":\"error\",\"msg\":\"5xx upstream\",\"svc\":\"web\"}\\n{\"index\":{}}\\n{\"@timestamp\":\"2026-04-26T19:47:24Z\",\"level\":\"warn\",\"msg\":\"slow query\",\"svc\":\"db\"}\\n'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"errors\": false,\n  \"items\": [\n    {\n      \"index\": {\n        \"_id\": \"8d000f94-040f-4971-8ec3-6b93b509c57f\",\n        \"_index\": \"logs-2026-04\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459756501,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    },\n    {\n      \"index\": {\n        \"_id\": \"9136495b-1333-42ed-9c76-da68bd0906da\",\n        \"_index\": \"logs-2026-04\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459756502,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    },\n    {\n      \"index\": {\n        \"_id\": \"f89dd9bd-7061-4bf7-a7ee-e24e991f9cab\",\n        \"_index\": \"logs-2026-04\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459756502,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    },\n    {\n      \"index\": {\n        \"_id\": \"3c49c542-2044-4bcc-a1e1-966bff3ebbba\",\n        \"_index\": \"logs-2026-04\",\n        \"_primary_term\": 1,\n        \"_seq_no\": 1782855459756502,\n        \"_shards\": {\n          \"failed\": 0,\n          \"successful\": 1,\n          \"total\": 1\n        },\n        \"_version\": 1,\n        \"result\": \"created\",\n        \"status\": 201\n      }\n    }\n  ],\n  \"took\": 1\n}"
      },
      {
        "label": "refresh",
        "cmd": "curl -s -XPOST \"http://localhost:9200/logs-2026-04/_refresh\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  }\n}"
      },
      {
        "label": "errors only (bool filter)",
        "cmd": "curl -s -XPOST \"http://localhost:9200/logs-2026-04/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"term\":{\"level\":\"error\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"9136495b-1333-42ed-9c76-da68bd0906da\",\n        \"_index\": \"logs-2026-04\",\n        \"_score\": 1.6931471824645996,\n        \"_source\": {\n          \"@timestamp\": \"2026-04-26T19:47:24Z\",\n          \"level\": \"error\",\n          \"msg\": \"timeout\",\n          \"svc\": \"api\"\n        }\n      },\n      {\n        \"_id\": \"f89dd9bd-7061-4bf7-a7ee-e24e991f9cab\",\n        \"_index\": \"logs-2026-04\",\n        \"_score\": 1.6931471824645996,\n        \"_source\": {\n          \"@timestamp\": \"2026-04-26T19:47:24Z\",\n          \"level\": \"error\",\n          \"msg\": \"5xx upstream\",\n          \"svc\": \"web\"\n        }\n      }\n    ],\n    \"max_score\": 1.6931471824645996,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 2\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "count by level",
        "cmd": "curl -s -XPOST \"http://localhost:9200/logs-2026-04/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"aggs\":{\"by_level\":{\"terms\":{\"field\":\"level\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"by_level\": {\n      \"buckets\": [\n        {\n          \"doc_count\": 2,\n          \"key\": \"error\"\n        },\n        {\n          \"doc_count\": 1,\n          \"key\": \"info\"\n        },\n        {\n          \"doc_count\": 1,\n          \"key\": \"warn\"\n        }\n      ],\n      \"doc_count_error_upper_bound\": 0,\n      \"sum_other_doc_count\": 0\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 4\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "errors over time (date_histogram)",
        "cmd": "curl -s -XPOST \"http://localhost:9200/logs-2026-04/_search\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":0,\"query\":{\"term\":{\"level\":\"error\"}},\"aggs\":{\"t\":{\"date_histogram\":{\"field\":\"@timestamp\",\"calendar_interval\":\"day\"}}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"aggregations\": {\n    \"t\": {\n      \"buckets\": [\n        {\n          \"doc_count\": 2,\n          \"key\": 1777161600000,\n          \"key_as_string\": \"2026-04-26T00:00:00.000Z\"\n        }\n      ]\n    }\n  },\n  \"hits\": {\n    \"hits\": [],\n    \"max_score\": null,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 2\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      }
    ]
  },
  {
    "id": "10-migration-es",
    "doc": "migration-from-es",
    "title": "Migration from Elasticsearch — drop-in parity",
    "steps": [
      {
        "label": "ES version handshake (Kibana checks this)",
        "cmd": "curl -s \"http://localhost:9200/\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"name\": \"local\",\n  \"cluster_name\": \"xerj\",\n  \"cluster_uuid\": \"xerj-cluster-0000-0000-0000-000000000000\",\n  \"version\": {\n    \"number\": \"8.13.0\",\n    \"build_flavor\": \"default\",\n    \"build_type\": \"tar\",\n    \"build_hash\": \"00000000\",\n    \"build_date\": \"2024-03-22T00:00:00.000Z\",\n    \"build_snapshot\": false,\n    \"lucene_version\": \"9.10.0\",\n    \"minimum_wire_compatibility_version\": \"7.17.0\",\n    \"minimum_index_compatibility_version\": \"7.0.0\"\n  },\n  \"tagline\": \"You Know, for Search\"\n}"
      },
      {
        "label": "_cat/indices (ops tooling)",
        "cmd": "curl -s \"http://localhost:9200/_cat/indices?v\"",
        "status": 200,
        "pass": true,
        "output": "green open .xerj_views 88ea9cae-3df7-4f1d-b072-74f3bdd26b5c 1 0 0 0 256b 256b\ngreen open vstore 6c200616-e5f0-4563-b875-1a71986545c3 1 0 3 0 4243b 4243b\ngreen open .xerj_passkeys bf5550cb-15ed-4093-8f5d-b2acf766cc77 1 0 0 0 256b 256b\ngreen open .xerj_sessions 6fe9df8f-ec2c-4751-ae2a-a174d785381c 1 0 0 0 256b 256b\ngreen open .xerj_dashboards c3e392d9-5cce-4ff5-9378-d02fb278b944 1 0 0 0 256b 256b\ngreen open articles f85ec8d5-6479-414c-ab9d-3b96be5c93d6 1 0 5 0 8284b 8284b\ngreen open .xerj_idp_config e2f73d10-a34a-4d3a-99f9-1e889e6879cc 1 0 0 0 256b 256b\ngreen open .xerj_alert_rules fda69083-2c9d-4d86-9b69-e7f0a16c6106 1 0 0 0 256b 256b\ngreen open .xerj_connections 586631c4-bd3a-4b7e-92ad-cf1fa60b154b 1 0 0 0 256b 256b\ngreen open .xerj_cluster_state 5c6795d4-4d5a-464b-ac6c-1e1d33c6ffe6 1 0 0 0 256b 256b\ngreen open .xerj_alert_fires 8d7b04ae-e58b-457d-9cac-75727e453634 1 0 0 0 256b 256b\ngreen open logs-2026-04 1db6bbeb-3fc7-491d-8ce0-9946da6b0df2 1 0 4 0 7117b 7117b\ngreen open .xerj_prefs a0b01d2c-bfe4-4ffb-b5ad-aab1b14a8281 1 0 0 0 256b 256b\ngreen open .xerj_magic_links f58ea8a1-05f4-4f0a-84a3-1334883d21e2 1 0 1 0 3429b 3429b\ngreen open .xerj_users c6625bf8-6ad4-4b4b-b2f2-48bbeb0c086a 1 0 0 0 256b 256b\ngreen open bench 057c0c46-2124-4f3a-a6c7-a0345fc702ac 1 0 4008 0 849235b 849235b\ngreen open .xerj_audit 13237196-6c09-45fb-b301-e182a6152954 1 0 0 0 256b 256b\ngreen open .xerj_api_tokens f0c654d0-98dc-460e-936b-0e40071cf989 1 0 0 0 256b 256b"
      },
      {
        "label": "scroll API (pagination)",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_search?scroll=1m\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"size\":2,\"query\":{\"match_all\":{}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"_scroll_id\": \"7cf46fb4-d1dc-4b79-9e1a-2b044113c384\",\n  \"_shards\": {\n    \"failed\": 0,\n    \"skipped\": 0,\n    \"successful\": 1,\n    \"total\": 1\n  },\n  \"hits\": {\n    \"hits\": [\n      {\n        \"_id\": \"1\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"one binary for search\",\n          \"tag\": \"intro\",\n          \"title\": \"Hello Xerj\",\n          \"views\": 42\n        }\n      },\n      {\n        \"_id\": \"a42a64ea-0f2c-44b2-b4af-3db93b145cf3\",\n        \"_index\": \"articles\",\n        \"_score\": 1,\n        \"_source\": {\n          \"body\": \"alpha vector\",\n          \"tag\": \"a\",\n          \"title\": \"A\",\n          \"views\": 10\n        }\n      }\n    ],\n    \"max_score\": 1,\n    \"total\": {\n      \"relation\": \"eq\",\n      \"value\": 5\n    }\n  },\n  \"timed_out\": false,\n  \"took\": 0\n}"
      },
      {
        "label": "_delete_by_query",
        "cmd": "curl -s -XPOST \"http://localhost:9200/articles/_delete_by_query\" \\\n  -H 'content-type: application/json' \\\n  -d '{\"query\":{\"term\":{\"tag\":\"b\"}}}'",
        "status": 200,
        "pass": true,
        "output": "{\n  \"batches\": 1,\n  \"deleted\": 2,\n  \"failures\": [],\n  \"noops\": 0,\n  \"requests_per_second\": -1,\n  \"throttled_millis\": 0,\n  \"throttled_until_millis\": 0,\n  \"timed_out\": false,\n  \"took\": 0,\n  \"total\": 2,\n  \"version_conflicts\": 0\n}"
      }
    ]
  },
  {
    "id": "11-native-ops",
    "doc": "metrics / operations / api-native",
    "title": "Native ops API (:8080) — health, metrics, flush, backup",
    "steps": [
      {
        "label": "native health",
        "cmd": "curl -s \"http://localhost:8080/v1/health\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"data\": {\n    \"status\": \"yellow\",\n    \"index_count\": 18,\n    \"total_docs\": 4019,\n    \"version\": \"1.0.0-rc.1\"\n  },\n  \"took_ms\": 0,\n  \"request_id\": \"1ef5f338-8e17-4efc-aeb5-e65ea0659b29\"\n}"
      },
      {
        "label": "readiness probe",
        "cmd": "curl -s \"http://localhost:8080/v1/health/ready\"",
        "status": 200,
        "pass": true,
        "output": "ready"
      },
      {
        "label": "prometheus scrape",
        "cmd": "curl -s \"http://localhost:8080/v1/metrics\"",
        "status": 200,
        "pass": true,
        "output": "# HELP xerj_active_searches Number of searches currently in flight\n# TYPE xerj_active_searches gauge\nxerj_active_searches 0\n# HELP xerj_bytes_read_total Total bytes read from segment files (uncompressed)\n# TYPE xerj_bytes_read_total counter\nxerj_bytes_read_total 0\n# HELP xerj_bytes_written_total Total bytes written to segment files (uncompressed)\n# TYPE xerj_bytes_written_total counter\nxerj_bytes_written_total 0\n# HELP xerj_doc_count Total live documents across all indices\n# TYPE xerj_doc_count gauge\nxerj_doc_count 0\n# HELP xerj_docs_indexed_by_index_total Documents indexed, labelled by index name\n# TYPE xerj_docs_indexed_by_index_total counter\nxerj_docs_indexed_by_index_total{index=\"articles\"} 1\n# HELP xerj_docs_indexed_total Total number of documents successfully indexed\n# TYPE xerj_docs_indexed_total counter\nxerj_docs_indexed_total 1\n# HELP xerj_flush_duration_seconds Time to flush an in-memory buffer to a segment\n# TYPE xerj_flush_duration_seconds histogram\nxerj_flush_duration_seconds_bucket{le=\"0.01\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.02\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.04\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.08\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.16\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.32\"} 0\nxerj_flush_duration_seconds_bucket{le=\"0.64\"} 0\nxerj_flush_duration_seconds_bucket{le=\"1.28\"} 0\nxerj_flush_duration_seconds_bucket{le=\"2.56\"} 0\nxerj_flush_duration_seconds_bucket{le=\"5.12\"} 0\nxerj_flush_duration_seconds_bucket{le=\"10.24\"} 0\nxerj_flush_duration_seconds_bucket{le=\"20.48\"} 0\nxerj_flush_duration_seconds_bucket{le=\"40.96\"} 0\nxerj_flush_duration_seconds_bucket{le=\"81.92\"} 0\nxerj_flush_duration_seconds_bucket{le=\"163.84\"} 0\nxerj_flush_duration_seconds_bucket{le=\"+Inf\"} 0\nxerj_flush_duration_seconds_sum 0\nxerj_flush_duration_seconds_count 0\n# HELP xerj_index_latency_seconds End-to-end document indexing latency\n# TYPE xerj_index_latency_seconds histogram\nxerj_index_latency_seconds_bucket{le=\"0.0005\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.001\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.002\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.004\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.008\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.016\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.032\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.064\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.128\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.256\"} 0\nxerj_index_latency_seconds_bucket{le=\"0.512\"} 0\nxerj_index_latency_seconds_bucket{le=\"1.024\"} 0\nxerj_index_latency_seconds_bucket{le=\"2.048\"} 0\nxerj_index_latency_seconds_bucket{le=\"4.096\"} 0\nxerj_index_latency_seconds_bucket{le=\"8.192\"} 0\nxerj_index_latency_seconds_bucket{le=\"+Inf\"} 0\nxerj_index_latency_seconds_sum 0\nxerj_index_latency_seconds_count 0\n# HELP xerj_memory_usage_bytes Approximate engine memory usage in bytes\n# TYPE xerj_memory_usage_bytes gauge\nxerj_memory_usage_bytes 0\n# HELP xerj_merge_duration_seconds Time to complete a segment merge operation\n# TYPE xerj_merge_duration_seconds histogram\nxerj_merge_duration_seconds_bucket{le=\"0.01\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.02\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.04\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.08\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.16\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.32\"} 0\nxerj_merge_duration_seconds_bucket{le=\"0.64\"} 0\nxerj_merge_duration_seconds_bucket{le=\"1.28\"} 0\nxerj_merge_duration_seconds_bucket{le=\"2.56\"} 0\nxerj_merge_duration_seconds_bucket{le=\"5.12\"} 0\nxerj_merge_duration_seconds_bucket{le=\"10.24\"} 0\nxerj_merge_duration_seconds_bucket{le=\"20.48\"} 0\nxerj_merge_duration_seconds_bucket{le=\"40.96\"} 0\nxerj_merge_duration_seconds_bucket{le=\"81.92\"} 0\nxerj_merge_duration_seconds_bucket{le=\"163.84\"} 0\nxerj_merge_duration_seconds_bucket{le=\"+Inf\"} 0\nxerj_merge_duration_seconds_sum 0\nxerj_merge_duration_seconds_count 0\n# HELP xerj_queries_by_index_total Queries executed, labelled by index name\n# TYPE xerj_queries_by_index_total counter\nxerj_queries_by_index_total{index=\"articles\"} 21\nxerj_queries_by_index_total{index=\"articles_live\"} 1\nxerj_queries_by_index_total{index=\"logs-2026-04\"} 3\nxerj_queries_by_index_total{index=\"vstore\"} 1\n# HELP xerj_queries_executed_total Total number of search queries executed\n# TYPE xerj_queries_executed_total counter\nxerj_queries_executed_total 26\n# HELP xerj_query_latency_seconds End-to-end query latency\n# TYPE xerj_query_latency_seconds histogram\nxerj_query_latency_seconds_bucket{le=\"0.0005\"} 22\nxerj_query_latency_seconds_bucket{le=\"0.001\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.002\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.004\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.008\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.016\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.032\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.064\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.128\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.256\"} 26\nxerj_query_latency_seconds_bucket{le=\"0.512\"} 26\nxerj_query_latency_seconds_bucket{le=\"1.024\"} 26\nxerj_query_latency_seconds_bucket{le=\"2.048\"} 26\nxerj_query_latency_seconds_bucket{le=\"4.096\"} 26\nxerj_query_latency_seconds_bucket{le=\"8.192\"} 26\nxerj_query_latency_seconds_bucket{le=\"+Inf\"} 26\nxerj_query_latency_seconds_sum 0.004\nxerj_query_latency_seconds_count 26\n# HELP xerj_segment_count Number of open segments across all indices\n# TYPE xerj_segment_count gauge\nxerj_segment_count 0\n# HELP xerj_wal_size_bytes Current WAL size on disk in bytes\n# TYPE xerj_wal_size_bytes gauge\nxerj_wal_size_bytes 0\n# HELP xerj_wal_write_latency_seconds WAL write latency\n# TYPE xerj_wal_write_latency_seconds histogram\nxerj_wal_write_latency_seconds_bucket{le=\"0.0005\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.001\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.002\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.004\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.008\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.016\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.032\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.064\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.128\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.256\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"0.512\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"1.024\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"2.048\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"4.096\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"8.192\"} 0\nxerj_wal_write_latency_seconds_bucket{le=\"+Inf\"} 0\nxerj_wal_write_latency_seconds_sum 0\nxerj_wal_write_latency_seconds_count 0"
      },
      {
        "label": "cluster health",
        "cmd": "curl -s \"http://localhost:8080/v1/cluster/health\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"data\": {\n    \"cluster_name\": \"xerj\",\n    \"index_count\": 18,\n    \"number_of_data_nodes\": 1,\n    \"number_of_nodes\": 1,\n    \"status\": \"yellow\",\n    \"total_docs\": 4019,\n    \"version\": \"1.0.0-rc.1\"\n  },\n  \"took_ms\": 0,\n  \"request_id\": \"e7062a6a-6dd2-4ff6-bad9-bab8494aae7b\"\n}"
      },
      {
        "label": "cluster-wide flush",
        "cmd": "curl -s -XPOST \"http://localhost:8080/v1/admin/flush\"",
        "status": 200,
        "pass": true,
        "output": "{\n  \"data\": {\n    \"failed\": [],\n    \"flushed\": 18,\n    \"indices\": [\n      \".xerj_views\",\n      \"vstore\",\n      \".xerj_passkeys\",\n      \".xerj_sessions\",\n      \".xerj_dashboards\",\n      \"articles\",\n      \".xerj_idp_config\",\n      \".xerj_alert_rules\",\n      \".xerj_connections\",\n      \".xerj_cluster_state\",\n      \".xerj_alert_fires\",\n      \"logs-2026-04\",\n      \".xerj_prefs\",\n      \".xerj_magic_links\",\n      \".xerj_users\",\n      \"bench\",\n      \".xerj_audit\",\n      \".xerj_api_tokens\"\n    ]\n  },\n  \"took_ms\": 10,\n  \"request_id\": \"74f4f01e-cbe2-4771-b527-128965b2e7a9\"\n}"
      },
      {
        "label": "backup (snapshot to disk)",
        "cmd": "curl -s -XPOST \"http://localhost:8080/v1/admin/backup\" \\\n  -H 'content-type: application/json' \\\n  -d '{}'",
        "status": 201,
        "pass": true,
        "output": "{\n  \"data\": {\n    \"backup\": \"backup-364d1962-f061-441c-8087-64ef74709587\",\n    \"manifest\": {\n      \"duration_in_millis\": 0,\n      \"end_time_in_millis\": 1782855459954,\n      \"failures\": [],\n      \"index_files\": [\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_views\"\n        },\n        {\n          \"files\": [\n            \"ids.json\",\n            \"graph.bin\",\n            \"snapshot.json\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.text.norms\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.text.meta\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.embedding.norms\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.embedding.meta\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.text.fst\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.text.norms\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.embedding.norms\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.embedding.fst\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.text.post\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.text.meta\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.embedding.meta\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.embedding.post\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.text.norms\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.embedding.norms\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.text.meta\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.embedding.meta\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.dv\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.text.fst\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.embedding.fst\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.text.fst\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.embedding.fst\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.text.post\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.embedding.post\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.text.post\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.embedding.post\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.dv\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.dv\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.ids\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.ids\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.sidx\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.sidx\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.ids\",\n            \"0f0223e7-97d4-4038-9f94-6f7245712d16.seg\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.sidx\",\n            \"992f1fd1-c1e5-4640-907b-c32b48d13ad9.seg\",\n            \"ba4e348f-a435-4f9a-97dd-1b8a040af065.seg\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \"vstore\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_passkeys\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_sessions\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_dashboards\"\n        },\n        {\n          \"files\": [\n            \"snapshot.json\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.views.norms\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.views.meta\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.title.norms\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.tag.norms\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.title.meta\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.tag.meta\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.body.norms\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.body.meta\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.title.norms\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.title.meta\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.body.norms\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.body.meta\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.views.norms\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.views.meta\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.tag.norms\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.title.fst\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.views.fst\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.body.fst\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.tag.fst\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.body.fst\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.tag.meta\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.title.fst\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.title.post\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.views.fst\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.views.post\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.body.post\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.tag.post\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.body.post\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.body.norms\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.views.norms\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.title.post\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.tag.fst\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.views.post\",\n            \"7e240b49-439f-4b58-8470-298328431726.body.norms\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.body.meta\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.views.meta\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.tag.post\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.title.norms\",\n            \"7e240b49-439f-4b58-8470-298328431726.body.meta\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.title.meta\",\n            \"7e240b49-439f-4b58-8470-298328431726.tag.norms\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.tag.norms\",\n            \"7e240b49-439f-4b58-8470-298328431726.views.norms\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.views.norms\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.tag.meta\",\n            \"7e240b49-439f-4b58-8470-298328431726.title.norms\",\n            \"7e240b49-439f-4b58-8470-298328431726.tag.meta\",\n            \"7e240b49-439f-4b58-8470-298328431726.views.meta\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.views.meta\",\n            \"7e240b49-439f-4b58-8470-298328431726.title.meta\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.tag.norms\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.title.norms\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.body.norms\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.tag.meta\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.dv\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.title.meta\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.body.fst\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.views.fst\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.body.meta\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.tag.fst\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.title.fst\",\n            \"7e240b49-439f-4b58-8470-298328431726.tag.fst\",\n            \"7e240b49-439f-4b58-8470-298328431726.body.fst\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.dv\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.views.fst\",\n            \"7e240b49-439f-4b58-8470-298328431726.title.fst\",\n            \"7e240b49-439f-4b58-8470-298328431726.views.fst\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.body.post\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.views.post\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.tag.post\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.title.post\",\n            \"7e240b49-439f-4b58-8470-298328431726.tag.post\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.tag.fst\",\n            \"7e240b49-439f-4b58-8470-298328431726.body.post\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.title.fst\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.views.post\",\n            \"7e240b49-439f-4b58-8470-298328431726.title.post\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.body.fst\",\n            \"7e240b49-439f-4b58-8470-298328431726.views.post\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.title.post\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.tag.post\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.body.post\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.dv\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.dv\",\n            \"7e240b49-439f-4b58-8470-298328431726.dv\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.ids\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.ids\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.ids\",\n            \"7e240b49-439f-4b58-8470-298328431726.ids\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.ids\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.sidx\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.sidx\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.sidx\",\n            \"7e240b49-439f-4b58-8470-298328431726.sidx\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.sidx\",\n            \"bc7d955f-508b-4970-b7b7-d12beceedc72.seg\",\n            \"e616caaf-58a8-459e-93fa-af13cc582c52.seg\",\n            \"44bde3f1-b1ed-4f81-a546-4e3c31c4ae26.seg\",\n            \"7e240b49-439f-4b58-8470-298328431726.seg\",\n            \"33f422f5-e0ff-4565-9670-5be3d5a6c12f.seg\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000002.wchk\",\n            \"0000000000000002.wal\",\n            \"0000000000000002.wchk\",\n            \"0000000000000002.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \"articles\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_idp_config\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_alert_rules\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_connections\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_cluster_state\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_alert_fires\"\n        },\n        {\n          \"files\": [\n            \"snapshot.json\",\n            \"schema.json\",\n            \"[email protected]\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.svc.norms\",\n            \"[email protected]\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.svc.meta\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.level.norms\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.level.meta\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.msg.norms\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.msg.meta\",\n            \"[email protected]\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.svc.fst\",\n            \"[email protected]\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.msg.norms\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.level.norms\",\n            \"[email protected]\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.svc.post\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.msg.meta\",\n            \"[email protected]\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.level.fst\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.level.meta\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.msg.fst\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.level.norms\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.level.post\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.msg.post\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.level.meta\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.msg.norms\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.msg.meta\",\n            \"[email protected]\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.svc.norms\",\n            \"[email protected]\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.svc.norms\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.svc.meta\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.svc.meta\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.dv\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.msg.fst\",\n            \"[email protected]\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.level.fst\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.svc.fst\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.msg.post\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.level.fst\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.level.post\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.svc.fst\",\n            \"[email protected]\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.msg.fst\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.svc.post\",\n            \"[email protected]\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.level.post\",\n            \"[email protected]\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.svc.post\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.msg.post\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.dv\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.dv\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.ids\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.sidx\",\n            \"c8248754-0861-4044-9ca8-c553970a2a79.seg\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.ids\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.ids\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.sidx\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.sidx\",\n            \"e138c664-cfd8-4afb-9a34-19ac23ca4c15.seg\",\n            \"14d74bef-c13b-4106-ab8e-c40b40ffa76d.seg\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \"logs-2026-04\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_prefs\"\n        },\n        {\n          \"files\": [\n            \"snapshot.json\",\n            \"schema.json\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.expires_at.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.created_by.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.expires_at.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.created_by.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.role.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.role.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.purpose.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.purpose.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.created_at.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.user_id.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.created_at.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.user_id.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.used_at.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.used_at.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.used_from_ip.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.email.norms\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.used_from_ip.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.email.meta\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.expires_at.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.role.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.created_at.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.created_by.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.expires_at.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.role.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.created_at.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.created_by.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.used_at.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.user_id.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.purpose.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.used_at.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.user_id.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.purpose.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.used_from_ip.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.used_from_ip.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.email.fst\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.email.post\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.dv\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.ids\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.sidx\",\n            \"101ad07b-7017-4560-82c6-d224eda63b0c.seg\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_magic_links\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_users\"\n        },\n        {\n          \"files\": [\n            \"snapshot.json\",\n            \"schema.json\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.cost_usd.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.prompt_tokens.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.cost_usd.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.prompt_tokens.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.latency_ms.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.latency_ms.meta\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.context_tokens.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.completion_tokens.norms\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.prompt_tokens.norms\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.context_tokens.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.completion_tokens.meta\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.prompt_tokens.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.model.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.model.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.prompt_tokens.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.latency_ms.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.prompt_tokens.post\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.cost_usd.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.latency_ms.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.latency_ms.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.cost_usd.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.cost_usd.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.completion_tokens.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.top_doc.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.latency_ms.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.cost_usd.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.completion_tokens.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.completion_tokens.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.model.fst\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.top_doc.meta\",\n            \"[email protected]\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.context_tokens.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.intent.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.model.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.context_tokens.fst\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.status.norms\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.prompt_tokens.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.top_doc.norms\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.status.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.context_tokens.meta\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.tenant.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.cache_hit.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.intent.meta\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.latency_ms.fst\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.top_doc.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.cost_usd.fst\",\n            \"[email protected]\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.cost_usd.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.context_tokens.post\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.status.meta\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.prompt_tokens.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.model.norms\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.top_doc.meta\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.status.meta\",\n            \"[email protected]\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.tenant.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.cache_hit.meta\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.completion_tokens.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.tenant.norms\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.latency_ms.post\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.top_doc.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.intent.norms\",\n            \"[email protected]\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.model.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.tenant.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.completion_tokens.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.tenant.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.intent.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.intent.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.tenant.post\",\n            \"[email protected]\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.context_tokens.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.cost_usd.norms\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.cache_hit.fst\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.status.fst\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.intent.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.top_doc.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.cache_hit.norms\",\n            \"[email protected]\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.model.fst\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.context_tokens.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.cost_usd.meta\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.cache_hit.post\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.status.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.completion_tokens.norms\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.top_doc.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.cache_hit.meta\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.model.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.intent.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.completion_tokens.meta\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.status.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.intent.post\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.completion_tokens.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.status.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.tenant.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.cache_hit.fst\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.tenant.post\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.cache_hit.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.context_tokens.norms\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.context_tokens.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.cost_usd.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.latency_ms.norms\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.cost_usd.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.prompt_tokens.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.latency_ms.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.prompt_tokens.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.top_doc.norms\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.latency_ms.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.completion_tokens.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.prompt_tokens.norms\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.top_doc.meta\",\n            \"[email protected]\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.latency_ms.meta\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.completion_tokens.meta\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.prompt_tokens.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.tenant.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.context_tokens.norms\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.cache_hit.norms\",\n            \"[email protected]\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.cache_hit.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.tenant.meta\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.context_tokens.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.context_tokens.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.context_tokens.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.prompt_tokens.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.prompt_tokens.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.cost_usd.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.cost_usd.post\",\n            \"[email protected]\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.cost_usd.fst\",\n            \"[email protected]\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.completion_tokens.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.cost_usd.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.model.norms\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.latency_ms.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.prompt_tokens.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.context_tokens.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.latency_ms.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.completion_tokens.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.completion_tokens.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.intent.norms\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.model.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.latency_ms.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.prompt_tokens.post\",\n            \"[email protected]\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.context_tokens.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.top_doc.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.latency_ms.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.model.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.completion_tokens.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.intent.meta\",\n            \"[email protected]\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.top_doc.meta\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.intent.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.model.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.top_doc.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.status.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.tenant.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.status.norms\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.intent.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.model.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.top_doc.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.status.meta\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.tenant.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.intent.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.status.meta\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.cache_hit.norms\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.tenant.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.model.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.top_doc.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.intent.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.model.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.cache_hit.meta\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.tenant.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.top_doc.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.cache_hit.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.model.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.status.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.intent.fst\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.cache_hit.post\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.status.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.intent.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.tenant.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.tenant.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.status.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.cache_hit.fst\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.status.post\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.cache_hit.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.context_tokens.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.context_tokens.meta\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.cache_hit.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.cache_hit.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.completion_tokens.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.cost_usd.norms\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.completion_tokens.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.context_tokens.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.latency_ms.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.cost_usd.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.context_tokens.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.latency_ms.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.prompt_tokens.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.completion_tokens.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.cost_usd.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.prompt_tokens.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.completion_tokens.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.latency_ms.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.cost_usd.meta\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.context_tokens.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.latency_ms.meta\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.context_tokens.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.cost_usd.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.cost_usd.meta\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.top_doc.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.top_doc.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.completion_tokens.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.completion_tokens.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.intent.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.intent.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.top_doc.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.context_tokens.fst\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.cost_usd.fst\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.latency_ms.fst\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.top_doc.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.model.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.context_tokens.post\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.prompt_tokens.fst\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.cost_usd.post\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.tenant.norms\",\n            \"[email protected]\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.completion_tokens.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.completion_tokens.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.top_doc.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.status.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.latency_ms.post\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.cache_hit.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.model.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.prompt_tokens.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.prompt_tokens.post\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.tenant.meta\",\n            \"[email protected]\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.completion_tokens.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.completion_tokens.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.top_doc.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.status.meta\",\n            \"[email protected]\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.cache_hit.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.top_doc.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.prompt_tokens.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.cost_usd.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.context_tokens.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.top_doc.norms\",\n            \"[email protected]\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.intent.fst\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.model.fst\",\n            \"[email protected]\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.top_doc.post\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.tenant.fst\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.status.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.cost_usd.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.context_tokens.post\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.cache_hit.fst\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.model.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.top_doc.meta\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.intent.post\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.model.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.latency_ms.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.model.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.tenant.post\",\n            \"[email protected]\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.completion_tokens.fst\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.status.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.intent.norms\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.cache_hit.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.model.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.prompt_tokens.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.model.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.latency_ms.post\",\n            \"[email protected]\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.model.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.completion_tokens.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.tenant.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.intent.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.status.norms\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.model.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.cache_hit.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.prompt_tokens.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.model.meta\",\n            \"[email protected]\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.top_doc.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.intent.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.latency_ms.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.tenant.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.status.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.model.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.cache_hit.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.status.norms\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.prompt_tokens.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.top_doc.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.intent.meta\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.latency_ms.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.intent.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.context_tokens.norms\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.model.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.status.meta\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.prompt_tokens.meta\",\n            \"[email protected]\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.intent.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.tenant.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.status.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.model.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.context_tokens.meta\",\n            \"[email protected]\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.cache_hit.fst\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.tenant.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.status.post\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.cache_hit.post\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.cost_usd.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.cost_usd.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.prompt_tokens.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.prompt_tokens.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.latency_ms.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.latency_ms.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.context_tokens.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.context_tokens.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.cost_usd.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.cost_usd.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.completion_tokens.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.completion_tokens.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.prompt_tokens.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.prompt_tokens.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.latency_ms.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.context_tokens.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.latency_ms.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.context_tokens.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.completion_tokens.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.completion_tokens.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.top_doc.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.tenant.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.top_doc.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.tenant.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.model.norms\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.model.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.model.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.intent.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.model.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.intent.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.tenant.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.prompt_tokens.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.tenant.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.latency_ms.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.prompt_tokens.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.prompt_tokens.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.top_doc.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.latency_ms.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.model.fst\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.cache_hit.norms\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.prompt_tokens.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.top_doc.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.cache_hit.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.model.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.latency_ms.norms\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.status.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.top_doc.norms\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.latency_ms.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.status.post\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.cache_hit.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.top_doc.meta\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.cache_hit.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.status.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.status.meta\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.intent.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.intent.meta\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.prompt_tokens.norms\",\n            \"[email protected]\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.tenant.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.prompt_tokens.meta\",\n            \"[email protected]\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.tenant.meta\",\n            \"[email protected]\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.context_tokens.fst\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.cost_usd.norms\",\n            \"[email protected]\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.cost_usd.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.top_doc.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.prompt_tokens.fst\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.prompt_tokens.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.top_doc.meta\",\n            \"[email protected]\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.cost_usd.fst\",\n            \"[email protected]\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.cost_usd.post\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.cache_hit.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.completion_tokens.fst\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.cache_hit.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.tenant.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.completion_tokens.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.tenant.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.latency_ms.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.cache_hit.fst\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.tenant.fst\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.latency_ms.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.cache_hit.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.tenant.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.top_doc.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.context_tokens.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.context_tokens.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.top_doc.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.context_tokens.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.context_tokens.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.cost_usd.norms\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.cost_usd.meta\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.completion_tokens.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.status.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.completion_tokens.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.prompt_tokens.fst\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.status.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.latency_ms.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.prompt_tokens.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.latency_ms.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.intent.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.intent.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.status.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.cost_usd.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.status.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.model.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.cost_usd.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.model.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.context_tokens.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.context_tokens.fst\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.context_tokens.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.context_tokens.post\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.intent.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.context_tokens.norms\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.intent.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.context_tokens.meta\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.cost_usd.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.cache_hit.norms\",\n            \"[email protected]\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.cost_usd.meta\",\n            \"[email protected]\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.cache_hit.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.cost_usd.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.cost_usd.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.top_doc.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.top_doc.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.context_tokens.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.context_tokens.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.prompt_tokens.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.intent.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.prompt_tokens.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.completion_tokens.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.intent.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.completion_tokens.post\",\n            \"[email protected]\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.latency_ms.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.cost_usd.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.completion_tokens.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.tenant.fst\",\n            \"[email protected]\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.latency_ms.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.cost_usd.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.completion_tokens.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.tenant.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.latency_ms.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.model.norms\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.intent.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.latency_ms.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.intent.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.model.meta\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.tenant.norms\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.status.norms\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.tenant.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.cache_hit.norms\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.top_doc.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.status.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.cache_hit.meta\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.top_doc.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.model.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.model.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.model.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.intent.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.tenant.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.model.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.intent.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.status.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.cache_hit.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.cache_hit.fst\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.tenant.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.status.fst\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.status.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.cache_hit.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.cache_hit.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.status.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.context_tokens.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.context_tokens.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.cost_usd.norms\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.cost_usd.meta\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.latency_ms.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.cost_usd.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.context_tokens.norms\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.latency_ms.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.cost_usd.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.context_tokens.meta\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.latency_ms.norms\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.latency_ms.meta\",\n            \"[email protected]\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.completion_tokens.norms\",\n            \"[email protected]\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.completion_tokens.meta\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.dv\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.cost_usd.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.cost_usd.post\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.cache_hit.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.cost_usd.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.cost_usd.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.context_tokens.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.prompt_tokens.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.status.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.completion_tokens.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.top_doc.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.context_tokens.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.prompt_tokens.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.status.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.completion_tokens.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.top_doc.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.tenant.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.tenant.meta\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.status.norms\",\n            \"[email protected]\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.status.meta\",\n            \"[email protected]\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.status.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.prompt_tokens.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.status.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.context_tokens.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.cost_usd.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.prompt_tokens.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.completion_tokens.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.context_tokens.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.cost_usd.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.top_doc.norms\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.intent.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.completion_tokens.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.tenant.norms\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.top_doc.meta\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.intent.meta\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.tenant.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.intent.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.intent.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.tenant.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.tenant.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.status.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.intent.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.status.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.intent.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.tenant.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.tenant.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.status.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.cache_hit.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.status.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.intent.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.cache_hit.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.model.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.intent.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.model.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.latency_ms.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.latency_ms.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.prompt_tokens.norms\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.latency_ms.fst\",\n            \"[email protected]\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.prompt_tokens.meta\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.latency_ms.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.cache_hit.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.top_doc.fst\",\n            \"[email protected]\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.model.fst\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.tenant.fst\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.cache_hit.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.top_doc.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.model.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.latency_ms.fst\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.tenant.post\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.status.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.status.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.latency_ms.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.status.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.prompt_tokens.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.latency_ms.fst\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.top_doc.fst\",\n            \"[email protected]\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.context_tokens.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.prompt_tokens.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.completion_tokens.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.cost_usd.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.top_doc.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.intent.fst\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.model.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.completion_tokens.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.prompt_tokens.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.latency_ms.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.tenant.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.cost_usd.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.cost_usd.fst\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.status.post\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.intent.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.status.post\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.dv\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.latency_ms.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.status.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.prompt_tokens.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.latency_ms.post\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.dv\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.top_doc.norms\",\n            \"[email protected]\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.tenant.norms\",\n            \"[email protected]\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.top_doc.post\",\n            \"[email protected]\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.context_tokens.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.prompt_tokens.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.completion_tokens.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.cost_usd.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.top_doc.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.intent.post\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.model.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.completion_tokens.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.prompt_tokens.meta\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.tenant.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.cost_usd.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.cost_usd.post\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.cache_hit.post\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.intent.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.context_tokens.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.model.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.model.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.model.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.model.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.completion_tokens.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.completion_tokens.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.tenant.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.cache_hit.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.tenant.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.cache_hit.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.cache_hit.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.tenant.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.cache_hit.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.tenant.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.completion_tokens.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.completion_tokens.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.intent.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.intent.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.cost_usd.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.cost_usd.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.intent.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.intent.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.context_tokens.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.context_tokens.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.cost_usd.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.cost_usd.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.top_doc.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.top_doc.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.top_doc.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.top_doc.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.context_tokens.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.context_tokens.post\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.status.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.context_tokens.norms\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.status.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.context_tokens.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.status.fst\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.status.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.latency_ms.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.completion_tokens.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.latency_ms.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.completion_tokens.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.context_tokens.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.context_tokens.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.completion_tokens.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.completion_tokens.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.latency_ms.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.latency_ms.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.intent.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.intent.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.top_doc.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.top_doc.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.intent.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.intent.post\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.top_doc.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.prompt_tokens.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.top_doc.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.prompt_tokens.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.model.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.model.meta\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.model.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.model.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.cache_hit.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.cache_hit.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.cache_hit.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.cache_hit.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.status.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.status.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.tenant.norms\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.tenant.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.prompt_tokens.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.prompt_tokens.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.tenant.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.tenant.post\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.status.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.status.post\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.prompt_tokens.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.prompt_tokens.meta\",\n            \"[email protected]\",\n            \"[email protected]\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.completion_tokens.norms\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.completion_tokens.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.latency_ms.norms\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.latency_ms.meta\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.dv\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.prompt_tokens.fst\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.prompt_tokens.post\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.latency_ms.fst\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.latency_ms.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.completion_tokens.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.completion_tokens.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.completion_tokens.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.completion_tokens.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.tenant.meta\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.model.fst\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.model.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.prompt_tokens.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.cache_hit.norms\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.prompt_tokens.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.cache_hit.meta\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.dv\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.intent.norms\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.intent.meta\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.cache_hit.fst\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.cache_hit.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.model.norms\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.tenant.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.model.meta\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.tenant.post\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.dv\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.cache_hit.norms\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.intent.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.cache_hit.meta\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.intent.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.top_doc.meta\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.dv\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.top_doc.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.top_doc.post\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.model.fst\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.model.post\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.dv\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.ids\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.dv\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.sidx\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.cache_hit.fst\",\n            \"31dadfde-831b-4df3-8949-d4e5c6611907.seg\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.cache_hit.post\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.dv\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.ids\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.sidx\",\n            \"7156e948-f690-4dcf-946c-23dcf4cf51e9.seg\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.ids\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.sidx\",\n            \"712edbb1-d540-4db8-9816-af1597aafa6f.seg\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.dv\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.ids\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.sidx\",\n            \"7b0389d2-3a59-487a-9be8-b6e6d51d5525.seg\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.ids\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.sidx\",\n            \"f5aa2368-5b19-4bc0-88e4-59877d496279.seg\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.dv\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.ids\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.dv\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.dv\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.sidx\",\n            \"1d12190d-8db1-4aa5-975c-ad931dc62b41.seg\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.dv\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.dv\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.ids\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.ids\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.ids\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.sidx\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.ids\",\n            \"e3d9386b-47e7-4eca-9fce-0ec3a245c0e0.seg\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.sidx\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.sidx\",\n            \"ba7d6ef4-da89-448c-9da2-98e491cee1d7.seg\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.sidx\",\n            \"9405501e-efeb-4545-94e0-2bb165ca05da.seg\",\n            \"52368e87-17be-45ee-8672-65ee18679a57.seg\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.ids\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.sidx\",\n            \"5b58a3bd-e0d0-46ab-8273-3cf3cb8e985e.seg\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.ids\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.sidx\",\n            \"6a720280-90e0-4392-a4f5-c6866724c5ef.seg\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.ids\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.ids\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.ids\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.sidx\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.sidx\",\n            \"43fdae3c-cbf9-4bcd-821e-81bcceeb9695.seg\",\n            \"e0d871c6-0030-434f-9833-56fa72e41120.seg\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.sidx\",\n            \"6da4144a-63f9-4956-8ddb-bd020df38804.seg\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.ids\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.sidx\",\n            \"867d8472-2fe6-4b6d-aa21-f7e3d7538fb8.seg\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\",\n            \"0000000000000001.wchk\",\n            \"0000000000000001.wal\"\n          ],\n          \"name\": \"bench\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_audit\"\n        },\n        {\n          \"files\": [\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\",\n            \"0000000000000000.wchk\",\n            \"0000000000000000.wal\"\n          ],\n          \"name\": \".xerj_api_tokens\"\n        }\n      ],\n      \"indices\": [\n        \".xerj_views\",\n        \"vstore\",\n        \".xerj_passkeys\",\n        \".xerj_sessions\",\n        \".xerj_dashboards\",\n        \"articles\",\n        \".xerj_idp_config\",\n        \".xerj_alert_rules\",\n        \".xerj_connections\",\n        \".xerj_cluster_state\",\n        \".xerj_alert_fires\",\n        \"logs-2026-04\",\n        \".xerj_prefs\",\n        \".xerj_magic_links\",\n        \".xerj_users\",\n        \"bench\",\n        \".xerj_audit\",\n        \".xerj_api_tokens\"\n      ],\n      \"shards\": {\n        \"failed\": 0,\n        \"successful\": 18,\n        \"total\": 18\n      },\n      \"snapshot\": \"backup-364d1962-f061-441c-8087-64ef74709587\",\n      \"start_time_in_millis\": 1782855459954,\n      \"state\": \"SUCCESS\",\n      \"uuid\": \"4801853b-f837-4a26-9869-19f31ee1616b\",\n      \"version\": \"8.13.0\"\n    },\n    \"repo_path\": \"/tmp/tmp.e6NpNfQFGp/_backups\"\n  },\n  \"took_ms\": 35,\n  \"request_id\": \"69932734-1aff-45e2-b13d-80f667823b17\"\n}"
      }
    ]
  },
  {
    "id": "12-console-ux",
    "doc": "Xerj Console (xerj-ux)",
    "title": "Embedded Console UX",
    "steps": [
      {
        "label": "console SPA shell",
        "cmd": "curl -s \"http://localhost:9200/_xerj-console/\"",
        "status": 200,
        "pass": true,
        "output": "<!doctype html>\n<html lang=\"en\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Xerj Console · typography-first observability for Xerj</title>\n<meta name=\"color-scheme\" content=\"dark light\">\n<script>\n  // Theme bootstrap — runs before CSS to prevent a flash of wrong theme.\n  (function () {\n    var t = localStorage.getItem('xerj.theme');\n    if (t !== 'day' && t !== 'night') t = 'night';\n    document.documentElement.setAttribute('data-theme', t);\n  })();\n</script>\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n<link href=\"https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@400;700;800;900&family=JetBrains+Mono:wght@400;500;700&family=Inter:wght@400;500;600&display=swap\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"assets/tokens.css\">\n<link rel=\"stylesheet\" href=\"assets/base.css\">\n<link rel=\"icon\" href=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ctext y='13' font-family='monospace' font-size='14' font-weight='900' fill='%23EEBB00'%3Ez%3C/text%3E%3C/svg%3E\">\n</head>\n<body>\n<div id=\"app\" aria-busy=\"true\"></div>\n<!--\n  Auth guard.  Hits /_xerj-console/api/v1/me before app.js runs.  On 401 we\n  redirect to /_xerj-console/login (or /_xerj-console/setup when this is a fresh\n  install — the bootstrap banner already pointed the user at /setup,\n  but if they bookmarked / it's nicer to land on /setup than /login).\n  On 200 we cache the user record on `window.__xerjConsoleMe` so app.js can\n  pick it up synchronously without re-fetching, and import app.js.\n-->\n<script type=\"module\">\n  (async () => {\n    try {\n      const r = await fetch('/_xerj-console/api/v1/me', {\n        credentials: 'same-origin',\n        headers: { 'accept': 'application/json' },\n      });\n      if (r.status === 401) {\n        // Decide: setup vs login. We probe /cluster/info — its\n        // `started_at_ms` tells us whether the server has been up\n        // long enough that someone almost certainly set it up; on a\n        // fresh boot we send the user to /setup.\n        try {\n          const info = await (await fetch('/_xerj-console/api/v1/cluster/info', {\n            credentials: 'same-origin',\n          })).json();\n          // No reliable \"is bootstrapped?\" probe yet; default to /login\n          // since /setup requires a magic-link token in the fragment.\n          // Operators on first boot reach /setup via the stderr banner.\n          void info;\n        } catch {}\n        window.location.href = '/_xerj-console/login';\n        return;\n      }\n      if (!r.ok) throw new Error('HTTP ' + r.status);\n      const body = await r.json();\n      window.__xerjConsoleMe = body && body.data ? body.data.user : null;\n\n      // Pull /prefs + /views from the engine and seed localStorage\n      // BEFORE app.js boots — app.js reads localStorage at module-load\n      // time, so the pull has to complete first or the SPA renders\n      // with stale (or empty) state for one frame.\n      try {\n        const sync = await import('./src/xerj-console-sync.js');\n        await sync.pullAll();\n        // Start the periodic push tick once app.js has had a beat.\n        Promise.resolve().then(() => sync.startPush());\n      } catch (e) {\n        console.warn('[xerj-console sync]', e);\n      }\n    } catch (e) {\n      // Engine unreachable (offline dev, hot-reload mid-flight) —\n      // load the SPA anyway so the user sees an error state instead\n      // of a redirect loop.\n      console.error('[xerj-console auth guard]', e);\n    }\n    await import('./src/app.js');\n  })();\n</script>\n</body>\n</html>"
      },
      {
        "label": "console app bundle",
        "cmd": "curl -s \"http://localhost:9200/_xerj-console/src/app.js\"",
        "status": 200,
        "pass": true,
        "output": "// ============================================================\n// XERJ.ai — Bootstrap + router + layout engine\n//\n// One render loop. Edit mode layers drag/resize/remove/add on\n// top of the same render — no separate editor routes.\n// ============================================================\n\nimport { registry, defaults, SECTIONS, DASHBOARD_GROUPS, dashboardsInSection } from './dashboards/registry.js';\nimport { Nav, SceneHeader, TimeCtrl, RefreshCtrl, FilterBar, ClusterCtrl, SavedViews, Footer, MobileCtrl } from './ux/chrome.js';\nimport { query, dataSourceStatus } from './data/query.js';\nimport { chartTypes, chartTypeList } from './ux/chart-types.js';\nimport { esc } from './ux/text.js';\nimport { mockSearch } from './data/mock.js';\nimport { hitsToCsv, downloadText, svgToPng } from './data/export.js';\nimport {\n  mergedDashboards, renameDashboard, reorderDashboards, setHidden,\n  createUserDashboard, deleteUserDashboard, isUserDash, resetAll as resetDashboards,\n} from './data/dashboard-store.js';\nimport {\n  listClusters, listIndices, listFields, listClustersSync,\n  defaultClusterId, setDefaultCluster,\n} from './data/data-sources.js';\n\n// ---------- state -----------------------------------------\nconst LS = {\n  theme:   'xerj.theme',\n  time:    'xerj.time',\n  edit:    'xerj.edit',\n  search:  'xerj.search',\n  refresh: 'xerj.refresh',\n  cluster: 'xerj.cluster',\n  views:   'xerj.views',\n  filters: (dashId) => 'xerj.filters.' + dashId,\n  layout:  (dashId) => 'xerj.layout.' + dashId,\n};\n\nfunction loadJSON(key, fallback) {\n  try { const raw = localStorage.getItem(key); return raw ? JSON.parse(raw) : fallback; }\n  catch { return fallback; }\n}\nfunction loadSearch() { return loadJSON(LS.search, null); }\nfunction loadAllFilters() {\n  const out = {};\n  for (const k of Object.keys(localStorage)) {\n    if (k.startsWith('xerj.filters.')) {\n      const id = k.slice('xerj.filters.'.length);\n      try { out[id] = JSON.parse(localStorage.getItem(k)) || {}; } catch {}\n    }\n  }\n  return out;\n}\n\nconst _initial = parseRoute();\nconst _urlState = parseUrlState();\nconst state = {\n  section: _initial.section,\n  route:   _initial.route,\n  time:    _urlState.time    || localStorage.getItem(LS.time)    || '24H',\n  timeCustom: {\n    from: _urlState.tfrom || localStorage.getItem('xerj.timeFrom') || '',\n    to:   _urlState.tto   || localStorage.getItem('xerj.timeTo')   || '',\n  },\n  cluster: _urlState.cluster || defaultClusterId(),\n  refresh: parseInt(localStorage.getItem(LS.refresh) || '0', 10),  // ms; 0 = off\n  refreshTimer: null,\n  fetchedAt: null,                // ISO string of last successful query\n  fetchMs:   null,                // last fetch duration in ms\n  fetchErr:  null,                // last fetch error message\n  loading:   false,\n  filters:   loadAllFilters(),    // { [dashId]: { field: value } }\n  theme: document.documentElement.getAttribute('data-theme') || 'night',\n  edit:  localStorage.getItem(LS.edit) === '1',\n  mobile: localStorage.getItem('xerj.mobile') === '1',\n  layouts: loadAllLayouts(),\n  search: (() => {\n    const loaded = loadSearch() || {};\n    return {\n      q: loaded.q || '',\n      type: loaded.type || 'match',\n      index: loaded.index || '*',\n      filters: loaded.filters || {},\n      sort: loaded.sort || { field: '_score', dir: 'desc' },\n      showTime: loaded.showTime !== false,\n      result: null,\n    };\n  })(),\n  _focusSelector: null, // set by handlers that need focus restored\n};\n// Merge any URL-seeded filters into the current dashboard's filter set.\nif (_urlState.filters) {\n  state.filters[_initial.route] = { ...(state.filters[_initial.route] || {}), ..._urlState.filters };\n  saveFilters(_initial.route);\n}\n\n// ---------- filters, URL state, refresh -------------------\nfunction currentFilters() {\n  return state.filters[state.route] || {};\n}\nfunction saveFilters(dashId) {\n  const v = state.filters[dashId];\n  if (v && Object.keys(v).length) localStorage.setItem(LS.filters(dashId), JSON.stringify(v));\n  else localStorage.removeItem(LS.filters(dashId));\n}\n// Toggle a filter value. Multi-value semantics: clicking the same\n// value twice removes it; clicking a new value on an existing field\n// appends to the OR list.\nfunction setFilter(field, value) {\n  const dashId = state.route;\n  const cur = { ...(state.filters[dashId] || {}) };\n  const existing = cur[field];\n  if (existing == null) {\n    cur[field] = value;\n  } else if (Array.isArray(existing)) {\n    const idx = existing.indexOf(value);\n    if (idx >= 0) {\n      const next = existing.filter((v) => v !== value);\n      if (next.length === 0) delete cur[field];\n      else if (next.length === 1) cur[field] = next[0];\n      else cur[field] = next;\n    } else {\n      cur[field] = [...existing, value];\n    }\n  } else {\n    if (existing === value) delete cur[field];\n    else cur[field] = [existing, value];\n  }\n  state.filters[dashId] = cur;\n  saveFilters(dashId);\n  writeUrlState();\n}\n\n// Remove one value from a field (used by pill ✕ click on a specific\n// chip inside a multi-value filter).\nfunction removeFilterValue(field, value) {\n  const dashId = state.route;\n  const cur = { ...(state.filters[dashId] || {}) };\n  const existing = cur[field];\n  if (existing == null) return;\n  if (Array.isArray(existing)) {\n    const next = existing.filter((v) => v !== value);\n    if (next.length === 0) delete cur[field];\n    else if (next.length === 1) cur[field] = next[0];\n    else cur[field] = next;\n  } else if (existing === value) {\n    delete cur[field];\n  }\n  state.filters[dashId] = cur;\n  saveFilters(dashId);\n  writeUrlState();\n}\n\n// KQL-lite parser: tokenize `field:value field:\"multi word\" foo`.\n// Free-text tokens become a synthetic `q` filter; repeat fields\n// turn into OR arrays.\nfunction parseKql(text) {\n  const out = {};\n  const add = (k, v) => {\n    if (!v) return;\n    if (out[k] == null) out[k] = v;\n    else if (Array.isArray(out[k])) out[k].push(v);\n    else out[k] = [out[k], v];\n  };\n  // Match field:\"quoted value\"  OR  field:value  OR  loose token\n  const re = /([a-zA-Z_][\\w.]*):\"([^\"]*)\"|([a-zA-Z_][\\w.]*):(\\S+)|\"([^\"]+)\"|(\\S+)/g;\n  let m;\n  while ((m = re.exec(text)) !== null) {\n    if (m[1] != null)      add(m[1], m[2]);\n    else if (m[3] != null) add(m[3], m[4]);\n    else if (m[5] != null) add('q', m[5]);\n    else if (m[6] != null) add('q', m[6]);\n  }\n  return out;\n}\n\n// Inverse of parseKql — render a filter object as a KQL string that\n// re-parses to the same shape. Used to keep the input box in sync.\nfunction serializeKql(filters) {\n  const parts = [];\n  for (const [k, v] of Object.entries(filters || {})) {\n    const values = Array.isArray(v) ? v : [v];\n    for (const x of values) {\n      const needsQuote = /\\s/.test(String(x));\n      if (k === 'q') {\n        parts.push(needsQuote ? `\"${x}\"` : String(x));\n      } else {\n        parts.push(needsQuote ? `${k}:\"${x}\"` : `${k}:${x}`);\n      }\n    }\n  }\n  return parts.join(' ');\n}\n\nfunction applyKqlInput(text) {\n  const dashId = state.route;\n  state.filters[dashId] = parseKql(text);\n  saveFilters(dashId);\n  writeUrlState();\n}\nfunction clearFilters() {\n  const dashId = state.route;\n  state.filters[dashId] = {};\n  saveFilters(dashId);\n  writeUrlState();\n}\n\n// URL state: ?t=24H&f=service:auth,level:error&c=prod-us\n// Filters are encoded as repeated `f` params so URLSearchParams can\n// handle escaping cleanly: ?f=service:nginx&f=level:error. Multi-value\n// (OR) filters repeat the same key: ?f=service:auth&f=service:web.\nfunction parseUrlState() {\n  const qs = location.search.slice(1);\n  if (!qs) return {};\n  const out = {};\n  const params = new URLSearchParams(qs);\n  if (params.get('t')) out.time = params.get('t').toUpperCase();\n  if (params.get('tfrom')) out.tfrom = params.get('tfrom');\n  if (params.get('tto'))   out.tto   = params.get('tto');\n  if (params.get('c')) out.cluster = params.get('c');\n  const all = params.getAll('f');\n  if (all.length) {\n    out.filters = {};\n    for (const pair of all) {\n      const idx = pair.indexOf(':');\n      if (idx > 0) {\n        const k = pair.slice(0, idx);\n        const v = pair.slice(idx + 1);\n        const existing = out.filters[k];\n        if (existing == null) out.filters[k] = v;\n        else if (Array.isArray(existing)) existing.push(v);\n        else out.filters[k] = [existing, v];\n      }\n    }\n  }\n  return out;\n}\nfunction writeUrlState() {\n  const params = new URLSearchParams();\n  if (state.time && state.time !== '24H') params.set('t', state.time);\n  if (state.time === 'CUSTOM' && state.timeCustom) {\n    if (state.timeCustom.from) params.set('tfrom', state.timeCustom.from);\n    if (state.timeCustom.to)   params.set('tto',   state.timeCustom.to);\n  }\n  if (state.cluster) params.set('c', state.cluster);\n  for (const [k, v] of Object.entries(currentFilters())) {\n    if (Array.isArray(v)) for (const x of v) params.append('f', `${k}:${x}`);\n    else params.append('f', `${k}:${v}`);\n  }\n  const qs = params.toString();\n  const url = location.pathname + (qs ? '?' + qs : '') + location.hash;\n  history.replaceState(null, '', url);\n}\n\nfunction setRefreshInterval(ms) {\n  state.refresh = ms;\n  localStorage.setItem(LS.refresh, String(ms));\n  if (state.refreshTimer) { clearInterval(state.refreshTimer); state.refreshTimer = null; }\n  if (ms > 0) {\n    state.refreshTimer = setInterval(() => {\n      if (state.section === 'dashboards' || state.section === 'discover') render();\n    }, ms);\n  }\n}\n\n// ---------- saved views -----------------------------------\n// A saved view is a snapshot of (dashId, time, cluster, filters).\n// Click it to land on that dashboard with the same context.\nfunction loadViews() { return loadJSON(LS.views, []); }\nfunction saveViews(views) { localStorage.setItem(LS.views, JSON.stringify(views)); }\nfunction saveCurrentView() {\n  const dashId = state.route;\n  const all = loadViews();\n  const name = prompt('Save view as:', 'View ' + (all.length + 1));\n  if (!name) return;\n  const id = 'v-' + Date.now().toString(36);\n  all.push({\n    id,\n    name,\n    dashId,\n    time: state.time,\n    cluster: state.cluster,\n    filters: currentFilters(),\n    savedAt: new Date().toISOString(),\n  });\n  saveViews(all);\n}\nfunction deleteView(id) {\n  saveViews(loadViews().filter((v) => v.id !== id));\n}\nfunction applyView(id) {\n  const v = loadViews().find((x) => x.id === id);\n  if (!v) return;\n  state.time = v.time;\n  state.cluster = v.cluster || state.cluster;\n  state.filters[v.dashId] = { ...(v.filters || {}) };\n  saveFilters(v.dashId);\n  localStorage.setItem(LS.time, state.time);\n  location.hash = '#/dashboards/' + v.dashId;\n}\n\nfunction relTime(iso) {\n  if (!iso) return '';\n  const delta = Date.now() - new Date(iso).getTime();\n  if (delta < 2000) return 'just now';\n  if (delta < 60_000) return Math.round(delta / 1000) + 's ago';\n  if (delta < 3600_000) return Math.round(delta / 60_000) + 'm ago';\n  return Math.round(delta / 3600_000) + 'h ago';\n}\n\nfunction navStatus() {\n  if (state.loading) return 'LOADING…';\n  if (state.fetchErr) return 'ERROR · ' + state.fetchErr.slice(0, 40);\n  const bits = [];\n  // dataSourceStatus is a function in v0.7+ (was a const string) so\n  // the nav reflects the live backend state instead of a fixed label.\n  bits.push(typeof dataSourceStatus === 'function' ? dataSourceStatus() : String(dataSourceStatus));\n  if (state.fetchedAt) bits.push('UPDATED ' + relTime(state.fetchedAt).toUpperCase());\n  if (state.fetchMs != null) bits.push(state.fetchMs + 'MS');\n  return bits.join(' · ');\n}\n\nfunction runSearchNow() {\n  // Optimistic placeholder so the table doesn't blank out while\n  // the live query is in flight. Replaced as soon as the engine\n  // responds with real hits.\n  state.search.result = mockSearch({\n    q: state.search.q,\n    type: state.search.type,\n    index: state.search.index,\n    filters: state.search.filters,\n    sort: state.search.sort,\n  });\n  // Live xerj search: turn the SearchBox state into a real\n  // `query()` ctx and overlay the live hits + facets when they\n  // arrive. Falls back to the mock above on backend error so the\n  // demo never serves a blank console.\n  query({\n    dashId: 'search-discover',\n    range: state.time,\n    customRange: state.time === 'CUSTOM' ? state.timeCustom : null,\n    cluster: state.cluster,\n    filters: state.search.filters,\n    search: {\n      q: state.search.q,\n      type: state.search.type,\n      index: state.search.index,\n    },\n  })\n    .then((res) => {\n      const live = res?.data;\n      if (!live || live.error) return;\n      const mock = state.search.result || {};\n      state.search.result = {\n        ...mock,\n        hits: live.hits || mock.hits || [],\n        total: live.total ?? (live.hits?.length ?? 0),\n        took: live.took,\n        max_score: live.max_score,\n        facets: live.facets || mock.facets,\n        _live: true,\n      };\n      state.fetchedAt = res.meta?.fetchedAt || Date.now();\n      state.fetchMs   = res.meta?.durationMs ?? state.fetchMs;\n      // Re-render the page so the table swaps mock → live without\n      // requiring user interaction.\n      if (state.section === 'discover') render();\n    })\n    .catch(() => { /* leave the optimistic mock in place */ });\n  // Persist the inputs (not the result — it rebuilds on demand)\n  localStorage.setItem(LS.search, JSON.stringify({\n    q: state.search.q,\n    type: state.search.type,\n    index: state.search.index,\n    filters: state.search.filters,\n    sort: state.search.sort,\n    showTime: state.search.showTime,\n  }));\n}\n\n/**\n * Parse the hash into { section, route }. Routes come in three shapes:\n *\n *   #/                     → section=dashboards, route=<first dashboard>\n *   #/dashboards           → section=dashboards, route=<first dashboard>\n *   #/dashboards/:id       → section=dashboards, route=:id\n *   #/<section>            → section=<section>,  route=<view id for that section>\n *\n * Backward compat: legacy `#/ai-overview` (bare dashboard id) gets\n * auto-routed into `#/dashboards/ai-overview`, and legacy `#/manage`\n * redirects to `#/settings`.\n */\nfunction parseRoute() {\n  const raw = (location.hash || '').replace(/^#\\/?/, '');\n  const parts = raw.split('/').filter(Boolean);\n  const merged = mergedDashboards(defaults, { includeHidden: true });\n\n  // Helper: find the default view id for a section.\n  const firstOfSection = (sectionId) => {\n    const list = dashboardsInSection(sectionId, merged);\n    return list[0]?.id;\n  };\n\n  // Empty hash → dashboards section, first dashboard\n  if (!parts.length) {\n    const first = firstOfSection('dashboards') || 'ai-overview';\n    return { section: 'dashboards', route: first };\n  }\n\n  // Legacy: #/manage → settings\n  if (parts[0] === 'manage') return { section: 'settings', route: 'settings' };\n\n  // Section-level route: #/section or #/section/:id\n  const sectionIds = new Set(SECTIONS.map((s) => s.id));\n  if (sectionIds.has(parts[0])) {\n    if (parts[0] === 'dashboards') {\n      const id = parts[1] || firstOfSection('dashboards') || 'ai-overview';\n      // Only accept real dashboards in this section\n      const known = merged.find((d) => d.id === id && (d.section || 'dashboards') === 'dashboards');\n      if (known) return { section: 'dashboards', route: id };\n      return { section: 'dashboards', route: firstOfSection('dashboards') || 'ai-overview' };\n    }\n    // Non-dashboards sections have exactly one view: firstOfSection\n    const first = firstOfSection(parts[0]);\n    if (first) return { section: parts[0], route: first };\n  }\n\n  // Legacy bare route: #/ai-overview → #/dashboards/ai-overview\n  if (merged.some((d) => d.id === parts[0])) {\n    const d = merged.find((x) => x.id === parts[0]);\n    const section = d.section || 'dashboards';\n    return { section, route: parts[0] };\n  }\n\n  // Fallback\n  return { section: 'dashboards', route: firstOfSection('dashboards') || 'ai-overview' };\n}\n\n// Build the data context that the section views (DATA / SETTINGS)\n// need. Async because real API calls will replace these mocks in one\n// step once the engine ships /v1/clusters etc.\nasync function buildSectionData(sectionId) {\n  if (sectionId === 'data') {\n    const clusters = await listClusters();\n    const indicesByCluster = {};\n    const fieldsByIndex = {};\n    for (const c of clusters) {\n      indicesByCluster[c.id] = await listIndices(c.id);\n    }\n    const active = defaultClusterId();\n    for (const i of indicesByCluster[active] || []) {\n      fieldsByIndex[i.name] = await listFields(i.name);\n    }\n    return {\n      clusters,\n      indicesByCluster,\n      fieldsByIndex,\n      activeCluster: active,\n      focusIndex: state._focusIndex || (indicesByCluster[active] || [])[0]?.name,\n    };\n  }\n  if (sectionId === 'settings') {\n    return {\n      dashboards: mergedDashboards(defaults, { includeHidden: true }),\n      views: loadViews(),\n    };\n  }\n  return {};\n}\n\nfunction loadAllLayouts() {\n  const out = {};\n  for (const id of Object.keys(registry)) {\n    try {\n      const raw = localStorage.getItem(LS.layout(id));\n      if (raw) out[id] = JSON.parse(raw);\n    } catch { /* ignore corrupt */ }\n  }\n  return out;\n}\nfunction saveLayout(dashId) {\n  const v = state.layouts[dashId];\n  if (!v) localStorage.removeItem(LS.layout(dashId));\n  else    localStorage.setItem(LS.layout(dashId), JSON.stringify(v));\n}\nfunction applyTheme(t) {\n  state.theme = t;\n  document.documentElement.setAttribute('data-theme', t);\n  localStorage.setItem(LS.theme, t);\n}\n\n// ---------- layout engine ---------------------------------\n/**\n * Merge a dashboard's default panels with the user's stored override.\n * Returns a flat ordered array of panel objects ready to render.\n */\nfunction mergeLayout(defaultPanels, override) {\n  if (!override) return defaultPanels.map((p) => ({ ...p, source: 'default' }));\n  const byId = Object.fromEntries(defaultPanels.map((p) => [p.id, p]));\n  const hidden = new Set(override.hidden || []);\n  const out = [];\n  const seen = new Set();\n\n  const order = override.order || defaultPanels.map((p) => p.id);\n  for (const id of order) {\n    if (hidden.has(id)) { seen.add(id); continue; }\n    const base = byId[id];\n    if (base) {\n      const cols = override.cols?.[id] ?? base.cols;\n      out.push({ ...base, cols, source: 'default' });\n      seen.add(id);\n    } else {\n      // Maybe a user-added panel.\n      const added = (override.added || []).find((a) => a.id === id);\n      if (added) {\n        const cols = override.cols?.[id] ?? added.cols;\n        out.push({ ...added, cols, source: 'added' });\n        seen.add(id);\n      }\n    }\n  }\n  // Append defaults missing from order (new panels added since override was saved).\n  for (const p of defaultPanels) {\n    if (!seen.has(p.id) && !hidden.has(p.id)) {\n      const cols = override.cols?.[p.id] ?? p.cols;\n      out.push({ ...p, cols, source: 'default' });\n    }\n  }\n  // Append user-added panels missing from order (freshly added).\n  for (const added of (override.added || [])) {\n    if (!seen.has(added.id)) {\n      const cols = override.cols?.[added.id] ?? added.cols;\n      out.push({ ...added, cols, source: 'added' });\n    }\n  }\n  return out;\n}\n\nfunction ensureOverride(dashId, defaultPanels) {\n  if (state.layouts[dashId]) return state.layouts[dashId];\n  const fresh = {\n    order: defaultPanels.map((p) => p.id),\n    cols:  {},\n    hidden: [],\n    added:  [],\n  };\n  state.layouts[dashId] = fresh;\n  return fresh;\n}\n\nfunction mutate(dashId, defaultPanels, fn) {\n  const ov = ensureOverride(dashId, defaultPanels);\n  fn(ov);\n  saveLayout(dashId);\n}\n\n// ---------- render ----------------------------------------\nconst SIZES = [2, 3, 4, 6, 8, 12];\n\nfunction renderEditChrome(p) {\n  const sizes = SIZES.map((s) =>\n    `<button type=\"button\" data-panel=\"${esc(p.id)}\" data-size=\"${s}\" class=\"${p.cols === s ? 'active' : ''}\" aria-pressed=\"${p.cols === s}\">${s}</button>`\n  ).join('<span class=\"sep\">·</span>');\n  const frac = Math.max(0, Math.min(12, p.cols)) / 12;\n  const meterFill = (frac * 96).toFixed(1);\n  const meter = `\n    <svg class=\"meter\" viewBox=\"0 0 96 6\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n      <line x1=\"0\" y1=\"5\" x2=\"96\" y2=\"5\" stroke=\"currentColor\" stroke-width=\"1\" stroke-opacity=\"0.25\"/>\n      <line x1=\"0\" y1=\"5\" x2=\"${meterFill}\" y2=\"5\" stroke=\"var(--z-accent)\" stroke-width=\"1\"/>\n    </svg>`;\n  return `\n  <div class=\"panel-edit\" aria-label=\"Edit panel\">\n    <span class=\"colsLabel\"><span class=\"max\">COL</span> ${p.cols}<span class=\"slash\">/</span><span class=\"max\">12</span></span>\n    ${meter}\n    <span class=\"sizes\">${sizes}</span>\n    <button type=\"button\" class=\"remove\" data-panel=\"${esc(p.id)}\" data-remove aria-label=\"Remove\">✕</button>\n  </div>`;\n}\n\nfunction renderPanel(p, data, editMode) {\n  let inner = '';\n  try {\n    if (p.source === 'added') {\n      const t = chartTypes[p.type] || chartTypes.markdown;\n      inner = t.render(data);\n    } else if (typeof p.render === 'function') {\n      inner = p.render({ data });\n    } else {\n      inner = '';\n    }\n    // Empty-state fallback: if the render produced nothing meaningful,\n    // show a typography-first placeholder so users see WHY the slot is\n    // blank (e.g. filtered everything out) rather than a broken panel.\n    const stripped = String(inner || '').replace(/<[^>]+>/g, '').trim();\n    if (!stripped) {\n      inner = `<div class=\"panel-empty mono faint\">NO DATA · ADJUST FILTERS OR TIME RANGE</div>`;\n    }\n  } catch (err) {\n    inner = `<div class=\"panel-empty mono faint\">PANEL ERROR · ${esc((err.message || err) + '').slice(0, 80)}</div>`;\n  }\n  const editAttrs = editMode ? ' draggable=\"true\"' : '';\n  const editChrome = editMode ? renderEditChrome(p) : '';\n  // A panel that declares `drilldown: { to: <dashId> }` adds a\n  // data attribute the global click handler uses to route clicks\n  // to the target dashboard with the clicked filter preserved.\n  const drillAttr = p.drilldown?.to ? ` data-drilldown-to=\"${esc(p.drilldown.to)}\"` : '';\n  const drillHint = p.drilldown?.to ? `<span class=\"drill-hint mono faint\">→ ${esc(p.drilldown.to.toUpperCase())}</span>` : '';\n  return `\n  <section class=\"panel${editMode ? ' edit' : ''}\" data-panel=\"${esc(p.id)}\" style=\"grid-column: span ${p.cols};\"${editAttrs}${drillAttr}>\n    ${editChrome}\n    ${p.eyebrow ? `<div class=\"key\">${esc(p.eyebrow)}${drillHint}</div>` : ''}\n    ${inner}\n  </section>`;\n}\n\nfunction renderAddPicker() {\n  const items = chartTypeList.map((t) =>\n    `<button type=\"button\" data-add=\"${esc(t.id)}\" title=\"${esc(t.describe || '')}\">${esc(t.name)}</button>`\n  ).join('<span class=\"sep\">·</span>');\n  return `\n  <div class=\"add-picker\">\n    <span class=\"key\" style=\"color:var(--z-accent);\">+ ADD PANEL</span>\n    <span class=\"types\">${items}</span>\n  </div>`;\n}\n\nasync function render() {\n  const app = document.getElementById('app');\n  // Resolve the active dashboard from either the default registry or\n  // the user metadata store. User-cloned dashboards inherit their\n  // render from their clonedFrom template.\n  const allDash = mergedDashboards(defaults, { includeHidden: true });\n  const dash = allDash.find((d) => d.id === state.route)\n    || dashboardsInSection(state.section, allDash)[0]\n    || registry['ai-overview'];\n  const navDash = mergedDashboards(defaults);\n  const dashboardsForSection = dashboardsInSection('dashboards', navDash);\n\n  // For the SEARCH dashboard, eagerly run the search so panels see hits.\n  if (dash.id === 'search-discover' && !state.search.result) {\n    runSearchNow();\n  }\n\n  const activeFilters = currentFilters();\n  let data;\n  let fetchErr = null;\n  // Section-level views (data/settings/users/alerts) get their own\n  // context builder. Everything else goes through the regular query.\n  if (state.section === 'data' || state.section === 'settings') {\n    try {\n      data = await buildSectionData(state.section);\n    } catch (err) {\n      data = {};\n      fetchErr = err;\n    }\n  } else {\n    state.loading = true;\n    try {\n      const result = await query({\n        dashId: dash.id,\n        range: state.time,\n        customRange: state.time === 'CUSTOM' ? state.timeCustom : null,\n        cluster: state.cluster,\n        filters: activeFilters,\n      });\n      data = result.data;\n      state.fetchedAt = result.meta.fetchedAt;\n      state.fetchMs = result.meta.durationMs;\n      state.fetchErr = null;\n    } catch (err) {\n      state.fetchErr = err.message || String(err);\n      fetchErr = err;\n    } finally {\n      state.loading = false;\n    }\n    if (fetchErr) {\n      app.innerHTML = `\n        ${Nav({ sections: SECTIONS, activeSection: state.section, dashboards: dashboardsForSection, groups: DASHBOARD_GROUPS, activeDash: dash.id, theme: state.theme, edit: state.edit, status: navStatus() })}\n        <div class=\"scene\"><div class=\"key\" style=\"margin-bottom:12px;\">ERROR</div><h1 class=\"h-scene\">CANNOT LOAD</h1></div>\n        <pre class=\"mono faint\" style=\"white-space:pre-wrap; font-size:var(--fs-13);\">${esc((fetchErr && fetchErr.stack) || fetchErr)}</pre>\n        <div style=\"margin-top:var(--sp-6);\"><button type=\"button\" data-retry class=\"text-btn\">RETRY</button></div>`;\n      return;\n    }\n  }\n\n  const view = dash.render({ data, time: state.time, search: state.search });\n  // Let a user rename override the scene title. User-cloned dashboards\n  // always use the user-chosen name; defaults only override if the user\n  // has explicitly set an xerj.dashboards.names entry.\n  try {\n    const store = JSON.parse(localStorage.getItem('xerj.dashboards') || '{}');\n    if (dash.isUser || (store.names && store.names[dash.id])) {\n      view.title = (dash.name || view.title || '').toUpperCase();\n    }\n  } catch {}\n  const merged = mergeLayout(view.panels, state.layouts[dash.id]);\n  const panelsHtml = merged.length\n    ? merged.map((p) => renderPanel(p, data, state.edit)).join('')\n    : `<div class=\"mono faint\" style=\"grid-column: span 12; padding:var(--sp-6) 0;\">All panels hidden. Click RESET to restore defaults.</div>`;\n\n  // Police-strip frame: a fixed-position overlay that lives in the page's\n  // existing margins, so entering edit mode never shifts content. The frame\n  // itself is a 1px dashed border around the viewport; the top strip carries\n  // the EDIT MODE label and tips; the bottom strip carries the column index.\n  const editFrame = state.edit ? `\n    <div class=\"edit-frame\" aria-hidden=\"true\"></div>\n    <div class=\"edit-strip-top\" role=\"status\">\n      <span class=\"marker\">EDIT MODE</span>\n      <span class=\"tips\">\n        DRAG PANEL TO REORDER ·\n        CLICK A <span class=\"key-bind\">NUMBER</span> TO RESIZE ·\n        <span class=\"key-bind\">✕</span> TO REMOVE ·\n        SCROLL FOR <span class=\"key-bind\">+ ADD</span>\n      </span>\n      <span class=\"meta\">${esc(dash.name.toUpperCase())} · ${merged.length} PANELS</span>\n    </div>\n    <div class=\"edit-strip-bottom\" aria-hidden=\"true\">${\n      Array.from({ length: 12 }, (_, i) => `<span>${String(i + 1).padStart(2, '0')}</span>`).join('')\n    }</div>\n  ` : '';\n  const gridOverlay = state.edit\n    ? `<div class=\"edit-grid\" aria-hidden=\"true\">${'<span></span>'.repeat(12)}</div>`\n    : '';\n  const addHtml = state.edit ? renderAddPicker() : '';\n\n  // Section-level views (alerts, data, users, settings) don't show the\n  // inline time control — the time range is a dashboards-section concept.\n  const hideTimeCtrl = state.section !== 'dashboards' && state.section !== 'discover';\n  const showFilterBar = state.section === 'dashboards';\n  const filterBarHtml = showFilterBar\n    ? FilterBar({ filters: activeFilters, kql: serializeKql(activeFilters) })\n    : '';\n  const refreshHtml = hideTimeCtrl\n    ? ''\n    : RefreshCtrl({ active: state.refresh });\n  const clusterHtml = hideTimeCtrl\n    ? ''\n    : ClusterCtrl({ clusters: listClustersSync(), active: state.cluster });\n  const savedViewsHtml = showFilterBar\n    ? SavedViews({ views: loadViews(), dashId: dash.id })\n    : '';\n\n  app.innerHTML = `\n    ${Nav({\n      sections: SECTIONS,\n      activeSection: state.section,\n      dashboards: dashboardsForSection,\n      groups: DASHBOARD_GROUPS,\n      activeDash: dash.id,\n      theme: state.theme,\n      edit: state.edit,\n      mobile: state.mobile,\n      status: navStatus(),\n    })}\n    ${state.mobile ? '<div class=\"iphone-frame\"><div class=\"iphone-notch\"></div><div class=\"iphone-screen\">' : ''}\n    ${SceneHeader({\n      title: view.title, kicker: view.kicker || 'OBSERVE', meta: view.meta || [state.time],\n      editable: state.edit, dashId: dash.id,\n    })}\n    ${view.caption ? `<p class=\"caption\">${esc(view.caption)}</p>` : ''}\n    ${hideTimeCtrl ? '' : `<div class=\"dash-ctrls\">${TimeCtrl({ active: state.time, custom: state.timeCustom })}${refreshHtml}${clusterHtml}</div>`}\n    ${filterBarHtml}\n    ${savedViewsHtml}\n    <main class=\"canvas${state.edit ? ' edit' : ''}\" aria-label=\"${esc(dash.name)}\">${gridOverlay}${panelsHtml}</main>\n    ${addHtml}\n    ${state.mobile ? '</div><div class=\"iphone-home-bar\"></div></div>' : ''}\n    ${Footer()}\n    ${editFrame}\n  `;\n  app.setAttribute('aria-busy', 'false');\n\n  // Restore focus on the search input (if we're on the search dashboard).\n  if (state._focusSelector) {\n    const el = document.querySelector(state._focusSelector);\n    if (el) {\n      el.focus();\n      if (el.tagName === 'INPUT') {\n        const v = el.value;\n        el.setSelectionRange(v.length, v.length);\n      }\n    }\n    state._focusSelector = null;\n  }\n}\n\n// ---------- event delegation ------------------------------\nlet dragSrcId = null;\n\ndocument.addEventListener('click', (e) => {\n  // Primary nav: top-level product section\n  const secA = e.target.closest('[data-section]');\n  if (secA) {\n    e.preventDefault();\n    const sid = secA.getAttribute('data-section');\n    if (sid === 'dashboards') {\n      location.hash = '#/dashboards';\n    } else {\n      location.hash = '#/' + sid;\n    }\n    return;\n  }\n  // Secondary nav: a specific dashboard inside the dashboards section\n  const dashA = e.target.closest('[data-dash]');\n  if (dashA) {\n    e.preventDefault();\n    const id = dashA.getAttribute('data-dash');\n    location.hash = '#/dashboards/' + id;\n    return;\n  }\n  // Secondary nav: a collapsed group tab — switch groups by landing\n  // on the group's first dashboard.\n  const groupBtn = e.target.closest('[data-dash-group]');\n  if (groupBtn) {\n    e.preventDefault();\n    const firstId = groupBtn.getAttribute('data-dash-group-first');\n    if (firstId) location.hash = '#/dashboards/' + firstId;\n    return;\n  }\n  // Time range\n  const tb = e.target.closest('[data-time]');\n  if (tb) {\n    state.time = tb.getAttribute('data-time');\n    localStorage.setItem(LS.time, state.time);\n    // When switching INTO custom and we have no stored endpoints,\n    // seed a sensible default (now − 24h → now).\n    if (state.time === 'CUSTOM' && !state.timeCustom.from) {\n      const now = new Date();\n      const prev = new Date(now.getTime() - 24 * 3600 * 1000);\n      const fmt = (d) => d.toISOString().slice(0, 16);\n      state.timeCustom = { from: fmt(prev), to: fmt(now) };\n      localStorage.setItem('xerj.timeFrom', state.timeCustom.from);\n      localStorage.setItem('xerj.timeTo',   state.timeCustom.to);\n    }\n    writeUrlState();\n    render();\n    return;\n  }\n  // Refresh interval\n  const rf = e.target.closest('[data-refresh]');\n  if (rf) {\n    setRefreshInterval(parseInt(rf.getAttribute('data-refresh'), 10));\n    render();\n    return;\n  }\n  // Manual retry on error\n  if (e.target.closest('[data-retry]')) {\n    render();\n    return;\n  }\n  // Global filter bar: click-to-filter (used by FilterBar pills and\n  // any click-to-filter affordance inside a panel — TopN rows, Dist\n  // segments, heatmap cells).\n  const fAdd = e.target.closest('[data-filter-add]');\n  if (fAdd) {\n    const raw = fAdd.getAttribute('data-filter-add');\n    const idx = raw.indexOf(':');\n    if (idx > 0) {\n      const field = raw.slice(0, idx);\n      const value = raw.slice(idx + 1);\n      // Drilldown takes precedence when the panel declares one.\n      const drillHost = fAdd.closest('[data-drilldown-to]');\n      if (drillHost) {\n        const toId = drillHost.getAttribute('data-drilldown-to');\n        // Seed the target dashboard's filters with this value before\n        // navigating so the destination renders pre-filtered. The\n        // search-discover dashboard has its own filter store\n        // (state.search.filters) — seed that one instead.\n        if (toId === 'search-discover') {\n          state.search.filters = { ...(state.search.filters || {}), [field]: value };\n          state.search.result = null;  // force re-run on render\n        } else {\n          state.filters[toId] = { ...(state.filters[toId] || {}), [field]: value };\n          try { localStorage.setItem(LS.filters(toId), JSON.stringify(state.filters[toId])); } catch {}\n        }\n        // Resolve the target's actual section — some targets (like\n        // search-discover) live outside the 'dashboards' section and\n        // need a different hash shape (#/discover rather than\n        // #/dashboards/search-discover).\n        const all = mergedDashboards(defaults, { includeHidden: true });\n        const target = all.find((d) => d.id === toId);\n        const sectionId = target?.section || 'dashboards';\n        location.hash = sectionId === 'dashboards' ? `#/dashboards/${toId}` : `#/${sectionId}`;\n        return;\n      }\n      setFilter(field, value);\n      render();\n    }\n    return;\n  }\n  // Remove one chip from a filter pill (multi-value OR filters).\n  const fRem = e.target.closest('[data-filter-remove]');\n  if (fRem) {\n    const raw = fRem.getAttribute('data-filter-remove');\n    const idx = raw.indexOf(':');\n    if (idx > 0) {\n      removeFilterValue(raw.slice(0, idx), raw.slice(idx + 1));\n      render();\n    }\n    return;\n  }\n  if (e.target.closest('[data-filter-clear]')) {\n    clearFilters();\n    render();\n    return;\n  }\n  // Cluster selector\n  const cset = e.target.closest('[data-cluster-set]');\n  if (cset) {\n    state.cluster = cset.getAttribute('data-cluster-set');\n    setDefaultCluster(state.cluster);\n    writeUrlState();\n    render();\n    return;\n  }\n  // Save current view\n  if (e.target.closest('[data-view-save]')) {\n    saveCurrentView();\n    render();\n    return;\n  }\n  // Apply a saved view\n  const vApply = e.target.closest('[data-view-apply]');\n  if (vApply) {\n    applyView(vApply.getAttribute('data-view-apply'));\n    return;\n  }\n  // Delete a saved view\n  const vDel = e.target.closest('[data-view-delete]');\n  if (vDel) {\n    const id = vDel.getAttribute('data-view-delete');\n    if (confirm('Delete this view?')) {\n      deleteView(id);\n      render();\n    }\n    return;\n  }\n  // Theme\n  const th = e.target.closest('[data-theme-set]');\n  if (th) {\n    applyTheme(th.getAttribute('data-theme-set'));\n    render();\n    return;\n  }\n  // Mobile preview toggle\n  if (e.target.closest('[data-mobile-toggle]')) {\n    state.mobile = !state.mobile;\n    localStorage.setItem('xerj.mobile', state.mobile ? '1' : '0');\n    document.documentElement.classList.toggle('mobile-preview', state.mobile);\n    render();\n    return;\n  }\n  // Edit toggle\n  if (e.target.closest('[data-edit-toggle]')) {\n    state.edit = !state.edit;\n    localStorage.setItem(LS.edit, state.edit ? '1' : '0');\n    render();\n    return;\n  }\n  // Reset layout\n  if (e.target.closest('[data-reset-layout]')) {\n    const id = state.route;\n    delete state.layouts[id];\n    saveLayout(id);\n    render();\n    return;\n  }\n  // Resize (click a size number)\n  const sz = e.target.closest('[data-size]');\n  if (sz) {\n    const pid = sz.getAttribute('data-panel');\n    const cols = parseInt(sz.getAttribute('data-size'), 10);\n    const dash = registry[state.route];\n    const view = dash.render({ data: {}, time: state.time });\n    mutate(state.route, view.panels, (ov) => { ov.cols[pid] = cols; });\n    render();\n    return;\n  }\n  // Remove panel\n  const rm = e.target.closest('[data-remove]');\n  if (rm) {\n    const pid = rm.getAttribute('data-panel');\n    const dash = registry[state.route];\n    const view = dash.render({ data: {}, time: state.time });\n    mutate(state.route, view.panels, (ov) => {\n      if (!ov.hidden.includes(pid)) ov.hidden.push(pid);\n      const idx = (ov.added || []).findIndex((a) => a.id === pid);\n      if (idx >= 0) ov.added.splice(idx, 1);\n    });\n    render();\n    return;\n  }\n  // Search: query type\n  const qt = e.target.closest('[data-query-type]');\n  if (qt) {\n    state.search.type = qt.getAttribute('data-query-type');\n    runSearchNow();\n    state._focusSelector = '[data-search-input]';\n    render();\n    return;\n  }\n  // Search: index\n  const si = e.target.closest('[data-search-index]');\n  if (si) {\n    state.search.index = si.getAttribute('data-search-index');\n    runSearchNow();\n    state._focusSelector = '[data-search-input]';\n    render();\n    return;\n  }\n  // Facet apply (click-to-filter) — also drives the click-to-filter on Hit\n  // row values and the ✕ on filter pills (clicking an active value removes).\n  const fa = e.target.closest('[data-facet-apply]');\n  if (fa) {\n    const raw = fa.getAttribute('data-facet-apply');\n    const colonIdx = raw.indexOf(':');\n    const field = raw.slice(0, colonIdx);\n    const value = raw.slice(colonIdx + 1);\n    const cur = state.search.filters[field];\n    if (cur === value) delete state.search.filters[field];\n    else state.search.filters[field] = value;\n    runSearchNow();\n    render();\n    return;\n  }\n  // Clear all filters\n  if (e.target.closest('[data-facet-clear]')) {\n    state.search.filters = {};\n    runSearchNow();\n    render();\n    return;\n  }\n  // Sort a Hits column (GH#696 / GH#737)\n  const sortBtn = e.target.closest('[data-sort-field]');\n  if (sortBtn) {\n    state.search.sort = {\n      field: sortBtn.getAttribute('data-sort-field'),\n      dir:   sortBtn.getAttribute('data-sort-dir'),\n    };\n    runSearchNow();\n    render();\n    return;\n  }\n  // Toggle time-column visibility (GH#3319)\n  if (e.target.closest('[data-toggle-time]')) {\n    state.search.showTime = !state.search.showTime;\n    runSearchNow();\n    render();\n    return;\n  }\n  // Export Hits as CSV (GH#1992 — the #1 ask of all time)\n  if (e.target.closest('[data-export-csv]')) {\n    const hits = state.search.result?.hits || [];\n    const cols = state.search.showTime\n      ? ['_index', '_id', '_score', '_ts', '_source']\n      : ['_index', '_id', '_score', '_source'];\n    downloadText('xerj-search-' + new Date().toISOString().slice(0, 19).replace(/[:T]/g, '-') + '.csv',\n      'text/csv', hitsToCsv(hits, cols));\n    return;\n  }\n  // Export a panel chart as PNG (GH#1366 — 178 reactions)\n  const pngBtn = e.target.closest('[data-export-png]');\n  if (pngBtn) {\n    const sec = pngBtn.closest('.panel');\n    const svg = sec?.querySelector('svg.chart, svg.series');\n    if (svg) {\n      const id = sec.getAttribute('data-panel') || 'panel';\n      svgToPng(svg, { filename: 'xerj-' + id + '.png' }).catch((err) =>\n        console.error('PNG export failed', err));\n    }\n    return;\n  }\n  // --- MANAGE view click handlers -------------------------\n  const mgUp = e.target.closest('[data-mg-up]');\n  if (mgUp) {\n    const id = mgUp.getAttribute('data-mg-up');\n    const list = mergedDashboards(defaults, { includeHidden: true });\n    const i = list.findIndex((d) => d.id === id);\n    if (i > 0) {\n      const order = list.map((d) => d.id);\n      [order[i - 1], order[i]] = [order[i], order[i - 1]];\n      reorderDashboards(order);\n      render();\n    }\n    return;\n  }\n  const mgDown = e.target.closest('[data-mg-down]');\n  if (mgDown) {\n    const id = mgDown.getAttribute('data-mg-down');\n    const list = mergedDashboards(defaults, { includeHidden: true });\n    const i = list.findIndex((d) => d.id === id);\n    if (i >= 0 && i < list.length - 1) {\n      const order = list.map((d) => d.id);\n      [order[i + 1], order[i]] = [order[i], order[i + 1]];\n      reorderDashboards(order);\n      render();\n    }\n    return;\n  }\n  const mgRename = e.target.closest('[data-mg-rename]');\n  if (mgRename) {\n    const id = mgRename.getAttribute('data-mg-rename');\n    const current = mergedDashboards(defaults, { includeHidden: true }).find((d) => d.id === id);\n    const name = prompt('Rename \"' + (current?.name || id) + '\":', current?.name || '');\n    if (name != null) {\n      renameDashboard(id, name);\n      render();\n    }\n    return;\n  }\n  const mgHide = e.target.closest('[data-mg-hide]');\n  if (mgHide) {\n    const id = mgHide.getAttribute('data-mg-hide');\n    const list = mergedDashboards(defaults, { includeHidden: true });\n    const cur = list.find((d) => d.id === id);\n    setHidden(id, !cur?.hidden);\n    render();\n    return;\n  }\n  const mgClone = e.target.closest('[data-mg-clone]');\n  if (mgClone) {\n    const id = mgClone.getAttribute('data-mg-clone');\n    const current = mergedDashboards(defaults, { includeHidden: true }).find((d) => d.id === id);\n    const name = prompt('Clone \"' + (current?.name || id) + '\" as:', (current?.name || 'Untitled') + ' (copy)');\n    if (name) {\n      const newId = createUserDashboard({ name, fromId: id });\n      location.hash = '#/dashboards/' + newId;\n    }\n    return;\n  }\n  const mgDelete = e.target.closest('[data-mg-delete]');\n  if (mgDelete) {\n    const id = mgDelete.getAttribute('data-mg-delete');\n    if (isUserDash(id) && confirm('Delete user dashboard \"' + id + '\"? This cannot be undone.')) {\n      deleteUserDashboard(id);\n      if (state.route === id) {\n        location.hash = '#/settings';\n      } else {\n        render();\n      }\n    }\n    return;\n  }\n  const mgNew = e.target.closest('[data-mg-new]');\n  if (mgNew) {\n    const fromId = mgNew.getAttribute('data-mg-new');\n    const name = prompt(fromId ? 'New dashboard from \"' + fromId + '\" · Name:' : 'New blank dashboard · Name:', 'Untitled');\n    if (name) {\n      const newId = createUserDashboard({ name, fromId: fromId || null });\n      location.hash = '#/dashboards/' + newId;\n    }\n    return;\n  }\n  const mgCluster = e.target.closest('[data-mg-cluster]');\n  if (mgCluster) {\n    setDefaultCluster(mgCluster.getAttribute('data-mg-cluster'));\n    state._focusIndex = null;\n    render();\n    return;\n  }\n  const mgIndex = e.target.closest('[data-mg-index]');\n  if (mgIndex) {\n    state._focusIndex = mgIndex.getAttribute('data-mg-index');\n    render();\n    return;\n  }\n  if (e.target.closest('[data-mg-reset-all]')) {\n    if (confirm('Reset ALL saved state? This wipes dashboards, layouts, theme, filters.')) {\n      for (const k of Object.keys(localStorage)) {\n        if (k.startsWith('xerj.')) localStorage.removeItem(k);\n      }\n      resetDashboards();\n      location.reload();\n    }\n    return;\n  }\n\n  // Add panel (from ADD picker)\n  const add = e.target.closest('[data-add]');\n  if (add) {\n    const typeId = add.getAttribute('data-add');\n    const t = chartTypes[typeId];\n    if (!t) return;\n    const dash = registry[state.route];\n    const view = dash.render({ data: {}, time: state.time });\n    mutate(state.route, view.panels, (ov) => {\n      ov.added = ov.added || [];\n      const newId = typeId + '-' + Date.now().toString(36);\n      ov.added.push({\n        id: newId,\n        type: typeId,\n        eyebrow: t.name + ' · NEW',\n        cols: t.cols || 6,\n      });\n      ov.order = ov.order || view.panels.map((p) => p.id);\n      ov.order.push(newId);\n    });\n    render();\n    // scroll to bottom so the new panel is visible\n    requestAnimationFrame(() => window.scrollTo({ top: document.body.scrollHeight, behavior: 'smooth' }));\n    return;\n  }\n});\n\n// ---------- search input (Enter to run) -------------------\ndocument.addEventListener('keydown', (e) => {\n  // KQL-lite input on dashboards\n  const kq = e.target.closest && e.target.closest('[data-kql-input]');\n  if (kq) {\n    if (e.key === 'Enter') {\n      e.preventDefault();\n      applyKqlInput(kq.value);\n      state._focusSelector = '[data-kql-input]';\n      render();\n    } else if (e.key === 'Escape') {\n      e.preventDefault();\n      kq.value = '';\n      applyKqlInput('');\n      state._focusSelector = '[data-kql-input]';\n      render();\n    }\n    return;\n  }\n  const si = e.target.closest && e.target.closest('[data-search-input]');\n  if (si) {\n    if (e.key === 'Enter') {\n      e.preventDefault();\n      state.search.q = si.value;\n      runSearchNow();\n      state._focusSelector = '[data-search-input]';\n      render();\n    } else if (e.key === 'Escape') {\n      si.value = '';\n      state.search.q = '';\n      state.search.filters = {};\n      runSearchNow();\n      state._focusSelector = '[data-search-input]';\n      render();\n    }\n    return;\n  }\n  // Inline rename of the scene title in edit mode (contenteditable h1)\n  const rn = e.target.closest && e.target.closest('[data-rename-dash]');\n  if (rn) {\n    if (e.key === 'Enter') {\n      e.preventDefault();\n      const id = rn.getAttribute('data-rename-dash');\n      const name = rn.textContent.trim();\n      renameDashboard(id, name);\n      rn.blur();\n      render();\n    } else if (e.key === 'Escape') {\n      e.preventDefault();\n      rn.blur();\n      render();\n    }\n  }\n});\n// Custom time range — FROM/TO datetime-local inputs\ndocument.addEventListener('change', (e) => {\n  const tf = e.target.closest && e.target.closest('[data-time-from]');\n  const tt = e.target.closest && e.target.closest('[data-time-to]');\n  if (tf || tt) {\n    state.timeCustom = {\n      from: document.querySelector('[data-time-from]')?.value || '',\n      to:   document.querySelector('[data-time-to]')?.value   || '',\n    };\n    localStorage.setItem('xerj.timeFrom', state.timeCustom.from);\n    localStorage.setItem('xerj.timeTo',   state.timeCustom.to);\n    writeUrlState();\n    render();\n  }\n});\n\n// blur-save for inline rename (clicking outside the title also commits)\ndocument.addEventListener('blur', (e) => {\n  const rn = e.target.closest && e.target.closest('[data-rename-dash]');\n  if (!rn) return;\n  const id = rn.getAttribute('data-rename-dash');\n  const newName = rn.textContent.trim();\n  renameDashboard(id, newName);\n}, true);\n\n// ---------- drag and drop ---------------------------------\ndocument.addEventListener('dragstart', (e) => {\n  if (!state.edit) return;\n  const sec = e.target.closest('.panel.edit');\n  if (!sec) return;\n  dragSrcId = sec.getAttribute('data-panel');\n  sec.classList.add('dragging');\n  try {\n    e.dataTransfer.effectAllowed = 'move';\n    e.dataTransfer.setData('text/plain', dragSrcId);\n  } catch {}\n});\ndocument.addEventListener('dragover', (e) => {\n  if (!state.edit || !dragSrcId) return;\n  const sec = e.target.closest('.panel.edit');\n  if (!sec) return;\n  e.preventDefault();\n  document.querySelectorAll('.drop-before, .drop-after').forEach((el) => el.classList.remove('drop-before', 'drop-after'));\n  const rect = sec.getBoundingClientRect();\n  const after = e.clientX > rect.left + rect.width / 2;\n  sec.classList.add(after ? 'drop-after' : 'drop-before');\n});\ndocument.addEventListener('dragleave', (e) => {\n  const sec = e.target.closest('.panel.edit');\n  if (sec && !sec.contains(e.relatedTarget)) sec.classList.remove('drop-before', 'drop-after');\n});\ndocument.addEventListener('drop', (e) => {\n  if (!state.edit || !dragSrcId) return;\n  const sec = e.target.closest('.panel.edit');\n  if (!sec) return;\n  e.preventDefault();\n  const targetId = sec.getAttribute('data-panel');\n  const insertAfter = sec.classList.contains('drop-after');\n  document.querySelectorAll('.drop-before, .drop-after').forEach((el) => el.classList.remove('drop-before', 'drop-after'));\n  if (!targetId || targetId === dragSrcId) return;\n\n  const dash = registry[state.route];\n  const view = dash.render({ data: {}, time: state.time });\n  mutate(state.route, view.panels, (ov) => {\n    const fullOrder = ov.order && ov.order.length ? ov.order.slice() : view.panels.map((p) => p.id);\n    // Make sure both src and target are in the order list (they should be).\n    const have = new Set(fullOrder);\n    if (!have.has(dragSrcId)) fullOrder.push(dragSrcId);\n    if (!have.has(targetId))  fullOrder.push(targetId);\n    const from = fullOrder.indexOf(dragSrcId);\n    fullOrder.splice(from, 1);\n    let to = fullOrder.indexOf(targetId);\n    if (insertAfter) to += 1;\n    fullOrder.splice(to, 0, dragSrcId);\n    ov.order = fullOrder;\n  });\n  render();\n});\ndocument.addEventListener('dragend', () => {\n  document.querySelectorAll('.dragging').forEach((el) => el.classList.remove('dragging'));\n  document.querySelectorAll('.drop-before, .drop-after').forEach((el) => el.classList.remove('drop-before', 'drop-after'));\n  dragSrcId = null;\n});\n\n// ---------- route changes ---------------------------------\nwindow.addEventListener('hashchange', () => {\n  const parsed = parseRoute();\n  state.section = parsed.section;\n  state.route   = parsed.route;\n  // A URL with query string (e.g. from a share link) should reapply.\n  const urlState = parseUrlState();\n  if (urlState.time)    state.time    = urlState.time;\n  if (urlState.cluster) state.cluster = urlState.cluster;\n  if (urlState.filters) {\n    state.filters[state.route] = { ...(state.filters[state.route] || {}), ...urlState.filters };\n    saveFilters(state.route);\n  }\n  writeUrlState();\n  render();\n});\n\n// Boot the refresh interval if the user had one saved.\nif (state.refresh > 0) setRefreshInterval(state.refresh);\n\n// Restore mobile preview class if it was active.\nif (state.mobile) document.documentElement.classList.add('mobile-preview');\n\nrender();"
      },
      {
        "label": "first-launch setup page",
        "cmd": "curl -s \"http://localhost:9200/_xerj-console/setup\"",
        "status": 200,
        "pass": true,
        "output": "<!doctype html>\n<html lang=\"en\" data-theme=\"night\">\n<head>\n<meta charset=\"utf-8\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n<title>Xerj Console · setup</title>\n<meta name=\"color-scheme\" content=\"dark light\">\n<link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n<link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n<link href=\"https://fonts.googleapis.com/css2?family=Big+Shoulders+Display:wght@800;900&family=JetBrains+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap\" rel=\"stylesheet\">\n<link rel=\"stylesheet\" href=\"assets/tokens.css\">\n<link rel=\"stylesheet\" href=\"assets/base.css\">\n<link rel=\"icon\" href=\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ctext y='13' font-family='monospace' font-size='14' font-weight='900' fill='%23EEBB00'%3Ez%3C/text%3E%3C/svg%3E\">\n<style>\n  body {\n    min-height: 100vh; display: flex; align-items: center; justify-content: center;\n    padding: 2rem;\n  }\n  .auth-card {\n    background: var(--bg-surface, #15171a);\n    border: 1px solid var(--border, #2a2d33);\n    border-radius: 8px; padding: 2rem;\n    max-width: 480px; width: 100%;\n    color: var(--fg, #e6e8eb);\n  }\n  .auth-card h1 {\n    font-family: 'Big Shoulders Display', sans-serif;\n    font-weight: 900; font-size: 2.25rem; letter-spacing: -0.02em;\n    margin: 0 0 .5rem; color: #EEBB00;\n  }\n  .auth-card p.lead { color: var(--fg-mute, #8a8e95); margin: 0 0 1.5rem; }\n  .step { display: none; }\n  .step.active { display: block; }\n  label { display: block; font-weight: 500; margin: 1rem 0 .25rem; font-size: 0.875rem; }\n  input[type=\"email\"], input[type=\"text\"] {\n    width: 100%; padding: 0.625rem 0.75rem;\n    background: var(--bg, #0c0d10);\n    border: 1px solid var(--border, #2a2d33);\n    border-radius: 4px; color: var(--fg, #e6e8eb);\n    font-family: inherit; font-size: 0.9rem;\n  }\n  input:focus { outline: 2px solid #EEBB00; outline-offset: 1px; }\n  button {\n    background: #EEBB00; color: #0c0d10;\n    border: none; padding: 0.75rem 1.5rem;\n    font-weight: 600; border-radius: 4px;\n    cursor: pointer; margin-top: 1.5rem;\n    font-family: inherit; font-size: 0.9rem;\n  }\n  button:disabled { opacity: 0.5; cursor: not-allowed; }\n  button.secondary { background: transparent; color: var(--fg-mute); border: 1px solid var(--border); }\n  .err {\n    background: #3a1a1a; color: #ff8a8a;\n    padding: 0.75rem 1rem; border-radius: 4px;\n    margin: 1rem 0; font-size: 0.875rem;\n    font-family: 'JetBrains Mono', monospace;\n  }\n  .ok {\n    background: #1a3a1f; color: #8aff9c;\n    padding: 0.75rem 1rem; border-radius: 4px;\n    margin: 1rem 0; font-size: 0.875rem;\n  }\n  .role {\n    display: inline-block;\n    background: #EEBB00; color: #0c0d10;\n    padding: 0.125rem 0.5rem;\n    border-radius: 3px; font-size: 0.75rem;\n    font-weight: 700; letter-spacing: 0.05em;\n    text-transform: uppercase;\n  }\n</style>\n</head>\n<body>\n  <div class=\"auth-card\">\n    <h1>XERJ CONSOLE</h1>\n    <p class=\"lead\">First-launch setup — claim this server by enrolling a passkey.</p>\n\n    <div id=\"err\" class=\"err\" hidden></div>\n    <div id=\"ok\" class=\"ok\" hidden></div>\n\n    <!-- Step 1: collect email + display name (token already in URL fragment) -->\n    <div id=\"step-info\" class=\"step active\">\n      <p>You're claiming the role <span class=\"role\" id=\"role-pill\">owner</span> on this server.</p>\n      <label for=\"email\">Email</label>\n      <input id=\"email\" type=\"email\" placeholder=\"[email protected]\" required autocomplete=\"email\">\n\n      <label for=\"display\">Display name</label>\n      <input id=\"display\" type=\"text\" placeholder=\"Your name\" autocomplete=\"name\">\n\n      <label for=\"pkname\">Passkey name (visible to you only)</label>\n      <input id=\"pkname\" type=\"text\" value=\"My main key\" autocomplete=\"off\">\n\n      <button id=\"btn-enrol\">Enrol passkey</button>\n    </div>\n\n    <!-- Step 2: in-flight WebAuthn ceremony -->\n    <div id=\"step-touch\" class=\"step\">\n      <p style=\"font-size: 1.05rem;\">Touch your security key, biometric sensor, or platform passkey now…</p>\n      <p class=\"lead\" style=\"margin-top: 1rem;\">If your browser didn't prompt automatically, click <em>Try again</em>.</p>\n      <button id=\"btn-retry\" class=\"secondary\">Try again</button>\n    </div>\n\n    <!-- Step 3: done -->\n    <div id=\"step-done\" class=\"step\">\n      <p style=\"font-size: 1.05rem; color: #8aff9c;\">✓ Passkey enrolled. Logging you in…</p>\n    </div>\n  </div>\n\n<script type=\"module\">\nimport { redeemMagic, beginEnrol, finishEnrol, b64uToBuf, bufToB64u } from './src/xerj-console-auth.js';\n\nconst $err  = document.getElementById('err');\nconst $ok   = document.getElementById('ok');\nconst $rolePill = document.getElementById('role-pill');\nconst $email = document.getElementById('email');\nconst $display = document.getElementById('display');\nconst $pkname = document.getElementById('pkname');\nconst $btnEnrol = document.getElementById('btn-enrol');\nconst $btnRetry = document.getElementById('btn-retry');\n\nfunction showStep(id) {\n  for (const el of document.querySelectorAll('.step')) el.classList.remove('active');\n  document.getElementById(id).classList.add('active');\n}\nfunction showError(msg) {\n  $err.textContent = msg; $err.hidden = false;\n  $ok.hidden = true;\n}\nfunction showOk(msg) {\n  $ok.textContent = msg; $ok.hidden = false;\n  $err.hidden = true;\n}\n\n// Pull token from URL fragment (#token=...). Hide it from history immediately.\nfunction tokenFromHash() {\n  const frag = window.location.hash.replace(/^#/, '');\n  const params = new URLSearchParams(frag);\n  return params.get('token');\n}\nfunction clearHash() {\n  history.replaceState(null, '', window.location.pathname + window.location.search);\n}\n\nconst token = tokenFromHash();\nif (!token) {\n  showError('No magic-link token in URL. The link must include #token=…');\n  $btnEnrol.disabled = true;\n}\n\n// Eagerly redeem the token on page load — it's single-use; we want\n// to consume it before the user does anything else.\nlet enrollmentSession = null;\n(async () => {\n  if (!token) return;\n  try {\n    enrollmentSession = await redeemMagic(token);\n    clearHash();\n    if (enrollmentSession.role) $rolePill.textContent = enrollmentSession.role;\n    if (enrollmentSession.email) $email.value = enrollmentSession.email;\n  } catch (e) {\n    showError('Could not redeem link: ' + e.message);\n    $btnEnrol.disabled = true;\n  }\n})();\n\nasync function enrol() {\n  $err.hidden = true;\n  if (!enrollmentSession) {\n    showError('Enrollment session missing — reload from the magic link.');\n    return;\n  }\n  const email = $email.value.trim();\n  const display = $display.value.trim() || email;\n  const pkname = $pkname.value.trim() || 'default';\n  if (!email) {\n    showError('Email is required.');\n    return;\n  }\n\n  showStep('step-touch');\n\n  try {\n    const begin = await beginEnrol(enrollmentSession.enrollment_session_id, email, display);\n    // Decode WebAuthn binary fields from base64url to ArrayBuffer.\n    const opts = JSON.parse(JSON.stringify(begin.creation_options.publicKey));\n    opts.challenge = b64uToBuf(opts.challenge);\n    opts.user.id = b64uToBuf(opts.user.id);\n    if (opts.excludeCredentials) {\n      for (const c of opts.excludeCredentials) c.id = b64uToBuf(c.id);\n    }\n\n    const cred = await navigator.credentials.create({ publicKey: opts });\n    if (!cred) throw new Error('Browser returned no credential.');\n\n    // Re-encode the credential response for transport.\n    const att = cred.response;\n    const credPayload = {\n      id: cred.id,\n      rawId: bufToB64u(cred.rawId),\n      type: cred.type,\n      response: {\n        clientDataJSON: bufToB64u(att.clientDataJSON),\n        attestationObject: bufToB64u(att.attestationObject),\n      },\n      extensions: cred.getClientExtensionResults ? cred.getClientExtensionResults() : {},\n    };\n\n    await finishEnrol(\n      enrollmentSession.enrollment_session_id,\n      begin.challenge_id,\n      credPayload,\n      pkname, email, display\n    );\n\n    showStep('step-done');\n    showOk('Enrolled. Redirecting…');\n    setTimeout(() => { window.location.href = '/_xerj-console/'; }, 800);\n  } catch (e) {\n    showStep('step-info');\n    showError(e.message || String(e));\n  }\n}\n\n$btnEnrol.addEventListener('click', enrol);\n$btnRetry.addEventListener('click', () => { showStep('step-info'); });\n</script>\n</body>\n</html>"
      }
    ]
  }
]