activeclaw 2026.2.11 → 2026.2.13
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/CHANGELOG.md +106 -0
- package/dist/{accounts-DbzMEfKN.js → accounts-DCDeFTra.js} +2 -2
- package/dist/{accounts-C2elk6PC.js → accounts-DeqIQjo1.js} +2 -2
- package/dist/{acp-cli-CVFTdsQY.js → acp-cli-CeYI4XRd.js} +15 -16
- package/dist/{acp-cli-BpJwIyLl.js → acp-cli-rNbGXICg.js} +14 -15
- package/dist/{agent-Bz1r5O8q.js → agent-BvNJF5QL.js} +19 -15
- package/dist/{agent-22-R4bNS.js → agent-CyMxTyrG.js} +20 -16
- package/dist/{agent-scope-D8miw9q_.js → agent-scope-BIEhVP4_.js} +172 -4
- package/dist/{agent-scope-CGmuusG9.js → agent-scope-CQCus0rI.js} +3 -3
- package/dist/{agent-scope-DQuy3dwI.js → agent-scope-CsRbLH4l.js} +4 -4
- package/dist/{agent-scope-BEf5crnU.js → agent-scope-DPIFau3f.js} +5 -1
- package/dist/audio-preflight-BU8W7uxc.js +60 -0
- package/dist/audio-preflight-CGsumMzb.js +60 -0
- package/dist/audio-preflight-SLmkJI6-.js +74 -0
- package/dist/audio-preflight-jZc5mFCZ.js +71 -0
- package/dist/{audit-C4wLaF0D.js → audit-Dmww_503.js} +71 -19
- package/dist/{audit-CY-yopxa.js → audit-wPu26VMb.js} +72 -20
- package/dist/{tailscale-DU6DgqVy.js → auth-9x3lqfIY.js} +208 -3
- package/dist/{tailscale-Cu-2HNvU.js → auth-CQNl_IaI.js} +190 -3
- package/dist/{auth-health-BFKUoCwJ.js → auth-health-C4L4FGBA.js} +1 -1
- package/dist/{auth-health-d7BMZlWG.js → auth-health-j6epgQbq.js} +1 -1
- package/dist/{auth-profiles-Bv1AEm-Y.js → auth-profiles-ByNs3eEm.js} +87 -31
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +28 -22
- package/dist/bundled/session-memory/handler.js +33 -22
- package/dist/{call-7yrB6v4I.js → call-DVYCIV8m.js} +5 -5
- package/dist/{call-Bek1xlgk.js → call-SolyGS1r.js} +6 -6
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-3mdYN0C_.js → channel-options-BwC2yQcR.js} +4 -4
- package/dist/{channel-options-DJ0b1m7B.js → channel-options-Cq9BVDkP.js} +12 -7
- package/dist/{channel-selection-RZimme3j.js → channel-selection-D4D6ImhN.js} +2 -2
- package/dist/{channel-selection-B9b7Kuit.js → channel-selection-MZAHm4U8.js} +2 -2
- package/dist/{channels-cli-CYbK2Dku.js → channels-cli-9Dsk9Qm7.js} +57 -53
- package/dist/{channels-cli-BFznbGOs.js → channels-cli-BJUppQll.js} +59 -55
- package/dist/{channels-status-issues-B3KkflfR.js → channels-status-issues-D7GSV1GS.js} +1 -1
- package/dist/{channels-status-issues-DQkRaZts.js → channels-status-issues-DDAWeT-6.js} +1 -1
- package/dist/{chrome-Db7w64LF.js → chrome-BfB6JdKF.js} +4 -4
- package/dist/{chrome-Dm-EgOjJ.js → chrome-Cvr-57lg.js} +6 -5
- package/dist/{chrome-CF16STk9.js → chrome-DL0avO8n.js} +2 -1
- package/dist/{chrome-yIKmOzCO.js → chrome-foEwx3lN.js} +5 -4
- package/dist/{clack-prompter-BCiBkJVr.js → clack-prompter-Bz3Mmcl-.js} +5 -5
- package/dist/{clack-prompter-DuBVnTKy.js → clack-prompter-ChCGXfyt.js} +4 -4
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-Cl3PdJei.js → cli-ZR9ugUBX.js} +42 -38
- package/dist/cli-miPe4Ujz.js +93 -0
- package/dist/{client-6xKrRC-1.js → client-BrYfyoDK.js} +54 -5
- package/dist/{client-DMloFP_O.js → client-CTwXnRl7.js} +54 -5
- package/dist/{command-format-ayFsmwwz.js → command-format-Bxe0mWee.js} +1 -1
- package/dist/{command-options-BTAzyqqb.js → command-options-BvgxzPbK.js} +9 -4
- package/dist/{commands-CjEGXOZ_.js → commands-BX_OIIVR.js} +4 -4
- package/dist/{completion-cli-DrJGfJGl.js → completion-cli-CR77-jyv.js} +3 -3
- package/dist/{completion-cli-DOec3E2Z.js → completion-cli-DnjpxAag.js} +30 -30
- package/dist/{config-B00lvFac.js → config-Bdhomfei.js} +21 -7
- package/dist/{config-XBdA0ciN.js → config-BvMsmctM.js} +83 -9
- package/dist/{config-BqGVMf1y.js → config-QYrbd7x7.js} +60 -6
- package/dist/{config--NUdpACy.js → config-aFQssWKX.js} +21 -7
- package/dist/{config-guard-4kCO_rnQ.js → config-guard-CljaSxJd.js} +160 -51
- package/dist/{configure-B69emwZv.js → configure-BXLiucXo.js} +28 -25
- package/dist/{configure-sMhpLzFf.js → configure-BYPqXzGZ.js} +28 -25
- package/dist/control-auth-8Cf4WXpR.js +54 -0
- package/dist/control-auth-DBCu3qyv.js +54 -0
- package/dist/{control-service-Db_1V-KY.js → control-service-B5KnPqGP.js} +11 -5
- package/dist/{control-service-IRAmbcbN.js → control-service-DKnttEus.js} +10 -4
- package/dist/control-ui/assets/{index-CnB9IO4a.js → index-B4LPvte9.js} +369 -369
- package/dist/control-ui/assets/index-B4LPvte9.js.map +1 -0
- package/dist/control-ui/index.html +1 -1
- package/dist/{cron-cli-Cum2324v.js → cron-cli-D7BRjDv2.js} +20 -20
- package/dist/{cron-cli-DhUWcYdk.js → cron-cli-z1zk_FXQ.js} +19 -19
- package/dist/{daemon-cli-q7nkEF5-.js → daemon-cli-BDkU2ocb.js} +60 -21
- package/dist/{daemon-cli-CTC2CHci.js → daemon-cli-cNSF93-v.js} +59 -20
- package/dist/{daemon-runtime-c0uXH4Dl.js → daemon-runtime-B0tg_LsX.js} +3 -3
- package/dist/{daemon-runtime-UsK-tOty.js → daemon-runtime-Bsjeut6m.js} +3 -3
- package/dist/{deliver-hf-WKyWd.js → deliver-CIU9Npgs.js} +373 -281
- package/dist/{deliver-CT6KiDqO.js → deliver-DYYCo1G7.js} +369 -278
- package/dist/{deliver-T9d44OpZ.js → deliver-LsxKETro.js} +371 -279
- package/dist/{deliver-CPy8jYj9.js → deliver-xUU3mGHo.js} +369 -277
- package/dist/{deps-Bv1kLtwo.js → deps-QSwGcoNZ.js} +2 -2
- package/dist/{deps-DFQdAWQc.js → deps-lAAA2zYI.js} +2 -2
- package/dist/{devices-cli-Cm7U1py9.js → devices-cli-BG3-2oqt.js} +14 -14
- package/dist/{devices-cli-ZpjlfK-e.js → devices-cli-VIQtOvt_.js} +14 -14
- package/dist/{directory-cli-B14TUSJA.js → directory-cli-BCJwjVC0.js} +16 -16
- package/dist/{directory-cli-67kzd4I5.js → directory-cli-jYzZ02gk.js} +14 -14
- package/dist/{dispatcher-3ElQWGVI.js → dispatcher-DY51b-Zc.js} +2 -2
- package/dist/{dns-cli-CU-xfhTN.js → dns-cli-DHIiMJjS.js} +12 -12
- package/dist/{dns-cli-Dqj7O6Q_.js → dns-cli-pZlv87Ib.js} +11 -11
- package/dist/{docs-cli-CamBqzb5.js → docs-cli-2JDiwfzP.js} +8 -8
- package/dist/{docs-cli-Cj3L5oqB.js → docs-cli-BhkYqoIQ.js} +7 -7
- package/dist/{doctor-BV1kvbMm.js → doctor-Bf8EhNtA.js} +36 -35
- package/dist/{doctor-BJirShBi.js → doctor-sYG5V4Co.js} +34 -33
- package/dist/entry.js +56 -18
- package/dist/{env-BxRc6wWv.js → env-ONzUVAG2.js} +1 -1
- package/dist/{exec-CijMSZd9.js → exec-B8lXct-k.js} +503 -14
- package/dist/{exec-B8JKbXKW.js → exec-CACT5OAW.js} +1 -1
- package/dist/{exec-57A8Rlc8.js → exec-CJFFoM7H.js} +32 -13
- package/dist/{exec-Cv_Ofd1m.js → exec-YIosokWE.js} +1 -1
- package/dist/{exec-approvals-cli-DEzz9Iai.js → exec-approvals-cli-7LH0lwhO.js} +21 -21
- package/dist/{exec-approvals-cli-DhXj3hQX.js → exec-approvals-cli-apGnQbpj.js} +21 -21
- package/dist/extensionAPI.js +7733 -8746
- package/dist/fetch-DmiOpALK.js +274 -0
- package/dist/fetch-timeout-BEtUjM1S.js +274 -0
- package/dist/fetch-timeout-DEoXG_SF.js +274 -0
- package/dist/fetch-timeout-DTK9vxex.js +274 -0
- package/dist/{gateway-cli-D1EdIq8I.js → gateway-cli-DUdYxlZS.js} +491 -136
- package/dist/{gateway-cli-B_xDUDy2.js → gateway-cli-DbvWmE-9.js} +495 -140
- package/dist/{gateway-rpc-3B5y445n.js → gateway-rpc-BByb2Snz.js} +3 -3
- package/dist/{gateway-rpc-BoL2vinh.js → gateway-rpc-wXSCUZXj.js} +3 -3
- package/dist/{github-copilot-auth-Omqrto0J.js → github-copilot-auth-D7ewvpMd.js} +205 -17
- package/dist/{github-copilot-auth-CZxurvdz.js → github-copilot-auth-DDispnyz.js} +205 -17
- package/dist/{github-copilot-token-SLWintYd.js → github-copilot-token-Cfs0Wxr8.js} +1 -1
- package/dist/{gmail-setup-utils-BXQKsLtI.js → gmail-setup-utils-Cfns8TQx.js} +3 -3
- package/dist/{gmail-setup-utils-CHcssBOA.js → gmail-setup-utils-DJb-_5kO.js} +4 -4
- package/dist/{health-format-Dy1caGsq.js → health-format-KGPokKJH.js} +97 -42
- package/dist/{health-format-DrGFg8bx.js → health-format-LZDxu3rv.js} +95 -40
- package/dist/{help-format-DAj7l5uV.js → help-format-C48TXngO.js} +1 -1
- package/dist/{help-format-CUnac_bT.js → help-format-R5fLToDw.js} +1 -1
- package/dist/{hooks-cli-ptEf6TIM.js → hooks-cli-CT8JCRkH.js} +51 -46
- package/dist/{hooks-cli-Bhf5VRp1.js → hooks-cli-S1MKumJO.js} +49 -44
- package/dist/{hooks-status-Br-2bK2G.js → hooks-status-Cw0xD8Lt.js} +3 -3
- package/dist/{hooks-status-DNQJSa4B.js → hooks-status-D9MhwHRp.js} +3 -3
- package/dist/{image-rOFfK3PJ.js → image-Brk1sJbw.js} +10 -7
- package/dist/{image-fUwR7slg.js → image-C4Nn2p3e.js} +10 -7
- package/dist/{image-Ds4NLGPR.js → image-DgtfXMcX.js} +9 -6
- package/dist/{image-Dnnxt82I.js → image-RKwc3fsL.js} +8 -5
- package/dist/index.js +208 -97
- package/dist/{installs-CRSjQxbR.js → installs-CrLcWYHe.js} +8 -7
- package/dist/{installs-89zeUsVn.js → installs-DscWb9b9.js} +8 -7
- package/dist/{links-7M-j83As.js → links-B8LAzWwg.js} +1 -1
- package/dist/{links-C591fM9M.js → links-Eax1UO3w.js} +1 -1
- package/dist/llm-slug-generator.js +18 -19
- package/dist/{loader-wXwp4rZJ.js → loader-KjT074JR.js} +5722 -6888
- package/dist/{logging-MMRGFxGI.js → logging-BAyPwvdH.js} +1 -1
- package/dist/{logging-DuK6YXuK.js → logging-CRq4h04P.js} +2 -2
- package/dist/{login-qr-wM8BnKJh.js → login-qr-B6ZgAuIf.js} +5 -5
- package/dist/{login-qr-CPEsT6dN.js → login-qr-Bua-p0nG.js} +3 -4
- package/dist/{login-qr-CGEu5TU-.js → login-qr-CuvemJj4.js} +6 -6
- package/dist/{login-qr-DH150tTp.js → login-qr-Djr1JfIf.js} +2 -2
- package/dist/{logs-cli-ClgkHnfT.js → logs-cli-9IAV7rWY.js} +38 -22
- package/dist/{logs-cli-CmfINsOj.js → logs-cli-EiKzUFPa.js} +37 -21
- package/dist/{manager-DYo4PlVM.js → manager-BIMh_eSm.js} +7 -8
- package/dist/{manager-D6EbxDV4.js → manager-CwinWQoz.js} +5 -5
- package/dist/{manager-BbnHek5T.js → manager-DkqF1GiK.js} +9 -9
- package/dist/{manager-CcVYv0N5.js → manager-T1XfGchB.js} +8 -8
- package/dist/{manifest-registry-3It8Z8yN.js → manifest-registry-CQhdnDBZ.js} +40 -2
- package/dist/{manifest-registry-D5SiA3xq.js → manifest-registry-u0okVSkU.js} +40 -2
- package/dist/{message-channel-Cu61-7H6.js → message-channel-BLi2a6Yw.js} +1 -1
- package/dist/{message-channel-BlgPSDAh.js → message-channel-C_MmebBt.js} +1 -1
- package/dist/{model-auth-ioeR_zLX.js → model-auth-CabXIF6O.js} +116 -34
- package/dist/{model-selection-BK7DuyH8.js → model-selection-BLuqsGVB.js} +86 -30
- package/dist/{model-selection-CezC36lH.js → model-selection-C1GmkTAV.js} +84 -28
- package/dist/{models-cli-C3uGdOrd.js → models-cli-9jmDv-h3.js} +52 -48
- package/dist/{models-cli-CUIVPgXE.js → models-cli-zS9rtWz8.js} +53 -49
- package/dist/{node-cli-BxBGSuPE.js → node-cli-CrpTxTTs.js} +28 -26
- package/dist/{node-cli-CdYAsuQQ.js → node-cli-wemUMCg-.js} +28 -26
- package/dist/{node-service-u8g85nD3.js → node-service-C8DTHTMg.js} +2 -2
- package/dist/{node-service-CM5vkdIo.js → node-service-WQuEKz6W.js} +2 -2
- package/dist/{nodes-cli-By6yeCTB.js → nodes-cli-BaU2SIFw.js} +20 -20
- package/dist/{nodes-cli-BaVMTAPc.js → nodes-cli-Dx23D72n.js} +20 -20
- package/dist/{nodes-screen-Dvl_ohUY.js → nodes-screen-C0IuBqUL.js} +1 -1
- package/dist/{note-5WqioBRA.js → note-BhRSeNeu.js} +2 -2
- package/dist/{note-Ci08TSbV.js → note-hhtubr2j.js} +1 -1
- package/dist/{onboard-channels-DxXvp8og.js → onboard-channels-C501x8GI.js} +8 -8
- package/dist/{onboard-channels-CXhnVy4E.js → onboard-channels-Dxzroasd.js} +8 -8
- package/dist/{onboard-skills-CBxsRGyf.js → onboard-skills-DV0Qzvjj.js} +440 -136
- package/dist/{onboard-skills-DQwOQ6Ry.js → onboard-skills-rlBHcu3Q.js} +439 -135
- package/dist/{onboarding-Du_7qEng.js → onboarding-CN-EDLjd.js} +38 -38
- package/dist/{openclaw-root-JLDMp6ux.js → openclaw-root-1VeFrph_.js} +4 -0
- package/dist/{openclaw-root-Dw6gumSU.js → openclaw-root-BNlEap4i.js} +4 -0
- package/dist/{pairing-cli-CRQDpj8f.js → pairing-cli-CDHG4xuI.js} +15 -15
- package/dist/{pairing-cli-Cng1KFWw.js → pairing-cli-CQP34Dlx.js} +15 -15
- package/dist/{pairing-labels-Ciu3Zoxj.js → pairing-labels-B6CN0SNH.js} +1 -1
- package/dist/{pairing-labels-CWFEtSc3.js → pairing-labels-CgNHnjzT.js} +1 -1
- package/dist/{pairing-store-c-QQ2u8p.js → pairing-store-CmlRVqOz.js} +2 -2
- package/dist/{pairing-store-CgXR3ZWJ.js → pairing-store-Dp5_JGnG.js} +3 -3
- package/dist/{path-env-CXWUFfFv.js → path-env-CLvYNwtL.js} +1 -1
- package/dist/{path-env-BgLvMbz_.js → path-env-CaYUVIML.js} +2 -2
- package/dist/{paths-MnZaxqPw.js → paths-B0a4ywSO.js} +30 -5
- package/dist/{paths-Bkhd_qY8.js → paths-B49s6UZQ.js} +30 -5
- package/dist/{paths-DL6EIRTw.js → paths-D0O87MfH.js} +30 -5
- package/dist/{paths-IivnSNkP.js → paths-DLINmNFQ.js} +31 -6
- package/dist/{pi-embedded-CgPTEqlB.js → pi-embedded-Ctrt2kz0.js} +8759 -9600
- package/dist/{pi-embedded-helpers-DYH6OWft.js → pi-embedded-helpers-CMKLjW6X.js} +68 -9
- package/dist/{pi-embedded-helpers-y1_Se0yq.js → pi-embedded-helpers-CUzTc1v6.js} +241 -24
- package/dist/{pi-embedded-helpers-Bkpd4fTr.js → pi-embedded-helpers-DfwkwPYD.js} +67 -8
- package/dist/{pi-embedded-helpers-BbWRSUnc.js → pi-embedded-helpers-WDwx99UA.js} +347 -32
- package/dist/{pi-tools.policy-akYsGFiA.js → pi-tools.policy-BpsROZbz.js} +4 -4
- package/dist/{plugin-auto-enable-lZwe2yX5.js → plugin-auto-enable-Bqhc3w5n.js} +5 -5
- package/dist/{plugin-auto-enable-AOSOJ-v1.js → plugin-auto-enable-PW76g_PJ.js} +5 -5
- package/dist/plugin-sdk/agents/bash-process-registry.d.ts +1 -0
- package/dist/plugin-sdk/agents/models-config.providers.d.ts +10 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/errors.d.ts +5 -1
- package/dist/plugin-sdk/agents/pi-embedded-helpers.d.ts +1 -1
- package/dist/plugin-sdk/agents/pi-embedded-runner/google.d.ts +1 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/params.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/payloads.d.ts +1 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/types.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/types.d.ts +15 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.tools.d.ts +1 -1
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.types.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.types.d.ts +2 -0
- package/dist/plugin-sdk/agents/session-tool-result-guard-wrapper.d.ts +2 -0
- package/dist/plugin-sdk/agents/session-tool-result-guard.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/agent-step.d.ts +3 -0
- package/dist/plugin-sdk/agents/tools/browser-tool.schema.d.ts +1 -1
- package/dist/plugin-sdk/agents/tools/web-search.d.ts +10 -1
- package/dist/plugin-sdk/agents/usage.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/heartbeat.d.ts +1 -1
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply/mentions.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply/model-selection.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-reference.d.ts +1 -1
- package/dist/plugin-sdk/auto-reply/reply/session-run-accounting.d.ts +11 -0
- package/dist/plugin-sdk/auto-reply/reply/session-usage.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/types.d.ts +2 -0
- package/dist/plugin-sdk/browser/control-auth.d.ts +13 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/signal.d.ts +1 -0
- package/dist/plugin-sdk/cli/prompt.d.ts +1 -0
- package/dist/plugin-sdk/commands/agent/types.d.ts +2 -0
- package/dist/plugin-sdk/commands/onboard-types.d.ts +7 -1
- package/dist/plugin-sdk/config/sessions/paths.d.ts +7 -2
- package/dist/plugin-sdk/config/types.agents.d.ts +2 -0
- package/dist/plugin-sdk/config/types.discord.d.ts +5 -0
- package/dist/plugin-sdk/config/types.gateway.d.ts +15 -0
- package/dist/plugin-sdk/config/types.hooks.d.ts +15 -0
- package/dist/plugin-sdk/config/types.memory.d.ts +2 -0
- package/dist/plugin-sdk/config/zod-schema.agents.d.ts +1 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +13 -1
- package/dist/plugin-sdk/config/zod-schema.hooks.d.ts +1 -1
- package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +9 -0
- package/dist/plugin-sdk/config/zod-schema.providers.d.ts +4 -0
- package/dist/plugin-sdk/cron/service/jobs.d.ts +8 -0
- package/dist/plugin-sdk/cron/service/state.d.ts +1 -0
- package/dist/plugin-sdk/cron/types.d.ts +2 -0
- package/dist/plugin-sdk/discord/monitor/allow-list.d.ts +15 -0
- package/dist/plugin-sdk/discord/send.types.d.ts +5 -0
- package/dist/plugin-sdk/gateway/auth.d.ts +36 -0
- package/dist/plugin-sdk/gateway/protocol/index.d.ts +0 -3
- package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +7 -1
- package/dist/plugin-sdk/gateway/session-utils.fs.d.ts +3 -1
- package/dist/plugin-sdk/index.js +935 -660
- package/dist/plugin-sdk/infra/binaries.d.ts +3 -0
- package/dist/plugin-sdk/infra/heartbeat-active-hours.d.ts +5 -0
- package/dist/plugin-sdk/infra/heartbeat-runner.d.ts +1 -0
- package/dist/plugin-sdk/infra/net/fetch-guard.d.ts +1 -0
- package/dist/plugin-sdk/infra/net/ssrf.d.ts +1 -0
- package/dist/plugin-sdk/infra/tailscale.d.ts +34 -0
- package/dist/plugin-sdk/infra/tmp-openclaw-dir.d.ts +10 -0
- package/dist/plugin-sdk/logging/console.d.ts +1 -0
- package/dist/plugin-sdk/logging/logger.d.ts +1 -1
- package/dist/plugin-sdk/logging/state.d.ts +1 -0
- package/dist/plugin-sdk/markdown/ir.d.ts +1 -1
- package/dist/plugin-sdk/markdown/whatsapp.d.ts +14 -0
- package/dist/plugin-sdk/media/input-files.d.ts +5 -0
- package/dist/plugin-sdk/media-understanding/audio-preflight.d.ts +16 -0
- package/dist/plugin-sdk/media-understanding/types.d.ts +1 -0
- package/dist/plugin-sdk/memory/backend-config.d.ts +2 -1
- package/dist/plugin-sdk/memory/qmd-manager.d.ts +2 -0
- package/dist/plugin-sdk/memory/qmd-query-parser.d.ts +8 -0
- package/dist/plugin-sdk/process/command-queue.d.ts +16 -0
- package/dist/plugin-sdk/routing/resolve-route.d.ts +3 -1
- package/dist/plugin-sdk/security/external-content.d.ts +1 -1
- package/dist/plugin-sdk/security/secret-equal.d.ts +1 -0
- package/dist/plugin-sdk/sessions/input-provenance.d.ts +16 -0
- package/dist/plugin-sdk/signal/monitor/event-handler.types.d.ts +8 -0
- package/dist/plugin-sdk/signal/monitor/mentions.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/commands.d.ts +5 -0
- package/dist/plugin-sdk/telegram/bot-message-context.d.ts +2 -1
- package/dist/plugin-sdk/telegram/send.d.ts +3 -0
- package/dist/plugin-sdk/web/media.d.ts +2 -0
- package/dist/{plugins-Db5BiELK.js → plugins-4Hqd1WGf.js} +3 -3
- package/dist/{plugins-CNaHNND_.js → plugins-X7d_tfTE.js} +4 -4
- package/dist/{plugins-cli-8G-hQPCu.js → plugins-cli-Bgku3EGj.js} +253 -44
- package/dist/{plugins-cli-CDiocaDE.js → plugins-cli-CVToH3if.js} +257 -48
- package/dist/{ports-BeebfNCb.js → ports-qkt29rdC.js} +2 -2
- package/dist/{program-0Cj9YxRN.js → program-Cf7lkBur.js} +82 -80
- package/dist/{progress-DIQJt9Va.js → progress-C9kngsTD.js} +1 -1
- package/dist/{progress-Da1ehW-x.js → progress-DWqhRakV.js} +1 -1
- package/dist/{prompt-style-Dc0C5HC9.js → prompt-style-BFH5D5LN.js} +1 -1
- package/dist/{prompt-style-CjQRlDx4.js → prompt-style-CIbmaxSa.js} +1 -1
- package/dist/{pw-ai-C43wv1ZF.js → pw-ai-8mdv3h-d.js} +7 -6
- package/dist/{pw-ai-COWYvUfG.js → pw-ai-CM1IsSgZ.js} +6 -6
- package/dist/{pw-ai-BxJ-KCIy.js → pw-ai-FGoRVblI.js} +5 -6
- package/dist/{pw-ai-CsvaObGM.js → pw-ai-sS1fRKW_.js} +3 -3
- package/dist/{qmd-manager-CpsjQyaZ.js → qmd-manager-C67Fc8aN.js} +79 -26
- package/dist/{qmd-manager-C9YWFeG6.js → qmd-manager-CXVbfg99.js} +81 -26
- package/dist/{qmd-manager-C02E8ixK.js → qmd-manager-RMRE8Tqt.js} +81 -26
- package/dist/{qmd-manager-BzY2LQTT.js → qmd-manager-pyc_MTIe.js} +78 -23
- package/dist/{register.subclis-DUkirdHn.js → register.subclis-C02e4zuJ.js} +29 -29
- package/dist/{reply--b7BsXGP.js → reply-DICXkh_C.js} +7289 -8455
- package/dist/{routes-DUkEKAc1.js → routes-CmOI1hIH.js} +29 -11
- package/dist/{routes-B4QQiFju.js → routes-DewK5tq2.js} +29 -12
- package/dist/{rpc-CuMtxrRT.js → rpc-DHr30euf.js} +3 -3
- package/dist/{rpc-Blt6MJ4F.js → rpc-T300F8zI.js} +3 -3
- package/dist/{run-main-XZcPA23b.js → run-main-C5wpthq1.js} +84 -82
- package/dist/runner-CY0nmVme.js +1886 -0
- package/dist/runner-Cfm5nTMc.js +1785 -0
- package/dist/runner-D_dujMod.js +1886 -0
- package/dist/runner-DrGYLH5K.js +1785 -0
- package/dist/{sandbox-Aks-9EcZ.js → sandbox-BKYnhYQH.js} +24 -17
- package/dist/{sandbox-DqUO2K83.js → sandbox-Bhjnh1Xg.js} +23 -16
- package/dist/{sandbox-cli-C99Thxi8.js → sandbox-cli-DBsAjZJN.js} +21 -21
- package/dist/{sandbox-cli-CJqRM4V6.js → sandbox-cli-rV9LtFeu.js} +21 -21
- package/dist/{security-cli-iqYLMOz3.js → security-cli-BIwJM_rs.js} +27 -27
- package/dist/{security-cli-DW3lCz-o.js → security-cli-BRjny8Yu.js} +27 -27
- package/dist/{server-context-fX4xiYRh.js → server-context-BGpGs3qd.js} +7 -7
- package/dist/{server-context-8Qt35QdF.js → server-context-Cl0U0vE3.js} +7 -7
- package/dist/{server-node-events-CHWXfb_T.js → server-node-events-CBfTbiTA.js} +48 -44
- package/dist/{server-node-events-BzrEnKLX.js → server-node-events-QCvh8EgI.js} +45 -41
- package/dist/{service-Cd4BxKuo.js → service--nPk7DvT.js} +8 -4
- package/dist/{service-DDPRbf8a.js → service-99RDXwX4.js} +8 -4
- package/dist/{service-audit-CCFxuvKs.js → service-audit-DnLmRGQt.js} +4 -4
- package/dist/{service-audit-x6jCN-6a.js → service-audit-ckBaRCVC.js} +4 -4
- package/dist/{session-cost-usage-CcCEQNuc.js → session-cost-usage-D7HuoSSD.js} +12 -10
- package/dist/{session-cost-usage-PvyVZz-g.js → session-cost-usage-D9hHANWI.js} +12 -10
- package/dist/{shared-ILguacOr.js → shared-Bs4vduG4.js} +3 -3
- package/dist/{shared-CagUDdmp.js → shared-CEY5IkwG.js} +3 -3
- package/dist/{shared-gOyV38rM.js → shared-DRohONn_.js} +4 -4
- package/dist/{shared-BDk_zC9p.js → shared-ICqOZibV.js} +4 -4
- package/dist/{skill-scanner-C_fQzVDu.js → skill-scanner-CucvxYhu.js} +1 -1
- package/dist/{skill-scanner-DrVEHfC6.js → skill-scanner-rHMtUHtP.js} +1 -1
- package/dist/{skills-D5UZZZSY.js → skills-DRjfSQT3.js} +141 -6
- package/dist/{skills-ccAgQ3Ad.js → skills-DprQj9X2.js} +142 -7
- package/dist/{skills-cli-DQilTG3n.js → skills-cli-9WO-C55s.js} +12 -12
- package/dist/{skills-cli-ggyLBtAY.js → skills-cli-B9eej-EW.js} +13 -13
- package/dist/{skills-status-BosMnzIs.js → skills-status-5U3P3YfJ.js} +3 -3
- package/dist/{skills-status-DjtPPMnY.js → skills-status-TDIgVd1K.js} +2 -2
- package/dist/{sqlite-B7FPASCO.js → sqlite-BINzs1U0.js} +2 -2
- package/dist/{sqlite-Btrgi7-j.js → sqlite-D4w5TejA.js} +3 -3
- package/dist/{sqlite-BrQ9tw8B.js → sqlite-DRRHmlug.js} +3 -3
- package/dist/{sqlite-HepBVDoX.js → sqlite-F6PGkEm1.js} +2 -2
- package/dist/{status-BByCntWS.js → status-BKGkKC_v.js} +3 -3
- package/dist/{status-Dt7RE_Yy.js → status-CiHtHdaa.js} +4 -4
- package/dist/{status-zfL4Yej7.js → status-DDWoOpeB.js} +37 -37
- package/dist/{subsystem-Bh1Y_6Uv.js → subsystem-BoExtIHo.js} +52 -17
- package/dist/{system-cli-DwuUkdkH.js → system-cli-B6lr60Io.js} +14 -14
- package/dist/{system-cli-Clqsx8U5.js → system-cli-CprW9G3h.js} +14 -14
- package/dist/{systemd-BEWwfwn0.js → systemd-C0VZriGM.js} +3 -3
- package/dist/{systemd-D6wTPnHi.js → systemd-DrmBtJ5T.js} +3 -3
- package/dist/{systemd-hints-zi4ohCOY.js → systemd-hints-DZtXiVHa.js} +1 -1
- package/dist/{systemd-linger-CDo2UbHM.js → systemd-linger-NC2kl1SC.js} +2 -2
- package/dist/{systemd-linger-BxjTrgoH.js → systemd-linger-xdn3BdPh.js} +2 -2
- package/dist/{table-DEnmtvl5.js → table-B8dx3v4v.js} +2 -2
- package/dist/{table-cCoGqLsk.js → table-CwulTLQp.js} +1 -1
- package/dist/{tool-display-DskiU8Kt.js → tool-display-CZRIDMRm.js} +2 -2
- package/dist/{tool-display-o-dDAlqF.js → tool-display-ClRud3pg.js} +2 -2
- package/dist/{tui-BdJWZdto.js → tui-CVTQn-dC.js} +14 -13
- package/dist/{tui-Bc7XUQGP.js → tui-Lu8FdrlK.js} +13 -14
- package/dist/{tui-cli-BGYh0UL0.js → tui-cli-BLpTj1X9.js} +27 -27
- package/dist/{tui-cli-D3n-O9zB.js → tui-cli-BLx5kL2I.js} +26 -26
- package/dist/{tui-formatters-CA85v4U2.js → tui-formatters-CNySEfJN.js} +6 -6
- package/dist/{tui-formatters-C3NarH24.js → tui-formatters-DePhZK3J.js} +6 -6
- package/dist/{update-JB16aPIY.js → update-DHVxMTpQ.js} +3 -3
- package/dist/{update-Ct9sqJC_.js → update-DU1geolI.js} +3 -3
- package/dist/{update-cli-wWKDS3cm.js → update-cli-C0hUvJWK.js} +89 -71
- package/dist/{update-cli-DDXp_N9B.js → update-cli-Wb1GB3rL.js} +88 -70
- package/dist/{update-runner-ChTf6O6p.js → update-runner--ixK4J3W.js} +11 -11
- package/dist/{update-runner-CmE6cHdn.js → update-runner-7Qa1T9y6.js} +10 -10
- package/dist/{utils-Dk86IbEs.js → utils-BLJAc3ZV.js} +1 -1
- package/dist/{utils-es4ygvQ-.js → utils-Cd9QdCHh.js} +1 -1
- package/dist/{webhooks-cli-CVIE9TtX.js → webhooks-cli-DgcMy7RG.js} +12 -12
- package/dist/{webhooks-cli-BmKSiQQC.js → webhooks-cli-aVzUcJY9.js} +11 -11
- package/dist/{widearea-dns-2ah0bkAj.js → widearea-dns-BaIgNEhY.js} +3 -3
- package/dist/{widearea-dns-CMIG6-74.js → widearea-dns-DzuRdwk5.js} +3 -3
- package/dist/{ws-DtDKpbLR.js → ws-CHCQHs0F.js} +1 -1
- package/dist/{ws-log-BP3z_g6Z.js → ws-log-CIXbLCka.js} +1 -1
- package/dist/{ws-log-D7MkvKhg.js → ws-log-DcQFZByi.js} +2 -2
- package/dist/{wsl-Cwo7X0Un.js → wsl-BUOkxKJu.js} +2 -2
- package/docs/assets/install-script.svg +1 -0
- package/docs/automation/hooks.md +1 -38
- package/docs/automation/webhook.md +43 -2
- package/docs/channels/discord.md +389 -381
- package/docs/channels/imessage.md +229 -218
- package/docs/channels/slack.md +294 -415
- package/docs/channels/telegram.md +401 -505
- package/docs/channels/whatsapp.md +338 -310
- package/docs/ci.md +0 -12
- package/docs/cli/hooks.md +1 -14
- package/docs/cli/index.md +6 -1
- package/docs/cli/logs.md +4 -0
- package/docs/cli/onboard.md +30 -0
- package/docs/cli/plugins.md +20 -1
- package/docs/cli/security.md +1 -0
- package/docs/concepts/memory.md +7 -4
- package/docs/concepts/session-tool.md +1 -0
- package/docs/docs.json +11 -11
- package/docs/gateway/configuration-examples.md +9 -2
- package/docs/gateway/configuration-reference.md +2329 -0
- package/docs/gateway/configuration.md +338 -3304
- package/docs/gateway/index.md +162 -238
- package/docs/gateway/openresponses-http-api.md +15 -0
- package/docs/gateway/security/index.md +3 -0
- package/docs/help/faq.md +9 -0
- package/docs/install/hetzner.md +21 -0
- package/docs/install/installer.md +20 -0
- package/docs/nodes/audio.md +19 -0
- package/docs/platforms/mac/release.md +7 -7
- package/docs/providers/glm.md +3 -3
- package/docs/providers/index.md +1 -0
- package/docs/providers/litellm.md +153 -0
- package/docs/providers/zai.md +2 -2
- package/docs/reference/templates/AGENTS.md +26 -26
- package/docs/reference/templates/HEARTBEAT.md +31 -2
- package/docs/reference/templates/SOUL.md +14 -8
- package/docs/reference/transcript-hygiene.md +18 -0
- package/docs/start/getting-started.md +5 -0
- package/docs/start/wizard-cli-automation.md +17 -0
- package/docs/start/wizard-cli-reference.md +12 -0
- package/docs/tools/browser.md +6 -0
- package/docs/zh-CN/automation/hooks.md +1 -38
- package/docs/zh-CN/cli/hooks.md +1 -14
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/bluebubbles/src/monitor.test.ts +40 -28
- package/extensions/bluebubbles/src/monitor.ts +0 -4
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +10 -10
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +2 -5
- package/extensions/feishu/src/bot.checkBotMentioned.test.ts +64 -0
- package/extensions/feishu/src/bot.ts +1 -1
- package/extensions/feishu/src/channel.test.ts +48 -0
- package/extensions/feishu/src/channel.ts +1 -3
- package/extensions/feishu/src/config-schema.ts +6 -0
- package/extensions/feishu/src/docx.ts +14 -4
- package/extensions/feishu/src/media.test.ts +151 -0
- package/extensions/feishu/src/media.ts +27 -13
- package/extensions/feishu/src/reply-dispatcher.test.ts +116 -0
- package/extensions/feishu/src/reply-dispatcher.ts +124 -67
- package/extensions/feishu/src/streaming-card.ts +223 -0
- package/extensions/feishu/src/targets.test.ts +16 -0
- package/extensions/feishu/src/targets.ts +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/irc/src/client.ts +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +6 -0
- package/extensions/matrix/package.json +2 -2
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/index.ts +6 -2
- package/extensions/memory-lancedb/package.json +2 -2
- package/extensions/minimax-portal-auth/index.ts +7 -5
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +6 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +6 -0
- package/extensions/nostr/package.json +2 -2
- package/extensions/open-prose/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +6 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +6 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/voice-call/src/media-stream.ts +7 -1
- package/extensions/voice-call/src/providers/twilio.test.ts +5 -3
- package/extensions/voice-call/src/providers/twilio.ts +12 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +6 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +6 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +26 -22
- package/dist/auth-BcNHFK-i.js +0 -184
- package/dist/auth-BvIPpm7G.js +0 -184
- package/dist/boolean-M-esQJt6.js +0 -30
- package/dist/bundled/soul-evil/HOOK.md +0 -71
- package/dist/bundled/soul-evil/handler.js +0 -194
- package/dist/cli-DJbWJ9aB.js +0 -89
- package/dist/config-CI7EpvlP.js +0 -15
- package/dist/control-ui/assets/index-CnB9IO4a.js.map +0 -1
- package/dist/date-time-c6HTX6IW.js +0 -187
- package/dist/frontmatter-xwTm0734.js +0 -105
- package/dist/parse-duration-De_tAQSe.js +0 -24
- package/dist/session-key-nXYQSv-a.js +0 -167
- package/dist/utils-dp_OM900.js +0 -476
- package/docs/hooks/soul-evil.md +0 -69
- package/docs/zh-CN/hooks/soul-evil.md +0 -72
- /package/dist/{archive-CXhvR9nU.js → archive-beaSfAzA.js} +0 -0
- /package/dist/{brew-BIrWdDps.js → brew-BUIxHEkn.js} +0 -0
- /package/dist/{brew-B7YK4ZoL.js → brew-ROHf0-Xp.js} +0 -0
- /package/dist/{cli-utils-PlLcDZlM.js → cli-utils-CRhVAaLV.js} +0 -0
- /package/dist/{cli-utils-R-ECs5cY.js → cli-utils-LcHOt63h.js} +0 -0
- /package/dist/{command-format-BUxhT1xL.js → command-format-qUVxzqYm.js} +0 -0
- /package/dist/{constants-CNTiY-ZN.js → constants-BvQ6S8j5.js} +0 -0
- /package/dist/{constants-DuoCkWRh.js → constants-JPeoOZnw.js} +0 -0
- /package/dist/{errors-D3tYRJWG.js → errors-B91HIDPD.js} +0 -0
- /package/dist/{errors-B0eT3jVv.js → errors-Bv81hF2P.js} +0 -0
- /package/dist/{errors-x4NYs-1P.js → errors-DjZBTJJ3.js} +0 -0
- /package/dist/{exec-approvals-DGPTjO0N.js → exec-approvals-Cb4ZLukq.js} +0 -0
- /package/dist/{exec-approvals-DhmKpiIo.js → exec-approvals-DQ8TVVmj.js} +0 -0
- /package/dist/{format-CaxeRcue.js → format-CNU-Zkrz.js} +0 -0
- /package/dist/{format-DLOJPZmo.js → format-DcfK-dwd.js} +0 -0
- /package/dist/{format-duration-Be5Z7JdJ.js → format-duration-84n6_DgO.js} +0 -0
- /package/dist/{format-duration-CEmFWLyX.js → format-duration-Bo9zNKwO.js} +0 -0
- /package/dist/{format-relative-79_Y1n2Y.js → format-relative-CZOlQ2pA.js} +0 -0
- /package/dist/{format-relative-Db7eqEu8.js → format-relative-cegC_FF5.js} +0 -0
- /package/dist/{github-copilot-token-C9IJh2Pn.js → github-copilot-token-DkiRbJdR.js} +0 -0
- /package/dist/{helpers-CQI-5xS9.js → helpers-8O7IVGO-.js} +0 -0
- /package/dist/{helpers-CRzoyyXS.js → helpers-D_jqdWkd.js} +0 -0
- /package/dist/{helpers-C89IG08W.js → helpers-HyeZXsnu.js} +0 -0
- /package/dist/{is-main-WWuz28Ip.js → is-main-BWoXGz7p.js} +0 -0
- /package/dist/{logging-BzvBIA3Y.js → logging-fywhKCmE.js} +0 -0
- /package/dist/{nodes-screen-lykd2cny.js → nodes-screen-CdCWeiwy.js} +0 -0
- /package/dist/{parse-Cjiudy6x.js → parse-Bw0oH-rT.js} +0 -0
- /package/dist/{parse-DqAvJRIf.js → parse-ioZhOtha.js} +0 -0
- /package/dist/{parse-log-line-CUrpqe1w.js → parse-log-line-BoDqomM4.js} +0 -0
- /package/dist/{parse-log-line-D2UGw0wR.js → parse-log-line-DPxH1XZx.js} +0 -0
- /package/dist/{parse-timeout-DFSPLxpY.js → parse-timeout-D1XX_zN_.js} +0 -0
- /package/dist/{parse-timeout-DV8NQQWk.js → parse-timeout-DMW-z4Iz.js} +0 -0
- /package/dist/{pi-model-discovery-CV2V1HHz.js → pi-model-discovery-DqgqUyAv.js} +0 -0
- /package/dist/{pi-model-discovery-DzFOAbQt.js → pi-model-discovery-EwKVHlZB.js} +0 -0
- /package/dist/{prompts--d-6l5Ln.js → prompts-Bg96reub.js} +0 -0
- /package/dist/{redact-DAKeu7PA.js → redact-BRsnXqwD.js} +0 -0
- /package/dist/{redact-DuEEf1p1.js → redact-Br9GfacZ.js} +0 -0
- /package/dist/{redact-BOIof271.js → redact-BrXLgslJ.js} +0 -0
- /package/dist/{status-Cv36yYdi.js → status-BRZfQbJ2.js} +0 -0
- /package/dist/{status-Drziap9H.js → status-CoAy6bEC.js} +0 -0
- /package/dist/{systemd-hints-CH4pbCFD.js → systemd-hints-CXNtLw9Q.js} +0 -0
- /package/dist/{tailnet-DGRSvYuQ.js → tailnet-DATIFSsY.js} +0 -0
- /package/dist/{transcript-events-BlIONGVn.js → transcript-events-BHS7QoRl.js} +0 -0
- /package/dist/{transcript-events-C1hdue6u.js → transcript-events-Bp7fGnwv.js} +0 -0
- /package/dist/{transcript-events-CZ8CG4ht.js → transcript-events-BtNd-j6q.js} +0 -0
- /package/dist/{usage-format-6Uar63S0.js → usage-format-C4JfTbSp.js} +0 -0
- /package/dist/{usage-format-hd37en6b.js → usage-format-CpORtVCG.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { s as formatSandboxToolPolicyBlockedMessage } from "./sandbox-
|
|
3
|
-
import { o as resizeToJpeg, r as getImageMetadata } from "./routes-
|
|
1
|
+
import { t as createSubsystemLogger } from "./subsystem-BoExtIHo.js";
|
|
2
|
+
import { s as formatSandboxToolPolicyBlockedMessage } from "./sandbox-Bhjnh1Xg.js";
|
|
3
|
+
import { o as resizeToJpeg, r as getImageMetadata } from "./routes-CmOI1hIH.js";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
@@ -339,7 +339,12 @@ function sanitizeGoogleTurnOrdering(messages) {
|
|
|
339
339
|
|
|
340
340
|
//#endregion
|
|
341
341
|
//#region src/agents/pi-embedded-helpers/errors.ts
|
|
342
|
-
|
|
342
|
+
function formatBillingErrorMessage(provider) {
|
|
343
|
+
const providerName = provider?.trim();
|
|
344
|
+
if (providerName) return `⚠️ ${providerName} returned a billing error — your API key has run out of credits or has an insufficient balance. Check your ${providerName} billing dashboard and top up or switch to a different API key.`;
|
|
345
|
+
return "⚠️ API provider returned a billing error — your API key has run out of credits or has an insufficient balance. Check your provider's billing dashboard and top up or switch to a different API key.";
|
|
346
|
+
}
|
|
347
|
+
const BILLING_ERROR_USER_MESSAGE = formatBillingErrorMessage();
|
|
343
348
|
function isContextOverflowError(errorMessage) {
|
|
344
349
|
if (!errorMessage) return false;
|
|
345
350
|
const lower = errorMessage.toLowerCase();
|
|
@@ -348,24 +353,49 @@ function isContextOverflowError(errorMessage) {
|
|
|
348
353
|
return lower.includes("request_too_large") || lower.includes("request exceeds the maximum size") || lower.includes("context length exceeded") || lower.includes("maximum context length") || lower.includes("prompt is too long") || lower.includes("exceeds model context window") || hasRequestSizeExceeds && hasContextWindow || lower.includes("context overflow:") || lower.includes("413") && lower.includes("too large");
|
|
349
354
|
}
|
|
350
355
|
const CONTEXT_WINDOW_TOO_SMALL_RE = /context window.*(too small|minimum is)/i;
|
|
351
|
-
const CONTEXT_OVERFLOW_HINT_RE = /context.*overflow|context window.*(too (?:large|long)|exceed|over|limit|max(?:imum)?|requested|sent|tokens)|(?:
|
|
356
|
+
const CONTEXT_OVERFLOW_HINT_RE = /context.*overflow|context window.*(too (?:large|long)|exceed|over|limit|max(?:imum)?|requested|sent|tokens)|prompt.*(too (?:large|long)|exceed|over|limit|max(?:imum)?)|(?:request|input).*(?:context|window|length|token).*(too (?:large|long)|exceed|over|limit|max(?:imum)?)/i;
|
|
357
|
+
const RATE_LIMIT_HINT_RE = /rate limit|too many requests|requests per (?:minute|hour|day)|quota|throttl|429\b/i;
|
|
352
358
|
function isLikelyContextOverflowError(errorMessage) {
|
|
353
359
|
if (!errorMessage) return false;
|
|
354
360
|
if (CONTEXT_WINDOW_TOO_SMALL_RE.test(errorMessage)) return false;
|
|
361
|
+
if (isRateLimitErrorMessage(errorMessage)) return false;
|
|
355
362
|
if (isContextOverflowError(errorMessage)) return true;
|
|
363
|
+
if (RATE_LIMIT_HINT_RE.test(errorMessage)) return false;
|
|
356
364
|
return CONTEXT_OVERFLOW_HINT_RE.test(errorMessage);
|
|
357
365
|
}
|
|
358
366
|
function isCompactionFailureError(errorMessage) {
|
|
359
367
|
if (!errorMessage) return false;
|
|
360
368
|
const lower = errorMessage.toLowerCase();
|
|
361
369
|
if (!(lower.includes("summarization failed") || lower.includes("auto-compaction") || lower.includes("compaction failed") || lower.includes("compaction"))) return false;
|
|
362
|
-
|
|
370
|
+
if (isLikelyContextOverflowError(errorMessage)) return true;
|
|
371
|
+
return lower.includes("context overflow");
|
|
363
372
|
}
|
|
364
373
|
const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error)[:\s-]+/i;
|
|
365
374
|
const FINAL_TAG_RE = /<\s*\/?\s*final\s*>/gi;
|
|
366
375
|
const ERROR_PREFIX_RE = /^(?:error|api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|request failed|failed|exception)[:\s-]+/i;
|
|
367
376
|
const CONTEXT_OVERFLOW_ERROR_HEAD_RE = /^(?:context overflow:|request_too_large\b|request size exceeds\b|request exceeds the maximum size\b|context length exceeded\b|maximum context length\b|prompt is too long\b|exceeds model context window\b)/i;
|
|
368
377
|
const HTTP_STATUS_PREFIX_RE = /^(?:http\s*)?(\d{3})\s+(.+)$/i;
|
|
378
|
+
const HTTP_STATUS_CODE_PREFIX_RE = /^(?:http\s*)?(\d{3})(?:\s+([\s\S]+))?$/i;
|
|
379
|
+
const HTML_ERROR_PREFIX_RE = /^\s*(?:<!doctype\s+html\b|<html\b)/i;
|
|
380
|
+
const CLOUDFLARE_HTML_ERROR_CODES = new Set([
|
|
381
|
+
521,
|
|
382
|
+
522,
|
|
383
|
+
523,
|
|
384
|
+
524,
|
|
385
|
+
525,
|
|
386
|
+
526,
|
|
387
|
+
530
|
|
388
|
+
]);
|
|
389
|
+
const TRANSIENT_HTTP_ERROR_CODES = new Set([
|
|
390
|
+
500,
|
|
391
|
+
502,
|
|
392
|
+
503,
|
|
393
|
+
521,
|
|
394
|
+
522,
|
|
395
|
+
523,
|
|
396
|
+
524,
|
|
397
|
+
529
|
|
398
|
+
]);
|
|
369
399
|
const HTTP_ERROR_HINTS = [
|
|
370
400
|
"error",
|
|
371
401
|
"bad request",
|
|
@@ -383,6 +413,31 @@ const HTTP_ERROR_HINTS = [
|
|
|
383
413
|
"too many requests",
|
|
384
414
|
"permission"
|
|
385
415
|
];
|
|
416
|
+
function extractLeadingHttpStatus(raw) {
|
|
417
|
+
const match = raw.match(HTTP_STATUS_CODE_PREFIX_RE);
|
|
418
|
+
if (!match) return null;
|
|
419
|
+
const code = Number(match[1]);
|
|
420
|
+
if (!Number.isFinite(code)) return null;
|
|
421
|
+
return {
|
|
422
|
+
code,
|
|
423
|
+
rest: (match[2] ?? "").trim()
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
function isCloudflareOrHtmlErrorPage(raw) {
|
|
427
|
+
const trimmed = raw.trim();
|
|
428
|
+
if (!trimmed) return false;
|
|
429
|
+
const status = extractLeadingHttpStatus(trimmed);
|
|
430
|
+
if (!status || status.code < 500) return false;
|
|
431
|
+
if (CLOUDFLARE_HTML_ERROR_CODES.has(status.code)) return true;
|
|
432
|
+
return status.code < 600 && HTML_ERROR_PREFIX_RE.test(status.rest) && /<\/html>/i.test(status.rest);
|
|
433
|
+
}
|
|
434
|
+
function isTransientHttpError(raw) {
|
|
435
|
+
const trimmed = raw.trim();
|
|
436
|
+
if (!trimmed) return false;
|
|
437
|
+
const status = extractLeadingHttpStatus(trimmed);
|
|
438
|
+
if (!status) return false;
|
|
439
|
+
return TRANSIENT_HTTP_ERROR_CODES.has(status.code);
|
|
440
|
+
}
|
|
386
441
|
function stripFinalTagsFromText(text) {
|
|
387
442
|
if (!text) return text;
|
|
388
443
|
return text.replace(FINAL_TAG_RE, "");
|
|
@@ -405,6 +460,7 @@ function collapseConsecutiveDuplicateBlocks(text) {
|
|
|
405
460
|
return result.join("\n\n");
|
|
406
461
|
}
|
|
407
462
|
function isLikelyHttpErrorText(raw) {
|
|
463
|
+
if (isCloudflareOrHtmlErrorPage(raw)) return true;
|
|
408
464
|
const match = raw.match(HTTP_STATUS_PREFIX_RE);
|
|
409
465
|
if (!match) return false;
|
|
410
466
|
const code = Number(match[1]);
|
|
@@ -494,6 +550,8 @@ function parseApiErrorInfo(raw) {
|
|
|
494
550
|
function formatRawAssistantErrorForUi(raw) {
|
|
495
551
|
const trimmed = (raw ?? "").trim();
|
|
496
552
|
if (!trimmed) return "LLM request failed with an unknown error.";
|
|
553
|
+
const leadingStatus = extractLeadingHttpStatus(trimmed);
|
|
554
|
+
if (leadingStatus && isCloudflareOrHtmlErrorPage(trimmed)) return `The AI service is temporarily unavailable (HTTP ${leadingStatus.code}). Please try again in a moment.`;
|
|
497
555
|
const httpMatch = trimmed.match(HTTP_STATUS_PREFIX_RE);
|
|
498
556
|
if (httpMatch) {
|
|
499
557
|
const rest = httpMatch[2].trim();
|
|
@@ -527,7 +585,7 @@ function formatAssistantErrorText(msg, opts) {
|
|
|
527
585
|
const invalidRequest = raw.match(/"type":"invalid_request_error".*?"message":"([^"]+)"/);
|
|
528
586
|
if (invalidRequest?.[1]) return `LLM request rejected: ${invalidRequest[1]}`;
|
|
529
587
|
if (isOverloadedErrorMessage(raw)) return "The AI service is temporarily overloaded. Please try again in a moment.";
|
|
530
|
-
if (isBillingErrorMessage(raw)) return
|
|
588
|
+
if (isBillingErrorMessage(raw)) return formatBillingErrorMessage(opts?.provider);
|
|
531
589
|
if (isLikelyHttpErrorText(raw) || isRawApiErrorPayload(raw)) return formatRawAssistantErrorForUi(raw);
|
|
532
590
|
if (raw.length > 600) console.warn("[formatAssistantErrorText] Long error truncated:", raw.slice(0, 200));
|
|
533
591
|
return raw.length > 600 ? `${raw.slice(0, 600)}…` : raw;
|
|
@@ -572,7 +630,7 @@ const ERROR_PATTERNS = {
|
|
|
572
630
|
"context deadline exceeded"
|
|
573
631
|
],
|
|
574
632
|
billing: [
|
|
575
|
-
|
|
633
|
+
/["']?(?:status|code)["']?\s*[:=]\s*402\b|\bhttp\s*402\b|\berror(?:\s+code)?\s*[:=]?\s*402\b|\b(?:got|returned|received)\s+(?:a\s+)?402\b|^\s*402\s+payment/i,
|
|
576
634
|
"payment required",
|
|
577
635
|
"insufficient credits",
|
|
578
636
|
"credit balance",
|
|
@@ -678,6 +736,7 @@ function isAuthAssistantError(msg) {
|
|
|
678
736
|
function classifyFailoverReason(raw) {
|
|
679
737
|
if (isImageDimensionErrorMessage(raw)) return null;
|
|
680
738
|
if (isImageSizeError(raw)) return null;
|
|
739
|
+
if (isTransientHttpError(raw)) return "timeout";
|
|
681
740
|
if (isRateLimitErrorMessage(raw)) return "rate_limit";
|
|
682
741
|
if (isOverloadedErrorMessage(raw)) return "rate_limit";
|
|
683
742
|
if (isCloudCodeAssistFormatError(raw)) return "format";
|
|
@@ -1305,4 +1364,4 @@ function validateAnthropicTurns(messages) {
|
|
|
1305
1364
|
}
|
|
1306
1365
|
|
|
1307
1366
|
//#endregion
|
|
1308
|
-
export {
|
|
1367
|
+
export { isTransientHttpError as A, listThinkingLevelLabels as B, isContextOverflowError as C, isRateLimitAssistantError as D, isLikelyContextOverflowError as E, ensureSessionHeader as F, normalizeUsageDisplay as G, normalizeElevatedLevel as H, resolveBootstrapMaxChars as I, supportsXHighThinking as J, normalizeVerboseLevel as K, sanitizeGoogleTurnOrdering as L, parseImageSizeError as M, sanitizeUserFacingText as N, isRawApiErrorPayload as O, buildBootstrapContextFiles as P, formatThinkingLevels as R, isCompactionFailureError as S, isFailoverErrorMessage as T, normalizeReasoningLevel as U, listThinkingLevels as V, normalizeThinkLevel as W, formatRawAssistantErrorForUi as _, isMessagingToolDuplicateNormalized as a, isBillingAssistantError as b, sanitizeImageBlocks as c, isAntigravityClaude as d, isGoogleModelApi as f, formatBillingErrorMessage as g, formatAssistantErrorText as h, isMessagingToolDuplicate as i, parseImageDimensionError as j, isTimeoutErrorMessage as k, sanitizeToolResultImages as l, classifyFailoverReason as m, validateGeminiTurns as n, normalizeTextForComparison as o, BILLING_ERROR_USER_MESSAGE as p, resolveResponseUsageMode as q, pickFallbackThinkingLevel as r, sanitizeSessionMessagesImages as s, validateAnthropicTurns as t, downgradeOpenAIReasoningBlocks as u, getApiErrorPayloadFingerprint as v, isFailoverAssistantError as w, isCloudCodeAssistFormatError as x, isAuthAssistantError as y, formatXHighModelHint as z };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { i as resolveGatewayPort, t as STATE_DIR } from "./paths-rb94mUrR.js";
|
|
2
|
-
import { C as resolveOpenClawPackageRootSync, D as buildAgentMainSessionKey, M as normalizeAgentId, N as normalizeMainKey, P as resolveAgentIdFromSessionKey, T as DEFAULT_AGENT_ID, _ as DEFAULT_TOOLS_FILENAME, c as resolveDefaultAgentId, d as DEFAULT_AGENTS_FILENAME, f as DEFAULT_AGENT_WORKSPACE_DIR, g as DEFAULT_SOUL_FILENAME, h as DEFAULT_IDENTITY_FILENAME, j as normalizeAccountId$1, l as resolveSessionAgentId, m as DEFAULT_HEARTBEAT_FILENAME, n as resolveAgentConfig, p as DEFAULT_BOOTSTRAP_FILENAME, v as DEFAULT_USER_FILENAME, w as DEFAULT_ACCOUNT_ID, y as ensureAgentWorkspace } from "./agent-scope-
|
|
3
|
-
import { C as CONFIG_DIR, I as resolveConfigDir, O as escapeRegExp, P as normalizeE164, R as resolveUserPath, _ as normalizeAnyChannelId, b as getActivePluginRegistry, g as getChatChannelMeta, h as CHAT_CHANNEL_ORDER, l as createSubsystemLogger, m as CHANNEL_IDS, n as runExec, u as defaultRuntime, x as requireActivePluginRegistry, y as normalizeChatChannelId } from "./exec-
|
|
4
|
-
import { O as isTruthyEnvValue, k as parseBooleanValue } from "./model-selection-
|
|
2
|
+
import { C as resolveOpenClawPackageRootSync, D as buildAgentMainSessionKey, M as normalizeAgentId, N as normalizeMainKey, P as resolveAgentIdFromSessionKey, T as DEFAULT_AGENT_ID, _ as DEFAULT_TOOLS_FILENAME, c as resolveDefaultAgentId, d as DEFAULT_AGENTS_FILENAME, f as DEFAULT_AGENT_WORKSPACE_DIR, g as DEFAULT_SOUL_FILENAME, h as DEFAULT_IDENTITY_FILENAME, j as normalizeAccountId$1, l as resolveSessionAgentId, m as DEFAULT_HEARTBEAT_FILENAME, n as resolveAgentConfig, p as DEFAULT_BOOTSTRAP_FILENAME, v as DEFAULT_USER_FILENAME, w as DEFAULT_ACCOUNT_ID, y as ensureAgentWorkspace } from "./agent-scope-DPIFau3f.js";
|
|
3
|
+
import { C as CONFIG_DIR, I as resolveConfigDir, O as escapeRegExp, P as normalizeE164, R as resolveUserPath, _ as normalizeAnyChannelId, at as resolvePreferredOpenClawTmpDir, b as getActivePluginRegistry, g as getChatChannelMeta, h as CHAT_CHANNEL_ORDER, l as createSubsystemLogger, m as CHANNEL_IDS, n as runExec, u as defaultRuntime, x as requireActivePluginRegistry, y as normalizeChatChannelId } from "./exec-CJFFoM7H.js";
|
|
4
|
+
import { O as isTruthyEnvValue, k as parseBooleanValue } from "./model-selection-C1GmkTAV.js";
|
|
5
5
|
import { t as formatCliCommand } from "./command-format-CFzL448l.js";
|
|
6
|
-
import {
|
|
7
|
-
import { A as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, C as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, D as DEFAULT_BROWSER_EVALUATE_ENABLED, E as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, O as DEFAULT_OPENCLAW_BROWSER_COLOR, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer, a as resolveOpenClawUserDataDir, b as isLoopbackHost, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as getHeadersWithAuth, i as launchOpenClawChrome, k as DEFAULT_OPENCLAW_BROWSER_ENABLED, l as createTargetViaCdp, n as isChromeCdpReady, o as stopOpenClawChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as stopChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS } from "./chrome-
|
|
6
|
+
import { b as resolveMemorySlotDecision, d as parseDurationMs, g as MANIFEST_KEY, h as LEGACY_MANIFEST_KEYS, i as writeConfigFile, j as resolveWhatsAppAccount, o as parseByteSize, p as loadPluginManifestRegistry, t as loadConfig, v as normalizePluginsConfig, y as resolveEnableState } from "./config-QYrbd7x7.js";
|
|
7
|
+
import { A as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, C as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, D as DEFAULT_BROWSER_EVALUATE_ENABLED, E as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, O as DEFAULT_OPENCLAW_BROWSER_COLOR, T as DEFAULT_AI_SNAPSHOT_MAX_CHARS, _ as ensureChromeExtensionRelayServer, a as resolveOpenClawUserDataDir, b as isLoopbackHost, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as getHeadersWithAuth, i as launchOpenClawChrome, k as DEFAULT_OPENCLAW_BROWSER_ENABLED, l as createTargetViaCdp, n as isChromeCdpReady, o as stopOpenClawChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as stopChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS } from "./chrome-DL0avO8n.js";
|
|
8
8
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-dpUbQseI.js";
|
|
9
|
-
import {
|
|
9
|
+
import { n as resolveSessionFilePath, t as resolveDefaultSessionStorePath } from "./paths-D0O87MfH.js";
|
|
10
10
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-BrkSiEN9.js";
|
|
11
11
|
import path from "node:path";
|
|
12
12
|
import fs from "node:fs";
|
|
@@ -1679,6 +1679,83 @@ function applySkillEnvOverridesFromSnapshot(params) {
|
|
|
1679
1679
|
};
|
|
1680
1680
|
}
|
|
1681
1681
|
|
|
1682
|
+
//#endregion
|
|
1683
|
+
//#region src/agents/sandbox-paths.ts
|
|
1684
|
+
const UNICODE_SPACES = /[\u00A0\u2000-\u200A\u202F\u205F\u3000]/g;
|
|
1685
|
+
const HTTP_URL_RE = /^https?:\/\//i;
|
|
1686
|
+
const DATA_URL_RE = /^data:/i;
|
|
1687
|
+
function normalizeUnicodeSpaces(str) {
|
|
1688
|
+
return str.replace(UNICODE_SPACES, " ");
|
|
1689
|
+
}
|
|
1690
|
+
function expandPath(filePath) {
|
|
1691
|
+
const normalized = normalizeUnicodeSpaces(filePath);
|
|
1692
|
+
if (normalized === "~") return os.homedir();
|
|
1693
|
+
if (normalized.startsWith("~/")) return os.homedir() + normalized.slice(1);
|
|
1694
|
+
return normalized;
|
|
1695
|
+
}
|
|
1696
|
+
function resolveToCwd(filePath, cwd) {
|
|
1697
|
+
const expanded = expandPath(filePath);
|
|
1698
|
+
if (path.isAbsolute(expanded)) return expanded;
|
|
1699
|
+
return path.resolve(cwd, expanded);
|
|
1700
|
+
}
|
|
1701
|
+
function resolveSandboxPath(params) {
|
|
1702
|
+
const resolved = resolveToCwd(params.filePath, params.cwd);
|
|
1703
|
+
const rootResolved = path.resolve(params.root);
|
|
1704
|
+
const relative = path.relative(rootResolved, resolved);
|
|
1705
|
+
if (!relative || relative === "") return {
|
|
1706
|
+
resolved,
|
|
1707
|
+
relative: ""
|
|
1708
|
+
};
|
|
1709
|
+
if (relative.startsWith("..") || path.isAbsolute(relative)) throw new Error(`Path escapes sandbox root (${shortPath(rootResolved)}): ${params.filePath}`);
|
|
1710
|
+
return {
|
|
1711
|
+
resolved,
|
|
1712
|
+
relative
|
|
1713
|
+
};
|
|
1714
|
+
}
|
|
1715
|
+
async function assertSandboxPath(params) {
|
|
1716
|
+
const resolved = resolveSandboxPath(params);
|
|
1717
|
+
await assertNoSymlink(resolved.relative, path.resolve(params.root));
|
|
1718
|
+
return resolved;
|
|
1719
|
+
}
|
|
1720
|
+
function assertMediaNotDataUrl(media) {
|
|
1721
|
+
const raw = media.trim();
|
|
1722
|
+
if (DATA_URL_RE.test(raw)) throw new Error("data: URLs are not supported for media. Use buffer instead.");
|
|
1723
|
+
}
|
|
1724
|
+
async function resolveSandboxedMediaSource(params) {
|
|
1725
|
+
const raw = params.media.trim();
|
|
1726
|
+
if (!raw) return raw;
|
|
1727
|
+
if (HTTP_URL_RE.test(raw)) return raw;
|
|
1728
|
+
let candidate = raw;
|
|
1729
|
+
if (/^file:\/\//i.test(candidate)) try {
|
|
1730
|
+
candidate = fileURLToPath(candidate);
|
|
1731
|
+
} catch {
|
|
1732
|
+
throw new Error(`Invalid file:// URL for sandboxed media: ${raw}`);
|
|
1733
|
+
}
|
|
1734
|
+
return (await assertSandboxPath({
|
|
1735
|
+
filePath: candidate,
|
|
1736
|
+
cwd: params.sandboxRoot,
|
|
1737
|
+
root: params.sandboxRoot
|
|
1738
|
+
})).resolved;
|
|
1739
|
+
}
|
|
1740
|
+
async function assertNoSymlink(relative, root) {
|
|
1741
|
+
if (!relative) return;
|
|
1742
|
+
const parts = relative.split(path.sep).filter(Boolean);
|
|
1743
|
+
let current = root;
|
|
1744
|
+
for (const part of parts) {
|
|
1745
|
+
current = path.join(current, part);
|
|
1746
|
+
try {
|
|
1747
|
+
if ((await fs$1.lstat(current)).isSymbolicLink()) throw new Error(`Symlink not allowed in sandbox path: ${current}`);
|
|
1748
|
+
} catch (err) {
|
|
1749
|
+
if (err.code === "ENOENT") return;
|
|
1750
|
+
throw err;
|
|
1751
|
+
}
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
function shortPath(value) {
|
|
1755
|
+
if (value.startsWith(os.homedir())) return `~${value.slice(os.homedir().length)}`;
|
|
1756
|
+
return value;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1682
1759
|
//#endregion
|
|
1683
1760
|
//#region src/agents/skills/bundled-dir.ts
|
|
1684
1761
|
function looksLikeSkillsDir(dir) {
|
|
@@ -1836,7 +1913,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
1836
1913
|
return [];
|
|
1837
1914
|
};
|
|
1838
1915
|
const managedSkillsDir = opts?.managedSkillsDir ?? path.join(CONFIG_DIR, "skills");
|
|
1839
|
-
const workspaceSkillsDir = path.
|
|
1916
|
+
const workspaceSkillsDir = path.resolve(workspaceDir, "skills");
|
|
1840
1917
|
const bundledSkillsDir = opts?.bundledSkillsDir ?? resolveBundledSkillsDir();
|
|
1841
1918
|
const extraDirs = (opts?.config?.skills?.load?.extraDirs ?? []).map((d) => typeof d === "string" ? d.trim() : "").filter(Boolean);
|
|
1842
1919
|
const pluginSkillDirs = resolvePluginSkillDirs({
|
|
@@ -1858,6 +1935,14 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
1858
1935
|
dir: managedSkillsDir,
|
|
1859
1936
|
source: "openclaw-managed"
|
|
1860
1937
|
});
|
|
1938
|
+
const personalAgentsSkills = loadSkills({
|
|
1939
|
+
dir: path.resolve(os.homedir(), ".agents", "skills"),
|
|
1940
|
+
source: "agents-skills-personal"
|
|
1941
|
+
});
|
|
1942
|
+
const projectAgentsSkills = loadSkills({
|
|
1943
|
+
dir: path.resolve(workspaceDir, ".agents", "skills"),
|
|
1944
|
+
source: "agents-skills-project"
|
|
1945
|
+
});
|
|
1861
1946
|
const workspaceSkills = loadSkills({
|
|
1862
1947
|
dir: workspaceSkillsDir,
|
|
1863
1948
|
source: "openclaw-workspace"
|
|
@@ -1866,6 +1951,8 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
1866
1951
|
for (const skill of extraSkills) merged.set(skill.name, skill);
|
|
1867
1952
|
for (const skill of bundledSkills) merged.set(skill.name, skill);
|
|
1868
1953
|
for (const skill of managedSkills) merged.set(skill.name, skill);
|
|
1954
|
+
for (const skill of personalAgentsSkills) merged.set(skill.name, skill);
|
|
1955
|
+
for (const skill of projectAgentsSkills) merged.set(skill.name, skill);
|
|
1869
1956
|
for (const skill of workspaceSkills) merged.set(skill.name, skill);
|
|
1870
1957
|
return Array.from(merged.values()).map((skill) => {
|
|
1871
1958
|
let frontmatter = {};
|
|
@@ -1912,6 +1999,36 @@ function resolveSkillsPromptForRun(params) {
|
|
|
1912
1999
|
function loadWorkspaceSkillEntries(workspaceDir, opts) {
|
|
1913
2000
|
return loadSkillEntries(workspaceDir, opts);
|
|
1914
2001
|
}
|
|
2002
|
+
function resolveUniqueSyncedSkillDirName(base, used) {
|
|
2003
|
+
if (!used.has(base)) {
|
|
2004
|
+
used.add(base);
|
|
2005
|
+
return base;
|
|
2006
|
+
}
|
|
2007
|
+
for (let index = 2; index < 1e4; index += 1) {
|
|
2008
|
+
const candidate = `${base}-${index}`;
|
|
2009
|
+
if (!used.has(candidate)) {
|
|
2010
|
+
used.add(candidate);
|
|
2011
|
+
return candidate;
|
|
2012
|
+
}
|
|
2013
|
+
}
|
|
2014
|
+
let fallbackIndex = 1e4;
|
|
2015
|
+
let fallback = `${base}-${fallbackIndex}`;
|
|
2016
|
+
while (used.has(fallback)) {
|
|
2017
|
+
fallbackIndex += 1;
|
|
2018
|
+
fallback = `${base}-${fallbackIndex}`;
|
|
2019
|
+
}
|
|
2020
|
+
used.add(fallback);
|
|
2021
|
+
return fallback;
|
|
2022
|
+
}
|
|
2023
|
+
function resolveSyncedSkillDestinationPath(params) {
|
|
2024
|
+
const sourceDirName = path.basename(params.entry.skill.baseDir).trim();
|
|
2025
|
+
if (!sourceDirName || sourceDirName === "." || sourceDirName === "..") return null;
|
|
2026
|
+
return resolveSandboxPath({
|
|
2027
|
+
filePath: resolveUniqueSyncedSkillDirName(sourceDirName, params.usedDirNames),
|
|
2028
|
+
cwd: params.targetSkillsDir,
|
|
2029
|
+
root: params.targetSkillsDir
|
|
2030
|
+
}).resolved;
|
|
2031
|
+
}
|
|
1915
2032
|
async function syncSkillsToWorkspace(params) {
|
|
1916
2033
|
const sourceDir = resolveUserPath(params.sourceWorkspaceDir);
|
|
1917
2034
|
const targetDir = resolveUserPath(params.targetWorkspaceDir);
|
|
@@ -1928,8 +2045,24 @@ async function syncSkillsToWorkspace(params) {
|
|
|
1928
2045
|
force: true
|
|
1929
2046
|
});
|
|
1930
2047
|
await fsp.mkdir(targetSkillsDir, { recursive: true });
|
|
2048
|
+
const usedDirNames = /* @__PURE__ */ new Set();
|
|
1931
2049
|
for (const entry of entries) {
|
|
1932
|
-
|
|
2050
|
+
let dest = null;
|
|
2051
|
+
try {
|
|
2052
|
+
dest = resolveSyncedSkillDestinationPath({
|
|
2053
|
+
targetSkillsDir,
|
|
2054
|
+
entry,
|
|
2055
|
+
usedDirNames
|
|
2056
|
+
});
|
|
2057
|
+
} catch (error) {
|
|
2058
|
+
const message = error instanceof Error ? error.message : JSON.stringify(error);
|
|
2059
|
+
console.warn(`[skills] Failed to resolve safe destination for ${entry.skill.name}: ${message}`);
|
|
2060
|
+
continue;
|
|
2061
|
+
}
|
|
2062
|
+
if (!dest) {
|
|
2063
|
+
console.warn(`[skills] Failed to resolve safe destination for ${entry.skill.name}: invalid source directory name`);
|
|
2064
|
+
continue;
|
|
2065
|
+
}
|
|
1933
2066
|
try {
|
|
1934
2067
|
await fsp.cp(entry.skill.baseDir, dest, {
|
|
1935
2068
|
recursive: true,
|
|
@@ -2042,7 +2175,7 @@ function isModuleNotFoundError(err) {
|
|
|
2042
2175
|
}
|
|
2043
2176
|
async function loadPwAiModule(mode) {
|
|
2044
2177
|
try {
|
|
2045
|
-
return await import("./pw-ai-
|
|
2178
|
+
return await import("./pw-ai-sS1fRKW_.js");
|
|
2046
2179
|
} catch (err) {
|
|
2047
2180
|
if (mode === "soft") return null;
|
|
2048
2181
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -2599,6 +2732,7 @@ function registerBrowserAgentActRoutes(app, ctx) {
|
|
|
2599
2732
|
|
|
2600
2733
|
//#endregion
|
|
2601
2734
|
//#region src/browser/routes/agent.debug.ts
|
|
2735
|
+
const DEFAULT_TRACE_DIR = resolvePreferredOpenClawTmpDir();
|
|
2602
2736
|
function registerBrowserAgentDebugRoutes(app, ctx) {
|
|
2603
2737
|
app.get("/console", async (req, res) => {
|
|
2604
2738
|
const profileCtx = resolveProfileContext(req, res, ctx);
|
|
@@ -2709,7 +2843,7 @@ function registerBrowserAgentDebugRoutes(app, ctx) {
|
|
|
2709
2843
|
const pw = await requirePwAi(res, "trace stop");
|
|
2710
2844
|
if (!pw) return;
|
|
2711
2845
|
const id = crypto.randomUUID();
|
|
2712
|
-
const dir =
|
|
2846
|
+
const dir = DEFAULT_TRACE_DIR;
|
|
2713
2847
|
await fs$1.mkdir(dir, { recursive: true });
|
|
2714
2848
|
const tracePath = out.trim() || path.join(dir, `browser-trace-${id}.zip`);
|
|
2715
2849
|
await pw.traceStopViaPlaywright({
|
|
@@ -2752,6 +2886,22 @@ function normalizeHostnameSet(values) {
|
|
|
2752
2886
|
if (!values || values.length === 0) return /* @__PURE__ */ new Set();
|
|
2753
2887
|
return new Set(values.map((value) => normalizeHostname(value)).filter(Boolean));
|
|
2754
2888
|
}
|
|
2889
|
+
function normalizeHostnameAllowlist(values) {
|
|
2890
|
+
if (!values || values.length === 0) return [];
|
|
2891
|
+
return Array.from(new Set(values.map((value) => normalizeHostname(value)).filter((value) => value !== "*" && value !== "*." && value.length > 0)));
|
|
2892
|
+
}
|
|
2893
|
+
function isHostnameAllowedByPattern(hostname, pattern) {
|
|
2894
|
+
if (pattern.startsWith("*.")) {
|
|
2895
|
+
const suffix = pattern.slice(2);
|
|
2896
|
+
if (!suffix || hostname === suffix) return false;
|
|
2897
|
+
return hostname.endsWith(`.${suffix}`);
|
|
2898
|
+
}
|
|
2899
|
+
return hostname === pattern;
|
|
2900
|
+
}
|
|
2901
|
+
function matchesHostnameAllowlist(hostname, allowlist) {
|
|
2902
|
+
if (allowlist.length === 0) return true;
|
|
2903
|
+
return allowlist.some((pattern) => isHostnameAllowedByPattern(hostname, pattern));
|
|
2904
|
+
}
|
|
2755
2905
|
function parseIpv4(address) {
|
|
2756
2906
|
const parts = address.split(".");
|
|
2757
2907
|
if (parts.length !== 4) return null;
|
|
@@ -2852,7 +3002,10 @@ async function resolvePinnedHostnameWithPolicy(hostname, params = {}) {
|
|
|
2852
3002
|
const normalized = normalizeHostname(hostname);
|
|
2853
3003
|
if (!normalized) throw new Error("Invalid hostname");
|
|
2854
3004
|
const allowPrivateNetwork = Boolean(params.policy?.allowPrivateNetwork);
|
|
2855
|
-
const
|
|
3005
|
+
const allowedHostnames = normalizeHostnameSet(params.policy?.allowedHostnames);
|
|
3006
|
+
const hostnameAllowlist = normalizeHostnameAllowlist(params.policy?.hostnameAllowlist);
|
|
3007
|
+
const isExplicitAllowed = allowedHostnames.has(normalized);
|
|
3008
|
+
if (!matchesHostnameAllowlist(normalized, hostnameAllowlist)) throw new SsrFBlockedError(`Blocked hostname (not in allowlist): ${hostname}`);
|
|
2856
3009
|
if (!allowPrivateNetwork && !isExplicitAllowed) {
|
|
2857
3010
|
if (isBlockedHostname(normalized)) throw new SsrFBlockedError(`Blocked hostname: ${hostname}`);
|
|
2858
3011
|
if (isPrivateIpAddress(normalized)) throw new SsrFBlockedError("Blocked: private/internal IP address");
|
|
@@ -2873,9 +3026,6 @@ async function resolvePinnedHostnameWithPolicy(hostname, params = {}) {
|
|
|
2873
3026
|
})
|
|
2874
3027
|
};
|
|
2875
3028
|
}
|
|
2876
|
-
async function resolvePinnedHostname(hostname, lookupFn = lookup$1) {
|
|
2877
|
-
return await resolvePinnedHostnameWithPolicy(hostname, { lookupFn });
|
|
2878
|
-
}
|
|
2879
3029
|
function createPinnedDispatcher(pinned) {
|
|
2880
3030
|
return new Agent({ connect: { lookup: pinned.lookup } });
|
|
2881
3031
|
}
|
|
@@ -4864,11 +5014,11 @@ function createProfileContext(opts, profile) {
|
|
|
4864
5014
|
const userDataDir = resolveOpenClawUserDataDir(profile.name);
|
|
4865
5015
|
const profileState = getProfileState();
|
|
4866
5016
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
4867
|
-
await (await import("./pw-ai-
|
|
5017
|
+
await (await import("./pw-ai-sS1fRKW_.js")).closePlaywrightBrowserConnection();
|
|
4868
5018
|
} catch {}
|
|
4869
5019
|
if (profileState.running) await stopRunningBrowser();
|
|
4870
5020
|
try {
|
|
4871
|
-
await (await import("./pw-ai-
|
|
5021
|
+
await (await import("./pw-ai-sS1fRKW_.js")).closePlaywrightBrowserConnection();
|
|
4872
5022
|
} catch {}
|
|
4873
5023
|
if (!fs.existsSync(userDataDir)) return {
|
|
4874
5024
|
moved: false,
|
|
@@ -6859,7 +7009,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
6859
7009
|
let mtimeMs = getFileMtimeMs(storePath);
|
|
6860
7010
|
try {
|
|
6861
7011
|
const raw = fs.readFileSync(storePath, "utf-8");
|
|
6862
|
-
const parsed =
|
|
7012
|
+
const parsed = JSON.parse(raw);
|
|
6863
7013
|
if (isSessionStoreRecord(parsed)) store = parsed;
|
|
6864
7014
|
mtimeMs = getFileMtimeMs(storePath) ?? mtimeMs;
|
|
6865
7015
|
} catch {}
|
|
@@ -7304,7 +7454,15 @@ async function appendAssistantMessageToSessionTranscript(params) {
|
|
|
7304
7454
|
ok: false,
|
|
7305
7455
|
reason: `unknown sessionKey: ${sessionKey}`
|
|
7306
7456
|
};
|
|
7307
|
-
|
|
7457
|
+
let sessionFile;
|
|
7458
|
+
try {
|
|
7459
|
+
sessionFile = resolveSessionFilePath(entry.sessionId, entry, { sessionsDir: path.dirname(storePath) });
|
|
7460
|
+
} catch (err) {
|
|
7461
|
+
return {
|
|
7462
|
+
ok: false,
|
|
7463
|
+
reason: err instanceof Error ? err.message : String(err)
|
|
7464
|
+
};
|
|
7465
|
+
}
|
|
7308
7466
|
await ensureSessionHeader({
|
|
7309
7467
|
sessionFile,
|
|
7310
7468
|
sessionId: entry.sessionId
|
|
@@ -7560,7 +7718,12 @@ async function ensureSandboxWorkspaceForSession(params) {
|
|
|
7560
7718
|
|
|
7561
7719
|
//#endregion
|
|
7562
7720
|
//#region src/agents/pi-embedded-helpers/errors.ts
|
|
7563
|
-
|
|
7721
|
+
function formatBillingErrorMessage(provider) {
|
|
7722
|
+
const providerName = provider?.trim();
|
|
7723
|
+
if (providerName) return `⚠️ ${providerName} returned a billing error — your API key has run out of credits or has an insufficient balance. Check your ${providerName} billing dashboard and top up or switch to a different API key.`;
|
|
7724
|
+
return "⚠️ API provider returned a billing error — your API key has run out of credits or has an insufficient balance. Check your provider's billing dashboard and top up or switch to a different API key.";
|
|
7725
|
+
}
|
|
7726
|
+
const BILLING_ERROR_USER_MESSAGE = formatBillingErrorMessage();
|
|
7564
7727
|
function isContextOverflowError(errorMessage) {
|
|
7565
7728
|
if (!errorMessage) return false;
|
|
7566
7729
|
const lower = errorMessage.toLowerCase();
|
|
@@ -7569,24 +7732,49 @@ function isContextOverflowError(errorMessage) {
|
|
|
7569
7732
|
return lower.includes("request_too_large") || lower.includes("request exceeds the maximum size") || lower.includes("context length exceeded") || lower.includes("maximum context length") || lower.includes("prompt is too long") || lower.includes("exceeds model context window") || hasRequestSizeExceeds && hasContextWindow || lower.includes("context overflow:") || lower.includes("413") && lower.includes("too large");
|
|
7570
7733
|
}
|
|
7571
7734
|
const CONTEXT_WINDOW_TOO_SMALL_RE = /context window.*(too small|minimum is)/i;
|
|
7572
|
-
const CONTEXT_OVERFLOW_HINT_RE = /context.*overflow|context window.*(too (?:large|long)|exceed|over|limit|max(?:imum)?|requested|sent|tokens)|(?:
|
|
7735
|
+
const CONTEXT_OVERFLOW_HINT_RE = /context.*overflow|context window.*(too (?:large|long)|exceed|over|limit|max(?:imum)?|requested|sent|tokens)|prompt.*(too (?:large|long)|exceed|over|limit|max(?:imum)?)|(?:request|input).*(?:context|window|length|token).*(too (?:large|long)|exceed|over|limit|max(?:imum)?)/i;
|
|
7736
|
+
const RATE_LIMIT_HINT_RE = /rate limit|too many requests|requests per (?:minute|hour|day)|quota|throttl|429\b/i;
|
|
7573
7737
|
function isLikelyContextOverflowError(errorMessage) {
|
|
7574
7738
|
if (!errorMessage) return false;
|
|
7575
7739
|
if (CONTEXT_WINDOW_TOO_SMALL_RE.test(errorMessage)) return false;
|
|
7740
|
+
if (isRateLimitErrorMessage(errorMessage)) return false;
|
|
7576
7741
|
if (isContextOverflowError(errorMessage)) return true;
|
|
7742
|
+
if (RATE_LIMIT_HINT_RE.test(errorMessage)) return false;
|
|
7577
7743
|
return CONTEXT_OVERFLOW_HINT_RE.test(errorMessage);
|
|
7578
7744
|
}
|
|
7579
7745
|
function isCompactionFailureError(errorMessage) {
|
|
7580
7746
|
if (!errorMessage) return false;
|
|
7581
7747
|
const lower = errorMessage.toLowerCase();
|
|
7582
7748
|
if (!(lower.includes("summarization failed") || lower.includes("auto-compaction") || lower.includes("compaction failed") || lower.includes("compaction"))) return false;
|
|
7583
|
-
|
|
7749
|
+
if (isLikelyContextOverflowError(errorMessage)) return true;
|
|
7750
|
+
return lower.includes("context overflow");
|
|
7584
7751
|
}
|
|
7585
7752
|
const ERROR_PAYLOAD_PREFIX_RE = /^(?:error|api\s*error|apierror|openai\s*error|anthropic\s*error|gateway\s*error)[:\s-]+/i;
|
|
7586
7753
|
const FINAL_TAG_RE = /<\s*\/?\s*final\s*>/gi;
|
|
7587
7754
|
const ERROR_PREFIX_RE = /^(?:error|api\s*error|openai\s*error|anthropic\s*error|gateway\s*error|request failed|failed|exception)[:\s-]+/i;
|
|
7588
7755
|
const CONTEXT_OVERFLOW_ERROR_HEAD_RE = /^(?:context overflow:|request_too_large\b|request size exceeds\b|request exceeds the maximum size\b|context length exceeded\b|maximum context length\b|prompt is too long\b|exceeds model context window\b)/i;
|
|
7589
7756
|
const HTTP_STATUS_PREFIX_RE = /^(?:http\s*)?(\d{3})\s+(.+)$/i;
|
|
7757
|
+
const HTTP_STATUS_CODE_PREFIX_RE = /^(?:http\s*)?(\d{3})(?:\s+([\s\S]+))?$/i;
|
|
7758
|
+
const HTML_ERROR_PREFIX_RE = /^\s*(?:<!doctype\s+html\b|<html\b)/i;
|
|
7759
|
+
const CLOUDFLARE_HTML_ERROR_CODES = new Set([
|
|
7760
|
+
521,
|
|
7761
|
+
522,
|
|
7762
|
+
523,
|
|
7763
|
+
524,
|
|
7764
|
+
525,
|
|
7765
|
+
526,
|
|
7766
|
+
530
|
|
7767
|
+
]);
|
|
7768
|
+
const TRANSIENT_HTTP_ERROR_CODES = new Set([
|
|
7769
|
+
500,
|
|
7770
|
+
502,
|
|
7771
|
+
503,
|
|
7772
|
+
521,
|
|
7773
|
+
522,
|
|
7774
|
+
523,
|
|
7775
|
+
524,
|
|
7776
|
+
529
|
|
7777
|
+
]);
|
|
7590
7778
|
const HTTP_ERROR_HINTS = [
|
|
7591
7779
|
"error",
|
|
7592
7780
|
"bad request",
|
|
@@ -7604,6 +7792,31 @@ const HTTP_ERROR_HINTS = [
|
|
|
7604
7792
|
"too many requests",
|
|
7605
7793
|
"permission"
|
|
7606
7794
|
];
|
|
7795
|
+
function extractLeadingHttpStatus(raw) {
|
|
7796
|
+
const match = raw.match(HTTP_STATUS_CODE_PREFIX_RE);
|
|
7797
|
+
if (!match) return null;
|
|
7798
|
+
const code = Number(match[1]);
|
|
7799
|
+
if (!Number.isFinite(code)) return null;
|
|
7800
|
+
return {
|
|
7801
|
+
code,
|
|
7802
|
+
rest: (match[2] ?? "").trim()
|
|
7803
|
+
};
|
|
7804
|
+
}
|
|
7805
|
+
function isCloudflareOrHtmlErrorPage(raw) {
|
|
7806
|
+
const trimmed = raw.trim();
|
|
7807
|
+
if (!trimmed) return false;
|
|
7808
|
+
const status = extractLeadingHttpStatus(trimmed);
|
|
7809
|
+
if (!status || status.code < 500) return false;
|
|
7810
|
+
if (CLOUDFLARE_HTML_ERROR_CODES.has(status.code)) return true;
|
|
7811
|
+
return status.code < 600 && HTML_ERROR_PREFIX_RE.test(status.rest) && /<\/html>/i.test(status.rest);
|
|
7812
|
+
}
|
|
7813
|
+
function isTransientHttpError(raw) {
|
|
7814
|
+
const trimmed = raw.trim();
|
|
7815
|
+
if (!trimmed) return false;
|
|
7816
|
+
const status = extractLeadingHttpStatus(trimmed);
|
|
7817
|
+
if (!status) return false;
|
|
7818
|
+
return TRANSIENT_HTTP_ERROR_CODES.has(status.code);
|
|
7819
|
+
}
|
|
7607
7820
|
function stripFinalTagsFromText(text) {
|
|
7608
7821
|
if (!text) return text;
|
|
7609
7822
|
return text.replace(FINAL_TAG_RE, "");
|
|
@@ -7626,6 +7839,7 @@ function collapseConsecutiveDuplicateBlocks(text) {
|
|
|
7626
7839
|
return result.join("\n\n");
|
|
7627
7840
|
}
|
|
7628
7841
|
function isLikelyHttpErrorText(raw) {
|
|
7842
|
+
if (isCloudflareOrHtmlErrorPage(raw)) return true;
|
|
7629
7843
|
const match = raw.match(HTTP_STATUS_PREFIX_RE);
|
|
7630
7844
|
if (!match) return false;
|
|
7631
7845
|
const code = Number(match[1]);
|
|
@@ -7715,6 +7929,8 @@ function parseApiErrorInfo(raw) {
|
|
|
7715
7929
|
function formatRawAssistantErrorForUi(raw) {
|
|
7716
7930
|
const trimmed = (raw ?? "").trim();
|
|
7717
7931
|
if (!trimmed) return "LLM request failed with an unknown error.";
|
|
7932
|
+
const leadingStatus = extractLeadingHttpStatus(trimmed);
|
|
7933
|
+
if (leadingStatus && isCloudflareOrHtmlErrorPage(trimmed)) return `The AI service is temporarily unavailable (HTTP ${leadingStatus.code}). Please try again in a moment.`;
|
|
7718
7934
|
const httpMatch = trimmed.match(HTTP_STATUS_PREFIX_RE);
|
|
7719
7935
|
if (httpMatch) {
|
|
7720
7936
|
const rest = httpMatch[2].trim();
|
|
@@ -7748,7 +7964,7 @@ function formatAssistantErrorText(msg, opts) {
|
|
|
7748
7964
|
const invalidRequest = raw.match(/"type":"invalid_request_error".*?"message":"([^"]+)"/);
|
|
7749
7965
|
if (invalidRequest?.[1]) return `LLM request rejected: ${invalidRequest[1]}`;
|
|
7750
7966
|
if (isOverloadedErrorMessage(raw)) return "The AI service is temporarily overloaded. Please try again in a moment.";
|
|
7751
|
-
if (isBillingErrorMessage(raw)) return
|
|
7967
|
+
if (isBillingErrorMessage(raw)) return formatBillingErrorMessage(opts?.provider);
|
|
7752
7968
|
if (isLikelyHttpErrorText(raw) || isRawApiErrorPayload(raw)) return formatRawAssistantErrorForUi(raw);
|
|
7753
7969
|
if (raw.length > 600) console.warn("[formatAssistantErrorText] Long error truncated:", raw.slice(0, 200));
|
|
7754
7970
|
return raw.length > 600 ? `${raw.slice(0, 600)}…` : raw;
|
|
@@ -7793,7 +8009,7 @@ const ERROR_PATTERNS = {
|
|
|
7793
8009
|
"context deadline exceeded"
|
|
7794
8010
|
],
|
|
7795
8011
|
billing: [
|
|
7796
|
-
|
|
8012
|
+
/["']?(?:status|code)["']?\s*[:=]\s*402\b|\bhttp\s*402\b|\berror(?:\s+code)?\s*[:=]?\s*402\b|\b(?:got|returned|received)\s+(?:a\s+)?402\b|^\s*402\s+payment/i,
|
|
7797
8013
|
"payment required",
|
|
7798
8014
|
"insufficient credits",
|
|
7799
8015
|
"credit balance",
|
|
@@ -7899,6 +8115,7 @@ function isAuthAssistantError(msg) {
|
|
|
7899
8115
|
function classifyFailoverReason(raw) {
|
|
7900
8116
|
if (isImageDimensionErrorMessage(raw)) return null;
|
|
7901
8117
|
if (isImageSizeError(raw)) return null;
|
|
8118
|
+
if (isTransientHttpError(raw)) return "timeout";
|
|
7902
8119
|
if (isRateLimitErrorMessage(raw)) return "rate_limit";
|
|
7903
8120
|
if (isOverloadedErrorMessage(raw)) return "rate_limit";
|
|
7904
8121
|
if (isCloudCodeAssistFormatError(raw)) return "format";
|
|
@@ -8728,4 +8945,4 @@ function validateAnthropicTurns(messages) {
|
|
|
8728
8945
|
}
|
|
8729
8946
|
|
|
8730
8947
|
//#endregion
|
|
8731
|
-
export {
|
|
8948
|
+
export { updateLastRoute as $, buildPluginToolGroups as $t, isBillingAssistantError as A, mediaKindFromMime as An, convertHeicToJpeg as At, isTransientHttpError as B, resolveTelegramAccount as Bn, resolvePinnedHostnameWithPolicy as Bt, BILLING_ERROR_USER_MESSAGE as C, getFileExtension as Cn, resolveChannelGroupToolsPolicy as Ct, formatRawAssistantErrorForUi as D, kindFromMime as Dn, registerBrowserRoutes as Dt, formatBillingErrorMessage as E, isGifMedia as En, createBrowserRouteContext as Et, isFailoverErrorMessage as F, normalizeChannelId as Fn, getMediaDir as Ft, resolveSandboxContext as G, resolveSlackBotToken as Gn, resolvePluginSkillDirs as Gt, parseImageSizeError as H, listBindings as Hn, buildWorkspaceSkillSnapshot as Ht, isLikelyContextOverflowError as I, isWhatsAppGroupJid as In, saveMediaBuffer as It, resolveMirroredTranscriptText as J, resolveDiscordAccount as Jn, resolveSandboxedMediaSource as Jt, resolveSandboxRuntimeStatus as K, normalizeChatType as Kn, assertMediaNotDataUrl as Kt, isRateLimitAssistantError as L, normalizeWhatsAppTarget as Ln, SsrFBlockedError as Lt, isCompactionFailureError as M, resolveSignalAccount as Mn, hasAlphaChannel as Mt, isContextOverflowError as N, getChannelPlugin as Nn, optimizeImageToPng as Nt, getApiErrorPayloadFingerprint as O, MAX_IMAGE_BYTES$1 as On, resolveBrowserConfig as Ot, isFailoverAssistantError as P, listChannelPlugins as Pn, resizeToJpeg as Pt, saveSessionStore as Q, applyOwnerOnlyToolPolicy as Qt, isRawApiErrorPayload as R, listEnabledTelegramAccounts as Rn, closeDispatcher as Rt, isGoogleModelApi as S, extensionForMime as Sn, resolveChannelGroupRequireMention as St, formatAssistantErrorText as T, isAudioFileName as Tn, resolveGroupSessionKey as Tt, sanitizeUserFacingText as U, resolveSlackAccount as Un, loadWorkspaceSkillEntries as Ut, parseImageDimensionError as V, resolveTelegramToken as Vn, buildWorkspaceSkillCommandSpecs as Vt, ensureSandboxWorkspaceForSession as W, resolveSlackAppToken as Wn, resolveSkillsPromptForRun as Wt, readSessionUpdatedAt as X, applySkillEnvOverridesFromSnapshot as Xt, loadSessionStore as Y, normalizeDiscordToken as Yn, applySkillEnvOverrides as Yt, recordSessionMetaFromInbound as Z, resolveSandboxConfigForAgent as Zt, sanitizeSessionMessagesImages as _, resolveMessageChannel as _n, deriveSessionMetaPatch as _t, formatXHighModelHint as a, stripPluginOnlyAllowlist as an, deliveryContextKey as at, downgradeOpenAIReasoningBlocks as b, GATEWAY_CLIENT_NAMES as bn, resolveIMessageAccount as bt, normalizeReasoningLevel as c, resolveBootstrapMaxChars as cn, normalizeSessionDeliveryFields as ct, normalizeVerboseLevel as d, isDeliverableMessageChannel as dn, resolveChannelResetConfig as dt, collectExplicitAllowlist as en, updateSessionStore as et, resolveResponseUsageMode as f, isInternalMessageChannel as fn, resolveSessionResetPolicy as ft, normalizeTextForComparison as g, resolveGatewayMessageChannel as gn, resolveMainSessionKey as gt, isMessagingToolDuplicateNormalized as h, normalizeMessageChannel as hn, DEFAULT_RESET_TRIGGERS as ht, formatThinkingLevels as i, resolveToolProfilePolicy as in, deliveryContextFromSession as it, isCloudCodeAssistFormatError as j, listEnabledSignalAccounts as jn, getImageMetadata as jt, isAuthAssistantError as k, maxBytesForKind as kn, resolveProfile as kt, normalizeThinkLevel as l, sanitizeGoogleTurnOrdering as ln, resolveSessionKey as lt, isMessagingToolDuplicate as m, listDeliverableMessageChannels as mn, resolveThreadFlag as mt, validateGeminiTurns as n, expandToolGroups as nn, isCacheEnabled as nt, listThinkingLevels as o, buildBootstrapContextFiles as on, mergeDeliveryContext as ot, supportsXHighThinking as p, isMarkdownCapableMessageChannel as pn, resolveSessionResetType as pt, appendAssistantMessageToSessionTranscript as q, listEnabledDiscordAccounts as qn, assertSandboxPath as qt, pickFallbackThinkingLevel as r, normalizeToolName as rn, resolveCacheTtlMs as rt, normalizeElevatedLevel as s, ensureSessionHeader$1 as sn, normalizeDeliveryContext as st, validateAnthropicTurns as t, expandPolicyWithPluginGroups as tn, updateSessionStoreEntry as tt, normalizeUsageDisplay as u, INTERNAL_MESSAGE_CHANNEL as un, evaluateSessionFreshness as ut, sanitizeImageBlocks as v, GATEWAY_CLIENT_IDS as vn, getChannelDock as vt, classifyFailoverReason as w, imageMimeFromFormat as wn, resolveConversationLabel as wt, isAntigravityClaude as x, detectMime as xn, resolveChannelGroupPolicy as xt, sanitizeToolResultImages as y, GATEWAY_CLIENT_MODES as yn, listChannelDocks as yt, isTimeoutErrorMessage as z, listTelegramAccountIds as zn, createPinnedDispatcher as zt };
|