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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/{actions-C9M27Xgq.js → actions-DBF3ImbA.js} +2 -2
  2. package/dist/api.js +2 -2
  3. package/dist/{approval-auth-DXkKpb-s.js → approval-auth-BztBRceh.js} +3 -3
  4. package/dist/{approval-handler.runtime-DemP1cMx.js → approval-handler.runtime-CWoYapMp.js} +3 -3
  5. package/dist/{channel-Bylft8ql.js → channel-DMP6V9MO.js} +13 -13
  6. package/dist/{channel-base-CuSSPg6I.js → channel-base-BOLIr2sb.js} +83 -35
  7. package/dist/channel-plugin-api.js +1 -1
  8. package/dist/{channel.adapters-CAVl8EUt.js → channel.adapters-X7Hlcajj.js} +297 -12
  9. package/dist/{channel.runtime-tLQQKXrg.js → channel.runtime-rGazhnxA.js} +296 -112
  10. package/dist/directory-contract-api.js +1 -1
  11. package/dist/{doctor-contract-CvhD0eoX.js → doctor-contract-CWlBAcKf.js} +38 -61
  12. package/dist/doctor-contract-api.js +1 -1
  13. package/dist/{secret-contract-ZFiLJ7Yn.js → secret-contract-BFYyuE0F.js} +7 -21
  14. package/dist/secret-contract-api.js +1 -1
  15. package/dist/setup-plugin-api.js +1 -1
  16. package/node_modules/gaxios/build/cjs/src/gaxios.js +1 -1
  17. package/node_modules/gaxios/build/cjs/src/gaxios.js.map +1 -1
  18. package/node_modules/gaxios/build/cjs/test/test.getch.js +66 -0
  19. package/node_modules/gaxios/build/cjs/test/test.getch.js.map +1 -1
  20. package/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
  21. package/node_modules/gaxios/build/esm/src/gaxios.js +1 -1
  22. package/node_modules/gaxios/build/esm/src/gaxios.js.map +1 -1
  23. package/node_modules/gaxios/build/esm/test/test.getch.js +66 -0
  24. package/node_modules/gaxios/build/esm/test/test.getch.js.map +1 -1
  25. package/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
  26. package/node_modules/gaxios/package.json +4 -4
  27. package/node_modules/google-logging-utils/build/src/colours.d.ts +1 -29
  28. package/node_modules/google-logging-utils/build/src/colours.js +13 -13
  29. package/node_modules/google-logging-utils/build/src/colours.js.map +1 -1
  30. package/node_modules/google-logging-utils/build/src/index.d.ts +1 -0
  31. package/node_modules/google-logging-utils/build/src/index.js +1 -1
  32. package/node_modules/google-logging-utils/build/src/index.js.map +1 -1
  33. package/node_modules/google-logging-utils/build/src/logging-utils.d.ts +2 -135
  34. package/node_modules/google-logging-utils/build/src/logging-utils.js +35 -58
  35. package/node_modules/google-logging-utils/build/src/logging-utils.js.map +1 -1
  36. package/node_modules/google-logging-utils/build/src/temporal.js +8 -8
  37. package/node_modules/google-logging-utils/build/src/temporal.js.map +1 -1
  38. package/node_modules/google-logging-utils/build/src/types.d.ts +78 -0
  39. package/node_modules/google-logging-utils/build/src/types.js +16 -0
  40. package/node_modules/google-logging-utils/build/src/types.js.map +1 -0
  41. package/node_modules/google-logging-utils/package.json +11 -9
  42. package/npm-shrinkwrap.json +9 -9
  43. package/openclaw.plugin.json +403 -499
  44. package/package.json +81 -22
@@ -1,5 +1,5 @@
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";
1
+ import { l as resolveGoogleChatAccount, o as listEnabledGoogleChatAccounts } from "./channel-base-BOLIr2sb.js";
2
+ import { m as resolveGoogleChatOutboundSpace, v as sendGoogleChatMessage } from "./channel.adapters-X7Hlcajj.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
package/dist/api.js CHANGED
@@ -1,3 +1,3 @@
1
- import { a as googlechatSetupAdapter, i as googlechatSetupWizard } from "./channel-base-CuSSPg6I.js";
2
- import { t as googlechatPlugin } from "./channel-Bylft8ql.js";
1
+ import { a as googlechatSetupAdapter, i as googlechatSetupWizard } from "./channel-base-BOLIr2sb.js";
2
+ import { t as googlechatPlugin } from "./channel-DMP6V9MO.js";
3
3
  export { googlechatPlugin, googlechatSetupAdapter, googlechatSetupWizard };
