feat: move web-probe to top-level cli (#933)
Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
@@ -335,7 +335,7 @@ function serviceHealth(config: WebProbeSentinelServiceConfig, db: Database, sche
|
||||
checks.analyzer = {
|
||||
ok: true,
|
||||
source: "existing observe analyze CLI command",
|
||||
command: `bun scripts/cli.ts hwlab nodes web-probe observe analyze --node ${config.node} --lane ${config.lane} --state-dir <stateDir>`,
|
||||
command: `bun scripts/cli.ts web-probe observe analyze --node ${config.node} --lane ${config.lane} --state-dir <stateDir>`,
|
||||
};
|
||||
const ok = Object.values(checks).every((check) => check.ok === true);
|
||||
return { ok, status: ok ? "healthy" : "degraded", node: config.node, lane: config.lane, checks, valuesRedacted: true };
|
||||
@@ -367,7 +367,7 @@ function buildObserveCommandPlan(config: WebProbeSentinelServiceConfig, scenario
|
||||
const start: CommandPlanStep = {
|
||||
phase: "observe-start",
|
||||
argv: [
|
||||
"bun", "scripts/cli.ts", "hwlab", "nodes", "web-probe", "observe", "start",
|
||||
"bun", "scripts/cli.ts", "web-probe", "observe", "start",
|
||||
"--node", config.node,
|
||||
"--lane", config.lane,
|
||||
"--target-path", targetPath,
|
||||
@@ -379,14 +379,14 @@ function buildObserveCommandPlan(config: WebProbeSentinelServiceConfig, scenario
|
||||
};
|
||||
const commands = arrayAt(scenario, "commandSequence").map((item) => {
|
||||
const type = stringAt(item, "type");
|
||||
const argv = ["bun", "scripts/cli.ts", "hwlab", "nodes", "web-probe", "observe", "command", "<observerId>", "--type", type];
|
||||
const argv = ["bun", "scripts/cli.ts", "web-probe", "observe", "command", "<observerId>", "--type", type];
|
||||
if (type === "selectProvider") argv.push("--provider", stringAt(item, "provider"));
|
||||
if (type === "sendPrompt") argv.push("--text-stdin");
|
||||
return { phase: `observe-command-${type}`, argv, stdinSource: type === "sendPrompt" ? "prompt-source" : "none" } satisfies CommandPlanStep;
|
||||
});
|
||||
const analyze: CommandPlanStep = {
|
||||
phase: "observe-analyze",
|
||||
argv: ["bun", "scripts/cli.ts", "hwlab", "nodes", "web-probe", "observe", "analyze", "<observerId>"],
|
||||
argv: ["bun", "scripts/cli.ts", "web-probe", "observe", "analyze", "<observerId>"],
|
||||
stdinSource: "none",
|
||||
};
|
||||
return [start, ...commands, analyze];
|
||||
|
||||
Reference in New Issue
Block a user