feat(web-probe): add semantic YAML origins

This commit is contained in:
Codex
2026-07-10 12:37:13 +02:00
parent 2d4c1a5ffa
commit 2c47fd6528
18 changed files with 545 additions and 48 deletions
+19 -5
View File
@@ -14,7 +14,7 @@ import { runCommand, type CommandResult } from "../command";
import { startJob } from "../jobs";
import { classifySshTcpPoolFailure } from "../ssh";
import { HWLAB_NODE_CONTROL_PLANE_CONFIG_PATH, hwlabNodeControlPlaneInfraHelp, runHwlabNodeControlPlaneInfra } from "../hwlab-node-control-plane";
import { hwlabRuntimeLaneConfigPath, hwlabRuntimeLaneIds, hwlabRuntimeLaneSpecForNode, hwlabRuntimeNodeIds, isHwlabRuntimeLane, type HwlabRuntimeLane, type HwlabRuntimeLaneSpec, type HwlabRuntimeObservabilityRecordingRuleSpec, type HwlabRuntimeObservabilitySpec, type HwlabRuntimeObservabilityWarningAlertSpec, type HwlabRuntimePublicExposureSpec, type HwlabRuntimeWebProbeAlertThresholdsSpec, type HwlabRuntimeWebProbeProjectManagementSpec } from "../hwlab-node-lanes";
import { hwlabRuntimeLaneConfigPath, hwlabRuntimeLaneIds, hwlabRuntimeLaneSpecForNode, hwlabRuntimeNodeIds, isHwlabRuntimeLane, type HwlabRuntimeLane, type HwlabRuntimeLaneSpec, type HwlabRuntimeObservabilityRecordingRuleSpec, type HwlabRuntimeObservabilitySpec, type HwlabRuntimeObservabilityWarningAlertSpec, type HwlabRuntimePublicExposureSpec, type HwlabRuntimeWebProbeAlertThresholdsSpec, type HwlabRuntimeWebProbeOriginName, type HwlabRuntimeWebProbeProjectManagementSpec } from "../hwlab-node-lanes";
import { nodeWebProbeScriptRunnerSource } from "../hwlab-node-web-probe-runner-source";
import { nodeWebObserveAnalyzerSource } from "../hwlab-node-web-observe-analyzer-source";
import { nodeWebObserveRunnerSource } from "../hwlab-node-web-observe-runner-source";
@@ -55,8 +55,17 @@ export type SecretPreset = "openfga" | "master-server-admin-api-key" | "bootstra
export type NodeRuntimeRenderLocation = "node-host";
export type WebProbeBrowserProxyMode = "auto" | "direct";
export type WebProbeOriginName = HwlabRuntimeWebProbeOriginName | "custom";
export interface NodeWebProbeRunOptions {
export interface WebProbeOriginSelection {
readonly originName: WebProbeOriginName;
readonly originMode: "k8s-service-cluster-ip" | "public" | "custom-url";
readonly originConfigPath: string | null;
readonly browserProxyMode: WebProbeBrowserProxyMode;
readonly browserProxyModeSource: "cli" | "yaml-origin" | "yaml-web-probe" | "default";
}
export interface NodeWebProbeRunOptions extends WebProbeOriginSelection {
action: "run";
node: string;
lane: string;
@@ -76,7 +85,7 @@ export interface NodeWebProbeRunOptions {
commandTimeoutUserProvided: boolean;
}
export interface NodeWebProbeScriptOptions {
export interface NodeWebProbeScriptOptions extends WebProbeOriginSelection {
action: "script";
node: string;
lane: string;
@@ -98,7 +107,7 @@ export interface NodeWebProbeScriptOptions {
};
}
export interface NodeWebProbeScreenshotOptions {
export interface NodeWebProbeScreenshotOptions extends WebProbeOriginSelection {
action: "screenshot";
node: string;
lane: string;
@@ -164,7 +173,7 @@ export type NodeWebProbeObserveCommandType =
| "mark"
| "stop";
export interface NodeWebProbeObserveOptions {
export interface NodeWebProbeObserveOptions extends WebProbeOriginSelection {
action: "observe";
observeAction: NodeWebProbeObserveAction;
id: string | null;
@@ -258,6 +267,11 @@ export interface WebObserveIndexEntry {
workspace: string;
stateDir: string;
url: string;
originName: WebProbeOriginName | null;
originMode: WebProbeOriginSelection["originMode"] | null;
originConfigPath: string | null;
browserProxyMode: WebProbeBrowserProxyMode | null;
browserProxyModeSource: WebProbeOriginSelection["browserProxyModeSource"] | null;
targetPath: string;
status: string | null;
pid: number | null;