feat: support mdtodo workspace-root web-probe config (#899)

Co-authored-by: Codex <codex@noreply.local>
This commit is contained in:
Lyon
2026-06-25 23:10:55 +08:00
committed by GitHub
parent 87b90e45b6
commit 2299274f73
3 changed files with 10 additions and 1 deletions
+7
View File
@@ -148,6 +148,7 @@ interface NodeWebProbeObserveOptions {
commandStatus: string | null;
commandHwpodId: string | null;
commandNodeId: string | null;
commandWorkspaceRoot: string | null;
commandRoot: string | null;
}
@@ -7582,6 +7583,8 @@ function parseNodeWebProbeObserveOptions(
"--status",
"--hwpod-id",
"--node-id",
"--workspace-root",
"--workspace-root-ref",
"--root",
]), new Set(["--force", "--full", "--text-stdin"]));
const commandTypeRaw = optionValue(args, "--type") ?? null;
@@ -7635,6 +7638,7 @@ function parseNodeWebProbeObserveOptions(
const commandStatus = optionValue(args, "--status") ?? null;
const commandHwpodId = optionValue(args, "--hwpod-id") ?? null;
const commandNodeId = optionValue(args, "--node-id") ?? null;
const commandWorkspaceRoot = optionValue(args, "--workspace-root") ?? optionValue(args, "--workspace-root-ref") ?? null;
const commandRoot = optionValue(args, "--root") ?? null;
for (const [label, value] of [
["--source-id", commandSourceId],
@@ -7646,6 +7650,7 @@ function parseNodeWebProbeObserveOptions(
["--status", commandStatus],
["--hwpod-id", commandHwpodId],
["--node-id", commandNodeId],
["--workspace-root/--workspace-root-ref", commandWorkspaceRoot],
["--root", commandRoot],
] as const) {
if (value !== null && (value.includes("\0") || value.length > 500)) throw new Error(`unsafe web-probe observe ${label}: expected 1-500 non-NUL chars`);
@@ -7697,6 +7702,7 @@ function parseNodeWebProbeObserveOptions(
commandStatus,
commandHwpodId,
commandNodeId,
commandWorkspaceRoot,
commandRoot,
};
}
@@ -8419,6 +8425,7 @@ function runNodeWebProbeObserveCommand(options: NodeWebProbeObserveOptions, spec
status: options.commandStatus,
hwpodId: options.commandHwpodId,
nodeId: options.commandNodeId,
workspaceRoot: options.commandWorkspaceRoot,
root: options.commandRoot,
};
const preStopStatus = options.force && stopCommand