@aarwitz/tapp 0.17.27 → 0.18.1

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.
@@ -1,21 +1,25 @@
1
1
  # Tapp command reference
2
2
 
3
+ Twelve verbs, one mental model: **explore → look → run/validate → plan → ci**. Older verbs
4
+ (`audit`, `focus`, `open`, `tree`, `shot`, `flow`, `task`, `contract`, `scenario`, `pr`, `map`,
5
+ `baseline`, `workflows`, `actor`, `install`, `build`, `apps`) still work for one minor version
6
+ and print their new form.
7
+
3
8
  ## Plain CLI
4
9
 
5
10
  Run from the application repository. `[target]` is optional when Tapp can read the repository model
6
11
  or detect one unambiguous target.
7
12
 
8
13
  ```bash
9
- npx -y @aarwitz/tapp@latest init . --explore
10
- npx -y @aarwitz/tapp@latest explore [target]
11
- npx -y @aarwitz/tapp@latest focus "Save storefront settings visible above keyboard" [target]
12
- npx -y @aarwitz/tapp@latest open [target]
13
- npx -y @aarwitz/tapp@latest tree [target] --json
14
- npx -y @aarwitz/tapp@latest audit https://example.com --pages 5 --json # read-only: never clicks; safe on production or third-party sites
14
+ npx -y @aarwitz/tapp@latest init . --explore # detect targets, write the model + plan, explore once
15
+ npx -y @aarwitz/tapp@latest explore [target] # autonomous exploration → findings, map, evidence (observes; no verdict)
16
+ npx -y @aarwitz/tapp@latest explore --goal "Save storefront settings visible above keyboard" [target] # source-locate + shortest observed route
17
+ npx -y @aarwitz/tapp@latest explore --read-only https://example.com --pages 5 --json # never clicks: safe on production or a site you do not own
15
18
  # several URLs or --urls FILE batch sites · --device "iPhone 13" audits the mobile rendering · --json FILE writes the result · exit 1 = defects found
16
- npx -y @aarwitz/tapp@latest shot
19
+ npx -y @aarwitz/tapp@latest look [target] # one screen: summary + screenshot file
20
+ npx -y @aarwitz/tapp@latest look [target] --tree --json # + the accessibility tree (every element with --json)
17
21
  npx -y @aarwitz/tapp@latest report latest
18
- npx -y @aarwitz/tapp@latest doctor
22
+ npx -y @aarwitz/tapp@latest doctor # toolchain check · --install prebuilds the iOS harness (~2 min, once)
19
23
  npx -y @aarwitz/tapp@latest feedback "short title" --body "what happened" --type bug|idea|question # draft; add --submit to file (public)
20
24
  ```
21
25
 
@@ -26,12 +30,12 @@ Platform examples:
26
30
  npx -y @aarwitz/tapp@latest explore --platform web --target website --watch
27
31
  npx -y @aarwitz/tapp@latest explore https://staging.example.com
28
32
 
29
- # iOS: source repo, .app, or bundle id.
33
+ # iOS: source repo, .app, or bundle id. `look` with no target reads the booted simulator.
30
34
  npx -y @aarwitz/tapp@latest explore MyApp.xcodeproj --platform ios
31
- npx -y @aarwitz/tapp@latest open com.example.MyApp --platform ios
35
+ npx -y @aarwitz/tapp@latest look com.example.MyApp --platform ios
32
36
 
33
- # Android source: select a modeled target; Tapp builds, installs, and focuses it.
34
- npx -y @aarwitz/tapp@latest focus "About screen" . --target demoapp
37
+ # Android source: select a modeled target; Tapp builds, installs, and reaches the goal.
38
+ npx -y @aarwitz/tapp@latest explore --goal "About screen" . --target demoapp
35
39
 
36
40
  # Android black-box entry: app id is required; APK is optional if already installed.
37
41
  npx -y @aarwitz/tapp@latest explore app-debug.apk --platform android --app-id com.example.app
@@ -40,45 +44,57 @@ npx -y @aarwitz/tapp@latest explore app-debug.apk --platform android --app-id co
40
44
  Focused web evidence can perform one semantic interaction and wait for async content:
41
45
 
42
46
  ```bash
43
- npx -y @aarwitz/tapp@latest open https://example.com --tap "Not now" --wait-for "Dashboard"
47
+ npx -y @aarwitz/tapp@latest look https://example.com --tap "Not now" --wait-for "Dashboard"
44
48
  ```
45
49
 
46
- ## MCP mapping
50
+ ## MCP tools (13)
47
51
 
48
52
  - `tapp_init`: inspect or initialize a source repository; `operation:"explore"` prepares and explores.
