@autorag/librarian 2.5.2 → 2.5.3

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 (41) hide show
  1. package/README.md +7 -6
  2. package/dist/agent/agent.d.ts +9 -14
  3. package/dist/agent/index.d.ts +1 -2
  4. package/dist/agent/search-single-datasource-tool.d.ts +14 -8
  5. package/dist/cli/index.js +2130 -1057
  6. package/dist/core.js +1711 -665
  7. package/dist/datasource/errors.d.ts +1 -1
  8. package/dist/datasource/index.d.ts +3 -2
  9. package/dist/datasource/skills/discrawl/skill.d.ts +1 -1
  10. package/dist/datasource/skills/discrawl/types.d.ts +2 -2
  11. package/dist/datasource/skills/github-gist/connector.d.ts +38 -0
  12. package/dist/datasource/skills/github-gist/index.d.ts +3 -0
  13. package/dist/datasource/skills/github-gist/semantic.d.ts +102 -0
  14. package/dist/datasource/skills/github-gist/skill.d.ts +39 -0
  15. package/dist/datasource/skills/lark/client.d.ts +23 -0
  16. package/dist/datasource/skills/lark/index.d.ts +2 -0
  17. package/dist/datasource/skills/lark/skill.d.ts +36 -0
  18. package/dist/datasource/skills/lazykatok/client.d.ts +28 -0
  19. package/dist/datasource/skills/lazykatok/index.d.ts +12 -0
  20. package/dist/datasource/skills/{katok → lazykatok}/methods.d.ts +12 -12
  21. package/dist/datasource/skills/lazykatok/paths.d.ts +40 -0
  22. package/dist/datasource/skills/{katok → lazykatok}/skill.d.ts +10 -10
  23. package/dist/datasource/skills/lazykatok/types.d.ts +134 -0
  24. package/dist/datasource/skills/mailcrawl/client.d.ts +2 -0
  25. package/dist/datasource/skills/mailcrawl/types.d.ts +12 -0
  26. package/dist/datasource/types.d.ts +4 -4
  27. package/dist/embedding-runtime/manifest.d.ts +8 -0
  28. package/dist/embedding-runtime/types.d.ts +4 -0
  29. package/dist/index.js +1719 -671
  30. package/dist/process/terminate-tree.d.ts +2 -0
  31. package/dist/retrieval/types.d.ts +1 -1
  32. package/licenses/embedding-assets.json +20 -4
  33. package/package.json +1 -1
  34. package/skills/autorag-doctor/SKILL.md +4 -3
  35. package/skills/autorag-lite-setup/SKILL.md +2 -2
  36. package/skills/autorag-setup/SKILL.md +9 -6
  37. package/dist/agent/search-datasource-tool.d.ts +0 -30
  38. package/dist/datasource/skills/katok/client.d.ts +0 -21
  39. package/dist/datasource/skills/katok/index.d.ts +0 -12
  40. package/dist/datasource/skills/katok/paths.d.ts +0 -40
  41. package/dist/datasource/skills/katok/types.d.ts +0 -123
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 (`katok`, `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).*
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
 
@@ -140,7 +140,7 @@ AutoRAG Agent connects to external tools and communication platforms using dedic
140
140
  | Datasource | Skill Alias | Backend / Driver | Storage & Privacy Model | Search Capabilities |
141
141
  |---|---|---|---|---|
142
142
  | **Local Documents** | `local` | Native filesystem & MinSync | Workspace-local parsed mirrors (`.autorag/`) | BM25, Semantic, Hybrid |
143
- | **KakaoTalk** | `katok` | [`katok`](https://github.com/NomaDamas/katok) CLI | Native KakaoTalk archive; zero direct DB access | BM25, Semantic, Hybrid |
143
+ | **KakaoTalk** | `kakao` | [`lazykatok`](https://github.com/changeroa/lazykatok) CLI | Native KakaoTalk archive; zero direct DB access | BM25, Semantic, Hybrid |
144
144
  | **Discord** | `discord` | [`discrawl`](https://github.com/openclaw/discrawl) CLI | Native SQLite archive; token-free wiretap mode | BM25, Semantic, Hybrid |
145
145
  | **WhatsApp** | `whatsapp` | [`wacrawl`](https://github.com/openclaw/wacrawl) CLI | Local-first incremental archive + FTS5 | Lexical FTS5 |
146
146
  | **Telegram** | `telegram` | [`telecrawl`](https://github.com/openclaw/telecrawl) CLI | Local-first desktop archive + FTS5 | Lexical FTS5 |
@@ -259,7 +259,7 @@ agent.recordFeedbackByNumbers(response.sessionId, [1], [2]);
259
259
  Deep dive into AutoRAG Agent's architecture, security, and integration guides:
260
260
 
261
261
  - **[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.
262
+ - **[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
263
  - **[Datasource Skills Reference](docs/datasource-skills.md):** Full configuration contracts, connection aliases, and connector options.
264
264
  - **[Manual QA & Datasource Test Harnesses](docs/manual-qa-datasources.md):** Real-world testing guides for Discord, KakaoTalk, Slack, Notion, and email.
265
265
  - **[P2P SimpleX Sharing & Path Standard](docs/p2p-path-standard.md):** Decentralized peer query sharing with SimpleX, PII redaction, and approval queues.
@@ -273,7 +273,8 @@ Deep dive into AutoRAG Agent's architecture, security, and integration guides:
273
273
 
274
274
  AutoRAG Agent is an open-source project built by the community. We welcome contributions, bug reports, datasource connectors, and ideas!
275
275
 
276
- - **Contributing:** Feel free to open an issue or pull request. Please check our [Git Workflow in AGENTS.md](AGENTS.md) and run `bun test` before submitting.
276
+ - **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).
277
+ - **Security:** Private vulnerability reports and the response SLA live in [SECURITY.md](SECURITY.md).
277
278
  - **GitHub Contributors:** [View all contributors](https://github.com/Marker-Inc-Korea/AutoRAG/graphs/contributors) on GitHub.
278
279
 
279
280
  ---
@@ -286,7 +287,7 @@ AutoRAG Agent stands on the shoulders of fantastic open-source projects:
286
287
  - **[MinSync](https://github.com/Marker-Inc-Korea/minsync)** — Ultra-fast incremental Change Data Capture (CDC) chunking and local BM25/vector indexing.
287
288
  - **[Jikji](https://github.com/NomaDamas/jikji)** by [NomaDamas](https://github.com/NomaDamas) — High-performance find-first local document discovery.
288
289
  - **[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 [`katok`](https://github.com/NomaDamas/katok), [`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).
