@autorag/librarian 2.5.1 → 2.5.2
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.
- package/NOTICE +3 -0
- package/README.md +229 -490
- package/dist/agent/agent.d.ts +44 -2
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/search-datasource-tool.d.ts +1 -0
- package/dist/agent/search-single-datasource-tool.d.ts +57 -0
- package/dist/agent/web-fetch-tool.d.ts +32 -0
- package/dist/agent/web-search-tool.d.ts +48 -0
- package/dist/cli/commands/lite-retrieve.d.ts +15 -0
- package/dist/cli/commands/search.d.ts +6 -0
- package/dist/cli/config.d.ts +20 -0
- package/dist/cli/index.js +6478 -372
- package/dist/core.d.ts +3 -1
- package/dist/core.js +6499 -409
- package/dist/datasource/connector-skill.d.ts +6 -0
- package/dist/datasource/crawler-skill.d.ts +2 -0
- package/dist/datasource/errors.d.ts +26 -0
- package/dist/datasource/skills/slack/index.d.ts +8 -0
- package/dist/datasource/tool-naming.d.ts +11 -0
- package/dist/index.js +6508 -419
- package/dist/minsync/types.d.ts +7 -0
- package/dist/retrieval/engine.d.ts +14 -5
- package/dist/retrieval/index.d.ts +2 -1
- package/dist/retrieval/merger.d.ts +30 -5
- package/dist/retrieval/skip.d.ts +41 -0
- package/dist/retrieval/types.d.ts +23 -2
- package/dist/web/entities.d.ts +10 -0
- package/dist/web/fetch/convert.d.ts +35 -0
- package/dist/web/fetch/feeds.d.ts +37 -0
- package/dist/web/fetch/html-renderer.d.ts +54 -0
- package/dist/web/fetch/index.d.ts +12 -0
- package/dist/web/fetch/negotiate.d.ts +27 -0
- package/dist/web/fetch/page-loader.d.ts +60 -0
- package/dist/web/fetch/render.d.ts +23 -0
- package/dist/web/fetch/turndown/gfm.d.ts +11 -0
- package/dist/web/fetch/turndown/html.d.ts +5 -0
- package/dist/web/fetch/turndown/index.d.ts +10 -0
- package/dist/web/fetch/turndown/service.d.ts +21 -0
- package/dist/web/fetch/turndown/types.d.ts +73 -0
- package/dist/web/fetch/url-target.d.ts +29 -0
- package/dist/web/search/browser-headers.d.ts +17 -0
- package/dist/web/search/browser-loader.d.ts +56 -0
- package/dist/web/search/browser-page.d.ts +41 -0
- package/dist/web/search/credentials.d.ts +10 -0
- package/dist/web/search/format.d.ts +30 -0
- package/dist/web/search/index.d.ts +46 -0
- package/dist/web/search/model-auth.d.ts +36 -0
- package/dist/web/search/provider.d.ts +62 -0
- package/dist/web/search/providers/anthropic.d.ts +9 -0
- package/dist/web/search/providers/base.d.ts +106 -0
- package/dist/web/search/providers/codex.d.ts +9 -0
- package/dist/web/search/providers/duckduckgo.d.ts +22 -0
- package/dist/web/search/providers/ecosia.d.ts +29 -0
- package/dist/web/search/providers/gemini.d.ts +9 -0
- package/dist/web/search/providers/google.d.ts +22 -0
- package/dist/web/search/providers/mojeek.d.ts +24 -0
- package/dist/web/search/providers/parallel.d.ts +10 -0
- package/dist/web/search/providers/perplexity.d.ts +10 -0
- package/dist/web/search/providers/public.d.ts +15 -0
- package/dist/web/search/providers/responses-api.d.ts +26 -0
- package/dist/web/search/providers/searxng.d.ts +19 -0
- package/dist/web/search/providers/startpage.d.ts +25 -0
- package/dist/web/search/providers/utils.d.ts +39 -0
- package/dist/web/search/providers/xai.d.ts +9 -0
- package/dist/web/search/query.d.ts +193 -0
- package/dist/web/search/types.d.ts +198 -0
- package/dist/web/search/utils.d.ts +8 -0
- package/package.json +2 -1
- package/skills/autorag/SKILL.md +2 -1
- package/skills/autorag-doctor/SKILL.md +237 -0
- package/skills/autorag-lite-search/SKILL.md +29 -7
- package/skills/autorag-lite-setup/SKILL.md +20 -13
- package/skills/autorag-setup/SKILL.md +32 -14
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autorag-doctor
|
|
3
|
+
description: Diagnose and repair a broken or half-working AutoRAG install so every configured source is both indexed and searchable. Checks AutoRAG, MinSync, Jikji, the embedding gateway, and every CLI-backed datasource (katok, discrawl, slacrawl, wacrawl, telecrawl, notcrawl, qmd, mailcrawl, rclone, Spotlight), then fixes orphan locks, orphan processes, embedding dimension or identity mismatches, stale indexes, and missing setup. Use when search returns nothing or too little, refresh hangs or fails, a datasource disappeared from results, indexes look stale, the gateway will not start, or the user asks to check, diagnose, verify, or repair AutoRAG.
|
|
4
|
+
license: MIT
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AutoRAG doctor
|
|
8
|
+
|
|
9
|
+
Goal: every configured datasource is **indexed** *and* **actually returns
|
|
10
|
+
hits**. A green `status` is not enough — the run is done only when a real query
|
|
11
|
+
returns a real hit per datasource, or the datasource is reported as genuinely
|
|
12
|
+
empty or not configured.
|
|
13
|
+
|
|
14
|
+
Always finish with the status table in [Report](#report).
|
|
15
|
+
|
|
16
|
+
## Safety
|
|
17
|
+
|
|
18
|
+
- Never delete, move, or edit source documents.
|
|
19
|
+
- Never delete a datasource's **native** store (`~/.katok`, `~/.discrawl`,
|
|
20
|
+
`~/.mailcrawl`, `.qmd`, Telegram/WhatsApp/Notion archives). AutoRAG only
|
|
21
|
+
reads them; rebuilding them is the owning CLI's job.
|
|
22
|
+
- Only AutoRAG-owned state under `AUTORAG_HOME` and the workspace `.autorag`
|
|
23
|
+
directory may be reset.
|
|
24
|
+
- Never print token or password values. Report credential **names** only.
|
|
25
|
+
- Kill a process only after confirming it is an AutoRAG-owned orphan.
|
|
26
|
+
|
|
27
|
+
## 1. Triage the core
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
autorag status --json
|
|
31
|
+
autorag health --json
|
|
32
|
+
autorag gateway status --format json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- `status` reports `state`, `stale`, `diagnostics`, and per-component state for
|
|
36
|
+
`minsync`, `jikji`, and `datasources`. `stale: true` or any `stale-index`
|
|
37
|
+
diagnostic means the corpus changed since the last successful refresh.
|
|
38
|
+
- `health` resolves the single search model and does one live completion probe.
|
|
39
|
+
`--skip-probes` only proves config shape, never live access; do not claim a
|
|
40
|
+
healthy model from it.
|
|
41
|
+
- The gateway is on-demand: `stopped` is normal when nothing is embedding.
|
|
42
|
+
`unavailable` **while** a refresh is running is a real failure.
|
|
43
|
+
|
|
44
|
+
Config lives at `--config`, `AUTORAG_CONFIG`, `$AUTORAG_HOME/config.json`, or
|
|
45
|
+
`~/.autorag/config.json`. Read `searchPaths`, `workspacePath`, `minSync`,
|
|
46
|
+
`jikji`, `datasources`, and `datasourceAccess` before changing anything.
|
|
47
|
+
|
|
48
|
+
If the CLI itself is missing or the config does not exist, stop and run the
|
|
49
|
+
`autorag-setup` skill first — doctor repairs an existing install, it does not
|
|
50
|
+
create one.
|
|
51
|
+
|
|
52
|
+
## 2. Probe every datasource natively
|
|
53
|
+
|
|
54
|
+
Each CLI owns its archive, so ask the CLI, not AutoRAG. A datasource is only
|
|
55
|
+
`active` when its binary exists, its store is present, and its own check passes.
|
|
56
|
+
|
|
57
|
+
| Datasource | Native check | Re-sync when empty or stale |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| MinSync (local docs) | `minsync status`, `minsync check`, `minsync verify` | `autorag refresh --method minsync` |
|
|
60
|
+
| Jikji (discovery) | `jikji doctor` | `autorag refresh --method jikji` |
|
|
61
|
+
| KakaoTalk | `katok doctor` | `katok sync && katok index` |
|
|
62
|
+
| Discord | `discrawl --json metadata` | `discrawl sync` |
|
|
63
|
+
| Slack | `slacrawl --json doctor` | `slacrawl sync` |
|
|
64
|
+
| WhatsApp | `wacrawl --json doctor` | `wacrawl import` |
|
|
65
|
+
| Telegram | `telecrawl --json doctor`, `telecrawl --json status` | `telecrawl import` |
|
|
66
|
+
| Notion | `notcrawl doctor`, `notcrawl status` | `notcrawl sync --source desktop` |
|
|
67
|
+
| Obsidian / notes | `qmd status` | `qmd update && qmd embed` |
|
|
68
|
+
| Mail | `mailcrawl doctor`, `mailcrawl status` | `mailcrawl sync && mailcrawl index` |
|
|
69
|
+
| Cloud drive | `rclone listremotes` | `autorag refresh --method datasources` |
|
|
70
|
+
| Spotlight (macOS) | `mdutil -s /` | indexed by the OS; no AutoRAG sync |
|
|
71
|
+
|
|
72
|
+
Rules:
|
|
73
|
+
|
|
74
|
+
- A missing binary is **not configured**, not a failure. Report it with the
|
|
75
|
+
install command and move on.
|
|
76
|
+
- An empty store is a legitimate zero-hit result. `telecrawl` and `slacrawl`
|
|
77
|
+
return JSON `null` (not `[]`) for no hits — treat that as empty, not broken.
|
|
78
|
+
- A configured datasource whose native check fails is a **failure** and must be
|
|
79
|
+
repaired or reported explicitly. Never report a skip as a pass.
|
|
80
|
+
- Zero hits with a non-empty store means the CLI's search path is suspect, not
|
|
81
|
+
the data. Cross-check against the raw index before concluding (for example
|
|
82
|
+
`slacrawl sql "select count(*) from message_fts where message_fts match 'x';"`
|
|
83
|
+
against `slacrawl search x`). A populated index plus an empty CLI result is an
|
|
84
|
+
upstream bug: report it with the exact reproduction instead of re-syncing.
|
|
85
|
+
|
|
86
|
+
## 3. Prove searchability
|
|
87
|
+
|
|
88
|
+
Indexing without retrieval is a failed run. Probe retrieval per datasource with
|
|
89
|
+
the model-free path, then once end to end:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
autorag lite retrieve "a word that certainly appears" --top-k 3 --json --debug
|
|
93
|
+
autorag lite retrieve "recent topic" --tags discord --top-k 3 --json --debug
|
|
94
|
+
autorag lite retrieve "recent mail subject" --scope "/mailcrawl/**" --top-k 3 --json --debug
|
|
95
|
+
autorag search "summarize the collection" --top-k 3 --json --debug
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
- **Always pass `--debug` when diagnosing, and read the diagnostics.** A run
|
|
99
|
+
that silently dropped a whole retrieval method still looks successful, just
|
|
100
|
+
with fewer results; only the diagnostics name it (`minsync-unavailable`,
|
|
101
|
+
`retrieval-method-failed`). `autorag search --json` hides `diagnostics`,
|
|
102
|
+
`sessionId`, and per-result evidence unless `--debug` is set. `lite retrieve
|
|
103
|
+
--json` always carries the `diagnostics` array, but its human-readable output
|
|
104
|
+
hides it without `--debug`.
|
|
105
|
+
- A method missing from the returned `method` values means that method
|
|
106
|
+
contributed nothing. During a full MinSync re-sync this is expected: the
|
|
107
|
+
store is being rebuilt, `minsync status` reports `NotSynced`, and local-file
|
|
108
|
+
hits stay absent until it finishes. Confirm with `minsync status` before
|
|
109
|
+
treating it as a failure, and never kill a running sync to "fix" it.
|
|
110
|
+
- `lite retrieve` needs no model, so it isolates retrieval from model failures.
|
|
111
|
+
- Use `--tags` / `--scope` to force one datasource; they can only narrow
|
|
112
|
+
trusted access, never grant it. A datasource absent from `datasourceAccess`
|
|
113
|
+
returns nothing no matter how healthy its store is — fix the config, not the
|
|
114
|
+
store.
|
|
115
|
+
- `autorag evidence SESSION --json` (session id comes from `--json --debug`)
|
|
116
|
+
shows the exact chunk behind a numbered result; use it to confirm a hit is
|
|
117
|
+
real and its source is readable.
|
|
118
|
+
- Local-file hits must map to an absolute, existing path. Datasource hits keep
|
|
119
|
+
source-native identities such as `/kakao/personal/chunks/42`; those are not
|
|
120
|
+
filesystem paths and must never be passed to `cat`.
|
|
121
|
+
|
|
122
|
+
## 4. Repair playbook
|
|
123
|
+
|
|
124
|
+
### Orphan lock
|
|
125
|
+
|
|
126
|
+
The embedding runtime keeps `embedding-runtime.lock`, `embedding-runtime.pid`,
|
|
127
|
+
and `embedding-runtime.port` in `AUTORAG_HOME`. It reclaims them automatically
|
|
128
|
+
when the recorded PID is dead; a `lock-conflict` means the PID is **alive**.
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
autorag gateway status --format json
|
|
132
|
+
autorag gateway stop
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Only when `gateway stop` cannot clear it, and the recorded PID is confirmed
|
|
136
|
+
dead (`kill -0 PID` fails), remove the three files by hand and retry.
|
|
137
|
+
|
|
138
|
+
Index locks are owned by their engines: MinSync/tantivy locks under
|
|
139
|
+
`<workspace>/.autorag/`, and per-CLI locks such as
|
|
140
|
+
`<workspace>/.autorag/datasources/discrawl/.discrawl-sync.lock`. Delete one
|
|
141
|
+
only after confirming no owning process is alive; otherwise wait for the run
|
|
142
|
+
that holds it.
|
|
143
|
+
|
|
144
|
+
### Orphan process
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
pgrep -fl 'autorag|autorag-gateway|minsync' | grep -v pgrep
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
A refresh that was killed mid-run can leave the gateway or a `minsync` child
|
|
151
|
+
alive. Stop the gateway with `autorag gateway stop` first; only kill a PID
|
|
152
|
+
directly when it is confirmed orphaned (no parent CLI, no live refresh).
|
|
153
|
+
Re-run `autorag status --json` afterwards to confirm `inFlight: false`.
|
|
154
|
+
|
|
155
|
+
### Embedding model mismatch
|
|
156
|
+
|
|
157
|
+
`embedding-identity-mismatch` or a dimension error means the vectors on disk
|
|
158
|
+
were built with a different embedder than the configured one. Vectors of two
|
|
159
|
+
different dimensions can never be compared, so the index must be rebuilt:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
autorag models prefetch --profile qwen3-embedding-0.6b
|
|
163
|
+
autorag index rebuild --method minsync
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The current default is the local `native:Qwen/Qwen3-Embedding-0.6B` runtime at
|
|
167
|
+
1024 dimensions. A workspace still pinned to the legacy 768-dimension
|
|
168
|
+
Ollama/TEI path must be reindexed explicitly, or pinned to an explicit profile.
|
|
169
|
+
Changing `embedder.dimension` in config **without** a rebuild leaves retrieval
|
|
170
|
+
silently empty. Keep embeddings local; do not point the embedder at a remote
|
|
171
|
+
endpoint to work around a local failure.
|
|
172
|
+
|
|
173
|
+
### Stale index
|
|
174
|
+
|
|
175
|
+
`stale-index` diagnostics or `stale: true` mean sources changed after the last
|
|
176
|
+
refresh.
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
autorag refresh --method parsed,minsync --json
|
|
180
|
+
autorag refresh --force --json
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Use `--force` only when incremental refresh does not clear it. For continuous
|
|
184
|
+
freshness install an hourly `autorag watch --once` job (cron, launchd, systemd
|
|
185
|
+
timer, or Task Scheduler).
|
|
186
|
+
|
|
187
|
+
### Missing or wrong setup
|
|
188
|
+
|
|
189
|
+
- `unknown-datasource-skill`: the config key is not a builtin template and has
|
|
190
|
+
no `"type"`. It is skipped, not fatal — fix the name or add `"type"`.
|
|
191
|
+
- `datasource-index-failed` / `sync-failed`: the backing CLI errored. Run that
|
|
192
|
+
CLI's own check from the table above and fix it there.
|
|
193
|
+
- `minsync-unavailable` / `jikji-unavailable`: the binary is missing and
|
|
194
|
+
auto-install failed. Both install through cargo; verify the Rust toolchain,
|
|
195
|
+
then `autorag refresh --method minsync` to retry.
|
|
196
|
+
- `auth-error` / `rate-limited`: model or datasource credentials. Report the
|
|
197
|
+
missing environment-variable **name** and let the user supply it.
|
|
198
|
+
- A datasource configured but not listed in `datasourceAccess.allowedTags` /
|
|
199
|
+
`allowedScopes` is default-denied and invisible to search. Add it there.
|
|
200
|
+
|
|
201
|
+
## Diagnostic codes
|
|
202
|
+
|
|
203
|
+
| Code | Meaning | First move |
|
|
204
|
+
|---|---|---|
|
|
205
|
+
| `stale-index` | Sources changed since last refresh | `autorag refresh --method parsed,minsync` |
|
|
206
|
+
| `index-not-ready` | Index missing or never built | `autorag refresh --json` |
|
|
207
|
+
| `minsync-unavailable` | MinSync binary missing or install failed | Check cargo, retry refresh |
|
|
208
|
+
| `jikji-unavailable` | Jikji binary missing or install failed | Check cargo, retry refresh |
|
|
209
|
+
| `embedding-identity-mismatch` | Indexed vectors use a different embedder | `autorag index rebuild --method minsync` |
|
|
210
|
+
| `embedder-unavailable` | Embedding gateway or runtime down | `autorag gateway status --format json` |
|
|
211
|
+
| `lock-conflict` | Another runtime holds the lock | `autorag gateway stop` |
|
|
212
|
+
| `datasource-index-failed` | Backing CLI failed to index | Run that CLI's own doctor |
|
|
213
|
+
| `datasource-empty` | Store has no matching content | Re-sync with the CLI, or accept as empty |
|
|
214
|
+
| `unknown-datasource-skill` | Config name is not a known template | Fix the name or add `"type"` |
|
|
215
|
+
| `retrieval-method-failed` | One method errored during the query | Read `--debug` diagnostics |
|
|
216
|
+
| `auth-error` | Credentials missing or rejected | Report the env var name |
|
|
217
|
+
|
|
218
|
+
## Report
|
|
219
|
+
|
|
220
|
+
Always end with this table, one row per datasource and per AutoRAG component:
|
|
221
|
+
|
|
222
|
+
| Source | Configured | Indexed | Searchable | Issue found | Fix applied |
|
|
223
|
+
|---|---|---|---|---|---|
|
|
224
|
+
| minsync | yes | yes | yes (3 hits) | – | – |
|
|
225
|
+
| discord | yes | yes | no | stale archive | `discrawl sync` |
|
|
226
|
+
| telegram | no | – | – | CLI not installed | reported |
|
|
227
|
+
|
|
228
|
+
`Searchable` must come from an actual query in step 3, never inferred from
|
|
229
|
+
index state. Follow the table with the exact remaining action for every row
|
|
230
|
+
that is not fully green.
|
|
231
|
+
|
|
232
|
+
## Completion condition
|
|
233
|
+
|
|
234
|
+
Done only when: core triage is clean or every remaining diagnostic is
|
|
235
|
+
explained, every configured datasource passed its native check, every one of
|
|
236
|
+
them returned a real hit or is proven empty, every repair was re-verified by
|
|
237
|
+
re-running the failing check, and the report table was delivered.
|
|
@@ -58,6 +58,7 @@ The JSON envelope is:
|
|
|
58
58
|
"content": "..."
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
+
"unsearched": [],
|
|
61
62
|
"diagnostics": []
|
|
62
63
|
}
|
|
63
64
|
```
|
|
@@ -79,11 +80,32 @@ The JSON envelope is:
|
|
|
79
80
|
`method` that produced it. Source identities are source-native: real file
|
|
80
81
|
paths for local files, datasource identities for datasource results. Never
|
|
81
82
|
rewrite, guess, or flatten them.
|
|
82
|
-
- `
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
83
|
+
- `unsearched` lists the retrieval surfaces that did not run for this query.
|
|
84
|
+
`ok: true` with a non-empty `unsearched` means the answer is partial: for
|
|
85
|
+
example local MinSync files are skipped while an index sync holds the
|
|
86
|
+
workspace lock, leaving only datasource hits. Check `unsearched.length > 0`
|
|
87
|
+
before concluding that the returned sources are the whole corpus. Each entry
|
|
88
|
+
is:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"surface": "minsync",
|
|
93
|
+
"methods": ["hybrid", "minsync"],
|
|
94
|
+
"reason": "MinSyncQueryError: another sync is in progress (/Users/me/corpus/.autorag/minsync)"
|
|
95
|
+
}
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
`surface` is `minsync` for local files or the datasource id. `reason` is the
|
|
99
|
+
underlying failure verbatim — the CLI's failure kind, exit status, stderr and
|
|
100
|
+
real paths — so the operator can act on it directly. Report it to the user as
|
|
101
|
+
given; do not summarize it away.
|
|
102
|
+
- `diagnostics` carry the same transparency: `source` is the component or
|
|
103
|
+
method label, `reason` repeats the underlying error, and codes include
|
|
104
|
+
`retrieval-method-failed` and `minsync-unavailable`. A degraded component
|
|
105
|
+
produces a diagnostic, not a failed run; check `diagnostics` before trusting
|
|
106
|
+
an empty result set.
|
|
107
|
+
- `--debug` adds per-result metadata and the diagnostics list to human output.
|
|
108
|
+
Skipped-surface warnings print without it, and their reasons carry real
|
|
87
109
|
filesystem paths.
|
|
88
110
|
- Exit codes: 0 on success (results may be empty, and a stale index is a
|
|
89
111
|
warning rather than a failure), 2 for usage, config, not-ready, or
|
|
@@ -168,6 +190,6 @@ autorag feedback <sessionId> --useful 1,3 --not-useful 2 --json
|
|
|
168
190
|
- Never expose provider credentials or authentication payloads.
|
|
169
191
|
- Treat report `source` values as opaque: persist them verbatim, never read
|
|
170
192
|
the filesystem through them.
|
|
171
|
-
-
|
|
172
|
-
|
|
193
|
+
- Surface diagnostics and `unsearched` reasons to the user as written; they
|
|
194
|
+
carry the real error text needed to fix the failure.
|
|
173
195
|
- Prefer `--json` whenever another agent consumes the output.
|
|
@@ -64,14 +64,17 @@ setup. Configure datasources directly in trusted config, wizard-style:
|
|
|
64
64
|
|
|
65
65
|
1. Probe every datasource for setup feasibility before asking the user
|
|
66
66
|
anything: the backing CLI exists (`katok`, `discrawl`, `slacrawl`,
|
|
67
|
-
`wacrawl`, `telecrawl`, `notcrawl`, `qmd`, `mailcrawl`, `rclone`)
|
|
68
|
-
local store or archive is present
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
`wacrawl`, `telecrawl`, `notcrawl`, `qmd`, `mailcrawl`, `rclone`) and its
|
|
68
|
+
local store or archive is present. CLI-backed datasources own their own
|
|
69
|
+
archive, index, and authentication, so environment credentials (such as bot
|
|
70
|
+
tokens) are never required or checked for them. Non-CLI connectors
|
|
71
|
+
(such as `github`) require their credential environment variable
|
|
72
|
+
(`GITHUB_TOKEN`).
|
|
71
73
|
2. Auto-configure every datasource that probes feasible — write its trusted
|
|
72
74
|
`datasources` / `datasourceAccess` entries without asking. For example,
|
|
73
|
-
when Slack (`slacrawl`) and Discord (`discrawl`) are installed
|
|
74
|
-
automatically.
|
|
75
|
+
when Slack (`slacrawl`) and Discord (`discrawl`) are installed with local
|
|
76
|
+
stores present, set both up automatically. Discord uses discrawl's local
|
|
77
|
+
desktop wiretap archive; no Discord bot token is configured or needed.
|
|
75
78
|
3. Skip every datasource that probes infeasible (for example Notion or
|
|
76
79
|
Telegram when their CLIs are not installed) and always report the skipped
|
|
77
80
|
list to the user, with what is missing for each.
|
|
@@ -112,11 +115,14 @@ autorag lite refresh --force --json
|
|
|
112
115
|
- MinSync and Jikji auto-install on first use by default. If they are missing
|
|
113
116
|
or broken, run a full refresh or return to setup rather than silently
|
|
114
117
|
degrading to lexical-only search.
|
|
115
|
-
- MinSync's default embedder is
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
- MinSync's default embedder is in-process native Qwen3 embeddings
|
|
119
|
+
(`native:Qwen/Qwen3-Embedding-0.6B`, 1024 dimensions, MinSync 0.4.5+): no
|
|
120
|
+
embedder flags, no API key, and no external daemon (such as Ollama) are
|
|
121
|
+
needed, and no corpus text leaves the machine. For gateway-profiled
|
|
122
|
+
embeddings, prefetch with `autorag models prefetch --profile qwen3-embedding-0.6b`.
|
|
123
|
+
The legacy Ollama/TEI adapter path (EmbeddingGemma, 768 dimensions) is for
|
|
124
|
+
manual QA only. Override the embedder only when intentionally using a
|
|
125
|
+
different provider.
|
|
120
126
|
- Exact duplicate exclusion during refresh is enabled by default via the
|
|
121
127
|
external `dupey` CLI. Install dupey during setup when it is missing
|
|
122
128
|
(`command -v dupey || cargo install dupey`) and tell the user the feature is
|
|
@@ -174,8 +180,9 @@ autorag lite duplicates --json
|
|
|
174
180
|
## Unavailable components and failure handling
|
|
175
181
|
|
|
176
182
|
Missing optional components degrade gracefully: refresh and retrieval continue
|
|
177
|
-
with
|
|
178
|
-
|
|
183
|
+
with diagnostics such as `minsync-unavailable` or `retrieval-method-failed`
|
|
184
|
+
instead of failing the whole run. Each one quotes the underlying error verbatim,
|
|
185
|
+
and `lite retrieve --json` also names the skipped surface under `unsearched`. Exit codes are 0
|
|
179
186
|
on success, 2 for config or usage errors, and 1 for runtime errors. When a
|
|
180
187
|
component stays unavailable after a full refresh, return to setup rather than
|
|
181
188
|
accepting silently degraded search.
|
|
@@ -143,11 +143,17 @@ is impossible, refresh continues without this optimization and the user is
|
|
|
143
143
|
told duplicate exclusion is off. Set `"excludeExactDuplicates": false` to
|
|
144
144
|
index every copy.
|
|
145
145
|
|
|
146
|
-
MinSync's default embedder is
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
146
|
+
MinSync's default embedder is in-process native Qwen3 embeddings
|
|
147
|
+
(`native:Qwen/Qwen3-Embedding-0.6B`, 1024 dimensions, MinSync 0.4.5+). The
|
|
148
|
+
default needs no embedder flags, no API key, and no external daemon (such as
|
|
149
|
+
Ollama) — all embeddings run in-process locally and privately. For workspaces
|
|
150
|
+
using the loopback llama-server gateway, prefetch the verified model with
|
|
151
|
+
`autorag models prefetch --profile qwen3-embedding-0.6b` (or verify with
|
|
152
|
+
`autorag models verify --profile qwen3-embedding-0.6b`).
|
|
153
|
+
|
|
154
|
+
The legacy Ollama/TEI adapter path (EmbeddingGemma, 768 dimensions) is
|
|
155
|
+
supported only for existing legacy workspaces and manual QA; do not use it as a
|
|
156
|
+
fresh install default.
|
|
151
157
|
|
|
152
158
|
Override the embedder only when intentionally using a different, for example
|
|
153
159
|
remote, provider:
|
|
@@ -163,26 +169,36 @@ autorag init \
|
|
|
163
169
|
|
|
164
170
|
Only store the environment-variable name, never its value. Dimension and batch
|
|
165
171
|
size must be positive integers, and the dimension must match the embedder
|
|
166
|
-
(EmbeddingGemma is 768; text-embedding-3-small is 1536).
|
|
172
|
+
(default Qwen3 is 1024; legacy EmbeddingGemma is 768; text-embedding-3-small is 1536).
|
|
167
173
|
|
|
168
174
|
## Probe and configure datasource skills (setup wizard)
|
|
169
175
|
|
|
176
|
+
Use `autorag setup` to probe the local runtime, model profile, and known
|
|
177
|
+
datasources automatically:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
autorag setup --format json
|
|
181
|
+
```
|
|
182
|
+
|
|
170
183
|
`autorag ui` is still in development — do not recommend it for datasource
|
|
171
184
|
setup. Configure datasources directly in trusted config, wizard-style:
|
|
172
185
|
|
|
173
186
|
1. Probe every datasource for setup feasibility before asking the user
|
|
174
187
|
anything: the backing CLI exists (`katok`, `discrawl`, `slacrawl`,
|
|
175
|
-
`wacrawl`, `telecrawl`, `notcrawl`, `qmd`, `mailcrawl`, `rclone`)
|
|
176
|
-
local store or archive is present
|
|
177
|
-
|
|
178
|
-
|
|
188
|
+
`wacrawl`, `telecrawl`, `notcrawl`, `qmd`, `mailcrawl`, `rclone`) and its
|
|
189
|
+
local store or archive is present. CLI-backed datasources own their own
|
|
190
|
+
archive, index, and authentication, so environment credentials (such as bot
|
|
191
|
+
tokens) are never required or checked for them. Non-CLI connectors
|
|
192
|
+
(such as `github`) require their credential environment variable
|
|
193
|
+
(`GITHUB_TOKEN`).
|
|
179
194
|
2. Auto-configure every datasource that probes feasible — write its trusted
|
|
180
195
|
`datasources` / `datasourceAccess` entries without asking. For example,
|
|
181
|
-
when Slack (`slacrawl`) and Discord (`discrawl`) are installed
|
|
182
|
-
automatically.
|
|
196
|
+
when Slack (`slacrawl`) and Discord (`discrawl`) are installed with local
|
|
197
|
+
stores present, set both up automatically. Discord uses discrawl's local
|
|
198
|
+
desktop wiretap archive; no Discord bot token is configured or needed.
|
|
183
199
|
3. Skip every datasource that probes infeasible (for example Notion or
|
|
184
|
-
Telegram when their CLIs are not
|
|
185
|
-
list to the user, with what is missing for each.
|
|
200
|
+
Telegram when their CLIs or native stores are not present) and always
|
|
201
|
+
report the skipped list to the user, with what is missing for each.
|
|
186
202
|
4. Set up a skipped datasource only when the user explicitly asks for it:
|
|
187
203
|
install or authenticate the backing CLI first, then configure it.
|
|
188
204
|
5. E-mail datasources (`mail-export`, `mailcrawl`) matter to most
|
|
@@ -230,12 +246,14 @@ datasource is removed.
|
|
|
230
246
|
Configuration alone is not a successful setup:
|
|
231
247
|
|
|
232
248
|
```bash
|
|
249
|
+
autorag setup --format json
|
|
233
250
|
autorag status --json
|
|
234
251
|
autorag health --json
|
|
235
252
|
autorag refresh --json
|
|
236
253
|
autorag search "summarize the collection" --top-k 3 --json --debug
|
|
237
254
|
```
|
|
238
255
|
|
|
256
|
+
- `setup` probes runtime health, model profile, and datasource readiness.
|
|
239
257
|
- `status` is model-free and path-opaque.
|
|
240
258
|
- `health` resolves the single model, checks credential presence, and normally
|
|
241
259
|
performs one live completion probe.
|