@secure-exec/core 0.1.1-rc.2 → 0.2.0-rc.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.
Files changed (102) hide show
  1. package/dist/esm-compiler.d.ts +5 -1
  2. package/dist/esm-compiler.js +5 -1
  3. package/dist/fs-helpers.d.ts +1 -1
  4. package/dist/generated/isolate-runtime.d.ts +15 -15
  5. package/dist/generated/isolate-runtime.js +15 -15
  6. package/dist/index.d.ts +25 -6
  7. package/dist/index.js +23 -3
  8. package/dist/isolate-runtime/apply-custom-global-policy.js +3 -3
  9. package/dist/isolate-runtime/apply-timing-mitigation-freeze.js +10 -8
  10. package/dist/isolate-runtime/apply-timing-mitigation-off.js +2 -2
  11. package/dist/isolate-runtime/bridge-attach.js +2 -2
  12. package/dist/isolate-runtime/bridge-initial-globals.js +3 -3
  13. package/dist/isolate-runtime/eval-script-result.js +1 -1
  14. package/dist/isolate-runtime/global-exposure-helpers.js +2 -2
  15. package/dist/isolate-runtime/init-commonjs-module-globals.js +2 -2
  16. package/dist/isolate-runtime/override-process-cwd.js +1 -1
  17. package/dist/isolate-runtime/override-process-env.js +1 -1
  18. package/dist/isolate-runtime/require-setup.js +2236 -19
  19. package/dist/isolate-runtime/set-commonjs-file-globals.js +2 -2
  20. package/dist/isolate-runtime/set-stdin-data.js +1 -1
  21. package/dist/isolate-runtime/setup-dynamic-import.js +47 -15
  22. package/dist/isolate-runtime/setup-fs-facade.js +2 -2
  23. package/dist/kernel/command-registry.d.ts +44 -0
  24. package/dist/kernel/command-registry.js +114 -0
  25. package/dist/kernel/device-layer.d.ts +12 -0
  26. package/dist/kernel/device-layer.js +262 -0
  27. package/dist/kernel/dns-cache.d.ts +29 -0
  28. package/dist/kernel/dns-cache.js +52 -0
  29. package/dist/kernel/fd-table.d.ts +84 -0
  30. package/dist/kernel/fd-table.js +278 -0
  31. package/dist/kernel/file-lock.d.ts +34 -0
  32. package/dist/kernel/file-lock.js +123 -0
  33. package/dist/kernel/host-adapter.d.ts +50 -0
  34. package/dist/kernel/host-adapter.js +8 -0
  35. package/dist/kernel/index.d.ts +36 -0
  36. package/dist/kernel/index.js +34 -0
  37. package/dist/kernel/inode-table.d.ts +43 -0
  38. package/dist/kernel/inode-table.js +85 -0
  39. package/dist/kernel/kernel.d.ts +9 -0
  40. package/dist/kernel/kernel.js +1396 -0
  41. package/dist/kernel/permissions.d.ts +27 -0
  42. package/dist/kernel/permissions.js +118 -0
  43. package/dist/kernel/pipe-manager.d.ts +64 -0
  44. package/dist/kernel/pipe-manager.js +267 -0
  45. package/dist/kernel/proc-layer.d.ts +11 -0
  46. package/dist/kernel/proc-layer.js +501 -0
  47. package/dist/kernel/process-table.d.ts +124 -0
  48. package/dist/kernel/process-table.js +631 -0
  49. package/dist/kernel/pty.d.ts +108 -0
  50. package/dist/kernel/pty.js +541 -0
  51. package/dist/kernel/socket-table.d.ts +305 -0
  52. package/dist/kernel/socket-table.js +1124 -0
  53. package/dist/kernel/timer-table.d.ts +54 -0
  54. package/dist/kernel/timer-table.js +108 -0
  55. package/dist/kernel/types.d.ts +500 -0
  56. package/dist/kernel/types.js +89 -0
  57. package/dist/kernel/user.d.ts +29 -0
  58. package/dist/kernel/user.js +35 -0
  59. package/dist/kernel/vfs.d.ts +54 -0
  60. package/dist/kernel/vfs.js +8 -0
  61. package/dist/kernel/wait.d.ts +45 -0
  62. package/dist/kernel/wait.js +112 -0
  63. package/dist/kernel/wstatus.d.ts +21 -0
  64. package/dist/kernel/wstatus.js +33 -0
  65. package/dist/module-resolver.d.ts +4 -0
  66. package/dist/module-resolver.js +4 -0
  67. package/dist/package-bundler.d.ts +6 -1
  68. package/dist/runtime-driver.d.ts +3 -1
  69. package/dist/shared/bridge-contract.d.ts +529 -94
  70. package/dist/shared/bridge-contract.js +86 -3
  71. package/dist/shared/console-formatter.js +4 -0
  72. package/dist/shared/global-exposure.js +345 -0
  73. package/dist/shared/in-memory-fs.d.ts +30 -11
  74. package/dist/shared/in-memory-fs.js +383 -109
  75. package/dist/shared/permissions.d.ts +4 -6
  76. package/dist/shared/permissions.js +24 -28
  77. package/dist/types.d.ts +20 -130
  78. package/dist/types.js +5 -0
  79. package/package.json +12 -22
  80. package/dist/bridge/active-handles.d.ts +0 -22
  81. package/dist/bridge/active-handles.js +0 -55
  82. package/dist/bridge/child-process.d.ts +0 -99
  83. package/dist/bridge/child-process.js +0 -656
  84. package/dist/bridge/fs.d.ts +0 -281
  85. package/dist/bridge/fs.js +0 -2231
  86. package/dist/bridge/index.d.ts +0 -10
  87. package/dist/bridge/index.js +0 -41
  88. package/dist/bridge/module.d.ts +0 -75
  89. package/dist/bridge/module.js +0 -299
  90. package/dist/bridge/network.d.ts +0 -250
  91. package/dist/bridge/network.js +0 -1433
  92. package/dist/bridge/os.d.ts +0 -13
  93. package/dist/bridge/os.js +0 -256
  94. package/dist/bridge/polyfills.d.ts +0 -2
  95. package/dist/bridge/polyfills.js +0 -11
  96. package/dist/bridge/process.d.ts +0 -89
  97. package/dist/bridge/process.js +0 -994
  98. package/dist/bridge.js +0 -11766
  99. package/dist/python-runtime.d.ts +0 -16
  100. package/dist/python-runtime.js +0 -45
  101. package/dist/runtime.d.ts +0 -31
  102. package/dist/runtime.js +0 -69
