agentlane 0.0.0 → 0.4.0-rc.2

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 (146) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/LICENSE +27 -0
  3. package/README.md +167 -2
  4. package/dist/agents/claude-plugin.js +79 -0
  5. package/dist/agents/cli.js +258 -0
  6. package/dist/agents/detect.js +88 -0
  7. package/dist/agents/init.js +251 -0
  8. package/dist/agents/launcher.js +32 -0
  9. package/dist/agents/package.js +119 -0
  10. package/dist/agents/skills.js +59 -0
  11. package/dist/agents/toml.js +325 -0
  12. package/dist/agents/wiring-check.js +117 -0
  13. package/dist/agents/wiring.js +374 -0
  14. package/dist/bench/host.js +104 -0
  15. package/dist/bench/live.js +511 -0
  16. package/dist/bench/mcp-client.js +91 -0
  17. package/dist/bench/model.js +15 -0
  18. package/dist/bench/report.js +162 -0
  19. package/dist/bench/run.js +121 -0
  20. package/dist/bench/schedule.js +140 -0
  21. package/dist/bench/stats.js +59 -0
  22. package/dist/bench-cli.js +167 -0
  23. package/dist/browser/aria.js +184 -0
  24. package/dist/browser/control.js +203 -0
  25. package/dist/browser/env.js +118 -0
  26. package/dist/browser/evidence.js +44 -0
  27. package/dist/browser/install.js +361 -0
  28. package/dist/browser/kinds.js +10 -0
  29. package/dist/browser/lane-browser.js +224 -0
  30. package/dist/browser/libraries.js +56 -0
  31. package/dist/browser/paths.js +29 -0
  32. package/dist/browser/release.js +121 -0
  33. package/dist/browser/screen.js +19 -0
  34. package/dist/browser/signin.js +154 -0
  35. package/dist/browser/stop.js +163 -0
  36. package/dist/browser/tools.js +25 -0
  37. package/dist/cache/build.js +154 -0
  38. package/dist/cache/config.js +186 -0
  39. package/dist/cache/index.js +4 -0
  40. package/dist/cache/key.js +196 -0
  41. package/dist/cache/store.js +303 -0
  42. package/dist/cli.js +178 -0
  43. package/dist/clock.js +4 -0
  44. package/dist/devices/adb.js +160 -0
  45. package/dist/devices/android.js +214 -0
  46. package/dist/devices/backend.js +7 -0
  47. package/dist/devices/bundler.js +46 -0
  48. package/dist/devices/common.js +51 -0
  49. package/dist/devices/controls.js +65 -0
  50. package/dist/devices/dial.js +56 -0
  51. package/dist/devices/emulator.js +396 -0
  52. package/dist/devices/hygiene.js +202 -0
  53. package/dist/devices/index.js +5 -0
  54. package/dist/devices/launch.js +76 -0
  55. package/dist/devices/simctl.js +119 -0
  56. package/dist/devices/tools.js +1 -0
  57. package/dist/devices/variant.js +99 -0
  58. package/dist/devices/xcrun.js +265 -0
  59. package/dist/driver/absence.js +54 -0
  60. package/dist/driver/caller.js +51 -0
  61. package/dist/driver/client.js +312 -0
  62. package/dist/driver/diff.js +180 -0
  63. package/dist/driver/elements.js +70 -0
  64. package/dist/driver/engine-main.js +13 -0
  65. package/dist/driver/engine.js +499 -0
  66. package/dist/driver/errors.js +11 -0
  67. package/dist/driver/exec.js +66 -0
  68. package/dist/driver/failure.js +156 -0
  69. package/dist/driver/flow.js +94 -0
  70. package/dist/driver/idle.js +100 -0
  71. package/dist/driver/images.js +68 -0
  72. package/dist/driver/install.js +272 -0
  73. package/dist/driver/lock.js +101 -0
  74. package/dist/driver/look.js +223 -0
  75. package/dist/driver/maestro-child.js +194 -0
  76. package/dist/driver/maestro-runs.js +46 -0
  77. package/dist/driver/paths.js +105 -0
  78. package/dist/driver/pixels.js +144 -0
  79. package/dist/driver/plan.js +108 -0
  80. package/dist/driver/release.js +7 -0
  81. package/dist/driver/runner.js +42 -0
  82. package/dist/driver/selector.js +91 -0
  83. package/dist/driver/session.js +474 -0
  84. package/dist/driver/suggest.js +86 -0
  85. package/dist/driver/supervisor.js +251 -0
  86. package/dist/driver/tree.js +426 -0
  87. package/dist/driver-cli.js +865 -0
  88. package/dist/evidence/device.js +177 -0
  89. package/dist/evidence/evidence.js +304 -0
  90. package/dist/evidence/files.js +92 -0
  91. package/dist/hooks/env.js +81 -0
  92. package/dist/hooks/run.js +101 -0
  93. package/dist/mcp/server.js +69 -0
  94. package/dist/mcp/tools.js +246 -0
  95. package/dist/name.js +22 -0
  96. package/dist/plugin/aims.js +465 -0
  97. package/dist/plugin/conventions.js +73 -0
  98. package/dist/plugin/guard.js +163 -0
  99. package/dist/plugin/hook-cli.js +216 -0
  100. package/dist/plugin/session-name.js +28 -0
  101. package/dist/plugin/shell.js +254 -0
  102. package/dist/processes.js +77 -0
  103. package/dist/project/config.js +316 -0
  104. package/dist/project/schema.js +335 -0
  105. package/dist/project/validate.js +224 -0
  106. package/dist/registry/config.js +142 -0
  107. package/dist/registry/format.js +22 -0
  108. package/dist/registry/owner.js +265 -0
  109. package/dist/registry/paths.js +50 -0
  110. package/dist/registry/ports.js +26 -0
  111. package/dist/registry/prune.js +160 -0
  112. package/dist/registry/refusal.js +53 -0
  113. package/dist/registry/registry.js +1027 -0
  114. package/dist/registry/resources.js +117 -0
  115. package/dist/registry/rows.js +115 -0
  116. package/dist/registry/status.js +85 -0
  117. package/dist/registry/store.js +274 -0
  118. package/dist/registry/types.js +1 -0
  119. package/dist/registry-cli.js +544 -0
  120. package/dist/services/services.js +268 -0
  121. package/dist/services/system.js +189 -0
  122. package/dist/up/deps.js +1 -0
  123. package/dist/up/doctor.js +424 -0
  124. package/dist/up/exec.js +133 -0
  125. package/dist/up/lane-files.js +75 -0
  126. package/dist/up/lane-services.js +38 -0
  127. package/dist/up/maestro-env.js +172 -0
  128. package/dist/up/preflight.js +232 -0
  129. package/dist/up/release.js +148 -0
  130. package/dist/up/resources.js +178 -0
  131. package/dist/up/restart.js +87 -0
  132. package/dist/up/setup.js +28 -0
  133. package/dist/up/up.js +610 -0
  134. package/dist/up-cli.js +258 -0
  135. package/dist/usage.js +16 -0
  136. package/package.json +58 -3
  137. package/schema/agentlane.schema.json +675 -0
  138. package/skills/create-verification-skill/LICENSE +21 -0
  139. package/skills/create-verification-skill/SKILL.md +88 -0
  140. package/skills/dev-loop/LICENSE +21 -0
  141. package/skills/dev-loop/SKILL.md +61 -0
  142. package/skills/device/SKILL.md +8 -0
  143. package/skills/drive/SKILL.md +64 -0
  144. package/skills/maintain-verification-skill/LICENSE +21 -0
  145. package/skills/maintain-verification-skill/SKILL.md +42 -0
  146. package/skills/setup/SKILL.md +80 -0
