@openclaw/slack 2026.7.2-beta.2 → 2026.7.2-beta.4

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 (161) hide show
  1. package/dist/{account-configured-DzC407uv.js → account-configured-BwfXBo_F.js} +1 -1
  2. package/dist/account-inspect-api.js +1 -1
  3. package/dist/{account-inspect-Di7ditqZ.js → account-inspect-jn1xLaVi.js} +9 -2
  4. package/dist/account-reply-mode-DrUXogvO.js +14 -0
  5. package/dist/{accounts-BOJJiHSr.js → accounts-BSr252c_.js} +13 -25
  6. package/dist/accounts.runtime-CjULMLTa.js +2 -0
  7. package/dist/{action-runtime-Cee2ih0s.js → action-runtime-CFU52n4W.js} +11 -17
  8. package/dist/action-runtime.runtime-9-17zvKH.js +2 -0
  9. package/dist/{actions-BZiuSTIq.js → actions-D51foiwR.js} +5 -5
  10. package/dist/{actions.runtime-DoD0-gxw.js → actions.runtime-BMJwtf5C.js} +1 -1
  11. package/dist/api.js +15 -15
  12. package/dist/{approval-handler.runtime-CUPtIM4k.js → approval-handler.runtime-3b4-wxMl.js} +2 -2
  13. package/dist/{channel-DaIiGUOp.js → channel-Ds8NKvfr.js} +75 -41
  14. package/dist/channel-config-api.js +1 -1
  15. package/dist/channel-plugin-api.js +1 -1
  16. package/dist/{channel-type-Cfm6_6n1.js → channel-type-DXkUajFP.js} +3 -3
  17. package/dist/{channel.setup-C-mLz50O.js → channel.setup-DOSTEDfA.js} +8 -5
  18. package/dist/{config-schema-xPSnK2VK.js → config-schema-B4j4tCOI.js} +236 -30
  19. package/dist/{directory-config-DRkFujwG.js → directory-config-B08pm5ZT.js} +1 -1
  20. package/dist/directory-contract-api.js +1 -1
  21. package/dist/{directory-live-D_yZhjgp.js → directory-live-DpPKzPrn.js} +2 -2
  22. package/dist/doctor-contract-U6oVntbM.js +173 -0
  23. package/dist/doctor-contract-api.js +1 -1
  24. package/dist/{group-policy-85UWiriS.js → group-policy-CdnQzQBI.js} +98 -125
  25. package/dist/{interactive-replies-BilWUdcI.js → interactive-replies-C3ffk6oN.js} +1 -1
  26. package/dist/interactive-replies-api.js +1 -1
  27. package/dist/{message-tool-api-CA9jZrCY.js → message-tool-api-ByVyIVOh.js} +3 -3
  28. package/dist/message-tool-api.js +1 -1
  29. package/dist/{monitor-CalGciTs.js → monitor-CnB_WKvF.js} +3 -3
  30. package/dist/{outbound-adapter-BiLKcnyH.js → outbound-adapter-DuPz2HHt.js} +49 -5
  31. package/dist/{pipeline.runtime-DofAvTtb.js → pipeline.runtime-5rRYZuX5.js} +490 -345
  32. package/dist/{policy-BVs4LiSa.js → policy-C31RYSuT.js} +1 -1
  33. package/dist/probe-CVRuArHA.js +340 -0
  34. package/dist/{provider-CmeoUiIM.js → provider-htuIJGFD.js} +791 -359
  35. package/dist/{relay-source-DMmgtvg4.js → relay-source-Df9EaiTF.js} +6 -11
  36. package/dist/{replies-CJJCp6qz.js → replies-Cgr2Gli4.js} +3 -3
  37. package/dist/{resolve-channels-Rfts6POK.js → resolve-channels-DodP2TFx.js} +1 -1
  38. package/dist/{resolve-users-y6wAxR8E.js → resolve-users-M9eF8891.js} +1 -1
  39. package/dist/{runtime-api-BGDyOt1D.js → runtime-api-D5XYMMsf.js} +3 -2
  40. package/dist/runtime-api.js +11 -11
  41. package/dist/{scopes-CuxNQZ6v.js → scopes-CJRpHkDC.js} +1 -2
  42. package/dist/{secret-contract-CMohXFWS.js → secret-contract-DxmvbxBF.js} +1 -0
  43. package/dist/secret-contract-api.js +1 -1
  44. package/dist/{security-audit-CikQhBUY.js → security-audit-Cz6erklv.js} +0 -10
  45. package/dist/security-contract-api.js +1 -1
  46. package/dist/{send-DYp8ca-l.js → send-BZ1tPv7-.js} +28 -11
  47. package/dist/send.runtime-a2pilFor.js +2 -0
  48. package/dist/setup-core-tPxMuFez.js +600 -0
  49. package/dist/setup-plugin-api.js +1 -1
  50. package/dist/{setup-surface-oSd3NX9J.js → setup-surface-wV-S1dE_.js} +58 -32
  51. package/dist/{shared-D9yz5Otg.js → shared-BfMskaMx.js} +57 -10
  52. package/dist/{slash-dispatch.runtime-CSja9VuD.js → slash-dispatch.runtime-lfeIsXTX.js} +1 -1
  53. package/node_modules/@types/node/README.md +1 -1
  54. package/node_modules/@types/node/fs/promises.d.ts +16 -6
  55. package/node_modules/@types/node/package.json +2 -2
  56. package/node_modules/agent-base/README.md +145 -0
  57. package/node_modules/agent-base/dist/src/index.d.ts +78 -0
  58. package/node_modules/agent-base/dist/src/index.js +203 -0
  59. package/node_modules/agent-base/dist/src/index.js.map +1 -0
  60. package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
  61. package/node_modules/agent-base/dist/src/promisify.js +18 -0
  62. package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
  63. package/node_modules/agent-base/package.json +64 -0
  64. package/node_modules/agent-base/src/index.ts +345 -0
  65. package/node_modules/agent-base/src/promisify.ts +33 -0
  66. package/node_modules/axios/CHANGELOG.md +197 -1
  67. package/node_modules/axios/README.md +424 -256
  68. package/node_modules/axios/dist/axios.js +589 -204
  69. package/node_modules/axios/dist/axios.min.js +3 -3
  70. package/node_modules/axios/dist/axios.min.js.map +1 -1
  71. package/node_modules/axios/dist/browser/axios.cjs +630 -185
  72. package/node_modules/axios/dist/esm/axios.js +630 -185
  73. package/node_modules/axios/dist/esm/axios.min.js +2 -2
  74. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  75. package/node_modules/axios/dist/node/axios.cjs +949 -301
  76. package/node_modules/axios/index.d.cts +28 -5
  77. package/node_modules/axios/index.d.ts +24 -3
  78. package/node_modules/axios/lib/adapters/adapters.js +1 -1
  79. package/node_modules/axios/lib/adapters/fetch.js +223 -49
  80. package/node_modules/axios/lib/adapters/http.js +408 -193
  81. package/node_modules/axios/lib/adapters/xhr.js +3 -1
  82. package/node_modules/axios/lib/core/Axios.js +4 -2
  83. package/node_modules/axios/lib/core/AxiosError.js +13 -1
  84. package/node_modules/axios/lib/core/AxiosHeaders.js +13 -42
  85. package/node_modules/axios/lib/core/buildFullPath.js +29 -1
  86. package/node_modules/axios/lib/core/mergeConfig.js +35 -0
  87. package/node_modules/axios/lib/defaults/transitional.js +2 -0
  88. package/node_modules/axios/lib/env/data.js +1 -1
  89. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +1 -3
  90. package/node_modules/axios/lib/helpers/Http2Sessions.js +119 -0
  91. package/node_modules/axios/lib/helpers/buildURL.js +7 -4
  92. package/node_modules/axios/lib/helpers/composeSignals.js +48 -47
  93. package/node_modules/axios/lib/helpers/cookies.js +5 -1
  94. package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
  95. package/node_modules/axios/lib/helpers/formDataToJSON.js +26 -4
  96. package/node_modules/axios/lib/helpers/formDataToStream.js +2 -2
  97. package/node_modules/axios/lib/helpers/fromDataURI.js +20 -5
  98. package/node_modules/axios/lib/helpers/progressEventReducer.js +3 -0
  99. package/node_modules/axios/lib/helpers/resolveConfig.js +26 -13
  100. package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
  101. package/node_modules/axios/lib/helpers/shouldBypassProxy.js +33 -1
  102. package/node_modules/axios/lib/helpers/toFormData.js +48 -12
  103. package/node_modules/axios/lib/helpers/validator.js +1 -1
  104. package/node_modules/axios/lib/utils.js +105 -19
  105. package/node_modules/axios/package.json +31 -13
  106. package/node_modules/https-proxy-agent/README.md +137 -0
  107. package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
  108. package/node_modules/https-proxy-agent/dist/agent.js +177 -0
  109. package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
  110. package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
  111. package/node_modules/https-proxy-agent/dist/index.js +14 -0
  112. package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
  113. package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
  114. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
  115. package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
  116. package/node_modules/https-proxy-agent/package.json +56 -0
  117. package/node_modules/iconv-lite/encodings/sbcs-data.js +2 -0
  118. package/node_modules/iconv-lite/encodings/utf32.js +10 -3
  119. package/node_modules/iconv-lite/package.json +2 -2
  120. package/node_modules/iconv-lite/types/encodings.d.ts +2 -0
  121. package/node_modules/path-to-regexp/Readme.md +3 -3
  122. package/node_modules/path-to-regexp/dist/index.js +135 -158
  123. package/node_modules/path-to-regexp/dist/index.js.map +1 -1
  124. package/node_modules/path-to-regexp/package.json +2 -2
  125. package/node_modules/qs/CHANGELOG.md +11 -0
  126. package/node_modules/qs/dist/qs.js +17 -17
  127. package/node_modules/qs/lib/parse.js +19 -8
  128. package/node_modules/qs/lib/utils.js +47 -8
  129. package/node_modules/qs/package.json +6 -5
  130. package/node_modules/qs/test/parse.js +230 -0
  131. package/node_modules/qs/test/utils.js +194 -0
  132. package/node_modules/typebox/build/compile/validator.d.mts +1 -4
  133. package/node_modules/typebox/build/guard/guard.d.mts +1 -1
  134. package/node_modules/typebox/build/guard/guard.mjs +5 -2
  135. package/node_modules/typebox/build/guard/string.mjs +16 -4
  136. package/node_modules/typebox/build/schema/engine/_functions.mjs +34 -15
  137. package/node_modules/typebox/build/type/action/readonly_object.d.mts +5 -0
  138. package/node_modules/typebox/build/type/action/readonly_object.mjs +8 -0
  139. package/node_modules/typebox/build/typebox.d.mts +1 -1
  140. package/node_modules/typebox/build/typebox.mjs +1 -1
  141. package/node_modules/typebox/package.json +1 -1
  142. package/node_modules/typebox/readme.md +29 -32
  143. package/node_modules/ws/lib/receiver.js +15 -32
  144. package/node_modules/ws/lib/websocket-server.js +4 -4
  145. package/node_modules/ws/lib/websocket.js +4 -4
  146. package/node_modules/ws/package.json +5 -1
  147. package/npm-shrinkwrap.json +54 -27
  148. package/openclaw.plugin.json +1331 -1424
  149. package/package.json +92 -14
  150. package/dist/accounts.runtime-KvftRRek.js +0 -2
  151. package/dist/action-runtime.runtime-DZfd7IFr.js +0 -2
  152. package/dist/client-WIPAS3Yr.js +0 -160
  153. package/dist/config-api-Df9a1B8C.js +0 -3
  154. package/dist/doctor-contract-DddfkMlF.js +0 -134
  155. package/dist/probe-CN0ssfLN.js +0 -48
  156. package/dist/send.runtime-CJLxAt26.js +0 -2
  157. package/dist/setup-core-CkwVLzFO.js +0 -337
  158. package/node_modules/axios/dist/axios.js.map +0 -1
  159. package/node_modules/axios/dist/browser/axios.cjs.map +0 -1
  160. package/node_modules/axios/dist/esm/axios.js.map +0 -1
  161. package/node_modules/axios/dist/node/axios.cjs.map +0 -1
@@ -1,14 +1,18 @@
1
- import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-BOJJiHSr.js";
2
- import "./shared-D9yz5Otg.js";
3
- import { i as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-CkwVLzFO.js";
4
- import { t as resolveSlackChannelAllowlist } from "./resolve-channels-Rfts6POK.js";
5
- import { t as resolveSlackUserAllowlist } from "./resolve-users-y6wAxR8E.js";
1
+ import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-BSr252c_.js";
2
+ import { t as inspectSlackAccount } from "./account-inspect-jn1xLaVi.js";
3
+ import "./shared-BfMskaMx.js";
4
+ import { a as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-tPxMuFez.js";
5
+ import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DodP2TFx.js";
6
+ import { t as resolveSlackUserAllowlist } from "./resolve-users-M9eF8891.js";
6
7
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
7
- import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
8
- import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, parseMentionOrPrefixedId, promptLegacyChannelAllowFromForAccount, resolveEntriesWithOptionalToken } from "openclaw/plugin-sdk/setup-runtime";
8
+ import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, parseMentionOrPrefixedId, patchChannelConfigForAccount, promptResolvedAllowFrom, resolveEntriesWithOptionalToken, resolveSetupAccountId, splitSetupEntries } from "openclaw/plugin-sdk/setup-runtime";
9
9
  import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
10
10
  //#region extensions/slack/src/setup-surface.ts
11
11
  const t = createSetupTranslator();
12
+ function resolveSlackSetupAuth(account, credentialValues) {
13
+ if (account.config.postAs === "user") return credentialValues.userToken || account.userToken;
14
+ return credentialValues.botToken || account.botToken;
15
+ }
12
16
  async function resolveSlackAllowFromEntries(params) {
13
17
  return await resolveEntriesWithOptionalToken({
14
18
  token: params.token,
@@ -36,29 +40,34 @@ async function promptSlackAllowFrom(params) {
36
40
  idPattern: /^[A-Z][A-Z0-9]+$/i,
37
41
  normalizeId: (id) => id.toUpperCase()
38
42
  });
39
- return await promptLegacyChannelAllowFromForAccount({
43
+ const accountId = resolveSetupAccountId({
44
+ accountId: params.accountId,
45
+ defaultAccountId: resolveDefaultSlackAccountId(params.cfg)
46
+ });
47
+ const account = inspectSlackAccount({
40
48
  cfg: params.cfg,
41
- channel: SLACK_CHANNEL,
49
+ accountId
50
+ });
51
+ const noteTitle = t("wizard.slack.allowlistTitle");
52
+ await params.prompter.note([
53
+ t("wizard.slack.allowlistIntro"),
54
+ t("wizard.slack.examples"),
55
+ "- U12345678",
56
+ "- @alice",
57
+ t("wizard.slack.multipleEntries"),
58
+ t("wizard.channels.docs", { link: formatDocsLink("/slack", "slack") })
59
+ ].join("\n"), noteTitle);
60
+ const allowFrom = await promptResolvedAllowFrom({
42
61
  prompter: params.prompter,
43
- accountId: params.accountId,
44
- defaultAccountId: resolveDefaultSlackAccountId(params.cfg),
45
- resolveAccount: adaptScopedAccountAccessor(resolveSlackAccount),
46
- resolveExisting: (account, cfg) => resolveSlackAccountAllowFrom({
47
- cfg,
48
- accountId: account.accountId
62
+ existing: resolveSlackAccountAllowFrom({
63
+ cfg: params.cfg,
64
+ accountId
49
65
  }) ?? [],
50
- resolveToken: (account) => account.userToken ?? account.botToken ?? "",
51
- noteTitle: t("wizard.slack.allowlistTitle"),
52
- noteLines: [
53
- t("wizard.slack.allowlistIntro"),
54
- t("wizard.slack.examples"),
55
- "- U12345678",
56
- "- @alice",
57
- t("wizard.slack.multipleEntries"),
58
- t("wizard.channels.docs", { link: formatDocsLink("/slack", "slack") })
59
- ],
66
+ token: account.userToken ?? account.botToken ?? "",
60
67
  message: t("wizard.slack.allowFromPrompt"),
61
68
  placeholder: "@alice, U12345678",
69
+ label: noteTitle,
70
+ parseInputs: splitSetupEntries,
62
71
  parseId,
63
72
  invalidWithoutTokenNote: t("wizard.slack.allowFromInvalidWithoutToken"),
64
73
  resolveEntries: async ({ token, entries }) => (await resolveSlackUserAllowlist({
@@ -70,16 +79,28 @@ async function promptSlackAllowFrom(params) {
70
79
  id: entry.id ?? null
71
80
  }))
72
81
  });
82
+ return patchChannelConfigForAccount({
83
+ cfg: params.cfg,
84
+ channel: SLACK_CHANNEL,
85
+ accountId: account.accountId,
86
+ patch: {
87
+ allowFrom,
88
+ dm: {
89
+ ...account.config.dm,
90
+ enabled: typeof account.config.dm?.enabled === "boolean" ? account.config.dm.enabled : true
91
+ }
92
+ }
93
+ });
73
94
  }
74
95
  async function resolveSlackGroupAllowlist(params) {
75
96
  let keys = params.entries;
76
- const activeBotToken = resolveSlackAccount({
97
+ const auth = resolveSlackSetupAuth(inspectSlackAccount({
77
98
  cfg: params.cfg,
78
99
  accountId: params.accountId
79
- }).botToken || params.credentialValues.botToken || "";
100
+ }), params.credentialValues) || "";
80
101
  if (params.entries.length > 0) try {
81
102
  const resolved = await resolveEntriesWithOptionalToken({
82
- token: activeBotToken,
103
+ token: auth,
83
104
  entries: params.entries,
84
105
  buildWithoutToken: (input) => ({
85
106
  input,
@@ -114,10 +135,15 @@ async function resolveSlackGroupAllowlist(params) {
114
135
  }
115
136
  const slackSetupWizard = createSlackSetupWizardBase({
116
137
  promptAllowFrom: promptSlackAllowFrom,
117
- resolveAllowFromEntries: async ({ credentialValues, entries }) => await resolveSlackAllowFromEntries({
118
- token: credentialValues.botToken,
119
- entries
120
- }),
138
+ resolveAllowFromEntries: async ({ cfg, accountId, credentialValues, entries }) => {
139
+ return await resolveSlackAllowFromEntries({
140
+ token: resolveSlackSetupAuth(inspectSlackAccount({
141
+ cfg,
142
+ accountId
143
+ }), credentialValues),
144
+ entries
145
+ });
146
+ },
121
147
  resolveGroupAllowlist: async ({ cfg, accountId, credentialValues, entries, prompter }) => await resolveSlackGroupAllowlist({
122
148
  cfg,
123
149
  accountId,
@@ -1,12 +1,12 @@
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-BOJJiHSr.js";
2
- import { t as inspectSlackAccount } from "./account-inspect-Di7ditqZ.js";
3
- import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
4
- import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-BilWUdcI.js";
5
- import { h as getChatChannelMeta } from "./client-WIPAS3Yr.js";
6
- import { i as SLACK_CHANNEL } from "./setup-core-CkwVLzFO.js";
7
- import { t as SlackChannelConfigSchema } from "./config-schema-xPSnK2VK.js";
8
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DddfkMlF.js";
9
- import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CMohXFWS.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-BSr252c_.js";
2
+ import { t as inspectSlackAccount } from "./account-inspect-jn1xLaVi.js";
3
+ import { t as isSlackPluginAccountConfigured } from "./account-configured-BwfXBo_F.js";
4
+ import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-C3ffk6oN.js";
5
+ import { t as probeSlack, v as getChatChannelMeta } from "./probe-CVRuArHA.js";
6
+ import { a as SLACK_CHANNEL } from "./setup-core-tPxMuFez.js";
7
+ import { t as SlackChannelConfigSchema } from "./config-schema-B4j4tCOI.js";
8
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-U6oVntbM.js";
9
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DxmvbxBF.js";
10
10
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
11
11
  import { createLazyRuntimeModule } from "openclaw/plugin-sdk/lazy-runtime";
12
12
  import { formatAllowFromLowercase } from "openclaw/plugin-sdk/allow-from";
@@ -46,7 +46,7 @@ const collectSlackSecurityWarnings = createOpenProviderConfiguredRouteWarningCol
46
46
  remediation: "Set channels.slack.groupPolicy=\"allowlist\" and configure channels.slack.channels"
47
47
  }
48
48
  });
49
- const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-CikQhBUY.js").then((n) => n.n));
49
+ const loadSlackSecurityAuditModule = createLazyRuntimeModule(() => import("./security-audit-Cz6erklv.js").then((n) => n.n));
50
50
  const slackSecurityAdapter = {
51
51
  resolveDmPolicy: resolveSlackDmPolicy,
52
52
  collectWarnings: collectSlackSecurityWarnings,
@@ -135,6 +135,46 @@ function collectSlackNameKeyedChannelWarnings({ cfg }) {
135
135
  }
136
136
  return [...warnings];
137
137
  }
138
+ function slackAccountConfigPath(accountId) {
139
+ return accountId === "default" ? "channels.slack" : `channels.slack.accounts.${accountId}`;
140
+ }
141
+ async function collectSlackUserIdentityWarnings(params) {
142
+ const warnings = [];
143
+ for (const accountId of listSlackAccountIds(params.cfg)) {
144
+ const account = inspectSlackAccount({
145
+ cfg: params.cfg,
146
+ accountId,
147
+ envBotToken: params.env?.SLACK_BOT_TOKEN,
148
+ envAppToken: params.env?.SLACK_APP_TOKEN,
149
+ envUserToken: params.env?.SLACK_USER_TOKEN
150
+ });
151
+ if (!account.enabled || account.identity !== "user") continue;
152
+ const path = slackAccountConfigPath(accountId);
153
+ const mode = account.mode ?? "socket";
154
+ if (mode === "socket" && account.appTokenStatus === "missing") warnings.push(`- ${path}: identity "user" in Socket Mode requires appToken for companion-app events.`);
155
+ else if (mode === "http" && account.signingSecretStatus === "missing") warnings.push(`- ${path}: identity "user" in HTTP mode requires signingSecret for companion-app events.`);
156
+ if (!account.userToken) {
157
+ warnings.push(account.userTokenStatus === "configured_unavailable" ? `- ${path}: userToken is configured but unavailable; Slack auth.test validation was skipped.` : `- ${path}: identity "user" requires userToken for the authorizing human.`);
158
+ continue;
159
+ }
160
+ const probe = await probeSlack(account.userToken, 2500, {
161
+ accountId,
162
+ identity: "user"
163
+ });
164
+ if (!probe.ok) {
165
+ warnings.push(`- ${path}: userToken auth.test failed: ${probe.error ?? "unknown error"}.`);
166
+ continue;
167
+ }
168
+ const userId = probe.user?.id?.trim();
169
+ const userName = probe.user?.name?.trim();
170
+ if (!userId) {
171
+ warnings.push(`- ${path}: userToken auth.test succeeded but returned no human user_id.`);
172
+ continue;
173
+ }
174
+ warnings.push(`- ${path}: user identity authenticated as ${userName ? `@${userName} ` : ""}(${userId}).`);
175
+ }
176
+ return warnings;
177
+ }
138
178
  const slackDoctor = {
139
179
  dmAllowFromMode: "topOnly",
140
180
  groupModel: "route",
@@ -142,6 +182,10 @@ const slackDoctor = {
142
182
  warnOnEmptyGroupSenderAllowlist: false,
143
183
  legacyConfigRules,
144
184
  normalizeCompatibilityConfig,
185
+ collectPreviewWarnings: async ({ cfg, env }) => await collectSlackUserIdentityWarnings({
186
+ cfg,
187
+ env
188
+ }),
145
189
  collectMutableAllowlistWarnings: ({ cfg }) => [...collectSlackMutableAllowlistWarnings({ cfg }), ...collectSlackNameKeyedChannelWarnings({ cfg })]
146
190
  };
147
191
  //#endregion
@@ -156,6 +200,8 @@ const slackConfigAdapter = createScopedChannelConfigAdapter({
156
200
  clearBaseFields: [
157
201
  "botToken",
158
202
  "appToken",
203
+ "userToken",
204
+ "signingSecret",
159
205
  "name"
160
206
  ],
161
207
  resolveAllowFrom: (account) => account.allowFrom,
@@ -170,6 +216,7 @@ function createSlackPluginBase(params) {
170
216
  preferSessionLookupForAnnounceTarget: true
171
217
  },
172
218
  setupWizard: params.setupWizard,
219
+ ...params.setupContract ? { setupContract: params.setupContract } : {},
173
220
  capabilities: {
174
221
  chatTypes: [
175
222
  "direct",
@@ -1,4 +1,4 @@
1
- import { r as deliverSlackSlashReplies$1 } from "./replies-CJJCp6qz.js";
1
+ import { r as deliverSlackSlashReplies$1 } from "./replies-Cgr2Gli4.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";
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Wed, 01 Jul 2026 11:03:38 GMT
11
+ * Last updated: Wed, 08 Jul 2026 06:47:45 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -153,7 +153,11 @@ declare module "node:fs/promises" {
153
153
  * @return Fulfills with `undefined` upon success.
154
154
  */
155
155
  appendFile(
156
- data: string | Uint8Array,
156
+ data:
157
+ | string
158
+ | NodeJS.ArrayBufferView
159
+ | Iterable<string | NodeJS.ArrayBufferView>
160
+ | AsyncIterable<string | NodeJS.ArrayBufferView>,
157
161
  options?:
158
162
  | (ObjectEncodingOptions & Abortable)
159
163
  | BufferEncoding
@@ -470,7 +474,11 @@ declare module "node:fs/promises" {
470
474
  * @since v10.0.0
471
475
  */
472
476
  writeFile(
473
- data: string | Uint8Array,
477
+ data:
478
+ | string
479
+ | NodeJS.ArrayBufferView
480
+ | Iterable<string | NodeJS.ArrayBufferView>
481
+ | AsyncIterable<string | NodeJS.ArrayBufferView>,
474
482
  options?:
475
483
  | (ObjectEncodingOptions & Abortable)
476
484
  | BufferEncoding
@@ -1208,8 +1216,7 @@ declare module "node:fs/promises" {
1208
1216
  | string
1209
1217
  | NodeJS.ArrayBufferView
1210
1218
  | Iterable<string | NodeJS.ArrayBufferView>
1211
- | AsyncIterable<string | NodeJS.ArrayBufferView>
1212
- | Stream,
1219
+ | AsyncIterable<string | NodeJS.ArrayBufferView>,
1213
1220
  options?:
1214
1221
  | (ObjectEncodingOptions & {
1215
1222
  mode?: Mode | undefined;
@@ -1240,7 +1247,11 @@ declare module "node:fs/promises" {
1240
1247
  */
1241
1248
  function appendFile(
1242
1249
  path: PathLike | FileHandle,
1243
- data: string | Uint8Array,
1250
+ data:
1251
+ | string
1252
+ | NodeJS.ArrayBufferView
1253
+ | Iterable<string | NodeJS.ArrayBufferView>
1254
+ | AsyncIterable<string | NodeJS.ArrayBufferView>,
1244
1255
  options?: (ObjectEncodingOptions & FlagAndOpenMode & { flush?: boolean | undefined }) | BufferEncoding | null,
1245
1256
  ): Promise<void>;
1246
1257
  /**
@@ -1432,7 +1443,6 @@ declare module "node:fs/promises" {
1432
1443
  * When copying a directory to another directory, globs are not supported and
1433
1444
  * behavior is similar to `cp dir1/ dir2/`.
1434
1445
  * @since v16.7.0
1435
- * @experimental
1436
1446
  * @param src source path to copy.
1437
1447
  * @param dest destination path to copy to.
1438
1448
  * @return Fulfills with `undefined` upon success.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "26.1.0",
3
+ "version": "26.1.1",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -150,6 +150,6 @@
150
150
  "undici-types": "~8.3.0"
151
151
  },
152
152
  "peerDependencies": {},
153
- "typesPublisherContentHash": "bac6fe2369bbd2e0f2cf6643373e8c398ed66b886a72749c8d1fb0b9b60031ab",
153
+ "typesPublisherContentHash": "a59119b073061829bc67a5bf6bc2b8ecb0a5a6196058e3c73172a00440f4e16d",
154
154
  "typeScriptVersion": "5.6"
155
155
  }
@@ -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 &lt;nathan@tootallnate.net&gt;
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;