@openclaw/slack 2026.8.1 → 2026.8.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/{account-inspect-CN2hBsim.js → account-inspect-C3sePHWa.js} +3 -3
- package/dist/account-inspect-api.js +1 -1
- package/dist/{action-runtime-044ldvNL.js → action-runtime-B0kRJ69h.js} +50 -40
- package/dist/action-runtime.runtime-IuA14rev.js +2 -0
- package/dist/{actions-BI7JkfVm.js → actions-BOxiu2Vy.js} +18 -12
- package/dist/api.js +14 -14
- package/dist/{approval-handler.runtime-DYv0UIZS.js → approval-handler.runtime-l5_2JLqi.js} +7 -6
- package/dist/{channel-1vIJOzPx.js → channel-BguxhhNG.js} +39 -31
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel-type-DlFSKeIZ.js → channel-type-ChkODKBW.js} +2 -2
- package/dist/{channel.setup-ofDi3_Pu.js → channel.setup-BJohRJha.js} +23 -22
- package/dist/{config-schema-BVIMyiDN.js → config-schema-B9GwoRlE.js} +5 -3
- package/dist/{conversation-binding-route-DFVLUdYF.js → conversation-binding-route-Vee8Dgbf.js} +2 -2
- package/dist/{directory-config-DqfQ42OV.js → directory-config-Bmw4ykSy.js} +4 -3
- package/dist/directory-contract-api.js +1 -1
- package/dist/{directory-live-BPaNHjmP.js → directory-live-BOILcXPo.js} +1 -1
- package/dist/{doctor-contract-BAy7-EUQ.js → doctor-contract-BNjw9bxb.js} +5 -4
- package/dist/doctor-contract-api.js +1 -1
- package/dist/{group-policy-BdwszjYn.js → group-policy-BYH74y50.js} +70 -39
- package/dist/{message-tool-api-CJ0kjcg5.js → message-tool-api-BsZbsulu.js} +1 -1
- package/dist/message-tool-api.js +1 -1
- package/dist/{monitor-Dq5Cmrvp.js → monitor-B72wWXWg.js} +3 -3
- package/dist/{outbound-adapter-DYaI8ThX.js → outbound-adapter-CPgYQ-BM.js} +3 -3
- package/dist/{pipeline.runtime-Bd22U0ga.js → pipeline.runtime-CcdujV99.js} +238 -393
- package/dist/{policy-CtQVbde1.js → policy-CUpBeOt9.js} +7 -5
- package/dist/{probe-0usmAb0i.js → probe-gj5yQgN2.js} +113 -112
- package/dist/{provider-CN_8hFv2.js → provider-DW9YC_no.js} +69 -44
- package/dist/{relay-source-BNGpsdwV.js → relay-source-BLMdBrAw.js} +6 -4
- package/dist/{replies-BSiRQOJ1.js → replies-DLjQ8RYU.js} +13 -8
- package/dist/{resolve-channels-Czheznc8.js → resolve-channels-Bv6IiGZ4.js} +4 -3
- package/dist/{resolve-users-BAOlNimr.js → resolve-users-BXw2pA7y.js} +4 -3
- package/dist/runtime-api.js +10 -10
- package/dist/{scopes-COSlmhnH.js → scopes-B9HRguDe.js} +1 -1
- package/dist/{send-DS9ICrBI.js → send-GUz4_v2E.js} +21 -13
- package/dist/{send.runtime-D_Bb6IuH.js → send.runtime-rScD-UJi.js} +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/dist/{setup-surface-BGnd2pSe.js → setup-surface-Cc3P-z35.js} +5 -5
- package/dist/{shared-D5B-5hBg.js → shared-CQGVZ_8a.js} +5 -5
- package/dist/{slash-dispatch.runtime-CilDmI0c.js → slash-dispatch.runtime-C2015r6s.js} +1 -1
- package/dist/{target-parsing-BnMD2ZqZ.js → target-parsing-PbxGDbr9.js} +11 -6
- package/dist/{targets-Cx5W_n3W.js → targets-7FexXJ62.js} +1 -1
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/accept.js +54 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/charset.js +10 -34
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/encoding.js +9 -30
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/language.js +15 -36
- package/node_modules/@slack/bolt/node_modules/negotiator/lib/mediaType.js +16 -134
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/LICENSE +22 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/README.md +71 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/node_modules/content-type/package.json +52 -0
- package/node_modules/@slack/bolt/node_modules/negotiator/package.json +16 -10
- package/node_modules/typebox/build/format/email.mjs +1 -1
- package/node_modules/typebox/build/format/idna/idn-hostname.mjs +19 -1
- package/node_modules/typebox/package.json +1 -1
- package/package.json +5 -5
- package/dist/action-runtime.runtime-BL3KzX13.js +0 -2
- package/node_modules/@slack/bolt/node_modules/negotiator/HISTORY.md +0 -114
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as formatUnknownError, m as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-
|
|
1
|
+
import { h as formatUnknownError, m as SLACK_SOCKET_RECONNECT_POLICY } from "./provider-DW9YC_no.js";
|
|
2
2
|
import { asOptionalRecord, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { computeBackoff, sleepWithAbort, warn } from "openclaw/plugin-sdk/runtime-env";
|
|
4
4
|
import { isIP } from "node:net";
|
|
@@ -10,7 +10,7 @@ const SLACK_RELAY_ROUTE_KINDS = /* @__PURE__ */ new Set([
|
|
|
10
10
|
"thread_affinity",
|
|
11
11
|
"channel_default"
|
|
12
12
|
]);
|
|
13
|
-
const SLACK_RELAY_MAX_PAYLOAD_BYTES =
|
|
13
|
+
const SLACK_RELAY_MAX_PAYLOAD_BYTES = 1048576;
|
|
14
14
|
async function monitorSlackRelaySource(params) {
|
|
15
15
|
let reconnectAttempts = 0;
|
|
16
16
|
while (!params.abortSignal?.aborted) {
|
|
@@ -56,7 +56,8 @@ async function monitorSlackRelaySource(params) {
|
|
|
56
56
|
function openRelayWebSocket(config, abortSignal) {
|
|
57
57
|
if (abortSignal?.aborted) return Promise.reject(/* @__PURE__ */ new Error("Slack relay websocket aborted before connect"));
|
|
58
58
|
return new Promise((resolve, reject) => {
|
|
59
|
-
const
|
|
59
|
+
const url = buildRelayWebSocketUrl(config);
|
|
60
|
+
const ws = new WebSocket(url, buildRelayWebSocketOptions(config.authToken));
|
|
60
61
|
const cleanup = () => {
|
|
61
62
|
ws.off("open", onOpen);
|
|
62
63
|
ws.off("error", onError);
|
|
@@ -210,7 +211,8 @@ function extractRelaySlackMessageEvent(frame) {
|
|
|
210
211
|
const routeRecord = asOptionalRecord(record.route);
|
|
211
212
|
const routeKind = stringValue(routeRecord?.kind);
|
|
212
213
|
const routeKey = stringValue(routeRecord?.key);
|
|
213
|
-
const
|
|
214
|
+
const payload = asOptionalRecord(record.payload);
|
|
215
|
+
const event = asOptionalRecord(payload?.event);
|
|
214
216
|
if (event?.type !== "message" || typeof event.channel !== "string") return;
|
|
215
217
|
if (!deliveryId || !routeKind || !SLACK_RELAY_ROUTE_KINDS.has(routeKind) || !routeKey) return;
|
|
216
218
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as isSlackNativeResponseUrlRejection, M as SLACK_TEXT_LIMIT, S as isSlackInvalidBlocksResponse, T as buildSlackBlocksFallbackText, Z as markdownToSlackMrkdwnChunks, b as hasSlackNativeDataBlock, d as resolveSlackReplyBlockResolution, f as resolveSlackReplyBlocks, l as hasSlackReplyStructuredContent, v as buildSlackNativeDataAccessibilityText } from "./group-policy-
|
|
2
|
-
import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-
|
|
3
|
-
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./provider-
|
|
1
|
+
import { C as isSlackNativeResponseUrlRejection, M as SLACK_TEXT_LIMIT, S as isSlackInvalidBlocksResponse, T as buildSlackBlocksFallbackText, Z as markdownToSlackMrkdwnChunks, b as hasSlackNativeDataBlock, d as resolveSlackReplyBlockResolution, f as resolveSlackReplyBlocks, l as hasSlackReplyStructuredContent, v as buildSlackNativeDataAccessibilityText } from "./group-policy-BYH74y50.js";
|
|
2
|
+
import { h as chunkSlackTextAtHardLimit, m as buildSlackNativeDataDeliveryPlan, r as sendMessageSlack } from "./send-GUz4_v2E.js";
|
|
3
|
+
import { a as createSlackResponseUrlBudget, i as SlackResponseAlreadyReportedError } from "./provider-DW9YC_no.js";
|
|
4
4
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
5
5
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
6
6
|
import { createReplyReferencePlanner } from "openclaw/plugin-sdk/reply-reference";
|
|
@@ -141,7 +141,8 @@ async function deliverReplies(params) {
|
|
|
141
141
|
});
|
|
142
142
|
const reply = resolveSendableOutboundReplyParts(payload);
|
|
143
143
|
const textRaw = reply.hasText && !isSilentReplyText(reply.trimmedText, SILENT_REPLY_TOKEN) ? reply.trimmedText : void 0;
|
|
144
|
-
const
|
|
144
|
+
const materializeAuthoredText = !reply.hasMedia && hasSlackReplyStructuredContent(payload);
|
|
145
|
+
const { authoredTextPlacement, segments } = resolveSlackReplyBlockResolution(payload, { materializeAuthoredText });
|
|
145
146
|
if (!textRaw && !reply.hasMedia && segments.length === 0) continue;
|
|
146
147
|
const acceptedResults = [];
|
|
147
148
|
const sendReply = async (input) => {
|
|
@@ -297,8 +298,9 @@ function resolveSlackThreadTs(params) {
|
|
|
297
298
|
}).use();
|
|
298
299
|
}
|
|
299
300
|
function createSlackReplyReferencePlanner(params) {
|
|
301
|
+
const effectiveMode = params.isThreadReply ?? Boolean(params.incomingThreadTs && params.incomingThreadTs !== params.messageTs) ? "all" : params.replyToMode;
|
|
300
302
|
return createReplyReferencePlanner({
|
|
301
|
-
replyToMode:
|
|
303
|
+
replyToMode: effectiveMode,
|
|
302
304
|
existingId: params.incomingThreadTs,
|
|
303
305
|
startId: params.messageTs,
|
|
304
306
|
hasReplied: params.hasReplied
|
|
@@ -345,7 +347,8 @@ async function deliverSlackSlashReplies(params) {
|
|
|
345
347
|
if (payload.isReasoning === true) continue;
|
|
346
348
|
const reply = resolveSendableOutboundReplyParts(payload);
|
|
347
349
|
const textRaw = reply.hasText && !isSilentReplyText(reply.trimmedText, SILENT_REPLY_TOKEN) ? reply.trimmedText : void 0;
|
|
348
|
-
const
|
|
350
|
+
const materializeAuthoredText = hasSlackReplyStructuredContent(payload);
|
|
351
|
+
const { authoredTextPlacement, segments } = resolveSlackReplyBlockResolution(payload, { materializeAuthoredText });
|
|
349
352
|
let outsideText = authoredTextPlacement === "outside-blocks" ? textRaw ?? "" : "";
|
|
350
353
|
const messages = [];
|
|
351
354
|
const hookParts = [];
|
|
@@ -457,7 +460,8 @@ async function deliverSlackSlashReplies(params) {
|
|
|
457
460
|
if (initialRemaining !== void 0 && initialMinimumCalls > initialRemaining) await failOversizedDelivery();
|
|
458
461
|
const deliverNativeFallback = async (messages, onVisible) => {
|
|
459
462
|
for (const message of messages) {
|
|
460
|
-
|
|
463
|
+
const response = await respond(message);
|
|
464
|
+
if (await isSlackInvalidBlocksResponse(response)) throw new Error("Slack rejected the native-data fallback blocks with invalid_blocks.");
|
|
461
465
|
onVisible();
|
|
462
466
|
}
|
|
463
467
|
};
|
|
@@ -484,7 +488,8 @@ async function deliverSlackSlashReplies(params) {
|
|
|
484
488
|
}
|
|
485
489
|
let rejectedNativeBlocks = false;
|
|
486
490
|
try {
|
|
487
|
-
|
|
491
|
+
const response = await respond(planned.message);
|
|
492
|
+
rejectedNativeBlocks = await isSlackInvalidBlocksResponse(response);
|
|
488
493
|
if (!rejectedNativeBlocks) markVisible();
|
|
489
494
|
} catch (error) {
|
|
490
495
|
if (!isSlackNativeResponseUrlRejection(error)) throw error;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-
|
|
3
|
-
import {
|
|
2
|
+
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
3
|
+
import { s as createSlackLookupClient } from "./probe-gj5yQgN2.js";
|
|
4
4
|
import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { resolveDirectoryAllowlistEntries } from "openclaw/plugin-sdk/directory-runtime";
|
|
@@ -83,9 +83,10 @@ async function resolveSlackChannelAllowlist(params) {
|
|
|
83
83
|
let resolvedIndex = 0;
|
|
84
84
|
return workspaceResolved.map((entry) => entry ?? resolved[resolvedIndex++]);
|
|
85
85
|
}
|
|
86
|
+
const channels = await listSlackChannels(params.client ?? createSlackLookupClient(params.token));
|
|
86
87
|
const resolved = resolveDirectoryAllowlistEntries({
|
|
87
88
|
entries: lookupEntries,
|
|
88
|
-
lookup:
|
|
89
|
+
lookup: channels,
|
|
89
90
|
parseInput: parseSlackChannelMention,
|
|
90
91
|
findById: (lookup, id) => lookup.find((channel) => channel.id === id),
|
|
91
92
|
buildIdResolved: ({ input, parsed, match }) => ({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.js";
|
|
2
|
-
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-
|
|
3
|
-
import {
|
|
2
|
+
import { a as parseSlackTarget, n as formatSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
3
|
+
import { s as createSlackLookupClient } from "./probe-gj5yQgN2.js";
|
|
4
4
|
import { t as collectSlackCursorPages } from "./cursor-pages-eX7p8Wwt.js";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { resolveDirectoryAllowlistEntries } from "openclaw/plugin-sdk/directory-runtime";
|
|
@@ -98,9 +98,10 @@ async function resolveSlackUserAllowlist(params) {
|
|
|
98
98
|
const workspaceResolved = params.entries.map(resolveWorkspaceQualifiedUser);
|
|
99
99
|
const lookupEntries = params.entries.filter((_, index) => !workspaceResolved[index]);
|
|
100
100
|
if (lookupEntries.length === 0) return workspaceResolved.filter((entry) => entry !== void 0);
|
|
101
|
+
const users = await listSlackUsers(params.client ?? createSlackLookupClient(params.token));
|
|
101
102
|
const resolved = resolveDirectoryAllowlistEntries({
|
|
102
103
|
entries: lookupEntries,
|
|
103
|
-
lookup:
|
|
104
|
+
lookup: users,
|
|
104
105
|
parseInput: parseSlackUserInput,
|
|
105
106
|
findById: (lookup, id) => lookup.find((user) => user.id === id),
|
|
106
107
|
buildIdResolved: ({ input, parsed, match }) => ({
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { t as registerSlackPluginHttpRoutes } from "./plugin-routes-CLp4obpN.js";
|
|
2
2
|
import { a as resolveSlackAccount, d as resolveSlackAppToken, f as resolveSlackBotToken, i as resolveDefaultSlackAccountId, n as listSlackAccountIds, t as listEnabledSlackAccounts } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { i as resolveSlackGroupToolPolicy, r as resolveSlackGroupRequireMention } from "./group-policy-
|
|
4
|
-
import { t as probeSlack } from "./probe-
|
|
3
|
+
import { i as resolveSlackGroupToolPolicy, r as resolveSlackGroupRequireMention } from "./group-policy-BYH74y50.js";
|
|
4
|
+
import { t as probeSlack } from "./probe-gj5yQgN2.js";
|
|
5
5
|
import { r as setSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
6
|
-
import { c as listSlackPins, d as reactSlackMessage, f as readSlackMessages, g as unpinSlackMessage, h as sendSlackMessage, i as editSlackMessage, l as listSlackReactions, m as removeSlackReaction, n as deleteSlackMessage, o as getSlackMemberInfo, p as removeOwnSlackReactions, s as listSlackEmojis, u as pinSlackMessage } from "./actions-
|
|
7
|
-
import { r as sendMessageSlack } from "./send-
|
|
8
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
9
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
10
|
-
import { t as monitorSlackProvider } from "./provider-
|
|
11
|
-
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-
|
|
12
|
-
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-
|
|
13
|
-
import "./monitor-
|
|
6
|
+
import { c as listSlackPins, d as reactSlackMessage, f as readSlackMessages, g as unpinSlackMessage, h as sendSlackMessage, i as editSlackMessage, l as listSlackReactions, m as removeSlackReaction, n as deleteSlackMessage, o as getSlackMemberInfo, p as removeOwnSlackReactions, s as listSlackEmojis, u as pinSlackMessage } from "./actions-BOxiu2Vy.js";
|
|
7
|
+
import { r as sendMessageSlack } from "./send-GUz4_v2E.js";
|
|
8
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-Bv6IiGZ4.js";
|
|
9
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-BXw2pA7y.js";
|
|
10
|
+
import { t as monitorSlackProvider } from "./provider-DW9YC_no.js";
|
|
11
|
+
import { n as slackActionRuntime, t as handleSlackAction } from "./action-runtime-B0kRJ69h.js";
|
|
12
|
+
import { n as listSlackDirectoryGroupsLive, r as listSlackDirectoryPeersLive } from "./directory-live-BOILcXPo.js";
|
|
13
|
+
import "./monitor-B72wWXWg.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as createSlackReadClient, o as formatSlackError } from "./probe-gj5yQgN2.js";
|
|
2
2
|
import { isRecord, normalizeOptionalString, normalizeStringEntries, sortUniqueStrings } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
//#region extensions/slack/src/scopes.ts
|
|
4
4
|
function collectScopes(value, into) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as resolveSlackAccount, l as resolveSlackOperationToken } from "./accounts-Dm_H77gH.js";
|
|
2
|
-
import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-
|
|
3
|
-
import { A as SLACK_MESSAGE_TEXT_HARD_LIMIT, D as renderSlackBlockFallbackText, E as buildSlackCompleteBlocksFallbackText, L as truncateSlackText, M as SLACK_TEXT_LIMIT, R as truncateSlackTextByUtf8Bytes, X as chunkSlackMrkdwnText, Z as markdownToSlackMrkdwnChunks, _ as appendSlackNativeDataPlainTextFallback, b as hasSlackNativeDataBlock, c as assertSlackDetachedTargetAllowed, j as SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT, k as SLACK_EDIT_TEXT_MAX_BYTES, q as resolveSlackQuestionActionIds, st as validateSlackBlocksArray, v as buildSlackNativeDataAccessibilityText, w as stripSlackNativeDataBlocks, x as isSlackInvalidBlocksError, y as createSlackNativeDataBaseTextConsumer, z as SLACK_QUESTION_FINALIZATION_BLOCKS } from "./group-policy-
|
|
2
|
+
import { a as parseSlackTarget, t as canonicalizeSlackApiTargetId } from "./target-parsing-PbxGDbr9.js";
|
|
3
|
+
import { A as SLACK_MESSAGE_TEXT_HARD_LIMIT, D as renderSlackBlockFallbackText, E as buildSlackCompleteBlocksFallbackText, L as truncateSlackText, M as SLACK_TEXT_LIMIT, R as truncateSlackTextByUtf8Bytes, X as chunkSlackMrkdwnText, Z as markdownToSlackMrkdwnChunks, _ as appendSlackNativeDataPlainTextFallback, b as hasSlackNativeDataBlock, c as assertSlackDetachedTargetAllowed, j as SLACK_MESSAGE_TEXT_RECOMMENDED_LIMIT, k as SLACK_EDIT_TEXT_MAX_BYTES, q as resolveSlackQuestionActionIds, st as validateSlackBlocksArray, v as buildSlackNativeDataAccessibilityText, w as stripSlackNativeDataBlocks, x as isSlackInvalidBlocksError, y as createSlackNativeDataBaseTextConsumer, z as SLACK_QUESTION_FINALIZATION_BLOCKS } from "./group-policy-BYH74y50.js";
|
|
4
|
+
import { c as createSlackReadClient, m as getSlackWriteClient, o as formatSlackError, u as createSlackTokenCacheKey } from "./probe-gj5yQgN2.js";
|
|
4
5
|
import { n as resolveSlackThreadTsValue, t as normalizeSlackThreadTsCandidate } from "./thread-ts-DUGhaYKq.js";
|
|
5
|
-
import { S as getSlackWriteClient, g as createSlackReadClient, o as formatSlackError, v as createSlackTokenCacheKey } from "./probe-0usmAb0i.js";
|
|
6
6
|
import { t as getOptionalSlackRuntime } from "./runtime-JSVZSWAj.js";
|
|
7
7
|
import { isRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeTrimmedStringList } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { createMessageReceiptFromOutboundResults } from "openclaw/plugin-sdk/channel-outbound";
|
|
@@ -135,7 +135,8 @@ function isSlackCustomizeScopeError(err) {
|
|
|
135
135
|
}
|
|
136
136
|
function isSlackCustomIdentityRejectedError(err) {
|
|
137
137
|
if (isSlackCustomizeScopeError(err)) return true;
|
|
138
|
-
const
|
|
138
|
+
const data = getSlackWebApiErrorData$1(err);
|
|
139
|
+
const code = normalizeLowercaseStringOrEmpty(normalizeOptionalString(data?.error));
|
|
139
140
|
return code === "invalid_arguments" || code === "invalid_arg_name";
|
|
140
141
|
}
|
|
141
142
|
function hasCustomIdentity$1(identity) {
|
|
@@ -422,7 +423,8 @@ async function uploadSlackFile(params) {
|
|
|
422
423
|
await release();
|
|
423
424
|
}
|
|
424
425
|
} catch (error) {
|
|
425
|
-
|
|
426
|
+
const outcome = uploadTimeoutSignal?.aborted ? "timed out" : "failed";
|
|
427
|
+
throw new PlatformMessageNotDispatchedError(`Slack external upload ${outcome} before completion dispatch`, { cause: buildSlackUploadFailureCause(error) });
|
|
426
428
|
} finally {
|
|
427
429
|
cleanupUploadTimeout();
|
|
428
430
|
}
|
|
@@ -531,7 +533,7 @@ const SLACK_DELIVERY_METADATA_PART_INDEX_KEY = "openclaw_delivery_part_index";
|
|
|
531
533
|
const SLACK_DELIVERY_METADATA_PART_COUNT_KEY = "openclaw_delivery_part_count";
|
|
532
534
|
const SLACK_DELIVERY_METADATA_SIGNATURE_KEY = "openclaw_delivery_signature";
|
|
533
535
|
const SLACK_RECONCILE_LOOKBACK_MS = 3e4;
|
|
534
|
-
const SLACK_RECONCILE_CLOCK_SKEW_MS =
|
|
536
|
+
const SLACK_RECONCILE_CLOCK_SKEW_MS = 3e5;
|
|
535
537
|
const SLACK_RECONCILE_LIMIT = 100;
|
|
536
538
|
const SLACK_RECONCILE_MAX_PAGES = 10;
|
|
537
539
|
const SLACK_ENTERPRISE_LISTENER_QUEUE_CREDENTIAL = "listener-scoped-enterprise";
|
|
@@ -600,16 +602,18 @@ function resolvePostedMessageThreadTs(response) {
|
|
|
600
602
|
return typeof threadTs === "string" ? normalizeSlackThreadTsCandidate(threadTs) : void 0;
|
|
601
603
|
}
|
|
602
604
|
async function updateMessageSlack(params) {
|
|
605
|
+
const cfg = requireRuntimeConfig(params.cfg, "Slack update");
|
|
603
606
|
const account = resolveSlackAccount({
|
|
604
|
-
cfg
|
|
607
|
+
cfg,
|
|
605
608
|
accountId: params.accountId
|
|
606
609
|
});
|
|
607
610
|
assertSlackDetachedTargetAllowed(account.accountId, params.teamId);
|
|
608
|
-
|
|
611
|
+
const token = resolveToken({
|
|
609
612
|
accountId: account.accountId,
|
|
610
613
|
fallbackToken: account.botToken,
|
|
611
614
|
fallbackSource: account.botTokenSource
|
|
612
|
-
})
|
|
615
|
+
});
|
|
616
|
+
await getSlackWriteClient(token, { teamId: params.teamId }).chat.update({
|
|
613
617
|
channel: params.channelId,
|
|
614
618
|
ts: params.messageTs,
|
|
615
619
|
text: truncateSlackTextByUtf8Bytes(params.text, SLACK_EDIT_TEXT_MAX_BYTES),
|
|
@@ -617,8 +621,9 @@ async function updateMessageSlack(params) {
|
|
|
617
621
|
});
|
|
618
622
|
}
|
|
619
623
|
function createSlackSendReceipt(params) {
|
|
624
|
+
const platformMessageIds = params.platformMessageIds.map((messageId) => messageId.trim()).filter((messageId) => messageId && messageId !== "unknown");
|
|
620
625
|
return createMessageReceiptFromOutboundResults({
|
|
621
|
-
results:
|
|
626
|
+
results: platformMessageIds.map((messageId) => {
|
|
622
627
|
const result = {
|
|
623
628
|
channel: "slack",
|
|
624
629
|
messageId
|
|
@@ -736,7 +741,8 @@ function resolveSlackTextChunks(params) {
|
|
|
736
741
|
...params.accountId ? { accountId: params.accountId } : {}
|
|
737
742
|
});
|
|
738
743
|
const chunkMode = resolveChunkMode(params.cfg, "slack", params.accountId);
|
|
739
|
-
|
|
744
|
+
const chunks = (chunkMode === "newline" ? chunkMarkdownTextWithMode(text, chunkLimit, chunkMode) : [text]).flatMap((markdown) => markdownToSlackMrkdwnChunks(markdown, chunkLimit, { tableMode }));
|
|
745
|
+
return resolveTextChunksWithFallback(text, chunks);
|
|
740
746
|
}
|
|
741
747
|
function createSlackSendQueueKey(params) {
|
|
742
748
|
const recipientKey = `${params.recipient.kind}:${params.recipient.id}`;
|
|
@@ -985,8 +991,9 @@ async function scanSlackConversationForDelivery(params) {
|
|
|
985
991
|
};
|
|
986
992
|
}
|
|
987
993
|
async function reconcileSlackUnknownSend(ctx) {
|
|
994
|
+
const cfg = requireRuntimeConfig(ctx.cfg, "Slack delivery reconciliation");
|
|
988
995
|
const account = resolveSlackAccount({
|
|
989
|
-
cfg
|
|
996
|
+
cfg,
|
|
990
997
|
accountId: ctx.accountId ?? void 0
|
|
991
998
|
});
|
|
992
999
|
const deliveryId = createSlackDeliveryMetadataId(ctx.queueId);
|
|
@@ -1021,8 +1028,9 @@ async function reconcileSlackUnknownSend(ctx) {
|
|
|
1021
1028
|
const readClient = createSlackReadClient(readToken, { teamId: recipient.teamId });
|
|
1022
1029
|
const writeClient = writeToken ? getSlackWriteClient(writeToken, { teamId: recipient.teamId }) : void 0;
|
|
1023
1030
|
const payloadReplyToId = ctx.payloads[0]?.replyToId;
|
|
1031
|
+
const effectiveReplyToId = Object.hasOwn(ctx, "effectiveReplyToId") ? normalizeOptionalString(ctx.effectiveReplyToId) : payloadReplyToId != null ? normalizeOptionalString(payloadReplyToId) : ctx.replyToMode === "off" ? void 0 : normalizeOptionalString(ctx.replyToId);
|
|
1024
1032
|
const threadTs = resolveSlackThreadTsValue({
|
|
1025
|
-
replyToId:
|
|
1033
|
+
replyToId: effectiveReplyToId,
|
|
1026
1034
|
threadId: ctx.threadId
|
|
1027
1035
|
});
|
|
1028
1036
|
const searchStartedAt = ctx.platformSendStartedAt ?? ctx.enqueuedAt;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as updateMessageSlack, n as resolveSlackDmChannelId, r as sendMessageSlack, t as reconcileSlackUnknownSend } from "./send-
|
|
1
|
+
import { a as updateMessageSlack, n as resolveSlackDmChannelId, r as sendMessageSlack, t as reconcileSlackUnknownSend } from "./send-GUz4_v2E.js";
|
|
2
2
|
export { reconcileSlackUnknownSend, resolveSlackDmChannelId, sendMessageSlack, updateMessageSlack };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as slackSetupPlugin } from "./channel.setup-
|
|
1
|
+
import { t as slackSetupPlugin } from "./channel.setup-BJohRJha.js";
|
|
2
2
|
export { slackSetupPlugin };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { i as resolveDefaultSlackAccountId, o as resolveSlackAccountAllowFrom } from "./accounts-Dm_H77gH.js";
|
|
2
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
3
|
-
import "./shared-
|
|
4
|
-
import { o as SLACK_CHANNEL, r as createSlackSetupWizardBase } from "./channel.setup-
|
|
5
|
-
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-
|
|
6
|
-
import { t as resolveSlackUserAllowlist } from "./resolve-users-
|
|
2
|
+
import { t as inspectSlackAccount } from "./account-inspect-C3sePHWa.js";
|
|
3
|
+
import "./shared-CQGVZ_8a.js";
|
|
4
|
+
import { o as SLACK_CHANNEL, r as createSlackSetupWizardBase } from "./channel.setup-BJohRJha.js";
|
|
5
|
+
import { t as resolveSlackChannelAllowlist } from "./resolve-channels-Bv6IiGZ4.js";
|
|
6
|
+
import { t as resolveSlackUserAllowlist } from "./resolve-users-BXw2pA7y.js";
|
|
7
7
|
import { normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
8
8
|
import { resolveBasicAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
9
9
|
import { createSetupTranslator, noteChannelLookupFailure, noteChannelLookupSummary, parseMentionOrPrefixedId, patchChannelConfigForAccount, promptResolvedAllowFrom, resolveEntriesWithOptionalToken, resolveSetupAccountId, splitSetupEntries } from "openclaw/plugin-sdk/setup-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { n as isSlackPluginAccountConfigured } from "./account-configured-sUohAxZr.js";
|
|
2
2
|
import { n as listSlackAccountIds, o as resolveSlackAccountAllowFrom, r as mergeSlackAccountConfig, s as resolveSlackAccountDmPolicy } from "./accounts-Dm_H77gH.js";
|
|
3
|
-
import { t as inspectSlackAccount } from "./account-inspect-
|
|
4
|
-
import { a as parseSlackTarget } from "./target-parsing-
|
|
5
|
-
import { a as slackIngressIdentity, t as probeSlack } from "./probe-
|
|
6
|
-
import { n as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-
|
|
7
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
3
|
+
import { t as inspectSlackAccount } from "./account-inspect-C3sePHWa.js";
|
|
4
|
+
import { a as parseSlackTarget } from "./target-parsing-PbxGDbr9.js";
|
|
5
|
+
import { a as slackIngressIdentity, t as probeSlack } from "./probe-gj5yQgN2.js";
|
|
6
|
+
import { n as slackBaseConfigAdapter, t as slackSetupPlugin } from "./channel.setup-BJohRJha.js";
|
|
7
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BNjw9bxb.js";
|
|
8
8
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DxmvbxBF.js";
|
|
9
9
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1 } from "openclaw/plugin-sdk/account-id";
|
|
10
10
|
import { adaptScopedAccountAccessor, createScopedDmSecurityResolver } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as deliverSlackSlashReplies$1, s as sanitizeSlackMonitorReplyPayload } from "./replies-
|
|
1
|
+
import { r as deliverSlackSlashReplies$1, s as sanitizeSlackMonitorReplyPayload } from "./replies-DLjQ8RYU.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 { resolveConversationLabel as resolveConversationLabel$1 } from "openclaw/plugin-sdk/conversation-runtime";
|
|
@@ -73,19 +73,24 @@ function parseSlackTarget(raw, options = {}) {
|
|
|
73
73
|
atUserErrorMessage: "Slack DMs require a user id (use user:<id> or <@id>)"
|
|
74
74
|
});
|
|
75
75
|
if (userTarget) return userTarget;
|
|
76
|
-
if (trimmed.startsWith("#"))
|
|
77
|
-
candidate
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
76
|
+
if (trimmed.startsWith("#")) {
|
|
77
|
+
const candidate = trimmed.slice(1).trim();
|
|
78
|
+
const id = ensureTargetId({
|
|
79
|
+
candidate,
|
|
80
|
+
pattern: /^[A-Z0-9]+$/i,
|
|
81
|
+
errorMessage: "Slack channels require a channel id (use channel:<id>)"
|
|
82
|
+
});
|
|
83
|
+
return buildMessagingTarget("channel", id, trimmed);
|
|
84
|
+
}
|
|
81
85
|
if (isUnambiguousSlackUserId(trimmed)) return buildMessagingTarget("user", trimmed, trimmed);
|
|
82
86
|
if (options.defaultKind) return buildMessagingTarget(options.defaultKind, trimmed, trimmed);
|
|
83
87
|
return buildMessagingTarget("channel", trimmed, trimmed);
|
|
84
88
|
}
|
|
85
89
|
function resolveSlackChannelId(raw) {
|
|
90
|
+
const target = parseSlackTarget(raw, { defaultKind: "channel" });
|
|
86
91
|
return canonicalizeSlackApiTargetId("channel", requireTargetKind({
|
|
87
92
|
platform: "Slack",
|
|
88
|
-
target
|
|
93
|
+
target,
|
|
89
94
|
kind: "channel"
|
|
90
95
|
}), raw);
|
|
91
96
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as parseSlackTarget, s as slackTargetsMatch } from "./target-parsing-
|
|
1
|
+
import { a as parseSlackTarget, s as slackTargetsMatch } from "./target-parsing-PbxGDbr9.js";
|
|
2
2
|
//#region extensions/slack/src/targets.ts
|
|
3
3
|
function matchesResolvedUserTarget(target, currentMessagingTarget) {
|
|
4
4
|
const resolvedId = target.trim();
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* negotiator
|
|
3
|
+
* Copyright(c) 2026 Blake Embrey
|
|
4
|
+
* MIT Licensed
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
var contentType = require('content-type');
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Module exports.
|
|
13
|
+
* @private
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
module.exports = parseAccept;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Parse an Accept-style header.
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
function parseAccept(header) {
|
|
24
|
+
var values = [];
|
|
25
|
+
var index = 0;
|
|
26
|
+
|
|
27
|
+
while (index < header.length) {
|
|
28
|
+
var start = skipOptionalWhitespace(header, index);
|
|
29
|
+
var parsed = contentType.parse(header, { comma: true, start: start });
|
|
30
|
+
|
|
31
|
+
// `content-type` normalizes the type, but accept methods return original casing.
|
|
32
|
+
parsed.type = header.slice(start, start + parsed.type.length);
|
|
33
|
+
values.push(parsed);
|
|
34
|
+
|
|
35
|
+
index = parsed.index + 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return values;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Skip optional whitespace.
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
function skipOptionalWhitespace(header, index) {
|
|
47
|
+
var cursor = index;
|
|
48
|
+
|
|
49
|
+
while (header.charCodeAt(cursor) === 0x20 || header.charCodeAt(cursor) === 0x09) {
|
|
50
|
+
cursor++;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return cursor;
|
|
54
|
+
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
11
|
+
var parseAccept = require('./accept');
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
14
|
* Module exports.
|
|
13
15
|
* @public
|
|
@@ -21,55 +23,29 @@ module.exports.preferredCharsets = preferredCharsets;
|
|
|
21
23
|
* @private
|
|
22
24
|
*/
|
|
23
25
|
|
|
24
|
-
var simpleCharsetRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Parse the Accept-Charset header.
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
26
|
function parseAcceptCharset(accept) {
|
|
32
|
-
var accepts = accept
|
|
27
|
+
var accepts = parseAccept(accept);
|
|
33
28
|
|
|
34
29
|
for (var i = 0, j = 0; i < accepts.length; i++) {
|
|
35
|
-
var charset =
|
|
36
|
-
|
|
37
|
-
if (charset) {
|
|
38
|
-
accepts[j++] = charset;
|
|
39
|
-
}
|
|
30
|
+
var charset = formatCharset(accepts[i], i);
|
|
31
|
+
if (charset) accepts[j++] = charset;
|
|
40
32
|
}
|
|
41
33
|
|
|
42
|
-
// trim accepts
|
|
43
34
|
accepts.length = j;
|
|
44
|
-
|
|
45
35
|
return accepts;
|
|
46
36
|
}
|
|
47
37
|
|
|
48
38
|
/**
|
|
49
|
-
*
|
|
39
|
+
* Format a parsed charset for negotiation.
|
|
50
40
|
* @private
|
|
51
41
|
*/
|
|
52
42
|
|
|
53
|
-
function
|
|
54
|
-
|
|
55
|
-
if (!match) return null;
|
|
56
|
-
|
|
57
|
-
var charset = match[1];
|
|
58
|
-
var q = 1;
|
|
59
|
-
if (match[2]) {
|
|
60
|
-
var params = match[2].split(';')
|
|
61
|
-
for (var j = 0; j < params.length; j++) {
|
|
62
|
-
var p = params[j].trim().split('=');
|
|
63
|
-
if (p[0] === 'q') {
|
|
64
|
-
q = parseFloat(p[1]);
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
}
|
|
43
|
+
function formatCharset(parsed, i) {
|
|
44
|
+
if (!parsed.type) return null;
|
|
69
45
|
|
|
70
46
|
return {
|
|
71
|
-
charset:
|
|
72
|
-
q: q,
|
|
47
|
+
charset: parsed.type,
|
|
48
|
+
q: parsed.parameters.q ? parseFloat(parsed.parameters.q) : 1,
|
|
73
49
|
i: i
|
|
74
50
|
};
|
|
75
51
|
}
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
11
|
+
var parseAccept = require('./accept');
|
|
12
|
+
|
|
11
13
|
/**
|
|
12
14
|
* Module exports.
|
|
13
15
|
* @public
|
|
@@ -21,20 +23,13 @@ module.exports.preferredEncodings = preferredEncodings;
|
|
|
21
23
|
* @private
|
|
22
24
|
*/
|
|
23
25
|
|
|
24
|
-
var simpleEncodingRegExp = /^\s*([^\s;]+)\s*(?:;(.*))?$/;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Parse the Accept-Encoding header.
|
|
28
|
-
* @private
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
26
|
function parseAcceptEncoding(accept) {
|
|
32
|
-
var accepts = accept
|
|
27
|
+
var accepts = parseAccept(accept);
|
|
33
28
|
var hasIdentity = false;
|
|
34
29
|
var minQuality = 1;
|
|
35
30
|
|
|
36
31
|
for (var i = 0, j = 0; i < accepts.length; i++) {
|
|
37
|
-
var encoding =
|
|
32
|
+
var encoding = formatEncoding(accepts[i], i);
|
|
38
33
|
|
|
39
34
|
if (encoding) {
|
|
40
35
|
accepts[j++] = encoding;
|
|
@@ -55,37 +50,21 @@ function parseAcceptEncoding(accept) {
|
|
|
55
50
|
};
|
|
56
51
|
}
|
|
57
52
|
|
|
58
|
-
// trim accepts
|
|
59
53
|
accepts.length = j;
|
|
60
|
-
|
|
61
54
|
return accepts;
|
|
62
55
|
}
|
|
63
56
|
|
|
64
57
|
/**
|
|
65
|
-
*
|
|
58
|
+
* Format a parsed encoding for negotiation.
|
|
66
59
|
* @private
|
|
67
60
|
*/
|
|
68
61
|
|
|
69
|
-
function
|
|
70
|
-
|
|
71
|
-
if (!match) return null;
|
|
72
|
-
|
|
73
|
-
var encoding = match[1];
|
|
74
|
-
var q = 1;
|
|
75
|
-
if (match[2]) {
|
|
76
|
-
var params = match[2].split(';');
|
|
77
|
-
for (var j = 0; j < params.length; j++) {
|
|
78
|
-
var p = params[j].trim().split('=');
|
|
79
|
-
if (p[0] === 'q') {
|
|
80
|
-
q = parseFloat(p[1]);
|
|
81
|
-
break;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
}
|
|
62
|
+
function formatEncoding(parsed, i) {
|
|
63
|
+
if (!parsed.type) return null;
|
|
85
64
|
|
|
86
65
|
return {
|
|
87
|
-
encoding:
|
|
88
|
-
q: q,
|
|
66
|
+
encoding: parsed.type,
|
|
67
|
+
q: parsed.parameters.q ? parseFloat(parsed.parameters.q) : 1,
|
|
89
68
|
i: i
|
|
90
69
|
};
|
|
91
70
|
}
|