@elizaos/plugin-google-chat 2.0.0-beta.1 → 2.0.11-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.
Files changed (40) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +50 -136
  3. package/auto-enable.ts +1 -1
  4. package/package.json +21 -4
  5. package/dist/src/accounts.d.ts +0 -16
  6. package/dist/src/accounts.d.ts.map +0 -1
  7. package/dist/src/accounts.js +0 -163
  8. package/dist/src/accounts.js.map +0 -1
  9. package/dist/src/actions/index.d.ts +0 -1
  10. package/dist/src/actions/index.d.ts.map +0 -1
  11. package/dist/src/actions/index.js +0 -3
  12. package/dist/src/actions/index.js.map +0 -1
  13. package/dist/src/config.d.ts +0 -91
  14. package/dist/src/config.d.ts.map +0 -1
  15. package/dist/src/config.js +0 -8
  16. package/dist/src/config.js.map +0 -1
  17. package/dist/src/connector-account-provider.d.ts +0 -22
  18. package/dist/src/connector-account-provider.d.ts.map +0 -1
  19. package/dist/src/connector-account-provider.js +0 -89
  20. package/dist/src/connector-account-provider.js.map +0 -1
  21. package/dist/src/index.d.ts +0 -18
  22. package/dist/src/index.d.ts.map +0 -1
  23. package/dist/src/index.js +0 -66
  24. package/dist/src/index.js.map +0 -1
  25. package/dist/src/providers/index.d.ts +0 -1
  26. package/dist/src/providers/index.d.ts.map +0 -1
  27. package/dist/src/providers/index.js +0 -3
  28. package/dist/src/providers/index.js.map +0 -1
  29. package/dist/src/service.d.ts +0 -62
  30. package/dist/src/service.d.ts.map +0 -1
  31. package/dist/src/service.js +0 -724
  32. package/dist/src/service.js.map +0 -1
  33. package/dist/src/types.d.ts +0 -216
  34. package/dist/src/types.d.ts.map +0 -1
  35. package/dist/src/types.js +0 -144
  36. package/dist/src/types.js.map +0 -1
  37. package/dist/src/workflow-credential-provider.d.ts +0 -21
  38. package/dist/src/workflow-credential-provider.d.ts.map +0 -1
  39. package/dist/src/workflow-credential-provider.js +0 -57
  40. package/dist/src/workflow-credential-provider.js.map +0 -1
