openclaw-multi-auto 1.0.1 → 1.0.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.
- package/dist/{accounts-C_lW3Ag9.js → accounts-BOzyfwW4.js} +2 -2
- package/dist/{accounts-C9HcPI9h.js → accounts-L9ByEpnP.js} +2 -2
- package/dist/{accounts-Tgelvk0C.js → accounts-yfBeCZtS.js} +17 -17
- package/dist/{active-listener-BEdprTkn.js → active-listener-D1yqT1cw.js} +2 -2
- package/dist/{api-key-rotation-BJpKWXy0.js → api-key-rotation-DtsNS2Nb.js} +2 -2
- package/dist/{audio-preflight-C58LeYZM.js → audio-preflight-DpxQCpsA.js} +32 -32
- package/dist/{audio-transcription-runner-B8jbozH5.js → audio-transcription-runner-28fcRNNi.js} +12 -12
- package/dist/{audit-membership-runtime-Dntemq07.js → audit-membership-runtime-DWyHWAHM.js} +4 -4
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +51 -51
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +51 -51
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-BDnjYF7B.js → channel-activity-xHOMiarp.js} +3 -3
- package/dist/{chrome-CRBG2YP_.js → chrome-DwizpzOC.js} +26 -26
- package/dist/{commands-registry-D5qXbFJn.js → commands-registry-V1zZ5pPC.js} +4 -4
- package/dist/{deliver-ChbFOwjw.js → deliver-D4o6VIur.js} +21 -21
- package/dist/deliver-runtime-P-G3bPjW.js +36 -0
- package/dist/deps-send-discord.runtime-DnbhTFX9.js +26 -0
- package/dist/deps-send-imessage.runtime-BOiQ6mDx.js +25 -0
- package/dist/deps-send-signal.runtime-CTcl388M.js +24 -0
- package/dist/deps-send-slack.runtime-CCqBz4Kg.js +22 -0
- package/dist/deps-send-telegram.runtime-DGSKTCpH.js +27 -0
- package/dist/deps-send-whatsapp.runtime-CJkTHkah.js +60 -0
- package/dist/{diagnostic-Co6Kghr-.js → diagnostic-Bn4PZjMZ.js} +2 -2
- package/dist/{errors-xt401nuk.js → errors-CCLeFWAg.js} +1 -1
- package/dist/{fetch-DuraYswo.js → fetch-BlJWzEP6.js} +5 -5
- package/dist/{fetch-guard-DWr0d00H.js → fetch-guard-ChYBwfiy.js} +2 -2
- package/dist/{frontmatter-BkTfEZ93.js → frontmatter-CvaMP376.js} +3 -3
- package/dist/{fs-safe-CTYUrIgQ.js → fs-safe-0jAo_Whb.js} +4 -4
- package/dist/{github-copilot-token-BDioPmd6.js → github-copilot-token-D13V9YBz.js} +7 -7
- package/dist/{image-C7RmnYxa.js → image-Bbn53mzj.js} +6 -6
- package/dist/{image-ops-BuUnEOE0.js → image-ops-CehkHxmW.js} +2 -2
- package/dist/image-runtime-CVv2ra9J.js +29 -0
- package/dist/{ir-B83looB-.js → ir-DAP-B-Xw.js} +8 -8
- package/dist/{legacy-names-DOC03BkU.js → legacy-names-TyzbVqa_.js} +1 -1
- package/dist/llm-slug-generator.js +51 -51
- package/dist/{logger-BfjWMCSD.js → logger-DMZQQtxK.js} +7 -7
- package/dist/{login-CrIwcrVI.js → login-DiCctRo1.js} +5 -5
- package/dist/{login-qr-BpPDZdl_.js → login-qr-MUbXgjtd.js} +10 -10
- package/dist/{manager-1bvuGrNR.js → manager-BW_NSIMl.js} +13 -13
- package/dist/manager-runtime-BN6VevdC.js +18 -0
- package/dist/{model-selection-Dna0Gz1k.js → model-selection-idoqPmw0.js} +43 -43
- package/dist/{outbound-ChDjtuD6.js → outbound-C2kanETZ.js} +6 -6
- package/dist/{outbound-attachment-DqHlD21U.js → outbound-attachment-DBrYWX8h.js} +2 -2
- package/dist/{path-alias-guards-BzvdLvTI.js → path-alias-guards-DqXRZmsL.js} +1 -1
- package/dist/{paths-Cvc9EM8Y.js → paths-C6TxBCvO.js} +5 -5
- package/dist/{paths-Bkr-BCxW.js → paths-CCxysrzL.js} +4 -4
- package/dist/{pi-embedded-BC_GWGuw.js → pi-embedded-BaGj07T0.js} +167 -167
- package/dist/{pi-embedded-helpers-CbIShbOM.js → pi-embedded-helpers-wy0DZvx1.js} +52 -52
- package/dist/pi-model-discovery-BGgOlX8N.js +134 -0
- package/dist/pi-model-discovery-runtime-Bwmi4Ev8.js +11 -0
- package/dist/{pi-tools.before-tool-call.runtime-Cwab_5W1.js → pi-tools.before-tool-call.runtime-BuLxSyx9.js} +9 -9
- package/dist/plugin-sdk/accounts-CJWOBzwB.js +35 -0
- package/dist/plugin-sdk/accounts-DP1-L-QS.js +288 -0
- package/dist/plugin-sdk/accounts-DZhWlEg3.js +46 -0
- package/dist/plugin-sdk/active-listener-B_sLJTXM.js +50 -0
- package/dist/plugin-sdk/api-key-rotation-BRE4X2tf.js +181 -0
- package/dist/plugin-sdk/audio-preflight-DGEUDxxR.js +69 -0
- package/dist/plugin-sdk/audio-transcription-runner-DkoPNPYt.js +2176 -0
- package/dist/plugin-sdk/audit-membership-runtime-DSBHHw7o.js +58 -0
- package/dist/plugin-sdk/channel-activity-F3d0yUwy.js +94 -0
- package/dist/plugin-sdk/channel-web-QF7EpjeP.js +2256 -0
- package/dist/plugin-sdk/chrome-BXoCyCkY.js +2415 -0
- package/dist/plugin-sdk/commands-registry-t7cXBTfN.js +1125 -0
- package/dist/plugin-sdk/config-BkEnz2Po.js +17913 -0
- package/dist/plugin-sdk/deliver-B6AG_l67.js +1694 -0
- package/dist/plugin-sdk/deliver-runtime-D585kJZc.js +32 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-a_OKY2js.js +23 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-Baxy9TD4.js +22 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-BwXoCrFl.js +21 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-CLmKjgso.js +19 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-BKfdBKnZ.js +24 -0
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-BOTwkbx_.js +57 -0
- package/dist/plugin-sdk/diagnostic-CsP-lEkI.js +319 -0
- package/dist/plugin-sdk/errors-DaiAM-yU.js +54 -0
- package/dist/plugin-sdk/fetch-guard-DETCcJzQ.js +156 -0
- package/dist/plugin-sdk/fs-safe-B8y811FR.js +352 -0
- package/dist/plugin-sdk/image-DjTEkYZE.js +2310 -0
- package/dist/plugin-sdk/image-ops-BSiMpAw4.js +584 -0
- package/dist/plugin-sdk/image-runtime-6xPp8m5a.js +25 -0
- package/dist/plugin-sdk/index.js +50 -50
- package/dist/plugin-sdk/ir-DQ7_HbvK.js +1296 -0
- package/dist/plugin-sdk/local-roots-BUP4YBmR.js +186 -0
- package/dist/plugin-sdk/logger-CZY9KIoY.js +1163 -0
- package/dist/plugin-sdk/login-BxEKLlCo.js +57 -0
- package/dist/plugin-sdk/login-qr-BQIpMPr9.js +320 -0
- package/dist/plugin-sdk/manager-I6KbPihW.js +3917 -0
- package/dist/plugin-sdk/manager-runtime-CFfYYWIQ.js +15 -0
- package/dist/plugin-sdk/outbound-NS6UHnB6.js +212 -0
- package/dist/plugin-sdk/outbound-attachment-Dy6fyf6H.js +19 -0
- package/dist/plugin-sdk/path-alias-guards-DBjLbIX_.js +43 -0
- package/dist/plugin-sdk/paths-vTM3Lh3X.js +166 -0
- package/dist/plugin-sdk/pi-embedded-helpers-1R1gu7eX.js +9627 -0
- package/dist/plugin-sdk/pi-model-discovery-runtime-Do9o-dUd.js +8 -0
- package/dist/{pi-model-discovery-Dymwdjt0.js → plugin-sdk/pi-model-discovery-v-XPUOOf.js} +2 -2
- package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-D4sFsIks.js +354 -0
- package/dist/plugin-sdk/plugins-DeBZB9l_.js +864 -0
- package/dist/{proxy-fetch-B2pEfjbR.js → plugin-sdk/proxy-fetch-ChxOhWF4.js} +1 -1
- package/dist/plugin-sdk/pw-ai-DEOmCSSC.js +1938 -0
- package/dist/plugin-sdk/qmd-manager-HyYKoEch.js +1448 -0
- package/dist/plugin-sdk/query-expansion-CeyKUeDW.js +1011 -0
- package/dist/{redact-COik8ET1.js → plugin-sdk/redact-DjVX-1N3.js} +1 -1
- package/dist/plugin-sdk/reply-DAo_Jt8K.js +97916 -0
- package/dist/plugin-sdk/resolve-outbound-target-B42qgQS9.js +40 -0
- package/dist/plugin-sdk/run-with-concurrency-Bt_ks0Qa.js +1994 -0
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-B6W989eF.js +10 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-c_GDFy37.js +19 -0
- package/dist/plugin-sdk/send-CQpMudwO.js +2587 -0
- package/dist/plugin-sdk/send-DQHLzVyO.js +414 -0
- package/dist/plugin-sdk/send-DTB24bEF.js +3135 -0
- package/dist/plugin-sdk/send-DfHadjZ_.js +503 -0
- package/dist/plugin-sdk/send-XXlW2iny.js +540 -0
- package/dist/plugin-sdk/session-6TF6MyaC.js +169 -0
- package/dist/plugin-sdk/signal.js +2 -2
- package/dist/plugin-sdk/skill-commands-CkGeFUMl.js +342 -0
- package/dist/plugin-sdk/skills-CBkHBYPq.js +1428 -0
- package/dist/plugin-sdk/slash-commands.runtime-CxliuGaP.js +13 -0
- package/dist/plugin-sdk/slash-dispatch.runtime-DFaeYlJQ.js +52 -0
- package/dist/plugin-sdk/slash-skill-commands.runtime-0M0OLCxq.js +16 -0
- package/dist/plugin-sdk/ssrf-cFtplYtS.js +202 -0
- package/dist/plugin-sdk/store-5nyxY3WU.js +81 -0
- package/dist/plugin-sdk/subagent-registry-runtime-DCtmDwna.js +52 -0
- package/dist/plugin-sdk/tables-C47P4GTN.js +55 -0
- package/dist/{target-errors-mnlwhAjP.js → plugin-sdk/target-errors-Blia4S69.js} +2 -2
- package/dist/plugin-sdk/thinking-Bo2eosVa.js +1206 -0
- package/dist/{tokens-q32vI39c.js → plugin-sdk/tokens-DgNRBwIg.js} +1 -1
- package/dist/plugin-sdk/tool-images-Gk_-0y2N.js +274 -0
- package/dist/plugin-sdk/web-CVxZbXyH.js +56 -0
- package/dist/plugin-sdk/whatsapp-actions-Bw0H9g-n.js +80 -0
- package/dist/{plugins-4Rj4OjLY.js → plugins-CWkRQYDj.js} +11 -11
- package/dist/{proxy-env-DlmzDx8x.js → proxy-env-Cq5gdrbj.js} +1 -1
- package/dist/proxy-fetch-CCjEYbFm.js +38 -0
- package/dist/{pw-ai-D2wlMJtN.js → pw-ai-Cl1Lc7RC.js} +14 -14
- package/dist/{qmd-manager-BtIKUaO9.js → qmd-manager-BsYsO9Ii.js} +10 -10
- package/dist/{query-expansion-CX-1fS52.js → query-expansion-DtLc3wjL.js} +6 -6
- package/dist/redact-ClbcYG1J.js +319 -0
- package/dist/{run-with-concurrency-BgYfgkXT.js → run-with-concurrency-D_ZpbgEG.js} +4 -4
- package/dist/runtime-whatsapp-login.runtime-IeylZEl4.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-ClBRuLsq.js +22 -0
- package/dist/{send-dfu6_rgf.js → send-BQERFNyo.js} +5 -5
- package/dist/{send-L7gRiwyd.js → send-Bj776ESJ.js} +7 -7
- package/dist/{send-PE6cwoTe.js → send-DcxmcFi_.js} +8 -8
- package/dist/{send-6lz6rNVP.js → send-Dx2RkUOZ.js} +6 -6
- package/dist/{send-BHTiZcH3.js → send-vmONuVgL.js} +26 -26
- package/dist/{session-D8ImowSs.js → session-A4QhBRvH.js} +8 -8
- package/dist/{skill-commands-DNqJ-kwn.js → skill-commands-CMzBZKG2.js} +9 -9
- package/dist/{skills-7ODkHQYp.js → skills-CE_iqvM5.js} +22 -22
- package/dist/slash-commands.runtime-Cpn2tYW4.js +16 -0
- package/dist/slash-dispatch.runtime-DoBAQBU5.js +56 -0
- package/dist/slash-skill-commands.runtime-DKMvvdDW.js +20 -0
- package/dist/{store-D89wDcz9.js → store--eR1R_UX.js} +2 -2
- package/dist/subagent-registry-runtime-ppWS3tVu.js +56 -0
- package/dist/{subsystem-B45WV3qB.js → subsystem-Di1z8l0Z.js} +14 -14
- package/dist/{tables-mE4cJBN2.js → tables-d739Y1xW.js} +1 -1
- package/dist/target-errors-CBI2Ga0y.js +195 -0
- package/dist/{thinking-BeGmb5k6.js → thinking-DXYisHiZ.js} +7 -7
- package/dist/tokens-DxnY9ui_.js +52 -0
- package/dist/{tool-images-RZdHiZcG.js → tool-images-2cBx1W8h.js} +2 -2
- package/dist/{web-igmw_EhT.js → web-CzWRVmFt.js} +55 -55
- package/dist/{whatsapp-actions-BHbJJyqw.js → whatsapp-actions-iEArE_Ez.js} +21 -21
- package/dist/{workspace-U-DyR64O.js → workspace-CUVC6GX1.js} +20 -20
- package/package.json +7 -9
- package/scripts/create-instance.sh +50 -7
- package/scripts/install.sh +71 -46
- package/dist/deliver-runtime-B80mXYrL.js +0 -36
- package/dist/deps-send-discord.runtime-DZUccI6Z.js +0 -26
- package/dist/deps-send-imessage.runtime-CF3OpoqY.js +0 -25
- package/dist/deps-send-signal.runtime-Cw4-ozeO.js +0 -24
- package/dist/deps-send-slack.runtime-BDsDhS1P.js +0 -22
- package/dist/deps-send-telegram.runtime-D_4xVasO.js +0 -27
- package/dist/deps-send-whatsapp.runtime-UBgpoWg9.js +0 -60
- package/dist/image-runtime-DtMbm7AR.js +0 -29
- package/dist/manager-runtime-FO1Sx3W8.js +0 -18
- package/dist/pi-model-discovery-runtime-BeY4EUPp.js +0 -11
- package/dist/runtime-whatsapp-login.runtime-DUb55byQ.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-Bii_xSfI.js +0 -22
- package/dist/slash-commands.runtime-CVw6566g.js +0 -16
- package/dist/slash-dispatch.runtime-CMK_EPYG.js +0 -56
- package/dist/slash-skill-commands.runtime-DxZ4z5h6.js +0 -20
- package/dist/subagent-registry-runtime-DdGrQBnQ.js +0 -56
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import "./run-with-concurrency-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import { i as defaultRuntime, p as shouldLogVerbose, t as createSubsystemLogger, u as logVerbose, y as getChildLogger } from "./subsystem-
|
|
4
|
-
import { F as buildGroupHistoryKey, M as DEFAULT_MAIN_KEY, N as buildAgentMainSessionKey, R as normalizeAgentId } from "./workspace-
|
|
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-
|
|
6
|
-
import { X as loadConfig, lr as formatCliCommand } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
8
|
-
import "./legacy-names-
|
|
9
|
-
import { h as resolveChannelGroupRequireMention, m as resolveChannelGroupPolicy } from "./thinking-
|
|
10
|
-
import "./tokens-
|
|
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-
|
|
12
|
-
import "./plugins-
|
|
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-
|
|
14
|
-
import "./send-
|
|
15
|
-
import "./send-
|
|
16
|
-
import "./deliver-
|
|
17
|
-
import "./diagnostic-
|
|
18
|
-
import "./accounts-
|
|
19
|
-
import "./image-ops-
|
|
20
|
-
import { X as toLocationContext, Y as formatLocationText, et as upsertChannelPairingRequest } from "./send-
|
|
21
|
-
import "./pi-model-discovery-
|
|
22
|
-
import { At as resolveGroupSessionKey, K as recordSessionMetaFromInbound, W as loadSessionStore, q as updateLastRoute } from "./pi-embedded-helpers-
|
|
23
|
-
import "./chrome-
|
|
24
|
-
import "./frontmatter-
|
|
25
|
-
import "./skills-
|
|
26
|
-
import "./path-alias-guards-
|
|
27
|
-
import "./redact-
|
|
28
|
-
import "./errors-
|
|
29
|
-
import "./fs-safe-
|
|
30
|
-
import "./proxy-env-
|
|
31
|
-
import { i as saveMediaBuffer } from "./store
|
|
32
|
-
import "./accounts-
|
|
33
|
-
import { s as resolveStorePath } from "./paths-
|
|
34
|
-
import "./tool-images-
|
|
35
|
-
import "./image-
|
|
36
|
-
import { h as registerUnhandledRejectionHandler } from "./audio-transcription-runner-
|
|
37
|
-
import { i as getAgentScopedMediaLocalRoots } from "./fetch-
|
|
38
|
-
import "./fetch-guard-
|
|
39
|
-
import "./api-key-rotation-
|
|
40
|
-
import "./proxy-fetch-
|
|
41
|
-
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, s as resolveMarkdownTableMode } from "./ir-
|
|
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";
|
|
42
42
|
import "./render-DW7AcFdD.js";
|
|
43
|
-
import "./target-errors-
|
|
44
|
-
import "./commands-registry-
|
|
45
|
-
import "./skill-commands-
|
|
43
|
+
import "./target-errors-CBI2Ga0y.js";
|
|
44
|
+
import "./commands-registry-V1zZ5pPC.js";
|
|
45
|
+
import "./skill-commands-CMzBZKG2.js";
|
|
46
46
|
import "./fetch-BfuG8uZ8.js";
|
|
47
|
-
import { n as recordChannelActivity } from "./channel-activity-
|
|
48
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
49
|
-
import "./send-
|
|
50
|
-
import "./outbound-attachment-
|
|
51
|
-
import "./send-
|
|
52
|
-
import { r as setActiveWebListener } from "./active-listener-
|
|
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";
|
|
53
53
|
import "./proxy-CecQTx_Z.js";
|
|
54
|
-
import "./manager-
|
|
55
|
-
import "./query-expansion-
|
|
56
|
-
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./outbound-
|
|
57
|
-
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-
|
|
58
|
-
import { t as loginWeb } from "./login-
|
|
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";
|
|
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-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
8
|
-
import "./legacy-names-
|
|
9
|
-
import { a as normalizeWhatsAppTarget, i as isWhatsAppGroupJid } from "./plugins-
|
|
10
|
-
import { n as resolveWhatsAppAccount } from "./accounts-
|
|
11
|
-
import "./image-ops-
|
|
12
|
-
import "./path-alias-guards-
|
|
13
|
-
import "./fs-safe-
|
|
14
|
-
import "./proxy-env-
|
|
15
|
-
import "./tool-images-
|
|
16
|
-
import "./fetch-
|
|
17
|
-
import "./fetch-guard-
|
|
18
|
-
import "./ir-
|
|
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";
|
|
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-
|
|
21
|
-
import "./tables-
|
|
22
|
-
import { r as sendReactionWhatsApp } from "./outbound-
|
|
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";
|
|
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-
|
|
2
|
-
import { c as danger, p as shouldLogVerbose } from "./subsystem-
|
|
3
|
-
import { g as pathExists$1, n as logError, t as logDebug, y as resolveUserPath } from "./logger-
|
|
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";
|
|
4
4
|
import fs from "node:fs/promises";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import
|
|
7
|
+
import syncFs 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) =>
|
|
563
|
+
read: (cursor) => syncFs.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) && !
|
|
709
|
+
while (!isFilesystemRoot(cursor) && !syncFs.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 (!
|
|
715
|
+
if (!syncFs.existsSync(cursor)) return normalized;
|
|
716
716
|
try {
|
|
717
|
-
const resolvedAncestor = path.resolve(
|
|
717
|
+
const resolvedAncestor = path.resolve(syncFs.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 ?
|
|
742
|
+
kind: toResolvedKind(preserveFinalSymlink ? syncFs.lstatSync(absolutePath) : syncFs.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(
|
|
802
|
+
return path.resolve(syncFs.realpathSync(symlinkPath));
|
|
803
803
|
} catch (error) {
|
|
804
804
|
if (!isNotFoundPathError(error)) throw error;
|
|
805
|
-
const linkTarget =
|
|
805
|
+
const linkTarget = syncFs.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 ??
|
|
831
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
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 ??
|
|
908
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
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 ??
|
|
959
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
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 (!
|
|
1108
|
+
if (!syncFs.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 =
|
|
1310
|
+
const raw = syncFs.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 =
|
|
1344
|
+
const resolved = syncFs.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
|
-
|
|
1456
|
+
syncFs.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 =
|
|
1463
|
+
const content = syncFs.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
|
-
|
|
1480
|
+
syncFs.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.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Multi-channel AI gateway with extensible messaging integrations",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/openclaw/openclaw#readme",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"dist/",
|
|
33
33
|
"docs/",
|
|
34
34
|
"extensions/",
|
|
35
|
-
"skills/"
|
|
36
|
-
"node_modules/"
|
|
35
|
+
"skills/"
|
|
37
36
|
],
|
|
38
37
|
"type": "module",
|
|
39
38
|
"main": "dist/index.js",
|
|
@@ -219,7 +218,6 @@
|
|
|
219
218
|
},
|
|
220
219
|
"scripts": {
|
|
221
220
|
"//_publish_pre_fix": "在发布前的 prepack 阶段,强制清理并重新拉取那些带 Git 依赖的包,并配置镜像隧道",
|
|
222
|
-
"prepack": "node -e \"const {execSync} = require('child_process'); try { execSync('git config --global url.\\\"https://github.moeyy.xyz/https://github.com/\\\".insteadOf \\\"https://github.com/\\\"'); console.log('✅ GitHub Publish Tunnel Set'); } catch(e){}\" && pnpm build && pnpm ui:build",
|
|
223
221
|
"android:assemble": "cd apps/android && ./gradlew :app:assembleDebug",
|
|
224
222
|
"android:format": "cd apps/android && ./gradlew :app:ktlintFormat :benchmark:ktlintFormat",
|
|
225
223
|
"android:install": "cd apps/android && ./gradlew :app:installDebug",
|
|
@@ -291,6 +289,7 @@
|
|
|
291
289
|
"openclaw": "node scripts/run-node.mjs",
|
|
292
290
|
"openclaw:rpc": "node scripts/run-node.mjs agent --mode rpc --json",
|
|
293
291
|
"plugins:sync": "node --import tsx scripts/sync-plugin-versions.ts",
|
|
292
|
+
"prepack": "node -e \"const {execSync} = require('child_process'); try { execSync('git config --global url.\\\"https://github.moeyy.xyz/https://github.com/\\\".insteadOf \\\"https://github.com/\\\"'); console.log('✅ GitHub Publish Tunnel Set'); } catch(e){}\" && pnpm build && pnpm ui:build",
|
|
294
293
|
"prepare": "command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1 && git config core.hooksPath git-hooks || exit 0",
|
|
295
294
|
"protocol:check": "pnpm protocol:gen && pnpm protocol:gen:swift && git diff --exit-code -- dist/protocol.schema.json apps/macos/Sources/OpenClawProtocol/GatewayModels.swift",
|
|
296
295
|
"protocol:gen": "node --import tsx scripts/protocol-gen.ts",
|
|
@@ -391,11 +390,6 @@
|
|
|
391
390
|
"yaml": "^2.8.2",
|
|
392
391
|
"zod": "^4.3.6"
|
|
393
392
|
},
|
|
394
|
-
"//_bundled_desc": "在 npm publish 阶段,将以下包及其 node_modules 直接打入 tarball。这防止了用户安装时再去从 GitHub 拉取子依赖",
|
|
395
|
-
"bundledDependencies": [
|
|
396
|
-
"@whiskeysockets/baileys",
|
|
397
|
-
"@lydell/node-pty"
|
|
398
|
-
],
|
|
399
393
|
"devDependencies": {
|
|
400
394
|
"@grammyjs/types": "^3.25.0",
|
|
401
395
|
"@lit-labs/signals": "^0.2.0",
|
|
@@ -421,6 +415,10 @@
|
|
|
421
415
|
"@napi-rs/canvas": "^0.1.89",
|
|
422
416
|
"node-llama-cpp": "3.16.2"
|
|
423
417
|
},
|
|
418
|
+
"bundledDependencies": [
|
|
419
|
+
"@lydell/node-pty",
|
|
420
|
+
"@whiskeysockets/baileys"
|
|
421
|
+
],
|
|
424
422
|
"engines": {
|
|
425
423
|
"node": ">=22.12.0"
|
|
426
424
|
},
|
|
@@ -1,13 +1,44 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
# 创建新的 OpenClaw 实例脚本
|
|
3
|
-
# 用法: ./create-instance.sh
|
|
3
|
+
# 用法: ./create-instance.sh [instance-name] [port] [model_provider] [api_key]
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
# --- 修改部分:交互式获取参数与端口计算修复 ---
|
|
8
|
+
INSTANCE_NAME="${1:-}"
|
|
9
|
+
if [ -z "$INSTANCE_NAME" ]; then
|
|
10
|
+
read -p "请输入实例名称 (默认: new-instance): " INPUT_NAME
|
|
11
|
+
INSTANCE_NAME="${INPUT_NAME:-new-instance}"
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
if [ -n "$2" ]; then
|
|
15
|
+
PORT="$2"
|
|
16
|
+
else
|
|
17
|
+
# 修复原脚本中的嵌套语法错误,改为分步计算
|
|
18
|
+
EXISTING_COUNT=$(ls -d ~/openclaws/*/ 2>/dev/null | wc -l | tr -d ' ')
|
|
19
|
+
PORT=$((18790 + EXISTING_COUNT))
|
|
20
|
+
fi
|
|
21
|
+
|
|
9
22
|
MODEL_PROVIDER="${3:-}"
|
|
23
|
+
if [ -z "$MODEL_PROVIDER" ]; then
|
|
24
|
+
echo "--- 请选择模型供应商 ---"
|
|
25
|
+
echo "1) zai (智谱) 2) deepseek 3) minimax 4) kimi 5) qwen"
|
|
26
|
+
read -p "请输入编号 (1-5): " MODEL_INDEX
|
|
27
|
+
case $MODEL_INDEX in
|
|
28
|
+
1) MODEL_PROVIDER="zai" ;;
|
|
29
|
+
2) MODEL_PROVIDER="deepseek" ;;
|
|
30
|
+
3) MODEL_PROVIDER="minimax" ;;
|
|
31
|
+
4) MODEL_PROVIDER="kimi" ;;
|
|
32
|
+
5) MODEL_PROVIDER="qwen" ;;
|
|
33
|
+
*) MODEL_PROVIDER="zai" ;;
|
|
34
|
+
esac
|
|
35
|
+
fi
|
|
36
|
+
|
|
10
37
|
API_KEY="${4:-}"
|
|
38
|
+
if [ -z "$API_KEY" ]; then
|
|
39
|
+
read -p "请输入您的 ${MODEL_PROVIDER} API Key: " API_KEY
|
|
40
|
+
fi
|
|
41
|
+
# --- 修改结束 ---
|
|
11
42
|
|
|
12
43
|
INSTANCE_DIR="$HOME/openclaws/${INSTANCE_NAME}"
|
|
13
44
|
|
|
@@ -190,7 +221,7 @@ export OPENCLAW_TMP_DIR="$SCRIPT_DIR/tmp"
|
|
|
190
221
|
|
|
191
222
|
# 自动创建 launchd 服务(如果不存在)
|
|
192
223
|
PLIST_LABEL="ai.openclaw.gateway.$INSTANCE_NAME"
|
|
193
|
-
PLIST_PATH="$HOME/Library/LaunchAgents/$PLIST_LABEL"
|
|
224
|
+
PLIST_PATH="$HOME/Library/LaunchAgents/$PLIST_LABEL.plist"
|
|
194
225
|
|
|
195
226
|
if [ ! -f "$PLIST_PATH" ]; then
|
|
196
227
|
echo "📦 为实例 '$INSTANCE_NAME' 创建 launchd 服务..."
|
|
@@ -286,10 +317,22 @@ echo " 代码: ${INSTANCE_DIR}/code/node_modules/openclaw-multi-auto/"
|
|
|
286
317
|
if [ -n "$MODEL_PROVIDER" ]; then
|
|
287
318
|
echo " 主模型: $DEFAULT_MODEL"
|
|
288
319
|
fi
|
|
320
|
+
|
|
321
|
+
# --- 修改部分:脚本末尾增加自动启动询问 ---
|
|
289
322
|
echo ""
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
echo "
|
|
323
|
+
read -p "是否现在启动该实例并注册为后台服务? (y/n) " SHOULD_START
|
|
324
|
+
if [[ "$SHOULD_START" =~ ^[Yy]$ ]]; then
|
|
325
|
+
echo "🚀 正在启动并进入后台..."
|
|
326
|
+
cd "${INSTANCE_DIR}"
|
|
327
|
+
nohup ./start.sh > /tmp/openclaw-${INSTANCE_NAME}.log 2>&1 &
|
|
328
|
+
echo "✅ 启动成功!日志见: /tmp/openclaw-${INSTANCE_NAME}.log"
|
|
329
|
+
else
|
|
330
|
+
echo "🚀 启动命令:"
|
|
331
|
+
echo " cd ${INSTANCE_DIR}"
|
|
332
|
+
echo " ./start.sh"
|
|
333
|
+
fi
|
|
334
|
+
# --- 修改结束 ---
|
|
335
|
+
|
|
293
336
|
echo ""
|
|
294
337
|
echo "⚙️ 配置文件:"
|
|
295
338
|
echo " ${INSTANCE_DIR}/config/openclaw.json"
|
package/scripts/install.sh
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
#
|
|
2
|
+
# =================================================================
|
|
3
|
+
# OpenClaw 离线增强版部署脚本 (适配 bundledDependencies + 中国区镜像)
|
|
4
|
+
# 核心逻辑:修复权限 -> 固化环境 -> 极速安装核心依赖 -> 实例初始化
|
|
5
|
+
# =================================================================
|
|
4
6
|
|
|
5
7
|
set -e
|
|
6
8
|
|
|
@@ -13,16 +15,16 @@ NC='\033[0m'
|
|
|
13
15
|
|
|
14
16
|
MIN_NODE_VERSION="22.12.0"
|
|
15
17
|
|
|
16
|
-
echo -e "${BLUE}
|
|
17
|
-
echo -e "${BLUE}
|
|
18
|
-
echo -e "${BLUE}
|
|
18
|
+
echo -e "${BLUE}================================================${NC}"
|
|
19
|
+
echo -e "${BLUE} OpenClaw 极速部署工具 (离线补丁固化版) ${NC}"
|
|
20
|
+
echo -e "${BLUE}================================================${NC}"
|
|
19
21
|
|
|
20
22
|
# ==================== 1. 彻底修复权限污染 ====================
|
|
21
|
-
echo -e "${YELLOW}🔧
|
|
22
|
-
#
|
|
23
|
+
echo -e "${YELLOW}🔧 正在修复本地环境权限...${NC}"
|
|
24
|
+
# 收回被 root 误占用的 npm 目录所有权,防止 EACCES 报错
|
|
23
25
|
sudo chown -R $(id -u):$(id -g) "$HOME/.npm" 2>/dev/null || true
|
|
24
26
|
|
|
25
|
-
# ==================== 2.
|
|
27
|
+
# ==================== 2. 系统环境识别 ====================
|
|
26
28
|
OS="$(uname -s)"
|
|
27
29
|
ARCH="$(uname -m)"
|
|
28
30
|
if [[ "$SHELL" == */zsh ]]; then
|
|
@@ -31,10 +33,22 @@ else
|
|
|
31
33
|
CONF_FILE="$HOME/.bashrc"
|
|
32
34
|
fi
|
|
33
35
|
|
|
34
|
-
# ==================== 3.
|
|
36
|
+
# ==================== 3. 基础编译工具链 (针对原生模块) ====================
|
|
37
|
+
if [[ "$OS" == "Linux" ]]; then
|
|
38
|
+
echo -e "${YELLOW}🔍 检查系统编译依赖 (build-essential)...${NC}"
|
|
39
|
+
if command -v apt-get &> /dev/null; then
|
|
40
|
+
sudo apt-get update -qq && sudo apt-get install -y -qq build-essential python3 make gcc g++ 2>/dev/null || true
|
|
41
|
+
fi
|
|
42
|
+
# 强制让 npm 知道 python 路径,防止 node-pty 编译失败
|
|
43
|
+
PYTHON_PATH=$(command -v python3 || command -v python)
|
|
44
|
+
[ -n "$PYTHON_PATH" ] && npm config set python "$PYTHON_PATH" 2>/dev/null || true
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
# ==================== 4. Node.js 环境镜像安装 ====================
|
|
35
48
|
check_node() {
|
|
36
49
|
if ! command -v node &> /dev/null; then return 1; fi
|
|
37
50
|
local CUR_V=$(node -v | sed 's/v//')
|
|
51
|
+
# 简单的版本号比较逻辑
|
|
38
52
|
[[ "$(printf '%s\n%s' "$MIN_NODE_VERSION" "$CUR_V" | sort -V | head -n1)" == "$MIN_NODE_VERSION" ]]
|
|
39
53
|
}
|
|
40
54
|
|
|
@@ -60,64 +74,75 @@ if ! check_node; then
|
|
|
60
74
|
fi
|
|
61
75
|
echo -e "${GREEN}✅ Node.js 环境已就绪: $(node -v)${NC}"
|
|
62
76
|
|
|
63
|
-
# ====================
|
|
64
|
-
echo -e "${YELLOW}🔧
|
|
77
|
+
# ==================== 5. 配置用户级全局路径 ====================
|
|
78
|
+
echo -e "${YELLOW}🔧 配置用户全局安装路径 ($HOME/.npm-global)...${NC}"
|
|
65
79
|
NPM_GLOBAL_BIN="$HOME/.npm-global"
|
|
66
80
|
mkdir -p "$NPM_GLOBAL_BIN/bin"
|
|
67
81
|
npm config set prefix "$NPM_GLOBAL_BIN"
|
|
68
82
|
|
|
69
|
-
#
|
|
83
|
+
# 立即注入当前进程环境变量
|
|
70
84
|
export PATH="$NPM_GLOBAL_BIN/bin:$PATH"
|
|
85
|
+
# 永久注入配置文件
|
|
71
86
|
if ! grep -q ".npm-global/bin" "$CONF_FILE" 2>/dev/null; then
|
|
72
|
-
echo "
|
|
87
|
+
echo -e "\n# OpenClaw PATH\nexport PATH=\"\$HOME/.npm-global/bin:\$PATH\"" >> "$CONF_FILE"
|
|
73
88
|
fi
|
|
74
89
|
|
|
75
|
-
# ====================
|
|
76
|
-
echo -e "${YELLOW}🚀 切换 GitHub
|
|
77
|
-
# 清理之前可能失效的配置
|
|
78
|
-
git config --global --unset-all url."https://kkgithub.com/".insteadOf 2>/dev/null || true
|
|
79
|
-
|
|
80
|
-
# 强制将 github.com 重定向至稳定镜像源,解决 libsignal-node 等包的拉取问题
|
|
90
|
+
# ==================== 6. 建立 GitHub 隧道 (针对插件克隆) ====================
|
|
91
|
+
echo -e "${YELLOW}🚀 切换 GitHub 稳定隧道镜像 (moeyy 代理)...${NC}"
|
|
81
92
|
git config --global url."https://github.moeyy.xyz/https://github.com/".insteadOf "https://github.com/"
|
|
82
|
-
git config --global url."https://github.moeyy.xyz/https://github.com/".insteadOf "git@github.com:"
|
|
83
|
-
git config --global url."https://github.moeyy.xyz/https://github.com/".insteadOf "ssh://git@github.com/"
|
|
84
93
|
git config --global http.sslVerify false
|
|
85
94
|
|
|
86
|
-
# ====================
|
|
87
|
-
echo -e "${YELLOW}📥
|
|
95
|
+
# ==================== 7. 安装 OpenClaw (核心安装) ====================
|
|
96
|
+
echo -e "${YELLOW}📥 正在从镜像站安装 openclaw-multi-auto...${NC}"
|
|
88
97
|
npm config set registry https://registry.npmmirror.com
|
|
98
|
+
npm config set strict-ssl false
|
|
89
99
|
export NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node
|
|
90
100
|
|
|
91
|
-
#
|
|
92
|
-
|
|
93
|
-
|
|
101
|
+
# 开启离线优先模式,利用 bundledDependencies
|
|
102
|
+
npm config set prefer-offline true
|
|
103
|
+
|
|
104
|
+
if ! npm install -g openclaw-multi-auto --unsafe-perm=true --foreground-scripts; then
|
|
105
|
+
echo -e "${RED}⚠️ 标准安装受阻,尝试跳过编译脚本以完成基础安装...${NC}"
|
|
106
|
+
npm install -g openclaw-multi-auto --unsafe-perm=true --ignore-scripts
|
|
107
|
+
fi
|
|
108
|
+
|
|
109
|
+
# ==================== 8. 自动化实例初始化 ====================
|
|
110
|
+
GLOBAL_ROOT=$(npm config get prefix)
|
|
111
|
+
# 定位脚本路径
|
|
112
|
+
CREATE_SCRIPT="$GLOBAL_ROOT/lib/node_modules/openclaw-multi-auto/scripts/create-instance.sh"
|
|
94
113
|
|
|
95
|
-
if !
|
|
96
|
-
|
|
97
|
-
npm install -g openclaw-multi-auto --legacy-peer-deps --unsafe-perm=true --ignore-scripts
|
|
114
|
+
if [ ! -f "$CREATE_SCRIPT" ]; then
|
|
115
|
+
CREATE_SCRIPT="$(pwd)/scripts/create-instance.sh"
|
|
98
116
|
fi
|
|
99
117
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if [
|
|
103
|
-
|
|
104
|
-
|
|
118
|
+
echo -e "${YELLOW}🏗️ 正在初始化默认实例 [yunwei]...${NC}"
|
|
119
|
+
|
|
120
|
+
if [ -f "$CREATE_SCRIPT" ]; then
|
|
121
|
+
chmod +x "$CREATE_SCRIPT"
|
|
122
|
+
|
|
123
|
+
# 核心改动:如果 install.sh 没拿到 PROVIDER 和 USR_KEY,
|
|
124
|
+
# 这里传空字符串,触发 create-instance.sh 内部的 read 交互
|
|
125
|
+
bash "$CREATE_SCRIPT" "yunwei" "18790" "$PROVIDER" "$USR_KEY"
|
|
126
|
+
|
|
127
|
+
else
|
|
128
|
+
echo -e "${RED}⚠️ 警告:未找到实例创建脚本(create-instance.sh),请检查安装。${NC}"
|
|
105
129
|
fi
|
|
106
130
|
|
|
107
|
-
|
|
108
|
-
|
|
131
|
+
# ==================== 9. 部署反馈 ====================
|
|
132
|
+
# 注意:由于新的 create-instance.sh 内部已经处理了启动逻辑,
|
|
133
|
+
# 这里我们只需要展示状态即可。
|
|
109
134
|
|
|
110
135
|
INSTANCE_DIR="$HOME/openclaws/yunwei"
|
|
111
136
|
if [ -d "$INSTANCE_DIR" ]; then
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
echo -e "${GREEN}
|
|
116
|
-
echo -e "
|
|
117
|
-
echo -e "
|
|
118
|
-
echo -e "💡
|
|
137
|
+
# 从配置文件中提取实际端口
|
|
138
|
+
FINAL_PORT=$(grep '"port":' "$INSTANCE_DIR/config/openclaw.json" | awk -F': ' '{print $2}' | tr -d ', ' | xargs)
|
|
139
|
+
|
|
140
|
+
echo -e "${GREEN}================================================${NC}"
|
|
141
|
+
echo -e "${GREEN}🎉 OpenClaw 环境部署及 [yunwei] 实例配置完成!${NC}"
|
|
142
|
+
echo -e "🌐 默认服务端口: ${BLUE}${FINAL_PORT:-18790}${NC}"
|
|
143
|
+
echo -e "💡 交互管理: ${YELLOW}openclaw tui${NC}"
|
|
144
|
+
echo -e "💡 实例目录: ${BLUE}${INSTANCE_DIR}${NC}"
|
|
145
|
+
echo -e "${GREEN}================================================${NC}"
|
|
119
146
|
else
|
|
120
|
-
echo -e "${
|
|
147
|
+
echo -e "${YELLOW}💡 环境已就绪。请手动运行 'openclaw' 或使用 create-instance.sh 创建实例。${NC}"
|
|
121
148
|
fi
|
|
122
|
-
|
|
123
|
-
echo -e "${BLUE}========================================${NC}"
|