import { SyncSelection, SyncState } from "../../../composition/syncState/index.mjs"; import { HarnessOptions } from "../../../composition/types/harness.mjs"; import { SyncProgressOutput } from "./presenter.mjs"; //#region src/cli/commands/sync/index.d.ts export interface SyncRoots { globalOnly: boolean; globalRoot: string; sourceRoot: string; targetRoot: string; } /** Resolves the configuration source and publication destination for one sync. */ export declare function resolveSyncRoots(args: readonly string[], environment?: NodeJS.ProcessEnv, currentDirectory?: string, homeDirectory?: string): SyncRoots; /** Removes workspace-only state before a global runtime is resolved. */ export declare function environmentForSyncScope(environment: NodeJS.ProcessEnv, globalOnly: boolean): NodeJS.ProcessEnv; type SyncOutput = SyncProgressOutput; export type SyncSettingsMode = 'persisted' | 'embedded'; export interface SyncCommandOptions { settingsMode?: SyncSettingsMode; /** Test/embedding override; normal CLI execution uses the process home. */ homeDirectory?: string; /** Internal pipeline seam when the caller owns the worktree lock. */ lockHeld?: boolean; } export interface SyncResult { statePath: string; /** Omitted when DPI supplies the integration as a process-local overlay. */ settingsPath?: string; /** Set only when the repository still carried its own DoomPi registration. */ projectSettingsPath?: string; selection: SyncSelection; mcpServers: string[]; skillCount: number; agentCount: number; } export declare function recordedEnvironment(environment: NodeJS.ProcessEnv): Record; /** * Layers the repository's declared selection under the usual resolution. * * `.doom/config.yaml` holds what the repository selects by default, the way * init.el does for doom-emacs. Seeding the environment the parser reads keeps * the precedence the launcher already documents: an explicit flag wins, then an * exported variable, then the declared default. */ export declare function selectionEnvironment(repoRoot: string, environment: NodeJS.ProcessEnv, homeDirectory?: string): NodeJS.ProcessEnv; export declare function toSelection(options: Pick): SyncSelection; export declare function selectionCompositionFingerprint(repoRoot: string, options: Pick, homeDirectory?: string): string; /** Differences between what a sync would produce and what is on disk. */ export declare function collectDrift(repoRoot: string, selection: SyncSelection, state: SyncState | undefined, environment?: NodeJS.ProcessEnv, settingsMode?: SyncSettingsMode, expectedCompositionFingerprint?: string): string[]; export declare function formatSyncResult(result: SyncResult, runner?: string): string; /** Returns true when a valid legacy registration must be republished with API metadata. */ export declare function syncRegistrationNeedsApiMigration(repoRoot: string, homeDirectory: string): boolean; /** Resolves the matrix, stages it into home-scoped worktree storage, and publishes one generation. */ export declare function synchronize(args: string[], environment?: NodeJS.ProcessEnv, currentDirectory?: string, output?: SyncOutput, commandOptions?: SyncCommandOptions): Promise; /** Compatibility API. Executables call the command function directly. */ export declare class SyncCommand { readonly name = "sync"; private readonly settingsMode; private readonly homeDirectory; private readonly lockHeld; constructor(options?: SyncCommandOptions); matches(args: string[]): boolean; execute(args: string[], environment?: NodeJS.ProcessEnv, currentDirectory?: string, output?: SyncOutput): Promise; } //#endregion //# sourceMappingURL=index.d.mts.map