diff --git a/.fallowrc.json b/.fallowrc.json index f4d2221b9..49c6b00c0 100644 --- a/.fallowrc.json +++ b/.fallowrc.json @@ -28,7 +28,7 @@ "examples/test-app/**", "scripts/perf/**", "scripts/layering/**", - "apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests.xctestplan", + "apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests.xctestplan", "scripts/write-xcuitest-cache-metadata.mjs" ], "ignoreDependencies": ["@theme"], diff --git a/.gitattributes b/.gitattributes index 3935bb9e9..97f89d64f 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1 @@ -android-snapshot-helper/debug.keystore binary +android/snapshot-helper/debug.keystore binary diff --git a/.github/actions/setup-apple-replay/action.yml b/.github/actions/setup-apple-replay/action.yml index 45be6c128..f2375671e 100644 --- a/.github/actions/setup-apple-replay/action.yml +++ b/.github/actions/setup-apple-replay/action.yml @@ -52,7 +52,7 @@ runs: id: source-hash run: | set -euo pipefail - echo "value=${{ hashFiles('apple-runner/**', 'scripts/build-xcuitest-apple.sh', 'scripts/patch-xcuitest-runner-icon.ts', 'scripts/write-xcuitest-cache-metadata.mjs', 'src/platforms/ios/apple-runner-platform.ts', 'src/platforms/ios/runner-icon.ts', 'src/platforms/ios/runner-xctestrun.ts', 'src/platforms/ios/runner-xctestrun-products.ts', '.github/actions/setup-apple-replay/action.yml', 'package.json', 'pnpm-lock.yaml') }}" >> "$GITHUB_OUTPUT" + echo "value=${{ hashFiles('apple/runner/**', 'scripts/build-xcuitest-apple.sh', 'scripts/patch-xcuitest-runner-icon.ts', 'scripts/write-xcuitest-cache-metadata.mjs', 'src/platforms/ios/apple-runner-platform.ts', 'src/platforms/ios/runner-icon.ts', 'src/platforms/ios/runner-xctestrun.ts', 'src/platforms/ios/runner-xctestrun-products.ts', '.github/actions/setup-apple-replay/action.yml', 'package.json', 'pnpm-lock.yaml') }}" >> "$GITHUB_OUTPUT" shell: bash - name: Cache replay prebuilt diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 549870163..9403afef9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,7 +32,7 @@ jobs: - name: Disallow trailing commas before closing parenthesis in Swift run: | - if rg -nU --glob '*.swift' ',\s*\n\s*\)' apple-runner; then + if rg -nU --glob '*.swift' ',\s*\n\s*\)' apple/runner; then echo "Found trailing commas before ')' in Swift files. This syntax requires Swift 6.1+ and breaks older Xcode toolchains." exit 1 fi diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 417598ef7..cbbe29cc1 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -97,7 +97,7 @@ jobs: echo "=== AT-SPI2 Python bindings ===" python3 -c "import gi; gi.require_version('Atspi', '2.0'); from gi.repository import Atspi; print('OK')" echo "=== AT-SPI2 tree dump (quick test) ===" - python3 src/platforms/linux/atspi-dump.py --surface desktop --max-nodes 5 | python3 -m json.tool | head -20 || echo "::warning::AT-SPI2 tree dump returned no nodes (expected before any app is launched)" + python3 linux/atspi-dump.py --surface desktop --max-nodes 5 | python3 -m json.tool | head -20 || echo "::warning::AT-SPI2 tree dump returned no nodes (expected before any app is launched)" echo "=== xdotool ===" xdotool version diff --git a/.gitignore b/.gitignore index 92230d385..75369687e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,9 +34,9 @@ xcuserdata/ *.xctestrun *.xcarchive .skillgym-results/ -android-snapshot-helper/build/ -android-snapshot-helper/dist/ -android-multitouch-helper/build/ -android-multitouch-helper/dist/ -android-ime-helper/build/ -android-ime-helper/dist/ +android/snapshot-helper/build/ +android/snapshot-helper/dist/ +android/multitouch-helper/build/ +android/multitouch-helper/dist/ +android/ime-helper/build/ +android/ime-helper/dist/ diff --git a/.worktreeinclude b/.worktreeinclude index 807fc6fe3..ab3089cbb 100644 --- a/.worktreeinclude +++ b/.worktreeinclude @@ -8,10 +8,10 @@ examples/test-app/.expo/ .build/ .swiftpm/ DerivedData/ -android-snapshot-helper/build/ -android-snapshot-helper/dist/ -android-multitouch-helper/build/ -android-multitouch-helper/dist/ +android/snapshot-helper/build/ +android/snapshot-helper/dist/ +android/multitouch-helper/build/ +android/multitouch-helper/dist/ # Tool caches .fallow/ diff --git a/android-ime-helper/AndroidManifest.xml b/android/ime-helper/AndroidManifest.xml similarity index 100% rename from android-ime-helper/AndroidManifest.xml rename to android/ime-helper/AndroidManifest.xml diff --git a/android-ime-helper/README.md b/android/ime-helper/README.md similarity index 100% rename from android-ime-helper/README.md rename to android/ime-helper/README.md diff --git a/android-ime-helper/res/xml/method.xml b/android/ime-helper/res/xml/method.xml similarity index 100% rename from android-ime-helper/res/xml/method.xml rename to android/ime-helper/res/xml/method.xml diff --git a/android-ime-helper/src/main/java/com/callstack/agentdevice/imehelper/TestInputMethodService.java b/android/ime-helper/src/main/java/com/callstack/agentdevice/imehelper/TestInputMethodService.java similarity index 100% rename from android-ime-helper/src/main/java/com/callstack/agentdevice/imehelper/TestInputMethodService.java rename to android/ime-helper/src/main/java/com/callstack/agentdevice/imehelper/TestInputMethodService.java diff --git a/android-multitouch-helper/AndroidManifest.xml b/android/multitouch-helper/AndroidManifest.xml similarity index 100% rename from android-multitouch-helper/AndroidManifest.xml rename to android/multitouch-helper/AndroidManifest.xml diff --git a/android-multitouch-helper/README.md b/android/multitouch-helper/README.md similarity index 100% rename from android-multitouch-helper/README.md rename to android/multitouch-helper/README.md diff --git a/android-multitouch-helper/src/main/java/com/callstack/agentdevice/multitouchhelper/MultiTouchInstrumentation.java b/android/multitouch-helper/src/main/java/com/callstack/agentdevice/multitouchhelper/MultiTouchInstrumentation.java similarity index 100% rename from android-multitouch-helper/src/main/java/com/callstack/agentdevice/multitouchhelper/MultiTouchInstrumentation.java rename to android/multitouch-helper/src/main/java/com/callstack/agentdevice/multitouchhelper/MultiTouchInstrumentation.java diff --git a/android-multitouch-helper/src/main/java/com/callstack/agentdevice/multitouchhelper/PointerEventSchedule.java b/android/multitouch-helper/src/main/java/com/callstack/agentdevice/multitouchhelper/PointerEventSchedule.java similarity index 100% rename from android-multitouch-helper/src/main/java/com/callstack/agentdevice/multitouchhelper/PointerEventSchedule.java rename to android/multitouch-helper/src/main/java/com/callstack/agentdevice/multitouchhelper/PointerEventSchedule.java diff --git a/android-multitouch-helper/src/test/java/com/callstack/agentdevice/multitouchhelper/PointerEventScheduleTest.java b/android/multitouch-helper/src/test/java/com/callstack/agentdevice/multitouchhelper/PointerEventScheduleTest.java similarity index 100% rename from android-multitouch-helper/src/test/java/com/callstack/agentdevice/multitouchhelper/PointerEventScheduleTest.java rename to android/multitouch-helper/src/test/java/com/callstack/agentdevice/multitouchhelper/PointerEventScheduleTest.java diff --git a/android-snapshot-helper/AndroidManifest.xml b/android/snapshot-helper/AndroidManifest.xml similarity index 100% rename from android-snapshot-helper/AndroidManifest.xml rename to android/snapshot-helper/AndroidManifest.xml diff --git a/android-snapshot-helper/README.md b/android/snapshot-helper/README.md similarity index 98% rename from android-snapshot-helper/README.md rename to android/snapshot-helper/README.md index f0cf0e2b3..233374c89 100644 --- a/android-snapshot-helper/README.md +++ b/android/snapshot-helper/README.md @@ -20,7 +20,7 @@ sh ./scripts/build-android-snapshot-helper.sh "$VERSION" .tmp/android-snapshot-h The build uses Android SDK command-line tools directly. It expects `ANDROID_HOME` or `ANDROID_SDK_ROOT` to point at an SDK with `platforms/android-36` and matching build tools. -`pnpm prepack` builds the npm-bundled helper into `android-snapshot-helper/dist`; npm users get +`pnpm prepack` builds the npm-bundled helper into `android/snapshot-helper/dist`; npm users get that APK in the package and the first helper-backed `snapshot` installs it automatically when missing or outdated. diff --git a/android-snapshot-helper/debug.keystore b/android/snapshot-helper/debug.keystore similarity index 100% rename from android-snapshot-helper/debug.keystore rename to android/snapshot-helper/debug.keystore diff --git a/android-snapshot-helper/src/main/java/com/callstack/agentdevice/snapshothelper/SnapshotInstrumentation.java b/android/snapshot-helper/src/main/java/com/callstack/agentdevice/snapshothelper/SnapshotInstrumentation.java similarity index 100% rename from android-snapshot-helper/src/main/java/com/callstack/agentdevice/snapshothelper/SnapshotInstrumentation.java rename to android/snapshot-helper/src/main/java/com/callstack/agentdevice/snapshothelper/SnapshotInstrumentation.java diff --git a/macos-helper/Package.swift b/apple/macos-helper/Package.swift similarity index 100% rename from macos-helper/Package.swift rename to apple/macos-helper/Package.swift diff --git a/macos-helper/Sources/AgentDeviceMacOSHelper/AudioProbe.swift b/apple/macos-helper/Sources/AgentDeviceMacOSHelper/AudioProbe.swift similarity index 100% rename from macos-helper/Sources/AgentDeviceMacOSHelper/AudioProbe.swift rename to apple/macos-helper/Sources/AgentDeviceMacOSHelper/AudioProbe.swift diff --git a/macos-helper/Sources/AgentDeviceMacOSHelper/SnapshotTraversal.swift b/apple/macos-helper/Sources/AgentDeviceMacOSHelper/SnapshotTraversal.swift similarity index 100% rename from macos-helper/Sources/AgentDeviceMacOSHelper/SnapshotTraversal.swift rename to apple/macos-helper/Sources/AgentDeviceMacOSHelper/SnapshotTraversal.swift diff --git a/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift b/apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift similarity index 100% rename from macos-helper/Sources/AgentDeviceMacOSHelper/main.swift rename to apple/macos-helper/Sources/AgentDeviceMacOSHelper/main.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj b/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj rename to apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcshareddata/xcschemes/AgentDeviceRunner.xcscheme b/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcshareddata/xcschemes/AgentDeviceRunner.xcscheme similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcshareddata/xcschemes/AgentDeviceRunner.xcscheme rename to apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcshareddata/xcschemes/AgentDeviceRunner.xcscheme diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m b/apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m rename to apple/runner/AgentDeviceRunner/AgentDeviceRunner/AgentDeviceRunnerApp.m diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests.xctestplan b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests.xctestplan similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests.xctestplan rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests.xctestplan diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests-Bridging-Header.h b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests-Bridging-Header.h similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests-Bridging-Header.h rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests-Bridging-Header.h diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests.entitlements b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests.entitlements similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests.entitlements rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/AgentDeviceRunnerUITests.entitlements diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.h diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerAXSnapshotBridge.m diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.h b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.h similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.h rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.h diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.m b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.m similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.m rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerObjCExceptionCatcher.m diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.h diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerSynthesizedGesture.m diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift similarity index 96% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift index 6b80bdd75..aeec438aa 100644 --- a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift +++ b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift @@ -53,7 +53,8 @@ extension RunnerTests { let fixtureURL = URL(fileURLWithPath: #filePath) .deletingLastPathComponent() // AgentDeviceRunnerUITests .deletingLastPathComponent() // AgentDeviceRunner - .deletingLastPathComponent() // apple-runner + .deletingLastPathComponent() // runner + .deletingLastPathComponent() // apple .deletingLastPathComponent() // repo root .appendingPathComponent("contracts") .appendingPathComponent("fixtures") diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+AXSnapshotFallback.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Alert.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+BlockingSystemModalResolution.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandExecution.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+CommandJournal.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Environment.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Exceptions.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+FlatSnapshotFiltering.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Interaction.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Lifecycle.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+LifecycleCacheTests.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+LifecycleCacheTests.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+LifecycleCacheTests.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+LifecycleCacheTests.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Navigation.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScreenRecorder.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+ScrollGesture.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SequenceExecution.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotCapturePlan.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTraversalIdentityTests.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTraversalIdentityTests.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTraversalIdentityTests.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SnapshotTraversalIdentityTests.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SynthesizedGesturePolicy.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+SystemModal.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TextEntry.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Transport.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+TvRemote.swift diff --git a/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift b/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift rename to apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests.swift diff --git a/apple-runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift b/apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift rename to apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift diff --git a/apple-runner/AgentDeviceRunner/RecordingScripts/recording-resize.swift b/apple/runner/AgentDeviceRunner/RecordingScripts/recording-resize.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/RecordingScripts/recording-resize.swift rename to apple/runner/AgentDeviceRunner/RecordingScripts/recording-resize.swift diff --git a/apple-runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift b/apple/runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift similarity index 100% rename from apple-runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift rename to apple/runner/AgentDeviceRunner/RecordingScripts/recording-trim.swift diff --git a/apple-runner/README.md b/apple/runner/README.md similarity index 92% rename from apple-runner/README.md rename to apple/runner/README.md index a1db95d6b..c2ae59772 100644 --- a/apple-runner/README.md +++ b/apple/runner/README.md @@ -15,7 +15,7 @@ Current internal runner for iOS, tvOS, and macOS desktop automation. Protocol and maintenance references: - Protocol overview: [`RUNNER_PROTOCOL.md`](RUNNER_PROTOCOL.md) -- TypeScript client: [`../src/platforms/apple/core/runner/runner-client.ts`](../src/platforms/apple/core/runner/runner-client.ts) +- TypeScript client: [`../../src/platforms/apple/core/runner/runner-client.ts`](../../src/platforms/apple/core/runner/runner-client.ts) - Swift wire models: [`AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift`](AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift) ## UITest Runner File Map @@ -46,7 +46,7 @@ serialize reliably. In those cases interactive snapshots may return a sparse roo full snapshots preserve the XCTest error. A penalized simulator can recover through private AX; physical devices use a short XCTest probe because no non-XCTest semantic backend is available there. See -[`../docs/adr/0004-ios-snapshot-backend-strategy.md`](../docs/adr/0004-ios-snapshot-backend-strategy.md) +[`../../docs/adr/0004-ios-snapshot-backend-strategy.md`](../../docs/adr/0004-ios-snapshot-backend-strategy.md) for the backend boundary and future simulator AX-service direction. ## Protocol Notes diff --git a/apple-runner/RUNNER_PROTOCOL.md b/apple/runner/RUNNER_PROTOCOL.md similarity index 94% rename from apple-runner/RUNNER_PROTOCOL.md rename to apple/runner/RUNNER_PROTOCOL.md index 6dc2ae933..e5a30bf31 100644 --- a/apple-runner/RUNNER_PROTOCOL.md +++ b/apple/runner/RUNNER_PROTOCOL.md @@ -41,7 +41,7 @@ Examples: The current command names are defined in: -- [`../src/platforms/apple/core/runner/runner-client.ts`](../src/platforms/apple/core/runner/runner-client.ts) +- [`../../src/platforms/apple/core/runner/runner-client.ts`](../../src/platforms/apple/core/runner/runner-client.ts) - [`AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift`](AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Models.swift) ## Response Shape diff --git a/src/platforms/linux/atspi-dump.py b/linux/atspi-dump.py similarity index 100% rename from src/platforms/linux/atspi-dump.py rename to linux/atspi-dump.py diff --git a/package.json b/package.json index 4cce16271..422fa7cc0 100644 --- a/package.json +++ b/package.json @@ -90,16 +90,16 @@ "build:xcuitest:visionos:clean": "pnpm clean:xcuitest:visionos && pnpm build:xcuitest:visionos", "build:android-snapshot-helper": "sh ./scripts/build-android-snapshot-helper.sh $(node -p \"require('./package.json').version\") .tmp/android-snapshot-helper", "package:android-snapshot-helper": "sh ./scripts/package-android-snapshot-helper.sh $(node -p \"require('./package.json').version\") v$(node -p \"require('./package.json').version\") .tmp/android-snapshot-helper", - "package:android-snapshot-helper:npm": "rm -rf android-snapshot-helper/dist && sh ./scripts/package-android-snapshot-helper.sh $(node -p \"require('./package.json').version\") v$(node -p \"require('./package.json').version\") android-snapshot-helper/dist", + "package:android-snapshot-helper:npm": "rm -rf android/snapshot-helper/dist && sh ./scripts/package-android-snapshot-helper.sh $(node -p \"require('./package.json').version\") v$(node -p \"require('./package.json').version\") android/snapshot-helper/dist", "package:apple-runner:npm": "node scripts/package-apple-runner-source.mjs", "build:android-multitouch-helper": "sh ./scripts/build-android-multitouch-helper.sh $(node -p \"require('./package.json').version\") .tmp/android-multitouch-helper", "package:android-multitouch-helper": "sh ./scripts/package-android-multitouch-helper.sh $(node -p \"require('./package.json').version\") .tmp/android-multitouch-helper", - "package:android-multitouch-helper:npm": "rm -rf android-multitouch-helper/dist && sh ./scripts/package-android-multitouch-helper.sh $(node -p \"require('./package.json').version\") android-multitouch-helper/dist", + "package:android-multitouch-helper:npm": "rm -rf android/multitouch-helper/dist && sh ./scripts/package-android-multitouch-helper.sh $(node -p \"require('./package.json').version\") android/multitouch-helper/dist", "build:android": "pnpm package:android-snapshot-helper:npm && pnpm package:android-multitouch-helper:npm && pnpm package:android-ime-helper:npm", "build:android-ime-helper": "sh ./scripts/build-android-ime-helper.sh $(node -p \"require('./package.json').version\") .tmp/android-ime-helper", "package:android-ime-helper": "sh ./scripts/package-android-ime-helper.sh $(node -p \"require('./package.json').version\") .tmp/android-ime-helper", - "package:android-ime-helper:npm": "rm -rf android-ime-helper/dist && sh ./scripts/package-android-ime-helper.sh $(node -p \"require('./package.json').version\") android-ime-helper/dist", - "build:macos-helper": "swift build -c release --package-path macos-helper", + "package:android-ime-helper:npm": "rm -rf android/ime-helper/dist && sh ./scripts/package-android-ime-helper.sh $(node -p \"require('./package.json').version\") android/ime-helper/dist", + "build:macos-helper": "swift build -c release --package-path apple/macos-helper", "build:all": "pnpm build:node && pnpm build:xcuitest", "ad": "node bin/agent-device.mjs", "bench:help-conformance": "node scripts/help-conformance-bench.mjs", @@ -163,18 +163,18 @@ "files": [ "bin", "dist", - "macos-helper", - "!macos-helper/**/.build", - "android-snapshot-helper/dist", - "!android-snapshot-helper/dist/*.idsig", - "!android-snapshot-helper/README.md", - "android-multitouch-helper/dist", - "!android-multitouch-helper/dist/*.idsig", - "!android-multitouch-helper/README.md", - "android-ime-helper/dist", - "!android-ime-helper/dist/*.idsig", - "!android-ime-helper/README.md", - "src/platforms/linux/atspi-dump.py", + "apple/macos-helper", + "!apple/macos-helper/**/.build", + "android/snapshot-helper/dist", + "!android/snapshot-helper/dist/*.idsig", + "!android/snapshot-helper/README.md", + "android/multitouch-helper/dist", + "!android/multitouch-helper/dist/*.idsig", + "!android/multitouch-helper/README.md", + "android/ime-helper/dist", + "!android/ime-helper/dist/*.idsig", + "!android/ime-helper/README.md", + "linux/atspi-dump.py", "skills", "server.json", "smithery.yaml", diff --git a/scripts/build-android-ime-helper.sh b/scripts/build-android-ime-helper.sh index 03512142f..6006b5548 100755 --- a/scripts/build-android-ime-helper.sh +++ b/scripts/build-android-ime-helper.sh @@ -9,7 +9,7 @@ fi VERSION="$1" OUTPUT_DIR="$2" PROJECT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)" -HELPER_DIR="$PROJECT_DIR/android-ime-helper" +HELPER_DIR="$PROJECT_DIR/android/ime-helper" PACKAGE_NAME="com.callstack.agentdevice.imehelper" MIN_SDK=23 TARGET_SDK=36 @@ -49,7 +49,7 @@ BUILD_DIR="$HELPER_DIR/build" CLASSES_DIR="$BUILD_DIR/classes" DEX_DIR="$BUILD_DIR/dex" RES_COMPILED_DIR="$BUILD_DIR/res-compiled" -KEYSTORE="$PROJECT_DIR/android-snapshot-helper/debug.keystore" +KEYSTORE="$PROJECT_DIR/android/snapshot-helper/debug.keystore" UNSIGNED_APK="$BUILD_DIR/helper-unsigned.apk" ALIGNED_APK="$BUILD_DIR/helper-aligned.apk" APK_PATH="$OUTPUT_DIR/$APK_BASENAME" diff --git a/scripts/build-android-multitouch-helper.sh b/scripts/build-android-multitouch-helper.sh index ca494ed9d..0338d436f 100644 --- a/scripts/build-android-multitouch-helper.sh +++ b/scripts/build-android-multitouch-helper.sh @@ -9,7 +9,7 @@ fi VERSION="$1" OUTPUT_DIR="$2" PROJECT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)" -HELPER_DIR="$PROJECT_DIR/android-multitouch-helper" +HELPER_DIR="$PROJECT_DIR/android/multitouch-helper" PACKAGE_NAME="com.callstack.agentdevice.multitouchhelper" MIN_SDK=23 TARGET_SDK=36 @@ -49,7 +49,7 @@ BUILD_DIR="$HELPER_DIR/build" CLASSES_DIR="$BUILD_DIR/classes" TEST_CLASSES_DIR="$BUILD_DIR/test-classes" DEX_DIR="$BUILD_DIR/dex" -KEYSTORE="$PROJECT_DIR/android-snapshot-helper/debug.keystore" +KEYSTORE="$PROJECT_DIR/android/snapshot-helper/debug.keystore" UNSIGNED_APK="$BUILD_DIR/helper-unsigned.apk" ALIGNED_APK="$BUILD_DIR/helper-aligned.apk" APK_PATH="$OUTPUT_DIR/$APK_BASENAME" diff --git a/scripts/build-android-snapshot-helper.sh b/scripts/build-android-snapshot-helper.sh index f1f262216..3cae4b34b 100755 --- a/scripts/build-android-snapshot-helper.sh +++ b/scripts/build-android-snapshot-helper.sh @@ -9,7 +9,7 @@ fi VERSION="$1" OUTPUT_DIR="$2" PROJECT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)" -HELPER_DIR="$PROJECT_DIR/android-snapshot-helper" +HELPER_DIR="$PROJECT_DIR/android/snapshot-helper" PACKAGE_NAME="com.callstack.agentdevice.snapshothelper" MIN_SDK=23 TARGET_SDK=36 diff --git a/scripts/build-xcuitest-apple.sh b/scripts/build-xcuitest-apple.sh index d649decbf..ea1831b8b 100644 --- a/scripts/build-xcuitest-apple.sh +++ b/scripts/build-xcuitest-apple.sh @@ -2,7 +2,7 @@ set -eu PLATFORM="${AGENT_DEVICE_XCUITEST_PLATFORM:-}" -PROJECT_PATH="apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj" +PROJECT_PATH="apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj" SCHEME="AgentDeviceRunner" DEFAULT_IOS_RUNNER_APP_BUNDLE_ID="com.callstack.agentdevice.runner" diff --git a/scripts/check-affected/model.test.ts b/scripts/check-affected/model.test.ts index 24f4dc15a..f8f873301 100644 --- a/scripts/check-affected/model.test.ts +++ b/scripts/check-affected/model.test.ts @@ -75,13 +75,13 @@ test('android-adb stub test delegates project ownership to Vitest', () => { }); test('Swift runner change selects the swift-runner build', () => { - assert.deepEqual(ids(['apple-runner/Sources/Runner/Main.swift']), ['swift-runner']); + assert.deepEqual(ids(['apple/runner/Sources/Runner/Main.swift']), ['swift-runner']); assert.ok(ids(['src/platforms/apple/core/runner/Support.swift']).includes('swift-runner')); }); test('Android helper change selects the android-helpers build', () => { - assert.deepEqual(ids(['android-snapshot-helper/src/Main.kt']), ['android-helpers']); - assert.deepEqual(ids(['android-multitouch-helper/build.gradle']), ['android-helpers']); + assert.deepEqual(ids(['android/snapshot-helper/src/Main.kt']), ['android-helpers']); + assert.deepEqual(ids(['android/multitouch-helper/build.gradle']), ['android-helpers']); }); test('MCP metadata change selects the mcp-metadata check', () => { diff --git a/scripts/check-affected/model.ts b/scripts/check-affected/model.ts index 2bf7a2313..357e4c4d9 100644 --- a/scripts/check-affected/model.ts +++ b/scripts/check-affected/model.ts @@ -244,20 +244,21 @@ const BUILD_OWNERSHIP: ReadonlyArray<{ check: 'swift-runner', rule: 'own:swift', detail: 'Swift runner sources require the XCUITest build', - owns: (file) => file.startsWith('apple-runner/') || file.endsWith('.swift'), + owns: (file) => file.startsWith('apple/runner/') || file.endsWith('.swift'), }, { check: 'android-helpers', rule: 'own:android-helpers', detail: 'Android helper packages have their own build', owns: (file) => - file.startsWith('android-snapshot-helper/') || file.startsWith('android-multitouch-helper/'), + file.startsWith('android/snapshot-helper/') || + file.startsWith('android/multitouch-helper/'), }, { check: 'macos-helper', rule: 'own:macos-helper', detail: 'macOS helper is a separate Swift package build', - owns: (file) => file.startsWith('macos-helper/'), + owns: (file) => file.startsWith('apple/macos-helper/'), }, { check: 'mcp-metadata', diff --git a/scripts/package-apple-runner-source.mjs b/scripts/package-apple-runner-source.mjs index bfc4b25a7..42bb499c8 100644 --- a/scripts/package-apple-runner-source.mjs +++ b/scripts/package-apple-runner-source.mjs @@ -4,8 +4,16 @@ import path from 'node:path'; import { fileURLToPath } from 'node:url'; const UNIT_TEST_CONDITION = 'AGENT_DEVICE_RUNNER_UNIT_TESTS'; -const SOURCE_DIR = path.join('apple-runner'); -const OUTPUT_DIR = path.join('dist', 'apple-runner'); +const SOURCE_DIR = path.join('apple', 'runner'); +const OUTPUT_DIR = path.join('dist', 'apple', 'runner'); +// Packaged-runner locations from before the apple-runner/ -> apple/runner/ move. `dist` ships +// wholesale, so a stale tree left by an older build/checkout would double-ship into the npm +// package (and inflate the bundle-size diff, which packages the base then the PR into one dist). +// Always remove them so only the current OUTPUT_DIR survives. +const LEGACY_OUTPUT_DIRS = [ + path.join('dist', 'apple-runner'), + path.join('dist', 'apple', 'apple-runner'), +]; const SKIPPED_DIR_NAMES = new Set(['.build', '.swiftpm', 'xcuserdata']); const SKIPPED_ROOT_FILES = new Set(['README.md', 'RUNNER_PROTOCOL.md']); @@ -18,6 +26,9 @@ export function packageAppleRunnerSource(options = {}) { } fs.rmSync(outputRoot, { recursive: true, force: true }); + for (const legacyDir of LEGACY_OUTPUT_DIRS) { + fs.rmSync(path.join(root, legacyDir), { recursive: true, force: true }); + } const summary = { outputRoot, copiedFiles: 0, diff --git a/scripts/write-xcuitest-cache-metadata.mjs b/scripts/write-xcuitest-cache-metadata.mjs index d2a7291fc..dd3d250ee 100644 --- a/scripts/write-xcuitest-cache-metadata.mjs +++ b/scripts/write-xcuitest-cache-metadata.mjs @@ -49,7 +49,7 @@ function resolveRunnerTestBundleId() { } function computeRunnerSourceFingerprint() { - const runnerRoot = path.join(projectRoot, 'apple-runner', 'AgentDeviceRunner'); + const runnerRoot = path.join(projectRoot, 'apple', 'runner', 'AgentDeviceRunner'); const files = collectRunnerSourceFiles(runnerRoot); const hash = crypto.createHash('sha256'); for (const file of files) { diff --git a/src/__tests__/apple-runner-package-source.test.ts b/src/__tests__/apple-runner-package-source.test.ts index 6210c941e..b009bf04b 100644 --- a/src/__tests__/apple-runner-package-source.test.ts +++ b/src/__tests__/apple-runner-package-source.test.ts @@ -10,28 +10,28 @@ const repoRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../ const packageScript = path.join(repoRoot, 'scripts', 'package-apple-runner-source.mjs'); const runnerSnapshotSwiftPath = path.join( repoRoot, - 'apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift', + 'apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Snapshot.swift', ); test('package apple runner source strips unit-test blocks without mutating checkout source', async () => { const root = fs.mkdtempSync(path.join(os.tmpdir(), 'agent-device-runner-package-')); onTestFinished(() => fs.rmSync(root, { recursive: true, force: true })); - writeFixtureFile(root, 'apple-runner/README.md', 'developer docs\n'); - writeFixtureFile(root, 'apple-runner/.build/cache.txt', 'cache\n'); + writeFixtureFile(root, 'apple/runner/README.md', 'developer docs\n'); + writeFixtureFile(root, 'apple/runner/.build/cache.txt', 'cache\n'); writeFixtureFile( root, - 'apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj', + 'apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj', '', ); writeFixtureFile( root, - 'apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcuserdata/user.xcuserstate', + 'apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcuserdata/user.xcuserstate', 'state\n', ); writeFixtureFile( root, - 'apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Feature.swift', + 'apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Feature.swift', [ 'extension RunnerTests {', ' func runtimeHelper() {}', @@ -54,11 +54,11 @@ test('package apple runner source strips unit-test blocks without mutating check const sourceSwiftPath = path.join( root, - 'apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Feature.swift', + 'apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Feature.swift', ); const packagedSwiftPath = path.join( root, - 'dist/apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Feature.swift', + 'dist/apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/RunnerTests+Feature.swift', ); const sourceSwift = fs.readFileSync(sourceSwiftPath, 'utf8'); const packagedSwift = fs.readFileSync(packagedSwiftPath, 'utf8'); @@ -70,22 +70,52 @@ test('package apple runner source strips unit-test blocks without mutating check assert.match(packagedSwift, /#if os\(macOS\)/); assert.ok( fs.existsSync( - path.join(root, 'dist/apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj'), + path.join(root, 'dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj'), ), ); - assert.equal(fs.existsSync(path.join(root, 'dist/apple-runner/README.md')), false); - assert.equal(fs.existsSync(path.join(root, 'dist/apple-runner/.build/cache.txt')), false); + assert.equal(fs.existsSync(path.join(root, 'dist/apple/runner/README.md')), false); + assert.equal(fs.existsSync(path.join(root, 'dist/apple/runner/.build/cache.txt')), false); assert.equal( fs.existsSync( path.join( root, - 'dist/apple-runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcuserdata/user.xcuserstate', + 'dist/apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/xcuserdata/user.xcuserstate', ), ), false, ); }); +test('package apple runner source removes legacy dist/apple-runner output before shipping', async () => { + const root = fs.mkdtempSync(path.join(os.tmpdir(), 'agent-device-runner-package-legacy-')); + onTestFinished(() => fs.rmSync(root, { recursive: true, force: true })); + + // Minimal current-layout source so packaging succeeds. + writeFixtureFile( + root, + 'apple/runner/AgentDeviceRunner/AgentDeviceRunner.xcodeproj/project.pbxproj', + '', + ); + // Stale packaged trees left by builds/checkouts predating the apple-runner -> apple/runner + // move. `dist` ships wholesale, so these must not survive packaging or they double-ship. + writeFixtureFile( + root, + 'dist/apple-runner/AgentDeviceRunner/RunnerTests+Legacy.swift', + 'legacy\n', + ); + writeFixtureFile( + root, + 'dist/apple/apple-runner/AgentDeviceRunner/RunnerTests+Mid.swift', + 'mid\n', + ); + + await runCmd(process.execPath, [packageScript, '--root', root, '--quiet']); + + assert.equal(fs.existsSync(path.join(root, 'dist/apple-runner')), false); + assert.equal(fs.existsSync(path.join(root, 'dist/apple/apple-runner')), false); + assert.ok(fs.existsSync(path.join(root, 'dist/apple/runner/AgentDeviceRunner'))); +}); + test('apple runner tree snapshot capture stays on the main queue', () => { const source = fs.readFileSync(runnerSnapshotSwiftPath, 'utf8'); const boundedCapture = extractSwiftFunction(source, 'captureSnapshotRootBounded'); diff --git a/src/contracts/__tests__/runner-source-assertions.ts b/src/contracts/__tests__/runner-source-assertions.ts index 41de60690..d1fede88e 100644 --- a/src/contracts/__tests__/runner-source-assertions.ts +++ b/src/contracts/__tests__/runner-source-assertions.ts @@ -6,7 +6,8 @@ export const PROJECT_ROOT = path.resolve(import.meta.dirname, '..', '..', '..'); const RUNNER_SOURCES_DIR = path.join( PROJECT_ROOT, - 'apple-runner', + 'apple', + 'runner', 'AgentDeviceRunner', 'AgentDeviceRunnerUITests', ); diff --git a/src/daemon/client/daemon-client-timeout.ts b/src/daemon/client/daemon-client-timeout.ts index a76a0e9af..c2f4916b4 100644 --- a/src/daemon/client/daemon-client-timeout.ts +++ b/src/daemon/client/daemon-client-timeout.ts @@ -20,7 +20,7 @@ import { const IOS_RUNNER_XCODEBUILD_KILL_PATTERNS = [ 'xcodebuild .*AgentDeviceRunnerUITests/RunnerTests/testCommand', 'xcodebuild .*AgentDeviceRunner\\.env\\.session-', - 'xcodebuild build-for-testing .*apple-runner/AgentDeviceRunner/AgentDeviceRunner\\.xcodeproj', + 'xcodebuild build-for-testing .*apple/runner/AgentDeviceRunner/AgentDeviceRunner\\.xcodeproj', ]; type BoundedTimeoutPolicy = CommandTimeoutPolicy & { envelopeMs: number }; diff --git a/src/daemon/handlers/__tests__/session-doctor-android.test.ts b/src/daemon/handlers/__tests__/session-doctor-android.test.ts index dacf9c01f..84df9d5d7 100644 --- a/src/daemon/handlers/__tests__/session-doctor-android.test.ts +++ b/src/daemon/handlers/__tests__/session-doctor-android.test.ts @@ -6,7 +6,7 @@ const NORMAL_IME = 'com.google.android.inputmethod.latin/.LatinIME'; // probeAndroidTestIme reads the helper's service component from the bundled artifact; inject a // fixture so the orphan-detection checks pass on a fresh checkout that hasn't packaged -// android-ime-helper/dist (CI's Coverage job runs no packaging step). +// android/ime-helper/dist (CI's Coverage job runs no packaging step). vi.mock('../../../platforms/android/ime-helper.ts', async (importOriginal) => { const actual = await importOriginal(); return { diff --git a/src/platforms/android/__tests__/ime-helper-security.test.ts b/src/platforms/android/__tests__/ime-helper-security.test.ts index 9b3d33d0c..d5ee182e3 100644 --- a/src/platforms/android/__tests__/ime-helper-security.test.ts +++ b/src/platforms/android/__tests__/ime-helper-security.test.ts @@ -11,7 +11,7 @@ import { findProjectRoot } from '../../../utils/version.ts'; const SERVICE_SRC = path.join( findProjectRoot(), - 'android-ime-helper/src/main/java/com/callstack/agentdevice/imehelper/TestInputMethodService.java', + 'android/ime-helper/src/main/java/com/callstack/agentdevice/imehelper/TestInputMethodService.java', ); function readService(): string { diff --git a/src/platforms/android/__tests__/ime-lifecycle.test.ts b/src/platforms/android/__tests__/ime-lifecycle.test.ts index e79eb3e35..28d331d2b 100644 --- a/src/platforms/android/__tests__/ime-lifecycle.test.ts +++ b/src/platforms/android/__tests__/ime-lifecycle.test.ts @@ -9,7 +9,7 @@ const SETTINGS_KEY = 'agent_device_ime_helper_previous_ime'; const PENDING_DIR = 'android-test-ime-pending'; // activateAndroidTestIme reads the bundled artifact for the service component; inject a fixture so -// the suite passes on a fresh checkout that hasn't packaged android-ime-helper/dist (CI Coverage). +// the suite passes on a fresh checkout that hasn't packaged android/ime-helper/dist (CI Coverage). vi.mock('../ime-helper.ts', async (importOriginal) => { const actual = await importOriginal(); const fixture = await import('../../../__tests__/test-utils/android-snapshot-helper.ts'); diff --git a/src/platforms/android/__tests__/input-actions-test-ime.test.ts b/src/platforms/android/__tests__/input-actions-test-ime.test.ts index b9038d2a9..91f80d0ba 100644 --- a/src/platforms/android/__tests__/input-actions-test-ime.test.ts +++ b/src/platforms/android/__tests__/input-actions-test-ime.test.ts @@ -3,7 +3,7 @@ import assert from 'node:assert/strict'; const PACKAGE = 'com.callstack.agentdevice.imehelper'; -// Inject a fixture artifact so the tests never read android-ime-helper/dist from disk (which a +// Inject a fixture artifact so the tests never read android/ime-helper/dist from disk (which a // fresh checkout that hasn't packaged the helper won't have — CI's Coverage job included). vi.mock('../ime-helper.ts', async (importOriginal) => { const actual = await importOriginal(); diff --git a/src/platforms/android/helper-package-install.ts b/src/platforms/android/helper-package-install.ts index 86fac2375..beb4815db 100644 --- a/src/platforms/android/helper-package-install.ts +++ b/src/platforms/android/helper-package-install.ts @@ -141,7 +141,7 @@ export async function resolveAndroidHelperArtifact< unavailableMessage: string; }): Promise<{ apkPath: string; manifest: Manifest }> { const version = readVersion(); - const helperDir = path.join(findProjectRoot(), options.helperDirName, 'dist'); + const helperDir = path.join(findProjectRoot(), 'android', options.helperDirName, 'dist'); const manifestPath = path.join(helperDir, options.manifestFileName(version)); try { const manifest = options.parseManifest(JSON.parse(await fs.readFile(manifestPath, 'utf8'))); diff --git a/src/platforms/android/ime-helper.ts b/src/platforms/android/ime-helper.ts index b534fd4ef..3d94c5a69 100644 --- a/src/platforms/android/ime-helper.ts +++ b/src/platforms/android/ime-helper.ts @@ -49,7 +49,7 @@ export type AndroidImeHelperArtifact = { export async function resolveAndroidImeHelperArtifact(): Promise { return await resolveAndroidHelperArtifact({ - helperDirName: 'android-ime-helper', + helperDirName: 'ime-helper', manifestFileName: (version) => `agent-device-android-ime-helper-${version}.manifest.json`, parseManifest: parseAndroidImeHelperManifest, unavailableMessage: diff --git a/src/platforms/android/multitouch-helper-install.ts b/src/platforms/android/multitouch-helper-install.ts index 786778e98..d0079294b 100644 --- a/src/platforms/android/multitouch-helper-install.ts +++ b/src/platforms/android/multitouch-helper-install.ts @@ -36,7 +36,7 @@ export type AndroidMultiTouchHelperArtifact = { export async function resolveAndroidMultiTouchHelperArtifact(): Promise { return await resolveAndroidHelperArtifact({ - helperDirName: 'android-multitouch-helper', + helperDirName: 'multitouch-helper', manifestFileName: (version) => `agent-device-android-multitouch-helper-${version}.manifest.json`, parseManifest: parseAndroidMultiTouchHelperManifest, diff --git a/src/platforms/android/snapshot.ts b/src/platforms/android/snapshot.ts index c0d06872d..7719e7935 100644 --- a/src/platforms/android/snapshot.ts +++ b/src/platforms/android/snapshot.ts @@ -513,7 +513,7 @@ async function resolveAndroidSnapshotHelperArtifact( } const version = readVersion(); - const helperDir = path.join(findProjectRoot(), 'android-snapshot-helper', 'dist'); + const helperDir = path.join(findProjectRoot(), 'android', 'snapshot-helper', 'dist'); const manifestPath = path.join( helperDir, `agent-device-android-snapshot-helper-${version}.manifest.json`, diff --git a/src/platforms/apple/core/__tests__/index.test.ts b/src/platforms/apple/core/__tests__/index.test.ts index f4735ca6c..d2534386e 100644 --- a/src/platforms/apple/core/__tests__/index.test.ts +++ b/src/platforms/apple/core/__tests__/index.test.ts @@ -183,7 +183,7 @@ beforeEach(() => { test('resolveMacOsHelperPackageRootFrom finds helper package from source and dist-like paths', async () => { const repoRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'agent-device-helper-root-')); - const helperRoot = path.join(repoRoot, 'macos-helper'); + const helperRoot = path.join(repoRoot, 'apple', 'macos-helper'); await fs.mkdir(helperRoot, { recursive: true }); await fs.writeFile(path.join(helperRoot, 'Package.swift'), '// test\n', 'utf8'); diff --git a/src/platforms/apple/core/__tests__/runner-client.test.ts b/src/platforms/apple/core/__tests__/runner-client.test.ts index 5897c1c54..403906b1e 100644 --- a/src/platforms/apple/core/__tests__/runner-client.test.ts +++ b/src/platforms/apple/core/__tests__/runner-client.test.ts @@ -975,7 +975,7 @@ test('xctestrunReferencesProjectRoot rejects stale worktree artifacts', async () const xctestrunPath = path.join(tmpDir, 'AgentDeviceRunner.xctestrun'); fs.writeFileSync( xctestrunPath, - 'SourceFilesCommonPathPrefix/tmp/other-worktree/agent-device/apple-runner/AgentDeviceRunner', + 'SourceFilesCommonPathPrefix/tmp/other-worktree/agent-device/apple/runner/AgentDeviceRunner', 'utf8', ); @@ -1026,7 +1026,8 @@ test('resolveRunnerDerivedPath reuses cache path for identical runner source fin const firstRoot = path.join(tmpDir, 'first'); const secondRoot = path.join(tmpDir, 'second'); const runnerRelativePath = path.join( - 'apple-runner', + 'apple', + 'runner', 'AgentDeviceRunner', 'AgentDeviceRunnerUITests', 'RunnerTests.swift', @@ -1283,7 +1284,8 @@ test('ensureXctestrunArtifact rebuilds after cached macOS runner repair failure' const { derivedPath, existingXctestrunPath } = await makeCachedRunnerXctestrun(); const projectPath = path.join( projectRoot, - 'apple-runner', + 'apple', + 'runner', 'AgentDeviceRunner', 'AgentDeviceRunner.xcodeproj', ); diff --git a/src/platforms/apple/core/__tests__/runner-source.test.ts b/src/platforms/apple/core/__tests__/runner-source.test.ts index 5aac0244e..0151d4449 100644 --- a/src/platforms/apple/core/__tests__/runner-source.test.ts +++ b/src/platforms/apple/core/__tests__/runner-source.test.ts @@ -10,8 +10,8 @@ import { test('resolveAppleRunnerSourceRoot prefers checkout source over packaged source', () => { const root = makeTempRoot(); - const checkoutSource = path.join(root, 'apple-runner', 'AgentDeviceRunner'); - const packagedSource = path.join(root, 'dist', 'apple-runner', 'AgentDeviceRunner'); + const checkoutSource = path.join(root, 'apple', 'runner', 'AgentDeviceRunner'); + const packagedSource = path.join(root, 'dist', 'apple', 'runner', 'AgentDeviceRunner'); fs.mkdirSync(path.join(checkoutSource, 'AgentDeviceRunner.xcodeproj'), { recursive: true }); fs.mkdirSync(path.join(packagedSource, 'AgentDeviceRunner.xcodeproj'), { recursive: true }); @@ -24,7 +24,7 @@ test('resolveAppleRunnerSourceRoot prefers checkout source over packaged source' test('resolveAppleRunnerSourceRoot falls back to packaged source', () => { const root = makeTempRoot(); - const packagedSource = path.join(root, 'dist', 'apple-runner', 'AgentDeviceRunner'); + const packagedSource = path.join(root, 'dist', 'apple', 'runner', 'AgentDeviceRunner'); fs.mkdirSync(path.join(packagedSource, 'AgentDeviceRunner.xcodeproj'), { recursive: true }); assert.equal(resolveAppleRunnerSourceRoot(root), packagedSource); diff --git a/src/platforms/apple/core/__tests__/runner-xctestrun.test.ts b/src/platforms/apple/core/__tests__/runner-xctestrun.test.ts index b94c60e2a..5b907bb95 100644 --- a/src/platforms/apple/core/__tests__/runner-xctestrun.test.ts +++ b/src/platforms/apple/core/__tests__/runner-xctestrun.test.ts @@ -215,12 +215,12 @@ test('setup metadata script matches expected iOS simulator cache metadata', asyn const binDir = path.join(root, 'bin'); fs.mkdirSync(binDir, { recursive: true }); fs.mkdirSync(derivedRoot, { recursive: true }); - fs.mkdirSync(path.join(projectRoot, 'apple-runner', 'AgentDeviceRunner'), { + fs.mkdirSync(path.join(projectRoot, 'apple', 'runner', 'AgentDeviceRunner'), { recursive: true, }); fs.writeFileSync(path.join(projectRoot, 'package.json'), '{"version":"0.19.0"}\n'); fs.writeFileSync( - path.join(projectRoot, 'apple-runner', 'AgentDeviceRunner', 'Runner.swift'), + path.join(projectRoot, 'apple', 'runner', 'AgentDeviceRunner', 'Runner.swift'), 'final class Runner {}\n', ); writeExecutable( diff --git a/src/platforms/apple/core/runner/runner-source.ts b/src/platforms/apple/core/runner/runner-source.ts index ff8db8e96..567f32390 100644 --- a/src/platforms/apple/core/runner/runner-source.ts +++ b/src/platforms/apple/core/runner/runner-source.ts @@ -1,8 +1,8 @@ import fs from 'node:fs'; import path from 'node:path'; -const APPLE_RUNNER_SOURCE_ROOT = path.join('apple-runner', 'AgentDeviceRunner'); -const PACKAGED_APPLE_RUNNER_SOURCE_ROOT = path.join('dist', 'apple-runner', 'AgentDeviceRunner'); +const APPLE_RUNNER_SOURCE_ROOT = path.join('apple', 'runner', 'AgentDeviceRunner'); +const PACKAGED_APPLE_RUNNER_SOURCE_ROOT = path.join('dist', 'apple', 'runner', 'AgentDeviceRunner'); export function resolveAppleRunnerSourceRoot(projectRoot: string): string { const checkoutSourceRoot = path.join(projectRoot, APPLE_RUNNER_SOURCE_ROOT); diff --git a/src/platforms/apple/os/macos/helper.ts b/src/platforms/apple/os/macos/helper.ts index 42b445143..e98ee0e1b 100644 --- a/src/platforms/apple/os/macos/helper.ts +++ b/src/platforms/apple/os/macos/helper.ts @@ -19,7 +19,7 @@ import { export type MacOsPermissionTarget = 'accessibility' | 'screen-recording' | 'input-monitoring'; // Keep this shape aligned with macOS helper SnapshotNodeResponse in -// macos-helper/Sources/AgentDeviceMacOSHelper/SnapshotTraversal.swift. +// apple/macos-helper/Sources/AgentDeviceMacOSHelper/SnapshotTraversal.swift. export type MacOsSnapshotNode = { index: number; type?: string; @@ -99,7 +99,7 @@ function appendMacOsHelperContextArgs( export function resolveMacOsHelperPackageRootFrom(modulePath: string): string { let currentDir = path.dirname(modulePath); while (true) { - const candidate = path.join(currentDir, 'macos-helper'); + const candidate = path.join(currentDir, 'apple', 'macos-helper'); if (existsSync(path.join(candidate, 'Package.swift'))) { return candidate; } diff --git a/src/platforms/linux/atspi-bridge.ts b/src/platforms/linux/atspi-bridge.ts index 500d9ef7d..e0b45ea92 100644 --- a/src/platforms/linux/atspi-bridge.ts +++ b/src/platforms/linux/atspi-bridge.ts @@ -30,29 +30,21 @@ const SCRIPT_NAME = 'atspi-dump.py'; let cachedScriptPath: string | null = null; -/** Resolve atspi-dump.py relative to this module, checking both source and dist layouts. */ +/** Resolve atspi-dump.py, which lives under `linux/` at the repo/package root. */ function resolveScriptPath(): string { if (cachedScriptPath) return cachedScriptPath; const thisDir = path.dirname(fileURLToPath(import.meta.url)); - // Walk upward looking for the script — handles both: - // src/platforms/linux/ (source) - // dist/src/ (bundled, .py lives in package root under src/platforms/linux/) + // Walk upward looking for linux/atspi-dump.py — handles both: + // /linux/ (source; this module lives at src/platforms/linux/) + // /linux/ (bundled; this module lives under dist/src/) let dir = thisDir; - for (let i = 0; i < 5; i++) { - const candidate = path.join(dir, 'src', 'platforms', 'linux', SCRIPT_NAME); + for (let i = 0; i < 6; i++) { + const candidate = path.join(dir, 'linux', SCRIPT_NAME); if (fs.existsSync(candidate)) { cachedScriptPath = candidate; return candidate; } - // Also check same-directory (running from source dir directly) - if (i === 0) { - const sameDir = path.join(dir, SCRIPT_NAME); - if (fs.existsSync(sameDir)) { - cachedScriptPath = sameDir; - return sameDir; - } - } dir = path.dirname(dir); } diff --git a/src/recording/__tests__/overlay.test.ts b/src/recording/__tests__/overlay.test.ts index e24ca6707..348c9a634 100644 --- a/src/recording/__tests__/overlay.test.ts +++ b/src/recording/__tests__/overlay.test.ts @@ -160,7 +160,7 @@ test('recording script candidates include packaged dist apple-runner source', () const packageRoot = path.join(tmpDir, 'package'); const scriptPath = path.join( packageRoot, - 'dist/apple-runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift', + 'dist/apple/runner/AgentDeviceRunner/RecordingScripts/recording-overlay.swift', ); fs.mkdirSync(path.dirname(scriptPath), { recursive: true }); fs.writeFileSync(scriptPath, 'print("overlay")\n'); diff --git a/src/recording/__tests__/recording-scripts.test.ts b/src/recording/__tests__/recording-scripts.test.ts index 22dfb31e8..06495e100 100644 --- a/src/recording/__tests__/recording-scripts.test.ts +++ b/src/recording/__tests__/recording-scripts.test.ts @@ -8,7 +8,7 @@ import { getRecordingOverlaySupportWarning } from '../overlay.ts'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); const recordingScriptsDir = path.resolve( __dirname, - '../../../apple-runner/AgentDeviceRunner/RecordingScripts', + '../../../apple/runner/AgentDeviceRunner/RecordingScripts', ); const recordingTestSupportDir = path.resolve(__dirname, '../../../test/integration/support'); const SWIFT_TYPECHECK_TIMEOUT_MS = 60_000; diff --git a/src/recording/overlay.ts b/src/recording/overlay.ts index 581d1ece7..5b37aad96 100644 --- a/src/recording/overlay.ts +++ b/src/recording/overlay.ts @@ -17,7 +17,7 @@ export function buildRecordingScriptPathCandidates( projectRoot: string, cwd: string, ): string[] { - const sourceScriptPath = `apple-runner/AgentDeviceRunner/RecordingScripts/${scriptName}`; + const sourceScriptPath = `apple/runner/AgentDeviceRunner/RecordingScripts/${scriptName}`; const packagedScriptPath = `dist/${sourceScriptPath}`; return [ path.resolve(moduleDir, scriptName), @@ -46,7 +46,7 @@ function resolveRecordingScriptPath(scriptName: string): string { } throw new AppError('COMMAND_FAILED', `Missing recording helper script: ${scriptName}`, { - hint: 'Ensure apple-runner/AgentDeviceRunner/RecordingScripts is present in this checkout or bundled under dist/apple-runner in the package.', + hint: 'Ensure apple/runner/AgentDeviceRunner/RecordingScripts is present in this checkout or bundled under dist/apple/runner in the package.', scriptName, searchedPaths: scriptCandidates, }); diff --git a/src/snapshot/__tests__/tap-point-policy-parity.test.ts b/src/snapshot/__tests__/tap-point-policy-parity.test.ts index 222880574..e10a03a05 100644 --- a/src/snapshot/__tests__/tap-point-policy-parity.test.ts +++ b/src/snapshot/__tests__/tap-point-policy-parity.test.ts @@ -6,7 +6,7 @@ import { isTapPointInsideViewport } from '../mobile-snapshot-semantics.ts'; import type { Rect } from '../../kernel/snapshot.ts'; // ADR 0011 Layer 2 golden parity table: the SAME JSON is asserted against the -// Swift twin (TapPointPolicy in apple-runner/AgentDeviceRunner/ +// Swift twin (TapPointPolicy in apple/runner/AgentDeviceRunner/ // AgentDeviceRunnerUITests/RunnerTapPointPolicy.swift, gated XCTest in the // same file), so drift between the runner's ELEMENT_OFFSCREEN guard and the // runtime's offscreen rule turns CI red on whichever side changed. diff --git a/src/snapshot/mobile-snapshot-semantics.ts b/src/snapshot/mobile-snapshot-semantics.ts index 3b6233eb2..47667c167 100644 --- a/src/snapshot/mobile-snapshot-semantics.ts +++ b/src/snapshot/mobile-snapshot-semantics.ts @@ -126,7 +126,7 @@ export function isNodeVisibleOnScreen( // fails open (allowed) — resolving the best available viewport is the // caller's job, and the rule must not turn a missing frame into a refusal. // -// Swift twin: apple-runner/AgentDeviceRunner/AgentDeviceRunnerUITests/ +// Swift twin: apple/runner/AgentDeviceRunner/AgentDeviceRunnerUITests/ // RunnerTapPointPolicy.swift (TapPointPolicy.isAllowed). Parity is enforced // by the golden fixture table contracts/fixtures/tap-point-policy.json, // asserted on both sides (tap-point-policy-parity.test.ts / the gated XCTest diff --git a/test/scripts/android-snapshot-helper-release-smoke.sh b/test/scripts/android-snapshot-helper-release-smoke.sh index b94544b76..365cc5c8d 100755 --- a/test/scripts/android-snapshot-helper-release-smoke.sh +++ b/test/scripts/android-snapshot-helper-release-smoke.sh @@ -40,7 +40,7 @@ DEX_DIR="$WORK_DIR/dex" UNSIGNED_APK="$WORK_DIR/app-unsigned.apk" ALIGNED_APK="$WORK_DIR/app-aligned.apk" APK_PATH="$WORK_DIR/app-release.apk" -KEYSTORE="$PROJECT_DIR/android-snapshot-helper/debug.keystore" +KEYSTORE="$PROJECT_DIR/android/snapshot-helper/debug.keystore" # This APK is throwaway test code signed with the helper debug keystore only for CI smoke coverage. mkdir -p "$SRC_DIR" "$CLASSES_DIR" "$DEX_DIR"