clawdex-mobile 5.1.3-internal.2 → 5.1.3-internal.4

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/README.md CHANGED
@@ -70,7 +70,8 @@ Notes:
70
70
  - Browser preview uses a second forwarded port (`8788` by default), so both ports need public visibility.
71
71
  - GitHub resets public forwarded ports back to private when a codespace restarts. Restarting the bridge reruns the visibility step.
72
72
  - If automatic visibility setup fails, run `gh codespace ports visibility 8787:public 8788:public`.
73
- - If the mobile app is built with `EXPO_PUBLIC_GITHUB_APP_CLIENT_ID` and `EXPO_PUBLIC_GITHUB_APP_SLUG`, users can now tap `Use GitHub Codespaces` in onboarding/settings, sign in with GitHub, approve the Claudex GitHub App for only the repositories they want, pick a Codespace, and connect without manually copying the bridge token.
73
+ - If the mobile app is built with `EXPO_PUBLIC_GITHUB_APP_CLIENT_ID`, `EXPO_PUBLIC_GITHUB_APP_SLUG`, and `EXPO_PUBLIC_GITHUB_APP_AUTH_BASE_URL`, users can now tap `Use GitHub Codespaces` in onboarding/settings, complete one in-app GitHub App install/auth flow, pick a Codespace, and connect without manually copying the bridge token.
74
+ - The tiny auth backend for that flow lives in `services/github-app-auth-worker`. Point the GitHub App callback URL at `https://<your-domain>/github/callback` and enable `Request user authorization (OAuth) during installation`.
74
75
  - The app can also create a new repo-backed Codespace directly. It prefers `<signed-in-user>/<EXPO_PUBLIC_GITHUB_CODESPACES_REPO_NAME>` first. If that repo does not exist, it automatically forks `EXPO_PUBLIC_GITHUB_CODESPACES_SOURCE_OWNER/<EXPO_PUBLIC_GITHUB_CODESPACES_REPO_NAME>` into the signed-in user account, then creates the Codespace there.
75
76
 
76
77
  This repo now also includes a Codespaces bootstrap flow. On Codespace start/resume, `.devcontainer/devcontainer.json` runs:
@@ -119,6 +120,16 @@ npm run setup:wizard
119
120
  npm run mobile
120
121
  ```
121
122
 
123
+ For one-step restarts that switch the bridge network mode, reuse the existing token, start the
124
+ bridge in the background, and then launch Expo:
125
+
126
+ ```bash
127
+ npm run stack:lan
128
+ npm run stack:tailscale
129
+ ```
130
+
131
+ `stack:lan` is the local network path, so it also covers the same-device LAN/VLAN case.
132
+
122
133
  For an OpenCode-first repo checkout:
123
134
 
124
135
  ```bash
@@ -136,6 +147,8 @@ Use `npm run setup:wizard -- --no-start` if you only want to write config.
136
147
  - `npm run setup:wizard`
137
148
  - `npm run secure:bridge`
138
149
  - `npm run mobile`
150
+ - `npm run stack:lan`
151
+ - `npm run stack:tailscale`
139
152
  - `npm run ios`
140
153
  - `npm run android`
141
154
  - `npm run stop:services`
@@ -63,11 +63,18 @@ Important constraints:
63
63
  - Browser preview uses the preview port (`8788` by default), so that forwarded port must also be public
64
64
  - GitHub resets public forwarded ports back to private whenever the codespace restarts
65
65
  - Keep bridge auth enabled and use Codespaces only for repos you trust, because public forwarded ports are internet-reachable
66
- - If the mobile app build sets `EXPO_PUBLIC_GITHUB_APP_CLIENT_ID` and `EXPO_PUBLIC_GITHUB_APP_SLUG`, onboarding/settings can now sign in with GitHub, approve the Claudex GitHub App for only the repositories they want, start the Codespace, and connect directly with the same GitHub App user token instead of copying `BRIDGE_AUTH_TOKEN`
66
+ - If the mobile app build sets `EXPO_PUBLIC_GITHUB_APP_CLIENT_ID`, `EXPO_PUBLIC_GITHUB_APP_SLUG`, and `EXPO_PUBLIC_GITHUB_APP_AUTH_BASE_URL`, onboarding/settings can now open one GitHub App install/auth flow, approve only the repositories they want, start the Codespace, and connect directly with the same GitHub App user token instead of copying `BRIDGE_AUTH_TOKEN`
67
67
  - That same in-app GitHub sign-in also bootstraps GitHub git auth inside the Codespace so `git clone`, `git push`, GitHub HTTPS remotes, and common `git@github.com:...` SSH-style remotes can reuse the app login without extra account setup
68
68
  - The same in-app GitHub flow can create a new Codespace. It prefers `<signed-in-user>/<EXPO_PUBLIC_GITHUB_CODESPACES_REPO_NAME>`. If that repo does not exist yet, Clawdex automatically forks `EXPO_PUBLIC_GITHUB_CODESPACES_SOURCE_OWNER/<EXPO_PUBLIC_GITHUB_CODESPACES_REPO_NAME>` into the signed-in user account and creates the Codespace from that fork
69
69
  - Older saved GitHub Codespaces sessions may need one fresh sign-in from the app so the stored GitHub App token and refresh token are updated
70
70
 
