Skip to content

Commit e656ff1

Browse files
committed
Merge remote-tracking branch 'origin/main' into feat/maestro-setPermissions
# Conflicts: # packages/maestro/src/internal/__tests__/program-ir-parser.test.ts # packages/maestro/src/internal/__tests__/runtime-port-fixtures.ts # packages/maestro/src/internal/conformance-normalize.ts # packages/maestro/src/internal/program-ir-command-parser.ts # packages/maestro/src/internal/program-ir.ts # packages/maestro/src/internal/runtime-port-commands.ts # packages/maestro/src/internal/runtime-port-types.ts # packages/maestro/test/conformance/expected-divergence.ts # scripts/fuzz/validation-arbitraries-maestro.ts # src/daemon/adapters/maestro/__tests__/daemon-runtime-public-operation.test.ts # src/daemon/adapters/maestro/daemon-runtime-port.ts # src/daemon/adapters/maestro/daemon-runtime-public-operation.ts
2 parents 752b88d + 23fd3c9 commit e656ff1

1,337 files changed

Lines changed: 52602 additions & 14572 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fallowrc.json

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"src/daemon.ts",
2020
"packages/capture-kit/src/png-worker.ts",
2121
"scripts/patch-xcuitest-runner-icon.ts",
22-
"scripts/runner-request-count/run.ts",
2322
"packages/capture-kit/src/ios-snapshot-engine/replay.ts",
2423
// #1596 regression fixture: runs as a real `node --experimental-strip-types`
2524
// subprocess (test/integration/daemon-replace-exit-flush.test.ts), so
@@ -31,7 +30,6 @@
3130
"examples/sdk/contracts-result.ts",
3231
"examples/sdk/batch-orchestration.ts",
3332
"examples/sdk/ai-sdk-tools.ts",
34-
"test/scripts/metro-prepare-packaged-smoke.mjs",
3533
"test/integration/*.test.ts",
3634
"website/docs/404.mdx",
3735
"website/rspress.config.ts"
@@ -91,6 +89,16 @@
9189
"file": "packages/platform-apple/src/app-resolution-facade.ts",
9290
"exports": ["buildAppNotInstalledError"]
9391
},
92+
{
93+
"comment": "Runner operations reach the daemon only through the memoized loader in src/platform-runtime-apple-application-tools.ts (one dynamic import per specifier, #2314). Fallow cannot connect a member read off that loader's promise to these re-exports; keep the list to the facade members no static import consumes.",
94+
"file": "packages/platform-apple/src/runner-operations-facade.ts",
95+
"exports": [
96+
"detachIosSimulatorRunnerSessionsForShutdown",
97+
"hasLiveIosRunnerSession",
98+
"releaseSpeculativeIosRunnerSessionFor",
99+
"stopAllIosRunnerSessions"
100+
]
101+
},
94102
{
95103
"comment": "Apple install mechanics are reached through the named install-artifact façade. Fallow cannot connect workspace package exports to these source exports; keep this list limited to the actual facade re-exports.",
96104
"file": "packages/platform-apple/src/core/install-artifact.ts",
@@ -496,6 +504,11 @@
496504
"summarizeAgentBrowserProcesses",
497505
"summarizeManagedAgentBrowserProcesses"
498506
]
507+
},
508+
{
509+
"comment": "src/runtime.ts keeps its published type surface while its implementation moves to src/runtime-factory.ts (#2540). These two re-exports have no in-repo consumer; they stay so the module's exported shape is unchanged.",
510+
"file": "src/runtime.ts",
511+
"exports": ["CommandPolicy", "CommandSessionRecord"]
499512
}
500513
],
501514
"usedClassMembers": [

.github/actions/setup-android-replay-host/action.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,17 @@ runs:
3939
echo "value=${{ hashFiles('android/snapshot-helper/AndroidManifest.xml', 'android/snapshot-helper/debug.keystore', 'android/snapshot-helper/src/**', 'android/ime-helper/AndroidManifest.xml', 'android/ime-helper/res/**', 'android/ime-helper/src/**', 'scripts/build-android-helper.sh', 'scripts/package-android-helper.sh', '.github/actions/setup-android-replay-host/action.yml') }}" >> "$GITHUB_OUTPUT"
4040
shell: bash
4141

42+
# The helper build refuses to guess its build-tools version on CI, and that version decides
43+
# the APK bytes, so both cache keys name it as well.
44+
- name: Declare the pinned Android build tools
45+
if: inputs.package-helpers == 'true'
46+
id: android-build-tools
47+
run: |
48+
BUILD_TOOLS_VERSION=36.0.0
49+
echo "AGENT_DEVICE_ANDROID_BUILD_TOOLS=$BUILD_TOOLS_VERSION" >> "$GITHUB_ENV"
50+
echo "version=$BUILD_TOOLS_VERSION" >> "$GITHUB_OUTPUT"
51+
shell: bash
52+
4253
- name: Restore packaged Android helpers
4354
if: inputs.package-helpers == 'true'
4455
id: android-helpers-cache
@@ -47,7 +58,7 @@ runs:
4758
path: |
4859
android/snapshot-helper/dist
4960
android/ime-helper/dist
50-
key: android-helpers-${{ runner.os }}-${{ runner.arch }}-api36-v${{ steps.android-helper-source.outputs.version }}-${{ steps.android-helper-source.outputs.value }}
61+
key: android-helpers-${{ runner.os }}-${{ runner.arch }}-api36-bt${{ steps.android-build-tools.outputs.version }}-v${{ steps.android-helper-source.outputs.version }}-${{ steps.android-helper-source.outputs.value }}
5162

5263
- name: Install Android helper SDK packages
5364
if: inputs.package-helpers == 'true' && steps.android-helpers-cache.outputs.cache-hit != 'true'
@@ -62,7 +73,7 @@ runs:
6273
exit 1
6374
fi
6475
yes | "$SDKMANAGER" --licenses >/dev/null || true
65-
"$SDKMANAGER" "platforms;android-36" "build-tools;36.0.0"
76+
"$SDKMANAGER" "platforms;android-36" "build-tools;$AGENT_DEVICE_ANDROID_BUILD_TOOLS"
6677
shell: bash
6778

6879
- name: Package npm-bundled Android helpers
@@ -86,4 +97,4 @@ runs:
8697
path: |
8798
android/snapshot-helper/dist
8899
android/ime-helper/dist
89-
key: android-helpers-${{ runner.os }}-${{ runner.arch }}-api36-v${{ steps.android-helper-source.outputs.version }}-${{ steps.android-helper-source.outputs.value }}
100+
key: android-helpers-${{ runner.os }}-${{ runner.arch }}-api36-bt${{ steps.android-build-tools.outputs.version }}-v${{ steps.android-helper-source.outputs.version }}-${{ steps.android-helper-source.outputs.value }}

.github/workflows/ios.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ on:
2929
- 'packages/*/src/**/*.test.ts'
3030
- 'packages/*/src/**/__tests__/**/*.ts'
3131
- 'packages/platform-android/src/**'
32-
- 'src/snapshot/snapshot-presentation/android/**'
32+
- 'packages/capture-kit/src/snapshot/snapshot-presentation/android/**'
3333
- 'packages/platform-harmonyos/src/**'
3434
- 'packages/platform-linux/src/**'
3535
- 'packages/platform-vega/src/**'
@@ -147,12 +147,15 @@ jobs:
147147
148148
- name: Run targeted iOS runner XCTest regressions
149149
run: |
150+
set -o pipefail
150151
XCTESTRUN_PATH="$(find "$AGENT_DEVICE_IOS_RUNNER_DERIVED_PATH/Build/Products" -maxdepth 1 -name '*.xctestrun' -print -quit)"
151152
test -n "$XCTESTRUN_PATH"
152153
xcodebuild test-without-building \
153154
-xctestrun "$XCTESTRUN_PATH" \
154155
-destination "platform=iOS Simulator,id=${{ steps.ios-simulator.outputs.simulator-udid }}" \
155156
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testSinglePointerFlingFallsBackToXCTestCoordinateDragWhenPrivateSynthesisFails \
157+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testAlertDispatchResolvesItsOwnModalWithoutCoordinateTapRoutingProbe \
158+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testAlertResolutionCannotBypassRequestedDeadline \
156159
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testTypeWithoutResolvedInputReturnsTypedFailureBeforeDispatchingText \
157160
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testBareTypeUsesTappedInputWhenSoftwareKeyboardIsHidden \
158161
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testHardwareKeyboardResponderConfirmsItsOwnKeyboardFocus \
@@ -162,6 +165,16 @@ jobs:
162165
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testEmptyReplacementWithoutResolvableTargetFailsClosed \
163166
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testTextEntryTapWitnessIsBoundToTargetIdentity \
164167
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testCoordinateTapTextInputProbeSkipsPenalizedXCTestChannel \
168+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testScrollViewportKeyboardClipMatchesGoldenParityTable \
169+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testScrollViewportPolicyUsesParityTableConstants \
170+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testScrollViewportDispatchKeepsTheUnclippedFrameAsItsCoordinateRotationBasis \
171+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testSynthesizedGesturePoliciesMatchCommandContracts \
172+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testFreshCoordinateTapContainsUnavailableTextInputProbe \
173+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testTextInputProbeIssueScopeIsThreadBound \
174+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testTextInputProbePreservesEnclosingRunnerWait \
175+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testSuppressedAxIssueMakesTextInputProbeUnavailable \
176+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testHealthyCoordinateTapPreservesBareTypingWitness \
177+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testTextInputProbeContainmentExcludesRequiredReadsAndLaterIssues \
165178
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testCoordinateTextInputCandidateMustBeEnabledAndContainTheTouchPoint \
166179
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testQuerySelectorPrefersHittableMatchOverNonHittableDuplicate \
167180
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testActivateTargetSkipsForegroundAndActivatesNonForegroundApplication \
@@ -173,6 +186,7 @@ jobs:
173186
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testAlertDismissDoesNotActivateAReplacementWithTheSameTitle \
174187
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testAlertCannotProveAnIdenticalReplacementAndDoesNotActivateIt \
175188
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testAlertDeadlineBeforeActivationLeavesTheOriginalUntouched \
189+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testAlertHittableProbeCompletingAfterDeadlineLeavesTheOriginalUntouched \
176190
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testSystemModalProbeSliceSharesAndClampsToPlanDeadline \
177191
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testDispatchRecoverySkipsBookkeepingWhileXCTestChannelOccupied \
178192
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testBoundedSystemModalProbeTimeoutRecoversThenReleasesOnDrain \
@@ -232,7 +246,15 @@ jobs:
232246
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testCustomActionCoverageParsesOnlyCompletePairs \
233247
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testPartialCustomActionPassIsDisclosedAndCompleteOneIsNot \
234248
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testActionNamesAreCappedPerElementAndReported \
235-
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testHungCustomActionReadIsContainedAndRecovers
249+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testHungCustomActionReadIsContainedAndRecovers \
250+
-only-testing:AgentDeviceRunnerUITests/RunnerTests/testPrivateAXPinnedRegularDepthReachesAcquisitionAndPresentation 2>&1 | tee /tmp/agent-device-runner-regressions.log
251+
node --input-type=module -e '
252+
import { readFileSync } from "node:fs";
253+
const log = readFileSync("/tmp/agent-device-runner-regressions.log", "utf8");
254+
if (!/\] AGENT_DEVICE_RUNNER_OPTIONAL_PROBE_WAIT_COMPLETED$/m.test(log)) {
255+
throw new Error("Optional observation ended the runner test before its wait completed");
256+
}
257+
'
236258
237259
- name: Preflight iOS runner through public CLI
238260
run: |

