feat: move web-probe to top-level cli (#933)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-26 09:57:14 +08:00
committed by GitHub
parent 0328967e58
commit 241a2d511f
18 changed files with 249 additions and 274 deletions
@@ -1,5 +1,5 @@
// SPEC: PJ2026-01060508 Web哨兵 draft-2026-06-25-p0-web-probe-sentinel.
// Responsibility: Stable wrapper contract for the existing hwlab nodes web-probe observe CLI verbs.
// Responsibility: Stable wrapper contract for the existing web-probe observe CLI verbs.
export type WebObserveWrapperAction = "start" | "status" | "command" | "stop" | "collect" | "analyze";
@@ -92,7 +92,7 @@ export function buildWebObserveWrapperContract(input: WebObserveWrapperInput): R
id: observerId,
jobId: input.jobId ?? observerId,
cli: {
family: "bun scripts/cli.ts hwlab nodes web-probe observe",
family: "bun scripts/cli.ts web-probe observe",
commandShape: webObserveWrapperCommandShape(input),
verb: input.action,
valuesRedacted: true,
@@ -185,7 +185,7 @@ function artifactPath(stateDir: string | null, relative: string): string | null
}
function webObserveWrapperCommandShape(input: WebObserveWrapperInput): string {
const base = ["bun", "scripts/cli.ts", "hwlab", "nodes", "web-probe", "observe", input.action];
const base = ["bun", "scripts/cli.ts", "web-probe", "observe", input.action];
const observerId = input.id ?? input.jobId;
const parts = observerId === null
? [...base, "--node", input.node, "--lane", input.lane]