@openclaw/slack 2026.5.12-beta.7
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-D7AZNs8C.js +77 -0
- package/dist/account-inspect-api.js +10 -0
- package/dist/accounts-ClAPP5ry.js +139 -0
- package/dist/accounts.runtime-DDVcLJUI.js +2 -0
- package/dist/action-runtime-e2UhRsNx.js +350 -0
- package/dist/action-runtime.runtime-BFcqMbOm.js +2 -0
- package/dist/actions-CYLFK-Zy.js +292 -0
- package/dist/actions.runtime-CO3OaTLb.js +2 -0
- package/dist/allow-list-BPnnlRPL.js +82 -0
- package/dist/api.js +21 -0
- package/dist/approval-handler.runtime-CmeRr9qA.js +256 -0
- package/dist/blocks-input-CwTFVImV.js +29 -0
- package/dist/blocks-render-BIDw-Pom.js +161 -0
- package/dist/channel-DRjHBTDB.js +1020 -0
- package/dist/channel-api-B_nZwosg.js +20 -0
- package/dist/channel-config-api.js +2 -0
- package/dist/channel-entry.js +22 -0
- package/dist/channel-plugin-api.js +2 -0
- package/dist/channel.setup-Cayn7afd.js +73 -0
- package/dist/client-CPe4GmDR.js +103 -0
- package/dist/config-api-B_jq4NJW.js +2 -0
- package/dist/config-schema-D9B5LB_L.js +167 -0
- package/dist/configured-state.js +11 -0
- package/dist/contract-api.js +5 -0
- package/dist/directory-config-B3JiHeB7.js +54 -0
- package/dist/directory-contract-api.js +2 -0
- package/dist/directory-live-Bf16GwDh.js +133 -0
- package/dist/doctor-contract-KUjHnkQm.js +147 -0
- package/dist/doctor-contract-api.js +2 -0
- package/dist/errors-BYFHR24f.js +109 -0
- package/dist/exec-approvals-7xUNgLi9.js +58 -0
- package/dist/group-policy-CyLUK6My.js +41 -0
- package/dist/http-routes-api.js +2 -0
- package/dist/inbound-contract-test-api.js +3 -0
- package/dist/index.js +33 -0
- package/dist/interactive-replies-api.js +2 -0
- package/dist/interactive-replies-qAIfuBor.js +173 -0
- package/dist/magic-string.es-BMaGRRZ1.js +1011 -0
- package/dist/media-D1XCd1uP.js +469 -0
- package/dist/message-tool-api-6lowf9zE.js +104 -0
- package/dist/message-tool-api.js +2 -0
- package/dist/monitor-a97o17G6.js +13 -0
- package/dist/mrkdwn-Cax-eSfK.js +6 -0
- package/dist/outbound-adapter-B_5sEhCg.js +174 -0
- package/dist/outbound-payload-test-api.js +2 -0
- package/dist/outbound-payload.test-harness-CVCamg1x.js +13558 -0
- package/dist/pipeline.runtime-DT0hLnq2.js +1379 -0
- package/dist/plugin-routes-DtTPmga1.js +20 -0
- package/dist/prepare-D3YqV8jB.js +1482 -0
- package/dist/prepare.test-helpers-DVcjRhfG.js +49 -0
- package/dist/probe-3eZf1FjI.js +42 -0
- package/dist/provider-D7uAN3Fq.js +3235 -0
- package/dist/registry-CeaoNfoP.js +39 -0
- package/dist/replies-Xe_jMR6o.js +139 -0
- package/dist/reply-blocks-Z5l6_R6H.js +14 -0
- package/dist/resolve-allowlist-common-Bk3clYPK.js +43 -0
- package/dist/resolve-channels-BRYqyNVJ.js +81 -0
- package/dist/resolve-users-Bd_SdP8j.js +113 -0
- package/dist/rolldown-runtime-CiIaOW0V.js +13 -0
- package/dist/room-context-0vovmZPU.js +787 -0
- package/dist/runtime-Bo-KHM-F.js +8 -0
- package/dist/runtime-api-Dd1xIV5v.js +9 -0
- package/dist/runtime-api.js +14 -0
- package/dist/runtime-setter-api.js +2 -0
- package/dist/scopes-CDevO8jg.js +74 -0
- package/dist/secret-contract-Bo6lbSkh.js +141 -0
- package/dist/secret-contract-api.js +2 -0
- package/dist/security-audit-BtHGnD3d.js +51 -0
- package/dist/security-contract-api.js +2 -0
- package/dist/send-D_A9kL-C.js +721 -0
- package/dist/send.runtime-BRE_ncCU.js +2 -0
- package/dist/send.runtime-_l76lUuL.js +2 -0
- package/dist/setup-core-B9NetDkM.js +320 -0
- package/dist/setup-entry.js +15 -0
- package/dist/setup-plugin-api.js +2 -0
- package/dist/setup-surface-D88QBVOW.js +128 -0
- package/dist/shared-D8U42xFL.js +208 -0
- package/dist/slash-commands.runtime-22kgyst2.js +19 -0
- package/dist/slash-dispatch.runtime-BJgT0jwV.js +32 -0
- package/dist/slash-plugin-commands.runtime-CF-n3MeP.js +2 -0
- package/dist/slash-skill-commands.runtime-BMs0VjTe.js +7 -0
- package/dist/streaming-compat-RkZgTmQ2.js +43 -0
- package/dist/target-parsing-CQmv-iSm.js +55 -0
- package/dist/targets-B1tYCAr6.js +2 -0
- package/dist/test-api.js +8 -0
- package/dist/thread-ts-C2x7c5PP.js +24 -0
- package/openclaw.plugin.json +2405 -0
- package/package.json +84 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { buildCommandTextFromArgs as buildCommandTextFromArgs$1, findCommandByNativeName as findCommandByNativeName$1, listNativeCommandSpecsForConfig as listNativeCommandSpecsForConfig$1, parseCommandArgs as parseCommandArgs$1, resolveCommandArgMenu as resolveCommandArgMenu$1 } from "openclaw/plugin-sdk/command-auth-native";
|
|
2
|
+
//#region extensions/slack/src/monitor/slash-commands.runtime.ts
|
|
3
|
+
function buildCommandTextFromArgs(...args) {
|
|
4
|
+
return buildCommandTextFromArgs$1(...args);
|
|
5
|
+
}
|
|
6
|
+
function findCommandByNativeName(...args) {
|
|
7
|
+
return findCommandByNativeName$1(...args);
|
|
8
|
+
}
|
|
9
|
+
function listNativeCommandSpecsForConfig(...args) {
|
|
10
|
+
return listNativeCommandSpecsForConfig$1(...args);
|
|
11
|
+
}
|
|
12
|
+
function parseCommandArgs(...args) {
|
|
13
|
+
return parseCommandArgs$1(...args);
|
|
14
|
+
}
|
|
15
|
+
function resolveCommandArgMenu(...args) {
|
|
16
|
+
return resolveCommandArgMenu$1(...args);
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { r as deliverSlackSlashReplies$1 } from "./replies-Xe_jMR6o.js";
|
|
2
|
+
import { resolveAgentRoute as resolveAgentRoute$1 } from "openclaw/plugin-sdk/routing";
|
|
3
|
+
import { resolveMarkdownTableMode as resolveMarkdownTableMode$1 } from "openclaw/plugin-sdk/markdown-table-runtime";
|
|
4
|
+
import { recordInboundSessionMetaSafe as recordInboundSessionMetaSafe$1, resolveConversationLabel as resolveConversationLabel$1 } from "openclaw/plugin-sdk/conversation-runtime";
|
|
5
|
+
import { dispatchReplyWithDispatcher as dispatchReplyWithDispatcher$1, finalizeInboundContext as finalizeInboundContext$1, resolveChunkMode as resolveChunkMode$1 } from "openclaw/plugin-sdk/reply-runtime";
|
|
6
|
+
//#region extensions/slack/src/monitor/slash-dispatch.runtime.ts
|
|
7
|
+
function resolveChunkMode(...args) {
|
|
8
|
+
return resolveChunkMode$1(...args);
|
|
9
|
+
}
|
|
10
|
+
function finalizeInboundContext(...args) {
|
|
11
|
+
return finalizeInboundContext$1(...args);
|
|
12
|
+
}
|
|
13
|
+
function dispatchReplyWithDispatcher(...args) {
|
|
14
|
+
return dispatchReplyWithDispatcher$1(...args);
|
|
15
|
+
}
|
|
16
|
+
function resolveConversationLabel(...args) {
|
|
17
|
+
return resolveConversationLabel$1(...args);
|
|
18
|
+
}
|
|
19
|
+
function recordInboundSessionMetaSafe(...args) {
|
|
20
|
+
return recordInboundSessionMetaSafe$1(...args);
|
|
21
|
+
}
|
|
22
|
+
function resolveMarkdownTableMode(...args) {
|
|
23
|
+
return resolveMarkdownTableMode$1(...args);
|
|
24
|
+
}
|
|
25
|
+
function resolveAgentRoute(...args) {
|
|
26
|
+
return resolveAgentRoute$1(...args);
|
|
27
|
+
}
|
|
28
|
+
function deliverSlackSlashReplies(...args) {
|
|
29
|
+
return deliverSlackSlashReplies$1(...args);
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { listSkillCommandsForAgents as listSkillCommandsForAgents$1 } from "openclaw/plugin-sdk/command-auth-native";
|
|
2
|
+
//#region extensions/slack/src/monitor/slash-skill-commands.runtime.ts
|
|
3
|
+
function listSkillCommandsForAgents(...args) {
|
|
4
|
+
return listSkillCommandsForAgents$1(...args);
|
|
5
|
+
}
|
|
6
|
+
//#endregion
|
|
7
|
+
export { listSkillCommandsForAgents };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
import { getChannelStreamingConfigObject, resolveChannelStreamingNativeTransport } from "openclaw/plugin-sdk/channel-streaming";
|
|
3
|
+
//#region extensions/slack/src/streaming-compat.ts
|
|
4
|
+
function normalizeStreamingMode(value) {
|
|
5
|
+
if (typeof value !== "string") return null;
|
|
6
|
+
return (normalizeOptionalString(value) == null ? "" : normalizeLowercaseStringOrEmpty(value)) || null;
|
|
7
|
+
}
|
|
8
|
+
function parseStreamingMode(value) {
|
|
9
|
+
const normalized = normalizeStreamingMode(value);
|
|
10
|
+
if (normalized === "off" || normalized === "partial" || normalized === "block" || normalized === "progress") return normalized;
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
function parseSlackLegacyDraftStreamMode(value) {
|
|
14
|
+
const normalized = normalizeStreamingMode(value);
|
|
15
|
+
if (normalized === "replace" || normalized === "status_final" || normalized === "append") return normalized;
|
|
16
|
+
return null;
|
|
17
|
+
}
|
|
18
|
+
function mapSlackLegacyDraftStreamModeToStreaming(mode) {
|
|
19
|
+
if (mode === "append") return "block";
|
|
20
|
+
if (mode === "status_final") return "progress";
|
|
21
|
+
return "partial";
|
|
22
|
+
}
|
|
23
|
+
function mapStreamingModeToSlackLegacyDraftStreamMode(mode) {
|
|
24
|
+
if (mode === "block") return "append";
|
|
25
|
+
if (mode === "progress") return "status_final";
|
|
26
|
+
return "replace";
|
|
27
|
+
}
|
|
28
|
+
function resolveSlackStreamingMode(params = {}) {
|
|
29
|
+
const parsedStreaming = parseStreamingMode(getChannelStreamingConfigObject(params)?.mode ?? params.streaming);
|
|
30
|
+
if (parsedStreaming) return parsedStreaming;
|
|
31
|
+
const legacyStreamMode = parseSlackLegacyDraftStreamMode(params.streamMode);
|
|
32
|
+
if (legacyStreamMode) return mapSlackLegacyDraftStreamModeToStreaming(legacyStreamMode);
|
|
33
|
+
if (typeof params.streaming === "boolean") return params.streaming ? "partial" : "off";
|
|
34
|
+
return "partial";
|
|
35
|
+
}
|
|
36
|
+
function resolveSlackNativeStreaming(params = {}) {
|
|
37
|
+
const canonical = resolveChannelStreamingNativeTransport(params);
|
|
38
|
+
if (typeof canonical === "boolean") return canonical;
|
|
39
|
+
if (typeof params.streaming === "boolean") return params.streaming;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { resolveSlackNativeStreaming as n, resolveSlackStreamingMode as r, mapStreamingModeToSlackLegacyDraftStreamMode as t };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { buildMessagingTarget, ensureTargetId, parseMentionPrefixOrAtUserTarget, requireTargetKind } from "openclaw/plugin-sdk/messaging-targets";
|
|
2
|
+
//#region extensions/slack/src/target-parsing.ts
|
|
3
|
+
function parseSlackTarget(raw, options = {}) {
|
|
4
|
+
const trimmed = raw.trim();
|
|
5
|
+
if (!trimmed) return;
|
|
6
|
+
const userTarget = parseMentionPrefixOrAtUserTarget({
|
|
7
|
+
raw: trimmed,
|
|
8
|
+
mentionPattern: /^<@([A-Z0-9]+)>$/i,
|
|
9
|
+
prefixes: [
|
|
10
|
+
{
|
|
11
|
+
prefix: "user:",
|
|
12
|
+
kind: "user"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
prefix: "channel:",
|
|
16
|
+
kind: "channel"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
prefix: "slack:",
|
|
20
|
+
kind: "user"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
atUserPattern: /^[A-Z0-9]+$/i,
|
|
24
|
+
atUserErrorMessage: "Slack DMs require a user id (use user:<id> or <@id>)"
|
|
25
|
+
});
|
|
26
|
+
if (userTarget) return userTarget;
|
|
27
|
+
if (trimmed.startsWith("#")) return buildMessagingTarget("channel", ensureTargetId({
|
|
28
|
+
candidate: trimmed.slice(1).trim(),
|
|
29
|
+
pattern: /^[A-Z0-9]+$/i,
|
|
30
|
+
errorMessage: "Slack channels require a channel id (use channel:<id>)"
|
|
31
|
+
}), trimmed);
|
|
32
|
+
if (options.defaultKind) return buildMessagingTarget(options.defaultKind, trimmed, trimmed);
|
|
33
|
+
return buildMessagingTarget("channel", trimmed, trimmed);
|
|
34
|
+
}
|
|
35
|
+
function resolveSlackChannelId(raw) {
|
|
36
|
+
return requireTargetKind({
|
|
37
|
+
platform: "Slack",
|
|
38
|
+
target: parseSlackTarget(raw, { defaultKind: "channel" }),
|
|
39
|
+
kind: "channel"
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function normalizeSlackMessagingTarget(raw) {
|
|
43
|
+
return parseSlackTarget(raw, { defaultKind: "channel" })?.normalized;
|
|
44
|
+
}
|
|
45
|
+
function looksLikeSlackTargetId(raw) {
|
|
46
|
+
const trimmed = raw.trim();
|
|
47
|
+
if (!trimmed) return false;
|
|
48
|
+
if (/^<@([A-Z0-9]+)>$/i.test(trimmed)) return true;
|
|
49
|
+
if (/^(user|channel):/i.test(trimmed)) return true;
|
|
50
|
+
if (/^slack:/i.test(trimmed)) return true;
|
|
51
|
+
if (/^[@#]/.test(trimmed)) return true;
|
|
52
|
+
return /^[CUWGD][A-Z0-9]{8,}$/i.test(trimmed);
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { resolveSlackChannelId as i, normalizeSlackMessagingTarget as n, parseSlackTarget as r, looksLikeSlackTargetId as t };
|
package/dist/test-api.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { a as createSlackActions, t as slackPlugin } from "./channel-DRjHBTDB.js";
|
|
2
|
+
import { n as setSlackRuntime } from "./runtime-Bo-KHM-F.js";
|
|
3
|
+
import { t as sendMessageSlack } from "./send-D_A9kL-C.js";
|
|
4
|
+
import { t as prepareSlackMessage } from "./prepare-D3YqV8jB.js";
|
|
5
|
+
import { t as createInboundSlackTestContext } from "./prepare.test-helpers-DVcjRhfG.js";
|
|
6
|
+
import { t as createSlackOutboundPayloadHarness } from "./outbound-payload.test-harness-CVCamg1x.js";
|
|
7
|
+
import { n as slackOutbound } from "./outbound-adapter-B_5sEhCg.js";
|
|
8
|
+
export { createInboundSlackTestContext, createSlackActions, createSlackOutboundPayloadHarness, prepareSlackMessage, sendMessageSlack, setSlackRuntime, slackOutbound, slackPlugin };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
2
|
+
//#region extensions/slack/src/truncate.ts
|
|
3
|
+
function truncateSlackText(value, max) {
|
|
4
|
+
const trimmed = value.trim();
|
|
5
|
+
if (trimmed.length <= max) return trimmed;
|
|
6
|
+
if (max <= 1) return trimmed.slice(0, max);
|
|
7
|
+
return `${trimmed.slice(0, max - 1)}…`;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region extensions/slack/src/limits.ts
|
|
11
|
+
const SLACK_TEXT_LIMIT = 8e3;
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region extensions/slack/src/thread-ts.ts
|
|
14
|
+
const SLACK_THREAD_TS_PATTERN = /^\d+\.\d+$/;
|
|
15
|
+
function normalizeSlackThreadTsCandidate(value) {
|
|
16
|
+
if (typeof value !== "string") return;
|
|
17
|
+
const normalized = normalizeOptionalString(value);
|
|
18
|
+
return normalized && SLACK_THREAD_TS_PATTERN.test(normalized) ? normalized : void 0;
|
|
19
|
+
}
|
|
20
|
+
function resolveSlackThreadTsValue(params) {
|
|
21
|
+
return normalizeSlackThreadTsCandidate(params.replyToId) ?? normalizeSlackThreadTsCandidate(params.threadId);
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { truncateSlackText as i, resolveSlackThreadTsValue as n, SLACK_TEXT_LIMIT as r, normalizeSlackThreadTsCandidate as t };
|