.github/workflows/macos.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ jobs:
7070
uses: ./.github/actions/run-gate
7171
with: { gate: macos-coverage }
7272

73+
# The npm package ships apple/runner/** as rewritten Swift source, and nothing in the repo
74+
# compiles the result — the first consumer is a user's xcodebuild. This lane is the only one
75+
# with a Swift toolchain, so it is where `swiftc -parse` over the packaged files runs; the
76+
# line-parity half of the same gate needs no toolchain. Seconds, no simulator (#2461).
77+
- name: Check the packaged runner Swift parses and keeps its line numbering
78+
uses: ./.github/actions/run-gate
79+
with: { gate: packaged-runner-swift }
80+
7381
- name: Run iOS snapshot Swift/TypeScript differential
7482
uses: ./.github/actions/run-gate
7583
with: { gate: ios-snapshot-differential }

.github/workflows/release-android-snapshot-helper.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ jobs:
2323
name: Publish Android Snapshot Helper
2424
runs-on: ubuntu-latest
2525
timeout-minutes: 30
26+
env:
27+
# The helper build refuses to guess its build-tools version on CI.
28+
AGENT_DEVICE_ANDROID_BUILD_TOOLS: 36.0.0
2629
steps:
2730
- name: Checkout
2831
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -46,7 +49,7 @@ jobs:
4649
exit 1
4750
fi
4851
yes | "$SDKMANAGER" --licenses >/dev/null
49-
"$SDKMANAGER" "platforms;android-36" "build-tools;36.0.0"
52+
"$SDKMANAGER" "platforms;android-36" "build-tools;$AGENT_DEVICE_ANDROID_BUILD_TOOLS"
5053
5154
- name: Check Java toolchain
5255
run: |

