clawdex-mobile 2.0.1 → 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.
- package/.github/workflows/pages.yml +41 -0
- package/AGENTS.md +263 -110
- package/README.md +1 -1
- package/apps/mobile/.env.example +2 -2
- package/apps/mobile/App.tsx +175 -14
- package/apps/mobile/app.json +27 -9
- package/apps/mobile/eas.json +14 -4
- package/apps/mobile/package.json +13 -13
- package/apps/mobile/src/api/__tests__/chatMapping.test.ts +219 -0
- package/apps/mobile/src/api/__tests__/client.test.ts +579 -6
- package/apps/mobile/src/api/__tests__/ws.test.ts +27 -0
- package/apps/mobile/src/api/account.ts +47 -0
- package/apps/mobile/src/api/chatMapping.ts +435 -18
- package/apps/mobile/src/api/client.ts +296 -36
- package/apps/mobile/src/api/rateLimits.ts +143 -0
- package/apps/mobile/src/api/types.ts +106 -0
- package/apps/mobile/src/api/ws.ts +10 -1
- package/apps/mobile/src/components/ChatHeader.tsx +12 -12
- package/apps/mobile/src/components/ChatInput.tsx +154 -88
- package/apps/mobile/src/components/ChatMessage.tsx +548 -93
- package/apps/mobile/src/components/ComposerUsageLimits.tsx +167 -0
- package/apps/mobile/src/components/SelectionSheet.tsx +466 -0
- package/apps/mobile/src/components/ToolBlock.tsx +17 -15
- package/apps/mobile/src/components/VoiceRecordingWaveform.tsx +181 -0
- package/apps/mobile/src/components/WorkspacePickerModal.tsx +572 -0
- package/apps/mobile/src/components/__tests__/chat-input-layout.test.ts +35 -0
- package/apps/mobile/src/components/__tests__/chatImageSource.test.ts +44 -0
- package/apps/mobile/src/components/__tests__/composerUsageLimits.test.ts +138 -0
- package/apps/mobile/src/components/__tests__/voiceWaveform.test.ts +31 -0
- package/apps/mobile/src/components/chat-input-layout.ts +59 -0
- package/apps/mobile/src/components/chatImageSource.ts +86 -0
- package/apps/mobile/src/components/usageLimitBadges.ts +109 -0
- package/apps/mobile/src/components/voiceWaveform.ts +46 -0
- package/apps/mobile/src/config.ts +9 -2
- package/apps/mobile/src/hooks/useVoiceRecorder.ts +8 -1
- package/apps/mobile/src/navigation/DrawerContent.tsx +607 -457
- package/apps/mobile/src/navigation/__tests__/chatThreadTree.test.ts +89 -0
- package/apps/mobile/src/navigation/__tests__/drawerChats.test.ts +65 -0
- package/apps/mobile/src/navigation/chatThreadTree.ts +191 -0
- package/apps/mobile/src/navigation/drawerChats.ts +9 -0
- package/apps/mobile/src/screens/GitScreen.tsx +2 -0
- package/apps/mobile/src/screens/MainScreen.tsx +4244 -1237
- package/apps/mobile/src/screens/OnboardingScreen.tsx +2 -0
- package/apps/mobile/src/screens/SettingsScreen.tsx +256 -226
- package/apps/mobile/src/screens/TerminalScreen.tsx +2 -5
- package/apps/mobile/src/screens/__tests__/agentThreadDisplay.test.ts +80 -0
- package/apps/mobile/src/screens/__tests__/agentThreads.test.ts +170 -0
- package/apps/mobile/src/screens/__tests__/planCardState.test.ts +88 -0
- package/apps/mobile/src/screens/__tests__/subAgentTranscript.test.ts +102 -0
- package/apps/mobile/src/screens/__tests__/transcriptMessages.test.ts +97 -0
- package/apps/mobile/src/screens/agentThreadDisplay.ts +261 -0
- package/apps/mobile/src/screens/agentThreads.ts +167 -0
- package/apps/mobile/src/screens/planCardState.ts +40 -0
- package/apps/mobile/src/screens/subAgentTranscript.ts +149 -0
- package/apps/mobile/src/screens/transcriptMessages.ts +102 -0
- package/apps/mobile/src/theme.ts +6 -12
- package/docs/codex-app-server-cli-gap-tracker.md +14 -5
- package/docs/privacy-policy.md +54 -0
- package/docs/setup-and-operations.md +4 -3
- package/docs/terms-of-service.md +33 -0
- package/package.json +3 -3
- package/services/mac-bridge/package.json +6 -6
- package/services/rust-bridge/Cargo.lock +56 -47
- package/services/rust-bridge/Cargo.toml +1 -1
- package/services/rust-bridge/package.json +1 -1
- package/services/rust-bridge/src/main.rs +507 -9
- package/site/index.html +54 -0
- package/site/privacy/index.html +80 -0
- package/site/styles.css +135 -0
- package/site/support/index.html +51 -0
- 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
|
-
##
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- `
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- `
|
|
46
|
-
- `
|
|
47
|
-
- `
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
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
|
-
|
|
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
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
-
|
|
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
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
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
|
-
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
-
|
|
120
|
-
-
|
|
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
|
@@ -25,7 +25,7 @@ This project is intended for trusted/private networking (Tailscale or local LAN)
|
|
|
25
25
|
|
|
26
26
|
- Android APK: download from the latest GitHub release assets
|
|
27
27
|
<https://github.com/Mohit-Patil/clawdex-mobile/releases/latest>
|
|
28
|
-
- iOS (TestFlight): share your TestFlight invite/public link with testers
|
|
28
|
+
- iOS (TestFlight): share your TestFlight invite/public link with testers : https://testflight.apple.com/join/4GRsQQKF
|
|
29
29
|
|
|
30
30
|
Recommended release-note format for Android:
|
|
31
31
|
|
package/apps/mobile/.env.example
CHANGED
|
@@ -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://
|
|
6
|
-
EXPO_PUBLIC_TERMS_OF_SERVICE_URL=https://
|
|
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
|