@overdeck/desktop 0.45.22 → 0.45.23
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/package.json +1 -1
- package/server/{acceptance-criteria-BH7ac_1G.js → acceptance-criteria-DOA0KgXx.js} +5 -5
- package/server/{advancing-selfheal-cSvXNZLZ.js → advancing-selfheal-BBu6DSNm.js} +6 -6
- package/server/{agent-gc-Dj2gncak.js → agent-gc-BV1q_2EV.js} +4 -4
- package/server/agent-state-Bg0lhqwj.js +3 -0
- package/server/{agent-state-service-CsQ07Pxe.js → agent-state-service-CnzFKSAQ.js} +1 -1
- package/server/{agent-state-service-DistflNn.js → agent-state-service-HoK8U4jW.js} +5 -5
- package/server/{agents-DXdHmRTC.js → agents-B4Bjbkfv.js} +4 -4
- package/server/agents-FlIgQ3ql.js +3 -0
- package/server/{archive-planning-BvDuWNMo.js → archive-planning-DYrYojxl.js} +30 -6
- package/server/{archive-planning-Cp_DC1j-.js → archive-planning-zkJb3BeM.js} +1 -1
- package/server/{artifact-index-jobs-CDBFL4OU.js → artifact-index-jobs-C-xy7Z5v.js} +2 -2
- package/server/{backlog-auto-trigger-DmA1IbYf.js → backlog-auto-trigger-GtG71X8H.js} +3 -3
- package/server/{behavior-CGj16clS.js → behavior-B_-4EKF3.js} +2 -2
- package/server/{briefing-freshness-C12WgkaB.js → briefing-freshness-DWdW7vUm.js} +2 -2
- package/server/{build-info-NU3KbXYw.js → build-info-BT096lEl.js} +3 -3
- package/server/{build-info-BRpqQvNd.js → build-info-DgTqZkL5.js} +1 -1
- package/server/{checkpoint-manager-rOgT98WY.js → checkpoint-manager-B7Bt29J0.js} +1 -1
- package/server/{checkpoint-manager-CTPjAmtH.js → checkpoint-manager-DDqcGyu8.js} +2 -2
- package/server/checkpoint-worker.js +1 -1
- package/server/{checkpoints-BJum14fs.js → checkpoints-C-AXLfYT.js} +2 -2
- package/server/{checkpoints-B5jFNi2G.js → checkpoints-CpgCjAlN.js} +1 -1
- package/server/{claude-hooks-provision-BhwWK-TQ.js → claude-hooks-provision-C8wdRnN1.js} +1 -1
- package/server/{claude-hooks-provision-D7p5WcKZ.js → claude-hooks-provision-but-_qGY.js} +2 -2
- package/server/{claude-permissions-nSFKH78M.js → claude-permissions-H_5wHQZQ.js} +2 -2
- package/server/{claude-settings-overlay-DHBwjS1X.js → claude-settings-overlay-BTENVmYf.js} +1 -1
- package/server/{claude-settings-overlay-BI_UIke0.js → claude-settings-overlay-CbSz0Dvb.js} +2 -2
- package/server/cli-BsVIHwzC.js +3 -0
- package/server/{cli-CbKNkFE5.js → cli-vBeXbPrq.js} +9 -9
- package/server/{cliproxy-Brf_5MuG.js → cliproxy-Bgb2XCqi.js} +2 -2
- package/server/{cliproxy-bONZDBbC.js → cliproxy-DW0V86F8.js} +1 -1
- package/server/{close-issue-CxReRxIc.js → close-issue-Dn_4c4G8.js} +5 -5
- package/server/{closed-issue-reaper-DXP2Xyv3.js → closed-issue-reaper-CWpY2uBw.js} +1 -1
- package/server/{closed-issue-reaper-CQ3kqha7.js → closed-issue-reaper-hANY_ehE.js} +9 -9
- package/server/codex-Dg7Is5yb.js +3 -0
- package/server/{codex-CbmztVcc.js → codex-TmSi-yTv.js} +27 -8
- package/server/{codex-parser-jl8AeAmB.js → codex-parser-C4gSH-IR.js} +2 -2
- package/server/{config-q4Gvd8dq.js → config-CCvjQf27.js} +2 -2
- package/server/{config-BJKocXKd.js → config-DUIhMN_T.js} +1 -1
- package/server/{config-DeTsoZdR.js → config-DjLOdbgT.js} +2 -2
- package/server/{config-yaml-ig8Nwtiw.js → config-yaml-DvyMuOle.js} +55 -186
- package/server/{conflict-gate-CHU9K1vU.js → conflict-gate-BSJkNTdp.js} +1 -1
- package/server/{conflict-gate-CFqPVxEg.js → conflict-gate-CmrYpa47.js} +3 -3
- package/server/{context-layers-DlQKkHH2.js → context-layers-B3Nt58jl.js} +2 -2
- package/server/{context-layers-15gDOk20.js → context-layers-ZYFcWiyc.js} +3 -3
- package/server/{control-settings-D_odMIaC.js → control-settings-aP1ANIlI.js} +4 -4
- package/server/{conversation-compaction-B6YSRLda.js → conversation-compaction-CNbTLB86.js} +8 -8
- package/server/{conversation-compaction-CN4-5YYt.js → conversation-compaction-DiG5zWQq.js} +1 -1
- package/server/{conversation-service-C3avRVEr.js → conversation-service-Du-MTNpJ.js} +6 -6
- package/server/{conversation-service-Dq33SYEj.js → conversation-service-Up7FEzIC.js} +1 -1
- package/server/{conversations-H9if0bCQ.js → conversations-6mPANqvL.js} +1 -1
- package/server/{conversations-bYpM9-kZ.js → conversations-DbOs1e9Q.js} +4 -4
- package/server/{cost-wH46-WsJ.js → cost-CW4WSe72.js} +3 -3
- package/server/{cost-Codk1pc2.js → cost-Ca0YTWDw.js} +18 -2
- package/server/{cost-sync-D_cre6WM.js → cost-sync-C0VdGme1.js} +3 -3
- package/server/{dag-CJpgf9A3.js → dag-CdOjJVDT.js} +9 -9
- package/server/{dangerous-git-ops-D6AF-Hg_.js → dangerous-git-ops-CT-IypG3.js} +1 -1
- package/server/dashboard-db-worker.js +7 -7
- package/server/{deacon-B8HbQdqU.js → deacon-DYSEJb48.js} +3 -3
- package/server/{deacon-nudge-log-D6K9K-rE.js → deacon-nudge-log-Bjg8U4Y9.js} +3 -3
- package/server/{deacon-CkT_kznS.js → deacon-pRnyD5w9.js} +266 -577
- package/server/deacon-swarm-9jRLS5Ke.js +2 -0
- package/server/{deacon-swarm-BryRr6AO.js → deacon-swarm-DftYRDo8.js} +17 -17
- package/server/deacon.js +8 -8
- package/server/{deploy-patrol-1IrZxicY.js → deploy-patrol-Bjsho_ha.js} +136 -19
- package/server/{deploy-window-7ZYHh7Zp.js → deploy-window-CM6W1-c6.js} +1 -1
- package/server/{deploy-window-wDf4UgHt.js → deploy-window-DeP_OIRk.js} +77 -10
- package/server/{dev-supervisor-C7p9kEpc.js → dev-supervisor-BpMoHlkR.js} +2 -2
- package/server/{devcontainer-renderer-CNmQy0pL.js → devcontainer-renderer-CtUgrVKW.js} +3 -3
- package/server/dist-Bd3vn0Hw.js +3 -0
- package/server/{dist-D-Ed5yVw.js → dist-DyRx4cI7.js} +1 -1
- package/server/{docker-BCZ89M9X.js → docker-BK7HIcBj.js} +2 -2
- package/server/{dod-DbJLYcHv.js → dod-BrSfUHm0.js} +1 -1
- package/server/{ensure-devcontainer-Cs6W9Yzj.js → ensure-devcontainer-DRqaAkBR.js} +1 -1
- package/server/{ensure-devcontainer-V5JWaAva.js → ensure-devcontainer-DseivYEy.js} +4 -4
- package/server/{esm-shims-dTeNdq7X.js → esm-shims-CbI3BVkl.js} +1 -1
- package/server/{event-store-CpBGsO6_.js → event-store-Cr5PQwFC.js} +1 -1
- package/server/{event-store-TnWdydfB.js → event-store-tdiY5eDZ.js} +3 -3
- package/server/{events-DSUdR-04.js → events-CC1dgUpx.js} +3 -3
- package/server/{events-Dsuv6qyB.js → events-CvvGK6LT.js} +1 -1
- package/server/{factory-BMrK4TrE.js → factory-CynerjXO.js} +50 -13
- package/server/{feature-registry-population-B-CI9hgE.js → feature-registry-population-B0pmAz0a.js} +4 -4
- package/server/{feature-registry-storage-B972ph_A.js → feature-registry-storage-_wUBRD3J.js} +2 -2
- package/server/{features-Bc-Bmiye.js → features-Dhxz-wLc.js} +2 -2
- package/server/{feedback-target-DZ-iAnAa.js → feedback-target-CPS15Vte.js} +7 -7
- package/server/{feedback-target-DS6NUuSs.js → feedback-target-iygZwmMc.js} +1 -1
- package/server/{feedback-writer-BXP6g75N.js → feedback-writer-C9b6ccN1.js} +6 -5
- package/server/{feedback-writer-Bx5z11mF.js → feedback-writer-qmiMbqTZ.js} +1 -1
- package/server/{flywheel-Ctr5uuvo.js → flywheel-DMCUzDWg.js} +1 -1
- package/server/{flywheel-COR0mbRI.js → flywheel-DSSpWmqF.js} +13 -13
- package/server/{flywheel-6WHU4O7A.js → flywheel-DcBkQvgE.js} +14 -14
- package/server/{flywheel-merge-order-CNKAY489.js → flywheel-merge-order-C-6zRLvM.js} +1 -1
- package/server/{flywheel-merge-order-CTgHeg-W.js → flywheel-merge-order-DxbQKE1d.js} +8 -8
- package/server/forge-B-ZWyTRm.js +2 -0
- package/server/{forge-B1S_KZv4.js → forge-Ch9gCFod.js} +2 -2
- package/server/{from-DpwQ-sc3.js → from-CJ_aH5jD.js} +1 -1
- package/server/{fts-db-DmAcuCkV.js → fts-db-CKgg0VKg.js} +2 -2
- package/server/{fts-operations-7d_RkmWp.js → fts-operations-BrL_VTRr.js} +2 -2
- package/server/{git-utils-Cc3FHDKd.js → git-utils-BVa07a4a.js} +2 -2
- package/server/{git-utils-CsKGnzFA.js → git-utils-Dry_Ka_D.js} +1 -1
- package/server/{github-app-CDPtGF7J.js → github-app-CMBdIFBQ.js} +11 -3
- package/server/{github-app-CU14oYzP.js → github-app-CPfoFAdV.js} +1 -1
- package/server/{github-client-XjTJbBm7.js → github-client--XVlDpwM.js} +2 -2
- package/server/{github-client-CwBZZ3t7.js → github-client-B4QsdE-X.js} +1 -1
- package/server/{github-pr-lookup-CFGeVhqv.js → github-pr-lookup-BRbDW-qk.js} +2 -2
- package/server/{harness-binary-B2CTcD84.js → harness-binary-CVio2m-u.js} +1 -1
- package/server/{harness-resolve-D5FVQTmy.js → harness-resolve-qHJBhy3Z.js} +4 -4
- package/server/{health-events-DREeevle.js → health-events-C9B8y1Hm.js} +2 -2
- package/server/{health-events-C1whmd58.js → health-events-CpfvuVmm.js} +1 -1
- package/server/{hooks-yxRsjk-z.js → hooks-DUXw8A0-.js} +2 -2
- package/server/{hooks-B-HItBiS.js → hooks-ltecuFqZ.js} +1 -1
- package/server/{hume-Dz_OymXE.js → hume-BEq0bUDg.js} +2 -2
- package/server/hume-B_DbflNM.js +3 -0
- package/server/{idle-stack-reaper-DrCv0OAG.js → idle-stack-reaper-D7w9t3fE.js} +1 -1
- package/server/{idle-stack-reaper-Yf34xXxY.js → idle-stack-reaper-w1ISSlhs.js} +2 -2
- package/server/{in-flight-guard-BoWm66Kh.js → in-flight-guard-aQ1IxeI3.js} +2 -2
- package/server/{infra-D4iNWMA5.js → infra-CzaSOgul.js} +4 -4
- package/server/{injection-D7T75Pye.js → injection-DZ0PfYa4.js} +7 -7
- package/server/{injection-BVNa4MQW.js → injection-oNZeoDhL.js} +1 -1
- package/server/{inspect-agent-BXCgNeZ4.js → inspect-agent-DJKLWcVT.js} +12 -12
- package/server/inspect-agent-ch-F-5Ci.js +2 -0
- package/server/{internal-token-CXsfxslp.js → internal-token-Bb4XeV2x.js} +2 -2
- package/server/{internal-token-C9DdEOKY.js → internal-token-DXdfprGr.js} +1 -1
- package/server/{io-DQR9PMgS.js → io-B3_AHDfr.js} +160 -184
- package/server/{issue-closed-DtmJM0D0.js → issue-closed-zhdvQicO.js} +7 -7
- package/server/{issue-lifecycle-CeyW_HoD.js → issue-lifecycle-CreaCkjW.js} +22 -22
- package/server/{issue-lifecycle-8PSS9Anq.js → issue-lifecycle-Dy4vd0Oa.js} +1 -1
- package/server/{issue-service-singleton-D_RVYBuL.js → issue-service-singleton-B5ushCvE.js} +8 -8
- package/server/{issue-service-singleton-DBZabEl7.js → issue-service-singleton-DabvBWUp.js} +1 -1
- package/server/{issues-pDW9VUNz.js → issues-B6ToV6x1.js} +2 -2
- package/server/{jsonl-parser-C3HVNR5d.js → jsonl-parser-Dhflo1SH.js} +3 -3
- package/server/{label-cleanup-DPwiZlWo.js → label-cleanup-BKPJm4Hv.js} +3 -3
- package/server/{label-reconciler-Df1ZduPH.js → label-reconciler-DdWbHEBu.js} +4 -4
- package/server/{launcher-generator-COgR2By1.js → launcher-generator-CHVm7bGT.js} +10 -9
- package/server/{layers-Cp1To4L8.js → layers-DzxSTGNA.js} +2 -2
- package/server/lifecycle-DfeyBDwA.js +121 -0
- package/server/lifecycle-io-Bsnr2K4F.js +3 -0
- package/server/{lifecycle-io-taIb0PoH.js → lifecycle-io-D8iNBcux.js} +37 -37
- package/server/{lifecycle-CtPDcZ9u.js → lifecycle-sycO16hj.js} +6 -6
- package/server/{linear-client-DsFkIxee.js → linear-client-D4zqMnX7.js} +2 -2
- package/server/{linear-client-YwZMDIwQ.js → linear-client-DqhDQO9k.js} +1 -1
- package/server/memory-fts-worker.js +1 -1
- package/server/{merge-C1t-bspg.js → merge-C_ZEhbqI.js} +3 -3
- package/server/{merge-BwsyNRJV.js → merge-DK23JEdS.js} +1 -1
- package/server/{merge-agent-B-SnXOoc.js → merge-agent-BQM3a8z5.js} +1 -1
- package/server/{merge-agent-DDiIjzk-.js → merge-agent-XrB80vfT.js} +28 -28
- package/server/{merge-batch-Byt-QnEl.js → merge-batch-Bwoyr8Je.js} +1 -1
- package/server/{merge-blockers-BYjeXrVN.js → merge-blockers-BsFjGrQ8.js} +2 -2
- package/server/merge-ops-DlB1IM0Y.js +2 -0
- package/server/{merge-rebase-Cm6fXaZN.js → merge-rebase-C1KIVr0s.js} +2 -2
- package/server/{merge-set-DiISXcC-.js → merge-set-DLz0MkGT.js} +3 -3
- package/server/{merge-set-6LEglm6o.js → merge-set-DnSYdBEp.js} +1 -1
- package/server/{merge-sync-Do8_q32h.js → merge-sync-DZ9dojJn.js} +2 -2
- package/server/{merge-sync-B95_4in_.js → merge-sync-SSv3E-pl.js} +1 -1
- package/server/{merge-train-CKana8EH.js → merge-train-DxDfBTjr.js} +3 -3
- package/server/{merge-train-deps-BgmqwIfA.js → merge-train-deps-CyYQUksx.js} +4 -4
- package/server/{merge-verification-CqnUzGEK.js → merge-verification-CSizH3HY.js} +4 -4
- package/server/{multipart-parser-tdOQDJ3o.js → multipart-parser-Dt8YPN5S.js} +2 -2
- package/server/{no-resume-mode-BWOSZjWd.js → no-resume-mode-Cx3K0hHi.js} +11 -8
- package/server/node_modules/.package-lock.json +1 -1
- package/server/{orphan-proposed-reconciler-DSvsJ5M7.js → orphan-proposed-reconciler-BTkDrl4R.js} +1 -1
- package/server/{orphan-proposed-reconciler-xklgvNA7.js → orphan-proposed-reconciler-neK8dHQk.js} +15 -13
- package/server/package-lock.json +2 -2
- package/server/package.json +1 -1
- package/server/{pan-dir-DOcf6ug3.js → pan-dir-DeVUgwA7.js} +78 -58
- package/server/{paths-DooHpt9p.js → paths-_zEts6wc.js} +2 -2
- package/server/{pickup-CaskQ7j6.js → pickup-Dd0Znxxy.js} +1 -1
- package/server/{pipeline-membership-1LGRjo-k.js → pipeline-membership-0HaEGDlH.js} +186 -67
- package/server/{pipeline-notifier-CZsrU_nj.js → pipeline-notifier-6iCJplFZ.js} +1 -1
- package/server/{pipeline-notifier-B6FVsYF9.js → pipeline-notifier-D0ykk59O.js} +2 -2
- package/server/{project-pipelines-CtNG_rvs.js → project-pipelines-2sK1apsO.js} +2 -2
- package/server/projects-9SkRpES9.js +3 -0
- package/server/{prompts-EvhMeeHG.js → prompts-Dp4Tpk39.js} +2 -2
- package/server/{providers-DNSQqy2V.js → providers-DKkBXhxU.js} +1 -1
- package/server/{providers-BDDPULlp.js → providers-DV7ec8l7.js} +7 -7
- package/server/public/assets/{chunk-BO2N2NFS-sym_ufXe.js → chunk-BO2N2NFS-CltymLRg.js} +4 -4
- package/server/public/assets/{diagram-OG6HWLK6-CQJPBNBu.js → diagram-OG6HWLK6-D2f6pjgA.js} +1 -1
- package/server/public/assets/{dist-Bio7THQU.js → dist-BWR4qFiV.js} +1 -1
- package/server/public/assets/{dist-DukGS2YZ.js → dist-DEmlBBNQ.js} +3 -3
- package/server/public/assets/{ganttDiagram-6RSMTGT7-D4lWwte3.js → ganttDiagram-6RSMTGT7-DnfiViPK.js} +1 -1
- package/server/public/assets/{highlighted-body-OFNGDK62-CaLboCt5.js → highlighted-body-OFNGDK62-B8Wrmj9H.js} +1 -1
- package/server/public/assets/index-CUr1xv8w.css +1 -0
- package/server/public/assets/{index-Bwejq-5s.js → index-CsSuZQBI.js} +145 -144
- package/server/public/assets/{linear-qUWmMZ-c.js → linear-C9zFQpkX.js} +1 -1
- package/server/public/assets/mermaid-GHXKKRXX-BUAB8hqt.js +1 -0
- package/server/public/assets/{pieDiagram-4H26LBE5-C4zYulEm.js → pieDiagram-4H26LBE5-lR8H7Yjd.js} +1 -1
- package/server/public/assets/{prod-C8VtLuWC.js → prod-B1jCQihw.js} +4 -4
- package/server/public/assets/{quadrantDiagram-W4KKPZXB-qP04zyZC.js → quadrantDiagram-W4KKPZXB-CVQ2guem.js} +1 -1
- package/server/public/assets/{sankeyDiagram-5OEKKPKP-eMPTX_cG.js → sankeyDiagram-5OEKKPKP-eD1RB4gm.js} +1 -1
- package/server/public/assets/{xychartDiagram-2RQKCTM6-Dme1PIt6.js → xychartDiagram-2RQKCTM6-ChEC6dQn.js} +1 -1
- package/server/public/index.html +2 -2
- package/server/{pull-requests-By_BteaL.js → pull-requests--Ib2jTgy.js} +1 -1
- package/server/{pull-requests-8z2N1UOV.js → pull-requests-CXIhdCYD.js} +13 -11
- package/server/{queries-ZABd5aXP.js → queries-6d7Cdtm7.js} +693 -104
- package/server/{rally-i_goYmiA.js → rally-B708-nZn.js} +3 -3
- package/server/{rally-api-DqKqIMNR.js → rally-api-nY0ZANw3.js} +2 -2
- package/server/{rally-api-xHazRk0d.js → rally-api-yjQ0TfHd.js} +1 -1
- package/server/{rally-client-COYz1vYR.js → rally-client-B1EJhfV0.js} +4 -4
- package/server/{rally-client-CGWEHaPd.js → rally-client-CULK2XAY.js} +1 -1
- package/server/rally-njs_mJrt.js +3 -0
- package/server/{reap-terminal-sessions-CaMkFOIH.js → reap-terminal-sessions-MWnqdLCJ.js} +1 -1
- package/server/{reap-terminal-sessions-DG9eiMVz.js → reap-terminal-sessions-N3BTkmX_.js} +1 -1
- package/server/{rebuild-stack-JUm0jqYP.js → rebuild-stack-Dp4eLkt4.js} +6 -6
- package/server/{rebuild-stack-CKjJAI8L.js → rebuild-stack-kA7XngID.js} +1 -1
- package/server/{reconstruct-cache-wU79aCee.js → reconstruct-cache-uWbZfjms.js} +6 -6
- package/server/record-t6V-3Dcj.js +3 -0
- package/server/{record-update-D3N6WMFR.js → record-update-DACtKh6_.js} +1 -1
- package/server/record-update-Dq0t2uBG.js +310 -0
- package/server/{recovery-trip-DkzJSej9.js → recovery-trip-BJtIQuag.js} +2 -2
- package/server/{release-engine-DMINVN8S.js → release-engine-DZpmGGzb.js} +5 -5
- package/server/{release-set-DeUSOEHy.js → release-set-hnXd_kga.js} +3 -3
- package/server/{remote-Dr5kGYSZ.js → remote-4tiENDaI.js} +3 -3
- package/server/{remote-b-c5bOce.js → remote-Br-ZWVIP.js} +3 -3
- package/server/{remote-agents-D6O_zETW.js → remote-agents-CRCg1L4H.js} +1 -1
- package/server/{remote-agents-Ct_WOyke.js → remote-agents-nmty1mLu.js} +6 -6
- package/server/{remote-completion-Dca3hAaa.js → remote-completion-BbWNd10K.js} +12 -12
- package/server/resume-CcKqnTvE.js +3 -0
- package/server/{review-agent-CCum8sGe.js → review-agent-DJRO8EG8.js} +1 -1
- package/server/{review-agent-CThvgK2r.js → review-agent-sKkE1FEL.js} +22 -22
- package/server/{review-artifacts-CXywD0F2.js → review-artifacts-BLbSC4ke.js} +5 -5
- package/server/{review-context-OYfKUprb.js → review-context-BgX3lcCx.js} +8 -8
- package/server/{review-status-DFRjDFef.js → review-status-A7quS5KJ.js} +54 -21
- package/server/review-status-C6n6-9f_.js +3 -0
- package/server/{review-status-enrichment-crNAtIpL.js → review-status-enrichment-tbOn_A_u.js} +3 -3
- package/server/{review-status-sync-DpAMD_WO.js → review-status-sync-BhSQ0d0l.js} +2 -2
- package/server/{review-status-sync-D60PJWNL.js → review-status-sync-To3-iS-N.js} +1 -1
- package/server/{review-verdict-feedback-JImjut0z.js → review-verdict-feedback-C1Kg8n7t.js} +1 -1
- package/server/{review-verdict-feedback-CpUZl5aE.js → review-verdict-feedback-CTRNtzXO.js} +6 -6
- package/server/{rollup-CZ02qgxk.js → rollup-B53Y81xK.js} +1 -1
- package/server/{rollup-SyuF09e4.js → rollup-WA0VD-Rr.js} +8 -8
- package/server/{scanner-Br0Z5S6R.js → scanner-D2743cp8.js} +11 -7
- package/server/{sequence-io-fxU0DlwW.js → sequence-io-Cg0zYj_E.js} +4 -4
- package/server/{sequencer-agent-B5YC5XVP.js → sequencer-agent-BGY8gjg-.js} +5 -5
- package/server/server.js +941 -752
- package/server/{service-Bagb90KZ.js → service-DCpB_SGd.js} +53 -53
- package/server/{session-fork-BqQxd-V6.js → session-fork-BQ8_6H32.js} +2 -2
- package/server/{session-history-XdS0JKp3.js → session-history-CVZDpS3c.js} +4 -4
- package/server/{settings-BNbocWOg.js → settings-BZ5m1UCl.js} +3 -3
- package/server/settings-D0OSwos5.js +2 -0
- package/server/{settings-uLc6DEYI.js → settings-ylxwqwQG.js} +2 -2
- package/server/{shadow-engineering-D4X_s3fA.js → shadow-engineering-BlxG6Xye.js} +2 -2
- package/server/{shadow-state-CbvsN3qG.js → shadow-state-C2_epgx2.js} +1 -1
- package/server/{shadow-state-C_NkP-sa.js → shadow-state-Dh-HzF2J.js} +2 -2
- package/server/{shadow-utils-CYMRPeRT.js → shadow-utils-4bvjn9b3.js} +2 -2
- package/server/{ship-log-__QtAFXG.js → ship-log-ClSMIzZX.js} +1 -1
- package/server/{smart-compaction-jdMkG1vo.js → smart-compaction-CHIxLr_d.js} +1 -1
- package/server/{smart-compaction-CLZOWin1.js → smart-compaction-r4pHQBIr.js} +7 -7
- package/server/{spawn-planning-session-D5OXo8pT.js → spawn-planning-session-DWAorh2B.js} +22 -21
- package/server/{spawn-planning-session-8D6mE033.js → spawn-planning-session-KC_UduxD.js} +1 -1
- package/server/{specialist-completion-CqmduO92.js → specialist-completion-BXhav38U.js} +1 -1
- package/server/{specialist-context-CJ-QjFR-.js → specialist-context-DtrYvGJ-.js} +5 -5
- package/server/{specialist-handoff-logger-Dnjlwt7g.js → specialist-handoff-logger-C45ouoZ6.js} +2 -2
- package/server/{specialist-logs-CQnKzuZs.js → specialist-logs-DJ3RzKxW.js} +3 -3
- package/server/{specialists-D0gGXMZx.js → specialists-D5fRZXmN.js} +1 -1
- package/server/specialists-DVj0hvaL.js +3 -0
- package/server/{specialists-CwZHb5cb.js → specialists-DyFeedjn.js} +66 -76
- package/server/{specialists-Bg9v4z3F.js → specialists-JVO00bs7.js} +340 -214
- package/server/specs-nN45DG2X.js +3 -0
- package/server/{src-BMMoA_ba.js → src-CG9mCkP6.js} +6 -6
- package/server/{src-Bqdtd6po.js → src-CMTQGyCK.js} +3 -3
- package/server/{src-k039WVYY.js → src-U7_kTPEE.js} +2 -1
- package/server/{stack-health-Bd06frFn.js → stack-health-Df0YEZKa.js} +1 -1
- package/server/{stack-health-C-ifC7b0.js → stack-health-puygdaMd.js} +2 -2
- package/server/{stale-task-claims-L7pJkQFL.js → stale-task-claims-BbFwCTb0.js} +4 -4
- package/server/{staleness-BID1BKdr.js → staleness-Bpy41ngS.js} +15 -3
- package/server/{staleness-_Tr-GwdA.js → staleness-Cbl_w4Bw.js} +1 -1
- package/server/{state-home-CONQvZR0.js → state-home-CIGjwNfJ.js} +96 -44
- package/server/{state-migrate-BeBW0KXA.js → state-migrate-Dkzaxvny.js} +12 -3
- package/server/{stuck-remediation-CKnIryGT.js → stuck-remediation-CzEov_fq.js} +26 -22
- package/server/{stuck-remediation-CsGD5Ksb.js → stuck-remediation-sY_MHHgQ.js} +1 -1
- package/server/{substrate-bug-weights-service-CpIZILj9.js → substrate-bug-weights-service-BH66lhm7.js} +3 -3
- package/server/{summary-fork-agEMsPSo.js → summary-fork-D8bXjCr7.js} +2 -2
- package/server/{summary-fork-bX6ax6X7.js → summary-fork-DHhJIsAL.js} +8 -8
- package/server/{supervisor-Ctt4eRYz.js → supervisor-BO-Zk_h-.js} +3 -3
- package/server/supervisor-BPy-o1A8.js +2 -0
- package/server/{swarm-readiness-DdmJVX7y.js → swarm-readiness-CQ_fwUWF.js} +4 -4
- package/server/{system-prerequisites-DSXBvffY.js → system-prerequisites-Bza0ffAh.js} +2 -2
- package/server/{teardown-workspace-DDCf5n-a.js → teardown-workspace-CEgauF4U.js} +15 -15
- package/server/{test-agent-queue-BJZ9Nfcc.js → test-agent-queue-DXDt0Xa-.js} +7 -7
- package/server/{test-verdict-Cp5tljlJ.js → test-verdict-CmUBK5cT.js} +1 -1
- package/server/{test-verdict-D_-sXIz_.js → test-verdict-DFjjIHR5.js} +1 -1
- package/server/{tldr-daemon-BQFmmFp0.js → tldr-daemon-BDtLOIlO.js} +2 -2
- package/server/{tldr-daemon-B8_oT5gx.js → tldr-daemon-DL566HbH.js} +1 -1
- package/server/tmux-DoThH6aj.js +3 -0
- package/server/{tmux-L5LgvGLp.js → tmux-ftABRAmc.js} +76 -44
- package/server/{token-BkQLy4yS.js → token-CsOhvw42.js} +2 -2
- package/server/{token-util-DI8sGlmF.js → token-util-CTmczIfW.js} +1 -1
- package/server/token-util-DrHg8abn.js +3 -0
- package/server/{tracker-config-DdT-nUAM.js → tracker-config-B4itFzDo.js} +2 -2
- package/server/{tracker-utils-DV3h1FYG.js → tracker-utils-BePq_oj-.js} +1 -1
- package/server/{tracker-utils-CawsPSS2.js → tracker-utils-tnxxqROg.js} +2 -2
- package/server/{traefik-connect-C6mJckNs.js → traefik-connect-m73vGebA.js} +1 -1
- package/server/{tunnel-IdK1iTHx.js → tunnel-B2vxjx_b.js} +3 -3
- package/server/{tunnel-BIFl98rc.js → tunnel-Cgj-IGIl.js} +1 -1
- package/server/{types-7-GnJn0t.js → types-BBNjPcqU.js} +1 -1
- package/server/{uat-train-j0cPeMSj.js → uat-train-CuEn0t9M.js} +28 -28
- package/server/{uat-train-0Ujk8GCv.js → uat-train-cKfM-_WW.js} +1 -1
- package/server/{validation-CabEISJT.js → validation-B5JxoPUS.js} +259 -9
- package/server/{validation-DcAgXTQp.js → validation-CIi6pnI2.js} +1 -1
- package/server/{verification-artifact-BuTA1QbL.js → verification-artifact-BcnIbigL.js} +1 -1
- package/server/{verification-artifact-Ck1tefmz.js → verification-artifact-C-lIHfUa.js} +1 -1
- package/server/{verification-runner-FiuAZ-H2.js → verification-runner-Br0S_Ous.js} +102 -37
- package/server/{verification-runner-DlJezzef.js → verification-runner-CDj4lD4t.js} +1 -1
- package/server/{vtt-parser-BnRsYzcz.js → vtt-parser-DKpNNW5i.js} +1 -1
- package/server/{work-agent-prompt-DLthEPAq.js → work-agent-prompt-Yb2bd3Fq.js} +13 -13
- package/server/{workflows-BZNNYkGC.js → workflows-C9WmILql.js} +39 -77
- package/server/workflows-D90rMOya.js +2 -0
- package/server/{workspace-D9ppycdg.js → workspace-BVl4rihN.js} +3 -3
- package/server/{workspace-3IC-UkAi.js → workspace-DuUdndHe.js} +1 -1
- package/server/{workspace-config-Bigl_-Lk.js → workspace-config-cEGcO6UT.js} +1 -1
- package/server/{workspace-manager-B1WOfKvB.js → workspace-manager-ZTdJAy9M.js} +1 -1
- package/server/{workspace-manager-ClkCIWTe.js → workspace-manager-hLUv3ADC.js} +22 -15
- package/server/{workspace-metadata-tiSRIWJP.js → workspace-metadata-CskwzzhL.js} +2 -2
- package/server/{workspace-metadata-BE0efUv_.js → workspace-metadata-DNpMixRq.js} +1 -1
- package/server/{workspaces-CFPcL0vl.js → workspaces-hWvy9eKs.js} +275 -109
- package/sync-sources/agents/pan-inspect-agent.md +1 -1
- package/sync-sources/agents/pan-merge-agent.md +1 -1
- package/sync-sources/agents/pan-planning-agent.md +4 -4
- package/sync-sources/agents/pan-work-agent.md +1 -1
- package/sync-sources/dev-skills/pan-commit/SKILL.md +1 -1
- package/sync-sources/dev-skills/test-specialist-workflow/SKILL.md +1 -1
- package/sync-sources/hooks/record-cost-event.js +363 -71
- package/sync-sources/hooks/session-start-hook +7 -0
- package/sync-sources/hooks/work-agent-stop-hook +1 -1
- package/sync-sources/rules/per-bead-durability.md +1 -1
- package/sync-sources/rules/prd-authoring.md +1 -1
- package/sync-sources/skills/feature-work/SKILL.md +1 -1
- package/sync-sources/skills/pan/SKILL.md +2 -2
- package/sync-sources/skills/pan-admin-config/SKILL.md +1 -0
- package/sync-sources/skills/pan-approve/SKILL.md +1 -1
- package/sync-sources/skills/pan-close/SKILL.md +1 -1
- package/sync-sources/skills/pan-doctor/SKILL.md +1 -1
- package/sync-sources/skills/pan-new-project/SKILL.md +9 -11
- package/sync-sources/skills/pan-oversee/SKILL.md +5 -5
- package/sync-sources/skills/pan-plan/SKILL.md +6 -6
- package/sync-sources/skills/pan-quickstart/SKILL.md +1 -1
- package/sync-sources/skills/pan-recap/SKILL.md +2 -2
- package/sync-sources/skills/pan-review/SKILL.md +1 -1
- package/sync-sources/skills/pan-start/SKILL.md +3 -3
- package/sync-sources/skills/pan-swarm/SKILL.md +1 -1
- package/sync-sources/skills/pan-sync/SKILL.md +1 -1
- package/sync-sources/skills/pan-task/SKILL.md +2 -2
- package/sync-sources/skills/pan-wipe/SKILL.md +2 -2
- package/sync-sources/skills/pipeline-list/SKILL.md +1 -1
- package/sync-sources/skills/pipeline-status/SKILL.md +2 -2
- package/sync-sources/skills/plan/SKILL.md +11 -11
- package/sync-sources/skills/write-vbrief/SKILL.md +7 -282
- package/sync-sources/skills/write-xbrief/SKILL.md +295 -0
- package/sync-sources/templates/claude-md/sections/warnings.md +1 -1
- package/server/agent-state-Co5Sy2Fw.js +0 -3
- package/server/agents-DyHKlq1I.js +0 -3
- package/server/cli-BRORS9qY.js +0 -3
- package/server/codex-DNyiQDKW.js +0 -3
- package/server/deacon-swarm-CV54eNmU.js +0 -2
- package/server/dist-j64RzSrQ.js +0 -3
- package/server/forge-B0_opi-V.js +0 -2
- package/server/hume-BmhvfVbV.js +0 -3
- package/server/inspect-agent-Dq0z1k3H.js +0 -2
- package/server/lifecycle-io-DmY2qwCn.js +0 -3
- package/server/merge-ops-DwWCkSgo.js +0 -2
- package/server/projects-BKkwpH6q.js +0 -3
- package/server/public/assets/index-Bdc4V9ba.css +0 -1
- package/server/public/assets/mermaid-GHXKKRXX-B5v_r7cI.js +0 -1
- package/server/rally-OSJXdiHK.js +0 -3
- package/server/record-rwK-nKv_.js +0 -3
- package/server/record-update-Crz74r-6.js +0 -168
- package/server/resume-wZZsWtzz.js +0 -3
- package/server/review-status-Bnh-rdkY.js +0 -3
- package/server/settings-BlUsVaUc.js +0 -2
- package/server/specialists-Dqe6_HE5.js +0 -3
- package/server/specs-BhOKBzqk.js +0 -3
- package/server/supervisor-COVHrBTg.js +0 -2
- package/server/tmux-BAvtac_u.js +0 -3
- package/server/token-util-BArZLN6w.js +0 -3
- package/server/workflows-C4mR0Reb.js +0 -2
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { n as __esmMin, o as __toESM } from "./rolldown-runtime-DNCzzKnI.js";
|
|
2
|
-
import { B as getProviderEnvSync,
|
|
2
|
+
import { B as getProviderEnvSync, Br as getOverdeckHome, C as TIERED_EXECUTION_DIFFICULTIES, D as resolveTieredExecutionEnabled, Ft as resolveProjectForIssue, G as setupCredentialFileAuthSync, Gr as sessionFilePath, H as init_providers, It as writeAgentHarnessModelSync, K as ensureOpenAICompatibleProxyRunning, L as clearCredentialFileAuthSync, Mt as readIssueRecordForWorkspaceSync, Nr as encodeClaudeProjectDir, Nt as readIssueRecordSync, O as resolveTieredExecutionEnabledForIssue, Ot as init_record, Qn as resolveBareNumericIdSync, R as getBuiltInDefaultHarness, S as DEFAULT_TIERED_EXECUTION_CONFIG, T as init_tier_table, Tn as init_projects, Ur as packageRoot, V as getProviderForModelSync, Vr as init_paths, Wr as resolveOhmypiExtensionPath, Yn as init_issue_id, dt as fnv1a32, er as require_dist, et as init_roles, f as loadConfigSync, fn as findProjectByPathSync, ft as init_percent, gn as getIssuePrefix, hr as AGENTS_DIR, in as shouldCommitLegacyWorkspaceArtifacts, ir as FsError, it as getModelCapabilitySync, l as isClaudeCodeChannelsMcpEnabled, lt as resolveModelIdSync, mr as init_errors, nn as init_state_read_home, nr as ClaudeCredentialParseError, ot as hasModelCapabilitySync, q as init_openai_compatible_proxy, st as init_model_capabilities, t as init_config_yaml, tt as resolveModel, u as isTldrEnabledSync, ut as fmix32, vn as getProjectSwarmHotspots, yn as getProjectSync, zn as resolveProjectFromIssueSync } from "./config-yaml-DvyMuOle.js";
|
|
3
3
|
import { a as init_activity_logger, n as emitActivityEntrySync, r as emitActivityTtsSync } from "./activity-logger-DDlOIAML.js";
|
|
4
|
-
import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-
|
|
5
|
-
import {
|
|
6
|
-
import { a as init_event_store, i as initEventStore } from "./event-store-
|
|
7
|
-
import { a as OHMYPI_BEHAVIOR, o as getHarnessBehavior } from "./src-
|
|
8
|
-
import { D as
|
|
9
|
-
import { i as countAgentsByStatus, o as init_agents$1 } from "./agents-
|
|
10
|
-
import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-
|
|
11
|
-
import { o as getPricingSync, s as init_cost } from "./cost-
|
|
12
|
-
import { _ as init_tier_metrics, g as estimateFeedDeliveryTokens, v as recordTierFeedDelivery } from "./cost-sync-
|
|
13
|
-
import { a as persistCurrentSessionId, d as isAgentStateServiceInProcess, i as logLauncherSessionPinned, l as getRuntimeSnapshot, n as createFreshSessionIdentity, o as init_persistent_logger, r as init_session_history, s as logAgentLifecycleSync, u as init_agent_runtime_mirror } from "./session-history-
|
|
14
|
-
import { t as init_behavior } from "./behavior-
|
|
15
|
-
import { i as ensureInternalTokenSync, s as init_internal_token, t as INTERNAL_TOKEN_HEADER } from "./internal-token-
|
|
4
|
+
import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-CzaSOgul.js";
|
|
5
|
+
import { $ as init_child_env, A as listPaneValues, D as killSession, E as isPaneDead, H as sessionExists, O as killSessionSync, P as listSessionsSync, R as sendEscapeKeyAsync, U as sessionExistsSync, V as sendRawKeystroke, W as setOption, X as BLANKED_PROVIDER_ENV, a as capturePaneSync, c as createSessionSync, i as capturePane, m as exactPaneTarget, s as createSession, w as init_tmux, z as sendKeys } from "./tmux-ftABRAmc.js";
|
|
6
|
+
import { a as init_event_store, i as initEventStore } from "./event-store-tdiY5eDZ.js";
|
|
7
|
+
import { a as OHMYPI_BEHAVIOR, o as getHarnessBehavior } from "./src-U7_kTPEE.js";
|
|
8
|
+
import { D as listOverdeckAgentStatesSync, E as init_agent_state_sync, O as saveOverdeckAgentStateSync, T as getOverdeckAgentStateSync, h as resetPipelineVerdictsForWorkStartSync, l as init_review_status } from "./review-status-A7quS5KJ.js";
|
|
9
|
+
import { i as countAgentsByStatus, o as init_agents$1 } from "./agents-B4Bjbkfv.js";
|
|
10
|
+
import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-DWdW7vUm.js";
|
|
11
|
+
import { o as getPricingSync, s as init_cost } from "./cost-Ca0YTWDw.js";
|
|
12
|
+
import { _ as init_tier_metrics, g as estimateFeedDeliveryTokens, v as recordTierFeedDelivery } from "./cost-sync-C0VdGme1.js";
|
|
13
|
+
import { a as persistCurrentSessionId, d as isAgentStateServiceInProcess, i as logLauncherSessionPinned, l as getRuntimeSnapshot, n as createFreshSessionIdentity, o as init_persistent_logger, r as init_session_history, s as logAgentLifecycleSync, u as init_agent_runtime_mirror } from "./session-history-CVZDpS3c.js";
|
|
14
|
+
import { t as init_behavior } from "./behavior-B_-4EKF3.js";
|
|
15
|
+
import { i as ensureInternalTokenSync, s as init_internal_token, t as INTERNAL_TOKEN_HEADER } from "./internal-token-Bb4XeV2x.js";
|
|
16
16
|
import { i as readReviewStatusMap, n as init_review_status_source, r as isRoleTerminal } from "./review-status-source-CxuEjLGg.js";
|
|
17
|
-
import { m as readWorkspacePlanSync, o as init_io } from "./io-
|
|
18
|
-
import { c as bridgeGeminiAuthToCliproxy, d as getCliproxyAuthDir, g as getCliproxyLogPath, l as decodeJwtPayload$1, p as getCliproxyClientEnv, s as bridgeCodexAuthToCliproxySync, v as init_cliproxy } from "./cliproxy-
|
|
19
|
-
import { L as normalizeHarness, R as reactivateConversationForSpawn, S as getConversationByName, k as init_conversations, y as createConversation } from "./conversations-
|
|
20
|
-
import { n as recordFeatureRegistryLifecycle, t as init_feature_registry_population } from "./feature-registry-population-
|
|
21
|
-
import { a as readCavemanVariant, n as init_workspace } from "./workspace-
|
|
22
|
-
import { a as requireModelOverrideSync, i as normalizeModelOverrideSync, n as init_launcher_generator, o as shellQuoteModelIdSync, r as init_model_validation, t as generateLauncherScriptSync } from "./launcher-generator-
|
|
23
|
-
import { a as init_claude_permissions, r as getClaudePermissionFlagsStringSync } from "./claude-permissions-
|
|
24
|
-
import { h as workspaceContextFile, o as init_layers } from "./layers-
|
|
25
|
-
import { a as extractThreadIdFromRollout, c as initCodexHome, l as init_codex, o as findLatestRollout } from "./codex-
|
|
26
|
-
import { n as init_harness_binary, r as prepareHarnessLaunch } from "./harness-binary-
|
|
27
|
-
import { f as init_config, m as loadConfigSync$1 } from "./config-
|
|
28
|
-
import { a as getFlywheelActiveRunIdSync, s as init_control_settings } from "./control-settings-
|
|
29
|
-
import { n as createTrackerFromConfig, r as init_factory, t as createTracker } from "./factory-
|
|
30
|
-
import { a as init_stack_health, i as getWorkspaceStackHealth } from "./stack-health-
|
|
31
|
-
import { i as createActiveSlice, l as init_dag, o as getDispatchableItems, s as groupItemsByWave } from "./dag-
|
|
32
|
-
import { c as generateFixedPointPromptSync, f as initHookSync, n as checkHookSync, p as init_hooks } from "./hooks-
|
|
33
|
-
import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-
|
|
34
|
-
import { a as loadCloisterConfigSync, r as init_config$1 } from "./config-
|
|
35
|
-
import { t as init_reap_terminal_sessions } from "./reap-terminal-sessions-
|
|
36
|
-
import { c as isStateMigrated, o as init_state_home } from "./state-home-
|
|
37
|
-
import { n as provisionClaudeHooks, t as init_claude_hooks_provision } from "./claude-hooks-provision-
|
|
38
|
-
import { a as init_lifecycle_io, t as appendContinueSessionEntryForIssue } from "./lifecycle-io-
|
|
39
|
-
import { r as init_swarm_readiness, t as analyzeSwarmReadiness } from "./swarm-readiness-
|
|
17
|
+
import { m as readWorkspacePlanSync, o as init_io } from "./io-B3_AHDfr.js";
|
|
18
|
+
import { c as bridgeGeminiAuthToCliproxy, d as getCliproxyAuthDir, g as getCliproxyLogPath, l as decodeJwtPayload$1, p as getCliproxyClientEnv, s as bridgeCodexAuthToCliproxySync, v as init_cliproxy } from "./cliproxy-Bgb2XCqi.js";
|
|
19
|
+
import { L as normalizeHarness, R as reactivateConversationForSpawn, S as getConversationByName, k as init_conversations, y as createConversation } from "./conversations-DbOs1e9Q.js";
|
|
20
|
+
import { n as recordFeatureRegistryLifecycle, t as init_feature_registry_population } from "./feature-registry-population-B0pmAz0a.js";
|
|
21
|
+
import { a as readCavemanVariant, n as init_workspace } from "./workspace-BVl4rihN.js";
|
|
22
|
+
import { a as requireModelOverrideSync, i as normalizeModelOverrideSync, n as init_launcher_generator, o as shellQuoteModelIdSync, r as init_model_validation, t as generateLauncherScriptSync } from "./launcher-generator-CHVm7bGT.js";
|
|
23
|
+
import { a as init_claude_permissions, r as getClaudePermissionFlagsStringSync } from "./claude-permissions-H_5wHQZQ.js";
|
|
24
|
+
import { h as workspaceContextFile, o as init_layers } from "./layers-DzxSTGNA.js";
|
|
25
|
+
import { a as extractThreadIdFromRollout, c as initCodexHome, l as init_codex, o as findLatestRollout } from "./codex-TmSi-yTv.js";
|
|
26
|
+
import { n as init_harness_binary, r as prepareHarnessLaunch } from "./harness-binary-CVio2m-u.js";
|
|
27
|
+
import { f as init_config, m as loadConfigSync$1 } from "./config-CCvjQf27.js";
|
|
28
|
+
import { a as getFlywheelActiveRunIdSync, s as init_control_settings } from "./control-settings-aP1ANIlI.js";
|
|
29
|
+
import { n as createTrackerFromConfig, r as init_factory, t as createTracker } from "./factory-CynerjXO.js";
|
|
30
|
+
import { a as init_stack_health, i as getWorkspaceStackHealth } from "./stack-health-puygdaMd.js";
|
|
31
|
+
import { i as createActiveSlice, l as init_dag, o as getDispatchableItems, s as groupItemsByWave } from "./dag-CdOjJVDT.js";
|
|
32
|
+
import { c as generateFixedPointPromptSync, f as initHookSync, n as checkHookSync, p as init_hooks } from "./hooks-DUXw8A0-.js";
|
|
33
|
+
import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-qHJBhy3Z.js";
|
|
34
|
+
import { a as loadCloisterConfigSync, r as init_config$1 } from "./config-DjLOdbgT.js";
|
|
35
|
+
import { t as init_reap_terminal_sessions } from "./reap-terminal-sessions-N3BTkmX_.js";
|
|
36
|
+
import { c as isStateMigrated, o as init_state_home } from "./state-home-CIGjwNfJ.js";
|
|
37
|
+
import { n as provisionClaudeHooks, t as init_claude_hooks_provision } from "./claude-hooks-provision-but-_qGY.js";
|
|
38
|
+
import { a as init_lifecycle_io, t as appendContinueSessionEntryForIssue } from "./lifecycle-io-D8iNBcux.js";
|
|
39
|
+
import { r as init_swarm_readiness, t as analyzeSwarmReadiness } from "./swarm-readiness-CQ_fwUWF.js";
|
|
40
40
|
import { dirname, join, relative } from "node:path";
|
|
41
41
|
import { Data, Duration, Effect, FileSystem } from "effect";
|
|
42
42
|
import { appendFileSync, existsSync, mkdirSync, readFileSync, statSync, statfsSync, unlinkSync, writeFileSync } from "fs";
|
|
43
43
|
import { basename as basename$1, dirname as dirname$1, join as join$1, resolve as resolve$1 } from "path";
|
|
44
44
|
import { homedir } from "os";
|
|
45
|
-
import "node:os";
|
|
45
|
+
import { cpus as cpus$1, loadavg as loadavg$1, platform as platform$1, totalmem as totalmem$1 } from "node:os";
|
|
46
46
|
import { chmodSync as chmodSync$1, closeSync as closeSync$1, constants, cpSync, createReadStream as createReadStream$1, existsSync as existsSync$1, mkdirSync as mkdirSync$1, openSync as openSync$1, readFileSync as readFileSync$1, readdirSync as readdirSync$1, renameSync as renameSync$1, rmSync as rmSync$1, statSync as statSync$1, unlinkSync as unlinkSync$1, writeFileSync as writeFileSync$1, writeSync } from "node:fs";
|
|
47
47
|
import { chmod, mkdir, readFile, stat as stat$1, writeFile } from "node:fs/promises";
|
|
48
48
|
import { randomUUID } from "crypto";
|
|
@@ -1299,7 +1299,7 @@ function getAgentStateFilePath(agentId) {
|
|
|
1299
1299
|
* PAN-1985: wipe agent state directories for an issue, optionally scoped to
|
|
1300
1300
|
* a role prefix. Used by the restart-fresh and review-restart paths to clean
|
|
1301
1301
|
* state before respawning — the new agent then reads `.pan/continue.json`,
|
|
1302
|
-
* the
|
|
1302
|
+
* the xBRIEF, the beads, and the branch to pick up where the prior run left
|
|
1303
1303
|
* off. Refuses to run against an empty or unsafe id.
|
|
1304
1304
|
*
|
|
1305
1305
|
* - `rolePrefix` omitted: wipes only the work agent dir (`agent-<id>`).
|
|
@@ -1712,7 +1712,7 @@ function markAgentRunning(state, options) {
|
|
|
1712
1712
|
assertAgentCanTransitionToRunning(state);
|
|
1713
1713
|
const oldStatus = state.status;
|
|
1714
1714
|
state.status = "running";
|
|
1715
|
-
state.lastActivity = (/* @__PURE__ */ new Date()).toISOString();
|
|
1715
|
+
if (state.harness !== "codex") state.lastActivity = (/* @__PURE__ */ new Date()).toISOString();
|
|
1716
1716
|
if (options?.preserveFailureTracking !== true) clearFailureTrackingFields(state);
|
|
1717
1717
|
delete state.stoppedAt;
|
|
1718
1718
|
delete state.stoppedByUser;
|
|
@@ -2415,18 +2415,28 @@ async function getProviderEnvForModel(model) {
|
|
|
2415
2415
|
}
|
|
2416
2416
|
throw new Error(`No API key configured for ${provider.displayName}. Configure it in Settings before using model "${model}".`);
|
|
2417
2417
|
}
|
|
2418
|
-
function
|
|
2419
|
-
if (getProviderForModelSync(model).name === "anthropic") return
|
|
2418
|
+
function getClaudeCodeContextPolicyForModel(model) {
|
|
2419
|
+
if (getProviderForModelSync(model).name === "anthropic") return {};
|
|
2420
2420
|
const resolvedModel = resolveModelIdSync(model);
|
|
2421
|
-
if (
|
|
2422
|
-
|
|
2421
|
+
if (GPT_56_MODELS.has(resolvedModel)) return {
|
|
2422
|
+
autoCompactWindow: GPT_56_CODEX_CLIENT_CONTEXT_WINDOW,
|
|
2423
|
+
maxContextTokens: GPT_56_CODEX_CLIENT_CONTEXT_WINDOW
|
|
2424
|
+
};
|
|
2425
|
+
if (!hasModelCapabilitySync(resolvedModel)) return {};
|
|
2426
|
+
const contextWindow = getModelCapabilitySync(resolvedModel).contextWindow;
|
|
2427
|
+
if (KIMI_K3_MODELS.has(resolvedModel)) return {
|
|
2428
|
+
autoCompactWindow: contextWindow,
|
|
2429
|
+
maxContextTokens: contextWindow
|
|
2430
|
+
};
|
|
2431
|
+
return { autoCompactWindow: contextWindow };
|
|
2423
2432
|
}
|
|
2424
2433
|
async function getProviderExportsForModel(model) {
|
|
2425
2434
|
const envVars = await getProviderEnvForModel(model);
|
|
2426
2435
|
const unsetLines = PROVIDER_ENV_KEYS.map((key) => `unset ${key}`);
|
|
2427
|
-
const
|
|
2436
|
+
const contextPolicy = getClaudeCodeContextPolicyForModel(model);
|
|
2428
2437
|
const exportLines = Object.entries(envVars).map(([k, v]) => `export ${k}="${v.replace(/"/g, "\\\"")}"`);
|
|
2429
|
-
if (
|
|
2438
|
+
if (contextPolicy.maxContextTokens !== void 0) exportLines.push(`export CLAUDE_CODE_MAX_CONTEXT_TOKENS="${contextPolicy.maxContextTokens}"`);
|
|
2439
|
+
if (contextPolicy.autoCompactWindow !== void 0) exportLines.push(`export CLAUDE_CODE_AUTO_COMPACT_WINDOW="${contextPolicy.autoCompactWindow}"`);
|
|
2430
2440
|
return [...unsetLines, ...exportLines].join("\n") + "\n";
|
|
2431
2441
|
}
|
|
2432
2442
|
/**
|
|
@@ -2448,11 +2458,12 @@ async function buildSpawnEnvForModel(model, baseEnv = process.env) {
|
|
|
2448
2458
|
sanitized[k] = v;
|
|
2449
2459
|
}
|
|
2450
2460
|
const providerEnv = await getProviderEnvForModel(model);
|
|
2451
|
-
const
|
|
2461
|
+
const contextPolicy = getClaudeCodeContextPolicyForModel(model);
|
|
2452
2462
|
return {
|
|
2453
2463
|
...sanitized,
|
|
2454
2464
|
...providerEnv,
|
|
2455
|
-
...
|
|
2465
|
+
...contextPolicy.maxContextTokens !== void 0 ? { CLAUDE_CODE_MAX_CONTEXT_TOKENS: String(contextPolicy.maxContextTokens) } : {},
|
|
2466
|
+
...contextPolicy.autoCompactWindow !== void 0 ? { CLAUDE_CODE_AUTO_COMPACT_WINDOW: String(contextPolicy.autoCompactWindow) } : {}
|
|
2456
2467
|
};
|
|
2457
2468
|
}
|
|
2458
2469
|
/**
|
|
@@ -2492,7 +2503,7 @@ function determineModel(options = {}) {
|
|
|
2492
2503
|
if ((options.role ?? "work") === "work" && !modelOverride && WORK_AGENT_BROKEN_MODELS.has(resolved)) throw new Error(`Resolved work model "${resolved}" is known-broken for work agents. Set roles.work.model to a working model in config.yaml, or pass an explicit --model override.`);
|
|
2493
2504
|
return resolved;
|
|
2494
2505
|
}
|
|
2495
|
-
var CLI_PROXY_MODEL_ALIASES, PROVIDER_ENV_KEYS, WORK_AGENT_BROKEN_MODELS;
|
|
2506
|
+
var CLI_PROXY_MODEL_ALIASES, PROVIDER_ENV_KEYS, GPT_56_CODEX_CLIENT_CONTEXT_WINDOW, GPT_56_MODELS, KIMI_K3_MODELS, WORK_AGENT_BROKEN_MODELS;
|
|
2496
2507
|
var init_provider_env = __esmMin((() => {
|
|
2497
2508
|
init_config_yaml();
|
|
2498
2509
|
init_workspace();
|
|
@@ -2517,6 +2528,7 @@ var init_provider_env = __esmMin((() => {
|
|
|
2517
2528
|
"ANTHROPIC_SMALL_FAST_MODEL",
|
|
2518
2529
|
"CLAUDE_CODE_SUBAGENT_MODEL",
|
|
2519
2530
|
"CLAUDE_CODE_AUTO_COMPACT_WINDOW",
|
|
2531
|
+
"CLAUDE_CODE_MAX_CONTEXT_TOKENS",
|
|
2520
2532
|
"OPENAI_API_KEY",
|
|
2521
2533
|
"GEMINI_API_KEY",
|
|
2522
2534
|
"API_TIMEOUT_MS",
|
|
@@ -2529,6 +2541,13 @@ var init_provider_env = __esmMin((() => {
|
|
|
2529
2541
|
"NOUS_API_KEY",
|
|
2530
2542
|
"DASHSCOPE_API_KEY"
|
|
2531
2543
|
];
|
|
2544
|
+
GPT_56_CODEX_CLIENT_CONTEXT_WINDOW = 372e3;
|
|
2545
|
+
GPT_56_MODELS = new Set([
|
|
2546
|
+
"gpt-5.6-sol",
|
|
2547
|
+
"gpt-5.6-terra",
|
|
2548
|
+
"gpt-5.6-luna"
|
|
2549
|
+
]);
|
|
2550
|
+
KIMI_K3_MODELS = new Set(["k3", "k3[1m]"]);
|
|
2532
2551
|
WORK_AGENT_BROKEN_MODELS = /* @__PURE__ */ new Set([]);
|
|
2533
2552
|
}));
|
|
2534
2553
|
//#endregion
|
|
@@ -2807,12 +2826,12 @@ async function claudeSystemPromptFiles(workspace, harness) {
|
|
|
2807
2826
|
files.push(await ensureSessionContextBriefingFile());
|
|
2808
2827
|
const behavior = getHarnessBehavior(harness);
|
|
2809
2828
|
if (behavior.contextLayerKind === "pi") {
|
|
2810
|
-
const { piGlobalContextFile } = await import("./context-layers-
|
|
2829
|
+
const { piGlobalContextFile } = await import("./context-layers-B3Nt58jl.js");
|
|
2811
2830
|
const globalFile = piGlobalContextFile();
|
|
2812
2831
|
if (existsSync(globalFile)) files.unshift(globalFile);
|
|
2813
2832
|
}
|
|
2814
2833
|
if (behavior.contextLayerKind === "codex") {
|
|
2815
|
-
const { codexGlobalContextFile } = await import("./context-layers-
|
|
2834
|
+
const { codexGlobalContextFile } = await import("./context-layers-B3Nt58jl.js");
|
|
2816
2835
|
const globalFile = codexGlobalContextFile();
|
|
2817
2836
|
if (existsSync(globalFile)) files.unshift(globalFile);
|
|
2818
2837
|
}
|
|
@@ -3062,7 +3081,7 @@ async function injectPiPromptTimeMemory(agentId, prompt) {
|
|
|
3062
3081
|
agentRole: agentState.role ?? "work",
|
|
3063
3082
|
agentHarness: agentState.harness ?? "claude-code"
|
|
3064
3083
|
};
|
|
3065
|
-
const { injectPromptTimeMemory } = await import("./injection-
|
|
3084
|
+
const { injectPromptTimeMemory } = await import("./injection-oNZeoDhL.js");
|
|
3066
3085
|
const result = await injectPromptTimeMemory({
|
|
3067
3086
|
prompt,
|
|
3068
3087
|
identity,
|
|
@@ -3096,7 +3115,7 @@ async function injectPiConversationMemory(opts, prompt) {
|
|
|
3096
3115
|
agentRole: "work",
|
|
3097
3116
|
agentHarness: "ohmypi"
|
|
3098
3117
|
};
|
|
3099
|
-
const { injectPromptTimeMemory } = await import("./injection-
|
|
3118
|
+
const { injectPromptTimeMemory } = await import("./injection-oNZeoDhL.js");
|
|
3100
3119
|
const result = await injectPromptTimeMemory({
|
|
3101
3120
|
prompt,
|
|
3102
3121
|
identity,
|
|
@@ -3517,7 +3536,7 @@ function resolveSlotTierSpawnParams(baseWorkspace, slotItemId, explicitModel, sp
|
|
|
3517
3536
|
/**
|
|
3518
3537
|
* Tiered-execution model resolution for the single work-agent path.
|
|
3519
3538
|
* Auto-start and non-swarm issues still run one foreground work agent, but
|
|
3520
|
-
* the first dispatchable
|
|
3539
|
+
* the first dispatchable xBRIEF item is the same scheduling unit the agent is
|
|
3521
3540
|
* about to execute. If tiered execution is enabled for the issue, route that
|
|
3522
3541
|
* agent through the item's resolved tier; otherwise leave role-default model
|
|
3523
3542
|
* resolution untouched.
|
|
@@ -3620,7 +3639,7 @@ async function transitionIssueToInReview(issueId, workspacePath) {
|
|
|
3620
3639
|
async function buildAgentLaunchConfig(opts) {
|
|
3621
3640
|
const model = requireModelOverrideSync(opts.model);
|
|
3622
3641
|
try {
|
|
3623
|
-
const { injectOverdeckInfraDeny } = await import("./claude-settings-overlay-
|
|
3642
|
+
const { injectOverdeckInfraDeny } = await import("./claude-settings-overlay-BTENVmYf.js");
|
|
3624
3643
|
await Effect.runPromise(injectOverdeckInfraDeny(opts.workspace));
|
|
3625
3644
|
} catch (err) {
|
|
3626
3645
|
console.warn(`[agents] injectOverdeckInfraDeny failed for ${opts.agentId} (non-fatal): ${err instanceof Error ? err.message : err}`);
|
|
@@ -3701,7 +3720,7 @@ async function retrieveSpawnTimeMemoryContext(input) {
|
|
|
3701
3720
|
agentRole: input.role,
|
|
3702
3721
|
agentHarness: input.harness
|
|
3703
3722
|
};
|
|
3704
|
-
const { injectPromptTimeMemory } = await import("./injection-
|
|
3723
|
+
const { injectPromptTimeMemory } = await import("./injection-oNZeoDhL.js");
|
|
3705
3724
|
return (await injectPromptTimeMemory({
|
|
3706
3725
|
prompt: input.prompt,
|
|
3707
3726
|
identity,
|
|
@@ -3792,7 +3811,7 @@ async function assertWorkspaceStackHealthyForSpawn(issueId, role, allowHost = fa
|
|
|
3792
3811
|
record.attempts += 1;
|
|
3793
3812
|
spawnStackRebuildState.set(normalizedIssue, record);
|
|
3794
3813
|
console.log(`[agents] Workspace stack for ${normalizedIssue} unhealthy (${details}) — rebuilding before spawn (attempt ${record.attempts}/${SPAWN_STACK_REBUILD_MAX_ATTEMPTS})`);
|
|
3795
|
-
const { rebuildWorkspaceStack } = await import("./rebuild-stack-
|
|
3814
|
+
const { rebuildWorkspaceStack } = await import("./rebuild-stack-kA7XngID.js");
|
|
3796
3815
|
const result = await Effect.runPromise(rebuildWorkspaceStack(issueId, { onProgress: (m) => console.log(`[agents] ${normalizedIssue} stack rebuild: ${m}`) })).catch((err) => ({
|
|
3797
3816
|
success: false,
|
|
3798
3817
|
error: err instanceof Error ? err.message : String(err)
|
|
@@ -5035,18 +5054,18 @@ async function spawnRun(issueId, role, options = {}) {
|
|
|
5035
5054
|
let reapWarmIdle = false;
|
|
5036
5055
|
const advancing = role === "review" || role === "test" || role === "ship";
|
|
5037
5056
|
try {
|
|
5038
|
-
const { isPaneDead } = await import("./tmux-
|
|
5057
|
+
const { isPaneDead } = await import("./tmux-DoThH6aj.js");
|
|
5039
5058
|
if (await Effect.runPromise(isPaneDead(agentId))) reapWarmIdle = true;
|
|
5040
5059
|
else if (advancing) {
|
|
5041
|
-
const { getReviewStatusSync } = await import("./review-status-
|
|
5042
|
-
const { isRoleTerminal } = await import("./reap-terminal-sessions-
|
|
5060
|
+
const { getReviewStatusSync } = await import("./review-status-C6n6-9f_.js");
|
|
5061
|
+
const { isRoleTerminal } = await import("./reap-terminal-sessions-MWnqdLCJ.js");
|
|
5043
5062
|
const status = getReviewStatusSync(issueId);
|
|
5044
5063
|
reapWarmIdle = !!status && isRoleTerminal(role, status);
|
|
5045
5064
|
}
|
|
5046
5065
|
} catch {}
|
|
5047
5066
|
if (!reapWarmIdle) throw new Error(`Role run ${agentId} already running. Use 'pan tell' to message it.`);
|
|
5048
5067
|
console.log(`[spawn] ${agentId} is warm-idle from the previous cycle — reaping it for the new ${role} dispatch (PAN-2579)`);
|
|
5049
|
-
const { killSession } = await import("./tmux-
|
|
5068
|
+
const { killSession } = await import("./tmux-DoThH6aj.js");
|
|
5050
5069
|
await Effect.runPromise(killSession(agentId)).catch(() => {});
|
|
5051
5070
|
}
|
|
5052
5071
|
await assertWorkspaceStackHealthyForSpawn(issueId, role, options.allowHost, workspace);
|
|
@@ -5060,7 +5079,7 @@ async function spawnRun(issueId, role, options = {}) {
|
|
|
5060
5079
|
assertCodexNativeAuthForSpawn(resolvedHarness, listAgentStates());
|
|
5061
5080
|
await ensureLifecycleHooksBeforeLaunch(agentId, resolvedHarness);
|
|
5062
5081
|
if (getProviderForModelSync(selectedModel).name === "openai" && await getProviderAuthMode(selectedModel) === "subscription") {
|
|
5063
|
-
const { isCliproxyRunning } = await import("./cliproxy-
|
|
5082
|
+
const { isCliproxyRunning } = await import("./cliproxy-DW0V86F8.js");
|
|
5064
5083
|
if (!await Effect.runPromise(isCliproxyRunning())) throw new Error("CLIProxyAPI sidecar is not running. GPT subscription role runs route through a local cliproxy process managed by `pan up`. Run `pan up` (or restart the dashboard) before spawning a GPT role run.");
|
|
5065
5084
|
}
|
|
5066
5085
|
const state = {
|
|
@@ -5073,7 +5092,7 @@ async function spawnRun(issueId, role, options = {}) {
|
|
|
5073
5092
|
modelSpawnKey,
|
|
5074
5093
|
status: "starting",
|
|
5075
5094
|
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5076
|
-
costSoFar: 0,
|
|
5095
|
+
...resolvedHarness === "codex" ? {} : { costSoFar: 0 },
|
|
5077
5096
|
hostOverride: options.allowHost || void 0,
|
|
5078
5097
|
slotIndex: options.slotIndex,
|
|
5079
5098
|
slotItemId: options.slotItemId
|
|
@@ -5172,7 +5191,7 @@ async function spawnRun(issueId, role, options = {}) {
|
|
|
5172
5191
|
const claudeCmd = `bash ${launcherScript}`;
|
|
5173
5192
|
console.log(`[claude-invoke] purpose=role-run | role=${role} | model=${state.model} | source=agents.ts:spawnRun | session=${agentId} | command="${claudeCmd}"`);
|
|
5174
5193
|
try {
|
|
5175
|
-
const { preTrustDirectory } = await import("./workspace-manager-
|
|
5194
|
+
const { preTrustDirectory } = await import("./workspace-manager-ZTdJAy9M.js");
|
|
5176
5195
|
preTrustDirectory(workspace);
|
|
5177
5196
|
} catch {}
|
|
5178
5197
|
clearReadySignal(agentId);
|
|
@@ -5242,7 +5261,7 @@ async function spawnAgent(options) {
|
|
|
5242
5261
|
if (await Effect.runPromise(sessionExists(agentId))) throw new Error(`Agent ${agentId} already running. Use 'pan tell' to message it.`);
|
|
5243
5262
|
await assertWorkspaceStackHealthyForSpawn(options.issueId, role, options.allowHost, options.workspace);
|
|
5244
5263
|
initHookSync(agentId);
|
|
5245
|
-
if (role !== "strike" && role !== "knowledge" && options.slotItemId === void 0 && !readWorkspacePlanSync(options.workspace)) throw new Error(`The required
|
|
5264
|
+
if (role !== "strike" && role !== "knowledge" && options.slotItemId === void 0 && !readWorkspacePlanSync(options.workspace)) throw new Error(`The required xBRIEF checklist for ${options.issueId} is missing or unreadable. Run planning before spawning a work agent.`);
|
|
5246
5265
|
const modelSpawnKey = `${role}:${options.issueId}`;
|
|
5247
5266
|
const singleTierParams = role === "work" && options.slotItemId === void 0 && options.slotIndex === void 0 ? resolveSingleWorkTierSpawnParams(options.workspace, options.model, modelSpawnKey) : {};
|
|
5248
5267
|
const selectedModel = determineModel({
|
|
@@ -5252,7 +5271,7 @@ async function spawnAgent(options) {
|
|
|
5252
5271
|
});
|
|
5253
5272
|
console.log(`[DEBUG] Selected model: ${selectedModel}`);
|
|
5254
5273
|
if (getProviderForModelSync(selectedModel).name === "openai" && await getProviderAuthMode(selectedModel) === "subscription") {
|
|
5255
|
-
const { isCliproxyRunning } = await import("./cliproxy-
|
|
5274
|
+
const { isCliproxyRunning } = await import("./cliproxy-DW0V86F8.js");
|
|
5256
5275
|
if (!await Effect.runPromise(isCliproxyRunning())) throw new Error("CLIProxyAPI sidecar is not running. GPT subscription agents route through a local cliproxy process managed by `pan up`. Run `pan up` (or restart the dashboard) before spawning a GPT agent.");
|
|
5257
5276
|
}
|
|
5258
5277
|
const resolvedHarness = await resolveHarness({
|
|
@@ -5273,7 +5292,7 @@ async function spawnAgent(options) {
|
|
|
5273
5292
|
modelSpawnKey,
|
|
5274
5293
|
status: "starting",
|
|
5275
5294
|
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
5276
|
-
costSoFar: 0,
|
|
5295
|
+
...resolvedHarness === "codex" ? {} : { costSoFar: 0 },
|
|
5277
5296
|
hostOverride: options.allowHost || void 0,
|
|
5278
5297
|
sessionId: createFreshSessionIdentity(agentId, resolvedHarness)
|
|
5279
5298
|
};
|
|
@@ -5282,7 +5301,7 @@ async function spawnAgent(options) {
|
|
|
5282
5301
|
if (role === "work") {
|
|
5283
5302
|
try {
|
|
5284
5303
|
if (resetPipelineVerdictsForWorkStartSync(options.issueId)) {
|
|
5285
|
-
const { resetPostMergeState } = await import("./merge-agent-
|
|
5304
|
+
const { resetPostMergeState } = await import("./merge-agent-BQM3a8z5.js");
|
|
5286
5305
|
resetPostMergeState(options.issueId);
|
|
5287
5306
|
}
|
|
5288
5307
|
} catch (err) {
|
|
@@ -5293,7 +5312,7 @@ async function spawnAgent(options) {
|
|
|
5293
5312
|
});
|
|
5294
5313
|
}
|
|
5295
5314
|
if (role === "work") try {
|
|
5296
|
-
const { writeStoryFeatureContext } = await import("./work-agent-prompt-
|
|
5315
|
+
const { writeStoryFeatureContext } = await import("./work-agent-prompt-Yb2bd3Fq.js");
|
|
5297
5316
|
await writeStoryFeatureContext(options.workspace, options.issueId);
|
|
5298
5317
|
} catch (ctxErr) {
|
|
5299
5318
|
console.warn(`[agents] Could not write story feature context for ${options.issueId}: ${ctxErr.message}`);
|
|
@@ -5342,7 +5361,7 @@ async function spawnAgent(options) {
|
|
|
5342
5361
|
try {
|
|
5343
5362
|
const venvPath = join$1(options.workspace, ".venv");
|
|
5344
5363
|
if (isTldrEnabledSync() && existsSync(venvPath)) {
|
|
5345
|
-
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-
|
|
5364
|
+
const { getTldrDaemonServiceSync } = await import("./tldr-daemon-DL566HbH.js");
|
|
5346
5365
|
const tldrService = getTldrDaemonServiceSync(options.workspace, venvPath);
|
|
5347
5366
|
if (!(await tldrService.getStatus()).running) {
|
|
5348
5367
|
await tldrService.start(true);
|
|
@@ -5382,13 +5401,13 @@ async function spawnAgent(options) {
|
|
|
5382
5401
|
const claudeCmd = `bash ${launcherScript}`;
|
|
5383
5402
|
console.log(`[claude-invoke] purpose=work-agent | model=${state.model} | source=agents.ts:spawnAgent | session=${agentId} | command="${claudeCmd}"`);
|
|
5384
5403
|
try {
|
|
5385
|
-
const { preTrustDirectory } = await import("./workspace-manager-
|
|
5404
|
+
const { preTrustDirectory } = await import("./workspace-manager-ZTdJAy9M.js");
|
|
5386
5405
|
preTrustDirectory(options.workspace);
|
|
5387
5406
|
} catch {}
|
|
5388
5407
|
try {
|
|
5389
|
-
const { isGitHubAppConfigured, generateInstallationToken, configureWorkspaceForBot } = await import("./github-app-
|
|
5408
|
+
const { isGitHubAppConfigured, generateInstallationToken, configureWorkspaceForBot } = await import("./github-app-CPfoFAdV.js");
|
|
5390
5409
|
if (isGitHubAppConfigured()) {
|
|
5391
|
-
const { findProjectByPathSync } = await import("./projects-
|
|
5410
|
+
const { findProjectByPathSync } = await import("./projects-9SkRpES9.js");
|
|
5392
5411
|
const ghRepo = findProjectByPathSync(resolve$1(options.workspace, "..", ".."))?.github_repo;
|
|
5393
5412
|
if (ghRepo) {
|
|
5394
5413
|
const [owner, repo] = ghRepo.split("/");
|
|
@@ -5451,7 +5470,7 @@ async function spawnAgent(options) {
|
|
|
5451
5470
|
const codexHomeForAgent = join$1(homedir(), ".overdeck", "agents", agentId, "codex-home");
|
|
5452
5471
|
(async () => {
|
|
5453
5472
|
try {
|
|
5454
|
-
const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-
|
|
5473
|
+
const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-Dg7Is5yb.js");
|
|
5455
5474
|
const rollout = await waitForCodexRollout(codexHomeForAgent, 12e4);
|
|
5456
5475
|
if (rollout) {
|
|
5457
5476
|
const threadId = extractThreadIdFromRollout(rollout);
|
|
@@ -5488,7 +5507,7 @@ function assertRegisteredSlotCap(issueId, configuredCap) {
|
|
|
5488
5507
|
}
|
|
5489
5508
|
function buildRegisteredSlotPrompt(issueId, baseWorkspace, slot, extraPrompt) {
|
|
5490
5509
|
const doc = readWorkspacePlanSync(baseWorkspace);
|
|
5491
|
-
if (!doc) throw new Error(`Registered slot spawn for ${issueId} requires a readable
|
|
5510
|
+
if (!doc) throw new Error(`Registered slot spawn for ${issueId} requires a readable xBRIEF plan in ${baseWorkspace}.`);
|
|
5492
5511
|
const slice = createActiveSlice(doc, {
|
|
5493
5512
|
issueId: issueId.toUpperCase(),
|
|
5494
5513
|
itemId: slot.slotItemId,
|
|
@@ -5503,7 +5522,7 @@ function buildRegisteredSlotPrompt(issueId, baseWorkspace, slot, extraPrompt) {
|
|
|
5503
5522
|
`Branch: ${slot.branch}`,
|
|
5504
5523
|
`Workspace: ${slot.workspace}`,
|
|
5505
5524
|
"",
|
|
5506
|
-
"You are a registered slot work agent. Implement only the target
|
|
5525
|
+
"You are a registered slot work agent. Implement only the target xBRIEF item below, keep changes scoped to that item, and do not merge this slot branch yourself.",
|
|
5507
5526
|
"",
|
|
5508
5527
|
slice.prompt
|
|
5509
5528
|
];
|
|
@@ -6237,7 +6256,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
|
|
|
6237
6256
|
return;
|
|
6238
6257
|
}
|
|
6239
6258
|
console.log(`[agents] Auto-resuming suspended agent ${normalizedId} to deliver message`);
|
|
6240
|
-
const { resumeAgent } = await import("./agents-
|
|
6259
|
+
const { resumeAgent } = await import("./agents-FlIgQ3ql.js");
|
|
6241
6260
|
const result = await resumeAgent(normalizedId, message);
|
|
6242
6261
|
if (!result.success) throw new Error(`Failed to auto-resume agent: ${result.error}`);
|
|
6243
6262
|
if (result.messageDelivered === false) throw new Error(`Agent resumed but ready signal did not fire — message not delivered. Feedback is in the mail queue.`);
|
|
@@ -6254,7 +6273,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
|
|
|
6254
6273
|
return;
|
|
6255
6274
|
}
|
|
6256
6275
|
console.log(`[agents] Auto-resuming stopped agent ${normalizedId} to deliver feedback (session exists: ${await Effect.runPromise(sessionExists(normalizedId))})`);
|
|
6257
|
-
const { resumeAgent } = await import("./agents-
|
|
6276
|
+
const { resumeAgent } = await import("./agents-FlIgQ3ql.js");
|
|
6258
6277
|
const resumeResult = await resumeAgent(normalizedId, message);
|
|
6259
6278
|
queueAgentMail(normalizedId, message);
|
|
6260
6279
|
if (resumeResult.success && resumeResult.messageDelivered !== false) {
|
|
@@ -6291,7 +6310,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
|
|
|
6291
6310
|
const resumeModel = agentState.model || "claude-sonnet-4-6";
|
|
6292
6311
|
const fallbackHarness = agentState.harness ?? "claude-code";
|
|
6293
6312
|
const harnessLaunch = await prepareHarnessLaunch(fallbackHarness);
|
|
6294
|
-
const { assertWorkspaceStackHealthyForSpawn } = await import("./agents-
|
|
6313
|
+
const { assertWorkspaceStackHealthyForSpawn } = await import("./agents-FlIgQ3ql.js");
|
|
6295
6314
|
await assertWorkspaceStackHealthyForSpawn(agentState.issueId || normalizedId.replace(/^agent-/, "").toUpperCase(), resumeRole, agentState.hostOverride === true, agentState.workspace);
|
|
6296
6315
|
const fallbackPiFields = fallbackHarness === "ohmypi" ? await getOhmypiLauncherFields(normalizedId, resumeModel) : {};
|
|
6297
6316
|
const fallbackCodexFields = fallbackHarness === "codex" ? getCodexLauncherFields(normalizedId, resumeModel, agentState.workspace, resumeRole) : {};
|
|
@@ -6355,7 +6374,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
|
|
|
6355
6374
|
} else console.warn(`[agents] Fallback-restarted ${normalizedId} but ready signal not detected — feedback in mail queue`);
|
|
6356
6375
|
return;
|
|
6357
6376
|
}
|
|
6358
|
-
const { loadRemoteAgentState, sendToRemoteAgent } = await import("./remote-agents-
|
|
6377
|
+
const { loadRemoteAgentState, sendToRemoteAgent } = await import("./remote-agents-CRCg1L4H.js");
|
|
6359
6378
|
const remoteState = loadRemoteAgentState(normalizedId);
|
|
6360
6379
|
if (remoteState && remoteState.vmName) {
|
|
6361
6380
|
console.log(`[agents] Sending message to remote agent ${normalizedId} on ${remoteState.vmName}`);
|
|
@@ -6387,7 +6406,7 @@ async function messageAgent(agentId, message, caller = "internal", opts = {}) {
|
|
|
6387
6406
|
const panePids = await Effect.runPromise(listPaneValues(normalizedId, "#{pane_pid}"));
|
|
6388
6407
|
if (panePids.length > 0 && !await hasAgentRuntimeInSubtree(panePids[0], expectedHarness)) {
|
|
6389
6408
|
console.warn(`[agents] ${normalizedId} tmux session is a zombie (no ${expectedHarness} runtime) — attempting resume`);
|
|
6390
|
-
const { resumeAgent } = await import("./agents-
|
|
6409
|
+
const { resumeAgent } = await import("./agents-FlIgQ3ql.js");
|
|
6391
6410
|
const resumeResult = await resumeAgent(normalizedId, message);
|
|
6392
6411
|
if (resumeResult.success) {
|
|
6393
6412
|
if (resumeResult.messageDelivered !== false) await appendTellInterventionForUserSource(normalizedId, caller);
|
|
@@ -6500,7 +6519,7 @@ async function buildCompactRecoverySeed(agentId) {
|
|
|
6500
6519
|
if (agentState?.workspace && sessionId) {
|
|
6501
6520
|
const sessionFile = sessionFilePath(agentState.workspace, sessionId);
|
|
6502
6521
|
try {
|
|
6503
|
-
const [{ getConversationCompactionSettings }, { generateSmartSummary }] = await Promise.all([import("./conversation-compaction-
|
|
6522
|
+
const [{ getConversationCompactionSettings }, { generateSmartSummary }] = await Promise.all([import("./conversation-compaction-DiG5zWQq.js"), import("./smart-compaction-CHIxLr_d.js")]);
|
|
6504
6523
|
const settings = getConversationCompactionSettings();
|
|
6505
6524
|
summary = (await Effect.runPromise(generateSmartSummary({
|
|
6506
6525
|
jsonlPath: sessionFile,
|
|
@@ -6511,7 +6530,7 @@ async function buildCompactRecoverySeed(agentId) {
|
|
|
6511
6530
|
} catch (err) {
|
|
6512
6531
|
logAgentLifecycleSync(normalizedId, `compact-recovery smart summary failed (${err instanceof Error ? err.message : String(err)}); trying heuristic fallback`);
|
|
6513
6532
|
try {
|
|
6514
|
-
const { generateFallbackSummary } = await import("./summary-fork-
|
|
6533
|
+
const { generateFallbackSummary } = await import("./summary-fork-D8bXjCr7.js");
|
|
6515
6534
|
summary = await Effect.runPromise(generateFallbackSummary(sessionFile));
|
|
6516
6535
|
} catch (fallbackErr) {
|
|
6517
6536
|
logAgentLifecycleSync(normalizedId, `compact-recovery fallback summary failed (${fallbackErr instanceof Error ? fallbackErr.message : String(fallbackErr)}); seeding with reseed instructions only`);
|
|
@@ -6543,7 +6562,7 @@ async function resumeAgent(agentId, message, opts) {
|
|
|
6543
6562
|
if (gateDecision.decision === "proceed" && gateDecision.warning) logAgentLifecycleSync(normalizedId, `resumeAgent: ${gateDecision.warning}`);
|
|
6544
6563
|
if (bypassTroubledGate) logAgentLifecycleSync(normalizedId, `resumeAgent: bypassing troubled gate for explicit compact recovery (${gateBlock?.reason})`);
|
|
6545
6564
|
const hasWorkspace = !!agentState?.workspace && existsSync(agentState.workspace);
|
|
6546
|
-
const isPlaceholder = !!agentState &&
|
|
6565
|
+
const isPlaceholder = !!agentState && typeof agentState.model === "string" && agentState.model.startsWith("pending-");
|
|
6547
6566
|
const allowedRuntimeStates = ["suspended", "idle"];
|
|
6548
6567
|
const allowedAgentStatuses = ["stopped", "completed"];
|
|
6549
6568
|
const isRunningOrStarting = agentState?.status === "running" || agentState?.status === "starting";
|
|
@@ -7141,7 +7160,7 @@ function generateRecoveryPrompt(state) {
|
|
|
7141
7160
|
`- Started: ${state.startedAt}`,
|
|
7142
7161
|
"",
|
|
7143
7162
|
"## Recovery Steps",
|
|
7144
|
-
"1. Check the
|
|
7163
|
+
"1. Check the xBRIEF task state: `pan task show " + state.issueId + " <item-id>`",
|
|
7145
7164
|
"2. Review recent git commits: `git log --oneline -10`",
|
|
7146
7165
|
"3. Check hook for pending work: `pan admin fpp check`",
|
|
7147
7166
|
"4. Resume from last known state",
|
|
@@ -7441,7 +7460,7 @@ var init_tier_escalation = __esmMin((() => {
|
|
|
7441
7460
|
* not to respond, so per-event output cost stays ~0 (NFR-1).
|
|
7442
7461
|
*/
|
|
7443
7462
|
async function runGitShow$1(workspace, sha, args = []) {
|
|
7444
|
-
const { stdout } = await execFileAsync$
|
|
7463
|
+
const { stdout } = await execFileAsync$5("git", [
|
|
7445
7464
|
"show",
|
|
7446
7465
|
sha,
|
|
7447
7466
|
...args
|
|
@@ -7555,12 +7574,12 @@ async function broadcastCommit(options) {
|
|
|
7555
7574
|
}
|
|
7556
7575
|
return deliveries;
|
|
7557
7576
|
}
|
|
7558
|
-
var execFileAsync$
|
|
7577
|
+
var execFileAsync$5, DEFAULT_FEED_CONFIG;
|
|
7559
7578
|
var init_tier_feed = __esmMin((() => {
|
|
7560
7579
|
init_delivery();
|
|
7561
7580
|
init_tier_metrics();
|
|
7562
7581
|
init_tier_table();
|
|
7563
|
-
execFileAsync$
|
|
7582
|
+
execFileAsync$5 = promisify(execFile);
|
|
7564
7583
|
DEFAULT_FEED_CONFIG = DEFAULT_TIERED_EXECUTION_CONFIG.feed;
|
|
7565
7584
|
}));
|
|
7566
7585
|
//#endregion
|
|
@@ -7680,7 +7699,7 @@ function childItems(item) {
|
|
|
7680
7699
|
return item.items ?? item.subItems ?? [];
|
|
7681
7700
|
}
|
|
7682
7701
|
/**
|
|
7683
|
-
* Pull the bead's acceptance-criterion titles from its
|
|
7702
|
+
* Pull the bead's acceptance-criterion titles from its xBRIEF child items
|
|
7684
7703
|
* (child metadata.kind === 'acceptance_criterion').
|
|
7685
7704
|
*/
|
|
7686
7705
|
function extractAcceptanceCriteria(item) {
|
|
@@ -7775,7 +7794,7 @@ Rules:
|
|
|
7775
7794
|
- Only review this commit against this bead's acceptance criteria — compile, lint, and tests are the verification gate's job, and code style is the review convoy's job.`;
|
|
7776
7795
|
}
|
|
7777
7796
|
async function getCommitDiff(workspacePath, sha) {
|
|
7778
|
-
const { stdout } = await execFileAsync$
|
|
7797
|
+
const { stdout } = await execFileAsync$4("git", ["show", sha], {
|
|
7779
7798
|
cwd: workspacePath,
|
|
7780
7799
|
encoding: "utf-8",
|
|
7781
7800
|
maxBuffer: 10 * 1024 * 1024
|
|
@@ -7784,7 +7803,7 @@ async function getCommitDiff(workspacePath, sha) {
|
|
|
7784
7803
|
}
|
|
7785
7804
|
/**
|
|
7786
7805
|
* Deliver one subscribed commit to the standing supervisor for review:
|
|
7787
|
-
* resolve the diff, pull the bead's acceptance criteria from its
|
|
7806
|
+
* resolve the diff, pull the bead's acceptance criteria from its xBRIEF item
|
|
7788
7807
|
* (plus traced FR text when metadata.traces is present and a PRD draft was
|
|
7789
7808
|
* provided), and send the composed review request via deliverAgentMessage.
|
|
7790
7809
|
*/
|
|
@@ -7805,13 +7824,13 @@ async function deliverCommitForReview(options) {
|
|
|
7805
7824
|
});
|
|
7806
7825
|
return deliver(options.supervisorAgentId, message, "tier-supervisor:verdict");
|
|
7807
7826
|
}
|
|
7808
|
-
var SUPERVISOR_SUB_ROLE, execFileAsync$
|
|
7827
|
+
var SUPERVISOR_SUB_ROLE, execFileAsync$4;
|
|
7809
7828
|
var init_tier_supervisor = __esmMin((() => {
|
|
7810
7829
|
init_delivery();
|
|
7811
7830
|
init_spawn_prep();
|
|
7812
7831
|
init_spawn();
|
|
7813
7832
|
SUPERVISOR_SUB_ROLE = "supervisor";
|
|
7814
|
-
execFileAsync$
|
|
7833
|
+
execFileAsync$4 = promisify(execFile);
|
|
7815
7834
|
}));
|
|
7816
7835
|
//#endregion
|
|
7817
7836
|
//#region ../../lib/agents/tier-replay.ts
|
|
@@ -7991,7 +8010,7 @@ async function loadReplayCommits(workspace, base, feedConfig, deps) {
|
|
|
7991
8010
|
return commits;
|
|
7992
8011
|
}
|
|
7993
8012
|
async function runGitLog(workspace, base) {
|
|
7994
|
-
const { stdout } = await execFileAsync("git", [
|
|
8013
|
+
const { stdout } = await execFileAsync$3("git", [
|
|
7995
8014
|
"log",
|
|
7996
8015
|
"--reverse",
|
|
7997
8016
|
"--format=%H%x00%s",
|
|
@@ -8010,7 +8029,7 @@ async function runGitLog(workspace, base) {
|
|
|
8010
8029
|
}).filter((entry) => entry.sha.trim().length > 0);
|
|
8011
8030
|
}
|
|
8012
8031
|
async function runGitShow(workspace, sha) {
|
|
8013
|
-
const { stdout } = await execFileAsync("git", ["show", sha], {
|
|
8032
|
+
const { stdout } = await execFileAsync$3("git", ["show", sha], {
|
|
8014
8033
|
cwd: workspace,
|
|
8015
8034
|
encoding: "utf-8",
|
|
8016
8035
|
maxBuffer: 16 * 1024 * 1024
|
|
@@ -8028,7 +8047,7 @@ function replayDeps(deps = {}) {
|
|
|
8028
8047
|
listSlotOwnership: deps.listSlotOwnership ?? listSlotOwnership
|
|
8029
8048
|
};
|
|
8030
8049
|
}
|
|
8031
|
-
var execFileAsync, DEFAULT_REPLAY_THRESHOLD;
|
|
8050
|
+
var execFileAsync$3, DEFAULT_REPLAY_THRESHOLD;
|
|
8032
8051
|
var init_tier_replay = __esmMin((() => {
|
|
8033
8052
|
init_model_capabilities();
|
|
8034
8053
|
init_delivery();
|
|
@@ -8040,7 +8059,7 @@ var init_tier_replay = __esmMin((() => {
|
|
|
8040
8059
|
init_tier_supervisor();
|
|
8041
8060
|
init_tier_table();
|
|
8042
8061
|
init_termination();
|
|
8043
|
-
execFileAsync = promisify(execFile);
|
|
8062
|
+
execFileAsync$3 = promisify(execFile);
|
|
8044
8063
|
DEFAULT_REPLAY_THRESHOLD = .5;
|
|
8045
8064
|
}));
|
|
8046
8065
|
//#endregion
|
|
@@ -8064,16 +8083,585 @@ var init_agents = __esmMin((() => {
|
|
|
8064
8083
|
init_tier_replay();
|
|
8065
8084
|
}));
|
|
8066
8085
|
//#endregion
|
|
8086
|
+
//#region ../../lib/system-health/types.ts
|
|
8087
|
+
function available(value) {
|
|
8088
|
+
return {
|
|
8089
|
+
status: "available",
|
|
8090
|
+
value
|
|
8091
|
+
};
|
|
8092
|
+
}
|
|
8093
|
+
function unavailable(reason) {
|
|
8094
|
+
return {
|
|
8095
|
+
status: "unavailable",
|
|
8096
|
+
reason
|
|
8097
|
+
};
|
|
8098
|
+
}
|
|
8099
|
+
var init_types = __esmMin((() => {}));
|
|
8100
|
+
//#endregion
|
|
8101
|
+
//#region ../../lib/system-health/darwin.ts
|
|
8102
|
+
function parseDarwinMemoryPressure(content) {
|
|
8103
|
+
for (const pattern of [/System-wide memory free percentage:\s*([\d.]+)\s*%/i, /System-wide memory free percentage\s*=\s*([\d.]+)\s*%?/i]) {
|
|
8104
|
+
const match = content.match(pattern);
|
|
8105
|
+
if (!match) continue;
|
|
8106
|
+
const value = Number(match[1]);
|
|
8107
|
+
if (Number.isFinite(value) && value >= 0 && value <= 100) return value;
|
|
8108
|
+
}
|
|
8109
|
+
return null;
|
|
8110
|
+
}
|
|
8111
|
+
function parseDarwinVmStat(content) {
|
|
8112
|
+
const pageSizeMatch = content.match(/page size of\s+(\d+)\s+bytes/i);
|
|
8113
|
+
if (!pageSizeMatch) return null;
|
|
8114
|
+
const pageSizeBytes = Number(pageSizeMatch[1]);
|
|
8115
|
+
if (!Number.isFinite(pageSizeBytes) || pageSizeBytes <= 0) return null;
|
|
8116
|
+
const pages = /* @__PURE__ */ new Map();
|
|
8117
|
+
for (const line of content.split("\n")) {
|
|
8118
|
+
const match = line.match(/^([^:]+):\s+(\d+)\.?$/);
|
|
8119
|
+
if (!match) continue;
|
|
8120
|
+
const value = Number(match[2]);
|
|
8121
|
+
if (Number.isFinite(value)) pages.set(match[1].trim(), value);
|
|
8122
|
+
}
|
|
8123
|
+
const availablePageNames = [
|
|
8124
|
+
"Pages free",
|
|
8125
|
+
"Pages inactive",
|
|
8126
|
+
"Pages speculative"
|
|
8127
|
+
];
|
|
8128
|
+
const availablePages = availablePageNames.every((name) => pages.has(name)) ? availablePageNames.reduce((sum, name) => sum + pages.get(name), 0) : void 0;
|
|
8129
|
+
const swapIn = pages.get("Swapins");
|
|
8130
|
+
const swapOut = pages.get("Swapouts");
|
|
8131
|
+
return {
|
|
8132
|
+
pageSizeBytes,
|
|
8133
|
+
availableMemoryBytes: availablePages == null ? void 0 : availablePages * pageSizeBytes,
|
|
8134
|
+
swap: swapIn == null || swapOut == null ? void 0 : {
|
|
8135
|
+
pagesIn: swapIn,
|
|
8136
|
+
pagesOut: swapOut
|
|
8137
|
+
}
|
|
8138
|
+
};
|
|
8139
|
+
}
|
|
8140
|
+
function unitBytes(value, unit) {
|
|
8141
|
+
const parsed = Number(value);
|
|
8142
|
+
if (!Number.isFinite(parsed) || parsed < 0) return null;
|
|
8143
|
+
const multiplier = unit.toUpperCase() === "G" ? 1024 ** 3 : unit.toUpperCase() === "K" ? 1024 : MIB;
|
|
8144
|
+
return Math.round(parsed * multiplier);
|
|
8145
|
+
}
|
|
8146
|
+
function parseDarwinSwapUsage(content) {
|
|
8147
|
+
const total = content.match(/total\s*=\s*([\d.]+)([KMG])/i);
|
|
8148
|
+
const used = content.match(/used\s*=\s*([\d.]+)([KMG])/i);
|
|
8149
|
+
const free = content.match(/free\s*=\s*([\d.]+)([KMG])/i);
|
|
8150
|
+
if (!total || !used || !free) return null;
|
|
8151
|
+
const totalBytes = unitBytes(total[1], total[2]);
|
|
8152
|
+
const usedBytes = unitBytes(used[1], used[2]);
|
|
8153
|
+
const freeBytes = unitBytes(free[1], free[2]);
|
|
8154
|
+
return totalBytes == null || usedBytes == null || freeBytes == null ? null : {
|
|
8155
|
+
totalBytes,
|
|
8156
|
+
usedBytes,
|
|
8157
|
+
freeBytes
|
|
8158
|
+
};
|
|
8159
|
+
}
|
|
8160
|
+
function aggregateDarwinCpuCounters(cpuInfo) {
|
|
8161
|
+
if (cpuInfo.length === 0) return null;
|
|
8162
|
+
let idle = 0;
|
|
8163
|
+
let total = 0;
|
|
8164
|
+
for (const cpu of cpuInfo) {
|
|
8165
|
+
const values = Object.values(cpu.times);
|
|
8166
|
+
if (values.some((value) => !Number.isFinite(value) || value < 0)) return null;
|
|
8167
|
+
idle += cpu.times.idle;
|
|
8168
|
+
total += values.reduce((sum, value) => sum + value, 0);
|
|
8169
|
+
}
|
|
8170
|
+
return {
|
|
8171
|
+
idle,
|
|
8172
|
+
total
|
|
8173
|
+
};
|
|
8174
|
+
}
|
|
8175
|
+
function computeCpuPercent$1(current, previous) {
|
|
8176
|
+
if (!previous) return unavailable("A previous CPU time sample is required.");
|
|
8177
|
+
const totalDelta = current.total - previous.total;
|
|
8178
|
+
const idleDelta = current.idle - previous.idle;
|
|
8179
|
+
if (totalDelta <= 0 || idleDelta < 0 || idleDelta > totalDelta) return unavailable("CPU times did not advance monotonically.");
|
|
8180
|
+
return available(Math.round((totalDelta - idleDelta) / totalDelta * 1e3) / 10);
|
|
8181
|
+
}
|
|
8182
|
+
function computeSwapActivity(current, previous, elapsedMs, pageSizeBytes) {
|
|
8183
|
+
if (!previous) return unavailable("A previous swap counter sample is required.");
|
|
8184
|
+
const pages = current.pagesIn - previous.pagesIn + current.pagesOut - previous.pagesOut;
|
|
8185
|
+
if (pages < 0 || elapsedMs <= 0) return unavailable("Swap counters or sample timing were invalid.");
|
|
8186
|
+
return available(Math.round(pages * pageSizeBytes * 6e4 / elapsedMs));
|
|
8187
|
+
}
|
|
8188
|
+
function percent$1(part, total) {
|
|
8189
|
+
if (total <= 0) return 0;
|
|
8190
|
+
return Math.round(part / total * 1e3) / 10;
|
|
8191
|
+
}
|
|
8192
|
+
async function command(adapters, executable, args) {
|
|
8193
|
+
try {
|
|
8194
|
+
return await adapters.execFile(executable, args, COMMAND_TIMEOUT_MS);
|
|
8195
|
+
} catch {
|
|
8196
|
+
return null;
|
|
8197
|
+
}
|
|
8198
|
+
}
|
|
8199
|
+
function createDarwinHostHealthCollector(adapters = defaultAdapters$1) {
|
|
8200
|
+
return {
|
|
8201
|
+
platform: "darwin",
|
|
8202
|
+
async sample(previous) {
|
|
8203
|
+
const sampledAtMs = adapters.now();
|
|
8204
|
+
const [pressureOutput, vmStatOutput, swapOutput] = await Promise.all([
|
|
8205
|
+
command(adapters, "memory_pressure", ["-Q"]),
|
|
8206
|
+
command(adapters, "vm_stat", []),
|
|
8207
|
+
command(adapters, "sysctl", ["-n", "vm.swapusage"])
|
|
8208
|
+
]);
|
|
8209
|
+
const pressureFreePercent = pressureOutput == null ? null : parseDarwinMemoryPressure(pressureOutput);
|
|
8210
|
+
const vmStat = vmStatOutput == null ? null : parseDarwinVmStat(vmStatOutput);
|
|
8211
|
+
const swapUsage = swapOutput == null ? null : parseDarwinSwapUsage(swapOutput);
|
|
8212
|
+
const cpuInfo = adapters.cpus();
|
|
8213
|
+
const cpuCounters = aggregateDarwinCpuCounters(cpuInfo);
|
|
8214
|
+
const totalMemoryBytes = adapters.totalMemoryBytes();
|
|
8215
|
+
const availableMemoryBytes = pressureFreePercent != null ? Math.round(totalMemoryBytes * pressureFreePercent / 100) : vmStat?.availableMemoryBytes ?? null;
|
|
8216
|
+
const usedMemoryBytes = Number.isFinite(totalMemoryBytes) && availableMemoryBytes != null ? Math.max(totalMemoryBytes - availableMemoryBytes, 0) : null;
|
|
8217
|
+
const loadAverage1m = adapters.loadAverage1m();
|
|
8218
|
+
const elapsedMs = previous ? sampledAtMs - previous.sampledAtMs : 0;
|
|
8219
|
+
return {
|
|
8220
|
+
platform: "darwin",
|
|
8221
|
+
sampledAtMs,
|
|
8222
|
+
cpuPercent: cpuCounters ? computeCpuPercent$1(cpuCounters, previous?.counters.cpu) : unavailable("macOS CPU times are unavailable."),
|
|
8223
|
+
loadAverage1m: Number.isFinite(loadAverage1m) && loadAverage1m >= 0 ? available(loadAverage1m) : unavailable("The one-minute load average is unavailable."),
|
|
8224
|
+
loadPerCore1m: Number.isFinite(loadAverage1m) && loadAverage1m >= 0 && cpuInfo.length > 0 ? available(Math.round(loadAverage1m / cpuInfo.length * 100) / 100) : unavailable("Load average or CPU core count is unavailable."),
|
|
8225
|
+
totalMemoryBytes: Number.isFinite(totalMemoryBytes) && totalMemoryBytes > 0 ? available(totalMemoryBytes) : unavailable("Total memory is unavailable."),
|
|
8226
|
+
usedMemoryBytes: usedMemoryBytes == null ? unavailable("Used memory cannot be derived.") : available(usedMemoryBytes),
|
|
8227
|
+
availableMemoryBytes: availableMemoryBytes == null ? unavailable("Available memory is unavailable.") : available(availableMemoryBytes),
|
|
8228
|
+
memoryUsedPercent: usedMemoryBytes == null ? unavailable("Memory utilization cannot be derived.") : available(percent$1(usedMemoryBytes, totalMemoryBytes)),
|
|
8229
|
+
memoryPressureSomeAvg10: unavailable("macOS does not expose Linux memory PSI."),
|
|
8230
|
+
memoryPressureFullAvg10: unavailable("macOS does not expose Linux memory PSI."),
|
|
8231
|
+
memoryPressureFreePercent: pressureFreePercent == null ? unavailable("memory_pressure did not report a recognized free percentage.") : available(pressureFreePercent),
|
|
8232
|
+
swapTotalBytes: swapUsage ? available(swapUsage.totalBytes) : unavailable("vm.swapusage is unavailable."),
|
|
8233
|
+
swapUsedBytes: swapUsage ? available(swapUsage.usedBytes) : unavailable("vm.swapusage is unavailable."),
|
|
8234
|
+
swapUsedPercent: swapUsage ? available(percent$1(swapUsage.usedBytes, swapUsage.totalBytes)) : unavailable("vm.swapusage is unavailable."),
|
|
8235
|
+
swapActivityBytesPerMinute: vmStat?.swap ? computeSwapActivity(vmStat.swap, previous?.counters.swap, elapsedMs, vmStat.pageSizeBytes) : unavailable("vm_stat swap activity counters are unavailable."),
|
|
8236
|
+
committedMemoryBytes: unavailable("macOS does not expose Linux Committed_AS."),
|
|
8237
|
+
commitLimitBytes: unavailable("macOS does not expose Linux CommitLimit."),
|
|
8238
|
+
virtualCommitmentPercent: unavailable("macOS virtual commitment is unavailable."),
|
|
8239
|
+
counters: {
|
|
8240
|
+
cpu: cpuCounters,
|
|
8241
|
+
swap: vmStat?.swap ?? null
|
|
8242
|
+
}
|
|
8243
|
+
};
|
|
8244
|
+
}
|
|
8245
|
+
};
|
|
8246
|
+
}
|
|
8247
|
+
var execFileAsync$2, COMMAND_TIMEOUT_MS, MIB, DARWIN_MEMORY_PRESSURE_DEFAULTS, defaultAdapters$1;
|
|
8248
|
+
var init_darwin = __esmMin((() => {
|
|
8249
|
+
init_types();
|
|
8250
|
+
execFileAsync$2 = promisify(execFile);
|
|
8251
|
+
COMMAND_TIMEOUT_MS = 5e3;
|
|
8252
|
+
MIB = 1024 ** 2;
|
|
8253
|
+
DARWIN_MEMORY_PRESSURE_DEFAULTS = Object.freeze({
|
|
8254
|
+
warningFreePercent: 10,
|
|
8255
|
+
criticalFreePercent: 5,
|
|
8256
|
+
swapActivityWarningBytesPerMinute: 64 * MIB,
|
|
8257
|
+
swapActivityCriticalBytesPerMinute: 256 * MIB
|
|
8258
|
+
});
|
|
8259
|
+
defaultAdapters$1 = {
|
|
8260
|
+
execFile: async (command, args, timeoutMs) => {
|
|
8261
|
+
const { stdout } = await execFileAsync$2(command, [...args], {
|
|
8262
|
+
encoding: "utf-8",
|
|
8263
|
+
timeout: timeoutMs
|
|
8264
|
+
});
|
|
8265
|
+
return stdout;
|
|
8266
|
+
},
|
|
8267
|
+
cpus: cpus$1,
|
|
8268
|
+
loadAverage1m: () => loadavg$1()[0] ?? 0,
|
|
8269
|
+
totalMemoryBytes: totalmem$1,
|
|
8270
|
+
now: () => Date.now()
|
|
8271
|
+
};
|
|
8272
|
+
}));
|
|
8273
|
+
//#endregion
|
|
8274
|
+
//#region ../../lib/system-health/linux.ts
|
|
8275
|
+
function parseMemInfo(content) {
|
|
8276
|
+
const values = /* @__PURE__ */ new Map();
|
|
8277
|
+
for (const line of content.split("\n")) {
|
|
8278
|
+
const match = line.match(/^(\w+):\s+(\d+)\s+kB$/);
|
|
8279
|
+
if (!match) continue;
|
|
8280
|
+
const value = Number(match[2]);
|
|
8281
|
+
if (Number.isFinite(value)) values.set(match[1], value * KB);
|
|
8282
|
+
}
|
|
8283
|
+
return {
|
|
8284
|
+
memTotalBytes: values.get("MemTotal"),
|
|
8285
|
+
memAvailableBytes: values.get("MemAvailable"),
|
|
8286
|
+
swapTotalBytes: values.get("SwapTotal"),
|
|
8287
|
+
swapFreeBytes: values.get("SwapFree"),
|
|
8288
|
+
committedMemoryBytes: values.get("Committed_AS"),
|
|
8289
|
+
commitLimitBytes: values.get("CommitLimit")
|
|
8290
|
+
};
|
|
8291
|
+
}
|
|
8292
|
+
function parseProcStat(content) {
|
|
8293
|
+
const lines = content.split("\n");
|
|
8294
|
+
const cpuLine = lines.find((line) => line.startsWith("cpu "));
|
|
8295
|
+
if (!cpuLine) return null;
|
|
8296
|
+
const values = cpuLine.trim().split(/\s+/).slice(1).map(Number);
|
|
8297
|
+
if (values.length < 4 || values.some((value) => !Number.isFinite(value))) return null;
|
|
8298
|
+
const idle = values[3] + (values[4] ?? 0);
|
|
8299
|
+
const total = values.reduce((sum, value) => sum + value, 0);
|
|
8300
|
+
const coreCount = lines.filter((line) => /^cpu\d+\s/.test(line)).length;
|
|
8301
|
+
if (total < 0 || idle < 0) return null;
|
|
8302
|
+
return {
|
|
8303
|
+
cpu: {
|
|
8304
|
+
idle,
|
|
8305
|
+
total
|
|
8306
|
+
},
|
|
8307
|
+
coreCount: Math.max(coreCount, 1)
|
|
8308
|
+
};
|
|
8309
|
+
}
|
|
8310
|
+
function parseMemoryPressure(content) {
|
|
8311
|
+
const result = {};
|
|
8312
|
+
for (const line of content.split("\n")) {
|
|
8313
|
+
const match = line.match(/^(some|full)\s+.*\bavg10=([^\s]+)/);
|
|
8314
|
+
if (!match) continue;
|
|
8315
|
+
const value = Number(match[2]);
|
|
8316
|
+
if (!Number.isFinite(value) || value < 0) continue;
|
|
8317
|
+
if (match[1] === "some") result.someAvg10 = value;
|
|
8318
|
+
if (match[1] === "full") result.fullAvg10 = value;
|
|
8319
|
+
}
|
|
8320
|
+
return result;
|
|
8321
|
+
}
|
|
8322
|
+
function parseVmstat(content) {
|
|
8323
|
+
let pagesIn = null;
|
|
8324
|
+
let pagesOut = null;
|
|
8325
|
+
for (const line of content.split("\n")) {
|
|
8326
|
+
const match = line.match(/^(pswpin|pswpout)\s+(\d+)$/);
|
|
8327
|
+
if (!match) continue;
|
|
8328
|
+
const value = Number(match[2]);
|
|
8329
|
+
if (!Number.isFinite(value)) continue;
|
|
8330
|
+
if (match[1] === "pswpin") pagesIn = value;
|
|
8331
|
+
if (match[1] === "pswpout") pagesOut = value;
|
|
8332
|
+
}
|
|
8333
|
+
return pagesIn == null || pagesOut == null ? null : {
|
|
8334
|
+
pagesIn,
|
|
8335
|
+
pagesOut
|
|
8336
|
+
};
|
|
8337
|
+
}
|
|
8338
|
+
function parseLoadAverage(content) {
|
|
8339
|
+
const value = Number(content.trim().split(/\s+/)[0]);
|
|
8340
|
+
return Number.isFinite(value) && value >= 0 ? value : null;
|
|
8341
|
+
}
|
|
8342
|
+
function computeCpuPercent(current, previous) {
|
|
8343
|
+
if (!previous) return unavailable("A previous CPU counter sample is required.");
|
|
8344
|
+
const totalDelta = current.total - previous.total;
|
|
8345
|
+
const idleDelta = current.idle - previous.idle;
|
|
8346
|
+
if (totalDelta <= 0 || idleDelta < 0 || idleDelta > totalDelta) return unavailable("CPU counters did not advance monotonically.");
|
|
8347
|
+
return available(Math.round((totalDelta - idleDelta) / totalDelta * 1e3) / 10);
|
|
8348
|
+
}
|
|
8349
|
+
function computeSwapActivityBytesPerMinute(current, previous, elapsedMs, pageSizeBytes) {
|
|
8350
|
+
if (!previous) return unavailable("A previous swap counter sample is required.");
|
|
8351
|
+
const pageDelta = current.pagesIn - previous.pagesIn + current.pagesOut - previous.pagesOut;
|
|
8352
|
+
if (pageDelta < 0 || elapsedMs <= 0 || !Number.isFinite(pageSizeBytes) || pageSizeBytes <= 0) return unavailable("Swap counters or sample timing were invalid.");
|
|
8353
|
+
return available(Math.round(pageDelta * pageSizeBytes * 6e4 / elapsedMs));
|
|
8354
|
+
}
|
|
8355
|
+
async function readParsed(adapters, path, parse) {
|
|
8356
|
+
try {
|
|
8357
|
+
return parse(await adapters.readFile(path));
|
|
8358
|
+
} catch {
|
|
8359
|
+
return null;
|
|
8360
|
+
}
|
|
8361
|
+
}
|
|
8362
|
+
function percent(part, total) {
|
|
8363
|
+
if (total <= 0) return 0;
|
|
8364
|
+
return Math.round(part / total * 1e3) / 10;
|
|
8365
|
+
}
|
|
8366
|
+
function createLinuxHostHealthCollector(adapters = defaultAdapters) {
|
|
8367
|
+
return {
|
|
8368
|
+
platform: "linux",
|
|
8369
|
+
async sample(previous) {
|
|
8370
|
+
const sampledAtMs = adapters.now();
|
|
8371
|
+
const [memInfo, procStat, pressure, vmstat, loadAverage, pageSizeBytes] = await Promise.all([
|
|
8372
|
+
readParsed(adapters, "/proc/meminfo", parseMemInfo),
|
|
8373
|
+
readParsed(adapters, "/proc/stat", parseProcStat),
|
|
8374
|
+
readParsed(adapters, "/proc/pressure/memory", parseMemoryPressure),
|
|
8375
|
+
readParsed(adapters, "/proc/vmstat", parseVmstat),
|
|
8376
|
+
readParsed(adapters, "/proc/loadavg", parseLoadAverage),
|
|
8377
|
+
adapters.readPageSizeBytes().catch(() => null)
|
|
8378
|
+
]);
|
|
8379
|
+
const totalMemoryBytes = memInfo?.memTotalBytes;
|
|
8380
|
+
const availableMemoryBytes = memInfo?.memAvailableBytes;
|
|
8381
|
+
const usedMemoryBytes = totalMemoryBytes != null && availableMemoryBytes != null ? Math.max(totalMemoryBytes - availableMemoryBytes, 0) : null;
|
|
8382
|
+
const swapTotalBytes = memInfo?.swapTotalBytes;
|
|
8383
|
+
const swapFreeBytes = memInfo?.swapFreeBytes;
|
|
8384
|
+
const swapUsedBytes = swapTotalBytes != null && swapFreeBytes != null ? Math.max(swapTotalBytes - swapFreeBytes, 0) : null;
|
|
8385
|
+
const committedMemoryBytes = memInfo?.committedMemoryBytes;
|
|
8386
|
+
const commitLimitBytes = memInfo?.commitLimitBytes;
|
|
8387
|
+
const cpuCounters = procStat?.cpu ?? null;
|
|
8388
|
+
const swapCounters = vmstat ?? null;
|
|
8389
|
+
const elapsedMs = previous ? sampledAtMs - previous.sampledAtMs : 0;
|
|
8390
|
+
return {
|
|
8391
|
+
platform: "linux",
|
|
8392
|
+
sampledAtMs,
|
|
8393
|
+
cpuPercent: cpuCounters ? computeCpuPercent(cpuCounters, previous?.counters.cpu) : unavailable("The aggregate CPU counters are unavailable."),
|
|
8394
|
+
loadAverage1m: loadAverage == null ? unavailable("The one-minute load average is unavailable.") : available(loadAverage),
|
|
8395
|
+
loadPerCore1m: loadAverage == null || !procStat ? unavailable("Load average or CPU core count is unavailable.") : available(Math.round(loadAverage / procStat.coreCount * 100) / 100),
|
|
8396
|
+
totalMemoryBytes: totalMemoryBytes == null ? unavailable("MemTotal is unavailable.") : available(totalMemoryBytes),
|
|
8397
|
+
usedMemoryBytes: usedMemoryBytes == null ? unavailable("Used memory cannot be derived without MemTotal and MemAvailable.") : available(usedMemoryBytes),
|
|
8398
|
+
availableMemoryBytes: availableMemoryBytes == null ? unavailable("MemAvailable is unavailable.") : available(availableMemoryBytes),
|
|
8399
|
+
memoryUsedPercent: usedMemoryBytes == null || totalMemoryBytes == null ? unavailable("Memory utilization cannot be derived.") : available(percent(usedMemoryBytes, totalMemoryBytes)),
|
|
8400
|
+
memoryPressureSomeAvg10: pressure?.someAvg10 == null ? unavailable("Linux memory PSI some.avg10 is unavailable.") : available(pressure.someAvg10),
|
|
8401
|
+
memoryPressureFullAvg10: pressure?.fullAvg10 == null ? unavailable("Linux memory PSI full.avg10 is unavailable.") : available(pressure.fullAvg10),
|
|
8402
|
+
memoryPressureFreePercent: unavailable("Linux reports memory pressure through PSI."),
|
|
8403
|
+
swapTotalBytes: swapTotalBytes == null ? unavailable("SwapTotal is unavailable.") : available(swapTotalBytes),
|
|
8404
|
+
swapUsedBytes: swapUsedBytes == null ? unavailable("Swap usage cannot be derived without SwapTotal and SwapFree.") : available(swapUsedBytes),
|
|
8405
|
+
swapUsedPercent: swapUsedBytes == null || swapTotalBytes == null ? unavailable("Swap utilization cannot be derived.") : available(percent(swapUsedBytes, swapTotalBytes)),
|
|
8406
|
+
swapActivityBytesPerMinute: swapCounters && pageSizeBytes != null ? computeSwapActivityBytesPerMinute(swapCounters, previous?.counters.swap, elapsedMs, pageSizeBytes) : unavailable("Linux swap activity counters are unavailable."),
|
|
8407
|
+
committedMemoryBytes: committedMemoryBytes == null ? unavailable("Committed_AS is unavailable.") : available(committedMemoryBytes),
|
|
8408
|
+
commitLimitBytes: commitLimitBytes == null ? unavailable("CommitLimit is unavailable.") : available(commitLimitBytes),
|
|
8409
|
+
virtualCommitmentPercent: committedMemoryBytes == null || commitLimitBytes == null ? unavailable("Virtual commitment cannot be derived.") : available(percent(committedMemoryBytes, commitLimitBytes)),
|
|
8410
|
+
counters: {
|
|
8411
|
+
cpu: cpuCounters,
|
|
8412
|
+
swap: swapCounters
|
|
8413
|
+
}
|
|
8414
|
+
};
|
|
8415
|
+
}
|
|
8416
|
+
};
|
|
8417
|
+
}
|
|
8418
|
+
var execFileAsync$1, KB, LINUX_MEMORY_PRESSURE_DEFAULTS, defaultAdapters;
|
|
8419
|
+
var init_linux = __esmMin((() => {
|
|
8420
|
+
init_types();
|
|
8421
|
+
execFileAsync$1 = promisify(execFile);
|
|
8422
|
+
KB = 1024;
|
|
8423
|
+
LINUX_MEMORY_PRESSURE_DEFAULTS = Object.freeze({
|
|
8424
|
+
someWarningAvg10: 5,
|
|
8425
|
+
fullCriticalAvg10: 1,
|
|
8426
|
+
swapActivityWarningBytesPerMinute: 64 * 1024 ** 2,
|
|
8427
|
+
swapActivityCriticalBytesPerMinute: 256 * 1024 ** 2
|
|
8428
|
+
});
|
|
8429
|
+
defaultAdapters = {
|
|
8430
|
+
readFile: (path) => readFile(path, "utf-8"),
|
|
8431
|
+
readPageSizeBytes: async () => {
|
|
8432
|
+
const { stdout } = await execFileAsync$1("getconf", ["PAGESIZE"], {
|
|
8433
|
+
encoding: "utf-8",
|
|
8434
|
+
timeout: 5e3
|
|
8435
|
+
});
|
|
8436
|
+
const value = Number(stdout.trim());
|
|
8437
|
+
if (!Number.isFinite(value) || value <= 0) throw new Error("getconf returned an invalid page size");
|
|
8438
|
+
return value;
|
|
8439
|
+
},
|
|
8440
|
+
now: () => Date.now()
|
|
8441
|
+
};
|
|
8442
|
+
}));
|
|
8443
|
+
//#endregion
|
|
8444
|
+
//#region ../../lib/system-health/collector.ts
|
|
8445
|
+
/**
|
|
8446
|
+
* Selects the platform host-health collector. Linux and macOS expose native
|
|
8447
|
+
* current-pressure signals; unsupported platforms return unavailable signals
|
|
8448
|
+
* so callers never mistake missing measurements for measured zeroes.
|
|
8449
|
+
*/
|
|
8450
|
+
function buildProcessTreeIndex(rows) {
|
|
8451
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
8452
|
+
for (const row of rows) {
|
|
8453
|
+
const children = childrenByParent.get(row.ppid);
|
|
8454
|
+
if (children) children.push(row.pid);
|
|
8455
|
+
else childrenByParent.set(row.ppid, [row.pid]);
|
|
8456
|
+
}
|
|
8457
|
+
return { childrenByParent };
|
|
8458
|
+
}
|
|
8459
|
+
function collectDescendantPids(rootPid, index) {
|
|
8460
|
+
const descendants = /* @__PURE__ */ new Set();
|
|
8461
|
+
const queue = [rootPid];
|
|
8462
|
+
while (queue.length > 0) {
|
|
8463
|
+
const pid = queue.shift();
|
|
8464
|
+
if (pid == null || descendants.has(pid)) continue;
|
|
8465
|
+
descendants.add(pid);
|
|
8466
|
+
queue.push(...index.childrenByParent.get(pid) ?? []);
|
|
8467
|
+
}
|
|
8468
|
+
return descendants;
|
|
8469
|
+
}
|
|
8470
|
+
function createUnsupportedCollector(platform = "unsupported") {
|
|
8471
|
+
const signal = () => unavailable("Host health collection is unsupported on this platform.");
|
|
8472
|
+
return {
|
|
8473
|
+
platform,
|
|
8474
|
+
async sample() {
|
|
8475
|
+
return {
|
|
8476
|
+
platform,
|
|
8477
|
+
sampledAtMs: Date.now(),
|
|
8478
|
+
cpuPercent: signal(),
|
|
8479
|
+
loadAverage1m: signal(),
|
|
8480
|
+
loadPerCore1m: signal(),
|
|
8481
|
+
totalMemoryBytes: signal(),
|
|
8482
|
+
usedMemoryBytes: signal(),
|
|
8483
|
+
availableMemoryBytes: signal(),
|
|
8484
|
+
memoryUsedPercent: signal(),
|
|
8485
|
+
memoryPressureSomeAvg10: signal(),
|
|
8486
|
+
memoryPressureFullAvg10: signal(),
|
|
8487
|
+
memoryPressureFreePercent: signal(),
|
|
8488
|
+
swapTotalBytes: signal(),
|
|
8489
|
+
swapUsedBytes: signal(),
|
|
8490
|
+
swapUsedPercent: signal(),
|
|
8491
|
+
swapActivityBytesPerMinute: signal(),
|
|
8492
|
+
committedMemoryBytes: signal(),
|
|
8493
|
+
commitLimitBytes: signal(),
|
|
8494
|
+
virtualCommitmentPercent: signal(),
|
|
8495
|
+
counters: {
|
|
8496
|
+
cpu: null,
|
|
8497
|
+
swap: null
|
|
8498
|
+
}
|
|
8499
|
+
};
|
|
8500
|
+
}
|
|
8501
|
+
};
|
|
8502
|
+
}
|
|
8503
|
+
function createHostHealthCollector(selection = {}) {
|
|
8504
|
+
const platform = selection.platform ?? platform$1();
|
|
8505
|
+
if (platform === "linux") return selection.linux ?? createLinuxHostHealthCollector();
|
|
8506
|
+
if (platform === "darwin") return selection.darwin ?? createDarwinHostHealthCollector();
|
|
8507
|
+
return createUnsupportedCollector();
|
|
8508
|
+
}
|
|
8509
|
+
var init_collector = __esmMin((() => {
|
|
8510
|
+
init_darwin();
|
|
8511
|
+
init_linux();
|
|
8512
|
+
init_types();
|
|
8513
|
+
}));
|
|
8514
|
+
//#endregion
|
|
8515
|
+
//#region ../../lib/runtime-census.ts
|
|
8516
|
+
function parseRuntimeProcessTable(output) {
|
|
8517
|
+
return output.split("\n").flatMap((line) => {
|
|
8518
|
+
const match = line.trim().match(/^(\d+)\s+(\d+)\s+([0-9.]+)\s+(\d+)\s+(\S+)(?:\s+(.*))?$/);
|
|
8519
|
+
if (!match) return [];
|
|
8520
|
+
const pid = Number(match[1]);
|
|
8521
|
+
const ppid = Number(match[2]);
|
|
8522
|
+
const cpuPercent = Number(match[3]);
|
|
8523
|
+
const rssKb = Number(match[4]);
|
|
8524
|
+
if (![
|
|
8525
|
+
pid,
|
|
8526
|
+
ppid,
|
|
8527
|
+
cpuPercent,
|
|
8528
|
+
rssKb
|
|
8529
|
+
].every(Number.isFinite)) return [];
|
|
8530
|
+
return [{
|
|
8531
|
+
pid,
|
|
8532
|
+
ppid,
|
|
8533
|
+
cpuPercent,
|
|
8534
|
+
rssBytes: rssKb * 1024,
|
|
8535
|
+
comm: match[5] ?? "",
|
|
8536
|
+
command: match[6] ?? match[5] ?? ""
|
|
8537
|
+
}];
|
|
8538
|
+
});
|
|
8539
|
+
}
|
|
8540
|
+
async function readRuntimeProcessTable() {
|
|
8541
|
+
const { stdout } = await execFileAsync("ps", ["-eo", "pid=,ppid=,pcpu=,rss=,comm=,args="], {
|
|
8542
|
+
encoding: "utf8",
|
|
8543
|
+
timeout: 1e4
|
|
8544
|
+
});
|
|
8545
|
+
return parseRuntimeProcessTable(String(stdout));
|
|
8546
|
+
}
|
|
8547
|
+
function buildRuntimeCensus(panes, processes, sampledAt, options) {
|
|
8548
|
+
const panesBySession = /* @__PURE__ */ new Map();
|
|
8549
|
+
for (const pane of panes) {
|
|
8550
|
+
const sessionPanes = panesBySession.get(pane.sessionName);
|
|
8551
|
+
if (sessionPanes) sessionPanes.push(pane);
|
|
8552
|
+
else panesBySession.set(pane.sessionName, [pane]);
|
|
8553
|
+
}
|
|
8554
|
+
const processesByPid = new Map(processes.map((process) => [process.pid, process]));
|
|
8555
|
+
return {
|
|
8556
|
+
sampledAt,
|
|
8557
|
+
available: options.tmuxAvailable,
|
|
8558
|
+
tmuxAvailable: options.tmuxAvailable,
|
|
8559
|
+
processAvailable: options.processAvailable,
|
|
8560
|
+
stale: options.stale ?? false,
|
|
8561
|
+
error: options.error ?? null,
|
|
8562
|
+
panes,
|
|
8563
|
+
sessionNames: new Set(panesBySession.keys()),
|
|
8564
|
+
panesBySession,
|
|
8565
|
+
processesByPid,
|
|
8566
|
+
processTree: buildProcessTreeIndex(processes)
|
|
8567
|
+
};
|
|
8568
|
+
}
|
|
8569
|
+
function createRuntimeCensusService(deps) {
|
|
8570
|
+
const now = deps.now ?? Date.now;
|
|
8571
|
+
const ttlMs = deps.ttlMs ?? 3e3;
|
|
8572
|
+
let snapshot = null;
|
|
8573
|
+
let inFlight = null;
|
|
8574
|
+
const refresh = () => {
|
|
8575
|
+
if (inFlight) return inFlight;
|
|
8576
|
+
inFlight = Promise.allSettled([deps.listPanes(), deps.readProcesses()]).then(([panesResult, processesResult]) => {
|
|
8577
|
+
const errors = [];
|
|
8578
|
+
if (panesResult.status === "rejected") errors.push(panesResult.reason instanceof Error ? panesResult.reason.message : String(panesResult.reason));
|
|
8579
|
+
if (processesResult.status === "rejected") errors.push(processesResult.reason instanceof Error ? processesResult.reason.message : String(processesResult.reason));
|
|
8580
|
+
snapshot = buildRuntimeCensus(panesResult.status === "fulfilled" ? panesResult.value : snapshot?.panes ?? [], processesResult.status === "fulfilled" ? processesResult.value : [...snapshot?.processesByPid.values() ?? []], now(), {
|
|
8581
|
+
tmuxAvailable: panesResult.status === "fulfilled",
|
|
8582
|
+
processAvailable: processesResult.status === "fulfilled",
|
|
8583
|
+
stale: errors.length > 0,
|
|
8584
|
+
error: errors.length > 0 ? errors.join("; ") : null
|
|
8585
|
+
});
|
|
8586
|
+
return snapshot;
|
|
8587
|
+
}).finally(() => {
|
|
8588
|
+
inFlight = null;
|
|
8589
|
+
});
|
|
8590
|
+
return inFlight;
|
|
8591
|
+
};
|
|
8592
|
+
return {
|
|
8593
|
+
get(options) {
|
|
8594
|
+
if (!options?.fresh && snapshot && now() - snapshot.sampledAt < ttlMs) return Promise.resolve(snapshot);
|
|
8595
|
+
return refresh();
|
|
8596
|
+
},
|
|
8597
|
+
peek() {
|
|
8598
|
+
return snapshot;
|
|
8599
|
+
},
|
|
8600
|
+
reset() {
|
|
8601
|
+
snapshot = null;
|
|
8602
|
+
inFlight = null;
|
|
8603
|
+
}
|
|
8604
|
+
};
|
|
8605
|
+
}
|
|
8606
|
+
function getRuntimeCensus(options) {
|
|
8607
|
+
return runtimeCensusService.get(options);
|
|
8608
|
+
}
|
|
8609
|
+
function refreshRuntimeCensus() {
|
|
8610
|
+
return runtimeCensusService.get({ fresh: true });
|
|
8611
|
+
}
|
|
8612
|
+
function getRuntimeCensusSnapshot() {
|
|
8613
|
+
return runtimeCensusService.peek();
|
|
8614
|
+
}
|
|
8615
|
+
function panePidsForSession(census, sessionName) {
|
|
8616
|
+
return (census.panesBySession.get(sessionName) ?? []).map((pane) => pane.panePid);
|
|
8617
|
+
}
|
|
8618
|
+
function descendantPidsForSession(census, sessionName) {
|
|
8619
|
+
const descendants = /* @__PURE__ */ new Set();
|
|
8620
|
+
for (const panePid of panePidsForSession(census, sessionName)) for (const pid of collectDescendantPids(panePid, census.processTree)) descendants.add(pid);
|
|
8621
|
+
return descendants;
|
|
8622
|
+
}
|
|
8623
|
+
function runtimeCensusHasHarnessProcess(census, sessionName) {
|
|
8624
|
+
if (!census.tmuxAvailable || !census.processAvailable) return true;
|
|
8625
|
+
const panePids = panePidsForSession(census, sessionName);
|
|
8626
|
+
if (panePids.length === 0) return false;
|
|
8627
|
+
for (const panePid of panePids) for (const pid of collectDescendantPids(panePid, census.processTree)) {
|
|
8628
|
+
const comm = census.processesByPid.get(pid)?.comm;
|
|
8629
|
+
if (comm && !KEEPALIVE_FOREGROUND_COMMANDS.has(comm)) return true;
|
|
8630
|
+
}
|
|
8631
|
+
return false;
|
|
8632
|
+
}
|
|
8633
|
+
var execFileAsync, KEEPALIVE_FOREGROUND_COMMANDS, runtimeCensusService;
|
|
8634
|
+
var init_runtime_census = __esmMin((() => {
|
|
8635
|
+
init_collector();
|
|
8636
|
+
execFileAsync = promisify(execFile);
|
|
8637
|
+
KEEPALIVE_FOREGROUND_COMMANDS = new Set([
|
|
8638
|
+
"sleep",
|
|
8639
|
+
"bash",
|
|
8640
|
+
"sh",
|
|
8641
|
+
"dash",
|
|
8642
|
+
"zsh",
|
|
8643
|
+
"ash"
|
|
8644
|
+
]);
|
|
8645
|
+
runtimeCensusService = createRuntimeCensusService({
|
|
8646
|
+
listPanes: async () => {
|
|
8647
|
+
const { listAllPaneRecords } = await import("./tmux-DoThH6aj.js");
|
|
8648
|
+
return Effect.runPromise(listAllPaneRecords());
|
|
8649
|
+
},
|
|
8650
|
+
readProcesses: readRuntimeProcessTable
|
|
8651
|
+
});
|
|
8652
|
+
}));
|
|
8653
|
+
//#endregion
|
|
8067
8654
|
//#region ../../lib/agents/queries.ts
|
|
8068
8655
|
function listRunningAgentsSync() {
|
|
8069
|
-
const
|
|
8070
|
-
const tmuxNames = new Set(
|
|
8656
|
+
const census = getRuntimeCensusSnapshot();
|
|
8657
|
+
const tmuxNames = census ? census.sessionNames : new Set(listSessionsSync().map((session) => session.name));
|
|
8658
|
+
const tmuxUnavailable = census?.tmuxAvailable === false;
|
|
8071
8659
|
return listOverdeckAgentStatesSync().map((state) => {
|
|
8072
8660
|
const normalizedId = normalizeAgentId(state.id);
|
|
8073
8661
|
return {
|
|
8074
8662
|
...state,
|
|
8075
8663
|
id: normalizedId,
|
|
8076
|
-
tmuxActive: tmuxNames.has(normalizedId)
|
|
8664
|
+
tmuxActive: tmuxUnavailable || tmuxNames.has(normalizedId)
|
|
8077
8665
|
};
|
|
8078
8666
|
});
|
|
8079
8667
|
}
|
|
@@ -8192,23 +8780,24 @@ var listRunningAgents;
|
|
|
8192
8780
|
var init_queries = __esmMin((() => {
|
|
8193
8781
|
init_agents();
|
|
8194
8782
|
init_tmux();
|
|
8783
|
+
init_runtime_census();
|
|
8195
8784
|
init_paths();
|
|
8196
8785
|
init_agent_rollback_state();
|
|
8197
8786
|
init_agent_state_sync();
|
|
8198
8787
|
listRunningAgents = () => Effect.gen(function* () {
|
|
8199
|
-
const
|
|
8200
|
-
const tmuxNames =
|
|
8788
|
+
const runtimeCensus = yield* Effect.promise(() => getRuntimeCensus());
|
|
8789
|
+
const tmuxNames = runtimeCensus.sessionNames;
|
|
8201
8790
|
return listOverdeckAgentStatesSync().map((state) => {
|
|
8202
8791
|
const normalizedId = normalizeAgentId(state.id);
|
|
8203
8792
|
return {
|
|
8204
8793
|
...state,
|
|
8205
8794
|
id: normalizedId,
|
|
8206
|
-
tmuxActive: tmuxNames.has(normalizedId)
|
|
8795
|
+
tmuxActive: !runtimeCensus.tmuxAvailable || tmuxNames.has(normalizedId)
|
|
8207
8796
|
};
|
|
8208
8797
|
});
|
|
8209
8798
|
});
|
|
8210
8799
|
}));
|
|
8211
8800
|
//#endregion
|
|
8212
|
-
export {
|
|
8801
|
+
export { appendActivity as $, recordAgentFailure as $n, OHMYPI_AGENT_READY_TIMEOUT_SECONDS as $t, spawnTierSupervisor as A, writeChannelsBridgeMcpConfig as An, init_codex_auth as Ar, deliverAgentPermissionDecision as At, detectCrashedAgents as B, getAgentDir as Bn, assertWorkspaceStackHealthyForSpawn as Bt, replayCrashedStandingAgent as C, validateProviderHealth as Cn, getAgentRuntimeStateSync as Cr, tryReserveAdvancingSlot as Ct, init_tier_supervisor as D, decideChannelsForWorkAgent as Dn, init_agent_runtime as Dr, init_memory_verdict_cache as Dt, deliverCommitForReview as E, buildDefaultResumeContinueMessage as En, getAgentRuntimeSnapshot as Er, getCachedMemoryVerdict as Et, init_tier_escalation as F, clearAgentPausedSync as Fn, init_transcript_landing as Ft, resumeAgent as G, init_agent_state as Gn, transitionIssueToInProgress as Gt, restartAgent as H, getAgentState as Hn, defaultRunWorkspace as Ht, init_slot_reconcile as I, clearAgentTroubled as In, probeTranscriptSince as It, isContextOverflowTail as J, isRole as Jn, providerDefaultHarnessSync as Jt, init_context_overflow as K, isAgentPaused as Kn, transitionIssueToInReview as Kt, listSlotAssignments as L, clearAgentTroubledSync as Ln, BRIDGE_TOKEN_HEADER as Lt, broadcastCommit as M, SESSION_EXITED_BEFORE_KICKOFF as Mn, init_ohmypi_parser as Mr, deliverResumeMessageWithTranscriptConfirmation as Mt, init_tier_feed as N, __testInternals as Nn, parseOhmypiSessionCostResultSync as Nr, setAgentDeliveryMethod as Nt, loadPrdDraft as O, decideSupervisorForWorkAgent as On, applyCodexAuthBurnFlag as Or, setCachedMemoryVerdict as Ot, decideEscalation as P, clearAgentPaused as Pn, captureTranscriptUserRecordSnapshot as Pt, operatorInterventionEvent as Q, markAgentTroubled as Qn, resolveTier as Qt, reconcileSlotState as R, clearYieldForResumeSync as Rn, init_bridge_token as Rt, contextWindowForModel as S, init_provider_health as Sn, getAgentRuntimeState as Sr, resetPatrolDispatchBudget as St, shouldReplayCompactAtTierRunBoundary as T, init_openai_auth as Tn, saveAgentRuntimeState as Tr, workResumeSlotsAvailable as Tt, buildCompactRecoverySeed as U, getAgentStateFilePath as Un, init_spawn_prep as Ut, recoverAgent as V, getAgentResumeGateBlockReason as Vn, buildAgentLaunchConfig as Vt, init_resume as W, getAgentStateSync as Wn, retrieveSpawnTimeMemoryContext as Wt, messageAgent as X, markAgentRunningState as Xn, resolveStaffing as Xt, init_messaging as Y, markAgentRunning as Yn, resolveImplicitStaffing as Yt, init_operator_interventions as Z, markAgentStoppedState as Zn, init_resolve_tier as Zt, init_linux as _, buildSpawnEnvForModel as _n, isQualifiedAgentId as _r, emergencyBrake as _t, listRunningAgentsSync as a, getRoleRuntimeBaseCommand as an, setAgentPaused as ar, saveSessionId as at, init_agents as b, getProviderExportsForModel as bn, waitForAgentIdle as br, releaseAdvancingSlot as bt, getRuntimeCensus as c, roleAgentDefinitionPath as cn, wipeAgentStateDirs as cr, init_spawn as ct, panePidsForSession as d, piFifoPaths as dn, readAgentHarnessModelRecordSync as dr, init_termination as dt, describeOhmypiSpawnFailure as en, recordAgentFailureSync as er, getActivity as et, refreshRuntimeCensus as f, init_ohmypi_fifo as fn, init_pty_token as fr, stopAgent as ft, LINUX_MEMORY_PRESSURE_DEFAULTS as g, buildCavemanExports as gn, clearReadySignal as gr, describeRunningAgents as gt, init_collector as h, init_claude_auth as hn, resolvePtySupervisorScriptPath as hr, countRunningSwarmSlotsForIssue as ht, listRunningAgents as i, getProviderAuthMode as in, saveAgentStateSync as ir, init_activity as it, supervisorAgentId as j, GOVERNOR_SLOT_PAUSE_REASON_PREFIX as jn, paneShowsCodexAuthBurn as jr, deliverInitialPromptWithRetry as jt, shouldSupervise as k, dismissDevChannelsDialog as kn, checkCodexAuthStatus as kr, deliverAgentMessage as kt, getRuntimeCensusSnapshot as l, waitForPromptReady as ln, writeAgentStateJsonSync as lr, spawnAgent as lt, createHostHealthCollector as m, getClaudeAuthStatus as mn, init_pty_supervisor_locate as mr, countRunningAgents as mt, init_queries as n, getCodexLauncherFields as nn, resetAgentFailureCount as nr, getLatestSessionIdSync as nt, warnOnBareNumericIssueIds as o, init_runtime_command as on, setAgentPausedSync as or, createOhmypiRuntimeSync as ot, runtimeCensusHasHarnessProcess as p, ohmypiFifoPaths as pn, writePtyToken as pr, stopAgentSync as pt, isContextOverflowError as q, isAgentTroubled as qn, init_staffing as qt, listAgentStates as r, getOhmypiLauncherFields as rn, saveAgentState as rr, getSessionId as rt, descendantPidsForSession as s, injectPiConversationMemory as sn, setAgentYieldedSync as sr, init_ohmypi as st, dropLegacyAgentStatesMissingRoleAsync as t, getAgentRuntimeBaseCommand as tn, recordStartupSessionExit as tr, getLatestSessionId as tt, init_runtime_census as u, init_pi_fifo as un, init_agent_record_sync as ur, spawnRun as ut, DARWIN_MEMORY_PRESSURE_DEFAULTS as v, determineModel as vn, normalizeAgentId as vr, getConcurrencyLimits as vt, replayStandingAgent as w, getOpenAIAuthStatus as wn, init_runtime_state as wr, tryReserveSwarmSlot as wt, compactAtTierRunBoundary as x, getProviderTmuxFlags as xn, waitForReadySignal as xr, releaseSwarmSlot as xt, init_darwin as y, getProviderEnvForModel as yn, resolveAgentTargetSync as yr, init_concurrency as yt, autoRecoverAgents as z, decideResumeGate as zn, writeBridgeTokenSync as zt };
|
|
8213
8802
|
|
|
8214
|
-
//# sourceMappingURL=queries-
|
|
8803
|
+
//# sourceMappingURL=queries-6d7Cdtm7.js.map
|