@symerian/symi 2.6.40 → 2.6.42
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/{acp-cli-Cm65S6FL.js → acp-cli-BLUeUUA5.js} +2 -2
- package/dist/{acp-cli-CArw-nEj.js → acp-cli-CrEIx-c7.js} +2 -2
- package/dist/{agents-BUphGO8B.js → agents-DDRDszOI.js} +7 -7
- package/dist/{agents.config-C5FjRTiH.js → agents.config-BEVb1Pyx.js} +1 -1
- package/dist/{agents.config-bWQyGjxK.js → agents.config-BKCY6F2A.js} +1 -1
- package/dist/{audio-preflight-DEJHmI9r.js → audio-preflight-CIiS5cfP.js} +11 -11
- package/dist/{audio-preflight-BUO1aDLp.js → audio-preflight-COaFw917.js} +5 -5
- package/dist/{audio-preflight-B0alOE_D.js → audio-preflight-DD18zIZd.js} +5 -5
- package/dist/{audio-preflight-EindUWk_.js → audio-preflight-XrlQA8IZ.js} +11 -11
- package/dist/{audit-ChxZ7_3y.js → audit-BjI_Yyr5.js} +5 -5
- package/dist/{audit-B_XnVSC_.js → audit-DB9YkTVX.js} +5 -5
- package/dist/{auth-choice-CScrqcEI.js → auth-choice-BbzReh6k.js} +4 -4
- package/dist/{auth-choice-BZIJ1WP4.js → auth-choice-D2xXwBeN.js} +4 -4
- package/dist/{banner-DdxLX10a.js → banner-DqqRwplt.js} +1 -1
- package/dist/{browser-cli-B8qCOonD.js → browser-cli-Ctn9do4z.js} +3 -3
- package/dist/{browser-cli-d3tBzuZB.js → browser-cli-kDUw45Y0.js} +3 -3
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +13 -13
- package/dist/bundled/session-memory/handler.js +13 -13
- package/dist/{call-CLKMnHOP.js → call-DKi-hnaF.js} +1 -1
- package/dist/{call-Dqx-xSZ7.js → call-DwpGquzW.js} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-CC5ojwB6.js → channel-options-DQcpDVCx.js} +1 -1
- package/dist/{channel-options-BAqgueJ5.js → channel-options-DcazVJQf.js} +1 -1
- package/dist/{channel-web-_jV8VUEw.js → channel-web-u5yMYO4j.js} +7 -7
- package/dist/{channels-cli-GldZ8ajW.js → channels-cli-Bog4Kn3X.js} +29 -29
- package/dist/{channels-cli-1we8fBWm.js → channels-cli-C3iJE8eg.js} +30 -30
- package/dist/{chrome-DJn17LsI.js → chrome-BxwUEWrH.js} +1 -1
- package/dist/{chrome-D07ZncFh.js → chrome-CbA-qnhp.js} +1 -1
- package/dist/{chrome-Cixcv-qk.js → chrome-DAw-AWNi.js} +1 -1
- package/dist/{chrome-DtPv6OzN.js → chrome-DU2ZysN3.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-CNO5cyFx.js → cli-QybdZdE7.js} +25 -25
- package/dist/{cli-DZAotBEi.js → cli-eBtEEHLK.js} +26 -26
- package/dist/{command-registry-DZIdLwVe.js → command-registry-BWnZSpbL.js} +11 -11
- package/dist/{completion-cli-BWw06AVN.js → completion-cli-BhJFXaVU.js} +1 -1
- package/dist/{completion-cli-DYgPksHH.js → completion-cli-CUKm7Hb6.js} +2 -2
- package/dist/{config-CyV6zkEL.js → config-B6OxYMgn.js} +6 -1
- package/dist/{config-BwQutavB.js → config-BNTB6qj8.js} +6 -1
- package/dist/{config-jVLwO6DP.js → config-BUTI-mUZ.js} +6 -1
- package/dist/{config-Bjt5P4vW.js → config-Dz95lSBW.js} +6 -1
- package/dist/{config-cli-DNHtgLYH.js → config-cli-B796xZBe.js} +2 -2
- package/dist/{config-cli-BOS84uDD.js → config-cli-CjnQyv45.js} +2 -2
- package/dist/{config-guard-bJv1t515.js → config-guard-B1skCv1C.js} +2 -2
- package/dist/{config-guard-BTGDJDTi.js → config-guard-CEkSg4hl.js} +3 -3
- package/dist/{config-validation-D1EjO6bG.js → config-validation-Cutpn5eO.js} +1 -1
- package/dist/{config-validation-PZAxf4DR.js → config-validation-HDVDlMSV.js} +1 -1
- package/dist/{configure-B7YGhbtM.js → configure-D3wIQ0yI.js} +10 -10
- package/dist/{configure-DZQuTL_V.js → configure-DUqT7Dyn.js} +10 -10
- package/dist/{control-service-B0G5d40m.js → control-service-BYKXzY4f.js} +4 -4
- package/dist/{control-service-BW1BNnC1.js → control-service-rbSHSlcd.js} +4 -4
- package/dist/control-ui/js/app.js +41 -0
- package/dist/{cron-cli-B88WIOK2.js → cron-cli-DCpsXkrw.js} +3 -3
- package/dist/{cron-cli-QxHcrynL.js → cron-cli-QCTdVZuP.js} +3 -3
- package/dist/{daemon-cli-Cy45NZwV.js → daemon-cli-DSDcmWOi.js} +6 -6
- package/dist/{daemon-cli-DK3CCo49.js → daemon-cli-DhJYEAoL.js} +6 -6
- package/dist/daemon-cli.js +6 -1
- package/dist/{daemon-runtime-A-deduW3.js → daemon-runtime-CVFg-ZmT.js} +1 -1
- package/dist/{daemon-runtime-CdKAsAeg.js → daemon-runtime-mE1b-Q48.js} +1 -1
- package/dist/{deliver-BjpaKGTx.js → deliver-B4KZ6-oZ.js} +3 -3
- package/dist/{deliver-BCmoI9iE.js → deliver-Bu0iWeja.js} +3 -3
- package/dist/{deliver-Cm6Yfbzh.js → deliver-C7NePF9Z.js} +2 -2
- package/dist/{deliver-SIVO_ZZm.js → deliver-DtuY4Wgl.js} +2 -2
- package/dist/{devices-cli-f3yJl6-G.js → devices-cli-BNG-fvdl.js} +2 -2
- package/dist/{devices-cli-D6sKbRkk.js → devices-cli-x3jIP4Ih.js} +2 -2
- package/dist/{directory-cli-DDb20Fzl.js → directory-cli-BxnSZZsW.js} +1 -1
- package/dist/{directory-cli-hohI4d8v.js → directory-cli-KgsAVTA0.js} +1 -1
- package/dist/{dns-cli-DIZyU_2d.js → dns-cli-BuVomfxS.js} +1 -1
- package/dist/{dns-cli-C1SXZIAh.js → dns-cli-Cwr92Aiq.js} +1 -1
- package/dist/{doctor-completion-BayL_S0c.js → doctor-completion-D3oUNFQM.js} +1 -1
- package/dist/{doctor-completion-UC-Jc5jn.js → doctor-completion-DBE1IVKj.js} +1 -1
- package/dist/{doctor-config-flow-DLtGtIf_.js → doctor-config-flow-DhAYwhNB.js} +2 -2
- package/dist/{doctor-config-flow-i4XYSFXR.js → doctor-config-flow-iIzSEQxb.js} +2 -2
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-DpFjEahL.js → exec-approvals-cli-BSgxsdMt.js} +4 -4
- package/dist/{exec-approvals-cli-Cr-mrEfY.js → exec-approvals-cli-CmndFjEA.js} +4 -4
- package/dist/extensionAPI.js +13 -13
- package/dist/{gateway-cli-BFPPqLYw.js → gateway-cli-BguO9yV4.js} +43 -42
- package/dist/{gateway-cli-Cwh2BbPv.js → gateway-cli-Dc1RT_b9.js} +44 -43
- package/dist/{gateway-rpc-CS_pPYyV.js → gateway-rpc-5fREQe9Q.js} +1 -1
- package/dist/{gateway-rpc-Ddqs16S-.js → gateway-rpc-BMdVa3QV.js} +1 -1
- package/dist/{glass-ui-ws-DB9p7t4H.js → glass-ui-ws-D0UYleBF.js} +34 -34
- package/dist/{glass-ui-ws-BfHJCfCz.js → glass-ui-ws-DoIZyE9O.js} +33 -33
- package/dist/{health-Bx6RQ4MZ.js → health-D3w4YMlC.js} +5 -5
- package/dist/{health-CLIwZbJe.js → health-cVvZdeDu.js} +5 -5
- package/dist/{hooks-cli-CF4fT-gm.js → hooks-cli-DZIbjfOA.js} +27 -27
- package/dist/{hooks-cli-BgALdxuB.js → hooks-cli-te5hzOAB.js} +26 -26
- package/dist/{image-DI1dYFo0.js → image-BWmcNF8N.js} +2 -2
- package/dist/{image-BmIvgTV4.js → image-C3ugMkb5.js} +2 -2
- package/dist/{image-KpMaj86B.js → image-C3wYkWyK.js} +2 -2
- package/dist/{image-BrxGAFvc.js → image-lp19FlzF.js} +2 -2
- package/dist/index.js +34 -34
- package/dist/{lifecycle-core-BnlvcthF.js → lifecycle-core-BZ5sOcHT.js} +2 -2
- package/dist/{lifecycle-core-D8iU9ahw.js → lifecycle-core-C4HzGXA1.js} +2 -2
- package/dist/llm-slug-generator.js +13 -13
- package/dist/{login-CayZfsyE.js → login-BkbDSDPc.js} +2 -2
- package/dist/{login-bQWLSSfZ.js → login-BtBwGFrb.js} +2 -2
- package/dist/{login-DPxmcuIe.js → login-CiVdC-o_.js} +2 -2
- package/dist/{login-QU18rIZK.js → login-DODfJ3Dn.js} +2 -2
- package/dist/{login-qr-Bn4BQkWf.js → login-qr-CBRxijIg.js} +2 -2
- package/dist/{login-qr-BB2Zfn7K.js → login-qr-DPxuLEvD.js} +2 -2
- package/dist/{login-qr-CPn2Q7vV.js → login-qr-Dbw5m381.js} +2 -2
- package/dist/{login-qr-l5XwJWk9.js → login-qr-q201Ckfe.js} +2 -2
- package/dist/{logs-cli-COwO0YyZ.js → logs-cli-CfGj-dOg.js} +3 -3
- package/dist/{logs-cli-2z1YdwSX.js → logs-cli-DtlrLf7u.js} +3 -3
- package/dist/{memory-cli-B7GV_Iz_.js → memory-cli-Btzr8gfD.js} +1 -1
- package/dist/{memory-cli-9q0ppQpo.js → memory-cli-DDumUksr.js} +1 -1
- package/dist/{model-catalog-CsKgWlNp.js → model-catalog-8Son0J4O.js} +2 -2
- package/dist/{model-catalog-b9o0TtF7.js → model-catalog-DNvgFPZn.js} +2 -2
- package/dist/{model-picker-DBsP93uq.js → model-picker-CAm2Bftd.js} +2 -2
- package/dist/{model-picker-CRy3nJeT.js → model-picker-Casgrpw3.js} +2 -2
- package/dist/{models-CPIhph0W.js → models-BCfPhQ4m.js} +8 -8
- package/dist/{models-cli-C01GsvW2.js → models-cli-BFAtjNIF.js} +28 -28
- package/dist/{models-cli-CLqS4ENq.js → models-cli-Cj2CwbPw.js} +29 -29
- package/dist/{models-config-Bc8qKqev.js → models-config-Be8DRFkB.js} +1 -1
- package/dist/{models-config-BiIYPWCW.js → models-config-CFFjJPe7.js} +1 -1
- package/dist/{node-cli-BeZKOSYR.js → node-cli-DnfDOh1d.js} +9 -9
- package/dist/{node-cli-74pkmapS.js → node-cli-eHn9-YfJ.js} +9 -9
- package/dist/{nodes-cli-nic1q7eb.js → nodes-cli-Ci3oxw8k.js} +3 -3
- package/dist/{nodes-cli-DJHcnIfL.js → nodes-cli-Ct4M7JOe.js} +3 -3
- package/dist/{onboard-CzncEzdT.js → onboard-BMq8qc1m.js} +7 -7
- package/dist/{onboard-BrxB6sbz.js → onboard-VcdBF5TB.js} +7 -7
- package/dist/{onboard-channels-H11ympjW.js → onboard-channels-B5wgcffj.js} +1 -1
- package/dist/{onboard-channels-BBUPobrz.js → onboard-channels-CiOun4k1.js} +1 -1
- package/dist/{onboard-custom-BFbF4nGV.js → onboard-custom-CQOMQkfS.js} +2 -2
- package/dist/{onboard-custom-Bt-wDMSz.js → onboard-custom-XiomtQr7.js} +2 -2
- package/dist/{onboard-helpers-ChH5EhW2.js → onboard-helpers-BBtPmJEe.js} +2 -2
- package/dist/{onboard-helpers-MnxHJAaB.js → onboard-helpers-DFvWPFhU.js} +2 -2
- package/dist/{onboard-remote-57GHsVPU.js → onboard-remote-BURDxwoE.js} +1 -1
- package/dist/{onboard-remote-BRxgNeoe.js → onboard-remote-D-B4EiOE.js} +1 -1
- package/dist/{onboard-skills-DtcVRCTc.js → onboard-skills-BDCzVjxb.js} +1 -1
- package/dist/{onboard-skills-CLnJpRrp.js → onboard-skills-CbzgBT1W.js} +1 -1
- package/dist/{onboarding-D7hzRo_I.js → onboarding-CGNpTyg2.js} +10 -10
- package/dist/{onboarding-D8p8ii63.js → onboarding-Dp7p6zKa.js} +10 -10
- package/dist/{onboarding.finalize-C-rIKbkf.js → onboarding.finalize-B6DOu8vp.js} +31 -31
- package/dist/{onboarding.finalize-BJUg2rlZ.js → onboarding.finalize-CrsE5P43.js} +33 -33
- package/dist/{onboarding.gateway-config-CTbWQvl6.js → onboarding.gateway-config-B9zGPfCl.js} +4 -4
- package/dist/{onboarding.gateway-config-oxW0bLBK.js → onboarding.gateway-config-DKwJ5bWd.js} +4 -4
- package/dist/{outbound-BodV7hPd.js → outbound-BIOChOHt.js} +1 -1
- package/dist/{outbound-BOqx1b0e.js → outbound-Bt8rj9kO.js} +1 -1
- package/dist/{outbound-BhKz3zWF.js → outbound-DL8bdXlZ.js} +1 -1
- package/dist/{outbound-CG3KehgB.js → outbound-wnv03tb3.js} +1 -1
- package/dist/{pairing-cli-RbEs_EMc.js → pairing-cli-DSM82gJG.js} +1 -1
- package/dist/{pairing-cli-NErE7ajG.js → pairing-cli-HDWwcqjZ.js} +1 -1
- package/dist/{pi-embedded-b2yPH0UQ.js → pi-embedded-DQe8vBwU.js} +415 -248
- package/dist/{pi-embedded-helpers-BDI11Fqj.js → pi-embedded-helpers-BgRcgoC9.js} +5 -5
- package/dist/{pi-embedded-helpers-CeNTB0sV.js → pi-embedded-helpers-BgdB5kvy.js} +1 -1
- package/dist/{pi-embedded-helpers-cgZRM5cz.js → pi-embedded-helpers-DA4liAIZ.js} +1 -1
- package/dist/{pi-embedded-helpers-Bdac0DIf.js → pi-embedded-helpers-Dij3O6ox.js} +5 -5
- package/dist/{pi-tools.policy-BYklnTNc.js → pi-tools.policy-DRWb_Cax.js} +2 -2
- package/dist/{pi-tools.policy-B4NDL7r-.js → pi-tools.policy-DxNwL7Dl.js} +2 -2
- package/dist/{plugin-registry-CzWOGG0k.js → plugin-registry-BzIbwU3K.js} +2 -2
- package/dist/{plugin-registry-29yLAS46.js → plugin-registry-D3TUplW8.js} +2 -2
- package/dist/plugin-sdk/agents/pi-embedded-runner/long-task-prompt.d.ts +5 -0
- package/dist/plugin-sdk/agents/session-empty-prune.d.ts +37 -0
- package/dist/plugin-sdk/agents/session-transcript-repair.d.ts +8 -0
- package/dist/plugin-sdk/{audio-preflight-DSEypXnx.js → audio-preflight-BacDFPyc.js} +5 -5
- package/dist/plugin-sdk/{channel-web-DwLIjUen.js → channel-web-B6m8UOCl.js} +7 -7
- package/dist/plugin-sdk/{chrome-DC-la42T.js → chrome-BMimuhgP.js} +1 -1
- package/dist/plugin-sdk/config/model-profiles.d.ts +7 -0
- package/dist/plugin-sdk/config/zod-schema.core.d.ts +2 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +1 -0
- package/dist/plugin-sdk/{config-DgwyZd2S.js → config-DdA6JiyD.js} +6 -1
- package/dist/plugin-sdk/{deliver-7pgLdSpM.js → deliver-Bxa1-mj5.js} +2 -2
- package/dist/plugin-sdk/{image-CqMZSk6f.js → image-aq-JAobP.js} +2 -2
- package/dist/plugin-sdk/index.js +17 -17
- package/dist/plugin-sdk/{login-DJzS9QT2.js → login-CHgiUvI_.js} +2 -2
- package/dist/plugin-sdk/{login-qr-DziBjQY5.js → login-qr-D5vJo1fy.js} +2 -2
- package/dist/plugin-sdk/{outbound-DmsEc64Z.js → outbound-CD38Hxn9.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-C33OSgwG.js → pi-embedded-helpers-BPvzgLtj.js} +5 -5
- package/dist/plugin-sdk/{pw-ai-MIepjtIO.js → pw-ai-fdBOQzz5.js} +2 -2
- package/dist/plugin-sdk/{replies-Bw1Amxop.js → replies-CW_-4klO.js} +1 -1
- package/dist/plugin-sdk/{reply-BxYNpQRu.js → reply-CGoJQT_s.js} +415 -248
- package/dist/plugin-sdk/{runner-Bh4NdzRK.js → runner-BQJ7x06O.js} +2 -2
- package/dist/plugin-sdk/{send-CENVp2ol.js → send-C4t6h9-o.js} +1 -1
- package/dist/plugin-sdk/{send-Bf62p_ul.js → send-Cz_FQ8Ao.js} +1 -1
- package/dist/plugin-sdk/{send-D5_J2DiV.js → send-DG6c7BpZ.js} +1 -1
- package/dist/plugin-sdk/{send-P1G7c4FN.js → send-HKy51Hz_.js} +1 -1
- package/dist/plugin-sdk/{send-Ddy4p4LW.js → send-Xy1L54q4.js} +1 -1
- package/dist/plugin-sdk/{session-Z4-R_Top.js → session-BUzIlHr9.js} +1 -1
- package/dist/plugin-sdk/{web-DiNM_c37.js → web-CJjSOTnI.js} +17 -17
- package/dist/plugin-sdk/{whatsapp-actions-Bg6DfWkN.js → whatsapp-actions-CZLagx0h.js} +2 -2
- package/dist/{plugins-cli-DZ6arND4.js → plugins-cli-BD1Jb2Ml.js} +27 -27
- package/dist/{plugins-cli-D4bGKnOF.js → plugins-cli-DFyRjAtJ.js} +26 -26
- package/dist/{program-context-iI9_njQv.js → program-context-45vPEw2G.js} +38 -38
- package/dist/{program-DE9DbHYV.js → program-qGm2M9PG.js} +33 -33
- package/dist/{prompt-select-styled-SHa0ZJL9.js → prompt-select-styled-DRIS9jSv.js} +14 -14
- package/dist/{prompt-select-styled-D0ELdY0x.js → prompt-select-styled-DRraJGwA.js} +14 -14
- package/dist/{provider-auth-helpers-BI2k0jlH.js → provider-auth-helpers-BNOWsjW5.js} +2 -2
- package/dist/{provider-auth-helpers-EMBbfX3w.js → provider-auth-helpers-BREVjR7R.js} +2 -2
- package/dist/{push-apns-DcbeaY5y.js → push-apns-CObVeJLC.js} +1 -1
- package/dist/{push-apns-DyeCPAvI.js → push-apns-CYC70eKy.js} +1 -1
- package/dist/{pw-ai-C_7yEh9n.js → pw-ai--LDjnyuN.js} +2 -2
- package/dist/{pw-ai-LB6wkt8h.js → pw-ai-BCSFVeD5.js} +2 -2
- package/dist/{pw-ai-sY1BRRsq.js → pw-ai-BO5cSmwD.js} +2 -2
- package/dist/{pw-ai-C2z2aMEp.js → pw-ai-DQohWnzT.js} +2 -2
- package/dist/{qr-cli-B-NWpxfN.js → qr-cli-CejYwqsj.js} +1 -1
- package/dist/{qr-cli-TaubpmtG.js → qr-cli-XttU2KOR.js} +1 -1
- package/dist/{register.agent-D-1w3KOa.js → register.agent-DRrHvYcz.js} +32 -32
- package/dist/{register.agent-D4o7bi_u.js → register.agent-DzzY8jON.js} +34 -34
- package/dist/{register.configure-BYCEJg1c.js → register.configure-BxtTIFTa.js} +36 -36
- package/dist/{register.configure-BIczNshG.js → register.configure-DlXkwkNR.js} +37 -37
- package/dist/{register.maintenance-Syt4oSuk.js → register.maintenance-CXLXouZV.js} +34 -34
- package/dist/{register.maintenance-k6z5GVrO.js → register.maintenance-LEf8Q_5p.js} +36 -36
- package/dist/{register.message-Bi7QLNId.js → register.message-C4ifV9vG.js} +26 -26
- package/dist/{register.message-BJeeT9xQ.js → register.message-DsPa-xHV.js} +27 -27
- package/dist/{register.onboard-DDbxMjmt.js → register.onboard-CrY4PxLP.js} +32 -32
- package/dist/{register.onboard-B_FeHkL-.js → register.onboard-DLRPa_4B.js} +33 -33
- package/dist/{register.setup-CPi3uss4.js → register.setup-By37g1vN.js} +33 -33
- package/dist/{register.setup-Cpl67hQ6.js → register.setup-fBG_dJfi.js} +32 -32
- package/dist/{register.status-health-sessions-DsY8YuEo.js → register.status-health-sessions-Ckw86-gn.js} +29 -29
- package/dist/{register.status-health-sessions-CHPN3CNt.js → register.status-health-sessions-DG7KGnD0.js} +31 -31
- package/dist/{register.subclis-D5JRuk93.js → register.subclis-C_xKLugM.js} +28 -28
- package/dist/{replies-cMkt1-fW.js → replies-BMqtgBhh.js} +1 -1
- package/dist/{replies-CYuZN9PJ.js → replies-Bo49QlAg.js} +1 -1
- package/dist/{replies-C2sQt_cX.js → replies-CBS0567j.js} +1 -1
- package/dist/{replies-zOTZyd6v.js → replies-CfyMcfoY.js} +1 -1
- package/dist/{reply-D55iMWI5.js → reply-DyjXROKp.js} +426 -259
- package/dist/{routes-ClhmdN8I.js → routes-BAZTZNuQ.js} +3 -3
- package/dist/{routes-DRkO6iuR.js → routes-CMvgBDOg.js} +3 -3
- package/dist/{rpc-DvA01fCj.js → rpc-Co5PQ3IJ.js} +1 -1
- package/dist/{rpc-UsQvUYIP.js → rpc-D0FiEinj.js} +1 -1
- package/dist/{run-main-BWoPODyq.js → run-main-Cg3ecTbO.js} +44 -44
- package/dist/{runner-CtF7EgsD.js → runner-Ct0suQrd.js} +2 -2
- package/dist/{runner-D3aZ5p3H.js → runner-DRv0uCK_.js} +3 -3
- package/dist/{runner-z_tSZGY5.js → runner-Dd2bbNGV.js} +3 -3
- package/dist/{runner-_7xOqQDP.js → runner-cJ3m-bxK.js} +2 -2
- package/dist/{sandbox-rjqN2SHD.js → sandbox-B6N8cV4d.js} +5 -5
- package/dist/{sandbox-DrIHYiE6.js → sandbox-DY75ZyJD.js} +5 -5
- package/dist/{sandbox-cli-QpZpJ6Hq.js → sandbox-cli-BDM_QM_f.js} +6 -6
- package/dist/{sandbox-cli-BiiThMpq.js → sandbox-cli-DwzaNjIJ.js} +6 -6
- package/dist/{security-cli-DxNPZzVB.js → security-cli-CG1uSlRK.js} +9 -9
- package/dist/{security-cli-s_AbIm-b.js → security-cli-D5BWzqEJ.js} +9 -9
- package/dist/{send-C1ptDV-M.js → send-9SapUCg7.js} +1 -1
- package/dist/{send-DV8npIWi.js → send-B3RdXvjC.js} +1 -1
- package/dist/{send-CVSO0ZdD.js → send-B7HhiTdx.js} +1 -1
- package/dist/{send-DryK_KEK.js → send-B986asZ7.js} +1 -1
- package/dist/{send-DNJAa7Q_.js → send-B9EinkUl.js} +1 -1
- package/dist/{send-De1p8sZA.js → send-BNnv8GtF.js} +1 -1
- package/dist/{send-B9pwTYyE.js → send-BhJZ16uV.js} +1 -1
- package/dist/{send-B62vYwo8.js → send-Bm4ULEzh.js} +1 -1
- package/dist/{send-BJNUY-9E.js → send-BzKHnf3b.js} +1 -1
- package/dist/{send-C6jy9sVB.js → send-CC9V8V81.js} +1 -1
- package/dist/{send-DK-Jat_i.js → send-CQVnyJyF.js} +1 -1
- package/dist/{send-Dx7S4jGp.js → send-CZemAajS.js} +1 -1
- package/dist/{send-BTXR3fPR.js → send-DI9Vhnmw.js} +1 -1
- package/dist/{send-BvCit35j.js → send-DLWaX69q.js} +1 -1
- package/dist/{send-qSITFlVc.js → send-DSnJ503J.js} +1 -1
- package/dist/{send-B7MtdeLq.js → send-DVm0du0_.js} +1 -1
- package/dist/{send-D8DhbDGm.js → send-DaBsat3L.js} +1 -1
- package/dist/{send-iIqnmxNc.js → send-DdLJtOjk.js} +1 -1
- package/dist/{send-4MJyhXk5.js → send-DlQtxlG_.js} +1 -1
- package/dist/{send-DiYc3Z2y.js → send-RfIXG6-I.js} +1 -1
- package/dist/{server-context-C3fvq6h5.js → server-context-CCBZN8a0.js} +5 -5
- package/dist/{server-context-CtYkBX0P.js → server-context-DK-T2rBR.js} +5 -5
- package/dist/{server-methods-DY-jApXo.js → server-methods-CW8eFTGD.js} +15 -15
- package/dist/{server-methods-C4oRmj--.js → server-methods-CWcLut3F.js} +16 -16
- package/dist/{server-node-events--9s3cGoR.js → server-node-events-C2h9OPo7.js} +27 -27
- package/dist/{server-node-events-Bw6yFsJP.js → server-node-events-CDB0u8PP.js} +26 -26
- package/dist/{session-XfYb9nxX.js → session-C1cn-CxQ.js} +1 -1
- package/dist/{session-BmC1G2OF.js → session-CUeezgP1.js} +1 -1
- package/dist/{session-3P44Lx9Z.js → session-DsJGtM7g.js} +1 -1
- package/dist/{session-utils-DlQSI-Te.js → session-utils-B8Fif925.js} +3 -3
- package/dist/{session-BUTPdQjj.js → session-v_9AVJhH.js} +1 -1
- package/dist/{sessions-Dxc5UV-H.js → sessions-Cfa6JEB3.js} +1 -1
- package/dist/{sessions-9tWmT3oM.js → sessions-Cpgnq0pA.js} +1 -1
- package/dist/{sessions-BL_hivz0.js → sessions-DfbhRBHR.js} +3 -3
- package/dist/{shared-DEvSdt0I.js → shared-73T9fyuK.js} +1 -1
- package/dist/{shared-DwzDlNQn.js → shared-DdxPzyOH.js} +1 -1
- package/dist/{skills-cli-BHJAAvDv.js → skills-cli-DXkx4vNV.js} +1 -1
- package/dist/{skills-cli-CES7tX87.js → skills-cli-uEA9KXOO.js} +1 -1
- package/dist/{status-DxqgzaIz.js → status-B2Qt-5kL.js} +2 -2
- package/dist/{status-CPQrmN1p.js → status-CMx3GAax.js} +2 -2
- package/dist/{status-DZHTCKq_.js → status-DfPfMVNZ.js} +10 -10
- package/dist/{status-CfCqG5a6.js → status-ZPW5EACm.js} +9 -9
- package/dist/{status.update-BhJp4NkS.js → status.update-C2GN8s9C.js} +1 -1
- package/dist/{status.update-DqXGFKta.js → status.update-CG0ciGaf.js} +1 -1
- package/dist/{subagent-registry-BGKDFTRA.js → subagent-registry-DQHg3jUV.js} +427 -260
- package/dist/{system-cli-BrZGQcZl.js → system-cli-DFZNGx0i.js} +3 -3
- package/dist/{system-cli-CjgIC8rh.js → system-cli-Z7uzO8qd.js} +3 -3
- package/dist/{systemd-hints-B8AHs8Nn.js → systemd-hints-DT6cDIM2.js} +1 -1
- package/dist/{systemd-hints-DUXXob94.js → systemd-hints-xYZbFny_.js} +1 -1
- package/dist/{tui-BktCSga7.js → tui-DjPsMdL6.js} +4 -4
- package/dist/{tui-CAzxJ9EP.js → tui-DrATGNms.js} +4 -4
- package/dist/{tui-cli-AXeYpVcb.js → tui-cli-D19-MCXt.js} +9 -9
- package/dist/{tui-cli-Bz3RdHqe.js → tui-cli-pWD_NrUR.js} +9 -9
- package/dist/{unified-runner-BhGMOS0G.js → unified-runner-DvOFqcrw.js} +200 -33
- package/dist/{update-cli-n_Tkv8N_.js → update-cli-DBasZeVl.js} +39 -39
- package/dist/{update-cli-C8EpxduY.js → update-cli-Df9rh_aN.js} +37 -37
- package/dist/{update-runner-Tk50GxTW.js → update-runner-BRKFzAwV.js} +1 -1
- package/dist/{update-runner-CowTMnrt.js → update-runner-DVa6cMqp.js} +1 -1
- package/dist/{web-Cz8o-Hc9.js → web-CGh5tw__.js} +16 -16
- package/dist/{web-CMLJq-WC.js → web-Cw3bFAiP.js} +16 -16
- package/dist/{web-BIpIz8vD.js → web-Dd05xbUr.js} +29 -29
- package/dist/{web-ONk39lyq.js → web-KiuDkd0x.js} +29 -29
- package/dist/{webhooks-cli-v0rfBwU8.js → webhooks-cli-BRxe4uCg.js} +1 -1
- package/dist/{webhooks-cli-Da8YhVu4.js → webhooks-cli-CsRZl0_H.js} +1 -1
- package/dist/{whatsapp-actions-Cz2qhCrD.js → whatsapp-actions-7YbV2-Fv.js} +2 -2
- package/dist/{whatsapp-actions-Ba3KBpGu.js → whatsapp-actions-BylecqEa.js} +2 -2
- package/dist/{whatsapp-actions-AEeCOVko.js → whatsapp-actions-ChO_shrk.js} +2 -2
- package/dist/{whatsapp-actions-BPn8FtPC.js → whatsapp-actions-mBarFBeS.js} +2 -2
- package/dist/{with-timeout-487M8IgO.js → with-timeout-Cgi3TwWN.js} +1 -1
- package/dist/{with-timeout-BU7MJQDD.js → with-timeout-CtVdu_1U.js} +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/learning-loop/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +12 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +12 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +12 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/outlook/package.json +1 -1
- package/extensions/pipeline/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +12 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +12 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +12 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +12 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/skills/long-task/SKILL.md +57 -0
- package/skills/long-task/scripts/detach-task.sh +58 -0
|
@@ -12,20 +12,20 @@ import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY
|
|
|
12
12
|
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-71oIavrF.js";
|
|
13
13
|
import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-DDEyGwby.js";
|
|
14
14
|
import { t as normalizeChatType } from "./chat-type-DFDuk3FY.js";
|
|
15
|
-
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-
|
|
16
|
-
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, 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 resolveDiscordSystemLocation, 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 resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-
|
|
17
|
-
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, 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 throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-
|
|
15
|
+
import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-BzKHnf3b.js";
|
|
16
|
+
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, 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 resolveDiscordSystemLocation, 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 resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-RfIXG6-I.js";
|
|
17
|
+
import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, 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 throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-DtuY4Wgl.js";
|
|
18
18
|
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-D0xmLpej.js";
|
|
19
19
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-C1vRJs5w.js";
|
|
20
20
|
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-8zZqL37v.js";
|
|
21
|
-
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-
|
|
21
|
+
import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-B986asZ7.js";
|
|
22
22
|
import { d as detectMime, f as extensionForMime, g as isGifMedia, h as isAudioFileName, i as getImageMetadata, m as imageMimeFromFormat, s as resizeToJpeg, x as mediaKindFromMime, y as MAX_IMAGE_BYTES } from "./image-ops-ByaQt43P.js";
|
|
23
23
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-j5tVLINv.js";
|
|
24
24
|
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-BQINJQIT.js";
|
|
25
|
-
import { $ as mergeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as updateSessionStoreEntry, Jt as ensureSessionHeader, K as updateLastRoute, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as deliveryContextKey, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as resolveCacheTtlMs$1, Xt as resolveBootstrapTotalMaxChars, Y as isCacheEnabled, Yt as resolveBootstrapMaxChars, Z as deliveryContextFromSession, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as DEFAULT_RESET_TRIGGERS, a as isMessagingToolDuplicateNormalized, at as countToolResults, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as applyInputProvenanceToUserMessage, d as isAntigravityClaude, dt as resolveSessionKey, et as normalizeDeliveryContext, f as isGoogleModelApi, ft as evaluateSessionFreshness, g as formatBillingErrorMessage, gt as resolveThreadFlag, h as formatAssistantErrorText, ht as resolveSessionResetType, it as capArrayByJsonBytes, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as hasInterSessionUserProvenance, m as classifyFailoverReason, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nt as normalizeAccountId$3, o as normalizeTextForComparison, ot as extractToolCallNames, p as BILLING_ERROR_USER_MESSAGE, pt as resolveChannelResetConfig, q as updateSessionStore, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as archiveSessionTranscripts, s as sanitizeSessionMessagesImages, st as INPUT_PROVENANCE_KIND_VALUES, t as validateAnthropicTurns, tt as normalizeSessionDeliveryFields, u as downgradeOpenAIReasoningBlocks, ut as normalizeInputProvenance, v as getApiErrorPayloadFingerprint, vt as resolveFreshSessionTotalTokens, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, yt as canonicalizeMainSessionAlias, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-
|
|
26
|
-
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-
|
|
25
|
+
import { $ as mergeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as updateSessionStoreEntry, Jt as ensureSessionHeader, K as updateLastRoute, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as deliveryContextKey, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as resolveCacheTtlMs$1, Xt as resolveBootstrapTotalMaxChars, Y as isCacheEnabled, Yt as resolveBootstrapMaxChars, Z as deliveryContextFromSession, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as DEFAULT_RESET_TRIGGERS, a as isMessagingToolDuplicateNormalized, at as countToolResults, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as applyInputProvenanceToUserMessage, d as isAntigravityClaude, dt as resolveSessionKey, et as normalizeDeliveryContext, f as isGoogleModelApi, ft as evaluateSessionFreshness, g as formatBillingErrorMessage, gt as resolveThreadFlag, h as formatAssistantErrorText, ht as resolveSessionResetType, it as capArrayByJsonBytes, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as hasInterSessionUserProvenance, m as classifyFailoverReason, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nt as normalizeAccountId$3, o as normalizeTextForComparison, ot as extractToolCallNames, p as BILLING_ERROR_USER_MESSAGE, pt as resolveChannelResetConfig, q as updateSessionStore, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as archiveSessionTranscripts, s as sanitizeSessionMessagesImages, st as INPUT_PROVENANCE_KIND_VALUES, t as validateAnthropicTurns, tt as normalizeSessionDeliveryFields, u as downgradeOpenAIReasoningBlocks, ut as normalizeInputProvenance, v as getApiErrorPayloadFingerprint, vt as resolveFreshSessionTotalTokens, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, yt as canonicalizeMainSessionAlias, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-Dij3O6ox.js";
|
|
26
|
+
import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-BUTI-mUZ.js";
|
|
27
27
|
import { c as normalizePluginsConfig, f as isPathInsideWithRealpath, i as safeStatSync, l as resolveEnableState, n as discoverSymiPlugins, p as isDangerousHostEnvVarName, r as isPathInside, s as applyTestPluginDefaults, t as loadPluginManifestRegistry, u as resolveMemorySlotDecision } from "./manifest-registry-D-mTF1cj.js";
|
|
28
|
-
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
28
|
+
import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-BxwUEWrH.js";
|
|
29
29
|
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-BNpGMnp-.js";
|
|
30
30
|
import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-CPfngF0S.js";
|
|
31
31
|
import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-CxfFyMRZ.js";
|
|
@@ -36,7 +36,7 @@ import { t as resolveIMessageAccount } from "./accounts-DImOt9jX.js";
|
|
|
36
36
|
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DkMamAQ-.js";
|
|
37
37
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-C8Tqw4td.js";
|
|
38
38
|
import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-ChC2CXaN.js";
|
|
39
|
-
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-
|
|
39
|
+
import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-lp19FlzF.js";
|
|
40
40
|
import { i as resolveMemorySearchConfig, n as probeOllamaEmbeddingModels, r as resolveOllamaBaseUrl } from "./manager-CgLdpXXM.js";
|
|
41
41
|
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths, g as runTasksWithConcurrency } from "./sqlite-BNh23mUR.js";
|
|
42
42
|
import { n as retryAsync } from "./retry-QGp0jvVi.js";
|
|
@@ -49,18 +49,18 @@ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-F0moAwIl.js";
|
|
|
49
49
|
import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-DYoNKo_h.js";
|
|
50
50
|
import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-D8RiKDh0.js";
|
|
51
51
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-QOi5vzUt.js";
|
|
52
|
-
import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-
|
|
52
|
+
import { _ as resolveMediaUnderstandingScope, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as normalizeMediaUnderstandingChatType, h as resolveTimeoutMs$1, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveConcurrency, n as createMediaAttachmentCache, o as runCapability, p as registerUnhandledRejectionHandler, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as CLI_OUTPUT_MAX_BUFFER, y as applyTemplate } from "./runner-Ct0suQrd.js";
|
|
53
53
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-DtLn7YU3.js";
|
|
54
54
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-DtXYsHEc.js";
|
|
55
55
|
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D9q-fIPB.js";
|
|
56
56
|
import { n as normalizePollInput } from "./polls-DQcEziPg.js";
|
|
57
57
|
import { t as convertMarkdownTables } from "./tables-COnZ169v.js";
|
|
58
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
59
|
-
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-
|
|
58
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-DLWaX69q.js";
|
|
59
|
+
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-DdLJtOjk.js";
|
|
60
60
|
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-We7ViAbg.js";
|
|
61
61
|
import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-BloyLEwh.js";
|
|
62
62
|
import { t as makeProxyFetch } from "./proxy-CLEew2L6.js";
|
|
63
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
63
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CfyMcfoY.js";
|
|
64
64
|
import { t as getActiveWebListener } from "./active-listener-Dx_Y1ouV.js";
|
|
65
65
|
import { createRequire } from "node:module";
|
|
66
66
|
import * as path$1 from "node:path";
|
|
@@ -7205,7 +7205,7 @@ async function routeReply(params) {
|
|
|
7205
7205
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
7206
7206
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
7207
7207
|
try {
|
|
7208
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
7208
|
+
const { deliverOutboundPayloads } = await import("./deliver-DtuY4Wgl.js").then((n) => n.n);
|
|
7209
7209
|
return {
|
|
7210
7210
|
ok: true,
|
|
7211
7211
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -39153,7 +39153,8 @@ const BUILTIN_PROFILES = [
|
|
|
39153
39153
|
top_p: .95,
|
|
39154
39154
|
top_k: 20,
|
|
39155
39155
|
max_tokens: 16384,
|
|
39156
|
-
presence_penalty: 1.5
|
|
39156
|
+
presence_penalty: 1.5,
|
|
39157
|
+
chatTemplateKwargs: { preserve_thinking: true }
|
|
39157
39158
|
},
|
|
39158
39159
|
streaming: {
|
|
39159
39160
|
deltaThrottleMs: 50,
|
|
@@ -39887,6 +39888,8 @@ function createModelAwareStreamFn(opts) {
|
|
|
39887
39888
|
if (typeof mergedParams.repeat_penalty === "number") injections.repeat_penalty = mergedParams.repeat_penalty;
|
|
39888
39889
|
if (typeof mergedParams.presence_penalty === "number") injections.presence_penalty = mergedParams.presence_penalty;
|
|
39889
39890
|
if (typeof mergedParams.frequency_penalty === "number") injections.frequency_penalty = mergedParams.frequency_penalty;
|
|
39891
|
+
const chatTemplateKwargs = mergedParams.chatTemplateKwargs ?? mergedParams.chat_template_kwargs;
|
|
39892
|
+
if (chatTemplateKwargs && typeof chatTemplateKwargs === "object" && !Array.isArray(chatTemplateKwargs)) injections.chat_template_kwargs = chatTemplateKwargs;
|
|
39890
39893
|
const isVllm = isVllmProvider(opts.provider, opts.modelId, opts.config);
|
|
39891
39894
|
const isOpenRouter = opts.provider === "openrouter";
|
|
39892
39895
|
const extraHeaders = {};
|
|
@@ -40717,7 +40720,11 @@ function handleMessageUpdate(ctx, evt) {
|
|
|
40717
40720
|
emitAgentEvent({
|
|
40718
40721
|
runId: ctx.params.runId,
|
|
40719
40722
|
stream: "thinking",
|
|
40720
|
-
data: {
|
|
40723
|
+
data: {
|
|
40724
|
+
phase: evtType,
|
|
40725
|
+
delta: thinkingDelta,
|
|
40726
|
+
content: thinkingContent
|
|
40727
|
+
}
|
|
40721
40728
|
});
|
|
40722
40729
|
if (ctx.state.streamReasoning) {
|
|
40723
40730
|
const partialThinking = extractAssistantThinking(msg);
|
|
@@ -42759,6 +42766,338 @@ Use the message tool with buttons:
|
|
|
42759
42766
|
[{"label": "✅ Proceed", "data": "/plan-proceed"}, {"label": "✏️ Modify", "data": "/plan-modify"}, {"label": "❌ Cancel", "data": "/plan-cancel"}]
|
|
42760
42767
|
</plan_mode>`;
|
|
42761
42768
|
|
|
42769
|
+
//#endregion
|
|
42770
|
+
//#region src/agents/session-transcript-repair.ts
|
|
42771
|
+
function isToolCallBlock(block) {
|
|
42772
|
+
if (!block || typeof block !== "object") return false;
|
|
42773
|
+
const type = block.type;
|
|
42774
|
+
return typeof type === "string" && (type === "toolCall" || type === "toolUse" || type === "functionCall");
|
|
42775
|
+
}
|
|
42776
|
+
function hasToolCallInput(block) {
|
|
42777
|
+
const hasInput = "input" in block ? block.input !== void 0 && block.input !== null : false;
|
|
42778
|
+
const hasArguments = "arguments" in block ? block.arguments !== void 0 && block.arguments !== null : false;
|
|
42779
|
+
return hasInput || hasArguments;
|
|
42780
|
+
}
|
|
42781
|
+
function hasNonEmptyStringField(value) {
|
|
42782
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
42783
|
+
}
|
|
42784
|
+
function hasToolCallId(block) {
|
|
42785
|
+
return hasNonEmptyStringField(block.id);
|
|
42786
|
+
}
|
|
42787
|
+
function hasToolCallName(block) {
|
|
42788
|
+
return hasNonEmptyStringField(block.name);
|
|
42789
|
+
}
|
|
42790
|
+
function makeMissingToolResult(params) {
|
|
42791
|
+
return {
|
|
42792
|
+
role: "toolResult",
|
|
42793
|
+
toolCallId: params.toolCallId,
|
|
42794
|
+
toolName: params.toolName ?? "unknown",
|
|
42795
|
+
content: [{
|
|
42796
|
+
type: "text",
|
|
42797
|
+
text: "[symi] missing tool result in session history; inserted synthetic error result for transcript repair."
|
|
42798
|
+
}],
|
|
42799
|
+
isError: true,
|
|
42800
|
+
timestamp: Date.now()
|
|
42801
|
+
};
|
|
42802
|
+
}
|
|
42803
|
+
/**
|
|
42804
|
+
* True when an assistant message has no tool calls and only empty/whitespace
|
|
42805
|
+
* text or thinking blocks. This happens when a stream fails before any
|
|
42806
|
+
* content arrives — the blank entry is otherwise persisted and produces
|
|
42807
|
+
* consecutive same-role messages, which strict providers (vLLM) reject with
|
|
42808
|
+
* "role must alternate" errors that poison the session for every future turn.
|
|
42809
|
+
*/
|
|
42810
|
+
function isEmptyAssistantMessage(message) {
|
|
42811
|
+
if (!message || typeof message !== "object") return false;
|
|
42812
|
+
const msg = message;
|
|
42813
|
+
if (msg.role !== "assistant") return false;
|
|
42814
|
+
if (!Array.isArray(msg.content) || msg.content.length === 0) return true;
|
|
42815
|
+
for (const block of msg.content) {
|
|
42816
|
+
if (!block || typeof block !== "object") continue;
|
|
42817
|
+
const type = block.type;
|
|
42818
|
+
if (type === "toolCall" || type === "toolUse" || type === "functionCall") return false;
|
|
42819
|
+
if (type === "text") {
|
|
42820
|
+
const text = block.text;
|
|
42821
|
+
if (typeof text === "string" && text.trim().length > 0) return false;
|
|
42822
|
+
continue;
|
|
42823
|
+
}
|
|
42824
|
+
if (type === "thinking") {
|
|
42825
|
+
const thinking = block.thinking;
|
|
42826
|
+
if (typeof thinking === "string" && thinking.trim().length > 0) return false;
|
|
42827
|
+
continue;
|
|
42828
|
+
}
|
|
42829
|
+
return false;
|
|
42830
|
+
}
|
|
42831
|
+
return true;
|
|
42832
|
+
}
|
|
42833
|
+
function stripToolResultDetails(messages) {
|
|
42834
|
+
let touched = false;
|
|
42835
|
+
const out = [];
|
|
42836
|
+
for (const msg of messages) {
|
|
42837
|
+
if (!msg || typeof msg !== "object" || msg.role !== "toolResult") {
|
|
42838
|
+
out.push(msg);
|
|
42839
|
+
continue;
|
|
42840
|
+
}
|
|
42841
|
+
if (!("details" in msg)) {
|
|
42842
|
+
out.push(msg);
|
|
42843
|
+
continue;
|
|
42844
|
+
}
|
|
42845
|
+
const { details: _details, ...rest } = msg;
|
|
42846
|
+
touched = true;
|
|
42847
|
+
out.push(rest);
|
|
42848
|
+
}
|
|
42849
|
+
return touched ? out : messages;
|
|
42850
|
+
}
|
|
42851
|
+
function repairToolCallInputs(messages) {
|
|
42852
|
+
let droppedToolCalls = 0;
|
|
42853
|
+
let droppedAssistantMessages = 0;
|
|
42854
|
+
let changed = false;
|
|
42855
|
+
const out = [];
|
|
42856
|
+
for (const msg of messages) {
|
|
42857
|
+
if (!msg || typeof msg !== "object") {
|
|
42858
|
+
out.push(msg);
|
|
42859
|
+
continue;
|
|
42860
|
+
}
|
|
42861
|
+
if (msg.role !== "assistant" || !Array.isArray(msg.content)) {
|
|
42862
|
+
out.push(msg);
|
|
42863
|
+
continue;
|
|
42864
|
+
}
|
|
42865
|
+
const nextContent = [];
|
|
42866
|
+
let droppedInMessage = 0;
|
|
42867
|
+
for (const block of msg.content) {
|
|
42868
|
+
if (isToolCallBlock(block) && (!hasToolCallInput(block) || !hasToolCallId(block) || !hasToolCallName(block))) {
|
|
42869
|
+
droppedToolCalls += 1;
|
|
42870
|
+
droppedInMessage += 1;
|
|
42871
|
+
changed = true;
|
|
42872
|
+
continue;
|
|
42873
|
+
}
|
|
42874
|
+
nextContent.push(block);
|
|
42875
|
+
}
|
|
42876
|
+
if (droppedInMessage > 0) {
|
|
42877
|
+
if (nextContent.length === 0) {
|
|
42878
|
+
droppedAssistantMessages += 1;
|
|
42879
|
+
changed = true;
|
|
42880
|
+
continue;
|
|
42881
|
+
}
|
|
42882
|
+
out.push({
|
|
42883
|
+
...msg,
|
|
42884
|
+
content: nextContent
|
|
42885
|
+
});
|
|
42886
|
+
continue;
|
|
42887
|
+
}
|
|
42888
|
+
out.push(msg);
|
|
42889
|
+
}
|
|
42890
|
+
return {
|
|
42891
|
+
messages: changed ? out : messages,
|
|
42892
|
+
droppedToolCalls,
|
|
42893
|
+
droppedAssistantMessages
|
|
42894
|
+
};
|
|
42895
|
+
}
|
|
42896
|
+
function sanitizeToolCallInputs(messages) {
|
|
42897
|
+
return repairToolCallInputs(messages).messages;
|
|
42898
|
+
}
|
|
42899
|
+
function sanitizeToolUseResultPairing(messages) {
|
|
42900
|
+
return repairToolUseResultPairing(messages).messages;
|
|
42901
|
+
}
|
|
42902
|
+
function repairToolUseResultPairing(messages) {
|
|
42903
|
+
const out = [];
|
|
42904
|
+
const added = [];
|
|
42905
|
+
const seenToolResultIds = /* @__PURE__ */ new Set();
|
|
42906
|
+
let droppedDuplicateCount = 0;
|
|
42907
|
+
let droppedOrphanCount = 0;
|
|
42908
|
+
let moved = false;
|
|
42909
|
+
let changed = false;
|
|
42910
|
+
const pushToolResult = (msg) => {
|
|
42911
|
+
const id = extractToolResultId(msg);
|
|
42912
|
+
if (id && seenToolResultIds.has(id)) {
|
|
42913
|
+
droppedDuplicateCount += 1;
|
|
42914
|
+
changed = true;
|
|
42915
|
+
return;
|
|
42916
|
+
}
|
|
42917
|
+
if (id) seenToolResultIds.add(id);
|
|
42918
|
+
out.push(msg);
|
|
42919
|
+
};
|
|
42920
|
+
for (let i = 0; i < messages.length; i += 1) {
|
|
42921
|
+
const msg = messages[i];
|
|
42922
|
+
if (!msg || typeof msg !== "object") {
|
|
42923
|
+
out.push(msg);
|
|
42924
|
+
continue;
|
|
42925
|
+
}
|
|
42926
|
+
const role = msg.role;
|
|
42927
|
+
if (role !== "assistant") {
|
|
42928
|
+
if (role !== "toolResult") out.push(msg);
|
|
42929
|
+
else {
|
|
42930
|
+
droppedOrphanCount += 1;
|
|
42931
|
+
changed = true;
|
|
42932
|
+
}
|
|
42933
|
+
continue;
|
|
42934
|
+
}
|
|
42935
|
+
const assistant = msg;
|
|
42936
|
+
const stopReason = assistant.stopReason;
|
|
42937
|
+
if (stopReason === "error" || stopReason === "aborted") {
|
|
42938
|
+
out.push(msg);
|
|
42939
|
+
continue;
|
|
42940
|
+
}
|
|
42941
|
+
const toolCalls = extractToolCallsFromAssistant(assistant);
|
|
42942
|
+
if (toolCalls.length === 0) {
|
|
42943
|
+
out.push(msg);
|
|
42944
|
+
continue;
|
|
42945
|
+
}
|
|
42946
|
+
const toolCallIds = new Set(toolCalls.map((t) => t.id));
|
|
42947
|
+
const spanResultsById = /* @__PURE__ */ new Map();
|
|
42948
|
+
const remainder = [];
|
|
42949
|
+
let j = i + 1;
|
|
42950
|
+
for (; j < messages.length; j += 1) {
|
|
42951
|
+
const next = messages[j];
|
|
42952
|
+
if (!next || typeof next !== "object") {
|
|
42953
|
+
remainder.push(next);
|
|
42954
|
+
continue;
|
|
42955
|
+
}
|
|
42956
|
+
const nextRole = next.role;
|
|
42957
|
+
if (nextRole === "assistant") break;
|
|
42958
|
+
if (nextRole === "toolResult") {
|
|
42959
|
+
const toolResult = next;
|
|
42960
|
+
const id = extractToolResultId(toolResult);
|
|
42961
|
+
if (id && toolCallIds.has(id)) {
|
|
42962
|
+
if (seenToolResultIds.has(id)) {
|
|
42963
|
+
droppedDuplicateCount += 1;
|
|
42964
|
+
changed = true;
|
|
42965
|
+
continue;
|
|
42966
|
+
}
|
|
42967
|
+
if (!spanResultsById.has(id)) spanResultsById.set(id, toolResult);
|
|
42968
|
+
continue;
|
|
42969
|
+
}
|
|
42970
|
+
}
|
|
42971
|
+
if (nextRole !== "toolResult") remainder.push(next);
|
|
42972
|
+
else {
|
|
42973
|
+
droppedOrphanCount += 1;
|
|
42974
|
+
changed = true;
|
|
42975
|
+
}
|
|
42976
|
+
}
|
|
42977
|
+
out.push(msg);
|
|
42978
|
+
if (spanResultsById.size > 0 && remainder.length > 0) {
|
|
42979
|
+
moved = true;
|
|
42980
|
+
changed = true;
|
|
42981
|
+
}
|
|
42982
|
+
for (const call of toolCalls) {
|
|
42983
|
+
const existing = spanResultsById.get(call.id);
|
|
42984
|
+
if (existing) pushToolResult(existing);
|
|
42985
|
+
else {
|
|
42986
|
+
const missing = makeMissingToolResult({
|
|
42987
|
+
toolCallId: call.id,
|
|
42988
|
+
toolName: call.name
|
|
42989
|
+
});
|
|
42990
|
+
added.push(missing);
|
|
42991
|
+
changed = true;
|
|
42992
|
+
pushToolResult(missing);
|
|
42993
|
+
}
|
|
42994
|
+
}
|
|
42995
|
+
for (const rem of remainder) {
|
|
42996
|
+
if (!rem || typeof rem !== "object") {
|
|
42997
|
+
out.push(rem);
|
|
42998
|
+
continue;
|
|
42999
|
+
}
|
|
43000
|
+
out.push(rem);
|
|
43001
|
+
}
|
|
43002
|
+
i = j - 1;
|
|
43003
|
+
}
|
|
43004
|
+
const changedOrMoved = changed || moved;
|
|
43005
|
+
return {
|
|
43006
|
+
messages: changedOrMoved ? out : messages,
|
|
43007
|
+
added,
|
|
43008
|
+
droppedDuplicateCount,
|
|
43009
|
+
droppedOrphanCount,
|
|
43010
|
+
moved: changedOrMoved
|
|
43011
|
+
};
|
|
43012
|
+
}
|
|
43013
|
+
|
|
43014
|
+
//#endregion
|
|
43015
|
+
//#region src/agents/session-empty-prune.ts
|
|
43016
|
+
/**
|
|
43017
|
+
* Pre-run prune of empty assistant entries from a session JSONL file.
|
|
43018
|
+
*
|
|
43019
|
+
* When a stream fails before any content arrives, pi-coding-agent persists
|
|
43020
|
+
* an assistant message with an empty content array. If this repeats (e.g. a
|
|
43021
|
+
* misconfigured provider fails on every retry), the session ends up with
|
|
43022
|
+
* hundreds of consecutive empty assistant entries. vLLM and other strict
|
|
43023
|
+
* providers then reject the request with a role-ordering error — once the
|
|
43024
|
+
* session is in that state, every future turn fails until the user runs /new.
|
|
43025
|
+
*
|
|
43026
|
+
* This helper runs before SessionManager opens the file, reads the JSONL
|
|
43027
|
+
* line-by-line, filters out any line whose `message` is an empty-content
|
|
43028
|
+
* assistant, and rewrites the file atomically if anything was dropped. The
|
|
43029
|
+
* in-memory SessionManager state and the on-disk file stay consistent.
|
|
43030
|
+
*
|
|
43031
|
+
* The append guard in {@link ./session-tool-result-guard.ts} prevents new
|
|
43032
|
+
* empty entries from being written; this helper retroactively cleans files
|
|
43033
|
+
* that were poisoned before the guard existed.
|
|
43034
|
+
*
|
|
43035
|
+
* @module
|
|
43036
|
+
*/
|
|
43037
|
+
async function readSessionFile(sessionFile) {
|
|
43038
|
+
try {
|
|
43039
|
+
return await fs$1.readFile(sessionFile, "utf-8");
|
|
43040
|
+
} catch {
|
|
43041
|
+
return null;
|
|
43042
|
+
}
|
|
43043
|
+
}
|
|
43044
|
+
async function writeAtomically(sessionFile, text) {
|
|
43045
|
+
const dir = path.dirname(sessionFile);
|
|
43046
|
+
const base = path.basename(sessionFile);
|
|
43047
|
+
const tmp = path.join(dir, `.${base}.prune-${process.pid}-${Date.now()}.tmp`);
|
|
43048
|
+
await fs$1.writeFile(tmp, text, "utf-8");
|
|
43049
|
+
await fs$1.rename(tmp, sessionFile);
|
|
43050
|
+
}
|
|
43051
|
+
/**
|
|
43052
|
+
* Remove empty assistant JSONL entries from the session file.
|
|
43053
|
+
*
|
|
43054
|
+
* Parses each line; lines that don't parse are preserved verbatim so we don't
|
|
43055
|
+
* lose unknown data. Only lines that parse into a `{type:"message", message:
|
|
43056
|
+
* <empty-assistant>}` entry are dropped.
|
|
43057
|
+
*/
|
|
43058
|
+
async function pruneEmptyAssistantsFromSessionFile(sessionFile) {
|
|
43059
|
+
const raw = await readSessionFile(sessionFile);
|
|
43060
|
+
if (raw === null || raw.length === 0) return {
|
|
43061
|
+
rewrote: false,
|
|
43062
|
+
pruned: 0,
|
|
43063
|
+
unparsable: 0
|
|
43064
|
+
};
|
|
43065
|
+
const lines = raw.split("\n");
|
|
43066
|
+
const kept = [];
|
|
43067
|
+
let pruned = 0;
|
|
43068
|
+
let unparsable = 0;
|
|
43069
|
+
for (const line of lines) {
|
|
43070
|
+
if (line.length === 0) {
|
|
43071
|
+
kept.push(line);
|
|
43072
|
+
continue;
|
|
43073
|
+
}
|
|
43074
|
+
let parsed = null;
|
|
43075
|
+
try {
|
|
43076
|
+
parsed = JSON.parse(line);
|
|
43077
|
+
} catch {
|
|
43078
|
+
unparsable += 1;
|
|
43079
|
+
kept.push(line);
|
|
43080
|
+
continue;
|
|
43081
|
+
}
|
|
43082
|
+
if (parsed?.type === "message" && isEmptyAssistantMessage(parsed.message)) {
|
|
43083
|
+
pruned += 1;
|
|
43084
|
+
continue;
|
|
43085
|
+
}
|
|
43086
|
+
kept.push(line);
|
|
43087
|
+
}
|
|
43088
|
+
if (pruned === 0) return {
|
|
43089
|
+
rewrote: false,
|
|
43090
|
+
pruned: 0,
|
|
43091
|
+
unparsable
|
|
43092
|
+
};
|
|
43093
|
+
await writeAtomically(sessionFile, kept.join("\n"));
|
|
43094
|
+
return {
|
|
43095
|
+
rewrote: true,
|
|
43096
|
+
pruned,
|
|
43097
|
+
unparsable
|
|
43098
|
+
};
|
|
43099
|
+
}
|
|
43100
|
+
|
|
42762
43101
|
//#endregion
|
|
42763
43102
|
//#region src/agents/session-file-repair.ts
|
|
42764
43103
|
function isSessionHeader(entry) {
|
|
@@ -43032,221 +43371,6 @@ function sessionLikelyHasOversizedToolResults(params) {
|
|
|
43032
43371
|
return false;
|
|
43033
43372
|
}
|
|
43034
43373
|
|
|
43035
|
-
//#endregion
|
|
43036
|
-
//#region src/agents/session-transcript-repair.ts
|
|
43037
|
-
function isToolCallBlock(block) {
|
|
43038
|
-
if (!block || typeof block !== "object") return false;
|
|
43039
|
-
const type = block.type;
|
|
43040
|
-
return typeof type === "string" && (type === "toolCall" || type === "toolUse" || type === "functionCall");
|
|
43041
|
-
}
|
|
43042
|
-
function hasToolCallInput(block) {
|
|
43043
|
-
const hasInput = "input" in block ? block.input !== void 0 && block.input !== null : false;
|
|
43044
|
-
const hasArguments = "arguments" in block ? block.arguments !== void 0 && block.arguments !== null : false;
|
|
43045
|
-
return hasInput || hasArguments;
|
|
43046
|
-
}
|
|
43047
|
-
function hasNonEmptyStringField(value) {
|
|
43048
|
-
return typeof value === "string" && value.trim().length > 0;
|
|
43049
|
-
}
|
|
43050
|
-
function hasToolCallId(block) {
|
|
43051
|
-
return hasNonEmptyStringField(block.id);
|
|
43052
|
-
}
|
|
43053
|
-
function hasToolCallName(block) {
|
|
43054
|
-
return hasNonEmptyStringField(block.name);
|
|
43055
|
-
}
|
|
43056
|
-
function makeMissingToolResult(params) {
|
|
43057
|
-
return {
|
|
43058
|
-
role: "toolResult",
|
|
43059
|
-
toolCallId: params.toolCallId,
|
|
43060
|
-
toolName: params.toolName ?? "unknown",
|
|
43061
|
-
content: [{
|
|
43062
|
-
type: "text",
|
|
43063
|
-
text: "[symi] missing tool result in session history; inserted synthetic error result for transcript repair."
|
|
43064
|
-
}],
|
|
43065
|
-
isError: true,
|
|
43066
|
-
timestamp: Date.now()
|
|
43067
|
-
};
|
|
43068
|
-
}
|
|
43069
|
-
function stripToolResultDetails(messages) {
|
|
43070
|
-
let touched = false;
|
|
43071
|
-
const out = [];
|
|
43072
|
-
for (const msg of messages) {
|
|
43073
|
-
if (!msg || typeof msg !== "object" || msg.role !== "toolResult") {
|
|
43074
|
-
out.push(msg);
|
|
43075
|
-
continue;
|
|
43076
|
-
}
|
|
43077
|
-
if (!("details" in msg)) {
|
|
43078
|
-
out.push(msg);
|
|
43079
|
-
continue;
|
|
43080
|
-
}
|
|
43081
|
-
const { details: _details, ...rest } = msg;
|
|
43082
|
-
touched = true;
|
|
43083
|
-
out.push(rest);
|
|
43084
|
-
}
|
|
43085
|
-
return touched ? out : messages;
|
|
43086
|
-
}
|
|
43087
|
-
function repairToolCallInputs(messages) {
|
|
43088
|
-
let droppedToolCalls = 0;
|
|
43089
|
-
let droppedAssistantMessages = 0;
|
|
43090
|
-
let changed = false;
|
|
43091
|
-
const out = [];
|
|
43092
|
-
for (const msg of messages) {
|
|
43093
|
-
if (!msg || typeof msg !== "object") {
|
|
43094
|
-
out.push(msg);
|
|
43095
|
-
continue;
|
|
43096
|
-
}
|
|
43097
|
-
if (msg.role !== "assistant" || !Array.isArray(msg.content)) {
|
|
43098
|
-
out.push(msg);
|
|
43099
|
-
continue;
|
|
43100
|
-
}
|
|
43101
|
-
const nextContent = [];
|
|
43102
|
-
let droppedInMessage = 0;
|
|
43103
|
-
for (const block of msg.content) {
|
|
43104
|
-
if (isToolCallBlock(block) && (!hasToolCallInput(block) || !hasToolCallId(block) || !hasToolCallName(block))) {
|
|
43105
|
-
droppedToolCalls += 1;
|
|
43106
|
-
droppedInMessage += 1;
|
|
43107
|
-
changed = true;
|
|
43108
|
-
continue;
|
|
43109
|
-
}
|
|
43110
|
-
nextContent.push(block);
|
|
43111
|
-
}
|
|
43112
|
-
if (droppedInMessage > 0) {
|
|
43113
|
-
if (nextContent.length === 0) {
|
|
43114
|
-
droppedAssistantMessages += 1;
|
|
43115
|
-
changed = true;
|
|
43116
|
-
continue;
|
|
43117
|
-
}
|
|
43118
|
-
out.push({
|
|
43119
|
-
...msg,
|
|
43120
|
-
content: nextContent
|
|
43121
|
-
});
|
|
43122
|
-
continue;
|
|
43123
|
-
}
|
|
43124
|
-
out.push(msg);
|
|
43125
|
-
}
|
|
43126
|
-
return {
|
|
43127
|
-
messages: changed ? out : messages,
|
|
43128
|
-
droppedToolCalls,
|
|
43129
|
-
droppedAssistantMessages
|
|
43130
|
-
};
|
|
43131
|
-
}
|
|
43132
|
-
function sanitizeToolCallInputs(messages) {
|
|
43133
|
-
return repairToolCallInputs(messages).messages;
|
|
43134
|
-
}
|
|
43135
|
-
function sanitizeToolUseResultPairing(messages) {
|
|
43136
|
-
return repairToolUseResultPairing(messages).messages;
|
|
43137
|
-
}
|
|
43138
|
-
function repairToolUseResultPairing(messages) {
|
|
43139
|
-
const out = [];
|
|
43140
|
-
const added = [];
|
|
43141
|
-
const seenToolResultIds = /* @__PURE__ */ new Set();
|
|
43142
|
-
let droppedDuplicateCount = 0;
|
|
43143
|
-
let droppedOrphanCount = 0;
|
|
43144
|
-
let moved = false;
|
|
43145
|
-
let changed = false;
|
|
43146
|
-
const pushToolResult = (msg) => {
|
|
43147
|
-
const id = extractToolResultId(msg);
|
|
43148
|
-
if (id && seenToolResultIds.has(id)) {
|
|
43149
|
-
droppedDuplicateCount += 1;
|
|
43150
|
-
changed = true;
|
|
43151
|
-
return;
|
|
43152
|
-
}
|
|
43153
|
-
if (id) seenToolResultIds.add(id);
|
|
43154
|
-
out.push(msg);
|
|
43155
|
-
};
|
|
43156
|
-
for (let i = 0; i < messages.length; i += 1) {
|
|
43157
|
-
const msg = messages[i];
|
|
43158
|
-
if (!msg || typeof msg !== "object") {
|
|
43159
|
-
out.push(msg);
|
|
43160
|
-
continue;
|
|
43161
|
-
}
|
|
43162
|
-
const role = msg.role;
|
|
43163
|
-
if (role !== "assistant") {
|
|
43164
|
-
if (role !== "toolResult") out.push(msg);
|
|
43165
|
-
else {
|
|
43166
|
-
droppedOrphanCount += 1;
|
|
43167
|
-
changed = true;
|
|
43168
|
-
}
|
|
43169
|
-
continue;
|
|
43170
|
-
}
|
|
43171
|
-
const assistant = msg;
|
|
43172
|
-
const stopReason = assistant.stopReason;
|
|
43173
|
-
if (stopReason === "error" || stopReason === "aborted") {
|
|
43174
|
-
out.push(msg);
|
|
43175
|
-
continue;
|
|
43176
|
-
}
|
|
43177
|
-
const toolCalls = extractToolCallsFromAssistant(assistant);
|
|
43178
|
-
if (toolCalls.length === 0) {
|
|
43179
|
-
out.push(msg);
|
|
43180
|
-
continue;
|
|
43181
|
-
}
|
|
43182
|
-
const toolCallIds = new Set(toolCalls.map((t) => t.id));
|
|
43183
|
-
const spanResultsById = /* @__PURE__ */ new Map();
|
|
43184
|
-
const remainder = [];
|
|
43185
|
-
let j = i + 1;
|
|
43186
|
-
for (; j < messages.length; j += 1) {
|
|
43187
|
-
const next = messages[j];
|
|
43188
|
-
if (!next || typeof next !== "object") {
|
|
43189
|
-
remainder.push(next);
|
|
43190
|
-
continue;
|
|
43191
|
-
}
|
|
43192
|
-
const nextRole = next.role;
|
|
43193
|
-
if (nextRole === "assistant") break;
|
|
43194
|
-
if (nextRole === "toolResult") {
|
|
43195
|
-
const toolResult = next;
|
|
43196
|
-
const id = extractToolResultId(toolResult);
|
|
43197
|
-
if (id && toolCallIds.has(id)) {
|
|
43198
|
-
if (seenToolResultIds.has(id)) {
|
|
43199
|
-
droppedDuplicateCount += 1;
|
|
43200
|
-
changed = true;
|
|
43201
|
-
continue;
|
|
43202
|
-
}
|
|
43203
|
-
if (!spanResultsById.has(id)) spanResultsById.set(id, toolResult);
|
|
43204
|
-
continue;
|
|
43205
|
-
}
|
|
43206
|
-
}
|
|
43207
|
-
if (nextRole !== "toolResult") remainder.push(next);
|
|
43208
|
-
else {
|
|
43209
|
-
droppedOrphanCount += 1;
|
|
43210
|
-
changed = true;
|
|
43211
|
-
}
|
|
43212
|
-
}
|
|
43213
|
-
out.push(msg);
|
|
43214
|
-
if (spanResultsById.size > 0 && remainder.length > 0) {
|
|
43215
|
-
moved = true;
|
|
43216
|
-
changed = true;
|
|
43217
|
-
}
|
|
43218
|
-
for (const call of toolCalls) {
|
|
43219
|
-
const existing = spanResultsById.get(call.id);
|
|
43220
|
-
if (existing) pushToolResult(existing);
|
|
43221
|
-
else {
|
|
43222
|
-
const missing = makeMissingToolResult({
|
|
43223
|
-
toolCallId: call.id,
|
|
43224
|
-
toolName: call.name
|
|
43225
|
-
});
|
|
43226
|
-
added.push(missing);
|
|
43227
|
-
changed = true;
|
|
43228
|
-
pushToolResult(missing);
|
|
43229
|
-
}
|
|
43230
|
-
}
|
|
43231
|
-
for (const rem of remainder) {
|
|
43232
|
-
if (!rem || typeof rem !== "object") {
|
|
43233
|
-
out.push(rem);
|
|
43234
|
-
continue;
|
|
43235
|
-
}
|
|
43236
|
-
out.push(rem);
|
|
43237
|
-
}
|
|
43238
|
-
i = j - 1;
|
|
43239
|
-
}
|
|
43240
|
-
const changedOrMoved = changed || moved;
|
|
43241
|
-
return {
|
|
43242
|
-
messages: changedOrMoved ? out : messages,
|
|
43243
|
-
added,
|
|
43244
|
-
droppedDuplicateCount,
|
|
43245
|
-
droppedOrphanCount,
|
|
43246
|
-
moved: changedOrMoved
|
|
43247
|
-
};
|
|
43248
|
-
}
|
|
43249
|
-
|
|
43250
43374
|
//#endregion
|
|
43251
43375
|
//#region src/agents/session-tool-result-guard.ts
|
|
43252
43376
|
const GUARD_TRUNCATION_SUFFIX = "\n\n⚠️ [Content truncated during persistence — original exceeded size limit. Use offset/limit parameters or request specific sections for large content.]";
|
|
@@ -43327,6 +43451,10 @@ function installSessionToolResultGuard(sessionManager, opts) {
|
|
|
43327
43451
|
const guardedAppend = (message) => {
|
|
43328
43452
|
let nextMessage = message;
|
|
43329
43453
|
if (message.role === "assistant") {
|
|
43454
|
+
if (isEmptyAssistantMessage(message)) {
|
|
43455
|
+
if (allowSyntheticToolResults && pending.size > 0) flushPendingToolResults();
|
|
43456
|
+
return;
|
|
43457
|
+
}
|
|
43330
43458
|
const sanitized = sanitizeToolCallInputs([message]);
|
|
43331
43459
|
if (sanitized.length === 0) {
|
|
43332
43460
|
if (allowSyntheticToolResults && pending.size > 0) flushPendingToolResults();
|
|
@@ -45454,6 +45582,38 @@ function getHistoryLimitFromSessionKey(sessionKey, config) {
|
|
|
45454
45582
|
*/
|
|
45455
45583
|
const getDmHistoryLimitFromSessionKey = getHistoryLimitFromSessionKey;
|
|
45456
45584
|
|
|
45585
|
+
//#endregion
|
|
45586
|
+
//#region src/agents/pi-embedded-runner/long-task-prompt.ts
|
|
45587
|
+
const SCRIPT_REL_PATH = "skills/long-task/scripts/detach-task.sh";
|
|
45588
|
+
let cachedScriptPath;
|
|
45589
|
+
async function resolveDetachScriptPath(params) {
|
|
45590
|
+
if (cachedScriptPath !== void 0) return cachedScriptPath;
|
|
45591
|
+
const packageRoot = await resolveSymiPackageRoot({
|
|
45592
|
+
cwd: params.cwd,
|
|
45593
|
+
argv1: params.argv1,
|
|
45594
|
+
moduleUrl: params.moduleUrl
|
|
45595
|
+
});
|
|
45596
|
+
if (!packageRoot) {
|
|
45597
|
+
cachedScriptPath = null;
|
|
45598
|
+
return null;
|
|
45599
|
+
}
|
|
45600
|
+
const candidate = path.join(packageRoot, SCRIPT_REL_PATH);
|
|
45601
|
+
cachedScriptPath = fs.existsSync(candidate) ? candidate : null;
|
|
45602
|
+
return cachedScriptPath;
|
|
45603
|
+
}
|
|
45604
|
+
async function buildLongTaskPromptSuffix(params) {
|
|
45605
|
+
const scriptPath = await resolveDetachScriptPath(params);
|
|
45606
|
+
if (!scriptPath) return "";
|
|
45607
|
+
return "\n\n" + [
|
|
45608
|
+
"LONG-RUNNING TASK PATTERN:",
|
|
45609
|
+
"- For any task that may exceed 15 minutes (deep nmap scans of /24 or larger, full brute-force sweeps, long builds, exhaustive enumeration): detach from the agent turn. Do NOT foreground-block the exec tool for the full duration; the agent turn will hit its timeout and SIGTERM the process mid-run.",
|
|
45610
|
+
`- Detach pattern: exec \`${scriptPath} <task-id> <workdir> <command...>\`. The script spawns under setsid+nohup, writes PID / cmd / started / status / log files in the workdir. Use the agent workspace as the workdir.`,
|
|
45611
|
+
"- Immediately after detaching, respond to the user with: task id, PID, log file path, your ETA estimate, and that a cron monitor has been scheduled.",
|
|
45612
|
+
"- Register a cron monitor using the `cron` tool with action=add. Schedule every 2-3 minutes. Job prompt must include the task-id, PID, log path, and status path so the future turn has enough context. Example job prompt: \"Check if PID <pid> is alive (kill -0). If alive: tail -n 20 <log>, post one-sentence progress update. If not alive: read <status> and tail <log>, post a final summary, then call cron tool with action=remove id=<this-cron-id>.\"",
|
|
45613
|
+
"- When the monitor turn observes status=complete, it MUST call the cron tool with action=remove to clean up its own job. Do not leave stale monitors running."
|
|
45614
|
+
].join("\n");
|
|
45615
|
+
}
|
|
45616
|
+
|
|
45457
45617
|
//#endregion
|
|
45458
45618
|
//#region src/agents/pi-embedded-runner/runs.ts
|
|
45459
45619
|
const ACTIVE_EMBEDDED_RUNS = /* @__PURE__ */ new Map();
|
|
@@ -46504,7 +46664,12 @@ async function runEmbeddedAttempt(params) {
|
|
|
46504
46664
|
const profileModelKey = params.modelId ?? "";
|
|
46505
46665
|
const modelProfile = resolveModelProfile(profileModelKey, params.config?.models?.profiles);
|
|
46506
46666
|
log$5.debug(`[profile] resolved: modelId=${profileModelKey} → profile=${modelProfile.label} validateToolArgs=${modelProfile.filters?.validateToolArgs ?? false}`);
|
|
46507
|
-
const
|
|
46667
|
+
const profilePromptSuffix = modelProfile.promptAdditions.length > 0 ? "\n\n" + modelProfile.promptAdditions.join("\n") : "";
|
|
46668
|
+
const systemPromptText = createSystemPromptOverride(appendPrompt + await buildLongTaskPromptSuffix({
|
|
46669
|
+
argv1: process.argv[1],
|
|
46670
|
+
cwd: process.cwd(),
|
|
46671
|
+
moduleUrl: import.meta.url
|
|
46672
|
+
}) + profilePromptSuffix)();
|
|
46508
46673
|
const sessionLock = await acquireSessionWriteLock({
|
|
46509
46674
|
sessionFile: params.sessionFile,
|
|
46510
46675
|
maxHoldMs: resolveSessionLockMaxHoldFromTimeout({ timeoutMs: params.timeoutMs })
|
|
@@ -46525,6 +46690,8 @@ async function runEmbeddedAttempt(params) {
|
|
|
46525
46690
|
});
|
|
46526
46691
|
const versionCheck = await handleSessionVersion(params.sessionFile);
|
|
46527
46692
|
if (versionCheck.archived) log$5.warn(`session archived: created by ${versionCheck.poisonVersion}, known corruption range → ${versionCheck.archivePath}`);
|
|
46693
|
+
const pruneReport = await pruneEmptyAssistantsFromSessionFile(params.sessionFile);
|
|
46694
|
+
if (pruneReport.rewrote) log$5.warn(`session prune: removed ${pruneReport.pruned} empty assistant entries from ${params.sessionFile}`);
|
|
46528
46695
|
await prewarmSessionFile(params.sessionFile);
|
|
46529
46696
|
sessionManager = guardSessionManager(SessionManager.open(params.sessionFile), {
|
|
46530
46697
|
agentId: sessionAgentId,
|
|
@@ -50891,7 +51058,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
50891
51058
|
return;
|
|
50892
51059
|
}
|
|
50893
51060
|
try {
|
|
50894
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
51061
|
+
const { deliverOutboundPayloads } = await import("./deliver-DtuY4Wgl.js").then((n) => n.n);
|
|
50895
51062
|
await deliverOutboundPayloads({
|
|
50896
51063
|
cfg: params.cfg,
|
|
50897
51064
|
channel,
|
|
@@ -54337,7 +54504,7 @@ async function describeStickerImage(params) {
|
|
|
54337
54504
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
54338
54505
|
try {
|
|
54339
54506
|
const buffer = await fs$1.readFile(imagePath);
|
|
54340
|
-
const { describeImageWithModel } = await import("./image-
|
|
54507
|
+
const { describeImageWithModel } = await import("./image-lp19FlzF.js").then((n) => n.n);
|
|
54341
54508
|
return (await describeImageWithModel({
|
|
54342
54509
|
buffer,
|
|
54343
54510
|
fileName: "sticker.webp",
|
|
@@ -54760,7 +54927,7 @@ function createWhatsAppLoginTool() {
|
|
|
54760
54927
|
force: Type.Optional(Type.Boolean())
|
|
54761
54928
|
}),
|
|
54762
54929
|
execute: async (_toolCallId, args) => {
|
|
54763
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
54930
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-Dbw5m381.js");
|
|
54764
54931
|
if ((args?.action ?? "start") === "wait") {
|
|
54765
54932
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
54766
54933
|
return {
|
|
@@ -56999,7 +57166,7 @@ async function preflightDiscordMessage(params) {
|
|
|
56999
57166
|
let preflightTranscript;
|
|
57000
57167
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
57001
57168
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
57002
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
57169
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DD18zIZd.js");
|
|
57003
57170
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
57004
57171
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
57005
57172
|
ctx: {
|
|
@@ -60782,27 +60949,27 @@ function isVoiceChannelType(type) {
|
|
|
60782
60949
|
function createDefaultDeps() {
|
|
60783
60950
|
return {
|
|
60784
60951
|
sendMessageWhatsApp: async (...args) => {
|
|
60785
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
60952
|
+
const { sendMessageWhatsApp } = await import("./web-CGh5tw__.js");
|
|
60786
60953
|
return await sendMessageWhatsApp(...args);
|
|
60787
60954
|
},
|
|
60788
60955
|
sendMessageTelegram: async (...args) => {
|
|
60789
|
-
const { sendMessageTelegram } = await import("./send-
|
|
60956
|
+
const { sendMessageTelegram } = await import("./send-B986asZ7.js").then((n) => n.l);
|
|
60790
60957
|
return await sendMessageTelegram(...args);
|
|
60791
60958
|
},
|
|
60792
60959
|
sendMessageDiscord: async (...args) => {
|
|
60793
|
-
const { sendMessageDiscord } = await import("./send-
|
|
60960
|
+
const { sendMessageDiscord } = await import("./send-RfIXG6-I.js").then((n) => n.t);
|
|
60794
60961
|
return await sendMessageDiscord(...args);
|
|
60795
60962
|
},
|
|
60796
60963
|
sendMessageSlack: async (...args) => {
|
|
60797
|
-
const { sendMessageSlack } = await import("./send-
|
|
60964
|
+
const { sendMessageSlack } = await import("./send-BzKHnf3b.js").then((n) => n.n);
|
|
60798
60965
|
return await sendMessageSlack(...args);
|
|
60799
60966
|
},
|
|
60800
60967
|
sendMessageSignal: async (...args) => {
|
|
60801
|
-
const { sendMessageSignal } = await import("./send-
|
|
60968
|
+
const { sendMessageSignal } = await import("./send-DLWaX69q.js").then((n) => n.i);
|
|
60802
60969
|
return await sendMessageSignal(...args);
|
|
60803
60970
|
},
|
|
60804
60971
|
sendMessageIMessage: async (...args) => {
|
|
60805
|
-
const { sendMessageIMessage } = await import("./send-
|
|
60972
|
+
const { sendMessageIMessage } = await import("./send-DdLJtOjk.js").then((n) => n.n);
|
|
60806
60973
|
return await sendMessageIMessage(...args);
|
|
60807
60974
|
}
|
|
60808
60975
|
};
|
|
@@ -71632,7 +71799,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
71632
71799
|
});
|
|
71633
71800
|
const deliverSlashPayloads = async (replies) => {
|
|
71634
71801
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
71635
|
-
import("./replies-
|
|
71802
|
+
import("./replies-CfyMcfoY.js").then((n) => n.r),
|
|
71636
71803
|
import("./chunk-DTMTDXwE.js").then((n) => n.s),
|
|
71637
71804
|
import("./markdown-tables-DawaaZEe.js").then((n) => n.t)
|
|
71638
71805
|
]);
|
|
@@ -73905,7 +74072,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
73905
74072
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
73906
74073
|
let preflightTranscript;
|
|
73907
74074
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
73908
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
74075
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DD18zIZd.js");
|
|
73909
74076
|
preflightTranscript = await transcribeFirstAudio({
|
|
73910
74077
|
ctx: {
|
|
73911
74078
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -76050,23 +76217,23 @@ let webLoginQrPromise = null;
|
|
|
76050
76217
|
let webChannelPromise = null;
|
|
76051
76218
|
let whatsappActionsPromise = null;
|
|
76052
76219
|
function loadWebOutbound() {
|
|
76053
|
-
webOutboundPromise ??= import("./outbound-
|
|
76220
|
+
webOutboundPromise ??= import("./outbound-BIOChOHt.js").then((n) => n.t);
|
|
76054
76221
|
return webOutboundPromise;
|
|
76055
76222
|
}
|
|
76056
76223
|
function loadWebLogin() {
|
|
76057
|
-
webLoginPromise ??= import("./login-
|
|
76224
|
+
webLoginPromise ??= import("./login-BkbDSDPc.js").then((n) => n.n);
|
|
76058
76225
|
return webLoginPromise;
|
|
76059
76226
|
}
|
|
76060
76227
|
function loadWebLoginQr() {
|
|
76061
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
76228
|
+
webLoginQrPromise ??= import("./login-qr-Dbw5m381.js");
|
|
76062
76229
|
return webLoginQrPromise;
|
|
76063
76230
|
}
|
|
76064
76231
|
function loadWebChannel() {
|
|
76065
|
-
webChannelPromise ??= import("./web-
|
|
76232
|
+
webChannelPromise ??= import("./web-CGh5tw__.js");
|
|
76066
76233
|
return webChannelPromise;
|
|
76067
76234
|
}
|
|
76068
76235
|
function loadWhatsAppActions() {
|
|
76069
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
76236
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-BylecqEa.js");
|
|
76070
76237
|
return whatsappActionsPromise;
|
|
76071
76238
|
}
|
|
76072
76239
|
function createPluginRuntime() {
|