openclaw-multi-auto 1.4.3 → 1.4.4

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 (81) hide show
  1. package/dist/build-info.json +3 -3
  2. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  3. package/dist/plugin-sdk/accounts-CJWOBzwB.js +35 -0
  4. package/dist/plugin-sdk/accounts-DP1-L-QS.js +288 -0
  5. package/dist/plugin-sdk/accounts-DZhWlEg3.js +46 -0
  6. package/dist/plugin-sdk/active-listener-B_sLJTXM.js +50 -0
  7. package/dist/plugin-sdk/api-key-rotation-BRE4X2tf.js +181 -0
  8. package/dist/plugin-sdk/audio-preflight-DGEUDxxR.js +69 -0
  9. package/dist/plugin-sdk/audio-transcription-runner-DkoPNPYt.js +2176 -0
  10. package/dist/plugin-sdk/audit-membership-runtime-DSBHHw7o.js +58 -0
  11. package/dist/plugin-sdk/channel-activity-F3d0yUwy.js +94 -0
  12. package/dist/plugin-sdk/channel-web-QF7EpjeP.js +2256 -0
  13. package/dist/plugin-sdk/chrome-BXoCyCkY.js +2415 -0
  14. package/dist/plugin-sdk/commands-registry-t7cXBTfN.js +1125 -0
  15. package/dist/plugin-sdk/config-BkEnz2Po.js +17913 -0
  16. package/dist/plugin-sdk/deliver-B6AG_l67.js +1694 -0
  17. package/dist/plugin-sdk/deliver-runtime-D585kJZc.js +32 -0
  18. package/dist/plugin-sdk/deps-send-discord.runtime-a_OKY2js.js +23 -0
  19. package/dist/plugin-sdk/deps-send-imessage.runtime-Baxy9TD4.js +22 -0
  20. package/dist/plugin-sdk/deps-send-signal.runtime-BwXoCrFl.js +21 -0
  21. package/dist/plugin-sdk/deps-send-slack.runtime-CLmKjgso.js +19 -0
  22. package/dist/plugin-sdk/deps-send-telegram.runtime-BKfdBKnZ.js +24 -0
  23. package/dist/plugin-sdk/deps-send-whatsapp.runtime-BOTwkbx_.js +57 -0
  24. package/dist/plugin-sdk/diagnostic-CsP-lEkI.js +319 -0
  25. package/dist/plugin-sdk/errors-DaiAM-yU.js +54 -0
  26. package/dist/plugin-sdk/fetch-guard-DETCcJzQ.js +156 -0
  27. package/dist/plugin-sdk/fs-safe-B8y811FR.js +352 -0
  28. package/dist/plugin-sdk/image-DjTEkYZE.js +2310 -0
  29. package/dist/plugin-sdk/image-ops-BSiMpAw4.js +584 -0
  30. package/dist/plugin-sdk/image-runtime-6xPp8m5a.js +25 -0
  31. package/dist/plugin-sdk/index.js +50 -50
  32. package/dist/plugin-sdk/ir-DQ7_HbvK.js +1296 -0
  33. package/dist/plugin-sdk/local-roots-BUP4YBmR.js +186 -0
  34. package/dist/plugin-sdk/logger-CZY9KIoY.js +1163 -0
  35. package/dist/plugin-sdk/login-BxEKLlCo.js +57 -0
  36. package/dist/plugin-sdk/login-qr-BQIpMPr9.js +320 -0
  37. package/dist/plugin-sdk/manager-I6KbPihW.js +3917 -0
  38. package/dist/plugin-sdk/manager-runtime-CFfYYWIQ.js +15 -0
  39. package/dist/plugin-sdk/mattermost.js +3 -3
  40. package/dist/plugin-sdk/outbound-NS6UHnB6.js +212 -0
  41. package/dist/plugin-sdk/outbound-attachment-Dy6fyf6H.js +19 -0
  42. package/dist/plugin-sdk/path-alias-guards-DBjLbIX_.js +43 -0
  43. package/dist/plugin-sdk/paths-vTM3Lh3X.js +166 -0
  44. package/dist/plugin-sdk/pi-embedded-helpers-1R1gu7eX.js +9627 -0
  45. package/dist/plugin-sdk/pi-model-discovery-runtime-Do9o-dUd.js +8 -0
  46. package/dist/plugin-sdk/pi-model-discovery-v-XPUOOf.js +134 -0
  47. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-D4sFsIks.js +354 -0
  48. package/dist/plugin-sdk/plugins-DeBZB9l_.js +864 -0
  49. package/dist/plugin-sdk/proxy-fetch-ChxOhWF4.js +38 -0
  50. package/dist/plugin-sdk/pw-ai-DEOmCSSC.js +1938 -0
  51. package/dist/plugin-sdk/qmd-manager-HyYKoEch.js +1448 -0
  52. package/dist/plugin-sdk/query-expansion-CeyKUeDW.js +1011 -0
  53. package/dist/plugin-sdk/redact-DjVX-1N3.js +319 -0
  54. package/dist/plugin-sdk/reply-DAo_Jt8K.js +97916 -0
  55. package/dist/plugin-sdk/resolve-outbound-target-B42qgQS9.js +40 -0
  56. package/dist/plugin-sdk/run-with-concurrency-Bt_ks0Qa.js +1994 -0
  57. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-B6W989eF.js +10 -0
  58. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-c_GDFy37.js +19 -0
  59. package/dist/plugin-sdk/send-CQpMudwO.js +2587 -0
  60. package/dist/plugin-sdk/send-DQHLzVyO.js +414 -0
  61. package/dist/plugin-sdk/send-DTB24bEF.js +3135 -0
  62. package/dist/plugin-sdk/send-DfHadjZ_.js +503 -0
  63. package/dist/plugin-sdk/send-XXlW2iny.js +540 -0
  64. package/dist/plugin-sdk/session-6TF6MyaC.js +169 -0
  65. package/dist/plugin-sdk/skill-commands-CkGeFUMl.js +342 -0
  66. package/dist/plugin-sdk/skills-CBkHBYPq.js +1428 -0
  67. package/dist/plugin-sdk/slash-commands.runtime-CxliuGaP.js +13 -0
  68. package/dist/plugin-sdk/slash-dispatch.runtime-DFaeYlJQ.js +52 -0
  69. package/dist/plugin-sdk/slash-skill-commands.runtime-0M0OLCxq.js +16 -0
  70. package/dist/plugin-sdk/ssrf-cFtplYtS.js +202 -0
  71. package/dist/plugin-sdk/store-5nyxY3WU.js +81 -0
  72. package/dist/plugin-sdk/subagent-registry-runtime-DCtmDwna.js +52 -0
  73. package/dist/plugin-sdk/tables-C47P4GTN.js +55 -0
  74. package/dist/plugin-sdk/target-errors-Blia4S69.js +195 -0
  75. package/dist/plugin-sdk/thinking-Bo2eosVa.js +1206 -0
  76. package/dist/plugin-sdk/tokens-DgNRBwIg.js +52 -0
  77. package/dist/plugin-sdk/tool-images-Gk_-0y2N.js +274 -0
  78. package/dist/plugin-sdk/web-CVxZbXyH.js +56 -0
  79. package/dist/plugin-sdk/whatsapp-actions-Bw0H9g-n.js +80 -0
  80. package/package.json +1 -1
  81. package/scripts/install-maca.sh +28 -5
