@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.
- package/.claude-plugin/plugin.json +2 -2
- package/AGENTS.md +43 -44
- package/README.md +32 -42
- package/bin/tapp.js +178 -103
- package/browser/app.css +220 -208
- package/browser/app.js +173 -20
- package/browser/index.html +118 -57
- package/browser/tokens.css +33 -25
- package/docs/BROWSER-PRODUCT.md +16 -8
- package/docs/BUSINESS-WORKFLOWS.md +134 -0
- package/docs/PRODUCT-ENGINE.md +5 -0
- package/mcp-server/src/browser-product.js +15 -3
- package/mcp-server/src/business-observation.d.ts +2 -0
- package/mcp-server/src/business-observation.js +25 -0
- package/mcp-server/src/business-workflow-files.js +36 -0
- package/mcp-server/src/business-workflow-runtime.js +47 -0
- package/mcp-server/src/business-workflows.d.ts +50 -0
- package/mcp-server/src/business-workflows.js +169 -0
- package/mcp-server/src/environment-capabilities.d.ts +16 -0
- package/mcp-server/src/environment-capabilities.js +78 -0
- package/mcp-server/src/index.js +612 -814
- package/mcp-server/src/product-operations.js +3 -1
- package/mcp-server/src/public-network.js +65 -0
- package/mcp-server/src/web-audit.js +77 -17
- package/mcp-server/src/web-explorer.js +11 -1
- package/mcp-server/src/web-flow.js +17 -4
- package/package.json +10 -4
- package/scripts/quick-capture.sh +17 -5
- package/scripts/run-flow.sh +3 -1
- package/scripts/run-web-flow.js +4 -0
- package/skills/tapp/SKILL.md +14 -13
- package/skills/tapp/references/commands.md +73 -57
|
@@ -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
|
|
12
|
-
npx -y @aarwitz/tapp@latest
|
|
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
|
|
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
|
|
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
|
|
34
|
-
npx -y @aarwitz/tapp@latest
|
|
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
|
|
47
|
+
npx -y @aarwitz/tapp@latest look https://example.com --tap "Not now" --wait-for "Dashboard"
|
|
44
48
|
```
|
|
45
49
|
|
|
46
|
-
## MCP
|
|
50
|
+
## MCP tools (13)
|
|
47
51
|
|
|
48
52
|
- `tapp_init`: inspect or initialize a source repository; `operation:"explore"` prepares and explores.
|
|
49
|
-
- `
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
- `
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- `
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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);
|
|
95
|
-
`
|
|
96
|
-
|
|
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
|
|
107
|
-
npx -y @aarwitz/tapp@latest
|
|
108
|
-
npx -y @aarwitz/tapp@latest
|
|
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 (`
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
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`,
|