activeclaw 2026.2.12 → 2026.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/dist/{accounts-DbzMEfKN.js → accounts-DCDeFTra.js} +2 -2
- package/dist/{accounts-DimKrt7j.js → accounts-DeqIQjo1.js} +2 -2
- package/dist/{acp-cli-Cs1ai4XO.js → acp-cli-CeYI4XRd.js} +15 -16
- package/dist/{acp-cli-oV2dodPg.js → acp-cli-rNbGXICg.js} +14 -15
- package/dist/{agent-BndgzkUe.js → agent-BvNJF5QL.js} +19 -16
- package/dist/{agent-DZvDwqnd.js → agent-CyMxTyrG.js} +20 -17
- package/dist/{agent-scope-rXQ7WARN.js → agent-scope-BIEhVP4_.js} +1 -1
- package/dist/{agent-scope---6LLHj0.js → agent-scope-CQCus0rI.js} +2 -2
- package/dist/{agent-scope-RCSw6gHy.js → agent-scope-CsRbLH4l.js} +3 -3
- package/dist/{agent-scope-CN8DM4Xb.js → agent-scope-DPIFau3f.js} +1 -1
- package/dist/{audio-preflight-SZRntkxo.js → audio-preflight-BU8W7uxc.js} +10 -10
- package/dist/{audio-preflight-ClVNINDs.js → audio-preflight-CGsumMzb.js} +10 -10
- package/dist/{audio-preflight-txAP3v-C.js → audio-preflight-SLmkJI6-.js} +22 -22
- package/dist/{audio-preflight-BP6s-UPp.js → audio-preflight-jZc5mFCZ.js} +23 -23
- package/dist/{audit-CQzrm61N.js → audit-Dmww_503.js} +70 -18
- package/dist/{audit-DMH3CSXY.js → audit-wPu26VMb.js} +72 -20
- package/dist/{tailscale-DU6DgqVy.js → auth-9x3lqfIY.js} +208 -3
- package/dist/{tailscale-DHfcfRCx.js → auth-CQNl_IaI.js} +190 -3
- package/dist/{auth-health-BB3e3OmN.js → auth-health-C4L4FGBA.js} +1 -1
- package/dist/{auth-health-zZ9dnQGC.js → auth-health-j6epgQbq.js} +1 -1
- package/dist/{auth-profiles-CcJ3hrog.js → auth-profiles-ByNs3eEm.js} +60 -22
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +19 -16
- package/dist/bundled/session-memory/handler.js +16 -15
- package/dist/{call-Yxns4CVq.js → call-DVYCIV8m.js} +5 -5
- package/dist/{call-C9az806y.js → call-SolyGS1r.js} +4 -4
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-CjXPwMWu.js → channel-options-BwC2yQcR.js} +4 -4
- package/dist/{channel-options-CX4iYQfR.js → channel-options-Cq9BVDkP.js} +7 -7
- package/dist/{channel-selection-BoQ7GurB.js → channel-selection-D4D6ImhN.js} +2 -2
- package/dist/{channel-selection-C78IwbD-.js → channel-selection-MZAHm4U8.js} +2 -2
- package/dist/{channels-cli-DUHsmX3q.js → channels-cli-9Dsk9Qm7.js} +53 -51
- package/dist/{channels-cli-BXMQPB4x.js → channels-cli-BJUppQll.js} +52 -50
- package/dist/{channels-status-issues-Ca9--azp.js → channels-status-issues-D7GSV1GS.js} +1 -1
- package/dist/{channels-status-issues-CbULFg2X.js → channels-status-issues-DDAWeT-6.js} +1 -1
- package/dist/{chrome-svgmQ8T_.js → chrome-BfB6JdKF.js} +2 -1
- package/dist/{chrome-juQxt0zf.js → chrome-Cvr-57lg.js} +4 -3
- package/dist/{chrome-BCPPeLQ6.js → chrome-DL0avO8n.js} +2 -1
- package/dist/{chrome-yIKmOzCO.js → chrome-foEwx3lN.js} +5 -4
- package/dist/{clack-prompter-Dmvcu3gn.js → clack-prompter-Bz3Mmcl-.js} +5 -5
- package/dist/{clack-prompter-DuBVnTKy.js → clack-prompter-ChCGXfyt.js} +4 -4
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-FdxAcu_y.js → cli-ZR9ugUBX.js} +42 -40
- package/dist/{cli-By331Q9f.js → cli-miPe4Ujz.js} +42 -40
- package/dist/{client-B0_GiCjB.js → client-BrYfyoDK.js} +52 -3
- package/dist/{client-D7wrC1Ug.js → client-CTwXnRl7.js} +53 -4
- package/dist/{command-format-ayFsmwwz.js → command-format-Bxe0mWee.js} +1 -1
- package/dist/{command-options-BSDiKuyX.js → command-options-BvgxzPbK.js} +4 -4
- package/dist/{commands-BG25qku5.js → commands-BX_OIIVR.js} +4 -4
- package/dist/{completion-cli-C4zxjkC1.js → completion-cli-CR77-jyv.js} +3 -3
- package/dist/{completion-cli-DECEgBWR.js → completion-cli-DnjpxAag.js} +29 -29
- package/dist/{config-B7sno9eI.js → config-Bdhomfei.js} +15 -6
- package/dist/{config-BuF7vm-v.js → config-BvMsmctM.js} +13 -4
- package/dist/{config-D50SQVar.js → config-QYrbd7x7.js} +13 -4
- package/dist/{config-DH9TLUNc.js → config-aFQssWKX.js} +15 -6
- package/dist/{config-guard-DPxxY1iw.js → config-guard-CljaSxJd.js} +39 -39
- package/dist/{configure-BZQ9uSVX.js → configure-BXLiucXo.js} +19 -19
- package/dist/{configure-Cg5IKSUy.js → configure-BYPqXzGZ.js} +19 -19
- package/dist/control-auth-8Cf4WXpR.js +54 -0
- package/dist/control-auth-DBCu3qyv.js +54 -0
- package/dist/{control-service-CBlMVTRu.js → control-service-B5KnPqGP.js} +11 -5
- package/dist/{control-service-B2er20Ke.js → control-service-DKnttEus.js} +10 -4
- package/dist/{cron-cli-B2Zwhy_r.js → cron-cli-D7BRjDv2.js} +17 -17
- package/dist/{cron-cli-EaRUVd0p.js → cron-cli-z1zk_FXQ.js} +16 -16
- package/dist/{daemon-cli-CVNzObIF.js → daemon-cli-BDkU2ocb.js} +18 -18
- package/dist/{daemon-cli-DF6Rxjy6.js → daemon-cli-cNSF93-v.js} +19 -19
- package/dist/{daemon-runtime-BHF5NjQ7.js → daemon-runtime-B0tg_LsX.js} +2 -2
- package/dist/{daemon-runtime-B05PME1z.js → daemon-runtime-Bsjeut6m.js} +3 -3
- package/dist/{deliver-DzcxEcza.js → deliver-CIU9Npgs.js} +306 -12
- package/dist/{deliver-COf5XFo_.js → deliver-DYYCo1G7.js} +302 -8
- package/dist/{deliver-B1jsU2r7.js → deliver-LsxKETro.js} +306 -12
- package/dist/{deliver-CLwC284e.js → deliver-xUU3mGHo.js} +302 -8
- package/dist/{deps-Cva7QM_t.js → deps-QSwGcoNZ.js} +2 -2
- package/dist/{deps-B6602Wid.js → deps-lAAA2zYI.js} +2 -2
- package/dist/{devices-cli-DPg_4aW8.js → devices-cli-BG3-2oqt.js} +13 -13
- package/dist/{devices-cli-D8K3hZR5.js → devices-cli-VIQtOvt_.js} +13 -13
- package/dist/{directory-cli-OGBSVKAZ.js → directory-cli-BCJwjVC0.js} +15 -15
- package/dist/{directory-cli-Bn47fFX7.js → directory-cli-jYzZ02gk.js} +14 -14
- package/dist/{dispatcher-BHsNwFe-.js → dispatcher-DY51b-Zc.js} +2 -2
- package/dist/{dns-cli-DmTHXgwU.js → dns-cli-DHIiMJjS.js} +11 -11
- package/dist/{dns-cli-kk2rysJh.js → dns-cli-pZlv87Ib.js} +11 -11
- package/dist/{docs-cli-CB77CeM4.js → docs-cli-2JDiwfzP.js} +7 -7
- package/dist/{docs-cli-DUcyw0X0.js → docs-cli-BhkYqoIQ.js} +6 -6
- package/dist/{doctor-DwqdkfPa.js → doctor-Bf8EhNtA.js} +33 -33
- package/dist/{doctor-BZfxDGUg.js → doctor-sYG5V4Co.js} +32 -32
- package/dist/entry.js +36 -14
- package/dist/{env-DE9xvYOL.js → env-ONzUVAG2.js} +1 -1
- package/dist/{exec-4WHuOniw.js → exec-B8lXct-k.js} +31 -13
- package/dist/{exec-B8JKbXKW.js → exec-CACT5OAW.js} +1 -1
- package/dist/{exec-D12IZYtJ.js → exec-CJFFoM7H.js} +31 -13
- package/dist/{exec-DXtR2fhb.js → exec-YIosokWE.js} +1 -1
- package/dist/{exec-approvals-cli-GizapOX5.js → exec-approvals-cli-7LH0lwhO.js} +19 -19
- package/dist/{exec-approvals-cli-BWO0Rs-a.js → exec-approvals-cli-apGnQbpj.js} +19 -19
- package/dist/extensionAPI.js +1108 -661
- package/dist/{fetch-CqZP8jwB.js → fetch-DmiOpALK.js} +5 -3
- package/dist/{fetch-timeout-B2KlHXi3.js → fetch-timeout-BEtUjM1S.js} +5 -3
- package/dist/{fetch-timeout-ohY5QmsW.js → fetch-timeout-DEoXG_SF.js} +5 -3
- package/dist/{fetch-timeout-4UKsdtE1.js → fetch-timeout-DTK9vxex.js} +5 -3
- package/dist/{gateway-cli-Bbd1Xbsc.js → gateway-cli-DUdYxlZS.js} +315 -103
- package/dist/{gateway-cli-PR1S0BTe.js → gateway-cli-DbvWmE-9.js} +314 -102
- package/dist/{gateway-rpc-8gue7Qjt.js → gateway-rpc-BByb2Snz.js} +3 -3
- package/dist/{gateway-rpc-DjuxyOm-.js → gateway-rpc-wXSCUZXj.js} +3 -3
- package/dist/{github-copilot-auth-B3chCDfc.js → github-copilot-auth-D7ewvpMd.js} +16 -8
- package/dist/{github-copilot-auth-Cm2SB8Qf.js → github-copilot-auth-DDispnyz.js} +16 -8
- package/dist/{github-copilot-token-SLWintYd.js → github-copilot-token-Cfs0Wxr8.js} +1 -1
- package/dist/{gmail-setup-utils-Cgh0ptgA.js → gmail-setup-utils-Cfns8TQx.js} +3 -3
- package/dist/{gmail-setup-utils-WDyf1gTU.js → gmail-setup-utils-DJb-_5kO.js} +4 -4
- package/dist/{health-format-C0C_Apce.js → health-format-KGPokKJH.js} +68 -28
- package/dist/{health-format-gLMfE2wf.js → health-format-LZDxu3rv.js} +67 -27
- package/dist/{help-format-5iAL_46a.js → help-format-C48TXngO.js} +1 -1
- package/dist/{help-format-DUy1KRxq.js → help-format-R5fLToDw.js} +1 -1
- package/dist/{hooks-cli-CEN1h1ya.js → hooks-cli-CT8JCRkH.js} +46 -44
- package/dist/{hooks-cli-DrchIqSi.js → hooks-cli-S1MKumJO.js} +47 -45
- package/dist/{hooks-status-Cgy6AtQk.js → hooks-status-Cw0xD8Lt.js} +3 -3
- package/dist/{hooks-status--xVLpAXz.js → hooks-status-D9MhwHRp.js} +3 -3
- package/dist/{image-Dkawt9Kg.js → image-Brk1sJbw.js} +4 -4
- package/dist/{image-DI9s9eEx.js → image-C4Nn2p3e.js} +5 -5
- package/dist/{image-LxFvu0wL.js → image-DgtfXMcX.js} +5 -5
- package/dist/{image-B4mDPdyz.js → image-RKwc3fsL.js} +4 -4
- package/dist/index.js +83 -83
- package/dist/{installs-NS0VMPN7.js → installs-CrLcWYHe.js} +4 -4
- package/dist/{installs-DA-eSN1B.js → installs-DscWb9b9.js} +5 -5
- package/dist/{links-CV4oki2u.js → links-B8LAzWwg.js} +1 -1
- package/dist/{links-7M-j83As.js → links-Eax1UO3w.js} +1 -1
- package/dist/llm-slug-generator.js +15 -15
- package/dist/{loader-Caow9TPA.js → loader-KjT074JR.js} +1105 -762
- package/dist/{logging-CeHn2itV.js → logging-BAyPwvdH.js} +1 -1
- package/dist/{logging-D0MyqUlV.js → logging-CRq4h04P.js} +2 -2
- package/dist/{login-qr-Xx8yJrSc.js → login-qr-B6ZgAuIf.js} +5 -5
- package/dist/{login-qr-CoskdtvN.js → login-qr-Bua-p0nG.js} +2 -2
- package/dist/{login-qr-CAk9D-FM.js → login-qr-CuvemJj4.js} +6 -6
- package/dist/{login-qr-kUyMWXV1.js → login-qr-Djr1JfIf.js} +2 -2
- package/dist/{logs-cli-B476pzJS.js → logs-cli-9IAV7rWY.js} +15 -15
- package/dist/{logs-cli-BQRUI_PO.js → logs-cli-EiKzUFPa.js} +14 -14
- package/dist/{manager-CBApH7eR.js → manager-BIMh_eSm.js} +5 -5
- package/dist/{manager-CyJH6WMg.js → manager-CwinWQoz.js} +5 -5
- package/dist/{manager-DScY_ZTT.js → manager-DkqF1GiK.js} +7 -7
- package/dist/{manager-DseK7RWj.js → manager-T1XfGchB.js} +8 -8
- package/dist/{manifest-registry-DFckk-L8.js → manifest-registry-CQhdnDBZ.js} +2 -2
- package/dist/{manifest-registry-BTgLN_W2.js → manifest-registry-u0okVSkU.js} +2 -2
- package/dist/{message-channel-0717wOz-.js → message-channel-BLi2a6Yw.js} +1 -1
- package/dist/{message-channel-BlgPSDAh.js → message-channel-C_MmebBt.js} +1 -1
- package/dist/{model-auth-CbqRVYRp.js → model-auth-CabXIF6O.js} +57 -19
- package/dist/{model-selection-unMJyUIE.js → model-selection-BLuqsGVB.js} +59 -21
- package/dist/{model-selection-B9Y7dKQd.js → model-selection-C1GmkTAV.js} +57 -19
- package/dist/{models-cli-B1cLGcRz.js → models-cli-9jmDv-h3.js} +50 -48
- package/dist/{models-cli-D7sChCi6.js → models-cli-zS9rtWz8.js} +48 -46
- package/dist/{node-cli-ic2C1xs2.js → node-cli-CrpTxTTs.js} +26 -24
- package/dist/{node-cli-CS3KwBh1.js → node-cli-wemUMCg-.js} +25 -23
- package/dist/{node-service-D_Cdq1JI.js → node-service-C8DTHTMg.js} +2 -2
- package/dist/{node-service-_vgO5xR-.js → node-service-WQuEKz6W.js} +1 -1
- package/dist/{nodes-cli-CipcvVMc.js → nodes-cli-BaU2SIFw.js} +16 -16
- package/dist/{nodes-cli-B1meaW7S.js → nodes-cli-Dx23D72n.js} +16 -16
- package/dist/{nodes-screen-N-4_0VIu.js → nodes-screen-C0IuBqUL.js} +1 -1
- package/dist/{note-CAM9PbSJ.js → note-BhRSeNeu.js} +2 -2
- package/dist/{note-Ci08TSbV.js → note-hhtubr2j.js} +1 -1
- package/dist/{onboard-channels-DMcOT0dj.js → onboard-channels-C501x8GI.js} +8 -8
- package/dist/{onboard-channels-CsT3E4bT.js → onboard-channels-Dxzroasd.js} +8 -8
- package/dist/{onboard-skills-DoxkpnEU.js → onboard-skills-DV0Qzvjj.js} +19 -19
- package/dist/{onboard-skills-D-BrCoRN.js → onboard-skills-rlBHcu3Q.js} +18 -18
- package/dist/{onboarding-B92952fz.js → onboarding-CN-EDLjd.js} +34 -34
- package/dist/{pairing-cli-BDUJ5VoX.js → pairing-cli-CDHG4xuI.js} +15 -15
- package/dist/{pairing-cli-0wbU1u8d.js → pairing-cli-CQP34Dlx.js} +14 -14
- package/dist/{pairing-labels-3o3QO3Qn.js → pairing-labels-B6CN0SNH.js} +1 -1
- package/dist/{pairing-labels-Bin1K7_f.js → pairing-labels-CgNHnjzT.js} +1 -1
- package/dist/{pairing-store-CL4rJ7m7.js → pairing-store-CmlRVqOz.js} +2 -2
- package/dist/{pairing-store-fIWI3pXG.js → pairing-store-Dp5_JGnG.js} +3 -3
- package/dist/{path-env-CXWUFfFv.js → path-env-CLvYNwtL.js} +1 -1
- package/dist/{path-env-C5FR_Eay.js → path-env-CaYUVIML.js} +2 -2
- package/dist/{paths-DwKNqk_S.js → paths-B0a4ywSO.js} +30 -5
- package/dist/{paths-RITJT4UY.js → paths-B49s6UZQ.js} +30 -5
- package/dist/{paths-CB2fqqbX.js → paths-D0O87MfH.js} +30 -5
- package/dist/{paths-IivnSNkP.js → paths-DLINmNFQ.js} +31 -6
- package/dist/{pi-embedded-DhYItk8O.js → pi-embedded-Ctrt2kz0.js} +1109 -662
- package/dist/{pi-embedded-helpers-CmftU5Zj.js → pi-embedded-helpers-CMKLjW6X.js} +8 -5
- package/dist/{pi-embedded-helpers-CfXnSIFx.js → pi-embedded-helpers-CUzTc1v6.js} +170 -19
- package/dist/{pi-embedded-helpers-Uan-3N1T.js → pi-embedded-helpers-DfwkwPYD.js} +7 -4
- package/dist/{pi-embedded-helpers-Bri9tk9g.js → pi-embedded-helpers-WDwx99UA.js} +170 -19
- package/dist/{pi-tools.policy-CJFi1sny.js → pi-tools.policy-BpsROZbz.js} +4 -4
- package/dist/{plugin-auto-enable-BY4CqJbD.js → plugin-auto-enable-Bqhc3w5n.js} +5 -5
- package/dist/{plugin-auto-enable-DbQrtQjL.js → plugin-auto-enable-PW76g_PJ.js} +5 -5
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/params.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/types.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/types.d.ts +15 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.tools.d.ts +1 -1
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.types.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.types.d.ts +2 -0
- package/dist/plugin-sdk/agents/session-tool-result-guard-wrapper.d.ts +2 -0
- package/dist/plugin-sdk/agents/session-tool-result-guard.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/agent-step.d.ts +3 -0
- package/dist/plugin-sdk/agents/usage.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-reference.d.ts +1 -1
- package/dist/plugin-sdk/auto-reply/reply/session-run-accounting.d.ts +11 -0
- package/dist/plugin-sdk/auto-reply/reply/session-usage.d.ts +8 -0
- package/dist/plugin-sdk/browser/control-auth.d.ts +13 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/signal.d.ts +1 -0
- package/dist/plugin-sdk/cli/prompt.d.ts +1 -0
- package/dist/plugin-sdk/commands/agent/types.d.ts +2 -0
- package/dist/plugin-sdk/config/sessions/paths.d.ts +7 -2
- package/dist/plugin-sdk/config/types.agents.d.ts +2 -0
- package/dist/plugin-sdk/config/types.discord.d.ts +5 -0
- package/dist/plugin-sdk/config/types.gateway.d.ts +15 -0
- package/dist/plugin-sdk/config/types.hooks.d.ts +15 -0
- package/dist/plugin-sdk/config/zod-schema.agents.d.ts +1 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +11 -0
- package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +9 -0
- package/dist/plugin-sdk/config/zod-schema.providers.d.ts +4 -0
- package/dist/plugin-sdk/discord/monitor/allow-list.d.ts +15 -0
- package/dist/plugin-sdk/discord/send.types.d.ts +3 -0
- package/dist/plugin-sdk/gateway/auth.d.ts +36 -0
- package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +6 -0
- package/dist/plugin-sdk/gateway/session-utils.fs.d.ts +3 -1
- package/dist/plugin-sdk/index.js +295 -99
- package/dist/plugin-sdk/infra/binaries.d.ts +3 -0
- package/dist/plugin-sdk/infra/heartbeat-runner.d.ts +1 -0
- package/dist/plugin-sdk/infra/net/fetch-guard.d.ts +1 -0
- package/dist/plugin-sdk/infra/net/ssrf.d.ts +1 -0
- package/dist/plugin-sdk/infra/tailscale.d.ts +34 -0
- package/dist/plugin-sdk/infra/tmp-openclaw-dir.d.ts +10 -0
- package/dist/plugin-sdk/logging/logger.d.ts +1 -1
- package/dist/plugin-sdk/media/input-files.d.ts +5 -0
- package/dist/plugin-sdk/routing/resolve-route.d.ts +3 -1
- package/dist/plugin-sdk/security/external-content.d.ts +1 -1
- package/dist/plugin-sdk/security/secret-equal.d.ts +1 -0
- package/dist/plugin-sdk/sessions/input-provenance.d.ts +16 -0
- package/dist/plugin-sdk/signal/monitor/event-handler.types.d.ts +8 -0
- package/dist/plugin-sdk/signal/monitor/mentions.d.ts +2 -0
- package/dist/{plugins-3GyCj5KL.js → plugins-4Hqd1WGf.js} +3 -3
- package/dist/{plugins-BL9lIXSA.js → plugins-X7d_tfTE.js} +4 -4
- package/dist/{plugins-cli-Ce7VsvZh.js → plugins-cli-Bgku3EGj.js} +253 -46
- package/dist/{plugins-cli-e9gUebMd.js → plugins-cli-CVToH3if.js} +254 -47
- package/dist/{ports-DupIRXQ0.js → ports-qkt29rdC.js} +2 -2
- package/dist/{program-u22vbFpH.js → program-Cf7lkBur.js} +82 -82
- package/dist/{progress-g9R--HZD.js → progress-C9kngsTD.js} +1 -1
- package/dist/{progress-Da1ehW-x.js → progress-DWqhRakV.js} +1 -1
- package/dist/{prompt-style-Dc0C5HC9.js → prompt-style-BFH5D5LN.js} +1 -1
- package/dist/{prompt-style-lmJDcgtA.js → prompt-style-CIbmaxSa.js} +1 -1
- package/dist/{pw-ai-C43wv1ZF.js → pw-ai-8mdv3h-d.js} +7 -6
- package/dist/{pw-ai-DTZVjndL.js → pw-ai-CM1IsSgZ.js} +5 -5
- package/dist/{pw-ai-zVebjrSG.js → pw-ai-FGoRVblI.js} +3 -3
- package/dist/{pw-ai-CWrnJ98b.js → pw-ai-sS1fRKW_.js} +3 -3
- package/dist/{qmd-manager-NPD5Yh_4.js → qmd-manager-C67Fc8aN.js} +4 -4
- package/dist/{qmd-manager-ozZ933qc.js → qmd-manager-CXVbfg99.js} +7 -7
- package/dist/{qmd-manager-DBCZ1sio.js → qmd-manager-RMRE8Tqt.js} +6 -6
- package/dist/{qmd-manager-a9Bt0405.js → qmd-manager-pyc_MTIe.js} +4 -4
- package/dist/{register.subclis-BpX3ulH1.js → register.subclis-C02e4zuJ.js} +28 -28
- package/dist/{reply-m467_fOC.js → reply-DICXkh_C.js} +911 -568
- package/dist/{routes-82Ywfho6.js → routes-CmOI1hIH.js} +29 -11
- package/dist/{routes-BqxA3ZYr.js → routes-DewK5tq2.js} +29 -12
- package/dist/{rpc-DcGBG-Fp.js → rpc-DHr30euf.js} +3 -3
- package/dist/{rpc-CfdBHlnp.js → rpc-T300F8zI.js} +3 -3
- package/dist/{run-main-aolvSfj3.js → run-main-C5wpthq1.js} +84 -84
- package/dist/{runner-C1G8RFWl.js → runner-CY0nmVme.js} +9 -9
- package/dist/{runner-BCBs8JKA.js → runner-Cfm5nTMc.js} +6 -6
- package/dist/{runner-CInKPsiP.js → runner-D_dujMod.js} +8 -8
- package/dist/{runner-Cwfn-VOM.js → runner-DrGYLH5K.js} +6 -6
- package/dist/{sandbox-B0K9e6Fw.js → sandbox-BKYnhYQH.js} +23 -15
- package/dist/{sandbox-BW8Xnkw1.js → sandbox-Bhjnh1Xg.js} +21 -13
- package/dist/{sandbox-cli-mKCs2J0i.js → sandbox-cli-DBsAjZJN.js} +20 -20
- package/dist/{sandbox-cli-BD5LkZ0B.js → sandbox-cli-rV9LtFeu.js} +19 -19
- package/dist/{security-cli-kgI4soGy.js → security-cli-BIwJM_rs.js} +27 -27
- package/dist/{security-cli-kz8TiyqU.js → security-cli-BRjny8Yu.js} +26 -26
- package/dist/{server-context-fX4xiYRh.js → server-context-BGpGs3qd.js} +7 -7
- package/dist/{server-context-Lb-eUZG_.js → server-context-Cl0U0vE3.js} +5 -5
- package/dist/{server-node-events-Dx18uVrH.js → server-node-events-CBfTbiTA.js} +45 -43
- package/dist/{server-node-events-KqZMN30F.js → server-node-events-QCvh8EgI.js} +45 -43
- package/dist/{service-DZMXgMra.js → service--nPk7DvT.js} +3 -3
- package/dist/{service-DNcIZ5Kp.js → service-99RDXwX4.js} +2 -2
- package/dist/{service-audit-0WLGnoNT.js → service-audit-DnLmRGQt.js} +4 -4
- package/dist/{service-audit-uhZSlxeb.js → service-audit-ckBaRCVC.js} +3 -3
- package/dist/{session-cost-usage-HU4OeRgw.js → session-cost-usage-D7HuoSSD.js} +10 -8
- package/dist/{session-cost-usage-CL8gnHRN.js → session-cost-usage-D9hHANWI.js} +10 -8
- package/dist/{shared-j4Qtr475.js → shared-Bs4vduG4.js} +3 -3
- package/dist/{shared-BBw6F-YC.js → shared-CEY5IkwG.js} +2 -2
- package/dist/{shared-DOZs2SoH.js → shared-DRohONn_.js} +3 -3
- package/dist/{shared-CtP9K-o2.js → shared-ICqOZibV.js} +3 -3
- package/dist/{skill-scanner-C_fQzVDu.js → skill-scanner-rHMtUHtP.js} +1 -1
- package/dist/{skills-BvPUNjxo.js → skills-DRjfSQT3.js} +128 -4
- package/dist/{skills-aFOsriMP.js → skills-DprQj9X2.js} +129 -5
- package/dist/{skills-cli-oWaTJzZd.js → skills-cli-9WO-C55s.js} +12 -12
- package/dist/{skills-cli-E6shXpdd.js → skills-cli-B9eej-EW.js} +13 -13
- package/dist/{skills-status-D4vbIMnz.js → skills-status-5U3P3YfJ.js} +3 -3
- package/dist/{skills-status-DJDaA2Ur.js → skills-status-TDIgVd1K.js} +2 -2
- package/dist/{sqlite-B7FPASCO.js → sqlite-BINzs1U0.js} +2 -2
- package/dist/{sqlite-B4Z1_Ioc.js → sqlite-D4w5TejA.js} +2 -2
- package/dist/{sqlite-BkYnxkQO.js → sqlite-DRRHmlug.js} +2 -2
- package/dist/{sqlite-EuQPVXvn.js → sqlite-F6PGkEm1.js} +2 -2
- package/dist/{status-B2Yr-2J5.js → status-BKGkKC_v.js} +3 -3
- package/dist/{status-DW7m5xUN.js → status-CiHtHdaa.js} +4 -4
- package/dist/{status-CxhnUa5J.js → status-DDWoOpeB.js} +33 -33
- package/dist/{subsystem-Bv7dGhES.js → subsystem-BoExtIHo.js} +32 -13
- package/dist/{system-cli-0JXhJNWm.js → system-cli-B6lr60Io.js} +14 -14
- package/dist/{system-cli-D-0OaMtH.js → system-cli-CprW9G3h.js} +14 -14
- package/dist/{systemd-CNTodvCO.js → systemd-C0VZriGM.js} +2 -2
- package/dist/{systemd-CUJJHgHa.js → systemd-DrmBtJ5T.js} +3 -3
- package/dist/{systemd-hints-cmHtrXUl.js → systemd-hints-DZtXiVHa.js} +1 -1
- package/dist/{systemd-linger-CArPbmvv.js → systemd-linger-NC2kl1SC.js} +2 -2
- package/dist/{systemd-linger-XvT9Y9sb.js → systemd-linger-xdn3BdPh.js} +2 -2
- package/dist/{table-DzBBIqHO.js → table-B8dx3v4v.js} +2 -2
- package/dist/{table-oJQPTUL6.js → table-CwulTLQp.js} +1 -1
- package/dist/{tool-display-Na-EVL83.js → tool-display-CZRIDMRm.js} +1 -1
- package/dist/{tool-display-sHJa3kRs.js → tool-display-ClRud3pg.js} +2 -2
- package/dist/{tui-nGp8ltQK.js → tui-CVTQn-dC.js} +9 -9
- package/dist/{tui-Biw7aqPj.js → tui-Lu8FdrlK.js} +9 -9
- package/dist/{tui-cli-C9FEfG7C.js → tui-cli-BLpTj1X9.js} +25 -25
- package/dist/{tui-cli-Dxnu5JGl.js → tui-cli-BLx5kL2I.js} +25 -25
- package/dist/{tui-formatters-BiNTNGwg.js → tui-formatters-CNySEfJN.js} +5 -5
- package/dist/{tui-formatters-C_baVYUz.js → tui-formatters-DePhZK3J.js} +5 -5
- package/dist/{update-C4rsLj2F.js → update-DHVxMTpQ.js} +3 -3
- package/dist/{update-uwUWrKFu.js → update-DU1geolI.js} +3 -3
- package/dist/{update-cli-cNd_G9E6.js → update-cli-C0hUvJWK.js} +66 -66
- package/dist/{update-cli-CBXp-c4C.js → update-cli-Wb1GB3rL.js} +68 -68
- package/dist/{update-runner-BLsqC24J.js → update-runner--ixK4J3W.js} +10 -10
- package/dist/{update-runner-C_FDpmA3.js → update-runner-7Qa1T9y6.js} +9 -9
- package/dist/{utils-Dk86IbEs.js → utils-BLJAc3ZV.js} +1 -1
- package/dist/{utils-BHPdZE4h.js → utils-Cd9QdCHh.js} +1 -1
- package/dist/{webhooks-cli-BpBKXL7W.js → webhooks-cli-DgcMy7RG.js} +12 -12
- package/dist/{webhooks-cli-wNfhfKqm.js → webhooks-cli-aVzUcJY9.js} +11 -11
- package/dist/{widearea-dns-WVCWJTEb.js → widearea-dns-BaIgNEhY.js} +1 -1
- package/dist/{widearea-dns-BWYPcfby.js → widearea-dns-DzuRdwk5.js} +1 -1
- package/dist/{ws-log-Cafylho7.js → ws-log-CIXbLCka.js} +1 -1
- package/dist/{ws-log-DTUOUVgR.js → ws-log-DcQFZByi.js} +1 -1
- package/dist/{wsl-B-H6Z5wp.js → wsl-BUOkxKJu.js} +2 -2
- package/docs/automation/webhook.md +43 -2
- package/docs/channels/discord.md +29 -1
- package/docs/cli/plugins.md +20 -1
- package/docs/cli/security.md +1 -0
- package/docs/concepts/session-tool.md +1 -0
- package/docs/gateway/configuration-reference.md +11 -0
- package/docs/gateway/configuration.md +3 -0
- package/docs/gateway/openresponses-http-api.md +15 -0
- package/docs/gateway/security/index.md +3 -0
- package/docs/help/faq.md +9 -0
- package/docs/install/installer.md +20 -0
- package/docs/reference/transcript-hygiene.md +18 -0
- package/docs/tools/browser.md +6 -0
- package/extensions/diagnostics-otel/package.json +9 -9
- package/extensions/feishu/package.json +1 -1
- package/extensions/feishu/src/config-schema.ts +6 -0
- package/extensions/feishu/src/reply-dispatcher.test.ts +116 -0
- package/extensions/feishu/src/reply-dispatcher.ts +124 -67
- package/extensions/feishu/src/streaming-card.ts +223 -0
- package/extensions/feishu/src/targets.test.ts +16 -0
- package/extensions/feishu/src/targets.ts +1 -1
- package/extensions/irc/src/client.ts +1 -1
- package/extensions/minimax-portal-auth/index.ts +7 -5
- package/extensions/nostr/package.json +1 -1
- package/package.json +13 -13
- package/dist/auth-BcNHFK-i.js +0 -184
- package/dist/auth-jrfLXze7.js +0 -184
- /package/dist/{archive-DqNr5i8b.js → archive-beaSfAzA.js} +0 -0
- /package/dist/{brew-BIrWdDps.js → brew-BUIxHEkn.js} +0 -0
- /package/dist/{brew-6UyogeLe.js → brew-ROHf0-Xp.js} +0 -0
- /package/dist/{constants-DuoCkWRh.js → constants-BvQ6S8j5.js} +0 -0
- /package/dist/{errors-x4NYs-1P.js → errors-DjZBTJJ3.js} +0 -0
- /package/dist/{helpers-BDvtkJjw.js → helpers-HyeZXsnu.js} +0 -0
- /package/dist/{is-main-CE1eOBYb.js → is-main-BWoXGz7p.js} +0 -0
- /package/dist/{parse-Cjiudy6x.js → parse-Bw0oH-rT.js} +0 -0
- /package/dist/{parse-timeout-DFSPLxpY.js → parse-timeout-D1XX_zN_.js} +0 -0
- /package/dist/{prompts-BOz5176z.js → prompts-Bg96reub.js} +0 -0
- /package/dist/{redact-DuEEf1p1.js → redact-Br9GfacZ.js} +0 -0
- /package/dist/{skill-scanner-CprFkZib.js → skill-scanner-CucvxYhu.js} +0 -0
- /package/dist/{transcript-events-CZ8CG4ht.js → transcript-events-BtNd-j6q.js} +0 -0
|
@@ -1,97 +1,97 @@
|
|
|
1
1
|
import { _ as expandHomePrefix, g as resolveStateDir, i as isNixMode, l as resolveGatewayLockDir, o as resolveConfigPath, r as STATE_DIR, t as CONFIG_PATH, u as resolveGatewayPort } from "./paths-DVBShlw6.js";
|
|
2
|
-
import { B as getLogger, C as getActivePluginRegistry, I as colorize, L as isRich, M as setVerbose, R as theme, V as getResolvedLoggerSettings, a as setConsoleTimestampPrefix, c as defaultRuntime, h as DEFAULT_CHAT_CHANNEL, i as setConsoleSubsystemFilter, n as runtimeForLogger, p as CHANNEL_IDS, t as createSubsystemLogger, z as getChildLogger } from "./subsystem-
|
|
3
|
-
import { C as shortenHomePath, D as truncateUtf16Safe, b as resolveUserPath, c as ensureDir, d as isPlainObject, r as clamp, t as CONFIG_DIR } from "./utils-
|
|
4
|
-
import { G as normalizeUsageDisplay, H as normalizeElevatedLevel, J as supportsXHighThinking, K as normalizeVerboseLevel, R as formatThinkingLevels, U as normalizeReasoningLevel, W as normalizeThinkLevel, z as formatXHighModelHint } from "./pi-embedded-helpers-
|
|
5
|
-
import { $ as inferLegacyName, $n as isTtsEnabled, $t as getSkillsSnapshotVersion, An as runSubagentAnnounceFlow, Ar as DEFAULT_INPUT_FILE_MAX_BYTES, B as consumeGatewaySigusr1RestartAuthorization, Br as extractFileContentFromSource, Bt as getRemoteSkillEligibility, C as readSessionMessages, Dn as isAbortTrigger, Dr as enqueueSystemEvent, E as stripEnvelopeFromMessages, En as formatZonedTimestamp, Er as parseVerboseOverride, F as resetDirectoryCache, Fn as onAgentEvent, Fr as DEFAULT_INPUT_MAX_REDIRECTS, G as formatDoctorNonInteractiveHint, Gn as resolveUserTimezone, Gt as setSkillsRemoteRegistry, H as scheduleGatewaySigusr1Restart, Hn as resolveMemoryBackendConfig, Hr as normalizeMimeList, Ht as recordRemoteNodeInfo, In as registerAgentRunContext, Ir as DEFAULT_INPUT_PDF_MAX_PAGES, It as CONTROL_UI_AVATAR_PREFIX, J as summarizeRestartSentinel, Jn as registerInternalHook, Jt as rejectNodePairing, K as formatRestartSentinelMessage, Kn as clearInternalHooks, Kt as approveNodePairing, L as runWithModelFallback, Lr as DEFAULT_INPUT_PDF_MAX_PIXELS, Lt as buildControlUiAvatarUrl, M as resolveOutboundTarget, Mn as clearAgentRunContext, Mr as DEFAULT_INPUT_FILE_MIMES, N as resolveSessionDeliveryTarget, Nn as emitAgentEvent, Nr as DEFAULT_INPUT_IMAGE_MAX_BYTES, O as ensureOutboundSessionEntry, On as stopSubagentsForRequester, Or as isSystemEventContextChanged, Pn as getAgentRunContext, Pr as DEFAULT_INPUT_IMAGE_MIMES, Q as normalizeCronJobPatch, Qn as getTtsProvider, Qt as verifyNodeToken, Rn as normalizePollInput, Rr as DEFAULT_INPUT_PDF_MIN_TEXT_CHARS, Rt as normalizeControlUiBasePath, S as capArrayByJsonBytes, Sr as lookupContextTokens, T as resolveSessionTranscriptCandidates, Tn as createReplyDispatcher, Tr as applyVerboseOverride, Tt as handleReset, U as setGatewaySigusr1RestartPolicy, Un as resolveAgentIdentity, Ur as resolveAgentTimeoutMs, Ut as refreshRemoteBinsForConnectedNodes, V as isGatewaySigusr1RestartExternallyAllowed, Vn as getMemorySearchManager, Vr as extractImageContentFromSource, Vt as primeRemoteSkillsCache, W as consumeRestartSentinel, Wt as refreshRemoteNodeBins, X as writeRestartSentinel, Xn as OPENAI_TTS_MODELS, Xt as requestNodePairing, Yn as triggerInternalHook, Yt as renamePairedNode, Z as normalizeCronJobCreate, Zn as OPENAI_TTS_VOICES, Zt as updatePairedNodeMetadata, _ as loadCombinedSessionStoreForGateway, _r as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, ar as resolveTtsProviderOrder, b as resolveSessionModelRef, c as clearSessionQueues, cn as createReplyPrefixOptions, cr as textToSpeech, d as waitForEmbeddedPiRunEnd, dn as buildHistoryContextFromEntries, dr as setCommandLaneConcurrency, dt as loadProviderUsageSummary, en as registerSkillsChangeListener, er as isTtsProviderConfigured, et as normalizeOptionalAgentId, fn as resolveHeartbeatVisibility, fr as waitForActiveTasks, g as listSessionsFromStore, gr as isDiagnosticsEnabled, gt as handleSlackHttpRequest, h as listAgentsForGateway, hn as onHeartbeatEvent, hr as stopDiagnosticHeartbeat, i as runCliAgent, in as isExternalHookSession, ir as resolveTtsPrefsPath, it as migrateLegacyCronPayload, jr as DEFAULT_INPUT_FILE_MAX_CHARS, k as resolveOutboundSessionRoute, kn as initSubagentRegistry, l as runEmbeddedPiAgent, ln as normalizeGroupActivation, lr as getActiveTaskCount, lt as getPluginToolMeta, m as resolveAnnounceTargetFromKey, mn as getLastHeartbeatEvent, mr as startDiagnosticHeartbeat, n as getCliSessionId, nn as detectSuspiciousPatterns, nr as resolveTtsAutoMode, nt as normalizePayloadToSystemText, o as normalizeSendPolicy, or as setTtsEnabled, p as createOpenClawTools, pr as CommandLane, qn as createInternalHookEvent, qt as listNodePairing, r as setCliSessionId, rn as getHookType, rr as resolveTtsConfig, rt as normalizeRequiredName, s as resolveSendPolicy, sr as setTtsProvider, st as requestHeartbeatNow, tn as buildSafeExternalPrompt, tr as resolveTtsApiKey, tt as normalizeOptionalText, u as abortEmbeddedPiRun, ut as loadOpenClawPlugins, v as loadSessionEntry, vn as resolveCronStyleNow, w as readSessionPreviewItemsFromTranscript, wn as dispatchInboundMessage, wr as applyModelOverrideToSessionEntry, x as archiveFileOnDisk, xn as getChannelActivity, xr as stripHeartbeatToken, y as resolveGatewaySessionStoreTarget, z as authorizeGatewaySigusr1Restart, zr as DEFAULT_INPUT_TIMEOUT_MS, zt as resolveAssistantAvatarUrl } from "./reply-
|
|
2
|
+
import { B as getLogger, C as getActivePluginRegistry, I as colorize, L as isRich, M as setVerbose, R as theme, V as getResolvedLoggerSettings, a as setConsoleTimestampPrefix, c as defaultRuntime, h as DEFAULT_CHAT_CHANNEL, i as setConsoleSubsystemFilter, n as runtimeForLogger, p as CHANNEL_IDS, t as createSubsystemLogger, z as getChildLogger } from "./subsystem-BoExtIHo.js";
|
|
3
|
+
import { C as shortenHomePath, D as truncateUtf16Safe, b as resolveUserPath, c as ensureDir, d as isPlainObject, r as clamp, t as CONFIG_DIR } from "./utils-Cd9QdCHh.js";
|
|
4
|
+
import { G as normalizeUsageDisplay, H as normalizeElevatedLevel, J as supportsXHighThinking, K as normalizeVerboseLevel, R as formatThinkingLevels, U as normalizeReasoningLevel, W as normalizeThinkLevel, z as formatXHighModelHint } from "./pi-embedded-helpers-CMKLjW6X.js";
|
|
5
|
+
import { $ as inferLegacyName, $n as isTtsEnabled, $t as getSkillsSnapshotVersion, An as runSubagentAnnounceFlow, Ar as DEFAULT_INPUT_FILE_MAX_BYTES, B as consumeGatewaySigusr1RestartAuthorization, Br as extractFileContentFromSource, Bt as getRemoteSkillEligibility, C as readSessionMessages, Dn as isAbortTrigger, Dr as enqueueSystemEvent, E as stripEnvelopeFromMessages, En as formatZonedTimestamp, Er as parseVerboseOverride, F as resetDirectoryCache, Fn as onAgentEvent, Fr as DEFAULT_INPUT_MAX_REDIRECTS, G as formatDoctorNonInteractiveHint, Gn as resolveUserTimezone, Gt as setSkillsRemoteRegistry, H as scheduleGatewaySigusr1Restart, Hn as resolveMemoryBackendConfig, Hr as normalizeMimeList, Ht as recordRemoteNodeInfo, In as registerAgentRunContext, Ir as DEFAULT_INPUT_PDF_MAX_PAGES, It as CONTROL_UI_AVATAR_PREFIX, J as summarizeRestartSentinel, Jn as registerInternalHook, Jt as rejectNodePairing, K as formatRestartSentinelMessage, Kn as clearInternalHooks, Kt as approveNodePairing, L as runWithModelFallback, Lr as DEFAULT_INPUT_PDF_MAX_PIXELS, Lt as buildControlUiAvatarUrl, M as resolveOutboundTarget, Mn as clearAgentRunContext, Mr as DEFAULT_INPUT_FILE_MIMES, N as resolveSessionDeliveryTarget, Nn as emitAgentEvent, Nr as DEFAULT_INPUT_IMAGE_MAX_BYTES, O as ensureOutboundSessionEntry, On as stopSubagentsForRequester, Or as isSystemEventContextChanged, Pn as getAgentRunContext, Pr as DEFAULT_INPUT_IMAGE_MIMES, Q as normalizeCronJobPatch, Qn as getTtsProvider, Qt as verifyNodeToken, Rn as normalizePollInput, Rr as DEFAULT_INPUT_PDF_MIN_TEXT_CHARS, Rt as normalizeControlUiBasePath, S as capArrayByJsonBytes, Sr as lookupContextTokens, T as resolveSessionTranscriptCandidates, Tn as createReplyDispatcher, Tr as applyVerboseOverride, Tt as handleReset, U as setGatewaySigusr1RestartPolicy, Un as resolveAgentIdentity, Ur as resolveAgentTimeoutMs, Ut as refreshRemoteBinsForConnectedNodes, V as isGatewaySigusr1RestartExternallyAllowed, Vn as getMemorySearchManager, Vr as extractImageContentFromSource, Vt as primeRemoteSkillsCache, W as consumeRestartSentinel, Wt as refreshRemoteNodeBins, X as writeRestartSentinel, Xn as OPENAI_TTS_MODELS, Xt as requestNodePairing, Yn as triggerInternalHook, Yt as renamePairedNode, Z as normalizeCronJobCreate, Zn as OPENAI_TTS_VOICES, Zt as updatePairedNodeMetadata, _ as loadCombinedSessionStoreForGateway, _r as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, ar as resolveTtsProviderOrder, b as resolveSessionModelRef, c as clearSessionQueues, cn as createReplyPrefixOptions, cr as textToSpeech, d as waitForEmbeddedPiRunEnd, dn as buildHistoryContextFromEntries, dr as setCommandLaneConcurrency, dt as loadProviderUsageSummary, en as registerSkillsChangeListener, er as isTtsProviderConfigured, et as normalizeOptionalAgentId, fn as resolveHeartbeatVisibility, fr as waitForActiveTasks, g as listSessionsFromStore, gr as isDiagnosticsEnabled, gt as handleSlackHttpRequest, h as listAgentsForGateway, hn as onHeartbeatEvent, hr as stopDiagnosticHeartbeat, i as runCliAgent, in as isExternalHookSession, ir as resolveTtsPrefsPath, it as migrateLegacyCronPayload, jr as DEFAULT_INPUT_FILE_MAX_CHARS, k as resolveOutboundSessionRoute, kn as initSubagentRegistry, l as runEmbeddedPiAgent, ln as normalizeGroupActivation, lr as getActiveTaskCount, lt as getPluginToolMeta, m as resolveAnnounceTargetFromKey, mn as getLastHeartbeatEvent, mr as startDiagnosticHeartbeat, n as getCliSessionId, nn as detectSuspiciousPatterns, nr as resolveTtsAutoMode, nt as normalizePayloadToSystemText, o as normalizeSendPolicy, or as setTtsEnabled, p as createOpenClawTools, pr as CommandLane, qn as createInternalHookEvent, qt as listNodePairing, r as setCliSessionId, rn as getHookType, rr as resolveTtsConfig, rt as normalizeRequiredName, s as resolveSendPolicy, sr as setTtsProvider, st as requestHeartbeatNow, tn as buildSafeExternalPrompt, tr as resolveTtsApiKey, tt as normalizeOptionalText, u as abortEmbeddedPiRun, ut as loadOpenClawPlugins, v as loadSessionEntry, vn as resolveCronStyleNow, w as readSessionPreviewItemsFromTranscript, wn as dispatchInboundMessage, wr as applyModelOverrideToSessionEntry, x as archiveFileOnDisk, xn as getChannelActivity, xr as stripHeartbeatToken, y as resolveGatewaySessionStoreTarget, z as authorizeGatewaySigusr1Restart, zr as DEFAULT_INPUT_TIMEOUT_MS, zt as resolveAssistantAvatarUrl } from "./reply-DICXkh_C.js";
|
|
6
6
|
import { _ as isCronRunSessionKey, d as resolveAgentIdFromSessionKey, i as buildAgentMainSessionKey, l as normalizeAgentId, m as toAgentRequestSessionKey, n as DEFAULT_AGENT_ID, t as DEFAULT_ACCOUNT_ID, u as normalizeMainKey, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BWxPj0z_.js";
|
|
7
|
-
import { a as logDebug, c as logWarn, n as runExec, t as runCommandWithTimeout } from "./exec-
|
|
7
|
+
import { a as logDebug, c as logWarn, n as runExec, t as runCommandWithTimeout } from "./exec-YIosokWE.js";
|
|
8
8
|
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-1VeFrph_.js";
|
|
9
|
-
import { T as resolveWorkspaceTemplateDir, _ as DEFAULT_MEMORY_FILENAME, b as DEFAULT_USER_FILENAME, c as resolveDefaultAgentId, d as DEFAULT_AGENTS_FILENAME, g as DEFAULT_MEMORY_ALT_FILENAME, h as DEFAULT_IDENTITY_FILENAME, i as resolveAgentModelFallbacksOverride, l as resolveSessionAgentId, m as DEFAULT_HEARTBEAT_FILENAME, n as resolveAgentConfig, p as DEFAULT_BOOTSTRAP_FILENAME, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, v as DEFAULT_SOUL_FILENAME, w as resolveDefaultAgentWorkspaceDir, x as ensureAgentWorkspace, y as DEFAULT_TOOLS_FILENAME } from "./agent-scope
|
|
10
|
-
import { Dt as DEFAULT_MODEL, Et as DEFAULT_CONTEXT_TOKENS, Ot as DEFAULT_PROVIDER, St as normalizeSecretInput, a as isCliProvider, d as resolveConfiguredModelRef, f as resolveDefaultModelForAgent, h as resolveThinkingDefault, i as getModelRefStatus, l as resolveAllowedModelRef, p as resolveHooksGmailModel } from "./model-selection-
|
|
9
|
+
import { T as resolveWorkspaceTemplateDir, _ as DEFAULT_MEMORY_FILENAME, b as DEFAULT_USER_FILENAME, c as resolveDefaultAgentId, d as DEFAULT_AGENTS_FILENAME, g as DEFAULT_MEMORY_ALT_FILENAME, h as DEFAULT_IDENTITY_FILENAME, i as resolveAgentModelFallbacksOverride, l as resolveSessionAgentId, m as DEFAULT_HEARTBEAT_FILENAME, n as resolveAgentConfig, p as DEFAULT_BOOTSTRAP_FILENAME, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, v as DEFAULT_SOUL_FILENAME, w as resolveDefaultAgentWorkspaceDir, x as ensureAgentWorkspace, y as DEFAULT_TOOLS_FILENAME } from "./agent-scope-CQCus0rI.js";
|
|
10
|
+
import { Dt as DEFAULT_MODEL, Et as DEFAULT_CONTEXT_TOKENS, Ot as DEFAULT_PROVIDER, St as normalizeSecretInput, a as isCliProvider, d as resolveConfiguredModelRef, f as resolveDefaultModelForAgent, h as resolveThinkingDefault, i as getModelRefStatus, l as resolveAllowedModelRef, p as resolveHooksGmailModel } from "./model-selection-BLuqsGVB.js";
|
|
11
11
|
import "./github-copilot-token-BW-SEg7E.js";
|
|
12
12
|
import { t as formatCliCommand } from "./command-format-ChfKqObn.js";
|
|
13
13
|
import "./boolean-BgXe2hyu.js";
|
|
14
|
-
import { n as logAcceptedEnvOption, t as isTruthyEnvValue } from "./env-
|
|
15
|
-
import { A as resolveAgentMaxConcurrent, E as applyLegacyMigrations, M as VERSION, a as parseConfigJson5, c as writeConfigFile, g as parseDurationMs, i as loadConfig, j as resolveSubagentMaxConcurrent, l as validateConfigObjectWithPlugins, n as migrateLegacyConfig, o as readConfigFileSnapshot, r as createConfigIO, s as resolveConfigSnapshotHash, u as OpenClawSchema } from "./config-
|
|
16
|
-
import { c as isTestDefaultMemorySlotDisabled } from "./manifest-registry-
|
|
17
|
-
import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-
|
|
18
|
-
import { B as snapshotSessionOrigin, F as resolveAgentMainSessionKey, I as resolveExplicitAgentSessionKey, L as resolveMainSessionKey, R as resolveMainSessionKeyFromConfig, S as mergeDeliveryContext, at as normalizeToolName, b as deliveryContextFromSession, d as loadSessionStore, g as updateSessionStore, nt as collectExplicitAllowlist, ot as resolveToolProfilePolicy, rt as expandPolicyWithPluginGroups, st as stripPluginOnlyAllowlist, tt as buildPluginToolGroups, w as normalizeSessionDeliveryFields } from "./sandbox-
|
|
19
|
-
import { f as registerUnhandledRejectionHandler, s as loadModelCatalog } from "./runner-
|
|
20
|
-
import "./image-
|
|
14
|
+
import { n as logAcceptedEnvOption, t as isTruthyEnvValue } from "./env-ONzUVAG2.js";
|
|
15
|
+
import { A as resolveAgentMaxConcurrent, E as applyLegacyMigrations, M as VERSION, a as parseConfigJson5, c as writeConfigFile, g as parseDurationMs, i as loadConfig, j as resolveSubagentMaxConcurrent, l as validateConfigObjectWithPlugins, n as migrateLegacyConfig, o as readConfigFileSnapshot, r as createConfigIO, s as resolveConfigSnapshotHash, u as OpenClawSchema } from "./config-aFQssWKX.js";
|
|
16
|
+
import { c as isTestDefaultMemorySlotDisabled } from "./manifest-registry-CQhdnDBZ.js";
|
|
17
|
+
import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-X7d_tfTE.js";
|
|
18
|
+
import { B as snapshotSessionOrigin, F as resolveAgentMainSessionKey, I as resolveExplicitAgentSessionKey, L as resolveMainSessionKey, R as resolveMainSessionKeyFromConfig, S as mergeDeliveryContext, at as normalizeToolName, b as deliveryContextFromSession, d as loadSessionStore, g as updateSessionStore, nt as collectExplicitAllowlist, ot as resolveToolProfilePolicy, rt as expandPolicyWithPluginGroups, st as stripPluginOnlyAllowlist, tt as buildPluginToolGroups, w as normalizeSessionDeliveryFields } from "./sandbox-Bhjnh1Xg.js";
|
|
19
|
+
import { f as registerUnhandledRejectionHandler, s as loadModelCatalog } from "./runner-D_dujMod.js";
|
|
20
|
+
import "./image-C4Nn2p3e.js";
|
|
21
21
|
import "./pi-model-discovery-EwKVHlZB.js";
|
|
22
|
-
import { d as inspectPortUsage, l as ensurePortAvailable, p as formatPortDiagnostics } from "./chrome-
|
|
23
|
-
import {
|
|
24
|
-
import { c as saveMediaBuffer, l as detectMime } from "./routes-
|
|
22
|
+
import { d as inspectPortUsage, l as ensurePortAvailable, p as formatPortDiagnostics } from "./chrome-Cvr-57lg.js";
|
|
23
|
+
import { i as loadWorkspaceSkillEntries, m as hasBinary, r as buildWorkspaceSkillSnapshot } from "./skills-DprQj9X2.js";
|
|
24
|
+
import { c as saveMediaBuffer, l as detectMime } from "./routes-CmOI1hIH.js";
|
|
25
25
|
import { a as isErrno, n as formatErrorMessage } from "./errors-Bv81hF2P.js";
|
|
26
|
-
import { n as movePathToTrash } from "./server-context-
|
|
26
|
+
import { n as movePathToTrash } from "./server-context-Cl0U0vE3.js";
|
|
27
27
|
import { n as pickPrimaryTailnetIPv6, t as pickPrimaryTailnetIPv4 } from "./tailnet-DATIFSsY.js";
|
|
28
28
|
import { c as resolveGatewayBindHost, i as isTrustedProxyAddress, l as resolveGatewayClientIp, n as isLoopbackAddress, r as isLoopbackHost, t as rawDataToString, u as resolveGatewayListenHosts } from "./ws-CHCQHs0F.js";
|
|
29
|
-
import { f as GATEWAY_CLIENT_CAPS, g as hasGatewayClientCap, h as GATEWAY_CLIENT_NAMES, i as isGatewayMessageChannel, l as normalizeMessageChannel, m as GATEWAY_CLIENT_MODES, n as isDeliverableMessageChannel, p as GATEWAY_CLIENT_IDS, r as isGatewayCliClient, s as isWebchatClient, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-
|
|
29
|
+
import { f as GATEWAY_CLIENT_CAPS, g as hasGatewayClientCap, h as GATEWAY_CLIENT_NAMES, i as isGatewayMessageChannel, l as normalizeMessageChannel, m as GATEWAY_CLIENT_MODES, n as isDeliverableMessageChannel, p as GATEWAY_CLIENT_IDS, r as isGatewayCliClient, s as isWebchatClient, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-BLi2a6Yw.js";
|
|
30
30
|
import "./logging-fywhKCmE.js";
|
|
31
|
-
import "./accounts-
|
|
32
|
-
import {
|
|
31
|
+
import "./accounts-DeqIQjo1.js";
|
|
32
|
+
import { n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionTranscriptPath, s as resolveStorePath } from "./paths-B49s6UZQ.js";
|
|
33
33
|
import "./redact-BRsnXqwD.js";
|
|
34
|
-
import "./tool-display-
|
|
35
|
-
import "./fetch-
|
|
36
|
-
import { o as normalizeReplyPayloadsForDelivery, t as deliverOutboundPayloads } from "./deliver-
|
|
37
|
-
import { i as getMachineDisplayName, t as createBrowserRouteDispatcher } from "./dispatcher-
|
|
38
|
-
import "./manager-
|
|
39
|
-
import "./sqlite-
|
|
40
|
-
import "./tui-formatters-
|
|
41
|
-
import { $ as validateNodePairRequestParams, A as validateCronStatusParams, At as parseSessionLabel, B as validateExecApprovalsNodeGetParams, C as validateConfigSetParams, Ct as validateWizardNextParams, D as validateCronRemoveParams, Dt as ErrorCodes, E as validateCronListParams, Et as PROTOCOL_VERSION, F as validateDeviceTokenRevokeParams,
|
|
42
|
-
import { n as callGateway, o as loadGatewayTlsRuntime$1 } from "./call-
|
|
43
|
-
import "./login-qr-
|
|
44
|
-
import "./pairing-store-
|
|
45
|
-
import { t as formatDocsLink } from "./links-
|
|
34
|
+
import "./tool-display-CZRIDMRm.js";
|
|
35
|
+
import "./fetch-DmiOpALK.js";
|
|
36
|
+
import { G as getGlobalHookRunner, o as normalizeReplyPayloadsForDelivery, t as deliverOutboundPayloads } from "./deliver-LsxKETro.js";
|
|
37
|
+
import { i as getMachineDisplayName, t as createBrowserRouteDispatcher } from "./dispatcher-DY51b-Zc.js";
|
|
38
|
+
import "./manager-DkqF1GiK.js";
|
|
39
|
+
import "./sqlite-D4w5TejA.js";
|
|
40
|
+
import "./tui-formatters-CNySEfJN.js";
|
|
41
|
+
import { $ as validateNodePairRequestParams, A as validateCronStatusParams, At as parseSessionLabel, B as validateExecApprovalsNodeGetParams, C as validateConfigSetParams, Ct as validateWizardNextParams, D as validateCronRemoveParams, Dt as ErrorCodes, E as validateCronListParams, Et as PROTOCOL_VERSION, F as validateDeviceTokenRevokeParams, G as validateNodeDescribeParams, H as validateExecApprovalsSetParams, I as validateDeviceTokenRotateParams, It as deriveDeviceIdFromPublicKey, J as validateNodeInvokeResultParams, K as validateNodeEventParams, L as validateExecApprovalRequestParams, M as validateDevicePairApproveParams, N as validateDevicePairListParams, Nt as normalizeInputProvenance, O as validateCronRunParams, Ot as errorShape, P as validateDevicePairRejectParams, Pt as buildDeviceAuthPayload, Q as validateNodePairRejectParams, R as validateExecApprovalResolveParams, Rt as normalizeDevicePublicKeyBase64Url, S as validateConfigSchemaParams, St as validateWizardCancelParams, T as validateCronAddParams, Tt as validateWizardStatusParams, U as validateLogsTailParams, V as validateExecApprovalsNodeSetParams, W as validateModelsListParams, X as validateNodePairApproveParams, Y as validateNodeListParams, Z as validateNodePairListParams, _ as validateChatInjectParams, _t as validateTalkModeParams, a as validateAgentWaitParams, at as validateSessionsCompactParams, b as validateConfigGetParams, bt as validateWebLoginStartParams, c as validateAgentsFilesGetParams, ct as validateSessionsPatchParams, d as validateAgentsListParams, dt as validateSessionsResolveParams, et as validateNodePairVerifyParams, f as validateAgentsUpdateParams, ft as validateSessionsUsageParams, g as validateChatHistoryParams, gt as validateSkillsUpdateParams, h as validateChatAbortParams, ht as validateSkillsStatusParams, i as validateAgentParams, it as validateSendParams, j as validateCronUpdateParams, k as validateCronRunsParams, l as validateAgentsFilesListParams, lt as validateSessionsPreviewParams, m as validateChannelsStatusParams, mt as validateSkillsInstallParams, n as formatValidationErrors, nt as validatePollParams, o as validateAgentsCreateParams, ot as validateSessionsDeleteParams, p as validateChannelsLogoutParams, pt as validateSkillsBinsParams, q as validateNodeInvokeParams, r as validateAgentIdentityParams, rt as validateRequestFrame, s as validateAgentsDeleteParams, st as validateSessionsListParams, tt as validateNodeRenameParams, u as validateAgentsFilesSetParams, ut as validateSessionsResetParams, v as validateChatSendParams, vt as validateUpdateRunParams, w as validateConnectParams, wt as validateWizardStartParams, x as validateConfigPatchParams, xt as validateWebLoginWaitParams, y as validateConfigApplyParams, yt as validateWakeParams, z as validateExecApprovalsGetParams, zt as verifyDeviceSignature } from "./client-BrYfyoDK.js";
|
|
42
|
+
import { n as callGateway, o as loadGatewayTlsRuntime$1 } from "./call-SolyGS1r.js";
|
|
43
|
+
import "./login-qr-B6ZgAuIf.js";
|
|
44
|
+
import "./pairing-store-CmlRVqOz.js";
|
|
45
|
+
import { t as formatDocsLink } from "./links-Eax1UO3w.js";
|
|
46
46
|
import { n as runCommandWithRuntime } from "./cli-utils-CRhVAaLV.js";
|
|
47
|
-
import { n as withProgress } from "./progress-
|
|
48
|
-
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, r as resolveEffectiveToolPolicy, t as filterToolsByPolicy } from "./pi-tools.policy-
|
|
49
|
-
import "./prompt-style-
|
|
50
|
-
import "./pairing-labels-
|
|
51
|
-
import { i as loadSessionUsageTimeSeries, l as deriveSessionTotalTokens, n as loadCostUsageSummary, r as loadSessionCostSummary, t as discoverAllSessions, u as hasNonzeroUsage } from "./session-cost-usage-
|
|
47
|
+
import { n as withProgress } from "./progress-C9kngsTD.js";
|
|
48
|
+
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, r as resolveEffectiveToolPolicy, t as filterToolsByPolicy } from "./pi-tools.policy-BpsROZbz.js";
|
|
49
|
+
import "./prompt-style-CIbmaxSa.js";
|
|
50
|
+
import "./pairing-labels-B6CN0SNH.js";
|
|
51
|
+
import { i as loadSessionUsageTimeSeries, l as deriveSessionTotalTokens, n as loadCostUsageSummary, r as loadSessionCostSummary, t as discoverAllSessions, u as hasNonzeroUsage } from "./session-cost-usage-D7HuoSSD.js";
|
|
52
52
|
import { n as formatTokenCount, r as formatUsd } from "./usage-format-CpORtVCG.js";
|
|
53
53
|
import { c as normalizeExecApprovals, g as saveExecApprovals, l as readExecApprovalsSnapshot, m as resolveExecApprovalsSocketPath, r as ensureExecApprovals } from "./exec-approvals-Cb4ZLukq.js";
|
|
54
|
-
import { n as
|
|
55
|
-
import
|
|
56
|
-
import { n as
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import { t as
|
|
60
|
-
import "./
|
|
61
|
-
import
|
|
62
|
-
import { t as
|
|
63
|
-
import "./
|
|
64
|
-
import "./
|
|
65
|
-
import
|
|
66
|
-
import {
|
|
67
|
-
import "./
|
|
68
|
-
import "./
|
|
69
|
-
import
|
|
70
|
-
import "./
|
|
71
|
-
import "./
|
|
72
|
-
import "./
|
|
73
|
-
import
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import { i as probeGateway } from "./audit-
|
|
77
|
-
import "./table-
|
|
78
|
-
import { t as buildWorkspaceSkillStatus } from "./skills-status-
|
|
79
|
-
import "./service
|
|
80
|
-
import "./systemd-
|
|
81
|
-
import "./service-audit-
|
|
82
|
-
import "./node-service-
|
|
83
|
-
import "./channels-status-issues-
|
|
84
|
-
import "./completion-cli-
|
|
85
|
-
import { a as createOutboundSendDeps$1, i as resolveAgentOutboundTarget, r as resolveAgentDeliveryPlan, t as agentCommand } from "./agent-
|
|
86
|
-
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-
|
|
87
|
-
import { i as shouldIncludeHook, n as loadWorkspaceHookEntries, r as resolveHookConfig } from "./hooks-status
|
|
88
|
-
import "./tui-
|
|
54
|
+
import { a as safeEqualSecret, c as enableTailscaleFunnel, d as getTailnetHostname, i as resolveGatewayAuth, l as enableTailscaleServe, n as authorizeGatewayConnect, o as disableTailscaleFunnel, r as isLocalDirectRequest, s as disableTailscaleServe, t as assertGatewayAuthConfigured } from "./auth-CQNl_IaI.js";
|
|
55
|
+
import "./control-auth-DBCu3qyv.js";
|
|
56
|
+
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-B5KnPqGP.js";
|
|
57
|
+
import { t as parseAbsoluteTimeMs } from "./parse-Bw0oH-rT.js";
|
|
58
|
+
import { n as resolveMessageChannelSelection } from "./channel-selection-MZAHm4U8.js";
|
|
59
|
+
import { n as createOutboundSendDeps, t as createDefaultDeps } from "./deps-lAAA2zYI.js";
|
|
60
|
+
import { t as ensureOpenClawCliOnPath } from "./path-env-CaYUVIML.js";
|
|
61
|
+
import "./daemon-runtime-Bsjeut6m.js";
|
|
62
|
+
import { c as loadAgentIdentity, d as loadAgentIdentityFromWorkspace, i as applyAgentConfig, l as pruneAgentConfig, o as findAgentEntryIndex, p as forceFreePortAndWait, r as getStatusSummary, s as listAgentEntries, t as runOnboardingWizard } from "./onboarding-CN-EDLjd.js";
|
|
63
|
+
import { t as resolveChannelDefaultAccountId } from "./helpers-HyeZXsnu.js";
|
|
64
|
+
import "./logging-BAyPwvdH.js";
|
|
65
|
+
import "./note-BhRSeNeu.js";
|
|
66
|
+
import { t as WizardCancelledError } from "./prompts-Bg96reub.js";
|
|
67
|
+
import { i as discoverGatewayBeacons, n as installSkill } from "./onboard-skills-rlBHcu3Q.js";
|
|
68
|
+
import "./github-copilot-auth-D7ewvpMd.js";
|
|
69
|
+
import "./onboard-channels-Dxzroasd.js";
|
|
70
|
+
import { r as buildChannelUiCatalog, t as applyPluginAutoEnable } from "./plugin-auto-enable-PW76g_PJ.js";
|
|
71
|
+
import "./archive-beaSfAzA.js";
|
|
72
|
+
import "./skill-scanner-CucvxYhu.js";
|
|
73
|
+
import "./installs-DscWb9b9.js";
|
|
74
|
+
import { a as resolveControlUiRootOverrideSync, c as getHealthSnapshot, d as runHeartbeatOnce, f as setHeartbeatsEnabled, n as ensureControlUiAssetsBuilt, o as resolveControlUiRootSync, p as startHeartbeatRunner, s as formatHealthChannelLines } from "./health-format-KGPokKJH.js";
|
|
75
|
+
import { S as normalizeUpdateChannel, _ as resolveNpmChannelTag, h as compareSemverStrings, m as checkUpdateStatus, t as runGatewayUpdate, y as DEFAULT_PACKAGE_CHANNEL } from "./update-runner-7Qa1T9y6.js";
|
|
76
|
+
import { i as probeGateway } from "./audit-Dmww_503.js";
|
|
77
|
+
import "./table-B8dx3v4v.js";
|
|
78
|
+
import { t as buildWorkspaceSkillStatus } from "./skills-status-5U3P3YfJ.js";
|
|
79
|
+
import "./service--nPk7DvT.js";
|
|
80
|
+
import "./systemd-DrmBtJ5T.js";
|
|
81
|
+
import "./service-audit-DnLmRGQt.js";
|
|
82
|
+
import "./node-service-C8DTHTMg.js";
|
|
83
|
+
import "./channels-status-issues-DDAWeT-6.js";
|
|
84
|
+
import "./completion-cli-DnjpxAag.js";
|
|
85
|
+
import { a as createOutboundSendDeps$1, i as resolveAgentOutboundTarget, r as resolveAgentDeliveryPlan, t as agentCommand } from "./agent-BvNJF5QL.js";
|
|
86
|
+
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-DzuRdwk5.js";
|
|
87
|
+
import { i as shouldIncludeHook, n as loadWorkspaceHookEntries, r as resolveHookConfig } from "./hooks-status-D9MhwHRp.js";
|
|
88
|
+
import "./tui-CVTQn-dC.js";
|
|
89
89
|
import { t as buildChannelAccountSnapshot } from "./status-BRZfQbJ2.js";
|
|
90
|
-
import "./shared-
|
|
91
|
-
import { a as runDaemonStop, i as runDaemonStart, n as runDaemonStatus, o as runDaemonUninstall, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-
|
|
92
|
-
import { a as toOptionString, i as parsePort$1, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-
|
|
93
|
-
import { i as setGatewayWsLogStyle, n as logWs, r as summarizeAgentEventForWsLog, t as formatForLog } from "./ws-log-
|
|
94
|
-
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-
|
|
90
|
+
import "./shared-DRohONn_.js";
|
|
91
|
+
import { a as runDaemonStop, i as runDaemonStart, n as runDaemonStatus, o as runDaemonUninstall, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-BDkU2ocb.js";
|
|
92
|
+
import { a as toOptionString, i as parsePort$1, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-Bs4vduG4.js";
|
|
93
|
+
import { i as setGatewayWsLogStyle, n as logWs, r as summarizeAgentEventForWsLog, t as formatForLog } from "./ws-log-DcQFZByi.js";
|
|
94
|
+
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-Cfns8TQx.js";
|
|
95
95
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
96
96
|
import * as fsSync from "node:fs";
|
|
97
97
|
import fs, { constants } from "node:fs";
|
|
@@ -2554,6 +2554,8 @@ function resolveCronSession(params) {
|
|
|
2554
2554
|
thinkingLevel: entry?.thinkingLevel,
|
|
2555
2555
|
verboseLevel: entry?.verboseLevel,
|
|
2556
2556
|
model: entry?.model,
|
|
2557
|
+
modelOverride: entry?.modelOverride,
|
|
2558
|
+
providerOverride: entry?.providerOverride,
|
|
2557
2559
|
contextTokens: entry?.contextTokens,
|
|
2558
2560
|
sendPolicy: entry?.sendPolicy,
|
|
2559
2561
|
lastChannel: entry?.lastChannel,
|
|
@@ -2620,6 +2622,7 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2620
2622
|
return catalog;
|
|
2621
2623
|
};
|
|
2622
2624
|
const isGmailHook = baseSessionKey.startsWith("hook:gmail:");
|
|
2625
|
+
let hooksGmailModelApplied = false;
|
|
2623
2626
|
const hooksGmailModelRef = isGmailHook ? resolveHooksGmailModel({
|
|
2624
2627
|
cfg: params.cfg,
|
|
2625
2628
|
defaultProvider: DEFAULT_PROVIDER
|
|
@@ -2634,6 +2637,7 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2634
2637
|
}).allowed) {
|
|
2635
2638
|
provider = hooksGmailModelRef.provider;
|
|
2636
2639
|
model = hooksGmailModelRef.model;
|
|
2640
|
+
hooksGmailModelApplied = true;
|
|
2637
2641
|
}
|
|
2638
2642
|
}
|
|
2639
2643
|
const modelOverrideRaw = params.job.payload.kind === "agentTurn" ? params.job.payload.model : void 0;
|
|
@@ -2679,6 +2683,23 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2679
2683
|
const labelSuffix = typeof params.job.name === "string" && params.job.name.trim() ? params.job.name.trim() : params.job.id;
|
|
2680
2684
|
cronSession.sessionEntry.label = `Cron: ${labelSuffix}`;
|
|
2681
2685
|
}
|
|
2686
|
+
if (!modelOverride && !hooksGmailModelApplied) {
|
|
2687
|
+
const sessionModelOverride = cronSession.sessionEntry.modelOverride?.trim();
|
|
2688
|
+
if (sessionModelOverride) {
|
|
2689
|
+
const sessionProviderOverride = cronSession.sessionEntry.providerOverride?.trim() || resolvedDefault.provider;
|
|
2690
|
+
const resolvedSessionOverride = resolveAllowedModelRef({
|
|
2691
|
+
cfg: cfgWithAgentDefaults,
|
|
2692
|
+
catalog: await loadCatalog(),
|
|
2693
|
+
raw: `${sessionProviderOverride}/${sessionModelOverride}`,
|
|
2694
|
+
defaultProvider: resolvedDefault.provider,
|
|
2695
|
+
defaultModel: resolvedDefault.model
|
|
2696
|
+
});
|
|
2697
|
+
if (!("error" in resolvedSessionOverride)) {
|
|
2698
|
+
provider = resolvedSessionOverride.ref.provider;
|
|
2699
|
+
model = resolvedSessionOverride.ref.model;
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
}
|
|
2682
2703
|
const hooksGmailThinking = isGmailHook ? normalizeThinkLevel(params.cfg.hooks?.gmail?.thinking) : void 0;
|
|
2683
2704
|
const thinkOverride = normalizeThinkLevel(agentCfg?.thinkingDefault);
|
|
2684
2705
|
let thinkLevel = normalizeThinkLevel((params.job.payload.kind === "agentTurn" ? params.job.payload.thinking : void 0) ?? void 0) ?? hooksGmailThinking ?? thinkOverride;
|
|
@@ -2816,6 +2837,7 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2816
2837
|
const payloads = runResult.payloads ?? [];
|
|
2817
2838
|
{
|
|
2818
2839
|
const usage = runResult.meta.agentMeta?.usage;
|
|
2840
|
+
const promptTokens = runResult.meta.agentMeta?.promptTokens;
|
|
2819
2841
|
const modelUsed = runResult.meta.agentMeta?.model ?? fallbackModel ?? model;
|
|
2820
2842
|
const providerUsed = runResult.meta.agentMeta?.provider ?? fallbackProvider ?? provider;
|
|
2821
2843
|
const contextTokens = agentCfg?.contextTokens ?? lookupContextTokens(modelUsed) ?? DEFAULT_CONTEXT_TOKENS;
|
|
@@ -2833,7 +2855,8 @@ async function runCronIsolatedAgentTurn(params) {
|
|
|
2833
2855
|
cronSession.sessionEntry.outputTokens = output;
|
|
2834
2856
|
cronSession.sessionEntry.totalTokens = deriveSessionTotalTokens({
|
|
2835
2857
|
usage,
|
|
2836
|
-
contextTokens
|
|
2858
|
+
contextTokens,
|
|
2859
|
+
promptTokens
|
|
2837
2860
|
}) ?? input;
|
|
2838
2861
|
}
|
|
2839
2862
|
await persistSessionEntry();
|
|
@@ -5716,6 +5739,7 @@ const agentHandlers = {
|
|
|
5716
5739
|
let resolvedGroupChannel = groupChannelRaw || void 0;
|
|
5717
5740
|
let resolvedGroupSpace = groupSpaceRaw || void 0;
|
|
5718
5741
|
let spawnedByValue = typeof request.spawnedBy === "string" ? request.spawnedBy.trim() : void 0;
|
|
5742
|
+
const inputProvenance = normalizeInputProvenance(request.inputProvenance);
|
|
5719
5743
|
const cached = context.dedupe.get(`agent:${idem}`);
|
|
5720
5744
|
if (cached) {
|
|
5721
5745
|
respond(cached.ok, cached.payload, cached.error, { cached: true });
|
|
@@ -5922,7 +5946,8 @@ const agentHandlers = {
|
|
|
5922
5946
|
messageChannel: resolvedChannel,
|
|
5923
5947
|
runId,
|
|
5924
5948
|
lane: request.lane,
|
|
5925
|
-
extraSystemPrompt: request.extraSystemPrompt
|
|
5949
|
+
extraSystemPrompt: request.extraSystemPrompt,
|
|
5950
|
+
inputProvenance
|
|
5926
5951
|
}, defaultRuntime, context.deps).then((result) => {
|
|
5927
5952
|
const payload = {
|
|
5928
5953
|
runId,
|
|
@@ -6843,9 +6868,13 @@ const channelsHandlers = {
|
|
|
6843
6868
|
//#region src/gateway/server-methods/chat.ts
|
|
6844
6869
|
function resolveTranscriptPath(params) {
|
|
6845
6870
|
const { sessionId, storePath, sessionFile } = params;
|
|
6846
|
-
if (sessionFile) return
|
|
6847
|
-
|
|
6848
|
-
|
|
6871
|
+
if (!storePath && !sessionFile) return null;
|
|
6872
|
+
try {
|
|
6873
|
+
const sessionsDir = storePath ? path.dirname(storePath) : void 0;
|
|
6874
|
+
return resolveSessionFilePath(sessionId, sessionFile ? { sessionFile } : void 0, sessionsDir ? { sessionsDir } : void 0);
|
|
6875
|
+
} catch {
|
|
6876
|
+
return null;
|
|
6877
|
+
}
|
|
6849
6878
|
}
|
|
6850
6879
|
function ensureTranscriptFile(params) {
|
|
6851
6880
|
if (fs.existsSync(params.transcriptPath)) return { ok: true };
|
|
@@ -9041,7 +9070,7 @@ async function verifyDeviceToken(params) {
|
|
|
9041
9070
|
ok: false,
|
|
9042
9071
|
reason: "token-revoked"
|
|
9043
9072
|
};
|
|
9044
|
-
if (
|
|
9073
|
+
if (!safeEqualSecret(params.token, entry.token)) return {
|
|
9045
9074
|
ok: false,
|
|
9046
9075
|
reason: "token-mismatch"
|
|
9047
9076
|
};
|
|
@@ -9893,7 +9922,7 @@ const nodeHandlers = {
|
|
|
9893
9922
|
const p = params;
|
|
9894
9923
|
const payloadJSON = typeof p.payloadJSON === "string" ? p.payloadJSON : p.payload !== void 0 ? JSON.stringify(p.payload) : null;
|
|
9895
9924
|
await respondUnavailableOnThrow(respond, async () => {
|
|
9896
|
-
const { handleNodeEvent } = await import("./server-node-events-
|
|
9925
|
+
const { handleNodeEvent } = await import("./server-node-events-CBfTbiTA.js");
|
|
9897
9926
|
const nodeId = client?.connect?.device?.id ?? client?.connect?.client?.id ?? "node";
|
|
9898
9927
|
await handleNodeEvent({
|
|
9899
9928
|
deps: context.deps,
|
|
@@ -11398,7 +11427,7 @@ const usageHandlers = {
|
|
|
11398
11427
|
const limit = typeof p.limit === "number" && Number.isFinite(p.limit) ? p.limit : 50;
|
|
11399
11428
|
const includeContextWeight = p.includeContextWeight ?? false;
|
|
11400
11429
|
const specificKey = typeof p.key === "string" ? p.key.trim() : null;
|
|
11401
|
-
const { store } = loadCombinedSessionStoreForGateway(config);
|
|
11430
|
+
const { storePath, store } = loadCombinedSessionStoreForGateway(config);
|
|
11402
11431
|
const now = Date.now();
|
|
11403
11432
|
const mergedEntries = [];
|
|
11404
11433
|
if (specificKey) {
|
|
@@ -11418,7 +11447,13 @@ const usageHandlers = {
|
|
|
11418
11447
|
const resolvedStoreKey = storeMatch?.key ?? storeByIdMatch?.key ?? specificKey;
|
|
11419
11448
|
const storeEntry = storeMatch?.entry ?? storeByIdMatch?.entry;
|
|
11420
11449
|
const sessionId = storeEntry?.sessionId ?? keyRest;
|
|
11421
|
-
|
|
11450
|
+
let sessionFile;
|
|
11451
|
+
try {
|
|
11452
|
+
sessionFile = resolveSessionFilePath(sessionId, storeEntry, storePath && storePath !== "(multiple)" ? { sessionsDir: path.dirname(storePath) } : { agentId: agentIdFromKey });
|
|
11453
|
+
} catch {
|
|
11454
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `Invalid session reference: ${specificKey}`));
|
|
11455
|
+
return;
|
|
11456
|
+
}
|
|
11422
11457
|
try {
|
|
11423
11458
|
const stats = fs.statSync(sessionFile);
|
|
11424
11459
|
if (stats.isFile()) mergedEntries.push({
|
|
@@ -11744,14 +11779,22 @@ const usageHandlers = {
|
|
|
11744
11779
|
return;
|
|
11745
11780
|
}
|
|
11746
11781
|
const config = loadConfig();
|
|
11747
|
-
const { entry } = loadSessionEntry(key);
|
|
11782
|
+
const { entry, storePath } = loadSessionEntry(key);
|
|
11748
11783
|
const parsed = parseAgentSessionKey(key);
|
|
11749
11784
|
const agentId = parsed?.agentId;
|
|
11750
11785
|
const rawSessionId = parsed?.rest ?? key;
|
|
11786
|
+
const sessionId = entry?.sessionId ?? rawSessionId;
|
|
11787
|
+
let sessionFile;
|
|
11788
|
+
try {
|
|
11789
|
+
sessionFile = resolveSessionFilePath(sessionId, entry, storePath ? { sessionsDir: path.dirname(storePath) } : { agentId });
|
|
11790
|
+
} catch {
|
|
11791
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `Invalid session key: ${key}`));
|
|
11792
|
+
return;
|
|
11793
|
+
}
|
|
11751
11794
|
const timeseries = await loadSessionUsageTimeSeries({
|
|
11752
|
-
sessionId
|
|
11795
|
+
sessionId,
|
|
11753
11796
|
sessionEntry: entry,
|
|
11754
|
-
sessionFile
|
|
11797
|
+
sessionFile,
|
|
11755
11798
|
config,
|
|
11756
11799
|
maxPoints: 200
|
|
11757
11800
|
});
|
|
@@ -11769,13 +11812,19 @@ const usageHandlers = {
|
|
|
11769
11812
|
}
|
|
11770
11813
|
const limit = typeof params?.limit === "number" && Number.isFinite(params.limit) ? Math.min(params.limit, 1e3) : 200;
|
|
11771
11814
|
const config = loadConfig();
|
|
11772
|
-
const { entry } = loadSessionEntry(key);
|
|
11815
|
+
const { entry, storePath } = loadSessionEntry(key);
|
|
11773
11816
|
const parsed = parseAgentSessionKey(key);
|
|
11774
11817
|
const agentId = parsed?.agentId;
|
|
11775
11818
|
const rawSessionId = parsed?.rest ?? key;
|
|
11776
11819
|
const sessionId = entry?.sessionId ?? rawSessionId;
|
|
11777
|
-
|
|
11778
|
-
|
|
11820
|
+
let sessionFile;
|
|
11821
|
+
try {
|
|
11822
|
+
sessionFile = resolveSessionFilePath(sessionId, entry, storePath ? { sessionsDir: path.dirname(storePath) } : { agentId });
|
|
11823
|
+
} catch {
|
|
11824
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `Invalid session key: ${key}`));
|
|
11825
|
+
return;
|
|
11826
|
+
}
|
|
11827
|
+
const { loadSessionLogs } = await import("./session-cost-usage-D7HuoSSD.js").then((n) => n.a);
|
|
11779
11828
|
respond(true, { logs: await loadSessionLogs({
|
|
11780
11829
|
sessionId,
|
|
11781
11830
|
sessionEntry: entry,
|
|
@@ -12781,6 +12830,12 @@ function resolveHooksConfig(cfg) {
|
|
|
12781
12830
|
const maxBodyBytes = cfg.hooks?.maxBodyBytes && cfg.hooks.maxBodyBytes > 0 ? cfg.hooks.maxBodyBytes : DEFAULT_HOOKS_MAX_BODY_BYTES;
|
|
12782
12831
|
const mappings = resolveHookMappings(cfg.hooks);
|
|
12783
12832
|
const defaultAgentId = resolveDefaultAgentId(cfg);
|
|
12833
|
+
const knownAgentIds = resolveKnownAgentIds(cfg, defaultAgentId);
|
|
12834
|
+
const allowedAgentIds = resolveAllowedAgentIds(cfg.hooks?.allowedAgentIds);
|
|
12835
|
+
const defaultSessionKey = resolveSessionKey$1(cfg.hooks?.defaultSessionKey);
|
|
12836
|
+
const allowedSessionKeyPrefixes = resolveAllowedSessionKeyPrefixes(cfg.hooks?.allowedSessionKeyPrefixes);
|
|
12837
|
+
if (defaultSessionKey && allowedSessionKeyPrefixes && !isSessionKeyAllowedByPrefix(defaultSessionKey, allowedSessionKeyPrefixes)) throw new Error("hooks.defaultSessionKey must match hooks.allowedSessionKeyPrefixes");
|
|
12838
|
+
if (!defaultSessionKey && allowedSessionKeyPrefixes && !isSessionKeyAllowedByPrefix("hook:example", allowedSessionKeyPrefixes)) throw new Error("hooks.allowedSessionKeyPrefixes must include 'hook:' when hooks.defaultSessionKey is unset");
|
|
12784
12839
|
return {
|
|
12785
12840
|
basePath: trimmed,
|
|
12786
12841
|
token,
|
|
@@ -12788,8 +12843,13 @@ function resolveHooksConfig(cfg) {
|
|
|
12788
12843
|
mappings,
|
|
12789
12844
|
agentPolicy: {
|
|
12790
12845
|
defaultAgentId,
|
|
12791
|
-
knownAgentIds
|
|
12792
|
-
allowedAgentIds
|
|
12846
|
+
knownAgentIds,
|
|
12847
|
+
allowedAgentIds
|
|
12848
|
+
},
|
|
12849
|
+
sessionPolicy: {
|
|
12850
|
+
defaultSessionKey,
|
|
12851
|
+
allowRequestSessionKey: cfg.hooks?.allowRequestSessionKey === true,
|
|
12852
|
+
allowedSessionKeyPrefixes
|
|
12793
12853
|
}
|
|
12794
12854
|
};
|
|
12795
12855
|
}
|
|
@@ -12814,6 +12874,29 @@ function resolveAllowedAgentIds(raw) {
|
|
|
12814
12874
|
if (hasWildcard) return;
|
|
12815
12875
|
return allowed;
|
|
12816
12876
|
}
|
|
12877
|
+
function resolveSessionKey$1(raw) {
|
|
12878
|
+
const value = raw?.trim();
|
|
12879
|
+
return value ? value : void 0;
|
|
12880
|
+
}
|
|
12881
|
+
function normalizeSessionKeyPrefix(raw) {
|
|
12882
|
+
const value = raw.trim().toLowerCase();
|
|
12883
|
+
return value ? value : void 0;
|
|
12884
|
+
}
|
|
12885
|
+
function resolveAllowedSessionKeyPrefixes(raw) {
|
|
12886
|
+
if (!Array.isArray(raw)) return;
|
|
12887
|
+
const set = /* @__PURE__ */ new Set();
|
|
12888
|
+
for (const prefix of raw) {
|
|
12889
|
+
const normalized = normalizeSessionKeyPrefix(prefix);
|
|
12890
|
+
if (!normalized) continue;
|
|
12891
|
+
set.add(normalized);
|
|
12892
|
+
}
|
|
12893
|
+
return set.size > 0 ? Array.from(set) : void 0;
|
|
12894
|
+
}
|
|
12895
|
+
function isSessionKeyAllowedByPrefix(sessionKey, prefixes) {
|
|
12896
|
+
const normalized = sessionKey.trim().toLowerCase();
|
|
12897
|
+
if (!normalized) return false;
|
|
12898
|
+
return prefixes.some((prefix) => normalized.startsWith(prefix));
|
|
12899
|
+
}
|
|
12817
12900
|
function extractHookToken(req) {
|
|
12818
12901
|
const auth = typeof req.headers.authorization === "string" ? req.headers.authorization.trim() : "";
|
|
12819
12902
|
if (auth.toLowerCase().startsWith("bearer ")) {
|
|
@@ -12924,7 +13007,42 @@ function isHookAgentAllowed(hooksConfig, agentId) {
|
|
|
12924
13007
|
return resolved ? allowed.has(resolved) : false;
|
|
12925
13008
|
}
|
|
12926
13009
|
const getHookAgentPolicyError = () => "agentId is not allowed by hooks.allowedAgentIds";
|
|
12927
|
-
|
|
13010
|
+
const getHookSessionKeyRequestPolicyError = () => "sessionKey is disabled for external /hooks/agent payloads; set hooks.allowRequestSessionKey=true to enable";
|
|
13011
|
+
const getHookSessionKeyPrefixError = (prefixes) => `sessionKey must start with one of: ${prefixes.join(", ")}`;
|
|
13012
|
+
function resolveHookSessionKey(params) {
|
|
13013
|
+
const requested = resolveSessionKey$1(params.sessionKey);
|
|
13014
|
+
if (requested) {
|
|
13015
|
+
if (params.source === "request" && !params.hooksConfig.sessionPolicy.allowRequestSessionKey) return {
|
|
13016
|
+
ok: false,
|
|
13017
|
+
error: getHookSessionKeyRequestPolicyError()
|
|
13018
|
+
};
|
|
13019
|
+
const allowedPrefixes = params.hooksConfig.sessionPolicy.allowedSessionKeyPrefixes;
|
|
13020
|
+
if (allowedPrefixes && !isSessionKeyAllowedByPrefix(requested, allowedPrefixes)) return {
|
|
13021
|
+
ok: false,
|
|
13022
|
+
error: getHookSessionKeyPrefixError(allowedPrefixes)
|
|
13023
|
+
};
|
|
13024
|
+
return {
|
|
13025
|
+
ok: true,
|
|
13026
|
+
value: requested
|
|
13027
|
+
};
|
|
13028
|
+
}
|
|
13029
|
+
const defaultSessionKey = params.hooksConfig.sessionPolicy.defaultSessionKey;
|
|
13030
|
+
if (defaultSessionKey) return {
|
|
13031
|
+
ok: true,
|
|
13032
|
+
value: defaultSessionKey
|
|
13033
|
+
};
|
|
13034
|
+
const generated = `hook:${(params.idFactory ?? randomUUID)()}`;
|
|
13035
|
+
const allowedPrefixes = params.hooksConfig.sessionPolicy.allowedSessionKeyPrefixes;
|
|
13036
|
+
if (allowedPrefixes && !isSessionKeyAllowedByPrefix(generated, allowedPrefixes)) return {
|
|
13037
|
+
ok: false,
|
|
13038
|
+
error: getHookSessionKeyPrefixError(allowedPrefixes)
|
|
13039
|
+
};
|
|
13040
|
+
return {
|
|
13041
|
+
ok: true,
|
|
13042
|
+
value: generated
|
|
13043
|
+
};
|
|
13044
|
+
}
|
|
13045
|
+
function normalizeAgentPayload(payload) {
|
|
12928
13046
|
const message = typeof payload.message === "string" ? payload.message.trim() : "";
|
|
12929
13047
|
if (!message) return {
|
|
12930
13048
|
ok: false,
|
|
@@ -12936,8 +13054,7 @@ function normalizeAgentPayload(payload, opts) {
|
|
|
12936
13054
|
const agentId = typeof agentIdRaw === "string" && agentIdRaw.trim() ? agentIdRaw.trim() : void 0;
|
|
12937
13055
|
const wakeMode = payload.wakeMode === "next-heartbeat" ? "next-heartbeat" : "now";
|
|
12938
13056
|
const sessionKeyRaw = payload.sessionKey;
|
|
12939
|
-
const
|
|
12940
|
-
const sessionKey = typeof sessionKeyRaw === "string" && sessionKeyRaw.trim() ? sessionKeyRaw.trim() : `hook:${idFactory()}`;
|
|
13057
|
+
const sessionKey = typeof sessionKeyRaw === "string" && sessionKeyRaw.trim() ? sessionKeyRaw.trim() : void 0;
|
|
12941
13058
|
const channel = resolveHookChannel(payload.channel);
|
|
12942
13059
|
if (!channel) return {
|
|
12943
13060
|
ok: false,
|
|
@@ -12978,7 +13095,7 @@ function normalizeAgentPayload(payload, opts) {
|
|
|
12978
13095
|
async function startBrowserControlServerIfEnabled() {
|
|
12979
13096
|
if (isTruthyEnvValue(process.env.OPENCLAW_SKIP_BROWSER_CONTROL_SERVER)) return null;
|
|
12980
13097
|
const override = process.env.OPENCLAW_BROWSER_CONTROL_MODULE?.trim();
|
|
12981
|
-
const mod = override ? await import(override) : await import("./control-service-
|
|
13098
|
+
const mod = override ? await import(override) : await import("./control-service-B5KnPqGP.js").then((n) => n.t);
|
|
12982
13099
|
const start = typeof mod.startBrowserControlServiceFromConfig === "function" ? mod.startBrowserControlServiceFromConfig : mod.startBrowserControlServerFromConfig;
|
|
12983
13100
|
const stop = typeof mod.stopBrowserControlService === "function" ? mod.stopBrowserControlService : mod.stopBrowserControlServer;
|
|
12984
13101
|
if (!start) return null;
|
|
@@ -14629,6 +14746,7 @@ const OutputTextDoneEventSchema = z.object({
|
|
|
14629
14746
|
//#endregion
|
|
14630
14747
|
//#region src/gateway/openresponses-http.ts
|
|
14631
14748
|
const DEFAULT_BODY_BYTES$1 = 20 * 1024 * 1024;
|
|
14749
|
+
const DEFAULT_MAX_URL_PARTS = 8;
|
|
14632
14750
|
function writeSseEvent(res, event) {
|
|
14633
14751
|
res.write(`event: ${event.type}\n`);
|
|
14634
14752
|
res.write(`data: ${JSON.stringify(event)}\n\n`);
|
|
@@ -14641,13 +14759,20 @@ function extractTextContent(content) {
|
|
|
14641
14759
|
return "";
|
|
14642
14760
|
}).filter(Boolean).join("\n");
|
|
14643
14761
|
}
|
|
14762
|
+
function normalizeHostnameAllowlist(values) {
|
|
14763
|
+
if (!values || values.length === 0) return;
|
|
14764
|
+
const normalized = values.map((value) => value.trim()).filter((value) => value.length > 0);
|
|
14765
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
14766
|
+
}
|
|
14644
14767
|
function resolveResponsesLimits(config) {
|
|
14645
14768
|
const files = config?.files;
|
|
14646
14769
|
const images = config?.images;
|
|
14647
14770
|
return {
|
|
14648
14771
|
maxBodyBytes: config?.maxBodyBytes ?? DEFAULT_BODY_BYTES$1,
|
|
14772
|
+
maxUrlParts: typeof config?.maxUrlParts === "number" ? Math.max(0, Math.floor(config.maxUrlParts)) : DEFAULT_MAX_URL_PARTS,
|
|
14649
14773
|
files: {
|
|
14650
14774
|
allowUrl: files?.allowUrl ?? true,
|
|
14775
|
+
urlAllowlist: normalizeHostnameAllowlist(files?.urlAllowlist),
|
|
14651
14776
|
allowedMimes: normalizeMimeList(files?.allowedMimes, DEFAULT_INPUT_FILE_MIMES),
|
|
14652
14777
|
maxBytes: files?.maxBytes ?? DEFAULT_INPUT_FILE_MAX_BYTES,
|
|
14653
14778
|
maxChars: files?.maxChars ?? DEFAULT_INPUT_FILE_MAX_CHARS,
|
|
@@ -14661,6 +14786,7 @@ function resolveResponsesLimits(config) {
|
|
|
14661
14786
|
},
|
|
14662
14787
|
images: {
|
|
14663
14788
|
allowUrl: images?.allowUrl ?? true,
|
|
14789
|
+
urlAllowlist: normalizeHostnameAllowlist(images?.urlAllowlist),
|
|
14664
14790
|
allowedMimes: normalizeMimeList(images?.allowedMimes, DEFAULT_INPUT_IMAGE_MIMES),
|
|
14665
14791
|
maxBytes: images?.maxBytes ?? DEFAULT_INPUT_IMAGE_MAX_BYTES,
|
|
14666
14792
|
maxRedirects: images?.maxRedirects ?? DEFAULT_INPUT_MAX_REDIRECTS,
|
|
@@ -14842,6 +14968,11 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
14842
14968
|
const user = payload.user;
|
|
14843
14969
|
let images = [];
|
|
14844
14970
|
let fileContexts = [];
|
|
14971
|
+
let urlParts = 0;
|
|
14972
|
+
const markUrlPart = () => {
|
|
14973
|
+
urlParts += 1;
|
|
14974
|
+
if (urlParts > limits.maxUrlParts) throw new Error(`Too many URL-based input sources: ${urlParts} (limit: ${limits.maxUrlParts})`);
|
|
14975
|
+
};
|
|
14845
14976
|
try {
|
|
14846
14977
|
if (Array.isArray(payload.input)) {
|
|
14847
14978
|
for (const item of payload.input) if (item.type === "message" && typeof item.content !== "string") for (const part of item.content) {
|
|
@@ -14849,6 +14980,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
14849
14980
|
const source = part.source;
|
|
14850
14981
|
const sourceType = source.type === "base64" || source.type === "url" ? source.type : void 0;
|
|
14851
14982
|
if (!sourceType) throw new Error("input_image must have 'source.url' or 'source.data'");
|
|
14983
|
+
if (sourceType === "url") markUrlPart();
|
|
14852
14984
|
const image = await extractImageContentFromSource({
|
|
14853
14985
|
type: sourceType,
|
|
14854
14986
|
url: source.url,
|
|
@@ -14862,6 +14994,7 @@ async function handleOpenResponsesHttpRequest(req, res, opts) {
|
|
|
14862
14994
|
const source = part.source;
|
|
14863
14995
|
const sourceType = source.type === "base64" || source.type === "url" ? source.type : void 0;
|
|
14864
14996
|
if (!sourceType) throw new Error("input_file must have 'source.url' or 'source.data'");
|
|
14997
|
+
if (sourceType === "url") markUrlPart();
|
|
14865
14998
|
const file = await extractFileContentFromSource({
|
|
14866
14999
|
source: {
|
|
14867
15000
|
type: sourceType,
|
|
@@ -15425,6 +15558,9 @@ async function handleToolsInvokeHttpRequest(req, res, opts) {
|
|
|
15425
15558
|
|
|
15426
15559
|
//#endregion
|
|
15427
15560
|
//#region src/gateway/server-http.ts
|
|
15561
|
+
const HOOK_AUTH_FAILURE_LIMIT = 20;
|
|
15562
|
+
const HOOK_AUTH_FAILURE_WINDOW_MS = 6e4;
|
|
15563
|
+
const HOOK_AUTH_FAILURE_TRACK_MAX = 2048;
|
|
15428
15564
|
function sendJson(res, status, body) {
|
|
15429
15565
|
res.statusCode = status;
|
|
15430
15566
|
res.setHeader("Content-Type", "application/json; charset=utf-8");
|
|
@@ -15466,6 +15602,31 @@ async function authorizeCanvasRequest(params) {
|
|
|
15466
15602
|
}
|
|
15467
15603
|
function createHooksRequestHandler(opts) {
|
|
15468
15604
|
const { getHooksConfig, bindHost, port, logHooks, dispatchAgentHook, dispatchWakeHook } = opts;
|
|
15605
|
+
const hookAuthFailures = /* @__PURE__ */ new Map();
|
|
15606
|
+
const resolveHookClientKey = (req) => {
|
|
15607
|
+
return req.socket?.remoteAddress?.trim() || "unknown";
|
|
15608
|
+
};
|
|
15609
|
+
const recordHookAuthFailure = (clientKey, nowMs) => {
|
|
15610
|
+
if (!hookAuthFailures.has(clientKey) && hookAuthFailures.size >= HOOK_AUTH_FAILURE_TRACK_MAX) hookAuthFailures.clear();
|
|
15611
|
+
const current = hookAuthFailures.get(clientKey);
|
|
15612
|
+
const next = !current || nowMs - current.windowStartedAtMs >= HOOK_AUTH_FAILURE_WINDOW_MS ? {
|
|
15613
|
+
count: 1,
|
|
15614
|
+
windowStartedAtMs: nowMs
|
|
15615
|
+
} : {
|
|
15616
|
+
count: current.count + 1,
|
|
15617
|
+
windowStartedAtMs: current.windowStartedAtMs
|
|
15618
|
+
};
|
|
15619
|
+
hookAuthFailures.set(clientKey, next);
|
|
15620
|
+
if (next.count <= HOOK_AUTH_FAILURE_LIMIT) return { throttled: false };
|
|
15621
|
+
const retryAfterMs = Math.max(1, next.windowStartedAtMs + HOOK_AUTH_FAILURE_WINDOW_MS - nowMs);
|
|
15622
|
+
return {
|
|
15623
|
+
throttled: true,
|
|
15624
|
+
retryAfterSeconds: Math.ceil(retryAfterMs / 1e3)
|
|
15625
|
+
};
|
|
15626
|
+
};
|
|
15627
|
+
const clearHookAuthFailure = (clientKey) => {
|
|
15628
|
+
hookAuthFailures.delete(clientKey);
|
|
15629
|
+
};
|
|
15469
15630
|
return async (req, res) => {
|
|
15470
15631
|
const hooksConfig = getHooksConfig();
|
|
15471
15632
|
if (!hooksConfig) return false;
|
|
@@ -15479,12 +15640,24 @@ function createHooksRequestHandler(opts) {
|
|
|
15479
15640
|
return true;
|
|
15480
15641
|
}
|
|
15481
15642
|
const token = extractHookToken(req);
|
|
15482
|
-
|
|
15643
|
+
const clientKey = resolveHookClientKey(req);
|
|
15644
|
+
if (!safeEqualSecret(token, hooksConfig.token)) {
|
|
15645
|
+
const throttle = recordHookAuthFailure(clientKey, Date.now());
|
|
15646
|
+
if (throttle.throttled) {
|
|
15647
|
+
const retryAfter = throttle.retryAfterSeconds ?? 1;
|
|
15648
|
+
res.statusCode = 429;
|
|
15649
|
+
res.setHeader("Retry-After", String(retryAfter));
|
|
15650
|
+
res.setHeader("Content-Type", "text/plain; charset=utf-8");
|
|
15651
|
+
res.end("Too Many Requests");
|
|
15652
|
+
logHooks.warn(`hook auth throttled for ${clientKey}; retry-after=${retryAfter}s`);
|
|
15653
|
+
return true;
|
|
15654
|
+
}
|
|
15483
15655
|
res.statusCode = 401;
|
|
15484
15656
|
res.setHeader("Content-Type", "text/plain; charset=utf-8");
|
|
15485
15657
|
res.end("Unauthorized");
|
|
15486
15658
|
return true;
|
|
15487
15659
|
}
|
|
15660
|
+
clearHookAuthFailure(clientKey);
|
|
15488
15661
|
if (req.method !== "POST") {
|
|
15489
15662
|
res.statusCode = 405;
|
|
15490
15663
|
res.setHeader("Allow", "POST");
|
|
@@ -15541,10 +15714,23 @@ function createHooksRequestHandler(opts) {
|
|
|
15541
15714
|
});
|
|
15542
15715
|
return true;
|
|
15543
15716
|
}
|
|
15717
|
+
const sessionKey = resolveHookSessionKey({
|
|
15718
|
+
hooksConfig,
|
|
15719
|
+
source: "request",
|
|
15720
|
+
sessionKey: normalized.value.sessionKey
|
|
15721
|
+
});
|
|
15722
|
+
if (!sessionKey.ok) {
|
|
15723
|
+
sendJson(res, 400, {
|
|
15724
|
+
ok: false,
|
|
15725
|
+
error: sessionKey.error
|
|
15726
|
+
});
|
|
15727
|
+
return true;
|
|
15728
|
+
}
|
|
15544
15729
|
sendJson(res, 202, {
|
|
15545
15730
|
ok: true,
|
|
15546
15731
|
runId: dispatchAgentHook({
|
|
15547
15732
|
...normalized.value,
|
|
15733
|
+
sessionKey: sessionKey.value,
|
|
15548
15734
|
agentId: resolveHookTargetAgentId(hooksConfig, normalized.value.agentId)
|
|
15549
15735
|
})
|
|
15550
15736
|
});
|
|
@@ -15596,6 +15782,18 @@ function createHooksRequestHandler(opts) {
|
|
|
15596
15782
|
});
|
|
15597
15783
|
return true;
|
|
15598
15784
|
}
|
|
15785
|
+
const sessionKey = resolveHookSessionKey({
|
|
15786
|
+
hooksConfig,
|
|
15787
|
+
source: "mapping",
|
|
15788
|
+
sessionKey: mapped.action.sessionKey
|
|
15789
|
+
});
|
|
15790
|
+
if (!sessionKey.ok) {
|
|
15791
|
+
sendJson(res, 400, {
|
|
15792
|
+
ok: false,
|
|
15793
|
+
error: sessionKey.error
|
|
15794
|
+
});
|
|
15795
|
+
return true;
|
|
15796
|
+
}
|
|
15599
15797
|
sendJson(res, 202, {
|
|
15600
15798
|
ok: true,
|
|
15601
15799
|
runId: dispatchAgentHook({
|
|
@@ -15603,7 +15801,7 @@ function createHooksRequestHandler(opts) {
|
|
|
15603
15801
|
name: mapped.action.name ?? "Hook",
|
|
15604
15802
|
agentId: resolveHookTargetAgentId(hooksConfig, mapped.action.agentId),
|
|
15605
15803
|
wakeMode: mapped.action.wakeMode,
|
|
15606
|
-
sessionKey:
|
|
15804
|
+
sessionKey: sessionKey.value,
|
|
15607
15805
|
deliver: resolveHookDeliver(mapped.action.deliver),
|
|
15608
15806
|
channel,
|
|
15609
15807
|
to: mapped.action.to,
|
|
@@ -15754,7 +15952,7 @@ function createGatewayHooksRequestHandler(params) {
|
|
|
15754
15952
|
if (value.mode === "now") requestHeartbeatNow({ reason: "hook:wake" });
|
|
15755
15953
|
};
|
|
15756
15954
|
const dispatchAgentHook = (value) => {
|
|
15757
|
-
const sessionKey = value.sessionKey.trim()
|
|
15955
|
+
const sessionKey = value.sessionKey.trim();
|
|
15758
15956
|
const mainSessionKey = resolveMainSessionKeyFromConfig();
|
|
15759
15957
|
const jobId = randomUUID();
|
|
15760
15958
|
const now = Date.now();
|
|
@@ -17812,6 +18010,12 @@ async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
17812
18010
|
logChannels,
|
|
17813
18011
|
logBrowser
|
|
17814
18012
|
}));
|
|
18013
|
+
{
|
|
18014
|
+
const hookRunner = getGlobalHookRunner();
|
|
18015
|
+
if (hookRunner?.hasHooks("gateway_start")) hookRunner.runGatewayStart({ port }, { port }).catch((err) => {
|
|
18016
|
+
log.warn(`gateway_start hook failed: ${String(err)}`);
|
|
18017
|
+
});
|
|
18018
|
+
}
|
|
17815
18019
|
const { applyHotReload, requestGatewayRestart } = createGatewayReloadHandlers({
|
|
17816
18020
|
deps,
|
|
17817
18021
|
broadcast,
|
|
@@ -17874,6 +18078,14 @@ async function startGatewayServer(port = 18789, opts = {}) {
|
|
|
17874
18078
|
httpServers
|
|
17875
18079
|
});
|
|
17876
18080
|
return { close: async (opts) => {
|
|
18081
|
+
{
|
|
18082
|
+
const hookRunner = getGlobalHookRunner();
|
|
18083
|
+
if (hookRunner?.hasHooks("gateway_stop")) try {
|
|
18084
|
+
await hookRunner.runGatewayStop({ reason: opts?.reason ?? "gateway stopping" }, { port });
|
|
18085
|
+
} catch (err) {
|
|
18086
|
+
log.warn(`gateway_stop hook failed: ${String(err)}`);
|
|
18087
|
+
}
|
|
18088
|
+
}
|
|
17877
18089
|
if (diagnosticsEnabled) stopDiagnosticHeartbeat();
|
|
17878
18090
|
if (skillsRefreshTimer) {
|
|
17879
18091
|
clearTimeout(skillsRefreshTimer);
|