clawdex-mobile 2.0.0 → 3.0.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.
Files changed (71) hide show
  1. package/.github/workflows/pages.yml +41 -0
  2. package/AGENTS.md +263 -110
  3. package/README.md +11 -0
  4. package/apps/mobile/.env.example +2 -2
  5. package/apps/mobile/App.tsx +175 -14
  6. package/apps/mobile/app.json +27 -9
  7. package/apps/mobile/eas.json +14 -4
  8. package/apps/mobile/package.json +13 -13
  9. package/apps/mobile/src/api/__tests__/chatMapping.test.ts +219 -0
  10. package/apps/mobile/src/api/__tests__/client.test.ts +579 -6
  11. package/apps/mobile/src/api/__tests__/ws.test.ts +27 -0
  12. package/apps/mobile/src/api/account.ts +47 -0
  13. package/apps/mobile/src/api/chatMapping.ts +435 -18
  14. package/apps/mobile/src/api/client.ts +296 -36
  15. package/apps/mobile/src/api/rateLimits.ts +143 -0
  16. package/apps/mobile/src/api/types.ts +106 -0
  17. package/apps/mobile/src/api/ws.ts +10 -1
  18. package/apps/mobile/src/components/ChatHeader.tsx +12 -12
  19. package/apps/mobile/src/components/ChatInput.tsx +154 -88
  20. package/apps/mobile/src/components/ChatMessage.tsx +548 -93
  21. package/apps/mobile/src/components/ComposerUsageLimits.tsx +167 -0
  22. package/apps/mobile/src/components/SelectionSheet.tsx +466 -0
  23. package/apps/mobile/src/components/ToolBlock.tsx +17 -15
  24. package/apps/mobile/src/components/VoiceRecordingWaveform.tsx +181 -0
  25. package/apps/mobile/src/components/WorkspacePickerModal.tsx +572 -0
  26. package/apps/mobile/src/components/__tests__/chat-input-layout.test.ts +35 -0
  27. package/apps/mobile/src/components/__tests__/chatImageSource.test.ts +44 -0
  28. package/apps/mobile/src/components/__tests__/composerUsageLimits.test.ts +138 -0
  29. package/apps/mobile/src/components/__tests__/voiceWaveform.test.ts +31 -0
  30. package/apps/mobile/src/components/chat-input-layout.ts +59 -0
  31. package/apps/mobile/src/components/chatImageSource.ts +86 -0
  32. package/apps/mobile/src/components/usageLimitBadges.ts +109 -0
  33. package/apps/mobile/src/components/voiceWaveform.ts +46 -0
  34. package/apps/mobile/src/config.ts +9 -2
  35. package/apps/mobile/src/hooks/useVoiceRecorder.ts +8 -1
  36. package/apps/mobile/src/navigation/DrawerContent.tsx +607 -457
  37. package/apps/mobile/src/navigation/__tests__/chatThreadTree.test.ts +89 -0
  38. package/apps/mobile/src/navigation/__tests__/drawerChats.test.ts +65 -0
  39. package/apps/mobile/src/navigation/chatThreadTree.ts +191 -0
  40. package/apps/mobile/src/navigation/drawerChats.ts +9 -0
  41. package/apps/mobile/src/screens/GitScreen.tsx +2 -0
  42. package/apps/mobile/src/screens/MainScreen.tsx +4244 -1237
  43. package/apps/mobile/src/screens/OnboardingScreen.tsx +2 -0
  44. package/apps/mobile/src/screens/SettingsScreen.tsx +256 -226
  45. package/apps/mobile/src/screens/TerminalScreen.tsx +2 -5
  46. package/apps/mobile/src/screens/__tests__/agentThreadDisplay.test.ts +80 -0
  47. package/apps/mobile/src/screens/__tests__/agentThreads.test.ts +170 -0
  48. package/apps/mobile/src/screens/__tests__/planCardState.test.ts +88 -0
  49. package/apps/mobile/src/screens/__tests__/subAgentTranscript.test.ts +102 -0
  50. package/apps/mobile/src/screens/__tests__/transcriptMessages.test.ts +97 -0
  51. package/apps/mobile/src/screens/agentThreadDisplay.ts +261 -0
  52. package/apps/mobile/src/screens/agentThreads.ts +167 -0
  53. package/apps/mobile/src/screens/planCardState.ts +40 -0
  54. package/apps/mobile/src/screens/subAgentTranscript.ts +149 -0
  55. package/apps/mobile/src/screens/transcriptMessages.ts +102 -0
  56. package/apps/mobile/src/theme.ts +6 -12
  57. package/docs/codex-app-server-cli-gap-tracker.md +14 -5
  58. package/docs/privacy-policy.md +54 -0
  59. package/docs/setup-and-operations.md +4 -3
  60. package/docs/terms-of-service.md +33 -0
  61. package/package.json +3 -3
  62. package/services/mac-bridge/package.json +6 -6
  63. package/services/rust-bridge/Cargo.lock +58 -363
  64. package/services/rust-bridge/Cargo.toml +2 -2
  65. package/services/rust-bridge/package.json +1 -1
  66. package/services/rust-bridge/src/main.rs +507 -9
  67. package/site/index.html +54 -0
  68. package/site/privacy/index.html +80 -0
  69. package/site/styles.css +135 -0
  70. package/site/support/index.html +51 -0
  71. package/site/terms/index.html +68 -0
