@openclaw/googlechat 2026.10.10-beta.5 → 2026.11.5-beta.1
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-CSE3qGrO.mjs → actions-DNDmJvwi.mjs} +16 -15
- package/dist/.setup/{approval-auth-DH1sJm7S.mjs → approval-auth-AkJ2Rg0h.mjs} +3 -4
- package/dist/.setup/{approval-card-text-BKg_4mXq.mjs → approval-card-text-9o-Dfr9Z.mjs} +1 -2
- package/dist/.setup/{approval-handler.runtime-Bx0dTqDd.mjs → approval-handler.runtime-CKuHeY6y.mjs} +5 -6
- package/dist/.setup/{channel-BBRTocXs.mjs → channel-WKI4stP3.mjs} +84 -98
- package/dist/.setup/{channel-base-sWlG7EP1.mjs → channel-base-DjVHuLDF.mjs} +17 -22
- package/dist/.setup/{channel.adapters--OFb3A2Y.mjs → channel.adapters-C9mflxGl.mjs} +271 -334
- package/dist/.setup/{channel.runtime-uaSH6k2d.mjs → channel.runtime-CBwK8353.mjs} +305 -357
- package/dist/.setup/{doctor-contract-BzoaiFSD.mjs → doctor-contract-WrFOPxEj.mjs} +6 -12
- package/dist/.setup/{runtime-C5OOOlaP.mjs → runtime-zEzHA5rr.mjs} +1 -2
- package/dist/.setup/{secret-contract-api-BG_8yVjr.mjs → secret-contract-api-CLRweErW.mjs} +1 -1
- package/dist/.setup/{secret-contract-D7KjX374.mjs → secret-contract-h2P-4VpL.mjs} +1 -2
- package/dist/.setup/setup-plugin-api-Bz3mVqQ5.mjs +2 -0
- package/dist/.source-module-urls/974ffefea973cf3ea18e1534d25b091bcf1b68760a2b9eda0cd9bd9392096c64.json +1 -1
- package/dist/api.js +2 -2
- package/dist/channel-config-api.js +1 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +2 -3
- package/dist/doctor-contract-api.js +1 -1
- package/dist/index.js +1 -2
- package/dist/runtime-api.js +1 -1
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -4
- package/dist/setup-plugin-api.js +1 -1
- 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/setup-plugin-api-CFDZH0Qp.mjs +0 -2
- 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,8 +1,8 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import {
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-DjVHuLDF.mjs";
|
|
2
|
+
import { C as sendGoogleChatMessage, d as formatGoogleChatMediaText, v as resolveGoogleChatOutboundSpace } from "./channel.adapters-C9mflxGl.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
|
+
// extensions/googlechat/src/actions.ts
|
|
6
6
|
const OUTBOUND_MEDIA_KEYS = [
|
|
7
7
|
"media",
|
|
8
8
|
"mediaUrl",
|
|
@@ -11,14 +11,20 @@ const OUTBOUND_MEDIA_KEYS = [
|
|
|
11
11
|
"fileUrl"
|
|
12
12
|
];
|
|
13
13
|
const STRUCTURED_ATTACHMENT_MEDIA_KEYS = [...OUTBOUND_MEDIA_KEYS, "url"];
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
function readGoogleChatMediaUrls(params) {
|
|
15
|
+
return [
|
|
16
|
+
...OUTBOUND_MEDIA_KEYS.map((key) => readStringParam(params, key)),
|
|
17
|
+
...readStringArrayParam(params, "mediaUrls") ?? [],
|
|
18
|
+
...(Array.isArray(params.attachments) ? params.attachments : []).flatMap((attachment) => isRecord(attachment) ? STRUCTURED_ATTACHMENT_MEDIA_KEYS.map((key) => readStringParam(attachment, key)) : [])
|
|
19
|
+
].filter((value) => value !== void 0);
|
|
19
20
|
}
|
|
20
21
|
async function handleGoogleChatAction({ action, params, cfg, accountId, assertDirectAdapterHandoff, onPlatformSendDispatch }) {
|
|
21
|
-
if (action === "upload-file"
|
|
22
|
+
if (action === "upload-file") throw new Error("Google Chat outbound attachments require user OAuth and are not supported by this service-account channel.");
|
|
23
|
+
const mediaUrls = action === "send" ? readGoogleChatMediaUrls(params) : [];
|
|
24
|
+
const content = action === "send" ? formatGoogleChatMediaText(readStringParam(params, "message", {
|
|
25
|
+
required: mediaUrls.length === 0,
|
|
26
|
+
allowEmpty: true
|
|
27
|
+
}), mediaUrls) : "";
|
|
22
28
|
const account = resolveGoogleChatAccount({
|
|
23
29
|
cfg,
|
|
24
30
|
accountId
|
|
@@ -26,10 +32,6 @@ async function handleGoogleChatAction({ action, params, cfg, accountId, assertDi
|
|
|
26
32
|
if (account.credentialSource === "none" || account.tokenStatus === "configured_unavailable") throw new Error("Google Chat credentials are missing.");
|
|
27
33
|
if (action === "send") {
|
|
28
34
|
const to = readStringParam(params, "to", { required: true });
|
|
29
|
-
const content = readStringParam(params, "message", {
|
|
30
|
-
required: true,
|
|
31
|
-
allowEmpty: true
|
|
32
|
-
});
|
|
33
35
|
const threadId = readStringParam(params, "threadId") ?? readStringParam(params, "replyTo");
|
|
34
36
|
const space = await resolveGoogleChatOutboundSpace({
|
|
35
37
|
account,
|
|
@@ -40,7 +42,7 @@ async function handleGoogleChatAction({ action, params, cfg, accountId, assertDi
|
|
|
40
42
|
account,
|
|
41
43
|
space,
|
|
42
44
|
text: content,
|
|
43
|
-
thread: threadId
|
|
45
|
+
thread: threadId,
|
|
44
46
|
assertDirectAdapterHandoff,
|
|
45
47
|
onPlatformSendDispatch
|
|
46
48
|
});
|
|
@@ -52,5 +54,4 @@ async function handleGoogleChatAction({ action, params, cfg, accountId, assertDi
|
|
|
52
54
|
}
|
|
53
55
|
throw new Error(`Action ${action} is not supported for provider googlechat.`);
|
|
54
56
|
}
|
|
55
|
-
//#endregion
|
|
56
57
|
export { handleGoogleChatAction };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import {
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-DjVHuLDF.mjs";
|
|
2
|
+
import { g as normalizeGoogleChatTarget, h as isGoogleChatUserTarget } from "./channel.adapters-C9mflxGl.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
|
+
// extensions/googlechat/src/approval-auth.ts
|
|
6
6
|
function normalizeGoogleChatApproverId(value) {
|
|
7
7
|
const normalized = normalizeGoogleChatTarget(String(value));
|
|
8
8
|
if (!normalized || !isGoogleChatUserTarget(normalized)) return;
|
|
@@ -26,5 +26,4 @@ const googleChatApproval = createChannelApprovalAuth({
|
|
|
26
26
|
});
|
|
27
27
|
const getGoogleChatApprovalApprovers = googleChatApproval.resolveApprovers;
|
|
28
28
|
const googleChatApprovalAuth = googleChatApproval.approvalAuth;
|
|
29
|
-
//#endregion
|
|
30
29
|
export { googleChatApprovalAuth as n, normalizeGoogleChatApproverId as r, getGoogleChatApprovalApprovers as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
2
|
-
|
|
2
|
+
// extensions/googlechat/src/approval-card-text.ts
|
|
3
3
|
const MAX_TEXT_PARAGRAPH_CHARS = 1800;
|
|
4
4
|
function escapeGoogleChatApprovalCardText(text) {
|
|
5
5
|
return text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
@@ -8,5 +8,4 @@ function buildGoogleChatApprovalTextWidget(text, format = "text") {
|
|
|
8
8
|
const truncated = text.length <= MAX_TEXT_PARAGRAPH_CHARS ? text : `${truncateUtf16Safe(text, 1797)}...`;
|
|
9
9
|
return { textParagraph: { text: format === "html" ? truncated : escapeGoogleChatApprovalCardText(truncated) } };
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { escapeGoogleChatApprovalCardText as n, buildGoogleChatApprovalTextWidget as t };
|
package/dist/.setup/{approval-handler.runtime-Bx0dTqDd.mjs → approval-handler.runtime-CKuHeY6y.mjs}
RENAMED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import { A as
|
|
3
|
-
import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-
|
|
4
|
-
import { n as escapeGoogleChatApprovalCardText, t as buildGoogleChatApprovalTextWidget } from "./approval-card-text-
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-DjVHuLDF.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-C9mflxGl.mjs";
|
|
3
|
+
import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-WKI4stP3.mjs";
|
|
4
|
+
import { n as escapeGoogleChatApprovalCardText, t as buildGoogleChatApprovalTextWidget } from "./approval-card-text-9o-Dfr9Z.mjs";
|
|
5
5
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
6
6
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
7
7
|
import { formatChannelApprovalResolvedLabel } from "openclaw/plugin-sdk/approval-runtime";
|
|
8
8
|
import { createChannelApprovalNativeRuntimeAdapterAsync } from "openclaw/plugin-sdk/approval-handler-runtime";
|
|
9
9
|
import { createSubsystemLogger } from "openclaw/plugin-sdk/runtime-env";
|
|
10
|
-
|
|
10
|
+
// extensions/googlechat/src/approval-handler.runtime.ts
|
|
11
11
|
const log = createSubsystemLogger("googlechat/approvals");
|
|
12
12
|
const GOOGLECHAT_APPROVAL_CARD_ID = "openclaw-approval";
|
|
13
13
|
function resolveHandlerAccount(params) {
|
|
@@ -229,5 +229,4 @@ const googleChatApprovalNativeRuntime = createChannelApprovalNativeRuntimeAdapte
|
|
|
229
229
|
log.error(`googlechat approvals: failed to send request ${request.id}: ${String(error)}`);
|
|
230
230
|
} }
|
|
231
231
|
});
|
|
232
|
-
//#endregion
|
|
233
232
|
export { googleChatApprovalNativeRuntime };
|
|
@@ -1,38 +1,33 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-WrFOPxEj.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 { a as googlechatPairingTextAdapter, g as
|
|
5
|
-
import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-
|
|
6
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
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-DjVHuLDF.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-C9mflxGl.mjs";
|
|
5
|
+
import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-AkJ2Rg0h.mjs";
|
|
6
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-h2P-4VpL.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
|
+
// extensions/googlechat/src/approval-native.ts
|
|
22
22
|
const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
|
|
23
23
|
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,11 +127,10 @@ 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-CKuHeY6y.mjs")).googleChatApprovalNativeRuntime
|
|
136
131
|
})
|
|
137
132
|
});
|
|
138
|
-
|
|
139
|
-
//#region extensions/googlechat/src/doctor.ts
|
|
133
|
+
// extensions/googlechat/src/doctor.ts
|
|
140
134
|
const isGoogleChatMutableAllowEntry = buildMutableAllowEntryDetector({
|
|
141
135
|
prefixes: [
|
|
142
136
|
"googlechat:",
|
|
@@ -154,83 +148,24 @@ const collectGoogleChatMutableAllowlistWarnings = createDangerousNameMatchingMut
|
|
|
154
148
|
groupField: "users"
|
|
155
149
|
})
|
|
156
150
|
});
|
|
157
|
-
|
|
158
|
-
//#region extensions/googlechat/src/gateway.ts
|
|
159
|
-
const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-uaSH6k2d.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
|
-
//#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
|
-
}
|
|
151
|
+
// extensions/googlechat/src/message-tool-api.ts
|
|
225
152
|
const googlechatMessageActions = {
|
|
226
|
-
describeMessageTool
|
|
153
|
+
describeMessageTool({ cfg, accountId }) {
|
|
154
|
+
return (accountId ? [inspectGoogleChatAccount({
|
|
155
|
+
cfg,
|
|
156
|
+
accountId
|
|
157
|
+
})] : listGoogleChatAccountIds(cfg).map((listedAccountId) => inspectGoogleChatAccount({
|
|
158
|
+
cfg,
|
|
159
|
+
accountId: listedAccountId
|
|
160
|
+
}))).some((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus === "available") ? { actions: ["send"] } : null;
|
|
161
|
+
},
|
|
227
162
|
supportsAction: ({ action }) => action === "send",
|
|
228
163
|
extractToolSend: ({ args }) => extractToolSend(args, "sendMessage"),
|
|
229
|
-
handleAction: async (ctx) => (await import("./actions-
|
|
164
|
+
handleAction: async (ctx) => (await import("./actions-DNDmJvwi.mjs")).handleGoogleChatAction(ctx)
|
|
230
165
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
const
|
|
166
|
+
// extensions/googlechat/src/channel.ts
|
|
167
|
+
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CBwK8353.mjs"), "googleChatChannelRuntime");
|
|
168
|
+
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
169
|
const googlechatPlugin = createChatChannelPlugin({
|
|
235
170
|
base: {
|
|
236
171
|
...googlechatSetupPlugin,
|
|
@@ -337,7 +272,59 @@ const googlechatPlugin = createChatChannelPlugin({
|
|
|
337
272
|
}
|
|
338
273
|
})
|
|
339
274
|
}),
|
|
340
|
-
gateway: { startAccount:
|
|
275
|
+
gateway: { startAccount: async (ctx) => {
|
|
276
|
+
const account = ctx.account;
|
|
277
|
+
const statusSink = createAccountStatusSink({
|
|
278
|
+
accountId: account.accountId,
|
|
279
|
+
setStatus: ctx.setStatus
|
|
280
|
+
});
|
|
281
|
+
ctx.log?.info?.(`[${account.accountId}] starting Google Chat webhook`);
|
|
282
|
+
const { resolveGoogleChatWebhookPath, startGoogleChatMonitor } = await loadGoogleChatChannelRuntime();
|
|
283
|
+
const webhookPath = resolveGoogleChatWebhookPath(account.config);
|
|
284
|
+
statusSink({
|
|
285
|
+
running: true,
|
|
286
|
+
lastStartAt: Date.now(),
|
|
287
|
+
...webhookPath ? {
|
|
288
|
+
webhookPath,
|
|
289
|
+
lifecycle: "starting"
|
|
290
|
+
} : channelBlockedPatch(UNRESOLVED_WEBHOOK_URL_ERROR, { webhookPath: void 0 }),
|
|
291
|
+
audienceType: account.config.audienceType,
|
|
292
|
+
audience: account.config.audience
|
|
293
|
+
});
|
|
294
|
+
if (isGoogleChatNativeApprovalClientEnabled({
|
|
295
|
+
cfg: ctx.cfg,
|
|
296
|
+
accountId: account.accountId
|
|
297
|
+
})) registerChannelRuntimeContext({
|
|
298
|
+
channelRuntime: ctx.channelRuntime,
|
|
299
|
+
channelId: "googlechat",
|
|
300
|
+
accountId: account.accountId,
|
|
301
|
+
capability: CHANNEL_APPROVAL_NATIVE_RUNTIME_CONTEXT_CAPABILITY,
|
|
302
|
+
context: { account },
|
|
303
|
+
abortSignal: ctx.abortSignal
|
|
304
|
+
});
|
|
305
|
+
try {
|
|
306
|
+
await runPassiveAccountLifecycle({
|
|
307
|
+
abortSignal: ctx.abortSignal,
|
|
308
|
+
start: async () => await startGoogleChatMonitor({
|
|
309
|
+
account,
|
|
310
|
+
config: ctx.cfg,
|
|
311
|
+
runtime: ctx.runtime,
|
|
312
|
+
abortSignal: ctx.abortSignal,
|
|
313
|
+
webhookPath: account.config.webhookPath,
|
|
314
|
+
webhookUrl: account.config.webhookUrl,
|
|
315
|
+
statusSink
|
|
316
|
+
}),
|
|
317
|
+
stop: async (unregister) => {
|
|
318
|
+
await unregister?.();
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
} finally {
|
|
322
|
+
statusSink({
|
|
323
|
+
running: false,
|
|
324
|
+
lastStopAt: Date.now()
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
} }
|
|
341
328
|
},
|
|
342
329
|
pairing: { text: googlechatPairingTextAdapter },
|
|
343
330
|
security: googlechatSecurityAdapter,
|
|
@@ -350,5 +337,4 @@ const googlechatPlugin = createChatChannelPlugin({
|
|
|
350
337
|
}
|
|
351
338
|
}
|
|
352
339
|
});
|
|
353
|
-
//#endregion
|
|
354
340
|
export { isGoogleChatNativeApprovalClientEnabled as n, shouldHandleGoogleChatNativeApprovalRequest as r, googlechatPlugin as t };
|
|
@@ -13,10 +13,9 @@ import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
|
13
13
|
import { createPatchedAccountSetupAdapter, createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
|
|
14
14
|
import { createChannelDmPolicy } from "openclaw/plugin-sdk/channel-dm-policy";
|
|
15
15
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, applySetupAccountConfigPatch, createPromptParsedAllowFromForAccount, createSetupTranslator, createStandardChannelSetupStatus, formatDocsLink, mergeAllowFromEntries, migrateBaseNameToDefaultAccount, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
16
|
-
|
|
16
|
+
// extensions/googlechat/src/google-auth-limits.ts
|
|
17
17
|
const MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES = 65536;
|
|
18
|
-
|
|
19
|
-
//#region extensions/googlechat/src/accounts.ts
|
|
18
|
+
// extensions/googlechat/src/accounts.ts
|
|
20
19
|
const ENV_SERVICE_ACCOUNT$1 = "GOOGLE_CHAT_SERVICE_ACCOUNT";
|
|
21
20
|
const ENV_SERVICE_ACCOUNT_FILE$1 = "GOOGLE_CHAT_SERVICE_ACCOUNT_FILE";
|
|
22
21
|
const JsonRecordSchema = z.record(z.string(), z.unknown());
|
|
@@ -236,8 +235,7 @@ const googlechatSetupContract = defineChannelSetupContract({
|
|
|
236
235
|
},
|
|
237
236
|
legacyAdapter: googlechatSetupAdapter
|
|
238
237
|
});
|
|
239
|
-
|
|
240
|
-
//#region extensions/googlechat/src/setup-surface.ts
|
|
238
|
+
// extensions/googlechat/src/setup-surface.ts
|
|
241
239
|
const t = createSetupTranslator();
|
|
242
240
|
const channel = "googlechat";
|
|
243
241
|
const ENV_SERVICE_ACCOUNT = "GOOGLE_CHAT_SERVICE_ACCOUNT";
|
|
@@ -400,22 +398,8 @@ const googlechatSetupWizard = {
|
|
|
400
398
|
},
|
|
401
399
|
dmPolicy: googlechatDmPolicy
|
|
402
400
|
};
|
|
403
|
-
|
|
404
|
-
//#region extensions/googlechat/src/channel-base.ts
|
|
401
|
+
// extensions/googlechat/src/channel-base.ts
|
|
405
402
|
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
403
|
const formatGoogleChatAllowFromEntry = (entry) => normalizeLowercaseStringOrEmpty(entry.trim().replace(/^(googlechat|google-chat|gchat):/i, "").replace(/^user:/i, "").replace(/^users\//i, ""));
|
|
420
404
|
const googleChatConfigAdapter = createScopedChannelConfigAdapter({
|
|
421
405
|
sectionKey: GOOGLECHAT_CHANNEL_ID,
|
|
@@ -442,7 +426,19 @@ const googleChatConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
442
426
|
});
|
|
443
427
|
const googlechatSetupPlugin = {
|
|
444
428
|
id: GOOGLECHAT_CHANNEL_ID,
|
|
445
|
-
meta: {
|
|
429
|
+
meta: {
|
|
430
|
+
id: GOOGLECHAT_CHANNEL_ID,
|
|
431
|
+
label: "Google Chat",
|
|
432
|
+
selectionLabel: "Google Chat (Chat API)",
|
|
433
|
+
docsPath: "/channels/googlechat",
|
|
434
|
+
docsLabel: "googlechat",
|
|
435
|
+
blurb: "Google Workspace Chat app with HTTP webhook.",
|
|
436
|
+
aliases: ["gchat", "google-chat"],
|
|
437
|
+
order: 55,
|
|
438
|
+
detailLabel: "Google Chat",
|
|
439
|
+
systemImage: "message.badge",
|
|
440
|
+
markdownCapable: true
|
|
441
|
+
},
|
|
446
442
|
setupContract: googlechatSetupContract,
|
|
447
443
|
setupWizard: googlechatSetupWizard,
|
|
448
444
|
capabilities: {
|
|
@@ -475,5 +471,4 @@ const googlechatSetupPlugin = {
|
|
|
475
471
|
})
|
|
476
472
|
}
|
|
477
473
|
};
|
|
478
|
-
//#endregion
|
|
479
474
|
export { googlechatSetupAdapter as a, resolveDefaultGoogleChatAccountId as c, googlechatSetupWizard as i, resolveGoogleChatAccount as l, formatGoogleChatAllowFromEntry as n, inspectGoogleChatAccount as o, googlechatSetupPlugin as r, listGoogleChatAccountIds as s, GOOGLECHAT_CHANNEL_ID as t, MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES as u };
|