@autorag/librarian 2.10.1 → 2.10.2
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 +0 -3
- package/README.md +76 -33
- package/dist/agent/agent.d.ts +96 -18
- package/dist/agent/evidence-ledger.d.ts +54 -5
- package/dist/agent/evidence-persistence.d.ts +24 -0
- package/dist/agent/jev-extension.d.ts +5 -3
- package/dist/agent/search-documents.d.ts +1 -1
- package/dist/agent/system-prompt.d.ts +0 -2
- package/dist/agent/tool-burst-guard.d.ts +26 -0
- package/dist/cli/config.d.ts +37 -23
- package/dist/cli/index.js +2095 -1151
- package/dist/cloud/config.d.ts +16 -10
- package/dist/cloud/credential.d.ts +17 -0
- package/dist/cloud/errors.d.ts +6 -6
- package/dist/cloud/index.d.ts +5 -4
- package/dist/cloud/jev-backend.d.ts +15 -13
- package/dist/cloud/models.d.ts +4 -4
- package/dist/cloud/oauth-login.d.ts +3 -3
- package/dist/cloud/provider.d.ts +16 -11
- package/dist/cloud/token.d.ts +2 -2
- package/dist/core.d.ts +2 -1
- package/dist/core.js +2237 -1310
- package/dist/datasource/aliased-skill.d.ts +2 -2
- package/dist/datasource/connector-skill.d.ts +2 -2
- package/dist/datasource/crawler-skill.d.ts +2 -2
- package/dist/datasource/described-skill.d.ts +2 -2
- package/dist/datasource/index.d.ts +1 -1
- package/dist/datasource/retry.d.ts +49 -0
- package/dist/datasource/skills/clawgallery/skill.d.ts +4 -4
- package/dist/datasource/skills/discrawl/skill.d.ts +5 -5
- package/dist/datasource/skills/github-gist/skill.d.ts +2 -2
- package/dist/datasource/skills/lazykatok/skill.d.ts +5 -5
- package/dist/datasource/skills/mailcrawl/skill.d.ts +2 -2
- package/dist/datasource/skills/obsidian/skill.d.ts +5 -5
- package/dist/datasource/types.d.ts +13 -1
- package/dist/embedding-runtime/cache.d.ts +9 -0
- package/dist/index.d.ts +1 -2
- package/dist/index.js +2301 -1375
- package/dist/jikji/client.d.ts +13 -2
- package/dist/jikji/index.d.ts +1 -1
- package/dist/jikji/path-map.d.ts +9 -0
- package/dist/jikji/prepare-budget.d.ts +18 -0
- package/dist/jikji/serial-queue.d.ts +17 -0
- package/dist/jikji/types.d.ts +17 -0
- package/dist/mcp/index.js +2281 -1354
- package/dist/minsync/client.d.ts +3 -1
- package/dist/minsync/method.d.ts +1 -1
- package/dist/minsync/types.d.ts +1 -1
- package/dist/mirror/atomic-write.d.ts +6 -0
- package/dist/mirror/index-store.d.ts +8 -1
- package/dist/mirror/index.d.ts +2 -2
- package/dist/mirror/sync.d.ts +57 -1
- package/dist/p2p/simplex-server.d.ts +0 -1
- package/dist/parser/defaults.d.ts +8 -0
- package/dist/parser/errors.d.ts +10 -0
- package/dist/parser/isolated.d.ts +77 -0
- package/dist/parser/kordoc.d.ts +1 -0
- package/dist/parser/parse-worker.d.ts +1 -0
- package/dist/parser/parse-worker.js +780 -0
- package/dist/parser/types.d.ts +5 -0
- package/dist/process/abort-reason.d.ts +2 -0
- package/dist/retrieval/index.d.ts +1 -1
- package/dist/retrieval/rerank.d.ts +16 -10
- package/package.json +5 -5
- package/skills/autorag/SKILL.md +2 -1
- package/skills/autorag-doctor/SKILL.md +6 -0
- package/skills/autorag-lite-setup/SKILL.md +1 -1
- package/skills/autorag-setup/SKILL.md +41 -16
- package/dist/manifest/index.d.ts +0 -2
- package/dist/manifest/loader.d.ts +0 -3
- package/dist/manifest/types.d.ts +0 -8
package/dist/jikji/client.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ export declare class JikjiClient {
|
|
|
3
3
|
private readonly options;
|
|
4
4
|
private resolvedCommand;
|
|
5
5
|
private installCommandInFlight;
|
|
6
|
+
private readonly prepareQueue;
|
|
7
|
+
private readonly findQueue;
|
|
6
8
|
constructor(options?: JikjiOptions);
|
|
7
|
-
/** Jikji stores prepared corpus metadata under a hidden directory in each root. */
|
|
8
|
-
isPrepared(root: string): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Resolve the jikji command following the priority chain:
|
|
11
11
|
* 1. explicit binaryPath
|
|
@@ -22,5 +22,16 @@ export declare class JikjiClient {
|
|
|
22
22
|
private resolveCommand;
|
|
23
23
|
prepare(root: string, options?: JikjiPrepareOptions): Promise<JikjiPrepareResult>;
|
|
24
24
|
find(root: string, query: string, options?: JikjiFindOptions): Promise<JikjiFindResult>;
|
|
25
|
+
/**
|
|
26
|
+
* Hang guard for one root, never a fixed total wall: `timeoutMs` (base) plus a
|
|
27
|
+
* per-file slice for every file under the root, so a very large root is not
|
|
28
|
+
* cut by its size. The slice defaults to the per-file parse limit
|
|
29
|
+
* (`parseTimeout`, seconds) that jikji itself enforces by skipping the file,
|
|
30
|
+
* so only a run that outlives even an all-files-hit-the-limit budget is
|
|
31
|
+
* killed (reported as a degraded root). `prepareTimeoutMsPerFile` overrides
|
|
32
|
+
* the slice; `0` restores a flat `timeoutMs` wall. A per-call `timeoutMs`
|
|
33
|
+
* bypasses all of this.
|
|
34
|
+
*/
|
|
35
|
+
private prepareTimeoutMs;
|
|
25
36
|
private spawn;
|
|
26
37
|
}
|
package/dist/jikji/index.d.ts
CHANGED
|
@@ -5,6 +5,6 @@ export { jikjiFindDiagnostic, jikjiPrepareDiagnostic } 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
|
-
export { mapJikjiPath, planJikjiSourceRoots, resolveReturnedPath } from "./path-map.js";
|
|
8
|
+
export { mapJikjiPath, outermostJikjiRoots, planJikjiSourceRoots, resolveReturnedPath } from "./path-map.js";
|
|
9
9
|
export type { JikjiAnswerPack, JikjiCandidate, JikjiEvidence, JikjiFailureReason, JikjiFindOptions, JikjiFindResult, JikjiHandoffAction, JikjiNextRead, JikjiOptions, JikjiPrepareOptions, JikjiPrepareResult, JikjiToolCallPolicy, } from "./types.js";
|
|
10
10
|
export { DEFAULT_JIKJI_OPTIONS } from "./types.js";
|
package/dist/jikji/path-map.d.ts
CHANGED
|
@@ -3,6 +3,15 @@ export interface JikjiSourceRoot extends SourceRoot {
|
|
|
3
3
|
readonly searchPath: string;
|
|
4
4
|
}
|
|
5
5
|
export declare function planJikjiSourceRoots(searchPaths: readonly string[]): readonly JikjiSourceRoot[];
|
|
6
|
+
/**
|
|
7
|
+
* Reduce search roots to the ones Jikji should index and query: duplicates
|
|
8
|
+
* collapse to their first occurrence and a root nested inside another root is
|
|
9
|
+
* dropped, because the outer root's index already covers it. Upstream Jikji
|
|
10
|
+
* rejects `prepare` on a root that overlaps an indexed one, so passing nested
|
|
11
|
+
* roots through only produces failed refreshes and duplicate answer paths.
|
|
12
|
+
* Input order is preserved for the survivors.
|
|
13
|
+
*/
|
|
14
|
+
export declare function outermostJikjiRoots(searchPaths: readonly string[]): readonly string[];
|
|
6
15
|
export declare function mapJikjiPath(sourceRoot: SourceRoot, returnedPath: string): string | undefined;
|
|
7
16
|
export declare function resolveReturnedPath(rootPath: string, returnedPath: string): string | undefined;
|
|
8
17
|
export declare function isUnsafeReturnedPath(normalizedPath: string): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Largest delay `setTimeout` honors (2^31 - 1 ms, ~24.8 days); Node fires a
|
|
3
|
+
* larger delay after 1 ms. This is a platform limit, not a policy cap.
|
|
4
|
+
*/
|
|
5
|
+
export declare const MAX_TIMER_MS = 2147483647;
|
|
6
|
+
/**
|
|
7
|
+
* `base + perFile * fileCount`. There is deliberately no policy ceiling: the
|
|
8
|
+
* budget grows with the root, so a huge root is never cut by a fixed wall while
|
|
9
|
+
* a hung run on a small root still is. Clamped only to the timer limit.
|
|
10
|
+
*/
|
|
11
|
+
export declare function scaledPrepareTimeoutMs(baseMs: number, perFileMs: number, fileCount: number): number;
|
|
12
|
+
/**
|
|
13
|
+
* Count regular files under `root`. Symlinks are not followed and hidden
|
|
14
|
+
* entries are skipped unless `includeHidden` (matching what `jikji prepare`
|
|
15
|
+
* indexes by default). `exclude` globs are ignored: over-counting only
|
|
16
|
+
* lengthens the budget. Stops early when `signal` aborts.
|
|
17
|
+
*/
|
|
18
|
+
export declare function countFiles(root: string, includeHidden: boolean, signal?: AbortSignal): Promise<number>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** What a queued task resolves to when its signal aborts before its turn. */
|
|
2
|
+
export interface SerialQueueSkip<S> {
|
|
3
|
+
readonly signal: AbortSignal | undefined;
|
|
4
|
+
readonly value: S;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Runs async tasks strictly one after another, in submission order. A task that
|
|
8
|
+
* throws rejects only its own caller; the queue keeps serving later tasks.
|
|
9
|
+
*
|
|
10
|
+
* A caller whose signal aborts while it is still waiting resolves immediately
|
|
11
|
+
* with `skip.value` and its task never runs. Once a task has started, aborting
|
|
12
|
+
* is the task's own business.
|
|
13
|
+
*/
|
|
14
|
+
export declare class SerialQueue {
|
|
15
|
+
private tail;
|
|
16
|
+
run<T, S = never>(task: () => Promise<T>, skip?: SerialQueueSkip<S>): Promise<T | S>;
|
|
17
|
+
}
|
package/dist/jikji/types.d.ts
CHANGED
|
@@ -8,7 +8,20 @@ export interface JikjiOptions {
|
|
|
8
8
|
* cargo. Set false to disable auto-installation.
|
|
9
9
|
*/
|
|
10
10
|
readonly autoInstall?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Wall-clock budget for one `jikji` process. Default 60 s. For `prepare` this
|
|
13
|
+
* is only the base of a hang guard that grows with the root's file count
|
|
14
|
+
* (see `prepareTimeoutMsPerFile`), not a total cap.
|
|
15
|
+
*/
|
|
11
16
|
readonly timeoutMs?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Milliseconds each file under the root adds to `timeoutMs` for `prepare`.
|
|
19
|
+
* There is no overall ceiling, so a very large root is never cut by its
|
|
20
|
+
* size. Defaults to `parseTimeout` (5 s) per file, i.e. the budget only
|
|
21
|
+
* expires when the run is stuck beyond what per-file parse limits allow.
|
|
22
|
+
* `0` restores a flat `timeoutMs` wall.
|
|
23
|
+
*/
|
|
24
|
+
readonly prepareTimeoutMsPerFile?: number;
|
|
12
25
|
readonly maxBufferBytes?: number;
|
|
13
26
|
readonly includeHidden?: boolean;
|
|
14
27
|
readonly includeSensitive?: boolean;
|
|
@@ -49,6 +62,10 @@ export interface JikjiDefaultOptions {
|
|
|
49
62
|
export declare const DEFAULT_JIKJI_OPTIONS: JikjiDefaultOptions;
|
|
50
63
|
export interface JikjiPrepareOptions {
|
|
51
64
|
readonly signal?: AbortSignal;
|
|
65
|
+
/** Hard wall for this one root; replaces the client budget (including the size-scaled one). */
|
|
66
|
+
readonly timeoutMs?: number;
|
|
67
|
+
/** `--parse-timeout` seconds for this root; replaces the client `parseTimeout`. */
|
|
68
|
+
readonly parseTimeout?: number;
|
|
52
69
|
}
|
|
53
70
|
export type JikjiFailureReason = "aborted" | "nonzero-exit" | "spawn-error" | "stderr-too-large" | "stdout-too-large" | "timeout" | "bad-answer-pack";
|
|
54
71
|
export type JikjiPrepareResult = {
|