refactor: move remote screenshots into web-probe

This commit is contained in:
Codex
2026-06-27 06:14:10 +00:00
parent 6e06972acf
commit 9d1300a08e
11 changed files with 503 additions and 622 deletions
+2 -16
View File
@@ -22,10 +22,6 @@ import {
type SshRemoteCommandExecutor,
type SshRemoteCommandStreamHandlers,
} from "./ssh-file-transfer";
import {
isSshPlaywrightOperation,
runSshPlaywrightOperation,
} from "./ssh-playwright";
export interface ParsedSshArgs {
remoteCommand: string | null;
@@ -979,7 +975,7 @@ export function parseSshArgs(args: string[], routeRaw = "<route>"): ParsedSshArg
return { remoteCommand: buildPythonStdinCommand(args.slice(1)), requiresStdin: true, invocationKind: "helper" };
}
if (subcommand === "playwright") {
return { remoteCommand: null, requiresStdin: true, invocationKind: "helper" };
throw new Error("The remote Playwright operation has been removed; use `bun scripts/cli.ts web-probe screenshot ...` or `web-probe sentinel dashboard screenshot ...` for remote screenshots");
}
if (subcommand === "script" || subcommand === "shell") {
throw removedShellAliasError(subcommand, routeRaw, args.slice(1));
@@ -1173,7 +1169,7 @@ function parseWinRouteArgs(route: ParsedSshRoute, args: string[]): ParsedSshArgs
};
}
if (operation === "playwright") {
return { remoteCommand: null, requiresStdin: true, invocationKind: "helper" };
throw new Error("The remote Playwright operation has been removed; use `bun scripts/cli.ts web-probe screenshot ...` or `web-probe sentinel dashboard screenshot ...` for remote screenshots");
}
if (isWindowsFsReadOnlyOperation(operation)) {
return {
@@ -3613,16 +3609,6 @@ export async function runSsh(config: UniDeskConfig, providerId: string, args: st
buildWindowsPowerShellCommand: buildWindowsPowerShellInvocation,
});
}
if (isSshPlaywrightOperation(normalizedArgs)) {
const executor: SshRemoteCommandExecutor = {
runRemoteCommand: (remoteCommand, input) => runSshCaptureRemoteCommand(config, invocation, remoteCommand, input),
streamRemoteCommand: (remoteCommand, handlers, input, options) => runSshStreamRemoteCommand(config, invocation, remoteCommand, handlers, input, options),
};
return await runSshPlaywrightOperation(invocation, normalizedArgs, executor, {
buildRouteCommand: remoteCommandForRoute,
buildWindowsPowerShellCommand: buildWindowsPowerShellInvocation,
});
}
if (operationName === "apply-patch") {
const applyPatch = effectiveApplyPatchV2Invocation(invocation, normalizedArgs.slice(1));
const executor: ApplyPatchV2Executor = applyPatch.invocation.route.plane === "win"