@openclaw/googlechat 2026.5.28-beta.3 → 2026.5.28-beta.4

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,7 +1,7 @@
1
1
  import { o as resolveGoogleChatAccount, r as listEnabledGoogleChatAccounts } from "./setup-surface-QTAQvs5Q.js";
2
- import { P as getGoogleChatRuntime } from "./runtime-api-BxXLkwmK.js";
3
- import { c as sendGoogleChatMessage, o as listGoogleChatReactions, r as deleteGoogleChatReaction, t as createGoogleChatReaction, u as uploadGoogleChatAttachment } from "./api-Dy9ba7dZ.js";
4
- import { n as resolveGoogleChatOutboundSpace } from "./channel-DAZQ2u-y.js";
2
+ import { P as getGoogleChatRuntime } from "./runtime-api-BbVoWRxq.js";
3
+ import { c as sendGoogleChatMessage, o as listGoogleChatReactions, r as deleteGoogleChatReaction, t as createGoogleChatReaction, u as uploadGoogleChatAttachment } from "./api-DxtI9OoY.js";
4
+ import { n as resolveGoogleChatOutboundSpace } from "./channel-CgcjzaOf.js";
5
5
  import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
6
6
  import { createActionGate, jsonResult, readPositiveIntegerParam, readReactionParams, readStringParam } from "openclaw/plugin-sdk/channel-actions";
7
7
  import { loadOutboundMediaFromUrl } from "openclaw/plugin-sdk/outbound-media";
@@ -1,7 +1,8 @@
1
- import { p as fetchWithSsrFGuard$1 } from "./runtime-api-BxXLkwmK.js";
1
+ import { p as fetchWithSsrFGuard$1 } from "./runtime-api-BbVoWRxq.js";
2
2
  import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
3
3
  import crypto from "node:crypto";
4
4
  import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
5
+ import { parseMediaContentLength } from "openclaw/plugin-sdk/media-runtime";
5
6
  import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
