@openclaw/slack 2026.7.2-beta.7 → 2026.8.1-beta.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.
Files changed (87) hide show
  1. package/dist/{account-inspect-DEKpg9Ip.js → account-inspect-YJvFBbCR.js} +1 -1
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{accounts-CHAeNZOX.js → accounts-BlzxuYle.js} +7 -3
  4. package/dist/{accounts.runtime-BHD4Ma2R.js → accounts.runtime-CbabBL8x.js} +1 -1
  5. package/dist/{action-runtime-DfuYoMjG.js → action-runtime-D6jg2CQd.js} +193 -125
  6. package/dist/action-runtime.runtime-JtoOK9l5.js +2 -0
  7. package/dist/{actions-D3NuJvva.js → actions-DFk0ANVB.js} +116 -235
  8. package/dist/actions.runtime-CYLsYRai.js +2 -0
  9. package/dist/api.js +17 -17
  10. package/dist/{approval-handler.runtime-BA05P0QT.js → approval-handler.runtime-BNvAoKdK.js} +53 -14
  11. package/dist/{channel-B9fVdW3s.js → channel-CA5w7qDF.js} +209 -110
  12. package/dist/channel-config-api.js +1 -1
  13. package/dist/channel-plugin-api.js +1 -1
  14. package/dist/{channel-type-DXyos1d2.js → channel-type-CZWv55Wu.js} +9 -12
  15. package/dist/{config-adapter-CxBQH8fq.js → channel.setup-CpyYsEXH.js} +83 -25
  16. package/dist/{config-schema-SgZT6nXV.js → config-schema-CN3XZRX5.js} +27 -17
  17. package/dist/conversation-binding-route-DFVLUdYF.js +115 -0
  18. package/dist/{directory-config-CnCIAktf.js → directory-config-BGYyuzWh.js} +3 -3
  19. package/dist/directory-contract-api.js +1 -1
  20. package/dist/{directory-live-DKunWh3A.js → directory-live-DjUJQLbq.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-DyfB_ZIE.js} +282 -183
  24. package/dist/index.js +4 -1
  25. package/dist/{message-tool-api-DkhFpMoy.js → message-tool-api-CqMr5Rmc.js} +14 -3
  26. package/dist/message-tool-api.js +1 -1
  27. package/dist/{monitor-CmKz0wtI.js → monitor-Chrecrb9.js} +3 -3
  28. package/dist/{outbound-adapter-BkuMp2Vs.js → outbound-adapter-DuRqAQXK.js} +35 -23
  29. package/dist/{pipeline.runtime-DgtmuYCP.js → pipeline.runtime-Bbfd5VFW.js} +1386 -929
  30. package/dist/{policy-PRysPn23.js → policy-BKXSxrIS.js} +18 -14
  31. package/dist/{probe-CgDsSops.js → probe-BVA65leh.js} +38 -18
  32. package/dist/{provider-DmRizMZt.js → provider-CUUiwsg2.js} +3454 -2601
  33. package/dist/{relay-source-Blxj8xb4.js → relay-source-mhpMMRG-.js} +11 -21
  34. package/dist/{replies-4s_Vq_z9.js → replies-SnWyXcsL.js} +84 -27
  35. package/dist/{resolve-channels-yEqmM-3I.js → resolve-channels-BSpqC8jU.js} +39 -12
  36. package/dist/{resolve-users-BOrt5K-5.js → resolve-users-Dvz9pDe0.js} +28 -5
  37. package/dist/{runtime-api-QMb-Q5Ko.js → runtime-api-DBi7xc_g.js} +3 -3
  38. package/dist/runtime-api.js +11 -11
  39. package/dist/{scopes-BJSrkAp6.js → scopes-BSk4GZvZ.js} +1 -1
  40. package/dist/security-contract-api.js +1 -1
  41. package/dist/{send-DsLeZpST.js → send-CtnOxKCc.js} +249 -163
  42. package/dist/{send.runtime-gUdK6V3h.js → send.runtime-kYctMHSd.js} +1 -1
  43. package/dist/setup-entry.js +1 -4
  44. package/dist/setup-plugin-api.js +1 -1
  45. package/dist/{setup-surface-BeNzrMrJ.js → setup-surface-BPFfp6So.js} +6 -6
  46. package/dist/{shared-DgIN3Dcr.js → shared-DJBaslN7.js} +45 -45
  47. package/dist/{block-text-DkHaoGem.js → slack-client-kind-BXyOOICI.js} +17 -2
  48. package/dist/{slash-dispatch.runtime-zPkyl7dB.js → slash-dispatch.runtime-Cf2FTrnf.js} +2 -2
  49. package/dist/{streaming-compat-3_X-21wW.js → streaming-compat-B-e0mqM0.js} +3 -8
  50. package/dist/{target-parsing-N6lHogYZ.js → target-parsing-BnMD2ZqZ.js} +40 -2
  51. package/dist/{targets-KmjP2E8s.js → targets-Cx5W_n3W.js} +1 -1
  52. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
  53. package/node_modules/@slack/bolt/node_modules/@types/node/crypto.d.ts +1 -1
  54. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
  55. package/node_modules/@slack/socket-mode/node_modules/@types/node/README.md +1 -1
  56. package/node_modules/@slack/socket-mode/node_modules/@types/node/crypto.d.ts +1 -1
  57. package/node_modules/@slack/socket-mode/node_modules/@types/node/package.json +2 -2
  58. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  59. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +1 -1
  60. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  61. package/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
  62. package/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
  63. package/node_modules/undici/lib/core/request.js +12 -1
  64. package/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
  65. package/node_modules/undici/lib/handler/cache-handler.js +246 -64
  66. package/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
  67. package/node_modules/undici/lib/handler/retry-handler.js +24 -0
  68. package/node_modules/undici/lib/interceptor/cache.js +159 -52
  69. package/node_modules/undici/lib/util/cache.js +324 -62
  70. package/node_modules/undici/lib/util/date.js +23 -6
  71. package/node_modules/undici/lib/web/cookies/util.js +79 -9
  72. package/node_modules/undici/package.json +1 -1
  73. package/openclaw.plugin.json +280 -33
  74. package/package.json +9 -11
  75. package/skills/slack/SKILL.md +10 -68
  76. package/dist/account-reply-mode-DrUXogvO.js +0 -14
  77. package/dist/action-runtime.runtime-DQErZYpz.js +0 -2
  78. package/dist/actions.runtime-BIRU_G4M.js +0 -2
  79. package/dist/channel.setup-CLP5oTvh.js +0 -56
  80. package/dist/preflight-audio.runtime-D5Bgags0.js +0 -3
  81. package/dist/slash-plugin-commands.runtime-Dosfcx3X.js +0 -2
  82. package/node_modules/p-map/index.d.ts +0 -155
  83. package/node_modules/p-map/index.js +0 -285
  84. package/node_modules/p-map/license +0 -9
  85. package/node_modules/p-map/package.json +0 -57
  86. package/node_modules/p-map/readme.md +0 -190
  87. package/dist/{security-audit-DR097212.js → security-audit-B_yKr7MW.js} +1 -1
