@unotest/mobile 0.8.2 → 0.8.3

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 (3) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +68 -0
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,29 @@ All notable changes to `@unotest/mobile` will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
+ ## [0.8.3] — 2026-05-18
8
+
9
+ ### Added — README onboarding protocol for AI agents
10
+
11
+ - **New top-of-README section.** A developer dropping the npm page
12
+ link into their AI agent's context (Cursor, Claude Desktop, Claude
13
+ Code in another project, etc.) now gets a 5-step protocol explicitly
14
+ addressed to the agent: verify host → pick working directory → ask
15
+ for `.app` path → run interactive setup in user's terminal → hand off
16
+ to Claude Code in the same directory. Spells out where the agent's
17
+ responsibility ends (not test authoring; that's a separate Claude
18
+ Code session via MCP) and what NOT to run via its own `Bash`-style
19
+ shell tool (the install command is interactive — needs a real TTY
20
+ for the simulator picker; tool-spawned shells either hang or fall
21
+ back to a non-interactive code path that can confuse the user).
22
+ - The working-directory step is explicit because `init` drops
23
+ `unotest/`, `.mcp.json`, `.claude/skills/`, and `AGENTS.md` into
24
+ cwd, and `.mcp.json`'s location determines what Claude Code sees on
25
+ its next launch. Recommends the app repo root by default; monorepo
26
+ root for monorepos; explicit warning that a separate test repo
27
+ divorces tests from the app and should be chosen only when the user
28
+ asks for it.
29
+
7
30
  ## [0.8.2] — 2026-05-18
8
31
 
9
32
  ### Fixed — `type()` no longer drops 1-3 characters mid-string
package/README.md CHANGED
@@ -5,6 +5,74 @@ that lets Claude (or any MCP client) drive your iOS Simulator and write
5
5
  real test scenarios for your app — works with any backend stack
6
6
  (Node/Python/Rails/Go/Java), no JS expertise required from you.
7
7
 
8
+ ## If you're an AI agent helping a user set this up
9
+
10
+ *(Humans: skip this section, jump to [Quick start](#quick-start).)*
11
+
12
+ You were given this page because a developer wants `@unotest/mobile`
13
+ set up in their project. Follow this protocol exactly — don't improvise.
14
+
15
+ **1. Verify the host.** Run `xcrun simctl list devices` via your shell
16
+ tool. If it errors with "command not found" or similar, the user isn't
17
+ on macOS or is missing Xcode CLI tools. Stop and tell them: "This is
18
+ iOS-only — Apple licensing prevents iOS simulators from running on
19
+ Linux/Windows. You'll need macOS with Xcode installed." Also verify
20
+ `node --version` ≥ 20.
21
+
22
+ **2. Pick a working directory with the user.** Setup writes
23
+ `unotest/` (test scaffold), `.mcp.json` (Claude Code config),
24
+ `.claude/skills/` (skill the in-project agent reads), and an
25
+ `AGENTS.md` into the current directory, and updates `.gitignore` if
26
+ present. Where these land determines what Claude Code sees later, so
27
+ ask the user explicitly:
28
+
29
+ - **Default — the app's repo root.** Same directory as their
30
+ `package.json` (RN/Expo) or where their `.xcodeproj` lives (native).
31
+ Tests live next to app code, ship via the same git history, work
32
+ cleanly in CI.
33
+ - **Monorepo:** the monorepo root, not the app subfolder. Claude Code
34
+ is typically opened at the monorepo root, and `.mcp.json` must live
35
+ there to be auto-discovered.
36
+ - **Separate test repo:** any directory the user picks. Choose this
37
+ only if they explicitly want tests divorced from the app.
38
+
39
+ Once the user picks, have them `cd` there. All commands below run
40
+ from that directory.
41
+
42
+ **3. Ask the user for the `.app` path.** `@unotest/mobile` drives a
43
+ real installed app — it needs the path to a built `.app` bundle.
44
+ Ask: *"What's the absolute path to your built `.app`?"* Common
45
+ locations:
46
+ - React Native / Expo: `./ios/build/Build/Products/Debug-iphonesimulator/<App>.app`
47
+ after `npx expo run:ios` or `pod install && xcodebuild`.
48
+ - Native Swift: open Xcode → Product → Show Build Folder → `Products/Debug-iphonesimulator/`.
49
+
50
+ If they don't have one yet, tell them to build first; don't guess
51
+ paths.
52
+
53
+ **4. Tell the user to run the setup command in the chosen directory.**
54
+ **Do not run this yourself via Bash** — it's interactive (simulator
55
+ picker, permission prompts) and needs a real TTY. Your shell tool
56
+ will hang or get a non-interactive fallback. Give them this exact
57
+ line to paste (from the directory picked in step 2):
58
+
59
+ ```bash
60
+ npx @unotest/mobile@latest install <their-app-path> --update-env
61
+ ```
62
+
63
+ They'll see: env check → file scaffold → simulator picker (arrow keys)
64
+ → permission grant prompt → install logs. Wait for the line
65
+ `✓ Installed <bundle.id>`. That's the success signal.
66
+
67
+ **5. Hand off to Claude Code.** Once install finishes, instruct the
68
+ user: *"Open Claude Code in **the same directory you ran setup in**,
69
+ then ask it to write your first test."* A separate Claude Code session
70
+ (not you) connects to the MCP server bootstrapped in step 4 and takes
71
+ over from there. Your job ends here — you're setup, not test authoring.
72
+
73
+ If any step fails, surface the actual error verbatim to the user and
74
+ stop. Don't try alternative paths.
75
+
8
76
  ## Quick start
9
77
 
10
78
  ```bash
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unotest/mobile",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "AI-native E2E testing for iOS React Native apps. MCP server + CLI runner + JS-DSL scenarios.",
5
5
  "license": "MIT",
6
6
  "type": "module",