@openclaw/slack 2026.11.7 → 2026.11.10-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 (141) hide show
  1. package/README.md +16 -0
  2. package/dist/.setup/{account-configured-zcR9TJJN.mjs → account-configured-35y0-Hso.mjs} +1 -2
  3. package/dist/.setup/{account-inspect-BLVha-ov.mjs → account-inspect-DgQgj0wk.mjs} +3 -4
  4. package/dist/.setup/{accounts-CGJScKtk.mjs → accounts-EaPP0fFY.mjs} +6 -10
  5. package/dist/.setup/{action-runtime-D01wBhx5.mjs → action-runtime-Cs2IxOLc.mjs} +13 -12
  6. package/dist/.setup/action-runtime.runtime-me4Yd3j7.mjs +1 -0
  7. package/dist/.setup/{actions-D5S6D_BU.mjs → actions-BNOabmV6.mjs} +16 -24
  8. package/dist/.setup/{approval-handler.runtime-Buw5jh2Y.mjs → approval-handler.runtime-C2C-jNxi.mjs} +7 -8
  9. package/dist/.setup/{approval-message-updates-pmXcve5E.mjs → approval-message-updates-Bx2u_5-z.mjs} +2 -3
  10. package/dist/.setup/{channel-DSi3yBu5.mjs → channel-CSbCHg-I.mjs} +66 -53
  11. package/dist/.setup/{channel-meta-C443t-lI.mjs → channel-meta-C5vsCo3a.mjs} +1 -2
  12. package/dist/.setup/{channel-type-B5P3w9eA.mjs → channel-type-ZG0ErPTI.mjs} +5 -6
  13. package/dist/.setup/{channel.setup-Lq2OxKkF.mjs → channel.setup-DNnvYUKL.mjs} +10 -14
  14. package/dist/.setup/{config-schema-BWAaa5au.mjs → config-schema-DO2u-jsa.mjs} +5 -7
  15. package/dist/.setup/{cursor-pages-CATAzbTT.mjs → cursor-pages-jVn3Vkfi.mjs} +4 -8
  16. package/dist/.setup/{directory-config-D-hf9KGQ.mjs → directory-config-CGvKYg9F.mjs} +5 -6
  17. package/dist/.setup/{directory-live-onKAFI1E.mjs → directory-live-DNdw97LA.mjs} +4 -5
  18. package/dist/.setup/{doctor-contract-9-QJRCXk.mjs → doctor-contract-BB2KJ9Ni.mjs} +7 -13
  19. package/dist/.setup/fork-DTKBA8Fm.mjs +155 -0
  20. package/dist/.setup/literal-text-DdCRYzYh.mjs +24 -0
  21. package/dist/.setup/{message-tool-api-LGIgVXJf.mjs → message-tool-api-B38BpEaE.mjs} +5 -7
  22. package/dist/.setup/{monitor-CZGrHb5a.mjs → monitor-C4cpeg1H.mjs} +105 -148
  23. package/dist/.setup/{outbound-adapter-C-95EWl2.mjs → outbound-adapter-1JpFMcJD.mjs} +14 -11
  24. package/dist/.setup/{paths-B1u59oLK.mjs → paths-CQZI_5WY.mjs} +1 -2
  25. package/dist/.setup/{pipeline.runtime-B-EtO-8F.mjs → pipeline.runtime-ozrJpZ8k.mjs} +100 -102
  26. package/dist/.setup/{policy-DxhGRvc2.mjs → policy-klXrk5vE.mjs} +3 -5
  27. package/dist/.setup/{probe-DANukR3O.mjs → probe-BHqvMbno.mjs} +72 -75
  28. package/dist/.setup/{question-delivery-CWC7sRhH.mjs → question-delivery-BGwm5Zmr.mjs} +2 -3
  29. package/dist/.setup/{relay-source-BH-NPqBP.mjs → relay-source-DEZ7qM1i.mjs} +3 -4
  30. package/dist/.setup/{replies-B5e7p3dD.mjs → replies-BK3Ht8o-.mjs} +8 -10
  31. package/dist/.setup/{reply-blocks-BzsXUUUL.mjs → reply-blocks-CFy-O-2B.mjs} +4 -7
  32. package/dist/.setup/{resolve-channels-XDPgnesf.mjs → resolve-channels-CF2JME9q.mjs} +4 -5
  33. package/dist/.setup/{resolve-users-aDAv24U2.mjs → resolve-users-DDcCAjH1.mjs} +4 -5
  34. package/dist/.setup/{rolldown-runtime-B4FMCO8f.mjs → rolldown-runtime-nwUcYXjP.mjs} +1 -2
  35. package/dist/.setup/{runtime-JSVZSWAj.mjs → runtime-C6HKn7Av.mjs} +1 -2
  36. package/dist/.setup/runtime-setter-api-DrXr965r.mjs +2 -0
  37. package/dist/.setup/{scopes-BocHwImV.mjs → scopes-DKl6yqIv.mjs} +3 -4
  38. package/dist/.setup/{secret-contract-uiQtoNlu.mjs → secret-contract-CqVqR7MP.mjs} +2 -3
  39. package/dist/.setup/{secret-contract-api-BlLz88mj.mjs → secret-contract-api-DaCXZ47j.mjs} +1 -1
  40. package/dist/.setup/{security-audit-DFGiFLqd.mjs → security-audit-C3hXCfDt.mjs} +2 -3
  41. package/dist/.setup/{send-yK6_-px6.mjs → send-kGJWQtLk.mjs} +20 -38
  42. package/dist/.setup/{send-results-BGxlroJ-.mjs → send-results-Bm6V1ekL.mjs} +1 -2
  43. package/dist/.setup/setup-plugin-api-UWUSCOAK.mjs +2 -0
  44. package/dist/.setup/{setup-surface-C0KRtyqa.mjs → setup-surface-CPFVFPFM.mjs} +6 -7
  45. package/dist/.setup/{slash-dispatch.runtime-CZuMRdRx.mjs → slash-dispatch.runtime-B2oWiis5.mjs} +1 -1
  46. package/dist/.setup/{target-parsing-Bx2UZniD.mjs → target-parsing-DwYAP3ts.mjs} +1 -2
  47. package/dist/.setup/{targets-D-ASeWHy.mjs → targets-eeOxA_b_.mjs} +2 -3
  48. package/dist/.setup/{thread-ts-Cvt7WD6B.mjs → thread-ts-47Au2-Yn.mjs} +1 -2
  49. package/dist/.source-module-urls/c5ffd0957b234c7c12090e7de4eca2482ef339b8561e078da55b734211b0ba58.json +1 -1
  50. package/dist/account-inspect-api.js +2 -3
  51. package/dist/api.js +16 -16
  52. package/dist/channel-config-api.js +1 -1
  53. package/dist/channel-entry.js +1 -2
  54. package/dist/channel-plugin-api.js +1 -1
  55. package/dist/configured-state.js +2 -3
  56. package/dist/directory-contract-api.js +1 -1
  57. package/dist/doctor-contract-api.js +1 -1
  58. package/dist/index.js +1 -2
  59. package/dist/message-tool-api.js +1 -1
  60. package/dist/runtime-api.js +10 -10
  61. package/dist/runtime-setter-api.js +1 -1
  62. package/dist/secret-contract-api.js +1 -1
  63. package/dist/security-contract-api.js +1 -1
  64. package/dist/setup-entry.js +4 -5
  65. package/dist/setup-plugin-api.js +1 -1
  66. package/node_modules/@slack/bolt/node_modules/@types/node/README.md +1 -1
  67. package/node_modules/@slack/bolt/node_modules/@types/node/package.json +2 -2
  68. package/node_modules/@slack/bolt/node_modules/@types/node/zlib.d.ts +752 -0
  69. package/node_modules/@slack/bolt/node_modules/qs/.editorconfig +1 -1
  70. package/node_modules/@slack/bolt/node_modules/qs/CHANGELOG.md +87 -22
  71. package/node_modules/@slack/bolt/node_modules/qs/README.md +63 -10
  72. package/node_modules/@slack/bolt/node_modules/qs/dist/qs.js +17 -17
  73. package/node_modules/@slack/bolt/node_modules/qs/eslint.config.mjs +61 -50
  74. package/node_modules/@slack/bolt/node_modules/qs/lib/formats.js +7 -2
  75. package/node_modules/@slack/bolt/node_modules/qs/lib/parse.js +29 -10
  76. package/node_modules/@slack/bolt/node_modules/qs/lib/stringify.js +5 -3
  77. package/node_modules/@slack/bolt/node_modules/qs/lib/utils.js +28 -9
  78. package/node_modules/@slack/bolt/node_modules/qs/package.json +6 -6
  79. package/node_modules/@slack/bolt/node_modules/qs/test/parse.js +335 -2
  80. package/node_modules/@slack/bolt/node_modules/qs/test/stringify.js +222 -0
  81. package/node_modules/@slack/bolt/node_modules/qs/test/utils.js +61 -3
  82. package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts +14 -0
  83. package/node_modules/@slack/types/dist/block-kit/block-elements.d.ts.map +1 -1
  84. package/node_modules/@slack/types/dist/block-kit/blocks.d.ts +65 -1
  85. package/node_modules/@slack/types/dist/block-kit/blocks.d.ts.map +1 -1
  86. package/node_modules/@slack/types/dist/events/index.d.ts +2 -2
  87. package/node_modules/@slack/types/dist/events/index.d.ts.map +1 -1
  88. package/node_modules/@slack/types/dist/events/index.js.map +1 -1
  89. package/node_modules/@slack/types/dist/events/message.d.ts +4 -0
  90. package/node_modules/@slack/types/dist/events/message.d.ts.map +1 -1
  91. package/node_modules/@slack/types/dist/events/user.d.ts +20 -0
  92. package/node_modules/@slack/types/dist/events/user.d.ts.map +1 -1
  93. package/node_modules/@slack/types/package.json +1 -1
  94. package/node_modules/@slack/web-api/dist/WebClient.js +1 -1
  95. package/node_modules/@slack/web-api/dist/WebClient.js.map +1 -1
  96. package/node_modules/@slack/web-api/dist/file-upload.js +1 -1
  97. package/node_modules/@slack/web-api/dist/file-upload.js.map +1 -1
  98. package/node_modules/@slack/web-api/dist/methods.d.ts +18 -3
  99. package/node_modules/@slack/web-api/dist/methods.d.ts.map +1 -1
  100. package/node_modules/@slack/web-api/dist/methods.js +16 -1
  101. package/node_modules/@slack/web-api/dist/methods.js.map +1 -1
  102. package/node_modules/@slack/web-api/dist/types/request/apps.d.ts +62 -0
  103. package/node_modules/@slack/web-api/dist/types/request/apps.d.ts.map +1 -1
  104. package/node_modules/@slack/web-api/dist/types/request/canvas.d.ts +4 -0
  105. package/node_modules/@slack/web-api/dist/types/request/canvas.d.ts.map +1 -1
  106. package/node_modules/@slack/web-api/dist/types/request/files.d.ts +5 -1
  107. package/node_modules/@slack/web-api/dist/types/request/files.d.ts.map +1 -1
  108. package/node_modules/@slack/web-api/dist/types/request/index.d.ts +2 -2
  109. package/node_modules/@slack/web-api/dist/types/request/index.d.ts.map +1 -1
  110. package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts +35 -3
  111. package/node_modules/@slack/web-api/dist/types/request/manifest.d.ts.map +1 -1
  112. package/node_modules/@slack/web-api/dist/types/request/team.d.ts +6 -0
  113. package/node_modules/@slack/web-api/dist/types/request/team.d.ts.map +1 -1
  114. package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.d.ts +19 -0
  115. package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.d.ts.map +1 -0
  116. package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.js +11 -0
  117. package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionBulkUpdateResponse.js.map +1 -0
  118. package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.d.ts +14 -0
  119. package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.d.ts.map +1 -0
  120. package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.js +11 -0
  121. package/node_modules/@slack/web-api/dist/types/response/AppsUserConnectionRequestAuthResponse.js.map +1 -0
  122. package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.d.ts +10 -0
  123. package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.d.ts.map +1 -0
  124. package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.js +11 -0
  125. package/node_modules/@slack/web-api/dist/types/response/CanvasesGetContentResponse.js.map +1 -0
  126. package/node_modules/@slack/web-api/dist/types/response/TeamInfoResponse.d.ts +1 -0
  127. package/node_modules/@slack/web-api/dist/types/response/TeamInfoResponse.d.ts.map +1 -1
  128. package/node_modules/@slack/web-api/dist/types/response/index.d.ts +3 -0
  129. package/node_modules/@slack/web-api/dist/types/response/index.d.ts.map +1 -1
  130. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  131. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -2
  132. package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +752 -0
  133. package/node_modules/@slack/web-api/package.json +3 -3
  134. package/node_modules/typebox/build/format/date_time.d.mts +2 -1
  135. package/node_modules/typebox/build/format/date_time.mjs +12 -3
  136. package/node_modules/typebox/package.json +1 -1
  137. package/openclaw.plugin.json +13 -8
  138. package/package.json +7 -7
  139. package/dist/.setup/action-runtime.runtime-VQGaR6g8.mjs +0 -1
  140. package/dist/.setup/runtime-setter-api-Cx_PV-xu.mjs +0 -2
  141. package/dist/.setup/setup-plugin-api-Cfz58xoh.mjs +0 -2
@@ -1,8 +1,8 @@
1
- import { i as isSlackSetupAccountConfigured } from "./account-configured-zcR9TJJN.mjs";
2
- import { i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount, u as resolveSlackConfigAccessorAccount } from "./accounts-CGJScKtk.mjs";
3
- import { t as inspectSlackAccount } from "./account-inspect-BLVha-ov.mjs";
4
- import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-C443t-lI.mjs";
5
- import { t as SlackChannelConfigSchema } from "./config-schema-BWAaa5au.mjs";
1
+ import { i as isSlackSetupAccountConfigured } from "./account-configured-35y0-Hso.mjs";
2
+ import { i as listSlackAccountIds, o as resolveDefaultSlackAccountId, s as resolveSlackAccount, u as resolveSlackConfigAccessorAccount } from "./accounts-EaPP0fFY.mjs";
3
+ import { t as inspectSlackAccount } from "./account-inspect-DgQgj0wk.mjs";
4
+ import { t as DEFAULT_SLACK_SUGGESTED_PROMPTS } from "./channel-meta-C5vsCo3a.mjs";
5
+ import { t as SlackChannelConfigSchema } from "./config-schema-DO2u-jsa.mjs";
6
6
  import { normalizeSecretInputString } from "openclaw/plugin-sdk/secret-input";
7
7
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
8
8
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
@@ -13,7 +13,7 @@ import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
13
13
  import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
14
14
  import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
15
15
  import { patchTopLevelChannelConfigSection } from "openclaw/plugin-sdk/setup";
16
- //#region extensions/slack/src/setup-shared.ts
16
+ // extensions/slack/src/setup-shared.ts
17
17
  const SLACK_CHANNEL = "slack";
18
18
  function buildSlackAllowFromPrompt() {
19
19
  const t = createSetupTranslator();
@@ -150,8 +150,7 @@ function describeSlackSetupAccount(account) {
150
150
  }
151
151
  });
152
152
  }
153
- //#endregion
154
- //#region extensions/slack/src/config-adapter.ts
153
+ // extensions/slack/src/config-adapter.ts
155
154
  const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
156
155
  sectionKey: SLACK_CHANNEL,
157
156
  listAccountIds: listSlackAccountIds,
@@ -169,8 +168,7 @@ const slackBaseConfigAdapter = createScopedChannelConfigAdapter({
169
168
  formatAllowFrom: (allowFrom) => formatAllowFromLowercase({ allowFrom }),
170
169
  resolveDefaultTo: (account) => account.defaultTo
171
170
  });
172
- //#endregion
173
- //#region extensions/slack/src/setup-core.ts
171
+ // extensions/slack/src/setup-core.ts
174
172
  const t = createSetupTranslator();
175
173
  function enableSlackAccount(cfg, accountId) {
176
174
  return patchChannelConfigForAccount({
@@ -534,8 +532,7 @@ function createSlackSetupWizardProxy(loadWizard) {
534
532
  fallbackResolvedGroupAllowlist: (entries) => entries
535
533
  });
536
534
  }
537
- //#endregion
538
- //#region extensions/slack/src/channel.setup.ts
535
+ // extensions/slack/src/channel.setup.ts
539
536
  const slackSetupPlugin = {
540
537
  id: SLACK_CHANNEL,
541
538
  meta: {
@@ -550,7 +547,7 @@ const slackSetupPlugin = {
550
547
  markdownCapable: true,
551
548
  preferSessionLookupForAnnounceTarget: true
552
549
  },
553
- setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface-C0KRtyqa.mjs")),
550
+ setupWizard: createSlackSetupWizardProxy(() => import("./setup-surface-CPFVFPFM.mjs")),
554
551
  capabilities: {
555
552
  chatTypes: [
556
553
  "direct",
@@ -628,5 +625,4 @@ const slackSetupPlugin = {
628
625
  },
629
626
  setupContract: slackSetupContract
630
627
  };
631
- //#endregion
632
628
  export { buildSlackAllowFromPrompt as a, SLACK_CHANNEL as i, createSlackSetupWizardBase as n, slackBaseConfigAdapter as r, slackSetupPlugin as t };
@@ -2,9 +2,9 @@ import { buildSecretInputSchema, hasConfiguredSecretInput } from "openclaw/plugi
2
2
  import { createChannelConfigUiHints } from "openclaw/plugin-sdk/channel-core";
3
3
  import { ChannelBotLoopProtectionSchema, ChannelDangerouslyAllowNameMatchingSchema, ChannelImplicitMentionsSchema, ChannelPreviewStreamingConfigSchema, ChannelStreamingProgressSchema, ProviderCommandsSchema, ReplyToModeSchema, buildChannelAccountSchemaParts, buildChannelAllowBotsSchema, buildChannelConfigSchema, buildChannelExecApprovalsSchema, buildChannelReactionShape, buildGroupEntrySchema, refineChannelDmPolicy } from "openclaw/plugin-sdk/channel-config-schema";
4
4
  import { z } from "zod";
5
- //#region extensions/slack/src/config-ui-hints.ts
6
- const observedGroupHistoryHint = { help: "Automatic observed-message context uses a default of 50 and a maximum of 200 messages; 0 disables automatic injection. The JSON integer maximum selects the 50-message default. Session transcript trimming separately counts user turns, where 0 means no trimming. The observed-message cap does not rewrite saved values." };
7
- const observedDmHistoryHint = { help: "Automatic observed-DM context uses a default of 0 and a maximum of 200 messages; 0 disables that extra context. The JSON integer maximum selects the 0-message default. Session transcript trimming separately counts user turns, where 0 means no trimming. The observed-message cap does not rewrite saved values." };
5
+ // extensions/slack/src/config-ui-hints.ts
6
+ const observedGroupHistoryHint = { help: "Automatic observed-message context uses a default of 50 and a maximum of 200 messages; 0 disables automatic injection. The JSON integer maximum selects the 50-message default. Chat history trimming separately counts user turns, where 0 means no trimming. The observed-message cap does not rewrite saved values." };
7
+ const observedDmHistoryHint = { help: "Automatic observed-DM context uses a default of 0 and a maximum of 200 messages; 0 disables that extra context. The JSON integer maximum selects the 0-message default. Chat history trimming separately counts user turns, where 0 means no trimming. The observed-message cap does not rewrite saved values." };
8
8
  const botThreadMentionHint = {
9
9
  label: "Require Mention in Bot Threads",
10
10
  help: "Override mention gating in threads whose root message was sent by this bot. False allows unmentioned replies; true requires a mention even when implicit reply or participation signals are enabled. Omit to preserve the existing mention policy. Channel settings override account settings; access restrictions still apply."
@@ -167,15 +167,14 @@ const slackChannelConfigUiHints = {
167
167
  },
168
168
  "thread.inheritParent": {
169
169
  label: "Slack Thread Parent Inheritance",
170
- help: "If true, Slack thread sessions inherit the parent channel transcript (default: false)."
170
+ help: "If true, Slack thread sessions inherit the parent channel chat history (default: false)."
171
171
  },
172
172
  "thread.initialHistoryLimit": {
173
173
  label: "Slack Thread Initial History Limit",
174
174
  help: "Maximum number of existing Slack thread messages to fetch when starting a new thread session (default: 20, set to 0 to disable)."
175
175
  }
176
176
  };
177
- //#endregion
178
- //#region extensions/slack/src/config-schema.ts
177
+ // extensions/slack/src/config-schema.ts
179
178
  const SecretInputSchema = buildSecretInputSchema();
180
179
  const SLACK_PRESENCE_EVENT_PROMPT_MAX_CHARS = 2e4;
181
180
  const SlackStreamingProgressSchema = ChannelStreamingProgressSchema.extend({
@@ -370,5 +369,4 @@ const SlackConfigSchema = SlackAccountSchema.safeExtend({
370
369
  validateSlackSigningSecretRequirements(value, ctx);
371
370
  });
372
371
  const SlackChannelConfigSchema = buildChannelConfigSchema(SlackConfigSchema, { uiHints: slackChannelConfigUiHints });
373
- //#endregion
374
372
  export { SlackChannelConfigSchema as t };
@@ -7,7 +7,7 @@ import { addActiveManagedProxyTlsOptions, captureChannelReadAuthority, createHtt
7
7
  import { isDebugProxyGlobalFetchPatchInstalled } from "openclaw/plugin-sdk/proxy-capture";
8
8
  import { parseRetryAfterHeaderSeconds, retryAsync } from "openclaw/plugin-sdk/retry-runtime";
9
9
  import { fetchWithRuntimeDispatcher } from "openclaw/plugin-sdk/runtime-fetch";
10
- //#region extensions/slack/src/client-options.ts
10
+ // extensions/slack/src/client-options.ts
11
11
  const SLACK_DEFAULT_RETRY_OPTIONS = {
12
12
  retries: 2,
13
13
  factor: 2,
@@ -174,8 +174,7 @@ function resolveSlackLookupClientOptions(options = {}, dispatcher = resolveSlack
174
174
  resolved.timeout ??= SLACK_READ_TIMEOUT_MS;
175
175
  return resolved;
176
176
  }
177
- //#endregion
178
- //#region extensions/slack/src/monitor/lru-map-cache.ts
177
+ // extensions/slack/src/monitor/lru-map-cache.ts
179
178
  function getOrCreateWeakOwnerMap(owners, owner) {
180
179
  let values = owners.get(owner);
181
180
  if (!values) {
@@ -201,8 +200,7 @@ function writeLruMapEntry(cache, cacheKey, entry, maxEntries) {
201
200
  function pruneExpiredMapEntries(cache, now) {
202
201
  for (const [key, entry] of cache) if (entry.expiresAt <= now) cache.delete(key);
203
202
  }
204
- //#endregion
205
- //#region extensions/slack/src/client.ts
203
+ // extensions/slack/src/client.ts
206
204
  const SLACK_WRITE_CLIENT_CACHE_MAX = 32;
207
205
  const SLACK_STARTUP_AUTH_TIMEOUT_MS = 1e4;
208
206
  const SLACK_STARTUP_AUTH_RETRY_BUDGET_MS = 35e3;
@@ -285,8 +283,7 @@ function getSlackListenerWriteClient(params) {
285
283
  });
286
284
  return client;
287
285
  }
288
- //#endregion
289
- //#region extensions/slack/src/cursor-pages.ts
286
+ // extensions/slack/src/cursor-pages.ts
290
287
  const SLACK_CURSOR_PAGE_LIMIT = 1e4;
291
288
  const fetchSlackChannelListPage = (client, cursor) => client.conversations.list({
292
289
  types: "public_channel,private_channel",
@@ -309,5 +306,4 @@ async function collectSlackCursorPages(params) {
309
306
  }
310
307
  throw new Error(`Slack cursor pagination exceeded ${SLACK_CURSOR_PAGE_LIMIT} pages`);
311
308
  }
312
- //#endregion
313
309
  export { createSlackProbeDispatcher as _, createSlackStartupAuthClient as a, resolveSlackWebClientOptions as b, createSlackWriteClient as c, getOrCreateWeakOwnerMap as d, pruneExpiredMapEntries as f, SLACK_WRITE_RETRY_OPTIONS as g, SLACK_DEFAULT_RETRY_OPTIONS as h, createSlackReadClient as i, getSlackListenerWriteClient as l, writeLruMapEntry as m, fetchSlackChannelListPage as n, createSlackTokenCacheKey as o, readLruMapEntry as p, createSlackLookupClient as r, createSlackWebClient as s, collectSlackCursorPages as t, getSlackWriteClient as u, resolveSlackLookupClientOptions as v, resolveSlackWriteClientOptions as x, resolveSlackMonitorDispatchers as y };
@@ -1,11 +1,11 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, o as resolveDefaultSlackAccountId } from "./accounts-CGJScKtk.mjs";
3
- import { a as parseSlackTarget } from "./target-parsing-Bx2UZniD.mjs";
4
- import "./targets-D-ASeWHy.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
+ import { a as mergeSlackAccountConfig, c as resolveSlackAccountAllowFrom, o as resolveDefaultSlackAccountId } from "./accounts-EaPP0fFY.mjs";
3
+ import { a as parseSlackTarget } from "./target-parsing-DwYAP3ts.mjs";
4
+ import "./targets-eeOxA_b_.mjs";
5
5
  import { normalizeAccountId } from "openclaw/plugin-sdk/account-resolution";
6
6
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { createResolvedDirectoryEntriesLister } from "openclaw/plugin-sdk/directory-config-runtime";
8
- //#region extensions/slack/src/directory-config.ts
8
+ // extensions/slack/src/directory-config.ts
9
9
  var directory_config_exports = /* @__PURE__ */ __exportAll({
10
10
  listSlackDirectoryGroupsFromConfig: () => listSlackDirectoryGroupsFromConfig,
11
11
  listSlackDirectoryPeersFromConfig: () => listSlackDirectoryPeersFromConfig
@@ -48,5 +48,4 @@ const listSlackDirectoryGroupsFromConfig = createResolvedDirectoryEntriesLister(
48
48
  return normalized?.kind === "channel" ? `channel:${normalizeLowercaseStringOrEmpty(normalized.id)}` : null;
49
49
  }
50
50
  });
51
- //#endregion
52
51
  export { listSlackDirectoryGroupsFromConfig as n, listSlackDirectoryPeersFromConfig as r, directory_config_exports as t };
@@ -1,8 +1,8 @@
1
- import { t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
2
- import { s as resolveSlackAccount } from "./accounts-CGJScKtk.mjs";
3
- import { n as fetchSlackChannelListPage, r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-CATAzbTT.mjs";
1
+ import { t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
+ import { s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
3
+ import { n as fetchSlackChannelListPage, r as createSlackLookupClient, t as collectSlackCursorPages } from "./cursor-pages-jVn3Vkfi.mjs";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
5
- //#region extensions/slack/src/directory-live.ts
5
+ // extensions/slack/src/directory-live.ts
6
6
  var directory_live_exports = /* @__PURE__ */ __exportAll({
7
7
  getSlackDirectorySelfLive: () => getSlackDirectorySelfLive,
8
8
  listSlackDirectoryGroupsLive: () => listSlackDirectoryGroupsLive,
@@ -97,5 +97,4 @@ const listSlackDirectoryGroupsLive = createSlackDirectoryLister({
97
97
  } : null;
98
98
  }
99
99
  });
100
- //#endregion
101
100
  export { listSlackDirectoryGroupsLive as n, listSlackDirectoryPeersLive as r, directory_live_exports as t };
@@ -1,7 +1,7 @@
1
- import { n as __reExport, t as __exportAll } from "./rolldown-runtime-B4FMCO8f.mjs";
1
+ import { n as __reExport, t as __exportAll } from "./rolldown-runtime-nwUcYXjP.mjs";
2
2
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { getChannelStreamingConfigObject, resolveChannelStreamingNativeTransport } from "openclaw/plugin-sdk/channel-streaming-config";
4
- //#region packages/normalization-core/src/record-coerce.ts
4
+ // packages/normalization-core/src/record-coerce.ts
5
5
  /** Type guard for non-array object records at browser-safe boundaries. */
6
6
  function isRecord$1(value) {
7
7
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -10,8 +10,7 @@ function isRecord$1(value) {
10
10
  function asNullableRecord(value) {
11
11
  return isRecord$1(value) ? value : null;
12
12
  }
13
- //#endregion
14
- //#region src/config/channel-config-normalization.ts
13
+ // src/config/channel-config-normalization.ts
15
14
  /** Applies one channel-specific doctor migration to every object-shaped account. */
16
15
  function normalizeChannelAccounts(params) {
17
16
  const rawAccounts = asNullableRecord(params.entry.accounts);
@@ -87,8 +86,7 @@ function normalizeChannelConfigEntries$1(params) {
87
86
  changes
88
87
  };
89
88
  }
90
- //#endregion
91
- //#region src/plugin-sdk/legacy-webhook-listener-migration.ts
89
+ // src/plugin-sdk/legacy-webhook-listener-migration.ts
92
90
  /** Preserve explicitly configured webhook listeners while moving ingress onto Gateway routes. */
93
91
  function createLegacyWebhookListenerDoctorContract(params) {
94
92
  const portKey = params.portKey ?? "webhookPort";
@@ -158,13 +156,11 @@ function createLegacyWebhookListenerDoctorContract(params) {
158
156
  }
159
157
  };
160
158
  }
161
- //#endregion
162
- //#region \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
159
+ // \0openclaw:bundled-sdk:openclaw/plugin-sdk/runtime-doctor-migrations
163
160
  var runtime_doctor_migrations_exports = /* @__PURE__ */ __exportAll({ createLegacyWebhookListenerDoctorContract: () => createLegacyWebhookListenerDoctorContract });
164
161
  import * as import_openclaw_plugin_sdk_runtime_doctor_migrations from "openclaw/plugin-sdk/runtime-doctor-migrations";
165
162
  __reExport(runtime_doctor_migrations_exports, import_openclaw_plugin_sdk_runtime_doctor_migrations);
166
- //#endregion
167
- //#region extensions/slack/src/streaming-compat.ts
163
+ // extensions/slack/src/streaming-compat.ts
168
164
  function resolveSlackStreamingMode(params = {}) {
169
165
  const mode = normalizeLowercaseStringOrEmpty(getChannelStreamingConfigObject(params)?.mode ?? params.streaming);
170
166
  if (mode === "off" || mode === "partial" || mode === "block" || mode === "progress") return mode;
@@ -178,8 +174,7 @@ function resolveSlackStreamingMode(params = {}) {
178
174
  function resolveSlackNativeStreaming(params = {}) {
179
175
  return resolveChannelStreamingNativeTransport(params) ?? (typeof params.nativeStreaming === "boolean" ? params.nativeStreaming : typeof params.streaming === "boolean" ? params.streaming : true);
180
176
  }
181
- //#endregion
182
- //#region extensions/slack/src/doctor-contract.ts
177
+ // extensions/slack/src/doctor-contract.ts
183
178
  const streamingAliasMigration = (0, runtime_doctor_migrations_exports.defineChannelAliasMigration)({
184
179
  channelId: "slack",
185
180
  streaming: {
@@ -330,5 +325,4 @@ function normalizeCompatibilityConfig({ cfg }) {
330
325
  }
331
326
  });
332
327
  }
333
- //#endregion
334
328
  export { normalizeCompatibilityConfig as n, runtime_doctor_migrations_exports as r, legacyConfigRules as t };
@@ -0,0 +1,155 @@
1
+ import { f as resolveSlackOperationToken, s as resolveSlackAccount } from "./accounts-EaPP0fFY.mjs";
2
+ import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-DwYAP3ts.mjs";
3
+ import { Yt as captureSlackWorkspaceInstallation } from "./probe-BHqvMbno.mjs";
4
+ import { t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
5
+ import { c as createSlackWriteClient, i as createSlackReadClient } from "./cursor-pages-jVn3Vkfi.mjs";
6
+ import { t as buildSlackLiteralText } from "./literal-text-DdCRYzYh.mjs";
7
+ import { n as getSlackRuntime } from "./runtime-C6HKn7Av.mjs";
8
+ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
9
+ import { getSessionBindingService } from "openclaw/plugin-sdk/session-binding-runtime";
10
+ import { isDeepStrictEqual } from "node:util";
11
+ // extensions/slack/src/fork.ts
12
+ const prepareSlackFork = async (params) => {
13
+ const { source, sourceMessageId, senderId } = params;
14
+ const threadTs = normalizeSlackThreadTsCandidate(source.threadId);
15
+ const messageTs = normalizeSlackThreadTsCandidate(sourceMessageId);
16
+ const parent = source.parentConversationId;
17
+ const target = parent ? parseSlackTarget(parent, { defaultKind: "channel" }) : void 0;
18
+ const installation = captureSlackWorkspaceInstallation(params.accountId);
19
+ if (!params.isGroup || !threadTs || source.conversationId !== threadTs || !messageTs || messageTs === threadTs || !senderId || !target || target.kind !== "channel" || target.teamId || !/^[CG][A-Z0-9]+$/i.test(target.id) || !installation) return {
20
+ ok: false,
21
+ reason: "Use @OpenClaw /fork [title] as a message inside an existing public or private channel thread. Top-level messages, native slash commands, DMs, and Enterprise Grid installs are not supported."
22
+ };
23
+ const title = params.title ?? "Forked conversation";
24
+ if (!title.trim() || title.length > 3e3 || /[\r\n]/.test(title)) return {
25
+ ok: false,
26
+ reason: "Use a single-line /fork title of at most 3000 characters. The title becomes the new root message."
27
+ };
28
+ const channelId = canonicalizeSlackApiTargetId("channel", target.id, parent);
29
+ const runtime = getSlackRuntime();
30
+ const account = resolveSlackAccount({
31
+ cfg: params.cfg,
32
+ accountId: params.accountId
33
+ });
34
+ const readToken = resolveSlackOperationToken(account, "read");
35
+ const writeToken = resolveSlackOperationToken(account, "write");
36
+ if (!account.enabled || !readToken || !writeToken) return {
37
+ ok: false,
38
+ reason: "The selected Slack account needs an active read credential and a write credential to fork a channel thread."
39
+ };
40
+ const assertCurrent = () => {
41
+ params.assertCurrent();
42
+ params.signal?.throwIfAborted();
43
+ installation.assertCurrent();
44
+ const current = resolveSlackAccount({
45
+ cfg: runtime.config.current({ clone: true }),
46
+ accountId: account.accountId
47
+ });
48
+ if (getSlackRuntime() !== runtime || !isDeepStrictEqual(current, account)) throw new Error("Slack account credentials or policy changed; send a new /fork request.");
49
+ };
50
+ assertCurrent();
51
+ const read = createSlackReadClient(readToken, {}, void 0, assertCurrent);
52
+ const write = createSlackWriteClient(writeToken, { rejectRateLimitedCalls: true }, assertCurrent);
53
+ const { postMessage: postRoot } = write.chat;
54
+ try {
55
+ const info = await write.conversations.info({ channel: channelId });
56
+ assertCurrent();
57
+ const channel = info.channel;
58
+ if (channel?.id !== channelId || !channel.is_channel && !channel.is_group || channel.is_im || channel.is_mpim || channel.is_archived || channel.is_member !== true) return {
59
+ ok: false,
60
+ reason: "The selected Slack identity must already belong to the same active public or private channel. DMs and group DMs cannot be forked."
61
+ };
62
+ const replies = await read.conversations.replies({
63
+ channel: channelId,
64
+ ts: threadTs,
65
+ oldest: messageTs,
66
+ latest: messageTs,
67
+ inclusive: true,
68
+ limit: 2
69
+ });
70
+ assertCurrent();
71
+ if (!replies.messages?.some((message) => message.ts === messageTs && message.thread_ts === threadTs && message.user === senderId)) return {
72
+ ok: false,
73
+ reason: "Slack did not confirm this command message in the source thread. Send @OpenClaw /fork [title] inside that thread; no new root was created."
74
+ };
75
+ } catch (error) {
76
+ assertCurrent();
77
+ return {
78
+ ok: false,
79
+ reason: "Could not verify the Slack source thread: " + formatErrorMessage(error) + ". Check channel membership and thread-history read permissions; no new root was created."
80
+ };
81
+ }
82
+ let creation;
83
+ return {
84
+ ok: true,
85
+ assertCurrent,
86
+ formatRecap: (text) => ({
87
+ text,
88
+ channelData: { slack: { literalText: true } }
89
+ }),
90
+ create: async (targetSessionKey) => {
91
+ assertCurrent();
92
+ if (creation) {
93
+ if (creation.sessionKey !== targetSessionKey) throw new Error("This Slack fork request already selected a different copied session.");
94
+ return creation.result;
95
+ }
96
+ const result = (async () => {
97
+ assertCurrent();
98
+ let rootTs;
99
+ let returnedIdentity;
100
+ try {
101
+ assertCurrent();
102
+ const posted = await postRoot({
103
+ channel: channelId,
104
+ ...buildSlackLiteralText(title)
105
+ });
106
+ rootTs = normalizeSlackThreadTsCandidate(posted.ts);
107
+ returnedIdentity = (posted.channel ?? "unknown channel") + "/" + (posted.ts ?? "unknown ts");
108
+ if (!rootTs || posted.channel !== channelId || posted.message?.thread_ts && posted.message.thread_ts !== rootTs) throw new Error("Slack did not return a matching top-level root identity");
109
+ } catch (error) {
110
+ throw new Error("Slack root creation was not confirmed" + (returnedIdentity ? " (returned identity " + returnedIdentity + ")" : "") + ". Check channel " + channelId + " before retrying; this request will not create another root. " + formatErrorMessage(error), { cause: error });
111
+ }
112
+ try {
113
+ assertCurrent();
114
+ const binding = await getSessionBindingService().bind({
115
+ targetSessionKey,
116
+ targetKind: "session",
117
+ placement: "current",
118
+ conversation: {
119
+ channel: "slack",
120
+ accountId: account.accountId,
121
+ conversationId: rootTs,
122
+ parentConversationId: channelId
123
+ },
124
+ assertCurrent
125
+ });
126
+ assertCurrent();
127
+ let url;
128
+ try {
129
+ const permalink = await read.chat.getPermalink({
130
+ channel: channelId,
131
+ message_ts: rootTs
132
+ });
133
+ assertCurrent();
134
+ url = permalink.permalink;
135
+ } catch {
136
+ assertCurrent();
137
+ }
138
+ return {
139
+ binding,
140
+ url,
141
+ notice: "The fork stays in the same Slack channel and has the same channel audience." + (url ? "" : " The continuation link could not be retrieved; the retained root is " + channelId + "/" + rootTs + ".")
142
+ };
143
+ } catch (error) {
144
+ throw new Error("Slack root " + channelId + "/" + rootTs + " was created and is retained, but fork setup did not finish. Do not create another root without checking it. " + formatErrorMessage(error), { cause: error });
145
+ }
146
+ })();
147
+ creation = {
148
+ sessionKey: targetSessionKey,
149
+ result
150
+ };
151
+ return result;
152
+ }
153
+ };
154
+ };
155
+ export { prepareSlackFork };
@@ -0,0 +1,24 @@
1
+ import { Ot as escapeSlackMrkdwn, vt as SLACK_SECTION_TEXT_MAX } from "./probe-BHqvMbno.mjs";
2
+ import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
3
+ // extensions/slack/src/literal-text.ts
4
+ /** Native plain-text blocks plus a non-parsing accessibility fallback. */
5
+ function buildSlackLiteralText(text) {
6
+ const blocks = chunkTextForOutbound(text, SLACK_SECTION_TEXT_MAX, { preserveWhitespace: true }).map((chunk) => ({
7
+ type: "section",
8
+ text: {
9
+ type: "plain_text",
10
+ text: chunk,
11
+ emoji: false
12
+ }
13
+ }));
14
+ return {
15
+ text: escapeSlackMrkdwn(text),
16
+ blocks,
17
+ mrkdwn: false,
18
+ parse: "none",
19
+ link_names: false,
20
+ unfurl_links: false,
21
+ unfurl_media: false
22
+ };
23
+ }
24
+ export { buildSlackLiteralText as t };
@@ -1,10 +1,10 @@
1
- import { i as listSlackAccountIds } from "./accounts-CGJScKtk.mjs";
2
- import { t as inspectSlackAccount } from "./account-inspect-BLVha-ov.mjs";
3
- import { r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-Cvt7WD6B.mjs";
1
+ import { i as listSlackAccountIds } from "./accounts-EaPP0fFY.mjs";
2
+ import { t as inspectSlackAccount } from "./account-inspect-DgQgj0wk.mjs";
3
+ import { r as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-47Au2-Yn.mjs";
4
4
  import { createActionGate } from "openclaw/plugin-sdk/channel-actions";
5
5
  import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
6
6
  import { Type } from "typebox";
7
- //#region extensions/slack/src/message-actions.ts
7
+ // extensions/slack/src/message-actions.ts
8
8
  function listSlackMessageActions(cfg, accountId) {
9
9
  const accounts = (accountId ? [inspectSlackAccount({
10
10
  cfg,
@@ -56,8 +56,7 @@ function extractSlackToolSend(args) {
56
56
  ...threadSuppressed ? { threadSuppressed: true } : {}
57
57
  };
58
58
  }
59
- //#endregion
60
- //#region extensions/slack/src/message-tool-api.ts
59
+ // extensions/slack/src/message-tool-api.ts
61
60
  const SLACK_MESSAGE_ID_ACTIONS = [
62
61
  "react",
63
62
  "reactions",
@@ -133,5 +132,4 @@ function describeSlackMessageTool({ cfg, accountId }) {
133
132
  schema: schema.length > 0 ? schema : null
134
133
  };
135
134
  }
136
- //#endregion
137
135
  export { extractSlackToolSend as n, listSlackMessageActions as r, describeSlackMessageTool as t };