openclaw-voice 1.0.5 → 1.0.6

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 (2) hide show
  1. package/README.md +112 -14
  2. package/package.json +14 -2
package/README.md CHANGED
@@ -41,26 +41,106 @@ Prerequisites:
41
41
  - Node.js 18+
42
42
  - Xcode + iOS runtime
43
43
  - CocoaPods
44
+ - Android Studio + Android SDK (for Android runs)
44
45
  - A running OpenClaw Gateway endpoint (`wss://...`)
45
46
 
46
47
  Quick setup:
47
48
 
48
49
  ```bash
49
- bash scripts/bootstrap.sh
50
+ npm run setup
50
51
  ```
51
52
 
52
- What it does:
53
+ Optional environment check:
53
54
 
54
- - Installs dependencies with `npm install`
55
- - Generates iOS native project (if missing)
56
- - Installs CocoaPods
57
- - Launches the app on a physical device (`npm run ios -- --device`)
55
+ ```bash
56
+ npm run doctor:ios
57
+ ```
58
+
59
+ Debug run path (development, Metro required):
60
+
61
+ ```bash
62
+ # Terminal A
63
+ npm run dev:metro
64
+
65
+ # Terminal B
66
+ npm run ios:dev:device:install
67
+ ```
68
+
69
+ If `Connecting to: iPhone` keeps spinning forever, stop that terminal (`Ctrl+C`) and launch directly:
70
+
71
+ ```bash
72
+ EXPO_DEV_SERVER_URL=<metro-url> npm run ios:dev:device:open
73
+ ```
74
+
75
+ Release run path (device testing, Metro not required):
76
+
77
+ ```bash
78
+ npm run ios:release:device
79
+ ```
80
+
81
+ `scripts/bootstrap.sh` runs `npm run setup` and prints these run paths.
82
+
83
+ Android run path:
84
+
85
+ ```bash
86
+ npm run doctor:android
87
+ npm run android:emulator:setup # one-time
88
+ npm run android:emulator:start # start emulator
89
+ npm run android
90
+ ```
91
+
92
+ If `doctor:android` reports SDK errors, set `ANDROID_HOME` (or `ANDROID_SDK_ROOT`) and ensure `adb` is available.
93
+ If AVD creation fails with `Valid system image paths are: null`, install `cmdline-tools;latest` inside your SDK and rerun `npm run android:emulator:setup`.
94
+
95
+ ### Android: Verified Device/Emulator Steps
96
+
97
+ Verified on macOS with Expo SDK 54 and Android API 35.
58
98
 
59
- Manual setup:
99
+ 1. Set SDK environment variables:
60
100
 
61
101
  ```bash
62
- npm install
63
- npm run ios
102
+ export ANDROID_HOME="$HOME/Library/Android/sdk"
103
+ export ANDROID_SDK_ROOT="$ANDROID_HOME"
104
+ export PATH="$ANDROID_HOME/platform-tools:$ANDROID_HOME/emulator:$ANDROID_HOME/cmdline-tools/latest/bin:$PATH"
105
+ ```
106
+
107
+ 2. Validate toolchain:
108
+
109
+ ```bash
110
+ npm run doctor:android
111
+ ```
112
+
113
+ 3. Emulator path:
114
+
115
+ ```bash
116
+ npm run android:emulator:setup
117
+ npm run android:emulator:start
118
+ npm run android
119
+ ```
120
+
121
+ 4. Physical device path (USB debugging enabled):
122
+
123
+ ```bash
124
+ adb devices
125
+ npm run android
126
+ ```
127
+
128
+ Expected result:
129
+ - `adb devices` shows at least one `device`
130
+ - Expo installs and launches the app without SDK-path errors
131
+
132
+ ### What Is Metro?
133
+
134
+ `Metro` is the JavaScript bundler/dev server used by React Native/Expo in development.
135
+ In Debug builds, the app loads JS from Metro (usually `:8081`) with fast refresh.
136
+
137
+ - Debug build (`npm run ios`, `npm run ios:dev`) -> Metro required
138
+ - Release build (`--configuration Release`) -> Metro not required (bundle is embedded)
139
+
140
+ If Debug app does not attach to Metro, pass URL explicitly:
141
+
142
+ ```bash
143
+ EXPO_DEV_SERVER_URL=http://192.168.0.10:8081 npm run ios:dev:device:open
64
144
  ```
65
145
 
66
146
  ## Use It As npm Package
