@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,49 @@
|
|
|
1
|
+
import { f as createSlackMonitorContext } from "./room-context-0vovmZPU.js";
|
|
2
|
+
import "openclaw/plugin-sdk/temp-path";
|
|
3
|
+
//#region extensions/slack/src/monitor/message-handler/prepare.test-helpers.ts
|
|
4
|
+
function createInboundSlackTestContext(params) {
|
|
5
|
+
return createSlackMonitorContext({
|
|
6
|
+
cfg: params.cfg,
|
|
7
|
+
accountId: "default",
|
|
8
|
+
botToken: "token",
|
|
9
|
+
app: { client: params.appClient ?? {} },
|
|
10
|
+
runtime: {},
|
|
11
|
+
botUserId: "B1",
|
|
12
|
+
botId: "B1",
|
|
13
|
+
teamId: "T1",
|
|
14
|
+
apiAppId: "A1",
|
|
15
|
+
historyLimit: 0,
|
|
16
|
+
dmHistoryLimit: params.dmHistoryLimit,
|
|
17
|
+
sessionScope: "per-sender",
|
|
18
|
+
mainKey: "main",
|
|
19
|
+
dmEnabled: true,
|
|
20
|
+
dmPolicy: "open",
|
|
21
|
+
allowFrom: ["*"],
|
|
22
|
+
allowNameMatching: false,
|
|
23
|
+
groupDmEnabled: true,
|
|
24
|
+
groupDmChannels: [],
|
|
25
|
+
defaultRequireMention: params.defaultRequireMention ?? true,
|
|
26
|
+
channelsConfig: params.channelsConfig,
|
|
27
|
+
groupPolicy: "open",
|
|
28
|
+
useAccessGroups: false,
|
|
29
|
+
reactionMode: "off",
|
|
30
|
+
reactionAllowlist: [],
|
|
31
|
+
replyToMode: params.replyToMode ?? "off",
|
|
32
|
+
threadHistoryScope: "thread",
|
|
33
|
+
threadInheritParent: false,
|
|
34
|
+
threadRequireExplicitMention: params.threadRequireExplicitMention ?? false,
|
|
35
|
+
slashCommand: {
|
|
36
|
+
enabled: false,
|
|
37
|
+
name: "openclaw",
|
|
38
|
+
sessionPrefix: "slack:slash",
|
|
39
|
+
ephemeral: true
|
|
40
|
+
},
|
|
41
|
+
textLimit: 4e3,
|
|
42
|
+
ackReactionScope: "group-mentions",
|
|
43
|
+
typingReaction: "",
|
|
44
|
+
mediaMaxBytes: 1024,
|
|
45
|
+
removeAckAfterReply: false
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { createInboundSlackTestContext as t };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-CiIaOW0V.js";
|
|
2
|
+
import { r as createSlackWebClient } from "./client-CPe4GmDR.js";
|
|
3
|
+
import { t as formatSlackError } from "./errors-BYFHR24f.js";
|
|
4
|
+
import { withTimeout } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
5
|
+
//#region extensions/slack/src/probe.ts
|
|
6
|
+
var probe_exports = /* @__PURE__ */ __exportAll({ probeSlack: () => probeSlack });
|
|
7
|
+
async function probeSlack(token, timeoutMs = 2500) {
|
|
8
|
+
const client = createSlackWebClient(token);
|
|
9
|
+
const start = Date.now();
|
|
10
|
+
try {
|
|
11
|
+
const result = await withTimeout(client.auth.test(), timeoutMs);
|
|
12
|
+
if (!result.ok) return {
|
|
13
|
+
ok: false,
|
|
14
|
+
status: 200,
|
|
15
|
+
error: result.error ?? "unknown",
|
|
16
|
+
elapsedMs: Date.now() - start
|
|
17
|
+
};
|
|
18
|
+
return {
|
|
19
|
+
ok: true,
|
|
20
|
+
status: 200,
|
|
21
|
+
elapsedMs: Date.now() - start,
|
|
22
|
+
bot: {
|
|
23
|
+
id: result.user_id,
|
|
24
|
+
name: result.user
|
|
25
|
+
},
|
|
26
|
+
team: {
|
|
27
|
+
id: result.team_id,
|
|
28
|
+
name: result.team
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
} catch (err) {
|
|
32
|
+
const message = formatSlackError(err);
|
|
33
|
+
return {
|
|
34
|
+
ok: false,
|
|
35
|
+
status: typeof err.statusCode === "number" ? err.statusCode : null,
|
|
36
|
+
error: message,
|
|
37
|
+
elapsedMs: Date.now() - start
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { probe_exports as n, probeSlack as t };
|