@autorag/librarian 2.1.0 → 2.3.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.
Files changed (79) hide show
  1. package/README.md +155 -55
  2. package/dist/agent/agent.d.ts +27 -41
  3. package/dist/agent/bash-tool.d.ts +0 -11
  4. package/dist/agent/dupey-tool.d.ts +15 -0
  5. package/dist/agent/emit-results-tool.d.ts +14 -0
  6. package/dist/agent/index.d.ts +1 -0
  7. package/dist/agent/local-model.d.ts +12 -0
  8. package/dist/agent/search-bm25-tool.d.ts +1 -1
  9. package/dist/agent/search-documents.d.ts +1 -1
  10. package/dist/agent/search-minsync-tool.d.ts +1 -1
  11. package/dist/agent/system-prompt.d.ts +1 -2
  12. package/dist/cli/commands/duplicates.d.ts +4 -0
  13. package/dist/cli/commands/health.d.ts +9 -65
  14. package/dist/cli/commands/init.d.ts +1 -1
  15. package/dist/cli/commands/search.d.ts +2 -2
  16. package/dist/cli/config.d.ts +10 -14
  17. package/dist/cli/index.js +10652 -9947
  18. package/dist/datasource/aliased-skill.d.ts +28 -0
  19. package/dist/datasource/chunk-store.d.ts +2 -0
  20. package/dist/datasource/connector-skill.d.ts +4 -1
  21. package/dist/datasource/connector.d.ts +5 -1
  22. package/dist/datasource/crawler-client.d.ts +9 -0
  23. package/dist/datasource/crawler-skill.d.ts +47 -0
  24. package/dist/datasource/crawler-types.d.ts +53 -0
  25. package/dist/datasource/index.d.ts +8 -4
  26. package/dist/datasource/skills/cloud-drive/index.d.ts +1 -0
  27. package/dist/datasource/skills/cloud-drive/skill.d.ts +14 -0
  28. package/dist/datasource/skills/discrawl/client.d.ts +23 -0
  29. package/dist/datasource/skills/discrawl/config.d.ts +9 -0
  30. package/dist/datasource/skills/discrawl/index.d.ts +5 -0
  31. package/dist/datasource/skills/discrawl/methods.d.ts +55 -0
  32. package/dist/datasource/skills/discrawl/paths.d.ts +30 -0
  33. package/dist/datasource/skills/discrawl/skill.d.ts +61 -0
  34. package/dist/datasource/skills/discrawl/types.d.ts +198 -0
  35. package/dist/datasource/skills/factory.d.ts +7 -0
  36. package/dist/datasource/skills/gdrive/rclone-connector.d.ts +16 -24
  37. package/dist/datasource/skills/notion/index.d.ts +15 -2
  38. package/dist/datasource/skills/obsidian/client.d.ts +15 -0
  39. package/dist/datasource/skills/obsidian/index.d.ts +6 -2
  40. package/dist/datasource/skills/obsidian/methods.d.ts +26 -0
  41. package/dist/datasource/skills/obsidian/paths.d.ts +27 -0
  42. package/dist/datasource/skills/obsidian/skill.d.ts +41 -17
  43. package/dist/datasource/skills/obsidian/types.d.ts +90 -0
  44. package/dist/datasource/skills/slack/index.d.ts +15 -2
  45. package/dist/datasource/skills/telecrawl/index.d.ts +15 -0
  46. package/dist/datasource/skills/wacrawl/index.d.ts +15 -0
  47. package/dist/dupey/cli.d.ts +40 -0
  48. package/dist/dupey/filter.d.ts +8 -0
  49. package/dist/dupey/index.d.ts +2 -0
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.js +7774 -7409
  52. package/dist/memory/check-memory-tool.d.ts +1 -0
  53. package/dist/memory/index.d.ts +2 -2
  54. package/dist/memory/memory.d.ts +33 -3
  55. package/dist/memory/renderer.d.ts +2 -1
  56. package/dist/mirror/sync.d.ts +3 -1
  57. package/dist/observability/run-log.d.ts +1 -26
  58. package/dist/process/portable-spawn.d.ts +10 -0
  59. package/dist/retrieval/merger.d.ts +1 -0
  60. package/dist/retrieval/scope.d.ts +10 -0
  61. package/package.json +21 -20
  62. package/skills/autorag/SKILL.md +59 -96
  63. package/skills/autorag-setup/SKILL.md +144 -378
  64. package/dist/datasource/skills/discord/connector.d.ts +0 -30
  65. package/dist/datasource/skills/discord/index.d.ts +0 -2
  66. package/dist/datasource/skills/discord/skill.d.ts +0 -20
  67. package/dist/datasource/skills/notion/connector.d.ts +0 -26
  68. package/dist/datasource/skills/notion/skill.d.ts +0 -20
  69. package/dist/datasource/skills/obsidian/connector.d.ts +0 -22
  70. package/dist/datasource/skills/slack/connector.d.ts +0 -28
  71. package/dist/datasource/skills/slack/skill.d.ts +0 -20
  72. package/dist/subagents/contracts.d.ts +0 -90
  73. package/dist/subagents/dispatch-templates.d.ts +0 -104
  74. package/dist/subagents/dispatch-validation.d.ts +0 -169
  75. package/dist/subagents/explorer-tools-extension.d.ts +0 -4
  76. package/dist/subagents/explorer-tools-extension.js +0 -130
  77. package/dist/subagents/local-models.d.ts +0 -14
  78. package/dist/subagents/model-policy.d.ts +0 -31
  79. package/dist/subagents/runtime.d.ts +0 -52