@@ -0,0 +1,58 @@
1
+ import "./paths-MKyEVmEb.js";
2
+ import { y as isRecord } from "./logger-CZY9KIoY.js";
3
+ import { n as fetchWithTimeout } from "./fetch-timeout-D455O27U.js";
4
+ import { t as makeProxyFetch } from "./proxy-fetch-ChxOhWF4.js";
5
+ import "./proxy-BKdNrmWL.js";
6
+
7
+ //#region src/telegram/audit-membership-runtime.ts
8
+ const TELEGRAM_API_BASE = "https://api.telegram.org";
9
+ async function auditTelegramGroupMembershipImpl(params) {
10
+ const fetcher = params.proxyUrl ? makeProxyFetch(params.proxyUrl) : fetch;
11
+ const base = `${TELEGRAM_API_BASE}/bot${params.token}`;
12
+ const groups = [];
13
+ for (const chatId of params.groupIds) try {
14
+ const res = await fetchWithTimeout(`${base}/getChatMember?chat_id=${encodeURIComponent(chatId)}&user_id=${encodeURIComponent(String(params.botId))}`, {}, params.timeoutMs, fetcher);
15
+ const json = await res.json();
16
+ if (!res.ok || !isRecord(json) || !json.ok) {
17
+ const desc = isRecord(json) && !json.ok && typeof json.description === "string" ? json.description : `getChatMember failed (${res.status})`;
18
+ groups.push({
19
+ chatId,
20
+ ok: false,
21
+ status: null,
22
+ error: desc,
23
+ matchKey: chatId,
24
+ matchSource: "id"
25
+ });
26
+ continue;
27
+ }
28
+ const status = isRecord(json.result) ? json.result.status ?? null : null;
29
+ const ok = status === "creator" || status === "administrator" || status === "member";
30
+ groups.push({
31
+ chatId,
32
+ ok,
33
+ status,
34
+ error: ok ? null : "bot not in group",
35
+ matchKey: chatId,
36
+ matchSource: "id"
37
+ });
38
+ } catch (err) {
39
+ groups.push({
40
+ chatId,
41
+ ok: false,
42
+ status: null,
43
+ error: err instanceof Error ? err.message : String(err),
44
+ matchKey: chatId,
45
+ matchSource: "id"
46
+ });
47
+ }
48
+ return {
49
+ ok: groups.every((g) => g.ok),
50
+ checkedGroups: groups.length,
51
+ unresolvedGroups: 0,
52
+ hasWildcardUnmentionedGroups: false,
53
+ groups
54
+ };
55
+ }
56
+
57
+ //#endregion
58
+ export { auditTelegramGroupMembershipImpl };
@@ -0,0 +1,94 @@
1
+ import { Un as resolveRetryConfig, Wn as retryAsync } from "./config-BkEnz2Po.js";
2
+ import { a as createSubsystemLogger } from "./logger-CZY9KIoY.js";
3
+ import { r as formatErrorMessage } from "./errors-DaiAM-yU.js";
4
+ import { RateLimitError } from "@buape/carbon";
5
+
6
+ //#region src/infra/retry-policy.ts
7
+ const DISCORD_RETRY_DEFAULTS = {
8
+ attempts: 3,
9
+ minDelayMs: 500,
10
+ maxDelayMs: 3e4,
11
+ jitter: .1
12
+ };
13
+ const TELEGRAM_RETRY_DEFAULTS = {
14
+ attempts: 3,
15
+ minDelayMs: 400,
16
+ maxDelayMs: 3e4,
17
+ jitter: .1
18
+ };
19
+ const TELEGRAM_RETRY_RE = /429|timeout|connect|reset|closed|unavailable|temporarily/i;
20
+ const log = createSubsystemLogger("retry-policy");
21
+ function getTelegramRetryAfterMs(err) {
22
+ if (!err || typeof err !== "object") return;
23
+ const candidate = "parameters" in err && err.parameters && typeof err.parameters === "object" ? err.parameters.retry_after : "response" in err && err.response && typeof err.response === "object" && "parameters" in err.response ? err.response.parameters?.retry_after : "error" in err && err.error && typeof err.error === "object" && "parameters" in err.error ? err.error.parameters?.retry_after : void 0;
24
+ return typeof candidate === "number" && Number.isFinite(candidate) ? candidate * 1e3 : void 0;
25
+ }
26
+ function createDiscordRetryRunner(params) {
27
+ const retryConfig = resolveRetryConfig(DISCORD_RETRY_DEFAULTS, {
28
+ ...params.configRetry,
29
+ ...params.retry
30
+ });
31
+ return (fn, label) => retryAsync(fn, {
32
+ ...retryConfig,
33
+ label,
34
+ shouldRetry: (err) => err instanceof RateLimitError,
35
+ retryAfterMs: (err) => err instanceof RateLimitError ? err.retryAfter * 1e3 : void 0,
36
+ onRetry: params.verbose ? (info) => {
37
+ const labelText = info.label ?? "request";
38
+ const maxRetries = Math.max(1, info.maxAttempts - 1);
39
+ log.warn(`discord ${labelText} rate limited, retry ${info.attempt}/${maxRetries} in ${info.delayMs}ms`);
40
+ } : void 0
41
+ });
42
+ }
43
+ function createTelegramRetryRunner(params) {
44
+ const retryConfig = resolveRetryConfig(TELEGRAM_RETRY_DEFAULTS, {
45
+ ...params.configRetry,
46
+ ...params.retry
47
+ });
48
+ const shouldRetry = params.shouldRetry ? (err) => params.shouldRetry?.(err) || TELEGRAM_RETRY_RE.test(formatErrorMessage(err)) : (err) => TELEGRAM_RETRY_RE.test(formatErrorMessage(err));
49
+ return (fn, label) => retryAsync(fn, {
50
+ ...retryConfig,
51
+ label,
52
+ shouldRetry,
53
+ retryAfterMs: getTelegramRetryAfterMs,
54
+ onRetry: params.verbose ? (info) => {
55
+ const maxRetries = Math.max(1, info.maxAttempts - 1);
56
+ log.warn(`telegram send retry ${info.attempt}/${maxRetries} for ${info.label ?? label ?? "request"} in ${info.delayMs}ms: ${formatErrorMessage(info.err)}`);
57
+ } : void 0
58
+ });
59
+ }
60
+
61
+ //#endregion
62
+ //#region src/infra/channel-activity.ts
63
+ const activity = /* @__PURE__ */ new Map();
64
+ function keyFor(channel, accountId) {
65
+ return `${channel}:${accountId || "default"}`;
66
+ }
67
+ function ensureEntry(channel, accountId) {
68
+ const key = keyFor(channel, accountId);
69
+ const existing = activity.get(key);
70
+ if (existing) return existing;
71
+ const created = {
72
+ inboundAt: null,
73
+ outboundAt: null
74
+ };
75
+ activity.set(key, created);
76
+ return created;
77
+ }
78
+ function recordChannelActivity(params) {
79
+ const at = typeof params.at === "number" ? params.at : Date.now();
80
+ const accountId = params.accountId?.trim() || "default";
81
+ const entry = ensureEntry(params.channel, accountId);
82
+ if (params.direction === "inbound") entry.inboundAt = at;
83
+ if (params.direction === "outbound") entry.outboundAt = at;
84
+ }
85
+ function getChannelActivity(params) {
86
+ const accountId = params.accountId?.trim() || "default";
87
+ return activity.get(keyFor(params.channel, accountId)) ?? {
88
+ inboundAt: null,
89
+ outboundAt: null
90
+ };
91
+ }
92
+
93
+ //#endregion
94
+ export { createTelegramRetryRunner as i, recordChannelActivity as n, createDiscordRetryRunner as r, getChannelActivity as t };