.github/workflows/size.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
if: github.event.pull_request.head.repo.full_name == github.repository
3232
runs-on: ubuntu-latest
3333
timeout-minutes: 10
34+
env:
35+
# The helper build refuses to guess its build-tools version on CI.
36+
AGENT_DEVICE_ANDROID_BUILD_TOOLS: 36.0.0
3437
steps:
3538
- name: Checkout
3639
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
@@ -58,7 +61,7 @@ jobs:
5861
exit 1
5962
fi
6063
yes | "$SDKMANAGER" --licenses >/dev/null || true
61-
"$SDKMANAGER" "platforms;android-36" "build-tools;36.0.0"
64+
"$SDKMANAGER" "platforms;android-36" "build-tools;$AGENT_DEVICE_ANDROID_BUILD_TOOLS"
6265
6366
# dist is fully determined by the base commit, so reuse it across PR runs
6467
# against the same base. Startup medians are still measured fresh on this
@@ -73,6 +76,7 @@ jobs:
7376
- name: Measure base size
7477
run: |
7578
git checkout --detach "${{ github.event.pull_request.base.sha }}"
79+
cp scripts/size-report-package.mjs /tmp/agent-device-size-report/
7680
pnpm install --frozen-lockfile
7781
if [ "${{ steps.base-dist-cache.outputs.cache-hit }}" != "true" ]; then
7882
pnpm build

.prettierignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

.worktreeinclude

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ examples/test-app/.expo/
1010
DerivedData/
1111
android/snapshot-helper/build/
1212
android/snapshot-helper/dist/
13-
android/multitouch-helper/build/
14-
android/multitouch-helper/dist/
1513

1614
# Tool caches
1715
.fallow/

AGENTS.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@ Read the declaration rather than maintaining a prose copy:
5656
`src/commands/common-input-fields.ts` and `src/commands/input-audience.ts`
5757

5858
Shared selector parsing and matching belongs in `@agent-device/selectors`; request cancellation
59-
and progress in `@agent-device/capture-kit` (`request-cancel`, `request-progress`); cross-layer
60-
contracts in `@agent-device/contracts`; CLI flags in `src/commands/cli-grammar`; cross-surface schema
61-
composition in `src/cli-schema`.
59+
and progress in `@agent-device/host-kit/request`; cross-layer contracts in `packages/contracts/src`;
60+
CLI flags in `src/commands/cli-grammar`; cross-surface schema composition in `src/cli-schema`.
6261

6362
Resolve registry completeness failures at the missing declaration. Diagnose other gate failures
6463
at their reported invariant; do not suppress them or add an allowlist to get a pass. Build interaction
@@ -82,13 +81,11 @@ under `contracts/fixtures/`.
8281

8382
- Name modules for the domain question they answer and colocate machine-readable claims with their
8483
enforcement. Internal barrels are legacy; add barrels only at package boundaries.
85-
- Implementation files target at most 300 lines. Extract before adding behavior past 500 lines;
86-
files past 1,000 lines are architecture debt unless generated or fixture data.
84+
- Files past 1,000 lines are architecture debt; split them before adding behavior, unless they
85+
are generated or fixture data.
8786
- Tests mirror source topology one-to-one. Split a source module and its test together; do not add to
8887
the legacy `interaction.test.ts` or platform `index.test.ts` aggregations. Pure moves carry their
8988
tests unchanged; rename-only hunks owe no new coverage.
90-
- `src/daemon/handlers/session.ts` is already over budget; extract the relevant platform-specific
91-
concept before adding behavior.
9289

9390
## Toolchain and worktree traps
9491

@@ -104,8 +101,8 @@ under `contracts/fixtures/`.
104101

105102
## Runtime and diagnostics seams
106103

107-
Diagnostics use `@agent-device/capture-kit/diagnostics`. Request diagnostics belong in the session request log;
108-
session artifact paths come from `src/daemon/session-store.ts`. App/device logs remain in `app.log`;
104+
Diagnostics use `@agent-device/host-kit/diagnostics`. Request diagnostics belong in the session request log;
105+
session artifact paths come from `src/daemon/session-artifact-paths.ts`. App/device logs remain in `app.log`;
109106
Apple runner and xcodebuild output remains in `runner.log`.
110107

111108
Normalize failures with `normalizeError` and preserve `hint`, `diagnosticId`, `logPath`, and typed

0 commit comments

Comments
 (0)