import { atomicWriteTextIfUnchanged, unlinkRegularFileIfUnchanged, type FileIdentity, type RegularFileSnapshot } from '../agent-file/atomic-write.js'; import { type PathEnvironment } from '../config/paths.js'; import { openConnection } from '../db/connection.js'; import { ensureGlobalWorkspace } from '../memory/workspaces.js'; import { refreshRegisteredProjectAgentFiles, type ProjectAgentRefreshResult } from '../setup/project-agent-refresh.js'; import type { SkillDiscoveryMode } from '../skills/types.js'; export declare const SETUP_CLIENTS: readonly ["codex", "opencode", "claude", "hermes"]; export type SetupClient = (typeof SETUP_CLIENTS)[number]; type SetupAction = 'created' | 'updated' | 'unchanged' | 'deleted'; interface PlannedDirectory { path: string; parent: PlannedDirectory | undefined; original: FileIdentity | undefined; created: FileIdentity | undefined; } interface PlannedFile { path: string; parentDirectory: PlannedDirectory; content: string | undefined; mode: number; original: RegularFileSnapshot | undefined; mustRemainAbsent?: readonly string[]; action: SetupAction; purpose: 'mcp-config' | 'instructions' | 'standard-skill'; client: SetupClient; report: boolean; } export interface SetupOptions extends PathEnvironment { clients?: SetupClient[]; command?: string; dryRun?: boolean; databasePath?: string; migrationsDirectory?: string; standardSkills?: boolean; skillDiscoveryMode?: SkillDiscoveryMode; replaceConflictingMcpServers?: readonly SetupClient[]; } export interface SetupCommandDependencies { atomicWriteTextIfUnchanged?: typeof atomicWriteTextIfUnchanged; unlinkRegularFileIfUnchanged?: typeof unlinkRegularFileIfUnchanged; beforeCommit?: () => void | Promise; openConnection?: typeof openConnection; ensureGlobalWorkspace?: typeof ensureGlobalWorkspace; refreshRegisteredProjectAgentFiles?: typeof refreshRegisteredProjectAgentFiles; } export interface SetupResult { clients: SetupClient[]; databasePath: string; databaseAction: 'initialized' | 'planned'; appliedMigrations: number[]; files: Array>; projectAgentFiles: ProjectAgentRefreshResult[]; standardSkills: boolean; dryRun: boolean; nextStep: string; } export interface SetupPromptOptions { input?: NodeJS.ReadableStream; output?: NodeJS.WritableStream; } export declare function parseSetupClients(value: string): SetupClient[]; export declare function parseSetupSkillDiscoveryMode(value: string): SkillDiscoveryMode; /** Ask which supported clients should receive configuration in an interactive terminal. */ export declare function promptSetupClients(detected: SetupClient[], options?: SetupPromptOptions): Promise; /** Ask whether audited community Skill discovery should be enabled. */ export declare function promptCommunitySkillDiscovery(options?: SetupPromptOptions): Promise; /** Ask before replacing a client Kiokuko MCP identity that setup does not own. */ export declare function promptReplaceConflictingMcp(client: SetupClient, options?: SetupPromptOptions): Promise; export interface SetupFlowOptions { readonly environment?: PathEnvironment; readonly clients?: SetupClient[]; readonly command?: string; readonly dryRun?: boolean; readonly standardSkills?: boolean; readonly skillDiscoveryMode?: SkillDiscoveryMode; readonly json?: boolean; readonly input?: NodeJS.ReadableStream; readonly output?: NodeJS.WritableStream; } export interface SetupFlowDependencies { readonly setupGlobalClients?: (options: SetupOptions) => Promise; } /** Run the shared client-selection, conflict-confirmation, and setup flow. */ export declare function runSetupFlow(options?: SetupFlowOptions, dependencyOverrides?: SetupFlowDependencies): Promise; /** Ask both setup questions through one readline session so buffered input remains intact. */ export declare function promptSetupConfiguration(detected: SetupClient[], options?: SetupPromptOptions): Promise<{ clients: SetupClient[]; skillDiscoveryMode: SkillDiscoveryMode; }>; export declare function setupGlobalClients(options?: SetupOptions, dependencyOverrides?: SetupCommandDependencies): Promise; export {}; //# sourceMappingURL=setup.d.ts.map