openclaw-multi-auto 1.7.7 → 1.7.9

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 (135) hide show
  1. package/dist/{agent-BomWJjOy.js → agent-Bf9VxLj8.js} +10 -10
  2. package/dist/{audio-preflight-CZHCr2-5.js → audio-preflight-DKt9ICbJ.js} +9 -9
  3. package/dist/{audit-membership-runtime-fBOVjLNx.js → audit-membership-runtime-0b4ZhE41.js} +4 -4
  4. package/dist/auth-profiles.runtime-pDQ4QesA.js +11 -0
  5. package/dist/build-info.json +3 -3
  6. package/dist/bundled/boot-md/handler.js +10 -10
  7. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  8. package/dist/bundled/command-logger/handler.js +2 -2
  9. package/dist/bundled/session-memory/handler.js +9 -9
  10. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  11. package/dist/compact.runtime-Y7wbaDO2.js +11 -0
  12. package/dist/deliver-runtime-DBYdmfDR.js +11 -0
  13. package/dist/{fetch-BdTTF2z-.js → fetch-sH_NN8SV.js} +2 -2
  14. package/dist/{frontmatter-DZlWsaUx.js → frontmatter-DhmdUnBP.js} +3 -3
  15. package/dist/{github-copilot-token-BeFx3MLn.js → github-copilot-token-368sRGBD.js} +7 -7
  16. package/dist/image-runtime-XMz7IM-j.js +11 -0
  17. package/dist/llm-slug-generator.js +9 -9
  18. package/dist/{logger-DCBlX1uz.js → logger-C0l_Gj8Y.js} +7 -7
  19. package/dist/{login-CKmmxErc.js → login-aLc84rc7.js} +4 -4
  20. package/dist/{login-qr-KVA4wuh0.js → login-qr-D3QtIyy8.js} +10 -10
  21. package/dist/manager-runtime-D8C3_L2_.js +11 -0
  22. package/dist/{manager.runtime-BV-CBNb2.js → manager.runtime-ilRhqZW0.js} +10 -10
  23. package/dist/{model-selection-CNRMBWfR.js → model-selection-G7SiAgN6.js} +287 -287
  24. package/dist/{paths-CNIc83Pn.js → paths-BwJ6yG6k.js} +5 -5
  25. package/dist/pi-model-discovery-runtime-DgHKNg0i.js +11 -0
  26. package/dist/{pi-tools.before-tool-call.runtime-DgAiY2la.js → pi-tools.before-tool-call.runtime-Be9V6RlN.js} +9 -9
  27. package/dist/plugin-sdk/{audio-preflight-CVWl4NKo.js → audio-preflight-yyFn-I5K.js} +12 -12
  28. package/dist/plugin-sdk/{audit-membership-runtime-D1VvFm38.js → audit-membership-runtime-DHo6vLy0.js} +5 -5
  29. package/dist/plugin-sdk/{auth-profiles.runtime-Cy2e2Wah.js → auth-profiles.runtime-DN3bNNeo.js} +12 -12
  30. package/dist/plugin-sdk/{bluebubbles-B_tcmPhi.js → bluebubbles-BPDNQxEz.js} +1 -1
  31. package/dist/plugin-sdk/bluebubbles.js +15 -15
  32. package/dist/plugin-sdk/{channel-access-GDk6vyOi.js → channel-access-BaZDvsTA.js} +1 -1
  33. package/dist/plugin-sdk/{channel-access-configure-CerQrsyV.js → channel-access-configure-DLZc22_m.js} +1 -1
  34. package/dist/plugin-sdk/{channel-config-helpers-CX9AfjCJ.js → channel-config-helpers-CFkTEzkz.js} +3 -3
  35. package/dist/plugin-sdk/{compact.runtime-0XuiRVw-.js → compact.runtime-D1HfZ8IJ.js} +12 -12
  36. package/dist/plugin-sdk/compat.js +28 -28
  37. package/dist/plugin-sdk/core.js +14 -14
  38. package/dist/plugin-sdk/{deliver-runtime-D37pd8wU.js → deliver-runtime-DrD2s_GI.js} +12 -12
  39. package/dist/plugin-sdk/device-pair.js +5 -5
  40. package/dist/plugin-sdk/diagnostics-otel.js +2 -2
  41. package/dist/plugin-sdk/{discord-dU71XVvQ.js → discord-BZR9M1Ft.js} +4 -4
  42. package/dist/plugin-sdk/discord.js +16 -16
  43. package/dist/plugin-sdk/{exec-88qB5pUO.js → exec-BvTkR9oI.js} +2 -2
  44. package/dist/plugin-sdk/feishu.js +14 -14
  45. package/dist/plugin-sdk/{fetch-guard-DEyOIg88.js → fetch-guard-Cwx1pJhf.js} +1 -1
  46. package/dist/plugin-sdk/{fetch-Cqwcg-Kq.js → fetch-yk-axchG.js} +2 -2
  47. package/dist/plugin-sdk/google-gemini-cli-auth.js +4 -4
  48. package/dist/plugin-sdk/googlechat.js +14 -14
  49. package/dist/plugin-sdk/{helpers-zm9M-XCJ.js → helpers-Cj2lgcNt.js} +1 -1
  50. package/dist/plugin-sdk/{http-registry-CR-l0QpT.js → http-registry-DyBqqyPO.js} +2 -2
  51. package/dist/plugin-sdk/{image-runtime-CSZNFoHc.js → image-runtime-ChtfQsK-.js} +12 -12
  52. package/dist/plugin-sdk/{imessage-DvtFTwJr.js → imessage-DtibPuZP.js} +3 -3
  53. package/dist/plugin-sdk/imessage.js +14 -14
  54. package/dist/plugin-sdk/{inbound-reply-dispatch-DpGprwTU.js → inbound-reply-dispatch-CfNEV0ZG.js} +1 -1
  55. package/dist/plugin-sdk/index.js +28 -28
  56. package/dist/plugin-sdk/irc.js +15 -15
  57. package/dist/plugin-sdk/{logger-D-go2oXy.js → logger-C9fkmDdb.js} +2 -2
  58. package/dist/plugin-sdk/{logger-Jt8cCPPV.js → logger-DXnvMlr-.js} +2 -2
  59. package/dist/plugin-sdk/{login-CnT14vQ1.js → login-BC7QDpvj.js} +5 -5
  60. package/dist/plugin-sdk/{login-qr-Di9Gqms7.js → login-qr-rnZFcwNs.js} +13 -13
  61. package/dist/plugin-sdk/{manager-runtime-DzCE2bL1.js → manager-runtime-B8O--3Jt.js} +12 -12
  62. package/dist/plugin-sdk/{manager.runtime-D6nT5fqn.js → manager.runtime-U_d65Qv1.js} +18 -18
  63. package/dist/plugin-sdk/matrix.js +16 -16
  64. package/dist/plugin-sdk/mattermost.js +14 -14
  65. package/dist/plugin-sdk/msteams.js +16 -16
  66. package/dist/plugin-sdk/nextcloud-talk.js +15 -15
  67. package/dist/plugin-sdk/nostr.js +4 -4
  68. package/dist/plugin-sdk/{outbound-media-CN8bsq-T.js → outbound-media-DWtG1X8J.js} +1 -1
  69. package/dist/plugin-sdk/{persistent-dedupe-CjCe_L5g.js → persistent-dedupe-BroxGf3Q.js} +1 -1
  70. package/dist/plugin-sdk/{pi-model-discovery-runtime-1vkd_hCn.js → pi-model-discovery-runtime-DWyENOD9.js} +12 -12
  71. package/dist/plugin-sdk/{pi-tools.before-tool-call.runtime-D0XEYwCa.js → pi-tools.before-tool-call.runtime-CPBeYJY2.js} +12 -12
  72. package/dist/plugin-sdk/{pw-ai-DkDE5awL.js → pw-ai-DR8Hjs-J.js} +12 -12
  73. package/dist/plugin-sdk/{qmd-manager-CguAGtaF.js → qmd-manager-3qRPZ5ye.js} +7 -7
  74. package/dist/plugin-sdk/{query-expansion-ChYs46vb.js → query-expansion-BnFYorqr.js} +5 -5
  75. package/dist/plugin-sdk/{redact-CqHkGWow.js → redact-DTcVTGFU.js} +1 -1
  76. package/dist/plugin-sdk/{run-command-nYfMDZC3.js → run-command-qzkvaQG1.js} +1 -1
  77. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-BDbgMnYK.js +24 -0
  78. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-BYZKJw25.js +23 -0
  79. package/dist/plugin-sdk/{send-BDZssl9O.js → send-BZgg6N38.js} +5 -5
  80. package/dist/plugin-sdk/{session-DPhL1rLb.js → session-Dm0FT_vI.js} +5 -5
  81. package/dist/plugin-sdk/{signal-BKMAyRnz.js → signal-Dy_XjHKL.js} +6 -6
  82. package/dist/plugin-sdk/signal.js +14 -14
  83. package/dist/plugin-sdk/{slack-jues0BBq.js → slack-DNwpGTSd.js} +3 -3
  84. package/dist/plugin-sdk/slack.js +16 -16
  85. package/dist/plugin-sdk/{slash-commands.runtime-BJ6veGjC.js → slash-commands.runtime-Bn7T59g3.js} +12 -12
  86. package/dist/plugin-sdk/{slash-dispatch.runtime-CyWyh0DI.js → slash-dispatch.runtime-BPsvStS0.js} +12 -12
  87. package/dist/plugin-sdk/{slash-skill-commands.runtime-BiDqNceZ.js → slash-skill-commands.runtime-TDVZ7jxr.js} +12 -12
  88. package/dist/plugin-sdk/{subagent-registry-runtime-BVsFNLUF.js → subagent-registry-runtime-D3DovVGQ.js} +12 -12
  89. package/dist/plugin-sdk/{subsystem-DOh66yR6.js → subsystem-DXcqLSNd.js} +1 -1
  90. package/dist/plugin-sdk/synology-chat.js +4 -4
  91. package/dist/plugin-sdk/{telegram-D3JLaXTI.js → telegram-B1RGxv8p.js} +4 -4
  92. package/dist/plugin-sdk/telegram.js +14 -14
  93. package/dist/plugin-sdk/{text-chunking-Bd2LMKfE.js → text-chunking-CaqMErUv.js} +1 -1
  94. package/dist/plugin-sdk/{thread-bindings-Cc59nx4d.js → thread-bindings-Bp_o0GHR.js} +48 -48
  95. package/dist/plugin-sdk/tlon.js +13 -13
  96. package/dist/plugin-sdk/twitch.js +14 -14
  97. package/dist/plugin-sdk/{utils-BhiRkVxe.js → utils-BQpbGej3.js} +1 -1
  98. package/dist/plugin-sdk/{vllm-setup-R5M9rOvm.js → vllm-setup-wjrX_svM.js} +2 -2
  99. package/dist/plugin-sdk/voice-call.js +12 -12
  100. package/dist/plugin-sdk/{web-BpHTS6sG.js → web-Dz6AjTQn.js} +16 -16
  101. package/dist/plugin-sdk/{webhook-targets-t3fxeJQf.js → webhook-targets-yTQuv0k1.js} +1 -1
  102. package/dist/plugin-sdk/{whatsapp-actions-BAJ27s8B.js → whatsapp-actions-C5SohPL-.js} +13 -13
  103. package/dist/plugin-sdk/{whatsapp-heartbeat-D6NF4OC0.js → whatsapp-heartbeat-_Kw4PPKA.js} +3 -3
  104. package/dist/plugin-sdk/whatsapp.js +13 -13
  105. package/dist/plugin-sdk/zalo.js +15 -15
  106. package/dist/plugin-sdk/zalouser.js +16 -16
  107. package/dist/{pw-ai-3ual6adI.js → pw-ai-BLzIHVAG.js} +9 -9
  108. package/dist/{qmd-manager-DvglNhlJ.js → qmd-manager-CFVuAj9l.js} +5 -5
  109. package/dist/{query-expansion-DXwSmE_K.js → query-expansion-DnS6CGY2.js} +8 -8
  110. package/dist/runtime-whatsapp-login.runtime-CXhM_C-C.js +13 -0
  111. package/dist/runtime-whatsapp-outbound.runtime-Kx-CVYdW.js +12 -0
  112. package/dist/{send-CXnKWzde.js → send-p1D-Lzec.js} +3 -3
  113. package/dist/{session-kt-bqE_z.js → session-DIkw9afg.js} +7 -7
  114. package/dist/slash-commands.runtime-D6R-T9zj.js +11 -0
  115. package/dist/{slash-dispatch.runtime-Cu8ghe1h.js → slash-dispatch.runtime-CgJLQTwP.js} +9 -9
  116. package/dist/slash-skill-commands.runtime-BC9oRGpm.js +11 -0
  117. package/dist/{subagent-registry-runtime-Z0fdsGSq.js → subagent-registry-runtime-DQeHzv-u.js} +9 -9
  118. package/dist/{subsystem-Cr1MiLhx.js → subsystem-CDcEQtQK.js} +14 -14
  119. package/dist/{web-CXyjF_si.js → web-gHwQkPhu.js} +12 -12
  120. package/dist/{whatsapp-actions-BUvGEDSk.js → whatsapp-actions-C1UZXBOC.js} +10 -10
  121. package/dist/{workspace-Bi8vpJN0.js → workspace-Cg3kGb1y.js} +20 -20
  122. package/package.json +1 -1
  123. package/scripts/create-instance.sh +14 -10
  124. package/dist/auth-profiles.runtime-DNqCx0L5.js +0 -11
  125. package/dist/compact.runtime-pgjSlzSY.js +0 -11
  126. package/dist/deliver-runtime-D4aWAXZ9.js +0 -11
  127. package/dist/image-runtime-Brryt_BU.js +0 -11
  128. package/dist/manager-runtime-D9AEoM1M.js +0 -11
  129. package/dist/pi-model-discovery-runtime-CDKkuBYh.js +0 -11
  130. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-UvsfFa7Q.js +0 -24
  131. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-CYBj8E4x.js +0 -23
  132. package/dist/runtime-whatsapp-login.runtime-Br3SxDXL.js +0 -13
  133. package/dist/runtime-whatsapp-outbound.runtime-L3Qkst0n.js +0 -12
  134. package/dist/slash-commands.runtime-BYfxn_xu.js +0 -11
  135. package/dist/slash-skill-commands.runtime-8dS5PTaH.js +0 -11
