@autorag/librarian 2.13.1 → 2.13.3
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/NOTICE +9 -9
- package/README.md +11 -8
- package/dist/agent/agent.d.ts +12 -6
- package/dist/agent/refresh-progress.d.ts +4 -0
- package/dist/agent/search-documents.d.ts +3 -1
- package/dist/agent/search-progress.d.ts +5 -0
- package/dist/cli/index.js +2502 -1567
- package/dist/cloud/context-overflow.d.ts +29 -0
- package/dist/convert/installer.d.ts +1 -1
- package/dist/core.js +2427 -1500
- package/dist/datasource/connector-skill.d.ts +1 -2
- package/dist/datasource/connector.d.ts +2 -3
- package/dist/datasource/index.d.ts +1 -2
- package/dist/datasource/skills/hister/client.d.ts +5 -5
- package/dist/datasource/skills/hister/setup.d.ts +5 -0
- package/dist/datasource/skills/mailcrawl/types.d.ts +18 -0
- package/dist/datasource/skills/spotlight/connector.d.ts +16 -24
- package/dist/datasource/skills/spotlight/index.d.ts +2 -2
- package/dist/datasource/skills/spotlight/skill.d.ts +26 -13
- package/dist/index.js +2489 -1561
- package/dist/mcp/index.js +2484 -1550
- package/dist/minsync/client.d.ts +2 -2
- package/dist/minsync/index.d.ts +1 -1
- package/dist/minsync/installer.d.ts +1 -1
- package/dist/minsync/method.d.ts +3 -3
- package/dist/minsync/process.d.ts +1 -0
- package/dist/minsync/stage.d.ts +361 -0
- package/dist/minsync/types.d.ts +4 -0
- package/dist/minsync/workspace.d.ts +2 -1
- package/dist/mirror/index-store.d.ts +16 -15
- package/dist/mirror/index.d.ts +2 -2
- package/dist/mirror/paths.d.ts +0 -2
- package/dist/mirror/sync.d.ts +6 -15
- package/dist/parser/types.d.ts +2 -2
- package/dist/process/lifecycle.d.ts +10 -0
- package/dist/profiles.js +2454 -1527
- package/dist/retrieval/scope.d.ts +1 -1
- package/package.json +14 -15
- package/skills/autorag-lite-setup/SKILL.md +3 -3
- package/skills/autorag-setup/SKILL.md +8 -8
- package/dist/datasource/skills/mail-export/connector.d.ts +0 -21
- package/dist/datasource/skills/mail-export/index.d.ts +0 -2
- package/dist/datasource/skills/mail-export/skill.d.ts +0 -20
package/NOTICE
CHANGED
|
@@ -6,22 +6,22 @@ legacy/ package license: Apache-2.0
|
|
|
6
6
|
|
|
7
7
|
Third-party production dependencies:
|
|
8
8
|
|
|
9
|
-
@earendil-works/pi-agent-core@1.
|
|
9
|
+
@earendil-works/pi-agent-core@1.4.0
|
|
10
10
|
License: MIT
|
|
11
11
|
|
|
12
|
-
@earendil-works/pi-ai@1.
|
|
12
|
+
@earendil-works/pi-ai@1.4.0
|
|
13
13
|
License: MIT
|
|
14
14
|
|
|
15
|
-
@earendil-works/pi-coding-agent@1.
|
|
15
|
+
@earendil-works/pi-coding-agent@1.4.0
|
|
16
16
|
License: MIT
|
|
17
17
|
|
|
18
|
-
@earendil-works/pi-tui@1.
|
|
18
|
+
@earendil-works/pi-tui@1.4.0
|
|
19
19
|
License: MIT
|
|
20
20
|
|
|
21
|
-
@llblab/pi-telegram@0.
|
|
21
|
+
@llblab/pi-telegram@0.58.3
|
|
22
22
|
License: MIT
|
|
23
23
|
|
|
24
|
-
@modelcontextprotocol/server@2.
|
|
24
|
+
@modelcontextprotocol/server@2.4.0
|
|
25
25
|
License: Apache-2.0
|
|
26
26
|
|
|
27
27
|
@parcel/watcher@2.6.0
|
|
@@ -45,10 +45,10 @@ License: MIT
|
|
|
45
45
|
jszip@3.10.2
|
|
46
46
|
License: (MIT OR GPL-3.0-or-later)
|
|
47
47
|
|
|
48
|
-
kordoc@4.
|
|
48
|
+
kordoc@4.24.19
|
|
49
49
|
License: MIT
|
|
50
50
|
|
|
51
|
-
mailparser@3.
|
|
51
|
+
mailparser@3.13.0
|
|
52
52
|
License: MIT
|
|
53
53
|
|
|
54
54
|
pdfjs-dist@6.4.299
|
|
@@ -60,7 +60,7 @@ License: MIT
|
|
|
60
60
|
pi-discord-remote@0.2.4
|
|
61
61
|
License: MIT
|
|
62
62
|
|
|
63
|
-
puppeteer-core@25.
|
|
63
|
+
puppeteer-core@25.16.0
|
|
64
64
|
License: Apache-2.0
|
|
65
65
|
|
|
66
66
|
slides-grab@1.5.2
|
package/README.md
CHANGED
|
@@ -458,12 +458,16 @@ try {
|
|
|
458
458
|
terminates the MinSync, Jikji and datasource child processes (and their descendants). The
|
|
459
459
|
refresh then rejects with the signal's reason and is recorded as `failed`; files already
|
|
460
460
|
mirrored are kept and not re-parsed on the next run. `onProgress` reports `parsed`
|
|
461
|
-
(`processed`/`total` are files, `currentVirtualPath` is the file about to be processed)
|
|
462
|
-
`
|
|
463
|
-
`.autorag/refresh-progress.json`
|
|
464
|
-
`parsedCounts
|
|
465
|
-
|
|
466
|
-
|
|
461
|
+
(`processed`/`total` are source files, `currentVirtualPath` is the file about to be processed),
|
|
462
|
+
`minsync` (`processed`/`total` are files processed by MinSync), and `datasources`
|
|
463
|
+
(`processed`/`total` are datasource skills). `.autorag/refresh-progress.json` carries the running
|
|
464
|
+
`sourceFiles.total` and `parsedCounts` during parsing (refreshed every 25 files rather than per
|
|
465
|
+
file), and `minsync: { synced, total }` on every MinSync batch or heartbeat. Each progress write
|
|
466
|
+
also advances `updatedAt`; between events a stale timestamp means "phase still running", not
|
|
467
|
+
"stuck". Use the marker's pid through `getRefreshStatus().progress.ownerAlive` (or
|
|
468
|
+
`isRefreshOwnerAlive`) for liveness. The marker is replaced with a retried rename (an in-place
|
|
469
|
+
overwrite if a reader keeps the destination held, as on Windows). Without these options a refresh
|
|
470
|
+
behaves as before.
|
|
467
471
|
|
|
468
472
|
---
|
|
469
473
|
|
|
@@ -656,8 +660,7 @@ AutoRAG Agent connects to external tools and communication platforms using dedic
|
|
|
656
660
|
| **Telegram** | `telegram` | [`telecrawl`](https://github.com/openclaw/telecrawl) CLI | Local-first desktop archive + FTS5 | Lexical FTS5; BM25 + Semantic + Hybrid by default via [`sidecar`](docs/datasource-skills.md#hybrid-search-for-chat-crawlers-sidecar) |
|
|
657
661
|
| **Slack** | `slack` | [`slacrawl`](https://github.com/openclaw/slacrawl) CLI | Local workspace/channel/thread archive + FTS5 | Lexical FTS5; BM25 + Semantic + Hybrid by default via [`sidecar`](docs/datasource-skills.md#hybrid-search-for-chat-crawlers-sidecar) |
|
|
658
662
|
| **Notion** | `notion` | [`notcrawl`](https://github.com/openclaw/notcrawl) CLI | Local page/database/block archive + FTS5 | Lexical FTS5 |
|
|
659
|
-
| **Email Archives** | `mailcrawl` | [`mailcrawl`](https://github.com/NomaDamas/mailcrawl) CLI | Local Gmail, IMAP, and
|
|
660
|
-
| **Local Mail Export**| `mail-export` | Built-in `.mbox` / `.eml` parser | Local filesystem mailboxes | Lexical |
|
|
663
|
+
| **Email Archives** | `mailcrawl` | [`mailcrawl`](https://github.com/NomaDamas/mailcrawl) CLI | Local Gmail, IMAP, Maildir, and `.eml`/`.mbox` mailbox backups (`--source files`) | BM25, Semantic, Hybrid |
|
|
661
664
|
| **Obsidian Vaults** | `obsidian` | Indexed with MinSync in its own workspace (no external CLI) | Markdown notes, folder-scopable | Lexical (BM25), Semantic, Scoped |
|
|
662
665
|
| **GitHub** | `github` | GitHub REST API | In-memory fetched Issues and Pull Requests | Lexical, Scoped |
|
|
663
666
|
| **GitHub Gists** | `github-gist` | GitHub REST API | Incremental local index of own-account public and permitted secret Gist content/metadata; token not stored | Lexical (BM25), Local Semantic, Scoped |
|
package/dist/agent/agent.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { type EverythingClientOptions, type EverythingSearchRequest, type Everyt
|
|
|
9
9
|
import { type FSearchClientOptions, type FSearchFailureReason, type FSearchSearchRequest, type FSearchSearchResult } from "../fsearch/index.js";
|
|
10
10
|
import { type JikjiFailureReason, type JikjiOptions, type JikjiPrepareOptions } from "../jikji/index.js";
|
|
11
11
|
import { type LanguageTag } from "../language.js";
|
|
12
|
-
import { type MinSyncSyncResult, type MinSyncVectorMethodOptions } from "../minsync/index.js";
|
|
12
|
+
import { type MinSyncSyncProgress, type MinSyncSyncResult, type MinSyncVectorMethodOptions } from "../minsync/index.js";
|
|
13
13
|
import { type ParsedMirrorSyncOptions, type ParsedMirrorSyncResult } from "../mirror/sync.js";
|
|
14
14
|
import { type DefaultParserRegistryOptions } from "../parser/index.js";
|
|
15
15
|
import { RetrievalEngine } from "../retrieval/engine.js";
|
|
@@ -87,10 +87,10 @@ export type RefreshMethod = "parsed" | "minsync" | "datasources" | "jikji" | "ev
|
|
|
87
87
|
/**
|
|
88
88
|
* Progress of a refresh phase that can count its work. `parsed` counts source files
|
|
89
89
|
* (`currentVirtualPath` is the opaque virtual path of the file about to be processed);
|
|
90
|
-
* `
|
|
90
|
+
* `minsync` counts files processed by MinSync; `datasources` counts configured datasource skills.
|
|
91
91
|
*/
|
|
92
92
|
export interface AutoRAGRefreshProgress {
|
|
93
|
-
readonly phase: "parsed" | "datasources";
|
|
93
|
+
readonly phase: "parsed" | "minsync" | "datasources";
|
|
94
94
|
/** Items finished so far. Advances by one per item and ends equal to `total`. */
|
|
95
95
|
readonly processed: number;
|
|
96
96
|
readonly total: number;
|
|
@@ -110,7 +110,7 @@ export interface AutoRAGRefreshOptions {
|
|
|
110
110
|
* reason and records the run as failed; mirror entries written before the abort are kept.
|
|
111
111
|
*/
|
|
112
112
|
readonly signal?: AbortSignal;
|
|
113
|
-
/** Called while the parse and datasource phases run. A throwing callback is ignored; it never fails the refresh. */
|
|
113
|
+
/** Called while the parse, MinSync and datasource phases run. A throwing callback is ignored; it never fails the refresh. */
|
|
114
114
|
readonly onProgress?: (progress: AutoRAGRefreshProgress) => void;
|
|
115
115
|
/**
|
|
116
116
|
* Per-root `jikji prepare` controls: a hard `timeoutMs` wall per root and a
|
|
@@ -125,6 +125,8 @@ export interface AutoRAGMinSyncRefreshResult {
|
|
|
125
125
|
readonly reason?: string;
|
|
126
126
|
/** Count of parsed documents excluded from the MinSync index by file name. */
|
|
127
127
|
readonly stagingExcludedCount?: number;
|
|
128
|
+
/** Count of files MinSync skipped in a partial sync; per-file details remain in diagnostics. */
|
|
129
|
+
readonly filesSkippedCount?: number;
|
|
128
130
|
readonly diagnostics?: readonly SearchDocumentDiagnostic[];
|
|
129
131
|
}
|
|
130
132
|
export interface AutoRAGRefreshResult extends Omit<ParsedMirrorSyncResult, "diagnostics"> {
|
|
@@ -179,6 +181,8 @@ export interface AutoRAGRefreshStatus {
|
|
|
179
181
|
readonly parsedCounts?: RefreshProgressCounts;
|
|
180
182
|
readonly minsync?: {
|
|
181
183
|
readonly synced?: number;
|
|
184
|
+
readonly total?: number;
|
|
185
|
+
readonly filesSkipped?: number;
|
|
182
186
|
};
|
|
183
187
|
readonly ownerAlive?: boolean;
|
|
184
188
|
};
|
|
@@ -743,7 +747,9 @@ export declare class AutoRAGAgent {
|
|
|
743
747
|
* are enabled, with where similar past questions were answered (from
|
|
744
748
|
* retrieval memory) in the state. Returns the datasource ids and whether the
|
|
745
749
|
* web is to be searched with every query before the rerank; a failed check
|
|
746
|
-
* searches neither.
|
|
750
|
+
* searches neither. It runs while the route check is still in flight, so it
|
|
751
|
+
* returns its diagnostics instead of recording them (see
|
|
752
|
+
* {@link SearchDatasourcePlan}).
|
|
747
753
|
*/
|
|
748
754
|
private selectSearchDatasources;
|
|
749
755
|
/**
|
|
@@ -896,7 +902,7 @@ export declare class AutoRAGAgent {
|
|
|
896
902
|
*/
|
|
897
903
|
private scanMirrorStaleness;
|
|
898
904
|
private exactDuplicateExclusions;
|
|
899
|
-
syncMinSync(force?: boolean, signal?: AbortSignal): Promise<MinSyncSyncResult>;
|
|
905
|
+
syncMinSync(force?: boolean, signal?: AbortSignal, onProgress?: (progress: MinSyncSyncProgress) => void): Promise<MinSyncSyncResult>;
|
|
900
906
|
/** Provider for the Windows-only everything_search tool. */
|
|
901
907
|
searchEverything(request: EverythingSearchRequest): Promise<EverythingSearchResult>;
|
|
902
908
|
/**
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** Persist display progress every 25 files; this is not the engine's recovery checkpoint. */
|
|
2
|
+
export declare const REFRESH_PROGRESS_EVERY = 25;
|
|
1
3
|
export type RefreshProgressPhase = "parsed" | "minsync" | "datasources" | "jikji" | "everything" | "fsearch" | "finalizing";
|
|
2
4
|
export interface RefreshProgressCounts {
|
|
3
5
|
readonly scanned: number;
|
|
@@ -20,6 +22,8 @@ export interface PersistedRefreshProgress {
|
|
|
20
22
|
readonly parsedCounts?: RefreshProgressCounts;
|
|
21
23
|
readonly minsync?: {
|
|
22
24
|
readonly synced?: number;
|
|
25
|
+
readonly total?: number;
|
|
26
|
+
readonly filesSkipped?: number;
|
|
23
27
|
};
|
|
24
28
|
readonly error?: string;
|
|
25
29
|
}
|
|
@@ -9,13 +9,15 @@ 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" | "lexical-tokenizer-unavailable" | "parser-skipped" | "parser-failed" | "parser-crashed" | "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" | "pdf-extract-thin" | "retrieval-method-failed" | "rerank-failed" | "jikji-unavailable" | "jikji-prepare-failed" | "jikji-find-failed" | "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" | "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" | "lexical-tokenizer-unavailable" | "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" | "pdf-extract-thin" | "retrieval-method-failed" | "rerank-failed" | "jikji-unavailable" | "jikji-prepare-failed" | "jikji-find-failed" | "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" | "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;
|
|
16
16
|
readonly message: string;
|
|
17
17
|
/** Component label (e.g. "sanitizer", "minsync") or opaque virtual path — never a real filesystem path. */
|
|
18
18
|
readonly source?: string;
|
|
19
|
+
/** Structured cause for a component diagnostic, such as a changed source revision. */
|
|
20
|
+
readonly reason?: string;
|
|
19
21
|
}
|
|
20
22
|
export interface SearchDocumentEvidence {
|
|
21
23
|
readonly excerpt: string;
|
|
@@ -49,6 +49,11 @@ export declare class SearchProgressTracker {
|
|
|
49
49
|
/** Starts (or restarts) a step that the caller closes with {@link endStep}. */
|
|
50
50
|
beginStep(id: string, label: string): void;
|
|
51
51
|
endStep(id: string, status: Exclude<SearchProgressStatus, "running">, detail?: string): void;
|
|
52
|
+
/**
|
|
53
|
+
* Removes a step that turned out not to belong to this search: speculative work whose branch was not taken.
|
|
54
|
+
* A job still running under that id settles into nothing, so the step does not come back.
|
|
55
|
+
*/
|
|
56
|
+
discardStep(id: string): void;
|
|
52
57
|
/**
|
|
53
58
|
* Runs `work` as step `id`: running while it is in flight, done with
|
|
54
59
|
* `detail(value)` when it resolves, failed with the error's own message when
|