@openclaw/googlechat 2026.6.11 → 2026.7.1-beta.2

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-CFEUpRK6.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-BQMTDOKw.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-CFEUpRK6.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,8 +1,9 @@
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-CFEUpRK6.js";
3
+ import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-BQMTDOKw.js";
4
4
  import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
5
5
  import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
6
+ import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
6
7
  import { createChannelApprovalNativeRuntimeAdapter } from "openclaw/plugin-sdk/approval-handler-runtime";
7
8
  import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
8
9
  //#region extensions/googlechat/src/approval-handler.runtime.ts
@@ -21,7 +22,7 @@ function escapeGoogleChatText(text) {
21
22
  return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
22
23
  }
23
24
  function truncateText(text, maxChars = MAX_TEXT_PARAGRAPH_CHARS) {
24
- return text.length <= maxChars ? text : `${text.slice(0, maxChars - 3)}...`;
25
+ return text.length <= maxChars ? text : `${truncateUtf16Safe(text, maxChars - 3)}...`;
25
26
  }
26
27
  function buildMetadataText(metadata) {
27
28
  return metadata.map((item) => `<b>${escapeGoogleChatText(item.label)}:</b> ${escapeGoogleChatText(item.value)}`).join("<br>");
@@ -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-CFEUpRK6.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-BxSuKX1J.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-AQl0xUss.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-BBH8WHto.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-BBH8WHto.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-BaygKCqu.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-BQMTDOKw.js";
2
2
  export { googlechatPlugin };
@@ -5,6 +5,7 @@ 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";
10
11
  import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
@@ -466,11 +467,7 @@ const CHAT_ISSUER = "chat@system.gserviceaccount.com";
466
467
  const ADDON_ISSUER_PATTERN = /^service-\d+@gcp-sa-gsuiteaddons\.iam\.gserviceaccount\.com$/;
467
468
  const CHAT_CERTS_URL = "https://www.googleapis.com/service_accounts/v1/metadata/x509/chat@system.gserviceaccount.com";
468
469
  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
- }
470
+ return readProviderJsonResponse(response, "Google Chat cert fetch failed");
474
471
  }
475
472
  const MAX_AUTH_CACHE_SIZE = 32;
476
473
  const authCache = /* @__PURE__ */ new Map();
@@ -611,11 +608,7 @@ async function verifyGoogleChatRequest(params) {
611
608
  const CHAT_API_BASE = "https://chat.googleapis.com/v1";
612
609
  const CHAT_UPLOAD_BASE = "https://chat.googleapis.com/upload/v1";
613
610
  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
- }
611
+ return readProviderJsonResponse(response, label);
619
612
  }
620
613
  const headersToObject = (headers) => headers instanceof Headers ? Object.fromEntries(headers.entries()) : Array.isArray(headers) ? Object.fromEntries(headers) : headers || {};
621
614
  async function withGoogleChatResponse(params) {
@@ -634,7 +627,7 @@ async function withGoogleChatResponse(params) {
634
627
  });
635
628
  try {
636
629
  if (!response.ok) {
637
- const text = await response.text().catch(() => "");
630
+ const text = await readResponseTextLimited(response).catch(() => "");
638
631
  throw new Error(`${errorPrefix} ${response.status}: ${text || response.statusText}`);
639
632
  }
640
633
  return await handleResponse(response);
@@ -843,7 +836,7 @@ function resolveGoogleChatGroupRequireMention(params) {
843
836
  }
844
837
  //#endregion
845
838
  //#region extensions/googlechat/src/channel.adapters.ts
846
- const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-C8srsYCI.js"), "googleChatChannelRuntime");
839
+ const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BBH8WHto.js"), "googleChatChannelRuntime");
847
840
  function createGoogleChatSendReceipt(params) {
848
841
  const messageId = params.messageId?.trim();
849
842
  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-CFEUpRK6.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-BxSuKX1J.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";
@@ -926,7 +926,8 @@ async function processMessageWithPipeline(params) {
926
926
  sender: {
927
927
  id: senderId,
928
928
  name: senderName || void 0,
929
- username: senderEmail
929
+ username: senderEmail,
930
+ isBot: isBotSender || void 0
930
931
  },
931
932
  conversation: {
932
933
  kind: isGroup ? "channel" : "direct",
@@ -1,4 +1,4 @@
1
- import { t as googlechatDirectoryAdapter } from "./channel.adapters-52v7fTz1.js";
1
+ import { t as googlechatDirectoryAdapter } from "./channel.adapters-CFEUpRK6.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",
3
+ "version": "2026.7.1-beta.2",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/googlechat",
9
- "version": "2026.6.11",
9
+ "version": "2026.7.1-beta.2",
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"
16
+ "openclaw": ">=2026.7.1-beta.2"
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",
3
+ "version": "2026.7.1-beta.2",
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"
16
+ "openclaw": ">=2026.7.1-beta.2"
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"
74
+ "pluginApi": ">=2026.7.1-beta.2"
75
75
  },
76
76
  "build": {
77
- "openclawVersion": "2026.6.11"
77
+ "openclawVersion": "2026.7.1-beta.2"
78
78
  },
79
79
  "release": {
80
80
  "publishToClawHub": true,