prowl-tools 0.1.7 → 0.1.9

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/README.md CHANGED
@@ -145,23 +145,33 @@ prowl init
145
145
 
146
146
  <!-- ILLUSTRATION: Terminal screenshot showing `prowl init` output with raccoon mascot and file listing -->
147
147
 
148
- This creates a `.prowl/` directory with a config file and two starter hunts:
148
+ This creates a `.prowl/` directory with a config file and four starter hunts:
149
149
 
150
150
  ```text
151
151
  .prowl/
152
- ├── config.yml # Target URL, browser settings, guardrails
153
- ├── .gitignore # Keeps runs/, auth-state.json, and .env out of git
152
+ ├── config.yml # Target URL, browser settings, guardrails
153
+ ├── .gitignore # Keeps runs/, auth-state.json, and .env out of git
154
154
  └── hunts/
155
- ├── hello.yml # Minimal smoke test — verifies the app loads
156
- └── login-flow.yml # Fuller example — auth, secrets, assertions
155
+ ├── hello.yml # Minimal smoke test — verifies the app loads
156
+ ├── login-flow.yml # Auth example — fill credentials, verify redirect
157
+ ├── form.yml # Forms example — fill, select, submit, assert
158
+ └── macos-hello.yml # Desktop starter — drive TextEdit (macOS, experimental)
157
159
  ```
158
160
 
161
+ The web starters (`hello`, `login-flow`, `form`) run against the default web
162
+ target as soon as you point `config.yml` at your app. `macos-hello` is the
163
+ desktop-first first-run hunt: it drives TextEdit through the Accessibility API,
164
+ and its inline comments walk you through switching the target to `macos` and the
165
+ one-time setup (`prowl macdriver install`, Accessibility permission). The macOS
166
+ target is experimental — see [macOS Target](#macos-target-experimental).
167
+
159
168
  `prowl init` finishes by pointing you at the first hunt:
160
169
 
161
170
  ```text
162
171
  Initialized .prowl directory.
163
172
  Run prowl run hello to get started.
164
- See .prowl/hunts/login-flow.yml for a fuller example.
173
+ See .prowl/hunts/login-flow.yml (auth) and .prowl/hunts/form.yml (web forms) for fuller examples.
174
+ Desktop-first? .prowl/hunts/macos-hello.yml is a macOS starter (experimental — see its comments to enable).
165
175
  ```
166
176
 
167
177
  ### 3. Configure
@@ -384,7 +394,20 @@ macOS target (with a clear error), and `prowl login` / URL guardrails do not app
384
394
  | `assert: visible` / `notVisible` | `evalScript`, `runScript` |
385
395
  | `screenshot`, `assertScreenshot` | `onDialog`, `select` / `selectOption` |
386
396
  | `hover`, `scrollTo` | `setInputFiles`, `waitForDownload` |
387
- | `repeat`, `if`, `runHunt`, `copyText` | `scroll` (directional), `assert: urlIncludes` / `urlEquals` |
397
+ | `repeat`, `if`, `runHunt`, `copyText` | `scroll` (directional; see below) / `assert: urlIncludes` / `urlEquals` |
398
+
399
+ **Scroll steps** differ per verb across targets:
400
+
401
+ - **`scrollTo: { selector }`** is portable across **web, macOS, iOS, and Android**. macOS
402
+ resolves the element and calls **AXScrollToVisible**; iOS/Android run a bounded down/up
403
+ swipe probe until the element appears; web scrolls the element into view.
404
+ - **`scroll: { direction, amount? }`** (directional) runs on **web, iOS, and Android** but is
405
+ **rejected on macOS** — the mobile path synthesizes a touch swipe (no macOS accessibility
406
+ equivalent), so on macOS use `scrollTo` to bring a specific element into view instead. On
407
+ the mobile targets the swipe starts from the screen centre (direction semantics match the
408
+ web step; `amount` maps to the swipe distance in device points, defaulting to 75% of the
409
+ relevant screen axis; negative amounts reverse direction, matching the web target). An
410
+ explicit `swipe` step is a deferred follow-up.
388
411
 
389
412
  Notes: `press` accepts the same key vocabulary as the web target — single printable
390
413
  characters, `Enter`/`Return`/`Space`, `Tab`, `Escape`, `Backspace`, `Delete`, `Home`,
@@ -1022,6 +1045,10 @@ prowl login
1022
1045
  prowl init
1023
1046
  prowl init --force # Overwrite existing
1024
1047
 
1048
+ # Doctor — check the environment is ready to run hunts
1049
+ prowl doctor
1050
+ prowl doctor --fix # Install Chromium / scaffold .prowl if missing
1051
+
1025
1052
  # List available hunts
1026
1053
  prowl list
1027
1054
 
@@ -1045,6 +1072,28 @@ prowl mcp --projects ~/.prowl/projects.yml # Drive multiple repos via a regist
1045
1072
  - Must be a positive integer (`>= 1`).
1046
1073
  - Invalid values (for example `0` or `1.5`) fail fast with an argument error.
1047
1074
 
1075
+ ### Environment Check (`prowl doctor`)
1076
+
1077
+ `prowl doctor` verifies your machine is ready to run hunts and prints a
1078
+ color-coded report (green ✓ pass, yellow ⚠ warning, red ✗ failure, gray ○
1079
+ skipped) with a one-line summary. It checks:
1080
+
1081
+ - **Node.js** is version 20 or newer.
1082
+ - **Playwright** is installed, and its **Chromium** browser is available.
1083
+ - A **`.prowl/` directory** exists with a **valid `config.yml`**.
1084
+ - **Target tooling for your configured target only** (desktop-first): the macOS
1085
+ target reuses `prowl macdriver status` to report which helper binary resolved;
1086
+ the iOS target checks that `xcrun simctl` is reachable (macOS only); the
1087
+ Android target checks that `adb` is reachable. Missing native tooling prints
1088
+ the install command — `doctor` never installs system tools for you.
1089
+
1090
+ Warnings do not fail the command; only real failures do (exit code `1`, so it
1091
+ slots into CI). `prowl doctor --fix` performs just the two safe repairs —
1092
+ installing Chromium through Prowl's resolved Playwright dependency and
1093
+ scaffolding a missing `.prowl/` (the same templates `prowl init` writes) — then
1094
+ re-runs the checks and reports the new status. Everything else prints a manual
1095
+ remedy.
1096
+
1048
1097
  ### Run History
1049
1098
 
1050
1099
  Every `prowl run` and `prowl ci` appends an entry to `.prowl/history.json`