@@ -85,7 +165,7 @@ setStorage({
85
165
  const client = new GatewayClient('wss://your-openclaw-gateway.example.com', {
86
166
  token: 'your-token',
87
167
  clientId: 'openclaw-ios',
88
- displayName: 'OpenClawVoice',
168
+ displayName: 'OpenClaw Pocket',
89
169
  role: 'operator',
90
170
  scopes: ['operator.read', 'operator.write'],
91
171
  caps: ['talk'],
@@ -156,13 +236,13 @@ cp .env.example .env
156
236
  - `EXPO_PUBLIC_DEFAULT_THEME` (`light` or `dark`)
157
237
  - `EXPO_PUBLIC_DEFAULT_SESSION_KEY` (default: `main`)
158
238
  - `EXPO_PUBLIC_GATEWAY_CLIENT_ID` (default: `openclaw-ios`)
159
- - `EXPO_PUBLIC_GATEWAY_DISPLAY_NAME` (default: `OpenClawVoice`)
239
+ - `EXPO_PUBLIC_GATEWAY_DISPLAY_NAME` (default: `OpenClaw Pocket`)
160
240
  - `EXPO_PUBLIC_DEBUG_MODE` (`true` to show dev warnings and runtime debug panel, default: `false`)
161
241
 
162
242
  ## Connection Defaults
163
243
 
164
244
  - `clientId: openclaw-ios`
165
- - `displayName: OpenClawVoice`
245
+ - `displayName: OpenClaw Pocket`
166
246
  - `role: operator`
167
247
  - `scopes: operator.read, operator.write`
168
248
  - `caps: talk`
@@ -171,8 +251,20 @@ Device identity is generated locally and reused when persistent storage is avail
171
251
 
172
252
  ## Scripts
173
253
 
254
+ - `npm run setup` - Install deps, prepare native iOS project, install Pods
255
+ - `npm run doctor:ios` - Validate iOS development environment and connectivity
256
+ - `npm run doctor:android` - Validate Android SDK/adb/device environment
257
+ - `npm run android:emulator:setup` - Install Android SDK pieces and create default emulator (`Pixel_8_API_35`)
258
+ - `npm run android:emulator:start` - Start default Android emulator
259
+ - `npm run dev:metro` - Start Metro for dev-client (tunnel mode)
174
260
  - `npm run start` - Start Expo dev server
175
- - `npm run ios` - Build and run iOS app
261
+ - `npm run ios` - Alias for `npm run ios:dev`
262
+ - `npm run ios:dev` - Build and run iOS Debug app (Metro required)
263
+ - `npm run ios:dev:device` - Build and run iOS Debug app on device (Metro required)
264
+ - `npm run ios:dev:device:install` - Install iOS Debug app on device (no bundler startup)
265
+ - `npm run ios:dev:device:open` - Launch installed iOS app on connected device (uses `EXPO_DEV_SERVER_URL` when set)
266
+ - `npm run ios:release` - Build and run iOS Release app (Metro not required)
267
+ - `npm run ios:release:device` - Build and run iOS Release app on device (Metro not required)
176
268
  - `npm run android` - Build and run Android app
177
269
  - `npm run web` - Run web target
178
270
  - `npm run typecheck` - Run TypeScript checks
@@ -214,7 +306,13 @@ If this project helps your workflow, you can support maintenance on GitHub Spons
214
306
 
215
307
  ## Troubleshooting
216
308
 
217
- See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md).
309
+ For `No script URL provided` / `Could not connect to development server`:
310
+
311
+ - Start Metro explicitly (`npx expo start --dev-client --host tunnel --clear`)
312
+ - Reinstall Debug app with `--no-bundler` from another terminal
313
+ - Or use Release build (`npx expo run:ios --device --configuration Release`)
314
+
315
+ See [docs/TROUBLESHOOTING.md](docs/TROUBLESHOOTING.md) for more.
218
316
 
219
317
  ## Contributing
220
318
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-voice",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "main": "./dist/package.js",
5
5
  "types": "./dist/package.d.ts",
6
6
  "exports": {
@@ -18,9 +18,21 @@
18
18
  "access": "public"
19
19
  },
20
20
  "scripts": {
21
+ "setup": "bash scripts/setup.sh",
22
+ "doctor:ios": "node scripts/doctor-ios.mjs",
23
+ "doctor:android": "node scripts/doctor-android.mjs",
24
+ "android:emulator:setup": "bash scripts/setup-android-emulator.sh",
25
+ "android:emulator:start": "bash scripts/start-android-emulator.sh",
26
+ "dev:metro": "expo start --dev-client --host tunnel --clear",
21
27
  "start": "expo start",
22
28
  "android": "expo run:android",
23
- "ios": "expo run:ios",
29
+ "ios": "npm run ios:dev --",
30
+ "ios:dev": "expo run:ios --configuration Debug",
31
+ "ios:dev:device": "npm run ios:dev -- --device",
32
+ "ios:dev:device:install": "npm run ios:dev -- --device --no-bundler",
33
+ "ios:dev:device:open": "bash scripts/launch-ios-device.sh",
34
+ "ios:release": "expo run:ios --configuration Release",
35
+ "ios:release:device": "npm run ios:release -- --device",
24
36
  "web": "expo start --web",
25
37
  "typecheck": "tsc --noEmit",
26
38
  "lint": "node scripts/lint.mjs",