@openclaw/slack 2026.7.2-beta.1 → 2026.7.2-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 (42) hide show
  1. package/dist/{action-runtime-p6M2ULpv.js → action-runtime-Cee2ih0s.js} +9 -6
  2. package/dist/action-runtime.runtime-DZfd7IFr.js +2 -0
  3. package/dist/{actions-DkTcWmpT.js → actions-BZiuSTIq.js} +4 -8
  4. package/dist/{actions.runtime-BSxpwgUc.js → actions.runtime-DoD0-gxw.js} +1 -1
  5. package/dist/api.js +9 -9
  6. package/dist/{approval-handler.runtime-UGbnz9OC.js → approval-handler.runtime-CUPtIM4k.js} +2 -2
  7. package/dist/{channel-B0_j6C6z.js → channel-DaIiGUOp.js} +20 -18
  8. package/dist/channel-config-api.js +1 -1
  9. package/dist/channel-plugin-api.js +1 -1
  10. package/dist/{channel-type-BpeTezY4.js → channel-type-Cfm6_6n1.js} +2 -2
  11. package/dist/{channel.setup-BQFut21T.js → channel.setup-C-mLz50O.js} +3 -3
  12. package/dist/{client-D2F6m8CP.js → client-WIPAS3Yr.js} +9 -1
  13. package/dist/{config-schema-DYI01PV2.js → config-schema-xPSnK2VK.js} +12 -0
  14. package/dist/{directory-live-DX7yFsM-.js → directory-live-D_yZhjgp.js} +1 -1
  15. package/dist/{group-policy-C-b2ZnSl.js → group-policy-85UWiriS.js} +28 -15
  16. package/dist/{monitor-BN_uuvrQ.js → monitor-CalGciTs.js} +3 -3
  17. package/dist/{outbound-adapter-ECl0go7d.js → outbound-adapter-BiLKcnyH.js} +2 -2
  18. package/dist/{pipeline.runtime-f0eJJoJL.js → pipeline.runtime-DofAvTtb.js} +176 -54
  19. package/dist/{policy-f8b0edSi.js → policy-BVs4LiSa.js} +7 -7
  20. package/dist/{probe-CfALk0l4.js → probe-CN0ssfLN.js} +2 -2
  21. package/dist/{provider-Ds-y-imP.js → provider-CmeoUiIM.js} +282 -47
  22. package/dist/{relay-source-B-6LFUdz.js → relay-source-DMmgtvg4.js} +1 -1
  23. package/dist/{replies-BMvf3ihj.js → replies-CJJCp6qz.js} +3 -3
  24. package/dist/{resolve-channels-DOMgNCWb.js → resolve-channels-Rfts6POK.js} +1 -1
  25. package/dist/{resolve-users-aL6-Ssee.js → resolve-users-y6wAxR8E.js} +1 -1
  26. package/dist/{runtime-CauEvswP.js → runtime-JSVZSWAj.js} +2 -2
  27. package/dist/{runtime-api-CVb6CQjX.js → runtime-api-BGDyOt1D.js} +1 -1
  28. package/dist/runtime-api.js +11 -11
  29. package/dist/runtime-setter-api.js +1 -1
  30. package/dist/{scopes-Dw8wbU0j.js → scopes-CuxNQZ6v.js} +2 -2
  31. package/dist/{send-NEfJ0GvM.js → send-DYp8ca-l.js} +4 -4
  32. package/dist/{send.runtime-BkKpitPu.js → send.runtime-CJLxAt26.js} +1 -1
  33. package/dist/{setup-core-fGd6Gquy.js → setup-core-CkwVLzFO.js} +15 -21
  34. package/dist/setup-plugin-api.js +1 -1
  35. package/dist/{setup-surface-BN2WeG5c.js → setup-surface-oSd3NX9J.js} +4 -4
  36. package/dist/{shared-BLnB9R1T.js → shared-D9yz5Otg.js} +12 -35
  37. package/dist/{slash-dispatch.runtime-C0Otuf_T.js → slash-dispatch.runtime-CSja9VuD.js} +1 -1
  38. package/npm-shrinkwrap.json +3 -3
  39. package/openclaw.plugin.json +68 -0
  40. package/package.json +5 -7
  41. package/dist/action-runtime.runtime-DQstDkHG.js +0 -2
  42. package/dist/configured-state.js +0 -11
