refactor: colocate remote runtime connect bound (#33004)

This commit is contained in:
Neil
2026-10-23 18:53:38 -07:00
committed by GitHub
parent 5672185e59
commit 9c262ffe36
9 changed files with 13 additions and 13 deletions
+1 -1
View File
@@ -11786,7 +11786,7 @@
"src/shared/remote-rpc-content-budget.test.ts": 95,
"src/shared/remote-runtime-client-error-classification.test.ts": 42,
"src/shared/remote-runtime-client.test.ts": 5160,
"src/shared/remote-runtime-connect-bound.test.ts": 572,
"src/shared/remote-runtime/remote-runtime-connect-bound.test.ts": 572,
"src/shared/remote-runtime-memory-limits.test.ts": 120,
"src/shared/remote-runtime-outbound-admission.test.ts": 1044,
"src/shared/remote-runtime-pty-id.test.ts": 38,
+1 -1
View File
@@ -162,7 +162,7 @@ const NODE_RUNTIME_INCLUDE = [
// Bun resolves 'ws' to its built-in client, which bypasses the patched package.
'src/main/runtime/rpc/ws-empty-payload-frame-write.test.ts',
'src/shared/remote-runtime-client.test.ts',
'src/shared/remote-runtime-connect-bound.test.ts',
'src/shared/remote-runtime/remote-runtime-connect-bound.test.ts',
// Bun's built-in ws client ignores maxPayload; the product opener only runs on Node.
'src/shared/remote-runtime/requests/remote-runtime-request-websocket.test.ts',
'src/shared/remote-runtime/requests/remote-runtime-subscription-connect-bound.test.ts',
@@ -13,7 +13,7 @@ import {
encodeTerminalStreamJson,
encodeTerminalStreamText
} from '../../../../shared/terminal-stream-protocol'
import { REMOTE_RUNTIME_CONNECT_FAILURE_PHRASE } from '../../../../shared/remote-runtime-connect-bound'
import { REMOTE_RUNTIME_CONNECT_FAILURE_PHRASE } from '../../../../shared/remote-runtime/remote-runtime-connect-bound'
import { REMOTE_RUNTIME_AUTO_RECOVERY_TIMEOUT_MS } from './remote-runtime-pty-recovery-state'
const FIRST_HANDLE = 'terminal-1'
@@ -32,7 +32,7 @@ import {
import {
WS_HANDSHAKE_TIMEOUT_MESSAGE,
remoteRuntimeConnectFailureMessage
} from './remote-runtime-connect-bound'
} from './remote-runtime/remote-runtime-connect-bound'
import {
invalidRemoteRuntimeResponseError,
parseRemoteRuntimeRpcFrame,
@@ -1,9 +1,9 @@
import { pairedRuntimeConnectionFromOffer } from './paired-runtime-connection'
import { pairedRuntimeConnectionFromOffer } from '../paired-runtime-connection'
import { createServer, type Server, type Socket } from 'node:net'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { generateKeyPair, publicKeyToBase64 } from './e2ee-crypto'
import type { RemoteRuntimeClientError } from './remote-runtime-client-error'
import { isRecoverableRemoteRuntimeConnectionError } from './remote-runtime-client-error-classification'
import { generateKeyPair, publicKeyToBase64 } from '../e2ee-crypto'
import type { RemoteRuntimeClientError } from '../remote-runtime-client-error'
import { isRecoverableRemoteRuntimeConnectionError } from '../remote-runtime-client-error-classification'
import {
REMOTE_RUNTIME_CONNECT_TIMEOUT_MS,
WS_HANDSHAKE_TIMEOUT_MESSAGE,
@@ -11,8 +11,8 @@ import {
remoteRuntimeConnectFailureMessage,
remoteRuntimeConnectOptions
} from './remote-runtime-connect-bound'
import { openRemoteRuntimeWebSocket } from './remote-runtime/requests/remote-runtime-request-websocket'
import { withRemoteRuntimeTailscaleHint } from './remote-runtime/remote-runtime-tailscale-hint'
import { openRemoteRuntimeWebSocket } from './requests/remote-runtime-request-websocket'
import { withRemoteRuntimeTailscaleHint } from './remote-runtime-tailscale-hint'
const servers = new Set<Server>()
const sockets = new Set<Socket>()
@@ -13,7 +13,7 @@ import { RemoteRuntimeClientError } from '../../remote-runtime-client-error'
import {
remoteRuntimeConnectFailureMessage,
remoteRuntimeConnectOptions
} from '../../remote-runtime-connect-bound'
} from '../remote-runtime-connect-bound'
import {
REMOTE_RUNTIME_MAX_WEBSOCKET_FRAME_BYTES,
serializeRemoteRuntimePayload,
@@ -6,7 +6,7 @@ import { RemoteRuntimeClientError } from '../../remote-runtime-client-error'
import {
remoteRuntimeConnectFailureMessage,
remoteRuntimeConnectOptions
} from '../../remote-runtime-connect-bound'
} from '../remote-runtime-connect-bound'
import { REMOTE_RUNTIME_MAX_WEBSOCKET_FRAME_BYTES } from '../../remote-runtime-memory-limits'
import {
invalidRemoteRuntimeResponseError,
@@ -12,7 +12,7 @@ import { RemoteRuntimeClientError } from '../../remote-runtime-client-error'
import {
remoteRuntimeConnectFailureMessage,
remoteRuntimeConnectOptions
} from '../../remote-runtime-connect-bound'
} from '../remote-runtime-connect-bound'
import {
isRemoteRuntimeBinaryFrameWithinLimit,
REMOTE_RUNTIME_MAX_WEBSOCKET_FRAME_BYTES,