6
7
  import { buildHostnameAllowlistPolicyFromSuffixAllowlist, fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
7
8
  import fs from "node:fs/promises";
@@ -251,8 +252,8 @@ function createGoogleAuthFetch(baseFetch) {
251
252
  async function readGoogleAuthResponseBytes(response) {
252
253
  const contentLengthHeader = response.headers.get("content-length");
253
254
  if (contentLengthHeader) {
254
- const contentLength = Number(contentLengthHeader);
255
- if (Number.isFinite(contentLength) && contentLength > MAX_GOOGLE_AUTH_RESPONSE_BYTES) throw new Error(`Google auth response exceeds ${MAX_GOOGLE_AUTH_RESPONSE_BYTES} bytes.`);
255
+ const contentLength = parseMediaContentLength(contentLengthHeader);
256
+ if (contentLength !== null && contentLength > MAX_GOOGLE_AUTH_RESPONSE_BYTES) throw new Error(`Google auth response exceeds ${MAX_GOOGLE_AUTH_RESPONSE_BYTES} bytes.`);
256
257
  }
257
258
  const reader = response.body?.getReader();
258
259
  if (!reader) throw new Error("Google auth response body stream unavailable; refusing to buffer unbounded response.");
@@ -525,8 +526,8 @@ async function fetchBuffer(account, url, init, options) {
525
526
  const maxBytes = options?.maxBytes;
526
527
  const lengthHeader = res.headers.get("content-length");
527
528
  if (maxBytes && lengthHeader) {
528
- const length = Number(lengthHeader);
529
- if (Number.isFinite(length) && length > maxBytes) throw new Error(`Google Chat media exceeds max bytes (${maxBytes})`);
529
+ const length = parseMediaContentLength(lengthHeader);
530
+ if (length !== null && length > maxBytes) throw new Error(`Google Chat media exceeds max bytes (${maxBytes})`);
530
531
  }
531
532
  if (!maxBytes) return {
532
533
  buffer: Buffer.from(await res.arrayBuffer()),
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import { n as googlechatSetupAdapter, t as googlechatSetupWizard } from "./setup-surface-QTAQvs5Q.js";
2
- import { t as googlechatPlugin } from "./channel-DAZQ2u-y.js";
2
+ import { t as googlechatPlugin } from "./channel-CgcjzaOf.js";
3
3
  export { googlechatPlugin, googlechatSetupAdapter, googlechatSetupWizard };
@@ -1,6 +1,6 @@
1
1
  import { a as resolveDefaultGoogleChatAccountId, i as listGoogleChatAccountIds, n as googlechatSetupAdapter, o as resolveGoogleChatAccount, s as resolveGoogleChatConfigAccessorAccount, t as googlechatSetupWizard } from "./setup-surface-QTAQvs5Q.js";
2
- import { T as resolveChannelMediaMaxBytes, _ as missingTargetError, a as buildChannelConfigSchema, g as loadOutboundMediaFromUrl, i as PAIRING_APPROVED_MESSAGE, o as chunkTextForOutbound, r as GoogleChatConfigSchema, t as DEFAULT_ACCOUNT_ID, x as readRemoteMediaBuffer } from "./runtime-api-BxXLkwmK.js";
3
- import { a as findGoogleChatDirectMessage } from "./api-Dy9ba7dZ.js";
2
+ import { T as resolveChannelMediaMaxBytes, _ as missingTargetError, a as buildChannelConfigSchema, g as loadOutboundMediaFromUrl, i as PAIRING_APPROVED_MESSAGE, o as chunkTextForOutbound, r as GoogleChatConfigSchema, t as DEFAULT_ACCOUNT_ID, x as readRemoteMediaBuffer } from "./runtime-api-BbVoWRxq.js";
3
+ import { a as findGoogleChatDirectMessage } from "./api-DxtI9OoY.js";
4
4
  import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-5OTt6Vdl.js";
5
5
  import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-lCMHqumt.js";
6
6
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
@@ -91,7 +91,7 @@ function resolveGoogleChatGroupRequireMention(params) {
91
91
  }
92
92
  //#endregion
93
93
  //#region extensions/googlechat/src/channel.adapters.ts
94
- const loadGoogleChatChannelRuntime$2 = createLazyRuntimeNamedExport(() => import("./channel.runtime-BjLb8zSf.js"), "googleChatChannelRuntime");
94
+ const loadGoogleChatChannelRuntime$2 = createLazyRuntimeNamedExport(() => import("./channel.runtime-Ds0MRKqf.js"), "googleChatChannelRuntime");
95
95
  function createGoogleChatSendReceipt(params) {
96
96
  const messageId = params.messageId?.trim();
97
97
  return createMessageReceiptFromOutboundResults({
@@ -332,7 +332,7 @@ const collectGoogleChatMutableAllowlistWarnings = createDangerousNameMatchingMut
332
332
  });
333
333
  //#endregion
334
334
  //#region extensions/googlechat/src/gateway.ts
335
- const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-BjLb8zSf.js"), "googleChatChannelRuntime");
335
+ const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-Ds0MRKqf.js"), "googleChatChannelRuntime");
336
336
  async function startGoogleChatGatewayAccount(ctx) {
337
337
  const account = ctx.account;
338
338
  const statusSink = createAccountStatusSink({
@@ -372,7 +372,7 @@ async function startGoogleChatGatewayAccount(ctx) {
372
372
  }
373
373
  //#endregion
374
374
  //#region extensions/googlechat/src/channel.ts
375
- const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-BjLb8zSf.js"), "googleChatChannelRuntime");
375
+ const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-Ds0MRKqf.js"), "googleChatChannelRuntime");
376
376
  const meta = {
377
377
  id: "googlechat",
378
378
  label: "Google Chat",
@@ -428,7 +428,7 @@ const googlechatActions = {
428
428
  },
429
429
  extractToolSend: ({ args }) => extractToolSend(args, "sendMessage"),
430
430
  handleAction: async (ctx) => {
431
- const { googlechatMessageActions } = await import("./actions-0GU5pxxi.js");
431
+ const { googlechatMessageActions } = await import("./actions-uM31ILpT.js");
432
432
  if (!googlechatMessageActions.handleAction) throw new Error("Google Chat actions are not available.");
433
433
  return await googlechatMessageActions.handleAction(ctx);
434
434
  }
@@ -1,2 +1,2 @@
1
- import { t as googlechatPlugin } from "./channel-DAZQ2u-y.js";
1
+ import { t as googlechatPlugin } from "./channel-CgcjzaOf.js";
2
2
  export { googlechatPlugin };
@@ -1,6 +1,6 @@
1
1
  import "./setup-surface-QTAQvs5Q.js";
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-BxXLkwmK.js";
3
- import { c as sendGoogleChatMessage, d as verifyGoogleChatRequest, i as downloadGoogleChatMedia, l as updateGoogleChatMessage, n as deleteGoogleChatMessage, s as probeGoogleChat, u as uploadGoogleChatAttachment } from "./api-Dy9ba7dZ.js";
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 { c as sendGoogleChatMessage, d as verifyGoogleChatRequest, i as downloadGoogleChatMedia, l as updateGoogleChatMessage, n as deleteGoogleChatMessage, s as probeGoogleChat, u as uploadGoogleChatAttachment } from "./api-DxtI9OoY.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";
@@ -789,10 +789,11 @@ async function processMessageWithPipeline(params) {
789
789
  }
790
790
  }
791
791
  const fromLabel = isGroup ? space.displayName || `space:${spaceId}` : senderName || `user:${senderId}`;
792
+ const timestampMs = resolveGoogleChatTimestampMs(event.eventTime);
792
793
  const { storePath, body } = buildEnvelope({
793
794
  channel: "Google Chat",
794
795
  from: fromLabel,
795
- timestamp: event.eventTime ? Date.parse(event.eventTime) : void 0,
796
+ timestamp: timestampMs,
796
797
  body: rawBody
797
798
  });
798
799
  const replyThreadName = isGroup ? message.thread?.name : void 0;
@@ -801,7 +802,7 @@ async function processMessageWithPipeline(params) {
801
802
  accountId: route.accountId,
802
803
  messageId: message.name,
803
804
  messageIdFull: message.name,
804
- timestamp: event.eventTime ? Date.parse(event.eventTime) : void 0,
805
+ timestamp: timestampMs,
805
806
  from: `googlechat:${senderId}`,
806
807
  sender: {
807
808
  id: senderId,
@@ -871,7 +872,7 @@ async function processMessageWithPipeline(params) {
871
872
  adapter: {
872
873
  ingest: () => ({
873
874
  id: message.name ?? spaceId,
874
- timestamp: event.eventTime ? Date.parse(event.eventTime) : void 0,
875
+ timestamp: timestampMs,
875
876
  rawText: rawBody,
876
877
  textForAgent: rawBody,
877
878
  textForCommands: rawBody,
@@ -1,2 +1,2 @@
1
- import { A as resolveWebhookTargetWithAuthOrReject, C as registerWebhookTargetWithPluginRoute, D as resolveInboundMentionDecision, E as resolveDefaultGroupPolicy, F as setGoogleChatRuntime, M as warnMissingProviderGroupPolicyFallbackOnce, N as withResolvedWebhookRequestPipeline, O as resolveInboundRouteEnvelopeBuilderWithRuntime, S as readStringParam, T as resolveChannelMediaMaxBytes, _ as missingTargetError, a as buildChannelConfigSchema, b as readReactionParams, c as createActionGate, d as createWebhookInFlightLimiter, f as extractToolSend, g as loadOutboundMediaFromUrl, h as jsonResult, i as PAIRING_APPROVED_MESSAGE, j as runPassiveAccountLifecycle, k as resolveWebhookPath, l as createChannelMessageReplyPipeline, m as isDangerousNameMatchingEnabled, n as GROUP_POLICY_BLOCKED_LABEL, o as chunkTextForOutbound, p as fetchWithSsrFGuard, r as GoogleChatConfigSchema, s as createAccountStatusSink, t as DEFAULT_ACCOUNT_ID, u as createChannelPairingController, v as readJsonWebhookBodyOrReject, w as resolveAllowlistProviderRuntimeGroupPolicy, x as readRemoteMediaBuffer, y as readNumberParam } from "./runtime-api-BxXLkwmK.js";
1
+ import { A as resolveWebhookTargetWithAuthOrReject, C as registerWebhookTargetWithPluginRoute, D as resolveInboundMentionDecision, E as resolveDefaultGroupPolicy, F as setGoogleChatRuntime, M as warnMissingProviderGroupPolicyFallbackOnce, N as withResolvedWebhookRequestPipeline, O as resolveInboundRouteEnvelopeBuilderWithRuntime, S as readStringParam, T as resolveChannelMediaMaxBytes, _ as missingTargetError, a as buildChannelConfigSchema, b as readReactionParams, c as createActionGate, d as createWebhookInFlightLimiter, f as extractToolSend, g as loadOutboundMediaFromUrl, h as jsonResult, i as PAIRING_APPROVED_MESSAGE, j as runPassiveAccountLifecycle, k as resolveWebhookPath, l as createChannelMessageReplyPipeline, m as isDangerousNameMatchingEnabled, n as GROUP_POLICY_BLOCKED_LABEL, o as chunkTextForOutbound, p as fetchWithSsrFGuard, r as GoogleChatConfigSchema, s as createAccountStatusSink, t as DEFAULT_ACCOUNT_ID, u as createChannelPairingController, v as readJsonWebhookBodyOrReject, w as resolveAllowlistProviderRuntimeGroupPolicy, x as readRemoteMediaBuffer, y as readNumberParam } from "./runtime-api-BbVoWRxq.js";
2
2
  export { DEFAULT_ACCOUNT_ID, GROUP_POLICY_BLOCKED_LABEL, GoogleChatConfigSchema, PAIRING_APPROVED_MESSAGE, buildChannelConfigSchema, chunkTextForOutbound, createAccountStatusSink, createActionGate, createChannelMessageReplyPipeline, createChannelPairingController, createWebhookInFlightLimiter, extractToolSend, fetchWithSsrFGuard, isDangerousNameMatchingEnabled, jsonResult, loadOutboundMediaFromUrl, missingTargetError, readJsonWebhookBodyOrReject, readNumberParam, readReactionParams, readRemoteMediaBuffer, readStringParam, registerWebhookTargetWithPluginRoute, resolveAllowlistProviderRuntimeGroupPolicy, resolveChannelMediaMaxBytes, resolveDefaultGroupPolicy, resolveInboundMentionDecision, resolveInboundRouteEnvelopeBuilderWithRuntime, resolveWebhookPath, resolveWebhookTargetWithAuthOrReject, runPassiveAccountLifecycle, setGoogleChatRuntime, warnMissingProviderGroupPolicyFallbackOnce, withResolvedWebhookRequestPipeline };
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@openclaw/googlechat",
3
- "version": "2026.5.28-beta.3",
3
+ "version": "2026.5.28-beta.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@openclaw/googlechat",
9
- "version": "2026.5.28-beta.3",
9
+ "version": "2026.5.28-beta.4",
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.5.28-beta.3"
16
+ "openclaw": ">=2026.5.28-beta.4"
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.5.28-beta.3",
3
+ "version": "2026.5.28-beta.4",
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.5.28-beta.3"
16
+ "openclaw": ">=2026.5.28-beta.4"
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.5.28-beta.3"
74
+ "pluginApi": ">=2026.5.28-beta.4"
75
75
  },
76
76
  "build": {
77
- "openclawVersion": "2026.5.28-beta.3"
77
+ "openclawVersion": "2026.5.28-beta.4"
78
78
  },
79
79
  "release": {
80
80
  "publishToClawHub": true,
@@ -1,4 +1,5 @@
1
1
  import { extractToolSend as extractToolSend$1 } from "openclaw/plugin-sdk/tool-send";
2
+ import { readRemoteMediaBuffer, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
2
3
  import { fetchWithSsrFGuard as fetchWithSsrFGuard$1 } from "openclaw/plugin-sdk/ssrf-runtime";
3
4
  import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
4
5
  import { createActionGate as createActionGate$1, jsonResult as jsonResult$1, readNumberParam, readReactionParams as readReactionParams$1, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/channel-actions";
@@ -11,7 +12,6 @@ import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
11
12
  import { GoogleChatConfigSchema } from "openclaw/plugin-sdk/bundled-channel-config-schema";
12
13
  import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
13
14
  import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
14
- import { readRemoteMediaBuffer, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
15
15
  import { loadOutboundMediaFromUrl as loadOutboundMediaFromUrl$1 } from "openclaw/plugin-sdk/outbound-media";
16
16
  import { resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-inbound";
17
17
  import { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope";