simdeck 0.1.0 → 0.1.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/LICENSE +16 -10
- package/README.md +99 -79
- package/build/simdeck-bin +0 -0
- package/client/dist/assets/index-ICWevBP_.js +9 -0
- package/client/dist/assets/index-Y_Zqbt1r.css +1 -0
- package/client/dist/index.html +3 -2
- package/client/dist/simdeck.png +0 -0
- package/package.json +15 -1
- package/packages/simdeck-test/dist/index.d.ts +1 -1
- package/packages/simdeck-test/dist/index.js +1 -1
- package/scripts/studio-host-provider.mjs +762 -0
- package/scripts/studio-provider-bridge.mjs +729 -0
- package/client/dist/assets/index-BL9Mcd6u.js +0 -9
- package/client/dist/assets/index-Cu4TL413.css +0 -1
- package/client/dist/assets/simulatorStream.worker-CH72C_tF.js +0 -22
package/LICENSE
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
Copyright
|
|
1
|
+
Copyright OpenJS Foundation and other contributors, https://openjsf.org
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
|
11
|
+
all copies or substantial portions of the Software.
|
|
8
12
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
+
THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img width="180" src="./client/public/simdeck.png">
|
|
2
3
|
|
|
3
|
-
SimDeck
|
|
4
|
-
|
|
4
|
+
<h1 align="center">SimDeck</h1>
|
|
5
|
+
|
|
6
|
+
<p align="center">
|
|
7
|
+
SimDeck is a developer tool built for streamlining mobile app development for coding agents.
|
|
8
|
+
Drive Simulator from the CLI using agents, browser, and automated tests on macOS.
|
|
9
|
+
</p>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<hr/>
|
|
13
|
+
|
|
14
|
+
## Try it out
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npx simdeck
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Install the CLI globally for agentic-use:
|
|
5
21
|
|
|
6
22
|
```sh
|
|
7
23
|
npm i -g simdeck@latest
|
|
@@ -11,25 +27,25 @@ After installing the CLI, install the Codex skill so agents know the stable
|
|
|
11
27
|
SimDeck workflow:
|
|
12
28
|
|
|
13
29
|
```sh
|
|
14
|
-
npx skills add NativeScript/SimDeck --skill simdeck -
|
|
30
|
+
npx skills add NativeScript/SimDeck --skill simdeck -g
|
|
15
31
|
```
|
|
16
32
|
|
|
17
|
-
For VS Code, install the `nativescript.simdeck` extension to open the simulator
|
|
33
|
+
For VS Code, install the `nativescript.simdeck-vscode` extension to open the simulator
|
|
18
34
|
view inside the editor.
|
|
19
35
|
|
|
20
36
|
## Features
|
|
21
37
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
38
|
+
- Local simulator video stream over browser-native WebRTC H.264
|
|
39
|
+
- Full simulator control & inspection using private accessibility APIs - available using `simdeck` CLI
|
|
40
|
+
- Real-time screen `describe` command using accessibility view tree - available in token-efficient format for agents
|
|
24
41
|
- CoreSimulator chrome asset rendering for device bezels
|
|
25
|
-
- NativeScript
|
|
26
|
-
- Project daemon reuse: normal CLI commands automatically start and reuse one warm native host per project.
|
|
27
|
-
- Optional macOS LaunchAgent service for an always-on local SimDeck daemon.
|
|
42
|
+
- NativeScript, React Native, UIKit and SwiftUI runtime inspector plugins to view app's view hierarchy live
|
|
28
43
|
- `simdeck/test` for fast JS/TS app tests that can query accessibility state and drive simulator controls.
|
|
44
|
+
- SimDeck Studio for sharing Simulator streams & automatic PR deployments to on-demand simulators
|
|
29
45
|
|
|
30
46
|
## Documentation
|
|
31
47
|
|
|
32
|
-
Full documentation lives at [simdeck.nativescript.org](https://simdeck.nativescript.org/), with guides, the CLI reference, the REST API, the
|
|
48
|
+
Full documentation lives at [simdeck.nativescript.org](https://simdeck.nativescript.org/), with guides, the CLI reference, the REST API, the video pipeline, and the inspector protocols.
|
|
33
49
|
|
|
34
50
|
## Quick start
|
|
35
51
|
|
|
@@ -37,15 +53,33 @@ Full documentation lives at [simdeck.nativescript.org](https://simdeck.nativescr
|
|
|
37
53
|
simdeck
|
|
38
54
|
```
|
|
39
55
|
|
|
40
|
-
This starts a workspace-local foreground daemon, prints local and LAN
|
|
56
|
+
This starts a workspace-local foreground daemon, prints local and LAN HTTP URLs plus a pairing code for LAN browsers, and stops when you press `q` or Ctrl-C.
|
|
41
57
|
To focus a specific simulator by name or UDID, pass it as the only argument:
|
|
42
58
|
|
|
43
59
|
```sh
|
|
44
60
|
simdeck "iPhone 17 Pro Max"
|
|
45
61
|
```
|
|
46
62
|
|
|
47
|
-
|
|
48
|
-
|
|
63
|
+
`simdeck -d` for detached start, `simdeck -k` to kill the background daemon, and `simdeck -r` to restart it.
|
|
64
|
+
|
|
65
|
+
The served loopback browser UI receives the generated API access token automatically.
|
|
66
|
+
LAN clients should pair with the printed code before receiving the API cookie.
|
|
67
|
+
|
|
68
|
+
SimDeck Studio providers run the daemon on loopback and use
|
|
69
|
+
`scripts/studio-provider-bridge.mjs` for outbound control-plane communication
|
|
70
|
+
with Studio. Studio hosts the browser UI and proxies SimDeck REST requests over
|
|
71
|
+
that bridge while WebRTC media still negotiates directly between the browser and
|
|
72
|
+
runner through ICE.
|
|
73
|
+
|
|
74
|
+
Expose a local simulator through SimDeck Studio with one command:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
simdeck studio expose "iPhone 17 Pro"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The command starts or reuses the local daemon, creates an ephemeral Studio
|
|
81
|
+
session, prints a unique `https://simdeck.djdev.me/simulator/...` URL, and keeps
|
|
82
|
+
the outbound bridge alive until you press Ctrl-C.
|
|
49
83
|
|
|
50
84
|
CLI commands automatically use the same warm daemon:
|
|
51
85
|
|
|
@@ -55,6 +89,42 @@ simdeck tap <udid> 0.5 0.5 --normalized
|
|
|
55
89
|
simdeck describe <udid> --format agent --max-depth 2
|
|
56
90
|
```
|
|
57
91
|
|
|
92
|
+
## Daemon
|
|
93
|
+
|
|
94
|
+
Manage the project daemon explicitly when needed:
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
simdeck daemon start
|
|
98
|
+
simdeck daemon restart
|
|
99
|
+
simdeck daemon status
|
|
100
|
+
simdeck daemon stop
|
|
101
|
+
simdeck daemon killall
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
`simdeck daemon` manages the normal per-project warm process. `daemon killall`
|
|
105
|
+
stops SimDeck daemons across all workspaces.
|
|
106
|
+
|
|
107
|
+
Use software H.264's low-latency profile on slower runners where freshness is
|
|
108
|
+
more important than full-resolution smoothness:
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
simdeck daemon start --video-codec software --low-latency
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Restart the CoreSimulator service layer when `simctl` reports a stale service
|
|
115
|
+
version or the live display gets stuck before the first frame:
|
|
116
|
+
|
|
117
|
+
```sh
|
|
118
|
+
simdeck core-simulator restart
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
You can also start or stop the CoreSimulator service layer explicitly:
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
simdeck core-simulator start
|
|
125
|
+
simdeck core-simulator shutdown
|
|
126
|
+
```
|
|
127
|
+
|
|
58
128
|
## CLI
|
|
59
129
|
|
|
60
130
|
```sh
|
|
@@ -70,6 +140,7 @@ simdeck toggle-appearance <udid>
|
|
|
70
140
|
simdeck pasteboard set <udid> "hello"
|
|
71
141
|
simdeck pasteboard get <udid>
|
|
72
142
|
simdeck screenshot <udid> --output screen.png
|
|
143
|
+
simdeck stream <udid> --frames 120 > stream.h264
|
|
73
144
|
simdeck describe <udid>
|
|
74
145
|
simdeck describe <udid> --format agent --max-depth 4
|
|
75
146
|
simdeck describe <udid> --point 120,240
|
|
@@ -87,7 +158,7 @@ simdeck key-combo <udid> --modifiers cmd --key a
|
|
|
87
158
|
simdeck type <udid> "hello"
|
|
88
159
|
simdeck type <udid> --file message.txt
|
|
89
160
|
simdeck button <udid> lock --duration-ms 1000
|
|
90
|
-
simdeck batch <udid> --step "tap --label Continue" --step "type 'hello'"
|
|
161
|
+
simdeck batch <udid> --step "tap --label Continue" --step "type 'hello'" --step "wait-for --label hello"
|
|
91
162
|
simdeck dismiss-keyboard <udid>
|
|
92
163
|
simdeck home <udid>
|
|
93
164
|
simdeck app-switcher <udid>
|
|
@@ -97,6 +168,13 @@ simdeck chrome-profile <udid>
|
|
|
97
168
|
simdeck logs <udid> --seconds 30 --limit 200
|
|
98
169
|
```
|
|
99
170
|
|
|
171
|
+
`boot` prefers SimDeck's private CoreSimulator boot path so it can start devices
|
|
172
|
+
without launching Simulator.app, then falls back to `xcrun simctl` when private
|
|
173
|
+
booting is unavailable.
|
|
174
|
+
|
|
175
|
+
`stream` writes an Annex B H.264 elementary stream to stdout for diagnostics or
|
|
176
|
+
external tools such as `ffplay`.
|
|
177
|
+
|
|
100
178
|
`describe` uses the project daemon to prefer React Native, NativeScript, or
|
|
101
179
|
UIKit in-app inspectors, then falls back to the built-in private CoreSimulator
|
|
102
180
|
accessibility bridge. Use `--format agent` or `--format compact-json` for
|
|
@@ -104,59 +182,6 @@ lower-token hierarchy dumps. Coordinate commands accept screen coordinates from
|
|
|
104
182
|
the accessibility tree by default; pass `--normalized` to send `0.0..1.0`
|
|
105
183
|
coordinates directly.
|
|
106
184
|
|
|
107
|
-
## Daemon
|
|
108
|
-
|
|
109
|
-
Manage the project daemon explicitly when needed:
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
simdeck daemon start
|
|
113
|
-
simdeck daemon status
|
|
114
|
-
simdeck daemon stop
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
`simdeck daemon` manages the normal per-project warm process. For an always-on
|
|
118
|
-
daemon that is available after login, use the macOS user service commands:
|
|
119
|
-
|
|
120
|
-
```sh
|
|
121
|
-
simdeck service on
|
|
122
|
-
simdeck service off
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
This uses a LaunchAgent, keeps the server bound to localhost by default, and is
|
|
126
|
-
best for agents or editor integrations that should be able to open SimDeck
|
|
127
|
-
without first starting a project daemon.
|
|
128
|
-
|
|
129
|
-
Use software H.264 when macOS screen recording starves the hardware encoder:
|
|
130
|
-
|
|
131
|
-
```sh
|
|
132
|
-
simdeck daemon start --video-codec h264-software
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
For LAN browser access:
|
|
136
|
-
|
|
137
|
-
```sh
|
|
138
|
-
simdeck ui --bind 0.0.0.0 --advertise-host 192.168.1.50 --open
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Restart the CoreSimulator service layer when `simctl` reports a stale service
|
|
142
|
-
version or the live display gets stuck before the first frame:
|
|
143
|
-
|
|
144
|
-
```sh
|
|
145
|
-
simdeck core-simulator restart
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
You can also start or stop the CoreSimulator service layer explicitly:
|
|
149
|
-
|
|
150
|
-
```sh
|
|
151
|
-
simdeck core-simulator start
|
|
152
|
-
simdeck core-simulator shutdown
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
The daemon exposes HTTP on the requested port and WebTransport on `port + 1`.
|
|
156
|
-
The browser bootstrap comes from `GET /api/health`, which returns the WebTransport URL template,
|
|
157
|
-
certificate hash, and packet version needed by the client.
|
|
158
|
-
The served browser UI receives the generated API access token automatically.
|
|
159
|
-
|
|
160
185
|
## JS/TS Tests
|
|
161
186
|
|
|
162
187
|
```ts
|
|
@@ -216,25 +241,20 @@ React Fiber commits.
|
|
|
216
241
|
|
|
217
242
|
## VS Code
|
|
218
243
|
|
|
219
|
-
Install the `nativescript.simdeck` extension from the VS Code Marketplace, then
|
|
244
|
+
Install the `nativescript.simdeck-vscode` extension from the VS Code Marketplace, then
|
|
220
245
|
run `SimDeck: Open Simulator View` from the Command Palette. The extension
|
|
221
246
|
opens the simulator inside a VS Code panel and auto-starts the local daemon
|
|
222
247
|
when it is not already reachable.
|
|
223
248
|
|
|
224
|
-
## SimDeck Cloud
|
|
225
|
-
|
|
226
|
-
SimDeck Cloud uses the same server binary as its GitHub Actions provider. The
|
|
227
|
-
provider workflow starts `simdeck serve` on the runner, exposes it through a
|
|
228
|
-
tunnel, and lets the hosted control plane connect to the simulator with a
|
|
229
|
-
one-time access token.
|
|
230
|
-
|
|
231
249
|
## Contributing
|
|
232
250
|
|
|
233
251
|
Contributors should read [CONTRIBUTING.md](CONTRIBUTING.md) for local build
|
|
234
252
|
instructions, the dev workflow, and architecture notes.
|
|
235
253
|
|
|
236
|
-
##
|
|
254
|
+
## Copyright notice
|
|
255
|
+
|
|
256
|
+
Copyright [OpenJS Foundation](https://openjsf.org) and `NativeScript` contributors. All rights reserved. The [OpenJS Foundation](https://openjsf.org) has registered trademarks and uses trademarks. For a list of trademarks of the [OpenJS Foundation](https://openjsf.org), please see our [Trademark Policy](https://trademark-policy.openjsf.org/) and [Trademark List](https://trademark-list.openjsf.org/). Trademarks and logos not indicated on the [list of OpenJS Foundation trademarks](https://trademark-list.openjsf.org) are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
|
|
237
257
|
|
|
238
|
-
|
|
258
|
+
[The OpenJS Foundation](https://openjsf.org/) | [Terms of Use](https://terms-of-use.openjsf.org/) | [Privacy Policy](https://privacy-policy.openjsf.org/) | [OpenJS Foundation Bylaws](https://bylaws.openjsf.org/) | [Trademark Policy](https://trademark-policy.openjsf.org/) | [Trademark List](https://trademark-list.openjsf.org/) | [Cookie Policy](https://www.linuxfoundation.org/cookies/)
|
|
239
259
|
|
|
240
|
-
|
|
260
|
+
<h3 align="center">Made with ❤️</h3>
|
package/build/simdeck-bin
CHANGED
|
Binary file
|