clawdex-mobile 5.1.3-internal.12 → 5.1.3-internal.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawdex-mobile",
3
- "version": "5.1.3-internal.12",
3
+ "version": "5.1.3-internal.13",
4
4
  "description": "Private-network mobile bridge and CLI for Codex, OpenCode, and Cursor",
5
5
  "keywords": [
6
6
  "codex",
@@ -13,12 +13,7 @@ MOBILE_ENV_EXAMPLE="$ROOT_DIR/apps/mobile/.env.example"
13
13
  BRIDGE_ACTIVE_ENGINE="${BRIDGE_ACTIVE_ENGINE:-codex}"
14
14
  BRIDGE_ENABLED_ENGINES="${BRIDGE_ENABLED_ENGINES:-$BRIDGE_ACTIVE_ENGINE}"
15
15
  OPENCODE_CLI_BIN="${OPENCODE_CLI_BIN:-opencode}"
16
- BUNDLED_CURSOR_APP_SERVER_BIN="$PACKAGE_ROOT/services/cursor-app-server/dist/stdio.js"
17
- if [[ -z "${CURSOR_APP_SERVER_BIN:-}" && -x "$BUNDLED_CURSOR_APP_SERVER_BIN" ]]; then
18
- CURSOR_APP_SERVER_BIN="$BUNDLED_CURSOR_APP_SERVER_BIN"
19
- else
20
- CURSOR_APP_SERVER_BIN="${CURSOR_APP_SERVER_BIN:-cursor-app-server}"
21
- fi
16
+ CURSOR_APP_SERVER_BIN="${CURSOR_APP_SERVER_BIN:-cursor-app-server}"
22
17
  CURSOR_API_KEY="${CURSOR_API_KEY:-}"
23
18
  CURSOR_MODEL="${CURSOR_MODEL:-}"
24
19
  BRIDGE_CONNECT_URL=""
@@ -1296,38 +1296,19 @@ ensure_cursor_app_server() {
1296
1296
  local existing_api_key=""
1297
1297
  local existing_model=""
1298
1298
  local provided_api_key="${CURSOR_API_KEY:-}"
1299
- local bundled_cursor_app_server_bin="$PACKAGE_ROOT/services/cursor-app-server/dist/stdio.js"
1300
1299
  local resolved_cursor_app_server_bin=""
1301
1300
 
1302
- if [[ -f "$PACKAGE_ROOT/services/cursor-app-server/src/stdio.ts" ]]; then
1303
- info "Building Cursor app-server package."
1304
- npm run build -w @clawdex/cursor-app-server
1305
- hash -r
1306
- fi
1307
-
1308
- if command -v cursor-app-server >/dev/null 2>&1; then
1301
+ if [[ -n "${CURSOR_APP_SERVER_BIN:-}" ]]; then
1302
+ resolved_cursor_app_server_bin="$CURSOR_APP_SERVER_BIN"
1303
+ elif command -v cursor-app-server >/dev/null 2>&1; then
1309
1304
  resolved_cursor_app_server_bin="$(command -v cursor-app-server)"
1310
- elif [[ -x "$bundled_cursor_app_server_bin" ]]; then
1311
- resolved_cursor_app_server_bin="$bundled_cursor_app_server_bin"
1312
1305
  fi
1313
1306
 
1314
- while [[ -z "$resolved_cursor_app_server_bin" ]]; do
1315
- warn "Cursor app-server command not found in PATH."
1316
- warn "Cursor app-server is bundled with clawdex-mobile. Reinstall or upgrade clawdex-mobile, then rerun setup."
1317
-
1318
- if ! confirm_prompt "Retry Cursor app-server check?" "Y"; then
1319
- abort_wizard "Install or upgrade clawdex-mobile and rerun: clawdex init --engine cursor"
1320
- fi
1321
-
1322
- hash -r
1323
- if command -v cursor-app-server >/dev/null 2>&1; then
1324
- resolved_cursor_app_server_bin="$(command -v cursor-app-server)"
1325
- elif [[ -x "$bundled_cursor_app_server_bin" ]]; then
1326
- resolved_cursor_app_server_bin="$bundled_cursor_app_server_bin"
1327
- fi
1328
- done
1307
+ if [[ -z "$resolved_cursor_app_server_bin" ]]; then
1308
+ abort_wizard "cursor-app-server was not found. Upgrade clawdex-mobile so npm links the bundled command, then rerun: clawdex init --engine cursor"
1309
+ fi
1329
1310
 
1330
- CURSOR_APP_SERVER_BIN="${CURSOR_APP_SERVER_BIN:-$resolved_cursor_app_server_bin}"
1311
+ CURSOR_APP_SERVER_BIN="$resolved_cursor_app_server_bin"
1331
1312
  ok "Found cursor-app-server: $CURSOR_APP_SERVER_BIN"
1332
1313
 
1333
1314
  existing_api_key="$(extract_env_value "$SECURE_ENV_FILE" "CURSOR_API_KEY")"
@@ -1753,8 +1734,7 @@ ensure_core_tools
1753
1734
  if has_packaged_bridge_binary; then
1754
1735
  ok "Found packaged Rust bridge binary for this host."
1755
1736
  else
1756
- info "No packaged bridge binary found for this host. Falling back to local Rust build."
1757
- ensure_local_rust_build_toolchain
1737
+ abort_wizard "No packaged bridge binary found for this host. Reinstall clawdex-mobile so npm installs the bundled bridge binary, then rerun setup."
1758
1738
  fi
1759
1739
 
1760
1740
  section "Config handling"
@@ -377,48 +377,6 @@ function commandExists(command) {
377
377
  return result.status === 0;
378
378
  }
379
379
 
380
- function walkFiles(directory) {
381
- const entries = fs.readdirSync(directory, { withFileTypes: true });
382
- const files = [];
383
-
384
- for (const entry of entries) {
385
- const entryPath = path.join(directory, entry.name);
386
- if (entry.isDirectory()) {
387
- files.push(...walkFiles(entryPath));
388
- continue;
389
- }
390
- if (entry.isFile()) {
391
- files.push(entryPath);
392
- }
393
- }
394
-
395
- return files;
396
- }
397
-
398
- function isBuiltBinaryFresh(packageDir, binaryPath) {
399
- if (!fs.existsSync(binaryPath)) {
400
- return false;
401
- }
402
-
403
- const binaryMtime = fs.statSync(binaryPath).mtimeMs;
404
- const watchPaths = [
405
- path.join(packageDir, "services", "rust-bridge", "Cargo.toml"),
406
- path.join(packageDir, "services", "rust-bridge", "Cargo.lock"),
407
- ];
408
- const sourceDir = path.join(packageDir, "services", "rust-bridge", "src");
409
-
410
- if (fs.existsSync(sourceDir)) {
411
- watchPaths.push(...walkFiles(sourceDir));
412
- }
413
-
414
- return watchPaths.every((watchPath) => {
415
- if (!fs.existsSync(watchPath)) {
416
- return true;
417
- }
418
- return fs.statSync(watchPath).mtimeMs <= binaryMtime;
419
- });
420
- }
421
-
422
380
  function printMissingCompilerHint() {
423
381
  if (process.platform === "win32") {
424
382
  console.error("Install Visual Studio Build Tools (Desktop development with C++) and Rust, then retry.");
@@ -615,20 +573,15 @@ function resolveLaunch(workspaceDir, packageDir, env, { devMode, forceSourceBuil
615
573
  }
616
574
 
617
575
  const builtBinary = builtBinaryPath(packageDir, os.platform(), buildProfile);
618
- if (isBuiltBinaryFresh(packageDir, builtBinary)) {
619
- ensureExecutable(builtBinary);
620
- return {
621
- command: builtBinary,
622
- args: [],
623
- cwd: workspaceDir,
624
- env,
625
- healthTimeoutMs: defaultHealthTimeoutMs,
626
- };
576
+
577
+ if (!forceSourceBuild) {
578
+ console.error("error: no packaged bridge binary was found for this host.");
579
+ console.error("Reinstall a published clawdex-mobile package with bundled bridge binaries.");
580
+ process.exit(1);
627
581
  }
628
582
 
629
583
  if (!commandExists("cargo")) {
630
- console.error("error: no packaged bridge binary was found for this host, and cargo is not installed.");
631
- console.error("Reinstall a published clawdex-mobile package with bundled bridge binaries, or install Rust and retry.");
584
+ console.error("error: CLAWDEX_BRIDGE_FORCE_SOURCE_BUILD=true was set, but cargo is not installed.");
632
585
  process.exit(1);
633
586
  }
634
587
 
@@ -149,7 +149,7 @@ dependencies = [
149
149
 
150
150
  [[package]]
151
151
  name = "codex-rust-bridge"
152
- version = "5.1.3-internal.12"
152
+ version = "5.1.3-internal.13"
153
153
  dependencies = [
154
154
  "axum",
155
155
  "base64",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "codex-rust-bridge"
3
- version = "5.1.3-internal.12"
3
+ version = "5.1.3-internal.13"
4
4
  edition = "2021"
5
5
 
6
6
  [dependencies]