@@ -1,5 +1,6 @@
1
- import { F as SLACK_EDIT_TEXT_MAX_BYTES, U as truncateSlackTextByUtf8Bytes, bt as normalizeSlackApproverId, ft as shouldHandleSlackNativeApprovalRequest, h as resolveSlackReplyBlocks, ot as isSlackAnyNativeApprovalClientEnabled } from "./group-policy-NQZti9t-.js";
2
- import { r as sendMessageSlack } from "./send-DsLeZpST.js";
1
+ import { a as parseSlackTarget } from "./target-parsing-BnMD2ZqZ.js";
2
+ import { B as SLACK_EDIT_TEXT_MAX_BYTES, Ct as shouldHandleSlackNativeApprovalRequest, Pt as normalizeSlackApproverId, Y as truncateSlackTextByUtf8Bytes, b as resolveSlackReplyBlocks, gt as isSlackAnyNativeApprovalClientEnabled, lt as SLACK_APPROVAL_HEADER_BLOCK_ID } from "./group-policy-DyfB_ZIE.js";
3
+ import { r as sendMessageSlack } from "./send-CtnOxKCc.js";
3
4
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
4
5
  import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
5
6
  import { buildApprovalPresentationFromActionDescriptors } from "openclaw/plugin-sdk/approval-reply-runtime";
@@ -122,6 +123,7 @@ function buildSlackExecPendingApprovalBlocks(view) {
122
123
  return [
123
124
  {
124
125
  type: "section",
126
+ block_id: SLACK_APPROVAL_HEADER_BLOCK_ID,
125
127
  text: {
126
128
  type: "mrkdwn",
127
129
  text: "*Exec approval required*\nA command needs your approval."
@@ -146,6 +148,7 @@ function buildSlackPluginPendingApprovalBlocks(view) {
146
148
  return [
147
149
  {
148
150
  type: "section",
151
+ block_id: SLACK_APPROVAL_HEADER_BLOCK_ID,
149
152
  text: {
150
153
  type: "mrkdwn",
151
154
  text: `*Plugin approval required*\n${truncateSlackMrkdwn(resolveSlackPluginDescription(view), 2600)}`
@@ -264,7 +267,7 @@ function buildSlackExpiredBlocks(view) {
264
267
  }
265
268
  async function updateMessage(params) {
266
269
  try {
267
- await params.app.client.chat.update({
270
+ await params.client.chat.update({
268
271
  channel: params.channelId,
269
272
  ts: params.messageTs,
270
273
  text: truncateSlackTextByUtf8Bytes(params.text, SLACK_EDIT_TEXT_MAX_BYTES),
@@ -316,13 +319,18 @@ const slackApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
316
319
  })
317
320
  },
318
321
  transport: {
319
- prepareTarget: ({ plannedTarget }) => ({
320
- dedupeKey: buildChannelApprovalNativeTargetKey(plannedTarget.target),
321
- target: {
322
- to: plannedTarget.target.to,
323
- threadTs: plannedTarget.target.threadId != null ? String(plannedTarget.target.threadId) : void 0
324
- }
325
- }),
322
+ prepareTarget: ({ plannedTarget }) => {
323
+ const parsed = parseSlackTarget(plannedTarget.target.to, { defaultKind: "channel" });
324
+ if (!parsed) throw new Error("Slack approval delivery target is missing");
325
+ return {
326
+ dedupeKey: buildChannelApprovalNativeTargetKey(plannedTarget.target),
327
+ target: {
328
+ to: `${parsed.kind}:${parsed.id}`,
329
+ threadTs: plannedTarget.target.threadId != null ? String(plannedTarget.target.threadId) : void 0,
330
+ teamId: parsed.teamId
331
+ }
332
+ };
333
+ },
326
334
  deliverPending: async ({ cfg, accountId, context, preparedTarget, pendingPayload }) => {
327
335
  const resolved = resolveHandlerContext({
328
336
  cfg,
@@ -330,16 +338,21 @@ const slackApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
330
338
  context
331
339
  });
332
340
  if (!resolved) return null;
333
- const message = await sendMessageSlack(preparedTarget.to, pendingPayload.text, {
341
+ const client = resolveApprovalClient(resolved.context, preparedTarget.teamId);
342
+ const to = await resolveApprovalChannel(client, preparedTarget.to, preparedTarget.teamId);
343
+ const eventScope = resolveApprovalEventScope(client, preparedTarget.teamId);
344
+ const message = await sendMessageSlack(to, pendingPayload.text, {
334
345
  cfg,
335
346
  accountId: resolved.accountId,
336
347
  threadTs: preparedTarget.threadTs,
337
348
  blocks: pendingPayload.blocks,
338
- client: resolved.context.app.client
349
+ client,
350
+ eventScope
339
351
  });
340
352
  return {
341
353
  channelId: message.channelId,
342
- messageTs: message.messageId
354
+ messageTs: message.messageId,
355
+ teamId: preparedTarget.teamId
343
356
  };
344
357
  },
345
358
  updateEntry: async ({ cfg, accountId, context, entry, payload }) => {
@@ -351,7 +364,7 @@ const slackApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
351
364
  if (!resolved) return;
352
365
  const nextPayload = payload;
353
366
  await updateMessage({
354
- app: resolved.context.app,
367
+ client: resolveApprovalClient(resolved.context, entry.teamId),
355
368
  channelId: entry.channelId,
356
369
  messageTs: entry.messageTs,
357
370
  text: nextPayload.text,
@@ -363,5 +376,31 @@ const slackApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapter({
363
376
  logError(`slack approvals: failed to deliver approval ${request.id}: ${String(error)}`);
364
377
  } }
365
378
  });
379
+ function resolveApprovalClient(context, teamId) {
380
+ if (!teamId) return context.app.client;
381
+ if (!context.enterprise || !context.resolveClient) throw new Error("Slack Enterprise Grid approval client is unavailable");
382
+ const client = context.resolveClient(teamId);
383
+ if (!client) throw new Error("Slack Enterprise Grid approval client is unavailable");
384
+ return client;
385
+ }
386
+ function resolveApprovalEventScope(client, teamId) {
387
+ if (!teamId) return;
388
+ return {
389
+ teamId,
390
+ client
391
+ };
392
+ }
393
+ async function resolveApprovalChannel(client, target, teamId) {
394
+ if (!teamId) return target;
395
+ const parsed = parseSlackTarget(target, { defaultKind: "channel" });
396
+ if (!parsed) throw new Error("Slack approval delivery target is missing");
397
+ if (parsed.kind === "channel") return `channel:${parsed.id}`;
398
+ const channelId = normalizeOptionalString((await client.conversations.open({
399
+ users: parsed.id,
400
+ return_im: true
401
+ })).channel?.id);
402
+ if (!channelId) throw new Error("Slack Enterprise Grid approval DM did not return a channel id");
403
+ return `channel:${channelId}`;
404
+ }
366
405
  //#endregion
367
406
  export { slackApprovalNativeRuntime };