@workclaw/openclaw-workclaw 1.0.30 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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.js +4 -373
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +89 -1916
- 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 +199 -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 +174 -0
- package/dist/packages/plugin/src/api/skills-api.js +60 -0
- package/dist/packages/plugin/src/api/workspace.js +30 -0
- package/dist/packages/plugin/src/channel.js +214 -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 +407 -0
- package/dist/packages/plugin/src/gateway/config-writer.js +149 -0
- package/dist/{cron-tasks-handler-C-mP3VmV.js → packages/plugin/src/gateway/cron-tasks-handler.js} +75 -6
- package/dist/packages/plugin/src/gateway/message-context.js +408 -0
- package/dist/packages/plugin/src/gateway/message-dispatcher.js +517 -0
- package/dist/packages/plugin/src/gateway/reconnect.js +177 -0
- package/dist/packages/plugin/src/gateway/skills-handler.js +511 -0
- package/dist/packages/plugin/src/gateway/skills-list-handler.js +172 -0
- package/dist/packages/plugin/src/gateway/tools-list-handler.js +88 -0
- package/dist/packages/plugin/src/gateway/workclaw-gateway.js +208 -0
- package/dist/packages/plugin/src/media/upload.js +126 -0
- package/dist/packages/plugin/src/outbound/index.js +88 -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 +184 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/index.js +29 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/add/params.js +129 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/add/sync.js +139 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/disable/params.js +61 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/disable/sync.js +85 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/enable/params.js +61 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/enable/sync.js +85 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/notify/sync.js +102 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/remove/params.js +67 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/remove/sync.js +85 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/update/params.js +140 -0
- package/dist/packages/plugin/src/tools/openclaw-workclaw-cron/src/update/sync.js +113 -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 +28 -0
- package/dist/setup-entry.js +1 -168
- package/dist/src/api/accounts-api.d.ts.map +1 -1
- package/dist/src/api/prompts-api.d.ts.map +1 -1
- package/dist/src/api/workspace.d.ts.map +1 -1
- package/dist/src/config-schema.d.ts +3 -85
- package/dist/src/config-schema.d.ts.map +1 -1
- package/dist/src/gateway/cron-tasks-handler.d.ts +2 -1
- package/dist/src/gateway/cron-tasks-handler.d.ts.map +1 -1
- package/dist/src/gateway/tools-list-handler.d.ts.map +1 -1
- package/dist/src/runtime.d.ts.map +1 -1
- package/dist/src/runtime.js +368 -0
- package/dist/src/secret-contract-api.js +7 -0
- package/dist/src/tools/openclaw-workclaw-cron/index.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/add/params.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/add/params.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/add/sync.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/params.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/disable/sync.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/params.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/enable/sync.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/notify/sync.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/params.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/remove/sync.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/update/params.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/update/params.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.d.ts +0 -3
- package/dist/src/tools/openclaw-workclaw-cron/src/update/sync.d.ts.map +1 -1
- package/dist/src/tools/openclaw-workclaw-cron/utils/tool-context.d.ts +9 -0
- package/dist/src/tools/openclaw-workclaw-cron/utils/tool-context.d.ts.map +1 -0
- package/openclaw.plugin.json +56 -44
- package/package.json +2 -2
- package/dist/channel-DSvR6Irx.js +0 -50017
- package/dist/jiti-4i2h0FGP.js +0 -4814
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { execSync } from "node:child_process";
|
|
2
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { readFile, mkdir, writeFile, rename } from "node:fs/promises";
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
import { getWorkclawRuntime } from "../../../../src/runtime.js";
|
|
7
|
+
function fixOwner(dir) {
|
|
8
|
+
if (process.platform === "win32")
|
|
9
|
+
return;
|
|
10
|
+
try {
|
|
11
|
+
execSync(`chown -R node:node "${dir}"`, { stdio: "ignore" });
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const STATE_DIR = join("workclaw", "data");
|
|
16
|
+
const SAVE_THROTTLE_MS = 1e3;
|
|
17
|
+
const lastSaveTimeMap = /* @__PURE__ */ new Map();
|
|
18
|
+
function findStateDir() {
|
|
19
|
+
const stateDir = join(homedir(), ".openclaw");
|
|
20
|
+
return join(stateDir, STATE_DIR);
|
|
21
|
+
}
|
|
22
|
+
function getStateFilePath() {
|
|
23
|
+
return join(findStateDir(), "conversations.json");
|
|
24
|
+
}
|
|
25
|
+
async function writeConfigFile(newConfig, cfg, log) {
|
|
26
|
+
try {
|
|
27
|
+
const runtime = getWorkclawRuntime();
|
|
28
|
+
const configApi = runtime.config;
|
|
29
|
+
await configApi.writeConfigFile(newConfig);
|
|
30
|
+
log?.info?.(`[WriteConfig] Config written via runtime.config.writeConfigFile`);
|
|
31
|
+
Object.assign(cfg, newConfig);
|
|
32
|
+
} catch (err) {
|
|
33
|
+
log?.error?.(`[WriteConfig] Failed to write config: ${String(err)}`);
|
|
34
|
+
throw err;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function loadOpenConversationId(accountId, userId) {
|
|
38
|
+
const statePath = getStateFilePath();
|
|
39
|
+
const key = `${accountId}:${userId}`;
|
|
40
|
+
try {
|
|
41
|
+
if (!existsSync(statePath))
|
|
42
|
+
return null;
|
|
43
|
+
const content = readFileSync(statePath, "utf-8");
|
|
44
|
+
const state = JSON.parse(content);
|
|
45
|
+
return state[key]?.openConversationId ?? null;
|
|
46
|
+
} catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async function saveOpenConversationId(accountId, userId, openConversationId, cfg, log) {
|
|
51
|
+
const key = `${accountId}:${userId}`;
|
|
52
|
+
const workclawCfg = cfg?.channels?.["openclaw-workclaw"];
|
|
53
|
+
if (workclawCfg?.accounts?.[accountId]) {
|
|
54
|
+
workclawCfg.accounts[accountId].openConversationId = openConversationId;
|
|
55
|
+
}
|
|
56
|
+
const lastSaveTime = lastSaveTimeMap.get(key) ?? 0;
|
|
57
|
+
const now = Date.now();
|
|
58
|
+
if (now - lastSaveTime < SAVE_THROTTLE_MS) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
await doSaveOpenConversationId(key, openConversationId, log);
|
|
62
|
+
lastSaveTimeMap.set(key, now);
|
|
63
|
+
}
|
|
64
|
+
async function doSaveOpenConversationId(key, openConversationId, log) {
|
|
65
|
+
try {
|
|
66
|
+
const statePath = getStateFilePath();
|
|
67
|
+
let state = {};
|
|
68
|
+
if (existsSync(statePath)) {
|
|
69
|
+
try {
|
|
70
|
+
const content = await readFile(statePath, "utf-8");
|
|
71
|
+
state = JSON.parse(content);
|
|
72
|
+
} catch (parseErr) {
|
|
73
|
+
log?.error?.(`SaveConversation: Failed to parse state file: ${String(parseErr)}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
if (!state[key])
|
|
77
|
+
state[key] = {};
|
|
78
|
+
const existing = state[key].openConversationId;
|
|
79
|
+
if (existing === openConversationId && existing != null && existing !== "") {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
state[key].openConversationId = openConversationId;
|
|
83
|
+
const stateDir = findStateDir();
|
|
84
|
+
if (!existsSync(stateDir)) {
|
|
85
|
+
try {
|
|
86
|
+
await mkdir(stateDir, { recursive: true, mode: 493 });
|
|
87
|
+
} catch (mkdirErr) {
|
|
88
|
+
if (mkdirErr.code === "EACCES" || mkdirErr.code === "EPERM") {
|
|
89
|
+
await mkdir(stateDir, { recursive: true, mode: 511 });
|
|
90
|
+
} else {
|
|
91
|
+
throw mkdirErr;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
fixOwner(stateDir);
|
|
95
|
+
}
|
|
96
|
+
const tmpPath = `${statePath}.tmp`;
|
|
97
|
+
await writeFile(tmpPath, JSON.stringify(state, null, 2), "utf-8");
|
|
98
|
+
await rename(tmpPath, statePath);
|
|
99
|
+
log?.info?.(`SaveConversation: Saved openConversationId for key ${key}`);
|
|
100
|
+
} catch (err) {
|
|
101
|
+
log?.error?.(`SaveConversation: Failed to write state file: ${String(err)}`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async function initWorkclawAgent(params, cfg, log) {
|
|
105
|
+
try {
|
|
106
|
+
const workclawCfg = cfg?.channels?.["openclaw-workclaw"];
|
|
107
|
+
if (!workclawCfg)
|
|
108
|
+
return;
|
|
109
|
+
if (params.apiKey) {
|
|
110
|
+
const existingApiKey = cfg.models?.providers?.["sophnet-minimax"]?.apiKey;
|
|
111
|
+
if (existingApiKey && typeof existingApiKey === "object" && existingApiKey.type) {
|
|
112
|
+
log?.info?.(`initWorkclawAgent: apiKey is SecretRef (type=${existingApiKey.type}), skipping overwrite`);
|
|
113
|
+
} else {
|
|
114
|
+
if (!cfg.models)
|
|
115
|
+
cfg.models = {};
|
|
116
|
+
if (!cfg.models.providers)
|
|
117
|
+
cfg.models.providers = {};
|
|
118
|
+
if (!cfg.models.providers["sophnet-minimax"])
|
|
119
|
+
cfg.models.providers["sophnet-minimax"] = {};
|
|
120
|
+
cfg.models.providers["sophnet-minimax"].apiKey = params.apiKey;
|
|
121
|
+
log?.info?.(`initWorkclawAgent: apiKey set (plain value)`);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (params.agentId) {
|
|
125
|
+
const accountId = params.accountId || "default";
|
|
126
|
+
const accounts = workclawCfg.accounts ?? {};
|
|
127
|
+
workclawCfg.accounts = accounts;
|
|
128
|
+
if (!accounts[accountId])
|
|
129
|
+
accounts[accountId] = {};
|
|
130
|
+
accounts[accountId].agentId = params.agentId;
|
|
131
|
+
log?.info?.(`initWorkclawAgent: agentId=${params.agentId} set for ${accountId}`);
|
|
132
|
+
}
|
|
133
|
+
if (params.userId) {
|
|
134
|
+
workclawCfg.userId = params.userId;
|
|
135
|
+
log?.info?.(`initWorkclawAgent: userId=${params.userId} set`);
|
|
136
|
+
}
|
|
137
|
+
await writeConfigFile(cfg, cfg, log);
|
|
138
|
+
log?.info?.(`initWorkclawAgent: all config persisted`);
|
|
139
|
+
} catch (err) {
|
|
140
|
+
log?.error?.(`initWorkclawAgent: failed: ${String(err)}`);
|
|
141
|
+
throw err;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
export {
|
|
145
|
+
initWorkclawAgent,
|
|
146
|
+
loadOpenConversationId,
|
|
147
|
+
saveOpenConversationId,
|
|
148
|
+
writeConfigFile
|
|
149
|
+
};
|
package/dist/{cron-tasks-handler-C-mP3VmV.js → packages/plugin/src/gateway/cron-tasks-handler.js}
RENAMED
|
@@ -1,12 +1,36 @@
|
|
|
1
1
|
import { exec } from "node:child_process";
|
|
2
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
3
|
+
import { homedir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
2
5
|
import { promisify } from "node:util";
|
|
3
6
|
const execAsync = promisify(exec);
|
|
7
|
+
function resolvePreferredCliPathEnv() {
|
|
8
|
+
const defaultAliasPath = join(homedir(), ".nvm", "alias", "default");
|
|
9
|
+
if (!existsSync(defaultAliasPath))
|
|
10
|
+
return process.env;
|
|
11
|
+
try {
|
|
12
|
+
const defaultVersion = readFileSync(defaultAliasPath, "utf8").trim();
|
|
13
|
+
if (!defaultVersion)
|
|
14
|
+
return process.env;
|
|
15
|
+
const preferredBin = join(homedir(), ".nvm", "versions", "node", defaultVersion, "bin");
|
|
16
|
+
if (!existsSync(preferredBin))
|
|
17
|
+
return process.env;
|
|
18
|
+
const currentPath = process.env.PATH || "";
|
|
19
|
+
return {
|
|
20
|
+
...process.env,
|
|
21
|
+
PATH: currentPath ? `${preferredBin}:${currentPath}` : preferredBin
|
|
22
|
+
};
|
|
23
|
+
} catch {
|
|
24
|
+
return process.env;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
4
27
|
async function runCli(command, log, ignoreError = false) {
|
|
5
28
|
log?.info?.(`[CLI] Executing: ${command}`);
|
|
6
29
|
try {
|
|
7
30
|
const { stdout, stderr } = await execAsync(command, {
|
|
8
31
|
timeout: 6e4,
|
|
9
|
-
maxBuffer: 10 * 1024 * 1024
|
|
32
|
+
maxBuffer: 10 * 1024 * 1024,
|
|
33
|
+
env: resolvePreferredCliPathEnv()
|
|
10
34
|
});
|
|
11
35
|
if (stderr)
|
|
12
36
|
log?.info?.(`[CLI] stderr: ${stderr}`);
|
|
@@ -53,12 +77,42 @@ async function sendTaskResult(url, token, taskData, status, log) {
|
|
|
53
77
|
log?.error?.(`[Callback] Network error: ${String(err)}`);
|
|
54
78
|
}
|
|
55
79
|
}
|
|
56
|
-
|
|
80
|
+
function buildCmd(args) {
|
|
81
|
+
return args.map((a) => {
|
|
82
|
+
const cleaned = a?.replace(/\s+/g, " ").trim() || "";
|
|
83
|
+
return cleaned && cleaned.includes(" ") ? `"${cleaned}"` : cleaned;
|
|
84
|
+
}).join(" ");
|
|
85
|
+
}
|
|
86
|
+
function assertRequiredTaskFields(taskData) {
|
|
87
|
+
if (!String(taskData.name || "").trim())
|
|
88
|
+
throw new Error("taskData.name 不能为空");
|
|
89
|
+
if (!String(taskData.expr || "").trim())
|
|
90
|
+
throw new Error("taskData.expr 不能为空");
|
|
91
|
+
}
|
|
57
92
|
async function handleTaskCreate(taskData, token, url, log) {
|
|
58
93
|
try {
|
|
59
|
-
|
|
94
|
+
assertRequiredTaskFields(taskData);
|
|
95
|
+
const cmd = buildCmd(["openclaw", "cron", "add", "--name", taskData.name?.trim(), "--cron", taskData.expr?.trim(), "--message", taskData.name?.trim()]);
|
|
60
96
|
const { stdout } = await runCli(cmd, log);
|
|
61
|
-
|
|
97
|
+
const createdJob = JSON.parse(stdout);
|
|
98
|
+
const createdJobId = String(createdJob?.id || "").trim();
|
|
99
|
+
if (!createdJobId)
|
|
100
|
+
throw new Error("创建成功但未返回 jobId");
|
|
101
|
+
await sendTaskResult(url, token, taskData, {
|
|
102
|
+
success: true,
|
|
103
|
+
message: "创建成功",
|
|
104
|
+
dataListOverride: [{
|
|
105
|
+
messageId: 0,
|
|
106
|
+
clawJobId: createdJobId,
|
|
107
|
+
taskId: taskData.taskId,
|
|
108
|
+
name: taskData.name,
|
|
109
|
+
kind: "",
|
|
110
|
+
expr: taskData.expr,
|
|
111
|
+
message: "创建成功",
|
|
112
|
+
agentId: taskData.mainId,
|
|
113
|
+
nextRunAtMs: 0
|
|
114
|
+
}]
|
|
115
|
+
}, log);
|
|
62
116
|
} catch (e) {
|
|
63
117
|
await sendTaskResult(url, token, taskData, { success: false, message: `创建失败: ${e.message}` }, log);
|
|
64
118
|
throw e;
|
|
@@ -73,9 +127,9 @@ async function handleTaskUpdate(taskData, token, url, log) {
|
|
|
73
127
|
await new Promise((r) => setTimeout(r, 500));
|
|
74
128
|
const args = ["openclaw", "cron", "edit", taskId];
|
|
75
129
|
if (taskData.name)
|
|
76
|
-
args.push("--name", taskData.name);
|
|
130
|
+
args.push("--name", taskData.name.trim());
|
|
77
131
|
if (taskData.expr)
|
|
78
|
-
args.push("--cron", taskData.expr);
|
|
132
|
+
args.push("--cron", taskData.expr.trim());
|
|
79
133
|
await runCli(buildCmd(args), log);
|
|
80
134
|
await runCli(`openclaw cron enable ${taskId}`, log, true);
|
|
81
135
|
await sendTaskResult(url, token, taskData, { success: true, message: "更新成功" }, log);
|
|
@@ -126,6 +180,18 @@ async function handleTaskSearch(taskData, token, url, log) {
|
|
|
126
180
|
throw e;
|
|
127
181
|
}
|
|
128
182
|
}
|
|
183
|
+
async function handleTaskTrigger(taskData, token, url, log) {
|
|
184
|
+
const taskId = taskData.clawJobId;
|
|
185
|
+
if (!taskId)
|
|
186
|
+
throw new Error("clawJobId为空无法执行");
|
|
187
|
+
try {
|
|
188
|
+
await runCli(`openclaw cron run ${taskId}`, log);
|
|
189
|
+
await sendTaskResult(url, token, taskData, { success: true, message: "执行成功" }, log);
|
|
190
|
+
} catch (e) {
|
|
191
|
+
await sendTaskResult(url, token, taskData, { success: false, message: `执行失败: ${e.message}` }, log);
|
|
192
|
+
throw e;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
129
195
|
async function handleCronTaskEvent(backendEvent, token, baseUrl, appKey, log) {
|
|
130
196
|
const taskData = backendEvent.data;
|
|
131
197
|
const callbackUrl = `${baseUrl}/open-apis/v1/claw/do/cron/result`;
|
|
@@ -143,6 +209,9 @@ async function handleCronTaskEvent(backendEvent, token, baseUrl, appKey, log) {
|
|
|
143
209
|
case "search":
|
|
144
210
|
await handleTaskSearch(taskData, token, callbackUrl, log);
|
|
145
211
|
break;
|
|
212
|
+
case "trigger":
|
|
213
|
+
await handleTaskTrigger(taskData, token, callbackUrl, log);
|
|
214
|
+
break;
|
|
146
215
|
default:
|
|
147
216
|
log?.warn?.(`Unknown dotype: ${taskData.dotype}`);
|
|
148
217
|
}
|
|
@@ -0,0 +1,408 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import http from "node:http";
|
|
3
|
+
import https from "node:https";
|
|
4
|
+
import os from "node:os";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
const OPENCLAW_WORKCLAW_CHANNEL = "openclaw-workclaw";
|
|
7
|
+
function parseWorkClawMessage(data, log) {
|
|
8
|
+
let input = {};
|
|
9
|
+
try {
|
|
10
|
+
input = data ? JSON.parse(data) : {};
|
|
11
|
+
} catch {
|
|
12
|
+
log?.info?.(`Failed to parse message data=${data}`);
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
if (typeof input === "string" && input.toLowerCase() === "ping") {
|
|
16
|
+
return {
|
|
17
|
+
type: "ping",
|
|
18
|
+
pongData: input
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
const envelope = input && typeof input === "object" ? input : { data: input };
|
|
22
|
+
const topic = envelope?.metadata?.topic;
|
|
23
|
+
const type = String(envelope?.type || "").trim().toUpperCase();
|
|
24
|
+
const topicLower = String(topic || "").trim().toLowerCase();
|
|
25
|
+
if (type === "INIT_AGENT") {
|
|
26
|
+
let parsedData = envelope?.data;
|
|
27
|
+
if (typeof parsedData === "string") {
|
|
28
|
+
try {
|
|
29
|
+
parsedData = JSON.parse(parsedData);
|
|
30
|
+
} catch (e) {
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
type: "init_agent",
|
|
35
|
+
eventData: parsedData
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
if (type === "SYSTEM") {
|
|
39
|
+
if (topicLower === "ping") {
|
|
40
|
+
return {
|
|
41
|
+
type: "ping",
|
|
42
|
+
pongData: envelope?.data
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
if (topicLower === "disconnect") {
|
|
46
|
+
return {
|
|
47
|
+
type: "disconnect"
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
type: "ignored"
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
if (type === "EVENT") {
|
|
55
|
+
const eventType = String(envelope?.metadata?.event || "").trim().toUpperCase();
|
|
56
|
+
let parsedData = envelope?.data;
|
|
57
|
+
if (typeof parsedData === "string") {
|
|
58
|
+
try {
|
|
59
|
+
parsedData = JSON.parse(parsedData);
|
|
60
|
+
} catch (e) {
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (eventType === "AGENT_CREATED") {
|
|
64
|
+
return {
|
|
65
|
+
type: "agent_created",
|
|
66
|
+
eventData: parsedData
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
if (eventType === "AGENT_UPDATED") {
|
|
70
|
+
return {
|
|
71
|
+
type: "agent_updated",
|
|
72
|
+
eventData: parsedData
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
if (eventType === "AGENT_DELETED") {
|
|
76
|
+
return {
|
|
77
|
+
type: "agent_deleted",
|
|
78
|
+
eventData: parsedData
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
if (eventType === "TOOLS_LIST") {
|
|
82
|
+
return {
|
|
83
|
+
type: "tools_list",
|
|
84
|
+
eventData: parsedData
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
if (eventType === "SKILLS_LIST") {
|
|
88
|
+
return {
|
|
89
|
+
type: "skills_list",
|
|
90
|
+
eventData: parsedData
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (eventType === "INIT_AGENT") {
|
|
94
|
+
return {
|
|
95
|
+
type: "init_agent",
|
|
96
|
+
eventData: parsedData
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
if (eventType === "SKILL_DO_REMIND") {
|
|
100
|
+
const eventTopic = String(parsedData?.dotype || "").toLowerCase();
|
|
101
|
+
return {
|
|
102
|
+
type: "skills_event",
|
|
103
|
+
eventData: {
|
|
104
|
+
topic: `skills/${eventTopic}`,
|
|
105
|
+
requestId: "",
|
|
106
|
+
callbackUrl: "",
|
|
107
|
+
authToken: "",
|
|
108
|
+
data: parsedData
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
if (eventType === "CRON_REMIND") {
|
|
113
|
+
const eventTopic = String(parsedData?.dotype || "").toLowerCase();
|
|
114
|
+
return {
|
|
115
|
+
type: "cron_task_event",
|
|
116
|
+
cronTaskEvent: {
|
|
117
|
+
dotype: `${eventTopic}`,
|
|
118
|
+
data: parsedData
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
type: "ignored"
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
if (type !== "CALLBACK" || String(topic || "").trim().toUpperCase() !== "AGENT_MESSAGE") {
|
|
127
|
+
return {
|
|
128
|
+
type: "ignored"
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
let payload = envelope?.data || {};
|
|
132
|
+
if (typeof payload === "string") {
|
|
133
|
+
try {
|
|
134
|
+
payload = JSON.parse(payload);
|
|
135
|
+
} catch (e) {
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const text = typeof payload?.message?.content === "string" ? payload.message.content : typeof payload?.message === "string" ? payload.message : "";
|
|
139
|
+
function isImageFile(url) {
|
|
140
|
+
const imageExtensions = [".jpg", ".jpeg", ".png", ".gif", ".webp", ".bmp", ".svg", ".ico"];
|
|
141
|
+
const lowerUrl = url.toLowerCase();
|
|
142
|
+
return imageExtensions.some((ext) => lowerUrl.endsWith(ext));
|
|
143
|
+
}
|
|
144
|
+
const fileUrlList = Array.isArray(payload?.fileUrl) ? payload.fileUrl : [];
|
|
145
|
+
const attachments = fileUrlList.map((url) => ({
|
|
146
|
+
url,
|
|
147
|
+
fileId: payload?.fileId ? String(payload.fileId) : "",
|
|
148
|
+
type: isImageFile(url) ? "image" : "file"
|
|
149
|
+
}));
|
|
150
|
+
return {
|
|
151
|
+
type: "agent_message",
|
|
152
|
+
message: {
|
|
153
|
+
text,
|
|
154
|
+
userId: String(payload?.userId ?? ""),
|
|
155
|
+
openConversationId: String(payload?.conversationId ?? ""),
|
|
156
|
+
messageId: String(payload?.msgId ?? ""),
|
|
157
|
+
agentId: payload?.agentId,
|
|
158
|
+
attachments: attachments.length > 0 ? attachments : void 0
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function detectMediaType(url) {
|
|
163
|
+
const lower = url.toLowerCase();
|
|
164
|
+
if (lower.endsWith(".jpg") || lower.endsWith(".jpeg") || lower.endsWith(".png") || lower.endsWith(".gif") || lower.endsWith(".webp") || lower.endsWith(".bmp") || lower.endsWith(".svg") || lower.endsWith(".ico")) {
|
|
165
|
+
return "image";
|
|
166
|
+
}
|
|
167
|
+
if (lower.endsWith(".mp3") || lower.endsWith(".wav") || lower.endsWith(".amr") || lower.endsWith(".m4a") || lower.endsWith(".ogg")) {
|
|
168
|
+
return "audio";
|
|
169
|
+
}
|
|
170
|
+
if (lower.endsWith(".mp4") || lower.endsWith(".avi") || lower.endsWith(".mov") || lower.endsWith(".mkv") || lower.endsWith(".webm")) {
|
|
171
|
+
return "video";
|
|
172
|
+
}
|
|
173
|
+
if (lower.endsWith(".pdf"))
|
|
174
|
+
return "application/pdf";
|
|
175
|
+
if (lower.endsWith(".docx"))
|
|
176
|
+
return "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
|
177
|
+
if (lower.endsWith(".xlsx"))
|
|
178
|
+
return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
179
|
+
if (lower.endsWith(".pptx"))
|
|
180
|
+
return "application/vnd.openxmlformats-officedocument.presentationml.presentation";
|
|
181
|
+
if (lower.endsWith(".doc"))
|
|
182
|
+
return "application/msword";
|
|
183
|
+
if (lower.endsWith(".xls"))
|
|
184
|
+
return "application/vnd.ms-excel";
|
|
185
|
+
if (lower.endsWith(".ppt"))
|
|
186
|
+
return "application/vnd.ms-powerpoint";
|
|
187
|
+
if (lower.endsWith(".txt"))
|
|
188
|
+
return "text/plain";
|
|
189
|
+
if (lower.endsWith(".zip"))
|
|
190
|
+
return "application/zip";
|
|
191
|
+
if (lower.endsWith(".rar"))
|
|
192
|
+
return "application/x-rar-compressed";
|
|
193
|
+
return "application/octet-stream";
|
|
194
|
+
}
|
|
195
|
+
function getMediaTypeLabel(url) {
|
|
196
|
+
const lower = url.toLowerCase();
|
|
197
|
+
if (lower.endsWith(".pdf"))
|
|
198
|
+
return "PDF";
|
|
199
|
+
if (lower.endsWith(".docx"))
|
|
200
|
+
return "Word";
|
|
201
|
+
if (lower.endsWith(".doc"))
|
|
202
|
+
return "Word";
|
|
203
|
+
if (lower.endsWith(".xlsx"))
|
|
204
|
+
return "Excel";
|
|
205
|
+
if (lower.endsWith(".xls"))
|
|
206
|
+
return "Excel";
|
|
207
|
+
if (lower.endsWith(".pptx"))
|
|
208
|
+
return "PowerPoint";
|
|
209
|
+
if (lower.endsWith(".ppt"))
|
|
210
|
+
return "PowerPoint";
|
|
211
|
+
if (lower.endsWith(".txt"))
|
|
212
|
+
return "文本";
|
|
213
|
+
if (lower.endsWith(".jpg") || lower.endsWith(".jpeg"))
|
|
214
|
+
return "JPG图片";
|
|
215
|
+
if (lower.endsWith(".png"))
|
|
216
|
+
return "PNG图片";
|
|
217
|
+
if (lower.endsWith(".gif"))
|
|
218
|
+
return "GIF图片";
|
|
219
|
+
if (lower.endsWith(".webp"))
|
|
220
|
+
return "WebP图片";
|
|
221
|
+
if (lower.endsWith(".mp3"))
|
|
222
|
+
return "音频";
|
|
223
|
+
if (lower.endsWith(".wav"))
|
|
224
|
+
return "音频";
|
|
225
|
+
if (lower.endsWith(".mp4"))
|
|
226
|
+
return "视频";
|
|
227
|
+
if (lower.endsWith(".zip") || lower.endsWith(".rar"))
|
|
228
|
+
return "压缩包";
|
|
229
|
+
return "文件";
|
|
230
|
+
}
|
|
231
|
+
async function downloadFileToLocal(url, accountId, peerId, log) {
|
|
232
|
+
const downloadsDir = path.join(os.homedir(), ".openclaw", "media", "workclaw", "downloads", accountId, peerId);
|
|
233
|
+
try {
|
|
234
|
+
await fs.mkdir(downloadsDir, { recursive: true });
|
|
235
|
+
} catch {
|
|
236
|
+
}
|
|
237
|
+
const urlObj = new URL(url);
|
|
238
|
+
const fileName = decodeURIComponent(path.basename(urlObj.pathname)) || "file";
|
|
239
|
+
const ext = path.extname(fileName);
|
|
240
|
+
const stem = path.basename(fileName, ext);
|
|
241
|
+
const localFileName = `${stem}_${Date.now()}${ext}`;
|
|
242
|
+
const localFilePath = path.join(downloadsDir, localFileName);
|
|
243
|
+
return new Promise((resolve) => {
|
|
244
|
+
const client = url.startsWith("https:") ? https : http;
|
|
245
|
+
const req = client.get(url, (res) => {
|
|
246
|
+
if (res.statusCode !== 200) {
|
|
247
|
+
log?.warn?.(`downloadFile: HTTP ${res.statusCode} for ${url}`);
|
|
248
|
+
resolve(null);
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
const chunks = [];
|
|
252
|
+
res.on("data", (chunk) => chunks.push(chunk));
|
|
253
|
+
res.on("end", async () => {
|
|
254
|
+
try {
|
|
255
|
+
const buffer = Buffer.concat(chunks);
|
|
256
|
+
await fs.writeFile(localFilePath, buffer);
|
|
257
|
+
log?.info?.(`downloadFile: saved ${buffer.length} bytes -> ${localFilePath}`);
|
|
258
|
+
resolve(localFilePath);
|
|
259
|
+
} catch (err) {
|
|
260
|
+
log?.error?.(`downloadFile: write failed: ${String(err)}`);
|
|
261
|
+
resolve(null);
|
|
262
|
+
}
|
|
263
|
+
});
|
|
264
|
+
res.on("error", (err) => {
|
|
265
|
+
log?.error?.(`downloadFile: read error: ${String(err)}`);
|
|
266
|
+
resolve(null);
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
req.on("error", (err) => {
|
|
270
|
+
log?.error?.(`downloadFile: request error: ${String(err)}`);
|
|
271
|
+
resolve(null);
|
|
272
|
+
});
|
|
273
|
+
req.setTimeout(3e4, () => {
|
|
274
|
+
req.destroy();
|
|
275
|
+
log?.warn?.(`downloadFile: timeout for ${url}`);
|
|
276
|
+
resolve(null);
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
async function buildInboundContext(message, accountId, config, agentId, pluginRuntime, recordSession = true, log) {
|
|
281
|
+
let existingSessionKey;
|
|
282
|
+
try {
|
|
283
|
+
const rawPayload = JSON.parse(message.rawPayload);
|
|
284
|
+
existingSessionKey = rawPayload.sessionKey;
|
|
285
|
+
} catch {
|
|
286
|
+
}
|
|
287
|
+
const peerId = message.from;
|
|
288
|
+
const computedSessionKey = existingSessionKey || (agentId && agentId !== "main" ? `agent:${agentId}:openclaw-workclaw:${accountId}:direct:${peerId}` : void 0);
|
|
289
|
+
const sessionKey = computedSessionKey || (agentId && agentId !== "main" ? `agent:${agentId}:openclaw-workclaw:${accountId}:direct:${peerId}` : void 0);
|
|
290
|
+
const result = {
|
|
291
|
+
Body: message.text,
|
|
292
|
+
BodyForAgent: message.text,
|
|
293
|
+
RawBody: JSON.stringify(message),
|
|
294
|
+
From: message.from,
|
|
295
|
+
To: message.to,
|
|
296
|
+
ChatType: message.chatType,
|
|
297
|
+
Provider: OPENCLAW_WORKCLAW_CHANNEL,
|
|
298
|
+
Surface: OPENCLAW_WORKCLAW_CHANNEL,
|
|
299
|
+
Timestamp: message.timestamp,
|
|
300
|
+
AccountId: accountId,
|
|
301
|
+
AgentId: agentId,
|
|
302
|
+
MessageSid: message.messageId,
|
|
303
|
+
OriginatingChannel: OPENCLAW_WORKCLAW_CHANNEL,
|
|
304
|
+
OriginatingTo: message.to
|
|
305
|
+
};
|
|
306
|
+
if (sessionKey) {
|
|
307
|
+
result.SessionKey = sessionKey;
|
|
308
|
+
}
|
|
309
|
+
if (!pluginRuntime) {
|
|
310
|
+
return result;
|
|
311
|
+
}
|
|
312
|
+
const storePath = pluginRuntime.channel.session.resolveStorePath(config.session?.store, { agentId });
|
|
313
|
+
log?.info?.(`[Session] storePath=${storePath}, agentId=${agentId}, sessionKey=${sessionKey}`);
|
|
314
|
+
const envelopeOptions = pluginRuntime.channel.reply.resolveEnvelopeFormatOptions(config);
|
|
315
|
+
const previousTimestamp = pluginRuntime.channel.session.readSessionUpdatedAt({
|
|
316
|
+
storePath,
|
|
317
|
+
sessionKey
|
|
318
|
+
});
|
|
319
|
+
log?.info?.(`[Session] previousTimestamp=${previousTimestamp}`);
|
|
320
|
+
const mediaUrls = [];
|
|
321
|
+
const mediaTypes = [];
|
|
322
|
+
const bodyText = message.text;
|
|
323
|
+
if (message.attachments && message.attachments.length > 0) {
|
|
324
|
+
log?.info?.(`[Attachments] Downloading ${message.attachments.length} files...`);
|
|
325
|
+
const downloadResults = await Promise.all(
|
|
326
|
+
message.attachments.map(async (att) => {
|
|
327
|
+
const localPath = await downloadFileToLocal(att.url, accountId, message.from, log);
|
|
328
|
+
const mediaType = detectMediaType(att.url);
|
|
329
|
+
const typeLabel = getMediaTypeLabel(att.url);
|
|
330
|
+
return { att, localPath, mediaType, typeLabel };
|
|
331
|
+
})
|
|
332
|
+
);
|
|
333
|
+
for (const { att, localPath, mediaType } of downloadResults) {
|
|
334
|
+
if (localPath) {
|
|
335
|
+
const homeDir = os.homedir().replace(/\\/g, "/").trim();
|
|
336
|
+
const normalizedLocalPath = localPath.replace(/\\/g, "/");
|
|
337
|
+
const relativePath = normalizedLocalPath.startsWith(`${homeDir}/.openclaw/`) ? `/${normalizedLocalPath.slice(homeDir.length + 1)}` : normalizedLocalPath;
|
|
338
|
+
mediaUrls.push(relativePath);
|
|
339
|
+
mediaTypes.push(mediaType);
|
|
340
|
+
log?.info?.(`[Attachments] Downloaded: ${relativePath}`);
|
|
341
|
+
} else {
|
|
342
|
+
log?.warn?.(`[Attachments] Failed to download: ${att.url}`);
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
log?.info?.(`[Attachments] Downloaded ${mediaUrls.length}/${message.attachments.length} files`);
|
|
346
|
+
}
|
|
347
|
+
const fromLabel = message.to;
|
|
348
|
+
const body = pluginRuntime.channel.reply.formatInboundEnvelope({
|
|
349
|
+
channel: OPENCLAW_WORKCLAW_CHANNEL,
|
|
350
|
+
from: fromLabel,
|
|
351
|
+
timestamp: message.timestamp,
|
|
352
|
+
body: bodyText,
|
|
353
|
+
chatType: message.chatType,
|
|
354
|
+
sender: { name: message.to, id: message.to },
|
|
355
|
+
previousTimestamp,
|
|
356
|
+
envelope: envelopeOptions
|
|
357
|
+
});
|
|
358
|
+
const finalized = pluginRuntime.channel.reply.finalizeInboundContext({
|
|
359
|
+
Body: body,
|
|
360
|
+
BodyForAgent: bodyText,
|
|
361
|
+
RawBody: JSON.stringify(message),
|
|
362
|
+
CommandBody: message.text,
|
|
363
|
+
From: message.from,
|
|
364
|
+
To: message.to,
|
|
365
|
+
SessionKey: sessionKey,
|
|
366
|
+
AccountId: accountId,
|
|
367
|
+
ChatType: message.chatType,
|
|
368
|
+
ConversationLabel: fromLabel,
|
|
369
|
+
Provider: OPENCLAW_WORKCLAW_CHANNEL,
|
|
370
|
+
Surface: "openclaw-workclaw_dm",
|
|
371
|
+
MessageSid: message.messageId,
|
|
372
|
+
Timestamp: message.timestamp,
|
|
373
|
+
OriginatingChannel: OPENCLAW_WORKCLAW_CHANNEL,
|
|
374
|
+
OriginatingTo: message.to,
|
|
375
|
+
// 附件媒体信息(供 skill 读取本地文件)
|
|
376
|
+
MediaPath: mediaUrls[0] || void 0,
|
|
377
|
+
MediaUrl: mediaUrls[0] || void 0,
|
|
378
|
+
MediaUrls: mediaUrls.length > 0 ? mediaUrls : void 0,
|
|
379
|
+
MediaTypes: mediaTypes.length > 0 ? mediaTypes : void 0
|
|
380
|
+
});
|
|
381
|
+
if (sessionKey && recordSession) {
|
|
382
|
+
try {
|
|
383
|
+
await pluginRuntime.channel.session.recordInboundSession({
|
|
384
|
+
storePath,
|
|
385
|
+
sessionKey: finalized.SessionKey || sessionKey,
|
|
386
|
+
ctx: finalized,
|
|
387
|
+
updateLastRoute: {
|
|
388
|
+
sessionKey,
|
|
389
|
+
channel: OPENCLAW_WORKCLAW_CHANNEL,
|
|
390
|
+
to: message.to,
|
|
391
|
+
accountId
|
|
392
|
+
},
|
|
393
|
+
onRecordError: (err) => {
|
|
394
|
+
log?.error?.(`[Session] recordInboundSession failed: ${String(err)}`);
|
|
395
|
+
}
|
|
396
|
+
});
|
|
397
|
+
log?.info?.(`[Session] Recorded session for key=${sessionKey}`);
|
|
398
|
+
} catch (err) {
|
|
399
|
+
log?.warn?.(`[Session] recordInboundSession error: ${String(err)}`);
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return finalized;
|
|
403
|
+
}
|
|
404
|
+
export {
|
|
405
|
+
OPENCLAW_WORKCLAW_CHANNEL,
|
|
406
|
+
buildInboundContext,
|
|
407
|
+
parseWorkClawMessage
|
|
408
|
+
};
|