290
+ - **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).
290
291
  - **[OpenDataLoader](https://github.com/opendataloader/opendataloader-pdf)** / **Docling** — Robust PDF and document parsing runtimes.
291
292
 
292
293
  ---
@@ -321,7 +322,7 @@ Common failures and their fix:
321
322
  | A datasource errors during refresh | `datasource-index-failed` | run that CLI's own `doctor` |
322
323
  | MinSync or Jikji missing | `minsync-unavailable`, `jikji-unavailable` | check the Rust toolchain, re-run refresh |
323
324
 
324
- Native datasource stores stay owned by their CLIs — AutoRAG never rebuilds them. Fix a broken archive with `katok 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
+ 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
326
 
326
327
  ## License
327
328
 
@@ -394,21 +394,16 @@ export declare class AutoRAGAgent {
394
394
  results: RetrievalResult[];
395
395
  diagnostics: RetrievalDiagnostic[];
396
396
  }>;
397
- searchDatasourceDocuments(query: string, options?: {
398
- readonly topK?: number;
399
- readonly scope?: string;
400
- }): Promise<{
401
- results: RetrievalResult[];
402
- diagnostics: RetrievalDiagnostic[];
403
- }>;
404
397
  /**
405
- * Search one datasource connection only. Unlike
406
- * {@link searchDatasourceDocuments}, which fans out to every authorized
407
- * datasource and filters afterwards, this registers only the target
408
- * connection's retrieval methods with the retriever, so no other
409
- * datasource CLI is spawned at all. Access is still gated by the trusted
410
- * datasource context: an unknown or unauthorized `datasourceId` yields an
411
- * empty result set.
398
+ * Search one datasource connection only. Only the target connection's
399
+ * retrieval methods are registered with the retriever, so no other
400
+ * datasource CLI is spawned at all and only that connection's hits are
401
+ * returned. Access is still gated by the trusted datasource context: an
402
+ * unknown or unauthorized `datasourceId` yields an empty result set.
403
+ *
404
+ * This backs the generated `search_datasource_<id>` tools; every authorized
405
+ * connection has one. Cross-datasource fan-out is
406
+ * {@link searchAllDocuments}, which spans every retrieval method.
412
407
  */
413
408
  searchSingleDatasourceDocuments(datasourceId: string, query: string, options?: {
414
409
  readonly topK?: number;
@@ -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";
@@ -5,14 +5,18 @@ import { type SearchDocumentRetrievalTraceResult } from "./search-documents.js";
5
5
  /**
6
6
  * Per-datasource search tools.
7
7
  *
8
- * `search_datasource_documents` always fans out to every authorized datasource:
9
- * the retriever spawns every datasource CLI and only then filters results, so
10
- * an agent that already knows which connection holds the answer (from memory or
11
- * from the question itself) still pays for — and receives — every other
12
- * datasource's hits. These generated tools fix that: one tool per authorized
13
- * datasource connection (e.g. `search_datasource_discord`,
14
- * `search_datasource_kakao_work` for a `kakao-work` account alias) whose
15
- * execution spawns only that connection's retrieval methods.
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 {};