@openclaw/googlechat 2026.7.2-beta.5 → 2026.8.1-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.
- package/dist/{actions-wnreW-IQ.js → actions-BIY4DNRJ.js} +4 -12
- package/dist/api.js +2 -2
- package/dist/{approval-auth-G-OFufNc.js → approval-auth-Bm8YFEkI.js} +2 -2
- package/dist/{approval-handler.runtime-BJXVLK9y.js → approval-handler.runtime-B-p-W-_V.js} +3 -3
- package/dist/{channel-CehfTiWZ.js → channel-DkSxE2Ch.js} +34 -22
- package/dist/{channel-base-CC85hRUC.js → channel-base-BpHXDsur.js} +38 -14
- package/dist/channel-plugin-api.js +1 -1
- package/dist/{channel.adapters-DLatFGZz.js → channel.adapters-DiI1p1ml.js} +47 -33
- package/dist/{channel.runtime-Bz0__ttC.js → channel.runtime-CqOzrZWb.js} +156 -136
- package/dist/directory-contract-api.js +1 -1
- package/dist/{doctor-contract-BpuSvJro.js → doctor-contract-BLvSmTXT.js} +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/setup-plugin-api.js +1 -1
- package/node_modules/google-auth-library/build/src/auth/googleauth.js +24 -19
- package/node_modules/google-auth-library/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/node_modules/google-auth-library/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -0
- package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/package.json +1 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.d.ts +1 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.js +81 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.js.map +1 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.d.ts +2 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.js +31 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.js.map +1 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.d.ts +89 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.js +414 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.js.map +1 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/temporal.js +68 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/temporal.js.map +1 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/types.d.ts +78 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/types.js +16 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/types.js.map +1 -0
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/package.json +47 -0
- package/node_modules/google-auth-library/node_modules/google-logging-utils/LICENSE +202 -0
- package/node_modules/google-auth-library/node_modules/google-logging-utils/README.md +73 -0
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/temporal.d.ts +45 -0
- package/node_modules/google-auth-library/package.json +1 -1
- package/openclaw.plugin.json +49 -0
- package/package.json +12 -7
- package/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +0 -1
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/LICENSE +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/README.md +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/dist/helpers.d.ts +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/dist/helpers.d.ts.map +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/dist/helpers.js +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/dist/helpers.js.map +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/dist/index.d.ts +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/dist/index.d.ts.map +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/dist/index.js +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/dist/index.js.map +0 -0
- /package/node_modules/{agent-base → google-auth-library/node_modules/agent-base}/package.json +0 -0
- /package/node_modules/{base64-js → google-auth-library/node_modules/base64-js}/LICENSE +0 -0
- /package/node_modules/{base64-js → google-auth-library/node_modules/base64-js}/README.md +0 -0
- /package/node_modules/{base64-js → google-auth-library/node_modules/base64-js}/base64js.min.js +0 -0
- /package/node_modules/{base64-js → google-auth-library/node_modules/base64-js}/index.d.ts +0 -0
- /package/node_modules/{base64-js → google-auth-library/node_modules/base64-js}/index.js +0 -0
- /package/node_modules/{base64-js → google-auth-library/node_modules/base64-js}/package.json +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/CHANGELOG.md +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/LICENCE.md +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/README.md +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/bignumber.d.mts +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/bignumber.d.ts +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/bignumber.js +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/bignumber.mjs +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/doc/API.html +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/package.json +0 -0
- /package/node_modules/{bignumber.js → google-auth-library/node_modules/bignumber.js}/types.d.ts +0 -0
- /package/node_modules/{buffer-equal-constant-time → google-auth-library/node_modules/buffer-equal-constant-time}/.npmignore +0 -0
- /package/node_modules/{buffer-equal-constant-time → google-auth-library/node_modules/buffer-equal-constant-time}/.travis.yml +0 -0
- /package/node_modules/{buffer-equal-constant-time → google-auth-library/node_modules/buffer-equal-constant-time}/LICENSE.txt +0 -0
- /package/node_modules/{buffer-equal-constant-time → google-auth-library/node_modules/buffer-equal-constant-time}/README.md +0 -0
- /package/node_modules/{buffer-equal-constant-time → google-auth-library/node_modules/buffer-equal-constant-time}/index.js +0 -0
- /package/node_modules/{buffer-equal-constant-time → google-auth-library/node_modules/buffer-equal-constant-time}/package.json +0 -0
- /package/node_modules/{buffer-equal-constant-time → google-auth-library/node_modules/buffer-equal-constant-time}/test.js +0 -0
- /package/node_modules/{data-uri-to-buffer → google-auth-library/node_modules/data-uri-to-buffer}/README.md +0 -0
- /package/node_modules/{data-uri-to-buffer → google-auth-library/node_modules/data-uri-to-buffer}/dist/index.d.ts +0 -0
- /package/node_modules/{data-uri-to-buffer → google-auth-library/node_modules/data-uri-to-buffer}/dist/index.js +0 -0
- /package/node_modules/{data-uri-to-buffer → google-auth-library/node_modules/data-uri-to-buffer}/dist/index.js.map +0 -0
- /package/node_modules/{data-uri-to-buffer → google-auth-library/node_modules/data-uri-to-buffer}/package.json +0 -0
- /package/node_modules/{data-uri-to-buffer → google-auth-library/node_modules/data-uri-to-buffer}/src/index.ts +0 -0
- /package/node_modules/{debug → google-auth-library/node_modules/debug}/LICENSE +0 -0
- /package/node_modules/{debug → google-auth-library/node_modules/debug}/README.md +0 -0
- /package/node_modules/{debug → google-auth-library/node_modules/debug}/package.json +0 -0
- /package/node_modules/{debug → google-auth-library/node_modules/debug}/src/browser.js +0 -0
- /package/node_modules/{debug → google-auth-library/node_modules/debug}/src/common.js +0 -0
- /package/node_modules/{debug → google-auth-library/node_modules/debug}/src/index.js +0 -0
- /package/node_modules/{debug → google-auth-library/node_modules/debug}/src/node.js +0 -0
- /package/node_modules/{ecdsa-sig-formatter → google-auth-library/node_modules/ecdsa-sig-formatter}/CODEOWNERS +0 -0
- /package/node_modules/{ecdsa-sig-formatter → google-auth-library/node_modules/ecdsa-sig-formatter}/LICENSE +0 -0
- /package/node_modules/{ecdsa-sig-formatter → google-auth-library/node_modules/ecdsa-sig-formatter}/README.md +0 -0
- /package/node_modules/{ecdsa-sig-formatter → google-auth-library/node_modules/ecdsa-sig-formatter}/package.json +0 -0
- /package/node_modules/{ecdsa-sig-formatter → google-auth-library/node_modules/ecdsa-sig-formatter}/src/ecdsa-sig-formatter.d.ts +0 -0
- /package/node_modules/{ecdsa-sig-formatter → google-auth-library/node_modules/ecdsa-sig-formatter}/src/ecdsa-sig-formatter.js +0 -0
- /package/node_modules/{ecdsa-sig-formatter → google-auth-library/node_modules/ecdsa-sig-formatter}/src/param-bytes-for-alg.js +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/.editorconfig +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/.eslintrc +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/.jscs.json +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/.travis.yml +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/CHANGELOG.md +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/LICENSE +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/README.md +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/component.json +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/index.js +0 -0
- /package/node_modules/{extend → google-auth-library/node_modules/extend}/package.json +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/LICENSE +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/README.md +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/file.d.ts +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/file.js +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/from.d.ts +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/from.js +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/index.d.ts +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/index.js +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/package.json +0 -0
- /package/node_modules/{fetch-blob → google-auth-library/node_modules/fetch-blob}/streams.cjs +0 -0
- /package/node_modules/{formdata-polyfill → google-auth-library/node_modules/formdata-polyfill}/FormData.js +0 -0
- /package/node_modules/{formdata-polyfill → google-auth-library/node_modules/formdata-polyfill}/LICENSE +0 -0
- /package/node_modules/{formdata-polyfill → google-auth-library/node_modules/formdata-polyfill}/README.md +0 -0
- /package/node_modules/{formdata-polyfill → google-auth-library/node_modules/formdata-polyfill}/esm.min.d.ts +0 -0
- /package/node_modules/{formdata-polyfill → google-auth-library/node_modules/formdata-polyfill}/esm.min.js +0 -0
- /package/node_modules/{formdata-polyfill → google-auth-library/node_modules/formdata-polyfill}/formdata-to-blob.js +0 -0
- /package/node_modules/{formdata-polyfill → google-auth-library/node_modules/formdata-polyfill}/formdata.min.js +0 -0
- /package/node_modules/{formdata-polyfill → google-auth-library/node_modules/formdata-polyfill}/package.json +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/LICENSE +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/README.md +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/browser-test/browser-test-runner.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/browser-test/browser-test-runner.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/browser-test/browser-test-runner.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/browser-test/test.browser.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/browser-test/test.browser.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/browser-test/test.browser.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/common.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/common.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/common.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/gaxios.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/gaxios.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/gaxios.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/index.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/index.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/index.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/interceptor.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/interceptor.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/interceptor.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/retry.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/retry.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/retry.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/util.cjs +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/util.cjs.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/src/util.d.cts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/system-test/test.install.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/system-test/test.install.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/system-test/test.install.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.getch.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.getch.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.getch.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.index.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.index.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.index.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.retry.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.retry.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/cjs/test/test.retry.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/browser-test/browser-test-runner.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/browser-test/browser-test-runner.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/browser-test/browser-test-runner.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/browser-test/test.browser.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/browser-test/test.browser.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/browser-test/test.browser.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/package.json +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/common.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/common.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/common.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/gaxios.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/gaxios.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/gaxios.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/index.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/index.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/index.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/interceptor.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/interceptor.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/interceptor.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/retry.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/retry.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/retry.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/util.cjs +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/util.cjs.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/src/util.d.cts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/system-test/test.install.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/system-test/test.install.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/system-test/test.install.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.getch.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.getch.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.getch.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.index.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.index.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.index.js.map +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.retry.d.ts +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.retry.js +0 -0
- /package/node_modules/{gaxios → google-auth-library/node_modules/gaxios}/build/esm/test/test.retry.js.map +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/LICENSE +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/README.md +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/build/src/gcp-residency.d.ts +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/build/src/gcp-residency.js +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/build/src/gcp-residency.js.map +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/build/src/index.d.ts +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/build/src/index.js +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/build/src/index.js.map +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils}/LICENSE +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils}/README.md +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils}/build/src/temporal.d.ts +0 -0
- /package/node_modules/{gcp-metadata → google-auth-library/node_modules/gcp-metadata}/package.json +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/colours.d.ts +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/colours.js +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/colours.js.map +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/index.d.ts +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/index.js +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/index.js.map +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/logging-utils.d.ts +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/logging-utils.js +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/logging-utils.js.map +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/temporal.js +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/build/src/temporal.js.map +0 -0
- /package/node_modules/{google-logging-utils → google-auth-library/node_modules/google-logging-utils}/package.json +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/LICENSE +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/README.md +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/dist/index.d.ts +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/dist/index.d.ts.map +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/dist/index.js +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/dist/index.js.map +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/dist/parse-proxy-response.d.ts +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/dist/parse-proxy-response.d.ts.map +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/dist/parse-proxy-response.js +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/dist/parse-proxy-response.js.map +0 -0
- /package/node_modules/{https-proxy-agent → google-auth-library/node_modules/https-proxy-agent}/package.json +0 -0
- /package/node_modules/{json-bigint → google-auth-library/node_modules/json-bigint}/LICENSE +0 -0
- /package/node_modules/{json-bigint → google-auth-library/node_modules/json-bigint}/README.md +0 -0
- /package/node_modules/{json-bigint → google-auth-library/node_modules/json-bigint}/index.js +0 -0
- /package/node_modules/{json-bigint → google-auth-library/node_modules/json-bigint}/lib/parse.js +0 -0
- /package/node_modules/{json-bigint → google-auth-library/node_modules/json-bigint}/lib/stringify.js +0 -0
- /package/node_modules/{json-bigint → google-auth-library/node_modules/json-bigint}/package.json +0 -0
- /package/node_modules/{jwa → google-auth-library/node_modules/jwa}/LICENSE +0 -0
- /package/node_modules/{jwa → google-auth-library/node_modules/jwa}/README.md +0 -0
- /package/node_modules/{jwa → google-auth-library/node_modules/jwa}/index.js +0 -0
- /package/node_modules/{jwa → google-auth-library/node_modules/jwa}/opslevel.yml +0 -0
- /package/node_modules/{jwa → google-auth-library/node_modules/jwa}/package.json +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/CHANGELOG.md +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/LICENSE +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/index.js +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/lib/data-stream.js +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/lib/sign-stream.js +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/lib/tostring.js +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/lib/verify-stream.js +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/opslevel.yml +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/package.json +0 -0
- /package/node_modules/{jws → google-auth-library/node_modules/jws}/readme.md +0 -0
- /package/node_modules/{ms → google-auth-library/node_modules/ms}/index.js +0 -0
- /package/node_modules/{ms → google-auth-library/node_modules/ms}/license.md +0 -0
- /package/node_modules/{ms → google-auth-library/node_modules/ms}/package.json +0 -0
- /package/node_modules/{ms → google-auth-library/node_modules/ms}/readme.md +0 -0
- /package/node_modules/{node-domexception → google-auth-library/node_modules/node-domexception}/LICENSE +0 -0
- /package/node_modules/{node-domexception → google-auth-library/node_modules/node-domexception}/index.js +0 -0
- /package/node_modules/{node-domexception → google-auth-library/node_modules/node-domexception}/package.json +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/@types/index.d.ts +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/LICENSE.md +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/README.md +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/package.json +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/body.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/errors/abort-error.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/errors/base.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/errors/fetch-error.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/headers.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/index.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/request.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/response.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/utils/get-search.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/utils/is-redirect.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/utils/is.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/utils/multipart-parser.js +0 -0
- /package/node_modules/{node-fetch → google-auth-library/node_modules/node-fetch}/src/utils/referrer.js +0 -0
- /package/node_modules/{safe-buffer → google-auth-library/node_modules/safe-buffer}/LICENSE +0 -0
- /package/node_modules/{safe-buffer → google-auth-library/node_modules/safe-buffer}/README.md +0 -0
- /package/node_modules/{safe-buffer → google-auth-library/node_modules/safe-buffer}/index.d.ts +0 -0
- /package/node_modules/{safe-buffer → google-auth-library/node_modules/safe-buffer}/index.js +0 -0
- /package/node_modules/{safe-buffer → google-auth-library/node_modules/safe-buffer}/package.json +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/LICENSE +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/README.md +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es2018.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es2018.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es2018.min.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es2018.min.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es2018.mjs +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es2018.mjs.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es6.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es6.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es6.min.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es6.min.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es6.mjs +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.es6.mjs.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.min.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.min.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.mjs +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/polyfill.mjs.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.es2018.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.es2018.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.es2018.mjs +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.es2018.mjs.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.es6.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.es6.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.es6.mjs +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.es6.mjs.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.js +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.js.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.mjs +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/ponyfill.mjs.map +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/types/polyfill.d.ts +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/types/ponyfill.d.ts +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/types/ts3.6/polyfill.d.ts +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/types/ts3.6/ponyfill.d.ts +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/dist/types/tsdoc-metadata.json +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/es2018/package.json +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/es6/package.json +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/package.json +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/ponyfill/es2018/package.json +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/ponyfill/es6/package.json +0 -0
- /package/node_modules/{web-streams-polyfill → google-auth-library/node_modules/web-streams-polyfill}/ponyfill/package.json +0 -0
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as getGoogleChatApprovalCardBinding, O as readGoogleChatApprovalActionToken, T as completeGoogleChatApprovalCardBinding, _ as downloadGoogleChatMedia, b as updateGoogleChatMessage, c as buildGoogleChatGroupPolicyScope, g as deleteGoogleChatMessage, h as GoogleChatApiError, j as releaseGoogleChatApprovalCardBinding, l as isGoogleChatGroupSpace, v as probeGoogleChat, w as claimGoogleChatApprovalCardBinding, x as verifyGoogleChatRequest, y as sendGoogleChatMessage } from "./channel.adapters-DiI1p1ml.js";
|
|
2
2
|
import { C as resolveWebhookPath, E as warnMissingProviderGroupPolicyFallbackOnce, O as getGoogleChatRuntime, b as resolveAllowlistProviderRuntimeGroupPolicy, c as createChannelPairingController, f as isDangerousNameMatchingEnabled, n as GROUP_POLICY_BLOCKED_LABEL, x as resolveDefaultGroupPolicy } from "./runtime-api-Dh0CNVS4.js";
|
|
3
|
-
import { n as googleChatApprovalAuth } from "./approval-auth-
|
|
3
|
+
import { n as googleChatApprovalAuth } from "./approval-auth-Bm8YFEkI.js";
|
|
4
4
|
import { normalizeLowercaseStringOrEmpty, normalizeOptionalLowercaseString, normalizeOptionalString, normalizeStringEntries } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
5
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
6
6
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
7
|
-
import { collectErrorGraphCandidates, formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { PlatformMessageNotDispatchedError, collectErrorGraphCandidates, formatErrorMessage, isApprovalNotFoundError } from "openclaw/plugin-sdk/error-runtime";
|
|
8
|
+
import { MediaFetchError } from "openclaw/plugin-sdk/media-runtime";
|
|
9
|
+
import { createChannelIngressError } from "openclaw/plugin-sdk/channel-outbound";
|
|
10
|
+
import { createChannelPartialDeliveryError, formatInboundMediaUnavailableText, recordChannelBotPairLoopAndCheckSuppression, resolveChannelInboundRouteEnvelope, toInboundMediaFactsWithMetadata } from "openclaw/plugin-sdk/channel-inbound";
|
|
11
|
+
import { WEBHOOK_RATE_LIMIT_DEFAULTS, canonicalizeWebhookRouteKey, createFixedWindowRateLimiter, resolveRequestClientIp } from "openclaw/plugin-sdk/webhook-ingress";
|
|
11
12
|
import { registerWebhookTargetWithPluginRoute, resolveWebhookTargetWithAuthOrReject, withResolvedWebhookRequestPipeline } from "openclaw/plugin-sdk/webhook-targets";
|
|
12
13
|
import { createWebhookInFlightLimiter, readJsonWebhookBodyOrReject, runDetachedWebhookWork } from "openclaw/plugin-sdk/webhook-request-guards";
|
|
14
|
+
import { channelBlockedPatch, channelReadyPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
15
|
+
import { isRecord } from "openclaw/plugin-sdk/channel-secret-basic-runtime";
|
|
13
16
|
import { resolveApprovalOverGateway } from "openclaw/plugin-sdk/approval-gateway-runtime";
|
|
14
|
-
import { channelIngressRoutes, createChannelIngressResolver, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
17
|
+
import { channelIngressRoutes, createChannelIngressResolver, createStandardRawEventIngressMonitor, defineStableChannelIngressIdentity } from "openclaw/plugin-sdk/channel-ingress-runtime";
|
|
15
18
|
import { resolveSendableOutboundReplyParts } from "openclaw/plugin-sdk/reply-payload";
|
|
19
|
+
import { parseDateStringTimestampMs } from "openclaw/plugin-sdk/number-runtime";
|
|
16
20
|
//#region extensions/googlechat/src/approval-terminal-card.ts
|
|
17
21
|
const GOOGLECHAT_APPROVAL_CARD_ID = "openclaw-approval";
|
|
18
22
|
const MAX_TEXT_PARAGRAPH_CHARS = 1800;
|
|
@@ -127,8 +131,9 @@ async function maybeHandleGoogleChatApprovalCardClick(params) {
|
|
|
127
131
|
approvalId: consumed.approvalId,
|
|
128
132
|
approvalKind: consumed.approvalKind,
|
|
129
133
|
decision: consumed.decision,
|
|
130
|
-
|
|
131
|
-
|
|
134
|
+
channel: "googlechat",
|
|
135
|
+
accountId: params.target.account.accountId,
|
|
136
|
+
senderId: actor
|
|
132
137
|
});
|
|
133
138
|
await updateGoogleChatMessage({
|
|
134
139
|
account: params.target.account,
|
|
@@ -136,6 +141,11 @@ async function maybeHandleGoogleChatApprovalCardClick(params) {
|
|
|
136
141
|
cardsV2: buildGoogleChatCanonicalApprovalTerminalCards(result)
|
|
137
142
|
});
|
|
138
143
|
} catch (error) {
|
|
144
|
+
if (isApprovalNotFoundError(error)) {
|
|
145
|
+
completeGoogleChatApprovalCardBinding(token);
|
|
146
|
+
logIgnored(params.target, `approval expired or no longer exists id=${consumed.approvalId}`);
|
|
147
|
+
return true;
|
|
148
|
+
}
|
|
139
149
|
releaseGoogleChatApprovalCardBinding(token);
|
|
140
150
|
throw error;
|
|
141
151
|
}
|
|
@@ -331,6 +341,7 @@ async function applyGoogleChatInboundAccessPolicy(params) {
|
|
|
331
341
|
kind: isGroup ? "group" : "direct",
|
|
332
342
|
id: spaceId
|
|
333
343
|
},
|
|
344
|
+
contextBinding: params.contextBinding,
|
|
334
345
|
route,
|
|
335
346
|
allowFrom: rawConfigAllowFrom,
|
|
336
347
|
groupAllowFrom,
|
|
@@ -423,6 +434,7 @@ async function applyGoogleChatInboundAccessPolicy(params) {
|
|
|
423
434
|
}
|
|
424
435
|
return {
|
|
425
436
|
ok: true,
|
|
437
|
+
channelIngress: resolvedAccess,
|
|
426
438
|
commandAuthorized,
|
|
427
439
|
effectiveWasMentioned,
|
|
428
440
|
groupBotLoopProtection: groupEntry?.botLoopProtection,
|
|
@@ -452,9 +464,6 @@ var GoogleChatEventPayloadError = class extends Error {
|
|
|
452
464
|
this.name = "GoogleChatEventPayloadError";
|
|
453
465
|
}
|
|
454
466
|
};
|
|
455
|
-
function isRecord$2(value) {
|
|
456
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
457
|
-
}
|
|
458
467
|
function recordParamsToActionParameters(params) {
|
|
459
468
|
if (!params) return;
|
|
460
469
|
const entries = Object.entries(params).filter((entry) => typeof entry[1] === "string").map(([key, value]) => ({
|
|
@@ -465,7 +474,7 @@ function recordParamsToActionParameters(params) {
|
|
|
465
474
|
}
|
|
466
475
|
/** Normalize only at authenticated dispatch; durable admission stores the untouched envelope. */
|
|
467
476
|
function parseGoogleChatInboundPayload(raw) {
|
|
468
|
-
if (!isRecord
|
|
477
|
+
if (!isRecord(raw)) throw new GoogleChatEventPayloadError();
|
|
469
478
|
let eventPayload = raw;
|
|
470
479
|
let addOnBearerToken = "";
|
|
471
480
|
const rawObj = raw;
|
|
@@ -504,10 +513,10 @@ function parseGoogleChatInboundPayload(raw) {
|
|
|
504
513
|
}
|
|
505
514
|
const event = eventPayload;
|
|
506
515
|
const eventType = event.type ?? event.eventType;
|
|
507
|
-
if (typeof eventType !== "string" || !isRecord
|
|
516
|
+
if (typeof eventType !== "string" || !isRecord(event.space)) throw new GoogleChatEventPayloadError();
|
|
508
517
|
if (eventType === "MESSAGE") {
|
|
509
|
-
if (!isRecord
|
|
510
|
-
} else if (eventType === "CARD_CLICKED" && !isRecord
|
|
518
|
+
if (!isRecord(event.message) || !event.space?.name?.trim() || !event.message?.name?.trim()) throw new GoogleChatEventPayloadError();
|
|
519
|
+
} else if (eventType === "CARD_CLICKED" && !isRecord(event.user)) throw new GoogleChatEventPayloadError();
|
|
511
520
|
return {
|
|
512
521
|
event,
|
|
513
522
|
addOnBearerToken
|
|
@@ -515,42 +524,25 @@ function parseGoogleChatInboundPayload(raw) {
|
|
|
515
524
|
}
|
|
516
525
|
//#endregion
|
|
517
526
|
//#region extensions/googlechat/src/monitor-ingress.ts
|
|
518
|
-
const
|
|
519
|
-
const GOOGLECHAT_INGRESS_POLL_INTERVAL_MS = 500;
|
|
520
|
-
const GOOGLECHAT_INGRESS_PRUNE_INTERVAL_MS = 3600 * 1e3;
|
|
521
|
-
const GOOGLECHAT_INGRESS_MAX_CONCURRENT_DELIVERIES = 8;
|
|
522
|
-
const GOOGLECHAT_INGRESS_COMPLETED_TTL_MS = 720 * 60 * 60 * 1e3;
|
|
523
|
-
const GOOGLECHAT_INGRESS_COMPLETED_MAX_ENTRIES = 2e4;
|
|
524
|
-
const GOOGLECHAT_INGRESS_FAILED_TTL_MS = 720 * 60 * 60 * 1e3;
|
|
525
|
-
const GOOGLECHAT_INGRESS_FAILED_MAX_ENTRIES = 2e4;
|
|
526
|
-
var GoogleChatIngressPermanentError = class extends Error {
|
|
527
|
-
constructor(reason, message, options) {
|
|
528
|
-
super(message, options);
|
|
529
|
-
this.reason = reason;
|
|
530
|
-
this.name = "GoogleChatIngressPermanentError";
|
|
531
|
-
}
|
|
532
|
-
};
|
|
533
|
-
function isRecord$1(value) {
|
|
534
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
535
|
-
}
|
|
527
|
+
const GoogleChatIngressPermanentError = createChannelIngressError("GoogleChatIngressPermanentError", { withReason: true });
|
|
536
528
|
function requiredString(value, field) {
|
|
537
529
|
if (typeof value === "string" && value.trim()) return value.trim();
|
|
538
530
|
throw new GoogleChatIngressPermanentError("invalid-event", `Google Chat MESSAGE event is missing ${field}.`);
|
|
539
531
|
}
|
|
540
532
|
function inspectGoogleChatIngressEvent(raw) {
|
|
541
|
-
if (!isRecord
|
|
542
|
-
const commonEventObject = isRecord
|
|
543
|
-
const chat = isRecord
|
|
533
|
+
if (!isRecord(raw)) throw new GoogleChatIngressPermanentError("invalid-event", "Google Chat webhook envelope must be an object.");
|
|
534
|
+
const commonEventObject = isRecord(raw.commonEventObject) ? raw.commonEventObject : null;
|
|
535
|
+
const chat = isRecord(raw.chat) ? raw.chat : null;
|
|
544
536
|
const isAddOn = commonEventObject?.hostApp === "CHAT";
|
|
545
537
|
let eventType = raw.type ?? raw.eventType;
|
|
546
|
-
let space = isRecord
|
|
547
|
-
let message = isRecord
|
|
538
|
+
let space = isRecord(raw.space) ? raw.space : null;
|
|
539
|
+
let message = isRecord(raw.message) ? raw.message : null;
|
|
548
540
|
if (isAddOn) {
|
|
549
|
-
const messagePayload = isRecord
|
|
541
|
+
const messagePayload = isRecord(chat?.messagePayload) ? chat.messagePayload : null;
|
|
550
542
|
if (!messagePayload) return null;
|
|
551
543
|
eventType = "MESSAGE";
|
|
552
|
-
space = isRecord
|
|
553
|
-
message = isRecord
|
|
544
|
+
space = isRecord(messagePayload.space) ? messagePayload.space : null;
|
|
545
|
+
message = isRecord(messagePayload.message) ? messagePayload.message : null;
|
|
554
546
|
}
|
|
555
547
|
if (eventType !== "MESSAGE") return null;
|
|
556
548
|
const spaceName = requiredString(space?.name, "space.name");
|
|
@@ -593,76 +585,67 @@ function resolveGoogleChatIngressNonRetryableFailure(error) {
|
|
|
593
585
|
}
|
|
594
586
|
function createGoogleChatIngressMonitor(options) {
|
|
595
587
|
const serializeForIngress = (rawEvent) => {
|
|
596
|
-
if (!isRecord
|
|
588
|
+
if (!isRecord(rawEvent)) throw new GoogleChatIngressPermanentError("invalid-event", "Google Chat webhook envelope must be an object.");
|
|
597
589
|
const durableEvent = { ...rawEvent };
|
|
598
590
|
delete durableEvent.authorizationEventObject;
|
|
599
591
|
const serialized = JSON.stringify(durableEvent);
|
|
600
592
|
if (typeof serialized !== "string") throw new GoogleChatIngressPermanentError("invalid-event", "Google Chat webhook envelope cannot be serialized.");
|
|
601
593
|
return serialized;
|
|
602
594
|
};
|
|
603
|
-
|
|
595
|
+
return createStandardRawEventIngressMonitor({
|
|
604
596
|
queue: options.queue ?? (() => getGoogleChatRuntime().state.openChannelIngressQueue({ accountId: options.accountId })),
|
|
605
597
|
inspect: (rawEvent) => inspectGoogleChatIngressEvent(rawEvent),
|
|
606
598
|
payload: {
|
|
607
|
-
storage: "raw-event",
|
|
608
|
-
version: GOOGLECHAT_INGRESS_PAYLOAD_VERSION,
|
|
609
599
|
serialize: serializeForIngress,
|
|
610
600
|
deserialize: (rawEvent, { claim }) => deserializeGoogleChatIngressEvent(rawEvent, claim.id),
|
|
611
601
|
createClaimError: (kind, claim) => new GoogleChatIngressPermanentError("invalid-event", kind === "invalid-version" ? `Google Chat ingress row ${claim.id} has an invalid payload.` : `Google Chat ingress row ${claim.id} has invalid message identity.`)
|
|
612
602
|
},
|
|
613
603
|
deliver: (rawEvent, lifecycle, claim) => options.dispatch(normalizeClaimedGoogleChatEvent(rawEvent, claim.id), lifecycle),
|
|
614
|
-
pollIntervalMs: options.pollIntervalMs
|
|
615
|
-
retention: {
|
|
616
|
-
pruneIntervalMs: GOOGLECHAT_INGRESS_PRUNE_INTERVAL_MS,
|
|
617
|
-
completedTtlMs: GOOGLECHAT_INGRESS_COMPLETED_TTL_MS,
|
|
618
|
-
completedMaxEntries: GOOGLECHAT_INGRESS_COMPLETED_MAX_ENTRIES,
|
|
619
|
-
failedTtlMs: GOOGLECHAT_INGRESS_FAILED_TTL_MS,
|
|
620
|
-
failedMaxEntries: GOOGLECHAT_INGRESS_FAILED_MAX_ENTRIES
|
|
621
|
-
},
|
|
604
|
+
pollIntervalMs: options.pollIntervalMs,
|
|
622
605
|
drain: {
|
|
623
606
|
resolveNonRetryableFailure: resolveGoogleChatIngressNonRetryableFailure,
|
|
624
|
-
startLimit: GOOGLECHAT_INGRESS_MAX_CONCURRENT_DELIVERIES,
|
|
625
607
|
...options.adoptionStallTimeoutMs === void 0 ? {} : { adoptionStallTimeoutMs: options.adoptionStallTimeoutMs },
|
|
626
608
|
onLog: (message) => options.runtime.error?.(`googlechat: ${message}`)
|
|
627
609
|
},
|
|
628
610
|
...options.abortSignal ? { abortSignal: options.abortSignal } : {},
|
|
629
|
-
admissionMode: "while-running",
|
|
630
611
|
createStoppedError: () => /* @__PURE__ */ new Error("Google Chat ingress is stopped."),
|
|
631
|
-
onError: (error) => options.runtime.error?.(`googlechat ingress drain failed: ${formatErrorMessage(error)}`)
|
|
612
|
+
onError: (error) => options.runtime.error?.(`googlechat ingress drain failed: ${formatErrorMessage(error)}`),
|
|
613
|
+
classifyAdmissionError: (error) => error instanceof GoogleChatIngressPermanentError ? error.message : void 0
|
|
632
614
|
});
|
|
633
|
-
return {
|
|
634
|
-
receive: async (rawEvent) => {
|
|
635
|
-
if (!monitor.isRunning()) throw new Error("Google Chat ingress is stopped.");
|
|
636
|
-
let facts;
|
|
637
|
-
try {
|
|
638
|
-
facts = inspectGoogleChatIngressEvent(rawEvent);
|
|
639
|
-
} catch (error) {
|
|
640
|
-
if (error instanceof GoogleChatIngressPermanentError) return {
|
|
641
|
-
kind: "invalid",
|
|
642
|
-
message: error.message
|
|
643
|
-
};
|
|
644
|
-
throw error;
|
|
645
|
-
}
|
|
646
|
-
if (!facts) return { kind: "ignored" };
|
|
647
|
-
await monitor.admit(rawEvent, { facts });
|
|
648
|
-
return { kind: "durable" };
|
|
649
|
-
},
|
|
650
|
-
start: monitor.start,
|
|
651
|
-
stop: monitor.stop,
|
|
652
|
-
waitForIdle: monitor.waitForIdle
|
|
653
|
-
};
|
|
654
615
|
}
|
|
655
616
|
//#endregion
|
|
656
617
|
//#region extensions/googlechat/src/monitor-reply-delivery.ts
|
|
618
|
+
function createGoogleChatTypingMessage(params) {
|
|
619
|
+
const name = params.messageName.trim();
|
|
620
|
+
const requestedThreadName = params.requestedThreadName?.trim();
|
|
621
|
+
if (!requestedThreadName) return {
|
|
622
|
+
placement: "top-level",
|
|
623
|
+
name
|
|
624
|
+
};
|
|
625
|
+
return {
|
|
626
|
+
placement: "thread",
|
|
627
|
+
name,
|
|
628
|
+
requestedThreadName,
|
|
629
|
+
deliveredThreadName: params.deliveredThreadName?.trim() || requestedThreadName
|
|
630
|
+
};
|
|
631
|
+
}
|
|
657
632
|
async function deliverGoogleChatReply(params) {
|
|
658
633
|
const { payload, account, spaceId, runtime, core, config, statusSink } = params;
|
|
659
634
|
let typingMessage = params.typingMessage;
|
|
660
635
|
const replyThreadName = payload.replyToId?.trim() || void 0;
|
|
661
|
-
const typingMessageThreadName = typingMessage?.thread?.trim() || void 0;
|
|
662
636
|
const reply = resolveSendableOutboundReplyParts(payload);
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
637
|
+
let deliveryThreadName = replyThreadName;
|
|
638
|
+
const acceptedText = [];
|
|
639
|
+
const runTextOperation = async (operation) => await operation.catch((error) => {
|
|
640
|
+
if (acceptedText.length === 0) throw error;
|
|
641
|
+
throw createChannelPartialDeliveryError(error, {
|
|
642
|
+
messageIds: acceptedText.flatMap(({ id }) => id ? [id] : []),
|
|
643
|
+
content: acceptedText.map(({ text }) => text).join("\n"),
|
|
644
|
+
visibleReplySent: true
|
|
645
|
+
});
|
|
646
|
+
});
|
|
647
|
+
const typingMatchesReply = typingMessage?.placement === "thread" ? typingMessage.requestedThreadName === replyThreadName : typingMessage?.placement === "top-level" ? replyThreadName === void 0 : false;
|
|
648
|
+
if (typingMessage && !typingMatchesReply) {
|
|
666
649
|
try {
|
|
667
650
|
await deleteGoogleChatMessage({
|
|
668
651
|
account,
|
|
@@ -672,7 +655,7 @@ async function deliverGoogleChatReply(params) {
|
|
|
672
655
|
runtime.error?.(`Google Chat typing cleanup failed: ${String(err)}`);
|
|
673
656
|
}
|
|
674
657
|
typingMessage = void 0;
|
|
675
|
-
}
|
|
658
|
+
} else if (typingMessage?.placement === "thread") deliveryThreadName = typingMessage.deliveredThreadName;
|
|
676
659
|
if (reply.hasMedia) runtime.error?.("Google Chat outbound attachments require user OAuth and are not supported by this service-account channel; sending text fallback only.");
|
|
677
660
|
if (reply.hasMedia && !reply.hasText) {
|
|
678
661
|
try {
|
|
@@ -683,44 +666,58 @@ async function deliverGoogleChatReply(params) {
|
|
|
683
666
|
} catch (err) {
|
|
684
667
|
runtime.error?.(`Google Chat typing cleanup failed: ${String(err)}`);
|
|
685
668
|
}
|
|
686
|
-
throw new
|
|
669
|
+
throw new PlatformMessageNotDispatchedError("Google Chat outbound attachments require user OAuth and no text fallback is available.", {
|
|
670
|
+
cause: void 0,
|
|
671
|
+
retryable: false
|
|
672
|
+
});
|
|
687
673
|
}
|
|
688
674
|
const chunkLimit = account.config.textChunkLimit ?? 4e3;
|
|
689
675
|
const chunkMode = core.channel.text.resolveChunkMode(config, "googlechat", account.accountId);
|
|
676
|
+
const recordOutboundStatus = () => {
|
|
677
|
+
try {
|
|
678
|
+
statusSink?.({ lastOutboundAt: Date.now() });
|
|
679
|
+
} catch (err) {
|
|
680
|
+
runtime.error?.(`Google Chat outbound status update failed: ${String(err)}`);
|
|
681
|
+
}
|
|
682
|
+
};
|
|
690
683
|
const sendTextMessage = async (chunk) => {
|
|
691
|
-
await sendGoogleChatMessage({
|
|
684
|
+
const sent = await runTextOperation(sendGoogleChatMessage({
|
|
692
685
|
account,
|
|
693
686
|
space: spaceId,
|
|
694
687
|
text: chunk,
|
|
695
|
-
thread:
|
|
688
|
+
thread: deliveryThreadName
|
|
689
|
+
}));
|
|
690
|
+
if (sent) acceptedText.push({
|
|
691
|
+
id: sent.messageName?.trim() || void 0,
|
|
692
|
+
text: chunk
|
|
696
693
|
});
|
|
694
|
+
if (replyThreadName) deliveryThreadName = sent?.threadName?.trim() || deliveryThreadName;
|
|
697
695
|
};
|
|
698
|
-
const chunks = core.channel.text.chunkMarkdownTextWithMode(text, chunkLimit, chunkMode);
|
|
696
|
+
const chunks = core.channel.text.chunkMarkdownTextWithMode(reply.text, chunkLimit, chunkMode);
|
|
699
697
|
for (const chunk of chunks) {
|
|
700
698
|
if (!chunk) continue;
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
statusSink?.({ lastOutboundAt: Date.now() });
|
|
717
|
-
} catch (fallbackErr) {
|
|
718
|
-
runtime.error?.(`Google Chat message fallback send failed: ${String(fallbackErr)}`);
|
|
719
|
-
} finally {
|
|
720
|
-
firstTextChunk = false;
|
|
721
|
-
}
|
|
699
|
+
if (typingMessage) {
|
|
700
|
+
try {
|
|
701
|
+
const updated = await updateGoogleChatMessage({
|
|
702
|
+
account,
|
|
703
|
+
messageName: typingMessage.name,
|
|
704
|
+
text: chunk
|
|
705
|
+
});
|
|
706
|
+
acceptedText.push({
|
|
707
|
+
id: updated.messageName?.trim() || typingMessage.name,
|
|
708
|
+
text: chunk
|
|
709
|
+
});
|
|
710
|
+
} catch (error) {
|
|
711
|
+
if (!(error instanceof GoogleChatApiError) || error.status !== 404) throw error;
|
|
712
|
+
runtime.error?.(`Google Chat typing update failed: ${String(error)}`);
|
|
713
|
+
await sendTextMessage(chunk);
|
|
722
714
|
}
|
|
715
|
+
typingMessage = void 0;
|
|
716
|
+
recordOutboundStatus();
|
|
717
|
+
continue;
|
|
723
718
|
}
|
|
719
|
+
await sendTextMessage(chunk);
|
|
720
|
+
recordOutboundStatus();
|
|
724
721
|
}
|
|
725
722
|
}
|
|
726
723
|
//#endregion
|
|
@@ -731,9 +728,8 @@ function extractBearerToken(header) {
|
|
|
731
728
|
}
|
|
732
729
|
const ADD_ON_PREAUTH_MAX_BYTES = 16 * 1024;
|
|
733
730
|
const ADD_ON_PREAUTH_TIMEOUT_MS = 3e3;
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
}
|
|
731
|
+
const GOOGLECHAT_WEBHOOK_ACCEPTED_HEADER = "x-openclaw-delivery-accepted";
|
|
732
|
+
const GOOGLECHAT_WEBHOOK_ACCEPTED_VALUE = "durable";
|
|
737
733
|
function parseGoogleChatInboundPayloadOrReject(raw, res) {
|
|
738
734
|
if (!isRecord(raw)) {
|
|
739
735
|
res.statusCode = 400;
|
|
@@ -800,7 +796,7 @@ function warnAppPrincipalMisconfiguration(params) {
|
|
|
800
796
|
}
|
|
801
797
|
function createGoogleChatWebhookRequestHandler(params) {
|
|
802
798
|
return async (req, res) => {
|
|
803
|
-
const path =
|
|
799
|
+
const path = canonicalizeWebhookRouteKey(new URL(req.url ?? "/", "http://localhost").pathname);
|
|
804
800
|
const config = params.webhookTargets.get(path)?.[0]?.config;
|
|
805
801
|
const clientIp = resolveRequestClientIp(req, config?.gateway?.trustedProxies, config?.gateway?.allowRealIpFallback === true) ?? "unknown";
|
|
806
802
|
return await withResolvedWebhookRequestPipeline({
|
|
@@ -885,6 +881,7 @@ function createGoogleChatWebhookRequestHandler(params) {
|
|
|
885
881
|
dispatchTarget.runtime.error?.(`[${dispatchTarget.account.accountId}] Google Chat webhook failed: ${String(err)}`);
|
|
886
882
|
});
|
|
887
883
|
}
|
|
884
|
+
if (admission.kind === "durable") res.setHeader(GOOGLECHAT_WEBHOOK_ACCEPTED_HEADER, GOOGLECHAT_WEBHOOK_ACCEPTED_VALUE);
|
|
888
885
|
} catch (error) {
|
|
889
886
|
dispatchTarget.runtime.error?.(`[${dispatchTarget.account.accountId}] Google Chat durable admission failed: ${String(error)}`);
|
|
890
887
|
res.statusCode = 503;
|
|
@@ -931,6 +928,7 @@ function registerGoogleChatWebhookTarget(target) {
|
|
|
931
928
|
source: "googlechat-webhook",
|
|
932
929
|
accountId: target.account.accountId,
|
|
933
930
|
log: target.runtime.log,
|
|
931
|
+
throwOnFailure: true,
|
|
934
932
|
handler: async (req, res) => {
|
|
935
933
|
if (!await handleGoogleChatWebhookRequest(req, res) && !res.headersSent) {
|
|
936
934
|
res.statusCode = 404;
|
|
@@ -955,11 +953,6 @@ function normalizeAudienceType(value) {
|
|
|
955
953
|
if (normalized === "app-url" || normalized === "app_url" || normalized === "app") return "app-url";
|
|
956
954
|
if (normalized === "project-number" || normalized === "project_number" || normalized === "project") return "project-number";
|
|
957
955
|
}
|
|
958
|
-
function resolveGoogleChatTimestampMs(eventTime) {
|
|
959
|
-
if (!eventTime) return;
|
|
960
|
-
const parsed = Date.parse(eventTime);
|
|
961
|
-
return Number.isFinite(parsed) ? parsed : void 0;
|
|
962
|
-
}
|
|
963
956
|
function resolveGoogleChatBotLoopProtection(params) {
|
|
964
957
|
if (!params.allowBots || !params.isBotSender || !params.senderId || params.senderId === params.appUserId) return;
|
|
965
958
|
return {
|
|
@@ -970,7 +963,7 @@ function resolveGoogleChatBotLoopProtection(params) {
|
|
|
970
963
|
config: params.config,
|
|
971
964
|
defaultsConfig: params.defaultsConfig,
|
|
972
965
|
defaultEnabled: true,
|
|
973
|
-
nowMs:
|
|
966
|
+
nowMs: parseDateStringTimestampMs(params.eventTime)
|
|
974
967
|
};
|
|
975
968
|
}
|
|
976
969
|
function resolveGoogleChatBotLoopProtectionConfig(params) {
|
|
@@ -1044,8 +1037,17 @@ async function processMessageWithPipeline(params) {
|
|
|
1044
1037
|
}
|
|
1045
1038
|
const messageText = (message.argumentText ?? message.text ?? "").trim();
|
|
1046
1039
|
const attachments = message.attachment ?? [];
|
|
1047
|
-
|
|
1040
|
+
let rawBody = messageText;
|
|
1048
1041
|
if (!rawBody && attachments.length === 0) return;
|
|
1042
|
+
const { route, buildEnvelope } = resolveChannelInboundRouteEnvelope({
|
|
1043
|
+
cfg: config,
|
|
1044
|
+
channel: "googlechat",
|
|
1045
|
+
accountId: account.accountId,
|
|
1046
|
+
peer: {
|
|
1047
|
+
kind: isGroup ? "group" : "direct",
|
|
1048
|
+
id: spaceId
|
|
1049
|
+
}
|
|
1050
|
+
});
|
|
1049
1051
|
const access = await applyGoogleChatInboundAccessPolicy({
|
|
1050
1052
|
account,
|
|
1051
1053
|
config,
|
|
@@ -1057,6 +1059,12 @@ async function processMessageWithPipeline(params) {
|
|
|
1057
1059
|
senderName,
|
|
1058
1060
|
senderEmail,
|
|
1059
1061
|
rawBody,
|
|
1062
|
+
contextBinding: {
|
|
1063
|
+
agentId: route.agentId,
|
|
1064
|
+
sessionKey: route.sessionKey,
|
|
1065
|
+
...message.name ? { messageId: message.name } : {},
|
|
1066
|
+
inboundEventKind: "user_request"
|
|
1067
|
+
},
|
|
1060
1068
|
statusSink,
|
|
1061
1069
|
logVerbose: (messageLocal) => logVerbose(core, runtime, messageLocal)
|
|
1062
1070
|
});
|
|
@@ -1080,28 +1088,27 @@ async function processMessageWithPipeline(params) {
|
|
|
1080
1088
|
core,
|
|
1081
1089
|
runtime
|
|
1082
1090
|
})) return;
|
|
1083
|
-
const { route, buildEnvelope } = resolveChannelInboundRouteEnvelope({
|
|
1084
|
-
cfg: config,
|
|
1085
|
-
channel: "googlechat",
|
|
1086
|
-
accountId: account.accountId,
|
|
1087
|
-
peer: {
|
|
1088
|
-
kind: isGroup ? "group" : "direct",
|
|
1089
|
-
id: spaceId
|
|
1090
|
-
}
|
|
1091
|
-
});
|
|
1092
1091
|
const mediaInputs = attachments.map((attachment) => ({ contentType: attachment.contentType }));
|
|
1093
1092
|
const first = attachments.at(0);
|
|
1094
|
-
if (first) {
|
|
1093
|
+
if (first) try {
|
|
1095
1094
|
const attachmentData = await downloadAttachment(first, account, mediaMaxMb, core);
|
|
1096
1095
|
if (attachmentData) mediaInputs[0] = {
|
|
1097
1096
|
path: attachmentData.path,
|
|
1098
1097
|
url: attachmentData.path,
|
|
1099
1098
|
contentType: attachmentData.contentType ?? first.contentType
|
|
1100
1099
|
};
|
|
1100
|
+
} catch (error) {
|
|
1101
|
+
if (!(error instanceof MediaFetchError) || error.code !== "max_bytes") throw error;
|
|
1102
|
+
const notice = `[Google Chat attachment too large; maximum ${mediaMaxMb} MB]`;
|
|
1103
|
+
rawBody = formatInboundMediaUnavailableText({
|
|
1104
|
+
body: rawBody,
|
|
1105
|
+
notice
|
|
1106
|
+
});
|
|
1107
|
+
runtime.error?.(`[${account.accountId}] ${notice} Increase channels.googlechat.mediaMaxMb to process larger attachments.`);
|
|
1101
1108
|
}
|
|
1102
|
-
const media =
|
|
1109
|
+
const media = await toInboundMediaFactsWithMetadata(mediaInputs);
|
|
1103
1110
|
const fromLabel = isGroup ? space.displayName || `space:${spaceId}` : senderName || `user:${senderId}`;
|
|
1104
|
-
const timestampMs =
|
|
1111
|
+
const timestampMs = parseDateStringTimestampMs(event.eventTime);
|
|
1105
1112
|
const body = buildEnvelope({
|
|
1106
1113
|
channel: "Google Chat",
|
|
1107
1114
|
from: fromLabel,
|
|
@@ -1110,6 +1117,7 @@ async function processMessageWithPipeline(params) {
|
|
|
1110
1117
|
});
|
|
1111
1118
|
const replyThreadName = isGroup ? message.thread?.name : void 0;
|
|
1112
1119
|
const ctxPayload = core.channel.inbound.buildContext({
|
|
1120
|
+
channelIngress: access.channelIngress,
|
|
1113
1121
|
channel: "googlechat",
|
|
1114
1122
|
accountId: route.accountId,
|
|
1115
1123
|
messageId: message.name,
|
|
@@ -1173,10 +1181,11 @@ async function processMessageWithPipeline(params) {
|
|
|
1173
1181
|
})} is typing..._`,
|
|
1174
1182
|
thread: typingMessageThreadName
|
|
1175
1183
|
});
|
|
1176
|
-
if (result?.messageName) typingMessage = {
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1184
|
+
if (result?.messageName) typingMessage = createGoogleChatTypingMessage({
|
|
1185
|
+
messageName: result.messageName,
|
|
1186
|
+
requestedThreadName: typingMessageThreadName,
|
|
1187
|
+
deliveredThreadName: result.threadName
|
|
1188
|
+
});
|
|
1180
1189
|
} catch (err) {
|
|
1181
1190
|
runtime.error?.(`Failed sending typing message: ${String(err)}`);
|
|
1182
1191
|
}
|
|
@@ -1266,6 +1275,16 @@ async function monitorGoogleChatProvider(options) {
|
|
|
1266
1275
|
}
|
|
1267
1276
|
const audienceType = normalizeAudienceType(options.account.config.audienceType);
|
|
1268
1277
|
const audience = options.account.config.audience?.trim();
|
|
1278
|
+
if (!audienceType || !audience) {
|
|
1279
|
+
const error = "Google Chat webhook authentication requires channels.googlechat.audienceType and channels.googlechat.audience.";
|
|
1280
|
+
options.runtime.error?.(`[${options.account.accountId}] ${error}`);
|
|
1281
|
+
options.statusSink?.(channelBlockedPatch(error, {
|
|
1282
|
+
running: true,
|
|
1283
|
+
connected: false,
|
|
1284
|
+
webhookPath: void 0
|
|
1285
|
+
}));
|
|
1286
|
+
return async () => {};
|
|
1287
|
+
}
|
|
1269
1288
|
const mediaMaxMb = options.account.config.mediaMaxMb ?? 20;
|
|
1270
1289
|
warnAppPrincipalMisconfiguration({
|
|
1271
1290
|
accountId: options.account.accountId,
|
|
@@ -1297,6 +1316,7 @@ async function monitorGoogleChatProvider(options) {
|
|
|
1297
1316
|
let unregisterTarget;
|
|
1298
1317
|
try {
|
|
1299
1318
|
unregisterTarget = registerGoogleChatWebhookTarget(target);
|
|
1319
|
+
options.statusSink?.(channelReadyPatch());
|
|
1300
1320
|
} catch (error) {
|
|
1301
1321
|
await ingress.stop();
|
|
1302
1322
|
throw error;
|
|
@@ -1314,7 +1334,7 @@ function resolveGoogleChatWebhookPath(params) {
|
|
|
1314
1334
|
webhookPath: params.account.config.webhookPath,
|
|
1315
1335
|
webhookUrl: params.account.config.webhookUrl,
|
|
1316
1336
|
defaultPath: "/googlechat"
|
|
1317
|
-
})
|
|
1337
|
+
});
|
|
1318
1338
|
}
|
|
1319
1339
|
//#endregion
|
|
1320
1340
|
//#region extensions/googlechat/src/channel.runtime.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as googlechatDirectoryAdapter } from "./channel.adapters-
|
|
1
|
+
import { t as googlechatDirectoryAdapter } from "./channel.adapters-DiI1p1ml.js";
|
|
2
2
|
//#region extensions/googlechat/directory-contract-api.ts
|
|
3
3
|
const googlechatDirectoryContractPlugin = {
|
|
4
4
|
id: "googlechat",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { asObjectRecord, defineChannelAliasMigration, defineKeyMoveMigration, hasLegacyAccountStreamingAliases, normalizeChannelConfigEntries } from "openclaw/plugin-sdk/runtime-doctor";
|
|
1
|
+
import { asObjectRecord, defineChannelAliasMigration, defineKeyMoveMigration, hasLegacyAccountStreamingAliases, normalizeChannelConfigEntries } from "openclaw/plugin-sdk/runtime-doctor-migrations";
|
|
2
2
|
//#region extensions/googlechat/src/doctor-contract.ts
|
|
3
3
|
const streamingAliasMigration = defineChannelAliasMigration({
|
|
4
4
|
channelId: "googlechat",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
1
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BLvSmTXT.js";
|
|
2
2
|
export { legacyConfigRules, normalizeCompatibilityConfig };
|
package/dist/setup-plugin-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createGoogleChatPluginBase } from "./channel-base-
|
|
1
|
+
import { n as createGoogleChatPluginBase } from "./channel-base-BpHXDsur.js";
|
|
2
2
|
//#region extensions/googlechat/src/channel.setup.ts
|
|
3
3
|
const googlechatSetupPlugin = createGoogleChatPluginBase();
|
|
4
4
|
//#endregion
|
|
@@ -319,7 +319,7 @@ class GoogleAuth {
|
|
|
319
319
|
return null;
|
|
320
320
|
}
|
|
321
321
|
try {
|
|
322
|
-
return this._getApplicationCredentialsFromFilePath(credentialsPath, options);
|
|
322
|
+
return await this._getApplicationCredentialsFromFilePath(credentialsPath, options);
|
|
323
323
|
}
|
|
324
324
|
catch (e) {
|
|
325
325
|
if (e instanceof Error) {
|
|
@@ -334,28 +334,33 @@ class GoogleAuth {
|
|
|
334
334
|
* @api private
|
|
335
335
|
*/
|
|
336
336
|
async _tryGetApplicationCredentialsFromWellKnownFile(options) {
|
|
337
|
-
// First, figure out the location of the
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
337
|
+
// First, figure out the location of the Cloud SDK config directory. The
|
|
338
|
+
// `CLOUDSDK_CONFIG` environment variable overrides the platform-specific
|
|
339
|
+
// default location; when it is set, `gcloud` stores the application default
|
|
340
|
+
// credentials file there, so it takes precedence.
|
|
341
|
+
let configDir = process.env['CLOUDSDK_CONFIG'];
|
|
342
|
+
if (!configDir) {
|
|
343
|
+
if (this._isWindows()) {
|
|
344
|
+
// Windows
|
|
345
|
+
if (process.env['APPDATA']) {
|
|
346
|
+
configDir = path.join(process.env['APPDATA'], 'gcloud');
|
|
347
|
+
}
|
|
348
348
|
}
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
349
|
+
else {
|
|
350
|
+
// Linux or Mac
|
|
351
|
+
const home = process.env['HOME'];
|
|
352
|
+
if (home) {
|
|
353
|
+
configDir = path.join(home, '.config', 'gcloud');
|
|
354
|
+
}
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
+
// The config directory could not be determined.
|
|
358
|
+
if (!configDir) {
|
|
359
|
+
return null;
|
|
360
|
+
}
|
|
361
|
+
const location = path.join(configDir, 'application_default_credentials.json');
|
|
357
362
|
// The file does not exist.
|
|
358
|
-
if (!location) {
|
|
363
|
+
if (!fs.existsSync(location)) {
|
|
359
364
|
return null;
|
|
360
365
|
}
|
|
361
366
|
// The file seems to exist. Try to use it.
|