@@ -11,11 +11,18 @@ import type { DatasourceSkill } from "../types.js";
11
11
  /** One configured datasource entry (the trusted `datasources.<name>` value). */
12
12
  export interface DatasourceSkillConfig {
13
13
  readonly enabled?: boolean;
14
+ /** Built-in datasource template used when the config key is a connection alias. */
15
+ readonly type?: string;
14
16
  readonly instanceId?: string;
15
17
  readonly pollingIntervalMs?: number;
16
18
  readonly tags?: readonly string[];
17
19
  /** Connector-specific options (token env names, repos, feeds, paths, …). */
18
20
  readonly connector?: Record<string, unknown>;
21
+ /** Optional chat/channel allowlist; absent means all channels. */
22
+ readonly channels?: {
23
+ readonly ids?: readonly string[];
24
+ readonly names?: readonly string[];
25
+ };
19
26
  }
20
27
  /** The trusted `datasources` config section: skill name → config. */
21
28
  export type DatasourcesConfig = Readonly<Record<string, DatasourceSkillConfig | boolean>>;
@@ -1,15 +1,10 @@
1
1
  /**
2
- * Rclone-backed drive connector (issue #1301, rclone path).
2
+ * Provider-neutral incremental rclone mirror.
3
3
  *
4
- * Uses the external `rclone` CLI (https://rclone.org) as the trusted bridge
5
- * to Google Drive — or any of rclone's 70+ storage backends — so OAuth
6
- * setup and token refresh live entirely in `rclone config`, not here
7
- * (katok/himalaya pattern). Google Docs/Sheets are transparently exported
8
- * as text via rclone's `--drive-export-formats`. Never throws; failures map
9
- * onto the coarse connector failure union with path/PII-opaque messages.
10
- *
11
- * Listing: `rclone lsjson <remote> --recursive --files-only`
12
- * Content: `rclone cat <remote>/<path>` (bounded, text formats only)
4
+ * `lsjson` inventories a remote, a workspace manifest computes its diff, and
5
+ * only added/changed indexable files are copied into a managed mirror. The
6
+ * manifest is published only after every changed file is available, so search
7
+ * can continue using the previous completed snapshot after an interrupted run.
13
8
  */
14
9
  import type { ConnectorFetchResult, DatasourceConnector } from "../../connector.js";