@@ -3,7 +3,7 @@ import { t as inspectSlackAccount } from "./account-inspect-Di7ditqZ.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";
6
- import { DEFAULT_ACCOUNT_ID, createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createAllowlistSetupWizardProxy, createEnvPatchedAccountSetupAdapter, createLegacyCompatChannelDmPolicy, createSetupTranslator, createStandardChannelSetupStatus, parseMentionOrPrefixedId, patchChannelConfigForAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
6
+ import { DEFAULT_ACCOUNT_ID, createAccountScopedAllowFromSection, createAccountScopedGroupAccessSection, createAllowlistSetupWizardProxy, createEnvPatchedAccountSetupAdapter, createLegacyCompatChannelDmPolicy, createSetupTranslator, createStandardChannelSetupStatus, defineTokenCredential, parseMentionOrPrefixedId, patchChannelConfigForAccount, setSetupChannelEnabled } from "openclaw/plugin-sdk/setup-runtime";
7
7
  import { formatDocsLink } from "openclaw/plugin-sdk/setup-tools";
8
8
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
9
9
  //#region extensions/slack/src/setup-shared.ts
@@ -169,8 +169,9 @@ function setSlackInteractiveReplies(cfg, accountId, interactiveReplies) {
169
169
  });
170
170
  }
171
171
  function createSlackTokenCredential(params) {
172
- return {
172
+ return defineTokenCredential({
173
173
  inputKey: params.inputKey,
174
+ configKey: params.inputKey,
174
175
  providerHint: params.providerHint,
175
176
  credentialLabel: params.credentialLabel,
176
177
  preferredEnvVar: params.preferredEnvVar,
@@ -178,31 +179,24 @@ function createSlackTokenCredential(params) {
178
179
  keepPrompt: params.keepPrompt,
179
180
  inputPrompt: params.inputPrompt,
180
181
  allowEnv: ({ accountId }) => accountId === DEFAULT_ACCOUNT_ID,
181
- inspect: ({ cfg, accountId }) => {
182
- const resolved = resolveSlackAccount({
183
- cfg,
184
- accountId
185
- });
186
- const configuredValue = params.inputKey === "botToken" ? resolved.config.botToken : resolved.config.appToken;
187
- const resolvedValue = params.inputKey === "botToken" ? resolved.botToken : resolved.appToken;
188
- return {
189
- accountConfigured: Boolean(resolvedValue) || hasConfiguredSecretInput(configuredValue),
190
- hasConfiguredValue: hasConfiguredSecretInput(configuredValue),
191
- resolvedValue: normalizeOptionalString(resolvedValue),
192
- envValue: accountId === DEFAULT_ACCOUNT_ID ? normalizeOptionalString(process.env[params.preferredEnvVar]) : void 0
193
- };
194
- },
195
- applyUseEnv: ({ cfg, accountId }) => enableSlackAccount(cfg, accountId),
196
- applySet: ({ cfg, accountId, value }) => patchChannelConfigForAccount({
182
+ resolveAccount: ({ cfg, accountId }) => resolveSlackAccount({
183
+ cfg,
184
+ accountId
185
+ }),
186
+ resolvedValue: (account) => normalizeOptionalString(params.inputKey === "botToken" ? account.botToken : account.appToken),
187
+ envValue: ({ accountId }) => accountId === DEFAULT_ACCOUNT_ID ? normalizeOptionalString(process.env[params.preferredEnvVar]) : void 0,
188
+ patchAccount: ({ cfg, accountId, mode, patch }) => mode === "env" ? enableSlackAccount(cfg, accountId) : patchChannelConfigForAccount({
197
189
  cfg,
198
190
  channel: SLACK_CHANNEL,
199
191
  accountId,
200
192
  patch: {
201
193
  enabled: true,
202
- [params.inputKey]: value
194
+ ...patch
203
195
  }
204
- })
205
- };
196
+ }),
197
+ useEnv: { clearFields: [] },
198
+ set: {}
199
+ });
206
200
  }
207
201
  const slackSetupAdapter = createEnvPatchedAccountSetupAdapter({
208
202
  channelKey: SLACK_CHANNEL,
@@ -1,2 +1,2 @@
1
- import { t as slackSetupPlugin } from "./channel.setup-BQFut21T.js";
1
+ import { t as slackSetupPlugin } from "./channel.setup-C-mLz50O.js";
2
2
  export { slackSetupPlugin };
@@ -1,8 +1,8 @@
1
1
  import { a as resolveSlackAccount, i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-BOJJiHSr.js";
2
- import "./shared-BLnB9R1T.js";
3
- import { i as SLACK_CHANNEL, t as createSlackSetupWizardBase } from "./setup-core-fGd6Gquy.js";
4
- import { t as resolveSlackChannelAllowlist } from "./resolve-channels-DOMgNCWb.js";
5
- import { t as resolveSlackUserAllowlist } from "./resolve-users-aL6-Ssee.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";
6
6
  import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
7
7
  import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
8
8
  import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, parseMentionOrPrefixedId, promptLegacyChannelAllowFromForAccount, resolveEntriesWithOptionalToken } from "openclaw/plugin-sdk/setup-runtime";
@@ -2,15 +2,15 @@ import { a as resolveSlackAccount, c as resolveSlackConfigAccessorAccount, i as
2
2
  import { t as inspectSlackAccount } from "./account-inspect-Di7ditqZ.js";
3
3
  import { t as isSlackPluginAccountConfigured } from "./account-configured-DzC407uv.js";
4
4
  import { n as isSlackInteractiveRepliesEnabled } from "./interactive-replies-BilWUdcI.js";
5
- import { m as getChatChannelMeta } from "./client-D2F6m8CP.js";
6
- import { i as SLACK_CHANNEL } from "./setup-core-fGd6Gquy.js";
7
- import { t as SlackChannelConfigSchema } from "./config-schema-DYI01PV2.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
8
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-DddfkMlF.js";
9
9
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-CMohXFWS.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";
13
- import { createDangerousNameMatchingMutableAllowlistWarningCollector, createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
13
+ import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, createDangerousNameMatchingMutableAllowlistWarningCollector, createOpenProviderConfiguredRouteWarningCollector } from "openclaw/plugin-sdk/channel-policy";
14
14
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
15
15
  //#region extensions/slack/src/security.ts
16
16
  const resolveSlackDmPolicy = createScopedDmSecurityResolver({
@@ -57,16 +57,7 @@ const slackSecurityAdapter = {
57
57
  };
58
58
  //#endregion
59
59
  //#region extensions/slack/src/security-doctor.ts
60
- function isSlackMutableAllowEntry(raw) {
61
- const text = raw.trim();
62
- if (!text || text === "*") return false;
63
- const mentionMatch = text.match(/^<@([A-Z0-9]+)>$/i);
64
- if (mentionMatch && /^[A-Z0-9]{8,}$/i.test(mentionMatch[1] ?? "")) return false;
65
- const withoutPrefix = text.replace(/^(slack|user):/i, "").trim();
66
- if (/^[UWBCGDT][A-Z0-9]{2,}$/.test(withoutPrefix)) return false;
67
- if (/^[A-Z0-9]{8,}$/i.test(withoutPrefix)) return false;
68
- return true;
69
- }
60
+ const isSlackMutableAllowEntry = buildMutableAllowEntryDetector({ stableIdPattern: /^(?:(?:(?:[sS][lL][aA][cC][kK]|[uU][sS][eE][rR]):)?(?:[UWBCGDT][A-Z0-9]{2,}|[A-Za-z0-9]{8,})|<@[A-Za-z0-9]{8,}>)$/ });
70
61
  //#endregion
71
62
  //#region extensions/slack/src/doctor.ts
72
63
  function asObjectRecord(value) {
@@ -75,27 +66,13 @@ function asObjectRecord(value) {
75
66
  const collectSlackMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
76
67
  channel: "slack",
77
68
  detector: isSlackMutableAllowEntry,
78
- collectLists: (scope) => {
79
- const lists = [{
80
- pathLabel: `${scope.prefix}.allowFrom`,
81
- list: scope.account.allowFrom
82
- }];
83
- const dm = asObjectRecord(scope.account.dm);
84
- if (dm) lists.push({
85
- pathLabel: `${scope.prefix}.dm.allowFrom`,
86
- list: dm.allowFrom
87
- });
88
- const channels = asObjectRecord(scope.account.channels);
89
- if (channels) for (const [channelKey, channelRaw] of Object.entries(channels)) {
90
- const channel = asObjectRecord(channelRaw);
91
- if (!channel) continue;
92
- lists.push({
93
- pathLabel: `${scope.prefix}.channels.${channelKey}.users`,
94
- list: channel.users
95
- });
96
- }
97
- return lists;
98
- }
69
+ collectLists: (scope) => collectStandardAllowlistLists(scope, {
70
+ includeGroupAllowFrom: false,
71
+ includeDm: true,
72
+ includeGroups: true,
73
+ groupsKey: "channels",
74
+ groupField: "users"
75
+ })
99
76
  });
100
77
  const SLACK_CANONICAL_CHANNEL_ID_RE = /^[CG][A-Z0-9]{8,}$/;
101
78
  const SLACK_LOWERCASE_CHANNEL_ID_RE = /^[cg][0-9][a-z0-9]{7,}$/;
@@ -1,4 +1,4 @@
1
- import { r as deliverSlackSlashReplies$1 } from "./replies-BMvf3ihj.js";
1
+ import { r as deliverSlackSlashReplies$1 } from "./replies-CJJCp6qz.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";
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@openclaw/slack",
3
- "version": "2026.7.2-beta.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/slack",
9
- "version": "2026.7.2-beta.1",
9
+ "version": "2026.7.2-beta.2",
10
10
  "dependencies": {
11
11
  "@slack/bolt": "4.7.3",
12
12
  "@slack/types": "2.21.1",
@@ -17,7 +17,7 @@
17
17
  "zod": "4.4.3"
18
18
  },
19
19
  "peerDependencies": {
20
- "openclaw": ">=2026.7.2-beta.1"
20
+ "openclaw": ">=2026.7.2-beta.2"
21
21
  },
22
22
  "peerDependenciesMeta": {
23
23
  "openclaw": {
@@ -1003,6 +1003,20 @@
1003
1003
  },
1004
1004
  "additionalProperties": false
1005
1005
  },
1006
+ "presenceEvents": {
1007
+ "type": "object",
1008
+ "properties": {
1009
+ "mode": {
1010
+ "type": "string",
1011
+ "enum": [
1012
+ "off",
1013
+ "auto",
1014
+ "on"
1015
+ ]
1016
+ }
1017
+ },
1018
+ "additionalProperties": false
1019
+ },
1006
1020
  "actions": {
1007
1021
  "type": "object",
1008
1022
  "properties": {
@@ -1290,6 +1304,20 @@
1290
1304
  },
1291
1305
  "systemPrompt": {
1292
1306
  "type": "string"
1307
+ },
1308
+ "presenceEvents": {
1309
+ "type": "object",
1310
+ "properties": {
1311
+ "mode": {
1312
+ "type": "string",
1313
+ "enum": [
1314
+ "off",
1315
+ "auto",
1316
+ "on"
1317
+ ]
1318
+ }
1319
+ },
1320
+ "additionalProperties": false
1293
1321
  }
1294
1322
  },
1295
1323
  "additionalProperties": false
@@ -2319,6 +2347,20 @@
2319
2347
  },
2320
2348
  "additionalProperties": false
2321
2349
  },
2350
+ "presenceEvents": {
2351
+ "type": "object",
2352
+ "properties": {
2353
+ "mode": {
2354
+ "type": "string",
2355
+ "enum": [
2356
+ "off",
2357
+ "auto",
2358
+ "on"
2359
+ ]
2360
+ }
2361
+ },
2362
+ "additionalProperties": false
2363
+ },
2322
2364
  "actions": {
2323
2365
  "type": "object",
2324
2366
  "properties": {
@@ -2606,6 +2648,20 @@
2606
2648
  },
2607
2649
  "systemPrompt": {
2608
2650
  "type": "string"
2651
+ },
2652
+ "presenceEvents": {
2653
+ "type": "object",
2654
+ "properties": {
2655
+ "mode": {
2656
+ "type": "string",
2657
+ "enum": [
2658
+ "off",
2659
+ "auto",
2660
+ "on"
2661
+ ]
2662
+ }
2663
+ },
2664
+ "additionalProperties": false
2609
2665
  }
2610
2666
  },
2611
2667
  "additionalProperties": false
@@ -2790,6 +2846,18 @@
2790
2846
  "label": "Slack Exec Approvals",
2791
2847
  "help": "Slack-native exec approval routing and approver authorization. When unset, OpenClaw auto-enables DM-first native approvals if approvers can be resolved for this workspace account."
2792
2848
  },
2849
+ "presenceEvents": {
2850
+ "label": "Slack Presence Events",
2851
+ "help": "Poll observed human participants and wake the routed agent on away-to-active transitions. Default: \"off\"."
2852
+ },
2853
+ "presenceEvents.mode": {
2854
+ "label": "Slack Presence Event Mode",
2855
+ "help": "\"off\" disables polling; \"auto\" covers DMs, MPIMs, and recent threads with up to 8 observed people; \"on\" also covers larger threads and top-level channels."
2856
+ },
2857
+ "channels.*.presenceEvents.mode": {
2858
+ "label": "Slack Channel Presence Event Mode",
2859
+ "help": "Override presence events for one Slack channel. Use \"on\" to include large threads or top-level channel sessions."
2860
+ },
2793
2861
  "execApprovals.enabled": {
2794
2862
  "label": "Slack Exec Approvals Enabled",
2795
2863
  "help": "Controls Slack native exec approvals for this account: unset or \"auto\" enables DM-first native approvals when approvers can be resolved, true forces native approvals on, and false disables them."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/slack",
3
- "version": "2026.7.2-beta.1",
3
+ "version": "2026.7.2-beta.2",
4
4
  "description": "OpenClaw Slack channel plugin for channels, DMs, commands, and app events.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@
17
17
  "zod": "4.4.3"
18
18
  },
19
19
  "peerDependencies": {
20
- "openclaw": ">=2026.7.2-beta.1"
20
+ "openclaw": ">=2026.7.2-beta.2"
21
21
  },
22
22
  "peerDependenciesMeta": {
23
23
  "openclaw": {
@@ -50,9 +50,7 @@
50
50
  "SLACK_BOT_TOKEN",
51
51
  "SLACK_USER_TOKEN"
52
52
  ]
53
- },
54
- "specifier": "./configured-state",
55
- "exportName": "hasSlackConfiguredState"
53
+ }
56
54
  }
57
55
  },
