remoteclaw 0.0.0 → 0.0.1
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/CHANGELOG.md +7 -0
- package/LICENSE +661 -0
- package/README.md +492 -0
- package/assets/chrome-extension/README.md +23 -0
- package/assets/chrome-extension/background-utils.js +48 -0
- package/assets/chrome-extension/background.js +899 -0
- package/assets/chrome-extension/icons/icon128.png +0 -0
- package/assets/chrome-extension/icons/icon16.png +0 -0
- package/assets/chrome-extension/icons/icon32.png +0 -0
- package/assets/chrome-extension/icons/icon48.png +0 -0
- package/assets/chrome-extension/manifest.json +25 -0
- package/assets/chrome-extension/options-validation.js +57 -0
- package/assets/chrome-extension/options.html +200 -0
- package/assets/chrome-extension/options.js +74 -0
- package/assets/clawtributor-avatar-placeholder.png +0 -0
- package/assets/dmg-background-small.png +0 -0
- package/assets/dmg-background.png +0 -0
- package/dist/account-lookup-C0ndrpt-.js +11 -0
- package/dist/account-lookup-CIY_RKhi.js +11 -0
- package/dist/accounts-B1M3fOxL.js +272 -0
- package/dist/accounts-B8PGQWQl.js +205 -0
- package/dist/accounts-CIVjmTg9.js +270 -0
- package/dist/accounts-D1awQXKu.js +36 -0
- package/dist/accounts-DHkGVGUR.js +36 -0
- package/dist/accounts-DyW1A_l8.js +206 -0
- package/dist/accounts-XFgBY644.js +47 -0
- package/dist/accounts-_ZuNC5bz.js +47 -0
- package/dist/accounts-uVavganx.js +32 -0
- package/dist/ack-reactions-B7iqdPZX.js +621 -0
- package/dist/ack-reactions-BapxA9fC.js +621 -0
- package/dist/acp-cli-7Plvw9pp.js +1316 -0
- package/dist/acp-cli-DmtggLxa.js +1311 -0
- package/dist/active-listener--jrUO-8L.js +37 -0
- package/dist/active-listener-DtU9K0MR.js +37 -0
- package/dist/agent-CX8QVdF4.js +688 -0
- package/dist/agent-HReIYVG-.js +687 -0
- package/dist/agent-helpers-5F0tdxud.js +400 -0
- package/dist/agent-helpers-Bs2nBXeI.js +400 -0
- package/dist/agent-scope-CWV-U3Ce.js +161 -0
- package/dist/agent-scope-FzE2oRm0.js +159 -0
- package/dist/agents-D9BWNEQX.js +769 -0
- package/dist/agents.config-0v2zcEf7.js +106 -0
- package/dist/agents.config-9DL6QCZc.js +106 -0
- package/dist/ansi-DtaiOnt1.js +107 -0
- package/dist/api-BE4ZCWWB.js +17 -0
- package/dist/api-wsk9zRVi.js +17 -0
- package/dist/argv-DW4MYBdJ.js +101 -0
- package/dist/audio-ClIuKwkl.js +43 -0
- package/dist/audio-DqlIYYTb.js +43 -0
- package/dist/audit-Bggny6TT.js +3089 -0
- package/dist/audit-DpuJ16Rj.js +3089 -0
- package/dist/auth-B-QK8JhI.js +315 -0
- package/dist/auth-C1zx1O24.js +314 -0
- package/dist/auth-DDmNYVMW.js +448 -0
- package/dist/auth-DH1wEw0w.js +448 -0
- package/dist/banner-BiLVJ0wV.js +294 -0
- package/dist/binaries-QJ-UTgL-.js +13 -0
- package/dist/bindings-6FvW-Ys9.js +69 -0
- package/dist/bindings-SnU_X1kX.js +69 -0
- package/dist/bonjour-discovery-AQMJqY4V.js +378 -0
- package/dist/bonjour-discovery-BLcPWHFJ.js +378 -0
- package/dist/boot/handler.js +1455 -0
- package/dist/brew-CBsS-Vq1.js +46 -0
- package/dist/brew-V4lMBeE3.js +46 -0
- package/dist/browser-cli-B5uW_onK.js +1690 -0
- package/dist/browser-cli-ClfZn9_h.js +1694 -0
- package/dist/build-info.json +5 -0
- package/dist/bundled/boot/HOOK.md +24 -0
- package/dist/bundled/command-logger/HOOK.md +122 -0
- package/dist/call-DHcgnRYq.js +518 -0
- package/dist/call-Wjjo7gwP.js +517 -0
- package/dist/canvas-host/a2ui/.bundle.hash +1 -0
- package/dist/canvas-host/a2ui/a2ui.bundle.js +17815 -0
- package/dist/canvas-host/a2ui/index.html +307 -0
- package/dist/catalog-CU0Xn2G1.js +186 -0
- package/dist/catalog-DDkwdGfX.js +186 -0
- package/dist/channel-account-context-BHIy71Yh.js +133 -0
- package/dist/channel-account-context-DXU_-EkJ.js +133 -0
- package/dist/channel-activity-BhT7NQ_v.js +94 -0
- package/dist/channel-activity-CvjEwpJz.js +94 -0
- package/dist/channel-activity-nsL1WwXH.js +292 -0
- package/dist/channel-options-B1tMfA9G.js +32 -0
- package/dist/channel-options-gEMUQQGy.js +33 -0
- package/dist/channel-selection-C3BMbeUs.js +51 -0
- package/dist/channel-selection-DHUO7WUa.js +51 -0
- package/dist/channel-web-DBCMnF6w.js +2132 -0
- package/dist/channel-web-DjD8eqnc.js +2134 -0
- package/dist/channels-cli-BfPB163m.js +1436 -0
- package/dist/channels-cli-dEMJmZF8.js +1440 -0
- package/dist/channels-status-issues-BMadvA0-.js +18 -0
- package/dist/channels-status-issues-D5fT2H21.js +18 -0
- package/dist/chat-envelope-AJFUAuBM.js +248 -0
- package/dist/chat-envelope-BrfcPlDM.js +248 -0
- package/dist/chat-type-BP9akbag.js +11 -0
- package/dist/chat-type-CH3W-zKy.js +11 -0
- package/dist/chrome-BQX0gpUh.js +1732 -0
- package/dist/chrome-CIytlE5x.js +1733 -0
- package/dist/chunk-BAMyFYtF.js +341 -0
- package/dist/chunk-BzVoFUZL.js +341 -0
- package/dist/clack-prompter-C6mBTOzE.js +122 -0
- package/dist/clack-prompter-DKcYqv3o.js +121 -0
- package/dist/cleanup-utils-Cb-leJcy.js +94 -0
- package/dist/cleanup-utils-ZC2zvntc.js +94 -0
- package/dist/cli/daemon-cli.js +9 -0
- package/dist/cli-BErCYGAt.js +131 -0
- package/dist/cli-EEZfdXxg.js +135 -0
- package/dist/cli-name-BZsYSp9l.js +23 -0
- package/dist/cli-name-CRe5Ow_t.js +23 -0
- package/dist/cli-utils-BUOtyfnU.js +16 -0
- package/dist/cli-utils-CGB3cBZm.js +16 -0
- package/dist/client-1TPQCsEe.js +2311 -0
- package/dist/client-9dK56xly.js +22 -0
- package/dist/client-CBpe99dr.js +2311 -0
- package/dist/client-D-R1YdRD.js +22 -0
- package/dist/clipboard-A06eV_5C.js +31 -0
- package/dist/clipboard-DQBl3coj.js +31 -0
- package/dist/command-format-BiiNHkWG.js +18 -0
- package/dist/command-format-Dntg_tnC.js +32 -0
- package/dist/command-logger/handler.js +57 -0
- package/dist/command-options-CnHA4TzR.js +26 -0
- package/dist/command-options-D2nN4AXX.js +26 -0
- package/dist/command-registry-BnrYqd5P.js +215 -0
- package/dist/commands-BrlSPrp8.js +41 -0
- package/dist/commands-keXWOHRq.js +41 -0
- package/dist/commands-registry-Cz77bvxB.js +887 -0
- package/dist/commands-registry-DRX3F4kj.js +888 -0
- package/dist/common-CBefYisq.js +156 -0
- package/dist/common-D4fL3S2m.js +156 -0
- package/dist/completion-cli-CXb-Xk3v.js +452 -0
- package/dist/completion-cli-Ca4Y7cQg.js +452 -0
- package/dist/config-CqP5tE9Z.js +3317 -0
- package/dist/config-cli-BYqebY6-.js +247 -0
- package/dist/config-cli-DKXHNFPz.js +243 -0
- package/dist/config-eval-BQIR-wSg.js +102 -0
- package/dist/config-eval-Bh82JoXK.js +102 -0
- package/dist/config-guard-BBPYncEK.js +92 -0
- package/dist/config-guard-CTQwNBtb.js +75 -0
- package/dist/config-qAZfcdDM.js +3315 -0
- package/dist/config-validation-BrjiFbBk.js +18 -0
- package/dist/config-validation-DSXKFJHF.js +18 -0
- package/dist/configure-C--DXb5y.js +885 -0
- package/dist/configure-D7tKM02_.js +883 -0
- package/dist/constants-BBVTjb1j.js +75 -0
- package/dist/constants-C7j1VA2S.js +12 -0
- package/dist/constants-DoYLsBmv.js +12 -0
- package/dist/constants-PMRtHBHU.js +75 -0
- package/dist/control-auth-BB_AdEQ8.js +397 -0
- package/dist/control-auth-Drc3vO7k.js +397 -0
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/index-DdiU_ccM.css +1 -0
- package/dist/control-ui/assets/index-kVUYi64u.js +7723 -0
- package/dist/control-ui/assets/index-kVUYi64u.js.map +1 -0
- package/dist/control-ui/assets/pt-BR-eq0TfCI7.js +2 -0
- package/dist/control-ui/assets/pt-BR-eq0TfCI7.js.map +1 -0
- package/dist/control-ui/assets/zh-CN-DmLG2MF9.js +2 -0
- package/dist/control-ui/assets/zh-CN-DmLG2MF9.js.map +1 -0
- package/dist/control-ui/assets/zh-TW-BLErH0EM.js +2 -0
- package/dist/control-ui/assets/zh-TW-BLErH0EM.js.map +1 -0
- package/dist/control-ui/favicon-32.png +0 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/favicon.svg +67 -0
- package/dist/control-ui/index.html +17 -0
- package/dist/control-ui-assets-DO1L6M0S.js +186 -0
- package/dist/control-ui-assets-S_TLo6Fs.js +186 -0
- package/dist/conversation-label-CDH4rKMG.js +36 -0
- package/dist/conversation-label-CMOfgCVl.js +36 -0
- package/dist/credentials-C_RoJFmK.js +91 -0
- package/dist/credentials-DM_Dj0m8.js +91 -0
- package/dist/cron-cli-DrEGbTLF.js +499 -0
- package/dist/cron-cli-iMnjEJcP.js +495 -0
- package/dist/daemon-cli-BXOrRB0h.js +735 -0
- package/dist/daemon-cli-DbOrC1C6.js +737 -0
- package/dist/daemon-cli.js +14217 -0
- package/dist/daemon-install-LufHc-Sn.js +60 -0
- package/dist/daemon-install-WEBvqVOj.js +56 -0
- package/dist/daemon-install-helpers-4BLEBjpg.js +504 -0
- package/dist/daemon-install-helpers-DVr51zvE.js +504 -0
- package/dist/daemon-runtime-9oDBR7YW.js +13 -0
- package/dist/daemon-runtime-CzFI2dPw.js +13 -0
- package/dist/dangerous-name-matching-BlTBBZns.js +45 -0
- package/dist/dangerous-name-matching-CSq9sJDG.js +45 -0
- package/dist/dangerous-tools-BRmbBvRf.js +253 -0
- package/dist/dangerous-tools-D4jtl72G.js +253 -0
- package/dist/deliver-C3Xs-DSE.js +481 -0
- package/dist/deliver-D49hWPWI.js +481 -0
- package/dist/delivery-queue-BDvalA10.js +244 -0
- package/dist/delivery-queue-BLMWPoKl.js +244 -0
- package/dist/devices-cli-6XBBb605.js +323 -0
- package/dist/devices-cli-BmB_Y5Tj.js +319 -0
- package/dist/diagnostics-BzzhTQzK.js +35 -0
- package/dist/diagnostics-DILtxtcE.js +35 -0
- package/dist/directory-cli-BnVIzNxj.js +225 -0
- package/dist/directory-cli-I7RtmvoP.js +221 -0
- package/dist/dispatcher-B7Yu14v7.js +173 -0
- package/dist/dispatcher-ClUtg8F9.js +174 -0
- package/dist/dm-policy-shared-Cd6QFFx6.js +22 -0
- package/dist/dm-policy-shared-DqkEp7h7.js +22 -0
- package/dist/dns-cli-Cm47-vJu.js +203 -0
- package/dist/dns-cli-DW4a6yJH.js +199 -0
- package/dist/dock-BFxpyZEm.js +906 -0
- package/dist/dock-Hf1acwVy.js +907 -0
- package/dist/doctor-completion-CefSDbii.js +92 -0
- package/dist/doctor-completion-DuOl6k-Z.js +92 -0
- package/dist/doctor-config-flow-DQdWVm5G.js +979 -0
- package/dist/doctor-config-flow-DZCCqya1.js +978 -0
- package/dist/enable-C3I9dWel.js +59 -0
- package/dist/enable-DnwKeWnR.js +59 -0
- package/dist/entry.js +2674 -0
- package/dist/env-DyyqmxSM.js +60 -0
- package/dist/env-vars-CD2_baIP.js +43 -0
- package/dist/env-vars-a7S70ba7.js +43 -0
- package/dist/errors-0dfGxeYQ.js +35 -0
- package/dist/errors-C1kDByVU.js +35 -0
- package/dist/exec-CAk1dxq_.js +164 -0
- package/dist/exec-epNpA1aU.js +164 -0
- package/dist/export-html/template.css +1024 -0
- package/dist/export-html/template.html +88 -0
- package/dist/export-html/template.js +1766 -0
- package/dist/export-html/vendor/highlight.min.js +1213 -0
- package/dist/export-html/vendor/marked.min.js +6 -0
- package/dist/extensionAPI.js +11699 -0
- package/dist/fetch-BMQq41sB.js +281 -0
- package/dist/fetch-CduIccDV.js +67 -0
- package/dist/fetch-Cky99wYB.js +281 -0
- package/dist/fetch-D3tw4B4n.js +67 -0
- package/dist/fetch-DTsU2XnC.js +67 -0
- package/dist/fetch-timeout-CytN1wiO.js +43 -0
- package/dist/fetch-timeout-DBRRPNBi.js +43 -0
- package/dist/file-identity-CeRK5CJC.js +12 -0
- package/dist/file-lock-DWH0TfVu.js +107 -0
- package/dist/file-lock-DXW9h9ek.js +107 -0
- package/dist/format-duration-B-Uv5nOi.js +35 -0
- package/dist/format-duration-Oj8pTbYL.js +35 -0
- package/dist/format-relative-Czf5fUjn.js +55 -0
- package/dist/format-relative-zwkkXJvs.js +55 -0
- package/dist/fs-safe-BjSd07M4.js +115 -0
- package/dist/fs-safe-aWIhCWlb.js +125 -0
- package/dist/gateway-cli-BQ5Nrc2v.js +24127 -0
- package/dist/gateway-cli-x9Pn-J8m.js +24131 -0
- package/dist/gateway-rpc-C9zLj_Sl.js +28 -0
- package/dist/gateway-rpc-Cdx4sTh5.js +28 -0
- package/dist/gmail-setup-utils-CKyh29_R.js +422 -0
- package/dist/gmail-setup-utils-DquflkMR.js +423 -0
- package/dist/health-DlRS-gIZ.js +1414 -0
- package/dist/health-UZKtVUZc.js +1417 -0
- package/dist/health-format-BE5TK5bs.js +28 -0
- package/dist/health-format-DF54wvUU.js +28 -0
- package/dist/heartbeat-visibility-98-alasQ.js +125 -0
- package/dist/heartbeat-visibility-CGSqfsb3.js +125 -0
- package/dist/heartbeat-wake-CvHncCjP.js +182 -0
- package/dist/heartbeat-wake-DLxQm6-U.js +182 -0
- package/dist/help-format-CJQ7APRn.js +17 -0
- package/dist/help-format-D3JhWp1E.js +17 -0
- package/dist/helpers-703bXVlF.js +25 -0
- package/dist/helpers-DAEoFkbn.js +10 -0
- package/dist/helpers-n2CtWpm9.js +25 -0
- package/dist/helpers-ndPQWl6m.js +10 -0
- package/dist/hook-runner-global-nAi_RVmo.js +527 -0
- package/dist/hooks-cli-BN23UkSe.js +1221 -0
- package/dist/hooks-cli-CCigUQAP.js +1217 -0
- package/dist/host-env-security-BGibnCbS.js +106 -0
- package/dist/host-env-security-axRnIi8d.js +106 -0
- package/dist/image-ops-CX41n0v5.js +354 -0
- package/dist/image-ops-DSL3eFfQ.js +354 -0
- package/dist/import-BwboAUxS.js +604 -0
- package/dist/import-TnR4slPl.js +606 -0
- package/dist/inbound-context-BLy-G2Eq.js +68 -0
- package/dist/inbound-context-Cuu0thCw.js +68 -0
- package/dist/index.js +598 -0
- package/dist/input-provenance-gIfDn1ki.js +35 -0
- package/dist/input-provenance-wkso1o5V.js +35 -0
- package/dist/inspect-BEpFbi0c.js +286 -0
- package/dist/inspect-BeNNpWna.js +286 -0
- package/dist/installs-BmtDxAA-.js +319 -0
- package/dist/installs-DJ188C74.js +319 -0
- package/dist/ip-D4VG5EJO.js +200 -0
- package/dist/ip-MwCwRA7c.js +200 -0
- package/dist/ipv4-DNo9AFDu.js +46 -0
- package/dist/ipv4-VfoVR5uR.js +46 -0
- package/dist/ir-DRpvvv-1.js +972 -0
- package/dist/is-main-BE1Jih91.js +30 -0
- package/dist/json-file-BW22hGtf.js +25 -0
- package/dist/json-file-DwRAfAAy.js +25 -0
- package/dist/json-files-BI20PLIm.js +46 -0
- package/dist/json-files-Dy52honG.js +46 -0
- package/dist/lanes-1CBKdsiR.js +58 -0
- package/dist/lanes-DqVYfPRG.js +58 -0
- package/dist/lifecycle-core-BzhjWI2E.js +476 -0
- package/dist/lifecycle-core-DctTLBFp.js +474 -0
- package/dist/links-CtGBIrG8.js +15 -0
- package/dist/links-CwTlzaPe.js +15 -0
- package/dist/loader-BLMpE4uG.js +22397 -0
- package/dist/loader-C5cQlGXB.js +22400 -0
- package/dist/location-BUhzov-a.js +43 -0
- package/dist/location-Qo8Ii1zo.js +43 -0
- package/dist/logger-ASsO5Nz-.js +49 -0
- package/dist/logger-B8BE0PyS.js +12 -0
- package/dist/logger-CPvz-aPM.js +47 -0
- package/dist/logger-cL0D2DCr.js +12 -0
- package/dist/logging-Cd9y2AdQ.js +20 -0
- package/dist/logging-DRwtiLIS.js +1 -0
- package/dist/logging-DTEoeoa3.js +19 -0
- package/dist/logging-fywhKCmE.js +1 -0
- package/dist/login-B5TdMKIC.js +61 -0
- package/dist/login-Cak5EAvl.js +62 -0
- package/dist/login-qr-BuTJwO4R.js +329 -0
- package/dist/login-qr-Do-8NFKK.js +325 -0
- package/dist/logs-cli-BkCweYSR.js +240 -0
- package/dist/logs-cli-CMUTrgGH.js +236 -0
- package/dist/markdown-tables-B3sXo71y.js +29 -0
- package/dist/markdown-tables-C48ANSSq.js +29 -0
- package/dist/media-DcDCPyuW.js +971 -0
- package/dist/media-DgxPvn2i.js +9492 -0
- package/dist/message-action-names-BwpFcASf.js +2520 -0
- package/dist/message-action-names-CH6TDClE.js +2520 -0
- package/dist/message-channel-CtcVHawF.js +91 -0
- package/dist/message-channel-tuc9CdEw.js +91 -0
- package/dist/mime-CAqaK3kp.js +146 -0
- package/dist/mime-ViuhRuMM.js +146 -0
- package/dist/mutable-allowlist-detectors-BXE7Hr7F.js +64 -0
- package/dist/mutable-allowlist-detectors-CtKavajp.js +64 -0
- package/dist/net-DSkFMHJ8.js +225 -0
- package/dist/net-DTqfFYzt.js +225 -0
- package/dist/node-cli-DTp-eCFc.js +1386 -0
- package/dist/node-cli-Yd_KvTgV.js +1390 -0
- package/dist/node-service-RyMlWp8N.js +67 -0
- package/dist/node-service-TL9b6Qfz.js +67 -0
- package/dist/nodes-cli-BcXyjWnw.js +1350 -0
- package/dist/nodes-cli-DHHf5weG.js +1346 -0
- package/dist/nodes-screen-B7HJugJ0.js +250 -0
- package/dist/nodes-screen-nCRd71Mk.js +250 -0
- package/dist/note-B6142LyJ.js +92 -0
- package/dist/note-D-EI0czq.js +92 -0
- package/dist/npm-registry-spec-PPyRXSpx.js +786 -0
- package/dist/npm-registry-spec-uUmDWe6v.js +786 -0
- package/dist/npm-resolution-C-6NY92-.js +86 -0
- package/dist/npm-resolution-DSRcDO7P.js +86 -0
- package/dist/onboard-D0pXb_02.js +645 -0
- package/dist/onboard-DdAR-LF_.js +647 -0
- package/dist/onboard-auth-cNtb3FTP.js +211 -0
- package/dist/onboard-auth-gwz-0mZ6.js +207 -0
- package/dist/onboard-channels-8SAR1gMS.js +2618 -0
- package/dist/onboard-channels-tRmXz2Lj.js +2619 -0
- package/dist/onboard-config-DOmXYEvJ.js +39 -0
- package/dist/onboard-config-JmR21VYa.js +39 -0
- package/dist/onboard-helpers-DGVxeLf_.js +358 -0
- package/dist/onboard-helpers-DdqoC3w8.js +357 -0
- package/dist/onboard-remote-CspZpXS9.js +127 -0
- package/dist/onboard-remote-DJcHZQqI.js +127 -0
- package/dist/onboarding-BH0siVu3.js +586 -0
- package/dist/onboarding-CKmRrgeq.js +588 -0
- package/dist/onboarding.finalize-BGyWeNH5.js +402 -0
- package/dist/onboarding.finalize-BpVbqIc1.js +404 -0
- package/dist/onboarding.gateway-config-B4xt1gtO.js +202 -0
- package/dist/onboarding.gateway-config-CT9RcbVE.js +196 -0
- package/dist/outbound-B3wlEY-e.js +220 -0
- package/dist/outbound-KHig2PTG.js +221 -0
- package/dist/outbound-attachment-BZkefkAT.js +18 -0
- package/dist/outbound-attachment-D5FMlKjS.js +18 -0
- package/dist/outbound-attachment-DjvyU7Oq.js +18 -0
- package/dist/pairing-cli-BTwS98JV.js +130 -0
- package/dist/pairing-cli-C8jztqm2.js +126 -0
- package/dist/pairing-labels-E2eoE9tc.js +9 -0
- package/dist/pairing-labels-Ks4ey7DT.js +9 -0
- package/dist/pairing-store-C7DF-eCM.js +460 -0
- package/dist/pairing-store-CU4_h9xa.js +459 -0
- package/dist/parse-log-line-GisaZn5H.js +44 -0
- package/dist/parse-log-line-ZsbwG_u7.js +44 -0
- package/dist/parse-timeout-BpphuwYl.js +16 -0
- package/dist/parse-timeout-CE6BjmGU.js +16 -0
- package/dist/path-env-DMKJ1GE3.js +89 -0
- package/dist/path-env-Dq-jhL2Z.js +89 -0
- package/dist/path-safety-BFE0XmGC.js +14 -0
- package/dist/path-safety-BJ8ge6Ho.js +14 -0
- package/dist/paths-DHuXVC00.js +229 -0
- package/dist/plugin-auto-enable-Bms-lvxW.js +289 -0
- package/dist/plugin-auto-enable-fc5IL3zs.js +288 -0
- package/dist/plugin-registry-BrQP6X71.js +33 -0
- package/dist/plugin-registry-nbb06LsB.js +33 -0
- package/dist/plugin-sdk/account-id.d.ts +1 -0
- package/dist/plugin-sdk/account-id.js +34 -0
- package/dist/plugin-sdk/agents/agent-helpers/errors.d.ts +55 -0
- package/dist/plugin-sdk/agents/agent-helpers/google.d.ts +3 -0
- package/dist/plugin-sdk/agents/agent-helpers/images.d.ts +21 -0
- package/dist/plugin-sdk/agents/agent-helpers/message-sanitization.d.ts +14 -0
- package/dist/plugin-sdk/agents/agent-helpers/messaging-dedupe.d.ts +10 -0
- package/dist/plugin-sdk/agents/agent-helpers/openai.d.ts +9 -0
- package/dist/plugin-sdk/agents/agent-helpers/turns.d.ts +20 -0
- package/dist/plugin-sdk/agents/agent-helpers/types.d.ts +1 -0
- package/dist/plugin-sdk/agents/agent-helpers.d.ts +10 -0
- package/dist/plugin-sdk/agents/agent-messaging.d.ts +8 -0
- package/dist/plugin-sdk/agents/agent-scope.d.ts +81 -0
- package/dist/plugin-sdk/agents/agent-types.d.ts +73 -0
- package/dist/plugin-sdk/agents/agent-utils.d.ts +25 -0
- package/dist/plugin-sdk/agents/announce-idempotency.d.ts +11 -0
- package/dist/plugin-sdk/agents/block-chunker.d.ts +19 -0
- package/dist/plugin-sdk/agents/channel-tools.d.ts +27 -0
- package/dist/plugin-sdk/agents/cli-session.d.ts +3 -0
- package/dist/plugin-sdk/agents/current-time.d.ts +17 -0
- package/dist/plugin-sdk/agents/date-time.d.ts +13 -0
- package/dist/plugin-sdk/agents/identity-avatar.d.ts +15 -0
- package/dist/plugin-sdk/agents/identity.d.ts +28 -0
- package/dist/plugin-sdk/agents/image-sanitization.d.ts +8 -0
- package/dist/plugin-sdk/agents/lanes.d.ts +3 -0
- package/dist/plugin-sdk/agents/live-auth-keys.d.ts +6 -0
- package/dist/plugin-sdk/agents/owner-display.d.ts +19 -0
- package/dist/plugin-sdk/agents/provider-utils.d.ts +20 -0
- package/dist/plugin-sdk/agents/schema/typebox.d.ts +14 -0
- package/dist/plugin-sdk/agents/session-write-lock.d.ts +53 -0
- package/dist/plugin-sdk/agents/stable-stringify.d.ts +1 -0
- package/dist/plugin-sdk/agents/subagent-announce-queue.d.ts +24 -0
- package/dist/plugin-sdk/agents/subagent-announce.d.ts +39 -0
- package/dist/plugin-sdk/agents/subagent-depth.d.ts +11 -0
- package/dist/plugin-sdk/agents/subagent-lifecycle-events.d.ts +18 -0
- package/dist/plugin-sdk/agents/subagent-registry-cleanup.d.ts +24 -0
- package/dist/plugin-sdk/agents/subagent-registry-completion.d.ts +15 -0
- package/dist/plugin-sdk/agents/subagent-registry-queries.d.ts +11 -0
- package/dist/plugin-sdk/agents/subagent-registry-state.d.ts +7 -0
- package/dist/plugin-sdk/agents/subagent-registry.d.ts +45 -0
- package/dist/plugin-sdk/agents/subagent-registry.store.d.ts +4 -0
- package/dist/plugin-sdk/agents/subagent-registry.types.d.ts +34 -0
- package/dist/plugin-sdk/agents/subagent-spawn.d.ts +46 -0
- package/dist/plugin-sdk/agents/timeout.d.ts +8 -0
- package/dist/plugin-sdk/agents/tool-call-id.d.ts +27 -0
- package/dist/plugin-sdk/agents/tool-display-common.d.ts +32 -0
- package/dist/plugin-sdk/agents/tool-display.d.ts +15 -0
- package/dist/plugin-sdk/agents/tool-images.d.ts +10 -0
- package/dist/plugin-sdk/agents/tools/agent-step.d.ts +15 -0
- package/dist/plugin-sdk/agents/tools/common.d.ts +80 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-guild.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-messaging.d.ts +6 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-moderation-shared.d.ts +13 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-moderation.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-presence.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/discord-actions.d.ts +5 -0
- package/dist/plugin-sdk/agents/tools/sessions-access.d.ts +42 -0
- package/dist/plugin-sdk/agents/tools/sessions-helpers.d.ts +51 -0
- package/dist/plugin-sdk/agents/tools/sessions-resolution.d.ts +59 -0
- package/dist/plugin-sdk/agents/tools/sessions-send-helpers.d.ts +34 -0
- package/dist/plugin-sdk/agents/tools/slack-actions.d.ts +15 -0
- package/dist/plugin-sdk/agents/tools/telegram-actions.d.ts +7 -0
- package/dist/plugin-sdk/agents/tools/whatsapp-actions.d.ts +3 -0
- package/dist/plugin-sdk/agents/tools/whatsapp-target-auth.d.ts +10 -0
- package/dist/plugin-sdk/agents/usage.d.ts +49 -0
- package/dist/plugin-sdk/agents/workspace.d.ts +1 -0
- package/dist/plugin-sdk/auth/api-key-rotation.d.ts +22 -0
- package/dist/plugin-sdk/auth/constants.d.ts +15 -0
- package/dist/plugin-sdk/auth/display.d.ts +7 -0
- package/dist/plugin-sdk/auth/doctor.d.ts +8 -0
- package/dist/plugin-sdk/auth/env-injection.d.ts +38 -0
- package/dist/plugin-sdk/auth/index.d.ts +10 -0
- package/dist/plugin-sdk/auth/oauth.d.ts +13 -0
- package/dist/plugin-sdk/auth/order.d.ts +8 -0
- package/dist/plugin-sdk/auth/paths.d.ts +3 -0
- package/dist/plugin-sdk/auth/profiles.d.ts +11 -0
- package/dist/plugin-sdk/auth/provider-auth.d.ts +32 -0
- package/dist/plugin-sdk/auth/store.d.ts +7 -0
- package/dist/plugin-sdk/auth/types.d.ts +45 -0
- package/dist/plugin-sdk/auth/usage.d.ts +80 -0
- package/dist/plugin-sdk/auto-reply/chunk.d.ts +45 -0
- package/dist/plugin-sdk/auto-reply/command-auth.d.ts +17 -0
- package/dist/plugin-sdk/auto-reply/command-detection.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/commands-args.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/commands-registry.d.ts +47 -0
- package/dist/plugin-sdk/auto-reply/commands-registry.data.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/commands-registry.types.d.ts +66 -0
- package/dist/plugin-sdk/auto-reply/dispatch.d.ts +32 -0
- package/dist/plugin-sdk/auto-reply/envelope.d.ts +58 -0
- package/dist/plugin-sdk/auto-reply/fallback-state.d.ts +55 -0
- package/dist/plugin-sdk/auto-reply/group-activation.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/heartbeat-reply-payload.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/heartbeat.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/inbound-debounce.d.ts +17 -0
- package/dist/plugin-sdk/auto-reply/media-note.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/model.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/abort.d.ts +32 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-execution.d.ts +58 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-helpers.d.ts +15 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-payloads.d.ts +27 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-utils.d.ts +119 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner.d.ts +36 -0
- package/dist/plugin-sdk/auto-reply/reply/block-reply-coalescer.d.ts +15 -0
- package/dist/plugin-sdk/auto-reply/reply/block-reply-pipeline.d.ts +31 -0
- package/dist/plugin-sdk/auto-reply/reply/block-streaming.d.ts +22 -0
- package/dist/plugin-sdk/auto-reply/reply/body.d.ts +10 -0
- package/dist/plugin-sdk/auto-reply/reply/command-gates.d.ts +18 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-allowlist.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-config.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-context.d.ts +12 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-core.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-export-session.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-info.d.ts +11 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-plugin.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-session.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-setunset-standard.d.ts +10 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-setunset.d.ts +34 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-slash-parse.d.ts +24 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-status.d.ts +20 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-agents.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-focus.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-help.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-info.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-kill.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-list.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-log.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-send.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-spawn.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-unfocus.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/shared.d.ts +81 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-tts.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-types.d.ts +49 -0
- package/dist/plugin-sdk/auto-reply/reply/commands.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/config-commands.d.ts +15 -0
- package/dist/plugin-sdk/auto-reply/reply/config-value.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/debug-commands.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.fast-lane.d.ts +7 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.impl.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.levels.d.ts +11 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.params.d.ts +49 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.parse.d.ts +37 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.persist.d.ts +39 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.queue-validation.d.ts +10 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.shared.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-parsing.d.ts +5 -0
- package/dist/plugin-sdk/auto-reply/reply/directives.d.ts +19 -0
- package/dist/plugin-sdk/auto-reply/reply/dispatch-from-config.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/reply/dispatcher-registry.d.ts +24 -0
- package/dist/plugin-sdk/auto-reply/reply/followup-runner.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-apply.d.ts +55 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-utils.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives.d.ts +102 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-inline-actions.d.ts +45 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-run.d.ts +59 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/groups.d.ts +26 -0
- package/dist/plugin-sdk/auto-reply/reply/history.d.ts +72 -0
- package/dist/plugin-sdk/auto-reply/reply/inbound-context.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/inbound-dedupe.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/inbound-meta.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/inbound-text.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply/line-directives.d.ts +22 -0
- package/dist/plugin-sdk/auto-reply/reply/mentions.d.ts +19 -0
- package/dist/plugin-sdk/auto-reply/reply/normalize-reply.d.ts +11 -0
- package/dist/plugin-sdk/auto-reply/reply/origin-routing.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/reply/provider-dispatcher.d.ts +19 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/cleanup.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/directive.d.ts +15 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/drain.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/enqueue.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/normalize.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/settings.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/state.d.ts +20 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/types.d.ts +72 -0
- package/dist/plugin-sdk/auto-reply/reply/queue-policy.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/queue.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-delivery.d.ts +27 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-directives.d.ts +14 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-dispatcher.d.ts +53 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-inline.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-payloads.d.ts +27 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-reference.d.ts +20 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-tags.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-threading.d.ts +9 -0
- package/dist/plugin-sdk/auto-reply/reply/response-prefix-template.d.ts +49 -0
- package/dist/plugin-sdk/auto-reply/reply/route-reply.d.ts +56 -0
- package/dist/plugin-sdk/auto-reply/reply/session-reset-prompt.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply/session-run-accounting.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/session-updates.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/session-usage.d.ts +21 -0
- package/dist/plugin-sdk/auto-reply/reply/session.d.ts +26 -0
- package/dist/plugin-sdk/auto-reply/reply/strip-inbound-meta.d.ts +27 -0
- package/dist/plugin-sdk/auto-reply/reply/subagents-utils.d.ts +26 -0
- package/dist/plugin-sdk/auto-reply/reply/typing-mode.d.ts +27 -0
- package/dist/plugin-sdk/auto-reply/reply/typing.d.ts +18 -0
- package/dist/plugin-sdk/auto-reply/reply/untrusted-context.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply.d.ts +5 -0
- package/dist/plugin-sdk/auto-reply/send-policy.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/status.d.ts +50 -0
- package/dist/plugin-sdk/auto-reply/templating.d.ts +155 -0
- package/dist/plugin-sdk/auto-reply/thinking.d.ts +7 -0
- package/dist/plugin-sdk/auto-reply/tokens.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/types.d.ts +79 -0
- package/dist/plugin-sdk/channel-web.d.ts +6 -0
- package/dist/plugin-sdk/channels/account-summary.d.ts +17 -0
- package/dist/plugin-sdk/channels/ack-reactions.d.ts +29 -0
- package/dist/plugin-sdk/channels/allow-from.d.ts +11 -0
- package/dist/plugin-sdk/channels/allowlist-match.d.ts +16 -0
- package/dist/plugin-sdk/channels/allowlists/resolve-utils.d.ts +33 -0
- package/dist/plugin-sdk/channels/channel-config.d.ts +39 -0
- package/dist/plugin-sdk/channels/chat-type.d.ts +2 -0
- package/dist/plugin-sdk/channels/command-gating.d.ts +20 -0
- package/dist/plugin-sdk/channels/conversation-label.d.ts +2 -0
- package/dist/plugin-sdk/channels/dock.d.ts +24 -0
- package/dist/plugin-sdk/channels/draft-stream-controls.d.ts +54 -0
- package/dist/plugin-sdk/channels/draft-stream-loop.d.ts +13 -0
- package/dist/plugin-sdk/channels/location.d.ts +21 -0
- package/dist/plugin-sdk/channels/logging.d.ts +20 -0
- package/dist/plugin-sdk/channels/mention-gating.d.ts +27 -0
- package/dist/plugin-sdk/channels/model-overrides.d.ts +18 -0
- package/dist/plugin-sdk/channels/plugins/account-action-gate.d.ts +5 -0
- package/dist/plugin-sdk/channels/plugins/account-helpers.d.ts +6 -0
- package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.d.ts +3 -0
- package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.guild-admin.d.ts +9 -0
- package/dist/plugin-sdk/channels/plugins/actions/discord.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/actions/shared.d.ts +7 -0
- package/dist/plugin-sdk/channels/plugins/actions/signal.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/actions/telegram.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/agent-tools/whatsapp-login.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/allowlist-match.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/bluebubbles-actions.d.ts +48 -0
- package/dist/plugin-sdk/channels/plugins/channel-config.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/config-helpers.d.ts +14 -0
- package/dist/plugin-sdk/channels/plugins/config-schema.d.ts +3 -0
- package/dist/plugin-sdk/channels/plugins/config-writes.d.ts +7 -0
- package/dist/plugin-sdk/channels/plugins/directory-config.d.ts +16 -0
- package/dist/plugin-sdk/channels/plugins/group-mentions.d.ts +18 -0
- package/dist/plugin-sdk/channels/plugins/helpers.d.ts +8 -0
- package/dist/plugin-sdk/channels/plugins/index.d.ts +8 -0
- package/dist/plugin-sdk/channels/plugins/media-limits.d.ts +9 -0
- package/dist/plugin-sdk/channels/plugins/media-payload.d.ts +15 -0
- package/dist/plugin-sdk/channels/plugins/message-action-names.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/discord.d.ts +14 -0
- package/dist/plugin-sdk/channels/plugins/normalize/imessage.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/shared.d.ts +6 -0
- package/dist/plugin-sdk/channels/plugins/normalize/signal.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/slack.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/telegram.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/whatsapp.d.ts +3 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/channel-access-configure.d.ts +21 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/channel-access.d.ts +31 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/discord.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/helpers.d.ts +177 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/imessage.d.ts +6 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/signal.d.ts +7 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/slack.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/telegram.d.ts +4 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/whatsapp.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding-types.d.ts +77 -0
- package/dist/plugin-sdk/channels/plugins/outbound/load.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/pairing-message.d.ts +1 -0
- package/dist/plugin-sdk/channels/plugins/pairing.d.ts +16 -0
- package/dist/plugin-sdk/channels/plugins/registry-loader.d.ts +5 -0
- package/dist/plugin-sdk/channels/plugins/setup-helpers.d.ts +13 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/bluebubbles.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/discord.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/shared.d.ts +29 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/telegram.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/whatsapp.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/types.adapters.d.ts +282 -0
- package/dist/plugin-sdk/channels/plugins/types.core.d.ts +350 -0
- package/dist/plugin-sdk/channels/plugins/types.d.ts +6 -0
- package/dist/plugin-sdk/channels/plugins/types.plugin.d.ts +53 -0
- package/dist/plugin-sdk/channels/plugins/whatsapp-heartbeat.d.ts +11 -0
- package/dist/plugin-sdk/channels/plugins/whatsapp-shared.d.ts +5 -0
- package/dist/plugin-sdk/channels/registry.d.ts +15 -0
- package/dist/plugin-sdk/channels/reply-prefix.d.ts +24 -0
- package/dist/plugin-sdk/channels/sender-label.d.ts +9 -0
- package/dist/plugin-sdk/channels/session.d.ts +18 -0
- package/dist/plugin-sdk/channels/status-reactions.d.ts +62 -0
- package/dist/plugin-sdk/channels/targets.d.ts +42 -0
- package/dist/plugin-sdk/channels/telegram/api.d.ts +5 -0
- package/dist/plugin-sdk/channels/typing-lifecycle.d.ts +12 -0
- package/dist/plugin-sdk/channels/typing.d.ts +13 -0
- package/dist/plugin-sdk/channels/voice-credentials.d.ts +26 -0
- package/dist/plugin-sdk/channels/web/index.d.ts +1 -0
- package/dist/plugin-sdk/cli/cli-name.d.ts +3 -0
- package/dist/plugin-sdk/cli/command-format.d.ts +1 -0
- package/dist/plugin-sdk/cli/deps.d.ts +18 -0
- package/dist/plugin-sdk/cli/outbound-send-deps.d.ts +4 -0
- package/dist/plugin-sdk/cli/outbound-send-mapping.d.ts +10 -0
- package/dist/plugin-sdk/cli/parse-bytes.d.ts +4 -0
- package/dist/plugin-sdk/cli/parse-duration.d.ts +4 -0
- package/dist/plugin-sdk/cli/profile-utils.d.ts +2 -0
- package/dist/plugin-sdk/cli/progress.d.ts +24 -0
- package/dist/plugin-sdk/cli/wait.d.ts +1 -0
- package/dist/plugin-sdk/commands/agent/delivery.d.ts +25 -0
- package/dist/plugin-sdk/commands/agent/run-context.d.ts +2 -0
- package/dist/plugin-sdk/commands/agent/session-store.d.ts +16 -0
- package/dist/plugin-sdk/commands/agent/session.d.ts +32 -0
- package/dist/plugin-sdk/commands/agent/types.d.ts +89 -0
- package/dist/plugin-sdk/commands/agent.d.ts +14 -0
- package/dist/plugin-sdk/commands/daemon-runtime.d.ts +8 -0
- package/dist/plugin-sdk/commands/health.d.ts +63 -0
- package/dist/plugin-sdk/commands/oauth-flow.d.ts +21 -0
- package/dist/plugin-sdk/commands/onboard-helpers.d.ts +76 -0
- package/dist/plugin-sdk/commands/onboard-types.d.ts +65 -0
- package/dist/plugin-sdk/commands/signal-install.d.ts +30 -0
- package/dist/plugin-sdk/config/agent-dirs.d.ts +14 -0
- package/dist/plugin-sdk/config/agent-limits.d.ts +6 -0
- package/dist/plugin-sdk/config/backup-rotation.d.ts +5 -0
- package/dist/plugin-sdk/config/cache-utils.d.ts +6 -0
- package/dist/plugin-sdk/config/commands.d.ts +20 -0
- package/dist/plugin-sdk/config/config-paths.d.ts +10 -0
- package/dist/plugin-sdk/config/config.d.ts +7 -0
- package/dist/plugin-sdk/config/dangerous-name-matching.d.ts +12 -0
- package/dist/plugin-sdk/config/defaults.d.ts +18 -0
- package/dist/plugin-sdk/config/discord-preview-streaming.d.ts +25 -0
- package/dist/plugin-sdk/config/env-preserve.d.ts +10 -0
- package/dist/plugin-sdk/config/env-substitution.d.ts +36 -0
- package/dist/plugin-sdk/config/env-vars.d.ts +6 -0
- package/dist/plugin-sdk/config/group-policy.d.ts +49 -0
- package/dist/plugin-sdk/config/includes.d.ts +32 -0
- package/dist/plugin-sdk/config/io.d.ts +60 -0
- package/dist/plugin-sdk/config/legacy-migrate.d.ts +5 -0
- package/dist/plugin-sdk/config/legacy.d.ts +6 -0
- package/dist/plugin-sdk/config/legacy.migrations.d.ts +2 -0
- package/dist/plugin-sdk/config/legacy.rules.d.ts +2 -0
- package/dist/plugin-sdk/config/legacy.shared.d.ts +10 -0
- package/dist/plugin-sdk/config/markdown-tables.d.ts +7 -0
- package/dist/plugin-sdk/config/merge-config.d.ts +7 -0
- package/dist/plugin-sdk/config/merge-patch.d.ts +5 -0
- package/dist/plugin-sdk/config/normalize-paths.d.ts +8 -0
- package/dist/plugin-sdk/config/paths.d.ts +57 -0
- package/dist/plugin-sdk/config/prototype-keys.d.ts +1 -0
- package/dist/plugin-sdk/config/runtime-group-policy.d.ts +56 -0
- package/dist/plugin-sdk/config/runtime-overrides.d.ts +15 -0
- package/dist/plugin-sdk/config/sessions/artifacts.d.ts +5 -0
- package/dist/plugin-sdk/config/sessions/constants.d.ts +2 -0
- package/dist/plugin-sdk/config/sessions/delivery-info.d.ts +16 -0
- package/dist/plugin-sdk/config/sessions/disk-budget.d.ts +28 -0
- package/dist/plugin-sdk/config/sessions/group.d.ts +11 -0
- package/dist/plugin-sdk/config/sessions/main-session.d.ts +43 -0
- package/dist/plugin-sdk/config/sessions/metadata.d.ts +16 -0
- package/dist/plugin-sdk/config/sessions/paths.d.ts +21 -0
- package/dist/plugin-sdk/config/sessions/reset.d.ts +43 -0
- package/dist/plugin-sdk/config/sessions/session-file.d.ts +15 -0
- package/dist/plugin-sdk/config/sessions/session-key.d.ts +8 -0
- package/dist/plugin-sdk/config/sessions/store.d.ts +123 -0
- package/dist/plugin-sdk/config/sessions/transcript.d.ts +18 -0
- package/dist/plugin-sdk/config/sessions/types.d.ts +136 -0
- package/dist/plugin-sdk/config/sessions.d.ts +13 -0
- package/dist/plugin-sdk/config/talk.d.ts +21 -0
- package/dist/plugin-sdk/config/telegram-custom-commands.d.ts +24 -0
- package/dist/plugin-sdk/config/types.agent-defaults.d.ts +168 -0
- package/dist/plugin-sdk/config/types.agents-shared.d.ts +43 -0
- package/dist/plugin-sdk/config/types.agents.d.ts +66 -0
- package/dist/plugin-sdk/config/types.approvals.d.ts +26 -0
- package/dist/plugin-sdk/config/types.auth.d.ts +28 -0
- package/dist/plugin-sdk/config/types.base.d.ts +202 -0
- package/dist/plugin-sdk/config/types.browser.d.ts +65 -0
- package/dist/plugin-sdk/config/types.channel-messaging-common.d.ts +44 -0
- package/dist/plugin-sdk/config/types.channels.d.ts +53 -0
- package/dist/plugin-sdk/config/types.cron.d.ts +26 -0
- package/dist/plugin-sdk/config/types.d.ts +27 -0
- package/dist/plugin-sdk/config/types.discord.d.ts +271 -0
- package/dist/plugin-sdk/config/types.gateway.d.ts +335 -0
- package/dist/plugin-sdk/config/types.googlechat.d.ts +107 -0
- package/dist/plugin-sdk/config/types.hooks.d.ts +123 -0
- package/dist/plugin-sdk/config/types.imessage.d.ts +77 -0
- package/dist/plugin-sdk/config/types.installs.d.ts +14 -0
- package/dist/plugin-sdk/config/types.irc.d.ts +53 -0
- package/dist/plugin-sdk/config/types.messages.d.ts +149 -0
- package/dist/plugin-sdk/config/types.models.d.ts +41 -0
- package/dist/plugin-sdk/config/types.msteams.d.ts +108 -0
- package/dist/plugin-sdk/config/types.node-host.d.ts +10 -0
- package/dist/plugin-sdk/config/types.plugins.d.ts +23 -0
- package/dist/plugin-sdk/config/types.queue.d.ts +14 -0
- package/dist/plugin-sdk/config/types.remoteclaw.d.ts +119 -0
- package/dist/plugin-sdk/config/types.signal.d.ts +46 -0
- package/dist/plugin-sdk/config/types.slack.d.ts +179 -0
- package/dist/plugin-sdk/config/types.telegram.d.ts +187 -0
- package/dist/plugin-sdk/config/types.tools.d.ts +249 -0
- package/dist/plugin-sdk/config/types.tts.d.ts +79 -0
- package/dist/plugin-sdk/config/types.whatsapp.d.ts +101 -0
- package/dist/plugin-sdk/config/validation.d.ts +37 -0
- package/dist/plugin-sdk/config/version.d.ts +8 -0
- package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +93 -0
- package/dist/plugin-sdk/config/zod-schema.agent-runtime.d.ts +302 -0
- package/dist/plugin-sdk/config/zod-schema.agents.d.ts +224 -0
- package/dist/plugin-sdk/config/zod-schema.allowdeny.d.ts +13 -0
- package/dist/plugin-sdk/config/zod-schema.approvals.d.ts +15 -0
- package/dist/plugin-sdk/config/zod-schema.channels.d.ts +6 -0
- package/dist/plugin-sdk/config/zod-schema.core.d.ts +355 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +3155 -0
- package/dist/plugin-sdk/config/zod-schema.hooks.d.ts +85 -0
- package/dist/plugin-sdk/config/zod-schema.installs.d.ts +16 -0
- package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +3656 -0
- package/dist/plugin-sdk/config/zod-schema.providers-whatsapp.d.ts +235 -0
- package/dist/plugin-sdk/config/zod-schema.providers.d.ts +2182 -0
- package/dist/plugin-sdk/config/zod-schema.sensitive.d.ts +2 -0
- package/dist/plugin-sdk/config/zod-schema.session.d.ts +228 -0
- package/dist/plugin-sdk/cron/delivery.d.ts +9 -0
- package/dist/plugin-sdk/cron/parse.d.ts +1 -0
- package/dist/plugin-sdk/cron/schedule.d.ts +2 -0
- package/dist/plugin-sdk/cron/service/jobs.d.ts +21 -0
- package/dist/plugin-sdk/cron/service/locked.d.ts +2 -0
- package/dist/plugin-sdk/cron/service/normalize.d.ts +18 -0
- package/dist/plugin-sdk/cron/service/ops.d.ts +81 -0
- package/dist/plugin-sdk/cron/service/state.d.ts +125 -0
- package/dist/plugin-sdk/cron/service/store.d.ts +9 -0
- package/dist/plugin-sdk/cron/service/timer.d.ts +47 -0
- package/dist/plugin-sdk/cron/service.d.ts +66 -0
- package/dist/plugin-sdk/cron/session-reaper.d.ts +35 -0
- package/dist/plugin-sdk/cron/stagger.d.ts +8 -0
- package/dist/plugin-sdk/cron/store.d.ts +6 -0
- package/dist/plugin-sdk/cron/types.d.ts +131 -0
- package/dist/plugin-sdk/cron/webhook-url.d.ts +1 -0
- package/dist/plugin-sdk/daemon/constants.d.ts +35 -0
- package/dist/plugin-sdk/discord/accounts.d.ts +21 -0
- package/dist/plugin-sdk/discord/api.d.ts +11 -0
- package/dist/plugin-sdk/discord/audit.d.ts +29 -0
- package/dist/plugin-sdk/discord/chunk.d.ts +20 -0
- package/dist/plugin-sdk/discord/client.d.ts +21 -0
- package/dist/plugin-sdk/discord/components-registry.d.ts +16 -0
- package/dist/plugin-sdk/discord/components.d.ts +196 -0
- package/dist/plugin-sdk/discord/directory-live.d.ts +4 -0
- package/dist/plugin-sdk/discord/draft-chunking.d.ts +6 -0
- package/dist/plugin-sdk/discord/draft-stream.d.ts +21 -0
- package/dist/plugin-sdk/discord/gateway-logging.d.ts +8 -0
- package/dist/plugin-sdk/discord/guilds.d.ts +6 -0
- package/dist/plugin-sdk/discord/monitor/agent-components.d.ts +55 -0
- package/dist/plugin-sdk/discord/monitor/allow-list.d.ts +174 -0
- package/dist/plugin-sdk/discord/monitor/commands.d.ts +2 -0
- package/dist/plugin-sdk/discord/monitor/format.d.ts +13 -0
- package/dist/plugin-sdk/discord/monitor/gateway-plugin.d.ts +8 -0
- package/dist/plugin-sdk/discord/monitor/gateway-registry.d.ts +9 -0
- package/dist/plugin-sdk/discord/monitor/listeners.d.ts +44 -0
- package/dist/plugin-sdk/discord/monitor/message-handler.d.ts +5 -0
- package/dist/plugin-sdk/discord/monitor/message-handler.preflight.d.ts +14 -0
- package/dist/plugin-sdk/discord/monitor/message-handler.preflight.types.d.ts +95 -0
- package/dist/plugin-sdk/discord/monitor/message-handler.process.d.ts +2 -0
- package/dist/plugin-sdk/discord/monitor/message-utils.d.ts +40 -0
- package/dist/plugin-sdk/discord/monitor/native-command.d.ts +23 -0
- package/dist/plugin-sdk/discord/monitor/presence-cache.d.ts +9 -0
- package/dist/plugin-sdk/discord/monitor/presence.d.ts +5 -0
- package/dist/plugin-sdk/discord/monitor/provider.allowlist.d.ts +14 -0
- package/dist/plugin-sdk/discord/monitor/provider.d.ts +28 -0
- package/dist/plugin-sdk/discord/monitor/provider.lifecycle.d.ts +23 -0
- package/dist/plugin-sdk/discord/monitor/reply-context.d.ts +17 -0
- package/dist/plugin-sdk/discord/monitor/reply-delivery.d.ts +22 -0
- package/dist/plugin-sdk/discord/monitor/rest-fetch.d.ts +2 -0
- package/dist/plugin-sdk/discord/monitor/sender-identity.d.ts +31 -0
- package/dist/plugin-sdk/discord/monitor/system-events.d.ts +2 -0
- package/dist/plugin-sdk/discord/monitor/thread-bindings.d.ts +5 -0
- package/dist/plugin-sdk/discord/monitor/thread-bindings.discord-api.d.ts +36 -0
- package/dist/plugin-sdk/discord/monitor/thread-bindings.lifecycle.d.ts +30 -0
- package/dist/plugin-sdk/discord/monitor/thread-bindings.manager.d.ts +17 -0
- package/dist/plugin-sdk/discord/monitor/thread-bindings.messages.d.ts +17 -0
- package/dist/plugin-sdk/discord/monitor/thread-bindings.state.d.ts +61 -0
- package/dist/plugin-sdk/discord/monitor/thread-bindings.types.d.ts +64 -0
- package/dist/plugin-sdk/discord/monitor/threading.d.ts +106 -0
- package/dist/plugin-sdk/discord/monitor/typing.d.ts +5 -0
- package/dist/plugin-sdk/discord/monitor.d.ts +10 -0
- package/dist/plugin-sdk/discord/monitor.gateway.d.ts +12 -0
- package/dist/plugin-sdk/discord/pluralkit.d.ts +26 -0
- package/dist/plugin-sdk/discord/probe.d.ts +28 -0
- package/dist/plugin-sdk/discord/resolve-channels.d.ts +15 -0
- package/dist/plugin-sdk/discord/resolve-users.d.ts +14 -0
- package/dist/plugin-sdk/discord/send.channels.d.ts +17 -0
- package/dist/plugin-sdk/discord/send.components.d.ts +17 -0
- package/dist/plugin-sdk/discord/send.d.ts +10 -0
- package/dist/plugin-sdk/discord/send.emojis-stickers.d.ts +4 -0
- package/dist/plugin-sdk/discord/send.guild.d.ts +24 -0
- package/dist/plugin-sdk/discord/send.messages.d.ts +20 -0
- package/dist/plugin-sdk/discord/send.outbound.d.ts +57 -0
- package/dist/plugin-sdk/discord/send.permissions.d.ts +20 -0
- package/dist/plugin-sdk/discord/send.reactions.d.ts +15 -0
- package/dist/plugin-sdk/discord/send.shared.d.ts +85 -0
- package/dist/plugin-sdk/discord/send.types.d.ts +144 -0
- package/dist/plugin-sdk/discord/targets.d.ts +18 -0
- package/dist/plugin-sdk/discord/token.d.ts +11 -0
- package/dist/plugin-sdk/discord/voice/command.d.ts +15 -0
- package/dist/plugin-sdk/discord/voice/manager.d.ts +52 -0
- package/dist/plugin-sdk/discord/voice-message.d.ts +50 -0
- package/dist/plugin-sdk/gateway/call.d.ts +65 -0
- package/dist/plugin-sdk/gateway/chat-abort.d.ts +44 -0
- package/dist/plugin-sdk/gateway/chat-sanitize.d.ts +4 -0
- package/dist/plugin-sdk/gateway/client.d.ts +64 -0
- package/dist/plugin-sdk/gateway/control-ui-shared.d.ts +9 -0
- package/dist/plugin-sdk/gateway/credentials.d.ts +36 -0
- package/dist/plugin-sdk/gateway/device-auth.d.ts +11 -0
- package/dist/plugin-sdk/gateway/method-scopes.d.ts +22 -0
- package/dist/plugin-sdk/gateway/net.d.ts +77 -0
- package/dist/plugin-sdk/gateway/node-registry.d.ts +60 -0
- package/dist/plugin-sdk/gateway/protocol/client-info.d.ts +58 -0
- package/dist/plugin-sdk/gateway/protocol/index.d.ts +490 -0
- package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +89 -0
- package/dist/plugin-sdk/gateway/protocol/schema/agents-models.d.ts +188 -0
- package/dist/plugin-sdk/gateway/protocol/schema/channels.d.ts +134 -0
- package/dist/plugin-sdk/gateway/protocol/schema/config.d.ts +53 -0
- package/dist/plugin-sdk/gateway/protocol/schema/cron.d.ts +324 -0
- package/dist/plugin-sdk/gateway/protocol/schema/devices.d.ts +41 -0
- package/dist/plugin-sdk/gateway/protocol/schema/error-codes.d.ts +14 -0
- package/dist/plugin-sdk/gateway/protocol/schema/frames.d.ts +168 -0
- package/dist/plugin-sdk/gateway/protocol/schema/logs-chat.d.ts +45 -0
- package/dist/plugin-sdk/gateway/protocol/schema/nodes.d.ts +64 -0
- package/dist/plugin-sdk/gateway/protocol/schema/primitives.d.ts +4 -0
- package/dist/plugin-sdk/gateway/protocol/schema/protocol-schemas.d.ts +3 -0
- package/dist/plugin-sdk/gateway/protocol/schema/push.d.ts +15 -0
- package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +74 -0
- package/dist/plugin-sdk/gateway/protocol/schema/snapshot.d.ts +69 -0
- package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +120 -0
- package/dist/plugin-sdk/gateway/protocol/schema/wizard.d.ts +86 -0
- package/dist/plugin-sdk/gateway/protocol/schema.d.ts +16 -0
- package/dist/plugin-sdk/gateway/server/ws-types.d.ts +11 -0
- package/dist/plugin-sdk/gateway/server-broadcast.d.ts +17 -0
- package/dist/plugin-sdk/gateway/server-channels.d.ts +26 -0
- package/dist/plugin-sdk/gateway/server-constants.d.ts +10 -0
- package/dist/plugin-sdk/gateway/server-methods/types.d.ts +84 -0
- package/dist/plugin-sdk/gateway/server-shared.d.ts +7 -0
- package/dist/plugin-sdk/gateway/session-utils.fs.d.ts +48 -0
- package/dist/plugin-sdk/gateway/session-utils.types.d.ts +81 -0
- package/dist/plugin-sdk/gateway/ws-log.d.ts +5 -0
- package/dist/plugin-sdk/gateway/ws-logging.d.ts +4 -0
- package/dist/plugin-sdk/globals.d.ts +11 -0
- package/dist/plugin-sdk/hooks/internal-hooks.d.ts +140 -0
- package/dist/plugin-sdk/hooks/types.d.ts +62 -0
- package/dist/plugin-sdk/imessage/accounts.d.ts +16 -0
- package/dist/plugin-sdk/imessage/client.d.ts +46 -0
- package/dist/plugin-sdk/imessage/constants.d.ts +2 -0
- package/dist/plugin-sdk/imessage/monitor/abort-handler.d.ts +9 -0
- package/dist/plugin-sdk/imessage/monitor/deliver.d.ts +14 -0
- package/dist/plugin-sdk/imessage/monitor/echo-cache.d.ts +9 -0
- package/dist/plugin-sdk/imessage/monitor/inbound-processing.d.ts +96 -0
- package/dist/plugin-sdk/imessage/monitor/monitor-provider.d.ts +7 -0
- package/dist/plugin-sdk/imessage/monitor/parse-notification.d.ts +2 -0
- package/dist/plugin-sdk/imessage/monitor/runtime.d.ts +4 -0
- package/dist/plugin-sdk/imessage/monitor/types.d.ts +37 -0
- package/dist/plugin-sdk/imessage/monitor.d.ts +2 -0
- package/dist/plugin-sdk/imessage/probe.d.ts +17 -0
- package/dist/plugin-sdk/imessage/send.d.ts +34 -0
- package/dist/plugin-sdk/imessage/target-parsing-helpers.d.ts +45 -0
- package/dist/plugin-sdk/imessage/targets.d.ts +39 -0
- package/dist/plugin-sdk/index.d.ts +1 -0
- package/dist/plugin-sdk/index.js +24140 -0
- package/dist/plugin-sdk/infra/agent-events.d.ts +21 -0
- package/dist/plugin-sdk/infra/archive-path.d.ts +12 -0
- package/dist/plugin-sdk/infra/archive.d.ts +46 -0
- package/dist/plugin-sdk/infra/backoff.d.ts +8 -0
- package/dist/plugin-sdk/infra/brew.d.ts +8 -0
- package/dist/plugin-sdk/infra/channel-activity.d.ts +18 -0
- package/dist/plugin-sdk/infra/channel-summary.d.ts +6 -0
- package/dist/plugin-sdk/infra/dedupe.d.ts +12 -0
- package/dist/plugin-sdk/infra/device-auth-store.d.ts +18 -0
- package/dist/plugin-sdk/infra/device-identity.d.ts +11 -0
- package/dist/plugin-sdk/infra/device-pairing.d.ts +101 -0
- package/dist/plugin-sdk/infra/diagnostic-events.d.ts +140 -0
- package/dist/plugin-sdk/infra/diagnostic-flags.d.ts +4 -0
- package/dist/plugin-sdk/infra/dotenv.d.ts +3 -0
- package/dist/plugin-sdk/infra/env.d.ts +11 -0
- package/dist/plugin-sdk/infra/errors.d.ts +11 -0
- package/dist/plugin-sdk/infra/fetch.d.ts +2 -0
- package/dist/plugin-sdk/infra/file-identity.d.ts +5 -0
- package/dist/plugin-sdk/infra/file-lock.d.ts +2 -0
- package/dist/plugin-sdk/infra/format-time/format-datetime.d.ts +35 -0
- package/dist/plugin-sdk/infra/format-time/format-duration.d.ts +23 -0
- package/dist/plugin-sdk/infra/format-time/format-relative.d.ts +39 -0
- package/dist/plugin-sdk/infra/fs-safe.d.ts +25 -0
- package/dist/plugin-sdk/infra/gemini-auth.d.ts +16 -0
- package/dist/plugin-sdk/infra/git-commit.d.ts +4 -0
- package/dist/plugin-sdk/infra/git-root.d.ts +7 -0
- package/dist/plugin-sdk/infra/heartbeat-active-hours.d.ts +5 -0
- package/dist/plugin-sdk/infra/heartbeat-events-filter.d.ts +8 -0
- package/dist/plugin-sdk/infra/heartbeat-events.d.ts +21 -0
- package/dist/plugin-sdk/infra/heartbeat-reason.d.ts +5 -0
- package/dist/plugin-sdk/infra/heartbeat-runner.d.ts +45 -0
- package/dist/plugin-sdk/infra/heartbeat-visibility.d.ts +17 -0
- package/dist/plugin-sdk/infra/heartbeat-wake.d.ts +31 -0
- package/dist/plugin-sdk/infra/home-dir.d.ts +7 -0
- package/dist/plugin-sdk/infra/host-env-security.d.ts +21 -0
- package/dist/plugin-sdk/infra/http-body.d.ts +46 -0
- package/dist/plugin-sdk/infra/json-file.d.ts +2 -0
- package/dist/plugin-sdk/infra/json-files.d.ts +5 -0
- package/dist/plugin-sdk/infra/map-size.d.ts +1 -0
- package/dist/plugin-sdk/infra/net/fetch-guard.d.ts +21 -0
- package/dist/plugin-sdk/infra/net/hostname.d.ts +1 -0
- package/dist/plugin-sdk/infra/net/ssrf.d.ts +35 -0
- package/dist/plugin-sdk/infra/outbound/abort.d.ts +8 -0
- package/dist/plugin-sdk/infra/outbound/agent-delivery.d.ts +46 -0
- package/dist/plugin-sdk/infra/outbound/bound-delivery-router.d.ts +16 -0
- package/dist/plugin-sdk/infra/outbound/channel-selection.d.ts +11 -0
- package/dist/plugin-sdk/infra/outbound/channel-target.d.ts +6 -0
- package/dist/plugin-sdk/infra/outbound/deliver.d.ts +81 -0
- package/dist/plugin-sdk/infra/outbound/delivery-queue.d.ts +78 -0
- package/dist/plugin-sdk/infra/outbound/directory-cache.d.ts +24 -0
- package/dist/plugin-sdk/infra/outbound/envelope.d.ts +16 -0
- package/dist/plugin-sdk/infra/outbound/format.d.ts +39 -0
- package/dist/plugin-sdk/infra/outbound/identity.d.ts +8 -0
- package/dist/plugin-sdk/infra/outbound/message-action-spec.d.ts +5 -0
- package/dist/plugin-sdk/infra/outbound/payloads.d.ts +18 -0
- package/dist/plugin-sdk/infra/outbound/session-binding-service.d.ts +57 -0
- package/dist/plugin-sdk/infra/outbound/target-errors.d.ts +6 -0
- package/dist/plugin-sdk/infra/outbound/target-normalization.d.ts +4 -0
- package/dist/plugin-sdk/infra/outbound/target-resolver.d.ts +53 -0
- package/dist/plugin-sdk/infra/outbound/targets.d.ts +87 -0
- package/dist/plugin-sdk/infra/pairing-files.d.ts +23 -0
- package/dist/plugin-sdk/infra/pairing-pending.d.ts +13 -0
- package/dist/plugin-sdk/infra/pairing-token.d.ts +3 -0
- package/dist/plugin-sdk/infra/path-guards.d.ts +5 -0
- package/dist/plugin-sdk/infra/path-safety.d.ts +2 -0
- package/dist/plugin-sdk/infra/plain-object.d.ts +4 -0
- package/dist/plugin-sdk/infra/prototype-keys.d.ts +1 -0
- package/dist/plugin-sdk/infra/provider-usage.auth.d.ts +10 -0
- package/dist/plugin-sdk/infra/provider-usage.d.ts +4 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.claude.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.codex.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.copilot.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.d.ts +6 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.gemini.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.minimax.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.shared.d.ts +12 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.zai.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.format.d.ts +13 -0
- package/dist/plugin-sdk/infra/provider-usage.load.d.ts +11 -0
- package/dist/plugin-sdk/infra/provider-usage.shared.d.ts +8 -0
- package/dist/plugin-sdk/infra/provider-usage.types.d.ts +17 -0
- package/dist/plugin-sdk/infra/restart.d.ts +70 -0
- package/dist/plugin-sdk/infra/retry-policy.d.ts +25 -0
- package/dist/plugin-sdk/infra/retry.d.ts +21 -0
- package/dist/plugin-sdk/infra/safe-executable-value.d.ts +1 -0
- package/dist/plugin-sdk/infra/scp-host.d.ts +2 -0
- package/dist/plugin-sdk/infra/secure-random.d.ts +2 -0
- package/dist/plugin-sdk/infra/session-cost-usage.d.ts +45 -0
- package/dist/plugin-sdk/infra/session-cost-usage.types.d.ts +153 -0
- package/dist/plugin-sdk/infra/session-maintenance-warning.d.ts +10 -0
- package/dist/plugin-sdk/infra/shell-env.d.ts +34 -0
- package/dist/plugin-sdk/infra/system-events.d.ts +18 -0
- package/dist/plugin-sdk/infra/tailnet.d.ts +8 -0
- package/dist/plugin-sdk/infra/tls/fingerprint.d.ts +1 -0
- package/dist/plugin-sdk/infra/tls/gateway.d.ts +16 -0
- package/dist/plugin-sdk/infra/tmp-remoteclaw-dir.d.ts +18 -0
- package/dist/plugin-sdk/infra/transport-ready.d.ts +16 -0
- package/dist/plugin-sdk/infra/unhandled-rejections.d.ts +15 -0
- package/dist/plugin-sdk/infra/ws.d.ts +2 -0
- package/dist/plugin-sdk/infra/wsl.d.ts +11 -0
- package/dist/plugin-sdk/line/accounts.d.ts +10 -0
- package/dist/plugin-sdk/line/actions.d.ts +22 -0
- package/dist/plugin-sdk/line/auto-reply-delivery.d.ts +38 -0
- package/dist/plugin-sdk/line/bot-access.d.ts +17 -0
- package/dist/plugin-sdk/line/bot-handlers.d.ts +13 -0
- package/dist/plugin-sdk/line/bot-message-context.d.ts +118 -0
- package/dist/plugin-sdk/line/bot.d.ts +24 -0
- package/dist/plugin-sdk/line/channel-access-token.d.ts +4 -0
- package/dist/plugin-sdk/line/config-schema.d.ts +62 -0
- package/dist/plugin-sdk/line/download.d.ts +7 -0
- package/dist/plugin-sdk/line/flex-templates/basic-cards.d.ts +46 -0
- package/dist/plugin-sdk/line/flex-templates/common.d.ts +2 -0
- package/dist/plugin-sdk/line/flex-templates/media-control-cards.d.ts +73 -0
- package/dist/plugin-sdk/line/flex-templates/message.d.ts +6 -0
- package/dist/plugin-sdk/line/flex-templates/schedule-cards.d.ts +55 -0
- package/dist/plugin-sdk/line/flex-templates/types.d.ts +19 -0
- package/dist/plugin-sdk/line/flex-templates.d.ts +5 -0
- package/dist/plugin-sdk/line/markdown-to-line.d.ts +72 -0
- package/dist/plugin-sdk/line/monitor.d.ts +28 -0
- package/dist/plugin-sdk/line/probe.d.ts +2 -0
- package/dist/plugin-sdk/line/reply-chunks.d.ts +24 -0
- package/dist/plugin-sdk/line/send.d.ts +91 -0
- package/dist/plugin-sdk/line/signature.d.ts +1 -0
- package/dist/plugin-sdk/line/template-messages.d.ts +100 -0
- package/dist/plugin-sdk/line/types.d.ts +112 -0
- package/dist/plugin-sdk/line/webhook-node.d.ts +15 -0
- package/dist/plugin-sdk/line/webhook-utils.d.ts +3 -0
- package/dist/plugin-sdk/line/webhook.d.ts +19 -0
- package/dist/plugin-sdk/logger.d.ts +6 -0
- package/dist/plugin-sdk/logging/config.d.ts +4 -0
- package/dist/plugin-sdk/logging/console.d.ts +23 -0
- package/dist/plugin-sdk/logging/diagnostic-session-state.d.ts +30 -0
- package/dist/plugin-sdk/logging/diagnostic.d.ts +65 -0
- package/dist/plugin-sdk/logging/env-log-level.d.ts +2 -0
- package/dist/plugin-sdk/logging/levels.d.ts +5 -0
- package/dist/plugin-sdk/logging/logger.d.ts +44 -0
- package/dist/plugin-sdk/logging/node-require.d.ts +1 -0
- package/dist/plugin-sdk/logging/redact-identifier.d.ts +4 -0
- package/dist/plugin-sdk/logging/redact.d.ts +9 -0
- package/dist/plugin-sdk/logging/state.d.ts +19 -0
- package/dist/plugin-sdk/logging/subsystem.d.ts +18 -0
- package/dist/plugin-sdk/logging/timestamps.d.ts +1 -0
- package/dist/plugin-sdk/logging.d.ts +10 -0
- package/dist/plugin-sdk/markdown/fences.d.ts +10 -0
- package/dist/plugin-sdk/markdown/ir.d.ts +32 -0
- package/dist/plugin-sdk/markdown/render.d.ts +18 -0
- package/dist/plugin-sdk/markdown/tables.d.ts +2 -0
- package/dist/plugin-sdk/markdown/whatsapp.d.ts +14 -0
- package/dist/plugin-sdk/media/audio-tags.d.ts +10 -0
- package/dist/plugin-sdk/media/audio.d.ts +19 -0
- package/dist/plugin-sdk/media/base64.d.ts +6 -0
- package/dist/plugin-sdk/media/constants.d.ts +7 -0
- package/dist/plugin-sdk/media/fetch.d.ts +23 -0
- package/dist/plugin-sdk/media/image-ops.d.ts +41 -0
- package/dist/plugin-sdk/media/inbound-path-policy.d.ts +18 -0
- package/dist/plugin-sdk/media/local-roots.d.ts +3 -0
- package/dist/plugin-sdk/media/mime.d.ts +16 -0
- package/dist/plugin-sdk/media/outbound-attachment.d.ts +6 -0
- package/dist/plugin-sdk/media/parse.d.ts +8 -0
- package/dist/plugin-sdk/media/png-encode.d.ts +8 -0
- package/dist/plugin-sdk/media/read-response-with-limit.d.ts +7 -0
- package/dist/plugin-sdk/media/store.d.ts +33 -0
- package/dist/plugin-sdk/middleware/auth-key-retry.d.ts +31 -0
- package/dist/plugin-sdk/middleware/channel-bridge.d.ts +43 -0
- package/dist/plugin-sdk/middleware/cli-runtime-base.d.ts +47 -0
- package/dist/plugin-sdk/middleware/delivery-adapter.d.ts +36 -0
- package/dist/plugin-sdk/middleware/error-classifier.d.ts +19 -0
- package/dist/plugin-sdk/middleware/mcp-side-effects.d.ts +20 -0
- package/dist/plugin-sdk/middleware/media-capability.d.ts +21 -0
- package/dist/plugin-sdk/middleware/media-resolver.d.ts +12 -0
- package/dist/plugin-sdk/middleware/runtime-factory.d.ts +6 -0
- package/dist/plugin-sdk/middleware/runtimes/claude.d.ts +37 -0
- package/dist/plugin-sdk/middleware/runtimes/codex.d.ts +79 -0
- package/dist/plugin-sdk/middleware/runtimes/gemini.d.ts +63 -0
- package/dist/plugin-sdk/middleware/runtimes/opencode.d.ts +59 -0
- package/dist/plugin-sdk/middleware/session-map.d.ts +36 -0
- package/dist/plugin-sdk/middleware/system-prompt.d.ts +30 -0
- package/dist/plugin-sdk/middleware/types.d.ts +236 -0
- package/dist/plugin-sdk/pairing/pairing-labels.d.ts +2 -0
- package/dist/plugin-sdk/pairing/pairing-messages.d.ts +6 -0
- package/dist/plugin-sdk/pairing/pairing-store.d.ts +48 -0
- package/dist/plugin-sdk/plugin-sdk/account-id.d.ts +1 -0
- package/dist/plugin-sdk/plugin-sdk/agent-media-payload.d.ts +12 -0
- package/dist/plugin-sdk/plugin-sdk/allow-from.d.ts +32 -0
- package/dist/plugin-sdk/plugin-sdk/command-auth.d.ts +25 -0
- package/dist/plugin-sdk/plugin-sdk/config-paths.d.ts +6 -0
- package/dist/plugin-sdk/plugin-sdk/file-lock.d.ts +16 -0
- package/dist/plugin-sdk/plugin-sdk/group-access.d.ts +16 -0
- package/dist/plugin-sdk/plugin-sdk/index.d.ts +166 -0
- package/dist/plugin-sdk/plugin-sdk/json-store.d.ts +5 -0
- package/dist/plugin-sdk/plugin-sdk/onboarding.d.ts +11 -0
- package/dist/plugin-sdk/plugin-sdk/persistent-dedupe.d.ts +20 -0
- package/dist/plugin-sdk/plugin-sdk/reply-payload.d.ts +22 -0
- package/dist/plugin-sdk/plugin-sdk/run-command.d.ts +12 -0
- package/dist/plugin-sdk/plugin-sdk/runtime.d.ts +10 -0
- package/dist/plugin-sdk/plugin-sdk/slack-message-actions.d.ts +11 -0
- package/dist/plugin-sdk/plugin-sdk/status-helpers.d.ts +88 -0
- package/dist/plugin-sdk/plugin-sdk/temp-path.d.ts +12 -0
- package/dist/plugin-sdk/plugin-sdk/text-chunking.d.ts +1 -0
- package/dist/plugin-sdk/plugin-sdk/tool-send.d.ts +4 -0
- package/dist/plugin-sdk/plugin-sdk/webhook-path.d.ts +6 -0
- package/dist/plugin-sdk/plugin-sdk/webhook-targets.d.ts +23 -0
- package/dist/plugin-sdk/plugins/bundled-dir.d.ts +1 -0
- package/dist/plugin-sdk/plugins/commands.d.ts +83 -0
- package/dist/plugin-sdk/plugins/config-schema.d.ts +2 -0
- package/dist/plugin-sdk/plugins/config-state.d.ts +30 -0
- package/dist/plugin-sdk/plugins/discovery.d.ts +24 -0
- package/dist/plugin-sdk/plugins/hook-runner-global.d.ts +37 -0
- package/dist/plugin-sdk/plugins/hooks.d.ts +49 -0
- package/dist/plugin-sdk/plugins/http-path.d.ts +1 -0
- package/dist/plugin-sdk/plugins/http-registry.d.ts +13 -0
- package/dist/plugin-sdk/plugins/manifest-registry.d.ts +35 -0
- package/dist/plugin-sdk/plugins/manifest.d.ts +65 -0
- package/dist/plugin-sdk/plugins/path-safety.d.ts +5 -0
- package/dist/plugin-sdk/plugins/registry.d.ts +148 -0
- package/dist/plugin-sdk/plugins/runtime/native-deps.d.ts +8 -0
- package/dist/plugin-sdk/plugins/runtime/types.d.ts +310 -0
- package/dist/plugin-sdk/plugins/runtime.d.ts +5 -0
- package/dist/plugin-sdk/plugins/schema-validator.d.ts +10 -0
- package/dist/plugin-sdk/plugins/types.d.ts +491 -0
- package/dist/plugin-sdk/polls.d.ts +31 -0
- package/dist/plugin-sdk/process/command-queue.d.ts +51 -0
- package/dist/plugin-sdk/process/exec.d.ts +30 -0
- package/dist/plugin-sdk/process/lanes.d.ts +6 -0
- package/dist/plugin-sdk/process/spawn-utils.d.ts +26 -0
- package/dist/plugin-sdk/routing/account-id.d.ts +3 -0
- package/dist/plugin-sdk/routing/account-lookup.d.ts +1 -0
- package/dist/plugin-sdk/routing/bindings.d.ts +11 -0
- package/dist/plugin-sdk/routing/resolve-route.d.ts +42 -0
- package/dist/plugin-sdk/routing/session-key.d.ts +48 -0
- package/dist/plugin-sdk/runtime.d.ts +7 -0
- package/dist/plugin-sdk/security/channel-metadata.d.ts +6 -0
- package/dist/plugin-sdk/security/dm-policy-shared.d.ts +33 -0
- package/dist/plugin-sdk/security/external-content.d.ts +53 -0
- package/dist/plugin-sdk/security/safe-regex.d.ts +2 -0
- package/dist/plugin-sdk/security/scan-paths.d.ts +5 -0
- package/dist/plugin-sdk/security/secret-equal.d.ts +1 -0
- package/dist/plugin-sdk/sessions/input-provenance.d.ts +16 -0
- package/dist/plugin-sdk/sessions/level-overrides.d.ts +10 -0
- package/dist/plugin-sdk/sessions/send-policy.d.ts +11 -0
- package/dist/plugin-sdk/sessions/session-key-utils.d.ts +16 -0
- package/dist/plugin-sdk/sessions/session-label.d.ts +9 -0
- package/dist/plugin-sdk/sessions/transcript-events.d.ts +7 -0
- package/dist/plugin-sdk/shared/avatar-policy.d.ts +16 -0
- package/dist/plugin-sdk/shared/chat-content.d.ts +5 -0
- package/dist/plugin-sdk/shared/chat-envelope.d.ts +2 -0
- package/dist/plugin-sdk/shared/device-auth.d.ts +13 -0
- package/dist/plugin-sdk/shared/gateway-bind-url.d.ts +14 -0
- package/dist/plugin-sdk/shared/net/ip.d.ts +19 -0
- package/dist/plugin-sdk/shared/operator-scope-compat.d.ts +5 -0
- package/dist/plugin-sdk/shared/pid-alive.d.ts +1 -0
- package/dist/plugin-sdk/shared/process-scoped-map.d.ts +1 -0
- package/dist/plugin-sdk/shared/string-normalization.d.ts +4 -0
- package/dist/plugin-sdk/shared/subagents-format.d.ts +15 -0
- package/dist/plugin-sdk/shared/tailscale-status.d.ts +8 -0
- package/dist/plugin-sdk/shared/text/code-regions.d.ts +6 -0
- package/dist/plugin-sdk/shared/text/reasoning-tags.d.ts +6 -0
- package/dist/plugin-sdk/shared/text-chunking.d.ts +1 -0
- package/dist/plugin-sdk/signal/accounts.d.ts +17 -0
- package/dist/plugin-sdk/signal/client.d.ts +32 -0
- package/dist/plugin-sdk/signal/daemon.d.ts +26 -0
- package/dist/plugin-sdk/signal/format.d.ts +17 -0
- package/dist/plugin-sdk/signal/identity.d.ts +24 -0
- package/dist/plugin-sdk/signal/index.d.ts +5 -0
- package/dist/plugin-sdk/signal/monitor/event-handler.d.ts +5 -0
- package/dist/plugin-sdk/signal/monitor/event-handler.types.d.ts +125 -0
- package/dist/plugin-sdk/signal/monitor/mentions.d.ts +2 -0
- package/dist/plugin-sdk/signal/monitor.d.ts +25 -0
- package/dist/plugin-sdk/signal/probe.d.ts +7 -0
- package/dist/plugin-sdk/signal/reaction-level.d.ts +17 -0
- package/dist/plugin-sdk/signal/rpc-context.d.ts +9 -0
- package/dist/plugin-sdk/signal/send-reactions.d.ts +32 -0
- package/dist/plugin-sdk/signal/send.d.ts +25 -0
- package/dist/plugin-sdk/signal/sse-reconnect.d.ts +13 -0
- package/dist/plugin-sdk/slack/accounts.d.ts +32 -0
- package/dist/plugin-sdk/slack/actions.d.ts +56 -0
- package/dist/plugin-sdk/slack/blocks-fallback.d.ts +2 -0
- package/dist/plugin-sdk/slack/blocks-input.d.ts +3 -0
- package/dist/plugin-sdk/slack/channel-migration.d.ts +20 -0
- package/dist/plugin-sdk/slack/client.d.ts +4 -0
- package/dist/plugin-sdk/slack/directory-live.d.ts +4 -0
- package/dist/plugin-sdk/slack/draft-stream.d.ts +25 -0
- package/dist/plugin-sdk/slack/format.d.ts +7 -0
- package/dist/plugin-sdk/slack/http/index.d.ts +1 -0
- package/dist/plugin-sdk/slack/http/registry.d.ts +12 -0
- package/dist/plugin-sdk/slack/index.d.ts +6 -0
- package/dist/plugin-sdk/slack/manifest.d.ts +17 -0
- package/dist/plugin-sdk/slack/message-actions.d.ts +4 -0
- package/dist/plugin-sdk/slack/modal-metadata.d.ts +7 -0
- package/dist/plugin-sdk/slack/monitor/allow-list.d.ts +23 -0
- package/dist/plugin-sdk/slack/monitor/auth.d.ts +11 -0
- package/dist/plugin-sdk/slack/monitor/channel-config.d.ts +41 -0
- package/dist/plugin-sdk/slack/monitor/commands.d.ts +9 -0
- package/dist/plugin-sdk/slack/monitor/context.d.ts +104 -0
- package/dist/plugin-sdk/slack/monitor/events/channels.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events/interactions.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events/members.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events/messages.d.ts +6 -0
- package/dist/plugin-sdk/slack/monitor/events/pins.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events/reactions.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events.d.ts +8 -0
- package/dist/plugin-sdk/slack/monitor/external-arg-menu-store.d.ts +18 -0
- package/dist/plugin-sdk/slack/monitor/media.d.ts +66 -0
- package/dist/plugin-sdk/slack/monitor/message-handler/dispatch.d.ts +12 -0
- package/dist/plugin-sdk/slack/monitor/message-handler/prepare.d.ts +13 -0
- package/dist/plugin-sdk/slack/monitor/message-handler/types.d.ts +22 -0
- package/dist/plugin-sdk/slack/monitor/message-handler.d.ts +11 -0
- package/dist/plugin-sdk/slack/monitor/mrkdwn.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/policy.d.ts +5 -0
- package/dist/plugin-sdk/slack/monitor/provider.d.ts +7 -0
- package/dist/plugin-sdk/slack/monitor/replies.d.ts +53 -0
- package/dist/plugin-sdk/slack/monitor/room-context.d.ts +14 -0
- package/dist/plugin-sdk/slack/monitor/slash.d.ts +6 -0
- package/dist/plugin-sdk/slack/monitor/thread-resolution.d.ts +12 -0
- package/dist/plugin-sdk/slack/monitor/types.d.ts +97 -0
- package/dist/plugin-sdk/slack/monitor.d.ts +5 -0
- package/dist/plugin-sdk/slack/probe.d.ts +14 -0
- package/dist/plugin-sdk/slack/resolve-channels.d.ts +19 -0
- package/dist/plugin-sdk/slack/resolve-users.d.ts +26 -0
- package/dist/plugin-sdk/slack/send.d.ts +22 -0
- package/dist/plugin-sdk/slack/stream-mode.d.ts +23 -0
- package/dist/plugin-sdk/slack/streaming.d.ts +72 -0
- package/dist/plugin-sdk/slack/targets.d.ts +7 -0
- package/dist/plugin-sdk/slack/threading-tool-context.d.ts +10 -0
- package/dist/plugin-sdk/slack/threading.d.ts +29 -0
- package/dist/plugin-sdk/slack/token.d.ts +3 -0
- package/dist/plugin-sdk/slack/types.d.ts +58 -0
- package/dist/plugin-sdk/stt/defaults.d.ts +2 -0
- package/dist/plugin-sdk/stt/preflight.d.ts +14 -0
- package/dist/plugin-sdk/stt/providers/deepgram/audio.d.ts +4 -0
- package/dist/plugin-sdk/stt/providers/deepgram/index.d.ts +2 -0
- package/dist/plugin-sdk/stt/providers/google/audio.d.ts +3 -0
- package/dist/plugin-sdk/stt/providers/google/index.d.ts +2 -0
- package/dist/plugin-sdk/stt/providers/google/inline-data.d.ts +20 -0
- package/dist/plugin-sdk/stt/providers/groq/index.d.ts +2 -0
- package/dist/plugin-sdk/stt/providers/index.d.ts +4 -0
- package/dist/plugin-sdk/stt/providers/mistral/index.d.ts +2 -0
- package/dist/plugin-sdk/stt/providers/openai/audio.d.ts +3 -0
- package/dist/plugin-sdk/stt/providers/openai/index.d.ts +2 -0
- package/dist/plugin-sdk/stt/providers/shared.d.ts +20 -0
- package/dist/plugin-sdk/stt/stt.d.ts +27 -0
- package/dist/plugin-sdk/stt/types.d.ts +22 -0
- package/dist/plugin-sdk/telegram/accounts.d.ts +21 -0
- package/dist/plugin-sdk/telegram/allowed-updates.d.ts +4 -0
- package/dist/plugin-sdk/telegram/api-logging.d.ts +11 -0
- package/dist/plugin-sdk/telegram/audit.d.ts +29 -0
- package/dist/plugin-sdk/telegram/bot/delivery.d.ts +35 -0
- package/dist/plugin-sdk/telegram/bot/helpers.d.ts +128 -0
- package/dist/plugin-sdk/telegram/bot/types.d.ts +28 -0
- package/dist/plugin-sdk/telegram/bot-access.d.ts +26 -0
- package/dist/plugin-sdk/telegram/bot-handlers.d.ts +2 -0
- package/dist/plugin-sdk/telegram/bot-message-context.d.ts +144 -0
- package/dist/plugin-sdk/telegram/bot-message-dispatch.d.ts +19 -0
- package/dist/plugin-sdk/telegram/bot-message.d.ts +20 -0
- package/dist/plugin-sdk/telegram/bot-native-command-menu.d.ts +33 -0
- package/dist/plugin-sdk/telegram/bot-native-commands.d.ts +59 -0
- package/dist/plugin-sdk/telegram/bot-updates.d.ts +31 -0
- package/dist/plugin-sdk/telegram/bot.d.ts +62 -0
- package/dist/plugin-sdk/telegram/button-types.d.ts +7 -0
- package/dist/plugin-sdk/telegram/caption.d.ts +5 -0
- package/dist/plugin-sdk/telegram/dm-access.d.ts +18 -0
- package/dist/plugin-sdk/telegram/draft-stream.d.ts +37 -0
- package/dist/plugin-sdk/telegram/fetch.d.ts +5 -0
- package/dist/plugin-sdk/telegram/format.d.ts +18 -0
- package/dist/plugin-sdk/telegram/group-access.d.ts +54 -0
- package/dist/plugin-sdk/telegram/group-config-helpers.d.ts +7 -0
- package/dist/plugin-sdk/telegram/group-migration.d.ts +20 -0
- package/dist/plugin-sdk/telegram/inline-buttons.d.ts +11 -0
- package/dist/plugin-sdk/telegram/lane-delivery.d.ts +56 -0
- package/dist/plugin-sdk/telegram/monitor.d.ts +19 -0
- package/dist/plugin-sdk/telegram/network-config.d.ts +33 -0
- package/dist/plugin-sdk/telegram/network-errors.d.ts +5 -0
- package/dist/plugin-sdk/telegram/outbound-params.d.ts +2 -0
- package/dist/plugin-sdk/telegram/probe.d.ts +17 -0
- package/dist/plugin-sdk/telegram/proxy.d.ts +1 -0
- package/dist/plugin-sdk/telegram/reaction-level.d.ts +11 -0
- package/dist/plugin-sdk/telegram/send.d.ts +153 -0
- package/dist/plugin-sdk/telegram/sent-message-cache.d.ts +16 -0
- package/dist/plugin-sdk/telegram/status-reaction-variants.d.ts +21 -0
- package/dist/plugin-sdk/telegram/sticker-cache.d.ts +47 -0
- package/dist/plugin-sdk/telegram/target-writeback.d.ts +7 -0
- package/dist/plugin-sdk/telegram/targets.d.ts +11 -0
- package/dist/plugin-sdk/telegram/token.d.ts +13 -0
- package/dist/plugin-sdk/telegram/update-offset-store.d.ts +15 -0
- package/dist/plugin-sdk/telegram/voice.d.ts +16 -0
- package/dist/plugin-sdk/telegram/webhook.d.ts +20 -0
- package/dist/plugin-sdk/terminal/ansi.d.ts +2 -0
- package/dist/plugin-sdk/terminal/health-style.d.ts +1 -0
- package/dist/plugin-sdk/terminal/links.d.ts +6 -0
- package/dist/plugin-sdk/terminal/palette.d.ts +10 -0
- package/dist/plugin-sdk/terminal/progress-line.d.ts +3 -0
- package/dist/plugin-sdk/terminal/prompt-style.d.ts +3 -0
- package/dist/plugin-sdk/terminal/restore.d.ts +17 -0
- package/dist/plugin-sdk/terminal/theme.d.ts +15 -0
- package/dist/plugin-sdk/tts/providers/edge.d.ts +2 -0
- package/dist/plugin-sdk/tts/providers/elevenlabs.d.ts +2 -0
- package/dist/plugin-sdk/tts/providers/index.d.ts +4 -0
- package/dist/plugin-sdk/tts/providers/openai.d.ts +2 -0
- package/dist/plugin-sdk/tts/tts-core.d.ts +38 -0
- package/dist/plugin-sdk/tts/tts.d.ts +185 -0
- package/dist/plugin-sdk/tts/types.d.ts +21 -0
- package/dist/plugin-sdk/types/agent-types.d.ts +1 -0
- package/dist/plugin-sdk/utils/account-id.d.ts +1 -0
- package/dist/plugin-sdk/utils/boolean.d.ts +5 -0
- package/dist/plugin-sdk/utils/chunk-items.d.ts +1 -0
- package/dist/plugin-sdk/utils/delivery-context.d.ts +29 -0
- package/dist/plugin-sdk/utils/directive-tags.d.ts +29 -0
- package/dist/plugin-sdk/utils/fetch-timeout.d.ts +13 -0
- package/dist/plugin-sdk/utils/message-channel.d.ts +27 -0
- package/dist/plugin-sdk/utils/normalize-secret-input.d.ts +11 -0
- package/dist/plugin-sdk/utils/provider-utils.d.ts +9 -0
- package/dist/plugin-sdk/utils/queue-helpers.d.ts +80 -0
- package/dist/plugin-sdk/utils/reaction-level.d.ts +15 -0
- package/dist/plugin-sdk/utils/transcript-tools.d.ts +8 -0
- package/dist/plugin-sdk/utils/usage-format.d.ts +26 -0
- package/dist/plugin-sdk/utils/with-timeout.d.ts +1 -0
- package/dist/plugin-sdk/utils.d.ts +63 -0
- package/dist/plugin-sdk/version.d.ts +8 -0
- package/dist/plugin-sdk/web/accounts.d.ts +39 -0
- package/dist/plugin-sdk/web/active-listener.d.ts +25 -0
- package/dist/plugin-sdk/web/auth-store.d.ts +26 -0
- package/dist/plugin-sdk/web/auto-reply/constants.d.ts +1 -0
- package/dist/plugin-sdk/web/auto-reply/deliver-reply.d.ts +19 -0
- package/dist/plugin-sdk/web/auto-reply/heartbeat-runner.d.ts +20 -0
- package/dist/plugin-sdk/web/auto-reply/loggers.d.ts +4 -0
- package/dist/plugin-sdk/web/auto-reply/mentions.d.ts +19 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/ack-reaction.d.ts +13 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/broadcast.d.ts +16 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/commands.d.ts +2 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/echo.d.ts +17 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/group-activation.d.ts +9 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/group-gating.d.ts +33 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/group-members.d.ts +6 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/last-route.d.ts +15 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/message-line.d.ts +11 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/on-message.d.ts +24 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/peer.d.ts +2 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/process-message.d.ts +40 -0
- package/dist/plugin-sdk/web/auto-reply/monitor.d.ts +5 -0
- package/dist/plugin-sdk/web/auto-reply/session-snapshot.d.ts +17 -0
- package/dist/plugin-sdk/web/auto-reply/types.d.ts +30 -0
- package/dist/plugin-sdk/web/auto-reply/util.d.ts +2 -0
- package/dist/plugin-sdk/web/auto-reply.d.ts +1 -0
- package/dist/plugin-sdk/web/auto-reply.impl.d.ts +5 -0
- package/dist/plugin-sdk/web/inbound/access-control.d.ts +36 -0
- package/dist/plugin-sdk/web/inbound/dedupe.d.ts +2 -0
- package/dist/plugin-sdk/web/inbound/extract.d.ts +13 -0
- package/dist/plugin-sdk/web/inbound/media.d.ts +7 -0
- package/dist/plugin-sdk/web/inbound/monitor.d.ts +30 -0
- package/dist/plugin-sdk/web/inbound/send-api.d.ts +22 -0
- package/dist/plugin-sdk/web/inbound/types.d.ts +41 -0
- package/dist/plugin-sdk/web/inbound.d.ts +4 -0
- package/dist/plugin-sdk/web/login-qr.d.ts +19 -0
- package/dist/plugin-sdk/web/login.d.ts +3 -0
- package/dist/plugin-sdk/web/media.d.ts +43 -0
- package/dist/plugin-sdk/web/outbound.d.ts +24 -0
- package/dist/plugin-sdk/web/qr-image.d.ts +4 -0
- package/dist/plugin-sdk/web/reconnect.d.ts +12 -0
- package/dist/plugin-sdk/web/session.d.ts +14 -0
- package/dist/plugin-sdk/web/vcard.d.ts +6 -0
- package/dist/plugin-sdk/whatsapp/normalize.d.ts +6 -0
- package/dist/plugin-sdk/whatsapp/resolve-outbound-target.d.ts +12 -0
- package/dist/plugin-sdk/wizard/prompts.d.ts +43 -0
- package/dist/plugin-sdk/wizard/session.d.ts +42 -0
- package/dist/plugins-Ca4Ybd3t.js +254 -0
- package/dist/plugins-Cjhc9NMf.js +255 -0
- package/dist/plugins-allowlist-A38nxBRG.js +15 -0
- package/dist/plugins-allowlist-D2tS9tcu.js +15 -0
- package/dist/plugins-cli-BvgKK5Ww.js +807 -0
- package/dist/plugins-cli-oK0lk1Ku.js +803 -0
- package/dist/polls-BLyT08ZI.js +33 -0
- package/dist/polls-BmymsJEe.js +33 -0
- package/dist/ports-B4hTs4XH.js +96 -0
- package/dist/ports-CZEhYDiS.js +370 -0
- package/dist/ports-DALdfBQy.js +96 -0
- package/dist/ports-gRBeuUtp.js +316 -0
- package/dist/ports-lsof-CDyv5GJd.js +27 -0
- package/dist/preflight-Bq8rimP-.js +667 -0
- package/dist/preflight-DyYbEp9X.js +667 -0
- package/dist/process-scoped-map-BCJR56ZB.js +39 -0
- package/dist/process-scoped-map-Cb1EHPyN.js +39 -0
- package/dist/program-DKWIpFO9.js +250 -0
- package/dist/program-context-Cgy5-iZi.js +474 -0
- package/dist/program-context-DlXnmuB7.js +17 -0
- package/dist/progress-BcwxtM9Q.js +124 -0
- package/dist/progress-DRLmcFiG.js +123 -0
- package/dist/prompt-BRGfic91.js +21 -0
- package/dist/prompt-CZpYe6wn.js +21 -0
- package/dist/prompt-select-styled-CY647QfO.js +1669 -0
- package/dist/prompt-select-styled-pddqKMoY.js +1672 -0
- package/dist/prompt-style-BpUMhEHC.js +9 -0
- package/dist/prompt-style-CUuA6OCy.js +9 -0
- package/dist/provider-auth-B7QgxlKt.js +187 -0
- package/dist/provider-auth-j-EQvvIk.js +187 -0
- package/dist/provider-dispatcher-DX896bb6.js +659 -0
- package/dist/provider-dispatcher-IV_mSji1.js +660 -0
- package/dist/provider-utils-C9kBVF1f.js +79 -0
- package/dist/provider-utils-DiLhkKQp.js +79 -0
- package/dist/proxy-BMJL0Qog.js +16 -0
- package/dist/proxy-D-qGA1vm.js +16 -0
- package/dist/push-apns--nEiZmEN.js +711 -0
- package/dist/push-apns-BtS6B6lb.js +713 -0
- package/dist/pw-ai-DkXUNGEs.js +1908 -0
- package/dist/pw-ai-oQ2VDwbk.js +1911 -0
- package/dist/pw-ai-state--TxTVwRW.js +11 -0
- package/dist/pw-ai-state-CwXeO5d0.js +11 -0
- package/dist/qr-cli-BffaTzZT.js +353 -0
- package/dist/qr-cli-CKHw8aW4.js +349 -0
- package/dist/redact-BW8tobyp.js +191 -0
- package/dist/redact-Ci96Gj0O.js +191 -0
- package/dist/redact-identifier-Bv5SUUw-.js +15 -0
- package/dist/redact-identifier-HyK89Sod.js +15 -0
- package/dist/redact-snapshot-PHeKfwLg.js +1934 -0
- package/dist/redact-snapshot-h25IHbX2.js +1934 -0
- package/dist/register.agent-BhJGcSwi.js +1029 -0
- package/dist/register.agent-DYcLNpJD.js +292 -0
- package/dist/register.configure-V-MeA6h7.js +135 -0
- package/dist/register.configure-oCfJYt2T.js +130 -0
- package/dist/register.import-CROeeohP.js +31 -0
- package/dist/register.import-DrHKMUlv.js +29 -0
- package/dist/register.maintenance-XRDiAiai.js +501 -0
- package/dist/register.maintenance-mHTyzd1l.js +503 -0
- package/dist/register.message-9FClPeyR.js +687 -0
- package/dist/register.message-DigNUgXx.js +691 -0
- package/dist/register.onboard-CF1DK5RO.js +92 -0
- package/dist/register.onboard-Cm2ExJRM.js +96 -0
- package/dist/register.setup-BEV_QLoU.js +114 -0
- package/dist/register.setup-BboalnlO.js +118 -0
- package/dist/register.status-health-sessions-B5flqjtZ.js +666 -0
- package/dist/register.status-health-sessions-DbQPmWOW.js +428 -0
- package/dist/register.subclis-FFHoriVe.js +267 -0
- package/dist/remoteclaw-root-BfPjgewe.js +88 -0
- package/dist/remoteclaw-root-E4-hmb4E.js +88 -0
- package/dist/render-6ahYfPwj.js +104 -0
- package/dist/render-BhKzKdV0.js +104 -0
- package/dist/render-e7fENCYH.js +104 -0
- package/dist/replies-Dc_GFb85.js +136 -0
- package/dist/replies-nkw9sahT.js +136 -0
- package/dist/reply-D0iVkyuP.js +12366 -0
- package/dist/reply-DEPE5T_9.js +12363 -0
- package/dist/reply-directives-Bbyf2UON.js +182 -0
- package/dist/reply-directives-DiRJRT_6.js +182 -0
- package/dist/reply-payloads-DDrMOUKP.js +527 -0
- package/dist/reply-prefix-Buyx2ZZC.js +37 -0
- package/dist/reply-prefix-D7E0w0O2.js +37 -0
- package/dist/resolve-route-BBOsg5KI.js +249 -0
- package/dist/resolve-route-Dyx3ifWH.js +249 -0
- package/dist/response-prefix-template-CZOMBOE6.js +134 -0
- package/dist/response-prefix-template-xsasdq1T.js +134 -0
- package/dist/retry-BWv_fy4u.js +77 -0
- package/dist/retry-D7zwz3HY.js +77 -0
- package/dist/retry-Dar_7pCv.js +77 -0
- package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
- package/dist/run-main-BUSpd6Gy.js +308 -0
- package/dist/runtime-guard-Bhx-pb8_.js +60 -0
- package/dist/runtime-guard-DAHXelsb.js +60 -0
- package/dist/runtime-status-CR9445g5.js +12 -0
- package/dist/runtime-status-hFVEC3wO.js +12 -0
- package/dist/secret-equal-D6AoXne1.js +11 -0
- package/dist/secret-equal-DLnUuWM3.js +11 -0
- package/dist/secure-random-B8v4P_PH.js +44 -0
- package/dist/secure-random-Ba4Y5xG5.js +12 -0
- package/dist/secure-random-CRVHgtmO.js +12 -0
- package/dist/security-cli-C8r-8YZ7.js +488 -0
- package/dist/security-cli-Cy2Jqb0n.js +483 -0
- package/dist/send-B5iWtbNX.js +349 -0
- package/dist/send-BaaCgoKI.js +374 -0
- package/dist/send-Brtl2skD.js +332 -0
- package/dist/send-BuKAbt8a.js +547 -0
- package/dist/send-BxQ1YFYH.js +1178 -0
- package/dist/send-C7xFV4Ul.js +29 -0
- package/dist/send-C9pLn8Zz.js +11 -0
- package/dist/send-CPn9GDbB.js +349 -0
- package/dist/send-DJ5jHNeg.js +1779 -0
- package/dist/send-DLLYgtkJ.js +2245 -0
- package/dist/send-DO4RP5yz.js +1776 -0
- package/dist/send-DYHrHs_8.js +492 -0
- package/dist/send-DZ80jwFi.js +426 -0
- package/dist/send-Dbl0_FNE.js +2245 -0
- package/dist/send-DpaTnM-a.js +492 -0
- package/dist/send-gxeISRd1.js +547 -0
- package/dist/server-BZfrR2D5.js +206 -0
- package/dist/server-CW4QQmFB.js +202 -0
- package/dist/server-lifecycle-CY3Lxtea.js +2437 -0
- package/dist/server-lifecycle-X3AKkvMo.js +2437 -0
- package/dist/server-node-events-q5He8xk5.js +391 -0
- package/dist/server-node-events-udPU4Xlv.js +395 -0
- package/dist/service-C2j81L86.js +670 -0
- package/dist/service-C8a0SXHD.js +670 -0
- package/dist/session-C6VKWvx6.js +170 -0
- package/dist/session-cost-usage-0Vs4hgMe.js +627 -0
- package/dist/session-cost-usage-C-DsaOfN.js +627 -0
- package/dist/session-dirs-CO1f2ArM.js +318 -0
- package/dist/session-dirs-DoboH7Oy.js +318 -0
- package/dist/session-enM9-2If.js +170 -0
- package/dist/session-key-BF-9YzxC.js +235 -0
- package/dist/session-key-CgKWfjoZ.js +235 -0
- package/dist/session-utils-VKfyrS3d.js +621 -0
- package/dist/session-utils-_U6PeQeD.js +621 -0
- package/dist/sessions-Dg3febTj.js +2553 -0
- package/dist/sessions-Fhrpa-qj.js +245 -0
- package/dist/shell-env-DBS5su07.js +163 -0
- package/dist/shell-env-c3j5zcU9.js +163 -0
- package/dist/ssrf-8wNqPNzN.js +183 -0
- package/dist/ssrf-CJIdPXuS.js +183 -0
- package/dist/stagger--wvODnNe.js +56 -0
- package/dist/stagger-BLmTO4cK.js +56 -0
- package/dist/status-1zVD-Clq.js +21 -0
- package/dist/status-B_wW9Vt8.js +1936 -0
- package/dist/status-BtRY0nXQ.js +21 -0
- package/dist/status-D3leIzsB.js +1940 -0
- package/dist/status.update-BmuDZ7E7.js +449 -0
- package/dist/status.update-Mf6HSRvU.js +449 -0
- package/dist/store-BmUyjVdV.js +2555 -0
- package/dist/store-CzhBjUCN.js +64 -0
- package/dist/store-DlqiXmDO.js +53 -0
- package/dist/store-LXf4lUUA.js +64 -0
- package/dist/strip-inbound-meta-zmUXypSS.js +110 -0
- package/dist/strip-inbound-meta-zqtN9FTK.js +110 -0
- package/dist/subagent-registry-BCGOdOC-.js +4839 -0
- package/dist/subagent-registry-Bjx9LVlV.js +4841 -0
- package/dist/subsystem-BAW_f3DI.js +1195 -0
- package/dist/subsystem-DE8w_S23.js +1081 -0
- package/dist/system-cli-CDi0wZXE.js +73 -0
- package/dist/system-cli-CrzLj6XB.js +77 -0
- package/dist/systemd-40Rij3QR.js +547 -0
- package/dist/systemd-5C97CSzd.js +547 -0
- package/dist/systemd-hints-CyQqHq1i.js +278 -0
- package/dist/systemd-hints-Dbpv6gQ1.js +278 -0
- package/dist/systemd-linger-B2rPbnAi.js +75 -0
- package/dist/systemd-linger-DDvkfxH-.js +75 -0
- package/dist/table-DFx25vNb.js +279 -0
- package/dist/table-On3hkCqi.js +278 -0
- package/dist/tables-BFyFqtLB.js +55 -0
- package/dist/tables-Crybi0rV.js +55 -0
- package/dist/tables-Dwxstcvj.js +55 -0
- package/dist/tailnet-Da-_9e8E.js +40 -0
- package/dist/tailnet-xt92Yaop.js +40 -0
- package/dist/tailscale-CnV0JWca.js +230 -0
- package/dist/tailscale-VkEC8dzj.js +230 -0
- package/dist/target-errors-ChjvOMuV.js +26 -0
- package/dist/target-errors-GZXDqlUu.js +26 -0
- package/dist/targets-B46m7u5J.js +45 -0
- package/dist/targets-BegO82oK.js +2614 -0
- package/dist/targets-BpTQ50aN.js +649 -0
- package/dist/targets-BtGRUQMa.js +79 -0
- package/dist/targets-C99szk_e.js +114 -0
- package/dist/targets-CmC5m7Ey.js +53 -0
- package/dist/targets-D01MJGnh.js +79 -0
- package/dist/targets-D3r6Zgic.js +39 -0
- package/dist/targets-D7PT_rdO.js +45 -0
- package/dist/targets-D8Rv_6CT.js +649 -0
- package/dist/targets-DJ_OVcyq.js +220 -0
- package/dist/targets-_UWmnyI9.js +53 -0
- package/dist/targets-felDvoku.js +2613 -0
- package/dist/targets-tDrl_ioQ.js +46 -0
- package/dist/text-format-DarxU3JH.js +9 -0
- package/dist/text-format-Ds92M9UT.js +9 -0
- package/dist/thinking-4nOZPunr.js +60 -0
- package/dist/thinking-ZfH2V9Os.js +60 -0
- package/dist/tokens-Dw7ZdYwT.js +21 -0
- package/dist/tokens-TtJJxzRr.js +21 -0
- package/dist/tool-display-Bxs_1jIn.js +785 -0
- package/dist/tool-display-D9p_Ttkq.js +785 -0
- package/dist/tool-images-9Ron321Q.js +263 -0
- package/dist/tool-images-BWhy6WRN.js +263 -0
- package/dist/trash-BpB96kHe.js +125 -0
- package/dist/trash-De0DLz-t.js +125 -0
- package/dist/tui-M21MnbJp.js +3237 -0
- package/dist/tui-cli-mxjebFIk.js +63 -0
- package/dist/tui-cli-x2aEqskG.js +67 -0
- package/dist/tui-qVJob4mN.js +3237 -0
- package/dist/types.tools-BBb2rl3g.js +23 -0
- package/dist/types.tools-BDJw1yFx.js +23 -0
- package/dist/update-Bv3EwRgy.js +349 -0
- package/dist/update-D2gIPs2g.js +349 -0
- package/dist/update-cli-B_tiAE6B.js +1149 -0
- package/dist/update-cli-DdERWV6b.js +1147 -0
- package/dist/usage-BIzKZ5dT.js +57 -0
- package/dist/usage-BvZOzIC7.js +57 -0
- package/dist/usage-CCU9qNC5.js +5472 -0
- package/dist/usage-format-CmniSPCG.js +31 -0
- package/dist/usage-format-D_KQYQ-w.js +31 -0
- package/dist/utils-DPoNpP7D.js +631 -0
- package/dist/version-3QUZW8EP.js +52 -0
- package/dist/version-CVMnqdzu.js +52 -0
- package/dist/voice-credentials-CxWaO19D.js +46 -0
- package/dist/voice-credentials-DXU-y9z7.js +46 -0
- package/dist/warning-filter.js +48 -0
- package/dist/web-CCN82vao.js +74 -0
- package/dist/web-MFXYQO8v.js +79 -0
- package/dist/web-zotCHj-B.js +3051 -0
- package/dist/webhooks-cli-BB6FZ7La.js +330 -0
- package/dist/webhooks-cli-BoZinXXo.js +334 -0
- package/dist/whatsapp-actions-COMlNQFa.js +126 -0
- package/dist/whatsapp-actions-YZgc7smO.js +131 -0
- package/dist/widearea-dns-CQqZIeu8.js +127 -0
- package/dist/widearea-dns-D01FFYZ8.js +127 -0
- package/dist/workspace-BJCKO8Ns.js +10 -0
- package/dist/workspace-BisvA9oA.js +10 -0
- package/dist/workspace-Bj_uUDJr.js +439 -0
- package/dist/workspace-S9vwEco2.js +441 -0
- package/dist/wsl-PDLKeX04.js +52 -0
- package/dist/wsl-kFaeW76c.js +52 -0
- package/dist/zod-schema-7uqrpeBz.js +2715 -0
- package/dist/zod-schema-CdBaNuxH.js +2715 -0
- package/extensions/bluebubbles/README.md +45 -0
- package/extensions/bluebubbles/index.ts +19 -0
- package/extensions/bluebubbles/package.json +33 -0
- package/extensions/bluebubbles/remoteclaw.plugin.json +9 -0
- package/extensions/bluebubbles/src/account-resolve.ts +35 -0
- package/extensions/bluebubbles/src/accounts.ts +90 -0
- package/extensions/bluebubbles/src/actions.ts +460 -0
- package/extensions/bluebubbles/src/attachments.ts +268 -0
- package/extensions/bluebubbles/src/channel.ts +418 -0
- package/extensions/bluebubbles/src/chat.ts +329 -0
- package/extensions/bluebubbles/src/config-schema.ts +65 -0
- package/extensions/bluebubbles/src/history.ts +177 -0
- package/extensions/bluebubbles/src/media-send.ts +317 -0
- package/extensions/bluebubbles/src/monitor-normalize.ts +825 -0
- package/extensions/bluebubbles/src/monitor-processing.ts +1448 -0
- package/extensions/bluebubbles/src/monitor-reply-cache.ts +185 -0
- package/extensions/bluebubbles/src/monitor-shared.ts +41 -0
- package/extensions/bluebubbles/src/monitor.ts +534 -0
- package/extensions/bluebubbles/src/multipart.ts +32 -0
- package/extensions/bluebubbles/src/onboarding.ts +340 -0
- package/extensions/bluebubbles/src/probe.ts +163 -0
- package/extensions/bluebubbles/src/reactions.ts +182 -0
- package/extensions/bluebubbles/src/request-url.ts +12 -0
- package/extensions/bluebubbles/src/runtime.ts +34 -0
- package/extensions/bluebubbles/src/send-helpers.ts +53 -0
- package/extensions/bluebubbles/src/send.ts +472 -0
- package/extensions/bluebubbles/src/targets.ts +370 -0
- package/extensions/bluebubbles/src/test-harness.ts +79 -0
- package/extensions/bluebubbles/src/test-mocks.ts +11 -0
- package/extensions/bluebubbles/src/types.ts +135 -0
- package/extensions/device-pair/index.ts +529 -0
- package/extensions/device-pair/remoteclaw.plugin.json +20 -0
- package/extensions/diagnostics-otel/index.ts +15 -0
- package/extensions/diagnostics-otel/node_modules/.bin/acorn +21 -0
- package/extensions/diagnostics-otel/package.json +24 -0
- package/extensions/diagnostics-otel/remoteclaw.plugin.json +8 -0
- package/extensions/diagnostics-otel/src/service.ts +682 -0
- package/extensions/discord/index.ts +19 -0
- package/extensions/discord/package.json +11 -0
- package/extensions/discord/remoteclaw.plugin.json +9 -0
- package/extensions/discord/src/channel.ts +451 -0
- package/extensions/discord/src/runtime.ts +14 -0
- package/extensions/discord/src/subagent-hooks.ts +152 -0
- package/extensions/feishu/index.ts +63 -0
- package/extensions/feishu/package.json +34 -0
- package/extensions/feishu/remoteclaw.plugin.json +9 -0
- package/extensions/feishu/skills/feishu-doc/SKILL.md +105 -0
- package/extensions/feishu/skills/feishu-doc/references/block-types.md +103 -0
- package/extensions/feishu/skills/feishu-drive/SKILL.md +97 -0
- package/extensions/feishu/skills/feishu-perm/SKILL.md +119 -0
- package/extensions/feishu/skills/feishu-wiki/SKILL.md +111 -0
- package/extensions/feishu/src/accounts.ts +144 -0
- package/extensions/feishu/src/bitable.ts +739 -0
- package/extensions/feishu/src/bot.ts +1006 -0
- package/extensions/feishu/src/channel.ts +359 -0
- package/extensions/feishu/src/client.ts +118 -0
- package/extensions/feishu/src/config-schema.ts +226 -0
- package/extensions/feishu/src/dedup.ts +54 -0
- package/extensions/feishu/src/directory.ts +177 -0
- package/extensions/feishu/src/doc-schema.ts +47 -0
- package/extensions/feishu/src/docx.ts +536 -0
- package/extensions/feishu/src/drive-schema.ts +46 -0
- package/extensions/feishu/src/drive.ts +227 -0
- package/extensions/feishu/src/dynamic-agent.ts +131 -0
- package/extensions/feishu/src/external-keys.ts +19 -0
- package/extensions/feishu/src/media.ts +441 -0
- package/extensions/feishu/src/mention.ts +133 -0
- package/extensions/feishu/src/monitor.ts +397 -0
- package/extensions/feishu/src/onboarding.ts +351 -0
- package/extensions/feishu/src/outbound.ts +55 -0
- package/extensions/feishu/src/perm-schema.ts +52 -0
- package/extensions/feishu/src/perm.ts +173 -0
- package/extensions/feishu/src/policy.ts +120 -0
- package/extensions/feishu/src/probe.ts +44 -0
- package/extensions/feishu/src/reactions.ts +160 -0
- package/extensions/feishu/src/reply-dispatcher.ts +239 -0
- package/extensions/feishu/src/runtime.ts +14 -0
- package/extensions/feishu/src/send-result.ts +29 -0
- package/extensions/feishu/src/send-target.ts +25 -0
- package/extensions/feishu/src/send.ts +313 -0
- package/extensions/feishu/src/streaming-card.ts +218 -0
- package/extensions/feishu/src/targets.ts +78 -0
- package/extensions/feishu/src/tools-config.ts +21 -0
- package/extensions/feishu/src/types.ts +81 -0
- package/extensions/feishu/src/typing.ts +80 -0
- package/extensions/feishu/src/wiki-schema.ts +55 -0
- package/extensions/feishu/src/wiki.ts +232 -0
- package/extensions/googlechat/index.ts +19 -0
- package/extensions/googlechat/node_modules/.bin/nlc +21 -0
- package/extensions/googlechat/node_modules/.bin/node-llama-cpp +21 -0
- package/extensions/googlechat/node_modules/.bin/remoteclaw +21 -0
- package/extensions/googlechat/node_modules/.bin/tsc +21 -0
- package/extensions/googlechat/node_modules/.bin/tsserver +21 -0
- package/extensions/googlechat/package.json +37 -0
- package/extensions/googlechat/remoteclaw.plugin.json +9 -0
- package/extensions/googlechat/src/accounts.ts +147 -0
- package/extensions/googlechat/src/actions.ts +176 -0
- package/extensions/googlechat/src/api.ts +282 -0
- package/extensions/googlechat/src/auth.ts +137 -0
- package/extensions/googlechat/src/channel.ts +576 -0
- package/extensions/googlechat/src/monitor.ts +965 -0
- package/extensions/googlechat/src/onboarding.ts +270 -0
- package/extensions/googlechat/src/runtime.ts +14 -0
- package/extensions/googlechat/src/targets.ts +65 -0
- package/extensions/googlechat/src/types.config.ts +3 -0
- package/extensions/googlechat/src/types.ts +73 -0
- package/extensions/imessage/index.ts +17 -0
- package/extensions/imessage/package.json +12 -0
- package/extensions/imessage/remoteclaw.plugin.json +9 -0
- package/extensions/imessage/src/channel.ts +304 -0
- package/extensions/imessage/src/runtime.ts +14 -0
- package/extensions/irc/index.ts +17 -0
- package/extensions/irc/package.json +11 -0
- package/extensions/irc/remoteclaw.plugin.json +9 -0
- package/extensions/irc/src/accounts.ts +268 -0
- package/extensions/irc/src/channel.ts +364 -0
- package/extensions/irc/src/client.ts +439 -0
- package/extensions/irc/src/config-schema.ts +91 -0
- package/extensions/irc/src/connect-options.ts +30 -0
- package/extensions/irc/src/control-chars.ts +22 -0
- package/extensions/irc/src/inbound.ts +371 -0
- package/extensions/irc/src/monitor.ts +146 -0
- package/extensions/irc/src/normalize.ts +123 -0
- package/extensions/irc/src/onboarding.ts +479 -0
- package/extensions/irc/src/policy.ts +166 -0
- package/extensions/irc/src/probe.ts +53 -0
- package/extensions/irc/src/protocol.ts +169 -0
- package/extensions/irc/src/runtime.ts +14 -0
- package/extensions/irc/src/send.ts +88 -0
- package/extensions/irc/src/types.ts +98 -0
- package/extensions/line/index.ts +19 -0
- package/extensions/line/package.json +27 -0
- package/extensions/line/remoteclaw.plugin.json +9 -0
- package/extensions/line/src/card-command.ts +344 -0
- package/extensions/line/src/channel.ts +797 -0
- package/extensions/line/src/runtime.ts +14 -0
- package/extensions/matrix/CHANGELOG.md +32 -0
- package/extensions/matrix/index.ts +17 -0
- package/extensions/matrix/node_modules/.bin/markdown-it +21 -0
- package/extensions/matrix/package.json +33 -0
- package/extensions/matrix/remoteclaw.plugin.json +9 -0
- package/extensions/matrix/src/actions.ts +195 -0
- package/extensions/matrix/src/channel.ts +486 -0
- package/extensions/matrix/src/config-schema.ts +63 -0
- package/extensions/matrix/src/directory-live.ts +208 -0
- package/extensions/matrix/src/group-mentions.ts +52 -0
- package/extensions/matrix/src/matrix/accounts.ts +137 -0
- package/extensions/matrix/src/matrix/actions/client.ts +47 -0
- package/extensions/matrix/src/matrix/actions/limits.ts +6 -0
- package/extensions/matrix/src/matrix/actions/messages.ts +126 -0
- package/extensions/matrix/src/matrix/actions/pins.ts +84 -0
- package/extensions/matrix/src/matrix/actions/reactions.ts +102 -0
- package/extensions/matrix/src/matrix/actions/room.ts +85 -0
- package/extensions/matrix/src/matrix/actions/summary.ts +75 -0
- package/extensions/matrix/src/matrix/actions/types.ts +85 -0
- package/extensions/matrix/src/matrix/actions.ts +15 -0
- package/extensions/matrix/src/matrix/active-client.ts +32 -0
- package/extensions/matrix/src/matrix/client/config.ts +219 -0
- package/extensions/matrix/src/matrix/client/create-client.ts +123 -0
- package/extensions/matrix/src/matrix/client/logging.ts +36 -0
- package/extensions/matrix/src/matrix/client/runtime.ts +4 -0
- package/extensions/matrix/src/matrix/client/shared.ts +201 -0
- package/extensions/matrix/src/matrix/client/storage.ts +131 -0
- package/extensions/matrix/src/matrix/client/types.ts +34 -0
- package/extensions/matrix/src/matrix/client-bootstrap.ts +39 -0
- package/extensions/matrix/src/matrix/client.ts +14 -0
- package/extensions/matrix/src/matrix/credentials.ts +125 -0
- package/extensions/matrix/src/matrix/deps.ts +60 -0
- package/extensions/matrix/src/matrix/format.ts +22 -0
- package/extensions/matrix/src/matrix/index.ts +11 -0
- package/extensions/matrix/src/matrix/monitor/allowlist.ts +103 -0
- package/extensions/matrix/src/matrix/monitor/auto-join.ts +71 -0
- package/extensions/matrix/src/matrix/monitor/direct.ts +104 -0
- package/extensions/matrix/src/matrix/monitor/events.ts +148 -0
- package/extensions/matrix/src/matrix/monitor/handler.ts +688 -0
- package/extensions/matrix/src/matrix/monitor/index.ts +358 -0
- package/extensions/matrix/src/matrix/monitor/location.ts +100 -0
- package/extensions/matrix/src/matrix/monitor/media.ts +118 -0
- package/extensions/matrix/src/matrix/monitor/mentions.ts +62 -0
- package/extensions/matrix/src/matrix/monitor/replies.ts +100 -0
- package/extensions/matrix/src/matrix/monitor/room-info.ts +55 -0
- package/extensions/matrix/src/matrix/monitor/rooms.ts +47 -0
- package/extensions/matrix/src/matrix/monitor/threads.ts +68 -0
- package/extensions/matrix/src/matrix/monitor/types.ts +39 -0
- package/extensions/matrix/src/matrix/poll-types.ts +167 -0
- package/extensions/matrix/src/matrix/probe.ts +69 -0
- package/extensions/matrix/src/matrix/send/client.ts +97 -0
- package/extensions/matrix/src/matrix/send/formatting.ts +93 -0
- package/extensions/matrix/src/matrix/send/media.ts +230 -0
- package/extensions/matrix/src/matrix/send/targets.ts +150 -0
- package/extensions/matrix/src/matrix/send/types.ts +109 -0
- package/extensions/matrix/src/matrix/send-queue.ts +44 -0
- package/extensions/matrix/src/matrix/send.ts +265 -0
- package/extensions/matrix/src/onboarding.ts +446 -0
- package/extensions/matrix/src/outbound.ts +55 -0
- package/extensions/matrix/src/resolve-targets.ts +126 -0
- package/extensions/matrix/src/runtime.ts +14 -0
- package/extensions/matrix/src/tool-actions.ts +164 -0
- package/extensions/matrix/src/types.ts +114 -0
- package/extensions/mattermost/index.ts +17 -0
- package/extensions/mattermost/package.json +25 -0
- package/extensions/mattermost/remoteclaw.plugin.json +9 -0
- package/extensions/mattermost/src/channel.ts +439 -0
- package/extensions/mattermost/src/config-schema.ts +62 -0
- package/extensions/mattermost/src/group-mentions.ts +15 -0
- package/extensions/mattermost/src/mattermost/accounts.ts +128 -0
- package/extensions/mattermost/src/mattermost/client.ts +230 -0
- package/extensions/mattermost/src/mattermost/index.ts +9 -0
- package/extensions/mattermost/src/mattermost/monitor-helpers.ts +71 -0
- package/extensions/mattermost/src/mattermost/monitor-onchar.ts +25 -0
- package/extensions/mattermost/src/mattermost/monitor-websocket.ts +221 -0
- package/extensions/mattermost/src/mattermost/monitor.ts +1061 -0
- package/extensions/mattermost/src/mattermost/probe.ts +61 -0
- package/extensions/mattermost/src/mattermost/reactions.test-helpers.ts +83 -0
- package/extensions/mattermost/src/mattermost/reactions.ts +124 -0
- package/extensions/mattermost/src/mattermost/reconnect.ts +103 -0
- package/extensions/mattermost/src/mattermost/send.ts +231 -0
- package/extensions/mattermost/src/normalize.ts +46 -0
- package/extensions/mattermost/src/onboarding-helpers.ts +1 -0
- package/extensions/mattermost/src/onboarding.ts +182 -0
- package/extensions/mattermost/src/runtime.ts +14 -0
- package/extensions/mattermost/src/types.ts +62 -0
- package/extensions/msteams/CHANGELOG.md +35 -0
- package/extensions/msteams/index.ts +17 -0
- package/extensions/msteams/package.json +32 -0
- package/extensions/msteams/remoteclaw.plugin.json +9 -0
- package/extensions/msteams/src/attachments/download.ts +282 -0
- package/extensions/msteams/src/attachments/graph.ts +354 -0
- package/extensions/msteams/src/attachments/html.ts +90 -0
- package/extensions/msteams/src/attachments/payload.ts +14 -0
- package/extensions/msteams/src/attachments/remote-media.ts +42 -0
- package/extensions/msteams/src/attachments/shared.ts +404 -0
- package/extensions/msteams/src/attachments/types.ts +37 -0
- package/extensions/msteams/src/attachments.ts +18 -0
- package/extensions/msteams/src/channel.ts +464 -0
- package/extensions/msteams/src/conversation-store-fs.ts +165 -0
- package/extensions/msteams/src/conversation-store-memory.ts +47 -0
- package/extensions/msteams/src/conversation-store.ts +41 -0
- package/extensions/msteams/src/directory-live.ts +108 -0
- package/extensions/msteams/src/errors.ts +190 -0
- package/extensions/msteams/src/file-consent-helpers.ts +73 -0
- package/extensions/msteams/src/file-consent.ts +126 -0
- package/extensions/msteams/src/file-lock.ts +1 -0
- package/extensions/msteams/src/graph-chat.ts +53 -0
- package/extensions/msteams/src/graph-upload.ts +452 -0
- package/extensions/msteams/src/graph-users.ts +29 -0
- package/extensions/msteams/src/graph.ts +81 -0
- package/extensions/msteams/src/inbound.ts +48 -0
- package/extensions/msteams/src/index.ts +4 -0
- package/extensions/msteams/src/media-helpers.ts +105 -0
- package/extensions/msteams/src/mentions.ts +114 -0
- package/extensions/msteams/src/messenger.ts +484 -0
- package/extensions/msteams/src/monitor-handler/inbound-media.ts +128 -0
- package/extensions/msteams/src/monitor-handler/message-handler.ts +661 -0
- package/extensions/msteams/src/monitor-handler.ts +162 -0
- package/extensions/msteams/src/monitor-types.ts +5 -0
- package/extensions/msteams/src/monitor.ts +305 -0
- package/extensions/msteams/src/onboarding.ts +406 -0
- package/extensions/msteams/src/outbound.ts +46 -0
- package/extensions/msteams/src/pending-uploads.ts +89 -0
- package/extensions/msteams/src/policy.ts +259 -0
- package/extensions/msteams/src/polls-store-memory.ts +32 -0
- package/extensions/msteams/src/polls.ts +315 -0
- package/extensions/msteams/src/probe.ts +94 -0
- package/extensions/msteams/src/reply-dispatcher.ts +132 -0
- package/extensions/msteams/src/resolve-allowlist.ts +198 -0
- package/extensions/msteams/src/runtime.ts +14 -0
- package/extensions/msteams/src/sdk-types.ts +19 -0
- package/extensions/msteams/src/sdk.ts +33 -0
- package/extensions/msteams/src/send-context.ts +164 -0
- package/extensions/msteams/src/send.ts +530 -0
- package/extensions/msteams/src/sent-message-cache.ts +44 -0
- package/extensions/msteams/src/storage.ts +25 -0
- package/extensions/msteams/src/store-fs.ts +44 -0
- package/extensions/msteams/src/test-runtime.ts +16 -0
- package/extensions/msteams/src/token-response.ts +11 -0
- package/extensions/msteams/src/token.ts +19 -0
- package/extensions/nextcloud-talk/index.ts +17 -0
- package/extensions/nextcloud-talk/package.json +30 -0
- package/extensions/nextcloud-talk/remoteclaw.plugin.json +9 -0
- package/extensions/nextcloud-talk/src/accounts.ts +170 -0
- package/extensions/nextcloud-talk/src/channel.ts +416 -0
- package/extensions/nextcloud-talk/src/config-schema.ts +72 -0
- package/extensions/nextcloud-talk/src/format.ts +79 -0
- package/extensions/nextcloud-talk/src/inbound.ts +342 -0
- package/extensions/nextcloud-talk/src/monitor.ts +275 -0
- package/extensions/nextcloud-talk/src/normalize.ts +39 -0
- package/extensions/nextcloud-talk/src/onboarding.ts +349 -0
- package/extensions/nextcloud-talk/src/policy.ts +180 -0
- package/extensions/nextcloud-talk/src/room-info.ts +125 -0
- package/extensions/nextcloud-talk/src/runtime.ts +14 -0
- package/extensions/nextcloud-talk/src/send.ts +215 -0
- package/extensions/nextcloud-talk/src/signature.ts +72 -0
- package/extensions/nextcloud-talk/src/types.ts +184 -0
- package/extensions/nostr/CHANGELOG.md +44 -0
- package/extensions/nostr/README.md +136 -0
- package/extensions/nostr/index.ts +68 -0
- package/extensions/nostr/node_modules/.bin/tsc +21 -0
- package/extensions/nostr/node_modules/.bin/tsserver +21 -0
- package/extensions/nostr/package.json +30 -0
- package/extensions/nostr/remoteclaw.plugin.json +9 -0
- package/extensions/nostr/src/channel.ts +345 -0
- package/extensions/nostr/src/config-schema.ts +90 -0
- package/extensions/nostr/src/metrics.ts +458 -0
- package/extensions/nostr/src/nostr-bus.ts +719 -0
- package/extensions/nostr/src/nostr-profile-http.ts +519 -0
- package/extensions/nostr/src/nostr-profile-import.ts +262 -0
- package/extensions/nostr/src/nostr-profile.ts +277 -0
- package/extensions/nostr/src/nostr-state-store.ts +226 -0
- package/extensions/nostr/src/runtime.ts +14 -0
- package/extensions/nostr/src/seen-tracker.ts +289 -0
- package/extensions/nostr/src/types.ts +101 -0
- package/extensions/phone-control/index.ts +421 -0
- package/extensions/phone-control/remoteclaw.plugin.json +10 -0
- package/extensions/shared/resolve-target-test-helpers.ts +66 -0
- package/extensions/signal/index.ts +17 -0
- package/extensions/signal/package.json +12 -0
- package/extensions/signal/remoteclaw.plugin.json +9 -0
- package/extensions/signal/src/channel.ts +299 -0
- package/extensions/signal/src/runtime.ts +14 -0
- package/extensions/slack/index.ts +17 -0
- package/extensions/slack/package.json +12 -0
- package/extensions/slack/remoteclaw.plugin.json +9 -0
- package/extensions/slack/src/channel.ts +421 -0
- package/extensions/slack/src/runtime.ts +14 -0
- package/extensions/synology-chat/index.ts +17 -0
- package/extensions/synology-chat/package.json +28 -0
- package/extensions/synology-chat/remoteclaw.plugin.json +9 -0
- package/extensions/synology-chat/src/accounts.ts +87 -0
- package/extensions/synology-chat/src/channel.ts +347 -0
- package/extensions/synology-chat/src/client.ts +142 -0
- package/extensions/synology-chat/src/runtime.ts +20 -0
- package/extensions/synology-chat/src/security.ts +140 -0
- package/extensions/synology-chat/src/types.ts +60 -0
- package/extensions/synology-chat/src/webhook-handler.ts +221 -0
- package/extensions/talk-voice/index.ts +150 -0
- package/extensions/talk-voice/remoteclaw.plugin.json +10 -0
- package/extensions/telegram/index.ts +17 -0
- package/extensions/telegram/package.json +12 -0
- package/extensions/telegram/remoteclaw.plugin.json +9 -0
- package/extensions/telegram/src/channel.ts +569 -0
- package/extensions/telegram/src/runtime.ts +14 -0
- package/extensions/test-utils/runtime-env.ts +12 -0
- package/extensions/thread-ownership/index.ts +133 -0
- package/extensions/thread-ownership/remoteclaw.plugin.json +28 -0
- package/extensions/tlon/README.md +5 -0
- package/extensions/tlon/index.ts +17 -0
- package/extensions/tlon/package.json +29 -0
- package/extensions/tlon/remoteclaw.plugin.json +9 -0
- package/extensions/tlon/src/account-fields.ts +25 -0
- package/extensions/tlon/src/channel.ts +384 -0
- package/extensions/tlon/src/config-schema.ts +41 -0
- package/extensions/tlon/src/monitor/discovery.ts +78 -0
- package/extensions/tlon/src/monitor/history.ts +92 -0
- package/extensions/tlon/src/monitor/index.ts +591 -0
- package/extensions/tlon/src/monitor/processed-messages.ts +33 -0
- package/extensions/tlon/src/monitor/utils.ts +106 -0
- package/extensions/tlon/src/onboarding.ts +229 -0
- package/extensions/tlon/src/runtime.ts +14 -0
- package/extensions/tlon/src/targets.ts +89 -0
- package/extensions/tlon/src/types.ts +99 -0
- package/extensions/tlon/src/urbit/auth.ts +48 -0
- package/extensions/tlon/src/urbit/base-url.ts +57 -0
- package/extensions/tlon/src/urbit/channel-client.ts +158 -0
- package/extensions/tlon/src/urbit/channel-ops.ts +164 -0
- package/extensions/tlon/src/urbit/context.ts +47 -0
- package/extensions/tlon/src/urbit/errors.ts +51 -0
- package/extensions/tlon/src/urbit/fetch.ts +39 -0
- package/extensions/tlon/src/urbit/send.ts +131 -0
- package/extensions/tlon/src/urbit/sse-client.ts +431 -0
- package/extensions/twitch/CHANGELOG.md +39 -0
- package/extensions/twitch/README.md +89 -0
- package/extensions/twitch/index.ts +20 -0
- package/extensions/twitch/package.json +17 -0
- package/extensions/twitch/remoteclaw.plugin.json +9 -0
- package/extensions/twitch/src/access-control.ts +166 -0
- package/extensions/twitch/src/actions.ts +174 -0
- package/extensions/twitch/src/client-manager-registry.ts +115 -0
- package/extensions/twitch/src/config-schema.ts +84 -0
- package/extensions/twitch/src/config.ts +116 -0
- package/extensions/twitch/src/monitor.ts +273 -0
- package/extensions/twitch/src/onboarding.ts +417 -0
- package/extensions/twitch/src/outbound.ts +187 -0
- package/extensions/twitch/src/plugin.ts +274 -0
- package/extensions/twitch/src/probe.ts +119 -0
- package/extensions/twitch/src/resolver.ts +137 -0
- package/extensions/twitch/src/runtime.ts +14 -0
- package/extensions/twitch/src/send.ts +136 -0
- package/extensions/twitch/src/status.ts +179 -0
- package/extensions/twitch/src/test-fixtures.ts +30 -0
- package/extensions/twitch/src/token.ts +94 -0
- package/extensions/twitch/src/twitch-client.ts +277 -0
- package/extensions/twitch/src/types.ts +141 -0
- package/extensions/twitch/src/utils/markdown.ts +98 -0
- package/extensions/twitch/src/utils/twitch.ts +80 -0
- package/extensions/voice-call/CHANGELOG.md +49 -0
- package/extensions/voice-call/README.md +181 -0
- package/extensions/voice-call/index.ts +529 -0
- package/extensions/voice-call/package.json +16 -0
- package/extensions/voice-call/remoteclaw.plugin.json +559 -0
- package/extensions/voice-call/src/allowlist.ts +19 -0
- package/extensions/voice-call/src/cli.ts +380 -0
- package/extensions/voice-call/src/config.ts +477 -0
- package/extensions/voice-call/src/core-bridge.ts +170 -0
- package/extensions/voice-call/src/manager/context.ts +41 -0
- package/extensions/voice-call/src/manager/events.ts +242 -0
- package/extensions/voice-call/src/manager/lookup.ts +35 -0
- package/extensions/voice-call/src/manager/outbound.ts +380 -0
- package/extensions/voice-call/src/manager/state.ts +48 -0
- package/extensions/voice-call/src/manager/store.ts +94 -0
- package/extensions/voice-call/src/manager/timers.ts +112 -0
- package/extensions/voice-call/src/manager/twiml.ts +9 -0
- package/extensions/voice-call/src/manager.ts +209 -0
- package/extensions/voice-call/src/media-stream.ts +527 -0
- package/extensions/voice-call/src/providers/base.ts +67 -0
- package/extensions/voice-call/src/providers/index.ts +10 -0
- package/extensions/voice-call/src/providers/mock.ts +165 -0
- package/extensions/voice-call/src/providers/plivo.ts +560 -0
- package/extensions/voice-call/src/providers/stt-openai-realtime.ts +311 -0
- package/extensions/voice-call/src/providers/telnyx.ts +318 -0
- package/extensions/voice-call/src/providers/tts-openai.ts +259 -0
- package/extensions/voice-call/src/providers/twilio/api.ts +42 -0
- package/extensions/voice-call/src/providers/twilio/webhook.ts +33 -0
- package/extensions/voice-call/src/providers/twilio.ts +688 -0
- package/extensions/voice-call/src/response-generator.ts +174 -0
- package/extensions/voice-call/src/runtime.ts +217 -0
- package/extensions/voice-call/src/telephony-audio.ts +90 -0
- package/extensions/voice-call/src/telephony-tts.ts +106 -0
- package/extensions/voice-call/src/tunnel.ts +314 -0
- package/extensions/voice-call/src/types.ts +280 -0
- package/extensions/voice-call/src/utils.ts +14 -0
- package/extensions/voice-call/src/voice-mapping.ts +67 -0
- package/extensions/voice-call/src/webhook-security.ts +880 -0
- package/extensions/voice-call/src/webhook.ts +556 -0
- package/extensions/whatsapp/index.ts +17 -0
- package/extensions/whatsapp/package.json +12 -0
- package/extensions/whatsapp/remoteclaw.plugin.json +9 -0
- package/extensions/whatsapp/src/channel.ts +459 -0
- package/extensions/whatsapp/src/runtime.ts +14 -0
- package/extensions/zalo/CHANGELOG.md +29 -0
- package/extensions/zalo/README.md +50 -0
- package/extensions/zalo/index.ts +19 -0
- package/extensions/zalo/package.json +32 -0
- package/extensions/zalo/remoteclaw.plugin.json +9 -0
- package/extensions/zalo/src/accounts.ts +82 -0
- package/extensions/zalo/src/actions.ts +56 -0
- package/extensions/zalo/src/api.ts +208 -0
- package/extensions/zalo/src/channel.ts +398 -0
- package/extensions/zalo/src/config-schema.ts +27 -0
- package/extensions/zalo/src/group-access.ts +48 -0
- package/extensions/zalo/src/monitor.ts +675 -0
- package/extensions/zalo/src/monitor.webhook.ts +219 -0
- package/extensions/zalo/src/onboarding.ts +398 -0
- package/extensions/zalo/src/probe.ts +45 -0
- package/extensions/zalo/src/proxy.ts +24 -0
- package/extensions/zalo/src/runtime.ts +14 -0
- package/extensions/zalo/src/send.ts +124 -0
- package/extensions/zalo/src/status-issues.ts +53 -0
- package/extensions/zalo/src/token.ts +62 -0
- package/extensions/zalo/src/types.ts +48 -0
- package/extensions/zalouser/CHANGELOG.md +31 -0
- package/extensions/zalouser/README.md +225 -0
- package/extensions/zalouser/index.ts +31 -0
- package/extensions/zalouser/package.json +32 -0
- package/extensions/zalouser/remoteclaw.plugin.json +9 -0
- package/extensions/zalouser/src/accounts.ts +138 -0
- package/extensions/zalouser/src/channel.ts +652 -0
- package/extensions/zalouser/src/config-schema.ts +28 -0
- package/extensions/zalouser/src/monitor.ts +619 -0
- package/extensions/zalouser/src/onboarding.ts +428 -0
- package/extensions/zalouser/src/probe.ts +27 -0
- package/extensions/zalouser/src/runtime.ts +14 -0
- package/extensions/zalouser/src/send.ts +141 -0
- package/extensions/zalouser/src/status-issues.ts +89 -0
- package/extensions/zalouser/src/tool.ts +166 -0
- package/extensions/zalouser/src/types.ts +105 -0
- package/extensions/zalouser/src/zca.ts +198 -0
- package/package.json +250 -15
- package/remoteclaw.mjs +56 -0
- package/index.js +0 -4
|
@@ -0,0 +1,2715 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
//#region src/cli/parse-bytes.ts
|
|
5
|
+
const UNIT_MULTIPLIERS = {
|
|
6
|
+
b: 1,
|
|
7
|
+
kb: 1024,
|
|
8
|
+
k: 1024,
|
|
9
|
+
mb: 1024 ** 2,
|
|
10
|
+
m: 1024 ** 2,
|
|
11
|
+
gb: 1024 ** 3,
|
|
12
|
+
g: 1024 ** 3,
|
|
13
|
+
tb: 1024 ** 4,
|
|
14
|
+
t: 1024 ** 4
|
|
15
|
+
};
|
|
16
|
+
function parseByteSize(raw, opts) {
|
|
17
|
+
const trimmed = String(raw ?? "").trim().toLowerCase();
|
|
18
|
+
if (!trimmed) throw new Error("invalid byte size (empty)");
|
|
19
|
+
const m = /^(\d+(?:\.\d+)?)([a-z]+)?$/.exec(trimmed);
|
|
20
|
+
if (!m) throw new Error(`invalid byte size: ${raw}`);
|
|
21
|
+
const value = Number(m[1]);
|
|
22
|
+
if (!Number.isFinite(value) || value < 0) throw new Error(`invalid byte size: ${raw}`);
|
|
23
|
+
const multiplier = UNIT_MULTIPLIERS[(m[2] ?? opts?.defaultUnit ?? "b").toLowerCase()];
|
|
24
|
+
if (!multiplier) throw new Error(`invalid byte size unit: ${raw}`);
|
|
25
|
+
const bytes = Math.round(value * multiplier);
|
|
26
|
+
if (!Number.isFinite(bytes)) throw new Error(`invalid byte size: ${raw}`);
|
|
27
|
+
return bytes;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/cli/parse-duration.ts
|
|
32
|
+
const DURATION_MULTIPLIERS = {
|
|
33
|
+
ms: 1,
|
|
34
|
+
s: 1e3,
|
|
35
|
+
m: 6e4,
|
|
36
|
+
h: 36e5,
|
|
37
|
+
d: 864e5
|
|
38
|
+
};
|
|
39
|
+
function parseDurationMs(raw, opts) {
|
|
40
|
+
const trimmed = String(raw ?? "").trim().toLowerCase();
|
|
41
|
+
if (!trimmed) throw new Error("invalid duration (empty)");
|
|
42
|
+
const single = /^(\d+(?:\.\d+)?)(ms|s|m|h|d)?$/.exec(trimmed);
|
|
43
|
+
if (single) {
|
|
44
|
+
const value = Number(single[1]);
|
|
45
|
+
if (!Number.isFinite(value) || value < 0) throw new Error(`invalid duration: ${raw}`);
|
|
46
|
+
const unit = single[2] ?? opts?.defaultUnit ?? "ms";
|
|
47
|
+
const ms = Math.round(value * DURATION_MULTIPLIERS[unit]);
|
|
48
|
+
if (!Number.isFinite(ms)) throw new Error(`invalid duration: ${raw}`);
|
|
49
|
+
return ms;
|
|
50
|
+
}
|
|
51
|
+
let totalMs = 0;
|
|
52
|
+
let consumed = 0;
|
|
53
|
+
for (const match of trimmed.matchAll(/(\d+(?:\.\d+)?)(ms|s|m|h|d)/g)) {
|
|
54
|
+
const [full, valueRaw, unitRaw] = match;
|
|
55
|
+
const index = match.index ?? -1;
|
|
56
|
+
if (!full || !valueRaw || !unitRaw || index < 0) throw new Error(`invalid duration: ${raw}`);
|
|
57
|
+
if (index !== consumed) throw new Error(`invalid duration: ${raw}`);
|
|
58
|
+
const value = Number(valueRaw);
|
|
59
|
+
if (!Number.isFinite(value) || value < 0) throw new Error(`invalid duration: ${raw}`);
|
|
60
|
+
const multiplier = DURATION_MULTIPLIERS[unitRaw];
|
|
61
|
+
if (!multiplier) throw new Error(`invalid duration: ${raw}`);
|
|
62
|
+
totalMs += value * multiplier;
|
|
63
|
+
consumed += full.length;
|
|
64
|
+
}
|
|
65
|
+
if (consumed !== trimmed.length || consumed === 0) throw new Error(`invalid duration: ${raw}`);
|
|
66
|
+
const ms = Math.round(totalMs);
|
|
67
|
+
if (!Number.isFinite(ms)) throw new Error(`invalid duration: ${raw}`);
|
|
68
|
+
return ms;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/infra/safe-executable-value.ts
|
|
73
|
+
const SHELL_METACHARS = /[;&|`$<>]/;
|
|
74
|
+
const CONTROL_CHARS = /[\r\n]/;
|
|
75
|
+
const QUOTE_CHARS = /["']/;
|
|
76
|
+
const BARE_NAME_PATTERN = /^[A-Za-z0-9._+-]+$/;
|
|
77
|
+
function isLikelyPath(value) {
|
|
78
|
+
if (value.startsWith(".") || value.startsWith("~")) return true;
|
|
79
|
+
if (value.includes("/") || value.includes("\\")) return true;
|
|
80
|
+
return /^[A-Za-z]:[\\/]/.test(value);
|
|
81
|
+
}
|
|
82
|
+
function isSafeExecutableValue(value) {
|
|
83
|
+
if (!value) return false;
|
|
84
|
+
const trimmed = value.trim();
|
|
85
|
+
if (!trimmed) return false;
|
|
86
|
+
if (trimmed.includes("\0")) return false;
|
|
87
|
+
if (CONTROL_CHARS.test(trimmed)) return false;
|
|
88
|
+
if (SHELL_METACHARS.test(trimmed)) return false;
|
|
89
|
+
if (QUOTE_CHARS.test(trimmed)) return false;
|
|
90
|
+
if (isLikelyPath(trimmed)) return true;
|
|
91
|
+
if (trimmed.startsWith("-")) return false;
|
|
92
|
+
return BARE_NAME_PATTERN.test(trimmed);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/config/zod-schema.sensitive.ts
|
|
97
|
+
const sensitive = z.registry();
|
|
98
|
+
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/config/zod-schema.core.ts
|
|
101
|
+
const GroupChatSchema = z.object({
|
|
102
|
+
mentionPatterns: z.array(z.string()).optional(),
|
|
103
|
+
historyLimit: z.number().int().positive().optional()
|
|
104
|
+
}).strict().optional();
|
|
105
|
+
const DmConfigSchema = z.object({ historyLimit: z.number().int().min(0).optional() }).strict();
|
|
106
|
+
const IdentitySchema = z.object({
|
|
107
|
+
name: z.string().optional(),
|
|
108
|
+
theme: z.string().optional(),
|
|
109
|
+
emoji: z.string().optional(),
|
|
110
|
+
avatar: z.string().optional()
|
|
111
|
+
}).strict().optional();
|
|
112
|
+
const QueueModeSchema = z.union([
|
|
113
|
+
z.literal("steer"),
|
|
114
|
+
z.literal("followup"),
|
|
115
|
+
z.literal("collect"),
|
|
116
|
+
z.literal("steer-backlog"),
|
|
117
|
+
z.literal("steer+backlog"),
|
|
118
|
+
z.literal("queue"),
|
|
119
|
+
z.literal("interrupt")
|
|
120
|
+
]);
|
|
121
|
+
const QueueDropSchema = z.union([
|
|
122
|
+
z.literal("old"),
|
|
123
|
+
z.literal("new"),
|
|
124
|
+
z.literal("summarize")
|
|
125
|
+
]);
|
|
126
|
+
const ReplyToModeSchema = z.union([
|
|
127
|
+
z.literal("off"),
|
|
128
|
+
z.literal("first"),
|
|
129
|
+
z.literal("all")
|
|
130
|
+
]);
|
|
131
|
+
const TypingModeSchema = z.union([
|
|
132
|
+
z.literal("never"),
|
|
133
|
+
z.literal("instant"),
|
|
134
|
+
z.literal("thinking"),
|
|
135
|
+
z.literal("message")
|
|
136
|
+
]);
|
|
137
|
+
const GroupPolicySchema = z.enum([
|
|
138
|
+
"open",
|
|
139
|
+
"disabled",
|
|
140
|
+
"allowlist"
|
|
141
|
+
]);
|
|
142
|
+
const DmPolicySchema = z.enum([
|
|
143
|
+
"pairing",
|
|
144
|
+
"allowlist",
|
|
145
|
+
"open",
|
|
146
|
+
"disabled"
|
|
147
|
+
]);
|
|
148
|
+
const BlockStreamingCoalesceSchema = z.object({
|
|
149
|
+
minChars: z.number().int().positive().optional(),
|
|
150
|
+
maxChars: z.number().int().positive().optional(),
|
|
151
|
+
idleMs: z.number().int().nonnegative().optional()
|
|
152
|
+
}).strict();
|
|
153
|
+
const ReplyRuntimeConfigSchemaShape = {
|
|
154
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
155
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
156
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
157
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
158
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
159
|
+
blockStreaming: z.boolean().optional(),
|
|
160
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
161
|
+
responsePrefix: z.string().optional(),
|
|
162
|
+
mediaMaxMb: z.number().positive().optional()
|
|
163
|
+
};
|
|
164
|
+
const BlockStreamingChunkSchema = z.object({
|
|
165
|
+
minChars: z.number().int().positive().optional(),
|
|
166
|
+
maxChars: z.number().int().positive().optional(),
|
|
167
|
+
breakPreference: z.union([
|
|
168
|
+
z.literal("paragraph"),
|
|
169
|
+
z.literal("newline"),
|
|
170
|
+
z.literal("sentence")
|
|
171
|
+
]).optional()
|
|
172
|
+
}).strict();
|
|
173
|
+
const MarkdownTableModeSchema = z.enum([
|
|
174
|
+
"off",
|
|
175
|
+
"bullets",
|
|
176
|
+
"code"
|
|
177
|
+
]);
|
|
178
|
+
const MarkdownConfigSchema = z.object({ tables: MarkdownTableModeSchema.optional() }).strict().optional();
|
|
179
|
+
const TtsProviderSchema = z.string().min(1);
|
|
180
|
+
const TtsModeSchema = z.enum(["final", "all"]);
|
|
181
|
+
const TtsAutoSchema = z.enum([
|
|
182
|
+
"off",
|
|
183
|
+
"always",
|
|
184
|
+
"inbound",
|
|
185
|
+
"tagged"
|
|
186
|
+
]);
|
|
187
|
+
const TtsConfigSchema = z.object({
|
|
188
|
+
auto: TtsAutoSchema.optional(),
|
|
189
|
+
enabled: z.boolean().optional(),
|
|
190
|
+
mode: TtsModeSchema.optional(),
|
|
191
|
+
provider: TtsProviderSchema.optional(),
|
|
192
|
+
summaryModel: z.string().optional(),
|
|
193
|
+
modelOverrides: z.object({
|
|
194
|
+
enabled: z.boolean().optional(),
|
|
195
|
+
allowText: z.boolean().optional(),
|
|
196
|
+
allowProvider: z.boolean().optional(),
|
|
197
|
+
allowVoice: z.boolean().optional(),
|
|
198
|
+
allowModelId: z.boolean().optional(),
|
|
199
|
+
allowVoiceSettings: z.boolean().optional(),
|
|
200
|
+
allowNormalization: z.boolean().optional(),
|
|
201
|
+
allowSeed: z.boolean().optional()
|
|
202
|
+
}).strict().optional(),
|
|
203
|
+
elevenlabs: z.object({
|
|
204
|
+
apiKey: z.string().optional().register(sensitive),
|
|
205
|
+
baseUrl: z.string().optional(),
|
|
206
|
+
voiceId: z.string().optional(),
|
|
207
|
+
modelId: z.string().optional(),
|
|
208
|
+
seed: z.number().int().min(0).max(4294967295).optional(),
|
|
209
|
+
applyTextNormalization: z.enum([
|
|
210
|
+
"auto",
|
|
211
|
+
"on",
|
|
212
|
+
"off"
|
|
213
|
+
]).optional(),
|
|
214
|
+
languageCode: z.string().optional(),
|
|
215
|
+
voiceSettings: z.object({
|
|
216
|
+
stability: z.number().min(0).max(1).optional(),
|
|
217
|
+
similarityBoost: z.number().min(0).max(1).optional(),
|
|
218
|
+
style: z.number().min(0).max(1).optional(),
|
|
219
|
+
useSpeakerBoost: z.boolean().optional(),
|
|
220
|
+
speed: z.number().min(.5).max(2).optional()
|
|
221
|
+
}).strict().optional()
|
|
222
|
+
}).strict().optional(),
|
|
223
|
+
openai: z.object({
|
|
224
|
+
apiKey: z.string().optional().register(sensitive),
|
|
225
|
+
model: z.string().optional(),
|
|
226
|
+
voice: z.string().optional()
|
|
227
|
+
}).strict().optional(),
|
|
228
|
+
edge: z.object({
|
|
229
|
+
enabled: z.boolean().optional(),
|
|
230
|
+
voice: z.string().optional(),
|
|
231
|
+
lang: z.string().optional(),
|
|
232
|
+
outputFormat: z.string().optional(),
|
|
233
|
+
pitch: z.string().optional(),
|
|
234
|
+
rate: z.string().optional(),
|
|
235
|
+
volume: z.string().optional(),
|
|
236
|
+
saveSubtitles: z.boolean().optional(),
|
|
237
|
+
proxy: z.string().optional(),
|
|
238
|
+
timeoutMs: z.number().int().min(1e3).max(12e4).optional()
|
|
239
|
+
}).strict().optional(),
|
|
240
|
+
prefsPath: z.string().optional(),
|
|
241
|
+
maxTextLength: z.number().int().min(1).optional(),
|
|
242
|
+
timeoutMs: z.number().int().min(1e3).max(12e4).optional()
|
|
243
|
+
}).strict().optional();
|
|
244
|
+
const HumanDelaySchema = z.object({
|
|
245
|
+
mode: z.union([
|
|
246
|
+
z.literal("off"),
|
|
247
|
+
z.literal("natural"),
|
|
248
|
+
z.literal("custom")
|
|
249
|
+
]).optional(),
|
|
250
|
+
minMs: z.number().int().nonnegative().optional(),
|
|
251
|
+
maxMs: z.number().int().nonnegative().optional()
|
|
252
|
+
}).strict();
|
|
253
|
+
const CliBackendWatchdogModeSchema = z.object({
|
|
254
|
+
noOutputTimeoutMs: z.number().int().min(1e3).optional(),
|
|
255
|
+
noOutputTimeoutRatio: z.number().min(.05).max(.95).optional(),
|
|
256
|
+
minMs: z.number().int().min(1e3).optional(),
|
|
257
|
+
maxMs: z.number().int().min(1e3).optional()
|
|
258
|
+
}).strict().optional();
|
|
259
|
+
const CliBackendSchema = z.object({
|
|
260
|
+
command: z.string(),
|
|
261
|
+
args: z.array(z.string()).optional(),
|
|
262
|
+
output: z.union([
|
|
263
|
+
z.literal("json"),
|
|
264
|
+
z.literal("text"),
|
|
265
|
+
z.literal("jsonl")
|
|
266
|
+
]).optional(),
|
|
267
|
+
resumeOutput: z.union([
|
|
268
|
+
z.literal("json"),
|
|
269
|
+
z.literal("text"),
|
|
270
|
+
z.literal("jsonl")
|
|
271
|
+
]).optional(),
|
|
272
|
+
input: z.union([z.literal("arg"), z.literal("stdin")]).optional(),
|
|
273
|
+
maxPromptArgChars: z.number().int().positive().optional(),
|
|
274
|
+
env: z.record(z.string(), z.string()).optional(),
|
|
275
|
+
clearEnv: z.array(z.string()).optional(),
|
|
276
|
+
modelArg: z.string().optional(),
|
|
277
|
+
modelAliases: z.record(z.string(), z.string()).optional(),
|
|
278
|
+
sessionArg: z.string().optional(),
|
|
279
|
+
sessionArgs: z.array(z.string()).optional(),
|
|
280
|
+
resumeArgs: z.array(z.string()).optional(),
|
|
281
|
+
sessionMode: z.union([
|
|
282
|
+
z.literal("always"),
|
|
283
|
+
z.literal("existing"),
|
|
284
|
+
z.literal("none")
|
|
285
|
+
]).optional(),
|
|
286
|
+
sessionIdFields: z.array(z.string()).optional(),
|
|
287
|
+
systemPromptArg: z.string().optional(),
|
|
288
|
+
systemPromptMode: z.union([z.literal("append"), z.literal("replace")]).optional(),
|
|
289
|
+
systemPromptWhen: z.union([
|
|
290
|
+
z.literal("first"),
|
|
291
|
+
z.literal("always"),
|
|
292
|
+
z.literal("never")
|
|
293
|
+
]).optional(),
|
|
294
|
+
imageArg: z.string().optional(),
|
|
295
|
+
imageMode: z.union([z.literal("repeat"), z.literal("list")]).optional(),
|
|
296
|
+
serialize: z.boolean().optional(),
|
|
297
|
+
reliability: z.object({ watchdog: z.object({
|
|
298
|
+
fresh: CliBackendWatchdogModeSchema,
|
|
299
|
+
resume: CliBackendWatchdogModeSchema
|
|
300
|
+
}).strict().optional() }).strict().optional()
|
|
301
|
+
}).strict();
|
|
302
|
+
const normalizeAllowFrom = (values) => (values ?? []).map((v) => String(v).trim()).filter(Boolean);
|
|
303
|
+
const requireOpenAllowFrom = (params) => {
|
|
304
|
+
if (params.policy !== "open") return;
|
|
305
|
+
if (normalizeAllowFrom(params.allowFrom).includes("*")) return;
|
|
306
|
+
params.ctx.addIssue({
|
|
307
|
+
code: z.ZodIssueCode.custom,
|
|
308
|
+
path: params.path,
|
|
309
|
+
message: params.message
|
|
310
|
+
});
|
|
311
|
+
};
|
|
312
|
+
const MSTeamsReplyStyleSchema = z.enum(["thread", "top-level"]);
|
|
313
|
+
const RetryConfigSchema = z.object({
|
|
314
|
+
attempts: z.number().int().min(1).optional(),
|
|
315
|
+
minDelayMs: z.number().int().min(0).optional(),
|
|
316
|
+
maxDelayMs: z.number().int().min(0).optional(),
|
|
317
|
+
jitter: z.number().min(0).max(1).optional()
|
|
318
|
+
}).strict().optional();
|
|
319
|
+
const QueueModeBySurfaceSchema = z.object({
|
|
320
|
+
whatsapp: QueueModeSchema.optional(),
|
|
321
|
+
telegram: QueueModeSchema.optional(),
|
|
322
|
+
discord: QueueModeSchema.optional(),
|
|
323
|
+
irc: QueueModeSchema.optional(),
|
|
324
|
+
slack: QueueModeSchema.optional(),
|
|
325
|
+
mattermost: QueueModeSchema.optional(),
|
|
326
|
+
signal: QueueModeSchema.optional(),
|
|
327
|
+
imessage: QueueModeSchema.optional(),
|
|
328
|
+
msteams: QueueModeSchema.optional(),
|
|
329
|
+
webchat: QueueModeSchema.optional()
|
|
330
|
+
}).strict().optional();
|
|
331
|
+
const DebounceMsBySurfaceSchema = z.record(z.string(), z.number().int().nonnegative()).optional();
|
|
332
|
+
const QueueSchema = z.object({
|
|
333
|
+
mode: QueueModeSchema.optional(),
|
|
334
|
+
byChannel: QueueModeBySurfaceSchema,
|
|
335
|
+
debounceMs: z.number().int().nonnegative().optional(),
|
|
336
|
+
debounceMsByChannel: DebounceMsBySurfaceSchema,
|
|
337
|
+
cap: z.number().int().positive().optional(),
|
|
338
|
+
drop: QueueDropSchema.optional()
|
|
339
|
+
}).strict().optional();
|
|
340
|
+
const InboundDebounceSchema = z.object({
|
|
341
|
+
debounceMs: z.number().int().nonnegative().optional(),
|
|
342
|
+
byChannel: DebounceMsBySurfaceSchema
|
|
343
|
+
}).strict().optional();
|
|
344
|
+
const TranscribeAudioSchema = z.object({
|
|
345
|
+
command: z.array(z.string()).superRefine((value, ctx) => {
|
|
346
|
+
const executable = value[0];
|
|
347
|
+
if (!isSafeExecutableValue(executable)) ctx.addIssue({
|
|
348
|
+
code: z.ZodIssueCode.custom,
|
|
349
|
+
path: [0],
|
|
350
|
+
message: "expected safe executable name or path"
|
|
351
|
+
});
|
|
352
|
+
}),
|
|
353
|
+
timeoutSeconds: z.number().int().positive().optional()
|
|
354
|
+
}).strict().optional();
|
|
355
|
+
const HexColorSchema = z.string().regex(/^#?[0-9a-fA-F]{6}$/, "expected hex color (RRGGBB)");
|
|
356
|
+
const ExecutableTokenSchema = z.string().refine(isSafeExecutableValue, "expected safe executable name or path");
|
|
357
|
+
const DeepgramAudioSchema = z.object({
|
|
358
|
+
detectLanguage: z.boolean().optional(),
|
|
359
|
+
punctuate: z.boolean().optional(),
|
|
360
|
+
smartFormat: z.boolean().optional()
|
|
361
|
+
}).strict().optional();
|
|
362
|
+
const ProviderOptionValueSchema = z.union([
|
|
363
|
+
z.string(),
|
|
364
|
+
z.number(),
|
|
365
|
+
z.boolean()
|
|
366
|
+
]);
|
|
367
|
+
const ProviderOptionsSchema = z.record(z.string(), z.record(z.string(), ProviderOptionValueSchema)).optional();
|
|
368
|
+
const MediaUnderstandingRuntimeFields = {
|
|
369
|
+
prompt: z.string().optional(),
|
|
370
|
+
timeoutSeconds: z.number().int().positive().optional(),
|
|
371
|
+
language: z.string().optional(),
|
|
372
|
+
providerOptions: ProviderOptionsSchema,
|
|
373
|
+
deepgram: DeepgramAudioSchema,
|
|
374
|
+
baseUrl: z.string().optional(),
|
|
375
|
+
headers: z.record(z.string(), z.string()).optional()
|
|
376
|
+
};
|
|
377
|
+
const MediaUnderstandingModelSchema = z.object({
|
|
378
|
+
provider: z.string().optional(),
|
|
379
|
+
model: z.string().optional(),
|
|
380
|
+
type: z.union([z.literal("provider"), z.literal("cli")]).optional(),
|
|
381
|
+
command: z.string().optional(),
|
|
382
|
+
args: z.array(z.string()).optional(),
|
|
383
|
+
maxChars: z.number().int().positive().optional(),
|
|
384
|
+
maxBytes: z.number().int().positive().optional(),
|
|
385
|
+
...MediaUnderstandingRuntimeFields,
|
|
386
|
+
profile: z.string().optional(),
|
|
387
|
+
preferredProfile: z.string().optional()
|
|
388
|
+
}).strict().optional();
|
|
389
|
+
const ToolsMediaUnderstandingSchema = z.object({
|
|
390
|
+
enabled: z.boolean().optional(),
|
|
391
|
+
maxBytes: z.number().int().positive().optional(),
|
|
392
|
+
maxChars: z.number().int().positive().optional(),
|
|
393
|
+
...MediaUnderstandingRuntimeFields,
|
|
394
|
+
models: z.array(MediaUnderstandingModelSchema).optional()
|
|
395
|
+
}).strict().optional();
|
|
396
|
+
const ToolsMediaSchema = z.object({ audio: ToolsMediaUnderstandingSchema.optional() }).strict().optional();
|
|
397
|
+
const NativeCommandsSettingSchema = z.union([z.boolean(), z.literal("auto")]);
|
|
398
|
+
const ProviderCommandsSchema = z.object({ native: NativeCommandsSettingSchema.optional() }).strict().optional();
|
|
399
|
+
|
|
400
|
+
//#endregion
|
|
401
|
+
//#region src/config/zod-schema.agent-runtime.ts
|
|
402
|
+
/** Auth profile ref: `false` (skip), single string, or string array (rotation). */
|
|
403
|
+
const AuthFieldSchema = z.union([
|
|
404
|
+
z.literal(false),
|
|
405
|
+
z.string(),
|
|
406
|
+
z.array(z.string())
|
|
407
|
+
]).optional();
|
|
408
|
+
const BootSchema = z.object({
|
|
409
|
+
prompt: z.string().optional(),
|
|
410
|
+
file: z.string().optional()
|
|
411
|
+
}).strict().optional();
|
|
412
|
+
const HeartbeatSchema = z.object({
|
|
413
|
+
every: z.string().optional(),
|
|
414
|
+
activeHours: z.object({
|
|
415
|
+
start: z.string().optional(),
|
|
416
|
+
end: z.string().optional(),
|
|
417
|
+
timezone: z.string().optional()
|
|
418
|
+
}).strict().optional(),
|
|
419
|
+
model: z.string().optional(),
|
|
420
|
+
session: z.string().optional(),
|
|
421
|
+
target: z.string().optional(),
|
|
422
|
+
to: z.string().optional(),
|
|
423
|
+
accountId: z.string().optional(),
|
|
424
|
+
prompt: z.string().optional(),
|
|
425
|
+
file: z.string().optional(),
|
|
426
|
+
suppressToolErrorWarnings: z.boolean().optional()
|
|
427
|
+
}).strict().superRefine((val, ctx) => {
|
|
428
|
+
if (!val.every) return;
|
|
429
|
+
try {
|
|
430
|
+
parseDurationMs(val.every, { defaultUnit: "m" });
|
|
431
|
+
} catch {
|
|
432
|
+
ctx.addIssue({
|
|
433
|
+
code: z.ZodIssueCode.custom,
|
|
434
|
+
path: ["every"],
|
|
435
|
+
message: "invalid duration (use ms, s, m, h)"
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
const active = val.activeHours;
|
|
439
|
+
if (!active) return;
|
|
440
|
+
const timePattern = /^([01]\d|2[0-3]|24):([0-5]\d)$/;
|
|
441
|
+
const validateTime = (raw, opts, path) => {
|
|
442
|
+
if (!raw) return;
|
|
443
|
+
if (!timePattern.test(raw)) {
|
|
444
|
+
ctx.addIssue({
|
|
445
|
+
code: z.ZodIssueCode.custom,
|
|
446
|
+
path: ["activeHours", path],
|
|
447
|
+
message: "invalid time (use \"HH:MM\" 24h format)"
|
|
448
|
+
});
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
const [hourStr, minuteStr] = raw.split(":");
|
|
452
|
+
const hour = Number(hourStr);
|
|
453
|
+
if (hour === 24 && Number(minuteStr) !== 0) {
|
|
454
|
+
ctx.addIssue({
|
|
455
|
+
code: z.ZodIssueCode.custom,
|
|
456
|
+
path: ["activeHours", path],
|
|
457
|
+
message: "invalid time (24:00 is the only allowed 24:xx value)"
|
|
458
|
+
});
|
|
459
|
+
return;
|
|
460
|
+
}
|
|
461
|
+
if (hour === 24 && !opts.allow24) ctx.addIssue({
|
|
462
|
+
code: z.ZodIssueCode.custom,
|
|
463
|
+
path: ["activeHours", path],
|
|
464
|
+
message: "invalid time (start cannot be 24:00)"
|
|
465
|
+
});
|
|
466
|
+
};
|
|
467
|
+
validateTime(active.start, { allow24: false }, "start");
|
|
468
|
+
validateTime(active.end, { allow24: true }, "end");
|
|
469
|
+
}).optional();
|
|
470
|
+
const ToolPolicyBaseSchema = z.object({
|
|
471
|
+
allow: z.array(z.string()).optional(),
|
|
472
|
+
alsoAllow: z.array(z.string()).optional(),
|
|
473
|
+
deny: z.array(z.string()).optional()
|
|
474
|
+
}).strict();
|
|
475
|
+
const ToolPolicySchema = ToolPolicyBaseSchema.superRefine((value, ctx) => {
|
|
476
|
+
if (value.allow && value.allow.length > 0 && value.alsoAllow && value.alsoAllow.length > 0) ctx.addIssue({
|
|
477
|
+
code: z.ZodIssueCode.custom,
|
|
478
|
+
message: "tools policy cannot set both allow and alsoAllow in the same scope (merge alsoAllow into allow, or remove allow and use profile + alsoAllow)"
|
|
479
|
+
});
|
|
480
|
+
}).optional();
|
|
481
|
+
const ToolProfileSchema = z.union([
|
|
482
|
+
z.literal("minimal"),
|
|
483
|
+
z.literal("coding"),
|
|
484
|
+
z.literal("messaging"),
|
|
485
|
+
z.literal("full")
|
|
486
|
+
]).optional();
|
|
487
|
+
function addAllowAlsoAllowConflictIssue(value, ctx, message) {
|
|
488
|
+
if (value.allow && value.allow.length > 0 && value.alsoAllow && value.alsoAllow.length > 0) ctx.addIssue({
|
|
489
|
+
code: z.ZodIssueCode.custom,
|
|
490
|
+
message
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
const ToolPolicyWithProfileSchema = z.object({
|
|
494
|
+
allow: z.array(z.string()).optional(),
|
|
495
|
+
alsoAllow: z.array(z.string()).optional(),
|
|
496
|
+
deny: z.array(z.string()).optional(),
|
|
497
|
+
profile: ToolProfileSchema
|
|
498
|
+
}).strict().superRefine((value, ctx) => {
|
|
499
|
+
addAllowAlsoAllowConflictIssue(value, ctx, "tools.byProvider policy cannot set both allow and alsoAllow in the same scope (merge alsoAllow into allow, or remove allow and use profile + alsoAllow)");
|
|
500
|
+
});
|
|
501
|
+
const ToolExecSafeBinProfileSchema = z.object({
|
|
502
|
+
minPositional: z.number().int().nonnegative().optional(),
|
|
503
|
+
maxPositional: z.number().int().nonnegative().optional(),
|
|
504
|
+
allowedValueFlags: z.array(z.string()).optional(),
|
|
505
|
+
deniedFlags: z.array(z.string()).optional()
|
|
506
|
+
}).strict();
|
|
507
|
+
const ToolExecBaseShape = {
|
|
508
|
+
host: z.enum([
|
|
509
|
+
"sandbox",
|
|
510
|
+
"gateway",
|
|
511
|
+
"node"
|
|
512
|
+
]).optional(),
|
|
513
|
+
security: z.enum([
|
|
514
|
+
"deny",
|
|
515
|
+
"allowlist",
|
|
516
|
+
"full"
|
|
517
|
+
]).optional(),
|
|
518
|
+
ask: z.enum([
|
|
519
|
+
"off",
|
|
520
|
+
"on-miss",
|
|
521
|
+
"always"
|
|
522
|
+
]).optional(),
|
|
523
|
+
node: z.string().optional(),
|
|
524
|
+
pathPrepend: z.array(z.string()).optional(),
|
|
525
|
+
safeBins: z.array(z.string()).optional(),
|
|
526
|
+
safeBinTrustedDirs: z.array(z.string()).optional(),
|
|
527
|
+
safeBinProfiles: z.record(z.string(), ToolExecSafeBinProfileSchema).optional(),
|
|
528
|
+
backgroundMs: z.number().int().positive().optional(),
|
|
529
|
+
timeoutSec: z.number().int().positive().optional(),
|
|
530
|
+
cleanupMs: z.number().int().positive().optional(),
|
|
531
|
+
notifyOnExit: z.boolean().optional(),
|
|
532
|
+
notifyOnExitEmptySuccess: z.boolean().optional()
|
|
533
|
+
};
|
|
534
|
+
const AgentToolExecSchema = z.object({
|
|
535
|
+
...ToolExecBaseShape,
|
|
536
|
+
approvalRunningNoticeMs: z.number().int().nonnegative().optional()
|
|
537
|
+
}).strict().optional();
|
|
538
|
+
const ToolExecSchema = z.object(ToolExecBaseShape).strict().optional();
|
|
539
|
+
const ToolFsSchema = z.object({ workspaceOnly: z.boolean().optional() }).strict().optional();
|
|
540
|
+
const CommonToolPolicyFields = {
|
|
541
|
+
profile: ToolProfileSchema,
|
|
542
|
+
allow: z.array(z.string()).optional(),
|
|
543
|
+
alsoAllow: z.array(z.string()).optional(),
|
|
544
|
+
deny: z.array(z.string()).optional(),
|
|
545
|
+
byProvider: z.record(z.string(), ToolPolicyWithProfileSchema).optional()
|
|
546
|
+
};
|
|
547
|
+
const AgentToolsSchema = z.object({
|
|
548
|
+
...CommonToolPolicyFields,
|
|
549
|
+
exec: AgentToolExecSchema,
|
|
550
|
+
fs: ToolFsSchema
|
|
551
|
+
}).strict().superRefine((value, ctx) => {
|
|
552
|
+
addAllowAlsoAllowConflictIssue(value, ctx, "agent tools cannot set both allow and alsoAllow in the same scope (merge alsoAllow into allow, or remove allow and use profile + alsoAllow)");
|
|
553
|
+
}).optional();
|
|
554
|
+
const AgentEntrySchema = z.object({
|
|
555
|
+
id: z.string(),
|
|
556
|
+
default: z.boolean().optional(),
|
|
557
|
+
name: z.string().optional(),
|
|
558
|
+
workspace: z.string().optional(),
|
|
559
|
+
agentDir: z.string().optional(),
|
|
560
|
+
humanDelay: HumanDelaySchema.optional(),
|
|
561
|
+
heartbeat: HeartbeatSchema,
|
|
562
|
+
boot: BootSchema,
|
|
563
|
+
identity: IdentitySchema,
|
|
564
|
+
groupChat: GroupChatSchema,
|
|
565
|
+
subagents: z.object({ allowAgents: z.array(z.string()).optional() }).strict().optional(),
|
|
566
|
+
editableFiles: z.array(z.string()).optional(),
|
|
567
|
+
tools: AgentToolsSchema,
|
|
568
|
+
auth: AuthFieldSchema,
|
|
569
|
+
runtime: z.union([
|
|
570
|
+
z.literal("claude"),
|
|
571
|
+
z.literal("gemini"),
|
|
572
|
+
z.literal("codex"),
|
|
573
|
+
z.literal("opencode")
|
|
574
|
+
]).optional(),
|
|
575
|
+
runtimeArgs: z.array(z.string()).optional(),
|
|
576
|
+
runtimeEnv: z.record(z.string(), z.string()).optional()
|
|
577
|
+
}).strict();
|
|
578
|
+
const ToolsSchema = z.object({
|
|
579
|
+
...CommonToolPolicyFields,
|
|
580
|
+
media: ToolsMediaSchema,
|
|
581
|
+
sessions: z.object({ visibility: z.enum([
|
|
582
|
+
"self",
|
|
583
|
+
"tree",
|
|
584
|
+
"agent",
|
|
585
|
+
"all"
|
|
586
|
+
]).optional() }).strict().optional(),
|
|
587
|
+
message: z.object({
|
|
588
|
+
allowCrossContextSend: z.boolean().optional(),
|
|
589
|
+
crossContext: z.object({
|
|
590
|
+
allowWithinProvider: z.boolean().optional(),
|
|
591
|
+
allowAcrossProviders: z.boolean().optional(),
|
|
592
|
+
marker: z.object({
|
|
593
|
+
enabled: z.boolean().optional(),
|
|
594
|
+
prefix: z.string().optional(),
|
|
595
|
+
suffix: z.string().optional()
|
|
596
|
+
}).strict().optional()
|
|
597
|
+
}).strict().optional(),
|
|
598
|
+
broadcast: z.object({ enabled: z.boolean().optional() }).strict().optional()
|
|
599
|
+
}).strict().optional(),
|
|
600
|
+
agentToAgent: z.object({
|
|
601
|
+
enabled: z.boolean().optional(),
|
|
602
|
+
allow: z.array(z.string()).optional()
|
|
603
|
+
}).strict().optional(),
|
|
604
|
+
exec: ToolExecSchema,
|
|
605
|
+
fs: ToolFsSchema,
|
|
606
|
+
subagents: z.object({ tools: ToolPolicySchema }).strict().optional()
|
|
607
|
+
}).strict().superRefine((value, ctx) => {
|
|
608
|
+
addAllowAlsoAllowConflictIssue(value, ctx, "tools cannot set both allow and alsoAllow in the same scope (merge alsoAllow into allow, or remove allow and use profile + alsoAllow)");
|
|
609
|
+
}).optional();
|
|
610
|
+
|
|
611
|
+
//#endregion
|
|
612
|
+
//#region src/config/zod-schema.agent-defaults.ts
|
|
613
|
+
const AgentDefaultsSchema = z.object({
|
|
614
|
+
imageModel: z.unknown().optional(),
|
|
615
|
+
models: z.unknown().optional(),
|
|
616
|
+
workspace: z.string().optional(),
|
|
617
|
+
repoRoot: z.string().optional(),
|
|
618
|
+
userTimezone: z.string().optional(),
|
|
619
|
+
timeFormat: z.union([
|
|
620
|
+
z.literal("auto"),
|
|
621
|
+
z.literal("12"),
|
|
622
|
+
z.literal("24")
|
|
623
|
+
]).optional(),
|
|
624
|
+
envelopeTimezone: z.string().optional(),
|
|
625
|
+
envelopeTimestamp: z.union([z.literal("on"), z.literal("off")]).optional(),
|
|
626
|
+
envelopeElapsed: z.union([z.literal("on"), z.literal("off")]).optional(),
|
|
627
|
+
contextTokens: z.number().int().positive().optional(),
|
|
628
|
+
cliBackends: z.unknown().optional(),
|
|
629
|
+
contextPruning: z.object({
|
|
630
|
+
mode: z.union([z.literal("off"), z.literal("cache-ttl")]).optional(),
|
|
631
|
+
ttl: z.string().optional(),
|
|
632
|
+
keepLastAssistants: z.number().int().nonnegative().optional(),
|
|
633
|
+
softTrimRatio: z.number().min(0).max(1).optional(),
|
|
634
|
+
hardClearRatio: z.number().min(0).max(1).optional(),
|
|
635
|
+
minPrunableToolChars: z.number().int().nonnegative().optional(),
|
|
636
|
+
tools: z.object({
|
|
637
|
+
allow: z.array(z.string()).optional(),
|
|
638
|
+
deny: z.array(z.string()).optional()
|
|
639
|
+
}).strict().optional(),
|
|
640
|
+
softTrim: z.object({
|
|
641
|
+
maxChars: z.number().int().nonnegative().optional(),
|
|
642
|
+
headChars: z.number().int().nonnegative().optional(),
|
|
643
|
+
tailChars: z.number().int().nonnegative().optional()
|
|
644
|
+
}).strict().optional(),
|
|
645
|
+
hardClear: z.object({
|
|
646
|
+
enabled: z.boolean().optional(),
|
|
647
|
+
placeholder: z.string().optional()
|
|
648
|
+
}).strict().optional()
|
|
649
|
+
}).strict().optional(),
|
|
650
|
+
verboseDefault: z.union([
|
|
651
|
+
z.literal("off"),
|
|
652
|
+
z.literal("on"),
|
|
653
|
+
z.literal("full")
|
|
654
|
+
]).optional(),
|
|
655
|
+
blockStreamingDefault: z.union([z.literal("off"), z.literal("on")]).optional(),
|
|
656
|
+
blockStreamingBreak: z.union([z.literal("text_end"), z.literal("message_end")]).optional(),
|
|
657
|
+
blockStreamingChunk: BlockStreamingChunkSchema.optional(),
|
|
658
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
659
|
+
humanDelay: HumanDelaySchema.optional(),
|
|
660
|
+
timeoutSeconds: z.number().int().positive().optional(),
|
|
661
|
+
mediaMaxMb: z.number().positive().optional(),
|
|
662
|
+
imageMaxDimensionPx: z.number().int().positive().optional(),
|
|
663
|
+
typingIntervalSeconds: z.number().int().positive().optional(),
|
|
664
|
+
typingMode: TypingModeSchema.optional(),
|
|
665
|
+
heartbeat: HeartbeatSchema,
|
|
666
|
+
boot: BootSchema,
|
|
667
|
+
maxConcurrent: z.number().int().positive().optional(),
|
|
668
|
+
subagents: z.object({
|
|
669
|
+
maxConcurrent: z.number().int().positive().optional(),
|
|
670
|
+
maxSpawnDepth: z.number().int().min(1).max(5).optional().describe("Maximum nesting depth for sub-agent spawning. 1 = no nesting (default), 2 = sub-agents can spawn sub-sub-agents."),
|
|
671
|
+
maxChildrenPerAgent: z.number().int().min(1).max(20).optional().describe("Maximum number of active children a single agent session can spawn (default: 5)."),
|
|
672
|
+
archiveAfterMinutes: z.number().int().positive().optional(),
|
|
673
|
+
runTimeoutSeconds: z.number().int().min(0).optional(),
|
|
674
|
+
announceTimeoutMs: z.number().int().positive().optional()
|
|
675
|
+
}).strict().optional(),
|
|
676
|
+
editableFiles: z.array(z.string()).optional(),
|
|
677
|
+
sandbox: z.unknown().optional(),
|
|
678
|
+
runtime: z.union([
|
|
679
|
+
z.literal("claude"),
|
|
680
|
+
z.literal("gemini"),
|
|
681
|
+
z.literal("codex"),
|
|
682
|
+
z.literal("opencode")
|
|
683
|
+
]).optional(),
|
|
684
|
+
runtimeArgs: z.array(z.string()).optional(),
|
|
685
|
+
runtimeEnv: z.record(z.string(), z.string()).optional(),
|
|
686
|
+
auth: AuthFieldSchema
|
|
687
|
+
}).strict().optional();
|
|
688
|
+
|
|
689
|
+
//#endregion
|
|
690
|
+
//#region src/config/zod-schema.agents.ts
|
|
691
|
+
const AgentsSchema = z.object({
|
|
692
|
+
defaults: z.lazy(() => AgentDefaultsSchema).optional(),
|
|
693
|
+
list: z.array(AgentEntrySchema).optional()
|
|
694
|
+
}).strict().optional();
|
|
695
|
+
const BindingsSchema = z.array(z.object({
|
|
696
|
+
agentId: z.string(),
|
|
697
|
+
comment: z.string().optional(),
|
|
698
|
+
match: z.object({
|
|
699
|
+
channel: z.string(),
|
|
700
|
+
accountId: z.string().optional(),
|
|
701
|
+
peer: z.object({
|
|
702
|
+
kind: z.union([
|
|
703
|
+
z.literal("direct"),
|
|
704
|
+
z.literal("group"),
|
|
705
|
+
z.literal("channel"),
|
|
706
|
+
z.literal("dm")
|
|
707
|
+
]),
|
|
708
|
+
id: z.string()
|
|
709
|
+
}).strict().optional(),
|
|
710
|
+
guildId: z.string().optional(),
|
|
711
|
+
teamId: z.string().optional(),
|
|
712
|
+
roles: z.array(z.string()).optional()
|
|
713
|
+
}).strict()
|
|
714
|
+
}).strict()).optional();
|
|
715
|
+
const BroadcastStrategySchema = z.enum(["parallel", "sequential"]);
|
|
716
|
+
const BroadcastSchema = z.object({ strategy: BroadcastStrategySchema.optional() }).catchall(z.array(z.string())).optional();
|
|
717
|
+
const AudioSchema = z.object({ transcription: TranscribeAudioSchema }).strict().optional();
|
|
718
|
+
|
|
719
|
+
//#endregion
|
|
720
|
+
//#region src/config/zod-schema.approvals.ts
|
|
721
|
+
const ExecApprovalForwardTargetSchema = z.object({
|
|
722
|
+
channel: z.string().min(1),
|
|
723
|
+
to: z.string().min(1),
|
|
724
|
+
accountId: z.string().optional(),
|
|
725
|
+
threadId: z.union([z.string(), z.number()]).optional()
|
|
726
|
+
}).strict();
|
|
727
|
+
const ExecApprovalForwardingSchema = z.object({
|
|
728
|
+
enabled: z.boolean().optional(),
|
|
729
|
+
mode: z.union([
|
|
730
|
+
z.literal("session"),
|
|
731
|
+
z.literal("targets"),
|
|
732
|
+
z.literal("both")
|
|
733
|
+
]).optional(),
|
|
734
|
+
agentFilter: z.array(z.string()).optional(),
|
|
735
|
+
sessionFilter: z.array(z.string()).optional(),
|
|
736
|
+
targets: z.array(ExecApprovalForwardTargetSchema).optional()
|
|
737
|
+
}).strict().optional();
|
|
738
|
+
const ApprovalsSchema = z.object({ exec: ExecApprovalForwardingSchema }).strict().optional();
|
|
739
|
+
|
|
740
|
+
//#endregion
|
|
741
|
+
//#region src/config/zod-schema.installs.ts
|
|
742
|
+
const InstallSourceSchema = z.union([
|
|
743
|
+
z.literal("npm"),
|
|
744
|
+
z.literal("archive"),
|
|
745
|
+
z.literal("path")
|
|
746
|
+
]);
|
|
747
|
+
const InstallRecordShape = {
|
|
748
|
+
source: InstallSourceSchema,
|
|
749
|
+
spec: z.string().optional(),
|
|
750
|
+
sourcePath: z.string().optional(),
|
|
751
|
+
installPath: z.string().optional(),
|
|
752
|
+
version: z.string().optional(),
|
|
753
|
+
resolvedName: z.string().optional(),
|
|
754
|
+
resolvedVersion: z.string().optional(),
|
|
755
|
+
resolvedSpec: z.string().optional(),
|
|
756
|
+
integrity: z.string().optional(),
|
|
757
|
+
shasum: z.string().optional(),
|
|
758
|
+
resolvedAt: z.string().optional(),
|
|
759
|
+
installedAt: z.string().optional()
|
|
760
|
+
};
|
|
761
|
+
|
|
762
|
+
//#endregion
|
|
763
|
+
//#region src/config/zod-schema.hooks.ts
|
|
764
|
+
function isSafeRelativeModulePath(raw) {
|
|
765
|
+
const value = raw.trim();
|
|
766
|
+
if (!value) return false;
|
|
767
|
+
if (path.isAbsolute(value)) return false;
|
|
768
|
+
if (value.startsWith("~")) return false;
|
|
769
|
+
if (value.includes(":")) return false;
|
|
770
|
+
if (value.split(/[\\/]+/g).some((part) => part === "..")) return false;
|
|
771
|
+
return true;
|
|
772
|
+
}
|
|
773
|
+
const SafeRelativeModulePathSchema = z.string().refine(isSafeRelativeModulePath, "module must be a safe relative path (no absolute paths)");
|
|
774
|
+
const HookMappingSchema = z.object({
|
|
775
|
+
id: z.string().optional(),
|
|
776
|
+
match: z.object({
|
|
777
|
+
path: z.string().optional(),
|
|
778
|
+
source: z.string().optional()
|
|
779
|
+
}).optional(),
|
|
780
|
+
action: z.union([z.literal("wake"), z.literal("agent")]).optional(),
|
|
781
|
+
wakeMode: z.union([z.literal("now"), z.literal("next-heartbeat")]).optional(),
|
|
782
|
+
name: z.string().optional(),
|
|
783
|
+
agentId: z.string().optional(),
|
|
784
|
+
sessionKey: z.string().optional().register(sensitive),
|
|
785
|
+
messageTemplate: z.string().optional(),
|
|
786
|
+
textTemplate: z.string().optional(),
|
|
787
|
+
deliver: z.boolean().optional(),
|
|
788
|
+
allowUnsafeExternalContent: z.boolean().optional(),
|
|
789
|
+
channel: z.union([
|
|
790
|
+
z.literal("last"),
|
|
791
|
+
z.literal("whatsapp"),
|
|
792
|
+
z.literal("telegram"),
|
|
793
|
+
z.literal("discord"),
|
|
794
|
+
z.literal("irc"),
|
|
795
|
+
z.literal("slack"),
|
|
796
|
+
z.literal("signal"),
|
|
797
|
+
z.literal("imessage"),
|
|
798
|
+
z.literal("msteams")
|
|
799
|
+
]).optional(),
|
|
800
|
+
to: z.string().optional(),
|
|
801
|
+
model: z.string().optional(),
|
|
802
|
+
thinking: z.string().optional(),
|
|
803
|
+
timeoutSeconds: z.number().int().positive().optional(),
|
|
804
|
+
transform: z.object({
|
|
805
|
+
module: SafeRelativeModulePathSchema,
|
|
806
|
+
export: z.string().optional()
|
|
807
|
+
}).strict().optional()
|
|
808
|
+
}).strict().optional();
|
|
809
|
+
const InternalHookHandlerSchema = z.object({
|
|
810
|
+
event: z.string(),
|
|
811
|
+
module: SafeRelativeModulePathSchema,
|
|
812
|
+
export: z.string().optional()
|
|
813
|
+
}).strict();
|
|
814
|
+
const HookConfigSchema = z.object({
|
|
815
|
+
enabled: z.boolean().optional(),
|
|
816
|
+
env: z.record(z.string(), z.string()).optional()
|
|
817
|
+
}).passthrough();
|
|
818
|
+
const HookInstallRecordSchema = z.object({
|
|
819
|
+
...InstallRecordShape,
|
|
820
|
+
hooks: z.array(z.string()).optional()
|
|
821
|
+
}).strict();
|
|
822
|
+
const InternalHooksSchema = z.object({
|
|
823
|
+
enabled: z.boolean().optional(),
|
|
824
|
+
handlers: z.array(InternalHookHandlerSchema).optional(),
|
|
825
|
+
entries: z.record(z.string(), HookConfigSchema).optional(),
|
|
826
|
+
load: z.object({ extraDirs: z.array(z.string()).optional() }).strict().optional(),
|
|
827
|
+
installs: z.record(z.string(), HookInstallRecordSchema).optional()
|
|
828
|
+
}).strict().optional();
|
|
829
|
+
const HooksGmailSchema = z.object({
|
|
830
|
+
account: z.string().optional(),
|
|
831
|
+
label: z.string().optional(),
|
|
832
|
+
topic: z.string().optional(),
|
|
833
|
+
subscription: z.string().optional(),
|
|
834
|
+
pushToken: z.string().optional().register(sensitive),
|
|
835
|
+
hookUrl: z.string().optional(),
|
|
836
|
+
includeBody: z.boolean().optional(),
|
|
837
|
+
maxBytes: z.number().int().positive().optional(),
|
|
838
|
+
renewEveryMinutes: z.number().int().positive().optional(),
|
|
839
|
+
allowUnsafeExternalContent: z.boolean().optional(),
|
|
840
|
+
serve: z.object({
|
|
841
|
+
bind: z.string().optional(),
|
|
842
|
+
port: z.number().int().positive().optional(),
|
|
843
|
+
path: z.string().optional()
|
|
844
|
+
}).strict().optional(),
|
|
845
|
+
tailscale: z.object({
|
|
846
|
+
mode: z.union([
|
|
847
|
+
z.literal("off"),
|
|
848
|
+
z.literal("serve"),
|
|
849
|
+
z.literal("funnel")
|
|
850
|
+
]).optional(),
|
|
851
|
+
path: z.string().optional(),
|
|
852
|
+
target: z.string().optional()
|
|
853
|
+
}).strict().optional(),
|
|
854
|
+
model: z.string().optional(),
|
|
855
|
+
thinking: z.union([
|
|
856
|
+
z.literal("off"),
|
|
857
|
+
z.literal("minimal"),
|
|
858
|
+
z.literal("low"),
|
|
859
|
+
z.literal("medium"),
|
|
860
|
+
z.literal("high")
|
|
861
|
+
]).optional()
|
|
862
|
+
}).strict().optional();
|
|
863
|
+
|
|
864
|
+
//#endregion
|
|
865
|
+
//#region src/config/zod-schema.channels.ts
|
|
866
|
+
const ChannelHeartbeatVisibilitySchema = z.object({
|
|
867
|
+
showOk: z.boolean().optional(),
|
|
868
|
+
showAlerts: z.boolean().optional(),
|
|
869
|
+
useIndicator: z.boolean().optional()
|
|
870
|
+
}).strict().optional();
|
|
871
|
+
|
|
872
|
+
//#endregion
|
|
873
|
+
//#region src/infra/scp-host.ts
|
|
874
|
+
const SSH_TOKEN = /^[A-Za-z0-9._-]+$/;
|
|
875
|
+
const BRACKETED_IPV6 = /^\[[0-9A-Fa-f:.%]+\]$/;
|
|
876
|
+
const WHITESPACE = /\s/;
|
|
877
|
+
function hasControlOrWhitespace(value) {
|
|
878
|
+
for (const char of value) {
|
|
879
|
+
const code = char.charCodeAt(0);
|
|
880
|
+
if (code <= 31 || code === 127 || WHITESPACE.test(char)) return true;
|
|
881
|
+
}
|
|
882
|
+
return false;
|
|
883
|
+
}
|
|
884
|
+
function normalizeScpRemoteHost(value) {
|
|
885
|
+
if (typeof value !== "string") return;
|
|
886
|
+
const trimmed = value.trim();
|
|
887
|
+
if (!trimmed) return;
|
|
888
|
+
if (hasControlOrWhitespace(trimmed)) return;
|
|
889
|
+
if (trimmed.startsWith("-") || trimmed.includes("/") || trimmed.includes("\\")) return;
|
|
890
|
+
const firstAt = trimmed.indexOf("@");
|
|
891
|
+
const lastAt = trimmed.lastIndexOf("@");
|
|
892
|
+
let user;
|
|
893
|
+
let host = trimmed;
|
|
894
|
+
if (firstAt !== -1) {
|
|
895
|
+
if (firstAt !== lastAt || firstAt === 0 || firstAt === trimmed.length - 1) return;
|
|
896
|
+
user = trimmed.slice(0, firstAt);
|
|
897
|
+
host = trimmed.slice(firstAt + 1);
|
|
898
|
+
if (!SSH_TOKEN.test(user)) return;
|
|
899
|
+
}
|
|
900
|
+
if (!host || host.startsWith("-") || host.includes("@")) return;
|
|
901
|
+
if (host.includes(":") && !BRACKETED_IPV6.test(host)) return;
|
|
902
|
+
if (!SSH_TOKEN.test(host) && !BRACKETED_IPV6.test(host)) return;
|
|
903
|
+
return user ? `${user}@${host}` : host;
|
|
904
|
+
}
|
|
905
|
+
function isSafeScpRemoteHost(value) {
|
|
906
|
+
return normalizeScpRemoteHost(value) !== void 0;
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
//#endregion
|
|
910
|
+
//#region src/media/inbound-path-policy.ts
|
|
911
|
+
const WILDCARD_SEGMENT = "*";
|
|
912
|
+
const WINDOWS_DRIVE_ABS_RE = /^[A-Za-z]:\//;
|
|
913
|
+
const WINDOWS_DRIVE_ROOT_RE = /^[A-Za-z]:$/;
|
|
914
|
+
const DEFAULT_IMESSAGE_ATTACHMENT_ROOTS = ["/Users/*/Library/Messages/Attachments"];
|
|
915
|
+
function normalizePosixAbsolutePath(value) {
|
|
916
|
+
const trimmed = value.trim();
|
|
917
|
+
if (!trimmed || trimmed.includes("\0")) return;
|
|
918
|
+
const normalized = path.posix.normalize(trimmed.replaceAll("\\", "/"));
|
|
919
|
+
if (!(normalized.startsWith("/") || WINDOWS_DRIVE_ABS_RE.test(normalized)) || normalized === "/") return;
|
|
920
|
+
const withoutTrailingSlash = normalized.endsWith("/") ? normalized.slice(0, -1) : normalized;
|
|
921
|
+
if (WINDOWS_DRIVE_ROOT_RE.test(withoutTrailingSlash)) return;
|
|
922
|
+
return withoutTrailingSlash;
|
|
923
|
+
}
|
|
924
|
+
function splitPathSegments(value) {
|
|
925
|
+
return value.split("/").filter(Boolean);
|
|
926
|
+
}
|
|
927
|
+
function matchesRootPattern(params) {
|
|
928
|
+
const candidateSegments = splitPathSegments(params.candidatePath);
|
|
929
|
+
const rootSegments = splitPathSegments(params.rootPattern);
|
|
930
|
+
if (candidateSegments.length < rootSegments.length) return false;
|
|
931
|
+
for (let idx = 0; idx < rootSegments.length; idx += 1) {
|
|
932
|
+
const expected = rootSegments[idx];
|
|
933
|
+
const actual = candidateSegments[idx];
|
|
934
|
+
if (expected === WILDCARD_SEGMENT) continue;
|
|
935
|
+
if (expected !== actual) return false;
|
|
936
|
+
}
|
|
937
|
+
return true;
|
|
938
|
+
}
|
|
939
|
+
function isValidInboundPathRootPattern(value) {
|
|
940
|
+
const normalized = normalizePosixAbsolutePath(value);
|
|
941
|
+
if (!normalized) return false;
|
|
942
|
+
const segments = splitPathSegments(normalized);
|
|
943
|
+
if (segments.length === 0) return false;
|
|
944
|
+
return segments.every((segment) => segment === WILDCARD_SEGMENT || !segment.includes("*"));
|
|
945
|
+
}
|
|
946
|
+
function normalizeInboundPathRoots(roots) {
|
|
947
|
+
const normalized = [];
|
|
948
|
+
const seen = /* @__PURE__ */ new Set();
|
|
949
|
+
for (const root of roots ?? []) {
|
|
950
|
+
if (typeof root !== "string") continue;
|
|
951
|
+
if (!isValidInboundPathRootPattern(root)) continue;
|
|
952
|
+
const candidate = normalizePosixAbsolutePath(root);
|
|
953
|
+
if (!candidate || seen.has(candidate)) continue;
|
|
954
|
+
seen.add(candidate);
|
|
955
|
+
normalized.push(candidate);
|
|
956
|
+
}
|
|
957
|
+
return normalized;
|
|
958
|
+
}
|
|
959
|
+
function mergeInboundPathRoots(...rootsLists) {
|
|
960
|
+
const merged = [];
|
|
961
|
+
const seen = /* @__PURE__ */ new Set();
|
|
962
|
+
for (const roots of rootsLists) {
|
|
963
|
+
const normalized = normalizeInboundPathRoots(roots);
|
|
964
|
+
for (const root of normalized) {
|
|
965
|
+
if (seen.has(root)) continue;
|
|
966
|
+
seen.add(root);
|
|
967
|
+
merged.push(root);
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
return merged;
|
|
971
|
+
}
|
|
972
|
+
function isInboundPathAllowed(params) {
|
|
973
|
+
const candidatePath = normalizePosixAbsolutePath(params.filePath);
|
|
974
|
+
if (!candidatePath) return false;
|
|
975
|
+
const roots = normalizeInboundPathRoots(params.roots);
|
|
976
|
+
const effectiveRoots = roots.length > 0 ? roots : normalizeInboundPathRoots(params.fallbackRoots ?? void 0);
|
|
977
|
+
if (effectiveRoots.length === 0) return false;
|
|
978
|
+
return effectiveRoots.some((rootPattern) => matchesRootPattern({
|
|
979
|
+
candidatePath,
|
|
980
|
+
rootPattern
|
|
981
|
+
}));
|
|
982
|
+
}
|
|
983
|
+
function resolveIMessageAccountConfig(params) {
|
|
984
|
+
const accountId = params.accountId?.trim();
|
|
985
|
+
if (!accountId) return;
|
|
986
|
+
return params.cfg.channels?.imessage?.accounts?.[accountId];
|
|
987
|
+
}
|
|
988
|
+
function resolveIMessageAttachmentRoots(params) {
|
|
989
|
+
return mergeInboundPathRoots(resolveIMessageAccountConfig(params)?.attachmentRoots, params.cfg.channels?.imessage?.attachmentRoots, DEFAULT_IMESSAGE_ATTACHMENT_ROOTS);
|
|
990
|
+
}
|
|
991
|
+
function resolveIMessageRemoteAttachmentRoots(params) {
|
|
992
|
+
const accountConfig = resolveIMessageAccountConfig(params);
|
|
993
|
+
return mergeInboundPathRoots(accountConfig?.remoteAttachmentRoots, params.cfg.channels?.imessage?.remoteAttachmentRoots, accountConfig?.attachmentRoots, params.cfg.channels?.imessage?.attachmentRoots, DEFAULT_IMESSAGE_ATTACHMENT_ROOTS);
|
|
994
|
+
}
|
|
995
|
+
|
|
996
|
+
//#endregion
|
|
997
|
+
//#region src/config/discord-preview-streaming.ts
|
|
998
|
+
function normalizeStreamingMode(value) {
|
|
999
|
+
if (typeof value !== "string") return null;
|
|
1000
|
+
return value.trim().toLowerCase() || null;
|
|
1001
|
+
}
|
|
1002
|
+
function parseStreamingMode(value) {
|
|
1003
|
+
const normalized = normalizeStreamingMode(value);
|
|
1004
|
+
if (normalized === "off" || normalized === "partial" || normalized === "block" || normalized === "progress") return normalized;
|
|
1005
|
+
return null;
|
|
1006
|
+
}
|
|
1007
|
+
function parseDiscordPreviewStreamMode(value) {
|
|
1008
|
+
const parsed = parseStreamingMode(value);
|
|
1009
|
+
if (!parsed) return null;
|
|
1010
|
+
return parsed === "progress" ? "partial" : parsed;
|
|
1011
|
+
}
|
|
1012
|
+
function parseSlackLegacyDraftStreamMode(value) {
|
|
1013
|
+
const normalized = normalizeStreamingMode(value);
|
|
1014
|
+
if (normalized === "replace" || normalized === "status_final" || normalized === "append") return normalized;
|
|
1015
|
+
return null;
|
|
1016
|
+
}
|
|
1017
|
+
function mapSlackLegacyDraftStreamModeToStreaming(mode) {
|
|
1018
|
+
if (mode === "append") return "block";
|
|
1019
|
+
if (mode === "status_final") return "progress";
|
|
1020
|
+
return "partial";
|
|
1021
|
+
}
|
|
1022
|
+
function mapStreamingModeToSlackLegacyDraftStreamMode(mode) {
|
|
1023
|
+
if (mode === "block") return "append";
|
|
1024
|
+
if (mode === "progress") return "status_final";
|
|
1025
|
+
return "replace";
|
|
1026
|
+
}
|
|
1027
|
+
function resolveTelegramPreviewStreamMode(params = {}) {
|
|
1028
|
+
const parsedStreaming = parseStreamingMode(params.streaming);
|
|
1029
|
+
if (parsedStreaming) {
|
|
1030
|
+
if (parsedStreaming === "progress") return "partial";
|
|
1031
|
+
return parsedStreaming;
|
|
1032
|
+
}
|
|
1033
|
+
const legacy = parseDiscordPreviewStreamMode(params.streamMode);
|
|
1034
|
+
if (legacy) return legacy;
|
|
1035
|
+
if (typeof params.streaming === "boolean") return params.streaming ? "partial" : "off";
|
|
1036
|
+
return "off";
|
|
1037
|
+
}
|
|
1038
|
+
function resolveDiscordPreviewStreamMode(params = {}) {
|
|
1039
|
+
const parsedStreaming = parseDiscordPreviewStreamMode(params.streaming);
|
|
1040
|
+
if (parsedStreaming) return parsedStreaming;
|
|
1041
|
+
const legacy = parseDiscordPreviewStreamMode(params.streamMode);
|
|
1042
|
+
if (legacy) return legacy;
|
|
1043
|
+
if (typeof params.streaming === "boolean") return params.streaming ? "partial" : "off";
|
|
1044
|
+
return "off";
|
|
1045
|
+
}
|
|
1046
|
+
function resolveSlackStreamingMode(params = {}) {
|
|
1047
|
+
const parsedStreaming = parseStreamingMode(params.streaming);
|
|
1048
|
+
if (parsedStreaming) return parsedStreaming;
|
|
1049
|
+
const legacyStreamMode = parseSlackLegacyDraftStreamMode(params.streamMode);
|
|
1050
|
+
if (legacyStreamMode) return mapSlackLegacyDraftStreamModeToStreaming(legacyStreamMode);
|
|
1051
|
+
if (typeof params.streaming === "boolean") return "partial";
|
|
1052
|
+
return "partial";
|
|
1053
|
+
}
|
|
1054
|
+
function resolveSlackNativeStreaming(params = {}) {
|
|
1055
|
+
if (typeof params.nativeStreaming === "boolean") return params.nativeStreaming;
|
|
1056
|
+
if (typeof params.streaming === "boolean") return params.streaming;
|
|
1057
|
+
return true;
|
|
1058
|
+
}
|
|
1059
|
+
|
|
1060
|
+
//#endregion
|
|
1061
|
+
//#region src/config/telegram-custom-commands.ts
|
|
1062
|
+
const TELEGRAM_COMMAND_NAME_PATTERN = /^[a-z0-9_]{1,32}$/;
|
|
1063
|
+
function normalizeTelegramCommandName(value) {
|
|
1064
|
+
const trimmed = value.trim();
|
|
1065
|
+
if (!trimmed) return "";
|
|
1066
|
+
return (trimmed.startsWith("/") ? trimmed.slice(1) : trimmed).trim().toLowerCase().replace(/-/g, "_");
|
|
1067
|
+
}
|
|
1068
|
+
function normalizeTelegramCommandDescription(value) {
|
|
1069
|
+
return value.trim();
|
|
1070
|
+
}
|
|
1071
|
+
function resolveTelegramCustomCommands(params) {
|
|
1072
|
+
const entries = Array.isArray(params.commands) ? params.commands : [];
|
|
1073
|
+
const reserved = params.reservedCommands ?? /* @__PURE__ */ new Set();
|
|
1074
|
+
const checkReserved = params.checkReserved !== false;
|
|
1075
|
+
const checkDuplicates = params.checkDuplicates !== false;
|
|
1076
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1077
|
+
const resolved = [];
|
|
1078
|
+
const issues = [];
|
|
1079
|
+
for (let index = 0; index < entries.length; index += 1) {
|
|
1080
|
+
const entry = entries[index];
|
|
1081
|
+
const normalized = normalizeTelegramCommandName(String(entry?.command ?? ""));
|
|
1082
|
+
if (!normalized) {
|
|
1083
|
+
issues.push({
|
|
1084
|
+
index,
|
|
1085
|
+
field: "command",
|
|
1086
|
+
message: "Telegram custom command is missing a command name."
|
|
1087
|
+
});
|
|
1088
|
+
continue;
|
|
1089
|
+
}
|
|
1090
|
+
if (!TELEGRAM_COMMAND_NAME_PATTERN.test(normalized)) {
|
|
1091
|
+
issues.push({
|
|
1092
|
+
index,
|
|
1093
|
+
field: "command",
|
|
1094
|
+
message: `Telegram custom command "/${normalized}" is invalid (use a-z, 0-9, underscore; max 32 chars).`
|
|
1095
|
+
});
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
1098
|
+
if (checkReserved && reserved.has(normalized)) {
|
|
1099
|
+
issues.push({
|
|
1100
|
+
index,
|
|
1101
|
+
field: "command",
|
|
1102
|
+
message: `Telegram custom command "/${normalized}" conflicts with a native command.`
|
|
1103
|
+
});
|
|
1104
|
+
continue;
|
|
1105
|
+
}
|
|
1106
|
+
if (checkDuplicates && seen.has(normalized)) {
|
|
1107
|
+
issues.push({
|
|
1108
|
+
index,
|
|
1109
|
+
field: "command",
|
|
1110
|
+
message: `Telegram custom command "/${normalized}" is duplicated.`
|
|
1111
|
+
});
|
|
1112
|
+
continue;
|
|
1113
|
+
}
|
|
1114
|
+
const description = normalizeTelegramCommandDescription(String(entry?.description ?? ""));
|
|
1115
|
+
if (!description) {
|
|
1116
|
+
issues.push({
|
|
1117
|
+
index,
|
|
1118
|
+
field: "description",
|
|
1119
|
+
message: `Telegram custom command "/${normalized}" is missing a description.`
|
|
1120
|
+
});
|
|
1121
|
+
continue;
|
|
1122
|
+
}
|
|
1123
|
+
if (checkDuplicates) seen.add(normalized);
|
|
1124
|
+
resolved.push({
|
|
1125
|
+
command: normalized,
|
|
1126
|
+
description
|
|
1127
|
+
});
|
|
1128
|
+
}
|
|
1129
|
+
return {
|
|
1130
|
+
commands: resolved,
|
|
1131
|
+
issues
|
|
1132
|
+
};
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
//#endregion
|
|
1136
|
+
//#region src/config/zod-schema.providers-core.ts
|
|
1137
|
+
const ToolPolicyBySenderSchema$1 = z.record(z.string(), ToolPolicySchema).optional();
|
|
1138
|
+
const DiscordIdSchema = z.union([z.string(), z.number()]).refine((value) => typeof value === "string", { message: "Discord IDs must be strings (wrap numeric IDs in quotes)." });
|
|
1139
|
+
const DiscordIdListSchema = z.array(DiscordIdSchema);
|
|
1140
|
+
const TelegramInlineButtonsScopeSchema = z.enum([
|
|
1141
|
+
"off",
|
|
1142
|
+
"dm",
|
|
1143
|
+
"group",
|
|
1144
|
+
"all",
|
|
1145
|
+
"allowlist"
|
|
1146
|
+
]);
|
|
1147
|
+
const TelegramCapabilitiesSchema = z.union([z.array(z.string()), z.object({ inlineButtons: TelegramInlineButtonsScopeSchema.optional() }).strict()]);
|
|
1148
|
+
const TelegramTopicSchema = z.object({
|
|
1149
|
+
requireMention: z.boolean().optional(),
|
|
1150
|
+
groupPolicy: GroupPolicySchema.optional(),
|
|
1151
|
+
enabled: z.boolean().optional(),
|
|
1152
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1153
|
+
systemPrompt: z.string().optional()
|
|
1154
|
+
}).strict();
|
|
1155
|
+
const TelegramGroupSchema = z.object({
|
|
1156
|
+
requireMention: z.boolean().optional(),
|
|
1157
|
+
groupPolicy: GroupPolicySchema.optional(),
|
|
1158
|
+
tools: ToolPolicySchema,
|
|
1159
|
+
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1160
|
+
enabled: z.boolean().optional(),
|
|
1161
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1162
|
+
systemPrompt: z.string().optional(),
|
|
1163
|
+
topics: z.record(z.string(), TelegramTopicSchema.optional()).optional()
|
|
1164
|
+
}).strict();
|
|
1165
|
+
const TelegramCustomCommandSchema = z.object({
|
|
1166
|
+
command: z.string().transform(normalizeTelegramCommandName),
|
|
1167
|
+
description: z.string().transform(normalizeTelegramCommandDescription)
|
|
1168
|
+
}).strict();
|
|
1169
|
+
const validateTelegramCustomCommands = (value, ctx) => {
|
|
1170
|
+
if (!value.customCommands || value.customCommands.length === 0) return;
|
|
1171
|
+
const { issues } = resolveTelegramCustomCommands({
|
|
1172
|
+
commands: value.customCommands,
|
|
1173
|
+
checkReserved: false,
|
|
1174
|
+
checkDuplicates: false
|
|
1175
|
+
});
|
|
1176
|
+
for (const issue of issues) ctx.addIssue({
|
|
1177
|
+
code: z.ZodIssueCode.custom,
|
|
1178
|
+
path: [
|
|
1179
|
+
"customCommands",
|
|
1180
|
+
issue.index,
|
|
1181
|
+
issue.field
|
|
1182
|
+
],
|
|
1183
|
+
message: issue.message
|
|
1184
|
+
});
|
|
1185
|
+
};
|
|
1186
|
+
function normalizeTelegramStreamingConfig(value) {
|
|
1187
|
+
value.streaming = resolveTelegramPreviewStreamMode(value);
|
|
1188
|
+
delete value.streamMode;
|
|
1189
|
+
}
|
|
1190
|
+
function normalizeDiscordStreamingConfig(value) {
|
|
1191
|
+
value.streaming = resolveDiscordPreviewStreamMode(value);
|
|
1192
|
+
delete value.streamMode;
|
|
1193
|
+
}
|
|
1194
|
+
function normalizeSlackStreamingConfig(value) {
|
|
1195
|
+
value.nativeStreaming = resolveSlackNativeStreaming(value);
|
|
1196
|
+
value.streaming = resolveSlackStreamingMode(value);
|
|
1197
|
+
delete value.streamMode;
|
|
1198
|
+
}
|
|
1199
|
+
const TelegramAccountSchemaBase = z.object({
|
|
1200
|
+
name: z.string().optional(),
|
|
1201
|
+
capabilities: TelegramCapabilitiesSchema.optional(),
|
|
1202
|
+
markdown: MarkdownConfigSchema,
|
|
1203
|
+
enabled: z.boolean().optional(),
|
|
1204
|
+
commands: ProviderCommandsSchema,
|
|
1205
|
+
customCommands: z.array(TelegramCustomCommandSchema).optional(),
|
|
1206
|
+
configWrites: z.boolean().optional(),
|
|
1207
|
+
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1208
|
+
botToken: z.string().optional().register(sensitive),
|
|
1209
|
+
tokenFile: z.string().optional(),
|
|
1210
|
+
replyToMode: ReplyToModeSchema.optional(),
|
|
1211
|
+
groups: z.record(z.string(), TelegramGroupSchema.optional()).optional(),
|
|
1212
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1213
|
+
defaultTo: z.union([z.string(), z.number()]).optional(),
|
|
1214
|
+
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1215
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1216
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
1217
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1218
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1219
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1220
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1221
|
+
streaming: z.union([z.boolean(), z.enum([
|
|
1222
|
+
"off",
|
|
1223
|
+
"partial",
|
|
1224
|
+
"block",
|
|
1225
|
+
"progress"
|
|
1226
|
+
])]).optional(),
|
|
1227
|
+
blockStreaming: z.boolean().optional(),
|
|
1228
|
+
draftChunk: BlockStreamingChunkSchema.optional(),
|
|
1229
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1230
|
+
streamMode: z.enum([
|
|
1231
|
+
"off",
|
|
1232
|
+
"partial",
|
|
1233
|
+
"block"
|
|
1234
|
+
]).optional(),
|
|
1235
|
+
mediaMaxMb: z.number().positive().optional(),
|
|
1236
|
+
timeoutSeconds: z.number().int().positive().optional(),
|
|
1237
|
+
retry: RetryConfigSchema,
|
|
1238
|
+
network: z.object({
|
|
1239
|
+
autoSelectFamily: z.boolean().optional(),
|
|
1240
|
+
dnsResultOrder: z.enum(["ipv4first", "verbatim"]).optional()
|
|
1241
|
+
}).strict().optional(),
|
|
1242
|
+
proxy: z.string().optional(),
|
|
1243
|
+
webhookUrl: z.string().optional(),
|
|
1244
|
+
webhookSecret: z.string().optional().register(sensitive),
|
|
1245
|
+
webhookPath: z.string().optional(),
|
|
1246
|
+
webhookHost: z.string().optional(),
|
|
1247
|
+
webhookPort: z.number().int().positive().optional(),
|
|
1248
|
+
actions: z.object({
|
|
1249
|
+
reactions: z.boolean().optional(),
|
|
1250
|
+
sendMessage: z.boolean().optional(),
|
|
1251
|
+
deleteMessage: z.boolean().optional(),
|
|
1252
|
+
sticker: z.boolean().optional()
|
|
1253
|
+
}).strict().optional(),
|
|
1254
|
+
reactionNotifications: z.enum([
|
|
1255
|
+
"off",
|
|
1256
|
+
"own",
|
|
1257
|
+
"all"
|
|
1258
|
+
]).optional(),
|
|
1259
|
+
reactionLevel: z.enum([
|
|
1260
|
+
"off",
|
|
1261
|
+
"ack",
|
|
1262
|
+
"minimal",
|
|
1263
|
+
"extensive"
|
|
1264
|
+
]).optional(),
|
|
1265
|
+
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1266
|
+
linkPreview: z.boolean().optional(),
|
|
1267
|
+
responsePrefix: z.string().optional(),
|
|
1268
|
+
ackReaction: z.string().optional()
|
|
1269
|
+
}).strict();
|
|
1270
|
+
const TelegramAccountSchema = TelegramAccountSchemaBase.superRefine((value, ctx) => {
|
|
1271
|
+
normalizeTelegramStreamingConfig(value);
|
|
1272
|
+
requireOpenAllowFrom({
|
|
1273
|
+
policy: value.dmPolicy,
|
|
1274
|
+
allowFrom: value.allowFrom,
|
|
1275
|
+
ctx,
|
|
1276
|
+
path: ["allowFrom"],
|
|
1277
|
+
message: "channels.telegram.dmPolicy=\"open\" requires channels.telegram.allowFrom to include \"*\""
|
|
1278
|
+
});
|
|
1279
|
+
validateTelegramCustomCommands(value, ctx);
|
|
1280
|
+
});
|
|
1281
|
+
const TelegramConfigSchema = TelegramAccountSchemaBase.extend({ accounts: z.record(z.string(), TelegramAccountSchema.optional()).optional() }).superRefine((value, ctx) => {
|
|
1282
|
+
normalizeTelegramStreamingConfig(value);
|
|
1283
|
+
requireOpenAllowFrom({
|
|
1284
|
+
policy: value.dmPolicy,
|
|
1285
|
+
allowFrom: value.allowFrom,
|
|
1286
|
+
ctx,
|
|
1287
|
+
path: ["allowFrom"],
|
|
1288
|
+
message: "channels.telegram.dmPolicy=\"open\" requires channels.telegram.allowFrom to include \"*\""
|
|
1289
|
+
});
|
|
1290
|
+
validateTelegramCustomCommands(value, ctx);
|
|
1291
|
+
const baseWebhookUrl = typeof value.webhookUrl === "string" ? value.webhookUrl.trim() : "";
|
|
1292
|
+
const baseWebhookSecret = typeof value.webhookSecret === "string" ? value.webhookSecret.trim() : "";
|
|
1293
|
+
if (baseWebhookUrl && !baseWebhookSecret) ctx.addIssue({
|
|
1294
|
+
code: z.ZodIssueCode.custom,
|
|
1295
|
+
message: "channels.telegram.webhookUrl requires channels.telegram.webhookSecret",
|
|
1296
|
+
path: ["webhookSecret"]
|
|
1297
|
+
});
|
|
1298
|
+
if (!value.accounts) return;
|
|
1299
|
+
for (const [accountId, account] of Object.entries(value.accounts)) {
|
|
1300
|
+
if (!account) continue;
|
|
1301
|
+
if (account.enabled === false) continue;
|
|
1302
|
+
if (!(typeof account.webhookUrl === "string" ? account.webhookUrl.trim() : "")) continue;
|
|
1303
|
+
if (!(typeof account.webhookSecret === "string" ? account.webhookSecret.trim() : "") && !baseWebhookSecret) ctx.addIssue({
|
|
1304
|
+
code: z.ZodIssueCode.custom,
|
|
1305
|
+
message: "channels.telegram.accounts.*.webhookUrl requires channels.telegram.webhookSecret or channels.telegram.accounts.*.webhookSecret",
|
|
1306
|
+
path: [
|
|
1307
|
+
"accounts",
|
|
1308
|
+
accountId,
|
|
1309
|
+
"webhookSecret"
|
|
1310
|
+
]
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1313
|
+
});
|
|
1314
|
+
const DiscordDmSchema = z.object({
|
|
1315
|
+
enabled: z.boolean().optional(),
|
|
1316
|
+
policy: DmPolicySchema.optional(),
|
|
1317
|
+
allowFrom: DiscordIdListSchema.optional(),
|
|
1318
|
+
groupEnabled: z.boolean().optional(),
|
|
1319
|
+
groupChannels: DiscordIdListSchema.optional()
|
|
1320
|
+
}).strict();
|
|
1321
|
+
const DiscordGuildChannelSchema = z.object({
|
|
1322
|
+
allow: z.boolean().optional(),
|
|
1323
|
+
requireMention: z.boolean().optional(),
|
|
1324
|
+
tools: ToolPolicySchema,
|
|
1325
|
+
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1326
|
+
enabled: z.boolean().optional(),
|
|
1327
|
+
users: DiscordIdListSchema.optional(),
|
|
1328
|
+
roles: DiscordIdListSchema.optional(),
|
|
1329
|
+
systemPrompt: z.string().optional(),
|
|
1330
|
+
includeThreadStarter: z.boolean().optional(),
|
|
1331
|
+
autoThread: z.boolean().optional()
|
|
1332
|
+
}).strict();
|
|
1333
|
+
const DiscordGuildSchema = z.object({
|
|
1334
|
+
slug: z.string().optional(),
|
|
1335
|
+
requireMention: z.boolean().optional(),
|
|
1336
|
+
tools: ToolPolicySchema,
|
|
1337
|
+
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1338
|
+
reactionNotifications: z.enum([
|
|
1339
|
+
"off",
|
|
1340
|
+
"own",
|
|
1341
|
+
"all",
|
|
1342
|
+
"allowlist"
|
|
1343
|
+
]).optional(),
|
|
1344
|
+
users: DiscordIdListSchema.optional(),
|
|
1345
|
+
roles: DiscordIdListSchema.optional(),
|
|
1346
|
+
channels: z.record(z.string(), DiscordGuildChannelSchema.optional()).optional()
|
|
1347
|
+
}).strict();
|
|
1348
|
+
const DiscordUiSchema = z.object({ components: z.object({ accentColor: HexColorSchema.optional() }).strict().optional() }).strict().optional();
|
|
1349
|
+
const DiscordVoiceAutoJoinSchema = z.object({
|
|
1350
|
+
guildId: z.string().min(1),
|
|
1351
|
+
channelId: z.string().min(1)
|
|
1352
|
+
}).strict();
|
|
1353
|
+
const DiscordVoiceSchema = z.object({
|
|
1354
|
+
enabled: z.boolean().optional(),
|
|
1355
|
+
autoJoin: z.array(DiscordVoiceAutoJoinSchema).optional(),
|
|
1356
|
+
daveEncryption: z.boolean().optional(),
|
|
1357
|
+
decryptionFailureTolerance: z.number().int().min(0).optional(),
|
|
1358
|
+
tts: TtsConfigSchema.optional()
|
|
1359
|
+
}).strict().optional();
|
|
1360
|
+
const DiscordAccountSchema = z.object({
|
|
1361
|
+
name: z.string().optional(),
|
|
1362
|
+
capabilities: z.array(z.string()).optional(),
|
|
1363
|
+
markdown: MarkdownConfigSchema,
|
|
1364
|
+
enabled: z.boolean().optional(),
|
|
1365
|
+
commands: ProviderCommandsSchema,
|
|
1366
|
+
configWrites: z.boolean().optional(),
|
|
1367
|
+
token: z.string().optional().register(sensitive),
|
|
1368
|
+
proxy: z.string().optional(),
|
|
1369
|
+
allowBots: z.boolean().optional(),
|
|
1370
|
+
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
1371
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1372
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
1373
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1374
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1375
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1376
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1377
|
+
blockStreaming: z.boolean().optional(),
|
|
1378
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1379
|
+
streaming: z.union([z.boolean(), z.enum([
|
|
1380
|
+
"off",
|
|
1381
|
+
"partial",
|
|
1382
|
+
"block",
|
|
1383
|
+
"progress"
|
|
1384
|
+
])]).optional(),
|
|
1385
|
+
streamMode: z.enum([
|
|
1386
|
+
"partial",
|
|
1387
|
+
"block",
|
|
1388
|
+
"off"
|
|
1389
|
+
]).optional(),
|
|
1390
|
+
draftChunk: BlockStreamingChunkSchema.optional(),
|
|
1391
|
+
maxLinesPerMessage: z.number().int().positive().optional(),
|
|
1392
|
+
mediaMaxMb: z.number().positive().optional(),
|
|
1393
|
+
retry: RetryConfigSchema,
|
|
1394
|
+
actions: z.object({
|
|
1395
|
+
reactions: z.boolean().optional(),
|
|
1396
|
+
stickers: z.boolean().optional(),
|
|
1397
|
+
emojiUploads: z.boolean().optional(),
|
|
1398
|
+
stickerUploads: z.boolean().optional(),
|
|
1399
|
+
polls: z.boolean().optional(),
|
|
1400
|
+
permissions: z.boolean().optional(),
|
|
1401
|
+
messages: z.boolean().optional(),
|
|
1402
|
+
threads: z.boolean().optional(),
|
|
1403
|
+
pins: z.boolean().optional(),
|
|
1404
|
+
search: z.boolean().optional(),
|
|
1405
|
+
memberInfo: z.boolean().optional(),
|
|
1406
|
+
roleInfo: z.boolean().optional(),
|
|
1407
|
+
roles: z.boolean().optional(),
|
|
1408
|
+
channelInfo: z.boolean().optional(),
|
|
1409
|
+
voiceStatus: z.boolean().optional(),
|
|
1410
|
+
events: z.boolean().optional(),
|
|
1411
|
+
moderation: z.boolean().optional(),
|
|
1412
|
+
channels: z.boolean().optional(),
|
|
1413
|
+
presence: z.boolean().optional()
|
|
1414
|
+
}).strict().optional(),
|
|
1415
|
+
replyToMode: ReplyToModeSchema.optional(),
|
|
1416
|
+
dmPolicy: DmPolicySchema.optional(),
|
|
1417
|
+
allowFrom: DiscordIdListSchema.optional(),
|
|
1418
|
+
defaultTo: z.string().optional(),
|
|
1419
|
+
dm: DiscordDmSchema.optional(),
|
|
1420
|
+
guilds: z.record(z.string(), DiscordGuildSchema.optional()).optional(),
|
|
1421
|
+
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1422
|
+
execApprovals: z.object({
|
|
1423
|
+
enabled: z.boolean().optional(),
|
|
1424
|
+
approvers: DiscordIdListSchema.optional(),
|
|
1425
|
+
agentFilter: z.array(z.string()).optional(),
|
|
1426
|
+
sessionFilter: z.array(z.string()).optional(),
|
|
1427
|
+
cleanupAfterResolve: z.boolean().optional(),
|
|
1428
|
+
target: z.enum([
|
|
1429
|
+
"dm",
|
|
1430
|
+
"channel",
|
|
1431
|
+
"both"
|
|
1432
|
+
]).optional()
|
|
1433
|
+
}).strict().optional(),
|
|
1434
|
+
ui: DiscordUiSchema,
|
|
1435
|
+
slashCommand: z.object({ ephemeral: z.boolean().optional() }).strict().optional(),
|
|
1436
|
+
threadBindings: z.object({
|
|
1437
|
+
enabled: z.boolean().optional(),
|
|
1438
|
+
ttlHours: z.number().nonnegative().optional(),
|
|
1439
|
+
spawnSubagentSessions: z.boolean().optional()
|
|
1440
|
+
}).strict().optional(),
|
|
1441
|
+
intents: z.object({
|
|
1442
|
+
presence: z.boolean().optional(),
|
|
1443
|
+
guildMembers: z.boolean().optional()
|
|
1444
|
+
}).strict().optional(),
|
|
1445
|
+
voice: DiscordVoiceSchema,
|
|
1446
|
+
pluralkit: z.object({
|
|
1447
|
+
enabled: z.boolean().optional(),
|
|
1448
|
+
token: z.string().optional().register(sensitive)
|
|
1449
|
+
}).strict().optional(),
|
|
1450
|
+
responsePrefix: z.string().optional(),
|
|
1451
|
+
ackReaction: z.string().optional(),
|
|
1452
|
+
activity: z.string().optional(),
|
|
1453
|
+
status: z.enum([
|
|
1454
|
+
"online",
|
|
1455
|
+
"dnd",
|
|
1456
|
+
"idle",
|
|
1457
|
+
"invisible"
|
|
1458
|
+
]).optional(),
|
|
1459
|
+
activityType: z.union([
|
|
1460
|
+
z.literal(0),
|
|
1461
|
+
z.literal(1),
|
|
1462
|
+
z.literal(2),
|
|
1463
|
+
z.literal(3),
|
|
1464
|
+
z.literal(4),
|
|
1465
|
+
z.literal(5)
|
|
1466
|
+
]).optional(),
|
|
1467
|
+
activityUrl: z.string().url().optional()
|
|
1468
|
+
}).strict().superRefine((value, ctx) => {
|
|
1469
|
+
normalizeDiscordStreamingConfig(value);
|
|
1470
|
+
const activityText = typeof value.activity === "string" ? value.activity.trim() : "";
|
|
1471
|
+
const hasActivity = Boolean(activityText);
|
|
1472
|
+
const hasActivityType = value.activityType !== void 0;
|
|
1473
|
+
const activityUrl = typeof value.activityUrl === "string" ? value.activityUrl.trim() : "";
|
|
1474
|
+
const hasActivityUrl = Boolean(activityUrl);
|
|
1475
|
+
if ((hasActivityType || hasActivityUrl) && !hasActivity) ctx.addIssue({
|
|
1476
|
+
code: z.ZodIssueCode.custom,
|
|
1477
|
+
message: "channels.discord.activity is required when activityType or activityUrl is set",
|
|
1478
|
+
path: ["activity"]
|
|
1479
|
+
});
|
|
1480
|
+
if (value.activityType === 1 && !hasActivityUrl) ctx.addIssue({
|
|
1481
|
+
code: z.ZodIssueCode.custom,
|
|
1482
|
+
message: "channels.discord.activityUrl is required when activityType is 1 (Streaming)",
|
|
1483
|
+
path: ["activityUrl"]
|
|
1484
|
+
});
|
|
1485
|
+
if (hasActivityUrl && value.activityType !== 1) ctx.addIssue({
|
|
1486
|
+
code: z.ZodIssueCode.custom,
|
|
1487
|
+
message: "channels.discord.activityType must be 1 (Streaming) when activityUrl is set",
|
|
1488
|
+
path: ["activityType"]
|
|
1489
|
+
});
|
|
1490
|
+
requireOpenAllowFrom({
|
|
1491
|
+
policy: value.dmPolicy ?? value.dm?.policy ?? "pairing",
|
|
1492
|
+
allowFrom: value.allowFrom ?? value.dm?.allowFrom,
|
|
1493
|
+
ctx,
|
|
1494
|
+
path: [...value.allowFrom !== void 0 ? ["allowFrom"] : ["dm", "allowFrom"]],
|
|
1495
|
+
message: "channels.discord.dmPolicy=\"open\" requires channels.discord.allowFrom (or channels.discord.dm.allowFrom) to include \"*\""
|
|
1496
|
+
});
|
|
1497
|
+
});
|
|
1498
|
+
const DiscordConfigSchema = DiscordAccountSchema.extend({ accounts: z.record(z.string(), DiscordAccountSchema.optional()).optional() });
|
|
1499
|
+
const GoogleChatDmSchema = z.object({
|
|
1500
|
+
enabled: z.boolean().optional(),
|
|
1501
|
+
policy: DmPolicySchema.optional().default("pairing"),
|
|
1502
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional()
|
|
1503
|
+
}).strict().superRefine((value, ctx) => {
|
|
1504
|
+
requireOpenAllowFrom({
|
|
1505
|
+
policy: value.policy,
|
|
1506
|
+
allowFrom: value.allowFrom,
|
|
1507
|
+
ctx,
|
|
1508
|
+
path: ["allowFrom"],
|
|
1509
|
+
message: "channels.googlechat.dm.policy=\"open\" requires channels.googlechat.dm.allowFrom to include \"*\""
|
|
1510
|
+
});
|
|
1511
|
+
});
|
|
1512
|
+
const GoogleChatGroupSchema = z.object({
|
|
1513
|
+
enabled: z.boolean().optional(),
|
|
1514
|
+
allow: z.boolean().optional(),
|
|
1515
|
+
requireMention: z.boolean().optional(),
|
|
1516
|
+
users: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1517
|
+
systemPrompt: z.string().optional()
|
|
1518
|
+
}).strict();
|
|
1519
|
+
const GoogleChatAccountSchema = z.object({
|
|
1520
|
+
name: z.string().optional(),
|
|
1521
|
+
capabilities: z.array(z.string()).optional(),
|
|
1522
|
+
enabled: z.boolean().optional(),
|
|
1523
|
+
configWrites: z.boolean().optional(),
|
|
1524
|
+
allowBots: z.boolean().optional(),
|
|
1525
|
+
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
1526
|
+
requireMention: z.boolean().optional(),
|
|
1527
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1528
|
+
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1529
|
+
groups: z.record(z.string(), GoogleChatGroupSchema.optional()).optional(),
|
|
1530
|
+
defaultTo: z.string().optional(),
|
|
1531
|
+
serviceAccount: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(),
|
|
1532
|
+
serviceAccountFile: z.string().optional(),
|
|
1533
|
+
audienceType: z.enum(["app-url", "project-number"]).optional(),
|
|
1534
|
+
audience: z.string().optional(),
|
|
1535
|
+
webhookPath: z.string().optional(),
|
|
1536
|
+
webhookUrl: z.string().optional(),
|
|
1537
|
+
botUser: z.string().optional(),
|
|
1538
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
1539
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1540
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1541
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1542
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1543
|
+
blockStreaming: z.boolean().optional(),
|
|
1544
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1545
|
+
streamMode: z.enum([
|
|
1546
|
+
"replace",
|
|
1547
|
+
"status_final",
|
|
1548
|
+
"append"
|
|
1549
|
+
]).optional().default("replace"),
|
|
1550
|
+
mediaMaxMb: z.number().positive().optional(),
|
|
1551
|
+
replyToMode: ReplyToModeSchema.optional(),
|
|
1552
|
+
actions: z.object({ reactions: z.boolean().optional() }).strict().optional(),
|
|
1553
|
+
dm: GoogleChatDmSchema.optional(),
|
|
1554
|
+
typingIndicator: z.enum([
|
|
1555
|
+
"none",
|
|
1556
|
+
"message",
|
|
1557
|
+
"reaction"
|
|
1558
|
+
]).optional(),
|
|
1559
|
+
responsePrefix: z.string().optional()
|
|
1560
|
+
}).strict();
|
|
1561
|
+
const GoogleChatConfigSchema = GoogleChatAccountSchema.extend({
|
|
1562
|
+
accounts: z.record(z.string(), GoogleChatAccountSchema.optional()).optional(),
|
|
1563
|
+
defaultAccount: z.string().optional()
|
|
1564
|
+
});
|
|
1565
|
+
const SlackDmSchema = z.object({
|
|
1566
|
+
enabled: z.boolean().optional(),
|
|
1567
|
+
policy: DmPolicySchema.optional(),
|
|
1568
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1569
|
+
groupEnabled: z.boolean().optional(),
|
|
1570
|
+
groupChannels: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1571
|
+
replyToMode: ReplyToModeSchema.optional()
|
|
1572
|
+
}).strict();
|
|
1573
|
+
const SlackChannelSchema = z.object({
|
|
1574
|
+
enabled: z.boolean().optional(),
|
|
1575
|
+
allow: z.boolean().optional(),
|
|
1576
|
+
requireMention: z.boolean().optional(),
|
|
1577
|
+
tools: ToolPolicySchema,
|
|
1578
|
+
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1579
|
+
allowBots: z.boolean().optional(),
|
|
1580
|
+
users: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1581
|
+
systemPrompt: z.string().optional()
|
|
1582
|
+
}).strict();
|
|
1583
|
+
const SlackThreadSchema = z.object({
|
|
1584
|
+
historyScope: z.enum(["thread", "channel"]).optional(),
|
|
1585
|
+
inheritParent: z.boolean().optional(),
|
|
1586
|
+
initialHistoryLimit: z.number().int().min(0).optional()
|
|
1587
|
+
}).strict();
|
|
1588
|
+
const SlackReplyToModeByChatTypeSchema = z.object({
|
|
1589
|
+
direct: ReplyToModeSchema.optional(),
|
|
1590
|
+
group: ReplyToModeSchema.optional(),
|
|
1591
|
+
channel: ReplyToModeSchema.optional()
|
|
1592
|
+
}).strict();
|
|
1593
|
+
const SlackAccountSchema = z.object({
|
|
1594
|
+
name: z.string().optional(),
|
|
1595
|
+
mode: z.enum(["socket", "http"]).optional(),
|
|
1596
|
+
signingSecret: z.string().optional().register(sensitive),
|
|
1597
|
+
webhookPath: z.string().optional(),
|
|
1598
|
+
capabilities: z.array(z.string()).optional(),
|
|
1599
|
+
markdown: MarkdownConfigSchema,
|
|
1600
|
+
enabled: z.boolean().optional(),
|
|
1601
|
+
commands: ProviderCommandsSchema,
|
|
1602
|
+
configWrites: z.boolean().optional(),
|
|
1603
|
+
botToken: z.string().optional().register(sensitive),
|
|
1604
|
+
appToken: z.string().optional().register(sensitive),
|
|
1605
|
+
userToken: z.string().optional().register(sensitive),
|
|
1606
|
+
userTokenReadOnly: z.boolean().optional().default(true),
|
|
1607
|
+
allowBots: z.boolean().optional(),
|
|
1608
|
+
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
1609
|
+
requireMention: z.boolean().optional(),
|
|
1610
|
+
groupPolicy: GroupPolicySchema.optional(),
|
|
1611
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
1612
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1613
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1614
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1615
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1616
|
+
blockStreaming: z.boolean().optional(),
|
|
1617
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1618
|
+
streaming: z.union([z.boolean(), z.enum([
|
|
1619
|
+
"off",
|
|
1620
|
+
"partial",
|
|
1621
|
+
"block",
|
|
1622
|
+
"progress"
|
|
1623
|
+
])]).optional(),
|
|
1624
|
+
nativeStreaming: z.boolean().optional(),
|
|
1625
|
+
streamMode: z.enum([
|
|
1626
|
+
"replace",
|
|
1627
|
+
"status_final",
|
|
1628
|
+
"append"
|
|
1629
|
+
]).optional(),
|
|
1630
|
+
mediaMaxMb: z.number().positive().optional(),
|
|
1631
|
+
reactionNotifications: z.enum([
|
|
1632
|
+
"off",
|
|
1633
|
+
"own",
|
|
1634
|
+
"all",
|
|
1635
|
+
"allowlist"
|
|
1636
|
+
]).optional(),
|
|
1637
|
+
reactionAllowlist: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1638
|
+
replyToMode: ReplyToModeSchema.optional(),
|
|
1639
|
+
replyToModeByChatType: SlackReplyToModeByChatTypeSchema.optional(),
|
|
1640
|
+
thread: SlackThreadSchema.optional(),
|
|
1641
|
+
actions: z.object({
|
|
1642
|
+
reactions: z.boolean().optional(),
|
|
1643
|
+
messages: z.boolean().optional(),
|
|
1644
|
+
pins: z.boolean().optional(),
|
|
1645
|
+
search: z.boolean().optional(),
|
|
1646
|
+
permissions: z.boolean().optional(),
|
|
1647
|
+
memberInfo: z.boolean().optional(),
|
|
1648
|
+
channelInfo: z.boolean().optional(),
|
|
1649
|
+
emojiList: z.boolean().optional()
|
|
1650
|
+
}).strict().optional(),
|
|
1651
|
+
slashCommand: z.object({
|
|
1652
|
+
enabled: z.boolean().optional(),
|
|
1653
|
+
name: z.string().optional(),
|
|
1654
|
+
sessionPrefix: z.string().optional(),
|
|
1655
|
+
ephemeral: z.boolean().optional()
|
|
1656
|
+
}).strict().optional(),
|
|
1657
|
+
dmPolicy: DmPolicySchema.optional(),
|
|
1658
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1659
|
+
defaultTo: z.string().optional(),
|
|
1660
|
+
dm: SlackDmSchema.optional(),
|
|
1661
|
+
channels: z.record(z.string(), SlackChannelSchema.optional()).optional(),
|
|
1662
|
+
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1663
|
+
responsePrefix: z.string().optional(),
|
|
1664
|
+
ackReaction: z.string().optional()
|
|
1665
|
+
}).strict().superRefine((value, ctx) => {
|
|
1666
|
+
normalizeSlackStreamingConfig(value);
|
|
1667
|
+
requireOpenAllowFrom({
|
|
1668
|
+
policy: value.dmPolicy ?? value.dm?.policy ?? "pairing",
|
|
1669
|
+
allowFrom: value.allowFrom ?? value.dm?.allowFrom,
|
|
1670
|
+
ctx,
|
|
1671
|
+
path: [...value.allowFrom !== void 0 ? ["allowFrom"] : ["dm", "allowFrom"]],
|
|
1672
|
+
message: "channels.slack.dmPolicy=\"open\" requires channels.slack.allowFrom (or channels.slack.dm.allowFrom) to include \"*\""
|
|
1673
|
+
});
|
|
1674
|
+
});
|
|
1675
|
+
const SlackConfigSchema = SlackAccountSchema.safeExtend({
|
|
1676
|
+
mode: z.enum(["socket", "http"]).optional().default("socket"),
|
|
1677
|
+
signingSecret: z.string().optional().register(sensitive),
|
|
1678
|
+
webhookPath: z.string().optional().default("/slack/events"),
|
|
1679
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1680
|
+
accounts: z.record(z.string(), SlackAccountSchema.optional()).optional()
|
|
1681
|
+
}).superRefine((value, ctx) => {
|
|
1682
|
+
const baseMode = value.mode ?? "socket";
|
|
1683
|
+
if (baseMode === "http" && !value.signingSecret) ctx.addIssue({
|
|
1684
|
+
code: z.ZodIssueCode.custom,
|
|
1685
|
+
message: "channels.slack.mode=\"http\" requires channels.slack.signingSecret",
|
|
1686
|
+
path: ["signingSecret"]
|
|
1687
|
+
});
|
|
1688
|
+
if (!value.accounts) return;
|
|
1689
|
+
for (const [accountId, account] of Object.entries(value.accounts)) {
|
|
1690
|
+
if (!account) continue;
|
|
1691
|
+
if (account.enabled === false) continue;
|
|
1692
|
+
if ((account.mode ?? baseMode) !== "http") continue;
|
|
1693
|
+
if (!(account.signingSecret ?? value.signingSecret)) ctx.addIssue({
|
|
1694
|
+
code: z.ZodIssueCode.custom,
|
|
1695
|
+
message: "channels.slack.accounts.*.mode=\"http\" requires channels.slack.signingSecret or channels.slack.accounts.*.signingSecret",
|
|
1696
|
+
path: [
|
|
1697
|
+
"accounts",
|
|
1698
|
+
accountId,
|
|
1699
|
+
"signingSecret"
|
|
1700
|
+
]
|
|
1701
|
+
});
|
|
1702
|
+
}
|
|
1703
|
+
});
|
|
1704
|
+
const SignalAccountSchemaBase = z.object({
|
|
1705
|
+
name: z.string().optional(),
|
|
1706
|
+
capabilities: z.array(z.string()).optional(),
|
|
1707
|
+
markdown: MarkdownConfigSchema,
|
|
1708
|
+
enabled: z.boolean().optional(),
|
|
1709
|
+
configWrites: z.boolean().optional(),
|
|
1710
|
+
account: z.string().optional(),
|
|
1711
|
+
httpUrl: z.string().optional(),
|
|
1712
|
+
httpHost: z.string().optional(),
|
|
1713
|
+
httpPort: z.number().int().positive().optional(),
|
|
1714
|
+
cliPath: ExecutableTokenSchema.optional(),
|
|
1715
|
+
autoStart: z.boolean().optional(),
|
|
1716
|
+
startupTimeoutMs: z.number().int().min(1e3).max(12e4).optional(),
|
|
1717
|
+
receiveMode: z.union([z.literal("on-start"), z.literal("manual")]).optional(),
|
|
1718
|
+
ignoreAttachments: z.boolean().optional(),
|
|
1719
|
+
ignoreStories: z.boolean().optional(),
|
|
1720
|
+
sendReadReceipts: z.boolean().optional(),
|
|
1721
|
+
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1722
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1723
|
+
defaultTo: z.string().optional(),
|
|
1724
|
+
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1725
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1726
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
1727
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1728
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1729
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1730
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1731
|
+
blockStreaming: z.boolean().optional(),
|
|
1732
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1733
|
+
mediaMaxMb: z.number().int().positive().optional(),
|
|
1734
|
+
reactionNotifications: z.enum([
|
|
1735
|
+
"off",
|
|
1736
|
+
"own",
|
|
1737
|
+
"all",
|
|
1738
|
+
"allowlist"
|
|
1739
|
+
]).optional(),
|
|
1740
|
+
reactionAllowlist: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1741
|
+
actions: z.object({ reactions: z.boolean().optional() }).strict().optional(),
|
|
1742
|
+
reactionLevel: z.enum([
|
|
1743
|
+
"off",
|
|
1744
|
+
"ack",
|
|
1745
|
+
"minimal",
|
|
1746
|
+
"extensive"
|
|
1747
|
+
]).optional(),
|
|
1748
|
+
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1749
|
+
responsePrefix: z.string().optional()
|
|
1750
|
+
}).strict();
|
|
1751
|
+
const SignalAccountSchema = SignalAccountSchemaBase.superRefine((value, ctx) => {
|
|
1752
|
+
requireOpenAllowFrom({
|
|
1753
|
+
policy: value.dmPolicy,
|
|
1754
|
+
allowFrom: value.allowFrom,
|
|
1755
|
+
ctx,
|
|
1756
|
+
path: ["allowFrom"],
|
|
1757
|
+
message: "channels.signal.dmPolicy=\"open\" requires channels.signal.allowFrom to include \"*\""
|
|
1758
|
+
});
|
|
1759
|
+
});
|
|
1760
|
+
const SignalConfigSchema = SignalAccountSchemaBase.extend({ accounts: z.record(z.string(), SignalAccountSchema.optional()).optional() }).superRefine((value, ctx) => {
|
|
1761
|
+
requireOpenAllowFrom({
|
|
1762
|
+
policy: value.dmPolicy,
|
|
1763
|
+
allowFrom: value.allowFrom,
|
|
1764
|
+
ctx,
|
|
1765
|
+
path: ["allowFrom"],
|
|
1766
|
+
message: "channels.signal.dmPolicy=\"open\" requires channels.signal.allowFrom to include \"*\""
|
|
1767
|
+
});
|
|
1768
|
+
});
|
|
1769
|
+
const IrcGroupSchema = z.object({
|
|
1770
|
+
requireMention: z.boolean().optional(),
|
|
1771
|
+
tools: ToolPolicySchema,
|
|
1772
|
+
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1773
|
+
enabled: z.boolean().optional(),
|
|
1774
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1775
|
+
systemPrompt: z.string().optional()
|
|
1776
|
+
}).strict();
|
|
1777
|
+
const IrcNickServSchema = z.object({
|
|
1778
|
+
enabled: z.boolean().optional(),
|
|
1779
|
+
service: z.string().optional(),
|
|
1780
|
+
password: z.string().optional().register(sensitive),
|
|
1781
|
+
passwordFile: z.string().optional(),
|
|
1782
|
+
register: z.boolean().optional(),
|
|
1783
|
+
registerEmail: z.string().optional()
|
|
1784
|
+
}).strict();
|
|
1785
|
+
const IrcAccountSchemaBase = z.object({
|
|
1786
|
+
name: z.string().optional(),
|
|
1787
|
+
capabilities: z.array(z.string()).optional(),
|
|
1788
|
+
markdown: MarkdownConfigSchema,
|
|
1789
|
+
enabled: z.boolean().optional(),
|
|
1790
|
+
configWrites: z.boolean().optional(),
|
|
1791
|
+
host: z.string().optional(),
|
|
1792
|
+
port: z.number().int().min(1).max(65535).optional(),
|
|
1793
|
+
tls: z.boolean().optional(),
|
|
1794
|
+
nick: z.string().optional(),
|
|
1795
|
+
username: z.string().optional(),
|
|
1796
|
+
realname: z.string().optional(),
|
|
1797
|
+
password: z.string().optional().register(sensitive),
|
|
1798
|
+
passwordFile: z.string().optional(),
|
|
1799
|
+
nickserv: IrcNickServSchema.optional(),
|
|
1800
|
+
channels: z.array(z.string()).optional(),
|
|
1801
|
+
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1802
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1803
|
+
defaultTo: z.string().optional(),
|
|
1804
|
+
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1805
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1806
|
+
groups: z.record(z.string(), IrcGroupSchema.optional()).optional(),
|
|
1807
|
+
mentionPatterns: z.array(z.string()).optional(),
|
|
1808
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
1809
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1810
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1811
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1812
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1813
|
+
blockStreaming: z.boolean().optional(),
|
|
1814
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1815
|
+
mediaMaxMb: z.number().positive().optional(),
|
|
1816
|
+
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1817
|
+
responsePrefix: z.string().optional()
|
|
1818
|
+
}).strict();
|
|
1819
|
+
function refineIrcAllowFromAndNickserv(value, ctx) {
|
|
1820
|
+
requireOpenAllowFrom({
|
|
1821
|
+
policy: value.dmPolicy,
|
|
1822
|
+
allowFrom: value.allowFrom,
|
|
1823
|
+
ctx,
|
|
1824
|
+
path: ["allowFrom"],
|
|
1825
|
+
message: "channels.irc.dmPolicy=\"open\" requires channels.irc.allowFrom to include \"*\""
|
|
1826
|
+
});
|
|
1827
|
+
if (value.nickserv?.register && !value.nickserv.registerEmail?.trim()) ctx.addIssue({
|
|
1828
|
+
code: z.ZodIssueCode.custom,
|
|
1829
|
+
path: ["nickserv", "registerEmail"],
|
|
1830
|
+
message: "channels.irc.nickserv.register=true requires channels.irc.nickserv.registerEmail"
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
const IrcAccountSchema = IrcAccountSchemaBase.superRefine((value, ctx) => {
|
|
1834
|
+
refineIrcAllowFromAndNickserv(value, ctx);
|
|
1835
|
+
});
|
|
1836
|
+
const IrcConfigSchema = IrcAccountSchemaBase.extend({ accounts: z.record(z.string(), IrcAccountSchema.optional()).optional() }).superRefine((value, ctx) => {
|
|
1837
|
+
refineIrcAllowFromAndNickserv(value, ctx);
|
|
1838
|
+
});
|
|
1839
|
+
const IMessageAccountSchemaBase = z.object({
|
|
1840
|
+
name: z.string().optional(),
|
|
1841
|
+
capabilities: z.array(z.string()).optional(),
|
|
1842
|
+
markdown: MarkdownConfigSchema,
|
|
1843
|
+
enabled: z.boolean().optional(),
|
|
1844
|
+
configWrites: z.boolean().optional(),
|
|
1845
|
+
cliPath: ExecutableTokenSchema.optional(),
|
|
1846
|
+
dbPath: z.string().optional(),
|
|
1847
|
+
remoteHost: z.string().refine(isSafeScpRemoteHost, "expected SSH host or user@host (no spaces/options)").optional(),
|
|
1848
|
+
service: z.union([
|
|
1849
|
+
z.literal("imessage"),
|
|
1850
|
+
z.literal("sms"),
|
|
1851
|
+
z.literal("auto")
|
|
1852
|
+
]).optional(),
|
|
1853
|
+
region: z.string().optional(),
|
|
1854
|
+
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1855
|
+
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1856
|
+
defaultTo: z.string().optional(),
|
|
1857
|
+
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1858
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1859
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
1860
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1861
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1862
|
+
includeAttachments: z.boolean().optional(),
|
|
1863
|
+
attachmentRoots: z.array(z.string().refine(isValidInboundPathRootPattern, "expected absolute path root")).optional(),
|
|
1864
|
+
remoteAttachmentRoots: z.array(z.string().refine(isValidInboundPathRootPattern, "expected absolute path root")).optional(),
|
|
1865
|
+
mediaMaxMb: z.number().int().positive().optional(),
|
|
1866
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1867
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1868
|
+
blockStreaming: z.boolean().optional(),
|
|
1869
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1870
|
+
groups: z.record(z.string(), z.object({
|
|
1871
|
+
requireMention: z.boolean().optional(),
|
|
1872
|
+
tools: ToolPolicySchema,
|
|
1873
|
+
toolsBySender: ToolPolicyBySenderSchema$1
|
|
1874
|
+
}).strict().optional()).optional(),
|
|
1875
|
+
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1876
|
+
responsePrefix: z.string().optional()
|
|
1877
|
+
}).strict();
|
|
1878
|
+
const IMessageAccountSchema = IMessageAccountSchemaBase.superRefine((value, ctx) => {
|
|
1879
|
+
requireOpenAllowFrom({
|
|
1880
|
+
policy: value.dmPolicy,
|
|
1881
|
+
allowFrom: value.allowFrom,
|
|
1882
|
+
ctx,
|
|
1883
|
+
path: ["allowFrom"],
|
|
1884
|
+
message: "channels.imessage.dmPolicy=\"open\" requires channels.imessage.allowFrom to include \"*\""
|
|
1885
|
+
});
|
|
1886
|
+
});
|
|
1887
|
+
const IMessageConfigSchema = IMessageAccountSchemaBase.extend({ accounts: z.record(z.string(), IMessageAccountSchema.optional()).optional() }).superRefine((value, ctx) => {
|
|
1888
|
+
requireOpenAllowFrom({
|
|
1889
|
+
policy: value.dmPolicy,
|
|
1890
|
+
allowFrom: value.allowFrom,
|
|
1891
|
+
ctx,
|
|
1892
|
+
path: ["allowFrom"],
|
|
1893
|
+
message: "channels.imessage.dmPolicy=\"open\" requires channels.imessage.allowFrom to include \"*\""
|
|
1894
|
+
});
|
|
1895
|
+
});
|
|
1896
|
+
const BlueBubblesAllowFromEntry = z.union([z.string(), z.number()]);
|
|
1897
|
+
const BlueBubblesActionSchema = z.object({
|
|
1898
|
+
reactions: z.boolean().optional(),
|
|
1899
|
+
edit: z.boolean().optional(),
|
|
1900
|
+
unsend: z.boolean().optional(),
|
|
1901
|
+
reply: z.boolean().optional(),
|
|
1902
|
+
sendWithEffect: z.boolean().optional(),
|
|
1903
|
+
renameGroup: z.boolean().optional(),
|
|
1904
|
+
setGroupIcon: z.boolean().optional(),
|
|
1905
|
+
addParticipant: z.boolean().optional(),
|
|
1906
|
+
removeParticipant: z.boolean().optional(),
|
|
1907
|
+
leaveGroup: z.boolean().optional(),
|
|
1908
|
+
sendAttachment: z.boolean().optional()
|
|
1909
|
+
}).strict().optional();
|
|
1910
|
+
const BlueBubblesGroupConfigSchema = z.object({
|
|
1911
|
+
requireMention: z.boolean().optional(),
|
|
1912
|
+
tools: ToolPolicySchema,
|
|
1913
|
+
toolsBySender: ToolPolicyBySenderSchema$1
|
|
1914
|
+
}).strict();
|
|
1915
|
+
const BlueBubblesAccountSchemaBase = z.object({
|
|
1916
|
+
name: z.string().optional(),
|
|
1917
|
+
capabilities: z.array(z.string()).optional(),
|
|
1918
|
+
markdown: MarkdownConfigSchema,
|
|
1919
|
+
configWrites: z.boolean().optional(),
|
|
1920
|
+
enabled: z.boolean().optional(),
|
|
1921
|
+
serverUrl: z.string().optional(),
|
|
1922
|
+
password: z.string().optional().register(sensitive),
|
|
1923
|
+
webhookPath: z.string().optional(),
|
|
1924
|
+
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1925
|
+
allowFrom: z.array(BlueBubblesAllowFromEntry).optional(),
|
|
1926
|
+
groupAllowFrom: z.array(BlueBubblesAllowFromEntry).optional(),
|
|
1927
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1928
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
1929
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1930
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1931
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1932
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1933
|
+
mediaMaxMb: z.number().int().positive().optional(),
|
|
1934
|
+
mediaLocalRoots: z.array(z.string()).optional(),
|
|
1935
|
+
sendReadReceipts: z.boolean().optional(),
|
|
1936
|
+
blockStreaming: z.boolean().optional(),
|
|
1937
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1938
|
+
groups: z.record(z.string(), BlueBubblesGroupConfigSchema.optional()).optional(),
|
|
1939
|
+
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1940
|
+
responsePrefix: z.string().optional()
|
|
1941
|
+
}).strict();
|
|
1942
|
+
const BlueBubblesAccountSchema = BlueBubblesAccountSchemaBase.superRefine((value, ctx) => {
|
|
1943
|
+
requireOpenAllowFrom({
|
|
1944
|
+
policy: value.dmPolicy,
|
|
1945
|
+
allowFrom: value.allowFrom,
|
|
1946
|
+
ctx,
|
|
1947
|
+
path: ["allowFrom"],
|
|
1948
|
+
message: "channels.bluebubbles.accounts.*.dmPolicy=\"open\" requires allowFrom to include \"*\""
|
|
1949
|
+
});
|
|
1950
|
+
});
|
|
1951
|
+
const BlueBubblesConfigSchema = BlueBubblesAccountSchemaBase.extend({
|
|
1952
|
+
accounts: z.record(z.string(), BlueBubblesAccountSchema.optional()).optional(),
|
|
1953
|
+
actions: BlueBubblesActionSchema
|
|
1954
|
+
}).superRefine((value, ctx) => {
|
|
1955
|
+
requireOpenAllowFrom({
|
|
1956
|
+
policy: value.dmPolicy,
|
|
1957
|
+
allowFrom: value.allowFrom,
|
|
1958
|
+
ctx,
|
|
1959
|
+
path: ["allowFrom"],
|
|
1960
|
+
message: "channels.bluebubbles.dmPolicy=\"open\" requires channels.bluebubbles.allowFrom to include \"*\""
|
|
1961
|
+
});
|
|
1962
|
+
});
|
|
1963
|
+
const MSTeamsChannelSchema = z.object({
|
|
1964
|
+
requireMention: z.boolean().optional(),
|
|
1965
|
+
tools: ToolPolicySchema,
|
|
1966
|
+
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1967
|
+
replyStyle: MSTeamsReplyStyleSchema.optional()
|
|
1968
|
+
}).strict();
|
|
1969
|
+
const MSTeamsTeamSchema = z.object({
|
|
1970
|
+
requireMention: z.boolean().optional(),
|
|
1971
|
+
tools: ToolPolicySchema,
|
|
1972
|
+
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1973
|
+
replyStyle: MSTeamsReplyStyleSchema.optional(),
|
|
1974
|
+
channels: z.record(z.string(), MSTeamsChannelSchema.optional()).optional()
|
|
1975
|
+
}).strict();
|
|
1976
|
+
const MSTeamsConfigSchema = z.object({
|
|
1977
|
+
enabled: z.boolean().optional(),
|
|
1978
|
+
capabilities: z.array(z.string()).optional(),
|
|
1979
|
+
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
1980
|
+
markdown: MarkdownConfigSchema,
|
|
1981
|
+
configWrites: z.boolean().optional(),
|
|
1982
|
+
appId: z.string().optional(),
|
|
1983
|
+
appPassword: z.string().optional().register(sensitive),
|
|
1984
|
+
tenantId: z.string().optional(),
|
|
1985
|
+
webhook: z.object({
|
|
1986
|
+
port: z.number().int().positive().optional(),
|
|
1987
|
+
path: z.string().optional()
|
|
1988
|
+
}).strict().optional(),
|
|
1989
|
+
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1990
|
+
allowFrom: z.array(z.string()).optional(),
|
|
1991
|
+
defaultTo: z.string().optional(),
|
|
1992
|
+
groupAllowFrom: z.array(z.string()).optional(),
|
|
1993
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1994
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
1995
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1996
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1997
|
+
mediaAllowHosts: z.array(z.string()).optional(),
|
|
1998
|
+
mediaAuthAllowHosts: z.array(z.string()).optional(),
|
|
1999
|
+
requireMention: z.boolean().optional(),
|
|
2000
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
2001
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
2002
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
2003
|
+
replyStyle: MSTeamsReplyStyleSchema.optional(),
|
|
2004
|
+
teams: z.record(z.string(), MSTeamsTeamSchema.optional()).optional(),
|
|
2005
|
+
mediaMaxMb: z.number().positive().optional(),
|
|
2006
|
+
sharePointSiteId: z.string().optional(),
|
|
2007
|
+
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
2008
|
+
responsePrefix: z.string().optional()
|
|
2009
|
+
}).strict().superRefine((value, ctx) => {
|
|
2010
|
+
requireOpenAllowFrom({
|
|
2011
|
+
policy: value.dmPolicy,
|
|
2012
|
+
allowFrom: value.allowFrom,
|
|
2013
|
+
ctx,
|
|
2014
|
+
path: ["allowFrom"],
|
|
2015
|
+
message: "channels.msteams.dmPolicy=\"open\" requires channels.msteams.allowFrom to include \"*\""
|
|
2016
|
+
});
|
|
2017
|
+
});
|
|
2018
|
+
|
|
2019
|
+
//#endregion
|
|
2020
|
+
//#region src/config/zod-schema.providers-whatsapp.ts
|
|
2021
|
+
const ToolPolicyBySenderSchema = z.record(z.string(), ToolPolicySchema).optional();
|
|
2022
|
+
const WhatsAppGroupEntrySchema = z.object({
|
|
2023
|
+
requireMention: z.boolean().optional(),
|
|
2024
|
+
tools: ToolPolicySchema,
|
|
2025
|
+
toolsBySender: ToolPolicyBySenderSchema
|
|
2026
|
+
}).strict().optional();
|
|
2027
|
+
const WhatsAppGroupsSchema = z.record(z.string(), WhatsAppGroupEntrySchema).optional();
|
|
2028
|
+
const WhatsAppAckReactionSchema = z.object({
|
|
2029
|
+
emoji: z.string().optional(),
|
|
2030
|
+
direct: z.boolean().optional().default(true),
|
|
2031
|
+
group: z.enum([
|
|
2032
|
+
"always",
|
|
2033
|
+
"mentions",
|
|
2034
|
+
"never"
|
|
2035
|
+
]).optional().default("mentions")
|
|
2036
|
+
}).strict().optional();
|
|
2037
|
+
const WhatsAppSharedSchema = z.object({
|
|
2038
|
+
enabled: z.boolean().optional(),
|
|
2039
|
+
capabilities: z.array(z.string()).optional(),
|
|
2040
|
+
markdown: MarkdownConfigSchema,
|
|
2041
|
+
configWrites: z.boolean().optional(),
|
|
2042
|
+
sendReadReceipts: z.boolean().optional(),
|
|
2043
|
+
messagePrefix: z.string().optional(),
|
|
2044
|
+
responsePrefix: z.string().optional(),
|
|
2045
|
+
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
2046
|
+
selfChatMode: z.boolean().optional(),
|
|
2047
|
+
allowFrom: z.array(z.string()).optional(),
|
|
2048
|
+
defaultTo: z.string().optional(),
|
|
2049
|
+
groupAllowFrom: z.array(z.string()).optional(),
|
|
2050
|
+
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
2051
|
+
historyLimit: z.number().int().min(0).optional(),
|
|
2052
|
+
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
2053
|
+
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
2054
|
+
textChunkLimit: z.number().int().positive().optional(),
|
|
2055
|
+
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
2056
|
+
blockStreaming: z.boolean().optional(),
|
|
2057
|
+
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
2058
|
+
groups: WhatsAppGroupsSchema,
|
|
2059
|
+
ackReaction: WhatsAppAckReactionSchema,
|
|
2060
|
+
debounceMs: z.number().int().nonnegative().optional().default(0),
|
|
2061
|
+
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
2062
|
+
});
|
|
2063
|
+
function enforceOpenDmPolicyAllowFromStar(params) {
|
|
2064
|
+
if (params.dmPolicy !== "open") return;
|
|
2065
|
+
if ((Array.isArray(params.allowFrom) ? params.allowFrom : []).map((v) => String(v).trim()).filter(Boolean).includes("*")) return;
|
|
2066
|
+
params.ctx.addIssue({
|
|
2067
|
+
code: z.ZodIssueCode.custom,
|
|
2068
|
+
path: ["allowFrom"],
|
|
2069
|
+
message: params.message
|
|
2070
|
+
});
|
|
2071
|
+
}
|
|
2072
|
+
const WhatsAppAccountSchema = WhatsAppSharedSchema.extend({
|
|
2073
|
+
name: z.string().optional(),
|
|
2074
|
+
enabled: z.boolean().optional(),
|
|
2075
|
+
authDir: z.string().optional(),
|
|
2076
|
+
mediaMaxMb: z.number().int().positive().optional()
|
|
2077
|
+
}).strict().superRefine((value, ctx) => {
|
|
2078
|
+
enforceOpenDmPolicyAllowFromStar({
|
|
2079
|
+
dmPolicy: value.dmPolicy,
|
|
2080
|
+
allowFrom: value.allowFrom,
|
|
2081
|
+
ctx,
|
|
2082
|
+
message: "channels.whatsapp.accounts.*.dmPolicy=\"open\" requires allowFrom to include \"*\""
|
|
2083
|
+
});
|
|
2084
|
+
});
|
|
2085
|
+
const WhatsAppConfigSchema = WhatsAppSharedSchema.extend({
|
|
2086
|
+
accounts: z.record(z.string(), WhatsAppAccountSchema.optional()).optional(),
|
|
2087
|
+
mediaMaxMb: z.number().int().positive().optional().default(50),
|
|
2088
|
+
actions: z.object({
|
|
2089
|
+
reactions: z.boolean().optional(),
|
|
2090
|
+
sendMessage: z.boolean().optional(),
|
|
2091
|
+
polls: z.boolean().optional()
|
|
2092
|
+
}).strict().optional()
|
|
2093
|
+
}).strict().superRefine((value, ctx) => {
|
|
2094
|
+
enforceOpenDmPolicyAllowFromStar({
|
|
2095
|
+
dmPolicy: value.dmPolicy,
|
|
2096
|
+
allowFrom: value.allowFrom,
|
|
2097
|
+
ctx,
|
|
2098
|
+
message: "channels.whatsapp.dmPolicy=\"open\" requires channels.whatsapp.allowFrom to include \"*\""
|
|
2099
|
+
});
|
|
2100
|
+
});
|
|
2101
|
+
|
|
2102
|
+
//#endregion
|
|
2103
|
+
//#region src/config/zod-schema.providers.ts
|
|
2104
|
+
const ChannelModelByChannelSchema = z.record(z.string(), z.record(z.string(), z.string())).optional();
|
|
2105
|
+
const ChannelsSchema = z.object({
|
|
2106
|
+
defaults: z.object({
|
|
2107
|
+
groupPolicy: GroupPolicySchema.optional(),
|
|
2108
|
+
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
2109
|
+
}).strict().optional(),
|
|
2110
|
+
modelByChannel: ChannelModelByChannelSchema,
|
|
2111
|
+
whatsapp: WhatsAppConfigSchema.optional(),
|
|
2112
|
+
telegram: TelegramConfigSchema.optional(),
|
|
2113
|
+
discord: DiscordConfigSchema.optional(),
|
|
2114
|
+
irc: IrcConfigSchema.optional(),
|
|
2115
|
+
googlechat: GoogleChatConfigSchema.optional(),
|
|
2116
|
+
slack: SlackConfigSchema.optional(),
|
|
2117
|
+
signal: SignalConfigSchema.optional(),
|
|
2118
|
+
imessage: IMessageConfigSchema.optional(),
|
|
2119
|
+
bluebubbles: BlueBubblesConfigSchema.optional(),
|
|
2120
|
+
msteams: MSTeamsConfigSchema.optional()
|
|
2121
|
+
}).passthrough().optional();
|
|
2122
|
+
|
|
2123
|
+
//#endregion
|
|
2124
|
+
//#region src/config/zod-schema.allowdeny.ts
|
|
2125
|
+
const AllowDenyActionSchema = z.union([z.literal("allow"), z.literal("deny")]);
|
|
2126
|
+
const AllowDenyChatTypeSchema = z.union([
|
|
2127
|
+
z.literal("direct"),
|
|
2128
|
+
z.literal("group"),
|
|
2129
|
+
z.literal("channel"),
|
|
2130
|
+
z.literal("dm")
|
|
2131
|
+
]).optional();
|
|
2132
|
+
function createAllowDenyChannelRulesSchema() {
|
|
2133
|
+
return z.object({
|
|
2134
|
+
default: AllowDenyActionSchema.optional(),
|
|
2135
|
+
rules: z.array(z.object({
|
|
2136
|
+
action: AllowDenyActionSchema,
|
|
2137
|
+
match: z.object({
|
|
2138
|
+
channel: z.string().optional(),
|
|
2139
|
+
chatType: AllowDenyChatTypeSchema,
|
|
2140
|
+
keyPrefix: z.string().optional(),
|
|
2141
|
+
rawKeyPrefix: z.string().optional()
|
|
2142
|
+
}).strict().optional()
|
|
2143
|
+
}).strict()).optional()
|
|
2144
|
+
}).strict().optional();
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2147
|
+
//#endregion
|
|
2148
|
+
//#region src/config/zod-schema.session.ts
|
|
2149
|
+
const SessionResetConfigSchema = z.object({
|
|
2150
|
+
mode: z.union([z.literal("daily"), z.literal("idle")]).optional(),
|
|
2151
|
+
atHour: z.number().int().min(0).max(23).optional(),
|
|
2152
|
+
idleMinutes: z.number().int().positive().optional()
|
|
2153
|
+
}).strict();
|
|
2154
|
+
const SessionSendPolicySchema = createAllowDenyChannelRulesSchema();
|
|
2155
|
+
const SessionSchema = z.object({
|
|
2156
|
+
scope: z.union([z.literal("per-sender"), z.literal("global")]).optional(),
|
|
2157
|
+
dmScope: z.union([
|
|
2158
|
+
z.literal("main"),
|
|
2159
|
+
z.literal("per-peer"),
|
|
2160
|
+
z.literal("per-channel-peer"),
|
|
2161
|
+
z.literal("per-account-channel-peer")
|
|
2162
|
+
]).optional(),
|
|
2163
|
+
identityLinks: z.record(z.string(), z.array(z.string())).optional(),
|
|
2164
|
+
resetTriggers: z.array(z.string()).optional(),
|
|
2165
|
+
idleMinutes: z.number().int().positive().optional(),
|
|
2166
|
+
reset: SessionResetConfigSchema.optional(),
|
|
2167
|
+
resetByType: z.object({
|
|
2168
|
+
direct: SessionResetConfigSchema.optional(),
|
|
2169
|
+
dm: SessionResetConfigSchema.optional(),
|
|
2170
|
+
group: SessionResetConfigSchema.optional(),
|
|
2171
|
+
thread: SessionResetConfigSchema.optional()
|
|
2172
|
+
}).strict().optional(),
|
|
2173
|
+
resetByChannel: z.record(z.string(), SessionResetConfigSchema).optional(),
|
|
2174
|
+
store: z.string().optional(),
|
|
2175
|
+
typingIntervalSeconds: z.number().int().positive().optional(),
|
|
2176
|
+
typingMode: TypingModeSchema.optional(),
|
|
2177
|
+
mainKey: z.string().optional(),
|
|
2178
|
+
sendPolicy: SessionSendPolicySchema.optional(),
|
|
2179
|
+
agentToAgent: z.object({ maxPingPongTurns: z.number().int().min(0).max(5).optional() }).strict().optional(),
|
|
2180
|
+
threadBindings: z.object({
|
|
2181
|
+
enabled: z.boolean().optional(),
|
|
2182
|
+
ttlHours: z.number().nonnegative().optional()
|
|
2183
|
+
}).strict().optional(),
|
|
2184
|
+
maintenance: z.object({
|
|
2185
|
+
mode: z.enum(["enforce", "warn"]).optional(),
|
|
2186
|
+
pruneAfter: z.union([z.string(), z.number()]).optional(),
|
|
2187
|
+
pruneDays: z.number().int().positive().optional(),
|
|
2188
|
+
maxEntries: z.number().int().positive().optional(),
|
|
2189
|
+
rotateBytes: z.union([z.string(), z.number()]).optional(),
|
|
2190
|
+
resetArchiveRetention: z.union([
|
|
2191
|
+
z.string(),
|
|
2192
|
+
z.number(),
|
|
2193
|
+
z.literal(false)
|
|
2194
|
+
]).optional(),
|
|
2195
|
+
maxDiskBytes: z.union([z.string(), z.number()]).optional(),
|
|
2196
|
+
highWaterBytes: z.union([z.string(), z.number()]).optional()
|
|
2197
|
+
}).strict().superRefine((val, ctx) => {
|
|
2198
|
+
if (val.pruneAfter !== void 0) try {
|
|
2199
|
+
parseDurationMs(String(val.pruneAfter).trim(), { defaultUnit: "d" });
|
|
2200
|
+
} catch {
|
|
2201
|
+
ctx.addIssue({
|
|
2202
|
+
code: z.ZodIssueCode.custom,
|
|
2203
|
+
path: ["pruneAfter"],
|
|
2204
|
+
message: "invalid duration (use ms, s, m, h, d)"
|
|
2205
|
+
});
|
|
2206
|
+
}
|
|
2207
|
+
if (val.rotateBytes !== void 0) try {
|
|
2208
|
+
parseByteSize(String(val.rotateBytes).trim(), { defaultUnit: "b" });
|
|
2209
|
+
} catch {
|
|
2210
|
+
ctx.addIssue({
|
|
2211
|
+
code: z.ZodIssueCode.custom,
|
|
2212
|
+
path: ["rotateBytes"],
|
|
2213
|
+
message: "invalid size (use b, kb, mb, gb, tb)"
|
|
2214
|
+
});
|
|
2215
|
+
}
|
|
2216
|
+
if (val.resetArchiveRetention !== void 0 && val.resetArchiveRetention !== false) try {
|
|
2217
|
+
parseDurationMs(String(val.resetArchiveRetention).trim(), { defaultUnit: "d" });
|
|
2218
|
+
} catch {
|
|
2219
|
+
ctx.addIssue({
|
|
2220
|
+
code: z.ZodIssueCode.custom,
|
|
2221
|
+
path: ["resetArchiveRetention"],
|
|
2222
|
+
message: "invalid duration (use ms, s, m, h, d)"
|
|
2223
|
+
});
|
|
2224
|
+
}
|
|
2225
|
+
if (val.maxDiskBytes !== void 0) try {
|
|
2226
|
+
parseByteSize(String(val.maxDiskBytes).trim(), { defaultUnit: "b" });
|
|
2227
|
+
} catch {
|
|
2228
|
+
ctx.addIssue({
|
|
2229
|
+
code: z.ZodIssueCode.custom,
|
|
2230
|
+
path: ["maxDiskBytes"],
|
|
2231
|
+
message: "invalid size (use b, kb, mb, gb, tb)"
|
|
2232
|
+
});
|
|
2233
|
+
}
|
|
2234
|
+
if (val.highWaterBytes !== void 0) try {
|
|
2235
|
+
parseByteSize(String(val.highWaterBytes).trim(), { defaultUnit: "b" });
|
|
2236
|
+
} catch {
|
|
2237
|
+
ctx.addIssue({
|
|
2238
|
+
code: z.ZodIssueCode.custom,
|
|
2239
|
+
path: ["highWaterBytes"],
|
|
2240
|
+
message: "invalid size (use b, kb, mb, gb, tb)"
|
|
2241
|
+
});
|
|
2242
|
+
}
|
|
2243
|
+
}).optional()
|
|
2244
|
+
}).strict().optional();
|
|
2245
|
+
const MessagesSchema = z.object({
|
|
2246
|
+
messagePrefix: z.string().optional(),
|
|
2247
|
+
responsePrefix: z.string().optional(),
|
|
2248
|
+
groupChat: GroupChatSchema,
|
|
2249
|
+
queue: QueueSchema,
|
|
2250
|
+
inbound: InboundDebounceSchema,
|
|
2251
|
+
ackReaction: z.string().optional(),
|
|
2252
|
+
ackReactionScope: z.enum([
|
|
2253
|
+
"group-mentions",
|
|
2254
|
+
"group-all",
|
|
2255
|
+
"direct",
|
|
2256
|
+
"all"
|
|
2257
|
+
]).optional(),
|
|
2258
|
+
removeAckAfterReply: z.boolean().optional(),
|
|
2259
|
+
statusReactions: z.object({
|
|
2260
|
+
enabled: z.boolean().optional(),
|
|
2261
|
+
emojis: z.object({
|
|
2262
|
+
thinking: z.string().optional(),
|
|
2263
|
+
tool: z.string().optional(),
|
|
2264
|
+
coding: z.string().optional(),
|
|
2265
|
+
web: z.string().optional(),
|
|
2266
|
+
done: z.string().optional(),
|
|
2267
|
+
error: z.string().optional(),
|
|
2268
|
+
stallSoft: z.string().optional(),
|
|
2269
|
+
stallHard: z.string().optional()
|
|
2270
|
+
}).strict().optional(),
|
|
2271
|
+
timing: z.object({
|
|
2272
|
+
debounceMs: z.number().int().min(0).optional(),
|
|
2273
|
+
stallSoftMs: z.number().int().min(0).optional(),
|
|
2274
|
+
stallHardMs: z.number().int().min(0).optional(),
|
|
2275
|
+
doneHoldMs: z.number().int().min(0).optional(),
|
|
2276
|
+
errorHoldMs: z.number().int().min(0).optional()
|
|
2277
|
+
}).strict().optional()
|
|
2278
|
+
}).strict().optional(),
|
|
2279
|
+
suppressToolErrors: z.boolean().optional(),
|
|
2280
|
+
tts: TtsConfigSchema
|
|
2281
|
+
}).strict().optional();
|
|
2282
|
+
const CommandsSchema = z.object({
|
|
2283
|
+
native: NativeCommandsSettingSchema.optional().default("auto"),
|
|
2284
|
+
text: z.boolean().optional(),
|
|
2285
|
+
config: z.boolean().optional(),
|
|
2286
|
+
debug: z.boolean().optional(),
|
|
2287
|
+
restart: z.boolean().optional().default(true),
|
|
2288
|
+
useAccessGroups: z.boolean().optional(),
|
|
2289
|
+
ownerAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
2290
|
+
ownerDisplay: z.enum(["raw", "hash"]).optional().default("raw"),
|
|
2291
|
+
ownerDisplaySecret: z.string().optional().register(sensitive),
|
|
2292
|
+
allowFrom: z.record(z.string(), z.array(z.union([z.string(), z.number()]))).optional()
|
|
2293
|
+
}).strict().optional().default(() => ({
|
|
2294
|
+
native: "auto",
|
|
2295
|
+
restart: true,
|
|
2296
|
+
ownerDisplay: "raw"
|
|
2297
|
+
}));
|
|
2298
|
+
|
|
2299
|
+
//#endregion
|
|
2300
|
+
//#region src/config/zod-schema.ts
|
|
2301
|
+
const BrowserSnapshotDefaultsSchema = z.object({ mode: z.literal("efficient").optional() }).strict().optional();
|
|
2302
|
+
const NodeHostSchema = z.object({ browserProxy: z.object({
|
|
2303
|
+
enabled: z.boolean().optional(),
|
|
2304
|
+
allowProfiles: z.array(z.string()).optional()
|
|
2305
|
+
}).strict().optional() }).strict().optional();
|
|
2306
|
+
const LoggingLevelSchema = z.union([
|
|
2307
|
+
z.literal("silent"),
|
|
2308
|
+
z.literal("fatal"),
|
|
2309
|
+
z.literal("error"),
|
|
2310
|
+
z.literal("warn"),
|
|
2311
|
+
z.literal("info"),
|
|
2312
|
+
z.literal("debug"),
|
|
2313
|
+
z.literal("trace")
|
|
2314
|
+
]);
|
|
2315
|
+
const HttpUrlSchema = z.string().url().refine((value) => {
|
|
2316
|
+
const protocol = new URL(value).protocol;
|
|
2317
|
+
return protocol === "http:" || protocol === "https:";
|
|
2318
|
+
}, "Expected http:// or https:// URL");
|
|
2319
|
+
const RemoteClawSchema = z.object({
|
|
2320
|
+
$schema: z.string().optional(),
|
|
2321
|
+
meta: z.object({
|
|
2322
|
+
lastTouchedVersion: z.string().optional(),
|
|
2323
|
+
lastTouchedAt: z.union([z.string(), z.number().transform((n, ctx) => {
|
|
2324
|
+
const d = new Date(n);
|
|
2325
|
+
if (Number.isNaN(d.getTime())) {
|
|
2326
|
+
ctx.addIssue({
|
|
2327
|
+
code: z.ZodIssueCode.custom,
|
|
2328
|
+
message: "Invalid timestamp"
|
|
2329
|
+
});
|
|
2330
|
+
return z.NEVER;
|
|
2331
|
+
}
|
|
2332
|
+
return d.toISOString();
|
|
2333
|
+
})]).optional()
|
|
2334
|
+
}).strict().optional(),
|
|
2335
|
+
env: z.object({
|
|
2336
|
+
shellEnv: z.object({
|
|
2337
|
+
enabled: z.boolean().optional(),
|
|
2338
|
+
timeoutMs: z.number().int().nonnegative().optional()
|
|
2339
|
+
}).strict().optional(),
|
|
2340
|
+
vars: z.record(z.string(), z.string()).optional()
|
|
2341
|
+
}).catchall(z.string()).optional(),
|
|
2342
|
+
wizard: z.object({
|
|
2343
|
+
lastRunAt: z.string().optional(),
|
|
2344
|
+
lastRunVersion: z.string().optional(),
|
|
2345
|
+
lastRunCommit: z.string().optional(),
|
|
2346
|
+
lastRunCommand: z.string().optional(),
|
|
2347
|
+
lastRunMode: z.union([z.literal("local"), z.literal("remote")]).optional()
|
|
2348
|
+
}).strict().optional(),
|
|
2349
|
+
diagnostics: z.object({
|
|
2350
|
+
enabled: z.boolean().optional(),
|
|
2351
|
+
flags: z.array(z.string()).optional(),
|
|
2352
|
+
otel: z.object({
|
|
2353
|
+
enabled: z.boolean().optional(),
|
|
2354
|
+
endpoint: z.string().optional(),
|
|
2355
|
+
protocol: z.union([z.literal("http/protobuf"), z.literal("grpc")]).optional(),
|
|
2356
|
+
headers: z.record(z.string(), z.string()).optional(),
|
|
2357
|
+
serviceName: z.string().optional(),
|
|
2358
|
+
traces: z.boolean().optional(),
|
|
2359
|
+
metrics: z.boolean().optional(),
|
|
2360
|
+
logs: z.boolean().optional(),
|
|
2361
|
+
sampleRate: z.number().min(0).max(1).optional(),
|
|
2362
|
+
flushIntervalMs: z.number().int().nonnegative().optional()
|
|
2363
|
+
}).strict().optional(),
|
|
2364
|
+
cacheTrace: z.object({
|
|
2365
|
+
enabled: z.boolean().optional(),
|
|
2366
|
+
filePath: z.string().optional(),
|
|
2367
|
+
includeMessages: z.boolean().optional(),
|
|
2368
|
+
includePrompt: z.boolean().optional(),
|
|
2369
|
+
includeSystem: z.boolean().optional()
|
|
2370
|
+
}).strict().optional()
|
|
2371
|
+
}).strict().optional(),
|
|
2372
|
+
logging: z.object({
|
|
2373
|
+
level: LoggingLevelSchema.optional(),
|
|
2374
|
+
file: z.string().optional(),
|
|
2375
|
+
maxFileBytes: z.number().int().positive().optional(),
|
|
2376
|
+
consoleLevel: LoggingLevelSchema.optional(),
|
|
2377
|
+
consoleStyle: z.union([
|
|
2378
|
+
z.literal("pretty"),
|
|
2379
|
+
z.literal("compact"),
|
|
2380
|
+
z.literal("json")
|
|
2381
|
+
]).optional(),
|
|
2382
|
+
redactSensitive: z.union([z.literal("off"), z.literal("tools")]).optional(),
|
|
2383
|
+
redactPatterns: z.array(z.string()).optional()
|
|
2384
|
+
}).strict().optional(),
|
|
2385
|
+
update: z.object({
|
|
2386
|
+
channel: z.union([
|
|
2387
|
+
z.literal("stable"),
|
|
2388
|
+
z.literal("beta"),
|
|
2389
|
+
z.literal("next")
|
|
2390
|
+
]).optional(),
|
|
2391
|
+
checkOnStart: z.boolean().optional(),
|
|
2392
|
+
auto: z.object({
|
|
2393
|
+
enabled: z.boolean().optional(),
|
|
2394
|
+
stableDelayHours: z.number().nonnegative().max(168).optional(),
|
|
2395
|
+
stableJitterHours: z.number().nonnegative().max(168).optional(),
|
|
2396
|
+
betaCheckIntervalHours: z.number().positive().max(24).optional()
|
|
2397
|
+
}).strict().optional()
|
|
2398
|
+
}).strict().optional(),
|
|
2399
|
+
browser: z.object({
|
|
2400
|
+
enabled: z.boolean().optional(),
|
|
2401
|
+
evaluateEnabled: z.boolean().optional(),
|
|
2402
|
+
cdpUrl: z.string().optional(),
|
|
2403
|
+
remoteCdpTimeoutMs: z.number().int().nonnegative().optional(),
|
|
2404
|
+
remoteCdpHandshakeTimeoutMs: z.number().int().nonnegative().optional(),
|
|
2405
|
+
color: z.string().optional(),
|
|
2406
|
+
executablePath: z.string().optional(),
|
|
2407
|
+
headless: z.boolean().optional(),
|
|
2408
|
+
noSandbox: z.boolean().optional(),
|
|
2409
|
+
attachOnly: z.boolean().optional(),
|
|
2410
|
+
defaultProfile: z.string().optional(),
|
|
2411
|
+
snapshotDefaults: BrowserSnapshotDefaultsSchema,
|
|
2412
|
+
ssrfPolicy: z.object({
|
|
2413
|
+
allowPrivateNetwork: z.boolean().optional(),
|
|
2414
|
+
dangerouslyAllowPrivateNetwork: z.boolean().optional(),
|
|
2415
|
+
allowedHostnames: z.array(z.string()).optional(),
|
|
2416
|
+
hostnameAllowlist: z.array(z.string()).optional()
|
|
2417
|
+
}).strict().optional(),
|
|
2418
|
+
profiles: z.record(z.string().regex(/^[a-z0-9-]+$/, "Profile names must be alphanumeric with hyphens only"), z.object({
|
|
2419
|
+
cdpPort: z.number().int().min(1).max(65535).optional(),
|
|
2420
|
+
cdpUrl: z.string().optional(),
|
|
2421
|
+
driver: z.union([z.literal("clawd"), z.literal("extension")]).optional(),
|
|
2422
|
+
color: HexColorSchema
|
|
2423
|
+
}).strict().refine((value) => value.cdpPort || value.cdpUrl, { message: "Profile must set cdpPort or cdpUrl" })).optional()
|
|
2424
|
+
}).strict().optional(),
|
|
2425
|
+
ui: z.object({
|
|
2426
|
+
seamColor: HexColorSchema.optional(),
|
|
2427
|
+
assistant: z.object({
|
|
2428
|
+
name: z.string().max(50).optional(),
|
|
2429
|
+
avatar: z.string().max(200).optional()
|
|
2430
|
+
}).strict().optional()
|
|
2431
|
+
}).strict().optional(),
|
|
2432
|
+
auth: z.object({
|
|
2433
|
+
profiles: z.record(z.string(), z.object({
|
|
2434
|
+
provider: z.string(),
|
|
2435
|
+
mode: z.union([
|
|
2436
|
+
z.literal("api_key"),
|
|
2437
|
+
z.literal("oauth"),
|
|
2438
|
+
z.literal("token")
|
|
2439
|
+
]),
|
|
2440
|
+
email: z.string().optional()
|
|
2441
|
+
}).strict()).optional(),
|
|
2442
|
+
order: z.record(z.string(), z.array(z.string())).optional(),
|
|
2443
|
+
cooldowns: z.object({
|
|
2444
|
+
billingBackoffHours: z.number().positive().optional(),
|
|
2445
|
+
billingBackoffHoursByProvider: z.record(z.string(), z.number().positive()).optional(),
|
|
2446
|
+
billingMaxHours: z.number().positive().optional(),
|
|
2447
|
+
failureWindowHours: z.number().positive().optional()
|
|
2448
|
+
}).strict().optional()
|
|
2449
|
+
}).strict().optional(),
|
|
2450
|
+
nodeHost: NodeHostSchema,
|
|
2451
|
+
agents: AgentsSchema,
|
|
2452
|
+
tools: ToolsSchema,
|
|
2453
|
+
bindings: BindingsSchema,
|
|
2454
|
+
broadcast: BroadcastSchema,
|
|
2455
|
+
audio: AudioSchema,
|
|
2456
|
+
media: z.object({ preserveFilenames: z.boolean().optional() }).strict().optional(),
|
|
2457
|
+
messages: MessagesSchema,
|
|
2458
|
+
commands: CommandsSchema,
|
|
2459
|
+
approvals: ApprovalsSchema,
|
|
2460
|
+
session: SessionSchema,
|
|
2461
|
+
cron: z.object({
|
|
2462
|
+
enabled: z.boolean().optional(),
|
|
2463
|
+
store: z.string().optional(),
|
|
2464
|
+
maxConcurrentRuns: z.number().int().positive().optional(),
|
|
2465
|
+
webhook: HttpUrlSchema.optional(),
|
|
2466
|
+
webhookToken: z.string().optional().register(sensitive),
|
|
2467
|
+
sessionRetention: z.union([z.string(), z.literal(false)]).optional(),
|
|
2468
|
+
runLog: z.object({
|
|
2469
|
+
maxBytes: z.union([z.string(), z.number()]).optional(),
|
|
2470
|
+
keepLines: z.number().int().positive().optional()
|
|
2471
|
+
}).strict().optional()
|
|
2472
|
+
}).strict().superRefine((val, ctx) => {
|
|
2473
|
+
if (val.sessionRetention !== void 0 && val.sessionRetention !== false) try {
|
|
2474
|
+
parseDurationMs(String(val.sessionRetention).trim(), { defaultUnit: "h" });
|
|
2475
|
+
} catch {
|
|
2476
|
+
ctx.addIssue({
|
|
2477
|
+
code: z.ZodIssueCode.custom,
|
|
2478
|
+
path: ["sessionRetention"],
|
|
2479
|
+
message: "invalid duration (use ms, s, m, h, d)"
|
|
2480
|
+
});
|
|
2481
|
+
}
|
|
2482
|
+
if (val.runLog?.maxBytes !== void 0) try {
|
|
2483
|
+
parseByteSize(String(val.runLog.maxBytes).trim(), { defaultUnit: "b" });
|
|
2484
|
+
} catch {
|
|
2485
|
+
ctx.addIssue({
|
|
2486
|
+
code: z.ZodIssueCode.custom,
|
|
2487
|
+
path: ["runLog", "maxBytes"],
|
|
2488
|
+
message: "invalid size (use b, kb, mb, gb, tb)"
|
|
2489
|
+
});
|
|
2490
|
+
}
|
|
2491
|
+
}).optional(),
|
|
2492
|
+
hooks: z.object({
|
|
2493
|
+
enabled: z.boolean().optional(),
|
|
2494
|
+
path: z.string().optional(),
|
|
2495
|
+
token: z.string().optional().register(sensitive),
|
|
2496
|
+
defaultSessionKey: z.string().optional(),
|
|
2497
|
+
allowRequestSessionKey: z.boolean().optional(),
|
|
2498
|
+
allowedSessionKeyPrefixes: z.array(z.string()).optional(),
|
|
2499
|
+
allowedAgentIds: z.array(z.string()).optional(),
|
|
2500
|
+
maxBodyBytes: z.number().int().positive().optional(),
|
|
2501
|
+
presets: z.array(z.string()).optional(),
|
|
2502
|
+
transformsDir: z.string().optional(),
|
|
2503
|
+
mappings: z.array(HookMappingSchema).optional(),
|
|
2504
|
+
gmail: HooksGmailSchema,
|
|
2505
|
+
internal: InternalHooksSchema
|
|
2506
|
+
}).strict().optional(),
|
|
2507
|
+
web: z.object({
|
|
2508
|
+
enabled: z.boolean().optional(),
|
|
2509
|
+
heartbeatSeconds: z.number().int().positive().optional(),
|
|
2510
|
+
reconnect: z.object({
|
|
2511
|
+
initialMs: z.number().positive().optional(),
|
|
2512
|
+
maxMs: z.number().positive().optional(),
|
|
2513
|
+
factor: z.number().positive().optional(),
|
|
2514
|
+
jitter: z.number().min(0).max(1).optional(),
|
|
2515
|
+
maxAttempts: z.number().int().min(0).optional()
|
|
2516
|
+
}).strict().optional()
|
|
2517
|
+
}).strict().optional(),
|
|
2518
|
+
channels: ChannelsSchema,
|
|
2519
|
+
discovery: z.object({
|
|
2520
|
+
wideArea: z.object({ enabled: z.boolean().optional() }).strict().optional(),
|
|
2521
|
+
mdns: z.object({ mode: z.enum([
|
|
2522
|
+
"off",
|
|
2523
|
+
"minimal",
|
|
2524
|
+
"full"
|
|
2525
|
+
]).optional() }).strict().optional()
|
|
2526
|
+
}).strict().optional(),
|
|
2527
|
+
canvasHost: z.object({
|
|
2528
|
+
enabled: z.boolean().optional(),
|
|
2529
|
+
root: z.string().optional(),
|
|
2530
|
+
port: z.number().int().positive().optional(),
|
|
2531
|
+
liveReload: z.boolean().optional()
|
|
2532
|
+
}).strict().optional(),
|
|
2533
|
+
talk: z.object({
|
|
2534
|
+
provider: z.string().optional(),
|
|
2535
|
+
providers: z.record(z.string(), z.object({
|
|
2536
|
+
voiceId: z.string().optional(),
|
|
2537
|
+
voiceAliases: z.record(z.string(), z.string()).optional(),
|
|
2538
|
+
modelId: z.string().optional(),
|
|
2539
|
+
outputFormat: z.string().optional(),
|
|
2540
|
+
apiKey: z.string().optional().register(sensitive)
|
|
2541
|
+
}).catchall(z.unknown())).optional(),
|
|
2542
|
+
voiceId: z.string().optional(),
|
|
2543
|
+
voiceAliases: z.record(z.string(), z.string()).optional(),
|
|
2544
|
+
modelId: z.string().optional(),
|
|
2545
|
+
outputFormat: z.string().optional(),
|
|
2546
|
+
apiKey: z.string().optional().register(sensitive),
|
|
2547
|
+
interruptOnSpeech: z.boolean().optional()
|
|
2548
|
+
}).strict().optional(),
|
|
2549
|
+
gateway: z.object({
|
|
2550
|
+
port: z.number().int().positive().optional(),
|
|
2551
|
+
mode: z.union([z.literal("local"), z.literal("remote")]).optional(),
|
|
2552
|
+
bind: z.union([
|
|
2553
|
+
z.literal("auto"),
|
|
2554
|
+
z.literal("lan"),
|
|
2555
|
+
z.literal("loopback"),
|
|
2556
|
+
z.literal("custom"),
|
|
2557
|
+
z.literal("tailnet")
|
|
2558
|
+
]).optional(),
|
|
2559
|
+
customBindHost: z.string().optional(),
|
|
2560
|
+
controlUi: z.object({
|
|
2561
|
+
enabled: z.boolean().optional(),
|
|
2562
|
+
basePath: z.string().optional(),
|
|
2563
|
+
root: z.string().optional(),
|
|
2564
|
+
allowedOrigins: z.array(z.string()).optional(),
|
|
2565
|
+
dangerouslyAllowHostHeaderOriginFallback: z.boolean().optional(),
|
|
2566
|
+
allowInsecureAuth: z.boolean().optional(),
|
|
2567
|
+
dangerouslyDisableDeviceAuth: z.boolean().optional()
|
|
2568
|
+
}).strict().optional(),
|
|
2569
|
+
auth: z.object({
|
|
2570
|
+
mode: z.union([
|
|
2571
|
+
z.literal("none"),
|
|
2572
|
+
z.literal("token"),
|
|
2573
|
+
z.literal("password"),
|
|
2574
|
+
z.literal("trusted-proxy")
|
|
2575
|
+
]).optional(),
|
|
2576
|
+
token: z.string().optional().register(sensitive),
|
|
2577
|
+
password: z.string().optional().register(sensitive),
|
|
2578
|
+
allowTailscale: z.boolean().optional(),
|
|
2579
|
+
rateLimit: z.object({
|
|
2580
|
+
maxAttempts: z.number().optional(),
|
|
2581
|
+
windowMs: z.number().optional(),
|
|
2582
|
+
lockoutMs: z.number().optional(),
|
|
2583
|
+
exemptLoopback: z.boolean().optional()
|
|
2584
|
+
}).strict().optional(),
|
|
2585
|
+
trustedProxy: z.object({
|
|
2586
|
+
userHeader: z.string().min(1, "userHeader is required for trusted-proxy mode"),
|
|
2587
|
+
requiredHeaders: z.array(z.string()).optional(),
|
|
2588
|
+
allowUsers: z.array(z.string()).optional()
|
|
2589
|
+
}).strict().optional()
|
|
2590
|
+
}).strict().optional(),
|
|
2591
|
+
trustedProxies: z.array(z.string()).optional(),
|
|
2592
|
+
allowRealIpFallback: z.boolean().optional(),
|
|
2593
|
+
tools: z.object({
|
|
2594
|
+
deny: z.array(z.string()).optional(),
|
|
2595
|
+
allow: z.array(z.string()).optional()
|
|
2596
|
+
}).strict().optional(),
|
|
2597
|
+
channelHealthCheckMinutes: z.number().int().min(0).optional(),
|
|
2598
|
+
tailscale: z.object({
|
|
2599
|
+
mode: z.union([
|
|
2600
|
+
z.literal("off"),
|
|
2601
|
+
z.literal("serve"),
|
|
2602
|
+
z.literal("funnel")
|
|
2603
|
+
]).optional(),
|
|
2604
|
+
resetOnExit: z.boolean().optional()
|
|
2605
|
+
}).strict().optional(),
|
|
2606
|
+
remote: z.object({
|
|
2607
|
+
url: z.string().optional(),
|
|
2608
|
+
transport: z.union([z.literal("ssh"), z.literal("direct")]).optional(),
|
|
2609
|
+
token: z.string().optional().register(sensitive),
|
|
2610
|
+
password: z.string().optional().register(sensitive),
|
|
2611
|
+
tlsFingerprint: z.string().optional(),
|
|
2612
|
+
sshTarget: z.string().optional(),
|
|
2613
|
+
sshIdentity: z.string().optional()
|
|
2614
|
+
}).strict().optional(),
|
|
2615
|
+
reload: z.object({
|
|
2616
|
+
mode: z.union([
|
|
2617
|
+
z.literal("off"),
|
|
2618
|
+
z.literal("restart"),
|
|
2619
|
+
z.literal("hot"),
|
|
2620
|
+
z.literal("hybrid")
|
|
2621
|
+
]).optional(),
|
|
2622
|
+
debounceMs: z.number().int().min(0).optional()
|
|
2623
|
+
}).strict().optional(),
|
|
2624
|
+
tls: z.object({
|
|
2625
|
+
enabled: z.boolean().optional(),
|
|
2626
|
+
autoGenerate: z.boolean().optional(),
|
|
2627
|
+
certPath: z.string().optional(),
|
|
2628
|
+
keyPath: z.string().optional(),
|
|
2629
|
+
caPath: z.string().optional()
|
|
2630
|
+
}).optional(),
|
|
2631
|
+
http: z.object({
|
|
2632
|
+
endpoints: z.object({
|
|
2633
|
+
chatCompletions: z.object({ enabled: z.boolean().optional() }).strict().optional(),
|
|
2634
|
+
responses: z.object({
|
|
2635
|
+
enabled: z.boolean().optional(),
|
|
2636
|
+
maxBodyBytes: z.number().int().positive().optional(),
|
|
2637
|
+
maxUrlParts: z.number().int().nonnegative().optional(),
|
|
2638
|
+
files: z.object({
|
|
2639
|
+
allowUrl: z.boolean().optional(),
|
|
2640
|
+
urlAllowlist: z.array(z.string()).optional(),
|
|
2641
|
+
allowedMimes: z.array(z.string()).optional(),
|
|
2642
|
+
maxBytes: z.number().int().positive().optional(),
|
|
2643
|
+
maxChars: z.number().int().positive().optional(),
|
|
2644
|
+
maxRedirects: z.number().int().nonnegative().optional(),
|
|
2645
|
+
timeoutMs: z.number().int().positive().optional(),
|
|
2646
|
+
pdf: z.object({
|
|
2647
|
+
maxPages: z.number().int().positive().optional(),
|
|
2648
|
+
maxPixels: z.number().int().positive().optional(),
|
|
2649
|
+
minTextChars: z.number().int().nonnegative().optional()
|
|
2650
|
+
}).strict().optional()
|
|
2651
|
+
}).strict().optional(),
|
|
2652
|
+
images: z.object({
|
|
2653
|
+
allowUrl: z.boolean().optional(),
|
|
2654
|
+
urlAllowlist: z.array(z.string()).optional(),
|
|
2655
|
+
allowedMimes: z.array(z.string()).optional(),
|
|
2656
|
+
maxBytes: z.number().int().positive().optional(),
|
|
2657
|
+
maxRedirects: z.number().int().nonnegative().optional(),
|
|
2658
|
+
timeoutMs: z.number().int().positive().optional()
|
|
2659
|
+
}).strict().optional()
|
|
2660
|
+
}).strict().optional()
|
|
2661
|
+
}).strict().optional(),
|
|
2662
|
+
securityHeaders: z.object({ strictTransportSecurity: z.union([z.string(), z.literal(false)]).optional() }).strict().optional()
|
|
2663
|
+
}).strict().optional(),
|
|
2664
|
+
nodes: z.object({
|
|
2665
|
+
browser: z.object({
|
|
2666
|
+
mode: z.union([
|
|
2667
|
+
z.literal("auto"),
|
|
2668
|
+
z.literal("manual"),
|
|
2669
|
+
z.literal("off")
|
|
2670
|
+
]).optional(),
|
|
2671
|
+
node: z.string().optional()
|
|
2672
|
+
}).strict().optional(),
|
|
2673
|
+
allowCommands: z.array(z.string()).optional(),
|
|
2674
|
+
denyCommands: z.array(z.string()).optional()
|
|
2675
|
+
}).strict().optional()
|
|
2676
|
+
}).strict().optional(),
|
|
2677
|
+
memory: z.unknown().optional(),
|
|
2678
|
+
plugins: z.object({
|
|
2679
|
+
enabled: z.boolean().optional(),
|
|
2680
|
+
allow: z.array(z.string()).optional(),
|
|
2681
|
+
deny: z.array(z.string()).optional(),
|
|
2682
|
+
load: z.object({ paths: z.array(z.string()).optional() }).strict().optional(),
|
|
2683
|
+
slots: z.object({ memory: z.string().optional() }).strict().optional(),
|
|
2684
|
+
entries: z.record(z.string(), z.object({
|
|
2685
|
+
enabled: z.boolean().optional(),
|
|
2686
|
+
config: z.record(z.string(), z.unknown()).optional()
|
|
2687
|
+
}).strict()).optional(),
|
|
2688
|
+
installs: z.record(z.string(), z.object({ ...InstallRecordShape }).strict()).optional()
|
|
2689
|
+
}).strict().optional()
|
|
2690
|
+
}).strict().superRefine((cfg, ctx) => {
|
|
2691
|
+
const agents = cfg.agents?.list ?? [];
|
|
2692
|
+
if (agents.length === 0) return;
|
|
2693
|
+
const agentIds = new Set(agents.map((agent) => agent.id));
|
|
2694
|
+
const broadcast = cfg.broadcast;
|
|
2695
|
+
if (!broadcast) return;
|
|
2696
|
+
for (const [peerId, ids] of Object.entries(broadcast)) {
|
|
2697
|
+
if (peerId === "strategy") continue;
|
|
2698
|
+
if (!Array.isArray(ids)) continue;
|
|
2699
|
+
for (let idx = 0; idx < ids.length; idx += 1) {
|
|
2700
|
+
const agentId = ids[idx];
|
|
2701
|
+
if (!agentIds.has(agentId)) ctx.addIssue({
|
|
2702
|
+
code: z.ZodIssueCode.custom,
|
|
2703
|
+
path: [
|
|
2704
|
+
"broadcast",
|
|
2705
|
+
peerId,
|
|
2706
|
+
idx
|
|
2707
|
+
],
|
|
2708
|
+
message: `Unknown agent id "${agentId}" (not in agents.list).`
|
|
2709
|
+
});
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
});
|
|
2713
|
+
|
|
2714
|
+
//#endregion
|
|
2715
|
+
export { parseByteSize as _, mapStreamingModeToSlackLegacyDraftStreamMode as a, resolveSlackStreamingMode as c, resolveIMessageAttachmentRoots as d, resolveIMessageRemoteAttachmentRoots as f, parseDurationMs as g, isSafeExecutableValue as h, resolveTelegramCustomCommands as i, resolveTelegramPreviewStreamMode as l, sensitive as m, TELEGRAM_COMMAND_NAME_PATTERN as n, resolveDiscordPreviewStreamMode as o, normalizeScpRemoteHost as p, normalizeTelegramCommandName as r, resolveSlackNativeStreaming as s, RemoteClawSchema as t, isInboundPathAllowed as u };
|