refactor(workspaces): make Docker a generic runtime

The server build, typecheck, and dry-run package pass with the Docker implementation deleted from the tree. paseo-workspace-helper remains a mandatory generic runtime contract requirement.
This commit is contained in:
Mohamed Boudra
2026-08-13 21:59:13 +02:00
parent cbb8295ceb
commit 36d8464068
51 changed files with 781 additions and 464 deletions
+1
View File
@@ -29,6 +29,7 @@
"dependencies": {
"@clack/prompts": "^1.0.0",
"@getpaseo/client": "0.3.1",
"@getpaseo/docker-workspace-runtime": "*",
"@getpaseo/protocol": "0.3.1",
"@getpaseo/server": "0.3.1",
"chalk": "^5.3.0",
@@ -98,12 +98,24 @@ const DETACHED_STARTUP_GRACE_MS = 1200;
const PID_POLL_INTERVAL_MS = 100;
const DAEMON_LOG_FILENAME = "daemon.log";
const DAEMON_PID_FILENAME = "paseo.pid";
const require = createRequire(import.meta.url);
const DISTRIBUTION_WORKSPACE_RUNTIMES = JSON.stringify({
docker: {
type: "command",
label: "Docker",
command: ["@getpaseo/docker-workspace-runtime"],
options: { image: "paseo-workspace-runtime:phase3-qa", bindMounts: [] },
},
});
const DISTRIBUTION_PACKAGE_ROOT = path.resolve(
path.dirname(require.resolve("@getpaseo/docker-workspace-runtime/package.json")),
"..",
"..",
);
export const DEFAULT_STOP_TIMEOUT_MS = 15_000;
export const DEFAULT_KILL_TIMEOUT_MS = 3_000;
const require = createRequire(import.meta.url);
const defaultDaemonLaunchRuntime: DaemonLaunchRuntime = {
resolveRunnerEntry: resolveDaemonRunnerEntry,
resolveHome: resolvePaseoHome,
@@ -156,6 +168,8 @@ function buildRunnerArgs(options: DaemonStartOptions): string[] {
function buildChildEnv(options: DaemonStartOptions): NodeJS.ProcessEnv {
const childEnv: NodeJS.ProcessEnv = { ...process.env };
childEnv.PASEO_DISTRIBUTION_WORKSPACE_RUNTIMES = DISTRIBUTION_WORKSPACE_RUNTIMES;
childEnv.PASEO_DISTRIBUTION_PACKAGE_ROOT = DISTRIBUTION_PACKAGE_ROOT;
if (options.home) {
childEnv.PASEO_HOME = options.home;
}