@lawpath-tech/openclaw 2026.2.21-31 → 2026.2.21-32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{accounts-CGBT0wQ4.js → accounts-D8ryuxvJ.js} +7 -7
- package/dist/{accounts-CAR30ERb.js → accounts-Dl14M6E6.js} +1 -1
- package/dist/{accounts-BQX482gP.js → accounts-E1DMCEDO.js} +1 -1
- package/dist/{acp-cli-DZV917OP.js → acp-cli-hedESiET.js} +6 -6
- package/dist/{agent-scope-BGlpyppa.js → agent-scope-B6jLdNuI.js} +18 -18
- package/dist/{agents-BP8GDc9z.js → agents-DWpMpnrU.js} +4 -4
- package/dist/{agents.config-Bz7K-hIv.js → agents.config-DfN81iaS.js} +2 -2
- package/dist/{agents.config-BelTNn6K.js → agents.config-bQuerf1-.js} +1 -1
- package/dist/{api-key-rotation-CMe3cUAn.js → api-key-rotation-ddrC-1k5.js} +1 -1
- package/dist/{audio-preflight-Djsieqbl.js → audio-preflight-DRE31Ab_.js} +28 -28
- package/dist/{audio-preflight-DP74Yvkp.js → audio-preflight-Dp9KYMCX.js} +4 -4
- package/dist/{audit-W6GUNtGq.js → audit-DqzfLnre.js} +23 -23
- package/dist/{auth-choice-D1nW1tnt.js → auth-choice-BWs44j21.js} +8 -8
- package/dist/{auth-choice-CBUsciQJ.js → auth-choice-CNEPjZq2.js} +1 -1
- package/dist/{auth-token-3sJLQq8Y.js → auth-token-Il_1hz__.js} +1 -1
- package/dist/{banner-C18cJKYR.js → banner-CxaRxgic.js} +1 -1
- package/dist/{bindings-D_OoALBE.js → bindings-D_90DJ1-.js} +1 -1
- package/dist/{browser-cli-pa0mgoQY.js → browser-cli-DRksx_yW.js} +9 -9
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +8 -8
- package/dist/bundled/session-memory/handler.js +8 -8
- package/dist/{call-BVSmc2vl.js → call-CYa4YbMh.js} +9 -9
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-Dh4UX17R.js → channel-options-731cZrV3.js} +2 -2
- package/dist/{channel-options-DUJnpe5D.js → channel-options-DOP9meV_.js} +1 -1
- package/dist/{channel-selection-B3CpzNsC.js → channel-selection-NCqPAi5U.js} +1 -1
- package/dist/{channel-web-wLJAIBDS.js → channel-web-BGJ5ln5L.js} +17 -17
- package/dist/{channels-cli-B3GeraPZ.js → channels-cli-BSR5Ss_g.js} +75 -75
- package/dist/{channels-cli-7lL-U0bT.js → channels-cli-D3RDDRf1.js} +6 -6
- package/dist/{channels-status-issues-C4_sbL0E.js → channels-status-issues-CNE14g1e.js} +1 -1
- package/dist/{chrome-C9MCXK8d.js → chrome-BlXdvPOB.js} +2 -2
- package/dist/{chrome-BukFhWVN.js → chrome-DAmaIuXa.js} +7 -7
- package/dist/{clawbot-cli-B2jNAgQu.js → clawbot-cli-__trjQJ4.js} +4 -4
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-C9y6JSoj.js → cli-C7e7H1JP.js} +3 -3
- package/dist/{cli-BdmFE8Ie.js → cli-DnIh8_UI.js} +62 -62
- package/dist/{client-DkL-GDcp.js → client-BW8Wuj5N.js} +1 -1
- package/dist/{command-registry-D-PJPg1t.js → command-registry-Q4A7-DBA.js} +9 -9
- package/dist/{commands-DHoTLUfu.js → commands-KvUzKZ-E.js} +1 -1
- package/dist/{commands-registry-C6MwKIm9.js → commands-registry-DVVMuhaG.js} +3 -3
- package/dist/{completion-cli-CA5pvA6W.js → completion-cli-JhFn-BzZ.js} +12 -12
- package/dist/{completion-cli-zfVgI7-n.js → completion-cli-dC9YBc-k.js} +2 -2
- package/dist/{config-CkqfHk27.js → config-JupjCURB.js} +2 -2
- package/dist/{config-cli-CgMtqspq.js → config-cli-DMLSe-zW.js} +1 -1
- package/dist/{config-cli-BPrhK0hV.js → config-cli-DOvNIX0v.js} +4 -4
- package/dist/{config-guard-C5fqJ2Ra.js → config-guard-5XdCrtj_.js} +12 -12
- package/dist/{config-validation-cyW76mmN.js → config-validation-B1WJ3f4s.js} +1 -1
- package/dist/{configure-yDD4TKIJ.js → configure-Bvsehc2l.js} +15 -15
- package/dist/{configure-P0T5xCKn.js → configure-DjTsdvi-.js} +3 -3
- package/dist/{control-service-CPT8eogY.js → control-service-C7XguOvd.js} +4 -4
- package/dist/{control-ui-assets-BcSek9LQ.js → control-ui-assets-BLVZXE2I.js} +1 -1
- package/dist/{cron-cli-B8A_gdlC.js → cron-cli-DJY2332p.js} +10 -10
- package/dist/{daemon-cli-BY4RqUnr.js → daemon-cli-BWUQX0oT.js} +11 -11
- package/dist/{daemon-runtime-b5AIw6-c.js → daemon-runtime-DWX-qIBl.js} +10 -10
- package/dist/{deliver-BLmoUvp-.js → deliver-BP564y6d.js} +1 -1
- package/dist/{deliver-DPIPJHQH.js → deliver-DKhy3kV4.js} +7 -7
- package/dist/{devices-cli-lm3S1JQu.js → devices-cli-D4oN5nE1.js} +6 -6
- package/dist/{diagnostics-BTTjVvNB.js → diagnostics-DqqmUDc7.js} +5 -5
- package/dist/{directory-cli-BV3bixZh.js → directory-cli-Cn5w5bQ0.js} +7 -7
- package/dist/{dm-policy-shared-CrbkZ-FV.js → dm-policy-shared-CysWxa2H.js} +2 -2
- package/dist/{dns-cli-D7X1eTm3.js → dns-cli-CYB5gA5O.js} +3 -3
- package/dist/{dock-B1xpMkYP.js → dock-CX_o0bdi.js} +4 -4
- package/dist/{docs-cli-C_3NO2uV.js → docs-cli-Dsn3U8-1.js} +1 -1
- package/dist/{doctor-completion-wNJ24zG1.js → doctor-completion-ZNTlXnGL.js} +1 -1
- package/dist/{doctor-completion-QnB3fOSm.js → doctor-completion-zUNacbyu.js} +2 -2
- package/dist/{doctor-config-flow-BB3nWQcZ.js → doctor-config-flow-C9h7ENJ-.js} +10 -10
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-TT3Gh9kR.js → exec-approvals-cli-BXXdOl4u.js} +13 -13
- package/dist/extensionAPI.js +3 -3
- package/dist/{fs-safe-CUjO1ca2.js → fs-safe-CTDvb1DF.js} +6 -6
- package/dist/{gateway-cli-jzI2iY9a.js → gateway-cli-B8-2FWEZ.js} +10 -10
- package/dist/{gateway-cli-abohiHMm.js → gateway-cli-BXP02v7b.js} +132 -132
- package/dist/{gateway-rpc-BGGmDgbQ.js → gateway-rpc-CqPT9Cep.js} +1 -1
- package/dist/{health-ChDsDryb.js → health-BFLhZBCV.js} +13 -13
- package/dist/{health-BJ6SHHDr.js → health-Bm_bIcyw.js} +1 -1
- package/dist/{hooks-cli-DuRDIltL.js → hooks-cli-BVjpIkaS.js} +76 -76
- package/dist/{hooks-cli-BmuxgZBH.js → hooks-cli-DyN1Bq_w.js} +4 -4
- package/dist/{image-hH4ugSJI.js → image-DL65NdIM.js} +1 -1
- package/dist/{image-DC9YnAwO.js → image-DtVdv4CQ.js} +3 -3
- package/dist/{image-ops-B4PbaJHR.js → image-ops-Uvt51OHH.js} +10 -10
- package/dist/index.js +72 -72
- package/dist/{inspect-gLKB4R6Z.js → inspect-VKHaN3HT.js} +4 -4
- package/dist/{install-safe-path-tCLiMpmO.js → install-safe-path-Qqr_t_tH.js} +11 -11
- package/dist/{installs-Bbb02byQ.js → installs-BamQ1KDR.js} +10 -10
- package/dist/{ir-D72mYI93.js → ir-1SG-TkUZ.js} +6 -6
- package/dist/{lifecycle-core-DNgy-uKO.js → lifecycle-core-DZJF3omV.js} +5 -5
- package/dist/llm-slug-generator.js +8 -8
- package/dist/{local-roots-B6Q8Hrfc.js → local-roots-25wkka6O.js} +2 -2
- package/dist/{login-Bz2k49Y4.js → login-BThY9qqp.js} +3 -3
- package/dist/{login-qr-L9yhuI9H.js → login-qr-BOOn03RH.js} +5 -5
- package/dist/{logs-cli-B2PPoAkv.js → logs-cli-DoDfF8hD.js} +7 -7
- package/dist/{manager-CDo24VZE.js → manager-BVtzk7_v.js} +13 -13
- package/dist/{markdown-tables-CXWxrKp3.js → markdown-tables-MNYCbYg1.js} +1 -1
- package/dist/{memory-cli-8SCKR9xc.js → memory-cli-CS7LI30B.js} +12 -12
- package/dist/{model-BKG0edkX.js → model-MOoXNngW.js} +1 -1
- package/dist/{model-catalog-CjwzHKkB.js → model-catalog-CzLbr1ZD.js} +4 -4
- package/dist/{model-picker-NGiZaAei.js → model-picker-bpc3jJ5m.js} +3 -3
- package/dist/{model-selection-0qDmOMXI.js → model-selection-C1pdWy7b.js} +9 -9
- package/dist/{models-BpqbY6s6.js → models-Bd3CLEWM.js} +2 -2
- package/dist/{models-cli-COanmcGm.js → models-cli-4QX1LFRs.js} +72 -72
- package/dist/{models-cli-DqWWTCao.js → models-cli-D__CoxU_.js} +5 -5
- package/dist/{models-config-CTi1zIkq.js → models-config-BVp1ZtTh.js} +7 -7
- package/dist/{node-cli-Cqkqlb01.js → node-cli-D-N_WPoP.js} +28 -28
- package/dist/{node-service-YmmWwF_4.js → node-service-BESGjvfV.js} +1 -1
- package/dist/{nodes-cli-xRiWzu3G.js → nodes-cli-Cn4uY_Gx.js} +10 -10
- package/dist/{nodes-screen-C-rbZoYt.js → nodes-screen-kFzB7013.js} +4 -4
- package/dist/{npm-registry-spec-Dw7Zv5pY.js → npm-registry-spec-pqZV9KaL.js} +9 -9
- package/dist/{onboard-UEtBiCoJ.js → onboard-DDzVmEvx.js} +2 -2
- package/dist/{onboard-wCY6TSre.js → onboard-DJUKlsWz.js} +13 -13
- package/dist/{onboard-channels-BJ-tZka8.js → onboard-channels-BqW3maPJ.js} +5 -5
- package/dist/{onboard-channels-CPma01ab.js → onboard-channels-CrfL2B6W.js} +1 -1
- package/dist/{onboard-custom-KUI3ky6Y.js → onboard-custom-D7KcpLUZ.js} +3 -3
- package/dist/{onboard-helpers-CuawFqeV.js → onboard-helpers-C2-IAGyl.js} +8 -8
- package/dist/{onboard-hooks-Cjnt0UN3.js → onboard-hooks-Cf_rZ0y2.js} +1 -1
- package/dist/{onboard-remote-ClWpZWND.js → onboard-remote-DujGEJSZ.js} +1 -1
- package/dist/{onboard-skills-wCr1UcGc.js → onboard-skills-BCOMycP2.js} +4 -4
- package/dist/{onboarding-Di4SkJUj.js → onboarding-0IAGtYhr.js} +3 -3
- package/dist/{onboarding-Dp6k5p-a.js → onboarding-w8peVpJ9.js} +13 -13
- package/dist/{onboarding.finalize-G-q87JA2.js → onboarding.finalize-CwtvbQBP.js} +74 -74
- package/dist/{onboarding.finalize-DshqLGqp.js → onboarding.finalize-De4it5U3.js} +8 -8
- package/dist/{onboarding.gateway-config-7sVZcOhj.js → onboarding.gateway-config-BJ0SMGbj.js} +14 -14
- package/dist/{openai-model-default-CZOgt9C7.js → openai-model-default-DagaQbb0.js} +2 -2
- package/dist/{openclaw-root-CQJwyH9q.js → openclaw-root-CbWxAStx.js} +2 -2
- package/dist/{outbound-BiC9-qyo.js → outbound-DPGxP4j6.js} +4 -4
- package/dist/{plugin-sdk/outbound-attachment-1oBost2D.js → outbound-attachment-D07lPNUZ.js} +2 -2
- package/dist/{pairing-cli-B5reDhJF.js → pairing-cli-BZwhRsWv.js} +8 -8
- package/dist/{pairing-labels-UbwdcASX.js → pairing-labels-Cf9ie2Yo.js} +1 -1
- package/dist/{pairing-store-IkE0_gB1.js → pairing-store-BzMeXbOB.js} +2 -2
- package/dist/{pairing-token-DGufCZxz.js → pairing-token-DAVfcYo5.js} +7 -7
- package/dist/{paths-CIvEoL0m.js → paths-BsnfCNkx.js} +1 -1
- package/dist/{pi-auth-json-C5hwfgoJ.js → pi-auth-json-BBbOI_P4.js} +3 -3
- package/dist/{pi-embedded-C7TfFIPO.js → pi-embedded-CIsGkiaB.js} +200 -43
- package/dist/{pi-embedded-helpers-BDEpQxcD.js → pi-embedded-helpers-B9uwWqnh.js} +6 -6
- package/dist/{pi-embedded-helpers-DR_3fJko.js → pi-embedded-helpers-HnqhrewN.js} +4 -4
- package/dist/{pi-embedded-BAqpVR_m.js → pi-embedded-lJXJAe8z.js} +214 -57
- package/dist/{pi-tools.policy-CrKxTriv.js → pi-tools.policy-BU3gaxu3.js} +4 -4
- package/dist/{plugin-auto-enable-CU5zcL-D.js → plugin-auto-enable-Dkg7tNsW.js} +2 -2
- package/dist/{plugin-registry-BdQI8-bG.js → plugin-registry-BNUYtj9H.js} +3 -3
- package/dist/{plugin-registry-CFiYBSX2.js → plugin-registry-DjJ5pV-y.js} +1 -1
- package/dist/plugin-sdk/{accounts-cFYVb3Ir.js → accounts-BdyAJ80w.js} +1 -1
- package/dist/plugin-sdk/{accounts-owMdcC84.js → accounts-CDDBR5Pk.js} +1 -1
- package/dist/plugin-sdk/{accounts-CIV6d4kn.js → accounts-CNg4Pivg.js} +3 -3
- package/dist/plugin-sdk/{active-listener-n6hyqnXA.js → active-listener-C2nnC9Ax.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-DNY1MYCy.js → agent-scope-CtPfsirh.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-nmjAMTZA.js → api-key-rotation-R4AkTIjD.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-BkbKy5kx.js → audio-preflight-BAMNt6M5.js} +24 -24
- package/dist/plugin-sdk/{bindings-CopQpHHX.js → bindings-BoFVi5SB.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-CrDvXjCQ.js → channel-activity-t_OI1MQf.js} +1 -1
- package/dist/plugin-sdk/{channel-web-DtyyUoWA.js → channel-web-hWtosBa_.js} +22 -22
- package/dist/plugin-sdk/{chrome-CrOYUXQ2.js → chrome-D0tUj9ji.js} +3 -3
- package/dist/plugin-sdk/{chunk-D4rztYS_.js → chunk-CoyesYaI.js} +1 -1
- package/dist/plugin-sdk/{command-format-A8fPp85k.js → command-format-BZHLj2Pv.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-BgL5BgCb.js → commands-registry-DhpIXuI8.js} +4 -4
- package/dist/plugin-sdk/{config-CpE4TWH0.js → config-C-kB5yPz.js} +9 -9
- package/dist/plugin-sdk/{deliver-DTKyGKVr.js → deliver-BHg_hqJG.js} +10 -10
- package/dist/plugin-sdk/{diagnostic-AkXUmNj3.js → diagnostic-Bkobf9sL.js} +1 -1
- package/dist/plugin-sdk/{image-D-2tr3lg.js → image-DJgspIhI.js} +4 -4
- package/dist/plugin-sdk/{image-ops-D4rLqyFG.js → image-ops-BeZ1nzVS.js} +1 -1
- package/dist/plugin-sdk/index.js +53 -53
- package/dist/plugin-sdk/{ir-hakANnEW.js → ir-CRPo3dMY.js} +4 -4
- package/dist/plugin-sdk/{local-roots-CnaI2qJk.js → local-roots-C5Ju-AZh.js} +3 -3
- package/dist/plugin-sdk/{login-CcPkuK_e.js → login-ZAWRtiUn.js} +7 -7
- package/dist/plugin-sdk/{login-qr-C6rEbZ_4.js → login-qr-Vep4Qyfk.js} +9 -9
- package/dist/plugin-sdk/{manager-D0UeotCy.js → manager-BiSIuKTu.js} +8 -8
- package/dist/plugin-sdk/{manifest-registry-COeXOYi0.js → manifest-registry-DJWLGnsy.js} +1 -1
- package/dist/plugin-sdk/{markdown-tables-Bf31F9r6.js → markdown-tables-D3ber0Yy.js} +1 -1
- package/dist/plugin-sdk/{message-channel-CMtCA18K.js → message-channel-BvbVXKrt.js} +1 -1
- package/dist/plugin-sdk/{model-selection-CneSW_JC.js → model-selection-QOKxGwpD.js} +4 -4
- package/dist/{outbound-attachment-91Q9pKkZ.js → plugin-sdk/outbound-attachment-Dukb2BCs.js} +2 -2
- package/dist/plugin-sdk/{outbound-ChKX7wv_.js → outbound-simNZ392.js} +7 -7
- package/dist/plugin-sdk/{pi-auth-json-DfDP_Pzq.js → pi-auth-json-DjRxrq8j.js} +5 -5
- package/dist/plugin-sdk/{pi-embedded-helpers-idRp2oNz.js → pi-embedded-helpers-onFghmXi.js} +17 -17
- package/dist/plugin-sdk/{plugins-CCHKO6PS.js → plugins-Cmzpj_lq.js} +4 -4
- package/dist/plugin-sdk/{pw-ai-DC87yDnd.js → pw-ai-MetkkJzy.js} +8 -8
- package/dist/plugin-sdk/{qmd-manager-CnTnX_JH.js → qmd-manager-CD1M3q9a.js} +4 -4
- package/dist/plugin-sdk/{registry-BlMOtcPL.js → registry-BX2vORAB.js} +2 -2
- package/dist/plugin-sdk/{replies-OoosoUz9.js → replies-_91oZTzt.js} +7 -6
- package/dist/plugin-sdk/{reply-C_4ajFUt.js → reply-CKIG0ycG.js} +272 -115
- package/dist/plugin-sdk/{reply-prefix-G9ruZ2EI.js → reply-prefix-DuegEkbr.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-D9fgJ-GG.js → resolve-outbound-target-CeT5UKn8.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-yBLQIeuf.js → resolve-route-DxmOOAQ3.js} +3 -3
- package/dist/plugin-sdk/{retry-BG4opKt7.js → retry-DOt8b7_o.js} +1 -1
- package/dist/plugin-sdk/{runner-BkVA5r9t.js → runner-DycIbJjS.js} +9 -9
- package/dist/plugin-sdk/{send-C40m59QO.js → send-5KyVAcYY.js} +10 -10
- package/dist/plugin-sdk/{send-C9Q83PfF.js → send-BUW2Leik.js} +26 -7
- package/dist/plugin-sdk/{send-CgLOABgR.js → send-DWnqhh6N.js} +10 -10
- package/dist/plugin-sdk/{send-CiTMY1uN.js → send-Du8i1Fom.js} +7 -7
- package/dist/plugin-sdk/{send-b1mZbvoC.js → send-Fch4vj7_.js} +6 -6
- package/dist/plugin-sdk/{session-DBbj6znF.js → session-PaIae3bL.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-Cu6XAfOe.js → skill-commands-CNFldYrK.js} +5 -5
- package/dist/plugin-sdk/{skills-BTu_-5jA.js → skills-CJCz6K_W.js} +7 -7
- package/dist/plugin-sdk/slack/monitor/events/channels.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/members.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/pins.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/reactions.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/message-handler.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/provider.d.ts +6 -0
- package/dist/plugin-sdk/slack/monitor/replies.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/types.d.ts +4 -0
- package/dist/plugin-sdk/slack/threading.d.ts +9 -0
- package/dist/plugin-sdk/{sqlite-CH3lxc5D.js → sqlite-Bmy459sE.js} +1 -1
- package/dist/plugin-sdk/{store-DDOdV26p.js → store-B_h0hmNL.js} +2 -2
- package/dist/plugin-sdk/{subsystem-DoAZkah-.js → subsystem-DJYuxViY.js} +1 -1
- package/dist/plugin-sdk/{tables-DAJbUPhT.js → tables-DCBJv1Oa.js} +1 -1
- package/dist/plugin-sdk/{target-errors-CeKndUCY.js → target-errors-gEAboF7P.js} +2 -2
- package/dist/plugin-sdk/{thinking-lC2HmTea.js → thinking-D8Se3YVf.js} +5 -5
- package/dist/plugin-sdk/{tokens-Dag82kdi.js → tokens-Cx0xANZO.js} +1 -1
- package/dist/plugin-sdk/{tool-images-D_St2NkT.js → tool-images-CIoUqeS9.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-BAz1GNFQ.js → tool-loop-detection-B_Opna2S.js} +2 -2
- package/dist/plugin-sdk/web-HBE7hmNI.js +65 -0
- package/dist/plugin-sdk/{whatsapp-actions-CicFq_6w.js → whatsapp-actions-DqfQYPke.js} +21 -21
- package/dist/{plugins-DufH79A4.js → plugins-BYw4LpqC.js} +2 -2
- package/dist/{plugins-cli-CmrER-zr.js → plugins-cli-CKU99tGc.js} +71 -71
- package/dist/{plugins-cli-B03aSLgf.js → plugins-cli-DBrRLw_b.js} +4 -4
- package/dist/{ports-tyVdO5z0.js → ports-CJyNmOL8.js} +2 -2
- package/dist/{ports-B6fsVJW2.js → ports-CbYVfAGi.js} +1 -1
- package/dist/{program-Djk08-l7.js → program-CuRfrHul.js} +9 -9
- package/dist/{program-context-DlRS1tcr.js → program-context-Ct_MVt2A.js} +40 -40
- package/dist/{prompt-select-styled-CMszn2hx.js → prompt-select-styled-BhdDmaM8.js} +4 -4
- package/dist/{prompt-select-styled-JkMJPt68.js → prompt-select-styled-Cb9hZTTU.js} +37 -37
- package/dist/{provider-auth-helpers-ZV7-WRyR.js → provider-auth-helpers-B7bEwRrS.js} +5 -5
- package/dist/{provider-auth-helpers-36LOZ6SL.js → provider-auth-helpers-CPkc9hAj.js} +1 -1
- package/dist/{push-apns-Cm-ZTdUp.js → push-apns-BqDXb4kj.js} +4 -4
- package/dist/{push-apns-TUUEPpx1.js → push-apns-Cor1JBvm.js} +1 -1
- package/dist/{pw-ai-Dp9c5KD_.js → pw-ai-BLLeU82T.js} +1 -1
- package/dist/{pw-ai-fTf_Sq93.js → pw-ai-CWMnNfVs.js} +7 -7
- package/dist/{qmd-manager-CNVBA7OI.js → qmd-manager-D72OxpMn.js} +18 -18
- package/dist/{qr-cli-BQpNL00w.js → qr-cli-jnAlWxJ1.js} +1 -1
- package/dist/{register.agent-7Pku8mId.js → register.agent-BY4qQIyM.js} +81 -81
- package/dist/{register.agent-DsFrb0R7.js → register.agent-CPhQWbIL.js} +8 -8
- package/dist/register.configure-CtqFfgvY.js +147 -0
- package/dist/{register.configure-BMfcA9Sh.js → register.configure-d_7CE6cU.js} +8 -8
- package/dist/{register.maintenance-DfoSO5fo.js → register.maintenance-BiQeKBPQ.js} +84 -84
- package/dist/{register.maintenance-BFSQHBgH.js → register.maintenance-CQVF8TPW.js} +10 -10
- package/dist/{register.message-C-5P7V4g.js → register.message-5XIQHlJd.js} +4 -4
- package/dist/{register.message-BTCpZ8RW.js → register.message-CprmJPCV.js} +63 -63
- package/dist/{register.onboard-CVXaGmEF.js → register.onboard-D4hhxM8J.js} +6 -6
- package/dist/{register.onboard-CTO-qkWZ.js → register.onboard-DpvOjkyQ.js} +74 -74
- package/dist/{register.setup-BzaCK19n.js → register.setup-D3PpeeN2.js} +6 -6
- package/dist/{register.setup-Dg1Ud7ox.js → register.setup-MPlYCmF_.js} +77 -77
- package/dist/{register.status-health-sessions-DjwY1WQe.js → register.status-health-sessions-BE5frGYt.js} +5 -5
- package/dist/{register.status-health-sessions-IymXWaoK.js → register.status-health-sessions-BUzgM9fv.js} +75 -75
- package/dist/{register.subclis-Bw1N3fIn.js → register.subclis-BVUvjO4p.js} +9 -9
- package/dist/{replies-MVPArv-r.js → replies-9ipbTXMP.js} +5 -4
- package/dist/{replies-DtFxhHfI.js → replies-BCd0AxfK.js} +5 -4
- package/dist/{replies-DKKNtkun.js → replies-BVBgaEtE.js} +5 -4
- package/dist/{replies-DhmTgroV.js → replies-CSjH2EQ6.js} +5 -4
- package/dist/{reply-pTxrsMtG.js → reply-C7XZ5Kp3.js} +325 -168
- package/dist/{reply-prefix-CbuTBmdm.js → reply-prefix-CJc9NzGX.js} +1 -1
- package/dist/{resolve-route-DuqgZ7wS.js → resolve-route-C5pUt_LC.js} +2 -2
- package/dist/{routes-Bh-1i4ub.js → routes-BgjaVwmu.js} +8 -8
- package/dist/{rpc-RAW16k0Y.js → rpc-DrpAw2Te.js} +1 -1
- package/dist/{run-main-DnYUey0K.js → run-main-CmSuw5Re.js} +16 -16
- package/dist/{runner-CLY-9j7g.js → runner-CcRtHLpd.js} +1 -1
- package/dist/{runner-CXGYviGa.js → runner-fLI-fZ-v.js} +20 -20
- package/dist/{sandbox-Dbz4ladn.js → sandbox-B1lVufmT.js} +18 -18
- package/dist/{sandbox-cli-Dx1942n8.js → sandbox-cli--odc2cPK.js} +20 -20
- package/dist/{security-cli-Ci7ujUBk.js → security-cli-s6yE26pJ.js} +36 -36
- package/dist/{send-CTGeWUSD.js → send-B3u53ZAu.js} +20 -1
- package/dist/{send-i695V0Ow.js → send-BilxFvrd.js} +13 -13
- package/dist/{send-Cr8R-bMi.js → send-CAuzoyQe.js} +20 -1
- package/dist/{send-D_FU_HIa.js → send-D6r6s6Nf.js} +20 -1
- package/dist/{send-H5TFGeHl.js → send-DAb8zkAc.js} +6 -6
- package/dist/{send-ElgbtTa_.js → send-UJWeL6fz.js} +6 -6
- package/dist/{send-BGmblGeb.js → send-YdmCYGSj.js} +6 -6
- package/dist/{send-CKGUBMnM.js → send-_y-b5SXH.js} +24 -5
- package/dist/{server-context-BN_KGt0e.js → server-context-DFBpyKBE.js} +5 -5
- package/dist/{server-node-events-Dhbdspn_.js → server-node-events-DeVBy3RG.js} +4 -4
- package/dist/{server-node-events-DQYNf8b_.js → server-node-events-E7ENYs3y.js} +63 -63
- package/dist/{service-x8sNoic1.js → service-Bs5m4_g0.js} +15 -15
- package/dist/{session-SFd4vyTd.js → session-Gi1pc_jn.js} +2 -2
- package/dist/{session-dirs-DoK1aPxY.js → session-dirs-DMMeC5kT.js} +1 -1
- package/dist/{session-dirs-CFHymbM9.js → session-dirs-Dz06Isny.js} +16 -16
- package/dist/{sessions-CwvGRwvW.js → sessions-fj33u4f-.js} +13 -13
- package/dist/{shared-BlqeHl3I.js → shared-BYm87AKE.js} +1 -1
- package/dist/{shared-D-u4KNkt.js → shared-Btbxw_J6.js} +3 -3
- package/dist/{skill-commands-VCmL7mMC.js → skill-commands-27Clp6Hw.js} +5 -5
- package/dist/{skill-scanner-CMBwwxis.js → skill-scanner-BRf3FyA6.js} +5 -5
- package/dist/{skills-DhT6my9R.js → skills-DO1RiQMB.js} +4 -4
- package/dist/{skills-cli-AXXW1-ib.js → skills-cli-D8Z6O8tz.js} +7 -7
- package/dist/{skills-install-CHhkAUEW.js → skills-install-D2uuaBF9.js} +3 -3
- package/dist/{skills-status-B90dNffv.js → skills-status-C9NLYboA.js} +1 -1
- package/dist/{sqlite-CzeIEe5A.js → sqlite-DCO2j-0b.js} +12 -12
- package/dist/{status-KRRAxPjg.js → status-DQmoPN3T.js} +25 -25
- package/dist/{status-D32_SxwC.js → status-DUJLCUGg.js} +2 -2
- package/dist/{status-C-PQHlxh.js → status-Di2Pqiji.js} +1 -1
- package/dist/{status-CFnZ8E56.js → status-DppGMZ2s.js} +3 -3
- package/dist/{status.update-BdxnLoXT.js → status.update-CkYiGnzE.js} +3 -3
- package/dist/{store-YBnR7qvG.js → store-CLuh0zX0.js} +5 -5
- package/dist/{subagent-registry-DkjybHrK.js → subagent-registry-D3Pj0bnZ.js} +200 -43
- package/dist/{system-cli-CNufxt6H.js → system-cli-DQpLuBbA.js} +11 -11
- package/dist/{systemd-_79iBiaB.js → systemd-Blg-bgkO.js} +5 -5
- package/dist/{systemd-hints--ykZ9med.js → systemd-hints-pRBdkBPI.js} +6 -6
- package/dist/{systemd-linger--ZF5kAeJ.js → systemd-linger-DqOrhpC-.js} +1 -1
- package/dist/{tables-LYKSFoqx.js → tables-DhRyfXvl.js} +1 -1
- package/dist/{target-errors-BrrPOPT5.js → target-errors-DKUMw1tA.js} +4 -4
- package/dist/{tool-images-BCkPMulQ.js → tool-images-Cdj7iZ0t.js} +1 -1
- package/dist/{tui-BfllwI0b.js → tui-DbvXHepE.js} +7 -7
- package/dist/{tui-cli-DM4ahQxS.js → tui-cli-CIqa9qRn.js} +28 -28
- package/dist/{update-BNGNVRaT.js → update-CqhqeDij.js} +3 -3
- package/dist/{update-check-CEFJiPeh.js → update-check-DOy5cGkD.js} +5 -5
- package/dist/{update-cli-DXd4fNuS.js → update-cli-CsicqPiK.js} +10 -10
- package/dist/{update-cli-DMrRvy-m.js → update-cli-DJIsdQeJ.js} +94 -94
- package/dist/{web-Dsgry4ji.js → web-DRLO5z6-.js} +3 -3
- package/dist/{web-IfDcZx01.js → web-DShT68Ix.js} +3 -3
- package/dist/{web-DCNwbuhj.js → web-EGziWSH9.js} +8 -8
- package/dist/web-lXypZuaq.js +109 -0
- package/dist/{webhooks-cli-Ay0jR658.js → webhooks-cli-BJ1WiH3W.js} +4 -4
- package/dist/{whatsapp-actions-Dsvkb9dr.js → whatsapp-actions-lSqVUZ_h.js} +15 -15
- package/dist/{with-timeout-n3bwhefQ.js → with-timeout-OwJVCBFG.js} +1 -1
- package/dist/{workspace-dirs-DbX5fBAC.js → workspace-dirs-CuYuE5F1.js} +1 -1
- package/dist/{wsl-C4424szg.js → wsl-BbXxnokd.js} +2 -2
- package/package.json +1 -1
- package/dist/plugin-sdk/web-BlY2wNrk.js +0 -65
- package/dist/register.configure-CJ6IYgGS.js +0 -147
- package/dist/web-CCqlC0N_.js +0 -109
|
@@ -3,109 +3,109 @@ import { g as resolveStateDir, r as STATE_DIR, u as resolveGatewayPort, y as res
|
|
|
3
3
|
import { B as theme, C as sleep$1, D as isPlainObject, E as truncateUtf16Safe, F as shouldLogVerbose, J as normalizeLogLevel, L as warn, M as logVerbose, O as danger, S as shortenHomePath, V as getChildLogger, X as resolvePreferredOpenClawTmpDir, d as isRecord$1, i as clampInt, l as escapeRegExp, m as normalizeE164, t as CONFIG_DIR, w as sliceUtf16Safe, x as shortenHomeInString, y as resolveUserPath } from "./utils-BlC2Fskb.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, u as resolveResponseUsageMode } from "./thinking-EAliFiVK.js";
|
|
5
5
|
import { C as resolveThreadParentSessionKey, S as parseAgentSessionKey, _ as getSubagentDepth, b as isCronSessionKey, c as normalizeMainKey, d as sanitizeAgentId, h as normalizeAccountId$2, l as resolveAgentIdFromSessionKey, m as DEFAULT_ACCOUNT_ID, o as classifySessionKeyShape, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, u as resolveThreadSessionKeys, v as isAcpSessionKey, x as isSubagentSessionKey, y as isCronRunSessionKey } from "./session-key-DCt45XZa.js";
|
|
6
|
-
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-
|
|
6
|
+
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-CbWxAStx.js";
|
|
7
7
|
import { E as triggerInternalHook, S as matchPluginCommand, _ as buildMemoryPromptSection, b as getPluginCommandSpecs, c as normalizeAnyChannelId, f as requireActivePluginRegistry, g as normalizePluginHttpPath, h as createPluginRegistry, l as normalizeChannelId, n as CHAT_CHANNEL_ORDER, p as setActivePluginRegistry, r as DEFAULT_CHAT_CHANNEL, v as clearPluginCommands, w as createInternalHookEvent, x as listPluginCommands, y as executePluginCommand } from "./registry-lBbEkQ26.js";
|
|
8
8
|
import { d as createNonExitingRuntime, f as defaultRuntime, t as createSubsystemLogger } from "./subsystem-Cu1fn6xi.js";
|
|
9
9
|
import { a as logError, i as logDebug, n as runExec, o as logInfo, r as spawnWithFallback, s as logWarn, t as runCommandWithTimeout } from "./exec-DwGfeG8v.js";
|
|
10
|
-
import { C as ensureAgentWorkspace, E as loadWorkspaceBootstrapFiles, _ as DEFAULT_IDENTITY_FILENAME, a as resolveAgentModelFallbacksOverride, c as resolveAgentWorkspaceDir, d as resolveSessionAgentId, f as resolveSessionAgentIds, h as DEFAULT_BOOTSTRAP_FILENAME, i as resolveAgentDir, l as resolveDefaultAgentId, m as DEFAULT_AGENT_WORKSPACE_DIR, n as listAgentIds, o as resolveAgentModelPrimary, r as resolveAgentConfig, s as resolveAgentSkillsFilter, u as resolveEffectiveModelFallbacks, w as filterBootstrapFilesForSession } from "./agent-scope-
|
|
11
|
-
import { At as ensureAuthProfileStore, Bt as normalizeSecretInput, Et as markAuthProfileGood, Ft as resolveOpenClawAgentDir, G as getCustomProviderApiKey, Gt as DEFAULT_MODEL, H as OLLAMA_NATIVE_BASE_URL, It as withFileLock, K as requireApiKey, Kt as DEFAULT_PROVIDER, Pt as resolveAuthStorePathForDisplay, Q as getShellPathFromLoginShell, Tt as listProfilesForProvider, U as createOllamaStreamFn, Vt as resolveAuthProfileDisplayLabel, W as getApiKeyForModel, Wt as DEFAULT_CONTEXT_TOKENS, X as resolveModelAuthMode, Y as resolveEnvApiKey, c as normalizeModelRef$2, et as resolveShellEnvFallbackTimeoutMs, ft as resolveAuthProfileOrder, g as resolveModelRefFromString, gt as markAuthProfileUsed, ht as markAuthProfileFailure, i as findNormalizedProviderValue, l as normalizeProviderId, m as resolveDefaultModelForAgent, mt as isProfileInCooldown, n as buildConfiguredAllowlistKeys, o as isCliProvider, p as resolveConfiguredModelRef, pt as getSoonestCooldownExpiry, q as resolveApiKeyForProvider, r as buildModelAliasIndex, s as modelKey, t as buildAllowedModelSet, u as parseModelRef, v as resolveSubagentSpawnModelSelection, vt as resolveApiKeyForProfile, wt as dedupeProfileIds, y as resolveThinkingDefault } from "./model-selection-
|
|
10
|
+
import { C as ensureAgentWorkspace, E as loadWorkspaceBootstrapFiles, _ as DEFAULT_IDENTITY_FILENAME, a as resolveAgentModelFallbacksOverride, c as resolveAgentWorkspaceDir, d as resolveSessionAgentId, f as resolveSessionAgentIds, h as DEFAULT_BOOTSTRAP_FILENAME, i as resolveAgentDir, l as resolveDefaultAgentId, m as DEFAULT_AGENT_WORKSPACE_DIR, n as listAgentIds, o as resolveAgentModelPrimary, r as resolveAgentConfig, s as resolveAgentSkillsFilter, u as resolveEffectiveModelFallbacks, w as filterBootstrapFilesForSession } from "./agent-scope-B6jLdNuI.js";
|
|
11
|
+
import { At as ensureAuthProfileStore, Bt as normalizeSecretInput, Et as markAuthProfileGood, Ft as resolveOpenClawAgentDir, G as getCustomProviderApiKey, Gt as DEFAULT_MODEL, H as OLLAMA_NATIVE_BASE_URL, It as withFileLock, K as requireApiKey, Kt as DEFAULT_PROVIDER, Pt as resolveAuthStorePathForDisplay, Q as getShellPathFromLoginShell, Tt as listProfilesForProvider, U as createOllamaStreamFn, Vt as resolveAuthProfileDisplayLabel, W as getApiKeyForModel, Wt as DEFAULT_CONTEXT_TOKENS, X as resolveModelAuthMode, Y as resolveEnvApiKey, c as normalizeModelRef$2, et as resolveShellEnvFallbackTimeoutMs, ft as resolveAuthProfileOrder, g as resolveModelRefFromString, gt as markAuthProfileUsed, ht as markAuthProfileFailure, i as findNormalizedProviderValue, l as normalizeProviderId, m as resolveDefaultModelForAgent, mt as isProfileInCooldown, n as buildConfiguredAllowlistKeys, o as isCliProvider, p as resolveConfiguredModelRef, pt as getSoonestCooldownExpiry, q as resolveApiKeyForProvider, r as buildModelAliasIndex, s as modelKey, t as buildAllowedModelSet, u as parseModelRef, v as resolveSubagentSpawnModelSelection, vt as resolveApiKeyForProfile, wt as dedupeProfileIds, y as resolveThinkingDefault } from "./model-selection-C1pdWy7b.js";
|
|
12
12
|
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-D2zp6kMZ.js";
|
|
13
13
|
import { t as formatCliCommand } from "./command-format-DEKzLnLg.js";
|
|
14
14
|
import { t as parseBooleanValue$1 } from "./boolean-BsqeuxE6.js";
|
|
15
15
|
import { t as isTruthyEnvValue } from "./env-C9RBJHeg.js";
|
|
16
16
|
import { a as isInternalMessageChannel, c as listDeliverableMessageChannels, d as resolveMessageChannel, h as GATEWAY_CLIENT_NAMES, i as isGatewayMessageChannel, l as normalizeMessageChannel, m as GATEWAY_CLIENT_MODES, n as isDeliverableMessageChannel, o as isMarkdownCapableMessageChannel, p as GATEWAY_CLIENT_IDS, t as INTERNAL_MESSAGE_CHANNEL, u as resolveGatewayMessageChannel } from "./message-channel-DzkrSzpL.js";
|
|
17
|
-
import { $ as parseDiscordTarget, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as createDiscordRestClient, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as createDiscordClient, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordSystemLocation, a as removeReactionDiscord, at as normalizeDiscordAllowList, b as sendWebhookMessageDiscord, bt as fetchChannelPermissionsDiscord, c as formatDiscordComponentEventText, ct as resolveDiscordChannelConfigWithFallback, d as parseDiscordModalCustomId, dt as resolveDiscordOwnerAllowFrom, et as resolveDiscordChannelId, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordShouldRequireMention, g as sendMessageDiscord, gt as formatDiscordUserTag, h as resolveDiscordModalEntry, ht as formatDiscordReactionEmoji, i as removeOwnReactionsDiscord, it as isDiscordGroupAllowedByPolicy, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as resolveDiscordGuildEntry, m as resolveDiscordComponentEntry, mt as shouldEmitDiscordReactionNotification, n as fetchReactionsDiscord, nt as listDiscordDirectoryPeersLive, o as sendDiscordComponentMessage, ot as normalizeDiscordSlug, p as readDiscordComponentSpec, pt as resolveGroupDmAllow, q as deleteChannelDiscord, r as reactMessageDiscord, rt as allowListMatches$1, s as createDiscordFormModal, st as resolveDiscordAllowListMatch, tt as listDiscordDirectoryGroupsLive, u as parseDiscordComponentCustomIdForCarbon, ut as resolveDiscordMemberAccessState, v as sendStickerDiscord, vt as resolveTimestampMs, w as fetchMessageDiscord, wt as chunkDiscordTextWithMode, x as createThreadDiscord, xt as hasAnyGuildPermissionDiscord, y as sendVoiceMessageDiscord, yt as fetchDiscord, z as listGuildChannelsDiscord } from "./send-
|
|
18
|
-
import { A as parseConfigPath, B as resolveAgentMaxConcurrent, C as parseDurationMs, D as setConfigOverride, E as resetConfigOverrides, H as VERSION, M as unsetConfigValueAtPath, O as unsetConfigOverride, T as getConfigOverrides, _ as isInboundPathAllowed, b as resolveIMessageRemoteAttachmentRoots, c as resolveConfigSnapshotHash, h as resolveTelegramCustomCommands, i as loadConfig, j as setConfigValueAtPath, k as getConfigValueAtPath, l as writeConfigFile, m as normalizeTelegramCommandName, o as readConfigFileSnapshot, p as TELEGRAM_COMMAND_NAME_PATTERN, u as validateConfigObjectWithPlugins, w as validateJsonSchemaValue, x as normalizeScpRemoteHost, y as resolveIMessageAttachmentRoots, z as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH } from "./config-
|
|
17
|
+
import { $ as parseDiscordTarget, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as createDiscordRestClient, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as createDiscordClient, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordSystemLocation, a as removeReactionDiscord, at as normalizeDiscordAllowList, b as sendWebhookMessageDiscord, bt as fetchChannelPermissionsDiscord, c as formatDiscordComponentEventText, ct as resolveDiscordChannelConfigWithFallback, d as parseDiscordModalCustomId, dt as resolveDiscordOwnerAllowFrom, et as resolveDiscordChannelId, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordShouldRequireMention, g as sendMessageDiscord, gt as formatDiscordUserTag, h as resolveDiscordModalEntry, ht as formatDiscordReactionEmoji, i as removeOwnReactionsDiscord, it as isDiscordGroupAllowedByPolicy, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as resolveDiscordGuildEntry, m as resolveDiscordComponentEntry, mt as shouldEmitDiscordReactionNotification, n as fetchReactionsDiscord, nt as listDiscordDirectoryPeersLive, o as sendDiscordComponentMessage, ot as normalizeDiscordSlug, p as readDiscordComponentSpec, pt as resolveGroupDmAllow, q as deleteChannelDiscord, r as reactMessageDiscord, rt as allowListMatches$1, s as createDiscordFormModal, st as resolveDiscordAllowListMatch, tt as listDiscordDirectoryGroupsLive, u as parseDiscordComponentCustomIdForCarbon, ut as resolveDiscordMemberAccessState, v as sendStickerDiscord, vt as resolveTimestampMs, w as fetchMessageDiscord, wt as chunkDiscordTextWithMode, x as createThreadDiscord, xt as hasAnyGuildPermissionDiscord, y as sendVoiceMessageDiscord, yt as fetchDiscord, z as listGuildChannelsDiscord } from "./send-BilxFvrd.js";
|
|
18
|
+
import { A as parseConfigPath, B as resolveAgentMaxConcurrent, C as parseDurationMs, D as setConfigOverride, E as resetConfigOverrides, H as VERSION, M as unsetConfigValueAtPath, O as unsetConfigOverride, T as getConfigOverrides, _ as isInboundPathAllowed, b as resolveIMessageRemoteAttachmentRoots, c as resolveConfigSnapshotHash, h as resolveTelegramCustomCommands, i as loadConfig, j as setConfigValueAtPath, k as getConfigValueAtPath, l as writeConfigFile, m as normalizeTelegramCommandName, o as readConfigFileSnapshot, p as TELEGRAM_COMMAND_NAME_PATTERN, u as validateConfigObjectWithPlugins, w as validateJsonSchemaValue, x as normalizeScpRemoteHost, y as resolveIMessageAttachmentRoots, z as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH } from "./config-JupjCURB.js";
|
|
19
19
|
import { a as safeStatSync, c as applyTestPluginDefaults, d as resolveEnableState, f as resolveMemorySlotDecision, h as isDangerousHostEnvVarName, i as isPathInside, n as loadPluginManifestRegistry, r as discoverOpenClawPlugins, u as normalizePluginsConfig } from "./manifest-registry-YRUqEw3J.js";
|
|
20
20
|
import { a as isPathInsideWithRealpath } from "./legacy-names-u6U1_9U0.js";
|
|
21
21
|
import { t as normalizeChatType } from "./chat-type-DyovJwCt.js";
|
|
22
22
|
import { n as resolveConversationLabel } from "./conversation-label-Bn5j3lUT.js";
|
|
23
23
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-CmmmT8IP.js";
|
|
24
|
-
import { _ as applyTemplate, a as resolveMediaAttachmentLocalRoots, c as resolveAttachmentKind, d as registerUnhandledRejectionHandler, f as resolveConcurrency, g as CLI_OUTPUT_MAX_BUFFER, h as resolveMediaUnderstandingScope, i as resolveAutoImageModel, l as buildRandomTempFilePath, m as normalizeMediaUnderstandingChatType, n as createMediaAttachmentCache, o as runCapability, p as resolveTimeoutMs, r as normalizeMediaAttachments, t as buildProviderRegistry } from "./runner-
|
|
25
|
-
import { _ as stripThinkingTagsFromText, a as decodeDataUrl, b as minimaxUnderstandImage, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as stripReasoningTagsFromText, y as extractTextFromChatContent } from "./image-
|
|
26
|
-
import { t as ensureOpenClawModelsJson } from "./models-config-
|
|
24
|
+
import { _ as applyTemplate, a as resolveMediaAttachmentLocalRoots, c as resolveAttachmentKind, d as registerUnhandledRejectionHandler, f as resolveConcurrency, g as CLI_OUTPUT_MAX_BUFFER, h as resolveMediaUnderstandingScope, i as resolveAutoImageModel, l as buildRandomTempFilePath, m as normalizeMediaUnderstandingChatType, n as createMediaAttachmentCache, o as runCapability, p as resolveTimeoutMs, r as normalizeMediaAttachments, t as buildProviderRegistry } from "./runner-fLI-fZ-v.js";
|
|
25
|
+
import { _ as stripThinkingTagsFromText, a as decodeDataUrl, b as minimaxUnderstandImage, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as stripReasoningTagsFromText, y as extractTextFromChatContent } from "./image-DtVdv4CQ.js";
|
|
26
|
+
import { t as ensureOpenClawModelsJson } from "./models-config-BVp1ZtTh.js";
|
|
27
27
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-4uUnLc3n.js";
|
|
28
|
-
import { A as isTransientHttpError, C as isContextOverflowError, D as isRateLimitAssistantError, E as isLikelyContextOverflowError, F as ensureSessionHeader, I as resolveBootstrapMaxChars, L as resolveBootstrapTotalMaxChars, M as parseImageSizeError, N as sanitizeUserFacingText, O as isRawApiErrorPayload, P as buildBootstrapContextFiles, R as sanitizeGoogleTurnOrdering, S as isCompactionFailureError, T as isFailoverErrorMessage, _ as formatRawAssistantErrorForUi, a as isMessagingToolDuplicateNormalized, b as isBillingAssistantError, c as extractToolCallsFromAssistant, d as isAntigravityClaude, f as isGoogleModelApi, g as formatBillingErrorMessage, h as formatAssistantErrorText, j as parseImageDimensionError, k as isTimeoutErrorMessage, l as extractToolResultId, m as classifyFailoverReason, n as validateGeminiTurns, o as normalizeTextForComparison, p as BILLING_ERROR_USER_MESSAGE, r as pickFallbackThinkingLevel, s as sanitizeSessionMessagesImages, t as validateAnthropicTurns, u as downgradeOpenAIReasoningBlocks, v as getApiErrorPayloadFingerprint, w as isFailoverAssistantError, x as isCloudCodeAssistFormatError, y as isAuthAssistantError } from "./pi-embedded-helpers-
|
|
29
|
-
import { C as stripPluginOnlyAllowlist, S as resolveToolProfilePolicy, T as matchesAnyGlobPattern, _ as collectExplicitAllowlist, a as ensureSandboxWorkspaceForSession, b as mergeAlsoAllowPolicy, c as resolveSandboxRuntimeStatus, d as getBridgeAuthForPort, f as resolveSandboxConfigForAgent, g as buildPluginToolGroups, h as applyOwnerOnlyToolPolicy, o as resolveSandboxContext, v as expandPolicyWithPluginGroups, w as compileGlobPatterns, x as normalizeToolName } from "./sandbox-
|
|
30
|
-
import { T as DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./chrome-
|
|
31
|
-
import { i as resolveBrowserConfig, m as resolveBrowserControlAuth } from "./server-context-
|
|
32
|
-
import { a as resolveSkillsPromptForRun, d as resolveSandboxInputPath, h as applySkillEnvOverridesFromSnapshot, i as loadWorkspaceSkillEntries, l as assertMediaNotDataUrl, m as applySkillEnvOverrides, p as resolveSandboxedMediaSource, r as buildWorkspaceSkillSnapshot, u as assertSandboxPath } from "./skills-
|
|
28
|
+
import { A as isTransientHttpError, C as isContextOverflowError, D as isRateLimitAssistantError, E as isLikelyContextOverflowError, F as ensureSessionHeader, I as resolveBootstrapMaxChars, L as resolveBootstrapTotalMaxChars, M as parseImageSizeError, N as sanitizeUserFacingText, O as isRawApiErrorPayload, P as buildBootstrapContextFiles, R as sanitizeGoogleTurnOrdering, S as isCompactionFailureError, T as isFailoverErrorMessage, _ as formatRawAssistantErrorForUi, a as isMessagingToolDuplicateNormalized, b as isBillingAssistantError, c as extractToolCallsFromAssistant, d as isAntigravityClaude, f as isGoogleModelApi, g as formatBillingErrorMessage, h as formatAssistantErrorText, j as parseImageDimensionError, k as isTimeoutErrorMessage, l as extractToolResultId, m as classifyFailoverReason, n as validateGeminiTurns, o as normalizeTextForComparison, p as BILLING_ERROR_USER_MESSAGE, r as pickFallbackThinkingLevel, s as sanitizeSessionMessagesImages, t as validateAnthropicTurns, u as downgradeOpenAIReasoningBlocks, v as getApiErrorPayloadFingerprint, w as isFailoverAssistantError, x as isCloudCodeAssistFormatError, y as isAuthAssistantError } from "./pi-embedded-helpers-B9uwWqnh.js";
|
|
29
|
+
import { C as stripPluginOnlyAllowlist, S as resolveToolProfilePolicy, T as matchesAnyGlobPattern, _ as collectExplicitAllowlist, a as ensureSandboxWorkspaceForSession, b as mergeAlsoAllowPolicy, c as resolveSandboxRuntimeStatus, d as getBridgeAuthForPort, f as resolveSandboxConfigForAgent, g as buildPluginToolGroups, h as applyOwnerOnlyToolPolicy, o as resolveSandboxContext, v as expandPolicyWithPluginGroups, w as compileGlobPatterns, x as normalizeToolName } from "./sandbox-B1lVufmT.js";
|
|
30
|
+
import { T as DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./chrome-BlXdvPOB.js";
|
|
31
|
+
import { i as resolveBrowserConfig, m as resolveBrowserControlAuth } from "./server-context-DFBpyKBE.js";
|
|
32
|
+
import { a as resolveSkillsPromptForRun, d as resolveSandboxInputPath, h as applySkillEnvOverridesFromSnapshot, i as loadWorkspaceSkillEntries, l as assertMediaNotDataUrl, m as applySkillEnvOverrides, p as resolveSandboxedMediaSource, r as buildWorkspaceSkillSnapshot, u as assertSandboxPath } from "./skills-DO1RiQMB.js";
|
|
33
33
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-BF3TeRH2.js";
|
|
34
|
-
import { i as resolveExistingPathsWithinRoot, r as DEFAULT_UPLOAD_DIR } from "./paths-
|
|
34
|
+
import { i as resolveExistingPathsWithinRoot, r as DEFAULT_UPLOAD_DIR } from "./paths-BsnfCNkx.js";
|
|
35
35
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-BCYMnxkM.js";
|
|
36
|
-
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-
|
|
37
|
-
import { n as getMediaDir, r as saveMediaBuffer } from "./store-
|
|
38
|
-
import { B as resolveAgentMainSessionKey, C as capArrayByJsonBytes, E as readSessionTitleFieldsFromTranscript, F as resolveSessionResetType, H as resolveMainSessionKey, I as resolveThreadFlag, J as acquireSessionWriteLock, K as buildGroupDisplayName, L as DEFAULT_RESET_TRIGGERS, M as evaluateSessionFreshness, N as resolveChannelResetConfig, P as resolveSessionResetPolicy, R as resolveFreshSessionTotalTokens, S as archiveSessionTranscripts, V as resolveExplicitAgentSessionKey, W as deriveSessionMetaPatch, X as resolveSessionLockMaxHoldFromTimeout, _ as mergeDeliveryContext, a as resolveAndPersistSessionFile, b as normalizeAccountId$3, c as recordSessionMetaFromInbound, d as updateSessionStore, f as updateSessionStoreEntry, g as deliveryContextKey, h as deliveryContextFromSession, j as resolveSessionKey, m as resolveCacheTtlMs$1, n as parseSessionThreadInfo, o as loadSessionStore, p as isCacheEnabled, q as resolveGroupSessionKey, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, t as extractDeliveryInfo, u as updateLastRoute, v as normalizeDeliveryContext, y as normalizeSessionDeliveryFields, z as canonicalizeMainSessionAlias } from "./sessions-
|
|
39
|
-
import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-
|
|
40
|
-
import { _ as listEnabledDiscordAccounts, a as isWhatsAppGroupJid, c as listEnabledTelegramAccounts, d as resolveTelegramToken, f as resolveSlackAccount, g as createDiscordActionGate, h as resolveSlackBotToken, l as listTelegramAccountIds, m as resolveSlackAppToken, n as listChannelPlugins, o as normalizeWhatsAppTarget, r as normalizeChannelId$1, s as createTelegramActionGate, t as getChannelPlugin, u as resolveTelegramAccount, v as resolveDiscordAccount, y as normalizeDiscordToken } from "./plugins-
|
|
41
|
-
import { a as logWebSelfId, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, o as logoutWeb, u as readWebSelfId } from "./accounts-
|
|
42
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
43
|
-
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-
|
|
44
|
-
import { a as
|
|
36
|
+
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-Uvt51OHH.js";
|
|
37
|
+
import { n as getMediaDir, r as saveMediaBuffer } from "./store-CLuh0zX0.js";
|
|
38
|
+
import { B as resolveAgentMainSessionKey, C as capArrayByJsonBytes, E as readSessionTitleFieldsFromTranscript, F as resolveSessionResetType, H as resolveMainSessionKey, I as resolveThreadFlag, J as acquireSessionWriteLock, K as buildGroupDisplayName, L as DEFAULT_RESET_TRIGGERS, M as evaluateSessionFreshness, N as resolveChannelResetConfig, P as resolveSessionResetPolicy, R as resolveFreshSessionTotalTokens, S as archiveSessionTranscripts, V as resolveExplicitAgentSessionKey, W as deriveSessionMetaPatch, X as resolveSessionLockMaxHoldFromTimeout, _ as mergeDeliveryContext, a as resolveAndPersistSessionFile, b as normalizeAccountId$3, c as recordSessionMetaFromInbound, d as updateSessionStore, f as updateSessionStoreEntry, g as deliveryContextKey, h as deliveryContextFromSession, j as resolveSessionKey, m as resolveCacheTtlMs$1, n as parseSessionThreadInfo, o as loadSessionStore, p as isCacheEnabled, q as resolveGroupSessionKey, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, t as extractDeliveryInfo, u as updateLastRoute, v as normalizeDeliveryContext, y as normalizeSessionDeliveryFields, z as canonicalizeMainSessionAlias } from "./sessions-fj33u4f-.js";
|
|
39
|
+
import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-CX_o0bdi.js";
|
|
40
|
+
import { _ as listEnabledDiscordAccounts, a as isWhatsAppGroupJid, c as listEnabledTelegramAccounts, d as resolveTelegramToken, f as resolveSlackAccount, g as createDiscordActionGate, h as resolveSlackBotToken, l as listTelegramAccountIds, m as resolveSlackAppToken, n as listChannelPlugins, o as normalizeWhatsAppTarget, r as normalizeChannelId$1, s as createTelegramActionGate, t as getChannelPlugin, u as resolveTelegramAccount, v as resolveDiscordAccount, y as normalizeDiscordToken } from "./plugins-BYw4LpqC.js";
|
|
41
|
+
import { a as logWebSelfId, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, o as logoutWeb, u as readWebSelfId } from "./accounts-D8ryuxvJ.js";
|
|
42
|
+
import { t as resolveIMessageAccount } from "./accounts-E1DMCEDO.js";
|
|
43
|
+
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-Dl14M6E6.js";
|
|
44
|
+
import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, r as markdownToSlackMrkdwn, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-_y-b5SXH.js";
|
|
45
45
|
import { c as resolveStorePath, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, r as resolveSessionFilePathOptions, t as resolveDefaultSessionStorePath } from "./paths-C6eomcf_.js";
|
|
46
46
|
import { i as normalizeInputProvenance, n as applyInputProvenanceToUserMessage, r as hasInterSessionUserProvenance } from "./input-provenance-BzbXHcaD.js";
|
|
47
47
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-DdnTeoR1.js";
|
|
48
|
-
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-
|
|
48
|
+
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-Cdj7iZ0t.js";
|
|
49
49
|
import { n as resolveToolDisplay } from "./tool-display-2OmEbBUF.js";
|
|
50
50
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Db3da8yR.js";
|
|
51
51
|
import { t as fetchWithSsrFGuard } from "./fetch-guard-w97sP7Hz.js";
|
|
52
|
-
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, t as getAgentScopedMediaLocalRoots } from "./local-roots-
|
|
53
|
-
import { v as runTasksWithConcurrency } from "./sqlite-
|
|
54
|
-
import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-
|
|
52
|
+
import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, t as getAgentScopedMediaLocalRoots } from "./local-roots-25wkka6O.js";
|
|
53
|
+
import { v as runTasksWithConcurrency } from "./sqlite-DCO2j-0b.js";
|
|
54
|
+
import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-CzLbr1ZD.js";
|
|
55
55
|
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-BDil8-Uk.js";
|
|
56
|
-
import { n as createBrowserRouteDispatcher, r as getMachineDisplayName, t as withTimeout$4 } from "./with-timeout-
|
|
57
|
-
import { C as getGlobalHookRunner, S as throwIfAborted, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as splitMediaFromOutput, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as parseReplyDirectives, w as initializeGlobalHookRunner, x as parseInlineDirectives$1, y as MEDIA_TOKEN_RE } from "./deliver-
|
|
56
|
+
import { n as createBrowserRouteDispatcher, r as getMachineDisplayName, t as withTimeout$4 } from "./with-timeout-OwJVCBFG.js";
|
|
57
|
+
import { C as getGlobalHookRunner, S as throwIfAborted, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as splitMediaFromOutput, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as parseReplyDirectives, w as initializeGlobalHookRunner, x as parseInlineDirectives$1, y as MEDIA_TOKEN_RE } from "./deliver-DKhy3kV4.js";
|
|
58
58
|
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-loJQGh5N.js";
|
|
59
59
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-CUslJyKP.js";
|
|
60
|
-
import { A as hasBotMention, B as resolveSenderAllowMatch, C as buildTelegramGroupPeerId, D as describeReplyTarget, E as buildTypingThreadParams, F as resolveTelegramReplyId, G as toLocationContext, H as isSenderIdAllowed, I as resolveTelegramStreamMode, J as parseTelegramTarget, K as withTelegramApiErrorLogging, L as resolveTelegramThreadSpec, M as resolveTelegramForumThreadId, N as resolveTelegramGroupAllowFromContext, O as expandTextLinks, P as resolveTelegramMediaPlaceholder, R as isSenderAllowed$1, S as buildTelegramGroupFrom, T as buildTelegramThreadParams, U as mergeAllowFromSources, V as firstDefined$1, W as formatLocationText, Y as resolveTelegramTargetChatType, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildSenderLabel, c as sendStickerTelegram, d as wasSentByBot, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as normalizeForwardedContext, k as extractTelegramLocation, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as isVoiceCompatibleAudio, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramParentPeer, x as buildSenderName, y as buildGroupLabel, z as normalizeAllowFromWithStore$1 } from "./send-
|
|
61
|
-
import { a as buildModelAliasLines, n as resolveModel } from "./model-
|
|
62
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
63
|
-
import { i as resolveMemoryBackendConfig, n as registerMemoryCli, r as getMemorySearchManager } from "./memory-cli-
|
|
64
|
-
import { n as resolveMemorySearchConfig } from "./manager-
|
|
60
|
+
import { A as hasBotMention, B as resolveSenderAllowMatch, C as buildTelegramGroupPeerId, D as describeReplyTarget, E as buildTypingThreadParams, F as resolveTelegramReplyId, G as toLocationContext, H as isSenderIdAllowed, I as resolveTelegramStreamMode, J as parseTelegramTarget, K as withTelegramApiErrorLogging, L as resolveTelegramThreadSpec, M as resolveTelegramForumThreadId, N as resolveTelegramGroupAllowFromContext, O as expandTextLinks, P as resolveTelegramMediaPlaceholder, R as isSenderAllowed$1, S as buildTelegramGroupFrom, T as buildTelegramThreadParams, U as mergeAllowFromSources, V as firstDefined$1, W as formatLocationText, Y as resolveTelegramTargetChatType, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildSenderLabel, c as sendStickerTelegram, d as wasSentByBot, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as normalizeForwardedContext, k as extractTelegramLocation, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as isVoiceCompatibleAudio, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramParentPeer, x as buildSenderName, y as buildGroupLabel, z as normalizeAllowFromWithStore$1 } from "./send-YdmCYGSj.js";
|
|
61
|
+
import { a as buildModelAliasLines, n as resolveModel } from "./model-MOoXNngW.js";
|
|
62
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-CJc9NzGX.js";
|
|
63
|
+
import { i as resolveMemoryBackendConfig, n as registerMemoryCli, r as getMemorySearchManager } from "./memory-cli-CS7LI30B.js";
|
|
64
|
+
import { n as resolveMemorySearchConfig } from "./manager-BVtzk7_v.js";
|
|
65
65
|
import { n as retryAsync } from "./retry-BNSym93Y.js";
|
|
66
|
-
import { c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-
|
|
66
|
+
import { c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-DKUMw1tA.js";
|
|
67
67
|
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-ZFvwZqoJ.js";
|
|
68
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
69
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-
|
|
70
|
-
import { a as resolveNativeSkillsEnabled, i as resolveNativeCommandsEnabled, n as isNativeCommandsExplicitlyDisabled, r as isRestartEnabled, t as isCommandFlagEnabled } from "./commands-
|
|
71
|
-
import { a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, i as listChatCommands, l as parseCommandArgs, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices } from "./commands-registry-
|
|
72
|
-
import { Mt as SESSION_LABEL_MAX_LENGTH, t as GatewayClient } from "./client-
|
|
73
|
-
import { a as randomIdempotencyKey, d as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege, t as buildGatewayConnectionDetails } from "./call-
|
|
68
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-MNYCbYg1.js";
|
|
69
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-1SG-TkUZ.js";
|
|
70
|
+
import { a as resolveNativeSkillsEnabled, i as resolveNativeCommandsEnabled, n as isNativeCommandsExplicitlyDisabled, r as isRestartEnabled, t as isCommandFlagEnabled } from "./commands-KvUzKZ-E.js";
|
|
71
|
+
import { a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, i as listChatCommands, l as parseCommandArgs, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices } from "./commands-registry-DVVMuhaG.js";
|
|
72
|
+
import { Mt as SESSION_LABEL_MAX_LENGTH, t as GatewayClient } from "./client-BW8Wuj5N.js";
|
|
73
|
+
import { a as randomIdempotencyKey, d as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege, t as buildGatewayConnectionDetails } from "./call-CYa4YbMh.js";
|
|
74
74
|
import { n as formatTimeAgo } from "./format-relative-BXoxEQVN.js";
|
|
75
75
|
import { n as normalizePollInput } from "./polls-DhH5YkzN.js";
|
|
76
76
|
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-DplV01TN.js";
|
|
77
77
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-EupTshKr.js";
|
|
78
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
79
|
-
import { c as signalRpcRequest, l as streamSignalEvents, n as sendReadReceiptSignal, o as resolveSignalRpcContext, r as sendTypingSignal, s as signalCheck, t as sendMessageSignal } from "./send-
|
|
80
|
-
import { i as readChannelAllowFromStore, l as listPairingChannels, o as removeChannelAllowFromStoreEntry, s as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-
|
|
78
|
+
import { t as convertMarkdownTables } from "./tables-DhRyfXvl.js";
|
|
79
|
+
import { c as signalRpcRequest, l as streamSignalEvents, n as sendReadReceiptSignal, o as resolveSignalRpcContext, r as sendTypingSignal, s as signalCheck, t as sendMessageSignal } from "./send-UJWeL6fz.js";
|
|
80
|
+
import { i as readChannelAllowFromStore, l as listPairingChannels, o as removeChannelAllowFromStoreEntry, s as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-BzMeXbOB.js";
|
|
81
81
|
import { t as makeProxyFetch } from "./proxy-DU7W9XSc.js";
|
|
82
82
|
import { i as formatDurationSeconds, r as formatDurationPrecise, t as formatDurationCompact$1 } from "./format-duration-D0B0Uo-I.js";
|
|
83
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
84
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
85
|
-
import { b as ensureSkillsWatcher, i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, t as listReservedChatSlashCommandNames, x as getSkillsSnapshotVersion } from "./skill-commands-
|
|
83
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-C5pUt_LC.js";
|
|
84
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-BVBgaEtE.js";
|
|
85
|
+
import { b as ensureSkillsWatcher, i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, t as listReservedChatSlashCommandNames, x as getSkillsSnapshotVersion } from "./skill-commands-27Clp6Hw.js";
|
|
86
86
|
import { c as hasNonzeroUsage, l as normalizeUsage, n as loadCostUsageSummary, o as derivePromptTokens, r as loadSessionCostSummary, s as deriveSessionTotalTokens } from "./session-cost-usage-CNxpZ3DJ.js";
|
|
87
|
-
import { a as normalizeIMessageHandle, c as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, i as isAllowedIMessageSender, o as parseIMessageTarget, r as formatIMessageChatTarget, s as createIMessageRpcClient, t as sendMessageIMessage } from "./send-
|
|
88
|
-
import { r as detectBinary } from "./onboard-helpers-
|
|
89
|
-
import { t as resolvePairingIdLabel } from "./pairing-labels-
|
|
87
|
+
import { a as normalizeIMessageHandle, c as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, i as isAllowedIMessageSender, o as parseIMessageTarget, r as formatIMessageChatTarget, s as createIMessageRpcClient, t as sendMessageIMessage } from "./send-DAb8zkAc.js";
|
|
88
|
+
import { r as detectBinary } from "./onboard-helpers-C2-IAGyl.js";
|
|
89
|
+
import { t as resolvePairingIdLabel } from "./pairing-labels-Cf9ie2Yo.js";
|
|
90
90
|
import { i as resolveModelCostConfig, n as formatTokenCount$2, r as formatUsd, t as estimateUsageCost } from "./usage-format-BzKEDn0q.js";
|
|
91
91
|
import { t as getActiveWebListener } from "./active-listener-CJ5IzmcP.js";
|
|
92
92
|
import { _ as getTrustedSafeBinDirs, b as buildSafeShellCommand, d as resolveExecApprovals, f as resolveExecApprovalsFromFile, g as resolveSafeBins, h as evaluateShellAllowlist, i as maxAsk, l as recordAllowlistUse, n as addAllowlistEntry, o as minSecurity, u as requiresExecApproval, y as buildSafeBinsShellCommand } from "./exec-approvals-CAr0jd5Q.js";
|
|
93
|
-
import { a as canvasSnapshotTempPath, c as parseCameraClipPayload, d as writeCameraClipPayloadToFile, f as writeUrlToFile, g as normalizePathPrepend, h as mergePathPrepend, i as parseEnvPairs, l as parseCameraSnapPayload, m as applyPathPrepend, n as screenRecordTempPath, o as parseCanvasSnapshotPayload, p as buildNodeShellCommand, r as writeScreenRecordToFile, s as cameraTempPath, t as parseScreenRecordPayload, u as writeBase64ToFile } from "./nodes-screen-
|
|
93
|
+
import { a as canvasSnapshotTempPath, c as parseCameraClipPayload, d as writeCameraClipPayloadToFile, f as writeUrlToFile, g as normalizePathPrepend, h as mergePathPrepend, i as parseEnvPairs, l as parseCameraSnapPayload, m as applyPathPrepend, n as screenRecordTempPath, o as parseCanvasSnapshotPayload, p as buildNodeShellCommand, r as writeScreenRecordToFile, s as cameraTempPath, t as parseScreenRecordPayload, u as writeBase64ToFile } from "./nodes-screen-kFzB7013.js";
|
|
94
94
|
import { n as parseNodeList, r as parsePairingList, t as resolveNodeIdFromCandidates } from "./node-match-CN8o4Vi3.js";
|
|
95
95
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-BiwOFDEK.js";
|
|
96
|
-
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-
|
|
96
|
+
import { n as createBrowserControlContext, r as startBrowserControlServiceFromConfig } from "./control-service-C7XguOvd.js";
|
|
97
97
|
import { i as parseAbsoluteTimeMs, r as resolveDefaultCronStaggerMs, t as normalizeCronStaggerMs } from "./stagger-B6VQyn1F.js";
|
|
98
98
|
import { c as resolveGatewayLaunchAgentLabel, d as resolveGatewaySystemdServiceName } from "./constants-CEbQvI8z.js";
|
|
99
|
-
import { n as resolveMessageChannelSelection, t as listConfiguredMessageChannels } from "./channel-selection-
|
|
99
|
+
import { n as resolveMessageChannelSelection, t as listConfiguredMessageChannels } from "./channel-selection-NCqPAi5U.js";
|
|
100
100
|
import { t as parseTimeoutMs } from "./parse-timeout-UOA56UND.js";
|
|
101
|
-
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, n as isToolAllowedByPolicies, r as resolveEffectiveToolPolicy, t as filterToolsByPolicy } from "./pi-tools.policy-
|
|
101
|
+
import { a as resolveSubagentToolPolicy, i as resolveGroupToolPolicy, n as isToolAllowedByPolicies, r as resolveEffectiveToolPolicy, t as filterToolsByPolicy } from "./pi-tools.policy-BU3gaxu3.js";
|
|
102
102
|
import { createRequire } from "node:module";
|
|
103
103
|
import { fileURLToPath } from "node:url";
|
|
104
104
|
import fs, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
105
105
|
import os, { homedir } from "node:os";
|
|
106
106
|
import path from "node:path";
|
|
107
107
|
import JSON5 from "json5";
|
|
108
|
-
import
|
|
108
|
+
import fsPromises from "node:fs/promises";
|
|
109
109
|
import { execFileSync, spawn, spawnSync } from "node:child_process";
|
|
110
110
|
import { inspect } from "node:util";
|
|
111
111
|
import crypto, { createHash, createHmac, randomBytes, randomUUID } from "node:crypto";
|
|
@@ -2891,7 +2891,7 @@ async function createModelSelectionState(params) {
|
|
|
2891
2891
|
}
|
|
2892
2892
|
}
|
|
2893
2893
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
2894
|
-
const { ensureAuthProfileStore } = await import("./model-selection-
|
|
2894
|
+
const { ensureAuthProfileStore } = await import("./model-selection-C1pdWy7b.js").then((n) => n.dt);
|
|
2895
2895
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
2896
2896
|
const providerKey = normalizeProviderId(provider);
|
|
2897
2897
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -10489,7 +10489,7 @@ async function routeReply(params) {
|
|
|
10489
10489
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
10490
10490
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
10491
10491
|
try {
|
|
10492
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
10492
|
+
const { deliverOutboundPayloads } = await import("./deliver-DKhy3kV4.js").then((n) => n.n);
|
|
10493
10493
|
return {
|
|
10494
10494
|
ok: true,
|
|
10495
10495
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -13042,8 +13042,8 @@ async function describeStickerImage(params) {
|
|
|
13042
13042
|
const { provider, model } = resolved;
|
|
13043
13043
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
13044
13044
|
try {
|
|
13045
|
-
const buffer = await
|
|
13046
|
-
const { describeImageWithModel } = await import("./image-
|
|
13045
|
+
const buffer = await fsPromises.readFile(imagePath);
|
|
13046
|
+
const { describeImageWithModel } = await import("./image-DtVdv4CQ.js").then((n) => n.n);
|
|
13047
13047
|
return (await describeImageWithModel({
|
|
13048
13048
|
buffer,
|
|
13049
13049
|
fileName: "sticker.webp",
|
|
@@ -13466,7 +13466,7 @@ function createWhatsAppLoginTool() {
|
|
|
13466
13466
|
force: Type.Optional(Type.Boolean())
|
|
13467
13467
|
}),
|
|
13468
13468
|
execute: async (_toolCallId, args) => {
|
|
13469
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
13469
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-BOOn03RH.js");
|
|
13470
13470
|
if ((args?.action ?? "start") === "wait") {
|
|
13471
13471
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
13472
13472
|
return {
|
|
@@ -15682,7 +15682,7 @@ async function preflightDiscordMessage(params) {
|
|
|
15682
15682
|
let preflightTranscript;
|
|
15683
15683
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
15684
15684
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
15685
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
15685
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DRE31Ab_.js");
|
|
15686
15686
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
15687
15687
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
15688
15688
|
ctx: {
|
|
@@ -21612,18 +21612,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
21612
21612
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
21613
21613
|
}
|
|
21614
21614
|
async function writeCliImages(images) {
|
|
21615
|
-
const tempDir = await
|
|
21615
|
+
const tempDir = await fsPromises.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
|
|
21616
21616
|
const paths = [];
|
|
21617
21617
|
for (let i = 0; i < images.length; i += 1) {
|
|
21618
21618
|
const image = images[i];
|
|
21619
21619
|
const ext = resolveImageExtension(image.mimeType);
|
|
21620
21620
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
21621
21621
|
const buffer = Buffer.from(image.data, "base64");
|
|
21622
|
-
await
|
|
21622
|
+
await fsPromises.writeFile(filePath, buffer, { mode: 384 });
|
|
21623
21623
|
paths.push(filePath);
|
|
21624
21624
|
}
|
|
21625
21625
|
const cleanup = async () => {
|
|
21626
|
-
await
|
|
21626
|
+
await fsPromises.rm(tempDir, {
|
|
21627
21627
|
recursive: true,
|
|
21628
21628
|
force: true
|
|
21629
21629
|
});
|
|
@@ -22376,27 +22376,27 @@ async function runWithImageModelFallback(params) {
|
|
|
22376
22376
|
function createDefaultDeps() {
|
|
22377
22377
|
return {
|
|
22378
22378
|
sendMessageWhatsApp: async (...args) => {
|
|
22379
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
22379
|
+
const { sendMessageWhatsApp } = await import("./web-lXypZuaq.js");
|
|
22380
22380
|
return await sendMessageWhatsApp(...args);
|
|
22381
22381
|
},
|
|
22382
22382
|
sendMessageTelegram: async (...args) => {
|
|
22383
|
-
const { sendMessageTelegram } = await import("./send-
|
|
22383
|
+
const { sendMessageTelegram } = await import("./send-YdmCYGSj.js").then((n) => n.l);
|
|
22384
22384
|
return await sendMessageTelegram(...args);
|
|
22385
22385
|
},
|
|
22386
22386
|
sendMessageDiscord: async (...args) => {
|
|
22387
|
-
const { sendMessageDiscord } = await import("./send-
|
|
22387
|
+
const { sendMessageDiscord } = await import("./send-BilxFvrd.js").then((n) => n.t);
|
|
22388
22388
|
return await sendMessageDiscord(...args);
|
|
22389
22389
|
},
|
|
22390
22390
|
sendMessageSlack: async (...args) => {
|
|
22391
|
-
const { sendMessageSlack } = await import("./send-
|
|
22391
|
+
const { sendMessageSlack } = await import("./send-_y-b5SXH.js").then((n) => n.n);
|
|
22392
22392
|
return await sendMessageSlack(...args);
|
|
22393
22393
|
},
|
|
22394
22394
|
sendMessageSignal: async (...args) => {
|
|
22395
|
-
const { sendMessageSignal } = await import("./send-
|
|
22395
|
+
const { sendMessageSignal } = await import("./send-UJWeL6fz.js").then((n) => n.i);
|
|
22396
22396
|
return await sendMessageSignal(...args);
|
|
22397
22397
|
},
|
|
22398
22398
|
sendMessageIMessage: async (...args) => {
|
|
22399
|
-
const { sendMessageIMessage } = await import("./send-
|
|
22399
|
+
const { sendMessageIMessage } = await import("./send-DAb8zkAc.js").then((n) => n.n);
|
|
22400
22400
|
return await sendMessageIMessage(...args);
|
|
22401
22401
|
}
|
|
22402
22402
|
};
|
|
@@ -23586,10 +23586,10 @@ function estimateDurationSeconds(pcm) {
|
|
|
23586
23586
|
return pcm.length / (bytesPerSample * SAMPLE_RATE);
|
|
23587
23587
|
}
|
|
23588
23588
|
async function writeWavFile(pcm) {
|
|
23589
|
-
const tempDir = await
|
|
23589
|
+
const tempDir = await fsPromises.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "discord-voice-"));
|
|
23590
23590
|
const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
|
|
23591
23591
|
const wav = buildWavBuffer(pcm);
|
|
23592
|
-
await
|
|
23592
|
+
await fsPromises.writeFile(filePath, wav);
|
|
23593
23593
|
scheduleTempCleanup(tempDir);
|
|
23594
23594
|
return {
|
|
23595
23595
|
path: filePath,
|
|
@@ -23598,7 +23598,7 @@ async function writeWavFile(pcm) {
|
|
|
23598
23598
|
}
|
|
23599
23599
|
function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
|
|
23600
23600
|
setTimeout(() => {
|
|
23601
|
-
|
|
23601
|
+
fsPromises.rm(tempDir, {
|
|
23602
23602
|
recursive: true,
|
|
23603
23603
|
force: true
|
|
23604
23604
|
}).catch((err) => {
|
|
@@ -27337,7 +27337,7 @@ function normalizeAllowList$2(list) {
|
|
|
27337
27337
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
27338
27338
|
try {
|
|
27339
27339
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
27340
|
-
const content = await
|
|
27340
|
+
const content = await fsPromises.readFile(expanded, "utf8");
|
|
27341
27341
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
27342
27342
|
if (userHostMatch) return userHostMatch[1];
|
|
27343
27343
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -31037,8 +31037,12 @@ function inferSlackChannelType(channelId) {
|
|
|
31037
31037
|
}
|
|
31038
31038
|
function normalizeSlackChannelType(channelType, channelId) {
|
|
31039
31039
|
const normalized = channelType?.trim().toLowerCase();
|
|
31040
|
-
|
|
31041
|
-
|
|
31040
|
+
const inferred = inferSlackChannelType(channelId);
|
|
31041
|
+
if (normalized === "im" || normalized === "mpim" || normalized === "channel" || normalized === "group") {
|
|
31042
|
+
if (inferred === "im" && normalized !== "im") return "im";
|
|
31043
|
+
return normalized;
|
|
31044
|
+
}
|
|
31045
|
+
return inferred ?? "channel";
|
|
31042
31046
|
}
|
|
31043
31047
|
function createSlackMonitorContext(params) {
|
|
31044
31048
|
const channelHistories = /* @__PURE__ */ new Map();
|
|
@@ -31322,7 +31326,7 @@ function migrateSlackChannelConfig(params) {
|
|
|
31322
31326
|
//#endregion
|
|
31323
31327
|
//#region src/slack/monitor/events/channels.ts
|
|
31324
31328
|
function registerSlackChannelEvents(params) {
|
|
31325
|
-
const { ctx } = params;
|
|
31329
|
+
const { ctx, trackEvent } = params;
|
|
31326
31330
|
const enqueueChannelSystemEvent = (params) => {
|
|
31327
31331
|
if (!ctx.isChannelAllowed({
|
|
31328
31332
|
channelId: params.channelId,
|
|
@@ -31345,6 +31349,7 @@ function registerSlackChannelEvents(params) {
|
|
|
31345
31349
|
ctx.app.event("channel_created", async ({ event, body }) => {
|
|
31346
31350
|
try {
|
|
31347
31351
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
31352
|
+
trackEvent?.();
|
|
31348
31353
|
const payload = event;
|
|
31349
31354
|
const channelId = payload.channel?.id;
|
|
31350
31355
|
const channelName = payload.channel?.name;
|
|
@@ -31360,6 +31365,7 @@ function registerSlackChannelEvents(params) {
|
|
|
31360
31365
|
ctx.app.event("channel_rename", async ({ event, body }) => {
|
|
31361
31366
|
try {
|
|
31362
31367
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
31368
|
+
trackEvent?.();
|
|
31363
31369
|
const payload = event;
|
|
31364
31370
|
const channelId = payload.channel?.id;
|
|
31365
31371
|
enqueueChannelSystemEvent({
|
|
@@ -31374,6 +31380,7 @@ function registerSlackChannelEvents(params) {
|
|
|
31374
31380
|
ctx.app.event("channel_id_changed", async ({ event, body }) => {
|
|
31375
31381
|
try {
|
|
31376
31382
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
31383
|
+
trackEvent?.();
|
|
31377
31384
|
const payload = event;
|
|
31378
31385
|
const oldChannelId = payload.old_channel_id;
|
|
31379
31386
|
const newChannelId = payload.new_channel_id;
|
|
@@ -31779,10 +31786,11 @@ function registerSlackInteractionEvents(params) {
|
|
|
31779
31786
|
//#endregion
|
|
31780
31787
|
//#region src/slack/monitor/events/members.ts
|
|
31781
31788
|
function registerSlackMemberEvents(params) {
|
|
31782
|
-
const { ctx } = params;
|
|
31789
|
+
const { ctx, trackEvent } = params;
|
|
31783
31790
|
const handleMemberChannelEvent = async (params) => {
|
|
31784
31791
|
try {
|
|
31785
31792
|
if (ctx.shouldDropMismatchedSlackEvent(params.body)) return;
|
|
31793
|
+
trackEvent?.();
|
|
31786
31794
|
const payload = params.event;
|
|
31787
31795
|
const channelId = payload.channel;
|
|
31788
31796
|
const channelInfo = channelId ? await ctx.resolveChannelName(channelId) : {};
|
|
@@ -31918,9 +31926,10 @@ function registerSlackMessageEvents(params) {
|
|
|
31918
31926
|
//#endregion
|
|
31919
31927
|
//#region src/slack/monitor/events/pins.ts
|
|
31920
31928
|
async function handleSlackPinEvent(params) {
|
|
31921
|
-
const { ctx, body, event, action, contextKeySuffix, errorLabel } = params;
|
|
31929
|
+
const { ctx, trackEvent, body, event, action, contextKeySuffix, errorLabel } = params;
|
|
31922
31930
|
try {
|
|
31923
31931
|
if (ctx.shouldDropMismatchedSlackEvent(body)) return;
|
|
31932
|
+
trackEvent?.();
|
|
31924
31933
|
const payload = event;
|
|
31925
31934
|
const channelId = payload.channel_id;
|
|
31926
31935
|
const channelInfo = channelId ? await ctx.resolveChannelName(channelId) : {};
|
|
@@ -31949,10 +31958,11 @@ async function handleSlackPinEvent(params) {
|
|
|
31949
31958
|
}
|
|
31950
31959
|
}
|
|
31951
31960
|
function registerSlackPinEvents(params) {
|
|
31952
|
-
const { ctx } = params;
|
|
31961
|
+
const { ctx, trackEvent } = params;
|
|
31953
31962
|
ctx.app.event("pin_added", async ({ event, body }) => {
|
|
31954
31963
|
await handleSlackPinEvent({
|
|
31955
31964
|
ctx,
|
|
31965
|
+
trackEvent,
|
|
31956
31966
|
body,
|
|
31957
31967
|
event,
|
|
31958
31968
|
action: "pinned",
|
|
@@ -31963,6 +31973,7 @@ function registerSlackPinEvents(params) {
|
|
|
31963
31973
|
ctx.app.event("pin_removed", async ({ event, body }) => {
|
|
31964
31974
|
await handleSlackPinEvent({
|
|
31965
31975
|
ctx,
|
|
31976
|
+
trackEvent,
|
|
31966
31977
|
body,
|
|
31967
31978
|
event,
|
|
31968
31979
|
action: "unpinned",
|
|
@@ -31975,11 +31986,12 @@ function registerSlackPinEvents(params) {
|
|
|
31975
31986
|
//#endregion
|
|
31976
31987
|
//#region src/slack/monitor/events/reactions.ts
|
|
31977
31988
|
function registerSlackReactionEvents(params) {
|
|
31978
|
-
const { ctx } = params;
|
|
31989
|
+
const { ctx, trackEvent } = params;
|
|
31979
31990
|
const handleReactionEvent = async (event, action) => {
|
|
31980
31991
|
try {
|
|
31981
31992
|
const item = event.item;
|
|
31982
31993
|
if (!item || item.type !== "message") return;
|
|
31994
|
+
trackEvent?.();
|
|
31983
31995
|
const channelInfo = item.channel ? await ctx.resolveChannelName(item.channel) : {};
|
|
31984
31996
|
const channelType = channelInfo?.type;
|
|
31985
31997
|
if (!ctx.isChannelAllowed({
|
|
@@ -32023,10 +32035,22 @@ function registerSlackMonitorEvents(params) {
|
|
|
32023
32035
|
ctx: params.ctx,
|
|
32024
32036
|
handleSlackMessage: params.handleSlackMessage
|
|
32025
32037
|
});
|
|
32026
|
-
registerSlackReactionEvents({
|
|
32027
|
-
|
|
32028
|
-
|
|
32029
|
-
|
|
32038
|
+
registerSlackReactionEvents({
|
|
32039
|
+
ctx: params.ctx,
|
|
32040
|
+
trackEvent: params.trackEvent
|
|
32041
|
+
});
|
|
32042
|
+
registerSlackMemberEvents({
|
|
32043
|
+
ctx: params.ctx,
|
|
32044
|
+
trackEvent: params.trackEvent
|
|
32045
|
+
});
|
|
32046
|
+
registerSlackChannelEvents({
|
|
32047
|
+
ctx: params.ctx,
|
|
32048
|
+
trackEvent: params.trackEvent
|
|
32049
|
+
});
|
|
32050
|
+
registerSlackPinEvents({
|
|
32051
|
+
ctx: params.ctx,
|
|
32052
|
+
trackEvent: params.trackEvent
|
|
32053
|
+
});
|
|
32030
32054
|
registerSlackInteractionEvents({ ctx: params.ctx });
|
|
32031
32055
|
}
|
|
32032
32056
|
|
|
@@ -32199,7 +32223,7 @@ async function startSlackStream(params) {
|
|
|
32199
32223
|
stopped: false
|
|
32200
32224
|
};
|
|
32201
32225
|
if (text) {
|
|
32202
|
-
await streamer.append({ markdown_text: text });
|
|
32226
|
+
await streamer.append({ markdown_text: markdownToSlackMrkdwn(text) });
|
|
32203
32227
|
logVerbose(`slack-stream: appended initial text (${text.length} chars)`);
|
|
32204
32228
|
}
|
|
32205
32229
|
return session;
|
|
@@ -32214,7 +32238,7 @@ async function appendSlackStream(params) {
|
|
|
32214
32238
|
return;
|
|
32215
32239
|
}
|
|
32216
32240
|
if (!text) return;
|
|
32217
|
-
await session.streamer.append({ markdown_text: text });
|
|
32241
|
+
await session.streamer.append({ markdown_text: markdownToSlackMrkdwn(text) });
|
|
32218
32242
|
logVerbose(`slack-stream: appended ${text.length} chars`);
|
|
32219
32243
|
}
|
|
32220
32244
|
/**
|
|
@@ -32231,7 +32255,7 @@ async function stopSlackStream(params) {
|
|
|
32231
32255
|
}
|
|
32232
32256
|
session.stopped = true;
|
|
32233
32257
|
logVerbose(`slack-stream: stopping stream in ${session.channel} thread=${session.threadTs}${text ? ` (final text: ${text.length} chars)` : ""}`);
|
|
32234
|
-
await session.streamer.stop(text ? { markdown_text: text } : void 0);
|
|
32258
|
+
await session.streamer.stop(text ? { markdown_text: markdownToSlackMrkdwn(text) } : void 0);
|
|
32235
32259
|
logVerbose("slack-stream: stream stopped");
|
|
32236
32260
|
}
|
|
32237
32261
|
|
|
@@ -32250,12 +32274,21 @@ function resolveSlackThreadContext(params) {
|
|
|
32250
32274
|
messageThreadId: isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0
|
|
32251
32275
|
};
|
|
32252
32276
|
}
|
|
32277
|
+
/**
|
|
32278
|
+
* Resolves Slack thread targeting for replies and status indicators.
|
|
32279
|
+
*
|
|
32280
|
+
* @returns replyThreadTs - Thread timestamp for reply messages
|
|
32281
|
+
* @returns statusThreadTs - Thread timestamp for status indicators (typing, etc.)
|
|
32282
|
+
* @returns isThreadReply - true if this is a genuine user reply in a thread,
|
|
32283
|
+
* false if thread_ts comes from a bot status message
|
|
32284
|
+
*/
|
|
32253
32285
|
function resolveSlackThreadTargets(params) {
|
|
32254
|
-
const { incomingThreadTs, messageTs } = resolveSlackThreadContext(params);
|
|
32255
|
-
const replyThreadTs = incomingThreadTs
|
|
32286
|
+
const { incomingThreadTs, messageTs, isThreadReply } = resolveSlackThreadContext(params);
|
|
32287
|
+
const replyThreadTs = isThreadReply ? incomingThreadTs : params.replyToMode === "all" ? messageTs : void 0;
|
|
32256
32288
|
return {
|
|
32257
32289
|
replyThreadTs,
|
|
32258
|
-
statusThreadTs: replyThreadTs
|
|
32290
|
+
statusThreadTs: replyThreadTs,
|
|
32291
|
+
isThreadReply
|
|
32259
32292
|
};
|
|
32260
32293
|
}
|
|
32261
32294
|
|
|
@@ -32295,12 +32328,13 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
32295
32328
|
deliveryContext: {
|
|
32296
32329
|
channel: "slack",
|
|
32297
32330
|
to: `user:${message.user}`,
|
|
32298
|
-
accountId: route.accountId
|
|
32331
|
+
accountId: route.accountId,
|
|
32332
|
+
threadId: prepared.ctxPayload.MessageThreadId
|
|
32299
32333
|
},
|
|
32300
32334
|
ctx: prepared.ctxPayload
|
|
32301
32335
|
});
|
|
32302
32336
|
}
|
|
32303
|
-
const { statusThreadTs } = resolveSlackThreadTargets({
|
|
32337
|
+
const { statusThreadTs, isThreadReply } = resolveSlackThreadTargets({
|
|
32304
32338
|
message,
|
|
32305
32339
|
replyToMode: ctx.replyToMode
|
|
32306
32340
|
});
|
|
@@ -32312,7 +32346,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
32312
32346
|
replyToMode: ctx.replyToMode,
|
|
32313
32347
|
incomingThreadTs,
|
|
32314
32348
|
messageTs,
|
|
32315
|
-
hasRepliedRef
|
|
32349
|
+
hasRepliedRef,
|
|
32350
|
+
isThreadReply
|
|
32316
32351
|
});
|
|
32317
32352
|
const typingTarget = statusThreadTs ? `${message.channel}/${statusThreadTs}` : message.channel;
|
|
32318
32353
|
const typingCallbacks = createTypingCallbacks({
|
|
@@ -32377,7 +32412,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
32377
32412
|
accountId: account.accountId,
|
|
32378
32413
|
runtime,
|
|
32379
32414
|
textLimit: ctx.textLimit,
|
|
32380
|
-
replyThreadTs
|
|
32415
|
+
replyThreadTs,
|
|
32416
|
+
replyToMode: ctx.replyToMode
|
|
32381
32417
|
});
|
|
32382
32418
|
replyPlan.markSent();
|
|
32383
32419
|
};
|
|
@@ -32438,7 +32474,7 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
32438
32474
|
token: ctx.botToken,
|
|
32439
32475
|
channel: draftChannelId,
|
|
32440
32476
|
ts: draftMessageId,
|
|
32441
|
-
text: finalText.trim()
|
|
32477
|
+
text: markdownToSlackMrkdwn(finalText.trim())
|
|
32442
32478
|
});
|
|
32443
32479
|
return;
|
|
32444
32480
|
} catch (err) {
|
|
@@ -32468,7 +32504,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
32468
32504
|
accountId: account.accountId,
|
|
32469
32505
|
runtime,
|
|
32470
32506
|
textLimit: ctx.textLimit,
|
|
32471
|
-
replyThreadTs
|
|
32507
|
+
replyThreadTs,
|
|
32508
|
+
replyToMode: ctx.replyToMode
|
|
32472
32509
|
});
|
|
32473
32510
|
replyPlan.markSent();
|
|
32474
32511
|
},
|
|
@@ -32477,7 +32514,8 @@ async function dispatchPreparedSlackMessage(prepared) {
|
|
|
32477
32514
|
typingCallbacks.onIdle?.();
|
|
32478
32515
|
},
|
|
32479
32516
|
onReplyStart: typingCallbacks.onReplyStart,
|
|
32480
|
-
onIdle: typingCallbacks.onIdle
|
|
32517
|
+
onIdle: typingCallbacks.onIdle,
|
|
32518
|
+
onCleanup: typingCallbacks.onCleanup
|
|
32481
32519
|
});
|
|
32482
32520
|
const draftStream = createSlackDraftStream({
|
|
32483
32521
|
target: prepared.replyTarget,
|
|
@@ -33118,10 +33156,13 @@ async function prepareSlackMessage(params) {
|
|
|
33118
33156
|
const mergedMedia = [...media ?? [], ...attachmentContent?.media ?? []];
|
|
33119
33157
|
const effectiveDirectMedia = mergedMedia.length > 0 ? mergedMedia : null;
|
|
33120
33158
|
const mediaPlaceholder = effectiveDirectMedia ? effectiveDirectMedia.map((m) => m.placeholder).join(" ") : void 0;
|
|
33159
|
+
const fileOnlyFallback = !mediaPlaceholder && (message.files?.length ?? 0) > 0 ? message.files.slice(0, 5).map((f) => f.name ?? "file").join(", ") : void 0;
|
|
33160
|
+
const fileOnlyPlaceholder = fileOnlyFallback ? `[Slack file: ${fileOnlyFallback}]` : void 0;
|
|
33121
33161
|
const rawBody = [
|
|
33122
33162
|
(message.text ?? "").trim(),
|
|
33123
33163
|
attachmentContent?.text,
|
|
33124
|
-
mediaPlaceholder
|
|
33164
|
+
mediaPlaceholder,
|
|
33165
|
+
fileOnlyPlaceholder
|
|
33125
33166
|
].filter(Boolean).join("\n") || "";
|
|
33126
33167
|
if (!rawBody) return null;
|
|
33127
33168
|
const ackReaction = resolveAckReaction(cfg, route.agentId, {
|
|
@@ -33296,7 +33337,7 @@ async function prepareSlackMessage(params) {
|
|
|
33296
33337
|
ReplyToId: threadContext.replyToId,
|
|
33297
33338
|
MessageThreadId: threadContext.messageThreadId,
|
|
33298
33339
|
ParentSessionKey: threadKeys.parentSessionKey,
|
|
33299
|
-
ThreadStarterBody: threadStarterBody,
|
|
33340
|
+
ThreadStarterBody: !threadSessionPreviousTimestamp ? threadStarterBody : void 0,
|
|
33300
33341
|
ThreadHistoryBody: threadHistoryBody,
|
|
33301
33342
|
IsFirstThreadTurn: isThreadReply && threadTs && !threadSessionPreviousTimestamp ? true : void 0,
|
|
33302
33343
|
ThreadLabel: threadLabel,
|
|
@@ -33320,7 +33361,8 @@ async function prepareSlackMessage(params) {
|
|
|
33320
33361
|
sessionKey: route.mainSessionKey,
|
|
33321
33362
|
channel: "slack",
|
|
33322
33363
|
to: `user:${message.user}`,
|
|
33323
|
-
accountId: route.accountId
|
|
33364
|
+
accountId: route.accountId,
|
|
33365
|
+
threadId: threadContext.messageThreadId
|
|
33324
33366
|
} : void 0,
|
|
33325
33367
|
onRecordError: (err) => {
|
|
33326
33368
|
ctx.logger.warn({
|
|
@@ -33447,7 +33489,7 @@ function buildSeenMessageKey(channelId, ts) {
|
|
|
33447
33489
|
return `${channelId}:${ts}`;
|
|
33448
33490
|
}
|
|
33449
33491
|
function createSlackMessageHandler(params) {
|
|
33450
|
-
const { ctx, account } = params;
|
|
33492
|
+
const { ctx, account, trackEvent } = params;
|
|
33451
33493
|
const debounceMs = resolveInboundDebounceMs({
|
|
33452
33494
|
cfg: ctx.cfg,
|
|
33453
33495
|
channel: "slack"
|
|
@@ -33537,6 +33579,7 @@ function createSlackMessageHandler(params) {
|
|
|
33537
33579
|
if (seenMessageKey && wasSeen) {
|
|
33538
33580
|
if (opts.source !== "app_mention" || !consumeAppMentionRetryKey(seenMessageKey)) return;
|
|
33539
33581
|
}
|
|
33582
|
+
trackEvent?.();
|
|
33540
33583
|
const resolvedMessage = await threadTsResolver.resolve({
|
|
33541
33584
|
message,
|
|
33542
33585
|
source: opts.source
|
|
@@ -33607,7 +33650,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
33607
33650
|
}
|
|
33608
33651
|
let commandsRegistry;
|
|
33609
33652
|
async function getCommandsRegistry() {
|
|
33610
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
33653
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-DVVMuhaG.js").then((n) => n.n);
|
|
33611
33654
|
return commandsRegistry;
|
|
33612
33655
|
}
|
|
33613
33656
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -33949,11 +33992,11 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
33949
33992
|
const channelName = channelInfo?.name;
|
|
33950
33993
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
33951
33994
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
33952
|
-
import("./resolve-route-
|
|
33995
|
+
import("./resolve-route-C5pUt_LC.js").then((n) => n.r),
|
|
33953
33996
|
import("./inbound-context-CmmmT8IP.js").then((n) => n.n),
|
|
33954
33997
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
33955
33998
|
]);
|
|
33956
|
-
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Bn5j3lUT.js").then((n) => n.t), import("./reply-prefix-
|
|
33999
|
+
const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Bn5j3lUT.js").then((n) => n.t), import("./reply-prefix-CJc9NzGX.js").then((n) => n.n)]);
|
|
33957
34000
|
const route = resolveAgentRoute({
|
|
33958
34001
|
cfg,
|
|
33959
34002
|
channel: "slack",
|
|
@@ -34010,9 +34053,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
34010
34053
|
});
|
|
34011
34054
|
const deliverSlashPayloads = async (replies) => {
|
|
34012
34055
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
34013
|
-
import("./replies-
|
|
34056
|
+
import("./replies-BVBgaEtE.js").then((n) => n.r),
|
|
34014
34057
|
import("./chunk-ZFvwZqoJ.js").then((n) => n.s),
|
|
34015
|
-
import("./markdown-tables-
|
|
34058
|
+
import("./markdown-tables-MNYCbYg1.js").then((n) => n.t)
|
|
34016
34059
|
]);
|
|
34017
34060
|
await deliverSlackSlashReplies({
|
|
34018
34061
|
replies,
|
|
@@ -34065,7 +34108,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
34065
34108
|
let nativeCommands = [];
|
|
34066
34109
|
if (nativeEnabled) {
|
|
34067
34110
|
reg = await getCommandsRegistry();
|
|
34068
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
34111
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-27Clp6Hw.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
34069
34112
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
34070
34113
|
skillCommands,
|
|
34071
34114
|
provider: "slack"
|
|
@@ -34190,6 +34233,73 @@ const slackBoltModule = SlackBolt;
|
|
|
34190
34233
|
const { App, HTTPReceiver } = (slackBoltModule.App ? slackBoltModule : slackBoltModule.default) ?? slackBoltModule;
|
|
34191
34234
|
const SLACK_WEBHOOK_MAX_BODY_BYTES = 1024 * 1024;
|
|
34192
34235
|
const SLACK_WEBHOOK_BODY_TIMEOUT_MS = 3e4;
|
|
34236
|
+
const SLACK_SOCKET_RECONNECT_POLICY = {
|
|
34237
|
+
initialMs: 2e3,
|
|
34238
|
+
maxMs: 3e4,
|
|
34239
|
+
factor: 1.8,
|
|
34240
|
+
jitter: .25,
|
|
34241
|
+
maxAttempts: 12
|
|
34242
|
+
};
|
|
34243
|
+
function getSocketEmitter(app) {
|
|
34244
|
+
const receiver = app.receiver;
|
|
34245
|
+
const client = receiver && typeof receiver === "object" ? receiver.client : void 0;
|
|
34246
|
+
if (!client || typeof client !== "object") return null;
|
|
34247
|
+
const on = client.on;
|
|
34248
|
+
const off = client.off;
|
|
34249
|
+
if (typeof on !== "function" || typeof off !== "function") return null;
|
|
34250
|
+
return {
|
|
34251
|
+
on: (event, listener) => on.call(client, event, listener),
|
|
34252
|
+
off: (event, listener) => off.call(client, event, listener)
|
|
34253
|
+
};
|
|
34254
|
+
}
|
|
34255
|
+
function waitForSlackSocketDisconnect(app, abortSignal) {
|
|
34256
|
+
return new Promise((resolve) => {
|
|
34257
|
+
const emitter = getSocketEmitter(app);
|
|
34258
|
+
if (!emitter) {
|
|
34259
|
+
abortSignal?.addEventListener("abort", () => resolve({ event: "disconnect" }), { once: true });
|
|
34260
|
+
return;
|
|
34261
|
+
}
|
|
34262
|
+
const disconnectListener = () => resolveOnce({ event: "disconnect" });
|
|
34263
|
+
const startFailListener = () => resolveOnce({ event: "unable_to_socket_mode_start" });
|
|
34264
|
+
const errorListener = (error) => resolveOnce({
|
|
34265
|
+
event: "error",
|
|
34266
|
+
error
|
|
34267
|
+
});
|
|
34268
|
+
const abortListener = () => resolveOnce({ event: "disconnect" });
|
|
34269
|
+
const cleanup = () => {
|
|
34270
|
+
emitter.off("disconnected", disconnectListener);
|
|
34271
|
+
emitter.off("unable_to_socket_mode_start", startFailListener);
|
|
34272
|
+
emitter.off("error", errorListener);
|
|
34273
|
+
abortSignal?.removeEventListener("abort", abortListener);
|
|
34274
|
+
};
|
|
34275
|
+
const resolveOnce = (value) => {
|
|
34276
|
+
cleanup();
|
|
34277
|
+
resolve(value);
|
|
34278
|
+
};
|
|
34279
|
+
emitter.on("disconnected", disconnectListener);
|
|
34280
|
+
emitter.on("unable_to_socket_mode_start", startFailListener);
|
|
34281
|
+
emitter.on("error", errorListener);
|
|
34282
|
+
abortSignal?.addEventListener("abort", abortListener, { once: true });
|
|
34283
|
+
});
|
|
34284
|
+
}
|
|
34285
|
+
/**
|
|
34286
|
+
* Detect non-recoverable Slack API / auth errors that should NOT be retried.
|
|
34287
|
+
* These indicate permanent credential problems (revoked bot, deactivated account, etc.)
|
|
34288
|
+
* and retrying will never succeed — continuing to retry blocks the entire gateway.
|
|
34289
|
+
*/
|
|
34290
|
+
function isNonRecoverableSlackAuthError(error) {
|
|
34291
|
+
const msg = error instanceof Error ? error.message : typeof error === "string" ? error : "";
|
|
34292
|
+
return /account_inactive|invalid_auth|token_revoked|token_expired|not_authed|org_login_required|team_access_not_granted|missing_scope|cannot_find_service|invalid_token/i.test(msg);
|
|
34293
|
+
}
|
|
34294
|
+
function formatUnknownError(error) {
|
|
34295
|
+
if (error instanceof Error) return error.message;
|
|
34296
|
+
if (typeof error === "string") return error;
|
|
34297
|
+
try {
|
|
34298
|
+
return JSON.stringify(error);
|
|
34299
|
+
} catch {
|
|
34300
|
+
return "unknown error";
|
|
34301
|
+
}
|
|
34302
|
+
}
|
|
34193
34303
|
function parseApiAppIdFromAppToken(raw) {
|
|
34194
34304
|
const token = raw?.trim();
|
|
34195
34305
|
if (!token) return;
|
|
@@ -34313,13 +34423,21 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
34313
34423
|
mediaMaxBytes,
|
|
34314
34424
|
removeAckAfterReply
|
|
34315
34425
|
});
|
|
34426
|
+
const trackEvent = opts.setStatus ? () => {
|
|
34427
|
+
opts.setStatus({
|
|
34428
|
+
lastEventAt: Date.now(),
|
|
34429
|
+
lastInboundAt: Date.now()
|
|
34430
|
+
});
|
|
34431
|
+
} : void 0;
|
|
34316
34432
|
registerSlackMonitorEvents({
|
|
34317
34433
|
ctx,
|
|
34318
34434
|
account,
|
|
34319
34435
|
handleSlackMessage: createSlackMessageHandler({
|
|
34320
34436
|
ctx,
|
|
34321
|
-
account
|
|
34322
|
-
|
|
34437
|
+
account,
|
|
34438
|
+
trackEvent
|
|
34439
|
+
}),
|
|
34440
|
+
trackEvent
|
|
34323
34441
|
});
|
|
34324
34442
|
await registerSlackMonitorSlashCommands({
|
|
34325
34443
|
ctx,
|
|
@@ -34408,13 +34526,52 @@ async function monitorSlackProvider(opts = {}) {
|
|
|
34408
34526
|
opts.abortSignal?.addEventListener("abort", stopOnAbort, { once: true });
|
|
34409
34527
|
try {
|
|
34410
34528
|
if (slackMode === "socket") {
|
|
34411
|
-
|
|
34412
|
-
|
|
34413
|
-
|
|
34414
|
-
|
|
34415
|
-
|
|
34416
|
-
|
|
34417
|
-
|
|
34529
|
+
let reconnectAttempts = 0;
|
|
34530
|
+
while (!opts.abortSignal?.aborted) {
|
|
34531
|
+
try {
|
|
34532
|
+
await app.start();
|
|
34533
|
+
reconnectAttempts = 0;
|
|
34534
|
+
runtime.log?.("slack socket mode connected");
|
|
34535
|
+
} catch (err) {
|
|
34536
|
+
if (isNonRecoverableSlackAuthError(err)) {
|
|
34537
|
+
runtime.error?.(`slack socket mode failed to start due to non-recoverable auth error — skipping channel (${formatUnknownError(err)})`);
|
|
34538
|
+
throw err;
|
|
34539
|
+
}
|
|
34540
|
+
reconnectAttempts += 1;
|
|
34541
|
+
if (SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 && reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts) throw err;
|
|
34542
|
+
const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);
|
|
34543
|
+
runtime.error?.(`slack socket mode failed to start. retry ${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts || "∞"} in ${Math.round(delayMs / 1e3)}s (${formatUnknownError(err)})`);
|
|
34544
|
+
try {
|
|
34545
|
+
await sleepWithAbort(delayMs, opts.abortSignal);
|
|
34546
|
+
} catch {
|
|
34547
|
+
break;
|
|
34548
|
+
}
|
|
34549
|
+
continue;
|
|
34550
|
+
}
|
|
34551
|
+
if (opts.abortSignal?.aborted) break;
|
|
34552
|
+
const disconnect = await waitForSlackSocketDisconnect(app, opts.abortSignal);
|
|
34553
|
+
if (opts.abortSignal?.aborted) break;
|
|
34554
|
+
if (disconnect.error && isNonRecoverableSlackAuthError(disconnect.error)) {
|
|
34555
|
+
runtime.error?.(`slack socket mode disconnected due to non-recoverable auth error — skipping channel (${formatUnknownError(disconnect.error)})`);
|
|
34556
|
+
throw disconnect.error instanceof Error ? disconnect.error : new Error(formatUnknownError(disconnect.error));
|
|
34557
|
+
}
|
|
34558
|
+
reconnectAttempts += 1;
|
|
34559
|
+
if (SLACK_SOCKET_RECONNECT_POLICY.maxAttempts > 0 && reconnectAttempts >= SLACK_SOCKET_RECONNECT_POLICY.maxAttempts) throw new Error(`Slack socket mode reconnect max attempts reached (${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts}) after ${disconnect.event}`);
|
|
34560
|
+
const delayMs = computeBackoff(SLACK_SOCKET_RECONNECT_POLICY, reconnectAttempts);
|
|
34561
|
+
runtime.error?.(`slack socket disconnected (${disconnect.event}). retry ${reconnectAttempts}/${SLACK_SOCKET_RECONNECT_POLICY.maxAttempts || "∞"} in ${Math.round(delayMs / 1e3)}s${disconnect.error ? ` (${formatUnknownError(disconnect.error)})` : ""}`);
|
|
34562
|
+
await app.stop().catch(() => void 0);
|
|
34563
|
+
try {
|
|
34564
|
+
await sleepWithAbort(delayMs, opts.abortSignal);
|
|
34565
|
+
} catch {
|
|
34566
|
+
break;
|
|
34567
|
+
}
|
|
34568
|
+
}
|
|
34569
|
+
} else {
|
|
34570
|
+
runtime.log?.(`slack http mode listening at ${slackWebhookPath}`);
|
|
34571
|
+
if (!opts.abortSignal?.aborted) await new Promise((resolve) => {
|
|
34572
|
+
opts.abortSignal?.addEventListener("abort", () => resolve(), { once: true });
|
|
34573
|
+
});
|
|
34574
|
+
}
|
|
34418
34575
|
} finally {
|
|
34419
34576
|
opts.abortSignal?.removeEventListener("abort", stopOnAbort);
|
|
34420
34577
|
unregisterHttpHandler?.();
|
|
@@ -38834,7 +38991,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
38834
38991
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
38835
38992
|
let preflightTranscript;
|
|
38836
38993
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
38837
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
38994
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DRE31Ab_.js");
|
|
38838
38995
|
preflightTranscript = await transcribeFirstAudio({
|
|
38839
38996
|
ctx: {
|
|
38840
38997
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -40602,7 +40759,7 @@ function safeParseState(raw) {
|
|
|
40602
40759
|
async function readTelegramUpdateOffset(params) {
|
|
40603
40760
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
40604
40761
|
try {
|
|
40605
|
-
return safeParseState(await
|
|
40762
|
+
return safeParseState(await fsPromises.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
|
|
40606
40763
|
} catch (err) {
|
|
40607
40764
|
if (err.code === "ENOENT") return null;
|
|
40608
40765
|
return null;
|
|
@@ -40611,7 +40768,7 @@ async function readTelegramUpdateOffset(params) {
|
|
|
40611
40768
|
async function writeTelegramUpdateOffset(params) {
|
|
40612
40769
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
40613
40770
|
const dir = path.dirname(filePath);
|
|
40614
|
-
await
|
|
40771
|
+
await fsPromises.mkdir(dir, {
|
|
40615
40772
|
recursive: true,
|
|
40616
40773
|
mode: 448
|
|
40617
40774
|
});
|
|
@@ -40620,14 +40777,14 @@ async function writeTelegramUpdateOffset(params) {
|
|
|
40620
40777
|
version: STORE_VERSION,
|
|
40621
40778
|
lastUpdateId: params.updateId
|
|
40622
40779
|
};
|
|
40623
|
-
await
|
|
40624
|
-
await
|
|
40625
|
-
await
|
|
40780
|
+
await fsPromises.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
|
|
40781
|
+
await fsPromises.chmod(tmp, 384);
|
|
40782
|
+
await fsPromises.rename(tmp, filePath);
|
|
40626
40783
|
}
|
|
40627
40784
|
async function deleteTelegramUpdateOffset(params) {
|
|
40628
40785
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
40629
40786
|
try {
|
|
40630
|
-
await
|
|
40787
|
+
await fsPromises.unlink(filePath);
|
|
40631
40788
|
} catch (err) {
|
|
40632
40789
|
if (err.code === "ENOENT") return;
|
|
40633
40790
|
throw err;
|
|
@@ -40988,23 +41145,23 @@ let webLoginQrPromise = null;
|
|
|
40988
41145
|
let webChannelPromise = null;
|
|
40989
41146
|
let whatsappActionsPromise = null;
|
|
40990
41147
|
function loadWebOutbound() {
|
|
40991
|
-
webOutboundPromise ??= import("./outbound-
|
|
41148
|
+
webOutboundPromise ??= import("./outbound-DPGxP4j6.js").then((n) => n.t);
|
|
40992
41149
|
return webOutboundPromise;
|
|
40993
41150
|
}
|
|
40994
41151
|
function loadWebLogin() {
|
|
40995
|
-
webLoginPromise ??= import("./login-
|
|
41152
|
+
webLoginPromise ??= import("./login-BThY9qqp.js").then((n) => n.n);
|
|
40996
41153
|
return webLoginPromise;
|
|
40997
41154
|
}
|
|
40998
41155
|
function loadWebLoginQr() {
|
|
40999
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
41156
|
+
webLoginQrPromise ??= import("./login-qr-BOOn03RH.js");
|
|
41000
41157
|
return webLoginQrPromise;
|
|
41001
41158
|
}
|
|
41002
41159
|
function loadWebChannel() {
|
|
41003
|
-
webChannelPromise ??= import("./web-
|
|
41160
|
+
webChannelPromise ??= import("./web-lXypZuaq.js");
|
|
41004
41161
|
return webChannelPromise;
|
|
41005
41162
|
}
|
|
41006
41163
|
function loadWhatsAppActions() {
|
|
41007
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
41164
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-lSqVUZ_h.js");
|
|
41008
41165
|
return whatsappActionsPromise;
|
|
41009
41166
|
}
|
|
41010
41167
|
function createPluginRuntime() {
|
|
@@ -41796,7 +41953,7 @@ function resolvePluginTools(params) {
|
|
|
41796
41953
|
//#endregion
|
|
41797
41954
|
//#region src/agents/apply-patch-update.ts
|
|
41798
41955
|
async function defaultReadFile(filePath) {
|
|
41799
|
-
return
|
|
41956
|
+
return fsPromises.readFile(filePath, "utf8");
|
|
41800
41957
|
}
|
|
41801
41958
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
41802
41959
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -42040,10 +42197,10 @@ function resolvePatchFileOps(options) {
|
|
|
42040
42197
|
};
|
|
42041
42198
|
}
|
|
42042
42199
|
return {
|
|
42043
|
-
readFile: (filePath) =>
|
|
42044
|
-
writeFile: (filePath, content) =>
|
|
42045
|
-
remove: (filePath) =>
|
|
42046
|
-
mkdirp: (dir) =>
|
|
42200
|
+
readFile: (filePath) => fsPromises.readFile(filePath, "utf8"),
|
|
42201
|
+
writeFile: (filePath, content) => fsPromises.writeFile(filePath, content, "utf8"),
|
|
42202
|
+
remove: (filePath) => fsPromises.rm(filePath),
|
|
42203
|
+
mkdirp: (dir) => fsPromises.mkdir(dir, { recursive: true }).then(() => {})
|
|
42047
42204
|
};
|
|
42048
42205
|
}
|
|
42049
42206
|
async function ensureDir(filePath, ops) {
|
|
@@ -42764,7 +42921,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
42764
42921
|
cwd: process.cwd(),
|
|
42765
42922
|
root: params.sandbox.workspaceDir
|
|
42766
42923
|
});
|
|
42767
|
-
if (!(await
|
|
42924
|
+
if (!(await fsPromises.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
42768
42925
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
42769
42926
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
42770
42927
|
return {
|
|
@@ -43745,13 +43902,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
43745
43902
|
cwd: params.workdir,
|
|
43746
43903
|
root: params.workdir
|
|
43747
43904
|
});
|
|
43748
|
-
stat = await
|
|
43905
|
+
stat = await fsPromises.stat(absPath);
|
|
43749
43906
|
} catch {
|
|
43750
43907
|
return;
|
|
43751
43908
|
}
|
|
43752
43909
|
if (!stat.isFile()) return;
|
|
43753
43910
|
if (stat.size > 512 * 1024) return;
|
|
43754
|
-
const content = await
|
|
43911
|
+
const content = await fsPromises.readFile(absPath, "utf-8");
|
|
43755
43912
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
43756
43913
|
if (first) {
|
|
43757
43914
|
const idx = first.index;
|
|
@@ -45947,7 +46104,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
45947
46104
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
45948
46105
|
throw new Error("jsonlPath outside allowed roots");
|
|
45949
46106
|
}
|
|
45950
|
-
const canonical = await
|
|
46107
|
+
const canonical = await fsPromises.realpath(resolved).catch(() => resolved);
|
|
45951
46108
|
if (!isInboundPathAllowed({
|
|
45952
46109
|
filePath: canonical,
|
|
45953
46110
|
roots
|
|
@@ -45955,7 +46112,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
45955
46112
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
45956
46113
|
throw new Error("jsonlPath outside allowed roots");
|
|
45957
46114
|
}
|
|
45958
|
-
return await
|
|
46115
|
+
return await fsPromises.readFile(canonical, "utf8");
|
|
45959
46116
|
}
|
|
45960
46117
|
const CanvasToolSchema = Type.Object({
|
|
45961
46118
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -46735,27 +46892,27 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
46735
46892
|
}
|
|
46736
46893
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
46737
46894
|
const filePath = resolveRestartSentinelPath(env);
|
|
46738
|
-
await
|
|
46895
|
+
await fsPromises.mkdir(path.dirname(filePath), { recursive: true });
|
|
46739
46896
|
const data = {
|
|
46740
46897
|
version: 1,
|
|
46741
46898
|
payload
|
|
46742
46899
|
};
|
|
46743
|
-
await
|
|
46900
|
+
await fsPromises.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
46744
46901
|
return filePath;
|
|
46745
46902
|
}
|
|
46746
46903
|
async function readRestartSentinel(env = process.env) {
|
|
46747
46904
|
const filePath = resolveRestartSentinelPath(env);
|
|
46748
46905
|
try {
|
|
46749
|
-
const raw = await
|
|
46906
|
+
const raw = await fsPromises.readFile(filePath, "utf-8");
|
|
46750
46907
|
let parsed;
|
|
46751
46908
|
try {
|
|
46752
46909
|
parsed = JSON.parse(raw);
|
|
46753
46910
|
} catch {
|
|
46754
|
-
await
|
|
46911
|
+
await fsPromises.unlink(filePath).catch(() => {});
|
|
46755
46912
|
return null;
|
|
46756
46913
|
}
|
|
46757
46914
|
if (!parsed || parsed.version !== 1 || !parsed.payload) {
|
|
46758
|
-
await
|
|
46915
|
+
await fsPromises.unlink(filePath).catch(() => {});
|
|
46759
46916
|
return null;
|
|
46760
46917
|
}
|
|
46761
46918
|
return parsed;
|
|
@@ -46767,7 +46924,7 @@ async function consumeRestartSentinel(env = process.env) {
|
|
|
46767
46924
|
const filePath = resolveRestartSentinelPath(env);
|
|
46768
46925
|
const parsed = await readRestartSentinel(env);
|
|
46769
46926
|
if (!parsed) return null;
|
|
46770
|
-
await
|
|
46927
|
+
await fsPromises.unlink(filePath).catch(() => {});
|
|
46771
46928
|
return parsed;
|
|
46772
46929
|
}
|
|
46773
46930
|
function formatRestartSentinelMessage(payload) {
|
|
@@ -47874,7 +48031,7 @@ async function hydrateAttachmentPayload(params) {
|
|
|
47874
48031
|
accountId: params.accountId
|
|
47875
48032
|
}),
|
|
47876
48033
|
sandboxValidated: true,
|
|
47877
|
-
readFile: (filePath) =>
|
|
48034
|
+
readFile: (filePath) => fsPromises.readFile(filePath)
|
|
47878
48035
|
});
|
|
47879
48036
|
params.args.buffer = media.buffer.toString("base64");
|
|
47880
48037
|
if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
|
|
@@ -56190,7 +56347,7 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
56190
56347
|
};
|
|
56191
56348
|
let content;
|
|
56192
56349
|
try {
|
|
56193
|
-
content = await
|
|
56350
|
+
content = await fsPromises.readFile(sessionFile, "utf-8");
|
|
56194
56351
|
} catch (err) {
|
|
56195
56352
|
if (err?.code === "ENOENT") return {
|
|
56196
56353
|
repaired: false,
|
|
@@ -56238,15 +56395,15 @@ async function repairSessionFileIfNeeded(params) {
|
|
|
56238
56395
|
const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
|
|
56239
56396
|
const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
|
|
56240
56397
|
try {
|
|
56241
|
-
const stat = await
|
|
56242
|
-
await
|
|
56243
|
-
if (stat) await
|
|
56244
|
-
await
|
|
56245
|
-
if (stat) await
|
|
56246
|
-
await
|
|
56398
|
+
const stat = await fsPromises.stat(sessionFile).catch(() => null);
|
|
56399
|
+
await fsPromises.writeFile(backupPath, content, "utf-8");
|
|
56400
|
+
if (stat) await fsPromises.chmod(backupPath, stat.mode);
|
|
56401
|
+
await fsPromises.writeFile(tmpPath, cleaned, "utf-8");
|
|
56402
|
+
if (stat) await fsPromises.chmod(tmpPath, stat.mode);
|
|
56403
|
+
await fsPromises.rename(tmpPath, sessionFile);
|
|
56247
56404
|
} catch (err) {
|
|
56248
56405
|
try {
|
|
56249
|
-
await
|
|
56406
|
+
await fsPromises.unlink(tmpPath);
|
|
56250
56407
|
} catch (cleanupErr) {
|
|
56251
56408
|
params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
|
|
56252
56409
|
}
|
|
@@ -58346,7 +58503,7 @@ async function prewarmSessionFile(sessionFile) {
|
|
|
58346
58503
|
if (!isSessionManagerCacheEnabled()) return;
|
|
58347
58504
|
if (isSessionManagerCached(sessionFile)) return;
|
|
58348
58505
|
try {
|
|
58349
|
-
const handle = await
|
|
58506
|
+
const handle = await fsPromises.open(sessionFile, "r");
|
|
58350
58507
|
try {
|
|
58351
58508
|
const buffer = Buffer$1.alloc(4096);
|
|
58352
58509
|
await handle.read(buffer, 0, buffer.length, 0);
|
|
@@ -58670,7 +58827,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
58670
58827
|
} catch (err) {
|
|
58671
58828
|
return fail(describeUnknownError(err));
|
|
58672
58829
|
}
|
|
58673
|
-
await
|
|
58830
|
+
await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
|
|
58674
58831
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
58675
58832
|
const sandbox = await resolveSandboxContext({
|
|
58676
58833
|
config: params.config,
|
|
@@ -58678,7 +58835,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
58678
58835
|
workspaceDir: resolvedWorkspace
|
|
58679
58836
|
});
|
|
58680
58837
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
58681
|
-
await
|
|
58838
|
+
await fsPromises.mkdir(effectiveWorkspace, { recursive: true });
|
|
58682
58839
|
await ensureSessionHeader({
|
|
58683
58840
|
sessionFile: params.sessionFile,
|
|
58684
58841
|
sessionId: params.sessionId,
|
|
@@ -59242,12 +59399,12 @@ function getQueuedFileWriter(writers, filePath) {
|
|
|
59242
59399
|
const existing = writers.get(filePath);
|
|
59243
59400
|
if (existing) return existing;
|
|
59244
59401
|
const dir = path.dirname(filePath);
|
|
59245
|
-
const ready =
|
|
59402
|
+
const ready = fsPromises.mkdir(dir, { recursive: true }).catch(() => void 0);
|
|
59246
59403
|
let queue = Promise.resolve();
|
|
59247
59404
|
const writer = {
|
|
59248
59405
|
filePath,
|
|
59249
59406
|
write: (line) => {
|
|
59250
|
-
queue = queue.then(() => ready).then(() =>
|
|
59407
|
+
queue = queue.then(() => ready).then(() => fsPromises.appendFile(filePath, line, "utf8")).catch(() => void 0);
|
|
59251
59408
|
}
|
|
59252
59409
|
};
|
|
59253
59410
|
writers.set(filePath, writer);
|
|
@@ -61467,7 +61624,7 @@ async function prepareSessionManagerForRun(params) {
|
|
|
61467
61624
|
return;
|
|
61468
61625
|
}
|
|
61469
61626
|
if (params.hadSessionFile && header && !hasAssistant) {
|
|
61470
|
-
await
|
|
61627
|
+
await fsPromises.writeFile(params.sessionFile, "", "utf-8");
|
|
61471
61628
|
sm.fileEntries = [header];
|
|
61472
61629
|
sm.byId?.clear?.();
|
|
61473
61630
|
sm.labelsById?.clear?.();
|
|
@@ -62025,7 +62182,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
62025
62182
|
const prevCwd = process.cwd();
|
|
62026
62183
|
const runAbortController = new AbortController();
|
|
62027
62184
|
log$2.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
|
|
62028
|
-
await
|
|
62185
|
+
await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
|
|
62029
62186
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
62030
62187
|
const sandbox = await resolveSandboxContext({
|
|
62031
62188
|
config: params.config,
|
|
@@ -62033,7 +62190,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
62033
62190
|
workspaceDir: resolvedWorkspace
|
|
62034
62191
|
});
|
|
62035
62192
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
62036
|
-
await
|
|
62193
|
+
await fsPromises.mkdir(effectiveWorkspace, { recursive: true });
|
|
62037
62194
|
let restoreSkillEnv;
|
|
62038
62195
|
process.chdir(effectiveWorkspace);
|
|
62039
62196
|
try {
|
|
@@ -62260,7 +62417,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
62260
62417
|
sessionFile: params.sessionFile,
|
|
62261
62418
|
warn: (message) => log$2.warn(message)
|
|
62262
62419
|
});
|
|
62263
|
-
const hadSessionFile = await
|
|
62420
|
+
const hadSessionFile = await fsPromises.stat(params.sessionFile).then(() => true).catch(() => false);
|
|
62264
62421
|
const transcriptPolicy = resolveTranscriptPolicy({
|
|
62265
62422
|
modelApi: params.model?.api,
|
|
62266
62423
|
provider: params.provider,
|
|
@@ -63194,7 +63351,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
63194
63351
|
}
|
|
63195
63352
|
runLoopIterations += 1;
|
|
63196
63353
|
attemptedThinking.add(thinkLevel);
|
|
63197
|
-
await
|
|
63354
|
+
await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
|
|
63198
63355
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
63199
63356
|
const attempt = await runEmbeddedAttempt({
|
|
63200
63357
|
sessionId: params.sessionId,
|
|
@@ -67425,7 +67582,7 @@ async function handleCommands(params) {
|
|
|
67425
67582
|
try {
|
|
67426
67583
|
const messages = [];
|
|
67427
67584
|
if (sessionFile) {
|
|
67428
|
-
const content = await
|
|
67585
|
+
const content = await fsPromises.readFile(sessionFile, "utf-8");
|
|
67429
67586
|
for (const line of content.split("\n")) {
|
|
67430
67587
|
if (!line.trim()) continue;
|
|
67431
67588
|
try {
|
|
@@ -71065,7 +71222,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
71065
71222
|
return;
|
|
71066
71223
|
}
|
|
71067
71224
|
try {
|
|
71068
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
71225
|
+
const { deliverOutboundPayloads } = await import("./deliver-DKhy3kV4.js").then((n) => n.n);
|
|
71069
71226
|
await deliverOutboundPayloads({
|
|
71070
71227
|
cfg: params.cfg,
|
|
71071
71228
|
channel,
|
|
@@ -71440,7 +71597,7 @@ async function stageSandboxMedia(params) {
|
|
|
71440
71597
|
};
|
|
71441
71598
|
try {
|
|
71442
71599
|
const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
|
|
71443
|
-
await
|
|
71600
|
+
await fsPromises.mkdir(destDir, { recursive: true });
|
|
71444
71601
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
71445
71602
|
cfg,
|
|
71446
71603
|
accountId: ctx.AccountId
|
|
@@ -71490,7 +71647,7 @@ async function stageSandboxMedia(params) {
|
|
|
71490
71647
|
usedNames.add(fileName);
|
|
71491
71648
|
const dest = path.join(destDir, fileName);
|
|
71492
71649
|
if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
|
|
71493
|
-
else await
|
|
71650
|
+
else await fsPromises.copyFile(source, dest);
|
|
71494
71651
|
const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
|
|
71495
71652
|
staged.set(source, stagedPath);
|
|
71496
71653
|
}
|