/**
 * Custom harness commands (`agents harness`).
 *
 * A "custom harness" is a named (host CLI + model) combo — e.g. OpenCode pinned
 * to meta/muse-spark-1.1, called `spark`. It runs like a native agent type
 * (`agents run spark`) and syncs across devices via `agents repo push user`.
 *
 * Mechanism: harnesses ARE profiles (same ~/.agents/profiles/*.yml, same run
 * resolution). This command group is the surface over that layer + a discovery
 * `list` spanning custom harnesses, addable presets, and the native harness
 * registry. The former top-level `agents profiles` tree was removed — use harness.
 */
import type { Command } from 'commander';
import { type AddProfileOptions } from './profiles.js';
import { type Profile, type ForkProfileOptions } from '../lib/profiles.js';
import { type HarnessDraft } from './harness-wizard.js';
/**
 * Print one custom harness. Shared by `agents harness view <name>` and by
 * `agents view <name>` — a custom harness resolves as an agent type there, so
 * both entry points must describe it identically.
 */
export declare function renderHarnessDetail(name: string): void;
/** Options accepted by `agents harness fork`. */
export interface ForkOptions {
    toHost?: string;
    model?: string;
    baseUrl?: string;
    authProvider?: string;
    account?: string;
    version?: string;
    description?: string;
    /** `<bundle>` or `<bundle>:<key>` — see {@link applyFromSecrets} in ./profiles.js. */
    fromSecrets?: string;
    keyStdin?: boolean;
    force?: boolean;
    /** Tri-state pre-save connection test: true = force, false = skip, undefined = ask on a TTY. */
    test?: boolean;
}
/** Options accepted by `agents harness edit`. */
export interface EditOptions {
    model?: string;
    baseUrl?: string;
    authProvider?: string;
    account?: string;
    /** Empty string ('') unpins the host CLI version. */
    version?: string;
    description?: string;
    /** Empty string ('') clears the fallback model. */
    fallbackModel?: string;
    /** `<bundle>` or `<bundle>:<key>` — see {@link applyFromSecrets} in ./profiles.js. */
    fromSecrets?: string;
    keyStdin?: boolean;
    /** Tri-state pre-save connection test: true = force, false = skip, undefined = ask on a TTY. */
    test?: boolean;
}
/**
 * Build the new harness for `agents harness fork <source> <name>`.
 *
 * Two sources, one verb: an existing custom harness is copied and overridden;
 * a native agent id is turned into a harness pinned to `--model` on that host.
 * Forking a native harness therefore requires `--model` — there is nothing to
 * copy a model from.
 */
export declare function buildFork(source: string, name: string, opts: ForkOptions): Profile;
/** Map `agents harness edit` flags onto {@link ForkProfileOptions} — the same
 * override shape `editProfile`/`forkProfile` apply. `--version ''` (unpin) is
 * handled by the caller ({@link buildEdit}), not here: `forkProfile`'s own
 * ternary treats an empty string as "no override" and would otherwise inherit
 * the source's version instead of clearing it. */
export declare function buildEditOverrides(opts: EditOptions): ForkProfileOptions;
/** True when at least one recognized edit flag was given. */
export declare function hasEditFlags(opts: EditOptions): boolean;
/**
 * Build the edited harness for `agents harness edit <name>` — the profile-shape
 * transform only; the caller applies `--from-secrets`/`--auth-provider` (async
 * keychain side effects) and persists with `writeProfile`. Mirrors
 * {@link buildFork}'s split between a pure builder and the action's IO.
 */
export declare function buildEdit(name: string, opts: EditOptions): Profile;
/** True when `agents harness fork` was given too little to proceed without the wizard. */
export declare function forkNeedsWizard(source: string | undefined, name: string | undefined, opts: ForkOptions): boolean;
/** True when `agents harness add` was given too little to proceed without the wizard.
 * Mirrors {@link addProfile}'s own error condition in ./profiles.js so a bare
 * `agents harness add <preset-name>` (no flags) still resolves via the preset
 * fallback instead of being routed into the wizard. */
export declare function addNeedsWizard(name: string | undefined, opts: AddProfileOptions): boolean;
/** Whether the pre-save connection test runs, or must be asked for on a TTY. */
export type ConnectionTestGate = 'on' | 'off' | 'ask';
/**
 * Resolve the tri-state connection-test gate (RUSH-2221), pure so the branching
 * is unit-tested with no prompt or spawn. `--test` forces it on, `--no-test`
 * forces it off, and with neither flag a TTY is asked (default yes) while a
 * non-interactive caller (`--key-stdin`, piped, CI) skips it — so scripting stays
 * non-interactive unless it opts in with `--test`.
 */
export declare function connectionTestGate(testFlag: boolean | undefined, interactive: boolean): ConnectionTestGate;
/**
 * Map a finished edit-wizard draft onto {@link EditOptions}, keeping only the
 * fields the user actually changed from the profile's current values. Unchanged
 * accepts (the wizard pre-fills each prompt with the current value) drop out, so
 * the resulting {@link buildEdit} touches nothing the user left alone — and the
 * "no changes" case is detectable via {@link hasEditFlags}. Base-URL clearing is
 * intentionally not expressed here: the flag path can't clear it either (an empty
 * `--base-url` is a no-op in `forkProfile`), so the wizard matches that until a
 * later subtask adds explicit clearing.
 */
export declare function draftToEditOptions(draft: HarnessDraft, original: Profile): EditOptions;
export declare function registerHarnessCommands(program: Command): void;