@@ -0,0 +1,41 @@
1
+ name: Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - ".github/workflows/pages.yml"
9
+ - "site/**"
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: read
14
+ pages: write
15
+ id-token: write
16
+
17
+ concurrency:
18
+ group: pages
19
+ cancel-in-progress: true
20
+
21
+ jobs:
22
+ deploy:
23
+ runs-on: ubuntu-latest
24
+ environment:
25
+ name: github-pages
26
+ url: ${{ steps.deployment.outputs.page_url }}
27
+ steps:
28
+ - name: Checkout
29
+ uses: actions/checkout@v4
30
+
31
+ - name: Configure Pages
32
+ uses: actions/configure-pages@v5
33
+
34
+ - name: Upload Pages artifact
35
+ uses: actions/upload-pages-artifact@v3
36
+ with:
37
+ path: site
38
+
39
+ - name: Deploy Pages
40
+ id: deployment
41
+ uses: actions/deploy-pages@v4
package/AGENTS.md CHANGED
@@ -1,120 +1,273 @@
1
1
  # AGENTS
2
2
 
3
- ## Project Purpose
4
- - Monorepo for controlling Codex from mobile:
5
- - `apps/mobile`: Expo React Native client (Threads, Terminal, Git, Settings).
6
- - `services/rust-bridge`: Rust WebSocket JSON-RPC bridge that wraps `codex app-server` plus terminal/git helpers.
7
- - `services/mac-bridge`: legacy TypeScript bridge kept for reference.
8
-
9
- ## Repo Layout
10
- - `apps/mobile`: UI and API client code.
11
- - API layer: `src/api/*`
12
- - Screens: `src/screens/*`
13
- - `services/rust-bridge`: primary backend bridge service.
14
- - WS RPC server + app-server adapter: `src/main.rs`
15
- - `services/mac-bridge`: backend bridge service.
16
- - HTTP/WS server: `src/server.ts`, `src/index.ts`
17
- - Service adapters: `src/services/*`
18
- - Shared protocol types: `src/types.ts`
19
- - Root `package.json`: npm workspaces + common scripts.
20
-
21
- ## Setup
22
- 1. Install deps:
23
- - `npm install`
24
- 2. Copy env examples:
25
- - `cp apps/mobile/.env.example apps/mobile/.env`
26
- - `cp services/rust-bridge/.env.example services/rust-bridge/.env`
27
-
28
- ## Open Source License Requirements
29
- - Follow `docs/open-source-license-requirements.md` for licensing and third-party notice obligations.
30
- - For any release/distribution changes, ensure the guide remains satisfied before merge.
31
-
32
- ### Starting the Bridge
33
-
34
- The bridge does **not** auto-load `.env` files. All environment variables must be passed inline.
35
-
36
- ```bash
37
- BRIDGE_HOST=0.0.0.0 \
38
- BRIDGE_PORT=8787 \
39
- BRIDGE_ALLOW_INSECURE_NO_AUTH=true \
40
- CODEX_CLI_BIN=codex \
41
- BRIDGE_WORKDIR="$(pwd)" \
42
- npm run -w @codex/rust-bridge dev
43
- ```
44
-
45
- - `BRIDGE_HOST=0.0.0.0` binds to all interfaces so the phone on the same LAN can reach it. Without this it defaults to `127.0.0.1` (localhost only).
46
- - `BRIDGE_ALLOW_INSECURE_NO_AUTH=true` disables auth for local development. Without it the bridge will throw `BRIDGE_AUTH_TOKEN is required`.
47
- - `CODEX_CLI_BIN=codex` tells the bridge which Codex binary to use. Make sure `codex` is in your PATH.
48
- - `BRIDGE_WORKDIR` sets the root directory for git/terminal operations.
49
-
50
- The shorthand `npm run bridge` only sets `BRIDGE_WORKDIR` — it will fail unless the other vars are already exported in your shell.
51
-
52
- ### Starting Expo
53
-
54
- ```bash
55
- npm run mobile
56
- ```
57
-
58
- This runs `expo start` in the `apps/mobile` workspace. It loads `apps/mobile/.env` automatically.
59
-
60
- On first app launch, onboarding will ask for your bridge URL. Enter your host machine LAN/Tailscale URL:
61
- ```
62
- http://<YOUR_LAN_IP>:8787
63
- ```
64
-
65
- Find your LAN IP with `ifconfig en0 | grep inet` (macOS) or `ip addr` (Linux). The phone and the host machine must be on the same network.
66
-
67
- Optionally run on a specific platform:
3
+ ## Purpose
4
+
5
+ This repo is a monorepo for controlling Codex from a phone.
6
+
7
+ - Primary product path:
8
+ - `apps/mobile`: Expo React Native client
9
+ - `services/rust-bridge`: current backend bridge (`codex app-server` adapter + terminal/git/attachments/voice helpers)
10
+ - `bin/clawdex.js` + `scripts/*`: operator CLI and setup/runtime automation
11
+ - Legacy/reference path:
12
+ - `services/mac-bridge`: older TypeScript bridge with useful tests/reference code, but not the primary runtime
13
+
14
+ The bridge is intended for trusted/private networks only. Do not treat this repo as internet-safe by default.
15
+
16
+ ## Read First
17
+
18
+ Use the existing docs as the source of truth instead of duplicating them in code comments or PR notes.
19
+
20
+ - Quick start and command map: `README.md`
21
+ - Setup, secure env flow, verification, smoke tests, API summary: `docs/setup-and-operations.md`
22
+ - Troubleshooting and recovery commands: `docs/troubleshooting.md`
23
+ - Realtime/live-sync constraints: `docs/realtime-streaming-limitations.md`
24
+ - Voice transcription architecture: `docs/voice-transcription.md`
25
+ - EAS and native build/release notes: `docs/eas-builds.md`
26
+ - Open-source and notice obligations: `docs/open-source-license-requirements.md`
27
+ - App review template: `docs/app-review-notes.md`
28
+ - App-server/CLI parity tracker: `docs/codex-app-server-cli-gap-tracker.md`
29
+
30
+ `docs/plans/*` are historical design/implementation plans, not current operating policy.
31
+
32
+ ## Repo Map
33
+
34
+ ### Active code
35
+
36
+ - `apps/mobile`
37
+ - `App.tsx`: app shell, drawer navigation, persisted settings
38
+ - `src/api/*`: bridge client, websocket transport, typed contracts
39
+ - `src/screens/*`: main UI surfaces
40
+ - `src/components/*`: chat UI pieces
41
+ - `ios/*`: active Expo native iOS project
42
+ - `plugins/withAndroidCleartextTraffic.js`: Android manifest patch for local/insecure bridge access
43
+ - `services/rust-bridge`
44
+ - `src/main.rs`: main Axum server, JSON-RPC router, app-server bridge, replay/live-sync logic
45
+ - `src/services/git.rs`: git helpers
46
+ - `src/services/terminal.rs`: terminal execution helpers
47
+ - `scripts/*`
48
+ - secure setup/start helpers, Expo bootstrap, service stop/cleanup, version sync
49
+ - `.github/workflows/*`
50
+ - CI, npm release, and Pages publishing
51
+ - `site/*`
52
+ - static support/privacy/terms site
53
+
54
+ ### Legacy or easy-to-confuse paths
55
+
56
+ - `services/mac-bridge/*`: legacy TypeScript bridge; useful for reference and tests, not the default runtime
57
+ - `ios/*` at repo root: older native iOS tree (`codexmobilecontrol`), not the active Expo app path
58
+ - `apps/mobile/ios/*`: this is the active iOS native project for the shipped mobile app
59
+ - `apps/telegram-miniapp/*`: currently not a primary maintained source tree; it mostly contains built output/environment leftovers
60
+
61
+ ### Generated/vendor paths to avoid editing by hand
62
+
63
+ - `node_modules/*`
64
+ - `.expo/*`
65
+ - `apps/mobile/ios/Pods/*`
66
+ - `ios/Pods/*`
67
+ - `ios/build/*`
68
+ - `apps/telegram-miniapp/dist/*`
69
+
70
+ ## Current Architecture
71
+
72
+ ### Mobile app
73
+
74
+ - The mobile app is a custom shell, not React Navigation based.
75
+ - `apps/mobile/App.tsx` creates exactly one `HostBridgeWsClient` and one `HostBridgeApiClient`, persists app settings, owns the custom drawer, and switches screens via local state.
76
+ - The primary screens are:
77
+ - `src/screens/MainScreen.tsx`
78
+ - `src/screens/GitScreen.tsx`
79
+ - `src/screens/SettingsScreen.tsx`
80
+ - `src/screens/OnboardingScreen.tsx`
81
+ - `src/screens/PrivacyScreen.tsx`
82
+ - `src/screens/TermsScreen.tsx`
83
+ - `src/screens/TerminalScreen.tsx` exists but is not currently routed from `App.tsx`.
84
+ - `src/screens/MainScreen.tsx` is very large and is the main product surface. Treat edits there surgically.
85
+
86
+ ### Bridge/runtime
87
+
88
+ - The supported backend is `services/rust-bridge`.
89
+ - The bridge exposes:
90
+ - `GET /health`
91
+ - `GET /rpc` for WebSocket JSON-RPC
92
+ - `GET /local-image` for mobile image rendering of local/absolute paths
93
+ - The Rust bridge spawns `codex app-server --listen stdio://` and forwards an allowlist of `thread/*`, `turn/*`, `review/start`, `model/list`, `skills/list`, `app/list`, and related methods.
94
+ - Bridge-native RPC methods include attachments upload, voice transcription, terminal exec, git operations, approvals, user-input resolution, and event replay.
95
+
96
+ ### Realtime model
97
+
98
+ - Mobile realtime is hybrid:
99
+ - live WS notifications when the bridge owns the stream
100
+ - replay buffer recovery via `bridge/events/replay`
101
+ - snapshot/poll convergence for persisted history
102
+ - rollout/session tailing in Rust for best-effort CLI-origin live sync
103
+ - If work touches missing live updates, read `docs/realtime-streaming-limitations.md` before changing the bridge or mobile sync loop.
104
+
105
+ ## Primary Workflows
106
+
107
+ ### Preferred operator flow
108
+
109
+ - Published CLI:
110
+ - `clawdex init`
111
+ - `clawdex stop`
112
+ - Monorepo equivalents:
113
+ - `npm run setup:wizard`
114
+ - `npm run stop:services`
115
+
116
+ ### Root scripts
117
+
118
+ From repo root:
119
+
120
+ - `npm run mobile`
68
121
  - `npm run ios`