@@ -1,13 +1,16 @@
1
1
  /**
2
+ * @deprecated Canonical source moved to @secure-exec/nodejs (US-002).
3
+ * This copy is retained for backward compatibility during phased migration.
4
+ * Will be removed in US-005 when kernel merges into core.
5
+ *
2
6
  * Bridge contract: typed declarations for the globals shared between the
3
7
  * host (Node.js) and the isolate (sandbox V8 context).
4
8
  *
5
9
  * Two categories:
6
- * - Host bridge globals: set by the host before bridge code runs (fs fns, timers, etc.)
10
+ * - Host bridge globals: set by the host before bridge code runs (fs refs, timers, etc.)
7
11
  * - Runtime bridge globals: installed by the bridge bundle itself (active handles, modules, etc.)
8
12
  *
9
- * Each type alias is a plain function signature. The Rust V8 runtime registers
10
- * these as real JS functions on the global; bridge code calls them directly.
13
+ * The typed `Ref` aliases describe the bridge calling convention for each global.
11
14
  */
12
15
  export type ValueOf<T> = T[keyof T];
13
16
  /** Globals injected by the host before the bridge bundle executes. */
@@ -19,6 +22,27 @@ export declare const HOST_BRIDGE_GLOBAL_KEYS: {
19
22
  readonly scheduleTimer: "_scheduleTimer";
20
23
  readonly cryptoRandomFill: "_cryptoRandomFill";
21
24
  readonly cryptoRandomUuid: "_cryptoRandomUUID";
25
+ readonly cryptoHashDigest: "_cryptoHashDigest";
26
+ readonly cryptoHmacDigest: "_cryptoHmacDigest";
27
+ readonly cryptoPbkdf2: "_cryptoPbkdf2";
28
+ readonly cryptoScrypt: "_cryptoScrypt";
29
+ readonly cryptoCipheriv: "_cryptoCipheriv";
30
+ readonly cryptoDecipheriv: "_cryptoDecipheriv";
31
+ readonly cryptoCipherivCreate: "_cryptoCipherivCreate";
32
+ readonly cryptoCipherivUpdate: "_cryptoCipherivUpdate";
33
+ readonly cryptoCipherivFinal: "_cryptoCipherivFinal";
34
+ readonly cryptoSign: "_cryptoSign";
35
+ readonly cryptoVerify: "_cryptoVerify";
36
+ readonly cryptoAsymmetricOp: "_cryptoAsymmetricOp";
37
+ readonly cryptoCreateKeyObject: "_cryptoCreateKeyObject";
38
+ readonly cryptoGenerateKeyPairSync: "_cryptoGenerateKeyPairSync";
39
+ readonly cryptoGenerateKeySync: "_cryptoGenerateKeySync";
40
+ readonly cryptoGeneratePrimeSync: "_cryptoGeneratePrimeSync";
41
+ readonly cryptoDiffieHellman: "_cryptoDiffieHellman";
42
+ readonly cryptoDiffieHellmanGroup: "_cryptoDiffieHellmanGroup";
43
+ readonly cryptoDiffieHellmanSessionCreate: "_cryptoDiffieHellmanSessionCreate";
44
+ readonly cryptoDiffieHellmanSessionCall: "_cryptoDiffieHellmanSessionCall";
45
+ readonly cryptoSubtle: "_cryptoSubtle";
22
46
  readonly fsReadFile: "_fsReadFile";
23
47
  readonly fsWriteFile: "_fsWriteFile";
24
48
  readonly fsReadFileBinary: "_fsReadFileBinary";
@@ -48,6 +72,57 @@ export declare const HOST_BRIDGE_GLOBAL_KEYS: {
48
72
  readonly networkHttpRequestRaw: "_networkHttpRequestRaw";
49
73
  readonly networkHttpServerListenRaw: "_networkHttpServerListenRaw";
50
74
  readonly networkHttpServerCloseRaw: "_networkHttpServerCloseRaw";
75
+ readonly networkHttpServerRespondRaw: "_networkHttpServerRespondRaw";
76
+ readonly networkHttpServerWaitRaw: "_networkHttpServerWaitRaw";
77
+ readonly networkHttp2ServerListenRaw: "_networkHttp2ServerListenRaw";
78
+ readonly networkHttp2ServerCloseRaw: "_networkHttp2ServerCloseRaw";
79
+ readonly networkHttp2ServerWaitRaw: "_networkHttp2ServerWaitRaw";
80
+ readonly networkHttp2SessionConnectRaw: "_networkHttp2SessionConnectRaw";
81
+ readonly networkHttp2SessionRequestRaw: "_networkHttp2SessionRequestRaw";
82
+ readonly networkHttp2SessionSettingsRaw: "_networkHttp2SessionSettingsRaw";
83
+ readonly networkHttp2SessionSetLocalWindowSizeRaw: "_networkHttp2SessionSetLocalWindowSizeRaw";
84
+ readonly networkHttp2SessionGoawayRaw: "_networkHttp2SessionGoawayRaw";
85
+ readonly networkHttp2SessionCloseRaw: "_networkHttp2SessionCloseRaw";
86
+ readonly networkHttp2SessionDestroyRaw: "_networkHttp2SessionDestroyRaw";
87
+ readonly networkHttp2SessionWaitRaw: "_networkHttp2SessionWaitRaw";
88
+ readonly networkHttp2ServerPollRaw: "_networkHttp2ServerPollRaw";
89
+ readonly networkHttp2SessionPollRaw: "_networkHttp2SessionPollRaw";
90
+ readonly networkHttp2StreamRespondRaw: "_networkHttp2StreamRespondRaw";
91
+ readonly networkHttp2StreamPushStreamRaw: "_networkHttp2StreamPushStreamRaw";
92
+ readonly networkHttp2StreamWriteRaw: "_networkHttp2StreamWriteRaw";
93
+ readonly networkHttp2StreamEndRaw: "_networkHttp2StreamEndRaw";
94
+ readonly networkHttp2StreamPauseRaw: "_networkHttp2StreamPauseRaw";
95
+ readonly networkHttp2StreamResumeRaw: "_networkHttp2StreamResumeRaw";
96
+ readonly networkHttp2StreamRespondWithFileRaw: "_networkHttp2StreamRespondWithFileRaw";
97
+ readonly networkHttp2ServerRespondRaw: "_networkHttp2ServerRespondRaw";
98
+ readonly upgradeSocketWriteRaw: "_upgradeSocketWriteRaw";
99
+ readonly upgradeSocketEndRaw: "_upgradeSocketEndRaw";
100
+ readonly upgradeSocketDestroyRaw: "_upgradeSocketDestroyRaw";
101
+ readonly netSocketConnectRaw: "_netSocketConnectRaw";
102
+ readonly netSocketWaitConnectRaw: "_netSocketWaitConnectRaw";
103
+ readonly netSocketReadRaw: "_netSocketReadRaw";
104
+ readonly netSocketSetNoDelayRaw: "_netSocketSetNoDelayRaw";
105
+ readonly netSocketSetKeepAliveRaw: "_netSocketSetKeepAliveRaw";
106
+ readonly netSocketWriteRaw: "_netSocketWriteRaw";
107
+ readonly netSocketEndRaw: "_netSocketEndRaw";
108
+ readonly netSocketDestroyRaw: "_netSocketDestroyRaw";
109
+ readonly netSocketUpgradeTlsRaw: "_netSocketUpgradeTlsRaw";
110
+ readonly netSocketGetTlsClientHelloRaw: "_netSocketGetTlsClientHelloRaw";
111
+ readonly netSocketTlsQueryRaw: "_netSocketTlsQueryRaw";
112
+ readonly tlsGetCiphersRaw: "_tlsGetCiphersRaw";
113
+ readonly netServerListenRaw: "_netServerListenRaw";
114
+ readonly netServerAcceptRaw: "_netServerAcceptRaw";
115
+ readonly netServerCloseRaw: "_netServerCloseRaw";
116
+ readonly dgramSocketCreateRaw: "_dgramSocketCreateRaw";
117
+ readonly dgramSocketBindRaw: "_dgramSocketBindRaw";
118
+ readonly dgramSocketRecvRaw: "_dgramSocketRecvRaw";
119
+ readonly dgramSocketSendRaw: "_dgramSocketSendRaw";
120
+ readonly dgramSocketCloseRaw: "_dgramSocketCloseRaw";
121
+ readonly dgramSocketAddressRaw: "_dgramSocketAddressRaw";
122
+ readonly dgramSocketSetBufferSizeRaw: "_dgramSocketSetBufferSizeRaw";
123
+ readonly dgramSocketGetBufferSizeRaw: "_dgramSocketGetBufferSizeRaw";
124
+ readonly resolveModuleSync: "_resolveModuleSync";
125
+ readonly loadFileSync: "_loadFileSync";
51
126
  readonly ptySetRawMode: "_ptySetRawMode";
52
127
  readonly processConfig: "_processConfig";
53
128
  readonly osConfig: "_osConfig";
@@ -68,7 +143,15 @@ export declare const RUNTIME_BRIDGE_GLOBAL_KEYS: {
68
143
  readonly httpsModule: "_httpsModule";
69
144
  readonly http2Module: "_http2Module";
70
145
  readonly dnsModule: "_dnsModule";
146
+ readonly dgramModule: "_dgramModule";
71
147
  readonly httpServerDispatch: "_httpServerDispatch";
148
+ readonly httpServerUpgradeDispatch: "_httpServerUpgradeDispatch";
149
+ readonly httpServerConnectDispatch: "_httpServerConnectDispatch";
150
+ readonly http2Dispatch: "_http2Dispatch";
151
+ readonly timerDispatch: "_timerDispatch";
152
+ readonly upgradeSocketData: "_upgradeSocketData";
153
+ readonly upgradeSocketEnd: "_upgradeSocketEnd";
154
+ readonly netSocketDispatch: "_netSocketDispatch";
72
155
  readonly fsFacade: "_fs";
73
156
  readonly requireFrom: "_requireFrom";
74
157
  readonly moduleCache: "_moduleCache";
@@ -85,6 +168,27 @@ export declare const HOST_BRIDGE_GLOBAL_KEY_LIST: ValueOf<{
85
168
  readonly scheduleTimer: "_scheduleTimer";
86
169
  readonly cryptoRandomFill: "_cryptoRandomFill";
87
170
  readonly cryptoRandomUuid: "_cryptoRandomUUID";
171
+ readonly cryptoHashDigest: "_cryptoHashDigest";
172
+ readonly cryptoHmacDigest: "_cryptoHmacDigest";
173
+ readonly cryptoPbkdf2: "_cryptoPbkdf2";
174
+ readonly cryptoScrypt: "_cryptoScrypt";
175
+ readonly cryptoCipheriv: "_cryptoCipheriv";
176
+ readonly cryptoDecipheriv: "_cryptoDecipheriv";
177
+ readonly cryptoCipherivCreate: "_cryptoCipherivCreate";
178
+ readonly cryptoCipherivUpdate: "_cryptoCipherivUpdate";
179
+ readonly cryptoCipherivFinal: "_cryptoCipherivFinal";
180
+ readonly cryptoSign: "_cryptoSign";
181
+ readonly cryptoVerify: "_cryptoVerify";
182
+ readonly cryptoAsymmetricOp: "_cryptoAsymmetricOp";
183
+ readonly cryptoCreateKeyObject: "_cryptoCreateKeyObject";
184
+ readonly cryptoGenerateKeyPairSync: "_cryptoGenerateKeyPairSync";
185
+ readonly cryptoGenerateKeySync: "_cryptoGenerateKeySync";
186
+ readonly cryptoGeneratePrimeSync: "_cryptoGeneratePrimeSync";
187
+ readonly cryptoDiffieHellman: "_cryptoDiffieHellman";
188
+ readonly cryptoDiffieHellmanGroup: "_cryptoDiffieHellmanGroup";
189
+ readonly cryptoDiffieHellmanSessionCreate: "_cryptoDiffieHellmanSessionCreate";
190
+ readonly cryptoDiffieHellmanSessionCall: "_cryptoDiffieHellmanSessionCall";
191
+ readonly cryptoSubtle: "_cryptoSubtle";
88
192
  readonly fsReadFile: "_fsReadFile";
89
193
  readonly fsWriteFile: "_fsWriteFile";
90
194
  readonly fsReadFileBinary: "_fsReadFileBinary";
@@ -114,6 +218,57 @@ export declare const HOST_BRIDGE_GLOBAL_KEY_LIST: ValueOf<{
114
218
  readonly networkHttpRequestRaw: "_networkHttpRequestRaw";
115
219
  readonly networkHttpServerListenRaw: "_networkHttpServerListenRaw";
116
220
  readonly networkHttpServerCloseRaw: "_networkHttpServerCloseRaw";
221
+ readonly networkHttpServerRespondRaw: "_networkHttpServerRespondRaw";
222
+ readonly networkHttpServerWaitRaw: "_networkHttpServerWaitRaw";
223
+ readonly networkHttp2ServerListenRaw: "_networkHttp2ServerListenRaw";
224
+ readonly networkHttp2ServerCloseRaw: "_networkHttp2ServerCloseRaw";
225
+ readonly networkHttp2ServerWaitRaw: "_networkHttp2ServerWaitRaw";
226
+ readonly networkHttp2SessionConnectRaw: "_networkHttp2SessionConnectRaw";
227
+ readonly networkHttp2SessionRequestRaw: "_networkHttp2SessionRequestRaw";
228
+ readonly networkHttp2SessionSettingsRaw: "_networkHttp2SessionSettingsRaw";
229
+ readonly networkHttp2SessionSetLocalWindowSizeRaw: "_networkHttp2SessionSetLocalWindowSizeRaw";
230
+ readonly networkHttp2SessionGoawayRaw: "_networkHttp2SessionGoawayRaw";
231
+ readonly networkHttp2SessionCloseRaw: "_networkHttp2SessionCloseRaw";
232
+ readonly networkHttp2SessionDestroyRaw: "_networkHttp2SessionDestroyRaw";
233
+ readonly networkHttp2SessionWaitRaw: "_networkHttp2SessionWaitRaw";
234
+ readonly networkHttp2ServerPollRaw: "_networkHttp2ServerPollRaw";
235
+ readonly networkHttp2SessionPollRaw: "_networkHttp2SessionPollRaw";
236
+ readonly networkHttp2StreamRespondRaw: "_networkHttp2StreamRespondRaw";
237
+ readonly networkHttp2StreamPushStreamRaw: "_networkHttp2StreamPushStreamRaw";
238
+ readonly networkHttp2StreamWriteRaw: "_networkHttp2StreamWriteRaw";
239
+ readonly networkHttp2StreamEndRaw: "_networkHttp2StreamEndRaw";
240
+ readonly networkHttp2StreamPauseRaw: "_networkHttp2StreamPauseRaw";
241
+ readonly networkHttp2StreamResumeRaw: "_networkHttp2StreamResumeRaw";
242
+ readonly networkHttp2StreamRespondWithFileRaw: "_networkHttp2StreamRespondWithFileRaw";
243
+ readonly networkHttp2ServerRespondRaw: "_networkHttp2ServerRespondRaw";
244
+ readonly upgradeSocketWriteRaw: "_upgradeSocketWriteRaw";
245
+ readonly upgradeSocketEndRaw: "_upgradeSocketEndRaw";
246
+ readonly upgradeSocketDestroyRaw: "_upgradeSocketDestroyRaw";
247
+ readonly netSocketConnectRaw: "_netSocketConnectRaw";
248
+ readonly netSocketWaitConnectRaw: "_netSocketWaitConnectRaw";
249
+ readonly netSocketReadRaw: "_netSocketReadRaw";
250
+ readonly netSocketSetNoDelayRaw: "_netSocketSetNoDelayRaw";
251
+ readonly netSocketSetKeepAliveRaw: "_netSocketSetKeepAliveRaw";
252
+ readonly netSocketWriteRaw: "_netSocketWriteRaw";
253
+ readonly netSocketEndRaw: "_netSocketEndRaw";
254
+ readonly netSocketDestroyRaw: "_netSocketDestroyRaw";
255
+ readonly netSocketUpgradeTlsRaw: "_netSocketUpgradeTlsRaw";
256
+ readonly netSocketGetTlsClientHelloRaw: "_netSocketGetTlsClientHelloRaw";
257
+ readonly netSocketTlsQueryRaw: "_netSocketTlsQueryRaw";
258
+ readonly tlsGetCiphersRaw: "_tlsGetCiphersRaw";
259
+ readonly netServerListenRaw: "_netServerListenRaw";
260
+ readonly netServerAcceptRaw: "_netServerAcceptRaw";
261
+ readonly netServerCloseRaw: "_netServerCloseRaw";
262
+ readonly dgramSocketCreateRaw: "_dgramSocketCreateRaw";
263
+ readonly dgramSocketBindRaw: "_dgramSocketBindRaw";
264
+ readonly dgramSocketRecvRaw: "_dgramSocketRecvRaw";
265
+ readonly dgramSocketSendRaw: "_dgramSocketSendRaw";
266
+ readonly dgramSocketCloseRaw: "_dgramSocketCloseRaw";
267
+ readonly dgramSocketAddressRaw: "_dgramSocketAddressRaw";
268
+ readonly dgramSocketSetBufferSizeRaw: "_dgramSocketSetBufferSizeRaw";
269
+ readonly dgramSocketGetBufferSizeRaw: "_dgramSocketGetBufferSizeRaw";
270
+ readonly resolveModuleSync: "_resolveModuleSync";
271
+ readonly loadFileSync: "_loadFileSync";
117
272
  readonly ptySetRawMode: "_ptySetRawMode";
118
273
  readonly processConfig: "_processConfig";
119
274
  readonly osConfig: "_osConfig";
@@ -133,7 +288,15 @@ export declare const RUNTIME_BRIDGE_GLOBAL_KEY_LIST: ValueOf<{
133
288
  readonly httpsModule: "_httpsModule";
134
289
  readonly http2Module: "_http2Module";
135
290
  readonly dnsModule: "_dnsModule";
291
+ readonly dgramModule: "_dgramModule";
136
292
  readonly httpServerDispatch: "_httpServerDispatch";
293
+ readonly httpServerUpgradeDispatch: "_httpServerUpgradeDispatch";
294
+ readonly httpServerConnectDispatch: "_httpServerConnectDispatch";
295
+ readonly http2Dispatch: "_http2Dispatch";
296
+ readonly timerDispatch: "_timerDispatch";
297
+ readonly upgradeSocketData: "_upgradeSocketData";
298
+ readonly upgradeSocketEnd: "_upgradeSocketEnd";
299
+ readonly netSocketDispatch: "_netSocketDispatch";
137
300
  readonly fsFacade: "_fs";
138
301
  readonly requireFrom: "_requireFrom";
139
302
  readonly moduleCache: "_moduleCache";
@@ -147,6 +310,27 @@ export declare const BRIDGE_GLOBAL_KEY_LIST: readonly (ValueOf<{
147
310
  readonly scheduleTimer: "_scheduleTimer";
148
311
  readonly cryptoRandomFill: "_cryptoRandomFill";
149
312
  readonly cryptoRandomUuid: "_cryptoRandomUUID";
313
+ readonly cryptoHashDigest: "_cryptoHashDigest";
314
+ readonly cryptoHmacDigest: "_cryptoHmacDigest";
315
+ readonly cryptoPbkdf2: "_cryptoPbkdf2";
316
+ readonly cryptoScrypt: "_cryptoScrypt";
317
+ readonly cryptoCipheriv: "_cryptoCipheriv";
318
+ readonly cryptoDecipheriv: "_cryptoDecipheriv";
319
+ readonly cryptoCipherivCreate: "_cryptoCipherivCreate";
320
+ readonly cryptoCipherivUpdate: "_cryptoCipherivUpdate";
321
+ readonly cryptoCipherivFinal: "_cryptoCipherivFinal";
322
+ readonly cryptoSign: "_cryptoSign";
323
+ readonly cryptoVerify: "_cryptoVerify";
324
+ readonly cryptoAsymmetricOp: "_cryptoAsymmetricOp";
325
+ readonly cryptoCreateKeyObject: "_cryptoCreateKeyObject";
326
+ readonly cryptoGenerateKeyPairSync: "_cryptoGenerateKeyPairSync";
327
+ readonly cryptoGenerateKeySync: "_cryptoGenerateKeySync";
328
+ readonly cryptoGeneratePrimeSync: "_cryptoGeneratePrimeSync";
329
+ readonly cryptoDiffieHellman: "_cryptoDiffieHellman";
330
+ readonly cryptoDiffieHellmanGroup: "_cryptoDiffieHellmanGroup";
331
+ readonly cryptoDiffieHellmanSessionCreate: "_cryptoDiffieHellmanSessionCreate";
332
+ readonly cryptoDiffieHellmanSessionCall: "_cryptoDiffieHellmanSessionCall";
333
+ readonly cryptoSubtle: "_cryptoSubtle";
150
334
  readonly fsReadFile: "_fsReadFile";
151
335
  readonly fsWriteFile: "_fsWriteFile";
152
336
  readonly fsReadFileBinary: "_fsReadFileBinary";
@@ -176,6 +360,57 @@ export declare const BRIDGE_GLOBAL_KEY_LIST: readonly (ValueOf<{
176
360
  readonly networkHttpRequestRaw: "_networkHttpRequestRaw";
177
361
  readonly networkHttpServerListenRaw: "_networkHttpServerListenRaw";
178
362
  readonly networkHttpServerCloseRaw: "_networkHttpServerCloseRaw";
363
+ readonly networkHttpServerRespondRaw: "_networkHttpServerRespondRaw";
364
+ readonly networkHttpServerWaitRaw: "_networkHttpServerWaitRaw";
365
+ readonly networkHttp2ServerListenRaw: "_networkHttp2ServerListenRaw";
366
+ readonly networkHttp2ServerCloseRaw: "_networkHttp2ServerCloseRaw";
367
+ readonly networkHttp2ServerWaitRaw: "_networkHttp2ServerWaitRaw";
368
+ readonly networkHttp2SessionConnectRaw: "_networkHttp2SessionConnectRaw";
369
+ readonly networkHttp2SessionRequestRaw: "_networkHttp2SessionRequestRaw";
370
+ readonly networkHttp2SessionSettingsRaw: "_networkHttp2SessionSettingsRaw";
371
+ readonly networkHttp2SessionSetLocalWindowSizeRaw: "_networkHttp2SessionSetLocalWindowSizeRaw";
372
+ readonly networkHttp2SessionGoawayRaw: "_networkHttp2SessionGoawayRaw";
373
+ readonly networkHttp2SessionCloseRaw: "_networkHttp2SessionCloseRaw";
374
+ readonly networkHttp2SessionDestroyRaw: "_networkHttp2SessionDestroyRaw";
375
+ readonly networkHttp2SessionWaitRaw: "_networkHttp2SessionWaitRaw";
376
+ readonly networkHttp2ServerPollRaw: "_networkHttp2ServerPollRaw";
377
+ readonly networkHttp2SessionPollRaw: "_networkHttp2SessionPollRaw";
378
+ readonly networkHttp2StreamRespondRaw: "_networkHttp2StreamRespondRaw";
379
+ readonly networkHttp2StreamPushStreamRaw: "_networkHttp2StreamPushStreamRaw";
380
+ readonly networkHttp2StreamWriteRaw: "_networkHttp2StreamWriteRaw";
381
+ readonly networkHttp2StreamEndRaw: "_networkHttp2StreamEndRaw";
382
+ readonly networkHttp2StreamPauseRaw: "_networkHttp2StreamPauseRaw";
383
+ readonly networkHttp2StreamResumeRaw: "_networkHttp2StreamResumeRaw";
384
+ readonly networkHttp2StreamRespondWithFileRaw: "_networkHttp2StreamRespondWithFileRaw";
385
+ readonly networkHttp2ServerRespondRaw: "_networkHttp2ServerRespondRaw";
386
+ readonly upgradeSocketWriteRaw: "_upgradeSocketWriteRaw";
387
+ readonly upgradeSocketEndRaw: "_upgradeSocketEndRaw";
388
+ readonly upgradeSocketDestroyRaw: "_upgradeSocketDestroyRaw";
389
+ readonly netSocketConnectRaw: "_netSocketConnectRaw";
390
+ readonly netSocketWaitConnectRaw: "_netSocketWaitConnectRaw";
391
+ readonly netSocketReadRaw: "_netSocketReadRaw";
392
+ readonly netSocketSetNoDelayRaw: "_netSocketSetNoDelayRaw";
393
+ readonly netSocketSetKeepAliveRaw: "_netSocketSetKeepAliveRaw";
394
+ readonly netSocketWriteRaw: "_netSocketWriteRaw";
395
+ readonly netSocketEndRaw: "_netSocketEndRaw";
396
+ readonly netSocketDestroyRaw: "_netSocketDestroyRaw";
397
+ readonly netSocketUpgradeTlsRaw: "_netSocketUpgradeTlsRaw";
398
+ readonly netSocketGetTlsClientHelloRaw: "_netSocketGetTlsClientHelloRaw";
399
+ readonly netSocketTlsQueryRaw: "_netSocketTlsQueryRaw";
400
+ readonly tlsGetCiphersRaw: "_tlsGetCiphersRaw";
401
+ readonly netServerListenRaw: "_netServerListenRaw";
402
+ readonly netServerAcceptRaw: "_netServerAcceptRaw";
403
+ readonly netServerCloseRaw: "_netServerCloseRaw";
404
+ readonly dgramSocketCreateRaw: "_dgramSocketCreateRaw";
405
+ readonly dgramSocketBindRaw: "_dgramSocketBindRaw";
406
+ readonly dgramSocketRecvRaw: "_dgramSocketRecvRaw";
407
+ readonly dgramSocketSendRaw: "_dgramSocketSendRaw";
408
+ readonly dgramSocketCloseRaw: "_dgramSocketCloseRaw";
409
+ readonly dgramSocketAddressRaw: "_dgramSocketAddressRaw";
410
+ readonly dgramSocketSetBufferSizeRaw: "_dgramSocketSetBufferSizeRaw";
411
+ readonly dgramSocketGetBufferSizeRaw: "_dgramSocketGetBufferSizeRaw";
412
+ readonly resolveModuleSync: "_resolveModuleSync";
413
+ readonly loadFileSync: "_loadFileSync";
179
414
  readonly ptySetRawMode: "_ptySetRawMode";
180
415
  readonly processConfig: "_processConfig";
181
416
  readonly osConfig: "_osConfig";
@@ -194,58 +429,162 @@ export declare const BRIDGE_GLOBAL_KEY_LIST: readonly (ValueOf<{
194
429
  readonly httpsModule: "_httpsModule";
195
430
  readonly http2Module: "_http2Module";
196
431
  readonly dnsModule: "_dnsModule";
432
+ readonly dgramModule: "_dgramModule";
197
433
  readonly httpServerDispatch: "_httpServerDispatch";
434
+ readonly httpServerUpgradeDispatch: "_httpServerUpgradeDispatch";
435
+ readonly httpServerConnectDispatch: "_httpServerConnectDispatch";
436
+ readonly http2Dispatch: "_http2Dispatch";
437
+ readonly timerDispatch: "_timerDispatch";
438
+ readonly upgradeSocketData: "_upgradeSocketData";
439
+ readonly upgradeSocketEnd: "_upgradeSocketEnd";
440
+ readonly netSocketDispatch: "_netSocketDispatch";
198
441
  readonly fsFacade: "_fs";
199
442
  readonly requireFrom: "_requireFrom";
200
443
  readonly moduleCache: "_moduleCache";
201
444
  readonly processExitError: "ProcessExitError";
202
445
  }>)[];
203
- export type DynamicImportBridgeRef = (specifier: string, fromPath: string) => Promise<Record<string, unknown> | null>;
204
- export type LoadPolyfillBridgeRef = (moduleName: string) => string | null;
205
- export type ResolveModuleBridgeRef = (request: string, fromDir: string) => string | null;
206
- export type LoadFileBridgeRef = (path: string) => string | null;
446
+ /** A bridge Reference that resolves async via `{ result: { promise: true } }`. */
447
+ export interface BridgeApplyRef<TArgs extends unknown[], TResult> {
448
+ apply(ctx: undefined, args: TArgs, options: {
449
+ result: {
450
+ promise: true;
451
+ };
452
+ }): Promise<TResult>;
453
+ }
454
+ /** A bridge Reference called synchronously (blocks the isolate). */
455
+ export interface BridgeApplySyncRef<TArgs extends unknown[], TResult> {
456
+ applySync(ctx: undefined, args: TArgs): TResult;
457
+ }
458
+ /**
459
+ * A bridge Reference that blocks the isolate while the host resolves
460
+ * a Promise. Used for sync-looking APIs (require, readFileSync) that need
461
+ * async host operations.
462
+ */
463
+ export interface BridgeApplySyncPromiseRef<TArgs extends unknown[], TResult> {
464
+ applySyncPromise(ctx: undefined, args: TArgs): TResult;
465
+ }
466
+ export type DynamicImportBridgeRef = BridgeApplyRef<[
467
+ string,
468
+ string
469
+ ], Record<string, unknown> | null>;
470
+ export type LoadPolyfillBridgeRef = BridgeApplyRef<[string], string | null>;
471
+ export type ResolveModuleBridgeRef = BridgeApplySyncPromiseRef<[
472
+ string,
473
+ string
474
+ ], string | null>;
475
+ export type LoadFileBridgeRef = BridgeApplySyncPromiseRef<[string], string | null>;
207
476
  export type RequireFromBridgeFn = (request: string, dirname: string) => unknown;
208
477
  export type ModuleCacheBridgeRecord = Record<string, unknown>;
209
- export type ProcessLogBridgeRef = (msg: string) => void;
210
- export type ProcessErrorBridgeRef = (msg: string) => void;
211
- export type ScheduleTimerBridgeRef = (delayMs: number) => Promise<void>;
212
- export type CryptoRandomFillBridgeRef = (byteLength: number) => Uint8Array;
213
- export type CryptoRandomUuidBridgeRef = () => string;
214
- export type FsReadFileBridgeRef = (path: string) => string;
215
- export type FsWriteFileBridgeRef = (path: string, content: string) => void;
216
- export type FsReadFileBinaryBridgeRef = (path: string) => Uint8Array;
217
- export type FsWriteFileBinaryBridgeRef = (path: string, content: Uint8Array) => void;
218
- export type FsReadDirEntry = {
219
- name: string;
220
- isDirectory: boolean;
221
- };
222
- export type FsReadDirBridgeRef = (path: string) => FsReadDirEntry[];
223
- export type FsMkdirBridgeRef = (path: string, recursive: boolean) => void;
224
- export type FsRmdirBridgeRef = (path: string) => void;
225
- export type FsExistsBridgeRef = (path: string) => boolean;
226
- export type FsStatResult = {
227
- mode: number;
228
- size: number;
229
- isDirectory: boolean;
230
- atimeMs: number;
231
- mtimeMs: number;
232
- ctimeMs: number;
233
- birthtimeMs: number;
234
- };
235
- export type FsStatBridgeRef = (path: string) => FsStatResult;
236
- export type FsUnlinkBridgeRef = (path: string) => void;
237
- export type FsRenameBridgeRef = (oldPath: string, newPath: string) => void;
238
- export type FsChmodBridgeRef = (path: string, mode: number) => void;
239
- export type FsChownBridgeRef = (path: string, uid: number, gid: number) => void;
240
- export type FsLinkBridgeRef = (existingPath: string, newPath: string) => void;
241
- export type FsSymlinkBridgeRef = (target: string, path: string) => void;
242
- export type FsReadlinkBridgeRef = (path: string) => string;
243
- export type FsLstatResult = FsStatResult & {
244
- isSymbolicLink: boolean;
245
- };
246
- export type FsLstatBridgeRef = (path: string) => FsLstatResult;
247
- export type FsTruncateBridgeRef = (path: string, length: number) => void;
248
- export type FsUtimesBridgeRef = (path: string, atime: number, mtime: number) => void;
478
+ export type ProcessLogBridgeRef = BridgeApplySyncRef<[string], void>;
479
+ export type ProcessErrorBridgeRef = BridgeApplySyncRef<[string], void>;
480
+ export type ScheduleTimerBridgeRef = BridgeApplyRef<[number], void>;
481
+ export type CryptoRandomFillBridgeRef = BridgeApplySyncRef<[number], string>;
482
+ export type CryptoRandomUuidBridgeRef = BridgeApplySyncRef<[], string>;
483
+ export type CryptoHashDigestBridgeRef = BridgeApplySyncRef<[string, string], string>;
484
+ export type CryptoHmacDigestBridgeRef = BridgeApplySyncRef<[string, string, string], string>;
485
+ export type CryptoPbkdf2BridgeRef = BridgeApplySyncRef<[
486
+ string,
487
+ string,
488
+ number,
489
+ number,
490
+ string
491
+ ], string>;
492
+ export type CryptoScryptBridgeRef = BridgeApplySyncRef<[
493
+ string,
494
+ string,
495
+ number,
496
+ string
497
+ ], string>;
498
+ export type CryptoCipherivBridgeRef = BridgeApplySyncRef<[
499
+ string,
500
+ string,
501
+ string | null,
502
+ string,
503
+ string?
504
+ ], string>;
505
+ export type CryptoDecipherivBridgeRef = BridgeApplySyncRef<[
506
+ string,
507
+ string,
508
+ string | null,
509
+ string,
510
+ string
511
+ ], string>;
512
+ export type CryptoCipherivCreateBridgeRef = BridgeApplySyncRef<[
513
+ string,
514
+ string,
515
+ string,
516
+ string | null,
517
+ string
518
+ ], number>;
519
+ export type CryptoCipherivUpdateBridgeRef = BridgeApplySyncRef<[
520
+ number,
521
+ string
522
+ ], string>;
523
+ export type CryptoCipherivFinalBridgeRef = BridgeApplySyncRef<[
524
+ number
525
+ ], string>;
526
+ export type CryptoSignBridgeRef = BridgeApplySyncRef<[
527
+ string | null,
528
+ string,
529
+ string
530
+ ], string>;
531
+ export type CryptoVerifyBridgeRef = BridgeApplySyncRef<[
532
+ string | null,
533
+ string,
534
+ string,
535
+ string
536
+ ], boolean>;
537
+ export type CryptoAsymmetricOpBridgeRef = BridgeApplySyncRef<[
538
+ string,
539
+ string,
540
+ string
541
+ ], string>;
542
+ export type CryptoCreateKeyObjectBridgeRef = BridgeApplySyncRef<[
543
+ string,
544
+ string
545
+ ], string>;
546
+ export type CryptoGenerateKeyPairSyncBridgeRef = BridgeApplySyncRef<[
547
+ string,
548
+ string
549
+ ], string>;
550
+ export type CryptoGenerateKeySyncBridgeRef = BridgeApplySyncRef<[
551
+ string,
552
+ string
553
+ ], string>;
554
+ export type CryptoGeneratePrimeSyncBridgeRef = BridgeApplySyncRef<[
555
+ number,
556
+ string
557
+ ], string>;
558
+ export type CryptoDiffieHellmanBridgeRef = BridgeApplySyncRef<[string], string>;
559
+ export type CryptoDiffieHellmanGroupBridgeRef = BridgeApplySyncRef<[string], string>;
560
+ export type CryptoDiffieHellmanSessionCreateBridgeRef = BridgeApplySyncRef<[string], number>;
561
+ export type CryptoDiffieHellmanSessionCallBridgeRef = BridgeApplySyncRef<[
562
+ number,
563
+ string
564
+ ], string>;
565
+ export type CryptoSubtleBridgeRef = BridgeApplySyncRef<[string], string>;
566
+ export type FsReadFileBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
567
+ export type FsWriteFileBridgeRef = BridgeApplySyncPromiseRef<[string, string], void>;
568
+ export type FsReadFileBinaryBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
569
+ export type FsWriteFileBinaryBridgeRef = BridgeApplySyncPromiseRef<[
570
+ string,
571
+ string
572
+ ], void>;
573
+ export type FsReadDirBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
574
+ export type FsMkdirBridgeRef = BridgeApplySyncPromiseRef<[string, boolean], void>;
575
+ export type FsRmdirBridgeRef = BridgeApplySyncPromiseRef<[string], void>;
576
+ export type FsExistsBridgeRef = BridgeApplySyncPromiseRef<[string], boolean>;
577
+ export type FsStatBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
578
+ export type FsUnlinkBridgeRef = BridgeApplySyncPromiseRef<[string], void>;
579
+ export type FsRenameBridgeRef = BridgeApplySyncPromiseRef<[string, string], void>;
580
+ export type FsChmodBridgeRef = BridgeApplySyncPromiseRef<[string, number], void>;
581
+ export type FsChownBridgeRef = BridgeApplySyncPromiseRef<[string, number, number], void>;
582
+ export type FsLinkBridgeRef = BridgeApplySyncPromiseRef<[string, string], void>;
583
+ export type FsSymlinkBridgeRef = BridgeApplySyncPromiseRef<[string, string], void>;
584
+ export type FsReadlinkBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
585
+ export type FsLstatBridgeRef = BridgeApplySyncPromiseRef<[string], string>;
586
+ export type FsTruncateBridgeRef = BridgeApplySyncPromiseRef<[string, number], void>;
587
+ export type FsUtimesBridgeRef = BridgeApplySyncPromiseRef<[string, number, number], void>;
249
588
  /** Combined filesystem bridge facade installed as `globalThis._fs` in the isolate. */
250
589
  export interface FsFacadeBridge {
251
590
  readFile: FsReadFileBridgeRef;
@@ -268,52 +607,148 @@ export interface FsFacadeBridge {
268
607
  truncate: FsTruncateBridgeRef;
269
608
  utimes: FsUtimesBridgeRef;
270
609
  }
271
- export type ChildProcessSpawnStartBridgeRef = (command: string, argsJson: string, optionsJson: string) => number;
272
- export type ChildProcessStdinWriteBridgeRef = (sessionId: number, data: Uint8Array) => void;
273
- export type ChildProcessStdinCloseBridgeRef = (sessionId: number) => void;
274
- export type ChildProcessKillBridgeRef = (sessionId: number, signal: number) => void;
275
- export type SpawnSyncBridgeResult = {
276
- stdout: string;
277
- stderr: string;
278
- code: number;
279
- maxBufferExceeded?: boolean;
280
- };
281
- export type ChildProcessSpawnSyncBridgeRef = (command: string, argsJson: string, optionsJson: string) => SpawnSyncBridgeResult;
282
- export type NetworkFetchResult = {
283
- ok: boolean;
284
- status: number;
285
- statusText: string;
286
- headers?: Record<string, string>;
287
- url?: string;
288
- redirected?: boolean;
289
- body?: string;
290
- };
291
- export type NetworkFetchRawBridgeRef = (url: string, optionsJson: string) => Promise<NetworkFetchResult>;
292
- export type NetworkDnsLookupResult = {
293
- error?: string;
294
- code?: string;
295
- address?: string;
296
- family?: number;
297
- };
298
- export type NetworkDnsLookupRawBridgeRef = (hostname: string) => Promise<NetworkDnsLookupResult>;
299
- export type NetworkHttpRequestResult = {
300
- headers?: Record<string, string>;
301
- url?: string;
302
- status?: number;
303
- statusText?: string;
304
- body?: string;
305
- trailers?: Record<string, string>;
306
- };
307
- export type NetworkHttpRequestRawBridgeRef = (url: string, optionsJson: string) => Promise<NetworkHttpRequestResult>;
308
- export type NetworkHttpServerListenResult = {
309
- address: {
310
- address: string;
311
- family: string;
312
- port: number;
313
- } | null;
314
- };
315
- export type NetworkHttpServerListenRawBridgeRef = (optionsJson: string) => Promise<NetworkHttpServerListenResult>;
316
- export type NetworkHttpServerCloseRawBridgeRef = (serverId: number) => Promise<void>;
317
- export type PtySetRawModeBridgeRef = (mode: boolean) => void;
610
+ export type ChildProcessSpawnStartBridgeRef = BridgeApplySyncRef<[
611
+ string,
612
+ string,
613
+ string
614
+ ], number>;
615
+ export type ChildProcessStdinWriteBridgeRef = BridgeApplySyncRef<[
616
+ number,
617
+ Uint8Array
618
+ ], void>;
619
+ export type ChildProcessStdinCloseBridgeRef = BridgeApplySyncRef<[number], void>;
620
+ export type ChildProcessKillBridgeRef = BridgeApplySyncRef<[number, number], void>;
621
+ export type ChildProcessSpawnSyncBridgeRef = BridgeApplySyncPromiseRef<[
622
+ string,
623
+ string,
624
+ string
625
+ ], string>;
626
+ export type NetworkFetchRawBridgeRef = BridgeApplyRef<[string, string], string>;
627
+ export type NetworkDnsLookupRawBridgeRef = BridgeApplyRef<[string], string>;
628
+ export type NetworkHttpRequestRawBridgeRef = BridgeApplyRef<[string, string], string>;
629
+ export type NetworkHttpServerListenRawBridgeRef = BridgeApplyRef<[string], string>;
630
+ export type NetworkHttpServerCloseRawBridgeRef = BridgeApplyRef<[number], void>;
631
+ export type NetworkHttpServerRespondRawBridgeRef = BridgeApplySyncRef<[
632
+ number,
633
+ number,
634
+ string
635
+ ], void>;
636
+ export type NetworkHttpServerWaitRawBridgeRef = BridgeApplyRef<[number], void>;
637
+ export type NetworkHttp2ServerListenRawBridgeRef = BridgeApplySyncPromiseRef<[
638
+ string
639
+ ], string>;
640
+ export type NetworkHttp2ServerCloseRawBridgeRef = BridgeApplyRef<[number], void>;
641
+ export type NetworkHttp2ServerWaitRawBridgeRef = BridgeApplyRef<[number], void>;
642
+ export type NetworkHttp2SessionConnectRawBridgeRef = BridgeApplySyncPromiseRef<[
643
+ string
644
+ ], string>;
645
+ export type NetworkHttp2SessionRequestRawBridgeRef = BridgeApplySyncRef<[
646
+ number,
647
+ string,
648
+ string
649
+ ], number>;
650
+ export type NetworkHttp2SessionSettingsRawBridgeRef = BridgeApplySyncRef<[
651
+ number,
652
+ string
653
+ ], void>;
654
+ export type NetworkHttp2SessionSetLocalWindowSizeRawBridgeRef = BridgeApplySyncRef<[
655
+ number,
656
+ number
657
+ ], string>;
658
+ export type NetworkHttp2SessionGoawayRawBridgeRef = BridgeApplySyncRef<[
659
+ number,
660
+ number,
661
+ number,
662
+ string | null
663
+ ], void>;
664
+ export type NetworkHttp2SessionCloseRawBridgeRef = BridgeApplySyncRef<[
665
+ number
666
+ ], void>;
667
+ export type NetworkHttp2SessionDestroyRawBridgeRef = BridgeApplySyncRef<[
668
+ number
669
+ ], void>;
670
+ export type NetworkHttp2SessionWaitRawBridgeRef = BridgeApplyRef<[number], void>;
671
+ export type NetworkHttp2ServerPollRawBridgeRef = BridgeApplySyncRef<[
672
+ number
673
+ ], string | null>;
674
+ export type NetworkHttp2SessionPollRawBridgeRef = BridgeApplySyncRef<[
675
+ number
676
+ ], string | null>;
677
+ export type NetworkHttp2StreamRespondRawBridgeRef = BridgeApplySyncRef<[
678
+ number,
679
+ string
680
+ ], void>;
681
+ export type NetworkHttp2StreamPushStreamRawBridgeRef = BridgeApplySyncPromiseRef<[
682
+ number,
683
+ string,
684
+ string
685
+ ], string>;
686
+ export type NetworkHttp2StreamWriteRawBridgeRef = BridgeApplySyncRef<[
687
+ number,
688
+ string
689
+ ], boolean>;
690
+ export type NetworkHttp2StreamEndRawBridgeRef = BridgeApplySyncRef<[
691
+ number,
692
+ string | null
693
+ ], void>;
694
+ export type NetworkHttp2StreamPauseRawBridgeRef = BridgeApplySyncRef<[number], void>;
695
+ export type NetworkHttp2StreamResumeRawBridgeRef = BridgeApplySyncRef<[number], void>;
696
+ export type NetworkHttp2StreamRespondWithFileRawBridgeRef = BridgeApplySyncRef<[
697
+ number,
698
+ string,
699
+ string,
700
+ string
701
+ ], void>;
702
+ export type NetworkHttp2ServerRespondRawBridgeRef = BridgeApplySyncRef<[
703
+ number,
704
+ number,
705
+ string
706
+ ], void>;
707
+ export type UpgradeSocketWriteRawBridgeRef = BridgeApplySyncRef<[number, string], void>;
708
+ export type UpgradeSocketEndRawBridgeRef = BridgeApplySyncRef<[number], void>;
709
+ export type UpgradeSocketDestroyRawBridgeRef = BridgeApplySyncRef<[number], void>;
710
+ export type NetSocketConnectRawBridgeRef = BridgeApplySyncRef<[string], number>;
711
+ export type NetSocketWaitConnectRawBridgeRef = BridgeApplyRef<[number], string>;
712
+ export type NetSocketReadRawBridgeRef = BridgeApplySyncRef<[number], string | null>;
713
+ export type NetSocketSetNoDelayRawBridgeRef = BridgeApplySyncRef<[number, boolean], void>;
714
+ export type NetSocketSetKeepAliveRawBridgeRef = BridgeApplySyncRef<[number, boolean, number], void>;
715
+ export type NetSocketWriteRawBridgeRef = BridgeApplySyncRef<[number, string], void>;
716
+ export type NetSocketEndRawBridgeRef = BridgeApplySyncRef<[number], void>;
717
+ export type NetSocketDestroyRawBridgeRef = BridgeApplySyncRef<[number], void>;
718
+ export type NetSocketUpgradeTlsRawBridgeRef = BridgeApplySyncRef<[number, string], void>;
719
+ export type NetSocketGetTlsClientHelloRawBridgeRef = BridgeApplySyncRef<[number], string>;
720
+ export type NetSocketTlsQueryRawBridgeRef = BridgeApplySyncRef<[
721
+ number,
722
+ string,
723
+ boolean?
724
+ ], string>;
725
+ export type TlsGetCiphersRawBridgeRef = BridgeApplySyncRef<[], string>;
726
+ export type NetServerListenRawBridgeRef = BridgeApplyRef<[string], string>;
727
+ export type NetServerAcceptRawBridgeRef = BridgeApplySyncRef<[number], string | null>;
728
+ export type NetServerCloseRawBridgeRef = BridgeApplyRef<[number], void>;
729
+ export type DgramSocketCreateRawBridgeRef = BridgeApplySyncRef<[string], number>;
730
+ export type DgramSocketBindRawBridgeRef = BridgeApplySyncPromiseRef<[number, string], string>;
731
+ export type DgramSocketRecvRawBridgeRef = BridgeApplySyncRef<[number], string | null>;
732
+ export type DgramSocketSendRawBridgeRef = BridgeApplySyncPromiseRef<[number, string], number>;
733
+ export type DgramSocketCloseRawBridgeRef = BridgeApplySyncPromiseRef<[number], void>;
734
+ export type DgramSocketAddressRawBridgeRef = BridgeApplySyncRef<[number], string>;
735
+ export type DgramSocketSetBufferSizeRawBridgeRef = BridgeApplySyncRef<[
736
+ number,
737
+ "recv" | "send",
738
+ number
739
+ ], void>;
740
+ export type DgramSocketGetBufferSizeRawBridgeRef = BridgeApplySyncRef<[
741
+ number,
742
+ "recv" | "send"
743
+ ], number>;
744
+ export type ResolveModuleSyncBridgeRef = BridgeApplySyncRef<[
745
+ string,
746
+ string
747
+ ], string | null>;
748
+ export type LoadFileSyncBridgeRef = BridgeApplySyncRef<[string], string | null>;
749
+ export type PtySetRawModeBridgeRef = BridgeApplySyncRef<[boolean], void>;
318
750
  export type RegisterHandleBridgeFn = (id: string, description: string) => void;
319
751
  export type UnregisterHandleBridgeFn = (id: string) => void;
752
+ export type BatchResolveModulesBridgeRef = BridgeApplySyncPromiseRef<[
753
+ string
754
+ ], string>;