@elizaos/plugin-discord 2.0.0-alpha.9 → 2.0.0-beta.1
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/LICENSE +21 -0
- package/README.md +532 -0
- package/dist/account-client-pool.d.ts +35 -0
- package/dist/account-client-pool.d.ts.map +1 -0
- package/dist/accounts.d.ts.map +1 -1
- package/dist/actions/actionResultSemantics.d.ts +9 -0
- package/dist/actions/actionResultSemantics.d.ts.map +1 -0
- package/dist/actions/setup-credentials.d.ts +25 -0
- package/dist/actions/setup-credentials.d.ts.map +1 -0
- package/dist/addressing.d.ts +15 -0
- package/dist/addressing.d.ts.map +1 -0
- package/dist/allowlist.d.ts.map +1 -1
- package/dist/attachments.d.ts +1 -0
- package/dist/attachments.d.ts.map +1 -1
- package/dist/auto-enable.d.ts +4 -0
- package/dist/auto-enable.d.ts.map +1 -0
- package/dist/banner.d.ts.map +1 -1
- package/dist/compat.d.ts +4 -3
- package/dist/compat.d.ts.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/connector-account-provider.d.ts +26 -0
- package/dist/connector-account-provider.d.ts.map +1 -0
- package/dist/debouncer.d.ts +28 -0
- package/dist/debouncer.d.ts.map +1 -0
- package/dist/discord-avatar-cache.d.ts +10 -0
- package/dist/discord-avatar-cache.d.ts.map +1 -0
- package/dist/discord-commands.d.ts +16 -0
- package/dist/discord-commands.d.ts.map +1 -0
- package/dist/discord-events.d.ts +56 -0
- package/dist/discord-events.d.ts.map +1 -0
- package/dist/discord-history.d.ts +56 -0
- package/dist/discord-history.d.ts.map +1 -0
- package/dist/discord-interactions.d.ts +47 -0
- package/dist/discord-interactions.d.ts.map +1 -0
- package/dist/discord-local-service.d.ts +94 -0
- package/dist/discord-local-service.d.ts.map +1 -0
- package/dist/discord-profiles.d.ts +26 -0
- package/dist/discord-profiles.d.ts.map +1 -0
- package/dist/discord-reactions.d.ts +30 -0
- package/dist/discord-reactions.d.ts.map +1 -0
- package/dist/draft-chunking.d.ts +9 -0
- package/dist/draft-chunking.d.ts.map +1 -0
- package/dist/draft-stream.d.ts +23 -0
- package/dist/draft-stream.d.ts.map +1 -0
- package/dist/environment.d.ts +1 -0
- package/dist/environment.d.ts.map +1 -1
- package/dist/generated/specs/spec-helpers.d.ts +4 -17
- package/dist/generated/specs/spec-helpers.d.ts.map +1 -1
- package/dist/generated/specs/specs.d.ts +13 -48
- package/dist/generated/specs/specs.d.ts.map +1 -1
- package/dist/identity.d.ts +8 -0
- package/dist/identity.d.ts.map +1 -0
- package/dist/inbound-envelope.d.ts +8 -0
- package/dist/inbound-envelope.d.ts.map +1 -0
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.d.ts +22 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10171 -10073
- package/dist/index.js.map +49 -125
- package/dist/message-coalesce.d.ts +31 -0
- package/dist/message-coalesce.d.ts.map +1 -0
- package/dist/messages.d.ts +13 -2
- package/dist/messages.d.ts.map +1 -1
- package/dist/messaging.d.ts.map +1 -1
- package/dist/native-commands.d.ts.map +1 -1
- package/dist/owner-pairing-service.d.ts +73 -0
- package/dist/owner-pairing-service.d.ts.map +1 -0
- package/dist/permissionEvents.d.ts.map +1 -1
- package/dist/permissions.d.ts.map +1 -1
- package/dist/profileSync.d.ts +8 -0
- package/dist/profileSync.d.ts.map +1 -0
- package/dist/reasoning-tags.d.ts +2 -0
- package/dist/reasoning-tags.d.ts.map +1 -0
- package/dist/service.d.ts +156 -261
- package/dist/service.d.ts.map +1 -1
- package/dist/setup-routes.d.ts +23 -0
- package/dist/setup-routes.d.ts.map +1 -0
- package/dist/slash-commands.d.ts +39 -0
- package/dist/slash-commands.d.ts.map +1 -0
- package/dist/staleness.d.ts +25 -0
- package/dist/staleness.d.ts.map +1 -0
- package/dist/status-reactions.d.ts +11 -0
- package/dist/status-reactions.d.ts.map +1 -0
- package/dist/tests.d.ts.map +1 -1
- package/dist/types.d.ts +27 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/typing.d.ts +7 -0
- package/dist/typing.d.ts.map +1 -0
- package/dist/user-account-scraper/discord-browser-scraper.d.ts +118 -0
- package/dist/user-account-scraper/discord-browser-scraper.d.ts.map +1 -0
- package/dist/user-account-scraper/discord-desktop-cdp.d.ts +33 -0
- package/dist/user-account-scraper/discord-desktop-cdp.d.ts.map +1 -0
- package/dist/user-account-scraper/index.d.ts +15 -0
- package/dist/user-account-scraper/index.d.ts.map +1 -0
- package/dist/user-account-scraper/service.d.ts +92 -0
- package/dist/user-account-scraper/service.d.ts.map +1 -0
- package/dist/utils.d.ts +11 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/vitest.config.d.ts +3 -0
- package/dist/vitest.config.d.ts.map +1 -0
- package/dist/voice.d.ts +8 -3
- package/dist/voice.d.ts.map +1 -1
- package/package.json +23 -20
- package/dist/actions/chatWithAttachments.d.ts +0 -4
- package/dist/actions/chatWithAttachments.d.ts.map +0 -1
- package/dist/actions/createPoll.d.ts +0 -4
- package/dist/actions/createPoll.d.ts.map +0 -1
- package/dist/actions/deleteMessage.d.ts +0 -4
- package/dist/actions/deleteMessage.d.ts.map +0 -1
- package/dist/actions/downloadMedia.d.ts +0 -4
- package/dist/actions/downloadMedia.d.ts.map +0 -1
- package/dist/actions/editMessage.d.ts +0 -4
- package/dist/actions/editMessage.d.ts.map +0 -1
- package/dist/actions/getUserInfo.d.ts +0 -4
- package/dist/actions/getUserInfo.d.ts.map +0 -1
- package/dist/actions/joinChannel.d.ts +0 -4
- package/dist/actions/joinChannel.d.ts.map +0 -1
- package/dist/actions/leaveChannel.d.ts +0 -4
- package/dist/actions/leaveChannel.d.ts.map +0 -1
- package/dist/actions/listChannels.d.ts +0 -4
- package/dist/actions/listChannels.d.ts.map +0 -1
- package/dist/actions/pinMessage.d.ts +0 -4
- package/dist/actions/pinMessage.d.ts.map +0 -1
- package/dist/actions/reactToMessage.d.ts +0 -4
- package/dist/actions/reactToMessage.d.ts.map +0 -1
- package/dist/actions/readChannel.d.ts +0 -4
- package/dist/actions/readChannel.d.ts.map +0 -1
- package/dist/actions/searchMessages.d.ts +0 -4
- package/dist/actions/searchMessages.d.ts.map +0 -1
- package/dist/actions/sendDM.d.ts +0 -4
- package/dist/actions/sendDM.d.ts.map +0 -1
- package/dist/actions/sendMessage.d.ts +0 -4
- package/dist/actions/sendMessage.d.ts.map +0 -1
- package/dist/actions/serverInfo.d.ts +0 -4
- package/dist/actions/serverInfo.d.ts.map +0 -1
- package/dist/actions/summarizeConversation.d.ts +0 -4
- package/dist/actions/summarizeConversation.d.ts.map +0 -1
- package/dist/actions/transcribeMedia.d.ts +0 -4
- package/dist/actions/transcribeMedia.d.ts.map +0 -1
- package/dist/actions/unpinMessage.d.ts +0 -4
- package/dist/actions/unpinMessage.d.ts.map +0 -1
- package/dist/generated/prompts/typescript/prompts.d.ts +0 -44
- package/dist/generated/prompts/typescript/prompts.d.ts.map +0 -1
- package/dist/providers/channelState.d.ts +0 -14
- package/dist/providers/channelState.d.ts.map +0 -1
- package/dist/providers/guildInfo.d.ts +0 -15
- package/dist/providers/guildInfo.d.ts.map +0 -1
- package/dist/providers/voiceState.d.ts +0 -12
- package/dist/providers/voiceState.d.ts.map +0 -1
package/dist/environment.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const DISCORD_DEFAULTS: {
|
|
|
8
8
|
readonly ALLOWED_CHANNEL_IDS: string[];
|
|
9
9
|
readonly DM_POLICY: "open" | "allowlist" | "pairing" | "disabled";
|
|
10
10
|
readonly ALLOW_FROM: string[];
|
|
11
|
+
readonly SYNC_PROFILE: boolean;
|
|
11
12
|
};
|
|
12
13
|
export declare const discordEnvSchema: z.ZodObject<{
|
|
13
14
|
DISCORD_API_TOKEN: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAqB/C,eAAO,MAAM,gBAAgB;;;;;
|
|
1
|
+
{"version":3,"file":"environment.d.ts","sourceRoot":"","sources":["../environment.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAqB/C,eAAO,MAAM,gBAAgB;;;;;wBAezB,MAAM,GACN,WAAW,GACX,SAAS,GACT,UAAU;;;CAGJ,CAAC;AAEX,eAAO,MAAM,gBAAgB;;;;;;iBAyB3B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE7D,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,GAAG,eAAe,CAgH1E;AAED,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,aAAa,GACpB,OAAO,CAAC,aAAa,CAAC,CA4BxB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Helper functions to lookup action/provider
|
|
2
|
+
* Helper functions to lookup action/provider specs by name.
|
|
3
3
|
* These allow language-specific implementations to import their text content
|
|
4
4
|
* (description, similes, examples) from the centralized specs.
|
|
5
5
|
*
|
|
6
|
-
* DO NOT EDIT the spec data - update prompts/actions.json, prompts/providers.json
|
|
6
|
+
* DO NOT EDIT the spec data - update prompts/actions.json, prompts/providers.json and regenerate.
|
|
7
7
|
*/
|
|
8
|
-
import { type ActionDoc, type
|
|
8
|
+
import { type ActionDoc, type ProviderDoc } from "./specs";
|
|
9
9
|
/**
|
|
10
10
|
* Get an action spec by name from the core specs.
|
|
11
11
|
* @param name - The action name
|
|
@@ -32,18 +32,5 @@ export declare function getProviderSpec(name: string): ProviderDoc | undefined;
|
|
|
32
32
|
* @throws Error if the provider is not found
|
|
33
33
|
*/
|
|
34
34
|
export declare function requireProviderSpec(name: string): ProviderDoc;
|
|
35
|
-
|
|
36
|
-
* Get an evaluator spec by name from the core specs.
|
|
37
|
-
* @param name - The evaluator name
|
|
38
|
-
* @returns The evaluator spec or undefined if not found
|
|
39
|
-
*/
|
|
40
|
-
export declare function getEvaluatorSpec(name: string): EvaluatorDoc | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Get an evaluator spec by name, throwing if not found.
|
|
43
|
-
* @param name - The evaluator name
|
|
44
|
-
* @returns The evaluator spec
|
|
45
|
-
* @throws Error if the evaluator is not found
|
|
46
|
-
*/
|
|
47
|
-
export declare function requireEvaluatorSpec(name: string): EvaluatorDoc;
|
|
48
|
-
export type { ActionDoc, ProviderDoc, EvaluatorDoc };
|
|
35
|
+
export type { ActionDoc, ProviderDoc };
|
|
49
36
|
//# sourceMappingURL=spec-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-helpers.d.ts","sourceRoot":"","sources":["../../../generated/specs/spec-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"spec-helpers.d.ts","sourceRoot":"","sources":["../../../generated/specs/spec-helpers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,WAAW,EACjB,MAAM,SAAS,CAAC;AAgBjB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAEjE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAMzD;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAErE;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAM7D;AAGD,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Auto-generated canonical action/provider
|
|
2
|
+
* Auto-generated canonical action/provider docs for plugin-discord.
|
|
3
3
|
* DO NOT EDIT - Generated from prompts/specs/**.
|
|
4
4
|
*/
|
|
5
5
|
export type ActionDoc = {
|
|
6
6
|
name: string;
|
|
7
7
|
description: string;
|
|
8
|
+
descriptionCompressed?: string;
|
|
8
9
|
similes?: readonly string[];
|
|
9
10
|
parameters?: readonly unknown[];
|
|
10
11
|
examples?: readonly (readonly unknown[])[];
|
|
@@ -12,76 +13,40 @@ export type ActionDoc = {
|
|
|
12
13
|
export type ProviderDoc = {
|
|
13
14
|
name: string;
|
|
14
15
|
description: string;
|
|
16
|
+
descriptionCompressed?: string;
|
|
15
17
|
position?: number;
|
|
16
18
|
dynamic?: boolean;
|
|
17
19
|
};
|
|
18
|
-
export type EvaluatorDoc = {
|
|
19
|
-
name: string;
|
|
20
|
-
description: string;
|
|
21
|
-
similes?: readonly string[];
|
|
22
|
-
alwaysRun?: boolean;
|
|
23
|
-
examples?: readonly unknown[];
|
|
24
|
-
};
|
|
25
20
|
export declare const coreActionsSpec: {
|
|
26
21
|
readonly version: "1.0.0";
|
|
27
22
|
readonly actions: readonly [{
|
|
28
|
-
readonly name: "
|
|
29
|
-
readonly description: "";
|
|
23
|
+
readonly name: "DISCORD_SETUP_CREDENTIALS";
|
|
24
|
+
readonly description: "Start Discord credential setup or account pairing when the user requests setup.";
|
|
25
|
+
readonly descriptionCompressed: "Set up Discord credentials.";
|
|
26
|
+
readonly similes: readonly ["SETUP_CREDENTIALS", "PAIR_CONNECTOR", "CONNECT_ACCOUNT"];
|
|
30
27
|
readonly parameters: readonly [];
|
|
31
28
|
}];
|
|
32
29
|
};
|
|
33
30
|
export declare const allActionsSpec: {
|
|
34
31
|
readonly version: "1.0.0";
|
|
35
32
|
readonly actions: readonly [{
|
|
36
|
-
readonly name: "
|
|
37
|
-
readonly description: "";
|
|
33
|
+
readonly name: "DISCORD_SETUP_CREDENTIALS";
|
|
34
|
+
readonly description: "Start Discord credential setup or account pairing when the user requests setup.";
|
|
35
|
+
readonly descriptionCompressed: "Set up Discord credentials.";
|
|
36
|
+
readonly similes: readonly ["SETUP_CREDENTIALS", "PAIR_CONNECTOR", "CONNECT_ACCOUNT"];
|
|
38
37
|
readonly parameters: readonly [];
|
|
39
38
|
}];
|
|
40
39
|
};
|
|
41
40
|
export declare const coreProvidersSpec: {
|
|
42
41
|
readonly version: "1.0.0";
|
|
43
|
-
readonly providers: readonly [
|
|
44
|
-
readonly name: "channelState";
|
|
45
|
-
readonly description: "Provides information about the current Discord channel state, including whether it's a DM or group channel, channel name, and server name.";
|
|
46
|
-
readonly dynamic: true;
|
|
47
|
-
}, {
|
|
48
|
-
readonly name: "guildInfo";
|
|
49
|
-
readonly description: "Provides information about the current Discord server/guild including member count, creation date, channels, roles, and bot permissions.";
|
|
50
|
-
readonly dynamic: true;
|
|
51
|
-
}, {
|
|
52
|
-
readonly name: "voiceState";
|
|
53
|
-
readonly description: "Provides information about the voice state of the agent, including whether it is currently in a voice channel.";
|
|
54
|
-
readonly dynamic: true;
|
|
55
|
-
}];
|
|
42
|
+
readonly providers: readonly [];
|
|
56
43
|
};
|
|
57
44
|
export declare const allProvidersSpec: {
|
|
58
45
|
readonly version: "1.0.0";
|
|
59
|
-
readonly providers: readonly [
|
|
60
|
-
readonly name: "channelState";
|
|
61
|
-
readonly description: "Provides information about the current Discord channel state, including whether it's a DM or group channel, channel name, and server name.";
|
|
62
|
-
readonly dynamic: true;
|
|
63
|
-
}, {
|
|
64
|
-
readonly name: "guildInfo";
|
|
65
|
-
readonly description: "Provides information about the current Discord server/guild including member count, creation date, channels, roles, and bot permissions.";
|
|
66
|
-
readonly dynamic: true;
|
|
67
|
-
}, {
|
|
68
|
-
readonly name: "voiceState";
|
|
69
|
-
readonly description: "Provides information about the voice state of the agent, including whether it is currently in a voice channel.";
|
|
70
|
-
readonly dynamic: true;
|
|
71
|
-
}];
|
|
72
|
-
};
|
|
73
|
-
export declare const coreEvaluatorsSpec: {
|
|
74
|
-
readonly version: "1.0.0";
|
|
75
|
-
readonly evaluators: readonly [];
|
|
76
|
-
};
|
|
77
|
-
export declare const allEvaluatorsSpec: {
|
|
78
|
-
readonly version: "1.0.0";
|
|
79
|
-
readonly evaluators: readonly [];
|
|
46
|
+
readonly providers: readonly [];
|
|
80
47
|
};
|
|
81
48
|
export declare const coreActionDocs: readonly ActionDoc[];
|
|
82
49
|
export declare const allActionDocs: readonly ActionDoc[];
|
|
83
50
|
export declare const coreProviderDocs: readonly ProviderDoc[];
|
|
84
51
|
export declare const allProviderDocs: readonly ProviderDoc[];
|
|
85
|
-
export declare const coreEvaluatorDocs: readonly EvaluatorDoc[];
|
|
86
|
-
export declare const allEvaluatorDocs: readonly EvaluatorDoc[];
|
|
87
52
|
//# sourceMappingURL=specs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../../generated/specs/specs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../../generated/specs/specs.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B,UAAU,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAChC,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,OAAO,EAAE,CAAC,EAAE,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;;;;CAelB,CAAC;AACX,eAAO,MAAM,cAAc;;;;;;;;;CAejB,CAAC;AACX,eAAO,MAAM,iBAAiB;;;CAGpB,CAAC;AACX,eAAO,MAAM,gBAAgB;;;CAGnB,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,SAAS,SAAS,EAA4B,CAAC;AAC5E,eAAO,MAAM,aAAa,EAAE,SAAS,SAAS,EAA2B,CAAC;AAC1E,eAAO,MAAM,gBAAgB,EAAE,SAAS,WAAW,EAAgC,CAAC;AACpF,eAAO,MAAM,eAAe,EAAE,SAAS,WAAW,EAA+B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type IAgentRuntime, type Metadata } from "@elizaos/core";
|
|
2
|
+
export declare function resolveElizaOwnerEntityId(runtime: IAgentRuntime): string;
|
|
3
|
+
export declare function resolveDiscordRuntimeEntityId(runtime: IAgentRuntime, userId: string, ownerDiscordUserIds?: Iterable<string>): string;
|
|
4
|
+
export declare function extractDiscordOwnerUserIds(application: unknown): string[];
|
|
5
|
+
export declare function parseDiscordOwnerUserIds(value: unknown): string[];
|
|
6
|
+
export declare function buildDiscordWorldMetadata(runtime: IAgentRuntime, guildOwnerId: string | undefined): Metadata | undefined;
|
|
7
|
+
export declare function buildDiscordEntityMetadata(userId: string, userName: string, name: string, globalName?: string, avatarUrl?: string): Metadata;
|
|
8
|
+
//# sourceMappingURL=identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,aAAa,EAClB,KAAK,QAAQ,EAGb,MAAM,eAAe,CAAC;AA+CvB,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,CAQxE;AAED,wBAAgB,6BAA6B,CAC5C,OAAO,EAAE,aAAa,EACtB,MAAM,EAAE,MAAM,EACd,mBAAmB,GAAE,QAAQ,CAAC,MAAM,CAAM,GACxC,MAAM,CAOR;AAED,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE,CA2CzE;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAmBjE;AAED,wBAAgB,yBAAyB,CACxC,OAAO,EAAE,aAAa,EACtB,YAAY,EAAE,MAAM,GAAG,SAAS,GAC9B,QAAQ,GAAG,SAAS,CAqBtB;AAED,wBAAgB,0BAA0B,CACzC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,EACnB,SAAS,CAAC,EAAE,MAAM,GAChB,QAAQ,CA6BV"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Message as DiscordMessage } from "discord.js";
|
|
2
|
+
export type ChatType = "dm" | "channel" | "thread" | "forum";
|
|
3
|
+
export interface EnvelopeResult {
|
|
4
|
+
formattedContent: string;
|
|
5
|
+
chatType: ChatType;
|
|
6
|
+
}
|
|
7
|
+
export declare function formatInboundEnvelope(message: DiscordMessage, rawContent: string): Promise<EnvelopeResult>;
|
|
8
|
+
//# sourceMappingURL=inbound-envelope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inbound-envelope.d.ts","sourceRoot":"","sources":["../inbound-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,EAEN,KAAK,OAAO,IAAI,cAAc,EAG9B,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE7D,MAAM,WAAW,cAAc;IAC9B,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACnB;AAkFD,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,GAChB,OAAO,CAAC,cAAc,CAAC,CAuCzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../index.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AAK3D;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"index.browser.d.ts","sourceRoot":"","sources":["../index.browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AAK3D;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,MAU3B,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { type Plugin } from "@elizaos/core";
|
|
2
|
+
declare const discordPlugin: Plugin;
|
|
3
|
+
export default discordPlugin;
|
|
4
|
+
export { DEFAULT_ACCOUNT_ID, type DiscordMultiAccountConfig, type DiscordTokenResolution, type DiscordTokenSource, isMultiAccountEnabled, listDiscordAccountIds, listEnabledDiscordAccounts, normalizeAccountId, normalizeDiscordToken, type ResolvedDiscordAccount, resolveDefaultDiscordAccountId, resolveDiscordAccount, resolveDiscordToken, } from "./accounts";
|
|
5
|
+
export { type AllowListMatchSource, allowListMatches, type ChannelMatchSource, type DiscordAllowList, type DiscordAllowListMatch, type DiscordChannelConfigResolved, formatDiscordUserTag, isDiscordAutoThreadOwnedByBot, isDiscordGroupAllowedByPolicy, normalizeDiscordAllowList, normalizeDiscordSlug, resolveDiscordAllowListMatch, resolveDiscordChannelConfig, resolveDiscordChannelConfigWithFallback, resolveDiscordCommandAuthorized, resolveDiscordGuildEntry, resolveDiscordShouldRequireMention, resolveDiscordUserAllowed, resolveGroupDmAllow, shouldEmitDiscordReactionNotification, validateMessageAllowed, } from "./allowlist";
|
|
6
|
+
export type { DiscordAccountConfig, DiscordActionConfig, DiscordChannelConfig, DiscordConfig, DiscordDmConfig, DiscordExecApprovalConfig, DiscordGuildChannelConfig, DiscordGuildEntry, DiscordIntentsConfig, DiscordPluralKitConfig, DiscordReactionNotificationMode, } from "./config";
|
|
7
|
+
export { DISCORD_SERVICE_NAME } from "./constants";
|
|
8
|
+
export { buildDiscordAvatarCacheFileName, cacheDiscordAvatarUrl, getDiscordAvatarCacheDir, getDiscordAvatarCachePath, getDiscordAvatarPublicPath, isDiscordAvatarUrl, } from "./discord-avatar-cache";
|
|
9
|
+
export { DISCORD_LOCAL_PLUGIN_NAME, DISCORD_LOCAL_SERVICE_NAME, DiscordLocalService, default as discordLocalPlugin, } from "./discord-local-service";
|
|
10
|
+
export { cacheDiscordAvatarForRuntime, isCanonicalDiscordSource, resolveDiscordMessageAuthorProfile, resolveDiscordRoomProfile, resolveDiscordUserProfile, resolveStoredDiscordEntityProfile, } from "./discord-profiles";
|
|
11
|
+
export { buildChannelLink, buildMessageLink, type ChunkDiscordTextOpts, chunkDiscordText, chunkDiscordTextWithMode, escapeDiscordMarkdown, extractAllChannelMentions, extractAllRoleMentions, extractAllUserMentions, extractChannelIdFromMention, extractRoleIdFromMention, extractUserIdFromMention, formatDiscordChannelMention, formatDiscordReactionEmoji, formatDiscordRoleMention, formatDiscordTimestamp, formatDiscordUserMention, formatMessageReactionEmoji, messageContainsMention, parseMessageLink, resolveDiscordSystemLocation, resolveTimestampMs, sanitizeThreadName, stripDiscordFormatting, truncateText, truncateUtf16Safe, } from "./messaging";
|
|
12
|
+
export { type BuiltCommandOption, buildCommandArgCustomId, buildCommandArgMenu, buildCommandText, buildDiscordCommandOptions, buildDiscordSlashCommand, COMMAND_ARG_CUSTOM_ID_KEY, type CommandArgButton, type CommandArgButtonRow, type CommandArgDefinition, type CommandArgMenu, type CommandArgs, type CommandArgValues, createCommandArgs, decodeCommandArgValue, encodeCommandArgValue, isUnknownInteractionError, type NativeCommandSpec, parseCommandArgCustomId, safeInteractionCall, serializeCommandArgs, } from "./native-commands";
|
|
13
|
+
export { DISCORD_OWNER_PAIRING_SERVICE_TYPE, type DiscordOwnerPairingService, DiscordOwnerPairingServiceImpl, } from "./owner-pairing-service";
|
|
14
|
+
export { ELEVATED_PERMISSIONS, hasElevatedPermissions, isElevatedRole, } from "./permissionEvents";
|
|
15
|
+
export { type DiscordPermissionTier, DiscordPermissionTiers, type DiscordPermissionValues, generateAllInviteUrls, generateInviteUrl, getPermissionValues, } from "./permissions";
|
|
16
|
+
export type { DiscordService as IDiscordService } from "./service";
|
|
17
|
+
export { DiscordService } from "./service";
|
|
18
|
+
export { discordSetupRoutes } from "./setup-routes";
|
|
19
|
+
export type { AuditInfo, ChannelPermissionsChangedPayload, MemberRolesChangedPayload, PermissionDiff, PermissionState, RoleLifecyclePayload, RolePermissionsChangedPayload, } from "./types";
|
|
20
|
+
export { DiscordEventTypes } from "./types";
|
|
21
|
+
export * from "./user-account-scraper";
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"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"}
|