@workclaw/openclaw-workclaw 1.0.202 → 1.0.332
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -4
- package/dist/_virtual/_commonjsHelpers.js +8 -0
- package/dist/_virtual/ipaddr.js +4 -0
- package/dist/_virtual/jiti.js +4 -0
- package/dist/_virtual/main.js +4 -0
- package/dist/api.d.ts +4 -3
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +10 -3
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +250 -243
- package/dist/node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/index.js +163 -0
- package/dist/node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/utilities.js +32 -0
- package/dist/node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js +188 -0
- package/dist/node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/supports-color/browser.js +25 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/account-id-C6v13Xic.js +4 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/auth-profiles-Db4Eg6ht.js +24 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/bash-tools.exec-runtime--1hhz8C_.js +46 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/bash-tools.schemas-BqpDemKo.js +32 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/boolean-DbfRNnYl.js +14 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/boundary-file-read-BymsBHso.js +172 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/bundled-Cuj8sKt6.js +18 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/bundled-dir-Cq5y_NKM.js +109 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/bundled-plugin-metadata-BJMD48hn.js +260 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/channel-entry-contract-BoTfqLnn.js +176 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/cli-name-DPC4W7Fo.js +22 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/command-format-LqDv8ows.js +24 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/command-registration-Dxq1bCXM.js +16 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/commands-registry-normalize-Bk0WYUI0.js +94 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/commands-registry.data-D99VdOlX.js +940 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/config--3Msyf4f.js +20 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/config-schema-C6kUPI7B.js +33 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/config-schema-DB8FqQH8.js +82 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/conversation-binding-C3EIaK9Z.js +19 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/core-DpZtjMWz.js +51 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/dedupe-DM7iBj7C.js +60 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/discovery-Cgp95o2R.js +649 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/dispatch-2DAqwFVE.js +33 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/errors-Dyla6m1G.js +13 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/exec-approvals-CLXc_BYU.js +212 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/exec-defaults-DBnaZeLQ.js +13 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/exec-jRxy02_4.js +9 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/exec-safe-bin-trust-DOmID2EO.js +638 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/exec-safety-C8v0dsfc.js +24 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/facade-loader-B83leEeb.js +10 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/facade-runtime-B04URCVZ.js +14 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/file-identity-sp9axE-E.js +411 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/file-lock-D016H3tC.js +5 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/gateway-control-ui-origins-B-lkqr3D.js +23 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/gateway-request-scope-BEWoJTx4.js +3 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/global-singleton-DhGoboiG.js +14 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/helpers-CI2CkXhU.js +7 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/home-dir-BEqRdfoa.js +67 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/host-env-security-B-Ebh6At.js +334 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/ids-By7Nkc8R.js +76 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/inbound-path-policy-CQkSSeSi.js +26 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/internal-hooks-D52pUqod.js +5 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/io-DDkf_FUu.js +14328 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/ip-CdfoCORt.js +2 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/json-files-DACY7Zw5.js +22 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/legacy-names-C7VUgVdg.js +5 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/links-BlUEqVE8.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/loader-DYJR63Q1.js +27 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/logger-BMuqDP66.js +26 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/manager-szyCqvou.js +22 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/manifest-CjPIwluH.js +409 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/manifest-registry-CK0zNybm.js +394 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/map-size-DhG4ditB.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/message-channel-DXsjCySM.js +32 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/mime-BjR-Aw-Q.js +42 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/min-host-version-CmguvhGB.js +49 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/model-auth-markers-YVQDqG1J.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/model-selection-cli-U7l5Ifek.js +14 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/models-config-B-YHRI3g.js +40 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/native-command-session-targets-BW3SPx-T.js +11 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/network-mode-D3yzFBsD.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/node-require-DvwmVoHm.js +14 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/node-sqlite-FGjwOqiS.js +3 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/openclaw-root-BNWw3cXT.js +69 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/order-6WHL2fZu.js +26 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/parse-duration-amE_QFsj.js +42 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/path-safety-CKqzLERR.js +308 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/paths-LCYGfrV7.js +95 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/process-scoped-map-Cv-PkzaO.js +11 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/profile-utils-Dh8DVvPv.js +17 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/prototype-keys-BKGE_uzN.js +11 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/provider-env-vars-DDfJbkrO.js +150 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/provider-id-B3nZBDJJ.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/provider-runtime-O-n0cjZo.js +22 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/public-surface-loader-CSDxBey4.js +14 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/redact-D4nea1HF.js +2 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/ref-contract-B1q5N0Lz.js +35 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/registry-DE4nHTjg.js +54 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/registry-loaded-B8D6rQiJ.js +62 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/registry-nEl7QZ30.js +3 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/runtime-Clo2XF6T.js +27 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/runtime-channel-state-Ck2VkX9T.js +20 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/runtime-guard-DqVOvWAZ.js +23 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/runtime-state-Cd3jnHgw.js +4 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/schema-validator-Bo7NeV8w.js +3 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/scp-host-CiFVRWHy.js +38 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/sdk-alias-Bo1huP7M.js +315 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/session-binding-service-D6sb-LrK.js +9 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/session-write-lock-Dk7FbMr_.js +6 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/setup-helpers-ChrkNnYE.js +5 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/setup-registry-BPL6c_Zk.js +16 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/setup-wizard-helpers-DnMkYslk.js +19 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/skills-Djbt9HGh.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/slots-PynIdqZ_.js +10 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/string-coerce-BUSzWgUA.js +25 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/string-normalization-DIJRAo0o.js +20 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/strip-inbound-meta-WCHWW8is.js +12 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/subsystem-BHv2zSx6.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/system-events-CfifhXT7.js +3 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/tailscale-status-Ch1LdrMM.js +5 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/task-registry-2LJDZL29.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/telegram-command-config-TdpOuZ__.js +66 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/terminal-link-B3nCYQJi.js +10 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/theme-CVJvORNs.js +27 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/thinking-_rqwdGD8.js +44 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/thinking.shared-Dginn1He.js +14 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/tmp-openclaw-dir-DrKSsX71.js +103 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/tool-policy-CwZyJfFc.js +300 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/types-BfKfz-lz.js +38 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/types.secrets-C9RpLzA0.js +53 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/utils-DGFSjtQF.js +36 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/version-b06Uhxnq.js +82 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/workspace-oVBetctb.js +20 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/zod-schema-Cpw1qu03.js +1299 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/zod-schema.agent-runtime-D48J52r_.js +620 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/zod-schema.core-BrzjtZhM.js +597 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/zod-schema.providers-core-CX8AFeyJ.js +1354 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/zod-schema.providers-whatsapp-7E9bf9oA.js +130 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/dist/zod-schema.sensitive-BFZ4qze6.js +5 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/models.generated.js +14275 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/models.js +16 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/anthropic.js +314 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/github-copilot.js +256 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/google-antigravity.js +315 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/google-gemini-cli.js +402 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/index.js +41 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/oauth-page.js +103 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/openai-codex.js +335 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/utils/oauth/pkce.js +20 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/system/policy.js +34 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/any/any.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/argument/argument.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/array/array.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/async-iterator/async-iterator.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/awaited/awaited.js +30 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/bigint/bigint.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/boolean/boolean.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/clone/type.js +7 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/clone/value.js +32 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/composite/composite.js +37 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/computed/computed.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/const/const.js +36 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/constructor/constructor.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/constructor-parameters/constructor-parameters.js +9 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/create/immutable.js +29 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/create/type.js +17 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/date/date.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/discard/discard.js +10 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/enum/enum.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/error/error.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-mapped-result.js +18 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude-from-template-literal.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/exclude/exclude.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/extends/extends-check.js +265 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-key.js +24 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/extends/extends-from-mapped-result.js +19 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/extends/extends.js +16 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-mapped-result.js +18 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/extract/extract-from-template-literal.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/extract/extract.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/function/function.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/guard/kind.js +176 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/guard/type.js +272 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/guard/value.js +62 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-key.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-from-mapped-result.js +20 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed-property-keys.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/indexed/indexed.js +61 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/instance-type/instance-type.js +9 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/instantiate/instantiate.js +86 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/integer/integer.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-create.js +11 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect-evaluated.js +31 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intersect/intersect.js +16 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intrinsic/capitalize.js +7 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic-from-mapped-key.js +25 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intrinsic/intrinsic.js +55 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intrinsic/lowercase.js +7 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uncapitalize.js +7 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/intrinsic/uppercase.js +7 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/iterator/iterator.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-from-mapped-result.js +19 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof-property-keys.js +36 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/keyof/keyof.js +31 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/literal/literal.js +12 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped-result.js +11 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/mapped/mapped.js +76 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/module/compute.js +122 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/module/module.js +28 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/never/never.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/not/not.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/null/null.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/number/number.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/object/object.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-key.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/omit/omit-from-mapped-result.js +19 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/omit/omit.js +48 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/optional/optional-from-mapped-result.js +18 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/optional/optional.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/parameters/parameters.js +9 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/partial/partial-from-mapped-result.js +19 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/partial/partial.js +53 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/patterns/patterns.js +16 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-key.js +23 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/pick/pick-from-mapped-result.js +19 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/pick/pick.js +48 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/promise/promise.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly-from-mapped-result.js +18 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/readonly/readonly.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/readonly-optional/readonly-optional.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/record/record.js +71 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/recursive/recursive.js +15 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/ref/ref.js +12 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/regexp/regexp.js +10 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/required/required-from-mapped-result.js +18 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/required/required.js +52 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/rest/rest.js +10 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/return-type/return-type.js +9 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/sets/set.js +30 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/string/string.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/symbol/symbol.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/symbols/symbols.js +12 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/template-literal/finite.js +27 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/template-literal/generate.js +38 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/template-literal/parse.js +128 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/template-literal/pattern.js +21 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/template-literal/syntax.js +45 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/template-literal/template-literal.js +12 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/template-literal/union.js +11 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/transform/transform.js +37 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/tuple/tuple.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/type/index.js +5 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/type/type.js +126 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/uint8array/uint8array.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/undefined/undefined.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/union/union-create.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/union/union-evaluated.js +26 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/union/union.js +9 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/unknown/unknown.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/unsafe/unsafe.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/type/void/void.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/@sinclair/typebox/build/esm/value/guard/guard.js +18 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/dotenv/lib/main.js +318 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/ipaddr.js/lib/ipaddr.js +805 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/jiti/dist/jiti.js +3869 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/jiti/lib/jiti.js +26 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/json5/dist/index.js +1085 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/doc/anchors.js +12 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/doc/applyReviver.js +45 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/doc/createNode.js +58 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/log.js +8 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/Alias.js +111 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/Collection.js +138 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/Node.js +36 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/Pair.js +35 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/Scalar.js +25 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/YAMLMap.js +139 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/YAMLSeq.js +111 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/addPairToJSMap.js +59 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/identity.js +52 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/nodes/toJS.js +25 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/parse/lexer.js +6 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/schema/yaml-1.1/merge.js +55 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/schema/yaml-1.1/omap.js +50 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/schema/yaml-1.1/pairs.js +37 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/schema/yaml-1.1/set.js +65 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/stringify/foldFlowLines.js +131 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/stringify/stringify.js +119 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/stringify/stringifyCollection.js +146 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/stringify/stringifyComment.js +12 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/stringify/stringifyPair.js +128 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/stringify/stringifyString.js +278 -0
- package/dist/node_modules/.pnpm/openclaw@2026.4.14_@emnapi__48b26e3018d2f6ac73290fb8288ef325/node_modules/openclaw/node_modules/yaml/browser/dist/visit.js +104 -0
- package/dist/packages/plugin/src/accounts.js +200 -0
- package/dist/packages/plugin/src/api/accounts-api.js +133 -0
- package/dist/packages/plugin/src/api/prompts-api.js +105 -0
- package/dist/packages/plugin/src/api/session-api.js +172 -0
- package/dist/packages/plugin/src/api/skills-api.js +61 -0
- package/dist/packages/plugin/src/api/workspace.js +30 -0
- package/dist/packages/plugin/src/channel.js +209 -0
- package/dist/packages/plugin/src/config-schema.js +51 -0
- package/dist/packages/plugin/src/connection/workclaw-client.js +282 -0
- package/dist/packages/plugin/src/gateway/agent-handlers.js +408 -0
- package/dist/packages/plugin/src/gateway/config-writer.js +157 -0
- package/dist/packages/plugin/src/gateway/cron-tasks-handler.js +184 -0
- package/dist/packages/plugin/src/gateway/message-context.js +411 -0
- package/dist/packages/plugin/src/gateway/message-dispatcher.js +519 -0
- package/dist/packages/plugin/src/gateway/reconnect.js +178 -0
- package/dist/packages/plugin/src/gateway/skills-handler.js +511 -0
- package/dist/packages/plugin/src/gateway/skills-list-handler.js +173 -0
- package/dist/packages/plugin/src/gateway/tools-list-handler.js +89 -0
- package/dist/packages/plugin/src/gateway/workclaw-gateway.js +245 -0
- package/dist/packages/plugin/src/logging.js +62 -0
- package/dist/packages/plugin/src/media/upload.js +126 -0
- package/dist/packages/plugin/src/outbound/index.js +89 -0
- package/dist/packages/plugin/src/outbound/workclaw-sender.js +79 -0
- package/dist/packages/plugin/src/setup-core.js +22 -0
- package/dist/packages/plugin/src/setup-surface.js +338 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/api/index.js +186 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/index.js +30 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/add/params.js +147 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/add/sync.js +154 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/disable/params.js +62 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/disable/sync.js +86 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/enable/params.js +62 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/enable/sync.js +86 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/notify/sync.js +103 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/remove/params.js +68 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/remove/sync.js +86 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/update/params.js +141 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/update/sync.js +114 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/utils/index.js +99 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/utils/tool-context.js +29 -0
- package/dist/packages/plugin/src/types/system.js +8 -0
- package/dist/setup-entry.d.ts +2 -1
- package/dist/setup-entry.d.ts.map +1 -0
- package/dist/setup-entry.js +14 -11
- package/dist/src/accounts.d.ts +20 -19
- package/dist/src/accounts.d.ts.map +1 -0
- package/dist/src/api/accounts-api.d.ts +2 -1
- package/dist/src/api/accounts-api.d.ts.map +1 -0
- package/dist/src/api/prompts-api.d.ts +2 -1
- package/dist/src/api/prompts-api.d.ts.map +1 -0
- package/dist/src/api/session-api.d.ts +2 -1
- package/dist/src/api/session-api.d.ts.map +1 -0
- package/dist/src/api/skills-api.d.ts +2 -1
- package/dist/src/api/skills-api.d.ts.map +1 -0
- package/dist/src/api/workspace.d.ts +2 -1
- package/dist/src/api/workspace.d.ts.map +1 -0
- package/dist/src/channel.d.ts +3 -2
- package/dist/src/channel.d.ts.map +1 -0
- package/dist/src/config-schema.d.ts +1 -6
- package/dist/src/config-schema.d.ts.map +1 -0
- package/dist/src/connection/workclaw-client.d.ts +6 -4
- package/dist/src/connection/workclaw-client.d.ts.map +1 -0
- package/dist/src/gateway/agent-handlers.d.ts +4 -3
- package/dist/src/gateway/agent-handlers.d.ts.map +1 -0
- package/dist/src/gateway/config-writer.d.ts +32 -30
- package/dist/src/gateway/config-writer.d.ts.map +1 -0
- package/dist/src/gateway/cron-tasks-handler.d.ts +3 -1
- package/dist/src/gateway/cron-tasks-handler.d.ts.map +1 -0
- package/dist/src/gateway/message-context.d.ts +15 -17
- package/dist/src/gateway/message-context.d.ts.map +1 -0
- package/dist/src/gateway/message-dispatcher.d.ts +3 -4
- package/dist/src/gateway/message-dispatcher.d.ts.map +1 -0
- package/dist/src/gateway/reconnect.d.ts +6 -8
- package/dist/src/gateway/reconnect.d.ts.map +1 -0
- package/dist/src/gateway/skills-handler.d.ts +1 -0
- package/dist/src/gateway/skills-handler.d.ts.map +1 -0
- package/dist/src/gateway/skills-list-handler.d.ts +1 -0
- package/dist/src/gateway/skills-list-handler.d.ts.map +1 -0
- package/dist/src/gateway/tools-list-handler.d.ts +1 -0
- package/dist/src/gateway/tools-list-handler.d.ts.map +1 -0
- package/dist/src/gateway/workclaw-gateway.d.ts +2 -7
- package/dist/src/gateway/workclaw-gateway.d.ts.map +1 -0
- package/dist/src/logging.d.ts +55 -0
- package/dist/src/logging.d.ts.map +1 -0
- package/dist/src/media/upload.d.ts +1 -0
- package/dist/src/media/upload.d.ts.map +1 -0
- package/dist/src/outbound/index.d.ts +9 -6
- package/dist/src/outbound/index.d.ts.map +1 -0
- package/dist/src/outbound/workclaw-sender.d.ts +6 -4
- package/dist/src/outbound/workclaw-sender.d.ts.map +1 -0
- package/dist/src/runtime.d.ts +4 -17
- package/dist/src/runtime.d.ts.map +1 -0
- package/dist/src/runtime.js +324 -365
- package/dist/src/secret-contract-api.d.ts +1 -0
- package/dist/src/secret-contract-api.d.ts.map +1 -0
- package/dist/src/secret-contract-api.js +6 -3
- package/dist/src/send.d.ts +2 -1
- package/dist/src/send.d.ts.map +1 -0
- package/dist/src/setup-api.d.ts +4 -3
- package/dist/src/setup-api.d.ts.map +1 -0
- package/dist/src/setup-core.d.ts +2 -1
- package/dist/src/setup-core.d.ts.map +1 -0
- package/dist/src/setup-surface.d.ts +3 -2
- package/dist/src/setup-surface.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/api/index.d.ts +3 -4
- package/dist/src/tools/openclaw-workclaw-cron/api/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/index.d.ts +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/add/params.d.ts +3 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/add/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.d.ts +3 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.d.ts +2 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.d.ts +2 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.d.ts +2 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.d.ts +2 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.d.ts +2 -9
- package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.d.ts +2 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.d.ts +2 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/update/params.d.ts +2 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/update/params.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.d.ts +2 -7
- package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/types/index.d.ts +2 -1
- package/dist/src/tools/openclaw-workclaw-cron/types/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/utils/index.d.ts +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/utils/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-cron/utils/tool-context.d.ts +10 -0
- package/dist/src/tools/openclaw-workclaw-cron/utils/tool-context.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-system/index.d.ts +1 -0
- package/dist/src/tools/openclaw-workclaw-system/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-system/src/get/index.d.ts +2 -4
- package/dist/src/tools/openclaw-workclaw-system/src/get/index.d.ts.map +1 -0
- package/dist/src/tools/openclaw-workclaw-system/src/token/index.d.ts +2 -4
- package/dist/src/tools/openclaw-workclaw-system/src/token/index.d.ts.map +1 -0
- package/dist/src/types/account.d.ts +15 -0
- package/dist/src/types/account.d.ts.map +1 -0
- package/dist/src/{types.d.ts → types/config.d.ts} +4 -16
- package/dist/src/types/config.d.ts.map +1 -0
- package/dist/src/types/index.d.ts +4 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/system.d.ts +17 -0
- package/dist/src/types/system.d.ts.map +1 -0
- package/dist/src/utils/content.d.ts +6 -5
- package/dist/src/utils/content.d.ts.map +1 -0
- package/openclaw.plugin.json +45 -0
- package/package.json +71 -45
- package/skills/openclaw-workclaw-cron/SKILL.md +6 -3
- package/api.ts +0 -3
- package/dist/src/accounts.js +0 -279
- package/dist/src/api/accounts-api.js +0 -130
- package/dist/src/api/prompts-api.js +0 -103
- package/dist/src/api/session-api.js +0 -207
- package/dist/src/api/skills-api.js +0 -64
- package/dist/src/api/workspace.js +0 -30
- package/dist/src/channel.js +0 -199
- package/dist/src/config-schema.js +0 -56
- package/dist/src/connection/workclaw-client.js +0 -351
- package/dist/src/gateway/agent-handlers.js +0 -433
- package/dist/src/gateway/config-writer.js +0 -302
- package/dist/src/gateway/cron-tasks-handler.js +0 -188
- package/dist/src/gateway/message-context.js +0 -509
- package/dist/src/gateway/message-dispatcher.js +0 -572
- package/dist/src/gateway/reconnect.js +0 -210
- package/dist/src/gateway/skills-handler.js +0 -615
- package/dist/src/gateway/skills-list-handler.js +0 -233
- package/dist/src/gateway/tools-list-handler.js +0 -101
- package/dist/src/gateway/workclaw-gateway.js +0 -237
- package/dist/src/media/upload.js +0 -125
- package/dist/src/outbound/index.js +0 -123
- package/dist/src/outbound/workclaw-sender.js +0 -95
- package/dist/src/send.js +0 -1
- package/dist/src/setup-api.js +0 -3
- package/dist/src/setup-core.js +0 -13
- package/dist/src/setup-surface.js +0 -363
- package/dist/src/tools/openclaw-workclaw-cron/api/index.js +0 -209
- package/dist/src/tools/openclaw-workclaw-cron/index.js +0 -33
- package/dist/src/tools/openclaw-workclaw-cron/src/add/params.js +0 -152
- package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.js +0 -162
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.js +0 -80
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.js +0 -107
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.js +0 -80
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.js +0 -107
- package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.js +0 -127
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.js +0 -87
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.js +0 -107
- package/dist/src/tools/openclaw-workclaw-cron/src/update/params.js +0 -164
- package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.js +0 -135
- package/dist/src/tools/openclaw-workclaw-cron/types/index.js +0 -4
- package/dist/src/tools/openclaw-workclaw-cron/utils/index.js +0 -122
- package/dist/src/tools/openclaw-workclaw-system/index.js +0 -15
- package/dist/src/tools/openclaw-workclaw-system/src/get/index.js +0 -64
- package/dist/src/tools/openclaw-workclaw-system/src/token/index.js +0 -78
- package/dist/src/types.js +0 -1
- package/dist/src/utils/content.js +0 -38
- package/index.ts +0 -326
- package/setup-entry.ts +0 -13
- package/src/accounts.ts +0 -360
- package/src/api/accounts-api.ts +0 -156
- package/src/api/prompts-api.ts +0 -122
- package/src/api/session-api.ts +0 -246
- package/src/api/skills-api.ts +0 -74
- package/src/api/workspace.ts +0 -45
- package/src/channel.ts +0 -226
- package/src/config-schema.ts +0 -62
- package/src/connection/workclaw-client.ts +0 -618
- package/src/gateway/agent-handlers.ts +0 -551
- package/src/gateway/config-writer.ts +0 -378
- package/src/gateway/cron-tasks-handler.ts +0 -230
- package/src/gateway/message-context.ts +0 -645
- package/src/gateway/message-dispatcher.ts +0 -688
- package/src/gateway/reconnect.ts +0 -260
- package/src/gateway/skills-handler.ts +0 -805
- package/src/gateway/skills-list-handler.ts +0 -332
- package/src/gateway/tools-list-handler.ts +0 -161
- package/src/gateway/workclaw-gateway.ts +0 -305
- package/src/media/upload.ts +0 -168
- package/src/outbound/index.ts +0 -191
- package/src/outbound/workclaw-sender.ts +0 -161
- package/src/runtime.ts +0 -520
- package/src/secret-contract-api.ts +0 -4
- package/src/send.ts +0 -1
- package/src/setup-api.ts +0 -3
- package/src/setup-core.ts +0 -25
- package/src/setup-surface.ts +0 -499
- package/src/tools/openclaw-workclaw-cron/api/index.ts +0 -326
- package/src/tools/openclaw-workclaw-cron/index.ts +0 -39
- package/src/tools/openclaw-workclaw-cron/src/add/params.ts +0 -177
- package/src/tools/openclaw-workclaw-cron/src/add/sync.ts +0 -188
- package/src/tools/openclaw-workclaw-cron/src/disable/params.ts +0 -100
- package/src/tools/openclaw-workclaw-cron/src/disable/sync.ts +0 -127
- package/src/tools/openclaw-workclaw-cron/src/enable/params.ts +0 -100
- package/src/tools/openclaw-workclaw-cron/src/enable/sync.ts +0 -127
- package/src/tools/openclaw-workclaw-cron/src/notify/sync.ts +0 -148
- package/src/tools/openclaw-workclaw-cron/src/remove/params.ts +0 -109
- package/src/tools/openclaw-workclaw-cron/src/remove/sync.ts +0 -127
- package/src/tools/openclaw-workclaw-cron/src/update/params.ts +0 -195
- package/src/tools/openclaw-workclaw-cron/src/update/sync.ts +0 -161
- package/src/tools/openclaw-workclaw-cron/types/index.ts +0 -55
- package/src/tools/openclaw-workclaw-cron/utils/index.ts +0 -141
- package/src/tools/openclaw-workclaw-system/index.ts +0 -17
- package/src/tools/openclaw-workclaw-system/src/get/index.ts +0 -77
- package/src/tools/openclaw-workclaw-system/src/token/index.ts +0 -93
- package/src/types.ts +0 -52
- package/src/utils/content.ts +0 -40
- package/tsconfig.json +0 -34
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import { existsSync, readdirSync, statSync, readFileSync } from "node:fs";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import logger from "../logging.js";
|
|
6
|
+
async function handleSkillsListEvent(event, baseUrl, token, log) {
|
|
7
|
+
const agentId = Number(event.agentId);
|
|
8
|
+
const userId = Number(event.userId);
|
|
9
|
+
logger.info(`技能列表: 处理 SKILLS_LIST 事件 agentId: ${agentId}, userId: ${userId}`);
|
|
10
|
+
try {
|
|
11
|
+
const skills = await fetchSkillsFromOpenClaw(agentId, userId, log);
|
|
12
|
+
const callbackPayload = {
|
|
13
|
+
userId,
|
|
14
|
+
agentId,
|
|
15
|
+
dataList: skills
|
|
16
|
+
};
|
|
17
|
+
const callbackUrl = `${baseUrl.replace(/\/$/, "")}/open-apis/v1/claw/push/skills`;
|
|
18
|
+
await sendSkillsListCallback(callbackUrl, callbackPayload, token, log);
|
|
19
|
+
logger.info(`技能列表: 成功处理 SKILLS_LIST 事件,发送了 ${skills.length} 个技能`);
|
|
20
|
+
} catch (error) {
|
|
21
|
+
logger.error(`技能列表: 处理 SKILLS_LIST 事件失败: ${String(error)}`);
|
|
22
|
+
throw error;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
async function fetchSkillsFromOpenClaw(agentId, _userId, log) {
|
|
26
|
+
logger.info(`技能列表: 从 OpenClaw 获取技能列表 agentId: ${agentId}`);
|
|
27
|
+
try {
|
|
28
|
+
const result = execSync("openclaw skills list", {
|
|
29
|
+
encoding: "utf-8",
|
|
30
|
+
timeout: 3e4
|
|
31
|
+
// 30秒超时
|
|
32
|
+
});
|
|
33
|
+
const globalSkills = parseSkillsListOutput(result);
|
|
34
|
+
const agentWorkspaceSkills = await fetchAgentWorkspaceSkills(agentId, log);
|
|
35
|
+
const allSkills = mergeSkills(globalSkills, agentWorkspaceSkills);
|
|
36
|
+
logger.info(`技能列表: 找到 ${allSkills.length} 个技能 (${globalSkills.length} 个全局,${agentWorkspaceSkills.length} 个智能体专有)`);
|
|
37
|
+
return allSkills;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
logger.error(`技能列表: 获取技能时出错: ${String(error)}`);
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
async function fetchAgentWorkspaceSkills(agentId, log) {
|
|
44
|
+
const skills = [];
|
|
45
|
+
try {
|
|
46
|
+
const agentWorkspace = join(homedir(), ".openclaw", "agents", `openclaw-workclaw-${agentId}`);
|
|
47
|
+
const skillsDir = join(agentWorkspace, "skills");
|
|
48
|
+
if (!existsSync(skillsDir)) {
|
|
49
|
+
logger.info(`技能列表: 智能体工作区中没有找到技能目录: ${skillsDir}`);
|
|
50
|
+
return skills;
|
|
51
|
+
}
|
|
52
|
+
const items = readdirSync(skillsDir);
|
|
53
|
+
for (const item of items) {
|
|
54
|
+
const itemPath = join(skillsDir, item);
|
|
55
|
+
const stat = statSync(itemPath);
|
|
56
|
+
if (stat.isDirectory()) {
|
|
57
|
+
const skillFiles = readdirSync(itemPath);
|
|
58
|
+
for (const skillFile of skillFiles) {
|
|
59
|
+
if (skillFile.endsWith(".md") || skillFile.endsWith(".prose")) {
|
|
60
|
+
const skillFilePath = join(itemPath, skillFile);
|
|
61
|
+
const skill = parseSkillFile(skillFilePath, item, log);
|
|
62
|
+
if (skill) {
|
|
63
|
+
skills.push(skill);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
logger.info(`技能列表: 在 ${skillsDir} 中找到 ${skills.length} 个智能体专有技能`);
|
|
70
|
+
} catch (error) {
|
|
71
|
+
logger.error(`技能列表: 读取智能体工作区技能时出错: ${String(error)}`);
|
|
72
|
+
}
|
|
73
|
+
return skills;
|
|
74
|
+
}
|
|
75
|
+
function parseSkillFile(filePath, skillName, log) {
|
|
76
|
+
try {
|
|
77
|
+
const content = readFileSync(filePath, "utf-8");
|
|
78
|
+
let description = "Agent-specific skill";
|
|
79
|
+
const lines = content.split("\n");
|
|
80
|
+
for (const line of lines) {
|
|
81
|
+
if (line.startsWith("# ")) {
|
|
82
|
+
description = line.substring(2).trim();
|
|
83
|
+
break;
|
|
84
|
+
} else if (line.startsWith("summary:") || line.startsWith("Summary:")) {
|
|
85
|
+
description = line.substring(line.indexOf(":") + 1).trim();
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
typeStr: "skill",
|
|
91
|
+
name: skillName,
|
|
92
|
+
description
|
|
93
|
+
};
|
|
94
|
+
} catch (error) {
|
|
95
|
+
logger.error(`技能列表: 解析技能文件 ${filePath} 时出错: ${String(error)}`);
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
function mergeSkills(globalSkills, agentSkills) {
|
|
100
|
+
const skillMap = /* @__PURE__ */ new Map();
|
|
101
|
+
for (const skill of globalSkills) {
|
|
102
|
+
skillMap.set(skill.name, skill);
|
|
103
|
+
}
|
|
104
|
+
for (const skill of agentSkills) {
|
|
105
|
+
skillMap.set(skill.name, skill);
|
|
106
|
+
}
|
|
107
|
+
return Array.from(skillMap.values());
|
|
108
|
+
}
|
|
109
|
+
function parseSkillsListOutput(output) {
|
|
110
|
+
const skills = [];
|
|
111
|
+
const lines = output.split("\n");
|
|
112
|
+
let inTable = false;
|
|
113
|
+
let headerLine = -1;
|
|
114
|
+
for (let i = 0; i < lines.length; i++) {
|
|
115
|
+
const line = lines[i];
|
|
116
|
+
if (line.includes("Status") && line.includes("Skill") && line.includes("Description")) {
|
|
117
|
+
headerLine = i;
|
|
118
|
+
inTable = true;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
121
|
+
if (inTable && (line.startsWith("├") || line.startsWith("┌") || line.startsWith("└"))) {
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
if (inTable && line.startsWith("│") && i > headerLine + 1) {
|
|
125
|
+
const parsed = parseSkillsTableRow(line);
|
|
126
|
+
if (parsed) {
|
|
127
|
+
skills.push(parsed);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (inTable && line.startsWith("└")) {
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return skills;
|
|
135
|
+
}
|
|
136
|
+
function parseSkillsTableRow(line) {
|
|
137
|
+
const content = line.replace(/^│\s*/, "").replace(/\s*│$/, "");
|
|
138
|
+
const columns = content.split("│").map((col) => col.trim());
|
|
139
|
+
if (columns.length < 4) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
const status = columns[0];
|
|
143
|
+
const skillName = columns[1];
|
|
144
|
+
const description = columns[2];
|
|
145
|
+
if (!status.includes("✓") && !status.includes("ready")) {
|
|
146
|
+
return null;
|
|
147
|
+
}
|
|
148
|
+
const cleanName = skillName.replace(/[\u{1F300}-\u{1F9FF}]/gu, "").trim();
|
|
149
|
+
return {
|
|
150
|
+
typeStr: "skill",
|
|
151
|
+
name: cleanName,
|
|
152
|
+
description
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
async function sendSkillsListCallback(callbackUrl, payload, token, log) {
|
|
156
|
+
logger.info(`技能列表: 发送回调到 ${callbackUrl}`);
|
|
157
|
+
const response = await fetch(callbackUrl, {
|
|
158
|
+
method: "POST",
|
|
159
|
+
headers: {
|
|
160
|
+
"Content-Type": "application/json",
|
|
161
|
+
"Authorization": `Bearer ${token}`
|
|
162
|
+
},
|
|
163
|
+
body: JSON.stringify(payload)
|
|
164
|
+
});
|
|
165
|
+
if (!response.ok) {
|
|
166
|
+
const errorText = await response.text().catch(() => "Unknown error");
|
|
167
|
+
throw new Error(`Callback failed: ${response.status} ${errorText}`);
|
|
168
|
+
}
|
|
169
|
+
logger.info(`技能列表: 回调发送成功`);
|
|
170
|
+
}
|
|
171
|
+
export {
|
|
172
|
+
handleSkillsListEvent
|
|
173
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { homedir } from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fetch } from "undici";
|
|
5
|
+
import logger from "../logging.js";
|
|
6
|
+
const WORKCLAW_CRON_TOOLS = [
|
|
7
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-add-params", description: "Generate the first-step cron parameters for creating a Workclaw reminder." },
|
|
8
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-add-sync", description: "Sync a newly created reminder job back to the Workclaw backend." },
|
|
9
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-update-params", description: "Generate the first-step cron parameters for updating a Workclaw reminder." },
|
|
10
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-update-sync", description: "Sync an updated reminder job back to the Workclaw backend." },
|
|
11
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-remove-params", description: "Generate the first-step parameters for removing a Workclaw reminder." },
|
|
12
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-remove-sync", description: "Sync a removed reminder job back to the Workclaw backend." },
|
|
13
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-enable-params", description: "Generate the first-step parameters for enabling a Workclaw reminder." },
|
|
14
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-enable-sync", description: "Sync an enabled reminder job back to the Workclaw backend." },
|
|
15
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-disable-params", description: "Generate the first-step parameters for disabling a Workclaw reminder." },
|
|
16
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-disable-sync", description: "Sync a disabled reminder job back to the Workclaw backend." },
|
|
17
|
+
{ typeStr: "function", name: "openclaw-workclaw-cron-notify-sync", description: "Sync reminder trigger notifications back to the Workclaw backend." }
|
|
18
|
+
];
|
|
19
|
+
async function handleToolsListEvent(event, baseUrl, token, log) {
|
|
20
|
+
const agentId = Number(event.agentId);
|
|
21
|
+
const userId = Number(event.userId);
|
|
22
|
+
logger.info(`工具列表: 处理 TOOLS_LIST 事件,agentId: ${agentId}, userId: ${userId}`);
|
|
23
|
+
try {
|
|
24
|
+
const tools = await fetchToolsFromOpenClaw(agentId, userId, log);
|
|
25
|
+
const callbackPayload = {
|
|
26
|
+
userId,
|
|
27
|
+
agentId,
|
|
28
|
+
dataList: tools
|
|
29
|
+
};
|
|
30
|
+
const callbackUrl = `${baseUrl.replace(/\/$/, "")}/open-apis/v1/claw/push/tools`;
|
|
31
|
+
await sendToolsListCallback(callbackUrl, callbackPayload, token, log);
|
|
32
|
+
logger.info(`[智小途-工具列表] 成功处理 TOOLS_LIST 事件,发送了 ${tools.length} 个工具`);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
logger.error(`[智小途-工具列表] 处理 TOOLS_LIST 事件失败: ${String(error)}`);
|
|
35
|
+
throw error;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function fetchToolsFromOpenClaw(agentId, userId, log) {
|
|
39
|
+
logger.info(`工具列表: 从 OpenClaw 获取工具列表 agentId: ${agentId}`);
|
|
40
|
+
const allTools = [
|
|
41
|
+
{ typeStr: "function", name: "web_search", description: "Search the web for information using Brave Search API." },
|
|
42
|
+
{ typeStr: "function", name: "web_fetch", description: "Fetch and read content from a URL." },
|
|
43
|
+
{ typeStr: "function", name: "sessions_list", description: "List all active agent sessions." },
|
|
44
|
+
{ typeStr: "function", name: "sessions_history", description: "Get the history of a specific session." },
|
|
45
|
+
{ typeStr: "function", name: "memory_search", description: "Search memory for past conversations and information." },
|
|
46
|
+
{ typeStr: "function", name: "memory_get", description: "Get specific memory by ID." },
|
|
47
|
+
{ typeStr: "function", name: "gateway", description: "Gateway control operations." },
|
|
48
|
+
{ typeStr: "function", name: "exec", description: "Execute shell commands." },
|
|
49
|
+
...WORKCLAW_CRON_TOOLS
|
|
50
|
+
];
|
|
51
|
+
try {
|
|
52
|
+
const configPath = path.join(homedir(), ".openclaw", "openclaw.json");
|
|
53
|
+
const configContent = await readFile(configPath, "utf-8");
|
|
54
|
+
const config = JSON.parse(configContent);
|
|
55
|
+
const agentConfig = config.agents?.list?.find(
|
|
56
|
+
(agent) => String(agent.id) === String(agentId) || agent.id === `openclaw-workclaw-${agentId}`
|
|
57
|
+
);
|
|
58
|
+
const allowTools = agentConfig?.tools?.allow;
|
|
59
|
+
if (!allowTools || allowTools.length === 0 || allowTools.includes("*")) {
|
|
60
|
+
logger.info(`工具列表: 智能体没有 allow 限制或 allow=[*],返回全部 ${allTools.length} 个工具`);
|
|
61
|
+
return allTools;
|
|
62
|
+
}
|
|
63
|
+
const filteredTools = allTools.filter((tool) => allowTools.includes(tool.name));
|
|
64
|
+
logger.info(`工具列表: 智能体 allow=${JSON.stringify(allowTools)},返回 ${filteredTools.length} 个工具`);
|
|
65
|
+
return filteredTools;
|
|
66
|
+
} catch (error) {
|
|
67
|
+
logger.error(`工具列表: 读取智能体配置时出错: ${String(error)},返回全部工具`);
|
|
68
|
+
return allTools;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function sendToolsListCallback(callbackUrl, payload, token, log) {
|
|
72
|
+
logger.info(`工具列表: 发送回调到 ${callbackUrl}`);
|
|
73
|
+
const response = await fetch(callbackUrl, {
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers: {
|
|
76
|
+
"Content-Type": "application/json",
|
|
77
|
+
"Authorization": `Bearer ${token}`
|
|
78
|
+
},
|
|
79
|
+
body: JSON.stringify(payload)
|
|
80
|
+
});
|
|
81
|
+
if (!response.ok) {
|
|
82
|
+
const errorText = await response.text();
|
|
83
|
+
throw new Error(`Callback failed: ${response.status} ${response.statusText} - ${errorText}`);
|
|
84
|
+
}
|
|
85
|
+
logger.info(`[智小途-工具列表] 回调发送成功: ${response.status}`);
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
handleToolsListEvent
|
|
89
|
+
};
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { buildAccountMap, resolveAccountByUserIdAndAgentId } from "../accounts.js";
|
|
2
|
+
import { getAppKeyByAccountId, unregisterAccountContext, getAllDispatchersByAppKey, getWorkclawWsConnection, clearWorkclawWsConnection, getReconnectScheduler, clearReconnectScheduler, clearWorkclawConnectionConfig, registerAccountContext, tryStartConnecting, setReconnectScheduler, finishConnecting, setWorkclawConnectionConfig, getDispatcherByAppKeyAndAccountId } from "../../../../src/runtime.js";
|
|
3
|
+
import logger from "../logging.js";
|
|
4
|
+
import { parseWorkClawMessage } from "./message-context.js";
|
|
5
|
+
import { dispatchWorkclawMessage } from "./message-dispatcher.js";
|
|
6
|
+
import { createReconnectScheduler } from "./reconnect.js";
|
|
7
|
+
async function startWorkclawGateway(options) {
|
|
8
|
+
await startSharedWebSocket(options);
|
|
9
|
+
}
|
|
10
|
+
function normalizeCronTaskEventToAgentMessageData(data, parsed) {
|
|
11
|
+
const cronData = parsed.eventData?.data ?? {};
|
|
12
|
+
const normalizedPayload = {
|
|
13
|
+
conversationId: null,
|
|
14
|
+
message: cronData.message ?? cronData.name ?? null,
|
|
15
|
+
agentId: cronData.mainId ?? cronData.agentIds?.[0] ?? null,
|
|
16
|
+
chatType: null,
|
|
17
|
+
sendTime: cronData.startTime ?? null,
|
|
18
|
+
userId: cronData.userId ?? null,
|
|
19
|
+
conversationType: null,
|
|
20
|
+
orgId: null,
|
|
21
|
+
fileId: null,
|
|
22
|
+
fileIds: null,
|
|
23
|
+
fileUrl: [],
|
|
24
|
+
taskId: cronData.taskId ?? null
|
|
25
|
+
};
|
|
26
|
+
let input = {};
|
|
27
|
+
try {
|
|
28
|
+
input = data ? JSON.parse(data) : {};
|
|
29
|
+
} catch {
|
|
30
|
+
input = {};
|
|
31
|
+
}
|
|
32
|
+
return JSON.stringify({
|
|
33
|
+
specVersion: input?.specVersion ?? "1.0",
|
|
34
|
+
type: "CALLBACK",
|
|
35
|
+
metadata: {
|
|
36
|
+
topic: "AGENT_MESSAGE",
|
|
37
|
+
time: input?.metadata?.time ?? `${Date.now()}`,
|
|
38
|
+
contentType: "application/json"
|
|
39
|
+
},
|
|
40
|
+
data: JSON.stringify(normalizedPayload)
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async function startSharedWebSocket(options) {
|
|
44
|
+
const { accountId, account, cfg } = options;
|
|
45
|
+
logger.info(`[智小途-网关] 启动 accountId=${accountId}`);
|
|
46
|
+
const rawConfig = account.config;
|
|
47
|
+
const baseConfig = {
|
|
48
|
+
baseUrl: rawConfig.baseUrl,
|
|
49
|
+
websocketUrl: rawConfig.websocketUrl,
|
|
50
|
+
appKey: rawConfig.appKey,
|
|
51
|
+
appSecret: rawConfig.appSecret,
|
|
52
|
+
localIp: rawConfig.localIp,
|
|
53
|
+
allowInsecureTls: rawConfig.allowInsecureTls,
|
|
54
|
+
requestTimeout: rawConfig.requestTimeout,
|
|
55
|
+
dmPolicy: rawConfig.dmPolicy ?? "open"
|
|
56
|
+
};
|
|
57
|
+
const accountConfig = {
|
|
58
|
+
agentId: rawConfig.agentId,
|
|
59
|
+
userId: rawConfig.userId,
|
|
60
|
+
openConversationId: rawConfig.openConversationId
|
|
61
|
+
};
|
|
62
|
+
const appKey = baseConfig.appKey || accountId;
|
|
63
|
+
const appKeyRaw = baseConfig.appKey ?? "";
|
|
64
|
+
buildAccountMap(cfg);
|
|
65
|
+
logger.info(
|
|
66
|
+
`Gateway start accountId=${accountId} appKey=${appKeyRaw ? `${appKeyRaw.slice(0, 8)}...` : "missing"} baseUrl=${baseConfig.baseUrl ?? ""} websocketUrl=${baseConfig.websocketUrl ?? ""}`
|
|
67
|
+
);
|
|
68
|
+
const ctx = {
|
|
69
|
+
accountId,
|
|
70
|
+
account,
|
|
71
|
+
cfg,
|
|
72
|
+
baseConfig,
|
|
73
|
+
accountConfig,
|
|
74
|
+
log: logger,
|
|
75
|
+
scheduleReconnect: () => {
|
|
76
|
+
const scheduler2 = getReconnectScheduler(appKey);
|
|
77
|
+
scheduler2?.scheduleReconnect();
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
registerAccountContext(appKey, accountId, ctx);
|
|
81
|
+
const existingWs = getWorkclawWsConnection(appKey);
|
|
82
|
+
if (existingWs) {
|
|
83
|
+
logger.info(`Gateway using existing WebSocket for appKey=${appKey}`);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const startResult = tryStartConnecting(appKey);
|
|
87
|
+
if (!startResult.isConnector) {
|
|
88
|
+
logger.info(`Gateway another account is connecting, waiting... appKey=${appKey}`);
|
|
89
|
+
const resultWs = await startResult.connectingPromise;
|
|
90
|
+
if (resultWs) {
|
|
91
|
+
logger.info(`Gateway connection established by another account, using it appKey=${appKey}`);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
logger.warn(`Gateway connection attempt failed, will create own connection appKey=${appKey}`);
|
|
95
|
+
} else {
|
|
96
|
+
logger.info(`Gateway acquired connector lock, creating connection appKey=${appKey}`);
|
|
97
|
+
}
|
|
98
|
+
const scheduler = createReconnectScheduler({
|
|
99
|
+
key: appKey,
|
|
100
|
+
config: baseConfig,
|
|
101
|
+
onMessage: (data) => {
|
|
102
|
+
handleSharedMessage(appKey, data, cfg, logger);
|
|
103
|
+
},
|
|
104
|
+
onClose: () => {
|
|
105
|
+
scheduler.scheduleReconnect();
|
|
106
|
+
},
|
|
107
|
+
// 旧代码在 setWorkclawWsConnection 后、ws.onopen 前就调用 finishConnecting,
|
|
108
|
+
// 这个回调模拟同样的时机:ws 已存入 runtime,通知所有等待者
|
|
109
|
+
onConnectingStarted: (ws) => {
|
|
110
|
+
finishConnecting(appKey, ws);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
setReconnectScheduler(appKey, scheduler);
|
|
114
|
+
try {
|
|
115
|
+
await scheduler.connect();
|
|
116
|
+
} catch (err) {
|
|
117
|
+
finishConnecting(appKey);
|
|
118
|
+
throw err;
|
|
119
|
+
}
|
|
120
|
+
setWorkclawConnectionConfig(accountId, {
|
|
121
|
+
appKey: baseConfig.appKey ?? "",
|
|
122
|
+
appSecret: baseConfig.appSecret ?? "",
|
|
123
|
+
baseUrl: baseConfig.baseUrl,
|
|
124
|
+
websocketUrl: baseConfig.websocketUrl,
|
|
125
|
+
localIp: baseConfig.localIp,
|
|
126
|
+
allowInsecureTls: baseConfig.allowInsecureTls,
|
|
127
|
+
requestTimeout: baseConfig.requestTimeout
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
function handleSharedMessage(appKey, data, cfg, logger2) {
|
|
131
|
+
const parsed = parseWorkClawMessage(data);
|
|
132
|
+
logger2.info(`网关收到消息: ${JSON.stringify(parsed)}`);
|
|
133
|
+
if (!parsed) {
|
|
134
|
+
logger2.warn(`网关解析消息失败`);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (parsed.type === "ping") {
|
|
138
|
+
const ws = getWorkclawWsConnection(appKey);
|
|
139
|
+
if (ws && ws.readyState === 1) {
|
|
140
|
+
const pongResponse = {
|
|
141
|
+
code: 200,
|
|
142
|
+
message: "pong",
|
|
143
|
+
metadata: { contentType: "application/json" },
|
|
144
|
+
data: JSON.stringify(parsed.pongData)
|
|
145
|
+
};
|
|
146
|
+
ws.send(JSON.stringify(pongResponse));
|
|
147
|
+
}
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
if (parsed.type === "disconnect") {
|
|
151
|
+
const ws = getWorkclawWsConnection(appKey);
|
|
152
|
+
ws?.close();
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
let userId = "";
|
|
156
|
+
let agentId = "";
|
|
157
|
+
if (parsed.type === "agent_message" && parsed.message) {
|
|
158
|
+
userId = String(parsed.message.userId || "");
|
|
159
|
+
agentId = String(parsed.message.agentId || "");
|
|
160
|
+
} else if (parsed.type === "agent_created") {
|
|
161
|
+
const allDispatchers = getAllDispatchersByAppKey(appKey);
|
|
162
|
+
if (allDispatchers && allDispatchers.size > 0) {
|
|
163
|
+
const firstDispatcher = allDispatchers.values().next().value;
|
|
164
|
+
if (firstDispatcher) {
|
|
165
|
+
dispatchWorkclawMessage(data, firstDispatcher.ctx).catch((err) => {
|
|
166
|
+
logger2.error(`分发消息错误: ${String(err)}`);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
return;
|
|
171
|
+
} else if (parsed.type === "agent_updated" || parsed.type === "agent_deleted") {
|
|
172
|
+
userId = String(parsed.eventData?.futureId || parsed.eventData?.userId || "");
|
|
173
|
+
agentId = String(parsed.eventData?.id || parsed.eventData?.agentId || "");
|
|
174
|
+
} else if (parsed.type === "tools_list") {
|
|
175
|
+
userId = String(parsed.eventData?.userId || "");
|
|
176
|
+
agentId = String(parsed.eventData?.agentId || "");
|
|
177
|
+
} else if (parsed.type === "skills_list" || parsed.type === "skills_event") {
|
|
178
|
+
userId = String(parsed.eventData?.data?.userId || parsed.eventData?.userId || "");
|
|
179
|
+
agentId = String(parsed.eventData?.data?.agentIds?.[0] || parsed.eventData?.data?.agentId || parsed.eventData?.agentId || "");
|
|
180
|
+
} else if (parsed.type === "init_agent") {
|
|
181
|
+
userId = String(parsed.eventData?.futureId || parsed.eventData?.userId || "");
|
|
182
|
+
agentId = String(parsed.eventData?.id || parsed.eventData?.agentId || "");
|
|
183
|
+
const accountId2 = "default";
|
|
184
|
+
const dispatcher2 = getDispatcherByAppKeyAndAccountId(appKey, accountId2);
|
|
185
|
+
if (dispatcher2) {
|
|
186
|
+
dispatchWorkclawMessage(data, dispatcher2.ctx).catch((err) => {
|
|
187
|
+
logger2.error(`分发消息错误: ${String(err)}`);
|
|
188
|
+
});
|
|
189
|
+
} else {
|
|
190
|
+
logger2.warn(`网关未找到账户 ${accountId2} 的调度器`);
|
|
191
|
+
}
|
|
192
|
+
return;
|
|
193
|
+
} else if (parsed.type === "cron_task_event") {
|
|
194
|
+
const userId2 = String(parsed.eventData.data.userId || "");
|
|
195
|
+
const agentId2 = String(parsed.eventData.data.mainId || "");
|
|
196
|
+
const accountId2 = resolveAccountByUserIdAndAgentId(cfg, userId2, agentId2);
|
|
197
|
+
const dispatcher2 = getDispatcherByAppKeyAndAccountId(appKey, accountId2);
|
|
198
|
+
let normalizedData = data;
|
|
199
|
+
if (parsed.eventData.dotype === "add") {
|
|
200
|
+
normalizedData = normalizeCronTaskEventToAgentMessageData(data, parsed);
|
|
201
|
+
}
|
|
202
|
+
if (dispatcher2) {
|
|
203
|
+
dispatchWorkclawMessage(normalizedData, dispatcher2.ctx).catch((err) => {
|
|
204
|
+
logger2.error(`分发消息错误: ${String(err)}`);
|
|
205
|
+
});
|
|
206
|
+
} else {
|
|
207
|
+
logger2.warn(`网关(按 appKey)未找到账户 ${accountId2} 的调度器`);
|
|
208
|
+
}
|
|
209
|
+
return;
|
|
210
|
+
} else {
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
const accountId = resolveAccountByUserIdAndAgentId(cfg, userId, agentId);
|
|
214
|
+
if (!accountId) {
|
|
215
|
+
logger2.warn(`网关未找到账户: userId=${userId} agentId=${agentId}`);
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const dispatcher = getDispatcherByAppKeyAndAccountId(appKey, accountId);
|
|
219
|
+
if (dispatcher) {
|
|
220
|
+
dispatchWorkclawMessage(data, dispatcher.ctx).catch((err) => {
|
|
221
|
+
logger2.error(`分发消息错误: ${String(err)}`);
|
|
222
|
+
});
|
|
223
|
+
} else {
|
|
224
|
+
logger2.warn(`网关未找到账户 ${accountId} 的调度器`);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
function stopWorkclawGateway(accountId) {
|
|
228
|
+
const appKey = getAppKeyByAccountId(accountId);
|
|
229
|
+
if (!appKey)
|
|
230
|
+
return;
|
|
231
|
+
unregisterAccountContext(appKey, accountId);
|
|
232
|
+
if (getAllDispatchersByAppKey(appKey)?.size === 0) {
|
|
233
|
+
const ws = getWorkclawWsConnection(appKey);
|
|
234
|
+
ws?.close();
|
|
235
|
+
clearWorkclawWsConnection(appKey);
|
|
236
|
+
const scheduler = getReconnectScheduler(appKey);
|
|
237
|
+
scheduler?.stopReconnect();
|
|
238
|
+
clearReconnectScheduler(appKey);
|
|
239
|
+
}
|
|
240
|
+
clearWorkclawConnectionConfig(accountId);
|
|
241
|
+
}
|
|
242
|
+
export {
|
|
243
|
+
startWorkclawGateway,
|
|
244
|
+
stopWorkclawGateway
|
|
245
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
const LOG_LEVEL = {
|
|
2
|
+
// 测试环境
|
|
3
|
+
Test: "test",
|
|
4
|
+
// 生产环境
|
|
5
|
+
Production: "production"
|
|
6
|
+
};
|
|
7
|
+
function isLogLevel(value) {
|
|
8
|
+
return value === LOG_LEVEL.Test || value === LOG_LEVEL.Production;
|
|
9
|
+
}
|
|
10
|
+
class Logger {
|
|
11
|
+
logLevel = LOG_LEVEL.Production;
|
|
12
|
+
pluginApi = null;
|
|
13
|
+
/**
|
|
14
|
+
* 设置插件 API
|
|
15
|
+
*
|
|
16
|
+
* @param pluginApi - OpenClaw 插件 API
|
|
17
|
+
*/
|
|
18
|
+
setApi(pluginApi) {
|
|
19
|
+
this.pluginApi = pluginApi;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 设置日志级别
|
|
23
|
+
*
|
|
24
|
+
* @param logLevel - 日志级别
|
|
25
|
+
*/
|
|
26
|
+
setLevel(logLevel) {
|
|
27
|
+
this.logLevel = logLevel;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 记录信息日志(仅在 test 场景输出)
|
|
31
|
+
*
|
|
32
|
+
* @param message - 日志消息
|
|
33
|
+
*/
|
|
34
|
+
info(message) {
|
|
35
|
+
if (this.logLevel === LOG_LEVEL.Production) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.pluginApi?.logger?.info(message);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 记录警告日志(任何场景都输出)
|
|
42
|
+
*
|
|
43
|
+
* @param message - 日志消息
|
|
44
|
+
*/
|
|
45
|
+
warn(message) {
|
|
46
|
+
this.pluginApi?.logger?.warn(message);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* 记录错误日志(任何场景都输出)
|
|
50
|
+
*
|
|
51
|
+
* @param message - 日志消息
|
|
52
|
+
*/
|
|
53
|
+
error(message) {
|
|
54
|
+
this.pluginApi?.logger?.error(message);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const logger = new Logger();
|
|
58
|
+
export {
|
|
59
|
+
LOG_LEVEL,
|
|
60
|
+
logger as default,
|
|
61
|
+
isLogLevel
|
|
62
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { stat, readFile } from "node:fs/promises";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { Agent, fetch } from "undici";
|
|
6
|
+
function isLocalMediaSource(value) {
|
|
7
|
+
const trimmed = value.trim();
|
|
8
|
+
return trimmed.startsWith("/") || trimmed.startsWith("./") || trimmed.startsWith("../") || trimmed.startsWith("~") || trimmed.startsWith("file://");
|
|
9
|
+
}
|
|
10
|
+
function resolveLocalPath(input) {
|
|
11
|
+
if (input.startsWith("file://")) {
|
|
12
|
+
return fileURLToPath(input);
|
|
13
|
+
}
|
|
14
|
+
if (input.startsWith("~")) {
|
|
15
|
+
return path.join(os.homedir(), input.slice(1));
|
|
16
|
+
}
|
|
17
|
+
return path.resolve(input);
|
|
18
|
+
}
|
|
19
|
+
function readResponseUrlPath(data, pathValue) {
|
|
20
|
+
if (!pathValue)
|
|
21
|
+
return void 0;
|
|
22
|
+
const parts = pathValue.split(".").filter(Boolean);
|
|
23
|
+
let current = data;
|
|
24
|
+
for (const part of parts) {
|
|
25
|
+
if (!current || typeof current !== "object")
|
|
26
|
+
return void 0;
|
|
27
|
+
current = current[part];
|
|
28
|
+
}
|
|
29
|
+
return typeof current === "string" ? current : void 0;
|
|
30
|
+
}
|
|
31
|
+
function extractUploadedUrl(responseText, responseData, pathValue) {
|
|
32
|
+
const fromPath = readResponseUrlPath(responseData, pathValue);
|
|
33
|
+
if (fromPath)
|
|
34
|
+
return fromPath;
|
|
35
|
+
const direct = responseData.url ?? responseData.mediaUrl;
|
|
36
|
+
if (typeof direct === "string" && direct.trim())
|
|
37
|
+
return direct;
|
|
38
|
+
const dataObj = responseData.data;
|
|
39
|
+
if (dataObj && typeof dataObj === "object") {
|
|
40
|
+
const dataUrl = dataObj.url;
|
|
41
|
+
const dataMedia = dataObj.mediaUrl;
|
|
42
|
+
if (typeof dataUrl === "string" && dataUrl.trim())
|
|
43
|
+
return dataUrl;
|
|
44
|
+
if (typeof dataMedia === "string" && dataMedia.trim())
|
|
45
|
+
return dataMedia;
|
|
46
|
+
}
|
|
47
|
+
const resultObj = responseData.result;
|
|
48
|
+
if (resultObj && typeof resultObj === "object") {
|
|
49
|
+
const resultUrl = resultObj.url;
|
|
50
|
+
const resultMedia = resultObj.mediaUrl;
|
|
51
|
+
if (typeof resultUrl === "string" && resultUrl.trim())
|
|
52
|
+
return resultUrl;
|
|
53
|
+
if (typeof resultMedia === "string" && resultMedia.trim())
|
|
54
|
+
return resultMedia;
|
|
55
|
+
}
|
|
56
|
+
if (responseText.trim() && /^https?:\/\//i.test(responseText.trim())) {
|
|
57
|
+
return responseText.trim();
|
|
58
|
+
}
|
|
59
|
+
return void 0;
|
|
60
|
+
}
|
|
61
|
+
async function uploadLocalMedia(params) {
|
|
62
|
+
const stats = await stat(params.filePath);
|
|
63
|
+
if (!stats.isFile()) {
|
|
64
|
+
throw new Error(`mediaUrl is not a file: ${params.filePath}`);
|
|
65
|
+
}
|
|
66
|
+
const content = await readFile(params.filePath);
|
|
67
|
+
const form = new FormData();
|
|
68
|
+
const fieldName = params.uploadFieldName?.trim() || "file";
|
|
69
|
+
const fileName = path.basename(params.filePath);
|
|
70
|
+
form.set(fieldName, new Blob([content], { type: "application/octet-stream" }), fileName);
|
|
71
|
+
if (params.uploadFormFields) {
|
|
72
|
+
for (const [key, value] of Object.entries(params.uploadFormFields)) {
|
|
73
|
+
form.set(key, String(value));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const controller = new AbortController();
|
|
77
|
+
const timeoutId = setTimeout(() => controller.abort(), params.requestTimeout);
|
|
78
|
+
let dispatcher;
|
|
79
|
+
let doFetch = globalThis.fetch.bind(globalThis);
|
|
80
|
+
if (params.allowInsecureTls) {
|
|
81
|
+
try {
|
|
82
|
+
dispatcher = new Agent({ connect: { rejectUnauthorized: false } });
|
|
83
|
+
doFetch = fetch;
|
|
84
|
+
} catch (error) {
|
|
85
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
86
|
+
throw new Error(`allowInsecureTls requires undici. ${message}`);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
const response = await doFetch(params.uploadUrl, {
|
|
91
|
+
method: "POST",
|
|
92
|
+
headers: params.uploadHeaders ?? {},
|
|
93
|
+
body: form,
|
|
94
|
+
signal: controller.signal,
|
|
95
|
+
...dispatcher ? { dispatcher } : {}
|
|
96
|
+
});
|
|
97
|
+
const responseText = await response.text().catch(() => "");
|
|
98
|
+
if (!response.ok) {
|
|
99
|
+
throw new Error(`Upload failed: ${response.status} ${responseText}`);
|
|
100
|
+
}
|
|
101
|
+
let data = {};
|
|
102
|
+
if (responseText) {
|
|
103
|
+
try {
|
|
104
|
+
data = JSON.parse(responseText);
|
|
105
|
+
} catch {
|
|
106
|
+
data = {};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
const uploadedUrl = extractUploadedUrl(
|
|
110
|
+
responseText,
|
|
111
|
+
data,
|
|
112
|
+
params.uploadResponseUrlPath
|
|
113
|
+
);
|
|
114
|
+
if (!uploadedUrl) {
|
|
115
|
+
throw new Error("Upload response missing file URL");
|
|
116
|
+
}
|
|
117
|
+
return uploadedUrl;
|
|
118
|
+
} finally {
|
|
119
|
+
clearTimeout(timeoutId);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
export {
|
|
123
|
+
isLocalMediaSource,
|
|
124
|
+
resolveLocalPath,
|
|
125
|
+
uploadLocalMedia
|
|
126
|
+
};
|