feat: allow host source workspace bootstrap

This commit is contained in:
Codex
2026-06-29 09:30:38 +00:00
parent c6cfe750c4
commit 0429728330
3 changed files with 252 additions and 0 deletions
+4
View File
@@ -356,8 +356,10 @@ export interface HwlabRuntimeSourceWorkspaceSpec {
readonly requiredFiles: readonly string[];
readonly hostDependencies?: HwlabRuntimeSourceWorkspaceHostDependenciesSpec;
readonly install: {
readonly executor: "k3s-job" | "host";
readonly dependencyCommand: string;
readonly browserCommand: string;
readonly stateDir?: string;
readonly timeoutSeconds: number;
};
}
@@ -881,8 +883,10 @@ function sourceWorkspaceConfig(value: unknown, path: string): HwlabRuntimeSource
.map((item, index) => relativeWorkspacePathField(item, `${path}.requiredFiles[${index}]`)),
hostDependencies: sourceWorkspaceHostDependenciesConfig(raw.hostDependencies, `${path}.hostDependencies`),
install: {
executor: enumStringField(install, "executor", `${path}.install`, ["k3s-job", "host"]),
dependencyCommand: stringField(install, "dependencyCommand", `${path}.install`),
browserCommand: stringField(install, "browserCommand", `${path}.install`),
...(install.stateDir === undefined ? {} : { stateDir: absoluteHostPathField(stringField(install, "stateDir", `${path}.install`), `${path}.install.stateDir`) }),
timeoutSeconds: numberField(install, "timeoutSeconds", `${path}.install`),
},
};