/**
 * CodeGraph Interactive Installer
 *
 * Multi-target: writes MCP server config + instructions for the
 * agents the user picks (Claude Code, Cursor, Codex CLI, opencode,
 * Hermes Agent, Gemini CLI, Antigravity IDE, Kiro, and GitHub
 * Copilot in VS Code / the Copilot CLI / JetBrains IDEs).
 * Defaults to the Claude-only behavior for backwards compatibility
 * when no targets are explicitly chosen and nothing else is detected.
 *
 * Uses @clack/prompts for the interactive UI; `runInstallerWithOptions`
 * is the non-interactive entry point used by the `--target` /
 * `--print-config` CLI flags.
 */
import type { AgentTarget, Location, TargetId } from './targets/types';
export { writeMcpConfig, writePermissions, hasMcpConfig, hasPermissions, } from './config-writer';
export type { InstallLocation } from './config-writer';
export interface RunInstallerOptions {
    /** Comma-separated target list, or `auto` / `all` / `none`. */
    target?: string;
    /** Skip the location prompt; use this value directly. */
    location?: Location;
    /** Skip the auto-allow prompt; use this value directly. */
    autoAllow?: boolean;
    /**
     * Skip every confirm and use defaults: location=global,
     * autoAllow=true, target=auto. For scripting / CI.
     */
    yes?: boolean;
}
/**
 * Interactive entry point — preserves the historical UX (`codegraph
 * install` with no args goes through the prompts), but now starts
 * the targets multi-select pre-populated with detected agents.
 */
export declare function runInstaller(): Promise<void>;
export declare function runInstallerWithOptions(opts: RunInstallerOptions): Promise<void>;
export interface RunUninstallerOptions {
    /**
     * Comma-separated target list, or `auto` / `all` / `none`. Defaults
     * to `all` — uninstall sweeps every known agent and reports which
     * ones it actually touched, so the user doesn't have to know where
     * they configured it.
     */
    target?: string;
    /** Skip the location prompt; use this value directly. */
    location?: Location;
    /** Non-interactive: location=global, target=all, no prompts. */
    yes?: boolean;
    /** Remove agent configs only — leave the CLI binary installed. */
    keepCli?: boolean;
    /**
     * `__filename` of the CLI entry (dist/bin/codegraph.js) — install-method
     * detection is keyed off the running binary's real location.
     */
    cliFilename?: string;
}
export type UninstallStatus = 'removed' | 'not-configured' | 'unsupported';
/**
 * Per-target outcome of an uninstall sweep. `removed` means we deleted
 * at least one thing; `not-configured` means the agent had no codegraph
 * config at this location (nothing to do); `unsupported` means the
 * agent has no config concept for this location (e.g. the Copilot CLI
 * is global-only, so a `local` uninstall skips it).
 */
export interface UninstallReport {
    id: TargetId;
    displayName: string;
    status: UninstallStatus;
    /** Absolute paths we actually edited/removed (action === 'removed'). */
    removedPaths: string[];
    /** Verbatim notes from the target (rare for uninstall). */
    notes: string[];
}
/**
 * Pure uninstall sweep — no prompts, no I/O beyond the targets' own
 * file edits. Exposed (and unit-tested) separately from the clack UI in
 * `runUninstaller` so the aggregation logic can be asserted directly.
 *
 * Each target's `uninstall()` is already safe to call when nothing was
 * installed (it returns `not-found` actions), so this is safe to run
 * across every target unconditionally.
 */
export declare function uninstallTargets(targets: readonly AgentTarget[], location: Location): UninstallReport[];
export type RefreshStatus = 'refreshed' | 'unchanged' | 'not-configured' | 'unsupported';
/**
 * Per-target outcome of a refresh sweep. `refreshed` means at least one
 * filesystem entry was created, updated, or removed; `unchanged` means the target was
 * already current (every write reported byte-identical); the other two
 * mirror `UninstallStatus`.
 */
export interface RefreshReport {
    id: TargetId;
    displayName: string;
    location: Location;
    status: RefreshStatus;
    /** Absolute paths created, updated, or removed by the refresh. */
    changedPaths: string[];
}
/**
 * Pure refresh sweep — re-runs `install()` for every target that is
 * ALREADY configured at `location`, so the surfaces a previous version
 * wrote (the marker-fenced instructions section, the MCP server entry,
 * the legacy-hook cleanups) match the binary that will serve them.
 * Without this, those files keep the wording — and the tool names — of
 * whatever version first wrote them, no matter how many upgrades later.
 *
 * Strictly a refresh, never a first install:
 *   - targets that aren't `alreadyConfigured` are skipped untouched;
 *   - permissions are not written (`autoAllow: false`) and the prompt
 *     hook is left as-is (`promptHook: undefined`), so choices the user
 *     made at install time — or by hand since — are preserved.
 *
 * Every write underneath is the targets' own idempotent upsert, so a
 * re-run on an already-current machine reports `unchanged` everywhere.
 * Exposed (and unit-tested) separately from the CLI wiring, same as
 * `uninstallTargets`.
 */
export declare function refreshTargets(targets: readonly AgentTarget[], location: Location): RefreshReport[];
/**
 * Interactive uninstaller — the inverse of `runInstallerWithOptions`.
 * Asks global-vs-local first (unless `--location`/`--yes` is given),
 * then sweeps every agent target (or the `--target` subset) and prints
 * one block per agent so the user sees exactly which providers it hit.
 *
 * Removes only what install wrote (MCP server entry, instructions
 * block, permissions) — never the `.codegraph/` index, which `codegraph
 * uninit` owns.
 */
export declare function runUninstaller(opts: RunUninstallerOptions): Promise<void>;
/**
 * When the live file watcher will be disabled for this project (e.g. WSL2
 * /mnt drives, or CODEGRAPH_NO_WATCH), the index would silently go stale.
 * Explain that, and offer to keep it fresh automatically via git hooks
 * (commit / pull / checkout) instead of manual `codegraph sync`.
 *
 * No-op on environments where the watcher runs normally, so it's safe to
 * call unconditionally after init.
 */
export declare function offerWatchFallback(clack: typeof import('@clack/prompts'), projectPath: string, opts?: {
    yes?: boolean;
}): Promise<void>;
//# sourceMappingURL=index.d.ts.map