@openclaw/slack 2026.6.11 → 2026.6.33

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 (102) hide show
  1. package/dist/account-inspect-api.js +1 -1
  2. package/dist/{account-inspect-DOtQbKkB.js → account-inspect-ldU97llt.js} +1 -1
  3. package/dist/{accounts-BPCiCe8y.js → accounts-C9Z3J3lT.js} +8 -1
  4. package/dist/accounts.runtime-4Xez0y2c.js +2 -0
  5. package/dist/{action-runtime-DfJK7zS0.js → action-runtime-z9j2PYiO.js} +4 -4
  6. package/dist/action-runtime.runtime-BuOQERTf.js +2 -0
  7. package/dist/{actions-OhnDIN4l.js → actions-CCTO1mVi.js} +3 -3
  8. package/dist/{actions.runtime-DkFXr3-k.js → actions.runtime-BaBCJbO3.js} +1 -1
  9. package/dist/api.js +12 -12
  10. package/dist/{approval-handler.runtime-CsFrthnF.js → approval-handler.runtime-Cw1Im48B.js} +2 -2
  11. package/dist/{channel-COCbJwom.js → channel-DLPyf4p_.js} +23 -17
  12. package/dist/channel-plugin-api.js +1 -1
  13. package/dist/{channel.setup-DYQGnKPK.js → channel.setup-RewyjVhG.js} +3 -3
  14. package/dist/{directory-config-DDVHDmrN.js → directory-config-NDOJRlhK.js} +1 -1
  15. package/dist/directory-contract-api.js +1 -1
  16. package/dist/{directory-live-DzOkmJVV.js → directory-live-CeVhaEVq.js} +1 -1
  17. package/dist/{interactive-replies-D-22gTp3.js → interactive-replies-BBZN1A9T.js} +1 -1
  18. package/dist/interactive-replies-api.js +1 -1
  19. package/dist/{message-tool-api--zYyTqrR.js → message-tool-api-OXkQLOkR.js} +2 -2
  20. package/dist/message-tool-api.js +1 -1
  21. package/dist/{monitor-Cy-0xYgF.js → monitor-CoF156tn.js} +3 -3
  22. package/dist/{outbound-adapter-CzX4D5K_.js → outbound-adapter-DqEIkSaa.js} +3 -3
  23. package/dist/{pipeline.runtime-5R4HgM_7.js → pipeline.runtime-Lp1AVrkR.js} +74 -59
  24. package/dist/{policy-Bi92bs5t.js → policy-hyhJMisM.js} +1 -1
  25. package/dist/{probe-BRsYAcGR.js → probe-PFduhlzL.js} +8 -2
  26. package/dist/{provider-7YKru1TZ.js → provider-CQvIQMod.js} +49 -31
  27. package/dist/{relay-source-42fP7Ktr.js → relay-source-Bv6k-bAg.js} +1 -1
  28. package/dist/{replies-Dlxge48k.js → replies-DM1Qi_1b.js} +3 -3
  29. package/dist/{reply-blocks-BT_sNsDQ.js → reply-blocks-0ofUZd6K.js} +1 -1
  30. package/dist/runtime-api.js +9 -9
  31. package/dist/{send-CRoD-UQw.js → send-CrC49d83.js} +3 -3
  32. package/dist/send.runtime-B_nPiIPk.js +2 -0
  33. package/dist/{setup-core-BCGzyZhx.js → setup-core-DPMX-Z6o.js} +2 -2
  34. package/dist/setup-plugin-api.js +1 -1
  35. package/dist/{setup-surface-D4GE34e2.js → setup-surface-BCB7d1mL.js} +3 -3
  36. package/dist/{shared-BtJS2bUx.js → shared-CQ2R9FGA.js} +4 -4
  37. package/dist/{slash-dispatch.runtime-D1qKAWNN.js → slash-dispatch.runtime-CCP3os2O.js} +1 -1
  38. package/node_modules/agent-base/README.md +145 -0
  39. package/node_modules/agent-base/dist/src/index.d.ts +78 -0
  40. package/node_modules/agent-base/dist/src/index.js +203 -0
  41. package/node_modules/agent-base/dist/src/index.js.map +1 -0
  42. package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  43. package/node_modules/agent-base/dist/src/promisify.js +18 -0
  44. package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  45. package/node_modules/agent-base/package.json +64 -0
  46. package/node_modules/agent-base/src/index.ts +345 -0
  47. package/node_modules/agent-base/src/promisify.ts +33 -0
  48. package/node_modules/axios/CHANGELOG.md +165 -1
  49. package/node_modules/axios/README.md +310 -247
  50. package/node_modules/axios/dist/axios.js +533 -197
  51. package/node_modules/axios/dist/axios.min.js +3 -3
  52. package/node_modules/axios/dist/axios.min.js.map +1 -1
  53. package/node_modules/axios/dist/browser/axios.cjs +564 -161
  54. package/node_modules/axios/dist/esm/axios.js +564 -161
  55. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  56. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  57. package/node_modules/axios/dist/node/axios.cjs +839 -281
  58. package/node_modules/axios/index.d.cts +11 -4
  59. package/node_modules/axios/index.d.ts +7 -2
  60. package/node_modules/axios/lib/adapters/fetch.js +196 -37
  61. package/node_modules/axios/lib/adapters/http.js +328 -185
  62. package/node_modules/axios/lib/adapters/xhr.js +2 -1
  63. package/node_modules/axios/lib/core/Axios.js +4 -2
  64. package/node_modules/axios/lib/core/AxiosHeaders.js +13 -42
  65. package/node_modules/axios/lib/core/buildFullPath.js +29 -1
  66. package/node_modules/axios/lib/core/mergeConfig.js +34 -0
  67. package/node_modules/axios/lib/defaults/transitional.js +2 -0
  68. package/node_modules/axios/lib/env/data.js +1 -1
  69. package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
  70. package/node_modules/axios/lib/helpers/buildURL.js +6 -4
  71. package/node_modules/axios/lib/helpers/composeSignals.js +48 -47
  72. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
  73. package/node_modules/axios/lib/helpers/formDataToJSON.js +26 -4
  74. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  75. package/node_modules/axios/lib/helpers/fromDataURI.js +18 -5
  76. package/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
  77. package/node_modules/axios/lib/helpers/resolveConfig.js +17 -9
  78. package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  79. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
  80. package/node_modules/axios/lib/helpers/toFormData.js +41 -11
  81. package/node_modules/axios/lib/utils.js +105 -19
  82. package/node_modules/axios/package.json +31 -13
  83. package/node_modules/https-proxy-agent/README.md +137 -0
  84. package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  85. package/node_modules/https-proxy-agent/dist/agent.js +177 -0
  86. package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  87. package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  88. package/node_modules/https-proxy-agent/dist/index.js +14 -0
  89. package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  90. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  91. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  92. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  93. package/node_modules/https-proxy-agent/package.json +56 -0
  94. package/npm-shrinkwrap.json +32 -6
  95. package/package.json +4 -4
  96. package/dist/accounts.runtime-CgWgzjLX.js +0 -2
  97. package/dist/action-runtime.runtime-CIYPRrNy.js +0 -2
  98. package/dist/send.runtime-C_y65BU0.js +0 -2
  99. package/node_modules/axios/dist/axios.js.map +0 -1
  100. package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  101. package/node_modules/axios/dist/esm/axios.js.map +0 -1
  102. package/node_modules/axios/dist/node/axios.cjs.map +0 -1
@@ -1,19 +1,20 @@
1
1
  import { n as registerSlackHttpHandler, r as normalizeSlackWebhookPath } from "./registry-bbjH7IHX.js";
2
- import { a as resolveSlackAccount, d as resolveSlackBotToken, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as resolveSlackAppToken } from "./accounts-BPCiCe8y.js";
3
- import { F as isSlackExecApprovalAuthorizedSender, N as isSlackApprovalAuthorizedSender, S as isSlackAnyNativeApprovalClientEnabled, a as SLACK_TEXT_LIMIT, c as allowListMatches, d as normalizeSlackAllowOwnerEntry, f as normalizeSlackSlug, l as normalizeAllowList, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
4
- import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-D-22gTp3.js";
2
+ import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, o as resolveSlackAccountAllowFrom, s as resolveSlackAccountDmPolicy, u as formatSlackBotTokenIdentityWarning } from "./accounts-C9Z3J3lT.js";
3
+ import { F as isSlackExecApprovalAuthorizedSender, N as isSlackApprovalAuthorizedSender, S as isSlackAnyNativeApprovalClientEnabled, a as SLACK_TEXT_LIMIT, c as allowListMatches, d as normalizeSlackAllowOwnerEntry, f as normalizeSlackSlug, l as normalizeAllowList, p as resolveSlackAllowListMatch, u as normalizeAllowListLower, v as truncateSlackText } from "./reply-blocks-0ofUZd6K.js";
4
+ import { n as isSlackInteractiveRepliesEnabled, t as compileSlackInteractiveReplies } from "./interactive-replies-BBZN1A9T.js";
5
5
  import { c as resolveSlackWebClientOptions } from "./client-km2ba2l3.js";
6
6
  import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
7
- import { n as setSlackDefaultSendIdentity } from "./send-CRoD-UQw.js";
7
+ import { n as setSlackDefaultSendIdentity } from "./send-CrC49d83.js";
8
8
  import { t as formatSlackError } from "./errors-CZtmv-h0.js";
9
9
  import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtUOIX8D.js";
10
10
  import { t as resolveSlackUserAllowlist } from "./resolve-users-DfFN2BcP.js";
11
- import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-Bi92bs5t.js";
11
+ import { n as resolveSlackChannelConfig, r as resolveSlackChannelLabel, t as isSlackChannelAllowedByPolicy } from "./policy-hyhJMisM.js";
12
12
  import { normalizeResolvedSecretInputString } from "openclaw/plugin-sdk/secret-input";
13
13
  import { asOptionalRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries, normalizeStringEntriesLower, normalizeUniqueTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
14
14
  import { normalizeAccountId, normalizeMainKey, resolveAgentRoute, resolveThreadSessionKeys } from "openclaw/plugin-sdk/routing";
15
15
  import { createChannelMessageReplyPipeline } from "openclaw/plugin-sdk/channel-outbound";
16
16
  import { createChannelPairingChallengeIssuer } from "openclaw/plugin-sdk/channel-pairing";
17
+ import { chunkItems } from "openclaw/plugin-sdk/text-chunking";
17
18
  import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
18
19
  import { parseExecApprovalCommandText } from "openclaw/plugin-sdk/approval-reply-runtime";
19
20
  import { addAllowlistUserEntriesFromConfigEntry, buildAllowlistResolutionSummary, formatAllowlistMatchMeta, mergeAllowlist, patchAllowlistUsersInConfigEntries, summarizeMapping } from "openclaw/plugin-sdk/allow-from";
@@ -22,7 +23,6 @@ import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
22
23
  import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
23
24
  import { asDateTimestampMs, parseFiniteNumber, parseStrictFiniteNumber, resolveExpiresAtMsFromDurationMs, timestampMsToIsoString } from "openclaw/plugin-sdk/number-runtime";
24
25
  import { resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
25
- import { chunkItems } from "openclaw/plugin-sdk/text-chunking";
26
26
  import { createDedupeCache, resolveGlobalDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
27
27
  import { buildPluginBindingResolvedText, parsePluginBindingApprovalCustomId, recordInboundSession, resolveConversationLabel as resolveConversationLabel$1, resolvePluginConversationBindingApproval, resolveRuntimeConversationBindingRoute, upsertChannelPairingRequest } from "openclaw/plugin-sdk/conversation-runtime";
28
28
  import { resolveNativeCommandsEnabled, resolveNativeSkillsEnabled } from "openclaw/plugin-sdk/native-command-config-runtime";
@@ -2821,7 +2821,7 @@ function createSlackThreadTsResolver(params) {
2821
2821
  //#region extensions/slack/src/monitor/message-handler.ts
2822
2822
  let slackMessagePipelinePromise;
2823
2823
  function loadSlackMessagePipeline() {
2824
- slackMessagePipelinePromise ??= import("./pipeline.runtime-5R4HgM_7.js");
2824
+ slackMessagePipelinePromise ??= import("./pipeline.runtime-Lp1AVrkR.js");
2825
2825
  return slackMessagePipelinePromise;
2826
2826
  }
2827
2827
  function createSlackDispatchCompletion() {
@@ -2886,26 +2886,36 @@ function createSlackMessageHandler(params) {
2886
2886
  try {
2887
2887
  const { prepareSlackMessage, dispatchPreparedSlackMessage } = await loadSlackMessagePipeline();
2888
2888
  const { dispatchCompletion: _completion, awaitDispatch: _awaitDispatch, ...lastOpts } = last.opts;
2889
- const prepared = await prepareSlackMessage({
2890
- ctx,
2891
- account,
2892
- message: syntheticMessage,
2893
- opts: {
2894
- ...lastOpts,
2895
- wasMentioned: combinedMentioned || last.opts.wasMentioned
2889
+ const appMentionRetryKey = seenMessageKey && lastOpts.source === "app_mention" && !ctx.botUserId ? seenMessageKey : void 0;
2890
+ if (appMentionRetryKey) appMentionPreparingKeys.add(appMentionRetryKey);
2891
+ const prepared = await (async () => {
2892
+ try {
2893
+ const result = await prepareSlackMessage({
2894
+ ctx,
2895
+ account,
2896
+ message: syntheticMessage,
2897
+ opts: {
2898
+ ...lastOpts,
2899
+ wasMentioned: combinedMentioned || last.opts.wasMentioned,
2900
+ ...seenMessageKey && lastOpts.source === "message" ? { shouldRecordDroppedHistory: () => !appMentionPreparingKeys.has(seenMessageKey) && !appMentionDispatchedKeys.has(seenMessageKey) } : {}
2901
+ }
2902
+ });
2903
+ if (result && seenMessageKey) {
2904
+ pruneAppMentionRetryKeys(Date.now());
2905
+ if (last.opts.source === "app_mention") rememberExpiringAppMentionKey(appMentionDispatchedKeys, seenMessageKey);
2906
+ else if (last.opts.source === "message" && appMentionDispatchedKeys.has(seenMessageKey)) {
2907
+ appMentionDispatchedKeys.delete(seenMessageKey);
2908
+ appMentionRetryKeys.delete(seenMessageKey);
2909
+ return null;
2910
+ }
2911
+ appMentionRetryKeys.delete(seenMessageKey);
2912
+ }
2913
+ return result;
2914
+ } finally {
2915
+ if (appMentionRetryKey) appMentionPreparingKeys.delete(appMentionRetryKey);
2896
2916
  }
2897
- });
2917
+ })();
2898
2918
  if (!prepared) return;
2899
- if (seenMessageKey) {
2900
- pruneAppMentionRetryKeys(Date.now());
2901
- if (last.opts.source === "app_mention") rememberExpiringAppMentionKey(appMentionDispatchedKeys, seenMessageKey);
2902
- else if (last.opts.source === "message" && appMentionDispatchedKeys.has(seenMessageKey)) {
2903
- appMentionDispatchedKeys.delete(seenMessageKey);
2904
- appMentionRetryKeys.delete(seenMessageKey);
2905
- return;
2906
- }
2907
- appMentionRetryKeys.delete(seenMessageKey);
2908
- }
2909
2919
  if (entries.length > 1) {
2910
2920
  const ids = entries.map((entry) => entry.message.ts).filter(Boolean);
2911
2921
  if (ids.length > 0) {
@@ -2948,6 +2958,7 @@ function createSlackMessageHandler(params) {
2948
2958
  const threadTsResolver = createSlackThreadTsResolver({ client: ctx.app.client });
2949
2959
  const pendingTopLevelDebounceKeys = /* @__PURE__ */ new Map();
2950
2960
  const appMentionRetryKeys = /* @__PURE__ */ new Map();
2961
+ const appMentionPreparingKeys = /* @__PURE__ */ new Set();
2951
2962
  const appMentionDispatchedKeys = /* @__PURE__ */ new Map();
2952
2963
  const pruneAppMentionRetryKeys = (rawNow) => {
2953
2964
  const now = asDateTimestampMs(rawNow);
@@ -3502,7 +3513,7 @@ function loadSlashCommandsRuntime() {
3502
3513
  return slashCommandsRuntimePromise;
3503
3514
  }
3504
3515
  function loadSlashDispatchRuntime() {
3505
- slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-D1qKAWNN.js");
3516
+ slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-CCP3os2O.js");
3506
3517
  return slashDispatchRuntimePromise;
3507
3518
  }
3508
3519
  function loadSlackPluginCommandsRuntime() {
@@ -4215,7 +4226,7 @@ async function getSlackBoltInterop() {
4215
4226
  return slackBoltInterop;
4216
4227
  }
4217
4228
  function loadSlackRelaySource() {
4218
- slackRelaySourcePromise ??= import("./relay-source-42fP7Ktr.js");
4229
+ slackRelaySourcePromise ??= import("./relay-source-Bv6k-bAg.js");
4219
4230
  return slackRelaySourcePromise;
4220
4231
  }
4221
4232
  const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
@@ -4386,13 +4397,19 @@ async function monitorSlackProvider(opts = {}) {
4386
4397
  const expectedApiAppIdFromAppToken = slackMode === "socket" ? parseApiAppIdFromAppToken(appToken) : void 0;
4387
4398
  let authTestFailed = false;
4388
4399
  let authTestError;
4400
+ let authIdentityWarning;
4389
4401
  try {
4390
4402
  const auth = await app.client.auth.test();
4391
- botUserId = auth.user_id ?? "";
4392
- botId = auth.bot_id ?? "";
4403
+ const authUserId = normalizeOptionalString(auth.user_id) ?? "";
4404
+ botId = normalizeOptionalString(auth.bot_id) ?? "";
4405
+ botUserId = botId ? authUserId : "";
4393
4406
  teamId = auth.team_id ?? "";
4394
4407
  apiAppId = auth.api_app_id ?? "";
4395
- if (!botUserId) {
4408
+ authIdentityWarning = formatSlackBotTokenIdentityWarning({
4409
+ auth,
4410
+ accountId: account.accountId
4411
+ });
4412
+ if (!authUserId) {
4396
4413
  authTestFailed = true;
4397
4414
  authTestError = "auth.test returned no user_id";
4398
4415
  }
@@ -4400,7 +4417,8 @@ async function monitorSlackProvider(opts = {}) {
4400
4417
  authTestFailed = true;
4401
4418
  authTestError = err instanceof Error ? err.message : String(err);
4402
4419
  }
4403
- if (authTestFailed) runtime.log?.(warn(`[${account.accountId}] slack auth.test failed at boot (${authTestError ?? "unknown error"}); explicit bot-mention detection will be disabled until restart with a valid bot token`));
4420
+ if (authTestFailed) runtime.log?.(warn(`[${account.accountId}] slack auth.test failed at boot (${authTestError ?? "unknown error"}); explicit bot-mention detection will be disabled until restart with a valid bot token; required-mention channels will fail closed without another trusted activation signal`));
4421
+ if (authIdentityWarning) runtime.log?.(warn(authIdentityWarning));
4404
4422
  if (apiAppId && expectedApiAppIdFromAppToken && apiAppId !== expectedApiAppIdFromAppToken) runtime.error?.(`slack token mismatch: bot token api_app_id=${apiAppId} but app token looks like api_app_id=${expectedApiAppIdFromAppToken}`);
4405
4423
  const ctx = createSlackMonitorContext({
4406
4424
  cfg,
@@ -1,4 +1,4 @@
1
- import { a as SLACK_SOCKET_RECONNECT_POLICY, o as formatUnknownError } from "./provider-7YKru1TZ.js";
1
+ import { a as SLACK_SOCKET_RECONNECT_POLICY, o as formatUnknownError } from "./provider-CQvIQMod.js";
2
2
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
4
4
  import { Buffer } from "node:buffer";
@@ -1,6 +1,6 @@
1
- import { a as SLACK_TEXT_LIMIT, t as resolveSlackReplyBlocks } from "./reply-blocks-BT_sNsDQ.js";
2
- import { s as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-CRoD-UQw.js";
3
- import "./provider-7YKru1TZ.js";
1
+ import { a as SLACK_TEXT_LIMIT, t as resolveSlackReplyBlocks } from "./reply-blocks-0ofUZd6K.js";
2
+ import { s as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-CrC49d83.js";
3
+ import "./provider-CQvIQMod.js";
4
4
  import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
5
5
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
6
6
  import { SILENT_REPLY_TOKEN, chunkMarkdownTextWithMode, isSilentReplyText } from "openclaw/plugin-sdk/reply-chunking";
@@ -1,4 +1,4 @@
1
- import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-BPCiCe8y.js";
1
+ import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig } from "./accounts-C9Z3J3lT.js";
2
2
  import { r as parseSlackTarget } from "./target-parsing-3jYH8LfB.js";
3
3
  import "./targets-Dll4NJgs.js";
4
4
  import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
@@ -1,14 +1,14 @@
1
1
  import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-B9PvcDQJ.js";
2
- import { a as resolveSlackAccount, d as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts, u as resolveSlackAppToken } from "./accounts-BPCiCe8y.js";
3
- import { o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy } from "./reply-blocks-BT_sNsDQ.js";
2
+ import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts } from "./accounts-C9Z3J3lT.js";
3
+ import { o as resolveSlackGroupRequireMention, s as resolveSlackGroupToolPolicy } from "./reply-blocks-0ofUZd6K.js";
4
4
  import { n as setSlackRuntime } from "./runtime-BOk7xkOl.js";
5
- import { t as sendMessageSlack } from "./send-CRoD-UQw.js";
6
- import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-OhnDIN4l.js";
7
- import { t as probeSlack } from "./probe-BRsYAcGR.js";
5
+ import { t as sendMessageSlack } from "./send-CrC49d83.js";
6
+ import { a as listSlackEmojis, c as pinSlackMessage, d as removeOwnSlackReactions, f as removeSlackReaction, i as getSlackMemberInfo, l as reactSlackMessage, m as unpinSlackMessage, o as listSlackPins, p as sendSlackMessage, r as editSlackMessage, s as listSlackReactions, t as deleteSlackMessage, u as readSlackMessages } from "./actions-CCTO1mVi.js";
7
+ import { t as probeSlack } from "./probe-PFduhlzL.js";
8
8
  import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtUOIX8D.js";
9
9
  import { t as resolveSlackUserAllowlist } from "./resolve-users-DfFN2BcP.js";
10
- import { t as monitorSlackProvider } from "./provider-7YKru1TZ.js";
11
- import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-DfJK7zS0.js";
12
- import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-DzOkmJVV.js";
13
- import "./monitor-Cy-0xYgF.js";
10
+ import { t as monitorSlackProvider } from "./provider-CQvIQMod.js";
11
+ import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-z9j2PYiO.js";
12
+ import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-CeVhaEVq.js";
13
+ import "./monitor-CoF156tn.js";
14
14
  export { deleteSlackMessage, editSlackMessage, getSlackMemberInfo, handleSlackAction, listEnabledSlackAccounts, listSlackAccountIds, listSlackDirectoryGroupsLive, listSlackDirectoryPeersLive, listSlackEmojis, listSlackPins, listSlackReactions, monitorSlackProvider, pinSlackMessage, probeSlack, reactSlackMessage, readSlackMessages, registerSlackPluginHttpRoutes, removeOwnSlackReactions, removeSlackReaction, resolveDefaultSlackAccountId, resolveSlackAccount, resolveSlackAppToken, resolveSlackBotToken, resolveSlackChannelAllowlist, resolveSlackGroupRequireMention, resolveSlackGroupToolPolicy, resolveSlackUserAllowlist, sendMessageSlack, sendSlackMessage, setSlackRuntime, slackActionRuntime, unpinSlackMessage };
@@ -1,13 +1,14 @@
1
- import { a as resolveSlackAccount, d as resolveSlackBotToken } from "./accounts-BPCiCe8y.js";
1
+ import { a as resolveSlackAccount, f as resolveSlackBotToken } from "./accounts-C9Z3J3lT.js";
2
2
  import { r as parseSlackTarget } from "./target-parsing-3jYH8LfB.js";
3
3
  import "./targets-Dll4NJgs.js";
4
- import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-BT_sNsDQ.js";
4
+ import { a as SLACK_TEXT_LIMIT, i as validateSlackBlocksArray, v as truncateSlackText } from "./reply-blocks-0ofUZd6K.js";
5
5
  import { t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
6
6
  import { a as getSlackWriteClient, n as createSlackTokenCacheKey } from "./client-km2ba2l3.js";
7
7
  import { t as getOptionalSlackRuntime } from "./runtime-BOk7xkOl.js";
8
8
  import { i as loadOutboundMediaFromUrl } from "./runtime-api-ClM1_yX2.js";
9
9
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
10
10
  import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
11
+ import { markdownToIR, renderMarkdownIRChunksWithinLimit, renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-chunking";
11
12
  import { withTrustedEnvProxyGuardedFetchMode } from "openclaw/plugin-sdk/fetch-runtime";
12
13
  import { requireRuntimeConfig } from "openclaw/plugin-sdk/plugin-config-runtime";
13
14
  import { logVerbose } from "openclaw/plugin-sdk/runtime-env";
@@ -15,7 +16,6 @@ import { resolveMarkdownTableMode } from "openclaw/plugin-sdk/markdown-table-run
15
16
  import { chunkMarkdownTextWithMode, isSilentReplyText, resolveChunkMode, resolveTextChunkLimit } from "openclaw/plugin-sdk/reply-chunking";
16
17
  import { resolveTextChunksWithFallback } from "openclaw/plugin-sdk/reply-payload";
17
18
  import { fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
18
- import { markdownToIR, renderMarkdownIRChunksWithinLimit, renderMarkdownWithMarkers } from "openclaw/plugin-sdk/text-chunking";
19
19
  import { resolveGlobalDedupeCache } from "openclaw/plugin-sdk/dedupe-runtime";
20
20
  //#region extensions/slack/src/blocks-fallback.ts
21
21
  function cleanCandidate(value) {
@@ -0,0 +1,2 @@
1
+ import { t as sendMessageSlack } from "./send-CrC49d83.js";
2
+ export { sendMessageSlack };
@@ -1,5 +1,5 @@
1
- import { a as resolveSlackAccount } from "./accounts-BPCiCe8y.js";
2
- import { t as inspectSlackAccount } from "./account-inspect-DOtQbKkB.js";
1
+ import { a as resolveSlackAccount } from "./accounts-C9Z3J3lT.js";
2
+ import { t as inspectSlackAccount } from "./account-inspect-ldU97llt.js";
3
3
  import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
4
4
  import { hasConfiguredSecretInput } from "openclaw/plugin-sdk/secret-input";
5
5
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, uniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -1,2 +1,2 @@
1
- import { t as slackSetupPlugin } from "./channel.setup-DYQGnKPK.js";
1
+ import { t as slackSetupPlugin } from "./channel.setup-RewyjVhG.js";
2
2
  export { slackSetupPlugin };
@@ -1,6 +1,6 @@
1
- import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-BPCiCe8y.js";
2
- import "./shared-BtJS2bUx.js";
3
- import { i as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-BCGzyZhx.js";
1
+ import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-C9Z3J3lT.js";
2
+ import "./shared-CQ2R9FGA.js";
3
+ import { i as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-DPMX-Z6o.js";
4
4
  import { t as resolveSlackChannelAllowlist } from "./resolve-channels-CtUOIX8D.js";
5
5
  import { t as resolveSlackUserAllowlist } from "./resolve-users-DfFN2BcP.js";
6
6
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
@@ -1,9 +1,9 @@
1
- import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, s as resolveSlackAccountDmPolicy } from "./accounts-BPCiCe8y.js";
2
- import { t as inspectSlackAccount } from "./account-inspect-DOtQbKkB.js";
1
+ import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, s as resolveSlackAccountDmPolicy } from "./accounts-C9Z3J3lT.js";
2
+ import { t as inspectSlackAccount } from "./account-inspect-ldU97llt.js";
3
3
  import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
4
- import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-D-22gTp3.js";
4
+ import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-BBZN1A9T.js";
5
5
  import { f as getChatChannelMeta } from "./client-km2ba2l3.js";
6
- import { i as SLACK_CHANNEL } from "./setup-core-BCGzyZhx.js";
6
+ import { i as SLACK_CHANNEL } from "./setup-core-DPMX-Z6o.js";
7
7
  import { t as SlackChannelConfigSchema } from "./config-schema-BzqzFW__.js";
8
8
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-XL6HeNCb.js";
9
9
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-C3ChHo5A.js";
@@ -1,4 +1,4 @@
1
- import { r as deliverSlackSlashReplies$1 } from "./replies-Dlxge48k.js";
1
+ import { r as deliverSlackSlashReplies$1 } from "./replies-DM1Qi_1b.js";
2
2
  import { resolveAgentRoute as resolveAgentRoute$1 } from "openclaw/plugin-sdk/routing";
3
3
  import { resolveMarkdownTableMode as resolveMarkdownTableMode$1 } from "openclaw/plugin-sdk/markdown-table-runtime";
4
4
  import { recordInboundSessionMetaSafe as recordInboundSessionMetaSafe$1, resolveConversationLabel as resolveConversationLabel$1 } from "openclaw/plugin-sdk/conversation-runtime";
@@ -0,0 +1,145 @@
1
+ agent-base
2
+ ==========
3
+ ### Turn a function into an [`http.Agent`][http.Agent] instance
4
+ [![Build Status](https://github.com/TooTallNate/node-agent-base/workflows/Node%20CI/badge.svg)](https://github.com/TooTallNate/node-agent-base/actions?workflow=Node+CI)
5
+
6
+ This module provides an `http.Agent` generator. That is, you pass it an async
7
+ callback function, and it returns a new `http.Agent` instance that will invoke the
8
+ given callback function when sending outbound HTTP requests.
9
+
10
+ #### Some subclasses:
11
+
12
+ Here's some more interesting uses of `agent-base`.
13
+ Send a pull request to list yours!
14
+
15
+ * [`http-proxy-agent`][http-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTP endpoints
16
+ * [`https-proxy-agent`][https-proxy-agent]: An HTTP(s) proxy `http.Agent` implementation for HTTPS endpoints
17
+ * [`pac-proxy-agent`][pac-proxy-agent]: A PAC file proxy `http.Agent` implementation for HTTP and HTTPS
18
+ * [`socks-proxy-agent`][socks-proxy-agent]: A SOCKS proxy `http.Agent` implementation for HTTP and HTTPS
19
+
20
+
21
+ Installation
22
+ ------------
23
+
24
+ Install with `npm`:
25
+
26
+ ``` bash
27
+ $ npm install agent-base
28
+ ```
29
+
30
+
31
+ Example
32
+ -------
33
+
34
+ Here's a minimal example that creates a new `net.Socket` connection to the server
35
+ for every HTTP request (i.e. the equivalent of `agent: false` option):
36
+
37
+ ```js
38
+ var net = require('net');
39
+ var tls = require('tls');
40
+ var url = require('url');
41
+ var http = require('http');
42
+ var agent = require('agent-base');
43
+
44
+ var endpoint = 'http://nodejs.org/api/';
45
+ var parsed = url.parse(endpoint);
46
+
47
+ // This is the important part!
48
+ parsed.agent = agent(function (req, opts) {
49
+ var socket;
50
+ // `secureEndpoint` is true when using the https module
51
+ if (opts.secureEndpoint) {
52
+ socket = tls.connect(opts);
53
+ } else {
54
+ socket = net.connect(opts);
55
+ }
56
+ return socket;
57
+ });
58
+
59
+ // Everything else works just like normal...
60
+ http.get(parsed, function (res) {
61
+ console.log('"response" event!', res.headers);
62
+ res.pipe(process.stdout);
63
+ });
64
+ ```
65
+
66
+ Returning a Promise or using an `async` function is also supported:
67
+
68
+ ```js
69
+ agent(async function (req, opts) {
70
+ await sleep(1000);
71
+ // etc…
72
+ });
73
+ ```
74
+
75
+ Return another `http.Agent` instance to "pass through" the responsibility
76
+ for that HTTP request to that agent:
77
+
78
+ ```js
79
+ agent(function (req, opts) {
80
+ return opts.secureEndpoint ? https.globalAgent : http.globalAgent;
81
+ });
82
+ ```
83
+
84
+
85
+ API
86
+ ---
87
+
88
+ ## Agent(Function callback[, Object options]) → [http.Agent][]
89
+
90
+ Creates a base `http.Agent` that will execute the callback function `callback`
91
+ for every HTTP request that it is used as the `agent` for. The callback function
92
+ is responsible for creating a `stream.Duplex` instance of some kind that will be
93
+ used as the underlying socket in the HTTP request.
94
+
95
+ The `options` object accepts the following properties:
96
+
97
+ * `timeout` - Number - Timeout for the `callback()` function in milliseconds. Defaults to Infinity (optional).
98
+
99
+ The callback function should have the following signature:
100
+
101
+ ### callback(http.ClientRequest req, Object options, Function cb) → undefined
102
+
103
+ The ClientRequest `req` can be accessed to read request headers and
104
+ and the path, etc. The `options` object contains the options passed
105
+ to the `http.request()`/`https.request()` function call, and is formatted
106
+ to be directly passed to `net.connect()`/`tls.connect()`, or however
107
+ else you want a Socket to be created. Pass the created socket to
108
+ the callback function `cb` once created, and the HTTP request will
109
+ continue to proceed.
110
+
111
+ If the `https` module is used to invoke the HTTP request, then the
112
+ `secureEndpoint` property on `options` _will be set to `true`_.
113
+
114
+
115
+ License
116
+ -------
117
+
118
+ (The MIT License)
119
+
120
+ Copyright (c) 2013 Nathan Rajlich <nathan@tootallnate.net>
121
+
122
+ Permission is hereby granted, free of charge, to any person obtaining
123
+ a copy of this software and associated documentation files (the
124
+ 'Software'), to deal in the Software without restriction, including
125
+ without limitation the rights to use, copy, modify, merge, publish,
126
+ distribute, sublicense, and/or sell copies of the Software, and to
127
+ permit persons to whom the Software is furnished to do so, subject to
128
+ the following conditions:
129
+
130
+ The above copyright notice and this permission notice shall be
131
+ included in all copies or substantial portions of the Software.
132
+
133
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
134
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
135
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
136
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
137
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
138
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
139
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
140
+
141
+ [http-proxy-agent]: https://github.com/TooTallNate/node-http-proxy-agent
142
+ [https-proxy-agent]: https://github.com/TooTallNate/node-https-proxy-agent
143
+ [pac-proxy-agent]: https://github.com/TooTallNate/node-pac-proxy-agent
144
+ [socks-proxy-agent]: https://github.com/TooTallNate/node-socks-proxy-agent
145
+ [http.Agent]: https://nodejs.org/api/http.html#http_class_http_agent
@@ -0,0 +1,78 @@
1
+ /// <reference types="node" />
2
+ import net from 'net';
3
+ import http from 'http';
4
+ import https from 'https';
5
+ import { Duplex } from 'stream';
6
+ import { EventEmitter } from 'events';
7
+ declare function createAgent(opts?: createAgent.AgentOptions): createAgent.Agent;
8
+ declare function createAgent(callback: createAgent.AgentCallback, opts?: createAgent.AgentOptions): createAgent.Agent;
9
+ declare namespace createAgent {
10
+ interface ClientRequest extends http.ClientRequest {
11
+ _last?: boolean;
12
+ _hadError?: boolean;
13
+ method: string;
14
+ }
15
+ interface AgentRequestOptions {
16
+ host?: string;
17
+ path?: string;
18
+ port: number;
19
+ }
20
+ interface HttpRequestOptions extends AgentRequestOptions, Omit<http.RequestOptions, keyof AgentRequestOptions> {
21
+ secureEndpoint: false;
22
+ }
23
+ interface HttpsRequestOptions extends AgentRequestOptions, Omit<https.RequestOptions, keyof AgentRequestOptions> {
24
+ secureEndpoint: true;
25
+ }
26
+ type RequestOptions = HttpRequestOptions | HttpsRequestOptions;
27
+ type AgentLike = Pick<createAgent.Agent, 'addRequest'> | http.Agent;
28
+ type AgentCallbackReturn = Duplex | AgentLike;
29
+ type AgentCallbackCallback = (err?: Error | null, socket?: createAgent.AgentCallbackReturn) => void;
30
+ type AgentCallbackPromise = (req: createAgent.ClientRequest, opts: createAgent.RequestOptions) => createAgent.AgentCallbackReturn | Promise<createAgent.AgentCallbackReturn>;
31
+ type AgentCallback = typeof Agent.prototype.callback;
32
+ type AgentOptions = {
33
+ timeout?: number;
34
+ };
35
+ /**
36
+ * Base `http.Agent` implementation.
37
+ * No pooling/keep-alive is implemented by default.
38
+ *
39
+ * @param {Function} callback
40
+ * @api public
41
+ */
42
+ class Agent extends EventEmitter {
43
+ timeout: number | null;
44
+ maxFreeSockets: number;
45
+ maxTotalSockets: number;
46
+ maxSockets: number;
47
+ sockets: {
48
+ [key: string]: net.Socket[];
49
+ };
50
+ freeSockets: {
51
+ [key: string]: net.Socket[];
52
+ };
53
+ requests: {
54
+ [key: string]: http.IncomingMessage[];
55
+ };
56
+ options: https.AgentOptions;
57
+ private promisifiedCallback?;
58
+ private explicitDefaultPort?;
59
+ private explicitProtocol?;
60
+ constructor(callback?: createAgent.AgentCallback | createAgent.AgentOptions, _opts?: createAgent.AgentOptions);
61
+ get defaultPort(): number;
62
+ set defaultPort(v: number);
63
+ get protocol(): string;
64
+ set protocol(v: string);
65
+ callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions, fn: createAgent.AgentCallbackCallback): void;
66
+ callback(req: createAgent.ClientRequest, opts: createAgent.RequestOptions): createAgent.AgentCallbackReturn | Promise<createAgent.AgentCallbackReturn>;
67
+ /**
68
+ * Called by node-core's "_http_client.js" module when creating
69
+ * a new HTTP request with this Agent instance.
70
+ *
71
+ * @api public
72
+ */
73
+ addRequest(req: ClientRequest, _opts: RequestOptions): void;
74
+ freeSocket(socket: net.Socket, opts: AgentOptions): void;
75
+ destroy(): void;
76
+ }
77
+ }
78
+ export = createAgent;