69
122
  - `npm run android`
123
+ - `npm run bridge`
124
+ - `npm run bridge:ts`
125
+ - `npm run secure:setup`
126
+ - `npm run secure:bridge`
127
+ - `npm run secure:bridge:dev`
128
+ - `npm run teardown`
129
+ - `npm run lint`
130
+ - `npm run typecheck`
131
+ - `npm run build`
132
+ - `npm run test`
133
+ - `npm run version:sync`
70
134
 
71
- ## Core Commands
72
- - `npm run lint` (all workspaces)
73
- - `npm run typecheck` (all workspaces)
74
- - `npm run build` (all workspaces)
75
- - `npm run -w @codex/rust-bridge dev` (bridge run mode)
76
- - `npm run -w apps/mobile start` (Expo dev server)
77
-
78
- ## Architecture Notes
79
- - Mobile app creates one `HostBridgeApiClient` and one `HostBridgeWsClient` in `App.tsx` and passes them to screen components.
80
- - Threads, Terminal, and Git screens keep local `useState` and call typed API helpers in `apps/mobile/src/api/client.ts`.
81
- - Bridge exposes:
82
- - WebSocket JSON-RPC (`/rpc`) for thread, turn, approvals, terminal, and git operations.
83
- - Optional HTTP `/health` endpoint.
84
- - App-server events (`turn/*`, `item/*`) are forwarded over WS; approval prompts are surfaced as `bridge/approval.*`.
85
-
86
- ## Coding Conventions
87
- - Keep changes in `src/` only; do not manually edit build artifacts.
88
- - Preserve strong typing across bridge contracts (`services/rust-bridge/src/main.rs`, `apps/mobile/src/api/types.ts`).
89
- - Prefer small service-layer additions over bloating the main RPC router.
90
- - For mobile, keep API requests in `src/api/client.ts` and UI logic in screen files.
135
+ ### Important operational details
91
136
 
