Skip to content

Commit fc40090

Browse files
committed
Merge origin/main into claude/2336-command-registry-package
Takes #2347's move of the daemon code-signature walker into `@agent-device/host-kit` together with its workspace-specifier resolution, and drops this branch's own copy of that fix: one resolver, the one on main. The claim this branch owed keeps its own test beside the walker — the daemon source graph stamps `packages/command-registry/src/registry.ts`, `catalog.ts` and the manifest, measured at 1,461 modules, and touching the registry changes the signature. `src/cli/commands/router-types.ts`: #2349's `CommandProgressState` import alongside this branch's catalog specifier. A fixture string in the relocated CLI-route test also goes back to the specifier it illustrates; the move rewrote it as if it were a real import. Three review points, recorded here because their commits are pushed: - Dropping `registry.ts` and `platform-execution-entry.ts` from `HUB_ENTRY_FILES` is not only bookkeeping: the package manifest now publishes them, so the gate discovers them as domain facades and `denyPlatformImplementations` flips false to true. Both now carry the ADR-0019 assertion that they evaluate no concrete platform implementation, and both pass it. That strengthening is intended. - The 150 this branch reports against the issue's 154 is a filter difference, not a discrepancy: `pnpm depgraph` collapses to one edge per file pair, and 150 counts value edges only. Counting type-only and dynamic edges on the same graph gives 174 into 67 root files, which is the shape the issue's own per-file breakdown uses; both readings drop by exactly the 36 the issue predicts. - The six tests that stay in root do so for one root symbol each: parity needs STRUCTURED_BATCH_COMMAND_NAMES, DAEMON_COMMAND_DESCRIPTORS, canRunReplayScopedAction and DaemonRequest; ref-frame-effect needs DAEMON_COMMAND_DESCRIPTORS, resolveRefFrameEffect and DaemonRequest; timeout-policy needs DEFAULT_STABLE_TIMEOUT_MS; platform-execution-cli-route needs CLI_INJECTED_DAEMON_DISPATCHES and CliInjectedRoute; post-action-observation needs AgentDeviceClient, getCliCommandSchema, readInputFromCli, findCommandMetadata, the two command-family registry listers, SettleCapableClientOptionCommands, buildActionDetails and COMMAND_OUTPUT_SCHEMAS; shutdown-runtime-execution imports nothing but reads the daemon and root host sources whose text it pins. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016DkNZCMWtm1KUbseKANADi
2 parents 009887e + b4ebd77 commit fc40090

68 files changed

Lines changed: 1238 additions & 660 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.

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## Unreleased
44

5+
- Fixed: the iOS Simulator AX snapshot route bounds how long a capture waits for app discovery
6+
and stops starting a discovery per capture. Discovery (`simctl launchctl list` through xcrun)
7+
takes seconds on a loaded host; a capture now waits at most 1.5s for the one in-flight
8+
discovery, takes the XCTest fallback, and the discovery keeps running under its own 15s
9+
deadline for the captures that follow. Previously each capture ran its own probe with a 3s
10+
timeout on its critical path, so a `wait` issued right after `open` could spend its budget on
11+
probe timeouts and report `wait_capture_stalled` with the app already on screen.
512
- Fixed: iOS snapshots no longer report `truncated: true` merely because a later backend produced
613
them. The runner stamped every recovered capture as truncated — including a complete private-AX
714
tree taken while the XCTest channel was penalized as slow — so a strict `is absent` / `wait absent`

packages/capture-kit/package.json

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
"types": "./src/ios-snapshot-acquisition.ts",
2727
"default": "./src/ios-snapshot-acquisition.ts"
2828
},
29-
"./ios-snapshot-planning": {
30-
"types": "./src/ios-snapshot-planning.ts",
31-
"default": "./src/ios-snapshot-planning.ts"
32-
},
3329
"./ios-snapshot-engine": {
3430
"types": "./src/ios-snapshot-engine/index.ts",
3531
"default": "./src/ios-snapshot-engine/index.ts"
3632
},
33+
"./ios-snapshot-planning": {
34+
"types": "./src/ios-snapshot-planning.ts",
35+
"default": "./src/ios-snapshot-planning.ts"
36+
},
3737
"./mobile-snapshot-semantics": {
3838
"types": "./src/mobile-snapshot-semantics.ts",
3939
"default": "./src/mobile-snapshot-semantics.ts"
@@ -62,6 +62,14 @@
6262
"types": "./src/png-worker-client.ts",
6363
"default": "./src/png-worker-client.ts"
6464
},
65+
"./post-gesture-stability": {
66+
"types": "./src/post-gesture-stability.ts",
67+
"default": "./src/post-gesture-stability.ts"
68+
},
69+
"./react-native-overlay": {
70+
"types": "./src/react-native-overlay.ts",
71+
"default": "./src/react-native-overlay.ts"
72+
},
6573
"./screenshot-density": {
6674
"types": "./src/screenshot-density.ts",
6775
"default": "./src/screenshot-density.ts"
@@ -70,6 +78,10 @@
7078
"types": "./src/screenshot-diff-pixels.ts",
7179
"default": "./src/screenshot-diff-pixels.ts"
7280
},
81+
"./screenshot-overlay": {
82+
"types": "./src/screenshot-overlay.ts",
83+
"default": "./src/screenshot-overlay.ts"
84+
},
7385
"./snapshot-desktop-projection": {
7486
"types": "./src/snapshot-desktop-projection.ts",
7587
"default": "./src/snapshot-desktop-projection.ts"
File renamed without changes.
File renamed without changes.

src/snapshot/__tests__/screenshot-overlay-android.test.ts renamed to packages/capture-kit/src/screenshot-overlay-android.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import assert from 'node:assert/strict';
22
import { test } from 'vitest';
33
import type { SnapshotNode } from '@agent-device/kernel/snapshot';
4-
import { makeSnapshotState } from '../../__tests__/test-utils/snapshot-builders.ts';
4+
import { makeSnapshotState } from './snapshot-state.fixtures.ts';
55
import {
66
isAndroidUnlabeledClickableSource,
77
resolveAndroidOverlaySourceRect,
8-
} from '../screenshot-overlay/android.ts';
8+
} from './screenshot-overlay-android.ts';
99