@@ -0,0 +1,675 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "agentlane.json",
4
+ "description": "How agentlane runs this project: its mobile app, its web app, or both; the long-running services they need; what each lane gets of its own; and the hooks that set it up, build, launch and sign in. Commands run in the directory holding this file, with AGENTLANE_* variables for the lane (device, ports, worktree), the values of the lane's resources, and LANG and LC_ALL set to a UTF-8 locale: en_US.UTF-8 on macOS, C.UTF-8 on Linux.",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "$schema": {
9
+ "type": "string",
10
+ "description": "The path or URL of this schema, for editors."
11
+ },
12
+ "app": {
13
+ "$ref": "#/$defs/app"
14
+ },
15
+ "web": {
16
+ "$ref": "#/$defs/web"
17
+ },
18
+ "services": {
19
+ "type": "object",
20
+ "description": "The long-running servers the app needs, by name. Each gets a claimed port in AGENTLANE_<NAME>_PORT (the name upper-cased, dashes as underscores).",
21
+ "propertyNames": {
22
+ "pattern": "^[a-z][a-z0-9-]*$"
23
+ },
24
+ "additionalProperties": {
25
+ "$ref": "#/$defs/service"
26
+ }
27
+ },
28
+ "resources": {
29
+ "type": "object",
30
+ "description": "What each lane gets of its own besides ports, such as a database, by name. `up` runs each create once per lane, in this order, after the setup hook and the build preconditions (also under --no-setup). The values a create exports then reach the lane's services, the hooks after setup, and `agentlane exec`, as AGENTLANE_<NAME>_PORT does; a command never takes an exported variable from the caller's environment. When the lane ends (release, the session-end release, or a reap of a lane whose owner died or was taken over), each teardown runs, last created first.",
31
+ "propertyNames": {
32
+ "pattern": "^[a-z][a-z0-9-]*$"
33
+ },
34
+ "additionalProperties": {
35
+ "$ref": "#/$defs/resource"
36
+ }
37
+ },
38
+ "hooks": {
39
+ "$ref": "#/$defs/hooks"
40
+ },
41
+ "preconditions": {
42
+ "type": "array",
43
+ "description": "Checks `up` runs before any slow step. A failing check refuses with its fix.",
44
+ "items": {
45
+ "$ref": "#/$defs/precondition"
46
+ }
47
+ },
48
+ "hygiene": {
49
+ "$ref": "#/$defs/hygiene"
50
+ },
51
+ "buildCache": {
52
+ "$id": "buildCache",
53
+ "type": "object",
54
+ "description": "Lets the toolkit skip the native build when its inputs have not changed. The key also covers the platform, the build variant, the toolchain and the contents of the env file the build uses. The toolchain is the Xcode version for iOS. For Android it is the version of the JDK at AGENTLANE_JAVA_HOME or JAVA_HOME (else the JDK 17 the toolkit finds), which the build hook gets as JAVA_HOME, the Gradle distribution in android/gradle/wrapper/gradle-wrapper.properties when that file is not git-ignored (a generated wrapper follows the inputs that generate it, such as the lockfile), and the revision of every installed Android SDK build-tools, platform, NDK and CMake package.",
55
+ "additionalProperties": false,
56
+ "required": [
57
+ "inputs",
58
+ "cacheableVariants"
59
+ ],
60
+ "properties": {
61
+ "inputs": {
62
+ "type": "array",
63
+ "minItems": 1,
64
+ "items": {
65
+ "oneOf": [
66
+ {
67
+ "type": "object",
68
+ "additionalProperties": false,
69
+ "required": [
70
+ "kind",
71
+ "paths"
72
+ ],
73
+ "properties": {
74
+ "kind": {
75
+ "const": "files"
76
+ },
77
+ "paths": {
78
+ "type": "array",
79
+ "minItems": 1,
80
+ "items": {
81
+ "type": "string",
82
+ "minLength": 1
83
+ },
84
+ "description": "Files, directories or globs (`*`, `**`), relative to the directory holding the config file. Matched as git glob pathspecs over tracked files and untracked files git does not ignore; each enters the key by path, mode and content."
85
+ },
86
+ "exclude": {
87
+ "type": "array",
88
+ "items": {
89
+ "type": "string",
90
+ "minLength": 1
91
+ },
92
+ "description": "Files, directories or globs to leave out of `paths`."
93
+ },
94
+ "platforms": {
95
+ "type": "array",
96
+ "minItems": 1,
97
+ "uniqueItems": true,
98
+ "items": {
99
+ "enum": [
100
+ "ios",
101
+ "android"
102
+ ]
103
+ },
104
+ "description": "The platforms whose key includes this input. Leave it out to include it for every platform."
105
+ }
106
+ }
107
+ },
108
+ {
109
+ "type": "object",
110
+ "additionalProperties": false,
111
+ "required": [
112
+ "kind",
113
+ "run"
114
+ ],
115
+ "properties": {
116
+ "kind": {
117
+ "const": "command"
118
+ },
119
+ "run": {
120
+ "type": "string",
121
+ "minLength": 1,
122
+ "description": "A shell command run with `sh -c` in the config file's directory, with the lane's environment. Its stdout enters the key; a non-zero exit means no key, so the build runs uncached."
123
+ },
124
+ "platforms": {
125
+ "type": "array",
126
+ "minItems": 1,
127
+ "uniqueItems": true,
128
+ "items": {
129
+ "enum": [
130
+ "ios",
131
+ "android"
132
+ ]
133
+ },
134
+ "description": "The platforms whose key includes this input. Leave it out to include it for every platform."
135
+ }
136
+ }
137
+ }
138
+ ]
139
+ }
140
+ },
141
+ "cacheableVariants": {
142
+ "type": "array",
143
+ "items": {
144
+ "type": "string",
145
+ "minLength": 1
146
+ },
147
+ "description": "The build variants whose output may be stored and served. Leave out any variant that embeds its JS bundle, such as a Release build."
148
+ },
149
+ "envFile": {
150
+ "type": "string",
151
+ "minLength": 1,
152
+ "description": "An env file the build bakes in, relative to the config file's directory. Its contents enter the key; a missing file counts as absent. Use this for files git ignores, which a files input never sees."
153
+ },
154
+ "maxAgeDays": {
155
+ "type": "number",
156
+ "exclusiveMinimum": 0,
157
+ "default": 14,
158
+ "description": "An entry unused for longer than this is pruned."
159
+ },
160
+ "maxEntries": {
161
+ "type": "integer",
162
+ "minimum": 1,
163
+ "default": 6,
164
+ "description": "Only the most recently used entries up to this count are kept."
165
+ }
166
+ }
167
+ },
168
+ "driver": {
169
+ "$ref": "#/$defs/driver"
170
+ }
171
+ },
172
+ "$defs": {
173
+ "app": {
174
+ "type": "object",
175
+ "additionalProperties": false,
176
+ "description": "The mobile app: what `up` builds, installs and launches on the claimed simulator or emulator.",
177
+ "required": [
178
+ "platform",
179
+ "bundleId",
180
+ "launch"
181
+ ],
182
+ "properties": {
183
+ "platform": {
184
+ "enum": [
185
+ "ios",
186
+ "android"
187
+ ],
188
+ "description": "The platform `up` claims a device for, unless `up --platform` names another."
189
+ },
190
+ "bundleId": {
191
+ "type": "string",
192
+ "pattern": "^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)+$",
193
+ "description": "The bundle id or package name."
194
+ },
195
+ "scheme": {
196
+ "type": "string",
197
+ "pattern": "^[A-Za-z][A-Za-z0-9+.-]*$",
198
+ "description": "A URL scheme the app handles. It is approved on the simulator before it boots, so opening a link never stops at \"Open in ...?\"."
199
+ },
200
+ "launch": {
201
+ "enum": [
202
+ "dev-client",
203
+ "bundler-pin",
204
+ "hook"
205
+ ],
206
+ "description": "How the app is launched. dev-client: an Expo dev client opened on the bundler with --initialUrl. bundler-pin: a React Native app whose bundler location is written to its defaults and read back, then launched. hook: the project's launch hook."
207
+ },
208
+ "bundler": {
209
+ "type": "string",
210
+ "pattern": "^[a-z][a-z0-9-]*$",
211
+ "description": "The service the app loads its JavaScript from. Default: the only service of type metro."
212
+ },
213
+ "variant": {
214
+ "type": "string",
215
+ "minLength": 1,
216
+ "default": "Debug",
217
+ "description": "The build variant, given to hooks as AGENTLANE_VARIANT and used by the build cache."
218
+ },
219
+ "output": {
220
+ "type": "string",
221
+ "minLength": 1,
222
+ "description": "The app the build hook produces (an .app or .apk), relative to this file. The toolkit installs it. Leave it out when the build hook installs the app itself; the installed app is then read back for the cache."
223
+ },
224
+ "device": {
225
+ "type": "object",
226
+ "additionalProperties": false,
227
+ "properties": {
228
+ "type": {
229
+ "type": "string",
230
+ "minLength": 1,
231
+ "description": "A simulator device type, or an Android device profile such as pixel_8. Default: the newest iPhone the runtime supports, or pixel_8."
232
+ },
233
+ "runtime": {
234
+ "type": "string",
235
+ "minLength": 1,
236
+ "description": "A simulator runtime, or an Android system image (a package id or an API level). Default: the newest installed iOS runtime, or the newest Google APIs image."
237
+ },
238
+ "strict": {
239
+ "type": "boolean",
240
+ "default": false,
241
+ "description": "Take only a device of exactly this type and runtime. Without it, when the shared pool is full, a lane takes a free device of another type rather than deleting one to make this type."
242
+ }
243
+ }
244
+ },
245
+ "ios": {
246
+ "type": "object",
247
+ "additionalProperties": false,
248
+ "description": "What differs on iOS: these replace app.bundleId, app.output and app.device when `up` runs for iOS.",
249
+ "properties": {
250
+ "bundleId": {
251
+ "type": "string",
252
+ "pattern": "^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)+$",
253
+ "description": "The bundle id or package name."
254
+ },
255
+ "output": {
256
+ "type": "string",
257
+ "minLength": 1,
258
+ "description": "The app the build hook produces (an .app or .apk), relative to this file. The toolkit installs it. Leave it out when the build hook installs the app itself; the installed app is then read back for the cache."
259
+ },
260
+ "device": {
261
+ "type": "object",
262
+ "additionalProperties": false,
263
+ "properties": {
264
+ "type": {
265
+ "type": "string",
266
+ "minLength": 1,
267
+ "description": "A simulator device type, or an Android device profile such as pixel_8. Default: the newest iPhone the runtime supports, or pixel_8."
268
+ },
269
+ "runtime": {
270
+ "type": "string",
271
+ "minLength": 1,
272
+ "description": "A simulator runtime, or an Android system image (a package id or an API level). Default: the newest installed iOS runtime, or the newest Google APIs image."
273
+ },
274
+ "strict": {
275
+ "type": "boolean",
276
+ "default": false,
277
+ "description": "Take only a device of exactly this type and runtime. Without it, when the shared pool is full, a lane takes a free device of another type rather than deleting one to make this type."
278
+ }
279
+ }
280
+ }
281
+ }
282
+ },
283
+ "android": {
284
+ "type": "object",
285
+ "additionalProperties": false,
286
+ "description": "What differs on Android: these replace app.bundleId, app.output and app.device when `up` runs for Android.",
287
+ "properties": {
288
+ "bundleId": {
289
+ "type": "string",
290
+ "pattern": "^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)+$",
291
+ "description": "The bundle id or package name."
292
+ },
293
+ "output": {
294
+ "type": "string",
295
+ "minLength": 1,
296
+ "description": "The app the build hook produces (an .app or .apk), relative to this file. The toolkit installs it. Leave it out when the build hook installs the app itself; the installed app is then read back for the cache."
297
+ },
298
+ "device": {
299
+ "type": "object",
300
+ "additionalProperties": false,
301
+ "properties": {
302
+ "type": {
303
+ "type": "string",
304
+ "minLength": 1,
305
+ "description": "A simulator device type, or an Android device profile such as pixel_8. Default: the newest iPhone the runtime supports, or pixel_8."
306
+ },
307
+ "runtime": {
308
+ "type": "string",
309
+ "minLength": 1,
310
+ "description": "A simulator runtime, or an Android system image (a package id or an API level). Default: the newest installed iOS runtime, or the newest Google APIs image."
311
+ },
312
+ "strict": {
313
+ "type": "boolean",
314
+ "default": false,
315
+ "description": "Take only a device of exactly this type and runtime. Without it, when the shared pool is full, a lane takes a free device of another type rather than deleting one to make this type."
316
+ }
317
+ }
318
+ }
319
+ }
320
+ }
321
+ }
322
+ },
323
+ "web": {
324
+ "type": "object",
325
+ "additionalProperties": false,
326
+ "description": "The web app: the service that serves it and the page to open. `up --platform web` (the default when there is no app) claims ports and no device, starts the services, and ends on doctor with the app's URL, also given to commands as AGENTLANE_WEB_URL.",
327
+ "properties": {
328
+ "service": {
329
+ "type": "string",
330
+ "pattern": "^[a-z][a-z0-9-]*$",
331
+ "description": "The service that serves the web app. Default: the only service of type web."
332
+ },
333
+ "path": {
334
+ "type": "string",
335
+ "pattern": "^/",
336
+ "default": "/",
337
+ "description": "The page to open, on the service's port."
338
+ },
339
+ "browser": {
340
+ "$ref": "#/$defs/browser"
341
+ }
342
+ }
343
+ },
344
+ "browser": {
345
+ "type": "object",
346
+ "additionalProperties": false,
347
+ "description": "The lane's own browser, which `up` opens on the web app. Each lane gets its own profile folder, debugging port and driver session, released with the lane. The toolkit installs the driver and its browser at pinned versions in its own data folder (`agentlane browser install`). Drive it with the driver's own CLI under `agentlane exec`, which sets the driver's session, the web app's URL and the lane's saved login. The signin hook writes that saved login, in Playwright's storage-state format, to the file named by $AGENTLANE_STORAGE_STATE, and the browser starts with it.",
348
+ "properties": {
349
+ "driver": {
350
+ "enum": [
351
+ "playwright",
352
+ "agent-browser"
353
+ ],
354
+ "default": "playwright",
355
+ "description": "playwright: Playwright's own CLI, playwright-cli, and Playwright tests run with `exec -- npx playwright test`. agent-browser: Vercel's agent-browser CLI, headless. Both drive the toolkit's pinned Chrome for Testing."
356
+ },
357
+ "headed": {
358
+ "type": "boolean",
359
+ "default": false,
360
+ "description": "Show the browser window, so a person can watch it. Default: headless. Playwright only: agent-browser runs headless, on the headless shell of Chrome for Testing."
361
+ }
362
+ }
363
+ },
364
+ "resource": {
365
+ "type": "object",
366
+ "additionalProperties": false,
367
+ "required": [
368
+ "create",
369
+ "teardown"
370
+ ],
371
+ "properties": {
372
+ "create": {
373
+ "type": "string",
374
+ "minLength": 1,
375
+ "description": "A shell command that makes the resource for this lane. It writes each value it exports as a NAME=value line (quotes around the value are removed) to the file named by $AGENTLANE_EXPORTS. Its output goes to its log, and a failing create stops `up` with it. It runs again at the next `up` when it failed or never finished, so it must cope with what a partial run left."
376
+ },
377
+ "exports": {
378
+ "type": "array",
379
+ "items": {
380
+ "type": "string",
381
+ "pattern": "^[A-Za-z_][A-Za-z0-9_]*$"
382
+ },
383
+ "uniqueItems": true,
384
+ "description": "The variables create writes, such as DATABASE_URL. Create must write each of them and no other. Names starting with AGENTLANE_, and LANG and LC_ALL, are the toolkit's."
385
+ },
386
+ "teardown": {
387
+ "type": "string",
388
+ "minLength": 1,
389
+ "description": "A shell command that removes the resource when the lane ends. What it runs is recorded when create starts: this command, its folder and its variables (the lane's, plus the values create exported), so it runs even after this file changes and after the session that made the lane died. When the folder is gone (the worktree was deleted), it runs in the lane's log folder. A failed teardown is kept and tried again at the next release or reap, so it must cope with a resource that is already gone."
390
+ },
391
+ "cwd": {
392
+ "type": "string",
393
+ "minLength": 1,
394
+ "description": "The directory create and teardown run in, relative to this file."
395
+ },
396
+ "teardownTimeoutSeconds": {
397
+ "type": "number",
398
+ "exclusiveMinimum": 0,
399
+ "default": 120,
400
+ "description": "How long teardown may run before it is stopped and counted as failed."
401
+ }
402
+ }
403
+ },
404
+ "service": {
405
+ "type": "object",
406
+ "additionalProperties": false,
407
+ "required": [
408
+ "type",
409
+ "start",
410
+ "ready"
411
+ ],
412
+ "properties": {
413
+ "type": {
414
+ "type": "string",
415
+ "pattern": "^[a-z][a-z0-9-]*$",
416
+ "description": "The port block the service's port comes from: metro, api, web, or a name of your own with `ports`."
417
+ },
418
+ "ports": {
419
+ "type": "array",
420
+ "prefixItems": [
421
+ {
422
+ "type": "integer",
423
+ "minimum": 1024,
424
+ "maximum": 65535
425
+ },
426
+ {
427
+ "type": "integer",
428
+ "minimum": 1024,
429
+ "maximum": 65535
430
+ }
431
+ ],
432
+ "items": false,
433
+ "minItems": 2,
434
+ "description": "[first, last]: the port block for a type of your own. The Mac's own blocks (metro, api, web, and any in its registry config) take precedence."
435
+ },
436
+ "start": {
437
+ "type": "string",
438
+ "minLength": 1,
439
+ "description": "The command that runs the server in the foreground on $AGENTLANE_<NAME>_PORT. It is started in its own process group and logged to a file per lane."
440
+ },
441
+ "cwd": {
442
+ "type": "string",
443
+ "minLength": 1,
444
+ "description": "The directory to start it in, relative to this file."
445
+ },
446
+ "platforms": {
447
+ "type": "array",
448
+ "items": {
449
+ "enum": [
450
+ "ios",
451
+ "android",
452
+ "web"
453
+ ]
454
+ },
455
+ "minItems": 1,
456
+ "uniqueItems": true,
457
+ "description": "The platforms that need it, such as [\"ios\", \"android\"] for a bundler the web app does not use. `up`, `doctor` and `restart` for another platform leave it out. Leave it out to run it for every platform."
458
+ },
459
+ "ready": {
460
+ "oneOf": [
461
+ {
462
+ "$ref": "#/$defs/httpReady"
463
+ },
464
+ {
465
+ "$ref": "#/$defs/tcpReady"
466
+ }
467
+ ]
468
+ },
469
+ "timeoutSeconds": {
470
+ "type": "number",
471
+ "exclusiveMinimum": 0,
472
+ "default": 60,
473
+ "description": "How long to wait for the readiness check."
474
+ },
475
+ "dial": {
476
+ "type": "object",
477
+ "additionalProperties": false,
478
+ "required": [
479
+ "argument"
480
+ ],
481
+ "description": "The app dials this service: launch it with this argument, so it talks to this lane's server.",
482
+ "properties": {
483
+ "argument": {
484
+ "type": "string",
485
+ "pattern": "^-[A-Za-z0-9_.-]+$",
486
+ "description": "The launch argument, such as -apiBaseUrl."
487
+ },
488
+ "value": {
489
+ "type": "string",
490
+ "pattern": "\\{port\\}",
491
+ "default": "http://localhost:{port}",
492
+ "description": "The argument's value; {port} is the service's port."
493
+ }
494
+ }
495
+ }
496
+ }
497
+ },
498
+ "httpReady": {
499
+ "type": "object",
500
+ "additionalProperties": false,
501
+ "required": [
502
+ "kind",
503
+ "path"
504
+ ],
505
+ "properties": {
506
+ "kind": {
507
+ "const": "http"
508
+ },
509
+ "path": {
510
+ "type": "string",
511
+ "pattern": "^/",
512
+ "description": "The path to GET."
513
+ },
514
+ "status": {
515
+ "type": "integer",
516
+ "minimum": 100,
517
+ "maximum": 599,
518
+ "default": 200,
519
+ "description": "The status that means ready."
520
+ },
521
+ "body": {
522
+ "type": "string",
523
+ "minLength": 1,
524
+ "description": "Text the response body must contain."
525
+ },
526
+ "host": {
527
+ "type": "string",
528
+ "minLength": 1,
529
+ "default": "127.0.0.1",
530
+ "description": "The host the readiness check connects to."
531
+ }
532
+ }
533
+ },
534
+ "tcpReady": {
535
+ "type": "object",
536
+ "additionalProperties": false,
537
+ "required": [
538
+ "kind"
539
+ ],
540
+ "properties": {
541
+ "kind": {
542
+ "const": "tcp"
543
+ },
544
+ "host": {
545
+ "type": "string",
546
+ "minLength": 1,
547
+ "default": "127.0.0.1",
548
+ "description": "The host the readiness check connects to."
549
+ }
550
+ }
551
+ },
552
+ "hooks": {
553
+ "type": "object",
554
+ "additionalProperties": false,
555
+ "properties": {
556
+ "setup": {
557
+ "type": "string",
558
+ "minLength": 1,
559
+ "description": "A shell command run with `sh -c` first, to install dependencies."
560
+ },
561
+ "build": {
562
+ "type": "string",
563
+ "minLength": 1,
564
+ "description": "A shell command run with `sh -c` to build the app for the claimed device."
565
+ },
566
+ "launch": {
567
+ "type": "string",
568
+ "minLength": 1,
569
+ "description": "A shell command run with `sh -c` to launch the app when app.launch is \"hook\"; AGENTLANE_LAUNCH_ARGS holds the dial arguments."
570
+ },
571
+ "signin": {
572
+ "type": "string",
573
+ "minLength": 1,
574
+ "description": "A shell command run with `sh -c` after launch, to sign in; for the web app it writes the lane's saved login, in Playwright's storage-state format, to $AGENTLANE_STORAGE_STATE."
575
+ },
576
+ "teardown": {
577
+ "type": "string",
578
+ "minLength": 1,
579
+ "description": "A shell command run with `sh -c` by `agentlane release`, after the services stop and before the resources' teardowns."
580
+ }
581
+ }
582
+ },
583
+ "precondition": {
584
+ "type": "object",
585
+ "additionalProperties": false,
586
+ "required": [
587
+ "name",
588
+ "run",
589
+ "fix"
590
+ ],
591
+ "properties": {
592
+ "name": {
593
+ "type": "string",
594
+ "minLength": 1,
595
+ "description": "What is checked, as a short phrase."
596
+ },
597
+ "run": {
598
+ "type": "string",
599
+ "minLength": 1,
600
+ "description": "A shell command that exits 0 when the precondition holds."
601
+ },
602
+ "fix": {
603
+ "type": "string",
604
+ "minLength": 1,
605
+ "description": "What to do when it fails."
606
+ },
607
+ "before": {
608
+ "enum": [
609
+ "claim",
610
+ "build"
611
+ ],
612
+ "default": "claim",
613
+ "description": "claim: checked before anything is claimed. build: checked after the setup hook, before the build."
614
+ },
615
+ "platforms": {
616
+ "type": "array",
617
+ "items": {
618
+ "enum": [
619
+ "ios",
620
+ "android",
621
+ "web"
622
+ ]
623
+ },
624
+ "minItems": 1,
625
+ "uniqueItems": true,
626
+ "description": "The platforms it applies to. Leave it out to check it for every platform."
627
+ }
628
+ }
629
+ },
630
+ "hygiene": {
631
+ "type": "object",
632
+ "additionalProperties": false,
633
+ "properties": {
634
+ "location": {
635
+ "type": "object",
636
+ "additionalProperties": false,
637
+ "required": [
638
+ "latitude",
639
+ "longitude"
640
+ ],
641
+ "properties": {
642
+ "latitude": {
643
+ "type": "number",
644
+ "minimum": -90,
645
+ "maximum": 90
646
+ },
647
+ "longitude": {
648
+ "type": "number",
649
+ "minimum": -180,
650
+ "maximum": 180
651
+ }
652
+ }
653
+ },
654
+ "appearance": {
655
+ "enum": [
656
+ "light",
657
+ "dark"
658
+ ]
659
+ }
660
+ }
661
+ },
662
+ "driver": {
663
+ "type": "object",
664
+ "additionalProperties": false,
665
+ "description": "The project drives its app with the toolkit (Maestro flows); `up` and `doctor` then check for Java 17.",
666
+ "properties": {
667
+ "flows": {
668
+ "type": "string",
669
+ "minLength": 1,
670
+ "description": "The folder of committed flows, relative to this file."
671
+ }
672
+ }
673
+ }
674
+ }
675
+ }