@openclaw/slack 2026.9.1-beta.1 → 2026.9.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 (99) hide show
  1. package/dist/{account-inspect-CN2hBsim.js → account-inspect-C3sePHWa.js} +3 -3
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{action-runtime-BoSeX09X.js → action-runtime-DftQWpI4.js} +84 -66
  4. package/dist/action-runtime.runtime-rHI3UAh4.js +2 -0
  5. package/dist/{actions-XdQyjG_p.js → actions-CFkvEv1d.js} +198 -54
  6. package/dist/api.js +14 -14
  7. package/dist/{approval-handler.runtime-DxXfGX_Z.js → approval-handler.runtime-BeILKdw4.js} +47 -25
  8. package/dist/{channel-C_vnTgxo.js → channel-CmOuxbOD.js} +76 -133
  9. package/dist/channel-config-api.js +1 -1
  10. package/dist/channel-plugin-api.js +1 -1
  11. package/dist/{channel-type-j-2lalcC.js → channel-type-BWt2CRaI.js} +2 -2
  12. package/dist/{channel.setup-aal8tokM.js → channel.setup-D5z1ReaT.js} +29 -23
  13. package/dist/{config-schema-CN3XZRX5.js → config-schema-JDx_f9Zb.js} +26 -17
  14. package/dist/{cursor-pages-eX7p8Wwt.js → cursor-pages-ByFwo-Py.js} +7 -1
  15. package/dist/{directory-config-DqfQ42OV.js → directory-config-Bmw4ykSy.js} +4 -3
  16. package/dist/directory-contract-api.js +1 -1
  17. package/dist/{directory-live-lC6X_Ru-.js → directory-live-BuBPHmju.js} +3 -8
  18. package/dist/{doctor-contract-BAy7-EUQ.js → doctor-contract-BNjw9bxb.js} +5 -4
  19. package/dist/doctor-contract-api.js +1 -1
  20. package/dist/{message-tool-api-CWosHSi5.js → message-tool-api-uNEfQYGY.js} +19 -2
  21. package/dist/message-tool-api.js +1 -1
  22. package/dist/{monitor-DrNCGneD.js → monitor-DI07pfJl.js} +3 -3
  23. package/dist/{outbound-adapter-DkT2vUE9.js → outbound-adapter-B5QyTRpJ.js} +96 -91
  24. package/dist/{pipeline.runtime-CRRng_Nw.js → pipeline.runtime-BdIwZgm4.js} +596 -920
  25. package/dist/{policy-BoP6t88v.js → policy-Bh5TOqII.js} +7 -4
  26. package/dist/{probe-4_aHtVT3.js → probe-Biy--yhL.js} +251 -12
  27. package/dist/{provider-D4nDgxCh.js → provider-DoaUvAM4.js} +5621 -4944
  28. package/dist/{relay-source-CEmze11m.js → relay-source-D4uecp68.js} +6 -4
  29. package/dist/{replies-D9XMM_S0.js → replies-DENuTcPO.js} +21 -16
  30. package/dist/reply-blocks-PRkhyAN7.js +790 -0
  31. package/dist/{resolve-channels-DSamDgVs.js → resolve-channels-DQGV2VrE.js} +6 -10
  32. package/dist/{resolve-users-CIzwbaJR.js → resolve-users-DRGt_Q4I.js} +5 -4
  33. package/dist/runtime-api.js +10 -10
  34. package/dist/{scopes-BBrUzpBH.js → scopes-CZzeGdWV.js} +1 -1
  35. package/dist/{send-DtjEnlLh.js → send-DElUcgIs.js} +32 -24
  36. package/dist/send-results-eeOu_HYm.js +23 -0
  37. package/dist/{send.runtime-DQeNKa2J.js → send.runtime-C8D6cKGm.js} +1 -1
  38. package/dist/{group-policy-CU1tEGpS.js → session-status-BynwcZSO.js} +284 -1013
  39. package/dist/setup-plugin-api.js +1 -1
  40. package/dist/{setup-surface-CsBCM4rP.js → setup-surface-B1_gpGBl.js} +5 -5
  41. package/dist/{shared-D9GeeR9K.js → shared-CNQsWJT7.js} +7 -5
  42. package/dist/{slash-dispatch.runtime-Chr3YHnT.js → slash-dispatch.runtime-DhsXavSY.js} +2 -2
  43. package/dist/{target-parsing-BnMD2ZqZ.js → target-parsing-PbxGDbr9.js} +11 -6
  44. package/dist/{targets-Cx5W_n3W.js → targets-7FexXJ62.js} +1 -1
  45. package/dist/{thread-ts-DUGhaYKq.js → thread-ts-CukseRVL.js} +5 -1
  46. package/node_modules/@slack/bolt/node_modules/negotiator/lib/accept.js +54 -0
  47. package/node_modules/@slack/bolt/node_modules/negotiator/lib/charset.js +10 -34
  48. package/node_modules/@slack/bolt/node_modules/negotiator/lib/encoding.js +9 -30
  49. package/node_modules/@slack/bolt/node_modules/negotiator/lib/language.js +15 -36
  50. package/node_modules/@slack/bolt/node_modules/negotiator/lib/mediaType.js +16 -134
  51. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
  52. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/README.md +71 -0
  53. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
  54. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
  55. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
  56. package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/package.json +52 -0
  57. package/node_modules/@slack/bolt/node_modules/negotiator/package.json +16 -10
  58. package/node_modules/typebox/build/format/email.mjs +1 -1
  59. package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
  60. package/node_modules/typebox/build/format/json_pointer.d.mts +2 -2
  61. package/node_modules/typebox/build/format/json_pointer.mjs +2 -2
  62. package/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +2 -2
  63. package/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +2 -2
  64. package/node_modules/typebox/build/format/relative_json_pointer.d.mts +2 -2
  65. package/node_modules/typebox/build/format/relative_json_pointer.mjs +2 -2
  66. package/node_modules/typebox/build/system/memory/assign.mjs +2 -1
  67. package/node_modules/typebox/build/system/memory/create.mjs +3 -4
  68. package/node_modules/typebox/build/system/memory/discard.mjs +2 -2
  69. package/node_modules/typebox/build/system/memory/freeze.d.mts +4 -0
  70. package/node_modules/typebox/build/system/memory/freeze.mjs +6 -0
  71. package/node_modules/typebox/build/system/memory/update.mjs +3 -2
  72. package/node_modules/typebox/package.json +1 -1
  73. package/node_modules/undici/lib/dispatcher/balanced-pool.js +4 -2
  74. package/node_modules/undici/lib/dispatcher/client-h1.js +12 -4
  75. package/node_modules/undici/lib/dispatcher/client-h2.js +70 -14
  76. package/node_modules/undici/lib/dispatcher/client.js +6 -2
  77. package/node_modules/undici/lib/handler/cache-handler.js +21 -5
  78. package/node_modules/undici/lib/handler/retry-handler.js +42 -7
  79. package/node_modules/undici/lib/interceptor/cache.js +20 -1
  80. package/node_modules/undici/lib/interceptor/decompress.js +146 -14
  81. package/node_modules/undici/lib/interceptor/dump.js +10 -23
  82. package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +245 -150
  83. package/node_modules/undici/lib/web/websocket/connection.js +1 -1
  84. package/node_modules/undici/lib/web/websocket/permessage-deflate.js +5 -0
  85. package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +8 -10
  86. package/node_modules/undici/package.json +1 -1
  87. package/node_modules/undici/types/interceptors.d.ts +2 -0
  88. package/openclaw.plugin.json +17 -9
  89. package/package.json +6 -6
  90. package/skills/_vendor/slack-skills-plugin.LICENSE +21 -0
  91. package/skills/_vendor/slack-skills-plugin.json +31 -0
  92. package/skills/block-kit/SKILL.md +37 -0
  93. package/skills/block-kit/references/official-block-kit.md +257 -0
  94. package/skills/block-kit/references/official-common-patterns.md +385 -0
  95. package/skills/slack/SKILL.md +1 -1
  96. package/dist/action-runtime.runtime-Dpa16J87.js +0 -2
  97. package/dist/conversation-binding-route-DFVLUdYF.js +0 -115
  98. package/dist/slack-client-kind-hSfjXyUM.js +0 -94
  99. package/node_modules/@slack/bolt/node_modules/negotiator/HISTORY.md +0 -114