1010
const SCREEN = { x: 0, y: 0, width: 1080, height: 1920 };
1111

src/snapshot/screenshot-overlay/android.ts renamed to packages/capture-kit/src/screenshot-overlay-android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Rect, SnapshotNode, SnapshotState } from '@agent-device/kernel/snapshot';
22
import { isViewportRootNode, normalizeType } from '@agent-device/contracts/snapshot';
3-
import { hasPositiveRect, rectArea, rectContains, unionRects } from './rects.ts';
3+
import { hasPositiveRect, rectArea, rectContains, unionRects } from './screenshot-overlay-rects.ts';
44

55
/**
66
* Android overlay policy (#1983): which Android nodes earn an overlay ref, and what rectangle

src/daemon/screenshot-overlay-draw.ts renamed to packages/capture-kit/src/screenshot-overlay-draw.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Rect, ScreenshotOverlayRef } from '@agent-device/kernel/snapshot';
2-
import type { PNG } from '@agent-device/capture-kit/png';
3-
import { clamp } from '../snapshot/screenshot-overlay/rects.ts';
2+
import type { PNG } from './png.ts';
3+
import { clamp } from './screenshot-overlay-rects.ts';
44

55
/**
66
* Rasterizing one overlay ref onto a decoded PNG: border, badge, and the bitmap glyphs the badge
File renamed without changes.

src/daemon/__tests__/screenshot-overlay.test.ts renamed to packages/capture-kit/src/screenshot-overlay.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import { test } from 'vitest';
22
import assert from 'node:assert/strict';
33
import fs from 'node:fs';
44
import path from 'node:path';
5-
import { PNG } from '@agent-device/capture-kit/png';
6-
import { annotateScreenshotWithRefs, buildScreenshotOverlayRefs } from '../screenshot-overlay.ts';
7-
import { makeSnapshotState } from '../../__tests__/test-utils/snapshot-builders.ts';
8-
import { mkdtempForTestSync } from '../../__tests__/test-utils/tmp-dir.ts';
5+
import { PNG } from './png.ts';
6+
import { annotateScreenshotWithRefs, buildScreenshotOverlayRefs } from './screenshot-overlay.ts';
7+
import { makeSnapshotState } from './snapshot-state.fixtures.ts';
8+
import { mkdtempForTestSync } from './tmp-dir.fixtures.ts';
99

1010
function writeSolidPng(filePath: string, width: number, height: number): void {
1111
const png = new PNG({ width, height });

src/daemon/screenshot-overlay.ts renamed to packages/capture-kit/src/screenshot-overlay.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import {
66
type SnapshotNode,
77
type SnapshotState,
88
} from '@agent-device/kernel/snapshot';
9-
import { decodePngAsync, encodePngAsync } from '@agent-device/capture-kit/png-worker-client';
9+
import { decodePngAsync, encodePngAsync } from './png-worker-client.ts';
1010
import {
1111
projectSnapshotRectToScreenshot,
1212
resolveSnapshotBounds,
13-
} from '@agent-device/capture-kit/snapshot-rect-projection';
14-
import { analyzeReactNativeOverlay } from '../core/react-native-overlay.ts';
13+
} from './snapshot-rect-projection.ts';
14+
import { analyzeReactNativeOverlay } from './react-native-overlay.ts';
1515
import {
1616
findNearestAncestor,
1717
isMeaningfulSignal,
@@ -21,14 +21,9 @@ import {
2121
import {
2222
isAndroidUnlabeledClickableSource,
2323
resolveAndroidOverlaySourceRect,
24-
} from '../snapshot/screenshot-overlay/android.ts';
24+
} from './screenshot-overlay-android.ts';
2525
import { drawOverlayRef } from './screenshot-overlay-draw.ts';
26-
import {
27-
clamp,
28-
hasPositiveRect,
29-
rectArea,
30-
rectContains,
31-
} from '../snapshot/screenshot-overlay/rects.ts';
26+
import { clamp, hasPositiveRect, rectArea, rectContains } from './screenshot-overlay-rects.ts';
3227

3328
const MAX_OVERLAY_REFS = 24;
3429
const ACTIONABLE_ROLE_TYPES = [

0 commit comments

Comments
 (0)