/**
 * `agents sessions inject <sessionId> <text>` — deliver text into the terminal a
 * running session lives in. The CLI face of the Terminal Engine's Gap 2 primitive
 * (`injectIntoTerminal`, src/lib/terminal/inject.ts), so a native watchdog
 * (RUSH-1415) can shell out to nudge a stalled agent with "continue".
 *
 * Resolution: find the active session by id, then resolve its exact split through
 * the SAME canonical resolver the watchdog uses — `resolveInjectTargetForSession`
 * (lib/terminal/resolve.ts), precedence tmux > iterm > vscodium > pty. Sharing one
 * resolver keeps the manual unblock path and the watchdog in agreement on which
 * sessions are addressable (a prior duplicate resolver read only `provenance.reply`
 * and could not address a VSCodium/Cursor terminal the watchdog handled fine).
 * `--pane`/`--pty` target a backend directly when the handle is already known.
 */
import type { Command } from 'commander';
import { type ActiveSession } from '../lib/session/active.js';
interface InjectOptions {
    pane?: string;
    socket?: string;
    pty?: string;
    /**
     * The remote device. A single `--device box` arrives here as `['box']` because
     * the parent `sessions` command's variadic `-D, --device <target...>` shadows
     * this subcommand's scalar option under `optsWithGlobals()` — normalize it with
     * {@link normalizeInjectDevice} before use (PHNX-3688).
     */
    device?: string | string[];
    enter?: boolean;
    combined?: boolean;
    json?: boolean;
}
/**
 * Whether an active session is the one `sessions inject <token>` means. Matches
 * a resolvable session id (exact or unique prefix) AND — for a tmux-hosted row
 * whose full id never resolved (`sessionId` absent) — the `ag-<agent>-<shortid>`
 * tmux name's `shortid` suffix (exact or prefix), the full tmux name, and the
 * pane id. Those are the only selectors an id-less remote tmux row exposes, so
 * without this an operator has no tool-native way to nudge it (PHNX-3688).
 */
export declare function matchInjectSelector(session: ActiveSession, token: string): boolean;
/**
 * The `--device` selector, normalized to a single host string. `optsWithGlobals()`
 * merges the parent `sessions` command's variadic `-D, --device <target...>` over
 * this subcommand's scalar `--device`, so a single `--device box` arrives as
 * `['box']` — which flowed straight into `sshExec` and crashed on
 * `host.startsWith` (PHNX-3688). Coerce the array to its one element; fail loud on
 * several, since inject delivers to exactly one terminal (a fan-out spelling is a
 * user error, not a first-of-list guess).
 */
export declare function normalizeInjectDevice(value: string | string[] | undefined): string | undefined;
/**
 * The `agents sessions inject` argv to re-run ON a device (its tmux panes live
 * there, so resolution must happen there). Every flag rides along EXCEPT
 * `--device`: the command runs on the device, resolving locally. Pure so the
 * forwarded invocation is asserted without an SSH hop (PHNX-3688).
 */
export declare function buildRemoteInjectArgv(sessionId: string, text: string, options: InjectOptions): string[];
/**
 * Resolve `device` (registry alias or `user@host`) to an ssh target and re-run
 * `agents sessions inject` there, so a bare session id + `--device` resolves on
 * the box that actually holds the session's tmux panes. The tool-native form of
 * the `agents ssh <device> "agents sessions inject <id> …"` workaround (PHNX-3688).
 */
/**
 * Resolve `--device` to an ssh target. A registered device becomes its
 * `user@dnsName`; a bare unknown name (an ad-hoc `user@host` or ssh_config alias)
 * is handed to ssh verbatim (`resolveHost` returns null for it). A registered
 * device we CANNOT dial — password-auth, addressless — throws its typed error and
 * is NOT degraded to the raw name, which could ssh a coincidentally-matching but
 * unrelated `~/.ssh/config` Host (PHNX-3688 review).
 */
export declare function resolveInjectSshTarget(device: string): Promise<string>;
/** Attach the `inject` subcommand to an existing `sessions` command. */
export declare function registerSessionsInjectCommand(sessionsCmd: Command): void;
export {};
