UNPKG

askexperts

Version:

AskExperts SDK: build and use AI experts - ask them questions and pay with bitcoin on an open protocol

40 lines (39 loc) 1.33 kB
import { Command } from "commander"; import { DocStore, DocStoreClient } from "../../../docstore/index.js"; /** * Options for docstore commands */ export interface DocstoreCommandOptions { debug?: boolean; yes?: boolean; docstore?: string; type?: string; id?: string; limit?: number; remote?: boolean; url?: string; } /** * Get the fixed docstore path from constants * @returns The docstore path */ export declare function getDocstorePath(): string; /** * Get the docstore ID from options or select the default one * @param client DocStoreSQLite instance * @param options Command options * @returns Object containing docstore ID and the docstore object * @throws Error if no docstores found or multiple docstores without specified ID */ export declare function getDocstore(client: DocStoreClient, docstoreId?: string): Promise<DocStore>; /** * Create a docstore client based on command options * @param options Command options * @returns DocStoreClient instance (either DocStoreSQLite or DocStoreWebSocketClient) */ export declare function createDocstoreClient(options: DocstoreCommandOptions): Promise<DocStoreClient>; /** * Register the docstore command with the CLI * @param program The commander program */ export declare function registerDocstoreCommand(program: Command): void;