import type { Command } from 'commander'; import type { PathEnvironment } from '../config/paths.js'; import type { SqliteDatabase } from '../db/adapter.js'; import type { ModelDownloader } from '../embedding/model-download.js'; import type { InstalledModel } from '../embedding/model-installation.js'; import { runEmbeddingSetup } from '../embedding/setup-service.js'; import type { EmbeddingProvider, VectorSearchBackend } from '../embedding/types.js'; import { type SetupOptions, type SetupResult } from './setup.js'; export interface OptionalRuntimeInstallInvocation { readonly command: 'npm' | 'sudo'; readonly args: readonly string[]; readonly cwd?: string; } /** Select the npm invocation without assuming that every Unix prefix needs root. */ export declare function optionalRuntimeInstallInvocation(platform?: NodeJS.Platform, packageRoot?: string): OptionalRuntimeInstallInvocation; export type EmbeddingsDatabaseRunner = (operation: (database: SqliteDatabase, backend?: VectorSearchBackend) => T | Promise) => Promise; export type EmbeddingsOutput = (json: boolean | undefined, operation: string, data: unknown, message: string, meta?: Record) => void; export type EmbeddingsOptionalRuntimeChecker = () => Promise; export interface EmbeddingsSignalSource { once(signal: 'SIGINT' | 'SIGTERM', listener: () => void): unknown; off(signal: 'SIGINT' | 'SIGTERM', listener: () => void): unknown; } export interface EmbeddingsCommandDependencies { readonly withDatabase: EmbeddingsDatabaseRunner; readonly environment?: NodeJS.ProcessEnv; readonly optionalRuntimeChecker?: EmbeddingsOptionalRuntimeChecker; readonly optionalRuntimeInstaller?: () => Promise; readonly provider?: EmbeddingProvider; readonly backend?: VectorSearchBackend; readonly output?: EmbeddingsOutput; readonly signals?: EmbeddingsSignalSource; readonly modelDownloader?: ModelDownloader; readonly modelInstaller?: (preset: typeof import('../embedding/presets/local-small.js').LOCAL_SMALL_PRESET, options: Parameters[2]) => Promise; readonly pathEnvironment?: PathEnvironment; readonly setupInput?: NodeJS.ReadableStream; readonly setupOutput?: NodeJS.WritableStream; readonly setupGlobalClients?: (options: SetupOptions) => Promise>; } export declare function registerEmbeddingsCommands(cli: Command, dependencies: EmbeddingsCommandDependencies): Command; //# sourceMappingURL=embeddings.d.ts.map