92
- ## Security Guardrails
93
- - Treat bridge as trusted-network only until auth is added:
94
- - `bridge/terminal/exec` executes shell commands.
95
- - `bridge/git/*` can mutate repository state.
96
- - Never expose `services/rust-bridge` directly to the public internet in current form.
97
- - If adding new execution endpoints, enforce authentication/authorization first.
98
-
99
- ## Known Risks
100
- - WebSocket broadcast path has limited resilience for slow/broken clients.
101
- - Thread/run cache updates can race under concurrent writes.
102
- - Mobile WS client currently lacks robust reconnect/backoff behavior.
103
- - npm audit still reports high vulnerabilities from Expo’s transitive toolchain (`minimatch` path) even on latest stable Expo.
137
+ - `scripts/start-expo.sh` bootstraps Expo, attempts runtime repair if needed, and sets `REACT_NATIVE_PACKAGER_HOSTNAME` from `.env.secure` or Tailscale/LAN discovery.
138
+ - `scripts/start-bridge-secure.sh` sources `.env.secure` and runs the Rust bridge in dev or release mode.
139
+ - `npm run bridge` is only a shorthand for local development and does not load `.env.secure`.
140
+ - Real-device iOS work should be run from `apps/mobile`, not the repo-root `ios/` tree.
141
+
142
+ ## Environment and Config
143
+
144
+ ### Bridge
145
+
146
+ Canonical examples:
147
+
148
+ - `services/rust-bridge/.env.example`
149
+ - `services/mac-bridge/.env.example`
150
+
151
+ Important Rust bridge env knobs:
152
+
153
+ - `BRIDGE_HOST`
154
+ - `BRIDGE_PORT`
155
+ - `BRIDGE_WORKDIR`
156
+ - `BRIDGE_AUTH_TOKEN`
157
+ - `BRIDGE_ALLOW_INSECURE_NO_AUTH`
158
+ - `BRIDGE_ALLOW_QUERY_TOKEN_AUTH`
159
+ - `BRIDGE_ALLOW_OUTSIDE_ROOT_CWD`
160
+ - `BRIDGE_DISABLE_TERMINAL_EXEC`
161
+ - `BRIDGE_TERMINAL_ALLOWED_COMMANDS`
162
+ - `CODEX_CLI_BIN`
163
+ - `CODEX_CLI_TIMEOUT_MS`
164
+
165
+ ### Mobile
166
+
167
+ Canonical example:
168
+
169
+ - `apps/mobile/.env.example`
170
+
171
+ Important mobile env knobs:
172
+
173
+ - `EXPO_PUBLIC_HOST_BRIDGE_TOKEN`
174
+ - `EXPO_PUBLIC_ALLOW_QUERY_TOKEN_AUTH`
175
+ - `EXPO_PUBLIC_ALLOW_INSECURE_REMOTE_BRIDGE`
176
+ - `EXPO_PUBLIC_PRIVACY_POLICY_URL`
177
+ - `EXPO_PUBLIC_TERMS_OF_SERVICE_URL`
178
+
179
+ Current behavior:
180
+
181
+ - Bridge URL is primarily set in onboarding and persisted in app settings.
182
+ - `EXPO_PUBLIC_HOST_BRIDGE_URL` is legacy/fallback behavior, not the main source of truth.
183
+
184
+ ## Editing Rules For This Repo
185
+
186
+ - Prefer changing active source files under `apps/mobile/src` and `services/rust-bridge/src`.
187
+ - Keep bridge contract changes mirrored across:
188
+ - `services/rust-bridge/src/main.rs`
189
+ - `apps/mobile/src/api/types.ts`
190
+ - `apps/mobile/src/api/client.ts`
191
+ - relevant tests and docs
192
+ - If you change secure setup/runtime behavior, check:
193
+ - `scripts/setup-wizard.sh`
194
+ - `scripts/setup-secure-dev.sh`
195
+ - `scripts/start-bridge-secure.sh`
196
+ - `scripts/start-expo.sh`
197
+ - `docs/setup-and-operations.md`
198
+ - `docs/troubleshooting.md`
199
+ - Do not confuse `apps/mobile/ios` with the older repo-root `ios/` directory.
200
+ - Do not edit vendored/generated files unless the change is deliberately maintained through a script or checked-in config.
104
201
 
