@openclaw/googlechat 2026.5.2-beta.2 → 2026.5.3-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.
Files changed (75) hide show
  1. package/dist/api-C67jv0ow.js +627 -0
  2. package/dist/api.js +3 -0
  3. package/dist/channel-DE2hroMn.js +682 -0
  4. package/dist/channel-config-api.js +5 -0
  5. package/dist/channel-plugin-api.js +2 -0
  6. package/dist/channel.runtime-CoSLc-4R.js +920 -0
  7. package/dist/contract-api.js +3 -0
  8. package/dist/doctor-contract-CG1sLToP.js +151 -0
  9. package/dist/doctor-contract-api.js +2 -0
  10. package/dist/index.js +22 -0
  11. package/dist/runtime-api-wkIdfwqY.js +30 -0
  12. package/dist/runtime-api.js +2 -0
  13. package/dist/secret-contract-DtQ_IO7J.js +99 -0
  14. package/dist/secret-contract-api.js +2 -0
  15. package/dist/setup-entry.js +15 -0
  16. package/dist/setup-plugin-api.js +75 -0
  17. package/dist/setup-surface-CofP-Gg9.js +309 -0
  18. package/dist/test-api.js +3 -0
  19. package/package.json +14 -6
  20. package/api.ts +0 -3
  21. package/channel-config-api.ts +0 -1
  22. package/channel-plugin-api.ts +0 -1
  23. package/contract-api.ts +0 -5
  24. package/doctor-contract-api.ts +0 -1
  25. package/index.ts +0 -20
  26. package/runtime-api.ts +0 -60
  27. package/secret-contract-api.ts +0 -5
  28. package/setup-entry.ts +0 -13
  29. package/setup-plugin-api.ts +0 -3
  30. package/src/accounts.ts +0 -169
  31. package/src/actions.test.ts +0 -265
  32. package/src/actions.ts +0 -227
  33. package/src/api.ts +0 -322
  34. package/src/approval-auth.test.ts +0 -24
  35. package/src/approval-auth.ts +0 -32
  36. package/src/auth.ts +0 -209
  37. package/src/channel-config.test.ts +0 -39
  38. package/src/channel.adapters.ts +0 -293
  39. package/src/channel.deps.runtime.ts +0 -28
  40. package/src/channel.runtime.ts +0 -17
  41. package/src/channel.setup.ts +0 -98
  42. package/src/channel.test.ts +0 -695
  43. package/src/channel.ts +0 -256
  44. package/src/config-schema.test.ts +0 -16
  45. package/src/config-schema.ts +0 -3
  46. package/src/doctor-contract.test.ts +0 -75
  47. package/src/doctor-contract.ts +0 -182
  48. package/src/doctor.ts +0 -57
  49. package/src/gateway.ts +0 -63
  50. package/src/google-auth.runtime.test.ts +0 -462
  51. package/src/google-auth.runtime.ts +0 -539
  52. package/src/group-policy.ts +0 -17
  53. package/src/monitor-access.test.ts +0 -443
  54. package/src/monitor-access.ts +0 -405
  55. package/src/monitor-reply-delivery.ts +0 -156
  56. package/src/monitor-routing.ts +0 -55
  57. package/src/monitor-types.ts +0 -33
  58. package/src/monitor-webhook.test.ts +0 -446
  59. package/src/monitor-webhook.ts +0 -285
  60. package/src/monitor.reply-delivery.test.ts +0 -139
  61. package/src/monitor.ts +0 -428
  62. package/src/monitor.webhook-routing.test.ts +0 -252
  63. package/src/runtime.ts +0 -9
  64. package/src/secret-contract.test.ts +0 -60
  65. package/src/secret-contract.ts +0 -161
  66. package/src/sender-allow.ts +0 -46
  67. package/src/setup-core.ts +0 -40
  68. package/src/setup-surface.ts +0 -236
  69. package/src/setup.test.ts +0 -560
  70. package/src/targets.test.ts +0 -421
  71. package/src/targets.ts +0 -66
  72. package/src/types.config.ts +0 -3
  73. package/src/types.ts +0 -73
  74. package/test-api.ts +0 -2
  75. package/tsconfig.json +0 -16
