dsh-workbuddy-bridge-mobile 1.2.2 → 1.2.3

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/host.js +6 -7
  2. package/package.json +1 -1
package/host.js CHANGED
@@ -46,12 +46,15 @@ function norm(config) {
46
46
  function resolvePython(config) {
47
47
  if (config.pythonBin && existsSync(config.pythonBin)) return config.pythonBin;
48
48
  const candidates = [
49
- "/data/data/com.dsharnessmobile.shell/files/usr/bin/python3",
50
49
  "/usr/bin/python3",
50
+ "/usr/local/bin/python3",
51
+ "/opt/homebrew/bin/python3",
51
52
  ];
52
53
  for (const dir of (process.env.PATH ?? "").split(":")) {
53
- const p = join(dir, "python3");
54
- if (existsSync(p)) return p;
54
+ for (const nm of ["python3", "python"]) {
55
+ const p = join(dir, nm);
56
+ if (existsSync(p)) return p;
57
+ }
55
58
  }
56
59
  for (const p of candidates) if (existsSync(p)) return p;
57
60
  return "python3";
@@ -62,7 +65,6 @@ function resolveEngine(name_) {
62
65
  const anchors = [
63
66
  process.env.DSH_INSTALL_DIR,
64
67
  process.env.DSH_PROFILE_DIR,
65
- "/data/data/com.dsharnessmobile.shell/files/usr/lib/node_modules/@deepseek-ai/dsh",
66
68
  join(homedir(), ".dsh/profiles/web"),
67
69
  ].filter(Boolean);
68
70
  for (const a of anchors) {
@@ -72,7 +74,6 @@ function resolveEngine(name_) {
72
74
  }
73
75
  // 兜底:全局 node_modules 里也可能装着引擎
74
76
  for (const g of [
75
- "/data/data/com.dsharnessmobile.shell/files/usr/lib/node_modules",
76
77
  "/usr/local/lib/node_modules",
77
78
  "/usr/lib/node_modules",
78
79
  join(homedir(), ".npm-global/lib/node_modules"),
@@ -893,8 +894,6 @@ export function apply(ctx, configRaw) {
893
894
  const candidates = [
894
895
  args?.path,
895
896
  join(homedir(), "../app_webview/Profile 1/Cookies"),
896
- "/data/data/com.dsharnessmobile.shell/app_webview/Profile 1/Cookies",
897
- "/data/data/com.dsharnessmobile.shell/app_webview/Default/Cookies",
898
897
  ].filter(Boolean);
899
898
  const src = candidates.find((p) => { try { return existsSync(p); } catch { return false; } });
900
899
  if (!src) return { error: "找不到 WebView Cookies 数据库,请手动传 path", tried: candidates };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workbuddy-bridge-mobile",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "type": "module",
5
5
  "description": "Runs local account bridges for WorkBuddy and Doubao (OpenAI-compatible gateways plus login/quota/image tools) and mounts both accounts' models into the DSH model selector.",
6
6
  "license": "MIT",