@deepseek-ai/dsh-experimental-inspector 0.1.6-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +156 -0
- package/README.zh.md +156 -0
- package/lib/client.js +3424 -0
- package/lib/index.js +2406 -0
- package/lib/types/client/bridge/controller.d.ts +10 -0
- package/lib/types/client/bridge/dispatcher.d.ts +26 -0
- package/lib/types/client/bridge/lifecycle.d.ts +20 -0
- package/lib/types/client/bridge/publisher.d.ts +42 -0
- package/lib/types/client/bridge/rpc.d.ts +13 -0
- package/lib/types/client/bridge/transport.d.ts +34 -0
- package/lib/types/client/cdp/console.d.ts +45 -0
- package/lib/types/client/cdp/debugger.d.ts +8 -0
- package/lib/types/client/cdp/errors.d.ts +8 -0
- package/lib/types/client/cdp/heap-profiler.d.ts +8 -0
- package/lib/types/client/cdp/index.d.ts +10 -0
- package/lib/types/client/cdp/objects.d.ts +69 -0
- package/lib/types/client/cdp/profiler.d.ts +8 -0
- package/lib/types/client/cdp/properties.d.ts +16 -0
- package/lib/types/client/cdp/runtime.d.ts +79 -0
- package/lib/types/client/cdp/sources.d.ts +52 -0
- package/lib/types/client/cdp/stack.d.ts +27 -0
- package/lib/types/client/index.d.ts +3 -0
- package/lib/types/client/inspection/cordis.d.ts +3 -0
- package/lib/types/client/inspection/network.d.ts +4 -0
- package/lib/types/client/inspection/realm.d.ts +27 -0
- package/lib/types/client/plugin.d.ts +28 -0
- package/lib/types/host/bridge/controller.d.ts +108 -0
- package/lib/types/host/bridge/dispatcher.d.ts +16 -0
- package/lib/types/host/bridge/lifecycle.d.ts +42 -0
- package/lib/types/host/bridge/publisher.d.ts +31 -0
- package/lib/types/host/bridge/rpc.d.ts +15 -0
- package/lib/types/host/bridge/transport.d.ts +28 -0
- package/lib/types/host/cdp/console.d.ts +14 -0
- package/lib/types/host/cdp/debugger.d.ts +8 -0
- package/lib/types/host/cdp/errors.d.ts +6 -0
- package/lib/types/host/cdp/heap-profiler.d.ts +8 -0
- package/lib/types/host/cdp/index.d.ts +10 -0
- package/lib/types/host/cdp/objects.d.ts +8 -0
- package/lib/types/host/cdp/profiler.d.ts +8 -0
- package/lib/types/host/cdp/properties.d.ts +7 -0
- package/lib/types/host/cdp/runtime.d.ts +16 -0
- package/lib/types/host/cdp/sources.d.ts +14 -0
- package/lib/types/host/cdp/stack.d.ts +4 -0
- package/lib/types/host/index.d.ts +3 -0
- package/lib/types/host/inspection/cordis.d.ts +3 -0
- package/lib/types/host/inspection/network.d.ts +23 -0
- package/lib/types/host/inspection/realm.d.ts +9 -0
- package/lib/types/host/plugin.d.ts +19 -0
- package/lib/types/index.d.ts +50 -0
- package/lib/types/shared/bridge/buffer.d.ts +62 -0
- package/lib/types/shared/bridge/codec.d.ts +4 -0
- package/lib/types/shared/bridge/control-codec.d.ts +27 -0
- package/lib/types/shared/bridge/ids.d.ts +19 -0
- package/lib/types/shared/bridge/messages/control.d.ts +64 -0
- package/lib/types/shared/bridge/messages/cordis.d.ts +4 -0
- package/lib/types/shared/bridge/messages/network.d.ts +4 -0
- package/lib/types/shared/bridge/messages/observation.d.ts +110 -0
- package/lib/types/shared/bridge/messages/query/codec.d.ts +40 -0
- package/lib/types/shared/bridge/messages/query/commands.d.ts +35 -0
- package/lib/types/shared/bridge/messages/query/frames.d.ts +31 -0
- package/lib/types/shared/bridge/messages/query/index.d.ts +5 -0
- package/lib/types/shared/bridge/messages/runtime/command-codec.d.ts +9 -0
- package/lib/types/shared/bridge/messages/runtime/commands.d.ts +76 -0
- package/lib/types/shared/bridge/messages/runtime/console-frames.d.ts +52 -0
- package/lib/types/shared/bridge/messages/runtime/frames.d.ts +98 -0
- package/lib/types/shared/bridge/messages/runtime/index.d.ts +5 -0
- package/lib/types/shared/bridge/messages/runtime/value-codec.d.ts +28 -0
- package/lib/types/shared/bridge/messages/sources/codec.d.ts +15 -0
- package/lib/types/shared/bridge/messages/sources/commands.d.ts +42 -0
- package/lib/types/shared/bridge/messages/sources/frames.d.ts +67 -0
- package/lib/types/shared/bridge/messages/sources/index.d.ts +5 -0
- package/lib/types/shared/bridge/publisher.d.ts +33 -0
- package/lib/types/shared/bridge/query-reader.d.ts +10 -0
- package/lib/types/shared/bridge/rpc.d.ts +62 -0
- package/lib/types/shared/bridge/validation.d.ts +3 -0
- package/lib/types/shared/bridge/version.d.ts +3 -0
- package/lib/types/shared/cdp/capabilities.d.ts +17 -0
- package/lib/types/shared/cdp/console.d.ts +28 -0
- package/lib/types/shared/cdp/debugger.d.ts +69 -0
- package/lib/types/shared/cdp/errors.d.ts +27 -0
- package/lib/types/shared/cdp/ids.d.ts +9 -0
- package/lib/types/shared/cdp/index.d.ts +11 -0
- package/lib/types/shared/cdp/operations.d.ts +86 -0
- package/lib/types/shared/cdp/property.d.ts +28 -0
- package/lib/types/shared/cdp/realm.d.ts +137 -0
- package/lib/types/shared/cdp/remote-object.d.ts +44 -0
- package/lib/types/shared/cdp/sources.d.ts +18 -0
- package/lib/types/shared/cordis/collector.d.ts +26 -0
- package/lib/types/shared/cordis/ids.d.ts +7 -0
- package/lib/types/shared/cordis/model.d.ts +61 -0
- package/lib/types/shared/cordis/object-reference.d.ts +14 -0
- package/lib/types/shared/cordis/object-registry.d.ts +80 -0
- package/lib/types/shared/cordis/observer.d.ts +15 -0
- package/lib/types/shared/cordis/projector.d.ts +34 -0
- package/lib/types/shared/cordis/publisher.d.ts +13 -0
- package/lib/types/shared/cordis/reader.d.ts +18 -0
- package/lib/types/shared/cordis/snapshot.d.ts +39 -0
- package/lib/types/shared/identity.d.ts +12 -0
- package/lib/types/shared/index.d.ts +18 -0
- package/lib/types/shared/json.d.ts +35 -0
- package/lib/types/shared/network/event-source.d.ts +20 -0
- package/lib/types/shared/network/observation.d.ts +52 -0
- package/lib/types/shared/service.d.ts +23 -0
- package/lib/types/shared/validation.d.ts +52 -0
- package/lib/types/worker/bridge/endpoint.d.ts +49 -0
- package/lib/types/worker/bridge/hub.d.ts +108 -0
- package/lib/types/worker/bridge/runtime-rpc.d.ts +90 -0
- package/lib/types/worker/bridge/session.d.ts +15 -0
- package/lib/types/worker/bridge/source-rpc.d.ts +42 -0
- package/lib/types/worker/cdp/domains/debugger/cdp-params.d.ts +15 -0
- package/lib/types/worker/cdp/domains/debugger/index.d.ts +6 -0
- package/lib/types/worker/cdp/domains/debugger/projector.d.ts +22 -0
- package/lib/types/worker/cdp/domains/debugger/script-registry.d.ts +70 -0
- package/lib/types/worker/cdp/domains/debugger/session.d.ts +47 -0
- package/lib/types/worker/cdp/domains/dom/index.d.ts +4 -0
- package/lib/types/worker/cdp/domains/dom/model.d.ts +108 -0
- package/lib/types/worker/cdp/domains/dom/session.d.ts +74 -0
- package/lib/types/worker/cdp/domains/native.d.ts +25 -0
- package/lib/types/worker/cdp/domains/network/session.d.ts +46 -0
- package/lib/types/worker/cdp/domains/runtime/cdp-params.d.ts +82 -0
- package/lib/types/worker/cdp/domains/runtime/index.d.ts +3 -0
- package/lib/types/worker/cdp/domains/runtime/object-table.d.ts +117 -0
- package/lib/types/worker/cdp/domains/runtime/session.d.ts +97 -0
- package/lib/types/worker/cdp/ids.d.ts +37 -0
- package/lib/types/worker/cdp/protocol.d.ts +46 -0
- package/lib/types/worker/cdp/realm-sessions.d.ts +64 -0
- package/lib/types/worker/cdp/session.d.ts +34 -0
- package/lib/types/worker/cdp/target.d.ts +17 -0
- package/lib/types/worker/entry.d.ts +3 -0
- package/lib/types/worker/inspection/cordis-query.d.ts +11 -0
- package/lib/types/worker/inspection/cordis-store.d.ts +94 -0
- package/lib/types/worker/inspection/network-store.d.ts +110 -0
- package/lib/types/worker/inspection/query-router.d.ts +78 -0
- package/lib/types/worker/inspection/realm-store.d.ts +58 -0
- package/lib/types/worker/inspection/realm.d.ts +43 -0
- package/lib/types/worker/realms/client/bridge.d.ts +18 -0
- package/lib/types/worker/realms/client/console.d.ts +21 -0
- package/lib/types/worker/realms/client/debugger.d.ts +8 -0
- package/lib/types/worker/realms/client/index.d.ts +18 -0
- package/lib/types/worker/realms/client/runtime.d.ts +28 -0
- package/lib/types/worker/realms/client/scripts.d.ts +15 -0
- package/lib/types/worker/realms/client/sources.d.ts +30 -0
- package/lib/types/worker/realms/client/values.d.ts +55 -0
- package/lib/types/worker/realms/host/bridge.d.ts +49 -0
- package/lib/types/worker/realms/host/console.d.ts +25 -0
- package/lib/types/worker/realms/host/debugger.d.ts +25 -0
- package/lib/types/worker/realms/host/index.d.ts +13 -0
- package/lib/types/worker/realms/host/runtime.d.ts +54 -0
- package/lib/types/worker/realms/host/scripts.d.ts +9 -0
- package/lib/types/worker/realms/host/sources.d.ts +26 -0
- package/lib/types/worker/realms/host/values.d.ts +22 -0
- package/lib/types/worker/server.d.ts +16 -0
- package/lib/worker.js +7184 -0
- package/package.json +64 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/** Worker-owned source generations, observation dispatch, and extension transport. */
|
|
2
|
+
import { type InspectorRecordInput, type InspectorSourceDescriptor, type InspectorSourceKind, type WorkerToSourceFrame } from '../../shared/bridge/messages/observation.ts';
|
|
3
|
+
import type { ClientConsoleEventFrame, ClientRuntimeResponseFrame } from '../../shared/bridge/messages/runtime/index.ts';
|
|
4
|
+
import type { ClientSourceResponseFrame } from '../../shared/bridge/messages/sources/index.ts';
|
|
5
|
+
/** One validated record with its source-local sequence. */
|
|
6
|
+
export interface IngestedInspectorRecord extends InspectorRecordInput {
|
|
7
|
+
readonly sequence: number;
|
|
8
|
+
}
|
|
9
|
+
/** One connected source's reply and close operations. */
|
|
10
|
+
export interface SourceConnection {
|
|
11
|
+
readonly kind: InspectorSourceKind;
|
|
12
|
+
send(frame: WorkerToSourceFrame): void;
|
|
13
|
+
close(code: number, reason: string): void;
|
|
14
|
+
}
|
|
15
|
+
/** Consumer of source lifecycle and records. */
|
|
16
|
+
export interface InspectorRecordConsumer {
|
|
17
|
+
readonly topics: ReadonlySet<string>;
|
|
18
|
+
replace(source: InspectorSourceDescriptor, records: readonly IngestedInspectorRecord[]): void;
|
|
19
|
+
append(source: InspectorSourceDescriptor, records: readonly IngestedInspectorRecord[]): void;
|
|
20
|
+
close(source: InspectorSourceDescriptor, reason: string): void;
|
|
21
|
+
}
|
|
22
|
+
/** Source lifecycle and typed extension frames observed inside the Worker. */
|
|
23
|
+
export type InspectorSourceEvent = {
|
|
24
|
+
readonly type: 'opened';
|
|
25
|
+
readonly source: InspectorSourceDescriptor;
|
|
26
|
+
} | {
|
|
27
|
+
readonly type: 'closed';
|
|
28
|
+
readonly source: InspectorSourceDescriptor;
|
|
29
|
+
readonly reason: string;
|
|
30
|
+
} | {
|
|
31
|
+
readonly type: 'client-runtime-response';
|
|
32
|
+
readonly source: InspectorSourceDescriptor;
|
|
33
|
+
readonly frame: ClientRuntimeResponseFrame;
|
|
34
|
+
} | {
|
|
35
|
+
readonly type: 'client-console-event';
|
|
36
|
+
readonly source: InspectorSourceDescriptor;
|
|
37
|
+
readonly frame: ClientConsoleEventFrame;
|
|
38
|
+
} | {
|
|
39
|
+
readonly type: 'client-source-response';
|
|
40
|
+
readonly source: InspectorSourceDescriptor;
|
|
41
|
+
readonly frame: ClientSourceResponseFrame;
|
|
42
|
+
};
|
|
43
|
+
/** Read-only diagnostic for `DSHInspector.getSources`. */
|
|
44
|
+
export interface InspectorSourceView {
|
|
45
|
+
readonly sourceId: string;
|
|
46
|
+
readonly generation: string;
|
|
47
|
+
readonly kind: InspectorSourceKind;
|
|
48
|
+
readonly label: string;
|
|
49
|
+
readonly capabilities: readonly string[];
|
|
50
|
+
readonly expectedSequence: number;
|
|
51
|
+
readonly dropped: number;
|
|
52
|
+
readonly topics: Readonly<Record<string, number>>;
|
|
53
|
+
}
|
|
54
|
+
/** Serial Worker-side owner of every Host and Client source generation. */
|
|
55
|
+
export declare class InspectorSourceRegistry {
|
|
56
|
+
private readonly consumers;
|
|
57
|
+
private readonly maxFrameBytes;
|
|
58
|
+
private readonly maxRecordsPerFrame;
|
|
59
|
+
private readonly sources;
|
|
60
|
+
private readonly statusListeners;
|
|
61
|
+
private readonly eventListeners;
|
|
62
|
+
constructor(consumers: readonly InspectorRecordConsumer[], maxFrameBytes: number, maxRecordsPerFrame: number);
|
|
63
|
+
/**
|
|
64
|
+
* Parse and apply one frame; malformed input closes only its source transport.
|
|
65
|
+
* @param connection - Carrier that delivered the frame.
|
|
66
|
+
* @param value - Untrusted decoded frame.
|
|
67
|
+
*/
|
|
68
|
+
receive(connection: SourceConnection, value: unknown): void;
|
|
69
|
+
/**
|
|
70
|
+
* Remove every generation carried by a closed connection.
|
|
71
|
+
* @param connection - Closed source carrier.
|
|
72
|
+
* @param reason - Diagnostic propagated to domain consumers.
|
|
73
|
+
*/
|
|
74
|
+
disconnect(connection: SourceConnection, reason: string): void;
|
|
75
|
+
/**
|
|
76
|
+
* Read current source status for the diagnostic CDP domain.
|
|
77
|
+
* @returns A detached status row for every active source.
|
|
78
|
+
*/
|
|
79
|
+
describe(): InspectorSourceView[];
|
|
80
|
+
/**
|
|
81
|
+
* Subscribe to source status changes.
|
|
82
|
+
* @param listener - Status observer.
|
|
83
|
+
* @returns A disposer that removes the observer.
|
|
84
|
+
*/
|
|
85
|
+
subscribeStatus(listener: () => void): () => void;
|
|
86
|
+
/**
|
|
87
|
+
* Subscribe to source admission, removal, and typed extension frames.
|
|
88
|
+
* @param listener - Source protocol observer.
|
|
89
|
+
* @returns A disposer that removes the observer.
|
|
90
|
+
*/
|
|
91
|
+
subscribeEvents(listener: (event: InspectorSourceEvent) => void): () => void;
|
|
92
|
+
/**
|
|
93
|
+
* Send a typed control frame only to its still-active source generation.
|
|
94
|
+
* @param source - Expected active source generation.
|
|
95
|
+
* @param frame - Validated Worker-to-source frame.
|
|
96
|
+
* @returns Whether the generation was still active and accepted the send.
|
|
97
|
+
*/
|
|
98
|
+
send(source: InspectorSourceDescriptor, frame: WorkerToSourceFrame): boolean;
|
|
99
|
+
/** Close every source and forget all state. */
|
|
100
|
+
close(): void;
|
|
101
|
+
private apply;
|
|
102
|
+
private open;
|
|
103
|
+
private assertTopics;
|
|
104
|
+
private count;
|
|
105
|
+
private notifyStatus;
|
|
106
|
+
private emit;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=hub.d.ts.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/** Worker-owned routing between synthetic Client contexts and source generations. */
|
|
2
|
+
import type { ClientRuntimeCapability, ClientRuntimeCommand, ClientRuntimeError, ClientRuntimeResult } from '../../shared/bridge/messages/runtime/index.ts';
|
|
3
|
+
import { type ClientRemoteObjectHandle, type ClientRuntimeSessionId } from '../../shared/bridge/ids.ts';
|
|
4
|
+
import { type InspectorSourceDescriptor } from '../../shared/bridge/messages/observation.ts';
|
|
5
|
+
import type { InspectorSourceRegistry } from './hub.ts';
|
|
6
|
+
import type { RuntimeConsoleBackendEvent } from '../../shared/cdp/index.ts';
|
|
7
|
+
/** One connected projection of a Client realm into a synthetic CDP execution context. */
|
|
8
|
+
export interface ClientRuntimeTarget {
|
|
9
|
+
readonly contextId: number;
|
|
10
|
+
readonly uniqueContextId: string;
|
|
11
|
+
readonly source: InspectorSourceDescriptor;
|
|
12
|
+
readonly capability: ClientRuntimeCapability;
|
|
13
|
+
}
|
|
14
|
+
/** Runtime target admission or removal. */
|
|
15
|
+
export type ClientRuntimeTargetEvent = {
|
|
16
|
+
readonly type: 'opened';
|
|
17
|
+
readonly target: ClientRuntimeTarget;
|
|
18
|
+
} | {
|
|
19
|
+
readonly type: 'closed';
|
|
20
|
+
readonly target: ClientRuntimeTarget;
|
|
21
|
+
};
|
|
22
|
+
/** Error returned deliberately by the Client Runtime executor. */
|
|
23
|
+
export declare class ClientRuntimeRemoteError extends Error {
|
|
24
|
+
readonly code: ClientRuntimeError['code'];
|
|
25
|
+
constructor(code: ClientRuntimeError['code'], message: string);
|
|
26
|
+
}
|
|
27
|
+
/** Runtime context registry and correlated Worker-to-Client request owner. */
|
|
28
|
+
export declare class ClientRuntimeRouter {
|
|
29
|
+
private readonly sources;
|
|
30
|
+
private readonly timeoutMs;
|
|
31
|
+
private readonly targetsBySource;
|
|
32
|
+
private readonly pending;
|
|
33
|
+
private readonly consoleSubscriptions;
|
|
34
|
+
private readonly listeners;
|
|
35
|
+
private readonly unsubscribeSources;
|
|
36
|
+
private nextContextId;
|
|
37
|
+
private closed;
|
|
38
|
+
constructor(sources: InspectorSourceRegistry, timeoutMs: number);
|
|
39
|
+
/**
|
|
40
|
+
* Snapshot all active Client execution contexts.
|
|
41
|
+
* @returns Active targets in admission order.
|
|
42
|
+
*/
|
|
43
|
+
targets(): ClientRuntimeTarget[];
|
|
44
|
+
/**
|
|
45
|
+
* Resolve the Client target for one active source generation.
|
|
46
|
+
* @param source - Source identity stored with a semantic node.
|
|
47
|
+
* @returns Its active Runtime target, when the generation still matches.
|
|
48
|
+
*/
|
|
49
|
+
bySource(source: InspectorSourceDescriptor): ClientRuntimeTarget | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Subscribe to synthetic execution-context lifecycle.
|
|
52
|
+
* @param listener - Context lifecycle observer.
|
|
53
|
+
* @returns A disposer that removes the observer.
|
|
54
|
+
*/
|
|
55
|
+
subscribe(listener: (event: ClientRuntimeTargetEvent) => void): () => void;
|
|
56
|
+
/**
|
|
57
|
+
* Enable Console events for one Client realm and DevTools session.
|
|
58
|
+
* @param target - Active Client realm.
|
|
59
|
+
* @param sessionId - DevTools Runtime session retaining event arguments.
|
|
60
|
+
* @param listener - Consumer of validated Client Console events.
|
|
61
|
+
* @returns A disposer that disables this Console session.
|
|
62
|
+
*/
|
|
63
|
+
subscribeConsole(target: ClientRuntimeTarget, sessionId: ClientRuntimeSessionId, listener: (event: RuntimeConsoleBackendEvent<ClientRemoteObjectHandle>) => void): () => void;
|
|
64
|
+
/**
|
|
65
|
+
* Execute one typed command in its currently active source generation.
|
|
66
|
+
* @param target - Active Client source and context.
|
|
67
|
+
* @param sessionId - Calling DevTools Runtime session.
|
|
68
|
+
* @param command - Validated Client Runtime operation.
|
|
69
|
+
* @returns The correlated result, or a rejection on timeout or disconnect.
|
|
70
|
+
*/
|
|
71
|
+
request(target: ClientRuntimeTarget, sessionId: ClientRuntimeSessionId, command: ClientRuntimeCommand): Promise<ClientRuntimeResult>;
|
|
72
|
+
/**
|
|
73
|
+
* Close one realm-local Runtime session without notifying sibling Client realms.
|
|
74
|
+
* @param target - Client realm that owns the session.
|
|
75
|
+
* @param sessionId - Closing DevTools Runtime session.
|
|
76
|
+
*/
|
|
77
|
+
closeTargetSession(target: ClientRuntimeTarget, sessionId: ClientRuntimeSessionId): void;
|
|
78
|
+
/** Stop routing and reject every outstanding operation. */
|
|
79
|
+
close(): void;
|
|
80
|
+
private receiveSourceEvent;
|
|
81
|
+
private open;
|
|
82
|
+
private remove;
|
|
83
|
+
private consoleEvent;
|
|
84
|
+
private settle;
|
|
85
|
+
private acknowledgeClientResponse;
|
|
86
|
+
private cancelClientResponse;
|
|
87
|
+
private rejectPending;
|
|
88
|
+
private emit;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=runtime-rpc.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Shared cleanup delivery for Worker-owned Client sessions. */
|
|
2
|
+
import type { ClientRuntimeSessionClosedFrame } from '../../shared/bridge/messages/runtime/index.ts';
|
|
3
|
+
import type { ClientSourceSessionClosedFrame } from '../../shared/bridge/messages/sources/index.ts';
|
|
4
|
+
import type { InspectorSourceDescriptor } from '../../shared/bridge/messages/observation.ts';
|
|
5
|
+
import type { InspectorSourceRegistry } from './hub.ts';
|
|
6
|
+
type ClientSessionClosedFrame = ClientRuntimeSessionClosedFrame | ClientSourceSessionClosedFrame;
|
|
7
|
+
/**
|
|
8
|
+
* Send cleanup to an active Client generation when its transport is still usable.
|
|
9
|
+
* @param sources - Worker source registry owning the transport.
|
|
10
|
+
* @param source - Generation whose session closed.
|
|
11
|
+
* @param frame - Typed Runtime or source-catalog cleanup frame.
|
|
12
|
+
*/
|
|
13
|
+
export declare function sendClientSessionClosed(sources: InspectorSourceRegistry, source: InspectorSourceDescriptor, frame: ClientSessionClosedFrame): void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Worker-owned request routing for Client read-only source catalogs. */
|
|
2
|
+
import type { ClientSourceCommand, ClientSourceError, ClientSourceResult } from '../../shared/bridge/messages/sources/index.ts';
|
|
3
|
+
import { type ClientSourceSessionId } from '../../shared/bridge/ids.ts';
|
|
4
|
+
import { type InspectorSourceDescriptor } from '../../shared/bridge/messages/observation.ts';
|
|
5
|
+
import type { InspectorSourceRegistry } from './hub.ts';
|
|
6
|
+
/** Deliberate error returned by the Client source catalog. */
|
|
7
|
+
export declare class ClientSourceRemoteError extends Error {
|
|
8
|
+
readonly code: ClientSourceError['code'];
|
|
9
|
+
constructor(code: ClientSourceError['code'], message: string);
|
|
10
|
+
}
|
|
11
|
+
/** Correlates bounded source requests with one active Client source generation. */
|
|
12
|
+
export declare class ClientSourceRouter {
|
|
13
|
+
private readonly sources;
|
|
14
|
+
private readonly timeoutMs;
|
|
15
|
+
readonly maxContentBytes: number;
|
|
16
|
+
/** Maximum decoded bytes requested in one source-content response. */
|
|
17
|
+
readonly chunkBytes: number;
|
|
18
|
+
private readonly pending;
|
|
19
|
+
private readonly unsubscribeSources;
|
|
20
|
+
private closed;
|
|
21
|
+
constructor(sources: InspectorSourceRegistry, timeoutMs: number, maxContentBytes: number, maxFrameBytes: number);
|
|
22
|
+
/**
|
|
23
|
+
* Execute one operation against an active Client source generation.
|
|
24
|
+
* @param source - Client source that owns the script catalog.
|
|
25
|
+
* @param sessionId - DevTools connection-local source session.
|
|
26
|
+
* @param command - Validated read-only source command.
|
|
27
|
+
* @returns The correlated result.
|
|
28
|
+
*/
|
|
29
|
+
request(source: InspectorSourceDescriptor, sessionId: ClientSourceSessionId, command: ClientSourceCommand): Promise<ClientSourceResult>;
|
|
30
|
+
/**
|
|
31
|
+
* Reject pending operations and notify one Client source session that it closed.
|
|
32
|
+
* @param source - Source generation owning the session.
|
|
33
|
+
* @param sessionId - Closing source session.
|
|
34
|
+
*/
|
|
35
|
+
closeSession(source: InspectorSourceDescriptor, sessionId: ClientSourceSessionId): void;
|
|
36
|
+
/** Stop routing and reject every outstanding source operation. */
|
|
37
|
+
close(): void;
|
|
38
|
+
private receiveSourceEvent;
|
|
39
|
+
private settle;
|
|
40
|
+
private rejectPending;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=source-rpc.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Validation for CDP Debugger requests handled by the shared domain. */
|
|
2
|
+
import type { RuntimeCallFrameEvaluationRequest } from '../../../../shared/cdp/index.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Parse Debugger.evaluateOnCallFrame without silently accepting unsupported options.
|
|
5
|
+
* @param params - Untrusted CDP parameters.
|
|
6
|
+
* @returns The common call-frame evaluation request.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseCallFrameEvaluation(params: Readonly<Record<string, unknown>>): RuntimeCallFrameEvaluationRequest;
|
|
9
|
+
/**
|
|
10
|
+
* Find a ScriptId carried directly or by a Debugger location parameter.
|
|
11
|
+
* @param params - Parsed CDP parameter record.
|
|
12
|
+
* @returns The targeted script id when the request names one.
|
|
13
|
+
*/
|
|
14
|
+
export declare function requestScriptId(params: Readonly<Record<string, unknown>>): string | undefined;
|
|
15
|
+
//# sourceMappingURL=cdp-params.d.ts.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** CDP projection for realm-neutral scripts and debugger events. */
|
|
2
|
+
import type { RuntimeDebuggerEvent, RuntimeScript } from '../../../../shared/cdp/index.ts';
|
|
3
|
+
import type { RuntimeBackendObjectHandle } from '../../../../shared/cdp/ids.ts';
|
|
4
|
+
import type { CdpNotification } from '../../protocol.ts';
|
|
5
|
+
import type { InspectorRealmSession } from '../../../inspection/realm.ts';
|
|
6
|
+
import type { RuntimeDomainSession } from '../runtime/index.ts';
|
|
7
|
+
/**
|
|
8
|
+
* Project one common script descriptor to Debugger.scriptParsed.
|
|
9
|
+
* @param realm - Realm session that owns the script.
|
|
10
|
+
* @param script - Realm-neutral script descriptor.
|
|
11
|
+
* @returns A CDP scriptParsed notification.
|
|
12
|
+
*/
|
|
13
|
+
export declare function scriptParsedEvent(realm: InspectorRealmSession, script: RuntimeScript): CdpNotification;
|
|
14
|
+
/**
|
|
15
|
+
* Project one common debugger event and all nested Runtime objects to CDP.
|
|
16
|
+
* @param realm - Realm session that emitted the event.
|
|
17
|
+
* @param event - Realm-neutral debugger event.
|
|
18
|
+
* @param runtime - Connection-local Runtime object projector.
|
|
19
|
+
* @returns The corresponding CDP notification.
|
|
20
|
+
*/
|
|
21
|
+
export declare function debuggerEvent(realm: InspectorRealmSession, event: RuntimeDebuggerEvent<RuntimeBackendObjectHandle>, runtime: RuntimeDomainSession): CdpNotification;
|
|
22
|
+
//# sourceMappingURL=projector.d.ts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/** Connection-local routing from CDP ScriptId values to realm source backends. */
|
|
2
|
+
import type { RuntimeScriptKey } from '../../../../shared/cdp/ids.ts';
|
|
3
|
+
import type { RuntimeScript } from '../../../../shared/cdp/index.ts';
|
|
4
|
+
import type { SourceBackend } from '../../../../shared/cdp/realm.ts';
|
|
5
|
+
import type { InspectorRealmSession } from '../../../inspection/realm.ts';
|
|
6
|
+
import { type CdpScriptId } from '../../ids.ts';
|
|
7
|
+
/** One script and the realm source backend that owns its content. */
|
|
8
|
+
export interface DebuggerScriptRoute {
|
|
9
|
+
readonly realm: InspectorRealmSession;
|
|
10
|
+
readonly source: SourceBackend;
|
|
11
|
+
readonly script: RuntimeScript;
|
|
12
|
+
}
|
|
13
|
+
/** Tracks active and retired scripts without exposing source transport ids. */
|
|
14
|
+
export declare class DebuggerScriptRegistry {
|
|
15
|
+
private readonly routes;
|
|
16
|
+
private readonly retiredUnsupported;
|
|
17
|
+
/**
|
|
18
|
+
* Register one realm script under its globally unique Runtime script key.
|
|
19
|
+
* @param route - Script descriptor and owning realm session.
|
|
20
|
+
* @returns The CDP ScriptId and whether this is its first announcement.
|
|
21
|
+
*/
|
|
22
|
+
register(route: DebuggerScriptRoute): {
|
|
23
|
+
readonly scriptId: CdpScriptId;
|
|
24
|
+
readonly fresh: boolean;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Resolve an active CDP ScriptId.
|
|
28
|
+
* @param scriptId - Connection-visible script id.
|
|
29
|
+
* @returns The active route when the script remains connected.
|
|
30
|
+
*/
|
|
31
|
+
resolve(scriptId: string): DebuggerScriptRoute | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* Resolve a script by its exact URL.
|
|
34
|
+
* @param url - Script URL from a CDP request.
|
|
35
|
+
* @returns The active route when one script has that URL.
|
|
36
|
+
*/
|
|
37
|
+
byUrl(url: string): DebuggerScriptRoute | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Resolve a script by its exact content hash.
|
|
40
|
+
* @param hash - Script hash from a breakpoint request.
|
|
41
|
+
* @returns The active route when one script has that hash.
|
|
42
|
+
*/
|
|
43
|
+
byHash(hash: string): DebuggerScriptRoute | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* Resolve the first script whose URL matches a breakpoint regular expression.
|
|
46
|
+
* @param pattern - JavaScript regular-expression source accepted by CDP.
|
|
47
|
+
* @returns The first matching active route.
|
|
48
|
+
*/
|
|
49
|
+
byUrlPattern(pattern: string): DebuggerScriptRoute | undefined;
|
|
50
|
+
/**
|
|
51
|
+
* Test whether a disconnected script belonged to a realm without active debugging.
|
|
52
|
+
* @param scriptId - Script id from a later CDP request.
|
|
53
|
+
* @returns Whether the id must still fail as an unsupported Client script.
|
|
54
|
+
*/
|
|
55
|
+
wasUnsupported(scriptId: string): boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Forget scripts for one closed realm while retaining their unsupported identity.
|
|
58
|
+
* @param realm - Realm session being removed.
|
|
59
|
+
*/
|
|
60
|
+
removeRealm(realm: InspectorRealmSession): void;
|
|
61
|
+
/** Forget all active and retired script routes. */
|
|
62
|
+
clear(): void;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Preserve a branded script key as its CDP wire identifier.
|
|
66
|
+
* @param scriptKey - Realm-wide Runtime script key.
|
|
67
|
+
* @returns The corresponding CDP ScriptId text.
|
|
68
|
+
*/
|
|
69
|
+
export declare function cdpScriptId(scriptKey: RuntimeScriptKey): CdpScriptId;
|
|
70
|
+
//# sourceMappingURL=script-registry.d.ts.map
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/** Per-DevTools Debugger and source routing across Host and Client realms. */
|
|
2
|
+
import { type CdpRequest, type CdpTransport } from '../../protocol.ts';
|
|
3
|
+
import type { InspectorRealmSessionSet } from '../../realm-sessions.ts';
|
|
4
|
+
import type { RuntimeDomainSession } from '../runtime/index.ts';
|
|
5
|
+
/** Owns Debugger lifecycle, shared script projection, and Host-native fallback. */
|
|
6
|
+
export declare class DebuggerDomainSession {
|
|
7
|
+
private readonly transport;
|
|
8
|
+
private readonly realms;
|
|
9
|
+
private readonly runtime;
|
|
10
|
+
private readonly scripts;
|
|
11
|
+
private readonly sourceDisposers;
|
|
12
|
+
private readonly debuggerDisposers;
|
|
13
|
+
private readonly callFrameRealms;
|
|
14
|
+
private readonly unsubscribeRealms;
|
|
15
|
+
private readonly native;
|
|
16
|
+
private debuggerEnableRequest;
|
|
17
|
+
private enabled;
|
|
18
|
+
private closed;
|
|
19
|
+
constructor(transport: CdpTransport, realms: InspectorRealmSessionSet, runtime: RuntimeDomainSession);
|
|
20
|
+
/**
|
|
21
|
+
* Handle one Debugger request, including Client read-only source operations.
|
|
22
|
+
* @param request - Parsed CDP request.
|
|
23
|
+
* @returns Whether the method belongs to the Debugger domain.
|
|
24
|
+
*/
|
|
25
|
+
handle(request: CdpRequest): boolean;
|
|
26
|
+
/** Release source and debugger subscriptions. */
|
|
27
|
+
close(): void;
|
|
28
|
+
private enable;
|
|
29
|
+
private disable;
|
|
30
|
+
private getScriptSource;
|
|
31
|
+
private searchInContent;
|
|
32
|
+
private evaluateOnCallFrame;
|
|
33
|
+
private pause;
|
|
34
|
+
private resume;
|
|
35
|
+
private forwardNative;
|
|
36
|
+
private unsupportedRoute;
|
|
37
|
+
private receiveRealm;
|
|
38
|
+
private enableRealm;
|
|
39
|
+
private attachCapabilities;
|
|
40
|
+
private publishCatalog;
|
|
41
|
+
private publishScript;
|
|
42
|
+
private publishDebuggerEvent;
|
|
43
|
+
private supportedDebugger;
|
|
44
|
+
private detachCapabilities;
|
|
45
|
+
private respond;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/** Worker projection from Cordis snapshots to a connection-neutral semantic DOM. */
|
|
2
|
+
import type { InspectorSourceDescriptor } from '../../../../shared/bridge/messages/observation.ts';
|
|
3
|
+
import type { InspectorObjectReference } from '../../../../shared/cordis/object-reference.ts';
|
|
4
|
+
import type { InspectorRealmDescriptor } from '../../../inspection/realm.ts';
|
|
5
|
+
import { type CdpBackendNodeId } from '../../ids.ts';
|
|
6
|
+
import type { CordisTreeObjectRoute, CordisTreeStore } from '../../../inspection/cordis-store.ts';
|
|
7
|
+
/** One Worker-global backend node independent of any DevTools connection. */
|
|
8
|
+
export interface CordisDomNode {
|
|
9
|
+
readonly backendNodeId: CdpBackendNodeId;
|
|
10
|
+
readonly key: string;
|
|
11
|
+
readonly name: string;
|
|
12
|
+
readonly attributes: readonly (readonly [string, string])[];
|
|
13
|
+
readonly description: string;
|
|
14
|
+
readonly object?: CordisTreeObjectRoute;
|
|
15
|
+
readonly children: readonly CordisDomNode[];
|
|
16
|
+
}
|
|
17
|
+
/** Immutable document revision shared by all current DevTools sessions. */
|
|
18
|
+
export interface CordisDomDocument {
|
|
19
|
+
readonly revision: number;
|
|
20
|
+
readonly root: CordisDomNode;
|
|
21
|
+
readonly byBackendId: ReadonlyMap<CdpBackendNodeId, CordisDomNode>;
|
|
22
|
+
readonly parentByBackendId: ReadonlyMap<CdpBackendNodeId, CdpBackendNodeId>;
|
|
23
|
+
}
|
|
24
|
+
/** One structural or attribute mutation between two projected documents. */
|
|
25
|
+
export type CordisDomMutation = {
|
|
26
|
+
readonly type: 'document-updated';
|
|
27
|
+
} | {
|
|
28
|
+
readonly type: 'child-inserted';
|
|
29
|
+
readonly parentBackendNodeId: CdpBackendNodeId;
|
|
30
|
+
readonly previousBackendNodeId: CdpBackendNodeId | 0;
|
|
31
|
+
readonly node: CordisDomNode;
|
|
32
|
+
} | {
|
|
33
|
+
readonly type: 'child-removed';
|
|
34
|
+
readonly parentBackendNodeId: CdpBackendNodeId;
|
|
35
|
+
readonly node: CordisDomNode;
|
|
36
|
+
} | {
|
|
37
|
+
readonly type: 'children-replaced';
|
|
38
|
+
readonly parentBackendNodeId: CdpBackendNodeId;
|
|
39
|
+
readonly children: readonly CordisDomNode[];
|
|
40
|
+
} | {
|
|
41
|
+
readonly type: 'attribute-modified';
|
|
42
|
+
readonly backendNodeId: CdpBackendNodeId;
|
|
43
|
+
readonly name: string;
|
|
44
|
+
readonly value: string;
|
|
45
|
+
} | {
|
|
46
|
+
readonly type: 'attribute-removed';
|
|
47
|
+
readonly backendNodeId: CdpBackendNodeId;
|
|
48
|
+
readonly name: string;
|
|
49
|
+
};
|
|
50
|
+
/** A visible incremental mutation or an in-place source availability change. */
|
|
51
|
+
export type CordisDomChange = {
|
|
52
|
+
readonly type: 'tree-mutated';
|
|
53
|
+
readonly mutations: readonly CordisDomMutation[];
|
|
54
|
+
} | {
|
|
55
|
+
readonly type: 'source-disconnected';
|
|
56
|
+
readonly source: InspectorSourceDescriptor;
|
|
57
|
+
};
|
|
58
|
+
/** Assigns durable backend ids and projects the latest source snapshots. */
|
|
59
|
+
export declare class CordisDomBackend {
|
|
60
|
+
private readonly trees;
|
|
61
|
+
private readonly backendIdByKey;
|
|
62
|
+
private readonly listeners;
|
|
63
|
+
private documentValue;
|
|
64
|
+
private nextBackendNodeId;
|
|
65
|
+
private nextRevision;
|
|
66
|
+
private readonly unsubscribe;
|
|
67
|
+
private readonly nodeByObject;
|
|
68
|
+
constructor(trees: CordisTreeStore);
|
|
69
|
+
/**
|
|
70
|
+
* Read the latest connection-neutral semantic document.
|
|
71
|
+
* @returns The current immutable document revision.
|
|
72
|
+
*/
|
|
73
|
+
document(): CordisDomDocument;
|
|
74
|
+
/**
|
|
75
|
+
* Subscribe to full document replacements and in-place realm state changes.
|
|
76
|
+
* @param listener - Called after a new backend revision is installed.
|
|
77
|
+
* @returns A disposer removing the listener.
|
|
78
|
+
*/
|
|
79
|
+
subscribe(listener: (event: CordisDomChange) => void): () => void;
|
|
80
|
+
/** Release repository subscriptions at Worker shutdown. */
|
|
81
|
+
close(): void;
|
|
82
|
+
/**
|
|
83
|
+
* Resolve one source-local object reference to its current projected node.
|
|
84
|
+
* @param source - Connected source generation that owns the reference.
|
|
85
|
+
* @param reference - Realm-local registry and object handle.
|
|
86
|
+
* @returns The current projected node, when present.
|
|
87
|
+
*/
|
|
88
|
+
nodeForObject(source: InspectorSourceDescriptor, reference: InspectorObjectReference): CordisDomNode | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Resolve a reference when a Runtime route identifies only Host or Client ownership.
|
|
91
|
+
* @param kind - Host or Client ownership inferred by the Runtime adapter.
|
|
92
|
+
* @param reference - Realm-local registry and object handle.
|
|
93
|
+
* @returns The current projected node, when present.
|
|
94
|
+
*/
|
|
95
|
+
nodeForObjectKind(kind: InspectorSourceDescriptor['kind'], reference: InspectorObjectReference): CordisDomNode | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Resolve one realm-neutral Runtime reference to its current projected node.
|
|
98
|
+
* @param realm - Realm that exposed the Runtime object.
|
|
99
|
+
* @param reference - Realm-local registry and object handle.
|
|
100
|
+
* @returns The current projected node, when present.
|
|
101
|
+
*/
|
|
102
|
+
nodeForRealm(realm: InspectorRealmDescriptor, reference: InspectorObjectReference): CordisDomNode | undefined;
|
|
103
|
+
private build;
|
|
104
|
+
private entity;
|
|
105
|
+
private node;
|
|
106
|
+
private emit;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/** Per-DevTools-session read-only DOM projection over Cordis tree snapshots. */
|
|
2
|
+
import type { InspectorObjectReference } from '../../../../shared/cordis/object-reference.ts';
|
|
3
|
+
import { type CdpRequest, type CdpTransport } from '../../protocol.ts';
|
|
4
|
+
import type { InspectorRealmDescriptor } from '../../../inspection/realm.ts';
|
|
5
|
+
import type { RuntimeDomainSession } from '../runtime/index.ts';
|
|
6
|
+
import type { RuntimeObjectPresentation } from '../runtime/object-table.ts';
|
|
7
|
+
import type { CordisDomBackend } from './model.ts';
|
|
8
|
+
import { type CdpRemoteObjectId } from '../../ids.ts';
|
|
9
|
+
/**
|
|
10
|
+
* Connection-local NodeId, search, and RemoteObject mapping owner. Node payloads are depth-limited;
|
|
11
|
+
* withheld levels are fetched through `DOM.requestChildNodes` or pushed with the ancestor chain
|
|
12
|
+
* when a NodeId leaves through search or object lookup.
|
|
13
|
+
*/
|
|
14
|
+
export declare class CordisDomSession {
|
|
15
|
+
private readonly transport;
|
|
16
|
+
private readonly backend;
|
|
17
|
+
private readonly runtime;
|
|
18
|
+
private readonly nodeIdByBackend;
|
|
19
|
+
private readonly backendByNodeId;
|
|
20
|
+
private readonly childrenSent;
|
|
21
|
+
private readonly backendByObjectId;
|
|
22
|
+
private readonly objectIdsByGroup;
|
|
23
|
+
private readonly searches;
|
|
24
|
+
private readonly unsubscribe;
|
|
25
|
+
private nextNodeId;
|
|
26
|
+
private nextSearchId;
|
|
27
|
+
private enabled;
|
|
28
|
+
constructor(transport: CdpTransport, backend: CordisDomBackend, runtime: RuntimeDomainSession);
|
|
29
|
+
/**
|
|
30
|
+
* Handle one DOM command.
|
|
31
|
+
* @param request - Parsed CDP request.
|
|
32
|
+
* @returns Whether this adapter owns the method.
|
|
33
|
+
*/
|
|
34
|
+
handle(request: CdpRequest): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Forget a Runtime object mapping before its owner releases the object.
|
|
37
|
+
* @param objectId - Connection-local Runtime object id.
|
|
38
|
+
*/
|
|
39
|
+
releaseObject(objectId: unknown): void;
|
|
40
|
+
/**
|
|
41
|
+
* Recognize a Runtime object from any realm as one current Cordis node.
|
|
42
|
+
* @param objectId - Connection-local CDP object id.
|
|
43
|
+
* @param realm - Realm that exposed the object.
|
|
44
|
+
* @param reference - Realm-local semantic object identity.
|
|
45
|
+
* @param group - Runtime object group retaining the id.
|
|
46
|
+
* @returns Node presentation fields, when the object remains in the current tree.
|
|
47
|
+
*/
|
|
48
|
+
bindObject(objectId: CdpRemoteObjectId, realm: InspectorRealmDescriptor, reference: InspectorObjectReference, group: string | undefined): RuntimeObjectPresentation | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Forget every DOM mapping retained under one Runtime object group.
|
|
51
|
+
* @param group - Runtime object-group name.
|
|
52
|
+
*/
|
|
53
|
+
releaseObjectGroup(group: unknown): void;
|
|
54
|
+
/** Release connection-owned ids and subscriptions. */
|
|
55
|
+
close(): void;
|
|
56
|
+
private execute;
|
|
57
|
+
private resolveNode;
|
|
58
|
+
private bindObjectId;
|
|
59
|
+
private selectNode;
|
|
60
|
+
private fromNodeId;
|
|
61
|
+
private serialize;
|
|
62
|
+
/** Deliver the not-yet-sent ancestor levels of one node so its NodeId attaches to the frontend tree. */
|
|
63
|
+
private pushNodePath;
|
|
64
|
+
private forgetSubtree;
|
|
65
|
+
private nodeId;
|
|
66
|
+
private parentNodeId;
|
|
67
|
+
private resetDocument;
|
|
68
|
+
private updateDocument;
|
|
69
|
+
private sendMutation;
|
|
70
|
+
private pruneDocumentState;
|
|
71
|
+
private releaseSourceObjects;
|
|
72
|
+
private respond;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Explicit adapter for Host-only native CDP methods during realm migration. */
|
|
2
|
+
import { type CdpRequest, type CdpTransport } from '../protocol.ts';
|
|
3
|
+
import type { NativeDomainBackend } from '../../../shared/cdp/realm.ts';
|
|
4
|
+
/** Forwards one explicit Host-native domain through a transport-neutral Node session. */
|
|
5
|
+
export declare class HostNativeDomainSession {
|
|
6
|
+
private readonly transport;
|
|
7
|
+
private readonly target;
|
|
8
|
+
private readonly unsubscribe;
|
|
9
|
+
constructor(transport: CdpTransport, target: NativeDomainBackend);
|
|
10
|
+
/**
|
|
11
|
+
* Execute one Host-native CDP request and send its correlated result.
|
|
12
|
+
* @param request - Parsed request owned by a native Host domain.
|
|
13
|
+
* @returns Whether this adapter owns the request's domain.
|
|
14
|
+
*/
|
|
15
|
+
handle(request: CdpRequest): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Test whether this adapter owns a CDP method.
|
|
18
|
+
* @param method - CDP method name.
|
|
19
|
+
* @returns Whether the method belongs to an explicit Host-native domain.
|
|
20
|
+
*/
|
|
21
|
+
owns(method: string): boolean;
|
|
22
|
+
/** Stop forwarding native notifications to this DevTools connection. */
|
|
23
|
+
close(): void;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=native.d.ts.map
|