@autorag/librarian 2.8.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/NOTICE +4 -4
  2. package/README.md +120 -24
  3. package/dist/agent/agent.d.ts +147 -78
  4. package/dist/agent/answer-citations.d.ts +22 -0
  5. package/dist/agent/answer-guidelines.d.ts +9 -9
  6. package/dist/agent/citations.d.ts +42 -7
  7. package/dist/agent/datasource-skill.d.ts +30 -16
  8. package/dist/agent/evidence-judgment.d.ts +58 -0
  9. package/dist/agent/evidence-ledger.d.ts +54 -0
  10. package/dist/agent/evidence-origins.d.ts +49 -0
  11. package/dist/agent/index.d.ts +2 -2
  12. package/dist/agent/jikji-find-tool.d.ts +2 -1
  13. package/dist/agent/pi-session.d.ts +8 -1
  14. package/dist/agent/query-peer-tool.d.ts +3 -0
  15. package/dist/agent/query-routing.d.ts +71 -10
  16. package/dist/agent/{emit-results-tool.d.ts → results.d.ts} +11 -11
  17. package/dist/agent/search-all-tool.d.ts +5 -5
  18. package/dist/agent/search-documents.d.ts +14 -27
  19. package/dist/agent/search-minsync-tool.d.ts +5 -5
  20. package/dist/agent/search-single-datasource-tool.d.ts +9 -8
  21. package/dist/agent/self-config.d.ts +40 -0
  22. package/dist/agent/system-prompt.d.ts +2 -3
  23. package/dist/agent/web-fetch-tool.d.ts +2 -1
  24. package/dist/agent/web-search-tool.d.ts +2 -1
  25. package/dist/cli/commands/evidence.d.ts +2 -2
  26. package/dist/cli/commands/memory.d.ts +1 -1
  27. package/dist/cli/commands/report.d.ts +2 -2
  28. package/dist/cli/commands/tui.d.ts +3 -2
  29. package/dist/cli/config.d.ts +16 -8
  30. package/dist/cli/index.d.ts +1 -1
  31. package/dist/cli/index.js +11133 -10103
  32. package/dist/cli/output.d.ts +2 -6
  33. package/dist/cloud/authorize.d.ts +12 -0
  34. package/dist/cloud/callback-server.d.ts +33 -0
  35. package/dist/cloud/callback.d.ts +23 -0
  36. package/dist/cloud/config.d.ts +23 -0
  37. package/dist/cloud/errors.d.ts +46 -0
  38. package/dist/cloud/index.d.ts +12 -0
  39. package/dist/cloud/models.d.ts +32 -0
  40. package/dist/cloud/oauth-login.d.ts +22 -0
  41. package/dist/cloud/pkce.d.ts +20 -0
  42. package/dist/cloud/provider.d.ts +40 -0
  43. package/dist/cloud/token.d.ts +22 -0
  44. package/dist/config/home.d.ts +6 -0
  45. package/dist/core.d.ts +10 -21
  46. package/dist/core.js +15272 -14207
  47. package/dist/datasource/chunk-store.d.ts +2 -6
  48. package/dist/datasource/connector-skill.d.ts +2 -3
  49. package/dist/datasource/index.d.ts +2 -4
  50. package/dist/datasource/registry.d.ts +11 -13
  51. package/dist/datasource/scope.d.ts +19 -0
  52. package/dist/datasource/skills/github-gist/index.d.ts +1 -1
  53. package/dist/datasource/skills/github-gist/semantic.d.ts +3 -44
  54. package/dist/datasource/skills/github-gist/skill.d.ts +3 -3
  55. package/dist/datasource/types.d.ts +14 -28
  56. package/dist/embedding-runtime/gateway-embedder.d.ts +41 -0
  57. package/dist/index.d.ts +2 -1
  58. package/dist/index.js +15488 -14359
  59. package/dist/language.d.ts +2 -1
  60. package/dist/mcp/index.js +15413 -14341
  61. package/dist/memory/check-memory-tool.d.ts +8 -4
  62. package/dist/memory/context.d.ts +51 -0
  63. package/dist/memory/index.d.ts +8 -1
  64. package/dist/memory/judged-evidence.d.ts +32 -0
  65. package/dist/memory/memory.d.ts +36 -120
  66. package/dist/memory/renderer.d.ts +16 -7
  67. package/dist/memory/similar-queries.d.ts +40 -0
  68. package/dist/minsync/client.d.ts +1 -1
  69. package/dist/minsync/errors.d.ts +14 -0
  70. package/dist/minsync/index.d.ts +1 -0
  71. package/dist/minsync/installer.d.ts +1 -1
  72. package/dist/minsync/method.d.ts +3 -3
  73. package/dist/mirror/sync.d.ts +5 -2
  74. package/dist/observability/run-log.d.ts +1 -1
  75. package/dist/parser/defaults.d.ts +16 -5
  76. package/dist/parser/index.d.ts +1 -1
  77. package/dist/parser/kordoc.d.ts +8 -1
  78. package/dist/parser/ocr-engines.d.ts +19 -0
  79. package/dist/retrieval/bm25.d.ts +19 -0
  80. package/dist/retrieval/engine.d.ts +17 -58
  81. package/dist/retrieval/index.d.ts +3 -2
  82. package/dist/retrieval/merger.d.ts +6 -0
  83. package/dist/retrieval/rerank.d.ts +2 -2
  84. package/dist/retrieval/selection.d.ts +33 -41
  85. package/dist/retrieval/types.d.ts +1 -26
  86. package/dist/web/search/format.d.ts +5 -2
  87. package/dist/web/search/index.d.ts +7 -1
  88. package/package.json +5 -5
  89. package/skills/autorag/SKILL.md +21 -22
  90. package/skills/autorag-doctor/SKILL.md +20 -15
  91. package/skills/autorag-lite-setup/SKILL.md +22 -19
  92. package/skills/autorag-setup/SKILL.md +34 -21
  93. package/dist/agent/fast-answer-tool.d.ts +0 -46
  94. package/dist/cli/commands/feedback.d.ts +0 -8
  95. package/dist/datasource/access-context.d.ts +0 -43
  96. package/dist/datasource/result-filter.d.ts +0 -64
  97. package/dist/parser/ocr.d.ts +0 -31
