@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
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { SourceRoot } from "../filesystem/source-paths.js";
|
|
2
|
-
import type { JikjiAnswerPack } from "./types.js";
|
|
2
|
+
import type { JikjiAnswerPack, JikjiConfidence } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Combine the confidence of several roots' responses into one. Weakest wins: the root with the lowest level
|
|
5
|
+
* (then lowest score) supplies every field, and `requiresLlmRerank` is true when any root asked for it. A
|
|
6
|
+
* missing or unknown level counts as the weakest.
|
|
7
|
+
*/
|
|
8
|
+
export declare function mergeJikjiConfidence(entries: readonly (JikjiConfidence | undefined)[]): JikjiConfidence | undefined;
|
|
3
9
|
/**
|
|
4
10
|
* Strict-parse and validate a `jikji find --json` answer-pack from raw stdout.
|
|
5
11
|
*
|
package/dist/jikji/client.d.ts
CHANGED
|
@@ -1,27 +1,41 @@
|
|
|
1
|
-
import type { JikjiFindOptions, JikjiFindResult, JikjiOptions, JikjiPrepareOptions, JikjiPrepareResult } from "./types.js";
|
|
1
|
+
import type { JikjiFindOptions, JikjiFindResult, JikjiOptions, JikjiPrepareOptions, JikjiPrepareResult, JikjiRetryStep } from "./types.js";
|
|
2
2
|
export declare class JikjiClient {
|
|
3
3
|
private readonly options;
|
|
4
|
-
private
|
|
5
|
-
private
|
|
4
|
+
private resolved;
|
|
5
|
+
private installInFlight;
|
|
6
6
|
private readonly prepareQueue;
|
|
7
7
|
private readonly findQueue;
|
|
8
8
|
constructor(options?: JikjiOptions);
|
|
9
9
|
/**
|
|
10
|
-
* Resolve the jikji command
|
|
11
|
-
* 1. explicit binaryPath
|
|
12
|
-
* 2. PATH lookup for `jikji
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
10
|
+
* Resolve the jikji command, refusing any binary below {@link JIKJI_MIN_VERSION}:
|
|
11
|
+
* 1. explicit binaryPath: used as given, never probed (the operator chose it).
|
|
12
|
+
* 2. PATH lookup for `jikji`, then cached `<root>/.autorag/bin/jikji`. The first one
|
|
13
|
+
* whose `--version` clears the floor wins. A binary whose `--version` output is
|
|
14
|
+
* not recognised is used as-is, so a custom build is never locked out.
|
|
15
|
+
* 3. Every candidate was below the floor (or none exists): `prepare` installs the
|
|
16
|
+
* pinned {@link JIKJI_INSTALL_VERSION} into the cache with `cargo install --force`.
|
|
17
|
+
* `find` (`install: false`) never installs; it reports the stale version instead.
|
|
18
|
+
* 4. Nothing resolvable and no root or autoInstall off: bare `jikji` (spawn-error
|
|
19
|
+
* degrade preserves the previous behavior).
|
|
20
|
+
* A usable result is cached per client. A query-time miss is not cached, so a later
|
|
21
|
+
* refresh can still install.
|
|
21
22
|
*/
|
|
22
23
|
private resolveCommand;
|
|
24
|
+
/** Run `<candidate> --version` and decide whether it clears the floor. */
|
|
25
|
+
private probe;
|
|
23
26
|
prepare(root: string, options?: JikjiPrepareOptions): Promise<JikjiPrepareResult>;
|
|
24
27
|
find(root: string, query: string, options?: JikjiFindOptions): Promise<JikjiFindResult>;
|
|
28
|
+
/**
|
|
29
|
+
* Run the follow-up step jikji named in a `jikji_retry` answer: `discover`
|
|
30
|
+
* with the proof it issued, parsed like a `find` result. Queued with finds
|
|
31
|
+
* (a query never waits behind a refresh) and, like `find`, never installs the
|
|
32
|
+
* binary, refreshes in the background, or reindexes. A step whose root is not
|
|
33
|
+
* the root being queried is refused before anything is spawned: jikji binds
|
|
34
|
+
* each proof to one root, so it must not be applied to another.
|
|
35
|
+
*/
|
|
36
|
+
discover(root: string, step: JikjiRetryStep, options?: {
|
|
37
|
+
readonly signal?: AbortSignal;
|
|
38
|
+
}): Promise<JikjiFindResult>;
|
|
25
39
|
/**
|
|
26
40
|
* Hang guard for one root, never a fixed total wall: `timeoutMs` (base) plus a
|
|
27
41
|
* per-file slice for every file under the root, so a very large root is not
|
|
@@ -5,10 +5,10 @@ import type { JikjiFindResult, JikjiPrepareResult } from "./types.js";
|
|
|
5
5
|
* path-free so they can be surfaced through public search/refresh diagnostics
|
|
6
6
|
* without leaking filesystem or binary paths.
|
|
7
7
|
*/
|
|
8
|
-
export type JikjiDiagnosticCode = "jikji-unavailable" | "jikji-prepare-failed" | "jikji-find-failed";
|
|
8
|
+
export type JikjiDiagnosticCode = "jikji-unavailable" | "jikji-prepare-failed" | "jikji-cloud-root-skipped" | "jikji-find-failed" | "jikji-discover-failed" | "jikji-unsupported-version";
|
|
9
9
|
export interface JikjiDiagnostic {
|
|
10
10
|
readonly code: JikjiDiagnosticCode;
|
|
11
|
-
readonly severity: "warning" | "error";
|
|
11
|
+
readonly severity: "info" | "warning" | "error";
|
|
12
12
|
readonly message: string;
|
|
13
13
|
readonly source: "jikji";
|
|
14
14
|
}
|
|
@@ -22,5 +22,19 @@ export declare function jikjiPrepareDiagnostic(result: JikjiPrepareResult): Jikj
|
|
|
22
22
|
* Maps a {@link JikjiFindResult} to a path-opaque degraded-mode diagnostic.
|
|
23
23
|
* Successful results map to `undefined`. The message never echoes the binary
|
|
24
24
|
* path, stderr, or any filesystem path so it is safe for public diagnostics.
|
|
25
|
+
* The one exception is an unsupported version, see {@link unsupportedVersionDiagnostic}.
|
|
25
26
|
*/
|
|
26
27
|
export declare function jikjiFindDiagnostic(result: JikjiFindResult): JikjiDiagnostic | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Maps a failed `discover` retry step to a diagnostic. Unlike find/prepare
|
|
30
|
+
* diagnostics it is deliberately NOT path-opaque: the retry step is the one
|
|
31
|
+
* place AutoRAG runs jikji on the model's behalf after a miss, so a failure
|
|
32
|
+
* must be debuggable and carries the CLI exit status and stderr verbatim,
|
|
33
|
+
* real paths included. Successful results map to `undefined`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function jikjiDiscoverDiagnostic(result: JikjiFindResult): JikjiDiagnostic | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* `jikji_retry` named follow-up commands AutoRAG could not turn into a
|
|
38
|
+
* `discover` step. The commands are quoted verbatim so the shape can be fixed.
|
|
39
|
+
*/
|
|
40
|
+
export declare function jikjiUnusableRetryDiagnostic(nextCommands: readonly string[]): JikjiDiagnostic;
|
package/dist/jikji/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { normalizeJikjiAnswerPath, parseJikjiAnswerPack, } from "./answer-pack.js";
|
|
1
|
+
export { mergeJikjiConfidence, normalizeJikjiAnswerPath, parseJikjiAnswerPack, } from "./answer-pack.js";
|
|
2
2
|
export { JikjiClient } from "./client.js";
|
|
3
3
|
export type { JikjiDiagnostic, JikjiDiagnosticCode } from "./diagnostics.js";
|
|
4
|
-
export { jikjiFindDiagnostic, jikjiPrepareDiagnostic } from "./diagnostics.js";
|
|
4
|
+
export { jikjiDiscoverDiagnostic, jikjiFindDiagnostic, jikjiPrepareDiagnostic, jikjiUnusableRetryDiagnostic, } from "./diagnostics.js";
|
|
5
5
|
export type { EnsureJikjiBinaryOptions, EnsureJikjiBinaryResult, JikjiInstallRunner, JikjiInstallRunResult, } from "./installer.js";
|
|
6
6
|
export { cachedJikjiBinaryPath, ensureJikjiBinary, JIKJI_CRATE_NAME, JIKJI_INSTALL_TIMEOUT_MS, jikjiExecutableName, lookupExecutableInPath, } from "./installer.js";
|
|
7
7
|
export type { JikjiSourceRoot } from "./path-map.js";
|
|
8
8
|
export { mapJikjiPath, outermostJikjiRoots, planJikjiSourceRoots, resolveReturnedPath } from "./path-map.js";
|
|
9
|
-
export type { JikjiAnswerPack, JikjiCandidate, JikjiEvidence, JikjiFailureReason, JikjiFindOptions, JikjiFindResult, JikjiHandoffAction, JikjiNextRead, JikjiOptions, JikjiPrepareOptions, JikjiPrepareResult, JikjiToolCallPolicy, } from "./types.js";
|
|
9
|
+
export type { JikjiAnswerPack, JikjiCandidate, JikjiConfidence, JikjiEvidence, JikjiFailureReason, JikjiFindOptions, JikjiFindResult, JikjiHandoffAction, JikjiNextRead, JikjiOptions, JikjiPrepareOptions, JikjiPrepareResult, JikjiRetryStep, JikjiToolCallPolicy, } from "./types.js";
|
|
10
10
|
export { DEFAULT_JIKJI_OPTIONS } from "./types.js";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Jikji CLI installer. Jikji ships as the `jikji-cli` crate on crates.io
|
|
3
|
-
* (binary name `jikji`)
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
3
|
+
* (binary name `jikji`). Since v0.2.0 it also publishes prebuilt GitHub release
|
|
4
|
+
* archives, but AutoRAG still installs by compiling the crate through the user's
|
|
5
|
+
* Rust toolchain so the pinned version (`JIKJI_INSTALL_VERSION`) is built from the
|
|
6
|
+
* published, checksummed source. The binary is cached under `<root>/.autorag/bin`
|
|
7
|
+
* — the same directory the MinSync installer uses.
|
|
7
8
|
*/
|
|
8
9
|
export declare const JIKJI_CRATE_NAME = "jikji-cli";
|
|
9
10
|
export declare const JIKJI_INSTALL_TIMEOUT_MS: number;
|
|
@@ -20,8 +21,13 @@ export type JikjiInstallRunner = (args: readonly string[], timeoutMs: number) =>
|
|
|
20
21
|
export interface EnsureJikjiBinaryOptions {
|
|
21
22
|
/** Workspace root; the binary is cached at `<root>/.autorag/bin/jikji`. */
|
|
22
23
|
readonly root: string;
|
|
23
|
-
/** crates.io version pin for `jikji-cli`.
|
|
24
|
+
/** crates.io version pin for `jikji-cli`. Omit to install the latest release. */
|
|
24
25
|
readonly version?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Reinstall over an existing cached binary (`cargo install --force`). Without it a
|
|
28
|
+
* cached binary is returned untouched, so a stale cached build would never be replaced.
|
|
29
|
+
*/
|
|
30
|
+
readonly force?: boolean;
|
|
25
31
|
readonly env?: NodeJS.ProcessEnv;
|
|
26
32
|
readonly timeoutMs?: number;
|
|
27
33
|
/** Injectable process runner for tests. Defaults to spawning `cargo install`. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { JikjiRetryStep } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Read the `jikji discover` step out of a `next_commands` entry. The command is
|
|
4
|
+
* data: AutoRAG builds its own argv from the parsed root, query, top-k and
|
|
5
|
+
* proof, never runs the string. Returns `undefined` unless the line is exactly
|
|
6
|
+
* a `discover <root> <query>` retry (`--after-jikji-retry` plus a proof, only
|
|
7
|
+
* flags AutoRAG understands) whose proof matches `envelopeProof` when jikji
|
|
8
|
+
* also reports one, so an unknown or tampered shape never reaches a process.
|
|
9
|
+
*/
|
|
10
|
+
export declare function parseJikjiRetryCommand(command: string, envelopeProof: string | undefined): JikjiRetryStep | undefined;
|
package/dist/jikji/types.d.ts
CHANGED
|
@@ -66,8 +66,15 @@ export interface JikjiPrepareOptions {
|
|
|
66
66
|
readonly timeoutMs?: number;
|
|
67
67
|
/** `--parse-timeout` seconds for this root; replaces the client `parseTimeout`. */
|
|
68
68
|
readonly parseTimeout?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Extra `--exclude` patterns for this one root, appended to the client's own list. AutoRAG passes the
|
|
71
|
+
* relative paths of cloud or network folders nested under the root so `jikji prepare` never reads them.
|
|
72
|
+
*/
|
|
73
|
+
readonly exclude?: readonly string[];
|
|
69
74
|
}
|
|
70
|
-
export type JikjiFailureReason = "aborted" | "nonzero-exit" | "spawn-error" | "stderr-too-large" | "stdout-too-large" | "timeout" | "bad-answer-pack"
|
|
75
|
+
export type JikjiFailureReason = "aborted" | "cloud-root-skipped" | "nonzero-exit" | "spawn-error" | "stderr-too-large" | "stdout-too-large" | "timeout" | "bad-answer-pack" | "bad-retry-step"
|
|
76
|
+
/** The resolved `jikji` is older than {@link JIKJI_MIN_VERSION}; it was probed, never run for real. */
|
|
77
|
+
| "unsupported-version";
|
|
71
78
|
export type JikjiPrepareResult = {
|
|
72
79
|
readonly ok: true;
|
|
73
80
|
readonly stdout: string;
|
|
@@ -79,6 +86,8 @@ export type JikjiPrepareResult = {
|
|
|
79
86
|
readonly stdout: string;
|
|
80
87
|
readonly stderr: string;
|
|
81
88
|
readonly code: number | null;
|
|
89
|
+
/** Set with `reason: "unsupported-version"`: the version `jikji --version` reported. */
|
|
90
|
+
readonly detectedVersion?: string;
|
|
82
91
|
};
|
|
83
92
|
export type JikjiNextRead = "cache" | "wiki" | "original" | "none";
|
|
84
93
|
export interface JikjiCandidate {
|
|
@@ -87,6 +96,18 @@ export interface JikjiCandidate {
|
|
|
87
96
|
readonly label?: string;
|
|
88
97
|
readonly score?: number;
|
|
89
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Response-level confidence jikji reports for one `find`. A signal, not a verdict: jikji reports `high`
|
|
101
|
+
* confidence for weak matches, so nothing here may skip reranking or verification.
|
|
102
|
+
*/
|
|
103
|
+
export interface JikjiConfidence {
|
|
104
|
+
readonly level?: string;
|
|
105
|
+
readonly score?: number;
|
|
106
|
+
readonly answerability?: string;
|
|
107
|
+
readonly recommendedAction?: string;
|
|
108
|
+
readonly requiresLlmRerank?: boolean;
|
|
109
|
+
readonly indexStatus?: string;
|
|
110
|
+
}
|
|
90
111
|
export interface JikjiEvidence {
|
|
91
112
|
readonly path: string;
|
|
92
113
|
readonly nextRead: JikjiNextRead;
|
|
@@ -97,6 +118,17 @@ export interface JikjiToolCallPolicy {
|
|
|
97
118
|
readonly allowedFollowups: readonly string[];
|
|
98
119
|
}
|
|
99
120
|
export type JikjiHandoffAction = "direct_use" | "jikji_retry" | "raw_fallback_after_retry";
|
|
121
|
+
/**
|
|
122
|
+
* The follow-up step jikji names when `find` answers `jikji_retry`: a
|
|
123
|
+
* `discover` run on the same root with the rewritten query and the proof jikji
|
|
124
|
+
* issued for exactly that root and query.
|
|
125
|
+
*/
|
|
126
|
+
export interface JikjiRetryStep {
|
|
127
|
+
readonly root: string;
|
|
128
|
+
readonly query: string;
|
|
129
|
+
readonly topK?: number;
|
|
130
|
+
readonly proof: string;
|
|
131
|
+
}
|
|
100
132
|
export interface JikjiAnswerPack {
|
|
101
133
|
readonly answerPaths: readonly string[];
|
|
102
134
|
readonly paths: readonly string[];
|
|
@@ -105,6 +137,18 @@ export interface JikjiAnswerPack {
|
|
|
105
137
|
readonly handoffAction: JikjiHandoffAction;
|
|
106
138
|
readonly toolCallPolicy: JikjiToolCallPolicy;
|
|
107
139
|
readonly agentShouldNotRerank: boolean;
|
|
140
|
+
/** Absent when jikji reported none of the confidence fields. */
|
|
141
|
+
readonly confidence?: JikjiConfidence;
|
|
142
|
+
/** `raw_fallback_allowed`; derived from the handoff when the envelope omits it. */
|
|
143
|
+
readonly rawFallbackAllowed: boolean;
|
|
144
|
+
/** `max_jikji_retries`: how many more jikji steps jikji allows before raw fallback. */
|
|
145
|
+
readonly maxJikjiRetries?: number;
|
|
146
|
+
/** `max_raw_fallback_commands`: raw shell commands jikji allows once raw fallback is open. */
|
|
147
|
+
readonly maxRawFallbackCommands?: number;
|
|
148
|
+
/** `next_commands` verbatim. */
|
|
149
|
+
readonly nextCommands?: readonly string[];
|
|
150
|
+
/** Present only for `jikji_retry` when `next_commands` names an understood discover step. */
|
|
151
|
+
readonly retry?: JikjiRetryStep;
|
|
108
152
|
}
|
|
109
153
|
export interface JikjiFindOptions {
|
|
110
154
|
readonly topK?: number;
|
|
@@ -126,4 +170,6 @@ export type JikjiFindResult = {
|
|
|
126
170
|
readonly stdout: string;
|
|
127
171
|
readonly stderr: string;
|
|
128
172
|
readonly code: number | null;
|
|
173
|
+
/** Set with `reason: "unsupported-version"`: the version `jikji --version` reported. */
|
|
174
|
+
readonly detectedVersion?: string;
|
|
129
175
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jikji version policy.
|
|
3
|
+
*
|
|
4
|
+
* AutoRAG talks to the `jikji` CLI through a fixed argv, so it must refuse a binary that
|
|
5
|
+
* cannot accept that argv instead of spawning it and reporting a generic failure.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Oldest `jikji` AutoRAG will run. `jikji find` only accepts `--no-background-refresh`
|
|
9
|
+
* from 0.2.0 (0.1.1 exits 2 with `unexpected argument`), and AutoRAG passes it on every find.
|
|
10
|
+
*/
|
|
11
|
+
export declare const JIKJI_MIN_VERSION = "0.2.0";
|
|
12
|
+
/**
|
|
13
|
+
* Version AutoRAG installs and pins. 0.2.1 is the first 0.2.x with the Windows rooted
|
|
14
|
+
* cache-path rejection (a path such as `\secret` or `C:\x` is no longer joined onto the store).
|
|
15
|
+
*/
|
|
16
|
+
export declare const JIKJI_INSTALL_VERSION = "0.2.1";
|
|
17
|
+
/** Version from `jikji --version` output, or `undefined` when the output is not a jikji version line. */
|
|
18
|
+
export declare function parseJikjiVersion(output: string): string | undefined;
|
|
19
|
+
/** True when `version` is at or above {@link JIKJI_MIN_VERSION}. Numeric, per component. */
|
|
20
|
+
export declare function isSupportedJikjiVersion(version: string): boolean;
|