@openclaw/slack 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 (78) hide show
  1. package/dist/{account-inspect-DEKpg9Ip.js → account-inspect-Drw2gAiN.js} +1 -1
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-CHAeNZOX.js → accounts-CK4AVI2_.js} +2 -2
  4. package/dist/{accounts.runtime-BHD4Ma2R.js → accounts.runtime-Cb7QwWBz.js} +1 -1
  5. package/dist/{action-runtime-DfuYoMjG.js → action-runtime-BkGe7ny_.js} +148 -76
  6. package/dist/action-runtime.runtime-D9I6uc0Q.js +2 -0
  7. package/dist/{actions-D3NuJvva.js → actions-BTDXwwE3.js} +85 -44
  8. package/dist/actions.runtime-DLFyUkvg.js +2 -0
  9. package/dist/api.js +15 -15
  10. package/dist/{approval-handler.runtime-BA05P0QT.js → approval-handler.runtime-CJaNzAq2.js} +51 -14
  11. package/dist/{block-text-DkHaoGem.js → block-text-YtiNkqmx.js} +1 -1
  12. package/dist/{channel-B9fVdW3s.js → channel-D_tovcUL.js} +151 -91
  13. package/dist/channel-config-api.js +1 -1
  14. package/dist/channel-plugin-api.js +1 -1
  15. package/dist/{channel-type-DXyos1d2.js → channel-type-B9MSdoGN.js} +9 -8
  16. package/dist/{config-adapter-CxBQH8fq.js → channel.setup-Bch9dYmA.js} +83 -25
  17. package/dist/{config-schema-SgZT6nXV.js → config-schema-xto5jFIx.js} +5 -11
  18. package/dist/{directory-config-CnCIAktf.js → directory-config-CNBz8lJa.js} +3 -3
  19. package/dist/directory-contract-api.js +1 -1
  20. package/dist/{directory-live-DKunWh3A.js → directory-live-CFKUtW9E.js} +13 -22
  21. package/dist/{doctor-contract-CsGH1Dfc.js → doctor-contract-BAy7-EUQ.js} +30 -3
  22. package/dist/doctor-contract-api.js +1 -1
  23. package/dist/{group-policy-NQZti9t-.js → group-policy-c4RP9bjc.js} +248 -163
  24. package/dist/index.js +4 -1
  25. package/dist/{message-tool-api-DkhFpMoy.js → message-tool-api-BykQB4AU.js} +14 -3
  26. package/dist/message-tool-api.js +1 -1
  27. package/dist/{monitor-CmKz0wtI.js → monitor-1nF1NtqT.js} +3 -3
  28. package/dist/{outbound-adapter-BkuMp2Vs.js → outbound-adapter-S81tsswN.js} +19 -17
  29. package/dist/{pipeline.runtime-DgtmuYCP.js → pipeline.runtime-BvYsM5JO.js} +1087 -682
  30. package/dist/{policy-PRysPn23.js → policy-TapwbeaT.js} +18 -14
  31. package/dist/{probe-CgDsSops.js → probe-HoEg_WxB.js} +38 -18
  32. package/dist/{provider-DmRizMZt.js → provider-CDNvBXUi.js} +3422 -2590
  33. package/dist/{relay-source-Blxj8xb4.js → relay-source-C9leF11u.js} +11 -21
  34. package/dist/{replies-4s_Vq_z9.js → replies-CeOfv82I.js} +52 -6
  35. package/dist/{resolve-channels-yEqmM-3I.js → resolve-channels-CNPrxaXY.js} +39 -12
  36. package/dist/{resolve-users-BOrt5K-5.js → resolve-users-Dzomuwnr.js} +28 -5
  37. package/dist/{runtime-api-QMb-Q5Ko.js → runtime-api-Cj9nxBNv.js} +3 -3
  38. package/dist/runtime-api.js +11 -11
  39. package/dist/{scopes-BJSrkAp6.js → scopes-cYXKkrRD.js} +1 -1
  40. package/dist/{send-DsLeZpST.js → send-Nor0iBwY.js} +211 -105
  41. package/dist/{send.runtime-gUdK6V3h.js → send.runtime-BmgNe6S9.js} +1 -1
  42. package/dist/setup-entry.js +1 -4
  43. package/dist/setup-plugin-api.js +1 -1
  44. package/dist/{setup-surface-BeNzrMrJ.js → setup-surface-CbX1-Knh.js} +6 -6
  45. package/dist/{shared-DgIN3Dcr.js → shared-zdT5AMp-.js} +36 -42
  46. package/dist/{slash-dispatch.runtime-zPkyl7dB.js → slash-dispatch.runtime-Bnr9GR1S.js} +1 -1
  47. package/dist/{streaming-compat-3_X-21wW.js → streaming-compat-B-e0mqM0.js} +3 -8
  48. package/dist/{target-parsing-N6lHogYZ.js → target-parsing-BnMD2ZqZ.js} +40 -2
  49. package/dist/{targets-KmjP2E8s.js → targets-Cx5W_n3W.js} +1 -1
  50. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
  51. package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +1 -1
  52. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
  53. package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
  54. package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +1 -1
  55. package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
  56. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  57. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +1 -1
  58. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  59. package/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
  60. package/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
  61. package/node_modules/undici/lib/core/request.js +12 -1
  62. package/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
  63. package/node_modules/undici/lib/handler/cache-handler.js +246 -64
  64. package/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
  65. package/node_modules/undici/lib/handler/retry-handler.js +24 -0
  66. package/node_modules/undici/lib/interceptor/cache.js +159 -52
  67. package/node_modules/undici/lib/util/cache.js +324 -62
  68. package/node_modules/undici/lib/util/date.js +23 -6
  69. package/node_modules/undici/lib/web/cookies/util.js +79 -9
  70. package/node_modules/undici/package.json +1 -1
  71. package/openclaw.plugin.json +239 -34
  72. package/package.json +9 -9
  73. package/skills/slack/SKILL.md +10 -68
  74. package/dist/action-runtime.runtime-DQErZYpz.js +0 -2
  75. package/dist/actions.runtime-BIRU_G4M.js +0 -2
  76. package/dist/channel.setup-CLP5oTvh.js +0 -56
  77. package/dist/preflight-audio.runtime-D5Bgags0.js +0 -3
  78. package/dist/slash-plugin-commands.runtime-Dosfcx3X.js +0 -2
