@autorag/librarian 2.13.7 → 2.13.9

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.
Files changed (46) hide show
  1. package/README.md +15 -0
  2. package/dist/agent/agent.d.ts +41 -1
  3. package/dist/agent/calculator-tool.d.ts +39 -0
  4. package/dist/agent/evidence-ledger.d.ts +11 -0
  5. package/dist/agent/index-schedule.d.ts +45 -0
  6. package/dist/agent/index.d.ts +1 -0
  7. package/dist/agent/result-render.d.ts +43 -0
  8. package/dist/agent/search-all-tool.d.ts +2 -1
  9. package/dist/agent/search-minsync-tool.d.ts +2 -1
  10. package/dist/agent/search-single-datasource-tool.d.ts +2 -1
  11. package/dist/agent/watch-refresh.d.ts +2 -0
  12. package/dist/calculator/civil.d.ts +27 -0
  13. package/dist/calculator/decimal.d.ts +47 -0
  14. package/dist/calculator/errors.d.ts +4 -0
  15. package/dist/calculator/expression.d.ts +11 -0
  16. package/dist/calculator/index.d.ts +17 -0
  17. package/dist/calculator/operations.d.ts +36 -0
  18. package/dist/calculator/temporal.d.ts +18 -0
  19. package/dist/calculator/timezone.d.ts +19 -0
  20. package/dist/cli/commands/index.d.ts +1 -1
  21. package/dist/cli/commands/lite-find.d.ts +26 -0
  22. package/dist/cli/commands/lite-refresh.d.ts +1 -1
  23. package/dist/cli/commands/refresh.d.ts +4 -0
  24. package/dist/cli/commands/watch.d.ts +2 -1
  25. package/dist/cli/index.js +2979 -265
  26. package/dist/cli/signal-abort.d.ts +21 -0
  27. package/dist/core.d.ts +2 -0
  28. package/dist/core.js +2164 -188
  29. package/dist/find/groups.d.ts +35 -0
  30. package/dist/find/index.d.ts +10 -0
  31. package/dist/find/relevance.d.ts +29 -0
  32. package/dist/find/run.d.ts +24 -0
  33. package/dist/find/text.d.ts +37 -0
  34. package/dist/find/types.d.ts +86 -0
  35. package/dist/index.js +2200 -227
  36. package/dist/mcp/index.js +2199 -227
  37. package/dist/minsync/channel-union.d.ts +23 -0
  38. package/dist/minsync/method.d.ts +7 -0
  39. package/dist/mirror/sync.d.ts +9 -0
  40. package/dist/profiles.js +2187 -216
  41. package/dist/retrieval/engine.d.ts +7 -0
  42. package/dist/retrieval/merger.d.ts +6 -0
  43. package/dist/retrieval/record-cut.d.ts +101 -0
  44. package/package.json +1 -1
  45. package/skills/autorag/SKILL.md +28 -0
  46. package/skills/autorag-setup/SKILL.md +39 -0
@@ -0,0 +1,23 @@
1
+ import type { RetrievalResult } from "../retrieval/types.js";
2
+ /** Ranked results of one MinSync query mode (`vector` or `sparse`), best first. */
3
+ export interface MinSyncChannelResults {
4
+ readonly channel: string;
5
+ readonly results: readonly RetrievalResult[];
6
+ }
7
+ export interface UnionChannelOptions {
8
+ /** Keep at most this many chunks after interleaving. Unset keeps the whole union. */
9
+ readonly limit?: number;
10
+ }
11
+ /**
12
+ * Union of independently ranked MinSync channels, built for a reranker that decides the final order.
13
+ *
14
+ * Channels are interleaved by rank (rank 1 of each channel, then rank 2, ...) so a limit never cuts one
15
+ * channel's head to keep the other's tail, and a chunk found by several channels appears once, at its
16
+ * best interleaved position. Scores are left as the first channel reported them: dense and SPLADE scores
17
+ * are not comparable and nothing here ranks across them. Each chunk records which channels found it and
18
+ * at what 1-based rank (`minsyncChannels`, `minsyncChannelRanks`).
19
+ *
20
+ * Identity is `source` + `id`, the same key the cross-method merger uses, so two chunks of one document
21
+ * stay distinct while the same chunk reached by two channels collapses.
22
+ */
23
+ export declare function unionChannelResults(channels: readonly MinSyncChannelResults[], options?: UnionChannelOptions): RetrievalResult[];
@@ -1,3 +1,4 @@
1
+ import { type RecordCut } from "../retrieval/record-cut.js";
1
2
  import type { RetrievalMethod, RetrievalMethodDescriptor, RetrievalOptions, RetrievalResult } from "../retrieval/types.js";
2
3
  import type { MinSyncQueryMode } from "./client.js";
3
4
  import type { EnsureMinSyncBinaryOptions } from "./installer.js";
@@ -16,6 +17,11 @@ export interface MinSyncVectorMethodOptions {
16
17
  readonly defaultTopK?: number;
17
18
  /** Fetch cap applied when a scope narrows the query. Default 100. */
18
19
  readonly scopedTopK?: number;
20
+ /**
21
+ * Fuse deeper and cut the hits by document, so one long document cannot take every one of `topK` slots
22
+ * (see {@link RecordCut}). Unset asks MinSync for `topK` and cuts by chunk.
23
+ */
24
+ readonly recordCut?: RecordCut;
19
25
  }
20
26
  export type MinSyncHybridMethodOptions = Omit<MinSyncVectorMethodOptions, "mode">;
21
27
  export declare class MinSyncVectorMethod implements RetrievalMethod {
@@ -29,6 +35,7 @@ export declare class MinSyncVectorMethod implements RetrievalMethod {
29
35
  private readonly mode;
30
36
  private readonly defaultTopK;
31
37
  private readonly scopedTopK;
38
+ private readonly recordCut;
32
39
  constructor(options: MinSyncVectorMethodOptions);
33
40
  describe(): RetrievalMethodDescriptor;
34
41
  sync(force?: boolean, signal?: AbortSignal, onProgress?: (progress: MinSyncSyncProgress) => void): Promise<MinSyncSyncResult>;
@@ -28,6 +28,15 @@ export interface ParsedMirrorSyncOptions {
28
28
  readonly maxSourceBytes?: number;
29
29
  /** Absolute source paths omitted from parsed mirrors (for example exact duplicate copies). */
30
30
  readonly excludeSourcePaths?: ReadonlySet<string>;
31
+ /**
32
+ * Read-only freshness checks only: omit the sources the last refresh already recorded as
33
+ * `duplicate-excluded` instead of requiring a fresh duplicate scan. Duplicate selection needs
34
+ * a content scan of every root, which is the dominant cost of a status or retrieve call.
35
+ * A recorded copy is only omitted while its mtime and size still match the record, so an
36
+ * edited copy is still reported stale. Copies that became duplicates after the last refresh
37
+ * are not known here; see `AutoRAGAgent.scanMirrorStaleness`.
38
+ */
39
+ readonly reuseRecordedDuplicateExclusions?: boolean;
31
40
  /** Absolute source paths or directories omitted by the user. */
32
41
  readonly userExcludedSourcePaths?: ReadonlySet<string>;
33
42
  /**