feat: add mdtodo web-probe commands

This commit is contained in:
Codex
2026-06-26 12:11:31 +00:00
parent ff9dd29faa
commit 0fcdd12c83
8 changed files with 375 additions and 20 deletions
+6
View File
@@ -130,10 +130,13 @@ export type NodeWebProbeObserveCommandType =
| "selectMdtodoFile"
| "selectMdtodoTask"
| "expandMdtodoTask"
| "openMdtodoReportPreview"
| "toggleMdtodoReportFullscreen"
| "openMdtodoSourceConfig"
| "configureMdtodoHwpodSource"
| "probeMdtodoSource"
| "reindexMdtodoSource"
| "editMdtodoTaskInline"
| "editMdtodoTaskTitle"
| "editMdtodoTaskBody"
| "toggleMdtodoTaskStatus"
@@ -198,8 +201,11 @@ export interface NodeWebProbeObserveOptions {
commandBlocking: boolean | null;
commandSourceId: string | null;
commandFileRef: string | null;
commandFilename: string | null;
commandTaskRef: string | null;
commandTaskId: string | null;
commandField: string | null;
commandLink: string | null;
commandTitle: string | null;
commandBody: string | null;
commandStatus: string | null;
+19 -1
View File
@@ -209,9 +209,12 @@ export function parseNodeWebProbeObserveOptions(
"--finding-id",
"--source-id",
"--file-ref",
"--filename",
"--task-ref",
"--task",
"--task-id",
"--field",
"--link",
"--title",
"--body",
"--status",
@@ -270,8 +273,11 @@ export function parseNodeWebProbeObserveOptions(
const commandText = commandTextFromStdin ? readFileSync(0, "utf8") : commandTextOption;
const commandSourceId = optionValue(args, "--source-id") ?? null;
const commandFileRef = optionValue(args, "--file-ref") ?? null;
const commandFilename = optionValue(args, "--filename") ?? null;
const commandTaskRef = optionValue(args, "--task-ref") ?? null;
const commandTaskId = optionValue(args, "--task-id") ?? optionValue(args, "--task") ?? null;
const commandField = optionValue(args, "--field") ?? null;
const commandLink = optionValue(args, "--link") ?? null;
const commandTitle = optionValue(args, "--title") ?? null;
const commandBody = optionValue(args, "--body") ?? null;
const commandStatus = optionValue(args, "--status") ?? null;
@@ -296,8 +302,11 @@ export function parseNodeWebProbeObserveOptions(
["--finding-id", commandFindingId],
["--source-id", commandSourceId],
["--file-ref", commandFileRef],
["--filename", commandFilename],
["--task-ref", commandTaskRef],
["--task/--task-id", commandTaskId],
["--field", commandField],
["--link", commandLink],
["--title", commandTitle],
["--body", commandBody],
["--status", commandStatus],
@@ -359,8 +368,11 @@ export function parseNodeWebProbeObserveOptions(
commandBlocking,
commandSourceId,
commandFileRef,
commandFilename,
commandTaskRef,
commandTaskId,
commandField,
commandLink,
commandTitle,
commandBody,
commandStatus,
@@ -391,10 +403,13 @@ export function parseNodeWebProbeObserveCommandType(value: string): NodeWebProbe
|| value === "selectMdtodoFile"
|| value === "selectMdtodoTask"
|| value === "expandMdtodoTask"
|| value === "openMdtodoReportPreview"
|| value === "toggleMdtodoReportFullscreen"
|| value === "openMdtodoSourceConfig"
|| value === "configureMdtodoHwpodSource"
|| value === "probeMdtodoSource"
|| value === "reindexMdtodoSource"
|| value === "editMdtodoTaskInline"
|| value === "editMdtodoTaskTitle"
|| value === "editMdtodoTaskBody"
|| value === "toggleMdtodoTaskStatus"
@@ -408,7 +423,7 @@ export function parseNodeWebProbeObserveCommandType(value: string): NodeWebProbe
|| value === "mark"
|| value === "stop"
) return value;
throw new Error(`web-probe observe command --type must be login, preflight, goto, gotoProjectMdtodo, newSession, sendPrompt, steer, cancel, selectProvider, clickSession, refreshCurrentSession, switchAwayAndBack, assertSessionInvariant, selectProjectSource, selectMdtodoSource, selectMdtodoFile, selectMdtodoTask, expandMdtodoTask, openMdtodoSourceConfig, configureMdtodoHwpodSource, probeMdtodoSource, reindexMdtodoSource, editMdtodoTaskTitle, editMdtodoTaskBody, toggleMdtodoTaskStatus, addMdtodoRootTask, addMdtodoSubTask, continueMdtodoTask, deleteMdtodoTask, launchWorkbenchFromTask, launchWorkbenchFromMdtodo, screenshot, mark, or stop; got ${value}`);
throw new Error(`web-probe observe command --type must be login, preflight, goto, gotoProjectMdtodo, newSession, sendPrompt, steer, cancel, selectProvider, clickSession, refreshCurrentSession, switchAwayAndBack, assertSessionInvariant, selectProjectSource, selectMdtodoSource, selectMdtodoFile, selectMdtodoTask, expandMdtodoTask, openMdtodoReportPreview, toggleMdtodoReportFullscreen, openMdtodoSourceConfig, configureMdtodoHwpodSource, probeMdtodoSource, reindexMdtodoSource, editMdtodoTaskInline, editMdtodoTaskTitle, editMdtodoTaskBody, toggleMdtodoTaskStatus, addMdtodoRootTask, addMdtodoSubTask, continueMdtodoTask, deleteMdtodoTask, launchWorkbenchFromTask, launchWorkbenchFromMdtodo, screenshot, mark, or stop; got ${value}`);
}
export function parseWebProbeBrowserProxyMode(value: string | undefined): WebProbeBrowserProxyMode {
@@ -1369,8 +1384,11 @@ export function runNodeWebProbeObserveCommand(options: NodeWebProbeObserveOption
blocking: options.commandBlocking,
sourceId: options.commandSourceId,
fileRef: options.commandFileRef,
filename: options.commandFilename,
taskRef: options.commandTaskRef,
taskId: options.commandTaskId,
field: options.commandField,
link: options.commandLink,
title: options.commandTitle,
body: options.commandBody,
status: options.commandStatus,