@openclaw/googlechat 2026.6.11-beta.2 → 2026.6.33

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.
@@ -1,5 +1,5 @@
1
1
  import { l as resolveGoogleChatAccount, o as listEnabledGoogleChatAccounts } from "./channel-base-Qh87GFW_.js";
2
- import { b as uploadGoogleChatAttachment, d as resolveGoogleChatOutboundSpace, f as createGoogleChatReaction, g as listGoogleChatReactions, m as deleteGoogleChatReaction, v as sendGoogleChatMessage } from "./channel.adapters-52v7fTz1.js";
2
+ import { b as uploadGoogleChatAttachment, d as resolveGoogleChatOutboundSpace, f as createGoogleChatReaction, g as listGoogleChatReactions, m as deleteGoogleChatReaction, v as sendGoogleChatMessage } from "./channel.adapters-CndRSzJX.js";
3
3
  import { P as getGoogleChatRuntime } from "./runtime-api-BbVoWRxq.js";
4
4
  import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
5
5
  import { createActionGate, jsonResult, readPositiveIntegerParam, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { a as googlechatSetupAdapter, i as googlechatSetupWizard } from "./channel-base-Qh87GFW_.js";
2
- import { t as googlechatPlugin } from "./channel--yLM9x-c.js";
2
+ import { t as googlechatPlugin } from "./channel-DeQ7mXmt.js";
3
3
  export { googlechatPlugin, googlechatSetupAdapter, googlechatSetupWizard };
@@ -1,5 +1,5 @@
1
1
  import { l as resolveGoogleChatAccount } from "./channel-base-Qh87GFW_.js";
2
- import { l as isGoogleChatUserTarget, u as normalizeGoogleChatTarget } from "./channel.adapters-52v7fTz1.js";
2
+ import { l as isGoogleChatUserTarget, u as normalizeGoogleChatTarget } from "./channel.adapters-CndRSzJX.js";
3
3
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
4
4
  import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers } from "openclaw/plugin-sdk/approval-auth-runtime";
5
5
  //#region extensions/googlechat/src/approval-auth.ts
@@ -1,6 +1,6 @@
1
1
  import { l as resolveGoogleChatAccount } from "./channel-base-Qh87GFW_.js";
2
- import { A as registerGoogleChatManualApprovalFollowupSuppression, C as buildGoogleChatApprovalActionParameters, E as createGoogleChatApprovalToken, M as unregisterGoogleChatApprovalCardBindings, N as unregisterGoogleChatManualApprovalFollowupSuppression, S as GOOGLECHAT_APPROVAL_ACTION, d as resolveGoogleChatOutboundSpace, k as registerGoogleChatApprovalCardBinding, v as sendGoogleChatMessage, y as updateGoogleChatMessage } from "./channel.adapters-52v7fTz1.js";
3
- import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel--yLM9x-c.js";
2
+ import { A as registerGoogleChatManualApprovalFollowupSuppression, C as buildGoogleChatApprovalActionParameters, E as createGoogleChatApprovalToken, M as unregisterGoogleChatApprovalCardBindings, N as unregisterGoogleChatManualApprovalFollowupSuppression, S as GOOGLECHAT_APPROVAL_ACTION, d as resolveGoogleChatOutboundSpace, k as registerGoogleChatApprovalCardBinding, v as sendGoogleChatMessage, y as updateGoogleChatMessage } from "./channel.adapters-CndRSzJX.js";
3
+ import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-DeQ7mXmt.js";
4
4
  import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
6
  import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
@@ -1,7 +1,7 @@
1
1
  import { c as resolveDefaultGoogleChatAccountId, l as resolveGoogleChatAccount, n as createGoogleChatPluginBase, s as listGoogleChatAccountIds, t as GOOGLECHAT_CHANNEL_ID } from "./channel-base-Qh87GFW_.js";
2
- import { a as googlechatPairingTextAdapter, c as isGoogleChatSpaceTarget, i as googlechatOutboundAdapter, l as isGoogleChatUserTarget, n as googlechatGroupsAdapter, o as googlechatSecurityAdapter, r as googlechatMessageAdapter, s as googlechatThreadingAdapter, t as googlechatDirectoryAdapter, u as normalizeGoogleChatTarget } from "./channel.adapters-52v7fTz1.js";
2
+ import { a as googlechatPairingTextAdapter, c as isGoogleChatSpaceTarget, i as googlechatOutboundAdapter, l as isGoogleChatUserTarget, n as googlechatGroupsAdapter, o as googlechatSecurityAdapter, r as googlechatMessageAdapter, s as googlechatThreadingAdapter, t as googlechatDirectoryAdapter, u as normalizeGoogleChatTarget } from "./channel.adapters-CndRSzJX.js";
3
3
  import { a as buildChannelConfigSchema, r as GoogleChatConfigSchema, t as DEFAULT_ACCOUNT_ID } from "./runtime-api-BbVoWRxq.js";
