@autorag/librarian 2.13.4 → 2.13.6
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 +3 -0
- package/README.md +50 -18
- package/dist/agent/agent.d.ts +111 -40
- package/dist/agent/cloud-release-extension.d.ts +43 -0
- 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/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 +13522 -10169
- package/dist/cli/setup.d.ts +27 -1
- package/dist/cloud/jev-backend.d.ts +26 -4
- package/dist/core.js +6079 -2840
- package/dist/datasource/index.d.ts +2 -2
- 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 +6184 -2905
- 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 +6154 -2902
- 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 +79 -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 +13520 -10280
- package/dist/retrieval/skip.d.ts +1 -1
- package/dist/retrieval/types.d.ts +1 -1
- package/package.json +3 -3
- package/skills/autorag/SKILL.md +7 -4
- package/skills/autorag-doctor/SKILL.md +8 -3
- package/skills/autorag-lite-setup/SKILL.md +4 -4
- package/skills/autorag-setup/SKILL.md +53 -30
- 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/minsync/kiwi.d.ts +0 -17
- package/dist/minsync/lexical-language.d.ts +0 -18
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { type JevJudge, type JevJudgeOptions } from "./jev-extension.js";
|
|
2
|
+
/**
|
|
3
|
+
* AutoRAG cannot answer without its decision model (Jev, or the small chat LLM when `jev.backend` is `sllm`): routing, the follow-up check, citation and
|
|
4
|
+
* evidence judgment, and the permission gate all ask it, in yes/no and choice questions. The first
|
|
5
|
+
* question of every session therefore puts one tiny probe of each kind to the decision model. When Jev
|
|
6
|
+
* cannot answer, the configured small chat LLM (sLLM) is probed and serves the session in its place,
|
|
7
|
+
* reported as degraded; when neither answers, the run ends with {@link DecisionModelUnavailableError}
|
|
8
|
+
* instead of a pipeline that guesses.
|
|
9
|
+
*/
|
|
10
|
+
/** Error code every surface reports when the session's decision model cannot be used. */
|
|
11
|
+
export declare const DECISION_MODEL_UNAVAILABLE_CODE = "decision-model-unavailable";
|
|
12
|
+
/** Question id of the availability probe. */
|
|
13
|
+
export declare const DECISION_MODEL_PROBE_QUESTION_ID = "decision_model_probe";
|
|
14
|
+
/** Question id of the choice probe, asked in the same call. */
|
|
15
|
+
export declare const DECISION_MODEL_CHOICE_PROBE_QUESTION_ID = "decision_model_choice_probe";
|
|
16
|
+
/** Why the decision model could not be used. */
|
|
17
|
+
export type DecisionModelFailureReason =
|
|
18
|
+
/** The caller tried to turn the decision model off (`jev: false`). */
|
|
19
|
+
"disabled"
|
|
20
|
+
/** No credential for the backend: an unset API key or a missing sign-in. */
|
|
21
|
+
| "missing-credential"
|
|
22
|
+
/** The backend rejected the credential (HTTP 401/403). */
|
|
23
|
+
| "unauthorized"
|
|
24
|
+
/** The backend account has no credit left (HTTP 402). */
|
|
25
|
+
| "payment-required"
|
|
26
|
+
/** The backend does not serve the configured model (HTTP 404, or "does not exist"). */
|
|
27
|
+
| "model-not-found"
|
|
28
|
+
/** The backend is throttling (HTTP 429). */
|
|
29
|
+
| "rate-limited"
|
|
30
|
+
/** Network failure, timeout, or a 5xx from the backend. */
|
|
31
|
+
| "unreachable"
|
|
32
|
+
/** The backend rejected a yes/no or choice question (HTTP 400/422): the model cannot answer what AutoRAG asks. */
|
|
33
|
+
| "unsupported-question"
|
|
34
|
+
/** The backend answered, but not with a usable verdict. */
|
|
35
|
+
| "invalid-response";
|
|
36
|
+
export interface DecisionModelFailure {
|
|
37
|
+
readonly reason: DecisionModelFailureReason;
|
|
38
|
+
/** The backend's own error text, verbatim. */
|
|
39
|
+
readonly detail: string;
|
|
40
|
+
/** Backend name, when one was resolved. */
|
|
41
|
+
readonly backend?: string;
|
|
42
|
+
/** Model id the backend reported or was asked for. */
|
|
43
|
+
readonly model?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The session's decision model cannot be used, so AutoRAG cannot answer. Carries a stable `code`
|
|
47
|
+
* ({@link DECISION_MODEL_UNAVAILABLE_CODE}) and the decision model's `reason` a host can branch on;
|
|
48
|
+
* `attempts` lists every model tried, the decision model first and the sLLM fallback after it. The
|
|
49
|
+
* message names the code, each failure with the backend's own error, and what to do about it.
|
|
50
|
+
*/
|
|
51
|
+
export declare class DecisionModelUnavailableError extends Error {
|
|
52
|
+
readonly code = "decision-model-unavailable";
|
|
53
|
+
readonly reason: DecisionModelFailureReason;
|
|
54
|
+
readonly detail: string;
|
|
55
|
+
readonly backend?: string;
|
|
56
|
+
readonly model?: string;
|
|
57
|
+
readonly attempts: readonly DecisionModelFailure[];
|
|
58
|
+
constructor(failure: DecisionModelFailure, fallback?: DecisionModelFailure);
|
|
59
|
+
}
|
|
60
|
+
/** Map a backend's error text to a reason. HTTP status wins over wording. */
|
|
61
|
+
export declare function classifyDecisionModelFailure(detail: string): DecisionModelFailureReason;
|
|
62
|
+
/** The decision model that answered the probe. */
|
|
63
|
+
export interface DecisionModelStatus {
|
|
64
|
+
readonly backend: string;
|
|
65
|
+
readonly model?: string;
|
|
66
|
+
/** Set when the sLLM fallback answered: why the decision model itself could not. */
|
|
67
|
+
readonly fallbackFrom?: DecisionModelFailure;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Put the probe questions to the decision model. Resolves with the backend and model that answered;
|
|
71
|
+
* throws {@link DecisionModelUnavailableError} when no backend could be built, or it gave no
|
|
72
|
+
* probability to the yes/no probe or no option to the choice probe. Whether the answers are "right"
|
|
73
|
+
* does not matter: answers to both prove the model is reachable, authorized, served, and able to
|
|
74
|
+
* answer the kinds of question AutoRAG asks.
|
|
75
|
+
*/
|
|
76
|
+
export declare function checkDecisionModel(judge: JevJudge): Promise<DecisionModelStatus>;
|
|
77
|
+
/** The session's decision model: the judge every caller asks, and the check that picks what it asks. */
|
|
78
|
+
export interface DecisionModels {
|
|
79
|
+
/** Asks the model the latest {@link DecisionModels.check} selected: Jev, or the sLLM fallback when Jev could not answer. */
|
|
80
|
+
readonly judge: JevJudge;
|
|
81
|
+
/**
|
|
82
|
+
* Probe Jev; when it is unavailable and a fallback is configured, probe the fallback. The first that
|
|
83
|
+
* answers serves every later judgment until the next check. Throws {@link DecisionModelUnavailableError}
|
|
84
|
+
* with every failure when none answers.
|
|
85
|
+
*/
|
|
86
|
+
check(): Promise<DecisionModelStatus>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* The session's decision model from `options`: Jev (`options.backend`), with `options.sllm` behind it as
|
|
90
|
+
* the fallback, or the small chat LLM alone when `options.backend` is `"sllm"`.
|
|
91
|
+
*/
|
|
92
|
+
export declare function createDecisionModels(options: JevJudgeOptions): DecisionModels;
|
|
@@ -4,6 +4,8 @@ import type { DupeyScanResult } from "../dupey/index.js";
|
|
|
4
4
|
export declare const SCAN_DUPLICATE_DOCUMENTS_TOOL_NAME = "scan_duplicate_documents";
|
|
5
5
|
export interface ScanDuplicateDocumentsDetails {
|
|
6
6
|
readonly scans: readonly DupeyScanResult[];
|
|
7
|
+
/** Roots inside a cloud or network folder: `dupey scan` opens file contents, so they were not scanned. */
|
|
8
|
+
readonly skippedRoots: readonly string[];
|
|
7
9
|
readonly familyCount: number;
|
|
8
10
|
readonly exactDuplicateCount: number;
|
|
9
11
|
}
|
|
@@ -17,6 +17,7 @@ export interface EverythingSearchDetails {
|
|
|
17
17
|
}
|
|
18
18
|
declare const everythingSearchSchema: Type.TObject<{
|
|
19
19
|
query: Type.TString;
|
|
20
|
+
alternatives: Type.TOptional<Type.TArray<Type.TString>>;
|
|
20
21
|
regex: Type.TOptional<Type.TBoolean>;
|
|
21
22
|
matchCase: Type.TOptional<Type.TBoolean>;
|
|
22
23
|
matchPath: Type.TOptional<Type.TBoolean>;
|
|
@@ -17,6 +17,7 @@ export interface FSearchSearchDetails {
|
|
|
17
17
|
}
|
|
18
18
|
declare const fsearchSearchSchema: Type.TObject<{
|
|
19
19
|
query: Type.TString;
|
|
20
|
+
alternatives: Type.TOptional<Type.TArray<Type.TString>>;
|
|
20
21
|
regex: Type.TOptional<Type.TBoolean>;
|
|
21
22
|
matchCase: Type.TOptional<Type.TBoolean>;
|
|
22
23
|
matchPath: Type.TOptional<Type.TBoolean>;
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -2,8 +2,10 @@ export type { AutoRAGAgentOptions, AutoRefreshOptions } from "./agent.js";
|
|
|
2
2
|
export { AutoRAGAgent } from "./agent.js";
|
|
3
3
|
export { CONVERT_FILES_TOOL_NAME, type ConvertFilesDetails, createConvertFilesTool, createListFileConversionsTool, type FileConversionProvider, LIST_FILE_CONVERSIONS_TOOL_NAME, } from "./convert-tool.js";
|
|
4
4
|
export { buildDatasourceSkillsPrompt, createLoadDatasourceSkillTool, type DatasourceSkillProvider, datasourceSkillLocation, formatDatasourceSkillInvocation, LOAD_DATASOURCE_SKILL_TOOL_NAME, type LoadDatasourceSkillDetails, toDatasourceAgentSkill, } from "./datasource-skill.js";
|
|
5
|
+
export { DECISION_PROVIDER_DEFAULT_MODELS, type DecisionModelRuntime, PiDecisionBackend, type PiDecisionBackendOptions, } from "./decision-backends.js";
|
|
6
|
+
export { DECISION_MODEL_UNAVAILABLE_CODE, type DecisionModelFailure, type DecisionModelFailureReason, DecisionModelUnavailableError, } from "./decision-model-check.js";
|
|
5
7
|
export { createScanDuplicateDocumentsTool, SCAN_DUPLICATE_DOCUMENTS_TOOL_NAME, type ScanDuplicateDocumentsDetails, type ScanDuplicateDocumentsProvider, } from "./dupey-tool.js";
|
|
6
|
-
export { createJevExtension, JEV_TOOL_NAME, type
|
|
8
|
+
export { createJevExtension, JEV_TOOL_NAME, type JevToolOptions, } from "./jev-extension.js";
|
|
7
9
|
export { createJikjiFindTool, JIKJI_FIND_TOOL_NAME, type JikjiFindDetails, type JikjiFindPerRootPolicy, type JikjiFindProvider, type JikjiFindProviderResult, type MergedJikjiPolicy, } from "./jikji-find-tool.js";
|
|
8
10
|
export type { AutoRAGEmittedResult, AutoRAGMappingEntry, AutoRAGResultsDetails, } from "./results.js";
|
|
9
11
|
export { reportSchema } from "./results.js";
|
|
@@ -11,4 +13,5 @@ export { createSearchAllDocumentsTool, SEARCH_ALL_DOCUMENTS_TOOL_NAME, type Sear
|
|
|
11
13
|
export type { SearchDocumentDiagnostic, SearchDocumentDiagnosticCode, SearchDocumentDiagnosticSeverity, SearchDocumentEvidence, SearchDocumentResult, SearchDocumentsResponse, SearchDocumentsStreamEvent, SearchDocumentWarning, } from "./search-documents.js";
|
|
12
14
|
export { createSearchMinSyncDocumentsTool, SEARCH_MINSYNC_DOCUMENTS_TOOL_NAME, type SearchMinSyncDocumentsDetails, } from "./search-minsync-tool.js";
|
|
13
15
|
export { createSingleDatasourceSearchTools, formatDatasourceResults, SEARCH_SINGLE_DATASOURCE_TOOL_PREFIX, type SearchSingleDatasourceDetails, type SingleDatasourceSearchProvider, type SingleDatasourceToolSpec, singleDatasourceToolName, } from "./search-single-datasource-tool.js";
|
|
16
|
+
export { SLLM_BACKEND, SLLM_DECISION_TOOL_NAME, SllmDecisionBackend, type SllmDecisionModel } from "./sllm-decision.js";
|
|
14
17
|
export { buildSystemPrompt, type SystemPromptConfig } from "./system-prompt.js";
|
|
@@ -1,46 +1,41 @@
|
|
|
1
1
|
import type { ExtensionFactory } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { type JevBackend, type Judgment, type Question, type State } from "jev-use";
|
|
3
|
+
import { type SllmDecisionModel } from "./sllm-decision.js";
|
|
3
4
|
/** `jev` tool name, kept in AutoRAG's reserved set and system prompt. */
|
|
4
5
|
export declare const JEV_TOOL_NAME = "jev";
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
export type JevBackendName = "typesafe" | "openrouter" | "vercel" | "dazzi";
|
|
11
|
-
/**
|
|
12
|
-
* OpenRouter's live Jev model id. `jev-use` 0.8.0 ships `typesafe/jev-latest`,
|
|
13
|
-
* which OpenRouter rejects with HTTP 400 ("Model ... does not exist"), so the
|
|
14
|
-
* OpenRouter path is pinned here.
|
|
15
|
-
*/
|
|
16
|
-
export declare const OPENROUTER_DEFAULT_MODEL = "typesafe/jev-1.13";
|
|
17
|
-
/**
|
|
18
|
-
* Options for the `jev` decision tool. Secrets never appear here: `jev-use`
|
|
19
|
-
* reads the backend credential from its own environment variable
|
|
20
|
-
* (`TYPESAFE_API_KEY`, `OPENROUTER_API_KEY`, or `AI_GATEWAY_API_KEY`).
|
|
7
|
+
* Options for the decision model. Secrets never appear here: a pi provider's credential comes from
|
|
8
|
+
* its environment variable (`OPENROUTER_API_KEY`, `OPENAI_API_KEY`, `TYPESAFE_API_KEY`,
|
|
9
|
+
* `AI_GATEWAY_API_KEY`, `CLOUDFLARE_API_KEY`, `OPENCODE_API_KEY`) or pi's `auth.json`, and the
|
|
10
|
+
* hosted `dazzi` backend uses the `/login` credential.
|
|
21
11
|
*/
|
|
22
12
|
export interface JevToolOptions {
|
|
23
13
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
*
|
|
31
|
-
* OpenRouter is pinned to {@link OPENROUTER_DEFAULT_MODEL} because
|
|
32
|
-
* `jev-use` 0.8.0's own default (`typesafe/jev-latest`) is not a live
|
|
33
|
-
* OpenRouter model id.
|
|
14
|
+
* The decision backend: `dazzi`, or any pi provider whose catalog carries decision models
|
|
15
|
+
* (`openrouter`, `openai`, `typesafe`, `vercel-ai-gateway`, `cloudflare-workers-ai`, or `opencode`),
|
|
16
|
+
* or `"sllm"` to decide with the small chat LLM in {@link JevToolOptions.sllm} and never
|
|
17
|
+
* call Jev.
|
|
18
|
+
* Omit to take the Dazzi plan when signed in, else the first of
|
|
19
|
+
* {@link DECISION_PROVIDER_ORDER} whose API key is set. A ready-made `jev-use` backend instance is a
|
|
20
|
+
* programmatic seam (tests, custom transports); config only accepts names.
|
|
34
21
|
*/
|
|
22
|
+
readonly backend?: string | JevBackend;
|
|
23
|
+
/** Decision model id within the backend, e.g. `openai/gpt-6-luna-decisions` on OpenRouter. Omit for the backend default. */
|
|
35
24
|
readonly model?: string;
|
|
36
25
|
/** Escalate verdicts below this confidence. Default: per-source thresholds. */
|
|
37
26
|
readonly confidenceThreshold?: number;
|
|
27
|
+
/**
|
|
28
|
+
* The small chat LLM (sLLM): the decision model when `backend` is `"sllm"`, otherwise the
|
|
29
|
+
* fallback the session moves to when the session check finds the decision model unavailable. A
|
|
30
|
+
* `jev-use` backend instance is the programmatic seam. Omit for no fallback.
|
|
31
|
+
*/
|
|
32
|
+
readonly sllm?: SllmDecisionModel | JevBackend;
|
|
38
33
|
}
|
|
39
|
-
/** {@link JevToolOptions} plus
|
|
34
|
+
/** {@link JevToolOptions} plus where credentials are read from. */
|
|
40
35
|
export interface JevJudgeOptions extends JevToolOptions {
|
|
41
|
-
/** Environment consulted for the backend credential
|
|
36
|
+
/** Environment consulted for the backend credential, ahead of `process.env`. */
|
|
42
37
|
readonly env?: Record<string, string | undefined>;
|
|
43
|
-
/** Pi agent home
|
|
38
|
+
/** Pi agent home: `auth.json` (credentials, the Dazzi `/login`) and `models.json`. Default: Pi's agent dir. */
|
|
44
39
|
readonly agentDir?: string;
|
|
45
40
|
}
|
|
46
41
|
/**
|
|
@@ -51,11 +46,11 @@ export interface JevJudgeOptions extends JevToolOptions {
|
|
|
51
46
|
export type JevJudge = (state: State, questions: Question[], options?: {
|
|
52
47
|
readonly confidenceThreshold?: number;
|
|
53
48
|
}) => Promise<Judgment>;
|
|
49
|
+
/** The `jev-use` backend for the small chat LLM: a ready-made backend instance is used as is. */
|
|
50
|
+
export declare function sllmBackend(sllm: SllmDecisionModel | JevBackend): JevBackend;
|
|
54
51
|
/**
|
|
55
|
-
* Builds
|
|
56
|
-
*
|
|
57
|
-
* resolves at construction time, and the per-backend model default (the
|
|
58
|
-
* OpenRouter pin, or `jev-1.13` on the hosted plan) applies to every caller.
|
|
52
|
+
* Builds a Jev judge over one decision backend. The backend is built lazily on the first call, so
|
|
53
|
+
* no credential resolves at construction time; a missing one rejects that call with a named error.
|
|
59
54
|
*/
|
|
60
55
|
export declare function createJevJudge(options?: JevJudgeOptions): JevJudge;
|
|
61
56
|
/**
|
|
@@ -14,7 +14,10 @@ export interface MergedJikjiPolicy {
|
|
|
14
14
|
readonly forbiddenTools: readonly string[];
|
|
15
15
|
readonly allowedFollowups: readonly string[];
|
|
16
16
|
readonly agentShouldNotRerank: boolean;
|
|
17
|
+
/** True only when every root's envelope allowed raw fallback. */
|
|
17
18
|
readonly rawFallbackAllowed: boolean;
|
|
19
|
+
/** Smallest `max_raw_fallback_commands` any root reported; undefined when none did. */
|
|
20
|
+
readonly maxRawFallbackCommands?: number;
|
|
18
21
|
}
|
|
19
22
|
/**
|
|
20
23
|
* Per-root policy summary for one successful (ok) root, captured BEFORE the
|
|
@@ -55,6 +58,8 @@ export interface JikjiFindDetails {
|
|
|
55
58
|
readonly handoffAction: JikjiHandoffAction | undefined;
|
|
56
59
|
readonly stopAfterFind: boolean | undefined;
|
|
57
60
|
readonly rawFallbackAllowed: boolean | undefined;
|
|
61
|
+
/** Raw shell commands jikji allows once raw fallback is open (`max_raw_fallback_commands`). */
|
|
62
|
+
readonly maxRawFallbackCommands: number | undefined;
|
|
58
63
|
readonly sources: readonly string[];
|
|
59
64
|
readonly candidates: readonly JikjiCandidate[];
|
|
60
65
|
readonly evidencePack: readonly JikjiEvidence[];
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parallel file-name search over several candidate names.
|
|
3
|
+
*
|
|
4
|
+
* File-name search is cheap (an index lookup), but the right name is rarely
|
|
5
|
+
* known: the user's word, its translation, an abbreviation, a likely
|
|
6
|
+
* extension. Instead of one call per guess, every candidate is searched at the
|
|
7
|
+
* same time and the hits are merged, with each hit labelled by the candidates
|
|
8
|
+
* that found it.
|
|
9
|
+
*/
|
|
10
|
+
/** Candidates searched in one call; the rest are reported as dropped, never silently ignored. */
|
|
11
|
+
export declare const MAX_NAME_CANDIDATES = 8;
|
|
12
|
+
export interface NameCandidates {
|
|
13
|
+
readonly candidates: readonly string[];
|
|
14
|
+
/** Distinct candidates beyond {@link MAX_NAME_CANDIDATES} that were not searched. */
|
|
15
|
+
readonly dropped: number;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The query first, then the alternatives, trimmed and without repeats. Case
|
|
19
|
+
* variants count as one candidate unless the search is case-sensitive.
|
|
20
|
+
*/
|
|
21
|
+
export declare function collectNameCandidates(query: string, alternatives?: readonly string[], options?: {
|
|
22
|
+
readonly matchCase?: boolean;
|
|
23
|
+
}): NameCandidates;
|
|
24
|
+
/** What one file-name search returned: hits, or a failure that names why. Backends' own results satisfy it. */
|
|
25
|
+
export type NameSearchResult = {
|
|
26
|
+
readonly ok: true;
|
|
27
|
+
readonly results: readonly {
|
|
28
|
+
readonly path: string;
|
|
29
|
+
}[];
|
|
30
|
+
} | {
|
|
31
|
+
readonly ok: false;
|
|
32
|
+
readonly reason: string;
|
|
33
|
+
readonly message: string;
|
|
34
|
+
};
|
|
35
|
+
/** A search that threw, reported as the failure of its own candidate. */
|
|
36
|
+
export interface NameSearchFailure {
|
|
37
|
+
readonly ok: false;
|
|
38
|
+
readonly reason: string;
|
|
39
|
+
readonly message: string;
|
|
40
|
+
}
|
|
41
|
+
/** `Result` is the backend's own result type, so callers keep fields such as `backend` and `total`. */
|
|
42
|
+
export interface NameSearchOutcome<Result extends NameSearchResult = NameSearchResult> {
|
|
43
|
+
readonly candidate: string;
|
|
44
|
+
readonly result: Result | NameSearchFailure;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Search every candidate at once. A search that throws fails only its own
|
|
48
|
+
* candidate; the others still return.
|
|
49
|
+
*/
|
|
50
|
+
export declare function searchNameCandidates<Result extends NameSearchResult>(candidates: readonly string[], search: (candidate: string) => Promise<Result>): Promise<NameSearchOutcome<Result>[]>;
|
|
51
|
+
export interface MergedNameHit<Entry extends {
|
|
52
|
+
readonly path: string;
|
|
53
|
+
}> {
|
|
54
|
+
readonly entry: Entry;
|
|
55
|
+
/** Every candidate that found this path, in candidate order. */
|
|
56
|
+
readonly candidates: readonly string[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* One list of hits, each path once. The name indexes (Everything, FSearch) match
|
|
60
|
+
* names exactly and return their hits in a sort order, not by relevance, so no
|
|
61
|
+
* hit is "better" than another within one candidate. What does carry signal is
|
|
62
|
+
* how many of the searched names found a path: those come first. Within the
|
|
63
|
+
* same count, the candidates' lists are interleaved position by position, so the
|
|
64
|
+
* cut at `limit` is shared among the candidates instead of one filling it.
|
|
65
|
+
*/
|
|
66
|
+
export declare function mergeNameHits<Entry extends {
|
|
67
|
+
readonly path: string;
|
|
68
|
+
}>(outcomes: readonly {
|
|
69
|
+
readonly candidate: string;
|
|
70
|
+
readonly result: {
|
|
71
|
+
readonly ok: true;
|
|
72
|
+
readonly results: readonly Entry[];
|
|
73
|
+
} | NameSearchFailure;
|
|
74
|
+
}[], limit: number): MergedNameHit<Entry>[];
|
|
75
|
+
/** One hit as a numbered line; `foundBy` is shown only when several names were searched. */
|
|
76
|
+
export declare function renderNameHitLine(index: number, entry: {
|
|
77
|
+
readonly path: string;
|
|
78
|
+
readonly type: string;
|
|
79
|
+
readonly size?: number | undefined;
|
|
80
|
+
readonly dateModified?: string | undefined;
|
|
81
|
+
}, foundBy?: readonly string[]): string;
|
|
82
|
+
/** Lines that say which candidates failed and which were never searched; empty when everything ran. */
|
|
83
|
+
export declare function renderNameSearchProblems(outcomes: readonly {
|
|
84
|
+
readonly candidate: string;
|
|
85
|
+
readonly result: {
|
|
86
|
+
readonly ok: true;
|
|
87
|
+
} | NameSearchFailure;
|
|
88
|
+
}[], dropped: number): string[];
|
|
@@ -46,11 +46,8 @@ export declare class PermissionController {
|
|
|
46
46
|
}
|
|
47
47
|
export interface PermissionGateOptions {
|
|
48
48
|
readonly controller: PermissionController;
|
|
49
|
-
/**
|
|
50
|
-
|
|
51
|
-
* asks the user about every `bash`, `write`, and `edit` call.
|
|
52
|
-
*/
|
|
53
|
-
readonly judge?: JevJudge;
|
|
49
|
+
/** Jev, which classifies every gated call in `auto`. */
|
|
50
|
+
readonly judge: JevJudge;
|
|
54
51
|
/**
|
|
55
52
|
* What the user has said in this conversation: the first question, every follow-up, every steer. Jev judges
|
|
56
53
|
* the call against all of it. The host feeds it from the user's own input, so AutoRAG's internal phase
|
|
@@ -161,6 +161,6 @@ export interface PastSearchHint {
|
|
|
161
161
|
* withheld when a configured datasource already uses that id
|
|
162
162
|
* ({@link DatasourceSelection.webIdTaken}), so a question id never names two
|
|
163
163
|
* candidates. Never throws: a missing credential or an unreachable backend
|
|
164
|
-
* searches nothing
|
|
164
|
+
* searches nothing.
|
|
165
165
|
*/
|
|
166
166
|
export declare function selectDatasources(judge: JevJudge, query: string, datasources: readonly DatasourceCandidate[], pastSearches?: readonly PastSearchHint[], options?: SelectDatasourcesOptions): Promise<DatasourceSelection>;
|
|
@@ -9,7 +9,7 @@ export type SearchDocumentDiagnosticSeverity = "info" | "warning" | "error";
|
|
|
9
9
|
* (#21/#22) does not require another source-breaking type change; codes not yet
|
|
10
10
|
* emitted are still valid members.
|
|
11
11
|
*/
|
|
12
|
-
export type SearchDocumentDiagnosticCode = "empty-query" | "no-verified-results" | "unknown-warning" | "caller-tool-dropped" | "minsync-staging-excluded" | "minsync-file-skipped" | "minsync-sync-failed" | "minsync-lock-held" | "embedder-unavailable" | "embedding-identity-mismatch" | "
|
|
12
|
+
export type SearchDocumentDiagnosticCode = "empty-query" | "no-verified-results" | "unknown-warning" | "caller-tool-dropped" | "minsync-staging-excluded" | "minsync-file-skipped" | "minsync-sync-failed" | "minsync-lock-held" | "embedder-unavailable" | "embedding-identity-mismatch" | "parser-skipped" | "parser-failed" | "parser-crashed" | "source-changed" | "source-vanished" | "source-unreadable" | "source-read-failed" | "mirror-write-failed" | "parser-warning" | "duplicate-excluded" | "unsupported-file" | "stale-index" | "deleted-mirror" | "search-root-unavailable" | "mass-delete-suppressed" | "walk-truncated" | "directory-unreadable" | "cloud-download-deferred" | "cloud-placeholder-skipped" | "cloud-evict-failed" | "cloud-fingerprint-failed" | "pdf-extract-thin" | "retrieval-method-failed" | "rerank-failed" | "rerank-disabled" | "jikji-unavailable" | "jikji-prepare-failed" | "jikji-cloud-root-skipped" | "jikji-find-failed" | "jikji-discover-failed" | "jikji-unsupported-version" | "everything-index-failed" | "fsearch-index-failed" | "fsearch-binary-missing" | "refresh-failed" | "refresh-interrupted" | "watch-failed" | "watch-limited" | "unknown-datasource-skill" | "no-final-answer" | "model-request-failed" | "tool-call-burst" | "decision-model-checked" | "decision-model-fallback" | "query-routed" | "query-route-fallback" | "query-decomposition-failed" | "follow-up-skipped" | "follow-up-check-fallback" | "datasources-selected" | "datasource-selection-fallback" | "web-datasource-id-taken" | "web-search-failed" | "citation-without-result" | "line-reference-unverified" | "citation-irrelevant" | "citation-relevance-fallback" | "evidence-judged" | "evidence-judgment-fallback" | "memory-search-fallback" | "self-config-unavailable" | "self-config-rolled-back" | "organize-skill-unavailable" | "embedding-unavailable";
|
|
13
13
|
export interface SearchDocumentDiagnostic {
|
|
14
14
|
readonly code: SearchDocumentDiagnosticCode;
|
|
15
15
|
readonly severity: SearchDocumentDiagnosticSeverity;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Api, Model } from "@earendil-works/pi-ai";
|
|
2
|
+
import { type BackendRequest, type BackendResponse, type JevBackend } from "jev-use";
|
|
3
|
+
/**
|
|
4
|
+
* The decision model's fallback: a small chat LLM (sLLM) answering Jev's typed questions. It is
|
|
5
|
+
* used only when the session check finds Jev unavailable. A chat model's probabilities are its own
|
|
6
|
+
* estimate, not a calibrated decision head, so a session on it is reported as degraded.
|
|
7
|
+
*
|
|
8
|
+
* Every request builds its own answer format: a tool whose arguments are one required key per
|
|
9
|
+
* question (the wire-safe key of its id), holding `yes` for a yes/no question or one named
|
|
10
|
+
* probability per option or level for a choice or score question, plus a confidence. The tool asks
|
|
11
|
+
* for JSON-schema constrained sampling, which providers that support it enforce; the prompt carries
|
|
12
|
+
* the same format as an example reply for the rest. The reply is read from the tool call, or else
|
|
13
|
+
* from the JSON the text holds, leniently. Answers that are missing or malformed are asked again
|
|
14
|
+
* once, alone; whatever is still unanswered then goes back to Jev's engine as unanswered, and the
|
|
15
|
+
* answers that were read are kept.
|
|
16
|
+
*/
|
|
17
|
+
/** The small LLM and the credential used only for fallback decisions. */
|
|
18
|
+
export interface SllmDecisionModel {
|
|
19
|
+
readonly model: Model<Api>;
|
|
20
|
+
readonly apiKey?: string;
|
|
21
|
+
}
|
|
22
|
+
/** `jev.backend` value, and the backend name, of the small LLM deciding in Jev's place. */
|
|
23
|
+
export declare const SLLM_BACKEND = "sllm";
|
|
24
|
+
/** The tool the small LLM answers through. */
|
|
25
|
+
export declare const SLLM_DECISION_TOOL_NAME = "submit_decisions";
|
|
26
|
+
/** The small-LLM fallback behind jev-use's backend contract. */
|
|
27
|
+
export declare class SllmDecisionBackend implements JevBackend {
|
|
28
|
+
readonly name = "sllm";
|
|
29
|
+
private readonly target;
|
|
30
|
+
constructor(target: SllmDecisionModel);
|
|
31
|
+
judge(request: BackendRequest): Promise<BackendResponse>;
|
|
32
|
+
/** One request for `pending`: its own tool and example, temperature 0, reasoning off. */
|
|
33
|
+
private ask;
|
|
34
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { DupeyScanResult } from "../../dupey/index.js";
|
|
2
|
+
import { type CloudFileProbe } from "../../filesystem/cloud-placeholder.js";
|
|
2
3
|
import type { CommandContext } from "./types.js";
|
|
3
|
-
export type DuplicateScanner = (path: string) => Promise<DupeyScanResult>;
|
|
4
|
+
export type DuplicateScanner = (path: string, excludeDirs: readonly string[]) => Promise<DupeyScanResult>;
|
|
4
5
|
/**
|
|
5
6
|
* `autorag duplicates` — scan configured roots for exact and near duplicate
|
|
6
7
|
* document families. Never deletes or moves source files.
|
|
7
8
|
*
|
|
8
9
|
* Exit codes: 0 on success, 2 on config error, 1 on runtime error.
|
|
9
10
|
*/
|
|
10
|
-
export declare function runDuplicates(ctx: CommandContext, scanner?: DuplicateScanner): Promise<number>;
|
|
11
|
+
export declare function runDuplicates(ctx: CommandContext, scanner?: DuplicateScanner, cloudProbe?: CloudFileProbe | undefined): Promise<number>;
|
|
@@ -16,6 +16,8 @@ export interface ModelCatalogOptions {
|
|
|
16
16
|
readonly provider?: string;
|
|
17
17
|
/** Only list models whose provider has complete auth configuration. */
|
|
18
18
|
readonly available?: boolean;
|
|
19
|
+
/** List decision models (the `jev.backend`/`jev.model` candidates) instead of chat models. */
|
|
20
|
+
readonly decision?: boolean;
|
|
19
21
|
readonly agentDir?: string;
|
|
20
22
|
}
|
|
21
23
|
export interface ModelsCommandDeps {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { AutoRAGAgent, type AutoRAGAgentOptions } from "../../agent/agent.js";
|
|
2
2
|
import { type CliConfig, type ResolveAgentModelOptions, type ResolvedAgentModel } from "../config.js";
|
|
3
3
|
import type { CommandContext } from "./types.js";
|
|
4
|
+
/** Exit status of a search whose session decision model cannot answer: AutoRAG is unusable until it can. */
|
|
5
|
+
export declare const DECISION_MODEL_UNAVAILABLE_EXIT_CODE = 3;
|
|
4
6
|
/**
|
|
5
7
|
* A recoverable health hint surfaced when `autorag search` fails for a reason
|
|
6
8
|
* that `autorag health` can diagnose. The classifier only produces hints for
|
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. */
|