openclaw-multi-auto 1.4.1 → 1.4.2

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 (107) hide show
  1. package/dist/{accounts-L9ByEpnP.js → accounts-C9HcPI9h.js} +2 -2
  2. package/dist/{accounts-BOzyfwW4.js → accounts-C_lW3Ag9.js} +2 -2
  3. package/dist/{accounts-yfBeCZtS.js → accounts-Tgelvk0C.js} +17 -17
  4. package/dist/{active-listener-D1yqT1cw.js → active-listener-BEdprTkn.js} +2 -2
  5. package/dist/{api-key-rotation-DtsNS2Nb.js → api-key-rotation-BJpKWXy0.js} +2 -2
  6. package/dist/{audio-preflight-DpxQCpsA.js → audio-preflight-BMvgEQ5j.js} +32 -32
  7. package/dist/{audio-transcription-runner-28fcRNNi.js → audio-transcription-runner-gLFfz8fr.js} +12 -12
  8. package/dist/{audit-membership-runtime-DWyHWAHM.js → audit-membership-runtime-Dntemq07.js} +4 -4
  9. package/dist/build-info.json +3 -3
  10. package/dist/bundled/boot-md/handler.js +51 -51
  11. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  12. package/dist/bundled/command-logger/handler.js +2 -2
  13. package/dist/bundled/session-memory/handler.js +51 -51
  14. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  15. package/dist/{channel-activity-xHOMiarp.js → channel-activity-BDnjYF7B.js} +3 -3
  16. package/dist/{chrome-DwizpzOC.js → chrome-DxxEKrY7.js} +18 -18
  17. package/dist/{commands-registry-V1zZ5pPC.js → commands-registry-D5qXbFJn.js} +4 -4
  18. package/dist/{deliver-D4o6VIur.js → deliver-DbdywYJE.js} +21 -21
  19. package/dist/deliver-runtime-BFs7iAZF.js +36 -0
  20. package/dist/deps-send-discord.runtime-DZUccI6Z.js +26 -0
  21. package/dist/deps-send-imessage.runtime-CF3OpoqY.js +25 -0
  22. package/dist/deps-send-signal.runtime-Cw4-ozeO.js +24 -0
  23. package/dist/deps-send-slack.runtime-BDsDhS1P.js +22 -0
  24. package/dist/deps-send-telegram.runtime-D_4xVasO.js +27 -0
  25. package/dist/deps-send-whatsapp.runtime-DK8jqd14.js +60 -0
  26. package/dist/{diagnostic-Bn4PZjMZ.js → diagnostic-Co6Kghr-.js} +2 -2
  27. package/dist/{errors-CCLeFWAg.js → errors-xt401nuk.js} +1 -1
  28. package/dist/{fetch-BlJWzEP6.js → fetch-DuraYswo.js} +5 -5
  29. package/dist/{fetch-guard-ChYBwfiy.js → fetch-guard-DWr0d00H.js} +2 -2
  30. package/dist/{frontmatter-CvaMP376.js → frontmatter-BkTfEZ93.js} +3 -3
  31. package/dist/{fs-safe-0jAo_Whb.js → fs-safe-CTYUrIgQ.js} +4 -4
  32. package/dist/{github-copilot-token-D13V9YBz.js → github-copilot-token-BDioPmd6.js} +7 -7
  33. package/dist/{image-Bbn53mzj.js → image-eT7Y-nP5.js} +6 -6
  34. package/dist/{image-ops-CehkHxmW.js → image-ops-BuUnEOE0.js} +2 -2
  35. package/dist/image-runtime-BcAK3n8a.js +29 -0
  36. package/dist/{ir-DAP-B-Xw.js → ir-B83looB-.js} +8 -8
  37. package/dist/{legacy-names-TyzbVqa_.js → legacy-names-DOC03BkU.js} +1 -1
  38. package/dist/llm-slug-generator.js +51 -51
  39. package/dist/{logger-DMZQQtxK.js → logger-BfjWMCSD.js} +7 -7
  40. package/dist/{login-DiCctRo1.js → login-CrIwcrVI.js} +5 -5
  41. package/dist/{login-qr-MUbXgjtd.js → login-qr-BpPDZdl_.js} +10 -10
  42. package/dist/{manager-BW_NSIMl.js → manager-1bvuGrNR.js} +13 -13
  43. package/dist/manager-runtime-FO1Sx3W8.js +18 -0
  44. package/dist/{model-selection-idoqPmw0.js → model-selection-Dna0Gz1k.js} +43 -43
  45. package/dist/{outbound-C2kanETZ.js → outbound-ChDjtuD6.js} +6 -6
  46. package/dist/{outbound-attachment-DBrYWX8h.js → outbound-attachment-DqHlD21U.js} +2 -2
  47. package/dist/{path-alias-guards-DqXRZmsL.js → path-alias-guards-BzvdLvTI.js} +1 -1
  48. package/dist/{paths-CCxysrzL.js → paths-Bkr-BCxW.js} +4 -4
  49. package/dist/{paths-C6TxBCvO.js → paths-Cvc9EM8Y.js} +5 -5
  50. package/dist/{pi-embedded-BaGj07T0.js → pi-embedded-BQQa91aA.js} +158 -158
  51. package/dist/{pi-embedded-helpers-wy0DZvx1.js → pi-embedded-helpers-CLXm10bV.js} +52 -52
  52. package/dist/{pi-model-discovery-BGgOlX8N.js → pi-model-discovery-Dymwdjt0.js} +7 -7
  53. package/dist/pi-model-discovery-runtime-BeY4EUPp.js +11 -0
  54. package/dist/{pi-tools.before-tool-call.runtime-BuLxSyx9.js → pi-tools.before-tool-call.runtime-Cwab_5W1.js} +9 -9
  55. package/dist/plugin-sdk/discord.js +6 -6
  56. package/dist/plugin-sdk/mattermost.js +3 -3
  57. package/dist/{plugins-CWkRQYDj.js → plugins-4Rj4OjLY.js} +11 -11
  58. package/dist/{proxy-env-Cq5gdrbj.js → proxy-env-DlmzDx8x.js} +1 -1
  59. package/dist/{proxy-fetch-CCjEYbFm.js → proxy-fetch-B2pEfjbR.js} +1 -1
  60. package/dist/{pw-ai-Cl1Lc7RC.js → pw-ai-DNMjFMqH.js} +14 -14
  61. package/dist/{qmd-manager-BsYsO9Ii.js → qmd-manager-BtIKUaO9.js} +10 -10
  62. package/dist/{query-expansion-DtLc3wjL.js → query-expansion-CX-1fS52.js} +6 -6
  63. package/dist/{redact-ClbcYG1J.js → redact-COik8ET1.js} +1 -1
  64. package/dist/{run-with-concurrency-D_ZpbgEG.js → run-with-concurrency-BgYfgkXT.js} +4 -4
  65. package/dist/runtime-whatsapp-login.runtime-DUb55byQ.js +13 -0
  66. package/dist/runtime-whatsapp-outbound.runtime-Bii_xSfI.js +22 -0
  67. package/dist/{send-Dx2RkUOZ.js → send-6lz6rNVP.js} +6 -6
  68. package/dist/{send-vmONuVgL.js → send-BHTiZcH3.js} +26 -26
  69. package/dist/{send-Bj776ESJ.js → send-L7gRiwyd.js} +7 -7
  70. package/dist/{send-DcxmcFi_.js → send-PE6cwoTe.js} +8 -8
  71. package/dist/{send-BQERFNyo.js → send-dfu6_rgf.js} +5 -5
  72. package/dist/{session-A4QhBRvH.js → session-D8ImowSs.js} +8 -8
  73. package/dist/{skill-commands-CMzBZKG2.js → skill-commands-DNqJ-kwn.js} +9 -9
  74. package/dist/{skills-CE_iqvM5.js → skills-7ODkHQYp.js} +22 -22
  75. package/dist/slash-commands.runtime-CVw6566g.js +16 -0
  76. package/dist/slash-dispatch.runtime-B9Ygtzi4.js +56 -0
  77. package/dist/slash-skill-commands.runtime-DxZ4z5h6.js +20 -0
  78. package/dist/{store--eR1R_UX.js → store-D89wDcz9.js} +2 -2
  79. package/dist/subagent-registry-runtime-DL1Wv7nA.js +56 -0
  80. package/dist/{subsystem-Di1z8l0Z.js → subsystem-B45WV3qB.js} +14 -14
  81. package/dist/{tables-d739Y1xW.js → tables-mE4cJBN2.js} +1 -1
  82. package/dist/{target-errors-CBI2Ga0y.js → target-errors-mnlwhAjP.js} +2 -2
  83. package/dist/{thinking-DXYisHiZ.js → thinking-BeGmb5k6.js} +7 -7
  84. package/dist/{tokens-DxnY9ui_.js → tokens-q32vI39c.js} +1 -1
  85. package/dist/{tool-images-2cBx1W8h.js → tool-images-RZdHiZcG.js} +2 -2
  86. package/dist/{web-CzWRVmFt.js → web-Btj-e8kN.js} +55 -55
  87. package/dist/{whatsapp-actions-iEArE_Ez.js → whatsapp-actions-BHbJJyqw.js} +21 -21
  88. package/dist/{workspace-CUVC6GX1.js → workspace-U-DyR64O.js} +20 -20
  89. package/package.json +1 -1
  90. package/scripts/create-instance.sh +16 -6
  91. package/scripts/install-maca.sh +62 -8
  92. package/dist/deliver-runtime-P-G3bPjW.js +0 -36
  93. package/dist/deps-send-discord.runtime-DnbhTFX9.js +0 -26
  94. package/dist/deps-send-imessage.runtime-BOiQ6mDx.js +0 -25
  95. package/dist/deps-send-signal.runtime-CTcl388M.js +0 -24
  96. package/dist/deps-send-slack.runtime-CCqBz4Kg.js +0 -22
  97. package/dist/deps-send-telegram.runtime-DGSKTCpH.js +0 -27
  98. package/dist/deps-send-whatsapp.runtime-CJkTHkah.js +0 -60
  99. package/dist/image-runtime-CVv2ra9J.js +0 -29
  100. package/dist/manager-runtime-BN6VevdC.js +0 -18
  101. package/dist/pi-model-discovery-runtime-Bwmi4Ev8.js +0 -11
  102. package/dist/runtime-whatsapp-login.runtime-IeylZEl4.js +0 -13
  103. package/dist/runtime-whatsapp-outbound.runtime-ClBRuLsq.js +0 -22
  104. package/dist/slash-commands.runtime-Cpn2tYW4.js +0 -16
  105. package/dist/slash-dispatch.runtime-DoBAQBU5.js +0 -56
  106. package/dist/slash-skill-commands.runtime-DKMvvdDW.js +0 -20
  107. package/dist/subagent-registry-runtime-ppWS3tVu.js +0 -56
