sim-mirror 0.2.0__tar.gz

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.
Files changed (211) hide show
  1. sim_mirror-0.2.0/.gitignore +29 -0
  2. sim_mirror-0.2.0/LICENSE +202 -0
  3. sim_mirror-0.2.0/NOTICE +14 -0
  4. sim_mirror-0.2.0/PKG-INFO +210 -0
  5. sim_mirror-0.2.0/README.md +174 -0
  6. sim_mirror-0.2.0/THIRD_PARTY_LICENSES.md +61 -0
  7. sim_mirror-0.2.0/docs/README.md +53 -0
  8. sim_mirror-0.2.0/docs/media/README.md +20 -0
  9. sim_mirror-0.2.0/examples/README.md +18 -0
  10. sim_mirror-0.2.0/examples/claude-code-cli/README.md +51 -0
  11. sim_mirror-0.2.0/examples/codex/README.md +12 -0
  12. sim_mirror-0.2.0/examples/cursor/README.md +12 -0
  13. sim_mirror-0.2.0/examples/custom-connector/README.md +46 -0
  14. sim_mirror-0.2.0/examples/embed-host/README.md +23 -0
  15. sim_mirror-0.2.0/examples/fastapi-embed/README.md +50 -0
  16. sim_mirror-0.2.0/examples/iframe/README.md +26 -0
  17. sim_mirror-0.2.0/examples/token-budget/README.md +23 -0
  18. sim_mirror-0.2.0/examples/web-component/README.md +49 -0
  19. sim_mirror-0.2.0/packaging/homebrew/README.md +16 -0
  20. sim_mirror-0.2.0/protocol/README.md +55 -0
  21. sim_mirror-0.2.0/protocol/v1/agent-event.schema.json +63 -0
  22. sim_mirror-0.2.0/protocol/v1/client-input.schema.json +94 -0
  23. sim_mirror-0.2.0/protocol/v1/close-codes.json +33 -0
  24. sim_mirror-0.2.0/protocol/v1/common.schema.json +102 -0
  25. sim_mirror-0.2.0/protocol/v1/constants.json +11 -0
  26. sim_mirror-0.2.0/protocol/v1/hello.schema.json +50 -0
  27. sim_mirror-0.2.0/protocol/v1/settings.schema.json +204 -0
  28. sim_mirror-0.2.0/protocol/v1/status.schema.json +81 -0
  29. sim_mirror-0.2.0/protocol/v1/stream.schema.json +12 -0
  30. sim_mirror-0.2.0/pyproject.toml +139 -0
  31. sim_mirror-0.2.0/src/sim_mirror/__init__.py +6 -0
  32. sim_mirror-0.2.0/src/sim_mirror/__main__.py +7 -0
  33. sim_mirror-0.2.0/src/sim_mirror/_version.py +4 -0
  34. sim_mirror-0.2.0/src/sim_mirror/api.py +98 -0
  35. sim_mirror-0.2.0/src/sim_mirror/build/__init__.py +2 -0
  36. sim_mirror-0.2.0/src/sim_mirror/build/destination.py +82 -0
  37. sim_mirror-0.2.0/src/sim_mirror/build/provider.py +176 -0
  38. sim_mirror-0.2.0/src/sim_mirror/build/xcodebuild.py +709 -0
  39. sim_mirror-0.2.0/src/sim_mirror/build/xcresult.py +365 -0
  40. sim_mirror-0.2.0/src/sim_mirror/cli/__init__.py +2 -0
  41. sim_mirror-0.2.0/src/sim_mirror/cli/config_command.py +100 -0
  42. sim_mirror-0.2.0/src/sim_mirror/cli/context.py +128 -0
  43. sim_mirror-0.2.0/src/sim_mirror/cli/devices.py +43 -0
  44. sim_mirror-0.2.0/src/sim_mirror/cli/doctor.py +75 -0
  45. sim_mirror-0.2.0/src/sim_mirror/cli/main.py +61 -0
  46. sim_mirror-0.2.0/src/sim_mirror/cli/mcp.py +34 -0
  47. sim_mirror-0.2.0/src/sim_mirror/cli/open_viewer.py +36 -0
  48. sim_mirror-0.2.0/src/sim_mirror/cli/serve.py +73 -0
  49. sim_mirror-0.2.0/src/sim_mirror/cli/settings_command.py +38 -0
  50. sim_mirror-0.2.0/src/sim_mirror/cli/tokens.py +65 -0
  51. sim_mirror-0.2.0/src/sim_mirror/cli/tools.py +32 -0
  52. sim_mirror-0.2.0/src/sim_mirror/cli/version.py +31 -0
  53. sim_mirror-0.2.0/src/sim_mirror/cli/xcode.py +90 -0
  54. sim_mirror-0.2.0/src/sim_mirror/config/__init__.py +3 -0
  55. sim_mirror-0.2.0/src/sim_mirror/config/discovery.py +19 -0
  56. sim_mirror-0.2.0/src/sim_mirror/config/env.py +34 -0
  57. sim_mirror-0.2.0/src/sim_mirror/config/model.py +79 -0
  58. sim_mirror-0.2.0/src/sim_mirror/config/provenance.py +39 -0
  59. sim_mirror-0.2.0/src/sim_mirror/config/schema.py +482 -0
  60. sim_mirror-0.2.0/src/sim_mirror/config/settings_store.py +34 -0
  61. sim_mirror-0.2.0/src/sim_mirror/config/toml_source.py +139 -0
  62. sim_mirror-0.2.0/src/sim_mirror/config/writer.py +218 -0
  63. sim_mirror-0.2.0/src/sim_mirror/connectors/__init__.py +7 -0
  64. sim_mirror-0.2.0/src/sim_mirror/connectors/base.py +228 -0
  65. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/__init__.py +2 -0
  66. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/companion.py +351 -0
  67. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/connector.py +91 -0
  68. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/engine.py +149 -0
  69. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/frameworks.py +51 -0
  70. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/proto/__init__.py +8 -0
  71. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/proto/idb.proto +1301 -0
  72. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/proto/idb_grpc.py +776 -0
  73. sim_mirror-0.2.0/src/sim_mirror/connectors/idb/proto/idb_pb2.py +452 -0
  74. sim_mirror-0.2.0/src/sim_mirror/connectors/mcpbridge/__init__.py +3 -0
  75. sim_mirror-0.2.0/src/sim_mirror/connectors/mcpbridge/client.py +264 -0
  76. sim_mirror-0.2.0/src/sim_mirror/connectors/mcpbridge/connector.py +84 -0
  77. sim_mirror-0.2.0/src/sim_mirror/connectors/mcpbridge/hierarchy.py +225 -0
  78. sim_mirror-0.2.0/src/sim_mirror/connectors/mcpbridge/merge.py +68 -0
  79. sim_mirror-0.2.0/src/sim_mirror/connectors/mcpbridge/reader.py +220 -0
  80. sim_mirror-0.2.0/src/sim_mirror/connectors/registry.py +136 -0
  81. sim_mirror-0.2.0/src/sim_mirror/connectors/simctl/__init__.py +2 -0
  82. sim_mirror-0.2.0/src/sim_mirror/connectors/simctl/capture.py +79 -0
  83. sim_mirror-0.2.0/src/sim_mirror/connectors/simctl/connector.py +74 -0
  84. sim_mirror-0.2.0/src/sim_mirror/core/__init__.py +3 -0
  85. sim_mirror-0.2.0/src/sim_mirror/core/actions.py +541 -0
  86. sim_mirror-0.2.0/src/sim_mirror/core/availability.py +61 -0
  87. sim_mirror-0.2.0/src/sim_mirror/core/devices.py +163 -0
  88. sim_mirror-0.2.0/src/sim_mirror/core/events.py +46 -0
  89. sim_mirror-0.2.0/src/sim_mirror/core/frames.py +308 -0
  90. sim_mirror-0.2.0/src/sim_mirror/core/gestures.py +164 -0
  91. sim_mirror-0.2.0/src/sim_mirror/core/instance.py +126 -0
  92. sim_mirror-0.2.0/src/sim_mirror/core/manager.py +541 -0
  93. sim_mirror-0.2.0/src/sim_mirror/core/reaper.py +64 -0
  94. sim_mirror-0.2.0/src/sim_mirror/core/runtime.py +214 -0
  95. sim_mirror-0.2.0/src/sim_mirror/core/screen_input.py +170 -0
  96. sim_mirror-0.2.0/src/sim_mirror/core/screen_relay.py +275 -0
  97. sim_mirror-0.2.0/src/sim_mirror/core/status.py +58 -0
  98. sim_mirror-0.2.0/src/sim_mirror/core/text_entry.py +64 -0
  99. sim_mirror-0.2.0/src/sim_mirror/core/tickets.py +43 -0
  100. sim_mirror-0.2.0/src/sim_mirror/daemon/__init__.py +2 -0
  101. sim_mirror-0.2.0/src/sim_mirror/daemon/app.py +332 -0
  102. sim_mirror-0.2.0/src/sim_mirror/daemon/auth.py +164 -0
  103. sim_mirror-0.2.0/src/sim_mirror/daemon/confirmations.py +110 -0
  104. sim_mirror-0.2.0/src/sim_mirror/daemon/health.py +47 -0
  105. sim_mirror-0.2.0/src/sim_mirror/daemon/lease.py +41 -0
  106. sim_mirror-0.2.0/src/sim_mirror/daemon/lifecycle.py +77 -0
  107. sim_mirror-0.2.0/src/sim_mirror/daemon/passes.py +83 -0
  108. sim_mirror-0.2.0/src/sim_mirror/daemon/policy.py +37 -0
  109. sim_mirror-0.2.0/src/sim_mirror/daemon/tokens.py +302 -0
  110. sim_mirror-0.2.0/src/sim_mirror/doctor/__init__.py +2 -0
  111. sim_mirror-0.2.0/src/sim_mirror/doctor/checks.py +303 -0
  112. sim_mirror-0.2.0/src/sim_mirror/doctor/macos.py +67 -0
  113. sim_mirror-0.2.0/src/sim_mirror/doctor/report.py +59 -0
  114. sim_mirror-0.2.0/src/sim_mirror/doctor/tap.py +139 -0
  115. sim_mirror-0.2.0/src/sim_mirror/host_copy.py +136 -0
  116. sim_mirror-0.2.0/src/sim_mirror/hosting.py +190 -0
  117. sim_mirror-0.2.0/src/sim_mirror/mcp/__init__.py +2 -0
  118. sim_mirror-0.2.0/src/sim_mirror/mcp/launcher.py +252 -0
  119. sim_mirror-0.2.0/src/sim_mirror/mcp/relay.py +316 -0
  120. sim_mirror-0.2.0/src/sim_mirror/perception/__init__.py +9 -0
  121. sim_mirror-0.2.0/src/sim_mirror/perception/budget.py +66 -0
  122. sim_mirror-0.2.0/src/sim_mirror/perception/model.py +65 -0
  123. sim_mirror-0.2.0/src/sim_mirror/perception/readers.py +204 -0
  124. sim_mirror-0.2.0/src/sim_mirror/perception/settle.py +93 -0
  125. sim_mirror-0.2.0/src/sim_mirror/perception/snapshot.py +252 -0
  126. sim_mirror-0.2.0/src/sim_mirror/perception/wait.py +73 -0
  127. sim_mirror-0.2.0/src/sim_mirror/platform/__init__.py +3 -0
  128. sim_mirror-0.2.0/src/sim_mirror/platform/developer_dir.py +72 -0
  129. sim_mirror-0.2.0/src/sim_mirror/platform/images.py +51 -0
  130. sim_mirror-0.2.0/src/sim_mirror/platform/keyboard.py +29 -0
  131. sim_mirror-0.2.0/src/sim_mirror/platform/process.py +105 -0
  132. sim_mirror-0.2.0/src/sim_mirror/platform/simctl.py +275 -0
  133. sim_mirror-0.2.0/src/sim_mirror/platform/xcode.py +20 -0
  134. sim_mirror-0.2.0/src/sim_mirror/platform/xcrun.py +129 -0
  135. sim_mirror-0.2.0/src/sim_mirror/protocol/__init__.py +39 -0
  136. sim_mirror-0.2.0/src/sim_mirror/protocol/_generated.py +605 -0
  137. sim_mirror-0.2.0/src/sim_mirror/protocol/messages.py +168 -0
  138. sim_mirror-0.2.0/src/sim_mirror/py.typed +0 -0
  139. sim_mirror-0.2.0/src/sim_mirror/scope.py +67 -0
  140. sim_mirror-0.2.0/src/sim_mirror/seams.py +236 -0
  141. sim_mirror-0.2.0/src/sim_mirror/server/__init__.py +2 -0
  142. sim_mirror-0.2.0/src/sim_mirror/server/agent_routes.py +54 -0
  143. sim_mirror-0.2.0/src/sim_mirror/server/envelope.py +28 -0
  144. sim_mirror-0.2.0/src/sim_mirror/server/http_routes.py +93 -0
  145. sim_mirror-0.2.0/src/sim_mirror/server/log_redaction.py +45 -0
  146. sim_mirror-0.2.0/src/sim_mirror/server/pages.py +59 -0
  147. sim_mirror-0.2.0/src/sim_mirror/server/security.py +161 -0
  148. sim_mirror-0.2.0/src/sim_mirror/server/settings_routes.py +188 -0
  149. sim_mirror-0.2.0/src/sim_mirror/server/settings_view.py +82 -0
  150. sim_mirror-0.2.0/src/sim_mirror/server/socket_routes.py +61 -0
  151. sim_mirror-0.2.0/src/sim_mirror/server/static/viewer/embed.html +19 -0
  152. sim_mirror-0.2.0/src/sim_mirror/server/static/viewer/index.html +19 -0
  153. sim_mirror-0.2.0/src/sim_mirror/server/static/viewer/start.js +25 -0
  154. sim_mirror-0.2.0/src/sim_mirror/storage/__init__.py +3 -0
  155. sim_mirror-0.2.0/src/sim_mirror/storage/app_support.py +100 -0
  156. sim_mirror-0.2.0/src/sim_mirror/storage/claims.py +146 -0
  157. sim_mirror-0.2.0/src/sim_mirror/storage/private.py +135 -0
  158. sim_mirror-0.2.0/src/sim_mirror/testing/__init__.py +2 -0
  159. sim_mirror-0.2.0/src/sim_mirror/testing/asgi.py +96 -0
  160. sim_mirror-0.2.0/src/sim_mirror/testing/contract.py +73 -0
  161. sim_mirror-0.2.0/src/sim_mirror/testing/fakes.py +732 -0
  162. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-alert-ios27.json +162 -0
  163. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-home-complete.json +1 -0
  164. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-home-ios27.json +447 -0
  165. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-keyboard-ios27.json +1261 -0
  166. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-probe-ios27.json +444 -0
  167. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-safari-ios27.json +188 -0
  168. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-safari-typed.json +1 -0
  169. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-settings-interactable.json +1 -0
  170. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/ax-settings-ios27.json +425 -0
  171. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/mcpbridge-answers.json +183 -0
  172. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/mcpbridge-hierarchy-alert.txt +46 -0
  173. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/mcpbridge-hierarchy-home.txt +257 -0
  174. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/mcpbridge-hierarchy-keyboard.txt +92 -0
  175. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/mcpbridge-hierarchy-probe.txt +39 -0
  176. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/mcpbridge-hierarchy-safari.txt +77 -0
  177. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/mcpbridge-hierarchy-settings.txt +169 -0
  178. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/simctl-devices.json +73 -0
  179. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/simctl-runtimes.json +114 -0
  180. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcodebuild-list-names.json +20 -0
  181. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcodebuild-list.json +17 -0
  182. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcodebuild-settings.json +13 -0
  183. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcodebuild-test-plans-none.json +3 -0
  184. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcodebuild-test-plans.json +10 -0
  185. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-build-broken.json +32 -0
  186. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-build-ok.json +27 -0
  187. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-build-results-unbuilt.json +36 -0
  188. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-summary-retries.json +56 -0
  189. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-summary-swift-testing-xcode27.json +63 -0
  190. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-summary-swift-testing.json +60 -0
  191. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-summary-unbuilt.json +24 -0
  192. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-summary.json +49 -0
  193. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-tests-retries.json +165 -0
  194. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-tests-swift-testing-xcode27.json +135 -0
  195. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-tests-swift-testing.json +125 -0
  196. sim_mirror-0.2.0/src/sim_mirror/testing/fixtures/xcresult-test-tests.json +93 -0
  197. sim_mirror-0.2.0/src/sim_mirror/testing/guards.py +129 -0
  198. sim_mirror-0.2.0/src/sim_mirror/testing/rig.py +163 -0
  199. sim_mirror-0.2.0/src/sim_mirror/tools/__init__.py +2 -0
  200. sim_mirror-0.2.0/src/sim_mirror/tools/act.py +31 -0
  201. sim_mirror-0.2.0/src/sim_mirror/tools/app.py +127 -0
  202. sim_mirror-0.2.0/src/sim_mirror/tools/context.py +120 -0
  203. sim_mirror-0.2.0/src/sim_mirror/tools/device.py +51 -0
  204. sim_mirror-0.2.0/src/sim_mirror/tools/registry.py +82 -0
  205. sim_mirror-0.2.0/src/sim_mirror/tools/results.py +30 -0
  206. sim_mirror-0.2.0/src/sim_mirror/tools/schemas.py +170 -0
  207. sim_mirror-0.2.0/src/sim_mirror/tools/screenshot.py +28 -0
  208. sim_mirror-0.2.0/src/sim_mirror/tools/snapshot.py +23 -0
  209. sim_mirror-0.2.0/src/sim_mirror/validation.py +46 -0
  210. sim_mirror-0.2.0/tests/unit/protocol/test_messages.py +126 -0
  211. sim_mirror-0.2.0/viewer/README.md +37 -0
