@openclaw/googlechat 2026.7.2-beta.2 → 2026.7.2-beta.3
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/{actions-B4nbMjmi.js → actions-C9M27Xgq.js} +5 -5
- package/dist/api.js +2 -2
- package/dist/{approval-auth-B2m8ckdj.js → approval-auth-DXkKpb-s.js} +2 -2
- package/dist/{approval-handler.runtime-DH6QCsS8.js → approval-handler.runtime-DemP1cMx.js} +4 -4
- package/dist/{channel-CST-JKw9.js → channel-Bylft8ql.js} +13 -12
- package/dist/{channel-base-fY2AAQj5.js → channel-base-CuSSPg6I.js} +55 -14
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.adapters-Dhy4lV4f.js → channel.adapters-CAVl8EUt.js} +11 -9
- package/dist/{channel.runtime-CE5zWkzP.js → channel.runtime-tLQQKXrg.js} +13 -15
- package/dist/directory-contract-api.js +1 -1
- package/dist/{runtime-api-1v-DgldF.js → runtime-api-Dh0CNVS4.js} +1 -2
- package/dist/runtime-api.js +2 -2
- package/dist/{secret-contract-D__4IIu_.js → secret-contract-ZFiLJ7Yn.js} +15 -5
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/npm-shrinkwrap.json +3 -3
- package/package.json +4 -4
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount, o as listEnabledGoogleChatAccounts } from "./channel-base-
|
|
2
|
-
import { m as resolveGoogleChatOutboundSpace, v as sendGoogleChatMessage } from "./channel.adapters-
|
|
1
|
+
import { l as resolveGoogleChatAccount, o as listEnabledGoogleChatAccounts } from "./channel-base-CuSSPg6I.js";
|
|
2
|
+
import { m as resolveGoogleChatOutboundSpace, v as sendGoogleChatMessage } from "./channel.adapters-CAVl8EUt.js";
|
|
3
3
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
4
4
|
import { jsonResult, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
5
5
|
//#region extensions/googlechat/src/actions.ts
|
|
6
6
|
const providerId = "googlechat";
|
|
7
7
|
function listEnabledAccounts(cfg) {
|
|
8
|
-
return listEnabledGoogleChatAccounts(cfg).filter((account) => account.enabled && account.credentialSource !== "none");
|
|
8
|
+
return listEnabledGoogleChatAccounts(cfg).filter((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable");
|
|
9
9
|
}
|
|
10
10
|
const OUTBOUND_MEDIA_KEYS = [
|
|
11
11
|
"media",
|
|
@@ -30,7 +30,7 @@ const googlechatMessageActions = {
|
|
|
30
30
|
if ((accountId ? [resolveGoogleChatAccount({
|
|
31
31
|
cfg,
|
|
32
32
|
accountId
|
|
33
|
-
})].filter((account) => account.enabled && account.credentialSource !== "none") : listEnabledAccounts(cfg)).length === 0) return null;
|
|
33
|
+
})].filter((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable") : listEnabledAccounts(cfg)).length === 0) return null;
|
|
34
34
|
return { actions: ["send"] };
|
|
35
35
|
},
|
|
36
36
|
supportsAction: ({ action }) => action === "send",
|
|
@@ -46,7 +46,7 @@ const googlechatMessageActions = {
|
|
|
46
46
|
cfg,
|
|
47
47
|
accountId
|
|
48
48
|
});
|
|
49
|
-
if (account.credentialSource === "none") throw new Error("Google Chat credentials are missing.");
|
|
49
|
+
if (account.credentialSource === "none" || account.tokenStatus === "configured_unavailable") throw new Error("Google Chat credentials are missing.");
|
|
50
50
|
if (action === "send") {
|
|
51
51
|
const to = readStringParam(params, "to", { required: true });
|
|
52
52
|
const content = readStringParam(params, "message", {
|
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as googlechatSetupAdapter, i as googlechatSetupWizard } from "./channel-base-
|
|
2
|
-
import { t as googlechatPlugin } from "./channel-
|
|
1
|
+
import { a as googlechatSetupAdapter, i as googlechatSetupWizard } from "./channel-base-CuSSPg6I.js";
|
|
2
|
+
import { t as googlechatPlugin } from "./channel-Bylft8ql.js";
|
|
3
3
|
export { googlechatPlugin, googlechatSetupAdapter, googlechatSetupWizard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import { d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget } from "./channel.adapters-
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-CuSSPg6I.js";
|
|
2
|
+
import { d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget } from "./channel.adapters-CAVl8EUt.js";
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import { M as unregisterGoogleChatManualApprovalFollowupSuppression, O as registerGoogleChatApprovalCardBinding, S as buildGoogleChatApprovalActionParameters, T as createGoogleChatApprovalToken, j as unregisterGoogleChatApprovalCardBindings, k as registerGoogleChatManualApprovalFollowupSuppression, m as resolveGoogleChatOutboundSpace, v as sendGoogleChatMessage, x as GOOGLECHAT_APPROVAL_ACTION, y as updateGoogleChatMessage } from "./channel.adapters-
|
|
3
|
-
import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-CuSSPg6I.js";
|
|
2
|
+
import { M as unregisterGoogleChatManualApprovalFollowupSuppression, O as registerGoogleChatApprovalCardBinding, S as buildGoogleChatApprovalActionParameters, T as createGoogleChatApprovalToken, j as unregisterGoogleChatApprovalCardBindings, k as registerGoogleChatManualApprovalFollowupSuppression, m as resolveGoogleChatOutboundSpace, v as sendGoogleChatMessage, x as GOOGLECHAT_APPROVAL_ACTION, y as updateGoogleChatMessage } from "./channel.adapters-CAVl8EUt.js";
|
|
3
|
+
import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-Bylft8ql.js";
|
|
4
4
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
@@ -15,7 +15,7 @@ function resolveHandlerAccount(params) {
|
|
|
15
15
|
cfg: params.cfg,
|
|
16
16
|
accountId: params.accountId
|
|
17
17
|
});
|
|
18
|
-
if (!account.enabled || account.credentialSource === "none") return null;
|
|
18
|
+
if (!account.enabled || account.credentialSource === "none" || account.tokenStatus === "configured_unavailable") return null;
|
|
19
19
|
return account;
|
|
20
20
|
}
|
|
21
21
|
function escapeGoogleChatText(text) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as resolveDefaultGoogleChatAccountId, l as resolveGoogleChatAccount, n as createGoogleChatPluginBase, s as listGoogleChatAccountIds, t as GOOGLECHAT_CHANNEL_ID } from "./channel-base-
|
|
2
|
-
import { a as googlechatPairingTextAdapter, d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget, i as googlechatOutboundAdapter, n as googlechatGroupsAdapter, o as googlechatSecurityAdapter, p as resolveGoogleChatOutboundSessionRoute, r as googlechatMessageAdapter, s as googlechatThreadingAdapter, t as googlechatDirectoryAdapter, u as isGoogleChatSpaceTarget } from "./channel.adapters-
|
|
1
|
+
import { c as resolveDefaultGoogleChatAccountId, l as resolveGoogleChatAccount, n as createGoogleChatPluginBase, s as listGoogleChatAccountIds, t as GOOGLECHAT_CHANNEL_ID } from "./channel-base-CuSSPg6I.js";
|
|
2
|
+
import { a as googlechatPairingTextAdapter, d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget, i as googlechatOutboundAdapter, n as googlechatGroupsAdapter, o as googlechatSecurityAdapter, p as resolveGoogleChatOutboundSessionRoute, r as googlechatMessageAdapter, s as googlechatThreadingAdapter, t as googlechatDirectoryAdapter, u as isGoogleChatSpaceTarget } from "./channel.adapters-CAVl8EUt.js";
|
|
3
3
|
import { n as buildChannelConfigSchema, t as GoogleChatConfigSchema } from "./config-api-CsD0IFxF.js";
|
|
4
|
-
import { t as DEFAULT_ACCOUNT_ID } from "./runtime-api-
|
|
5
|
-
import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-
|
|
4
|
+
import { t as DEFAULT_ACCOUNT_ID } from "./runtime-api-Dh0CNVS4.js";
|
|
5
|
+
import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-DXkKpb-s.js";
|
|
6
6
|
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CvhD0eoX.js";
|
|
7
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-
|
|
7
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-ZFiLJ7Yn.js";
|
|
8
8
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
9
9
|
import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
|
|
10
10
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
@@ -21,7 +21,7 @@ import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runti
|
|
|
21
21
|
const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
|
|
22
22
|
function isGoogleChatAccountConfigured(params) {
|
|
23
23
|
const account = resolveGoogleChatAccount(params);
|
|
24
|
-
return account.enabled && account.credentialSource !== "none";
|
|
24
|
+
return account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable";
|
|
25
25
|
}
|
|
26
26
|
function hasGoogleChatWebhookApprovalAuthConfig(params) {
|
|
27
27
|
const account = resolveGoogleChatAccount(params).config;
|
|
@@ -141,7 +141,7 @@ const googleChatApprovalCapability = createApproverRestrictedNativeApprovalCapab
|
|
|
141
141
|
approvalKind,
|
|
142
142
|
request
|
|
143
143
|
}),
|
|
144
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
144
|
+
load: async () => (await import("./approval-handler.runtime-DemP1cMx.js")).googleChatApprovalNativeRuntime
|
|
145
145
|
})
|
|
146
146
|
});
|
|
147
147
|
const collectGoogleChatMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
@@ -164,7 +164,7 @@ const collectGoogleChatMutableAllowlistWarnings = createDangerousNameMatchingMut
|
|
|
164
164
|
});
|
|
165
165
|
//#endregion
|
|
166
166
|
//#region extensions/googlechat/src/gateway.ts
|
|
167
|
-
const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
167
|
+
const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-tLQQKXrg.js"), "googleChatChannelRuntime");
|
|
168
168
|
async function startGoogleChatGatewayAccount(ctx) {
|
|
169
169
|
const account = ctx.account;
|
|
170
170
|
const statusSink = createAccountStatusSink({
|
|
@@ -226,22 +226,22 @@ async function startGoogleChatGatewayAccount(ctx) {
|
|
|
226
226
|
}
|
|
227
227
|
//#endregion
|
|
228
228
|
//#region extensions/googlechat/src/channel.ts
|
|
229
|
-
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
229
|
+
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-tLQQKXrg.js"), "googleChatChannelRuntime");
|
|
230
230
|
const googlechatActions = {
|
|
231
231
|
describeMessageTool: ({ cfg, accountId }) => {
|
|
232
232
|
if ((accountId ? [resolveGoogleChatAccount({
|
|
233
233
|
cfg,
|
|
234
234
|
accountId
|
|
235
|
-
})].filter((account) => account.enabled && account.credentialSource !== "none") : listGoogleChatAccountIds(cfg).map((id) => resolveGoogleChatAccount({
|
|
235
|
+
})].filter((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable") : listGoogleChatAccountIds(cfg).map((id) => resolveGoogleChatAccount({
|
|
236
236
|
cfg,
|
|
237
237
|
accountId: id
|
|
238
|
-
})).filter((account) => account.enabled && account.credentialSource !== "none")).length === 0) return null;
|
|
238
|
+
})).filter((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable")).length === 0) return null;
|
|
239
239
|
return { actions: ["send"] };
|
|
240
240
|
},
|
|
241
241
|
supportsAction: ({ action }) => action === "send",
|
|
242
242
|
extractToolSend: ({ args }) => extractToolSend(args, "sendMessage"),
|
|
243
243
|
handleAction: async (ctx) => {
|
|
244
|
-
const { googlechatMessageActions } = await import("./actions-
|
|
244
|
+
const { googlechatMessageActions } = await import("./actions-C9M27Xgq.js");
|
|
245
245
|
if (!googlechatMessageActions.handleAction) throw new Error("Google Chat actions are not available.");
|
|
246
246
|
return await googlechatMessageActions.handleAction(ctx);
|
|
247
247
|
}
|
|
@@ -348,6 +348,7 @@ const googlechatPlugin = createChatChannelPlugin({
|
|
|
348
348
|
configured: account.credentialSource !== "none",
|
|
349
349
|
extra: {
|
|
350
350
|
credentialSource: account.credentialSource,
|
|
351
|
+
tokenStatus: account.tokenStatus,
|
|
351
352
|
audienceType: account.config.audienceType,
|
|
352
353
|
audience: account.config.audience,
|
|
353
354
|
webhookPath: account.config.webhookPath,
|
|
@@ -2,13 +2,18 @@ import { safeParseJsonWithSchema, safeParseWithSchema } from "openclaw/plugin-sd
|
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
3
|
import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, normalizeAccountId, resolveAccountEntry, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
|
|
4
4
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
5
|
+
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
|
|
5
6
|
import { isSecretRef } from "openclaw/plugin-sdk/secret-input";
|
|
7
|
+
import { resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
6
8
|
import { z } from "zod";
|
|
7
9
|
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
8
10
|
import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
9
11
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
10
12
|
import { createPatchedAccountSetupAdapter, createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
|
|
11
13
|
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, addWildcardAllowFrom, applySetupAccountConfigPatch, createPromptParsedAllowFromForAccount, createSetupTranslator, createStandardChannelSetupStatus, formatDocsLink, mergeAllowFromEntries, migrateBaseNameToDefaultAccount, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
14
|
+
//#region extensions/googlechat/src/google-auth-limits.ts
|
|
15
|
+
const MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES = 64 * 1024;
|
|
16
|
+
//#endregion
|
|
12
17
|
//#region extensions/googlechat/src/accounts.ts
|
|
13
18
|
const ENV_SERVICE_ACCOUNT$1 = "GOOGLE_CHAT_SERVICE_ACCOUNT";
|
|
14
19
|
const ENV_SERVICE_ACCOUNT_FILE$1 = "GOOGLE_CHAT_SERVICE_ACCOUNT_FILE";
|
|
@@ -58,29 +63,60 @@ function resolveCredentialsFromConfig(params) {
|
|
|
58
63
|
const inline = parseServiceAccount(account.serviceAccount);
|
|
59
64
|
if (inline) return {
|
|
60
65
|
credentials: inline,
|
|
61
|
-
source: "inline"
|
|
66
|
+
source: "inline",
|
|
67
|
+
status: "available"
|
|
62
68
|
};
|
|
63
69
|
if (isSecretRef(account.serviceAccount)) throw new Error(`channels.googlechat.accounts.${accountId}.serviceAccount: unresolved SecretRef "${account.serviceAccount.source}:${account.serviceAccount.provider}:${account.serviceAccount.id}". Resolve this command against an active gateway runtime snapshot before reading it.`);
|
|
64
70
|
if (isSecretRef(account.serviceAccountRef)) throw new Error(`channels.googlechat.accounts.${accountId}.serviceAccount: unresolved SecretRef "${account.serviceAccountRef.source}:${account.serviceAccountRef.provider}:${account.serviceAccountRef.id}". Resolve this command against an active gateway runtime snapshot before reading it.`);
|
|
65
71
|
const file = normalizeOptionalString(account.serviceAccountFile);
|
|
66
|
-
if (file)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
if (file) {
|
|
73
|
+
const result = tryReadSecretFileSync(resolveUserPath(file), "Google Chat service account file", {
|
|
74
|
+
maxBytes: MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES,
|
|
75
|
+
rejectHardlinks: false,
|
|
76
|
+
rejectSymlink: false
|
|
77
|
+
}, { configPath: `channels.googlechat.accounts.${accountId}.serviceAccountFile` });
|
|
78
|
+
return result.status === "available" ? {
|
|
79
|
+
credentialsFile: file,
|
|
80
|
+
source: "file",
|
|
81
|
+
status: "available"
|
|
82
|
+
} : {
|
|
83
|
+
credentialsFile: file,
|
|
84
|
+
source: "file",
|
|
85
|
+
status: "configured_unavailable",
|
|
86
|
+
diagnostic: result.diagnostic
|
|
87
|
+
};
|
|
88
|
+
}
|
|
70
89
|
if (accountId === DEFAULT_ACCOUNT_ID) {
|
|
71
90
|
const envJson = process.env[ENV_SERVICE_ACCOUNT$1];
|
|
72
91
|
const envInline = parseServiceAccount(envJson);
|
|
73
92
|
if (envInline) return {
|
|
74
93
|
credentials: envInline,
|
|
75
|
-
source: "env"
|
|
94
|
+
source: "env",
|
|
95
|
+
status: "available"
|
|
76
96
|
};
|
|
77
97
|
const envFile = normalizeOptionalString(process.env[ENV_SERVICE_ACCOUNT_FILE$1]);
|
|
78
|
-
if (envFile)
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
98
|
+
if (envFile) {
|
|
99
|
+
const result = tryReadSecretFileSync(resolveUserPath(envFile), "Google Chat service account file", {
|
|
100
|
+
maxBytes: MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES,
|
|
101
|
+
rejectHardlinks: false,
|
|
102
|
+
rejectSymlink: false
|
|
103
|
+
}, { configPath: `env.${ENV_SERVICE_ACCOUNT_FILE$1}` });
|
|
104
|
+
return result.status === "available" ? {
|
|
105
|
+
credentialsFile: envFile,
|
|
106
|
+
source: "env",
|
|
107
|
+
status: "available"
|
|
108
|
+
} : {
|
|
109
|
+
credentialsFile: envFile,
|
|
110
|
+
source: "env",
|
|
111
|
+
status: "configured_unavailable",
|
|
112
|
+
diagnostic: result.diagnostic
|
|
113
|
+
};
|
|
114
|
+
}
|
|
82
115
|
}
|
|
83
|
-
return {
|
|
116
|
+
return {
|
|
117
|
+
source: "none",
|
|
118
|
+
status: "missing"
|
|
119
|
+
};
|
|
84
120
|
}
|
|
85
121
|
function resolveGoogleChatAccount(params) {
|
|
86
122
|
const accountId = normalizeAccountId(params.accountId ?? params.cfg.channels?.["googlechat"]?.defaultAccount);
|
|
@@ -99,7 +135,9 @@ function resolveGoogleChatAccount(params) {
|
|
|
99
135
|
config: merged,
|
|
100
136
|
credentialSource: credentials.source,
|
|
101
137
|
credentials: credentials.credentials,
|
|
102
|
-
credentialsFile: credentials.credentialsFile
|
|
138
|
+
credentialsFile: credentials.credentialsFile,
|
|
139
|
+
tokenStatus: credentials.status,
|
|
140
|
+
...credentials.diagnostic ? { credentialDiagnostics: [credentials.diagnostic] } : {}
|
|
103
141
|
};
|
|
104
142
|
}
|
|
105
143
|
function listEnabledGoogleChatAccounts(cfg) {
|
|
@@ -390,10 +428,13 @@ function createGoogleChatPluginBase(params = {}) {
|
|
|
390
428
|
describeAccount: (account) => describeAccountSnapshot({
|
|
391
429
|
account,
|
|
392
430
|
configured: account.credentialSource !== "none",
|
|
393
|
-
extra: {
|
|
431
|
+
extra: {
|
|
432
|
+
credentialSource: account.credentialSource,
|
|
433
|
+
tokenStatus: account.tokenStatus
|
|
434
|
+
}
|
|
394
435
|
})
|
|
395
436
|
}
|
|
396
437
|
};
|
|
397
438
|
}
|
|
398
439
|
//#endregion
|
|
399
|
-
export { googlechatSetupAdapter as a, resolveDefaultGoogleChatAccountId as c, googlechatSetupWizard as i, resolveGoogleChatAccount as l, createGoogleChatPluginBase as n, listEnabledGoogleChatAccounts as o, formatGoogleChatAllowFromEntry as r, listGoogleChatAccountIds as s, GOOGLECHAT_CHANNEL_ID as t };
|
|
440
|
+
export { googlechatSetupAdapter as a, resolveDefaultGoogleChatAccountId as c, googlechatSetupWizard as i, resolveGoogleChatAccount as l, createGoogleChatPluginBase as n, listEnabledGoogleChatAccounts as o, formatGoogleChatAllowFromEntry as r, listGoogleChatAccountIds as s, GOOGLECHAT_CHANNEL_ID as t, MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES as u };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as googlechatPlugin } from "./channel-
|
|
1
|
+
import { t as googlechatPlugin } from "./channel-Bylft8ql.js";
|
|
2
2
|
export { googlechatPlugin };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount, r as formatGoogleChatAllowFromEntry } from "./channel-base-
|
|
2
|
-
import { d as fetchWithSsrFGuard$1, i as chunkTextForOutbound, m as missingTargetError, r as PAIRING_APPROVED_MESSAGE } from "./runtime-api-
|
|
1
|
+
import { l as resolveGoogleChatAccount, r as formatGoogleChatAllowFromEntry, u as MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES } from "./channel-base-CuSSPg6I.js";
|
|
2
|
+
import { d as fetchWithSsrFGuard$1, i as chunkTextForOutbound, m as missingTargetError, r as PAIRING_APPROVED_MESSAGE } from "./runtime-api-Dh0CNVS4.js";
|
|
3
3
|
import { buildChannelOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
|
|
4
4
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
5
5
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
|
+
import { resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
6
7
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
7
8
|
import { parseMediaContentLength, readResponseTextSnippet } from "openclaw/plugin-sdk/media-runtime";
|
|
8
9
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
@@ -13,7 +14,6 @@ import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
|
13
14
|
import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
|
|
14
15
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
15
16
|
import fs from "node:fs/promises";
|
|
16
|
-
import { resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
17
17
|
import { adaptScopedAccountAccessor } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
18
18
|
import { buildChannelGroupsScopeTree, composeAccountWarningCollectors, createAllowlistProviderOpenWarningCollector, resolveScopeRequireMention } from "openclaw/plugin-sdk/channel-policy";
|
|
19
19
|
import { createChannelDirectoryAdapter, listResolvedDirectoryGroupEntriesFromMapKeys, listResolvedDirectoryUserEntriesFromAllowFrom } from "openclaw/plugin-sdk/directory-runtime";
|
|
@@ -175,7 +175,6 @@ const GOOGLE_AUTH_TOKEN_URI = "https://oauth2.googleapis.com/token";
|
|
|
175
175
|
const GOOGLE_AUTH_UNIVERSE_DOMAIN = "googleapis.com";
|
|
176
176
|
const GOOGLE_CLIENT_CERTS_URL_PREFIX = "https://www.googleapis.com/robot/v1/metadata/x509/";
|
|
177
177
|
const MAX_GOOGLE_AUTH_RESPONSE_BYTES = 1024 * 1024;
|
|
178
|
-
const MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES = 64 * 1024;
|
|
179
178
|
let googleAuthRuntimePromise = null;
|
|
180
179
|
function normalizeGoogleAuthPreparedRequestHeaders(config) {
|
|
181
180
|
if (!(config.headers instanceof Headers)) config.headers = new Headers(config.headers);
|
|
@@ -318,14 +317,14 @@ async function readCredentialsFile(filePath) {
|
|
|
318
317
|
try {
|
|
319
318
|
const stat = await handle.stat();
|
|
320
319
|
if (!stat.isFile()) throw new Error("Google Chat service account file must be a regular file.");
|
|
321
|
-
if (stat.size >
|
|
320
|
+
if (stat.size > 65536) throw new Error(`Google Chat service account file exceeds ${MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES} bytes.`);
|
|
322
321
|
let raw;
|
|
323
322
|
try {
|
|
324
323
|
raw = await handle.readFile({ encoding: "utf8" });
|
|
325
324
|
} catch {
|
|
326
325
|
throw new Error("Failed to load Google Chat service account file.");
|
|
327
326
|
}
|
|
328
|
-
if (Buffer.byteLength(raw, "utf8") >
|
|
327
|
+
if (Buffer.byteLength(raw, "utf8") > 65536) throw new Error(`Google Chat service account file exceeds ${MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES} bytes.`);
|
|
329
328
|
let parsed;
|
|
330
329
|
try {
|
|
331
330
|
parsed = JSON.parse(raw);
|
|
@@ -533,7 +532,10 @@ async function fetchChatCerts() {
|
|
|
533
532
|
timeoutMs: GOOGLECHAT_CERT_FETCH_TIMEOUT_MS
|
|
534
533
|
});
|
|
535
534
|
try {
|
|
536
|
-
if (!response.ok)
|
|
535
|
+
if (!response.ok) {
|
|
536
|
+
await response.body?.cancel().catch(() => void 0);
|
|
537
|
+
throw new Error(`Failed to fetch Chat certs (${response.status})`);
|
|
538
|
+
}
|
|
537
539
|
const certs = await readGoogleChatCertsResponse(response);
|
|
538
540
|
cachedCerts = {
|
|
539
541
|
fetchedAt: now,
|
|
@@ -882,7 +884,7 @@ function resolveGoogleChatGroupRequireMention(params) {
|
|
|
882
884
|
}
|
|
883
885
|
//#endregion
|
|
884
886
|
//#region extensions/googlechat/src/channel.adapters.ts
|
|
885
|
-
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
887
|
+
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-tLQQKXrg.js"), "googleChatChannelRuntime");
|
|
886
888
|
function createGoogleChatSendReceipt(params) {
|
|
887
889
|
const messageId = params.messageId?.trim();
|
|
888
890
|
return createMessageReceiptFromOutboundResults({
|
|
@@ -962,7 +964,7 @@ const googlechatPairingTextAdapter = {
|
|
|
962
964
|
cfg,
|
|
963
965
|
accountId
|
|
964
966
|
});
|
|
965
|
-
if (account.credentialSource === "none") return;
|
|
967
|
+
if (account.credentialSource === "none" || account.tokenStatus === "configured_unavailable") return;
|
|
966
968
|
const user = normalizeGoogleChatTarget(id) ?? id;
|
|
967
969
|
const space = await resolveGoogleChatOutboundSpace({
|
|
968
970
|
account,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { A as releaseGoogleChatApprovalCardBinding, C as claimGoogleChatApprovalCardBinding, D as readGoogleChatApprovalActionToken, E as getGoogleChatApprovalCardBinding, _ as probeGoogleChat, b as verifyGoogleChatRequest, c as buildGoogleChatGroupPolicyScope, g as downloadGoogleChatMedia, h as deleteGoogleChatMessage, l as isGoogleChatGroupSpace, v as sendGoogleChatMessage, w as completeGoogleChatApprovalCardBinding, y as updateGoogleChatMessage } from "./channel.adapters-
|
|
2
|
-
import { C as
|
|
3
|
-
import { n as googleChatApprovalAuth } from "./approval-auth-
|
|
1
|
+
import { A as releaseGoogleChatApprovalCardBinding, C as claimGoogleChatApprovalCardBinding, D as readGoogleChatApprovalActionToken, E as getGoogleChatApprovalCardBinding, _ as probeGoogleChat, b as verifyGoogleChatRequest, c as buildGoogleChatGroupPolicyScope, g as downloadGoogleChatMedia, h as deleteGoogleChatMessage, l as isGoogleChatGroupSpace, v as sendGoogleChatMessage, w as completeGoogleChatApprovalCardBinding, y as updateGoogleChatMessage } from "./channel.adapters-CAVl8EUt.js";
|
|
2
|
+
import { C as resolveWebhookPath, E as warnMissingProviderGroupPolicyFallbackOnce, O as getGoogleChatRuntime, b as resolveAllowlistProviderRuntimeGroupPolicy, c as createChannelPairingController, f as isDangerousNameMatchingEnabled, n as GROUP_POLICY_BLOCKED_LABEL, x as resolveDefaultGroupPolicy } from "./runtime-api-Dh0CNVS4.js";
|
|
3
|
+
import { n as googleChatApprovalAuth } from "./approval-auth-DXkKpb-s.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
|
-
import {
|
|
6
|
+
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
7
|
+
import { recordChannelBotPairLoopAndCheckSuppression, resolveChannelInboundRouteEnvelope } from "openclaw/plugin-sdk/channel-inbound";
|
|
7
8
|
import { WEBHOOK_RATE_LIMIT_DEFAULTS, createFixedWindowRateLimiter, normalizeWebhookPath, resolveRequestClientIp } from "openclaw/plugin-sdk/webhook-ingress";
|
|
8
9
|
import { registerWebhookTargetWithPluginRoute, resolveWebhookTargetWithAuthOrReject, withResolvedWebhookRequestPipeline } from "openclaw/plugin-sdk/webhook-targets";
|
|
9
10
|
import { createWebhookInFlightLimiter, readJsonWebhookBodyOrReject, runDetachedWebhookWork } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
10
|
-
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
11
11
|
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
|
|
12
12
|
import { channelIngressRoutes, createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
13
13
|
import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
@@ -912,16 +912,14 @@ async function processMessageWithPipeline(params) {
|
|
|
912
912
|
core,
|
|
913
913
|
runtime
|
|
914
914
|
})) return;
|
|
915
|
-
const { route, buildEnvelope } =
|
|
915
|
+
const { route, buildEnvelope } = resolveChannelInboundRouteEnvelope({
|
|
916
916
|
cfg: config,
|
|
917
917
|
channel: "googlechat",
|
|
918
918
|
accountId: account.accountId,
|
|
919
919
|
peer: {
|
|
920
920
|
kind: isGroup ? "group" : "direct",
|
|
921
921
|
id: spaceId
|
|
922
|
-
}
|
|
923
|
-
runtime: core.channel,
|
|
924
|
-
sessionStore: config.session?.store
|
|
922
|
+
}
|
|
925
923
|
});
|
|
926
924
|
let mediaPath;
|
|
927
925
|
let mediaType;
|
|
@@ -935,7 +933,7 @@ async function processMessageWithPipeline(params) {
|
|
|
935
933
|
}
|
|
936
934
|
const fromLabel = isGroup ? space.displayName || `space:${spaceId}` : senderName || `user:${senderId}`;
|
|
937
935
|
const timestampMs = resolveGoogleChatTimestampMs(event.eventTime);
|
|
938
|
-
const
|
|
936
|
+
const body = buildEnvelope({
|
|
939
937
|
channel: "Google Chat",
|
|
940
938
|
from: fromLabel,
|
|
941
939
|
timestamp: timestampMs,
|
|
@@ -962,6 +960,7 @@ async function processMessageWithPipeline(params) {
|
|
|
962
960
|
},
|
|
963
961
|
route: {
|
|
964
962
|
agentId: route.agentId,
|
|
963
|
+
dmScope: route.dmScope,
|
|
965
964
|
accountId: route.accountId,
|
|
966
965
|
routeSessionKey: route.sessionKey
|
|
967
966
|
},
|
|
@@ -1033,12 +1032,11 @@ async function processMessageWithPipeline(params) {
|
|
|
1033
1032
|
cfg: config,
|
|
1034
1033
|
channel: "googlechat",
|
|
1035
1034
|
accountId: route.accountId,
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1035
|
+
route: {
|
|
1036
|
+
agentId: route.agentId,
|
|
1037
|
+
sessionKey: route.sessionKey
|
|
1038
|
+
},
|
|
1039
1039
|
ctxPayload,
|
|
1040
|
-
recordInboundSession: core.channel.session.recordInboundSession,
|
|
1041
|
-
dispatchReplyWithBufferedBlockDispatcher: core.channel.reply.dispatchReplyWithBufferedBlockDispatcher,
|
|
1042
1040
|
delivery: {
|
|
1043
1041
|
durable: (payload, info) => resolveGoogleChatDurableReplyOptions({
|
|
1044
1042
|
payload,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as googlechatDirectoryAdapter } from "./channel.adapters-
|
|
1
|
+
import { t as googlechatDirectoryAdapter } from "./channel.adapters-CAVl8EUt.js";
|
|
2
2
|
//#region extensions/googlechat/directory-contract-api.ts
|
|
3
3
|
const googlechatDirectoryContractPlugin = {
|
|
4
4
|
id: "googlechat",
|
|
@@ -11,7 +11,6 @@ import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
|
|
|
11
11
|
import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
|
|
12
12
|
import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
|
|
13
13
|
import { resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-inbound";
|
|
14
|
-
import { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope";
|
|
15
14
|
import { resolveWebhookPath } from "openclaw/plugin-sdk/webhook-ingress";
|
|
16
15
|
import { registerWebhookTargetWithPluginRoute as registerWebhookTargetWithPluginRoute$1, resolveWebhookTargetWithAuthOrReject as resolveWebhookTargetWithAuthOrReject$1, withResolvedWebhookRequestPipeline as withResolvedWebhookRequestPipeline$1 } from "openclaw/plugin-sdk/webhook-targets";
|
|
17
16
|
import { createWebhookInFlightLimiter as createWebhookInFlightLimiter$1, readJsonWebhookBodyOrReject as readJsonWebhookBodyOrReject$1 } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
@@ -22,4 +21,4 @@ const { setRuntime: setGoogleChatRuntime, getRuntime: getGoogleChatRuntime } = c
|
|
|
22
21
|
errorMessage: "Google Chat runtime not initialized"
|
|
23
22
|
});
|
|
24
23
|
//#endregion
|
|
25
|
-
export {
|
|
24
|
+
export { resolveWebhookPath as C, withResolvedWebhookRequestPipeline$1 as D, warnMissingProviderGroupPolicyFallbackOnce as E, getGoogleChatRuntime as O, resolveInboundMentionDecision as S, runPassiveAccountLifecycle$1 as T, readReactionParams as _, createAccountStatusSink$1 as a, resolveAllowlistProviderRuntimeGroupPolicy as b, createChannelPairingController as c, fetchWithSsrFGuard$1 as d, isDangerousNameMatchingEnabled as f, readNumberParam as g, readJsonWebhookBodyOrReject$1 as h, chunkTextForOutbound as i, setGoogleChatRuntime as k, createWebhookInFlightLimiter$1 as l, missingTargetError as m, GROUP_POLICY_BLOCKED_LABEL as n, createActionGate as o, jsonResult$1 as p, PAIRING_APPROVED_MESSAGE as r, createChannelMessageReplyPipeline as s, DEFAULT_ACCOUNT_ID as t, extractToolSend$1 as u, readStringParam$1 as v, resolveWebhookTargetWithAuthOrReject$1 as w, resolveDefaultGroupPolicy as x, registerWebhookTargetWithPluginRoute$1 as y };
|
package/dist/runtime-api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as buildChannelConfigSchema, t as GoogleChatConfigSchema } from "./config-api-CsD0IFxF.js";
|
|
2
|
-
import {
|
|
3
|
-
export { DEFAULT_ACCOUNT_ID, GROUP_POLICY_BLOCKED_LABEL, GoogleChatConfigSchema, PAIRING_APPROVED_MESSAGE, buildChannelConfigSchema, chunkTextForOutbound, createAccountStatusSink, createActionGate, createChannelMessageReplyPipeline, createChannelPairingController, createWebhookInFlightLimiter, extractToolSend, fetchWithSsrFGuard, isDangerousNameMatchingEnabled, jsonResult, missingTargetError, readJsonWebhookBodyOrReject, readNumberParam, readReactionParams, readStringParam, registerWebhookTargetWithPluginRoute, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, resolveInboundMentionDecision,
|
|
2
|
+
import { C as resolveWebhookPath, D as withResolvedWebhookRequestPipeline, E as warnMissingProviderGroupPolicyFallbackOnce, S as resolveInboundMentionDecision, T as runPassiveAccountLifecycle, _ as readReactionParams, a as createAccountStatusSink, b as resolveAllowlistProviderRuntimeGroupPolicy, c as createChannelPairingController, d as fetchWithSsrFGuard, f as isDangerousNameMatchingEnabled, g as readNumberParam, h as readJsonWebhookBodyOrReject, i as chunkTextForOutbound, k as setGoogleChatRuntime, l as createWebhookInFlightLimiter, m as missingTargetError, n as GROUP_POLICY_BLOCKED_LABEL, o as createActionGate, p as jsonResult, r as PAIRING_APPROVED_MESSAGE, s as createChannelMessageReplyPipeline, t as DEFAULT_ACCOUNT_ID, u as extractToolSend, v as readStringParam, w as resolveWebhookTargetWithAuthOrReject, x as resolveDefaultGroupPolicy, y as registerWebhookTargetWithPluginRoute } from "./runtime-api-Dh0CNVS4.js";
|
|
3
|
+
export { DEFAULT_ACCOUNT_ID, GROUP_POLICY_BLOCKED_LABEL, GoogleChatConfigSchema, PAIRING_APPROVED_MESSAGE, buildChannelConfigSchema, chunkTextForOutbound, createAccountStatusSink, createActionGate, createChannelMessageReplyPipeline, createChannelPairingController, createWebhookInFlightLimiter, extractToolSend, fetchWithSsrFGuard, isDangerousNameMatchingEnabled, jsonResult, missingTargetError, readJsonWebhookBodyOrReject, readNumberParam, readReactionParams, readStringParam, registerWebhookTargetWithPluginRoute, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, resolveInboundMentionDecision, resolveWebhookPath, resolveWebhookTargetWithAuthOrReject, runPassiveAccountLifecycle, setGoogleChatRuntime, warnMissingProviderGroupPolicyFallbackOnce, withResolvedWebhookRequestPipeline };
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import { normalizeAccountId } from "openclaw/plugin-sdk/account-id";
|
|
1
2
|
import { createChannelSecretTargetRegistryEntries, getChannelSurface, hasOwnProperty, pushAssignment, pushInactiveSurfaceWarning, pushWarning, resolveChannelAccountSurface } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
2
3
|
import { coerceSecretRef } from "openclaw/plugin-sdk/secret-ref-runtime";
|
|
3
4
|
//#region extensions/googlechat/src/secret-contract.ts
|
|
5
|
+
function accountSecretOwner(accountId) {
|
|
6
|
+
return {
|
|
7
|
+
ownerKind: "account",
|
|
8
|
+
ownerId: `googlechat:${normalizeAccountId(accountId)}`,
|
|
9
|
+
requiredForGateway: false,
|
|
10
|
+
disposition: "isolate"
|
|
11
|
+
};
|
|
12
|
+
}
|
|
4
13
|
const secretTargetRegistryEntries = createChannelSecretTargetRegistryEntries({
|
|
5
14
|
channelKey: "googlechat",
|
|
6
15
|
account: [{
|
|
@@ -35,7 +44,7 @@ function collectGoogleChatAccountAssignment(params) {
|
|
|
35
44
|
defaults: params.defaults
|
|
36
45
|
});
|
|
37
46
|
if (!ref) return;
|
|
38
|
-
if (params.
|
|
47
|
+
if (params.ownerAccountIds.length === 0) {
|
|
39
48
|
pushInactiveSurfaceWarning({
|
|
40
49
|
context: params.context,
|
|
41
50
|
path: `${params.path}.serviceAccount`,
|
|
@@ -48,10 +57,11 @@ function collectGoogleChatAccountAssignment(params) {
|
|
|
48
57
|
path: params.path,
|
|
49
58
|
message: `${params.path}: serviceAccountRef is set; runtime will ignore plaintext serviceAccount.`
|
|
50
59
|
});
|
|
51
|
-
pushAssignment(params.context, {
|
|
60
|
+
for (const accountId of params.ownerAccountIds) pushAssignment(params.context, {
|
|
52
61
|
ref,
|
|
53
62
|
path: `${params.path}.serviceAccount`,
|
|
54
63
|
expected: "string-or-object",
|
|
64
|
+
...accountSecretOwner(accountId),
|
|
55
65
|
apply: (value) => {
|
|
56
66
|
params.target.serviceAccount = value;
|
|
57
67
|
}
|
|
@@ -62,13 +72,13 @@ function collectRuntimeConfigAssignments(params) {
|
|
|
62
72
|
if (!resolved) return;
|
|
63
73
|
const googleChat = resolved.channel;
|
|
64
74
|
const surface = resolveChannelAccountSurface(googleChat);
|
|
65
|
-
const
|
|
75
|
+
const topLevelServiceAccountOwners = !surface.channelEnabled ? [] : !surface.hasExplicitAccounts ? ["default"] : surface.accounts.filter(({ account, enabled }) => enabled && !hasOwnProperty(account, "serviceAccount") && !hasOwnProperty(account, "serviceAccountRef")).map(({ accountId }) => accountId);
|
|
66
76
|
collectGoogleChatAccountAssignment({
|
|
67
77
|
target: googleChat,
|
|
68
78
|
path: "channels.googlechat",
|
|
69
79
|
defaults: params.defaults,
|
|
70
80
|
context: params.context,
|
|
71
|
-
|
|
81
|
+
ownerAccountIds: topLevelServiceAccountOwners,
|
|
72
82
|
inactiveReason: "no enabled account inherits this top-level Google Chat serviceAccount."
|
|
73
83
|
});
|
|
74
84
|
if (!surface.hasExplicitAccounts) return;
|
|
@@ -79,7 +89,7 @@ function collectRuntimeConfigAssignments(params) {
|
|
|
79
89
|
path: `channels.googlechat.accounts.${accountId}`,
|
|
80
90
|
defaults: params.defaults,
|
|
81
91
|
context: params.context,
|
|
82
|
-
|
|
92
|
+
ownerAccountIds: enabled ? [accountId] : [],
|
|
83
93
|
inactiveReason: "Google Chat account is disabled."
|
|
84
94
|
});
|
|
85
95
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-
|
|
1
|
+
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-ZFiLJ7Yn.js";
|
|
2
2
|
export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createGoogleChatPluginBase } from "./channel-base-
|
|
1
|
+
import { n as createGoogleChatPluginBase } from "./channel-base-CuSSPg6I.js";
|
|
2
2
|
//#region extensions/googlechat/src/channel.setup.ts
|
|
3
3
|
const googlechatSetupPlugin = createGoogleChatPluginBase();
|
|
4
4
|
//#endregion
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/googlechat",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/googlechat",
|
|
9
|
-
"version": "2026.7.2-beta.
|
|
9
|
+
"version": "2026.7.2-beta.3",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"google-auth-library": "10.9.0",
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.7.2-beta.
|
|
15
|
+
"openclaw": ">=2026.7.2-beta.3"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/googlechat",
|
|
3
|
-
"version": "2026.7.2-beta.
|
|
3
|
+
"version": "2026.7.2-beta.3",
|
|
4
4
|
"description": "OpenClaw Google Chat channel plugin for spaces and direct messages.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"zod": "4.4.3"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"openclaw": ">=2026.7.2-beta.
|
|
15
|
+
"openclaw": ">=2026.7.2-beta.3"
|
|
16
16
|
},
|
|
17
17
|
"peerDependenciesMeta": {
|
|
18
18
|
"openclaw": {
|
|
@@ -70,10 +70,10 @@
|
|
|
70
70
|
"minHostVersion": ">=2026.4.10"
|
|
71
71
|
},
|
|
72
72
|
"compat": {
|
|
73
|
-
"pluginApi": ">=2026.7.2-beta.
|
|
73
|
+
"pluginApi": ">=2026.7.2-beta.3"
|
|
74
74
|
},
|
|
75
75
|
"build": {
|
|
76
|
-
"openclawVersion": "2026.7.2-beta.
|
|
76
|
+
"openclawVersion": "2026.7.2-beta.3"
|
|
77
77
|
},
|
|
78
78
|
"release": {
|
|
79
79
|
"publishToClawHub": true,
|