@autorag/librarian 2.5.3 → 2.6.1

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 (47) hide show
  1. package/NOTICE +10 -13
  2. package/README.md +46 -7
  3. package/dist/agent/agent.d.ts +30 -1
  4. package/dist/agent/index.d.ts +2 -1
  5. package/dist/agent/query-peer-tool.d.ts +48 -0
  6. package/dist/agent/refresh-progress.d.ts +30 -0
  7. package/dist/agent/search-documents.d.ts +1 -1
  8. package/dist/cli/commands/report.d.ts +3 -0
  9. package/dist/cli/commands/serve.d.ts +2 -1
  10. package/dist/cli/config.d.ts +1 -10
  11. package/dist/cli/index.d.ts +1 -1
  12. package/dist/cli/index.js +2128 -3695
  13. package/dist/core.d.ts +1 -1
  14. package/dist/core.js +1556 -1180
  15. package/dist/index.js +1560 -1184
  16. package/dist/language.d.ts +21 -0
  17. package/dist/memory/memory.d.ts +0 -1
  18. package/dist/mirror/paths.d.ts +2 -0
  19. package/dist/mirror/sync.d.ts +1 -1
  20. package/dist/p2p/approval-store.d.ts +1 -0
  21. package/dist/p2p/simplex-query-store.d.ts +44 -0
  22. package/dist/p2p/simplex-server.d.ts +28 -7
  23. package/dist/p2p/simplex-transport.d.ts +28 -4
  24. package/dist/parser/defaults.d.ts +10 -4
  25. package/dist/parser/index.d.ts +3 -5
  26. package/dist/parser/kordoc.d.ts +53 -0
  27. package/dist/parser/ocr-engines.d.ts +12 -0
  28. package/dist/parser/ocr.d.ts +7 -1
  29. package/dist/parser/office.d.ts +1 -10
  30. package/dist/parser/types.d.ts +1 -1
  31. package/package.json +10 -10
  32. package/skills/autorag-lite-search/SKILL.md +57 -7
  33. package/skills/autorag-lite-setup/SKILL.md +2 -2
  34. package/skills/autorag-setup/SKILL.md +9 -2
  35. package/dist/cli/commands/ui.d.ts +0 -13
  36. package/dist/parser/hwp-markdown.d.ts +0 -25
  37. package/dist/parser/hwp.d.ts +0 -13
  38. package/dist/parser/opendataloader-pdf.d.ts +0 -31
  39. package/dist/parser/rhwp-adapter.d.ts +0 -30
  40. package/dist/ui/browse.d.ts +0 -11
  41. package/dist/ui/catalog.d.ts +0 -59
  42. package/dist/ui/config-store.d.ts +0 -43
  43. package/dist/ui/discover.d.ts +0 -17
  44. package/dist/ui/html.d.ts +0 -2
  45. package/dist/ui/probe.d.ts +0 -24
  46. package/dist/ui/prompt.d.ts +0 -21
  47. 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.85.1
9
+ @earendil-works/pi-agent-core@0.86.1
10
10
  License: MIT
11
11
 
12
- @earendil-works/pi-ai@0.85.1
12
+ @earendil-works/pi-ai@0.86.1
13
13
  License: MIT
14
14
 
15
- @earendil-works/pi-coding-agent@0.85.1
15
+ @earendil-works/pi-coding-agent@0.86.1
16
16
  License: MIT
17
17
 
18
- @earendil-works/pi-tui@0.85.1
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
@@ -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:**
@@ -175,7 +195,7 @@ bun add @autorag/librarian
175
195
 
176
196
  ### System Prerequisites
177
197
 
