@rootnative/loupe 0.0.0-alpha.2 → 0.0.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -42,6 +42,8 @@ interface CommandContext {
42
42
  * `localFetch`, which refuses every other host.
43
43
  */
44
44
  fetch: typeof fetch;
45
+ /** The system of this machine, as `process.platform` gives it. */
46
+ hostPlatform: NodeJS.Platform;
45
47
  /**
46
48
  * Aborts when the caller cancels the call: Ctrl-C in the CLI, or a
47
49
  * cancel from the MCP client. A long command stops at its next safe
@@ -102,14 +104,18 @@ declare function createRegistry(commands: readonly Command[]): Registry;
102
104
 
103
105
  declare const deviceSchema: z.ZodObject<{
104
106
  platform: z.ZodEnum<{
107
+ ios: "ios";
105
108
  android: "android";
106
109
  }>;
107
110
  kind: z.ZodEnum<{
111
+ simulator: "simulator";
108
112
  emulator: "emulator";
109
113
  device: "device";
110
114
  }>;
111
115
  serial: z.ZodOptional<z.ZodString>;
112
116
  avd: z.ZodOptional<z.ZodString>;
117
+ udid: z.ZodOptional<z.ZodString>;
118
+ name: z.ZodOptional<z.ZodString>;
113
119
  model: z.ZodOptional<z.ZodString>;
114
120
  state: z.ZodEnum<{
115
121
  ready: "ready";
@@ -122,6 +128,7 @@ declare const deviceSchema: z.ZodObject<{
122
128
  }>;
123
129
  detail: z.ZodOptional<z.ZodString>;
124
130
  apiLevel: z.ZodOptional<z.ZodNumber>;
131
+ os: z.ZodOptional<z.ZodString>;
125
132
  }, z.core.$strip>;
126
133
  type Device = z.infer<typeof deviceSchema>;
127
134
  type DeviceState = Device['state'];
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  toPixels,
19
19
  unitOf,
20
20
  version
21
- } from "./chunk-HWVQXYQ3.js";
21
+ } from "./chunk-7ALG5744.js";
22
22
  export {
23
23
  ERROR_CODES,
24
24
  LoupeError,
@@ -0,0 +1,239 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>BuildMachineOSBuild</key>
6
+ <string>23A344011</string>
7
+ <key>CFBundleAllowMixedLocalizations</key>
8
+ <true/>
9
+ <key>CFBundleDevelopmentRegion</key>
10
+ <string>en</string>
11
+ <key>CFBundleExecutable</key>
12
+ <string>LoupeRunner-Runner</string>
13
+ <key>CFBundleIdentifier</key>
14
+ <string>io.github.rootnative.loupe.LoupeRunner.xctrunner</string>
15
+ <key>CFBundleInfoDictionaryVersion</key>
16
+ <string>6.0</string>
17
+ <key>CFBundleName</key>
18
+ <string>LoupeRunner-Runner</string>
19
+ <key>CFBundlePackageType</key>
20
+ <string>APPL</string>
21
+ <key>CFBundleShortVersionString</key>
22
+ <string>1.0</string>
23
+ <key>CFBundleSignature</key>
24
+ <string>????</string>
25
+ <key>CFBundleSupportedPlatforms</key>
26
+ <array>
27
+ <string>iPhoneSimulator</string>
28
+ </array>
29
+ <key>CFBundleVersion</key>
30
+ <string>1</string>
31
+ <key>DTCompiler</key>
32
+ <string>com.apple.compilers.llvm.clang.1_0</string>
33
+ <key>DTPlatformBuild</key>
34
+ <string>22E169</string>
35
+ <key>DTPlatformName</key>
36
+ <string>iphonesimulator</string>
37
+ <key>DTPlatformVersion</key>
38
+ <string>18.4</string>
39
+ <key>DTSDKBuild</key>
40
+ <string>22E169</string>
41
+ <key>DTSDKName</key>
42
+ <string>iphonesimulator18.4.internal</string>
43
+ <key>DTXcode</key>
44
+ <string>1640</string>
45
+ <key>DTXcodeBuild</key>
46
+ <string>16F1t</string>
47
+ <key>LSRequiresIPhoneOS</key>
48
+ <true/>
49
+ <key>MinimumOSVersion</key>
50
+ <string>13.0</string>
51
+ <key>NFCReaderUsageDescription</key>
52
+ <string>Access is necessary for automated testing.</string>
53
+ <key>NSAppTransportSecurity</key>
54
+ <dict>
55
+ <key>NSAllowsArbitraryLoads</key>
56
+ <true/>
57
+ </dict>
58
+ <key>NSAppleMusicUsageDescription</key>
59
+ <string>Access is necessary for automated testing.</string>
60
+ <key>NSBluetoothAlwaysUsageDescription</key>
61
+ <string>Access is necessary for automated testing.</string>
62
+ <key>NSBluetoothPeripheralUsageDescription</key>
63
+ <string>Access is necessary for automated testing.</string>
64
+ <key>NSCalendarsUsageDescription</key>
65
+ <string>Access is necessary for automated testing.</string>
66
+ <key>NSCameraUsageDescription</key>
67
+ <string>Access is necessary for automated testing.</string>
68
+ <key>NSContactsUsageDescription</key>
69
+ <string>Access is necessary for automated testing.</string>
70
+ <key>NSFaceIDUsageDescription</key>
71
+ <string>Access is necessary for automated testing.</string>
72
+ <key>NSHealthClinicalHealthRecordsShareUsageDescription</key>
73
+ <string>Access is necessary for automated testing.</string>
74
+ <key>NSHealthShareUsageDescription</key>
75
+ <string>Access is necessary for automated testing.</string>
76
+ <key>NSHealthUpdateUsageDescription</key>
77
+ <string>Access is necessary for automated testing.</string>
78
+ <key>NSHomeKitUsageDescription</key>
79
+ <string>Access is necessary for automated testing.</string>
80
+ <key>NSLocalNetworkUsageDescription</key>
81
+ <string>Access is necessary for automated testing.</string>
82
+ <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
83
+ <string>Access is necessary for automated testing.</string>
84
+ <key>NSLocationDefaultAccuracyReduced</key>
85
+ <string>Access is necessary for automated testing.</string>
86
+ <key>NSLocationWhenInUseUsageDescription</key>
87
+ <string>Access is necessary for automated testing.</string>
88
+ <key>NSMicrophoneUsageDescription</key>
89
+ <string>Access is necessary for automated testing.</string>
90
+ <key>NSMotionUsageDescription</key>
91
+ <string>Access is necessary for automated testing.</string>
92
+ <key>NSPhotoLibraryUsageDescription</key>
93
+ <string>Access is necessary for automated testing.</string>
94
+ <key>NSRemindersUsageDescription</key>
95
+ <string>Access is necessary for automated testing.</string>
96
+ <key>NSSensorKitPrivacyPolicyURL</key>
97
+ <string>https:\/\/www.apple.com/legal/privacy/en-ww/</string>
98
+ <key>NSSensorKitUsageDescription</key>
99
+ <string>Access is necessary for automated testing.</string>
100
+ <key>NSSensorKitUsageDetail</key>
101
+ <dict>
102
+ <key>SRSensorUsageAmbientLightSensor</key>
103
+ <dict>
104
+ <key>Description</key>
105
+ <string>DESCRIPTION_SRSensorUsageAmbientLightSensor</string>
106
+ </dict>
107
+ <key>SRSensorUsageDeviceUsage</key>
108
+ <dict>
109
+ <key>Description</key>
110
+ <string>DESCRIPTION_SRSensorUsageDeviceUsage</string>
111
+ </dict>
112
+ <key>SRSensorUsageECG</key>
113
+ <dict>
114
+ <key>Description</key>
115
+ <string>DESCRIPTION_SRSensorUsageECG</string>
116
+ </dict>
117
+ <key>SRSensorUsageElevation</key>
118
+ <dict>
119
+ <key>Description</key>
120
+ <string>DESCRIPTION_SRSensorUsageElevation</string>
121
+ </dict>
122
+ <key>SRSensorUsageFacialMetrics</key>
123
+ <dict>
124
+ <key>Description</key>
125
+ <string>DESCRIPTION_SRSensorUsageFacialMetrics</string>
126
+ </dict>
127
+ <key>SRSensorUsageFallStatistics</key>
128
+ <dict>
129
+ <key>Description</key>
130
+ <string>DESCRIPTION_SRSensorUsageFallStatistics</string>
131
+ </dict>
132
+ <key>SRSensorUsageHeartRate</key>
133
+ <dict>
134
+ <key>Description</key>
135
+ <string>DESCRIPTION_SRSensorUsageHeartRate</string>
136
+ </dict>
137
+ <key>SRSensorUsageKeyboardMetrics</key>
138
+ <dict>
139
+ <key>Description</key>
140
+ <string>DESCRIPTION_SRSensorUsageKeyboardMetrics</string>
141
+ </dict>
142
+ <key>SRSensorUsageMessageUsage</key>
143
+ <dict>
144
+ <key>Description</key>
145
+ <string>DESCRIPTION_SRSensorUsageMessageUsage</string>
146
+ </dict>
147
+ <key>SRSensorUsageMotion</key>
148
+ <dict>
149
+ <key>Description</key>
150
+ <string>DESCRIPTION_SRSensorUsageMotion</string>
151
+ <key>Required</key>
152
+ <true/>
153
+ </dict>
154
+ <key>SRSensorUsageMotionAlarms</key>
155
+ <dict>
156
+ <key>Description</key>
157
+ <string>DESCRIPTION_SRSensorUsageMotionAlarms</string>
158
+ </dict>
159
+ <key>SRSensorUsageOdometer</key>
160
+ <dict>
161
+ <key>Description</key>
162
+ <string>DESCRIPTION_SRSensorUsageOdometer</string>
163
+ </dict>
164
+ <key>SRSensorUsageOnWristDetailedState</key>
165
+ <dict>
166
+ <key>Description</key>
167
+ <string>DESCRIPTION_SRSensorIdentifierOnWristDetailedState</string>
168
+ </dict>
169
+ <key>SRSensorUsagePedometer</key>
170
+ <dict>
171
+ <key>Description</key>
172
+ <string>DESCRIPTION_SRSensorUsagePedometer</string>
173
+ </dict>
174
+ <key>SRSensorUsagePhoneUsage</key>
175
+ <dict>
176
+ <key>Description</key>
177
+ <string>DESCRIPTION_SRSensorUsagePhoneUsage</string>
178
+ </dict>
179
+ <key>SRSensorUsageSpeechMetrics</key>
180
+ <dict>
181
+ <key>Description</key>
182
+ <string>DESCRIPTION_SRSensorUsageSpeechMetrics</string>
183
+ </dict>
184
+ <key>SRSensorUsageStrideCalibration</key>
185
+ <dict>
186
+ <key>Description</key>
187
+ <string>DESCRIPTION_SRSensorUsageStrideCalibration</string>
188
+ </dict>
189
+ <key>SRSensorUsageVisits</key>
190
+ <dict>
191
+ <key>Description</key>
192
+ <string>DESCRIPTION_SRSensorUsageVisits</string>
193
+ </dict>
194
+ <key>SRSensorUsageWristDetection</key>
195
+ <dict>
196
+ <key>Description</key>
197
+ <string>DESCRIPTION_SRSensorUsageWristDetection</string>
198
+ </dict>
199
+ </dict>
200
+ <key>NSSiriUsageDescription</key>
201
+ <string>Access is necessary for automated testing.</string>
202
+ <key>NSSpeechRecognitionUsageDescription</key>
203
+ <string>Access is necessary for automated testing.</string>
204
+ <key>NSUserTrackingUsageDescription</key>
205
+ <string>Access is necessary for automated testing.</string>
206
+ <key>NSVideoSubscriberAccountUsageDescription</key>
207
+ <string>Access is necessary for automated testing.</string>
208
+ <key>SBIsLaunchableDuringSetup</key>
209
+ <true/>
210
+ <key>UIBackgroundModes</key>
211
+ <array>
212
+ <string>continuous</string>
213
+ </array>
214
+ <key>UIDeviceFamily</key>
215
+ <array>
216
+ <integer>1</integer>
217
+ <integer>2</integer>
218
+ </array>
219
+ <key>UIRequiredDeviceCapabilities</key>
220
+ <array>
221
+ <string>armv7</string>
222
+ </array>
223
+ <key>UIRequiresFullScreen</key>
224
+ <true/>
225
+ <key>UISupportedInterfaceOrientations</key>
226
+ <array>
227
+ <string>UIInterfaceOrientationPortrait</string>
228
+ <string>UIInterfaceOrientationLandscapeLeft</string>
229
+ <string>UIInterfaceOrientationLandscapeRight</string>
230
+ </array>
231
+ <key>UISupportedInterfaceOrientations~ipad</key>
232
+ <array>
233
+ <string>UIInterfaceOrientationPortrait</string>
234
+ <string>UIInterfaceOrientationPortraitUpsideDown</string>
235
+ <string>UIInterfaceOrientationLandscapeLeft</string>
236
+ <string>UIInterfaceOrientationLandscapeRight</string>
237
+ </array>
238
+ </dict>
239
+ </plist>
@@ -0,0 +1,119 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>LoupeRunner</key>
6
+ <dict>
7
+ <key>BlueprintName</key>
8
+ <string>LoupeRunner</string>
9
+ <key>BlueprintProviderName</key>
10
+ <string>LoupeRunner</string>
11
+ <key>BlueprintProviderRelativePath</key>
12
+ <string>LoupeRunner.xcodeproj</string>
13
+ <key>BundleIdentifiersForCrashReportEmphasis</key>
14
+ <array>
15
+ <string>io.github.rootnative.loupe.LoupeHost</string>
16
+ <string>io.github.rootnative.loupe.LoupeRunner</string>
17
+ </array>
18
+ <key>CommandLineArguments</key>
19
+ <array/>
20
+ <key>DefaultTestExecutionTimeAllowance</key>
21
+ <integer>600</integer>
22
+ <key>DependentProductPaths</key>
23
+ <array>
24
+ <string>__TESTROOT__/Debug-iphonesimulator/LoupeHost.app</string>
25
+ <string>__TESTROOT__/Debug-iphonesimulator/LoupeRunner-Runner.app</string>
26
+ <string>__TESTROOT__/Debug-iphonesimulator/LoupeRunner-Runner.app/PlugIns/LoupeRunner.xctest</string>
27
+ </array>
28
+ <key>DiagnosticCollectionPolicy</key>
29
+ <integer>1</integer>
30
+ <key>EnvironmentVariables</key>
31
+ <dict>
32
+ <key>APP_DISTRIBUTOR_ID_OVERRIDE</key>
33
+ <string>com.apple.AppStore</string>
34
+ <key>OS_ACTIVITY_DT_MODE</key>
35
+ <string>YES</string>
36
+ <key>SQLITE_ENABLE_THREAD_ASSERTIONS</key>
37
+ <string>1</string>
38
+ <key>TERM</key>
39
+ <string>dumb</string>
40
+ </dict>
41
+ <key>IsUITestBundle</key>
42
+ <true/>
43
+ <key>IsXCTRunnerHostedTestBundle</key>
44
+ <true/>
45
+ <key>PreferredScreenCaptureFormat</key>
46
+ <string>screenRecording</string>
47
+ <key>ProductModuleName</key>
48
+ <string>LoupeRunner</string>
49
+ <key>RunOrder</key>
50
+ <integer>0</integer>
51
+ <key>SystemAttachmentLifetime</key>
52
+ <string>deleteOnSuccess</string>
53
+ <key>TestBundlePath</key>
54
+ <string>__TESTHOST__/PlugIns/LoupeRunner.xctest</string>
55
+ <key>TestHostBundleIdentifier</key>
56
+ <string>io.github.rootnative.loupe.LoupeRunner.xctrunner</string>
57
+ <key>TestHostPath</key>
58
+ <string>__TESTROOT__/Debug-iphonesimulator/LoupeRunner-Runner.app</string>
59
+ <key>TestLanguage</key>
60
+ <string></string>
61
+ <key>TestRegion</key>
62
+ <string></string>
63
+ <key>TestTimeoutsEnabled</key>
64
+ <false/>
65
+ <key>TestingEnvironmentVariables</key>
66
+ <dict>
67
+ <key>DYLD_FRAMEWORK_PATH</key>
68
+ <string>__TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/Library/Frameworks</string>
69
+ <key>DYLD_LIBRARY_PATH</key>
70
+ <string>__TESTROOT__/Debug-iphonesimulator:__PLATFORMS__/iPhoneSimulator.platform/Developer/usr/lib</string>
71
+ <key>XCODE_SCHEME_NAME</key>
72
+ <string>LoupeRunner</string>
73
+ <key>__XCODE_BUILT_PRODUCTS_DIR_PATHS</key>
74
+ <string>__TESTROOT__/Debug-iphonesimulator</string>
75
+ <key>__XPC_DYLD_FRAMEWORK_PATH</key>
76
+ <string>__TESTROOT__/Debug-iphonesimulator</string>
77
+ <key>__XPC_DYLD_LIBRARY_PATH</key>
78
+ <string>__TESTROOT__/Debug-iphonesimulator</string>
79
+ </dict>
80
+ <key>ToolchainsSettingValue</key>
81
+ <array/>
82
+ <key>UITargetAppCommandLineArguments</key>
83
+ <array/>
84
+ <key>UITargetAppEnvironmentVariables</key>
85
+ <dict>
86
+ <key>APP_DISTRIBUTOR_ID_OVERRIDE</key>
87
+ <string>com.apple.AppStore</string>
88
+ <key>DYLD_FRAMEWORK_PATH</key>
89
+ <string>__TESTROOT__/Debug-iphonesimulator</string>
90
+ <key>DYLD_LIBRARY_PATH</key>
91
+ <string>__TESTROOT__/Debug-iphonesimulator</string>
92
+ <key>XCODE_SCHEME_NAME</key>
93
+ <string>LoupeRunner</string>
94
+ <key>__XCODE_BUILT_PRODUCTS_DIR_PATHS</key>
95
+ <string>__TESTROOT__/Debug-iphonesimulator</string>
96
+ <key>__XPC_DYLD_FRAMEWORK_PATH</key>
97
+ <string>__TESTROOT__/Debug-iphonesimulator</string>
98
+ <key>__XPC_DYLD_LIBRARY_PATH</key>
99
+ <string>__TESTROOT__/Debug-iphonesimulator</string>
100
+ </dict>
101
+ <key>UITargetAppPath</key>
102
+ <string>__TESTROOT__/Debug-iphonesimulator/LoupeHost.app</string>
103
+ <key>UserAttachmentLifetime</key>
104
+ <string>deleteOnSuccess</string>
105
+ </dict>
106
+ <key>__xctestrun_metadata__</key>
107
+ <dict>
108
+ <key>ContainerInfo</key>
109
+ <dict>
110
+ <key>ContainerName</key>
111
+ <string>LoupeRunner</string>
112
+ <key>SchemeName</key>
113
+ <string>LoupeRunner</string>
114
+ </dict>
115
+ <key>FormatVersion</key>
116
+ <integer>1</integer>
117
+ </dict>
118
+ </dict>
119
+ </plist>
@@ -6,7 +6,7 @@ import {
6
6
  round2,
7
7
  runCommand,
8
8
  version
9
- } from "./chunk-HWVQXYQ3.js";
9
+ } from "./chunk-7ALG5744.js";
10
10
 
11
11
  // src/mcp/server.ts
12
12
  import { existsSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rootnative/loupe",
3
- "version": "0.0.0-alpha.2",
3
+ "version": "0.0.0-alpha.3",
4
4
  "description": "loupe by Root Native: layout checks for iOS and Android, built for AI agents. Drive simulators and emulators, and measure every screen to the point.",
5
5
  "license": "MIT",
6
6
  "author": "Root Native",
@@ -28,8 +28,10 @@ schema, so this skill doesn't repeat them. loupe works on Android 11
28
28
  ## Before the first check
29
29
 
30
30
  1. Run `devices`. Only a device in the state `ready` takes commands.
31
- 2. When two or more devices are ready, give `device` (the serial or the
32
- AVD name) in each call.
31
+ 2. When two or more devices are ready, give `device` in each call: the
32
+ serial or the AVD name of an Android device. loupe lists the iOS
33
+ simulators, but it doesn't drive one yet: a command on a simulator
34
+ gives `unsupported`.
33
35
  3. Give `app` in each call that reads or touches the screen. For Expo Go,
34
36
  it's `host.exp.exponent`.
35
37
  4. Run one loupe call at a time on a device. Two touches at the same time