@houwert/conductor 0.2.0

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 (60) hide show
  1. package/.claude-plugin/plugin.json +6 -0
  2. package/README.md +39 -0
  3. package/dist/commands/assert-not-visible.js +47 -0
  4. package/dist/commands/assert-visible.js +58 -0
  5. package/dist/commands/back.js +25 -0
  6. package/dist/commands/cheat-sheet.js +100 -0
  7. package/dist/commands/daemon.js +61 -0
  8. package/dist/commands/device-pool.js +202 -0
  9. package/dist/commands/erase-text.js +26 -0
  10. package/dist/commands/foreground-app.js +50 -0
  11. package/dist/commands/hide-keyboard.js +27 -0
  12. package/dist/commands/inspect.js +37 -0
  13. package/dist/commands/install.js +64 -0
  14. package/dist/commands/launch-app.js +42 -0
  15. package/dist/commands/list-apps.js +60 -0
  16. package/dist/commands/list-devices.js +61 -0
  17. package/dist/commands/open-link.js +22 -0
  18. package/dist/commands/press-key.js +91 -0
  19. package/dist/commands/run-flow-inline.js +25 -0
  20. package/dist/commands/run-flow.js +29 -0
  21. package/dist/commands/run-parallel.js +143 -0
  22. package/dist/commands/screenshot.js +29 -0
  23. package/dist/commands/scroll-until-visible.js +69 -0
  24. package/dist/commands/scroll.js +36 -0
  25. package/dist/commands/session.js +49 -0
  26. package/dist/commands/set-location.js +18 -0
  27. package/dist/commands/set-orientation.js +23 -0
  28. package/dist/commands/start-device.js +178 -0
  29. package/dist/commands/stop-app.js +32 -0
  30. package/dist/commands/swipe.js +72 -0
  31. package/dist/commands/tap.js +69 -0
  32. package/dist/commands/type.js +22 -0
  33. package/dist/daemon/client.js +112 -0
  34. package/dist/daemon/protocol.js +25 -0
  35. package/dist/daemon/server.js +208 -0
  36. package/dist/drivers/android.js +343 -0
  37. package/dist/drivers/bootstrap.js +371 -0
  38. package/dist/drivers/element-resolver.js +371 -0
  39. package/dist/drivers/flow-runner.js +1309 -0
  40. package/dist/drivers/ios.js +328 -0
  41. package/dist/drivers/js-engine.js +150 -0
  42. package/dist/drivers/wait.js +211 -0
  43. package/dist/index.js +426 -0
  44. package/dist/output.js +36 -0
  45. package/dist/pkg-root.js +28 -0
  46. package/dist/postinstall.js +12 -0
  47. package/dist/runner.js +190 -0
  48. package/dist/session.js +66 -0
  49. package/dist/update-check.js +109 -0
  50. package/dist/utils.js +19 -0
  51. package/dist/verbose.js +17 -0
  52. package/drivers/android/conductor-app.apk +0 -0
  53. package/drivers/android/conductor-server.apk +0 -0
  54. package/drivers/ios/conductor-driver-ios-config.xctestrun +126 -0
  55. package/drivers/ios/conductor-driver-ios.zip +0 -0
  56. package/drivers/ios/conductor-driver-iosUITests-Runner.zip +0 -0
  57. package/package.json +52 -0
  58. package/proto/conductor_android.proto +116 -0
  59. package/skills/conductor/SKILL.md +677 -0
  60. package/skills/conductor/references/flow-syntax.md +179 -0