58
56
  "install": {
@@ -62,13 +60,13 @@
62
60
  "allowInvalidConfigRecovery": true
63
61
  },
64
62
  "compat": {
65
- "pluginApi": ">=2026.7.2-beta.1"
63
+ "pluginApi": ">=2026.7.2-beta.2"
66
64
  },
67
65
  "startup": {
68
66
  "deferConfiguredChannelFullLoadUntilAfterListen": true
69
67
  },
70
68
  "build": {
71
- "openclawVersion": "2026.7.2-beta.1",
69
+ "openclawVersion": "2026.7.2-beta.2",
72
70
  "bundledDist": false
73
71
  },
74
72
  "release": {
@@ -1,2 +0,0 @@
1
- import { t as handleSlackAction } from "./action-runtime-p6M2ULpv.js";
2
- export { handleSlackAction };
@@ -1,11 +0,0 @@
1
- //#region extensions/slack/configured-state.ts
2
- const SLACK_CONFIGURED_ENV_KEYS = [
3
- "SLACK_APP_TOKEN",
4
- "SLACK_BOT_TOKEN",
5
- "SLACK_USER_TOKEN"
6
- ];
7
- function hasSlackConfiguredState(params) {
8
- return SLACK_CONFIGURED_ENV_KEYS.some((key) => typeof params.env?.[key] === "string" && params.env[key]?.trim().length > 0);
9
- }
10
- //#endregion
11
- export { hasSlackConfiguredState };