package/NOTICE CHANGED
@@ -6,16 +6,16 @@ legacy/ package license: Apache-2.0
6
6
 
7
7
  Third-party production dependencies:
8
8
 
9
- @earendil-works/pi-agent-core@0.86.1
9
+ @earendil-works/pi-agent-core@1.1.0
10
10
  License: MIT
11
11
 
12
- @earendil-works/pi-ai@0.86.1
12
+ @earendil-works/pi-ai@1.1.0
13
13
  License: MIT
14
14
 
15
- @earendil-works/pi-coding-agent@0.86.1
15
+ @earendil-works/pi-coding-agent@1.1.0
16
16
  License: MIT
17
17
 
18
- @earendil-works/pi-tui@0.86.1
18
+ @earendil-works/pi-tui@1.1.0
19
19
  License: MIT
20
20
 
21
21
  @modelcontextprotocol/server@2.3.0
package/README.md CHANGED
@@ -61,7 +61,7 @@ Three principles drive every design decision in AutoRAG Agent:
61
61
 
62
62
  AutoRAG Agent orchestrates five integrated subsystems:
63
63
 
64
- 1. **Self-Evolving Memory System (`check_memory`):** Before querying, the agent consults historical outcomes stored in `~/.autorag/memory.json` to prioritize retrieval methods that have proven successful for similar queries.
64
+ 1. **Retrieval Memory (`check_memory`):** After each answer, cited evidence Jev judges to genuinely support it is stored in `~/.autorag/memory.json`. Later searches receive this conversation's evidence, similar past questions, and long-term insights as **advisory reference** — it never reorders results or overrides current evidence. See [docs/retrieval-memory.md](docs/retrieval-memory.md).
65
65
  2. **Pluggable Multi-Method Retrieval:**
