@autorag/librarian 2.13.2 → 2.13.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorag/librarian",
3
- "version": "2.13.2",
3
+ "version": "2.13.4",
4
4
  "description": "Personal librarian agent for office work on the Pi framework, with pluggable retrieval methods",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -65,6 +65,7 @@
65
65
  "chardet": "^2.2.0",
66
66
  "discord.js": "14.27.0",
67
67
  "fast-xml-parser": "^5.11.2",
68
+ "gpt-tokenizer": "^4.1.0",
68
69
  "iconv-lite": "^0.7.3",
69
70
  "jev-use": "^0.8.0",
70
71
  "jszip": "^3.10.2",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: autorag-doctor
3
- description: Diagnose and repair a broken or half-working AutoRAG install so every configured source is both indexed and searchable. Checks AutoRAG, MinSync, Jikji, the embedding backend, and every CLI-backed datasource (lazykatok, discrawl, slacrawl, wacrawl, telecrawl, notcrawl, mailcrawl, rclone, Spotlight), then fixes orphan locks, orphan processes, embedding dimension or identity mismatches, stale indexes, and missing setup. Use when search returns nothing or too little, refresh hangs or fails, a datasource disappeared from results, indexes look stale, the embedder is unavailable, or the user asks to check, diagnose, verify, or repair AutoRAG.
3
+ description: Diagnose and repair a broken or half-working AutoRAG install so every configured source is both indexed and searchable. Checks AutoRAG, MinSync, Jikji, the embedding backend, and every CLI-backed datasource (lazykatok, discrawl, slacrawl, wacrawl, telecrawl, notcrawl, mailcrawl, rclone), then fixes orphan locks, orphan processes, embedding dimension or identity mismatches, stale indexes, and missing setup. Use when search returns nothing or too little, refresh hangs or fails, a datasource disappeared from results, indexes look stale, the embedder is unavailable, or the user asks to check, diagnose, verify, or repair AutoRAG.
4
4
  license: Apache-2.0
5
5
  ---
6
6
 
@@ -73,7 +73,6 @@ Each CLI owns its archive, so ask the CLI, not AutoRAG. A datasource is only
73
73
  | Obsidian / notes | `autorag status` (AutoRAG-owned index) | `autorag refresh --method datasources`; if corrupt, delete `.autorag/datasources/obsidian/<instance>` first |
74
74
  | Mail | `mailcrawl doctor`, `mailcrawl status` | `mailcrawl sync && mailcrawl index` |
75
75
  | Cloud drive | `rclone listremotes` | `autorag refresh --method datasources` |
76
- | Spotlight (macOS) | `mdutil -s /` | indexed by the OS; no AutoRAG sync |
77
76
  | Lark / Feishu | `lark-cli auth status --format json` | no local sync; search is remote |
78
77
 
79
78
  Rules:
@@ -137,7 +137,7 @@ Datasource skills belong in trusted config.
137
137
 
138
138
  Config keys may be builtin template names (`kakao`, `whatsapp`, `telegram`,
139
139
  `slack`, `discord`, `clawgallery`, `notion`, `github`, `cloud-drive`,
140
- `mailcrawl`, `obsidian`, `rss`, `spotlight`, `lark`, `hister`) or connection
140
+ `mailcrawl`, `obsidian`, `rss`, `lark`, `hister`) or connection
141
141
  aliases with `"type": "<template>"`. Unknown names are skipped with an
142
142
  `unknown-datasource-skill` warning; they do not fail config resolution.
143
143
  `scope` narrows a query to a sub-path as ordinary filtering. Tags are
@@ -330,11 +330,10 @@ size with `prefetch.sectionLimit` / `prefetch.minSyncTopK` /
330
330
 
331
331
  Ingest caps are trusted connector options under `datasources.<name>.connector`
332
332
  and are never settable from model/tool arguments: `maxDocuments`,
333
- `maxItemsPerFeed`, and `maxContentChars` (RSS); `maxDocuments`,
334
- `maxContentChars`, `maxResultsPerQuery`, and `maxBytesPerFile` (Spotlight);
333
+ `maxItemsPerFeed`, and `maxContentChars` (RSS);
335
334
  `maxDocuments`, `maxContentChars`, `maxBytesPerFile`, `concurrency`,
336
335
  `bandwidthLimit`, and `dryRun` (cloud-drive/rclone). `maxContentChars` defaults
337
- to 20000 for RSS and 100000 for Spotlight and cloud-drive.
336
+ to 20000 for RSS and 100000 for cloud-drive.
338
337
 
339
338
  ### Refresh safety limits
340
339
 
@@ -389,7 +388,7 @@ setup. Configure datasources directly in trusted config, wizard-style:
389
388
  Datasource skills belong in trusted config. Builtin
390
389
  template names are `kakao`, `whatsapp`, `telegram`, `slack`, `discord`,
391
390
  `clawgallery`, `notion`, `github`, `github-gist`, `cloud-drive`,
392
- `mailcrawl`, `obsidian`, `rss`, `spotlight`, `lark`, and `hister`. Config keys may be connection
391
+ `mailcrawl`, `obsidian`, `rss`, `lark`, and `hister`. Config keys may be connection
393
392
  aliases with `"type": "<template>"`. Unknown names are skipped with an
