@openclaw/googlechat 2026.11.3 → 2026.11.5-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.
- package/dist/.setup/{actions-CTuBGHVR.mjs → actions-UltP4TmA.mjs} +3 -3
- package/dist/.setup/{approval-auth-Dd-6ne22.mjs → approval-auth-C-AJm9xZ.mjs} +2 -2
- package/dist/.setup/{approval-handler.runtime-ZJkCErV1.mjs → approval-handler.runtime-dh__rR4O.mjs} +3 -3
- package/dist/.setup/{channel-p2FLMhYl.mjs → channel-DHpMDrjU.mjs} +78 -88
- package/dist/.setup/{channel-base-sWlG7EP1.mjs → channel-base-DZs1uOyW.mjs} +13 -14
- package/dist/.setup/{channel.adapters-CLzwB-5-.mjs → channel.adapters-BVT76qsz.mjs} +239 -315
- package/dist/.setup/{channel.runtime-Dlp4xvi9.mjs → channel.runtime-I9jyPEzh.mjs} +294 -343
- package/dist/.setup/secret-contract-api-BG_8yVjr.mjs +2 -0
- package/dist/.setup/setup-plugin-api-DW0Pq8Dd.mjs +2 -0
- package/dist/.source-module-urls/974ffefea973cf3ea18e1534d25b091bcf1b68760a2b9eda0cd9bd9392096c64.json +1 -0
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +1 -2
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -2
- package/dist/runtime-api.js +1 -2
- package/dist/secret-contract-api.js +1 -2
- package/dist/setup-entry.js +2 -2
- package/dist/setup-plugin-api.js +1 -2
- package/node_modules/google-auth-library/build/src/auth/authclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/awsclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/awsrequestsigner.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/baseexternalclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/certificatesubjecttokensupplier.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/computeclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/credentials.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/defaultawssecuritycredentialssupplier.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/downscopedclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/envDetect.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/executable-response.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/externalAccountAuthorizedUserClient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/externalclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/filesubjecttokensupplier.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/gdchclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/googleauth.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/iam.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/identitypoolclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/idtokenclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/impersonated.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/jwtaccess.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/jwtclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/loginticket.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/oauth2client.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/oauth2common.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/passthrough.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/pluggable-auth-client.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/pluggable-auth-handler.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/refreshclient.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/stscredentials.js.map +1 -0
- package/node_modules/google-auth-library/build/src/auth/urlsubjecttokensupplier.js.map +1 -0
- package/node_modules/google-auth-library/build/src/crypto/browser/crypto.js.map +1 -0
- package/node_modules/google-auth-library/build/src/crypto/crypto.js.map +1 -0
- package/node_modules/google-auth-library/build/src/crypto/node/crypto.js.map +1 -0
- package/node_modules/google-auth-library/build/src/crypto/shared.js.map +1 -0
- package/node_modules/google-auth-library/build/src/gtoken/errorWithCode.js.map +1 -0
- package/node_modules/google-auth-library/build/src/gtoken/getCredentials.js.map +1 -0
- package/node_modules/google-auth-library/build/src/gtoken/getToken.js.map +1 -0
- package/node_modules/google-auth-library/build/src/gtoken/googleToken.js.map +1 -0
- package/node_modules/google-auth-library/build/src/gtoken/jwsSign.js.map +1 -0
- package/node_modules/google-auth-library/build/src/gtoken/revokeToken.js.map +1 -0
- package/node_modules/google-auth-library/build/src/gtoken/tokenHandler.js.map +1 -0
- package/node_modules/google-auth-library/build/src/gtoken/tokenOptions.js.map +1 -0
- package/node_modules/google-auth-library/build/src/index.js.map +1 -0
- package/node_modules/google-auth-library/build/src/shared.cjs.map +1 -0
- package/node_modules/google-auth-library/build/src/util.js.map +1 -0
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/gaxios.js +166 -5
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/gaxios.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/retry.js +12 -2
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/retry.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/gaxios.js +167 -6
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/gaxios.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/retry.js +12 -2
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/retry.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/gaxios/package.json +32 -25
- package/node_modules/google-auth-library/node_modules/gcp-metadata/build/src/index.js +14 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/build/src/index.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/package.json +19 -20
- package/node_modules/google-auth-library/node_modules/google-logging-utils/package.json +2 -2
- package/node_modules/google-auth-library/package.json +7 -9
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/openclaw.plugin.json +0 -30
- package/package.json +6 -6
- package/dist/.setup/secret-contract-api-Dx8QYxoR.mjs +0 -3
- package/dist/.setup/setup-plugin-api-yGEtLeXV.mjs +0 -3
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.js +0 -109
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/browser-test-runner.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/test.browser.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/test.browser.js +0 -81
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/browser-test/test.browser.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/system-test/test.install.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/system-test/test.install.js +0 -128
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/system-test/test.install.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.getch.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.getch.js +0 -1510
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.getch.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.index.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.index.js +0 -61
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.index.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.retry.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.retry.js +0 -367
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/test/test.retry.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/browser-test-runner.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/browser-test-runner.js +0 -71
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/browser-test-runner.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/test.browser.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/test.browser.js +0 -76
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/browser-test/test.browser.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/system-test/test.install.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/system-test/test.install.js +0 -123
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/system-test/test.install.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.getch.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.getch.js +0 -1472
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.getch.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.index.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.index.js +0 -23
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.index.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.retry.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.retry.js +0 -362
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/test/test.retry.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import { C as sendGoogleChatMessage, d as formatGoogleChatMediaText, v as resolveGoogleChatOutboundSpace } from "./channel.adapters-
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-DZs1uOyW.mjs";
|
|
2
|
+
import { C as sendGoogleChatMessage, d as formatGoogleChatMediaText, v as resolveGoogleChatOutboundSpace } from "./channel.adapters-BVT76qsz.mjs";
|
|
3
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { jsonResult, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
//#region extensions/googlechat/src/actions.ts
|
|
@@ -42,7 +42,7 @@ async function handleGoogleChatAction({ action, params, cfg, accountId, assertDi
|
|
|
42
42
|
account,
|
|
43
43
|
space,
|
|
44
44
|
text: content,
|
|
45
|
-
thread: threadId
|
|
45
|
+
thread: threadId,
|
|
46
46
|
assertDirectAdapterHandoff,
|
|
47
47
|
onPlatformSendDispatch
|
|
48
48
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import { g as normalizeGoogleChatTarget, h as isGoogleChatUserTarget } from "./channel.adapters-
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-DZs1uOyW.mjs";
|
|
2
|
+
import { g as normalizeGoogleChatTarget, h as isGoogleChatUserTarget } from "./channel.adapters-BVT76qsz.mjs";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
5
5
|
//#region extensions/googlechat/src/approval-auth.ts
|
package/dist/.setup/{approval-handler.runtime-ZJkCErV1.mjs → approval-handler.runtime-dh__rR4O.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import { A as registerGoogleChatApprovalCardBinding, C as sendGoogleChatMessage, D as buildGoogleChatApprovalActionParameters, E as GOOGLECHAT_APPROVAL_ACTION, M as unregisterGoogleChatManualApprovalFollowupSuppression, O as googleChatApprovalControls, j as registerGoogleChatManualApprovalFollowupSuppression, v as resolveGoogleChatOutboundSpace, w as updateGoogleChatMessage } from "./channel.adapters-
|
|
3
|
-
import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-DZs1uOyW.mjs";
|
|
2
|
+
import { A as registerGoogleChatApprovalCardBinding, C as sendGoogleChatMessage, D as buildGoogleChatApprovalActionParameters, E as GOOGLECHAT_APPROVAL_ACTION, M as unregisterGoogleChatManualApprovalFollowupSuppression, O as googleChatApprovalControls, j as registerGoogleChatManualApprovalFollowupSuppression, v as resolveGoogleChatOutboundSpace, w as updateGoogleChatMessage } from "./channel.adapters-BVT76qsz.mjs";
|
|
3
|
+
import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-DHpMDrjU.mjs";
|
|
4
4
|
import { n as escapeGoogleChatApprovalCardText, t as buildGoogleChatApprovalTextWidget } from "./approval-card-text-BKg_4mXq.mjs";
|
|
5
5
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BzoaiFSD.mjs";
|
|
2
2
|
import { n as buildChannelConfigSchema, t as GoogleChatConfigSchema } from "./config-api-CsD0IFxF.mjs";
|
|
3
|
-
import { c as resolveDefaultGoogleChatAccountId, l as resolveGoogleChatAccount, o as inspectGoogleChatAccount, r as googlechatSetupPlugin, s as listGoogleChatAccountIds, t as GOOGLECHAT_CHANNEL_ID } from "./channel-base-
|
|
4
|
-
import { _ as resolveGoogleChatOutboundSessionRoute, a as googlechatPairingTextAdapter, g as normalizeGoogleChatTarget, h as isGoogleChatUserTarget, i as googlechatOutboundAdapter, m as isGoogleChatSpaceTarget, n as googlechatGroupsAdapter, o as googlechatSecurityAdapter, r as googlechatMessageAdapter, s as googlechatThreadingAdapter, t as googlechatDirectoryAdapter } from "./channel.adapters-
|
|
5
|
-
import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-
|
|
3
|
+
import { c as resolveDefaultGoogleChatAccountId, l as resolveGoogleChatAccount, o as inspectGoogleChatAccount, r as googlechatSetupPlugin, s as listGoogleChatAccountIds, t as GOOGLECHAT_CHANNEL_ID } from "./channel-base-DZs1uOyW.mjs";
|
|
4
|
+
import { _ as resolveGoogleChatOutboundSessionRoute, a as googlechatPairingTextAdapter, g as normalizeGoogleChatTarget, h as isGoogleChatUserTarget, i as googlechatOutboundAdapter, m as isGoogleChatSpaceTarget, n as googlechatGroupsAdapter, o as googlechatSecurityAdapter, r as googlechatMessageAdapter, s as googlechatThreadingAdapter, t as googlechatDirectoryAdapter } from "./channel.adapters-BVT76qsz.mjs";
|
|
5
|
+
import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-C-AJm9xZ.mjs";
|
|
6
6
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-D7KjX374.mjs";
|
|
7
7
|
import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
|
|
8
|
+
import { CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY, createLazyChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-adapter-runtime";
|
|
8
9
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
10
|
+
import { createAccountStatusSink, runPassiveAccountLifecycle } from "openclaw/plugin-sdk/channel-outbound";
|
|
11
|
+
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
9
12
|
import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
|
|
13
|
+
import { channelBlockedPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
10
14
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
11
15
|
import { createComputedAccountStatusAdapter, createDefaultChannelRuntimeState } from "openclaw/plugin-sdk/status-helpers";
|
|
12
16
|
import { createApproverRestrictedNativeApprovalCapabilityAsync } from "openclaw/plugin-sdk/approval-delivery-runtime";
|
|
13
|
-
import {
|
|
14
|
-
import { createChannelApproverDmTargetResolverAsync, createChannelNativeOriginTargetResolverAsync, createNativeApprovalChannelRouteGatesAsync, shouldSuppressLocalNativeExecApprovalPrompt } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
17
|
+
import { createChannelApproverDmTargetResolverAsync, createChannelNativeOriginTargetResolverAsync, createNativeApprovalChannelRouteGatesAsync, createNativeApprovalMessagingTargetResolvers, shouldSuppressLocalNativeExecApprovalPrompt } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
15
18
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
16
|
-
import { createAccountStatusSink, runPassiveAccountLifecycle } from "openclaw/plugin-sdk/channel-outbound";
|
|
17
19
|
import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, createDangerousNameMatchingMutableAllowlistWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
18
|
-
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
19
|
-
import { channelBlockedPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
20
20
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
21
21
|
//#region extensions/googlechat/src/approval-native.ts
|
|
22
22
|
const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
|
|
@@ -24,15 +24,10 @@ function isGoogleChatApprovalTransportEnabled(params) {
|
|
|
24
24
|
const account = resolveGoogleChatAccount(params);
|
|
25
25
|
return account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable" && Boolean(normalizeOptionalString(account.config.audience)) && (account.config.audienceType === "project-number" || account.config.audienceType === "app-url");
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
to,
|
|
32
|
-
accountId: normalizeOptionalString(target.accountId),
|
|
33
|
-
threadId: target.threadId ?? null
|
|
34
|
-
} : null;
|
|
35
|
-
}
|
|
27
|
+
const { normalizeForwardTarget: normalizeGoogleChatForwardTarget } = createNativeApprovalMessagingTargetResolvers({
|
|
28
|
+
channel: "googlechat",
|
|
29
|
+
normalizeTo: normalizeGoogleChatTarget
|
|
30
|
+
});
|
|
36
31
|
function resolveTurnSourceGoogleChatOriginTarget(request) {
|
|
37
32
|
if (normalizeLowercaseStringOrEmpty(request.request.turnSourceChannel) !== "googlechat") return null;
|
|
38
33
|
const target = normalizeGoogleChatTarget(request.request.turnSourceTo ?? "");
|
|
@@ -132,7 +127,7 @@ const googleChatApprovalCapability = createApproverRestrictedNativeApprovalCapab
|
|
|
132
127
|
],
|
|
133
128
|
isConfigured: isGoogleChatNativeApprovalClientEnabled,
|
|
134
129
|
shouldHandle: shouldHandleGoogleChatNativeApprovalRequest,
|
|
135
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
130
|
+
load: async () => (await import("./approval-handler.runtime-dh__rR4O.mjs")).googleChatApprovalNativeRuntime
|
|
136
131
|
})
|
|
137
132
|
});
|
|
138
133
|
//#endregion
|
|
@@ -155,82 +150,25 @@ const collectGoogleChatMutableAllowlistWarnings = createDangerousNameMatchingMut
|
|
|
155
150
|
})
|
|
156
151
|
});
|
|
157
152
|
//#endregion
|
|
158
|
-
//#region extensions/googlechat/src/gateway.ts
|
|
159
|
-
const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-Dlp4xvi9.mjs"), "googleChatChannelRuntime");
|
|
160
|
-
const UNRESOLVED_WEBHOOK_URL_ERROR = "Invalid webhookUrl: expected an absolute URL such as https://chat.example.com/googlechat. No inbound webhook route was registered.";
|
|
161
|
-
async function startGoogleChatGatewayAccount(ctx) {
|
|
162
|
-
const account = ctx.account;
|
|
163
|
-
const statusSink = createAccountStatusSink({
|
|
164
|
-
accountId: account.accountId,
|
|
165
|
-
setStatus: ctx.setStatus
|
|
166
|
-
});
|
|
167
|
-
ctx.log?.info?.(`[${account.accountId}] starting Google Chat webhook`);
|
|
168
|
-
const { resolveGoogleChatWebhookPath, startGoogleChatMonitor } = await loadGoogleChatChannelRuntime$1();
|
|
169
|
-
const webhookPath = resolveGoogleChatWebhookPath(account.config);
|
|
170
|
-
statusSink({
|
|
171
|
-
running: true,
|
|
172
|
-
lastStartAt: Date.now(),
|
|
173
|
-
...webhookPath ? {
|
|
174
|
-
webhookPath,
|
|
175
|
-
lifecycle: "starting"
|
|
176
|
-
} : channelBlockedPatch(UNRESOLVED_WEBHOOK_URL_ERROR, { webhookPath: void 0 }),
|
|
177
|
-
audienceType: account.config.audienceType,
|
|
178
|
-
audience: account.config.audience
|
|
179
|
-
});
|
|
180
|
-
if (isGoogleChatNativeApprovalClientEnabled({
|
|
181
|
-
cfg: ctx.cfg,
|
|
182
|
-
accountId: account.accountId
|
|
183
|
-
})) registerChannelRuntimeContext({
|
|
184
|
-
channelRuntime: ctx.channelRuntime,
|
|
185
|
-
channelId: "googlechat",
|
|
186
|
-
accountId: account.accountId,
|
|
187
|
-
capability: CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY,
|
|
188
|
-
context: { account },
|
|
189
|
-
abortSignal: ctx.abortSignal
|
|
190
|
-
});
|
|
191
|
-
try {
|
|
192
|
-
await runPassiveAccountLifecycle({
|
|
193
|
-
abortSignal: ctx.abortSignal,
|
|
194
|
-
start: async () => await startGoogleChatMonitor({
|
|
195
|
-
account,
|
|
196
|
-
config: ctx.cfg,
|
|
197
|
-
runtime: ctx.runtime,
|
|
198
|
-
abortSignal: ctx.abortSignal,
|
|
199
|
-
webhookPath: account.config.webhookPath,
|
|
200
|
-
webhookUrl: account.config.webhookUrl,
|
|
201
|
-
statusSink
|
|
202
|
-
}),
|
|
203
|
-
stop: async (unregister) => {
|
|
204
|
-
await unregister?.();
|
|
205
|
-
}
|
|
206
|
-
});
|
|
207
|
-
} finally {
|
|
208
|
-
statusSink({
|
|
209
|
-
running: false,
|
|
210
|
-
lastStopAt: Date.now()
|
|
211
|
-
});
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
//#endregion
|
|
215
153
|
//#region extensions/googlechat/src/message-tool-api.ts
|
|
216
|
-
function describeGoogleChatMessageTool({ cfg, accountId }) {
|
|
217
|
-
return (accountId ? [inspectGoogleChatAccount({
|
|
218
|
-
cfg,
|
|
219
|
-
accountId
|
|
220
|
-
})] : listGoogleChatAccountIds(cfg).map((listedAccountId) => inspectGoogleChatAccount({
|
|
221
|
-
cfg,
|
|
222
|
-
accountId: listedAccountId
|
|
223
|
-
}))).some((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus === "available") ? { actions: ["send"] } : null;
|
|
224
|
-
}
|
|
225
154
|
const googlechatMessageActions = {
|
|
226
|
-
describeMessageTool
|
|
155
|
+
describeMessageTool({ cfg, accountId }) {
|
|
156
|
+
return (accountId ? [inspectGoogleChatAccount({
|
|
157
|
+
cfg,
|
|
158
|
+
accountId
|
|
159
|
+
})] : listGoogleChatAccountIds(cfg).map((listedAccountId) => inspectGoogleChatAccount({
|
|
160
|
+
cfg,
|
|
161
|
+
accountId: listedAccountId
|
|
162
|
+
}))).some((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus === "available") ? { actions: ["send"] } : null;
|
|
163
|
+
},
|
|
227
164
|
supportsAction: ({ action }) => action === "send",
|
|
228
165
|
extractToolSend: ({ args }) => extractToolSend(args, "sendMessage"),
|
|
229
|
-
handleAction: async (ctx) => (await import("./actions-
|
|
166
|
+
handleAction: async (ctx) => (await import("./actions-UltP4TmA.mjs")).handleGoogleChatAction(ctx)
|
|
230
167
|
};
|
|
231
168
|
//#endregion
|
|
232
169
|
//#region extensions/googlechat/src/channel.ts
|
|
233
|
-
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
170
|
+
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-I9jyPEzh.mjs"), "googleChatChannelRuntime");
|
|
171
|
+
const UNRESOLVED_WEBHOOK_URL_ERROR = "Invalid webhookUrl: expected an absolute URL such as https://chat.example.com/googlechat. No inbound webhook route was registered.";
|
|
234
172
|
const googlechatPlugin = createChatChannelPlugin({
|
|
235
173
|
base: {
|
|
236
174
|
...googlechatSetupPlugin,
|
|
@@ -337,7 +275,59 @@ const googlechatPlugin = createChatChannelPlugin({
|
|
|
337
275
|
}
|
|
338
276
|
})
|
|
339
277
|
}),
|
|
340
|
-
gateway: { startAccount:
|
|
278
|
+
gateway: { startAccount: async (ctx) => {
|
|
279
|
+
const account = ctx.account;
|
|
280
|
+
const statusSink = createAccountStatusSink({
|
|
281
|
+
accountId: account.accountId,
|
|
282
|
+
setStatus: ctx.setStatus
|
|
283
|
+
});
|
|
284
|
+
ctx.log?.info?.(`[${account.accountId}] starting Google Chat webhook`);
|
|
285
|
+
const { resolveGoogleChatWebhookPath, startGoogleChatMonitor } = await loadGoogleChatChannelRuntime();
|
|
286
|
+
const webhookPath = resolveGoogleChatWebhookPath(account.config);
|
|
287
|
+
statusSink({
|
|
288
|
+
running: true,
|
|
289
|
+
lastStartAt: Date.now(),
|
|
290
|
+
...webhookPath ? {
|
|
291
|
+
webhookPath,
|
|
292
|
+
lifecycle: "starting"
|
|
293
|
+
} : channelBlockedPatch(UNRESOLVED_WEBHOOK_URL_ERROR, { webhookPath: void 0 }),
|
|
294
|
+
audienceType: account.config.audienceType,
|
|
295
|
+
audience: account.config.audience
|
|
296
|
+
});
|
|
297
|
+
if (isGoogleChatNativeApprovalClientEnabled({
|
|
298
|
+
cfg: ctx.cfg,
|
|
299
|
+
accountId: account.accountId
|
|
300
|
+
})) registerChannelRuntimeContext({
|
|
301
|
+
channelRuntime: ctx.channelRuntime,
|
|
302
|
+
channelId: "googlechat",
|
|
303
|
+
accountId: account.accountId,
|
|
304
|
+
capability: CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY,
|
|
305
|
+
context: { account },
|
|
306
|
+
abortSignal: ctx.abortSignal
|
|
307
|
+
});
|
|
308
|
+
try {
|
|
309
|
+
await runPassiveAccountLifecycle({
|
|
310
|
+
abortSignal: ctx.abortSignal,
|
|
311
|
+
start: async () => await startGoogleChatMonitor({
|
|
312
|
+
account,
|
|
313
|
+
config: ctx.cfg,
|
|
314
|
+
runtime: ctx.runtime,
|
|
315
|
+
abortSignal: ctx.abortSignal,
|
|
316
|
+
webhookPath: account.config.webhookPath,
|
|
317
|
+
webhookUrl: account.config.webhookUrl,
|
|
318
|
+
statusSink
|
|
319
|
+
}),
|
|
320
|
+
stop: async (unregister) => {
|
|
321
|
+
await unregister?.();
|
|
322
|
+
}
|
|
323
|
+
});
|
|
324
|
+
} finally {
|
|
325
|
+
statusSink({
|
|
326
|
+
running: false,
|
|
327
|
+
lastStopAt: Date.now()
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
} }
|
|
341
331
|
},
|
|
342
332
|
pairing: { text: googlechatPairingTextAdapter },
|
|
343
333
|
security: googlechatSecurityAdapter,
|
|
@@ -403,19 +403,6 @@ const googlechatSetupWizard = {
|
|
|
403
403
|
//#endregion
|
|
404
404
|
//#region extensions/googlechat/src/channel-base.ts
|
|
405
405
|
const GOOGLECHAT_CHANNEL_ID = "googlechat";
|
|
406
|
-
const googlechatMeta = {
|
|
407
|
-
id: GOOGLECHAT_CHANNEL_ID,
|
|
408
|
-
label: "Google Chat",
|
|
409
|
-
selectionLabel: "Google Chat (Chat API)",
|
|
410
|
-
docsPath: "/channels/googlechat",
|
|
411
|
-
docsLabel: "googlechat",
|
|
412
|
-
blurb: "Google Workspace Chat app with HTTP webhook.",
|
|
413
|
-
aliases: ["gchat", "google-chat"],
|
|
414
|
-
order: 55,
|
|
415
|
-
detailLabel: "Google Chat",
|
|
416
|
-
systemImage: "message.badge",
|
|
417
|
-
markdownCapable: true
|
|
418
|
-
};
|
|
419
406
|
const formatGoogleChatAllowFromEntry = (entry) => normalizeLowercaseStringOrEmpty(entry.trim().replace(/^(googlechat|google-chat|gchat):/i, "").replace(/^user:/i, "").replace(/^users\//i, ""));
|
|
420
407
|
const googleChatConfigAdapter = createScopedChannelConfigAdapter({
|
|
421
408
|
sectionKey: GOOGLECHAT_CHANNEL_ID,
|
|
@@ -442,7 +429,19 @@ const googleChatConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
442
429
|
});
|
|
443
430
|
const googlechatSetupPlugin = {
|
|
444
431
|
id: GOOGLECHAT_CHANNEL_ID,
|
|
445
|
-
meta: {
|
|
432
|
+
meta: {
|
|
433
|
+
id: GOOGLECHAT_CHANNEL_ID,
|
|
434
|
+
label: "Google Chat",
|
|
435
|
+
selectionLabel: "Google Chat (Chat API)",
|
|
436
|
+
docsPath: "/channels/googlechat",
|
|
437
|
+
docsLabel: "googlechat",
|
|
438
|
+
blurb: "Google Workspace Chat app with HTTP webhook.",
|
|
439
|
+
aliases: ["gchat", "google-chat"],
|
|
440
|
+
order: 55,
|
|
441
|
+
detailLabel: "Google Chat",
|
|
442
|
+
systemImage: "message.badge",
|
|
443
|
+
markdownCapable: true
|
|
444
|
+
},
|
|
446
445
|
setupContract: googlechatSetupContract,
|
|
447
446
|
setupWizard: googlechatSetupWizard,
|
|
448
447
|
capabilities: {
|