package/dist/index.js CHANGED
@@ -23,7 +23,10 @@ var slack_default = defineBundledChannelEntry({
23
23
  specifier: "./account-inspect-api.js",
24
24
  exportName: "inspectSlackReadOnlyAccount"
25
25
  },
26
- registerFull: registerSlackPluginHttpRoutes
26
+ registerFull: (api) => {
27
+ if (api.registrationMode !== "full") return;
28
+ registerSlackPluginHttpRoutes(api);
29
+ }
27
30
  });
28
31
  //#endregion
29
32
  export { slack_default as default };
@@ -1,5 +1,5 @@
1
- import { n as listSlackAccountIds } from "./accounts-CHAeNZOX.js";
2
- import { t as inspectSlackAccount } from "./account-inspect-DEKpg9Ip.js";
1
+ import { n as listSlackAccountIds } from "./accounts-CK4AVI2_.js";
2
+ import { t as inspectSlackAccount } from "./account-inspect-Drw2gAiN.js";
3
3
  import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
4
4
  import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
5
5
  import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
@@ -74,6 +74,13 @@ function createSlackFileActionSchema() {
74
74
  function createSlackReactionEmojiSchema() {
75
75
  return { emoji: Type.Optional(Type.String({ description: "Slack emoji shortcode name (for example \"white_check_mark\" or \"+1\") or common emoji character (for example \"✅\"). Colons are optional around shortcodes." })) };
76
76
  }
77
+ function createSlackForcedMediaSchema() {
78
+ const description = "Preserve original image bytes without image optimization. Slack still uploads a regular file; this does not convert it into a Slack document.";
79
+ return {
80
+ forceDocument: Type.Optional(Type.Boolean({ description })),
81
+ asDocument: Type.Optional(Type.Boolean({ description: `Alias for forceDocument. ${description}` }))
82
+ };
83
+ }
77
84
  function createSlackMessageIdActionSchema() {
78
85
  const description = "Slack message timestamp/message id (for example \"1777423717.666499\"). Used by react, reactions, edit, delete, pin, and unpin actions. React defaults to the current inbound message when available. Not used by download-file, which requires fileId from event.files[].id.";
79
86
  return {
@@ -83,12 +90,16 @@ function createSlackMessageIdActionSchema() {
83
90
  }
84
91
  function createSlackSendActionSchema() {
85
92
  return {
93
+ ...createSlackForcedMediaSchema(),
86
94
  topLevel: Type.Optional(Type.Boolean({ description: "Slack-only opt-out for action=\"send\" from a threaded same-channel context. Set true to post a new parent-channel message instead of inheriting the current Slack thread. `threadId: null` is accepted as the same top-level request." })),
87
95
  replyBroadcast: Type.Optional(Type.Boolean({ description: "Slack-only opt-in for action=\"send\" thread replies. Set true with threadId or replyTo on text/block sends to also broadcast the reply to the parent channel. Not supported for media or upload-file." }))
88
96
  };
89
97
  }
90
98
  function createSlackTopLevelActionSchema() {
91
- return { topLevel: Type.Optional(Type.Boolean({ description: "Slack-only opt-out from threaded same-channel context. Set true to post at the channel root instead of inheriting the current Slack thread." })) };
99
+ return {
100
+ ...createSlackForcedMediaSchema(),
101
+ topLevel: Type.Optional(Type.Boolean({ description: "Slack-only opt-out from threaded same-channel context. Set true to post at the channel root instead of inheriting the current Slack thread." }))
102
+ };
92
103
  }
93
104
  function describeSlackMessageTool({ cfg, accountId }) {
94
105
  const actions = listSlackMessageActions(cfg, accountId);
@@ -1,2 +1,2 @@
1
- import { t as describeSlackMessageTool } from "./message-tool-api-DkhFpMoy.js";
1
+ import { t as describeSlackMessageTool } from "./message-tool-api-BykQB4AU.js";
2
2
  export { describeSlackMessageTool as describeMessageTool };
@@ -1,7 +1,7 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
2
- import { S as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-DmRizMZt.js";
3
- import { t as isSlackChannelAllowedByPolicy } from "./policy-PRysPn23.js";
4
- import { o as resolveSlackThreadTs } from "./replies-4s_Vq_z9.js";
2
+ import { E as buildSlackSlashCommandMatcher, t as monitorSlackProvider } from "./provider-CDNvBXUi.js";
3
+ import { t as isSlackChannelAllowedByPolicy } from "./policy-TapwbeaT.js";
4
+ import { o as resolveSlackThreadTs } from "./replies-CeOfv82I.js";
5
5
  //#region extensions/slack/src/monitor.ts
6
6
  var monitor_exports = /* @__PURE__ */ __exportAll({
7
7
  buildSlackSlashCommandMatcher: () => buildSlackSlashCommandMatcher,
@@ -1,4 +1,5 @@
1
- import { $ as escapeSlackMrkdwn, L as SLACK_TEXT_LIMIT, P as resolveSlackAuthoredTextPlacement, g as resolveSlackReplyDeliveryMessages, m as resolveSlackReplyBlockResolution, p as parseSlackReplyBlockSegments, tt as SLACK_PRESENTATION_CAPABILITIES } from "./group-policy-NQZti9t-.js";
1
+ import { a as parseSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
2
+ import { B as SLACK_TEXT_LIMIT, I as resolveSlackAuthoredTextPlacement, at as escapeSlackMrkdwn, g as resolveSlackReplyBlockResolution, h as parseSlackReplyBlockSegments, q as SLACK_QUESTION_FINALIZATION_BLOCKS, st as SLACK_PRESENTATION_CAPABILITIES, tt as resolveSlackQuestionActionIds, v as resolveSlackReplyDeliveryMessages } from "./group-policy-c4RP9bjc.js";
2
3
  import { n as resolveSlackThreadTsValue } from "./thread-ts-DUGhaYKq.js";
3
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
5
  import { resolveOutboundSendDep } from "openclaw/plugin-sdk/channel-outbound";
@@ -38,7 +39,7 @@ function readSlackRenderedPresentation(slackData) {
38
39
  return;
39
40
  }
40
41
  }
41
- const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-gUdK6V3h.js"));
42
+ const loadSlackSendRuntime = createLazyRuntimeModule(() => import("./send.runtime-BmgNe6S9.js"));
42
43
  function resolveSlackSendIdentity(identity) {
43
44
  if (!identity) return;
44
45
  const username = normalizeOptionalString(identity.name);
@@ -101,7 +102,8 @@ async function sendSlackOutboundMessage(params) {
101
102
  mediaUrl: params.mediaUrl,
102
103
  mediaAccess: params.mediaAccess,
103
104
  mediaLocalRoots: params.mediaLocalRoots,
104
- mediaReadFile: params.mediaReadFile
105
+ mediaReadFile: params.mediaReadFile,
106
+ ...params.forceDocument ? { forceDocument: true } : {}
105
107
  } : {},
106
108
  ...params.blocks ? { blocks: params.blocks } : {},
107
109
  ...params.authoredTextPlacement ? { authoredTextPlacement: params.authoredTextPlacement } : {},
@@ -168,8 +170,7 @@ const slackOutbound = {
168
170
  ...ctx,
169
171
  text,
170
172
  mediaUrl,
171
- deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0,
172
- onPlatformSendDispatch: useSingleDeliveryMarker ? ctx.onPlatformSendDispatch : void 0
173
+ deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
173
174
  }),
174
175
  finalize: async () => {
175
176
  let lastResult;
@@ -180,8 +181,7 @@ const slackOutbound = {
180
181
  ...message.authoredTextPlacement ? { authoredTextPlacement: message.authoredTextPlacement } : {},
181
182
  ...message.nativeDataFallbackBaseText ? { nativeDataFallbackBaseText: message.nativeDataFallbackBaseText } : {},
182
183
  ...message.textIsSlackPlainText ? { textIsSlackPlainText: true } : {},
183
- deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0,
184
- onPlatformSendDispatch: useSingleDeliveryMarker ? ctx.onPlatformSendDispatch : void 0
184
+ deliveryQueueId: useSingleDeliveryMarker ? ctx.deliveryQueueId : void 0
185
185
  });
186
186
  if (!lastResult) throw new Error("Slack rendered presentation produced no deliverable segment");
187
187
  return lastResult;
@@ -194,25 +194,26 @@ const slackOutbound = {
194
194
  if (!questionId) return;
195
195
  const resolution = readSlackRenderedPresentation(slackData);
196
196
  if (!resolution) return;
197
- const deliveryMessages = resolveSlackReplyDeliveryMessages({
197
+ const deliveryMessage = resolveSlackReplyDeliveryMessages({
198
198
  authoredTextPlacement: resolution.authoredTextPlacement,
199
199
  segments: resolution.segments,
200
200
  text: payload.text
201
- });
202
- const blockMessageIndex = deliveryMessages.findIndex((message) => message.blocks?.some((block) => block.type === "actions"));
203
- const deliveryMessage = deliveryMessages[blockMessageIndex];
204
- const result = results[blockMessageIndex] ?? results.find((candidate) => candidate.channel === "slack");
205
- const deliveryBlocks = deliveryMessage?.blocks;
206
- if (!deliveryMessage || !deliveryBlocks || !result?.messageId) return;
201
+ }).find((message) => resolveSlackQuestionActionIds(message.blocks).length > 0);
202
+ const questionActionIds = resolveSlackQuestionActionIds(deliveryMessage?.blocks);
203
+ const result = results.find(({ channel, meta }) => channel === "slack" && Array.isArray(meta?.slackQuestionActionIds) && meta.slackQuestionActionIds.some((actionId) => typeof actionId === "string" && questionActionIds.includes(actionId)));
204
+ const deliveredDisplayBlocks = (result?.meta)?.[SLACK_QUESTION_FINALIZATION_BLOCKS];
205
+ if (!deliveryMessage || !deliveredDisplayBlocks || !result?.messageId) return;
207
206
  const channelId = result.channelId;
208
207
  if (!channelId) return;
208
+ const teamId = parseSlackTarget(target.to, { defaultKind: "channel" })?.teamId;
209
+ const questionMessageId = typeof result.meta?.slackQuestionMessageId === "string" ? result.meta.slackQuestionMessageId : result.messageId;
209
210
  questionGatewayRuntime.registerChannelDelivery({
210
211
  questionId,
211
- deliveryId: `slack:${target.accountId ?? "default"}:${channelId}:${result.messageId}`,
212
+ deliveryId: `slack:${target.accountId ?? "default"}:${channelId}:${questionMessageId}`,
212
213
  finalize: async (statusLine) => {
213
214
  const { updateMessageSlack } = await loadSlackSendRuntime();
214
215
  const escapedStatusLine = escapeSlackMrkdwn(statusLine);
215
- const blocks = [...deliveryBlocks.filter((block) => block.type !== "actions"), {
216
+ const blocks = [...deliveredDisplayBlocks, {
216
217
  type: "context",
217
218
  elements: [{
218
219
  type: "mrkdwn",
@@ -223,7 +224,8 @@ const slackOutbound = {
223
224
  cfg,
224
225
  accountId: target.accountId ?? void 0,
225
226
  channelId,
226
- messageTs: result.messageId,
227
+ teamId,
228
+ messageTs: questionMessageId,
227
229
  text: `${deliveryMessage.text}\n\n${escapedStatusLine}`,
228
230
  blocks
229
231
  });