178
- - **Java 11 or newer:** Required for PDF parsing via `@opendataloader/pdf`. Check with `java -version`.
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 |
@@ -288,7 +327,7 @@ AutoRAG Agent stands on the shoulders of fantastic open-source projects:
288
327
  - **[Jikji](https://github.com/NomaDamas/jikji)** by [NomaDamas](https://github.com/NomaDamas) — High-performance find-first local document discovery.
289
328
  - **[dupey](https://github.com/NomaDamas/dupey)** by [NomaDamas](https://github.com/NomaDamas) — Fast duplicate and near-duplicate document family detection.
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).
291
- - **[OpenDataLoader](https://github.com/opendataloader/opendataloader-pdf)** / **Docling** — Robust PDF and document parsing runtimes.
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.
292
331
 
293
332
  ---
294
333
 
@@ -4,16 +4,21 @@ 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 { DefaultParserRegistryOptions } from "../parser/index.js";
12
+ import type { SimplexQueryState } from "../p2p/simplex-query-store.js";
13
+ import { type SimplexTransport } from "../p2p/simplex-transport.js";
14
+ import type { PeerQueryResponse } from "../p2p/wire.js";
15
+ import { type DefaultParserRegistryOptions } from "../parser/index.js";
12
16
  import { RetrievalEngine } from "../retrieval/engine.js";
13
17
  import { RetrievalMethodRegistry } from "../retrieval/registry.js";
14
18
  import type { CuratedResult, RetrievalDiagnostic, RetrievalOptions, RetrievalResult } from "../retrieval/types.js";
15
19
  import { type ScanDuplicateDocumentsDetails } from "./dupey-tool.js";
16
20
  import { type JikjiFindProviderResult } from "./jikji-find-tool.js";
21
+ import { type RefreshProgressCounts, type RefreshProgressPhase } from "./refresh-progress.js";
17
22
  import { type SearchDocumentDiagnostic, type SearchDocumentsResponse, type SearchDocumentsStreamEvent } from "./search-documents.js";
18
23
  import { type WatcherFactory, type WatchRefreshHandle } from "./watch-refresh.js";
19
24
  import { type WebFetchToolOptions } from "./web-fetch-tool.js";
@@ -61,6 +66,17 @@ export interface AutoRAGRefreshStatus {
61
66
  readonly stale: boolean;
62
67
  readonly diagnostics: readonly SearchDocumentDiagnostic[];
63
68
  readonly components: AutoRAGRefreshComponentStatus;
69
+ readonly progress?: {
70
+ readonly phase: RefreshProgressPhase;
71
+ readonly sourceFiles?: {
72
+ readonly total: number;
73
+ };
74
+ readonly parsedCounts?: RefreshProgressCounts;
75
+ readonly minsync?: {
76
+ readonly synced?: number;
77
+ };
78
+ readonly ownerAlive?: boolean;
79
+ };
64
80
  /** Path-free failure summary of the last refresh, if it failed. */
65
81
  readonly lastError?: string;
66
82
  }
@@ -105,11 +121,18 @@ export interface AutoRAGThinkingOptions {
105
121
  /** Thinking level for the verification/finalization phase. Default "high". */
106
122
  readonly final?: AutoRAGThinkingLevel;
107
123
  }
124
+ export interface PeerQueryOptions {
125
+ readonly port?: number;
126
+ readonly simplexDbPrefix?: string;
127
+ readonly openTransport?: () => Promise<SimplexTransport>;
128
+ readonly onResponse?: (state: SimplexQueryState, response: PeerQueryResponse) => void;
129
+ }
108
130
  export interface AutoRAGAgentOptions {
109
131
  model?: Model<Api>;
110
132
  apiKey?: string;
111
133
  providerApiKeys?: Readonly<Record<string, string>>;
112
134
  searchPaths: string[];
135
+ languages?: readonly LanguageTag[];
113
136
  manifestDir?: string;
114
137
  memoryPath?: string;
115
138
  workspacePath?: string;
@@ -143,6 +166,11 @@ export interface AutoRAGAgentOptions {
143
166
  searchTimeoutMs?: number;
144
167
  /** Maximum number of retrieval/tool executions allowed in one search. */
145
168
  maxSearchToolCalls?: number;
169
+ /**
170
+ * Outbound SimpleX queries to trusted peer AutoRAG agents. Remote sessions
171
+ * never receive this tool.
172
+ */
173
+ peerQuery?: PeerQueryOptions | false;
146
174
  /** Restrict the agent to retrieval and result-emission tools for remote runs. */
147
175
  remoteSession?: boolean;
148
176
  /** Two-phase progressive answers with per-phase thinking control. Default enabled. */
@@ -197,6 +225,7 @@ export declare class AutoRAGAgent {
197
225
  private refreshState;
198
226
  private readonly searchPaths;
199
227
  private readonly configuredSearchPaths;
228
+ readonly languages: readonly LanguageTag[];
200
229
  private retrievalScopeBindings;
201
230
  private readonly datasourceVirtualScopePrefixes;
202
231
  private readonly workspaceProjectRoot;
@@ -1,10 +1,11 @@
1
- export type { AutoRAGAgentOptions, AutoRefreshOptions } from "./agent.js";
1
+ export type { AutoRAGAgentOptions, AutoRefreshOptions, PeerQueryOptions } from "./agent.js";
2
2
  export { AutoRAGAgent } from "./agent.js";
3
3
  export { buildDatasourceSkillsPrompt, createLoadDatasourceSkillTool, type DatasourceSkillProvider, datasourceSkillLocation, formatDatasourceSkillInvocation, LOAD_DATASOURCE_SKILL_TOOL_NAME, type LoadDatasourceSkillDetails, toDatasourceAgentSkill, } from "./datasource-skill.js";
4
4
  export { createScanDuplicateDocumentsTool, SCAN_DUPLICATE_DOCUMENTS_TOOL_NAME, type ScanDuplicateDocumentsDetails, type ScanDuplicateDocumentsProvider, } from "./dupey-tool.js";
5
5
  export type { AutoRAGEmittedResult, AutoRAGMappingEntry, AutoRAGResultsDetails, } from "./emit-results-tool.js";
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
+ export { createQueryPeerAgentTool, QUERY_PEER_AGENT_TOOL_NAME, type QueryPeerAgentDetails, type QueryPeerAgentResult, type QueryPeerAgentToolOptions, } from "./query-peer-tool.js";
8
9
  export { createSearchAllDocumentsTool, SEARCH_ALL_DOCUMENTS_TOOL_NAME, type SearchAllDocumentsDetails, type SearchAllDocumentsProvider, type SearchAllDocumentsResult, } from "./search-all-tool.js";
9
10
  export type { SearchDocumentDiagnostic, SearchDocumentDiagnosticCode, SearchDocumentDiagnosticSeverity, SearchDocumentEvidence, SearchDocumentResult, SearchDocumentsResponse, SearchDocumentsStreamEvent, SearchDocumentWarning, } from "./search-documents.js";
10
11
  export { createSearchMinSyncDocumentsTool, SEARCH_MINSYNC_DOCUMENTS_TOOL_NAME, type SearchMinSyncDocumentsDetails, } from "./search-minsync-tool.js";
@@ -0,0 +1,48 @@
1
+ import type { AgentTool } from "@earendil-works/pi-agent-core";
2
+ import { Type } from "typebox";
3
+ import { type SimplexQueryState } from "../p2p/simplex-query-store.js";
4
+ import type { SimplexTransport } from "../p2p/simplex-transport.js";
5
+ import type { PeerQueryResponse } from "../p2p/wire.js";
6
+ export declare const QUERY_PEER_AGENT_TOOL_NAME = "query_peer_agent";
7
+ declare const queryPeerAgentSchema: Type.TObject<{
8
+ alias: Type.TString;
9
+ query: Type.TString;
10
+ topK: Type.TOptional<Type.TInteger>;
11
+ scope: Type.TOptional<Type.TString>;
12
+ }>;
13
+ export interface QueryPeerAgentResult {
14
+ readonly number: number;
15
+ readonly title: string;
16
+ readonly summary: string;
17
+ readonly source: string;
18
+ readonly excerpt: string;
19
+ }
20
+ export interface QueryPeerAgentDetails {
21
+ readonly method: "query_peer_agent";
22
+ readonly ok: boolean;
23
+ readonly alias: string;
24
+ readonly contactId?: number;
25
+ readonly pendingId?: string;
26
+ readonly expiresAt?: string;
27
+ readonly status?: "ok" | "rejected" | "pending";
28
+ readonly answer?: string;
29
+ readonly results?: readonly QueryPeerAgentResult[];
30
+ readonly diagnostics?: PeerQueryResponse["diagnostics"];
31
+ readonly fileCount?: number;
32
+ readonly message?: string;
33
+ }
34
+ export interface QueryPeerAgentToolOptions {
35
+ readonly workspacePath: string;
36
+ readonly openTransport: () => Promise<SimplexTransport>;
37
+ readonly fastTimeoutMs?: number;
38
+ readonly autoStart?: boolean;
39
+ readonly sessionId?: () => string | undefined;
40
+ readonly onResponse?: (state: SimplexQueryState, response: PeerQueryResponse) => void;
41
+ readonly onExpired?: (state: SimplexQueryState) => void;
42
+ }
43
+ export interface QueryPeerAgentTool extends AgentTool<typeof queryPeerAgentSchema, QueryPeerAgentDetails> {
44
+ readonly ready: Promise<void>;
45
+ close(): Promise<void>;
46
+ }
47
+ export declare function createQueryPeerAgentTool(options: QueryPeerAgentToolOptions): QueryPeerAgentTool;
48
+ export {};
@@ -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" | "pdf-java-version" | "duplicate-excluded" | "unsupported-file" | "stale-index" | "deleted-mirror" | "pdf-extract-thin" | "pdf-hybrid-unavailable" | "retrieval-method-failed" | "jikji-unavailable" | "jikji-prepare-failed" | "jikji-find-failed" | "refresh-failed" | "watch-failed" | "watch-limited" | "unknown-datasource-skill" | "missing-final-emit";
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;
@@ -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
  }
@@ -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
  }
@@ -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", "ui", "serve", "p2p", "lite", "models", "gateway"];
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 {