@@ -0,0 +1,29 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ .venv/
5
+ /build/
6
+ dist/
7
+ *.egg-info/
8
+ .pytest_cache/
9
+ .mypy_cache/
10
+ .ruff_cache/
11
+ .coverage
12
+ .coverage.*
13
+ coverage.json
14
+ coverage.xml
15
+ htmlcov/
16
+
17
+ # Node
18
+ node_modules/
19
+ viewer/dist/
20
+ viewer/coverage/
21
+ *.tgz
22
+
23
+ # The committed standalone viewer bundle lives in src/sim_mirror/server/static/viewer/ and is not ignored.
24
+
25
+ # macOS and editors
26
+ .DS_Store
27
+ .idea/
28
+ .vscode/
29
+ *.swp
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,14 @@
1
+ SimMirror
2
+ Copyright 2026 Andrew Kochulab
3
+
4
+ This product is licensed under the Apache License, Version 2.0 (see LICENSE).
5
+
6
+ It includes third-party material under its own licenses; see THIRD_PARTY_LICENSES.md:
7
+ - idb_companion's gRPC protocol definition (facebook/idb), MIT License,
8
+ Copyright (c) Meta Platforms, Inc. and affiliates.
9
+ - Icon paths from Lucide (lucide.dev), ISC License,
10
+ Copyright (c) Lucide Contributors 2022; portions Copyright (c) Cole Bemis 2013-2022 (Feather, MIT).
11
+
12
+ SimMirror is an independent project. It is not affiliated with, endorsed by or sponsored by Apple Inc.,
13
+ Anthropic PBC or Meta Platforms, Inc. iOS, iPhone, Xcode and Simulator are trademarks of Apple Inc.
14
+ Claude and Claude Code are trademarks of Anthropic PBC.
@@ -0,0 +1,210 @@
1
+ Metadata-Version: 2.5
2
+ Name: sim-mirror
3
+ Version: 0.2.0
4
+ Summary: Mirror and drive the iOS Simulator from Claude Code, CLI agents and the browser.
5
+ Project-URL: Homepage, https://github.com/AndrewKochulab/sim-mirror
6
+ Project-URL: Documentation, https://github.com/AndrewKochulab/sim-mirror/tree/main/docs
7
+ Project-URL: Issues, https://github.com/AndrewKochulab/sim-mirror/issues
8
+ Project-URL: Changelog, https://github.com/AndrewKochulab/sim-mirror/blob/main/CHANGELOG.md
9
+ Author: Andrew Kochulab
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ License-File: NOTICE
13
+ License-File: THIRD_PARTY_LICENSES.md
14
+ Keywords: ai-agents,claude-code,ios-simulator,mcp,screen-mirroring,simulator,ui-automation
15
+ Classifier: Development Status :: 3 - Alpha
16
+ Classifier: Environment :: MacOS X
17
+ Classifier: Framework :: FastAPI
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Operating System :: MacOS
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3 :: Only
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Topic :: Software Development :: Testing
27
+ Classifier: Typing :: Typed
28
+ Requires-Python: >=3.10
29
+ Requires-Dist: fastapi<1,>=0.115
30
+ Requires-Dist: grpclib<0.5,>=0.4.9
31
+ Requires-Dist: protobuf<8,>=7.36
32
+ Requires-Dist: tomli>=2; python_version < '3.11'
33
+ Requires-Dist: tomlkit>=0.13
34
+ Requires-Dist: uvicorn[standard]>=0.35
35
+ Description-Content-Type: text/markdown
36
+
37
+ <!-- mcp-name: io.github.AndrewKochulab/sim-mirror -->
38
+
39
+ # SimMirror
40
+
41
+ **Mirror and drive the iOS Simulator from Claude Code, CLI agents and the browser.**
42
+
43
+ [![CI](https://github.com/AndrewKochulab/sim-mirror/actions/workflows/ci.yml/badge.svg)](https://github.com/AndrewKochulab/sim-mirror/actions/workflows/ci.yml)
44
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
45
+ [![Release](https://img.shields.io/github/v/release/AndrewKochulab/sim-mirror?include_prereleases&sort=semver)](https://github.com/AndrewKochulab/sim-mirror/releases)
46
+
47
+ ![A Claude Code session tapping through Settings on an iPhone 17 Pro simulator in the viewer, its cursor named
48
+ and drawn before each tap](docs/media/hero.gif)
49
+
50
+ A live iOS Simulator in any browser tab or web page, an animated cursor that shows exactly what your AI agent is about
51
+ to tap, and token-efficient UI snapshots so agents read the screen as compact text instead of screenshots. Works with
52
+ Claude Code, Codex, Cursor and any other MCP client.
53
+
54
+ > **Status: first public preview (v0.1).** The tools, the viewer and the protocol work today; the embedding API and
55
+ > protocol become stable with v1.0.
56
+
57
+ ## Why SimMirror
58
+
59
+ - **See the simulator anywhere.** A live H.264 or JPEG stream in a Chrome tab, an iframe or a `<sim-mirror>` web
60
+ component, with touch, scrolling, typing, hardware buttons and light and dark mode.
61
+ - **Watch what the agent does.** Every agent gesture is announced before it lands, and the viewer's cursor glides to
62
+ the spot first -- so you can follow along, and step in: an agent waits for your hand to be still.
63
+ - **Spend fewer tokens.** Agents read accessibility snapshots with stable element refs and diffs between screens, act
64
+ in batches with waits, and reach for a screenshot only when a question is visual.
65
+
66
+ ## Install
67
+
68
+ **Claude Code**, with the plugin (tools, a skill that teaches snapshot-first use, and `/sim-mirror:open`):
69
+
70
+ ```
71
+ /plugin marketplace add AndrewKochulab/sim-mirror
72
+ /plugin install sim-mirror@sim-mirror
73
+ ```
74
+
75
+ **Any MCP client**, as a stdio server:
76
+
77
+ ```sh
78
+ claude mcp add sim-mirror -- uvx --from git+https://github.com/AndrewKochulab/sim-mirror@v0.2.0 sim-mirror mcp
79
+ ```
80
+
81
+ Configurations for [Codex](docs/clients/codex.md), [Cursor](docs/clients/cursor.md) and
82
+ [other clients](docs/clients/other-mcp.md).
83
+
84
+ **The command**, for `sim-mirror open`, `doctor` and the rest:
85
+
86
+ ```sh
87
+ uv tool install git+https://github.com/AndrewKochulab/sim-mirror@v0.2.0
88
+ ```
89
+
90
+ **The viewer library**, for your own pages: the npm package `@andrewkochulab/sim-mirror`, attached to each
91
+ [release](https://github.com/AndrewKochulab/sim-mirror/releases). Homebrew and PyPI come with v1.0.
92
+
93
+ **Requirements:** an Apple Silicon Mac, Xcode 26 or later, [uv](https://docs.astral.sh/uv/), and for touching the
94
+ screen, idb_companion (`brew install facebook/fb/idb-companion`). Details in [Installation](docs/installation.md).
95
+
96
+ ## Quickstart
97
+
98
+ ```sh
99
+ sim-mirror doctor # check this Mac, ending with a real tap on a simulator
100
+ sim-mirror open # this project's simulator, live in a browser tab
101
+ ```
102
+
103
+ Then ask your agent:
104
+
105
+ > Open Settings → General → About and tell me which iOS version this simulator runs. Use sim_snapshot rather than
106
+ > screenshots.
107
+
108
+ [Getting started](docs/getting-started.md) explains what happens along the way.
109
+
110
+ ## Features
111
+
112
+ **Live viewer.** H.264 through WebCodecs where the page can decode it, JPEG otherwise, negotiated per connection.
113
+ Touch, drag, scroll, typing and paste, Home and Lock, light and dark, and a device picker. It reconnects by itself
114
+ after a blip and says plainly when the simulator is off.
115
+
116
+ **Agent cursor.** Every agent gesture -- tap, long press, swipe, drag, typing -- reaches the viewer before it lands, and
117
+ the viewer's own pointer glides there first (`agent.cursor_lead_ms`). Never the Mac's pointer.
118
+
119
+ **Screen understanding.** A snapshot is a few lines -- `e2 button "General" (201,319)` -- with refs that stay with their
120
+ elements across scrolls, a digest, and diffs. `sim_act` plays up to 20 steps in one call and waits for text, its
121
+ absence, or the screen to settle. See [Screen understanding](docs/screen-understanding.md).
122
+
123
+ **Connectors.** idb_companion gives full control; without it the simctl connector still mirrors the screen, view-only,
124
+ and says why. More connectors plug in through an entry point. See [Connectors](docs/connectors.md).
125
+
126
+ **Embedding.** An [iframe](docs/embedding/iframe.md) with a one-shot ticket, the
127
+ [`<sim-mirror>` element](docs/embedding/web-component.md) themed with CSS custom properties, or SimMirror
128
+ [inside a Python application](docs/embedding/python-fastapi.md) with its own sign-in.
129
+
130
+ **Settings panel.** `sim-mirror open --settings` puts every setting a click away in the viewer, a tab per section,
131
+ saved for one project or all of them and applied before it says so. Settings that decide what runs or who may reach
132
+ the daemon wait for a code from `sim-mirror settings confirm`. See [The settings panel](docs/settings.md).
133
+
134
+ **Doctor.** Checks Xcode, its Simulator frameworks, runtimes, idb_companion, Device Hub and the desktop session, then
135
+ proves a tap reaches a simulator. See [the doctor](docs/doctor.md).
136
+
137
+ **Security.** Loopback only, a Host allowlist, exact Origin checks, CORS and framing only for origins you list, hashed
138
+ scoped tokens, and one-shot codes in URL fragments. See [Security](docs/security.md).
139
+
140
+ **Build and test.** `sim_build_run` and `sim_test` build with xcodebuild for the agent's simulator, install and
141
+ launch, and answer with only what failed and where -- each failing test named so it can be run again alone, and on
142
+ another simulator when asked. Off by default, since they run commands: `sim-mirror config set build.tools true`.
143
+
144
+ ## Measure the token cost
145
+
146
+ `benchmarks/tool_budget.py` calls each read-only tool through the same MCP relay a client uses and prints each answer's
147
+ bytes, estimated tokens and latency on your own screens; see [the token budget example](examples/token-budget/). On
148
+ an iPhone 17 Pro simulator (iOS 26.5, idb connector) showing Settings → General, 5 calls each (2026-09-16):
149
+
150
+ | Call | Tool | Bytes | Tokens (est.) | p50 ms | p95 ms |
151
+ |---|---|---:|---:|---:|---:|
152
+ | device info | `sim_device` | 265 | 46 | 2.9 | 3.6 |
153
+ | snapshot, full | `sim_snapshot` | 561 | 112 | 64.8 | 76.4 |
154
+ | snapshot, diff of an unchanged screen | `sim_snapshot` | 83 | 5 | 63.2 | 64.8 |
155
+ | screenshot, 400 px wide | `sim_screenshot` | 62222 | 469 | 8.2 | 8.9 |
156
+ | screenshot, 1200 px wide | `sim_screenshot` | 276472 | 4181 | 20.4 | 21.9 |
157
+
158
+ Bytes are the whole answer, an image's base64 included; tokens are estimates (text at about 4 characters a token,
159
+ an image at about 750 pixels a token).
160
+
161
+ ## Compatibility
162
+
163
+ | | Expected to work |
164
+ |---|---|
165
+ | macOS | 26 (15 with Xcode 16.4, view-only) |
166
+ | Xcode | 26 and 27 |
167
+ | Connectors | idb_companion 1.5 (full control), simctl (view-only) |
168
+ | Clients | Claude Code, Codex, Cursor, any stdio MCP client |
169
+ | Browsers | Chrome, Safari, Firefox, Edge |
170
+
171
+ Rows checked on real hardware are marked verified, with the date, in [Compatibility](docs/compatibility.md).
172
+
173
+ While SimMirror is `0.x`, the tools, the protocol and the embedding API can still change in a minor release, and the
174
+ changelog says when they do; from 1.0 they are held to [what SimMirror promises not to break](docs/stability.md). Pin
175
+ an exact version either way.
176
+
177
+ ## Documentation
178
+
179
+ [Everything](docs/README.md): getting started, clients, embedding, screen understanding, connectors, security,
180
+ architecture, and the reference for [tools](docs/reference/tools.md), [configuration](docs/reference/configuration.md),
181
+ the [command line](docs/reference/cli.md) and the [protocol](docs/reference/protocol.md).
182
+
183
+ ## Roadmap
184
+
185
+ | Milestone | What it brings |
186
+ |---|---|
187
+ | **v0.1** (preview) | Live viewer, agent cursor, person and agent control, MCP tools, `sim-mirror doctor`, idb and simctl connectors, build and test as a preview |
188
+ | **v1.0** | Stable protocol and embedding API, PyPI and npm packages, the MCP registry |
189
+ | **v1.1** | Build, run and test tools become stable |
190
+ | **v1.2** | Richer screen understanding, a native Swift helper, Xcode 27 `mcpbridge` connector, one shared daemon for many hosts |
191
+ | **v2.0** | Real iPhones: view, install and launch without signing; full control through WebDriverAgent |
192
+ | **Android** | Android emulator support with the same viewer, cursor and tools |
193
+ | **Homebrew** | `brew install andrewkochulab/tap/sim-mirror`, right after v1.0 |
194
+ | **Website & launch** | Landing page, video tutorials and guides |
195
+
196
+ See [ROADMAP.md](ROADMAP.md) and the [milestones](https://github.com/AndrewKochulab/sim-mirror/milestones). How
197
+ SimMirror relates to other tools is in [Comparison](docs/comparison.md).
198
+
199
+ ## Contributing
200
+
201
+ Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md); AI
202
+ coding agents read [AGENTS.md](AGENTS.md). Report security issues privately as described in [SECURITY.md](SECURITY.md).
203
+ Questions go to [Discussions](https://github.com/AndrewKochulab/sim-mirror/discussions).
204
+
205
+ ## License
206
+
207
+ [Apache-2.0](LICENSE). See [NOTICE](NOTICE) and [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md).
208
+
209
+ SimMirror is an independent project, not affiliated with Apple or Anthropic. iOS, iPhone, Xcode and Simulator are
210
+ trademarks of Apple Inc.; Claude and Claude Code are trademarks of Anthropic PBC.
@@ -0,0 +1,174 @@
1
+ <!-- mcp-name: io.github.AndrewKochulab/sim-mirror -->
2
+
3
+ # SimMirror
4
+
5
+ **Mirror and drive the iOS Simulator from Claude Code, CLI agents and the browser.**
6
+
7
+ [![CI](https://github.com/AndrewKochulab/sim-mirror/actions/workflows/ci.yml/badge.svg)](https://github.com/AndrewKochulab/sim-mirror/actions/workflows/ci.yml)
8
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
9
+ [![Release](https://img.shields.io/github/v/release/AndrewKochulab/sim-mirror?include_prereleases&sort=semver)](https://github.com/AndrewKochulab/sim-mirror/releases)
10
+
11
+ ![A Claude Code session tapping through Settings on an iPhone 17 Pro simulator in the viewer, its cursor named
12
+ and drawn before each tap](docs/media/hero.gif)
13
+
14
+ A live iOS Simulator in any browser tab or web page, an animated cursor that shows exactly what your AI agent is about
15
+ to tap, and token-efficient UI snapshots so agents read the screen as compact text instead of screenshots. Works with
16
+ Claude Code, Codex, Cursor and any other MCP client.
17
+
18
+ > **Status: first public preview (v0.1).** The tools, the viewer and the protocol work today; the embedding API and
19
+ > protocol become stable with v1.0.
20
+
21
+ ## Why SimMirror
22
+
23
+ - **See the simulator anywhere.** A live H.264 or JPEG stream in a Chrome tab, an iframe or a `<sim-mirror>` web
24
+ component, with touch, scrolling, typing, hardware buttons and light and dark mode.
25
+ - **Watch what the agent does.** Every agent gesture is announced before it lands, and the viewer's cursor glides to
26
+ the spot first -- so you can follow along, and step in: an agent waits for your hand to be still.
27
+ - **Spend fewer tokens.** Agents read accessibility snapshots with stable element refs and diffs between screens, act
28
+ in batches with waits, and reach for a screenshot only when a question is visual.
29
+
30
+ ## Install
31
+
32
+ **Claude Code**, with the plugin (tools, a skill that teaches snapshot-first use, and `/sim-mirror:open`):
33
+
34
+ ```
35
+ /plugin marketplace add AndrewKochulab/sim-mirror
36
+ /plugin install sim-mirror@sim-mirror
37
+ ```
38
+
39
+ **Any MCP client**, as a stdio server:
40
+
41
+ ```sh
42
+ claude mcp add sim-mirror -- uvx --from git+https://github.com/AndrewKochulab/sim-mirror@v0.2.0 sim-mirror mcp
43
+ ```
44
+
45
+ Configurations for [Codex](docs/clients/codex.md), [Cursor](docs/clients/cursor.md) and
46
+ [other clients](docs/clients/other-mcp.md).
47
+
48
+ **The command**, for `sim-mirror open`, `doctor` and the rest:
49
+
50
+ ```sh
51
+ uv tool install git+https://github.com/AndrewKochulab/sim-mirror@v0.2.0
52
+ ```
53
+
54
+ **The viewer library**, for your own pages: the npm package `@andrewkochulab/sim-mirror`, attached to each
55
+ [release](https://github.com/AndrewKochulab/sim-mirror/releases). Homebrew and PyPI come with v1.0.
56
+
57
+ **Requirements:** an Apple Silicon Mac, Xcode 26 or later, [uv](https://docs.astral.sh/uv/), and for touching the
58
+ screen, idb_companion (`brew install facebook/fb/idb-companion`). Details in [Installation](docs/installation.md).
59
+
60
+ ## Quickstart
61
+
62
+ ```sh
63
+ sim-mirror doctor # check this Mac, ending with a real tap on a simulator
64
+ sim-mirror open # this project's simulator, live in a browser tab
65
+ ```
66
+
67
+ Then ask your agent:
68
+
69
+ > Open Settings → General → About and tell me which iOS version this simulator runs. Use sim_snapshot rather than
70
+ > screenshots.
71
+
72
+ [Getting started](docs/getting-started.md) explains what happens along the way.
73
+
74
+ ## Features
75
+
76
+ **Live viewer.** H.264 through WebCodecs where the page can decode it, JPEG otherwise, negotiated per connection.
77
+ Touch, drag, scroll, typing and paste, Home and Lock, light and dark, and a device picker. It reconnects by itself
78
+ after a blip and says plainly when the simulator is off.
79
+
80
+ **Agent cursor.** Every agent gesture -- tap, long press, swipe, drag, typing -- reaches the viewer before it lands, and
81
+ the viewer's own pointer glides there first (`agent.cursor_lead_ms`). Never the Mac's pointer.
82
+
83
+ **Screen understanding.** A snapshot is a few lines -- `e2 button "General" (201,319)` -- with refs that stay with their
84
+ elements across scrolls, a digest, and diffs. `sim_act` plays up to 20 steps in one call and waits for text, its
85
+ absence, or the screen to settle. See [Screen understanding](docs/screen-understanding.md).
86
+
87
+ **Connectors.** idb_companion gives full control; without it the simctl connector still mirrors the screen, view-only,
88
+ and says why. More connectors plug in through an entry point. See [Connectors](docs/connectors.md).
89
+
90
+ **Embedding.** An [iframe](docs/embedding/iframe.md) with a one-shot ticket, the
91
+ [`<sim-mirror>` element](docs/embedding/web-component.md) themed with CSS custom properties, or SimMirror
92
+ [inside a Python application](docs/embedding/python-fastapi.md) with its own sign-in.
93
+
94
+ **Settings panel.** `sim-mirror open --settings` puts every setting a click away in the viewer, a tab per section,
95
+ saved for one project or all of them and applied before it says so. Settings that decide what runs or who may reach
96
+ the daemon wait for a code from `sim-mirror settings confirm`. See [The settings panel](docs/settings.md).
97
+
98
+ **Doctor.** Checks Xcode, its Simulator frameworks, runtimes, idb_companion, Device Hub and the desktop session, then
99
+ proves a tap reaches a simulator. See [the doctor](docs/doctor.md).
100
+
101
+ **Security.** Loopback only, a Host allowlist, exact Origin checks, CORS and framing only for origins you list, hashed
102
+ scoped tokens, and one-shot codes in URL fragments. See [Security](docs/security.md).
103
+
104
+ **Build and test.** `sim_build_run` and `sim_test` build with xcodebuild for the agent's simulator, install and
105
+ launch, and answer with only what failed and where -- each failing test named so it can be run again alone, and on
106
+ another simulator when asked. Off by default, since they run commands: `sim-mirror config set build.tools true`.
107
+
108
+ ## Measure the token cost
109
+
110
+ `benchmarks/tool_budget.py` calls each read-only tool through the same MCP relay a client uses and prints each answer's
111
+ bytes, estimated tokens and latency on your own screens; see [the token budget example](examples/token-budget/). On
112
+ an iPhone 17 Pro simulator (iOS 26.5, idb connector) showing Settings → General, 5 calls each (2026-09-16):
113
+
114
+ | Call | Tool | Bytes | Tokens (est.) | p50 ms | p95 ms |
115
+ |---|---|---:|---:|---:|---:|
116
+ | device info | `sim_device` | 265 | 46 | 2.9 | 3.6 |
117
+ | snapshot, full | `sim_snapshot` | 561 | 112 | 64.8 | 76.4 |
118
+ | snapshot, diff of an unchanged screen | `sim_snapshot` | 83 | 5 | 63.2 | 64.8 |
119
+ | screenshot, 400 px wide | `sim_screenshot` | 62222 | 469 | 8.2 | 8.9 |
120
+ | screenshot, 1200 px wide | `sim_screenshot` | 276472 | 4181 | 20.4 | 21.9 |
121
+
122
+ Bytes are the whole answer, an image's base64 included; tokens are estimates (text at about 4 characters a token,
123
+ an image at about 750 pixels a token).
124
+
125
+ ## Compatibility
126
+
127
+ | | Expected to work |
128
+ |---|---|
129
+ | macOS | 26 (15 with Xcode 16.4, view-only) |
130
+ | Xcode | 26 and 27 |
131
+ | Connectors | idb_companion 1.5 (full control), simctl (view-only) |
132
+ | Clients | Claude Code, Codex, Cursor, any stdio MCP client |
133
+ | Browsers | Chrome, Safari, Firefox, Edge |
134
+
135
+ Rows checked on real hardware are marked verified, with the date, in [Compatibility](docs/compatibility.md).
136
+
137
+ While SimMirror is `0.x`, the tools, the protocol and the embedding API can still change in a minor release, and the
138
+ changelog says when they do; from 1.0 they are held to [what SimMirror promises not to break](docs/stability.md). Pin
139
+ an exact version either way.
140
+
141
+ ## Documentation
142
+
143
+ [Everything](docs/README.md): getting started, clients, embedding, screen understanding, connectors, security,
144
+ architecture, and the reference for [tools](docs/reference/tools.md), [configuration](docs/reference/configuration.md),
145
+ the [command line](docs/reference/cli.md) and the [protocol](docs/reference/protocol.md).
146
+
147
+ ## Roadmap
148
+
149
+ | Milestone | What it brings |
150
+ |---|---|
151
+ | **v0.1** (preview) | Live viewer, agent cursor, person and agent control, MCP tools, `sim-mirror doctor`, idb and simctl connectors, build and test as a preview |
152
+ | **v1.0** | Stable protocol and embedding API, PyPI and npm packages, the MCP registry |
153
+ | **v1.1** | Build, run and test tools become stable |
154
+ | **v1.2** | Richer screen understanding, a native Swift helper, Xcode 27 `mcpbridge` connector, one shared daemon for many hosts |
155
+ | **v2.0** | Real iPhones: view, install and launch without signing; full control through WebDriverAgent |
156
+ | **Android** | Android emulator support with the same viewer, cursor and tools |
157
+ | **Homebrew** | `brew install andrewkochulab/tap/sim-mirror`, right after v1.0 |
158
+ | **Website & launch** | Landing page, video tutorials and guides |
159
+
160
+ See [ROADMAP.md](ROADMAP.md) and the [milestones](https://github.com/AndrewKochulab/sim-mirror/milestones). How
161
+ SimMirror relates to other tools is in [Comparison](docs/comparison.md).
162
+
163
+ ## Contributing
164
+
165
+ Contributions are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) and the [Code of Conduct](CODE_OF_CONDUCT.md); AI
166
+ coding agents read [AGENTS.md](AGENTS.md). Report security issues privately as described in [SECURITY.md](SECURITY.md).
167
+ Questions go to [Discussions](https://github.com/AndrewKochulab/sim-mirror/discussions).
168
+
169
+ ## License
170
+
171
+ [Apache-2.0](LICENSE). See [NOTICE](NOTICE) and [THIRD_PARTY_LICENSES.md](THIRD_PARTY_LICENSES.md).
172
+
173
+ SimMirror is an independent project, not affiliated with Apple or Anthropic. iOS, iPhone, Xcode and Simulator are
174
+ trademarks of Apple Inc.; Claude and Claude Code are trademarks of Anthropic PBC.