openclaw-cortex 3.1.0 → 3.2.0
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/{agents-DFGWWUWP.js → agents-Connanf3.js} +9 -9
- package/dist/{audio-preflight-CJMYPxgz.js → audio-preflight-CketII1D.js} +4 -4
- package/dist/{audio-preflight-Da8wJ2aM.js → audio-preflight-uMyPrpUu.js} +2 -2
- package/dist/{audit-D2RyL2xf.js → audit-DkAW6KBR.js} +5 -5
- package/dist/audit-cli-BXgvg5ZF.js +149 -0
- package/dist/audit-cli-DtqyB9AV.js +142 -0
- package/dist/{audit-BjY3NDuN.js → audit-qELipjtd.js} +5 -5
- package/dist/{auth-choice-GohCLqPi.js → auth-choice-iBFMtcSX.js} +6 -6
- package/dist/{auth-choice-options-DnA9f3yX.js → auth-choice-options-B1kkod6_.js} +1 -1
- package/dist/{auth-choice-options-DEXqZb42.js → auth-choice-options-ypl3E9Ly.js} +1 -1
- package/dist/{auth-choice-prompt-Dl-yzpY0.js → auth-choice-prompt-BRyWAtfZ.js} +1 -1
- package/dist/{auth-choice-prompt-UUacbtn9.js → auth-choice-prompt-HAxprx2p.js} +1 -1
- package/dist/{auth-choice-Ts5V5Aeh.js → auth-choice-qtLrrNVz.js} +5 -5
- package/dist/{banner-Bg78pfCD.js → banner-D_oPGRF8.js} +1 -1
- package/dist/{bonjour-discovery-Dci4cd0G.js → bonjour-discovery-D7009yxB.js} +1 -1
- package/dist/{bonjour-discovery-Bbq821TB.js → bonjour-discovery-DZl6ArZI.js} +1 -1
- package/dist/{browser-cli-Br6_uOTg.js → browser-cli-B9Vh8gTE.js} +1 -1
- package/dist/{browser-cli-6clFJFS6.js → browser-cli-BTtbPQaz.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-DWVQz-Pr.js → channel-options-B48SGv9h.js} +1 -1
- package/dist/{channel-options-VO3dsstv.js → channel-options-BcJt26VG.js} +2 -2
- package/dist/{channel-web-CfYHK75g.js → channel-web-CgFmP49a.js} +2 -2
- package/dist/{channels-cli-CgzGUhuU.js → channels-cli-CL1qUEGy.js} +19 -19
- package/dist/{channels-cli-ClaXI2LY.js → channels-cli-DKyMl3-J.js} +18 -18
- package/dist/{chrome-jiKls1lm.js → chrome-7PNldBIY.js} +7 -7
- package/dist/{clack-prompter-xfiETF85.js → clack-prompter-CTPf_777.js} +2 -2
- package/dist/{clack-prompter-BKrj0iD5.js → clack-prompter-KpWBIhc1.js} +2 -2
- package/dist/{clawbot-cli-BLkszw7f.js → clawbot-cli-DbkjoCG5.js} +1 -1
- package/dist/{clawbot-cli-D--KZtXG.js → clawbot-cli-i4NzkdF4.js} +1 -1
- package/dist/{cli-jzRaj4XC.js → cli-DsZC1vDc.js} +2 -2
- package/dist/{cli-VXGGV02p.js → cli-lEZ3mJ9g.js} +4 -4
- package/dist/{command-registry-DdnU-C_q.js → command-registry-C2HYRZO_.js} +12 -12
- package/dist/{completion-cli-DuxZVRrg.js → completion-cli-DB5qbPxk.js} +1 -1
- package/dist/{completion-cli-BiPxrDMm.js → completion-cli-rVm9UjTQ.js} +3 -3
- package/dist/{config-cli-CxCTGO_g.js → config-cli-1O6rmVow.js} +1 -1
- package/dist/{config-cli-WYe98Ox0.js → config-cli-DKFT2jQY.js} +1 -1
- package/dist/{config-guard-DgjGJ8Lb.js → config-guard-BAA0NN6K.js} +3 -3
- package/dist/{config-guard-Fvw_vc_U.js → config-guard-FQYcQKxs.js} +1 -1
- package/dist/{configure--dU6eZNK.js → configure-Bq40wO_g.js} +18 -18
- package/dist/{configure-D83Cw4Tz.js → configure-Hjs-w_V-.js} +18 -18
- package/dist/control-ui/_app/immutable/assets/0.CIIOt0aD.css +1 -0
- package/dist/control-ui/_app/immutable/chunks/{DXhHboeH.js → PR_wZ9tz.js} +1 -1
- package/dist/control-ui/_app/immutable/entry/app.DKU3ZeOo.js +2 -0
- package/dist/control-ui/_app/immutable/entry/start.Bt2xwOar.js +1 -0
- package/dist/control-ui/_app/immutable/nodes/{0.B62uYxuw.js → 0.CDaa-GWT.js} +8 -8
- package/dist/control-ui/_app/immutable/nodes/{1.CDpdCVD0.js → 1.CYtkLWum.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{9.DFhiU3G3.js → 10.DfK8stgG.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{10.CFP8x2TH.js → 11.Dzw5x9Jt.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{14.DP0eaD-P.js → 15.7DnWqn28.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/5.BbK5Iwro.js +4 -0
- package/dist/control-ui/_app/immutable/nodes/{5._XvLegf_.js → 6.CbanPjIA.js} +1 -1
- package/dist/control-ui/_app/immutable/nodes/{8.B5aVfCJN.js → 9.D4Abr5tX.js} +1 -1
- package/dist/control-ui/_app/version.json +1 -1
- package/dist/control-ui/index.html +6 -6
- package/dist/{cron-cli-QB8r6K_w.js → cron-cli-aGCB_2-m.js} +1 -1
- package/dist/{daemon-Cb7wiTzs.js → daemon-CrTIKc6F.js} +6 -6
- package/dist/{daemon-Des4AgjX.js → daemon-DP4R5-Kf.js} +6 -6
- package/dist/{daemon-cli-BlsF7JRB.js → daemon-cli-Bpc5ZmKC.js} +1 -1
- package/dist/{daemon-cli-sM-6bwnt.js → daemon-cli-CUh4NlQ7.js} +8 -8
- package/dist/{daemon-cli-CAME8LzX.js → daemon-cli-zo00dvxw.js} +1 -1
- package/dist/{daemon-runtime-CS81-2xm.js → daemon-runtime-DnzXuU_x.js} +1 -1
- package/dist/{deliver-DXKF_Nu0.js → deliver-CFSxoz2_.js} +1 -1
- package/dist/{devices-cli-DeDV4Bqj.js → devices-cli-3ZwsBIF1.js} +1 -1
- package/dist/{devices-cli-DC0MbgAK.js → devices-cli-D4MzUzC7.js} +1 -1
- package/dist/{diagnostics-23-FTnVz.js → diagnostics-D3Hu1kBI.js} +1 -1
- package/dist/{diagnostics-Ef27CLfy.js → diagnostics-D7bn87xJ.js} +1 -1
- package/dist/{directory-cli-SE46S0CB.js → directory-cli-CcPugz8R.js} +2 -2
- package/dist/{directory-cli-BIjxWy1d.js → directory-cli-DXwiDLrf.js} +2 -2
- package/dist/{dns-cli-74dMXPOa.js → dns-cli-DKZyzBHW.js} +2 -2
- package/dist/{dns-cli-B5TFMuUd.js → dns-cli-Dj9PvwCt.js} +2 -2
- package/dist/{doctor-completion-D0-JkRk1.js → doctor-completion-CDdw31wQ.js} +2 -2
- package/dist/{doctor-completion-DcqQQvqC.js → doctor-completion-lw65Gm69.js} +2 -2
- package/dist/{doctor-config-flow-VkeqkE_0.js → doctor-config-flow-BeaKHczK.js} +4 -4
- package/dist/{doctor-config-flow-CCgRJLm0.js → doctor-config-flow-H0rj1G82.js} +4 -4
- package/dist/{enable-55n-WSsE.js → enable-C2kZT1wf.js} +1 -1
- package/dist/{enable-CknE1f0w.js → enable-CBGVOpes.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-Dd_vBz5L.js → exec-approvals-cli-Bnd2QORy.js} +5 -5
- package/dist/{exec-approvals-cli-oCsC4ad1.js → exec-approvals-cli-y-rX8HdN.js} +5 -5
- package/dist/extensionAPI.js +6 -6
- package/dist/{gateway-cli-Cfs77-mk.js → gateway-cli-D_RCXTvo.js} +389 -69
- package/dist/{gateway-cli-bSwcceJd.js → gateway-cli-yd0wJM_1.js} +388 -68
- package/dist/{health-fyXf4lEO.js → health-CuD8XoQy.js} +2 -2
- package/dist/{health-6g5hi28u.js → health-HfXeNmAj.js} +2 -2
- package/dist/{hooks-cli-CZfvOlY1.js → hooks-cli-B9pYOLSo.js} +10 -10
- package/dist/{hooks-cli-D59S5DQ3.js → hooks-cli-CfXcytes.js} +8 -8
- package/dist/{hooks-status-C9KqWt8h.js → hooks-status-Cp7ejPFf.js} +1 -1
- package/dist/{hooks-status-QGgVvmRr.js → hooks-status-b7LxQMuo.js} +1 -1
- package/dist/{image-DChVqMFC.js → image-DafeVSso.js} +1 -1
- package/dist/index.js +10 -10
- package/dist/{inspect-CKqi1YnO.js → inspect-CRH0n6VO.js} +1 -1
- package/dist/{inspect-cZ9bY884.js → inspect-De36nczp.js} +1 -1
- package/dist/{install-safe-path-Cx0jIhFX.js → install-safe-path-BUZoxvjo.js} +1 -1
- package/dist/{install-safe-path-BK8js28D.js → install-safe-path-C__62m3G.js} +1 -1
- package/dist/{installs-Bb-tLJtw.js → installs-BQomWNkv.js} +3 -3
- package/dist/{installs-D96MHCfz.js → installs-DOzoX6Lj.js} +3 -3
- package/dist/{lifecycle-core-BsxpzMSa.js → lifecycle-core-D-idKcJT.js} +4 -4
- package/dist/{lifecycle-core-Bt5BqaIY.js → lifecycle-core-DtN4Wg9p.js} +4 -4
- package/dist/{logs-cli-3J59cVdu.js → logs-cli-Co-dRkBt.js} +1 -1
- package/dist/{logs-cli-v35EJjb3.js → logs-cli-DxRr-okE.js} +1 -1
- package/dist/{memory-cli-DWydhV-V.js → memory-cli-BuqY12GX.js} +1 -1
- package/dist/{memory-cli-D1uj5PFF.js → memory-cli-oTchxxCo.js} +1 -1
- package/dist/{model-catalog-yzrJiO3y.js → model-catalog-CbowpOxX.js} +1 -1
- package/dist/{model-picker-ei3br5zp.js → model-picker-C8wvNgLt.js} +2 -2
- package/dist/{model-picker-nxntGU8X.js → model-picker-CfpSzPcs.js} +3 -3
- package/dist/{models-cli-CY__bDc5.js → models-cli-C9laZsKz.js} +14 -14
- package/dist/{models-cli-Bk9n0tJe.js → models-cli-rLp2PtTV.js} +10 -10
- package/dist/{models-g128XKsn.js → models-iwnnK-j-.js} +9 -9
- package/dist/{node-cli-Bj8ON11k.js → node-cli-Dp7mtofP.js} +10 -10
- package/dist/{node-cli-CJjrrKq9.js → node-cli-iV-j-wYM.js} +9 -9
- package/dist/{node-service-CPLJsCSU.js → node-service-BuwCiN6g.js} +1 -1
- package/dist/{node-service-D1-7_1cb.js → node-service-DMNdtnuy.js} +1 -1
- package/dist/{nodes-cli-Ci-Bcwf8.js → nodes-cli-CzfzXfgv.js} +2 -2
- package/dist/{nodes-cli-BxRAQoe9.js → nodes-cli-DYLMQpcr.js} +2 -2
- package/dist/{npm-registry-spec-KNhAHcQS.js → npm-registry-spec-GhKQD8SI.js} +1 -1
- package/dist/{npm-registry-spec-DkaZNHAW.js → npm-registry-spec-PuS2I1Em.js} +1 -1
- package/dist/{onboard-DmTh7SXf.js → onboard-Bd7A_X5U.js} +14 -14
- package/dist/{onboard-DMifN-i1.js → onboard-DtWmcQlQ.js} +15 -15
- package/dist/{onboard-channels-DvKfcKcM.js → onboard-channels-CUrbd3Wb.js} +5 -5
- package/dist/{onboard-channels-OJRGzltw.js → onboard-channels-jQ3eUVs5.js} +6 -6
- package/dist/{onboard-custom-CVkHP2LI.js → onboard-custom-DGPRdl88.js} +2 -2
- package/dist/{onboard-custom-EVjMXHxg.js → onboard-custom-zu25Ce3O.js} +2 -2
- package/dist/{onboard-hooks-CbvnumRC.js → onboard-hooks-BGNKszKA.js} +2 -2
- package/dist/{onboard-hooks-Bf71KQxe.js → onboard-hooks-Bfe1d0y4.js} +2 -2
- package/dist/{onboard-remote-B1ALuxz1.js → onboard-remote-Crh1ykbv.js} +2 -2
- package/dist/{onboard-remote-DvD400Xk.js → onboard-remote-DNAePOvY.js} +2 -2
- package/dist/{onboard-skills-DADB1X8v.js → onboard-skills-JPKMqrus.js} +1 -1
- package/dist/{onboard-skills-B-SjYRhY.js → onboard-skills-Xk7z94Bl.js} +1 -1
- package/dist/{onboarding-CQzBfGpz.js → onboarding-D5BRyKY0.js} +14 -14
- package/dist/{onboarding-De7bUYn0.js → onboarding-JoS3gVBZ.js} +14 -14
- package/dist/{onboarding.finalize-CfRbKgYD.js → onboarding.finalize-Bbi4NFVI.js} +16 -16
- package/dist/{onboarding.finalize-FFs7GkQQ.js → onboarding.finalize-DwWgfZqG.js} +17 -17
- package/dist/{onboarding.gateway-config-BtNlVRR8.js → onboarding.gateway-config-C57J8mMa.js} +1 -1
- package/dist/{onboarding.gateway-config-DcPeHQOU.js → onboarding.gateway-config-DnCISZSx.js} +1 -1
- package/dist/{openai-model-default-nCXNgugA.js → openai-model-default-Cr6-L10w.js} +1 -1
- package/dist/{openai-model-default-DPkXfXr6.js → openai-model-default-JoN5c4An.js} +1 -1
- package/dist/{pairing-cli-BLo9Ainb.js → pairing-cli-Bcec_R3Q.js} +1 -1
- package/dist/{pairing-cli-_0WmOf9q.js → pairing-cli-PoxPVvhd.js} +1 -1
- package/dist/{pi-auth-json-CSe5xRCM.js → pi-auth-json-DoNJ0jhK.js} +1 -1
- package/dist/{pi-embedded-DPsT4Vb4.js → pi-embedded-Ig1YOX5t.js} +16 -16
- package/dist/{pi-embedded-helpers--8pQ_5Ix.js → pi-embedded-helpers-C-3FQnQz.js} +4 -4
- package/dist/{plugin-auto-enable-Czk5vqi1.js → plugin-auto-enable-CgzsK3UF.js} +1 -1
- package/dist/{plugin-auto-enable-bi7o87Rj.js → plugin-auto-enable-Co1CxSEm.js} +2 -2
- package/dist/{plugin-registry-Bq3rtiCL.js → plugin-registry-6pWyMqfg.js} +1 -1
- package/dist/{plugin-registry-D6-nPnzv.js → plugin-registry-CAfPxKab.js} +1 -1
- package/dist/plugin-sdk/{accounts-vV5Gfd26.js → accounts-CRs7kbLB.js} +1 -1
- package/dist/plugin-sdk/{accounts-iN-dbgw4.js → accounts-b1Cok6r_.js} +3 -3
- package/dist/plugin-sdk/{accounts-LxMkgia0.js → accounts-uAqOguyH.js} +1 -1
- package/dist/plugin-sdk/{active-listener-Bh0LXjEI.js → active-listener-BdVTYHTN.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-BS_vck4W.js → agent-scope-OWMdRegz.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-LkecAWT_.js → api-key-rotation-DedcgBOR.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-Bs1SkEb1.js → audio-preflight-EYVIo5wC.js} +25 -25
- package/dist/plugin-sdk/{bindings-CTCkMENc.js → bindings-LROfNV1W.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-PV3vhwo2.js → channel-activity-DHI8R5Xg.js} +1 -1
- package/dist/plugin-sdk/{channel-web-C1Hsjdgf.js → channel-web-CGp1_ZH4.js} +22 -22
- package/dist/plugin-sdk/{chrome-cWvSiZw3.js → chrome-BS8LYp6z.js} +3 -3
- package/dist/plugin-sdk/{chunk-CyOBR4uk.js → chunk-C9J4kyVw.js} +1 -1
- package/dist/plugin-sdk/{command-format-C5kdEGEu.js → command-format-BTciq6Gg.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-Bvksrm0n.js → commands-registry-pHxVP_Zd.js} +3 -3
- package/dist/plugin-sdk/{common-CJo4CK5_.js → common-CCPGi5xr.js} +2 -2
- package/dist/plugin-sdk/{config-B8Nc1zrG.js → config-DemNgb7Z.js} +9 -9
- package/dist/plugin-sdk/{deliver-Dut_1pt2.js → deliver-BCvqh6o3.js} +10 -10
- package/dist/plugin-sdk/{diagnostic-DFXnVf2I.js → diagnostic-oBxO5N68.js} +1 -1
- package/dist/plugin-sdk/{fs-safe-CdpuSWry.js → fs-safe-CGcLaY9D.js} +1 -1
- package/dist/plugin-sdk/{image-B3tSrFDE.js → image-BHSeZfna.js} +4 -4
- package/dist/plugin-sdk/index.js +52 -52
- package/dist/plugin-sdk/{ir-05vuco_v.js → ir-JSGKj1e6.js} +4 -4
- package/dist/plugin-sdk/{local-roots-DlmKIABh.js → local-roots-jpNoUngc.js} +3 -3
- package/dist/plugin-sdk/{login-_t6d0RBi.js → login-Ckh0Yz4j.js} +7 -7
- package/dist/plugin-sdk/{login-qr-Czq6nBnB.js → login-qr-DRY27T-V.js} +9 -9
- package/dist/plugin-sdk/{manager-DEOMAxd_.js → manager-B9XMF8DU.js} +8 -8
- package/dist/plugin-sdk/{manifest-registry-BgkX6ON4.js → manifest-registry-Lzj-fZNH.js} +1 -1
- package/dist/plugin-sdk/{markdown-tables-FF81O4MP.js → markdown-tables-CgnPuqk-.js} +1 -1
- package/dist/plugin-sdk/{message-channel-DxNExIdv.js → message-channel-C3OrO29D.js} +1 -1
- package/dist/plugin-sdk/{model-selection-Bj-E4zbc.js → model-selection-BQiSfqzh.js} +4 -4
- package/dist/plugin-sdk/{normalize-DWmWs1Oq.js → normalize-raRH8X3d.js} +4 -4
- package/dist/plugin-sdk/{outbound-D2-05wUl.js → outbound-CtRrsxZT.js} +7 -7
- package/dist/plugin-sdk/{outbound-attachment-DmbQx_Vk.js → outbound-attachment-BD9q-xgD.js} +2 -2
- package/dist/plugin-sdk/{pi-auth-json-D-qvsSpX.js → pi-auth-json-BlIDGSl5.js} +5 -5
- package/dist/plugin-sdk/{pi-embedded-helpers-C1u6XyK5.js → pi-embedded-helpers-0qu1zxwF.js} +17 -17
- package/dist/plugin-sdk/{plugins-0PB0IWJL.js → plugins-BJciHbYr.js} +3 -3
- package/dist/plugin-sdk/{pw-ai-BIyeKPJF.js → pw-ai-DkUDisr8.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-DeQxerRp.js → qmd-manager-kPD4Wyie.js} +4 -4
- package/dist/plugin-sdk/{registry-BECEtj9n.js → registry-C8pj8ctW.js} +2 -2
- package/dist/plugin-sdk/{replies-DnGHvUeV.js → replies-0BFlZXJ5.js} +3 -3
- package/dist/plugin-sdk/{reply-Due6Dl-a.js → reply-BUzGHOJ7.js} +78 -78
- package/dist/plugin-sdk/{reply-prefix-UgReuQSG.js → reply-prefix-YUOHz1rF.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-BaFHJbum.js → resolve-route-DudlMKs4.js} +3 -3
- package/dist/plugin-sdk/{retry-Bkj1k1me.js → retry-B8Oq5mgi.js} +1 -1
- package/dist/plugin-sdk/{runner-Bq1wBell.js → runner-BkD3LLSl.js} +9 -9
- package/dist/plugin-sdk/{send-MrY4gJ_w.js → send-9i1KJYhJ.js} +7 -7
- package/dist/plugin-sdk/{send-D4HKCCvV.js → send-A_uouj00.js} +7 -7
- package/dist/plugin-sdk/{send-By-dm-fT.js → send-CpfmIaxP.js} +11 -11
- package/dist/plugin-sdk/{send-NUKqMNZh.js → send-DREpPboJ.js} +6 -6
- package/dist/plugin-sdk/{send-M99nJHP9.js → send-Di1hHvf2.js} +11 -11
- package/dist/plugin-sdk/{session-DGLRioDC.js → session-CpS-Mhnp.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-Cw-IRPUz.js → skill-commands-CTB7AZXn.js} +5 -5
- package/dist/plugin-sdk/{skills-D0-IpJne.js → skills-BCD1hFBZ.js} +7 -7
- package/dist/plugin-sdk/{sqlite-DtIiUWZr.js → sqlite-Yn48izJ_.js} +1 -1
- package/dist/plugin-sdk/{store-BcTI1iBS.js → store-BJRhX9Bi.js} +2 -2
- package/dist/plugin-sdk/{subsystem-Ck27y_6W.js → subsystem-BfLMZ8kW.js} +1 -1
- package/dist/plugin-sdk/{tables-B6ajREI6.js → tables-D5aPNTF6.js} +1 -1
- package/dist/plugin-sdk/{thinking-D81fexfE.js → thinking-BACprzA0.js} +5 -5
- package/dist/plugin-sdk/{tokens-B6GWdF_0.js → tokens-D1LxPszt.js} +1 -1
- package/dist/plugin-sdk/{tool-loop-detection-CbPwu1_R.js → tool-loop-detection-CYSptBsl.js} +2 -2
- package/dist/plugin-sdk/web-DNugKZLo.js +65 -0
- package/dist/plugin-sdk/{whatsapp-actions-B8IYO5sc.js → whatsapp-actions-CGuheX42.js} +20 -20
- package/dist/{plugins-cli-BBPth1Z6.js → plugins-cli-B1yYys0A.js} +11 -11
- package/dist/{plugins-cli-C9JJoC7q.js → plugins-cli-Dl95iV2J.js} +9 -9
- package/dist/{program-BEFngAg_.js → program-a6gIDhmg.js} +12 -12
- package/dist/{program-context-Bd7FDrI6.js → program-context-a5xRVp1E.js} +47 -39
- package/dist/{prompt-select-styled-rdKrlwqC.js → prompt-select-styled-BEAD7Qf_.js} +20 -20
- package/dist/{prompt-select-styled-0lIQRloq.js → prompt-select-styled-pDE5STe1.js} +21 -21
- package/dist/{provider-auth-helpers-1tpv3AhX.js → provider-auth-helpers-C2efwIJ1.js} +4 -4
- package/dist/{provider-auth-helpers-C3rs3jFv.js → provider-auth-helpers-Cgi-JpAw.js} +4 -4
- package/dist/{push-apns-ByshEodu.js → push-apns-CBVQ1O88.js} +1 -1
- package/dist/{push-apns-CdHUueH2.js → push-apns-DgHzRUEl.js} +1 -1
- package/dist/{pw-ai-D6PxL0UG.js → pw-ai-CNp2t_EO.js} +1 -1
- package/dist/{register.agent-KAixKF-e.js → register.agent-BzIdik-2.js} +22 -22
- package/dist/{register.agent-DY1rT-kZ.js → register.agent-C_hXidrG.js} +24 -24
- package/dist/{register.configure-CvKA3Sss.js → register.configure-DQeftoKx.js} +34 -34
- package/dist/{register.configure-DH6m9Dbt.js → register.configure-g10-MK8e.js} +34 -34
- package/dist/{register.init-C7vQ5ty0.js → register.init-CUPE0cHA.js} +4 -4
- package/dist/{register.init-p2x-x-f8.js → register.init-Dij0ZrC0.js} +4 -4
- package/dist/{register.maintenance-vVCRwkP4.js → register.maintenance-C0OozXb_.js} +26 -26
- package/dist/{register.maintenance-BgHX_v3B.js → register.maintenance-CkXb4wzI.js} +28 -28
- package/dist/{register.message-gR7FXB8b.js → register.message-C0zBUZj1.js} +5 -5
- package/dist/{register.message-i1zkq7RF.js → register.message-De4xgZGu.js} +6 -6
- package/dist/{register.onboard-ZV_tfZG_.js → register.onboard-B612Ekbb.js} +20 -20
- package/dist/{register.onboard-DfrgIeaZ.js → register.onboard-BFR0fFZX.js} +21 -21
- package/dist/{register.setup-Bsl2gf-B.js → register.setup-Caf3i42W.js} +20 -20
- package/dist/{register.setup-D-hAPrfW.js → register.setup-CtDlzU4V.js} +21 -21
- package/dist/{register.status-health-sessions-7cVPFmZG.js → register.status-health-sessions-B4fHdwpJ.js} +18 -18
- package/dist/{register.status-health-sessions-D5r2mHKj.js → register.status-health-sessions-B_yvC_IP.js} +17 -17
- package/dist/{register.subclis-abFJJY6D.js → register.subclis-7bpaXBdE.js} +37 -29
- package/dist/{reply-CwuYaPUY.js → reply-BNfv4Ttn.js} +9 -9
- package/dist/{run-main-DYoPNoW5.js → run-main-Y3Uf0qp5.js} +24 -24
- package/dist/{runner-CRUcM4a1.js → runner-BN1T_Ne4.js} +1 -1
- package/dist/{runner-CXxgpUTT.js → runner-DZGwjCQ8.js} +1 -1
- package/dist/{runners-BrJPcqyJ.js → runners-C2-1DcXS.js} +7 -7
- package/dist/{runners-BAXojh38.js → runners-GZYUkx-2.js} +7 -7
- package/dist/{security-cli-D4GRgOyQ.js → security-cli-BBZ808uq.js} +3 -3
- package/dist/{security-cli-DWY-vrKB.js → security-cli-Ci9uePi2.js} +3 -3
- package/dist/{server-node-events-7Xu3f7tS.js → server-node-events-BBifAwDM.js} +5 -5
- package/dist/{server-node-events-GvqKSJEV.js → server-node-events-DWWxWJHk.js} +3 -3
- package/dist/{service-Bci1KDFO.js → service-7TtUcMJq.js} +1 -1
- package/dist/{service-0NbohZ8s.js → service-Cu7ieLvZ.js} +1 -1
- package/dist/{session-dirs-HNLtHJ3O.js → session-dirs-CCdhZT0k.js} +3 -3
- package/dist/{session-dirs-BMCU5I9u.js → session-dirs-CIPNs4EK.js} +3 -3
- package/dist/{setup-qSIfHSqC.js → setup-DwAfJSCF.js} +1 -1
- package/dist/{setup-Dldkh1a8.js → setup-RQ3Uj-Tt.js} +1 -1
- package/dist/{shared-D8AUGe9Z.js → shared-CrPSzpAK.js} +1 -1
- package/dist/{shared-DNTO_mJp.js → shared-CzoHL8EG.js} +1 -1
- package/dist/{skills-cli-CM3wAhcI.js → skills-cli-BH0eERa-.js} +1 -1
- package/dist/{skills-cli-r1KS1oIQ.js → skills-cli-DiPfBmlI.js} +1 -1
- package/dist/{skills-install-D9QMhbxP.js → skills-install-Czf3NCmL.js} +3 -3
- package/dist/{skills-install-DlMTcQDE.js → skills-install-DZ5aRsyP.js} +3 -3
- package/dist/{status-_qW_2na1.js → status--mrN_W_U.js} +14 -14
- package/dist/{status-V-dQaLmz.js → status-Br2tlhc-.js} +1 -1
- package/dist/{status-BP3UtuGr.js → status-CwTBZYF8.js} +14 -14
- package/dist/{status-C6MlKGQ4.js → status-pSqbCX9M.js} +1 -1
- package/dist/{status.update-BUCokEjk.js → status.update-DUXJAggs.js} +1 -1
- package/dist/{status.update-P7aU2obf.js → status.update-s8H29Man.js} +1 -1
- package/dist/{subagent-registry-D5OOZhWd.js → subagent-registry-zIjho4Sx.js} +7 -7
- package/dist/{systemd-hints-BgcSCvUs.js → systemd-hints-D6arXULU.js} +4 -4
- package/dist/{systemd-hints-k45i-vVl.js → systemd-hints-DKcj1qba.js} +4 -4
- package/dist/{systemd-linger-BZTSu7IW.js → systemd-linger-CS2529_b.js} +2 -2
- package/dist/{systemd-linger-BGSDHb2w.js → systemd-linger-Doc2XbHm.js} +2 -2
- package/dist/{tui-cli-D7h8fAwG.js → tui-cli-BxmbE0rC.js} +1 -1
- package/dist/{tui-cli-CPhjIczA.js → tui-cli-CQXfzM3c.js} +1 -1
- package/dist/{update-CbOSx9mE.js → update-BQD52CHs.js} +1 -1
- package/dist/{update-blirS9pH.js → update-DCT94pb8.js} +1 -1
- package/dist/{update-check-BJw7yNjU.js → update-check-BrrYgTQO.js} +1 -1
- package/dist/{update-cli-t7J2ZeJa.js → update-cli-D-f0EC6V.js} +37 -37
- package/dist/{update-cli-BIbwcmoL.js → update-cli-DQ-gzfuL.js} +35 -35
- package/dist/{web-QGqe0Uj4.js → web-ComVBhjb.js} +6 -6
- package/dist/{web-By-kRvFi.js → web-CuEg5tFB.js} +2 -2
- package/dist/{web-C9vY5D5V.js → web-Uu6oWOPn.js} +5 -5
- package/dist/{webhooks-cli-BvrLfKKF.js → webhooks-cli-BLnOPXwx.js} +1 -1
- package/dist/{webhooks-cli-D5mvAQYZ.js → webhooks-cli-DdpgWHN2.js} +1 -1
- package/package.json +1 -1
- package/dist/control-ui/_app/immutable/assets/0.z0sOcqs9.css +0 -1
- package/dist/control-ui/_app/immutable/entry/app.BJP-sOIH.js +0 -2
- package/dist/control-ui/_app/immutable/entry/start.PIf-cCdk.js +0 -1
- package/dist/plugin-sdk/web-BfmMxgKj.js +0 -65
- /package/dist/{agents.config-BPyTmpPK.js → agents.config-DHoLdlhC.js} +0 -0
- /package/dist/{agents.config-D731KhB0.js → agents.config-sDVfdzxD.js} +0 -0
- /package/dist/{allow-from-BzKkMBk8.js → allow-from-BWMFfmlZ.js} +0 -0
- /package/dist/{allow-from-Cnsv6ADB.js → allow-from-Cm2uzFk5.js} +0 -0
- /package/dist/{audio-preflight-CZ94CIQw.js → audio-preflight-qssIjQ-F.js} +0 -0
- /package/dist/{auth-choice-legacy-BKXTgyr4.js → auth-choice-legacy-DxCamFcQ.js} +0 -0
- /package/dist/{auth-choice-legacy-hjIR80f8.js → auth-choice-legacy-E4Y1ux1Z.js} +0 -0
- /package/dist/{auth-token-Ci5rpCz5.js → auth-token-DATumkKN.js} +0 -0
- /package/dist/{auth-token-DpULas_n.js → auth-token-NZQN5y-U.js} +0 -0
- /package/dist/{catalog-DAXVp4Hp.js → catalog-2EmOju0o.js} +0 -0
- /package/dist/{channels-status-issues-DanmEwDB.js → channels-status-issues-C4ciBh-M.js} +0 -0
- /package/dist/{channels-status-issues-COukP8Y6.js → channels-status-issues-xbZicfvF.js} +0 -0
- /package/dist/{clipboard-C0XDE_OY.js → clipboard-DHic8nRu.js} +0 -0
- /package/dist/{clipboard-B7hFDaBm.js → clipboard-DuDW3vYo.js} +0 -0
- /package/dist/{config-validation-CQ0H2AMy.js → config-validation-B1DoZdes.js} +0 -0
- /package/dist/{config-validation-CVifNndy.js → config-validation-lwkaqwYa.js} +0 -0
- /package/dist/control-ui/_app/immutable/nodes/{11.Sd6L6Nq2.js → 12.Sd6L6Nq2.js} +0 -0
- /package/dist/control-ui/_app/immutable/nodes/{12.tVVXkjFh.js → 13.tVVXkjFh.js} +0 -0
- /package/dist/control-ui/_app/immutable/nodes/{13.D93_LX58.js → 14.D93_LX58.js} +0 -0
- /package/dist/control-ui/_app/immutable/nodes/{15.CIr4ejir.js → 16.CIr4ejir.js} +0 -0
- /package/dist/control-ui/_app/immutable/nodes/{16.QX2ielYQ.js → 17.QX2ielYQ.js} +0 -0
- /package/dist/control-ui/_app/immutable/nodes/{17.6qOW3iFE.js → 18.6qOW3iFE.js} +0 -0
- /package/dist/control-ui/_app/immutable/nodes/{6.B2G6IFSu.js → 7.B2G6IFSu.js} +0 -0
- /package/dist/control-ui/_app/immutable/nodes/{7.C7FQ9bAP.js → 8.C7FQ9bAP.js} +0 -0
- /package/dist/{control-ui-assets-DVRic6kO.js → control-ui-assets-DnNkT3mI.js} +0 -0
- /package/dist/{control-ui-assets-DDs6rXoP.js → control-ui-assets-LA1g8l2Z.js} +0 -0
- /package/dist/{cron-cli-CI-bQlmZ.js → cron-cli-DAFfUWqL.js} +0 -0
- /package/dist/{daemon-runtime-D4iQgg-u.js → daemon-runtime-diKhAkzH.js} +0 -0
- /package/dist/{dm-policy-shared-CVbsDo_m.js → dm-policy-shared-CwzTKPWR.js} +0 -0
- /package/dist/{dm-policy-shared-ClEAJ4JJ.js → dm-policy-shared-DfAxaWbA.js} +0 -0
- /package/dist/{docs-cli-uSamdGao.js → docs-cli-CmcfAiHF.js} +0 -0
- /package/dist/{docs-cli-BZGTgGrB.js → docs-cli-WYkzyw8T.js} +0 -0
- /package/dist/{format-C7-5KbO2.js → format-CTmea3zf.js} +0 -0
- /package/dist/{format-DBqU4ar8.js → format-wIeBvJLR.js} +0 -0
- /package/dist/{gmail-setup-utils-ZFcCjPly.js → gmail-setup-utils-C4IVVrZO.js} +0 -0
- /package/dist/{gmail-setup-utils-DhpSrQNl.js → gmail-setup-utils-Rfb3FX0J.js} +0 -0
- /package/dist/{health-format-if3Q3vD2.js → health-format-S-b7sQsV.js} +0 -0
- /package/dist/{health-format-BC_LUyJS.js → health-format-azWJfp5e.js} +0 -0
- /package/dist/{helpers-BMqFgDx8.js → helpers-CRF4tyVM.js} +0 -0
- /package/dist/{helpers-BIUvY7vn.js → helpers-Npa3_iL5.js} +0 -0
- /package/dist/{helpers-Ctj8giHC.js → helpers-xdkmLQDw.js} +0 -0
- /package/dist/{ipv4-CVdlCn-2.js → ipv4-C52gDH2M.js} +0 -0
- /package/dist/{ipv4-JtDdwuHX.js → ipv4-Dz51vmVq.js} +0 -0
- /package/dist/{logging-DhPrhYzz.js → logging-C8-t269D.js} +0 -0
- /package/dist/{logging-91m0KJMN.js → logging-D59-dc0L.js} +0 -0
- /package/dist/{login-qr-4D0SkvgJ.js → login-qr-Bhy40v7Q.js} +0 -0
- /package/dist/{login-qr-Cx7POWvS.js → login-qr-DFnPwMt5.js} +0 -0
- /package/dist/{model-param-b-B6FHfgGB.js → model-param-b-CMJBkHox.js} +0 -0
- /package/dist/{model-param-b-YCqgSBAn.js → model-param-b-CtugMKF_.js} +0 -0
- /package/dist/{note-DLcYjdh7.js → note-COLxJd1A.js} +0 -0
- /package/dist/{note-B8g6kl8x.js → note-DewoEWtc.js} +0 -0
- /package/dist/{onboard-config-7cR7QGjL.js → onboard-config-BZIxuZ7r.js} +0 -0
- /package/dist/{onboard-config-DeF7eIAr.js → onboard-config-C5M0ze8s.js} +0 -0
- /package/dist/{parse-log-line-C6yJx969.js → parse-log-line-C2bNfwG3.js} +0 -0
- /package/dist/{parse-log-line-C7ynn72M.js → parse-log-line-DvyqdjCI.js} +0 -0
- /package/dist/{parse-port-C02PeAGr.js → parse-port-BnVa643B.js} +0 -0
- /package/dist/{parse-port-DnJYkByg.js → parse-port-QkaTJ4ru.js} +0 -0
- /package/dist/{path-safety-BEgQ9rq6.js → path-safety-BL0luniQ.js} +0 -0
- /package/dist/{path-safety-CP6a8uVu.js → path-safety-Yi1WxZLl.js} +0 -0
- /package/dist/{plugins-allowlist-CCpr61rO.js → plugins-allowlist-CLU_IjDy.js} +0 -0
- /package/dist/{plugins-allowlist-GsmzvLs7.js → plugins-allowlist-Ci7ynogX.js} +0 -0
- /package/dist/{ports-BsxTf9Nu.js → ports-DCcAHTa_.js} +0 -0
- /package/dist/{program-context-5q-A0wbP.js → program-context-Ds_91dTq.js} +0 -0
- /package/dist/{prompts-NOUgk6FH.js → prompts-C27EhvcG.js} +0 -0
- /package/dist/{prompts-m1IJwIAx.js → prompts-DbHSz44H.js} +0 -0
- /package/dist/{qmd-manager-C06_28MM.js → qmd-manager-3oLU7g8E.js} +0 -0
- /package/dist/{qmd-manager-BvV80INM.js → qmd-manager-C2OgnXnr.js} +0 -0
- /package/dist/{qr-cli-2Fy8laX0.js → qr-cli-C-M7Cr8-.js} +0 -0
- /package/dist/{qr-cli-snlmcHOZ.js → qr-cli-CFf4WwCt.js} +0 -0
- /package/dist/{rpc-B53Lst62.js → rpc-DhW1No2D.js} +0 -0
- /package/dist/{rpc-DOYJ1ToJ.js → rpc-wVn8a1qC.js} +0 -0
- /package/dist/{runtime-guard-Cs_ClFhP.js → runtime-guard-DOhPjoet.js} +0 -0
- /package/dist/{runtime-status-B3l0ReO9.js → runtime-status-D0P5lDGf.js} +0 -0
- /package/dist/{runtime-status-D6c3G7my.js → runtime-status-DKnpLP5Q.js} +0 -0
- /package/dist/{sandbox-cli-B2nWROn6.js → sandbox-cli-BZzO-G-E.js} +0 -0
- /package/dist/{sandbox-cli-C7vkwMnP.js → sandbox-cli-ner0PQZU.js} +0 -0
- /package/dist/{sessions-R_on4Zw8.js → sessions-DKM968hA.js} +0 -0
- /package/dist/{shared-BQtDR2KM.js → shared-C6D7PTpH.js} +0 -0
- /package/dist/{shared-BDiw3_ym.js → shared-TnZhahku.js} +0 -0
- /package/dist/{skill-scanner-Bheo_OM5.js → skill-scanner-CIuC1feQ.js} +0 -0
- /package/dist/{skill-scanner-CwX9i_5k.js → skill-scanner-DnsSvRKK.js} +0 -0
- /package/dist/{status-BUedPCLb.js → status-B8TZsG0t.js} +0 -0
- /package/dist/{status-TtGsgDjP.js → status-DmhrztXn.js} +0 -0
- /package/dist/{system-cli-BlP6wWBy.js → system-cli-BnE7tN9V.js} +0 -0
- /package/dist/{system-cli-BTjyT8Gj.js → system-cli-CWgd7EB8.js} +0 -0
- /package/dist/{system-run-command-BOJwzLhj.js → system-run-command-B8ZYVrSF.js} +0 -0
- /package/dist/{system-run-command-PyKttz6b.js → system-run-command-CPFFvnG3.js} +0 -0
- /package/dist/{systemd-CzUdukgB.js → systemd-DemAzd31.js} +0 -0
- /package/dist/{systemd-0aPKXWO6.js → systemd-DokFcnJ7.js} +0 -0
- /package/dist/{table-CnYUWV1p.js → table-CUa4MMQL.js} +0 -0
- /package/dist/{table-BUWXR5y-.js → table-D6Gdu916.js} +0 -0
- /package/dist/{tui-B3G_mrHY.js → tui-B0NcNHYX.js} +0 -0
- /package/dist/{tui-DVdma27Y.js → tui-pbn3ONIE.js} +0 -0
- /package/dist/{update-check-xr9SsfM1.js → update-check-DnX0d2ne.js} +0 -0
- /package/dist/{vllm-setup-CAy1vRJ-.js → vllm-setup-BNKMIbIo.js} +0 -0
- /package/dist/{vllm-setup-POm89Pya.js → vllm-setup-CDcd_nVe.js} +0 -0
- /package/dist/{widearea-dns-Ch3SpQBE.js → widearea-dns-5AVs3ht0.js} +0 -0
- /package/dist/{widearea-dns-D_JsGJ9_.js → widearea-dns-BiHqFzVe.js} +0 -0
- /package/dist/{workspace-BPoYjLyJ.js → workspace-C1EdIb-r.js} +0 -0
- /package/dist/{workspace-NVPAcG5w.js → workspace-IziJxxVr.js} +0 -0
|
@@ -2,7 +2,7 @@ import { _ as expandHomePrefix, g as resolveStateDir, i as isNixMode, l as resol
|
|
|
2
2
|
import { B as getResolvedLoggerSettings, D as isPlainObject, E as truncateUtf16Safe, P as setVerbose, R as getChildLogger, S as shortenHomePath, c as ensureDir, r as clamp, t as CONFIG_DIR, y as resolveUserPath, z as getLogger } from "./utils-cLdsPM0M.js";
|
|
3
3
|
import { n as isRich, r as theme, t as colorize } from "./theme-CvDUwCeH.js";
|
|
4
4
|
import { a as normalizeElevatedLevel, c as normalizeUsageDisplay, d as supportsXHighThinking, l as normalizeVerboseLevel, n as formatXHighModelHint, o as normalizeReasoningLevel, s as normalizeThinkLevel, t as formatThinkingLevels } from "./thinking-B3X4Pu2T.js";
|
|
5
|
-
import { $ as normalizeOptionalAgentId, $n as CommandLane, $t as isExternalHookSession, A as resolveOutboundSessionRoute, An as getAgentRunContext, At as sleepWithAbort, B as setGatewaySigusr1RestartPolicy, Bn as resolveTtsPrefsPath, Bt as normalizeSendPolicy, C as loadCombinedSessionStoreForGateway, Cn as countActiveDescendantRuns, Cr as normalizeMimeList, D as resolveSessionModelRef, Dn as runSubagentAnnounceFlow, Dt as readJsonBodyWithLimit, E as resolveGatewaySessionStoreTarget, Er as resolveAgentTimeoutMs, Et as handleSlackHttpRequest, F as deferGatewayRestartUntilIdle, Fn as isTtsEnabled, Gn as OPENAI_TTS_MODELS, Gt as getCliSessionId, H as consumeRestartSentinel, Hn as setTtsEnabled, Ht as createDefaultDeps, I as emitGatewayRestart, In as isTtsProviderConfigured, J as writeRestartSentinel, K as summarizeRestartSentinel, Kn as OPENAI_TTS_VOICES, Kt as setCliSessionId, L as isGatewaySigusr1RestartExternallyAllowed, Ln as resolveTtsApiKey, Lt as resolveOutboundTarget, M as resetDirectoryCache, Mn as registerAgentRunContext, Nn as resolveUserTimezone, Nt as resolveAgentDeliveryPlan, On as clearAgentRunContext, Ot as requestBodyErrorToText, P as consumeGatewaySigusr1RestartAuthorization, Pn as getTtsProvider, Pt as resolveAgentOutboundTarget, Q as inferLegacyName, Qn as waitForActiveTasks, Qt as getHookType, R as markGatewaySigusr1RestartHandled, Rn as resolveTtsAutoMode, Rt as resolveSessionDeliveryTarget, S as listSessionsFromStore, Sr as extractImageContentFromSource, T as pruneLegacyStoreKeys, Tn as listDescendantRunsForRequester, U as formatDoctorNonInteractiveHint, Un as setTtsProvider, Ut as createOutboundSendDeps$1, V as setPreRestartDeferralCheck, Vn as resolveTtsProviderOrder, Vt as resolveSendPolicy, W as formatRestartSentinelMessage, Wn as textToSpeech, Wt as runWithModelFallback, X as normalizeCronJobCreate, Xn as resetAllLanes, Xt as buildSafeExternalPrompt, Y as normalizeHttpWebhookUrl, Yn as getTotalQueueSize, Z as normalizeCronJobPatch, Zn as setCommandLaneConcurrency, Zt as detectSuspiciousPatterns, _ as readLatestAssistantReply, _r as DEFAULT_INPUT_IMAGE_MAX_BYTES, _t as loadOpenClawPlugins, ar as lookupContextTokens, at as buildDeliveryFromLegacyPayload, bn as stopSubagentsForRequester, br as DEFAULT_INPUT_TIMEOUT_MS, c as clearSessionQueues, cn as dispatchInboundMessage, d as getActiveEmbeddedRunCount, dr as applyVerboseOverride, dt as persistBrowserProxyFiles, er as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, et as normalizeOptionalSessionKey, f as waitForEmbeddedPiRunEnd, fr as parseVerboseOverride, ft as requestHeartbeatNow, g as createOpenClawTools, gn as formatZonedTimestamp, ht as getPluginToolMeta, i as resolveCronStyleNow, ir as stripHeartbeatToken, it as migrateLegacyCronPayload, jn as onAgentEvent, jt as agentCommand, k as ensureOutboundSessionEntry, kn as emitAgentEvent, kt as computeBackoff, l as runEmbeddedPiAgent, ln as createReplyDispatcher, m as buildDefaultToolPolicyPipelineSteps, mr as isSystemEventContextChanged, n as BARE_SESSION_RESET_PROMPT, nt as normalizePayloadToSystemText, ot as hasLegacyDeliveryHints, p as applyToolPolicyPipeline, pr as enqueueSystemEvent, qn as getActiveTaskCount, qt as runCliAgent, rn as buildHistoryContextFromEntries, rt as normalizeRequiredName, st as stripLegacyDeliveryFields, tt as normalizeOptionalText, u as abortEmbeddedPiRun, un as getTotalPendingReplies, ur as applyModelOverrideToSessionEntry, ut as applyBrowserProxyPaths, v as resolveAnnounceTargetFromKey, vr as DEFAULT_INPUT_IMAGE_MIMES, w as loadSessionEntry, wn as initSubagentRegistry, wr as resolveInputFileLimits, x as listAgentsForGateway, xr as extractFileContentFromSource, xt as loadProviderUsageSummary, y as canonicalizeSpawnedByForAgent, yn as isAbortTrigger, yr as DEFAULT_INPUT_MAX_REDIRECTS, yt as normalizeGroupActivation, z as scheduleGatewaySigusr1Restart, zn as resolveTtsConfig, zt as createOutboundSendDeps } from "./reply-
|
|
5
|
+
import { $ as normalizeOptionalAgentId, $n as CommandLane, $t as isExternalHookSession, A as resolveOutboundSessionRoute, An as getAgentRunContext, At as sleepWithAbort, B as setGatewaySigusr1RestartPolicy, Bn as resolveTtsPrefsPath, Bt as normalizeSendPolicy, C as loadCombinedSessionStoreForGateway, Cn as countActiveDescendantRuns, Cr as normalizeMimeList, D as resolveSessionModelRef, Dn as runSubagentAnnounceFlow, Dt as readJsonBodyWithLimit, E as resolveGatewaySessionStoreTarget, Er as resolveAgentTimeoutMs, Et as handleSlackHttpRequest, F as deferGatewayRestartUntilIdle, Fn as isTtsEnabled, Gn as OPENAI_TTS_MODELS, Gt as getCliSessionId, H as consumeRestartSentinel, Hn as setTtsEnabled, Ht as createDefaultDeps, I as emitGatewayRestart, In as isTtsProviderConfigured, J as writeRestartSentinel, K as summarizeRestartSentinel, Kn as OPENAI_TTS_VOICES, Kt as setCliSessionId, L as isGatewaySigusr1RestartExternallyAllowed, Ln as resolveTtsApiKey, Lt as resolveOutboundTarget, M as resetDirectoryCache, Mn as registerAgentRunContext, Nn as resolveUserTimezone, Nt as resolveAgentDeliveryPlan, On as clearAgentRunContext, Ot as requestBodyErrorToText, P as consumeGatewaySigusr1RestartAuthorization, Pn as getTtsProvider, Pt as resolveAgentOutboundTarget, Q as inferLegacyName, Qn as waitForActiveTasks, Qt as getHookType, R as markGatewaySigusr1RestartHandled, Rn as resolveTtsAutoMode, Rt as resolveSessionDeliveryTarget, S as listSessionsFromStore, Sr as extractImageContentFromSource, T as pruneLegacyStoreKeys, Tn as listDescendantRunsForRequester, U as formatDoctorNonInteractiveHint, Un as setTtsProvider, Ut as createOutboundSendDeps$1, V as setPreRestartDeferralCheck, Vn as resolveTtsProviderOrder, Vt as resolveSendPolicy, W as formatRestartSentinelMessage, Wn as textToSpeech, Wt as runWithModelFallback, X as normalizeCronJobCreate, Xn as resetAllLanes, Xt as buildSafeExternalPrompt, Y as normalizeHttpWebhookUrl, Yn as getTotalQueueSize, Z as normalizeCronJobPatch, Zn as setCommandLaneConcurrency, Zt as detectSuspiciousPatterns, _ as readLatestAssistantReply, _r as DEFAULT_INPUT_IMAGE_MAX_BYTES, _t as loadOpenClawPlugins, ar as lookupContextTokens, at as buildDeliveryFromLegacyPayload, bn as stopSubagentsForRequester, br as DEFAULT_INPUT_TIMEOUT_MS, c as clearSessionQueues, cn as dispatchInboundMessage, d as getActiveEmbeddedRunCount, dr as applyVerboseOverride, dt as persistBrowserProxyFiles, er as DEFAULT_HEARTBEAT_ACK_MAX_CHARS, et as normalizeOptionalSessionKey, f as waitForEmbeddedPiRunEnd, fr as parseVerboseOverride, ft as requestHeartbeatNow, g as createOpenClawTools, gn as formatZonedTimestamp, ht as getPluginToolMeta, i as resolveCronStyleNow, ir as stripHeartbeatToken, it as migrateLegacyCronPayload, jn as onAgentEvent, jt as agentCommand, k as ensureOutboundSessionEntry, kn as emitAgentEvent, kt as computeBackoff, l as runEmbeddedPiAgent, ln as createReplyDispatcher, m as buildDefaultToolPolicyPipelineSteps, mr as isSystemEventContextChanged, n as BARE_SESSION_RESET_PROMPT, nt as normalizePayloadToSystemText, ot as hasLegacyDeliveryHints, p as applyToolPolicyPipeline, pr as enqueueSystemEvent, qn as getActiveTaskCount, qt as runCliAgent, rn as buildHistoryContextFromEntries, rt as normalizeRequiredName, st as stripLegacyDeliveryFields, tt as normalizeOptionalText, u as abortEmbeddedPiRun, un as getTotalPendingReplies, ur as applyModelOverrideToSessionEntry, ut as applyBrowserProxyPaths, v as resolveAnnounceTargetFromKey, vr as DEFAULT_INPUT_IMAGE_MIMES, w as loadSessionEntry, wn as initSubagentRegistry, wr as resolveInputFileLimits, x as listAgentsForGateway, xr as extractFileContentFromSource, xt as loadProviderUsageSummary, y as canonicalizeSpawnedByForAgent, yn as isAbortTrigger, yr as DEFAULT_INPUT_MAX_REDIRECTS, yt as normalizeGroupActivation, z as scheduleGatewaySigusr1Restart, zn as resolveTtsConfig, zt as createOutboundSendDeps } from "./reply-BNfv4Ttn.js";
|
|
6
6
|
import { b as isSubagentSessionKey, d as resolveAgentIdFromSessionKey, h as toAgentStoreSessionKey, i as buildAgentMainSessionKey, l as normalizeAgentId, m as toAgentRequestSessionKey, n as DEFAULT_AGENT_ID, s as classifySessionKeyShape, t as DEFAULT_ACCOUNT_ID, u as normalizeMainKey, v as isCronRunSessionKey, x as parseAgentSessionKey } from "./session-key-DAZmp8ll.js";
|
|
7
7
|
import { r as matchesSkillFilter, t as resolveOpenClawPackageRoot } from "./openclaw-root-ColUA4L7.js";
|
|
8
8
|
import { C as createInternalHookEvent, S as clearInternalHooks, T as triggerInternalHook, d as getActivePluginRegistry, m as createEmptyPluginRegistry, r as DEFAULT_CHAT_CHANNEL, t as CHANNEL_IDS, w as registerInternalHook } from "./registry-DDRoNo5B.js";
|
|
@@ -20,7 +20,7 @@ import "./send-ClCfv1Nb.js";
|
|
|
20
20
|
import { B as resolveSubagentMaxConcurrent, C as parseDurationMs, H as resolveRuntimeServiceVersion, N as applyMergePatch, P as applyLegacyMigrations, S as sensitive, V as VERSION, a as parseConfigJson5, c as resolveConfigSnapshotHash, d as OpenClawSchema, i as loadConfig, l as writeConfigFile, n as migrateLegacyConfig, o as readConfigFileSnapshot, r as createConfigIO, s as readConfigFileSnapshotForWrite, u as validateConfigObjectWithPlugins, z as resolveAgentMaxConcurrent } from "./config-CfZKt-lz.js";
|
|
21
21
|
import { a as isPathInsideWithRealpath } from "./legacy-names-BIsQcGF_.js";
|
|
22
22
|
import { l as isTestDefaultMemorySlotDisabled } from "./manifest-registry-Dc6dLoSA.js";
|
|
23
|
-
import { d as registerUnhandledRejectionHandler } from "./runner-
|
|
23
|
+
import { d as registerUnhandledRejectionHandler } from "./runner-DZGwjCQ8.js";
|
|
24
24
|
import "./image-Cubocx3K.js";
|
|
25
25
|
import "./models-config-DtKtMZJY.js";
|
|
26
26
|
import "./pi-model-discovery-Bakt-Qrp.js";
|
|
@@ -63,8 +63,8 @@ import "./tool-display-7iDQNAJ5.js";
|
|
|
63
63
|
import { t as fetchWithSsrFGuard } from "./fetch-guard-BVr_v0Vr.js";
|
|
64
64
|
import "./api-key-rotation-BpUXNMYn.js";
|
|
65
65
|
import "./local-roots-Cze75B7o.js";
|
|
66
|
-
import "./sqlite-BGYD8ULr.js";
|
|
67
|
-
import { n as loadModelCatalog } from "./model-catalog-
|
|
66
|
+
import { t as requireNodeSqlite } from "./sqlite-BGYD8ULr.js";
|
|
67
|
+
import { n as loadModelCatalog } from "./model-catalog-CbowpOxX.js";
|
|
68
68
|
import { n as SILENT_REPLY_TOKEN, r as isSilentReplyText } from "./tokens-dp8h1iSk.js";
|
|
69
69
|
import { n as createBrowserRouteDispatcher, r as getMachineDisplayName } from "./with-timeout-Con3HGLp.js";
|
|
70
70
|
import { C as getGlobalHookRunner, T as runGlobalGatewayStopSafely, o as normalizeReplyPayloadsForDelivery, t as deliverOutboundPayloads } from "./deliver-Dy_w9w-y.js";
|
|
@@ -73,7 +73,7 @@ import "./diagnostic-session-state-Cmft6aFp.js";
|
|
|
73
73
|
import "./send-YNV1KCGc.js";
|
|
74
74
|
import "./model-CWyK3rP8.js";
|
|
75
75
|
import { a as resolveAgentIdentity, t as createReplyPrefixOptions } from "./reply-prefix-qYNJ-Dun.js";
|
|
76
|
-
import { i as resolveMemoryBackendConfig, r as getMemorySearchManager } from "./memory-cli-
|
|
76
|
+
import { i as resolveMemoryBackendConfig, r as getMemorySearchManager } from "./memory-cli-BuqY12GX.js";
|
|
77
77
|
import { n as resolveMemorySearchConfig } from "./manager-zXFSa7G6.js";
|
|
78
78
|
import "./retry-BfUkac0g.js";
|
|
79
79
|
import "./chunk-DyTaAomH.js";
|
|
@@ -121,42 +121,42 @@ import { t as buildChannelUiCatalog } from "./catalog-Ce6N7fVU.js";
|
|
|
121
121
|
import { t as buildWorkspaceSkillStatus } from "./skills-status-Dfz_xnsm.js";
|
|
122
122
|
import { n as DEFAULT_GATEWAY_HTTP_TOOL_DENY } from "./dangerous-tools-m4gs9MB5.js";
|
|
123
123
|
import { n as inheritOptionFromParent } from "./command-options-DOOvAdsg.js";
|
|
124
|
-
import { t as WizardCancelledError } from "./prompts-
|
|
125
|
-
import { t as resolveChannelDefaultAccountId } from "./helpers-
|
|
126
|
-
import { t as applyPluginAutoEnable } from "./plugin-auto-enable-
|
|
127
|
-
import "./install-safe-path-
|
|
128
|
-
import "./skill-scanner-
|
|
129
|
-
import { t as buildChannelAccountSnapshot } from "./status-
|
|
130
|
-
import "./channels-status-issues-
|
|
131
|
-
import "./daemon-runtime-
|
|
132
|
-
import "./systemd-
|
|
133
|
-
import "./service-
|
|
134
|
-
import "./lifecycle-core-
|
|
135
|
-
import "./systemd-hints-
|
|
136
|
-
import { t as parsePort$1 } from "./parse-port-
|
|
137
|
-
import "./runners-
|
|
138
|
-
import "./diagnostics-
|
|
139
|
-
import { n as addGatewayServiceCommands } from "./daemon-cli-
|
|
140
|
-
import "./table-
|
|
141
|
-
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-
|
|
142
|
-
import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-
|
|
143
|
-
import { c as probeGateway, o as isNodeCommandAllowed, s as resolveNodeCommandAllowlist } from "./audit-
|
|
144
|
-
import { t as discoverGatewayBeacons } from "./bonjour-discovery-
|
|
145
|
-
import { n as getStatusSummary, r as pickGatewaySelfPresence } from "./status
|
|
146
|
-
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, s as setHeartbeatsEnabled, t as formatHealthChannelLines } from "./health-
|
|
147
|
-
import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-
|
|
148
|
-
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-
|
|
149
|
-
import { t as runOnboardingWizard } from "./onboarding-
|
|
150
|
-
import { a as sendApnsAlert, c as parseMessageWithAttachments, d as shouldLogWs, f as summarizeAgentEventForWsLog, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, p as setGatewayWsLogStyle, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration, u as logWs } from "./push-apns-
|
|
151
|
-
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-
|
|
152
|
-
import { a as pruneAgentConfig, i as loadAgentIdentity, r as findAgentEntryIndex, s as loadAgentIdentityFromWorkspace, t as applyAgentConfig } from "./agents.config-
|
|
153
|
-
import "./dm-policy-shared-
|
|
154
|
-
import "./node-service-
|
|
155
|
-
import "./status.update-
|
|
156
|
-
import { n as validateSystemRunCommandConsistency, t as formatExecCommand } from "./system-run-command-
|
|
157
|
-
import { t as installSkill } from "./skills-install-
|
|
158
|
-
import { n as runGatewayUpdate, t as resolveAgentSessionDirs } from "./session-dirs-
|
|
159
|
-
import { i as shouldIncludeHook, r as resolveHookConfig, t as loadWorkspaceHookEntries } from "./workspace-
|
|
124
|
+
import { t as WizardCancelledError } from "./prompts-C27EhvcG.js";
|
|
125
|
+
import { t as resolveChannelDefaultAccountId } from "./helpers-xdkmLQDw.js";
|
|
126
|
+
import { t as applyPluginAutoEnable } from "./plugin-auto-enable-CgzsK3UF.js";
|
|
127
|
+
import "./install-safe-path-BUZoxvjo.js";
|
|
128
|
+
import "./skill-scanner-DnsSvRKK.js";
|
|
129
|
+
import { t as buildChannelAccountSnapshot } from "./status-DmhrztXn.js";
|
|
130
|
+
import "./channels-status-issues-xbZicfvF.js";
|
|
131
|
+
import "./daemon-runtime-diKhAkzH.js";
|
|
132
|
+
import "./systemd-DokFcnJ7.js";
|
|
133
|
+
import "./service-7TtUcMJq.js";
|
|
134
|
+
import "./lifecycle-core-DtN4Wg9p.js";
|
|
135
|
+
import "./systemd-hints-DKcj1qba.js";
|
|
136
|
+
import { t as parsePort$1 } from "./parse-port-BnVa643B.js";
|
|
137
|
+
import "./runners-GZYUkx-2.js";
|
|
138
|
+
import "./diagnostics-D7bn87xJ.js";
|
|
139
|
+
import { n as addGatewayServiceCommands } from "./daemon-cli-zo00dvxw.js";
|
|
140
|
+
import "./table-D6Gdu916.js";
|
|
141
|
+
import { n as resolveWideAreaDiscoveryDomain, r as writeWideAreaGatewayZone } from "./widearea-dns-5AVs3ht0.js";
|
|
142
|
+
import { i as toOptionString, n as extractGatewayMiskeys, r as maybeExplainGatewayServiceStop, t as describeUnknownError } from "./shared-CzoHL8EG.js";
|
|
143
|
+
import { c as probeGateway, o as isNodeCommandAllowed, s as resolveNodeCommandAllowlist } from "./audit-qELipjtd.js";
|
|
144
|
+
import { t as discoverGatewayBeacons } from "./bonjour-discovery-D7009yxB.js";
|
|
145
|
+
import { n as getStatusSummary, r as pickGatewaySelfPresence } from "./status--mrN_W_U.js";
|
|
146
|
+
import { c as startHeartbeatRunner, i as styleHealthChannelLine, n as getHealthSnapshot, o as runHeartbeatOnce, s as setHeartbeatsEnabled, t as formatHealthChannelLines } from "./health-HfXeNmAj.js";
|
|
147
|
+
import { a as resolveControlUiRootSync, i as resolveControlUiRootOverrideSync, t as ensureControlUiAssetsBuilt } from "./control-ui-assets-LA1g8l2Z.js";
|
|
148
|
+
import { a as resolveNpmChannelTag, c as DEFAULT_PACKAGE_CHANNEL, m as normalizeUpdateChannel, n as compareSemverStrings, t as checkUpdateStatus } from "./update-check-DnX0d2ne.js";
|
|
149
|
+
import { t as runOnboardingWizard } from "./onboarding-JoS3gVBZ.js";
|
|
150
|
+
import { a as sendApnsAlert, c as parseMessageWithAttachments, d as shouldLogWs, f as summarizeAgentEventForWsLog, i as resolveApnsAuthConfigFromEnv, l as formatForLog, n as normalizeApnsEnvironment, o as sendApnsBackgroundWake, p as setGatewayWsLogStyle, s as normalizeRpcAttachmentsToChatAttachments, t as loadApnsRegistration, u as logWs } from "./push-apns-CBVQ1O88.js";
|
|
151
|
+
import { T as resolveGmailHookRuntimeConfig, _ as buildGogWatchServeArgs, i as ensureTailscaleEndpoint, v as buildGogWatchStartArgs } from "./gmail-setup-utils-Rfb3FX0J.js";
|
|
152
|
+
import { a as pruneAgentConfig, i as loadAgentIdentity, r as findAgentEntryIndex, s as loadAgentIdentityFromWorkspace, t as applyAgentConfig } from "./agents.config-sDVfdzxD.js";
|
|
153
|
+
import "./dm-policy-shared-CwzTKPWR.js";
|
|
154
|
+
import "./node-service-DMNdtnuy.js";
|
|
155
|
+
import "./status.update-s8H29Man.js";
|
|
156
|
+
import { n as validateSystemRunCommandConsistency, t as formatExecCommand } from "./system-run-command-B8ZYVrSF.js";
|
|
157
|
+
import { t as installSkill } from "./skills-install-DZ5aRsyP.js";
|
|
158
|
+
import { n as runGatewayUpdate, t as resolveAgentSessionDirs } from "./session-dirs-CIPNs4EK.js";
|
|
159
|
+
import { i as shouldIncludeHook, r as resolveHookConfig, t as loadWorkspaceHookEntries } from "./workspace-C1EdIb-r.js";
|
|
160
160
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
161
161
|
import * as fsSync from "node:fs";
|
|
162
162
|
import fs from "node:fs";
|
|
@@ -918,7 +918,7 @@ function truncateCloseReason(reason, maxBytes = CLOSE_REASON_MAX_BYTES) {
|
|
|
918
918
|
|
|
919
919
|
//#endregion
|
|
920
920
|
//#region src/infra/exec-approval-forwarder.ts
|
|
921
|
-
const log$
|
|
921
|
+
const log$8 = createSubsystemLogger("gateway/exec-approvals");
|
|
922
922
|
const DEFAULT_MODE = "session";
|
|
923
923
|
function normalizeMode(mode) {
|
|
924
924
|
return mode ?? DEFAULT_MODE;
|
|
@@ -1036,7 +1036,7 @@ async function deliverToTargets(params) {
|
|
|
1036
1036
|
payloads: [{ text: params.text }]
|
|
1037
1037
|
});
|
|
1038
1038
|
} catch (err) {
|
|
1039
|
-
log$
|
|
1039
|
+
log$8.error(`exec approvals: failed to deliver to ${channel}:${target.to}: ${String(err)}`);
|
|
1040
1040
|
}
|
|
1041
1041
|
});
|
|
1042
1042
|
await Promise.allSettled(deliveries);
|
|
@@ -1271,7 +1271,7 @@ function scheduleGatewayUpdateCheck(params) {
|
|
|
1271
1271
|
|
|
1272
1272
|
//#endregion
|
|
1273
1273
|
//#region src/gateway/channel-health-monitor.ts
|
|
1274
|
-
const log$
|
|
1274
|
+
const log$7 = createSubsystemLogger("gateway/health-monitor");
|
|
1275
1275
|
const DEFAULT_CHECK_INTERVAL_MS = 5 * 6e4;
|
|
1276
1276
|
const DEFAULT_STARTUP_GRACE_MS = 6e4;
|
|
1277
1277
|
const DEFAULT_COOLDOWN_CYCLES = 2;
|
|
@@ -1320,11 +1320,11 @@ function startChannelHealthMonitor(deps) {
|
|
|
1320
1320
|
if (now - record.lastRestartAt <= cooldownMs) continue;
|
|
1321
1321
|
pruneOldRestarts(record, now);
|
|
1322
1322
|
if (record.restartsThisHour.length >= maxRestartsPerHour) {
|
|
1323
|
-
log$
|
|
1323
|
+
log$7.warn?.(`[${channelId}:${accountId}] health-monitor: hit ${maxRestartsPerHour} restarts/hour limit, skipping`);
|
|
1324
1324
|
continue;
|
|
1325
1325
|
}
|
|
1326
1326
|
const reason = !status.running ? status.reconnectAttempts && status.reconnectAttempts >= 10 ? "gave-up" : "stopped" : "stuck";
|
|
1327
|
-
log$
|
|
1327
|
+
log$7.info?.(`[${channelId}:${accountId}] health-monitor: restarting (reason: ${reason})`);
|
|
1328
1328
|
try {
|
|
1329
1329
|
if (status.running) await channelManager.stopChannel(channelId, accountId);
|
|
1330
1330
|
channelManager.resetRestartAttempts(channelId, accountId);
|
|
@@ -1333,7 +1333,7 @@ function startChannelHealthMonitor(deps) {
|
|
|
1333
1333
|
record.restartsThisHour.push({ at: now });
|
|
1334
1334
|
restartRecords.set(key, record);
|
|
1335
1335
|
} catch (err) {
|
|
1336
|
-
log$
|
|
1336
|
+
log$7.error?.(`[${channelId}:${accountId}] health-monitor: restart failed: ${String(err)}`);
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
@@ -1353,7 +1353,7 @@ function startChannelHealthMonitor(deps) {
|
|
|
1353
1353
|
abortSignal?.addEventListener("abort", stop, { once: true });
|
|
1354
1354
|
timer = setInterval(() => void runCheck(), checkIntervalMs);
|
|
1355
1355
|
if (typeof timer === "object" && "unref" in timer) timer.unref();
|
|
1356
|
-
log$
|
|
1356
|
+
log$7.info?.(`started (interval: ${Math.round(checkIntervalMs / 1e3)}s, grace: ${Math.round(startupGraceMs / 1e3)}s)`);
|
|
1357
1357
|
}
|
|
1358
1358
|
return { stop };
|
|
1359
1359
|
}
|
|
@@ -2527,7 +2527,7 @@ function createAgentEventHandler({ broadcast, broadcastToConnIds, nodeSendToSess
|
|
|
2527
2527
|
* Automatically starts `gog gmail watch serve` when the gateway starts,
|
|
2528
2528
|
* if hooks.gmail is configured with an account.
|
|
2529
2529
|
*/
|
|
2530
|
-
const log$
|
|
2530
|
+
const log$6 = createSubsystemLogger("gmail-watcher");
|
|
2531
2531
|
const ADDRESS_IN_USE_RE = /address already in use|EADDRINUSE/i;
|
|
2532
2532
|
function isAddressInUseError(line) {
|
|
2533
2533
|
return ADDRESS_IN_USE_RE.test(line);
|
|
@@ -2551,13 +2551,13 @@ async function startGmailWatch(cfg) {
|
|
|
2551
2551
|
const result = await runCommandWithTimeout(args, { timeoutMs: 12e4 });
|
|
2552
2552
|
if (result.code !== 0) {
|
|
2553
2553
|
const message = result.stderr || result.stdout || "gog watch start failed";
|
|
2554
|
-
log$
|
|
2554
|
+
log$6.error(`watch start failed: ${message}`);
|
|
2555
2555
|
return false;
|
|
2556
2556
|
}
|
|
2557
|
-
log$
|
|
2557
|
+
log$6.info(`watch started for ${cfg.account}`);
|
|
2558
2558
|
return true;
|
|
2559
2559
|
} catch (err) {
|
|
2560
|
-
log$
|
|
2560
|
+
log$6.error(`watch start error: ${String(err)}`);
|
|
2561
2561
|
return false;
|
|
2562
2562
|
}
|
|
2563
2563
|
}
|
|
@@ -2566,7 +2566,7 @@ async function startGmailWatch(cfg) {
|
|
|
2566
2566
|
*/
|
|
2567
2567
|
function spawnGogServe(cfg) {
|
|
2568
2568
|
const args = buildGogWatchServeArgs(cfg);
|
|
2569
|
-
log$
|
|
2569
|
+
log$6.info(`starting gog ${args.join(" ")}`);
|
|
2570
2570
|
let addressInUse = false;
|
|
2571
2571
|
const child = spawn("gog", args, {
|
|
2572
2572
|
stdio: [
|
|
@@ -2578,25 +2578,25 @@ function spawnGogServe(cfg) {
|
|
|
2578
2578
|
});
|
|
2579
2579
|
child.stdout?.on("data", (data) => {
|
|
2580
2580
|
const line = data.toString().trim();
|
|
2581
|
-
if (line) log$
|
|
2581
|
+
if (line) log$6.info(`[gog] ${line}`);
|
|
2582
2582
|
});
|
|
2583
2583
|
child.stderr?.on("data", (data) => {
|
|
2584
2584
|
const line = data.toString().trim();
|
|
2585
2585
|
if (!line) return;
|
|
2586
2586
|
if (isAddressInUseError(line)) addressInUse = true;
|
|
2587
|
-
log$
|
|
2587
|
+
log$6.warn(`[gog] ${line}`);
|
|
2588
2588
|
});
|
|
2589
2589
|
child.on("error", (err) => {
|
|
2590
|
-
log$
|
|
2590
|
+
log$6.error(`gog process error: ${String(err)}`);
|
|
2591
2591
|
});
|
|
2592
2592
|
child.on("exit", (code, signal) => {
|
|
2593
2593
|
if (shuttingDown) return;
|
|
2594
2594
|
if (addressInUse) {
|
|
2595
|
-
log$
|
|
2595
|
+
log$6.warn("gog serve failed to bind (address already in use); stopping restarts. Another watcher is likely running. Set OPENCLAW_SKIP_GMAIL_WATCHER=1 or stop the other process.");
|
|
2596
2596
|
watcherProcess = null;
|
|
2597
2597
|
return;
|
|
2598
2598
|
}
|
|
2599
|
-
log$
|
|
2599
|
+
log$6.warn(`gog exited (code=${code}, signal=${signal}); restarting in 5s`);
|
|
2600
2600
|
watcherProcess = null;
|
|
2601
2601
|
setTimeout(() => {
|
|
2602
2602
|
if (shuttingDown || !currentConfig) return;
|
|
@@ -2636,15 +2636,15 @@ async function startGmailWatcher(cfg) {
|
|
|
2636
2636
|
port: runtimeConfig.serve.port,
|
|
2637
2637
|
target: runtimeConfig.tailscale.target
|
|
2638
2638
|
});
|
|
2639
|
-
log$
|
|
2639
|
+
log$6.info(`tailscale ${runtimeConfig.tailscale.mode} configured for port ${runtimeConfig.serve.port}`);
|
|
2640
2640
|
} catch (err) {
|
|
2641
|
-
log$
|
|
2641
|
+
log$6.error(`tailscale setup failed: ${String(err)}`);
|
|
2642
2642
|
return {
|
|
2643
2643
|
started: false,
|
|
2644
2644
|
reason: `tailscale setup failed: ${String(err)}`
|
|
2645
2645
|
};
|
|
2646
2646
|
}
|
|
2647
|
-
if (!await startGmailWatch(runtimeConfig)) log$
|
|
2647
|
+
if (!await startGmailWatch(runtimeConfig)) log$6.warn("gmail watch start failed, but continuing with serve");
|
|
2648
2648
|
shuttingDown = false;
|
|
2649
2649
|
watcherProcess = spawnGogServe(runtimeConfig);
|
|
2650
2650
|
const renewMs = runtimeConfig.renewEveryMinutes * 6e4;
|
|
@@ -2652,7 +2652,7 @@ async function startGmailWatcher(cfg) {
|
|
|
2652
2652
|
if (shuttingDown) return;
|
|
2653
2653
|
startGmailWatch(runtimeConfig);
|
|
2654
2654
|
}, renewMs);
|
|
2655
|
-
log$
|
|
2655
|
+
log$6.info(`gmail watcher started for ${runtimeConfig.account} (renew every ${runtimeConfig.renewEveryMinutes}m)`);
|
|
2656
2656
|
return { started: true };
|
|
2657
2657
|
}
|
|
2658
2658
|
/**
|
|
@@ -2665,7 +2665,7 @@ async function stopGmailWatcher() {
|
|
|
2665
2665
|
renewInterval = null;
|
|
2666
2666
|
}
|
|
2667
2667
|
if (watcherProcess) {
|
|
2668
|
-
log$
|
|
2668
|
+
log$6.info("stopping gmail watcher");
|
|
2669
2669
|
watcherProcess.kill("SIGTERM");
|
|
2670
2670
|
await new Promise((resolve) => {
|
|
2671
2671
|
const timeout = setTimeout(() => {
|
|
@@ -2680,7 +2680,7 @@ async function stopGmailWatcher() {
|
|
|
2680
2680
|
watcherProcess = null;
|
|
2681
2681
|
}
|
|
2682
2682
|
currentConfig = null;
|
|
2683
|
-
log$
|
|
2683
|
+
log$6.info("gmail watcher stopped");
|
|
2684
2684
|
}
|
|
2685
2685
|
|
|
2686
2686
|
//#endregion
|
|
@@ -6437,7 +6437,10 @@ const BASE_METHODS = [
|
|
|
6437
6437
|
"browser.request",
|
|
6438
6438
|
"chat.history",
|
|
6439
6439
|
"chat.abort",
|
|
6440
|
-
"chat.send"
|
|
6440
|
+
"chat.send",
|
|
6441
|
+
"audit.query",
|
|
6442
|
+
"audit.stats",
|
|
6443
|
+
"audit.prune"
|
|
6441
6444
|
];
|
|
6442
6445
|
function listGatewayMethods() {
|
|
6443
6446
|
const channelMethods = listChannelPlugins().flatMap((plugin) => plugin.gatewayMethods ?? []);
|
|
@@ -6465,6 +6468,200 @@ const GATEWAY_EVENTS = [
|
|
|
6465
6468
|
GATEWAY_EVENT_UPDATE_AVAILABLE
|
|
6466
6469
|
];
|
|
6467
6470
|
|
|
6471
|
+
//#endregion
|
|
6472
|
+
//#region src/audit/audit-logger.ts
|
|
6473
|
+
/**
|
|
6474
|
+
* Audit Logger — Phase 1 Security Foundation
|
|
6475
|
+
*
|
|
6476
|
+
* Singleton service for writing, querying, and pruning audit log events.
|
|
6477
|
+
* Uses node:sqlite (DatabaseSync) following the same pattern as memory/manager.ts.
|
|
6478
|
+
*/
|
|
6479
|
+
const log$5 = createSubsystemLogger("audit");
|
|
6480
|
+
const SCHEMA_SQL = `
|
|
6481
|
+
CREATE TABLE IF NOT EXISTS audit_log (
|
|
6482
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
6483
|
+
timestamp TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ','now')),
|
|
6484
|
+
actor_type TEXT NOT NULL,
|
|
6485
|
+
actor_id TEXT,
|
|
6486
|
+
action TEXT NOT NULL,
|
|
6487
|
+
resource TEXT,
|
|
6488
|
+
details TEXT,
|
|
6489
|
+
ip TEXT,
|
|
6490
|
+
result TEXT NOT NULL DEFAULT 'success',
|
|
6491
|
+
created_at INTEGER NOT NULL DEFAULT (unixepoch())
|
|
6492
|
+
);
|
|
6493
|
+
CREATE INDEX IF NOT EXISTS idx_audit_timestamp ON audit_log(created_at);
|
|
6494
|
+
CREATE INDEX IF NOT EXISTS idx_audit_actor ON audit_log(actor_id);
|
|
6495
|
+
CREATE INDEX IF NOT EXISTS idx_audit_action ON audit_log(action);
|
|
6496
|
+
`;
|
|
6497
|
+
let instance = null;
|
|
6498
|
+
var AuditLogger = class AuditLogger {
|
|
6499
|
+
constructor(opts) {
|
|
6500
|
+
this.db = null;
|
|
6501
|
+
this.pruneTimer = null;
|
|
6502
|
+
this.initialized = false;
|
|
6503
|
+
const stateDir = resolveStateDir(process.env);
|
|
6504
|
+
this.dbPath = opts?.dbPath ?? path.join(stateDir, "audit.db");
|
|
6505
|
+
this.retentionDays = opts?.retentionDays ?? 90;
|
|
6506
|
+
}
|
|
6507
|
+
/** Initialize the database and schema. Safe to call multiple times. */
|
|
6508
|
+
init() {
|
|
6509
|
+
if (this.initialized) return;
|
|
6510
|
+
try {
|
|
6511
|
+
const dir = path.dirname(this.dbPath);
|
|
6512
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
6513
|
+
const { DatabaseSync: SqliteDatabase } = requireNodeSqlite();
|
|
6514
|
+
this.db = new SqliteDatabase(this.dbPath);
|
|
6515
|
+
this.db.exec(SCHEMA_SQL);
|
|
6516
|
+
this.initialized = true;
|
|
6517
|
+
this.pruneTimer = setInterval(() => {
|
|
6518
|
+
try {
|
|
6519
|
+
this.prune(this.retentionDays);
|
|
6520
|
+
} catch (err) {
|
|
6521
|
+
log$5.warn(`auto-prune failed: ${String(err)}`);
|
|
6522
|
+
}
|
|
6523
|
+
}, 360 * 60 * 1e3);
|
|
6524
|
+
if (this.pruneTimer?.unref) this.pruneTimer.unref();
|
|
6525
|
+
try {
|
|
6526
|
+
this.prune(this.retentionDays);
|
|
6527
|
+
} catch {}
|
|
6528
|
+
log$5.info(`audit log initialized at ${this.dbPath}`);
|
|
6529
|
+
} catch (err) {
|
|
6530
|
+
log$5.warn(`audit logger failed to initialize: ${String(err)}`);
|
|
6531
|
+
this.initialized = false;
|
|
6532
|
+
}
|
|
6533
|
+
}
|
|
6534
|
+
/** Log an audit event. Non-blocking, never throws. */
|
|
6535
|
+
log(event) {
|
|
6536
|
+
try {
|
|
6537
|
+
if (!this.db) return;
|
|
6538
|
+
this.db.prepare(`INSERT INTO audit_log (actor_type, actor_id, action, resource, details, ip, result)
|
|
6539
|
+
VALUES (?, ?, ?, ?, ?, ?, ?)`).run(event.actor_type, event.actor_id ?? null, event.action, event.resource ?? null, event.details ?? null, event.ip ?? null, event.result ?? "success");
|
|
6540
|
+
} catch (err) {
|
|
6541
|
+
log$5.warn(`audit log write failed: ${String(err)}`);
|
|
6542
|
+
}
|
|
6543
|
+
}
|
|
6544
|
+
/** Query audit entries with filters. */
|
|
6545
|
+
query(filters = {}) {
|
|
6546
|
+
if (!this.db) return [];
|
|
6547
|
+
try {
|
|
6548
|
+
const conditions = [];
|
|
6549
|
+
const params = [];
|
|
6550
|
+
if (filters.action) {
|
|
6551
|
+
conditions.push("action = ?");
|
|
6552
|
+
params.push(filters.action);
|
|
6553
|
+
}
|
|
6554
|
+
if (filters.actor) {
|
|
6555
|
+
conditions.push("actor_id = ?");
|
|
6556
|
+
params.push(filters.actor);
|
|
6557
|
+
}
|
|
6558
|
+
if (filters.since != null) {
|
|
6559
|
+
conditions.push("created_at >= ?");
|
|
6560
|
+
params.push(filters.since);
|
|
6561
|
+
}
|
|
6562
|
+
if (filters.until != null) {
|
|
6563
|
+
conditions.push("created_at <= ?");
|
|
6564
|
+
params.push(filters.until);
|
|
6565
|
+
}
|
|
6566
|
+
if (filters.result) {
|
|
6567
|
+
conditions.push("result = ?");
|
|
6568
|
+
params.push(filters.result);
|
|
6569
|
+
}
|
|
6570
|
+
const where = conditions.length > 0 ? `WHERE ${conditions.join(" AND ")}` : "";
|
|
6571
|
+
const limit = Math.min(filters.limit ?? 100, 1e3);
|
|
6572
|
+
const offset = filters.offset ?? 0;
|
|
6573
|
+
const sql = `SELECT * FROM audit_log ${where} ORDER BY created_at DESC LIMIT ? OFFSET ?`;
|
|
6574
|
+
params.push(limit, offset);
|
|
6575
|
+
return this.db.prepare(sql).all(...params);
|
|
6576
|
+
} catch (err) {
|
|
6577
|
+
log$5.warn(`audit query failed: ${String(err)}`);
|
|
6578
|
+
return [];
|
|
6579
|
+
}
|
|
6580
|
+
}
|
|
6581
|
+
/** Get summary statistics. */
|
|
6582
|
+
stats() {
|
|
6583
|
+
if (!this.db) return {
|
|
6584
|
+
total: 0,
|
|
6585
|
+
byAction: {},
|
|
6586
|
+
byActor: {},
|
|
6587
|
+
failures: 0,
|
|
6588
|
+
oldestTimestamp: null,
|
|
6589
|
+
newestTimestamp: null
|
|
6590
|
+
};
|
|
6591
|
+
try {
|
|
6592
|
+
const totalRow = this.db.prepare("SELECT COUNT(*) as cnt FROM audit_log").get();
|
|
6593
|
+
const failureRow = this.db.prepare("SELECT COUNT(*) as cnt FROM audit_log WHERE result != 'success'").get();
|
|
6594
|
+
const actionRows = this.db.prepare("SELECT action, COUNT(*) as cnt FROM audit_log GROUP BY action ORDER BY cnt DESC LIMIT 50").all();
|
|
6595
|
+
const actorRows = this.db.prepare("SELECT actor_id, COUNT(*) as cnt FROM audit_log WHERE actor_id IS NOT NULL GROUP BY actor_id ORDER BY cnt DESC LIMIT 50").all();
|
|
6596
|
+
const oldestRow = this.db.prepare("SELECT timestamp FROM audit_log ORDER BY created_at ASC LIMIT 1").get();
|
|
6597
|
+
const newestRow = this.db.prepare("SELECT timestamp FROM audit_log ORDER BY created_at DESC LIMIT 1").get();
|
|
6598
|
+
const byAction = {};
|
|
6599
|
+
for (const row of actionRows) byAction[row.action] = row.cnt;
|
|
6600
|
+
const byActor = {};
|
|
6601
|
+
for (const row of actorRows) byActor[row.actor_id] = row.cnt;
|
|
6602
|
+
return {
|
|
6603
|
+
total: totalRow.cnt,
|
|
6604
|
+
byAction,
|
|
6605
|
+
byActor,
|
|
6606
|
+
failures: failureRow.cnt,
|
|
6607
|
+
oldestTimestamp: oldestRow?.timestamp ?? null,
|
|
6608
|
+
newestTimestamp: newestRow?.timestamp ?? null
|
|
6609
|
+
};
|
|
6610
|
+
} catch (err) {
|
|
6611
|
+
log$5.warn(`audit stats failed: ${String(err)}`);
|
|
6612
|
+
return {
|
|
6613
|
+
total: 0,
|
|
6614
|
+
byAction: {},
|
|
6615
|
+
byActor: {},
|
|
6616
|
+
failures: 0,
|
|
6617
|
+
oldestTimestamp: null,
|
|
6618
|
+
newestTimestamp: null
|
|
6619
|
+
};
|
|
6620
|
+
}
|
|
6621
|
+
}
|
|
6622
|
+
/** Delete entries older than the given number of days. Returns count deleted. */
|
|
6623
|
+
prune(olderThanDays) {
|
|
6624
|
+
if (!this.db) return 0;
|
|
6625
|
+
try {
|
|
6626
|
+
const cutoff = Math.floor(Date.now() / 1e3) - olderThanDays * 86400;
|
|
6627
|
+
const deleted = this.db.prepare("DELETE FROM audit_log WHERE created_at < ?").run(cutoff).changes ?? 0;
|
|
6628
|
+
if (deleted > 0) log$5.info(`pruned ${deleted} audit entries older than ${olderThanDays} days`);
|
|
6629
|
+
return deleted;
|
|
6630
|
+
} catch (err) {
|
|
6631
|
+
log$5.warn(`audit prune failed: ${String(err)}`);
|
|
6632
|
+
return 0;
|
|
6633
|
+
}
|
|
6634
|
+
}
|
|
6635
|
+
/** Graceful shutdown. */
|
|
6636
|
+
close() {
|
|
6637
|
+
if (this.pruneTimer) {
|
|
6638
|
+
clearInterval(this.pruneTimer);
|
|
6639
|
+
this.pruneTimer = null;
|
|
6640
|
+
}
|
|
6641
|
+
try {
|
|
6642
|
+
this.db?.close();
|
|
6643
|
+
} catch {}
|
|
6644
|
+
this.db = null;
|
|
6645
|
+
this.initialized = false;
|
|
6646
|
+
}
|
|
6647
|
+
/** Get singleton instance. */
|
|
6648
|
+
static getInstance() {
|
|
6649
|
+
if (!instance) instance = new AuditLogger();
|
|
6650
|
+
return instance;
|
|
6651
|
+
}
|
|
6652
|
+
/** Initialize singleton. Call at gateway startup. */
|
|
6653
|
+
static init(opts) {
|
|
6654
|
+
if (!instance) instance = new AuditLogger(opts);
|
|
6655
|
+
instance.init();
|
|
6656
|
+
return instance;
|
|
6657
|
+
}
|
|
6658
|
+
/** Destroy singleton (for testing). */
|
|
6659
|
+
static destroy() {
|
|
6660
|
+
instance?.close();
|
|
6661
|
+
instance = null;
|
|
6662
|
+
}
|
|
6663
|
+
};
|
|
6664
|
+
|
|
6468
6665
|
//#endregion
|
|
6469
6666
|
//#region src/gateway/control-plane-audit.ts
|
|
6470
6667
|
function normalizePart$1(value, fallback) {
|
|
@@ -8327,6 +8524,58 @@ const agentsHandlers = {
|
|
|
8327
8524
|
}
|
|
8328
8525
|
};
|
|
8329
8526
|
|
|
8527
|
+
//#endregion
|
|
8528
|
+
//#region src/gateway/server-methods/audit.ts
|
|
8529
|
+
/**
|
|
8530
|
+
* Audit RPC method handlers (#6)
|
|
8531
|
+
* Registers audit.query and audit.stats as gateway RPC methods.
|
|
8532
|
+
*/
|
|
8533
|
+
const auditHandlers = {
|
|
8534
|
+
"audit.query": ({ params, respond }) => {
|
|
8535
|
+
try {
|
|
8536
|
+
const logger = AuditLogger.getInstance();
|
|
8537
|
+
const filters = {};
|
|
8538
|
+
if (typeof params.action === "string") filters.action = params.action;
|
|
8539
|
+
if (typeof params.actor === "string") filters.actor = params.actor;
|
|
8540
|
+
if (typeof params.since === "number") filters.since = params.since;
|
|
8541
|
+
if (typeof params.until === "number") filters.until = params.until;
|
|
8542
|
+
if (typeof params.result === "string") filters.result = params.result;
|
|
8543
|
+
if (typeof params.limit === "number") filters.limit = params.limit;
|
|
8544
|
+
if (typeof params.offset === "number") filters.offset = params.offset;
|
|
8545
|
+
const entries = logger.query(filters);
|
|
8546
|
+
respond(true, {
|
|
8547
|
+
entries,
|
|
8548
|
+
count: entries.length
|
|
8549
|
+
}, void 0);
|
|
8550
|
+
} catch (err) {
|
|
8551
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `audit query failed: ${String(err)}`));
|
|
8552
|
+
}
|
|
8553
|
+
},
|
|
8554
|
+
"audit.stats": ({ respond }) => {
|
|
8555
|
+
try {
|
|
8556
|
+
respond(true, AuditLogger.getInstance().stats(), void 0);
|
|
8557
|
+
} catch (err) {
|
|
8558
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `audit stats failed: ${String(err)}`));
|
|
8559
|
+
}
|
|
8560
|
+
},
|
|
8561
|
+
"audit.prune": ({ params, respond }) => {
|
|
8562
|
+
try {
|
|
8563
|
+
const logger = AuditLogger.getInstance();
|
|
8564
|
+
const olderThanDays = typeof params.olderThanDays === "number" ? params.olderThanDays : 90;
|
|
8565
|
+
if (olderThanDays < 1) {
|
|
8566
|
+
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, "olderThanDays must be >= 1"));
|
|
8567
|
+
return;
|
|
8568
|
+
}
|
|
8569
|
+
respond(true, {
|
|
8570
|
+
deleted: logger.prune(olderThanDays),
|
|
8571
|
+
olderThanDays
|
|
8572
|
+
}, void 0);
|
|
8573
|
+
} catch (err) {
|
|
8574
|
+
respond(false, void 0, errorShape(ErrorCodes.UNAVAILABLE, `audit prune failed: ${String(err)}`));
|
|
8575
|
+
}
|
|
8576
|
+
}
|
|
8577
|
+
};
|
|
8578
|
+
|
|
8330
8579
|
//#endregion
|
|
8331
8580
|
//#region src/gateway/server-methods/nodes.helpers.ts
|
|
8332
8581
|
function respondInvalidParams(params) {
|
|
@@ -12451,7 +12700,7 @@ const nodeHandlers = {
|
|
|
12451
12700
|
const p = params;
|
|
12452
12701
|
const payloadJSON = typeof p.payloadJSON === "string" ? p.payloadJSON : p.payload !== void 0 ? JSON.stringify(p.payload) : null;
|
|
12453
12702
|
await respondUnavailableOnThrow(respond, async () => {
|
|
12454
|
-
const { handleNodeEvent } = await import("./server-node-events-
|
|
12703
|
+
const { handleNodeEvent } = await import("./server-node-events-BBifAwDM.js");
|
|
12455
12704
|
const nodeId = client?.connect?.device?.id ?? client?.connect?.client?.id ?? "node";
|
|
12456
12705
|
await handleNodeEvent({
|
|
12457
12706
|
deps: context.deps,
|
|
@@ -14319,6 +14568,54 @@ const CONTROL_PLANE_WRITE_METHODS = new Set([
|
|
|
14319
14568
|
"config.patch",
|
|
14320
14569
|
"update.run"
|
|
14321
14570
|
]);
|
|
14571
|
+
/** Methods that always get audit logged when audit is enabled. */
|
|
14572
|
+
const AUDIT_SENSITIVE_METHODS = new Set([
|
|
14573
|
+
"config.set",
|
|
14574
|
+
"config.apply",
|
|
14575
|
+
"config.patch",
|
|
14576
|
+
"device.pair.approve",
|
|
14577
|
+
"device.pair.reject",
|
|
14578
|
+
"node.pair.approve",
|
|
14579
|
+
"node.pair.reject",
|
|
14580
|
+
"exec.approvals.set",
|
|
14581
|
+
"sessions.delete",
|
|
14582
|
+
"update.run"
|
|
14583
|
+
]);
|
|
14584
|
+
function resolveAuditConfig() {
|
|
14585
|
+
try {
|
|
14586
|
+
const security = loadConfig().security;
|
|
14587
|
+
return {
|
|
14588
|
+
enabled: security?.audit?.enabled !== false,
|
|
14589
|
+
level: security?.audit?.level ?? "sensitive"
|
|
14590
|
+
};
|
|
14591
|
+
} catch {
|
|
14592
|
+
return {
|
|
14593
|
+
enabled: true,
|
|
14594
|
+
level: "sensitive"
|
|
14595
|
+
};
|
|
14596
|
+
}
|
|
14597
|
+
}
|
|
14598
|
+
function shouldAuditMethod(method, level) {
|
|
14599
|
+
if (level === "off") return false;
|
|
14600
|
+
if (level === "all") return true;
|
|
14601
|
+
return AUDIT_SENSITIVE_METHODS.has(method);
|
|
14602
|
+
}
|
|
14603
|
+
function auditLogMethodCall(method, client, result) {
|
|
14604
|
+
try {
|
|
14605
|
+
const logger = AuditLogger.getInstance();
|
|
14606
|
+
const actorType = client?.connect?.role ?? "unknown";
|
|
14607
|
+
const actorId = client?.connect?.client?.id ?? client?.connect?.device?.id ?? void 0;
|
|
14608
|
+
const ip = client?.clientIp ?? void 0;
|
|
14609
|
+
logger.log({
|
|
14610
|
+
actor_type: actorType,
|
|
14611
|
+
actor_id: actorId,
|
|
14612
|
+
action: method,
|
|
14613
|
+
ip,
|
|
14614
|
+
result,
|
|
14615
|
+
details: result !== "success" ? `method ${method} ${result}` : void 0
|
|
14616
|
+
});
|
|
14617
|
+
} catch {}
|
|
14618
|
+
}
|
|
14322
14619
|
function authorizeGatewayMethod(method, client) {
|
|
14323
14620
|
if (!client?.connect) return null;
|
|
14324
14621
|
if (method === "health") return null;
|
|
@@ -14361,12 +14658,14 @@ const coreGatewayHandlers = {
|
|
|
14361
14658
|
...usageHandlers,
|
|
14362
14659
|
...agentHandlers,
|
|
14363
14660
|
...agentsHandlers,
|
|
14364
|
-
...browserHandlers
|
|
14661
|
+
...browserHandlers,
|
|
14662
|
+
...auditHandlers
|
|
14365
14663
|
};
|
|
14366
14664
|
async function handleGatewayRequest(opts) {
|
|
14367
14665
|
const { req, respond, client, isWebchatConnect, context } = opts;
|
|
14368
14666
|
const authError = authorizeGatewayMethod(req.method, client);
|
|
14369
14667
|
if (authError) {
|
|
14668
|
+
if (resolveAuditConfig().enabled) auditLogMethodCall(req.method, client, "denied");
|
|
14370
14669
|
respond(false, void 0, authError);
|
|
14371
14670
|
return;
|
|
14372
14671
|
}
|
|
@@ -14391,7 +14690,22 @@ async function handleGatewayRequest(opts) {
|
|
|
14391
14690
|
respond(false, void 0, errorShape(ErrorCodes.INVALID_REQUEST, `unknown method: ${req.method}`));
|
|
14392
14691
|
return;
|
|
14393
14692
|
}
|
|
14394
|
-
|
|
14693
|
+
const auditCfg = resolveAuditConfig();
|
|
14694
|
+
if (auditCfg.enabled && shouldAuditMethod(req.method, auditCfg.level)) {
|
|
14695
|
+
const originalRespond = respond;
|
|
14696
|
+
const auditedRespond = (ok, payload, error, meta) => {
|
|
14697
|
+
auditLogMethodCall(req.method, client, ok ? "success" : "failure");
|
|
14698
|
+
originalRespond(ok, payload, error, meta);
|
|
14699
|
+
};
|
|
14700
|
+
await handler({
|
|
14701
|
+
req,
|
|
14702
|
+
params: req.params ?? {},
|
|
14703
|
+
client,
|
|
14704
|
+
isWebchatConnect,
|
|
14705
|
+
respond: auditedRespond,
|
|
14706
|
+
context
|
|
14707
|
+
});
|
|
14708
|
+
} else await handler({
|
|
14395
14709
|
req,
|
|
14396
14710
|
params: req.params ?? {},
|
|
14397
14711
|
client,
|
|
@@ -18868,6 +19182,12 @@ async function startGatewayMemoryBackend(params) {
|
|
|
18868
19182
|
//#region src/gateway/server-startup.ts
|
|
18869
19183
|
const SESSION_LOCK_STALE_MS = 1800 * 1e3;
|
|
18870
19184
|
async function startGatewaySidecars(params) {
|
|
19185
|
+
try {
|
|
19186
|
+
const auditRetention = params.cfg.security;
|
|
19187
|
+
AuditLogger.init({ retentionDays: auditRetention?.audit?.retentionDays });
|
|
19188
|
+
} catch (err) {
|
|
19189
|
+
params.log.warn(`audit logger initialization failed: ${String(err)}`);
|
|
19190
|
+
}
|
|
18871
19191
|
try {
|
|
18872
19192
|
const sessionDirs = await resolveAgentSessionDirs(resolveStateDir(process.env));
|
|
18873
19193
|
for (const sessionsDir of sessionDirs) await cleanStaleLockFiles({
|