@openclaw/slack 2026.9.8 → 2026.10.1-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.
- package/dist/.setup/{account-inspect-DWBXpER6.mjs → account-inspect-Cs-7DXXW.mjs} +1 -1
- package/dist/.setup/{accounts-D_N9IqNA.mjs → accounts-CDgkV7Cm.mjs} +4 -16
- package/dist/.setup/{action-runtime-DfWvuiZd.mjs → action-runtime-DJ1daRAZ.mjs} +5 -7
- package/dist/.setup/action-runtime.runtime-CdWL2mLC.mjs +2 -0
- package/dist/.setup/{actions-Df0CzcDl.mjs → actions-DDoAJnrH.mjs} +16 -35
- package/dist/.setup/{approval-handler.runtime-Ed6Sw5VK.mjs → approval-handler.runtime-BcE_shWc.mjs} +5 -5
- package/dist/.setup/{approval-message-updates-BadvtA7R.mjs → approval-message-updates-EgKGmFXx.mjs} +1 -1
- package/dist/.setup/{channel-C7bgPSTE.mjs → channel-DgKSu8Iv.mjs} +46 -48
- package/dist/.setup/{channel-type-ClOttrZ5.mjs → channel-type-B9zYYzBU.mjs} +4 -4
- package/dist/.setup/{channel.setup-Dh2jzAjN.mjs → channel.setup-BYIlwbQ7.mjs} +27 -27
- package/dist/.setup/{config-schema-BZCxmHKG.mjs → config-schema-BH0K9-Um.mjs} +4 -0
- package/dist/.setup/{directory-config-BOUWH3hR.mjs → directory-config-B_by7zrc.mjs} +2 -2
- package/dist/.setup/{directory-live-B2O4B_Ho.mjs → directory-live-C48wazJt.mjs} +3 -3
- package/dist/.setup/{doctor-contract-CRN1Z_c7.mjs → doctor-contract-Cd4-VzIM.mjs} +28 -28
- package/dist/.setup/{message-tool-api-Cu4lwlGy.mjs → message-tool-api-CcjLPN3v.mjs} +2 -2
- package/dist/.setup/{monitor-BPVfkumU.mjs → monitor-BuYBDmm7.mjs} +190 -315
- package/dist/.setup/{outbound-adapter-Bv48XUjq.mjs → outbound-adapter-BZFkK-mw.mjs} +6 -17
- package/dist/.setup/{pipeline.runtime-B1H63Frf.mjs → pipeline.runtime-CIepKmZt.mjs} +241 -247
- package/dist/.setup/{policy-D-jfM174.mjs → policy-KKTqEiDv.mjs} +12 -22
- package/dist/.setup/{probe-B2Y9qc_z.mjs → probe-BVlJ3dp0.mjs} +4 -7
- package/dist/.setup/{relay-source-BpKdjsll.mjs → relay-source-CC3h6M7y.mjs} +2 -2
- package/dist/.setup/{replies-BAnUtr2f.mjs → replies-DHbuthIR.mjs} +12 -26
- package/dist/.setup/{reply-blocks-SE1kTE3I.mjs → reply-blocks-CKnO4BSG.mjs} +4 -29
- package/dist/.setup/{resolve-channels-XXBn8UU_.mjs → resolve-channels-HR0TgArR.mjs} +2 -2
- package/dist/.setup/{resolve-users-DW0ngD03.mjs → resolve-users-BNYBhF0q.mjs} +4 -4
- package/dist/.setup/rolldown-runtime-B4FMCO8f.mjs +28 -0
- package/dist/.setup/{scopes-CasuDvaa.mjs → scopes-DrDbyUH2.mjs} +1 -1
- package/dist/.setup/secret-contract-B-Qm6aQQ.mjs +65 -0
- package/dist/.setup/{secret-contract-api-Dp6290Vg.mjs → secret-contract-api-DmUVxIRs.mjs} +1 -1
- package/dist/.setup/{security-audit-BqDc-6VL.mjs → security-audit-C1nOGzJa.mjs} +1 -1
- package/dist/.setup/{send-BOVLQi3n.mjs → send-CgPI3Zj8.mjs} +22 -53
- package/dist/.setup/{session-status-DscajIsd.mjs → session-status-D46GHwOV.mjs} +39 -49
- package/dist/.setup/{setup-plugin-api-DTtbTKNk.mjs → setup-plugin-api-ZrHs0N4U.mjs} +1 -1
- package/dist/.setup/{setup-surface-Dn7QgWRE.mjs → setup-surface-83lxvE2y.mjs} +10 -13
- package/dist/.setup/{shared-qau-uDGl.mjs → shared-VtmYNj-v.mjs} +53 -57
- package/dist/.setup/{slash-dispatch.runtime--AEzLVBF.mjs → slash-dispatch.runtime-gBj_uaLM.mjs} +1 -1
- package/dist/account-inspect-api.js +1 -1
- package/dist/api.js +13 -13
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/control-ui/2f4b1e827be6b68ced2ea0d8b7da8529a4eafbe72be27ee37e1064bdd530ec10/index.js +1 -0
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/runtime-api.js +10 -10
- package/dist/secret-contract-api.js +1 -1
- package/dist/security-contract-api.js +1 -1
- package/dist/setup-entry.js +2 -2
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/undici/README.md +10 -1
- package/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +9 -0
- package/node_modules/undici/docs/docs/api/Errors.md +25 -0
- package/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/undici/docs/docs/api/Interceptors.md +4 -3
- package/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/undici/docs/docs/index.md +10 -1
- package/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/undici/lib/core/request.js +23 -2
- package/node_modules/undici/lib/core/util.js +0 -39
- package/node_modules/undici/lib/dispatcher/client-h1.js +11 -4
- package/node_modules/undici/lib/dispatcher/client-h2.js +52 -8
- package/node_modules/undici/lib/dispatcher/client.js +6 -1
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
- package/node_modules/undici/lib/dispatcher/pool-base.js +63 -2
- package/node_modules/undici/lib/dispatcher/pool.js +90 -7
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +16 -3
- package/node_modules/undici/lib/handler/deduplication-handler.js +24 -11
- package/node_modules/undici/lib/handler/redirect-handler.js +5 -0
- package/node_modules/undici/lib/handler/retry-handler.js +72 -13
- package/node_modules/undici/lib/interceptor/cache.js +4 -1
- package/node_modules/undici/lib/interceptor/decompress.js +236 -69
- package/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/undici/lib/web/cookies/util.js +3 -1
- package/node_modules/undici/lib/web/eventsource/eventsource.js +25 -1
- package/node_modules/undici/lib/web/fetch/body.js +22 -15
- package/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/undici/lib/web/fetch/headers.js +34 -31
- package/node_modules/undici/lib/web/fetch/index.js +46 -25
- package/node_modules/undici/lib/web/fetch/request.js +74 -79
- package/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/undici/lib/web/fetch/util.js +7 -7
- package/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/undici/lib/web/webidl/index.js +2 -14
- package/node_modules/undici/lib/web/websocket/connection.js +33 -12
- package/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/undici/lib/web/websocket/receiver.js +2 -0
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
- package/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/diagnostics-channel.d.ts +2 -1
- package/node_modules/undici/types/interceptors.d.ts +1 -1
- package/node_modules/undici/types/webidl.d.ts +13 -7
- package/openclaw.plugin.json +4 -1
- package/package.json +14 -6
- package/dist/.setup/action-runtime.runtime-Ck4bAWOX.mjs +0 -2
- package/dist/.setup/secret-contract-BaZcu6P_.mjs +0 -82
- package/dist/.setup/streaming-compat-C5Wut626.mjs +0 -62
|
@@ -248,13 +248,22 @@ type WebidlIsFunction<T> = (arg: any) => arg is T
|
|
|
248
248
|
interface WebidlIs {
|
|
249
249
|
Request: WebidlIsFunction<undici.Request>
|
|
250
250
|
Response: WebidlIsFunction<undici.Response>
|
|
251
|
+
Headers: WebidlIsFunction<undici.Headers>
|
|
252
|
+
FormData: WebidlIsFunction<undici.FormData>
|
|
253
|
+
WebSocket: WebidlIsFunction<undici.WebSocket>
|
|
254
|
+
WebSocketError: WebidlIsFunction<undici.WebSocketError>
|
|
255
|
+
Cache: WebidlIsFunction<undici.Cache>
|
|
256
|
+
CacheStorage: WebidlIsFunction<undici.CacheStorage>
|
|
257
|
+
EventSource: WebidlIsFunction<undici.EventSource>
|
|
258
|
+
MessageEvent: WebidlIsFunction<undici.MessageEvent>
|
|
259
|
+
CloseEvent: WebidlIsFunction<undici.CloseEvent>
|
|
260
|
+
ErrorEvent: WebidlIsFunction<undici.ErrorEvent>
|
|
261
|
+
|
|
251
262
|
ReadableStream: WebidlIsFunction<ReadableStream>
|
|
252
263
|
Blob: WebidlIsFunction<Blob>
|
|
253
264
|
URLSearchParams: WebidlIsFunction<URLSearchParams>
|
|
254
265
|
File: WebidlIsFunction<File>
|
|
255
|
-
FormData: WebidlIsFunction<undici.FormData>
|
|
256
266
|
URL: WebidlIsFunction<URL>
|
|
257
|
-
WebSocketError: WebidlIsFunction<undici.WebSocketError>
|
|
258
267
|
AbortSignal: WebidlIsFunction<AbortSignal>
|
|
259
268
|
MessagePort: WebidlIsFunction<MessagePort>
|
|
260
269
|
USVString: WebidlIsFunction<string>
|
|
@@ -272,12 +281,9 @@ export interface Webidl {
|
|
|
272
281
|
attributes: WebIDLExtendedAttributes
|
|
273
282
|
|
|
274
283
|
/**
|
|
275
|
-
* @description Performs a brand-check on {@param V}
|
|
276
|
-
* {@param cls} object.
|
|
284
|
+
* @description Performs a brand-check on {@param V}.
|
|
277
285
|
*/
|
|
278
|
-
brandCheck <
|
|
279
|
-
|
|
280
|
-
brandCheckMultiple <Interfaces extends (new () => unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number]
|
|
286
|
+
brandCheck <T>(V: unknown, assertion: WebidlIsFunction<T>): asserts V is T
|
|
281
287
|
|
|
282
288
|
/**
|
|
283
289
|
* @see https://webidl.spec.whatwg.org/#es-sequence
|
package/openclaw.plugin.json
CHANGED
|
@@ -2984,7 +2984,7 @@
|
|
|
2984
2984
|
},
|
|
2985
2985
|
"streaming.progress.toolProgress": {
|
|
2986
2986
|
"label": "Slack Progress Tool Lines",
|
|
2987
|
-
"help": "Show individual tool activity, including intermediate failures, in progress drafts (default: false).
|
|
2987
|
+
"help": "Show individual tool activity, including intermediate failures, in progress drafts (default: false). Native cards add a task row per tool call. Block Kit cards add tool activity, the plan checklist, and tool/file/time totals while working; finished cards retain only file diff totals. Default Block Kit cards show commentary and text, approval requests, and available session links. Failed turns show a plain Failed line on the Block Kit card, even without an error reply."
|
|
2988
2988
|
},
|
|
2989
2989
|
"streaming.progress.commandText": {
|
|
2990
2990
|
"label": "Slack Progress Command Text",
|
|
@@ -3113,5 +3113,8 @@
|
|
|
3113
3113
|
"type": "object",
|
|
3114
3114
|
"additionalProperties": false,
|
|
3115
3115
|
"properties": {}
|
|
3116
|
+
},
|
|
3117
|
+
"controlUi": {
|
|
3118
|
+
"entry": "dist/control-ui/2f4b1e827be6b68ced2ea0d8b7da8529a4eafbe72be27ee37e1064bdd530ec10/index.js"
|
|
3116
3119
|
}
|
|
3117
3120
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/slack",
|
|
3
|
-
"version": "2026.
|
|
3
|
+
"version": "2026.10.1-beta.2",
|
|
4
4
|
"description": "OpenClaw Slack channel plugin for channels, DMs, commands, and app events.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"@slack/web-api": "8.1.1",
|
|
14
14
|
"get-east-asian-width": "1.7.0",
|
|
15
15
|
"typebox": "1.3.34",
|
|
16
|
-
"undici": "8.
|
|
16
|
+
"undici": "8.11.2",
|
|
17
17
|
"zod": "4.6.5"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"openclaw": ">=2026.
|
|
20
|
+
"openclaw": ">=2026.10.1-beta.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependenciesMeta": {
|
|
23
23
|
"openclaw": {
|
|
@@ -146,20 +146,28 @@
|
|
|
146
146
|
"clawhubSpec": "clawhub:@openclaw/slack",
|
|
147
147
|
"npmSpec": "@openclaw/slack",
|
|
148
148
|
"defaultChoice": "npm",
|
|
149
|
-
"minHostVersion": ">=2026.
|
|
149
|
+
"minHostVersion": ">=2026.9.8",
|
|
150
150
|
"allowInvalidConfigRecovery": true
|
|
151
151
|
},
|
|
152
152
|
"compat": {
|
|
153
|
-
"pluginApi": ">=2026.
|
|
153
|
+
"pluginApi": ">=2026.10.1-beta.2"
|
|
154
154
|
},
|
|
155
155
|
"build": {
|
|
156
|
-
"openclawVersion": "2026.
|
|
156
|
+
"openclawVersion": "2026.10.1-beta.2",
|
|
157
157
|
"bundledDist": false
|
|
158
158
|
},
|
|
159
159
|
"release": {
|
|
160
160
|
"publishToClawHub": true,
|
|
161
161
|
"publishToNpm": true
|
|
162
162
|
},
|
|
163
|
+
"controlUi": "./browser/index.ts",
|
|
164
|
+
"assetScripts": {
|
|
165
|
+
"build": "cd ../.. && node --import ./scripts/tsx.mjs scripts/build-plugin-control-ui.mts extensions/slack",
|
|
166
|
+
"copy": "cd ../.. && node --import ./scripts/tsx.mjs scripts/build-plugin-control-ui.mts extensions/slack --copy",
|
|
167
|
+
"buildOutputs": [
|
|
168
|
+
"openclaw.plugin.json"
|
|
169
|
+
]
|
|
170
|
+
},
|
|
163
171
|
"runtimeExtensions": [
|
|
164
172
|
"./dist/index.js"
|
|
165
173
|
],
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { collectConditionalChannelFieldAssignments, collectNestedChannelFieldAssignments, collectSimpleChannelFieldAssignments, createChannelSecretTargetRegistryEntries, getChannelSurface, hasOwnProperty } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
2
|
-
//#region extensions/slack/src/secret-contract.ts
|
|
3
|
-
const secretTargetRegistryEntries = createChannelSecretTargetRegistryEntries({
|
|
4
|
-
channelKey: "slack",
|
|
5
|
-
account: [
|
|
6
|
-
"appToken",
|
|
7
|
-
"relay.authToken",
|
|
8
|
-
"botToken",
|
|
9
|
-
"signingSecret",
|
|
10
|
-
"userToken"
|
|
11
|
-
],
|
|
12
|
-
channel: [
|
|
13
|
-
"appToken",
|
|
14
|
-
"botToken",
|
|
15
|
-
"relay.authToken",
|
|
16
|
-
"signingSecret",
|
|
17
|
-
"userToken"
|
|
18
|
-
]
|
|
19
|
-
});
|
|
20
|
-
function collectRuntimeConfigAssignments(params) {
|
|
21
|
-
const resolved = getChannelSurface(params.config, "slack");
|
|
22
|
-
if (!resolved) return;
|
|
23
|
-
const { channel: slack, surface } = resolved;
|
|
24
|
-
const resolveMode = (value) => value === "http" || value === "socket" || value === "relay" ? value : void 0;
|
|
25
|
-
const baseMode = resolveMode(slack.mode) ?? "socket";
|
|
26
|
-
for (const field of ["botToken", "userToken"]) collectSimpleChannelFieldAssignments({
|
|
27
|
-
channelKey: "slack",
|
|
28
|
-
field,
|
|
29
|
-
channel: slack,
|
|
30
|
-
surface,
|
|
31
|
-
defaults: params.defaults,
|
|
32
|
-
context: params.context,
|
|
33
|
-
topInactiveReason: `no enabled account inherits this top-level Slack ${field}.`,
|
|
34
|
-
accountInactiveReason: "Slack account is disabled."
|
|
35
|
-
});
|
|
36
|
-
const resolveAccountMode = (account) => resolveMode(account.mode) ?? baseMode;
|
|
37
|
-
const hasNestedAuthTokenOverride = (account) => {
|
|
38
|
-
const relay = account.relay;
|
|
39
|
-
return relay !== null && typeof relay === "object" && !Array.isArray(relay) && hasOwnProperty(relay, "authToken");
|
|
40
|
-
};
|
|
41
|
-
for (const [field, mode, label] of [[
|
|
42
|
-
"appToken",
|
|
43
|
-
"socket",
|
|
44
|
-
"socket"
|
|
45
|
-
], [
|
|
46
|
-
"signingSecret",
|
|
47
|
-
"http",
|
|
48
|
-
"HTTP"
|
|
49
|
-
]]) collectConditionalChannelFieldAssignments({
|
|
50
|
-
channelKey: "slack",
|
|
51
|
-
field,
|
|
52
|
-
channel: slack,
|
|
53
|
-
surface,
|
|
54
|
-
defaults: params.defaults,
|
|
55
|
-
context: params.context,
|
|
56
|
-
topLevelActiveWithoutAccounts: baseMode === mode,
|
|
57
|
-
topLevelInheritedAccountActive: ({ account, enabled }) => enabled && !hasOwnProperty(account, field) && resolveAccountMode(account) === mode,
|
|
58
|
-
accountActive: ({ account, enabled }) => enabled && resolveAccountMode(account) === mode,
|
|
59
|
-
topInactiveReason: `no enabled Slack ${label}-mode surface inherits this top-level ${field}.`,
|
|
60
|
-
accountInactiveReason: `Slack account is disabled or not running in ${label} mode.`
|
|
61
|
-
});
|
|
62
|
-
collectNestedChannelFieldAssignments({
|
|
63
|
-
channelKey: "slack",
|
|
64
|
-
nestedKey: "relay",
|
|
65
|
-
field: "authToken",
|
|
66
|
-
channel: slack,
|
|
67
|
-
surface,
|
|
68
|
-
defaults: params.defaults,
|
|
69
|
-
context: params.context,
|
|
70
|
-
topLevelActive: surface.channelEnabled && (!surface.hasExplicitAccounts && baseMode === "relay" || surface.accounts.some(({ account, enabled }) => enabled && resolveAccountMode(account) === "relay" && !hasNestedAuthTokenOverride(account))),
|
|
71
|
-
topLevelInheritedAccountActive: ({ account, enabled }) => enabled && resolveAccountMode(account) === "relay" && !hasNestedAuthTokenOverride(account),
|
|
72
|
-
topInactiveReason: "no enabled Slack relay-mode surface inherits this top-level relay authToken.",
|
|
73
|
-
accountActive: ({ account, enabled }) => enabled && resolveAccountMode(account) === "relay",
|
|
74
|
-
accountInactiveReason: "Slack account is disabled or not running in relay mode."
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
const channelSecrets = {
|
|
78
|
-
secretTargetRegistryEntries,
|
|
79
|
-
collectRuntimeConfigAssignments
|
|
80
|
-
};
|
|
81
|
-
//#endregion
|
|
82
|
-
export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import "node:module";
|
|
2
|
-
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
import { getChannelStreamingConfigObject, resolveChannelStreamingNativeTransport } from "openclaw/plugin-sdk/channel-streaming-config";
|
|
4
|
-
//#region \0rolldown/runtime.js
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
-
var __exportAll = (all, no_symbols) => {
|
|
10
|
-
let target = {};
|
|
11
|
-
for (var name in all) __defProp(target, name, {
|
|
12
|
-
get: all[name],
|
|
13
|
-
enumerable: true
|
|
14
|
-
});
|
|
15
|
-
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
-
return target;
|
|
17
|
-
};
|
|
18
|
-
var __copyProps = (to, from, except, desc) => {
|
|
19
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
20
|
-
key = keys[i];
|
|
21
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
22
|
-
get: ((k) => from[k]).bind(null, key),
|
|
23
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
return to;
|
|
27
|
-
};
|
|
28
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
29
|
-
//#endregion
|
|
30
|
-
//#region extensions/slack/src/streaming-compat.ts
|
|
31
|
-
function parseStreamingMode(value) {
|
|
32
|
-
const normalized = normalizeLowercaseStringOrEmpty(value);
|
|
33
|
-
if (normalized === "off" || normalized === "partial" || normalized === "block" || normalized === "progress") return normalized;
|
|
34
|
-
return null;
|
|
35
|
-
}
|
|
36
|
-
function parseSlackLegacyDraftStreamMode(value) {
|
|
37
|
-
const normalized = normalizeLowercaseStringOrEmpty(value);
|
|
38
|
-
if (normalized === "replace" || normalized === "status_final" || normalized === "append") return normalized;
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
function mapSlackLegacyDraftStreamModeToStreaming(mode) {
|
|
42
|
-
if (mode === "append") return "block";
|
|
43
|
-
if (mode === "status_final") return "progress";
|
|
44
|
-
return "partial";
|
|
45
|
-
}
|
|
46
|
-
function resolveSlackStreamingMode(params = {}) {
|
|
47
|
-
const parsedStreaming = parseStreamingMode(getChannelStreamingConfigObject(params)?.mode ?? params.streaming);
|
|
48
|
-
if (parsedStreaming) return parsedStreaming;
|
|
49
|
-
const legacyStreamMode = parseSlackLegacyDraftStreamMode(params.streamMode);
|
|
50
|
-
if (legacyStreamMode) return mapSlackLegacyDraftStreamModeToStreaming(legacyStreamMode);
|
|
51
|
-
if (typeof params.streaming === "boolean") return params.streaming ? "partial" : "off";
|
|
52
|
-
return "progress";
|
|
53
|
-
}
|
|
54
|
-
function resolveSlackNativeStreaming(params = {}) {
|
|
55
|
-
const canonical = resolveChannelStreamingNativeTransport(params);
|
|
56
|
-
if (typeof canonical === "boolean") return canonical;
|
|
57
|
-
if (typeof params.nativeStreaming === "boolean") return params.nativeStreaming;
|
|
58
|
-
if (typeof params.streaming === "boolean") return params.streaming;
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
export { __reExport as i, resolveSlackStreamingMode as n, __exportAll as r, resolveSlackNativeStreaming as t };
|