@elizaos/plugin-slack 2.0.0-alpha.4 → 2.0.0-alpha.5
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/index.js +41 -10
- package/dist/index.js.map +21 -21
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -252,7 +252,12 @@ Respond with a JSON object like:
|
|
|
252
252
|
Only respond with the JSON object, no other text.`;
|
|
253
253
|
var editMessage = {
|
|
254
254
|
name: "SLACK_EDIT_MESSAGE",
|
|
255
|
-
similes: [
|
|
255
|
+
similes: [
|
|
256
|
+
"UPDATE_SLACK_MESSAGE",
|
|
257
|
+
"MODIFY_MESSAGE",
|
|
258
|
+
"CHANGE_MESSAGE",
|
|
259
|
+
"SLACK_UPDATE"
|
|
260
|
+
],
|
|
256
261
|
description: "Edit an existing Slack message",
|
|
257
262
|
validate: async (_runtime, message, _state) => {
|
|
258
263
|
return message.content.source === "slack";
|
|
@@ -487,7 +492,13 @@ Respond with a JSON object like:
|
|
|
487
492
|
Only respond with the JSON object, no other text.`;
|
|
488
493
|
var getUserInfo = {
|
|
489
494
|
name: "SLACK_GET_USER_INFO",
|
|
490
|
-
similes: [
|
|
495
|
+
similes: [
|
|
496
|
+
"GET_SLACK_USER",
|
|
497
|
+
"USER_INFO",
|
|
498
|
+
"SLACK_USER",
|
|
499
|
+
"MEMBER_INFO",
|
|
500
|
+
"WHO_IS"
|
|
501
|
+
],
|
|
491
502
|
description: "Get information about a Slack user",
|
|
492
503
|
validate: async (_runtime, message, _state) => {
|
|
493
504
|
return message.content.source === "slack";
|
|
@@ -633,7 +644,12 @@ var getUserInfo_default = getUserInfo;
|
|
|
633
644
|
// src/actions/listChannels.ts
|
|
634
645
|
var listChannels = {
|
|
635
646
|
name: "SLACK_LIST_CHANNELS",
|
|
636
|
-
similes: [
|
|
647
|
+
similes: [
|
|
648
|
+
"LIST_SLACK_CHANNELS",
|
|
649
|
+
"SHOW_CHANNELS",
|
|
650
|
+
"GET_CHANNELS",
|
|
651
|
+
"CHANNELS_LIST"
|
|
652
|
+
],
|
|
637
653
|
description: "List available Slack channels in the workspace",
|
|
638
654
|
validate: async (_runtime, message, _state) => {
|
|
639
655
|
return message.content.source === "slack";
|
|
@@ -744,7 +760,12 @@ Respond with a JSON object like:
|
|
|
744
760
|
Only respond with the JSON object, no other text.`;
|
|
745
761
|
var listPins = {
|
|
746
762
|
name: "SLACK_LIST_PINS",
|
|
747
|
-
similes: [
|
|
763
|
+
similes: [
|
|
764
|
+
"LIST_SLACK_PINS",
|
|
765
|
+
"SHOW_PINS",
|
|
766
|
+
"GET_PINNED_MESSAGES",
|
|
767
|
+
"PINNED_MESSAGES"
|
|
768
|
+
],
|
|
748
769
|
description: "List pinned messages in a Slack channel",
|
|
749
770
|
validate: async (_runtime, message, _state) => {
|
|
750
771
|
return message.content.source === "slack";
|
|
@@ -1041,7 +1062,13 @@ Respond with a JSON object like:
|
|
|
1041
1062
|
Only respond with the JSON object, no other text.`;
|
|
1042
1063
|
var reactToMessage = {
|
|
1043
1064
|
name: "SLACK_REACT_TO_MESSAGE",
|
|
1044
|
-
similes: [
|
|
1065
|
+
similes: [
|
|
1066
|
+
"ADD_SLACK_REACTION",
|
|
1067
|
+
"REACT_SLACK",
|
|
1068
|
+
"SLACK_EMOJI",
|
|
1069
|
+
"ADD_EMOJI",
|
|
1070
|
+
"REMOVE_REACTION"
|
|
1071
|
+
],
|
|
1045
1072
|
description: "Add or remove an emoji reaction to a Slack message",
|
|
1046
1073
|
validate: async (_runtime, message, _state) => {
|
|
1047
1074
|
return message.content.source === "slack";
|
|
@@ -1517,7 +1544,12 @@ Respond with a JSON object like:
|
|
|
1517
1544
|
Only respond with the JSON object, no other text.`;
|
|
1518
1545
|
var unpinMessage = {
|
|
1519
1546
|
name: "SLACK_UNPIN_MESSAGE",
|
|
1520
|
-
similes: [
|
|
1547
|
+
similes: [
|
|
1548
|
+
"UNPIN_SLACK_MESSAGE",
|
|
1549
|
+
"UNPIN_MESSAGE",
|
|
1550
|
+
"SLACK_UNPIN",
|
|
1551
|
+
"REMOVE_PIN"
|
|
1552
|
+
],
|
|
1521
1553
|
description: "Unpin a message from a Slack channel",
|
|
1522
1554
|
validate: async (_runtime, message, _state) => {
|
|
1523
1555
|
return message.content.source === "slack";
|
|
@@ -1955,6 +1987,7 @@ class SlackService extends Service {
|
|
|
1955
1987
|
botToken = null;
|
|
1956
1988
|
appToken = null;
|
|
1957
1989
|
signingSecret = null;
|
|
1990
|
+
userToken = undefined;
|
|
1958
1991
|
allowedChannelIds = new Set;
|
|
1959
1992
|
dynamicChannelIds = new Set;
|
|
1960
1993
|
userCache = new Map;
|
|
@@ -1967,9 +2000,7 @@ class SlackService extends Service {
|
|
|
1967
2000
|
this.settings = this.loadSettings();
|
|
1968
2001
|
const channelIdsRaw = runtime.getSetting("SLACK_CHANNEL_IDS");
|
|
1969
2002
|
if (channelIdsRaw?.trim()) {
|
|
1970
|
-
channelIdsRaw.split(",").map((s) => s.trim()).filter((s) => s.length > 0 && isValidChannelId(s)).forEach((id) =>
|
|
1971
|
-
this.allowedChannelIds.add(id);
|
|
1972
|
-
});
|
|
2003
|
+
channelIdsRaw.split(",").map((s) => s.trim()).filter((s) => s.length > 0 && isValidChannelId(s)).forEach((id) => this.allowedChannelIds.add(id));
|
|
1973
2004
|
this.runtime.logger.debug({
|
|
1974
2005
|
src: "plugin:slack",
|
|
1975
2006
|
agentId: this.runtime.agentId,
|
|
@@ -3178,4 +3209,4 @@ export {
|
|
|
3178
3209
|
DEFAULT_ACCOUNT_ID
|
|
3179
3210
|
};
|
|
3180
3211
|
|
|
3181
|
-
//# debugId=
|
|
3212
|
+
//# debugId=2E7E3AD8220B8E3964756E2164756E21
|