@autorag/librarian 2.13.5 → 2.13.7
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/dist/agent/agent.d.ts +5 -5
- package/dist/agent/dupey-tool.d.ts +0 -2
- package/dist/agent/pipelined-sync.d.ts +34 -0
- package/dist/agent/search-documents.d.ts +1 -1
- package/dist/cli/commands/duplicates.d.ts +2 -3
- package/dist/cli/index.js +1721 -1542
- package/dist/core.js +2505 -2320
- package/dist/datasource/skills/factory.d.ts +4 -1
- package/dist/dupey/filter.d.ts +0 -2
- package/dist/dupey/index.d.ts +0 -1
- package/dist/dupey/version.d.ts +17 -0
- package/dist/index.js +2302 -2122
- package/dist/mcp/index.js +2302 -2120
- package/dist/mcp/server.d.ts +0 -3
- package/dist/minsync/installer.d.ts +1 -1
- package/dist/minsync/version.d.ts +3 -2
- package/dist/mirror/cloud-fingerprints.d.ts +6 -5
- package/dist/mirror/cloud.d.ts +9 -6
- package/dist/mirror/sync.d.ts +53 -3
- package/dist/profiles.js +1714 -1529
- package/package.json +1 -1
- package/dist/dupey/scan-plan.d.ts +0 -23
package/dist/agent/agent.d.ts
CHANGED
|
@@ -50,12 +50,12 @@ export interface AutoRAGRefreshLimits {
|
|
|
50
50
|
/** Retries for a transient per-file I/O error (EMFILE/EBUSY/EIO/ETIMEDOUT) before the file is skipped. Default 3. */
|
|
51
51
|
readonly transientRetries?: number;
|
|
52
52
|
/**
|
|
53
|
-
* Most cloud-file placeholders (files whose data is not on disk) one refresh may download.
|
|
54
|
-
* Reading a placeholder downloads it
|
|
55
|
-
*
|
|
53
|
+
* Most cloud-file placeholders (files whose data is not on disk) one refresh batch may download.
|
|
54
|
+
* Reading a placeholder downloads it; the next one over the budget starts a new batch, so every
|
|
55
|
+
* placeholder is still read in the same refresh. Default 200.
|
|
56
56
|
*/
|
|
57
57
|
readonly cloudMaxFiles?: number;
|
|
58
|
-
/** Most placeholder bytes one refresh may download;
|
|
58
|
+
/** Most placeholder bytes one refresh batch may download; a batch's first file is always allowed. Default 536870912 (512 MiB). */
|
|
59
59
|
readonly cloudMaxBytes?: number;
|
|
60
60
|
/** Release a downloaded cloud file again once it is parsed and indexed. Default true. */
|
|
61
61
|
readonly cloudEvictAfterParse?: boolean;
|
|
@@ -952,7 +952,7 @@ export declare class AutoRAGAgent {
|
|
|
952
952
|
*/
|
|
953
953
|
startWatchRefresh(options?: AutoRAGWatchRefreshOptions): AutoRAGWatchRefreshHandle;
|
|
954
954
|
private defaultWatcherFactory;
|
|
955
|
-
syncParsedMirrors(force?: boolean, options?: Pick<ParsedMirrorSyncOptions, "signal" | "onProgress" | "retrySkipped">): Promise<ParsedMirrorSyncResult>;
|
|
955
|
+
syncParsedMirrors(force?: boolean, options?: Pick<ParsedMirrorSyncOptions, "signal" | "onProgress" | "retrySkipped" | "onBatch" | "batchSize">): Promise<ParsedMirrorSyncResult>;
|
|
956
956
|
/**
|
|
957
957
|
* Lightweight stat-only staleness scan used when `refresh` is called with
|
|
958
958
|
* methods that exclude parsed mirrors (e.g. only `datasources` or `jikji`).
|
|
@@ -4,8 +4,6 @@ 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[];
|
|
9
7
|
readonly familyCount: number;
|
|
10
8
|
readonly exactDuplicateCount: number;
|
|
11
9
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ParsedMirrorBatch, ParsedMirrorBatchOutcome } from "../mirror/sync.js";
|
|
2
|
+
/** One sync run: the 1-based run number and the sources of every batch committed since the previous run began. */
|
|
3
|
+
export interface PipelinedSyncRun {
|
|
4
|
+
readonly index: number;
|
|
5
|
+
readonly virtualPaths: readonly string[];
|
|
6
|
+
}
|
|
7
|
+
export interface PipelinedSyncOptions {
|
|
8
|
+
/**
|
|
9
|
+
* Index everything committed so far. Resolving with `stop` ends the pipeline (a held lock means another
|
|
10
|
+
* process owns the index, so every further run would fail the same way); a rejection is raised from the
|
|
11
|
+
* next {@link PipelinedSync.batch} call.
|
|
12
|
+
*/
|
|
13
|
+
readonly sync: (run: PipelinedSyncRun) => Promise<ParsedMirrorBatchOutcome | undefined>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Runs index syncs alongside the parse loop instead of between its batches.
|
|
17
|
+
*
|
|
18
|
+
* A sync only sees what is committed when it starts, and the indexer batches and commits on its own, so the
|
|
19
|
+
* first batch starts a sync right away while parsing carries on. At most one sync is in flight; when it ends,
|
|
20
|
+
* the next one covers every batch committed meanwhile. A slow sync therefore turns into few large ones
|
|
21
|
+
* instead of one per parse batch, and each sync pays its start-up and end-of-run maintenance once.
|
|
22
|
+
*/
|
|
23
|
+
export declare class PipelinedSync {
|
|
24
|
+
#private;
|
|
25
|
+
constructor(options: PipelinedSyncOptions);
|
|
26
|
+
/**
|
|
27
|
+
* Hand over a committed batch. Returns at once, except for the final batch: it waits until a sync that
|
|
28
|
+
* started after every batch was committed has finished, and always runs one, so a sync that failed
|
|
29
|
+
* earlier is retried even when nothing changed.
|
|
30
|
+
*/
|
|
31
|
+
batch(batch: Pick<ParsedMirrorBatch, "virtualPaths" | "final">): Promise<ParsedMirrorBatchOutcome | undefined>;
|
|
32
|
+
/** Wait for the sync in flight, if any, and start no further one. Never rejects. */
|
|
33
|
+
settle(): Promise<void>;
|
|
34
|
+
}
|
|
@@ -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" | "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-
|
|
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-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" | "retired-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;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import type { DupeyScanResult } from "../../dupey/index.js";
|
|
2
|
-
import { type CloudFileProbe } from "../../filesystem/cloud-placeholder.js";
|
|
3
2
|
import type { CommandContext } from "./types.js";
|
|
4
|
-
export type DuplicateScanner = (path: string
|
|
3
|
+
export type DuplicateScanner = (path: string) => Promise<DupeyScanResult>;
|
|
5
4
|
/**
|
|
6
5
|
* `autorag duplicates` — scan configured roots for exact and near duplicate
|
|
7
6
|
* document families. Never deletes or moves source files.
|
|
8
7
|
*
|
|
9
8
|
* Exit codes: 0 on success, 2 on config error, 1 on runtime error.
|
|
10
9
|
*/
|
|
11
|
-
export declare function runDuplicates(ctx: CommandContext, scanner?: DuplicateScanner
|
|
10
|
+
export declare function runDuplicates(ctx: CommandContext, scanner?: DuplicateScanner): Promise<number>;
|