@@ -1,10 +1,10 @@
1
- import { f as resolveRequiredHomeDir } from "./paths-CNIc83Pn.js";
2
- import { l as danger, m as shouldLogVerbose } from "./subsystem-Cr1MiLhx.js";
3
- import { g as pathExists$1, n as logError, t as logDebug, y as resolveUserPath } from "./logger-DCBlX1uz.js";
1
+ import { f as resolveRequiredHomeDir } from "./paths-BwJ6yG6k.js";
2
+ import { l as danger, m as shouldLogVerbose } from "./subsystem-CDcEQtQK.js";
3
+ import { g as pathExists$1, n as logError, t as logDebug, y as resolveUserPath } from "./logger-C0l_Gj8Y.js";
4
4
  import fs from "node:fs/promises";
5
5
  import os from "node:os";
6
6
  import path from "node:path";
7
- import syncFs from "node:fs";
7
+ import fs$1 from "node:fs";
8
8
  import { promisify } from "node:util";
9
9
  import { execFile, spawn } from "node:child_process";
10
10
  import process$1 from "node:process";
@@ -571,7 +571,7 @@ function resolveBoundaryPathLexicalSync(params) {
571
571
  rootCanonicalPath: params.rootCanonicalPath,
572
572
  resolveParams: params.params,
573
573
  absolutePath: params.absolutePath,
574
- read: (cursor) => syncFs.lstatSync(cursor)
574
+ read: (cursor) => fs$1.lstatSync(cursor)
575
575
  });