@@ -0,0 +1,3 @@
1
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CG1sLToP.js";
2
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-DtQ_IO7J.js";
3
+ export { collectRuntimeConfigAssignments, legacyConfigRules, normalizeCompatibilityConfig, secretTargetRegistryEntries };
@@ -0,0 +1,151 @@
1
+ import { asObjectRecord } from "openclaw/plugin-sdk/runtime-doctor";
2
+ //#region extensions/googlechat/src/doctor-contract.ts
3
+ function hasLegacyGoogleChatStreamMode(value) {
4
+ return asObjectRecord(value)?.streamMode !== void 0;
5
+ }
6
+ function hasLegacyGoogleChatGroupAllowAlias(value) {
7
+ const groups = asObjectRecord(asObjectRecord(value)?.groups);
8
+ if (!groups) return false;
9
+ return Object.values(groups).some((group) => Object.prototype.hasOwnProperty.call(asObjectRecord(group) ?? {}, "allow"));
10
+ }
11
+ function hasLegacyAccountAliases(value, match) {
12
+ const accounts = asObjectRecord(value);
13
+ if (!accounts) return false;
14
+ return Object.values(accounts).some((account) => match(account));
15
+ }
16
+ function normalizeGoogleChatGroups(params) {
17
+ let changed = false;
18
+ const nextGroups = { ...params.groups };
19
+ for (const [groupId, groupValue] of Object.entries(params.groups)) {
20
+ const group = asObjectRecord(groupValue);
21
+ if (!group || !Object.prototype.hasOwnProperty.call(group, "allow")) continue;
22
+ const nextGroup = { ...group };
23
+ if (nextGroup.enabled === void 0) {
24
+ nextGroup.enabled = group.allow;
25
+ params.changes.push(`Moved ${params.pathPrefix}.${groupId}.allow → ${params.pathPrefix}.${groupId}.enabled.`);
26
+ } else params.changes.push(`Removed ${params.pathPrefix}.${groupId}.allow (${params.pathPrefix}.${groupId}.enabled already set).`);
27
+ delete nextGroup.allow;
28
+ nextGroups[groupId] = nextGroup;
29
+ changed = true;
30
+ }
31
+ return {
32
+ groups: nextGroups,
33
+ changed
34
+ };
35
+ }
36
+ function normalizeGoogleChatEntry(params) {
37
+ let updated = params.entry;
38
+ let changed = false;
39
+ if (updated.streamMode !== void 0) {
40
+ updated = { ...updated };
41
+ delete updated.streamMode;
42
+ params.changes.push(`Removed ${params.pathPrefix}.streamMode (legacy key no longer used).`);
43
+ changed = true;
44
+ }
45
+ const groups = asObjectRecord(updated.groups);
46
+ if (groups) {
47
+ const normalized = normalizeGoogleChatGroups({
48
+ groups,
49
+ pathPrefix: `${params.pathPrefix}.groups`,
50
+ changes: params.changes
51
+ });
52
+ if (normalized.changed) {
53
+ updated = {
54
+ ...updated,
55
+ groups: normalized.groups
56
+ };
57
+ changed = true;
58
+ }
59
+ }
60
+ return {
61
+ entry: updated,
62
+ changed
63
+ };
64
+ }
65
+ const legacyConfigRules = [
66
+ {
67
+ path: ["channels", "googlechat"],
68
+ message: "channels.googlechat.streamMode is legacy and no longer used; it is removed on load.",
69
+ match: hasLegacyGoogleChatStreamMode
70
+ },
71
+ {
72
+ path: [
73
+ "channels",
74
+ "googlechat",
75
+ "accounts"
76
+ ],
77
+ message: "channels.googlechat.accounts.<id>.streamMode is legacy and no longer used; it is removed on load.",
78
+ match: (value) => hasLegacyAccountAliases(value, hasLegacyGoogleChatStreamMode)
79
+ },
80
+ {
81
+ path: ["channels", "googlechat"],
82
+ message: "channels.googlechat.groups.<id>.allow is legacy; use channels.googlechat.groups.<id>.enabled instead. Run \"openclaw doctor --fix\".",
83
+ match: hasLegacyGoogleChatGroupAllowAlias
84
+ },
85
+ {
86
+ path: [
87
+ "channels",
88
+ "googlechat",
89
+ "accounts"
90
+ ],
91
+ message: "channels.googlechat.accounts.<id>.groups.<id>.allow is legacy; use channels.googlechat.accounts.<id>.groups.<id>.enabled instead. Run \"openclaw doctor --fix\".",
92
+ match: (value) => hasLegacyAccountAliases(value, hasLegacyGoogleChatGroupAllowAlias)
93
+ }
94
+ ];
95
+ function normalizeCompatibilityConfig({ cfg }) {
96
+ const rawEntry = asObjectRecord(cfg.channels?.googlechat);
97
+ if (!rawEntry) return {
98
+ config: cfg,
99
+ changes: []
100
+ };
101
+ const changes = [];
102
+ let updated = rawEntry;
103
+ let changed = false;
104
+ const root = normalizeGoogleChatEntry({
105
+ entry: updated,
106
+ pathPrefix: "channels.googlechat",
107
+ changes
108
+ });
109
+ updated = root.entry;
110
+ changed = root.changed;
111
+ const accounts = asObjectRecord(updated.accounts);
112
+ if (accounts) {
113
+ let accountsChanged = false;
114
+ const nextAccounts = { ...accounts };
115
+ for (const [accountId, accountValue] of Object.entries(accounts)) {
116
+ const account = asObjectRecord(accountValue);
117
+ if (!account) continue;
118
+ const normalized = normalizeGoogleChatEntry({
119
+ entry: account,
120
+ pathPrefix: `channels.googlechat.accounts.${accountId}`,
121
+ changes
122
+ });
123
+ if (!normalized.changed) continue;
124
+ nextAccounts[accountId] = normalized.entry;
125
+ accountsChanged = true;
126
+ }
127
+ if (accountsChanged) {
128
+ updated = {
129
+ ...updated,
130
+ accounts: nextAccounts
131
+ };
132
+ changed = true;
133
+ }
134
+ }
135
+ if (!changed) return {
136
+ config: cfg,
137
+ changes: []
138
+ };
139
+ return {
140
+ config: {
141
+ ...cfg,
142
+ channels: {
143
+ ...cfg.channels,
144
+ googlechat: updated
145
+ }
146
+ },
147
+ changes
148
+ };
149
+ }
150
+ //#endregion
151
+ export { normalizeCompatibilityConfig as n, legacyConfigRules as t };
@@ -0,0 +1,2 @@
1
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CG1sLToP.js";
2
+ export { legacyConfigRules, normalizeCompatibilityConfig };
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ import { defineBundledChannelEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
+ //#region extensions/googlechat/index.ts
3
+ var googlechat_default = defineBundledChannelEntry({
4
+ id: "googlechat",
5
+ name: "Google Chat",
6
+ description: "OpenClaw Google Chat channel plugin",
7
+ importMetaUrl: import.meta.url,
8
+ plugin: {
9
+ specifier: "./channel-plugin-api.js",
10
+ exportName: "googlechatPlugin"
11
+ },
12
+ secrets: {
13
+ specifier: "./secret-contract-api.js",
14
+ exportName: "channelSecrets"
15
+ },
16
+ runtime: {
17
+ specifier: "./runtime-api.js",
18
+ exportName: "setGoogleChatRuntime"
19
+ }
20
+ });
21
+ //#endregion
22
+ export { googlechat_default as default };
@@ -0,0 +1,30 @@
1
+ import { createActionGate as createActionGate$1, jsonResult as jsonResult$1, readNumberParam as readNumberParam$1, readReactionParams as readReactionParams$1, readStringParam as readStringParam$1 } from "openclaw/plugin-sdk/channel-actions";
2
+ import { loadOutboundMediaFromUrl as loadOutboundMediaFromUrl$1 } from "openclaw/plugin-sdk/outbound-media";
3
+ import { extractToolSend as extractToolSend$1 } from "openclaw/plugin-sdk/tool-send";
4
+ import { fetchWithSsrFGuard as fetchWithSsrFGuard$1 } from "openclaw/plugin-sdk/ssrf-runtime";
5
+ import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id";
6
+ import { buildChannelConfigSchema } from "openclaw/plugin-sdk/channel-config-primitives";
7
+ import { missingTargetError } from "openclaw/plugin-sdk/channel-feedback";
8
+ import { createAccountStatusSink as createAccountStatusSink$1, runPassiveAccountLifecycle as runPassiveAccountLifecycle$1 } from "openclaw/plugin-sdk/channel-lifecycle";
9
+ import { createChannelPairingController } from "openclaw/plugin-sdk/channel-pairing";
10
+ import { createChannelReplyPipeline } from "openclaw/plugin-sdk/channel-reply-pipeline";
11
+ import { evaluateGroupRouteAccessForPolicy, resolveDmGroupAccessWithLists, resolveSenderScopedGroupPolicy } from "openclaw/plugin-sdk/channel-policy";
12
+ import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status";
13
+ import { chunkTextForOutbound } from "openclaw/plugin-sdk/text-chunking";
14
+ import { GoogleChatConfigSchema } from "openclaw/plugin-sdk/bundled-channel-config-schema";
15
+ import { GROUP_POLICY_BLOCKED_LABEL, resolveAllowlistProviderRuntimeGroupPolicy, resolveDefaultGroupPolicy, warnMissingProviderGroupPolicyFallbackOnce } from "openclaw/plugin-sdk/runtime-group-policy";
16
+ import { isDangerousNameMatchingEnabled } from "openclaw/plugin-sdk/dangerous-name-runtime";
17
+ import { fetchRemoteMedia, resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime";
18
+ import { resolveInboundMentionDecision as resolveInboundMentionDecision$1 } from "openclaw/plugin-sdk/channel-inbound";
19
+ import { resolveInboundRouteEnvelopeBuilderWithRuntime } from "openclaw/plugin-sdk/inbound-envelope";
20
+ import { resolveWebhookPath } from "openclaw/plugin-sdk/webhook-path";
21
+ import { registerWebhookTargetWithPluginRoute as registerWebhookTargetWithPluginRoute$1, resolveWebhookTargetWithAuthOrReject as resolveWebhookTargetWithAuthOrReject$1, withResolvedWebhookRequestPipeline as withResolvedWebhookRequestPipeline$1 } from "openclaw/plugin-sdk/webhook-targets";
22
+ import { createWebhookInFlightLimiter as createWebhookInFlightLimiter$1, readJsonWebhookBodyOrReject as readJsonWebhookBodyOrReject$1 } from "openclaw/plugin-sdk/webhook-request-guards";
23
+ import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
24
+ //#region extensions/googlechat/src/runtime.ts
25
+ const { setRuntime: setGoogleChatRuntime, getRuntime: getGoogleChatRuntime } = createPluginRuntimeStore({
26
+ pluginId: "googlechat",
27
+ errorMessage: "Google Chat runtime not initialized"
28
+ });
29
+ //#endregion
30
+ export { resolveInboundRouteEnvelopeBuilderWithRuntime as A, readStringParam$1 as C, resolveDefaultGroupPolicy as D, resolveChannelMediaMaxBytes as E, warnMissingProviderGroupPolicyFallbackOnce as F, withResolvedWebhookRequestPipeline$1 as I, getGoogleChatRuntime as L, resolveWebhookPath as M, resolveWebhookTargetWithAuthOrReject$1 as N, resolveDmGroupAccessWithLists as O, runPassiveAccountLifecycle$1 as P, setGoogleChatRuntime as R, readReactionParams$1 as S, resolveAllowlistProviderRuntimeGroupPolicy as T, jsonResult$1 as _, buildChannelConfigSchema as a, readJsonWebhookBodyOrReject$1 as b, createActionGate$1 as c, createWebhookInFlightLimiter$1 as d, evaluateGroupRouteAccessForPolicy as f, isDangerousNameMatchingEnabled as g, fetchWithSsrFGuard$1 as h, PAIRING_APPROVED_MESSAGE as i, resolveSenderScopedGroupPolicy as j, resolveInboundMentionDecision$1 as k, createChannelPairingController as l, fetchRemoteMedia as m, GROUP_POLICY_BLOCKED_LABEL as n, chunkTextForOutbound as o, extractToolSend$1 as p, GoogleChatConfigSchema as r, createAccountStatusSink$1 as s, DEFAULT_ACCOUNT_ID as t, createChannelReplyPipeline as u, loadOutboundMediaFromUrl$1 as v, registerWebhookTargetWithPluginRoute$1 as w, readNumberParam$1 as x, missingTargetError as y };
@@ -0,0 +1,2 @@
1
+ import { A as resolveInboundRouteEnvelopeBuilderWithRuntime, C as readStringParam, D as resolveDefaultGroupPolicy, E as resolveChannelMediaMaxBytes, F as warnMissingProviderGroupPolicyFallbackOnce, I as withResolvedWebhookRequestPipeline, M as resolveWebhookPath, N as resolveWebhookTargetWithAuthOrReject, O as resolveDmGroupAccessWithLists, P as runPassiveAccountLifecycle, R as setGoogleChatRuntime, S as readReactionParams, T as resolveAllowlistProviderRuntimeGroupPolicy, _ as jsonResult, a as buildChannelConfigSchema, b as readJsonWebhookBodyOrReject, c as createActionGate, d as createWebhookInFlightLimiter, f as evaluateGroupRouteAccessForPolicy, g as isDangerousNameMatchingEnabled, h as fetchWithSsrFGuard, i as PAIRING_APPROVED_MESSAGE, j as resolveSenderScopedGroupPolicy, k as resolveInboundMentionDecision, l as createChannelPairingController, m as fetchRemoteMedia, n as GROUP_POLICY_BLOCKED_LABEL, o as chunkTextForOutbound, p as extractToolSend, r as GoogleChatConfigSchema, s as createAccountStatusSink, t as DEFAULT_ACCOUNT_ID, u as createChannelReplyPipeline, v as loadOutboundMediaFromUrl, w as registerWebhookTargetWithPluginRoute, x as readNumberParam, y as missingTargetError } from "./runtime-api-wkIdfwqY.js";
2
+ export { DEFAULT_ACCOUNT_ID, GROUP_POLICY_BLOCKED_LABEL, GoogleChatConfigSchema, PAIRING_APPROVED_MESSAGE, buildChannelConfigSchema, chunkTextForOutbound, createAccountStatusSink, createActionGate, createChannelPairingController, createChannelReplyPipeline, createWebhookInFlightLimiter, evaluateGroupRouteAccessForPolicy, extractToolSend, fetchRemoteMedia, fetchWithSsrFGuard, isDangerousNameMatchingEnabled, jsonResult, loadOutboundMediaFromUrl, missingTargetError, readJsonWebhookBodyOrReject, readNumberParam, readReactionParams, readStringParam, registerWebhookTargetWithPluginRoute, resolveAllowlistProviderRuntimeGroupPolicy, resolveChannelMediaMaxBytes, resolveDefaultGroupPolicy, resolveDmGroupAccessWithLists, resolveInboundMentionDecision, resolveInboundRouteEnvelopeBuilderWithRuntime, resolveSenderScopedGroupPolicy, resolveWebhookPath, resolveWebhookTargetWithAuthOrReject, runPassiveAccountLifecycle, setGoogleChatRuntime, warnMissingProviderGroupPolicyFallbackOnce, withResolvedWebhookRequestPipeline };
@@ -0,0 +1,99 @@
1
+ import { getChannelSurface, hasOwnProperty, pushAssignment, pushInactiveSurfaceWarning, pushWarning, resolveChannelAccountSurface } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
2
+ import { coerceSecretRef } from "openclaw/plugin-sdk/secret-ref-runtime";
3
+ //#region extensions/googlechat/src/secret-contract.ts
4
+ const secretTargetRegistryEntries = [{
5
+ id: "channels.googlechat.accounts.*.serviceAccount",
6
+ targetType: "channels.googlechat.serviceAccount",
7
+ targetTypeAliases: ["channels.googlechat.accounts.*.serviceAccount"],
8
+ configFile: "openclaw.json",
9
+ pathPattern: "channels.googlechat.accounts.*.serviceAccount",
10
+ refPathPattern: "channels.googlechat.accounts.*.serviceAccountRef",
11
+ secretShape: "sibling_ref",
12
+ expectedResolvedValue: "string-or-object",
13
+ includeInPlan: true,
14
+ includeInConfigure: true,
15
+ includeInAudit: true,
16
+ accountIdPathSegmentIndex: 3
17
+ }, {
18
+ id: "channels.googlechat.serviceAccount",
19
+ targetType: "channels.googlechat.serviceAccount",
20
+ configFile: "openclaw.json",
21
+ pathPattern: "channels.googlechat.serviceAccount",
22
+ refPathPattern: "channels.googlechat.serviceAccountRef",
23
+ secretShape: "sibling_ref",
24
+ expectedResolvedValue: "string-or-object",
25
+ includeInPlan: true,
26
+ includeInConfigure: true,
27
+ includeInAudit: true
28
+ }];
29
+ function resolveSecretInputRef(params) {
30
+ const explicitRef = coerceSecretRef(params.refValue, params.defaults);
31
+ const inlineRef = explicitRef ? null : coerceSecretRef(params.value, params.defaults);
32
+ return {
33
+ explicitRef,
34
+ inlineRef,
35
+ ref: explicitRef ?? inlineRef
36
+ };
37
+ }
38
+ function collectGoogleChatAccountAssignment(params) {
39
+ const { explicitRef, ref } = resolveSecretInputRef({
40
+ value: params.target.serviceAccount,
41
+ refValue: params.target.serviceAccountRef,
42
+ defaults: params.defaults
43
+ });
44
+ if (!ref) return;
45
+ if (params.active === false) {
46
+ pushInactiveSurfaceWarning({
47
+ context: params.context,
48
+ path: `${params.path}.serviceAccount`,
49
+ details: params.inactiveReason
50
+ });
51
+ return;
52
+ }
53
+ if (explicitRef && params.target.serviceAccount !== void 0 && !coerceSecretRef(params.target.serviceAccount, params.defaults)) pushWarning(params.context, {
54
+ code: "SECRETS_REF_OVERRIDES_PLAINTEXT",
55
+ path: params.path,
56
+ message: `${params.path}: serviceAccountRef is set; runtime will ignore plaintext serviceAccount.`
57
+ });
58
+ pushAssignment(params.context, {
59
+ ref,
60
+ path: `${params.path}.serviceAccount`,
61
+ expected: "string-or-object",
62
+ apply: (value) => {
63
+ params.target.serviceAccount = value;
64
+ }
65
+ });
66
+ }
67
+ function collectRuntimeConfigAssignments(params) {
68
+ const resolved = getChannelSurface(params.config, "googlechat");
69
+ if (!resolved) return;
70
+ const googleChat = resolved.channel;
71
+ const surface = resolveChannelAccountSurface(googleChat);
72
+ const topLevelServiceAccountActive = !surface.channelEnabled ? false : !surface.hasExplicitAccounts ? true : surface.accounts.some(({ account, enabled }) => enabled && !hasOwnProperty(account, "serviceAccount") && !hasOwnProperty(account, "serviceAccountRef"));
73
+ collectGoogleChatAccountAssignment({
74
+ target: googleChat,
75
+ path: "channels.googlechat",
76
+ defaults: params.defaults,
77
+ context: params.context,
78
+ active: topLevelServiceAccountActive,
79
+ inactiveReason: "no enabled account inherits this top-level Google Chat serviceAccount."
80
+ });
81
+ if (!surface.hasExplicitAccounts) return;
82
+ for (const { accountId, account, enabled } of surface.accounts) {
83
+ if (!hasOwnProperty(account, "serviceAccount") && !hasOwnProperty(account, "serviceAccountRef")) continue;
84
+ collectGoogleChatAccountAssignment({
85
+ target: account,
86
+ path: `channels.googlechat.accounts.${accountId}`,
87
+ defaults: params.defaults,
88
+ context: params.context,
89
+ active: enabled,
90
+ inactiveReason: "Google Chat account is disabled."
91
+ });
92
+ }
93
+ }
94
+ const channelSecrets = {
95
+ secretTargetRegistryEntries,
96
+ collectRuntimeConfigAssignments
97
+ };
98
+ //#endregion
99
+ export { collectRuntimeConfigAssignments as n, secretTargetRegistryEntries as r, channelSecrets as t };
@@ -0,0 +1,2 @@
1
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries, t as channelSecrets } from "./secret-contract-DtQ_IO7J.js";
2
+ export { channelSecrets, collectRuntimeConfigAssignments, secretTargetRegistryEntries };
@@ -0,0 +1,15 @@
1
+ import { defineBundledChannelSetupEntry } from "openclaw/plugin-sdk/channel-entry-contract";
2
+ //#region extensions/googlechat/setup-entry.ts
3
+ var setup_entry_default = defineBundledChannelSetupEntry({
4
+ importMetaUrl: import.meta.url,
5
+ plugin: {
6
+ specifier: "./setup-plugin-api.js",
7
+ exportName: "googlechatSetupPlugin"
8
+ },
9
+ secrets: {
10
+ specifier: "./secret-contract-api.js",
11
+ exportName: "channelSecrets"
12
+ }
13
+ });
14
+ //#endregion
15
+ export { setup_entry_default as default };
@@ -0,0 +1,75 @@
1
+ import { a as resolveDefaultGoogleChatAccountId, i as listGoogleChatAccountIds, n as googlechatSetupAdapter, o as resolveGoogleChatAccount, s as resolveGoogleChatConfigAccessorAccount, t as googlechatSetupWizard } from "./setup-surface-CofP-Gg9.js";
2
+ import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
3
+ import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
4
+ import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
5
+ import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/text-runtime";
6
+ //#region extensions/googlechat/src/channel.setup.ts
7
+ const formatGoogleChatAllowFromEntry = (entry) => normalizeLowercaseStringOrEmpty(entry.trim().replace(/^(googlechat|google-chat|gchat):/i, "").replace(/^user:/i, "").replace(/^users\//i, ""));
8
+ const googlechatSetupPlugin = {
9
+ id: "googlechat",
10
+ meta: {
11
+ id: "googlechat",
12
+ label: "Google Chat",
13
+ selectionLabel: "Google Chat (Chat API)",
14
+ docsPath: "/channels/googlechat",
15
+ docsLabel: "googlechat",
16
+ blurb: "Google Workspace Chat app with HTTP webhook.",
17
+ aliases: ["gchat", "google-chat"],
18
+ order: 55,
19
+ detailLabel: "Google Chat",
20
+ systemImage: "message.badge",
21
+ markdownCapable: true
22
+ },
23
+ setup: googlechatSetupAdapter,
24
+ setupWizard: googlechatSetupWizard,
25
+ capabilities: {
26
+ chatTypes: [
27
+ "direct",
28
+ "group",
29
+ "thread"
30
+ ],
31
+ reactions: true,
32
+ threads: true,
33
+ media: true,
34
+ nativeCommands: false,
35
+ blockStreaming: true
36
+ },
37
+ streaming: { blockStreamingCoalesceDefaults: {
38
+ minChars: 1500,
39
+ idleMs: 1e3
40
+ } },
41
+ reload: { configPrefixes: ["channels.googlechat"] },
42
+ config: {
43
+ ...createScopedChannelConfigAdapter({
44
+ sectionKey: "googlechat",
45
+ listAccountIds: listGoogleChatAccountIds,
46
+ resolveAccount: adaptScopedAccountAccessor(resolveGoogleChatAccount),
47
+ resolveAccessorAccount: resolveGoogleChatConfigAccessorAccount,
48
+ defaultAccountId: resolveDefaultGoogleChatAccountId,
49
+ clearBaseFields: [
50
+ "serviceAccount",
51
+ "serviceAccountFile",
52
+ "audienceType",
53
+ "audience",
54
+ "webhookPath",
55
+ "webhookUrl",
56
+ "botUser",
57
+ "name"
58
+ ],
59
+ resolveAllowFrom: (account) => account.config.dm?.allowFrom,
60
+ formatAllowFrom: (allowFrom) => formatNormalizedAllowFromEntries({
61
+ allowFrom,
62
+ normalizeEntry: formatGoogleChatAllowFromEntry
63
+ }),
64
+ resolveDefaultTo: (account) => account.config.defaultTo
65
+ }),
66
+ isConfigured: (account) => account.credentialSource !== "none",
67
+ describeAccount: (account) => describeAccountSnapshot({
68
+ account,
69
+ configured: account.credentialSource !== "none",
70
+ extra: { credentialSource: account.credentialSource }
71
+ })
72
+ }
73
+ };
74
+ //#endregion
75
+ export { googlechatSetupPlugin };