/** * `hq outposts` — the full command tree for managing personal HQ Outposts from a * terminal instead of the web console. * * Targets the hq-pro `/outpost/*` control plane — the same routes the console's * outpost panel calls — through an injected transport, so the host CLI keeps * ownership of auth, telemetry, and error decoration while the command surface * itself lives here and is shared by every consumer. * * Outposts are PERSONAL / caller-scoped: hq-pro keys every `/outpost/*` route on * the caller's Cognito sub, so there is no `--company`. `--id ` selects * a specific box; when omitted hq-pro targets the caller's primary slot. * * Subcommands: * outposts provision — provision a box (paid; requires --yes) * outposts list — every Outpost you own (row summaries) * outposts status [--id] — live detail for one box * outposts exec — run a command on the box (sync/async/detach) * outposts exec-stage — presign an input upload for an async command * outposts exec-submit — fire-and-forget async submit * outposts exec-result — poll an async command * outposts codex-enable [--id] — enable / retry Codex on the box * outposts login [--id] — request a fresh login URL * outposts login-code — hand the box its Claude sign-in code * outposts destroy [--id] --yes — tear the box down (destructive; flag-guarded) * outposts heartbeat — hidden; box-side systemd loop * outposts session-host — hidden; box-side sessions for the desktop app * outposts self-deploy — hidden; make THIS host an unmanaged outpost * outposts replica-sync — hidden; box-side full-replica timer target * * NOTE: hq-pro exposes no rename or settings-mutation route for Outposts (the web * console can't rename them either), so this wraps only the lifecycle and status * routes that exist. Renaming an Outpost is not a backend capability. */ import { Command } from "commander"; import { type OutpostTokenSource } from "./client.js"; import { type ReplicaSyncDependencies } from "./host-deps.js"; import type { OutpostTransport } from "./transport.js"; /** * What the command tree needs from its host CLI. * * The transport is the load-bearing one: hq-cli passes its own `vaultApiFetch`, so * Sentry breadcrumbs, the `hqk_` API-key path-rewrite table, plan-gate decoding, * and plan-limit peeking all keep working exactly as they did when this code lived * in the CLI. */ export interface OutpostsCommandDeps { /** HTTP seam for every control-plane call. */ transport: OutpostTransport; /** Resolve a bearer token for an interactive command. */ getToken: OutpostTokenSource; /** * Resolve a bearer token without prompting. Used by the box-side heartbeat, * which runs under systemd where there is nobody to prompt. Falls back to * `getToken`. */ getTokenNonInteractive?: () => Promise; /** * Read the cached Cognito session. `provision` sends the refresh token so the * box can authenticate AS the caller. */ loadCachedTokens: () => { refreshToken?: string; } | undefined; /** Resolve the caller's canonical `prs_*` uid (heartbeat identity). */ resolveCallerPersonUid: (token: string, apiBaseUrl?: string) => Promise; /** Control-plane origin for the heartbeat's realtime credential fetch. */ defaultApiBaseUrl: string; /** Origin override applied to every control-plane call. */ baseUrl?: string; /** Override host-environment probes — used by `self-deploy`/`replica-sync` tests. */ host?: Partial; } export declare function registerOutpostsCommand(program: Command, deps: OutpostsCommandDeps): void; //# sourceMappingURL=command.d.ts.map