@@ -1,7 +1,7 @@
1
- import { r as resolveConfigPath } from "./paths-C6TxBCvO.js";
1
+ import { r as resolveConfigPath } from "./paths-Cvc9EM8Y.js";
2
2
  import os from "node:os";
3
3
  import path from "node:path";
4
- import syncFs from "node:fs";
4
+ import fs from "node:fs";
5
5
  import chalk, { Chalk } from "chalk";
6
6
  import { Logger } from "tslog";
7
7
  import JSON5 from "json5";
@@ -54,15 +54,15 @@ function getCommandPathInternal(argv, depth, opts) {
54
54
  //#endregion
55
55
  //#region src/infra/tmp-openclaw-dir.ts
56
56
  const POSIX_OPENCLAW_TMP_DIR = process.env.OPENCLAW_TMP_DIR ?? "/tmp/openclaw";
57
- const TMP_DIR_ACCESS_MODE = syncFs.constants.W_OK | syncFs.constants.X_OK;
57
+ const TMP_DIR_ACCESS_MODE = fs.constants.W_OK | fs.constants.X_OK;
58
58
  function isNodeErrorWithCode(err, code) {
59
59
  return typeof err === "object" && err !== null && "code" in err && err.code === code;
60
60
  }
61
61
  function resolvePreferredOpenClawTmpDir(options = {}) {
62
- const accessSync = options.accessSync ?? syncFs.accessSync;
63
- const chmodSync = options.chmodSync ?? syncFs.chmodSync;
64
- const lstatSync = options.lstatSync ?? syncFs.lstatSync;
65
- const mkdirSync = options.mkdirSync ?? syncFs.mkdirSync;
62
+ const accessSync = options.accessSync ?? fs.accessSync;
63
+ const chmodSync = options.chmodSync ?? fs.chmodSync;
64
+ const lstatSync = options.lstatSync ?? fs.lstatSync;
65
+ const mkdirSync = options.mkdirSync ?? fs.mkdirSync;
66
66
  const warn = options.warn ?? ((message) => console.warn(message));
67
67
  const getuid = options.getuid ?? (() => {
68
68
  try {
@@ -155,8 +155,8 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
155
155
  function readLoggingConfig() {
156
156
  const configPath = resolveConfigPath();
157
157
  try {
158
- if (!syncFs.existsSync(configPath)) return;
159
- const raw = syncFs.readFileSync(configPath, "utf-8");
158
+ if (!fs.existsSync(configPath)) return;
159
+ const raw = fs.readFileSync(configPath, "utf-8");
160
160
  const logging = JSON5.parse(raw)?.logging;
161
161
  if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
162
162
  return logging;
@@ -344,7 +344,7 @@ function buildLogger(settings) {
344
344
  for (const transport of externalTransports) attachExternalTransport(logger, transport);
345
345
  return logger;
346
346
  }
347
- syncFs.mkdirSync(path.dirname(settings.file), { recursive: true });
347
+ fs.mkdirSync(path.dirname(settings.file), { recursive: true });
348
348
  if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
349
349
  let currentFileBytes = getCurrentLogFileBytes(settings.file);
350
350
  let warnedAboutSizeCap = false;
@@ -383,14 +383,14 @@ function resolveMaxLogFileBytes(raw) {
383
383
  }
384
384
  function getCurrentLogFileBytes(file) {
385
385
  try {
386
- return syncFs.statSync(file).size;
386
+ return fs.statSync(file).size;
387
387
  } catch {
388
388
  return 0;
389
389
  }
390
390
  }
391
391
  function appendLogLine(file, line) {
392
392
  try {
393
- syncFs.appendFileSync(file, line, { encoding: "utf8" });
393
+ fs.appendFileSync(file, line, { encoding: "utf8" });
394
394
  return true;
395
395
  } catch {
396
396
  return false;
@@ -442,14 +442,14 @@ function isRollingPath(file) {
442
442
  }
443
443
  function pruneOldRollingLogs(dir) {
444
444
  try {
445
- const entries = syncFs.readdirSync(dir, { withFileTypes: true });
445
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
446
446
  const cutoff = Date.now() - MAX_LOG_AGE_MS;
447
447
  for (const entry of entries) {
448
448
  if (!entry.isFile()) continue;
449
449
  if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
450
450
  const fullPath = path.join(dir, entry.name);
451
451
  try {
452
- if (syncFs.statSync(fullPath).mtimeMs < cutoff) syncFs.rmSync(fullPath, { force: true });
452
+ if (fs.statSync(fullPath).mtimeMs < cutoff) fs.rmSync(fullPath, { force: true });
453
453
  } catch {}
454
454
  }
455
455
  } catch {}
@@ -1,4 +1,4 @@
1
- import { r as markdownToIRWithMeta } from "./ir-DAP-B-Xw.js";
1
+ import { r as markdownToIRWithMeta } from "./ir-B83looB-.js";
2
2
  import { t as renderMarkdownWithMarkers } from "./render-DW7AcFdD.js";
3
3
 
4
4
  //#region src/markdown/tables.ts
@@ -1,5 +1,5 @@
1
- import { b as detectMime } from "./image-ops-CehkHxmW.js";
2
- import { r as sanitizeToolResultImages } from "./tool-images-2cBx1W8h.js";
1
+ import { b as detectMime } from "./image-ops-BuUnEOE0.js";
2
+ import { r as sanitizeToolResultImages } from "./tool-images-RZdHiZcG.js";
3
3
  import fs from "node:fs/promises";
4
4
 
5
5
  //#region src/agents/tools/common.ts
@@ -1,10 +1,10 @@
1
- import { G as normalizeAccountId } from "./workspace-CUVC6GX1.js";
2
- import { h as normalizeE164, u as escapeRegExp } from "./logger-DMZQQtxK.js";
3
- import { Ht as CHAT_CHANNEL_ORDER, Ut as getChatChannelMeta, Zt as requireActivePluginRegistry } from "./model-selection-idoqPmw0.js";
4
- import { a as normalizeWhatsAppTarget, b as resolveDiscordAccount, l as resolveTelegramAccount, m as resolveSlackReplyToMode, p as resolveSlackAccount } from "./plugins-CWkRQYDj.js";
5
- import { h as resolveAccountEntry, n as resolveWhatsAppAccount } from "./accounts-yfBeCZtS.js";
6
- import { n as resolveSignalAccount } from "./accounts-L9ByEpnP.js";
7
- import { t as resolveIMessageAccount } from "./accounts-BOzyfwW4.js";
1
+ import { G as normalizeAccountId } from "./workspace-U-DyR64O.js";
2
+ import { h as normalizeE164, u as escapeRegExp } from "./logger-BfjWMCSD.js";
3
+ import { Ht as CHAT_CHANNEL_ORDER, Ut as getChatChannelMeta, Zt as requireActivePluginRegistry } from "./model-selection-Dna0Gz1k.js";
4
+ import { a as normalizeWhatsAppTarget, b as resolveDiscordAccount, l as resolveTelegramAccount, m as resolveSlackReplyToMode, p as resolveSlackAccount } from "./plugins-4Rj4OjLY.js";
5
+ import { h as resolveAccountEntry, n as resolveWhatsAppAccount } from "./accounts-Tgelvk0C.js";
6
+ import { n as resolveSignalAccount } from "./accounts-C9HcPI9h.js";
7
+ import { t as resolveIMessageAccount } from "./accounts-C_lW3Ag9.js";
8
8
 
9
9
  //#region src/config/types.tools.ts
10
10
  const TOOLS_BY_SENDER_KEY_TYPES = [
@@ -1,4 +1,4 @@
1
- import { u as escapeRegExp } from "./logger-DMZQQtxK.js";
1
+ import { u as escapeRegExp } from "./logger-BfjWMCSD.js";
2
2
 
3
3
  //#region src/auto-reply/tokens.ts
4
4
  const HEARTBEAT_TOKEN = "HEARTBEAT_OK";
@@ -1,5 +1,5 @@
1
- import { t as createSubsystemLogger } from "./subsystem-Di1z8l0Z.js";
2
- import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-CehkHxmW.js";
1
+ import { t as createSubsystemLogger } from "./subsystem-B45WV3qB.js";
2
+ import { i as getImageMetadata, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-BuUnEOE0.js";
3
3
 
4
4
  //#region src/media/base64.ts
5
5
  function estimateBase64DecodedBytes(base64) {
@@ -1,61 +1,61 @@
1
- import "./run-with-concurrency-D_ZpbgEG.js";
2
- import "./paths-C6TxBCvO.js";
3
- import { i as defaultRuntime, p as shouldLogVerbose, t as createSubsystemLogger, u as logVerbose, y as getChildLogger } from "./subsystem-Di1z8l0Z.js";
4
- import { F as buildGroupHistoryKey, M as DEFAULT_MAIN_KEY, N as buildAgentMainSessionKey, R as normalizeAgentId } from "./workspace-CUVC6GX1.js";
5
- import { C as sleep, T as toWhatsappJid, h as normalizeE164, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164 } from "./logger-DMZQQtxK.js";
6
- import { X as loadConfig, lr as formatCliCommand } from "./model-selection-idoqPmw0.js";
7
- import "./github-copilot-token-D13V9YBz.js";
8
- import "./legacy-names-TyzbVqa_.js";
9
- import { h as resolveChannelGroupRequireMention, m as resolveChannelGroupPolicy } from "./thinking-DXYisHiZ.js";
10
- import "./tokens-DxnY9ui_.js";
11
- import { A as normalizeGroupActivation, B as normalizeMentionText, C as createInboundDebouncer, D as getReplyFromConfig, E as createDedupeCache, F as enqueueSystemEvent, I as finalizeInboundContext, K as resolveIdentityNamePrefix, L as hasControlCommand, M as computeBackoff, N as sleepWithAbort, O as buildAgentSessionKey, P as formatDurationPrecise, R as shouldComputeCommandAuthorized, T as formatInboundEnvelope, _ as resolveDmGroupAccessWithCommandGate, b as shouldAckReactionForWhatsApp, c as buildPairingReply, d as buildHistoryContextFromEntries, f as recordPendingHistoryEntryIfEnabled, g as readStoreAllowFromForDmPolicy, h as warnMissingProviderGroupPolicyFallbackOnce, i as resolveInboundSessionEnvelopeContext, j as parseActivationCommand, k as resolveAgentRoute, l as resolveMentionGating, m as resolveOpenProviderRuntimeGroupPolicy, p as resolveDefaultGroupPolicy, q as resolveMessagePrefix, s as createReplyPrefixOptions, u as DEFAULT_GROUP_HISTORY_LIMIT, v as resolveDmGroupAccessWithLists, w as resolveInboundDebounceMs, x as dispatchReplyWithBufferedBlockDispatcher, y as resolvePinnedMainDmOwnerFromAllowlist, z as buildMentionRegexes } from "./pi-embedded-BaGj07T0.js";
12
- import "./plugins-CWkRQYDj.js";
13
- import { a as logWebSelfId, c as pickWebChannel, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, r as WA_WEB_AUTH_DIR, u as readWebSelfId } from "./accounts-yfBeCZtS.js";
14
- import "./send-Dx2RkUOZ.js";
15
- import "./send-DcxmcFi_.js";
16
- import "./deliver-D4o6VIur.js";
17
- import "./diagnostic-Bn4PZjMZ.js";
18
- import "./accounts-L9ByEpnP.js";
19
- import "./image-ops-CehkHxmW.js";
20
- import { X as toLocationContext, Y as formatLocationText, et as upsertChannelPairingRequest } from "./send-vmONuVgL.js";
21
- import "./pi-model-discovery-BGgOlX8N.js";
22
- import { At as resolveGroupSessionKey, K as recordSessionMetaFromInbound, W as loadSessionStore, q as updateLastRoute } from "./pi-embedded-helpers-wy0DZvx1.js";
23
- import "./chrome-DwizpzOC.js";
24
- import "./frontmatter-CvaMP376.js";
25
- import "./skills-CE_iqvM5.js";
26
- import "./path-alias-guards-DqXRZmsL.js";
27
- import "./redact-ClbcYG1J.js";
28
- import "./errors-CCLeFWAg.js";
29
- import "./fs-safe-0jAo_Whb.js";
30
- import "./proxy-env-Cq5gdrbj.js";
31
- import { i as saveMediaBuffer } from "./store--eR1R_UX.js";
32
- import "./accounts-BOzyfwW4.js";
33
- import { s as resolveStorePath } from "./paths-CCxysrzL.js";
34
- import "./tool-images-2cBx1W8h.js";
35
- import "./image-Bbn53mzj.js";
36
- import { h as registerUnhandledRejectionHandler } from "./audio-transcription-runner-28fcRNNi.js";
37
- import { i as getAgentScopedMediaLocalRoots } from "./fetch-BlJWzEP6.js";
38
- import "./fetch-guard-ChYBwfiy.js";
39
- import "./api-key-rotation-DtsNS2Nb.js";
40
- import "./proxy-fetch-CCjEYbFm.js";
41
- import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, s as resolveMarkdownTableMode } from "./ir-DAP-B-Xw.js";
1
+ import "./run-with-concurrency-BgYfgkXT.js";
2
+ import "./paths-Cvc9EM8Y.js";
3
+ import { i as defaultRuntime, p as shouldLogVerbose, t as createSubsystemLogger, u as logVerbose, y as getChildLogger } from "./subsystem-B45WV3qB.js";
4
+ import { F as buildGroupHistoryKey, M as DEFAULT_MAIN_KEY, N as buildAgentMainSessionKey, R as normalizeAgentId } from "./workspace-U-DyR64O.js";
5
+ import { C as sleep, T as toWhatsappJid, h as normalizeE164, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164 } from "./logger-BfjWMCSD.js";
6
+ import { X as loadConfig, lr as formatCliCommand } from "./model-selection-Dna0Gz1k.js";
7
+ import "./github-copilot-token-BDioPmd6.js";
8
+ import "./legacy-names-DOC03BkU.js";
9
+ import { h as resolveChannelGroupRequireMention, m as resolveChannelGroupPolicy } from "./thinking-BeGmb5k6.js";
10
+ import "./tokens-q32vI39c.js";
11
+ import { A as normalizeGroupActivation, B as normalizeMentionText, C as createInboundDebouncer, D as getReplyFromConfig, E as createDedupeCache, F as enqueueSystemEvent, I as finalizeInboundContext, K as resolveIdentityNamePrefix, L as hasControlCommand, M as computeBackoff, N as sleepWithAbort, O as buildAgentSessionKey, P as formatDurationPrecise, R as shouldComputeCommandAuthorized, T as formatInboundEnvelope, _ as resolveDmGroupAccessWithCommandGate, b as shouldAckReactionForWhatsApp, c as buildPairingReply, d as buildHistoryContextFromEntries, f as recordPendingHistoryEntryIfEnabled, g as readStoreAllowFromForDmPolicy, h as warnMissingProviderGroupPolicyFallbackOnce, i as resolveInboundSessionEnvelopeContext, j as parseActivationCommand, k as resolveAgentRoute, l as resolveMentionGating, m as resolveOpenProviderRuntimeGroupPolicy, p as resolveDefaultGroupPolicy, q as resolveMessagePrefix, s as createReplyPrefixOptions, u as DEFAULT_GROUP_HISTORY_LIMIT, v as resolveDmGroupAccessWithLists, w as resolveInboundDebounceMs, x as dispatchReplyWithBufferedBlockDispatcher, y as resolvePinnedMainDmOwnerFromAllowlist, z as buildMentionRegexes } from "./pi-embedded-BQQa91aA.js";
12
+ import "./plugins-4Rj4OjLY.js";
13
+ import { a as logWebSelfId, c as pickWebChannel, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, r as WA_WEB_AUTH_DIR, u as readWebSelfId } from "./accounts-Tgelvk0C.js";
14
+ import "./send-6lz6rNVP.js";
15
+ import "./send-PE6cwoTe.js";
16
+ import "./deliver-DbdywYJE.js";
17
+ import "./diagnostic-Co6Kghr-.js";
18
+ import "./accounts-C9HcPI9h.js";
19
+ import "./image-ops-BuUnEOE0.js";
20
+ import { X as toLocationContext, Y as formatLocationText, et as upsertChannelPairingRequest } from "./send-BHTiZcH3.js";
21
+ import "./pi-model-discovery-Dymwdjt0.js";
22
+ import { At as resolveGroupSessionKey, K as recordSessionMetaFromInbound, W as loadSessionStore, q as updateLastRoute } from "./pi-embedded-helpers-CLXm10bV.js";
23
+ import "./chrome-DxxEKrY7.js";
24
+ import "./frontmatter-BkTfEZ93.js";
25
+ import "./skills-7ODkHQYp.js";
26
+ import "./path-alias-guards-BzvdLvTI.js";
27
+ import "./redact-COik8ET1.js";
28
+ import "./errors-xt401nuk.js";
29
+ import "./fs-safe-CTYUrIgQ.js";
30
+ import "./proxy-env-DlmzDx8x.js";
31
+ import { i as saveMediaBuffer } from "./store-D89wDcz9.js";
32
+ import "./accounts-C_lW3Ag9.js";
33
+ import { s as resolveStorePath } from "./paths-Bkr-BCxW.js";
34
+ import "./tool-images-RZdHiZcG.js";
35
+ import "./image-eT7Y-nP5.js";
36
+ import { h as registerUnhandledRejectionHandler } from "./audio-transcription-runner-gLFfz8fr.js";
37
+ import { i as getAgentScopedMediaLocalRoots } from "./fetch-DuraYswo.js";
38
+ import "./fetch-guard-DWr0d00H.js";
39
+ import "./api-key-rotation-BJpKWXy0.js";
40
+ import "./proxy-fetch-B2pEfjbR.js";
41
+ import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, s as resolveMarkdownTableMode } from "./ir-B83looB-.js";
42
42
  import "./render-DW7AcFdD.js";
43
- import "./target-errors-CBI2Ga0y.js";
44
- import "./commands-registry-V1zZ5pPC.js";
45
- import "./skill-commands-CMzBZKG2.js";
43
+ import "./target-errors-mnlwhAjP.js";
44
+ import "./commands-registry-D5qXbFJn.js";
45
+ import "./skill-commands-DNqJ-kwn.js";
46
46
  import "./fetch-BfuG8uZ8.js";
47
- import { n as recordChannelActivity } from "./channel-activity-xHOMiarp.js";
48
- import { t as convertMarkdownTables } from "./tables-d739Y1xW.js";
49
- import "./send-BQERFNyo.js";
50
- import "./outbound-attachment-DBrYWX8h.js";
51
- import "./send-Bj776ESJ.js";
52
- import { r as setActiveWebListener } from "./active-listener-D1yqT1cw.js";
47
+ import { n as recordChannelActivity } from "./channel-activity-BDnjYF7B.js";
48
+ import { t as convertMarkdownTables } from "./tables-mE4cJBN2.js";
49
+ import "./send-dfu6_rgf.js";
50
+ import "./outbound-attachment-DqHlD21U.js";
51
+ import "./send-L7gRiwyd.js";
52
+ import { r as setActiveWebListener } from "./active-listener-BEdprTkn.js";
53
53
  import "./proxy-CecQTx_Z.js";
54
- import "./manager-BW_NSIMl.js";
55
- import "./query-expansion-DtLc3wjL.js";
56
- import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./outbound-C2kanETZ.js";
57
- import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-A4QhBRvH.js";
58
- import { t as loginWeb } from "./login-DiCctRo1.js";
54
+ import "./manager-1bvuGrNR.js";
55
+ import "./query-expansion-CX-1fS52.js";
56
+ import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./outbound-ChDjtuD6.js";
57
+ import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-D8ImowSs.js";
58
+ import { t as loginWeb } from "./login-CrIwcrVI.js";
59
59
  import { randomUUID } from "node:crypto";
60
60
  import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent } from "@whiskeysockets/baileys";
61
61
 
@@ -1,25 +1,25 @@
1
- import "./run-with-concurrency-D_ZpbgEG.js";
2
- import "./paths-C6TxBCvO.js";
3
- import "./subsystem-Di1z8l0Z.js";
4
- import "./workspace-CUVC6GX1.js";
5
- import "./logger-DMZQQtxK.js";
6
- import "./model-selection-idoqPmw0.js";
7
- import "./github-copilot-token-D13V9YBz.js";
8
- import "./legacy-names-TyzbVqa_.js";
9
- import { a as normalizeWhatsAppTarget, i as isWhatsAppGroupJid } from "./plugins-CWkRQYDj.js";
10
- import { n as resolveWhatsAppAccount } from "./accounts-yfBeCZtS.js";
11
- import "./image-ops-CehkHxmW.js";
12
- import "./path-alias-guards-DqXRZmsL.js";
13
- import "./fs-safe-0jAo_Whb.js";
14
- import "./proxy-env-Cq5gdrbj.js";
15
- import "./tool-images-2cBx1W8h.js";
16
- import "./fetch-BlJWzEP6.js";
17
- import "./fetch-guard-ChYBwfiy.js";
18
- import "./ir-DAP-B-Xw.js";
1
+ import "./run-with-concurrency-BgYfgkXT.js";
2
+ import "./paths-Cvc9EM8Y.js";
3
+ import "./subsystem-B45WV3qB.js";
4
+ import "./workspace-U-DyR64O.js";
5
+ import "./logger-BfjWMCSD.js";
6
+ import "./model-selection-Dna0Gz1k.js";
7
+ import "./github-copilot-token-BDioPmd6.js";
8
+ import "./legacy-names-DOC03BkU.js";
9
+ import { a as normalizeWhatsAppTarget, i as isWhatsAppGroupJid } from "./plugins-4Rj4OjLY.js";
10
+ import { n as resolveWhatsAppAccount } from "./accounts-Tgelvk0C.js";
11
+ import "./image-ops-BuUnEOE0.js";
12
+ import "./path-alias-guards-BzvdLvTI.js";
13
+ import "./fs-safe-CTYUrIgQ.js";
14
+ import "./proxy-env-DlmzDx8x.js";
15
+ import "./tool-images-RZdHiZcG.js";
16
+ import "./fetch-DuraYswo.js";
17
+ import "./fetch-guard-DWr0d00H.js";
18
+ import "./ir-B83looB-.js";
19
19
  import "./render-DW7AcFdD.js";
20
- import { f as readReactionParams, h as readStringParam, i as ToolAuthorizationError, l as jsonResult, n as missingTargetError, o as createActionGate } from "./target-errors-CBI2Ga0y.js";
21
- import "./tables-d739Y1xW.js";
22
- import { r as sendReactionWhatsApp } from "./outbound-C2kanETZ.js";
20
+ import { f as readReactionParams, h as readStringParam, i as ToolAuthorizationError, l as jsonResult, n as missingTargetError, o as createActionGate } from "./target-errors-mnlwhAjP.js";
21
+ import "./tables-mE4cJBN2.js";
22
+ import { r as sendReactionWhatsApp } from "./outbound-ChDjtuD6.js";
23
23
 
24
24
  //#region src/whatsapp/resolve-outbound-target.ts
25
25
  function resolveWhatsAppOutboundTarget(params) {
@@ -1,10 +1,10 @@
1
- import { d as resolveRequiredHomeDir } from "./paths-C6TxBCvO.js";
2
- import { c as danger, p as shouldLogVerbose } from "./subsystem-Di1z8l0Z.js";
3
- import { g as pathExists$1, n as logError, t as logDebug, y as resolveUserPath } from "./logger-DMZQQtxK.js";
1
+ import { d as resolveRequiredHomeDir } from "./paths-Cvc9EM8Y.js";
2
+ import { c as danger, p as shouldLogVerbose } from "./subsystem-B45WV3qB.js";
3
+ import { g as pathExists$1, n as logError, t as logDebug, y as resolveUserPath } from "./logger-BfjWMCSD.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";
@@ -560,7 +560,7 @@ function resolveBoundaryPathLexicalSync(params) {
560
560
  rootCanonicalPath: params.rootCanonicalPath,
561
561
  resolveParams: params.params,
562
562
  absolutePath: params.absolutePath,
563
- read: (cursor) => syncFs.lstatSync(cursor)
563
+ read: (cursor) => fs$1.lstatSync(cursor)
564
564
  });
565
565
  if (isPromiseLike(maybeStat)) throw new Error("Unexpected async lexical stat");
566
566
  const stat = maybeStat;
@@ -706,15 +706,15 @@ function resolvePathViaExistingAncestorSync(targetPath) {
706
706
  const normalized = path.resolve(targetPath);
707
707
  let cursor = normalized;
708
708
  const missingSuffix = [];
709
- while (!isFilesystemRoot(cursor) && !syncFs.existsSync(cursor)) {
709
+ while (!isFilesystemRoot(cursor) && !fs$1.existsSync(cursor)) {
710
710
  missingSuffix.unshift(path.basename(cursor));
711
711
  const parent = path.dirname(cursor);
712
712
  if (parent === cursor) break;
713
713
  cursor = parent;
714
714
  }
715
- if (!syncFs.existsSync(cursor)) return normalized;
715
+ if (!fs$1.existsSync(cursor)) return normalized;
716
716
  try {
717
- const resolvedAncestor = path.resolve(syncFs.realpathSync(cursor));
717
+ const resolvedAncestor = path.resolve(fs$1.realpathSync(cursor));
718
718
  if (missingSuffix.length === 0) return resolvedAncestor;
719
719
  return path.resolve(resolvedAncestor, ...missingSuffix);
720
720
  } catch {
@@ -739,7 +739,7 @@ function getPathKindSync(absolutePath, preserveFinalSymlink) {
739
739
  try {
740
740
  return {
741
741
  exists: true,
742
- kind: toResolvedKind(preserveFinalSymlink ? syncFs.lstatSync(absolutePath) : syncFs.statSync(absolutePath))
742
+ kind: toResolvedKind(preserveFinalSymlink ? fs$1.lstatSync(absolutePath) : fs$1.statSync(absolutePath))
743
743
  };
744
744
  } catch (error) {
745
745
  if (isNotFoundPathError(error)) return {
@@ -799,10 +799,10 @@ async function resolveSymlinkHopPath(symlinkPath) {
799
799
  }
800
800
  function resolveSymlinkHopPathSync(symlinkPath) {
801
801
  try {
802
- return path.resolve(syncFs.realpathSync(symlinkPath));
802
+ return path.resolve(fs$1.realpathSync(symlinkPath));
803
803
  } catch (error) {
804
804
  if (!isNotFoundPathError(error)) throw error;
805
- const linkTarget = syncFs.readlinkSync(symlinkPath);
805
+ const linkTarget = fs$1.readlinkSync(symlinkPath);
806
806
  return resolvePathViaExistingAncestorSync(path.resolve(path.dirname(symlinkPath), linkTarget));
807
807
  }
808
808
  }
@@ -828,7 +828,7 @@ function sameFileIdentity(left, right) {
828
828
  return sameFileIdentity$1(left, right);
829
829
  }
830
830
  function openVerifiedFileSync(params) {
831
- const ioFs = params.ioFs ?? syncFs;
831
+ const ioFs = params.ioFs ?? fs$1;
832
832
  const allowedType = params.allowedType ?? "file";
833
833
  const openReadFlags = ioFs.constants.O_RDONLY | (typeof ioFs.constants.O_NOFOLLOW === "number" ? ioFs.constants.O_NOFOLLOW : 0);
834
834
  let fd = null;
@@ -905,7 +905,7 @@ function canUseBoundaryFileOpen(ioFs) {
905
905
  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;
906
906
  }
907
907
  function openBoundaryFileSync(params) {
908
- const ioFs = params.ioFs ?? syncFs;
908
+ const ioFs = params.ioFs ?? fs$1;
909
909
  const resolved = resolveBoundaryFilePathGeneric({
910
910
  absolutePath: params.absolutePath,
911
911
  resolve: (absolutePath) => resolveBoundaryPathSync({
@@ -956,7 +956,7 @@ function finalizeBoundaryFileOpen(params) {
956
956
  });
957
957
  }
958
958
  async function openBoundaryFile(params) {
959
- const ioFs = params.ioFs ?? syncFs;
959
+ const ioFs = params.ioFs ?? fs$1;
960
960
  const maybeResolved = resolveBoundaryFilePathGeneric({
961
961
  absolutePath: params.absolutePath,
962
962
  resolve: (absolutePath) => resolveBoundaryPath({
@@ -1105,7 +1105,7 @@ function resolveNpmArgvForWindows(argv) {
1105
1105
  if (!cliName) return null;
1106
1106
  const nodeDir = path.dirname(process$1.execPath);
1107
1107
  const cliPath = path.join(nodeDir, "node_modules", "npm", "bin", cliName);
1108
- if (!syncFs.existsSync(cliPath)) return null;
1108
+ if (!fs$1.existsSync(cliPath)) return null;
1109
1109
  return [
1110
1110
  process$1.execPath,
1111
1111
  cliPath,
@@ -1307,7 +1307,7 @@ async function readPackageName(dir) {
1307
1307
  }
1308
1308
  function readPackageNameSync(dir) {
1309
1309
  try {
1310
- const raw = syncFs.readFileSync(path.join(dir, "package.json"), "utf-8");
1310
+ const raw = fs$1.readFileSync(path.join(dir, "package.json"), "utf-8");
1311
1311
  const parsed = JSON.parse(raw);
1312
1312
  return typeof parsed.name === "string" ? parsed.name : null;
1313
1313
  } catch {
@@ -1341,7 +1341,7 @@ function candidateDirsFromArgv1(argv1) {
1341
1341
  const normalized = path.resolve(argv1);
1342
1342
  const candidates = [path.dirname(normalized)];
1343
1343
  try {
1344
- const resolved = syncFs.realpathSync(normalized);
1344
+ const resolved = fs$1.realpathSync(normalized);
1345
1345
  if (resolved !== normalized) candidates.push(path.dirname(resolved));
1346
1346
  } catch {}
1347
1347
  const parts = normalized.split(path.sep);
@@ -1453,14 +1453,14 @@ async function readWorkspaceFileWithGuards(params) {
1453
1453
  const identity = workspaceFileIdentity(opened.stat, opened.path);
1454
1454
  const cached = workspaceFileCache.get(params.filePath);
1455
1455
  if (cached && cached.identity === identity) {
1456
- syncFs.closeSync(opened.fd);
1456
+ fs$1.closeSync(opened.fd);
1457
1457
  return {
1458
1458
  ok: true,
1459
1459
  content: cached.content
1460
1460
  };
1461
1461
  }
1462
1462
  try {
1463
- const content = syncFs.readFileSync(opened.fd, "utf-8");
1463
+ const content = fs$1.readFileSync(opened.fd, "utf-8");
1464
1464
  workspaceFileCache.set(params.filePath, {
1465
1465
  content,
1466
1466
  identity
@@ -1477,7 +1477,7 @@ async function readWorkspaceFileWithGuards(params) {
1477
1477
  error
1478
1478
  };
1479
1479
  } finally {
1480
- syncFs.closeSync(opened.fd);
1480
+ fs$1.closeSync(opened.fd);
1481
1481
  }
1482
1482
  }
1483
1483
  function stripFrontMatter(content) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-multi-auto",
3
- "version": "1.4.1",
3
+ "version": "1.4.2",
4
4
  "description": "Multi-channel AI gateway with extensible messaging integrations",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/openclaw/openclaw#readme",
@@ -289,12 +289,22 @@ if [ "$INSTANCE_NAME" = "yunwei" ]; then
289
289
  TARBALL=$(ls *.tgz)
290
290
  tar -xzf "$TARBALL" --strip-components=1
291
291
  rm "$TARBALL"
292
- # 将角色包内容复制到 workspace(包含 docs、memory 等)
293
- cp -rn "$TEMP_ROLE_DIR"/. "$INSTANCE_DIR/workspace/"
294
- # 关键:将 workspace 内的 docs 目录复制到实例根目录,供 TUI 使用
295
- if [ -d "$INSTANCE_DIR/workspace/docs" ]; then
296
- cp -r "$INSTANCE_DIR/workspace/docs" "$INSTANCE_DIR/"
297
- fi
292
+
293
+ # 1. memory、skills 等目录复制到 workspace 根目录(排除 .md 文件)
294
+ for item in *; do
295
+ if [ -d "$item" ]; then
296
+ # 目录(如 memory、skills)复制到 workspace
297
+ cp -r "$item" "$INSTANCE_DIR/workspace/"
298
+ elif [ -f "$item" ] && [[ "$item" != *.md ]]; then
299
+ # 非 .md 文件(如 package.json)也复制到 workspace
300
+ cp "$item" "$INSTANCE_DIR/workspace/" 2>/dev/null || true
301
+ fi
302
+ done
303
+
304
+ # 2. 创建实例根目录下的 docs 目录,并将所有 .md 文件复制过去
305
+ mkdir -p "$INSTANCE_DIR/docs/reference/templates"
306
+ cp *.md "$INSTANCE_DIR/docs/reference/templates/" 2>/dev/null || true
307
+
298
308
  echo -e "${GREEN}✅ 角色包安装完成,workspace 已初始化${NC}"
299
309
  else
300
310
  echo -e "${YELLOW}⚠️ 角色包下载失败,请检查网络或手动安装${NC}"
@@ -158,15 +158,40 @@ read -p "请输入 y/N: " install_model_choice
158
158
 
159
159
  if [[ "$install_model_choice" == "y" || "$install_model_choice" == "Y" ]]; then
160
160
  echo -e "${YELLOW}🔍 检查 Ollama 环境...${NC}"
161
+
162
+ # 设置国内镜像源(关键!)
163
+ # 使用 GitHub 镜像加速下载安装脚本和二进制文件
164
+ export GITHUB_MIRROR="https://ghproxy.com"
165
+
161
166
  if ! command -v ollama &> /dev/null; then
162
- echo -e "${YELLOW}未检测到 Ollama,正在安装 Ollama...${NC}"
163
- # 使用官方安装脚本(支持 macOS 和 Linux)
164
- if curl -fsSL https://ollama.com/install.sh | sh; then
167
+ echo -e "${YELLOW}未检测到 Ollama,正在从国内镜像安装 Ollama...${NC}"
168
+
169
+ # 方法1:使用官方安装脚本(通过镜像加速)
170
+ echo -e "${BLUE}尝试通过镜像加速安装...${NC}"
171
+ if curl -fsSL ${GITHUB_MIRROR}/https://ollama.com/install.sh | sh; then
165
172
  echo -e "${GREEN}✅ Ollama 安装成功${NC}"
166
173
  else
167
- echo -e "${RED}❌ Ollama 安装失败,请手动安装后重试。${NC}"
168
- echo -e "${YELLOW}您可以访问 https://ollama.com 下载安装包。${NC}"
169
- # 不退出,让用户继续
174
+ echo -e "${YELLOW}脚本安装失败,尝试直接下载二进制包...${NC}"
175
+ # 方法2:直接下载二进制包(适用于 Linux/macOS)
176
+ if [[ "$OS" == "Linux" ]]; then
177
+ wget ${GITHUB_MIRROR}/https://github.com/ollama/ollama/releases/latest/download/ollama-linux-amd64.tgz
178
+ sudo tar -C /usr -xzf ollama-linux-amd64.tgz
179
+ rm ollama-linux-amd64.tgz
180
+ elif [[ "$OS" == "Darwin" ]]; then
181
+ # macOS 用户建议直接访问官网下载,或使用 homebrew
182
+ echo -e "${YELLOW}macOS 用户请手动下载安装包:${NC}"
183
+ echo -e "${BLUE}访问 https://ollama.com/download 或使用镜像:${NC}"
184
+ echo -e "${BLUE}curl -L ${GITHUB_MIRROR}/https://ollama.com/download/Ollama-darwin.zip -o Ollama.zip${NC}"
185
+ echo -e "${YELLOW}安装完成后重新运行此脚本${NC}"
186
+ exit 1
187
+ fi
188
+
189
+ if command -v ollama &> /dev/null; then
190
+ echo -e "${GREEN}✅ Ollama 二进制安装成功${NC}"
191
+ else
192
+ echo -e "${RED}❌ Ollama 安装失败,请手动安装后重试。${NC}"
193
+ echo -e "${YELLOW}您可以访问 https://ollama.com 下载安装包。${NC}"
194
+ fi
170
195
  fi
171
196
  else
172
197
  echo -e "${GREEN}✅ Ollama 已安装${NC}"
@@ -174,11 +199,40 @@ if [[ "$install_model_choice" == "y" || "$install_model_choice" == "Y" ]]; then
174
199
 
175
200
  # 再次检查 ollama 是否可用
176
201
  if command -v ollama &> /dev/null; then
202
+ echo -e "${YELLOW}配置国内模型镜像源加速下载...${NC}"
203
+
204
+ # 配置模型下载镜像源
205
+ # 方法A:通过环境变量(临时生效)
206
+ export OLLAMA_MIRROR="https://ollama.modelscope.cn" # 魔搭社区镜像
207
+
208
+ # 方法B:创建配置文件(永久生效)
209
+ mkdir -p ~/.ollama
210
+ cat > ~/.ollama/config.json << EOF
211
+ {
212
+ "registry": {
213
+ "mirrors": {
214
+ "registry.ollama.ai": "https://ollama.modelscope.cn"
215
+ }
216
+ }
217
+ }
218
+ EOF
219
+ echo -e "${GREEN}✅ 镜像源配置完成${NC}"
220
+
177
221
  echo -e "${YELLOW}正在拉取模型 qwen2.5-vl:7b-instruct-q4_k_m,这可能需要一些时间...${NC}"
178
- if ollama pull qwen2.5-vl:7b-instruct-q4_k_m; then
222
+ echo -e "${BLUE}使用魔搭社区镜像加速下载...${NC}"
223
+
224
+ # 使用镜像源拉取模型(如果失败则尝试其他源)
225
+ if ollama pull modelscope.cn/qwen/Qwen2.5-7B-Instruct-GGUF; then
179
226
  echo -e "${GREEN}✅ 模型拉取成功${NC}"
180
227
  else
181
- echo -e "${RED}❌ 模型拉取失败,请稍后手动运行: ollama pull qwen2.5-vl:7b-instruct-q4_k_m${NC}"
228
+ echo -e "${YELLOW}从魔搭拉取失败,尝试从官方源(已配置镜像)拉取...${NC}"
229
+ if ollama pull qwen2.5-vl:7b-instruct-q4_k_m; then
230
+ echo -e "${GREEN}✅ 模型拉取成功${NC}"
231
+ else
232
+ echo -e "${RED}❌ 模型拉取失败,您稍后可以手动运行以下命令重试:${NC}"
233
+ echo -e "${YELLOW}export OLLAMA_MIRROR=https://ollama.modelscope.cn${NC}"
234
+ echo -e "${YELLOW}ollama pull qwen2.5-vl:7b-instruct-q4_k_m${NC}"
235
+ fi
182
236
  fi
183
237
  else
184
238
  echo -e "${YELLOW}⚠️ Ollama 不可用,跳过模型安装。${NC}"
@@ -1,36 +0,0 @@
1
- import "./run-with-concurrency-D_ZpbgEG.js";
2
- import "./paths-C6TxBCvO.js";
3
- import "./subsystem-Di1z8l0Z.js";
4
- import "./workspace-CUVC6GX1.js";
5
- import "./logger-DMZQQtxK.js";
6
- import "./model-selection-idoqPmw0.js";
7
- import "./github-copilot-token-D13V9YBz.js";
8
- import "./legacy-names-TyzbVqa_.js";
9
- import "./thinking-DXYisHiZ.js";
10
- import "./tokens-DxnY9ui_.js";
11
- import "./plugins-CWkRQYDj.js";
12
- import "./accounts-yfBeCZtS.js";
13
- import { t as deliverOutboundPayloads } from "./deliver-D4o6VIur.js";
14
- import "./accounts-L9ByEpnP.js";
15
- import "./image-ops-CehkHxmW.js";
16
- import "./pi-embedded-helpers-wy0DZvx1.js";
17
- import "./chrome-DwizpzOC.js";
18
- import "./frontmatter-CvaMP376.js";
19
- import "./skills-CE_iqvM5.js";
20
- import "./path-alias-guards-DqXRZmsL.js";
21
- import "./redact-ClbcYG1J.js";
22
- import "./errors-CCLeFWAg.js";
23
- import "./fs-safe-0jAo_Whb.js";
24
- import "./proxy-env-Cq5gdrbj.js";
25
- import "./store--eR1R_UX.js";
26
- import "./accounts-BOzyfwW4.js";
27
- import "./paths-CCxysrzL.js";
28
- import "./tool-images-2cBx1W8h.js";
29
- import "./fetch-BlJWzEP6.js";
30
- import "./fetch-guard-ChYBwfiy.js";
31
- import "./ir-DAP-B-Xw.js";
32
- import "./fetch-BfuG8uZ8.js";
33
- import "./send-BQERFNyo.js";
34
- import "./outbound-attachment-DBrYWX8h.js";
35
-
36
- export { deliverOutboundPayloads };