576
576
  if (isPromiseLike(maybeStat)) throw new Error("Unexpected async lexical stat");
577
577
  const stat = maybeStat;
@@ -721,15 +721,15 @@ function resolvePathViaExistingAncestorSync(targetPath) {
721
721
  const normalized = path.resolve(targetPath);
722
722
  let cursor = normalized;
723
723
  const missingSuffix = [];
724
- while (!isFilesystemRoot(cursor) && !syncFs.existsSync(cursor)) {
724
+ while (!isFilesystemRoot(cursor) && !fs$1.existsSync(cursor)) {
725
725
  missingSuffix.unshift(path.basename(cursor));
726
726
  const parent = path.dirname(cursor);
727
727
  if (parent === cursor) break;
728
728
  cursor = parent;
729
729
  }
730
- if (!syncFs.existsSync(cursor)) return normalized;
730
+ if (!fs$1.existsSync(cursor)) return normalized;
731
731
  try {
732
- const resolvedAncestor = path.resolve(syncFs.realpathSync(cursor));
732
+ const resolvedAncestor = path.resolve(fs$1.realpathSync(cursor));
733
733
  if (missingSuffix.length === 0) return resolvedAncestor;
734
734
  return path.resolve(resolvedAncestor, ...missingSuffix);
735
735
  } catch {
@@ -754,7 +754,7 @@ function getPathKindSync(absolutePath, preserveFinalSymlink) {
754
754
  try {
755
755
  return {
756
756
  exists: true,
757
- kind: toResolvedKind(preserveFinalSymlink ? syncFs.lstatSync(absolutePath) : syncFs.statSync(absolutePath))
757
+ kind: toResolvedKind(preserveFinalSymlink ? fs$1.lstatSync(absolutePath) : fs$1.statSync(absolutePath))
758
758
  };
759
759
  } catch (error) {
760
760
  if (isNotFoundPathError(error)) return {
@@ -814,10 +814,10 @@ async function resolveSymlinkHopPath(symlinkPath) {
814
814
  }
815
815
  function resolveSymlinkHopPathSync(symlinkPath) {
816
816
  try {
817
- return path.resolve(syncFs.realpathSync(symlinkPath));
817
+ return path.resolve(fs$1.realpathSync(symlinkPath));
818
818
  } catch (error) {
819
819
  if (!isNotFoundPathError(error)) throw error;
820
- const linkTarget = syncFs.readlinkSync(symlinkPath);
820
+ const linkTarget = fs$1.readlinkSync(symlinkPath);
821
821
  return resolvePathViaExistingAncestorSync(path.resolve(path.dirname(symlinkPath), linkTarget));
822
822
  }
823
823
  }
@@ -841,7 +841,7 @@ function sameFileIdentity(left, right) {
841
841
  return sameFileIdentity$1(left, right);
842
842
  }
843
843
  function openVerifiedFileSync(params) {
844
- const ioFs = params.ioFs ?? syncFs;
844
+ const ioFs = params.ioFs ?? fs$1;
845
845
  const allowedType = params.allowedType ?? "file";
846
846
  const openReadFlags = ioFs.constants.O_RDONLY | (typeof ioFs.constants.O_NOFOLLOW === "number" ? ioFs.constants.O_NOFOLLOW : 0);
847
847
  let fd = null;
@@ -917,7 +917,7 @@ function canUseBoundaryFileOpen(ioFs) {
917
917
  return typeof ioFs.openSync === "function" && typeof ioFs.closeSync === "function" && typeof ioFs.fstatSync === "function" && typeof ioFs.lstatSync === "function" && typeof ioFs.realpathSync === "function" && typeof ioFs.readFileSync === "function" && typeof ioFs.constants === "object" && ioFs.constants !== null;
918
918
  }
919
919
  function openBoundaryFileSync(params) {
920
- const ioFs = params.ioFs ?? syncFs;
920
+ const ioFs = params.ioFs ?? fs$1;
921
921
  const resolved = resolveBoundaryFilePathGeneric({
922
922
  absolutePath: params.absolutePath,
923
923
  resolve: (absolutePath) => resolveBoundaryPathSync({
@@ -968,7 +968,7 @@ function finalizeBoundaryFileOpen(params) {
968
968
  });
969
969
  }
970
970
  async function openBoundaryFile(params) {
971
- const ioFs = params.ioFs ?? syncFs;
971
+ const ioFs = params.ioFs ?? fs$1;
972
972
  const maybeResolved = resolveBoundaryFilePathGeneric({
973
973
  absolutePath: params.absolutePath,
974
974
  resolve: (absolutePath) => resolveBoundaryPath({
@@ -1133,7 +1133,7 @@ function resolveNpmArgvForWindows(argv) {
1133
1133
  if (!cliName) return null;
1134
1134
  const nodeDir = path.dirname(process$1.execPath);
1135
1135
  const cliPath = path.join(nodeDir, "node_modules", "npm", "bin", cliName);
1136
- if (!syncFs.existsSync(cliPath)) {
1136
+ if (!fs$1.existsSync(cliPath)) {
1137
1137
  const command = argv[0] ?? "";
1138
1138
  return [path.extname(command).toLowerCase() ? command : `${command}.cmd`, ...argv.slice(1)];
1139
1139
  }
@@ -1338,7 +1338,7 @@ async function readPackageName(dir) {
1338
1338
  }
1339
1339
  function readPackageNameSync(dir) {
1340
1340
  try {
1341
- return parsePackageName(syncFs.readFileSync(path.join(dir, "package.json"), "utf-8"));
1341
+ return parsePackageName(fs$1.readFileSync(path.join(dir, "package.json"), "utf-8"));
1342
1342
  } catch {
1343
1343
  return null;
1344
1344
  }
@@ -1370,7 +1370,7 @@ function candidateDirsFromArgv1(argv1) {
1370
1370
  const normalized = path.resolve(argv1);
1371
1371
  const candidates = [path.dirname(normalized)];
1372
1372
  try {
1373
- const resolved = syncFs.realpathSync(normalized);
1373
+ const resolved = fs$1.realpathSync(normalized);
1374
1374
  if (resolved !== normalized) candidates.push(path.dirname(resolved));
1375
1375
  } catch {}
1376
1376
  const parts = normalized.split(path.sep);
@@ -1482,14 +1482,14 @@ async function readWorkspaceFileWithGuards(params) {
1482
1482
  const identity = workspaceFileIdentity(opened.stat, opened.path);
1483
1483
  const cached = workspaceFileCache.get(params.filePath);
1484
1484
  if (cached && cached.identity === identity) {
1485
- syncFs.closeSync(opened.fd);
1485
+ fs$1.closeSync(opened.fd);
1486
1486
  return {
1487
1487
  ok: true,
1488
1488
  content: cached.content
1489
1489
  };
1490
1490
  }
1491
1491
  try {
1492
- const content = syncFs.readFileSync(opened.fd, "utf-8");
1492
+ const content = fs$1.readFileSync(opened.fd, "utf-8");
1493
1493
  workspaceFileCache.set(params.filePath, {
1494
1494
  content,
1495
1495
  identity
@@ -1506,7 +1506,7 @@ async function readWorkspaceFileWithGuards(params) {
1506
1506
  error
1507
1507
  };
1508
1508
  } finally {
1509
- syncFs.closeSync(opened.fd);
1509
+ fs$1.closeSync(opened.fd);
1510
1510
  }
1511
1511
  }
1512
1512
  function stripFrontMatter(content) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-multi-auto",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
4
4
  "description": "Multi-channel AI gateway with extensible messaging integrations",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/openclaw/openclaw#readme",
@@ -50,12 +50,6 @@ fi
50
50
  # 实例基础目录:~/openclaws
51
51
  INSTANCES_BASE="$HOME/openclaws"
52
52
 
53
- # 实例根目录
54
- INSTANCE_DIR="$INSTANCES_BASE/${INSTANCE_NAME}"
55
-
56
- # dist 目录:实例根目录(不使用子目录,避免 root-alias.cjs 路径解析问题)
57
- DIST_DIR="${INSTANCE_DIR}"
58
-
59
53
  # --- 2. 获取实例名称 ---
60
54
  INSTANCE_NAME="${1:-}"
61
55
  if [ -z "$INSTANCE_NAME" ]; then
@@ -109,8 +103,11 @@ echo -e "${BLUE}🔄 正在从源码复制文件到实例根目录...${NC}"
109
103
  echo -e "${YELLOW}源码路径: ${SOURCE_CODE}${NC}"
110
104
  echo -e "${YELLOW}目标路径: ${INSTANCE_DIR}${NC}"
111
105
 
112
- # 清理实例目录
113
- rm -rf "$INSTANCE_DIR"
106
+ # 清理已存在的实例目录(如果存在)
107
+ if [ -d "$INSTANCE_DIR" ]; then
108
+ echo -e "${YELLOW}⚠️ 清理旧实例目录...${NC}"
109
+ rm -rf "$INSTANCE_DIR"
110
+ fi
114
111
 
115
112
  # 复制源码所有内容到实例根目录
116
113
  if cp -r "${SOURCE_CODE}/." "${INSTANCE_DIR}/"; then
@@ -120,6 +117,13 @@ else
120
117
  exit 1
121
118
  fi
122
119
 
120
+ # 修复:如果 config 是符号链接,则替换为普通目录(防止后续写入失败)
121
+ if [ -L "${INSTANCE_DIR}/config" ]; then
122
+ echo -e "${YELLOW}⚠️ 检测到 config 为符号链接,正在修复为普通目录...${NC}"
123
+ rm -f "${INSTANCE_DIR}/config"
124
+ mkdir -p "${INSTANCE_DIR}/config"
125
+ fi
126
+
123
127
  # 验证关键文件是否存在
124
128
  if [ ! -f "${INSTANCE_DIR}/package.json" ]; then
125
129
  echo -e "${RED}❌ 错误: 实例目录中未找到 package.json${NC}"
@@ -453,7 +457,7 @@ if [ $# -eq 0 ]; then
453
457
  if [ -f "$OPENCLAW_CONFIG_PATH" ]; then
454
458
  GATEWAY_PORT=$(node -e "console.log(require('$OPENCLAW_CONFIG_PATH').gateway?.port || 18789)")
455
459
  echo -e "\033[0;32m🚀 启动 OpenClaw-$INSTANCE_NAME 网关 (端口: $GATEWAY_PORT)...\033[0m"
456
- exec $OPENCLAW_EXEC="node $SCRIPT_DIR/dist/index.js" gateway run --port "$GATEWAY_PORT"
460
+ exec node "$SCRIPT_DIR/dist/index.js" gateway run --port "$GATEWAY_PORT"
457
461
  else
458
462
  echo -e "\033[0;31m❌ 错误: 未找到配置文件 $OPENCLAW_CONFIG_PATH\033[0m"
459
463
  exit 1
@@ -467,7 +471,7 @@ else
467
471
  else
468
472
  # 其他命令直接在实例目录执行
469
473
  echo -e "\033[0;32m🚀 执行 OpenClaw-$INSTANCE_NAME 命令: $@\033[0m"
470
- exec $OPENCLAW_EXEC="node $SCRIPT_DIR/dist/index.js" "$@"
474
+ exec node "$SCRIPT_DIR/dist/index.js" "$@"
471
475
  fi
472
476
  fi
473
477
  EOF
@@ -1,11 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import { Si as ensureAuthProfileStore } from "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- export { ensureAuthProfileStore };
@@ -1,11 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import { Z as compactEmbeddedPiSessionDirect } from "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- export { compactEmbeddedPiSessionDirect };
@@ -1,11 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import { Pt as deliverOutboundPayloads } from "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- export { deliverOutboundPayloads };
@@ -1,11 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import { qn as describeImageWithModel } from "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- export { describeImageWithModel };
@@ -1,11 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import { Xt as MemoryIndexManager, Zt as closeAllMemoryIndexManagers } from "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- export { MemoryIndexManager, closeAllMemoryIndexManagers };
@@ -1,11 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import { Bn as discoverModels, Ln as PiAuthStorageClass, Rn as PiModelRegistryClass, zn as discoverAuthStorage } from "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- export { PiAuthStorageClass as AuthStorage, PiModelRegistryClass as ModelRegistry, discoverAuthStorage, discoverModels };
@@ -1,24 +0,0 @@
1
- import "./channel-config-helpers-CX9AfjCJ.js";
2
- import "./thread-bindings-Cc59nx4d.js";
3
- import "./paths-WR8OhEmw.js";
4
- import "./github-copilot-token-BGYH4ltJ.js";
5
- import "./logger-D-go2oXy.js";
6
- import "./tmp-openclaw-dir-DRPiOszV.js";
7
- import "./subsystem-DOh66yR6.js";
8
- import "./utils-BhiRkVxe.js";
9
- import "./fetch-Cqwcg-Kq.js";
10
- import "./exec-88qB5pUO.js";
11
- import "./thinking-B2k7q5lY.js";
12
- import "./query-expansion-ChYs46vb.js";
13
- import "./logger-Jt8cCPPV.js";
14
- import "./zod-schema.core-GWl_s9xp.js";
15
- import "./redact-CqHkGWow.js";
16
- import "./http-registry-CR-l0QpT.js";
17
- import "./pairing-token-BwgaSu88.js";
18
- import "./ssrf-Dlo7BZU6.js";
19
- import "./fetch-guard-DEyOIg88.js";
20
- import "./registry-N-tffRct.js";
21
- import "./http-body-CLS7yD5S.js";
22
- import "./session-DPhL1rLb.js";
23
- import { t as loginWeb } from "./login-CnT14vQ1.js";
24
- export { loginWeb };
@@ -1,23 +0,0 @@
1
- import "./channel-config-helpers-CX9AfjCJ.js";
2
- import "./thread-bindings-Cc59nx4d.js";
3
- import "./paths-WR8OhEmw.js";
4
- import "./github-copilot-token-BGYH4ltJ.js";
5
- import "./logger-D-go2oXy.js";
6
- import "./tmp-openclaw-dir-DRPiOszV.js";
7
- import "./subsystem-DOh66yR6.js";
8
- import "./utils-BhiRkVxe.js";
9
- import "./fetch-Cqwcg-Kq.js";
10
- import "./exec-88qB5pUO.js";
11
- import "./thinking-B2k7q5lY.js";
12
- import "./query-expansion-ChYs46vb.js";
13
- import "./logger-Jt8cCPPV.js";
14
- import "./zod-schema.core-GWl_s9xp.js";
15
- import "./redact-CqHkGWow.js";
16
- import "./http-registry-CR-l0QpT.js";
17
- import "./pairing-token-BwgaSu88.js";
18
- import "./ssrf-Dlo7BZU6.js";
19
- import "./fetch-guard-DEyOIg88.js";
20
- import "./registry-N-tffRct.js";
21
- import "./http-body-CLS7yD5S.js";
22
- import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-BDZssl9O.js";
23
- export { sendMessageWhatsApp, sendPollWhatsApp };
@@ -1,13 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- import "./session-kt-bqE_z.js";
12
- import { t as loginWeb } from "./login-CKmmxErc.js";
13
- export { loginWeb };
@@ -1,12 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-CXnKWzde.js";
12
- export { sendMessageWhatsApp, sendPollWhatsApp };
@@ -1,11 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import { an as listNativeCommandSpecsForConfig, in as findCommandByNativeName, on as parseCommandArgs, rn as buildCommandTextFromArgs, sn as resolveCommandArgMenu } from "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
@@ -1,11 +0,0 @@
1
- import "./query-expansion-DXwSmE_K.js";
2
- import "./paths-CNIc83Pn.js";
3
- import "./subsystem-Cr1MiLhx.js";
4
- import "./workspace-Bi8vpJN0.js";
5
- import "./logger-DCBlX1uz.js";
6
- import { I as listSkillCommandsForAgents } from "./model-selection-CNRMBWfR.js";
7
- import "./github-copilot-token-BeFx3MLn.js";
8
- import "./boolean-C7Ct_klp.js";
9
- import "./fetch-BdTTF2z-.js";
10
- import "./frontmatter-DZlWsaUx.js";
11
- export { listSkillCommandsForAgents };