15
10
  export interface RcloneRunResult {
@@ -20,27 +15,22 @@ export interface RcloneRunResult {
20
15
  }
21
16
  export type RcloneRunner = (args: readonly string[], timeoutMs: number) => Promise<RcloneRunResult>;
22
17
  export interface RcloneConnectorOptions {
23
- /** Path to the rclone binary. Default bare `rclone` PATH lookup. */
24
18
  readonly binaryPath?: string;
25
- /**
26
- * Rclone remote path, e.g. `gdrive:` or `gdrive:Team/Docs`. Required
27
- * trusted configuration (`rclone config` defines the remote).
28
- */
29
19
  readonly remote?: string;
30
- /**
31
- * Indexable file extensions (lowercase, with dot). Google Docs/Sheets
32
- * surface as these after `--drive-export-formats txt,csv`.
33
- */
20
+ readonly provider?: string;
21
+ readonly workspaceRoot?: string;
22
+ readonly instanceId?: string;
23
+ readonly skillName?: string;
34
24
  readonly extensions?: readonly string[];
35
- /** Drive export formats forwarded to rclone. Default `txt,csv`. */
25
+ readonly include?: readonly string[];
26
+ readonly exclude?: readonly string[];
36
27
  readonly exportFormats?: string;
37
- /** Max files whose contents are fetched per run. Default 200. */
38
28
  readonly maxDocuments?: number;
39
- /** Files larger than this are skipped. Default 2 MiB. */
40
29
  readonly maxBytesPerFile?: number;
41
- /** Per-spawn timeout. Default 60s (cloud listings can be slow). */
30
+ readonly concurrency?: number;
31
+ readonly bandwidthLimit?: string;
32
+ readonly dryRun?: boolean;
42
33
  readonly timeoutMs?: number;
43
- /** Injectable process runner for tests. */
44
34
  readonly runner?: RcloneRunner;
45
35
  }
46
36
  export declare class RcloneConnector implements DatasourceConnector {
@@ -48,4 +38,6 @@ export declare class RcloneConnector implements DatasourceConnector {
48
38
  private readonly runner;
49
39
  constructor(options?: RcloneConnectorOptions);
50
40
  fetch(): Promise<ConnectorFetchResult>;
41
+ private fetchIncremental;
42
+ private fetchWithoutMirror;
51
43
  }
@@ -1,2 +1,15 @@
1
- export { NotionConnector, type NotionConnectorOptions } from "./connector.js";
2
- export { NOTION_SKILL_DEFINITION, NotionSkill, type NotionSkillOptions } from "./skill.js";
1
+ import { CrawlerCliClient } from "../../crawler-client.js";
2
+ import { CrawlerDatasourceSkill, type CrawlerDatasourceSkillOptions, type CrawlerSkillClient } from "../../crawler-skill.js";
3
+ import type { CrawlerCliOptions } from "../../crawler-types.js";
4
+ export interface NotcrawlOptions extends CrawlerCliOptions {
5
+ }
6
+ export declare class NotcrawlClient extends CrawlerCliClient {
7
+ constructor(options?: NotcrawlOptions);
8
+ }
9
+ export interface NotionSkillOptions extends Omit<CrawlerDatasourceSkillOptions, "client"> {
10
+ readonly client?: CrawlerSkillClient;
11
+ readonly connectorOptions?: NotcrawlOptions;
12
+ }
13
+ export declare class NotionSkill extends CrawlerDatasourceSkill {
14
+ constructor(options?: NotionSkillOptions);
15
+ }
@@ -0,0 +1,15 @@
1
+ import type { QmdEmbedResult, QmdEnsureResult, QmdOptions, QmdSearchMode, QmdSearchOptions, QmdSearchResult, QmdUpdateResult } from "./types.js";
2
+ /**
3
+ * Thin external `qmd` CLI wrapper for Obsidian vault indexing/search.
4
+ * Every method spawns the `qmd` binary, never throws for expected failures,
5
+ * and isolates config/cache under the AutoRAG workspace.
6
+ */
7
+ export declare class QmdClient {
8
+ private readonly options;
9
+ constructor(options?: QmdOptions);
10
+ ensureCollection(signal?: AbortSignal): Promise<QmdEnsureResult>;
11
+ update(signal?: AbortSignal): Promise<QmdUpdateResult>;
12
+ embed(signal?: AbortSignal): Promise<QmdEmbedResult>;
13
+ search(mode: QmdSearchMode, query: string, options?: QmdSearchOptions): Promise<QmdSearchResult>;
14
+ private run;
15
+ }
@@ -1,2 +1,6 @@
1
- export { ObsidianConnector, type ObsidianConnectorOptions } from "./connector.js";
2
- export { OBSIDIAN_SKILL_DEFINITION, ObsidianSkill, type ObsidianSkillOptions } from "./skill.js";
1
+ export { QmdClient } from "./client.js";
2
+ export { ObsidianBm25Method, type ObsidianMethodOptions, type ObsidianSearchClient, ObsidianSemanticMethod, } from "./methods.js";
3
+ export { obsidianDatasourceRoot, obsidianQmdCacheDir, obsidianQmdConfigDir, obsidianSourcePath, parseObsidianSourcePath, stripEdgeDashes, toQmdCollectionName, } from "./paths.js";
4
+ export { ObsidianSkill, type ObsidianSkillClient, type ObsidianSkillOptions } from "./skill.js";
5
+ export type { QmdEmbedResult, QmdEnsureResult, QmdFailureReason, QmdOptions, QmdSearchHit, QmdSearchMode, QmdSearchOptions, QmdSearchResult, QmdUpdateResult, } from "./types.js";
6
+ export { DEFAULT_QMD_BINARY, DEFAULT_QMD_MAX_BUFFER_BYTES, DEFAULT_QMD_TIMEOUT_MS, } from "./types.js";
@@ -0,0 +1,26 @@
1
+ import type { RetrievalMethod, RetrievalMethodDescriptor, RetrievalOptions, RetrievalResult } from "../../../retrieval/types.js";
2
+ import type { QmdSearchMode, QmdSearchOptions, QmdSearchResult } from "./types.js";
3
+ export interface ObsidianSearchClient {
4
+ search(mode: QmdSearchMode, query: string, options?: QmdSearchOptions): Promise<QmdSearchResult>;
5
+ }
6
+ export interface ObsidianMethodOptions {
7
+ readonly client: ObsidianSearchClient;
8
+ readonly instanceId: string;
9
+ readonly tags?: readonly string[];
10
+ }
11
+ export declare class ObsidianBm25Method implements RetrievalMethod {
12
+ private readonly client;
13
+ private readonly instanceId;
14
+ private readonly tags;
15
+ constructor(options: ObsidianMethodOptions);
16
+ describe(): RetrievalMethodDescriptor;
17
+ retrieve(query: string, options: RetrievalOptions): Promise<RetrievalResult[]>;
18
+ }
19
+ export declare class ObsidianSemanticMethod implements RetrievalMethod {
20
+ private readonly client;
21
+ private readonly instanceId;
22
+ private readonly tags;
23
+ constructor(options: ObsidianMethodOptions);
24
+ describe(): RetrievalMethodDescriptor;
25
+ retrieve(query: string, options: RetrievalOptions): Promise<RetrievalResult[]>;
26
+ }
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Path helpers for the Obsidian (`qmd`) datasource skill.
3
+ *
4
+ * All AutoRAG-managed state lives under
5
+ * `<workspaceRoot>/.autorag/datasources/obsidian/<instanceId>/`. The external
6
+ * `qmd` CLI is pointed at isolated config/cache dirs so multiple workspaces
7
+ * never share an index. Callers surface opaque slash-hierarchical sources of
8
+ * the form `/obsidian/<instance-id>/chunks/<chunk-id>`.
9
+ */
10
+ export declare const AUTORAG_DIRNAME = ".autorag";
11
+ export declare const DATASOURCES_DIRNAME = "datasources";
12
+ export declare const OBSIDIAN_DATASOURCE_DIRNAME = "obsidian";
13
+ export declare const OBSIDIAN_SOURCE_KIND: "obsidian";
14
+ export declare function obsidianDatasourceRoot(workspaceRoot: string, instanceId: string): string;
15
+ /** Directory passed to `QMD_CONFIG_DIR` (holds `index.yml`). */
16
+ export declare function obsidianQmdConfigDir(workspaceRoot: string, instanceId: string): string;
17
+ /** Directory passed to `XDG_CACHE_HOME` (holds `qmd/index.sqlite`). */
18
+ export declare function obsidianQmdCacheDir(workspaceRoot: string, instanceId: string): string;
19
+ export declare function obsidianSourcePath(instanceId: string, chunkId: string): string;
20
+ export declare function parseObsidianSourcePath(source: string): {
21
+ readonly instanceId: string;
22
+ readonly chunkId: string;
23
+ } | undefined;
24
+ /** Strip leading and trailing ASCII dashes without a quadratic regex. */
25
+ export declare function stripEdgeDashes(value: string): string;
26
+ /** Sanitize an instance id into a qmd collection name. */
27
+ export declare function toQmdCollectionName(instanceId: string): string;
@@ -1,20 +1,44 @@
1
- /**
2
- * Obsidian vault datasource skill (issue #1314).
3
- *
4
- * Thin composition of ObsidianConnector with the shared
5
- * {@link ConnectorDatasourceSkill} base: descriptor, polling metadata,
6
- * ok/fail indexing with path/PII-opaque diagnostics, lexical retrieval via
7
- * the shared pipeline, opaque `/obsidian/<instance>/…` sources, and a
8
- * progressive-disclosure agent-skill manifest.
9
- */
10
- import { ConnectorDatasourceSkill, type ConnectorSkillDefinition, type ConnectorSkillOptions } from "../../connector-skill.js";
11
- import { ObsidianConnector, type ObsidianConnectorOptions } from "./connector.js";
12
- export declare const OBSIDIAN_SKILL_DEFINITION: ConnectorSkillDefinition;
13
- export interface ObsidianSkillOptions extends Omit<ConnectorSkillOptions, "connector"> {
14
- /** Trusted connector configuration; a pre-built connector wins. */
15
- readonly connector?: ObsidianConnector;
16
- readonly connectorOptions?: ObsidianConnectorOptions;
1
+ import type { RetrievalMethod } from "../../../retrieval/types.js";
2
+ import type { DatasourceIndexResult, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, PollingMetadata, SourceDescription } from "../../types.js";
3
+ import { type ObsidianSearchClient } from "./methods.js";
4
+ import type { QmdEmbedResult, QmdEnsureResult, QmdUpdateResult } from "./types.js";
5
+ export interface ObsidianSkillClient extends ObsidianSearchClient {
6
+ ensureCollection(): Promise<QmdEnsureResult>;
7
+ update(): Promise<QmdUpdateResult>;
8
+ embed(): Promise<QmdEmbedResult>;
17
9
  }
18
- export declare class ObsidianSkill extends ConnectorDatasourceSkill {
10
+ export interface ObsidianSkillOptions {
11
+ readonly datasourceId?: string;
12
+ readonly client?: ObsidianSkillClient;
13
+ readonly vaultPath?: string;
14
+ readonly binaryPath?: string;
15
+ readonly instanceId?: string;
16
+ readonly instances?: readonly string[];
17
+ readonly pollingIntervalMs?: number;
18
+ readonly tags?: readonly string[];
19
+ readonly lastIndexedAt?: number;
20
+ readonly workspaceRoot?: string;
21
+ readonly collectionName?: string;
22
+ readonly timeoutMs?: number;
23
+ readonly connectorOptions?: {
24
+ readonly vaultPath?: string;
25
+ };
26
+ }
27
+ export declare class ObsidianSkill implements DatasourceSkill {
28
+ private readonly client;
29
+ private readonly instanceId;
30
+ private readonly instances;
31
+ private readonly pollingIntervalMs;
32
+ private readonly tags;
33
+ private readonly vaultPath;
34
+ private lastIndexedAt;
35
+ private lastError;
19
36
  constructor(options?: ObsidianSkillOptions);
37
+ describe(): DatasourceSkillDescriptor;
38
+ polling(): PollingMetadata;
39
+ index(): Promise<DatasourceIndexResult>;
40
+ retrievalMethods(): readonly RetrievalMethod[];
41
+ describeSources(): readonly SourceDescription[];
42
+ skillManifest(): DatasourceSkillManifest;
43
+ private fail;
20
44
  }
@@ -0,0 +1,90 @@
1
+ import type { RetrievalOptions } from "../../../retrieval/types.js";
2
+ /**
3
+ * Search modes accepted by the external `qmd` CLI.
4
+ *
5
+ * - `search` — BM25 / FTS5 lexical search
6
+ * - `vsearch` — dense vector semantic search
7
+ */
8
+ export type QmdSearchMode = "search" | "vsearch";
9
+ /**
10
+ * Configuration for {@link QmdClient}. The client spawns the `qmd` binary as a
11
+ * child process and isolates config/cache under the AutoRAG workspace.
12
+ */
13
+ export interface QmdOptions {
14
+ /** Explicit path to the `qmd` binary. Defaults to a bare `qmd` PATH lookup. */
15
+ readonly binaryPath?: string;
16
+ /** Spawn timeout in milliseconds. Default 60_000 (embed can be slow). */
17
+ readonly timeoutMs?: number;
18
+ /** Max stdout/stderr bytes retained. Default 1_048_576 (1 MiB). */
19
+ readonly maxBufferBytes?: number;
20
+ /** Absolute path to the Obsidian vault. Required for ensure/update. */
21
+ readonly vaultPath?: string;
22
+ /** AutoRAG workspace root used to isolate qmd config/cache. */
23
+ readonly workspaceRoot?: string;
24
+ /** Instance id used for source paths and collection naming. Default `default`. */
25
+ readonly instanceId?: string;
26
+ /** Explicit collection name; defaults to a sanitized instance id. */
27
+ readonly collectionName?: string;
28
+ /** Environment overrides merged on top of a restricted process env. */
29
+ readonly env?: Readonly<Record<string, string | undefined>>;
30
+ }
31
+ export declare const DEFAULT_QMD_BINARY = "qmd";
32
+ export declare const DEFAULT_QMD_TIMEOUT_MS = 60000;
33
+ export declare const DEFAULT_QMD_MAX_BUFFER_BYTES = 1048576;
34
+ export type QmdFailureReason = "binary-missing" | "not-configured" | "nonzero-exit" | "spawn-error" | "timeout" | "aborted" | "stdout-too-large" | "stderr-too-large" | "invalid-json" | "invalid-shape";
35
+ export interface QmdFailure {
36
+ readonly ok: false;
37
+ readonly reason: QmdFailureReason;
38
+ readonly stdout: string;
39
+ readonly stderr: string;
40
+ readonly code: number | null;
41
+ }
42
+ export interface QmdOk<T> {
43
+ readonly ok: true;
44
+ readonly data: T;
45
+ readonly stdout: string;
46
+ readonly stderr: string;
47
+ readonly code: number;
48
+ }
49
+ export interface QmdUpdateInfo {
50
+ readonly indexed: number;
51
+ readonly updated: number;
52
+ readonly unchanged: number;
53
+ readonly removed: number;
54
+ readonly needsEmbedding?: boolean;
55
+ readonly metadata?: Readonly<Record<string, unknown>>;
56
+ }
57
+ export interface QmdEmbedInfo {
58
+ readonly embedded: boolean;
59
+ readonly metadata?: Readonly<Record<string, unknown>>;
60
+ }
61
+ export interface QmdEnsureInfo {
62
+ readonly collectionName: string;
63
+ readonly vaultPath: string;
64
+ readonly configDir: string;
65
+ }
66
+ /** A scored search hit from `qmd search` / `qmd vsearch`. */
67
+ export interface QmdSearchHit {
68
+ readonly chunkId: string;
69
+ readonly score: number;
70
+ readonly content: string;
71
+ readonly title?: string;
72
+ readonly file?: string;
73
+ readonly docid?: string;
74
+ readonly metadata?: Readonly<Record<string, unknown>>;
75
+ }
76
+ export interface QmdSearchOk {
77
+ readonly ok: true;
78
+ readonly hits: readonly QmdSearchHit[];
79
+ readonly stdout: string;
80
+ readonly stderr: string;
81
+ readonly code: number;
82
+ readonly data: {
83
+ readonly hits: readonly QmdSearchHit[];
84
+ };
85
+ }
86
+ export type QmdEnsureResult = QmdOk<QmdEnsureInfo> | QmdFailure;
87
+ export type QmdUpdateResult = QmdOk<QmdUpdateInfo> | QmdFailure;
88
+ export type QmdEmbedResult = QmdOk<QmdEmbedInfo> | QmdFailure;
89
+ export type QmdSearchResult = QmdSearchOk | QmdFailure;
90
+ export type QmdSearchOptions = RetrievalOptions;
@@ -1,2 +1,15 @@
1
- export { SlackConnector, type SlackConnectorOptions } from "./connector.js";
2
- export { SLACK_SKILL_DEFINITION, SlackSkill, type SlackSkillOptions } from "./skill.js";
1
+ import { CrawlerCliClient } from "../../crawler-client.js";
2
+ import { CrawlerDatasourceSkill, type CrawlerDatasourceSkillOptions, type CrawlerSkillClient } from "../../crawler-skill.js";
3
+ import type { CrawlerCliOptions } from "../../crawler-types.js";
4
+ export interface SlacrawlOptions extends CrawlerCliOptions {
5
+ }
6
+ export declare class SlacrawlClient extends CrawlerCliClient {
7
+ constructor(options?: SlacrawlOptions);
8
+ }
9
+ export interface SlackSkillOptions extends Omit<CrawlerDatasourceSkillOptions, "client"> {
10
+ readonly client?: CrawlerSkillClient;
11
+ readonly connectorOptions?: SlacrawlOptions;
12
+ }
13
+ export declare class SlackSkill extends CrawlerDatasourceSkill {
14
+ constructor(options?: SlackSkillOptions);
15
+ }
@@ -0,0 +1,15 @@
1
+ import { CrawlerCliClient } from "../../crawler-client.js";
2
+ import { CrawlerDatasourceSkill, type CrawlerDatasourceSkillOptions, type CrawlerSkillClient } from "../../crawler-skill.js";
3
+ import type { CrawlerCliOptions } from "../../crawler-types.js";
4
+ export interface TelecrawlOptions extends CrawlerCliOptions {
5
+ }
6
+ export declare class TelecrawlClient extends CrawlerCliClient {
7
+ constructor(options?: TelecrawlOptions);
8
+ }
9
+ export interface TelecrawlSkillOptions extends Omit<CrawlerDatasourceSkillOptions, "client"> {
10
+ readonly client?: CrawlerSkillClient;
11
+ readonly connectorOptions?: TelecrawlOptions;
12
+ }
13
+ export declare class TelecrawlSkill extends CrawlerDatasourceSkill {
14
+ constructor(options?: TelecrawlSkillOptions);
15
+ }
@@ -0,0 +1,15 @@
1
+ import { CrawlerCliClient } from "../../crawler-client.js";
2
+ import { CrawlerDatasourceSkill, type CrawlerDatasourceSkillOptions, type CrawlerSkillClient } from "../../crawler-skill.js";
3
+ import type { CrawlerCliOptions } from "../../crawler-types.js";
4
+ export interface WacrawlOptions extends CrawlerCliOptions {
5
+ }
6
+ export declare class WacrawlClient extends CrawlerCliClient {
7
+ constructor(options?: WacrawlOptions);
8
+ }
9
+ export interface WacrawlSkillOptions extends Omit<CrawlerDatasourceSkillOptions, "client"> {
10
+ readonly client?: CrawlerSkillClient;
11
+ readonly connectorOptions?: WacrawlOptions;
12
+ }
13
+ export declare class WacrawlSkill extends CrawlerDatasourceSkill {
14
+ constructor(options?: WacrawlSkillOptions);
15
+ }
@@ -0,0 +1,40 @@
1
+ export interface DupeyScanFile {
2
+ readonly path: string;
3
+ readonly content_hash?: string;
4
+ readonly [key: string]: unknown;
5
+ }
6
+ export interface DupeyScanEdge {
7
+ readonly relation: string;
8
+ readonly a: string;
9
+ readonly b: string;
10
+ readonly [key: string]: unknown;
11
+ }
12
+ export interface DupeyScanFamily {
13
+ readonly id: number;
14
+ readonly relation: string;
15
+ readonly files: readonly string[];
16
+ readonly members: readonly Record<string, unknown>[];
17
+ readonly edges: readonly DupeyScanEdge[];
18
+ readonly pick?: Record<string, unknown>;
19
+ readonly [key: string]: unknown;
20
+ }
21
+ export interface DupeyScanResult {
22
+ readonly dir: string;
23
+ readonly threshold?: number;
24
+ readonly contains_threshold?: number;
25
+ readonly contains_min_jaccard?: number;
26
+ readonly files: readonly DupeyScanFile[];
27
+ readonly families: readonly DupeyScanFamily[];
28
+ readonly errors: readonly Record<string, unknown>[];
29
+ readonly [key: string]: unknown;
30
+ }
31
+ export interface DupeyCliOptions {
32
+ readonly executable?: string;
33
+ readonly cwd?: string;
34
+ readonly timeoutMs?: number;
35
+ readonly run?: (args: readonly string[]) => Promise<string>;
36
+ }
37
+ export declare class DupeyCliError extends Error {
38
+ constructor(message: string);
39
+ }
40
+ export declare function scanWithDupey(dir: string, options?: DupeyCliOptions): Promise<DupeyScanResult>;
@@ -0,0 +1,8 @@
1
+ import type { DupeyScanResult } from "./cli.js";
2
+ export interface ExactDuplicateFilterResult {
3
+ readonly excluded: ReadonlySet<string>;
4
+ readonly keepers: ReadonlySet<string>;
5
+ readonly errors: readonly string[];
6
+ }
7
+ /** Selects the newest filesystem copy for each exact canonical-text hash. */
8
+ export declare function selectExactDuplicateExclusions(root: string, scan: DupeyScanResult): Promise<ExactDuplicateFilterResult>;
@@ -0,0 +1,2 @@
1
+ export * from "./cli.js";
2
+ export * from "./filter.js";
package/dist/index.d.ts CHANGED
@@ -2,6 +2,7 @@ export { AutoRAGAgent, type AutoRAGAgentOptions, type AutoRAGRefreshComponentSta
2
2
  export { type AutoRAGResultsDetails, createEmitResultsTool, EMIT_AUTORAG_RESULTS_TOOL_NAME, type SearchDocumentDiagnostic, type SearchDocumentDiagnosticCode, type SearchDocumentDiagnosticSeverity, type SearchDocumentsResponse, type SearchDocumentWarning, } from "./agent/index.js";
3
3
  export { buildSystemPrompt, type SystemPromptConfig } from "./agent/system-prompt.js";
4
4
  export * from "./datasource/index.js";
5
+ export * from "./dupey/index.js";
5
6
  export * from "./jikji/index.js";
6
7
  export * from "./manifest/index.js";
7
8
  export * from "./memory/index.js";