@@ -0,0 +1,179 @@
1
+ # Conductor Flow Syntax Reference
2
+
3
+ Conductor flows are YAML files that describe sequences of mobile UI actions.
4
+
5
+ ## Basic Structure
6
+
7
+ ```yaml
8
+ appId: com.example.myapp
9
+ ---
10
+ - launchApp
11
+ - tapOn: "Sign In"
12
+ - inputText: "user@example.com"
13
+ - takeScreenshot: /tmp/after-login
14
+ ```
15
+
16
+ ## Common Commands
17
+
18
+ ### App Control
19
+
20
+ ```yaml
21
+ - launchApp
22
+ - launchApp:
23
+ appId: com.other.app # launch a different app
24
+ - stopApp
25
+ - stopApp:
26
+ appId: com.other.app
27
+ - clearState # clear app data
28
+ - clearKeychain # clear keychain (iOS: full keychain; Android: account credentials)
29
+ ```
30
+
31
+ ### Tapping
32
+
33
+ ```yaml
34
+ - tapOn: "Button Text" # by text
35
+ - tapOn:
36
+ id: "button_id" # by accessibility ID
37
+ - tapOn:
38
+ text: "Submit"
39
+ index: 1 # second match
40
+ - longPressOn: "Element"
41
+ - doubleTapOn: "Element"
42
+ ```
43
+
44
+ ### Text Input
45
+
46
+ ```yaml
47
+ - inputText: "hello world"
48
+ - eraseText # erase 50 characters from focused field
49
+ - eraseText:
50
+ charactersToErase: 10 # erase specific number of characters
51
+ - pressKey: Enter
52
+ - pressKey: Backspace
53
+ - pressKey: Home
54
+ - pasteText: "pasted content" # paste text into focused field
55
+ - copyTextFrom: "Element" # copy element's text to output.textContent
56
+ ```
57
+
58
+ ### Scrolling & Swiping
59
+
60
+ ```yaml
61
+ - scroll # scroll down
62
+ - scrollUntilVisible:
63
+ element:
64
+ text: "Target"
65
+ - swipe:
66
+ direction: UP # UP | DOWN | LEFT | RIGHT
67
+ - swipe:
68
+ start: { x: 50%, y: 80% }
69
+ end: { x: 50%, y: 20% }
70
+ ```
71
+
72
+ ### Navigation
73
+
74
+ ```yaml
75
+ - back # Android back button
76
+ - hideKeyboard
77
+ - openLink: "myapp://screen" # deep link
78
+ ```
79
+
80
+ ### Assertions
81
+
82
+ ```yaml
83
+ - assertVisible: "Welcome"
84
+ - assertVisible:
85
+ text: "Welcome"
86
+ enabled: true
87
+ - assertNotVisible: "Error"
88
+ - assertTrue:
89
+ condition: "${count} > 0"
90
+ - assertFalse:
91
+ condition: "${error} == true"
92
+ ```
93
+
94
+ ### Waiting
95
+
96
+ ```yaml
97
+ - waitForAnimationToEnd
98
+ - extendedWaitUntil:
99
+ visible:
100
+ text: "Loading complete"
101
+ timeout: 5000
102
+ ```
103
+
104
+ ### Screenshots & Recording
105
+
106
+ ```yaml
107
+ - takeScreenshot: /tmp/my-screenshot # saves as /tmp/my-screenshot.png
108
+ - startRecording: /tmp/recording.mp4 # start screen recording
109
+ - stopRecording # stop screen recording
110
+ ```
111
+
112
+ ### Variables & Conditions
113
+
114
+ ```yaml
115
+ - evalScript: ${MY_VAR = "hello"}
116
+ - runScript:
117
+ file: ./setup.js # run a JS file; output object is merged into flow env
118
+ - runFlow:
119
+ file: ./other-flow.yaml
120
+ env:
121
+ USERNAME: "testuser"
122
+ - runFlow:
123
+ when:
124
+ visible: "Login"
125
+ file: ./login.yaml
126
+ ```
127
+
128
+ ### Repeat & Retry
129
+
130
+ ```yaml
131
+ - repeat:
132
+ times: 3
133
+ commands:
134
+ - tapOn: "Retry"
135
+ - repeat:
136
+ while:
137
+ notVisible: "Done"
138
+ commands:
139
+ - scroll
140
+ - retry:
141
+ maxRetries: 2
142
+ commands:
143
+ - tapOn: "Submit"
144
+ - assertVisible: "Success"
145
+ ```
146
+
147
+ ### Device & Permissions
148
+
149
+ ```yaml
150
+ - setPermissions:
151
+ com.example.myapp:
152
+ notifications: allow
153
+ camera: deny
154
+ all: allow # grant all permissions at once
155
+ - setLocation:
156
+ latitude: 52.3676
157
+ longitude: 4.9041
158
+ - setOrientation: landscape # portrait | landscape
159
+ ```
160
+
161
+ ## Environment Variables
162
+
163
+ Pass values from the environment:
164
+
165
+ ```yaml
166
+ appId: ${APP_ID}
167
+ ---
168
+ - inputText: ${USERNAME}
169
+ ```
170
+
171
+ Run with: `conductor run-flow flow.yaml -e APP_ID=com.example -e USERNAME=test`
172
+
173
+ ## Tips for AI Agents
174
+
175
+ - Use `conductor inspect` to find element text/IDs before tapping
176
+ - Use `assertVisible` to confirm navigation succeeded
177
+ - Use `takeScreenshot` after key actions for verification
178
+ - Use `scrollUntilVisible` to reach off-screen elements
179
+ - IDs are more stable than text labels for long-lived tests