71
+ For the one-flow GitHub App setup:
72
+
73
+ - deploy the tiny auth service under `services/github-app-auth-worker`
74
+ - set the GitHub App `Callback URL` to `https://<your-domain>/github/callback`
75
+ - enable `Request user authorization (OAuth) during installation`
76
+ - set the mobile env `EXPO_PUBLIC_GITHUB_APP_AUTH_BASE_URL=https://<your-domain>`
77
+
71
78
  Manual recovery if port visibility does not update automatically:
72
79
 
73
80
  ```bash
@@ -176,6 +183,18 @@ npm run mobile
176
183
 
177
184
  `npm run mobile` uses `scripts/start-expo.sh`, which sets `REACT_NATIVE_PACKAGER_HOSTNAME` from your secure config so QR resolution is predictable.
178
185
 
186
+ If you want one command that switches the bridge between LAN/VLAN and Tailscale, preserves your
187
+ existing bridge token and enabled harnesses, restarts the bridge in the background, and then opens
188
+ Expo:
189
+
190
+ ```bash
191
+ npm run stack:lan
192
+ npm run stack:tailscale
193
+ ```
194
+
195
+ Both wrappers call `scripts/start-mobile-stack.sh`. Pass `--expo ios` or `--expo android` if you
196
+ want the same flow but to open a native Expo run command instead of the default `mobile` mode.
197
+
179
198
  ## Advanced Knobs
180
199
 
181
200
  Optional environment variables:
@@ -273,6 +292,7 @@ npm run teardown -- --yes
273
292
  | `EXPO_PUBLIC_HOST_BRIDGE_TOKEN` | token used by local mobile dev builds |
274
293
  | `EXPO_PUBLIC_GITHUB_APP_CLIENT_ID` | GitHub App client ID for in-app Codespaces sign-in |
275
294
  | `EXPO_PUBLIC_GITHUB_APP_SLUG` | GitHub App slug used to open install/manage-access pages for repository selection |
295
+ | `EXPO_PUBLIC_GITHUB_APP_AUTH_BASE_URL` | HTTPS origin for the GitHub App auth worker (`/api/github/exchange`, `/api/github/refresh`, `/github/callback`) |
276
296
  | `EXPO_PUBLIC_GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN` | forwarded port domain used to derive Codespaces bridge URLs (`app.github.dev` by default) |
277
297
  | `EXPO_PUBLIC_GITHUB_CODESPACES_REPO_NAME` | repository name to sort matching Codespaces first in the in-app picker |
278
298
  | `EXPO_PUBLIC_GITHUB_CODESPACES_SOURCE_OWNER` | template/source repository owner used for automatic forking when the signed-in user does not have a same-name repo |
@@ -53,7 +53,8 @@ gh codespace ports visibility 8787:public 8788:public
53
53
 
54
54
  - If `gh` is unavailable in the codespace, use the Codespaces `Ports` panel and change both forwarded ports to `Public`.
55
55
  - Keep bridge auth enabled. Public forwarded ports without bridge auth are not a safe setup.
56
- - If GitHub direct sign-in is not showing in the app, confirm the build includes `EXPO_PUBLIC_GITHUB_APP_CLIENT_ID` and `EXPO_PUBLIC_GITHUB_APP_SLUG`.
56
+ - If GitHub direct sign-in is not showing in the app, confirm the build includes `EXPO_PUBLIC_GITHUB_APP_CLIENT_ID`, `EXPO_PUBLIC_GITHUB_APP_SLUG`, and `EXPO_PUBLIC_GITHUB_APP_AUTH_BASE_URL`.
57
+ - If the GitHub browser sheet returns but sign-in still fails, confirm the GitHub App callback URL is `https://<your-domain>/github/callback` and that `Request user authorization (OAuth) during installation` is enabled.
57
58
  - If the app signs in but still cannot create a Codespace or clone/push inside it, reopen the GitHub App access step in the app and make sure the template repo and any target repos are selected for the installation.
58
59
  - If in-app Codespace creation forks or targets the wrong repo, check `EXPO_PUBLIC_GITHUB_CODESPACES_REPO_NAME`, `EXPO_PUBLIC_GITHUB_CODESPACES_SOURCE_OWNER`, and `EXPO_PUBLIC_GITHUB_CODESPACES_REPO_REF` in the mobile build env.
59
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawdex-mobile",
3
- "version": "5.1.3-internal.2",
3
+ "version": "5.1.3-internal.4",
4
4
  "description": "Private-network mobile bridge and CLI for Codex and OpenCode",
5
5
  "keywords": [
6
6
  "codex",
@@ -52,6 +52,8 @@
52
52
  "mobile": "./scripts/start-expo.sh mobile",
53
53
  "ios": "./scripts/start-expo.sh ios",
54
54
  "android": "./scripts/start-expo.sh android",
55
+ "stack:lan": "./scripts/start-mobile-stack-lan.sh",
56
+ "stack:tailscale": "./scripts/start-mobile-stack-tailscale.sh",
55
57
  "bridge": "BRIDGE_WORKDIR=$(pwd) npm run -w @codex/rust-bridge dev",
56
58
  "bridge:package:stage-current": "node ./scripts/bridge-binary.js stage-current",
57
59
  "setup:wizard": "./scripts/setup-wizard.sh",