@autorag/librarian 2.12.0 → 2.13.1

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 (55) hide show
  1. package/README.md +22 -4
  2. package/dist/agent/agent.d.ts +84 -44
  3. package/dist/agent/answer-guidelines.d.ts +19 -2
  4. package/dist/agent/current-date.d.ts +10 -0
  5. package/dist/agent/datasource-skill.d.ts +2 -2
  6. package/dist/agent/environment-prompt.d.ts +20 -0
  7. package/dist/agent/evidence-ledger.d.ts +4 -2
  8. package/dist/agent/location-claims.d.ts +14 -0
  9. package/dist/agent/packaged-skill.d.ts +19 -0
  10. package/dist/agent/query-routing.d.ts +80 -26
  11. package/dist/agent/results.d.ts +10 -2
  12. package/dist/agent/search-documents.d.ts +6 -1
  13. package/dist/agent/self-config.d.ts +4 -4
  14. package/dist/agent/skill-invocation.d.ts +17 -0
  15. package/dist/agent/user-requests.d.ts +2 -2
  16. package/dist/cli/commands/attachments.d.ts +13 -0
  17. package/dist/cli/commands/evidence.d.ts +2 -0
  18. package/dist/cli/index.d.ts +1 -1
  19. package/dist/cli/index.js +13923 -12387
  20. package/dist/cli/setup.d.ts +2 -0
  21. package/dist/core.js +22362 -21005
  22. package/dist/datasource/crawler-skill.d.ts +1 -0
  23. package/dist/datasource/index.d.ts +1 -1
  24. package/dist/datasource/sidecar/descriptors.d.ts +14 -1
  25. package/dist/datasource/sidecar/index.d.ts +4 -0
  26. package/dist/datasource/sidecar/methods.d.ts +12 -2
  27. package/dist/datasource/skills/clawgallery/skill.d.ts +4 -0
  28. package/dist/datasource/skills/discrawl/attachments.d.ts +139 -0
  29. package/dist/datasource/skills/discrawl/client.d.ts +11 -1
  30. package/dist/datasource/skills/discrawl/index.d.ts +2 -1
  31. package/dist/datasource/skills/discrawl/ranked-method.d.ts +19 -0
  32. package/dist/datasource/skills/discrawl/sidecar.d.ts +21 -0
  33. package/dist/datasource/skills/discrawl/skill.d.ts +23 -2
  34. package/dist/datasource/skills/discrawl/types.d.ts +41 -0
  35. package/dist/datasource/skills/factory.d.ts +17 -2
  36. package/dist/datasource/skills/lazykatok/index.d.ts +1 -1
  37. package/dist/datasource/skills/lazykatok/methods.d.ts +5 -5
  38. package/dist/datasource/skills/lazykatok/skill.d.ts +1 -0
  39. package/dist/datasource/skills/mailcrawl/skill.d.ts +1 -0
  40. package/dist/index.js +22454 -21046
  41. package/dist/mcp/index.js +22451 -21044
  42. package/dist/memory/memory.d.ts +4 -1
  43. package/dist/minsync/installer.d.ts +1 -1
  44. package/dist/mirror/atomic-write.d.ts +16 -1
  45. package/dist/mirror/sync.d.ts +2 -0
  46. package/dist/profiles.js +25935 -24578
  47. package/dist/retrieval/chunk-location.d.ts +28 -0
  48. package/dist/retrieval/fallback.d.ts +24 -0
  49. package/dist/retrieval/index.d.ts +1 -0
  50. package/dist/retrieval/types.d.ts +16 -0
  51. package/internal-skills/organize/SKILL.md +43 -0
  52. package/package.json +2 -1
  53. package/skills/autorag/SKILL.md +18 -7
  54. package/skills/autorag-lite-setup/SKILL.md +24 -0
  55. package/skills/autorag-setup/SKILL.md +31 -5
@@ -6,7 +6,10 @@ export interface EvidenceContext {
6
6
  readonly documentType?: string;
7
7
  readonly documentArea?: string;
8
8
  readonly evidenceType?: string;
9
- readonly evidenceLocation?: string;
9
+ /** Last line of the chunk in its parsed document; the first line is the ref's `lineNumber`. */
10
+ readonly lineEnd?: number;
11
+ /** Article or heading the chunk sits in. */
12
+ readonly section?: string;
10
13
  readonly confidence?: number;
11
14
  }
12
15
  export interface EvidenceChunkRecord extends NormalizedEvidenceRef, EvidenceContext {
@@ -1,4 +1,4 @@
1
- export declare const MINSYNC_VERSION = "0.4.12";
1
+ export declare const MINSYNC_VERSION = "0.5.0";
2
2
  export declare const MINSYNC_CARGO_INSTALL_TIMEOUT_MS: number;
3
3
  export interface MinSyncReleaseAsset {
4
4
  readonly name: string;
@@ -1,6 +1,21 @@
1
+ export interface RenameRetryOptions {
2
+ /** Retries after the first attempt. Default 5, so six attempts in total. */
3
+ readonly retries?: number;
4
+ /** First wait in milliseconds; it doubles each retry (25/50/100/200/400 by default). */
5
+ readonly backoffMs?: number;
6
+ }
7
+ /** True for a rename error that a short wait can clear (`EPERM`, `EACCES`, `EBUSY`). */
8
+ export declare function isRetryableRenameError(error: unknown): boolean;
9
+ /**
10
+ * `renameSync` that waits and retries while the destination is transiently held (see
11
+ * {@link RETRYABLE_RENAME_CODES}). Any other error, and the last retryable one, is rethrown unchanged.
12
+ */
13
+ export declare function renameWithRetry(from: string, to: string, options?: RenameRetryOptions): void;
1
14
  /**
2
15
  * Write `content` to `path` through a sibling temp file and an atomic rename.
3
- * On any failure the temp file is removed before the error is rethrown, so a full
16
+ * A destination that stays held through every rename retry is overwritten in place instead: replacing by
17
+ * rename needs delete rights on the destination, writing to an existing file does not.
18
+ * On any other failure the temp file is removed before the error is rethrown, so a full
4
19
  * disk or an I/O error never leaves `*.tmp` orphans in the mirror.
5
20
  */
6
21
  export declare function writeFileAtomic(path: string, content: string): void;
@@ -2,6 +2,8 @@ import { type DefaultParserRegistryOptions } from "../parser/defaults.js";
2
2
  import type { ParserRegistry } from "../parser/registry.js";
3
3
  /** Refuse to fully load/parse sources larger than this. Keeps Node heap stable on home folders. */
4
4
  export declare const DEFAULT_MAX_SOURCE_BYTES: number;
5
+ /** Persist partial mirror progress this often so an OOM mid-run still restarts incrementally. */
6
+ export declare const MIRROR_CHECKPOINT_EVERY = 25;
5
7
  /** A refresh may delete at most this share of the indexed documents (above {@link MASS_DELETE_FLOOR}). */
6
8
  export declare const DEFAULT_MAX_DELETE_RATIO = 0.3;
7
9
  /** Directory entries examined per search root before the walk stops. */