import { Command } from 'commander';
import { resolveHelperExec, resolveSocketPath } from '../lib/computer/computer-rpc.js';
/**
 * Pure platform gate. The computer subsystem is macOS-only for LOCAL driving
 * (Accessibility / launchctl). It is NOT blocked off macOS when a remote daemon
 * is reachable — either a configured TCP endpoint (COMPUTER_HELPER_TCP, e.g. a
 * Windows daemon over a tunnel) or a `--device <name>` remote invocation. Kept
 * pure so the gating rule is unit-testable without a live command tree.
 */
export declare function shouldBlockOffPlatform(opts: {
    platform: NodeJS.Platform;
    tcpConfigured: boolean;
    vncConfigured?: boolean;
    device?: string;
}): boolean;
/**
 * Sniff the image format from the leading magic bytes: PNG starts with the
 * 8-byte signature `89 50 4E 47` ("\x89PNG"), JPEG with `FF D8 FF`. Returns the
 * canonical file extension, or null for anything else.
 */
export declare function detectImageFormat(buf: Buffer): '.png' | '.jpg' | null;
/**
 * Make the screenshot filename honest about its bytes. The two helper backends
 * encode DIFFERENT formats and neither re-encodes to match the requested name:
 * the macOS helper (ScreenCaptureKit) returns JPEG
 * (native/computer-mac/Sources/ComputerHelper/Screenshot.swift:207,212),
 * the Windows helper returns PNG
 * (native/computer-win/Screenshot.cs:33). So a fixed default extension
 * cannot be correct for both — the only honest path is to sniff the real format
 * and swap the extension to match. Pure so it's unit-testable.
 *
 * Returns the path to write to (caller's path with its extension corrected) and
 * whether a correction was made. Unknown formats pass through unchanged.
 */
export declare function reconcileScreenshotExt(outPath: string, buf: Buffer): {
    path: string;
    corrected: boolean;
};
export declare function registerComputerCommand(program: Command): void;
export declare function registerComputerSubcommands(program: Command): void;
export declare function buildRestartTaskScript(taskName: string, exeName: string): string;
/**
 * Emit a `computer.action` marker for `computer run`'s whole loop process, so
 * `agents computer sessions` groups every verb the loop drives under one
 * task-labeled row instead of a bare pid with no task text (see
 * lib/computer/sessions-list.ts's "Grouping key" docblock note). The task
 * text is bounded to `TASK_PREVIEW_MAX_CHARS` — never the full unbounded
 * `--task` string — matching that module's retention/privacy note. Exported
 * so the truncation behavior is directly unit-testable against the real
 * event ledger, the same seam `computer-actions.test.ts` already uses for
 * `emitComputerAction`.
 */
export declare function emitComputerRunTaskMarker(opts: {
    task: string;
    bundle?: string;
    device?: string;
}): void;
/**
 * launchd Label for this process's helper — the production identifier for a real
 * invocation, namespaced under a redirected HOME (RUSH-2639). launchd routes
 * bootout/bootstrap/kickstart/print by identifier alone, never by the plist's
 * path, so without this a process running under a sandbox HOME tears down the
 * operator's live helper.
 */
export declare function helperLabel(): string;
/**
 * Install the macOS helper locally: resolve (or download + verify) the signed,
 * notarized .app, copy it to /Applications, verify the destination signature,
 * and write the LaunchAgent plist (inactive — activation is a separate opt-in
 * step via `start`). Throws on any failure. Shared by `agents computer setup`
 * and the unified `agents setup computer` wizard so there is one install path.
 */
export declare function installComputerHelperMacLocal(): Promise<{
    appDest: string;
    plistPath: string;
}>;
/**
 * Activate the local helper daemon via launchd (render policy + peers, bootout
 * → bootstrap → kickstart, wait for the socket, probe AX trust). Throws on any
 * failure. Returns the trust status so callers can guide the permission grant.
 * Shared by `agents computer start` and the `agents setup computer` wizard.
 */
export declare function activateComputerHelperMacLocal(): Promise<{
    trusted: boolean;
    socketPath: string;
    logPath: string;
}>;
/** Probe the running daemon's Accessibility trust status without re-activating.
 * Returns false (never throws) if the socket is down or the RPC errors — used to
 * poll while the user grants permissions in System Settings. */
export declare function probeComputerTrust(): Promise<boolean>;
/**
 * The helper's launchd plist.
 *
 * The `EnvironmentVariables` dict carries HOME (RUSH-2639, see
 * `lib/service-manifest.ts`): launchd applies this dict on top of the LOGIN
 * SESSION's environment, never the environment of whoever called `launchctl
 * bootstrap`, so a manifest that omits HOME hands the helper the account home no
 * matter which home the caller resolved. That is a silent escape from any
 * redirected HOME — the hermetic test harness's, and an agent's isolated version
 * home alike.
 */
export declare function renderLaunchAgentPlist(opts: {
    label: string;
    exec: string;
    socketPath: string;
    logPath: string;
}): string;
export { resolveHelperExec as resolveHelperPath };
export { resolveSocketPath };
