squidclaw 3.0.4 → 3.0.5
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-CkF7YwoF.js → accounts-B3tweNWP.js} +4 -4
- package/dist/{accounts-CK_sHUyT.js → accounts-C_l8KCRi.js} +2 -2
- package/dist/{accounts-DbloMfwT.js → accounts-ZiDDa9KJ.js} +2 -2
- package/dist/{active-listener-AepfNSUY.js → active-listener-Ccd2xBZE.js} +2 -2
- package/dist/{agents-JnnOlm2G.js → agents-IDAdnabb.js} +5 -5
- package/dist/{agents.config-BeGeS2jv.js → agents.config-DF51cWyU.js} +1 -1
- package/dist/{agents.config-DHJBQ7uA.js → agents.config-iIxcfoac.js} +1 -1
- package/dist/{plugin-sdk/api-key-rotation-DE4gr5YM.js → api-key-rotation-C-dRYWuo.js} +2 -2
- package/dist/{audio-preflight-BKgdc7dS.js → audio-preflight-BYOECG4f.js} +30 -30
- package/dist/{audio-transcription-runner-BnbdYMDl.js → audio-transcription-runner-CPEhpuLO.js} +12 -12
- package/dist/{audit-membership-runtime-DyLj-uhz.js → audit-membership-runtime-CPJnbh0Q.js} +3 -3
- package/dist/{auth-choice-xwYK6txn.js → auth-choice-BnBwCCXv.js} +2 -2
- package/dist/{auth-choice-DQbCl-4F.js → auth-choice-Da4gjROu.js} +2 -2
- package/dist/{banner-BxibaqUz.js → banner-BBId5XNb.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +49 -49
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +49 -49
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-C5kTj83_.js → channel-activity-Dmu5wZZC.js} +3 -3
- package/dist/{channel-options-FdCN4cFo.js → channel-options-BTUJmt49.js} +1 -1
- package/dist/{channel-options-BKsCYdHu.js → channel-options-C5QMYKJH.js} +1 -1
- package/dist/{channel-web-BkYtM8H5.js → channel-web-BDBaYap6.js} +1 -1
- package/dist/{channel-web-BFUPrpIe.js → channel-web-DXQukfrw.js} +1 -1
- package/dist/{channels-cli-CZzGaGvG.js → channels-cli-CodE2_4U.js} +7 -7
- package/dist/{channels-cli-BxhfVD-R.js → channels-cli-nZFTWJm3.js} +7 -7
- package/dist/{chrome-CjxCwFA9.js → chrome-BuS4b_BB.js} +15 -15
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-bXiYaLre.js → cli-cvjr3PJM.js} +2 -2
- package/dist/{cli-GSev2Q95.js → cli-xa7nfGYO.js} +2 -2
- package/dist/{command-registry-CxiSVXru.js → command-registry-De6cz7-E.js} +9 -9
- package/dist/{commands-registry-D6ZOTo1C.js → commands-registry-BjVOLvf0.js} +4 -4
- package/dist/{completion-cli-s0fxD0OE.js → completion-cli-D-XlEj2O.js} +2 -2
- package/dist/{completion-cli-slzdOlRV.js → completion-cli-DFItGNcw.js} +1 -1
- package/dist/{config-cli-C0mk9eRl.js → config-cli-CiS7hyXQ.js} +1 -1
- package/dist/{config-cli-DhHEA_Nc.js → config-cli-DIU6V325.js} +1 -1
- package/dist/{configure-FRd92XZ8.js → configure-BMXU0of9.js} +6 -6
- package/dist/{configure-CeLdVVyh.js → configure-COgj88fo.js} +6 -6
- package/dist/{daemon-cli-DN2TnjHQ.js → daemon-cli-CE2oMOil.js} +1 -1
- package/dist/{daemon-cli-CNi-QjEX.js → daemon-cli-Doz3CsCY.js} +1 -1
- package/dist/{deliver-D-f6Wa3i.js → deliver-C8FulfkW.js} +11 -11
- package/dist/deliver-runtime-DAHX6Egt.js +36 -0
- package/dist/deps-send-discord.runtime-6_M_KIhD.js +26 -0
- package/dist/deps-send-imessage.runtime-KQo4sl7j.js +25 -0
- package/dist/deps-send-signal.runtime-_JnikN9v.js +24 -0
- package/dist/deps-send-slack.runtime-AAGitgm1.js +22 -0
- package/dist/deps-send-telegram.runtime-CVNYJjEt.js +27 -0
- package/dist/deps-send-whatsapp.runtime-5oLdo69Y.js +60 -0
- package/dist/{deps-send-whatsapp.runtime-BcxCalPD.js → deps-send-whatsapp.runtime-Bk0MRFLz.js} +4 -4
- package/dist/{deps-send-whatsapp.runtime-Dl4ro-Df.js → deps-send-whatsapp.runtime-DSZbuJSf.js} +4 -4
- package/dist/{diagnostic-ySwZga6c.js → diagnostic-D2vYK6Fg.js} +2 -2
- package/dist/{doctor-completion-I-WDZUs1.js → doctor-completion-8rS5Omw7.js} +1 -1
- package/dist/{doctor-completion-mnJOkoQ_.js → doctor-completion-BiDcNo6Q.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{plugin-sdk/errors-9oVz7reJ.js → errors-KKxnQK8G.js} +1 -1
- package/dist/{fetch-BLS7EMnx.js → fetch-DCLFwngk.js} +4 -4
- package/dist/{fetch-guard-D0fXNJls.js → fetch-guard-bk7uDnb8.js} +2 -2
- package/dist/{frontmatter-Cq1TcIQ2.js → frontmatter-EuNpTTq9.js} +3 -3
- package/dist/{fs-safe-BoB4X3GD.js → fs-safe-DdANjYLv.js} +3 -3
- package/dist/{gateway-cli-B5rTNvd7.js → gateway-cli-COXjaMFJ.js} +10 -10
- package/dist/{gateway-cli-BHfkbI0u.js → gateway-cli-CVV2dd-0.js} +10 -10
- package/dist/{health-CJgEuWuG.js → health-CHe6jetL.js} +1 -1
- package/dist/{health-dZqyhpdR.js → health-CODYcJkj.js} +1 -1
- package/dist/{hooks-cli-BD4Ww1dF.js → hooks-cli-Cd9srSlj.js} +3 -3
- package/dist/{hooks-cli-C0wWJOBW.js → hooks-cli-f3VAZszh.js} +3 -3
- package/dist/{image-C-C7hQ26.js → image-DYXL4Dt_.js} +6 -6
- package/dist/{image-ops-CdgypS_g.js → image-ops-Dly8SSF7.js} +2 -2
- package/dist/image-runtime-DsgEYYCB.js +29 -0
- package/dist/index.js +7 -7
- package/dist/{ir-BvisJWXv.js → ir-BxAD7czj.js} +8 -8
- package/dist/{legacy-names-aGJJuzM_.js → legacy-names-CrhimhR4.js} +1 -1
- package/dist/llm-slug-generator.js +49 -49
- package/dist/{logger-CnTSBL7T.js → logger-CNkhF83z.js} +1 -1
- package/dist/{login-BMeLPUiO.js → login-BfH1AL2k.js} +5 -5
- package/dist/{login-qr-B2B67qqQ.js → login-qr-c2E295av.js} +8 -8
- package/dist/{manager-DdxMYEDd.js → manager-Bw9MibiQ.js} +9 -9
- package/dist/manager-runtime-BaiUrBAz.js +18 -0
- package/dist/{model-selection-ag9BmVct.js → model-selection-aT08Cbr0.js} +10 -10
- package/dist/{models-BXT0s4KJ.js → models-BtRE9AsP.js} +3 -3
- package/dist/{models-cli-BwPFxWK2.js → models-cli-Dj4eTFQ6.js} +4 -4
- package/dist/{models-cli-BtLc9uPC.js → models-cli-Vn7VG0Mg.js} +3 -3
- package/dist/{npm-resolution-DWpNPsBF.js → npm-resolution-DEbLpq7-.js} +1 -1
- package/dist/{npm-resolution-Djbuzx6o.js → npm-resolution-DRj9EZYQ.js} +1 -1
- package/dist/{onboard-BP2Cr_Xy.js → onboard-DRyS50DA.js} +3 -3
- package/dist/{onboard-CCJCvPgf.js → onboard-Dzozp7bp.js} +3 -3
- package/dist/{onboard-channels-CXjnFvP1.js → onboard-channels-CZ5_aWYh.js} +2 -2
- package/dist/{onboard-channels-CHrtFmhi.js → onboard-channels-HPa4NzTv.js} +2 -2
- package/dist/{onboard-helpers-ByttGRIZ.js → onboard-helpers-PXSBTzql.js} +10 -6
- package/dist/{onboard-helpers-Bvpkyuwm.js → onboard-helpers-R4b3Kr01.js} +10 -6
- package/dist/{onboard-remote-Cfx2v9OI.js → onboard-remote-9ShnuysR.js} +1 -1
- package/dist/{onboard-remote-DxBaaS6o.js → onboard-remote-xgST1KeC.js} +1 -1
- package/dist/{onboard-skills-B7pHg1lN.js → onboard-skills-B7Q69fhO.js} +1 -1
- package/dist/{onboard-skills-PCnCZ6Od.js → onboard-skills-DOaiUlDS.js} +1 -1
- package/dist/{onboarding-D7CIbxzd.js → onboarding-D8yzBiwp.js} +7 -7
- package/dist/{onboarding-D5G87dvM.js → onboarding-DpKLGw-P.js} +7 -7
- package/dist/{onboarding.finalize-B1MmYTFV.js → onboarding.finalize-Blks6x4H.js} +7 -7
- package/dist/{onboarding.finalize-Cxzl-fYU.js → onboarding.finalize-YFmR3rfz.js} +6 -6
- package/dist/{onboarding.gateway-config-DDdX0W74.js → onboarding.gateway-config-4L8AnL42.js} +1 -1
- package/dist/{onboarding.gateway-config-DNUJ0seU.js → onboarding.gateway-config-BLIUBAtE.js} +1 -1
- package/dist/{outbound-DHDBvGLA.js → outbound-BJNHKrk8.js} +6 -6
- package/dist/{outbound-attachment-CqXiWbKN.js → outbound-attachment-qvD-NbIp.js} +2 -2
- package/dist/{path-alias-guards-DORgbZ1w.js → path-alias-guards-VI6pee_i.js} +1 -1
- package/dist/{paths-DSd911Oe.js → paths-DH4hVuGM.js} +1 -1
- package/dist/{pi-embedded-CHzwPt6X.js → pi-embedded-CZFbSZlb.js} +85 -85
- package/dist/{pi-embedded-helpers-Bse_QhEf.js → pi-embedded-helpers-CSG6fsiY.js} +19 -19
- package/dist/{pi-model-discovery-DAzuqPoG.js → pi-model-discovery-BbP0l7V0.js} +1 -1
- package/dist/pi-model-discovery-runtime-DHUCh3qR.js +11 -0
- package/dist/{pi-tools.before-tool-call.runtime-2Sp1jmlg.js → pi-tools.before-tool-call.runtime-CS0hOgiM.js} +7 -7
- package/dist/{plugin-registry-CLEhrKYA.js → plugin-registry-8GqJnXZm.js} +1 -1
- package/dist/{plugin-registry-DtuxmgWx.js → plugin-registry-DURw0MYp.js} +1 -1
- package/dist/plugin-sdk/{accounts-kr-Gz1hk.js → accounts-DghIDNk2.js} +2 -2
- package/dist/plugin-sdk/{accounts-CxUSDHsT.js → accounts-YTdQYQFr.js} +3 -3
- package/dist/plugin-sdk/{accounts-PSzw-z3S.js → accounts-h__dTrLK.js} +2 -2
- package/dist/plugin-sdk/{active-listener-CTsLn1AX.js → active-listener-_PRYjtJv.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-Bhck7wki.js → api-key-rotation-mVDSAkKQ.js} +2 -2
- package/dist/plugin-sdk/{audio-preflight-_xgGaeho.js → audio-preflight-BZlQM-qX.js} +26 -26
- package/dist/plugin-sdk/{audio-transcription-runner-Dwc0Eh-B.js → audio-transcription-runner-CrYTX8py.js} +11 -11
- package/dist/plugin-sdk/{audit-membership-runtime-DHQDvH4u.js → audit-membership-runtime-Xl20kCBe.js} +2 -2
- package/dist/plugin-sdk/{channel-activity-XajEg_DL.js → channel-activity-gwxRn4wF.js} +3 -3
- package/dist/plugin-sdk/{channel-web-KtqCp4mz.js → channel-web-1WF-Nabe.js} +18 -18
- package/dist/plugin-sdk/{chrome-diV5m81I.js → chrome-BXbYwXRH.js} +6 -6
- package/dist/plugin-sdk/{commands-registry-DwZAJuut.js → commands-registry-0w-aZenK.js} +4 -4
- package/dist/plugin-sdk/{common-CqnO92P8.js → common-DBOCt6Yv.js} +2 -2
- package/dist/plugin-sdk/{config-DYbtdrsT.js → config-pRtEoVyZ.js} +7 -7
- package/dist/plugin-sdk/{deliver-DG_7Uagn.js → deliver-FjlJrtZk.js} +10 -10
- package/dist/plugin-sdk/deliver-runtime-DEzvpBW1.js +32 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-Bhusa_Hi.js +23 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-bmakPm5f.js +22 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-n00sfFto.js +21 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-BvM3Z-Mr.js +19 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-CPuMkcmo.js +24 -0
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-BzO6S-KX.js +57 -0
- package/dist/plugin-sdk/{diagnostic-CT7v_kM2.js → diagnostic-Dt2i3afe.js} +2 -2
- package/dist/plugin-sdk/{errors-B8oJXuCF.js → errors-CgRPdp3o.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-Or5BCq0E.js → fetch-guard-DyPZh8r2.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-DFbwq9CS.js → fs-safe-DqCO1D4C.js} +3 -3
- package/dist/plugin-sdk/{image-rycGCqJO.js → image-CQ9TZ9vq.js} +6 -6
- package/dist/plugin-sdk/{image-ops-CMsocOob.js → image-ops-sw0uZ0GN.js} +2 -2
- package/dist/plugin-sdk/image-runtime-17_mTqsy.js +25 -0
- package/dist/plugin-sdk/index.js +50 -50
- package/dist/plugin-sdk/{ir-DihI2SIz.js → ir-BVZ5kUMb.js} +7 -7
- package/dist/plugin-sdk/{local-roots-1xVosTZ4.js → local-roots-fO3ZgW3G.js} +4 -4
- package/dist/plugin-sdk/{logger-Bg4vIUJn.js → logger-DIb2cGHp.js} +2 -2
- package/dist/plugin-sdk/{login-YhFrVUWo.js → login-Dg5cxB_3.js} +4 -4
- package/dist/plugin-sdk/{login-qr-SpUTuwYv.js → login-qr-C3Vn30cq.js} +5 -5
- package/dist/plugin-sdk/{manager-DrzOPeMD.js → manager-BR-TwWTH.js} +8 -8
- package/dist/plugin-sdk/manager-runtime-CvI9wF8N.js +15 -0
- package/dist/plugin-sdk/mattermost.js +3 -3
- package/dist/plugin-sdk/{outbound-Cc4cUn9K.js → outbound-1a3Z_QJ2.js} +5 -5
- package/dist/plugin-sdk/{outbound-attachment-Dtp3hQgc.js → outbound-attachment-BTQjD4YE.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-gBhrAn14.js → path-alias-guards-TnxupPQC.js} +1 -1
- package/dist/plugin-sdk/{paths-CP67O8eN.js → paths-B7_75Pdr.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-BDJ_4Plh.js → pi-embedded-helpers-DZRNadD8.js} +16 -16
- package/dist/plugin-sdk/{pi-model-discovery-Mk0GTDJl.js → pi-model-discovery-DGh6xekX.js} +1 -1
- package/dist/plugin-sdk/pi-model-discovery-runtime-DjjBdPYt.js +8 -0
- package/dist/plugin-sdk/{pi-tools.before-tool-call.runtime-DV72wTDb.js → pi-tools.before-tool-call.runtime-BZ9XgG_x.js} +4 -4
- package/dist/plugin-sdk/{plugins-DSs2-fnK.js → plugins-B8pWVYug.js} +4 -4
- package/dist/plugin-sdk/{proxy-env-Ib4-LUh-.js → proxy-env-BOlkiW1-.js} +1 -1
- package/dist/plugin-sdk/{proxy-fetch-ZPEvp58f.js → proxy-fetch-Dt5BedH8.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-DIx2wpkY.js → pw-ai-C17A1o4w.js} +9 -9
- package/dist/plugin-sdk/{qmd-manager-Ov9ElEfG.js → qmd-manager-Bei6TaFq.js} +7 -7
- package/dist/plugin-sdk/{query-expansion-CzjwW461.js → query-expansion-POz2za8a.js} +4 -4
- package/dist/plugin-sdk/{redact-DfACyt0X.js → redact-9WsNyb7S.js} +1 -1
- package/dist/plugin-sdk/{reply-CWWUd_JS.js → reply-BFbijn6_.js} +73 -73
- package/dist/plugin-sdk/{resolve-outbound-target-BOkvxZtM.js → resolve-outbound-target-B9iFEh0y.js} +2 -2
- package/dist/plugin-sdk/{run-with-concurrency-kVooFCVo.js → run-with-concurrency-DmTrN5JG.js} +1 -1
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-DzhkSmLi.js +10 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-DyILWezU.js +19 -0
- package/dist/plugin-sdk/{send-BP1fSEBR.js → send-BGZo6HW1.js} +5 -5
- package/dist/plugin-sdk/{send-D9CSOGul.js → send-BisREGBZ.js} +6 -6
- package/dist/plugin-sdk/{send-BeLBlAsQ.js → send-BqkUDZed.js} +13 -13
- package/dist/plugin-sdk/{send-DLKxJJYV.js → send-D6_nNvi0.js} +8 -8
- package/dist/plugin-sdk/{send-XZ6IXCtL.js → send-Dj7XEcZN.js} +7 -7
- package/dist/plugin-sdk/{session-DtLUYWvY.js → session-D4KDs7Hq.js} +3 -3
- package/dist/plugin-sdk/{skill-commands-Bv7EZypt.js → skill-commands-D_xeseiI.js} +4 -4
- package/dist/plugin-sdk/{skills-BzXN4uev.js → skills-Bs2b3JfV.js} +6 -6
- package/dist/plugin-sdk/slash-commands.runtime-CUb5sqqf.js +13 -0
- package/dist/plugin-sdk/slash-dispatch.runtime-DCB6bGjB.js +52 -0
- package/dist/plugin-sdk/slash-skill-commands.runtime-BqEweE4K.js +16 -0
- package/dist/plugin-sdk/{store-DnJhFFW5.js → store-B7ESm9_L.js} +2 -2
- package/dist/plugin-sdk/subagent-registry-runtime-CCUW4SbM.js +52 -0
- package/dist/plugin-sdk/{tables-CpmqssLF.js → tables-1vhBJPK_.js} +1 -1
- package/dist/plugin-sdk/{thinking-1UCPuD9d.js → thinking-DjaClmzi.js} +7 -7
- package/dist/plugin-sdk/{tokens-DAL_5WHL.js → tokens-CLE20fRI.js} +1 -1
- package/dist/plugin-sdk/{tool-images-RX4QTMnt.js → tool-images-B95xcwiR.js} +2 -2
- package/dist/plugin-sdk/web-DeRmHQ4_.js +56 -0
- package/dist/plugin-sdk/{whatsapp-actions-BF6ih4Gi.js → whatsapp-actions-BYpcWkTN.js} +17 -17
- package/dist/plugin-sdk/whatsapp.js +50 -50
- package/dist/{plugins-DXkm70nK.js → plugins-Cg99ej4a.js} +6 -6
- package/dist/{plugins-cli-Cs3UUJew.js → plugins-cli-DmTsD71d.js} +3 -3
- package/dist/{plugins-cli-KPz6APX0.js → plugins-cli-DpZYmju3.js} +3 -3
- package/dist/{program-2J-jgdfk.js → program-DSb6ocNC.js} +8 -8
- package/dist/{program-context-SjYSWx_N.js → program-context-ooZUt2gS.js} +18 -18
- package/dist/{prompt-select-styled-Baiu3mAU.js → prompt-select-styled-BflFyz9P.js} +5 -5
- package/dist/{prompt-select-styled-DPnVmH8f.js → prompt-select-styled-Dt-WhnQ0.js} +5 -5
- package/dist/{provider-auth-helpers-CxUWqt95.js → provider-auth-helpers-DVomEnsq.js} +1 -1
- package/dist/{provider-auth-helpers-hhFVhZdv.js → provider-auth-helpers-o8UcxFzE.js} +1 -1
- package/dist/{proxy-env-D75CWSOo.js → proxy-env-BNo93HMb.js} +1 -1
- package/dist/{plugin-sdk/proxy-fetch-Cf3IUSDw.js → proxy-fetch-xYMu9mkn.js} +1 -1
- package/dist/{push-apns-BBkpZyNR.js → push-apns-ByOCwUIb.js} +1 -1
- package/dist/{push-apns-BQjV_93G.js → push-apns-C7qyD1SB.js} +1 -1
- package/dist/{pw-ai-BwRP3TWc.js → pw-ai-DGILOk_h.js} +12 -12
- package/dist/{qmd-manager-BN0siR2Z.js → qmd-manager-BWffUeZv.js} +9 -9
- package/dist/{query-expansion-Dzxt6kXo.js → query-expansion-yY0Xn9Kw.js} +4 -4
- package/dist/{plugin-sdk/redact-BoNEjbpF.js → redact-CNCiJdri.js} +1 -1
- package/dist/{register.agent-reU63wQ5.js → register.agent-CqJmJqZY.js} +7 -7
- package/dist/{register.agent-DYq06QHS.js → register.agent-fGunIm89.js} +8 -8
- package/dist/{register.configure-CCkfhF-7.js → register.configure-BSC7QkD7.js} +10 -10
- package/dist/{register.configure-Ao1K2uze.js → register.configure-BYOtTrkD.js} +10 -10
- package/dist/{register.maintenance-pLpE2oF-.js → register.maintenance-BvrntMJ0.js} +9 -9
- package/dist/{register.maintenance-DMbs8w2m.js → register.maintenance-q9TelW4m.js} +8 -8
- package/dist/{register.message-BmsovYS6.js → register.message-CIpJNwpb.js} +3 -3
- package/dist/{register.message-Bp4SDXWk.js → register.message-gTJNayB2.js} +3 -3
- package/dist/{register.onboard-IMrHOeW_.js → register.onboard-CWYauTOU.js} +3 -3
- package/dist/{register.onboard-Cb8xLIye.js → register.onboard-CdLxC6e6.js} +3 -3
- package/dist/{register.setup-DU7IDzAv.js → register.setup-BCWevQ6z.js} +3 -3
- package/dist/{register.setup-CX8IUmew.js → register.setup-BVQjSCo7.js} +3 -3
- package/dist/{register.status-health-sessions-N6SFc-UY.js → register.status-health-sessions-7J5qMNiH.js} +4 -4
- package/dist/{register.status-health-sessions-CBPZoj51.js → register.status-health-sessions-D6Z0cWR2.js} +4 -4
- package/dist/{register.subclis-BIbL6FBV.js → register.subclis-CaQKvJ0R.js} +10 -10
- package/dist/{reply-CB1p166g.js → reply-lnANjYYy.js} +5 -5
- package/dist/{run-main-CpDZPsC_.js → run-main-fZjFwk8-.js} +15 -15
- package/dist/{run-with-concurrency-BFR3ReeF.js → run-with-concurrency-D05zyBvx.js} +3 -3
- package/dist/runtime-whatsapp-login.runtime-B4wlBpXd.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-Bw-aS4TH.js +22 -0
- package/dist/{send-Do7hKDL9.js → send-CVe_wjZr.js} +7 -7
- package/dist/{send-bW7jDv8D.js → send-DTmXRnXD.js} +14 -14
- package/dist/{send-DjL7KlMV.js → send-Dg2OQTBD.js} +8 -8
- package/dist/{send-C98RfcAb.js → send-Ds2QFFHB.js} +5 -5
- package/dist/{send-Co5Bqwuo.js → send-rtczuBFr.js} +6 -6
- package/dist/{server-node-events-Ctjzvlem.js → server-node-events-ByTGIHN6.js} +3 -3
- package/dist/{server-node-events-DrCKK0J4.js → server-node-events-CZSHLRjW.js} +3 -3
- package/dist/{session-QSn69XeJ.js → session-B-spPtFw.js} +4 -4
- package/dist/{skill-commands-Bi_jchJn.js → skill-commands-BU_EPKGI.js} +5 -5
- package/dist/{skills-CTV78w4q.js → skills-BMJJ-o7Q.js} +7 -7
- package/dist/slash-commands.runtime-BVe8kFs6.js +16 -0
- package/dist/slash-dispatch.runtime--zkPOYs8.js +56 -0
- package/dist/{slash-dispatch.runtime-uqWhoI6q.js → slash-dispatch.runtime-aOd34tJL.js} +2 -2
- package/dist/{slash-dispatch.runtime-DRGqAgwa.js → slash-dispatch.runtime-oqezzRLs.js} +2 -2
- package/dist/slash-skill-commands.runtime-DWkdPFic.js +20 -0
- package/dist/{status-BkfSGlOi.js → status-CLisA75R.js} +3 -3
- package/dist/{status-DdW571-j.js → status-DWG2unIb.js} +3 -3
- package/dist/{store-B89Hj8Ub.js → store-BZJ7k8zI.js} +2 -2
- package/dist/{subagent-registry-DGrfQVN3.js → subagent-registry-DIG5cv0C.js} +5 -5
- package/dist/{subagent-registry-runtime-Dsrz3yIh.js → subagent-registry-runtime-Cwu64xxS.js} +2 -2
- package/dist/subagent-registry-runtime-DcF6pbCz.js +56 -0
- package/dist/{subagent-registry-runtime-DatTO2LD.js → subagent-registry-runtime-Dn9NdIkG.js} +2 -2
- package/dist/{subsystem-6v7sWnAD.js → subsystem-DwbSi7gL.js} +2 -2
- package/dist/{tables-DGHzaXQz.js → tables-DCs7kcl5.js} +1 -1
- package/dist/{plugin-sdk/target-errors-aOwE-MIU.js → target-errors-p185Iwir.js} +2 -2
- package/dist/{thinking-SdNGqtJE.js → thinking-C7-zgrYU.js} +7 -7
- package/dist/{tokens-DfbMVF9y.js → tokens-B9Gk6Ss5.js} +1 -1
- package/dist/{tool-images-8BKrL7Bn.js → tool-images-gH3TaDhx.js} +2 -2
- package/dist/{update-cli-TQEfxhWF.js → update-cli-BOA7uNXd.js} +9 -9
- package/dist/{update-cli-BwhvSo1R.js → update-cli-CxWkuyMh.js} +10 -10
- package/dist/{update-runner-CT9YRLtn.js → update-runner-4xWzr8_S.js} +1 -1
- package/dist/{update-runner-CqVLeGYA.js → update-runner-CBzd_nJ6.js} +1 -1
- package/dist/{web-FqoNMI-k.js → web-B4plqfoT.js} +3 -3
- package/dist/{web-B2qXyOb9.js → web-COBpRjL9.js} +3 -3
- package/dist/{web-DyCuTR9b.js → web-DNTMnpXn.js} +53 -53
- package/dist/{whatsapp-actions-BDkbnZVH.js → whatsapp-actions-BcYHedDV.js} +19 -19
- package/dist/{workspace-kVMIaBrV.js → workspace-C1XiGBnY.js} +2 -2
- package/package.json +1 -1
- package/dist/api-key-rotation-BHFJiYbw.js +0 -181
- package/dist/deliver-runtime-_egya0QZ.js +0 -36
- package/dist/deps-send-discord.runtime-BRE0s2nz.js +0 -26
- package/dist/deps-send-imessage.runtime-DbIRBnmD.js +0 -25
- package/dist/deps-send-signal.runtime-B4h6X3o4.js +0 -24
- package/dist/deps-send-slack.runtime-BWXOnOxS.js +0 -22
- package/dist/deps-send-telegram.runtime-YvauJtgv.js +0 -27
- package/dist/deps-send-whatsapp.runtime-CiG6xd2e.js +0 -60
- package/dist/errors-kkRuS2Cs.js +0 -54
- package/dist/image-runtime-D7n4dID4.js +0 -29
- package/dist/manager-runtime-BMygJEz3.js +0 -18
- package/dist/pi-model-discovery-runtime-Dpu7Jm2L.js +0 -11
- package/dist/plugin-sdk/accounts-BNuRM3rG.js +0 -288
- package/dist/plugin-sdk/accounts-CGTYP7Rh.js +0 -46
- package/dist/plugin-sdk/accounts-CcS9IAhD.js +0 -35
- package/dist/plugin-sdk/active-listener-BQNrTcR3.js +0 -50
- package/dist/plugin-sdk/audio-preflight-CRGLqp-g.js +0 -69
- package/dist/plugin-sdk/audio-transcription-runner-RXsskMMk.js +0 -2176
- package/dist/plugin-sdk/audit-membership-runtime-B9b-zRwg.js +0 -58
- package/dist/plugin-sdk/channel-activity-gPvD1D7S.js +0 -94
- package/dist/plugin-sdk/channel-web-LGl1zPJt.js +0 -2256
- package/dist/plugin-sdk/chrome-9Y_LcUg1.js +0 -2415
- package/dist/plugin-sdk/commands-registry-CcdEPxVg.js +0 -1125
- package/dist/plugin-sdk/config-CrQ5bCrw.js +0 -17912
- package/dist/plugin-sdk/deliver-D3xr5AkB.js +0 -1694
- package/dist/plugin-sdk/deliver-runtime-B79ZQu69.js +0 -32
- package/dist/plugin-sdk/deliver-runtime-BdTC7uKE.js +0 -32
- package/dist/plugin-sdk/deps-send-discord.runtime-BOQZIqC8.js +0 -23
- package/dist/plugin-sdk/deps-send-discord.runtime-CObCNMt3.js +0 -23
- package/dist/plugin-sdk/deps-send-imessage.runtime-CuHOc9Ka.js +0 -22
- package/dist/plugin-sdk/deps-send-imessage.runtime-DlWgi2DH.js +0 -22
- package/dist/plugin-sdk/deps-send-signal.runtime-Cz7FT8J8.js +0 -21
- package/dist/plugin-sdk/deps-send-signal.runtime-iPynghkE.js +0 -21
- package/dist/plugin-sdk/deps-send-slack.runtime-D4vDoRsg.js +0 -19
- package/dist/plugin-sdk/deps-send-slack.runtime-DNTbE5jS.js +0 -19
- package/dist/plugin-sdk/deps-send-telegram.runtime-7CR-xtCF.js +0 -24
- package/dist/plugin-sdk/deps-send-telegram.runtime-DjTVED_m.js +0 -24
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-CRWOIKRC.js +0 -57
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-bUi8kghi.js +0 -57
- package/dist/plugin-sdk/diagnostic-BXkLYs_9.js +0 -319
- package/dist/plugin-sdk/fetch-guard-C55uvn27.js +0 -156
- package/dist/plugin-sdk/fs-safe-Dqmpk-Fr.js +0 -352
- package/dist/plugin-sdk/image-3xW7IJdq.js +0 -2310
- package/dist/plugin-sdk/image-ops-BjK2qZZn.js +0 -584
- package/dist/plugin-sdk/image-runtime-CZZJJqcW.js +0 -25
- package/dist/plugin-sdk/image-runtime-Cjz368oj.js +0 -25
- package/dist/plugin-sdk/ir-CS7uuQhN.js +0 -1296
- package/dist/plugin-sdk/local-roots-DmOKwiNW.js +0 -186
- package/dist/plugin-sdk/logger-DDdrdbDu.js +0 -1163
- package/dist/plugin-sdk/login-BSEeU27Y.js +0 -57
- package/dist/plugin-sdk/login-qr-BwWJsDSj.js +0 -320
- package/dist/plugin-sdk/manager-DiXPCubI.js +0 -3917
- package/dist/plugin-sdk/manager-runtime-CF55pBNe.js +0 -15
- package/dist/plugin-sdk/manager-runtime-Ct0m9UJC.js +0 -15
- package/dist/plugin-sdk/outbound-attachment-BoFx05zw.js +0 -19
- package/dist/plugin-sdk/outbound-cpqK1GFe.js +0 -212
- package/dist/plugin-sdk/path-alias-guards-DA0MhfkG.js +0 -43
- package/dist/plugin-sdk/paths-C6W4VHoa.js +0 -166
- package/dist/plugin-sdk/pi-embedded-helpers-C-B9B6Sp.js +0 -9627
- package/dist/plugin-sdk/pi-model-discovery-BGEeoPzN.js +0 -134
- package/dist/plugin-sdk/pi-model-discovery-runtime-BHZ_Htob.js +0 -8
- package/dist/plugin-sdk/pi-model-discovery-runtime-BrwtJHPU.js +0 -8
- package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-ByN_xThw.js +0 -354
- package/dist/plugin-sdk/plugins-D5cdn70e.js +0 -864
- package/dist/plugin-sdk/pw-ai-C_QOIuin.js +0 -1938
- package/dist/plugin-sdk/qmd-manager-6bozlfFg.js +0 -1448
- package/dist/plugin-sdk/query-expansion-eeVz_aEm.js +0 -1011
- package/dist/plugin-sdk/reply-CQUX_haM.js +0 -98828
- package/dist/plugin-sdk/resolve-outbound-target-Dbz0O8cR.js +0 -40
- package/dist/plugin-sdk/run-with-concurrency-5DMu9szx.js +0 -1994
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-DitS0I1z.js +0 -10
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-OthrtsLL.js +0 -10
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-CYCr6A3v.js +0 -19
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-Q2HL0zL3.js +0 -19
- package/dist/plugin-sdk/send-BACEu1Un.js +0 -414
- package/dist/plugin-sdk/send-BU4OoR7u.js +0 -2587
- package/dist/plugin-sdk/send-DbxOJ_BC.js +0 -3135
- package/dist/plugin-sdk/send-n932vjT5.js +0 -540
- package/dist/plugin-sdk/send-uCPS53j8.js +0 -503
- package/dist/plugin-sdk/session-DenDKR_-.js +0 -169
- package/dist/plugin-sdk/skill-commands-BK1KDKmS.js +0 -342
- package/dist/plugin-sdk/skills-D4am-zkO.js +0 -1428
- package/dist/plugin-sdk/slash-commands.runtime-Bx1K1iqP.js +0 -13
- package/dist/plugin-sdk/slash-commands.runtime-DWfFqMZw.js +0 -13
- package/dist/plugin-sdk/slash-dispatch.runtime-DVn338JI.js +0 -52
- package/dist/plugin-sdk/slash-dispatch.runtime-pnWH5AjM.js +0 -52
- package/dist/plugin-sdk/slash-skill-commands.runtime-Dbi_YzPO.js +0 -16
- package/dist/plugin-sdk/slash-skill-commands.runtime-DxvNWv_E.js +0 -16
- package/dist/plugin-sdk/ssrf-2WBi1Tzx.js +0 -202
- package/dist/plugin-sdk/store-BKDMuvyn.js +0 -81
- package/dist/plugin-sdk/subagent-registry-runtime-FhP0l-Rw.js +0 -52
- package/dist/plugin-sdk/subagent-registry-runtime-hH9ADku1.js +0 -52
- package/dist/plugin-sdk/tables-CrDYcv_b.js +0 -55
- package/dist/plugin-sdk/thinking-D41FMh9T.js +0 -1206
- package/dist/plugin-sdk/tokens-CTIYTLWu.js +0 -52
- package/dist/plugin-sdk/tool-images-CWc54lpI.js +0 -274
- package/dist/plugin-sdk/web-AtEy-48y.js +0 -56
- package/dist/plugin-sdk/web-DjKONHqF.js +0 -56
- package/dist/plugin-sdk/whatsapp-actions-DEZcm_CZ.js +0 -80
- package/dist/proxy-fetch-lH6RsRTE.js +0 -38
- package/dist/redact-DvzicBMu.js +0 -319
- package/dist/runtime-whatsapp-login.runtime-DSR-m0FW.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-Blywd_bv.js +0 -22
- package/dist/slash-commands.runtime-63MUmCBt.js +0 -16
- package/dist/slash-dispatch.runtime-DuJRl-LD.js +0 -56
- package/dist/slash-skill-commands.runtime-B3MSSAQ-.js +0 -20
- package/dist/subagent-registry-runtime-COygB9b1.js +0 -56
- package/dist/target-errors-CweAa7L9.js +0 -195
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { Er as ensureAuthProfileStore, jn as normalizeProviderId } from "./config-CrQ5bCrw.js";
|
|
3
|
-
import fs from "node:fs";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import * as PiCodingAgent from "@mariozechner/pi-coding-agent";
|
|
6
|
-
|
|
7
|
-
//#region src/agents/pi-auth-credentials.ts
|
|
8
|
-
function convertAuthProfileCredentialToPi(cred) {
|
|
9
|
-
if (cred.type === "api_key") {
|
|
10
|
-
const key = typeof cred.key === "string" ? cred.key.trim() : "";
|
|
11
|
-
if (!key) return null;
|
|
12
|
-
return {
|
|
13
|
-
type: "api_key",
|
|
14
|
-
key
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
if (cred.type === "token") {
|
|
18
|
-
const token = typeof cred.token === "string" ? cred.token.trim() : "";
|
|
19
|
-
if (!token) return null;
|
|
20
|
-
if (typeof cred.expires === "number" && Number.isFinite(cred.expires) && Date.now() >= cred.expires) return null;
|
|
21
|
-
return {
|
|
22
|
-
type: "api_key",
|
|
23
|
-
key: token
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
if (cred.type === "oauth") {
|
|
27
|
-
const access = typeof cred.access === "string" ? cred.access.trim() : "";
|
|
28
|
-
const refresh = typeof cred.refresh === "string" ? cred.refresh.trim() : "";
|
|
29
|
-
if (!access || !refresh || !Number.isFinite(cred.expires) || cred.expires <= 0) return null;
|
|
30
|
-
return {
|
|
31
|
-
type: "oauth",
|
|
32
|
-
access,
|
|
33
|
-
refresh,
|
|
34
|
-
expires: cred.expires
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
return null;
|
|
38
|
-
}
|
|
39
|
-
function resolvePiCredentialMapFromStore(store) {
|
|
40
|
-
const credentials = {};
|
|
41
|
-
for (const credential of Object.values(store.profiles)) {
|
|
42
|
-
const provider = normalizeProviderId(String(credential.provider ?? "")).trim();
|
|
43
|
-
if (!provider || credentials[provider]) continue;
|
|
44
|
-
const converted = convertAuthProfileCredentialToPi(credential);
|
|
45
|
-
if (converted) credentials[provider] = converted;
|
|
46
|
-
}
|
|
47
|
-
return credentials;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
//#endregion
|
|
51
|
-
//#region src/agents/pi-model-discovery.ts
|
|
52
|
-
var pi_model_discovery_exports = /* @__PURE__ */ __exportAll({
|
|
53
|
-
AuthStorage: () => PiAuthStorageClass,
|
|
54
|
-
ModelRegistry: () => PiModelRegistryClass,
|
|
55
|
-
discoverAuthStorage: () => discoverAuthStorage,
|
|
56
|
-
discoverModels: () => discoverModels
|
|
57
|
-
});
|
|
58
|
-
const PiAuthStorageClass = PiCodingAgent.AuthStorage;
|
|
59
|
-
const PiModelRegistryClass = PiCodingAgent.ModelRegistry;
|
|
60
|
-
function createInMemoryAuthStorageBackend(initialData) {
|
|
61
|
-
let snapshot = JSON.stringify(initialData, null, 2);
|
|
62
|
-
return { withLock(update) {
|
|
63
|
-
const { result, next } = update(snapshot);
|
|
64
|
-
if (typeof next === "string") snapshot = next;
|
|
65
|
-
return result;
|
|
66
|
-
} };
|
|
67
|
-
}
|
|
68
|
-
function isRecord(value) {
|
|
69
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
70
|
-
}
|
|
71
|
-
function scrubLegacyStaticAuthJsonEntries(pathname) {
|
|
72
|
-
if (process.env.SQUIDCLAW_AUTH_STORE_READONLY === "1") return;
|
|
73
|
-
if (!fs.existsSync(pathname)) return;
|
|
74
|
-
let parsed;
|
|
75
|
-
try {
|
|
76
|
-
parsed = JSON.parse(fs.readFileSync(pathname, "utf8"));
|
|
77
|
-
} catch {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (!isRecord(parsed)) return;
|
|
81
|
-
let changed = false;
|
|
82
|
-
for (const [provider, value] of Object.entries(parsed)) {
|
|
83
|
-
if (!isRecord(value)) continue;
|
|
84
|
-
if (value.type !== "api_key") continue;
|
|
85
|
-
delete parsed[provider];
|
|
86
|
-
changed = true;
|
|
87
|
-
}
|
|
88
|
-
if (!changed) return;
|
|
89
|
-
if (Object.keys(parsed).length === 0) {
|
|
90
|
-
fs.rmSync(pathname, { force: true });
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
fs.writeFileSync(pathname, `${JSON.stringify(parsed, null, 2)}\n`, "utf8");
|
|
94
|
-
fs.chmodSync(pathname, 384);
|
|
95
|
-
}
|
|
96
|
-
function createAuthStorage(AuthStorageLike, path, creds) {
|
|
97
|
-
const withInMemory = AuthStorageLike;
|
|
98
|
-
if (typeof withInMemory.inMemory === "function") return withInMemory.inMemory(creds);
|
|
99
|
-
const withFromStorage = AuthStorageLike;
|
|
100
|
-
if (typeof withFromStorage.fromStorage === "function") {
|
|
101
|
-
const backendCtor = PiCodingAgent.InMemoryAuthStorageBackend;
|
|
102
|
-
const backend = typeof backendCtor === "function" ? new backendCtor() : createInMemoryAuthStorageBackend(creds);
|
|
103
|
-
backend.withLock(() => ({
|
|
104
|
-
result: void 0,
|
|
105
|
-
next: JSON.stringify(creds, null, 2)
|
|
106
|
-
}));
|
|
107
|
-
return withFromStorage.fromStorage(backend);
|
|
108
|
-
}
|
|
109
|
-
const withFactory = AuthStorageLike;
|
|
110
|
-
const withRuntimeOverride = typeof withFactory.create === "function" ? withFactory.create(path) : new AuthStorageLike(path);
|
|
111
|
-
if (typeof withRuntimeOverride.setRuntimeApiKey === "function") for (const [provider, credential] of Object.entries(creds)) {
|
|
112
|
-
if (credential.type === "api_key") {
|
|
113
|
-
withRuntimeOverride.setRuntimeApiKey(provider, credential.key);
|
|
114
|
-
continue;
|
|
115
|
-
}
|
|
116
|
-
withRuntimeOverride.setRuntimeApiKey(provider, credential.access);
|
|
117
|
-
}
|
|
118
|
-
return withRuntimeOverride;
|
|
119
|
-
}
|
|
120
|
-
function resolvePiCredentials(agentDir) {
|
|
121
|
-
return resolvePiCredentialMapFromStore(ensureAuthProfileStore(agentDir, { allowKeychainPrompt: false }));
|
|
122
|
-
}
|
|
123
|
-
function discoverAuthStorage(agentDir) {
|
|
124
|
-
const credentials = resolvePiCredentials(agentDir);
|
|
125
|
-
const authPath = path.join(agentDir, "auth.json");
|
|
126
|
-
scrubLegacyStaticAuthJsonEntries(authPath);
|
|
127
|
-
return createAuthStorage(PiAuthStorageClass, authPath, credentials);
|
|
128
|
-
}
|
|
129
|
-
function discoverModels(authStorage, agentDir) {
|
|
130
|
-
return new PiModelRegistryClass(authStorage, path.join(agentDir, "models.json"));
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
//#endregion
|
|
134
|
-
export { discoverModels as n, pi_model_discovery_exports as r, discoverAuthStorage as t };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-5DMu9szx.js";
|
|
2
|
-
import "./paths-8xF5kDne.js";
|
|
3
|
-
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
4
|
-
import "./config-CrQ5bCrw.js";
|
|
5
|
-
import "./logger-DDdrdbDu.js";
|
|
6
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-BGEeoPzN.js";
|
|
7
|
-
|
|
8
|
-
export { discoverAuthStorage, discoverModels };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-kVooFCVo.js";
|
|
2
|
-
import "./config-DYbtdrsT.js";
|
|
3
|
-
import "./logger-Bg4vIUJn.js";
|
|
4
|
-
import "./paths-Duwviem_.js";
|
|
5
|
-
import "./github-copilot-token-C0y6vp3r.js";
|
|
6
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-Mk0GTDJl.js";
|
|
7
|
-
|
|
8
|
-
export { discoverAuthStorage, discoverModels };
|
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
import "./run-with-concurrency-5DMu9szx.js";
|
|
2
|
-
import "./paths-8xF5kDne.js";
|
|
3
|
-
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
4
|
-
import "./config-CrQ5bCrw.js";
|
|
5
|
-
import { P as isPlainObject, a as createSubsystemLogger } from "./logger-DDdrdbDu.js";
|
|
6
|
-
import { p as getDiagnosticSessionState, s as logToolLoopAction } from "./diagnostic-BXkLYs_9.js";
|
|
7
|
-
import { createHash } from "node:crypto";
|
|
8
|
-
|
|
9
|
-
//#region src/agents/tool-loop-detection.ts
|
|
10
|
-
const log = createSubsystemLogger("agents/loop-detection");
|
|
11
|
-
const TOOL_CALL_HISTORY_SIZE = 30;
|
|
12
|
-
const WARNING_THRESHOLD = 10;
|
|
13
|
-
const CRITICAL_THRESHOLD = 20;
|
|
14
|
-
const GLOBAL_CIRCUIT_BREAKER_THRESHOLD = 30;
|
|
15
|
-
const DEFAULT_LOOP_DETECTION_CONFIG = {
|
|
16
|
-
enabled: false,
|
|
17
|
-
historySize: TOOL_CALL_HISTORY_SIZE,
|
|
18
|
-
warningThreshold: WARNING_THRESHOLD,
|
|
19
|
-
criticalThreshold: CRITICAL_THRESHOLD,
|
|
20
|
-
globalCircuitBreakerThreshold: GLOBAL_CIRCUIT_BREAKER_THRESHOLD,
|
|
21
|
-
detectors: {
|
|
22
|
-
genericRepeat: true,
|
|
23
|
-
knownPollNoProgress: true,
|
|
24
|
-
pingPong: true
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
function asPositiveInt(value, fallback) {
|
|
28
|
-
if (typeof value !== "number" || !Number.isInteger(value) || value <= 0) return fallback;
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
|
-
function resolveLoopDetectionConfig(config) {
|
|
32
|
-
let warningThreshold = asPositiveInt(config?.warningThreshold, DEFAULT_LOOP_DETECTION_CONFIG.warningThreshold);
|
|
33
|
-
let criticalThreshold = asPositiveInt(config?.criticalThreshold, DEFAULT_LOOP_DETECTION_CONFIG.criticalThreshold);
|
|
34
|
-
let globalCircuitBreakerThreshold = asPositiveInt(config?.globalCircuitBreakerThreshold, DEFAULT_LOOP_DETECTION_CONFIG.globalCircuitBreakerThreshold);
|
|
35
|
-
if (criticalThreshold <= warningThreshold) criticalThreshold = warningThreshold + 1;
|
|
36
|
-
if (globalCircuitBreakerThreshold <= criticalThreshold) globalCircuitBreakerThreshold = criticalThreshold + 1;
|
|
37
|
-
return {
|
|
38
|
-
enabled: config?.enabled ?? DEFAULT_LOOP_DETECTION_CONFIG.enabled,
|
|
39
|
-
historySize: asPositiveInt(config?.historySize, DEFAULT_LOOP_DETECTION_CONFIG.historySize),
|
|
40
|
-
warningThreshold,
|
|
41
|
-
criticalThreshold,
|
|
42
|
-
globalCircuitBreakerThreshold,
|
|
43
|
-
detectors: {
|
|
44
|
-
genericRepeat: config?.detectors?.genericRepeat ?? DEFAULT_LOOP_DETECTION_CONFIG.detectors.genericRepeat,
|
|
45
|
-
knownPollNoProgress: config?.detectors?.knownPollNoProgress ?? DEFAULT_LOOP_DETECTION_CONFIG.detectors.knownPollNoProgress,
|
|
46
|
-
pingPong: config?.detectors?.pingPong ?? DEFAULT_LOOP_DETECTION_CONFIG.detectors.pingPong
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Hash a tool call for pattern matching.
|
|
52
|
-
* Uses tool name + deterministic JSON serialization digest of params.
|
|
53
|
-
*/
|
|
54
|
-
function hashToolCall(toolName, params) {
|
|
55
|
-
return `${toolName}:${digestStable(params)}`;
|
|
56
|
-
}
|
|
57
|
-
function stableStringify(value) {
|
|
58
|
-
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
59
|
-
if (Array.isArray(value)) return `[${value.map(stableStringify).join(",")}]`;
|
|
60
|
-
const obj = value;
|
|
61
|
-
return `{${Object.keys(obj).toSorted().map((k) => `${JSON.stringify(k)}:${stableStringify(obj[k])}`).join(",")}}`;
|
|
62
|
-
}
|
|
63
|
-
function digestStable(value) {
|
|
64
|
-
const serialized = stableStringifyFallback(value);
|
|
65
|
-
return createHash("sha256").update(serialized).digest("hex");
|
|
66
|
-
}
|
|
67
|
-
function stableStringifyFallback(value) {
|
|
68
|
-
try {
|
|
69
|
-
return stableStringify(value);
|
|
70
|
-
} catch {
|
|
71
|
-
if (value === null || value === void 0) return `${value}`;
|
|
72
|
-
if (typeof value === "string") return value;
|
|
73
|
-
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") return `${value}`;
|
|
74
|
-
if (value instanceof Error) return `${value.name}:${value.message}`;
|
|
75
|
-
return Object.prototype.toString.call(value);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
function isKnownPollToolCall(toolName, params) {
|
|
79
|
-
if (toolName === "command_status") return true;
|
|
80
|
-
if (toolName !== "process" || !isPlainObject(params)) return false;
|
|
81
|
-
const action = params.action;
|
|
82
|
-
return action === "poll" || action === "log";
|
|
83
|
-
}
|
|
84
|
-
function extractTextContent(result) {
|
|
85
|
-
if (!isPlainObject(result) || !Array.isArray(result.content)) return "";
|
|
86
|
-
return result.content.filter((entry) => isPlainObject(entry) && typeof entry.type === "string" && typeof entry.text === "string").map((entry) => entry.text).join("\n").trim();
|
|
87
|
-
}
|
|
88
|
-
function formatErrorForHash(error) {
|
|
89
|
-
if (error instanceof Error) return error.message || error.name;
|
|
90
|
-
if (typeof error === "string") return error;
|
|
91
|
-
if (typeof error === "number" || typeof error === "boolean" || typeof error === "bigint") return `${error}`;
|
|
92
|
-
return stableStringify(error);
|
|
93
|
-
}
|
|
94
|
-
function hashToolOutcome(toolName, params, result, error) {
|
|
95
|
-
if (error !== void 0) return `error:${digestStable(formatErrorForHash(error))}`;
|
|
96
|
-
if (!isPlainObject(result)) return result === void 0 ? void 0 : digestStable(result);
|
|
97
|
-
const details = isPlainObject(result.details) ? result.details : {};
|
|
98
|
-
const text = extractTextContent(result);
|
|
99
|
-
if (isKnownPollToolCall(toolName, params) && toolName === "process" && isPlainObject(params)) {
|
|
100
|
-
const action = params.action;
|
|
101
|
-
if (action === "poll") return digestStable({
|
|
102
|
-
action,
|
|
103
|
-
status: details.status,
|
|
104
|
-
exitCode: details.exitCode ?? null,
|
|
105
|
-
exitSignal: details.exitSignal ?? null,
|
|
106
|
-
aggregated: details.aggregated ?? null,
|
|
107
|
-
text
|
|
108
|
-
});
|
|
109
|
-
if (action === "log") return digestStable({
|
|
110
|
-
action,
|
|
111
|
-
status: details.status,
|
|
112
|
-
totalLines: details.totalLines ?? null,
|
|
113
|
-
totalChars: details.totalChars ?? null,
|
|
114
|
-
truncated: details.truncated ?? null,
|
|
115
|
-
exitCode: details.exitCode ?? null,
|
|
116
|
-
exitSignal: details.exitSignal ?? null,
|
|
117
|
-
text
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
return digestStable({
|
|
121
|
-
details,
|
|
122
|
-
text
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
function getNoProgressStreak(history, toolName, argsHash) {
|
|
126
|
-
let streak = 0;
|
|
127
|
-
let latestResultHash;
|
|
128
|
-
for (let i = history.length - 1; i >= 0; i -= 1) {
|
|
129
|
-
const record = history[i];
|
|
130
|
-
if (!record || record.toolName !== toolName || record.argsHash !== argsHash) continue;
|
|
131
|
-
if (typeof record.resultHash !== "string" || !record.resultHash) continue;
|
|
132
|
-
if (!latestResultHash) {
|
|
133
|
-
latestResultHash = record.resultHash;
|
|
134
|
-
streak = 1;
|
|
135
|
-
continue;
|
|
136
|
-
}
|
|
137
|
-
if (record.resultHash !== latestResultHash) break;
|
|
138
|
-
streak += 1;
|
|
139
|
-
}
|
|
140
|
-
return {
|
|
141
|
-
count: streak,
|
|
142
|
-
latestResultHash
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
function getPingPongStreak(history, currentSignature) {
|
|
146
|
-
const last = history.at(-1);
|
|
147
|
-
if (!last) return {
|
|
148
|
-
count: 0,
|
|
149
|
-
noProgressEvidence: false
|
|
150
|
-
};
|
|
151
|
-
let otherSignature;
|
|
152
|
-
let otherToolName;
|
|
153
|
-
for (let i = history.length - 2; i >= 0; i -= 1) {
|
|
154
|
-
const call = history[i];
|
|
155
|
-
if (!call) continue;
|
|
156
|
-
if (call.argsHash !== last.argsHash) {
|
|
157
|
-
otherSignature = call.argsHash;
|
|
158
|
-
otherToolName = call.toolName;
|
|
159
|
-
break;
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
if (!otherSignature || !otherToolName) return {
|
|
163
|
-
count: 0,
|
|
164
|
-
noProgressEvidence: false
|
|
165
|
-
};
|
|
166
|
-
let alternatingTailCount = 0;
|
|
167
|
-
for (let i = history.length - 1; i >= 0; i -= 1) {
|
|
168
|
-
const call = history[i];
|
|
169
|
-
if (!call) continue;
|
|
170
|
-
const expected = alternatingTailCount % 2 === 0 ? last.argsHash : otherSignature;
|
|
171
|
-
if (call.argsHash !== expected) break;
|
|
172
|
-
alternatingTailCount += 1;
|
|
173
|
-
}
|
|
174
|
-
if (alternatingTailCount < 2) return {
|
|
175
|
-
count: 0,
|
|
176
|
-
noProgressEvidence: false
|
|
177
|
-
};
|
|
178
|
-
if (currentSignature !== otherSignature) return {
|
|
179
|
-
count: 0,
|
|
180
|
-
noProgressEvidence: false
|
|
181
|
-
};
|
|
182
|
-
const tailStart = Math.max(0, history.length - alternatingTailCount);
|
|
183
|
-
let firstHashA;
|
|
184
|
-
let firstHashB;
|
|
185
|
-
let noProgressEvidence = true;
|
|
186
|
-
for (let i = tailStart; i < history.length; i += 1) {
|
|
187
|
-
const call = history[i];
|
|
188
|
-
if (!call) continue;
|
|
189
|
-
if (!call.resultHash) {
|
|
190
|
-
noProgressEvidence = false;
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
if (call.argsHash === last.argsHash) {
|
|
194
|
-
if (!firstHashA) firstHashA = call.resultHash;
|
|
195
|
-
else if (firstHashA !== call.resultHash) {
|
|
196
|
-
noProgressEvidence = false;
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
if (call.argsHash === otherSignature) {
|
|
202
|
-
if (!firstHashB) firstHashB = call.resultHash;
|
|
203
|
-
else if (firstHashB !== call.resultHash) {
|
|
204
|
-
noProgressEvidence = false;
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
continue;
|
|
208
|
-
}
|
|
209
|
-
noProgressEvidence = false;
|
|
210
|
-
break;
|
|
211
|
-
}
|
|
212
|
-
if (!firstHashA || !firstHashB) noProgressEvidence = false;
|
|
213
|
-
return {
|
|
214
|
-
count: alternatingTailCount + 1,
|
|
215
|
-
pairedToolName: last.toolName,
|
|
216
|
-
pairedSignature: last.argsHash,
|
|
217
|
-
noProgressEvidence
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
function canonicalPairKey(signatureA, signatureB) {
|
|
221
|
-
return [signatureA, signatureB].toSorted().join("|");
|
|
222
|
-
}
|
|
223
|
-
/**
|
|
224
|
-
* Detect if an agent is stuck in a repetitive tool call loop.
|
|
225
|
-
* Checks if the same tool+params combination has been called excessively.
|
|
226
|
-
*/
|
|
227
|
-
function detectToolCallLoop(state, toolName, params, config) {
|
|
228
|
-
const resolvedConfig = resolveLoopDetectionConfig(config);
|
|
229
|
-
if (!resolvedConfig.enabled) return { stuck: false };
|
|
230
|
-
const history = state.toolCallHistory ?? [];
|
|
231
|
-
const currentHash = hashToolCall(toolName, params);
|
|
232
|
-
const noProgress = getNoProgressStreak(history, toolName, currentHash);
|
|
233
|
-
const noProgressStreak = noProgress.count;
|
|
234
|
-
const knownPollTool = isKnownPollToolCall(toolName, params);
|
|
235
|
-
const pingPong = getPingPongStreak(history, currentHash);
|
|
236
|
-
if (noProgressStreak >= resolvedConfig.globalCircuitBreakerThreshold) {
|
|
237
|
-
log.error(`Global circuit breaker triggered: ${toolName} repeated ${noProgressStreak} times with no progress`);
|
|
238
|
-
return {
|
|
239
|
-
stuck: true,
|
|
240
|
-
level: "critical",
|
|
241
|
-
detector: "global_circuit_breaker",
|
|
242
|
-
count: noProgressStreak,
|
|
243
|
-
message: `CRITICAL: ${toolName} has repeated identical no-progress outcomes ${noProgressStreak} times. Session execution blocked by global circuit breaker to prevent runaway loops.`,
|
|
244
|
-
warningKey: `global:${toolName}:${currentHash}:${noProgress.latestResultHash ?? "none"}`
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
if (knownPollTool && resolvedConfig.detectors.knownPollNoProgress && noProgressStreak >= resolvedConfig.criticalThreshold) {
|
|
248
|
-
log.error(`Critical polling loop detected: ${toolName} repeated ${noProgressStreak} times`);
|
|
249
|
-
return {
|
|
250
|
-
stuck: true,
|
|
251
|
-
level: "critical",
|
|
252
|
-
detector: "known_poll_no_progress",
|
|
253
|
-
count: noProgressStreak,
|
|
254
|
-
message: `CRITICAL: Called ${toolName} with identical arguments and no progress ${noProgressStreak} times. This appears to be a stuck polling loop. Session execution blocked to prevent resource waste.`,
|
|
255
|
-
warningKey: `poll:${toolName}:${currentHash}:${noProgress.latestResultHash ?? "none"}`
|
|
256
|
-
};
|
|
257
|
-
}
|
|
258
|
-
if (knownPollTool && resolvedConfig.detectors.knownPollNoProgress && noProgressStreak >= resolvedConfig.warningThreshold) {
|
|
259
|
-
log.warn(`Polling loop warning: ${toolName} repeated ${noProgressStreak} times`);
|
|
260
|
-
return {
|
|
261
|
-
stuck: true,
|
|
262
|
-
level: "warning",
|
|
263
|
-
detector: "known_poll_no_progress",
|
|
264
|
-
count: noProgressStreak,
|
|
265
|
-
message: `WARNING: You have called ${toolName} ${noProgressStreak} times with identical arguments and no progress. Stop polling and either (1) increase wait time between checks, or (2) report the task as failed if the process is stuck.`,
|
|
266
|
-
warningKey: `poll:${toolName}:${currentHash}:${noProgress.latestResultHash ?? "none"}`
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
const pingPongWarningKey = pingPong.pairedSignature ? `pingpong:${canonicalPairKey(currentHash, pingPong.pairedSignature)}` : `pingpong:${toolName}:${currentHash}`;
|
|
270
|
-
if (resolvedConfig.detectors.pingPong && pingPong.count >= resolvedConfig.criticalThreshold && pingPong.noProgressEvidence) {
|
|
271
|
-
log.error(`Critical ping-pong loop detected: alternating calls count=${pingPong.count} currentTool=${toolName}`);
|
|
272
|
-
return {
|
|
273
|
-
stuck: true,
|
|
274
|
-
level: "critical",
|
|
275
|
-
detector: "ping_pong",
|
|
276
|
-
count: pingPong.count,
|
|
277
|
-
message: `CRITICAL: You are alternating between repeated tool-call patterns (${pingPong.count} consecutive calls) with no progress. This appears to be a stuck ping-pong loop. Session execution blocked to prevent resource waste.`,
|
|
278
|
-
pairedToolName: pingPong.pairedToolName,
|
|
279
|
-
warningKey: pingPongWarningKey
|
|
280
|
-
};
|
|
281
|
-
}
|
|
282
|
-
if (resolvedConfig.detectors.pingPong && pingPong.count >= resolvedConfig.warningThreshold) {
|
|
283
|
-
log.warn(`Ping-pong loop warning: alternating calls count=${pingPong.count} currentTool=${toolName}`);
|
|
284
|
-
return {
|
|
285
|
-
stuck: true,
|
|
286
|
-
level: "warning",
|
|
287
|
-
detector: "ping_pong",
|
|
288
|
-
count: pingPong.count,
|
|
289
|
-
message: `WARNING: You are alternating between repeated tool-call patterns (${pingPong.count} consecutive calls). This looks like a ping-pong loop; stop retrying and report the task as failed.`,
|
|
290
|
-
pairedToolName: pingPong.pairedToolName,
|
|
291
|
-
warningKey: pingPongWarningKey
|
|
292
|
-
};
|
|
293
|
-
}
|
|
294
|
-
const recentCount = history.filter((h) => h.toolName === toolName && h.argsHash === currentHash).length;
|
|
295
|
-
if (!knownPollTool && resolvedConfig.detectors.genericRepeat && recentCount >= resolvedConfig.warningThreshold) {
|
|
296
|
-
log.warn(`Loop warning: ${toolName} called ${recentCount} times with identical arguments`);
|
|
297
|
-
return {
|
|
298
|
-
stuck: true,
|
|
299
|
-
level: "warning",
|
|
300
|
-
detector: "generic_repeat",
|
|
301
|
-
count: recentCount,
|
|
302
|
-
message: `WARNING: You have called ${toolName} ${recentCount} times with identical arguments. If this is not making progress, stop retrying and report the task as failed.`,
|
|
303
|
-
warningKey: `generic:${toolName}:${currentHash}`
|
|
304
|
-
};
|
|
305
|
-
}
|
|
306
|
-
return { stuck: false };
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Record a tool call in the session's history for loop detection.
|
|
310
|
-
* Maintains sliding window of last N calls.
|
|
311
|
-
*/
|
|
312
|
-
function recordToolCall(state, toolName, params, toolCallId, config) {
|
|
313
|
-
const resolvedConfig = resolveLoopDetectionConfig(config);
|
|
314
|
-
if (!state.toolCallHistory) state.toolCallHistory = [];
|
|
315
|
-
state.toolCallHistory.push({
|
|
316
|
-
toolName,
|
|
317
|
-
argsHash: hashToolCall(toolName, params),
|
|
318
|
-
toolCallId,
|
|
319
|
-
timestamp: Date.now()
|
|
320
|
-
});
|
|
321
|
-
if (state.toolCallHistory.length > resolvedConfig.historySize) state.toolCallHistory.shift();
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Record a completed tool call outcome so loop detection can identify no-progress repeats.
|
|
325
|
-
*/
|
|
326
|
-
function recordToolCallOutcome(state, params) {
|
|
327
|
-
const resolvedConfig = resolveLoopDetectionConfig(params.config);
|
|
328
|
-
const resultHash = hashToolOutcome(params.toolName, params.toolParams, params.result, params.error);
|
|
329
|
-
if (!resultHash) return;
|
|
330
|
-
if (!state.toolCallHistory) state.toolCallHistory = [];
|
|
331
|
-
const argsHash = hashToolCall(params.toolName, params.toolParams);
|
|
332
|
-
let matched = false;
|
|
333
|
-
for (let i = state.toolCallHistory.length - 1; i >= 0; i -= 1) {
|
|
334
|
-
const call = state.toolCallHistory[i];
|
|
335
|
-
if (!call) continue;
|
|
336
|
-
if (params.toolCallId && call.toolCallId !== params.toolCallId) continue;
|
|
337
|
-
if (call.toolName !== params.toolName || call.argsHash !== argsHash) continue;
|
|
338
|
-
if (call.resultHash !== void 0) continue;
|
|
339
|
-
call.resultHash = resultHash;
|
|
340
|
-
matched = true;
|
|
341
|
-
break;
|
|
342
|
-
}
|
|
343
|
-
if (!matched) state.toolCallHistory.push({
|
|
344
|
-
toolName: params.toolName,
|
|
345
|
-
argsHash,
|
|
346
|
-
toolCallId: params.toolCallId,
|
|
347
|
-
resultHash,
|
|
348
|
-
timestamp: Date.now()
|
|
349
|
-
});
|
|
350
|
-
if (state.toolCallHistory.length > resolvedConfig.historySize) state.toolCallHistory.splice(0, state.toolCallHistory.length - resolvedConfig.historySize);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
//#endregion
|
|
354
|
-
export { detectToolCallLoop, getDiagnosticSessionState, logToolLoopAction, recordToolCall, recordToolCallOutcome };
|