105
202
  ## Testing Expectations
106
- - Current safety net is lint + typecheck + manual smoke tests.
107
- - Minimum pre-merge checks:
108
- - `npm run lint`
109
- - `npm run typecheck`
110
- - exercise bridge endpoints and WS flow
111
- - open mobile app and verify Threads + Terminal + Git screens
112
- - Add tests for new API behavior when feasible (no test harness is currently configured).
203
+
204
+ ### Automated checks
205
+
206
+ From repo root:
207
+
208
+ - `npm run lint`
209
+ - `npm run typecheck`
210
+ - `npm run build`
211
+ - `npm run test`
212
+
213
+ Workspace-specific:
214
+
215
+ - `npm run -w apps/mobile lint`
216
+ - `npm run -w apps/mobile typecheck`
217
+ - `npm run -w apps/mobile test`
218
+ - `cargo fmt --check` / `cargo check` / `cargo test` in `services/rust-bridge`
219
+
220
+ ### Existing test coverage
221
+
222
+ - `apps/mobile` has Jest unit tests for API mapping, websocket logic, notification helpers, and small UI helpers
223
+ - `services/mac-bridge` has the densest unit-test coverage among service layers
224
+ - `services/rust-bridge` relies on `cargo test` plus inline/unit coverage in `main.rs`; there is not a separate large test harness
225
+
226
+ ### Manual smoke tests
227
+
228
+ Use `docs/setup-and-operations.md` as the canonical smoke-test runbook. Minimum manual validation for meaningful product changes usually includes:
229
+
230
+ - onboarding / connection
231
+ - creating and running a chat
232
+ - approvals or plan-mode flow when relevant
233
+ - git actions if git-related code changed
234
+ - attachments or voice if those paths changed
235
+
236
+ ## Security Guardrails
237
+
238
+ - Treat the bridge as private-network only.
239
+ - Never expose the current bridge directly to the public internet.
240
+ - `BRIDGE_ALLOW_INSECURE_NO_AUTH=true` disables auth and is for local debugging only.
241
+ - Bearer auth is preferred; query-token auth exists for mobile compatibility and Android WebSocket fallback.
242
+ - `BRIDGE_ALLOW_OUTSIDE_ROOT_CWD` defaults to permissive behavior unless explicitly disabled. Be careful when changing terminal/git cwd logic.
243
+ - Terminal execution and git mutation are high-risk surfaces. Any new execution endpoint needs explicit auth and scope review first.
113
244
 
