@autorag/librarian 2.2.0 → 2.4.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 +194 -47
- package/dist/agent/agent.d.ts +34 -47
- package/dist/agent/bash-tool.d.ts +2 -11
- package/dist/agent/dupey-tool.d.ts +15 -0
- package/dist/agent/emit-results-tool.d.ts +14 -0
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/local-model.d.ts +12 -0
- package/dist/agent/search-bm25-tool.d.ts +11 -3
- package/dist/agent/search-documents.d.ts +2 -2
- package/dist/agent/search-minsync-tool.d.ts +2 -2
- package/dist/agent/system-prompt.d.ts +1 -2
- package/dist/cli/commands/duplicates.d.ts +4 -0
- package/dist/cli/commands/health.d.ts +9 -65
- package/dist/cli/commands/index.d.ts +3 -3
- package/dist/cli/commands/init.d.ts +1 -1
- package/dist/cli/commands/search.d.ts +2 -2
- package/dist/cli/commands/tui.d.ts +36 -0
- package/dist/cli/commands/ui.d.ts +13 -0
- package/dist/cli/config.d.ts +27 -22
- package/dist/cli/index.js +14965 -12563
- package/dist/cli/tui-commands.d.ts +16 -0
- package/dist/cli/tui-session-store.d.ts +16 -0
- package/dist/datasource/access-context.d.ts +6 -12
- package/dist/datasource/aliased-skill.d.ts +28 -0
- package/dist/datasource/chunk-store.d.ts +2 -0
- package/dist/datasource/connector-skill.d.ts +3 -0
- package/dist/datasource/connector.d.ts +4 -0
- package/dist/datasource/crawler-skill.d.ts +6 -0
- package/dist/datasource/crawler-types.d.ts +2 -0
- package/dist/datasource/described-skill.d.ts +17 -0
- package/dist/datasource/index.d.ts +4 -2
- package/dist/datasource/result-filter.d.ts +2 -1
- package/dist/datasource/skills/clawgallery/client.d.ts +9 -0
- package/dist/datasource/skills/clawgallery/index.d.ts +5 -0
- package/dist/datasource/skills/clawgallery/methods.d.ts +19 -0
- package/dist/datasource/skills/clawgallery/paths.d.ts +7 -0
- package/dist/datasource/skills/clawgallery/skill.d.ts +35 -0
- package/dist/datasource/skills/clawgallery/types.d.ts +58 -0
- package/dist/datasource/skills/cloud-drive/index.d.ts +2 -0
- package/dist/datasource/skills/cloud-drive/rclone-connector.d.ts +47 -0
- package/dist/datasource/skills/cloud-drive/skill.d.ts +14 -0
- package/dist/datasource/skills/discrawl/skill.d.ts +3 -0
- package/dist/datasource/skills/discrawl/types.d.ts +4 -8
- package/dist/datasource/skills/factory.d.ts +9 -0
- package/dist/datasource/skills/gmail/himalaya-connector.d.ts +12 -1
- package/dist/datasource/skills/katok/methods.d.ts +6 -4
- package/dist/datasource/skills/katok/types.d.ts +8 -26
- package/dist/datasource/skills/mailcrawl/client.d.ts +15 -0
- package/dist/datasource/skills/mailcrawl/config.d.ts +2 -0
- package/dist/datasource/skills/mailcrawl/index.d.ts +4 -0
- package/dist/datasource/skills/mailcrawl/methods.d.ts +15 -0
- package/dist/datasource/skills/mailcrawl/skill.d.ts +34 -0
- package/dist/datasource/skills/mailcrawl/types.d.ts +71 -0
- package/dist/datasource/skills/obsidian/skill.d.ts +2 -0
- package/dist/datasource/skills/obsidian/types.d.ts +2 -0
- package/dist/datasource/types.d.ts +5 -2
- package/dist/dupey/cli.d.ts +40 -0
- package/dist/dupey/filter.d.ts +8 -0
- package/dist/dupey/index.d.ts +2 -0
- package/dist/filesystem/cloud-placeholder.d.ts +26 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8889 -9292
- package/dist/jikji/client.d.ts +1 -0
- package/dist/memory/check-memory-tool.d.ts +1 -0
- package/dist/memory/index.d.ts +2 -2
- package/dist/memory/memory.d.ts +33 -3
- package/dist/memory/renderer.d.ts +2 -1
- package/dist/minsync/client.d.ts +5 -1
- package/dist/minsync/embedder-config.d.ts +4 -1
- package/dist/minsync/index.d.ts +4 -4
- package/dist/minsync/installer.d.ts +1 -0
- package/dist/minsync/method.d.ts +22 -1
- package/dist/minsync/types.d.ts +5 -0
- package/dist/mirror/sync.d.ts +3 -1
- package/dist/observability/run-log.d.ts +1 -26
- package/dist/parser/defaults.d.ts +2 -0
- package/dist/parser/index.d.ts +2 -2
- package/dist/parser/opendataloader-pdf.d.ts +10 -0
- package/dist/parser/types.d.ts +7 -0
- package/dist/process/portable-spawn.d.ts +10 -0
- package/dist/retrieval/index.d.ts +2 -2
- package/dist/retrieval/methods/bm25.d.ts +7 -36
- package/dist/ui/browse.d.ts +11 -0
- package/dist/ui/catalog.d.ts +59 -0
- package/dist/ui/config-store.d.ts +43 -0
- package/dist/ui/discover.d.ts +19 -0
- package/dist/ui/html.d.ts +2 -0
- package/dist/ui/probe.d.ts +24 -0
- package/dist/ui/prompt.d.ts +21 -0
- package/dist/ui/server.d.ts +28 -0
- package/package.json +17 -15
- package/skills/autorag/SKILL.md +79 -108
- package/skills/autorag-setup/SKILL.md +170 -395
- package/dist/datasource/skills/discrawl/config.d.ts +0 -9
- package/dist/datasource/skills/gdrive/connector.d.ts +0 -30
- package/dist/datasource/skills/gdrive/index.d.ts +0 -3
- package/dist/datasource/skills/gdrive/rclone-connector.d.ts +0 -51
- package/dist/datasource/skills/gdrive/skill.d.ts +0 -24
- package/dist/subagents/contracts.d.ts +0 -90
- package/dist/subagents/dispatch-templates.d.ts +0 -104
- package/dist/subagents/dispatch-validation.d.ts +0 -169
- package/dist/subagents/explorer-tools-extension.d.ts +0 -4
- package/dist/subagents/explorer-tools-extension.js +0 -130
- package/dist/subagents/local-models.d.ts +0 -14
- package/dist/subagents/model-policy.d.ts +0 -31
- package/dist/subagents/runtime.d.ts +0 -52
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SlashCommand } from "@earendil-works/pi-tui";
|
|
2
|
+
import type { TuiSessionStore } from "./tui-session-store.js";
|
|
3
|
+
export type ParsedSlashCommand = {
|
|
4
|
+
kind: "incomplete";
|
|
5
|
+
} | {
|
|
6
|
+
kind: "quit";
|
|
7
|
+
} | {
|
|
8
|
+
kind: "resume";
|
|
9
|
+
sessionId: string | undefined;
|
|
10
|
+
} | {
|
|
11
|
+
kind: "unknown";
|
|
12
|
+
name: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function parseSlashCommand(input: string): ParsedSlashCommand | undefined;
|
|
15
|
+
export declare function createTuiSlashCommands(store: TuiSessionStore): SlashCommand[];
|
|
16
|
+
export declare function renderSlashHelp(): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface TuiSessionRecord {
|
|
2
|
+
readonly id: string;
|
|
3
|
+
readonly query: string;
|
|
4
|
+
readonly answer: string;
|
|
5
|
+
readonly trace: string;
|
|
6
|
+
readonly updatedAt: number;
|
|
7
|
+
}
|
|
8
|
+
export interface TuiSessionStore {
|
|
9
|
+
list(): readonly TuiSessionRecord[];
|
|
10
|
+
get(id: string): TuiSessionRecord | undefined;
|
|
11
|
+
save(session: TuiSessionRecord): void;
|
|
12
|
+
}
|
|
13
|
+
export declare function createFileTuiSessionStore(path: string): TuiSessionStore;
|
|
14
|
+
export declare function createMergedTuiSessionStore(...stores: readonly TuiSessionStore[]): TuiSessionStore;
|
|
15
|
+
export declare function renderTuiSessionList(sessions: readonly TuiSessionRecord[]): string;
|
|
16
|
+
export declare function renderRestoredTuiSession(session: TuiSessionRecord): string;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Trusted, server-bound access context for the datasource layer.
|
|
3
3
|
*
|
|
4
4
|
* Constructed from server-supplied allow-tags and allow-scopes ONLY — never
|
|
5
|
-
* from model or tool arguments.
|
|
6
|
-
*
|
|
5
|
+
* from model or tool arguments. Tags authorize datasource skills; scopes are
|
|
6
|
+
* applied only to skills that advertise the `scoped` capability.
|
|
7
7
|
*/
|
|
8
8
|
import type { DatasourceAccessible } from "./types.js";
|
|
9
9
|
export interface DatasourceAccessContextOptions {
|
|
@@ -35,15 +35,9 @@ export declare class DatasourceAccessContext {
|
|
|
35
35
|
*/
|
|
36
36
|
isAccessible(descriptor: DatasourceAccessible): boolean;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* The predicate always returns an explicit boolean. On default-deny it
|
|
42
|
-
* returns `() => false`. Sources containing a `#` fragment are denied
|
|
43
|
-
* (datasource sources are slash-hierarchical only).
|
|
44
|
-
*
|
|
45
|
-
* @param userScope Optional user/model-requested scope; when provided a
|
|
46
|
-
* source must match BOTH a trusted allow-scope AND the user scope.
|
|
38
|
+
* Scope-capable datasource results are filtered by trusted and user scopes.
|
|
39
|
+
* Datasources without the `scoped` capability bypass this predicate and
|
|
40
|
+
* are authorized only at the skill/tag level.
|
|
47
41
|
*/
|
|
48
|
-
allowedSourcesPredicate(
|
|
42
|
+
allowedSourcesPredicate(_userScope?: string): (source: string) => boolean;
|
|
49
43
|
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RetrievalMethod } from "../retrieval/types.js";
|
|
2
|
+
import type { DatasourceIndexResult, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, SourceDescription } from "./types.js";
|
|
3
|
+
export interface AliasDatasourceSkillOptions {
|
|
4
|
+
readonly alias: string;
|
|
5
|
+
readonly channelIds?: readonly string[];
|
|
6
|
+
readonly channelNames?: readonly string[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Gives any datasource connection an independent model-visible identity.
|
|
10
|
+
* Channel allowlists are enforced after the backend search so omitted lists
|
|
11
|
+
* retain the backend's default "all channels" behavior.
|
|
12
|
+
*/
|
|
13
|
+
export declare class AliasedDatasourceSkill implements DatasourceSkill {
|
|
14
|
+
private readonly skill;
|
|
15
|
+
private readonly alias;
|
|
16
|
+
private readonly originalId;
|
|
17
|
+
private readonly channelIds;
|
|
18
|
+
private readonly channelNames;
|
|
19
|
+
constructor(skill: DatasourceSkill, options: AliasDatasourceSkillOptions);
|
|
20
|
+
describe(): DatasourceSkillDescriptor;
|
|
21
|
+
polling(): import("./types.js").PollingMetadata;
|
|
22
|
+
index(): Promise<DatasourceIndexResult>;
|
|
23
|
+
retrievalMethods(): readonly RetrievalMethod[];
|
|
24
|
+
describeSources(): readonly SourceDescription[];
|
|
25
|
+
skillManifest(): DatasourceSkillManifest;
|
|
26
|
+
private matchesChannel;
|
|
27
|
+
private rewriteResult;
|
|
28
|
+
}
|
|
@@ -46,6 +46,8 @@ export declare class DatasourceChunkStore {
|
|
|
46
46
|
* (in-memory contents stay authoritative for this process).
|
|
47
47
|
*/
|
|
48
48
|
replaceDocuments(documents: readonly ConnectorDocument[]): number;
|
|
49
|
+
/** Apply file-level additions/updates/deletions without rebuilding unchanged chunks. */
|
|
50
|
+
updateDocuments(documents: readonly ConnectorDocument[], deletedDocIds?: readonly string[]): number;
|
|
49
51
|
/** Load persisted chunks when present. Returns true when data was loaded. */
|
|
50
52
|
load(): boolean;
|
|
51
53
|
/** Ensure persisted chunks are loaded once for read paths. */
|
|
@@ -33,6 +33,7 @@ export interface ConnectorSkillDefinition {
|
|
|
33
33
|
readonly description: string;
|
|
34
34
|
/** Capability tags such as `"chat"`, `"api"`, `"polling"`. */
|
|
35
35
|
readonly capabilities: readonly string[];
|
|
36
|
+
readonly requiresExternalCli?: boolean;
|
|
36
37
|
/** Default authorization tags when the server config supplies none. */
|
|
37
38
|
readonly defaultTags: readonly string[];
|
|
38
39
|
/** Content type reported on source descriptions, e.g. `"chat"`. */
|
|
@@ -44,6 +45,8 @@ export interface ConnectorSkillDefinition {
|
|
|
44
45
|
}
|
|
45
46
|
export interface ConnectorSkillOptions {
|
|
46
47
|
readonly connector: DatasourceConnector;
|
|
48
|
+
/** Config alias used as the independent datasource/skill identity. */
|
|
49
|
+
readonly skillName?: string;
|
|
47
50
|
readonly instanceId?: string;
|
|
48
51
|
readonly instances?: readonly string[];
|
|
49
52
|
/** Poll interval in ms. Default 15 minutes; `0` disables polling. */
|
|
@@ -36,6 +36,10 @@ export interface ConnectorDocument {
|
|
|
36
36
|
export interface ConnectorFetchOk {
|
|
37
37
|
readonly ok: true;
|
|
38
38
|
readonly documents: readonly ConnectorDocument[];
|
|
39
|
+
/** True when the completed datasource snapshot changed since the last fetch. */
|
|
40
|
+
readonly changed?: boolean;
|
|
41
|
+
/** Stable ids removed from an incremental datasource snapshot. */
|
|
42
|
+
readonly deletedDocIds?: readonly string[];
|
|
39
43
|
/** Sanitized, path/PII-opaque warning strings. */
|
|
40
44
|
readonly warnings?: readonly string[];
|
|
41
45
|
}
|
|
@@ -16,11 +16,15 @@ export interface CrawlerDatasourceDefinition {
|
|
|
16
16
|
}
|
|
17
17
|
export interface CrawlerDatasourceSkillOptions {
|
|
18
18
|
readonly client: CrawlerSkillClient;
|
|
19
|
+
readonly datasourceId?: string;
|
|
19
20
|
readonly instanceId?: string;
|
|
20
21
|
readonly instances?: readonly string[];
|
|
21
22
|
readonly pollingIntervalMs?: number;
|
|
22
23
|
readonly tags?: readonly string[];
|
|
23
24
|
readonly lastIndexedAt?: number;
|
|
25
|
+
/** Omitted/empty means search every chat/channel. */
|
|
26
|
+
readonly channelIds?: readonly string[];
|
|
27
|
+
readonly channelNames?: readonly string[];
|
|
24
28
|
}
|
|
25
29
|
export declare class CrawlerDatasourceSkill implements DatasourceSkill {
|
|
26
30
|
private readonly definition;
|
|
@@ -29,6 +33,8 @@ export declare class CrawlerDatasourceSkill implements DatasourceSkill {
|
|
|
29
33
|
private readonly instances;
|
|
30
34
|
private readonly pollingIntervalMs;
|
|
31
35
|
private readonly tags;
|
|
36
|
+
private readonly channelIds;
|
|
37
|
+
private readonly channelNames;
|
|
32
38
|
private lastIndexedAt;
|
|
33
39
|
constructor(definition: CrawlerDatasourceDefinition, options: CrawlerDatasourceSkillOptions);
|
|
34
40
|
describe(): DatasourceSkillDescriptor;
|
|
@@ -42,6 +42,8 @@ export interface CrawlerCliOptions {
|
|
|
42
42
|
readonly timeoutMs?: number;
|
|
43
43
|
readonly maxBufferBytes?: number;
|
|
44
44
|
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
45
|
+
/** Working directory for the native CLI process, when explicitly needed. */
|
|
46
|
+
readonly workspacePath?: string;
|
|
45
47
|
}
|
|
46
48
|
export interface CrawlerProfile {
|
|
47
49
|
readonly binaryName: string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RetrievalMethod } from "../retrieval/types.js";
|
|
2
|
+
import type { DatasourceIndexResult, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, PollingMetadata, SourceDescription } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Adds operator-authored context to a configured datasource without changing
|
|
5
|
+
* its backend, access identity, or retrieval methods.
|
|
6
|
+
*/
|
|
7
|
+
export declare class DescribedDatasourceSkill implements DatasourceSkill {
|
|
8
|
+
private readonly skill;
|
|
9
|
+
private readonly description;
|
|
10
|
+
constructor(skill: DatasourceSkill, description: string);
|
|
11
|
+
describe(): DatasourceSkillDescriptor;
|
|
12
|
+
polling(): PollingMetadata;
|
|
13
|
+
index(): Promise<DatasourceIndexResult>;
|
|
14
|
+
retrievalMethods(): readonly RetrievalMethod[];
|
|
15
|
+
describeSources(): readonly SourceDescription[];
|
|
16
|
+
skillManifest(): DatasourceSkillManifest;
|
|
17
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { DatasourceAccessContext, type DatasourceAccessContextOptions } from "./access-context.js";
|
|
2
|
+
export { type AliasDatasourceSkillOptions, AliasedDatasourceSkill } from "./aliased-skill.js";
|
|
2
3
|
export { DatasourceChunkStore, type DatasourceChunkStoreOptions, datasourceChunkStorePath, type ScoredChunk, type StoredChunk, } from "./chunk-store.js";
|
|
3
4
|
export { boundDiagnosticText, type ConnectorDocument, type ConnectorFailureReason, type ConnectorFetchFail, type ConnectorFetchOk, type ConnectorFetchResult, connectorFailureToDiagnosticCode, type DatasourceConnector, sanitizeIdSegment, } from "./connector.js";
|
|
4
5
|
export { ConnectorDatasourceSkill, ConnectorLexicalMethod, type ConnectorSkillDefinition, type ConnectorSkillOptions, } from "./connector-skill.js";
|
|
@@ -7,14 +8,15 @@ export { type CronParseResult, isDue, parseCronExpr } from "./polling.js";
|
|
|
7
8
|
export { DatasourceSkillRegistry, type RegisteredDatasourceSkill } from "./registry.js";
|
|
8
9
|
export { DatasourceResultFilter, type ResultsByMethod } from "./result-filter.js";
|
|
9
10
|
export { buildDatasourceChunkSource, buildDatasourceInstanceSource, DATASOURCE_CHUNKS_SEGMENT, datasourceSourceHasFragment, datasourceSourcePath, isDatasourceSource, matchesDatasourceScope, matchesVirtualPathScope, normalizeVirtualPath, } from "./scope.js";
|
|
11
|
+
export { CLOUD_DRIVE_SKILL_DEFINITION, CloudDriveSkill, type CloudDriveSkillOptions, RcloneConnector, type RcloneConnectorOptions, type RcloneRunner, type RcloneRunResult, } from "./skills/cloud-drive/index.js";
|
|
10
12
|
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
13
|
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
14
|
export { GitHubConnector, type GitHubConnectorOptions, GitHubSkill, type GitHubSkillOptions, } from "./skills/github/index.js";
|
|
14
15
|
export { GmailConnector, type GmailConnectorOptions, GmailSkill, type GmailSkillOptions, } from "./skills/gmail/index.js";
|
|
15
16
|
export type { KatokFailureReason, KatokHit, KatokOptions, KatokSearchMode, KatokSearchOptions, KatokSearchResult, KatokSkillClient, KatokSkillOptions, } from "./skills/katok/index.js";
|
|
16
|
-
export { KatokBm25Method, KatokClient, KatokSemanticMethod, KatokSkill } from "./skills/katok/index.js";
|
|
17
|
+
export { KatokBm25Method, KatokClient, KatokSemanticMethod, KatokSkill, } from "./skills/katok/index.js";
|
|
17
18
|
export { MailExportConnector, type MailExportConnectorOptions, MailExportSkill, type MailExportSkillOptions, } from "./skills/mail-export/index.js";
|
|
19
|
+
export { MAILCRAWL_MODES, MailcrawlClient, type MailcrawlFailure, type MailcrawlFailureReason, type MailcrawlIndexInfo, MailcrawlMethod, type MailcrawlOptions, type MailcrawlSearchHit, type MailcrawlSearchMode, type MailcrawlSearchResult, MailcrawlSkill, type MailcrawlSyncInfo, type MailcrawlSyncResult, } from "./skills/mailcrawl/index.js";
|
|
18
20
|
export { NotcrawlClient, type NotcrawlOptions, NotionSkill, type NotionSkillOptions, } from "./skills/notion/index.js";
|
|
19
21
|
export { ObsidianBm25Method, ObsidianSemanticMethod, ObsidianSkill, type ObsidianSkillClient, type ObsidianSkillOptions, QmdClient, type QmdOptions, type QmdSearchHit, type QmdSearchMode, type QmdSearchResult, } from "./skills/obsidian/index.js";
|
|
20
22
|
export { RssConnector, type RssConnectorOptions, type RssFeedConfig, RssSkill, type RssSkillOptions, } from "./skills/rss/index.js";
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
* takes the per-method result map and the {@link RetrievalMethod}s that
|
|
7
7
|
* produced it, then for every datasource-backed method either drops all of
|
|
8
8
|
* its results (when the trusted access context denies the descriptor) or
|
|
9
|
-
* keeps only the sources the context allows for the current user scope
|
|
9
|
+
* keeps only the sources the context allows for the current user scope when
|
|
10
|
+
* the method advertises the `scoped` capability.
|
|
10
11
|
*
|
|
11
12
|
* Non-datasource methods (those whose descriptor has no `datasourceId`) pass
|
|
12
13
|
* through completely untouched — they are gated by their own retrieval
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ClawGalleryIndexResult, ClawGalleryOptions, ClawGallerySearchMode, ClawGallerySearchOptions, ClawGallerySearchResult, ClawGalleryVdrResult } from "./types.js";
|
|
2
|
+
export declare class ClawGalleryClient {
|
|
3
|
+
private readonly options;
|
|
4
|
+
constructor(options?: ClawGalleryOptions);
|
|
5
|
+
bootstrap(signal?: AbortSignal): Promise<ClawGalleryIndexResult>;
|
|
6
|
+
syncVisual(signal?: AbortSignal): Promise<ClawGalleryVdrResult>;
|
|
7
|
+
search(mode: ClawGallerySearchMode, query: string, options?: ClawGallerySearchOptions): Promise<ClawGallerySearchResult>;
|
|
8
|
+
private run;
|
|
9
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ClawGalleryClient } from "./client.js";
|
|
2
|
+
export { ClawGalleryMethod, type ClawGalleryMethodOptions, type ClawGallerySearchClient } from "./methods.js";
|
|
3
|
+
export { CLAWGALLERY_DATASOURCE_ID, CLAWGALLERY_SOURCE_KIND, clawGallerySourcePath, parseClawGallerySourcePath, } from "./paths.js";
|
|
4
|
+
export { ClawGallerySkill, type ClawGallerySkillClient, type ClawGallerySkillOptions } from "./skill.js";
|
|
5
|
+
export type { ClawGalleryFailure, ClawGalleryFailureReason, ClawGalleryHit, ClawGalleryIndexInfo, ClawGalleryIndexResult, ClawGalleryOptions, ClawGallerySearchMode, ClawGallerySearchOptions, ClawGallerySearchResult, ClawGalleryVdrBackend, ClawGalleryVdrInfo, ClawGalleryVdrResult, } from "./types.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { RetrievalMethod, RetrievalMethodDescriptor, RetrievalOptions, RetrievalResult } from "../../../retrieval/types.js";
|
|
2
|
+
import type { ClawGallerySearchMode, ClawGallerySearchOptions, ClawGallerySearchResult } from "./types.js";
|
|
3
|
+
export interface ClawGallerySearchClient {
|
|
4
|
+
search(mode: ClawGallerySearchMode, query: string, options?: ClawGallerySearchOptions): Promise<ClawGallerySearchResult>;
|
|
5
|
+
}
|
|
6
|
+
export interface ClawGalleryMethodOptions {
|
|
7
|
+
readonly client: ClawGallerySearchClient;
|
|
8
|
+
readonly instanceId: string;
|
|
9
|
+
readonly tags?: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
export declare class ClawGalleryMethod implements RetrievalMethod {
|
|
12
|
+
private readonly mode;
|
|
13
|
+
private readonly client;
|
|
14
|
+
private readonly instanceId;
|
|
15
|
+
private readonly tags;
|
|
16
|
+
constructor(mode: ClawGallerySearchMode, client: ClawGallerySearchClient, instanceId: string, tags: readonly string[]);
|
|
17
|
+
describe(): RetrievalMethodDescriptor;
|
|
18
|
+
retrieve(query: string, options: RetrievalOptions): Promise<RetrievalResult[]>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const CLAWGALLERY_DATASOURCE_ID = "clawgallery";
|
|
2
|
+
export declare const CLAWGALLERY_SOURCE_KIND = "screenshots";
|
|
3
|
+
export declare function clawGallerySourcePath(instanceId: string, imageId: string): string;
|
|
4
|
+
export declare function parseClawGallerySourcePath(source: string): {
|
|
5
|
+
readonly instanceId: string;
|
|
6
|
+
readonly imageId: string;
|
|
7
|
+
} | undefined;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { RetrievalMethod } from "../../../retrieval/types.js";
|
|
2
|
+
import type { DatasourceIndexResult, DatasourceSkill, DatasourceSkillDescriptor, DatasourceSkillManifest, PollingMetadata, SourceDescription } from "../../types.js";
|
|
3
|
+
import { type ClawGallerySearchClient } from "./methods.js";
|
|
4
|
+
import type { ClawGalleryIndexResult, ClawGalleryOptions, ClawGallerySearchMode, ClawGalleryVdrResult } from "./types.js";
|
|
5
|
+
export interface ClawGallerySkillClient extends ClawGallerySearchClient {
|
|
6
|
+
bootstrap(): Promise<ClawGalleryIndexResult>;
|
|
7
|
+
syncVisual(): Promise<ClawGalleryVdrResult>;
|
|
8
|
+
}
|
|
9
|
+
export interface ClawGallerySkillOptions {
|
|
10
|
+
readonly client: ClawGallerySkillClient;
|
|
11
|
+
readonly instanceId?: string;
|
|
12
|
+
readonly instances?: readonly string[];
|
|
13
|
+
readonly pollingIntervalMs?: number;
|
|
14
|
+
readonly tags?: readonly string[];
|
|
15
|
+
readonly defaultMode?: ClawGallerySearchMode;
|
|
16
|
+
readonly syncVisual?: boolean;
|
|
17
|
+
readonly vdrBackend?: ClawGalleryOptions["vdrBackend"];
|
|
18
|
+
}
|
|
19
|
+
export declare class ClawGallerySkill implements DatasourceSkill {
|
|
20
|
+
private readonly instanceId;
|
|
21
|
+
private readonly instances;
|
|
22
|
+
private readonly tags;
|
|
23
|
+
private readonly mode;
|
|
24
|
+
private readonly interval;
|
|
25
|
+
private readonly sync;
|
|
26
|
+
private lastIndexedAt;
|
|
27
|
+
private readonly options;
|
|
28
|
+
constructor(options: ClawGallerySkillOptions);
|
|
29
|
+
describe(): DatasourceSkillDescriptor;
|
|
30
|
+
polling(): PollingMetadata;
|
|
31
|
+
index(): Promise<DatasourceIndexResult>;
|
|
32
|
+
retrievalMethods(): readonly RetrievalMethod[];
|
|
33
|
+
describeSources(): readonly SourceDescription[];
|
|
34
|
+
skillManifest(): DatasourceSkillManifest;
|
|
35
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { RetrievalOptions } from "../../../retrieval/types.js";
|
|
2
|
+
export type ClawGallerySearchMode = "keyword" | "lexical" | "embedding" | "hybrid";
|
|
3
|
+
export type ClawGalleryVdrBackend = "mlx" | "jina-mlx" | "vsplade";
|
|
4
|
+
export interface ClawGalleryOptions {
|
|
5
|
+
readonly binaryPath?: string;
|
|
6
|
+
readonly timeoutMs?: number;
|
|
7
|
+
readonly maxBufferBytes?: number;
|
|
8
|
+
readonly configDir?: string;
|
|
9
|
+
readonly path?: string;
|
|
10
|
+
readonly syncVisual?: boolean;
|
|
11
|
+
readonly vdrBackend?: ClawGalleryVdrBackend;
|
|
12
|
+
readonly defaultMode?: ClawGallerySearchMode;
|
|
13
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
14
|
+
}
|
|
15
|
+
export type ClawGalleryFailureReason = "binary-missing" | "nonzero-exit" | "spawn-error" | "timeout" | "aborted" | "stdout-too-large" | "stderr-too-large" | "invalid-json" | "invalid-shape";
|
|
16
|
+
export interface ClawGalleryFailure {
|
|
17
|
+
readonly ok: false;
|
|
18
|
+
readonly reason: ClawGalleryFailureReason;
|
|
19
|
+
readonly stdout: string;
|
|
20
|
+
readonly stderr: string;
|
|
21
|
+
readonly code: number | null;
|
|
22
|
+
}
|
|
23
|
+
export interface ClawGalleryOk<T> {
|
|
24
|
+
readonly ok: true;
|
|
25
|
+
readonly data: T;
|
|
26
|
+
readonly stdout: string;
|
|
27
|
+
readonly stderr: string;
|
|
28
|
+
readonly code: number;
|
|
29
|
+
}
|
|
30
|
+
export interface ClawGalleryHit {
|
|
31
|
+
readonly imageId: string;
|
|
32
|
+
readonly content: string;
|
|
33
|
+
readonly score: number;
|
|
34
|
+
readonly path?: string;
|
|
35
|
+
readonly title?: string;
|
|
36
|
+
readonly caption?: string;
|
|
37
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
38
|
+
}
|
|
39
|
+
export interface ClawGalleryIndexInfo {
|
|
40
|
+
readonly indexed: number;
|
|
41
|
+
readonly skipped: number;
|
|
42
|
+
readonly pruned: number;
|
|
43
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
44
|
+
}
|
|
45
|
+
export interface ClawGalleryVdrInfo {
|
|
46
|
+
readonly processed: number;
|
|
47
|
+
readonly skipped: number;
|
|
48
|
+
readonly failed: number;
|
|
49
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
50
|
+
}
|
|
51
|
+
export type ClawGalleryIndexResult = ClawGalleryOk<ClawGalleryIndexInfo> | ClawGalleryFailure;
|
|
52
|
+
export type ClawGalleryVdrResult = ClawGalleryOk<ClawGalleryVdrInfo> | ClawGalleryFailure;
|
|
53
|
+
export type ClawGallerySearchResult = (ClawGalleryOk<{
|
|
54
|
+
readonly hits: readonly ClawGalleryHit[];
|
|
55
|
+
}> & {
|
|
56
|
+
readonly hits: readonly ClawGalleryHit[];
|
|
57
|
+
}) | ClawGalleryFailure;
|
|
58
|
+
export type ClawGallerySearchOptions = RetrievalOptions;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider-neutral incremental rclone mirror.
|
|
3
|
+
*
|
|
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.
|
|
8
|
+
*/
|
|
9
|
+
import type { DefaultParserRegistryOptions } from "../../../parser/defaults.js";
|
|
10
|
+
import type { ConnectorFetchResult, DatasourceConnector } from "../../connector.js";
|
|
11
|
+
export interface RcloneRunResult {
|
|
12
|
+
readonly ok: boolean;
|
|
13
|
+
readonly stdout: string;
|
|
14
|
+
readonly stderr: string;
|
|
15
|
+
readonly code: number | null;
|
|
16
|
+
}
|
|
17
|
+
export type RcloneRunner = (args: readonly string[], timeoutMs: number) => Promise<RcloneRunResult>;
|
|
18
|
+
export interface RcloneConnectorOptions {
|
|
19
|
+
readonly binaryPath?: string;
|
|
20
|
+
readonly remote?: string;
|
|
21
|
+
readonly provider?: string;
|
|
22
|
+
readonly workspaceRoot?: string;
|
|
23
|
+
readonly instanceId?: string;
|
|
24
|
+
readonly skillName?: string;
|
|
25
|
+
readonly extensions?: readonly string[];
|
|
26
|
+
readonly include?: readonly string[];
|
|
27
|
+
readonly exclude?: readonly string[];
|
|
28
|
+
readonly exportFormats?: string;
|
|
29
|
+
readonly maxDocuments?: number;
|
|
30
|
+
readonly maxBytesPerFile?: number;
|
|
31
|
+
readonly concurrency?: number;
|
|
32
|
+
readonly bandwidthLimit?: string;
|
|
33
|
+
readonly dryRun?: boolean;
|
|
34
|
+
readonly timeoutMs?: number;
|
|
35
|
+
readonly runner?: RcloneRunner;
|
|
36
|
+
/** Explicit operator-owned rclone.conf path, passed read-only. */
|
|
37
|
+
readonly configPath?: string;
|
|
38
|
+
readonly parserOptions?: DefaultParserRegistryOptions;
|
|
39
|
+
}
|
|
40
|
+
export declare class RcloneConnector implements DatasourceConnector {
|
|
41
|
+
private readonly options;
|
|
42
|
+
private readonly runner;
|
|
43
|
+
constructor(options?: RcloneConnectorOptions);
|
|
44
|
+
fetch(): Promise<ConnectorFetchResult>;
|
|
45
|
+
private fetchIncremental;
|
|
46
|
+
private fetchWithoutMirror;
|
|
47
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { DatasourceConnector } from "../../connector.js";
|
|
2
|
+
import { ConnectorDatasourceSkill, type ConnectorSkillDefinition, type ConnectorSkillOptions } from "../../connector-skill.js";
|
|
3
|
+
import { type RcloneConnectorOptions } from "./rclone-connector.js";
|
|
4
|
+
export declare const CLOUD_DRIVE_SKILL_DEFINITION: ConnectorSkillDefinition;
|
|
5
|
+
export interface CloudDriveSkillOptions extends Omit<ConnectorSkillOptions, "connector"> {
|
|
6
|
+
/** Unique model-visible datasource name for this configured connection. */
|
|
7
|
+
readonly skillName?: string;
|
|
8
|
+
readonly provider?: "google-drive" | "onedrive" | "icloud" | string;
|
|
9
|
+
readonly connector?: DatasourceConnector;
|
|
10
|
+
readonly connectorOptions?: RcloneConnectorOptions;
|
|
11
|
+
}
|
|
12
|
+
export declare class CloudDriveSkill extends ConnectorDatasourceSkill {
|
|
13
|
+
constructor(options?: CloudDriveSkillOptions);
|
|
14
|
+
}
|
|
@@ -9,6 +9,7 @@ export interface DiscrawlSkillClient extends DiscrawlSearchClient {
|
|
|
9
9
|
}
|
|
10
10
|
export interface DiscrawlSkillOptions {
|
|
11
11
|
readonly client: DiscrawlSkillClient;
|
|
12
|
+
readonly datasourceId?: string;
|
|
12
13
|
readonly instanceId?: string;
|
|
13
14
|
readonly instances?: readonly string[];
|
|
14
15
|
readonly pollingIntervalMs?: number;
|
|
@@ -18,6 +19,8 @@ export interface DiscrawlSkillOptions {
|
|
|
18
19
|
readonly defaultMode?: DiscrawlSearchMode;
|
|
19
20
|
/** Max messages embedded per index pass. Undefined drains the whole backlog. */
|
|
20
21
|
readonly embedLimit?: number;
|
|
22
|
+
readonly channelIds?: readonly string[];
|
|
23
|
+
readonly channelNames?: readonly string[];
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* Discord datasource skill backed by the external `discrawl` CLI.
|
|
@@ -64,21 +64,17 @@ export interface DiscrawlOptions {
|
|
|
64
64
|
* AutoRAG never rewrites an explicit config.
|
|
65
65
|
*/
|
|
66
66
|
readonly configPath?: string;
|
|
67
|
-
/**
|
|
67
|
+
/** Retained for source compatibility; native discrawl defaults are used. */
|
|
68
68
|
readonly root?: string;
|
|
69
69
|
/** Explicit workspace directory overriding the computed default. */
|
|
70
70
|
readonly workspacePath?: string;
|
|
71
71
|
/** Restrict search and sync to one guild id. */
|
|
72
72
|
readonly guildId?: string;
|
|
73
|
-
/**
|
|
74
|
-
* Embedding provider written to AutoRAG's workspace-local discrawl config.
|
|
75
|
-
* Defaults to `ollama`; explicit operator-owned config files are untouched.
|
|
76
|
-
*/
|
|
73
|
+
/** Embedding provider understood by the native discrawl configuration. */
|
|
77
74
|
readonly embeddingProvider?: string;
|
|
78
75
|
/**
|
|
79
|
-
* Embedding model
|
|
80
|
-
*
|
|
81
|
-
* accepted but reported through a diagnostic.
|
|
76
|
+
* Embedding model understood by the native discrawl configuration.
|
|
77
|
+
* English-only models are accepted but reported through a diagnostic.
|
|
82
78
|
*/
|
|
83
79
|
readonly embeddingModel?: string;
|
|
84
80
|
/**
|
|
@@ -11,11 +11,20 @@ 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
|
+
/** Operator-authored context shown to the agent for this connection. */
|
|
15
|
+
readonly description?: string;
|
|
16
|
+
/** Built-in datasource template used when the config key is a connection alias. */
|
|
17
|
+
readonly type?: string;
|
|
14
18
|
readonly instanceId?: string;
|
|
15
19
|
readonly pollingIntervalMs?: number;
|
|
16
20
|
readonly tags?: readonly string[];
|
|
17
21
|
/** Connector-specific options (token env names, repos, feeds, paths, …). */
|
|
18
22
|
readonly connector?: Record<string, unknown>;
|
|
23
|
+
/** Optional chat/channel allowlist; absent means all channels. */
|
|
24
|
+
readonly channels?: {
|
|
25
|
+
readonly ids?: readonly string[];
|
|
26
|
+
readonly names?: readonly string[];
|
|
27
|
+
};
|
|
19
28
|
}
|
|
20
29
|
/** The trusted `datasources` config section: skill name → config. */
|
|
21
30
|
export type DatasourcesConfig = Readonly<Record<string, DatasourceSkillConfig | boolean>>;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* envelopes, and reads message bodies. Never throws; failures map onto the
|
|
9
9
|
* coarse connector failure union with path/PII-opaque messages.
|
|
10
10
|
*/
|
|
11
|
-
import type
|
|
11
|
+
import { type ConnectorFetchResult, type DatasourceConnector } from "../../connector.js";
|
|
12
12
|
export interface HimalayaRunResult {
|
|
13
13
|
readonly ok: boolean;
|
|
14
14
|
readonly stdout: string;
|
|
@@ -27,14 +27,25 @@ export interface HimalayaConnectorOptions {
|
|
|
27
27
|
readonly pageSize?: number;
|
|
28
28
|
/** Max messages whose bodies are fetched per run. Default 50. */
|
|
29
29
|
readonly maxDocuments?: number;
|
|
30
|
+
/**
|
|
31
|
+
* Workspace root for the connector's envelope fingerprint state. When set,
|
|
32
|
+
* subsequent refreshes fetch only new or changed envelopes and update the
|
|
33
|
+
* shared chunk store incrementally.
|
|
34
|
+
*/
|
|
35
|
+
readonly workspaceRoot?: string;
|
|
30
36
|
/** Per-spawn timeout. Default 30s (IMAP fetches can be slow). */
|
|
31
37
|
readonly timeoutMs?: number;
|
|
32
38
|
/** Injectable process runner for tests. */
|
|
33
39
|
readonly runner?: HimalayaRunner;
|
|
40
|
+
/** Explicit operator-owned config path, passed read-only to Himalaya. */
|
|
41
|
+
readonly configPath?: string;
|
|
34
42
|
}
|
|
35
43
|
export declare class HimalayaConnector implements DatasourceConnector {
|
|
36
44
|
private readonly options;
|
|
37
45
|
private readonly runner;
|
|
38
46
|
constructor(options?: HimalayaConnectorOptions);
|
|
39
47
|
fetch(): Promise<ConnectorFetchResult>;
|
|
48
|
+
private loadState;
|
|
49
|
+
private saveState;
|
|
50
|
+
private statePath;
|
|
40
51
|
}
|
|
@@ -14,8 +14,9 @@ export interface KatokMethodOptions {
|
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Lexical (BM25) retrieval over a KakaoTalk datasource via the external
|
|
17
|
-
* `katok` CLI in keyword mode.
|
|
18
|
-
*
|
|
17
|
+
* `katok` CLI in keyword mode. Katok does not expose source scopes; access is
|
|
18
|
+
* controlled at the datasource/tag level. All client failures collapse to an
|
|
19
|
+
* empty result set; retrieval never throws.
|
|
19
20
|
*/
|
|
20
21
|
export declare class KatokBm25Method implements RetrievalMethod {
|
|
21
22
|
private readonly client;
|
|
@@ -27,8 +28,9 @@ export declare class KatokBm25Method implements RetrievalMethod {
|
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
30
|
* Semantic (vector) retrieval over a KakaoTalk datasource via the external
|
|
30
|
-
* `katok` CLI in semantic mode.
|
|
31
|
-
*
|
|
31
|
+
* `katok` CLI in semantic mode. Katok does not expose source scopes; access is
|
|
32
|
+
* controlled at the datasource/tag level. All client failures collapse to an
|
|
33
|
+
* empty result set; retrieval never throws.
|
|
32
34
|
*/
|
|
33
35
|
export declare class KatokSemanticMethod implements RetrievalMethod {
|
|
34
36
|
private readonly client;
|
|
@@ -7,14 +7,6 @@ import type { RetrievalOptions } from "../../../retrieval/types.js";
|
|
|
7
7
|
* - `hybrid` — fused semantic + keyword scores.
|
|
8
8
|
*/
|
|
9
9
|
export type KatokSearchMode = "semantic" | "keyword" | "hybrid";
|
|
10
|
-
/**
|
|
11
|
-
* Where the `katok` CLI reads KakaoTalk data from.
|
|
12
|
-
*
|
|
13
|
-
* - `macos` — live KakaoTalk install on macOS (the CLI owns DB access; this
|
|
14
|
-
* client never touches the DB directly).
|
|
15
|
-
* - `fixture` — a frozen fixture directory (used for tests / dry runs).
|
|
16
|
-
*/
|
|
17
|
-
export type KatokSourceKind = "macos" | "fixture";
|
|
18
10
|
/**
|
|
19
11
|
* Configuration for {@link KatokClient}. All fields optional; sensible defaults
|
|
20
12
|
* mirror the jikji client. The client spawns the `katok` binary as a child
|
|
@@ -23,34 +15,24 @@ export type KatokSourceKind = "macos" | "fixture";
|
|
|
23
15
|
export interface KatokOptions {
|
|
24
16
|
/** Explicit path to the `katok` binary. Defaults to a bare `katok` PATH lookup. */
|
|
25
17
|
readonly binaryPath?: string;
|
|
26
|
-
/** Spawn timeout in milliseconds. Default
|
|
18
|
+
/** Spawn timeout in milliseconds. Default 60_000 (sync/index over large archives can be slow). */
|
|
27
19
|
readonly timeoutMs?: number;
|
|
28
20
|
/** Max stdout/stderr bytes retained. Default 1_048_576 (1 MiB). */
|
|
29
21
|
readonly maxBufferBytes?: number;
|
|
30
|
-
/**
|
|
31
|
-
readonly source?: KatokSourceKind;
|
|
32
|
-
/** Path to a fixture directory; required when `source === "fixture"`. */
|
|
33
|
-
readonly fixturePath?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Explicit katok workspace directory (the `.autorag/datasources/katok`
|
|
36
|
-
* root). When omitted, computed from {@link KatokOptions.root} (or
|
|
37
|
-
* `process.cwd()`) via the paths helper.
|
|
38
|
-
*/
|
|
22
|
+
/** Explicit native katok data directory, passed as `--data-dir`. */
|
|
39
23
|
readonly workspacePath?: string;
|
|
40
|
-
/**
|
|
41
|
-
readonly
|
|
24
|
+
/** Explicit operator-owned configuration/workspace transport. */
|
|
25
|
+
readonly configPath?: string;
|
|
42
26
|
/** Environment overrides merged on top of `process.env` for the child. */
|
|
43
27
|
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
44
28
|
}
|
|
45
29
|
export declare const DEFAULT_KATOK_BINARY = "katok";
|
|
46
|
-
export declare const DEFAULT_KATOK_TIMEOUT_MS =
|
|
30
|
+
export declare const DEFAULT_KATOK_TIMEOUT_MS = 60000;
|
|
47
31
|
export declare const DEFAULT_KATOK_MAX_BUFFER_BYTES = 1048576;
|
|
48
|
-
export declare const DEFAULT_KATOK_SOURCE: KatokSourceKind;
|
|
49
32
|
export declare const DEFAULT_KATOK_OPTIONS: {
|
|
50
33
|
readonly binaryPath: "katok";
|
|
51
|
-
readonly timeoutMs:
|
|
34
|
+
readonly timeoutMs: 60000;
|
|
52
35
|
readonly maxBufferBytes: 1048576;
|
|
53
|
-
readonly source: "macos";
|
|
54
36
|
};
|
|
55
37
|
/**
|
|
56
38
|
* Reasons a katok CLI invocation can fail. The client never throws for these —
|
|
@@ -140,7 +122,7 @@ export type KatokParentResult = KatokOk<KatokChunk> | KatokFailure;
|
|
|
140
122
|
/**
|
|
141
123
|
* Search-specific options. Reuses the shared {@link RetrievalOptions} so the
|
|
142
124
|
* KatokSkill retrieval method can pass its options straight through. The
|
|
143
|
-
* client maps `topK`
|
|
144
|
-
* not
|
|
125
|
+
* client maps `topK` to the native CLI limit flag; other fields are handled
|
|
126
|
+
* by the retrieval layer or are not supported by katok.
|
|
145
127
|
*/
|
|
146
128
|
export type KatokSearchOptions = RetrievalOptions;
|