fix: 修复 Web observe turn 可见性
This commit is contained in:
@@ -205,6 +205,8 @@ function renderWebObserveStatusTable(value: Record<string, unknown>): string {
|
||||
function renderWebObserveCommandTable(value: Record<string, unknown>): string {
|
||||
const observerCommand = record(value.observerCommand);
|
||||
const observer = record(value.observer);
|
||||
const control = record(value.control);
|
||||
const asyncTurn = record(value.asyncTurn);
|
||||
const result = record(observer?.result);
|
||||
const error = record(observer?.error);
|
||||
const details = record(error?.details);
|
||||
@@ -216,13 +218,14 @@ function renderWebObserveCommandTable(value: Record<string, unknown>): string {
|
||||
`web-probe observe command (${webObserveText(value.status)})`,
|
||||
"",
|
||||
...renderWebObserveWrapperContract(value),
|
||||
webObserveTable(["OBSERVER", "COMMAND", "TYPE", "STATUS", "TEXT_BYTES", "TEXT_HASH", "DETAIL"], [[
|
||||
webObserveTable(["OBSERVER", "COMMAND", "TYPE", "CONTROL", "TURN_SUBMIT", "TURN_TERMINAL", "TRACE", "DETAIL"], [[
|
||||
id,
|
||||
value.commandId,
|
||||
observerCommand?.type,
|
||||
observer?.ok === false ? "failed" : observer?.completedAt !== undefined ? "completed" : value.status,
|
||||
observerCommand?.textBytes,
|
||||
webObserveShort(webObserveText(observerCommand?.textHash), 24),
|
||||
control?.executionStatus ?? (observer?.ok === false ? "failed" : observer?.completedAt !== undefined ? "completed" : value.status),
|
||||
asyncTurn?.submissionStatus ?? "not-observed",
|
||||
asyncTurn?.terminalObserved === true ? asyncTurn.terminalStatus : "not-observed",
|
||||
webObserveShort(webObserveText(asyncTurn?.traceId), 24),
|
||||
webObserveShort(webObserveText(result?.mark ?? result?.currentUrl ?? observer?.error ?? observer?.queued), 80),
|
||||
]]),
|
||||
...(readiness !== null ? [
|
||||
@@ -254,10 +257,12 @@ function renderWebObserveCommandTable(value: Record<string, unknown>): string {
|
||||
"Next:",
|
||||
` bun scripts/cli.ts web-probe observe status ${id}`,
|
||||
` bun scripts/cli.ts web-probe observe analyze ${id}`,
|
||||
` bun scripts/cli.ts web-probe observe collect ${id} --view turn-summary --command-id ${webObserveText(value.commandId)}`,
|
||||
"",
|
||||
"Disclosure:",
|
||||
" default view is a bounded command result; pass --full to expose the complete command result JSON.",
|
||||
" use observe status/analyze for sampled state.",
|
||||
" CONTROL completed means the observer browser action finished; it does not imply the asynchronous business turn reached a terminal state.",
|
||||
" TURN_SUBMIT and TURN_TERMINAL are separate evidence fields; use the exact command-id turn-summary for sampled terminal state.",
|
||||
];
|
||||
return lines.join("\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user