/** * Pure string helpers for shaping a command before it is handed to a box. * * No imports, no I/O — these are shared verbatim between the CLI and any other * caller that needs to build the same remote command line. */ /** * Preserve a single command string; safely join argv when an arg parser split it. * * A single element is passed through untouched so an already-quoted command * survives intact; multiple elements are individually quoted and joined, which * is what makes `outposts exec -- ls "my dir"` behave. */ export declare function joinCommandParts(commandParts: string[]): string; /** * Prefix that best-effort `cd`s into the box's HQ checkout before running the * caller's command. `exec` runs over two transports with two different default * working directories — the normal SSM path is dropped to `ec2-user` by hq-pro, * while SSH lands in that login user's home. Explicit `--root` commands retain * the SSM root context. Without this prefix, `exec -- pwd` printed an unhelpful, * transport-dependent directory. The trailing `|| true` keeps the command * running from the default directory when no HQ checkout is present, so exec * never fails merely because the box has no HQ folder. */ export declare const REMOTE_HQ_DIR_PREFIX = "export HOME=\"${HOME:-/root}\"; cd \"$HOME/hq\" 2>/dev/null || cd ~ec2-user/hq 2>/dev/null || true"; /** Wrap `command` so it runs from the box's HQ folder (see {@link REMOTE_HQ_DIR_PREFIX}). */ export declare function withRemoteHqDir(command: string): string; /** Wrap a remote command in the explicit privileged mode used by SSH fallback. */ export declare function withRemoteRoot(command: string): string; //# sourceMappingURL=remote-command.d.ts.map