394
393
  `unknown-datasource-skill` warning; they do not fail config resolution.
395
394
  `scope` narrows a query to a sub-path as ordinary filtering. Tags are descriptive metadata only, not search filters. MCP `datasourceIds` selects configured connections before retrieval; discover their IDs with `autorag.datasources.list`.
@@ -1,53 +0,0 @@
1
- import type { ConnectorFetchFail, ConnectorFetchOk } from "../../connector.js";
2
- export interface SpotlightConnectorFailure extends ConnectorFetchFail {
3
- readonly stderr?: string;
4
- readonly stdout?: string;
5
- readonly code?: number | null;
6
- }
7
- export type SpotlightConnectorResult = ConnectorFetchOk | SpotlightConnectorFailure;
8
- export interface ProcessRunResult {
9
- readonly ok: boolean;
10
- readonly stdout: string;
11
- readonly stderr: string;
12
- readonly code: number | null;
13
- /** Spawn error code, e.g. `"ENOENT"` when the binary is missing. */
14
- readonly error?: string;
15
- }
16
- /** Process execution seam; injectable for tests. Never throws. */
17
- export type ProcessRunner = (command: string, args: readonly string[], timeoutMs: number) => Promise<ProcessRunResult>;
18
- export type FileReader = (path: string) => Promise<string>;
19
- export interface SpotlightConnectorOptions {
20
- /** Trusted Spotlight filters AND-ed with each user query. Required. */
21
- readonly queries?: readonly string[];
22
- /** Trusted directory restricting every query (`mdfind -onlyin`). */
23
- readonly onlyIn?: string;
24
- /** Hits kept per query after dedupe. Default 100. */
25
- readonly maxResultsPerQuery?: number;
26
- /** Maximum documents hydrated by one live search. Default 300. */
27
- readonly maxDocuments?: number;
28
- /** Characters kept per document body. Default 100000. */
29
- readonly maxContentChars?: number;
30
- /** Files larger than this are skipped. Default 256 KiB. */
31
- readonly maxBytesPerFile?: number;
32
- /** Per-process timeout in ms. Default 15s. */
33
- readonly timeoutMs?: number;
34
- /** Injectable platform; defaults to `process.platform`. */
35
- readonly platform?: NodeJS.Platform;
36
- /** Injectable process runner; defaults to a bounded spawn wrapper. */
37
- readonly run?: ProcessRunner;
38
- /** Injectable file reader; defaults to utf8 `fs.readFile`. */
39
- readonly readFile?: FileReader;
40
- }
41
- /** Executes live Spotlight queries. macOS owns indexing; no local snapshot is collected. */
42
- export declare class SpotlightConnector {
43
- private readonly options;
44
- private readonly run;
45
- private readonly readFile;
46
- private readonly platform;
47
- constructor(options?: SpotlightConnectorOptions);
48
- /** Refresh-time health check only: never runs `mdfind` or hydrates files. */
49
- probe(): Promise<SpotlightConnectorResult>;
50
- /** Search the current macOS Spotlight index and hydrate only the requested hits. */
51
- search(query: string, limit?: number, acceptDocument?: (docId: string) => boolean): Promise<SpotlightConnectorResult>;
52
- private readinessFailure;
53
- }
@@ -1,2 +0,0 @@
1
- export { type FileReader, type ProcessRunner, type ProcessRunResult, SpotlightConnector, type SpotlightConnectorFailure, type SpotlightConnectorOptions, type SpotlightConnectorResult, } from "./connector.js";
2
- export { SpotlightSkill, type SpotlightSkillOptions } from "./skill.js";
@@ -1,33 +0,0 @@
1
- import type { RetrievalMethod, RetrievalOptions, RetrievalResult } from "../../../retrieval/types.js";
2
- import type { DatasourceIndexResult, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, PollingMetadata, SourceDescription } from "../../types.js";
3
- import { SpotlightConnector, type SpotlightConnectorOptions } from "./connector.js";
4
- export interface SpotlightSkillOptions {
5
- /** Config alias used as the independent datasource/skill identity. */
6
- readonly skillName?: string;
7
- readonly instanceId?: string;
8
- readonly instances?: readonly string[];
9
- readonly tags?: readonly string[];
10
- /** Trusted connector configuration; a pre-built connector wins. */
11
- readonly connector?: SpotlightConnector;
12
- readonly connectorOptions?: SpotlightConnectorOptions;
13
- }
14
- /** Live macOS Spotlight datasource. Refresh probes readiness; retrieval runs `mdfind`. */
15
- export declare class SpotlightSkill implements DatasourceSkill {
16
- private readonly connector;
17
- private readonly skillName;
18
- private readonly instanceId;
19
- private readonly instances;
20
- private readonly tags;
21
- private lastIndexedAt;
22
- private lastError;
23
- constructor(options?: SpotlightSkillOptions);
24
- describe(): DatasourceSkillDescriptor;
25
- polling(): PollingMetadata;
26
- index(): Promise<DatasourceIndexResult>;
27
- retrievalMethods(): readonly RetrievalMethod[];
28
- describeSources(): readonly SourceDescription[];
29
- skillManifest(): DatasourceSkillManifest;
30
- search(query: string, options: RetrievalOptions): Promise<RetrievalResult[]>;
31
- private fail;
32
- private note;
33
- }