@elizaos/plugin-discord 2.0.3-beta.2 → 2.0.3-beta.3

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.
Files changed (124) hide show
  1. package/dist/account-client-pool.d.ts +35 -0
  2. package/dist/account-client-pool.d.ts.map +1 -0
  3. package/dist/accounts.d.ts +164 -0
  4. package/dist/accounts.d.ts.map +1 -0
  5. package/dist/actions/actionResultSemantics.d.ts +9 -0
  6. package/dist/actions/actionResultSemantics.d.ts.map +1 -0
  7. package/dist/actions/setup-credentials.d.ts +22 -0
  8. package/dist/actions/setup-credentials.d.ts.map +1 -0
  9. package/dist/addressing.d.ts +15 -0
  10. package/dist/addressing.d.ts.map +1 -0
  11. package/dist/allowlist.d.ts +198 -0
  12. package/dist/allowlist.d.ts.map +1 -0
  13. package/dist/attachments.d.ts +93 -0
  14. package/dist/attachments.d.ts.map +1 -0
  15. package/dist/auto-enable.d.ts +4 -0
  16. package/dist/auto-enable.d.ts.map +1 -0
  17. package/dist/banner.d.ts +39 -0
  18. package/dist/banner.d.ts.map +1 -0
  19. package/dist/catalog-commands.d.ts +65 -0
  20. package/dist/catalog-commands.d.ts.map +1 -0
  21. package/dist/compat.d.ts +32 -0
  22. package/dist/compat.d.ts.map +1 -0
  23. package/dist/config.d.ts +156 -0
  24. package/dist/config.d.ts.map +1 -0
  25. package/dist/connector-account-provider.d.ts +27 -0
  26. package/dist/connector-account-provider.d.ts.map +1 -0
  27. package/dist/constants.d.ts +2 -0
  28. package/dist/constants.d.ts.map +1 -0
  29. package/dist/data-routes.d.ts +22 -0
  30. package/dist/data-routes.d.ts.map +1 -0
  31. package/dist/debouncer.d.ts +42 -0
  32. package/dist/debouncer.d.ts.map +1 -0
  33. package/dist/discord-avatar-cache.d.ts +10 -0
  34. package/dist/discord-avatar-cache.d.ts.map +1 -0
  35. package/dist/discord-commands.d.ts +16 -0
  36. package/dist/discord-commands.d.ts.map +1 -0
  37. package/dist/discord-events.d.ts +57 -0
  38. package/dist/discord-events.d.ts.map +1 -0
  39. package/dist/discord-history.d.ts +56 -0
  40. package/dist/discord-history.d.ts.map +1 -0
  41. package/dist/discord-interactions.d.ts +47 -0
  42. package/dist/discord-interactions.d.ts.map +1 -0
  43. package/dist/discord-local-service.d.ts +102 -0
  44. package/dist/discord-local-service.d.ts.map +1 -0
  45. package/dist/discord-profiles.d.ts +26 -0
  46. package/dist/discord-profiles.d.ts.map +1 -0
  47. package/dist/discord-reactions.d.ts +30 -0
  48. package/dist/discord-reactions.d.ts.map +1 -0
  49. package/dist/draft-chunking.d.ts +9 -0
  50. package/dist/draft-chunking.d.ts.map +1 -0
  51. package/dist/draft-stream.d.ts +23 -0
  52. package/dist/draft-stream.d.ts.map +1 -0
  53. package/dist/environment.d.ts +23 -0
  54. package/dist/environment.d.ts.map +1 -0
  55. package/dist/generated/specs/spec-helpers.d.ts +36 -0
  56. package/dist/generated/specs/spec-helpers.d.ts.map +1 -0
  57. package/dist/generated/specs/specs.d.ts +40 -0
  58. package/dist/generated/specs/specs.d.ts.map +1 -0
  59. package/dist/identity.d.ts +8 -0
  60. package/dist/identity.d.ts.map +1 -0
  61. package/dist/inbound-envelope.d.ts +15 -0
  62. package/dist/inbound-envelope.d.ts.map +1 -0
  63. package/dist/index.browser.d.ts +34 -0
  64. package/dist/index.browser.d.ts.map +1 -0
  65. package/dist/index.d.ts +23 -0
  66. package/dist/index.d.ts.map +1 -0
  67. package/dist/index.js +14414 -0
  68. package/dist/index.js.map +59 -0
  69. package/dist/interactions.d.ts +35 -0
  70. package/dist/interactions.d.ts.map +1 -0
  71. package/dist/message-coalesce.d.ts +31 -0
  72. package/dist/message-coalesce.d.ts.map +1 -0
  73. package/dist/messages.d.ts +70 -0
  74. package/dist/messages.d.ts.map +1 -0
  75. package/dist/messaging.d.ts +129 -0
  76. package/dist/messaging.d.ts.map +1 -0
  77. package/dist/native-commands.d.ts +142 -0
  78. package/dist/native-commands.d.ts.map +1 -0
  79. package/dist/owner-pairing-service.d.ts +73 -0
  80. package/dist/owner-pairing-service.d.ts.map +1 -0
  81. package/dist/permissionEvents.d.ts +42 -0
  82. package/dist/permissionEvents.d.ts.map +1 -0
  83. package/dist/permissions.d.ts +36 -0
  84. package/dist/permissions.d.ts.map +1 -0
  85. package/dist/profileSync.d.ts +8 -0
  86. package/dist/profileSync.d.ts.map +1 -0
  87. package/dist/reasoning-tags.d.ts +2 -0
  88. package/dist/reasoning-tags.d.ts.map +1 -0
  89. package/dist/sensitive-request-adapter.d.ts +19 -0
  90. package/dist/sensitive-request-adapter.d.ts.map +1 -0
  91. package/dist/service.d.ts +315 -0
  92. package/dist/service.d.ts.map +1 -0
  93. package/dist/setup-routes.d.ts +28 -0
  94. package/dist/setup-routes.d.ts.map +1 -0
  95. package/dist/slash-commands.d.ts +38 -0
  96. package/dist/slash-commands.d.ts.map +1 -0
  97. package/dist/staleness.d.ts +25 -0
  98. package/dist/staleness.d.ts.map +1 -0
  99. package/dist/status-reactions.d.ts +11 -0
  100. package/dist/status-reactions.d.ts.map +1 -0
  101. package/dist/test-setup.d.ts +1 -0
  102. package/dist/test-setup.d.ts.map +1 -0
  103. package/dist/tests.d.ts +123 -0
  104. package/dist/tests.d.ts.map +1 -0
  105. package/dist/types.d.ts +345 -0
  106. package/dist/types.d.ts.map +1 -0
  107. package/dist/typing.d.ts +7 -0
  108. package/dist/typing.d.ts.map +1 -0
  109. package/dist/user-account-scraper/discord-browser-scraper.d.ts +118 -0
  110. package/dist/user-account-scraper/discord-browser-scraper.d.ts.map +1 -0
  111. package/dist/user-account-scraper/discord-desktop-cdp.d.ts +33 -0
  112. package/dist/user-account-scraper/discord-desktop-cdp.d.ts.map +1 -0
  113. package/dist/user-account-scraper/index.d.ts +15 -0
  114. package/dist/user-account-scraper/index.d.ts.map +1 -0
  115. package/dist/user-account-scraper/service.d.ts +92 -0
  116. package/dist/user-account-scraper/service.d.ts.map +1 -0
  117. package/dist/utils.d.ts +53 -0
  118. package/dist/utils.d.ts.map +1 -0
  119. package/dist/vitest.config.d.ts +3 -0
  120. package/dist/vitest.config.d.ts.map +1 -0
  121. package/dist/voice.d.ts +242 -0
  122. package/dist/voice.d.ts.map +1 -0
  123. package/package.json +14 -6
  124. package/registry-entry.json +120 -0
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Discord local IPC connector.
3
+ *
4
+ * Connects to the Discord desktop app via the local RPC socket, enabling
5
+ * message ingestion and macOS UI-automation-based replies. Previously
6
+ * lived in `@elizaos/agent` as `discord-local-plugin.ts`; moved here so
7
+ * the Discord plugin package owns its own runtime service.
8
+ */
9
+ import { type IAgentRuntime, type Plugin, Service } from "@elizaos/core";
10
+ export declare const DISCORD_LOCAL_PLUGIN_NAME = "@elizaos/plugin-discord-local";
11
+ export declare const DISCORD_LOCAL_SERVICE_NAME = "discord-local";
12
+ export declare const DISCORD_LOCAL_ACCOUNT_ID = "default";
13
+ type DiscordLocalUser = {
14
+ id: string;
15
+ username: string;
16
+ global_name?: string | null;
17
+ avatar?: string | null;
18
+ };
19
+ type DiscordLocalChannel = {
20
+ id: string;
21
+ guild_id?: string | null;
22
+ type?: number;
23
+ name?: string | null;
24
+ recipients?: DiscordLocalUser[];
25
+ };
26
+ type DiscordLocalGuild = {
27
+ id: string;
28
+ name: string;
29
+ };
30
+ export declare class DiscordLocalService extends Service {
31
+ static serviceType: string;
32
+ capabilityDescription: string;
33
+ /**
34
+ * The local RPC bridge speaks for one signed-in Discord desktop session.
35
+ * Multi-account local sessions need separate auth/session partitioning
36
+ * before this can safely vary per request.
37
+ */
38
+ readonly accountId = "default";
39
+ private readonly sessionPath;
40
+ private readonly pendingRequests;
41
+ private readonly channelCache;
42
+ private readonly guildCache;
43
+ private readonly subscribedChannelIds;
44
+ private connectorConfig;
45
+ private socket;
46
+ private connectedIpcPath;
47
+ private readBuffer;
48
+ private readyPromise;
49
+ private readyResolve;
50
+ private readyReject;
51
+ private reconnectTimer;
52
+ private session;
53
+ private currentUser;
54
+ private connected;
55
+ private authenticated;
56
+ private lastError;
57
+ constructor(runtime?: IAgentRuntime);
58
+ static start(runtime: IAgentRuntime): Promise<DiscordLocalService>;
59
+ static registerSendHandlers(runtime: IAgentRuntime, service: DiscordLocalService): void;
60
+ stop(): Promise<void>;
61
+ isConnected(): boolean;
62
+ isAuthenticated(): boolean;
63
+ getStatus(): {
64
+ available: boolean;
65
+ connected: boolean;
66
+ authenticated: boolean;
67
+ accountId: string;
68
+ currentUser: DiscordLocalUser | null;
69
+ subscribedChannelIds: string[];
70
+ configuredChannelIds: string[];
71
+ scopes: string[];
72
+ lastError: string | null;
73
+ ipcPath: string | null;
74
+ };
75
+ authorize(): Promise<ReturnType<DiscordLocalService["getStatus"]>>;
76
+ disconnectSession(): Promise<void>;
77
+ listGuilds(): Promise<DiscordLocalGuild[]>;
78
+ listChannels(guildId: string): Promise<DiscordLocalChannel[]>;
79
+ subscribeChannelMessages(channelIds: string[]): Promise<string[]>;
80
+ getChannel(channelId: string): Promise<DiscordLocalChannel | null>;
81
+ private requireConfig;
82
+ private startService;
83
+ private ensureAuthenticated;
84
+ private subscribeNotifications;
85
+ private subscribeConfiguredChannels;
86
+ private exchangeAuthorizationCode;
87
+ private refreshAccessToken;
88
+ private storeTokenResponse;
89
+ private loadSession;
90
+ private ensureRpcConnection;
91
+ private scheduleReconnect;
92
+ private handleSocketData;
93
+ private handleRpcPayload;
94
+ private writeFrame;
95
+ private sendRpcCommand;
96
+ private rejectPendingRequests;
97
+ private ingestMessage;
98
+ private sendUiMessage;
99
+ }
100
+ declare const discordLocalPlugin: Plugin;
101
+ export default discordLocalPlugin;
102
+ //# sourceMappingURL=discord-local-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discord-local-service.d.ts","sourceRoot":"","sources":["../discord-local-service.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAUH,OAAO,EAKN,KAAK,aAAa,EAKlB,KAAK,MAAM,EAEX,OAAO,EAGP,MAAM,eAAe,CAAC;AAKvB,eAA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AAC,qBAAqB;YAOf,aAAa;YAqIb,aAAa;CAgB3B;AAED,QAAA,MAAM,kBAAkB,EAAE,MAKzB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { type AgentRuntime, type Room } from "@elizaos/core";
2
+ type DiscordUserProfile = {
3
+ avatarUrl?: string;
4
+ displayName?: string;
5
+ username?: string;
6
+ };
7
+ type DiscordMessageAuthorProfile = DiscordUserProfile & {
8
+ rawUserId?: string;
9
+ };
10
+ type StoredDiscordEntityProfile = {
11
+ avatarUrl?: string;
12
+ displayName?: string;
13
+ rawUserId?: string;
14
+ username?: string;
15
+ };
16
+ export declare function isCanonicalDiscordSource(source: string | null | undefined): boolean;
17
+ export declare function cacheDiscordAvatarForRuntime(runtime: AgentRuntime, avatarUrl: string | undefined, userId?: string): Promise<string | undefined>;
18
+ export declare function resolveStoredDiscordEntityProfile(runtime: AgentRuntime, entityId: string | undefined): Promise<StoredDiscordEntityProfile | null>;
19
+ export declare function resolveDiscordMessageAuthorProfile(runtime: AgentRuntime, channelId: string, messageId: string): Promise<DiscordMessageAuthorProfile | null>;
20
+ export declare function resolveDiscordUserProfile(runtime: AgentRuntime, userId: string): Promise<DiscordUserProfile | null>;
21
+ export declare function resolveDiscordRoomProfile(runtime: AgentRuntime, room: Room | undefined, channelIdHint?: string): Promise<{
22
+ avatarUrl?: string;
23
+ title: string | null;
24
+ } | null>;
25
+ export {};
26
+ //# sourceMappingURL=discord-profiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discord-profiles.d.ts","sourceRoot":"","sources":["../discord-profiles.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,YAAY,EAEjB,KAAK,IAAI,EAET,MAAM,eAAe,CAAC;AAGvB,KAAK,kBAAkB,GAAG;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB,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.ts
3
+ *
4
+ * Contains handleReaction(), handleReactionAdd(), handleReactionRemove().
5
+ */
6
+ import { type ChannelType, type UUID } from "@elizaos/core";
7
+ import type { Channel, MessageReaction, PartialMessageReaction, PartialUser, User } from "discord.js";
8
+ import type { DiscordService } from "./service.js";
9
+ /**
10
+ * Subset of DiscordService fields needed by reaction handlers.
11
+ */
12
+ export interface ReactionServiceInternals {
13
+ accountId?: string;
14
+ runtime: DiscordService["runtime"];
15
+ resolveDiscordEntityId(userId: string): UUID;
16
+ getChannelType(channel: Channel): Promise<ChannelType>;
17
+ }
18
+ /**
19
+ * Generic handler for reaction events (add/remove).
20
+ */
21
+ export declare function handleReaction(service: ReactionServiceInternals, reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser, type: "add" | "remove"): Promise<void>;
22
+ /**
23
+ * Handles reaction addition.
24
+ */
25
+ export declare function handleReactionAdd(service: ReactionServiceInternals, reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser): Promise<void>;
26
+ /**
27
+ * Handles reaction removal.
28
+ */
29
+ export declare function handleReactionRemove(service: ReactionServiceInternals, reaction: MessageReaction | PartialMessageReaction, user: User | PartialUser): Promise<void>;
30
+ //# sourceMappingURL=discord-reactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"discord-reactions.d.ts","sourceRoot":"","sources":["../discord-reactions.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACN,KAAK,WAAW,EAOhB,KAAK,IAAI,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACX,OAAO,EACP,eAAe,EACf,sBAAsB,EACtB,WAAW,EAEX,IAAI,EACJ,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACnC,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7C,cAAc,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;CACvD;AAED;;GAEG;AACH,wBAAsB,cAAc,CACnC,OAAO,EAAE,wBAAwB,EACjC,QAAQ,EAAE,eAAe,GAAG,sBAAsB,EAClD,IAAI,EAAE,IAAI,GAAG,WAAW,EACxB,IAAI,EAAE,KAAK,GAAG,QAAQ,GACpB,OAAO,CAAC,IAAI,CAAC,CAoMf;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACtC,OAAO,EAAE,wBAAwB,EACjC,QAAQ,EAAE,eAAe,GAAG,sBAAsB,EAClD,IAAI,EAAE,IAAI,GAAG,WAAW,GACtB,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACzC,OAAO,EAAE,wBAAwB,EACjC,QAAQ,EAAE,eAAe,GAAG,sBAAsB,EAClD,IAAI,EAAE,IAAI,GAAG,WAAW,GACtB,OAAO,CAAC,IAAI,CAAC,CAEf"}
@@ -0,0 +1,9 @@
1
+ export type BreakPreference = "paragraph" | "newline" | "sentence";
2
+ export interface DraftChunkConfig {
3
+ minChars: number;
4
+ maxChars: number;
5
+ breakPreference: BreakPreference;
6
+ }
7
+ export declare const DEFAULT_DRAFT_CHUNK_CONFIG: DraftChunkConfig;
8
+ export declare function findBreakPoint(text: string, maxLen: number, breakPreference?: BreakPreference): number;
9
+ //# sourceMappingURL=draft-chunking.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-chunking.d.ts","sourceRoot":"","sources":["../draft-chunking.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,UAAU,CAAC;AAEnE,MAAM,WAAW,gBAAgB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,eAAe,CAAC;CACjC;AAED,eAAO,MAAM,0BAA0B,EAAE,gBAIxC,CAAC;AAEF,wBAAgB,cAAc,CAC7B,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,eAAe,GAAE,eAA4B,GAC3C,MAAM,CAyCR"}
@@ -0,0 +1,23 @@
1
+ import type { Message as DiscordMessage, TextChannel } from "discord.js";
2
+ import { type DraftChunkConfig } from "./draft-chunking.js";
3
+ type DraftReplyToMode = "off" | "first" | "all";
4
+ export interface DraftStreamOptions {
5
+ throttleMs?: number;
6
+ minInitialChars?: number;
7
+ maxChars?: number;
8
+ chunkConfig?: Partial<DraftChunkConfig>;
9
+ log?: (msg: string) => void;
10
+ warn?: (msg: string) => void;
11
+ }
12
+ export interface DraftStreamController {
13
+ start: (channel: TextChannel, replyToMessageId?: string, replyToMode?: DraftReplyToMode) => Promise<DiscordMessage | null>;
14
+ update: (text: string) => void;
15
+ finalize: (text: string) => Promise<DiscordMessage[]>;
16
+ abort: (reason?: string) => Promise<void>;
17
+ messageId: () => string | undefined;
18
+ isStarted: () => boolean;
19
+ isDone: () => boolean;
20
+ }
21
+ export declare function createDraftStreamController(options?: DraftStreamOptions): DraftStreamController;
22
+ export {};
23
+ //# sourceMappingURL=draft-stream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-stream.d.ts","sourceRoot":"","sources":["../draft-stream.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,cAAc,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzE,OAAO,EAEN,KAAK,gBAAgB,EAErB,MAAM,kBAAkB,CAAC;AAE1B,KAAK,gBAAgB,GAAG,KAAK,GAAG,OAAO,GAAG,KAAK,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACxC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B;AAED,MAAM,WAAW,qBAAqB;IACrC,KAAK,EAAE,CACN,OAAO,EAAE,WAAW,EACpB,gBAAgB,CAAC,EAAE,MAAM,EACzB,WAAW,CAAC,EAAE,gBAAgB,KAC1B,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACpC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IACtD,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,SAAS,EAAE,MAAM,MAAM,GAAG,SAAS,CAAC;IACpC,SAAS,EAAE,MAAM,OAAO,CAAC;IACzB,MAAM,EAAE,MAAM,OAAO,CAAC;CACtB;AAMD,wBAAgB,2BAA2B,CAC1C,OAAO,GAAE,kBAAuB,GAC9B,qBAAqB,CA8NvB"}
@@ -0,0 +1,23 @@
1
+ import type { IAgentRuntime } from "@elizaos/core";
2
+ import { z } from "zod";
3
+ import type { DiscordSettings } from "./types.js";
4
+ export declare const DISCORD_DEFAULTS: {
5
+ readonly SHOULD_IGNORE_BOT_MESSAGES: boolean;
6
+ readonly SHOULD_IGNORE_DIRECT_MESSAGES: boolean;
7
+ readonly SHOULD_RESPOND_ONLY_TO_MENTIONS: boolean;
8
+ readonly ALLOWED_CHANNEL_IDS: string[];
9
+ readonly DM_POLICY: "open" | "allowlist" | "pairing" | "disabled";
10
+ readonly ALLOW_FROM: string[];
11
+ readonly SYNC_PROFILE: boolean;
12
+ };
13
+ export declare const discordEnvSchema: z.ZodObject<{
14
+ DISCORD_API_TOKEN: z.ZodString;
15
+ CHANNEL_IDS: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string[] | undefined, string | null | undefined>>;
16
+ DISCORD_SHOULD_IGNORE_BOT_MESSAGES: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<boolean | undefined, string | null | undefined>>;
17
+ DISCORD_SHOULD_IGNORE_DIRECT_MESSAGES: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<boolean | undefined, string | null | undefined>>;
18
+ DISCORD_SHOULD_RESPOND_ONLY_TO_MENTIONS: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<boolean | undefined, string | null | undefined>>;
19
+ }, z.core.$strip>;
20
+ export type DiscordConfig = z.infer<typeof discordEnvSchema>;
21
+ export declare function getDiscordSettings(runtime: IAgentRuntime): DiscordSettings;
22
+ export declare function validateDiscordConfig(runtime: IAgentRuntime): Promise<DiscordConfig>;
23
+ //# sourceMappingURL=environment.d.ts.map
@@ -0,0 +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;;;;;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"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Helper functions to lookup action/provider specs by name.
3
+ * These allow language-specific implementations to import their text content
4
+ * (description, similes, examples) from the centralized specs.
5
+ *
6
+ * DO NOT EDIT the spec data - update prompts/actions.json, prompts/providers.json and regenerate.
7
+ */
8
+ import { type ActionDoc, type ProviderDoc } from "./specs.js";
9
+ /**
10
+ * Get an action spec by name from the core specs.
11
+ * @param name - The action name
12
+ * @returns The action spec or undefined if not found
13
+ */
14
+ export declare function getActionSpec(name: string): ActionDoc | undefined;
15
+ /**
16
+ * Get an action spec by name, throwing if not found.
17
+ * @param name - The action name
18
+ * @returns The action spec
19
+ * @throws Error if the action is not found
20
+ */
21
+ export declare function requireActionSpec(name: string): ActionDoc;
22
+ /**
23
+ * Get a provider spec by name from the core specs.
24
+ * @param name - The provider name
25
+ * @returns The provider spec or undefined if not found
26
+ */
27
+ export declare function getProviderSpec(name: string): ProviderDoc | undefined;
28
+ /**
29
+ * Get a provider spec by name, throwing if not found.
30
+ * @param name - The provider name
31
+ * @returns The provider spec
32
+ * @throws Error if the provider is not found
33
+ */
34
+ export declare function requireProviderSpec(name: string): ProviderDoc;
35
+ export type { ActionDoc, ProviderDoc };
36
+ //# sourceMappingURL=spec-helpers.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Auto-generated canonical action/provider docs for plugin-discord.
3
+ * DO NOT EDIT - Generated from prompts/specs/**.
4
+ */
5
+ export type ActionDoc = {
6
+ name: string;
7
+ description: string;
8
+ descriptionCompressed?: string;
9
+ similes?: readonly string[];
10
+ parameters?: readonly unknown[];
11
+ examples?: readonly (readonly unknown[])[];
12
+ };
13
+ export type ProviderDoc = {
14
+ name: string;
15
+ description: string;
16
+ descriptionCompressed?: string;
17
+ position?: number;
18
+ dynamic?: boolean;
19
+ };
20
+ export declare const coreActionsSpec: {
21
+ readonly version: "1.0.0";
22
+ readonly actions: readonly [];
23
+ };
24
+ export declare const allActionsSpec: {
25
+ readonly version: "1.0.0";
26
+ readonly actions: readonly [];
27
+ };
28
+ export declare const coreProvidersSpec: {
29
+ readonly version: "1.0.0";
30
+ readonly providers: readonly [];
31
+ };
32
+ export declare const allProvidersSpec: {
33
+ readonly version: "1.0.0";
34
+ readonly providers: readonly [];
35
+ };
36
+ export declare const coreActionDocs: readonly ActionDoc[];
37
+ export declare const allActionDocs: readonly ActionDoc[];
38
+ export declare const coreProviderDocs: readonly ProviderDoc[];
39
+ export declare const allProviderDocs: readonly ProviderDoc[];
40
+ //# sourceMappingURL=specs.d.ts.map
@@ -0,0 +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,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;;;CAGlB,CAAC;AACX,eAAO,MAAM,cAAc;;;CAGjB,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,15 @@
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 interface DiscordReplyContext {
8
+ messageId: string;
9
+ authorId?: string;
10
+ authorName: string;
11
+ content: string;
12
+ }
13
+ export declare function getDiscordReplyContext(message: DiscordMessage): Promise<DiscordReplyContext | null>;
14
+ export declare function formatInboundEnvelope(message: DiscordMessage, rawContent: string, knownReplyContext?: DiscordReplyContext | null): Promise<EnvelopeResult>;
15
+ //# 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;AAED,MAAM,WAAW,mBAAmB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CAChB;AA+GD,wBAAsB,sBAAsB,CAC3C,OAAO,EAAE,cAAc,GACrB,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CA0BrC;AAED,wBAAsB,qBAAqB,CAC1C,OAAO,EAAE,cAAc,EACvB,UAAU,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAC5C,OAAO,CAAC,cAAc,CAAC,CAoCzB"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Browser Entry Point for Discord Plugin
3
+ *
4
+ * IMPORTANT: This file provides the browser-unavailable Discord plugin entry.
5
+ * The Discord.js library requires Node.js APIs (WebSocket, Buffer, etc.) that are
6
+ * not available in browser environments.
7
+ *
8
+ * LIMITATIONS:
9
+ * - No direct Discord Gateway connection (WebSocket unavailable)
10
+ * - No bot token authentication
11
+ * - No event handling or message processing
12
+ * - No slash command registration
13
+ *
14
+ * RECOMMENDED ALTERNATIVES:
15
+ * 1. Server Proxy: Run the full Discord plugin on a Node.js server and communicate
16
+ * via API endpoints from your browser application.
17
+ * 2. OAuth Flow: For user-facing apps, implement Discord OAuth2 in the browser
18
+ * and handle bot operations server-side.
19
+ * 3. Webhooks: For simple message sending, Discord webhooks work from browsers
20
+ * (though they're one-way communication only).
21
+ *
22
+ * @module plugin-discord/browser
23
+ */
24
+ import type { Plugin } from "@elizaos/core";
25
+ /**
26
+ * Browser-unavailable entry for the Discord plugin.
27
+ *
28
+ * This entry provides the same interface as the full plugin, logs that direct
29
+ * Discord gateway functionality requires Node.js, and prevents build errors
30
+ * when the plugin is bundled for browser targets.
31
+ */
32
+ export declare const discordPlugin: Plugin;
33
+ export default discordPlugin;
34
+ //# sourceMappingURL=index.browser.d.ts.map
@@ -0,0 +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,MAS3B,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,23 @@
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.js";
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.js";
6
+ export type { DiscordAccountConfig, DiscordActionConfig, DiscordChannelConfig, DiscordConfig, DiscordDmConfig, DiscordExecApprovalConfig, DiscordGuildChannelConfig, DiscordGuildEntry, DiscordIntentsConfig, DiscordPluralKitConfig, DiscordReactionNotificationMode, } from "./config.js";
7
+ export { DISCORD_SERVICE_NAME } from "./constants.js";
8
+ export { discordDataRoutes } from "./data-routes.js";
9
+ export { buildDiscordAvatarCacheFileName, cacheDiscordAvatarUrl, getDiscordAvatarCacheDir, getDiscordAvatarCachePath, getDiscordAvatarPublicPath, isDiscordAvatarUrl, } from "./discord-avatar-cache.js";
10
+ export { DISCORD_LOCAL_PLUGIN_NAME, DISCORD_LOCAL_SERVICE_NAME, DiscordLocalService, default as discordLocalPlugin, } from "./discord-local-service.js";
11
+ export { cacheDiscordAvatarForRuntime, isCanonicalDiscordSource, resolveDiscordMessageAuthorProfile, resolveDiscordRoomProfile, resolveDiscordUserProfile, resolveStoredDiscordEntityProfile, } from "./discord-profiles.js";
12
+ 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.js";
13
+ 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.js";
14
+ export { DISCORD_OWNER_PAIRING_SERVICE_TYPE, type DiscordOwnerPairingService, DiscordOwnerPairingServiceImpl, } from "./owner-pairing-service.js";
15
+ export { ELEVATED_PERMISSIONS, hasElevatedPermissions, isElevatedRole, } from "./permissionEvents.js";
16
+ export { type DiscordPermissionTier, DiscordPermissionTiers, type DiscordPermissionValues, generateAllInviteUrls, generateInviteUrl, getPermissionValues, } from "./permissions.js";
17
+ export type { DiscordService as IDiscordService } from "./service.js";
18
+ export { DiscordService } from "./service.js";
19
+ export { discordSetupRoutes } from "./setup-routes.js";
20
+ export type { AuditInfo, ChannelPermissionsChangedPayload, MemberRolesChangedPayload, PermissionDiff, PermissionState, RoleLifecyclePayload, RolePermissionsChangedPayload, } from "./types.js";
21
+ export { DiscordEventTypes } from "./types.js";
22
+ export { buildDiscordProbeScript, captureDiscordDeliveryStatus, closeDiscordTab, DISCORD_APP_URL, DISCORD_PROVIDER_ID, DISCORD_USER_ACCOUNT_SCRAPER_SERVICE_TYPE, type DiscordDesktopCdpStatus, type DiscordDmInboxProbe, type DiscordMessageSearchResult, type DiscordTabIdentity, type DiscordTabProbe, type DiscordUserAccountScraper, DiscordUserAccountScraperImpl, type DiscordVisibleDmPreview, discordBrowserWorkspaceAvailable, discordUserAccountPartitionFor, emptyDiscordDmInboxProbe, ensureDiscordTab, getDiscordDesktopCdpStatus, navigateDiscordTabToHome, probeDiscordCapturedPage, probeDiscordDocumentState, probeDiscordTab, relaunchDiscordDesktopForCdp, searchDiscordMessages, sendDiscordViaDesktopCdp, } from "./user-account-scraper/index.js";
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIN,KAAK,MAAM,EACX,MAAM,eAAe,CAAC;AAavB,QAAA,MAAM,aAAa,EAAE,MA0HpB,CAAC;AAEF,eAAe,aAAa,CAAC;AAG7B,OAAO,EACN,kBA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