@aarwitz/tapp 0.17.0-rc.8 → 0.17.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.
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: tapp
3
+ description: Use Tapp to see, drive, explore, and verify real application surfaces on iOS simulators, Android emulators/devices, or the web. Use when a user asks an agent to test an app or UI change, find bugs, inspect or screenshot a screen, exercise a journey, create a replayable flow, gather release evidence, or run the deterministic Tapp gate. Also use when the user mentions Tapp, @aarwitz/tapp, tapp_* tools, .tapp artifacts, or asks whether agent-authored UI actually works.
4
+ ---
5
+
6
+ # Tapp
7
+
8
+ Use Tapp as the app's hands and eyes. Work on the real UI surface and show evidence; do not claim a
9
+ screen or journey works from source inspection alone.
10
+
11
+ ## Choose the smallest operation
12
+
13
+ | Intent | Operation |
14
+ |---|---|
15
+ | See or screenshot one screen | `open` / `tapp_open_app` |
16
+ | Inspect controls on the current screen | `tree` / `tapp_ui_tree` |
17
+ | Drive a specific journey | MCP session start → act → end |
18
+ | Find bugs autonomously | `explore` / `tapp_explore` |
19
+ | Preserve a journey | record and save a Flow; replay it deterministically |
20
+ | Decide whether a merge passes policy | `ci`; exploration never decides this |
21
+
22
+ Prefer connected `tapp_*` MCP tools when available: they keep interactive sessions alive and return
23
+ screenshots inline. Otherwise run `npx -y @aarwitz/tapp@latest` from the app repository. Do not require MCP,
24
+ an account, an API key, or a global install for the core workflow.
25
+
26
+ ## Start source-connected
27
+
28
+ When the user asks for a general first test of a repository:
29
+
30
+ 1. If `.tapp/application-model.json` exists, run `npx -y @aarwitz/tapp@latest explore`.
31
+ 2. Otherwise run `npx -y @aarwitz/tapp@latest init . --explore` or call `tapp_init` with
32
+ `{operation:"explore", projectDir:"."}`.
33
+ 3. If Tapp returns `target-selection-required`, present its actual choices and ask the user to pick.
34
+ Never guess among multiple targets. Re-run with the selected platform/target exactly as Tapp
35
+ instructs.
36
+ 4. If a prerequisite is missing, call `tapp_health` when MCP is connected or run
37
+ `npx -y @aarwitz/tapp@latest doctor`, apply only the stated remediation that is in scope, and
38
+ retry once.
39
+
40
+ For a focused request, use the requested target directly rather than forcing repository onboarding.
41
+ Targets may be a repository path, Xcode container, `.app`, iOS bundle id, APK plus Android app id,
42
+ or owned HTTP(S) URL. Never explore a third-party web property without authorization: exploration
43
+ clicks and types.
44
+
45
+ ## Observe honestly
46
+
47
+ Exploration returns findings, coverage, evidence, and `inconclusive`; it does not return a score or
48
+ ship verdict. Report:
49
+
50
+ - target and platform;
51
+ - screens/actions and whether coverage was conclusive;
52
+ - deterministic versus advisory finding counts;
53
+ - each important finding and its evidence/report path;
54
+ - what Tapp explicitly did not check.
55
+
56
+ If `inconclusive: true`, explain the blocker. A login wall or missing test data is not a pass. Ask for
57
+ credentials or launch configuration instead of rerunning blindly. Do not infer content accuracy,
58
+ privacy, brand consistency, or business guarantees from a generic crawl; those require a reviewed
59
+ Flow, Scenario, contract, verifier, or human review.
60
+
61
+ When a screenshot path is printed, open it with the client's image-reading tool before describing
62
+ the screen. For web, use `--watch` when the human wants to follow Tapp's controlled browser. For iOS,
63
+ point the human to the report's exploration recording when available.
64
+
65
+ ## Drive safely
66
+
67
+ For an interactive MCP session, read returned `elements[]` before every action, target accessibility
68
+ ids or visible labels, check `hittable`, tap a field before typing, and wait for navigation or async
69
+ content. Use coordinates only as a last resort. End the session when finished.
70
+
71
+ Do not edit the app merely because testing found a defect unless the user also asked for a fix. State
72
+ what the evidence proves and what remains untested.
73
+
74
+ Read [references/commands.md](references/commands.md) only when exact CLI/MCP syntax, Flow replay,
75
+ credentials, or platform prerequisites are needed.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Tapp"
3
+ short_description: "Test real iOS, Android, and web apps"
4
+ default_prompt: "Use $tapp to test this app on its real UI surface and report evidence-backed findings."
@@ -0,0 +1,102 @@
1
+ # Tapp command reference
2
+
3
+ ## Plain CLI
4
+
5
+ Run from the application repository. `[target]` is optional when Tapp can read the repository model
6
+ or detect one unambiguous target.
7
+
8
+ ```bash
9
+ npx -y @aarwitz/tapp@latest init . --explore
10
+ npx -y @aarwitz/tapp@latest explore [target]
11
+ npx -y @aarwitz/tapp@latest open [target]
12
+ npx -y @aarwitz/tapp@latest tree [target] --json
13
+ npx -y @aarwitz/tapp@latest shot
14
+ npx -y @aarwitz/tapp@latest report latest
15
+ npx -y @aarwitz/tapp@latest doctor
16
+ ```
17
+
18
+ Platform examples:
19
+
20
+ ```bash
21
+ # Web: Tapp may build/start/stop a source target; --watch is human-visible.
22
+ npx -y @aarwitz/tapp@latest explore --platform web --target website --watch
23
+ npx -y @aarwitz/tapp@latest explore https://staging.example.com
24
+
25
+ # iOS: source repo, .app, or bundle id.
26
+ npx -y @aarwitz/tapp@latest explore MyApp.xcodeproj --platform ios
27
+ npx -y @aarwitz/tapp@latest open com.example.MyApp --platform ios
28
+
29
+ # Android: app id is required; APK is optional if already installed.
30
+ npx -y @aarwitz/tapp@latest explore app-debug.apk --platform android --app-id com.example.app
31
+ ```
32
+
33
+ Focused web evidence can perform one semantic interaction and wait for async content:
34
+
35
+ ```bash
36
+ npx -y @aarwitz/tapp@latest open https://example.com --tap "Not now" --wait-for "Dashboard"
37
+ ```
38
+
39
+ ## MCP mapping
40
+
41
+ - `tapp_init`: inspect or initialize a source repository; `operation:"explore"` prepares and explores.
42
+ - `tapp_build`: build and install an iOS app without needing its bundle id first.
43
+ - `tapp_open_app`: launch and return a screen summary plus inline screenshot.
44
+ - `tapp_ui_tree` / `tapp_screenshot`: inspect the current real surface.
45
+ - `tapp_session_start` → `tapp_session_act` → `tapp_session_end`: drive one persistent journey.
46
+ - `tapp_explore`: autonomous iOS, Android, or web exploration; observation only.
47
+ - `tapp_flow_save` / `tapp_flow_run`: save a driven journey and replay it deterministically.
48
+ - `tapp_release_contract`: validate, compile, or run a reviewed business guarantee.
49
+ - `tapp_ci_setup`: create a target-scoped baseline or reviewable CI installation.
50
+
51
+ An iOS no-bundle-id MCP path is `tapp_build {projectDir:"."}` followed by `tapp_explore` with the
52
+ returned `bundleId`. Android uses `androidAppId` and optional `apkPath`; web uses `url` or
53
+ source-connected `tapp_init`.
54
+
55
+ ## Interactive session loop
56
+
57
+ ```text
58
+ tapp_session_start {appBundleId:"com.example.app"}
59
+ tapp_session_act {action:"tap", id:"Email"}
60
+ tapp_session_act {action:"type", text:"qa@example.com"}
61
+ tapp_session_act {action:"tap", id:"Password"}
62
+ tapp_session_act {action:"type", text:"..."}
63
+ tapp_session_act {action:"tap", id:"Sign In"}
64
+ tapp_session_act {action:"wait", text:"Home", timeoutMs:10000}
65
+ tapp_screenshot
66
+ tapp_session_end
67
+ ```
68
+
69
+ Android sessions use `androidAppId`, optional `apkPath`, and the same action loop.
70
+
71
+ ## Credentials and test configuration
72
+
73
+ For autonomous exploration, pass test-only values when authorized:
74
+
75
+ - CLI: `--email`, `--password`, repeated `--launch-arg`, and JSON `--launch-env`.
76
+ - MCP: `testEmail`, `testPassword`, `inputOverrides`, `appLaunchArgs`, `appLaunchEnv`, or explicit
77
+ `loginSteps`.
78
+
79
+ Do not persist secrets in `.tapp/`. If the result reports input fields and no values were supplied,
80
+ ask the user rather than pretending the explored surface was complete.
81
+
82
+ ## Replay and gating
83
+
84
+ Flow YAML belongs under `.tapp/flows/` and can replay without a model or API key:
85
+
86
+ ```bash
87
+ npx -y @aarwitz/tapp@latest flow run .tapp/flows/smoke.yml
88
+ npx -y @aarwitz/tapp@latest ci
89
+ ```
90
+
91
+ `tapp explore` observes. `tapp ci` applies versioned deterministic policy to evidence, selected
92
+ Flows/Scenarios/contracts, coverage, and any target-scoped baseline. Its outcomes are `pass`, `fail`,
93
+ or `inconclusive`; both `fail` and `inconclusive` block a merge.
94
+
95
+ ## Platform prerequisites
96
+
97
+ - iOS: macOS, Xcode, and a booted simulator. First use builds a cached harness under `~/.tapp`.
98
+ - Android: `adb` and a connected authorized emulator/device.
99
+ - Web: Playwright and Chromium. If Tapp reports the browser missing, run
100
+ `npx playwright install chromium` and retry.
101
+
102
+ Captures and screenshots are stored under `~/.tapp/captures/` and `~/.tapp/shots/`.