@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,12 +1,10 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount
|
|
2
|
-
import { m as resolveGoogleChatOutboundSpace,
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-BpHXDsur.js";
|
|
2
|
+
import { m as resolveGoogleChatOutboundSpace, y as sendGoogleChatMessage } from "./channel.adapters-DiI1p1ml.js";
|
|
3
|
+
import { n as describeGoogleChatMessageTool } from "./channel-DkSxE2Ch.js";
|
|
3
4
|
import { extractToolSend } from "openclaw/plugin-sdk/tool-send";
|
|
4
5
|
import { jsonResult, readStringArrayParam, readStringParam } from "openclaw/plugin-sdk/channel-actions";
|
|
5
6
|
//#region extensions/googlechat/src/actions.ts
|
|
6
7
|
const providerId = "googlechat";
|
|
7
|
-
function listEnabledAccounts(cfg) {
|
|
8
|
-
return listEnabledGoogleChatAccounts(cfg).filter((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable");
|
|
9
|
-
}
|
|
10
8
|
const OUTBOUND_MEDIA_KEYS = [
|
|
11
9
|
"media",
|
|
12
10
|
"mediaUrl",
|
|
@@ -26,13 +24,7 @@ function hasGoogleChatOutboundAttachment(params) {
|
|
|
26
24
|
});
|
|
27
25
|
}
|
|
28
26
|
const googlechatMessageActions = {
|
|
29
|
-
describeMessageTool:
|
|
30
|
-
if ((accountId ? [resolveGoogleChatAccount({
|
|
31
|
-
cfg,
|
|
32
|
-
accountId
|
|
33
|
-
})].filter((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable") : listEnabledAccounts(cfg)).length === 0) return null;
|
|
34
|
-
return { actions: ["send"] };
|
|
35
|
-
},
|
|
27
|
+
describeMessageTool: describeGoogleChatMessageTool,
|
|
36
28
|
supportsAction: ({ action }) => action === "send",
|
|
37
29
|
extractToolSend: ({ args }) => {
|
|
38
30
|
return extractToolSend(args, "sendMessage");
|
package/dist/api.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as googlechatSetupAdapter, i as googlechatSetupWizard } from "./channel-base-
|
|
2
|
-
import { t as googlechatPlugin } from "./channel-
|
|
1
|
+
import { a as googlechatSetupAdapter, i as googlechatSetupWizard } from "./channel-base-BpHXDsur.js";
|
|
2
|
+
import { t as googlechatPlugin } from "./channel-DkSxE2Ch.js";
|
|
3
3
|
export { googlechatPlugin, googlechatSetupAdapter, googlechatSetupWizard };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import { d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget } from "./channel.adapters-
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-BpHXDsur.js";
|
|
2
|
+
import { d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget } from "./channel.adapters-DiI1p1ml.js";
|
|
3
3
|
import { normalizeLowercaseStringOrEmpty } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
import { createChannelApprovalAuth } from "openclaw/plugin-sdk/approval-auth-runtime";
|
|
5
5
|
//#region extensions/googlechat/src/approval-auth.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount } from "./channel-base-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { l as resolveGoogleChatAccount } from "./channel-base-BpHXDsur.js";
|
|
2
|
+
import { A as registerGoogleChatManualApprovalFollowupSuppression, C as buildGoogleChatApprovalActionParameters, E as createGoogleChatApprovalToken, M as unregisterGoogleChatApprovalCardBindings, N as unregisterGoogleChatManualApprovalFollowupSuppression, S as GOOGLECHAT_APPROVAL_ACTION, b as updateGoogleChatMessage, k as registerGoogleChatApprovalCardBinding, m as resolveGoogleChatOutboundSpace, y as sendGoogleChatMessage } from "./channel.adapters-DiI1p1ml.js";
|
|
3
|
+
import { i as shouldHandleGoogleChatNativeApprovalRequest, r as isGoogleChatNativeApprovalClientEnabled } from "./channel-DkSxE2Ch.js";
|
|
4
4
|
import { buildChannelApprovalNativeTargetKey } from "openclaw/plugin-sdk/approval-native-runtime";
|
|
5
5
|
import { normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { truncateUtf16Safe } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as resolveDefaultGoogleChatAccountId, l as resolveGoogleChatAccount, n as createGoogleChatPluginBase, s as listGoogleChatAccountIds, t as GOOGLECHAT_CHANNEL_ID } from "./channel-base-
|
|
2
|
-
import { a as googlechatPairingTextAdapter, d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget, i as googlechatOutboundAdapter, n as googlechatGroupsAdapter, o as googlechatSecurityAdapter, p as resolveGoogleChatOutboundSessionRoute, r as googlechatMessageAdapter, s as googlechatThreadingAdapter, t as googlechatDirectoryAdapter, u as isGoogleChatSpaceTarget } from "./channel.adapters-
|
|
1
|
+
import { c as resolveDefaultGoogleChatAccountId, l as resolveGoogleChatAccount, n as createGoogleChatPluginBase, o as inspectGoogleChatAccount, s as listGoogleChatAccountIds, t as GOOGLECHAT_CHANNEL_ID } from "./channel-base-BpHXDsur.js";
|
|
2
|
+
import { a as googlechatPairingTextAdapter, d as isGoogleChatUserTarget, f as normalizeGoogleChatTarget, i as googlechatOutboundAdapter, n as googlechatGroupsAdapter, o as googlechatSecurityAdapter, p as resolveGoogleChatOutboundSessionRoute, r as googlechatMessageAdapter, s as googlechatThreadingAdapter, t as googlechatDirectoryAdapter, u as isGoogleChatSpaceTarget } from "./channel.adapters-DiI1p1ml.js";
|
|
3
3
|
import { n as buildChannelConfigSchema, t as GoogleChatConfigSchema } from "./config-api-CsD0IFxF.js";
|
|
4
4
|
import { t as DEFAULT_ACCOUNT_ID } from "./runtime-api-Dh0CNVS4.js";
|
|
5
|
-
import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-
|
|
6
|
-
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-
|
|
5
|
+
import { n as googleChatApprovalAuth, r as normalizeGoogleChatApproverId, t as getGoogleChatApprovalApprovers } from "./approval-auth-Bm8YFEkI.js";
|
|
6
|
+
import { n as normalizeCompatibilityConfig, t as legacyConfigRules } from "./doctor-contract-BLvSmTXT.js";
|
|
7
7
|
import { n as collectRuntimeConfigAssignments, r as secretTargetRegistryEntries } from "./secret-contract-BFYyuE0F.js";
|
|
8
8
|
import { createChatChannelPlugin } from "openclaw/plugin-sdk/channel-core";
|
|
9
9
|
import { buildPassiveProbedChannelStatusSummary } from "openclaw/plugin-sdk/extension-shared";
|
|
@@ -17,6 +17,7 @@ import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "opencl
|
|
|
17
17
|
import { createAccountStatusSink, runPassiveAccountLifecycle } from "openclaw/plugin-sdk/channel-outbound";
|
|
18
18
|
import { buildMutableAllowEntryDetector, collectStandardAllowlistLists, createDangerousNameMatchingMutableAllowlistWarningCollector } from "openclaw/plugin-sdk/channel-policy";
|
|
19
19
|
import { registerChannelRuntimeContext } from "openclaw/plugin-sdk/channel-runtime-context";
|
|
20
|
+
import { channelBlockedPatch } from "openclaw/plugin-sdk/gateway-runtime";
|
|
20
21
|
//#region extensions/googlechat/src/approval-native.ts
|
|
21
22
|
const DEFAULT_APPROVAL_FORWARDING_MODE = "session";
|
|
22
23
|
function isGoogleChatAccountConfigured(params) {
|
|
@@ -141,7 +142,7 @@ const googleChatApprovalCapability = createApproverRestrictedNativeApprovalCapab
|
|
|
141
142
|
approvalKind,
|
|
142
143
|
request
|
|
143
144
|
}),
|
|
144
|
-
load: async () => (await import("./approval-handler.runtime-
|
|
145
|
+
load: async () => (await import("./approval-handler.runtime-B-p-W-_V.js")).googleChatApprovalNativeRuntime
|
|
145
146
|
})
|
|
146
147
|
});
|
|
147
148
|
const collectGoogleChatMutableAllowlistWarnings = createDangerousNameMatchingMutableAllowlistWarningCollector({
|
|
@@ -156,15 +157,14 @@ const collectGoogleChatMutableAllowlistWarnings = createDangerousNameMatchingMut
|
|
|
156
157
|
stableIdPattern: /^[^@]+$/
|
|
157
158
|
}),
|
|
158
159
|
collectLists: (scope) => collectStandardAllowlistLists(scope, {
|
|
159
|
-
includeAllowFrom: false,
|
|
160
|
-
includeDm: true,
|
|
161
160
|
includeGroups: true,
|
|
162
161
|
groupField: "users"
|
|
163
162
|
})
|
|
164
163
|
});
|
|
165
164
|
//#endregion
|
|
166
165
|
//#region extensions/googlechat/src/gateway.ts
|
|
167
|
-
const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
166
|
+
const loadGoogleChatChannelRuntime$1 = createLazyRuntimeNamedExport(() => import("./channel.runtime-CqOzrZWb.js"), "googleChatChannelRuntime");
|
|
167
|
+
const UNRESOLVED_WEBHOOK_URL_ERROR = "Invalid webhookUrl: expected an absolute URL such as https://chat.example.com/googlechat. No inbound webhook route was registered.";
|
|
168
168
|
async function startGoogleChatGatewayAccount(ctx) {
|
|
169
169
|
const account = ctx.account;
|
|
170
170
|
const statusSink = createAccountStatusSink({
|
|
@@ -173,10 +173,14 @@ async function startGoogleChatGatewayAccount(ctx) {
|
|
|
173
173
|
});
|
|
174
174
|
ctx.log?.info?.(`[${account.accountId}] starting Google Chat webhook`);
|
|
175
175
|
const { resolveGoogleChatWebhookPath, startGoogleChatMonitor } = await loadGoogleChatChannelRuntime$1();
|
|
176
|
+
const webhookPath = resolveGoogleChatWebhookPath({ account });
|
|
176
177
|
statusSink({
|
|
177
178
|
running: true,
|
|
178
179
|
lastStartAt: Date.now(),
|
|
179
|
-
webhookPath
|
|
180
|
+
...webhookPath ? {
|
|
181
|
+
webhookPath,
|
|
182
|
+
lifecycle: "starting"
|
|
183
|
+
} : channelBlockedPatch(UNRESOLVED_WEBHOOK_URL_ERROR, { webhookPath: void 0 }),
|
|
180
184
|
audienceType: account.config.audienceType,
|
|
181
185
|
audience: account.config.audience
|
|
182
186
|
});
|
|
@@ -225,23 +229,25 @@ async function startGoogleChatGatewayAccount(ctx) {
|
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
//#endregion
|
|
232
|
+
//#region extensions/googlechat/src/message-tool-api.ts
|
|
233
|
+
function describeGoogleChatMessageTool({ cfg, accountId }) {
|
|
234
|
+
return (accountId ? [inspectGoogleChatAccount({
|
|
235
|
+
cfg,
|
|
236
|
+
accountId
|
|
237
|
+
})] : listGoogleChatAccountIds(cfg).map((listedAccountId) => inspectGoogleChatAccount({
|
|
238
|
+
cfg,
|
|
239
|
+
accountId: listedAccountId
|
|
240
|
+
}))).some((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus === "available") ? { actions: ["send"] } : null;
|
|
241
|
+
}
|
|
242
|
+
//#endregion
|
|
228
243
|
//#region extensions/googlechat/src/channel.ts
|
|
229
|
-
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
244
|
+
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CqOzrZWb.js"), "googleChatChannelRuntime");
|
|
230
245
|
const googlechatActions = {
|
|
231
|
-
describeMessageTool:
|
|
232
|
-
if ((accountId ? [resolveGoogleChatAccount({
|
|
233
|
-
cfg,
|
|
234
|
-
accountId
|
|
235
|
-
})].filter((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable") : listGoogleChatAccountIds(cfg).map((id) => resolveGoogleChatAccount({
|
|
236
|
-
cfg,
|
|
237
|
-
accountId: id
|
|
238
|
-
})).filter((account) => account.enabled && account.credentialSource !== "none" && account.tokenStatus !== "configured_unavailable")).length === 0) return null;
|
|
239
|
-
return { actions: ["send"] };
|
|
240
|
-
},
|
|
246
|
+
describeMessageTool: describeGoogleChatMessageTool,
|
|
241
247
|
supportsAction: ({ action }) => action === "send",
|
|
242
248
|
extractToolSend: ({ args }) => extractToolSend(args, "sendMessage"),
|
|
243
249
|
handleAction: async (ctx) => {
|
|
244
|
-
const { googlechatMessageActions } = await import("./actions-
|
|
250
|
+
const { googlechatMessageActions } = await import("./actions-BIY4DNRJ.js");
|
|
245
251
|
if (!googlechatMessageActions.handleAction) throw new Error("Google Chat actions are not available.");
|
|
246
252
|
return await googlechatMessageActions.handleAction(ctx);
|
|
247
253
|
}
|
|
@@ -263,6 +269,12 @@ const googlechatPlugin = createChatChannelPlugin({
|
|
|
263
269
|
],
|
|
264
270
|
targetIdComparison: "case-sensitive",
|
|
265
271
|
normalizeTarget: normalizeGoogleChatTarget,
|
|
272
|
+
inferTargetChatType: ({ to }) => {
|
|
273
|
+
const target = normalizeGoogleChatTarget(to);
|
|
274
|
+
if (!target) return;
|
|
275
|
+
if (isGoogleChatUserTarget(target)) return "direct";
|
|
276
|
+
return isGoogleChatSpaceTarget(target) ? "group" : void 0;
|
|
277
|
+
},
|
|
266
278
|
resolveOutboundSessionRoute: (params) => resolveGoogleChatOutboundSessionRoute(params),
|
|
267
279
|
targetResolver: {
|
|
268
280
|
looksLikeId: (raw, normalized) => {
|
|
@@ -376,4 +388,4 @@ const googlechatPlugin = createChatChannelPlugin({
|
|
|
376
388
|
}
|
|
377
389
|
});
|
|
378
390
|
//#endregion
|
|
379
|
-
export {
|
|
391
|
+
export { shouldHandleGoogleChatNativeApprovalRequest as i, describeGoogleChatMessageTool as n, isGoogleChatNativeApprovalClientEnabled as r, googlechatPlugin as t };
|
|
@@ -4,7 +4,7 @@ import { createAccountListHelpers, describeAccountSnapshot } from "openclaw/plug
|
|
|
4
4
|
import { DEFAULT_ACCOUNT_ID, normalizeAccountId, resolveAccountEntry } from "openclaw/plugin-sdk/account-resolution";
|
|
5
5
|
import { mergePairLoopGuardConfig } from "openclaw/plugin-sdk/pair-loop-guard-runtime";
|
|
6
6
|
import { tryReadSecretFileSync } from "openclaw/plugin-sdk/secret-file-runtime";
|
|
7
|
-
import { isSecretRef } from "openclaw/plugin-sdk/secret-input";
|
|
7
|
+
import { coerceSecretRef, isSecretRef, resolveSecretInputString } from "openclaw/plugin-sdk/secret-input";
|
|
8
8
|
import { resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { formatNormalizedAllowFromEntries } from "openclaw/plugin-sdk/allow-from";
|
|
@@ -62,7 +62,18 @@ function resolveCredentialsFromConfig(params) {
|
|
|
62
62
|
source: "inline",
|
|
63
63
|
status: "available"
|
|
64
64
|
};
|
|
65
|
-
if (
|
|
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"
|
|
76
|
+
};
|
|
66
77
|
const file = normalizeOptionalString(account.serviceAccountFile);
|
|
67
78
|
if (file) {
|
|
68
79
|
const result = tryReadSecretFileSync(resolveUserPath(file), "Google Chat service account file", {
|
|
@@ -113,15 +124,17 @@ function resolveCredentialsFromConfig(params) {
|
|
|
113
124
|
status: "missing"
|
|
114
125
|
};
|
|
115
126
|
}
|
|
116
|
-
function
|
|
127
|
+
function resolveGoogleChatAccountWithMode(params) {
|
|
117
128
|
const accountId = normalizeAccountId(params.accountId ?? params.cfg.channels?.["googlechat"]?.defaultAccount);
|
|
118
129
|
const baseEnabled = params.cfg.channels?.["googlechat"]?.enabled !== false;
|
|
119
130
|
const merged = mergeGoogleChatAccountConfig(params.cfg, accountId);
|
|
120
131
|
const accountEnabled = merged.enabled !== false;
|
|
121
132
|
const enabled = baseEnabled && accountEnabled;
|
|
122
133
|
const credentials = resolveCredentialsFromConfig({
|
|
134
|
+
cfg: params.cfg,
|
|
123
135
|
accountId,
|
|
124
|
-
account: merged
|
|
136
|
+
account: merged,
|
|
137
|
+
mode: params.mode
|
|
125
138
|
});
|
|
126
139
|
return {
|
|
127
140
|
accountId,
|
|
@@ -135,11 +148,17 @@ function resolveGoogleChatAccount(params) {
|
|
|
135
148
|
...credentials.diagnostic ? { credentialDiagnostics: [credentials.diagnostic] } : {}
|
|
136
149
|
};
|
|
137
150
|
}
|
|
138
|
-
function
|
|
139
|
-
return
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
})
|
|
151
|
+
function resolveGoogleChatAccount(params) {
|
|
152
|
+
return resolveGoogleChatAccountWithMode({
|
|
153
|
+
...params,
|
|
154
|
+
mode: "strict"
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
function inspectGoogleChatAccount(params) {
|
|
158
|
+
return resolveGoogleChatAccountWithMode({
|
|
159
|
+
...params,
|
|
160
|
+
mode: "inspect"
|
|
161
|
+
});
|
|
143
162
|
}
|
|
144
163
|
const googlechatSetupAdapter = createPatchedAccountSetupAdapter({
|
|
145
164
|
channelKey: "googlechat",
|
|
@@ -218,7 +237,9 @@ const googlechatSetupContract = defineChannelSetupContract({
|
|
|
218
237
|
cli: {
|
|
219
238
|
flags: "--use-env",
|
|
220
239
|
description: "Use Google Chat environment credentials"
|
|
221
|
-
}
|
|
240
|
+
},
|
|
241
|
+
envVars: ["GOOGLE_CHAT_SERVICE_ACCOUNT", "GOOGLE_CHAT_SERVICE_ACCOUNT_FILE"],
|
|
242
|
+
envVarMode: "any"
|
|
222
243
|
}
|
|
223
244
|
},
|
|
224
245
|
legacyAdapter: googlechatSetupAdapter
|
|
@@ -426,11 +447,13 @@ const googleChatConfigAdapter = createScopedChannelConfigAdapter({
|
|
|
426
447
|
}),
|
|
427
448
|
resolveDefaultTo: (account) => account.config.defaultTo
|
|
428
449
|
});
|
|
450
|
+
function isGoogleChatAccountConfigured(account) {
|
|
451
|
+
return account.tokenStatus ? account.tokenStatus !== "missing" : account.credentialSource !== "none";
|
|
452
|
+
}
|
|
429
453
|
function createGoogleChatPluginBase(params = {}) {
|
|
430
454
|
return {
|
|
431
455
|
id: GOOGLECHAT_CHANNEL_ID,
|
|
432
456
|
meta: { ...googlechatMeta },
|
|
433
|
-
setup: googlechatSetupAdapter,
|
|
434
457
|
setupContract: googlechatSetupContract,
|
|
435
458
|
setupWizard: googlechatSetupWizard,
|
|
436
459
|
capabilities: {
|
|
@@ -452,10 +475,11 @@ function createGoogleChatPluginBase(params = {}) {
|
|
|
452
475
|
...params.configSchema ? { configSchema: params.configSchema } : {},
|
|
453
476
|
config: {
|
|
454
477
|
...googleChatConfigAdapter,
|
|
455
|
-
|
|
478
|
+
inspectAccount: adaptScopedAccountAccessor(inspectGoogleChatAccount),
|
|
479
|
+
isConfigured: isGoogleChatAccountConfigured,
|
|
456
480
|
describeAccount: (account) => describeAccountSnapshot({
|
|
457
481
|
account,
|
|
458
|
-
configured: account
|
|
482
|
+
configured: isGoogleChatAccountConfigured(account),
|
|
459
483
|
extra: {
|
|
460
484
|
credentialSource: account.credentialSource,
|
|
461
485
|
tokenStatus: account.tokenStatus
|
|
@@ -465,4 +489,4 @@ function createGoogleChatPluginBase(params = {}) {
|
|
|
465
489
|
};
|
|
466
490
|
}
|
|
467
491
|
//#endregion
|
|
468
|
-
export { googlechatSetupAdapter as a, resolveDefaultGoogleChatAccountId as c, googlechatSetupWizard as i, resolveGoogleChatAccount as l, createGoogleChatPluginBase as n,
|
|
492
|
+
export { googlechatSetupAdapter as a, resolveDefaultGoogleChatAccountId as c, googlechatSetupWizard as i, resolveGoogleChatAccount as l, createGoogleChatPluginBase as n, inspectGoogleChatAccount as o, formatGoogleChatAllowFromEntry as r, listGoogleChatAccountIds as s, GOOGLECHAT_CHANNEL_ID as t, MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES as u };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as googlechatPlugin } from "./channel-
|
|
1
|
+
import { t as googlechatPlugin } from "./channel-DkSxE2Ch.js";
|
|
2
2
|
export { googlechatPlugin };
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { l as resolveGoogleChatAccount, r as formatGoogleChatAllowFromEntry, u as MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES } from "./channel-base-
|
|
1
|
+
import { l as resolveGoogleChatAccount, r as formatGoogleChatAllowFromEntry, u as MAX_GOOGLE_CHAT_SERVICE_ACCOUNT_FILE_BYTES } from "./channel-base-BpHXDsur.js";
|
|
2
2
|
import { d as fetchWithSsrFGuard$1, m as missingTargetError, r as PAIRING_APPROVED_MESSAGE } from "./runtime-api-Dh0CNVS4.js";
|
|
3
3
|
import { buildChannelOutboundSessionRoute } from "openclaw/plugin-sdk/channel-core";
|
|
4
4
|
import { createLazyRuntimeNamedExport } from "openclaw/plugin-sdk/lazy-runtime";
|
|
5
|
-
import { normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
5
|
+
import { asNullableObjectRecord, normalizeLowercaseStringOrEmpty, normalizeOptionalString } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
6
6
|
import { resolveUserPath } from "openclaw/plugin-sdk/text-utility-runtime";
|
|
7
7
|
import { formatErrorMessage } from "openclaw/plugin-sdk/error-runtime";
|
|
8
|
-
import {
|
|
8
|
+
import { redactToolPayloadText } from "openclaw/plugin-sdk/logging-core";
|
|
9
|
+
import { MediaFetchError, parseMediaContentLength, readResponseTextSnippet } from "openclaw/plugin-sdk/media-runtime";
|
|
10
|
+
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
9
11
|
import { readResponseWithLimit } from "openclaw/plugin-sdk/response-limit-runtime";
|
|
10
12
|
import { buildHostnameAllowlistPolicyFromSuffixAllowlist, fetchWithSsrFGuard } from "openclaw/plugin-sdk/ssrf-runtime";
|
|
11
13
|
import crypto from "node:crypto";
|
|
12
14
|
import { pruneMapToMaxSize } from "openclaw/plugin-sdk/collection-runtime";
|
|
13
|
-
import { readProviderJsonResponse } from "openclaw/plugin-sdk/provider-http";
|
|
14
15
|
import { createMessageReceiptFromOutboundResults, defineChannelMessageAdapter, sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
|
|
15
16
|
import { FormatCapabilityProfile, markdownToIR, renderMarkdownIRChunksWithinLimit, renderMarkdownWithMarkers, sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
16
17
|
import fs from "node:fs/promises";
|
|
@@ -189,9 +190,6 @@ function installGoogleAuthHeaderCompatibilityInterceptor(transport) {
|
|
|
189
190
|
transport.interceptors.response.add({ resolved: async (response) => normalizeGoogleAuthResponseHeaders(response) });
|
|
190
191
|
return transport;
|
|
191
192
|
}
|
|
192
|
-
function asNullableObjectRecord(value) {
|
|
193
|
-
return value !== null && typeof value === "object" ? value : null;
|
|
194
|
-
}
|
|
195
193
|
function hasProxyAgentShape(value) {
|
|
196
194
|
const record = asNullableObjectRecord(value);
|
|
197
195
|
return record !== null && record.proxy instanceof URL;
|
|
@@ -404,6 +402,7 @@ function createGoogleAuthFetch() {
|
|
|
404
402
|
statusText: response.statusText
|
|
405
403
|
});
|
|
406
404
|
} finally {
|
|
405
|
+
if (!response.bodyUsed) response.body?.cancel().catch(() => void 0);
|
|
407
406
|
await release();
|
|
408
407
|
}
|
|
409
408
|
};
|
|
@@ -616,30 +615,33 @@ const GOOGLECHAT_MEDIA_MAX_TIMEOUT_MS = 15 * 6e4;
|
|
|
616
615
|
const GOOGLECHAT_RESPONSE_READ_IDLE_TIMEOUT_MS = 3e4;
|
|
617
616
|
const GOOGLECHAT_JSON_RESPONSE_MAX_BYTES = 16 * 1024 * 1024;
|
|
618
617
|
const GOOGLECHAT_ERROR_BODY_MAX_BYTES = 16 * 1024;
|
|
618
|
+
const GOOGLE_CHAT_MEDIA_RESPONSE_MAX_BYTES = 20 * 1024 * 1024;
|
|
619
|
+
var GoogleChatApiError = class extends Error {
|
|
620
|
+
constructor(status, message) {
|
|
621
|
+
super(message);
|
|
622
|
+
this.status = status;
|
|
623
|
+
this.name = "GoogleChatApiError";
|
|
624
|
+
}
|
|
625
|
+
};
|
|
619
626
|
function resolveGoogleChatMediaTimeoutMs(maxBytes) {
|
|
620
627
|
if (!maxBytes) return GOOGLECHAT_MEDIA_MAX_TIMEOUT_MS;
|
|
621
628
|
const transferMs = Math.ceil(maxBytes / GOOGLECHAT_MEDIA_MIN_BYTES_PER_SECOND * 1e3);
|
|
622
629
|
return Math.min(GOOGLECHAT_MEDIA_TIMEOUT_GRACE_MS + transferMs, GOOGLECHAT_MEDIA_MAX_TIMEOUT_MS);
|
|
623
630
|
}
|
|
624
631
|
async function readGoogleChatJsonResponse(response, label) {
|
|
625
|
-
|
|
632
|
+
return readProviderJsonResponse(response, label, {
|
|
633
|
+
maxBytes: GOOGLECHAT_JSON_RESPONSE_MAX_BYTES,
|
|
626
634
|
chunkTimeoutMs: GOOGLECHAT_RESPONSE_READ_IDLE_TIMEOUT_MS,
|
|
627
|
-
onIdleTimeout: ({ chunkTimeoutMs }) => /* @__PURE__ */ new Error(`${label}: response body stalled after ${chunkTimeoutMs}ms`)
|
|
628
|
-
onOverflow: ({ maxBytes }) => /* @__PURE__ */ new Error(`${label}: JSON response exceeds ${maxBytes} bytes`)
|
|
635
|
+
onIdleTimeout: ({ chunkTimeoutMs }) => /* @__PURE__ */ new Error(`${label}: response body stalled after ${chunkTimeoutMs}ms`)
|
|
629
636
|
});
|
|
630
|
-
try {
|
|
631
|
-
return JSON.parse(new TextDecoder().decode(bytes));
|
|
632
|
-
} catch (cause) {
|
|
633
|
-
throw new Error(`${label}: malformed JSON response`, { cause });
|
|
634
|
-
}
|
|
635
637
|
}
|
|
636
638
|
async function readGoogleChatErrorResponse(response, label) {
|
|
637
|
-
return await readResponseTextSnippet(response, {
|
|
639
|
+
return redactToolPayloadText(await readResponseTextSnippet(response, {
|
|
638
640
|
maxBytes: GOOGLECHAT_ERROR_BODY_MAX_BYTES,
|
|
639
641
|
maxChars: GOOGLECHAT_ERROR_BODY_MAX_BYTES,
|
|
640
642
|
chunkTimeoutMs: GOOGLECHAT_RESPONSE_READ_IDLE_TIMEOUT_MS,
|
|
641
643
|
onIdleTimeout: ({ chunkTimeoutMs }) => /* @__PURE__ */ new Error(`${label} error response stalled after ${chunkTimeoutMs}ms`)
|
|
642
|
-
}) ?? "";
|
|
644
|
+
}) ?? "");
|
|
643
645
|
}
|
|
644
646
|
const headersToObject = (headers) => headers instanceof Headers ? Object.fromEntries(headers.entries()) : Array.isArray(headers) ? Object.fromEntries(headers) : headers || {};
|
|
645
647
|
async function withGoogleChatResponse(params) {
|
|
@@ -660,10 +662,11 @@ async function withGoogleChatResponse(params) {
|
|
|
660
662
|
try {
|
|
661
663
|
if (!response.ok) {
|
|
662
664
|
const text = await readGoogleChatErrorResponse(response, errorPrefix);
|
|
663
|
-
throw new
|
|
665
|
+
throw new GoogleChatApiError(response.status, `${errorPrefix} ${response.status}: ${text || response.statusText}`);
|
|
664
666
|
}
|
|
665
667
|
return await handleResponse(response);
|
|
666
668
|
} finally {
|
|
669
|
+
if (!response.bodyUsed) response.body?.cancel().catch(() => void 0);
|
|
667
670
|
await release();
|
|
668
671
|
}
|
|
669
672
|
}
|
|
@@ -699,35 +702,44 @@ async function fetchBuffer(account, url, init, options) {
|
|
|
699
702
|
auditContext: "googlechat.api.buffer",
|
|
700
703
|
timeoutMs: resolveGoogleChatMediaTimeoutMs(options?.maxBytes),
|
|
701
704
|
handleResponse: async (res) => {
|
|
702
|
-
const maxBytes = options?.maxBytes;
|
|
705
|
+
const maxBytes = options?.maxBytes ?? GOOGLE_CHAT_MEDIA_RESPONSE_MAX_BYTES;
|
|
703
706
|
const lengthHeader = res.headers.get("content-length");
|
|
704
|
-
if (
|
|
707
|
+
if (lengthHeader) {
|
|
705
708
|
const length = parseMediaContentLength(lengthHeader);
|
|
706
|
-
if (length !== null && length > maxBytes) throw new
|
|
709
|
+
if (length !== null && length > maxBytes) throw new MediaFetchError("max_bytes", `Google Chat media exceeds max bytes (${maxBytes})`);
|
|
707
710
|
}
|
|
708
|
-
if (!maxBytes) return {
|
|
709
|
-
buffer: Buffer.from(await res.arrayBuffer()),
|
|
710
|
-
contentType: res.headers.get("content-type") ?? void 0
|
|
711
|
-
};
|
|
712
711
|
return {
|
|
713
712
|
buffer: await readResponseWithLimit(res, maxBytes, {
|
|
714
713
|
chunkTimeoutMs: GOOGLECHAT_RESPONSE_READ_IDLE_TIMEOUT_MS,
|
|
715
|
-
onOverflow: () =>
|
|
714
|
+
onOverflow: () => new MediaFetchError("max_bytes", `Google Chat media exceeds max bytes (${maxBytes})`)
|
|
716
715
|
}),
|
|
717
716
|
contentType: res.headers.get("content-type") ?? void 0
|
|
718
717
|
};
|
|
719
718
|
}
|
|
720
719
|
});
|
|
721
720
|
}
|
|
721
|
+
/**
|
|
722
|
+
* A Google Chat `thread` must be a `spaces/{space}/threads/{thread}` resource
|
|
723
|
+
* name that belongs to the target space. Reply routing sometimes yields other
|
|
724
|
+
* shapes — a bare id, a `spaces/{space}/messages/{message}` name, or a thread
|
|
725
|
+
* from a different (or wrongly-cased) space — and passing any of those makes the
|
|
726
|
+
* Chat API reject the whole send with `400 INVALID_ARGUMENT`. Accept only a
|
|
727
|
+
* well-formed, same-space thread name; callers drop the rest so the message
|
|
728
|
+
* still delivers to the space (as a new thread) instead of failing outright.
|
|
729
|
+
*/
|
|
730
|
+
function isUsableGoogleChatThreadName(thread, space) {
|
|
731
|
+
return /^spaces\/[^/]+\/threads\/[^/]+$/.test(thread) && thread.startsWith(`${space}/threads/`);
|
|
732
|
+
}
|
|
722
733
|
async function sendGoogleChatMessage(params) {
|
|
723
734
|
const { account, space, text, thread, cardsV2 } = params;
|
|
735
|
+
const usableThread = thread && isUsableGoogleChatThreadName(thread, space) ? thread : void 0;
|
|
724
736
|
if (text && (!cardsV2 || cardsV2.length === 0) && shouldSuppressGoogleChatManualExecApprovalFollowupText(text)) return null;
|
|
725
737
|
const body = {};
|
|
726
738
|
if (text) body.text = text;
|
|
727
739
|
if (cardsV2 && cardsV2.length > 0) body.cardsV2 = cardsV2;
|
|
728
|
-
if (
|
|
740
|
+
if (usableThread) body.thread = { name: usableThread };
|
|
729
741
|
const urlObj = new URL(`${CHAT_API_BASE}/${space}/messages`);
|
|
730
|
-
if (
|
|
742
|
+
if (usableThread) urlObj.searchParams.set("messageReplyOption", "REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD");
|
|
731
743
|
const result = await fetchJson(account, urlObj.toString(), {
|
|
732
744
|
method: "POST",
|
|
733
745
|
body: JSON.stringify(body)
|
|
@@ -1161,7 +1173,7 @@ function resolveGoogleChatGroupRequireMention(params) {
|
|
|
1161
1173
|
}
|
|
1162
1174
|
//#endregion
|
|
1163
1175
|
//#region extensions/googlechat/src/channel.adapters.ts
|
|
1164
|
-
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-
|
|
1176
|
+
const loadGoogleChatChannelRuntime = createLazyRuntimeNamedExport(() => import("./channel.runtime-CqOzrZWb.js"), "googleChatChannelRuntime");
|
|
1165
1177
|
function createGoogleChatSendReceipt(params) {
|
|
1166
1178
|
const messageId = params.messageId?.trim();
|
|
1167
1179
|
return createMessageReceiptFromOutboundResults({
|
|
@@ -1171,7 +1183,7 @@ function createGoogleChatSendReceipt(params) {
|
|
|
1171
1183
|
chatId: params.chatId,
|
|
1172
1184
|
conversationId: params.chatId
|
|
1173
1185
|
}] : [],
|
|
1174
|
-
threadId: params.
|
|
1186
|
+
threadId: params.threadId,
|
|
1175
1187
|
kind: params.kind
|
|
1176
1188
|
});
|
|
1177
1189
|
}
|
|
@@ -1295,18 +1307,20 @@ const googlechatOutboundAdapter = {
|
|
|
1295
1307
|
});
|
|
1296
1308
|
const thread = typeof threadId === "number" ? String(threadId) : threadId ?? replyToId ?? void 0;
|
|
1297
1309
|
const { sendGoogleChatMessage } = await loadGoogleChatChannelRuntime();
|
|
1298
|
-
const
|
|
1310
|
+
const result = await sendGoogleChatMessage({
|
|
1299
1311
|
account,
|
|
1300
1312
|
space,
|
|
1301
1313
|
text,
|
|
1302
1314
|
thread
|
|
1303
|
-
})
|
|
1315
|
+
});
|
|
1316
|
+
const messageId = result?.messageName ?? "";
|
|
1304
1317
|
return {
|
|
1305
1318
|
messageId,
|
|
1306
1319
|
chatId: space,
|
|
1307
1320
|
receipt: createGoogleChatSendReceipt({
|
|
1308
1321
|
messageId,
|
|
1309
1322
|
chatId: space,
|
|
1323
|
+
threadId: result?.threadName ?? thread,
|
|
1310
1324
|
kind: "text"
|
|
1311
1325
|
})
|
|
1312
1326
|
};
|
|
@@ -1323,4 +1337,4 @@ const googlechatMessageAdapter = defineChannelMessageAdapter({
|
|
|
1323
1337
|
send: { text: googlechatOutboundAdapter.attachedResults.sendText }
|
|
1324
1338
|
});
|
|
1325
1339
|
//#endregion
|
|
1326
|
-
export {
|
|
1340
|
+
export { registerGoogleChatManualApprovalFollowupSuppression as A, buildGoogleChatApprovalActionParameters as C, getGoogleChatApprovalCardBinding as D, createGoogleChatApprovalToken as E, unregisterGoogleChatApprovalCardBindings as M, unregisterGoogleChatManualApprovalFollowupSuppression as N, readGoogleChatApprovalActionToken as O, GOOGLECHAT_APPROVAL_ACTION as S, completeGoogleChatApprovalCardBinding as T, downloadGoogleChatMedia as _, googlechatPairingTextAdapter as a, updateGoogleChatMessage as b, buildGoogleChatGroupPolicyScope as c, isGoogleChatUserTarget as d, normalizeGoogleChatTarget as f, deleteGoogleChatMessage as g, GoogleChatApiError as h, googlechatOutboundAdapter as i, releaseGoogleChatApprovalCardBinding as j, registerGoogleChatApprovalCardBinding as k, isGoogleChatGroupSpace as l, resolveGoogleChatOutboundSpace as m, googlechatGroupsAdapter as n, googlechatSecurityAdapter as o, resolveGoogleChatOutboundSessionRoute as p, googlechatMessageAdapter as r, googlechatThreadingAdapter as s, googlechatDirectoryAdapter as t, isGoogleChatSpaceTarget as u, probeGoogleChat as v, claimGoogleChatApprovalCardBinding as w, verifyGoogleChatRequest as x, sendGoogleChatMessage as y };
|