4
- import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-DGtkzIeu.js";
4
+ import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-iEYyyfsa.js";
5
5
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BcEqUZ4j.js";
6
6
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-lCMHqumt.js";
7
7
  import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
@@ -139,7 +139,7 @@ const googleChatApprovalCapability = createApproverRestrictedNativeApprovalCapab
139
139
  accountId,
140
140
  request
141
141
  }),
142
- load: async () => (await import("./approval-handler.runtime-DNeVigXg.js")).googleChatApprovalNativeRuntime
142
+ load: async () => (await import("./approval-handler.runtime-Do312iBw.js")).googleChatApprovalNativeRuntime
143
143
  })
144
144
  });
145
145
  //#endregion
@@ -181,7 +181,7 @@ const collectGoogleChatMutableAllowlistWarnings = createDangerousNameMatchingMut
181
181
  });
182
182
  //#endregion
183
183
  //#region extensions/googlechat/src/gateway.ts
184
- const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-C8srsYCI.js"), "googleChatChannelRuntime");
184
+ const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-C_7uGCiL.js"), "googleChatChannelRuntime");
185
185
  async function startGoogleChatGatewayAccount(ctx) {
186
186
  const account = ctx.account;
187
187
  const statusSink = createAccountStatusSink({
@@ -243,7 +243,7 @@ async function startGoogleChatGatewayAccount(ctx) {
243
243
  }
244
244
  //#endregion
245
245
  //#region extensions/googlechat/src/channel.ts
246
- const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-C8srsYCI.js"), "googleChatChannelRuntime");
246
+ const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-C_7uGCiL.js"), "googleChatChannelRuntime");
247
247
  const googlechatActions = {
248
248
  describeMessageTool: ({ cfg, accountId }) => {
249
249
  const accounts = accountId ? [resolveGoogleChatAccount({
@@ -263,7 +263,7 @@ const googlechatActions = {
263
263
  },
264
264
  extractToolSend: ({ args }) => extractToolSend(args, "sendMessage"),
265
265
  handleAction: async (ctx) => {
266
- const { googlechatMessageActions } = await import("./actions-D4-HMJ7C.js");
266
+ const { googlechatMessageActions } = await import("./actions-CJHuXGMO.js");
267
267
  if (!googlechatMessageActions.handleAction) throw new Error("Google Chat actions are not available.");
268
268
  return await googlechatMessageActions.handleAction(ctx);
269
269
  }
@@ -1,2 +1,2 @@
1
- import { t as googlechatPlugin } from "./channel--yLM9x-c.js";
1
+ import { t as googlechatPlugin } from "./channel-DeQ7mXmt.js";
2
2
  export { googlechatPlugin };
@@ -5,8 +5,10 @@ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "opencl
5
5
  import crypto from "node:crypto";
6
6
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
7
7
  import { parseMediaContentLength } from "openclaw/plugin-sdk/media-runtime";
8
+ import { readProviderJsonResponse, readResponseTextLimited } from "openclaw/plugin-sdk/provider-http";
8
9
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
9
10
  import { buildHostnameAllowlistPolicyFromSuffixAllowlist, fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
11
+ import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
10
12
  import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
11
13
  import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
12
14
  import fs from "node:fs/promises";
@@ -22,6 +24,8 @@ const GOOGLECHAT_APPROVAL_ACTION_VALUE = "approval";
22
24
  const MANUAL_EXEC_APPROVAL_COMMAND_RE = /(?:^|[\s`])\/approve[ \t]+([^ \t\r\n`|]+)[ \t]+(allow-once|allow-always|deny)(?=$|[\s`|.,;:!?])/giu;
23
25
  const approvalCardBindings = /* @__PURE__ */ new Map();
24
26
  const approvalCardResolvingTokens = /* @__PURE__ */ new Set();
27
+ const GOOGLECHAT_APPROVAL_CARD_BINDING_MAX_ENTRIES = 1024;
28
+ const GOOGLECHAT_MANUAL_APPROVAL_SUPPRESSION_MAX_ENTRIES = 1024;
25
29
  const manualApprovalFollowupSuppressions = /* @__PURE__ */ new Map();
26
30
  function createGoogleChatApprovalToken() {
27
31
  return crypto.randomBytes(18).toString("base64url");
@@ -51,7 +55,9 @@ function readGoogleChatApprovalActionToken(event) {
51
55
  }
52
56
  function registerGoogleChatApprovalCardBinding(binding) {
53
57
  if (binding.expiresAtMs <= Date.now()) return false;
58
+ if (approvalCardBindings.has(binding.token)) approvalCardBindings.delete(binding.token);
54
59
  approvalCardBindings.set(binding.token, binding);
60
+ pruneMapToMaxSize(approvalCardBindings, GOOGLECHAT_APPROVAL_CARD_BINDING_MAX_ENTRIES);
55
61
  registerGoogleChatManualApprovalFollowupSuppression({
56
62
  approvalId: binding.approvalId,
57
63
  approvalKind: binding.approvalKind,
@@ -80,7 +86,9 @@ function registerGoogleChatManualApprovalFollowupSuppression(suppression) {
80
86
  if (suppression.expiresAtMs <= Date.now()) return false;
81
87
  const key = manualApprovalFollowupSuppressionKey(suppression.approvalId);
82
88
  if (!key) return false;
89
+ if (manualApprovalFollowupSuppressions.has(key)) manualApprovalFollowupSuppressions.delete(key);
83
90
  manualApprovalFollowupSuppressions.set(key, suppression);
91
+ pruneMapToMaxSize(manualApprovalFollowupSuppressions, GOOGLECHAT_MANUAL_APPROVAL_SUPPRESSION_MAX_ENTRIES);
84
92
  return true;
85
93
  }
86
94
  function unregisterGoogleChatManualApprovalFollowupSuppression(approvalId) {
@@ -465,12 +473,9 @@ const CHAT_SCOPE = "https://www.googleapis.com/auth/chat.bot";
465
473
  const CHAT_ISSUER = "chat@system.gserviceaccount.com";
466
474
  const ADDON_ISSUER_PATTERN = /^service-\d+@gcp-sa-gsuiteaddons\.iam\.gserviceaccount\.com$/;
467
475
  const CHAT_CERTS_URL = "https://www.googleapis.com/service_accounts/v1/metadata/x509/chat@system.gserviceaccount.com";
476
+ const GOOGLECHAT_CERT_FETCH_TIMEOUT_MS = 3e4;
468
477
  async function readGoogleChatCertsResponse(response) {
469
- try {
470
- return await response.json();
471
- } catch (cause) {
472
- throw new Error("Google Chat cert fetch failed: malformed JSON response", { cause });
473
- }
478
+ return readProviderJsonResponse(response, "Google Chat cert fetch failed");
474
479
  }
475
480
  const MAX_AUTH_CACHE_SIZE = 32;
476
481
  const authCache = /* @__PURE__ */ new Map();
@@ -532,7 +537,8 @@ async function fetchChatCerts() {
532
537
  if (cachedCerts && now - cachedCerts.fetchedAt < 600 * 1e3) return cachedCerts.certs;
533
538
  const { response, release } = await fetchWithSsrFGuard$1({
534
539
  url: CHAT_CERTS_URL,
535
- auditContext: "googlechat.auth.certs"
540
+ auditContext: "googlechat.auth.certs",
541
+ timeoutMs: GOOGLECHAT_CERT_FETCH_TIMEOUT_MS
536
542
  });
537
543
  try {
538
544
  if (!response.ok) throw new Error(`Failed to fetch Chat certs (${response.status})`);
@@ -611,11 +617,7 @@ async function verifyGoogleChatRequest(params) {
611
617
  const CHAT_API_BASE = "https://chat.googleapis.com/v1";
612
618
  const CHAT_UPLOAD_BASE = "https://chat.googleapis.com/upload/v1";
613
619
  async function readGoogleChatJsonResponse(response, label) {
614
- try {
615
- return await response.json();
616
- } catch (cause) {
617
- throw new Error(`${label}: malformed JSON response`, { cause });
618
- }
620
+ return readProviderJsonResponse(response, label);
619
621
  }
620
622
  const headersToObject = (headers) => headers instanceof Headers ? Object.fromEntries(headers.entries()) : Array.isArray(headers) ? Object.fromEntries(headers) : headers || {};
621
623
  async function withGoogleChatResponse(params) {
@@ -634,7 +636,7 @@ async function withGoogleChatResponse(params) {
634
636
  });
635
637
  try {
636
638
  if (!response.ok) {
637
- const text = await response.text().catch(() => "");
639
+ const text = await readResponseTextLimited(response).catch(() => "");
638
640
  throw new Error(`${errorPrefix} ${response.status}: ${text || response.statusText}`);
639
641
  }
640
642
  return await handleResponse(response);
@@ -843,7 +845,7 @@ function resolveGoogleChatGroupRequireMention(params) {
843
845
  }
844
846
  //#endregion
845
847
  //#region extensions/googlechat/src/channel.adapters.ts
846
- const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-C8srsYCI.js"), "googleChatChannelRuntime");
848
+ const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-C_7uGCiL.js"), "googleChatChannelRuntime");
847
849
  function createGoogleChatSendReceipt(params) {
848
850
  const messageId = params.messageId?.trim();
849
851
  return createMessageReceiptFromOutboundResults({
@@ -1,6 +1,6 @@
1
- import { D as getGoogleChatApprovalCardBinding, O as readGoogleChatApprovalActionToken, T as completeGoogleChatApprovalCardBinding, _ as probeGoogleChat, b as uploadGoogleChatAttachment, h as downloadGoogleChatMedia, j as releaseGoogleChatApprovalCardBinding, p as deleteGoogleChatMessage, v as sendGoogleChatMessage, w as claimGoogleChatApprovalCardBinding, x as verifyGoogleChatRequest, y as updateGoogleChatMessage } from "./channel.adapters-52v7fTz1.js";
1
+ import { D as getGoogleChatApprovalCardBinding, O as readGoogleChatApprovalActionToken, T as completeGoogleChatApprovalCardBinding, _ as probeGoogleChat, b as uploadGoogleChatAttachment, h as downloadGoogleChatMedia, j as releaseGoogleChatApprovalCardBinding, p as deleteGoogleChatMessage, v as sendGoogleChatMessage, w as claimGoogleChatApprovalCardBinding, x as verifyGoogleChatRequest, y as updateGoogleChatMessage } from "./channel.adapters-CndRSzJX.js";
2
2
  import { E as resolveDefaultGroupPolicy, M as warnMissingProviderGroupPolicyFallbackOnce, O as resolveInboundRouteEnvelopeBuilderWithRuntime, P as getGoogleChatRuntime, k as resolveWebhookPath, m as isDangerousNameMatchingEnabled, n as GROUP_POLICY_BLOCKED_LABEL, u as createChannelPairingController, w as resolveAllowlistProviderRuntimeGroupPolicy } from "./runtime-api-BbVoWRxq.js";
3
- import { n as googleChatApprovalAuth } from "./approval-auth-DGtkzIeu.js";
3
+ import { n as googleChatApprovalAuth } from "./approval-auth-iEYyyfsa.js";
4
4
  import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
5
5
  import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
6
6
  import { recordChannelBotPairLoopAndCheckSuppression } from "openclaw/plugin-sdk/channel-inbound";
@@ -1,4 +1,4 @@
1
- import { t as googlechatDirectoryAdapter } from "./channel.adapters-52v7fTz1.js";
1
+ import { t as googlechatDirectoryAdapter } from "./channel.adapters-CndRSzJX.js";
2
2
  //#region extensions/googlechat/directory-contract-api.ts
3
3
  const googlechatDirectoryContractPlugin = {
4
4
  id: "googlechat",
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/googlechat",
3
- "version": "2026.6.11-beta.2",
3
+ "version": "2026.6.33",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/googlechat",
9
- "version": "2026.6.11-beta.2",
9
+ "version": "2026.6.33",
10
10
  "dependencies": {
11
11
  "gaxios": "7.1.4",
12
12
  "google-auth-library": "10.6.2",
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.6.11-beta.2"
16
+ "openclaw": ">=2026.6.33"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openclaw/googlechat",
3
- "version": "2026.6.11-beta.2",
3
+ "version": "2026.6.33",
4
4
  "description": "OpenClaw Google Chat channel plugin for spaces and direct messages.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -13,7 +13,7 @@
13
13
  "zod": "4.4.3"
14
14
  },
15
15
  "peerDependencies": {
16
- "openclaw": ">=2026.6.11-beta.2"
16
+ "openclaw": ">=2026.6.33"
17
17
  },
18
18
  "peerDependenciesMeta": {
19
19
  "openclaw": {
@@ -71,10 +71,10 @@
71
71
  "minHostVersion": ">=2026.4.10"
72
72
  },
73
73
  "compat": {
74
- "pluginApi": ">=2026.6.11-beta.2"
74
+ "pluginApi": ">=2026.6.33"
75
75
  },
76
76
  "build": {
77
- "openclawVersion": "2026.6.11-beta.2"
77
+ "openclawVersion": "2026.6.33"
78
78
  },
79
79
  "release": {
80
80
  "publishToClawHub": true,