@autorag/librarian 2.5.0 → 2.5.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.
- package/README.md +7 -4
- package/dist/agent/agent.d.ts +8 -0
- package/dist/agent/search-documents.d.ts +1 -1
- package/dist/cli/command-help.d.ts +1 -0
- package/dist/cli/commands/lite-retrieve.d.ts +9 -0
- package/dist/cli/index.d.ts +3 -1
- package/dist/cli/index.js +10192 -9622
- package/dist/cli/setup.d.ts +2 -0
- package/dist/core.js +255 -61
- package/dist/datasource/index.d.ts +1 -1
- package/dist/datasource/skills/discrawl/client.d.ts +6 -0
- package/dist/datasource/skills/discrawl/index.d.ts +1 -1
- package/dist/datasource/skills/discrawl/types.d.ts +7 -21
- package/dist/filesystem/source-paths.d.ts +6 -2
- package/dist/index.js +258 -62
- package/dist/minsync/client.d.ts +1 -1
- package/dist/minsync/embedder-config.d.ts +3 -0
- package/dist/minsync/index.d.ts +1 -1
- package/dist/minsync/installer.d.ts +1 -1
- package/dist/minsync/method.d.ts +2 -0
- package/dist/minsync/types.d.ts +7 -1
- package/dist/minsync/workspace.d.ts +6 -0
- package/dist/mirror/index-store.d.ts +17 -0
- package/dist/mirror/sync.d.ts +7 -4
- package/package.json +2 -2
- package/skills/autorag/SKILL.md +3 -1
- package/skills/autorag-lite-search/SKILL.md +24 -6
- package/skills/autorag-lite-setup/SKILL.md +8 -0
|
@@ -9,7 +9,7 @@ export { DatasourceSkillRegistry, type RegisteredDatasourceSkill } from "./regis
|
|
|
9
9
|
export { DatasourceResultFilter, type ResultsByMethod } from "./result-filter.js";
|
|
10
10
|
export { buildDatasourceChunkSource, buildDatasourceInstanceSource, DATASOURCE_CHUNKS_SEGMENT, datasourceSourceHasFragment, datasourceSourcePath, isDatasourceSource, matchesDatasourceScope, matchesVirtualPathScope, normalizeVirtualPath, } from "./scope.js";
|
|
11
11
|
export { CLOUD_DRIVE_SKILL_DEFINITION, CloudDriveSkill, type CloudDriveSkillOptions, RcloneConnector, type RcloneConnectorOptions, type RcloneRunner, type RcloneRunResult, } from "./skills/cloud-drive/index.js";
|
|
12
|
-
export { DEFAULT_DISCRAWL_EMBEDDING_MODEL, DEFAULT_DISCRAWL_MODE,
|
|
12
|
+
export { DEFAULT_DISCRAWL_EMBEDDING_MODEL, DEFAULT_DISCRAWL_MODE, DiscrawlClient, type DiscrawlFailureReason, DiscrawlFtsMethod, DiscrawlHybridMethod, type DiscrawlOptions, type DiscrawlSearchHit, type DiscrawlSearchMode, type DiscrawlSearchOptions, type DiscrawlSearchResult, DiscrawlSemanticMethod, DiscrawlSkill, type DiscrawlSkillClient, type DiscrawlSkillOptions, ENGLISH_ONLY_EMBEDDING_MODELS, } from "./skills/discrawl/index.js";
|
|
13
13
|
export { BUILTIN_DATASOURCE_SKILL_NAMES, type BuildDatasourceSkillsResult, buildDatasourceSkills, type DatasourceSkillConfig, type DatasourcesConfig, } from "./skills/factory.js";
|
|
14
14
|
export { GitHubConnector, type GitHubConnectorOptions, GitHubSkill, type GitHubSkillOptions, } from "./skills/github/index.js";
|
|
15
15
|
export type { KatokFailureReason, KatokHit, KatokOptions, KatokSearchMode, KatokSearchOptions, KatokSearchResult, KatokSkillClient, KatokSkillOptions, } from "./skills/katok/index.js";
|
|
@@ -17,6 +17,12 @@ export declare class DiscrawlClient {
|
|
|
17
17
|
metadata(signal?: AbortSignal): Promise<DiscrawlMetadataResult>;
|
|
18
18
|
doctor(signal?: AbortSignal): Promise<DiscrawlDoctorResult>;
|
|
19
19
|
status(signal?: AbortSignal): Promise<DiscrawlStatusResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Imports new messages from the local Discord Desktop cache through
|
|
22
|
+
* `discrawl wiretap`. AutoRAG never drives discrawl's bot sync — that path
|
|
23
|
+
* belongs to the CLI, which owns its own credential — so no Discord token is
|
|
24
|
+
* involved in an AutoRAG refresh.
|
|
25
|
+
*/
|
|
20
26
|
sync(signal?: AbortSignal): Promise<DiscrawlSyncResult>;
|
|
21
27
|
embed(limit?: number, rebuild?: boolean, signal?: AbortSignal): Promise<DiscrawlEmbedResult>;
|
|
22
28
|
search(mode: DiscrawlSearchMode, query: string, options?: DiscrawlSearchOptions): Promise<DiscrawlSearchResult>;
|
|
@@ -2,4 +2,4 @@ export { DiscrawlClient, discrawlWorkspace } from "./client.js";
|
|
|
2
2
|
export { DiscrawlFtsMethod, DiscrawlHybridMethod, type DiscrawlMethodOptions, type DiscrawlSearchClient, DiscrawlSemanticMethod, } from "./methods.js";
|
|
3
3
|
export { DISCRAWL_SOURCE_KIND, discrawlConfigPath, discrawlDatabasePath, discrawlDatasourceRoot, discrawlSourcePath, parseDiscrawlSourcePath, } from "./paths.js";
|
|
4
4
|
export { DiscrawlSkill, type DiscrawlSkillClient, type DiscrawlSkillOptions } from "./skill.js";
|
|
5
|
-
export { DEFAULT_DISCRAWL_BINARY, DEFAULT_DISCRAWL_EMBEDDING_MODEL, DEFAULT_DISCRAWL_EMBEDDING_PROVIDER, DEFAULT_DISCRAWL_MAX_BUFFER_BYTES, DEFAULT_DISCRAWL_MODE,
|
|
5
|
+
export { DEFAULT_DISCRAWL_BINARY, DEFAULT_DISCRAWL_EMBEDDING_MODEL, DEFAULT_DISCRAWL_EMBEDDING_PROVIDER, DEFAULT_DISCRAWL_MAX_BUFFER_BYTES, DEFAULT_DISCRAWL_MODE, DEFAULT_DISCRAWL_TIMEOUT_MS, type DiscrawlDoctorInfo, type DiscrawlDoctorResult, type DiscrawlEmbeddingConfigResult, type DiscrawlEmbeddingRuntime, type DiscrawlEmbedInfo, type DiscrawlEmbedResult, type DiscrawlFailure, type DiscrawlFailureReason, type DiscrawlMessage, type DiscrawlMetadataInfo, type DiscrawlMetadataResult, type DiscrawlOptions, type DiscrawlSearchHit, type DiscrawlSearchMode, type DiscrawlSearchOptions, type DiscrawlSearchResult, type DiscrawlStatusInfo, type DiscrawlStatusResult, type DiscrawlSyncInfo, type DiscrawlSyncResult, ENGLISH_ONLY_EMBEDDING_MODELS, } from "./types.js";
|
|
@@ -8,22 +8,6 @@ import type { RetrievalOptions } from "../../../retrieval/types.js";
|
|
|
8
8
|
* semantic is unavailable.
|
|
9
9
|
*/
|
|
10
10
|
export type DiscrawlSearchMode = "fts" | "semantic" | "hybrid";
|
|
11
|
-
/**
|
|
12
|
-
* Where the `discrawl` CLI reads Discord data from.
|
|
13
|
-
*
|
|
14
|
-
* - `wiretap` — the local Discord Desktop cache. Requires no token and issues
|
|
15
|
-
* no Discord API calls; it reads only files Discord already
|
|
16
|
-
* wrote to disk. Includes classifiable direct messages.
|
|
17
|
-
* - `discord` — the Discord bot API using a server-configured bot token. This
|
|
18
|
-
* is the ToS-sanctioned automation path (a bot token identifies
|
|
19
|
-
* an OAuth2 application, not a human user).
|
|
20
|
-
* - `both` — bot API plus desktop cache.
|
|
21
|
-
*
|
|
22
|
-
* AutoRAG never uses a Discord *user* token: automating a user account is
|
|
23
|
-
* prohibited by Discord's Community Guidelines and can get the account
|
|
24
|
-
* terminated.
|
|
25
|
-
*/
|
|
26
|
-
export type DiscrawlSourceKind = "wiretap" | "discord" | "both";
|
|
27
11
|
/**
|
|
28
12
|
* Embedding models known to be English-only. Selecting one for a non-English
|
|
29
13
|
* archive silently degrades semantic search to noise rather than failing, so
|
|
@@ -49,6 +33,11 @@ export declare const DEFAULT_DISCRAWL_EMBEDDING_PROVIDER = "ollama";
|
|
|
49
33
|
* Configuration for the discrawl client. All fields optional; defaults mirror
|
|
50
34
|
* the katok client. The client spawns the `discrawl` binary as a child process
|
|
51
35
|
* — it never opens the Discord archive database directly.
|
|
36
|
+
*
|
|
37
|
+
* AutoRAG drives discrawl's local archive only: `wiretap` to import the
|
|
38
|
+
* Discord Desktop cache plus search/embed against that native store. The bot
|
|
39
|
+
* API path belongs to the CLI, which owns its own credential, so no Discord
|
|
40
|
+
* token is configured, required, or forwarded here.
|
|
52
41
|
*/
|
|
53
42
|
export interface DiscrawlEmbeddingRuntime {
|
|
54
43
|
readonly provider: string;
|
|
@@ -76,8 +65,6 @@ export interface DiscrawlOptions {
|
|
|
76
65
|
readonly timeoutMs?: number;
|
|
77
66
|
/** Max stdout/stderr bytes retained. Default 1_048_576 (1 MiB). */
|
|
78
67
|
readonly maxBufferBytes?: number;
|
|
79
|
-
/** Archive source for the CLI. Default `wiretap` (no token required). */
|
|
80
|
-
readonly source?: DiscrawlSourceKind;
|
|
81
68
|
/**
|
|
82
69
|
* Explicit operator-owned discrawl config file passed as `--config`.
|
|
83
70
|
* AutoRAG never rewrites an explicit config.
|
|
@@ -87,7 +74,7 @@ export interface DiscrawlOptions {
|
|
|
87
74
|
readonly root?: string;
|
|
88
75
|
/** Explicit workspace directory overriding the computed default. */
|
|
89
76
|
readonly workspacePath?: string;
|
|
90
|
-
/** Restrict search
|
|
77
|
+
/** Restrict search to one guild id. */
|
|
91
78
|
readonly guildId?: string;
|
|
92
79
|
/** Embedding provider understood by the native discrawl configuration. */
|
|
93
80
|
readonly embeddingProvider?: string;
|
|
@@ -112,7 +99,6 @@ export interface DiscrawlOptions {
|
|
|
112
99
|
export declare const DEFAULT_DISCRAWL_BINARY = "discrawl";
|
|
113
100
|
export declare const DEFAULT_DISCRAWL_TIMEOUT_MS = 30000;
|
|
114
101
|
export declare const DEFAULT_DISCRAWL_MAX_BUFFER_BYTES = 1048576;
|
|
115
|
-
export declare const DEFAULT_DISCRAWL_SOURCE: DiscrawlSourceKind;
|
|
116
102
|
export declare const DEFAULT_DISCRAWL_MODE: DiscrawlSearchMode;
|
|
117
103
|
/**
|
|
118
104
|
* Reasons a discrawl CLI invocation can fail. The client never throws for
|
|
@@ -168,7 +154,7 @@ export interface DiscrawlDoctorInfo {
|
|
|
168
154
|
readonly embeddingProvider?: string;
|
|
169
155
|
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
170
156
|
}
|
|
171
|
-
/** Result of `discrawl
|
|
157
|
+
/** Result of `discrawl wiretap`. */
|
|
172
158
|
export interface DiscrawlSyncInfo {
|
|
173
159
|
readonly messages: number;
|
|
174
160
|
readonly guilds?: number;
|
|
@@ -24,8 +24,12 @@ export declare function isFilesystemAbsolutePath(source: string): boolean;
|
|
|
24
24
|
/**
|
|
25
25
|
* Normalize an opaque virtual source id. Returns the normalized id, or
|
|
26
26
|
* `undefined` when the input is syntactically invalid or unsafe (no leading
|
|
27
|
-
* slash, URL scheme,
|
|
28
|
-
*
|
|
27
|
+
* slash, URL scheme, traversal, NUL, backslash). Never throws and never
|
|
28
|
+
* returns a real path — failures are signaled as `undefined`.
|
|
29
|
+
*
|
|
30
|
+
* `#` and `?` are NOT rejected: they are ordinary characters in a real file
|
|
31
|
+
* name, and ids are derived verbatim from real file names. URL-shaped input
|
|
32
|
+
* is already rejected by the scheme check above.
|
|
29
33
|
*/
|
|
30
34
|
export declare function normalizeVirtualPath(virtual: string | undefined | null): string | undefined;
|
|
31
35
|
/**
|