fix(runtime)!: preserve unknown debugger attachment state

Keep omitted discovery attachment state as null through Node, browser, Electron, and reconciliation evidence. Report the uncertainty while retaining Node observation unless discovery explicitly marks the target attached. Reject worker TargetInfo records missing the required boolean with partial coverage.

Validate omitted and explicit states through provider, CLI, and MCP boundaries and real Node 24 Inspector workflows. Consolidate Electron regression coverage into the existing list-and-inspect workflow.

BREAKING CHANGE: attached fields in JavaScript runtime, browser, and Electron target discovery and inspection results may be null when discovery does not report attachment state.
This commit is contained in:
morluto committed 2026-10-12 12:37:00 +08:00
1 parent 48c352b6bf
commit e55ef72135
23 files changed
+249 -40

No files matched your search

@@ -89,7 +89,12 @@ export type JavaScriptRuntimeTargetLocation = z.infer<
const javascriptRuntimeTargetSchema = z.strictObject({
target_id: z.string().min(1),
protocol_type: z.string().min(1),
attached: z.boolean(),
attached: z
.boolean()
.nullable()
.describe(
"Discovery-reported debugger attachment state; null means unknown",
),
location: javascriptRuntimeTargetLocationSchema,
});