@autorag/librarian 2.13.6 → 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.
@@ -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, so this bounds disk and network use per refresh; the rest wait
55
- * for the next one. Default 200.
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; the first file is always allowed. Default 536870912 (512 MiB). */
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;
@@ -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-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";
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, excludeDirs: readonly string[]) => Promise<DupeyScanResult>;
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, cloudProbe?: CloudFileProbe | undefined): Promise<number>;
10
+ export declare function runDuplicates(ctx: CommandContext, scanner?: DuplicateScanner): Promise<number>;