@@ -1,5 +1,5 @@
1
- import { l as resolveGoogleChatAccount } from "./channel-base-CuSSPg6I.js";
2
- import { d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget } from "./channel.adapters-CAVl8EUt.js";
1
+ import { l as resolveGoogleChatAccount } from "./channel-base-BOLIr2sb.js";
2
+ import { d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget } from "./channel.adapters-X7Hlcajj.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
@@ -18,7 +18,7 @@ const googleChatApproval = createChannelApprovalAuth({
18
18
  accountId
19
19
  }).config;
20
20
  return {
21
- allowFrom: account.dm?.allowFrom,
21
+ allowFrom: account.allowFrom,
22
22
  defaultTo: account.defaultTo
23
23
  };
24
24
  },
@@ -1,6 +1,6 @@
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";
1
+ import { l as resolveGoogleChatAccount } from "./channel-base-BOLIr2sb.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-X7Hlcajj.js";
3
+ import { n as isGoogleChatNativeApprovalClientEnabled, r as shouldHandleGoogleChatNativeApprovalRequest } from "./channel-DMP6V9MO.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";
@@ -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-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";
1
+ import { c as resolveDefaultGoogleChatAccountId, l as resolveGoogleChatAccount, n as createGoogleChatPluginBase, s as listGoogleChatAccountIds, t as GOOGLECHAT_CHANNEL_ID } from "./channel-base-BOLIr2sb.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-X7Hlcajj.js";
3
3
  import { n as buildChannelConfigSchema, t as GoogleChatConfigSchema } from "./config-api-CsD0IFxF.js";
4
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
- import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CvhD0eoX.js";
7
- import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-ZFiLJ7Yn.js";
5
+ import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-BztBRceh.js";
6
+ import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-CWlBAcKf.js";
7
+ import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-BFYyuE0F.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";
@@ -87,7 +87,7 @@ const googleChatApprovalCapability = createApproverRestrictedNativeApprovalCapab
87
87
  channelLabel: "Google Chat",
88
88
  describeExecApprovalSetup: ({ accountId }) => {
89
89
  const prefix = accountId && accountId !== "default" ? `channels.googlechat.accounts.${accountId}` : "channels.googlechat";
90
- return `Approve it from the Web UI or terminal UI for now. Google Chat supports native approvals for this account when the webhook and service account are configured. Configure \`${prefix}.dm.allowFrom\` or \`${prefix}.defaultTo\` with numeric \`users/{id}\` approvers.`;
90
+ return `Approve it from the Web UI or terminal UI for now. Google Chat supports native approvals for this account when the webhook and service account are configured. Configure \`${prefix}.allowFrom\` or \`${prefix}.defaultTo\` with numeric \`users/{id}\` approvers.`;
91
91
  },
92
92
  listAccountIds: listGoogleChatAccountIds,
93
93
  hasApprovers: ({ cfg, accountId }) => getGoogleChatApprovalApprovers({
@@ -141,7 +141,7 @@ const googleChatApprovalCapability = createApproverRestrictedNativeApprovalCapab
141
141
  approvalKind,
142
142
  request
143
143
  }),
