@autorag/librarian 2.0.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 (110) hide show
  1. package/LICENSE +27 -0
  2. package/README.md +275 -0
  3. package/dist/agent/agent.d.ts +294 -0
  4. package/dist/agent/bash-tool.d.ts +41 -0
  5. package/dist/agent/datasource-skill.d.ts +45 -0
  6. package/dist/agent/emit-results-tool.d.ts +75 -0
  7. package/dist/agent/index.d.ts +11 -0
  8. package/dist/agent/jikji-find-tool.d.ts +73 -0
  9. package/dist/agent/search-all-tool.d.ts +36 -0
  10. package/dist/agent/search-bm25-tool.d.ts +18 -0
  11. package/dist/agent/search-datasource-tool.d.ts +26 -0
  12. package/dist/agent/search-documents.d.ts +56 -0
  13. package/dist/agent/search-minsync-tool.d.ts +24 -0
  14. package/dist/agent/system-prompt.d.ts +13 -0
  15. package/dist/agent/watch-refresh.d.ts +29 -0
  16. package/dist/cli/commands/feedback.d.ts +8 -0
  17. package/dist/cli/commands/health.d.ts +146 -0
  18. package/dist/cli/commands/index.d.ts +9 -0
  19. package/dist/cli/commands/init.d.ts +9 -0
  20. package/dist/cli/commands/memory.d.ts +8 -0
  21. package/dist/cli/commands/refresh.d.ts +19 -0
  22. package/dist/cli/commands/search.d.ts +34 -0
  23. package/dist/cli/commands/status.d.ts +7 -0
  24. package/dist/cli/commands/types.d.ts +10 -0
  25. package/dist/cli/commands/watch.d.ts +8 -0
  26. package/dist/cli/config.d.ts +172 -0
  27. package/dist/cli/index.d.ts +10 -0
  28. package/dist/cli/index.js +10845 -0
  29. package/dist/cli/output.d.ts +32 -0
  30. package/dist/config/home.d.ts +2 -0
  31. package/dist/datasource/access-context.d.ts +49 -0
  32. package/dist/datasource/diagnostics.d.ts +20 -0
  33. package/dist/datasource/index.d.ts +9 -0
  34. package/dist/datasource/polling.d.ts +51 -0
  35. package/dist/datasource/registry.d.ts +52 -0
  36. package/dist/datasource/result-filter.d.ts +63 -0
  37. package/dist/datasource/scope.d.ts +38 -0
  38. package/dist/datasource/skills/katok/client.d.ts +24 -0
  39. package/dist/datasource/skills/katok/index.d.ts +12 -0
  40. package/dist/datasource/skills/katok/methods.d.ts +40 -0
  41. package/dist/datasource/skills/katok/paths.d.ts +40 -0
  42. package/dist/datasource/skills/katok/skill.d.ts +33 -0
  43. package/dist/datasource/skills/katok/types.d.ts +146 -0
  44. package/dist/datasource/types.d.ts +183 -0
  45. package/dist/filesystem/file-lock.d.ts +16 -0
  46. package/dist/filesystem/source-paths.d.ts +38 -0
  47. package/dist/index.d.ts +11 -0
  48. package/dist/index.js +9361 -0
  49. package/dist/jikji/answer-pack.d.ts +31 -0
  50. package/dist/jikji/client.d.ts +18 -0
  51. package/dist/jikji/diagnostics.d.ts +26 -0
  52. package/dist/jikji/index.d.ts +10 -0
  53. package/dist/jikji/installer.d.ts +46 -0
  54. package/dist/jikji/path-map.d.ts +8 -0
  55. package/dist/jikji/types.d.ts +112 -0
  56. package/dist/manifest/index.d.ts +2 -0
  57. package/dist/manifest/loader.d.ts +3 -0
  58. package/dist/manifest/types.d.ts +8 -0
  59. package/dist/memory/check-memory-tool.d.ts +13 -0
  60. package/dist/memory/index.d.ts +5 -0
  61. package/dist/memory/memory.d.ts +179 -0
  62. package/dist/memory/renderer.d.ts +6 -0
  63. package/dist/minsync/client.d.ts +14 -0
  64. package/dist/minsync/embedder-config.d.ts +22 -0
  65. package/dist/minsync/index.d.ts +7 -0
  66. package/dist/minsync/installer.d.ts +27 -0
  67. package/dist/minsync/method.d.ts +37 -0
  68. package/dist/minsync/paths.d.ts +4 -0
  69. package/dist/minsync/process.d.ts +10 -0
  70. package/dist/minsync/types.d.ts +33 -0
  71. package/dist/minsync/workspace.d.ts +14 -0
  72. package/dist/mirror/index-store.d.ts +16 -0
  73. package/dist/mirror/index.d.ts +5 -0
  74. package/dist/mirror/paths.d.ts +6 -0
  75. package/dist/mirror/sync.d.ts +38 -0
  76. package/dist/observability/run-log.d.ts +53 -0
  77. package/dist/parser/defaults.d.ts +6 -0
  78. package/dist/parser/eml.d.ts +6 -0
  79. package/dist/parser/errors.d.ts +5 -0
  80. package/dist/parser/hwp.d.ts +6 -0
  81. package/dist/parser/index.d.ts +10 -0
  82. package/dist/parser/ocr.d.ts +25 -0
  83. package/dist/parser/office.d.ts +16 -0
  84. package/dist/parser/opendataloader-pdf.d.ts +21 -0
  85. package/dist/parser/plain-text.d.ts +6 -0
  86. package/dist/parser/registry.d.ts +8 -0
  87. package/dist/parser/text.d.ts +2 -0
  88. package/dist/parser/types.d.ts +14 -0
  89. package/dist/parser/xml-text.d.ts +2 -0
  90. package/dist/retrieval/evidence-id.d.ts +16 -0
  91. package/dist/retrieval/index.d.ts +7 -0
  92. package/dist/retrieval/merger.d.ts +18 -0
  93. package/dist/retrieval/methods/bm25.d.ts +52 -0
  94. package/dist/retrieval/registry.d.ts +8 -0
  95. package/dist/retrieval/scope.d.ts +4 -0
  96. package/dist/retrieval/types.d.ts +64 -0
  97. package/dist/subagents/contracts.d.ts +90 -0
  98. package/dist/subagents/dispatch-templates.d.ts +104 -0
  99. package/dist/subagents/dispatch-validation.d.ts +169 -0
  100. package/dist/subagents/explorer-tools-extension.d.ts +4 -0
  101. package/dist/subagents/explorer-tools-extension.js +130 -0
  102. package/dist/subagents/local-models.d.ts +14 -0
  103. package/dist/subagents/model-policy.d.ts +31 -0
  104. package/dist/subagents/runtime.d.ts +52 -0
  105. package/dist/tool/index.d.ts +1 -0
  106. package/dist/types/errors.d.ts +4 -0
  107. package/dist/types/index.d.ts +1 -0
  108. package/package.json +66 -0
  109. package/skills/autorag/SKILL.md +149 -0
  110. package/skills/autorag-setup/SKILL.md +396 -0