114
245
  ## Common Pitfalls
115
- - Bridge requires accessible `codex` CLI and `git` binaries in runtime PATH.
116
- - On real devices, use LAN host for bridge URL instead of localhost.
117
- - Endpoint changes must be mirrored in mobile `src/api/types.ts` + client methods.
118
- - Keep environment handling explicit; avoid relying on implicit cwd assumptions.
119
- - If Expo Go shows a Worklets JS/native mismatch, run `npx expo install --fix` in `apps/mobile` and reinstall cleanly.
120
- - If Expo shows `Failed to create a worklet`, ensure `apps/mobile/babel.config.js` includes `plugins: ['react-native-reanimated/plugin']` and restart with `expo start --clear`.
246
+
247
+ - Two iOS trees exist. The active mobile app is under `apps/mobile/ios`, not repo-root `ios/`.
248
+ - Real devices must use LAN/Tailscale bridge URLs, not localhost.
249
+ - `MainScreen.tsx` is very large; broad refactors there are risky.
250
+ - Android cleartext bridge access is intentionally enabled by the Expo config plugin for local/private HTTP development.
251
+ - Worklets/Reanimated issues are usually cache/install problems, not missing config. `babel.config.js` already includes the required plugin.
252
+ - If setup, auth, Expo startup, QR/networking, or interrupt behavior breaks, use `docs/troubleshooting.md` instead of reinventing recovery steps.
253
+
254
+ ## When To Update Docs
255
+
256
+ Update the relevant docs when changing these areas:
257
+
258
+ - Setup, env flow, bridge start, or verification:
259
+ - `docs/setup-and-operations.md`
260
+ - Runtime recovery steps:
261
+ - `docs/troubleshooting.md`
262
+ - Realtime/live-sync behavior:
263
+ - `docs/realtime-streaming-limitations.md`
264
+ - Voice recording/transcription behavior:
265
+ - `docs/voice-transcription.md`
266
+ - EAS/native build or store release flow:
267
+ - `docs/eas-builds.md`
268
+ - Legal/license obligations:
269
+ - `docs/open-source-license-requirements.md`
270
+ - `docs/privacy-policy.md`
271
+ - `docs/terms-of-service.md`
272
+
273
+ Keep `AGENTS.md` as the repo-wide orientation layer. Keep detailed procedures in `docs/`.
package/README.md CHANGED
@@ -21,6 +21,17 @@ This project is intended for trusted/private networking (Tailscale or local LAN)
21
21
 
