diff --git a/src/daemon/replay/internal/__tests__/session-replay-maestro-error-projection.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-maestro-error-projection.test.ts similarity index 78% rename from src/daemon/replay/internal/__tests__/session-replay-maestro-error-projection.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-maestro-error-projection.test.ts index 73e10d05d6..e14311ba93 100644 --- a/src/daemon/replay/internal/__tests__/session-replay-maestro-error-projection.test.ts +++ b/src/daemon/__tests__/replay-maestro/session-replay-maestro-error-projection.test.ts @@ -2,13 +2,13 @@ import fs from 'node:fs'; import path from 'node:path'; import { expect, test } from 'vitest'; import { stringify } from 'yaml'; -import { runTypedMaestroReplay } from '../session-replay-maestro-runtime.ts'; -import { SessionStore } from '../../../session-store.ts'; -import { replayCommandForTest } from '../../__tests__/replay-command-fixture.ts'; -import { makeIosSession } from '../../../../__tests__/test-utils/session-factories.ts'; -import { maestroScriptSourceBundleFor } from '../../../../__tests__/test-utils/replay-script-source.ts'; -import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts'; -import type { DaemonRequest } from '../../../daemon-request.ts'; +import { runTypedMaestroReplay } from '../../replay/internal/session-replay-maestro-runtime.ts'; +import { SessionStore } from '../../session-store.ts'; +import { replayCommandForTest } from '../../replay/__tests__/replay-command-fixture.ts'; +import { makeIosSession } from '../../../__tests__/test-utils/session-factories.ts'; +import { maestroScriptSourceBundleFor } from '../../../__tests__/test-utils/replay-script-source.ts'; +import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts'; +import type { DaemonRequest } from '../../daemon-request.ts'; // A replay error raised before any step runs carries no `failure`, so the route // projects the normalized error directly instead of through the divergence diff --git a/src/daemon/replay/internal/__tests__/session-replay-maestro-failure.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-maestro-failure.test.ts similarity index 94% rename from src/daemon/replay/internal/__tests__/session-replay-maestro-failure.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-maestro-failure.test.ts index 5d292e695a..c7b6971409 100644 --- a/src/daemon/replay/internal/__tests__/session-replay-maestro-failure.test.ts +++ b/src/daemon/__tests__/replay-maestro/session-replay-maestro-failure.test.ts @@ -1,13 +1,13 @@ -import { noMaestroIncludeSources } from '../../../../__tests__/test-utils/replay-script-source.ts'; +import { noMaestroIncludeSources } from '../../../__tests__/test-utils/replay-script-source.ts'; import { beforeEach, expect, test, vi } from 'vitest'; -import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts'; +import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts'; vi.mock('@agent-device/device-selection/dispatch-resolve', async (importOriginal) => { const actual = await importOriginal(); return { ...actual, resolveTargetDevice: vi.fn() }; }); -vi.mock('../../../snapshot-interactor-capture.ts', () => ({ +vi.mock('../../snapshot-interactor-capture.ts', () => ({ captureSnapshotWithInteractor: vi.fn(), })); import fs from 'node:fs'; @@ -23,19 +23,19 @@ import { import { buildTypedMaestroFailureReportProjection, buildTypedMaestroFailureResponse, -} from '../session-replay-maestro-failure.ts'; -import { runReplayForTest } from '../../__tests__/replay-command-fixture.ts'; -import { SessionStore } from '../../../session-store.ts'; -import { captureSnapshotWithInteractor } from '../../../snapshot-interactor-capture.ts'; -import { makeIosSession } from '../../../../__tests__/test-utils/session-factories.ts'; -import { baseReplayRequest as baseReq } from '../../__tests__/session-replay-runtime.fixtures.ts'; -import { replaySessionForTest } from './replay-session-fixture.ts'; +} from '../../replay/internal/session-replay-maestro-failure.ts'; +import { runReplayForTest } from '../../replay/__tests__/replay-command-fixture.ts'; +import { SessionStore } from '../../session-store.ts'; +import { captureSnapshotWithInteractor } from '../../snapshot-interactor-capture.ts'; +import { makeIosSession } from '../../../__tests__/test-utils/session-factories.ts'; +import { baseReplayRequest as baseReq } from '../../replay/__tests__/session-replay-runtime.fixtures.ts'; +import { replaySessionForTest } from '../../replay/internal/__tests__/replay-session-fixture.ts'; import type { SnapshotNode } from '@agent-device/kernel/snapshot'; import { captureSnapshotThroughLegacyDispatchFixture, legacyDispatchCapture, -} from '../../../__tests__/legacy-snapshot-capture-fixture.ts'; -import { refFrameScope } from '../../../ref-frame.ts'; +} from '../legacy-snapshot-capture-fixture.ts'; +import { refFrameScope } from '../../ref-frame.ts'; const mockDispatchCommand = legacyDispatchCapture; const mockCaptureSnapshotWithInteractor = vi.mocked(captureSnapshotWithInteractor); diff --git a/src/daemon/replay/internal/__tests__/session-replay-maestro-remote-evalscript.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-maestro-remote-evalscript.test.ts similarity index 89% rename from src/daemon/replay/internal/__tests__/session-replay-maestro-remote-evalscript.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-maestro-remote-evalscript.test.ts index d87389e8ac..933c71086e 100644 --- a/src/daemon/replay/internal/__tests__/session-replay-maestro-remote-evalscript.test.ts +++ b/src/daemon/__tests__/replay-maestro/session-replay-maestro-remote-evalscript.test.ts @@ -2,22 +2,22 @@ import fs from 'node:fs'; import path from 'node:path'; import { describe, expect, test, vi } from 'vitest'; import { createScreenRecordingAdmissionLedger } from '@agent-device/capture-kit/screen-recording-admission-ledger'; -import { LeaseRegistry } from '../../../lease-registry.ts'; -import { platformResourceCleanup } from '../../../../platform-runtime-resource-cleanup.ts'; -import { SessionStore } from '../../../session-store.ts'; -import { makeIosSession } from '../../../../__tests__/test-utils/session-factories.ts'; -import { maestroScriptSourceBundleFor } from '../../../../__tests__/test-utils/replay-script-source.ts'; -import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts'; -import type { DaemonRequest } from '../../../daemon-request.ts'; +import { LeaseRegistry } from '../../lease-registry.ts'; +import { platformResourceCleanup } from '../../../platform-runtime-resource-cleanup.ts'; +import { SessionStore } from '../../session-store.ts'; +import { makeIosSession } from '../../../__tests__/test-utils/session-factories.ts'; +import { maestroScriptSourceBundleFor } from '../../../__tests__/test-utils/replay-script-source.ts'; +import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts'; +import type { DaemonRequest } from '../../daemon-request.ts'; import { unavailableBindDevice, unavailableBindExactDevice, -} from '../../../__tests__/test-device-runtime-gateway.ts'; +} from '../test-device-runtime-gateway.ts'; import { handleReplayCommand, handleReplayTestCommand, -} from '../../../handlers/session-replay-command.ts'; -import type { SessionCommandParams } from '../../../handlers/session-command-input.ts'; +} from '../../handlers/session-replay-command.ts'; +import type { SessionCommandParams } from '../../handlers/session-command-input.ts'; import * as maestro from '@agent-device/maestro'; const spy = vi.spyOn(maestro, 'executeMaestroFlow'); diff --git a/src/daemon/replay/internal/__tests__/session-replay-maestro-session-address.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-maestro-session-address.test.ts similarity index 79% rename from src/daemon/replay/internal/__tests__/session-replay-maestro-session-address.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-maestro-session-address.test.ts index c0e64bd49c..d73d0f4f0c 100644 --- a/src/daemon/replay/internal/__tests__/session-replay-maestro-session-address.test.ts +++ b/src/daemon/__tests__/replay-maestro/session-replay-maestro-session-address.test.ts @@ -2,13 +2,13 @@ import fs from 'node:fs'; import path from 'node:path'; import { expect, test } from 'vitest'; import { stringify } from 'yaml'; -import { runTypedMaestroReplay } from '../session-replay-maestro-runtime.ts'; -import { SessionStore } from '../../../session-store.ts'; -import { replayCommandForTest } from '../../__tests__/replay-command-fixture.ts'; -import { makeIosSession } from '../../../../__tests__/test-utils/session-factories.ts'; -import { maestroScriptSourceBundleFor } from '../../../../__tests__/test-utils/replay-script-source.ts'; -import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts'; -import type { DaemonRequest } from '../../../daemon-request.ts'; +import { runTypedMaestroReplay } from '../../replay/internal/session-replay-maestro-runtime.ts'; +import { SessionStore } from '../../session-store.ts'; +import { replayCommandForTest } from '../../replay/__tests__/replay-command-fixture.ts'; +import { makeIosSession } from '../../../__tests__/test-utils/session-factories.ts'; +import { maestroScriptSourceBundleFor } from '../../../__tests__/test-utils/replay-script-source.ts'; +import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts'; +import type { DaemonRequest } from '../../daemon-request.ts'; // The Maestro replay route resolves the store key upstream and then validates the session's // selectors, so its conflict recovery must name that key too — an implicitly cwd-scoped session diff --git a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-dispatch.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-dispatch.test.ts similarity index 95% rename from src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-dispatch.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-dispatch.test.ts index dc558119b5..6385f6edbf 100644 --- a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-dispatch.test.ts +++ b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-dispatch.test.ts @@ -3,11 +3,11 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; import { test } from 'vitest'; -import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts'; -import type { DaemonRequest, DaemonResponse } from '../../../daemon-request.ts'; -import { SessionStore } from '../../../session-store.ts'; -import { replayScriptSourceBundleFor } from '../../../../__tests__/test-utils/replay-script-source.ts'; -import { makeIosSession } from '../../../../__tests__/test-utils/session-factories.ts'; +import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts'; +import type { DaemonRequest, DaemonResponse } from '../../daemon-request.ts'; +import { SessionStore } from '../../session-store.ts'; +import { replayScriptSourceBundleFor } from '../../../__tests__/test-utils/replay-script-source.ts'; +import { makeIosSession } from '../../../__tests__/test-utils/session-factories.ts'; const { runReplayFixture, runReplayForTest, assertNoUnresolvedInterpolation } = maestroReplayFixture; diff --git a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-keyboard.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-keyboard.test.ts similarity index 100% rename from src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-keyboard.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-keyboard.test.ts diff --git a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-run-flow.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-run-flow.test.ts similarity index 100% rename from src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-run-flow.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-run-flow.test.ts diff --git a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-run-script.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-run-script.test.ts similarity index 100% rename from src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-run-script.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-run-script.test.ts diff --git a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-shell-artifacts.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-shell-artifacts.test.ts similarity index 94% rename from src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-shell-artifacts.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-shell-artifacts.test.ts index 7f31631a19..fafe08603d 100644 --- a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-shell-artifacts.test.ts +++ b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-shell-artifacts.test.ts @@ -3,9 +3,9 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; import { test } from 'vitest'; -import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts'; -import { SessionStore } from '../../../session-store.ts'; -import { replayScriptSourceBundleFor } from '../../../../__tests__/test-utils/replay-script-source.ts'; +import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts'; +import { SessionStore } from '../../session-store.ts'; +import { replayScriptSourceBundleFor } from '../../../__tests__/test-utils/replay-script-source.ts'; const { runReplayFixture, runReplayForTest } = maestroReplayFixture; diff --git a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-swipe.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-swipe.test.ts similarity index 100% rename from src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-swipe.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-swipe.test.ts diff --git a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-targeting.test.ts b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-targeting.test.ts similarity index 100% rename from src/daemon/replay/internal/__tests__/session-replay-runtime-maestro-targeting.test.ts rename to src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro-targeting.test.ts diff --git a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro.fixtures.ts b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro.fixtures.ts similarity index 89% rename from src/daemon/replay/internal/__tests__/session-replay-runtime-maestro.fixtures.ts rename to src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro.fixtures.ts index 7fbc8fcdfc..50d8844d47 100644 --- a/src/daemon/replay/internal/__tests__/session-replay-runtime-maestro.fixtures.ts +++ b/src/daemon/__tests__/replay-maestro/session-replay-runtime-maestro.fixtures.ts @@ -35,7 +35,7 @@ vi.mock('@agent-device/device-selection/dispatch-resolve', async (importOriginal }; }); -vi.mock('../../../snapshot-interactor-capture.ts', () => ({ +vi.mock('../../snapshot-interactor-capture.ts', () => ({ captureSnapshotWithInteractor: vi.fn(), })); @@ -43,18 +43,18 @@ import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; import type { CommandFlags } from '@agent-device/contracts/command'; -import type { DaemonInvokeFn, DaemonRequest, DaemonResponse } from '../../../daemon-request.ts'; -import { mkdtempForTestSync } from '../../../../__tests__/test-utils/tmp-dir.ts'; -import { SessionStore } from '../../../session-store.ts'; -import { runReplayForTest } from '../../__tests__/replay-command-fixture.ts'; +import type { DaemonInvokeFn, DaemonRequest, DaemonResponse } from '../../daemon-request.ts'; +import { mkdtempForTestSync } from '../../../__tests__/test-utils/tmp-dir.ts'; +import { SessionStore } from '../../session-store.ts'; +import { runReplayForTest } from '../../replay/__tests__/replay-command-fixture.ts'; import type { ReplayScriptSourceBundle } from '@agent-device/contracts/replay'; import { maestroScriptSourceBundleFor, replayScriptSourceBundleFor, -} from '../../../../__tests__/test-utils/replay-script-source.ts'; -import { captureSnapshotThroughLegacyDispatchFixture } from '../../../__tests__/legacy-snapshot-capture-fixture.ts'; -import { captureSnapshotWithInteractor } from '../../../snapshot-interactor-capture.ts'; -import { seedReplayFixtureSession } from '../../__tests__/session-replay-runtime.fixtures.ts'; +} from '../../../__tests__/test-utils/replay-script-source.ts'; +import { captureSnapshotThroughLegacyDispatchFixture } from '../legacy-snapshot-capture-fixture.ts'; +import { captureSnapshotWithInteractor } from '../../snapshot-interactor-capture.ts'; +import { seedReplayFixtureSession } from '../../replay/__tests__/session-replay-runtime.fixtures.ts'; vi.mocked(captureSnapshotWithInteractor).mockImplementation( captureSnapshotThroughLegacyDispatchFixture,