144
- load: async () => (await import("./approval-handler.runtime-DemP1cMx.js")).googleChatApprovalNativeRuntime
144
+ load: async () => (await import("./approval-handler.runtime-CWoYapMp.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-tLQQKXrg.js"), "googleChatChannelRuntime");
167
+ const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-rGazhnxA.js"), "googleChatChannelRuntime");
168
168
  async function startGoogleChatGatewayAccount(ctx) {
169
169
  const account = ctx.account;
170
170
  const statusSink = createAccountStatusSink({
@@ -213,7 +213,7 @@ async function startGoogleChatGatewayAccount(ctx) {
213
213
  statusSink
214
214
  }),
215
215
  stop: async (unregister) => {
216
- unregister?.();
216
+ await unregister?.();
217
217
  },
218
218
  onStop: async () => {
219
219
  markStopped();
@@ -226,7 +226,7 @@ async function startGoogleChatGatewayAccount(ctx) {
226
226
  }
227
227
  //#endregion
228
228
  //#region extensions/googlechat/src/channel.ts
229
- const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-tLQQKXrg.js"), "googleChatChannelRuntime");
229
+ const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-rGazhnxA.js"), "googleChatChannelRuntime");
230
230
  const googlechatActions = {
231
231
  describeMessageTool: ({ cfg, accountId }) => {
232
232
  if ((accountId ? [resolveGoogleChatAccount({
@@ -241,7 +241,7 @@ const googlechatActions = {
241
241
  supportsAction: ({ action }) => action === "send",
242
242
  extractToolSend: ({ args }) => extractToolSend(args, "sendMessage"),
243
243
  handleAction: async (ctx) => {
244
- const { googlechatMessageActions } = await import("./actions-C9M27Xgq.js");
244
+ const { googlechatMessageActions } = await import("./actions-DBF3ImbA.js");
245
245
  if (!googlechatMessageActions.handleAction) throw new Error("Google Chat actions are not available.");
246
246
  return await googlechatMessageActions.handleAction(ctx);
247
247
  }
@@ -301,7 +301,7 @@ const googlechatPlugin = createChatChannelPlugin({
301
301
  } },
302
302
  actions: googlechatActions,
303
303
  doctor: {
304
- dmAllowFromMode: "nestedOnly",
304
+ dmAllowFromMode: "topOnly",
305
305
  groupModel: "route",
306
306
  groupAllowFromFallbackToAllowFrom: false,
307
307
  warnOnEmptyGroupSenderAllowlist: false,
@@ -353,7 +353,7 @@ const googlechatPlugin = createChatChannelPlugin({
353
353
  audience: account.config.audience,
354
354
  webhookPath: account.config.webhookPath,
355
355
  webhookUrl: account.config.webhookUrl,
356
- dmPolicy: account.config.dm?.policy ?? "pairing"
356
+ dmPolicy: account.config.dmPolicy ?? "pairing"
357
357
  }
358
358
  })
359
359
  }),
@@ -9,6 +9,7 @@ import { z } from "zod";
9
9
  import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
10
10
  import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
11
11
  import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
12
+ import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
12
13
  import { createPatchedAccountSetupAdapter, createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
13
14
  import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, addWildcardAllowFrom, applySetupAccountConfigPatch, createPromptParsedAllowFromForAccount, createSetupTranslator, createStandardChannelSetupStatus, formatDocsLink, mergeAllowFromEntries, migrateBaseNameToDefaultAccount, splitSetupEntries } from "openclaw/plugin-sdk/setup";
14
15
  //#region extensions/googlechat/src/google-auth-limits.ts
@@ -19,11 +20,7 @@ const ENV_SERVICE_ACCOUNT$1 = "GOOGLE_CHAT_SERVICE_ACCOUNT";
19
20
  const ENV_SERVICE_ACCOUNT_FILE$1 = "GOOGLE_CHAT_SERVICE_ACCOUNT_FILE";
20
21
  const JsonRecordSchema = z.record(z.string(), z.unknown());
21
22
  const { listAccountIds: listGoogleChatAccountIds, resolveDefaultAccountId: resolveDefaultGoogleChatAccountId } = createAccountListHelpers("googlechat", { implicitDefaultAccount: {
22
- channelKeys: [
23
- "serviceAccount",
24
- "serviceAccountRef",
25
- "serviceAccountFile"
26
- ],
23
+ channelKeys: ["serviceAccount", "serviceAccountFile"],
27
24
  envVars: [ENV_SERVICE_ACCOUNT$1, ENV_SERVICE_ACCOUNT_FILE$1]
28
25
  } });
29
26
  function mergeGoogleChatAccountConfig(cfg, accountId) {
@@ -37,7 +34,7 @@ function mergeGoogleChatAccountConfig(cfg, accountId) {
37
34
  });
38
35
  const defaultAccountConfig = resolveAccountEntry(raw.accounts, DEFAULT_ACCOUNT_ID) ?? {};
39
36
  if (accountId === DEFAULT_ACCOUNT_ID) return base;
40
- const { enabled: _ignoredEnabled, dangerouslyAllowNameMatching: _ignoredDangerouslyAllowNameMatching, serviceAccount: _ignoredServiceAccount, serviceAccountRef: _ignoredServiceAccountRef, serviceAccountFile: _ignoredServiceAccountFile, ...defaultAccountShared } = defaultAccountConfig;
37
+ const { enabled: _ignoredEnabled, dangerouslyAllowNameMatching: _ignoredDangerouslyAllowNameMatching, serviceAccount: _ignoredServiceAccount, serviceAccountFile: _ignoredServiceAccountFile, ...defaultAccountShared } = defaultAccountConfig;
41
38
  const botLoopProtection = mergePairLoopGuardConfig(defaultAccountShared.botLoopProtection, base.botLoopProtection);
42
39
  return {
43
40
  ...defaultAccountShared,
@@ -67,7 +64,6 @@ function resolveCredentialsFromConfig(params) {
67
64
  status: "available"
68
65
  };
69
66
  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.`);
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.`);
71
67
  const file = normalizeOptionalString(account.serviceAccountFile);
72
68
  if (file) {
73
69
  const result = tryReadSecretFileSync(resolveUserPath(file), "Google Chat service account file", {
@@ -156,11 +152,12 @@ const googlechatSetupAdapter = createPatchedAccountSetupAdapter({
156
152
  }]
157
153
  }),
158
154
  buildPatch: (input) => {
159
- const patch = input.useEnv ? {} : input.tokenFile ? { serviceAccountFile: input.tokenFile } : input.token ? { serviceAccount: input.token } : {};
160
- const audienceType = input.audienceType?.trim();
161
- const audience = input.audience?.trim();
162
- const webhookPath = input.webhookPath?.trim();
163
- const webhookUrl = input.webhookUrl?.trim();
155
+ const setupInput = input;
156
+ const patch = setupInput.useEnv ? {} : setupInput.tokenFile ? { serviceAccountFile: setupInput.tokenFile } : setupInput.token ? { serviceAccount: setupInput.token } : {};
157
+ const audienceType = setupInput.audienceType?.trim();
158
+ const audience = setupInput.audience?.trim();
159
+ const webhookPath = setupInput.webhookPath?.trim();
160
+ const webhookUrl = setupInput.webhookUrl?.trim();
164
161
  return {
165
162
  ...patch,
166
163
  ...audienceType ? { audienceType } : {},
@@ -170,6 +167,63 @@ const googlechatSetupAdapter = createPatchedAccountSetupAdapter({
170
167
  };
171
168
  }
172
169
  });
170
+ const googlechatSetupContract = defineChannelSetupContract({
171
+ fields: {
172
+ token: {
173
+ kind: "string",
174
+ sensitive: true,
175
+ cli: {
176
+ flags: "--token <json>",
177
+ description: "Google Chat service account JSON"
178
+ }
179
+ },
180
+ tokenFile: {
181
+ kind: "string",
182
+ sensitive: true,
183
+ cli: {
184
+ flags: "--token-file <path>",
185
+ description: "Google Chat service account file"
186
+ }
187
+ },
188
+ audienceType: {
189
+ kind: "choice",
190
+ choices: ["app-url", "project-number"],
191
+ cli: {
192
+ flags: "--audience-type <type>",
193
+ description: "Google Chat audience type"
194
+ }
195
+ },
196
+ audience: {
197
+ kind: "string",
198
+ cli: {
199
+ flags: "--audience <value>",
200
+ description: "Google Chat audience value"
201
+ }
202
+ },
203
+ webhookPath: {
204
+ kind: "string",
205
+ cli: {
206
+ flags: "--webhook-path <path>",
207
+ description: "Google Chat webhook path"
208
+ }
209
+ },
210
+ webhookUrl: {
211
+ kind: "string",
212
+ cli: {
213
+ flags: "--webhook-url <url>",
214
+ description: "Google Chat webhook URL"
215
+ }
216
+ },
217
+ useEnv: {
218
+ kind: "boolean",
219
+ cli: {
220
+ flags: "--use-env",
221
+ description: "Use Google Chat environment credentials"
222
+ }
223
+ }
224
+ },
225
+ legacyAdapter: googlechatSetupAdapter
226
+ });
173
227
  //#endregion
174
228
  //#region extensions/googlechat/src/setup-surface.ts
175
229
  const t = createSetupTranslator();
@@ -181,34 +235,33 @@ const AUTH_METHOD_FLAG = "__googlechatAuthMethod";
181
235
  const googlechatDmPolicy = {
182
236
  label: "Google Chat",
183
237
  channel,
184
- policyKey: "channels.googlechat.dm.policy",
185
- allowFromKey: "channels.googlechat.dm.allowFrom",
238
+ policyKey: "channels.googlechat.dmPolicy",
239
+ allowFromKey: "channels.googlechat.allowFrom",
186
240
  resolveConfigKeys: (cfg, accountId) => (accountId ?? resolveDefaultGoogleChatAccountId(cfg)) !== DEFAULT_ACCOUNT_ID$1 ? {
187
- policyKey: `channels.googlechat.accounts.${accountId ?? resolveDefaultGoogleChatAccountId(cfg)}.dm.policy`,
188
- allowFromKey: `channels.googlechat.accounts.${accountId ?? resolveDefaultGoogleChatAccountId(cfg)}.dm.allowFrom`
241
+ policyKey: `channels.googlechat.accounts.${accountId ?? resolveDefaultGoogleChatAccountId(cfg)}.dmPolicy`,
242
+ allowFromKey: `channels.googlechat.accounts.${accountId ?? resolveDefaultGoogleChatAccountId(cfg)}.allowFrom`
189
243
  } : {
190
- policyKey: "channels.googlechat.dm.policy",
191
- allowFromKey: "channels.googlechat.dm.allowFrom"
244
+ policyKey: "channels.googlechat.dmPolicy",
245
+ allowFromKey: "channels.googlechat.allowFrom"
192
246
  },
193
247
  getCurrent: (cfg, accountId) => resolveGoogleChatAccount({
194
248
  cfg,
195
249
  accountId: accountId ?? resolveDefaultGoogleChatAccountId(cfg)
196
- }).config.dm?.policy ?? "pairing",
250
+ }).config.dmPolicy ?? "pairing",
197
251
  setPolicy: (cfg, policy, accountId) => {
198
252
  const resolvedAccountId = accountId ?? resolveDefaultGoogleChatAccountId(cfg);
199
- const currentDm = resolveGoogleChatAccount({
253
+ const current = resolveGoogleChatAccount({
200
254
  cfg,
201
255
  accountId: resolvedAccountId
202
- }).config.dm;
256
+ }).config;
203
257
  return applySetupAccountConfigPatch({
204
258
  cfg,
205
259
  channelKey: channel,
206
260
  accountId: resolvedAccountId,
207
- patch: { dm: {
208
- ...currentDm,
209
- policy,
210
- ...policy === "open" ? { allowFrom: addWildcardAllowFrom(currentDm?.allowFrom) } : {}
211
- } }
261
+ patch: {
262
+ dmPolicy: policy,
263
+ ...policy === "open" ? { allowFrom: addWildcardAllowFrom(current.allowFrom) } : {}
264
+ }
212
265
  });
213
266
  },
214
267
  promptAllowFrom: createPromptParsedAllowFromForAccount({
@@ -219,18 +272,12 @@ const googlechatDmPolicy = {
219
272
  getExistingAllowFrom: ({ cfg, accountId }) => resolveGoogleChatAccount({
220
273
  cfg,
221
274
  accountId
222
- }).config.dm?.allowFrom ?? [],
275
+ }).config.allowFrom ?? [],
223
276
  applyAllowFrom: ({ cfg, accountId, allowFrom }) => applySetupAccountConfigPatch({
224
277
  cfg,
225
278
  channelKey: channel,
226
279
  accountId,
227
- patch: { dm: {
228
- ...resolveGoogleChatAccount({
229
- cfg,
230
- accountId
231
- }).config.dm,
232
- allowFrom
233
- } }
280
+ patch: { allowFrom }
234
281
  })
235
282
  })
236
283
  };
@@ -392,7 +439,7 @@ const googleChatConfigAdapter = createScopedChannelConfigAdapter({
392
439
  "botUser",
393
440
  "name"
394
441
  ],
395
- resolveAllowFrom: (account) => account.config.dm?.allowFrom,
442
+ resolveAllowFrom: (account) => account.config.allowFrom,
396
443
  formatAllowFrom: (allowFrom) => formatNormalizedAllowFromEntries({
397
444
  allowFrom,
398
445
  normalizeEntry: formatGoogleChatAllowFromEntry
@@ -404,6 +451,7 @@ function createGoogleChatPluginBase(params = {}) {
404
451
  id: GOOGLECHAT_CHANNEL_ID,
405
452
  meta: { ...googlechatMeta },
406
453
  setup: googlechatSetupAdapter,
454
+ setupContract: googlechatSetupContract,
407
455
  setupWizard: googlechatSetupWizard,
408
456
  capabilities: {
409
457
  chatTypes: [
@@ -1,2 +1,2 @@
1
- import { t as googlechatPlugin } from "./channel-Bylft8ql.js";
1
+ import { t as googlechatPlugin } from "./channel-DMP6V9MO.js";
2
2
  export { googlechatPlugin };