@autorag/librarian 2.3.0 → 2.4.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.
- package/README.md +143 -16
- package/dist/agent/agent.d.ts +45 -13
- package/dist/agent/bash-tool.d.ts +2 -0
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/search-documents.d.ts +12 -3
- package/dist/agent/search-minsync-tool.d.ts +2 -2
- package/dist/cli/commands/evidence.d.ts +3 -0
- package/dist/cli/commands/index.d.ts +3 -3
- package/dist/cli/commands/refresh.d.ts +3 -4
- package/dist/cli/commands/search.d.ts +2 -2
- package/dist/cli/commands/tui.d.ts +36 -0
- package/dist/cli/commands/ui.d.ts +13 -0
- package/dist/cli/commands/watch.d.ts +1 -1
- package/dist/cli/config.d.ts +17 -19
- package/dist/cli/index.js +14497 -10906
- package/dist/cli/tui-commands.d.ts +16 -0
- package/dist/cli/tui-session-store.d.ts +16 -0
- package/dist/datasource/access-context.d.ts +6 -12
- package/dist/datasource/crawler-types.d.ts +2 -0
- package/dist/datasource/described-skill.d.ts +17 -0
- package/dist/datasource/index.d.ts +3 -3
- package/dist/datasource/result-filter.d.ts +2 -1
- package/dist/datasource/skills/clawgallery/client.d.ts +9 -0
- package/dist/datasource/skills/clawgallery/index.d.ts +5 -0
- package/dist/datasource/skills/clawgallery/methods.d.ts +19 -0
- package/dist/datasource/skills/clawgallery/paths.d.ts +7 -0
- package/dist/datasource/skills/clawgallery/skill.d.ts +35 -0
- package/dist/datasource/skills/clawgallery/types.d.ts +58 -0
- package/dist/datasource/skills/cloud-drive/index.d.ts +1 -0
- package/dist/datasource/skills/{gdrive → cloud-drive}/rclone-connector.d.ts +4 -0
- package/dist/datasource/skills/cloud-drive/skill.d.ts +1 -1
- package/dist/datasource/skills/discrawl/types.d.ts +4 -8
- package/dist/datasource/skills/factory.d.ts +2 -0
- package/dist/datasource/skills/gmail/index.d.ts +0 -1
- package/dist/datasource/skills/gmail/skill.d.ts +1 -1
- package/dist/datasource/skills/katok/methods.d.ts +6 -4
- package/dist/datasource/skills/katok/types.d.ts +8 -26
- package/dist/datasource/skills/mailcrawl/client.d.ts +15 -0
- package/dist/datasource/skills/mailcrawl/config.d.ts +2 -0
- package/dist/datasource/skills/mailcrawl/index.d.ts +4 -0
- package/dist/datasource/skills/mailcrawl/methods.d.ts +15 -0
- package/dist/datasource/skills/mailcrawl/skill.d.ts +34 -0
- package/dist/datasource/skills/mailcrawl/types.d.ts +71 -0
- package/dist/datasource/skills/obsidian/skill.d.ts +1 -0
- package/dist/datasource/skills/obsidian/types.d.ts +2 -0
- package/dist/datasource/types.d.ts +5 -2
- package/dist/filesystem/cloud-placeholder.d.ts +26 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2591 -1438
- package/dist/jikji/client.d.ts +3 -0
- package/dist/minsync/client.d.ts +5 -1
- package/dist/minsync/embedder-config.d.ts +4 -1
- package/dist/minsync/index.d.ts +4 -4
- package/dist/minsync/installer.d.ts +1 -0
- package/dist/minsync/method.d.ts +17 -8
- package/dist/minsync/types.d.ts +5 -0
- package/dist/mirror/sync.d.ts +1 -1
- package/dist/parser/defaults.d.ts +2 -0
- package/dist/parser/index.d.ts +2 -2
- package/dist/parser/opendataloader-pdf.d.ts +10 -0
- package/dist/parser/types.d.ts +7 -0
- package/dist/retrieval/index.d.ts +0 -2
- package/dist/retrieval/registry.d.ts +2 -2
- package/dist/retrieval/types.d.ts +1 -1
- package/dist/ui/browse.d.ts +11 -0
- package/dist/ui/catalog.d.ts +59 -0
- package/dist/ui/config-store.d.ts +43 -0
- package/dist/ui/discover.d.ts +17 -0
- package/dist/ui/html.d.ts +2 -0
- package/dist/ui/probe.d.ts +24 -0
- package/dist/ui/prompt.d.ts +21 -0
- package/dist/ui/server.d.ts +28 -0
- package/package.json +13 -12
- package/skills/autorag/SKILL.md +64 -43
- package/skills/autorag-setup/SKILL.md +76 -39
- package/dist/agent/search-bm25-tool.d.ts +0 -18
- package/dist/datasource/skills/discrawl/config.d.ts +0 -9
- package/dist/datasource/skills/gdrive/connector.d.ts +0 -30
- package/dist/datasource/skills/gdrive/index.d.ts +0 -3
- package/dist/datasource/skills/gdrive/skill.d.ts +0 -24
- package/dist/datasource/skills/gmail/himalaya-connector.d.ts +0 -40
- package/dist/retrieval/methods/bm25.d.ts +0 -52
package/dist/cli/config.d.ts
CHANGED
|
@@ -4,47 +4,41 @@ import { type LoadLocalAutoRAGModelOptions } from "../agent/local-model.js";
|
|
|
4
4
|
import type { DatasourceAccessContextOptions } from "../datasource/access-context.js";
|
|
5
5
|
import { type DatasourcesConfig } from "../datasource/skills/factory.js";
|
|
6
6
|
import type { EnsureMinSyncBinaryOptions, MinSyncEmbedderConfig } from "../minsync/index.js";
|
|
7
|
-
import type { BM25Engine, BM25FallbackMode } from "../retrieval/methods/bm25.js";
|
|
8
7
|
export declare const DEFAULT_CONFIG_FILENAME = "config.json";
|
|
9
8
|
export declare const LEGACY_CONFIG_FILENAME = "autorag.config.json";
|
|
10
9
|
export { AUTORAG_HOME_ENV, resolveAutoRAGHome } from "../config/home.js";
|
|
11
10
|
export declare class ConfigError extends Error {
|
|
12
11
|
constructor(message: string);
|
|
13
12
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Typed BM25 method config persisted in `config.json`. Missing `enabled` means
|
|
16
|
-
* enabled (true). `false` as a top-level value is also accepted and disables.
|
|
17
|
-
*/
|
|
18
|
-
export interface Bm25MethodConfig {
|
|
19
|
-
enabled?: boolean;
|
|
20
|
-
indexPath?: string;
|
|
21
|
-
fallback?: BM25FallbackMode;
|
|
22
|
-
forceEngine?: Exclude<BM25Engine, "none">;
|
|
23
|
-
importBinding?: () => Promise<typeof import("@pngwasi/node-tantivy-binding")>;
|
|
24
|
-
}
|
|
25
13
|
/**
|
|
26
14
|
* Typed MinSync method config persisted in `config.json`. Missing `enabled`
|
|
27
|
-
* means enabled (true); `autoInstall` defaults to
|
|
15
|
+
* means enabled (true); `autoInstall` defaults to true. `embedder` carries
|
|
28
16
|
* the MinSync vector embedder settings validated by {@link normalizeEmbedder}.
|
|
29
17
|
*/
|
|
30
18
|
export interface MinSyncMethodConfig {
|
|
31
19
|
enabled?: boolean;
|
|
32
20
|
autoInstall?: boolean;
|
|
33
|
-
binaryPath?: string;
|
|
34
21
|
workspacePath?: string;
|
|
22
|
+
maxChunkSize?: number;
|
|
35
23
|
installer?: Omit<EnsureMinSyncBinaryOptions, "root">;
|
|
36
24
|
embedder?: MinSyncEmbedderConfig;
|
|
37
25
|
}
|
|
38
26
|
/** Indexing method config as it appears in a raw config file (before normalization). */
|
|
39
27
|
export interface RawIndexingMethods {
|
|
40
|
-
bm25?: Bm25MethodConfig | false;
|
|
41
28
|
minSync?: MinSyncMethodConfig | false;
|
|
42
29
|
}
|
|
43
30
|
/** Result of {@link normalizeIndexingConfig}: always fully populated. */
|
|
44
31
|
export interface NormalizedIndexingConfig {
|
|
45
|
-
bm25: Bm25MethodConfig;
|
|
46
32
|
minSync: MinSyncMethodConfig;
|
|
47
33
|
}
|
|
34
|
+
export interface UiConfig {
|
|
35
|
+
host?: string;
|
|
36
|
+
port?: number;
|
|
37
|
+
allowRemote?: boolean;
|
|
38
|
+
publicOrigin?: string;
|
|
39
|
+
corsOrigins?: string[];
|
|
40
|
+
tokenEnv?: string;
|
|
41
|
+
}
|
|
48
42
|
export interface AgentModelConfig {
|
|
49
43
|
/** Provider identity used for auth lookup and Model.provider (e.g. openrouter, fireworks, ollama). */
|
|
50
44
|
provider: string;
|
|
@@ -78,8 +72,7 @@ export interface CliConfig {
|
|
|
78
72
|
memoryPath: string;
|
|
79
73
|
model?: AgentModelConfig;
|
|
80
74
|
minSync?: MinSyncMethodConfig;
|
|
81
|
-
|
|
82
|
-
jikji?: Record<string, unknown>;
|
|
75
|
+
jikji?: Record<string, unknown> | false;
|
|
83
76
|
parserOptions?: Record<string, unknown>;
|
|
84
77
|
dupey?: {
|
|
85
78
|
enabled?: boolean;
|
|
@@ -91,6 +84,8 @@ export interface CliConfig {
|
|
|
91
84
|
datasources?: DatasourcesConfig;
|
|
92
85
|
/** Trusted datasource allow-tags/allow-scopes. Absent ⇒ default-deny. */
|
|
93
86
|
datasourceAccess?: DatasourceAccessContextOptions;
|
|
87
|
+
/** Optional local/deployment settings for the datasource UI. */
|
|
88
|
+
ui?: UiConfig;
|
|
94
89
|
}
|
|
95
90
|
export interface ResolveConfigInput {
|
|
96
91
|
flags: Record<string, string | boolean | undefined>;
|
|
@@ -115,7 +110,7 @@ export declare function normalizeEmbedder(raw: unknown, path: string): MinSyncEm
|
|
|
115
110
|
/**
|
|
116
111
|
* Normalize raw indexing method config into a fully-populated shape.
|
|
117
112
|
*
|
|
118
|
-
* - `undefined` / missing key => `{ enabled: true
|
|
113
|
+
* - `undefined` / missing key => `{ enabled: true, autoInstall: true }`
|
|
119
114
|
* - `false` => `{ enabled: false }` (disabled marker)
|
|
120
115
|
* - object merges with `enabled: true` default and is validated
|
|
121
116
|
*
|
|
@@ -166,6 +161,9 @@ export interface ResolvedAgentModelDetailed {
|
|
|
166
161
|
}
|
|
167
162
|
export declare function resolveAgentModel(config: CliConfig, localOptions?: LoadLocalAutoRAGModelOptions): ResolvedAgentModel;
|
|
168
163
|
export declare function resolveAgentModelDetailed(config: CliConfig, localOptions?: LoadLocalAutoRAGModelOptions): ResolvedAgentModelDetailed;
|
|
164
|
+
export declare function readRawConfigObject(path: string): Record<string, unknown>;
|
|
165
|
+
/** Atomically replace a config file, preserving the caller's JSON object. */
|
|
166
|
+
export declare function writeConfigObject(path: string, config: unknown): void;
|
|
169
167
|
export declare function writeDefaultConfig(path: string, partial: Partial<CliConfig>, opts?: {
|
|
170
168
|
force?: boolean;
|
|
171
169
|
atomicCreate?: boolean;
|