@openclaw/discord 2026.7.2-beta.7 → 2026.8.1-beta.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 (95) hide show
  1. package/dist/{account-inspect-SXiCBCgP.js → account-inspect-CqzrH14k.js} +48 -42
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/action-runtime-api.js +1 -1
  4. package/dist/{active-turn-thread-route-MlKWp8RD.js → active-turn-thread-route-fmHl1HNd.js} +9 -11
  5. package/dist/{activities-api-DTKsuDxf.js → activities-api-DS7vpdtp.js} +4 -4
  6. package/dist/activities-api.js +1 -1
  7. package/dist/{allow-list-DzKrtfah.js → allow-list-DnxIlPP2.js} +2 -3
  8. package/dist/{api-DnrK9gML.js → api-DNVbJyEy.js} +7 -2
  9. package/dist/api.js +15 -15
  10. package/dist/{approval-handler.runtime-HymvFTYn.js → approval-handler.runtime-B6yEV79q.js} +5 -5
  11. package/dist/{approval-message-safety-DEyKVsAw.js → approval-message-safety-AcIxvrf3.js} +1 -1
  12. package/dist/{audit-CjsrabP8.js → audit-Db-rlntl.js} +4 -4
  13. package/dist/{channel-vKa-76xY.js → channel-CnnbJSt5.js} +46 -72
  14. package/dist/{channel-actions-uXFTJX3o.js → channel-actions-5s_hjYKd.js} +4 -4
  15. package/dist/{channel-actions.runtime-CIYU90sl.js → channel-actions.runtime-CLKrx6tr.js} +53 -36
  16. package/dist/channel-config-api.js +1 -1
  17. package/dist/channel-plugin-api.js +1 -1
  18. package/dist/{channel.setup-CmcwZ_qd.js → channel.setup-BFAO-V1P.js} +15 -53
  19. package/dist/{config-schema-WHRQcY19.js → config-schema-BgEskFAs.js} +9 -4
  20. package/dist/{directory-config-D_LojtCe.js → directory-config-BVX7Cflc.js} +1 -1
  21. package/dist/directory-contract-api.js +1 -1
  22. package/dist/{directory-live-Bw5Ephzv.js → directory-live-DGIGxpIo.js} +6 -3
  23. package/dist/{doctor-Bc4S1qyd.js → doctor-BzC-TLnB.js} +4 -4
  24. package/dist/{doctor-contract-CCFMIDk9.js → doctor-contract-DLa-BTiU.js} +2 -3
  25. package/dist/doctor-contract-api.js +147 -2
  26. package/dist/{handle-action.guild-admin-D6VRRW-C.js → handle-action.guild-admin-BNVTUISF.js} +4 -7
  27. package/dist/{inbound-event-delivery-CEPlt2uz.js → inbound-event-delivery-De2qxTrP.js} +4 -25
  28. package/dist/index.js +4 -2
  29. package/dist/{message-handler-CeiSulIw.js → message-handler-Unk_f10F.js} +41 -32
  30. package/dist/{message-handler.preflight-DibgQFf2.js → message-handler.preflight-C9zecxR9.js} +50 -26
  31. package/dist/{message-handler.process-Dnc_oz9y.js → message-handler.process-DWQ6UHHu.js} +130 -166
  32. package/dist/{message-utils-BgTwT_q7.js → message-utils-BSCPVgy0.js} +4 -4
  33. package/dist/{model-picker-preference-primitives-D25pnCOu.js → model-picker-preference-primitives-BHT1LkR_.js} +3 -3
  34. package/dist/{outbound-adapter-DtE-i2OJ.js → outbound-adapter-D9nRivT1.js} +91 -32
  35. package/dist/{outbound-components-C7GVyfPh.js → outbound-components-cTzwBJ60.js} +3 -3
  36. package/dist/{outbound-session-route-H-HoyH5U.js → outbound-session-route-DxLkrgKQ.js} +68 -95
  37. package/dist/{pluralkit-CD4B11JB.js → pluralkit-DdiJ9KMK.js} +1 -1
  38. package/dist/{preflight-audio-BjnQZ5yS.js → preflight-audio-DrnqFA8U.js} +22 -28
  39. package/dist/{probe-BeWKhjqX.js → probe-Bl-k5_Ku.js} +36 -12
  40. package/dist/probe.runtime-M9fREKvp.js +2 -0
  41. package/dist/{provider-DfQJX3z5.js → provider-DvSNb-2v.js} +969 -1248
  42. package/dist/{provider-session.runtime-Bo88k0pV.js → provider-session.runtime-BUEqD0rA.js} +3 -3
  43. package/dist/provider.runtime-C9PnJZbZ.js +2 -0
  44. package/dist/realtime-session.runtime-C7wen-aF.js +1340 -0
  45. package/dist/{resolve-allowlist-common-DHERApxi.js → resolve-allowlist-common-D04lpEzb.js} +2 -2
  46. package/dist/{resolve-channels-BjepAj8b.js → resolve-channels-Dm7jEeg6.js} +4 -4
  47. package/dist/{resolve-users-Bc28htgt.js → resolve-users-bktrCUUU.js} +3 -3
  48. package/dist/{chunk-DX4jpFQP.js → retry-CLpJcXXf.js} +291 -68
  49. package/dist/{runtime-_aRC6V2s.js → runtime-DGsSyDTS.js} +30 -25
  50. package/dist/{runtime-BmW_j_hl.js → runtime-DoHjckYm.js} +4 -6
  51. package/dist/runtime-api.actions.js +2 -2
  52. package/dist/runtime-api.js +22 -23
  53. package/dist/runtime-api.lookup.js +5 -5
  54. package/dist/runtime-api.monitor-CHxrFPnW.js +5 -0
  55. package/dist/runtime-api.monitor.js +5 -5
  56. package/dist/runtime-api.send.js +6 -6
  57. package/dist/runtime-api.threads.js +5 -6
  58. package/dist/sdk-runtime-QpY8PvCh.js +370 -0
  59. package/dist/{send-CdkZ6zeW.js → send-B7Q6Oc1I.js} +175 -86
  60. package/dist/{send.components-5uqwkjgE.js → send.components-iJyFXw9L.js} +24 -28
  61. package/dist/{send.outbound-D-80Ej-t.js → send.outbound-DS5tHwfR.js} +37 -24
  62. package/dist/{send.reactions-CtlmGd_o.js → send.reactions-BAn0iiVQ.js} +14 -21
  63. package/dist/{send.receipt-CuwRrpFz.js → send.receipt-IPI1p-SP.js} +19 -1
  64. package/dist/{send.shared-jpvAG_u6.js → send.shared-BmwFjW6T.js} +16 -85
  65. package/dist/{sender-identity-mG_zsdox.js → sender-identity-QtalnCYv.js} +1 -1
  66. package/dist/setup-entry.js +0 -5
  67. package/dist/setup-plugin-api.js +1 -1
  68. package/dist/{shared-CXF1tup1.js → shared-BIXIX6uJ.js} +16 -17
  69. package/dist/{subagent-hooks-Dxy7Fmnq.js → subagent-hooks-CTt5KCJr.js} +2 -2
  70. package/dist/subagent-hooks-api.js +2 -6
  71. package/dist/subagent-progress-DhaE_h8a.js +109 -0
  72. package/dist/{system-events-DdUqf91B.js → system-events-CTqDf6_s.js} +2 -2
  73. package/dist/{target-resolver-C3s_2m0t.js → target-resolver-maOKSqO0.js} +2 -2
  74. package/dist/targets-yUFTHoAx.js +3 -0
  75. package/dist/{thread-bindings-C-M-ly7P.js → thread-bindings-3L8p82GV.js} +5 -7
  76. package/dist/{thread-bindings.manager-DYvSlrva.js → thread-bindings.manager-DCIH6WDC.js} +257 -29
  77. package/dist/{thread-bindings.session-updates-DAIlp7Px.js → thread-bindings.session-updates-bJ2KQFY6.js} +1 -1
  78. package/dist/{thread-bindings.state-Cgi5uRn-.js → thread-bindings.state-aeV8HNgV.js} +2 -15
  79. package/dist/{transcripts-source-DIKGsTGT.js → transcripts-source-CfFMexGt.js} +1 -1
  80. package/dist/transcripts-source-api.js +1 -1
  81. package/dist/{typing--Mzo2kM7.js → typing-CS-nNVoe.js} +1 -1
  82. package/dist/voice-runtime-BEdqNcST.js +2459 -0
  83. package/openclaw.plugin.json +203 -19
  84. package/package.json +15 -9
  85. package/skills/discord/SKILL.md +22 -115
  86. package/dist/legacy-state-migrations-api.js +0 -138
  87. package/dist/manager.runtime-Bjav3pfC.js +0 -3655
  88. package/dist/preflight-audio.runtime-CoCXMM8r.js +0 -7
  89. package/dist/probe.runtime-DqFGFMbZ.js +0 -2
  90. package/dist/provider.runtime-Cy7XZmyh.js +0 -2
  91. package/dist/runtime-api.monitor-CCRubd3-.js +0 -5
  92. package/dist/session-binding-contract-api.js +0 -2
  93. package/dist/subagent-progress-DI3sYLLo.js +0 -664
  94. package/dist/targets-Dv_RN7vT.js +0 -3
  95. package/dist/thread-bindings.discord-api-BoDNqamb.js +0 -246
