@openclaw/googlechat 2026.7.2-beta.7 → 2026.7.33
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/README.md +1 -1
- package/dist/.setup/actions-DeT_GgtP.mjs +167 -0
- package/dist/.setup/approval-auth-CQP5ZS_f.mjs +27 -0
- package/dist/{approval-handler.runtime-CBeHrXtL.js → .setup/approval-handler.runtime-DWNRBf9B.mjs} +5 -6
- package/dist/{channel-kouqKs2x.js → .setup/channel-BPjomke4.mjs} +87 -67
- package/dist/{channel-base-hw9ErEr5.js → .setup/channel-base-DJICAvKH.mjs} +91 -182
- package/dist/{channel.adapters-DaipaeYt.js → .setup/channel.adapters-T6wPzrpo.mjs} +170 -383
- package/dist/{channel.runtime-BbwE9vOC.js → .setup/channel.runtime-CpT-qT67.mjs} +241 -440
- package/dist/.setup/doctor-contract-BcEqUZ4j.mjs +151 -0
- package/dist/{runtime-api-Dh0CNVS4.js → .setup/runtime-api-BbVoWRxq.mjs} +7 -3
- package/dist/.setup/secret-contract-api-BGDBptmu.mjs +3 -0
- package/dist/.setup/secret-contract-lCMHqumt.mjs +99 -0
- package/dist/.setup/setup-plugin-api-BgwvQMls.mjs +5 -0
- package/dist/.setup/setup-plugin-api-Ce08GSFO.mjs +2 -0
- package/dist/api.js +2 -2
- package/dist/channel-config-api.js +2 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/runtime-api.js +2 -3
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -2
- package/dist/setup-plugin-api.js +1 -4
- package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/gaxios.js +1 -1
- package/node_modules/gaxios/build/cjs/src/gaxios.js.map +1 -0
- package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/test/test.getch.js +0 -66
- package/node_modules/gaxios/build/cjs/test/test.getch.js.map +1 -0
- package/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/gaxios.js +1 -1
- package/node_modules/gaxios/build/esm/src/gaxios.js.map +1 -0
- package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/test/test.getch.js +0 -66
- package/node_modules/gaxios/build/esm/test/test.getch.js.map +1 -0
- package/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -0
- package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/package.json +4 -4
- package/node_modules/google-auth-library/build/src/auth/googleauth.js +19 -24
- package/node_modules/google-auth-library/package.json +1 -1
- package/openclaw.plugin.json +488 -416
- package/package.json +25 -82
- package/dist/actions-D81dCtkC.js +0 -68
- package/dist/approval-auth-ykO6i_ub.js +0 -30
- package/dist/config-api-CsD0IFxF.js +0 -3
- package/dist/doctor-contract-BpuSvJro.js +0 -115
- package/dist/secret-contract-BFYyuE0F.js +0 -88
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/src/gaxios.js.map +0 -1
- 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/tsconfig.cjs.tsbuildinfo +0 -1
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/src/gaxios.js.map +0 -1
- 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/tsconfig.tsbuildinfo +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/LICENSE +0 -202
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/README.md +0 -73
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.js +0 -81
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.d.ts +0 -2
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.js +0 -31
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.d.ts +0 -89
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.js +0 -414
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/temporal.d.ts +0 -45
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/temporal.js +0 -68
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/temporal.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/types.d.ts +0 -78
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/types.js +0 -16
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/types.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/package.json +0 -47
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/LICENSE +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/README.md +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/browser-test/browser-test-runner.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/browser-test/browser-test-runner.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/browser-test/browser-test-runner.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/browser-test/test.browser.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/browser-test/test.browser.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/browser-test/test.browser.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/common.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/common.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/common.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/gaxios.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/index.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/index.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/index.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/interceptor.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/interceptor.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/interceptor.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/retry.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/retry.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/retry.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/util.cjs +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/util.cjs.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/src/util.d.cts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/system-test/test.install.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/system-test/test.install.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/system-test/test.install.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/test/test.getch.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/test/test.index.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/test/test.index.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/test/test.index.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/test/test.retry.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/test/test.retry.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/cjs/test/test.retry.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/browser-test/browser-test-runner.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/browser-test/browser-test-runner.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/browser-test/browser-test-runner.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/browser-test/test.browser.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/browser-test/test.browser.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/browser-test/test.browser.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/package.json +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/common.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/common.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/common.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/gaxios.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/index.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/index.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/index.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/interceptor.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/interceptor.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/interceptor.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/retry.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/retry.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/retry.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/util.cjs +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/util.cjs.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/src/util.d.cts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/system-test/test.install.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/system-test/test.install.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/system-test/test.install.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/test/test.getch.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/test/test.index.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/test/test.index.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/test/test.index.js.map +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/test/test.retry.d.ts +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/test/test.retry.js +0 -0
- /package/node_modules/{google-auth-library/node_modules/gaxios → gaxios}/build/esm/test/test.retry.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/LICENSE +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/dist/helpers.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/dist/helpers.d.ts.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/dist/helpers.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/dist/helpers.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/dist/index.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/dist/index.d.ts.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/dist/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/dist/index.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/agent-base/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/data-uri-to-buffer/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/data-uri-to-buffer/dist/index.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/data-uri-to-buffer/dist/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/data-uri-to-buffer/dist/index.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/data-uri-to-buffer/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/data-uri-to-buffer/src/index.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/debug/LICENSE +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/debug/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/debug/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/debug/src/browser.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/debug/src/common.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/debug/src/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/debug/src/node.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/.editorconfig +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/.eslintrc +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/.jscs.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/.travis.yml +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/CHANGELOG.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/LICENSE +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/component.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/extend/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/LICENSE +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/file.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/file.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/from.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/from.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/index.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/fetch-blob/streams.cjs +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/formdata-polyfill/FormData.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/formdata-polyfill/LICENSE +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/formdata-polyfill/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/formdata-polyfill/esm.min.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/formdata-polyfill/esm.min.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/formdata-polyfill/formdata-to-blob.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/formdata-polyfill/formdata.min.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/formdata-polyfill/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/LICENSE +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/dist/index.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/dist/index.d.ts.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/dist/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/dist/index.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/dist/parse-proxy-response.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/https-proxy-agent/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/ms/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/ms/license.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/ms/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/ms/readme.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-domexception/LICENSE +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-domexception/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-domexception/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/@types/index.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/LICENSE.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/body.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/errors/abort-error.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/errors/base.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/errors/fetch-error.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/headers.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/index.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/request.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/response.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/utils/get-search.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/utils/is-redirect.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/utils/is.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/utils/multipart-parser.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/node-fetch/src/utils/referrer.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/LICENSE +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/README.md +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es2018.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es2018.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es2018.min.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es2018.min.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es2018.mjs +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es2018.mjs.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es6.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es6.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es6.min.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es6.min.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es6.mjs +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.es6.mjs.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.min.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.min.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.mjs +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/polyfill.mjs.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.es2018.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.es2018.mjs.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.es6.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.es6.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.es6.mjs +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.es6.mjs.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.js +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.js.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.mjs +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/ponyfill.mjs.map +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/types/polyfill.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/types/ponyfill.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/types/ts3.6/polyfill.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/types/ts3.6/ponyfill.d.ts +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/dist/types/tsdoc-metadata.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/es2018/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/es6/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/ponyfill/es2018/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/ponyfill/es6/package.json +0 -0
- /package/node_modules/{google-auth-library → gaxios}/node_modules/web-streams-polyfill/ponyfill/package.json +0 -0
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { safeParseJsonWithSchema, safeParseWithSchema } from "openclaw/plugin-sdk/extension-shared";
|
|
2
2
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString, normalizeStringifiedOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
3
|
-
import { createAccountListHelpers,
|
|
4
|
-
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveAccountEntry } from "openclaw/plugin-sdk/account-resolution";
|
|
3
|
+
import { DEFAULT_ACCOUNT_ID, createAccountListHelpers, normalizeAccountId, resolveAccountEntry, resolveMergedAccountConfig } from "openclaw/plugin-sdk/account-resolution";
|
|
5
4
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
6
|
-
import {
|
|
7
|
-
import { coerceSecretRef, isSecretRef, resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
8
|
-
import { resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
5
|
+
import { isSecretRef } from "openclaw/plugin-sdk/secret-input";
|
|
9
6
|
import { z } from "zod";
|
|
7
|
+
import { describeAccountSnapshot } from "openclaw/plugin-sdk/account-helpers";
|
|
10
8
|
import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
11
9
|
import { adaptScopedAccountAccessor, createScopedChannelConfigAdapter } from "openclaw/plugin-sdk/channel-config-helpers";
|
|
12
|
-
import { defineChannelSetupContract } from "openclaw/plugin-sdk/channel-setup";
|
|
13
10
|
import { createPatchedAccountSetupAdapter, createSetupInputPresenceValidator } from "openclaw/plugin-sdk/setup-runtime";
|
|
14
|
-
import {
|
|
15
|
-
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, applySetupAccountConfigPatch, createPromptParsedAllowFromForAccount, createSetupTranslator, createStandardChannelSetupStatus, formatDocsLink, mergeAllowFromEntries, migrateBaseNameToDefaultAccount, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
16
|
-
//#region extensions/googlechat/src/google-auth-limits.ts
|
|
17
|
-
const MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES = 64 * 1024;
|
|
18
|
-
//#endregion
|
|
11
|
+
import { DEFAULT_ACCOUNT_ID as DEFAULT_ACCOUNT_ID$1, addWildcardAllowFrom, applySetupAccountConfigPatch, createPromptParsedAllowFromForAccount, createSetupTranslator, createStandardChannelSetupStatus, formatDocsLink, mergeAllowFromEntries, migrateBaseNameToDefaultAccount, splitSetupEntries } from "openclaw/plugin-sdk/setup";
|
|
19
12
|
//#region extensions/googlechat/src/accounts.ts
|
|
20
13
|
const ENV_SERVICE_ACCOUNT$1 = "GOOGLE_CHAT_SERVICE_ACCOUNT";
|
|
21
14
|
const ENV_SERVICE_ACCOUNT_FILE$1 = "GOOGLE_CHAT_SERVICE_ACCOUNT_FILE";
|
|
22
15
|
const JsonRecordSchema = z.record(z.string(), z.unknown());
|
|
23
|
-
const { listAccountIds: listGoogleChatAccountIds, resolveDefaultAccountId: resolveDefaultGoogleChatAccountId
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
});
|
|
16
|
+
const { listAccountIds: listGoogleChatAccountIds, resolveDefaultAccountId: resolveDefaultGoogleChatAccountId } = createAccountListHelpers("googlechat", { implicitDefaultAccount: {
|
|
17
|
+
channelKeys: [
|
|
18
|
+
"serviceAccount",
|
|
19
|
+
"serviceAccountRef",
|
|
20
|
+
"serviceAccountFile"
|
|
21
|
+
],
|
|
22
|
+
envVars: [ENV_SERVICE_ACCOUNT$1, ENV_SERVICE_ACCOUNT_FILE$1]
|
|
23
|
+
} });
|
|
31
24
|
function mergeGoogleChatAccountConfig(cfg, accountId) {
|
|
32
25
|
const raw = cfg.channels?.["googlechat"] ?? {};
|
|
33
|
-
const base =
|
|
26
|
+
const base = resolveMergedAccountConfig({
|
|
27
|
+
channelConfig: raw,
|
|
28
|
+
accounts: raw.accounts,
|
|
29
|
+
accountId,
|
|
30
|
+
omitKeys: ["defaultAccount"],
|
|
31
|
+
nestedObjectKeys: ["botLoopProtection"]
|
|
32
|
+
});
|
|
34
33
|
const defaultAccountConfig = resolveAccountEntry(raw.accounts, DEFAULT_ACCOUNT_ID) ?? {};
|
|
35
34
|
if (accountId === DEFAULT_ACCOUNT_ID) return base;
|
|
36
|
-
const { enabled: _ignoredEnabled, dangerouslyAllowNameMatching: _ignoredDangerouslyAllowNameMatching, serviceAccount: _ignoredServiceAccount, serviceAccountFile: _ignoredServiceAccountFile, ...defaultAccountShared } = defaultAccountConfig;
|
|
35
|
+
const { enabled: _ignoredEnabled, dangerouslyAllowNameMatching: _ignoredDangerouslyAllowNameMatching, serviceAccount: _ignoredServiceAccount, serviceAccountRef: _ignoredServiceAccountRef, serviceAccountFile: _ignoredServiceAccountFile, ...defaultAccountShared } = defaultAccountConfig;
|
|
37
36
|
const botLoopProtection = mergePairLoopGuardConfig(defaultAccountShared.botLoopProtection, base.botLoopProtection);
|
|
38
37
|
return {
|
|
39
38
|
...defaultAccountShared,
|
|
@@ -59,82 +58,39 @@ function resolveCredentialsFromConfig(params) {
|
|
|
59
58
|
const inline = parseServiceAccount(account.serviceAccount);
|
|
60
59
|
if (inline) return {
|
|
61
60
|
credentials: inline,
|
|
62
|
-
source: "inline"
|
|
63
|
-
status: "available"
|
|
64
|
-
};
|
|
65
|
-
if (coerceSecretRef(account.serviceAccount, params.cfg.secrets?.defaults)) return resolveSecretInputString({
|
|
66
|
-
value: account.serviceAccount,
|
|
67
|
-
defaults: params.cfg.secrets?.defaults,
|
|
68
|
-
path: `channels.googlechat.accounts.${accountId}.serviceAccount`,
|
|
69
|
-
mode: params.mode
|
|
70
|
-
}).status === "configured_unavailable" ? {
|
|
71
|
-
source: "none",
|
|
72
|
-
status: "configured_unavailable"
|
|
73
|
-
} : {
|
|
74
|
-
source: "none",
|
|
75
|
-
status: "missing"
|
|
61
|
+
source: "inline"
|
|
76
62
|
};
|
|
63
|
+
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
|
+
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.`);
|
|
77
65
|
const file = normalizeOptionalString(account.serviceAccountFile);
|
|
78
|
-
if (file) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
rejectSymlink: false
|
|
83
|
-
}, { configPath: `channels.googlechat.accounts.${accountId}.serviceAccountFile` });
|
|
84
|
-
return result.status === "available" ? {
|
|
85
|
-
credentialsFile: file,
|
|
86
|
-
source: "file",
|
|
87
|
-
status: "available"
|
|
88
|
-
} : {
|
|
89
|
-
credentialsFile: file,
|
|
90
|
-
source: "file",
|
|
91
|
-
status: "configured_unavailable",
|
|
92
|
-
diagnostic: result.diagnostic
|
|
93
|
-
};
|
|
94
|
-
}
|
|
66
|
+
if (file) return {
|
|
67
|
+
credentialsFile: file,
|
|
68
|
+
source: "file"
|
|
69
|
+
};
|
|
95
70
|
if (accountId === DEFAULT_ACCOUNT_ID) {
|
|
96
71
|
const envJson = process.env[ENV_SERVICE_ACCOUNT$1];
|
|
97
72
|
const envInline = parseServiceAccount(envJson);
|
|
98
73
|
if (envInline) return {
|
|
99
74
|
credentials: envInline,
|
|
100
|
-
source: "env"
|
|
101
|
-
status: "available"
|
|
75
|
+
source: "env"
|
|
102
76
|
};
|
|
103
77
|
const envFile = normalizeOptionalString(process.env[ENV_SERVICE_ACCOUNT_FILE$1]);
|
|
104
|
-
if (envFile) {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
rejectSymlink: false
|
|
109
|
-
}, { configPath: `env.${ENV_SERVICE_ACCOUNT_FILE$1}` });
|
|
110
|
-
return result.status === "available" ? {
|
|
111
|
-
credentialsFile: envFile,
|
|
112
|
-
source: "env",
|
|
113
|
-
status: "available"
|
|
114
|
-
} : {
|
|
115
|
-
credentialsFile: envFile,
|
|
116
|
-
source: "env",
|
|
117
|
-
status: "configured_unavailable",
|
|
118
|
-
diagnostic: result.diagnostic
|
|
119
|
-
};
|
|
120
|
-
}
|
|
78
|
+
if (envFile) return {
|
|
79
|
+
credentialsFile: envFile,
|
|
80
|
+
source: "env"
|
|
81
|
+
};
|
|
121
82
|
}
|
|
122
|
-
return {
|
|
123
|
-
source: "none",
|
|
124
|
-
status: "missing"
|
|
125
|
-
};
|
|
83
|
+
return { source: "none" };
|
|
126
84
|
}
|
|
127
|
-
function
|
|
85
|
+
function resolveGoogleChatAccount(params) {
|
|
128
86
|
const accountId = normalizeAccountId(params.accountId ?? params.cfg.channels?.["googlechat"]?.defaultAccount);
|
|
129
87
|
const baseEnabled = params.cfg.channels?.["googlechat"]?.enabled !== false;
|
|
130
88
|
const merged = mergeGoogleChatAccountConfig(params.cfg, accountId);
|
|
131
89
|
const accountEnabled = merged.enabled !== false;
|
|
132
90
|
const enabled = baseEnabled && accountEnabled;
|
|
133
91
|
const credentials = resolveCredentialsFromConfig({
|
|
134
|
-
cfg: params.cfg,
|
|
135
92
|
accountId,
|
|
136
|
-
account: merged
|
|
137
|
-
mode: params.mode
|
|
93
|
+
account: merged
|
|
138
94
|
});
|
|
139
95
|
return {
|
|
140
96
|
accountId,
|
|
@@ -143,22 +99,14 @@ function resolveGoogleChatAccountWithMode(params) {
|
|
|
143
99
|
config: merged,
|
|
144
100
|
credentialSource: credentials.source,
|
|
145
101
|
credentials: credentials.credentials,
|
|
146
|
-
credentialsFile: credentials.credentialsFile
|
|
147
|
-
tokenStatus: credentials.status,
|
|
148
|
-
...credentials.diagnostic ? { credentialDiagnostics: [credentials.diagnostic] } : {}
|
|
102
|
+
credentialsFile: credentials.credentialsFile
|
|
149
103
|
};
|
|
150
104
|
}
|
|
151
|
-
function
|
|
152
|
-
return
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
function inspectGoogleChatAccount(params) {
|
|
158
|
-
return resolveGoogleChatAccountWithMode({
|
|
159
|
-
...params,
|
|
160
|
-
mode: "inspect"
|
|
161
|
-
});
|
|
105
|
+
function listEnabledGoogleChatAccounts(cfg) {
|
|
106
|
+
return listGoogleChatAccountIds(cfg).map((accountId) => resolveGoogleChatAccount({
|
|
107
|
+
cfg,
|
|
108
|
+
accountId
|
|
109
|
+
})).filter((account) => account.enabled);
|
|
162
110
|
}
|
|
163
111
|
const googlechatSetupAdapter = createPatchedAccountSetupAdapter({
|
|
164
112
|
channelKey: "googlechat",
|
|
@@ -170,12 +118,11 @@ const googlechatSetupAdapter = createPatchedAccountSetupAdapter({
|
|
|
170
118
|
}]
|
|
171
119
|
}),
|
|
172
120
|
buildPatch: (input) => {
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
const webhookUrl = setupInput.webhookUrl?.trim();
|
|
121
|
+
const patch = input.useEnv ? {} : input.tokenFile ? { serviceAccountFile: input.tokenFile } : input.token ? { serviceAccount: input.token } : {};
|
|
122
|
+
const audienceType = input.audienceType?.trim();
|
|
123
|
+
const audience = input.audience?.trim();
|
|
124
|
+
const webhookPath = input.webhookPath?.trim();
|
|
125
|
+
const webhookUrl = input.webhookUrl?.trim();
|
|
179
126
|
return {
|
|
180
127
|
...patch,
|
|
181
128
|
...audienceType ? { audienceType } : {},
|
|
@@ -185,63 +132,6 @@ const googlechatSetupAdapter = createPatchedAccountSetupAdapter({
|
|
|
185
132
|
};
|
|
186
133
|
}
|
|
187
134
|
});
|
|
188
|
-
const googlechatSetupContract = defineChannelSetupContract({
|
|
189
|
-
fields: {
|
|
190
|
-
token: {
|
|
191
|
-
kind: "string",
|
|
192
|
-
sensitive: true,
|
|
193
|
-
cli: {
|
|
194
|
-
flags: "--token <json>",
|
|
195
|
-
description: "Google Chat service account JSON"
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
tokenFile: {
|
|
199
|
-
kind: "string",
|
|
200
|
-
sensitive: true,
|
|
201
|
-
cli: {
|
|
202
|
-
flags: "--token-file <path>",
|
|
203
|
-
description: "Google Chat service account file"
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
audienceType: {
|
|
207
|
-
kind: "choice",
|
|
208
|
-
choices: ["app-url", "project-number"],
|
|
209
|
-
cli: {
|
|
210
|
-
flags: "--audience-type <type>",
|
|
211
|
-
description: "Google Chat audience type"
|
|
212
|
-
}
|
|
213
|
-
},
|
|
214
|
-
audience: {
|
|
215
|
-
kind: "string",
|
|
216
|
-
cli: {
|
|
217
|
-
flags: "--audience <value>",
|
|
218
|
-
description: "Google Chat audience value"
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
webhookPath: {
|
|
222
|
-
kind: "string",
|
|
223
|
-
cli: {
|
|
224
|
-
flags: "--webhook-path <path>",
|
|
225
|
-
description: "Google Chat webhook path"
|
|
226
|
-
}
|
|
227
|
-
},
|
|
228
|
-
webhookUrl: {
|
|
229
|
-
kind: "string",
|
|
230
|
-
cli: {
|
|
231
|
-
flags: "--webhook-url <url>",
|
|
232
|
-
description: "Google Chat webhook URL"
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
useEnv: {
|
|
236
|
-
kind: "boolean",
|
|
237
|
-
cli: {
|
|
238
|
-
flags: "--use-env",
|
|
239
|
-
description: "Use Google Chat environment credentials"
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
},
|
|
243
|
-
legacyAdapter: googlechatSetupAdapter
|
|
244
|
-
});
|
|
245
135
|
//#endregion
|
|
246
136
|
//#region extensions/googlechat/src/setup-surface.ts
|
|
247
137
|
const t = createSetupTranslator();
|
|
@@ -250,19 +140,39 @@ const ENV_SERVICE_ACCOUNT = "GOOGLE_CHAT_SERVICE_ACCOUNT";
|
|
|
250
140
|
const ENV_SERVICE_ACCOUNT_FILE = "GOOGLE_CHAT_SERVICE_ACCOUNT_FILE";
|
|
251
141
|
const USE_ENV_FLAG = "__googlechatUseEnv";
|
|
252
142
|
const AUTH_METHOD_FLAG = "__googlechatAuthMethod";
|
|
253
|
-
const googlechatDmPolicy =
|
|
143
|
+
const googlechatDmPolicy = {
|
|
254
144
|
label: "Google Chat",
|
|
255
145
|
channel,
|
|
256
|
-
|
|
146
|
+
policyKey: "channels.googlechat.dm.policy",
|
|
147
|
+
allowFromKey: "channels.googlechat.dm.allowFrom",
|
|
148
|
+
resolveConfigKeys: (cfg, accountId) => (accountId ?? resolveDefaultGoogleChatAccountId(cfg)) !== DEFAULT_ACCOUNT_ID$1 ? {
|
|
149
|
+
policyKey: `channels.googlechat.accounts.${accountId ?? resolveDefaultGoogleChatAccountId(cfg)}.dm.policy`,
|
|
150
|
+
allowFromKey: `channels.googlechat.accounts.${accountId ?? resolveDefaultGoogleChatAccountId(cfg)}.dm.allowFrom`
|
|
151
|
+
} : {
|
|
152
|
+
policyKey: "channels.googlechat.dm.policy",
|
|
153
|
+
allowFromKey: "channels.googlechat.dm.allowFrom"
|
|
154
|
+
},
|
|
155
|
+
getCurrent: (cfg, accountId) => resolveGoogleChatAccount({
|
|
257
156
|
cfg,
|
|
258
157
|
accountId: accountId ?? resolveDefaultGoogleChatAccountId(cfg)
|
|
259
|
-
}),
|
|
260
|
-
|
|
261
|
-
cfg
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
158
|
+
}).config.dm?.policy ?? "pairing",
|
|
159
|
+
setPolicy: (cfg, policy, accountId) => {
|
|
160
|
+
const resolvedAccountId = accountId ?? resolveDefaultGoogleChatAccountId(cfg);
|
|
161
|
+
const currentDm = resolveGoogleChatAccount({
|
|
162
|
+
cfg,
|
|
163
|
+
accountId: resolvedAccountId
|
|
164
|
+
}).config.dm;
|
|
165
|
+
return applySetupAccountConfigPatch({
|
|
166
|
+
cfg,
|
|
167
|
+
channelKey: channel,
|
|
168
|
+
accountId: resolvedAccountId,
|
|
169
|
+
patch: { dm: {
|
|
170
|
+
...currentDm,
|
|
171
|
+
policy,
|
|
172
|
+
...policy === "open" ? { allowFrom: addWildcardAllowFrom(currentDm?.allowFrom) } : {}
|
|
173
|
+
} }
|
|
174
|
+
});
|
|
175
|
+
},
|
|
266
176
|
promptAllowFrom: createPromptParsedAllowFromForAccount({
|
|
267
177
|
defaultAccountId: resolveDefaultGoogleChatAccountId,
|
|
268
178
|
message: t("wizard.googlechat.allowFromPrompt"),
|
|
@@ -271,15 +181,21 @@ const googlechatDmPolicy = createChannelDmPolicy({
|
|
|
271
181
|
getExistingAllowFrom: ({ cfg, accountId }) => resolveGoogleChatAccount({
|
|
272
182
|
cfg,
|
|
273
183
|
accountId
|
|
274
|
-
}).config.allowFrom ?? [],
|
|
184
|
+
}).config.dm?.allowFrom ?? [],
|
|
275
185
|
applyAllowFrom: ({ cfg, accountId, allowFrom }) => applySetupAccountConfigPatch({
|
|
276
186
|
cfg,
|
|
277
187
|
channelKey: channel,
|
|
278
188
|
accountId,
|
|
279
|
-
patch: {
|
|
189
|
+
patch: { dm: {
|
|
190
|
+
...resolveGoogleChatAccount({
|
|
191
|
+
cfg,
|
|
192
|
+
accountId
|
|
193
|
+
}).config.dm,
|
|
194
|
+
allowFrom
|
|
195
|
+
} }
|
|
280
196
|
})
|
|
281
197
|
})
|
|
282
|
-
}
|
|
198
|
+
};
|
|
283
199
|
function createServiceAccountTextInput(params) {
|
|
284
200
|
return {
|
|
285
201
|
inputKey: params.inputKey,
|
|
@@ -320,7 +236,7 @@ const googlechatSetupWizard = {
|
|
|
320
236
|
]
|
|
321
237
|
},
|
|
322
238
|
prepare: async ({ cfg, accountId, credentialValues, prompter }) => {
|
|
323
|
-
if (accountId === DEFAULT_ACCOUNT_ID$1 && Boolean(
|
|
239
|
+
if (accountId === DEFAULT_ACCOUNT_ID$1 && (Boolean(process.env[ENV_SERVICE_ACCOUNT]) || Boolean(process.env[ENV_SERVICE_ACCOUNT_FILE]))) {
|
|
324
240
|
if (await prompter.confirm({
|
|
325
241
|
message: t("wizard.googlechat.useEnvPrompt"),
|
|
326
242
|
initialValue: true
|
|
@@ -438,22 +354,18 @@ const googleChatConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
438
354
|
"botUser",
|
|
439
355
|
"name"
|
|
440
356
|
],
|
|
441
|
-
resolveAllowFrom: (account) => account.config.allowFrom,
|
|
357
|
+
resolveAllowFrom: (account) => account.config.dm?.allowFrom,
|
|
442
358
|
formatAllowFrom: (allowFrom) => formatNormalizedAllowFromEntries({
|
|
443
359
|
allowFrom,
|
|
444
360
|
normalizeEntry: formatGoogleChatAllowFromEntry
|
|
445
361
|
}),
|
|
446
362
|
resolveDefaultTo: (account) => account.config.defaultTo
|
|
447
363
|
});
|
|
448
|
-
function isGoogleChatAccountConfigured(account) {
|
|
449
|
-
return account.tokenStatus ? account.tokenStatus !== "missing" : account.credentialSource !== "none";
|
|
450
|
-
}
|
|
451
364
|
function createGoogleChatPluginBase(params = {}) {
|
|
452
365
|
return {
|
|
453
366
|
id: GOOGLECHAT_CHANNEL_ID,
|
|
454
367
|
meta: { ...googlechatMeta },
|
|
455
368
|
setup: googlechatSetupAdapter,
|
|
456
|
-
setupContract: googlechatSetupContract,
|
|
457
369
|
setupWizard: googlechatSetupWizard,
|
|
458
370
|
capabilities: {
|
|
459
371
|
chatTypes: [
|
|
@@ -461,6 +373,7 @@ function createGoogleChatPluginBase(params = {}) {
|
|
|
461
373
|
"group",
|
|
462
374
|
"thread"
|
|
463
375
|
],
|
|
376
|
+
reactions: true,
|
|
464
377
|
threads: true,
|
|
465
378
|
media: true,
|
|
466
379
|
nativeCommands: false,
|
|
@@ -474,18 +387,14 @@ function createGoogleChatPluginBase(params = {}) {
|
|
|
474
387
|
...params.configSchema ? { configSchema: params.configSchema } : {},
|
|
475
388
|
config: {
|
|
476
389
|
...googleChatConfigAdapter,
|
|
477
|
-
|
|
478
|
-
isConfigured: isGoogleChatAccountConfigured,
|
|
390
|
+
isConfigured: (account) => account.credentialSource !== "none",
|
|
479
391
|
describeAccount: (account) => describeAccountSnapshot({
|
|
480
392
|
account,
|
|
481
|
-
configured:
|
|
482
|
-
extra: {
|
|
483
|
-
credentialSource: account.credentialSource,
|
|
484
|
-
tokenStatus: account.tokenStatus
|
|
485
|
-
}
|
|
393
|
+
configured: account.credentialSource !== "none",
|
|
394
|
+
extra: { credentialSource: account.credentialSource }
|
|
486
395
|
})
|
|
487
396
|
}
|
|
488
397
|
};
|
|
489
398
|
}
|
|
490
399
|
//#endregion
|
|
491
|
-
export { googlechatSetupAdapter as a, resolveDefaultGoogleChatAccountId as c, googlechatSetupWizard as i, resolveGoogleChatAccount as l, createGoogleChatPluginBase as n,
|
|
400
|
+
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 };
|