@autorag/librarian 2.5.2 → 2.6.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.
- package/NOTICE +10 -13
- package/README.md +53 -13
- package/dist/agent/agent.d.ts +25 -15
- package/dist/agent/index.d.ts +1 -2
- package/dist/agent/refresh-progress.d.ts +30 -0
- package/dist/agent/search-documents.d.ts +1 -1
- package/dist/agent/search-single-datasource-tool.d.ts +14 -8
- package/dist/cli/commands/report.d.ts +3 -0
- package/dist/cli/commands/serve.d.ts +2 -1
- package/dist/cli/config.d.ts +1 -10
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +20731 -21656
- package/dist/core.d.ts +1 -1
- package/dist/core.js +2781 -1790
- package/dist/datasource/errors.d.ts +1 -1
- package/dist/datasource/index.d.ts +3 -2
- package/dist/datasource/skills/discrawl/skill.d.ts +1 -1
- package/dist/datasource/skills/discrawl/types.d.ts +2 -2
- package/dist/datasource/skills/github-gist/connector.d.ts +38 -0
- package/dist/datasource/skills/github-gist/index.d.ts +3 -0
- package/dist/datasource/skills/github-gist/semantic.d.ts +102 -0
- package/dist/datasource/skills/github-gist/skill.d.ts +39 -0
- package/dist/datasource/skills/lark/client.d.ts +23 -0
- package/dist/datasource/skills/lark/index.d.ts +2 -0
- package/dist/datasource/skills/lark/skill.d.ts +36 -0
- package/dist/datasource/skills/lazykatok/client.d.ts +28 -0
- package/dist/datasource/skills/lazykatok/index.d.ts +12 -0
- package/dist/datasource/skills/{katok → lazykatok}/methods.d.ts +12 -12
- package/dist/datasource/skills/lazykatok/paths.d.ts +40 -0
- package/dist/datasource/skills/{katok → lazykatok}/skill.d.ts +10 -10
- package/dist/datasource/skills/lazykatok/types.d.ts +134 -0
- package/dist/datasource/skills/mailcrawl/client.d.ts +2 -0
- package/dist/datasource/skills/mailcrawl/types.d.ts +12 -0
- package/dist/datasource/types.d.ts +4 -4
- package/dist/embedding-runtime/manifest.d.ts +8 -0
- package/dist/embedding-runtime/types.d.ts +4 -0
- package/dist/index.js +2792 -1800
- package/dist/language.d.ts +21 -0
- package/dist/memory/memory.d.ts +0 -1
- package/dist/mirror/paths.d.ts +2 -0
- package/dist/mirror/sync.d.ts +1 -1
- package/dist/p2p/simplex-server.d.ts +21 -5
- package/dist/p2p/simplex-transport.d.ts +21 -4
- package/dist/parser/defaults.d.ts +10 -4
- package/dist/parser/index.d.ts +3 -5
- package/dist/parser/kordoc.d.ts +53 -0
- package/dist/parser/ocr-engines.d.ts +12 -0
- package/dist/parser/ocr.d.ts +7 -1
- package/dist/parser/office.d.ts +1 -10
- package/dist/parser/types.d.ts +1 -1
- package/dist/process/terminate-tree.d.ts +2 -0
- package/dist/retrieval/types.d.ts +1 -1
- package/licenses/embedding-assets.json +20 -4
- package/package.json +10 -10
- package/skills/autorag-doctor/SKILL.md +4 -3
- package/skills/autorag-lite-search/SKILL.md +57 -7
- package/skills/autorag-lite-setup/SKILL.md +4 -4
- package/skills/autorag-setup/SKILL.md +11 -8
- package/dist/agent/search-datasource-tool.d.ts +0 -30
- package/dist/cli/commands/ui.d.ts +0 -13
- package/dist/datasource/skills/katok/client.d.ts +0 -21
- package/dist/datasource/skills/katok/index.d.ts +0 -12
- package/dist/datasource/skills/katok/paths.d.ts +0 -40
- package/dist/datasource/skills/katok/types.d.ts +0 -123
- package/dist/parser/hwp-markdown.d.ts +0 -25
- package/dist/parser/hwp.d.ts +0 -13
- package/dist/parser/opendataloader-pdf.d.ts +0 -31
- package/dist/parser/rhwp-adapter.d.ts +0 -30
- package/dist/ui/browse.d.ts +0 -11
- package/dist/ui/catalog.d.ts +0 -59
- package/dist/ui/config-store.d.ts +0 -43
- package/dist/ui/discover.d.ts +0 -17
- package/dist/ui/html.d.ts +0 -2
- package/dist/ui/probe.d.ts +0 -24
- package/dist/ui/prompt.d.ts +0 -21
- package/dist/ui/server.d.ts +0 -28
package/NOTICE
CHANGED
|
@@ -6,22 +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.
|
|
9
|
+
@earendil-works/pi-agent-core@0.86.1
|
|
10
10
|
License: MIT
|
|
11
11
|
|
|
12
|
-
@earendil-works/pi-ai@0.
|
|
12
|
+
@earendil-works/pi-ai@0.86.1
|
|
13
13
|
License: MIT
|
|
14
14
|
|
|
15
|
-
@earendil-works/pi-coding-agent@0.
|
|
15
|
+
@earendil-works/pi-coding-agent@0.86.1
|
|
16
16
|
License: MIT
|
|
17
17
|
|
|
18
|
-
@earendil-works/pi-tui@0.
|
|
19
|
-
License: MIT
|
|
20
|
-
|
|
21
|
-
@opendataloader/pdf@2.5.7
|
|
22
|
-
License: Apache-2.0
|
|
23
|
-
|
|
24
|
-
@rhwp/core@0.8.6
|
|
18
|
+
@earendil-works/pi-tui@0.86.1
|
|
25
19
|
License: MIT
|
|
26
20
|
|
|
27
21
|
chardet@2.2.0
|
|
@@ -36,9 +30,15 @@ License: MIT
|
|
|
36
30
|
jszip@3.10.1
|
|
37
31
|
License: (MIT OR GPL-3.0-or-later)
|
|
38
32
|
|
|
33
|
+
kordoc@4.15.7
|
|
34
|
+
License: MIT
|
|
35
|
+
|
|
39
36
|
mailparser@3.9.20
|
|
40
37
|
License: MIT
|
|
41
38
|
|
|
39
|
+
pdfjs-dist@6.3.289
|
|
40
|
+
License: Apache-2.0
|
|
41
|
+
|
|
42
42
|
puppeteer-core@25.11.0
|
|
43
43
|
License: Apache-2.0
|
|
44
44
|
|
|
@@ -54,9 +54,6 @@ License: Apache-2.0
|
|
|
54
54
|
typebox@1.3.25
|
|
55
55
|
License: MIT
|
|
56
56
|
|
|
57
|
-
xlsx@0.18.5
|
|
58
|
-
License: Apache-2.0
|
|
59
|
-
|
|
60
57
|
yaml@2.9.0
|
|
61
58
|
License: ISC
|
|
62
59
|
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ AutoRAG Agent:
|
|
|
49
49
|
|
|
50
50
|
Three principles drive every design decision in AutoRAG Agent:
|
|
51
51
|
|
|
52
|
-
1. **Never migrate your data to search it.** Traditional RAG systems force you to upload, ETL, and duplicate your files into a centralized vector database. AutoRAG Agent federates your data **in place**, querying CLI-native stores (`
|
|
52
|
+
1. **Never migrate your data to search it.** Traditional RAG systems force you to upload, ETL, and duplicate your files into a centralized vector database. AutoRAG Agent federates your data **in place**, querying CLI-native stores (`lazykatok`, `discrawl`, `slacrawl`, `mailcrawl`, `rclone`, `qmd`) where your data already lives. Results retain opaque, source-native identities (`/kakao/...`, `/slack/...`) that preserve local access control and privacy. *(See our [Competitive Landscape Study](docs/competitive-landscape-2026-09.md) on why in-place federation is the durable differentiator).*
|
|
53
53
|
|
|
54
54
|
2. **Just works — no RAG degree required.** No pipeline tuning, no vector-DB maintenance, and no remote embedding API keys. AutoRAG Agent automatically manages [MinSync](docs/minsync-setup.md) for incremental Change Data Capture (CDC) chunking and provides a local [embedding gateway](docs/embedding-runtime.md) out of the box with zero external telemetry.
|
|
55
55
|
|
|
@@ -85,6 +85,26 @@ If you are an AI coding agent or LLM (Claude Code, Cursor, Windsurf, Codex, Senp
|
|
|
85
85
|
| **`autorag-lite-setup`** | [`skills/autorag-lite-setup/`](skills/autorag-lite-setup/SKILL.md) | Initializing and maintaining the model-free AutoRAG Lite lifecycle without an LLM. |
|
|
86
86
|
| **`autorag-lite-search`** | [`skills/autorag-lite-search/`](skills/autorag-lite-search/SKILL.md) | Performing model-free retrieval, reporting evidence, and recording feedback without an LLM. |
|
|
87
87
|
|
|
88
|
+
### Install the skills into your coding agent
|
|
89
|
+
|
|
90
|
+
Skills are not auto-discovered — copy the folders you want into the agent's skill directory. For **Claude Code** that directory is `.claude/skills/` in the project (or `~/.claude/skills/` to enable them everywhere). Once `autorag-lite-setup` and `autorag-lite-search` are in place, Claude Code drives `autorag lite retrieve` as a search tool:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# From a clone of this repository
|
|
94
|
+
mkdir -p .claude/skills
|
|
95
|
+
cp -R skills/autorag-lite-setup skills/autorag-lite-search .claude/skills/
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
# From a global install — the npm package ships the same skills/ folder
|
|
100
|
+
AUTORAG_SKILLS="$(npm root -g)/@autorag/librarian/skills"
|
|
101
|
+
# Bun global installs live at ~/.bun/install/global/node_modules/@autorag/librarian/skills
|
|
102
|
+
mkdir -p .claude/skills
|
|
103
|
+
cp -R "$AUTORAG_SKILLS/autorag-lite-setup" "$AUTORAG_SKILLS/autorag-lite-search" .claude/skills/
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Copy `skills/autorag` and `skills/autorag-setup` the same way when the agent should also drive the model-backed librarian, and `skills/autorag-doctor` for diagnostics. Other agents read their own directories (for example `~/.agents/skills/`) — copy the same folders there and reload the agent session so it picks them up.
|
|
107
|
+
|
|
88
108
|
### Quick Agent Workflow
|
|
89
109
|
|
|
90
110
|
1. **Install CLI:**
|
|
@@ -140,7 +160,7 @@ AutoRAG Agent connects to external tools and communication platforms using dedic
|
|
|
140
160
|
| Datasource | Skill Alias | Backend / Driver | Storage & Privacy Model | Search Capabilities |
|
|
141
161
|
|---|---|---|---|---|
|
|
142
162
|
| **Local Documents** | `local` | Native filesystem & MinSync | Workspace-local parsed mirrors (`.autorag/`) | BM25, Semantic, Hybrid |
|
|
143
|
-
| **KakaoTalk** | `
|
|
163
|
+
| **KakaoTalk** | `kakao` | [`lazykatok`](https://github.com/changeroa/lazykatok) CLI | Native KakaoTalk archive; zero direct DB access | BM25, Semantic, Hybrid |
|
|
144
164
|
| **Discord** | `discord` | [`discrawl`](https://github.com/openclaw/discrawl) CLI | Native SQLite archive; token-free wiretap mode | BM25, Semantic, Hybrid |
|
|
145
165
|
| **WhatsApp** | `whatsapp` | [`wacrawl`](https://github.com/openclaw/wacrawl) CLI | Local-first incremental archive + FTS5 | Lexical FTS5 |
|
|
146
166
|
| **Telegram** | `telegram` | [`telecrawl`](https://github.com/openclaw/telecrawl) CLI | Local-first desktop archive + FTS5 | Lexical FTS5 |
|
|
@@ -175,7 +195,7 @@ bun add @autorag/librarian
|
|
|
175
195
|
|
|
176
196
|
### System Prerequisites
|
|
177
197
|
|
|
178
|
-
- **Java
|
|
198
|
+
- **No Java required:** Document parsing (HWP/HWPX/HWPML, PDF, DOCX, XLSX/XLS) runs in-process through [`kordoc`](https://github.com/chrisryugj/kordoc).
|
|
179
199
|
- **Rust Toolchain (Optional):** Automatically compiles Jikji (`jikji-cli`) if installed.
|
|
180
200
|
- **MinSync:** Automatically downloaded and installed into `<workspace>/.autorag/bin` on first run.
|
|
181
201
|
|
|
@@ -189,6 +209,9 @@ bun add @autorag/librarian
|
|
|
189
209
|
# Initialize configuration for your documents folder
|
|
190
210
|
autorag init --search-paths ~/Documents/research
|
|
191
211
|
|
|
212
|
+
# Korean + English is the default; set it explicitly for other corpora
|
|
213
|
+
autorag init --search-paths ~/Documents/research --languages ja,en
|
|
214
|
+
|
|
192
215
|
# Index documents (parses PDFs/Markdown, builds BM25 and MinSync vectors)
|
|
193
216
|
autorag refresh
|
|
194
217
|
|
|
@@ -196,6 +219,26 @@ autorag refresh
|
|
|
196
219
|
autorag status
|
|
197
220
|
```
|
|
198
221
|
|
|
222
|
+
### Document languages and parsers
|
|
223
|
+
|
|
224
|
+
One global `languages` setting describes the corpus. It is resolved from
|
|
225
|
+
`--languages`, then `AUTORAG_LANGUAGES`, then `languages` in the config file,
|
|
226
|
+
falling back to `["ko", "en"]`. Supported tags: `ko`, `en`, `ja`, `zh-hans`,
|
|
227
|
+
`zh-hant`, `fr`, `de`, `es`, `ru`, `it`, `pt`, `vi`, `th`, `ar`, `hi`.
|
|
228
|
+
|
|
229
|
+
| Extension | Parser |
|
|
230
|
+
|---|---|
|
|
231
|
+
| `.hwp` `.hwpx` `.hml` `.hwpml` `.pdf` `.docx` `.xlsx` `.xls` | `kordoc` (nested tables, per-sheet workbooks, no Java) |
|
|
232
|
+
| `.pptx` | built-in PPTX reader |
|
|
233
|
+
| `.eml` | built-in mail reader |
|
|
234
|
+
| `.txt` `.text` `.md` `.markdown` | plain text (CP949/EUC-KR aware) |
|
|
235
|
+
| `.png` `.jpg` `.jpeg` `.bmp` `.tiff` `.webp` | image OCR (opt-in) |
|
|
236
|
+
|
|
237
|
+
OCR is opt-in and never runs unless enabled, so indexing downloads no model by
|
|
238
|
+
default. When enabled, `languages` selects the recognition languages
|
|
239
|
+
(`ja` → `jpn`, `zh-hans` → `chi_sim`, …) for both standalone images and scanned
|
|
240
|
+
PDF pages.
|
|
241
|
+
|
|
199
242
|
### 2. Search from CLI
|
|
200
243
|
|
|
201
244
|
```bash
|
|
@@ -204,9 +247,6 @@ autorag search "What are our primary Q3 deliverables?"
|
|
|
204
247
|
|
|
205
248
|
# Launch the interactive Terminal UI (beta)
|
|
206
249
|
autorag tui
|
|
207
|
-
|
|
208
|
-
# Open the loopback web management dashboard (127.0.0.1)
|
|
209
|
-
autorag ui
|
|
210
250
|
```
|
|
211
251
|
|
|
212
252
|
### 3. Programmatic Usage (TypeScript API)
|
|
@@ -238,13 +278,12 @@ agent.recordFeedbackByNumbers(response.sessionId, [1], [2]);
|
|
|
238
278
|
|
|
239
279
|
| Command | Description |
|
|
240
280
|
|---|---|
|
|
241
|
-
| `autorag init` | Initialize `~/.autorag/config.json` with search roots and model settings |
|
|
281
|
+
| `autorag init` | Initialize `~/.autorag/config.json` with search roots, document languages, and model settings |
|
|
242
282
|
| `autorag refresh` | Refresh parsed mirrors, MinSync CDC chunks, datasources, and Jikji |
|
|
243
283
|
| `autorag search "<query>"` | Run the librarian agent to curate structured answers |
|
|
244
284
|
| `autorag status` | Inspect corpus freshness, indexing status, and vector readiness |
|
|
245
285
|
| `autorag health` | Check model provider authentication, token validity, and API reachability |
|
|
246
286
|
| `autorag tui` | Open the interactive librarian terminal UI |
|
|
247
|
-
| `autorag ui` | Open the local loopback web dashboard to configure datasources visually |
|
|
248
287
|
| `autorag duplicates [DIR]` | Read-only scan for exact and near-duplicate document families with `dupey` |
|
|
249
288
|
| `autorag lite ...` | Model-free indexing, retrieval, report generation, and status |
|
|
250
289
|
| `autorag feedback <session>` | Record useful / not-useful feedback by item number |
|
|
@@ -259,7 +298,7 @@ agent.recordFeedbackByNumbers(response.sessionId, [1], [2]);
|
|
|
259
298
|
Deep dive into AutoRAG Agent's architecture, security, and integration guides:
|
|
260
299
|
|
|
261
300
|
- **[MinSync Setup & Embedding QA](docs/minsync-setup.md):** Automatic binary installation, CDC chunking, and EmbeddingGemma verification.
|
|
262
|
-
- **[Local Embedding Runtime & Gateway](docs/embedding-runtime.md):** AutoRAG-owned local gateway, model prefetching, and zero-egress semantic search.
|
|
301
|
+
- **[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).
|
|
263
302
|
- **[Datasource Skills Reference](docs/datasource-skills.md):** Full configuration contracts, connection aliases, and connector options.
|
|
264
303
|
- **[Manual QA & Datasource Test Harnesses](docs/manual-qa-datasources.md):** Real-world testing guides for Discord, KakaoTalk, Slack, Notion, and email.
|
|
265
304
|
- **[P2P SimpleX Sharing & Path Standard](docs/p2p-path-standard.md):** Decentralized peer query sharing with SimpleX, PII redaction, and approval queues.
|
|
@@ -273,7 +312,8 @@ Deep dive into AutoRAG Agent's architecture, security, and integration guides:
|
|
|
273
312
|
|
|
274
313
|
AutoRAG Agent is an open-source project built by the community. We welcome contributions, bug reports, datasource connectors, and ideas!
|
|
275
314
|
|
|
276
|
-
- **Contributing:** Feel free to open an issue or pull request.
|
|
315
|
+
- **Contributing:** Feel free to open an issue or pull request. Start with [CONTRIBUTING.md](CONTRIBUTING.md) — development setup, the `make ci` check we ask for, the `Signed-off-by` trailer every commit needs, and when to run the live end-to-end lanes. [MAINTAINERS](MAINTAINERS) lists who reviews which area. AI tools are allowed; unverified dumps are not — see [AI_POLICY.md](AI_POLICY.md).
|
|
316
|
+
- **Security:** Private vulnerability reports and the response SLA live in [SECURITY.md](SECURITY.md).
|
|
277
317
|
- **GitHub Contributors:** [View all contributors](https://github.com/Marker-Inc-Korea/AutoRAG/graphs/contributors) on GitHub.
|
|
278
318
|
|
|
279
319
|
---
|
|
@@ -286,8 +326,8 @@ AutoRAG Agent stands on the shoulders of fantastic open-source projects:
|
|
|
286
326
|
- **[MinSync](https://github.com/Marker-Inc-Korea/minsync)** — Ultra-fast incremental Change Data Capture (CDC) chunking and local BM25/vector indexing.
|
|
287
327
|
- **[Jikji](https://github.com/NomaDamas/jikji)** by [NomaDamas](https://github.com/NomaDamas) — High-performance find-first local document discovery.
|
|
288
328
|
- **[dupey](https://github.com/NomaDamas/dupey)** by [NomaDamas](https://github.com/NomaDamas) — Fast duplicate and near-duplicate document family detection.
|
|
289
|
-
- **Federated CLI Authors:** External datasource tools [`
|
|
290
|
-
- **[
|
|
329
|
+
- **Federated CLI Authors:** External datasource tools [`lazykatok`](https://github.com/changeroa/lazykatok), [`discrawl`](https://github.com/openclaw/discrawl), [`mailcrawl`](https://github.com/NomaDamas/mailcrawl), [`wacrawl`](https://github.com/openclaw/wacrawl), [`telecrawl`](https://github.com/openclaw/telecrawl), [`slacrawl`](https://github.com/openclaw/slacrawl), [`notcrawl`](https://github.com/openclaw/notcrawl), [`qmd`](https://github.com/tobi/qmd), and [`rclone`](https://rclone.org).
|
|
330
|
+
- **[kordoc](https://github.com/chrisryugj/kordoc)** by [chrisryugj](https://github.com/chrisryugj) — HWP/HWPX/HWPML, PDF, DOCX and XLSX parsing with nested-table fidelity, used as AutoRAG's default document parser.
|
|
291
331
|
|
|
292
332
|
---
|
|
293
333
|
|
|
@@ -321,7 +361,7 @@ Common failures and their fix:
|
|
|
321
361
|
| A datasource errors during refresh | `datasource-index-failed` | run that CLI's own `doctor` |
|
|
322
362
|
| MinSync or Jikji missing | `minsync-unavailable`, `jikji-unavailable` | check the Rust toolchain, re-run refresh |
|
|
323
363
|
|
|
324
|
-
Native datasource stores stay owned by their CLIs — AutoRAG never rebuilds them. Fix a broken archive with `
|
|
364
|
+
Native datasource stores stay owned by their CLIs — AutoRAG never rebuilds them. Fix a broken archive with `lazykatok doctor`, `discrawl --json metadata`, `slacrawl --json doctor`, `wacrawl --json doctor`, `telecrawl --json doctor`, `notcrawl doctor`, `qmd status`, or `mailcrawl doctor`, then re-run `autorag refresh --method datasources --json`.
|
|
325
365
|
|
|
326
366
|
## License
|
|
327
367
|
|
package/dist/agent/agent.d.ts
CHANGED
|
@@ -4,16 +4,18 @@ import { type DatasourceAccessContextOptions } from "../datasource/access-contex
|
|
|
4
4
|
import type { DatasourceIndexResult, DatasourceSkill } from "../datasource/types.js";
|
|
5
5
|
import { type DupeyCliOptions } from "../dupey/index.js";
|
|
6
6
|
import { type JikjiFailureReason, type JikjiOptions } from "../jikji/index.js";
|
|
7
|
+
import { type LanguageTag } from "../language.js";
|
|
7
8
|
import type { ResultFeedback } from "../memory/memory.js";
|
|
8
9
|
import { type MinSyncSyncResult, type MinSyncVectorMethodOptions } from "../minsync/index.js";
|
|
9
10
|
import { type ParsedMirrorSyncResult } from "../mirror/sync.js";
|
|
10
11
|
import type { PolicyResolver } from "../p2p/policy-filter.js";
|
|
11
|
-
import type
|
|
12
|
+
import { type DefaultParserRegistryOptions } from "../parser/index.js";
|
|
12
13
|
import { RetrievalEngine } from "../retrieval/engine.js";
|
|
13
14
|
import { RetrievalMethodRegistry } from "../retrieval/registry.js";
|
|
14
15
|
import type { CuratedResult, RetrievalDiagnostic, RetrievalOptions, RetrievalResult } from "../retrieval/types.js";
|
|
15
16
|
import { type ScanDuplicateDocumentsDetails } from "./dupey-tool.js";
|
|
16
17
|
import { type JikjiFindProviderResult } from "./jikji-find-tool.js";
|
|
18
|
+
import { type RefreshProgressCounts, type RefreshProgressPhase } from "./refresh-progress.js";
|
|
17
19
|
import { type SearchDocumentDiagnostic, type SearchDocumentsResponse, type SearchDocumentsStreamEvent } from "./search-documents.js";
|
|
18
20
|
import { type WatcherFactory, type WatchRefreshHandle } from "./watch-refresh.js";
|
|
19
21
|
import { type WebFetchToolOptions } from "./web-fetch-tool.js";
|
|
@@ -61,6 +63,17 @@ export interface AutoRAGRefreshStatus {
|
|
|
61
63
|
readonly stale: boolean;
|
|
62
64
|
readonly diagnostics: readonly SearchDocumentDiagnostic[];
|
|
63
65
|
readonly components: AutoRAGRefreshComponentStatus;
|
|
66
|
+
readonly progress?: {
|
|
67
|
+
readonly phase: RefreshProgressPhase;
|
|
68
|
+
readonly sourceFiles?: {
|
|
69
|
+
readonly total: number;
|
|
70
|
+
};
|
|
71
|
+
readonly parsedCounts?: RefreshProgressCounts;
|
|
72
|
+
readonly minsync?: {
|
|
73
|
+
readonly synced?: number;
|
|
74
|
+
};
|
|
75
|
+
readonly ownerAlive?: boolean;
|
|
76
|
+
};
|
|
64
77
|
/** Path-free failure summary of the last refresh, if it failed. */
|
|
65
78
|
readonly lastError?: string;
|
|
66
79
|
}
|
|
@@ -110,6 +123,7 @@ export interface AutoRAGAgentOptions {
|
|
|
110
123
|
apiKey?: string;
|
|
111
124
|
providerApiKeys?: Readonly<Record<string, string>>;
|
|
112
125
|
searchPaths: string[];
|
|
126
|
+
languages?: readonly LanguageTag[];
|
|
113
127
|
manifestDir?: string;
|
|
114
128
|
memoryPath?: string;
|
|
115
129
|
workspacePath?: string;
|
|
@@ -197,6 +211,7 @@ export declare class AutoRAGAgent {
|
|
|
197
211
|
private refreshState;
|
|
198
212
|
private readonly searchPaths;
|
|
199
213
|
private readonly configuredSearchPaths;
|
|
214
|
+
readonly languages: readonly LanguageTag[];
|
|
200
215
|
private retrievalScopeBindings;
|
|
201
216
|
private readonly datasourceVirtualScopePrefixes;
|
|
202
217
|
private readonly workspaceProjectRoot;
|
|
@@ -394,21 +409,16 @@ export declare class AutoRAGAgent {
|
|
|
394
409
|
results: RetrievalResult[];
|
|
395
410
|
diagnostics: RetrievalDiagnostic[];
|
|
396
411
|
}>;
|
|
397
|
-
searchDatasourceDocuments(query: string, options?: {
|
|
398
|
-
readonly topK?: number;
|
|
399
|
-
readonly scope?: string;
|
|
400
|
-
}): Promise<{
|
|
401
|
-
results: RetrievalResult[];
|
|
402
|
-
diagnostics: RetrievalDiagnostic[];
|
|
403
|
-
}>;
|
|
404
412
|
/**
|
|
405
|
-
* Search one datasource connection only.
|
|
406
|
-
*
|
|
407
|
-
* datasource
|
|
408
|
-
*
|
|
409
|
-
*
|
|
410
|
-
*
|
|
411
|
-
*
|
|
413
|
+
* Search one datasource connection only. Only the target connection's
|
|
414
|
+
* retrieval methods are registered with the retriever, so no other
|
|
415
|
+
* datasource CLI is spawned at all and only that connection's hits are
|
|
416
|
+
* returned. Access is still gated by the trusted datasource context: an
|
|
417
|
+
* unknown or unauthorized `datasourceId` yields an empty result set.
|
|
418
|
+
*
|
|
419
|
+
* This backs the generated `search_datasource_<id>` tools; every authorized
|
|
420
|
+
* connection has one. Cross-datasource fan-out is
|
|
421
|
+
* {@link searchAllDocuments}, which spans every retrieval method.
|
|
412
422
|
*/
|
|
413
423
|
searchSingleDatasourceDocuments(datasourceId: string, query: string, options?: {
|
|
414
424
|
readonly topK?: number;
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -6,8 +6,7 @@ export type { AutoRAGEmittedResult, AutoRAGMappingEntry, AutoRAGResultsDetails,
|
|
|
6
6
|
export { createEmitResultsTool, EMIT_AUTORAG_RESULTS_TOOL_NAME, emitResultsSchema, } from "./emit-results-tool.js";
|
|
7
7
|
export { createJikjiFindTool, JIKJI_FIND_TOOL_NAME, type JikjiFindDetails, type JikjiFindPerRootPolicy, type JikjiFindProvider, type JikjiFindProviderResult, type MergedJikjiPolicy, } from "./jikji-find-tool.js";
|
|
8
8
|
export { createSearchAllDocumentsTool, SEARCH_ALL_DOCUMENTS_TOOL_NAME, type SearchAllDocumentsDetails, type SearchAllDocumentsProvider, type SearchAllDocumentsResult, } from "./search-all-tool.js";
|
|
9
|
-
export { createSearchDatasourceDocumentsTool, type DatasourceSearchProvider, SEARCH_DATASOURCE_DOCUMENTS_TOOL_NAME, type SearchDatasourceDocumentsDetails, } from "./search-datasource-tool.js";
|
|
10
9
|
export type { SearchDocumentDiagnostic, SearchDocumentDiagnosticCode, SearchDocumentDiagnosticSeverity, SearchDocumentEvidence, SearchDocumentResult, SearchDocumentsResponse, SearchDocumentsStreamEvent, SearchDocumentWarning, } from "./search-documents.js";
|
|
11
10
|
export { createSearchMinSyncDocumentsTool, SEARCH_MINSYNC_DOCUMENTS_TOOL_NAME, type SearchMinSyncDocumentsDetails, } from "./search-minsync-tool.js";
|
|
12
|
-
export { createSingleDatasourceSearchTools, SEARCH_SINGLE_DATASOURCE_TOOL_PREFIX, type SearchSingleDatasourceDetails, type SingleDatasourceSearchProvider, type SingleDatasourceToolSpec, singleDatasourceToolName, } from "./search-single-datasource-tool.js";
|
|
11
|
+
export { createSingleDatasourceSearchTools, formatDatasourceResults, SEARCH_SINGLE_DATASOURCE_TOOL_PREFIX, type SearchSingleDatasourceDetails, type SingleDatasourceSearchProvider, type SingleDatasourceToolSpec, singleDatasourceToolName, } from "./search-single-datasource-tool.js";
|
|
13
12
|
export { buildSystemPrompt, type SystemPromptConfig } from "./system-prompt.js";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type RefreshProgressPhase = "parsed" | "minsync" | "datasources" | "jikji" | "finalizing";
|
|
2
|
+
export interface RefreshProgressCounts {
|
|
3
|
+
readonly scanned: number;
|
|
4
|
+
readonly written: number;
|
|
5
|
+
readonly deleted: number;
|
|
6
|
+
readonly skipped: number;
|
|
7
|
+
}
|
|
8
|
+
export interface PersistedRefreshProgress {
|
|
9
|
+
readonly version: 1;
|
|
10
|
+
readonly runId: string;
|
|
11
|
+
readonly pid: number;
|
|
12
|
+
readonly state: "running" | "success" | "failed";
|
|
13
|
+
readonly phase: RefreshProgressPhase;
|
|
14
|
+
readonly startedAt: string;
|
|
15
|
+
readonly updatedAt: string;
|
|
16
|
+
readonly finishedAt?: string;
|
|
17
|
+
readonly sourceFiles?: {
|
|
18
|
+
readonly total: number;
|
|
19
|
+
};
|
|
20
|
+
readonly parsedCounts?: RefreshProgressCounts;
|
|
21
|
+
readonly minsync?: {
|
|
22
|
+
readonly synced?: number;
|
|
23
|
+
};
|
|
24
|
+
readonly error?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare function readRefreshProgress(root: string): PersistedRefreshProgress | undefined;
|
|
27
|
+
export declare function writeRefreshProgress(root: string, progress: PersistedRefreshProgress): void;
|
|
28
|
+
export declare function updateRefreshProgress(progress: PersistedRefreshProgress, update: Partial<Omit<PersistedRefreshProgress, "version" | "runId" | "pid" | "startedAt" | "updatedAt">>): PersistedRefreshProgress;
|
|
29
|
+
export declare function removeRefreshProgress(root: string): void;
|
|
30
|
+
export declare function isRefreshOwnerAlive(progress: PersistedRefreshProgress): boolean;
|
|
@@ -10,7 +10,7 @@ export type SearchDocumentDiagnosticSeverity = "info" | "warning" | "error";
|
|
|
10
10
|
* (#21/#22) does not require another source-breaking type change; codes not yet
|
|
11
11
|
* emitted are still valid members.
|
|
12
12
|
*/
|
|
13
|
-
export type SearchDocumentDiagnosticCode = "empty-query" | "no-verified-results" | "unknown-warning" | "caller-tool-dropped" | "minsync-unavailable" | "minsync-staging-excluded" | "minsync-sync-failed" | "embedder-unavailable" | "embedding-identity-mismatch" | "parser-skipped" | "parser-failed" | "
|
|
13
|
+
export type SearchDocumentDiagnosticCode = "empty-query" | "no-verified-results" | "unknown-warning" | "caller-tool-dropped" | "minsync-unavailable" | "minsync-staging-excluded" | "minsync-sync-failed" | "embedder-unavailable" | "embedding-identity-mismatch" | "parser-skipped" | "parser-failed" | "parser-warning" | "duplicate-excluded" | "unsupported-file" | "stale-index" | "deleted-mirror" | "pdf-extract-thin" | "retrieval-method-failed" | "jikji-unavailable" | "jikji-prepare-failed" | "jikji-find-failed" | "refresh-failed" | "refresh-interrupted" | "watch-failed" | "watch-limited" | "unknown-datasource-skill" | "missing-final-emit";
|
|
14
14
|
export interface SearchDocumentDiagnostic {
|
|
15
15
|
readonly code: SearchDocumentDiagnosticCode;
|
|
16
16
|
readonly severity: SearchDocumentDiagnosticSeverity;
|
|
@@ -5,14 +5,18 @@ import { type SearchDocumentRetrievalTraceResult } from "./search-documents.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Per-datasource search tools.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
8
|
+
* One tool is generated per authorized datasource connection (e.g.
|
|
9
|
+
* `search_datasource_discord`, or `search_datasource_kakao_work` for a
|
|
10
|
+
* `kakao-work` account alias). Its execution registers only that connection's
|
|
11
|
+
* retrieval methods with the retriever, so no other datasource CLI is spawned
|
|
12
|
+
* and the result set carries only that connection's hits.
|
|
13
|
+
*
|
|
14
|
+
* These generated tools are the only model-facing datasource retrieval
|
|
15
|
+
* surface. Cross-datasource fan-out belongs to `search_all_documents`, which
|
|
16
|
+
* already spans every configured retrieval method — including datasources — so
|
|
17
|
+
* a datasource-only fan-out tool would be redundant. Every authorized
|
|
18
|
+
* connection must therefore appear here; a datasource with no generated tool
|
|
19
|
+
* would become unreachable except through the full fan-out.
|
|
16
20
|
*
|
|
17
21
|
* Tools are generated from the configured, access-authorized datasource skills
|
|
18
22
|
* at agent construction, so a datasource that is disabled in config or denied
|
|
@@ -54,4 +58,6 @@ declare const searchSingleDatasourceSchema: Type.TObject<{
|
|
|
54
58
|
topK: Type.TOptional<Type.TInteger>;
|
|
55
59
|
scope: Type.TOptional<Type.TString>;
|
|
56
60
|
}>;
|
|
61
|
+
/** Shared rendering for datasource search tool results (fan-out removed). */
|
|
62
|
+
export declare function formatDatasourceResults(results: readonly RetrievalResult[], diagnostics: readonly RetrievalDiagnostic[]): string;
|
|
57
63
|
export {};
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { type AutoRAGResultsDetails } from "../../agent/emit-results-tool.js";
|
|
1
2
|
import type { CommandContext } from "./types.js";
|
|
3
|
+
/** Validate a curated report payload against the `emit_autorag_results` contract. */
|
|
4
|
+
export declare function validateReport(value: unknown): AutoRAGResultsDetails;
|
|
2
5
|
/** Persist a structured report submitted by an external curator. */
|
|
3
6
|
export declare function runReport(ctx: CommandContext): Promise<number>;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { InjectionClassifierModel } from "../../p2p/injection-classifier.js";
|
|
2
|
-
import { type SimplexPeerServer, startSimplexPeerServer } from "../../p2p/simplex-server.js";
|
|
2
|
+
import { type SimplexPeerServer, startSimplexPeerServer, syncSimplexPeers } from "../../p2p/simplex-server.js";
|
|
3
3
|
import { type SimplexTransport, type StartSimplexOptions } from "../../p2p/simplex-transport.js";
|
|
4
4
|
import { type ResolvedAgentModel, resolveAgentModel } from "../config.js";
|
|
5
5
|
import type { CommandContext } from "./types.js";
|
|
6
6
|
export interface ServeCommandDeps {
|
|
7
7
|
readonly startSimplexPeerServer?: typeof startSimplexPeerServer;
|
|
8
8
|
readonly startSimplexChat?: (options: StartSimplexOptions) => Promise<SimplexTransport>;
|
|
9
|
+
readonly syncSimplexPeers?: typeof syncSimplexPeers;
|
|
9
10
|
readonly waitUntilStopped?: (server: SimplexPeerServer) => Promise<void>;
|
|
10
11
|
readonly modelResolver?: typeof resolveAgentModel;
|
|
11
12
|
}
|
package/dist/cli/config.d.ts
CHANGED
|
@@ -68,14 +68,6 @@ export interface P2pConfig {
|
|
|
68
68
|
searchTimeoutMs?: number;
|
|
69
69
|
newFilesPublic?: boolean;
|
|
70
70
|
}
|
|
71
|
-
export interface UiConfig {
|
|
72
|
-
host?: string;
|
|
73
|
-
port?: number;
|
|
74
|
-
allowRemote?: boolean;
|
|
75
|
-
publicOrigin?: string;
|
|
76
|
-
corsOrigins?: string[];
|
|
77
|
-
tokenEnv?: string;
|
|
78
|
-
}
|
|
79
71
|
export interface AgentModelConfig {
|
|
80
72
|
/** Provider identity used for auth lookup and Model.provider (e.g. openrouter, fireworks, ollama). */
|
|
81
73
|
provider: string;
|
|
@@ -107,6 +99,7 @@ export interface CliConfig {
|
|
|
107
99
|
searchPaths: string[];
|
|
108
100
|
workspacePath: string;
|
|
109
101
|
memoryPath: string;
|
|
102
|
+
languages?: string[];
|
|
110
103
|
model?: AgentModelConfig;
|
|
111
104
|
minSync?: MinSyncMethodConfig;
|
|
112
105
|
jikji?: Record<string, unknown> | false;
|
|
@@ -122,8 +115,6 @@ export interface CliConfig {
|
|
|
122
115
|
datasources?: DatasourcesConfig;
|
|
123
116
|
/** Trusted datasource allow-tags/allow-scopes. Absent ⇒ default-deny. */
|
|
124
117
|
datasourceAccess?: DatasourceAccessContextOptions;
|
|
125
|
-
/** Optional local/deployment settings for the datasource UI. */
|
|
126
|
-
ui?: UiConfig;
|
|
127
118
|
/** P2P sharing configuration. Disabled by default. */
|
|
128
119
|
p2p?: P2pConfig;
|
|
129
120
|
}
|
package/dist/cli/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
declare const COMMANDS: readonly ["init", "setup", "refresh", "status", "search", "feedback", "evidence", "memory", "index", "watch", "health", "duplicates", "tui", "
|
|
2
|
+
declare const COMMANDS: readonly ["init", "setup", "refresh", "status", "search", "feedback", "evidence", "memory", "index", "watch", "health", "duplicates", "tui", "serve", "p2p", "lite", "models", "gateway"];
|
|
3
3
|
type CommandName = (typeof COMMANDS)[number];
|
|
4
4
|
export type { CommandName };
|
|
5
5
|
interface ParsedArgs {
|