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:
@@ -23,7 +23,7 @@ const endpointTargetSchema = z.object({
|
||||
type: z.string().min(1),
|
||||
title: z.string().default(""),
|
||||
url: z.string(),
|
||||
attached: z.boolean().default(false),
|
||||
attached: z.boolean().nullable().optional(),
|
||||
webSocketDebuggerUrl: z.string().min(1).optional(),
|
||||
});
|
||||
const endpointTargetsSchema = z.array(endpointTargetSchema);
|
||||
@@ -46,7 +46,7 @@ export interface CdpEndpointTarget {
|
||||
readonly type: string;
|
||||
readonly title: string;
|
||||
readonly url: string;
|
||||
readonly attached: boolean;
|
||||
readonly attached: boolean | null;
|
||||
readonly webSocket?: CdpPageWebSocketEndpoint;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ export const discoverCdpEndpoint = async (
|
||||
type: target.type,
|
||||
title: sanitizeTargetTitle(target.title, target.url),
|
||||
url: target.url,
|
||||
attached: target.attached,
|
||||
attached: target.attached ?? null,
|
||||
...targetWebSocket(endpoint, target, operation),
|
||||
})),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user