@@ -1,138 +0,0 @@
1
- import { n as DISCORD_COMMAND_DEPLOY_HASH_NAMESPACE, t as DISCORD_COMMAND_DEPLOY_HASH_MAX_ENTRIES } from "./command-deploy-store-DFkBTViB.js";
2
- import { A as toBindingRecordKey, a as THREAD_BINDINGS_MAX_ENTRIES, d as normalizePersistedBinding, o as THREAD_BINDINGS_NAMESPACE } from "./thread-bindings.state-Cgi5uRn-.js";
3
- import { i as timestampMs, r as sanitizeRecentModels, t as buildPreferenceModelKey } from "./model-picker-preference-primitives-D25pnCOu.js";
4
- import { MAX_DATE_TIMESTAMP_MS, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
5
- import path from "node:path";
6
- import fs from "node:fs";
7
- //#region extensions/discord/src/monitor/model-picker-preferences-migrations.ts
8
- const PREFERENCE_MAX_ENTRIES = 2e3;
9
- const MAX_PLUGIN_STATE_KEY_BYTES = 512;
10
- const textEncoder = new TextEncoder();
11
- function fileExists(filePath) {
12
- try {
13
- return fs.statSync(filePath).isFile();
14
- } catch {
15
- return false;
16
- }
17
- }
18
- function readLegacyStore(filePath) {
19
- try {
20
- const parsed = JSON.parse(fs.readFileSync(filePath, "utf8"));
21
- return parsed && typeof parsed === "object" ? parsed : null;
22
- } catch {
23
- return null;
24
- }
25
- }
26
- function readLegacyThreadBindingsStore(filePath) {
27
- const parsed = JSON.parse(fs.readFileSync(filePath, "utf8"));
28
- if (!parsed || typeof parsed !== "object") throw new Error("legacy Discord thread bindings store must be an object");
29
- return parsed;
30
- }
31
- function normalizeLegacyPreferenceKey(key) {
32
- const trimmed = key.trim();
33
- if (!trimmed || textEncoder.encode(trimmed).length > MAX_PLUGIN_STATE_KEY_BYTES) return;
34
- return trimmed;
35
- }
36
- function legacyUpdatedAtForIndex(updatedAt, index, total) {
37
- const baseMs = timestampMs(updatedAt);
38
- return timestampMsToIsoString(Math.min(baseMs + Math.max(0, total), MAX_DATE_TIMESTAMP_MS) - Math.max(0, index)) ?? timestampMsToIsoString(baseMs) ?? timestampMsToIsoString(Math.max(0, total - index)) ?? "1970-01-01T00:00:00.000Z";
39
- }
40
- function readFiniteNumberField(entry, key) {
41
- const value = entry[key];
42
- return typeof value === "number" && Number.isFinite(value) ? Math.floor(value) : void 0;
43
- }
44
- function upgradeLegacyThreadBindingShape(rawEntry) {
45
- if (!rawEntry || typeof rawEntry !== "object" || Array.isArray(rawEntry)) return rawEntry;
46
- const entry = { ...rawEntry };
47
- if (entry.targetSessionKey === void 0 && typeof entry.sessionKey === "string") entry.targetSessionKey = entry.sessionKey;
48
- delete entry.sessionKey;
49
- const expiresAt = readFiniteNumberField(entry, "expiresAt");
50
- delete entry.expiresAt;
51
- if (entry.idleTimeoutMs === void 0 && entry.maxAgeMs === void 0 && expiresAt !== void 0) {
52
- entry.idleTimeoutMs = 0;
53
- if (expiresAt <= 0) entry.maxAgeMs = 0;
54
- else {
55
- const boundAt = readFiniteNumberField(entry, "boundAt") ?? 0;
56
- const lastActivityAt = readFiniteNumberField(entry, "lastActivityAt") ?? 0;
57
- entry.maxAgeMs = Math.max(1, expiresAt - Math.max(0, boundAt > 0 ? boundAt : lastActivityAt));
58
- }
59
- }
60
- return entry;
61
- }
62
- const detectDiscordLegacyStateMigrations = ({ stateDir }) => {
63
- const plans = [];
64
- const commandDeployCacheSourcePath = path.join(stateDir, "discord", "command-deploy-cache.json");
65
- if (fileExists(commandDeployCacheSourcePath)) plans.push({
66
- kind: "plugin-state-import",
67
- label: "Discord command deployment cache",
68
- sourcePath: commandDeployCacheSourcePath,
69
- targetPath: `plugin state:${DISCORD_COMMAND_DEPLOY_HASH_NAMESPACE}`,
70
- pluginId: "discord",
71
- namespace: DISCORD_COMMAND_DEPLOY_HASH_NAMESPACE,
72
- maxEntries: DISCORD_COMMAND_DEPLOY_HASH_MAX_ENTRIES,
73
- scopeKey: "",
74
- cleanupSource: "remove",
75
- cleanupWhenEmpty: true,
76
- readEntries: () => []
77
- });
78
- const modelPickerSourcePath = path.join(stateDir, "discord", "model-picker-preferences.json");
79
- if (fileExists(modelPickerSourcePath)) plans.push({
80
- kind: "plugin-state-import",
81
- label: "Discord model picker preferences",
82
- sourcePath: modelPickerSourcePath,
83
- targetPath: "plugin state:model-picker-preferences",
84
- pluginId: "discord",
85
- namespace: "model-picker-preferences",
86
- maxEntries: PREFERENCE_MAX_ENTRIES,
87
- scopeKey: "",
88
- cleanupSource: "rename",
89
- readEntries: () => {
90
- const store = readLegacyStore(modelPickerSourcePath);
91
- if (!store || !store.entries || typeof store.entries !== "object") return [];
92
- const out = [];
93
- for (const [rawKey, rawEntry] of Object.entries(store.entries)) {
94
- const scopeKey = normalizeLegacyPreferenceKey(rawKey);
95
- if (!scopeKey || !rawEntry || typeof rawEntry !== "object") continue;
96
- const recent = sanitizeRecentModels(rawEntry.recent, 10);
97
- for (const [index, modelRef] of recent.entries()) out.push({
98
- key: buildPreferenceModelKey(scopeKey, modelRef),
99
- value: {
100
- scopeKey,
101
- modelRef,
102
- updatedAt: legacyUpdatedAtForIndex(rawEntry.updatedAt, index, recent.length)
103
- }
104
- });
105
- }
106
- return out;
107
- }
108
- });
109
- const threadBindingsSourcePath = path.join(stateDir, "discord", "thread-bindings.json");
110
- if (fileExists(threadBindingsSourcePath)) plans.push({
111
- kind: "plugin-state-import",
112
- label: "Discord thread bindings",
113
- sourcePath: threadBindingsSourcePath,
114
- targetPath: `plugin state:${THREAD_BINDINGS_NAMESPACE}`,
115
- pluginId: "discord",
116
- namespace: THREAD_BINDINGS_NAMESPACE,
117
- maxEntries: THREAD_BINDINGS_MAX_ENTRIES,
118
- scopeKey: "",
119
- cleanupSource: "rename",
120
- cleanupWhenEmpty: true,
121
- readEntries: () => {
122
- const store = readLegacyThreadBindingsStore(threadBindingsSourcePath);
123
- if (store?.version !== 1 || !store.bindings || typeof store.bindings !== "object") throw new Error("legacy Discord thread bindings store must have version 1 bindings");
124
- const out = [];
125
- for (const [rawKey, rawEntry] of Object.entries(store.bindings)) {
126
- const normalized = normalizePersistedBinding(rawKey, upgradeLegacyThreadBindingShape(rawEntry));
127
- if (normalized) out.push({
128
- key: toBindingRecordKey(normalized),
129
- value: normalized
130
- });
131
- }
132
- return out;
133
- }
134
- });
135
- return plans;
136
- };
137
- //#endregion
138
- export { detectDiscordLegacyStateMigrations };