@nikolasp98/minion 2026.6.14-dev.20260616061802 → 2026.6.16-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-cli-Du7NWZu3.js → acp-cli-2xKZfd6v.js} +3 -3
- package/dist/{acp-cli-BmKOFno7.js → acp-cli-q8e4aJoa.js} +3 -3
- package/dist/{agent-6dzad4Vk.js → agent-CZq9c4BW.js} +13 -13
- package/dist/{agent-step-C3wXb9Cx.js → agent-step-D5w2xNfi.js} +2 -2
- package/dist/{agent-step-Bf1GImWB.js → agent-step-DnVo1ws9.js} +2 -2
- package/dist/{agents-Dw2xlB7X.js → agents-3owoMugG.js} +7 -7
- package/dist/{agents-list-tool-Dq0lIpTn.js → agents-list-tool-Bjcc4I_6.js} +3 -3
- package/dist/{agents-list-tool-D9mHFLLa.js → agents-list-tool-CzUTgXov.js} +3 -3
- package/dist/{agents.config-1imA1H12.js → agents.config-Di1Fb5KI.js} +12 -12
- package/dist/{audit-DmbpL3cv.js → audit-B8L_aShb.js} +10 -10
- package/dist/{audit-DmJGMt0j.js → audit-Ck6MCUxx.js} +10 -10
- package/dist/{auth-choice-neer30p3.js → auth-choice-B6U5biA7.js} +4 -4
- package/dist/{auth-choice-CAmZkQLg.js → auth-choice-DmpOyRlb.js} +4 -4
- package/dist/{banner-DpI_geg3.js → banner-Be2ToLay.js} +1 -1
- package/dist/{browser-cli-z39mB4Us.js → browser-cli-BvtSNPci.js} +3 -3
- package/dist/{browser-cli-DDHEGwdS.js → browser-cli-De-S5eSp.js} +3 -3
- package/dist/{browser-tool-CWG74LXa.js → browser-tool-BVAlCkv9.js} +7 -7
- package/dist/{browser-tool-CZsdYOyF.js → browser-tool-CTNhVzit.js} +7 -7
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +489 -42
- package/dist/bundled/kg-message-sync/handler.js +6 -2
- package/dist/bundled/session-memory/handler.js +47 -1
- package/dist/{call-DkT-xA-u.js → call-BrDNyQiZ.js} +2 -2
- package/dist/{call-COjGFB_A.js → call-Di0NGY7s.js} +2 -2
- package/dist/{call-BKa0221r.js → call-QNmBuec5.js} +1 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{canvas-tool-yqzOmVk8.js → canvas-tool-C8kJ8X6t.js} +2 -2
- package/dist/{canvas-tool-D7utVUj9.js → canvas-tool-v_tDod0l.js} +2 -2
- package/dist/{channel-options-DDJR7t6c.js → channel-options-BgB_XE_R.js} +1 -1
- package/dist/{channel-options-wAeX19Sd.js → channel-options-C3G3uvc8.js} +1 -1
- package/dist/{channel-web-B731iz_S.js → channel-web-C7erWB8c.js} +7 -7
- package/dist/{channels-cli-DyZ1QjyT.js → channels-cli-CWL9_dUC.js} +9 -9
- package/dist/{channels-cli-B2lgO976.js → channels-cli-D0WU7aEW.js} +9 -9
- package/dist/{chrome-BYfNS8BB.js → chrome-BUH9jMtc.js} +1 -1
- package/dist/{chrome-DKRiholg.js → chrome-WqxB18cs.js} +2 -2
- package/dist/{chrome-C3MXJRdA.js → chrome-xmfH0ICu.js} +2 -2
- package/dist/{clawbot-cli-ByrTjcjf.js → clawbot-cli-BqvWmOf2.js} +1 -1
- package/dist/{clawbot-cli-C-8EFRKv.js → clawbot-cli-Cy4xxEwA.js} +1 -1
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-DNiohgQu.js → cli-C6-qelzK.js} +3 -3
- package/dist/{cli-D-m3umOT.js → cli-COPy2u3N.js} +3 -3
- package/dist/{client-D2hf2jQ7.js → client-BIS2Uayk.js} +4 -4
- package/dist/{client-BQN-LuPk.js → client-BoM5FwV4.js} +4 -4
- package/dist/{client-xu3whbFC.js → client-CTr2olAS.js} +4 -4
- package/dist/{command-registry-CB0tYTNA.js → command-registry-BSAY6wdm.js} +14 -14
- package/dist/{commands-registry-PW7IInMR.js → commands-registry-SXjoCA7i.js} +2 -2
- package/dist/{commands-registry-dia3m7-M.js → commands-registry-UnBqSA67.js} +2 -2
- package/dist/{completion-cli-Dg5pvBMY.js → completion-cli--3eqgAwK.js} +1 -1
- package/dist/{completion-cli-CSzxM5wY.js → completion-cli-RDTl_9qR.js} +2 -2
- package/dist/{config-BBoAK0dA.js → config-CkMQunWU.js} +6 -2
- package/dist/{config-ClkrcdId.js → config-DHYot764.js} +2 -2
- package/dist/{config-BgqD6SVw.js → config-DJTLRK5S.js} +2 -2
- package/dist/{config-cli-Denu0eEu.js → config-cli-BUCeVfP_.js} +4 -4
- package/dist/{config-cli-DtAjejub.js → config-cli-C1RrXpz0.js} +4 -4
- package/dist/{config-guard-DF1WNs2e.js → config-guard-CVx36OOi.js} +3 -3
- package/dist/config-guard-Csz0-uEX.js +2 -0
- package/dist/{config-validation-mmyHFUrK.js → config-validation-BVN3OEOd.js} +2 -2
- package/dist/{config-validation-lm5BwYiy.js → config-validation-C3jULSMI.js} +2 -2
- package/dist/{configure-CxrB1V4C.js → configure-CQEz5KQ3.js} +15 -15
- package/dist/{configure-CroxylRT.js → configure-akx6bWAt.js} +15 -15
- package/dist/{cron-cli-CYFkAl-f.js → cron-cli-BoMJUHUX.js} +2 -2
- package/dist/{cron-cli-CMjG3iLg.js → cron-cli-DvtMDSN2.js} +1 -1
- package/dist/{cron-tool-B3ffaxAO.js → cron-tool-Dcr3QMih.js} +5 -5
- package/dist/{cron-tool-BnUUPLV3.js → cron-tool-DllqQBKI.js} +5 -5
- package/dist/{daemon-cli-Bs0GD5xF.js → daemon-cli-CHfZAu4w.js} +9 -9
- package/dist/{daemon-cli-dauqwBcE.js → daemon-cli-D7K6zRR6.js} +9 -9
- package/dist/daemon-cli.js +6 -2
- package/dist/daemon-install-helpers-Ls_foXgf.js +2 -0
- package/dist/daemon-install-helpers-VzSaKa-j.js +2 -0
- package/dist/{daemon-runtime-C-XyxJRT.js → daemon-runtime--L-FasK6.js} +1 -1
- package/dist/{daemon-runtime-BLp3uThx.js → daemon-runtime-DKTkFmdZ.js} +1 -1
- package/dist/{deliver-C40KRMzm.js → deliver-BCijF1xe.js} +4 -4
- package/dist/{deliver-C5vVViLg.js → deliver-DiDYkpmh.js} +5 -5
- package/dist/{deliver-Dhut24vc.js → deliver-Ds0o_rCY.js} +3 -3
- package/dist/{deps-DRyTOIPO.js → deps-DFeGFeii.js} +6 -6
- package/dist/{devices-cli-DFPiK0W5.js → devices-cli-C9OvVBEs.js} +1 -1
- package/dist/{devices-cli-BfwxECLu.js → devices-cli-D4YJarjz.js} +1 -1
- package/dist/{diagnostic-Bzd3eHBU.js → diagnostic-CVAiT8Yi.js} +2 -2
- package/dist/{diagnostic-session-state-C8e7GxAm.js → diagnostic-session-state-Cj5nMvNL.js} +1 -1
- package/dist/{directory-cli-BX_a06o7.js → directory-cli--LuldZqc.js} +2 -2
- package/dist/{directory-cli-BQlGeeQK.js → directory-cli-DHpksyLI.js} +2 -2
- package/dist/{dispatcher-BWcYLowQ.js → dispatcher-D46WCdTe.js} +7 -7
- package/dist/{dispatcher-DefEQC4n.js → dispatcher-D8fgAnwH.js} +7 -7
- package/dist/{dm-policy-shared-Dm70u4Yr.js → dm-policy-shared-CEUsAI0F.js} +1 -1
- package/dist/{dm-policy-shared-DeX6SUMT.js → dm-policy-shared-DZglJJMa.js} +1 -1
- package/dist/{dns-cli-CxMaD4cI.js → dns-cli-C4L7EzEY.js} +2 -2
- package/dist/{dns-cli-DAdvx6qq.js → dns-cli-wSFONc42.js} +2 -2
- package/dist/{docs-cli-BR1YXIH4.js → docs-cli-4Dzg7LrJ.js} +1 -1
- package/dist/{docs-cli-BR8IKtP3.js → docs-cli-BWUGypxO.js} +1 -1
- package/dist/doctor-completion-B4bzzPyA.js +2 -0
- package/dist/doctor-completion-CE9xjPcf.js +2 -0
- package/dist/{doctor-completion-C3YAoPkP.js → doctor-completion-COKl8-PU.js} +1 -1
- package/dist/{doctor-completion-CkIy7FpB.js → doctor-completion-DPjvm1G7.js} +1 -1
- package/dist/{doctor-config-flow-CsP66Ij5.js → doctor-config-flow-CCqETtju.js} +4 -4
- package/dist/{doctor-config-flow-D_WRZLT3.js → doctor-config-flow-CRibe33c.js} +4 -4
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-CLIzgYS8.js → exec-approvals-cli-CCqVDSOe.js} +2 -2
- package/dist/{exec-approvals-cli-DW2-7TEV.js → exec-approvals-cli-RRZ5wIP0.js} +2 -2
- package/dist/extensionAPI.d.ts +36 -2
- package/dist/extensionAPI.js +263 -20
- package/dist/{gateway-Duqy39t3.js → gateway-Bvd5CqY4.js} +3 -3
- package/dist/{gateway-CqhiWZQd.js → gateway-D_kwhuup.js} +3 -3
- package/dist/{gateway-cli-CUrxOlB4.js → gateway-cli-BbuSOWKq.js} +328 -244
- package/dist/{gateway-cli-BrM4d8E7.js → gateway-cli-C-AMSwgo.js} +324 -240
- package/dist/{gateway-0sVK3Rjy.js → gateway-q_fM0u-m.js} +2 -2
- package/dist/{gateway-rpc-BGgh3mTl.js → gateway-rpc-Ed0F1N_m.js} +1 -1
- package/dist/{gateway-rpc-9WQJwkTJ.js → gateway-rpc-J14XBNuM.js} +1 -1
- package/dist/{gateway-tool-DtlbDV6N.js → gateway-tool-Bi96OPGe.js} +3 -3
- package/dist/{gateway-tool-CMd3r3O5.js → gateway-tool-CNaxsMbd.js} +3 -3
- package/dist/{github-copilot-auth-Dh5sombA.js → github-copilot-auth-BmlL3P7c.js} +2 -2
- package/dist/{github-copilot-auth-ClDHXpfT.js → github-copilot-auth-DhjScF3O.js} +2 -2
- package/dist/{gmail-Dkq3kngs.js → gmail-BuCz-KEp.js} +1 -1
- package/dist/{gmail-DpPYd91j.js → gmail-C1O6grHu.js} +1 -1
- package/dist/{health-BlZEOPXK.js → health-6TTjEZoo.js} +8 -8
- package/dist/{health-BJ-Irw3K.js → health-BJbAa4df.js} +8 -8
- package/dist/{hooks-cli-Bqd1BR2r.js → hooks-cli-C0Z9dRtP.js} +2 -2
- package/dist/{hooks-cli-CR_bwhdf.js → hooks-cli-DFrRHJ1j.js} +2 -2
- package/dist/{host-D3VZGype.js → host-C8oRBLB6.js} +1 -1
- package/dist/{host-CafVbu36.js → host-DCfZcVR_.js} +1 -1
- package/dist/{image-tool-CwCxITcF.js → image-tool-D_dhIXLT.js} +2 -2
- package/dist/{image-tool-BY8NbIQs.js → image-tool-y-FDf6-M.js} +2 -2
- package/dist/index.d.ts +36 -2
- package/dist/index.js +10 -10
- package/dist/{io-TKYkFbcF.js → io-C_Q6AU5E.js} +2 -2
- package/dist/{io-oiyyZuuG.js → io-CpUiX-Lv.js} +2 -2
- package/dist/{ir-CP9ltYx0.js → ir-D0vxg3iM.js} +2 -2
- package/dist/{knowledge-graph-Dd0rSl0Q.js → knowledge-graph-BFnL_feN.js} +1 -1
- package/dist/{lifecycle-core-C7W7YZwn.js → lifecycle-core-CCUOBmZs.js} +3 -3
- package/dist/{lifecycle-core-BQztQGrv.js → lifecycle-core-CX37YE4Z.js} +3 -3
- package/dist/llm-slug-generator.js +47 -1
- package/dist/{logs-cli-CdAJHTuP.js → logs-cli-BYdqoMkJ.js} +2 -2
- package/dist/{logs-cli-lcuW5kPv.js → logs-cli-Comxq7pP.js} +2 -2
- package/dist/{manager-DeR0znMP.js → manager-DvUEsXx3.js} +1 -1
- package/dist/{memory-cli-BxVGlaEm.js → memory-cli-Bz--RMDo.js} +3 -3
- package/dist/{memory-cli-Y_w-AsVt.js → memory-cli-ilkHc_D4.js} +3 -3
- package/dist/{message-action-runner-CE4bDq6V.js → message-action-runner-BZQOV03k.js} +9 -9
- package/dist/{message-action-runner-BdclEzxx.js → message-action-runner-J8W9BPhj.js} +9 -9
- package/dist/{message-tool-BpFLUe6E.js → message-tool-BHJpugQ6.js} +6 -6
- package/dist/{message-tool-_MODnjgC.js → message-tool-GTRrYMuR.js} +6 -6
- package/dist/{model-catalog-AiXYmm_2.js → model-catalog-7Ew4iFgU.js} +3 -3
- package/dist/{model-catalog-CIgjk707.js → model-catalog-B1R3eepi.js} +3 -3
- package/dist/{model-fallback-DsefSc26.js → model-fallback--afWtYyY.js} +2 -2
- package/dist/{model-fallback-C92G-WUW.js → model-fallback-DXR7ZbvM.js} +2 -2
- package/dist/{model-fallback-Dwkt7imi.js → model-fallback-GSMox3YK.js} +3 -3
- package/dist/{model-picker-B_SEgewv.js → model-picker--bqpbxbC.js} +2 -2
- package/dist/{model-picker-DLr3xagY.js → model-picker-DJpEjKZT.js} +2 -2
- package/dist/{models-YFKEQsfy.js → models-CETV4zZ3.js} +12 -12
- package/dist/{models-cli-DuHCNW7r.js → models-cli-B5caj79x.js} +2 -2
- package/dist/{models-cli-yoQKaR0X.js → models-cli-DPT6gYJm.js} +12 -12
- package/dist/{models-config-BWzVL4DK.js → models-config-CX3wpMrd.js} +2 -2
- package/dist/{models-config-Df7nRCU-.js → models-config-ChIAfklN.js} +2 -2
- package/dist/{node-cli-D4pCYQMW.js → node-cli-4VRhz_1P.js} +7 -7
- package/dist/{node-cli-DzvdQBVp.js → node-cli-DyoQqYo1.js} +7 -7
- package/dist/{nodes-cli-CHWJMLm6.js → nodes-cli-CNQ633Hz.js} +5 -5
- package/dist/{nodes-cli-cjiOPFLH.js → nodes-cli-Dl3KtKoX.js} +5 -5
- package/dist/{nodes-tool-CR8MmpTZ.js → nodes-tool-BkgixWxk.js} +3 -3
- package/dist/{nodes-tool-DxMgloLr.js → nodes-tool-BmT8LWTt.js} +3 -3
- package/dist/{nodes-utils-BHrOJOWk.js → nodes-utils-B1jr4oHE.js} +1 -1
- package/dist/{nodes-utils-BRFzmJmB.js → nodes-utils-CVaBTJ5V.js} +1 -1
- package/dist/{nodes-utils-Eo4ilZ36.js → nodes-utils-DVNKajNN.js} +1 -1
- package/dist/{onboard-D3EkmOs0.js → onboard-BSb-bXtw.js} +9 -9
- package/dist/{onboard-DdguleAq.js → onboard-DHzBfhN9.js} +9 -9
- package/dist/{onboard-channels-DBltNYY2.js → onboard-channels-BP5oQVqD.js} +1 -1
- package/dist/{onboard-channels-cSzxNqaz.js → onboard-channels-CNmc5fTo.js} +1 -1
- package/dist/{onboard-channels-CeAsHBgW.js → onboard-channels-DHeOj8d6.js} +1 -1
- package/dist/{onboard-channels-ZDMAODeW.js → onboard-channels-DqoegMtk.js} +1 -1
- package/dist/{onboard-custom-DqkrqRdv.js → onboard-custom-B7OO328d.js} +2 -2
- package/dist/{onboard-custom-DMHUJH5-.js → onboard-custom-BODmfSpC.js} +1 -1
- package/dist/{onboard-custom-Vb7K9679.js → onboard-custom-BZv_tJxB.js} +1 -1
- package/dist/{onboard-custom-DOEx3xcN.js → onboard-custom-D7LvDFdH.js} +2 -2
- package/dist/{onboard-helpers-D60Qp1ne.js → onboard-helpers-B9IGa3vx.js} +5 -5
- package/dist/{onboard-helpers-7fbTU2tq.js → onboard-helpers-BKca3qU4.js} +1 -1
- package/dist/{onboard-helpers-DCve32jF.js → onboard-helpers-DP2LE5Oh.js} +5 -5
- package/dist/{onboard-helpers-xGGsG9to.js → onboard-helpers-HkYz_NGi.js} +1 -1
- package/dist/{onboard-remote-B13DRLJa.js → onboard-remote-DQrtJWPJ.js} +1 -1
- package/dist/{onboard-remote-C6s3bR7X.js → onboard-remote-kBPMv7zo.js} +1 -1
- package/dist/{onboard-skills-BU0OKpqj.js → onboard-skills-Cd2WeuBn.js} +3 -3
- package/dist/{onboard-skills-CKzdl2Ph.js → onboard-skills-KRXxu17b.js} +3 -3
- package/dist/{onboarding-BkiZ3JkU.js → onboarding-Cg42Uf0E.js} +11 -11
- package/dist/{onboarding-C--TfoeE.js → onboarding-nPyIyp8f.js} +11 -11
- package/dist/{onboarding.finalize-CUkOVH_E.js → onboarding.finalize-B8gctARP.js} +9 -9
- package/dist/{onboarding.finalize-Damz4ET-.js → onboarding.finalize-BoMhnz3U.js} +9 -9
- package/dist/{onboarding.gateway-config-BA3PQJBL.js → onboarding.gateway-config-Co5c5Jsj.js} +2 -2
- package/dist/{onboarding.gateway-config-4wtmgfdq.js → onboarding.gateway-config-DkkPCpUx.js} +2 -2
- package/dist/{outbound-send-deps-BmDpImVK.js → outbound-send-deps-Dg8cSoFv.js} +6 -6
- package/dist/{outbound-session-B9B7Vsxm.js → outbound-session-BCNTkSVV.js} +3 -3
- package/dist/{outbound-session-pZGUQ4vz.js → outbound-session-BG0ZMrIB.js} +3 -3
- package/dist/{pairing-cli-CRnZKVjx.js → pairing-cli-B_sfgSbk.js} +2 -2
- package/dist/{pairing-cli-aoyKpG0L.js → pairing-cli-mUAKj093.js} +2 -2
- package/dist/{pi-embedded-helpers-D-m7pmXE.js → pi-embedded-helpers-BsRnajNh.js} +1 -1
- package/dist/{pi-embedded-helpers-CkhQP2gU.js → pi-embedded-helpers-CSxJBpFl.js} +1 -1
- package/dist/{pi-embedded-helpers-BbHYim54.js → pi-embedded-helpers-CUfPWD_N.js} +6 -5
- package/dist/{pi-embedded-utils-C6MaVLHj.js → pi-embedded-utils-BlNfBen_.js} +1 -1
- package/dist/{pi-embedded-utils-DIGchmzO.js → pi-embedded-utils-Bql42QTv.js} +1 -1
- package/dist/{pi-embedded-utils-Ip0GsjWb.js → pi-embedded-utils-BtyCE2ZK.js} +1 -1
- package/dist/{pi-model-discovery-Ot_Q_yYa.js → pi-model-discovery-BV73T1am.js} +1 -1
- package/dist/{pi-tools.policy-Dt2kTSid.js → pi-tools.policy-DDJ31-0E.js} +3 -3
- package/dist/{plugin-registry-BZCSZFQn.js → plugin-registry-Dq33ZU89.js} +3 -3
- package/dist/{plugin-registry-DMRnpxA2.js → plugin-registry-RoPLmlrM.js} +3 -3
- package/dist/plugin-sdk/agents/bash/bash-tools.exec-runtime.d.ts +4 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/tool-result-context-guard.d.ts +5 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/tool-result-reduce.d.ts +8 -0
- package/dist/plugin-sdk/agents/sandbox/tier0/index.d.ts +3 -0
- package/dist/plugin-sdk/agents/sandbox/tier0/registry.d.ts +28 -0
- package/dist/plugin-sdk/agents/sandbox/tier0/router.d.ts +18 -0
- package/dist/plugin-sdk/agents/sandbox/tier0/virtual-sandbox.d.ts +30 -0
- package/dist/plugin-sdk/agents/sandbox/types.d.ts +5 -0
- package/dist/plugin-sdk/agents/sections/behaviour.d.ts +9 -0
- package/dist/plugin-sdk/agents/skills/compact-prompt.d.ts +12 -0
- package/dist/plugin-sdk/agents/skills/workspace.d.ts +4 -0
- package/dist/plugin-sdk/channels/discord.js +487 -40
- package/dist/plugin-sdk/channels/googlechat.js +3 -1
- package/dist/plugin-sdk/channels/imessage.js +487 -40
- package/dist/plugin-sdk/channels/line.js +489 -42
- package/dist/plugin-sdk/channels/msteams.js +3 -1
- package/dist/plugin-sdk/channels/signal.js +487 -40
- package/dist/plugin-sdk/channels/slack.js +487 -40
- package/dist/plugin-sdk/channels/telegram.js +487 -40
- package/dist/plugin-sdk/channels/whatsapp.js +488 -41
- package/dist/plugin-sdk/config/types.agent-defaults.d.ts +8 -0
- package/dist/plugin-sdk/config/types.agents.d.ts +4 -0
- package/dist/plugin-sdk/config/types.gateway.d.ts +8 -0
- package/dist/plugin-sdk/config/types.skills.d.ts +7 -0
- package/dist/plugin-sdk/config/types.tools.d.ts +8 -0
- package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +3 -0
- package/dist/plugin-sdk/config/zod-schema.agent-runtime.d.ts +9 -0
- package/dist/plugin-sdk/config/zod-schema.agents.d.ts +6 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +26 -0
- package/dist/plugin-sdk/core.js +6 -2
- package/dist/plugin-sdk/index.js +501 -54
- package/dist/{plugins-cli-BKMBY-np.js → plugins-cli-BA0wJM-k.js} +3 -3
- package/dist/{plugins-cli-D3_BCsVN.js → plugins-cli-a-DWljrI.js} +3 -3
- package/dist/{program-context-CVLR19jJ.js → program-context-CUZUPsiC.js} +43 -43
- package/dist/{program-DFvYiOXj.js → program-gbYi5UIa.js} +7 -7
- package/dist/{prompt-select-styled-D-axSDjg.js → prompt-select-styled-DAdqH32e.js} +17 -17
- package/dist/{prompt-select-styled-n1nMLPsI.js → prompt-select-styled-lKRNiihE.js} +17 -17
- package/dist/{push-apns-Dh6xZki_.js → push-apns-BhtcU_Da.js} +1 -1
- package/dist/{push-apns-D4wjtIOe.js → push-apns-D69Af97u.js} +1 -1
- package/dist/{pw-ai-2VhRhF2B.js → pw-ai-Ba9xJlWV.js} +2 -2
- package/dist/{pw-ai-Blk_s6D5.js → pw-ai-Cvjg4UOk.js} +2 -2
- package/dist/{pw-ai-B6oeo1wI.js → pw-ai-DiwvYyv3.js} +2 -2
- package/dist/{pw-session-Crb06R5v.js → pw-session-BZ1pAX5r.js} +1 -1
- package/dist/{pw-session-DmaV4mTM.js → pw-session-BxiZ6YYh.js} +1 -1
- package/dist/{pw-session-CATqkBLI.js → pw-session-EHew9i-n.js} +1 -1
- package/dist/{qr-cli-B3IWV_8b.js → qr-cli-CFsUuFR-.js} +2 -2
- package/dist/{qr-cli-SfioxAM_.js → qr-cli-SfzcWdI0.js} +2 -2
- package/dist/{register.agent-DDVZDpQC.js → register.agent-B4bNkRtB.js} +11 -11
- package/dist/{register.agent-Dfk70LYq.js → register.agent-DHCAqxWX.js} +8 -8
- package/dist/{register.channel-BvMvb6ip.js → register.channel-B1vKkWV7.js} +2 -2
- package/dist/{register.channel-BJtyCgD7.js → register.channel-D0lVq7dU.js} +2 -2
- package/dist/{register.configure-WQlTjNyz.js → register.configure-DFSJd0YH.js} +1 -1
- package/dist/{register.configure-BdKChDnl.js → register.configure-DIHFldND.js} +1 -1
- package/dist/{register.drone-B-xrDJpJ.js → register.drone-Do4i5ZE9.js} +2 -2
- package/dist/{register.drone-DSHJ5vq1.js → register.drone-Tckr0QFo.js} +2 -2
- package/dist/{register.maintenance-DoMoBeyF.js → register.maintenance-Bw9G1eZ0.js} +5 -5
- package/dist/{register.maintenance-DnP_N0ye.js → register.maintenance-D5LVEuKI.js} +5 -5
- package/dist/{register.message-Xl-pZILp.js → register.message-BsGRyTVT.js} +7 -7
- package/dist/{register.message-Cdp8TM0J.js → register.message-C_51tZCE.js} +8 -8
- package/dist/{register.onboard-BzZPizJ0.js → register.onboard-CMusJAzJ.js} +1 -1
- package/dist/{register.onboard-IPqLR5Zb.js → register.onboard-Ngaw9ikW.js} +1 -1
- package/dist/{register.setup-DLzSctB1.js → register.setup-aKi_hurQ.js} +4 -4
- package/dist/{register.setup-BX8Ya9qY.js → register.setup-xpiPRct8.js} +4 -4
- package/dist/{register.status-health-sessions-CXIHidz6.js → register.status-health-sessions-B87H-g0g.js} +6 -6
- package/dist/{register.status-health-sessions-DnNAMB3T.js → register.status-health-sessions-D2rMUW_t.js} +4 -4
- package/dist/{register.subclis-DAt5WEzu.js → register.subclis-DB0kFld6.js} +30 -30
- package/dist/{reply-D_uwJ_hb.js → reply-CNJWciSj.js} +442 -52
- package/dist/{reply-payloads-BBHotu7W.js → reply-payloads-BS889lPA.js} +2 -2
- package/dist/{reply-payloads-CikGrhVL.js → reply-payloads-Dk-zLmJC.js} +2 -2
- package/dist/{reply-prefix-eSF5kXs5.js → reply-prefix-CfrIMbCM.js} +1 -1
- package/dist/{reply-prefix-CYbvVBOV.js → reply-prefix-D9MQ_veY.js} +1 -1
- package/dist/{resolve-route-FLi7kFo1.js → resolve-route-0arQsERr.js} +1 -1
- package/dist/{resolve-route-DiiBj8NL.js → resolve-route-DwDSX3mI.js} +2 -2
- package/dist/{routes-DFLRIpty.js → routes-DubNFADQ.js} +4 -4
- package/dist/{routes-CagC77kh.js → routes-hcdbDZ60.js} +4 -4
- package/dist/{rpc-DxdMMngu.js → rpc-CpEGWO4f.js} +1 -1
- package/dist/{rpc-dZcSayi6.js → rpc-DShIx1il.js} +1 -1
- package/dist/{run-main-Cw7JO4bk.js → run-main-CgrHeBpO.js} +20 -20
- package/dist/{sandbox-DX1DKAJb.js → sandbox-BYK6Qgnd.js} +9 -8
- package/dist/{sandbox-pZvVQZ-a.js → sandbox-CDGF9AVA.js} +9 -8
- package/dist/{sandbox-cli-DsFqky0Y.js → sandbox-cli-3v8NFyXC.js} +4 -4
- package/dist/{sandbox-cli--NZU5yHm.js → sandbox-cli-DmXP8NkD.js} +4 -4
- package/dist/{security-cli-B9rFqAom.js → security-cli-B23Rjmu8.js} +3 -3
- package/dist/{security-cli-DUGFqvJc.js → security-cli-C7jxF7EW.js} +3 -3
- package/dist/{send-OcwoynpB.js → send-B3EXtlyb.js} +2 -2
- package/dist/{send-BUUHmWJ3.js → send-Boe93Q4V.js} +2 -2
- package/dist/{send-Czh3Yz38.js → send-Br1IcpxR.js} +2 -2
- package/dist/{send-mztwgKny.js → send-BrvRGJ0_.js} +3 -3
- package/dist/{send-CRNffLsb.js → send-BuiJlYF8.js} +2 -2
- package/dist/{send-DTQ_lSWv.js → send-DPURnZWZ.js} +2 -2
- package/dist/{send-Bh69NFd_.js → send-DT-x-IFQ.js} +3 -3
- package/dist/{send-CuFw68zk.js → send-D_PQuZ3x.js} +2 -2
- package/dist/{send-Ckq83rOO.js → send-DhuPDKRX.js} +2 -2
- package/dist/{server-context-D-VUH9Bz.js → server-context-BRKaxwJB.js} +6 -6
- package/dist/{server-context-BlUcP_zF.js → server-context-CvEQbenq.js} +6 -6
- package/dist/{server-context-BNI2cc_e.js → server-context-nyYhGUmI.js} +5 -5
- package/dist/{server-node-events-DQqHB_8B.js → server-node-events-B6rUT0PE.js} +8 -8
- package/dist/{server-node-events-BqG45BMs.js → server-node-events-D90DAPI1.js} +10 -10
- package/dist/{session-status-tool-CN-Juxjq.js → session-status-tool-BIN4ooy0.js} +6 -6
- package/dist/{session-status-tool-DnD354sJ.js → session-status-tool-CtbF1-VI.js} +7 -7
- package/dist/{session-utils-0BYkk3f_.js → session-utils-DDCd8HC9.js} +4 -4
- package/dist/{sessions-CismtNoo.js → sessions-ByNQiqr2.js} +1 -1
- package/dist/{sessions-D_b2UXud.js → sessions-C0Qs0Flz.js} +3 -3
- package/dist/{sessions-0d-dBE8D.js → sessions-CPoA3oJo.js} +4 -4
- package/dist/{sessions-Z8JCL_sa.js → sessions-CW4tzKA-.js} +3 -3
- package/dist/{sessions-helpers-Crh_NTSX.js → sessions-helpers-DdqQiSR6.js} +3 -3
- package/dist/{sessions-helpers-JsbUTHcP.js → sessions-helpers-vwVJ1Vy4.js} +3 -3
- package/dist/{sessions-helpers-uZ0Taeh3.js → sessions-helpers-xH-u6Byb.js} +3 -3
- package/dist/{sessions-history-tool-6VYdT_kc.js → sessions-history-tool-BO81rMTT.js} +5 -5
- package/dist/{sessions-history-tool-6WMcHpxy.js → sessions-history-tool-DKXNjv5X.js} +5 -5
- package/dist/{sessions-list-tool-CwTLRwGc.js → sessions-list-tool-6DJtypdD.js} +5 -5
- package/dist/{sessions-list-tool-CwGp-l3S.js → sessions-list-tool-s_y-_4Uv.js} +5 -5
- package/dist/{sessions-send-tool-BKNgicV5.js → sessions-send-tool-C3ggqtMe.js} +5 -5
- package/dist/{sessions-send-tool-Dl4HKGgL.js → sessions-send-tool-roh-kyNw.js} +5 -5
- package/dist/{sessions-spawn-tool-DqfoPFrK.js → sessions-spawn-tool-BgkkNWMg.js} +1 -1
- package/dist/{sessions-spawn-tool-Bguo3O1I.js → sessions-spawn-tool-UAd65WIb.js} +1 -1
- package/dist/{shared-Cr0N9iap.js → shared-BysrBqEi.js} +2 -2
- package/dist/{shared-B7QVxDsn.js → shared-CjEFJgna.js} +2 -2
- package/dist/{skills-DkeUrhAT.js → skills-Bf4ZPGHe.js} +1 -1
- package/dist/{skills-DMPRReoe.js → skills-DDhWBAii.js} +1 -1
- package/dist/{skills-cli--8zG3UQk.js → skills-cli-DnO1g2oN.js} +6 -6
- package/dist/{skills-cli-D334Q0dM.js → skills-cli-DxFMRja6.js} +6 -6
- package/dist/{skills-install-DAphGXoj.js → skills-install-Bo9PwVmT.js} +2 -2
- package/dist/{skills-install-BNR2Nfa3.js → skills-install-DkZHLCih.js} +2 -2
- package/dist/{skills-status-D54inzOP.js → skills-status-8p-KrlIF.js} +2 -2
- package/dist/{skills-status-DDzkv-Rj.js → skills-status-CBTT87BN.js} +2 -2
- package/dist/{status-BIvJQtxV.js → status-BpgCPxM4.js} +3 -3
- package/dist/{status-JJ8BdlhI.js → status-Db6PPdwI.js} +3 -3
- package/dist/{status-DosDYGut.js → status-DyQwrglF.js} +12 -12
- package/dist/{status-gWt5DmvD.js → status-Dz_-4ATW.js} +13 -13
- package/dist/{status.update-BnYycijV.js → status.update-BBLk_Q3P.js} +1 -1
- package/dist/{status.update-D0KmfrNX.js → status.update-OhQ3FS7R.js} +1 -1
- package/dist/{subagent-registry-0zv9UyYz.js → subagent-registry-C_UHFYRY.js} +443 -53
- package/dist/{subagents-tool-usr_WpP2.js → subagents-tool-BdWYv7Mb.js} +6 -6
- package/dist/{subagents-tool-m92Kjy1x.js → subagents-tool-DjPwvSat.js} +6 -6
- package/dist/{system-cli-t4Qk2mcC.js → system-cli-BQJK1EiV.js} +1 -1
- package/dist/{system-cli-BxYnYU05.js → system-cli-Cj6oDS1q.js} +1 -1
- package/dist/{systemd-hints-JlNoKkcf.js → systemd-hints-BKM-UvY_.js} +1 -1
- package/dist/{systemd-hints-C21GmUrX.js → systemd-hints-BdVIEvO3.js} +1 -1
- package/dist/{targets-BWPxk4rU.js → targets-BpZ7t54u.js} +1 -1
- package/dist/{tools-F4g3knJE.js → tools-D3fRPoa3.js} +421 -38
- package/dist/{tools-cli-Cmg7InJT.js → tools-cli-CjniP2oD.js} +3 -3
- package/dist/{tools-cli-BPV7GpBg.js → tools-cli-DLPn3_f-.js} +3 -3
- package/dist/{tts-CC3WSaW9.js → tts-BhWpmVdG.js} +1 -1
- package/dist/{tts-CRpGlsYO.js → tts-DrFhyLnB.js} +1 -1
- package/dist/{tts-OJZ7iSKo.js → tts-DyQvwyVi.js} +1 -1
- package/dist/{tts-tool-DsLN8-ZT.js → tts-tool-CdaKVWBM.js} +3 -3
- package/dist/{tts-tool-B73xs8Vs.js → tts-tool-CfEs7ebD.js} +3 -3
- package/dist/{tui-BRdOjXJy.js → tui-CNuz7tKz.js} +5 -5
- package/dist/{tui-PSDwA6SF.js → tui-DJvjN1xV.js} +5 -5
- package/dist/{tui-cli-DMD7clw2.js → tui-cli-CLoyYSXd.js} +1 -1
- package/dist/{tui-cli-DHWrleUP.js → tui-cli-DhhA87TG.js} +1 -1
- package/dist/{update-cli-DlxYgSAN.js → update-cli-0lBEnFj5.js} +8 -8
- package/dist/{update-cli-Du5BbYfl.js → update-cli-Cc4jgBsG.js} +8 -8
- package/dist/{validation-CG8Ui8_v.js → validation-B-XaORq2.js} +5 -1
- package/dist/{validation-T0CNq_JP.js → validation-DuFmPzCB.js} +5 -1
- package/dist/web-BUkj8HIz.js +2 -0
- package/dist/{web-CtwxKIvO.js → web-BY79LufL.js} +8 -8
- package/dist/{web-search-B5d6ODyB.js → web-search-CCeGZMBD.js} +4 -4
- package/dist/{web-search-CV42wG57.js → web-search-D1pX-Tuc.js} +4 -4
- package/dist/{webhooks-cli-tSv_Pzzq.js → webhooks-cli-B3LP9UKY.js} +5 -5
- package/dist/{webhooks-cli-BeHnKv6z.js → webhooks-cli-C5xR4Wu5.js} +5 -5
- package/dist/{workspace-Dov1_dCF.js → workspace-BwzunhL2.js} +49 -3
- package/dist/{workspace-CSGZ3DZ_.js → workspace-CVAkpBJa.js} +48 -2
- package/dist/{workspace-CSBTFAxh.js → workspace-D5-DoTNR.js} +48 -2
- package/dist/{workspace-dirs-Yo4RZm7s.js → workspace-dirs-CJDJUlno.js} +3 -3
- package/docs/superpowers/plans/2026-06-10-phase1-quick-wins.md +1260 -0
- package/docs/superpowers/specs/2026-06-10-recon-quick-wins-and-silent-agent-design.md +151 -0
- package/extensions/alert-watcher/index.js +47 -1
- package/extensions/bluebubbles/index.js +5 -1
- package/extensions/feishu/index.js +5 -1
- package/extensions/flows/index.js +52 -2
- package/extensions/gmail-calendar/index.js +47 -1
- package/extensions/googlechat/index.js +5 -1
- package/extensions/irc/index.js +5 -1
- package/extensions/llm-task/index.js +47 -1
- package/extensions/matrix/{credentials-B1q3x-N0.mjs → credentials-BtiLgiNR.mjs} +5 -1
- package/extensions/matrix/index.js +3 -3
- package/extensions/matrix/{matrix-B9amoffh.mjs → matrix-CWlUSNSh.mjs} +2 -2
- package/extensions/matrix/{resolve-targets-Dw7tv-7K.mjs → resolve-targets-ml4iU4Bd.mjs} +2 -2
- package/extensions/mattermost/index.js +5 -1
- package/extensions/nextcloud-talk/index.js +5 -1
- package/extensions/tlon/index.js +47 -1
- package/extensions/wati/index.js +5 -1
- package/extensions/weixin/index.js +5 -1
- package/extensions/zalo/index.js +5 -1
- package/extensions/zalouser/index.js +5 -1
- package/package.json +3 -2
- package/dist/config-guard-BfdkKYAa.js +0 -2
- package/dist/daemon-install-helpers-4gMthp-_.js +0 -2
- package/dist/daemon-install-helpers-BLXYJ3C5.js +0 -2
- package/dist/doctor-completion-DKJRw1m1.js +0 -2
- package/dist/doctor-completion-DMcJXsi0.js +0 -2
- package/dist/web-Dj8nR4rt.js +0 -2
|
@@ -2,7 +2,7 @@ import { n as __exportAll } from "./chunk-2rV9d50f.js";
|
|
|
2
2
|
import { v as resolveStateDir } from "./paths-Ce170Tex.js";
|
|
3
3
|
import { C as shortenHomePath, D as truncateUtf16Safe, F as shouldLogVerbose, L as getChildLogger, M as logVerbose, R as getLogger, S as shortenHomeInString, T as sliceUtf16Safe, W as normalizeLogLevel, b as resolveUserPath, d as isPlainObject, f as isRecord, i as clampInt, l as escapeRegExp, t as CONFIG_DIR, w as sleep } from "./utils-DsgtGH3c.js";
|
|
4
4
|
import { r as theme } from "./theme-CDbj88LB.js";
|
|
5
|
-
import { A as isTransientHttpError, C as getApiErrorPayloadFingerprint, D as isContextOverflowError, E as isCompactionFailureError, F as resolveBootstrapMaxChars, G as normalizeUsageDisplay, H as normalizeElevatedLevel, I as resolveBootstrapTotalMaxChars, J as supportsXHighThinking, K as normalizeVerboseLevel, L as sanitizeGoogleTurnOrdering, M as parseImageSizeError, N as buildBootstrapContextFiles, O as isLikelyContextOverflowError, P as ensureSessionHeader, R as formatThinkingLevels, S as sanitizeUserFacingText, T as isCloudCodeAssistFormatError, U as normalizeReasoningLevel, W as normalizeThinkLevel, _ as isFailoverErrorMessage, a as isMessagingToolDuplicateNormalized, b as formatBillingErrorMessage, c as extractToolCallsFromAssistant, d as isAntigravityClaude, f as isGoogleModelApi, g as isFailoverAssistantError, h as isBillingAssistantError, j as parseImageDimensionError, k as isTimeoutErrorMessage, l as extractToolResultId, m as isAuthAssistantError, n as validateGeminiTurns, o as normalizeTextForComparison, p as classifyFailoverReason, q as resolveResponseUsageMode, r as pickFallbackThinkingLevel, s as sanitizeSessionMessagesImages, t as validateAnthropicTurns, u as downgradeOpenAIReasoningBlocks, v as isRateLimitAssistantError, w as isRawApiErrorPayload, x as formatRawAssistantErrorForUi, y as formatAssistantErrorText, z as formatXHighModelHint } from "./pi-embedded-helpers-
|
|
5
|
+
import { A as isTransientHttpError, C as getApiErrorPayloadFingerprint, D as isContextOverflowError, E as isCompactionFailureError, F as resolveBootstrapMaxChars, G as normalizeUsageDisplay, H as normalizeElevatedLevel, I as resolveBootstrapTotalMaxChars, J as supportsXHighThinking, K as normalizeVerboseLevel, L as sanitizeGoogleTurnOrdering, M as parseImageSizeError, N as buildBootstrapContextFiles, O as isLikelyContextOverflowError, P as ensureSessionHeader, R as formatThinkingLevels, S as sanitizeUserFacingText, T as isCloudCodeAssistFormatError, U as normalizeReasoningLevel, W as normalizeThinkLevel, _ as isFailoverErrorMessage, a as isMessagingToolDuplicateNormalized, b as formatBillingErrorMessage, c as extractToolCallsFromAssistant, d as isAntigravityClaude, f as isGoogleModelApi, g as isFailoverAssistantError, h as isBillingAssistantError, j as parseImageDimensionError, k as isTimeoutErrorMessage, l as extractToolResultId, m as isAuthAssistantError, n as validateGeminiTurns, o as normalizeTextForComparison, p as classifyFailoverReason, q as resolveResponseUsageMode, r as pickFallbackThinkingLevel, s as sanitizeSessionMessagesImages, t as validateAnthropicTurns, u as downgradeOpenAIReasoningBlocks, v as isRateLimitAssistantError, w as isRawApiErrorPayload, x as formatRawAssistantErrorForUi, y as formatAssistantErrorText, z as formatXHighModelHint } from "./pi-embedded-helpers-CSxJBpFl.js";
|
|
6
6
|
import { A as listPluginCommands, C as setActivePluginRegistry, D as createPluginRegistry, F as triggerInternalHook, H as registerMcpTool, N as createInternalHookEvent, O as clearPluginCommands, T as setActivePluginRuntime, f as CHAT_CHANNEL_ORDER, j as matchPluginCommand, k as executePluginCommand, t as createSubsystemLogger, v as normalizeAnyChannelId, w as setActivePluginRegistryConfig, y as normalizeChannelId } from "./subsystem-Cnn1-kOi.js";
|
|
7
7
|
import { t as defaultRuntime } from "./runtime-Da615Z-K.js";
|
|
8
8
|
import { S as resolveThreadParentSessionKey, b as isSubagentSessionKey, c as normalizeAccountId, d as resolveAgentIdFromSessionKey, g as getSubagentDepth, l as normalizeAgentId, s as classifySessionKeyShape, u as normalizeMainKey, v as isCronRunSessionKey, x as parseAgentSessionKey, y as isCronSessionKey } from "./session-key-BcXqsG0l.js";
|
|
@@ -17,21 +17,21 @@ import { t as requireNodeSqlite } from "./sqlite-TEJFfaDd.js";
|
|
|
17
17
|
import { a as trackToolExecution, c as flushSentry, f as startSentrySpan, i as trackSkillExecution, o as addSentryBreadcrumb, p as withSentryIsolationScope, s as captureError, t as emitReliabilityEvent } from "./reliability-sDt3TayA.js";
|
|
18
18
|
import { t as parseBooleanValue } from "./boolean-CmCIXLWi.js";
|
|
19
19
|
import { n as logAcceptedEnvOption, t as isTruthyEnvValue } from "./env-Ceu1fF46.js";
|
|
20
|
-
import { E as parseDurationMs, n as validateConfigObjectWithPlugins, s as validateJsonSchemaValue } from "./validation-
|
|
21
|
-
import { S as VERSION, _ as setConfigValueAtPath, d as getConfigOverrides, f as resetConfigOverrides, g as parseConfigPath, h as getConfigValueAtPath, i as loadConfig, l as writeConfigFile, m as unsetConfigOverride, o as readConfigFileSnapshot, p as setConfigOverride, v as unsetConfigValueAtPath } from "./io-
|
|
20
|
+
import { E as parseDurationMs, n as validateConfigObjectWithPlugins, s as validateJsonSchemaValue } from "./validation-DuFmPzCB.js";
|
|
21
|
+
import { S as VERSION, _ as setConfigValueAtPath, d as getConfigOverrides, f as resetConfigOverrides, g as parseConfigPath, h as getConfigValueAtPath, i as loadConfig, l as writeConfigFile, m as unsetConfigOverride, o as readConfigFileSnapshot, p as setConfigOverride, v as unsetConfigValueAtPath } from "./io-CpUiX-Lv.js";
|
|
22
22
|
import { c as applyTestPluginDefaults, d as resolveEnableState, f as resolveMemorySlotDecision, h as isMemorySlotPlugin, i as discoverOpenClawPlugins, n as loadPluginManifestRegistry, o as emptyPluginConfigSchema, u as normalizePluginsConfig } from "./manifest-registry-CGpdVni_.js";
|
|
23
|
-
import "./config-
|
|
23
|
+
import "./config-DJTLRK5S.js";
|
|
24
24
|
import { D as normalizeChatType, T as normalizeDiscordToken, _ as resolveTelegramAccount, c as resolveWhatsAppAccount, n as listChannelPlugins, r as normalizeChannelId$1, t as getChannelPlugin, w as resolveDiscordAccount, x as resolveSlackAccount } from "./plugins-DQY2DPZw.js";
|
|
25
|
-
import { A as evaluateSessionFreshness, B as resolveMainSessionKey, F as DEFAULT_RESET_TRIGGERS, G as listChannelDocks, H as deriveSessionMetaPatch, I as resolveFreshSessionTotalTokens, K as resolveChannelGroupPolicy, L as canonicalizeMainSessionAlias, M as resolveSessionResetPolicy, N as resolveSessionResetType, P as resolveThreadFlag, R as resolveAgentMainSessionKey, T as readSessionTitleFieldsFromTranscript, W as getChannelDock, X as resolveGroupSessionKey, Y as buildGroupDisplayName, Z as normalizeAtHashSlug, _ as normalizeDeliveryContext, a as loadSessionStore, d as updateSessionStoreEntry, et as acquireSessionWriteLock, f as isCacheEnabled, g as mergeDeliveryContext, h as deliveryContextKey, j as resolveChannelResetConfig, k as resolveSessionKey, l as updateLastRoute, m as deliveryContextFromSession, nt as resolveSessionLockMaxHoldFromTimeout, o as readSessionUpdatedAt, p as resolveCacheTtlMs, q as resolveChannelGroupRequireMention, rt as resolveConversationLabel, s as recordSessionMetaFromInbound, u as updateSessionStore, v as normalizeSessionDeliveryFields, x as archiveSessionTranscripts } from "./sessions-
|
|
26
|
-
import { a as isTimeoutError, l as resolveWorkspaceRoot, m as minimaxUnderstandImage, n as runWithModelFallback, o as resolveFailoverReasonFromError, r as FailoverError, s as resolveFailoverStatus, u as coerceImageAssistantText } from "./model-fallback
|
|
27
|
-
import { n as ensureOpenClawModelsJson, t as ensureMinionModelsJson } from "./models-config-
|
|
25
|
+
import { A as evaluateSessionFreshness, B as resolveMainSessionKey, F as DEFAULT_RESET_TRIGGERS, G as listChannelDocks, H as deriveSessionMetaPatch, I as resolveFreshSessionTotalTokens, K as resolveChannelGroupPolicy, L as canonicalizeMainSessionAlias, M as resolveSessionResetPolicy, N as resolveSessionResetType, P as resolveThreadFlag, R as resolveAgentMainSessionKey, T as readSessionTitleFieldsFromTranscript, W as getChannelDock, X as resolveGroupSessionKey, Y as buildGroupDisplayName, Z as normalizeAtHashSlug, _ as normalizeDeliveryContext, a as loadSessionStore, d as updateSessionStoreEntry, et as acquireSessionWriteLock, f as isCacheEnabled, g as mergeDeliveryContext, h as deliveryContextKey, j as resolveChannelResetConfig, k as resolveSessionKey, l as updateLastRoute, m as deliveryContextFromSession, nt as resolveSessionLockMaxHoldFromTimeout, o as readSessionUpdatedAt, p as resolveCacheTtlMs, q as resolveChannelGroupRequireMention, rt as resolveConversationLabel, s as recordSessionMetaFromInbound, u as updateSessionStore, v as normalizeSessionDeliveryFields, x as archiveSessionTranscripts } from "./sessions-CW4tzKA-.js";
|
|
26
|
+
import { a as isTimeoutError, l as resolveWorkspaceRoot, m as minimaxUnderstandImage, n as runWithModelFallback, o as resolveFailoverReasonFromError, r as FailoverError, s as resolveFailoverStatus, u as coerceImageAssistantText } from "./model-fallback--afWtYyY.js";
|
|
27
|
+
import { n as ensureOpenClawModelsJson, t as ensureMinionModelsJson } from "./models-config-CX3wpMrd.js";
|
|
28
28
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-BLXsXccX.js";
|
|
29
|
-
import { a as formatReasoningMessage, c as promoteThinkingTagsToBlocks, f as extractTextFromChatContent, i as extractThinkingFromTaggedText, l as stripDowngradedToolCallText, n as extractAssistantThinking, o as inferToolMetaFromArgs, r as extractThinkingFromTaggedStream, s as isAssistantMessage, t as extractAssistantText } from "./pi-embedded-utils-
|
|
29
|
+
import { a as formatReasoningMessage, c as promoteThinkingTagsToBlocks, f as extractTextFromChatContent, i as extractThinkingFromTaggedText, l as stripDowngradedToolCallText, n as extractAssistantThinking, o as inferToolMetaFromArgs, r as extractThinkingFromTaggedStream, s as isAssistantMessage, t as extractAssistantText } from "./pi-embedded-utils-BtyCE2ZK.js";
|
|
30
30
|
import { n as resolveToolDisplay } from "./tool-display-ByuoRPis.js";
|
|
31
|
-
import { C as compileGlobPatterns, S as stripPluginOnlyAllowlist, _ as expandPolicyWithPluginGroups, a as ensureSandboxWorkspaceForSession, b as normalizeToolName, c as resolveSandboxRuntimeStatus, g as collectExplicitAllowlist, h as buildPluginToolGroups, m as applyOwnerOnlyToolPolicy, o as resolveSandboxContext, u as resolveSandboxConfigForAgent, w as matchesAnyGlobPattern, x as resolveToolProfilePolicy, y as mergeAlsoAllowPolicy } from "./sandbox-
|
|
31
|
+
import { C as compileGlobPatterns, S as stripPluginOnlyAllowlist, _ as expandPolicyWithPluginGroups, a as ensureSandboxWorkspaceForSession, b as normalizeToolName, c as resolveSandboxRuntimeStatus, g as collectExplicitAllowlist, h as buildPluginToolGroups, m as applyOwnerOnlyToolPolicy, o as resolveSandboxContext, u as resolveSandboxConfigForAgent, w as matchesAnyGlobPattern, x as resolveToolProfilePolicy, y as mergeAlsoAllowPolicy } from "./sandbox-BYK6Qgnd.js";
|
|
32
32
|
import { l as safeEqualSecret } from "./auth-2GwvV8-B.js";
|
|
33
|
-
import { i as resolveSkillsPromptForRun, l as assertSandboxPath, n as buildWorkspaceSkillSnapshot, o as resolvePluginSkillDirs, r as loadWorkspaceSkillEntries, t as buildWorkspaceSkillCommandSpecs, u as resolveSandboxInputPath } from "./workspace-
|
|
34
|
-
import { n as resolveSkillEnvMap, r as resolveSkillEnvMapFromSnapshot } from "./skills-
|
|
33
|
+
import { i as resolveSkillsPromptForRun, l as assertSandboxPath, n as buildWorkspaceSkillSnapshot, o as resolvePluginSkillDirs, r as loadWorkspaceSkillEntries, t as buildWorkspaceSkillCommandSpecs, u as resolveSandboxInputPath } from "./workspace-CVAkpBJa.js";
|
|
34
|
+
import { n as resolveSkillEnvMap, r as resolveSkillEnvMapFromSnapshot } from "./skills-Bf4ZPGHe.js";
|
|
35
35
|
import { r as formatUncaughtError, t as extractErrorCode } from "./errors-iV4-NKRR.js";
|
|
36
36
|
import { a as isPrivateIpAddress, i as isBlockedHostname } from "./ssrf-DWqM0QRy.js";
|
|
37
37
|
import { c as detectMime, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, m as kindFromMime, s as resizeToJpeg, u as getFileExtension, v as mediaKindFromMime } from "./image-ops-BGSWtWRb.js";
|
|
@@ -50,25 +50,25 @@ import { t as fetchWithSsrFGuard } from "./fetch-guard-qmA7mTor.js";
|
|
|
50
50
|
import { a as parseGeminiAuth, i as executeWithApiKeyRotation, n as resolveMemorySearchConfig, r as collectProviderApiKeysForExecution } from "./manager-BZBh94PG.js";
|
|
51
51
|
import { a as fetchRemoteMedia, i as MediaFetchError, n as loadWebMedia, o as readResponseWithLimit } from "./load-COfKYLII.js";
|
|
52
52
|
import { h as runTasksWithConcurrency } from "./session-files-CPxBfdXT.js";
|
|
53
|
-
import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-
|
|
53
|
+
import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-B1R3eepi.js";
|
|
54
54
|
import { n as SILENT_REPLY_TOKEN, r as isSilentReplyText } from "./tokens-DRSqc0S5.js";
|
|
55
55
|
import { a as stripHeartbeatToken, i as resolveHeartbeatPrompt, n as AGENT_LANE_SUBAGENT } from "./lanes-D8quZPN3.js";
|
|
56
|
-
import { c as resolveAgentRoute, d as listChannelSupportedActions, f as resolveChannelMessageToolHints, i as resolveSessionDeliveryTarget, l as isPersonalAgentId, p as resolveTelegramInlineButtonsScope, u as listChannelAgentTools } from "./targets-
|
|
57
|
-
import { n as getMachineDisplayName, t as withTimeout$
|
|
56
|
+
import { c as resolveAgentRoute, d as listChannelSupportedActions, f as resolveChannelMessageToolHints, i as resolveSessionDeliveryTarget, l as isPersonalAgentId, p as resolveTelegramInlineButtonsScope, u as listChannelAgentTools } from "./targets-BpZ7t54u.js";
|
|
57
|
+
import { n as getMachineDisplayName, t as withTimeout$3 } from "./with-timeout-B2r_vm3n.js";
|
|
58
58
|
import { a as logMessageProcessed, d as isDiagnosticsEnabled, i as logLaneEnqueue, o as logMessageQueued, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as emitDiagnosticEvent } from "./diagnostic-BGtWFYHO.js";
|
|
59
59
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-BnA8DWCj.js";
|
|
60
|
-
import { _ as initializeGlobalHookRunner, a as isRenderablePayload, c as resolveReplyToMode, d as normalizeTargetForProvider, f as parseReplyDirectives, g as getGlobalHookRunner, h as parseInlineDirectives$1, i as filterMessagingToolMediaDuplicates, m as splitMediaFromOutput, n as applyReplyThreading, o as shouldSuppressMessagingToolReplies, p as MEDIA_TOKEN_RE, r as filterMessagingToolDuplicates, s as createReplyToModeFilterForChannel, t as applyReplyTagsToPayload } from "./reply-payloads-
|
|
61
|
-
import { S as textToSpeechTelephony, _ as setTtsEnabled, a as isSummarizationEnabled, b as stripTtsDirectivesFromText, c as maybeApplyTtsToPayload, d as resolveTtsAutoMode, f as resolveTtsConfig, g as setSummarizationEnabled, h as setLastTtsAttempt, i as getTtsProvider, l as normalizeTtsAutoMode, n as getLastTtsAttempt, o as isTtsEnabled, p as resolveTtsPrefsPath, r as getTtsMaxLength, s as isTtsProviderConfigured, t as buildTtsSystemPromptHint, u as resolveTtsApiKey, v as setTtsMaxLength, x as textToSpeech, y as setTtsProvider } from "./tts-
|
|
60
|
+
import { _ as initializeGlobalHookRunner, a as isRenderablePayload, c as resolveReplyToMode, d as normalizeTargetForProvider, f as parseReplyDirectives, g as getGlobalHookRunner, h as parseInlineDirectives$1, i as filterMessagingToolMediaDuplicates, m as splitMediaFromOutput, n as applyReplyThreading, o as shouldSuppressMessagingToolReplies, p as MEDIA_TOKEN_RE, r as filterMessagingToolDuplicates, s as createReplyToModeFilterForChannel, t as applyReplyTagsToPayload } from "./reply-payloads-BS889lPA.js";
|
|
61
|
+
import { S as textToSpeechTelephony, _ as setTtsEnabled, a as isSummarizationEnabled, b as stripTtsDirectivesFromText, c as maybeApplyTtsToPayload, d as resolveTtsAutoMode, f as resolveTtsConfig, g as setSummarizationEnabled, h as setLastTtsAttempt, i as getTtsProvider, l as normalizeTtsAutoMode, n as getLastTtsAttempt, o as isTtsEnabled, p as resolveTtsPrefsPath, r as getTtsMaxLength, s as isTtsProviderConfigured, t as buildTtsSystemPromptHint, u as resolveTtsApiKey, v as setTtsMaxLength, x as textToSpeech, y as setTtsProvider } from "./tts-BhWpmVdG.js";
|
|
62
62
|
import { n as isVoiceCompatibleAudio } from "./audio-ChfrjdpD.js";
|
|
63
63
|
import { a as traceGatewayEvent, i as traceChatEvent, t as deriveTraceId } from "./chat-trace-B7hAMbQe.js";
|
|
64
64
|
import { n as createAuditStore, r as getToolPrivacyDeclaration } from "./audit-store-BSum3CGP.js";
|
|
65
65
|
import { t as wrapToolWithTracking } from "./tool-tracking-D_0GybmF.js";
|
|
66
|
-
import { i as resolveMemoryBackendConfig, n as registerMemoryCli, r as getMemorySearchManager } from "./memory-cli-
|
|
66
|
+
import { i as resolveMemoryBackendConfig, n as registerMemoryCli, r as getMemorySearchManager } from "./memory-cli-Bz--RMDo.js";
|
|
67
67
|
import { a as readNumberParam, i as jsonResult, s as readStringParam } from "./common-CRD8HhuP.js";
|
|
68
68
|
import { a as chunkByNewline, c as chunkMarkdownTextWithMode, d as resolveChunkMode, f as resolveTextChunkLimit, h as parseFenceSpans, i as resolveMarkdownTableMode, l as chunkText, m as isSafeFenceBreak, p as findFenceSpanAt, s as chunkMarkdownText, u as chunkTextWithMode } from "./ir-BymCrWXa.js";
|
|
69
|
-
import { i as shouldHandleTextCommands, n as listChatCommandsForConfig, r as normalizeCommandBody, t as listChatCommands } from "./commands-registry-
|
|
70
|
-
import { n as callGateway } from "./call-
|
|
71
|
-
import { a as stripToolMessages, d as resolveDisplaySessionKey, f as resolveInternalSessionKey, i as sanitizeTextContent, p as resolveMainSessionAlias, r as extractAssistantText$1 } from "./sessions-helpers-
|
|
69
|
+
import { i as shouldHandleTextCommands, n as listChatCommandsForConfig, r as normalizeCommandBody, t as listChatCommands } from "./commands-registry-SXjoCA7i.js";
|
|
70
|
+
import { n as callGateway } from "./call-Di0NGY7s.js";
|
|
71
|
+
import { a as stripToolMessages, d as resolveDisplaySessionKey, f as resolveInternalSessionKey, i as sanitizeTextContent, p as resolveMainSessionAlias, r as extractAssistantText$1 } from "./sessions-helpers-vwVJ1Vy4.js";
|
|
72
72
|
import { n as formatTimeAgo } from "./format-relative-Bjc3l98W.js";
|
|
73
73
|
import { n as detectSuspiciousPatterns } from "./external-content-Css-cJoz.js";
|
|
74
74
|
import { n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-mLVM0GeJ.js";
|
|
@@ -76,11 +76,11 @@ import { t as convertMarkdownTables } from "./tables-C-ptiWgf.js";
|
|
|
76
76
|
import { a as removeChannelAllowFromStoreEntry, c as listPairingChannels, i as readChannelAllowFromStore, o as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-BfRe9i9o.js";
|
|
77
77
|
import { d as resolveExecApprovals, f as resolveExecApprovalsFromFile, g as resolveSafeBins, h as evaluateShellAllowlist, i as maxAsk, l as recordAllowlistUse, n as addAllowlistEntry, o as minSecurity, u as requiresExecApproval, v as buildSafeBinsShellCommand, y as buildSafeShellCommand } from "./exec-approvals-DWRoIcX_.js";
|
|
78
78
|
import { i as buildNodeShellCommand, n as mergePathPrepend, r as normalizePathPrepend, t as applyPathPrepend } from "./path-prepend-DJZoKorq.js";
|
|
79
|
-
import { t as callGatewayTool } from "./gateway-
|
|
80
|
-
import { r as resolveNodeIdFromList, t as listNodes } from "./nodes-utils-
|
|
79
|
+
import { t as callGatewayTool } from "./gateway-Bvd5CqY4.js";
|
|
80
|
+
import { r as resolveNodeIdFromList, t as listNodes } from "./nodes-utils-B1jr4oHE.js";
|
|
81
81
|
import { t as formatDurationCompact$1 } from "./format-duration-DxxnRZtB.js";
|
|
82
82
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-BYTEhHLM.js";
|
|
83
|
-
import { a as resolveGroupToolPolicy, c as archetypeDefault, d as shouldForceWorkspaceOnly, i as resolveEffectiveToolPolicy, l as SCOPE_DECLARED_TOOL_NAMES, n as filterToolsByPolicy, o as resolveSubagentToolPolicy, r as isToolAllowedByPolicies, t as listAgentWorkspaceDirs, u as isRestrictedAgent } from "./workspace-dirs-
|
|
83
|
+
import { a as resolveGroupToolPolicy, c as archetypeDefault, d as shouldForceWorkspaceOnly, i as resolveEffectiveToolPolicy, l as SCOPE_DECLARED_TOOL_NAMES, n as filterToolsByPolicy, o as resolveSubagentToolPolicy, r as isToolAllowedByPolicies, t as listAgentWorkspaceDirs, u as isRestrictedAgent } from "./workspace-dirs-CJDJUlno.js";
|
|
84
84
|
import { i as recordMemories, r as recallMemories } from "./memory-sink-D19pkCCX.js";
|
|
85
85
|
import { n as emitMemoryRead, t as KnowledgeGraphSession } from "./knowledge-graph-DoB5Rkcc.js";
|
|
86
86
|
import { a as buildModelAliasLines, n as resolveModel$2 } from "./model-b6itFF0n.js";
|
|
@@ -108,6 +108,7 @@ import { createJiti } from "jiti";
|
|
|
108
108
|
import { Type } from "typebox";
|
|
109
109
|
import chokidar from "chokidar";
|
|
110
110
|
import { Type as Type$1 } from "@sinclair/typebox";
|
|
111
|
+
import { Bash, InMemoryFs, MountableFs, ReadWriteFs } from "just-bash";
|
|
111
112
|
import { EventEmitter } from "node:events";
|
|
112
113
|
//#region src/auto-reply/reply/directive-parsing.ts
|
|
113
114
|
function skipDirectiveArgPrefix(raw) {
|
|
@@ -9606,7 +9607,7 @@ async function routeReply(params) {
|
|
|
9606
9607
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
9607
9608
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
9608
9609
|
try {
|
|
9609
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
9610
|
+
const { deliverOutboundPayloads } = await import("./deliver-Ds0o_rCY.js").then((n) => n.n);
|
|
9610
9611
|
return {
|
|
9611
9612
|
ok: true,
|
|
9612
9613
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -11456,6 +11457,189 @@ function buildLandlockSandboxEnv(workdir) {
|
|
|
11456
11457
|
};
|
|
11457
11458
|
}
|
|
11458
11459
|
//#endregion
|
|
11460
|
+
//#region src/agents/sandbox/tier0/router.ts
|
|
11461
|
+
/**
|
|
11462
|
+
* Tier-0 routing + interpreter-limitation heuristics.
|
|
11463
|
+
*
|
|
11464
|
+
* `shouldTryTier0` decides — cheaply, before running anything — whether a command
|
|
11465
|
+
* is a candidate for the in-process virtual sandbox. It is CONSERVATIVE: anything
|
|
11466
|
+
* that needs the network, a real runtime/toolchain, a privileged syscall, or an
|
|
11467
|
+
* external binary that lives outside the virtual command set escalates straight
|
|
11468
|
+
* to Docker. When tier-0 is tried and just-bash can't serve it, the exec result
|
|
11469
|
+
* is flagged `unsupported` (see isInterpreterLimitation) and the caller escalates.
|
|
11470
|
+
*/
|
|
11471
|
+
const ESCALATE_PATTERNS = [
|
|
11472
|
+
/\b(curl|wget|nc|ncat|netcat|ssh|scp|sftp|rsync|ping|dig|nslookup|host)\b/,
|
|
11473
|
+
/\b(python3?|pip3?|node|npm|pnpm|yarn|bun|deno|ruby|perl|php|cargo|rustc|go|gcc|g\+\+|cc|clang|make|cmake|java|javac|dotnet)\b/,
|
|
11474
|
+
/\b(apt|apt-get|dpkg|yum|dnf|apk|brew|sudo|su|systemctl|service|mount|umount|chroot|insmod|modprobe|iptables)\b/,
|
|
11475
|
+
/\b(docker|kubectl|helm|git|gh|aws|gcloud|az|terraform|ffmpeg|convert|magick|pandoc)\b/,
|
|
11476
|
+
/(^|\s|=)\/(dev|proc|sys)\//,
|
|
11477
|
+
/<\(|>\(/
|
|
11478
|
+
];
|
|
11479
|
+
function shouldTryTier0(command) {
|
|
11480
|
+
const cmd = command.trim();
|
|
11481
|
+
if (!cmd) return false;
|
|
11482
|
+
for (const re of ESCALATE_PATTERNS) if (re.test(cmd)) return false;
|
|
11483
|
+
return true;
|
|
11484
|
+
}
|
|
11485
|
+
/**
|
|
11486
|
+
* Distinguish "just-bash can't do this" from "the user's command legitimately
|
|
11487
|
+
* failed". Known limitations in just-bash@3.0.1 include `$(( ))` arithmetic
|
|
11488
|
+
* expansion (trips its own defense-in-depth `node:module` guard) and any
|
|
11489
|
+
* unimplemented builtin. These must escalate to Docker, not surface as failures.
|
|
11490
|
+
*/
|
|
11491
|
+
function isInterpreterLimitation(stderr) {
|
|
11492
|
+
if (!stderr) return false;
|
|
11493
|
+
return /security violation/i.test(stderr) || /indicates a bug in just-bash/i.test(stderr) || /\bcommand not found\b/i.test(stderr) || /not (yet )?(supported|implemented)/i.test(stderr) || /unknown command/i.test(stderr);
|
|
11494
|
+
}
|
|
11495
|
+
//#endregion
|
|
11496
|
+
//#region src/agents/sandbox/tier0/virtual-sandbox.ts
|
|
11497
|
+
/**
|
|
11498
|
+
* Tier-0 virtual sandbox — an in-process bash backend powered by just-bash.
|
|
11499
|
+
*
|
|
11500
|
+
* This is the cheap/fast tier in front of the Docker sandbox. For the high-volume
|
|
11501
|
+
* "safe" majority of agent shell calls (string munging, fs reads/writes in the
|
|
11502
|
+
* workspace, grep/sed/jq-style pipelines) it runs the command in-process against
|
|
11503
|
+
* an in-memory shell with the real workspace dir mounted — no container spawn.
|
|
11504
|
+
*
|
|
11505
|
+
* Correctness: the agent's real workspace dir is mounted (read-write, symlink-
|
|
11506
|
+
* blocked, root-jailed via just-bash's ReadWriteFs) at the container workdir, so
|
|
11507
|
+
* file visibility is identical to the Docker path. `/tmp` etc. live on an
|
|
11508
|
+
* InMemoryFs base. Network and python are OFF by default (just-bash defaults).
|
|
11509
|
+
*
|
|
11510
|
+
* Anything just-bash can't serve (an unimplemented builtin, an internal error)
|
|
11511
|
+
* sets `unsupported: true`; callers MUST escalate those to the Docker backend.
|
|
11512
|
+
* See ./router.ts for the routing + interpreter-limitation heuristics.
|
|
11513
|
+
*/
|
|
11514
|
+
var Tier0VirtualSandbox = class {
|
|
11515
|
+
constructor() {
|
|
11516
|
+
this.instances = /* @__PURE__ */ new Map();
|
|
11517
|
+
}
|
|
11518
|
+
getInstance(req) {
|
|
11519
|
+
const existing = this.instances.get(req.scopeKey);
|
|
11520
|
+
if (existing && existing.workspaceHostDir === req.workspaceHostDir && existing.workdir === req.workdir) {
|
|
11521
|
+
existing.lastUsed = Date.now();
|
|
11522
|
+
return existing.bash;
|
|
11523
|
+
}
|
|
11524
|
+
const fs = new MountableFs({ base: new InMemoryFs() });
|
|
11525
|
+
fs.mount(req.workdir, new ReadWriteFs({ root: req.workspaceHostDir }));
|
|
11526
|
+
const bash = new Bash({
|
|
11527
|
+
fs,
|
|
11528
|
+
cwd: req.workdir,
|
|
11529
|
+
env: {
|
|
11530
|
+
LANG: "C.UTF-8",
|
|
11531
|
+
...req.env
|
|
11532
|
+
},
|
|
11533
|
+
executionLimits: {
|
|
11534
|
+
maxCommandCount: 1e4,
|
|
11535
|
+
maxLoopIterations: 1e6
|
|
11536
|
+
}
|
|
11537
|
+
});
|
|
11538
|
+
const inst = {
|
|
11539
|
+
bash,
|
|
11540
|
+
workspaceHostDir: req.workspaceHostDir,
|
|
11541
|
+
workdir: req.workdir,
|
|
11542
|
+
lastUsed: Date.now()
|
|
11543
|
+
};
|
|
11544
|
+
this.instances.set(req.scopeKey, inst);
|
|
11545
|
+
return bash;
|
|
11546
|
+
}
|
|
11547
|
+
async exec(req) {
|
|
11548
|
+
const startedAt = Date.now();
|
|
11549
|
+
let bash;
|
|
11550
|
+
try {
|
|
11551
|
+
bash = this.getInstance(req);
|
|
11552
|
+
} catch {
|
|
11553
|
+
return {
|
|
11554
|
+
status: "failed",
|
|
11555
|
+
exitCode: null,
|
|
11556
|
+
durationMs: Date.now() - startedAt,
|
|
11557
|
+
aggregated: "",
|
|
11558
|
+
timedOut: false,
|
|
11559
|
+
unsupported: true
|
|
11560
|
+
};
|
|
11561
|
+
}
|
|
11562
|
+
try {
|
|
11563
|
+
const result = await withTimeout$2(bash.exec(req.command, {
|
|
11564
|
+
cwd: req.workdir,
|
|
11565
|
+
env: req.env
|
|
11566
|
+
}), req.timeoutSec ? req.timeoutSec * 1e3 : void 0);
|
|
11567
|
+
const durationMs = Date.now() - startedAt;
|
|
11568
|
+
const combined = [result.stdout, result.stderr].filter(Boolean).join("").trim();
|
|
11569
|
+
if (result.exitCode === 0) return {
|
|
11570
|
+
status: "completed",
|
|
11571
|
+
exitCode: 0,
|
|
11572
|
+
durationMs,
|
|
11573
|
+
aggregated: combined,
|
|
11574
|
+
timedOut: false,
|
|
11575
|
+
unsupported: false
|
|
11576
|
+
};
|
|
11577
|
+
return {
|
|
11578
|
+
status: "failed",
|
|
11579
|
+
exitCode: result.exitCode,
|
|
11580
|
+
durationMs,
|
|
11581
|
+
aggregated: combined,
|
|
11582
|
+
timedOut: false,
|
|
11583
|
+
unsupported: isInterpreterLimitation(result.stderr)
|
|
11584
|
+
};
|
|
11585
|
+
} catch (err) {
|
|
11586
|
+
const timedOut = err instanceof TimeoutError;
|
|
11587
|
+
return {
|
|
11588
|
+
status: "failed",
|
|
11589
|
+
exitCode: null,
|
|
11590
|
+
durationMs: Date.now() - startedAt,
|
|
11591
|
+
aggregated: "",
|
|
11592
|
+
timedOut,
|
|
11593
|
+
unsupported: !timedOut
|
|
11594
|
+
};
|
|
11595
|
+
}
|
|
11596
|
+
}
|
|
11597
|
+
dispose(scopeKey) {
|
|
11598
|
+
if (scopeKey) this.instances.delete(scopeKey);
|
|
11599
|
+
else this.instances.clear();
|
|
11600
|
+
}
|
|
11601
|
+
/** test/inspection helper */
|
|
11602
|
+
get liveInstances() {
|
|
11603
|
+
return this.instances.size;
|
|
11604
|
+
}
|
|
11605
|
+
};
|
|
11606
|
+
var TimeoutError = class extends Error {};
|
|
11607
|
+
function withTimeout$2(p, ms) {
|
|
11608
|
+
if (!ms) return p;
|
|
11609
|
+
return new Promise((resolve, reject) => {
|
|
11610
|
+
const timer = setTimeout(() => reject(new TimeoutError()), ms);
|
|
11611
|
+
p.then((value) => {
|
|
11612
|
+
clearTimeout(timer);
|
|
11613
|
+
resolve(value);
|
|
11614
|
+
}, (error) => {
|
|
11615
|
+
clearTimeout(timer);
|
|
11616
|
+
reject(error);
|
|
11617
|
+
});
|
|
11618
|
+
});
|
|
11619
|
+
}
|
|
11620
|
+
//#endregion
|
|
11621
|
+
//#region src/agents/sandbox/tier0/registry.ts
|
|
11622
|
+
let singleton$1;
|
|
11623
|
+
function getTier0Sandbox() {
|
|
11624
|
+
if (!singleton$1) singleton$1 = new Tier0VirtualSandbox();
|
|
11625
|
+
return singleton$1;
|
|
11626
|
+
}
|
|
11627
|
+
/**
|
|
11628
|
+
* Resolve the tier-0 binding for an exec, or undefined to use the Docker/host
|
|
11629
|
+
* path. `workspaceHostDir` is the real sandbox workspace dir (mounted into the
|
|
11630
|
+
* Docker container too), so tier-0 sees the same files.
|
|
11631
|
+
*/
|
|
11632
|
+
function resolveTier0Binding(params) {
|
|
11633
|
+
if (!params.workspaceHostDir) return;
|
|
11634
|
+
const sandboxCfg = resolveSandboxConfigForAgent(params.config ?? loadConfig(), params.agentId);
|
|
11635
|
+
if (!sandboxCfg.tier0.enabled) return;
|
|
11636
|
+
if (sandboxCfg.workspaceAccess === "ro") return;
|
|
11637
|
+
return {
|
|
11638
|
+
backend: getTier0Sandbox(),
|
|
11639
|
+
workspaceHostDir: params.workspaceHostDir
|
|
11640
|
+
};
|
|
11641
|
+
}
|
|
11642
|
+
//#endregion
|
|
11459
11643
|
//#region src/agents/sessions/session-slug.ts
|
|
11460
11644
|
const SLUG_ADJECTIVES = [
|
|
11461
11645
|
"amber",
|
|
@@ -12957,10 +13141,112 @@ function emitExecSystemEvent(text, opts) {
|
|
|
12957
13141
|
});
|
|
12958
13142
|
requestHeartbeatNow({ reason: "exec-event" });
|
|
12959
13143
|
}
|
|
13144
|
+
/**
|
|
13145
|
+
* Tier-0 fast path: run `execCommand` in the in-process virtual sandbox. Returns
|
|
13146
|
+
* a completed ExecProcessHandle on success, or null when just-bash can't serve
|
|
13147
|
+
* the command (so the caller escalates to Docker). Output is sanitized and a
|
|
13148
|
+
* ProcessSession is registered exactly like the normal path, so downstream
|
|
13149
|
+
* session listing / tailing is unaffected.
|
|
13150
|
+
*/
|
|
13151
|
+
async function tryTier0Exec(args) {
|
|
13152
|
+
const { opts, sessionId, startedAt, execCommand } = args;
|
|
13153
|
+
const tier0 = opts.tier0;
|
|
13154
|
+
const sandbox = opts.sandbox;
|
|
13155
|
+
if (!tier0 || !sandbox) return null;
|
|
13156
|
+
const workdir = opts.containerWorkdir ?? sandbox.containerWorkdir;
|
|
13157
|
+
let outcome;
|
|
13158
|
+
try {
|
|
13159
|
+
outcome = await tier0.backend.exec({
|
|
13160
|
+
command: execCommand,
|
|
13161
|
+
workdir,
|
|
13162
|
+
workspaceHostDir: tier0.workspaceHostDir,
|
|
13163
|
+
env: opts.env,
|
|
13164
|
+
scopeKey: sandbox.containerName,
|
|
13165
|
+
timeoutSec: opts.timeoutSec
|
|
13166
|
+
});
|
|
13167
|
+
} catch {
|
|
13168
|
+
return null;
|
|
13169
|
+
}
|
|
13170
|
+
if (outcome.unsupported) return null;
|
|
13171
|
+
const session = {
|
|
13172
|
+
id: sessionId,
|
|
13173
|
+
command: opts.command,
|
|
13174
|
+
scopeKey: opts.scopeKey,
|
|
13175
|
+
sessionKey: opts.sessionKey,
|
|
13176
|
+
notifyOnExit: opts.notifyOnExit,
|
|
13177
|
+
notifyOnExitEmptySuccess: opts.notifyOnExitEmptySuccess === true,
|
|
13178
|
+
exitNotified: false,
|
|
13179
|
+
child: void 0,
|
|
13180
|
+
stdin: void 0,
|
|
13181
|
+
pid: void 0,
|
|
13182
|
+
startedAt,
|
|
13183
|
+
cwd: opts.workdir,
|
|
13184
|
+
maxOutputChars: opts.maxOutput,
|
|
13185
|
+
pendingMaxOutputChars: opts.pendingMaxOutput,
|
|
13186
|
+
totalOutputChars: 0,
|
|
13187
|
+
pendingStdout: [],
|
|
13188
|
+
pendingStderr: [],
|
|
13189
|
+
pendingStdoutChars: 0,
|
|
13190
|
+
pendingStderrChars: 0,
|
|
13191
|
+
aggregated: "",
|
|
13192
|
+
tail: "",
|
|
13193
|
+
exited: false,
|
|
13194
|
+
exitCode: void 0,
|
|
13195
|
+
exitSignal: void 0,
|
|
13196
|
+
truncated: false,
|
|
13197
|
+
backgrounded: false
|
|
13198
|
+
};
|
|
13199
|
+
addSession(session);
|
|
13200
|
+
const sanitized = stripAnsi(sanitizeBinaryOutput(outcome.aggregated));
|
|
13201
|
+
for (const chunk of chunkString(sanitized)) appendOutput(session, "stdout", chunk);
|
|
13202
|
+
const status = outcome.status === "completed" ? "completed" : "failed";
|
|
13203
|
+
markExited(session, outcome.exitCode ?? 0, null, status);
|
|
13204
|
+
const durationMs = Date.now() - startedAt;
|
|
13205
|
+
const aggregated = session.aggregated.trim();
|
|
13206
|
+
let result;
|
|
13207
|
+
if (status === "completed") {
|
|
13208
|
+
const exitCode = outcome.exitCode ?? 0;
|
|
13209
|
+
result = {
|
|
13210
|
+
status: "completed",
|
|
13211
|
+
exitCode,
|
|
13212
|
+
exitSignal: null,
|
|
13213
|
+
durationMs,
|
|
13214
|
+
aggregated: aggregated + (exitCode !== 0 ? `\n\n(Command exited with code ${exitCode})` : ""),
|
|
13215
|
+
timedOut: false
|
|
13216
|
+
};
|
|
13217
|
+
} else {
|
|
13218
|
+
const reason = outcome.timedOut ? `Command timed out after ${opts.timeoutSec} seconds` : `Command exited with code ${outcome.exitCode ?? 1}`;
|
|
13219
|
+
result = {
|
|
13220
|
+
status: "failed",
|
|
13221
|
+
exitCode: outcome.exitCode,
|
|
13222
|
+
exitSignal: null,
|
|
13223
|
+
durationMs,
|
|
13224
|
+
aggregated,
|
|
13225
|
+
timedOut: outcome.timedOut,
|
|
13226
|
+
reason: aggregated ? `${aggregated}\n\n${reason}` : reason
|
|
13227
|
+
};
|
|
13228
|
+
}
|
|
13229
|
+
return {
|
|
13230
|
+
session,
|
|
13231
|
+
startedAt,
|
|
13232
|
+
pid: void 0,
|
|
13233
|
+
promise: Promise.resolve(result),
|
|
13234
|
+
kill: () => {}
|
|
13235
|
+
};
|
|
13236
|
+
}
|
|
12960
13237
|
async function runExecProcess(opts) {
|
|
12961
13238
|
const startedAt = Date.now();
|
|
12962
13239
|
const sessionId = createSessionSlug();
|
|
12963
13240
|
const execCommand = opts.execCommand ?? opts.command;
|
|
13241
|
+
if (opts.tier0 && opts.sandbox && !opts.usePty && shouldTryTier0(execCommand)) {
|
|
13242
|
+
const tier0Handle = await tryTier0Exec({
|
|
13243
|
+
opts,
|
|
13244
|
+
sessionId,
|
|
13245
|
+
startedAt,
|
|
13246
|
+
execCommand
|
|
13247
|
+
});
|
|
13248
|
+
if (tier0Handle) return tier0Handle;
|
|
13249
|
+
}
|
|
12964
13250
|
const supervisor = getProcessSupervisor();
|
|
12965
13251
|
const session = {
|
|
12966
13252
|
id: sessionId,
|
|
@@ -13740,7 +14026,11 @@ function createExecTool(defaults) {
|
|
|
13740
14026
|
scopeKey: defaults?.scopeKey,
|
|
13741
14027
|
sessionKey: notifySessionKey,
|
|
13742
14028
|
timeoutSec: effectiveTimeout,
|
|
13743
|
-
onUpdate
|
|
14029
|
+
onUpdate,
|
|
14030
|
+
tier0: sandbox ? resolveTier0Binding({
|
|
14031
|
+
agentId,
|
|
14032
|
+
workspaceHostDir: sandbox.workspaceDir
|
|
14033
|
+
}) : void 0
|
|
13744
14034
|
});
|
|
13745
14035
|
let yielded = false;
|
|
13746
14036
|
let yieldTimer = null;
|
|
@@ -14584,7 +14874,7 @@ const TOOL_REGISTRY = {
|
|
|
14584
14874
|
},
|
|
14585
14875
|
contextKeys: ["agentSessionKey"]
|
|
14586
14876
|
},
|
|
14587
|
-
load: () => import("./cron-tool-
|
|
14877
|
+
load: () => import("./cron-tool-DllqQBKI.js")
|
|
14588
14878
|
},
|
|
14589
14879
|
"gateway": {
|
|
14590
14880
|
meta: {
|
|
@@ -14601,7 +14891,7 @@ const TOOL_REGISTRY = {
|
|
|
14601
14891
|
},
|
|
14602
14892
|
contextKeys: ["agentSessionKey", "config"]
|
|
14603
14893
|
},
|
|
14604
|
-
load: () => import("./gateway-tool-
|
|
14894
|
+
load: () => import("./gateway-tool-CNaxsMbd.js")
|
|
14605
14895
|
},
|
|
14606
14896
|
"crm_search": {
|
|
14607
14897
|
meta: {
|
|
@@ -14667,7 +14957,7 @@ const TOOL_REGISTRY = {
|
|
|
14667
14957
|
],
|
|
14668
14958
|
condition: "hasAgentDir"
|
|
14669
14959
|
},
|
|
14670
|
-
load: () => import("./image-tool-
|
|
14960
|
+
load: () => import("./image-tool-y-FDf6-M.js")
|
|
14671
14961
|
},
|
|
14672
14962
|
"tts": {
|
|
14673
14963
|
meta: {
|
|
@@ -14681,7 +14971,7 @@ const TOOL_REGISTRY = {
|
|
|
14681
14971
|
},
|
|
14682
14972
|
contextKeys: ["agentChannel", "config"]
|
|
14683
14973
|
},
|
|
14684
|
-
load: () => import("./tts-tool-
|
|
14974
|
+
load: () => import("./tts-tool-CfEs7ebD.js")
|
|
14685
14975
|
},
|
|
14686
14976
|
"message": {
|
|
14687
14977
|
meta: {
|
|
@@ -14939,7 +15229,7 @@ const TOOL_REGISTRY = {
|
|
|
14939
15229
|
],
|
|
14940
15230
|
condition: "messageEnabled"
|
|
14941
15231
|
},
|
|
14942
|
-
load: () => import("./message-tool-
|
|
15232
|
+
load: () => import("./message-tool-BHJpugQ6.js")
|
|
14943
15233
|
},
|
|
14944
15234
|
"agents_list": {
|
|
14945
15235
|
meta: {
|
|
@@ -14953,7 +15243,7 @@ const TOOL_REGISTRY = {
|
|
|
14953
15243
|
},
|
|
14954
15244
|
contextKeys: ["agentSessionKey", "requesterAgentIdOverride"]
|
|
14955
15245
|
},
|
|
14956
|
-
load: () => import("./agents-list-tool-
|
|
15246
|
+
load: () => import("./agents-list-tool-Bjcc4I_6.js")
|
|
14957
15247
|
},
|
|
14958
15248
|
"architect_pipeline": {
|
|
14959
15249
|
meta: {
|
|
@@ -15039,7 +15329,7 @@ const TOOL_REGISTRY = {
|
|
|
15039
15329
|
},
|
|
15040
15330
|
contextKeys: ["agentSessionKey", "config"]
|
|
15041
15331
|
},
|
|
15042
|
-
load: () => import("./nodes-tool-
|
|
15332
|
+
load: () => import("./nodes-tool-BmT8LWTt.js")
|
|
15043
15333
|
},
|
|
15044
15334
|
"venture_studio": {
|
|
15045
15335
|
meta: {
|
|
@@ -15067,7 +15357,7 @@ const TOOL_REGISTRY = {
|
|
|
15067
15357
|
},
|
|
15068
15358
|
contextKeys: ["agentSessionKey", "config"]
|
|
15069
15359
|
},
|
|
15070
|
-
load: () => import("./session-status-tool-
|
|
15360
|
+
load: () => import("./session-status-tool-BIN4ooy0.js")
|
|
15071
15361
|
},
|
|
15072
15362
|
"sessions_history": {
|
|
15073
15363
|
meta: {
|
|
@@ -15085,7 +15375,7 @@ const TOOL_REGISTRY = {
|
|
|
15085
15375
|
},
|
|
15086
15376
|
contextKeys: ["agentSessionKey", "sandboxed"]
|
|
15087
15377
|
},
|
|
15088
|
-
load: () => import("./sessions-history-tool-
|
|
15378
|
+
load: () => import("./sessions-history-tool-BO81rMTT.js")
|
|
15089
15379
|
},
|
|
15090
15380
|
"sessions_list": {
|
|
15091
15381
|
meta: {
|
|
@@ -15104,7 +15394,7 @@ const TOOL_REGISTRY = {
|
|
|
15104
15394
|
},
|
|
15105
15395
|
contextKeys: ["agentSessionKey", "sandboxed"]
|
|
15106
15396
|
},
|
|
15107
|
-
load: () => import("./sessions-list-tool-
|
|
15397
|
+
load: () => import("./sessions-list-tool-s_y-_4Uv.js")
|
|
15108
15398
|
},
|
|
15109
15399
|
"sessions_send": {
|
|
15110
15400
|
meta: {
|
|
@@ -15127,7 +15417,7 @@ const TOOL_REGISTRY = {
|
|
|
15127
15417
|
"sandboxed"
|
|
15128
15418
|
]
|
|
15129
15419
|
},
|
|
15130
|
-
load: () => import("./sessions-send-tool-
|
|
15420
|
+
load: () => import("./sessions-send-tool-roh-kyNw.js")
|
|
15131
15421
|
},
|
|
15132
15422
|
"sessions_spawn": {
|
|
15133
15423
|
meta: {
|
|
@@ -15160,7 +15450,7 @@ const TOOL_REGISTRY = {
|
|
|
15160
15450
|
"requesterAgentIdOverride"
|
|
15161
15451
|
]
|
|
15162
15452
|
},
|
|
15163
|
-
load: () => import("./sessions-spawn-tool-
|
|
15453
|
+
load: () => import("./sessions-spawn-tool-UAd65WIb.js")
|
|
15164
15454
|
},
|
|
15165
15455
|
"subagents": {
|
|
15166
15456
|
meta: {
|
|
@@ -15187,7 +15477,7 @@ const TOOL_REGISTRY = {
|
|
|
15187
15477
|
},
|
|
15188
15478
|
contextKeys: ["agentSessionKey"]
|
|
15189
15479
|
},
|
|
15190
|
-
load: () => import("./subagents-tool-
|
|
15480
|
+
load: () => import("./subagents-tool-DjPwvSat.js")
|
|
15191
15481
|
},
|
|
15192
15482
|
"browser": {
|
|
15193
15483
|
meta: {
|
|
@@ -15277,7 +15567,7 @@ const TOOL_REGISTRY = {
|
|
|
15277
15567
|
},
|
|
15278
15568
|
contextKeys: ["sandboxBrowserBridgeUrl", "allowHostBrowserControl"]
|
|
15279
15569
|
},
|
|
15280
|
-
load: () => import("./browser-tool-
|
|
15570
|
+
load: () => import("./browser-tool-CTNhVzit.js")
|
|
15281
15571
|
},
|
|
15282
15572
|
"canvas": {
|
|
15283
15573
|
meta: {
|
|
@@ -15340,7 +15630,7 @@ const TOOL_REGISTRY = {
|
|
|
15340
15630
|
},
|
|
15341
15631
|
contextKeys: ["config"]
|
|
15342
15632
|
},
|
|
15343
|
-
load: () => import("./canvas-tool-
|
|
15633
|
+
load: () => import("./canvas-tool-v_tDod0l.js")
|
|
15344
15634
|
},
|
|
15345
15635
|
"web_fetch": {
|
|
15346
15636
|
meta: {
|
|
@@ -15372,7 +15662,7 @@ const TOOL_REGISTRY = {
|
|
|
15372
15662
|
},
|
|
15373
15663
|
contextKeys: ["config", "sandboxed"]
|
|
15374
15664
|
},
|
|
15375
|
-
load: () => import("./web-search-
|
|
15665
|
+
load: () => import("./web-search-D1pX-Tuc.js")
|
|
15376
15666
|
}
|
|
15377
15667
|
};
|
|
15378
15668
|
//#endregion
|
|
@@ -19107,7 +19397,7 @@ function guardSessionManager(sessionManager, opts) {
|
|
|
19107
19397
|
//#region src/agents/pi-embedded-runner/compaction-safety-timeout.ts
|
|
19108
19398
|
const EMBEDDED_COMPACTION_TIMEOUT_MS = 3e5;
|
|
19109
19399
|
async function compactWithSafetyTimeout(compact, timeoutMs = EMBEDDED_COMPACTION_TIMEOUT_MS) {
|
|
19110
|
-
return await withTimeout$
|
|
19400
|
+
return await withTimeout$3(() => compact(), timeoutMs, "Compaction");
|
|
19111
19401
|
}
|
|
19112
19402
|
//#endregion
|
|
19113
19403
|
//#region src/agents/pi-extensions/session-manager-runtime-registry.ts
|
|
@@ -19972,11 +20262,12 @@ const AGENT_TYPE_SECTIONS = [
|
|
|
19972
20262
|
if (!trimmed) return [];
|
|
19973
20263
|
return [
|
|
19974
20264
|
"## Skills (mandatory)",
|
|
19975
|
-
"Before replying: scan <available_skills>
|
|
19976
|
-
|
|
19977
|
-
"- If multiple could apply: choose the most specific one, then
|
|
19978
|
-
"- If none clearly apply: do not
|
|
19979
|
-
|
|
20265
|
+
"Before replying: scan the <available_skills> entries.",
|
|
20266
|
+
"- If exactly one skill clearly applies: load its full instructions, then follow it.",
|
|
20267
|
+
"- If multiple could apply: choose the most specific one, then load/follow it.",
|
|
20268
|
+
"- If none clearly apply: do not load any skill.",
|
|
20269
|
+
`To load a skill's full instructions: if they aren't already shown, call the \`skill_view\` tool with the skill name; otherwise read its SKILL.md at <location> with \`${ctx.readToolName}\`.`,
|
|
20270
|
+
"Constraints: never load more than one skill up front; only load after selecting.",
|
|
19980
20271
|
trimmed,
|
|
19981
20272
|
""
|
|
19982
20273
|
];
|
|
@@ -20121,6 +20412,40 @@ const AGENT_TYPE_SECTIONS = [
|
|
|
20121
20412
|
}
|
|
20122
20413
|
];
|
|
20123
20414
|
//#endregion
|
|
20415
|
+
//#region src/agents/sections/behaviour.ts
|
|
20416
|
+
/**
|
|
20417
|
+
* Identity-layer section that injects the agent's self-maintained operating
|
|
20418
|
+
* rules. The rules live at `<workspaceDir>/prompts/behaviour.md` and are
|
|
20419
|
+
* written by the `update_behaviour` tool. There is intentionally no global
|
|
20420
|
+
* fallback file — the section renders nothing unless the agent has authored
|
|
20421
|
+
* its own behaviour.md.
|
|
20422
|
+
*/
|
|
20423
|
+
const BEHAVIOUR_SECTIONS = [{
|
|
20424
|
+
id: "behaviour",
|
|
20425
|
+
layer: "identity",
|
|
20426
|
+
order: 2200,
|
|
20427
|
+
modes: ["full", "minimal"],
|
|
20428
|
+
cacheable: false,
|
|
20429
|
+
header: "## Operating Rules (self-maintained)",
|
|
20430
|
+
source: "file",
|
|
20431
|
+
render: (ctx) => {
|
|
20432
|
+
const workspaceDir = ctx.params.workspaceDir;
|
|
20433
|
+
if (!workspaceDir) return [];
|
|
20434
|
+
const content = resolveProse({
|
|
20435
|
+
layer: "identity",
|
|
20436
|
+
id: "behaviour",
|
|
20437
|
+
agentWorkspaceDir: workspaceDir
|
|
20438
|
+
})?.content.trim();
|
|
20439
|
+
if (!content) return [];
|
|
20440
|
+
return [
|
|
20441
|
+
"## Operating Rules (self-maintained)",
|
|
20442
|
+
"",
|
|
20443
|
+
content,
|
|
20444
|
+
""
|
|
20445
|
+
];
|
|
20446
|
+
}
|
|
20447
|
+
}];
|
|
20448
|
+
//#endregion
|
|
20124
20449
|
//#region src/agents/sections/identity.ts
|
|
20125
20450
|
/** Identity-layer section definitions (3 sections). */
|
|
20126
20451
|
const IDENTITY_SECTIONS = [
|
|
@@ -21136,6 +21461,7 @@ function getBuiltinRegistry() {
|
|
|
21136
21461
|
_registry.registerAll(PLATFORM_SECTIONS);
|
|
21137
21462
|
_registry.registerAll(AGENT_TYPE_SECTIONS);
|
|
21138
21463
|
_registry.registerAll(IDENTITY_SECTIONS);
|
|
21464
|
+
_registry.registerAll(BEHAVIOUR_SECTIONS);
|
|
21139
21465
|
_registry.registerAll(USER_SECTIONS);
|
|
21140
21466
|
_registry.registerAll(SESSION_SECTIONS);
|
|
21141
21467
|
return _registry;
|
|
@@ -23303,6 +23629,13 @@ function resolvePrivacyModeOverride(currentProvider, currentModelId) {
|
|
|
23303
23629
|
//#region src/agents/pi-embedded-runner/lifecycle-hooks.ts
|
|
23304
23630
|
const hookRegistry = /* @__PURE__ */ new Map();
|
|
23305
23631
|
/**
|
|
23632
|
+
* Register lifecycle hooks for a plugin.
|
|
23633
|
+
* Replaces any previously registered hooks for the same pluginId.
|
|
23634
|
+
*/
|
|
23635
|
+
function registerLifecycleHooks(pluginId, hooks) {
|
|
23636
|
+
hookRegistry.set(pluginId, hooks);
|
|
23637
|
+
}
|
|
23638
|
+
/**
|
|
23306
23639
|
* Fire preLlmCall hooks in registration order.
|
|
23307
23640
|
* If any hook returns a modified context, subsequent hooks receive the modified version.
|
|
23308
23641
|
* Errors in individual hooks are caught and logged (never block the LLM call).
|
|
@@ -27345,6 +27678,35 @@ async function prepareSessionManagerForRun(params) {
|
|
|
27345
27678
|
}
|
|
27346
27679
|
}
|
|
27347
27680
|
//#endregion
|
|
27681
|
+
//#region src/agents/pi-embedded-runner/tool-result-reduce.ts
|
|
27682
|
+
/** Pure text reducer for oversized/repetitive tool output. Never throws. */
|
|
27683
|
+
function reduceToolOutputText(text, opts) {
|
|
27684
|
+
let lines = text.split("\n");
|
|
27685
|
+
if (opts.collapseRuns) {
|
|
27686
|
+
const collapsed = [];
|
|
27687
|
+
let i = 0;
|
|
27688
|
+
while (i < lines.length) {
|
|
27689
|
+
let j = i + 1;
|
|
27690
|
+
while (j < lines.length && lines[j] === lines[i]) j += 1;
|
|
27691
|
+
const run = j - i;
|
|
27692
|
+
if (run >= 5) collapsed.push(`${lines[i]} (repeated ${run}×)`);
|
|
27693
|
+
else for (let k = i; k < j; k++) collapsed.push(lines[k]);
|
|
27694
|
+
i = j;
|
|
27695
|
+
}
|
|
27696
|
+
lines = collapsed;
|
|
27697
|
+
}
|
|
27698
|
+
if (lines.length <= opts.maxLines) return lines.join("\n");
|
|
27699
|
+
if (opts.headLines + opts.tailLines >= lines.length) return lines.join("\n");
|
|
27700
|
+
const head = lines.slice(0, opts.headLines);
|
|
27701
|
+
const tail = lines.slice(lines.length - opts.tailLines);
|
|
27702
|
+
const elided = lines.length - head.length - tail.length;
|
|
27703
|
+
return [
|
|
27704
|
+
...head,
|
|
27705
|
+
`… ${elided} lines elided …`,
|
|
27706
|
+
...tail
|
|
27707
|
+
].join("\n");
|
|
27708
|
+
}
|
|
27709
|
+
//#endregion
|
|
27348
27710
|
//#region src/agents/pi-embedded-runner/tool-result-context-guard.ts
|
|
27349
27711
|
const CHARS_PER_TOKEN_ESTIMATE = 4;
|
|
27350
27712
|
const CONTEXT_INPUT_HEADROOM_RATIO = .75;
|
|
@@ -27487,8 +27849,31 @@ function applyMessageMutationInPlace(target, source) {
|
|
|
27487
27849
|
for (const key of Object.keys(targetRecord)) if (!(key in sourceRecord)) delete targetRecord[key];
|
|
27488
27850
|
Object.assign(targetRecord, sourceRecord);
|
|
27489
27851
|
}
|
|
27852
|
+
const REDUCE_MAX_LINES = 200;
|
|
27853
|
+
const REDUCE_HEAD_LINES = 40;
|
|
27854
|
+
const REDUCE_TAIL_LINES = 40;
|
|
27855
|
+
/**
|
|
27856
|
+
* Run the pure line-reducer over each tool-result message's text content,
|
|
27857
|
+
* mutating messages in place. Skips reductions that wouldn't shrink the text.
|
|
27858
|
+
*/
|
|
27859
|
+
function reduceToolResultOutputsInPlace(messages) {
|
|
27860
|
+
for (const message of messages) {
|
|
27861
|
+
if (!isToolResultMessage(message)) continue;
|
|
27862
|
+
const rawText = getToolResultText(message);
|
|
27863
|
+
if (!rawText) continue;
|
|
27864
|
+
const reduced = reduceToolOutputText(rawText, {
|
|
27865
|
+
maxLines: REDUCE_MAX_LINES,
|
|
27866
|
+
headLines: REDUCE_HEAD_LINES,
|
|
27867
|
+
tailLines: REDUCE_TAIL_LINES,
|
|
27868
|
+
collapseRuns: true
|
|
27869
|
+
});
|
|
27870
|
+
if (reduced === rawText) continue;
|
|
27871
|
+
applyMessageMutationInPlace(message, replaceToolResultText(message, reduced));
|
|
27872
|
+
}
|
|
27873
|
+
}
|
|
27490
27874
|
function enforceToolResultContextBudgetInPlace(params) {
|
|
27491
|
-
const { messages, contextBudgetChars, maxSingleToolResultChars } = params;
|
|
27875
|
+
const { messages, contextBudgetChars, maxSingleToolResultChars, reduceOutput } = params;
|
|
27876
|
+
if (reduceOutput) reduceToolResultOutputsInPlace(messages);
|
|
27492
27877
|
for (const message of messages) {
|
|
27493
27878
|
if (!isToolResultMessage(message)) continue;
|
|
27494
27879
|
applyMessageMutationInPlace(message, truncateToolResultToChars(message, maxSingleToolResultChars));
|
|
@@ -27510,6 +27895,7 @@ function enforceToolResultContextBudgetInPlace(params) {
|
|
|
27510
27895
|
* @returns An async function suitable for use as Agent's transformContext callback.
|
|
27511
27896
|
*/
|
|
27512
27897
|
function createToolResultContextGuardTransform(params) {
|
|
27898
|
+
const reduceOutput = params.reduceOutput !== false;
|
|
27513
27899
|
const contextWindowTokens = Math.max(1, Math.floor(params.contextWindowTokens));
|
|
27514
27900
|
const contextBudgetChars = Math.max(1024, Math.floor(contextWindowTokens * CHARS_PER_TOKEN_ESTIMATE * CONTEXT_INPUT_HEADROOM_RATIO));
|
|
27515
27901
|
const maxSingleToolResultChars = Math.max(1024, Math.floor(contextWindowTokens * TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE * SINGLE_TOOL_RESULT_CONTEXT_SHARE));
|
|
@@ -27520,7 +27906,8 @@ function createToolResultContextGuardTransform(params) {
|
|
|
27520
27906
|
enforceToolResultContextBudgetInPlace({
|
|
27521
27907
|
messages: contextMessages,
|
|
27522
27908
|
contextBudgetChars,
|
|
27523
|
-
maxSingleToolResultChars
|
|
27909
|
+
maxSingleToolResultChars,
|
|
27910
|
+
reduceOutput
|
|
27524
27911
|
});
|
|
27525
27912
|
return contextMessages;
|
|
27526
27913
|
};
|
|
@@ -27616,7 +28003,10 @@ async function createRunSession(params, env) {
|
|
|
27616
28003
|
applySystemPromptOverrideToSession(session, env.systemPromptText);
|
|
27617
28004
|
if (!session) throw new Error("Embedded agent session missing");
|
|
27618
28005
|
const activeSession = session;
|
|
27619
|
-
const contextGuardTransform = createToolResultContextGuardTransform({
|
|
28006
|
+
const contextGuardTransform = createToolResultContextGuardTransform({
|
|
28007
|
+
contextWindowTokens: Math.max(1, Math.floor(params.model.contextWindow ?? params.model.maxTokens ?? 2e5)),
|
|
28008
|
+
reduceOutput: params.config?.tools?.outputReduce?.enabled !== false
|
|
28009
|
+
});
|
|
27620
28010
|
activeSession.agent.transformContext = contextGuardTransform;
|
|
27621
28011
|
const cacheTrace = createCacheTrace({
|
|
27622
28012
|
cfg: params.config,
|
|
@@ -43449,7 +43839,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
43449
43839
|
return;
|
|
43450
43840
|
}
|
|
43451
43841
|
try {
|
|
43452
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
43842
|
+
const { deliverOutboundPayloads } = await import("./deliver-Ds0o_rCY.js").then((n) => n.n);
|
|
43453
43843
|
await deliverOutboundPayloads({
|
|
43454
43844
|
cfg: params.cfg,
|
|
43455
43845
|
channel,
|
|
@@ -44282,4 +44672,4 @@ async function getReplyFromConfig(ctx, opts, configOverride) {
|
|
|
44282
44672
|
});
|
|
44283
44673
|
}
|
|
44284
44674
|
//#endregion
|
|
44285
|
-
export { renamePairedNode as $,
|
|
44675
|
+
export { renamePairedNode as $, emitAgentEvent as $n, sniffMimeFromBase64 as $t, parseActivationCommand as A, resolveEnvelopeFormatOptions as An, createMediaAttachmentCache as Ar, abortEmbeddedPiRun as At, resolveCommitHash as B, buildMentionRegexes as Bn, extractFileContentFromSource as Br, markRecoveryAttempt as Bt, initTemplateLoader as C, getTotalPendingReplies as Cn, applyVerboseOverride as Cr, loadCombinedSessionStoreForGateway as Ct, resolveSubagentTargetFromRuns as D, createInboundDebouncer as Dn, peekSystemEventEntries as Dr, resolveSessionModelRef as Dt, resolveSubagentLabel as E, createDedupeCache as En, isSystemEventContextChanged as Er, resolveGatewaySessionStoreTarget as Et, resolveModelAuthLabel as F, hasControlCommand as Fn, installUnhandledRejectionHandler as Fr, closeInFlightTurnsStore as Ft, recordRemoteNodeInfo as G, listDescendantRunsForRequester as Gn, transcribeOpenAiCompatibleAudio as Gr, getBuiltinSectionRegistry as Gt, resolveSendPolicy as H, clearSubagentRunSteerRestart as Hn, normalizeMimeList as Hr, sha256HexPrefix as Ht, buildChannelSummary as I, shouldComputeCommandAuthorized as In, registerUnhandledRejectionHandler as Ir, deleteRow as It, removeRemoteNodeInfo as J, markSubagentRunTerminated as Jn, resolveAgentTimeoutMs as Jr, buildToolSummaryMap as Jt, refreshRemoteBinsForConnectedNodes as K, listSubagentRunsForRequester as Kn, applyTemplate as Kr, resolveUserContext as Kt, buildChannelAccountSnapshot as L, isAbortTrigger as Ln, DEFAULT_INPUT_IMAGE_MAX_BYTES as Lr, listForCurrentInstance as Lt, formatUsageReportLines as M, formatUserTime as Mn, runCapability as Mr, queueEmbeddedPiMessage as Mt, formatUsageWindowSummary as N, resolveUserTimeFormat as Nn, isAudioAttachment as Nr, waitForEmbeddedPiRunEnd as Nt, sortSubagentRuns as O, resolveInboundDebounceMs as On, peekSystemEvents as Or, normalizeOrgIds as Ot, resolveUsageProviderId as P, resolveUserTimezone as Pn, isImageAttachment as Pr, registerLifecycleHooks as Pt, rejectNodePairing as Q, clearAgentRunContext as Qn, createOpenClawCodingTools as Qt, formatChannelAllowFrom as R, stopSubagentsForRequester as Rn, DEFAULT_INPUT_IMAGE_MIMES as Rr, listFromOtherInstances as Rt, getTemplateUsageStats as S, createReplyDispatcher as Sn, applyModelOverrideToSessionEntry as Sr, listSessionsFromStore as St, validateTemplate as T, extractShortModelName as Tn, enqueueSystemEvent as Tr, pruneLegacyStoreKeys as Tt, getRemoteSkillEligibility as U, countActiveDescendantRuns as Un, resolveInputFileLimits as Ur, readConsolidationState as Ut, normalizeSendPolicy as V, normalizeMentionText as Vn, extractImageContentFromSource as Vr, openInFlightTurnsStore as Vt, primeRemoteSkillsCache as W, initSubagentRegistry as Wn, estimateBase64DecodedBytes as Wr, assembleAgentSystemPromptWithSections as Wt, approveNodePairing as X, runSubagentAnnounceFlow as Xn, PROSE_GLOBAL_ROOT as Xt, setSkillsRemoteRegistry as Y, replaceSubagentRunAfterSteer as Yn, PromptSectionRegistry as Yt, listNodePairing as Z, getSubagentDepthFromSessionStore as Zn, _clearProseCache as Zt, spawnSubagentDirect as _, patchRouting as _n, clearSessionAuthProfileOverride as _r, buildSystemPromptReport as _t, getCliSessionId as a, setHeartbeatWakeHandler as an, resolveEffectiveMessagesConfig as ar, verifyPairingToken as at, getTemplateCache as b, dispatchReplyWithBufferedBlockDispatcher as bn, buildAuthHealthSummary as br, classifySessionKey as bt, debugSkipAll as c, createPluginLoaderLogger as cn, resolveMessagePrefix as cr, readJsonFile as ct, setDebugStepBroadcaster as d, buildPairingReply as dn, getQueueSize as dr, getSkillsSnapshotVersion as dt, applyToolPolicyPipeline as en, getAgentRunContext as er, requestNodePairing as et, setSteppedBuild as f, claimBatch as fn, getTotalQueueSize as fr, registerSkillsChangeListener as ft, truncateLine as g, openMessageLedger as gn, lookupContextTokens as gr, runEmbeddedPiAgent as gt, resolveTotalTokens as h, markSynced as hn, waitForActiveTasks as hr, clearSessionQueues as ht, resolveCronStyleNow as i, requestHeartbeatNow as in, resolveAgentIdentity as ir, hashToken as it, loadProviderUsageSummary as j, formatZonedTimestamp as jn, normalizeMediaAttachments as jr, getActiveEmbeddedRunCount as jt, normalizeGroupActivation as k, formatInboundEnvelope as kn, buildProviderRegistry as kr, orgScopeVisible as kt, debugStepContinue as l, loadMinionPlugins as ln, resolveBootstrapContextForRun as lr, writeJsonAtomic as lt, formatTokenUsageDisplay as m, markFailed as mn, setCommandLaneConcurrency as mr, getFollowupQueueDepth as mt, BARE_SESSION_RESET_PROMPT as n, createOpenClawTools as nn, registerAgentRunContext as nr, verifyNodeToken as nt, setCliSessionId as o, resolveHeartbeatReasonKind as on, resolveIdentityName as or, pruneExpiredPending as ot, formatDurationCompact as p, closeMessageLedger as pn, resetAllLanes as pr, resolveQueueSettings as pt, refreshRemoteNodeBins as q, markSubagentRunForSteerRestart as qn, finalizeInboundContext as qr, buildSectionRenderContext as qt, appendCronStyleCurrentTimeLine as r, TOOL_REGISTRY as rn, resolveAckReaction as rr, generatePairingToken as rt, runCliAgent as s, getPluginToolMeta as sn, resolveIdentityNamePrefix as sr, resolvePairingPaths as st, getReplyFromConfig as t, buildDefaultToolPolicyPipelineSteps as tn, onAgentEvent as tr, updatePairedNodeMetadata as tt, isSteppedBuildEnabled as u, loadOpenClawPlugins as un, getActiveTaskCount as ur, createAsyncLock as ut, getLastReloadAt as v, record as vn, maskApiKey as vr, buildSystemPromptParams as vt, stopTemplateWatcher as w, sanitizeOutboundText as wn, parseVerboseOverride as wr, loadSessionEntry as wt, getTemplateLoadErrors as x, dispatchInboundMessage as xn, formatRemainingShort as xr, listAgentsForGateway as xt, getTemplate as y, shouldAckReactionForWhatsApp as yn, DEFAULT_OAUTH_WARN_MS as yr, canonicalizeSpawnedByForAgent as yt, buildStatusMessage as z, CURRENT_MESSAGE_MARKER as zn, DEFAULT_INPUT_TIMEOUT_MS as zr, markInterrupted as zt };
|