@@ -23,7 +23,7 @@ import {
2323 waitForProcessExit ,
2424} from '../utils/process-identity.ts' ;
2525import { ensureMetroCompanion , stopMetroCompanion } from '../metro/client-metro-companion.ts' ;
26- import { ensureReactDevtoolsCompanion } from '../client-react-devtools-companion.ts' ;
26+ import { ensureReactDevtoolsCompanion } from '../client/client -react-devtools-companion.ts' ;
2727
2828const TEST_BRIDGE_SCOPE = {
2929 tenantId : 'tenant-1' ,
@@ -41,7 +41,7 @@ function assertCompanionSpawnTarget(): void {
4141 assert . ok ( firstCall , 'expected runCmdDetached to be called' ) ;
4242 assert . equal ( firstCall [ 0 ] , process . execPath ) ;
4343 assert . ok (
44- firstCall [ 1 ] . some ( ( arg ) => arg . includes ( 'src/companion-tunnel.ts' ) ) ,
44+ firstCall [ 1 ] . some ( ( arg ) => arg . includes ( 'src/client/ companion-tunnel.ts' ) ) ,
4545 `expected companion entry path in ${ JSON . stringify ( firstCall [ 1 ] ) } ` ,
4646 ) ;
4747 assert . equal ( firstCall [ 1 ] . at ( - 1 ) , '--agent-device-run-metro-companion' ) ;
@@ -62,7 +62,7 @@ test('companion ownership is profile-scoped and consumer-counted', async () => {
6262 pid === 111 ? 'start-111' : 'start-222' ,
6363 ) ;
6464 vi . mocked ( readProcessCommand ) . mockImplementation (
65- ( ) => `${ process . execPath } src/companion-tunnel.ts --agent-device-run-metro-companion` ,
65+ ( ) => `${ process . execPath } src/client/ companion-tunnel.ts --agent-device-run-metro-companion` ,
6666 ) ;
6767 vi . mocked ( waitForProcessExit ) . mockResolvedValue ( true ) ;
6868 const killSpy = vi . spyOn ( process , 'kill' ) . mockImplementation ( ( ) => true ) ;
@@ -161,7 +161,7 @@ test('launchUrl changes force a companion respawn for the same profile', async (
161161 pid === 333 ? 'start-333' : 'start-444' ,
162162 ) ;
163163 vi . mocked ( readProcessCommand ) . mockImplementation (
164- ( ) => `${ process . execPath } src/companion-tunnel.ts --agent-device-run-metro-companion` ,
164+ ( ) => `${ process . execPath } src/client/ companion-tunnel.ts --agent-device-run-metro-companion` ,
165165 ) ;
166166 vi . mocked ( waitForProcessExit ) . mockResolvedValue ( true ) ;
167167 const killSpy = vi . spyOn ( process , 'kill' ) . mockImplementation ( ( ) => true ) ;
@@ -212,8 +212,8 @@ test('metro and React DevTools companions use distinct profile state paths', asy
212212 ) ;
213213 vi . mocked ( readProcessCommand ) . mockImplementation ( ( pid ) =>
214214 pid === 888
215- ? `${ process . execPath } src/companion-tunnel.ts --agent-device-run-react-devtools-companion`
216- : `${ process . execPath } src/companion-tunnel.ts --agent-device-run-metro-companion` ,
215+ ? `${ process . execPath } src/client/ companion-tunnel.ts --agent-device-run-react-devtools-companion`
216+ : `${ process . execPath } src/client/ companion-tunnel.ts --agent-device-run-metro-companion` ,
217217 ) ;
218218
219219 const profileKey = '/tmp/shared-remote.json' ;
@@ -257,7 +257,7 @@ test('spawned companion uses neutral env names', async () => {
257257 vi . mocked ( runCmdDetached ) . mockReturnValueOnce ( 999 ) ;
258258 vi . mocked ( readProcessStartTime ) . mockReturnValue ( 'start-999' ) ;
259259 vi . mocked ( readProcessCommand ) . mockReturnValue (
260- `${ process . execPath } src/companion-tunnel.ts --agent-device-run-metro-companion` ,
260+ `${ process . execPath } src/client/ companion-tunnel.ts --agent-device-run-metro-companion` ,
261261 ) ;
262262
263263 await ensureMetroCompanion ( {
@@ -298,7 +298,7 @@ test('state sentinel exists before spawning companion worker', async () => {
298298 } ) ;
299299 vi . mocked ( readProcessStartTime ) . mockReturnValue ( 'start-1001' ) ;
300300 vi . mocked ( readProcessCommand ) . mockReturnValue (
301- `${ process . execPath } src/companion-tunnel.ts --agent-device-run-metro-companion` ,
301+ `${ process . execPath } src/client/ companion-tunnel.ts --agent-device-run-metro-companion` ,
302302 ) ;
303303
304304 const spawned = await ensureMetroCompanion ( {
@@ -333,7 +333,7 @@ test('legacy state without bridge scope is stopped before respawn', async () =>
333333 `${ JSON . stringify ( {
334334 pid : 555 ,
335335 startTime : 'start-555' ,
336- command : `${ process . execPath } src/companion-tunnel.ts --agent-device-run-metro-companion` ,
336+ command : `${ process . execPath } src/client/ companion-tunnel.ts --agent-device-run-metro-companion` ,
337337 serverBaseUrl : 'https://bridge.example.test' ,
338338 localBaseUrl : 'http://127.0.0.1:8081' ,
339339 tokenHash : 'legacy-token-hash' ,
@@ -345,7 +345,7 @@ test('legacy state without bridge scope is stopped before respawn', async () =>
345345 vi . mocked ( isProcessAlive ) . mockReturnValue ( true ) ;
346346 vi . mocked ( readProcessStartTime ) . mockReturnValue ( 'start-555' ) ;
347347 vi . mocked ( readProcessCommand ) . mockReturnValue (
348- `${ process . execPath } src/companion-tunnel.ts --agent-device-run-metro-companion` ,
348+ `${ process . execPath } src/client/ companion-tunnel.ts --agent-device-run-metro-companion` ,
349349 ) ;
350350 vi . mocked ( waitForProcessExit ) . mockResolvedValue ( true ) ;
351351 const killSpy = vi . spyOn ( process , 'kill' ) . mockImplementation ( ( ) => true ) ;
0 commit comments