import { type CopilotPaths, type ResolveCopilotPathsOptions } from "./paths.js"; export interface SetupOptions extends ResolveCopilotPathsOptions { dryRun?: boolean; scope?: "project" | "user"; /** Overwrite bundled skills/agents that exist but differ from the bundle. * Without it, changed files are reported as "skip-changed" (the CLI offers an * interactive override); identical files are always skipped. */ force?: boolean; } export type SetupActionKind = "copy" | "create" | "update" | "skip-exists" | "skip-changed" | "skip-source-missing" | "skip-source-invalid"; export interface SetupAction { source: string; target: string; kind: SetupActionKind; } export interface SetupConflict { code: "UNKNOWN_EFFECTIVE_GOAL" | "GOAL_SCOPE_MIGRATION_REQUIRED" | "LEGACY_GOAL_INSTRUCTIONS" | "BUNDLE_SYMLINK" | "BUNDLE_ENTRY_INVALID" | "TARGET_SYMLINK" | "TARGET_HARDLINK" | "TARGET_ENTRY_INVALID" | "CATALOG_INCOMPLETE" | "CATALOG_INVALID"; path: string; message: string; } export interface GoalDiscoveryEntry { scope: "project" | "user" | "bundle"; path: string; status: "missing" | "current" | "legacy-known" | "managed" | "unknown"; sha256?: string; } export interface InstructionSource { scope: "project" | "user"; path: string; status: "current" | "legacy-goal" | "unreadable"; } export interface SetupValidation { bundle: { status: "valid" | "invalid"; sha256: string; fileCount: number; }; catalog: { status: "valid" | "absent" | "invalid"; sha256?: string; skillNames: string[]; }; goalDiscovery: GoalDiscoveryEntry[]; effectiveGoalPath?: string; instructionSources: InstructionSource[]; } export interface SetupResult { ok: boolean; dryRun: boolean; scope: "project" | "user"; actions: SetupAction[]; conflicts: SetupConflict[]; validation: SetupValidation; manifestPath: string; paths: CopilotPaths; } /** Absolute path of the user-level hook file omp installs/refreshes. Lets callers * (e.g. bare-launch first-run setup) cheaply check "are hooks installed?". */ export declare function userHookPath(options?: SetupOptions): string; /** True when the user-level hooks should be (re)installed: either missing, or the * PINNED plugin root in the installed omp.json differs from where omp now runs * (e.g. an nvm node switch / reinstall moved the install path, leaving the hook * scripts pointing at a stale absolute path). Lets bare `omp` self-repair. */ export declare function userHooksNeedRefresh(options?: SetupOptions): boolean; /** Install just the user-level hooks (the piece copilot won't load from the * plugin dir). Used by bare launch self-repair when only hooks are stale. * Idempotent. */ export declare function installUserHooks(options?: SetupOptions): { ok: boolean; actions: SetupAction[]; conflicts: SetupConflict[]; paths: CopilotPaths; }; /** Copy bundled skills/agents into the user home (`~/.copilot/skills|agents`). * Never touches the project `.github`. Used by `omp update` and interactive * auto-update so personal installs stay in lockstep with the CLI. */ export declare function installUserBundle(options?: SetupOptions): { ok: boolean; actions: SetupAction[]; conflicts: SetupConflict[]; validation: SetupValidation; paths: CopilotPaths; }; /** Refresh the full user-home install: hooks + skills + agents. No project * scaffolding. Shared by `omp update` and bare-`omp` "Update now?" yes. */ export declare function refreshUserInstall(options?: SetupOptions): { ok: boolean; actions: SetupAction[]; conflicts: SetupConflict[]; validation: SetupValidation; paths: CopilotPaths; }; export declare function runSetup(options?: SetupOptions): SetupResult; export declare function formatSetup(result: SetupResult): string; export declare function formatUserInstallRefreshBlock(conflicts: readonly SetupConflict[]): string;