remoteclaw 0.1.0-next.cd6ddde → 0.1.0-next.cf9ccbe
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounts-79XhjwAj.js +32 -0
- package/dist/accounts-B1M3fOxL.js +272 -0
- package/dist/accounts-BwbvnKsW.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-P7cmIXUM.js +206 -0
- package/dist/accounts-XFgBY644.js +47 -0
- package/dist/accounts-_ZuNC5bz.js +47 -0
- package/dist/ack-reactions-BGJ9Vigf.js +621 -0
- package/dist/ack-reactions-Diu9O24z.js +621 -0
- package/dist/acp-cli-BwZ-va2P.js +1316 -0
- package/dist/acp-cli-eVKByz-j.js +1311 -0
- package/dist/active-listener--jrUO-8L.js +37 -0
- package/dist/active-listener-C7SyMcNY.js +37 -0
- package/dist/agent-BAxK2KQW.js +688 -0
- package/dist/agent-Dd5Yfhmq.js +687 -0
- package/dist/agent-helpers-5F0tdxud.js +400 -0
- package/dist/agent-scope-BA1HP4K6.js +114 -0
- package/dist/agent-scope-CAQLm3LP.js +116 -0
- package/dist/agents-2VlLHxv-.js +754 -0
- package/dist/agents.config-CmyzLYqW.js +116 -0
- package/dist/agents.config-DerBqRzk.js +116 -0
- package/dist/audio-ClIuKwkl.js +43 -0
- package/dist/audio-DqlIYYTb.js +43 -0
- package/dist/audit-Cn0cNCE4.js +3114 -0
- package/dist/audit-DXY4NHBC.js +3114 -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-CBWZhANO.js +294 -0
- package/dist/binaries-CYwLdubd.js +13 -0
- package/dist/bindings-DFAFatwT.js +69 -0
- package/dist/bindings-GUKIzFCp.js +69 -0
- package/dist/bonjour-discovery-AQMJqY4V.js +378 -0
- package/dist/bonjour-discovery-BLcPWHFJ.js +378 -0
- package/dist/boot/handler.js +28 -28
- package/dist/browser-cli-8Dv5ogFT.js +1690 -0
- package/dist/browser-cli-wNLo8SOy.js +1694 -0
- package/dist/build-info.json +3 -3
- package/dist/call-BTHzKFbN.js +518 -0
- package/dist/call-D_NchaCs.js +517 -0
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/catalog-DgpN5jxU.js +186 -0
- package/dist/catalog-k056Nh93.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-BatlvP_U.js +292 -0
- package/dist/channel-activity-BhT7NQ_v.js +94 -0
- package/dist/channel-activity-CvjEwpJz.js +94 -0
- package/dist/channel-options-BCccA2WC.js +32 -0
- package/dist/channel-options-VPR_pNyS.js +33 -0
- package/dist/channel-selection-AH6_y6RS.js +51 -0
- package/dist/channel-selection-ovohyJQZ.js +51 -0
- package/dist/channel-web-APDaQ_wp.js +2134 -0
- package/dist/channel-web-BW_YuNlT.js +2132 -0
- package/dist/channels-cli-BBkHQtBI.js +1440 -0
- package/dist/channels-cli-CKcOwL-Q.js +1436 -0
- package/dist/channels-status-issues-BbYNzwLp.js +18 -0
- package/dist/channels-status-issues-DRybAijg.js +18 -0
- package/dist/chat-envelope-AJFUAuBM.js +248 -0
- package/dist/chat-envelope-BrfcPlDM.js +248 -0
- package/dist/chrome-Bv2UtAMQ.js +1732 -0
- package/dist/chrome-C6Vc_7su.js +1733 -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/cli/daemon-cli.js +1 -1
- package/dist/cli-Cs1n6-eD.js +135 -0
- package/dist/cli-Di3p1tLN.js +131 -0
- package/dist/client-B6h7bgbF.js +2311 -0
- package/dist/client-CMtdm9Ii.js +2311 -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 +1 -1
- package/dist/command-registry-BV2MH_iw.js +215 -0
- package/dist/commands-D93TXYhv.js +41 -0
- package/dist/commands-UD7V7QC9.js +41 -0
- package/dist/commands-registry-CCbTtSSK.js +891 -0
- package/dist/commands-registry-De8JhZLG.js +890 -0
- package/dist/common-D4fL3S2m.js +156 -0
- package/dist/common-DXNisGxw.js +156 -0
- package/dist/completion-cli-319xyosV.js +452 -0
- package/dist/completion-cli-B6Zimnek.js +452 -0
- package/dist/config-BTH7fB_v.js +3345 -0
- package/dist/config-DwuBnd6D.js +3347 -0
- package/dist/config-cli-c_Itt86J.js +247 -0
- package/dist/config-cli-rcMB3A3B.js +243 -0
- package/dist/config-guard-BcT7soTj.js +92 -0
- package/dist/config-guard-Bqak3bDc.js +75 -0
- package/dist/config-validation-CHEjSJ5K.js +18 -0
- package/dist/config-validation-CvgqLhyG.js +18 -0
- package/dist/configure-Cb3bbYnh.js +891 -0
- package/dist/configure-R2gWNv5y.js +889 -0
- package/dist/control-auth-DrGYtMJM.js +397 -0
- package/dist/control-auth-KY4Qdr2I.js +397 -0
- package/dist/control-ui-assets-DO1L6M0S.js +186 -0
- package/dist/control-ui-assets-S_TLo6Fs.js +186 -0
- package/dist/conversation-label-CMOfgCVl.js +36 -0
- package/dist/cron-cli-C7h_hLHu.js +495 -0
- package/dist/cron-cli-DTNg0Uvl.js +499 -0
- package/dist/daemon-cli-BlJS9zWM.js +737 -0
- package/dist/daemon-cli-Cfc1yszp.js +735 -0
- package/dist/daemon-cli.js +124 -1071
- package/dist/daemon-install-BbBLuLWg.js +60 -0
- package/dist/daemon-install-WEBvqVOj.js +56 -0
- package/dist/daemon-install-helpers-BVtPC2TK.js +504 -0
- package/dist/daemon-install-helpers-DVr51zvE.js +504 -0
- package/dist/deliver-EB272zWh.js +481 -0
- package/dist/deliver-iGD_woru.js +481 -0
- package/dist/delivery-queue-BDvalA10.js +244 -0
- package/dist/delivery-queue-BimvYz5E.js +244 -0
- package/dist/devices-cli-BXCOsNFc.js +323 -0
- package/dist/devices-cli-CHGdYfrz.js +319 -0
- package/dist/diagnostics-BzzhTQzK.js +35 -0
- package/dist/diagnostics-DILtxtcE.js +35 -0
- package/dist/directory-cli-COS40yI9.js +221 -0
- package/dist/directory-cli-Cb5j1JTC.js +225 -0
- package/dist/dispatcher-BUqxh_mA.js +174 -0
- package/dist/dispatcher-By-KZRWZ.js +173 -0
- package/dist/dm-policy-shared-BCp9_z3w.js +22 -0
- package/dist/dm-policy-shared-DgeKqjOu.js +22 -0
- package/dist/dns-cli-B8yyXB2N.js +203 -0
- package/dist/dns-cli-DAkTk-gM.js +199 -0
- package/dist/dock-B0bIIDS3.js +906 -0
- package/dist/dock-C3PzQ6CS.js +907 -0
- package/dist/doctor-completion-B_Zp4fZk.js +92 -0
- package/dist/doctor-completion-CZ1P5laQ.js +92 -0
- package/dist/doctor-config-flow-BDDsR2J1.js +978 -0
- package/dist/doctor-config-flow-CwFFRUic.js +979 -0
- package/dist/enable-C3I9dWel.js +59 -0
- package/dist/enable-DnwKeWnR.js +59 -0
- package/dist/entry.js +62 -6
- package/dist/env-DyyqmxSM.js +60 -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/extensionAPI.js +263 -1088
- package/dist/fetch-BMQq41sB.js +281 -0
- package/dist/fetch-Cky99wYB.js +281 -0
- package/dist/fetch-D3tw4B4n.js +67 -0
- package/dist/fetch-Dgm9ZHFm.js +67 -0
- package/dist/file-lock-DWH0TfVu.js +107 -0
- package/dist/file-lock-DXW9h9ek.js +107 -0
- package/dist/fs-safe-BjSd07M4.js +115 -0
- package/dist/fs-safe-aWIhCWlb.js +125 -0
- package/dist/gateway-cli-BLeY_1DX.js +24154 -0
- package/dist/gateway-cli-Cu4vwhmi.js +24150 -0
- package/dist/gateway-rpc-B92CH0D3.js +28 -0
- package/dist/gateway-rpc-DZNlWapO.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-BYl7T-4m.js +1417 -0
- package/dist/health-DdviISKg.js +1414 -0
- package/dist/health-format-BE5TK5bs.js +28 -0
- package/dist/heartbeat-visibility-BO3iRpB6.js +125 -0
- package/dist/heartbeat-visibility-Cwp4TrTv.js +125 -0
- package/dist/help-format-D3JhWp1E.js +17 -0
- package/dist/hook-runner-global-C1thol1d.js +527 -0
- package/dist/hooks-cli-BKS9uZ0H.js +1221 -0
- package/dist/hooks-cli-FLWcCr9q.js +1217 -0
- package/dist/image-ops-CX41n0v5.js +354 -0
- package/dist/image-ops-DSL3eFfQ.js +354 -0
- package/dist/import-BSFgt760.js +604 -0
- package/dist/import-Da1CHJJg.js +606 -0
- package/dist/inbound-context-a5bzQvRt.js +68 -0
- package/dist/index.js +127 -101
- package/dist/inspect-BEpFbi0c.js +286 -0
- package/dist/inspect-BeNNpWna.js +286 -0
- package/dist/installs-CH7Qq_m_.js +319 -0
- package/dist/installs-CcM8H2YA.js +319 -0
- package/dist/ipv4-DNo9AFDu.js +46 -0
- package/dist/ipv4-VfoVR5uR.js +46 -0
- package/dist/ir-BPwP8hIc.js +972 -0
- package/dist/lifecycle-core-5Zxqwa6V.js +476 -0
- package/dist/lifecycle-core-C1bGeLby.js +474 -0
- package/dist/links-CtGBIrG8.js +15 -0
- package/dist/loader-BoP3JA-r.js +22411 -0
- package/dist/loader-DXbpue-L.js +22414 -0
- package/dist/logger-ASsO5Nz-.js +49 -0
- package/dist/logging-Cd9y2AdQ.js +20 -0
- package/dist/login-B2UXzgaB.js +61 -0
- package/dist/login-BEFL3xY9.js +62 -0
- package/dist/login-qr-C7wAz2fe.js +329 -0
- package/dist/login-qr-DWpUP1Ud.js +325 -0
- package/dist/logs-cli-CAcd-pXA.js +240 -0
- package/dist/logs-cli-D7Bzarht.js +236 -0
- package/dist/markdown-tables-BBNUZp4n.js +29 -0
- package/dist/markdown-tables-NgPcfXoF.js +29 -0
- package/dist/media-4-qOIjO-.js +971 -0
- package/dist/media-DTwJhAbE.js +9481 -0
- package/dist/message-action-names-BsNTjuBE.js +2520 -0
- package/dist/message-action-names-ocKcq8_3.js +2520 -0
- package/dist/message-channel-CtcVHawF.js +91 -0
- package/dist/mime-CAqaK3kp.js +146 -0
- package/dist/mime-ViuhRuMM.js +146 -0
- package/dist/net-DSkFMHJ8.js +225 -0
- package/dist/net-DTqfFYzt.js +225 -0
- package/dist/node-cli-BeXU67eQ.js +1458 -0
- package/dist/node-cli-i2aCtnmM.js +1462 -0
- package/dist/node-service-RyMlWp8N.js +67 -0
- package/dist/node-service-TL9b6Qfz.js +67 -0
- package/dist/nodes-cli-CtqnXBMD.js +1346 -0
- package/dist/nodes-cli-DgQU3LrG.js +1350 -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-BC1LqCm2.js +86 -0
- package/dist/npm-resolution-DhlhUmRF.js +86 -0
- package/dist/onboard-CHowLVEG.js +647 -0
- package/dist/onboard-D_eCnKjt.js +649 -0
- package/dist/onboard-auth-cNtb3FTP.js +211 -0
- package/dist/onboard-auth-gwz-0mZ6.js +207 -0
- package/dist/onboard-channels-CFsUIDWq.js +2618 -0
- package/dist/onboard-channels-ZCML5CWb.js +2619 -0
- package/dist/onboard-helpers-8afRV_Tm.js +364 -0
- package/dist/onboard-helpers-DTRrJLj-.js +363 -0
- package/dist/onboard-remote-CFkvVAYg.js +127 -0
- package/dist/onboard-remote-JfBnmK70.js +127 -0
- package/dist/onboarding-DIxNghyi.js +586 -0
- package/dist/onboarding-Dhh0bjrb.js +588 -0
- package/dist/onboarding.finalize-5uipJuOl.js +403 -0
- package/dist/onboarding.finalize-De4etQul.js +405 -0
- package/dist/onboarding.gateway-config-DolBTXWT.js +196 -0
- package/dist/onboarding.gateway-config-rJkIamlG.js +202 -0
- package/dist/outbound-CPMaDtgC.js +220 -0
- package/dist/outbound-CYSuCMiW.js +221 -0
- package/dist/outbound-attachment-Ci02LXoq.js +18 -0
- package/dist/outbound-attachment-CqZ7Qc_o.js +18 -0
- package/dist/outbound-attachment-CuqWdsdV.js +18 -0
- package/dist/pairing-cli-B9JKvvST.js +126 -0
- package/dist/pairing-cli-C4HrfIHe.js +130 -0
- package/dist/pairing-labels-CBmGQ31P.js +9 -0
- package/dist/pairing-labels-D0xwC7Xb.js +9 -0
- package/dist/pairing-store-BoF0g-iN.js +459 -0
- package/dist/pairing-store-CseXj-5p.js +460 -0
- package/dist/path-env-CPZbb7me.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-B_9J1XED.js +302 -0
- package/dist/plugin-auto-enable-DghjlFCL.js +301 -0
- package/dist/plugin-registry-68h2T8vi.js +33 -0
- package/dist/plugin-registry-BitdVPb4.js +33 -0
- package/dist/plugin-sdk/agents/subagent-registry.store.d.ts +0 -1
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-utils.d.ts +0 -11
- package/dist/plugin-sdk/auto-reply/reply/commands-status.d.ts +1 -4
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents/shared.d.ts +1 -1
- package/dist/plugin-sdk/auto-reply/reply/commands-types.d.ts +1 -10
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.levels.d.ts +1 -4
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.params.d.ts +1 -8
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.parse.d.ts +1 -23
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.persist.d.ts +0 -2
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.shared.d.ts +0 -22
- package/dist/plugin-sdk/auto-reply/reply/directives.d.ts +2 -29
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-apply.d.ts +0 -8
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-utils.d.ts +0 -1
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives.d.ts +1 -15
- package/dist/plugin-sdk/auto-reply/reply/get-reply-inline-actions.d.ts +1 -8
- package/dist/plugin-sdk/auto-reply/reply/get-reply-run.d.ts +1 -11
- package/dist/plugin-sdk/auto-reply/reply/queue/types.d.ts +1 -13
- package/dist/plugin-sdk/auto-reply/reply.d.ts +1 -1
- package/dist/plugin-sdk/auto-reply/status.d.ts +1 -4
- package/dist/plugin-sdk/auto-reply/templating.d.ts +0 -4
- package/dist/plugin-sdk/auto-reply/thinking.d.ts +0 -4
- package/dist/plugin-sdk/channels/dock.d.ts +1 -2
- package/dist/plugin-sdk/channels/plugins/types.adapters.d.ts +0 -6
- package/dist/plugin-sdk/channels/plugins/types.d.ts +1 -1
- package/dist/plugin-sdk/channels/plugins/types.plugin.d.ts +1 -2
- package/dist/plugin-sdk/commands/onboard-helpers.d.ts +0 -1
- package/dist/plugin-sdk/commands/onboard-types.d.ts +0 -2
- package/dist/plugin-sdk/config/legacy.migrations.d.ts +2 -1
- package/dist/plugin-sdk/config/legacy.shared.d.ts +0 -9
- package/dist/plugin-sdk/config/sessions/types.d.ts +0 -7
- package/dist/plugin-sdk/config/types.agent-defaults.d.ts +0 -8
- package/dist/plugin-sdk/config/types.base.d.ts +0 -1
- package/dist/plugin-sdk/config/types.messages.d.ts +0 -4
- package/dist/plugin-sdk/config/types.tools.d.ts +0 -73
- package/dist/plugin-sdk/config/types.tts.d.ts +2 -1
- package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +0 -4
- package/dist/plugin-sdk/config/zod-schema.agent-runtime.d.ts +7 -197
- package/dist/plugin-sdk/config/zod-schema.agents.d.ts +2 -10
- package/dist/plugin-sdk/config/zod-schema.core.d.ts +6 -234
- package/dist/plugin-sdk/config/zod-schema.d.ts +98 -301
- package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +148 -160
- package/dist/plugin-sdk/config/zod-schema.providers-whatsapp.d.ts +12 -12
- package/dist/plugin-sdk/config/zod-schema.providers.d.ts +88 -96
- package/dist/plugin-sdk/config/zod-schema.session.d.ts +4 -10
- package/dist/plugin-sdk/gateway/protocol/index.d.ts +11 -16
- package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +0 -5
- package/dist/plugin-sdk/gateway/session-utils.types.d.ts +0 -1
- package/dist/plugin-sdk/index.js +295 -1236
- package/dist/plugin-sdk/line/config-schema.d.ts +4 -4
- package/dist/plugin-sdk/logging/levels.d.ts +1 -1
- package/dist/plugin-sdk/middleware/cli-runtime-base.d.ts +6 -0
- package/dist/plugin-sdk/middleware/runtimes/claude.d.ts +6 -0
- package/dist/plugin-sdk/middleware/runtimes/codex.d.ts +2 -2
- package/dist/plugin-sdk/middleware/runtimes/gemini.d.ts +8 -1
- package/dist/plugin-sdk/plugin-sdk/index.d.ts +3 -1
- package/dist/plugin-sdk/plugins/manifest-registry.d.ts +2 -0
- package/dist/plugin-sdk/plugins/manifest.d.ts +4 -4
- package/dist/plugin-sdk/plugins/registry.d.ts +18 -0
- package/dist/plugin-sdk/plugins/types.d.ts +4 -0
- package/dist/plugin-sdk/slack/manifest.d.ts +17 -0
- package/dist/plugin-sdk/stt/preflight.d.ts +2 -4
- package/dist/plugin-sdk/stt/providers/index.d.ts +1 -1
- package/dist/plugin-sdk/stt/providers/shared.d.ts +20 -1
- 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.d.ts +13 -5
- package/dist/plugin-sdk/tts/types.d.ts +21 -0
- package/dist/plugins-BviLFPLV.js +255 -0
- package/dist/plugins-CaudBUbl.js +254 -0
- package/dist/plugins-cli-CsLhphNr.js +803 -0
- package/dist/plugins-cli-CujSP9NS.js +807 -0
- package/dist/ports-BtuzUQHl.js +370 -0
- package/dist/ports-CMcHia07.js +96 -0
- package/dist/ports-gRBeuUtp.js +316 -0
- package/dist/preflight-Bq8rimP-.js +667 -0
- package/dist/preflight-DyYbEp9X.js +667 -0
- package/dist/program-G8cGMPuz.js +250 -0
- package/dist/program-context-B9BwrbSx.js +474 -0
- package/dist/progress-BcwxtM9Q.js +124 -0
- package/dist/prompt-DtWGd43j.js +21 -0
- package/dist/prompt-select-styled-CpOsmtZi.js +1672 -0
- package/dist/prompt-select-styled-D-qBqrEJ.js +1669 -0
- package/dist/prompt-style-BpUMhEHC.js +9 -0
- package/dist/provider-auth-B7QgxlKt.js +187 -0
- package/dist/provider-auth-j-EQvvIk.js +187 -0
- package/dist/provider-dispatcher-Bx6CaIoV.js +660 -0
- package/dist/provider-dispatcher-DhkvjhO5.js +659 -0
- package/dist/push-apns--nEiZmEN.js +711 -0
- package/dist/push-apns-BtS6B6lb.js +713 -0
- package/dist/pw-ai-BpCsXF-x.js +1908 -0
- package/dist/pw-ai-ud_Kbn5S.js +1911 -0
- package/dist/qr-cli-BCeVLGfz.js +353 -0
- package/dist/qr-cli-Crsqtw01.js +349 -0
- package/dist/redact-Ci96Gj0O.js +191 -0
- package/dist/redact-snapshot-B9nof-Pb.js +1952 -0
- package/dist/redact-snapshot-BKiS91Mj.js +1952 -0
- package/dist/register.agent-GnCbOS2U.js +1014 -0
- package/dist/register.agent-Mwu5hgjA.js +292 -0
- package/dist/register.configure-By-Re240.js +130 -0
- package/dist/register.configure-rB-Q0WKu.js +135 -0
- package/dist/register.import-B83Dn36B.js +29 -0
- package/dist/register.import-wIYU2cVW.js +31 -0
- package/dist/register.maintenance-D5KctP9K.js +503 -0
- package/dist/register.maintenance-Er88Oxcm.js +501 -0
- package/dist/register.message-BQhRoEQQ.js +687 -0
- package/dist/register.message-CvZKWeGb.js +691 -0
- package/dist/register.onboard-BG064oHg.js +94 -0
- package/dist/register.onboard-CAKyc1Fc.js +98 -0
- package/dist/register.setup-C9sZLS_P.js +114 -0
- package/dist/register.setup-CVsZdhkJ.js +118 -0
- package/dist/register.status-health-sessions-BZJ0wTSa.js +429 -0
- package/dist/register.status-health-sessions-CyrUwwtB.js +667 -0
- package/dist/register.subclis-CQ_Pjkyv.js +267 -0
- package/dist/replies-BIx-MbQ7.js +136 -0
- package/dist/replies-DVU655H4.js +136 -0
- package/dist/reply-CL5VMSKN.js +12372 -0
- package/dist/reply-XKyfU3rS.js +12375 -0
- package/dist/reply-directives-DQfJ001O.js +182 -0
- package/dist/reply-directives-DfUITt7C.js +182 -0
- package/dist/reply-payloads-ZHo6kfTS.js +527 -0
- package/dist/reply-prefix-BSf3PC0x.js +37 -0
- package/dist/reply-prefix-DBTlMHLK.js +37 -0
- package/dist/resolve-route-B-_IgETc.js +249 -0
- package/dist/resolve-route-C8ZsgWDQ.js +249 -0
- package/dist/response-prefix-template-3LeqJx2X.js +134 -0
- package/dist/response-prefix-template-DBrUVx5V.js +134 -0
- package/dist/retry-CDrH81GP.js +77 -0
- package/dist/retry-Dar_7pCv.js +77 -0
- package/dist/run-main-DBFpx1kt.js +308 -0
- package/dist/secure-random-CLWSvf8A.js +44 -0
- package/dist/security-cli-B8lXw9ke.js +488 -0
- package/dist/security-cli-CRkS3VAf.js +483 -0
- package/dist/send-6g8QKfWj.js +374 -0
- package/dist/send-B5Hz1PIn.js +29 -0
- package/dist/send-B8eIlA1u.js +349 -0
- package/dist/send-BFZPQE4j.js +492 -0
- package/dist/send-BpTDvE0D.js +1779 -0
- package/dist/send-BxOrO1Wv.js +1776 -0
- package/dist/send-C6gPJu-Z.js +11 -0
- package/dist/send-C7MoKtkN.js +426 -0
- package/dist/send-CXzq2LI6.js +2245 -0
- package/dist/send-CYOZoObr.js +547 -0
- package/dist/send-CfQyIvcC.js +332 -0
- package/dist/send-DUtuuwhw.js +492 -0
- package/dist/send-DbafVwxp.js +2245 -0
- package/dist/send-DeZg8K7y.js +349 -0
- package/dist/send-DwkjxJlv.js +547 -0
- package/dist/send-iX9xbxlU.js +1178 -0
- package/dist/server-BKfCzEzd.js +206 -0
- package/dist/server-fmO4eo7K.js +202 -0
- package/dist/server-lifecycle-CgPpP10P.js +2437 -0
- package/dist/server-lifecycle-Cn8yY5MW.js +2437 -0
- package/dist/server-node-events-C-ZzSBYh.js +391 -0
- package/dist/server-node-events-DYlyfDHM.js +395 -0
- package/dist/service-C2j81L86.js +670 -0
- package/dist/service-C8a0SXHD.js +670 -0
- package/dist/session-AulYhqOb.js +170 -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-utils-CRK8ToKG.js +621 -0
- package/dist/session-utils-DWlkmCX8.js +621 -0
- package/dist/sessions-DtqrmUJS.js +2553 -0
- package/dist/sessions-gT-4fcX-.js +245 -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/status-BI_-xpDt.js +1947 -0
- package/dist/status-PZVwjKjl.js +1943 -0
- package/dist/status.update-BmuDZ7E7.js +449 -0
- package/dist/status.update-Mf6HSRvU.js +449 -0
- package/dist/store-B7PGEdFf.js +2555 -0
- package/dist/store-CzhBjUCN.js +64 -0
- package/dist/store-YkSxKAey.js +53 -0
- package/dist/store-ZNeFv2Q7.js +64 -0
- package/dist/subagent-registry-R1DiAM4R.js +4839 -0
- package/dist/subagent-registry-xLRXC8Bg.js +4841 -0
- package/dist/subsystem-BAW_f3DI.js +1195 -0
- package/dist/subsystem-DGSHVL8I.js +1081 -0
- package/dist/system-cli-9SvRrT9D.js +77 -0
- package/dist/system-cli-yCa5Q1YM.js +73 -0
- package/dist/systemd-40Rij3QR.js +547 -0
- package/dist/systemd-5C97CSzd.js +547 -0
- package/dist/systemd-hints-3iQteJw-.js +278 -0
- package/dist/systemd-hints-CyQqHq1i.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/tables-C5fI0PmT.js +55 -0
- package/dist/tables-Cm9qvQ9D.js +55 -0
- package/dist/tables-fRe01eP1.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/targets-C99szk_e.js +114 -0
- package/dist/targets-CPaTjbpp.js +2607 -0
- package/dist/targets-CmC5m7Ey.js +53 -0
- package/dist/targets-D-p4rJVS.js +650 -0
- package/dist/targets-D2OQt8-7.js +650 -0
- package/dist/targets-D94MtTiZ.js +2606 -0
- package/dist/targets-RajrXTl7.js +220 -0
- package/dist/targets-_UWmnyI9.js +53 -0
- package/dist/thinking-4nOZPunr.js +60 -0
- package/dist/thinking-ZfH2V9Os.js +60 -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-B5xyvBDf.js +125 -0
- package/dist/trash-BpB96kHe.js +125 -0
- package/dist/tui-Ba0uZDrg.js +3237 -0
- package/dist/tui-Biz0HqDj.js +3237 -0
- package/dist/tui-cli-C-UV6o2v.js +63 -0
- package/dist/tui-cli-Ds_bLT-h.js +67 -0
- package/dist/types.tools-BBb2rl3g.js +23 -0
- package/dist/types.tools-BDJw1yFx.js +23 -0
- package/dist/update-Barj5dsg.js +349 -0
- package/dist/update-D839Q8su.js +349 -0
- package/dist/update-cli-2I4hm0Gy.js +1150 -0
- package/dist/update-cli-CcwXmMKB.js +1148 -0
- package/dist/usage-BI9kergH.js +5465 -0
- package/dist/utils-DPoNpP7D.js +631 -0
- package/dist/voice-credentials-64XAMSJm.js +46 -0
- package/dist/voice-credentials-v-CQkTpD.js +46 -0
- package/dist/web-63IbbidQ.js +3051 -0
- package/dist/web-D9N764Da.js +80 -0
- package/dist/web-DUvNYLzr.js +75 -0
- package/dist/webhooks-cli-owhVNNkz.js +334 -0
- package/dist/webhooks-cli-zlvka6QD.js +330 -0
- package/dist/whatsapp-actions-8DejyRG5.js +126 -0
- package/dist/whatsapp-actions-DCzp5LKe.js +131 -0
- package/dist/widearea-dns-CQqZIeu8.js +127 -0
- package/dist/workspace-CB7pVojf.js +441 -0
- package/dist/workspace-DWEyzM0F.js +439 -0
- package/dist/zod-schema-CvFqwpNE.js +2719 -0
- package/dist/zod-schema-Y5SQgJLm.js +2719 -0
- package/package.json +1 -1
- package/dist/accounts-Aqbb2_Fn.js +0 -270
- package/dist/accounts-Bo2bX8jP.js +0 -272
- package/dist/accounts-CJUdvsIZ.js +0 -32
- package/dist/accounts-D3fAPVzU.js +0 -36
- package/dist/accounts-DZmv4bXS.js +0 -47
- package/dist/accounts-DmB4SVPK.js +0 -47
- package/dist/accounts-DtkyfvwR.js +0 -36
- package/dist/ack-reactions-BqcZUQJ3.js +0 -446
- package/dist/ack-reactions-DXHaDBH-.js +0 -446
- package/dist/acp-cli-DVXhDMc6.js +0 -1324
- package/dist/acp-cli-QBL4_qcW.js +0 -1319
- package/dist/active-listener-CwxZ24bZ.js +0 -37
- package/dist/active-listener-v2sItamh.js +0 -37
- package/dist/agent-C5PZDKE1.js +0 -687
- package/dist/agent-helpers-BSGqeJr-.js +0 -400
- package/dist/agent-qCBPcUcF.js +0 -688
- package/dist/agent-scope-CJW7vnF8.js +0 -114
- package/dist/agent-scope-_ND_-bJy.js +0 -116
- package/dist/agents-Byc39Y4A.js +0 -760
- package/dist/agents.config-BgDBcY4h.js +0 -116
- package/dist/agents.config-D8gLHPWo.js +0 -116
- package/dist/audio-BIvUsncf.js +0 -43
- package/dist/audio-CQ8TfmVN.js +0 -43
- package/dist/audit-C0x7Cm6K.js +0 -3150
- package/dist/audit-CAY-uzWP.js +0 -3150
- package/dist/auth-DGqCLaQq.js +0 -448
- package/dist/auth-DLTRySEi.js +0 -314
- package/dist/auth-Drf91ntw.js +0 -315
- package/dist/auth-ku2khJyQ.js +0 -448
- package/dist/banner-CGI3XOm4.js +0 -294
- package/dist/binaries-BTvHIrCr.js +0 -13
- package/dist/bindings-Dr0bGRst.js +0 -69
- package/dist/bindings-DsWJQVKh.js +0 -69
- package/dist/bonjour-discovery-BElR62fH.js +0 -378
- package/dist/bonjour-discovery-C8XyVsjb.js +0 -378
- package/dist/browser-cli-DxJew43l.js +0 -1694
- package/dist/browser-cli-p0nakrjO.js +0 -1690
- package/dist/call-BrTmlOx3.js +0 -518
- package/dist/call-ChdUdwb4.js +0 -517
- package/dist/catalog-DTlcfTT9.js +0 -185
- package/dist/catalog-PixZqhZK.js +0 -185
- package/dist/channel-account-context-BO245Tcn.js +0 -133
- package/dist/channel-account-context-BgK0hm-I.js +0 -133
- package/dist/channel-activity-B0qlUR5e.js +0 -292
- package/dist/channel-activity-C-L6rDrQ.js +0 -94
- package/dist/channel-activity-DdgLBZ7M.js +0 -94
- package/dist/channel-options-C1Q9SUhv.js +0 -33
- package/dist/channel-options-zANFhRx_.js +0 -32
- package/dist/channel-selection-DW21dXB1.js +0 -51
- package/dist/channel-selection-wK_6S2Ku.js +0 -51
- package/dist/channel-web-DCSjrtlh.js +0 -2136
- package/dist/channel-web-JCgegBgG.js +0 -2134
- package/dist/channels-cli-D48ytzLq.js +0 -1438
- package/dist/channels-cli-hZbUcB3G.js +0 -1434
- package/dist/channels-status-issues-B6I2l7Sm.js +0 -18
- package/dist/channels-status-issues-DhDH2fWp.js +0 -18
- package/dist/chat-envelope-BIujl9Cj.js +0 -248
- package/dist/chat-envelope-CrM0X4sl.js +0 -248
- package/dist/chrome-Dqtq7zCc.js +0 -1733
- package/dist/chrome-XeSY99Z_.js +0 -1732
- package/dist/chunk-LUabyS9k.js +0 -341
- package/dist/clack-prompter-fAgbvPW4.js +0 -122
- package/dist/clack-prompter-kf9qTN5p.js +0 -121
- package/dist/cleanup-utils-CNwlTKyR.js +0 -94
- package/dist/cli-BTLaY8q4.js +0 -133
- package/dist/cli-CZV23GbW.js +0 -129
- package/dist/client-B9u3JdT_.js +0 -2316
- package/dist/client-DEEOhx0w.js +0 -2316
- package/dist/clipboard-B2nstLx7.js +0 -31
- package/dist/clipboard-C8QI9fes.js +0 -31
- package/dist/command-format-D0vKipG9.js +0 -32
- package/dist/command-format-LFmgWzKJ.js +0 -18
- package/dist/command-registry-BPXqH4ST.js +0 -215
- package/dist/commands-BAYwlS3d.js +0 -41
- package/dist/commands-D842kCjj.js +0 -41
- package/dist/commands-registry-Cg2GTT2J.js +0 -892
- package/dist/commands-registry-Yz-uV5oG.js +0 -891
- package/dist/common-B67cBSew.js +0 -156
- package/dist/common-DEoiTqOr.js +0 -156
- package/dist/completion-cli-D5J3fPka.js +0 -452
- package/dist/completion-cli-Dd1g-p7S.js +0 -452
- package/dist/config-CAa0rZSx.js +0 -4225
- package/dist/config-W0w-gi2j.js +0 -4223
- package/dist/config-cli-Ddz-yCdQ.js +0 -247
- package/dist/config-cli-shgSFYig.js +0 -243
- package/dist/config-guard-BI85dxHR.js +0 -99
- package/dist/config-guard-DQqnigKh.js +0 -75
- package/dist/config-validation-D-h4LHyA.js +0 -18
- package/dist/config-validation-Df_kroIQ.js +0 -18
- package/dist/configure-BnFwpZ3l.js +0 -891
- package/dist/configure-Cj4mlKSH.js +0 -889
- package/dist/control-auth-BrBr2xb8.js +0 -397
- package/dist/control-auth-CehjYKnL.js +0 -397
- package/dist/control-ui-assets-D8F383Mo.js +0 -186
- package/dist/control-ui-assets-DYKtRIm0.js +0 -186
- package/dist/conversation-label-Bn5j3lUT.js +0 -36
- package/dist/cron-cli-DVzDHzAX.js +0 -494
- package/dist/cron-cli-gkH2qKM4.js +0 -498
- package/dist/daemon-cli-BTdNO1vH.js +0 -737
- package/dist/daemon-cli-DNNqI2LD.js +0 -735
- package/dist/daemon-install-CaEHG92p.js +0 -56
- package/dist/daemon-install-DbpDSDfW.js +0 -60
- package/dist/daemon-install-helpers-DjE_WnlY.js +0 -504
- package/dist/daemon-install-helpers-DocTUxqQ.js +0 -504
- package/dist/deliver-CDcL8ok6.js +0 -481
- package/dist/deliver-CS8JsevV.js +0 -481
- package/dist/delivery-queue-CTaYZQ_8.js +0 -244
- package/dist/delivery-queue-DMZ7mH8P.js +0 -244
- package/dist/devices-cli-BBJ4His-.js +0 -319
- package/dist/devices-cli-DHSJSFW1.js +0 -323
- package/dist/diagnostics-BSvCaLNs.js +0 -35
- package/dist/diagnostics-mWFAsFeo.js +0 -35
- package/dist/directory-cli-C-oHD_XE.js +0 -224
- package/dist/directory-cli-Cw99VGvr.js +0 -220
- package/dist/dispatcher-C8d1NNLZ.js +0 -174
- package/dist/dispatcher-DY6Ga60j.js +0 -173
- package/dist/dm-policy-shared-CRQ-Wr5g.js +0 -22
- package/dist/dm-policy-shared-CXXf2ltd.js +0 -22
- package/dist/dns-cli-BOqx9qo1.js +0 -199
- package/dist/dns-cli-WfqSC3JU.js +0 -203
- package/dist/dock-Big-J2VN.js +0 -929
- package/dist/dock-Cj4PKiUh.js +0 -928
- package/dist/doctor-completion-B9RsNJKh.js +0 -92
- package/dist/doctor-completion-DhNvADTs.js +0 -92
- package/dist/doctor-config-flow-BUuADMDa.js +0 -1935
- package/dist/doctor-config-flow-yOUpQC2B.js +0 -1934
- package/dist/enable-DC9V0nTO.js +0 -59
- package/dist/enable-DzXMQJ-o.js +0 -59
- package/dist/env-B3zr72vQ.js +0 -60
- package/dist/errors-CdmXrBic.js +0 -35
- package/dist/errors-Cr_NbOb4.js +0 -35
- package/dist/exec-D_s-zAtY.js +0 -164
- package/dist/exec-Zz6eJ6YU.js +0 -164
- package/dist/fetch-C8pdlo4-.js +0 -67
- package/dist/fetch-DRVdxxEj.js +0 -67
- package/dist/file-lock-6NXMPZTT.js +0 -107
- package/dist/file-lock-C_KRlR7M.js +0 -107
- package/dist/fs-safe-DZHpH7TI.js +0 -98
- package/dist/fs-safe-vm3JMUkq.js +0 -88
- package/dist/gateway-cli-CebjflhZ.js +0 -24337
- package/dist/gateway-cli-Y9U6rbPB.js +0 -24333
- package/dist/gateway-rpc-BCFkQPa2.js +0 -28
- package/dist/gateway-rpc-DOgYbsOG.js +0 -28
- package/dist/gmail-setup-utils-DMeA1UM1.js +0 -423
- package/dist/gmail-setup-utils-FHWSAur3.js +0 -422
- package/dist/health-CXWQZGNz.js +0 -1414
- package/dist/health-DCC6hoLO.js +0 -1417
- package/dist/health-format-CVgQD-z9.js +0 -28
- package/dist/heartbeat-visibility-Cv0ejWJ-.js +0 -125
- package/dist/heartbeat-visibility-Da3TDQp2.js +0 -125
- package/dist/help-format-DM6-OBt-.js +0 -17
- package/dist/hook-runner-global-C0DFQmQw.js +0 -527
- package/dist/hooks-cli-CB5rKhHe.js +0 -1221
- package/dist/hooks-cli-Dy7m9hzM.js +0 -1225
- package/dist/image-ops-B9ofmzSq.js +0 -354
- package/dist/image-ops-CMuvRsMY.js +0 -354
- package/dist/import-BH13F5mT.js +0 -606
- package/dist/import-D8HVcDqO.js +0 -604
- package/dist/inbound-context-CmmmT8IP.js +0 -68
- package/dist/inbound-path-policy-BdmTOUka.js +0 -90
- package/dist/inbound-path-policy-BurOAu44.js +0 -90
- package/dist/inspect-nW8LAukU.js +0 -286
- package/dist/inspect-xy2EHy8G.js +0 -286
- package/dist/installs-CpfHmKY1.js +0 -325
- package/dist/installs-DebiMrGj.js +0 -325
- package/dist/ipv4-ysiNGssl.js +0 -46
- package/dist/ipv4-zc_Hfvbp.js +0 -46
- package/dist/ir-CaxTklDC.js +0 -940
- package/dist/lifecycle-core-Z5SScMlU.js +0 -476
- package/dist/lifecycle-core-pPwYSt7m.js +0 -474
- package/dist/links-D5vtq30Q.js +0 -15
- package/dist/loader-BVHaRcP7.js +0 -22404
- package/dist/loader-CxSGgugQ.js +0 -22401
- package/dist/local-roots-CrJ_Jv_G.js +0 -314
- package/dist/local-roots-n_Y4iYwb.js +0 -313
- package/dist/logger-B8yHnzPl.js +0 -49
- package/dist/logging-FctZEleJ.js +0 -20
- package/dist/login-C99fsB0N.js +0 -61
- package/dist/login-cLvGPjeO.js +0 -62
- package/dist/login-qr-CGqRFwgl.js +0 -329
- package/dist/login-qr-dnY5DC2C.js +0 -325
- package/dist/logs-cli-Bda7xY4N.js +0 -236
- package/dist/logs-cli-HzR-vnpD.js +0 -240
- package/dist/markdown-tables-58Hq__7K.js +0 -29
- package/dist/markdown-tables-GFEX0OR6.js +0 -29
- package/dist/media-C1SIfGTn.js +0 -10452
- package/dist/media-CFsyXs3H.js +0 -940
- package/dist/message-action-names-BgsKGLDS.js +0 -2521
- package/dist/message-action-names-DkZwEFhU.js +0 -2521
- package/dist/message-channel-FMNRI5Ax.js +0 -91
- package/dist/mime-AuIDUZPG.js +0 -149
- package/dist/mime-Cqg1jjia.js +0 -149
- package/dist/net-BEFkF-nI.js +0 -225
- package/dist/net-CNsUGiSw.js +0 -225
- package/dist/node-cli-Bu-InsO9.js +0 -1462
- package/dist/node-cli-DE7Pm7Fr.js +0 -1458
- package/dist/node-service-CumFZc9L.js +0 -67
- package/dist/node-service-DY1gG06I.js +0 -67
- package/dist/nodes-cli-B5aAExN0.js +0 -1350
- package/dist/nodes-cli-eKRqlKuO.js +0 -1346
- package/dist/nodes-screen-B3Sij1uT.js +0 -250
- package/dist/nodes-screen-DEvpoFmH.js +0 -250
- package/dist/note-CPFJCWJJ.js +0 -92
- package/dist/note-DHUJACHE.js +0 -92
- package/dist/npm-registry-spec-BgMtTHvq.js +0 -786
- package/dist/npm-registry-spec-Dz3z1Zpd.js +0 -786
- package/dist/npm-resolution-BXiQH99t.js +0 -86
- package/dist/npm-resolution-CqE0nhxJ.js +0 -86
- package/dist/onboard-DK2z3w1P.js +0 -649
- package/dist/onboard-auth-C_wHkop1.js +0 -207
- package/dist/onboard-auth-CkCBLvTg.js +0 -211
- package/dist/onboard-channels-C8_OLbPk.js +0 -2547
- package/dist/onboard-channels-w_tnOhVu.js +0 -2548
- package/dist/onboard-helpers-Q7M6vdzh.js +0 -363
- package/dist/onboard-helpers-SCO3k5Y8.js +0 -364
- package/dist/onboard-remote-Co2hv1AD.js +0 -127
- package/dist/onboard-remote-Dl3BFSg2.js +0 -127
- package/dist/onboard-rioH3DW6.js +0 -647
- package/dist/onboarding-CsXVuzFP.js +0 -586
- package/dist/onboarding-r5RCkc-Z.js +0 -588
- package/dist/onboarding.finalize-BY8uN1nD.js +0 -402
- package/dist/onboarding.finalize-C-kfj-aR.js +0 -404
- package/dist/onboarding.gateway-config-BL0Q7Wpg.js +0 -201
- package/dist/onboarding.gateway-config-D2QsXMYO.js +0 -195
- package/dist/outbound-CcaPcetn.js +0 -220
- package/dist/outbound-CeiW8z3a.js +0 -221
- package/dist/outbound-attachment-BLSGI2dJ.js +0 -18
- package/dist/outbound-attachment-Bfm5-JYe.js +0 -18
- package/dist/outbound-attachment-CZ7zoYxB.js +0 -18
- package/dist/pairing-cli-CgX79ujL.js +0 -125
- package/dist/pairing-cli-DvbbXFgC.js +0 -129
- package/dist/pairing-labels-3wDxaApH.js +0 -9
- package/dist/pairing-labels-DCbWnbWk.js +0 -9
- package/dist/pairing-store-CdY7iRS0.js +0 -459
- package/dist/pairing-store-DykkYpQ7.js +0 -460
- package/dist/path-env-Cqo5LZmw.js +0 -89
- package/dist/path-guards-DOpzcMXz.js +0 -31
- package/dist/path-guards-DipYoPVw.js +0 -31
- package/dist/path-safety-CXKAVpMp.js +0 -14
- package/dist/path-safety-DGB91qBk.js +0 -14
- package/dist/paths-BTaH3rLn.js +0 -232
- package/dist/plugin-auto-enable-C6FPGg_-.js +0 -301
- package/dist/plugin-auto-enable-L8eOc8iC.js +0 -302
- package/dist/plugin-registry-BTycBIix.js +0 -33
- package/dist/plugin-registry-CFty9Gym.js +0 -33
- package/dist/plugin-sdk/auto-reply/reply/elevated-allowlist-matcher.d.ts +0 -20
- package/dist/plugin-sdk/auto-reply/reply/elevated-unavailable.d.ts +0 -8
- package/dist/plugin-sdk/auto-reply/reply/reply-elevated.d.ts +0 -16
- package/dist/plugin-sdk/compat/legacy-names.d.ts +0 -8
- package/dist/plugin-sdk/config/legacy.migrations.part-1.d.ts +0 -2
- package/dist/plugin-sdk/config/legacy.migrations.part-2.d.ts +0 -2
- package/dist/plugin-sdk/config/legacy.migrations.part-3.d.ts +0 -2
- package/dist/plugin-sdk/cron/legacy-delivery.d.ts +0 -3
- package/dist/plugin-sdk/cron/payload-migration.d.ts +0 -3
- package/dist/plugin-sdk/link-understanding/apply.d.ts +0 -10
- package/dist/plugin-sdk/link-understanding/defaults.d.ts +0 -2
- package/dist/plugin-sdk/link-understanding/detect.d.ts +0 -3
- package/dist/plugin-sdk/link-understanding/format.d.ts +0 -4
- package/dist/plugin-sdk/link-understanding/runner.d.ts +0 -11
- package/dist/plugin-sdk/media/input-files.d.ts +0 -95
- package/dist/plugin-sdk/media-understanding/apply.d.ts +0 -19
- package/dist/plugin-sdk/media-understanding/attachments.d.ts +0 -49
- package/dist/plugin-sdk/media-understanding/concurrency.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding/defaults.d.ts +0 -11
- package/dist/plugin-sdk/media-understanding/errors.d.ts +0 -6
- package/dist/plugin-sdk/media-understanding/format.d.ts +0 -7
- package/dist/plugin-sdk/media-understanding/fs.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding/output-extract.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/anthropic/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/deepgram/audio.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding/providers/deepgram/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/google/audio.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding/providers/google/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/google/video.d.ts +0 -3
- package/dist/plugin-sdk/media-understanding/providers/groq/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/index.d.ts +0 -4
- package/dist/plugin-sdk/media-understanding/providers/minimax/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/mistral/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/moonshot/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/moonshot/video.d.ts +0 -3
- package/dist/plugin-sdk/media-understanding/providers/openai/audio.d.ts +0 -1
- package/dist/plugin-sdk/media-understanding/providers/openai/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/providers/shared.d.ts +0 -20
- package/dist/plugin-sdk/media-understanding/providers/zai/index.d.ts +0 -2
- package/dist/plugin-sdk/media-understanding/resolve.d.ts +0 -44
- package/dist/plugin-sdk/media-understanding/runner.d.ts +0 -34
- package/dist/plugin-sdk/media-understanding/runner.entries.d.ts +0 -33
- package/dist/plugin-sdk/media-understanding/scope.d.ts +0 -9
- package/dist/plugin-sdk/media-understanding/types.d.ts +0 -59
- package/dist/plugin-sdk/media-understanding/video.d.ts +0 -2
- package/dist/plugin-sdk/utils/run-with-concurrency.d.ts +0 -11
- package/dist/plugins-7B167wIj.js +0 -453
- package/dist/plugins-BRHOfy1Z.js +0 -455
- package/dist/plugins-cli-CQGW40I-.js +0 -797
- package/dist/plugins-cli-D-ZfWRTw.js +0 -801
- package/dist/ports-CAqyeQYZ.js +0 -316
- package/dist/ports-CTUgXF2d.js +0 -96
- package/dist/ports-DqfnVnCw.js +0 -370
- package/dist/preflight-CJqKHCYa.js +0 -64
- package/dist/preflight-TR92sc61.js +0 -68
- package/dist/program-_SGrjcuG.js +0 -248
- package/dist/program-context-B6yIPfYd.js +0 -474
- package/dist/progress-BOdRbOHD.js +0 -124
- package/dist/prompt-WEkXwIMT.js +0 -21
- package/dist/prompt-select-styled-BiBnOTh8.js +0 -1669
- package/dist/prompt-select-styled-DQacku67.js +0 -1672
- package/dist/prompt-style-B4Cq4PyQ.js +0 -9
- package/dist/provider-dispatcher-BjsUFEpi.js +0 -659
- package/dist/provider-dispatcher-BxNDRVIT.js +0 -660
- package/dist/push-apns-Cj0Ryn18.js +0 -713
- package/dist/push-apns-fFfYCqda.js +0 -711
- package/dist/pw-ai-CnN2sITD.js +0 -1908
- package/dist/pw-ai-fnX3cecw.js +0 -1911
- package/dist/qr-cli-CriPg41m.js +0 -349
- package/dist/qr-cli-DSURqD0D.js +0 -353
- package/dist/redact-gXuh8MFk.js +0 -191
- package/dist/redact-snapshot-BecRL_h6.js +0 -2016
- package/dist/redact-snapshot-pTdzSrex.js +0 -2016
- package/dist/register.agent-Bpwvc5By.js +0 -1018
- package/dist/register.agent-DQFcnOVQ.js +0 -290
- package/dist/register.configure-C5CK8tgd.js +0 -133
- package/dist/register.configure-CEJ5Wrkl.js +0 -128
- package/dist/register.import-CPQqqdje.js +0 -31
- package/dist/register.import-D1UaH1QV.js +0 -29
- package/dist/register.maintenance-Bpz-NOhG.js +0 -499
- package/dist/register.maintenance-DDwlfAfw.js +0 -501
- package/dist/register.message-BoNswT8e.js +0 -685
- package/dist/register.message-pvz70g_-.js +0 -689
- package/dist/register.onboard-BvcVLNp3.js +0 -93
- package/dist/register.onboard-CZV7LvZI.js +0 -97
- package/dist/register.setup-Cgv2uSPG.js +0 -117
- package/dist/register.setup-yTqvTinY.js +0 -113
- package/dist/register.status-health-sessions-LK50hWDT.js +0 -428
- package/dist/register.status-health-sessions-kDGDihye.js +0 -668
- package/dist/register.subclis-DSr7AHAr.js +0 -267
- package/dist/replies-IpiCq1Ht.js +0 -136
- package/dist/replies-LSx_XhsP.js +0 -136
- package/dist/reply-B8It91bP.js +0 -13652
- package/dist/reply-CbgHVTv2.js +0 -13649
- package/dist/reply-directives-Cz7622Qx.js +0 -182
- package/dist/reply-directives-ssnaPNiU.js +0 -182
- package/dist/reply-payloads-CQMtrphw.js +0 -527
- package/dist/reply-prefix-CWcAZKhE.js +0 -37
- package/dist/reply-prefix-Drq7Pf3A.js +0 -37
- package/dist/resolve-route-B8uIc2H3.js +0 -249
- package/dist/resolve-route-C8ooNlI4.js +0 -249
- package/dist/response-prefix-template-D3ZcJP4E.js +0 -134
- package/dist/response-prefix-template-DPOggmPO.js +0 -134
- package/dist/retry-B19gMxS7.js +0 -77
- package/dist/retry-BdhJlZQI.js +0 -77
- package/dist/run-main-BP3UHEJa.js +0 -306
- package/dist/runner-CD3YycXx.js +0 -2365
- package/dist/runner-D74Wiza_.js +0 -2365
- package/dist/secure-random-CQa3H-OL.js +0 -44
- package/dist/security-cli-05blEYyC.js +0 -482
- package/dist/security-cli-DYbt8duB.js +0 -487
- package/dist/send-7O3-bRtl.js +0 -547
- package/dist/send-9Huf62k3.js +0 -2245
- package/dist/send-B0C42B2A.js +0 -426
- package/dist/send-B9mIJdUo.js +0 -547
- package/dist/send-BHm9dk6D.js +0 -1178
- package/dist/send-BetMntNc.js +0 -11
- package/dist/send-Bj0RXr-a.js +0 -492
- package/dist/send-COuVtZ4b.js +0 -374
- package/dist/send-CXNuhYA-.js +0 -332
- package/dist/send-Ce_BDa8P.js +0 -349
- package/dist/send-ChvasRSh.js +0 -1779
- package/dist/send-DNVRlTEF.js +0 -29
- package/dist/send-DWf7BCPe.js +0 -492
- package/dist/send-Dd2_MykI.js +0 -2245
- package/dist/send-IJaUAa8H.js +0 -1776
- package/dist/send-vvZXksNU.js +0 -349
- package/dist/server-BrzR9JmX.js +0 -206
- package/dist/server-_h27-uP_.js +0 -202
- package/dist/server-lifecycle-CUdA6Far.js +0 -2437
- package/dist/server-lifecycle-DQZWL8iP.js +0 -2437
- package/dist/server-node-events-DSefRBGC.js +0 -394
- package/dist/server-node-events-jDiG1-M2.js +0 -390
- package/dist/service-9le8AnC-.js +0 -670
- package/dist/service-Drb0kx6I.js +0 -670
- package/dist/session-BIAOl5QR.js +0 -170
- package/dist/session-Wu00pCn_.js +0 -170
- package/dist/session-cost-usage-7plmOKbs.js +0 -627
- package/dist/session-cost-usage-CPFxBFUg.js +0 -627
- package/dist/session-dirs-CfIrIJxG.js +0 -318
- package/dist/session-dirs-DlPpWt5Q.js +0 -318
- package/dist/session-utils-Sd9w4vc1.js +0 -622
- package/dist/session-utils-iL47hYmZ.js +0 -622
- package/dist/sessions-6pKQ3gN3.js +0 -247
- package/dist/sessions-ZRmCDdj1.js +0 -2569
- package/dist/shell-env-DYZq9PqC.js +0 -163
- package/dist/ssrf-B-rF_tZB.js +0 -183
- package/dist/ssrf-DJW14Wkh.js +0 -183
- package/dist/status-BGM-EJGk.js +0 -1983
- package/dist/status-CGkrO9om.js +0 -1979
- package/dist/status.update-DlBReI5-.js +0 -449
- package/dist/status.update-v7fEQ7R9.js +0 -449
- package/dist/store-B5989JkX.js +0 -64
- package/dist/store-BpXxa0Uf.js +0 -53
- package/dist/store-DCrrxHyS.js +0 -2571
- package/dist/store-Ql6vAcsg.js +0 -64
- package/dist/subagent-registry-BGknZEUI.js +0 -4856
- package/dist/subagent-registry-CWeRBjfn.js +0 -4854
- package/dist/subsystem-Ct6qOOqZ.js +0 -1079
- package/dist/subsystem-PQ64_nsu.js +0 -1136
- package/dist/system-cli-CmO-4Rju.js +0 -77
- package/dist/system-cli-VBsa18K6.js +0 -73
- package/dist/systemd-CqFpK30Y.js +0 -547
- package/dist/systemd-fK9AV5bP.js +0 -547
- package/dist/systemd-hints-D3rr0j14.js +0 -278
- package/dist/systemd-hints-DNOSRaqA.js +0 -278
- package/dist/systemd-linger-B907NVVy.js +0 -75
- package/dist/systemd-linger-wYksBbM7.js +0 -75
- package/dist/table-C-dba-5-.js +0 -279
- package/dist/tables-CO_kxD0e.js +0 -55
- package/dist/tables-Rd6ZUH0u.js +0 -55
- package/dist/tables-WZp8Vt9n.js +0 -55
- package/dist/tailnet-CfZhpSnt.js +0 -40
- package/dist/tailnet-D0NV0tRJ.js +0 -40
- package/dist/tailscale-B__xvMjA.js +0 -230
- package/dist/tailscale-q_ZrxUCc.js +0 -230
- package/dist/targets-B4rMyQFJ.js +0 -53
- package/dist/targets-BEBzTa22.js +0 -114
- package/dist/targets-BjWhDMJM.js +0 -650
- package/dist/targets-BlEVuFSt.js +0 -2474
- package/dist/targets-CHwGDIgO.js +0 -650
- package/dist/targets-CbbmgMRV.js +0 -2473
- package/dist/targets-SpN-MPBH.js +0 -220
- package/dist/targets-mqj9GNg1.js +0 -53
- package/dist/thinking-BqJmU6Zp.js +0 -88
- package/dist/thinking-l-rrvZwu.js +0 -88
- package/dist/tokens-DAFBx5qr.js +0 -21
- package/dist/tool-display-C0hpLmkw.js +0 -785
- package/dist/tool-display-CQTRHo3Z.js +0 -785
- package/dist/tool-images-BYY11Gw3.js +0 -263
- package/dist/tool-images-CnJ0R8Fo.js +0 -263
- package/dist/trash-C0mjnHuW.js +0 -125
- package/dist/trash-Cgwc9mLD.js +0 -125
- package/dist/tui-9cJnR1dN.js +0 -3282
- package/dist/tui-BR3egaFJ.js +0 -3282
- package/dist/tui-cli-BYpkhE6J.js +0 -66
- package/dist/tui-cli-DndeZyup.js +0 -62
- package/dist/update-BJVdkzk7.js +0 -349
- package/dist/update-DjI6KTA5.js +0 -349
- package/dist/update-cli-DR-zFdCm.js +0 -1146
- package/dist/update-cli-EuHV_AUf.js +0 -1148
- package/dist/usage-BQUMGgBj.js +0 -5350
- package/dist/utils-C5daYcFn.js +0 -631
- package/dist/voice-credentials-CXdoE4IF.js +0 -45
- package/dist/voice-credentials-Cu7htUQq.js +0 -45
- package/dist/web-6WVkqhtO.js +0 -3087
- package/dist/web-BfSXKISl.js +0 -74
- package/dist/web-Cngqu3vs.js +0 -79
- package/dist/webhooks-cli-0yQha2yj.js +0 -334
- package/dist/webhooks-cli-ula0bTX-.js +0 -330
- package/dist/whatsapp-actions-3NdzsNg1.js +0 -130
- package/dist/whatsapp-actions-y_1vjkYY.js +0 -125
- package/dist/widearea-dns-C-0P7TRi.js +0 -127
- package/dist/workspace-BT3X-qCZ.js +0 -449
- package/dist/workspace-D5hHXubL.js +0 -447
- package/dist/zod-schema-CbqZAIYy.js +0 -2696
- package/dist/zod-schema-YGQJEcnj.js +0 -2696
- /package/dist/{account-lookup-BOCzCnir.js → account-lookup-CIY_RKhi.js} +0 -0
- /package/dist/{agent-helpers-eEHy5uX2.js → agent-helpers-Bs2nBXeI.js} +0 -0
- /package/dist/{api-Cd_7aESj.js → api-BE4ZCWWB.js} +0 -0
- /package/dist/{api-DJ_oWYus.js → api-wsk9zRVi.js} +0 -0
- /package/dist/{chat-type-DyovJwCt.js → chat-type-BP9akbag.js} +0 -0
- /package/dist/{chunk-CWD_zrz_.js → chunk-BAMyFYtF.js} +0 -0
- /package/dist/{cleanup-utils-gNzIs9yk.js → cleanup-utils-ZC2zvntc.js} +0 -0
- /package/dist/{cli-name-3MdfbvIR.js → cli-name-BZsYSp9l.js} +0 -0
- /package/dist/{cli-name-CRLBidNP.js → cli-name-CRe5Ow_t.js} +0 -0
- /package/dist/{cli-utils-5ZIfXAfM.js → cli-utils-CGB3cBZm.js} +0 -0
- /package/dist/{client-D5m46AuY.js → client-9dK56xly.js} +0 -0
- /package/dist/{client-DFyI5I0n.js → client-D-R1YdRD.js} +0 -0
- /package/dist/{command-options-Cn2fc1Of.js → command-options-CnHA4TzR.js} +0 -0
- /package/dist/{config-eval-BCKpAS_K.js → config-eval-BQIR-wSg.js} +0 -0
- /package/dist/{config-eval-CU2G7a83.js → config-eval-Bh82JoXK.js} +0 -0
- /package/dist/{constants-CRGAZ2ow.js → constants-C7j1VA2S.js} +0 -0
- /package/dist/{constants-BAZuhSRm.js → constants-PMRtHBHU.js} +0 -0
- /package/dist/{credentials-DMAWNZdV.js → credentials-C_RoJFmK.js} +0 -0
- /package/dist/{credentials-Dmc3H-jd.js → credentials-DM_Dj0m8.js} +0 -0
- /package/dist/{daemon-runtime-aQhinwSL.js → daemon-runtime-9oDBR7YW.js} +0 -0
- /package/dist/{dangerous-name-matching-BCaPvXy_.js → dangerous-name-matching-CSq9sJDG.js} +0 -0
- /package/dist/{dangerous-tools-E1i3IoxZ.js → dangerous-tools-D4jtl72G.js} +0 -0
- /package/dist/{fetch-DTR2MlOk.js → fetch-DTsU2XnC.js} +0 -0
- /package/dist/{fetch-timeout-l_6RdoMw.js → fetch-timeout-CytN1wiO.js} +0 -0
- /package/dist/{file-identity-BnGA6wyc.js → file-identity-CeRK5CJC.js} +0 -0
- /package/dist/{format-relative-Cywx6ldk.js → format-relative-Czf5fUjn.js} +0 -0
- /package/dist/{format-relative-DcQZUAYl.js → format-relative-zwkkXJvs.js} +0 -0
- /package/dist/{health-format-CL2Xq92A.js → health-format-DF54wvUU.js} +0 -0
- /package/dist/{heartbeat-wake-DjsTDzF3.js → heartbeat-wake-CvHncCjP.js} +0 -0
- /package/dist/{helpers-D-r6yhnI.js → helpers-DAEoFkbn.js} +0 -0
- /package/dist/{helpers-DSMIGYx2.js → helpers-n2CtWpm9.js} +0 -0
- /package/dist/{helpers-CRrn7Err.js → helpers-ndPQWl6m.js} +0 -0
- /package/dist/{input-provenance-BgfeDgck.js → input-provenance-gIfDn1ki.js} +0 -0
- /package/dist/{input-provenance-xUsSMOsz.js → input-provenance-wkso1o5V.js} +0 -0
- /package/dist/{ip-BAhS4rY2.js → ip-D4VG5EJO.js} +0 -0
- /package/dist/{ip-BUhsZdJu.js → ip-MwCwRA7c.js} +0 -0
- /package/dist/{json-file-Dbg7nZg1.js → json-file-BW22hGtf.js} +0 -0
- /package/dist/{json-file-B5WEJJye.js → json-file-DwRAfAAy.js} +0 -0
- /package/dist/{json-files-CfhnuGaC.js → json-files-BI20PLIm.js} +0 -0
- /package/dist/{json-files-BFGbyEzL.js → json-files-Dy52honG.js} +0 -0
- /package/dist/{lanes-4FoQemog.js → lanes-1CBKdsiR.js} +0 -0
- /package/dist/{lanes-BhdzrAIa.js → lanes-DqVYfPRG.js} +0 -0
- /package/dist/{logger-IA_Dr_BT.js → logger-B8BE0PyS.js} +0 -0
- /package/dist/{logger-nEdVxm5D.js → logger-CPvz-aPM.js} +0 -0
- /package/dist/{logger-O6JX52kK.js → logger-cL0D2DCr.js} +0 -0
- /package/dist/{logging-BiuZwq5D.js → logging-DRwtiLIS.js} +0 -0
- /package/dist/{logging-Bs1VqVFL.js → logging-DTEoeoa3.js} +0 -0
- /package/dist/{logging-JZEg5nDp.js → logging-fywhKCmE.js} +0 -0
- /package/dist/{mutable-allowlist-detectors-TCG6mnbz.js → mutable-allowlist-detectors-BXE7Hr7F.js} +0 -0
- /package/dist/{onboard-config-BxfgUqk6.js → onboard-config-DOmXYEvJ.js} +0 -0
- /package/dist/{onboard-config-DNzlo8Cg.js → onboard-config-JmR21VYa.js} +0 -0
- /package/dist/{parse-log-line-CT0H1-oQ.js → parse-log-line-GisaZn5H.js} +0 -0
- /package/dist/{parse-log-line-pij_xhtE.js → parse-log-line-ZsbwG_u7.js} +0 -0
- /package/dist/{parse-timeout-CvODy9RC.js → parse-timeout-BpphuwYl.js} +0 -0
- /package/dist/{parse-timeout-CxYHsZWc.js → parse-timeout-CE6BjmGU.js} +0 -0
- /package/dist/plugin-sdk/{media-understanding → stt}/providers/google/inline-data.d.ts +0 -0
- /package/dist/{plugins-allowlist-Bcqe9Gd8.js → plugins-allowlist-A38nxBRG.js} +0 -0
- /package/dist/{plugins-allowlist-ptAp-oPY.js → plugins-allowlist-D2tS9tcu.js} +0 -0
- /package/dist/{polls-DQrR-qT3.js → polls-BLyT08ZI.js} +0 -0
- /package/dist/{polls-ybwcqkWt.js → polls-BmymsJEe.js} +0 -0
- /package/dist/{ports-BS8kQkd9.js → ports-DALdfBQy.js} +0 -0
- /package/dist/{process-scoped-map-BwUkYFQV.js → process-scoped-map-BCJR56ZB.js} +0 -0
- /package/dist/{process-scoped-map-_zxf_kLz.js → process-scoped-map-Cb1EHPyN.js} +0 -0
- /package/dist/{program-context-CG-t6Yp-.js → program-context-DlXnmuB7.js} +0 -0
- /package/dist/{prompt-style-B1740PBl.js → prompt-style-CUuA6OCy.js} +0 -0
- /package/dist/{proxy-BdjLhNln.js → proxy-D-qGA1vm.js} +0 -0
- /package/dist/{pw-ai-state-DaISdsXY.js → pw-ai-state--TxTVwRW.js} +0 -0
- /package/dist/{redact-CqWx9rpK.js → redact-BW8tobyp.js} +0 -0
- /package/dist/{redact-identifier-DR54qsoT.js → redact-identifier-Bv5SUUw-.js} +0 -0
- /package/dist/{remoteclaw-root-u8dAeHID.js → remoteclaw-root-BfPjgewe.js} +0 -0
- /package/dist/{remoteclaw-root-CgNyrbxc.js → remoteclaw-root-E4-hmb4E.js} +0 -0
- /package/dist/{render-CDCvpfhh.js → render-BhKzKdV0.js} +0 -0
- /package/dist/{render-CJl4GK1B.js → render-e7fENCYH.js} +0 -0
- /package/dist/{retry-cXXk2j6_.js → retry-BWv_fy4u.js} +0 -0
- /package/dist/{runtime-guard-BS55uiSW.js → runtime-guard-Bhx-pb8_.js} +0 -0
- /package/dist/{runtime-status-BhW7hP_U.js → runtime-status-CR9445g5.js} +0 -0
- /package/dist/{secret-equal-CJzes24Z.js → secret-equal-D6AoXne1.js} +0 -0
- /package/dist/{secret-equal-CQAmGfGc.js → secret-equal-DLnUuWM3.js} +0 -0
- /package/dist/{secure-random-B3f7Ri2X.js → secure-random-CJtykx_p.js} +0 -0
- /package/dist/{secure-random-BkZFG9cd.js → secure-random-CRVHgtmO.js} +0 -0
- /package/dist/{stagger-B-_Wnofy.js → stagger--wvODnNe.js} +0 -0
- /package/dist/{stagger-B2ORDHsP.js → stagger-BLmTO4cK.js} +0 -0
- /package/dist/{status-C6YNwimj.js → status-1zVD-Clq.js} +0 -0
- /package/dist/{status-yrDGXYZM.js → status-BtRY0nXQ.js} +0 -0
- /package/dist/{strip-inbound-meta-0cvL6itU.js → strip-inbound-meta-zmUXypSS.js} +0 -0
- /package/dist/{strip-inbound-meta-DjKcSFaW.js → strip-inbound-meta-zqtN9FTK.js} +0 -0
- /package/dist/{table-ByMyHTh_.js → table-On3hkCqi.js} +0 -0
- /package/dist/{targets-DOJXjN1U.js → targets-B46m7u5J.js} +0 -0
- /package/dist/{targets-WSwPflb6.js → targets-D7PT_rdO.js} +0 -0
- /package/dist/{text-format-mr5bZq0f.js → text-format-Ds92M9UT.js} +0 -0
- /package/dist/{tokens-C8yGxAcR.js → tokens-Dw7ZdYwT.js} +0 -0
- /package/dist/{usage-BXi79Rq6.js → usage-BIzKZ5dT.js} +0 -0
- /package/dist/{usage-C1lHaofV.js → usage-BvZOzIC7.js} +0 -0
- /package/dist/{usage-format-CD5jsZY1.js → usage-format-CmniSPCG.js} +0 -0
- /package/dist/{usage-format-CRVpDVj1.js → usage-format-D_KQYQ-w.js} +0 -0
- /package/dist/{widearea-dns-DFZMcfLf.js → widearea-dns-D01FFYZ8.js} +0 -0
- /package/dist/{wsl-D28w2jQC.js → wsl-PDLKeX04.js} +0 -0
|
@@ -1,2696 +0,0 @@
|
|
|
1
|
-
import { r as isValidInboundPathRootPattern } from "./inbound-path-policy-BurOAu44.js";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
|
|
5
|
-
//#region src/config/discord-preview-streaming.ts
|
|
6
|
-
function normalizeStreamingMode(value) {
|
|
7
|
-
if (typeof value !== "string") return null;
|
|
8
|
-
return value.trim().toLowerCase() || null;
|
|
9
|
-
}
|
|
10
|
-
function parseStreamingMode(value) {
|
|
11
|
-
const normalized = normalizeStreamingMode(value);
|
|
12
|
-
if (normalized === "off" || normalized === "partial" || normalized === "block" || normalized === "progress") return normalized;
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
function parseDiscordPreviewStreamMode(value) {
|
|
16
|
-
const parsed = parseStreamingMode(value);
|
|
17
|
-
if (!parsed) return null;
|
|
18
|
-
return parsed === "progress" ? "partial" : parsed;
|
|
19
|
-
}
|
|
20
|
-
function parseSlackLegacyDraftStreamMode(value) {
|
|
21
|
-
const normalized = normalizeStreamingMode(value);
|
|
22
|
-
if (normalized === "replace" || normalized === "status_final" || normalized === "append") return normalized;
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
function mapSlackLegacyDraftStreamModeToStreaming(mode) {
|
|
26
|
-
if (mode === "append") return "block";
|
|
27
|
-
if (mode === "status_final") return "progress";
|
|
28
|
-
return "partial";
|
|
29
|
-
}
|
|
30
|
-
function mapStreamingModeToSlackLegacyDraftStreamMode(mode) {
|
|
31
|
-
if (mode === "block") return "append";
|
|
32
|
-
if (mode === "progress") return "status_final";
|
|
33
|
-
return "replace";
|
|
34
|
-
}
|
|
35
|
-
function resolveTelegramPreviewStreamMode(params = {}) {
|
|
36
|
-
const parsedStreaming = parseStreamingMode(params.streaming);
|
|
37
|
-
if (parsedStreaming) {
|
|
38
|
-
if (parsedStreaming === "progress") return "partial";
|
|
39
|
-
return parsedStreaming;
|
|
40
|
-
}
|
|
41
|
-
const legacy = parseDiscordPreviewStreamMode(params.streamMode);
|
|
42
|
-
if (legacy) return legacy;
|
|
43
|
-
if (typeof params.streaming === "boolean") return params.streaming ? "partial" : "off";
|
|
44
|
-
return "off";
|
|
45
|
-
}
|
|
46
|
-
function resolveDiscordPreviewStreamMode(params = {}) {
|
|
47
|
-
const parsedStreaming = parseDiscordPreviewStreamMode(params.streaming);
|
|
48
|
-
if (parsedStreaming) return parsedStreaming;
|
|
49
|
-
const legacy = parseDiscordPreviewStreamMode(params.streamMode);
|
|
50
|
-
if (legacy) return legacy;
|
|
51
|
-
if (typeof params.streaming === "boolean") return params.streaming ? "partial" : "off";
|
|
52
|
-
return "off";
|
|
53
|
-
}
|
|
54
|
-
function resolveSlackStreamingMode(params = {}) {
|
|
55
|
-
const parsedStreaming = parseStreamingMode(params.streaming);
|
|
56
|
-
if (parsedStreaming) return parsedStreaming;
|
|
57
|
-
const legacyStreamMode = parseSlackLegacyDraftStreamMode(params.streamMode);
|
|
58
|
-
if (legacyStreamMode) return mapSlackLegacyDraftStreamModeToStreaming(legacyStreamMode);
|
|
59
|
-
if (typeof params.streaming === "boolean") return "partial";
|
|
60
|
-
return "partial";
|
|
61
|
-
}
|
|
62
|
-
function resolveSlackNativeStreaming(params = {}) {
|
|
63
|
-
if (typeof params.nativeStreaming === "boolean") return params.nativeStreaming;
|
|
64
|
-
if (typeof params.streaming === "boolean") return params.streaming;
|
|
65
|
-
return true;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/infra/safe-executable-value.ts
|
|
70
|
-
const SHELL_METACHARS = /[;&|`$<>]/;
|
|
71
|
-
const CONTROL_CHARS = /[\r\n]/;
|
|
72
|
-
const QUOTE_CHARS = /["']/;
|
|
73
|
-
const BARE_NAME_PATTERN = /^[A-Za-z0-9._+-]+$/;
|
|
74
|
-
function isLikelyPath(value) {
|
|
75
|
-
if (value.startsWith(".") || value.startsWith("~")) return true;
|
|
76
|
-
if (value.includes("/") || value.includes("\\")) return true;
|
|
77
|
-
return /^[A-Za-z]:[\\/]/.test(value);
|
|
78
|
-
}
|
|
79
|
-
function isSafeExecutableValue(value) {
|
|
80
|
-
if (!value) return false;
|
|
81
|
-
const trimmed = value.trim();
|
|
82
|
-
if (!trimmed) return false;
|
|
83
|
-
if (trimmed.includes("\0")) return false;
|
|
84
|
-
if (CONTROL_CHARS.test(trimmed)) return false;
|
|
85
|
-
if (SHELL_METACHARS.test(trimmed)) return false;
|
|
86
|
-
if (QUOTE_CHARS.test(trimmed)) return false;
|
|
87
|
-
if (isLikelyPath(trimmed)) return true;
|
|
88
|
-
if (trimmed.startsWith("-")) return false;
|
|
89
|
-
return BARE_NAME_PATTERN.test(trimmed);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/cli/parse-bytes.ts
|
|
94
|
-
const UNIT_MULTIPLIERS = {
|
|
95
|
-
b: 1,
|
|
96
|
-
kb: 1024,
|
|
97
|
-
k: 1024,
|
|
98
|
-
mb: 1024 ** 2,
|
|
99
|
-
m: 1024 ** 2,
|
|
100
|
-
gb: 1024 ** 3,
|
|
101
|
-
g: 1024 ** 3,
|
|
102
|
-
tb: 1024 ** 4,
|
|
103
|
-
t: 1024 ** 4
|
|
104
|
-
};
|
|
105
|
-
function parseByteSize(raw, opts) {
|
|
106
|
-
const trimmed = String(raw ?? "").trim().toLowerCase();
|
|
107
|
-
if (!trimmed) throw new Error("invalid byte size (empty)");
|
|
108
|
-
const m = /^(\d+(?:\.\d+)?)([a-z]+)?$/.exec(trimmed);
|
|
109
|
-
if (!m) throw new Error(`invalid byte size: ${raw}`);
|
|
110
|
-
const value = Number(m[1]);
|
|
111
|
-
if (!Number.isFinite(value) || value < 0) throw new Error(`invalid byte size: ${raw}`);
|
|
112
|
-
const multiplier = UNIT_MULTIPLIERS[(m[2] ?? opts?.defaultUnit ?? "b").toLowerCase()];
|
|
113
|
-
if (!multiplier) throw new Error(`invalid byte size unit: ${raw}`);
|
|
114
|
-
const bytes = Math.round(value * multiplier);
|
|
115
|
-
if (!Number.isFinite(bytes)) throw new Error(`invalid byte size: ${raw}`);
|
|
116
|
-
return bytes;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
//#endregion
|
|
120
|
-
//#region src/cli/parse-duration.ts
|
|
121
|
-
const DURATION_MULTIPLIERS = {
|
|
122
|
-
ms: 1,
|
|
123
|
-
s: 1e3,
|
|
124
|
-
m: 6e4,
|
|
125
|
-
h: 36e5,
|
|
126
|
-
d: 864e5
|
|
127
|
-
};
|
|
128
|
-
function parseDurationMs(raw, opts) {
|
|
129
|
-
const trimmed = String(raw ?? "").trim().toLowerCase();
|
|
130
|
-
if (!trimmed) throw new Error("invalid duration (empty)");
|
|
131
|
-
const single = /^(\d+(?:\.\d+)?)(ms|s|m|h|d)?$/.exec(trimmed);
|
|
132
|
-
if (single) {
|
|
133
|
-
const value = Number(single[1]);
|
|
134
|
-
if (!Number.isFinite(value) || value < 0) throw new Error(`invalid duration: ${raw}`);
|
|
135
|
-
const unit = single[2] ?? opts?.defaultUnit ?? "ms";
|
|
136
|
-
const ms = Math.round(value * DURATION_MULTIPLIERS[unit]);
|
|
137
|
-
if (!Number.isFinite(ms)) throw new Error(`invalid duration: ${raw}`);
|
|
138
|
-
return ms;
|
|
139
|
-
}
|
|
140
|
-
let totalMs = 0;
|
|
141
|
-
let consumed = 0;
|
|
142
|
-
for (const match of trimmed.matchAll(/(\d+(?:\.\d+)?)(ms|s|m|h|d)/g)) {
|
|
143
|
-
const [full, valueRaw, unitRaw] = match;
|
|
144
|
-
const index = match.index ?? -1;
|
|
145
|
-
if (!full || !valueRaw || !unitRaw || index < 0) throw new Error(`invalid duration: ${raw}`);
|
|
146
|
-
if (index !== consumed) throw new Error(`invalid duration: ${raw}`);
|
|
147
|
-
const value = Number(valueRaw);
|
|
148
|
-
if (!Number.isFinite(value) || value < 0) throw new Error(`invalid duration: ${raw}`);
|
|
149
|
-
const multiplier = DURATION_MULTIPLIERS[unitRaw];
|
|
150
|
-
if (!multiplier) throw new Error(`invalid duration: ${raw}`);
|
|
151
|
-
totalMs += value * multiplier;
|
|
152
|
-
consumed += full.length;
|
|
153
|
-
}
|
|
154
|
-
if (consumed !== trimmed.length || consumed === 0) throw new Error(`invalid duration: ${raw}`);
|
|
155
|
-
const ms = Math.round(totalMs);
|
|
156
|
-
if (!Number.isFinite(ms)) throw new Error(`invalid duration: ${raw}`);
|
|
157
|
-
return ms;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
//#endregion
|
|
161
|
-
//#region src/config/zod-schema.allowdeny.ts
|
|
162
|
-
const AllowDenyActionSchema = z.union([z.literal("allow"), z.literal("deny")]);
|
|
163
|
-
const AllowDenyChatTypeSchema = z.union([
|
|
164
|
-
z.literal("direct"),
|
|
165
|
-
z.literal("group"),
|
|
166
|
-
z.literal("channel"),
|
|
167
|
-
z.literal("dm")
|
|
168
|
-
]).optional();
|
|
169
|
-
function createAllowDenyChannelRulesSchema() {
|
|
170
|
-
return z.object({
|
|
171
|
-
default: AllowDenyActionSchema.optional(),
|
|
172
|
-
rules: z.array(z.object({
|
|
173
|
-
action: AllowDenyActionSchema,
|
|
174
|
-
match: z.object({
|
|
175
|
-
channel: z.string().optional(),
|
|
176
|
-
chatType: AllowDenyChatTypeSchema,
|
|
177
|
-
keyPrefix: z.string().optional(),
|
|
178
|
-
rawKeyPrefix: z.string().optional()
|
|
179
|
-
}).strict().optional()
|
|
180
|
-
}).strict()).optional()
|
|
181
|
-
}).strict().optional();
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
//#endregion
|
|
185
|
-
//#region src/config/zod-schema.sensitive.ts
|
|
186
|
-
const sensitive = z.registry();
|
|
187
|
-
|
|
188
|
-
//#endregion
|
|
189
|
-
//#region src/config/zod-schema.core.ts
|
|
190
|
-
const GroupChatSchema = z.object({
|
|
191
|
-
mentionPatterns: z.array(z.string()).optional(),
|
|
192
|
-
historyLimit: z.number().int().positive().optional()
|
|
193
|
-
}).strict().optional();
|
|
194
|
-
const DmConfigSchema = z.object({ historyLimit: z.number().int().min(0).optional() }).strict();
|
|
195
|
-
const IdentitySchema = z.object({
|
|
196
|
-
name: z.string().optional(),
|
|
197
|
-
theme: z.string().optional(),
|
|
198
|
-
emoji: z.string().optional(),
|
|
199
|
-
avatar: z.string().optional()
|
|
200
|
-
}).strict().optional();
|
|
201
|
-
const QueueModeSchema = z.union([
|
|
202
|
-
z.literal("steer"),
|
|
203
|
-
z.literal("followup"),
|
|
204
|
-
z.literal("collect"),
|
|
205
|
-
z.literal("steer-backlog"),
|
|
206
|
-
z.literal("steer+backlog"),
|
|
207
|
-
z.literal("queue"),
|
|
208
|
-
z.literal("interrupt")
|
|
209
|
-
]);
|
|
210
|
-
const QueueDropSchema = z.union([
|
|
211
|
-
z.literal("old"),
|
|
212
|
-
z.literal("new"),
|
|
213
|
-
z.literal("summarize")
|
|
214
|
-
]);
|
|
215
|
-
const ReplyToModeSchema = z.union([
|
|
216
|
-
z.literal("off"),
|
|
217
|
-
z.literal("first"),
|
|
218
|
-
z.literal("all")
|
|
219
|
-
]);
|
|
220
|
-
const TypingModeSchema = z.union([
|
|
221
|
-
z.literal("never"),
|
|
222
|
-
z.literal("instant"),
|
|
223
|
-
z.literal("thinking"),
|
|
224
|
-
z.literal("message")
|
|
225
|
-
]);
|
|
226
|
-
const GroupPolicySchema = z.enum([
|
|
227
|
-
"open",
|
|
228
|
-
"disabled",
|
|
229
|
-
"allowlist"
|
|
230
|
-
]);
|
|
231
|
-
const DmPolicySchema = z.enum([
|
|
232
|
-
"pairing",
|
|
233
|
-
"allowlist",
|
|
234
|
-
"open",
|
|
235
|
-
"disabled"
|
|
236
|
-
]);
|
|
237
|
-
const BlockStreamingCoalesceSchema = z.object({
|
|
238
|
-
minChars: z.number().int().positive().optional(),
|
|
239
|
-
maxChars: z.number().int().positive().optional(),
|
|
240
|
-
idleMs: z.number().int().nonnegative().optional()
|
|
241
|
-
}).strict();
|
|
242
|
-
const ReplyRuntimeConfigSchemaShape = {
|
|
243
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
244
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
245
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
246
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
247
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
248
|
-
blockStreaming: z.boolean().optional(),
|
|
249
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
250
|
-
responsePrefix: z.string().optional(),
|
|
251
|
-
mediaMaxMb: z.number().positive().optional()
|
|
252
|
-
};
|
|
253
|
-
const BlockStreamingChunkSchema = z.object({
|
|
254
|
-
minChars: z.number().int().positive().optional(),
|
|
255
|
-
maxChars: z.number().int().positive().optional(),
|
|
256
|
-
breakPreference: z.union([
|
|
257
|
-
z.literal("paragraph"),
|
|
258
|
-
z.literal("newline"),
|
|
259
|
-
z.literal("sentence")
|
|
260
|
-
]).optional()
|
|
261
|
-
}).strict();
|
|
262
|
-
const MarkdownTableModeSchema = z.enum([
|
|
263
|
-
"off",
|
|
264
|
-
"bullets",
|
|
265
|
-
"code"
|
|
266
|
-
]);
|
|
267
|
-
const MarkdownConfigSchema = z.object({ tables: MarkdownTableModeSchema.optional() }).strict().optional();
|
|
268
|
-
const TtsProviderSchema = z.enum([
|
|
269
|
-
"elevenlabs",
|
|
270
|
-
"openai",
|
|
271
|
-
"edge"
|
|
272
|
-
]);
|
|
273
|
-
const TtsModeSchema = z.enum(["final", "all"]);
|
|
274
|
-
const TtsAutoSchema = z.enum([
|
|
275
|
-
"off",
|
|
276
|
-
"always",
|
|
277
|
-
"inbound",
|
|
278
|
-
"tagged"
|
|
279
|
-
]);
|
|
280
|
-
const TtsConfigSchema = z.object({
|
|
281
|
-
auto: TtsAutoSchema.optional(),
|
|
282
|
-
enabled: z.boolean().optional(),
|
|
283
|
-
mode: TtsModeSchema.optional(),
|
|
284
|
-
provider: TtsProviderSchema.optional(),
|
|
285
|
-
summaryModel: z.string().optional(),
|
|
286
|
-
modelOverrides: z.object({
|
|
287
|
-
enabled: z.boolean().optional(),
|
|
288
|
-
allowText: z.boolean().optional(),
|
|
289
|
-
allowProvider: z.boolean().optional(),
|
|
290
|
-
allowVoice: z.boolean().optional(),
|
|
291
|
-
allowModelId: z.boolean().optional(),
|
|
292
|
-
allowVoiceSettings: z.boolean().optional(),
|
|
293
|
-
allowNormalization: z.boolean().optional(),
|
|
294
|
-
allowSeed: z.boolean().optional()
|
|
295
|
-
}).strict().optional(),
|
|
296
|
-
elevenlabs: z.object({
|
|
297
|
-
apiKey: z.string().optional().register(sensitive),
|
|
298
|
-
baseUrl: z.string().optional(),
|
|
299
|
-
voiceId: z.string().optional(),
|
|
300
|
-
modelId: z.string().optional(),
|
|
301
|
-
seed: z.number().int().min(0).max(4294967295).optional(),
|
|
302
|
-
applyTextNormalization: z.enum([
|
|
303
|
-
"auto",
|
|
304
|
-
"on",
|
|
305
|
-
"off"
|
|
306
|
-
]).optional(),
|
|
307
|
-
languageCode: z.string().optional(),
|
|
308
|
-
voiceSettings: z.object({
|
|
309
|
-
stability: z.number().min(0).max(1).optional(),
|
|
310
|
-
similarityBoost: z.number().min(0).max(1).optional(),
|
|
311
|
-
style: z.number().min(0).max(1).optional(),
|
|
312
|
-
useSpeakerBoost: z.boolean().optional(),
|
|
313
|
-
speed: z.number().min(.5).max(2).optional()
|
|
314
|
-
}).strict().optional()
|
|
315
|
-
}).strict().optional(),
|
|
316
|
-
openai: z.object({
|
|
317
|
-
apiKey: z.string().optional().register(sensitive),
|
|
318
|
-
model: z.string().optional(),
|
|
319
|
-
voice: z.string().optional()
|
|
320
|
-
}).strict().optional(),
|
|
321
|
-
edge: z.object({
|
|
322
|
-
enabled: z.boolean().optional(),
|
|
323
|
-
voice: z.string().optional(),
|
|
324
|
-
lang: z.string().optional(),
|
|
325
|
-
outputFormat: z.string().optional(),
|
|
326
|
-
pitch: z.string().optional(),
|
|
327
|
-
rate: z.string().optional(),
|
|
328
|
-
volume: z.string().optional(),
|
|
329
|
-
saveSubtitles: z.boolean().optional(),
|
|
330
|
-
proxy: z.string().optional(),
|
|
331
|
-
timeoutMs: z.number().int().min(1e3).max(12e4).optional()
|
|
332
|
-
}).strict().optional(),
|
|
333
|
-
prefsPath: z.string().optional(),
|
|
334
|
-
maxTextLength: z.number().int().min(1).optional(),
|
|
335
|
-
timeoutMs: z.number().int().min(1e3).max(12e4).optional()
|
|
336
|
-
}).strict().optional();
|
|
337
|
-
const HumanDelaySchema = z.object({
|
|
338
|
-
mode: z.union([
|
|
339
|
-
z.literal("off"),
|
|
340
|
-
z.literal("natural"),
|
|
341
|
-
z.literal("custom")
|
|
342
|
-
]).optional(),
|
|
343
|
-
minMs: z.number().int().nonnegative().optional(),
|
|
344
|
-
maxMs: z.number().int().nonnegative().optional()
|
|
345
|
-
}).strict();
|
|
346
|
-
const CliBackendWatchdogModeSchema = z.object({
|
|
347
|
-
noOutputTimeoutMs: z.number().int().min(1e3).optional(),
|
|
348
|
-
noOutputTimeoutRatio: z.number().min(.05).max(.95).optional(),
|
|
349
|
-
minMs: z.number().int().min(1e3).optional(),
|
|
350
|
-
maxMs: z.number().int().min(1e3).optional()
|
|
351
|
-
}).strict().optional();
|
|
352
|
-
const CliBackendSchema = z.object({
|
|
353
|
-
command: z.string(),
|
|
354
|
-
args: z.array(z.string()).optional(),
|
|
355
|
-
output: z.union([
|
|
356
|
-
z.literal("json"),
|
|
357
|
-
z.literal("text"),
|
|
358
|
-
z.literal("jsonl")
|
|
359
|
-
]).optional(),
|
|
360
|
-
resumeOutput: z.union([
|
|
361
|
-
z.literal("json"),
|
|
362
|
-
z.literal("text"),
|
|
363
|
-
z.literal("jsonl")
|
|
364
|
-
]).optional(),
|
|
365
|
-
input: z.union([z.literal("arg"), z.literal("stdin")]).optional(),
|
|
366
|
-
maxPromptArgChars: z.number().int().positive().optional(),
|
|
367
|
-
env: z.record(z.string(), z.string()).optional(),
|
|
368
|
-
clearEnv: z.array(z.string()).optional(),
|
|
369
|
-
modelArg: z.string().optional(),
|
|
370
|
-
modelAliases: z.record(z.string(), z.string()).optional(),
|
|
371
|
-
sessionArg: z.string().optional(),
|
|
372
|
-
sessionArgs: z.array(z.string()).optional(),
|
|
373
|
-
resumeArgs: z.array(z.string()).optional(),
|
|
374
|
-
sessionMode: z.union([
|
|
375
|
-
z.literal("always"),
|
|
376
|
-
z.literal("existing"),
|
|
377
|
-
z.literal("none")
|
|
378
|
-
]).optional(),
|
|
379
|
-
sessionIdFields: z.array(z.string()).optional(),
|
|
380
|
-
systemPromptArg: z.string().optional(),
|
|
381
|
-
systemPromptMode: z.union([z.literal("append"), z.literal("replace")]).optional(),
|
|
382
|
-
systemPromptWhen: z.union([
|
|
383
|
-
z.literal("first"),
|
|
384
|
-
z.literal("always"),
|
|
385
|
-
z.literal("never")
|
|
386
|
-
]).optional(),
|
|
387
|
-
imageArg: z.string().optional(),
|
|
388
|
-
imageMode: z.union([z.literal("repeat"), z.literal("list")]).optional(),
|
|
389
|
-
serialize: z.boolean().optional(),
|
|
390
|
-
reliability: z.object({ watchdog: z.object({
|
|
391
|
-
fresh: CliBackendWatchdogModeSchema,
|
|
392
|
-
resume: CliBackendWatchdogModeSchema
|
|
393
|
-
}).strict().optional() }).strict().optional()
|
|
394
|
-
}).strict();
|
|
395
|
-
const normalizeAllowFrom = (values) => (values ?? []).map((v) => String(v).trim()).filter(Boolean);
|
|
396
|
-
const requireOpenAllowFrom = (params) => {
|
|
397
|
-
if (params.policy !== "open") return;
|
|
398
|
-
if (normalizeAllowFrom(params.allowFrom).includes("*")) return;
|
|
399
|
-
params.ctx.addIssue({
|
|
400
|
-
code: z.ZodIssueCode.custom,
|
|
401
|
-
path: params.path,
|
|
402
|
-
message: params.message
|
|
403
|
-
});
|
|
404
|
-
};
|
|
405
|
-
const MSTeamsReplyStyleSchema = z.enum(["thread", "top-level"]);
|
|
406
|
-
const RetryConfigSchema = z.object({
|
|
407
|
-
attempts: z.number().int().min(1).optional(),
|
|
408
|
-
minDelayMs: z.number().int().min(0).optional(),
|
|
409
|
-
maxDelayMs: z.number().int().min(0).optional(),
|
|
410
|
-
jitter: z.number().min(0).max(1).optional()
|
|
411
|
-
}).strict().optional();
|
|
412
|
-
const QueueModeBySurfaceSchema = z.object({
|
|
413
|
-
whatsapp: QueueModeSchema.optional(),
|
|
414
|
-
telegram: QueueModeSchema.optional(),
|
|
415
|
-
discord: QueueModeSchema.optional(),
|
|
416
|
-
irc: QueueModeSchema.optional(),
|
|
417
|
-
slack: QueueModeSchema.optional(),
|
|
418
|
-
mattermost: QueueModeSchema.optional(),
|
|
419
|
-
signal: QueueModeSchema.optional(),
|
|
420
|
-
imessage: QueueModeSchema.optional(),
|
|
421
|
-
msteams: QueueModeSchema.optional(),
|
|
422
|
-
webchat: QueueModeSchema.optional()
|
|
423
|
-
}).strict().optional();
|
|
424
|
-
const DebounceMsBySurfaceSchema = z.record(z.string(), z.number().int().nonnegative()).optional();
|
|
425
|
-
const QueueSchema = z.object({
|
|
426
|
-
mode: QueueModeSchema.optional(),
|
|
427
|
-
byChannel: QueueModeBySurfaceSchema,
|
|
428
|
-
debounceMs: z.number().int().nonnegative().optional(),
|
|
429
|
-
debounceMsByChannel: DebounceMsBySurfaceSchema,
|
|
430
|
-
cap: z.number().int().positive().optional(),
|
|
431
|
-
drop: QueueDropSchema.optional()
|
|
432
|
-
}).strict().optional();
|
|
433
|
-
const InboundDebounceSchema = z.object({
|
|
434
|
-
debounceMs: z.number().int().nonnegative().optional(),
|
|
435
|
-
byChannel: DebounceMsBySurfaceSchema
|
|
436
|
-
}).strict().optional();
|
|
437
|
-
const TranscribeAudioSchema = z.object({
|
|
438
|
-
command: z.array(z.string()).superRefine((value, ctx) => {
|
|
439
|
-
const executable = value[0];
|
|
440
|
-
if (!isSafeExecutableValue(executable)) ctx.addIssue({
|
|
441
|
-
code: z.ZodIssueCode.custom,
|
|
442
|
-
path: [0],
|
|
443
|
-
message: "expected safe executable name or path"
|
|
444
|
-
});
|
|
445
|
-
}),
|
|
446
|
-
timeoutSeconds: z.number().int().positive().optional()
|
|
447
|
-
}).strict().optional();
|
|
448
|
-
const HexColorSchema = z.string().regex(/^#?[0-9a-fA-F]{6}$/, "expected hex color (RRGGBB)");
|
|
449
|
-
const ExecutableTokenSchema = z.string().refine(isSafeExecutableValue, "expected safe executable name or path");
|
|
450
|
-
const MediaUnderstandingScopeSchema = createAllowDenyChannelRulesSchema();
|
|
451
|
-
const MediaUnderstandingCapabilitiesSchema = z.array(z.union([
|
|
452
|
-
z.literal("image"),
|
|
453
|
-
z.literal("audio"),
|
|
454
|
-
z.literal("video")
|
|
455
|
-
])).optional();
|
|
456
|
-
const MediaUnderstandingAttachmentsSchema = z.object({
|
|
457
|
-
mode: z.union([z.literal("first"), z.literal("all")]).optional(),
|
|
458
|
-
maxAttachments: z.number().int().positive().optional(),
|
|
459
|
-
prefer: z.union([
|
|
460
|
-
z.literal("first"),
|
|
461
|
-
z.literal("last"),
|
|
462
|
-
z.literal("path"),
|
|
463
|
-
z.literal("url")
|
|
464
|
-
]).optional()
|
|
465
|
-
}).strict().optional();
|
|
466
|
-
const DeepgramAudioSchema = z.object({
|
|
467
|
-
detectLanguage: z.boolean().optional(),
|
|
468
|
-
punctuate: z.boolean().optional(),
|
|
469
|
-
smartFormat: z.boolean().optional()
|
|
470
|
-
}).strict().optional();
|
|
471
|
-
const ProviderOptionValueSchema = z.union([
|
|
472
|
-
z.string(),
|
|
473
|
-
z.number(),
|
|
474
|
-
z.boolean()
|
|
475
|
-
]);
|
|
476
|
-
const ProviderOptionsSchema = z.record(z.string(), z.record(z.string(), ProviderOptionValueSchema)).optional();
|
|
477
|
-
const MediaUnderstandingRuntimeFields = {
|
|
478
|
-
prompt: z.string().optional(),
|
|
479
|
-
timeoutSeconds: z.number().int().positive().optional(),
|
|
480
|
-
language: z.string().optional(),
|
|
481
|
-
providerOptions: ProviderOptionsSchema,
|
|
482
|
-
deepgram: DeepgramAudioSchema,
|
|
483
|
-
baseUrl: z.string().optional(),
|
|
484
|
-
headers: z.record(z.string(), z.string()).optional()
|
|
485
|
-
};
|
|
486
|
-
const MediaUnderstandingModelSchema = z.object({
|
|
487
|
-
provider: z.string().optional(),
|
|
488
|
-
model: z.string().optional(),
|
|
489
|
-
capabilities: MediaUnderstandingCapabilitiesSchema,
|
|
490
|
-
type: z.union([z.literal("provider"), z.literal("cli")]).optional(),
|
|
491
|
-
command: z.string().optional(),
|
|
492
|
-
args: z.array(z.string()).optional(),
|
|
493
|
-
maxChars: z.number().int().positive().optional(),
|
|
494
|
-
maxBytes: z.number().int().positive().optional(),
|
|
495
|
-
...MediaUnderstandingRuntimeFields,
|
|
496
|
-
profile: z.string().optional(),
|
|
497
|
-
preferredProfile: z.string().optional()
|
|
498
|
-
}).strict().optional();
|
|
499
|
-
const ToolsMediaUnderstandingSchema = z.object({
|
|
500
|
-
enabled: z.boolean().optional(),
|
|
501
|
-
scope: MediaUnderstandingScopeSchema,
|
|
502
|
-
maxBytes: z.number().int().positive().optional(),
|
|
503
|
-
maxChars: z.number().int().positive().optional(),
|
|
504
|
-
...MediaUnderstandingRuntimeFields,
|
|
505
|
-
attachments: MediaUnderstandingAttachmentsSchema,
|
|
506
|
-
models: z.array(MediaUnderstandingModelSchema).optional()
|
|
507
|
-
}).strict().optional();
|
|
508
|
-
const ToolsMediaSchema = z.object({
|
|
509
|
-
models: z.array(MediaUnderstandingModelSchema).optional(),
|
|
510
|
-
concurrency: z.number().int().positive().optional(),
|
|
511
|
-
image: ToolsMediaUnderstandingSchema.optional(),
|
|
512
|
-
audio: ToolsMediaUnderstandingSchema.optional(),
|
|
513
|
-
video: ToolsMediaUnderstandingSchema.optional()
|
|
514
|
-
}).strict().optional();
|
|
515
|
-
const LinkModelSchema = z.object({
|
|
516
|
-
type: z.literal("cli").optional(),
|
|
517
|
-
command: z.string().min(1),
|
|
518
|
-
args: z.array(z.string()).optional(),
|
|
519
|
-
timeoutSeconds: z.number().int().positive().optional()
|
|
520
|
-
}).strict();
|
|
521
|
-
const ToolsLinksSchema = z.object({
|
|
522
|
-
enabled: z.boolean().optional(),
|
|
523
|
-
scope: MediaUnderstandingScopeSchema,
|
|
524
|
-
maxLinks: z.number().int().positive().optional(),
|
|
525
|
-
timeoutSeconds: z.number().int().positive().optional(),
|
|
526
|
-
models: z.array(LinkModelSchema).optional()
|
|
527
|
-
}).strict().optional();
|
|
528
|
-
const NativeCommandsSettingSchema = z.union([z.boolean(), z.literal("auto")]);
|
|
529
|
-
const ProviderCommandsSchema = z.object({ native: NativeCommandsSettingSchema.optional() }).strict().optional();
|
|
530
|
-
|
|
531
|
-
//#endregion
|
|
532
|
-
//#region src/config/zod-schema.agent-runtime.ts
|
|
533
|
-
/** Auth profile ref: `false` (skip), single string, or string array (rotation). */
|
|
534
|
-
const AuthFieldSchema = z.union([
|
|
535
|
-
z.literal(false),
|
|
536
|
-
z.string(),
|
|
537
|
-
z.array(z.string())
|
|
538
|
-
]).optional();
|
|
539
|
-
const BootSchema = z.object({
|
|
540
|
-
prompt: z.string().optional(),
|
|
541
|
-
file: z.string().optional()
|
|
542
|
-
}).strict().optional();
|
|
543
|
-
const HeartbeatSchema = z.object({
|
|
544
|
-
every: z.string().optional(),
|
|
545
|
-
activeHours: z.object({
|
|
546
|
-
start: z.string().optional(),
|
|
547
|
-
end: z.string().optional(),
|
|
548
|
-
timezone: z.string().optional()
|
|
549
|
-
}).strict().optional(),
|
|
550
|
-
model: z.string().optional(),
|
|
551
|
-
session: z.string().optional(),
|
|
552
|
-
target: z.string().optional(),
|
|
553
|
-
to: z.string().optional(),
|
|
554
|
-
accountId: z.string().optional(),
|
|
555
|
-
prompt: z.string().optional(),
|
|
556
|
-
file: z.string().optional(),
|
|
557
|
-
suppressToolErrorWarnings: z.boolean().optional()
|
|
558
|
-
}).strict().superRefine((val, ctx) => {
|
|
559
|
-
if (!val.every) return;
|
|
560
|
-
try {
|
|
561
|
-
parseDurationMs(val.every, { defaultUnit: "m" });
|
|
562
|
-
} catch {
|
|
563
|
-
ctx.addIssue({
|
|
564
|
-
code: z.ZodIssueCode.custom,
|
|
565
|
-
path: ["every"],
|
|
566
|
-
message: "invalid duration (use ms, s, m, h)"
|
|
567
|
-
});
|
|
568
|
-
}
|
|
569
|
-
const active = val.activeHours;
|
|
570
|
-
if (!active) return;
|
|
571
|
-
const timePattern = /^([01]\d|2[0-3]|24):([0-5]\d)$/;
|
|
572
|
-
const validateTime = (raw, opts, path) => {
|
|
573
|
-
if (!raw) return;
|
|
574
|
-
if (!timePattern.test(raw)) {
|
|
575
|
-
ctx.addIssue({
|
|
576
|
-
code: z.ZodIssueCode.custom,
|
|
577
|
-
path: ["activeHours", path],
|
|
578
|
-
message: "invalid time (use \"HH:MM\" 24h format)"
|
|
579
|
-
});
|
|
580
|
-
return;
|
|
581
|
-
}
|
|
582
|
-
const [hourStr, minuteStr] = raw.split(":");
|
|
583
|
-
const hour = Number(hourStr);
|
|
584
|
-
if (hour === 24 && Number(minuteStr) !== 0) {
|
|
585
|
-
ctx.addIssue({
|
|
586
|
-
code: z.ZodIssueCode.custom,
|
|
587
|
-
path: ["activeHours", path],
|
|
588
|
-
message: "invalid time (24:00 is the only allowed 24:xx value)"
|
|
589
|
-
});
|
|
590
|
-
return;
|
|
591
|
-
}
|
|
592
|
-
if (hour === 24 && !opts.allow24) ctx.addIssue({
|
|
593
|
-
code: z.ZodIssueCode.custom,
|
|
594
|
-
path: ["activeHours", path],
|
|
595
|
-
message: "invalid time (start cannot be 24:00)"
|
|
596
|
-
});
|
|
597
|
-
};
|
|
598
|
-
validateTime(active.start, { allow24: false }, "start");
|
|
599
|
-
validateTime(active.end, { allow24: true }, "end");
|
|
600
|
-
}).optional();
|
|
601
|
-
const ToolPolicyBaseSchema = z.object({
|
|
602
|
-
allow: z.array(z.string()).optional(),
|
|
603
|
-
alsoAllow: z.array(z.string()).optional(),
|
|
604
|
-
deny: z.array(z.string()).optional()
|
|
605
|
-
}).strict();
|
|
606
|
-
const ToolPolicySchema = ToolPolicyBaseSchema.superRefine((value, ctx) => {
|
|
607
|
-
if (value.allow && value.allow.length > 0 && value.alsoAllow && value.alsoAllow.length > 0) ctx.addIssue({
|
|
608
|
-
code: z.ZodIssueCode.custom,
|
|
609
|
-
message: "tools policy cannot set both allow and alsoAllow in the same scope (merge alsoAllow into allow, or remove allow and use profile + alsoAllow)"
|
|
610
|
-
});
|
|
611
|
-
}).optional();
|
|
612
|
-
const ToolProfileSchema = z.union([
|
|
613
|
-
z.literal("minimal"),
|
|
614
|
-
z.literal("coding"),
|
|
615
|
-
z.literal("messaging"),
|
|
616
|
-
z.literal("full")
|
|
617
|
-
]).optional();
|
|
618
|
-
function addAllowAlsoAllowConflictIssue(value, ctx, message) {
|
|
619
|
-
if (value.allow && value.allow.length > 0 && value.alsoAllow && value.alsoAllow.length > 0) ctx.addIssue({
|
|
620
|
-
code: z.ZodIssueCode.custom,
|
|
621
|
-
message
|
|
622
|
-
});
|
|
623
|
-
}
|
|
624
|
-
const ToolPolicyWithProfileSchema = z.object({
|
|
625
|
-
allow: z.array(z.string()).optional(),
|
|
626
|
-
alsoAllow: z.array(z.string()).optional(),
|
|
627
|
-
deny: z.array(z.string()).optional(),
|
|
628
|
-
profile: ToolProfileSchema
|
|
629
|
-
}).strict().superRefine((value, ctx) => {
|
|
630
|
-
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)");
|
|
631
|
-
});
|
|
632
|
-
const ElevatedAllowFromSchema = z.record(z.string(), z.array(z.union([z.string(), z.number()]))).optional();
|
|
633
|
-
const ToolExecSafeBinProfileSchema = z.object({
|
|
634
|
-
minPositional: z.number().int().nonnegative().optional(),
|
|
635
|
-
maxPositional: z.number().int().nonnegative().optional(),
|
|
636
|
-
allowedValueFlags: z.array(z.string()).optional(),
|
|
637
|
-
deniedFlags: z.array(z.string()).optional()
|
|
638
|
-
}).strict();
|
|
639
|
-
const ToolExecBaseShape = {
|
|
640
|
-
host: z.enum([
|
|
641
|
-
"sandbox",
|
|
642
|
-
"gateway",
|
|
643
|
-
"node"
|
|
644
|
-
]).optional(),
|
|
645
|
-
security: z.enum([
|
|
646
|
-
"deny",
|
|
647
|
-
"allowlist",
|
|
648
|
-
"full"
|
|
649
|
-
]).optional(),
|
|
650
|
-
ask: z.enum([
|
|
651
|
-
"off",
|
|
652
|
-
"on-miss",
|
|
653
|
-
"always"
|
|
654
|
-
]).optional(),
|
|
655
|
-
node: z.string().optional(),
|
|
656
|
-
pathPrepend: z.array(z.string()).optional(),
|
|
657
|
-
safeBins: z.array(z.string()).optional(),
|
|
658
|
-
safeBinTrustedDirs: z.array(z.string()).optional(),
|
|
659
|
-
safeBinProfiles: z.record(z.string(), ToolExecSafeBinProfileSchema).optional(),
|
|
660
|
-
backgroundMs: z.number().int().positive().optional(),
|
|
661
|
-
timeoutSec: z.number().int().positive().optional(),
|
|
662
|
-
cleanupMs: z.number().int().positive().optional(),
|
|
663
|
-
notifyOnExit: z.boolean().optional(),
|
|
664
|
-
notifyOnExitEmptySuccess: z.boolean().optional()
|
|
665
|
-
};
|
|
666
|
-
const AgentToolExecSchema = z.object({
|
|
667
|
-
...ToolExecBaseShape,
|
|
668
|
-
approvalRunningNoticeMs: z.number().int().nonnegative().optional()
|
|
669
|
-
}).strict().optional();
|
|
670
|
-
const ToolExecSchema = z.object(ToolExecBaseShape).strict().optional();
|
|
671
|
-
const ToolFsSchema = z.object({ workspaceOnly: z.boolean().optional() }).strict().optional();
|
|
672
|
-
const CommonToolPolicyFields = {
|
|
673
|
-
profile: ToolProfileSchema,
|
|
674
|
-
allow: z.array(z.string()).optional(),
|
|
675
|
-
alsoAllow: z.array(z.string()).optional(),
|
|
676
|
-
deny: z.array(z.string()).optional(),
|
|
677
|
-
byProvider: z.record(z.string(), ToolPolicyWithProfileSchema).optional()
|
|
678
|
-
};
|
|
679
|
-
const AgentToolsSchema = z.object({
|
|
680
|
-
...CommonToolPolicyFields,
|
|
681
|
-
elevated: z.object({
|
|
682
|
-
enabled: z.boolean().optional(),
|
|
683
|
-
allowFrom: ElevatedAllowFromSchema
|
|
684
|
-
}).strict().optional(),
|
|
685
|
-
exec: AgentToolExecSchema,
|
|
686
|
-
fs: ToolFsSchema
|
|
687
|
-
}).strict().superRefine((value, ctx) => {
|
|
688
|
-
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)");
|
|
689
|
-
}).optional();
|
|
690
|
-
const AgentEntrySchema = z.object({
|
|
691
|
-
id: z.string(),
|
|
692
|
-
default: z.boolean().optional(),
|
|
693
|
-
name: z.string().optional(),
|
|
694
|
-
workspace: z.string().optional(),
|
|
695
|
-
agentDir: z.string().optional(),
|
|
696
|
-
model: z.unknown().optional(),
|
|
697
|
-
skills: z.array(z.string()).optional(),
|
|
698
|
-
humanDelay: HumanDelaySchema.optional(),
|
|
699
|
-
heartbeat: HeartbeatSchema,
|
|
700
|
-
boot: BootSchema,
|
|
701
|
-
identity: IdentitySchema,
|
|
702
|
-
groupChat: GroupChatSchema,
|
|
703
|
-
subagents: z.object({
|
|
704
|
-
allowAgents: z.array(z.string()).optional(),
|
|
705
|
-
model: z.unknown().optional()
|
|
706
|
-
}).strict().optional(),
|
|
707
|
-
editableFiles: z.array(z.string()).optional(),
|
|
708
|
-
tools: AgentToolsSchema,
|
|
709
|
-
auth: AuthFieldSchema
|
|
710
|
-
}).strict();
|
|
711
|
-
const ToolsSchema = z.object({
|
|
712
|
-
...CommonToolPolicyFields,
|
|
713
|
-
media: ToolsMediaSchema,
|
|
714
|
-
links: ToolsLinksSchema,
|
|
715
|
-
sessions: z.object({ visibility: z.enum([
|
|
716
|
-
"self",
|
|
717
|
-
"tree",
|
|
718
|
-
"agent",
|
|
719
|
-
"all"
|
|
720
|
-
]).optional() }).strict().optional(),
|
|
721
|
-
message: z.object({
|
|
722
|
-
allowCrossContextSend: z.boolean().optional(),
|
|
723
|
-
crossContext: z.object({
|
|
724
|
-
allowWithinProvider: z.boolean().optional(),
|
|
725
|
-
allowAcrossProviders: z.boolean().optional(),
|
|
726
|
-
marker: z.object({
|
|
727
|
-
enabled: z.boolean().optional(),
|
|
728
|
-
prefix: z.string().optional(),
|
|
729
|
-
suffix: z.string().optional()
|
|
730
|
-
}).strict().optional()
|
|
731
|
-
}).strict().optional(),
|
|
732
|
-
broadcast: z.object({ enabled: z.boolean().optional() }).strict().optional()
|
|
733
|
-
}).strict().optional(),
|
|
734
|
-
agentToAgent: z.object({
|
|
735
|
-
enabled: z.boolean().optional(),
|
|
736
|
-
allow: z.array(z.string()).optional()
|
|
737
|
-
}).strict().optional(),
|
|
738
|
-
elevated: z.object({
|
|
739
|
-
enabled: z.boolean().optional(),
|
|
740
|
-
allowFrom: ElevatedAllowFromSchema
|
|
741
|
-
}).strict().optional(),
|
|
742
|
-
exec: ToolExecSchema,
|
|
743
|
-
fs: ToolFsSchema,
|
|
744
|
-
subagents: z.object({ tools: ToolPolicySchema }).strict().optional()
|
|
745
|
-
}).strict().superRefine((value, ctx) => {
|
|
746
|
-
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)");
|
|
747
|
-
}).optional();
|
|
748
|
-
|
|
749
|
-
//#endregion
|
|
750
|
-
//#region src/config/zod-schema.agent-defaults.ts
|
|
751
|
-
const AgentDefaultsSchema = z.object({
|
|
752
|
-
model: z.unknown().optional(),
|
|
753
|
-
imageModel: z.unknown().optional(),
|
|
754
|
-
models: z.unknown().optional(),
|
|
755
|
-
workspace: z.string().optional(),
|
|
756
|
-
repoRoot: z.string().optional(),
|
|
757
|
-
skipBootstrap: z.boolean().optional(),
|
|
758
|
-
bootstrapMaxChars: z.number().int().positive().optional(),
|
|
759
|
-
bootstrapTotalMaxChars: z.number().int().positive().optional(),
|
|
760
|
-
userTimezone: z.string().optional(),
|
|
761
|
-
timeFormat: z.union([
|
|
762
|
-
z.literal("auto"),
|
|
763
|
-
z.literal("12"),
|
|
764
|
-
z.literal("24")
|
|
765
|
-
]).optional(),
|
|
766
|
-
envelopeTimezone: z.string().optional(),
|
|
767
|
-
envelopeTimestamp: z.union([z.literal("on"), z.literal("off")]).optional(),
|
|
768
|
-
envelopeElapsed: z.union([z.literal("on"), z.literal("off")]).optional(),
|
|
769
|
-
contextTokens: z.number().int().positive().optional(),
|
|
770
|
-
cliBackends: z.unknown().optional(),
|
|
771
|
-
contextPruning: z.object({
|
|
772
|
-
mode: z.union([z.literal("off"), z.literal("cache-ttl")]).optional(),
|
|
773
|
-
ttl: z.string().optional(),
|
|
774
|
-
keepLastAssistants: z.number().int().nonnegative().optional(),
|
|
775
|
-
softTrimRatio: z.number().min(0).max(1).optional(),
|
|
776
|
-
hardClearRatio: z.number().min(0).max(1).optional(),
|
|
777
|
-
minPrunableToolChars: z.number().int().nonnegative().optional(),
|
|
778
|
-
tools: z.object({
|
|
779
|
-
allow: z.array(z.string()).optional(),
|
|
780
|
-
deny: z.array(z.string()).optional()
|
|
781
|
-
}).strict().optional(),
|
|
782
|
-
softTrim: z.object({
|
|
783
|
-
maxChars: z.number().int().nonnegative().optional(),
|
|
784
|
-
headChars: z.number().int().nonnegative().optional(),
|
|
785
|
-
tailChars: z.number().int().nonnegative().optional()
|
|
786
|
-
}).strict().optional(),
|
|
787
|
-
hardClear: z.object({
|
|
788
|
-
enabled: z.boolean().optional(),
|
|
789
|
-
placeholder: z.string().optional()
|
|
790
|
-
}).strict().optional()
|
|
791
|
-
}).strict().optional(),
|
|
792
|
-
verboseDefault: z.union([
|
|
793
|
-
z.literal("off"),
|
|
794
|
-
z.literal("on"),
|
|
795
|
-
z.literal("full")
|
|
796
|
-
]).optional(),
|
|
797
|
-
elevatedDefault: z.union([
|
|
798
|
-
z.literal("off"),
|
|
799
|
-
z.literal("on"),
|
|
800
|
-
z.literal("ask"),
|
|
801
|
-
z.literal("full")
|
|
802
|
-
]).optional(),
|
|
803
|
-
blockStreamingDefault: z.union([z.literal("off"), z.literal("on")]).optional(),
|
|
804
|
-
blockStreamingBreak: z.union([z.literal("text_end"), z.literal("message_end")]).optional(),
|
|
805
|
-
blockStreamingChunk: BlockStreamingChunkSchema.optional(),
|
|
806
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
807
|
-
humanDelay: HumanDelaySchema.optional(),
|
|
808
|
-
timeoutSeconds: z.number().int().positive().optional(),
|
|
809
|
-
mediaMaxMb: z.number().positive().optional(),
|
|
810
|
-
imageMaxDimensionPx: z.number().int().positive().optional(),
|
|
811
|
-
typingIntervalSeconds: z.number().int().positive().optional(),
|
|
812
|
-
typingMode: TypingModeSchema.optional(),
|
|
813
|
-
heartbeat: HeartbeatSchema,
|
|
814
|
-
boot: BootSchema,
|
|
815
|
-
maxConcurrent: z.number().int().positive().optional(),
|
|
816
|
-
subagents: z.object({
|
|
817
|
-
maxConcurrent: z.number().int().positive().optional(),
|
|
818
|
-
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."),
|
|
819
|
-
maxChildrenPerAgent: z.number().int().min(1).max(20).optional().describe("Maximum number of active children a single agent session can spawn (default: 5)."),
|
|
820
|
-
archiveAfterMinutes: z.number().int().positive().optional(),
|
|
821
|
-
model: z.unknown().optional(),
|
|
822
|
-
runTimeoutSeconds: z.number().int().min(0).optional(),
|
|
823
|
-
announceTimeoutMs: z.number().int().positive().optional()
|
|
824
|
-
}).strict().optional(),
|
|
825
|
-
editableFiles: z.array(z.string()).optional(),
|
|
826
|
-
sandbox: z.unknown().optional(),
|
|
827
|
-
runtime: z.union([
|
|
828
|
-
z.literal("claude"),
|
|
829
|
-
z.literal("gemini"),
|
|
830
|
-
z.literal("codex"),
|
|
831
|
-
z.literal("opencode")
|
|
832
|
-
]).optional(),
|
|
833
|
-
runtimeArgs: z.array(z.string()).optional(),
|
|
834
|
-
runtimeEnv: z.record(z.string(), z.string()).optional(),
|
|
835
|
-
auth: AuthFieldSchema
|
|
836
|
-
}).strict().optional();
|
|
837
|
-
|
|
838
|
-
//#endregion
|
|
839
|
-
//#region src/config/zod-schema.agents.ts
|
|
840
|
-
const AgentsSchema = z.object({
|
|
841
|
-
defaults: z.lazy(() => AgentDefaultsSchema).optional(),
|
|
842
|
-
list: z.array(AgentEntrySchema).optional()
|
|
843
|
-
}).strict().optional();
|
|
844
|
-
const BindingsSchema = z.array(z.object({
|
|
845
|
-
agentId: z.string(),
|
|
846
|
-
comment: z.string().optional(),
|
|
847
|
-
match: z.object({
|
|
848
|
-
channel: z.string(),
|
|
849
|
-
accountId: z.string().optional(),
|
|
850
|
-
peer: z.object({
|
|
851
|
-
kind: z.union([
|
|
852
|
-
z.literal("direct"),
|
|
853
|
-
z.literal("group"),
|
|
854
|
-
z.literal("channel"),
|
|
855
|
-
z.literal("dm")
|
|
856
|
-
]),
|
|
857
|
-
id: z.string()
|
|
858
|
-
}).strict().optional(),
|
|
859
|
-
guildId: z.string().optional(),
|
|
860
|
-
teamId: z.string().optional(),
|
|
861
|
-
roles: z.array(z.string()).optional()
|
|
862
|
-
}).strict()
|
|
863
|
-
}).strict()).optional();
|
|
864
|
-
const BroadcastStrategySchema = z.enum(["parallel", "sequential"]);
|
|
865
|
-
const BroadcastSchema = z.object({ strategy: BroadcastStrategySchema.optional() }).catchall(z.array(z.string())).optional();
|
|
866
|
-
const AudioSchema = z.object({ transcription: TranscribeAudioSchema }).strict().optional();
|
|
867
|
-
|
|
868
|
-
//#endregion
|
|
869
|
-
//#region src/config/zod-schema.approvals.ts
|
|
870
|
-
const ExecApprovalForwardTargetSchema = z.object({
|
|
871
|
-
channel: z.string().min(1),
|
|
872
|
-
to: z.string().min(1),
|
|
873
|
-
accountId: z.string().optional(),
|
|
874
|
-
threadId: z.union([z.string(), z.number()]).optional()
|
|
875
|
-
}).strict();
|
|
876
|
-
const ExecApprovalForwardingSchema = z.object({
|
|
877
|
-
enabled: z.boolean().optional(),
|
|
878
|
-
mode: z.union([
|
|
879
|
-
z.literal("session"),
|
|
880
|
-
z.literal("targets"),
|
|
881
|
-
z.literal("both")
|
|
882
|
-
]).optional(),
|
|
883
|
-
agentFilter: z.array(z.string()).optional(),
|
|
884
|
-
sessionFilter: z.array(z.string()).optional(),
|
|
885
|
-
targets: z.array(ExecApprovalForwardTargetSchema).optional()
|
|
886
|
-
}).strict().optional();
|
|
887
|
-
const ApprovalsSchema = z.object({ exec: ExecApprovalForwardingSchema }).strict().optional();
|
|
888
|
-
|
|
889
|
-
//#endregion
|
|
890
|
-
//#region src/config/zod-schema.installs.ts
|
|
891
|
-
const InstallSourceSchema = z.union([
|
|
892
|
-
z.literal("npm"),
|
|
893
|
-
z.literal("archive"),
|
|
894
|
-
z.literal("path")
|
|
895
|
-
]);
|
|
896
|
-
const InstallRecordShape = {
|
|
897
|
-
source: InstallSourceSchema,
|
|
898
|
-
spec: z.string().optional(),
|
|
899
|
-
sourcePath: z.string().optional(),
|
|
900
|
-
installPath: z.string().optional(),
|
|
901
|
-
version: z.string().optional(),
|
|
902
|
-
resolvedName: z.string().optional(),
|
|
903
|
-
resolvedVersion: z.string().optional(),
|
|
904
|
-
resolvedSpec: z.string().optional(),
|
|
905
|
-
integrity: z.string().optional(),
|
|
906
|
-
shasum: z.string().optional(),
|
|
907
|
-
resolvedAt: z.string().optional(),
|
|
908
|
-
installedAt: z.string().optional()
|
|
909
|
-
};
|
|
910
|
-
|
|
911
|
-
//#endregion
|
|
912
|
-
//#region src/config/zod-schema.hooks.ts
|
|
913
|
-
function isSafeRelativeModulePath(raw) {
|
|
914
|
-
const value = raw.trim();
|
|
915
|
-
if (!value) return false;
|
|
916
|
-
if (path.isAbsolute(value)) return false;
|
|
917
|
-
if (value.startsWith("~")) return false;
|
|
918
|
-
if (value.includes(":")) return false;
|
|
919
|
-
if (value.split(/[\\/]+/g).some((part) => part === "..")) return false;
|
|
920
|
-
return true;
|
|
921
|
-
}
|
|
922
|
-
const SafeRelativeModulePathSchema = z.string().refine(isSafeRelativeModulePath, "module must be a safe relative path (no absolute paths)");
|
|
923
|
-
const HookMappingSchema = z.object({
|
|
924
|
-
id: z.string().optional(),
|
|
925
|
-
match: z.object({
|
|
926
|
-
path: z.string().optional(),
|
|
927
|
-
source: z.string().optional()
|
|
928
|
-
}).optional(),
|
|
929
|
-
action: z.union([z.literal("wake"), z.literal("agent")]).optional(),
|
|
930
|
-
wakeMode: z.union([z.literal("now"), z.literal("next-heartbeat")]).optional(),
|
|
931
|
-
name: z.string().optional(),
|
|
932
|
-
agentId: z.string().optional(),
|
|
933
|
-
sessionKey: z.string().optional().register(sensitive),
|
|
934
|
-
messageTemplate: z.string().optional(),
|
|
935
|
-
textTemplate: z.string().optional(),
|
|
936
|
-
deliver: z.boolean().optional(),
|
|
937
|
-
allowUnsafeExternalContent: z.boolean().optional(),
|
|
938
|
-
channel: z.union([
|
|
939
|
-
z.literal("last"),
|
|
940
|
-
z.literal("whatsapp"),
|
|
941
|
-
z.literal("telegram"),
|
|
942
|
-
z.literal("discord"),
|
|
943
|
-
z.literal("irc"),
|
|
944
|
-
z.literal("slack"),
|
|
945
|
-
z.literal("signal"),
|
|
946
|
-
z.literal("imessage"),
|
|
947
|
-
z.literal("msteams")
|
|
948
|
-
]).optional(),
|
|
949
|
-
to: z.string().optional(),
|
|
950
|
-
model: z.string().optional(),
|
|
951
|
-
thinking: z.string().optional(),
|
|
952
|
-
timeoutSeconds: z.number().int().positive().optional(),
|
|
953
|
-
transform: z.object({
|
|
954
|
-
module: SafeRelativeModulePathSchema,
|
|
955
|
-
export: z.string().optional()
|
|
956
|
-
}).strict().optional()
|
|
957
|
-
}).strict().optional();
|
|
958
|
-
const InternalHookHandlerSchema = z.object({
|
|
959
|
-
event: z.string(),
|
|
960
|
-
module: SafeRelativeModulePathSchema,
|
|
961
|
-
export: z.string().optional()
|
|
962
|
-
}).strict();
|
|
963
|
-
const HookConfigSchema = z.object({
|
|
964
|
-
enabled: z.boolean().optional(),
|
|
965
|
-
env: z.record(z.string(), z.string()).optional()
|
|
966
|
-
}).passthrough();
|
|
967
|
-
const HookInstallRecordSchema = z.object({
|
|
968
|
-
...InstallRecordShape,
|
|
969
|
-
hooks: z.array(z.string()).optional()
|
|
970
|
-
}).strict();
|
|
971
|
-
const InternalHooksSchema = z.object({
|
|
972
|
-
enabled: z.boolean().optional(),
|
|
973
|
-
handlers: z.array(InternalHookHandlerSchema).optional(),
|
|
974
|
-
entries: z.record(z.string(), HookConfigSchema).optional(),
|
|
975
|
-
load: z.object({ extraDirs: z.array(z.string()).optional() }).strict().optional(),
|
|
976
|
-
installs: z.record(z.string(), HookInstallRecordSchema).optional()
|
|
977
|
-
}).strict().optional();
|
|
978
|
-
const HooksGmailSchema = z.object({
|
|
979
|
-
account: z.string().optional(),
|
|
980
|
-
label: z.string().optional(),
|
|
981
|
-
topic: z.string().optional(),
|
|
982
|
-
subscription: z.string().optional(),
|
|
983
|
-
pushToken: z.string().optional().register(sensitive),
|
|
984
|
-
hookUrl: z.string().optional(),
|
|
985
|
-
includeBody: z.boolean().optional(),
|
|
986
|
-
maxBytes: z.number().int().positive().optional(),
|
|
987
|
-
renewEveryMinutes: z.number().int().positive().optional(),
|
|
988
|
-
allowUnsafeExternalContent: z.boolean().optional(),
|
|
989
|
-
serve: z.object({
|
|
990
|
-
bind: z.string().optional(),
|
|
991
|
-
port: z.number().int().positive().optional(),
|
|
992
|
-
path: z.string().optional()
|
|
993
|
-
}).strict().optional(),
|
|
994
|
-
tailscale: z.object({
|
|
995
|
-
mode: z.union([
|
|
996
|
-
z.literal("off"),
|
|
997
|
-
z.literal("serve"),
|
|
998
|
-
z.literal("funnel")
|
|
999
|
-
]).optional(),
|
|
1000
|
-
path: z.string().optional(),
|
|
1001
|
-
target: z.string().optional()
|
|
1002
|
-
}).strict().optional(),
|
|
1003
|
-
model: z.string().optional(),
|
|
1004
|
-
thinking: z.union([
|
|
1005
|
-
z.literal("off"),
|
|
1006
|
-
z.literal("minimal"),
|
|
1007
|
-
z.literal("low"),
|
|
1008
|
-
z.literal("medium"),
|
|
1009
|
-
z.literal("high")
|
|
1010
|
-
]).optional()
|
|
1011
|
-
}).strict().optional();
|
|
1012
|
-
|
|
1013
|
-
//#endregion
|
|
1014
|
-
//#region src/config/zod-schema.channels.ts
|
|
1015
|
-
const ChannelHeartbeatVisibilitySchema = z.object({
|
|
1016
|
-
showOk: z.boolean().optional(),
|
|
1017
|
-
showAlerts: z.boolean().optional(),
|
|
1018
|
-
useIndicator: z.boolean().optional()
|
|
1019
|
-
}).strict().optional();
|
|
1020
|
-
|
|
1021
|
-
//#endregion
|
|
1022
|
-
//#region src/infra/scp-host.ts
|
|
1023
|
-
const SSH_TOKEN = /^[A-Za-z0-9._-]+$/;
|
|
1024
|
-
const BRACKETED_IPV6 = /^\[[0-9A-Fa-f:.%]+\]$/;
|
|
1025
|
-
const WHITESPACE = /\s/;
|
|
1026
|
-
function hasControlOrWhitespace(value) {
|
|
1027
|
-
for (const char of value) {
|
|
1028
|
-
const code = char.charCodeAt(0);
|
|
1029
|
-
if (code <= 31 || code === 127 || WHITESPACE.test(char)) return true;
|
|
1030
|
-
}
|
|
1031
|
-
return false;
|
|
1032
|
-
}
|
|
1033
|
-
function normalizeScpRemoteHost(value) {
|
|
1034
|
-
if (typeof value !== "string") return;
|
|
1035
|
-
const trimmed = value.trim();
|
|
1036
|
-
if (!trimmed) return;
|
|
1037
|
-
if (hasControlOrWhitespace(trimmed)) return;
|
|
1038
|
-
if (trimmed.startsWith("-") || trimmed.includes("/") || trimmed.includes("\\")) return;
|
|
1039
|
-
const firstAt = trimmed.indexOf("@");
|
|
1040
|
-
const lastAt = trimmed.lastIndexOf("@");
|
|
1041
|
-
let user;
|
|
1042
|
-
let host = trimmed;
|
|
1043
|
-
if (firstAt !== -1) {
|
|
1044
|
-
if (firstAt !== lastAt || firstAt === 0 || firstAt === trimmed.length - 1) return;
|
|
1045
|
-
user = trimmed.slice(0, firstAt);
|
|
1046
|
-
host = trimmed.slice(firstAt + 1);
|
|
1047
|
-
if (!SSH_TOKEN.test(user)) return;
|
|
1048
|
-
}
|
|
1049
|
-
if (!host || host.startsWith("-") || host.includes("@")) return;
|
|
1050
|
-
if (host.includes(":") && !BRACKETED_IPV6.test(host)) return;
|
|
1051
|
-
if (!SSH_TOKEN.test(host) && !BRACKETED_IPV6.test(host)) return;
|
|
1052
|
-
return user ? `${user}@${host}` : host;
|
|
1053
|
-
}
|
|
1054
|
-
function isSafeScpRemoteHost(value) {
|
|
1055
|
-
return normalizeScpRemoteHost(value) !== void 0;
|
|
1056
|
-
}
|
|
1057
|
-
|
|
1058
|
-
//#endregion
|
|
1059
|
-
//#region src/config/telegram-custom-commands.ts
|
|
1060
|
-
const TELEGRAM_COMMAND_NAME_PATTERN = /^[a-z0-9_]{1,32}$/;
|
|
1061
|
-
function normalizeTelegramCommandName(value) {
|
|
1062
|
-
const trimmed = value.trim();
|
|
1063
|
-
if (!trimmed) return "";
|
|
1064
|
-
return (trimmed.startsWith("/") ? trimmed.slice(1) : trimmed).trim().toLowerCase().replace(/-/g, "_");
|
|
1065
|
-
}
|
|
1066
|
-
function normalizeTelegramCommandDescription(value) {
|
|
1067
|
-
return value.trim();
|
|
1068
|
-
}
|
|
1069
|
-
function resolveTelegramCustomCommands(params) {
|
|
1070
|
-
const entries = Array.isArray(params.commands) ? params.commands : [];
|
|
1071
|
-
const reserved = params.reservedCommands ?? /* @__PURE__ */ new Set();
|
|
1072
|
-
const checkReserved = params.checkReserved !== false;
|
|
1073
|
-
const checkDuplicates = params.checkDuplicates !== false;
|
|
1074
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1075
|
-
const resolved = [];
|
|
1076
|
-
const issues = [];
|
|
1077
|
-
for (let index = 0; index < entries.length; index += 1) {
|
|
1078
|
-
const entry = entries[index];
|
|
1079
|
-
const normalized = normalizeTelegramCommandName(String(entry?.command ?? ""));
|
|
1080
|
-
if (!normalized) {
|
|
1081
|
-
issues.push({
|
|
1082
|
-
index,
|
|
1083
|
-
field: "command",
|
|
1084
|
-
message: "Telegram custom command is missing a command name."
|
|
1085
|
-
});
|
|
1086
|
-
continue;
|
|
1087
|
-
}
|
|
1088
|
-
if (!TELEGRAM_COMMAND_NAME_PATTERN.test(normalized)) {
|
|
1089
|
-
issues.push({
|
|
1090
|
-
index,
|
|
1091
|
-
field: "command",
|
|
1092
|
-
message: `Telegram custom command "/${normalized}" is invalid (use a-z, 0-9, underscore; max 32 chars).`
|
|
1093
|
-
});
|
|
1094
|
-
continue;
|
|
1095
|
-
}
|
|
1096
|
-
if (checkReserved && reserved.has(normalized)) {
|
|
1097
|
-
issues.push({
|
|
1098
|
-
index,
|
|
1099
|
-
field: "command",
|
|
1100
|
-
message: `Telegram custom command "/${normalized}" conflicts with a native command.`
|
|
1101
|
-
});
|
|
1102
|
-
continue;
|
|
1103
|
-
}
|
|
1104
|
-
if (checkDuplicates && seen.has(normalized)) {
|
|
1105
|
-
issues.push({
|
|
1106
|
-
index,
|
|
1107
|
-
field: "command",
|
|
1108
|
-
message: `Telegram custom command "/${normalized}" is duplicated.`
|
|
1109
|
-
});
|
|
1110
|
-
continue;
|
|
1111
|
-
}
|
|
1112
|
-
const description = normalizeTelegramCommandDescription(String(entry?.description ?? ""));
|
|
1113
|
-
if (!description) {
|
|
1114
|
-
issues.push({
|
|
1115
|
-
index,
|
|
1116
|
-
field: "description",
|
|
1117
|
-
message: `Telegram custom command "/${normalized}" is missing a description.`
|
|
1118
|
-
});
|
|
1119
|
-
continue;
|
|
1120
|
-
}
|
|
1121
|
-
if (checkDuplicates) seen.add(normalized);
|
|
1122
|
-
resolved.push({
|
|
1123
|
-
command: normalized,
|
|
1124
|
-
description
|
|
1125
|
-
});
|
|
1126
|
-
}
|
|
1127
|
-
return {
|
|
1128
|
-
commands: resolved,
|
|
1129
|
-
issues
|
|
1130
|
-
};
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
//#endregion
|
|
1134
|
-
//#region src/config/zod-schema.providers-core.ts
|
|
1135
|
-
const ToolPolicyBySenderSchema$1 = z.record(z.string(), ToolPolicySchema).optional();
|
|
1136
|
-
const DiscordIdSchema = z.union([z.string(), z.number()]).refine((value) => typeof value === "string", { message: "Discord IDs must be strings (wrap numeric IDs in quotes)." });
|
|
1137
|
-
const DiscordIdListSchema = z.array(DiscordIdSchema);
|
|
1138
|
-
const TelegramInlineButtonsScopeSchema = z.enum([
|
|
1139
|
-
"off",
|
|
1140
|
-
"dm",
|
|
1141
|
-
"group",
|
|
1142
|
-
"all",
|
|
1143
|
-
"allowlist"
|
|
1144
|
-
]);
|
|
1145
|
-
const TelegramCapabilitiesSchema = z.union([z.array(z.string()), z.object({ inlineButtons: TelegramInlineButtonsScopeSchema.optional() }).strict()]);
|
|
1146
|
-
const TelegramTopicSchema = z.object({
|
|
1147
|
-
requireMention: z.boolean().optional(),
|
|
1148
|
-
groupPolicy: GroupPolicySchema.optional(),
|
|
1149
|
-
skills: z.array(z.string()).optional(),
|
|
1150
|
-
enabled: z.boolean().optional(),
|
|
1151
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1152
|
-
systemPrompt: z.string().optional()
|
|
1153
|
-
}).strict();
|
|
1154
|
-
const TelegramGroupSchema = z.object({
|
|
1155
|
-
requireMention: z.boolean().optional(),
|
|
1156
|
-
groupPolicy: GroupPolicySchema.optional(),
|
|
1157
|
-
tools: ToolPolicySchema,
|
|
1158
|
-
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1159
|
-
skills: z.array(z.string()).optional(),
|
|
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
|
-
skills: z.array(z.string()).optional(),
|
|
1327
|
-
enabled: z.boolean().optional(),
|
|
1328
|
-
users: DiscordIdListSchema.optional(),
|
|
1329
|
-
roles: DiscordIdListSchema.optional(),
|
|
1330
|
-
systemPrompt: z.string().optional(),
|
|
1331
|
-
includeThreadStarter: z.boolean().optional(),
|
|
1332
|
-
autoThread: z.boolean().optional()
|
|
1333
|
-
}).strict();
|
|
1334
|
-
const DiscordGuildSchema = z.object({
|
|
1335
|
-
slug: z.string().optional(),
|
|
1336
|
-
requireMention: z.boolean().optional(),
|
|
1337
|
-
tools: ToolPolicySchema,
|
|
1338
|
-
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1339
|
-
reactionNotifications: z.enum([
|
|
1340
|
-
"off",
|
|
1341
|
-
"own",
|
|
1342
|
-
"all",
|
|
1343
|
-
"allowlist"
|
|
1344
|
-
]).optional(),
|
|
1345
|
-
users: DiscordIdListSchema.optional(),
|
|
1346
|
-
roles: DiscordIdListSchema.optional(),
|
|
1347
|
-
channels: z.record(z.string(), DiscordGuildChannelSchema.optional()).optional()
|
|
1348
|
-
}).strict();
|
|
1349
|
-
const DiscordUiSchema = z.object({ components: z.object({ accentColor: HexColorSchema.optional() }).strict().optional() }).strict().optional();
|
|
1350
|
-
const DiscordVoiceAutoJoinSchema = z.object({
|
|
1351
|
-
guildId: z.string().min(1),
|
|
1352
|
-
channelId: z.string().min(1)
|
|
1353
|
-
}).strict();
|
|
1354
|
-
const DiscordVoiceSchema = z.object({
|
|
1355
|
-
enabled: z.boolean().optional(),
|
|
1356
|
-
autoJoin: z.array(DiscordVoiceAutoJoinSchema).optional(),
|
|
1357
|
-
daveEncryption: z.boolean().optional(),
|
|
1358
|
-
decryptionFailureTolerance: z.number().int().min(0).optional(),
|
|
1359
|
-
tts: TtsConfigSchema.optional()
|
|
1360
|
-
}).strict().optional();
|
|
1361
|
-
const DiscordAccountSchema = z.object({
|
|
1362
|
-
name: z.string().optional(),
|
|
1363
|
-
capabilities: z.array(z.string()).optional(),
|
|
1364
|
-
markdown: MarkdownConfigSchema,
|
|
1365
|
-
enabled: z.boolean().optional(),
|
|
1366
|
-
commands: ProviderCommandsSchema,
|
|
1367
|
-
configWrites: z.boolean().optional(),
|
|
1368
|
-
token: z.string().optional().register(sensitive),
|
|
1369
|
-
proxy: z.string().optional(),
|
|
1370
|
-
allowBots: z.boolean().optional(),
|
|
1371
|
-
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
1372
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1373
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
1374
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1375
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1376
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
1377
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1378
|
-
blockStreaming: z.boolean().optional(),
|
|
1379
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1380
|
-
streaming: z.union([z.boolean(), z.enum([
|
|
1381
|
-
"off",
|
|
1382
|
-
"partial",
|
|
1383
|
-
"block",
|
|
1384
|
-
"progress"
|
|
1385
|
-
])]).optional(),
|
|
1386
|
-
streamMode: z.enum([
|
|
1387
|
-
"partial",
|
|
1388
|
-
"block",
|
|
1389
|
-
"off"
|
|
1390
|
-
]).optional(),
|
|
1391
|
-
draftChunk: BlockStreamingChunkSchema.optional(),
|
|
1392
|
-
maxLinesPerMessage: z.number().int().positive().optional(),
|
|
1393
|
-
mediaMaxMb: z.number().positive().optional(),
|
|
1394
|
-
retry: RetryConfigSchema,
|
|
1395
|
-
actions: z.object({
|
|
1396
|
-
reactions: z.boolean().optional(),
|
|
1397
|
-
stickers: z.boolean().optional(),
|
|
1398
|
-
emojiUploads: z.boolean().optional(),
|
|
1399
|
-
stickerUploads: z.boolean().optional(),
|
|
1400
|
-
polls: z.boolean().optional(),
|
|
1401
|
-
permissions: z.boolean().optional(),
|
|
1402
|
-
messages: z.boolean().optional(),
|
|
1403
|
-
threads: z.boolean().optional(),
|
|
1404
|
-
pins: z.boolean().optional(),
|
|
1405
|
-
search: z.boolean().optional(),
|
|
1406
|
-
memberInfo: z.boolean().optional(),
|
|
1407
|
-
roleInfo: z.boolean().optional(),
|
|
1408
|
-
roles: z.boolean().optional(),
|
|
1409
|
-
channelInfo: z.boolean().optional(),
|
|
1410
|
-
voiceStatus: z.boolean().optional(),
|
|
1411
|
-
events: z.boolean().optional(),
|
|
1412
|
-
moderation: z.boolean().optional(),
|
|
1413
|
-
channels: z.boolean().optional(),
|
|
1414
|
-
presence: z.boolean().optional()
|
|
1415
|
-
}).strict().optional(),
|
|
1416
|
-
replyToMode: ReplyToModeSchema.optional(),
|
|
1417
|
-
dmPolicy: DmPolicySchema.optional(),
|
|
1418
|
-
allowFrom: DiscordIdListSchema.optional(),
|
|
1419
|
-
defaultTo: z.string().optional(),
|
|
1420
|
-
dm: DiscordDmSchema.optional(),
|
|
1421
|
-
guilds: z.record(z.string(), DiscordGuildSchema.optional()).optional(),
|
|
1422
|
-
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1423
|
-
execApprovals: z.object({
|
|
1424
|
-
enabled: z.boolean().optional(),
|
|
1425
|
-
approvers: DiscordIdListSchema.optional(),
|
|
1426
|
-
agentFilter: z.array(z.string()).optional(),
|
|
1427
|
-
sessionFilter: z.array(z.string()).optional(),
|
|
1428
|
-
cleanupAfterResolve: z.boolean().optional(),
|
|
1429
|
-
target: z.enum([
|
|
1430
|
-
"dm",
|
|
1431
|
-
"channel",
|
|
1432
|
-
"both"
|
|
1433
|
-
]).optional()
|
|
1434
|
-
}).strict().optional(),
|
|
1435
|
-
ui: DiscordUiSchema,
|
|
1436
|
-
slashCommand: z.object({ ephemeral: z.boolean().optional() }).strict().optional(),
|
|
1437
|
-
threadBindings: z.object({
|
|
1438
|
-
enabled: z.boolean().optional(),
|
|
1439
|
-
ttlHours: z.number().nonnegative().optional(),
|
|
1440
|
-
spawnSubagentSessions: z.boolean().optional()
|
|
1441
|
-
}).strict().optional(),
|
|
1442
|
-
intents: z.object({
|
|
1443
|
-
presence: z.boolean().optional(),
|
|
1444
|
-
guildMembers: z.boolean().optional()
|
|
1445
|
-
}).strict().optional(),
|
|
1446
|
-
voice: DiscordVoiceSchema,
|
|
1447
|
-
pluralkit: z.object({
|
|
1448
|
-
enabled: z.boolean().optional(),
|
|
1449
|
-
token: z.string().optional().register(sensitive)
|
|
1450
|
-
}).strict().optional(),
|
|
1451
|
-
responsePrefix: z.string().optional(),
|
|
1452
|
-
ackReaction: z.string().optional(),
|
|
1453
|
-
activity: z.string().optional(),
|
|
1454
|
-
status: z.enum([
|
|
1455
|
-
"online",
|
|
1456
|
-
"dnd",
|
|
1457
|
-
"idle",
|
|
1458
|
-
"invisible"
|
|
1459
|
-
]).optional(),
|
|
1460
|
-
activityType: z.union([
|
|
1461
|
-
z.literal(0),
|
|
1462
|
-
z.literal(1),
|
|
1463
|
-
z.literal(2),
|
|
1464
|
-
z.literal(3),
|
|
1465
|
-
z.literal(4),
|
|
1466
|
-
z.literal(5)
|
|
1467
|
-
]).optional(),
|
|
1468
|
-
activityUrl: z.string().url().optional()
|
|
1469
|
-
}).strict().superRefine((value, ctx) => {
|
|
1470
|
-
normalizeDiscordStreamingConfig(value);
|
|
1471
|
-
const activityText = typeof value.activity === "string" ? value.activity.trim() : "";
|
|
1472
|
-
const hasActivity = Boolean(activityText);
|
|
1473
|
-
const hasActivityType = value.activityType !== void 0;
|
|
1474
|
-
const activityUrl = typeof value.activityUrl === "string" ? value.activityUrl.trim() : "";
|
|
1475
|
-
const hasActivityUrl = Boolean(activityUrl);
|
|
1476
|
-
if ((hasActivityType || hasActivityUrl) && !hasActivity) ctx.addIssue({
|
|
1477
|
-
code: z.ZodIssueCode.custom,
|
|
1478
|
-
message: "channels.discord.activity is required when activityType or activityUrl is set",
|
|
1479
|
-
path: ["activity"]
|
|
1480
|
-
});
|
|
1481
|
-
if (value.activityType === 1 && !hasActivityUrl) ctx.addIssue({
|
|
1482
|
-
code: z.ZodIssueCode.custom,
|
|
1483
|
-
message: "channels.discord.activityUrl is required when activityType is 1 (Streaming)",
|
|
1484
|
-
path: ["activityUrl"]
|
|
1485
|
-
});
|
|
1486
|
-
if (hasActivityUrl && value.activityType !== 1) ctx.addIssue({
|
|
1487
|
-
code: z.ZodIssueCode.custom,
|
|
1488
|
-
message: "channels.discord.activityType must be 1 (Streaming) when activityUrl is set",
|
|
1489
|
-
path: ["activityType"]
|
|
1490
|
-
});
|
|
1491
|
-
requireOpenAllowFrom({
|
|
1492
|
-
policy: value.dmPolicy ?? value.dm?.policy ?? "pairing",
|
|
1493
|
-
allowFrom: value.allowFrom ?? value.dm?.allowFrom,
|
|
1494
|
-
ctx,
|
|
1495
|
-
path: [...value.allowFrom !== void 0 ? ["allowFrom"] : ["dm", "allowFrom"]],
|
|
1496
|
-
message: "channels.discord.dmPolicy=\"open\" requires channels.discord.allowFrom (or channels.discord.dm.allowFrom) to include \"*\""
|
|
1497
|
-
});
|
|
1498
|
-
});
|
|
1499
|
-
const DiscordConfigSchema = DiscordAccountSchema.extend({ accounts: z.record(z.string(), DiscordAccountSchema.optional()).optional() });
|
|
1500
|
-
const GoogleChatDmSchema = z.object({
|
|
1501
|
-
enabled: z.boolean().optional(),
|
|
1502
|
-
policy: DmPolicySchema.optional().default("pairing"),
|
|
1503
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional()
|
|
1504
|
-
}).strict().superRefine((value, ctx) => {
|
|
1505
|
-
requireOpenAllowFrom({
|
|
1506
|
-
policy: value.policy,
|
|
1507
|
-
allowFrom: value.allowFrom,
|
|
1508
|
-
ctx,
|
|
1509
|
-
path: ["allowFrom"],
|
|
1510
|
-
message: "channels.googlechat.dm.policy=\"open\" requires channels.googlechat.dm.allowFrom to include \"*\""
|
|
1511
|
-
});
|
|
1512
|
-
});
|
|
1513
|
-
const GoogleChatGroupSchema = z.object({
|
|
1514
|
-
enabled: z.boolean().optional(),
|
|
1515
|
-
allow: z.boolean().optional(),
|
|
1516
|
-
requireMention: z.boolean().optional(),
|
|
1517
|
-
users: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1518
|
-
systemPrompt: z.string().optional()
|
|
1519
|
-
}).strict();
|
|
1520
|
-
const GoogleChatAccountSchema = z.object({
|
|
1521
|
-
name: z.string().optional(),
|
|
1522
|
-
capabilities: z.array(z.string()).optional(),
|
|
1523
|
-
enabled: z.boolean().optional(),
|
|
1524
|
-
configWrites: z.boolean().optional(),
|
|
1525
|
-
allowBots: z.boolean().optional(),
|
|
1526
|
-
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
1527
|
-
requireMention: z.boolean().optional(),
|
|
1528
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1529
|
-
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1530
|
-
groups: z.record(z.string(), GoogleChatGroupSchema.optional()).optional(),
|
|
1531
|
-
defaultTo: z.string().optional(),
|
|
1532
|
-
serviceAccount: z.union([z.string(), z.record(z.string(), z.unknown())]).optional(),
|
|
1533
|
-
serviceAccountFile: z.string().optional(),
|
|
1534
|
-
audienceType: z.enum(["app-url", "project-number"]).optional(),
|
|
1535
|
-
audience: z.string().optional(),
|
|
1536
|
-
webhookPath: z.string().optional(),
|
|
1537
|
-
webhookUrl: z.string().optional(),
|
|
1538
|
-
botUser: z.string().optional(),
|
|
1539
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
1540
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1541
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1542
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
1543
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1544
|
-
blockStreaming: z.boolean().optional(),
|
|
1545
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1546
|
-
streamMode: z.enum([
|
|
1547
|
-
"replace",
|
|
1548
|
-
"status_final",
|
|
1549
|
-
"append"
|
|
1550
|
-
]).optional().default("replace"),
|
|
1551
|
-
mediaMaxMb: z.number().positive().optional(),
|
|
1552
|
-
replyToMode: ReplyToModeSchema.optional(),
|
|
1553
|
-
actions: z.object({ reactions: z.boolean().optional() }).strict().optional(),
|
|
1554
|
-
dm: GoogleChatDmSchema.optional(),
|
|
1555
|
-
typingIndicator: z.enum([
|
|
1556
|
-
"none",
|
|
1557
|
-
"message",
|
|
1558
|
-
"reaction"
|
|
1559
|
-
]).optional(),
|
|
1560
|
-
responsePrefix: z.string().optional()
|
|
1561
|
-
}).strict();
|
|
1562
|
-
const GoogleChatConfigSchema = GoogleChatAccountSchema.extend({
|
|
1563
|
-
accounts: z.record(z.string(), GoogleChatAccountSchema.optional()).optional(),
|
|
1564
|
-
defaultAccount: z.string().optional()
|
|
1565
|
-
});
|
|
1566
|
-
const SlackDmSchema = z.object({
|
|
1567
|
-
enabled: z.boolean().optional(),
|
|
1568
|
-
policy: DmPolicySchema.optional(),
|
|
1569
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1570
|
-
groupEnabled: z.boolean().optional(),
|
|
1571
|
-
groupChannels: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1572
|
-
replyToMode: ReplyToModeSchema.optional()
|
|
1573
|
-
}).strict();
|
|
1574
|
-
const SlackChannelSchema = z.object({
|
|
1575
|
-
enabled: z.boolean().optional(),
|
|
1576
|
-
allow: z.boolean().optional(),
|
|
1577
|
-
requireMention: z.boolean().optional(),
|
|
1578
|
-
tools: ToolPolicySchema,
|
|
1579
|
-
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1580
|
-
allowBots: z.boolean().optional(),
|
|
1581
|
-
users: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1582
|
-
skills: z.array(z.string()).optional(),
|
|
1583
|
-
systemPrompt: z.string().optional()
|
|
1584
|
-
}).strict();
|
|
1585
|
-
const SlackThreadSchema = z.object({
|
|
1586
|
-
historyScope: z.enum(["thread", "channel"]).optional(),
|
|
1587
|
-
inheritParent: z.boolean().optional(),
|
|
1588
|
-
initialHistoryLimit: z.number().int().min(0).optional()
|
|
1589
|
-
}).strict();
|
|
1590
|
-
const SlackReplyToModeByChatTypeSchema = z.object({
|
|
1591
|
-
direct: ReplyToModeSchema.optional(),
|
|
1592
|
-
group: ReplyToModeSchema.optional(),
|
|
1593
|
-
channel: ReplyToModeSchema.optional()
|
|
1594
|
-
}).strict();
|
|
1595
|
-
const SlackAccountSchema = z.object({
|
|
1596
|
-
name: z.string().optional(),
|
|
1597
|
-
mode: z.enum(["socket", "http"]).optional(),
|
|
1598
|
-
signingSecret: z.string().optional().register(sensitive),
|
|
1599
|
-
webhookPath: z.string().optional(),
|
|
1600
|
-
capabilities: z.array(z.string()).optional(),
|
|
1601
|
-
markdown: MarkdownConfigSchema,
|
|
1602
|
-
enabled: z.boolean().optional(),
|
|
1603
|
-
commands: ProviderCommandsSchema,
|
|
1604
|
-
configWrites: z.boolean().optional(),
|
|
1605
|
-
botToken: z.string().optional().register(sensitive),
|
|
1606
|
-
appToken: z.string().optional().register(sensitive),
|
|
1607
|
-
userToken: z.string().optional().register(sensitive),
|
|
1608
|
-
userTokenReadOnly: z.boolean().optional().default(true),
|
|
1609
|
-
allowBots: z.boolean().optional(),
|
|
1610
|
-
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
1611
|
-
requireMention: z.boolean().optional(),
|
|
1612
|
-
groupPolicy: GroupPolicySchema.optional(),
|
|
1613
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
1614
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1615
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1616
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
1617
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1618
|
-
blockStreaming: z.boolean().optional(),
|
|
1619
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1620
|
-
streaming: z.union([z.boolean(), z.enum([
|
|
1621
|
-
"off",
|
|
1622
|
-
"partial",
|
|
1623
|
-
"block",
|
|
1624
|
-
"progress"
|
|
1625
|
-
])]).optional(),
|
|
1626
|
-
nativeStreaming: z.boolean().optional(),
|
|
1627
|
-
streamMode: z.enum([
|
|
1628
|
-
"replace",
|
|
1629
|
-
"status_final",
|
|
1630
|
-
"append"
|
|
1631
|
-
]).optional(),
|
|
1632
|
-
mediaMaxMb: z.number().positive().optional(),
|
|
1633
|
-
reactionNotifications: z.enum([
|
|
1634
|
-
"off",
|
|
1635
|
-
"own",
|
|
1636
|
-
"all",
|
|
1637
|
-
"allowlist"
|
|
1638
|
-
]).optional(),
|
|
1639
|
-
reactionAllowlist: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1640
|
-
replyToMode: ReplyToModeSchema.optional(),
|
|
1641
|
-
replyToModeByChatType: SlackReplyToModeByChatTypeSchema.optional(),
|
|
1642
|
-
thread: SlackThreadSchema.optional(),
|
|
1643
|
-
actions: z.object({
|
|
1644
|
-
reactions: z.boolean().optional(),
|
|
1645
|
-
messages: z.boolean().optional(),
|
|
1646
|
-
pins: z.boolean().optional(),
|
|
1647
|
-
search: z.boolean().optional(),
|
|
1648
|
-
permissions: z.boolean().optional(),
|
|
1649
|
-
memberInfo: z.boolean().optional(),
|
|
1650
|
-
channelInfo: z.boolean().optional(),
|
|
1651
|
-
emojiList: z.boolean().optional()
|
|
1652
|
-
}).strict().optional(),
|
|
1653
|
-
slashCommand: z.object({
|
|
1654
|
-
enabled: z.boolean().optional(),
|
|
1655
|
-
name: z.string().optional(),
|
|
1656
|
-
sessionPrefix: z.string().optional(),
|
|
1657
|
-
ephemeral: z.boolean().optional()
|
|
1658
|
-
}).strict().optional(),
|
|
1659
|
-
dmPolicy: DmPolicySchema.optional(),
|
|
1660
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1661
|
-
defaultTo: z.string().optional(),
|
|
1662
|
-
dm: SlackDmSchema.optional(),
|
|
1663
|
-
channels: z.record(z.string(), SlackChannelSchema.optional()).optional(),
|
|
1664
|
-
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1665
|
-
responsePrefix: z.string().optional(),
|
|
1666
|
-
ackReaction: z.string().optional()
|
|
1667
|
-
}).strict().superRefine((value, ctx) => {
|
|
1668
|
-
normalizeSlackStreamingConfig(value);
|
|
1669
|
-
requireOpenAllowFrom({
|
|
1670
|
-
policy: value.dmPolicy ?? value.dm?.policy ?? "pairing",
|
|
1671
|
-
allowFrom: value.allowFrom ?? value.dm?.allowFrom,
|
|
1672
|
-
ctx,
|
|
1673
|
-
path: [...value.allowFrom !== void 0 ? ["allowFrom"] : ["dm", "allowFrom"]],
|
|
1674
|
-
message: "channels.slack.dmPolicy=\"open\" requires channels.slack.allowFrom (or channels.slack.dm.allowFrom) to include \"*\""
|
|
1675
|
-
});
|
|
1676
|
-
});
|
|
1677
|
-
const SlackConfigSchema = SlackAccountSchema.safeExtend({
|
|
1678
|
-
mode: z.enum(["socket", "http"]).optional().default("socket"),
|
|
1679
|
-
signingSecret: z.string().optional().register(sensitive),
|
|
1680
|
-
webhookPath: z.string().optional().default("/slack/events"),
|
|
1681
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1682
|
-
accounts: z.record(z.string(), SlackAccountSchema.optional()).optional()
|
|
1683
|
-
}).superRefine((value, ctx) => {
|
|
1684
|
-
const baseMode = value.mode ?? "socket";
|
|
1685
|
-
if (baseMode === "http" && !value.signingSecret) ctx.addIssue({
|
|
1686
|
-
code: z.ZodIssueCode.custom,
|
|
1687
|
-
message: "channels.slack.mode=\"http\" requires channels.slack.signingSecret",
|
|
1688
|
-
path: ["signingSecret"]
|
|
1689
|
-
});
|
|
1690
|
-
if (!value.accounts) return;
|
|
1691
|
-
for (const [accountId, account] of Object.entries(value.accounts)) {
|
|
1692
|
-
if (!account) continue;
|
|
1693
|
-
if (account.enabled === false) continue;
|
|
1694
|
-
if ((account.mode ?? baseMode) !== "http") continue;
|
|
1695
|
-
if (!(account.signingSecret ?? value.signingSecret)) ctx.addIssue({
|
|
1696
|
-
code: z.ZodIssueCode.custom,
|
|
1697
|
-
message: "channels.slack.accounts.*.mode=\"http\" requires channels.slack.signingSecret or channels.slack.accounts.*.signingSecret",
|
|
1698
|
-
path: [
|
|
1699
|
-
"accounts",
|
|
1700
|
-
accountId,
|
|
1701
|
-
"signingSecret"
|
|
1702
|
-
]
|
|
1703
|
-
});
|
|
1704
|
-
}
|
|
1705
|
-
});
|
|
1706
|
-
const SignalAccountSchemaBase = z.object({
|
|
1707
|
-
name: z.string().optional(),
|
|
1708
|
-
capabilities: z.array(z.string()).optional(),
|
|
1709
|
-
markdown: MarkdownConfigSchema,
|
|
1710
|
-
enabled: z.boolean().optional(),
|
|
1711
|
-
configWrites: z.boolean().optional(),
|
|
1712
|
-
account: z.string().optional(),
|
|
1713
|
-
httpUrl: z.string().optional(),
|
|
1714
|
-
httpHost: z.string().optional(),
|
|
1715
|
-
httpPort: z.number().int().positive().optional(),
|
|
1716
|
-
cliPath: ExecutableTokenSchema.optional(),
|
|
1717
|
-
autoStart: z.boolean().optional(),
|
|
1718
|
-
startupTimeoutMs: z.number().int().min(1e3).max(12e4).optional(),
|
|
1719
|
-
receiveMode: z.union([z.literal("on-start"), z.literal("manual")]).optional(),
|
|
1720
|
-
ignoreAttachments: z.boolean().optional(),
|
|
1721
|
-
ignoreStories: z.boolean().optional(),
|
|
1722
|
-
sendReadReceipts: z.boolean().optional(),
|
|
1723
|
-
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1724
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1725
|
-
defaultTo: z.string().optional(),
|
|
1726
|
-
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1727
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1728
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
1729
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1730
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1731
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
1732
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1733
|
-
blockStreaming: z.boolean().optional(),
|
|
1734
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1735
|
-
mediaMaxMb: z.number().int().positive().optional(),
|
|
1736
|
-
reactionNotifications: z.enum([
|
|
1737
|
-
"off",
|
|
1738
|
-
"own",
|
|
1739
|
-
"all",
|
|
1740
|
-
"allowlist"
|
|
1741
|
-
]).optional(),
|
|
1742
|
-
reactionAllowlist: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1743
|
-
actions: z.object({ reactions: z.boolean().optional() }).strict().optional(),
|
|
1744
|
-
reactionLevel: z.enum([
|
|
1745
|
-
"off",
|
|
1746
|
-
"ack",
|
|
1747
|
-
"minimal",
|
|
1748
|
-
"extensive"
|
|
1749
|
-
]).optional(),
|
|
1750
|
-
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1751
|
-
responsePrefix: z.string().optional()
|
|
1752
|
-
}).strict();
|
|
1753
|
-
const SignalAccountSchema = SignalAccountSchemaBase.superRefine((value, ctx) => {
|
|
1754
|
-
requireOpenAllowFrom({
|
|
1755
|
-
policy: value.dmPolicy,
|
|
1756
|
-
allowFrom: value.allowFrom,
|
|
1757
|
-
ctx,
|
|
1758
|
-
path: ["allowFrom"],
|
|
1759
|
-
message: "channels.signal.dmPolicy=\"open\" requires channels.signal.allowFrom to include \"*\""
|
|
1760
|
-
});
|
|
1761
|
-
});
|
|
1762
|
-
const SignalConfigSchema = SignalAccountSchemaBase.extend({ accounts: z.record(z.string(), SignalAccountSchema.optional()).optional() }).superRefine((value, ctx) => {
|
|
1763
|
-
requireOpenAllowFrom({
|
|
1764
|
-
policy: value.dmPolicy,
|
|
1765
|
-
allowFrom: value.allowFrom,
|
|
1766
|
-
ctx,
|
|
1767
|
-
path: ["allowFrom"],
|
|
1768
|
-
message: "channels.signal.dmPolicy=\"open\" requires channels.signal.allowFrom to include \"*\""
|
|
1769
|
-
});
|
|
1770
|
-
});
|
|
1771
|
-
const IrcGroupSchema = z.object({
|
|
1772
|
-
requireMention: z.boolean().optional(),
|
|
1773
|
-
tools: ToolPolicySchema,
|
|
1774
|
-
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1775
|
-
skills: z.array(z.string()).optional(),
|
|
1776
|
-
enabled: z.boolean().optional(),
|
|
1777
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1778
|
-
systemPrompt: z.string().optional()
|
|
1779
|
-
}).strict();
|
|
1780
|
-
const IrcNickServSchema = z.object({
|
|
1781
|
-
enabled: z.boolean().optional(),
|
|
1782
|
-
service: z.string().optional(),
|
|
1783
|
-
password: z.string().optional().register(sensitive),
|
|
1784
|
-
passwordFile: z.string().optional(),
|
|
1785
|
-
register: z.boolean().optional(),
|
|
1786
|
-
registerEmail: z.string().optional()
|
|
1787
|
-
}).strict();
|
|
1788
|
-
const IrcAccountSchemaBase = z.object({
|
|
1789
|
-
name: z.string().optional(),
|
|
1790
|
-
capabilities: z.array(z.string()).optional(),
|
|
1791
|
-
markdown: MarkdownConfigSchema,
|
|
1792
|
-
enabled: z.boolean().optional(),
|
|
1793
|
-
configWrites: z.boolean().optional(),
|
|
1794
|
-
host: z.string().optional(),
|
|
1795
|
-
port: z.number().int().min(1).max(65535).optional(),
|
|
1796
|
-
tls: z.boolean().optional(),
|
|
1797
|
-
nick: z.string().optional(),
|
|
1798
|
-
username: z.string().optional(),
|
|
1799
|
-
realname: z.string().optional(),
|
|
1800
|
-
password: z.string().optional().register(sensitive),
|
|
1801
|
-
passwordFile: z.string().optional(),
|
|
1802
|
-
nickserv: IrcNickServSchema.optional(),
|
|
1803
|
-
channels: z.array(z.string()).optional(),
|
|
1804
|
-
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1805
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1806
|
-
defaultTo: z.string().optional(),
|
|
1807
|
-
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1808
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1809
|
-
groups: z.record(z.string(), IrcGroupSchema.optional()).optional(),
|
|
1810
|
-
mentionPatterns: z.array(z.string()).optional(),
|
|
1811
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
1812
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1813
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1814
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
1815
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1816
|
-
blockStreaming: z.boolean().optional(),
|
|
1817
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1818
|
-
mediaMaxMb: z.number().positive().optional(),
|
|
1819
|
-
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1820
|
-
responsePrefix: z.string().optional()
|
|
1821
|
-
}).strict();
|
|
1822
|
-
function refineIrcAllowFromAndNickserv(value, ctx) {
|
|
1823
|
-
requireOpenAllowFrom({
|
|
1824
|
-
policy: value.dmPolicy,
|
|
1825
|
-
allowFrom: value.allowFrom,
|
|
1826
|
-
ctx,
|
|
1827
|
-
path: ["allowFrom"],
|
|
1828
|
-
message: "channels.irc.dmPolicy=\"open\" requires channels.irc.allowFrom to include \"*\""
|
|
1829
|
-
});
|
|
1830
|
-
if (value.nickserv?.register && !value.nickserv.registerEmail?.trim()) ctx.addIssue({
|
|
1831
|
-
code: z.ZodIssueCode.custom,
|
|
1832
|
-
path: ["nickserv", "registerEmail"],
|
|
1833
|
-
message: "channels.irc.nickserv.register=true requires channels.irc.nickserv.registerEmail"
|
|
1834
|
-
});
|
|
1835
|
-
}
|
|
1836
|
-
const IrcAccountSchema = IrcAccountSchemaBase.superRefine((value, ctx) => {
|
|
1837
|
-
refineIrcAllowFromAndNickserv(value, ctx);
|
|
1838
|
-
});
|
|
1839
|
-
const IrcConfigSchema = IrcAccountSchemaBase.extend({ accounts: z.record(z.string(), IrcAccountSchema.optional()).optional() }).superRefine((value, ctx) => {
|
|
1840
|
-
refineIrcAllowFromAndNickserv(value, ctx);
|
|
1841
|
-
});
|
|
1842
|
-
const IMessageAccountSchemaBase = z.object({
|
|
1843
|
-
name: z.string().optional(),
|
|
1844
|
-
capabilities: z.array(z.string()).optional(),
|
|
1845
|
-
markdown: MarkdownConfigSchema,
|
|
1846
|
-
enabled: z.boolean().optional(),
|
|
1847
|
-
configWrites: z.boolean().optional(),
|
|
1848
|
-
cliPath: ExecutableTokenSchema.optional(),
|
|
1849
|
-
dbPath: z.string().optional(),
|
|
1850
|
-
remoteHost: z.string().refine(isSafeScpRemoteHost, "expected SSH host or user@host (no spaces/options)").optional(),
|
|
1851
|
-
service: z.union([
|
|
1852
|
-
z.literal("imessage"),
|
|
1853
|
-
z.literal("sms"),
|
|
1854
|
-
z.literal("auto")
|
|
1855
|
-
]).optional(),
|
|
1856
|
-
region: z.string().optional(),
|
|
1857
|
-
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1858
|
-
allowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1859
|
-
defaultTo: z.string().optional(),
|
|
1860
|
-
groupAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
1861
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1862
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
1863
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1864
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1865
|
-
includeAttachments: z.boolean().optional(),
|
|
1866
|
-
attachmentRoots: z.array(z.string().refine(isValidInboundPathRootPattern, "expected absolute path root")).optional(),
|
|
1867
|
-
remoteAttachmentRoots: z.array(z.string().refine(isValidInboundPathRootPattern, "expected absolute path root")).optional(),
|
|
1868
|
-
mediaMaxMb: z.number().int().positive().optional(),
|
|
1869
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
1870
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1871
|
-
blockStreaming: z.boolean().optional(),
|
|
1872
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1873
|
-
groups: z.record(z.string(), z.object({
|
|
1874
|
-
requireMention: z.boolean().optional(),
|
|
1875
|
-
tools: ToolPolicySchema,
|
|
1876
|
-
toolsBySender: ToolPolicyBySenderSchema$1
|
|
1877
|
-
}).strict().optional()).optional(),
|
|
1878
|
-
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1879
|
-
responsePrefix: z.string().optional()
|
|
1880
|
-
}).strict();
|
|
1881
|
-
const IMessageAccountSchema = IMessageAccountSchemaBase.superRefine((value, ctx) => {
|
|
1882
|
-
requireOpenAllowFrom({
|
|
1883
|
-
policy: value.dmPolicy,
|
|
1884
|
-
allowFrom: value.allowFrom,
|
|
1885
|
-
ctx,
|
|
1886
|
-
path: ["allowFrom"],
|
|
1887
|
-
message: "channels.imessage.dmPolicy=\"open\" requires channels.imessage.allowFrom to include \"*\""
|
|
1888
|
-
});
|
|
1889
|
-
});
|
|
1890
|
-
const IMessageConfigSchema = IMessageAccountSchemaBase.extend({ accounts: z.record(z.string(), IMessageAccountSchema.optional()).optional() }).superRefine((value, ctx) => {
|
|
1891
|
-
requireOpenAllowFrom({
|
|
1892
|
-
policy: value.dmPolicy,
|
|
1893
|
-
allowFrom: value.allowFrom,
|
|
1894
|
-
ctx,
|
|
1895
|
-
path: ["allowFrom"],
|
|
1896
|
-
message: "channels.imessage.dmPolicy=\"open\" requires channels.imessage.allowFrom to include \"*\""
|
|
1897
|
-
});
|
|
1898
|
-
});
|
|
1899
|
-
const BlueBubblesAllowFromEntry = z.union([z.string(), z.number()]);
|
|
1900
|
-
const BlueBubblesActionSchema = z.object({
|
|
1901
|
-
reactions: z.boolean().optional(),
|
|
1902
|
-
edit: z.boolean().optional(),
|
|
1903
|
-
unsend: z.boolean().optional(),
|
|
1904
|
-
reply: z.boolean().optional(),
|
|
1905
|
-
sendWithEffect: z.boolean().optional(),
|
|
1906
|
-
renameGroup: z.boolean().optional(),
|
|
1907
|
-
setGroupIcon: z.boolean().optional(),
|
|
1908
|
-
addParticipant: z.boolean().optional(),
|
|
1909
|
-
removeParticipant: z.boolean().optional(),
|
|
1910
|
-
leaveGroup: z.boolean().optional(),
|
|
1911
|
-
sendAttachment: z.boolean().optional()
|
|
1912
|
-
}).strict().optional();
|
|
1913
|
-
const BlueBubblesGroupConfigSchema = z.object({
|
|
1914
|
-
requireMention: z.boolean().optional(),
|
|
1915
|
-
tools: ToolPolicySchema,
|
|
1916
|
-
toolsBySender: ToolPolicyBySenderSchema$1
|
|
1917
|
-
}).strict();
|
|
1918
|
-
const BlueBubblesAccountSchemaBase = z.object({
|
|
1919
|
-
name: z.string().optional(),
|
|
1920
|
-
capabilities: z.array(z.string()).optional(),
|
|
1921
|
-
markdown: MarkdownConfigSchema,
|
|
1922
|
-
configWrites: z.boolean().optional(),
|
|
1923
|
-
enabled: z.boolean().optional(),
|
|
1924
|
-
serverUrl: z.string().optional(),
|
|
1925
|
-
password: z.string().optional().register(sensitive),
|
|
1926
|
-
webhookPath: z.string().optional(),
|
|
1927
|
-
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1928
|
-
allowFrom: z.array(BlueBubblesAllowFromEntry).optional(),
|
|
1929
|
-
groupAllowFrom: z.array(BlueBubblesAllowFromEntry).optional(),
|
|
1930
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1931
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
1932
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
1933
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
1934
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
1935
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1936
|
-
mediaMaxMb: z.number().int().positive().optional(),
|
|
1937
|
-
mediaLocalRoots: z.array(z.string()).optional(),
|
|
1938
|
-
sendReadReceipts: z.boolean().optional(),
|
|
1939
|
-
blockStreaming: z.boolean().optional(),
|
|
1940
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
1941
|
-
groups: z.record(z.string(), BlueBubblesGroupConfigSchema.optional()).optional(),
|
|
1942
|
-
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
1943
|
-
responsePrefix: z.string().optional()
|
|
1944
|
-
}).strict();
|
|
1945
|
-
const BlueBubblesAccountSchema = BlueBubblesAccountSchemaBase.superRefine((value, ctx) => {
|
|
1946
|
-
requireOpenAllowFrom({
|
|
1947
|
-
policy: value.dmPolicy,
|
|
1948
|
-
allowFrom: value.allowFrom,
|
|
1949
|
-
ctx,
|
|
1950
|
-
path: ["allowFrom"],
|
|
1951
|
-
message: "channels.bluebubbles.accounts.*.dmPolicy=\"open\" requires allowFrom to include \"*\""
|
|
1952
|
-
});
|
|
1953
|
-
});
|
|
1954
|
-
const BlueBubblesConfigSchema = BlueBubblesAccountSchemaBase.extend({
|
|
1955
|
-
accounts: z.record(z.string(), BlueBubblesAccountSchema.optional()).optional(),
|
|
1956
|
-
actions: BlueBubblesActionSchema
|
|
1957
|
-
}).superRefine((value, ctx) => {
|
|
1958
|
-
requireOpenAllowFrom({
|
|
1959
|
-
policy: value.dmPolicy,
|
|
1960
|
-
allowFrom: value.allowFrom,
|
|
1961
|
-
ctx,
|
|
1962
|
-
path: ["allowFrom"],
|
|
1963
|
-
message: "channels.bluebubbles.dmPolicy=\"open\" requires channels.bluebubbles.allowFrom to include \"*\""
|
|
1964
|
-
});
|
|
1965
|
-
});
|
|
1966
|
-
const MSTeamsChannelSchema = z.object({
|
|
1967
|
-
requireMention: z.boolean().optional(),
|
|
1968
|
-
tools: ToolPolicySchema,
|
|
1969
|
-
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1970
|
-
replyStyle: MSTeamsReplyStyleSchema.optional()
|
|
1971
|
-
}).strict();
|
|
1972
|
-
const MSTeamsTeamSchema = z.object({
|
|
1973
|
-
requireMention: z.boolean().optional(),
|
|
1974
|
-
tools: ToolPolicySchema,
|
|
1975
|
-
toolsBySender: ToolPolicyBySenderSchema$1,
|
|
1976
|
-
replyStyle: MSTeamsReplyStyleSchema.optional(),
|
|
1977
|
-
channels: z.record(z.string(), MSTeamsChannelSchema.optional()).optional()
|
|
1978
|
-
}).strict();
|
|
1979
|
-
const MSTeamsConfigSchema = z.object({
|
|
1980
|
-
enabled: z.boolean().optional(),
|
|
1981
|
-
capabilities: z.array(z.string()).optional(),
|
|
1982
|
-
dangerouslyAllowNameMatching: z.boolean().optional(),
|
|
1983
|
-
markdown: MarkdownConfigSchema,
|
|
1984
|
-
configWrites: z.boolean().optional(),
|
|
1985
|
-
appId: z.string().optional(),
|
|
1986
|
-
appPassword: z.string().optional().register(sensitive),
|
|
1987
|
-
tenantId: z.string().optional(),
|
|
1988
|
-
webhook: z.object({
|
|
1989
|
-
port: z.number().int().positive().optional(),
|
|
1990
|
-
path: z.string().optional()
|
|
1991
|
-
}).strict().optional(),
|
|
1992
|
-
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
1993
|
-
allowFrom: z.array(z.string()).optional(),
|
|
1994
|
-
defaultTo: z.string().optional(),
|
|
1995
|
-
groupAllowFrom: z.array(z.string()).optional(),
|
|
1996
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
1997
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
1998
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
1999
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
2000
|
-
mediaAllowHosts: z.array(z.string()).optional(),
|
|
2001
|
-
mediaAuthAllowHosts: z.array(z.string()).optional(),
|
|
2002
|
-
requireMention: z.boolean().optional(),
|
|
2003
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
2004
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
2005
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
2006
|
-
replyStyle: MSTeamsReplyStyleSchema.optional(),
|
|
2007
|
-
teams: z.record(z.string(), MSTeamsTeamSchema.optional()).optional(),
|
|
2008
|
-
mediaMaxMb: z.number().positive().optional(),
|
|
2009
|
-
sharePointSiteId: z.string().optional(),
|
|
2010
|
-
heartbeat: ChannelHeartbeatVisibilitySchema,
|
|
2011
|
-
responsePrefix: z.string().optional()
|
|
2012
|
-
}).strict().superRefine((value, ctx) => {
|
|
2013
|
-
requireOpenAllowFrom({
|
|
2014
|
-
policy: value.dmPolicy,
|
|
2015
|
-
allowFrom: value.allowFrom,
|
|
2016
|
-
ctx,
|
|
2017
|
-
path: ["allowFrom"],
|
|
2018
|
-
message: "channels.msteams.dmPolicy=\"open\" requires channels.msteams.allowFrom to include \"*\""
|
|
2019
|
-
});
|
|
2020
|
-
});
|
|
2021
|
-
|
|
2022
|
-
//#endregion
|
|
2023
|
-
//#region src/config/zod-schema.providers-whatsapp.ts
|
|
2024
|
-
const ToolPolicyBySenderSchema = z.record(z.string(), ToolPolicySchema).optional();
|
|
2025
|
-
const WhatsAppGroupEntrySchema = z.object({
|
|
2026
|
-
requireMention: z.boolean().optional(),
|
|
2027
|
-
tools: ToolPolicySchema,
|
|
2028
|
-
toolsBySender: ToolPolicyBySenderSchema
|
|
2029
|
-
}).strict().optional();
|
|
2030
|
-
const WhatsAppGroupsSchema = z.record(z.string(), WhatsAppGroupEntrySchema).optional();
|
|
2031
|
-
const WhatsAppAckReactionSchema = z.object({
|
|
2032
|
-
emoji: z.string().optional(),
|
|
2033
|
-
direct: z.boolean().optional().default(true),
|
|
2034
|
-
group: z.enum([
|
|
2035
|
-
"always",
|
|
2036
|
-
"mentions",
|
|
2037
|
-
"never"
|
|
2038
|
-
]).optional().default("mentions")
|
|
2039
|
-
}).strict().optional();
|
|
2040
|
-
const WhatsAppSharedSchema = z.object({
|
|
2041
|
-
enabled: z.boolean().optional(),
|
|
2042
|
-
capabilities: z.array(z.string()).optional(),
|
|
2043
|
-
markdown: MarkdownConfigSchema,
|
|
2044
|
-
configWrites: z.boolean().optional(),
|
|
2045
|
-
sendReadReceipts: z.boolean().optional(),
|
|
2046
|
-
messagePrefix: z.string().optional(),
|
|
2047
|
-
responsePrefix: z.string().optional(),
|
|
2048
|
-
dmPolicy: DmPolicySchema.optional().default("pairing"),
|
|
2049
|
-
selfChatMode: z.boolean().optional(),
|
|
2050
|
-
allowFrom: z.array(z.string()).optional(),
|
|
2051
|
-
defaultTo: z.string().optional(),
|
|
2052
|
-
groupAllowFrom: z.array(z.string()).optional(),
|
|
2053
|
-
groupPolicy: GroupPolicySchema.optional().default("allowlist"),
|
|
2054
|
-
historyLimit: z.number().int().min(0).optional(),
|
|
2055
|
-
dmHistoryLimit: z.number().int().min(0).optional(),
|
|
2056
|
-
dms: z.record(z.string(), DmConfigSchema.optional()).optional(),
|
|
2057
|
-
textChunkLimit: z.number().int().positive().optional(),
|
|
2058
|
-
chunkMode: z.enum(["length", "newline"]).optional(),
|
|
2059
|
-
blockStreaming: z.boolean().optional(),
|
|
2060
|
-
blockStreamingCoalesce: BlockStreamingCoalesceSchema.optional(),
|
|
2061
|
-
groups: WhatsAppGroupsSchema,
|
|
2062
|
-
ackReaction: WhatsAppAckReactionSchema,
|
|
2063
|
-
debounceMs: z.number().int().nonnegative().optional().default(0),
|
|
2064
|
-
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
2065
|
-
});
|
|
2066
|
-
function enforceOpenDmPolicyAllowFromStar(params) {
|
|
2067
|
-
if (params.dmPolicy !== "open") return;
|
|
2068
|
-
if ((Array.isArray(params.allowFrom) ? params.allowFrom : []).map((v) => String(v).trim()).filter(Boolean).includes("*")) return;
|
|
2069
|
-
params.ctx.addIssue({
|
|
2070
|
-
code: z.ZodIssueCode.custom,
|
|
2071
|
-
path: ["allowFrom"],
|
|
2072
|
-
message: params.message
|
|
2073
|
-
});
|
|
2074
|
-
}
|
|
2075
|
-
const WhatsAppAccountSchema = WhatsAppSharedSchema.extend({
|
|
2076
|
-
name: z.string().optional(),
|
|
2077
|
-
enabled: z.boolean().optional(),
|
|
2078
|
-
authDir: z.string().optional(),
|
|
2079
|
-
mediaMaxMb: z.number().int().positive().optional()
|
|
2080
|
-
}).strict().superRefine((value, ctx) => {
|
|
2081
|
-
enforceOpenDmPolicyAllowFromStar({
|
|
2082
|
-
dmPolicy: value.dmPolicy,
|
|
2083
|
-
allowFrom: value.allowFrom,
|
|
2084
|
-
ctx,
|
|
2085
|
-
message: "channels.whatsapp.accounts.*.dmPolicy=\"open\" requires allowFrom to include \"*\""
|
|
2086
|
-
});
|
|
2087
|
-
});
|
|
2088
|
-
const WhatsAppConfigSchema = WhatsAppSharedSchema.extend({
|
|
2089
|
-
accounts: z.record(z.string(), WhatsAppAccountSchema.optional()).optional(),
|
|
2090
|
-
mediaMaxMb: z.number().int().positive().optional().default(50),
|
|
2091
|
-
actions: z.object({
|
|
2092
|
-
reactions: z.boolean().optional(),
|
|
2093
|
-
sendMessage: z.boolean().optional(),
|
|
2094
|
-
polls: z.boolean().optional()
|
|
2095
|
-
}).strict().optional()
|
|
2096
|
-
}).strict().superRefine((value, ctx) => {
|
|
2097
|
-
enforceOpenDmPolicyAllowFromStar({
|
|
2098
|
-
dmPolicy: value.dmPolicy,
|
|
2099
|
-
allowFrom: value.allowFrom,
|
|
2100
|
-
ctx,
|
|
2101
|
-
message: "channels.whatsapp.dmPolicy=\"open\" requires channels.whatsapp.allowFrom to include \"*\""
|
|
2102
|
-
});
|
|
2103
|
-
});
|
|
2104
|
-
|
|
2105
|
-
//#endregion
|
|
2106
|
-
//#region src/config/zod-schema.providers.ts
|
|
2107
|
-
const ChannelModelByChannelSchema = z.record(z.string(), z.record(z.string(), z.string())).optional();
|
|
2108
|
-
const ChannelsSchema = z.object({
|
|
2109
|
-
defaults: z.object({
|
|
2110
|
-
groupPolicy: GroupPolicySchema.optional(),
|
|
2111
|
-
heartbeat: ChannelHeartbeatVisibilitySchema
|
|
2112
|
-
}).strict().optional(),
|
|
2113
|
-
modelByChannel: ChannelModelByChannelSchema,
|
|
2114
|
-
whatsapp: WhatsAppConfigSchema.optional(),
|
|
2115
|
-
telegram: TelegramConfigSchema.optional(),
|
|
2116
|
-
discord: DiscordConfigSchema.optional(),
|
|
2117
|
-
irc: IrcConfigSchema.optional(),
|
|
2118
|
-
googlechat: GoogleChatConfigSchema.optional(),
|
|
2119
|
-
slack: SlackConfigSchema.optional(),
|
|
2120
|
-
signal: SignalConfigSchema.optional(),
|
|
2121
|
-
imessage: IMessageConfigSchema.optional(),
|
|
2122
|
-
bluebubbles: BlueBubblesConfigSchema.optional(),
|
|
2123
|
-
msteams: MSTeamsConfigSchema.optional()
|
|
2124
|
-
}).passthrough().optional();
|
|
2125
|
-
|
|
2126
|
-
//#endregion
|
|
2127
|
-
//#region src/config/zod-schema.session.ts
|
|
2128
|
-
const SessionResetConfigSchema = z.object({
|
|
2129
|
-
mode: z.union([z.literal("daily"), z.literal("idle")]).optional(),
|
|
2130
|
-
atHour: z.number().int().min(0).max(23).optional(),
|
|
2131
|
-
idleMinutes: z.number().int().positive().optional()
|
|
2132
|
-
}).strict();
|
|
2133
|
-
const SessionSendPolicySchema = createAllowDenyChannelRulesSchema();
|
|
2134
|
-
const SessionSchema = z.object({
|
|
2135
|
-
scope: z.union([z.literal("per-sender"), z.literal("global")]).optional(),
|
|
2136
|
-
dmScope: z.union([
|
|
2137
|
-
z.literal("main"),
|
|
2138
|
-
z.literal("per-peer"),
|
|
2139
|
-
z.literal("per-channel-peer"),
|
|
2140
|
-
z.literal("per-account-channel-peer")
|
|
2141
|
-
]).optional(),
|
|
2142
|
-
identityLinks: z.record(z.string(), z.array(z.string())).optional(),
|
|
2143
|
-
resetTriggers: z.array(z.string()).optional(),
|
|
2144
|
-
idleMinutes: z.number().int().positive().optional(),
|
|
2145
|
-
reset: SessionResetConfigSchema.optional(),
|
|
2146
|
-
resetByType: z.object({
|
|
2147
|
-
direct: SessionResetConfigSchema.optional(),
|
|
2148
|
-
dm: SessionResetConfigSchema.optional(),
|
|
2149
|
-
group: SessionResetConfigSchema.optional(),
|
|
2150
|
-
thread: SessionResetConfigSchema.optional()
|
|
2151
|
-
}).strict().optional(),
|
|
2152
|
-
resetByChannel: z.record(z.string(), SessionResetConfigSchema).optional(),
|
|
2153
|
-
store: z.string().optional(),
|
|
2154
|
-
typingIntervalSeconds: z.number().int().positive().optional(),
|
|
2155
|
-
typingMode: TypingModeSchema.optional(),
|
|
2156
|
-
mainKey: z.string().optional(),
|
|
2157
|
-
sendPolicy: SessionSendPolicySchema.optional(),
|
|
2158
|
-
agentToAgent: z.object({ maxPingPongTurns: z.number().int().min(0).max(5).optional() }).strict().optional(),
|
|
2159
|
-
threadBindings: z.object({
|
|
2160
|
-
enabled: z.boolean().optional(),
|
|
2161
|
-
ttlHours: z.number().nonnegative().optional()
|
|
2162
|
-
}).strict().optional(),
|
|
2163
|
-
maintenance: z.object({
|
|
2164
|
-
mode: z.enum(["enforce", "warn"]).optional(),
|
|
2165
|
-
pruneAfter: z.union([z.string(), z.number()]).optional(),
|
|
2166
|
-
pruneDays: z.number().int().positive().optional(),
|
|
2167
|
-
maxEntries: z.number().int().positive().optional(),
|
|
2168
|
-
rotateBytes: z.union([z.string(), z.number()]).optional(),
|
|
2169
|
-
resetArchiveRetention: z.union([
|
|
2170
|
-
z.string(),
|
|
2171
|
-
z.number(),
|
|
2172
|
-
z.literal(false)
|
|
2173
|
-
]).optional(),
|
|
2174
|
-
maxDiskBytes: z.union([z.string(), z.number()]).optional(),
|
|
2175
|
-
highWaterBytes: z.union([z.string(), z.number()]).optional()
|
|
2176
|
-
}).strict().superRefine((val, ctx) => {
|
|
2177
|
-
if (val.pruneAfter !== void 0) try {
|
|
2178
|
-
parseDurationMs(String(val.pruneAfter).trim(), { defaultUnit: "d" });
|
|
2179
|
-
} catch {
|
|
2180
|
-
ctx.addIssue({
|
|
2181
|
-
code: z.ZodIssueCode.custom,
|
|
2182
|
-
path: ["pruneAfter"],
|
|
2183
|
-
message: "invalid duration (use ms, s, m, h, d)"
|
|
2184
|
-
});
|
|
2185
|
-
}
|
|
2186
|
-
if (val.rotateBytes !== void 0) try {
|
|
2187
|
-
parseByteSize(String(val.rotateBytes).trim(), { defaultUnit: "b" });
|
|
2188
|
-
} catch {
|
|
2189
|
-
ctx.addIssue({
|
|
2190
|
-
code: z.ZodIssueCode.custom,
|
|
2191
|
-
path: ["rotateBytes"],
|
|
2192
|
-
message: "invalid size (use b, kb, mb, gb, tb)"
|
|
2193
|
-
});
|
|
2194
|
-
}
|
|
2195
|
-
if (val.resetArchiveRetention !== void 0 && val.resetArchiveRetention !== false) try {
|
|
2196
|
-
parseDurationMs(String(val.resetArchiveRetention).trim(), { defaultUnit: "d" });
|
|
2197
|
-
} catch {
|
|
2198
|
-
ctx.addIssue({
|
|
2199
|
-
code: z.ZodIssueCode.custom,
|
|
2200
|
-
path: ["resetArchiveRetention"],
|
|
2201
|
-
message: "invalid duration (use ms, s, m, h, d)"
|
|
2202
|
-
});
|
|
2203
|
-
}
|
|
2204
|
-
if (val.maxDiskBytes !== void 0) try {
|
|
2205
|
-
parseByteSize(String(val.maxDiskBytes).trim(), { defaultUnit: "b" });
|
|
2206
|
-
} catch {
|
|
2207
|
-
ctx.addIssue({
|
|
2208
|
-
code: z.ZodIssueCode.custom,
|
|
2209
|
-
path: ["maxDiskBytes"],
|
|
2210
|
-
message: "invalid size (use b, kb, mb, gb, tb)"
|
|
2211
|
-
});
|
|
2212
|
-
}
|
|
2213
|
-
if (val.highWaterBytes !== void 0) try {
|
|
2214
|
-
parseByteSize(String(val.highWaterBytes).trim(), { defaultUnit: "b" });
|
|
2215
|
-
} catch {
|
|
2216
|
-
ctx.addIssue({
|
|
2217
|
-
code: z.ZodIssueCode.custom,
|
|
2218
|
-
path: ["highWaterBytes"],
|
|
2219
|
-
message: "invalid size (use b, kb, mb, gb, tb)"
|
|
2220
|
-
});
|
|
2221
|
-
}
|
|
2222
|
-
}).optional()
|
|
2223
|
-
}).strict().optional();
|
|
2224
|
-
const MessagesSchema = z.object({
|
|
2225
|
-
messagePrefix: z.string().optional(),
|
|
2226
|
-
responsePrefix: z.string().optional(),
|
|
2227
|
-
groupChat: GroupChatSchema,
|
|
2228
|
-
queue: QueueSchema,
|
|
2229
|
-
inbound: InboundDebounceSchema,
|
|
2230
|
-
ackReaction: z.string().optional(),
|
|
2231
|
-
ackReactionScope: z.enum([
|
|
2232
|
-
"group-mentions",
|
|
2233
|
-
"group-all",
|
|
2234
|
-
"direct",
|
|
2235
|
-
"all"
|
|
2236
|
-
]).optional(),
|
|
2237
|
-
removeAckAfterReply: z.boolean().optional(),
|
|
2238
|
-
statusReactions: z.object({
|
|
2239
|
-
enabled: z.boolean().optional(),
|
|
2240
|
-
emojis: z.object({
|
|
2241
|
-
thinking: z.string().optional(),
|
|
2242
|
-
tool: z.string().optional(),
|
|
2243
|
-
coding: z.string().optional(),
|
|
2244
|
-
web: z.string().optional(),
|
|
2245
|
-
done: z.string().optional(),
|
|
2246
|
-
error: z.string().optional(),
|
|
2247
|
-
stallSoft: z.string().optional(),
|
|
2248
|
-
stallHard: z.string().optional()
|
|
2249
|
-
}).strict().optional(),
|
|
2250
|
-
timing: z.object({
|
|
2251
|
-
debounceMs: z.number().int().min(0).optional(),
|
|
2252
|
-
stallSoftMs: z.number().int().min(0).optional(),
|
|
2253
|
-
stallHardMs: z.number().int().min(0).optional(),
|
|
2254
|
-
doneHoldMs: z.number().int().min(0).optional(),
|
|
2255
|
-
errorHoldMs: z.number().int().min(0).optional()
|
|
2256
|
-
}).strict().optional()
|
|
2257
|
-
}).strict().optional(),
|
|
2258
|
-
suppressToolErrors: z.boolean().optional(),
|
|
2259
|
-
tts: TtsConfigSchema
|
|
2260
|
-
}).strict().optional();
|
|
2261
|
-
const CommandsSchema = z.object({
|
|
2262
|
-
native: NativeCommandsSettingSchema.optional().default("auto"),
|
|
2263
|
-
text: z.boolean().optional(),
|
|
2264
|
-
bash: z.boolean().optional(),
|
|
2265
|
-
bashForegroundMs: z.number().int().min(0).max(3e4).optional(),
|
|
2266
|
-
config: z.boolean().optional(),
|
|
2267
|
-
debug: z.boolean().optional(),
|
|
2268
|
-
restart: z.boolean().optional().default(true),
|
|
2269
|
-
useAccessGroups: z.boolean().optional(),
|
|
2270
|
-
ownerAllowFrom: z.array(z.union([z.string(), z.number()])).optional(),
|
|
2271
|
-
ownerDisplay: z.enum(["raw", "hash"]).optional().default("raw"),
|
|
2272
|
-
ownerDisplaySecret: z.string().optional().register(sensitive),
|
|
2273
|
-
allowFrom: ElevatedAllowFromSchema.optional()
|
|
2274
|
-
}).strict().optional().default(() => ({
|
|
2275
|
-
native: "auto",
|
|
2276
|
-
restart: true,
|
|
2277
|
-
ownerDisplay: "raw"
|
|
2278
|
-
}));
|
|
2279
|
-
|
|
2280
|
-
//#endregion
|
|
2281
|
-
//#region src/config/zod-schema.ts
|
|
2282
|
-
const BrowserSnapshotDefaultsSchema = z.object({ mode: z.literal("efficient").optional() }).strict().optional();
|
|
2283
|
-
const NodeHostSchema = z.object({ browserProxy: z.object({
|
|
2284
|
-
enabled: z.boolean().optional(),
|
|
2285
|
-
allowProfiles: z.array(z.string()).optional()
|
|
2286
|
-
}).strict().optional() }).strict().optional();
|
|
2287
|
-
const LoggingLevelSchema = z.union([
|
|
2288
|
-
z.literal("silent"),
|
|
2289
|
-
z.literal("fatal"),
|
|
2290
|
-
z.literal("error"),
|
|
2291
|
-
z.literal("warn"),
|
|
2292
|
-
z.literal("info"),
|
|
2293
|
-
z.literal("debug"),
|
|
2294
|
-
z.literal("trace")
|
|
2295
|
-
]);
|
|
2296
|
-
const HttpUrlSchema = z.string().url().refine((value) => {
|
|
2297
|
-
const protocol = new URL(value).protocol;
|
|
2298
|
-
return protocol === "http:" || protocol === "https:";
|
|
2299
|
-
}, "Expected http:// or https:// URL");
|
|
2300
|
-
const RemoteClawSchema = z.object({
|
|
2301
|
-
$schema: z.string().optional(),
|
|
2302
|
-
meta: z.object({
|
|
2303
|
-
lastTouchedVersion: z.string().optional(),
|
|
2304
|
-
lastTouchedAt: z.union([z.string(), z.number().transform((n, ctx) => {
|
|
2305
|
-
const d = new Date(n);
|
|
2306
|
-
if (Number.isNaN(d.getTime())) {
|
|
2307
|
-
ctx.addIssue({
|
|
2308
|
-
code: z.ZodIssueCode.custom,
|
|
2309
|
-
message: "Invalid timestamp"
|
|
2310
|
-
});
|
|
2311
|
-
return z.NEVER;
|
|
2312
|
-
}
|
|
2313
|
-
return d.toISOString();
|
|
2314
|
-
})]).optional()
|
|
2315
|
-
}).strict().optional(),
|
|
2316
|
-
env: z.object({
|
|
2317
|
-
shellEnv: z.object({
|
|
2318
|
-
enabled: z.boolean().optional(),
|
|
2319
|
-
timeoutMs: z.number().int().nonnegative().optional()
|
|
2320
|
-
}).strict().optional(),
|
|
2321
|
-
vars: z.record(z.string(), z.string()).optional()
|
|
2322
|
-
}).catchall(z.string()).optional(),
|
|
2323
|
-
wizard: z.object({
|
|
2324
|
-
lastRunAt: z.string().optional(),
|
|
2325
|
-
lastRunVersion: z.string().optional(),
|
|
2326
|
-
lastRunCommit: z.string().optional(),
|
|
2327
|
-
lastRunCommand: z.string().optional(),
|
|
2328
|
-
lastRunMode: z.union([z.literal("local"), z.literal("remote")]).optional()
|
|
2329
|
-
}).strict().optional(),
|
|
2330
|
-
diagnostics: z.object({
|
|
2331
|
-
enabled: z.boolean().optional(),
|
|
2332
|
-
flags: z.array(z.string()).optional(),
|
|
2333
|
-
otel: z.object({
|
|
2334
|
-
enabled: z.boolean().optional(),
|
|
2335
|
-
endpoint: z.string().optional(),
|
|
2336
|
-
protocol: z.union([z.literal("http/protobuf"), z.literal("grpc")]).optional(),
|
|
2337
|
-
headers: z.record(z.string(), z.string()).optional(),
|
|
2338
|
-
serviceName: z.string().optional(),
|
|
2339
|
-
traces: z.boolean().optional(),
|
|
2340
|
-
metrics: z.boolean().optional(),
|
|
2341
|
-
logs: z.boolean().optional(),
|
|
2342
|
-
sampleRate: z.number().min(0).max(1).optional(),
|
|
2343
|
-
flushIntervalMs: z.number().int().nonnegative().optional()
|
|
2344
|
-
}).strict().optional(),
|
|
2345
|
-
cacheTrace: z.object({
|
|
2346
|
-
enabled: z.boolean().optional(),
|
|
2347
|
-
filePath: z.string().optional(),
|
|
2348
|
-
includeMessages: z.boolean().optional(),
|
|
2349
|
-
includePrompt: z.boolean().optional(),
|
|
2350
|
-
includeSystem: z.boolean().optional()
|
|
2351
|
-
}).strict().optional()
|
|
2352
|
-
}).strict().optional(),
|
|
2353
|
-
logging: z.object({
|
|
2354
|
-
level: LoggingLevelSchema.optional(),
|
|
2355
|
-
file: z.string().optional(),
|
|
2356
|
-
maxFileBytes: z.number().int().positive().optional(),
|
|
2357
|
-
consoleLevel: LoggingLevelSchema.optional(),
|
|
2358
|
-
consoleStyle: z.union([
|
|
2359
|
-
z.literal("pretty"),
|
|
2360
|
-
z.literal("compact"),
|
|
2361
|
-
z.literal("json")
|
|
2362
|
-
]).optional(),
|
|
2363
|
-
redactSensitive: z.union([z.literal("off"), z.literal("tools")]).optional(),
|
|
2364
|
-
redactPatterns: z.array(z.string()).optional()
|
|
2365
|
-
}).strict().optional(),
|
|
2366
|
-
update: z.object({
|
|
2367
|
-
channel: z.union([
|
|
2368
|
-
z.literal("stable"),
|
|
2369
|
-
z.literal("beta"),
|
|
2370
|
-
z.literal("next")
|
|
2371
|
-
]).optional(),
|
|
2372
|
-
checkOnStart: z.boolean().optional(),
|
|
2373
|
-
auto: z.object({
|
|
2374
|
-
enabled: z.boolean().optional(),
|
|
2375
|
-
stableDelayHours: z.number().nonnegative().max(168).optional(),
|
|
2376
|
-
stableJitterHours: z.number().nonnegative().max(168).optional(),
|
|
2377
|
-
betaCheckIntervalHours: z.number().positive().max(24).optional()
|
|
2378
|
-
}).strict().optional()
|
|
2379
|
-
}).strict().optional(),
|
|
2380
|
-
browser: z.object({
|
|
2381
|
-
enabled: z.boolean().optional(),
|
|
2382
|
-
evaluateEnabled: z.boolean().optional(),
|
|
2383
|
-
cdpUrl: z.string().optional(),
|
|
2384
|
-
remoteCdpTimeoutMs: z.number().int().nonnegative().optional(),
|
|
2385
|
-
remoteCdpHandshakeTimeoutMs: z.number().int().nonnegative().optional(),
|
|
2386
|
-
color: z.string().optional(),
|
|
2387
|
-
executablePath: z.string().optional(),
|
|
2388
|
-
headless: z.boolean().optional(),
|
|
2389
|
-
noSandbox: z.boolean().optional(),
|
|
2390
|
-
attachOnly: z.boolean().optional(),
|
|
2391
|
-
defaultProfile: z.string().optional(),
|
|
2392
|
-
snapshotDefaults: BrowserSnapshotDefaultsSchema,
|
|
2393
|
-
ssrfPolicy: z.object({
|
|
2394
|
-
allowPrivateNetwork: z.boolean().optional(),
|
|
2395
|
-
dangerouslyAllowPrivateNetwork: z.boolean().optional(),
|
|
2396
|
-
allowedHostnames: z.array(z.string()).optional(),
|
|
2397
|
-
hostnameAllowlist: z.array(z.string()).optional()
|
|
2398
|
-
}).strict().optional(),
|
|
2399
|
-
profiles: z.record(z.string().regex(/^[a-z0-9-]+$/, "Profile names must be alphanumeric with hyphens only"), z.object({
|
|
2400
|
-
cdpPort: z.number().int().min(1).max(65535).optional(),
|
|
2401
|
-
cdpUrl: z.string().optional(),
|
|
2402
|
-
driver: z.union([z.literal("clawd"), z.literal("extension")]).optional(),
|
|
2403
|
-
color: HexColorSchema
|
|
2404
|
-
}).strict().refine((value) => value.cdpPort || value.cdpUrl, { message: "Profile must set cdpPort or cdpUrl" })).optional()
|
|
2405
|
-
}).strict().optional(),
|
|
2406
|
-
ui: z.object({
|
|
2407
|
-
seamColor: HexColorSchema.optional(),
|
|
2408
|
-
assistant: z.object({
|
|
2409
|
-
name: z.string().max(50).optional(),
|
|
2410
|
-
avatar: z.string().max(200).optional()
|
|
2411
|
-
}).strict().optional()
|
|
2412
|
-
}).strict().optional(),
|
|
2413
|
-
auth: z.object({
|
|
2414
|
-
profiles: z.record(z.string(), z.object({
|
|
2415
|
-
provider: z.string(),
|
|
2416
|
-
mode: z.union([
|
|
2417
|
-
z.literal("api_key"),
|
|
2418
|
-
z.literal("oauth"),
|
|
2419
|
-
z.literal("token")
|
|
2420
|
-
]),
|
|
2421
|
-
email: z.string().optional()
|
|
2422
|
-
}).strict()).optional(),
|
|
2423
|
-
order: z.record(z.string(), z.array(z.string())).optional(),
|
|
2424
|
-
cooldowns: z.object({
|
|
2425
|
-
billingBackoffHours: z.number().positive().optional(),
|
|
2426
|
-
billingBackoffHoursByProvider: z.record(z.string(), z.number().positive()).optional(),
|
|
2427
|
-
billingMaxHours: z.number().positive().optional(),
|
|
2428
|
-
failureWindowHours: z.number().positive().optional()
|
|
2429
|
-
}).strict().optional()
|
|
2430
|
-
}).strict().optional(),
|
|
2431
|
-
nodeHost: NodeHostSchema,
|
|
2432
|
-
agents: AgentsSchema,
|
|
2433
|
-
tools: ToolsSchema,
|
|
2434
|
-
bindings: BindingsSchema,
|
|
2435
|
-
broadcast: BroadcastSchema,
|
|
2436
|
-
audio: AudioSchema,
|
|
2437
|
-
media: z.object({ preserveFilenames: z.boolean().optional() }).strict().optional(),
|
|
2438
|
-
messages: MessagesSchema,
|
|
2439
|
-
commands: CommandsSchema,
|
|
2440
|
-
approvals: ApprovalsSchema,
|
|
2441
|
-
session: SessionSchema,
|
|
2442
|
-
cron: z.object({
|
|
2443
|
-
enabled: z.boolean().optional(),
|
|
2444
|
-
store: z.string().optional(),
|
|
2445
|
-
maxConcurrentRuns: z.number().int().positive().optional(),
|
|
2446
|
-
webhook: HttpUrlSchema.optional(),
|
|
2447
|
-
webhookToken: z.string().optional().register(sensitive),
|
|
2448
|
-
sessionRetention: z.union([z.string(), z.literal(false)]).optional(),
|
|
2449
|
-
runLog: z.object({
|
|
2450
|
-
maxBytes: z.union([z.string(), z.number()]).optional(),
|
|
2451
|
-
keepLines: z.number().int().positive().optional()
|
|
2452
|
-
}).strict().optional()
|
|
2453
|
-
}).strict().superRefine((val, ctx) => {
|
|
2454
|
-
if (val.sessionRetention !== void 0 && val.sessionRetention !== false) try {
|
|
2455
|
-
parseDurationMs(String(val.sessionRetention).trim(), { defaultUnit: "h" });
|
|
2456
|
-
} catch {
|
|
2457
|
-
ctx.addIssue({
|
|
2458
|
-
code: z.ZodIssueCode.custom,
|
|
2459
|
-
path: ["sessionRetention"],
|
|
2460
|
-
message: "invalid duration (use ms, s, m, h, d)"
|
|
2461
|
-
});
|
|
2462
|
-
}
|
|
2463
|
-
if (val.runLog?.maxBytes !== void 0) try {
|
|
2464
|
-
parseByteSize(String(val.runLog.maxBytes).trim(), { defaultUnit: "b" });
|
|
2465
|
-
} catch {
|
|
2466
|
-
ctx.addIssue({
|
|
2467
|
-
code: z.ZodIssueCode.custom,
|
|
2468
|
-
path: ["runLog", "maxBytes"],
|
|
2469
|
-
message: "invalid size (use b, kb, mb, gb, tb)"
|
|
2470
|
-
});
|
|
2471
|
-
}
|
|
2472
|
-
}).optional(),
|
|
2473
|
-
hooks: z.object({
|
|
2474
|
-
enabled: z.boolean().optional(),
|
|
2475
|
-
path: z.string().optional(),
|
|
2476
|
-
token: z.string().optional().register(sensitive),
|
|
2477
|
-
defaultSessionKey: z.string().optional(),
|
|
2478
|
-
allowRequestSessionKey: z.boolean().optional(),
|
|
2479
|
-
allowedSessionKeyPrefixes: z.array(z.string()).optional(),
|
|
2480
|
-
allowedAgentIds: z.array(z.string()).optional(),
|
|
2481
|
-
maxBodyBytes: z.number().int().positive().optional(),
|
|
2482
|
-
presets: z.array(z.string()).optional(),
|
|
2483
|
-
transformsDir: z.string().optional(),
|
|
2484
|
-
mappings: z.array(HookMappingSchema).optional(),
|
|
2485
|
-
gmail: HooksGmailSchema,
|
|
2486
|
-
internal: InternalHooksSchema
|
|
2487
|
-
}).strict().optional(),
|
|
2488
|
-
web: z.object({
|
|
2489
|
-
enabled: z.boolean().optional(),
|
|
2490
|
-
heartbeatSeconds: z.number().int().positive().optional(),
|
|
2491
|
-
reconnect: z.object({
|
|
2492
|
-
initialMs: z.number().positive().optional(),
|
|
2493
|
-
maxMs: z.number().positive().optional(),
|
|
2494
|
-
factor: z.number().positive().optional(),
|
|
2495
|
-
jitter: z.number().min(0).max(1).optional(),
|
|
2496
|
-
maxAttempts: z.number().int().min(0).optional()
|
|
2497
|
-
}).strict().optional()
|
|
2498
|
-
}).strict().optional(),
|
|
2499
|
-
channels: ChannelsSchema,
|
|
2500
|
-
discovery: z.object({
|
|
2501
|
-
wideArea: z.object({ enabled: z.boolean().optional() }).strict().optional(),
|
|
2502
|
-
mdns: z.object({ mode: z.enum([
|
|
2503
|
-
"off",
|
|
2504
|
-
"minimal",
|
|
2505
|
-
"full"
|
|
2506
|
-
]).optional() }).strict().optional()
|
|
2507
|
-
}).strict().optional(),
|
|
2508
|
-
canvasHost: z.object({
|
|
2509
|
-
enabled: z.boolean().optional(),
|
|
2510
|
-
root: z.string().optional(),
|
|
2511
|
-
port: z.number().int().positive().optional(),
|
|
2512
|
-
liveReload: z.boolean().optional()
|
|
2513
|
-
}).strict().optional(),
|
|
2514
|
-
talk: z.object({
|
|
2515
|
-
provider: z.string().optional(),
|
|
2516
|
-
providers: z.record(z.string(), z.object({
|
|
2517
|
-
voiceId: z.string().optional(),
|
|
2518
|
-
voiceAliases: z.record(z.string(), z.string()).optional(),
|
|
2519
|
-
modelId: z.string().optional(),
|
|
2520
|
-
outputFormat: z.string().optional(),
|
|
2521
|
-
apiKey: z.string().optional().register(sensitive)
|
|
2522
|
-
}).catchall(z.unknown())).optional(),
|
|
2523
|
-
voiceId: z.string().optional(),
|
|
2524
|
-
voiceAliases: z.record(z.string(), z.string()).optional(),
|
|
2525
|
-
modelId: z.string().optional(),
|
|
2526
|
-
outputFormat: z.string().optional(),
|
|
2527
|
-
apiKey: z.string().optional().register(sensitive),
|
|
2528
|
-
interruptOnSpeech: z.boolean().optional()
|
|
2529
|
-
}).strict().optional(),
|
|
2530
|
-
gateway: z.object({
|
|
2531
|
-
port: z.number().int().positive().optional(),
|
|
2532
|
-
mode: z.union([z.literal("local"), z.literal("remote")]).optional(),
|
|
2533
|
-
bind: z.union([
|
|
2534
|
-
z.literal("auto"),
|
|
2535
|
-
z.literal("lan"),
|
|
2536
|
-
z.literal("loopback"),
|
|
2537
|
-
z.literal("custom"),
|
|
2538
|
-
z.literal("tailnet")
|
|
2539
|
-
]).optional(),
|
|
2540
|
-
customBindHost: z.string().optional(),
|
|
2541
|
-
controlUi: z.object({
|
|
2542
|
-
enabled: z.boolean().optional(),
|
|
2543
|
-
basePath: z.string().optional(),
|
|
2544
|
-
root: z.string().optional(),
|
|
2545
|
-
allowedOrigins: z.array(z.string()).optional(),
|
|
2546
|
-
dangerouslyAllowHostHeaderOriginFallback: z.boolean().optional(),
|
|
2547
|
-
allowInsecureAuth: z.boolean().optional(),
|
|
2548
|
-
dangerouslyDisableDeviceAuth: z.boolean().optional()
|
|
2549
|
-
}).strict().optional(),
|
|
2550
|
-
auth: z.object({
|
|
2551
|
-
mode: z.union([
|
|
2552
|
-
z.literal("none"),
|
|
2553
|
-
z.literal("token"),
|
|
2554
|
-
z.literal("password"),
|
|
2555
|
-
z.literal("trusted-proxy")
|
|
2556
|
-
]).optional(),
|
|
2557
|
-
token: z.string().optional().register(sensitive),
|
|
2558
|
-
password: z.string().optional().register(sensitive),
|
|
2559
|
-
allowTailscale: z.boolean().optional(),
|
|
2560
|
-
rateLimit: z.object({
|
|
2561
|
-
maxAttempts: z.number().optional(),
|
|
2562
|
-
windowMs: z.number().optional(),
|
|
2563
|
-
lockoutMs: z.number().optional(),
|
|
2564
|
-
exemptLoopback: z.boolean().optional()
|
|
2565
|
-
}).strict().optional(),
|
|
2566
|
-
trustedProxy: z.object({
|
|
2567
|
-
userHeader: z.string().min(1, "userHeader is required for trusted-proxy mode"),
|
|
2568
|
-
requiredHeaders: z.array(z.string()).optional(),
|
|
2569
|
-
allowUsers: z.array(z.string()).optional()
|
|
2570
|
-
}).strict().optional()
|
|
2571
|
-
}).strict().optional(),
|
|
2572
|
-
trustedProxies: z.array(z.string()).optional(),
|
|
2573
|
-
allowRealIpFallback: z.boolean().optional(),
|
|
2574
|
-
tools: z.object({
|
|
2575
|
-
deny: z.array(z.string()).optional(),
|
|
2576
|
-
allow: z.array(z.string()).optional()
|
|
2577
|
-
}).strict().optional(),
|
|
2578
|
-
channelHealthCheckMinutes: z.number().int().min(0).optional(),
|
|
2579
|
-
tailscale: z.object({
|
|
2580
|
-
mode: z.union([
|
|
2581
|
-
z.literal("off"),
|
|
2582
|
-
z.literal("serve"),
|
|
2583
|
-
z.literal("funnel")
|
|
2584
|
-
]).optional(),
|
|
2585
|
-
resetOnExit: z.boolean().optional()
|
|
2586
|
-
}).strict().optional(),
|
|
2587
|
-
remote: z.object({
|
|
2588
|
-
url: z.string().optional(),
|
|
2589
|
-
transport: z.union([z.literal("ssh"), z.literal("direct")]).optional(),
|
|
2590
|
-
token: z.string().optional().register(sensitive),
|
|
2591
|
-
password: z.string().optional().register(sensitive),
|
|
2592
|
-
tlsFingerprint: z.string().optional(),
|
|
2593
|
-
sshTarget: z.string().optional(),
|
|
2594
|
-
sshIdentity: z.string().optional()
|
|
2595
|
-
}).strict().optional(),
|
|
2596
|
-
reload: z.object({
|
|
2597
|
-
mode: z.union([
|
|
2598
|
-
z.literal("off"),
|
|
2599
|
-
z.literal("restart"),
|
|
2600
|
-
z.literal("hot"),
|
|
2601
|
-
z.literal("hybrid")
|
|
2602
|
-
]).optional(),
|
|
2603
|
-
debounceMs: z.number().int().min(0).optional()
|
|
2604
|
-
}).strict().optional(),
|
|
2605
|
-
tls: z.object({
|
|
2606
|
-
enabled: z.boolean().optional(),
|
|
2607
|
-
autoGenerate: z.boolean().optional(),
|
|
2608
|
-
certPath: z.string().optional(),
|
|
2609
|
-
keyPath: z.string().optional(),
|
|
2610
|
-
caPath: z.string().optional()
|
|
2611
|
-
}).optional(),
|
|
2612
|
-
http: z.object({
|
|
2613
|
-
endpoints: z.object({
|
|
2614
|
-
chatCompletions: z.object({ enabled: z.boolean().optional() }).strict().optional(),
|
|
2615
|
-
responses: z.object({
|
|
2616
|
-
enabled: z.boolean().optional(),
|
|
2617
|
-
maxBodyBytes: z.number().int().positive().optional(),
|
|
2618
|
-
maxUrlParts: z.number().int().nonnegative().optional(),
|
|
2619
|
-
files: z.object({
|
|
2620
|
-
allowUrl: z.boolean().optional(),
|
|
2621
|
-
urlAllowlist: z.array(z.string()).optional(),
|
|
2622
|
-
allowedMimes: z.array(z.string()).optional(),
|
|
2623
|
-
maxBytes: z.number().int().positive().optional(),
|
|
2624
|
-
maxChars: z.number().int().positive().optional(),
|
|
2625
|
-
maxRedirects: z.number().int().nonnegative().optional(),
|
|
2626
|
-
timeoutMs: z.number().int().positive().optional(),
|
|
2627
|
-
pdf: z.object({
|
|
2628
|
-
maxPages: z.number().int().positive().optional(),
|
|
2629
|
-
maxPixels: z.number().int().positive().optional(),
|
|
2630
|
-
minTextChars: z.number().int().nonnegative().optional()
|
|
2631
|
-
}).strict().optional()
|
|
2632
|
-
}).strict().optional(),
|
|
2633
|
-
images: z.object({
|
|
2634
|
-
allowUrl: z.boolean().optional(),
|
|
2635
|
-
urlAllowlist: z.array(z.string()).optional(),
|
|
2636
|
-
allowedMimes: z.array(z.string()).optional(),
|
|
2637
|
-
maxBytes: z.number().int().positive().optional(),
|
|
2638
|
-
maxRedirects: z.number().int().nonnegative().optional(),
|
|
2639
|
-
timeoutMs: z.number().int().positive().optional()
|
|
2640
|
-
}).strict().optional()
|
|
2641
|
-
}).strict().optional()
|
|
2642
|
-
}).strict().optional(),
|
|
2643
|
-
securityHeaders: z.object({ strictTransportSecurity: z.union([z.string(), z.literal(false)]).optional() }).strict().optional()
|
|
2644
|
-
}).strict().optional(),
|
|
2645
|
-
nodes: z.object({
|
|
2646
|
-
browser: z.object({
|
|
2647
|
-
mode: z.union([
|
|
2648
|
-
z.literal("auto"),
|
|
2649
|
-
z.literal("manual"),
|
|
2650
|
-
z.literal("off")
|
|
2651
|
-
]).optional(),
|
|
2652
|
-
node: z.string().optional()
|
|
2653
|
-
}).strict().optional(),
|
|
2654
|
-
allowCommands: z.array(z.string()).optional(),
|
|
2655
|
-
denyCommands: z.array(z.string()).optional()
|
|
2656
|
-
}).strict().optional()
|
|
2657
|
-
}).strict().optional(),
|
|
2658
|
-
memory: z.unknown().optional(),
|
|
2659
|
-
plugins: z.object({
|
|
2660
|
-
enabled: z.boolean().optional(),
|
|
2661
|
-
allow: z.array(z.string()).optional(),
|
|
2662
|
-
deny: z.array(z.string()).optional(),
|
|
2663
|
-
load: z.object({ paths: z.array(z.string()).optional() }).strict().optional(),
|
|
2664
|
-
slots: z.object({ memory: z.string().optional() }).strict().optional(),
|
|
2665
|
-
entries: z.record(z.string(), z.object({
|
|
2666
|
-
enabled: z.boolean().optional(),
|
|
2667
|
-
config: z.record(z.string(), z.unknown()).optional()
|
|
2668
|
-
}).strict()).optional(),
|
|
2669
|
-
installs: z.record(z.string(), z.object({ ...InstallRecordShape }).strict()).optional()
|
|
2670
|
-
}).strict().optional()
|
|
2671
|
-
}).strict().superRefine((cfg, ctx) => {
|
|
2672
|
-
const agents = cfg.agents?.list ?? [];
|
|
2673
|
-
if (agents.length === 0) return;
|
|
2674
|
-
const agentIds = new Set(agents.map((agent) => agent.id));
|
|
2675
|
-
const broadcast = cfg.broadcast;
|
|
2676
|
-
if (!broadcast) return;
|
|
2677
|
-
for (const [peerId, ids] of Object.entries(broadcast)) {
|
|
2678
|
-
if (peerId === "strategy") continue;
|
|
2679
|
-
if (!Array.isArray(ids)) continue;
|
|
2680
|
-
for (let idx = 0; idx < ids.length; idx += 1) {
|
|
2681
|
-
const agentId = ids[idx];
|
|
2682
|
-
if (!agentIds.has(agentId)) ctx.addIssue({
|
|
2683
|
-
code: z.ZodIssueCode.custom,
|
|
2684
|
-
path: [
|
|
2685
|
-
"broadcast",
|
|
2686
|
-
peerId,
|
|
2687
|
-
idx
|
|
2688
|
-
],
|
|
2689
|
-
message: `Unknown agent id "${agentId}" (not in agents.list).`
|
|
2690
|
-
});
|
|
2691
|
-
}
|
|
2692
|
-
}
|
|
2693
|
-
});
|
|
2694
|
-
|
|
2695
|
-
//#endregion
|
|
2696
|
-
export { normalizeScpRemoteHost as a, parseByteSize as c, resolveDiscordPreviewStreamMode as d, resolveSlackNativeStreaming as f, resolveTelegramCustomCommands as i, isSafeExecutableValue as l, resolveTelegramPreviewStreamMode as m, TELEGRAM_COMMAND_NAME_PATTERN as n, sensitive as o, resolveSlackStreamingMode as p, normalizeTelegramCommandName as r, parseDurationMs as s, RemoteClawSchema as t, mapStreamingModeToSlackLegacyDraftStreamMode as u };
|