@@ -1,4 +1,4 @@
1
- import { h as formatUnknownError, m as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-D4nDgxCh.js";
1
+ import { a as formatUnknownError, i as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-DoaUvAM4.js";
2
2
  import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
4
4
  import { isIP } from "node:net";
@@ -10,7 +10,7 @@ const SLACK_RELAY_ROUTE_KINDS = /* @__PURE__ */ new Set([
10
10
  "thread_affinity",
11
11
  "channel_default"
12
12
  ]);
13
- const SLACK_RELAY_MAX_PAYLOAD_BYTES = 1024 * 1024;
13
+ const SLACK_RELAY_MAX_PAYLOAD_BYTES = 1048576;
14
14
  async function monitorSlackRelaySource(params) {
15
15
  let reconnectAttempts = 0;
16
16
  while (!params.abortSignal?.aborted) {
@@ -56,7 +56,8 @@ async function monitorSlackRelaySource(params) {
56
56
  function openRelayWebSocket(config, abortSignal) {
57
57
  if (abortSignal?.aborted) return Promise.reject(/* @__PURE__ */ new Error("Slack relay websocket aborted before connect"));
58
58
  return new Promise((resolve, reject) => {
59
- const ws = new WebSocket(buildRelayWebSocketUrl(config), buildRelayWebSocketOptions(config.authToken));
59
+ const url = buildRelayWebSocketUrl(config);
60
+ const ws = new WebSocket(url, buildRelayWebSocketOptions(config.authToken));
60
61
  const cleanup = () => {
61
62
  ws.off("open", onOpen);
62
63
  ws.off("error", onError);
@@ -210,7 +211,8 @@ function extractRelaySlackMessageEvent(frame) {
210
211
  const routeRecord = asOptionalRecord(record.route);
211
212
  const routeKind = stringValue(routeRecord?.kind);
212
213
  const routeKey = stringValue(routeRecord?.key);
213
- const event = asOptionalRecord(asOptionalRecord(record.payload)?.event);
214
+ const payload = asOptionalRecord(record.payload);
215
+ const event = asOptionalRecord(payload?.event);
214
216
  if (event?.type !== "message" || typeof event.channel !== "string") return;
215
217
  if (!deliveryId || !routeKind || !SLACK_RELAY_ROUTE_KINDS.has(routeKind) || !routeKey) return;
216
218
  return {
@@ -1,12 +1,14 @@
1
- import { A as isSlackInvalidBlocksResponse, B as SLACK_TEXT_LIMIT, E as buildSlackNativeDataAccessibilityText, N as buildSlackBlocksFallbackText, O as hasSlackNativeDataBlock, _ as hasSlackReplyStructuredContent, at as markdownToSlackMrkdwnChunks, b as resolveSlackReplyBlocks, j as isSlackNativeResponseUrlRejection, y as resolveSlackReplyBlockResolution } from "./group-policy-CU1tEGpS.js";
2
- import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-DtjEnlLh.js";
3
- import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./provider-D4nDgxCh.js";
1
+ import { C as buildSlackBlocksFallbackText, J as markdownToSlackMrkdwnChunks, b as isSlackInvalidBlocksResponse, g as buildSlackNativeDataAccessibilityText, k as SLACK_TEXT_LIMIT, v as hasSlackNativeDataBlock, x as isSlackNativeResponseUrlRejection } from "./session-status-BynwcZSO.js";
2
+ import { i as resolveSlackReplyBlocks, r as resolveSlackReplyBlockResolution, t as hasSlackReplyStructuredContent } from "./reply-blocks-PRkhyAN7.js";
3
+ import { n as resolveSlackReplyThreadTs } from "./thread-ts-CukseRVL.js";
4
+ import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-DElUcgIs.js";
5
+ import { c as createSlackResponseUrlBudget, s as SlackResponseAlreadyReportedError } from "./provider-DoaUvAM4.js";
4
6
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
5
7
  import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
6
8
  import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
9
+ import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
7
10
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
8
11
  import { SILENT_REPLY_TOKEN, chunkMarkdownTextWithMode, isSilentReplyText } from "openclaw/plugin-sdk/reply-chunking";
9
- import { deliverTextOrMediaReply, getReplyPayloadTtsSupplement, resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
10
12
  import { getGlobalHookRunner } from "openclaw/plugin-sdk/plugin-runtime";
11
13
  import { createChannelPartialDeliveryError } from "openclaw/plugin-sdk/channel-inbound";
12
14
  import { buildCanonicalSentMessageHookContext, createInternalHookEvent, fireAndForgetHook, toInternalMessageSentContext, toPluginMessageContext, toPluginMessageSentEvent, triggerInternalHook } from "openclaw/plugin-sdk/hook-runtime";
@@ -127,21 +129,20 @@ function sanitizeSlackMonitorReplyPayload(payload) {
127
129
  function resolveSlackMediaHookSpokenText(payload) {
128
130
  return (getReplyPayloadTtsSupplement(payload)?.spokenText ?? payload.spokenText)?.trim() || void 0;
129
131
  }
130
- function resolveDeliveredSlackReplyThreadTs(params) {
131
- return (params.replyToMode === "off" ? void 0 : params.payloadReplyToId) ?? params.replyThreadTs;
132
- }
133
132
  async function deliverReplies(params) {
134
133
  let latestResult;
135
134
  for (const payload of params.replies) {
136
135
  if (payload.isReasoning === true) continue;
137
- const threadTs = resolveDeliveredSlackReplyThreadTs({
136
+ const threadTs = resolveSlackReplyThreadTs({
138
137
  replyToMode: params.replyToMode,
139
- payloadReplyToId: payload.replyToId,
140
- replyThreadTs: params.replyThreadTs
138
+ replyToId: payload.replyToId,
139
+ threadId: params.replyThreadTs,
140
+ replyToCurrent: payload.replyToCurrent
141
141
  });
142
142
  const reply = resolveSendableOutboundReplyParts(payload);
143
143
  const textRaw = reply.hasText && !isSilentReplyText(reply.trimmedText, SILENT_REPLY_TOKEN) ? reply.trimmedText : void 0;
144
- const { authoredTextPlacement, segments } = resolveSlackReplyBlockResolution(payload, { materializeAuthoredText: !reply.hasMedia && hasSlackReplyStructuredContent(payload) });
144
+ const materializeAuthoredText = !reply.hasMedia && hasSlackReplyStructuredContent(payload);
145
+ const { authoredTextPlacement, segments } = resolveSlackReplyBlockResolution(payload, { materializeAuthoredText });
145
146
  if (!textRaw && !reply.hasMedia && segments.length === 0) continue;
146
147
  const acceptedResults = [];
147
148
  const sendReply = async (input) => {
@@ -297,8 +298,9 @@ function resolveSlackThreadTs(params) {
297
298
  }).use();
298
299
  }
299
300
  function createSlackReplyReferencePlanner(params) {
301
+ const effectiveMode = params.isThreadReply ?? Boolean(params.incomingThreadTs && params.incomingThreadTs !== params.messageTs) ? "all" : params.replyToMode;
300
302
  return createReplyReferencePlanner({
301
- replyToMode: params.isThreadReply ?? Boolean(params.incomingThreadTs && params.incomingThreadTs !== params.messageTs) ? "all" : params.replyToMode,
303
+ replyToMode: effectiveMode,
302
304
  existingId: params.incomingThreadTs,
303
305
  startId: params.messageTs,
304
306
  hasReplied: params.hasReplied
@@ -345,7 +347,8 @@ async function deliverSlackSlashReplies(params) {
345
347
  if (payload.isReasoning === true) continue;
346
348
  const reply = resolveSendableOutboundReplyParts(payload);
347
349
  const textRaw = reply.hasText && !isSilentReplyText(reply.trimmedText, SILENT_REPLY_TOKEN) ? reply.trimmedText : void 0;
348
- const { authoredTextPlacement, segments } = resolveSlackReplyBlockResolution(payload, { materializeAuthoredText: hasSlackReplyStructuredContent(payload) });
350
+ const materializeAuthoredText = hasSlackReplyStructuredContent(payload);
351
+ const { authoredTextPlacement, segments } = resolveSlackReplyBlockResolution(payload, { materializeAuthoredText });
349
352
  let outsideText = authoredTextPlacement === "outside-blocks" ? textRaw ?? "" : "";
350
353
  const messages = [];
351
354
  const hookParts = [];
@@ -457,7 +460,8 @@ async function deliverSlackSlashReplies(params) {
457
460
  if (initialRemaining !== void 0 && initialMinimumCalls > initialRemaining) await failOversizedDelivery();
458
461
  const deliverNativeFallback = async (messages, onVisible) => {
459
462
  for (const message of messages) {
460
- if (await isSlackInvalidBlocksResponse(await respond(message))) throw new Error("Slack rejected the native-data fallback blocks with invalid_blocks.");
463
+ const response = await respond(message);
464
+ if (await isSlackInvalidBlocksResponse(response)) throw new Error("Slack rejected the native-data fallback blocks with invalid_blocks.");
461
465
  onVisible();
462
466
  }
463
467
  };
@@ -484,7 +488,8 @@ async function deliverSlackSlashReplies(params) {
484
488
  }
485
489
  let rejectedNativeBlocks = false;
486
490
  try {
487
- rejectedNativeBlocks = await isSlackInvalidBlocksResponse(await respond(planned.message));
491
+ const response = await respond(planned.message);
492
+ rejectedNativeBlocks = await isSlackInvalidBlocksResponse(response);
488
493
  if (!rejectedNativeBlocks) markVisible();
489
494
  } catch (error) {
490
495
  if (!isSlackNativeResponseUrlRejection(error)) throw error;
@@ -521,4 +526,4 @@ async function deliverSlackSlashReplies(params) {
521
526
  }
522
527
  }
523
528
  //#endregion
524
- export { resolveDeliveredSlackReplyThreadTs as a, emitSlackMessageSentHooks as c, readSlackReplyBlocks as i, deliverReplies as n, resolveSlackThreadTs as o, deliverSlackSlashReplies as r, sanitizeSlackMonitorReplyPayload as s, createSlackReplyDeliveryPlan as t };
529
+ export { resolveSlackThreadTs as a, readSlackReplyBlocks as i, deliverReplies as n, sanitizeSlackMonitorReplyPayload as o, deliverSlackSlashReplies as r, emitSlackMessageSentHooks as s, createSlackReplyDeliveryPlan as t };