@autorag/librarian 2.13.3 → 2.13.5
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 +6 -0
- package/README.md +50 -19
- package/dist/agent/agent.d.ts +110 -39
- package/dist/agent/cloud-release-extension.d.ts +43 -0
- package/dist/agent/context-token-guard.d.ts +11 -6
- package/dist/agent/decision-backends.d.ts +49 -0
- package/dist/agent/decision-model-check.d.ts +92 -0
- package/dist/agent/dupey-tool.d.ts +2 -0
- package/dist/agent/everything-search-tool.d.ts +1 -0
- package/dist/agent/fsearch-search-tool.d.ts +1 -0
- package/dist/agent/index.d.ts +4 -1
- package/dist/agent/jev-extension.d.ts +27 -32
- package/dist/agent/jikji-find-tool.d.ts +5 -0
- package/dist/agent/name-candidates.d.ts +88 -0
- package/dist/agent/permission-gate.d.ts +2 -5
- package/dist/agent/query-routing.d.ts +1 -1
- package/dist/agent/search-documents.d.ts +1 -1
- package/dist/agent/sllm-decision.d.ts +34 -0
- package/dist/agent/token-count.d.ts +4 -0
- package/dist/cli/commands/duplicates.d.ts +3 -2
- package/dist/cli/commands/models.d.ts +2 -0
- package/dist/cli/commands/search.d.ts +2 -0
- package/dist/cli/config.d.ts +49 -30
- package/dist/cli/index.js +11417 -8530
- package/dist/cli/setup.d.ts +27 -1
- package/dist/cloud/jev-backend.d.ts +26 -4
- package/dist/core.js +5905 -3131
- package/dist/datasource/connector-skill.d.ts +1 -1
- package/dist/datasource/connector.d.ts +1 -1
- package/dist/datasource/index.d.ts +2 -3
- package/dist/datasource/skills/obsidian/index.d.ts +1 -1
- package/dist/datasource/skills/obsidian/methods.d.ts +1 -1
- package/dist/datasource/skills/obsidian/skill.d.ts +1 -0
- package/dist/datasource/skills/obsidian/vault-index.d.ts +1 -1
- package/dist/datasource/skills/wombat/client.d.ts +17 -0
- package/dist/datasource/skills/wombat/index.d.ts +4 -0
- package/dist/datasource/skills/wombat/methods.d.ts +15 -0
- package/dist/datasource/skills/wombat/skill.d.ts +38 -0
- package/dist/datasource/skills/wombat/types.d.ts +89 -0
- package/dist/dupey/cli.d.ts +21 -1
- package/dist/dupey/filter.d.ts +8 -1
- package/dist/dupey/index.d.ts +1 -0
- package/dist/dupey/scan-plan.d.ts +23 -0
- package/dist/embedding/index.d.ts +3 -1
- package/dist/everything/client.d.ts +1 -2
- package/dist/filesystem/cloud-placeholder.d.ts +313 -21
- package/dist/filesystem/shared-exclusive-queue.d.ts +16 -0
- package/dist/fsearch/client.d.ts +3 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6010 -3199
- package/dist/jikji/answer-pack.d.ts +7 -1
- package/dist/jikji/client.d.ts +28 -14
- package/dist/jikji/diagnostics.d.ts +16 -2
- package/dist/jikji/index.d.ts +3 -3
- package/dist/jikji/installer.d.ts +11 -5
- package/dist/jikji/retry-command.d.ts +10 -0
- package/dist/jikji/types.d.ts +47 -1
- package/dist/jikji/version.d.ts +20 -0
- package/dist/mcp/index.js +5980 -3193
- package/dist/mcp/server.d.ts +3 -0
- package/dist/minsync/binary.d.ts +10 -5
- package/dist/minsync/client.d.ts +7 -10
- package/dist/minsync/embedder-config.d.ts +11 -10
- package/dist/minsync/errors.d.ts +3 -0
- package/dist/minsync/index.d.ts +1 -1
- package/dist/minsync/installer.d.ts +1 -1
- package/dist/minsync/method.d.ts +1 -0
- package/dist/minsync/types.d.ts +0 -9
- package/dist/minsync/version.d.ts +20 -0
- package/dist/mirror/cloud-fingerprints.d.ts +30 -0
- package/dist/mirror/cloud.d.ts +79 -0
- package/dist/mirror/index.d.ts +4 -0
- package/dist/mirror/sync.d.ts +33 -1
- package/dist/parser/csv.d.ts +26 -0
- package/dist/parser/defaults.d.ts +1 -1
- package/dist/parser/index.d.ts +2 -0
- package/dist/parser/kordoc.d.ts +6 -3
- package/dist/parser/parse-worker.js +668 -28
- package/dist/parser/spreadsheet-render.d.ts +53 -0
- package/dist/parser/spreadsheet.d.ts +27 -0
- package/dist/profiles/loop-guard.d.ts +8 -2
- package/dist/profiles/retrieval-tools.d.ts +2 -1
- package/dist/profiles.js +13531 -10756
- package/dist/retrieval/skip.d.ts +1 -1
- package/dist/retrieval/types.d.ts +1 -1
- package/package.json +4 -3
- package/skills/autorag/SKILL.md +7 -4
- package/skills/autorag-doctor/SKILL.md +8 -4
- package/skills/autorag-lite-setup/SKILL.md +4 -4
- package/skills/autorag-setup/SKILL.md +53 -31
- package/dist/datasource/skills/cloud-drive/index.d.ts +0 -2
- package/dist/datasource/skills/cloud-drive/rclone-connector.d.ts +0 -49
- package/dist/datasource/skills/cloud-drive/skill.d.ts +0 -14
- package/dist/datasource/skills/spotlight/connector.d.ts +0 -53
- package/dist/datasource/skills/spotlight/index.d.ts +0 -2
- package/dist/datasource/skills/spotlight/skill.d.ts +0 -33
- package/dist/minsync/kiwi.d.ts +0 -17
- package/dist/minsync/lexical-language.d.ts +0 -18
package/dist/cli/config.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
2
2
|
import { ModelRuntime } from "@earendil-works/pi-coding-agent";
|
|
3
3
|
import type { AutoRAGAgentOptions, AutoRAGRefreshLimits, AutoRAGRetrievalLimits } from "../agent/agent.js";
|
|
4
|
-
import type { JevBackendName } from "../agent/jev-extension.js";
|
|
5
4
|
import { type LoadLocalAutoRAGModelOptions } from "../agent/local-model.js";
|
|
6
5
|
import { type PermissionMode } from "../agent/permission-gate.js";
|
|
7
6
|
import type { DecompositionModel } from "../agent/query-decomposition.js";
|
|
7
|
+
import { type SllmDecisionModel } from "../agent/sllm-decision.js";
|
|
8
8
|
import { type DatasourcesConfig } from "../datasource/skills/factory.js";
|
|
9
9
|
import type { EnsureMinSyncBinaryOptions, MinSyncEmbedderConfig } from "../minsync/index.js";
|
|
10
10
|
export declare const DEFAULT_CONFIG_FILENAME = "config.json";
|
|
@@ -55,20 +55,36 @@ export interface WebSearchCliConfig {
|
|
|
55
55
|
} | false;
|
|
56
56
|
}
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
58
|
+
* Decision-model config. The decision model is required: an absent section or `{}` uses
|
|
59
|
+
* {@link defaultJevBackend}, and there is no opt-out. It is either Jev (`backend` names `dazzi` or a pi
|
|
60
|
+
* provider with decision models) or the small chat LLM (`backend: "sllm"`, see {@link JevCliConfig.sllm}).
|
|
61
|
+
* Secrets never appear here: a pi provider's credential comes from its
|
|
62
|
+
* environment variable (`OPENROUTER_API_KEY`, `OPENAI_API_KEY`, ...) or pi's
|
|
63
|
+
* `auth.json`, and the hosted Dazzi Models `dazzi` backend uses the credential
|
|
64
|
+
* stored by `/login`.
|
|
63
65
|
*/
|
|
64
66
|
export interface JevCliConfig {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
/**
|
|
68
|
+
* `dazzi`, or a pi provider with decision models: `openrouter`, `openai`, `typesafe`,
|
|
69
|
+
* `vercel-ai-gateway`, `cloudflare-workers-ai`, or `opencode` (`autorag models list --decision`).
|
|
70
|
+
* `sllm` decides with the small chat LLM ({@link JevCliConfig.sllm}) and never calls Jev.
|
|
71
|
+
*/
|
|
72
|
+
backend?: string;
|
|
73
|
+
/** Jev model id within the backend, e.g. `openai/gpt-6-luna-decisions` on OpenRouter. Not valid with `backend: "sllm"`. */
|
|
69
74
|
model?: string;
|
|
70
75
|
/** Escalate verdicts below this confidence (0-1). Default: per-source thresholds. */
|
|
71
76
|
confidenceThreshold?: number;
|
|
77
|
+
/**
|
|
78
|
+
* The small chat LLM (sLLM). It is the decision model when `backend` is `sllm`, and otherwise the
|
|
79
|
+
* fallback a session moves to when Jev is unavailable. Absent or `{}` uses the question-decomposition model.
|
|
80
|
+
*/
|
|
81
|
+
sllm?: JevSllmConfig;
|
|
82
|
+
/** Move to the sLLM when Jev is unavailable. Default true; `false` fails the session instead. Ignored with `backend: "sllm"`. */
|
|
83
|
+
fallback?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** The sLLM; same model reference shape and auth rules as the top-level `model`. */
|
|
86
|
+
export interface JevSllmConfig {
|
|
87
|
+
model?: AgentModelConfig;
|
|
72
88
|
}
|
|
73
89
|
/** Question-decomposition config. Secrets stay in env/pi auth like the main model. */
|
|
74
90
|
export interface QueryDecompositionConfig {
|
|
@@ -76,19 +92,17 @@ export interface QueryDecompositionConfig {
|
|
|
76
92
|
model?: AgentModelConfig;
|
|
77
93
|
}
|
|
78
94
|
/**
|
|
79
|
-
* Post-merge reranking config.
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* Secrets never appear here — only the environment-variable name that holds a
|
|
84
|
-
* provider API key.
|
|
95
|
+
* Post-merge reranking config. Opt-in: reranking runs only when a `model` is named, and a block without one is treated
|
|
96
|
+
* as off (reported once at startup). `provider` is `openrouter` (default) or the hosted Dazzi Models plan (`dazzi`).
|
|
97
|
+
* OpenRouter reads its key from `apiKeyEnv`; Dazzi uses the credential stored by `/login`. Secrets never appear
|
|
98
|
+
* here, only the environment-variable name that holds a provider API key.
|
|
85
99
|
*/
|
|
86
100
|
export interface RerankConfig {
|
|
87
|
-
/** `false` disables reranking. Missing means enabled when the block is present. */
|
|
101
|
+
/** `false` disables reranking. Missing means enabled when the block is present and names a model. */
|
|
88
102
|
enabled?: boolean;
|
|
89
103
|
/** Provider id (`openrouter` or `dazzi`). @default "openrouter" */
|
|
90
104
|
provider?: string;
|
|
91
|
-
/** Wire model id.
|
|
105
|
+
/** Wire model id. Required to turn reranking on; there is no default model. */
|
|
92
106
|
model?: string;
|
|
93
107
|
/** Environment variable holding the provider API key (`openrouter` only). @default "OPENROUTER_API_KEY" */
|
|
94
108
|
apiKeyEnv?: string;
|
|
@@ -156,13 +170,13 @@ export interface CliConfig {
|
|
|
156
170
|
} | false;
|
|
157
171
|
webSearch?: WebSearchCliConfig;
|
|
158
172
|
/**
|
|
159
|
-
* Jev
|
|
160
|
-
* post-fast-answer follow-up check, and
|
|
161
|
-
* the
|
|
162
|
-
* never appear here: `jev-use` reads the
|
|
163
|
-
* environment variable.
|
|
173
|
+
* Jev, the required decision model: query routing, the decomposition
|
|
174
|
+
* check, the post-fast-answer follow-up check, citation and evidence
|
|
175
|
+
* judgment, the `auto` permission gate, and the `jev` tool. Absent or `{}`
|
|
176
|
+
* uses the default backend. Secrets never appear here: `jev-use` reads the
|
|
177
|
+
* backend key from its own environment variable.
|
|
164
178
|
*/
|
|
165
|
-
jev?: JevCliConfig
|
|
179
|
+
jev?: JevCliConfig;
|
|
166
180
|
/**
|
|
167
181
|
* Question decomposition for the Jev query pipeline. `model` names the LLM
|
|
168
182
|
* that splits one question into at most five search queries; absent or `{}`
|
|
@@ -256,7 +270,7 @@ export declare function normalizeJevConfig(raw: unknown): JevCliConfig;
|
|
|
256
270
|
* Jev backend used when the config names none (absent section or `{}`): the
|
|
257
271
|
* hosted Dazzi Models plan when the user is signed in, else OpenRouter.
|
|
258
272
|
*/
|
|
259
|
-
export declare function defaultJevBackend(agentDir?: string):
|
|
273
|
+
export declare function defaultJevBackend(agentDir?: string): string;
|
|
260
274
|
/** The OpenRouter fallback decomposition model, used when not signed in to Dazzi Models. */
|
|
261
275
|
export declare const OPENROUTER_QUERY_DECOMPOSITION_MODEL: AgentModelConfig;
|
|
262
276
|
/**
|
|
@@ -268,13 +282,11 @@ export declare const OPENROUTER_QUERY_DECOMPOSITION_MODEL: AgentModelConfig;
|
|
|
268
282
|
export declare function defaultQueryDecompositionModel(agentDir?: string): AgentModelConfig;
|
|
269
283
|
/** Validate the `queryDecomposition` config section (`false` = decompose with the session model). */
|
|
270
284
|
export declare function normalizeQueryDecompositionConfig(raw: unknown): QueryDecompositionConfig | false;
|
|
271
|
-
/** Normalize and validate the `rerank` config section, filling in defaults. */
|
|
272
|
-
export declare function normalizeRerankConfig(raw: unknown, path: string): RerankConfig | false;
|
|
273
285
|
/**
|
|
274
|
-
*
|
|
275
|
-
*
|
|
286
|
+
* Normalize and validate the `rerank` config section, filling in the provider, key-env, and `topN` defaults. It never
|
|
287
|
+
* invents a model: reranking is opt-in and runs only on a model the operator names.
|
|
276
288
|
*/
|
|
277
|
-
export declare function
|
|
289
|
+
export declare function normalizeRerankConfig(raw: unknown, path: string): RerankConfig | false;
|
|
278
290
|
export declare function buildAgentOptions(config: CliConfig, agentDir?: string): Omit<AutoRAGAgentOptions, "model">;
|
|
279
291
|
/**
|
|
280
292
|
* Extra resolution inputs beyond the local codex-runtime options. `agentDir`
|
|
@@ -343,6 +355,13 @@ export declare function validateAgentConfigFile(configPath: string, options?: Re
|
|
|
343
355
|
* returns undefined so the agent's own model decomposes.
|
|
344
356
|
*/
|
|
345
357
|
export declare function resolveQueryDecompositionModel(config: CliConfig, options?: ResolveAgentModelOptions): Promise<DecompositionModel | undefined>;
|
|
358
|
+
/**
|
|
359
|
+
* Resolve the sLLM and its credential through the same chain as the agent model. `jev.sllm.model` names it;
|
|
360
|
+
* absent, it is the question-decomposition model (its configured one, else {@link defaultQueryDecompositionModel}).
|
|
361
|
+
* It decides in Jev's place when `jev.backend` is `sllm`, and otherwise is Jev's fallback; `jev.fallback: false`
|
|
362
|
+
* returns undefined for the fallback, so a session without Jev fails.
|
|
363
|
+
*/
|
|
364
|
+
export declare function resolveSllmDecisionModel(config: CliConfig, options?: ResolveAgentModelOptions): Promise<SllmDecisionModel | undefined>;
|
|
346
365
|
export declare function resolveAgentModelDetailed(config: CliConfig, options?: ResolveAgentModelOptions): Promise<ResolvedAgentModelDetailed>;
|
|
347
366
|
export declare function readRawConfigObject(path: string): Record<string, unknown>;
|
|
348
367
|
/** Atomically replace a config file, preserving the caller's JSON object. */
|