@@ -1,89 +0,0 @@
1
- /**
2
- * Google Chat ConnectorAccountManager provider.
3
- *
4
- * Adapts the multi-account scaffolding in `accounts.ts` to the
5
- * `ConnectorAccountProvider` contract from
6
- * `@elizaos/core/connectors/account-manager`.
7
- *
8
- * Source of truth for accounts is character settings (`character.settings.googleChat`)
9
- * + GOOGLE_CHAT_ACCOUNTS JSON env var + single-account env vars
10
- * (GOOGLE_CHAT_SERVICE_ACCOUNT, GOOGLE_CHAT_SERVICE_ACCOUNT_FILE).
11
- *
12
- * AccountKey is the service-account email (best-effort extracted from the
13
- * service-account JSON when available, otherwise the configured accountId).
14
- * Role is `AGENT` since service-account creds authenticate the bot, not a user.
15
- *
16
- * Note: this overlaps with plugin-google's OAuth scopes but is a separate
17
- * plugin scoped to Google Workspace Chat — keep separate.
18
- */
19
- import { DEFAULT_GOOGLE_CHAT_ACCOUNT_ID, listGoogleChatAccountIds, normalizeGoogleChatAccountId, resolveGoogleChatAccountSettings, } from "./accounts.js";
20
- export const GOOGLE_CHAT_PROVIDER_ID = "google-chat";
21
- function extractServiceAccountEmail(serviceAccount) {
22
- if (!serviceAccount)
23
- return undefined;
24
- try {
25
- const parsed = JSON.parse(serviceAccount);
26
- return typeof parsed.client_email === "string" ? parsed.client_email : undefined;
27
- }
28
- catch {
29
- return undefined;
30
- }
31
- }
32
- function toConnectorAccount(settings) {
33
- const now = Date.now();
34
- const configured = Boolean(settings.serviceAccount || settings.serviceAccountFile);
35
- const email = extractServiceAccountEmail(settings.serviceAccount);
36
- return {
37
- id: normalizeGoogleChatAccountId(settings.accountId),
38
- provider: GOOGLE_CHAT_PROVIDER_ID,
39
- label: email ?? settings.botUser ?? settings.accountId ?? DEFAULT_GOOGLE_CHAT_ACCOUNT_ID,
40
- role: "AGENT",
41
- purpose: ["messaging"],
42
- accessGate: "open",
43
- status: settings.enabled !== false && configured ? "connected" : "disabled",
44
- externalId: email ?? undefined,
45
- displayHandle: email ?? settings.botUser ?? undefined,
46
- createdAt: now,
47
- updatedAt: now,
48
- metadata: {
49
- audienceType: settings.audienceType,
50
- audience: settings.audience ?? "",
51
- webhookPath: settings.webhookPath,
52
- requireMention: settings.requireMention,
53
- botUser: settings.botUser ?? "",
54
- },
55
- };
56
- }
57
- export function createGoogleChatConnectorAccountProvider(runtime) {
58
- return {
59
- provider: GOOGLE_CHAT_PROVIDER_ID,
60
- label: "Google Chat",
61
- listAccounts: async (_manager) => {
62
- const ids = listGoogleChatAccountIds(runtime);
63
- if (ids.length === 0) {
64
- return [
65
- toConnectorAccount(resolveGoogleChatAccountSettings(runtime, DEFAULT_GOOGLE_CHAT_ACCOUNT_ID)),
66
- ];
67
- }
68
- return ids.map((id) => toConnectorAccount(resolveGoogleChatAccountSettings(runtime, id)));
69
- },
70
- createAccount: async (input, _manager) => {
71
- return {
72
- ...input,
73
- provider: GOOGLE_CHAT_PROVIDER_ID,
74
- role: input.role ?? "AGENT",
75
- purpose: input.purpose ?? ["messaging"],
76
- accessGate: input.accessGate ?? "open",
77
- status: input.status ?? "pending",
78
- };
79
- },
80
- patchAccount: async (_accountId, patch, _manager) => {
81
- return { ...patch, provider: GOOGLE_CHAT_PROVIDER_ID };
82
- },
83
- deleteAccount: async (_accountId, _manager) => {
84
- // No-op at provider layer — service-account credentials live in
85
- // character settings; deletion of those is out of band.
86
- },
87
- };
88
- }
89
- //# sourceMappingURL=connector-account-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connector-account-provider.js","sourceRoot":"","sources":["../../src/connector-account-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AASH,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,EACxB,4BAA4B,EAC5B,gCAAgC,GACjC,MAAM,eAAe,CAAC;AAGvB,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAErD,SAAS,0BAA0B,CAAC,cAAuB;IACzD,IAAI,CAAC,cAAc;QAAE,OAAO,SAAS,CAAC;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AC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Google Chat Plugin for ElizaOS
3
- *
4
- * Provides Google Chat messaging integration for ElizaOS agents,
5
- * supporting spaces, direct messages, threads, and reactions.
6
- */
7
- import type { Plugin } from "@elizaos/core";
8
- import { GoogleChatService } from "./service.js";
9
- export * from "./accounts.js";
10
- export * from "./types.js";
11
- export { GoogleChatService };
12
- /**
13
- * Google Chat plugin definition
14
- */
15
- declare const googleChatPlugin: Plugin;
16
- export default googleChatPlugin;
17
- export type { GoogleChatAccountConfig, GoogleChatActionConfig, GoogleChatConfig, GoogleChatReactionNotificationMode, GoogleChatSpaceConfig, } from "./config.js";
18
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,eAAe,CAAC;AAG3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGjD,cAAc,eAAe,CAAC;AAI9B,cAAc,YAAY,CAAC;AAE3B,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B;;GAEG;AACH,QAAA,MAAM,gBAAgB,EAAE,MAoEvB,CAAC;AAEF,eAAe,gBAAgB,CAAC;AAGhC,YAAY,EACV,uBAAuB,EACvB,sBAAsB,EACtB,gBAAgB,EAChB,kCAAkC,EAClC,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
package/dist/src/index.js DELETED
@@ -1,66 +0,0 @@
1
- /**
2
- * Google Chat Plugin for ElizaOS
3
- *
4
- * Provides Google Chat messaging integration for ElizaOS agents,
5
- * supporting spaces, direct messages, threads, and reactions.
6
- */
7
- import { getConnectorAccountManager, logger } from "@elizaos/core";
8
- import { createGoogleChatConnectorAccountProvider } from "./connector-account-provider.js";
9
- import { GoogleChatService } from "./service.js";
10
- import { GoogleChatWorkflowCredentialProvider } from "./workflow-credential-provider.js";
11
- export * from "./accounts.js";
12
- // Message, space listing, and reaction operations route through MESSAGE via
13
- // the MessageConnector registered by GoogleChatService.
14
- // Export types
15
- export * from "./types.js";
16
- // Export service
17
- export { GoogleChatService };
18
- /**
19
- * Google Chat plugin definition
20
- */
21
- const googleChatPlugin = {
22
- name: "google-chat",
23
- description: "Google Chat integration plugin for ElizaOS agents",
24
- services: [GoogleChatService, GoogleChatWorkflowCredentialProvider],
25
- actions: [],
26
- providers: [],
27
- tests: [],
28
- // Self-declared auto-enable: activate when the "googlechat" connector is
29
- // configured under config.connectors. The hardcoded CONNECTOR_PLUGINS map
30
- // in plugin-auto-enable-engine.ts still serves as a fallback.
31
- autoEnable: {
32
- connectorKeys: ["googlechat"],
33
- },
34
- /**
35
- * Plugin initialization hook
36
- */
37
- init: async (config, runtime) => {
38
- logger.info("Initializing Google Chat plugin...");
39
- try {
40
- const manager = getConnectorAccountManager(runtime);
41
- manager.registerProvider(createGoogleChatConnectorAccountProvider(runtime));
42
- }
43
- catch (err) {
44
- logger.warn({
45
- src: "plugin:google-chat",
46
- err: err instanceof Error ? err.message : String(err),
47
- }, "Failed to register Google Chat provider with ConnectorAccountManager");
48
- }
49
- // Log configuration status
50
- const serviceAccount = config.GOOGLE_CHAT_SERVICE_ACCOUNT || process.env.GOOGLE_CHAT_SERVICE_ACCOUNT;
51
- const serviceAccountFile = config.GOOGLE_CHAT_SERVICE_ACCOUNT_FILE || process.env.GOOGLE_CHAT_SERVICE_ACCOUNT_FILE;
52
- const hasCredentials = Boolean(serviceAccount || serviceAccountFile || process.env.GOOGLE_APPLICATION_CREDENTIALS);
53
- logger.info(`Google Chat plugin configuration:`);
54
- logger.info(` - Credentials configured: ${hasCredentials ? "Yes" : "No"}`);
55
- logger.info(` - Audience type: ${config.GOOGLE_CHAT_AUDIENCE_TYPE || process.env.GOOGLE_CHAT_AUDIENCE_TYPE || "(not set)"}`);
56
- logger.info(` - Audience: ${config.GOOGLE_CHAT_AUDIENCE || process.env.GOOGLE_CHAT_AUDIENCE ? "(set)" : "(not set)"}`);
57
- logger.info(` - Webhook path: ${config.GOOGLE_CHAT_WEBHOOK_PATH || process.env.GOOGLE_CHAT_WEBHOOK_PATH || "/googlechat"}`);
58
- if (!hasCredentials) {
59
- logger.warn("Google Chat service account credentials not configured. " +
60
- "Set GOOGLE_CHAT_SERVICE_ACCOUNT, GOOGLE_CHAT_SERVICE_ACCOUNT_FILE, or GOOGLE_APPLICATION_CREDENTIALS.");
61
- }
62
- logger.info("Google Chat plugin initialized");
63
- },
64
- };
65
- export default googleChatPlugin;
66
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,0BAA0B,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,EAAE,wCAAwC,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,oCAAoC,EAAE,MAAM,mCAAmC,CAAC;AAEzF,cAAc,eAAe,CAAC;AAC9B,4EAA4E;AAC5E,wDAAwD;AACxD,eAAe;AACf,cAAc,YAAY,CAAC;AAC3B,iBAAiB;AACjB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B;;GAEG;AACH,MAAM,gBAAgB,GAAW;IAC/B,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,mDAAmD;IAEhE,QAAQ,EAAE,CAAC,iBAAiB,EAAE,oCAAoC,CAAC;IAEnE,OAAO,EAAE,EAAE;IAEX,SAAS,EAAE,EAAE;IAEb,KAAK,EAAE,EAAE;IAET,yEAAyE;IACzE,0EAA0E;IAC1E,8DAA8D;IAC9D,UAAU,EAAE;QACV,aAAa,EAAE,CAAC,YAAY,CAAC;KAC9B;IAED;;OAEG;IACH,IAAI,EAAE,KAAK,EAAE,MAA8B,EAAE,OAAsB,EAAiB,EAAE;Q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,qBAAqB,MAAM,CAAC,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,aAAa,EAAE,CAChH,CAAC;QAEF,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,MAAM,CAAC,IAAI,CACT,0DAA0D;gBACxD,uGAAuG,CAC1G,CAAC;QACJ,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;IAChD,CAAC;CACF,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":""}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- // Google Chat spaces are exposed through MESSAGE list_channels.
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":";AAAA,gEAAgE"}
@@ -1,62 +0,0 @@
1
- /**
2
- * Google Chat service implementation for ElizaOS.
3
- */
4
- import { type Content, type IAgentRuntime, Service } from "@elizaos/core";
5
- import { type GoogleChatEvent, type GoogleChatMessageSendOptions, type GoogleChatReaction, type GoogleChatSendResult, type GoogleChatSettings, type GoogleChatSpace, type IGoogleChatService } from "./types.js";
6
- export declare class GoogleChatService extends Service implements IGoogleChatService {
7
- static serviceType: string;
8
- capabilityDescription: string;
9
- private states;
10
- private defaultAccountId;
11
- static start(runtime: IAgentRuntime): Promise<GoogleChatService>;
12
- static registerSendHandlers(runtime: IAgentRuntime, service: GoogleChatService, accountId?: string): void;
13
- stop(): Promise<void>;
14
- private loadSettings;
15
- private validateSettings;
16
- private createAuth;
17
- private testConnection;
18
- isConnected(): boolean;
19
- getAccountId(runtime?: IAgentRuntime): string;
20
- getBotUser(): string | undefined;
21
- getAccessToken(accountId?: string): Promise<string>;
22
- private fetchApi;
23
- getSpaces(accountId?: string): Promise<GoogleChatSpace[]>;
24
- sendMessage(options: GoogleChatMessageSendOptions): Promise<GoogleChatSendResult>;
25
- updateMessage(messageName: string, text: string, accountId?: string): Promise<{
26
- success: boolean;
27
- messageName?: string;
28
- error?: string;
29
- }>;
30
- deleteMessage(messageName: string, accountId?: string): Promise<{
31
- success: boolean;
32
- error?: string;
33
- }>;
34
- sendReaction(messageName: string, emoji: string, accountId?: string): Promise<{
35
- success: boolean;
36
- name?: string;
37
- error?: string;
38
- }>;
39
- deleteReaction(reactionName: string, accountId?: string): Promise<{
40
- success: boolean;
41
- error?: string;
42
- }>;
43
- listReactions(messageName: string, limit?: number, accountId?: string): Promise<GoogleChatReaction[]>;
44
- findDirectMessage(userName: string, accountId?: string): Promise<GoogleChatSpace | null>;
45
- uploadAttachment(space: string, filename: string, buffer: Buffer, contentType?: string, accountId?: string): Promise<{
46
- attachmentUploadToken?: string;
47
- }>;
48
- downloadMedia(resourceName: string, maxBytes?: number, accountId?: string): Promise<{
49
- buffer: Buffer;
50
- contentType?: string;
51
- }>;
52
- getSettings(): GoogleChatSettings | null;
53
- sendDirectMessage(target: string, content: Content): Promise<void>;
54
- sendRoomMessage(target: string, content: Content): Promise<void>;
55
- private handleSendMessage;
56
- private sendConnectorDirectMessage;
57
- private sendConnectorContent;
58
- private listConnectorSpaces;
59
- processWebhookEvent(event: GoogleChatEvent, accountId?: string): Promise<void>;
60
- private getState;
61
- }
62
- //# sourceMappingURL=service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../src/service.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,KAAK,OAAO,EAEZ,KAAK,aAAa,EAMlB,OAAO,EAGR,MAAM,eAAe,CAAC;AAUvB,OAAO,EAKL,KAAK,eAAe,EAEpB,KAAK,4BAA4B,EACjC,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAEpB,K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