49
- - `tapp_build`: build and install an iOS app without needing its bundle id first.
50
- - `tapp_open_app`: launch and return a screen summary plus inline screenshot.
51
- - `tapp_focus`: source-locate a named screen/control and execute the shortest observed route in the active session.
52
- - `tapp_ui_tree` / `tapp_screenshot`: inspect the current real surface.
53
- - `tapp_session_start` → `tapp_session_act` → `tapp_session_end`: drive one persistent journey.
54
- Sessions begin from a **cold** launch: persisted data survives, but an app that gates each cold
55
- start behind sign-in shows its login wall first — make `{action:"login"}` the first act (plain
56
- `tapp_ui_tree`/`tapp_screenshot` warm-resume the foregrounded app, so they can look signed-in
57
- when a fresh session does not). A `tree` act accepts `full:true` for the complete raw element
58
- list when the default ≤160-element projection might omit the text you are checking for.
59
- - `tapp_explore`: autonomous iOS, Android, or web exploration; observation only.
60
- - `tapp_flow_save` / `tapp_flow_run`: save a driven journey and replay it deterministically.
61
- - `tapp_release_contract`: validate, compile, or run a reviewed business guarantee.
62
- - `tapp_ci_setup`: create a target-scoped baseline or reviewable CI installation.
63
-
64
- An iOS no-bundle-id MCP path is `tapp_build {projectDir:"."}` followed by `tapp_explore` with the
65
- returned `bundleId`. Android uses `androidAppId` and optional `apkPath`. Web can use an explicit
66
- owned `url`, or `tapp_session_start {projectDir:".", focus:"..."}` can build/start one unambiguous
67
- owned browser target and stop it with `tapp_session_end`.
53
+ - `tapp_explore`: autonomous iOS, Android, or web exploration; observation only. `readOnly:true`
54
+ never clicks (production or a site you do not own); `goal:"…"` source-locates a named
55
+ screen/control and takes the shortest observed route in the active session.
56
+ - `tapp_look`: the current real surface — screen summary plus inline screenshot; `tree:true` adds
57
+ the accessibility tree (`full:true` for the complete raw element list when the default
58
+ ≤160-element projection might omit the text you are checking for).
59
+ - `tapp_session`: one persistent journey. `action:"start"` → `tap|type|swipe|back|wait|tree|login`
60
+ → `action:"end"`. `action:"save_flow"` keeps the driven journey as a Flow; `action:"draft_flow"`
61
+ proposes one from a goal (an untrusted draft until replayed). Sessions begin from a **cold**
62
+ launch: persisted data survives, but an app that gates each cold start behind sign-in shows its
63
+ login wall first — make `login` the first act (`tapp_look` warm-resumes the foregrounded app,
64
+ so it can look signed-in when a fresh session does not).
65
+ - `tapp_run`: replay a committed Flow, Task, contract, or Scenario; the kind comes from the file.
66
+ Keyless and deterministic.
67
+ - `tapp_validate`: check a Flow/Task/contract/Scenario without launching (`compile:true` shows the
68
+ executor form).
69
+ - `tapp_plan`: the release-plan lifecycle via `action`: `show|review|generate|validate|promote|pr|adopt|actor`.
70
+ `actor` stores roles and environment-variable **names**, never values.
71
+ - `tapp_map`: build, inspect, merge, and diff the persistent UI Map.
72
+ - `tapp_ci`: create a target-scoped baseline or render/install the reviewable CI workflow. The gate
73
+ itself runs from the CLI (`tapp ci`).
74
+ - `tapp_build`: `action:"build|install|list_simulators|boot"` — build and install an iOS app without
75
+ knowing its bundle id first, or manage the simulator.
76
+ - `tapp_report`: this project's captures and one capture's summary/evidence paths.
77
+ - `tapp_doctor`: toolchain and prerequisite check with exact remediation.
78
+ - `tapp_feedback`: draft (or, with the user's OK, submit) an issue about Tapp itself.
79
+
80
+ An iOS no-bundle-id MCP path is `tapp_build {action:"build", projectDir:"."}` followed by
81
+ `tapp_explore` with the returned `bundleId`. Android uses `androidAppId` and optional `apkPath`.
82
+ Web can use an explicit owned `url`, or `tapp_session {action:"start", projectDir:".", focus:"..."}`
83
+ can build/start one unambiguous owned browser target and stop it with `action:"end"`.
68
84
 
69
85
  ## Interactive session loop
70
86
 
71
87
  ```text
72
- tapp_session_start {appBundleId:"com.example.app", focus:"Save storefront settings visible above keyboard", projectDir:"."}
73
- tapp_focus {query:"Save storefront settings visible above keyboard"}
74
- tapp_session_act {action:"tap", id:"Email"}
75
- tapp_session_act {action:"type", text:"qa@example.com"}
76
- tapp_session_act {action:"tap", id:"Password"}
77
- tapp_session_act {action:"type", text:"..."}
78
- tapp_session_act {action:"tap", id:"Sign In"}
79
- tapp_session_act {action:"wait", text:"Home", timeoutMs:10000}
80
- tapp_screenshot
81
- tapp_session_end
88
+ tapp_session {action:"start", appBundleId:"com.example.app", focus:"Save storefront settings visible above keyboard", projectDir:"."}
89
+ tapp_explore {goal:"Save storefront settings visible above keyboard"}
90
+ tapp_session {action:"tap", id:"Email"}
91
+ tapp_session {action:"type", text:"qa@example.com"}
92
+ tapp_session {action:"tap", id:"Password"}
93
+ tapp_session {action:"type", text:"..."}
94
+ tapp_session {action:"tap", id:"Sign In"}
95
+ tapp_session {action:"wait", text:"Home", timeoutMs:10000}
96
+ tapp_look
97
+ tapp_session {action:"end"}
82
98
  ```
83
99
 
84
100
  Android sessions use `androidAppId`, optional `apkPath`, and the same action loop.
@@ -90,10 +106,10 @@ For autonomous exploration, pass test-only values when authorized:
90
106
  - CLI: `--email`, `--password`, repeated `--launch-arg`, and JSON `--launch-env`.
91
107
  - MCP: `testEmail`, `testPassword`, `inputOverrides`, `appLaunchArgs`, `appLaunchEnv`, or explicit
92
108
  `loginSteps`.
93
- - Reusable: `tapp actor set NAME --email-env ENV --password-env ENV` stores env-var **names**
94
- (never values); Flow replay resolves them via `tapp flow run FILE --actor NAME` or
95
- `tapp_flow_run {actor:"NAME"}`. Re-running `actor set` on an existing actor requires
96
- `--replace` — idempotent setup scripts must include it.
109
+ - Reusable: `tapp plan actor set NAME --email-env ENV --password-env ENV` stores env-var **names**
110
+ (never values); replay resolves them via `tapp run FILE --actor NAME` or
111
+ `tapp_run {actor:"NAME"}`. Re-running `actor set` on an existing actor requires `--replace` —
112
+ idempotent setup scripts must include it.
97
113
 
98
114
  Do not persist secrets in `.tapp/`. If the result reports input fields and no values were supplied,
99
115
  ask the user rather than pretending the explored surface was complete.
@@ -103,18 +119,18 @@ ask the user rather than pretending the explored surface was complete.
103
119
  Flow YAML belongs under `.tapp/flows/` and can replay without a model or API key:
104
120
 
105
121
  ```bash
106
- npx -y @aarwitz/tapp@latest flow steps # vocabulary: assert_screen = screen TITLE, assert_exists = text present; taps are label-only
107
- npx -y @aarwitz/tapp@latest flow validate .tapp/flows/smoke.yml
108
- npx -y @aarwitz/tapp@latest flow run .tapp/flows/smoke.yml
109
- npx -y @aarwitz/tapp@latest ci
122
+ npx -y @aarwitz/tapp@latest validate --example # a complete starter Flow (step vocabulary: assert_screen = screen TITLE, assert_exists = text present; taps are label-only)
123
+ npx -y @aarwitz/tapp@latest validate .tapp/flows/smoke.yml
124
+ npx -y @aarwitz/tapp@latest run .tapp/flows/smoke.yml
125
+ npx -y @aarwitz/tapp@latest ci # the gate · ci install writes the workflow · ci baseline saves a target-scoped baseline
110
126
  ```
111
127
 
112
- Web commands (`open`, `tree`, `explore`, `flow run`) accept `--device "iPhone 13"` (any
113
- Playwright device profile) or `--viewport 390x844` to render at mobile sizes, and `open`
114
- accepts `--full-page` for a full-height screenshot — use these for "does it look right on a
115
- phone" checks. Web explores also audit outbound links (DNS, HTTP status, unavailable-shell
116
- heuristic) and `mailto:` domains, report an honest `stopReason` (`no-unexplored-in-scope-controls`
117
- when a small surface is swept before the budget), and return a per-action `trace` in `--json`.
128
+ Web commands (`look`, `explore`, `run`) accept `--device "iPhone 13"` (any Playwright device
129
+ profile) or `--viewport 390x844` to render at mobile sizes, and `look` accepts `--full-page` for a
130
+ full-height screenshot — use these for "does it look right on a phone" checks. Web explores also
131
+ audit outbound links (DNS, HTTP status, unavailable-shell heuristic) and `mailto:` domains, report an
132
+ honest `stopReason` (`no-unexplored-in-scope-controls` when a small surface is swept before the
133
+ budget), and return a per-action `trace` in `--json`.
118
134
 
119
135
  `tapp explore` observes. `tapp ci` applies versioned deterministic policy to evidence, selected
120
136
  Flows/Scenarios/contracts, coverage, and any target-scoped baseline. Its outcomes are `pass`, `fail`,