@autorag/librarian 2.0.0 → 2.2.0
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 +104 -2
- package/dist/agent/agent.d.ts +11 -0
- package/dist/agent/search-bm25-tool.d.ts +1 -1
- package/dist/agent/search-documents.d.ts +1 -0
- package/dist/agent/search-minsync-tool.d.ts +1 -1
- package/dist/cli/config.d.ts +6 -0
- package/dist/cli/index.js +5871 -587
- package/dist/datasource/chunk-store.d.ts +67 -0
- package/dist/datasource/connector-skill.d.ts +107 -0
- package/dist/datasource/connector.d.ts +72 -0
- package/dist/datasource/crawler-client.d.ts +9 -0
- package/dist/datasource/crawler-skill.d.ts +41 -0
- package/dist/datasource/crawler-types.d.ts +53 -0
- package/dist/datasource/http.d.ts +49 -0
- package/dist/datasource/index.d.ts +16 -0
- package/dist/datasource/skills/discrawl/client.d.ts +23 -0
- package/dist/datasource/skills/discrawl/config.d.ts +9 -0
- package/dist/datasource/skills/discrawl/index.d.ts +5 -0
- package/dist/datasource/skills/discrawl/methods.d.ts +55 -0
- package/dist/datasource/skills/discrawl/paths.d.ts +30 -0
- package/dist/datasource/skills/discrawl/skill.d.ts +58 -0
- package/dist/datasource/skills/discrawl/types.d.ts +198 -0
- package/dist/datasource/skills/factory.d.ts +35 -0
- package/dist/datasource/skills/gdrive/connector.d.ts +30 -0
- package/dist/datasource/skills/gdrive/index.d.ts +3 -0
- package/dist/datasource/skills/gdrive/rclone-connector.d.ts +51 -0
- package/dist/datasource/skills/gdrive/skill.d.ts +24 -0
- package/dist/datasource/skills/github/connector.d.ts +28 -0
- package/dist/datasource/skills/github/index.d.ts +2 -0
- package/dist/datasource/skills/github/skill.d.ts +20 -0
- package/dist/datasource/skills/gmail/connector.d.ts +30 -0
- package/dist/datasource/skills/gmail/himalaya-connector.d.ts +40 -0
- package/dist/datasource/skills/gmail/index.d.ts +3 -0
- package/dist/datasource/skills/gmail/skill.d.ts +24 -0
- package/dist/datasource/skills/mail-export/connector.d.ts +21 -0
- package/dist/datasource/skills/mail-export/index.d.ts +2 -0
- package/dist/datasource/skills/mail-export/skill.d.ts +20 -0
- package/dist/datasource/skills/notion/index.d.ts +15 -0
- package/dist/datasource/skills/obsidian/client.d.ts +15 -0
- package/dist/datasource/skills/obsidian/index.d.ts +6 -0
- package/dist/datasource/skills/obsidian/methods.d.ts +26 -0
- package/dist/datasource/skills/obsidian/paths.d.ts +27 -0
- package/dist/datasource/skills/obsidian/skill.d.ts +43 -0
- package/dist/datasource/skills/obsidian/types.d.ts +90 -0
- package/dist/datasource/skills/rss/connector.d.ts +28 -0
- package/dist/datasource/skills/rss/index.d.ts +2 -0
- package/dist/datasource/skills/rss/skill.d.ts +22 -0
- package/dist/datasource/skills/slack/index.d.ts +15 -0
- package/dist/datasource/skills/spotlight/connector.d.ts +59 -0
- package/dist/datasource/skills/spotlight/index.d.ts +2 -0
- package/dist/datasource/skills/spotlight/skill.d.ts +20 -0
- package/dist/datasource/skills/telecrawl/index.d.ts +15 -0
- package/dist/datasource/skills/wacrawl/index.d.ts +15 -0
- package/dist/index.js +5971 -673
- package/dist/parser/defaults.d.ts +2 -0
- package/dist/parser/hwp-markdown.d.ts +25 -0
- package/dist/parser/hwp.d.ts +7 -0
- package/dist/parser/index.d.ts +2 -1
- package/dist/parser/rhwp-adapter.d.ts +30 -0
- package/dist/retrieval/merger.d.ts +1 -0
- package/dist/retrieval/scope.d.ts +10 -0
- package/package.json +19 -18
- package/skills/autorag-setup/SKILL.md +74 -0
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistent chunk store shared by the connector-backed datasource skills.
|
|
3
|
+
*
|
|
4
|
+
* Documents fetched by a {@link DatasourceConnector} are split into bounded
|
|
5
|
+
* chunks, persisted as JSON under
|
|
6
|
+
* `<workspaceRoot>/.autorag/datasources/<skill>/<instance>/chunks.json`, and
|
|
7
|
+
* searched with a lightweight BM25-style lexical scorer. The store never
|
|
8
|
+
* throws from load/search; persistence failures degrade to in-memory-only
|
|
9
|
+
* operation.
|
|
10
|
+
*/
|
|
11
|
+
import type { ConnectorDocument } from "./connector.js";
|
|
12
|
+
export interface StoredChunk {
|
|
13
|
+
readonly chunkId: string;
|
|
14
|
+
readonly docId: string;
|
|
15
|
+
/** Sanitized hierarchy segments under the instance root. */
|
|
16
|
+
readonly hierarchy: readonly string[];
|
|
17
|
+
readonly title?: string;
|
|
18
|
+
readonly content: string;
|
|
19
|
+
readonly publishedAt?: number;
|
|
20
|
+
readonly metadata: Readonly<Record<string, unknown>>;
|
|
21
|
+
}
|
|
22
|
+
export interface ScoredChunk {
|
|
23
|
+
readonly chunk: StoredChunk;
|
|
24
|
+
readonly score: number;
|
|
25
|
+
}
|
|
26
|
+
export interface DatasourceChunkStoreOptions {
|
|
27
|
+
readonly skillName: string;
|
|
28
|
+
readonly instanceId: string;
|
|
29
|
+
/** When set, chunks are persisted under `.autorag/datasources/…`. */
|
|
30
|
+
readonly workspaceRoot?: string;
|
|
31
|
+
/** Maximum characters per chunk. Default 2000. */
|
|
32
|
+
readonly maxChunkChars?: number;
|
|
33
|
+
}
|
|
34
|
+
export declare function datasourceChunkStorePath(workspaceRoot: string, skillName: string, instanceId: string): string;
|
|
35
|
+
export declare class DatasourceChunkStore {
|
|
36
|
+
private readonly skillName;
|
|
37
|
+
private readonly instanceId;
|
|
38
|
+
private readonly storePath;
|
|
39
|
+
private readonly maxChunkChars;
|
|
40
|
+
private chunkList;
|
|
41
|
+
private loaded;
|
|
42
|
+
constructor(options: DatasourceChunkStoreOptions);
|
|
43
|
+
/**
|
|
44
|
+
* Replace the store contents with chunks derived from `documents`.
|
|
45
|
+
* Returns the resulting chunk count. Persistence failures are swallowed
|
|
46
|
+
* (in-memory contents stay authoritative for this process).
|
|
47
|
+
*/
|
|
48
|
+
replaceDocuments(documents: readonly ConnectorDocument[]): number;
|
|
49
|
+
/** Load persisted chunks when present. Returns true when data was loaded. */
|
|
50
|
+
load(): boolean;
|
|
51
|
+
/** Ensure persisted chunks are loaded once for read paths. */
|
|
52
|
+
ensureLoaded(): void;
|
|
53
|
+
chunks(): readonly StoredChunk[];
|
|
54
|
+
/** Distinct hierarchy prefixes present in the store (for source listing). */
|
|
55
|
+
hierarchies(): readonly (readonly string[])[];
|
|
56
|
+
/**
|
|
57
|
+
* BM25-style lexical search over the stored chunks. Empty queries and
|
|
58
|
+
* empty stores return `[]`; this method never throws.
|
|
59
|
+
*
|
|
60
|
+
* Terms match document tokens exactly or as a prefix (min 2 chars), so
|
|
61
|
+
* agglutinative suffixes — Korean particles/endings (인증서 → 인증서를) and
|
|
62
|
+
* English inflections (index → indexing) — still rank. Prefix hits are
|
|
63
|
+
* slightly discounted against exact hits.
|
|
64
|
+
*/
|
|
65
|
+
search(query: string, topK: number): readonly ScoredChunk[];
|
|
66
|
+
private persist;
|
|
67
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared {@link DatasourceSkill} implementation for connector-backed
|
|
3
|
+
* datasources (Slack, Discord, Notion, GitHub, Google Drive, Gmail/IMAP,
|
|
4
|
+
* local mail exports, RSS/news).
|
|
5
|
+
*
|
|
6
|
+
* Composition: a trusted {@link DatasourceConnector} fetches documents, a
|
|
7
|
+
* {@link DatasourceChunkStore} persists and lexically indexes them, and this
|
|
8
|
+
* class exposes the standard skill surface — descriptor, polling metadata,
|
|
9
|
+
* ok/fail indexing with traceable diagnostics, retrieval methods routed
|
|
10
|
+
* through the shared pipeline, source descriptions, and a
|
|
11
|
+
* progressive-disclosure agent-skill manifest.
|
|
12
|
+
*
|
|
13
|
+
* Invariants:
|
|
14
|
+
* - Constructed only from trusted, server-supplied configuration.
|
|
15
|
+
* - Sources are stable slash-hierarchical paths `/<skill>/<instance>/…`.
|
|
16
|
+
* - `index()` never throws; failures surface as traceable diagnostics.
|
|
17
|
+
* - Retrieval honors `scope` and `allowedScopes` narrowing; tool arguments
|
|
18
|
+
* can never widen access (enforced upstream by DatasourceAccessContext).
|
|
19
|
+
* - Results and metadata may carry real file paths or account identifiers;
|
|
20
|
+
* privacy is the operator's responsibility (use a local LLM).
|
|
21
|
+
*/
|
|
22
|
+
import type { RetrievalMethod, RetrievalMethodDescriptor, RetrievalOptions, RetrievalResult } from "../retrieval/types.js";
|
|
23
|
+
import { DatasourceChunkStore } from "./chunk-store.js";
|
|
24
|
+
import type { DatasourceConnector } from "./connector.js";
|
|
25
|
+
import type { DatasourceIndexResult, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, PollingMetadata, SourceDescription } from "./types.js";
|
|
26
|
+
/** Static identity/behavior shared by all instances of one skill kind. */
|
|
27
|
+
export interface ConnectorSkillDefinition {
|
|
28
|
+
/** Stable skill name and datasource id, e.g. `"slack"`. */
|
|
29
|
+
readonly skillName: string;
|
|
30
|
+
/** Skill kind, e.g. `"slack-workspace"`. */
|
|
31
|
+
readonly skillType: string;
|
|
32
|
+
/** One-line descriptor description. */
|
|
33
|
+
readonly description: string;
|
|
34
|
+
/** Capability tags such as `"chat"`, `"api"`, `"polling"`. */
|
|
35
|
+
readonly capabilities: readonly string[];
|
|
36
|
+
/** Default authorization tags when the server config supplies none. */
|
|
37
|
+
readonly defaultTags: readonly string[];
|
|
38
|
+
/** Content type reported on source descriptions, e.g. `"chat"`. */
|
|
39
|
+
readonly contentType: string;
|
|
40
|
+
/** Short "when to use" text for the system-prompt skills block. */
|
|
41
|
+
readonly manifestDescription: string;
|
|
42
|
+
/** Extra path-opaque manifest body lines (after the standard sections). */
|
|
43
|
+
readonly manifestNotes?: readonly string[];
|
|
44
|
+
}
|
|
45
|
+
export interface ConnectorSkillOptions {
|
|
46
|
+
readonly connector: DatasourceConnector;
|
|
47
|
+
readonly instanceId?: string;
|
|
48
|
+
readonly instances?: readonly string[];
|
|
49
|
+
/** Poll interval in ms. Default 15 minutes; `0` disables polling. */
|
|
50
|
+
readonly pollingIntervalMs?: number;
|
|
51
|
+
readonly tags?: readonly string[];
|
|
52
|
+
readonly lastIndexedAt?: number;
|
|
53
|
+
/** Workspace root for chunk persistence; omitted ⇒ in-memory only. */
|
|
54
|
+
readonly workspaceRoot?: string;
|
|
55
|
+
readonly maxChunkChars?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Dedupe window in ms: when > 0, documents whose `docId` was already
|
|
58
|
+
* indexed within the window keep their previous timestamp identity and
|
|
59
|
+
* duplicates inside one fetch are dropped (RSS/news re-delivery).
|
|
60
|
+
*/
|
|
61
|
+
readonly dedupeWindowMs?: number;
|
|
62
|
+
}
|
|
63
|
+
export declare class ConnectorDatasourceSkill implements DatasourceSkill {
|
|
64
|
+
protected readonly definition: ConnectorSkillDefinition;
|
|
65
|
+
protected readonly connector: DatasourceConnector;
|
|
66
|
+
protected readonly instanceId: string;
|
|
67
|
+
protected readonly instances: readonly string[];
|
|
68
|
+
protected readonly pollingIntervalMs: number;
|
|
69
|
+
protected readonly tags: readonly string[];
|
|
70
|
+
protected readonly store: DatasourceChunkStore;
|
|
71
|
+
protected readonly dedupeWindowMs: number;
|
|
72
|
+
private lastIndexedAt;
|
|
73
|
+
private lastPolledAt;
|
|
74
|
+
private lastError;
|
|
75
|
+
/** docId → last-seen epoch ms, for the dedupe window. */
|
|
76
|
+
private readonly seenDocs;
|
|
77
|
+
constructor(definition: ConnectorSkillDefinition, options: ConnectorSkillOptions);
|
|
78
|
+
describe(): DatasourceSkillDescriptor;
|
|
79
|
+
polling(): PollingMetadata;
|
|
80
|
+
index(): Promise<DatasourceIndexResult>;
|
|
81
|
+
retrievalMethods(): readonly RetrievalMethod[];
|
|
82
|
+
describeSources(): readonly SourceDescription[];
|
|
83
|
+
skillManifest(): DatasourceSkillManifest;
|
|
84
|
+
private applyDedupeWindow;
|
|
85
|
+
private fail;
|
|
86
|
+
}
|
|
87
|
+
interface ConnectorLexicalMethodOptions {
|
|
88
|
+
readonly skillName: string;
|
|
89
|
+
readonly skillType: string;
|
|
90
|
+
readonly instanceId: string;
|
|
91
|
+
readonly tags: readonly string[];
|
|
92
|
+
readonly store: DatasourceChunkStore;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Lexical retrieval over a connector skill's chunk store. Failures collapse
|
|
96
|
+
* to an empty result set; retrieval never throws. Sources are opaque
|
|
97
|
+
* `/<skill>/<instance>/chunks/<chunk-id>` paths and are matched against both
|
|
98
|
+
* the user scope and the trusted allowed scopes.
|
|
99
|
+
*/
|
|
100
|
+
export declare class ConnectorLexicalMethod implements RetrievalMethod {
|
|
101
|
+
private readonly options;
|
|
102
|
+
constructor(options: ConnectorLexicalMethodOptions);
|
|
103
|
+
describe(): RetrievalMethodDescriptor;
|
|
104
|
+
retrieve(query: string, options: RetrievalOptions): Promise<RetrievalResult[]>;
|
|
105
|
+
private matchesScope;
|
|
106
|
+
}
|
|
107
|
+
export {};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connector contract shared by the built-in datasource skills (Slack, Discord,
|
|
3
|
+
* Notion, GitHub, Google Drive, Gmail/IMAP, local mail exports,
|
|
4
|
+
* RSS/news).
|
|
5
|
+
*
|
|
6
|
+
* A *connector* is the trusted, server-configured bridge to one external
|
|
7
|
+
* system. It fetches documents for indexing and NEVER throws — every failure
|
|
8
|
+
* is reported as a discriminated `ok: false` result with a coarse
|
|
9
|
+
* {@link ConnectorFailureReason} and a traceable diagnostic message.
|
|
10
|
+
* Connectors are constructed from server-supplied configuration only;
|
|
11
|
+
* model/tool arguments never reach a connector.
|
|
12
|
+
*/
|
|
13
|
+
import type { DatasourceDiagnosticCode } from "./types.js";
|
|
14
|
+
/** Coarse failure classes a connector can report. */
|
|
15
|
+
export type ConnectorFailureReason = "not-configured" | "auth" | "permission" | "rate-limited" | "unavailable" | "api-error" | "invalid-data" | "empty";
|
|
16
|
+
/**
|
|
17
|
+
* One document fetched from the external system. `docId` and `hierarchy`
|
|
18
|
+
* segments are sanitized into opaque slash-safe segments before they become
|
|
19
|
+
* part of a source path.
|
|
20
|
+
*/
|
|
21
|
+
export interface ConnectorDocument {
|
|
22
|
+
/** Stable, unique id within the connector instance (pre-sanitization). */
|
|
23
|
+
readonly docId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional hierarchy segments under the instance root, e.g.
|
|
26
|
+
* `["channels", "general"]` for a Slack channel or
|
|
27
|
+
* `["folders", "projects"]` for a vault folder.
|
|
28
|
+
*/
|
|
29
|
+
readonly hierarchy?: readonly string[];
|
|
30
|
+
readonly title?: string;
|
|
31
|
+
readonly content: string;
|
|
32
|
+
/** Epoch milliseconds of the document's own timestamp when known. */
|
|
33
|
+
readonly publishedAt?: number;
|
|
34
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
35
|
+
}
|
|
36
|
+
export interface ConnectorFetchOk {
|
|
37
|
+
readonly ok: true;
|
|
38
|
+
readonly documents: readonly ConnectorDocument[];
|
|
39
|
+
/** Sanitized, path/PII-opaque warning strings. */
|
|
40
|
+
readonly warnings?: readonly string[];
|
|
41
|
+
}
|
|
42
|
+
export interface ConnectorFetchFail {
|
|
43
|
+
readonly ok: false;
|
|
44
|
+
readonly reason: ConnectorFailureReason;
|
|
45
|
+
/** Sanitized, path/PII-opaque failure message. */
|
|
46
|
+
readonly message?: string;
|
|
47
|
+
}
|
|
48
|
+
export type ConnectorFetchResult = ConnectorFetchOk | ConnectorFetchFail;
|
|
49
|
+
/**
|
|
50
|
+
* The trusted bridge to one external system. Implementations never throw from
|
|
51
|
+
* `fetch` — they return an `ok: false` result instead.
|
|
52
|
+
*/
|
|
53
|
+
export interface DatasourceConnector {
|
|
54
|
+
fetch(signal?: AbortSignal): Promise<ConnectorFetchResult>;
|
|
55
|
+
}
|
|
56
|
+
/** Map a connector failure reason onto the datasource diagnostic union. */
|
|
57
|
+
export declare function connectorFailureToDiagnosticCode(reason: ConnectorFailureReason): DatasourceDiagnosticCode;
|
|
58
|
+
/**
|
|
59
|
+
* Bound free-form diagnostic text: trimmed and capped at 500 characters.
|
|
60
|
+
* Diagnostic messages are passed through verbatim (paths, account ids, and
|
|
61
|
+
* all) so failures stay traceable; privacy is the operator's responsibility
|
|
62
|
+
* (run AutoRAG with a local LLM if diagnostics must not leave the machine).
|
|
63
|
+
*/
|
|
64
|
+
export declare function boundDiagnosticText(value: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Sanitize an arbitrary string into a slash-safe source-path segment.
|
|
67
|
+
* Unicode letters/digits (e.g. Hangul channel or folder names) are kept so
|
|
68
|
+
* scopes stay human-readable; separators, punctuation, and control chars
|
|
69
|
+
* collapse to `-`. When sanitization loses information, a short hash of the
|
|
70
|
+
* original value is appended so distinct inputs stay distinct.
|
|
71
|
+
*/
|
|
72
|
+
export declare function sanitizeIdSegment(value: string): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { CrawlerCliOptions, CrawlerProfile, CrawlerSearchOptions, CrawlerSearchResult, CrawlerSyncResult } from "./crawler-types.js";
|
|
2
|
+
export declare class CrawlerCliClient {
|
|
3
|
+
private readonly profile;
|
|
4
|
+
private readonly options;
|
|
5
|
+
constructor(profile: CrawlerProfile, options?: CrawlerCliOptions);
|
|
6
|
+
sync(signal?: AbortSignal): Promise<CrawlerSyncResult>;
|
|
7
|
+
search(query: string, options?: CrawlerSearchOptions): Promise<CrawlerSearchResult>;
|
|
8
|
+
private run;
|
|
9
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { RetrievalMethod } from "../retrieval/types.js";
|
|
2
|
+
import type { CrawlerSearchOptions, CrawlerSearchResult, CrawlerSyncResult } from "./crawler-types.js";
|
|
3
|
+
import type { DatasourceIndexResult, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, PollingMetadata, SourceDescription } from "./types.js";
|
|
4
|
+
export interface CrawlerSkillClient {
|
|
5
|
+
sync(signal?: AbortSignal): Promise<CrawlerSyncResult>;
|
|
6
|
+
search(query: string, options?: CrawlerSearchOptions): Promise<CrawlerSearchResult>;
|
|
7
|
+
}
|
|
8
|
+
export interface CrawlerDatasourceDefinition {
|
|
9
|
+
readonly datasourceId: string;
|
|
10
|
+
readonly skillType: string;
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly defaultTags: readonly string[];
|
|
13
|
+
readonly contentType: string;
|
|
14
|
+
readonly manifestDescription: string;
|
|
15
|
+
readonly backendName: string;
|
|
16
|
+
}
|
|
17
|
+
export interface CrawlerDatasourceSkillOptions {
|
|
18
|
+
readonly client: CrawlerSkillClient;
|
|
19
|
+
readonly instanceId?: string;
|
|
20
|
+
readonly instances?: readonly string[];
|
|
21
|
+
readonly pollingIntervalMs?: number;
|
|
22
|
+
readonly tags?: readonly string[];
|
|
23
|
+
readonly lastIndexedAt?: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class CrawlerDatasourceSkill implements DatasourceSkill {
|
|
26
|
+
private readonly definition;
|
|
27
|
+
private readonly client;
|
|
28
|
+
private readonly instanceId;
|
|
29
|
+
private readonly instances;
|
|
30
|
+
private readonly pollingIntervalMs;
|
|
31
|
+
private readonly tags;
|
|
32
|
+
private lastIndexedAt;
|
|
33
|
+
constructor(definition: CrawlerDatasourceDefinition, options: CrawlerDatasourceSkillOptions);
|
|
34
|
+
describe(): DatasourceSkillDescriptor;
|
|
35
|
+
polling(): PollingMetadata;
|
|
36
|
+
index(): Promise<DatasourceIndexResult>;
|
|
37
|
+
retrievalMethods(): readonly RetrievalMethod[];
|
|
38
|
+
describeSources(): readonly SourceDescription[];
|
|
39
|
+
skillManifest(): DatasourceSkillManifest;
|
|
40
|
+
private fail;
|
|
41
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { RetrievalOptions } from "../retrieval/types.js";
|
|
2
|
+
export type CrawlerFailureReason = "binary-missing" | "nonzero-exit" | "spawn-error" | "timeout" | "aborted" | "stdout-too-large" | "stderr-too-large" | "invalid-output";
|
|
3
|
+
export interface CrawlerFailure {
|
|
4
|
+
readonly ok: false;
|
|
5
|
+
readonly reason: CrawlerFailureReason;
|
|
6
|
+
readonly stdout: string;
|
|
7
|
+
readonly stderr: string;
|
|
8
|
+
readonly code: number | null;
|
|
9
|
+
}
|
|
10
|
+
export interface CrawlerHit {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly content: string;
|
|
13
|
+
readonly score: number;
|
|
14
|
+
readonly title?: string;
|
|
15
|
+
readonly hierarchy?: readonly string[];
|
|
16
|
+
readonly publishedAt?: number;
|
|
17
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
18
|
+
}
|
|
19
|
+
export interface CrawlerSyncOk {
|
|
20
|
+
readonly ok: true;
|
|
21
|
+
readonly count: number;
|
|
22
|
+
readonly stdout: string;
|
|
23
|
+
readonly stderr: string;
|
|
24
|
+
readonly code: number;
|
|
25
|
+
}
|
|
26
|
+
export interface CrawlerSearchOk {
|
|
27
|
+
readonly ok: true;
|
|
28
|
+
readonly hits: readonly CrawlerHit[];
|
|
29
|
+
readonly stdout: string;
|
|
30
|
+
readonly stderr: string;
|
|
31
|
+
readonly code: number;
|
|
32
|
+
}
|
|
33
|
+
export type CrawlerSyncResult = CrawlerSyncOk | CrawlerFailure;
|
|
34
|
+
export type CrawlerSearchResult = CrawlerSearchOk | CrawlerFailure;
|
|
35
|
+
export type CrawlerSearchOptions = RetrievalOptions;
|
|
36
|
+
export interface CrawlerCliOptions {
|
|
37
|
+
readonly binaryPath?: string;
|
|
38
|
+
readonly databasePath?: string;
|
|
39
|
+
readonly sourcePath?: string;
|
|
40
|
+
readonly configPath?: string;
|
|
41
|
+
readonly syncSource?: string;
|
|
42
|
+
readonly timeoutMs?: number;
|
|
43
|
+
readonly maxBufferBytes?: number;
|
|
44
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
45
|
+
}
|
|
46
|
+
export interface CrawlerProfile {
|
|
47
|
+
readonly binaryName: string;
|
|
48
|
+
readonly allowedEnvPrefixes: readonly string[];
|
|
49
|
+
readonly syncArgs: (options: CrawlerCliOptions) => readonly string[];
|
|
50
|
+
readonly searchArgs: (options: CrawlerCliOptions, query: string, topK: number) => readonly string[];
|
|
51
|
+
readonly parseSyncCount: (stdout: string) => number | undefined;
|
|
52
|
+
readonly parseHits: (stdout: string) => readonly CrawlerHit[] | undefined;
|
|
53
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal HTTP helper shared by the API-backed datasource connectors.
|
|
3
|
+
*
|
|
4
|
+
* Every request is bounded by a timeout, honors an optional outer abort
|
|
5
|
+
* signal, and maps failures onto the coarse {@link ConnectorFailureReason}
|
|
6
|
+
* union with short, path/PII-opaque messages (never URLs, tokens, or bodies).
|
|
7
|
+
*/
|
|
8
|
+
import type { ConnectorFailureReason } from "./connector.js";
|
|
9
|
+
export interface HttpRequestOptions {
|
|
10
|
+
readonly fetchImpl?: typeof fetch;
|
|
11
|
+
readonly timeoutMs?: number;
|
|
12
|
+
readonly signal?: AbortSignal;
|
|
13
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
14
|
+
readonly method?: string;
|
|
15
|
+
readonly body?: string;
|
|
16
|
+
}
|
|
17
|
+
export type HttpJsonResult = {
|
|
18
|
+
readonly ok: true;
|
|
19
|
+
readonly status: number;
|
|
20
|
+
readonly json: unknown;
|
|
21
|
+
} | {
|
|
22
|
+
readonly ok: false;
|
|
23
|
+
readonly reason: ConnectorFailureReason;
|
|
24
|
+
readonly message: string;
|
|
25
|
+
};
|
|
26
|
+
export type HttpTextResult = {
|
|
27
|
+
readonly ok: true;
|
|
28
|
+
readonly status: number;
|
|
29
|
+
readonly text: string;
|
|
30
|
+
} | {
|
|
31
|
+
readonly ok: false;
|
|
32
|
+
readonly reason: ConnectorFailureReason;
|
|
33
|
+
readonly message: string;
|
|
34
|
+
};
|
|
35
|
+
/** Map an HTTP status code onto a connector failure reason. */
|
|
36
|
+
export declare function statusToReason(status: number): ConnectorFailureReason;
|
|
37
|
+
/** GET/POST a URL and return the body text; never throws. */
|
|
38
|
+
export declare function httpText(url: string, options?: HttpRequestOptions): Promise<HttpTextResult>;
|
|
39
|
+
/** GET/POST a URL and parse the body as JSON; never throws. */
|
|
40
|
+
export declare function httpJson(url: string, options?: HttpRequestOptions): Promise<HttpJsonResult>;
|
|
41
|
+
/** Narrowing helpers for defensive JSON traversal. */
|
|
42
|
+
export declare function asRecord(value: unknown): Record<string, unknown> | undefined;
|
|
43
|
+
export declare function asArray(value: unknown): readonly unknown[];
|
|
44
|
+
export declare function asString(value: unknown): string | undefined;
|
|
45
|
+
export declare function asNumber(value: unknown): number | undefined;
|
|
46
|
+
/** Parse a date-ish string to epoch ms, or undefined. */
|
|
47
|
+
export declare function parseEpochMs(value: unknown): number | undefined;
|
|
48
|
+
/** Resolve an auth token from explicit config or an environment variable name. */
|
|
49
|
+
export declare function resolveToken(token: string | undefined, tokenEnv: string | undefined): string | undefined;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
export { DatasourceAccessContext, type DatasourceAccessContextOptions } from "./access-context.js";
|
|
2
|
+
export { DatasourceChunkStore, type DatasourceChunkStoreOptions, datasourceChunkStorePath, type ScoredChunk, type StoredChunk, } from "./chunk-store.js";
|
|
3
|
+
export { boundDiagnosticText, type ConnectorDocument, type ConnectorFailureReason, type ConnectorFetchFail, type ConnectorFetchOk, type ConnectorFetchResult, connectorFailureToDiagnosticCode, type DatasourceConnector, sanitizeIdSegment, } from "./connector.js";
|
|
4
|
+
export { ConnectorDatasourceSkill, ConnectorLexicalMethod, type ConnectorSkillDefinition, type ConnectorSkillOptions, } from "./connector-skill.js";
|
|
2
5
|
export { mapDatasourceDiagnostic, mapDatasourceDiagnostics } from "./diagnostics.js";
|
|
3
6
|
export { type CronParseResult, isDue, parseCronExpr } from "./polling.js";
|
|
4
7
|
export { DatasourceSkillRegistry, type RegisteredDatasourceSkill } from "./registry.js";
|
|
5
8
|
export { DatasourceResultFilter, type ResultsByMethod } from "./result-filter.js";
|
|
6
9
|
export { buildDatasourceChunkSource, buildDatasourceInstanceSource, DATASOURCE_CHUNKS_SEGMENT, datasourceSourceHasFragment, datasourceSourcePath, isDatasourceSource, matchesDatasourceScope, matchesVirtualPathScope, normalizeVirtualPath, } from "./scope.js";
|
|
10
|
+
export { DEFAULT_DISCRAWL_EMBEDDING_MODEL, DEFAULT_DISCRAWL_MODE, DEFAULT_DISCRAWL_SOURCE, DiscrawlClient, type DiscrawlFailureReason, DiscrawlFtsMethod, DiscrawlHybridMethod, type DiscrawlOptions, type DiscrawlSearchHit, type DiscrawlSearchMode, type DiscrawlSearchOptions, type DiscrawlSearchResult, DiscrawlSemanticMethod, DiscrawlSkill, type DiscrawlSkillClient, type DiscrawlSkillOptions, type DiscrawlSourceKind, ENGLISH_ONLY_EMBEDDING_MODELS, } from "./skills/discrawl/index.js";
|
|
11
|
+
export { BUILTIN_DATASOURCE_SKILL_NAMES, type BuildDatasourceSkillsResult, buildDatasourceSkills, type DatasourceSkillConfig, type DatasourcesConfig, } from "./skills/factory.js";
|
|
12
|
+
export { GDriveConnector, type GDriveConnectorOptions, GDriveSkill, type GDriveSkillOptions, } from "./skills/gdrive/index.js";
|
|
13
|
+
export { GitHubConnector, type GitHubConnectorOptions, GitHubSkill, type GitHubSkillOptions, } from "./skills/github/index.js";
|
|
14
|
+
export { GmailConnector, type GmailConnectorOptions, GmailSkill, type GmailSkillOptions, } from "./skills/gmail/index.js";
|
|
7
15
|
export type { KatokFailureReason, KatokHit, KatokOptions, KatokSearchMode, KatokSearchOptions, KatokSearchResult, KatokSkillClient, KatokSkillOptions, } from "./skills/katok/index.js";
|
|
8
16
|
export { KatokBm25Method, KatokClient, KatokSemanticMethod, KatokSkill } from "./skills/katok/index.js";
|
|
17
|
+
export { MailExportConnector, type MailExportConnectorOptions, MailExportSkill, type MailExportSkillOptions, } from "./skills/mail-export/index.js";
|
|
18
|
+
export { NotcrawlClient, type NotcrawlOptions, NotionSkill, type NotionSkillOptions, } from "./skills/notion/index.js";
|
|
19
|
+
export { ObsidianBm25Method, ObsidianSemanticMethod, ObsidianSkill, type ObsidianSkillClient, type ObsidianSkillOptions, QmdClient, type QmdOptions, type QmdSearchHit, type QmdSearchMode, type QmdSearchResult, } from "./skills/obsidian/index.js";
|
|
20
|
+
export { RssConnector, type RssConnectorOptions, type RssFeedConfig, RssSkill, type RssSkillOptions, } from "./skills/rss/index.js";
|
|
21
|
+
export { SlackSkill, type SlackSkillOptions, SlacrawlClient, type SlacrawlOptions, } from "./skills/slack/index.js";
|
|
22
|
+
export { SpotlightConnector, type SpotlightConnectorOptions, SpotlightSkill, type SpotlightSkillOptions, } from "./skills/spotlight/index.js";
|
|
23
|
+
export { TelecrawlClient, type TelecrawlOptions, TelecrawlSkill, type TelecrawlSkillOptions, } from "./skills/telecrawl/index.js";
|
|
24
|
+
export { WacrawlClient, type WacrawlOptions, WacrawlSkill, type WacrawlSkillOptions } from "./skills/wacrawl/index.js";
|
|
9
25
|
export type { DatasourceAccessible, DatasourceDiagnostic, DatasourceDiagnosticCode, DatasourceIndexFail, DatasourceIndexOk, DatasourceIndexResult, DatasourceInstance, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, PollingMetadata, SourceDescription, } from "./types.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { DiscrawlDoctorResult, DiscrawlEmbedResult, DiscrawlOptions, DiscrawlSearchMode, DiscrawlSearchOptions, DiscrawlSearchResult, DiscrawlStatusResult, DiscrawlSyncResult } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Thin external `discrawl` CLI wrapper. Every method spawns the `discrawl`
|
|
4
|
+
* binary as a child process, parses JSON from stdout, and returns a
|
|
5
|
+
* discriminated ok/fail union. No method throws for expected failures (missing
|
|
6
|
+
* binary, rejected user token, CLI nonzero exit, timeout, oversized output, or
|
|
7
|
+
* invalid JSON). The client never opens the Discord archive database directly.
|
|
8
|
+
*
|
|
9
|
+
* `--json` is a *global* discrawl flag and must precede the subcommand;
|
|
10
|
+
* `discrawl search --json` is rejected by the CLI as an unknown flag.
|
|
11
|
+
*/
|
|
12
|
+
export declare class DiscrawlClient {
|
|
13
|
+
private readonly options;
|
|
14
|
+
constructor(options?: DiscrawlOptions);
|
|
15
|
+
doctor(signal?: AbortSignal): Promise<DiscrawlDoctorResult>;
|
|
16
|
+
status(signal?: AbortSignal): Promise<DiscrawlStatusResult>;
|
|
17
|
+
sync(signal?: AbortSignal): Promise<DiscrawlSyncResult>;
|
|
18
|
+
embed(limit?: number, signal?: AbortSignal): Promise<DiscrawlEmbedResult>;
|
|
19
|
+
search(mode: DiscrawlSearchMode, query: string, options?: DiscrawlSearchOptions): Promise<DiscrawlSearchResult>;
|
|
20
|
+
private runJson;
|
|
21
|
+
private run;
|
|
22
|
+
}
|
|
23
|
+
export declare function discrawlWorkspace(options: DiscrawlOptions): string | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DiscrawlOptions } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Creates or updates AutoRAG's workspace-local discrawl config.
|
|
4
|
+
*
|
|
5
|
+
* Only the fields AutoRAG owns are changed: the workspace database path and
|
|
6
|
+
* embedding enablement/provider/model. Existing operator settings such as
|
|
7
|
+
* guilds, source filters, sync policy, and search mode are preserved.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ensureManagedDiscrawlConfig(configPath: string, databasePath: string, options: DiscrawlOptions): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DiscrawlClient, discrawlWorkspace } from "./client.js";
|
|
2
|
+
export { DiscrawlFtsMethod, DiscrawlHybridMethod, type DiscrawlMethodOptions, type DiscrawlSearchClient, DiscrawlSemanticMethod, } from "./methods.js";
|
|
3
|
+
export { DISCRAWL_SOURCE_KIND, discrawlConfigPath, discrawlDatabasePath, discrawlDatasourceRoot, discrawlSourcePath, parseDiscrawlSourcePath, } from "./paths.js";
|
|
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, DEFAULT_DISCRAWL_SOURCE, DEFAULT_DISCRAWL_TIMEOUT_MS, type DiscrawlDoctorInfo, type DiscrawlDoctorResult, type DiscrawlEmbedInfo, type DiscrawlEmbedResult, type DiscrawlFailure, type DiscrawlFailureReason, type DiscrawlMessage, type DiscrawlOptions, type DiscrawlSearchHit, type DiscrawlSearchMode, type DiscrawlSearchOptions, type DiscrawlSearchResult, type DiscrawlSourceKind, type DiscrawlStatusInfo, type DiscrawlStatusResult, type DiscrawlSyncInfo, type DiscrawlSyncResult, ENGLISH_ONLY_EMBEDDING_MODELS, } from "./types.js";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { RetrievalMethod, RetrievalMethodDescriptor, RetrievalOptions, RetrievalResult } from "../../../retrieval/types.js";
|
|
2
|
+
import type { DiscrawlSearchMode, DiscrawlSearchOptions, DiscrawlSearchResult } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Narrow client surface required by the Discord retrieval methods. The real
|
|
5
|
+
* {@link DiscrawlClient} satisfies this structurally; tests may stub it.
|
|
6
|
+
*/
|
|
7
|
+
export interface DiscrawlSearchClient {
|
|
8
|
+
search(mode: DiscrawlSearchMode, query: string, options?: DiscrawlSearchOptions): Promise<DiscrawlSearchResult>;
|
|
9
|
+
}
|
|
10
|
+
export interface DiscrawlMethodOptions {
|
|
11
|
+
readonly client: DiscrawlSearchClient;
|
|
12
|
+
readonly instanceId: string;
|
|
13
|
+
readonly tags?: readonly string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Lexical (SQLite FTS5) retrieval over a Discord archive via the external
|
|
17
|
+
* `discrawl` CLI. All client failures collapse to an empty result set;
|
|
18
|
+
* retrieval never throws.
|
|
19
|
+
*/
|
|
20
|
+
export declare class DiscrawlFtsMethod implements RetrievalMethod {
|
|
21
|
+
private readonly client;
|
|
22
|
+
private readonly instanceId;
|
|
23
|
+
private readonly tags;
|
|
24
|
+
constructor(options: DiscrawlMethodOptions);
|
|
25
|
+
describe(): RetrievalMethodDescriptor;
|
|
26
|
+
retrieve(query: string, options: RetrievalOptions): Promise<RetrievalResult[]>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Semantic (vector) retrieval over a Discord archive via the external
|
|
30
|
+
* `discrawl` CLI. Requires a configured embedding provider and a completed
|
|
31
|
+
* `discrawl embed` pass; when either is missing the CLI exits non-zero and
|
|
32
|
+
* this method returns no results rather than throwing.
|
|
33
|
+
*/
|
|
34
|
+
export declare class DiscrawlSemanticMethod implements RetrievalMethod {
|
|
35
|
+
private readonly client;
|
|
36
|
+
private readonly instanceId;
|
|
37
|
+
private readonly tags;
|
|
38
|
+
constructor(options: DiscrawlMethodOptions);
|
|
39
|
+
describe(): RetrievalMethodDescriptor;
|
|
40
|
+
retrieve(query: string, options: RetrievalOptions): Promise<RetrievalResult[]>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Hybrid retrieval (FTS5 + semantic, deduplicated by message id). This is the
|
|
44
|
+
* preferred Discord method: discrawl's FTS index welds words across newlines
|
|
45
|
+
* into one token, so semantic recall is what covers terms FTS cannot reach.
|
|
46
|
+
* See AutoRAG issue #1413.
|
|
47
|
+
*/
|
|
48
|
+
export declare class DiscrawlHybridMethod implements RetrievalMethod {
|
|
49
|
+
private readonly client;
|
|
50
|
+
private readonly instanceId;
|
|
51
|
+
private readonly tags;
|
|
52
|
+
constructor(options: DiscrawlMethodOptions);
|
|
53
|
+
describe(): RetrievalMethodDescriptor;
|
|
54
|
+
retrieve(query: string, options: RetrievalOptions): Promise<RetrievalResult[]>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const AUTORAG_DIRNAME = ".autorag";
|
|
2
|
+
export declare const DATASOURCES_DIRNAME = "datasources";
|
|
3
|
+
export declare const DISCRAWL_DATASOURCE_DIRNAME = "discrawl";
|
|
4
|
+
/** Logical datasource kind for source identifiers. */
|
|
5
|
+
export declare const DISCRAWL_SOURCE_KIND: "discord";
|
|
6
|
+
/**
|
|
7
|
+
* Root directory for discrawl-managed state under a workspace. This is where
|
|
8
|
+
* the external `discrawl` CLI stores its SQLite archive, FTS index, and
|
|
9
|
+
* message vectors.
|
|
10
|
+
*/
|
|
11
|
+
export declare function discrawlDatasourceRoot(workspaceRoot: string): string;
|
|
12
|
+
/** Config file discrawl reads for embedding provider/model settings. */
|
|
13
|
+
export declare function discrawlConfigPath(workspaceRoot: string): string;
|
|
14
|
+
/** SQLite archive maintained by the discrawl CLI. */
|
|
15
|
+
export declare function discrawlDatabasePath(workspaceRoot: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Builds the slash-hierarchical source identifier for a single archived
|
|
18
|
+
* message. Discord message ids are stable snowflakes, so these sources stay
|
|
19
|
+
* traceable across re-syncs.
|
|
20
|
+
*/
|
|
21
|
+
export declare function discrawlSourcePath(instanceId: string, messageId: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Parses a discrawl source identifier back into its components. Returns
|
|
24
|
+
* `undefined` for malformed or non-discord sources so deny decisions stay
|
|
25
|
+
* explicit rather than undefined-as-deny.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseDiscrawlSourcePath(source: string): {
|
|
28
|
+
readonly instanceId: string;
|
|
29
|
+
readonly messageId: string;
|
|
30
|
+
} | undefined;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { RetrievalMethod } from "../../../retrieval/types.js";
|
|
2
|
+
import type { DatasourceIndexResult, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, PollingMetadata, SourceDescription } from "../../types.js";
|
|
3
|
+
import { type DiscrawlSearchClient } from "./methods.js";
|
|
4
|
+
import type { DiscrawlDoctorResult, DiscrawlEmbedResult, DiscrawlSearchMode, DiscrawlSyncResult } from "./types.js";
|
|
5
|
+
export interface DiscrawlSkillClient extends DiscrawlSearchClient {
|
|
6
|
+
doctor(): Promise<DiscrawlDoctorResult>;
|
|
7
|
+
sync(): Promise<DiscrawlSyncResult>;
|
|
8
|
+
embed(limit?: number): Promise<DiscrawlEmbedResult>;
|
|
9
|
+
}
|
|
10
|
+
export interface DiscrawlSkillOptions {
|
|
11
|
+
readonly client: DiscrawlSkillClient;
|
|
12
|
+
readonly instanceId?: string;
|
|
13
|
+
readonly instances?: readonly string[];
|
|
14
|
+
readonly pollingIntervalMs?: number;
|
|
15
|
+
readonly tags?: readonly string[];
|
|
16
|
+
readonly lastIndexedAt?: number;
|
|
17
|
+
readonly embeddingModel?: string;
|
|
18
|
+
readonly defaultMode?: DiscrawlSearchMode;
|
|
19
|
+
/** Max messages embedded per index pass. Undefined drains the whole backlog. */
|
|
20
|
+
readonly embedLimit?: number;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Discord datasource skill backed by the external `discrawl` CLI.
|
|
24
|
+
*
|
|
25
|
+
* Mirrors the katok model: the CLI owns the archive, the FTS5 index, and the
|
|
26
|
+
* vector index; AutoRAG only spawns it and maps results. AutoRAG never calls
|
|
27
|
+
* the Discord API itself and never reads the Discord Desktop cache directly.
|
|
28
|
+
*
|
|
29
|
+
* `index()` runs the CLI's two-phase pipeline — `sync` (incremental, cursor
|
|
30
|
+
* based) then `embed` (drains the embedding queue) — so a poll costs work
|
|
31
|
+
* proportional to what changed rather than to archive size.
|
|
32
|
+
*/
|
|
33
|
+
export declare class DiscrawlSkill implements DatasourceSkill {
|
|
34
|
+
private readonly client;
|
|
35
|
+
private readonly instanceId;
|
|
36
|
+
private readonly instances;
|
|
37
|
+
private readonly pollingIntervalMs;
|
|
38
|
+
private readonly tags;
|
|
39
|
+
private readonly embeddingModel;
|
|
40
|
+
private readonly defaultMode;
|
|
41
|
+
private readonly embedLimit;
|
|
42
|
+
private lastIndexedAt;
|
|
43
|
+
constructor(options: DiscrawlSkillOptions);
|
|
44
|
+
describe(): DatasourceSkillDescriptor;
|
|
45
|
+
polling(): PollingMetadata;
|
|
46
|
+
index(): Promise<DatasourceIndexResult>;
|
|
47
|
+
retrievalMethods(): readonly RetrievalMethod[];
|
|
48
|
+
describeSources(): readonly SourceDescription[];
|
|
49
|
+
skillManifest(): DatasourceSkillManifest;
|
|
50
|
+
private runEmbed;
|
|
51
|
+
/**
|
|
52
|
+
* English-only embedders map non-English text into one narrow similarity
|
|
53
|
+
* band, so semantic search degrades to noise without ever erroring. Surfacing
|
|
54
|
+
* it as a diagnostic keeps that failure visible. See AutoRAG issue #1414.
|
|
55
|
+
*/
|
|
56
|
+
private englishOnlyModelDiagnostic;
|
|
57
|
+
private fail;
|
|
58
|
+
}
|