66
66
  - **BM25 Lexical Search:** Fast keyword ranking via MinSync over parsed markdown mirrors.
67
67
  - **Semantic Vector Search:** Dense vector retrieval over CDC chunks via the built-in embedding gateway.
@@ -69,16 +69,16 @@ AutoRAG Agent orchestrates five integrated subsystems:
69
69
  - **Jikji Find-First Discovery:** Local CLI-backed fast discovery answer packs.
70
70
  - **Everything File-Name Search (Windows):** The bundled [voidtools Everything](https://www.voidtools.com/) indexes file and folder names under your search roots so the agent finds files by name, extension, path, size, or date instantly (`everything_search`).
71
71
  - **FSearch File-Name Search (macOS/Linux):** [fsearch-cli](https://github.com/NomaDamas/fsearch-mac) (FSearch) keeps a live, per-workspace name index of your search roots so the agent finds files by name, extension, path, size, or date instantly (`fsearch_search`); without fsearch-cli installed it degrades to a slow filesystem walk.
72
- - **Datasource Skills:** Server-authorized federated retrieval across external applications.
73
- 3. **Result Merger & Scoped Access Gate:** Cross-method deduplication, score normalization, and default-deny permission checks.
72
+ - **Datasource Skills:** Federated retrieval across every configured external datasource.
73
+ 3. **Result Merger & Scope Narrowing:** Cross-method deduplication, score normalization, and ordinary query-scope narrowing.
74
74
  4. **Direct Evidence Reading (`bash`):** The agent directly opens and inspects promising files with `cat`, `grep`, or `find` to verify facts against ground truth.
75
- 5. **Curation & Active Feedback:** Structured findings are returned via `emit_autorag_results`. When callers provide feedback on which items were useful, AutoRAG records this to optimize future queries.
75
+ 5. **Curation:** The final answer is the model's plain reply; the harness resolves its inline `[eN]` citations into numbered, source-backed results; cited evidence that Jev judges to genuinely support the answer is remembered as reference context for later searches ([docs/retrieval-memory.md](docs/retrieval-memory.md)).
76
76
 
77
77
  ### Pi host boundary
78
78
 
79
- AutoRAG uses `@earendil-works/pi-coding-agent` as the runtime host for model sessions. Pi owns provider credentials and OAuth storage, model-runtime dispatch, session JSONL persistence/resume, extension loading, lifecycle events, and the built-in `read`/`bash`/`edit`/`write`/`grep`/`find`/`ls` tools. AutoRAG registers only its domain tools and keeps orchestration outside the host: datasource authorization, MinSync/Jikji preparation, memory hints, fast-to-verification two-phase search, structured result emission, and remote-session filtering.
79
+ AutoRAG uses `@earendil-works/pi-coding-agent` as the runtime host for model sessions. Pi owns provider credentials and OAuth storage, model-runtime dispatch, session JSONL persistence/resume, extension loading, lifecycle events, and the built-in `read`/`bash`/`edit`/`write`/`grep`/`find`/`ls` tools. AutoRAG registers only its domain tools and keeps orchestration outside the host: datasource orchestration, MinSync/Jikji preparation, memory hints, fast-to-verification two-phase search, structured result emission, and remote-session filtering.
80
80
 
81
- The CLI TUI (`autorag tui`) is Pi's interactive mode hosted on the AutoRAG librarian: there is no separate AutoRAG renderer. Pi owns the terminal UI and its native in-session commands — `/login`/`/logout`, `/model`, `/resume`, `/new`, `/tree`, `/compact`, and `/settings` — so provider sign-in and model selection work on first launch even when no AutoRAG model is configured. AutoRAG registers its retrieval tools and streams progress, preliminary answers, and final results into the same Pi session, so resume and two-phase search keep working together.
81
+ The CLI TUI (`autorag tui`) is Pi's interactive mode hosted on the AutoRAG librarian: there is no separate AutoRAG renderer. Pi owns the terminal UI and its native in-session commands — `/login`/`/logout`, `/model`, `/resume`, `/new`, `/tree`, `/compact`, and `/settings` — so provider sign-in and model selection work on first launch even when no AutoRAG model is configured. AutoRAG registers its retrieval tools and runs the two-phase search in the same Pi session, where the model's progress notes, first answer, and final answer are ordinary assistant messages, so resume and two-phase search keep working together.
82
82
 
83
83
  Update notices are AutoRAG's, not Pi's: `autorag tui` suppresses Pi's "run `pi update`" banner (Pi is a bundled host, not a separate install) and instead checks the published `@autorag/librarian` release, showing a one-line notice in the session when a newer version exists. Set `AUTORAG_NO_UPDATE_CHECK=1` to skip the lookup; `AUTORAG_UPDATE_CHECK_URL` overrides the registry endpoint.
84
84
 
@@ -118,8 +118,8 @@ cp -R "$AUTORAG_SKILLS/autorag-lite-setup" .claude/skills/
118
118
  Run the setup skill once to register the stdio server with the host. Reload the
119
119
  agent, then discover the actual tool names and schemas with MCP `tools/list`.
120
120
  The normal Lite path is `autorag.status` → `autorag.refresh` when needed →
121
- `autorag.search`; use `autorag.report`, `autorag.evidence`, and
122
- `autorag.feedback` for the optional curation lifecycle. Copy `skills/autorag`
121
+ `autorag.search`; use `autorag.report` and `autorag.evidence` for the optional
122
+ curation lifecycle. Copy `skills/autorag`
123
123
  and `skills/autorag-setup` only when the agent should also drive the
124
124
  model-backed librarian, and `skills/autorag-doctor` for diagnostics. Other
125
125
  agents read their own skill directories; copy the same setup folder there and
@@ -166,10 +166,9 @@ hard-code a tool count.
166
166
 
167
167
  Core Lite tools include `autorag.status`, `autorag.search`,
168
168
  `autorag.search.files`, `autorag.datasources.list`, `autorag.datasources.get`,
169
- `autorag.refresh`, `autorag.report`, `autorag.evidence`, and
170
- `autorag.feedback`. Configured integrated datasources expose additional scoped
171
- search tools. Read-only MCP mode omits mutating tools such as refresh, report,
172
- and feedback.
169
+ `autorag.refresh`, `autorag.report`, and `autorag.evidence`. Configured
170
+ integrated datasources expose additional scoped search tools. Read-only MCP
171
+ mode omits mutating tools such as refresh and report.
173
172
 
174
173
  ## ⚡ AutoRAG Lite: Model-Free Retrieval Engine
175
174
 
@@ -277,15 +276,59 @@ falling back to `["ko", "en"]`. Supported tags: `ko`, `en`, `ja`, `zh-hans`,
277
276
  | `.pptx` | built-in PPTX reader |
278
277
  | `.eml` | built-in mail reader |
279
278
  | `.txt` `.text` `.md` `.markdown` | plain text (CP949/EUC-KR aware) |
280
- | `.png` `.jpg` `.jpeg` `.bmp` `.tiff` `.webp` | image OCR (opt-in) |
279
+ | `.png` `.jpg` `.jpeg` `.webp` | `kordoc` image OCR (only when `parserOptions.ocr.enabled` is `true`) |
281
280
 
282
- OCR is opt-in and never runs unless enabled, so indexing downloads no model by
283
- default. When enabled, `languages` selects the recognition languages
284
- (`ja` → `jpn`, `zh-hans` → `chi_sim`, …) for both standalone images and scanned
285
- PDF pages.
281
+ `.bmp` and `.tiff` are not parsed: kordoc rejects both as unsupported.
282
+
283
+ ### Making photos and scans searchable
284
+
285
+ Image files and scanned PDF pages become searchable through one switch,
286
+ `parserOptions.ocr.enabled` (default `false`). It is off by default so indexing
287
+ downloads no recognition model and never runs OCR over a photo library. With it
288
+ off, image files are not parsed at all and scanned pages stay unrecognized.
289
+
290
+ ```json
291
+ { "languages": ["ko", "en"], "parserOptions": { "ocr": { "enabled": true } } }
292
+ ```
293
+
294
+ `kordoc` owns both inputs. The configured `languages` pick the engine:
295
+
296
+ | `languages` | Engine | First-use download |
297
+ |---|---|---|
298
+ | only `ko` and/or `en` | kordoc built-in PP-OCRv5 (local CPU) | ~18 MB from Hugging Face, cached in `~/.cache/kordoc/models` |
299
+ | any other tag (`ja`, `zh-hans`, `fr`, `de`, …) | Tesseract, all configured languages at once (`kor+jpn`) | traineddata per language from the jsDelivr CDN, cached in `<workspace>/.autorag/models/tessdata` |
300
+
301
+ The built-in model has no kana, han, Cyrillic, Thai, Arabic or Devanagari
302
+ characters and drops diacritics in accented Latin text, so those languages need
303
+ Tesseract. Set `parserOptions.ocr.cachePath` to store the Tesseract models
304
+ elsewhere, or `KORDOC_OFFLINE=1` to block the built-in model download. An
305
+ explicit `parserOptions.kordoc.ocr` overrides the language-based choice.
306
+
307
+ Photos and videos are also reachable through two other paths that are not part
308
+ of this switch: the `clawgallery` datasource (captions and visual search over its
309
+ own folders) and Jikji's media index (`jikji.enableMediaIndex`, file facts such as
310
+ pixel size and format only, no content). Video content is not searchable yet.
286
311
 
287
312
  ### 2. Search from CLI
288
313
 
314
+ `autorag search` needs one chat model. `autorag init` does not pick one, so on
315
+ first run either sign in and choose a model inside the TUI:
316
+
317
+ ```bash
318
+ autorag tui # then /login (OAuth or API key) and /model
319
+ ```
320
+
321
+ or add the `model` entry to your existing AutoRAG config, preserving its other
322
+ settings. Find provider/model ids with `autorag models list --available`:
323
+
324
+ ```json
325
+ "model": { "provider": "<provider>", "id": "<id>" }
326
+ ```
327
+
328
+ Then run `autorag health`. Do not re-run `autorag init --force` just to select
329
+ a model: it replaces the existing config, including datasource and parser settings.
330
+ Configure the provider's credentials through `/login` or its supported environment variables.
331
+
289
332
  ```bash
290
333
  # Perform a curated search (uses your configured reasoning model)
291
334
  autorag search "What are our primary Q3 deliverables?"
@@ -312,11 +355,62 @@ for (const result of response.results) {
312
355
  console.log(`[${result.number}] ${result.title} (${result.source})`);
313
356
  console.log(` ${result.summary}`);
314
357
  }
358
+ ```
315
359
 
316
- // Record feedback: Result [1] was useful, [2] was not
317
- agent.recordFeedbackByNumbers(response.sessionId, [1], [2]);
360
+ ---
361
+
362
+ ## Hosted AutoRAG Plan (Dazzi)
363
+
364
+ AutoRAG can run on the hosted **AutoRAG** plan as a first-class model provider named
365
+ `autorag`. The provider speaks the server's OpenAI Responses API surface (`<root>/v1`),
366
+ so streaming, tool calls, and usage are handled by Pi's built-in `openai-responses`
367
+ implementation, and the model catalog is discovered live from the server — no model id
368
+ is baked into AutoRAG.
369
+
370
+ Sign in from the interactive TUI:
371
+
372
+ ```text
373
+ autorag tui
374
+ /login # choose "AutoRAG"; the browser completes a PKCE login
375
+ ```
376
+
377
+ Headless (no browser) with a long-lived API key:
378
+
379
+ ```bash
380
+ export AUTORAG_API_KEY=dz_...
381
+ ```
382
+
383
+ On a fresh agent home, pin the model with an explicit endpoint so it resolves
384
+ offline without a catalog snapshot — this is the headless configuration:
385
+
386
+ ```json
387
+ {
388
+ "model": {
389
+ "provider": "autorag",
390
+ "id": "anthropic/claude-haiku-5.5",
391
+ "baseUrl": "https://api.dazziapp.com/v1",
392
+ "api": "openai-responses",
393
+ "apiKeyEnv": "AUTORAG_API_KEY"
394
+ }
395
+ }
318
396
  ```
319
397
 
398
+ The `provider`/`id`-only shorthand (`{ "provider": "autorag", "id": "anthropic/claude-haiku-5.5" }`)
399
+ only resolves once a TUI `/login` or a model refresh has persisted the catalog
400
+ snapshot; with no snapshot there is nothing to restore offline, and resolution
401
+ fails with `Unknown configured model: autorag/<id>`.
402
+
403
+ | Variable | Default | Meaning |
404
+ |---|---|---|
405
+ | `AUTORAG_BASE_URL` | `https://api.dazziapp.com` | Server **root** (not the `/v1` path); the API base is `<root>/v1`. |
406
+ | `AUTORAG_API_KEY` | – | Headless API key. A stored `/login` credential takes precedence. |
407
+
408
+ The catalog is persisted after a `/login` (or any model refresh), so the
409
+ `provider`/`id` shorthand `model: { provider: "autorag", id }`
410
+ keeps resolving offline. When you are not signed in the provider still registers — it appears under
411
+ `/login`, contributes no models, and makes no network call. See
412
+ [Hosted AutoRAG provider](docs/cloud-provider.md) for the full flow.
413
+
320
414
  ---
321
415
 
322
416
  ## CLI Command Reference
@@ -333,7 +427,7 @@ agent.recordFeedbackByNumbers(response.sessionId, [1], [2]);
333
427
  | `autorag tui` | Open Pi's interactive librarian TUI (`/login`, `/model`, `/resume`, …) |
334
428
  | `autorag duplicates [DIR]` | Read-only scan for exact and near-duplicate document families with `dupey` |
335
429
  | `autorag lite ...` | CLI bootstrap, indexing repair, terminal maintenance, and fallback interface; agents use MCP for normal Lite operation |
336
- | `autorag feedback <session>` | Record numbered feedback; MCP clients normally use `autorag.feedback`, and the CLI stays available for terminal maintenance |
430
+ | `autorag memory inspect` | Render a read-only, path-opaque snapshot of retrieval memory (judged evidence, curated results, evidence chunks, insights); model-free |
337
431
  | `autorag evidence <session>` | Inspect persisted evidence behind numbered results; MCP clients normally use `autorag.evidence`, and the CLI stays available for terminal maintenance |
338
432
  | `autorag serve` | Start the P2P query server over SimpleX (opt-in) |
339
433
  | `autorag p2p ...` | Manage peer trust, query approvals, and sharing policies |
@@ -346,8 +440,9 @@ Deep dive into AutoRAG Agent's architecture, security, and integration guides:
346
440
 
347
441
  - **[MinSync Setup & Embedding QA](docs/minsync-setup.md):** Automatic binary installation, CDC chunking, and EmbeddingGemma verification.
348
442
  - **[Local Embedding Runtime & Gateway](docs/embedding-runtime.md):** AutoRAG-owned local gateway, model prefetching, and zero-egress semantic search. Model cards: [`qwen3-embedding-0.6b`](docs/model-cards/qwen3-embedding-0.6b.md), [`embeddinggemma-300m`](docs/model-cards/embeddinggemma-300m.md).
443
+ - **[Hosted AutoRAG Provider](docs/cloud-provider.md):** The `autorag` (Dazzi) model provider — PKCE `/login`, `AUTORAG_API_KEY`, `AUTORAG_BASE_URL`, live model discovery, and offline catalog snapshots.
349
444
  - **[Datasource Skills Reference](docs/datasource-skills.md):** Full configuration contracts, connection aliases, and connector options.
350
- - **[Jev Decisions](docs/jev-decisions.md):** Jev query pipeline, **on by default** via OpenRouter: it routes each question to local search, web search, or a direct answer, splits multi-part questions into up to five parallel searches (`openrouter/qwen/qwen3.7-flash`), and ends the run after the fast answer when that answer is complete. Also covers the `jev` judgment tool, backends (OpenRouter, TypeSafe, Vercel AI Gateway), and how to opt out.
445
+ - **[Jev Decisions](docs/jev-decisions.md):** Jev query pipeline, **on by default** via OpenRouter: it routes each question to a direct answer (intrinsic knowledge) or local search (everything needing more information; web search is left to the agent after the fast answer), splits multi-part questions into up to five parallel searches (`openrouter/qwen/qwen3.7-flash`), picks which registered datasources to search before the fast answer, and ends the run after the fast answer when that answer is complete. Also covers the `jev` judgment tool, backends (OpenRouter, TypeSafe, Vercel AI Gateway), and how to opt out.
351
446
  - **[Manual QA & Datasource Test Harnesses](docs/manual-qa-datasources.md):** Real-world testing guides for Discord, KakaoTalk, Slack, Notion, and email.
352
447
  - **[P2P SimpleX Sharing & Path Standard](docs/p2p-path-standard.md):** Decentralized peer query sharing with SimpleX, PII redaction, and approval queues.
353
448
  - **[Supply Chain Security & License Audits](docs/supply-chain.md):** Software bill of materials (SBOM) and dependency gate policies.
@@ -400,7 +495,7 @@ itself through the connected Lite MCP server:
400
495
  autorag.status {}
401
496
  autorag.refresh {}
402
497
  autorag.search {"query":"a word that certainly appears","topK":3}
403
- autorag.search {"query":"recent topic","tags":["discord"],"topK":3}
498
+ autorag.search {"query":"recent topic","scope":"/discord/local/**","topK":3}
404
499
  ```
405
500
 
406
501
  The CLI equivalents remain available for terminal repair, but do not use them
@@ -413,9 +508,10 @@ Common failures and their fix:
413
508
  | Results are missing recent files | `stale-index` | `autorag refresh --method parsed,minsync --json` |
414
509
  | Semantic search returns nothing after changing the embedder | `embedding-identity-mismatch` | `autorag index rebuild --method minsync` |
415
510
  | Gateway will not start, a previous run was killed | `lock-conflict` | `autorag gateway stop`, then retry |
416
- | A datasource is healthy in its own CLI but absent from results | — | add its tag/scope to `datasourceAccess` |
511
+ | A datasource is healthy in its own CLI but absent from results | — | confirm it is configured under `datasources` and connected through its native CLI |
417
512
  | A datasource errors during refresh | `datasource-index-failed` | run that CLI's own `doctor` |
418
- | MinSync or Jikji missing | `minsync-unavailable`, `jikji-unavailable` | check the Rust toolchain, re-run refresh |
513
+ | MinSync binary missing (search and refresh fail with `MinSync is required ...`) | — | `cargo install minsync`, or leave `minSync.autoInstall` on and re-run refresh |
514
+ | Jikji missing | `jikji-unavailable` | check the Rust toolchain, re-run refresh |
419
515
  | Windows file-name search fails during refresh | `everything-index-failed` | read the ES exit code and stderr in the message, then `autorag refresh --method everything --json` |
420
516
  | Every search does a full local search and verification, even for small talk | `query-route-fallback` | set `OPENROUTER_API_KEY` (Jev routing and decomposition are on by default) |
421
517