@@ -0,0 +1,396 @@
1
+ ---
2
+ name: autorag-setup
3
+ description: Configure AutoRAG for first use or repair its setup. Detect the current agent's usable subscription-backed runtime or API provider without exposing private provider identities, select orchestrator and explorer models, propose OS-aware document folders for approval, initialize configuration, and build indexes (parsed mirrors, BM25, MinSync vectors, optional Jikji maps).
4
+ ---
5
+
6
+ # AutoRAG Setup Skill
7
+
8
+ Use this skill for first-time setup, missing or broken model configuration,
9
+ provider/authentication discovery, changing indexed folders, or rebuilding the
10
+ initial indexes. After setup succeeds, use the separate `autorag` skill for
11
+ normal searches and feedback.
12
+
13
+ ## Safety boundaries
14
+
15
+ - Inspect only non-secret provider/model metadata and credential availability.
16
+ - Never print, copy, migrate, compare, or persist credential values.
17
+ - Never expose private provider aliases or internal model catalogs in generated
18
+ configuration, logs, or user-facing explanations.
19
+ - Do not scan the whole filesystem or home directory without explicit approval.
20
+ - Never move, rename, edit, or delete source documents.
21
+ - Recommend document-dense folders only. Do not index system trees, app bundles,
22
+ caches, or credential stores.
23
+
24
+ ## Detect an authenticated model runtime
25
+
26
+ Do not begin by asking the user to manually name a provider. Determine the best
27
+ usable configuration from available evidence.
28
+
29
+ 1. Preserve explicit user choices and a working `~/.autorag/config.json`.
30
+ 2. Inspect the current agent's exposed provider/model capabilities.
31
+ 3. Inspect compatible non-secret local metadata, including configured model
32
+ registries and `~/.autorag/pi-agent/models.json`. Provider-specific local
33
+ configuration may be used only to determine endpoint compatibility, model
34
+ IDs, credential environment-variable names, and whether credentials exist.
35
+ 4. Check Pi authentication entries by provider identity without reading or
36
+ showing their secret payloads.
37
+ 5. Treat ChatGPT, Claude, Gemini, and other consumer subscriptions as usable
38
+ only when the active runtime can demonstrably delegate that authenticated
39
+ session to AutoRAG or compatible authentication already exists in AutoRAG's
40
+ Pi state. A subscription is not automatically an API entitlement.
41
+ 6. Do not infer usability from an installed CLI, a config filename, or an
42
+ environment-variable name alone. Authentication and protocol compatibility
43
+ must both be established.
44
+
45
+ If no compatible authenticated runtime exists, report the exact missing public
46
+ provider/authentication requirement. Do not write a configuration that cannot
47
+ run. Ask one concise question only when multiple equally suitable public
48
+ providers remain and runtime evidence cannot choose between them.
49
+
50
+ ## Select role models
51
+
52
+ Select only models actually advertised by the authenticated runtime:
53
+
54
+ - `agents.orchestrator`: strongest reliable reasoning and high-context model.
55
+ - `agents.explorer`: faster, cheaper high-recall model with sufficient context.
56
+ - If only one usable model exists, configure it for both roles.
57
+ - Preserve an existing working explicit pair.
58
+ - Never invent model IDs or write a private provider alias into distributed or
59
+ user-facing configuration.
60
+
61
+ Provider and model ID must always be supplied together for each configured role.
62
+ If role models are intentionally omitted, leave them unset so search-time
63
+ resolution can still pick up an authenticated local runtime when available.
64
+
65
+ ## Discover and approve document folders
66
+
67
+ Propose a **short list of recommended folders** tailored to the user's OS, then
68
+ let the user accept, drop, or replace entries before any indexing. Explicit user
69
+ paths always win. Reuse previously approved folders without re-asking.
70
+
71
+ ### 1. Detect OS and home roots
72
+
73
+ Resolve the user home once:
74
+
75
+ | OS | User home |
76
+ |---|---|
77
+ | macOS | `$HOME` (e.g. `/Users/<name>`) |
78
+ | Linux | `$HOME` (e.g. `/home/<name>`; honor `XDG_*` when set) |
79
+ | Windows | `%USERPROFILE%` / `$HOME` under Git Bash (e.g. `C:\Users\<name>`) |
80
+
81
+ Do not walk the entire home tree. Check only the recommended candidates below
82
+ for existence and approximate document density (counts of supported extensions),
83
+ then present the findings.
84
+
85
+ ### 2. Recommend document-dense anchors per OS
86
+
87
+ Offer candidates that commonly hold PDFs, Office docs, notes, and downloads.
88
+ Mark each as **recommended** or **optional**, and never enable a path that does
89
+ not exist.
90
+
91
+ **macOS**
92
+
93
+ | Priority | Path | Why |
94
+ |---|---|---|
95
+ | Recommended | `~/Documents` | Default document library |
96
+ | Recommended | `~/Downloads` | Fresh PDFs, reports, attachments |
97
+ | Recommended | `~/Desktop` | Dropped working files |
98
+ | Optional | `~/Notes`, `~/Obsidian`, `~/iCloud Drive/Documents` when present | Personal knowledge bases |
99
+ | Optional | Current project docs roots the user already named | Repo/wiki collections |
100
+
101
+ Prefer user-visible folders over iCloud container UUIDs or Library internals.
102
+ Skip `~/Library`, `~/Applications`, and Time Machine volumes unless the user
103
+ explicitly points there.
104
+
105
+ **Linux**
106
+
107
+ | Priority | Path | Why |
108
+ |---|---|---|
109
+ | Recommended | `~/Documents` or `$XDG_DOCUMENTS_DIR` | Document library |
110
+ | Recommended | `~/Downloads` or `$XDG_DOWNLOAD_DIR` | Incoming files |
111
+ | Recommended | `~/Desktop` or `$XDG_DESKTOP_DIR` | Working files |
112
+ | Optional | `~/Notes`, `~/Sync`, Nextcloud/Syncthing folders when present | Synced knowledge |
113
+ | Optional | Current project docs roots the user already named | Repo/wiki collections |
114
+
115
+ When XDG user-dirs are configured, prefer those resolved paths over bare
116
+ `~/Documents`-style guesses.
117
+
118
+ **Windows**
119
+
120
+ | Priority | Path | Why |
121
+ |---|---|---|
122
+ | Recommended | `%USERPROFILE%\Documents` | Document library (also OneDrive Documents if that is the real shell folder) |
123
+ | Recommended | `%USERPROFILE%\Downloads` | Incoming PDFs and exports |
124
+ | Recommended | `%USERPROFILE%\Desktop` | Working files |
125
+ | Optional | OneDrive `Documents` / `Desktop` when they differ from the local shell folders | Cloud-backed corp libraries |
126
+ | Optional | Current project docs roots the user already named | Repo/wiki collections |
127
+
128
+ Prefer the shell-known special folders. Do not crawl `AppData`, `Program Files`,
129
+ or system roots.
130
+
131
+ ### 3. Density and format filter
132
+
133
+ Prefer folders dense with formats AutoRAG parses into `.autorag/parsed` for
134
+ BM25/MinSync:
135
+
136
+ - text notes: `md`, `markdown`, `txt`, `text`
137
+ - documents: `pdf`, `docx`, `pptx`, `xlsx`, `hwpx`, `eml`
138
+ - optional OCR images only when enabled: `jpg`, `jpeg`, `png`, `bmp`, `tiff`
139
+
140
+ Do not present legacy binary shells that currently fail pure-JS parsing as fully
141
+ supported: bare `doc`, `xls`, and legacy `hwp` (use `docx` / `xlsx` / `hwpx`
142
+ instead). Explorers can still open any readable text under approved paths with
143
+ `read`/`grep`/`find`/`ls`, but those files will not contribute to BM25/MinSync
144
+ indexes.
145
+
146
+ Skip generated/vendor directories including `node_modules`, `.git`, `dist`,
147
+ `build`, `target`, `.cache`, `.autorag`, and `.jikji`.
148
+
149
+ ### 4. Present a proposal, then require approval
150
+
151
+ Summarize a concrete proposal, for example:
152
+
153
+ ```text
154
+ Recommended index roots (macOS):
155
+ [R] ~/Documents (~120 pdf/md/docx)
156
+ [R] ~/Downloads (~45 pdf/pptx)
157
+ [R] ~/Desktop (~12 md/pdf)
158
+ [O] ~/Notes (~80 md) — optional personal vault
159
+
160
+ Reply with: accept all / keep only Documents+Downloads / custom list
161
+ ```
162
+
163
+ Rules:
164
+
165
+ 1. Prefer an explicit directory already named by the user over any suggestion.
166
+ 2. Do not silently index large or sensitive trees.
167
+ 3. Keep the first-run set small (typically 1–3 approved roots). Users can add
168
+ more after the initial index build.
169
+ 4. Wallpaper/background folders are rarely useful; only suggest Desktop itself
170
+ (where people leave docs), not OS wallpaper asset caches.
171
+
172
+ ## Initialize
173
+
174
+ Write the approved paths and selected role models:
175
+
176
+ ```bash
177
+ autorag init \
178
+ --search-paths "/path/to/docs,/path/to/notes" \
179
+ --orchestrator-model-provider PROVIDER \
180
+ --orchestrator-model-id ORCHESTRATOR_MODEL \
181
+ --explorer-model-provider PROVIDER \
182
+ --explorer-model-id EXPLORER_MODEL
183
+ ```
184
+
185
+ This writes `~/.autorag/config.json` by default. Use `--config PATH` (or
186
+ `AUTORAG_CONFIG`) for an explicit location. Optional:
187
+
188
+ - `--workspace DIR` for the workspace that owns `.autorag` indexes
189
+ - `--memory-path FILE` for retrieval-memory storage
190
+ - `--force` only when intentionally replacing an existing config
191
+
192
+ ### Indexing method defaults
193
+
194
+ BM25 and MinSync are **enabled by default**. `autorag init` writes
195
+ `bm25: { enabled: true }` and `minSync: { enabled: true, autoInstall: false }`
196
+ into the config even when no method flags are supplied. To disable a method,
197
+ set it to `false` in the config file (`"bm25": false` or `"minSync": false`).
198
+
199
+ MinSync auto-install is off by default (`autoInstall: false`); the binary must
200
+ be pre-installed or available on `PATH`. AutoRAG never forces TEI or any
201
+ external embedding service.
202
+
203
+ ### MinSync embedder flags
204
+
205
+ `autorag init` accepts non-secret embedder configuration flags that are written
206
+ into `minSync.embedder` in the config:
207
+
208
+ ```bash
209
+ autorag init \
210
+ --search-paths "/path/to/docs" \
211
+ --embedder-id "text-embedding-3-small" \
212
+ --embedder-base-url "https://api.openai.com/v1" \
213
+ --embedder-api-key-env "OPENAI_API_KEY" \
214
+ --embedder-dimension 1536 \
215
+ --embedder-batch-size 64
216
+ ```
217
+
218
+ All fields are optional; only provided fields are written. `--embedder-api-key-env`
219
+ accepts the **environment variable name** (e.g. `OPENAI_API_KEY`), never the key
220
+ value itself. `--embedder-dimension` and `--embedder-batch-size` must be positive
221
+ integers.
222
+
223
+ If role models are intentionally omitted, `autorag init` must leave `agents`
224
+ unset; it must never inject a private provider default. Legacy cwd
225
+ `autorag.config.json` is a migration source only and is never deleted by init.
226
+
227
+ Per-run overrides (flags and env take precedence over the file) are available
228
+ via the role-specific flags or:
229
+
230
+ - `AUTORAG_ORCHESTRATOR_MODEL_PROVIDER` / `AUTORAG_ORCHESTRATOR_MODEL_ID`
231
+ - `AUTORAG_EXPLORER_MODEL_PROVIDER` / `AUTORAG_EXPLORER_MODEL_ID`
232
+ - legacy single-model aliases: `AUTORAG_MODEL_PROVIDER` / `AUTORAG_MODEL_ID`
233
+ - `AUTORAG_SEARCH_PATHS`, `AUTORAG_WORKSPACE`, `AUTORAG_MEMORY_PATH`
234
+
235
+ ## Build indexes after install
236
+
237
+ Installation + `init` alone does **not** make search useful. Immediately after
238
+ the approved config is written, build the local indexes before handing off to
239
+ the `autorag` skill.
240
+
241
+ ### What `autorag refresh` builds
242
+
243
+ `autorag refresh` is the post-setup indexing step. It is model-free and:
244
+
245
+ 1. **Parses** approved source files into workspace-local `.autorag/parsed`
246
+ markdown mirrors.
247
+ 2. **Prepares BM25** lexical indexes over those mirrors.
248
+ 3. **Embeds into the MinSync vector DB** (semantic index) over the same mirrors
249
+ when MinSync is configured/available.
250
+ 4. **Prepares Jikji maps/caches** under each approved source's `.jikji/` when
251
+ Jikji is configured (indexing only — find answers come later via
252
+ `jikji_find` at search time).
253
+ 5. **Indexes authorized datasources** when datasource skills are configured.
254
+
255
+ Order of operations for first-time setup:
256
+
257
+ ```bash
258
+ # 1) write approved folders + role models
259
+ autorag init \
260
+ --search-paths "$HOME/Documents,$HOME/Downloads,$HOME/Desktop" \
261
+ --orchestrator-model-provider PROVIDER \
262
+ --orchestrator-model-id ORCHESTRATOR_MODEL \
263
+ --explorer-model-provider PROVIDER \
264
+ --explorer-model-id EXPLORER_MODEL
265
+
266
+ # 2) verify model/provider auth and explorer subagent preflight
267
+ autorag health
268
+
269
+ # 3) parse sources, build BM25, embed MinSync, prepare Jikji maps
270
+ autorag refresh
271
+
272
+ # 4) verify corpus freshness / index health (path-opaque)
273
+ autorag status
274
+ ```
275
+
276
+ Interpret results:
277
+
278
+ - `refresh` prints parse counts and BM25 readiness (and datasource rows when
279
+ present). Re-run with `autorag refresh --force` only when a dirty/partial
280
+ index needs a full rebuild path and a lighter incremental refresh is not
281
+ enough.
282
+ - `--method <csv>` restricts which methods refresh runs:
283
+ `bm25,minsync,parsed,datasources,jikji,all`. When omitted, all methods run.
284
+ Parsed mirrors are always synced when BM25 or MinSync is selected (they index
285
+ over the parsed mirrors). Example: `autorag refresh --method bm25,minsync`.
286
+ - `status` is model-free and path-opaque: inspect freshness and component
287
+ health only; do not expect absolute source paths in the output.
288
+ - `health` checks model/provider auth and explorer subagent setup: it resolves
289
+ both role models, verifies credential presence, and (unless `--skip-probes`)
290
+ probes a completion call per role. Use it to confirm both role models resolve
291
+ from the authenticated runtime or written config without displaying
292
+ credentials or private provider details.
293
+ - Do not claim setup succeeded when authentication, indexes, role-model
294
+ resolution, or subagent dispatch remain unverified.
295
+ - Prefer bounded `refresh` over destructive resets. Reserve
296
+ `autorag index rebuild --yes` for a full wipe+reindex of workspace
297
+ `.autorag` parsed/BM25/MinSync dirs only — never against source documents.
298
+ `index reset` and `index rebuild` also accept `--method` to scope which
299
+ indexes are removed/rebuilt (e.g. `autorag index reset --method bm25 --yes`
300
+ removes only the BM25 index).
301
+
302
+ Large first-time corpora can take several minutes for parse + embed. Stay on
303
+ the approximate status of the running refresh rather than starting concurrent
304
+ index jobs.
305
+
306
+ ## Customize and extend indexed folders
307
+
308
+ Users can change the indexed set after the initial install. Always get explicit
309
+ approval before adding paths, then re-init (or rewrite config) and refresh.
310
+
311
+ ### Add or replace folders
312
+
313
+ 1. Collect the desired absolute paths (user paste, or another short recommended
314
+ proposal using the OS tables above).
315
+ 2. Prefer merging with the existing approved list rather than silently dropping
316
+ working roots, unless the user asks to replace everything.
317
+ 3. Write the new list:
318
+
319
+ ```bash
320
+ # Replace/extend the configured search roots, preserve role models already set
321
+ autorag init \
322
+ --force \
323
+ --search-paths "/existing/docs,/new/research,/path/to/notes"
324
+ ```
325
+
326
+ If role models must be preserved and you are rewriting via `init --force`, pass
327
+ the same orchestrator/explorer provider+id pair already in
328
+ `~/.autorag/config.json`. Alternatively edit `searchPaths` in that config when
329
+ the agent can safely update JSON without touching credentials/private fields.
330
+
331
+ 4. Rebuild indexes for the new roots:
332
+
333
+ ```bash
334
+ autorag refresh
335
+ autorag status
336
+ ```
337
+
338
+ ### Narrow temporarily without re-init
339
+
340
+ For a one-off search scope, prefer `autorag search "…" --scope <virtual-subpath>`
341
+ through the `autorag` skill after setup. Scope narrows retrieval; it does not
342
+ add new roots to the permanent index set.
343
+
344
+ ### Env/flag overrides for automation
345
+
346
+ Machine-driven agents may point at a custom list without rewriting the default
347
+ home config:
348
+
349
+ ```bash
350
+ AUTORAG_SEARCH_PATHS="/docs,/notes" autorag refresh
351
+ # or
352
+ autorag refresh --search-paths "/docs,/notes"
353
+ ```
354
+
355
+ Remember that CLI flags / env vars take precedence for that invocation only;
356
+ persist planned long-term folders with `autorag init` so later searches and
357
+ refreshes share the same set.
358
+
359
+ ### Ongoing maintenance
360
+
361
+ ```bash
362
+ autorag status # corpus freshness / index health
363
+ autorag refresh # resync after documents change
364
+ autorag watch --once # preferred single tick for cron / Task Scheduler / systemd timer
365
+ autorag watch # long-running fs watch for interactive sessions
366
+ autorag refresh --force # force a full re-sync when needed
367
+ autorag index rebuild --yes # wipe parsed/BM25/MinSync under .autorag, then forced refresh
368
+ autorag memory inspect # read-only retrieval memory snapshot
369
+ ```
370
+
371
+ After setup, install an **OS-appropriate periodic job** so indexes stay fresh without a permanent daemon. Agents MUST create or verify this schedule before claiming continuous indexing works.
372
+
373
+ | OS | Scheduler | Suggested tick (every 30 min) |
374
+ |---|---|---|
375
+ | macOS | `cron` or LaunchAgent in `~/Library/LaunchAgents` | `*/30 * * * * PATH=... NODE_OPTIONS=--max-old-space-size=16384 autorag watch --once` |
376
+ | Linux | `cron` or `systemd --user` timer | same crontab pattern, or a oneshot unit + timer |
377
+ | Windows | Task Scheduler | repeating task every 30 minutes running `autorag watch --once` |
378
+
379
+ Prefer `watch --once`/`refresh` for scheduled ticks. Reserve long-running `watch` for interactive foreground use. Log under `~/.autorag/` (or user temp), never into source document trees. Avoid overlapping concurrent refreshes.
380
+
381
+ Never run reset/rebuild against source document trees. Indexes live under the
382
+ configured workspace's `.autorag/`; Jikji prepare caches live under
383
+ per-source `.jikji/` when enabled.
384
+
385
+ ## Hand off
386
+
387
+ After models authenticate, `autorag health` confirms model/provider auth and
388
+ explorer subagent dispatch, folders are approved, `init` has written the config,
389
+ `refresh` has built parsed + BM25 + MinSync (+ optional Jikji/datasource)
390
+ indexes, and `status` looks healthy:
391
+
392
+ - stop the setup skill
393
+ - use the `autorag` skill for normal queries (`autorag search`, then
394
+ `autorag feedback` with the returned `sessionId`)
395
+ - return to this skill when the user adds folders, fixes providers/models, or
396
+ needs a deliberate reindex