22
22
  ## Quick Start
23
23
 
24
+ ## Download Mobile App
25
+
26
+ - Android APK: download from the latest GitHub release assets
27
+ <https://github.com/Mohit-Patil/clawdex-mobile/releases/latest>
28
+ - iOS (TestFlight): share your TestFlight invite/public link with testers : https://testflight.apple.com/join/4GRsQQKF
29
+
30
+ Recommended release-note format for Android:
31
+
32
+ - `Android APK: <direct asset URL>`
33
+ - `SHA-256: <apk checksum>`
34
+
24
35
  ### Option A: Published CLI (recommended)
25
36
 
26
37
  ```bash
@@ -2,5 +2,5 @@ EXPO_PUBLIC_HOST_BRIDGE_TOKEN=change-me
2
2
  EXPO_PUBLIC_ALLOW_QUERY_TOKEN_AUTH=true
3
3
  EXPO_PUBLIC_ALLOW_INSECURE_REMOTE_BRIDGE=false
4
4
  EXPO_PUBLIC_EXTERNAL_STATUS_FULL_SYNC_DEBOUNCE_MS=450
5
- EXPO_PUBLIC_PRIVACY_POLICY_URL=https://example.com/privacy
6
- EXPO_PUBLIC_TERMS_OF_SERVICE_URL=https://example.com/terms
5
+ EXPO_PUBLIC_PRIVACY_POLICY_URL=https://github.com/Mohit-Patil/clawdex-mobile/blob/main/docs/privacy-policy.md
6
+ EXPO_PUBLIC_TERMS_OF_SERVICE_URL=https://github.com/Mohit-Patil/clawdex-mobile/blob/main/docs/terms-of-service.md