@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,110 @@
|
|
|
1
|
+
/** Worker-owned repository of normalized fetch observations and captured bodies. */
|
|
2
|
+
import type { InspectorHeader } from '../../shared/network/observation.ts';
|
|
3
|
+
import type { InspectorSourceDescriptor } from '../../shared/bridge/messages/observation.ts';
|
|
4
|
+
import type { IngestedInspectorRecord, InspectorRecordConsumer } from '../bridge/hub.ts';
|
|
5
|
+
/** Bounded retention policy for observed network requests. */
|
|
6
|
+
export interface NetworkStoreOptions {
|
|
7
|
+
readonly maxRetainedRequests: number;
|
|
8
|
+
readonly maxJournalBytes: number;
|
|
9
|
+
}
|
|
10
|
+
/** Captured body data returned without a CDP representation. */
|
|
11
|
+
export interface CapturedNetworkBody {
|
|
12
|
+
readonly bytes: Uint8Array;
|
|
13
|
+
readonly truncated: boolean;
|
|
14
|
+
readonly captureError?: string;
|
|
15
|
+
readonly complete: boolean;
|
|
16
|
+
}
|
|
17
|
+
interface NetworkEventBase {
|
|
18
|
+
readonly requestKey: string;
|
|
19
|
+
readonly requestId: string;
|
|
20
|
+
readonly timestampMs: number;
|
|
21
|
+
}
|
|
22
|
+
/** Transport-independent changes emitted by the network repository. */
|
|
23
|
+
export type NetworkStoreEvent = NetworkEventBase & {
|
|
24
|
+
readonly type: 'request-started';
|
|
25
|
+
readonly wallTimeMs: number;
|
|
26
|
+
readonly url: string;
|
|
27
|
+
readonly method: string;
|
|
28
|
+
readonly headers: readonly InspectorHeader[];
|
|
29
|
+
readonly hasBody: boolean;
|
|
30
|
+
} | NetworkEventBase & {
|
|
31
|
+
readonly type: 'response-received';
|
|
32
|
+
readonly url: string;
|
|
33
|
+
readonly status: number;
|
|
34
|
+
readonly statusText: string;
|
|
35
|
+
readonly headers: readonly InspectorHeader[];
|
|
36
|
+
readonly mimeType: string;
|
|
37
|
+
} | NetworkEventBase & {
|
|
38
|
+
readonly type: 'response-data';
|
|
39
|
+
readonly data: string;
|
|
40
|
+
readonly byteLength: number;
|
|
41
|
+
} | NetworkEventBase & {
|
|
42
|
+
readonly type: 'event-source-message';
|
|
43
|
+
readonly eventName: string;
|
|
44
|
+
readonly eventId: string;
|
|
45
|
+
readonly data: string;
|
|
46
|
+
} | NetworkEventBase & {
|
|
47
|
+
readonly type: 'request-finished';
|
|
48
|
+
readonly encodedDataLength: number;
|
|
49
|
+
readonly truncated: boolean;
|
|
50
|
+
} | NetworkEventBase & {
|
|
51
|
+
readonly type: 'request-failed';
|
|
52
|
+
readonly errorText: string;
|
|
53
|
+
readonly canceled: boolean;
|
|
54
|
+
} | {
|
|
55
|
+
readonly type: 'request-evicted';
|
|
56
|
+
readonly requestKey: string;
|
|
57
|
+
};
|
|
58
|
+
type JournalNetworkEvent = Exclude<NetworkStoreEvent, {
|
|
59
|
+
readonly type: 'response-data' | 'request-evicted';
|
|
60
|
+
}>;
|
|
61
|
+
/** Validated Network observation store independent of CDP connection state. */
|
|
62
|
+
export declare class NetworkStore implements InspectorRecordConsumer {
|
|
63
|
+
private readonly options;
|
|
64
|
+
readonly topics: Set<string>;
|
|
65
|
+
private readonly requests;
|
|
66
|
+
private readonly journal;
|
|
67
|
+
private readonly completed;
|
|
68
|
+
private readonly listeners;
|
|
69
|
+
private journalBytes;
|
|
70
|
+
constructor(options: NetworkStoreOptions);
|
|
71
|
+
replace(source: InspectorSourceDescriptor, records: readonly IngestedInspectorRecord[]): void;
|
|
72
|
+
append(source: InspectorSourceDescriptor, records: readonly IngestedInspectorRecord[]): void;
|
|
73
|
+
close(source: InspectorSourceDescriptor, reason: string): void;
|
|
74
|
+
/**
|
|
75
|
+
* Read retained request lifecycle events.
|
|
76
|
+
* @returns Events in observation order.
|
|
77
|
+
*/
|
|
78
|
+
replay(): readonly JournalNetworkEvent[];
|
|
79
|
+
/**
|
|
80
|
+
* Subscribe to live request changes and eviction.
|
|
81
|
+
* @param listener - Consumer called synchronously after each accepted change.
|
|
82
|
+
* @returns A disposer removing the consumer.
|
|
83
|
+
*/
|
|
84
|
+
subscribe(listener: (event: NetworkStoreEvent) => void): () => void;
|
|
85
|
+
/**
|
|
86
|
+
* Read one retained request body.
|
|
87
|
+
* @param requestId - Public request id assigned by this store.
|
|
88
|
+
* @returns Captured bytes and truncation metadata.
|
|
89
|
+
*/
|
|
90
|
+
requestBody(requestId: unknown): CapturedNetworkBody;
|
|
91
|
+
/**
|
|
92
|
+
* Read one retained response body after response headers have arrived.
|
|
93
|
+
* @param requestId - Public request id assigned by this store.
|
|
94
|
+
* @returns Captured bytes and truncation metadata.
|
|
95
|
+
*/
|
|
96
|
+
responseBody(requestId: unknown): CapturedNetworkBody;
|
|
97
|
+
/** Release subscribers and all retained request data. */
|
|
98
|
+
dispose(): void;
|
|
99
|
+
private ingest;
|
|
100
|
+
private appendBody;
|
|
101
|
+
private complete;
|
|
102
|
+
private publish;
|
|
103
|
+
private emit;
|
|
104
|
+
private enforceRetention;
|
|
105
|
+
private evictCompletedFor;
|
|
106
|
+
private evict;
|
|
107
|
+
private requestById;
|
|
108
|
+
}
|
|
109
|
+
export {};
|
|
110
|
+
//# sourceMappingURL=network-store.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/** Worker-side admission, execution, and bounded settlement of non-CDP queries. */
|
|
2
|
+
import type { CordisRuntimeTreeReader } from '../../shared/cordis/reader.ts';
|
|
3
|
+
import type { InspectorSourceGeneration, InspectorSourceId } from '../../shared/bridge/ids.ts';
|
|
4
|
+
import type { InspectorSourceDescriptor } from '../../shared/bridge/messages/observation.ts';
|
|
5
|
+
import type { InspectorQueryResponseFrame } from '../../shared/bridge/messages/query/frames.ts';
|
|
6
|
+
/** Carrier operations owned by one Worker query peer. */
|
|
7
|
+
export interface InspectorQueryPeerTransport {
|
|
8
|
+
/** Send one bounded Worker response. */
|
|
9
|
+
send(frame: InspectorQueryResponseFrame): void;
|
|
10
|
+
/** Reject a malformed peer whose request cannot be correlated safely. */
|
|
11
|
+
close(code: number, reason: string): void;
|
|
12
|
+
}
|
|
13
|
+
interface AcceptedGeneration {
|
|
14
|
+
readonly sourceId: InspectorSourceId;
|
|
15
|
+
readonly generation: InspectorSourceGeneration;
|
|
16
|
+
}
|
|
17
|
+
/** Creates isolated query peers over one shared semantic reader. */
|
|
18
|
+
export declare class InspectorQueryRouter {
|
|
19
|
+
private readonly reader;
|
|
20
|
+
private readonly maxFrameBytes;
|
|
21
|
+
private readonly peers;
|
|
22
|
+
private readonly activeBySource;
|
|
23
|
+
constructor(reader: CordisRuntimeTreeReader, maxFrameBytes: number);
|
|
24
|
+
/**
|
|
25
|
+
* Create query state for one Host MessagePort or Client WebSocket.
|
|
26
|
+
* @param transport - Carrier response and rejection operations.
|
|
27
|
+
* @returns The peer that receives frames from this carrier only.
|
|
28
|
+
*/
|
|
29
|
+
open(transport: InspectorQueryPeerTransport): InspectorQueryPeer;
|
|
30
|
+
/**
|
|
31
|
+
* Revoke query access when the source registry closes one generation.
|
|
32
|
+
* @param source - Closed source generation.
|
|
33
|
+
*/
|
|
34
|
+
disconnect(source: InspectorSourceDescriptor): void;
|
|
35
|
+
/** Revoke every peer during Worker shutdown. */
|
|
36
|
+
close(): void;
|
|
37
|
+
}
|
|
38
|
+
/** Query protocol state associated with exactly one source carrier. */
|
|
39
|
+
export declare class InspectorQueryPeer {
|
|
40
|
+
private readonly reader;
|
|
41
|
+
private readonly maxFrameBytes;
|
|
42
|
+
private readonly transport;
|
|
43
|
+
private readonly register;
|
|
44
|
+
private readonly isRegistered;
|
|
45
|
+
private readonly unregister;
|
|
46
|
+
private accepted;
|
|
47
|
+
private readonly inFlight;
|
|
48
|
+
private closed;
|
|
49
|
+
constructor(reader: CordisRuntimeTreeReader, maxFrameBytes: number, transport: InspectorQueryPeerTransport, register: (accepted: AcceptedGeneration) => void, isRegistered: (accepted: AcceptedGeneration) => boolean, unregister: () => void);
|
|
50
|
+
/**
|
|
51
|
+
* Admit the source generation after the source registry accepts it.
|
|
52
|
+
* @param sourceId - Stable source identity.
|
|
53
|
+
* @param generation - Active carrier generation.
|
|
54
|
+
*/
|
|
55
|
+
accept(sourceId: InspectorSourceId, generation: InspectorSourceGeneration): void;
|
|
56
|
+
/**
|
|
57
|
+
* Revoke one generation while leaving its carrier available for a later source/open.
|
|
58
|
+
* @param sourceId - Stable source identity.
|
|
59
|
+
* @param generation - Generation being removed by the source registry.
|
|
60
|
+
*/
|
|
61
|
+
revoke(sourceId: InspectorSourceId, generation: InspectorSourceGeneration): void;
|
|
62
|
+
/**
|
|
63
|
+
* Consume a decoded carrier value when it belongs to the query protocol.
|
|
64
|
+
* @param value - Untrusted source-to-Worker value.
|
|
65
|
+
* @returns Whether this peer owned the value.
|
|
66
|
+
*/
|
|
67
|
+
receive(value: unknown): boolean;
|
|
68
|
+
/** Stop this peer and suppress completion from in-flight readers. */
|
|
69
|
+
close(): void;
|
|
70
|
+
private execute;
|
|
71
|
+
private rejectMalformed;
|
|
72
|
+
private sendFailure;
|
|
73
|
+
private canReply;
|
|
74
|
+
private deliver;
|
|
75
|
+
private rejectTransport;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
78
|
+
//# sourceMappingURL=query-router.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/** Worker-owned registry of Host and Client realm definitions. */
|
|
2
|
+
import type { ClientRuntimeRouter } from '../bridge/runtime-rpc.ts';
|
|
3
|
+
import type { ClientSourceRouter } from '../bridge/source-rpc.ts';
|
|
4
|
+
import type { InspectorSourceDescriptor } from '../../shared/bridge/messages/observation.ts';
|
|
5
|
+
import type { InspectorRealm } from './realm.ts';
|
|
6
|
+
/** Realm admission and removal observed by each DevTools connection. */
|
|
7
|
+
export type InspectorRealmEvent = {
|
|
8
|
+
readonly type: 'opened';
|
|
9
|
+
readonly realm: InspectorRealm;
|
|
10
|
+
} | {
|
|
11
|
+
readonly type: 'closed';
|
|
12
|
+
readonly realm: InspectorRealm;
|
|
13
|
+
};
|
|
14
|
+
/** Authoritative collection of all currently executable realms. */
|
|
15
|
+
export declare class InspectorRealmRegistry {
|
|
16
|
+
readonly host: InspectorRealm;
|
|
17
|
+
private readonly clients;
|
|
18
|
+
private readonly clientSources;
|
|
19
|
+
private readonly clientsBySource;
|
|
20
|
+
private readonly listeners;
|
|
21
|
+
private readonly unsubscribeClients;
|
|
22
|
+
constructor(host: InspectorRealm, clients: ClientRuntimeRouter, clientSources: ClientSourceRouter);
|
|
23
|
+
/**
|
|
24
|
+
* Return the realm admission order used by every connection-local session set.
|
|
25
|
+
* @returns Host followed by active Clients.
|
|
26
|
+
*/
|
|
27
|
+
realms(): InspectorRealm[];
|
|
28
|
+
/**
|
|
29
|
+
* Resolve one synthetic Client execution context.
|
|
30
|
+
* @param contextId - Numeric CDP execution-context id.
|
|
31
|
+
* @returns The active realm when the id belongs to a Client.
|
|
32
|
+
*/
|
|
33
|
+
byContextId(contextId: number): InspectorRealm | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve one globally unique Client execution context.
|
|
36
|
+
* @param uniqueId - CDP unique execution-context id.
|
|
37
|
+
* @returns The active realm when the id belongs to a Client.
|
|
38
|
+
*/
|
|
39
|
+
byUniqueContextId(uniqueId: string): InspectorRealm | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Resolve the realm for one active source generation.
|
|
42
|
+
* @param source - Source identity retained by a Cordis tree node.
|
|
43
|
+
* @returns The matching active realm.
|
|
44
|
+
*/
|
|
45
|
+
bySource(source: InspectorSourceDescriptor): InspectorRealm | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Subscribe to Client realm admission and removal.
|
|
48
|
+
* @param listener - Registry observer.
|
|
49
|
+
* @returns A disposer removing the observer.
|
|
50
|
+
*/
|
|
51
|
+
subscribe(listener: (event: InspectorRealmEvent) => void): () => void;
|
|
52
|
+
/** Stop observing Client targets and clear registry listeners. */
|
|
53
|
+
close(): void;
|
|
54
|
+
private receiveClient;
|
|
55
|
+
private openClient;
|
|
56
|
+
private emit;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=realm-store.d.ts.map
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Worker-owned lifecycle model for active Host and Client JavaScript realms. */
|
|
2
|
+
import type { InspectorSourceGeneration, InspectorSourceId } from '../../shared/bridge/ids.ts';
|
|
3
|
+
import type { InspectorRealmCapabilities } from '../../shared/cdp/capabilities.ts';
|
|
4
|
+
import type { InspectorRealmId } from '../../shared/cdp/ids.ts';
|
|
5
|
+
import type { ConsoleBackend, DebuggerBackend, NativeDomainBackend, RealmCapability, RuntimeBackend, SourceBackend } from '../../shared/cdp/realm.ts';
|
|
6
|
+
/** Stable description of one active realm generation. */
|
|
7
|
+
export interface InspectorRealmDescriptor {
|
|
8
|
+
readonly realmId: InspectorRealmId;
|
|
9
|
+
readonly sourceId: InspectorSourceId;
|
|
10
|
+
readonly generation: InspectorSourceGeneration;
|
|
11
|
+
readonly kind: 'host' | 'client';
|
|
12
|
+
readonly label: string;
|
|
13
|
+
}
|
|
14
|
+
/** Execution-context ownership for one realm. */
|
|
15
|
+
export type InspectorRealmContext = {
|
|
16
|
+
readonly kind: 'native';
|
|
17
|
+
} | {
|
|
18
|
+
readonly kind: 'synthetic';
|
|
19
|
+
readonly id: number;
|
|
20
|
+
readonly uniqueId: string;
|
|
21
|
+
readonly origin: string;
|
|
22
|
+
};
|
|
23
|
+
/** Capabilities bound to one realm and one DevTools connection. */
|
|
24
|
+
export interface InspectorRealmSession {
|
|
25
|
+
readonly descriptor: InspectorRealmDescriptor;
|
|
26
|
+
readonly context: InspectorRealmContext;
|
|
27
|
+
readonly runtime: RealmCapability<RuntimeBackend>;
|
|
28
|
+
readonly console: RealmCapability<ConsoleBackend>;
|
|
29
|
+
readonly sources: RealmCapability<SourceBackend>;
|
|
30
|
+
readonly debugger: RealmCapability<DebuggerBackend>;
|
|
31
|
+
readonly nativeDomains: RealmCapability<NativeDomainBackend>;
|
|
32
|
+
/** Release every connection-owned backend resource. */
|
|
33
|
+
close(): void;
|
|
34
|
+
}
|
|
35
|
+
/** Active realm that can create isolated state for each DevTools connection. */
|
|
36
|
+
export interface InspectorRealm {
|
|
37
|
+
readonly descriptor: InspectorRealmDescriptor;
|
|
38
|
+
readonly context: InspectorRealmContext;
|
|
39
|
+
readonly capabilities: InspectorRealmCapabilities;
|
|
40
|
+
/** @returns Isolated backend state for one DevTools connection. */
|
|
41
|
+
openSession(): InspectorRealmSession;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=realm.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Worker-side bridge dependencies for one connected Client realm. */
|
|
2
|
+
import type { ClientRuntimeRouter, ClientRuntimeTarget } from '../../bridge/runtime-rpc.ts';
|
|
3
|
+
import type { ClientSourceRouter } from '../../bridge/source-rpc.ts';
|
|
4
|
+
/** Typed bridge services used by all Client realm backend adapters. */
|
|
5
|
+
export interface ClientRealmBridge {
|
|
6
|
+
readonly target: ClientRuntimeTarget;
|
|
7
|
+
readonly runtime: ClientRuntimeRouter;
|
|
8
|
+
readonly sources: ClientSourceRouter;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Bind one Client source generation to the Worker bridge services that can address it.
|
|
12
|
+
* @param target - Active Client source generation and execution context.
|
|
13
|
+
* @param runtime - Runtime and Console RPC router.
|
|
14
|
+
* @param sources - Source-catalog RPC router.
|
|
15
|
+
* @returns The immutable Client realm bridge.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createClientRealmBridge(target: ClientRuntimeTarget, runtime: ClientRuntimeRouter, sources: ClientSourceRouter): ClientRealmBridge;
|
|
18
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** ConsoleBackend over the typed Client Console event transport. */
|
|
2
|
+
import type { ClientRuntimeSessionId } from '../../../shared/bridge/ids.ts';
|
|
3
|
+
import type { RuntimeBackendObjectHandle } from '../../../shared/cdp/ids.ts';
|
|
4
|
+
import type { RuntimeConsoleBackendEvent } from '../../../shared/cdp/index.ts';
|
|
5
|
+
import type { ClientRuntimeRouter, ClientRuntimeTarget } from '../../bridge/runtime-rpc.ts';
|
|
6
|
+
import type { ConsoleBackend } from '../../../shared/cdp/realm.ts';
|
|
7
|
+
import type { ClientScriptIdentity } from './scripts.ts';
|
|
8
|
+
/** Adapts session-local Client Console events to common Runtime values. */
|
|
9
|
+
export declare class ClientConsoleBackend implements ConsoleBackend {
|
|
10
|
+
private readonly target;
|
|
11
|
+
private readonly sessionId;
|
|
12
|
+
private readonly router;
|
|
13
|
+
private readonly scriptIds;
|
|
14
|
+
private readonly disposers;
|
|
15
|
+
constructor(target: ClientRuntimeTarget, sessionId: ClientRuntimeSessionId, router: ClientRuntimeRouter, scriptIds: ClientScriptIdentity);
|
|
16
|
+
subscribe(listener: (event: RuntimeConsoleBackendEvent<RuntimeBackendObjectHandle>) => void): () => void;
|
|
17
|
+
clear(): Promise<void>;
|
|
18
|
+
/** Disable every active Console subscription for this connection. */
|
|
19
|
+
close(): void;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=console.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Explicit Client debugger capability until a pause-safe page agent exists. */
|
|
2
|
+
import type { DebuggerBackend, RealmCapability } from '../../../shared/cdp/realm.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Report the unavailable Client debugger backend.
|
|
5
|
+
* @returns The typed unsupported result used by every Client realm session.
|
|
6
|
+
*/
|
|
7
|
+
export declare function clientDebuggerCapability(): RealmCapability<DebuggerBackend>;
|
|
8
|
+
//# sourceMappingURL=debugger.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** Client realm definition assembled from independent Runtime, Console, and Source backends. */
|
|
2
|
+
import type { ClientRuntimeRouter, ClientRuntimeTarget } from '../../bridge/runtime-rpc.ts';
|
|
3
|
+
import type { ClientSourceRouter } from '../../bridge/source-rpc.ts';
|
|
4
|
+
import type { InspectorRealm, InspectorRealmDescriptor, InspectorRealmSession } from '../../inspection/realm.ts';
|
|
5
|
+
/** Active Client realm exposed through the common Worker realm model. */
|
|
6
|
+
export declare class ClientInspectorRealm implements InspectorRealm {
|
|
7
|
+
readonly descriptor: InspectorRealmDescriptor;
|
|
8
|
+
readonly context: InspectorRealm['context'];
|
|
9
|
+
readonly capabilities: InspectorRealm['capabilities'];
|
|
10
|
+
private readonly scriptIds;
|
|
11
|
+
private readonly bridge;
|
|
12
|
+
constructor(target: ClientRuntimeTarget, runtimeRouter: ClientRuntimeRouter, sourceRouter: ClientSourceRouter);
|
|
13
|
+
/** Active source generation represented by this realm. */
|
|
14
|
+
get target(): ClientRuntimeTarget;
|
|
15
|
+
/** Open one isolated set of Client backends for a DevTools connection. */
|
|
16
|
+
openSession(): InspectorRealmSession;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** RuntimeBackend over the typed Worker-to-Client transport. */
|
|
2
|
+
import type { ClientRuntimeSessionId } from '../../../shared/bridge/ids.ts';
|
|
3
|
+
import type { RuntimeBackendObjectHandle } from '../../../shared/cdp/ids.ts';
|
|
4
|
+
import type { ClientRuntimeRouter, ClientRuntimeTarget } from '../../bridge/runtime-rpc.ts';
|
|
5
|
+
import type { RuntimeBackend } from '../../../shared/cdp/realm.ts';
|
|
6
|
+
import type { ClientScriptIdentity } from './scripts.ts';
|
|
7
|
+
/** Adapts one connection-local Client Runtime session to the common backend API. */
|
|
8
|
+
export declare class ClientRuntimeBackend implements RuntimeBackend {
|
|
9
|
+
private readonly target;
|
|
10
|
+
private readonly sessionId;
|
|
11
|
+
private readonly router;
|
|
12
|
+
private readonly scriptIds;
|
|
13
|
+
private closed;
|
|
14
|
+
constructor(target: ClientRuntimeTarget, sessionId: ClientRuntimeSessionId, router: ClientRuntimeRouter, scriptIds: ClientScriptIdentity);
|
|
15
|
+
enable(): Promise<void>;
|
|
16
|
+
disable(): Promise<void>;
|
|
17
|
+
evaluate(request: Parameters<RuntimeBackend['evaluate']>[0]): ReturnType<RuntimeBackend['evaluate']>;
|
|
18
|
+
getProperties(request: Parameters<RuntimeBackend['getProperties']>[0]): ReturnType<RuntimeBackend['getProperties']>;
|
|
19
|
+
callFunction(request: Parameters<RuntimeBackend['callFunction']>[0]): ReturnType<RuntimeBackend['callFunction']>;
|
|
20
|
+
awaitPromise(request: Parameters<RuntimeBackend['awaitPromise']>[0]): ReturnType<RuntimeBackend['awaitPromise']>;
|
|
21
|
+
globalLexicalScopeNames(context?: Parameters<RuntimeBackend['globalLexicalScopeNames']>[0]): Promise<readonly string[]>;
|
|
22
|
+
releaseObject(handle: RuntimeBackendObjectHandle): Promise<void>;
|
|
23
|
+
releaseObjectGroup(group: string): Promise<void>;
|
|
24
|
+
/** Close this connection's session and reject further requests. */
|
|
25
|
+
close(): void;
|
|
26
|
+
private request;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Realm-stable translation between Client catalog keys and common Runtime script keys. */
|
|
2
|
+
import type { RuntimeScriptKey } from '../../../shared/cdp/ids.ts';
|
|
3
|
+
/** Allocates one shared script identity namespace for all backends in a Client realm. */
|
|
4
|
+
export declare class ClientScriptIdentity {
|
|
5
|
+
private readonly contextId;
|
|
6
|
+
private readonly publicByLocal;
|
|
7
|
+
constructor(contextId: number);
|
|
8
|
+
/**
|
|
9
|
+
* Convert a Client-local key to the realm's public Runtime script key.
|
|
10
|
+
* @param localKey - Script key used on the Client wire.
|
|
11
|
+
* @returns Stable key shared by this realm's Runtime, Console, and Sources backends.
|
|
12
|
+
*/
|
|
13
|
+
toRuntime(localKey: RuntimeScriptKey): RuntimeScriptKey;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=scripts.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Client SourceBackend over the bounded browser source-catalog transport. */
|
|
2
|
+
import type { ClientSourceSessionId } from '../../../shared/bridge/ids.ts';
|
|
3
|
+
import type { RuntimeScriptKey } from '../../../shared/cdp/ids.ts';
|
|
4
|
+
import type { RuntimeScript } from '../../../shared/cdp/index.ts';
|
|
5
|
+
import type { ClientRuntimeTarget } from '../../bridge/runtime-rpc.ts';
|
|
6
|
+
import type { ClientSourceRouter } from '../../bridge/source-rpc.ts';
|
|
7
|
+
import type { SourceBackend } from '../../../shared/cdp/realm.ts';
|
|
8
|
+
import type { ClientScriptIdentity } from './scripts.ts';
|
|
9
|
+
/** Presents one Client bundle catalog through the common read-only source model. */
|
|
10
|
+
export declare class ClientSourceBackend implements SourceBackend {
|
|
11
|
+
private readonly target;
|
|
12
|
+
private readonly sessionId;
|
|
13
|
+
private readonly router;
|
|
14
|
+
private readonly scriptIds;
|
|
15
|
+
private readonly scripts;
|
|
16
|
+
private catalog;
|
|
17
|
+
private closed;
|
|
18
|
+
constructor(target: ClientRuntimeTarget, sessionId: ClientSourceSessionId, router: ClientSourceRouter, scriptIds: ClientScriptIdentity);
|
|
19
|
+
listScripts(): Promise<readonly RuntimeScript[]>;
|
|
20
|
+
getScriptSource(scriptKey: RuntimeScriptKey): Promise<string>;
|
|
21
|
+
getSourceMap(scriptKey: RuntimeScriptKey): Promise<string | undefined>;
|
|
22
|
+
subscribe(_listener: (script: RuntimeScript) => void): () => void;
|
|
23
|
+
/** Reject pending reads owned by this DevTools connection. */
|
|
24
|
+
close(): void;
|
|
25
|
+
private loadCatalog;
|
|
26
|
+
private register;
|
|
27
|
+
private route;
|
|
28
|
+
private read;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=sources.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** Conversion from Client wire values to realm-neutral Runtime values. */
|
|
2
|
+
import type { ClientRuntimeExceptionDetails, ClientRuntimePropertyDescriptor, ClientRuntimeRemoteObject, ClientRuntimeResult } from '../../../shared/bridge/messages/runtime/index.ts';
|
|
3
|
+
import { type ClientRemoteObjectHandle } from '../../../shared/bridge/ids.ts';
|
|
4
|
+
import type { RuntimeBackendObjectHandle, RuntimeScriptKey } from '../../../shared/cdp/ids.ts';
|
|
5
|
+
import type { RuntimeCompletion, RuntimeConsoleBackendEvent, RuntimeExceptionDetails, RuntimeInternalPropertyDescriptor, RuntimePropertyDescriptor, RuntimeRemoteObject } from '../../../shared/cdp/index.ts';
|
|
6
|
+
/** Maps a Client-local script key into its realm-wide Runtime identity. */
|
|
7
|
+
export type ClientScriptKeyMapper = (scriptKey: RuntimeScriptKey) => RuntimeScriptKey;
|
|
8
|
+
/**
|
|
9
|
+
* Convert one Client completion and all nested objects.
|
|
10
|
+
* @param result - Successful Client Runtime command result.
|
|
11
|
+
* @param mapScriptKey - Realm-wide script identity mapper.
|
|
12
|
+
* @returns A realm-neutral Runtime completion.
|
|
13
|
+
*/
|
|
14
|
+
export declare function clientCompletion(result: Extract<ClientRuntimeResult, {
|
|
15
|
+
op: 'evaluate' | 'call-function' | 'await-promise';
|
|
16
|
+
}>, mapScriptKey: ClientScriptKeyMapper): RuntimeCompletion<RuntimeBackendObjectHandle>;
|
|
17
|
+
/**
|
|
18
|
+
* Convert one Client property descriptor and all nested objects.
|
|
19
|
+
* @param value - Client wire property descriptor.
|
|
20
|
+
* @returns A realm-neutral property descriptor.
|
|
21
|
+
*/
|
|
22
|
+
export declare function clientProperty(value: ClientRuntimePropertyDescriptor): RuntimePropertyDescriptor<RuntimeBackendObjectHandle>;
|
|
23
|
+
/**
|
|
24
|
+
* Convert one Client internal property descriptor.
|
|
25
|
+
* @param value - Client wire internal property.
|
|
26
|
+
* @returns A realm-neutral internal property.
|
|
27
|
+
*/
|
|
28
|
+
export declare function clientInternalProperty(value: RuntimeInternalPropertyDescriptor<ClientRemoteObjectHandle>): RuntimeInternalPropertyDescriptor<RuntimeBackendObjectHandle>;
|
|
29
|
+
/**
|
|
30
|
+
* Convert Client exception details and their optional object.
|
|
31
|
+
* @param value - Client wire exception details.
|
|
32
|
+
* @param mapScriptKey - Realm-wide script identity mapper.
|
|
33
|
+
* @returns Realm-neutral exception details.
|
|
34
|
+
*/
|
|
35
|
+
export declare function clientException(value: ClientRuntimeExceptionDetails, mapScriptKey: ClientScriptKeyMapper): RuntimeExceptionDetails<RuntimeBackendObjectHandle>;
|
|
36
|
+
/**
|
|
37
|
+
* Convert a Client Console event recursively.
|
|
38
|
+
* @param value - Client wire Console event.
|
|
39
|
+
* @param mapScriptKey - Realm-wide script identity mapper.
|
|
40
|
+
* @returns A realm-neutral Console event.
|
|
41
|
+
*/
|
|
42
|
+
export declare function clientConsoleEvent(value: RuntimeConsoleBackendEvent<ClientRemoteObjectHandle>, mapScriptKey: ClientScriptKeyMapper): RuntimeConsoleBackendEvent<RuntimeBackendObjectHandle>;
|
|
43
|
+
/**
|
|
44
|
+
* Convert a Client RemoteObject into the backend-neutral handle slot.
|
|
45
|
+
* @param value - Client wire RemoteObject.
|
|
46
|
+
* @returns A realm-neutral Runtime value.
|
|
47
|
+
*/
|
|
48
|
+
export declare function clientRemoteObject(value: ClientRuntimeRemoteObject): RuntimeRemoteObject<RuntimeBackendObjectHandle>;
|
|
49
|
+
/**
|
|
50
|
+
* Rebrand a common backend handle for the Client transport that owns it.
|
|
51
|
+
* @param value - Backend handle from a routed Runtime request.
|
|
52
|
+
* @returns The same opaque text under its Client wire role.
|
|
53
|
+
*/
|
|
54
|
+
export declare function clientHandle(value: string): ClientRemoteObjectHandle;
|
|
55
|
+
//# sourceMappingURL=values.d.ts.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Per-DevTools-connection bridge to the Host main thread's real V8 inspector target. */
|
|
2
|
+
import type { NativeProtocolNotification } from '../../../shared/cdp/realm.ts';
|
|
3
|
+
/** Notification emitted by Node's native inspector session. */
|
|
4
|
+
export type HostInspectorNotification = NativeProtocolNotification;
|
|
5
|
+
/** Connection-local carrier for requests and notifications from the Host V8 inspector. */
|
|
6
|
+
export declare class HostInspectorSession {
|
|
7
|
+
private readonly contextName;
|
|
8
|
+
private readonly session;
|
|
9
|
+
private readonly listeners;
|
|
10
|
+
private connected;
|
|
11
|
+
private failure;
|
|
12
|
+
constructor(contextName: string);
|
|
13
|
+
/**
|
|
14
|
+
* Subscribe to native inspector notifications.
|
|
15
|
+
* @param listener - Consumer owned by one Worker domain adapter.
|
|
16
|
+
* @returns A disposer removing the consumer.
|
|
17
|
+
*/
|
|
18
|
+
subscribe(listener: (message: HostInspectorNotification) => void): () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Execute one Host V8 request for a Worker-owned composite Runtime operation.
|
|
21
|
+
* @param method - CDP method name.
|
|
22
|
+
* @param params - Validated request parameters.
|
|
23
|
+
* @returns The Host inspector result.
|
|
24
|
+
*/
|
|
25
|
+
request(method: string, params: Readonly<Record<string, unknown>>): Promise<Readonly<Record<string, unknown>>>;
|
|
26
|
+
/** Disconnect this DevTools client's V8 session. */
|
|
27
|
+
close(): void;
|
|
28
|
+
private connect;
|
|
29
|
+
private rewriteContextName;
|
|
30
|
+
}
|
|
31
|
+
/** Serializes accepted native notifications and isolates sibling consumers. */
|
|
32
|
+
export declare class HostNotificationChannel<Event> {
|
|
33
|
+
private readonly accepts;
|
|
34
|
+
private readonly project;
|
|
35
|
+
private readonly listeners;
|
|
36
|
+
private readonly unsubscribe;
|
|
37
|
+
private delivery;
|
|
38
|
+
constructor(target: HostInspectorSession, accepts: (message: HostInspectorNotification) => boolean, project: (message: HostInspectorNotification) => Promise<Event | undefined>);
|
|
39
|
+
/**
|
|
40
|
+
* Subscribe to projected native notifications.
|
|
41
|
+
* @param listener - Consumer invoked in subscription order.
|
|
42
|
+
* @returns A disposer removing the consumer.
|
|
43
|
+
*/
|
|
44
|
+
subscribe(listener: (event: Event) => void): () => void;
|
|
45
|
+
/** Release the native notification subscription and all consumers. */
|
|
46
|
+
close(): void;
|
|
47
|
+
private receive;
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=bridge.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** ConsoleBackend implementation over native Node Runtime notifications. */
|
|
2
|
+
import type { RuntimeBackendObjectHandle } from '../../../shared/cdp/ids.ts';
|
|
3
|
+
import type { RuntimeConsoleBackendEvent } from '../../../shared/cdp/index.ts';
|
|
4
|
+
import type { HostInspectorSession } from './bridge.ts';
|
|
5
|
+
import type { ConsoleBackend } from '../../../shared/cdp/realm.ts';
|
|
6
|
+
import type { HostRuntimeBackend } from './runtime.ts';
|
|
7
|
+
/** Converts native Runtime notifications to realm-neutral Console events. */
|
|
8
|
+
export declare class HostConsoleBackend implements ConsoleBackend {
|
|
9
|
+
private readonly target;
|
|
10
|
+
private readonly runtime;
|
|
11
|
+
private readonly events;
|
|
12
|
+
constructor(target: HostInspectorSession, runtime: HostRuntimeBackend);
|
|
13
|
+
/**
|
|
14
|
+
* Subscribe to native Console and exception events.
|
|
15
|
+
* @param listener - Connection-local event consumer.
|
|
16
|
+
* @returns A disposer removing the consumer.
|
|
17
|
+
*/
|
|
18
|
+
subscribe(listener: (event: RuntimeConsoleBackendEvent<RuntimeBackendObjectHandle>) => void): () => void;
|
|
19
|
+
clear(): Promise<void>;
|
|
20
|
+
/** Release the native notification subscription. */
|
|
21
|
+
close(): void;
|
|
22
|
+
private consoleEvent;
|
|
23
|
+
private exceptionEvent;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=console.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** DebuggerBackend implementation over one native Node inspector session. */
|
|
2
|
+
import type { RuntimeBackendObjectHandle } from '../../../shared/cdp/ids.ts';
|
|
3
|
+
import type { RuntimeDebuggerEvent } from '../../../shared/cdp/index.ts';
|
|
4
|
+
import type { DebuggerBackend } from '../../../shared/cdp/realm.ts';
|
|
5
|
+
import type { HostInspectorSession } from './bridge.ts';
|
|
6
|
+
import type { HostRuntimeBackend } from './runtime.ts';
|
|
7
|
+
/** Native Host debugger adapted to common commands, Runtime values, and events. */
|
|
8
|
+
export declare class HostDebuggerBackend implements DebuggerBackend {
|
|
9
|
+
private readonly target;
|
|
10
|
+
private readonly runtime;
|
|
11
|
+
private readonly events;
|
|
12
|
+
constructor(target: HostInspectorSession, runtime: HostRuntimeBackend);
|
|
13
|
+
enable(request: Parameters<DebuggerBackend['enable']>[0]): Promise<Readonly<Record<string, unknown>>>;
|
|
14
|
+
disable(): Promise<Readonly<Record<string, unknown>>>;
|
|
15
|
+
pause(): Promise<Readonly<Record<string, unknown>>>;
|
|
16
|
+
resume(request: Parameters<DebuggerBackend['resume']>[0]): Promise<Readonly<Record<string, unknown>>>;
|
|
17
|
+
evaluateOnCallFrame(request: Parameters<DebuggerBackend['evaluateOnCallFrame']>[0]): ReturnType<DebuggerBackend['evaluateOnCallFrame']>;
|
|
18
|
+
subscribe(listener: (event: RuntimeDebuggerEvent<RuntimeBackendObjectHandle>) => void): () => void;
|
|
19
|
+
/** Release the native notification subscription. */
|
|
20
|
+
close(): void;
|
|
21
|
+
private paused;
|
|
22
|
+
private callFrame;
|
|
23
|
+
private scope;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=debugger.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** Host realm adapter backed by a connection-local Node inspector session. */
|
|
2
|
+
import type { InspectorRealm, InspectorRealmDescriptor, InspectorRealmSession } from '../../inspection/realm.ts';
|
|
3
|
+
/** Host realm definition that opens one native V8 session per DevTools connection. */
|
|
4
|
+
export declare class HostInspectorRealm implements InspectorRealm {
|
|
5
|
+
private readonly label;
|
|
6
|
+
readonly descriptor: InspectorRealmDescriptor;
|
|
7
|
+
readonly context: InspectorRealm['context'];
|
|
8
|
+
readonly capabilities: InspectorRealm['capabilities'];
|
|
9
|
+
constructor(label: string);
|
|
10
|
+
/** Open a native Host inspector session for one DevTools connection. */
|
|
11
|
+
openSession(): InspectorRealmSession;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|