squidclaw 3.0.33 → 3.0.34
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-BFS_qklA.js → accounts-CB2Or0mr.js} +2 -2
- package/dist/{accounts-DfrJiFJJ.js → accounts-Cop2dSRo.js} +2 -2
- package/dist/{accounts-pMDX8iho.js → accounts-CqITV0Ga.js} +4 -4
- package/dist/{acp-cli-BeT7oXUu.js → acp-cli-Cgh0knV4.js} +2 -2
- package/dist/{active-listener-CH2vJ3EZ.js → active-listener-B6G6kmsb.js} +2 -2
- package/dist/{agents.config-Cav8LwTL.js → agents.config-DOZdl-eO.js} +1 -1
- package/dist/{api-key-rotation-DCBXT0v7.js → api-key-rotation-Da2qYrP7.js} +2 -2
- package/dist/{audio-preflight-WUW8KeL4.js → audio-preflight-CB33NBGY.js} +6 -6
- package/dist/{audio-preflight-Ckq8A2xS.js → audio-preflight-CXP7KNn_.js} +4 -4
- package/dist/{audio-preflight-B5XvcdFX.js → audio-preflight-yiMsGLW7.js} +30 -30
- package/dist/{audio-transcription-runner-Bd34S1mx.js → audio-transcription-runner-BOxTuqbS.js} +1 -1
- package/dist/{audio-transcription-runner-BkEXZq6_.js → audio-transcription-runner-CCZC5tJf.js} +1 -1
- package/dist/{audio-transcription-runner-DUC0ItDY.js → audio-transcription-runner-Mha07yP4.js} +12 -12
- package/dist/{audit-CL1tJbCc.js → audit-BhpEYysK.js} +6 -6
- package/dist/{audit-membership-runtime-czdecfjJ.js → audit-membership-runtime-By9-qSwl.js} +3 -3
- package/dist/{auth-choice-CbIT_f15.js → auth-choice-CW-WPa0J.js} +2 -2
- package/dist/{browser-cli-Bjw4bzsY.js → browser-cli-BsOTPzD6.js} +3 -3
- 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/HOOK.md +2 -1
- package/dist/bundled/session-memory/handler.js +142 -55
- package/dist/{call-BZMmsZnA.js → call-CsRvPUMG.js} +1 -1
- package/dist/{channel-activity-7QMEKenc.js → channel-activity-Du1kh0t3.js} +3 -3
- package/dist/{channel-options-ByYVebwk.js → channel-options-DiLSWw11.js} +1 -1
- package/dist/{channel-web-DRCZstY9.js → channel-web-B9qThdZn.js} +3 -3
- package/dist/{channels-cli-fZ8vLR-3.js → channels-cli-DPzzCs8D.js} +21 -21
- package/dist/{chrome-B3h5980A.js → chrome-AmH-OPlL.js} +8 -8
- package/dist/{chrome-BTwG9Gvh.js → chrome-C2CliEWR.js} +15 -15
- package/dist/{chrome-uzcvgAW9.js → chrome-DLZaNSqV.js} +8 -8
- package/dist/{clawbot-cli-Aal6iAhy.js → clawbot-cli-Y6f5RzmX.js} +4 -4
- package/dist/{cli-DDzqaV2x.js → cli-Cegwo5rc.js} +16 -16
- package/dist/{client-gy8bx9Xy.js → client-DYXM5N_N.js} +4 -4
- package/dist/{command-secret-targets-QzzK0cvw.js → command-secret-targets-4lxt7RD_.js} +2 -2
- package/dist/{commands-registry-BIi1tG__.js → commands-registry-6jWzz0mk.js} +4 -4
- package/dist/{completion-cli-cvF7VIAg.js → completion-cli-BLY0f3DS.js} +1 -1
- package/dist/{config-cli-BeARZFf8.js → config-cli-B7X83S8T.js} +1 -1
- package/dist/{configure-D3v5-GDg.js → configure-Hiahxtwa.js} +6 -6
- package/dist/{cron-cli-DjN_8kik.js → cron-cli-DIoOoMCm.js} +3 -3
- package/dist/{daemon-cli-D-GtS9tA.js → daemon-cli-DyGOGB4b.js} +2 -2
- package/dist/{deliver-KuyvhwaK.js → deliver-Baa4v4N-.js} +1 -1
- package/dist/{deliver-e7dtX7aI.js → deliver-DGXG0w_w.js} +1 -1
- package/dist/{deliver-DZCNXFM8.js → deliver-Ddw3EsOV.js} +11 -11
- package/dist/deliver-runtime-CF9aNwHW.js +36 -0
- package/dist/{deliver-runtime-CJeRn4Mi.js → deliver-runtime-Cld2SPeU.js} +5 -5
- package/dist/{deliver-runtime-DPjMYovi.js → deliver-runtime-Do2EXjHh.js} +3 -3
- package/dist/deps-send-discord.runtime-BdlL7AnG.js +26 -0
- package/dist/deps-send-imessage.runtime-BQx5JSa_.js +25 -0
- package/dist/deps-send-signal.runtime-dgrmoRN9.js +24 -0
- package/dist/deps-send-slack.runtime-CCOjVEQr.js +22 -0
- package/dist/deps-send-telegram.runtime-BgwTF5zt.js +27 -0
- package/dist/deps-send-whatsapp.runtime-C_zE7G9V.js +60 -0
- package/dist/{deps-send-whatsapp.runtime-B155kzJI.js → deps-send-whatsapp.runtime-DhuS0SeA.js} +7 -7
- package/dist/{deps-send-whatsapp.runtime-cpKOCWZ7.js → deps-send-whatsapp.runtime-Di849gV3.js} +18 -18
- package/dist/{devices-cli-CxBvKU-k.js → devices-cli-DJ5t9Awn.js} +2 -2
- package/dist/{diagnostic-4Dbmo6KU.js → diagnostic-B74jJPqv.js} +2 -2
- package/dist/{doctor-completion-BIsKBzEq.js → doctor-completion-kjDYgxZk.js} +1 -1
- package/dist/{errors-Dih7OXdL.js → errors-CCLnP2Fs.js} +1 -1
- package/dist/{exec-approvals-cli-BWJVqTGx.js → exec-approvals-cli-qbq31pxo.js} +4 -4
- package/dist/extensionAPI.js +6 -6
- package/dist/{fetch-COEkF6YP.js → fetch-OMudX6HR.js} +4 -4
- package/dist/{fetch-guard-CcP28UT1.js → fetch-guard-DBZ7o2IA.js} +2 -2
- package/dist/{frontmatter-LLGh43CC.js → frontmatter-vSrur-r-.js} +3 -3
- package/dist/{fs-safe-NHJJ1b9f.js → fs-safe-Dy2_iDiY.js} +3 -3
- package/dist/{gateway-cli-D6hF-7r8.js → gateway-cli-lvhI_G2p.js} +28 -28
- package/dist/{gateway-rpc-CMY4PORW.js → gateway-rpc-DXJlCFNJ.js} +1 -1
- package/dist/{health-B6rkscPh.js → health-TD-34Yp-.js} +3 -3
- package/dist/{hooks-cli-CsLbZW55.js → hooks-cli-C6DWUB-U.js} +17 -17
- package/dist/{image-Dkl58_nM.js → image-Ccz6ndn7.js} +1 -1
- package/dist/{image-COAbpp2B.js → image-CdfqhHaX.js} +6 -6
- package/dist/{image-CBBib8Ld.js → image-DI75geX3.js} +1 -1
- package/dist/{image-ops-QLLBkxzG.js → image-ops-BQmWYj-1.js} +2 -2
- package/dist/image-runtime-BFxy3jl0.js +29 -0
- package/dist/{image-runtime-BinILRte.js → image-runtime-BWARi-r4.js} +3 -3
- package/dist/{image-runtime-2ePySomG.js → image-runtime-Obmeae9a.js} +5 -5
- package/dist/index.js +21 -21
- package/dist/{ir-RKRKj5a9.js → ir-DEPhOdwg.js} +8 -8
- package/dist/{legacy-names-CR_H5NWa.js → legacy-names-CDxprteD.js} +1 -1
- package/dist/llm-slug-generator.js +49 -49
- package/dist/{logger-D20iS3B-.js → logger-onBePS9K.js} +1 -1
- package/dist/{login-C1_lumKW.js → login-BPzRFY6S.js} +5 -5
- package/dist/{login-qr-D0Gij2UC.js → login-qr-BZbSxC-5.js} +8 -8
- package/dist/{logs-cli-Dv4wWIJZ.js → logs-cli-C4B9RucB.js} +3 -3
- package/dist/{manager-B_QaG_-L.js → manager-D3ROcs7_.js} +9 -9
- package/dist/manager-runtime-Dup90ARI.js +18 -0
- package/dist/{memory-cli-CgsaxpRr.js → memory-cli-C7wo32BJ.js} +1 -1
- package/dist/{model-selection-Bjj4oU16.js → model-selection-Bh4BR1_K.js} +10 -10
- package/dist/{models-cli-Cs6QUPHJ.js → models-cli-CGWYDv56.js} +17 -17
- package/dist/{node-cli-QeGnYeqt.js → node-cli-DhcjrGhX.js} +5 -5
- package/dist/{node-command-policy-CzqB-8ah.js → node-command-policy-CPjB6YQt.js} +1 -1
- package/dist/{nodes-cli-u94LkIig.js → nodes-cli-CmE8JKKq.js} +3 -3
- package/dist/{npm-resolution-DptUU3y3.js → npm-resolution-Bwt62vuA.js} +1 -1
- package/dist/{onboard-CJX_C5lq.js → onboard-BP7rTtCO.js} +3 -3
- package/dist/{onboard-channels-CA3x3tGg.js → onboard-channels-D2p7QNyT.js} +2 -2
- package/dist/{onboard-helpers-DZtoPn8i.js → onboard-helpers-JS-Lbczt.js} +1 -1
- package/dist/{onboard-remote-BvW9CIHn.js → onboard-remote-Bf-wwh2S.js} +1 -1
- package/dist/{onboard-skills-D19L2KkN.js → onboard-skills-CUip0jpN.js} +1 -1
- package/dist/{onboarding-CvKwUVhN.js → onboarding-LbGi6oDz.js} +7 -7
- package/dist/{onboarding.finalize-CxclFJxn.js → onboarding.finalize-CWcaxeIO.js} +21 -21
- package/dist/{onboarding.gateway-config-DvYcbETj.js → onboarding.gateway-config-BfJ7jZ3-.js} +4 -4
- package/dist/{outbound-ChkqJkiM.js → outbound-BApjXYwN.js} +6 -6
- package/dist/{outbound-attachment-CRXa01xP.js → outbound-attachment-1Yd0-JW2.js} +2 -2
- package/dist/{path-alias-guards-DgNuZPBA.js → path-alias-guards-B63g_1Gb.js} +1 -1
- package/dist/{paths-7EEBmI5a.js → paths-BJWEyNJy.js} +1 -1
- package/dist/{pi-embedded-BULXCFPg.js → pi-embedded-BPU69pec.js} +70 -70
- package/dist/{pi-embedded-CLTN3qXD.js → pi-embedded-Cajbf_ri.js} +131 -131
- package/dist/{pi-embedded-helpers-CuiXHzQ1.js → pi-embedded-helpers-DBZo6ghW.js} +1 -1
- package/dist/{pi-embedded-helpers-CQJfmPVp.js → pi-embedded-helpers-u_th5KKV.js} +3 -3
- package/dist/{pi-embedded-helpers-1Z1aUoto.js → pi-embedded-helpers-xpgo_nwz.js} +19 -19
- package/dist/{pi-model-discovery-DSuyTtRM.js → pi-model-discovery-BbCPyLm5.js} +1 -1
- package/dist/pi-model-discovery-runtime-BeF5ldX8.js +11 -0
- package/dist/{pi-tools.before-tool-call.runtime-BCq4EKHD.js → pi-tools.before-tool-call.runtime-s89v8h6G.js} +7 -7
- package/dist/{pi-tools.policy-FpqAOqvu.js → pi-tools.policy-BYTs7z53.js} +1 -1
- package/dist/{plugin-registry-Cpf1qgAz.js → plugin-registry-FXXByNP3.js} +1 -1
- package/dist/plugin-sdk/accounts-BXFDqY90.js +288 -0
- package/dist/plugin-sdk/accounts-DU7Js54-.js +46 -0
- package/dist/plugin-sdk/accounts-DxiB_4z4.js +35 -0
- package/dist/plugin-sdk/active-listener-DRKcesNb.js +50 -0
- package/dist/plugin-sdk/api-key-rotation-k1ZNheUH.js +181 -0
- package/dist/plugin-sdk/audio-preflight-Be1sKsob.js +69 -0
- package/dist/plugin-sdk/audio-transcription-runner-jhHyCc_7.js +2176 -0
- package/dist/plugin-sdk/audit-membership-runtime-B9b-zRwg.js +58 -0
- package/dist/plugin-sdk/channel-activity-Bq1Y9RiB.js +94 -0
- package/dist/plugin-sdk/channel-web-AsdjtnvN.js +2256 -0
- package/dist/plugin-sdk/chrome-DOnBMnlx.js +2415 -0
- package/dist/plugin-sdk/commands-registry-D0py59pz.js +1125 -0
- package/dist/plugin-sdk/config-B16xKqSo.js +17912 -0
- package/dist/plugin-sdk/deliver-BqXXtIuw.js +1694 -0
- package/dist/plugin-sdk/deliver-runtime-D0xZkt8n.js +32 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-BM6ppx2Q.js +23 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-3w5PhXGu.js +22 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-yH9cQl3_.js +21 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-Bh4gw-L5.js +19 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-C_CtsWgt.js +24 -0
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-BF4vx9Ho.js +57 -0
- package/dist/plugin-sdk/diagnostic-DUbajFSl.js +319 -0
- package/dist/plugin-sdk/errors-B8oJXuCF.js +54 -0
- package/dist/plugin-sdk/fetch-guard-Cgyq6Jv9.js +156 -0
- package/dist/plugin-sdk/fs-safe-BW1ypSDS.js +352 -0
- package/dist/plugin-sdk/image-BPXnvxYL.js +2310 -0
- package/dist/plugin-sdk/image-ops-BBY2fn9x.js +584 -0
- package/dist/plugin-sdk/image-runtime-S-TzaJpg.js +25 -0
- package/dist/plugin-sdk/index.js +50 -50
- package/dist/plugin-sdk/ir-BJsqyZfm.js +1296 -0
- package/dist/plugin-sdk/local-roots-C1ETRlaC.js +186 -0
- package/dist/plugin-sdk/logger-DDdrdbDu.js +1163 -0
- package/dist/plugin-sdk/login-DtS9DDnV.js +57 -0
- package/dist/plugin-sdk/login-qr-B9YeeJ37.js +320 -0
- package/dist/plugin-sdk/manager-Dn7j3n0d.js +3917 -0
- package/dist/plugin-sdk/manager-runtime-UK1-iA2B.js +15 -0
- package/dist/plugin-sdk/outbound-B8ca8vE3.js +212 -0
- package/dist/plugin-sdk/outbound-attachment-BppFIMQa.js +19 -0
- package/dist/plugin-sdk/path-alias-guards-BX-3FprC.js +43 -0
- package/dist/plugin-sdk/paths-CjFcHB_C.js +166 -0
- package/dist/plugin-sdk/pi-embedded-helpers-BeYjP1MW.js +9627 -0
- package/dist/plugin-sdk/pi-model-discovery-B_qCKuSW.js +134 -0
- package/dist/plugin-sdk/pi-model-discovery-runtime-CZNiNFlm.js +8 -0
- package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-cZdrrV27.js +354 -0
- package/dist/plugin-sdk/plugins-rivB8KaQ.js +864 -0
- package/dist/{proxy-fetch-ChIxNDe3.js → plugin-sdk/proxy-fetch-ZPEvp58f.js} +1 -1
- package/dist/plugin-sdk/pw-ai-qaWZD0yx.js +1938 -0
- package/dist/plugin-sdk/qmd-manager-izn0N9V3.js +1448 -0
- package/dist/plugin-sdk/query-expansion-C1Nx0XAb.js +1011 -0
- package/dist/{redact-BSwbgwaV.js → plugin-sdk/redact-BoNEjbpF.js} +1 -1
- package/dist/plugin-sdk/reply-DNSpho0-.js +98763 -0
- package/dist/plugin-sdk/resolve-outbound-target-YiPIGXVN.js +40 -0
- package/dist/plugin-sdk/run-with-concurrency-vfuRiXdY.js +2023 -0
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-BgwMJs4X.js +10 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-Y7maoii7.js +19 -0
- package/dist/plugin-sdk/send-BSD6Pkrk.js +414 -0
- package/dist/plugin-sdk/send-C4KxEJe1.js +503 -0
- package/dist/plugin-sdk/send-D3XVKGvq.js +540 -0
- package/dist/plugin-sdk/send-DFrnRiWm.js +3135 -0
- package/dist/plugin-sdk/send-Dh1f5xjE.js +2587 -0
- package/dist/plugin-sdk/session-D5c0BIEo.js +169 -0
- package/dist/plugin-sdk/signal.js +2 -2
- package/dist/plugin-sdk/skill-commands-CnqkEfhS.js +342 -0
- package/dist/plugin-sdk/skills-DSbDUvmU.js +1428 -0
- package/dist/plugin-sdk/slack.js +2 -2
- package/dist/plugin-sdk/slash-commands.runtime-Dbtq7ppF.js +13 -0
- package/dist/plugin-sdk/slash-dispatch.runtime-BhAks953.js +52 -0
- package/dist/plugin-sdk/slash-skill-commands.runtime-QGNWVO9S.js +16 -0
- package/dist/plugin-sdk/ssrf-DvsjfpC2.js +202 -0
- package/dist/plugin-sdk/store-DG90hxe6.js +81 -0
- package/dist/plugin-sdk/subagent-registry-runtime-Db83OZ3_.js +52 -0
- package/dist/plugin-sdk/tables-DNlQ8oQ3.js +55 -0
- package/dist/{target-errors-BMTA5KVE.js → plugin-sdk/target-errors-BlVYPwVC.js} +2 -2
- package/dist/plugin-sdk/thinking-DT2ZR60x.js +1206 -0
- package/dist/{tokens-Cdk21tF_.js → plugin-sdk/tokens-CTIYTLWu.js} +1 -1
- package/dist/plugin-sdk/tool-images-DroS1EaM.js +274 -0
- package/dist/plugin-sdk/web-42d5VBZj.js +56 -0
- package/dist/plugin-sdk/whatsapp-actions-DR2aYq5f.js +80 -0
- package/dist/{plugins-D-K4oUXz.js → plugins-D8QbEQB8.js} +6 -6
- package/dist/{plugins-cli-DWmGTrQi.js → plugins-cli-BmfpsKs2.js} +17 -17
- package/dist/{program-context-CIEsO7ba.js → program-context-Cc5-MG37.js} +34 -34
- package/dist/{prompt-select-styled-4uvdkCmK.js → prompt-select-styled-BmJHQFIe.js} +10 -10
- package/dist/{provider-auth-helpers-Ds4co7pd.js → provider-auth-helpers-BrYxePGn.js} +1 -1
- package/dist/{proxy-env-D9oPe73i.js → proxy-env-DS2YEWWX.js} +1 -1
- package/dist/proxy-fetch-08-dhqxn.js +38 -0
- package/dist/{push-apns-wyGqUoCL.js → push-apns-BH6u2jeD.js} +1 -1
- package/dist/{pw-ai-DS32O9Ei.js → pw-ai-Bxj7Voze.js} +1 -1
- package/dist/{pw-ai-DXis1Gal.js → pw-ai-Do8UJz-Y.js} +1 -1
- package/dist/{pw-ai-4QFtj-s9.js → pw-ai-rD2G8OP-.js} +12 -12
- package/dist/{qmd-manager-CIcyVJmI.js → qmd-manager-B9vC7u4w.js} +9 -9
- package/dist/{qr-cli-DhqLEdBe.js → qr-cli-t7wb_tRQ.js} +1 -1
- package/dist/{query-expansion-BMExPdLO.js → query-expansion-o9Ib6_Rk.js} +4 -4
- package/dist/redact-rnJm_Z5E.js +319 -0
- package/dist/{register.agent-IRNp0fr-.js → register.agent-eYMqq7DM.js} +21 -21
- package/dist/{register.configure-D4ecAwAg.js → register.configure-5ZU_WG0B.js} +24 -24
- package/dist/{register.maintenance-YOZ3sMNS.js → register.maintenance-Di-_iCcy.js} +22 -22
- package/dist/{register.message-ozARKUco.js → register.message-BJEQ0tWj.js} +17 -17
- package/dist/{register.onboard-BtzGW6wy.js → register.onboard-D8V8BiRf.js} +5 -5
- package/dist/{register.setup-CaZETnfd.js → register.setup-CuD_ucSh.js} +5 -5
- package/dist/{register.status-health-sessions-qS3pe6Kw.js → register.status-health-sessions-CfcRluvS.js} +20 -20
- package/dist/{reply-d12k6JyN.js → reply-DM6COks_.js} +30 -30
- package/dist/{rpc-BnWL4MCX.js → rpc-BAWL8_DO.js} +1 -1
- package/dist/{run-with-concurrency-hJFK7PcO.js → run-with-concurrency-C3dKaL_j.js} +3 -3
- package/dist/runtime-whatsapp-login.runtime-BVm0A03Y.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-d8oRCgsW.js +22 -0
- package/dist/{sandbox-cli-CO9AcpuP.js → sandbox-cli-B_c94l3B.js} +3 -3
- package/dist/{sandbox-4_YzlsBa.js → sandbox-dnsTApLp.js} +2 -2
- package/dist/{secrets-cli-CE_fukZS.js → secrets-cli-ES-9H2pj.js} +3 -3
- package/dist/{security-cli-D-jh37Iy.js → security-cli-B5H4tjcT.js} +8 -8
- package/dist/{send-DySBiOxg.js → send-6s7HVGcN.js} +7 -7
- package/dist/{send-BMtxl7vL.js → send-BdQyKIzE.js} +5 -5
- package/dist/{send-DJcNRhf_.js → send-CAzswJK6.js} +8 -8
- package/dist/{send-CNzGOCHa.js → send-DKB7vlw3.js} +6 -6
- package/dist/{send-pUHxPU20.js → send-Q5SBsGfY.js} +14 -14
- package/dist/{server-COF4C6UQ.js → server-DWce8-ko.js} +4 -4
- package/dist/{server-context-DWRUW3Oc.js → server-context-CYPsJeRg.js} +3 -3
- package/dist/{server-lifecycle-DSRW9YyS.js → server-lifecycle-CL57-qY-.js} +2 -2
- package/dist/{server-node-events-DcI3BKLU.js → server-node-events-CM2wrNgk.js} +17 -17
- package/dist/{session-DOFapRIv.js → session-D2CiV8TN.js} +4 -4
- package/dist/{skill-commands-yvTkQtnt.js → skill-commands-CgJiKg3Q.js} +5 -5
- package/dist/{skills-BjHeDO5V.js → skills-DNyMj13y.js} +7 -7
- package/dist/slash-commands.runtime-Cvnjq5gh.js +16 -0
- package/dist/{slash-dispatch.runtime-CnIrfAgj.js → slash-dispatch.runtime-9OkfqjfK.js} +16 -16
- package/dist/{slash-dispatch.runtime-DidWtkRY.js → slash-dispatch.runtime-UHClfKIh.js} +6 -6
- package/dist/slash-dispatch.runtime-YGQtou1U.js +56 -0
- package/dist/slash-skill-commands.runtime-BbZPUdhN.js +20 -0
- package/dist/{status-Cxc7ROTK.js → status-DLXPWgfm.js} +7 -7
- package/dist/{store-C3iBzr-_.js → store-Bdm7wypS.js} +2 -2
- package/dist/{subagent-registry-runtime-Dup_yrOH.js → subagent-registry-runtime-BYDycq2m.js} +6 -6
- package/dist/{subagent-registry-runtime-DqbU91-h.js → subagent-registry-runtime-CQR_M6WF.js} +16 -16
- package/dist/subagent-registry-runtime-DoZWJdY9.js +56 -0
- package/dist/{subsystem-CWsKV5VU.js → subsystem-BJ89YjCN.js} +2 -2
- package/dist/{system-cli-B0wBc7tJ.js → system-cli-CUOkjFj4.js} +3 -3
- package/dist/{tables-Bv8tJ0qC.js → tables-MEAoO_QC.js} +1 -1
- package/dist/target-errors-qetEoXTB.js +195 -0
- package/dist/{thinking-BB_GM390.js → thinking-CaLooOu4.js} +7 -7
- package/dist/tokens-9NF8L9Uh.js +52 -0
- package/dist/{tool-images-HRwkh81U.js → tool-images-CkmNQqHm.js} +2 -2
- package/dist/{tui-BNyyikcb.js → tui-ChZP3wJ7.js} +3 -3
- package/dist/{tui-cli-DsuDwgRG.js → tui-cli-nXP__ZM8.js} +7 -7
- package/dist/{update-cli-CqGNnerP.js → update-cli-XGRmAcuW.js} +23 -23
- package/dist/{update-runner-BGYtEI5Z.js → update-runner-7klqnWFq.js} +1 -1
- package/dist/{web-BQbhCFGN.js → web-6kCngkSg.js} +17 -17
- package/dist/{web-Cp2nm6U4.js → web-CGbFuIR9.js} +6 -6
- package/dist/{web-BbpOMti_.js → web-ajuJjPrA.js} +53 -53
- package/dist/{whatsapp-actions-CuLcPfQ9.js → whatsapp-actions-DuJpyhRe.js} +19 -19
- package/dist/{with-timeout-DINiEgLx.js → with-timeout-CtjR5hW9.js} +2 -2
- package/dist/{workspace-MO4aE903.js → workspace-CkozFUzc.js} +2 -2
- package/package.json +2 -2
- package/dist/deliver-runtime-BJoBkkm_.js +0 -36
- package/dist/deps-send-discord.runtime-Dlb1pOSn.js +0 -26
- package/dist/deps-send-imessage.runtime-DmVvqFTt.js +0 -25
- package/dist/deps-send-signal.runtime-DPX_GcJK.js +0 -24
- package/dist/deps-send-slack.runtime-s7wb1ssP.js +0 -22
- package/dist/deps-send-telegram.runtime-DcIT4v5p.js +0 -27
- package/dist/deps-send-whatsapp.runtime-DfAhniLS.js +0 -60
- package/dist/image-runtime-Dkwf1-U3.js +0 -29
- package/dist/manager-runtime-DPiPNTWB.js +0 -18
- package/dist/pi-model-discovery-runtime-CRif8A8F.js +0 -11
- package/dist/runtime-whatsapp-login.runtime-DTnmQLV1.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-Da-07rzo.js +0 -22
- package/dist/slash-commands.runtime-FS9JZ9BW.js +0 -16
- package/dist/slash-dispatch.runtime-BZw5XlvY.js +0 -56
- package/dist/slash-skill-commands.runtime-BZIbPU6x.js +0 -20
- package/dist/subagent-registry-runtime-Blx4zbr0.js +0 -56
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import "./run-with-concurrency-vfuRiXdY.js";
|
|
2
|
+
import "./accounts-BXFDqY90.js";
|
|
3
|
+
import "./paths-8xF5kDne.js";
|
|
4
|
+
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
5
|
+
import "./config-B16xKqSo.js";
|
|
6
|
+
import "./logger-DDdrdbDu.js";
|
|
7
|
+
import "./thinking-DT2ZR60x.js";
|
|
8
|
+
import "./image-ops-BBY2fn9x.js";
|
|
9
|
+
import "./pi-embedded-helpers-BeYjP1MW.js";
|
|
10
|
+
import "./plugins-rivB8KaQ.js";
|
|
11
|
+
import "./accounts-DxiB_4z4.js";
|
|
12
|
+
import "./accounts-DU7Js54-.js";
|
|
13
|
+
import "./paths-CjFcHB_C.js";
|
|
14
|
+
import "./fetch-B_RcOnt9.js";
|
|
15
|
+
import "./redact-BoNEjbpF.js";
|
|
16
|
+
import "./errors-B8oJXuCF.js";
|
|
17
|
+
import "./path-alias-guards-BX-3FprC.js";
|
|
18
|
+
import "./fs-safe-BW1ypSDS.js";
|
|
19
|
+
import "./ssrf-DvsjfpC2.js";
|
|
20
|
+
import "./fetch-guard-Cgyq6Jv9.js";
|
|
21
|
+
import "./local-roots-C1ETRlaC.js";
|
|
22
|
+
import "./ir-BJsqyZfm.js";
|
|
23
|
+
import "./tool-images-DroS1EaM.js";
|
|
24
|
+
import "./tokens-CTIYTLWu.js";
|
|
25
|
+
import "./skills-DSbDUvmU.js";
|
|
26
|
+
import "./chrome-DOnBMnlx.js";
|
|
27
|
+
import { t as deliverOutboundPayloads } from "./deliver-BqXXtIuw.js";
|
|
28
|
+
import "./store-DG90hxe6.js";
|
|
29
|
+
import "./send-D3XVKGvq.js";
|
|
30
|
+
import "./outbound-attachment-BppFIMQa.js";
|
|
31
|
+
|
|
32
|
+
export { deliverOutboundPayloads };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import "./run-with-concurrency-vfuRiXdY.js";
|
|
2
|
+
import "./accounts-BXFDqY90.js";
|
|
3
|
+
import "./paths-8xF5kDne.js";
|
|
4
|
+
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
5
|
+
import "./config-B16xKqSo.js";
|
|
6
|
+
import "./logger-DDdrdbDu.js";
|
|
7
|
+
import "./image-ops-BBY2fn9x.js";
|
|
8
|
+
import "./plugins-rivB8KaQ.js";
|
|
9
|
+
import { h as sendMessageDiscord } from "./send-DFrnRiWm.js";
|
|
10
|
+
import "./fetch-B_RcOnt9.js";
|
|
11
|
+
import "./redact-BoNEjbpF.js";
|
|
12
|
+
import "./errors-B8oJXuCF.js";
|
|
13
|
+
import "./channel-activity-Bq1Y9RiB.js";
|
|
14
|
+
import "./path-alias-guards-BX-3FprC.js";
|
|
15
|
+
import "./fs-safe-BW1ypSDS.js";
|
|
16
|
+
import "./ssrf-DvsjfpC2.js";
|
|
17
|
+
import "./fetch-guard-Cgyq6Jv9.js";
|
|
18
|
+
import "./local-roots-C1ETRlaC.js";
|
|
19
|
+
import "./ir-BJsqyZfm.js";
|
|
20
|
+
import "./render-HmipMDlP.js";
|
|
21
|
+
import "./tables-DNlQ8oQ3.js";
|
|
22
|
+
|
|
23
|
+
export { sendMessageDiscord };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./run-with-concurrency-vfuRiXdY.js";
|
|
2
|
+
import "./accounts-BXFDqY90.js";
|
|
3
|
+
import "./paths-8xF5kDne.js";
|
|
4
|
+
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
5
|
+
import "./config-B16xKqSo.js";
|
|
6
|
+
import "./logger-DDdrdbDu.js";
|
|
7
|
+
import "./image-ops-BBY2fn9x.js";
|
|
8
|
+
import "./plugins-rivB8KaQ.js";
|
|
9
|
+
import "./accounts-DxiB_4z4.js";
|
|
10
|
+
import "./path-alias-guards-BX-3FprC.js";
|
|
11
|
+
import "./fs-safe-BW1ypSDS.js";
|
|
12
|
+
import "./ssrf-DvsjfpC2.js";
|
|
13
|
+
import "./fetch-guard-Cgyq6Jv9.js";
|
|
14
|
+
import "./local-roots-C1ETRlaC.js";
|
|
15
|
+
import "./ir-BJsqyZfm.js";
|
|
16
|
+
import "./render-HmipMDlP.js";
|
|
17
|
+
import "./tables-DNlQ8oQ3.js";
|
|
18
|
+
import { t as sendMessageIMessage } from "./send-C4KxEJe1.js";
|
|
19
|
+
import "./store-DG90hxe6.js";
|
|
20
|
+
import "./outbound-attachment-BppFIMQa.js";
|
|
21
|
+
|
|
22
|
+
export { sendMessageIMessage };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "./run-with-concurrency-vfuRiXdY.js";
|
|
2
|
+
import "./accounts-BXFDqY90.js";
|
|
3
|
+
import "./paths-8xF5kDne.js";
|
|
4
|
+
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
5
|
+
import "./config-B16xKqSo.js";
|
|
6
|
+
import "./logger-DDdrdbDu.js";
|
|
7
|
+
import "./image-ops-BBY2fn9x.js";
|
|
8
|
+
import "./plugins-rivB8KaQ.js";
|
|
9
|
+
import "./accounts-DU7Js54-.js";
|
|
10
|
+
import "./fetch-B_RcOnt9.js";
|
|
11
|
+
import "./path-alias-guards-BX-3FprC.js";
|
|
12
|
+
import "./fs-safe-BW1ypSDS.js";
|
|
13
|
+
import "./ssrf-DvsjfpC2.js";
|
|
14
|
+
import "./fetch-guard-Cgyq6Jv9.js";
|
|
15
|
+
import "./local-roots-C1ETRlaC.js";
|
|
16
|
+
import "./ir-BJsqyZfm.js";
|
|
17
|
+
import "./store-DG90hxe6.js";
|
|
18
|
+
import { t as sendMessageSignal } from "./send-D3XVKGvq.js";
|
|
19
|
+
import "./outbound-attachment-BppFIMQa.js";
|
|
20
|
+
|
|
21
|
+
export { sendMessageSignal };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "./run-with-concurrency-vfuRiXdY.js";
|
|
2
|
+
import "./accounts-BXFDqY90.js";
|
|
3
|
+
import "./paths-8xF5kDne.js";
|
|
4
|
+
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
5
|
+
import "./config-B16xKqSo.js";
|
|
6
|
+
import "./logger-DDdrdbDu.js";
|
|
7
|
+
import "./image-ops-BBY2fn9x.js";
|
|
8
|
+
import "./plugins-rivB8KaQ.js";
|
|
9
|
+
import "./path-alias-guards-BX-3FprC.js";
|
|
10
|
+
import "./fs-safe-BW1ypSDS.js";
|
|
11
|
+
import "./ssrf-DvsjfpC2.js";
|
|
12
|
+
import "./fetch-guard-Cgyq6Jv9.js";
|
|
13
|
+
import "./local-roots-C1ETRlaC.js";
|
|
14
|
+
import "./ir-BJsqyZfm.js";
|
|
15
|
+
import "./render-HmipMDlP.js";
|
|
16
|
+
import { t as sendMessageSlack } from "./send-BSD6Pkrk.js";
|
|
17
|
+
import "./tokens-CTIYTLWu.js";
|
|
18
|
+
|
|
19
|
+
export { sendMessageSlack };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "./run-with-concurrency-vfuRiXdY.js";
|
|
2
|
+
import "./accounts-BXFDqY90.js";
|
|
3
|
+
import "./paths-8xF5kDne.js";
|
|
4
|
+
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
5
|
+
import "./config-B16xKqSo.js";
|
|
6
|
+
import "./logger-DDdrdbDu.js";
|
|
7
|
+
import "./image-ops-BBY2fn9x.js";
|
|
8
|
+
import "./plugins-rivB8KaQ.js";
|
|
9
|
+
import "./fetch-B_RcOnt9.js";
|
|
10
|
+
import "./redact-BoNEjbpF.js";
|
|
11
|
+
import "./errors-B8oJXuCF.js";
|
|
12
|
+
import "./channel-activity-Bq1Y9RiB.js";
|
|
13
|
+
import "./path-alias-guards-BX-3FprC.js";
|
|
14
|
+
import "./fs-safe-BW1ypSDS.js";
|
|
15
|
+
import "./ssrf-DvsjfpC2.js";
|
|
16
|
+
import "./fetch-guard-Cgyq6Jv9.js";
|
|
17
|
+
import "./local-roots-C1ETRlaC.js";
|
|
18
|
+
import "./ir-BJsqyZfm.js";
|
|
19
|
+
import "./render-HmipMDlP.js";
|
|
20
|
+
import { o as sendMessageTelegram } from "./send-Dh1f5xjE.js";
|
|
21
|
+
import "./proxy-fetch-ZPEvp58f.js";
|
|
22
|
+
import "./proxy-BKdNrmWL.js";
|
|
23
|
+
|
|
24
|
+
export { sendMessageTelegram };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import "./run-with-concurrency-vfuRiXdY.js";
|
|
2
|
+
import "./accounts-BXFDqY90.js";
|
|
3
|
+
import "./reply-DNSpho0-.js";
|
|
4
|
+
import "./paths-8xF5kDne.js";
|
|
5
|
+
import "./github-copilot-token-Dy-0-Kh3.js";
|
|
6
|
+
import "./config-B16xKqSo.js";
|
|
7
|
+
import "./logger-DDdrdbDu.js";
|
|
8
|
+
import "./thinking-DT2ZR60x.js";
|
|
9
|
+
import "./image-ops-BBY2fn9x.js";
|
|
10
|
+
import "./pi-embedded-helpers-BeYjP1MW.js";
|
|
11
|
+
import "./plugins-rivB8KaQ.js";
|
|
12
|
+
import "./accounts-DxiB_4z4.js";
|
|
13
|
+
import "./accounts-DU7Js54-.js";
|
|
14
|
+
import "./send-DFrnRiWm.js";
|
|
15
|
+
import "./paths-CjFcHB_C.js";
|
|
16
|
+
import "./fetch-B_RcOnt9.js";
|
|
17
|
+
import "./redact-BoNEjbpF.js";
|
|
18
|
+
import "./errors-B8oJXuCF.js";
|
|
19
|
+
import "./channel-activity-Bq1Y9RiB.js";
|
|
20
|
+
import "./path-alias-guards-BX-3FprC.js";
|
|
21
|
+
import "./fs-safe-BW1ypSDS.js";
|
|
22
|
+
import "./ssrf-DvsjfpC2.js";
|
|
23
|
+
import "./fetch-guard-Cgyq6Jv9.js";
|
|
24
|
+
import "./local-roots-C1ETRlaC.js";
|
|
25
|
+
import "./ir-BJsqyZfm.js";
|
|
26
|
+
import "./render-HmipMDlP.js";
|
|
27
|
+
import "./tables-DNlQ8oQ3.js";
|
|
28
|
+
import "./send-C4KxEJe1.js";
|
|
29
|
+
import "./send-Dh1f5xjE.js";
|
|
30
|
+
import "./tool-images-DroS1EaM.js";
|
|
31
|
+
import "./target-errors-BlVYPwVC.js";
|
|
32
|
+
import "./send-BSD6Pkrk.js";
|
|
33
|
+
import "./audio-transcription-runner-jhHyCc_7.js";
|
|
34
|
+
import "./tokens-CTIYTLWu.js";
|
|
35
|
+
import "./skill-commands-CnqkEfhS.js";
|
|
36
|
+
import "./skills-DSbDUvmU.js";
|
|
37
|
+
import "./chrome-DOnBMnlx.js";
|
|
38
|
+
import "./deliver-BqXXtIuw.js";
|
|
39
|
+
import "./diagnostic-DUbajFSl.js";
|
|
40
|
+
import "./store-DG90hxe6.js";
|
|
41
|
+
import "./commands-registry-D0py59pz.js";
|
|
42
|
+
import "./channel-web-AsdjtnvN.js";
|
|
43
|
+
import "./image-BPXnvxYL.js";
|
|
44
|
+
import "./api-key-rotation-k1ZNheUH.js";
|
|
45
|
+
import "./proxy-fetch-ZPEvp58f.js";
|
|
46
|
+
import "./pi-model-discovery-B_qCKuSW.js";
|
|
47
|
+
import "./send-D3XVKGvq.js";
|
|
48
|
+
import "./outbound-attachment-BppFIMQa.js";
|
|
49
|
+
import "./proxy-BKdNrmWL.js";
|
|
50
|
+
import "./manager-Dn7j3n0d.js";
|
|
51
|
+
import "./query-expansion-C1Nx0XAb.js";
|
|
52
|
+
import { t as sendMessageWhatsApp } from "./outbound-B8ca8vE3.js";
|
|
53
|
+
import "./session-D5c0BIEo.js";
|
|
54
|
+
import "./login-DtS9DDnV.js";
|
|
55
|
+
import "./web-42d5VBZj.js";
|
|
56
|
+
|
|
57
|
+
export { sendMessageWhatsApp };
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { n as loadConfig } from "./config-B16xKqSo.js";
|
|
2
|
+
import { a as createSubsystemLogger } from "./logger-DDdrdbDu.js";
|
|
3
|
+
|
|
4
|
+
//#region src/infra/diagnostic-events.ts
|
|
5
|
+
function getDiagnosticEventsState() {
|
|
6
|
+
const globalStore = globalThis;
|
|
7
|
+
if (!globalStore.__squidclawDiagnosticEventsState) globalStore.__squidclawDiagnosticEventsState = {
|
|
8
|
+
seq: 0,
|
|
9
|
+
listeners: /* @__PURE__ */ new Set(),
|
|
10
|
+
dispatchDepth: 0
|
|
11
|
+
};
|
|
12
|
+
return globalStore.__squidclawDiagnosticEventsState;
|
|
13
|
+
}
|
|
14
|
+
function isDiagnosticsEnabled(config) {
|
|
15
|
+
return config?.diagnostics?.enabled === true;
|
|
16
|
+
}
|
|
17
|
+
function emitDiagnosticEvent(event) {
|
|
18
|
+
const state = getDiagnosticEventsState();
|
|
19
|
+
if (state.dispatchDepth > 100) {
|
|
20
|
+
console.error(`[diagnostic-events] recursion guard tripped at depth=${state.dispatchDepth}, dropping type=${event.type}`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const enriched = {
|
|
24
|
+
...event,
|
|
25
|
+
seq: state.seq += 1,
|
|
26
|
+
ts: Date.now()
|
|
27
|
+
};
|
|
28
|
+
state.dispatchDepth += 1;
|
|
29
|
+
for (const listener of state.listeners) try {
|
|
30
|
+
listener(enriched);
|
|
31
|
+
} catch (err) {
|
|
32
|
+
const errorMessage = err instanceof Error ? err.stack ?? err.message : typeof err === "string" ? err : String(err);
|
|
33
|
+
console.error(`[diagnostic-events] listener error type=${enriched.type} seq=${enriched.seq}: ${errorMessage}`);
|
|
34
|
+
}
|
|
35
|
+
state.dispatchDepth -= 1;
|
|
36
|
+
}
|
|
37
|
+
function onDiagnosticEvent(listener) {
|
|
38
|
+
const state = getDiagnosticEventsState();
|
|
39
|
+
state.listeners.add(listener);
|
|
40
|
+
return () => {
|
|
41
|
+
state.listeners.delete(listener);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/logging/diagnostic-session-state.ts
|
|
47
|
+
const diagnosticSessionStates = /* @__PURE__ */ new Map();
|
|
48
|
+
const SESSION_STATE_TTL_MS = 1800 * 1e3;
|
|
49
|
+
const SESSION_STATE_PRUNE_INTERVAL_MS = 60 * 1e3;
|
|
50
|
+
const SESSION_STATE_MAX_ENTRIES = 2e3;
|
|
51
|
+
let lastSessionPruneAt = 0;
|
|
52
|
+
function pruneDiagnosticSessionStates(now = Date.now(), force = false) {
|
|
53
|
+
const shouldPruneForSize = diagnosticSessionStates.size > SESSION_STATE_MAX_ENTRIES;
|
|
54
|
+
if (!force && !shouldPruneForSize && now - lastSessionPruneAt < SESSION_STATE_PRUNE_INTERVAL_MS) return;
|
|
55
|
+
lastSessionPruneAt = now;
|
|
56
|
+
for (const [key, state] of diagnosticSessionStates.entries()) {
|
|
57
|
+
const ageMs = now - state.lastActivity;
|
|
58
|
+
if (state.state === "idle" && state.queueDepth <= 0 && ageMs > SESSION_STATE_TTL_MS) diagnosticSessionStates.delete(key);
|
|
59
|
+
}
|
|
60
|
+
if (diagnosticSessionStates.size <= SESSION_STATE_MAX_ENTRIES) return;
|
|
61
|
+
const excess = diagnosticSessionStates.size - SESSION_STATE_MAX_ENTRIES;
|
|
62
|
+
const ordered = Array.from(diagnosticSessionStates.entries()).toSorted((a, b) => a[1].lastActivity - b[1].lastActivity);
|
|
63
|
+
for (let i = 0; i < excess; i += 1) {
|
|
64
|
+
const key = ordered[i]?.[0];
|
|
65
|
+
if (!key) break;
|
|
66
|
+
diagnosticSessionStates.delete(key);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function resolveSessionKey({ sessionKey, sessionId }) {
|
|
70
|
+
return sessionKey ?? sessionId ?? "unknown";
|
|
71
|
+
}
|
|
72
|
+
function findStateBySessionId(sessionId) {
|
|
73
|
+
for (const state of diagnosticSessionStates.values()) if (state.sessionId === sessionId) return state;
|
|
74
|
+
}
|
|
75
|
+
function getDiagnosticSessionState(ref) {
|
|
76
|
+
pruneDiagnosticSessionStates();
|
|
77
|
+
const key = resolveSessionKey(ref);
|
|
78
|
+
const existing = diagnosticSessionStates.get(key) ?? (ref.sessionId && findStateBySessionId(ref.sessionId));
|
|
79
|
+
if (existing) {
|
|
80
|
+
if (ref.sessionId) existing.sessionId = ref.sessionId;
|
|
81
|
+
if (ref.sessionKey) existing.sessionKey = ref.sessionKey;
|
|
82
|
+
return existing;
|
|
83
|
+
}
|
|
84
|
+
const created = {
|
|
85
|
+
sessionId: ref.sessionId,
|
|
86
|
+
sessionKey: ref.sessionKey,
|
|
87
|
+
lastActivity: Date.now(),
|
|
88
|
+
state: "idle",
|
|
89
|
+
queueDepth: 0
|
|
90
|
+
};
|
|
91
|
+
diagnosticSessionStates.set(key, created);
|
|
92
|
+
pruneDiagnosticSessionStates(Date.now(), true);
|
|
93
|
+
return created;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
//#endregion
|
|
97
|
+
//#region src/logging/diagnostic.ts
|
|
98
|
+
const diag = createSubsystemLogger("diagnostic");
|
|
99
|
+
const webhookStats = {
|
|
100
|
+
received: 0,
|
|
101
|
+
processed: 0,
|
|
102
|
+
errors: 0,
|
|
103
|
+
lastReceived: 0
|
|
104
|
+
};
|
|
105
|
+
let lastActivityAt = 0;
|
|
106
|
+
const DEFAULT_STUCK_SESSION_WARN_MS = 12e4;
|
|
107
|
+
const MIN_STUCK_SESSION_WARN_MS = 1e3;
|
|
108
|
+
const MAX_STUCK_SESSION_WARN_MS = 1440 * 60 * 1e3;
|
|
109
|
+
let commandPollBackoffRuntimePromise = null;
|
|
110
|
+
function loadCommandPollBackoffRuntime() {
|
|
111
|
+
commandPollBackoffRuntimePromise ??= import("./command-poll-backoff.runtime-BrAQqJqT.js");
|
|
112
|
+
return commandPollBackoffRuntimePromise;
|
|
113
|
+
}
|
|
114
|
+
function markActivity() {
|
|
115
|
+
lastActivityAt = Date.now();
|
|
116
|
+
}
|
|
117
|
+
function resolveStuckSessionWarnMs(config) {
|
|
118
|
+
const raw = config?.diagnostics?.stuckSessionWarnMs;
|
|
119
|
+
if (typeof raw !== "number" || !Number.isFinite(raw)) return DEFAULT_STUCK_SESSION_WARN_MS;
|
|
120
|
+
const rounded = Math.floor(raw);
|
|
121
|
+
if (rounded < MIN_STUCK_SESSION_WARN_MS || rounded > MAX_STUCK_SESSION_WARN_MS) return DEFAULT_STUCK_SESSION_WARN_MS;
|
|
122
|
+
return rounded;
|
|
123
|
+
}
|
|
124
|
+
function logWebhookReceived(params) {
|
|
125
|
+
webhookStats.received += 1;
|
|
126
|
+
webhookStats.lastReceived = Date.now();
|
|
127
|
+
if (diag.isEnabled("debug")) diag.debug(`webhook received: channel=${params.channel} type=${params.updateType ?? "unknown"} chatId=${params.chatId ?? "unknown"} total=${webhookStats.received}`);
|
|
128
|
+
emitDiagnosticEvent({
|
|
129
|
+
type: "webhook.received",
|
|
130
|
+
channel: params.channel,
|
|
131
|
+
updateType: params.updateType,
|
|
132
|
+
chatId: params.chatId
|
|
133
|
+
});
|
|
134
|
+
markActivity();
|
|
135
|
+
}
|
|
136
|
+
function logWebhookProcessed(params) {
|
|
137
|
+
webhookStats.processed += 1;
|
|
138
|
+
if (diag.isEnabled("debug")) diag.debug(`webhook processed: channel=${params.channel} type=${params.updateType ?? "unknown"} chatId=${params.chatId ?? "unknown"} duration=${params.durationMs ?? 0}ms processed=${webhookStats.processed}`);
|
|
139
|
+
emitDiagnosticEvent({
|
|
140
|
+
type: "webhook.processed",
|
|
141
|
+
channel: params.channel,
|
|
142
|
+
updateType: params.updateType,
|
|
143
|
+
chatId: params.chatId,
|
|
144
|
+
durationMs: params.durationMs
|
|
145
|
+
});
|
|
146
|
+
markActivity();
|
|
147
|
+
}
|
|
148
|
+
function logWebhookError(params) {
|
|
149
|
+
webhookStats.errors += 1;
|
|
150
|
+
diag.error(`webhook error: channel=${params.channel} type=${params.updateType ?? "unknown"} chatId=${params.chatId ?? "unknown"} error="${params.error}" errors=${webhookStats.errors}`);
|
|
151
|
+
emitDiagnosticEvent({
|
|
152
|
+
type: "webhook.error",
|
|
153
|
+
channel: params.channel,
|
|
154
|
+
updateType: params.updateType,
|
|
155
|
+
chatId: params.chatId,
|
|
156
|
+
error: params.error
|
|
157
|
+
});
|
|
158
|
+
markActivity();
|
|
159
|
+
}
|
|
160
|
+
function logMessageQueued(params) {
|
|
161
|
+
const state = getDiagnosticSessionState(params);
|
|
162
|
+
state.queueDepth += 1;
|
|
163
|
+
state.lastActivity = Date.now();
|
|
164
|
+
if (diag.isEnabled("debug")) diag.debug(`message queued: sessionId=${state.sessionId ?? "unknown"} sessionKey=${state.sessionKey ?? "unknown"} source=${params.source} queueDepth=${state.queueDepth} sessionState=${state.state}`);
|
|
165
|
+
emitDiagnosticEvent({
|
|
166
|
+
type: "message.queued",
|
|
167
|
+
sessionId: state.sessionId,
|
|
168
|
+
sessionKey: state.sessionKey,
|
|
169
|
+
channel: params.channel,
|
|
170
|
+
source: params.source,
|
|
171
|
+
queueDepth: state.queueDepth
|
|
172
|
+
});
|
|
173
|
+
markActivity();
|
|
174
|
+
}
|
|
175
|
+
function logMessageProcessed(params) {
|
|
176
|
+
if (params.outcome === "error" ? diag.isEnabled("error") : diag.isEnabled("debug")) {
|
|
177
|
+
const payload = `message processed: channel=${params.channel} chatId=${params.chatId ?? "unknown"} messageId=${params.messageId ?? "unknown"} sessionId=${params.sessionId ?? "unknown"} sessionKey=${params.sessionKey ?? "unknown"} outcome=${params.outcome} duration=${params.durationMs ?? 0}ms${params.reason ? ` reason=${params.reason}` : ""}${params.error ? ` error="${params.error}"` : ""}`;
|
|
178
|
+
if (params.outcome === "error") diag.error(payload);
|
|
179
|
+
else diag.debug(payload);
|
|
180
|
+
}
|
|
181
|
+
emitDiagnosticEvent({
|
|
182
|
+
type: "message.processed",
|
|
183
|
+
channel: params.channel,
|
|
184
|
+
chatId: params.chatId,
|
|
185
|
+
messageId: params.messageId,
|
|
186
|
+
sessionId: params.sessionId,
|
|
187
|
+
sessionKey: params.sessionKey,
|
|
188
|
+
durationMs: params.durationMs,
|
|
189
|
+
outcome: params.outcome,
|
|
190
|
+
reason: params.reason,
|
|
191
|
+
error: params.error
|
|
192
|
+
});
|
|
193
|
+
markActivity();
|
|
194
|
+
}
|
|
195
|
+
function logSessionStateChange(params) {
|
|
196
|
+
const state = getDiagnosticSessionState(params);
|
|
197
|
+
const isProbeSession = state.sessionId?.startsWith("probe-") ?? false;
|
|
198
|
+
const prevState = state.state;
|
|
199
|
+
state.state = params.state;
|
|
200
|
+
state.lastActivity = Date.now();
|
|
201
|
+
if (params.state === "idle") state.queueDepth = Math.max(0, state.queueDepth - 1);
|
|
202
|
+
if (!isProbeSession && diag.isEnabled("debug")) diag.debug(`session state: sessionId=${state.sessionId ?? "unknown"} sessionKey=${state.sessionKey ?? "unknown"} prev=${prevState} new=${params.state} reason="${params.reason ?? ""}" queueDepth=${state.queueDepth}`);
|
|
203
|
+
emitDiagnosticEvent({
|
|
204
|
+
type: "session.state",
|
|
205
|
+
sessionId: state.sessionId,
|
|
206
|
+
sessionKey: state.sessionKey,
|
|
207
|
+
prevState,
|
|
208
|
+
state: params.state,
|
|
209
|
+
reason: params.reason,
|
|
210
|
+
queueDepth: state.queueDepth
|
|
211
|
+
});
|
|
212
|
+
markActivity();
|
|
213
|
+
}
|
|
214
|
+
function logSessionStuck(params) {
|
|
215
|
+
const state = getDiagnosticSessionState(params);
|
|
216
|
+
diag.warn(`stuck session: sessionId=${state.sessionId ?? "unknown"} sessionKey=${state.sessionKey ?? "unknown"} state=${params.state} age=${Math.round(params.ageMs / 1e3)}s queueDepth=${state.queueDepth}`);
|
|
217
|
+
emitDiagnosticEvent({
|
|
218
|
+
type: "session.stuck",
|
|
219
|
+
sessionId: state.sessionId,
|
|
220
|
+
sessionKey: state.sessionKey,
|
|
221
|
+
state: params.state,
|
|
222
|
+
ageMs: params.ageMs,
|
|
223
|
+
queueDepth: state.queueDepth
|
|
224
|
+
});
|
|
225
|
+
markActivity();
|
|
226
|
+
}
|
|
227
|
+
function logLaneEnqueue(lane, queueSize) {
|
|
228
|
+
diag.debug(`lane enqueue: lane=${lane} queueSize=${queueSize}`);
|
|
229
|
+
emitDiagnosticEvent({
|
|
230
|
+
type: "queue.lane.enqueue",
|
|
231
|
+
lane,
|
|
232
|
+
queueSize
|
|
233
|
+
});
|
|
234
|
+
markActivity();
|
|
235
|
+
}
|
|
236
|
+
function logLaneDequeue(lane, waitMs, queueSize) {
|
|
237
|
+
diag.debug(`lane dequeue: lane=${lane} waitMs=${waitMs} queueSize=${queueSize}`);
|
|
238
|
+
emitDiagnosticEvent({
|
|
239
|
+
type: "queue.lane.dequeue",
|
|
240
|
+
lane,
|
|
241
|
+
queueSize,
|
|
242
|
+
waitMs
|
|
243
|
+
});
|
|
244
|
+
markActivity();
|
|
245
|
+
}
|
|
246
|
+
function logToolLoopAction(params) {
|
|
247
|
+
const payload = `tool loop: sessionId=${params.sessionId ?? "unknown"} sessionKey=${params.sessionKey ?? "unknown"} tool=${params.toolName} level=${params.level} action=${params.action} detector=${params.detector} count=${params.count}${params.pairedToolName ? ` pairedTool=${params.pairedToolName}` : ""} message="${params.message}"`;
|
|
248
|
+
if (params.level === "critical") diag.error(payload);
|
|
249
|
+
else diag.warn(payload);
|
|
250
|
+
emitDiagnosticEvent({
|
|
251
|
+
type: "tool.loop",
|
|
252
|
+
sessionId: params.sessionId,
|
|
253
|
+
sessionKey: params.sessionKey,
|
|
254
|
+
toolName: params.toolName,
|
|
255
|
+
level: params.level,
|
|
256
|
+
action: params.action,
|
|
257
|
+
detector: params.detector,
|
|
258
|
+
count: params.count,
|
|
259
|
+
message: params.message,
|
|
260
|
+
pairedToolName: params.pairedToolName
|
|
261
|
+
});
|
|
262
|
+
markActivity();
|
|
263
|
+
}
|
|
264
|
+
let heartbeatInterval = null;
|
|
265
|
+
function startDiagnosticHeartbeat(config) {
|
|
266
|
+
if (heartbeatInterval) return;
|
|
267
|
+
heartbeatInterval = setInterval(() => {
|
|
268
|
+
let heartbeatConfig = config;
|
|
269
|
+
if (!heartbeatConfig) try {
|
|
270
|
+
heartbeatConfig = loadConfig();
|
|
271
|
+
} catch {
|
|
272
|
+
heartbeatConfig = void 0;
|
|
273
|
+
}
|
|
274
|
+
const stuckSessionWarnMs = resolveStuckSessionWarnMs(heartbeatConfig);
|
|
275
|
+
const now = Date.now();
|
|
276
|
+
pruneDiagnosticSessionStates(now, true);
|
|
277
|
+
const activeCount = Array.from(diagnosticSessionStates.values()).filter((s) => s.state === "processing").length;
|
|
278
|
+
const waitingCount = Array.from(diagnosticSessionStates.values()).filter((s) => s.state === "waiting").length;
|
|
279
|
+
const totalQueued = Array.from(diagnosticSessionStates.values()).reduce((sum, s) => sum + s.queueDepth, 0);
|
|
280
|
+
if (!(lastActivityAt > 0 || webhookStats.received > 0 || activeCount > 0 || waitingCount > 0 || totalQueued > 0)) return;
|
|
281
|
+
if (now - lastActivityAt > 12e4 && activeCount === 0 && waitingCount === 0) return;
|
|
282
|
+
diag.debug(`heartbeat: webhooks=${webhookStats.received}/${webhookStats.processed}/${webhookStats.errors} active=${activeCount} waiting=${waitingCount} queued=${totalQueued}`);
|
|
283
|
+
emitDiagnosticEvent({
|
|
284
|
+
type: "diagnostic.heartbeat",
|
|
285
|
+
webhooks: {
|
|
286
|
+
received: webhookStats.received,
|
|
287
|
+
processed: webhookStats.processed,
|
|
288
|
+
errors: webhookStats.errors
|
|
289
|
+
},
|
|
290
|
+
active: activeCount,
|
|
291
|
+
waiting: waitingCount,
|
|
292
|
+
queued: totalQueued
|
|
293
|
+
});
|
|
294
|
+
loadCommandPollBackoffRuntime().then(({ pruneStaleCommandPolls }) => {
|
|
295
|
+
for (const [, state] of diagnosticSessionStates) pruneStaleCommandPolls(state);
|
|
296
|
+
}).catch((err) => {
|
|
297
|
+
diag.debug(`command-poll-backoff prune failed: ${String(err)}`);
|
|
298
|
+
});
|
|
299
|
+
for (const [, state] of diagnosticSessionStates) {
|
|
300
|
+
const ageMs = now - state.lastActivity;
|
|
301
|
+
if (state.state === "processing" && ageMs > stuckSessionWarnMs) logSessionStuck({
|
|
302
|
+
sessionId: state.sessionId,
|
|
303
|
+
sessionKey: state.sessionKey,
|
|
304
|
+
state: state.state,
|
|
305
|
+
ageMs
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}, 3e4);
|
|
309
|
+
heartbeatInterval.unref?.();
|
|
310
|
+
}
|
|
311
|
+
function stopDiagnosticHeartbeat() {
|
|
312
|
+
if (heartbeatInterval) {
|
|
313
|
+
clearInterval(heartbeatInterval);
|
|
314
|
+
heartbeatInterval = null;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
//#endregion
|
|
319
|
+
export { logMessageQueued as a, logWebhookError as c, startDiagnosticHeartbeat as d, stopDiagnosticHeartbeat as f, onDiagnosticEvent as g, isDiagnosticsEnabled as h, logMessageProcessed as i, logWebhookProcessed as l, emitDiagnosticEvent as m, logLaneDequeue as n, logSessionStateChange as o, getDiagnosticSessionState as p, logLaneEnqueue as r, logToolLoopAction as s, diag as t, logWebhookReceived as u };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { t as redactSensitiveText } from "./redact-BoNEjbpF.js";
|
|
2
|
+
|
|
3
|
+
//#region src/infra/errors.ts
|
|
4
|
+
function extractErrorCode(err) {
|
|
5
|
+
if (!err || typeof err !== "object") return;
|
|
6
|
+
const code = err.code;
|
|
7
|
+
if (typeof code === "string") return code;
|
|
8
|
+
if (typeof code === "number") return String(code);
|
|
9
|
+
}
|
|
10
|
+
function readErrorName(err) {
|
|
11
|
+
if (!err || typeof err !== "object") return "";
|
|
12
|
+
const name = err.name;
|
|
13
|
+
return typeof name === "string" ? name : "";
|
|
14
|
+
}
|
|
15
|
+
function collectErrorGraphCandidates(err, resolveNested) {
|
|
16
|
+
const queue = [err];
|
|
17
|
+
const seen = /* @__PURE__ */ new Set();
|
|
18
|
+
const candidates = [];
|
|
19
|
+
while (queue.length > 0) {
|
|
20
|
+
const current = queue.shift();
|
|
21
|
+
if (current == null || seen.has(current)) continue;
|
|
22
|
+
seen.add(current);
|
|
23
|
+
candidates.push(current);
|
|
24
|
+
if (!current || typeof current !== "object" || !resolveNested) continue;
|
|
25
|
+
for (const nested of resolveNested(current)) if (nested != null && !seen.has(nested)) queue.push(nested);
|
|
26
|
+
}
|
|
27
|
+
return candidates;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Type guard for NodeJS.ErrnoException (any error with a `code` property).
|
|
31
|
+
*/
|
|
32
|
+
function isErrno(err) {
|
|
33
|
+
return Boolean(err && typeof err === "object" && "code" in err);
|
|
34
|
+
}
|
|
35
|
+
function formatErrorMessage(err) {
|
|
36
|
+
let formatted;
|
|
37
|
+
if (err instanceof Error) formatted = err.message || err.name || "Error";
|
|
38
|
+
else if (typeof err === "string") formatted = err;
|
|
39
|
+
else if (typeof err === "number" || typeof err === "boolean" || typeof err === "bigint") formatted = String(err);
|
|
40
|
+
else try {
|
|
41
|
+
formatted = JSON.stringify(err);
|
|
42
|
+
} catch {
|
|
43
|
+
formatted = Object.prototype.toString.call(err);
|
|
44
|
+
}
|
|
45
|
+
return redactSensitiveText(formatted);
|
|
46
|
+
}
|
|
47
|
+
function formatUncaughtError(err) {
|
|
48
|
+
if (extractErrorCode(err) === "INVALID_CONFIG") return formatErrorMessage(err);
|
|
49
|
+
if (err instanceof Error) return redactSensitiveText(err.stack ?? err.message ?? err.name);
|
|
50
|
+
return formatErrorMessage(err);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
//#endregion
|
|
54
|
+
export { isErrno as a, formatUncaughtError as i, extractErrorCode as n, readErrorName as o, formatErrorMessage as r, collectErrorGraphCandidates as t };
|