@overdeck/desktop 0.45.16 → 0.45.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-electron/main.js +149 -158
- package/dist-electron/main.js.map +1 -1
- package/dist-electron/preload.js +17 -2
- package/dist-electron/preload.js.map +1 -1
- package/package.json +5 -4
- package/server/acceptance-criteria-aQFKQf-J.js +62 -0
- package/server/{advancing-selfheal-DJYAvGv-.js → advancing-selfheal-DgwQgm4D.js} +6 -6
- package/server/{agent-gc-D0wDIeV1.js → agent-gc-kpzxqT7P.js} +3 -3
- package/server/agent-state-C_6TG-Ad.js +3 -0
- package/server/{agent-state-service-CZrayD_G.js → agent-state-service-BUfovFfB.js} +1 -1
- package/server/{agent-state-service-DFslS5go.js → agent-state-service-nUD3qfob.js} +5 -5
- package/server/agents-BA15AQqo.js +3 -0
- package/server/{briefing-freshness-DESTCWo-.js → agents-BHBxr8c9.js} +5 -131
- package/server/{archive-planning-CbghE9-o.js → archive-planning-CzCW9Ifl.js} +5 -10
- package/server/{archive-planning-CoyIbgGK.js → archive-planning-D-QsBufn.js} +1 -1
- package/server/{artifact-index-jobs-CcSrUoSE.js → artifact-index-jobs-qqa51B2Z.js} +2 -2
- package/server/{backlog-auto-trigger-BfgDsII0.js → backlog-auto-trigger-B7Bi0bvY.js} +2 -2
- package/server/{behavior-BTpYbAv4.js → behavior-CWqNMqE5.js} +2 -2
- package/server/briefing-freshness-DuxIE1yr.js +131 -0
- package/server/{checkpoint-manager-BwFdegJF.js → checkpoint-manager-DF6hb9Jw.js} +3 -3
- package/server/{checkpoint-manager-DWSXooZV.js → checkpoint-manager-DixkLus7.js} +1 -1
- package/server/checkpoint-worker.js +1 -1
- package/server/{checkpoints-fjadfOKF.js → checkpoints-B1Z42tJE.js} +1 -1
- package/server/{checkpoints-BtUonbs3.js → checkpoints-BiviJqei.js} +2 -2
- package/server/{claude-hooks-provision-DiK62u0k.js → claude-hooks-provision-BeMGi4ty.js} +1 -1
- package/server/{claude-hooks-provision-DAtxutOs.js → claude-hooks-provision-Du_PkMsp.js} +2 -2
- package/server/{claude-permissions-CThLgf8d.js → claude-permissions-BB6agcOZ.js} +2 -2
- package/server/{claude-settings-overlay-BF9MPIwx.js → claude-settings-overlay-CAq2oFSK.js} +2 -2
- package/server/{claude-settings-overlay-Dx_Uqcmv.js → claude-settings-overlay-DUWWLd6M.js} +1 -1
- package/server/cli-BFgrSWKV.js +3 -0
- package/server/{cli-ByKIIMfT.js → cli-C33xPZNm.js} +9 -9
- package/server/{cliproxy-C_GuT5DU.js → cliproxy-BQX1TL6N.js} +1 -1
- package/server/{cliproxy-B4c1BUvs.js → cliproxy-CGBA1GzA.js} +2 -2
- package/server/{close-issue-BOuLKr6e.js → close-issue-DNv8npc1.js} +5 -5
- package/server/{closed-issue-reaper-CksfuiFD.js → closed-issue-reaper-DrqgBJlr.js} +1 -1
- package/server/{closed-issue-reaper-DCAYzNXW.js → closed-issue-reaper-LoMnnjtJ.js} +9 -9
- package/server/codex-DxLivxri.js +3 -0
- package/server/{codex-parser-mFYZh8vR.js → codex-parser-DboQnEXN.js} +2 -2
- package/server/{codex-BbqIRZjd.js → codex-sgWVCGUd.js} +43 -18
- package/server/{config-Dj6N8EP9.js → config-6MCHOZ2N.js} +1 -1
- package/server/{config-DVLdmnMJ.js → config-DfaUXr6r.js} +2 -2
- package/server/{config-yaml-cNOZcEww.js → config-yaml-CqaAyn8y.js} +74 -74
- package/server/{conflict-gate-BMKm_5DV.js → conflict-gate-BF_zhcmb.js} +3 -3
- package/server/{conflict-gate-CuXUv-bP.js → conflict-gate-BubJprtD.js} +1 -1
- package/server/{context-layers-c0JqYHcS.js → context-layers-BFrxfl0l.js} +17 -3
- package/server/{context-layers-CeAwSYNt.js → context-layers-DWL_8HhY.js} +2 -2
- package/server/{control-settings-D4EFsRBd.js → control-settings-BguNQ1F_.js} +4 -4
- package/server/{conversation-compaction-kHVfVRg3.js → conversation-compaction-CRKAf2qP.js} +1 -1
- package/server/{conversation-compaction-BCggyih4.js → conversation-compaction-DxSXl0pT.js} +8 -8
- package/server/{conversation-service-BTzObqGi.js → conversation-service-DzuY9qoH.js} +1 -1
- package/server/{conversation-service-B8LFQQm1.js → conversation-service-mFVFdDQK.js} +6 -6
- package/server/{conversations-B-lcHv-5.js → conversations-BX5aD-6F.js} +4 -4
- package/server/{conversations-BM7zlXjr.js → conversations-BajHQ60c.js} +1 -1
- package/server/{cost-D9kPIY_5.js → cost-BoqD1Pxz.js} +2 -2
- package/server/{cost-BcpRQ-7o.js → cost-DuZ5vlv-.js} +3 -3
- package/server/{cost-sync-DF6odxK9.js → cost-sync-BYnmnMkY.js} +3 -3
- package/server/{dag-DKI3sOmX.js → dag-C6kYyF17.js} +7 -243
- package/server/{dangerous-git-ops-Bn18PEcN.js → dangerous-git-ops-q5OPtXMd.js} +1 -1
- package/server/dashboard-db-worker.js +6 -6
- package/server/{deacon-DONuopff.js → deacon-CwCiNuEZ.js} +3 -3
- package/server/{deacon-DdARMjZq.js → deacon-Dru5onpk.js} +233 -162
- package/server/{deacon-nudge-log-B-naf89q.js → deacon-nudge-log-ilDfxrhK.js} +1 -1
- package/server/{deacon-swarm-BNGkmYR_.js → deacon-swarm-BPmBmSoU.js} +298 -72
- package/server/deacon-swarm-CKyGJng1.js +2 -0
- package/server/deacon.js +14 -7
- package/server/{devcontainer-renderer-C-34Sxyz.js → devcontainer-renderer-BqGNCzvN.js} +3 -3
- package/server/{dist-BMXvKiZP.js → dist-BwlEiLCU.js} +1 -1
- package/server/dist-Bx4KkgYL.js +3 -0
- package/server/{dist-src-BgGUblXg.js → dist-src-BE0Denfs.js} +1 -1
- package/server/{docker-apZ9pBYw.js → docker-CNjXS72x.js} +2 -2
- package/server/{ensure-devcontainer-Bqi1EF1P.js → ensure-devcontainer-5e9xOve4.js} +4 -4
- package/server/{ensure-devcontainer-Dq3KoOIl.js → ensure-devcontainer-C6gyUQdE.js} +1 -1
- package/server/{esm-shims-BEjvINX3.js → esm-shims-Cso7IGBC.js} +1 -1
- package/server/{event-store-CqDgfbAs.js → event-store-D9UhQyMS.js} +1 -1
- package/server/{event-store-D89fMfXS.js → event-store-KZnWUKWh.js} +3 -3
- package/server/{events-S_C0pvl6.js → events-2eFUPdqz.js} +3 -3
- package/server/{events-rIGncmP1.js → events-BYbvqZky.js} +1 -1
- package/server/{factory-DV18m0rc.js → factory-BtaRsHFC.js} +20 -17
- package/server/{feature-registry-population-CqZSnqQi.js → feature-registry-population-Ca2UaV0U.js} +4 -4
- package/server/{feature-registry-storage-BeXmNBwK.js → feature-registry-storage-DaP-bQxO.js} +2 -2
- package/server/{features-u5XeMaOK.js → features-DqvaoQoa.js} +2 -2
- package/server/{feedback-target-CwyWf0Dg.js → feedback-target-BXWdOiYI.js} +9 -7
- package/server/{feedback-target-DDG1PWl3.js → feedback-target-BblmMe9P.js} +1 -1
- package/server/{feedback-writer-BsJiw5aT.js → feedback-writer-CULeOOY4.js} +1 -1
- package/server/{feedback-writer-D20HSXre.js → feedback-writer-Dn8o9ZyE.js} +4 -4
- package/server/{flywheel-RCnHAgc4.js → flywheel-BUWdcfhq.js} +1 -1
- package/server/{flywheel-Dczmgchd.js → flywheel-CqkO3cDj.js} +15 -28
- package/server/{flywheel-9Y1X7IM-.js → flywheel-D9r1mw2U.js} +13 -13
- package/server/{flywheel-merge-order-DEtEd3aK.js → flywheel-merge-order-LDzQDwSg.js} +1 -1
- package/server/{flywheel-merge-order-CtCYsFJP.js → flywheel-merge-order-VtjUweEb.js} +6 -6
- package/server/forge-DJy3Zx4s.js +2 -0
- package/server/{forge-DFDThFil.js → forge-wEollMCi.js} +22 -12
- package/server/{from-NSJypkI8.js → from-B2tOYhYV.js} +1 -1
- package/server/{fts-db-C5A_TTOM.js → fts-db-Bgzn2RO7.js} +2 -2
- package/server/{fts-operations-DvCSimfU.js → fts-operations-Bj8yutnR.js} +2 -2
- package/server/{git-utils-Dr0L7mFk.js → git-utils-GxlL0tmt.js} +2 -2
- package/server/{git-utils-C0neHvQx.js → git-utils-q8jNoBts.js} +1 -1
- package/server/{github-app-Bwt9lK4A.js → github-app-BrYwK_Gb.js} +1 -1
- package/server/{github-app-u9-SX7Gc.js → github-app-tUbb8Ldr.js} +8 -3
- package/server/{github-client-Btyy3uan.js → github-client-BwBU41jK.js} +3 -3
- package/server/{github-client-Do3k-N1W.js → github-client-D6CNsftm.js} +1 -1
- package/server/{github-pr-lookup-DOF1U2WW.js → github-pr-lookup-BS5PqkJb.js} +2 -2
- package/server/{harness-resolve-C6g2R0Cd.js → harness-resolve-Dx8hUsvC.js} +3 -3
- package/server/{health-events-B4u-2a9m.js → health-events-2DLp-5Xp.js} +2 -2
- package/server/{health-events-Bos3sk5g.js → health-events-B0mj6Iae.js} +1 -1
- package/server/{hooks-uEr8WTx_.js → hooks-BDcQJDUe.js} +1 -1
- package/server/{hooks-BCoOjL_R.js → hooks-BS_JrvYP.js} +3 -3
- package/server/hume-B4seN95Y.js +3 -0
- package/server/{hume-BqxYKbUf.js → hume-BRhNKyXQ.js} +2 -2
- package/server/{idle-stack-reaper-DbZ8ukMd.js → idle-stack-reaper-BCITXNW5.js} +2 -2
- package/server/{idle-stack-reaper-H0W6XtHh.js → idle-stack-reaper-C1ymihno.js} +1 -1
- package/server/{infra-Ba9mS6e6.js → infra-_Kx1m9pm.js} +9 -4
- package/server/{injection-C1DKXeIZ.js → injection-Bvhyg_MV.js} +1 -1
- package/server/{injection-yrMBxzVq.js → injection-CCaYkofq.js} +7 -7
- package/server/{inspect-agent-B-mnb4uh.js → inspect-agent-BqyZ4pCo.js} +35 -67
- package/server/inspect-agent-DCJQm9Wu.js +2 -0
- package/server/{internal-token-BtqSbKTx.js → internal-token-Cl-1IxaE.js} +2 -2
- package/server/{internal-token-BPYEaXFh.js → internal-token-D-t28de5.js} +1 -1
- package/server/{io-VEGSAqsd.js → io-DkC4sFSy.js} +36 -43
- package/server/{issue-closed-BxcePXL-.js → issue-closed-Cpl4VDUM.js} +41 -6
- package/server/{issue-lifecycle--8MRxrG1.js → issue-lifecycle-CFR8TJ22.js} +22 -37
- package/server/{issue-lifecycle-CdMUauyb.js → issue-lifecycle-YNTy3OT3.js} +1 -1
- package/server/{issue-service-singleton-MZsDhAob.js → issue-service-singleton-D81mCts_.js} +1 -1
- package/server/{issue-service-singleton-CkTUI-eu.js → issue-service-singleton-ldvUUXi3.js} +29 -29
- package/server/{issues-CBAsuoAO.js → issues-DIEHt9sq.js} +2 -2
- package/server/{jsonl-parser-BUW5_sSK.js → jsonl-parser-Cd5jIqh7.js} +3 -3
- package/server/{label-cleanup-htK6fBRU.js → label-cleanup-Btny6Gyo.js} +3 -3
- package/server/{state-home-CEvD_v5F.js → launcher-generator-BXLM9f4b.js} +7 -127
- package/server/{layers-jjL16At6.js → layers-gCJlK62m.js} +2 -2
- package/server/lifecycle-D7aQUnTO.js +12 -0
- package/server/{lifecycle-io-DXv8Utct.js → lifecycle-io-DQBF-GHO.js} +1 -1
- package/server/{lifecycle-io-IehcRt2v.js → lifecycle-io-FfPUtz-y.js} +4 -4
- package/server/{linear-client-D9cSQfvD.js → linear-client-CDH2D6Qy.js} +3 -3
- package/server/{linear-client-By7hjwuN.js → linear-client-WrYrUIAH.js} +1 -1
- package/server/memory-fts-worker.js +1 -1
- package/server/{merge-BN8FGJ2q.js → merge-BsDgUxFz.js} +3 -3
- package/server/{merge-BLcEZNXz.js → merge-Dervs4BF.js} +1 -1
- package/server/{merge-agent-B3u2szOL.js → merge-agent-D6DNhe9j.js} +64 -51
- package/server/{merge-agent-ejC7Wos8.js → merge-agent-DMQTJMP0.js} +1 -1
- package/server/{merge-batch-DyqlgYGp.js → merge-batch-Bv6Z5K2H.js} +1 -1
- package/server/{merge-blockers-cq-aS2KG.js → merge-blockers-WWWi6Ur2.js} +2 -2
- package/server/merge-ops-h9OCnIVz.js +2 -0
- package/server/{merge-rebase-Dl7yIxtV.js → merge-rebase-Czth9ggm.js} +2 -2
- package/server/{merge-set-CZ9Nbay0.js → merge-set-DNc4zBqd.js} +3 -3
- package/server/{merge-set-Dy0D0r3i.js → merge-set-vuE3MEVt.js} +1 -1
- package/server/{merge-sync-D7jWLgCC.js → merge-sync-B2KSk54U.js} +2 -2
- package/server/{merge-sync-CG9kDCdT.js → merge-sync-B9nHdUGx.js} +1 -1
- package/server/{merge-train-CH33XJOH.js → merge-train-DJgr81tF.js} +3 -3
- package/server/{merge-train-deps-JoVdGnOg.js → merge-train-deps-B2OWS0k9.js} +4 -4
- package/server/{merge-verification-D4wTChdX.js → merge-verification-BBIXUEqa.js} +4 -4
- package/server/{multipart-parser-Csn8U-K9.js → multipart-parser-9DhuAkPd.js} +2 -2
- package/server/node_modules/.package-lock.json +11 -11
- package/server/node_modules/@effect/platform-node/node_modules/@effect/platform-node-shared/package.json +3 -3
- package/server/node_modules/toml/README.md +54 -0
- package/server/node_modules/toml/index.d.ts +42 -1
- package/server/node_modules/toml/index.js +3 -3
- package/server/node_modules/toml/lib/compiler.js +35 -3
- package/server/node_modules/toml/lib/parser.js +224 -143
- package/server/node_modules/toml/package.json +3 -1
- package/server/node_modules/ws/lib/receiver.js +15 -32
- package/server/node_modules/ws/lib/websocket-server.js +4 -4
- package/server/node_modules/ws/lib/websocket.js +4 -4
- package/server/node_modules/ws/package.json +5 -1
- package/server/{orphan-proposed-reconciler-DI_IS1p_.js → orphan-proposed-reconciler-B8H41C4a.js} +14 -24
- package/server/{orphan-proposed-reconciler-BIcNu4tl.js → orphan-proposed-reconciler-DbTmT7qy.js} +1 -1
- package/server/package-lock.json +12 -12
- package/server/package.json +1 -1
- package/server/{pan-dir-CQIfKG8c.js → pan-dir-BTw4MdSe.js} +4 -4
- package/server/{paths-Blj6A9AJ.js → paths-Btkc8mzp.js} +2 -2
- package/server/{pipeline-notifier-BH4PAi-w.js → pipeline-notifier-3frIvSi3.js} +1 -1
- package/server/{pipeline-notifier-D_WYtEwl.js → pipeline-notifier-DTd19f18.js} +2 -2
- package/server/{project-pipelines-jMTitpeO.js → project-pipelines-B95fcAek.js} +2 -2
- package/server/projects-Dc9aoVoG.js +3 -0
- package/server/{prompts-B3njaImU.js → prompts-CIVmjHxn.js} +2 -2
- package/server/{providers-DnPxkHoG.js → providers-BLLk5IIb.js} +1 -1
- package/server/{providers-BbEyFhPX.js → providers-C-yWibCk.js} +7 -7
- package/server/public/assets/{chunk-BO2N2NFS-3qh9TUJi.js → chunk-BO2N2NFS-DzKZyoKY.js} +4 -4
- package/server/public/assets/{diagram-OG6HWLK6-D8UVTPj7.js → diagram-OG6HWLK6-Cx8mWUb8.js} +1 -1
- package/server/public/assets/{dist-BvLLn1YC.js → dist-BqccLhaw.js} +3 -3
- package/server/public/assets/{dist-CyubL7Wj.js → dist-rC3nAs_O.js} +1 -1
- package/server/public/assets/{ganttDiagram-6RSMTGT7-BI4E1LbQ.js → ganttDiagram-6RSMTGT7-DLYPLf5T.js} +1 -1
- package/server/public/assets/{highlighted-body-OFNGDK62-D_bapWkF.js → highlighted-body-OFNGDK62-D4DqixbV.js} +1 -1
- package/server/public/assets/index-CPcysUHk.js +796 -0
- package/server/public/assets/index-H5M0yhM4.css +1 -0
- package/server/public/assets/{linear-CEdobObr.js → linear-yqcXkDfj.js} +1 -1
- package/server/public/assets/mermaid-GHXKKRXX-CWdZ_heB.js +1 -0
- package/server/public/assets/{pieDiagram-4H26LBE5-DT79L01f.js → pieDiagram-4H26LBE5-DhraIOaV.js} +1 -1
- package/server/public/assets/{prod-CR_K2DFV.js → prod-DKUunUdN.js} +4 -4
- package/server/public/assets/{quadrantDiagram-W4KKPZXB-BEkKXXrL.js → quadrantDiagram-W4KKPZXB-DPiRcToa.js} +1 -1
- package/server/public/assets/{sankeyDiagram-5OEKKPKP-BxSCqn-j.js → sankeyDiagram-5OEKKPKP-3An5HNkZ.js} +1 -1
- package/server/public/assets/{xychartDiagram-2RQKCTM6-DicwJGG_.js → xychartDiagram-2RQKCTM6-lbEOjfqQ.js} +1 -1
- package/server/public/index.html +2 -2
- package/server/{pull-requests-43LPDfM8.js → pull-requests-D7AL5woD.js} +1 -1
- package/server/{pull-requests-DyUkQl4W.js → pull-requests-NDDNtqNq.js} +3 -3
- package/server/{agents-B9GwfCyp.js → queries-C0LCGG21.js} +710 -325
- package/server/{rally-BtWjybOa.js → rally-4oKvnxLG.js} +3 -3
- package/server/rally-DF5a3ioP.js +3 -0
- package/server/{rally-api-B-osULNL.js → rally-api-41tT6ikZ.js} +2 -2
- package/server/{rally-api-B-YA_oXx.js → rally-api-BsaQ8Vnz.js} +1 -1
- package/server/{rally-client-sErNQBO0.js → rally-client-Bo4hNcCZ.js} +5 -5
- package/server/{rally-client-CzFymP7P.js → rally-client-b5PT1x5L.js} +1 -1
- package/server/{reap-terminal-sessions-DnDQ7pf9.js → reap-terminal-sessions-BR39qflC.js} +1 -1
- package/server/{reap-terminal-sessions-2s-fvilz.js → reap-terminal-sessions-CFkuquQj.js} +1 -1
- package/server/{rebuild-stack-nGD_nPZo.js → rebuild-stack-C7JPUom6.js} +1 -1
- package/server/{rebuild-stack-CoU-HqZj.js → rebuild-stack-Ddv6W017.js} +5 -5
- package/server/{reconstruct-cache-Wj8GrYB0.js → reconstruct-cache-Gqhm---K.js} +6 -6
- package/server/record-DLOqfbkI.js +3 -0
- package/server/record-update-BltEmPge.js +168 -0
- package/server/record-update-CDp7aTaT.js +3 -0
- package/server/recovery-trip-Cn7KJVkS.js +44 -0
- package/server/{release-engine-CBLQXDlH.js → release-engine-BYzmIBf9.js} +5 -5
- package/server/{release-set-BNiqi7hy.js → release-set-7pnxFOWR.js} +3 -3
- package/server/{remote-DW_TWQnr.js → remote-Cvu4CSDk.js} +3 -3
- package/server/{remote-agents-C4cyxHQS.js → remote-agents-C2C6z9tj.js} +6 -33
- package/server/{remote-agents-Cv-U-_V8.js → remote-agents-DYY5fFpd.js} +1 -1
- package/server/{remote-completion-PhXGGFQy.js → remote-completion-2Kb4IDg_.js} +13 -13
- package/server/{remote-DcO9An_f.js → remote-rN0ecjHE.js} +3 -3
- package/server/resume-BFLl-yLn.js +3 -0
- package/server/{review-agent-Dn-yn7Zj.js → review-agent-BZvk0N5G.js} +31 -23
- package/server/{review-agent-u5q3ip7H.js → review-agent-CpSHLzed.js} +1 -1
- package/server/{review-artifacts-D4T04aYI.js → review-artifacts-PCo53YMn.js} +5 -19
- package/server/{review-context-Rc0VDLG_.js → review-context-M7QtJlJq.js} +8 -8
- package/server/{review-monitor-BC--miCO.js → review-monitor-BLC5mTTg.js} +2 -2
- package/server/{review-status-CG0iDuWa.js → review-status-77N3PoZr.js} +1 -1
- package/server/{review-status-Dc1l4dVz.js → review-status-DANr0t-v.js} +32 -58
- package/server/{review-status-enrichment-C1a1OG_1.js → review-status-enrichment-DwOg4UfL.js} +3 -3
- package/server/{review-status-sync-CfSixhhX.js → review-status-sync-Bd08OOFA.js} +1 -1
- package/server/{review-status-sync-CAr-hfnJ.js → review-status-sync-BjTUJ5fx.js} +2 -2
- package/server/{review-verdict-feedback-D2Q960wX.js → review-verdict-feedback-BsFLjN_6.js} +1 -1
- package/server/{review-verdict-feedback-CVDbIDBe.js → review-verdict-feedback-CBf-J_wS.js} +8 -8
- package/server/{rollup-DctoIu-A.js → rollup-Bu0f2EyN.js} +8 -8
- package/server/{rollup-CakjztPl.js → rollup-DTCCdEy4.js} +1 -1
- package/server/{scanner-BTM1jc_u.js → scanner-BlZ2vB7j.js} +7 -7
- package/server/{sequence-io-pnoIDGv4.js → sequence-io-ylyDtz2J.js} +4 -4
- package/server/{sequencer-agent-9Soi-WL-.js → sequencer-agent-DsWQ-87H.js} +6 -17
- package/server/server.js +4695 -4093
- package/server/{service-DfTVoqJg.js → service-CLVBC_1Y.js} +116 -90
- package/server/{session-fork-C4jAFHj8.js → session-fork-DlEIAhRy.js} +2 -2
- package/server/{session-history-DanhhiCw.js → session-history-bnOFKMwf.js} +4 -4
- package/server/settings-CP3GGon2.js +2 -0
- package/server/{settings-Cuc12oP_.js → settings-Cqa-8nyj.js} +2 -2
- package/server/{settings-DfT3f86D.js → settings-gJrdLZy2.js} +3 -3
- package/server/{shadow-engineering-bKuKTCn-.js → shadow-engineering-fq1YEKV3.js} +3 -3
- package/server/{shadow-state-CVHpRWlb.js → shadow-state-BqeFAygK.js} +1 -1
- package/server/{shadow-state-DJz6_pb_.js → shadow-state-RptE9Cau.js} +2 -2
- package/server/shadow-utils-BMWr5tRT.js +39 -0
- package/server/{ship-log-CwqPFfqx.js → ship-log-BRQQi2lU.js} +1 -1
- package/server/{smart-compaction-CiWfGfRZ.js → smart-compaction-CmoXpjeU.js} +7 -7
- package/server/{smart-compaction-B4KlpZGN.js → smart-compaction-DldUel4B.js} +1 -1
- package/server/{spawn-planning-session-CU-DwyDl.js → spawn-planning-session-CoS6LTc6.js} +16 -16
- package/server/{spawn-planning-session-D5N3RuLG.js → spawn-planning-session-DT2tSMxo.js} +1 -1
- package/server/{specialist-completion-CJcv-NXH.js → specialist-completion-pJtESo7m.js} +1 -1
- package/server/{specialist-context-B2HlbNxS.js → specialist-context-CspI4Eog.js} +5 -5
- package/server/{specialist-handoff-logger-CQyF1ygu.js → specialist-handoff-logger-Duz9RGvk.js} +2 -2
- package/server/{specialist-logs-CdcUpfjj.js → specialist-logs-DtSkPJZK.js} +3 -3
- package/server/{specialists-D7AcFi1u.js → specialists-CywEMwxk.js} +1 -1
- package/server/{specialists-k22_Btaq.js → specialists-D9-dMUtI.js} +1 -1
- package/server/{specialists-CFgw_0Q6.js → specialists-Dax7tqXC.js} +161 -448
- package/server/{specialists-CwzFdapR.js → specialists-GF42OOqd.js} +18 -18
- package/server/specs-VwcFtEDi.js +3 -0
- package/server/{src-B4TTzNSr.js → src-By3D85Ry.js} +6 -1
- package/server/{src-BvpMg4EB.js → src-CqyFg52C.js} +5 -5
- package/server/{src-D4YUZrwR.js → src-DhxM-eCb.js} +6 -6
- package/server/{stack-health-DVN7zRnL.js → stack-health-BsEVrJZ6.js} +1 -1
- package/server/{stack-health-CSgcYcr8.js → stack-health-C-SnpRHh.js} +2 -2
- package/server/stale-task-claims-vTxmRzLi.js +69 -0
- package/server/state-home-Bur1y4oH.js +213 -0
- package/server/{state-mapping-C13UaCL7.js → state-mapping-Ci0pkac4.js} +1 -1
- package/server/state-migrate-D3VveYfO.js +362 -0
- package/server/{stuck-remediation-CxsyxwFO.js → stuck-remediation-B699-p8v.js} +36 -41
- package/server/{stuck-remediation-nTIvhGOR.js → stuck-remediation-CaFYYTQW.js} +1 -1
- package/server/{summary-fork-CnRMPCYd.js → summary-fork-BxnF8Xh0.js} +2 -2
- package/server/{summary-fork-gKSoFAnK.js → summary-fork-COqYpVa3.js} +8 -8
- package/server/supervisor/{paths-3R6b989k.js → paths-Bk6hJRH9.js} +4 -3
- package/server/supervisor/pty-supervisor.js +2 -2
- package/server/supervisor/{pty-token-CScQ32Rj.js → pty-token-BZS5GYdG.js} +2 -2
- package/server/supervisor-eWAAmXKu.js +2 -0
- package/server/{supervisor-CZMs8s0M.js → supervisor-liMgIPDF.js} +2 -2
- package/server/{swarm-readiness-h6-pwY8w.js → swarm-readiness-sXB1vhzo.js} +3 -3
- package/server/{system-prerequisites-DZZTi2G6.js → system-prerequisites-Bz6KdkFJ.js} +1 -13
- package/server/{teardown-workspace-B4D-oCVg.js → teardown-workspace-DvzqnmUF.js} +14 -71
- package/server/{test-agent-queue-CnuYku4B.js → test-agent-queue-hAU1Ah08.js} +5 -5
- package/server/{tldr-daemon-CuA8hz21.js → tldr-daemon-Bam7Xhoo.js} +2 -2
- package/server/{tldr-daemon-CgZQ3jmZ.js → tldr-daemon-DhGwd88s.js} +1 -1
- package/server/tmux-C-rgxRDA.js +3 -0
- package/server/{tmux-C3g9VFcg.js → tmux-U55cNGFG.js} +92 -4
- package/server/{token-g_sJ19g3.js → token-Dsa-i36o.js} +2 -2
- package/server/{token-util-DiwnnbJo.js → token-util-BWNpH96m.js} +1 -1
- package/server/token-util-DRt0j2nQ.js +3 -0
- package/server/{tracker-config-dQxC15vH.js → tracker-config-OkdbaUCm.js} +2 -2
- package/server/{tracker-utils--z8FLSWn.js → tracker-utils-CghXMF3q.js} +2 -2
- package/server/{tracker-utils-DkKyRT0H.js → tracker-utils-DdzUiPNU.js} +1 -1
- package/server/{tunnel-BpWZs0Jy.js → tunnel-D1YxesBL.js} +3 -3
- package/server/{tunnel-CN2px87h.js → tunnel-DjlzgTl3.js} +1 -1
- package/server/typed-errors-CH4roFIj.js +3 -0
- package/server/{typed-errors-sLpGfegz.js → typed-errors-n_Tnb4Fh.js} +3 -4
- package/server/{types-BLS_Zbmd.js → types-DOjWNv3Z.js} +1 -1
- package/server/{types-tlXf80x3.js → types-DXBMm4mX.js} +1 -1
- package/server/{uat-train-utGVmqdm.js → uat-train-CaaWs9Rp.js} +1 -1
- package/server/{uat-train-BRo6DM7p.js → uat-train-CqN34zFx.js} +24 -25
- package/server/{validation-CsPVsoA0.js → validation-4-z2Cw4z.js} +70 -23
- package/server/validation-DpTNakM6.js +3 -0
- package/server/verification-artifact-DK1xb1zG.js +56 -0
- package/server/verification-artifact-JD_edpZ9.js +2 -0
- package/server/{verification-runner-CMT5WRMS.js → verification-runner-BjHN80pJ.js} +338 -58
- package/server/verification-runner-ShYu5Ph3.js +2 -0
- package/server/{vtt-parser-C_XPlifj.js → vtt-parser-QnRfcjiU.js} +1 -1
- package/server/{work-agent-prompt-ZTAb2Hyf.js → work-agent-prompt-BiJ43Der.js} +12 -88
- package/server/workflows-B4C3lY9E.js +2 -0
- package/server/{workflows-CXRwhw_o.js → workflows-DkTotz_m.js} +17 -24
- package/server/{workspace-CNfuj1-5.js → workspace-CuN0ev4Z.js} +3 -3
- package/server/{workspace-9UEsKuiP.js → workspace-DQ4vVivd.js} +1 -1
- package/server/{workspace-config-ChWOECy0.js → workspace-config-C77NKnsV.js} +1 -1
- package/server/{workspace-manager-BO-6k3sP.js → workspace-manager-B1mYn0lN.js} +1 -1
- package/server/{workspace-manager-D8AByFIT.js → workspace-manager-Beeo2aKF.js} +23 -48
- package/server/{workspace-metadata-CvC268MN.js → workspace-metadata-BZC5BmoP.js} +2 -2
- package/server/{workspace-metadata-DZiJtnuF.js → workspace-metadata-Cy7_ZACL.js} +1 -1
- package/server/{workspaces-D-uIoqbg.js → workspaces-CGuzW1Ia.js} +182 -152
- package/sync-sources/hooks/codex-notify-hook +64 -8
- package/sync-sources/hooks/record-cost-event.js +1109 -36
- package/sync-sources/hooks/record-cost-event.js.map +1 -1
- package/sync-sources/hooks/statusline.sh +2 -2
- package/sync-sources/hooks/work-agent-stop-hook +1 -2
- package/server/acceptance-criteria-BZ_nQS1f.js +0 -33
- package/server/agent-state-lGvgPP4m.js +0 -3
- package/server/agents-CEcaxSkR.js +0 -3
- package/server/auto-commit-IW-eik_b.js +0 -3
- package/server/bd-process-lock-XAXAet9O.js +0 -390
- package/server/beads-B1u04n3o.js +0 -2
- package/server/beads-BeSMEjGT.js +0 -649
- package/server/beads-query-Dl4FhT8J.js +0 -95
- package/server/beads-restore-BUItPOjI.js +0 -23
- package/server/cli-D9cUTbBr.js +0 -3
- package/server/codex-BYPz6ZdF.js +0 -3
- package/server/compact-beads-CyJtoXJi.js +0 -94
- package/server/compact-beads-N00E4EVa.js +0 -3
- package/server/deacon-swarm-CvdFekIO.js +0 -2
- package/server/dist-BNwrgsUO.js +0 -3
- package/server/export-BJHSVwKP.js +0 -87
- package/server/forge-8y6aEPTB.js +0 -2
- package/server/hume-CerGi2RH.js +0 -3
- package/server/inspect-agent-CWkeAB7J.js +0 -2
- package/server/lifecycle-Ck2UR27D.js +0 -14
- package/server/merge-ops-CFkQtXEj.js +0 -2
- package/server/projects-CrBE6IhN.js +0 -3
- package/server/public/assets/index-BAZxZ-8I.js +0 -796
- package/server/public/assets/index-FBG3JBfq.css +0 -1
- package/server/public/assets/mermaid-GHXKKRXX-BYP8MI37.js +0 -1
- package/server/rally-oggyp4cs.js +0 -3
- package/server/record-lEYK__LD.js +0 -3
- package/server/recovery-trip-BT7nb9OV.js +0 -98
- package/server/resolver-C7dLn8OK.js +0 -158
- package/server/resume-BYZBIab-.js +0 -3
- package/server/settings-Cy7SCFO9.js +0 -2
- package/server/specs-RzcDgozr.js +0 -3
- package/server/supervisor-CfX192ma.js +0 -2
- package/server/tmux-By8E_Yv_.js +0 -3
- package/server/token-util-C9u4An3K.js +0 -3
- package/server/tracker-config-BzfVj41Z.js +0 -3
- package/server/typed-errors-CrN1AByg.js +0 -3
- package/server/validation-Dq_wwcw3.js +0 -3
- package/server/verification-runner-D0Uh-9jc.js +0 -2
- package/server/workflows-BLwxUMP7.js +0 -2
- package/server/writer-BUweuRPx.js +0 -3
- package/server/writer-CrP2xuBn.js +0 -251
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
import { a as __toCommonJS } from "./rolldown-runtime-DNCzzKnI.js";
|
|
2
|
-
import { B as piProviderForModel,
|
|
2
|
+
import { B as piProviderForModel, C as init_tier_table, D as canUseHarnessSync, Fn as init_projects, Jr as getOverdeckHome, N as UnknownModelError, Qr as resolveOhmypiExtensionPath, R as getProviderForModelSync, Sr as init_errors, T as resolveTieredExecutionEnabledForIssue, Vr as encodeClaudeProjectDir, Yr as init_paths, Z as resolveModel, ar as parseIssueIdSync, c as isClaudeCodeChannelsEnabled, f as loadConfigSync, fr as FsError, hn as shouldCommitLegacyWorkspaceArtifacts, k as init_harness_policy, kn as getProjectSync, nr as extractPrefixSync, pn as init_state_read_home, qn as resolveProjectFromIssueSync, rr as init_issue_id, t as init_config_yaml, w as resolveTieredExecutionEnabled, z as init_providers, zn as listProjectsSync } from "./config-yaml-CqaAyn8y.js";
|
|
3
3
|
import { a as init_activity_logger, n as emitActivityEntrySync } from "./activity-logger-pcbf-e30.js";
|
|
4
|
-
import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-
|
|
5
|
-
import {
|
|
6
|
-
import { a as init_event_store, n as getEventStore } from "./event-store-
|
|
7
|
-
import { C as normalizeChannelReplyPayload, a as getHarnessBehavior, b as DomainEvent, t as init_src } from "./src-
|
|
8
|
-
import {
|
|
9
|
-
import { a as EventStoreService, c as ReadModelService, d as init_read_model, i as init_issue_lifecycle, s as init_domain_services, t as IssueLifecycle, u as getClosedIssueIdsForReadSource } from "./issue-lifecycle
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { B as removeFavorite, E as hasOtherActiveConversationOnTmuxSession, F as markConversationEnded, G as setConversationHarness, K as setConversationModel, M as listConversations, P as markConversationActive, Q as updateConversationDeliveryMethod, S as getConversationByName, W as setConversationEffort, g as backfillConversationModel, h as archiveConversation, k as init_conversations, nt as updateLastAttached, rt as updateSpawnError, x as getConversationById, y as createConversation } from "./conversations-
|
|
22
|
-
import {
|
|
23
|
-
import { n as
|
|
24
|
-
import { a as
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import { _ as parseCodexApprovalPrompt, d as getAgentPendingQuestions$1, f as getAgentWorkspace$1, g as normalizeAwaitingInputPrompt, m as detectAwaitingInputForAgent, o as getRuntimeForAgent, p as scanPendingInputsPromise, s as computeAgentEnrichment, u as getAgentJsonlPath$1 } from "./stuck-remediation-
|
|
33
|
-
import {
|
|
34
|
-
import { o as stopWorkspaceDocker, r as init_workspace_manager } from "./workspace-manager-
|
|
35
|
-
import { a as init_jsonl_parser, o as normalizeModelName } from "./jsonl-parser-
|
|
36
|
-
import { a as loadWorkspaceMetadataSync } from "./workspace-metadata-
|
|
37
|
-
import { c as syncBeadStatusToVBrief, l as withBdMutex } from "./beads-BeSMEjGT.js";
|
|
4
|
+
import { d as getOverdeckDatabaseSync, f as init_infra } from "./infra-_Kx1m9pm.js";
|
|
5
|
+
import { A as listSessions, B as setOption, C as isHarnessProcessAlive, G as BLANKED_PROVIDER_ENV, I as sendKeysAsync, J as init_child_env, L as sendRawKeystroke, R as sessionExists, S as init_tmux, T as killSession, f as exactPaneTarget, i as capturePane, k as listSessionNames, m as findManagedServerPidSync, o as createSession, q as buildChildEnvWithoutTmuxSync, z as sessionExistsSync } from "./tmux-U55cNGFG.js";
|
|
6
|
+
import { a as init_event_store, n as getEventStore } from "./event-store-KZnWUKWh.js";
|
|
7
|
+
import { C as normalizeChannelReplyPayload, a as getHarnessBehavior, b as DomainEvent, t as init_src } from "./src-By3D85Ry.js";
|
|
8
|
+
import { A as stateToOverdeckParamsForDb, D as init_agent_state_sync, T as AGENT_COLUMNS_FOR_DB, c as init_review_status, s as getReviewStatusSync, u as loadReviewStatuses, y as setReviewStatusSync } from "./review-status-DANr0t-v.js";
|
|
9
|
+
import { a as EventStoreService, c as ReadModelService, d as init_read_model, i as init_issue_lifecycle, s as init_domain_services, t as IssueLifecycle, u as getClosedIssueIdsForReadSource } from "./issue-lifecycle-CFR8TJ22.js";
|
|
10
|
+
import { d as isTerminalIssueStage, o as init_agents, u as getIssueStageSync } from "./agents-BHBxr8c9.js";
|
|
11
|
+
import { n as ensureSessionContextBriefingFile, r as init_briefing_freshness } from "./briefing-freshness-DuxIE1yr.js";
|
|
12
|
+
import { o as getPricingSync, s as init_cost, t as calculateCostSync } from "./cost-BoqD1Pxz.js";
|
|
13
|
+
import { $n as wipeAgentStateDirs, At as init_bridge_token, Ct as deliverAgentPermissionDecision, Dn as clearAgentTroubled, Et as setAgentDeliveryMethod, Fn as getAgentStateSync, G as saveSessionId, H as getLatestSessionId, Hn as markAgentStoppedState, Jn as saveAgentState, Kt as getAgentRuntimeBaseCommand, L as messageAgent, Lt as transitionIssueToInProgress, M as resumeAgent, Nn as getAgentState, O as recoverAgent, Q as stopAgent, R as init_operator_interventions, S as init_tier_escalation, St as deliverAgentMessage, Tn as clearAgentPaused, U as getLatestSessionIdSync, V as getActivity, Vt as resolveStaffing, W as getSessionId, Xn as setAgentPaused, Yn as saveAgentStateSync, Yt as getProviderAuthMode, _t as init_config, ar as init_pty_supervisor_locate, bn as dismissDevChannelsDialog, br as checkCodexAuthStatus, dn as getProviderExportsForModel, er as writeAgentStateJsonSync, fr as waitForReadySignal, gr as saveAgentRuntimeState, i as listRunningAgents, in as ohmypiFifoPaths, ir as writePtyToken, jn as getAgentDir, jt as writeBridgeTokenSync, k as restartAgent, ln as determineModel, lr as normalizeAgentId, mn as validateProviderHealth, mr as getAgentRuntimeStateSync, n as init_queries, nn as piFifoPaths, or as resolvePtySupervisorScriptPath, pn as init_provider_health, pr as getAgentRuntimeState, r as listAgentStates, rn as init_ohmypi_fifo, rr as init_pty_token, s as init_agents$1, sr as clearReadySignal, tn as init_pi_fifo, un as getProviderEnvForModel, x as decideEscalation, xn as writeChannelsBridgeMcpConfig, xr as init_codex_auth, yt as loadCloisterConfigSync, z as operatorInterventionEvent, zt as init_staffing } from "./queries-C0LCGG21.js";
|
|
14
|
+
import { a as performHandoff, i as checkAllTriggers, s as getAgentHealth, t as getCloisterService } from "./service-CLVBC_1Y.js";
|
|
15
|
+
import { o as init_persistent_logger, s as logAgentLifecycleSync } from "./session-history-bnOFKMwf.js";
|
|
16
|
+
import { t as init_behavior } from "./behavior-CWqNMqE5.js";
|
|
17
|
+
import { a as init_tracker_config, t as getGitHubConfig } from "./tracker-config-OkdbaUCm.js";
|
|
18
|
+
import { n as init_issue_service_singleton, r as issue_service_singleton_exports } from "./issue-service-singleton-ldvUUXi3.js";
|
|
19
|
+
import { a as PAN_DIRNAME, i as PAN_CONTINUE_FILENAME, p as init_types } from "./types-DOjWNv3Z.js";
|
|
20
|
+
import { F as init_lifecycle, P as generateVBriefFilename, f as readTierOverrides, g as serializeVBriefDocument, h as recordTierPromotion, m as readWorkspacePlanSync, o as init_io, r as findPlan, u as readPlan } from "./io-DkC4sFSy.js";
|
|
21
|
+
import { B as removeFavorite, E as hasOtherActiveConversationOnTmuxSession, F as markConversationEnded, G as setConversationHarness, K as setConversationModel, M as listConversations, P as markConversationActive, Q as updateConversationDeliveryMethod, S as getConversationByName, W as setConversationEffort, g as backfillConversationModel, h as archiveConversation, k as init_conversations, nt as updateLastAttached, rt as updateSpawnError, x as getConversationById, y as createConversation } from "./conversations-BX5aD-6F.js";
|
|
22
|
+
import { n as recordFeatureRegistryLifecycle, t as init_feature_registry_population } from "./feature-registry-population-Ca2UaV0U.js";
|
|
23
|
+
import { a as requireModelOverrideSync, i as normalizeModelOverrideSync, n as init_launcher_generator, r as init_model_validation, t as generateLauncherScriptSync } from "./launcher-generator-BXLM9f4b.js";
|
|
24
|
+
import { a as init_claude_permissions, o as resolvePermissionModeSync, r as getClaudePermissionFlagsStringSync, t as BYPASS_PERMISSION_MODE } from "./claude-permissions-BB6agcOZ.js";
|
|
25
|
+
import { h as workspaceContextFile, l as piGlobalContextFile, o as init_layers } from "./layers-gCJlK62m.js";
|
|
26
|
+
import { a as init_stack_health, i as getWorkspaceStackHealth } from "./stack-health-C-SnpRHh.js";
|
|
27
|
+
import { l as init_dag, o as getDispatchableItems } from "./dag-C6kYyF17.js";
|
|
28
|
+
import { n as resolveHarness, t as init_harness_resolve } from "./harness-resolve-Dx8hUsvC.js";
|
|
29
|
+
import { c as isStateMigrated, o as init_state_home } from "./state-home-Bur1y4oH.js";
|
|
30
|
+
import { a as init_lifecycle_io, c as updatePlanStatus, s as transitionVBriefOnMain } from "./lifecycle-io-FfPUtz-y.js";
|
|
31
|
+
import { _ as init_codex_conversation_parser, c as parseEntireConversation, d as init_pi_conversation_parser, g as parseOhmypiConversationMessages, m as init_ohmypi_conversation_parser, p as parsePiConversationMessages, t as init_conversation_service, v as parseCodexConversationMessages } from "./conversation-service-mFVFdDQK.js";
|
|
32
|
+
import { _ as parseCodexApprovalPrompt, d as getAgentPendingQuestions$1, f as getAgentWorkspace$1, g as normalizeAwaitingInputPrompt, m as detectAwaitingInputForAgent, o as getRuntimeForAgent, p as scanPendingInputsPromise, s as computeAgentEnrichment, u as getAgentJsonlPath$1 } from "./stuck-remediation-B699-p8v.js";
|
|
33
|
+
import { Q as createInFlightGuard, Rt as classifyMemoryPressure, Ut as getResourceConfig, Wt as getSystemHealthSnapshot } from "./deacon-Dru5onpk.js";
|
|
34
|
+
import { o as stopWorkspaceDocker, r as init_workspace_manager } from "./workspace-manager-Beeo2aKF.js";
|
|
35
|
+
import { a as init_jsonl_parser, o as normalizeModelName } from "./jsonl-parser-Cd5jIqh7.js";
|
|
36
|
+
import { a as loadWorkspaceMetadataSync } from "./workspace-metadata-BZC5BmoP.js";
|
|
38
37
|
import { basename, delimiter, dirname, join, resolve } from "node:path";
|
|
39
38
|
import { Cause, Data, Effect, Layer, Option, Schema, Stream } from "effect";
|
|
40
39
|
import { join as join$1 } from "path";
|
|
41
40
|
import { homedir } from "node:os";
|
|
42
41
|
import { createReadStream, existsSync, mkdirSync, readFileSync, realpathSync, renameSync, writeFileSync } from "node:fs";
|
|
43
42
|
import { HttpRouter, HttpServerRequest, HttpServerResponse } from "effect/unstable/http";
|
|
44
|
-
import { access, appendFile, chmod,
|
|
43
|
+
import { access, appendFile, chmod, lstat, mkdir, open, readFile, readdir, realpath, rename, rm, stat as stat$1, writeFile } from "node:fs/promises";
|
|
45
44
|
import { randomUUID } from "crypto";
|
|
46
|
-
import { mkdir as mkdir$1,
|
|
45
|
+
import { mkdir as mkdir$1, writeFile as writeFile$1 } from "fs/promises";
|
|
47
46
|
import { exec, execFile, spawn } from "node:child_process";
|
|
48
47
|
import { promisify } from "node:util";
|
|
49
48
|
import { randomUUID as randomUUID$1, timingSafeEqual } from "node:crypto";
|
|
@@ -87,6 +86,7 @@ init_infra();
|
|
|
87
86
|
init_event_store();
|
|
88
87
|
init_src();
|
|
89
88
|
init_agent_state_sync();
|
|
89
|
+
init_agents();
|
|
90
90
|
init_read_model();
|
|
91
91
|
init_briefing_freshness();
|
|
92
92
|
init_domain_services();
|
|
@@ -141,7 +141,7 @@ let opaqueLastSummaryAt = 0;
|
|
|
141
141
|
* TrackerNotConfigured → 503 Service Unavailable
|
|
142
142
|
* RateLimited → 429 Too Many Requests
|
|
143
143
|
* AgentAlreadyRunning → 409 Conflict
|
|
144
|
-
*
|
|
144
|
+
* PlanEmpty → 422 Unprocessable Entity
|
|
145
145
|
* TrackerApiError → 502 Bad Gateway
|
|
146
146
|
* WorkspaceCreateError, AgentStartError → 500 Internal Server Error
|
|
147
147
|
* Unknown errors → 500 Internal Server Error
|
|
@@ -151,7 +151,7 @@ function httpHandler(effect) {
|
|
|
151
151
|
return effect.pipe(Effect.catchTag("IssueNotFound", (err) => Effect.succeed(jsonResponse({ error: `Issue not found: ${err.id}` }, { status: 404 }))), Effect.catchTag("WorkspaceNotFound", (err) => Effect.succeed(jsonResponse({ error: `Workspace not found: ${err.id}` }, { status: 404 }))), Effect.catchTag("TrackerNotConfigured", (err) => Effect.succeed(jsonResponse({ error: `Tracker not configured: ${err.tracker}` }, { status: 503 }))), Effect.catchTag("RateLimited", (err) => Effect.succeed(jsonResponse({
|
|
152
152
|
error: "Rate limited",
|
|
153
153
|
retryAfter: err.retryAfter
|
|
154
|
-
}, { status: 429 }))), Effect.catchTag("AgentAlreadyRunning", (err) => Effect.succeed(jsonResponse({ error: `Agent already running for issue: ${err.id}` }, { status: 409 }))), Effect.catchTag("
|
|
154
|
+
}, { status: 429 }))), Effect.catchTag("AgentAlreadyRunning", (err) => Effect.succeed(jsonResponse({ error: `Agent already running for issue: ${err.id}` }, { status: 409 }))), Effect.catchTag("PlanEmpty", (err) => Effect.succeed(jsonResponse({ error: `Plan is empty for issue: ${err.id}` }, { status: 422 }))), Effect.catchTag("TrackerApiError", (err) => Effect.succeed(jsonResponse({ error: `Tracker API error (${err.tracker}): ${err.message}` }, { status: 502 }))), Effect.catchTag("WorkspaceCreateError", (err) => Effect.succeed(jsonResponse({ error: `Workspace creation failed for ${err.id}: ${err.message}` }, { status: 500 }))), Effect.catchTag("AgentStartError", (err) => Effect.succeed(jsonResponse({ error: `Agent start failed for ${err.id}: ${err.message}` }, { status: 500 }))), Effect.catchCause((cause) => Effect.gen(function* () {
|
|
155
155
|
if (Cause.hasInterruptsOnly(cause)) return jsonResponse({ error: "Request cancelled" }, { status: 499 });
|
|
156
156
|
const error = Cause.squash(cause);
|
|
157
157
|
const message = error instanceof Error ? error.message : "Internal server error";
|
|
@@ -183,169 +183,27 @@ function httpHandler(effect) {
|
|
|
183
183
|
})));
|
|
184
184
|
}
|
|
185
185
|
//#endregion
|
|
186
|
-
//#region ../../lib/codex-auth.ts
|
|
187
|
-
init_cliproxy();
|
|
188
|
-
/** Wrapper error for Codex auth probing — preserves the underlying cause. */
|
|
189
|
-
var CodexAuthCheckError = class extends Data.TaggedError("CodexAuthCheckError") {};
|
|
190
|
-
async function checkCodexAuthStatusPromise(options = {}) {
|
|
191
|
-
const credPath = join$1(getCliproxyAuthDir(), "codex-primary.json");
|
|
192
|
-
let raw;
|
|
193
|
-
let credMtimeMs = null;
|
|
194
|
-
try {
|
|
195
|
-
raw = await readFile$1(credPath, "utf8");
|
|
196
|
-
credMtimeMs = (await stat$2(credPath)).mtimeMs;
|
|
197
|
-
} catch {
|
|
198
|
-
return { status: "missing" };
|
|
199
|
-
}
|
|
200
|
-
let creds;
|
|
201
|
-
try {
|
|
202
|
-
creds = JSON.parse(raw);
|
|
203
|
-
} catch {
|
|
204
|
-
return {
|
|
205
|
-
status: "unknown",
|
|
206
|
-
message: "Malformed credential file"
|
|
207
|
-
};
|
|
208
|
-
}
|
|
209
|
-
const accessToken = typeof creds.access_token === "string" ? creds.access_token : null;
|
|
210
|
-
if (!accessToken) return {
|
|
211
|
-
status: "unknown",
|
|
212
|
-
message: "Missing access_token in credential file"
|
|
213
|
-
};
|
|
214
|
-
const claims = decodeJwtPayload(accessToken);
|
|
215
|
-
if (!claims) return {
|
|
216
|
-
status: "unknown",
|
|
217
|
-
message: "Unable to decode access_token"
|
|
218
|
-
};
|
|
219
|
-
const expSec = typeof claims.exp === "number" ? claims.exp : null;
|
|
220
|
-
if (expSec === null) return {
|
|
221
|
-
status: "unknown",
|
|
222
|
-
message: "Missing exp claim in access_token"
|
|
223
|
-
};
|
|
224
|
-
const email = typeof creds.email === "string" ? creds.email : "";
|
|
225
|
-
const expiresAt = (/* @__PURE__ */ new Date(expSec * 1e3)).toISOString();
|
|
226
|
-
if (expSec * 1e3 <= Date.now()) return {
|
|
227
|
-
status: "expired",
|
|
228
|
-
email,
|
|
229
|
-
expiresAt
|
|
230
|
-
};
|
|
231
|
-
return await applyBurnedTokenOverride({
|
|
232
|
-
status: "valid",
|
|
233
|
-
email,
|
|
234
|
-
expiresAt
|
|
235
|
-
}, email, expiresAt, { ignoreBurnBefore: options.ignoreBurnBefore ?? credMtimeMs ?? void 0 });
|
|
236
|
-
}
|
|
237
|
-
/** Read the trailing window of the cliproxy log for burn/failure analysis. */
|
|
238
|
-
async function readLogTail(path) {
|
|
239
|
-
const TAIL_BYTES = 128 * 1024;
|
|
240
|
-
const file = await open$1(path, "r");
|
|
241
|
-
try {
|
|
242
|
-
const stat = await file.stat();
|
|
243
|
-
const length = Math.min(stat.size, TAIL_BYTES);
|
|
244
|
-
const buffer = Buffer.alloc(length);
|
|
245
|
-
await file.read(buffer, 0, length, stat.size - length);
|
|
246
|
-
return buffer.toString("utf8");
|
|
247
|
-
} finally {
|
|
248
|
-
await file.close();
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
async function applyBurnedTokenOverride(baseStatus, email, expiresAt, options) {
|
|
252
|
-
let logRaw;
|
|
253
|
-
try {
|
|
254
|
-
logRaw = await readLogTail(getCliproxyLogPath());
|
|
255
|
-
} catch {
|
|
256
|
-
return baseStatus;
|
|
257
|
-
}
|
|
258
|
-
return evaluateBurnedFromLog(logRaw, baseStatus, email, expiresAt, options);
|
|
259
|
-
}
|
|
260
|
-
const BURN_STALENESS_MS = 3600 * 1e3;
|
|
261
|
-
/**
|
|
262
|
-
* Pure decision: given the cliproxy log tail, decide whether a JWT-valid token
|
|
263
|
-
* is actually burned. Exported for regression testing (PAN-1584).
|
|
264
|
-
*
|
|
265
|
-
* "Auth failure" evidence = either a refresh-token burn line
|
|
266
|
-
* (`refresh token has already been used`) OR a `503` on `/v1/messages` /
|
|
267
|
-
* `/v1/chat/completions` (the live symptom the agent hits once cliproxy disables
|
|
268
|
-
* the provider — and which keeps appearing after the burn line stops, since a
|
|
269
|
-
* disabled provider no longer attempts refreshes). "Success" = a `200` on those
|
|
270
|
-
* same paths (proves the auth path works right now).
|
|
271
|
-
*
|
|
272
|
-
* Decision:
|
|
273
|
-
* - No failure evidence → trust base status.
|
|
274
|
-
* - Success AFTER the last failure → trust base status (recovered).
|
|
275
|
-
* - Failure AFTER the credential's last write (ignoreBurnBefore) → BURNED,
|
|
276
|
-
* regardless of age. The credential write time is when you last logged in;
|
|
277
|
-
* a failure after it means the current token is dead. This is authoritative
|
|
278
|
-
* and is the fix for the bug where a >1h-stale burn line was dismissed as
|
|
279
|
-
* "valid" during a quiet period even though the token was dead (PAN-1584).
|
|
280
|
-
* - Failure BEFORE that cutoff → trust base status (re-authed since).
|
|
281
|
-
* - No cutoff available → fall back to the staleness backstop:
|
|
282
|
-
* burned only if the last failure is within BURN_STALENESS_MS.
|
|
283
|
-
*
|
|
284
|
-
* We intentionally don't probe cliproxy with HTTP — `GET /v1/models` always
|
|
285
|
-
* 401s (it needs real OAuth, not the local key) and would generate spurious log
|
|
286
|
-
* lines on every dashboard load.
|
|
287
|
-
*/
|
|
288
|
-
function evaluateBurnedFromLog(logRaw, baseStatus, email, expiresAt, options = {}) {
|
|
289
|
-
const now = options.now ?? Date.now();
|
|
290
|
-
const lines = logRaw.split("\n").slice(-500);
|
|
291
|
-
const isBurnLine = (l) => l.includes("refresh token has already been used") || l.includes("refresh_token_reused");
|
|
292
|
-
const isAuthFailure503 = (l) => /\b503 \|/.test(l) && /POST\s+"\/v1\/(messages|chat\/completions)/.test(l);
|
|
293
|
-
const isSuccess = (l) => /\b200 \|/.test(l) && /POST\s+"\/v1\/(messages|chat\/completions)/.test(l);
|
|
294
|
-
const timestampAt = (idx) => {
|
|
295
|
-
for (let j = idx; j >= Math.max(0, idx - 10); j--) {
|
|
296
|
-
const m = lines[j]?.match(/^\[(\d{4}-\d{2}-\d{2}) (\d{2}:\d{2}:\d{2})\]/);
|
|
297
|
-
if (m) {
|
|
298
|
-
const t = Date.parse(`${m[1]}T${m[2]}Z`);
|
|
299
|
-
if (Number.isFinite(t)) return t;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
return null;
|
|
303
|
-
};
|
|
304
|
-
let lastFailureIdx = -1;
|
|
305
|
-
let lastFailureTimestamp = null;
|
|
306
|
-
let lastSuccessIdx = -1;
|
|
307
|
-
for (let i = lines.length - 1; i >= 0; i--) {
|
|
308
|
-
const line = lines[i] ?? "";
|
|
309
|
-
if (lastFailureIdx < 0 && (isBurnLine(line) || isAuthFailure503(line))) {
|
|
310
|
-
lastFailureIdx = i;
|
|
311
|
-
lastFailureTimestamp = timestampAt(i);
|
|
312
|
-
}
|
|
313
|
-
if (lastSuccessIdx < 0 && isSuccess(line)) lastSuccessIdx = i;
|
|
314
|
-
if (lastFailureIdx >= 0 && lastSuccessIdx >= 0) break;
|
|
315
|
-
}
|
|
316
|
-
if (lastFailureIdx < 0) return baseStatus;
|
|
317
|
-
if (lastSuccessIdx > lastFailureIdx) return baseStatus;
|
|
318
|
-
if (options.ignoreBurnBefore !== void 0) {
|
|
319
|
-
if (lastFailureTimestamp !== null && lastFailureTimestamp + 1e3 <= options.ignoreBurnBefore) return baseStatus;
|
|
320
|
-
return {
|
|
321
|
-
status: "burned",
|
|
322
|
-
email,
|
|
323
|
-
expiresAt
|
|
324
|
-
};
|
|
325
|
-
}
|
|
326
|
-
if (lastFailureTimestamp !== null && now - lastFailureTimestamp > BURN_STALENESS_MS) return baseStatus;
|
|
327
|
-
return {
|
|
328
|
-
status: "burned",
|
|
329
|
-
email,
|
|
330
|
-
expiresAt
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Effect-native checkCodexAuthStatus. The Promise version is designed to
|
|
335
|
-
* swallow all I/O errors and report the auth state through the typed status
|
|
336
|
-
* union. The Effect variant wraps that to make it composable; it only fails
|
|
337
|
-
* with CodexAuthCheckError if the underlying call itself throws unexpectedly
|
|
338
|
-
* (i.e., not from the documented "missing/unknown" branches).
|
|
339
|
-
*/
|
|
340
|
-
const checkCodexAuthStatus = (options = {}) => Effect.tryPromise({
|
|
341
|
-
try: () => checkCodexAuthStatusPromise(options),
|
|
342
|
-
catch: (cause) => new CodexAuthCheckError({
|
|
343
|
-
message: cause instanceof Error ? cause.message : String(cause),
|
|
344
|
-
cause
|
|
345
|
-
})
|
|
346
|
-
});
|
|
347
|
-
//#endregion
|
|
348
186
|
//#region routes/origin-validation.ts
|
|
187
|
+
init_conversations();
|
|
188
|
+
init_pty_supervisor_locate();
|
|
189
|
+
init_pty_token();
|
|
190
|
+
init_feature_registry_population();
|
|
191
|
+
init_model_validation();
|
|
192
|
+
init_provider_health();
|
|
193
|
+
init_claude_permissions();
|
|
194
|
+
init_layers();
|
|
195
|
+
init_ohmypi_fifo();
|
|
196
|
+
init_pi_fifo();
|
|
197
|
+
init_stack_health();
|
|
198
|
+
init_launcher_generator();
|
|
199
|
+
init_dag();
|
|
200
|
+
init_staffing();
|
|
201
|
+
init_harness_resolve();
|
|
202
|
+
init_bridge_token();
|
|
203
|
+
init_operator_interventions();
|
|
204
|
+
init_lifecycle_io();
|
|
205
|
+
init_agents$1();
|
|
206
|
+
init_queries();
|
|
349
207
|
let cachedTrustedOrigins;
|
|
350
208
|
function addTrustedOrigin(origins, raw) {
|
|
351
209
|
if (!raw) return;
|
|
@@ -502,29 +360,10 @@ async function waitForSessionRespawn(sessionName, timeoutMs) {
|
|
|
502
360
|
}
|
|
503
361
|
//#endregion
|
|
504
362
|
//#region routes/jsonl-resolver.ts
|
|
505
|
-
init_conversations();
|
|
506
363
|
init_codex_conversation_parser();
|
|
507
364
|
init_ohmypi_conversation_parser();
|
|
508
365
|
init_pi_conversation_parser();
|
|
509
366
|
init_conversation_service();
|
|
510
|
-
init_pty_supervisor_locate();
|
|
511
|
-
init_pty_token();
|
|
512
|
-
init_feature_registry_population();
|
|
513
|
-
init_model_validation();
|
|
514
|
-
init_provider_health();
|
|
515
|
-
init_claude_permissions();
|
|
516
|
-
init_layers();
|
|
517
|
-
init_ohmypi_fifo();
|
|
518
|
-
init_pi_fifo();
|
|
519
|
-
init_stack_health();
|
|
520
|
-
init_launcher_generator();
|
|
521
|
-
init_dag();
|
|
522
|
-
init_staffing();
|
|
523
|
-
init_beads_query();
|
|
524
|
-
init_harness_resolve();
|
|
525
|
-
init_bridge_token();
|
|
526
|
-
init_operator_interventions();
|
|
527
|
-
init_lifecycle_io();
|
|
528
367
|
/**
|
|
529
368
|
* JSONL transcript resolver for the Command Deck (PAN-830).
|
|
530
369
|
*
|
|
@@ -550,7 +389,6 @@ init_lifecycle_io();
|
|
|
550
389
|
* Async-only (fs/promises) because this code path runs inside the dashboard
|
|
551
390
|
* server's event loop.
|
|
552
391
|
*/
|
|
553
|
-
init_agents();
|
|
554
392
|
const transcriptResolutionSignatures = /* @__PURE__ */ new Map();
|
|
555
393
|
function logTranscriptResolution(agentId, signature, message, opts) {
|
|
556
394
|
const signatureKey = `${agentId}:${opts.agentsDirOverride ?? "live"}`;
|
|
@@ -738,7 +576,7 @@ async function resolveCodexRolloutPath(agentId, opts = {}) {
|
|
|
738
576
|
const agentDir = join(opts.agentsDirOverride ?? join(getOverdeckHome(), "agents"), agentId);
|
|
739
577
|
const codexHome = join(agentDir, "codex-home");
|
|
740
578
|
if (!await pathExists$1(codexHome)) return null;
|
|
741
|
-
const { findRolloutPath, findLatestRollout } = await import("./codex-
|
|
579
|
+
const { findRolloutPath, findLatestRollout } = await import("./codex-DxLivxri.js");
|
|
742
580
|
const threadId = (await readOptional(join(agentDir, "codex-thread-id")))?.trim();
|
|
743
581
|
if (threadId) {
|
|
744
582
|
const rollout = findRolloutPath(codexHome, threadId);
|
|
@@ -809,7 +647,7 @@ async function resolveJsonlPath(agentId, workspacePath, opts = {}) {
|
|
|
809
647
|
}
|
|
810
648
|
//#endregion
|
|
811
649
|
//#region ../../lib/work-agent-lifecycle.ts
|
|
812
|
-
init_agents();
|
|
650
|
+
init_agents$1();
|
|
813
651
|
init_tmux();
|
|
814
652
|
async function pathExists(path) {
|
|
815
653
|
try {
|
|
@@ -1102,7 +940,7 @@ async function resolveAgentGitInfo(workspacePath, expectedBranch) {
|
|
|
1102
940
|
//#endregion
|
|
1103
941
|
//#region routes/agents/shared.ts
|
|
1104
942
|
init_paths();
|
|
1105
|
-
init_agents();
|
|
943
|
+
init_agents$1();
|
|
1106
944
|
init_tmux();
|
|
1107
945
|
const execAsync$2 = promisify(exec);
|
|
1108
946
|
const execFileAsync$2 = promisify(execFile);
|
|
@@ -1346,7 +1184,7 @@ function buildStoppedAgentLifecycle(agentOrIssueId, state, runtimeData) {
|
|
|
1346
1184
|
const agentId = normalizeAgentId(agentOrIssueId);
|
|
1347
1185
|
const hasAgentState = true;
|
|
1348
1186
|
const hasLiveTmuxSession = false;
|
|
1349
|
-
const hasSavedSession = !!runtimeData.claudeSessionId;
|
|
1187
|
+
const hasSavedSession = !!runtimeData.claudeSessionId || !!getLatestSessionIdSync(agentId);
|
|
1350
1188
|
const hasWorkspace = typeof state.workspace === "string" && state.workspace.length > 0;
|
|
1351
1189
|
const agentStatus = state.status || "unknown";
|
|
1352
1190
|
const runtime = runtimeData.state || "uninitialized";
|
|
@@ -1585,7 +1423,7 @@ const getAgentJsonlPath = getAgentJsonlPath$1;
|
|
|
1585
1423
|
const getAgentPendingQuestions = getAgentPendingQuestions$1;
|
|
1586
1424
|
//#endregion
|
|
1587
1425
|
//#region routes/agents/listing.ts
|
|
1588
|
-
init_agents();
|
|
1426
|
+
init_agents$1();
|
|
1589
1427
|
init_tmux();
|
|
1590
1428
|
const getAgentsRoute = HttpRouter.add("GET", "/api/agents", httpHandler(Effect.gen(function* () {
|
|
1591
1429
|
const now = Date.now();
|
|
@@ -1816,7 +1654,7 @@ const getAgentHasSessionRoute = HttpRouter.add("GET", "/api/agents/:id/has-sessi
|
|
|
1816
1654
|
//#endregion
|
|
1817
1655
|
//#region routes/agents/conversation.ts
|
|
1818
1656
|
init_paths();
|
|
1819
|
-
init_agents();
|
|
1657
|
+
init_agents$1();
|
|
1820
1658
|
init_tmux();
|
|
1821
1659
|
const getAgentOutputRoute = HttpRouter.add("GET", "/api/agents/:id/output", httpHandler(Effect.gen(function* () {
|
|
1822
1660
|
const id = (yield* HttpRouter.params)["id"] ?? "";
|
|
@@ -1838,7 +1676,7 @@ const getAgentOutputRoute = HttpRouter.add("GET", "/api/agents/:id/output", http
|
|
|
1838
1676
|
} catch {}
|
|
1839
1677
|
let stdout;
|
|
1840
1678
|
if (isRemote && vmName) {
|
|
1841
|
-
const { getRemoteAgentOutput } = await import("./remote-agents-
|
|
1679
|
+
const { getRemoteAgentOutput } = await import("./remote-agents-DYY5fFpd.js");
|
|
1842
1680
|
stdout = await getRemoteAgentOutput(id, vmName, parseInt(String(lines), 10) || 100);
|
|
1843
1681
|
} else stdout = await Effect.runPromise(capturePane(id, parseInt(String(lines), 10) || 100));
|
|
1844
1682
|
if (!stdout || stdout.trim() === "" || stdout.trim() === "Session not found") {
|
|
@@ -1978,7 +1816,7 @@ const getAgentTimelineRoute = HttpRouter.add("GET", "/api/agents/:id/timeline",
|
|
|
1978
1816
|
})));
|
|
1979
1817
|
//#endregion
|
|
1980
1818
|
//#region routes/agents/messaging.ts
|
|
1981
|
-
init_agents();
|
|
1819
|
+
init_agents$1();
|
|
1982
1820
|
async function sendAgentMessage(id, message) {
|
|
1983
1821
|
const remoteStateFile = join(join(homedir(), ".overdeck", "agents", id), "remote-state.json");
|
|
1984
1822
|
let isRemote = false;
|
|
@@ -2259,7 +2097,7 @@ async function cleanupConversationAttachments(name) {
|
|
|
2259
2097
|
* sessions that the lifecycle poller missed. */
|
|
2260
2098
|
async function cleanupOrphanedConversationAttachments() {
|
|
2261
2099
|
try {
|
|
2262
|
-
const { listConversations } = await import("./conversations-
|
|
2100
|
+
const { listConversations } = await import("./conversations-BajHQ60c.js");
|
|
2263
2101
|
const convNames = new Set(listConversations().map((c) => c.name));
|
|
2264
2102
|
const root = getConversationAttachmentsRoot();
|
|
2265
2103
|
await runInBatches((await readdir(root, { withFileTypes: true })).filter((entry) => entry.isDirectory() && !convNames.has(entry.name)).map((entry) => join(root, entry.name)), 10, (path) => rm(path, {
|
|
@@ -2443,7 +2281,7 @@ async function removeConversationAttachment(name, attachmentPath) {
|
|
|
2443
2281
|
//#region ../../lib/overdeck/conversation-runtime.ts
|
|
2444
2282
|
init_projects();
|
|
2445
2283
|
init_tmux();
|
|
2446
|
-
init_agents();
|
|
2284
|
+
init_agents$1();
|
|
2447
2285
|
init_behavior();
|
|
2448
2286
|
init_paths();
|
|
2449
2287
|
const execAsync$1 = promisify(exec);
|
|
@@ -2833,7 +2671,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
|
|
|
2833
2671
|
const codexApprovalPolicy = codexPermMode === "full-access" ? "never" : "on-request";
|
|
2834
2672
|
const codexSandboxMode = codexPermMode === "full-access" ? "danger-full-access" : codexPermMode === "read-only" ? "read-only" : "workspace-write";
|
|
2835
2673
|
const codexApprovalsReviewer = codexPermMode === "auto-review" ? "auto_review" : void 0;
|
|
2836
|
-
const { initCodexHome, extractThreadIdFromRollout } = await import("./codex-
|
|
2674
|
+
const { initCodexHome, extractThreadIdFromRollout } = await import("./codex-DxLivxri.js");
|
|
2837
2675
|
initCodexHome(codexHome, {
|
|
2838
2676
|
trustedDir: cwd,
|
|
2839
2677
|
approvalPolicy: codexApprovalPolicy,
|
|
@@ -2902,7 +2740,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
|
|
|
2902
2740
|
} catch {}
|
|
2903
2741
|
console.log(`[claude-invoke] purpose=conversation-session | model=${model || "default"} | source=conversations.ts:spawnConversationSession | session=${tmuxSession} | resume=${resume} | command="${runtimeCommand}"`);
|
|
2904
2742
|
try {
|
|
2905
|
-
const { preTrustDirectory } = await import("./workspace-manager-
|
|
2743
|
+
const { preTrustDirectory } = await import("./workspace-manager-B1mYn0lN.js");
|
|
2906
2744
|
preTrustDirectory(cwd);
|
|
2907
2745
|
} catch {}
|
|
2908
2746
|
try {
|
|
@@ -2919,7 +2757,7 @@ async function spawnConversationSession(tmuxSession, cwd, claudeSessionId, model
|
|
|
2919
2757
|
const codexHomeDir = codexFields.codexHome;
|
|
2920
2758
|
(async () => {
|
|
2921
2759
|
try {
|
|
2922
|
-
const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-
|
|
2760
|
+
const { waitForCodexRollout, extractThreadIdFromRollout, writeThreadId } = await import("./codex-DxLivxri.js");
|
|
2923
2761
|
const rollout = await waitForCodexRollout(codexHomeDir, 12e4);
|
|
2924
2762
|
if (rollout) {
|
|
2925
2763
|
const threadId = extractThreadIdFromRollout(rollout);
|
|
@@ -3160,7 +2998,7 @@ async function handleConversationRestartAll(deps) {
|
|
|
3160
2998
|
init_conversations();
|
|
3161
2999
|
init_behavior();
|
|
3162
3000
|
init_tmux();
|
|
3163
|
-
init_agents();
|
|
3001
|
+
init_agents$1();
|
|
3164
3002
|
const CONTROL_ACK_TIMEOUT_MS = 1e4;
|
|
3165
3003
|
const pendingConversationControlAcks = /* @__PURE__ */ new Map();
|
|
3166
3004
|
const PLAN_ACTION_KEYSTROKES = {
|
|
@@ -3610,7 +3448,7 @@ async function processPermissionResponse(deps, args) {
|
|
|
3610
3448
|
}
|
|
3611
3449
|
//#endregion
|
|
3612
3450
|
//#region routes/agents/permissions.ts
|
|
3613
|
-
init_agents();
|
|
3451
|
+
init_agents$1();
|
|
3614
3452
|
init_activity_logger();
|
|
3615
3453
|
init_read_model();
|
|
3616
3454
|
const getAgentPendingQuestionsRoute = HttpRouter.add("GET", "/api/agents/:id/pending-questions", httpHandler(Effect.gen(function* () {
|
|
@@ -3673,7 +3511,7 @@ const postInternalAgentPermissionRequestRoute = HttpRouter.add("POST", "/api/int
|
|
|
3673
3511
|
error: "missing agent id"
|
|
3674
3512
|
}, { status: 400 });
|
|
3675
3513
|
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
3676
|
-
const { INTERNAL_TOKEN_HEADER, getInternalTokenSync } = yield* Effect.promise(() => import("./internal-token-
|
|
3514
|
+
const { INTERNAL_TOKEN_HEADER, getInternalTokenSync } = yield* Effect.promise(() => import("./internal-token-D-t28de5.js"));
|
|
3677
3515
|
const expected = getInternalTokenSync();
|
|
3678
3516
|
if (!expected) return jsonResponse({
|
|
3679
3517
|
ok: false,
|
|
@@ -3940,7 +3778,7 @@ const getAgentHealthHistoryRoute = HttpRouter.add("GET", "/api/agents/:id/health
|
|
|
3940
3778
|
const request = yield* HttpServerRequest.HttpServerRequest;
|
|
3941
3779
|
const urlOpt = HttpServerRequest.toURL(request);
|
|
3942
3780
|
const hours = Option.isSome(urlOpt) ? urlOpt.value.searchParams.get("hours") ?? "24" : "24";
|
|
3943
|
-
const { getHealthHistory } = yield* Effect.promise(() => import("./health-events-
|
|
3781
|
+
const { getHealthHistory } = yield* Effect.promise(() => import("./health-events-B0mj6Iae.js"));
|
|
3944
3782
|
const endTime = /* @__PURE__ */ new Date();
|
|
3945
3783
|
const startTime = /* @__PURE__ */ new Date(endTime.getTime() - parseInt(hours) * 60 * 60 * 1e3);
|
|
3946
3784
|
const events = getHealthHistory(id, startTime.toISOString(), endTime.toISOString());
|
|
@@ -3981,7 +3819,7 @@ function emitAgentRuntimeEvent(id, body, timestamp) {
|
|
|
3981
3819
|
detail: String(decoded.failure)
|
|
3982
3820
|
}, { status: 400 })
|
|
3983
3821
|
};
|
|
3984
|
-
const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-
|
|
3822
|
+
const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-BUfovFfB.js"));
|
|
3985
3823
|
yield* (yield* AgentStateService).emit(decoded.success);
|
|
3986
3824
|
return {
|
|
3987
3825
|
ok: true,
|
|
@@ -4047,14 +3885,14 @@ const postAgentStuckRoute = HttpRouter.add("POST", "/api/agents/:id/stuck", http
|
|
|
4047
3885
|
});
|
|
4048
3886
|
})));
|
|
4049
3887
|
function hasNegatedCompletionOutput(output) {
|
|
4050
|
-
return /\b(not|never|no|cannot|can't|blocked|waiting|needs input|not yet|isn't|aren't)\b.{0,48}\b(implementation complete|all
|
|
3888
|
+
return /\b(not|never|no|cannot|can't|blocked|waiting|needs input|not yet|isn't|aren't)\b.{0,48}\b(implementation complete|all tasks closed|ready for review|work complete)\b/i.test(output);
|
|
4051
3889
|
}
|
|
4052
3890
|
const postAgentClassifyCompletionRoute = HttpRouter.add("POST", "/api/agents/:id/classify-completion", httpHandler(Effect.gen(function* () {
|
|
4053
3891
|
const body = yield* readJsonBody$1;
|
|
4054
3892
|
const output = typeof body["output"] === "string" ? body["output"] : "";
|
|
4055
3893
|
return jsonResponse({
|
|
4056
3894
|
success: true,
|
|
4057
|
-
verdict: /blocked|needs input|waiting for|not ready for review/i.test(output) || hasNegatedCompletionOutput(output) ? "STOPPED_FOR_INPUT" : /Implementation complete|all
|
|
3895
|
+
verdict: /blocked|needs input|waiting for|not ready for review/i.test(output) || hasNegatedCompletionOutput(output) ? "STOPPED_FOR_INPUT" : /Implementation complete|all tasks closed|ready for review|work complete/i.test(output) ? "FORGOT_COMPLETION" : "UNCLEAR"
|
|
4058
3896
|
});
|
|
4059
3897
|
})));
|
|
4060
3898
|
const getAgentRuntimeRoute = HttpRouter.add("GET", "/api/agents/:id/runtime", httpHandler(Effect.gen(function* () {
|
|
@@ -4063,7 +3901,7 @@ const getAgentRuntimeRoute = HttpRouter.add("GET", "/api/agents/:id/runtime", ht
|
|
|
4063
3901
|
success: false,
|
|
4064
3902
|
error: "missing agent id"
|
|
4065
3903
|
}, { status: 400 });
|
|
4066
|
-
const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-
|
|
3904
|
+
const { AgentStateService } = yield* Effect.promise(() => import("./agent-state-service-BUfovFfB.js"));
|
|
4067
3905
|
const snapshot = yield* (yield* AgentStateService).get(id);
|
|
4068
3906
|
if (!snapshot) return jsonResponse({
|
|
4069
3907
|
success: false,
|
|
@@ -4090,7 +3928,7 @@ init_workspace_manager();
|
|
|
4090
3928
|
* the in-memory read model stays current.
|
|
4091
3929
|
*/
|
|
4092
3930
|
init_event_store();
|
|
4093
|
-
init_agents();
|
|
3931
|
+
init_agents$1();
|
|
4094
3932
|
init_persistent_logger();
|
|
4095
3933
|
function prepareAgentStateForSave(state) {
|
|
4096
3934
|
if (state.status === "running" || state.status === "starting") delete state.stoppedAt;
|
|
@@ -4158,7 +3996,7 @@ function saveAgentStateAndEmitEventWithDeps(db, eventStore, state, event) {
|
|
|
4158
3996
|
}
|
|
4159
3997
|
//#endregion
|
|
4160
3998
|
//#region routes/agents/lifecycle-stop.ts
|
|
4161
|
-
init_agents();
|
|
3999
|
+
init_agents$1();
|
|
4162
4000
|
init_activity_logger();
|
|
4163
4001
|
init_tmux();
|
|
4164
4002
|
init_domain_services();
|
|
@@ -4176,8 +4014,8 @@ function createAgentStopHandler(lifecycleEvent) {
|
|
|
4176
4014
|
yield* stopAgent(id);
|
|
4177
4015
|
if (stateBeforeStop?.issueId) yield* Effect.promise(async () => {
|
|
4178
4016
|
try {
|
|
4179
|
-
const { resolveProjectFromIssueSync } = await import("./projects-
|
|
4180
|
-
const { findWorkspacePath } = await import("./archive-planning-
|
|
4017
|
+
const { resolveProjectFromIssueSync } = await import("./projects-Dc9aoVoG.js");
|
|
4018
|
+
const { findWorkspacePath } = await import("./archive-planning-D-QsBufn.js");
|
|
4181
4019
|
const issueLower = stateBeforeStop.issueId.toLowerCase();
|
|
4182
4020
|
const workspacePath = findWorkspacePath(resolveProjectFromIssueSync(stateBeforeStop.issueId)?.projectPath ?? process.cwd(), issueLower);
|
|
4183
4021
|
if (workspacePath) {
|
|
@@ -4348,7 +4186,7 @@ const postAgentUntroubledRoute = HttpRouter.add("POST", "/api/agents/:id/untroub
|
|
|
4348
4186
|
//#endregion
|
|
4349
4187
|
//#region routes/agents/lifecycle-restart.ts
|
|
4350
4188
|
init_config_yaml();
|
|
4351
|
-
init_agents();
|
|
4189
|
+
init_agents$1();
|
|
4352
4190
|
init_harness_policy();
|
|
4353
4191
|
init_operator_interventions();
|
|
4354
4192
|
init_projects();
|
|
@@ -4635,9 +4473,14 @@ const postAgentRestartFreshRoute = HttpRouter.add("POST", "/api/agents/:id/resta
|
|
|
4635
4473
|
const agentState = yield* getAgentState(id);
|
|
4636
4474
|
if (!agentState) return jsonResponse({ error: `Agent ${id} not found` }, { status: 404 });
|
|
4637
4475
|
const issueId = agentState.issueId ?? id.replace(/^agent-/, "").toUpperCase();
|
|
4476
|
+
const issueStage = getIssueStageSync(issueId);
|
|
4477
|
+
if (wantsSpawn && isTerminalIssueStage(issueStage)) return jsonResponse({
|
|
4478
|
+
error: `${issueId} is already ${issueStage?.replaceAll("_", " ")}. Reopen the issue before starting fresh work.`,
|
|
4479
|
+
issueStage
|
|
4480
|
+
}, { status: 409 });
|
|
4638
4481
|
const lifecycle = yield* getWorkAgentLifecycleState(id);
|
|
4639
4482
|
if (lifecycle.hasLiveTmuxSession) return jsonResponse({
|
|
4640
|
-
error: `Agent ${id} has a live tmux session. Run 'pan kill ${
|
|
4483
|
+
error: `Agent ${id} has a live tmux session. Run 'pan kill ${id}' to stop only this work agent, then retry.`,
|
|
4641
4484
|
lifecycle
|
|
4642
4485
|
}, { status: 409 });
|
|
4643
4486
|
yield* Effect.promise(() => appendAgentLifecycleLog(id, "agent.restart_fresh_requested", {
|
|
@@ -4700,9 +4543,21 @@ const postAgentRestartFreshRoute = HttpRouter.add("POST", "/api/agents/:id/resta
|
|
|
4700
4543
|
cwd: workspacePath
|
|
4701
4544
|
}));
|
|
4702
4545
|
} catch (err) {
|
|
4546
|
+
saveAgentStateSync({
|
|
4547
|
+
id: agentSessionName,
|
|
4548
|
+
issueId,
|
|
4549
|
+
workspace: workspacePath,
|
|
4550
|
+
harness: effectiveHarness ?? agentState.harness ?? "claude-code",
|
|
4551
|
+
role: "work",
|
|
4552
|
+
model: spawnModel,
|
|
4553
|
+
status: "stopped",
|
|
4554
|
+
startedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4555
|
+
stoppedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4556
|
+
});
|
|
4703
4557
|
return jsonResponse({
|
|
4704
4558
|
success: false,
|
|
4705
|
-
error:
|
|
4559
|
+
error: "The old agent state was cleared, but the fresh agent could not start. Resolve the startup blocker, then try again.",
|
|
4560
|
+
details: err?.message ?? String(err),
|
|
4706
4561
|
wiped: wipeResult.removed
|
|
4707
4562
|
}, { status: 500 });
|
|
4708
4563
|
}
|
|
@@ -4888,6 +4743,7 @@ async function resolveCurrentStaffing(agentId, agentState, issueId) {
|
|
|
4888
4743
|
const staffing = resolveStaffing(workItem, {
|
|
4889
4744
|
planMetadata: plan.plan.metadata,
|
|
4890
4745
|
spawnKey: `work:${issueId.toLowerCase()}`,
|
|
4746
|
+
issueId,
|
|
4891
4747
|
config: {
|
|
4892
4748
|
...config,
|
|
4893
4749
|
tieredExecution: {
|
|
@@ -4984,7 +4840,7 @@ init_config();
|
|
|
4984
4840
|
init_jsonl_parser();
|
|
4985
4841
|
init_model_validation();
|
|
4986
4842
|
init_paths();
|
|
4987
|
-
init_agents();
|
|
4843
|
+
init_agents$1();
|
|
4988
4844
|
const getAgentCloisterHealthRoute = HttpRouter.add("GET", "/api/agents/:id/cloister-health", httpHandler(Effect.gen(function* () {
|
|
4989
4845
|
const id = (yield* HttpRouter.params)["id"] ?? "";
|
|
4990
4846
|
const health = getCloisterService().getAgentHealth(id);
|
|
@@ -5136,6 +4992,7 @@ const postAgentSwitchModelRoute = HttpRouter.add("POST", "/api/agents/:id/switch
|
|
|
5136
4992
|
//#endregion
|
|
5137
4993
|
//#region ../../lib/vbrief/auto-synthesize.ts
|
|
5138
4994
|
init_state_read_home();
|
|
4995
|
+
init_codex_auth();
|
|
5139
4996
|
init_state_home();
|
|
5140
4997
|
init_io();
|
|
5141
4998
|
function cleanMarkdownLine(line) {
|
|
@@ -5255,19 +5112,19 @@ const writeAutoStartVBrief = (projectRoot, workspacePath, issue) => Effect.tryPr
|
|
|
5255
5112
|
//#region routes/agents/spawn-helpers.ts
|
|
5256
5113
|
init_issue_lifecycle();
|
|
5257
5114
|
init_child_env();
|
|
5258
|
-
init_agents();
|
|
5115
|
+
init_agents$1();
|
|
5259
5116
|
function handleRemoteAgentSpawn(input) {
|
|
5260
5117
|
return Effect.gen(function* () {
|
|
5261
5118
|
const { issueId, workspacePath, workspaceMetadata, spawnModel, projectPath, spawnGuardrails, lifecycle } = input;
|
|
5262
|
-
const { spawnRemoteAgent, checkRemoteSpendCap } = yield* Effect.promise(() => import("./remote-agents-
|
|
5263
|
-
const { createFlyProviderFromConfig } = yield* Effect.promise(() => import("./remote-
|
|
5264
|
-
const { loadConfigSync: loadPanConfig } = yield* Effect.promise(() => import("./config-
|
|
5119
|
+
const { spawnRemoteAgent, checkRemoteSpendCap } = yield* Effect.promise(() => import("./remote-agents-DYY5fFpd.js"));
|
|
5120
|
+
const { createFlyProviderFromConfig } = yield* Effect.promise(() => import("./remote-Cvu4CSDk.js"));
|
|
5121
|
+
const { loadConfigSync: loadPanConfig } = yield* Effect.promise(() => import("./config-6MCHOZ2N.js"));
|
|
5265
5122
|
const panConfig = loadPanConfig();
|
|
5266
5123
|
const spendCap = checkRemoteSpendCap(panConfig);
|
|
5267
5124
|
if (!spendCap.allowed) return jsonResponse({ error: spendCap.message }, { status: 429 });
|
|
5268
5125
|
const fly = createFlyProviderFromConfig(panConfig.remote);
|
|
5269
5126
|
yield* Effect.promise(() => fly.syncAllCredentials(workspaceMetadata.vmName));
|
|
5270
|
-
const { buildWorkAgentPrompt, getTrackerContext } = yield* Effect.promise(() => import("./work-agent-prompt-
|
|
5127
|
+
const { buildWorkAgentPrompt, getTrackerContext } = yield* Effect.promise(() => import("./work-agent-prompt-BiJ43Der.js"));
|
|
5271
5128
|
const trackerContext = yield* Effect.promise(() => getTrackerContext(issueId, workspacePath));
|
|
5272
5129
|
const agentPrompt = yield* Effect.promise(() => buildWorkAgentPrompt({
|
|
5273
5130
|
issueId,
|
|
@@ -5582,7 +5439,7 @@ function handleContainerOrchestration(input) {
|
|
|
5582
5439
|
}
|
|
5583
5440
|
//#endregion
|
|
5584
5441
|
//#region routes/agents/spawn.ts
|
|
5585
|
-
init_agents();
|
|
5442
|
+
init_agents$1();
|
|
5586
5443
|
init_child_env();
|
|
5587
5444
|
init_harness_policy();
|
|
5588
5445
|
init_activity_logger();
|
|
@@ -5614,45 +5471,6 @@ function spawnGuardrailResourcesHint(hint) {
|
|
|
5614
5471
|
const resourcesHint = "Open /resources to inspect Machine Room pressure before retrying.";
|
|
5615
5472
|
return hint ? `${hint} ${resourcesHint}` : resourcesHint;
|
|
5616
5473
|
}
|
|
5617
|
-
/**
|
|
5618
|
-
* Count materialized beads for an issue by shelling out to `bd list`.
|
|
5619
|
-
*
|
|
5620
|
-
* Returns 0 on ANY bd failure — non-zero exit (e.g. bd refusing with "Linear
|
|
5621
|
-
* data has never been pulled"), an unparseable JSON body, or the 10s timeout.
|
|
5622
|
-
* The caller treats 0 as "no beads yet" and falls through to auto-recovery
|
|
5623
|
-
* (createBeadsFromVBrief) and, failing that, a clean 422 `beads_required`.
|
|
5624
|
-
*
|
|
5625
|
-
* The failure is folded into the success channel with `Effect.matchCause`. A
|
|
5626
|
-
* bare `try/catch` around `yield* withBdMutex(...)` does NOT work: withBdMutex
|
|
5627
|
-
* converts the child-process rejection into an Effect error-channel failure
|
|
5628
|
-
* (via its internal `Effect.tryPromise`), which short-circuits the fiber and is
|
|
5629
|
-
* invisible to a JS `try/catch`. Before this helper, that escaped as an
|
|
5630
|
-
* unhandled 500 on POST /api/agents instead of the designed 422.
|
|
5631
|
-
*/
|
|
5632
|
-
const countBeadsForIssue = (workspacePath, issueLower) => withBdMutex(() => Effect.promise(() => execFileAsync$2("bd", [
|
|
5633
|
-
"list",
|
|
5634
|
-
"--json",
|
|
5635
|
-
"-l",
|
|
5636
|
-
issueLower,
|
|
5637
|
-
"--status",
|
|
5638
|
-
"all",
|
|
5639
|
-
"--limit",
|
|
5640
|
-
"0"
|
|
5641
|
-
], {
|
|
5642
|
-
cwd: workspacePath,
|
|
5643
|
-
encoding: "utf-8",
|
|
5644
|
-
timeout: 1e4
|
|
5645
|
-
}))).pipe(Effect.matchCause({
|
|
5646
|
-
onFailure: () => 0,
|
|
5647
|
-
onSuccess: ({ stdout }) => {
|
|
5648
|
-
try {
|
|
5649
|
-
const bdTasks = JSON.parse(stdout.trim() || "[]");
|
|
5650
|
-
return Array.isArray(bdTasks) ? bdTasks.length : 0;
|
|
5651
|
-
} catch {
|
|
5652
|
-
return 0;
|
|
5653
|
-
}
|
|
5654
|
-
}
|
|
5655
|
-
}));
|
|
5656
5474
|
const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect.gen(function* () {
|
|
5657
5475
|
const originCheck = validateOrigin(yield* HttpServerRequest.HttpServerRequest);
|
|
5658
5476
|
if (!originCheck.ok) return jsonResponse({
|
|
@@ -5734,13 +5552,6 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
|
|
|
5734
5552
|
}
|
|
5735
5553
|
const workspacePanDir = join(workspacePath, PAN_DIRNAME);
|
|
5736
5554
|
const workspacePanContinuePath = join(workspacePanDir, PAN_CONTINUE_FILENAME);
|
|
5737
|
-
const workspaceBeadsDir = join(workspacePath, ".beads");
|
|
5738
|
-
if (!existsSync(workspaceBeadsDir)) {
|
|
5739
|
-
const projectRootBeadsDir = join(projectPath, ".beads");
|
|
5740
|
-
if (existsSync(projectRootBeadsDir)) try {
|
|
5741
|
-
yield* Effect.promise(() => cp(projectRootBeadsDir, workspaceBeadsDir, { recursive: true }));
|
|
5742
|
-
} catch {}
|
|
5743
|
-
}
|
|
5744
5555
|
let planPath = yield* findPlan(workspacePath);
|
|
5745
5556
|
if (autoStart && !planPath) {
|
|
5746
5557
|
yield* writeAutoStartVBrief(projectPath, workspacePath, {
|
|
@@ -5752,7 +5563,7 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
|
|
|
5752
5563
|
planPath = yield* findPlan(workspacePath);
|
|
5753
5564
|
}
|
|
5754
5565
|
if (!planPath) return jsonResponse({
|
|
5755
|
-
error: `No workspace vBRIEF found for ${issueId}. Work agents require a finalized plan
|
|
5566
|
+
error: `No workspace vBRIEF found for ${issueId}. Work agents require a finalized plan.`,
|
|
5756
5567
|
hint: "Run planning first, or use auto-start to synthesize a plan before starting the work agent.",
|
|
5757
5568
|
issueId
|
|
5758
5569
|
}, { status: 422 });
|
|
@@ -5783,44 +5594,11 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
|
|
|
5783
5594
|
expectedIssue: issueId,
|
|
5784
5595
|
actualIssue: planIssueId.toUpperCase()
|
|
5785
5596
|
}, { status: 422 });
|
|
5786
|
-
|
|
5787
|
-
if (planItemCount === 0) return jsonResponse({
|
|
5597
|
+
if ((planDoc?.plan?.items?.length ?? 0) === 0) return jsonResponse({
|
|
5788
5598
|
error: "Plan exists but contains no items. Planning may have failed or produced an empty plan.",
|
|
5789
5599
|
hint: "Re-run planning to produce a plan with tasks and acceptance criteria.",
|
|
5790
5600
|
issueId
|
|
5791
5601
|
}, { status: 422 });
|
|
5792
|
-
let beadCount = yield* countBeadsForIssue(workspacePath, issueLower);
|
|
5793
|
-
let hasBeads = beadCount > 0;
|
|
5794
|
-
if (planItemCount !== null && planItemCount > 0 && beadCount !== planItemCount) hasBeads = false;
|
|
5795
|
-
let recoveryError = null;
|
|
5796
|
-
if (!hasBeads) {
|
|
5797
|
-
console.log(`[agents] No beads for ${issueId} — attempting auto-recovery via createBeadsFromVBrief`);
|
|
5798
|
-
try {
|
|
5799
|
-
const { createBeadsFromVBrief } = yield* Effect.promise(() => import("./beads-B1u04n3o.js"));
|
|
5800
|
-
const recovery = yield* createBeadsFromVBrief(workspacePath);
|
|
5801
|
-
beadCount = recovery.created.length;
|
|
5802
|
-
hasBeads = recovery.created.length > 0 && (planItemCount === null || recovery.created.length === planItemCount);
|
|
5803
|
-
if (hasBeads) console.log(`[agents] Auto-recovery created ${recovery.created.length} beads for ${issueId}`);
|
|
5804
|
-
else if (recovery.created.length > 0 && planItemCount !== null) recoveryError = `created ${recovery.created.length} beads, but vBRIEF has ${planItemCount} plan items`;
|
|
5805
|
-
else if (recovery.errors.length > 0) {
|
|
5806
|
-
recoveryError = recovery.errors[0] ?? "Unknown error during beads creation";
|
|
5807
|
-
console.warn(`[agents] Auto-recovery errors: ${recovery.errors.join(", ")}`);
|
|
5808
|
-
} else recoveryError = "createBeadsFromVBrief returned no beads and no errors";
|
|
5809
|
-
} catch (recoveryErr) {
|
|
5810
|
-
recoveryError = recoveryErr.message;
|
|
5811
|
-
console.warn(`[agents] Auto-recovery failed: ${recoveryErr.message}`);
|
|
5812
|
-
}
|
|
5813
|
-
}
|
|
5814
|
-
if (!hasBeads) {
|
|
5815
|
-
const detail = recoveryError ? ` Beads recovery failed: ${recoveryError}.` : " No beads exist for this issue.";
|
|
5816
|
-
console.warn(`[agents] Refusing to start work agent for ${issueId} without beads.${detail}`);
|
|
5817
|
-
return jsonResponse({
|
|
5818
|
-
success: false,
|
|
5819
|
-
error: "beads_required",
|
|
5820
|
-
message: `Cannot start work agent for ${issueId} without beads.${detail} Re-run planning so beads can be materialized from the vBRIEF plan, then retry.`,
|
|
5821
|
-
...recoveryError ? { recoveryError } : {}
|
|
5822
|
-
}, { status: 422 });
|
|
5823
|
-
}
|
|
5824
5602
|
const health = yield* readModel.getSnapshot.pipe(Effect.flatMap((snapshot) => Effect.promise(() => getSystemHealthSnapshot(snapshot))));
|
|
5825
5603
|
emitStartAgentPhase(issueId, "guardrails", "start", "evaluating spawn guardrails");
|
|
5826
5604
|
const spawnGuardrails = evaluateSpawnGuardrails(health);
|
|
@@ -5864,7 +5642,7 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
|
|
|
5864
5642
|
return jsonResponse({ error: err instanceof Error ? err.message : String(err) }, { status: 400 });
|
|
5865
5643
|
}
|
|
5866
5644
|
if ((yield* Effect.promise(() => getProviderAuthMode(spawnModel))) === "subscription") {
|
|
5867
|
-
const codexAuth = yield* checkCodexAuthStatus();
|
|
5645
|
+
const codexAuth = yield* checkCodexAuthStatus({ agentStates: listAgentStates() });
|
|
5868
5646
|
if (codexAuth.status === "expired" || codexAuth.status === "burned") return jsonResponse({
|
|
5869
5647
|
success: false,
|
|
5870
5648
|
blocked: true,
|
|
@@ -5951,10 +5729,6 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
|
|
|
5951
5729
|
encoding: "utf-8"
|
|
5952
5730
|
}));
|
|
5953
5731
|
}
|
|
5954
|
-
if (existsSync(join(gitRoot, ".beads"))) yield* Effect.promise(() => execAsync$2(`git add .beads/`, {
|
|
5955
|
-
cwd: gitRoot,
|
|
5956
|
-
encoding: "utf-8"
|
|
5957
|
-
}));
|
|
5958
5732
|
if (yield* Effect.promise(() => execAsync$2(`git diff --cached --quiet`, {
|
|
5959
5733
|
cwd: gitRoot,
|
|
5960
5734
|
encoding: "utf-8"
|
|
@@ -5986,7 +5760,7 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
|
|
|
5986
5760
|
console.warn(`[start-agent] Failed to set plan.status=running (non-fatal): ${planStatusErr?.message ?? planStatusErr}`);
|
|
5987
5761
|
}
|
|
5988
5762
|
try {
|
|
5989
|
-
const { appendSessionEntry, getProjectConfigFromWorkspacePath, resolveProjectForIssue } = yield* Effect.promise(() => import("./record-
|
|
5763
|
+
const { appendSessionEntry, getProjectConfigFromWorkspacePath, resolveProjectForIssue } = yield* Effect.promise(() => import("./record-DLOqfbkI.js"));
|
|
5990
5764
|
const recordProject = resolveProjectForIssue(issueId) ?? getProjectConfigFromWorkspacePath(workspacePath);
|
|
5991
5765
|
yield* Effect.promise(() => appendSessionEntry(recordProject, issueId, {
|
|
5992
5766
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -6234,38 +6008,6 @@ const postAgentsRoute = HttpRouter.add("POST", "/api/agents", httpHandler(Effect
|
|
|
6234
6008
|
*/
|
|
6235
6009
|
const agentsRouteLayer = Layer.mergeAll(getAgentsRoute, getAgentOutputRoute, getAgentConversationRoute, postAgentMessageRoute, postAgentTellRoute, deleteAgentRoute, postAgentStopRoute, getAgentHealthHistoryRoute, postAgentPokeRoute, getAgentPendingQuestionsRoute, postAgentAnswerQuestionRoute, postAgentPlanActionRoute, postAgentHeartbeatRoute, postAgentWorkCompleteRoute, postAgentStuckRoute, postAgentClassifyCompletionRoute, postInternalAgentPermissionRequestRoute, postAgentPermissionResponseRoute, getAgentRuntimeRoute, getAgentGitInfoRoute, getAgentActivityRoute, getAgentFilesRoute, getAgentTimelineRoute, postAgentSuspendRoute, postAgentPauseRoute, postAgentUnpauseRoute, postAgentUntroubledRoute, postAgentResumeRoute, postAgentRecoverRoute, postAgentRestartRoute, getAgentCloisterHealthRoute, getAgentHandoffSuggestionRoute, postAgentHandoffRoute, getAgentCostRoute, postAgentsRoute, postAgentsRestartAllRoute, getAgentTmuxAliveRoute, getAgentHasSessionRoute, postAgentResetSessionRoute, postAgentSwitchModelRoute, postAgentRestartFreshRoute, postAgentDeliveryMethodRoute, getAgentsRestartConfigRoute, postAgentsRestartWithConfigRoute);
|
|
6236
6010
|
//#endregion
|
|
6237
|
-
//#region ../../lib/cloister/task-readiness.ts
|
|
6238
|
-
init_io();
|
|
6239
|
-
const TERMINAL_STATUSES = ["completed", "cancelled"];
|
|
6240
|
-
/**
|
|
6241
|
-
* Returns the list of item IDs that are newly unblocked after `justCompletedId`
|
|
6242
|
-
* reaches a terminal status.
|
|
6243
|
-
*
|
|
6244
|
-
* "Newly unblocked" means: the item was not ready before (had at least one
|
|
6245
|
-
* non-terminal blocker) and is now ready after this completion.
|
|
6246
|
-
*
|
|
6247
|
-
* Returns [] when no plan exists.
|
|
6248
|
-
*/
|
|
6249
|
-
function getUnblockedItemsSync(workspacePath, justCompletedId) {
|
|
6250
|
-
const doc = readWorkspacePlanSync(workspacePath);
|
|
6251
|
-
if (!doc) return [];
|
|
6252
|
-
const itemById = new Map(doc.plan.items.map((i) => [i.id, i]));
|
|
6253
|
-
const directlyUnblocking = doc.plan.edges.filter((e) => e.type === "blocks" && e.from === justCompletedId).map((e) => e.to);
|
|
6254
|
-
const unblocked = [];
|
|
6255
|
-
for (const candidateId of directlyUnblocking) {
|
|
6256
|
-
const candidate = itemById.get(candidateId);
|
|
6257
|
-
if (!candidate) continue;
|
|
6258
|
-
if (TERMINAL_STATUSES.includes(candidate.status)) continue;
|
|
6259
|
-
if (doc.plan.edges.filter((e) => e.type === "blocks" && e.to === candidateId).map((e) => e.from).every((blockerId) => {
|
|
6260
|
-
const blocker = itemById.get(blockerId);
|
|
6261
|
-
if (!blocker) return true;
|
|
6262
|
-
if (blockerId === justCompletedId) return true;
|
|
6263
|
-
return TERMINAL_STATUSES.includes(blocker.status);
|
|
6264
|
-
})) unblocked.push(candidateId);
|
|
6265
|
-
}
|
|
6266
|
-
return unblocked;
|
|
6267
|
-
}
|
|
6268
|
-
//#endregion
|
|
6269
6011
|
//#region routes/tiered-inspect-escalation.ts
|
|
6270
6012
|
init_tier_escalation();
|
|
6271
6013
|
init_tier_table();
|
|
@@ -6289,18 +6031,18 @@ function handleTieredInspectFailureEscalation(issueId, notes, deps = {}) {
|
|
|
6289
6031
|
if (!exists(workspacePath)) return null;
|
|
6290
6032
|
const doc = readPlan(workspacePath);
|
|
6291
6033
|
if (!resolveTieredExecutionEnabled(tiered, doc?.plan.metadata)) return null;
|
|
6292
|
-
const
|
|
6293
|
-
if (!doc || !
|
|
6294
|
-
const item = doc.plan.items.find((candidate) => candidate.id ===
|
|
6034
|
+
const taskId = notes?.match(/[Bb]ead\s+(\S+)/)?.[1];
|
|
6035
|
+
if (!doc || !taskId) return null;
|
|
6036
|
+
const item = doc.plan.items.find((candidate) => candidate.id === taskId);
|
|
6295
6037
|
if (!item) return null;
|
|
6296
6038
|
const overrides = readOverrides(workspacePath);
|
|
6297
6039
|
const decision = decide({
|
|
6298
6040
|
kind: "supervisor-blocked",
|
|
6299
|
-
|
|
6041
|
+
taskId,
|
|
6300
6042
|
sha: getReviewStatusSync(issueId)?.reviewedAtCommit ?? "unknown",
|
|
6301
6043
|
attemptsAtCurrentTier: tiered.escalation.retries_at_tier
|
|
6302
6044
|
}, item, tiered.escalation, overrides);
|
|
6303
|
-
if (decision.action === "promote") recordPromotion(workspacePath,
|
|
6045
|
+
if (decision.action === "promote") recordPromotion(workspacePath, taskId, decision.from, decision.to, decision.reason);
|
|
6304
6046
|
return decision;
|
|
6305
6047
|
}
|
|
6306
6048
|
async function reportTieredInspectFailureEscalation(issueId, notes, deps = {}) {
|
|
@@ -6404,10 +6146,10 @@ const _serverManagedMerges = /* @__PURE__ */ new Set();
|
|
|
6404
6146
|
function firePostMergeLifecycle(issueId, options) {
|
|
6405
6147
|
const started = postMergeGuard.run(issueId, async () => {
|
|
6406
6148
|
const projectPath = getProjectPathForIssue(extractPrefixSync(issueId) ?? issueId.split("-")[0]);
|
|
6407
|
-
const { postMergeLifecycle } = await import("./merge-agent-
|
|
6149
|
+
const { postMergeLifecycle } = await import("./merge-agent-DMQTJMP0.js");
|
|
6408
6150
|
await postMergeLifecycle(issueId, projectPath, options?.sourceBranch, options?.verifiedMergedRef ? { verifiedMergedRef: options.verifiedMergedRef } : void 0);
|
|
6409
6151
|
console.log(`[merge] post-merge lifecycle completed for ${issueId}`);
|
|
6410
|
-
const { runMergeTrainReconcile } = await import("./merge-train-
|
|
6152
|
+
const { runMergeTrainReconcile } = await import("./merge-train-DJgr81tF.js");
|
|
6411
6153
|
const outcomes = await runMergeTrainReconcile(issueId);
|
|
6412
6154
|
if (outcomes.length > 0) console.log(`[merge-train] reconciled ${outcomes.length} sibling(s) after ${issueId}: ` + outcomes.map((o) => `${o.issueId}=${o.result}`).join(", "));
|
|
6413
6155
|
}, (err) => console.error(`[merge] post-merge lifecycle failed for ${issueId}:`, err));
|
|
@@ -6421,22 +6163,21 @@ function getProjectPathForIssue(issuePrefix) {
|
|
|
6421
6163
|
}
|
|
6422
6164
|
//#endregion
|
|
6423
6165
|
//#region routes/specialists/legacy-routes.ts
|
|
6424
|
-
init_agents();
|
|
6166
|
+
init_agents$1();
|
|
6425
6167
|
init_projects();
|
|
6426
6168
|
init_review_status();
|
|
6427
|
-
init_io();
|
|
6428
6169
|
init_domain_services();
|
|
6429
6170
|
init_tmux();
|
|
6430
6171
|
const getSpecialistsRoute = HttpRouter.add("GET", "/api/specialists", httpHandler(Effect.gen(function* () {
|
|
6431
|
-
const { getAllSpecialistStatus, getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-
|
|
6172
|
+
const { getAllSpecialistStatus, getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
6432
6173
|
return jsonResponse({
|
|
6433
6174
|
specialists: yield* Effect.promise(() => getAllSpecialistStatus()),
|
|
6434
6175
|
projects: yield* Effect.promise(() => getAllProjectSpecialistStatuses())
|
|
6435
6176
|
});
|
|
6436
6177
|
})));
|
|
6437
6178
|
const postSpecialistsResetAllRoute = HttpRouter.add("POST", "/api/specialists/reset-all", httpHandler(Effect.gen(function* () {
|
|
6438
|
-
const { getAllSpecialists, isRunning, getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-
|
|
6439
|
-
const { clearHookSync } = yield* Effect.promise(() => import("./hooks-
|
|
6179
|
+
const { getAllSpecialists, isRunning, getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
6180
|
+
const { clearHookSync } = yield* Effect.promise(() => import("./hooks-BDcQJDUe.js"));
|
|
6440
6181
|
const specialists = getAllSpecialists();
|
|
6441
6182
|
const results = [];
|
|
6442
6183
|
for (const specialist of specialists) {
|
|
@@ -6486,7 +6227,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6486
6227
|
const normalizedIssueId = issueId.toUpperCase();
|
|
6487
6228
|
console.log(`[specialists/done] ${specialist} signaling ${status} for ${normalizedIssueId}`);
|
|
6488
6229
|
if (specialist === "merge") {
|
|
6489
|
-
const { reportSpecialistCompletion } = yield* Effect.promise(() => import("./specialist-completion-
|
|
6230
|
+
const { reportSpecialistCompletion } = yield* Effect.promise(() => import("./specialist-completion-pJtESo7m.js"));
|
|
6490
6231
|
if (yield* reportSpecialistCompletion(normalizedIssueId, {
|
|
6491
6232
|
status,
|
|
6492
6233
|
notes
|
|
@@ -6533,7 +6274,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6533
6274
|
if (specialist === "inspect" && status === "failed") yield* Effect.promise(() => reportTieredInspectFailureEscalation(normalizedIssueId, notes));
|
|
6534
6275
|
yield* Effect.promise(async () => {
|
|
6535
6276
|
try {
|
|
6536
|
-
const { getTmuxSessionName, updateRunMetadata, makeSpecialistRegistryKey } = await import("./specialists-
|
|
6277
|
+
const { getTmuxSessionName, updateRunMetadata, makeSpecialistRegistryKey } = await import("./specialists-D9-dMUtI.js");
|
|
6537
6278
|
const projectKey = resolveProjectFromIssueSync(normalizedIssueId)?.projectKey;
|
|
6538
6279
|
const tmuxSession = projectKey ? getTmuxSessionName(`${specialist}-agent`, projectKey, normalizedIssueId) : getTmuxSessionName(`${specialist}-agent`);
|
|
6539
6280
|
saveAgentRuntimeState(tmuxSession, {
|
|
@@ -6552,7 +6293,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6552
6293
|
});
|
|
6553
6294
|
console.log(`[specialists/done] Cleared registry lock for ${registryKey} (${projectKey})`);
|
|
6554
6295
|
}
|
|
6555
|
-
const { updateSpecialistHandoffStatus } = await import("./specialist-handoff-logger-
|
|
6296
|
+
const { updateSpecialistHandoffStatus } = await import("./specialist-handoff-logger-Duz9RGvk.js");
|
|
6556
6297
|
if (await Effect.runPromise(updateSpecialistHandoffStatus(normalizedIssueId, `${specialist}-agent`, status === "passed" ? "completed" : "failed", status === "passed" ? "success" : "failure"))) console.log(`[specialists/done] Updated handoff log: ${specialist}-agent ${normalizedIssueId} → ${status}`);
|
|
6557
6298
|
} catch (err) {
|
|
6558
6299
|
console.error(`[specialists/done] Error managing specialist state:`, err);
|
|
@@ -6564,7 +6305,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6564
6305
|
if (project) {
|
|
6565
6306
|
const workspacePath = join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`);
|
|
6566
6307
|
if (existsSync(workspacePath)) {
|
|
6567
|
-
const { getWorkspaceGitInfo } = await import("./git-utils-
|
|
6308
|
+
const { getWorkspaceGitInfo } = await import("./git-utils-q8jNoBts.js");
|
|
6568
6309
|
const { HEAD } = await Effect.runPromise(getWorkspaceGitInfo(workspacePath));
|
|
6569
6310
|
setReviewStatusSync(normalizedIssueId, { reviewedAtCommit: HEAD });
|
|
6570
6311
|
console.log(`[specialists/done] Snapshotted reviewedAtCommit=${HEAD.substring(0, 8)} for ${normalizedIssueId}`);
|
|
@@ -6576,40 +6317,12 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6576
6317
|
});
|
|
6577
6318
|
if (specialist === "inspect" && status === "passed") yield* Effect.promise(async () => {
|
|
6578
6319
|
try {
|
|
6579
|
-
const { onInspectComplete } = await import("./inspect-agent-
|
|
6580
|
-
const
|
|
6320
|
+
const { onInspectComplete } = await import("./inspect-agent-DCJQm9Wu.js");
|
|
6321
|
+
const taskId = (notes?.match(/[Bb]ead\s+(\S+)/))?.[1] || "unknown";
|
|
6581
6322
|
const project = resolveProjectFromIssueSync(normalizedIssueId);
|
|
6582
6323
|
if (project) {
|
|
6583
6324
|
const workspacePath = join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`);
|
|
6584
|
-
if (existsSync(workspacePath))
|
|
6585
|
-
await Effect.runPromise(onInspectComplete(project.projectKey, normalizedIssueId, beadId, "passed", workspacePath));
|
|
6586
|
-
try {
|
|
6587
|
-
const beadData = await Effect.runPromise(queryBeadById(workspacePath, beadId));
|
|
6588
|
-
const updatedItemId = await Effect.runPromise(syncBeadStatusToVBrief(beadId, workspacePath, "completed", beadData?.title));
|
|
6589
|
-
if (updatedItemId) try {
|
|
6590
|
-
const unblockedItems = getUnblockedItemsSync(workspacePath, updatedItemId);
|
|
6591
|
-
if (unblockedItems.length > 0) {
|
|
6592
|
-
console.log(`[auto-wake] ${normalizedIssueId}: items unblocked after "${updatedItemId}": ${unblockedItems.join(", ")}`);
|
|
6593
|
-
const workAgentId = `agent-${normalizedIssueId.toLowerCase()}`;
|
|
6594
|
-
const doc = readWorkspacePlanSync(workspacePath);
|
|
6595
|
-
const unblockedTitles = unblockedItems.map((id) => {
|
|
6596
|
-
const it = doc?.plan.items.find((i) => i.id === id);
|
|
6597
|
-
return it ? `"${it.title}"` : `"${id}"`;
|
|
6598
|
-
}).join(", ");
|
|
6599
|
-
await messageAgent(workAgentId, `DAG SCHEDULER: Task${unblockedItems.length > 1 ? "s" : ""} now unblocked after completing "${updatedItemId}": ${unblockedTitles}. Pick up the next available task.`).catch((err) => {
|
|
6600
|
-
const errMsg = err instanceof Error ? err.message : String(err);
|
|
6601
|
-
console.log(`[auto-wake] Could not wake ${workAgentId} (may not be running): ${errMsg}`);
|
|
6602
|
-
});
|
|
6603
|
-
}
|
|
6604
|
-
} catch (wakeErr) {
|
|
6605
|
-
const errMsg = wakeErr instanceof Error ? wakeErr.message : String(wakeErr);
|
|
6606
|
-
console.warn(`[auto-wake] Failed to check unblocked items: ${errMsg}`);
|
|
6607
|
-
}
|
|
6608
|
-
} catch (syncErr) {
|
|
6609
|
-
const errMsg = syncErr instanceof Error ? syncErr.message : String(syncErr);
|
|
6610
|
-
console.warn(`[specialists/done] vBRIEF sync failed: ${errMsg}`);
|
|
6611
|
-
}
|
|
6612
|
-
}
|
|
6325
|
+
if (existsSync(workspacePath)) await Effect.runPromise(onInspectComplete(project.projectKey, normalizedIssueId, taskId, "passed", workspacePath));
|
|
6613
6326
|
}
|
|
6614
6327
|
} catch (err) {
|
|
6615
6328
|
console.error(`[specialists/done] Error saving inspect checkpoint:`, err);
|
|
@@ -6621,7 +6334,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6621
6334
|
if (project) {
|
|
6622
6335
|
if (existsSync(join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`))) {
|
|
6623
6336
|
setReviewStatusSync(normalizedIssueId, { testStatus: "passed" });
|
|
6624
|
-
const { initEventStore } = await import("./event-store-
|
|
6337
|
+
const { initEventStore } = await import("./event-store-D9UhQyMS.js");
|
|
6625
6338
|
await (await initEventStore()).appendAsync({
|
|
6626
6339
|
type: "test.passed",
|
|
6627
6340
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -6674,8 +6387,8 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6674
6387
|
if (notes?.toLowerCase().includes("conflict")) yield* Effect.promise(async () => {
|
|
6675
6388
|
try {
|
|
6676
6389
|
const workAgentId = `agent-${normalizedIssueId.toLowerCase()}`;
|
|
6677
|
-
const { sessionExists } = await import("./tmux-
|
|
6678
|
-
const { messageAgent, spawnAgent, getAgentStateSync } = await import("./agents-
|
|
6390
|
+
const { sessionExists } = await import("./tmux-C-rgxRDA.js");
|
|
6391
|
+
const { messageAgent, spawnAgent, getAgentStateSync } = await import("./agents-BA15AQqo.js");
|
|
6679
6392
|
if (await Effect.runPromise(sessionExists(workAgentId))) {
|
|
6680
6393
|
await messageAgent(workAgentId, `MERGE CONFLICT: The merge-agent could not rebase your branch onto main due to conflicts. Please fix this now:\n\n1. git fetch origin main\n2. git rebase origin/main\n3. Resolve any conflicts (git add <file> && git rebase --continue)\n4. git push --force-with-lease\n5. Resubmit: curl -s -X POST http://localhost:3011/api/review/${normalizedIssueId}/request -H "Content-Type: application/json" -d "{}"\n\nConflict details: ${notes}`);
|
|
6681
6394
|
console.log(`[specialists/done] Sent rebase instructions to ${workAgentId}`);
|
|
@@ -6689,7 +6402,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6689
6402
|
try {
|
|
6690
6403
|
const project = resolveProjectFromIssueSync(normalizedIssueId);
|
|
6691
6404
|
const workspacePath = project ? join(project.projectPath, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`) : void 0;
|
|
6692
|
-
const { deliverReviewVerdictFeedback } = await import("./review-verdict-feedback-
|
|
6405
|
+
const { deliverReviewVerdictFeedback } = await import("./review-verdict-feedback-BsFLjN_6.js");
|
|
6693
6406
|
const result = await Effect.runPromise(deliverReviewVerdictFeedback({
|
|
6694
6407
|
issueId: normalizedIssueId,
|
|
6695
6408
|
verdict: status === "failed" ? "failed" : "blocked",
|
|
@@ -6730,7 +6443,7 @@ const postSpecialistsDoneRoute = HttpRouter.add("POST", "/api/specialists/done",
|
|
|
6730
6443
|
});
|
|
6731
6444
|
})));
|
|
6732
6445
|
const postSpecialistsLogsCleanupAllRoute = HttpRouter.add("POST", "/api/specialists/logs/cleanup-all", httpHandler(Effect.gen(function* () {
|
|
6733
|
-
const { cleanupAllLogsSync } = yield* Effect.promise(() => import("./specialist-logs-
|
|
6446
|
+
const { cleanupAllLogsSync } = yield* Effect.promise(() => import("./specialist-logs-DtSkPJZK.js"));
|
|
6734
6447
|
const results = cleanupAllLogsSync();
|
|
6735
6448
|
return jsonResponse({
|
|
6736
6449
|
success: true,
|
|
@@ -6740,7 +6453,7 @@ const postSpecialistsLogsCleanupAllRoute = HttpRouter.add("POST", "/api/speciali
|
|
|
6740
6453
|
});
|
|
6741
6454
|
})));
|
|
6742
6455
|
const getSpecialistsProjectsRoute = HttpRouter.add("GET", "/api/specialists/projects", httpHandler(Effect.gen(function* () {
|
|
6743
|
-
const { getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-
|
|
6456
|
+
const { getAllProjectSpecialistStatuses } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
6744
6457
|
return jsonResponse(yield* Effect.promise(() => getAllProjectSpecialistStatuses()));
|
|
6745
6458
|
})));
|
|
6746
6459
|
const postSpecialistWakeRoute = HttpRouter.add("POST", "/api/specialists/:name/wake", httpHandler(Effect.gen(function* () {
|
|
@@ -6784,7 +6497,7 @@ const postSpecialistReportStatusRoute = HttpRouter.add("POST", "/api/specialists
|
|
|
6784
6497
|
"blocked",
|
|
6785
6498
|
"failed"
|
|
6786
6499
|
].includes(status)) {
|
|
6787
|
-
const { getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-
|
|
6500
|
+
const { getTmuxSessionName } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
6788
6501
|
saveAgentRuntimeState(getTmuxSessionName(name), {
|
|
6789
6502
|
state: "idle",
|
|
6790
6503
|
lastActivity: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -6886,7 +6599,7 @@ init_config_yaml();
|
|
|
6886
6599
|
init_projects();
|
|
6887
6600
|
init_review_status();
|
|
6888
6601
|
init_tmux();
|
|
6889
|
-
init_agents();
|
|
6602
|
+
init_agents$1();
|
|
6890
6603
|
const getProjectSpecialistStatusRoute = HttpRouter.add("GET", "/api/specialists/:project/:issueId/:type/status", httpHandler(Effect.gen(function* () {
|
|
6891
6604
|
const params = yield* HttpRouter.params;
|
|
6892
6605
|
return jsonResponse({
|
|
@@ -6905,7 +6618,7 @@ const postProjectSpecialistKillRoute = HttpRouter.add("POST", "/api/specialists/
|
|
|
6905
6618
|
const issueId = params["issueId"];
|
|
6906
6619
|
const type = params["type"];
|
|
6907
6620
|
if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
|
|
6908
|
-
const { getTmuxSessionName, makeSpecialistRegistryKey, getRunMetadata } = yield* Effect.promise(() => import("./specialists-
|
|
6621
|
+
const { getTmuxSessionName, makeSpecialistRegistryKey, getRunMetadata } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
6909
6622
|
const tmuxSession = getRunMetadata(project, makeSpecialistRegistryKey(type, issueId)).tmuxSession ?? getTmuxSessionName(type, project, issueId);
|
|
6910
6623
|
yield* Effect.promise(() => Effect.runPromise(killSession(tmuxSession)).catch(() => {}));
|
|
6911
6624
|
saveAgentRuntimeState(tmuxSession, {
|
|
@@ -6932,7 +6645,7 @@ const getProjectSpecialistRunsRoute = HttpRouter.add("GET", "/api/specialists/:p
|
|
|
6932
6645
|
if (limitParam) limit = parseInt(limitParam, 10);
|
|
6933
6646
|
if (offsetParam) offset = parseInt(offsetParam, 10);
|
|
6934
6647
|
}
|
|
6935
|
-
const { listRunLogsSync } = yield* Effect.promise(() => import("./specialist-logs-
|
|
6648
|
+
const { listRunLogsSync } = yield* Effect.promise(() => import("./specialist-logs-DtSkPJZK.js"));
|
|
6936
6649
|
return jsonResponse(listRunLogsSync(project, type, {
|
|
6937
6650
|
limit,
|
|
6938
6651
|
offset
|
|
@@ -6943,7 +6656,7 @@ const getProjectSpecialistRunStreamRoute = HttpRouter.add("GET", "/api/specialis
|
|
|
6943
6656
|
const project = params["project"];
|
|
6944
6657
|
const type = params["type"];
|
|
6945
6658
|
const runId = params["runId"];
|
|
6946
|
-
const { getRunLogPath, isRunLogActive } = yield* Effect.promise(() => import("./specialist-logs-
|
|
6659
|
+
const { getRunLogPath, isRunLogActive } = yield* Effect.promise(() => import("./specialist-logs-DtSkPJZK.js"));
|
|
6947
6660
|
const logPath = getRunLogPath(project, type, runId);
|
|
6948
6661
|
if (!existsSync(logPath)) return jsonResponse({ error: "Run log not found" }, { status: 404 });
|
|
6949
6662
|
const encoder = new TextEncoder();
|
|
@@ -7002,7 +6715,7 @@ const getProjectSpecialistRunRoute = HttpRouter.add("GET", "/api/specialists/:pr
|
|
|
7002
6715
|
const project = params["project"];
|
|
7003
6716
|
const type = params["type"];
|
|
7004
6717
|
const runId = params["runId"];
|
|
7005
|
-
const { getRunLogSync, parseLogMetadata } = yield* Effect.promise(() => import("./specialist-logs-
|
|
6718
|
+
const { getRunLogSync, parseLogMetadata } = yield* Effect.promise(() => import("./specialist-logs-DtSkPJZK.js"));
|
|
7006
6719
|
const content = getRunLogSync(project, type, runId);
|
|
7007
6720
|
if (!content) return jsonResponse({ error: "Run log not found" }, { status: 404 });
|
|
7008
6721
|
return jsonResponse({
|
|
@@ -7016,7 +6729,7 @@ const postProjectSpecialistRunTerminateRoute = HttpRouter.add("POST", "/api/spec
|
|
|
7016
6729
|
const project = params["project"];
|
|
7017
6730
|
const type = params["type"];
|
|
7018
6731
|
if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
|
|
7019
|
-
const { terminateSpecialist } = yield* Effect.promise(() => import("./specialists-
|
|
6732
|
+
const { terminateSpecialist } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
7020
6733
|
yield* Effect.promise(() => terminateSpecialist(project, type));
|
|
7021
6734
|
return jsonResponse({
|
|
7022
6735
|
success: true,
|
|
@@ -7028,7 +6741,7 @@ const postProjectSpecialistGracePauseRoute = HttpRouter.add("POST", "/api/specia
|
|
|
7028
6741
|
const project = params["project"];
|
|
7029
6742
|
const type = params["type"];
|
|
7030
6743
|
if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
|
|
7031
|
-
const { pauseGracePeriod } = yield* Effect.promise(() => import("./specialists-
|
|
6744
|
+
const { pauseGracePeriod } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
7032
6745
|
if (pauseGracePeriod(project, type)) return jsonResponse({
|
|
7033
6746
|
success: true,
|
|
7034
6747
|
message: "Grace period paused"
|
|
@@ -7040,7 +6753,7 @@ const postProjectSpecialistGraceResumeRoute = HttpRouter.add("POST", "/api/speci
|
|
|
7040
6753
|
const project = params["project"];
|
|
7041
6754
|
const type = params["type"];
|
|
7042
6755
|
if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
|
|
7043
|
-
const { resumeGracePeriod } = yield* Effect.promise(() => import("./specialists-
|
|
6756
|
+
const { resumeGracePeriod } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
7044
6757
|
if (resumeGracePeriod(project, type)) return jsonResponse({
|
|
7045
6758
|
success: true,
|
|
7046
6759
|
message: "Grace period resumed"
|
|
@@ -7052,7 +6765,7 @@ const postProjectSpecialistGraceExitRoute = HttpRouter.add("POST", "/api/special
|
|
|
7052
6765
|
const project = params["project"];
|
|
7053
6766
|
const type = params["type"];
|
|
7054
6767
|
if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
|
|
7055
|
-
const { exitGracePeriod } = yield* Effect.promise(() => import("./specialists-
|
|
6768
|
+
const { exitGracePeriod } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
7056
6769
|
exitGracePeriod(project, type);
|
|
7057
6770
|
return jsonResponse({
|
|
7058
6771
|
success: true,
|
|
@@ -7064,7 +6777,7 @@ const getProjectSpecialistGraceRoute = HttpRouter.add("GET", "/api/specialists/:
|
|
|
7064
6777
|
const project = params["project"];
|
|
7065
6778
|
const type = params["type"];
|
|
7066
6779
|
if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
|
|
7067
|
-
const { getGracePeriodState } = yield* Effect.promise(() => import("./specialists-
|
|
6780
|
+
const { getGracePeriodState } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
7068
6781
|
const state = getGracePeriodState(project, type);
|
|
7069
6782
|
if (state) return jsonResponse(state);
|
|
7070
6783
|
else return jsonResponse({ error: "No active grace period" }, { status: 404 });
|
|
@@ -7073,7 +6786,7 @@ const getProjectSpecialistContextRoute = HttpRouter.add("GET", "/api/specialists
|
|
|
7073
6786
|
const params = yield* HttpRouter.params;
|
|
7074
6787
|
const project = params["project"];
|
|
7075
6788
|
const type = params["type"];
|
|
7076
|
-
const { loadContextDigest } = yield* Effect.promise(() => import("./specialist-context-
|
|
6789
|
+
const { loadContextDigest } = yield* Effect.promise(() => import("./specialist-context-CspI4Eog.js"));
|
|
7077
6790
|
const digest = loadContextDigest(project, type);
|
|
7078
6791
|
if (digest) return jsonResponse({ digest });
|
|
7079
6792
|
else return jsonResponse({ error: "No context digest found" }, { status: 404 });
|
|
@@ -7082,7 +6795,7 @@ const postProjectSpecialistContextRegenerateRoute = HttpRouter.add("POST", "/api
|
|
|
7082
6795
|
const params = yield* HttpRouter.params;
|
|
7083
6796
|
const project = params["project"];
|
|
7084
6797
|
const type = params["type"];
|
|
7085
|
-
const { regenerateContextDigest } = yield* Effect.promise(() => import("./specialist-context-
|
|
6798
|
+
const { regenerateContextDigest } = yield* Effect.promise(() => import("./specialist-context-CspI4Eog.js"));
|
|
7086
6799
|
const digest = yield* Effect.promise(() => regenerateContextDigest(project, type));
|
|
7087
6800
|
if (digest) return jsonResponse({
|
|
7088
6801
|
digest,
|
|
@@ -7101,7 +6814,7 @@ const postProjectSpecialistCompleteRoute = HttpRouter.add("POST", "/api/speciali
|
|
|
7101
6814
|
"blocked"
|
|
7102
6815
|
].includes(status)) return jsonResponse({ error: "Valid status (passed/failed/blocked) is required" }, { status: 400 });
|
|
7103
6816
|
if (!validateSpecialistAgentName(type)) return jsonResponse({ error: "Invalid specialist type. Must be review-agent, test-agent, or merge-agent" }, { status: 400 });
|
|
7104
|
-
const { signalSpecialistCompletion } = yield* Effect.promise(() => import("./specialists-
|
|
6817
|
+
const { signalSpecialistCompletion } = yield* Effect.promise(() => import("./specialists-D9-dMUtI.js"));
|
|
7105
6818
|
signalSpecialistCompletion(project, type, {
|
|
7106
6819
|
status,
|
|
7107
6820
|
notes
|
|
@@ -7135,8 +6848,8 @@ const postProjectSpecialistLogsCleanupRoute = HttpRouter.add("POST", "/api/speci
|
|
|
7135
6848
|
const params = yield* HttpRouter.params;
|
|
7136
6849
|
const project = params["project"];
|
|
7137
6850
|
const type = params["type"];
|
|
7138
|
-
const { cleanupOldLogsSync } = yield* Effect.promise(() => import("./specialist-logs-
|
|
7139
|
-
const { getSpecialistRetention } = yield* Effect.promise(() => import("./projects-
|
|
6851
|
+
const { cleanupOldLogsSync } = yield* Effect.promise(() => import("./specialist-logs-DtSkPJZK.js"));
|
|
6852
|
+
const { getSpecialistRetention } = yield* Effect.promise(() => import("./projects-Dc9aoVoG.js"));
|
|
7140
6853
|
const retention = getSpecialistRetention(project);
|
|
7141
6854
|
const deleted = cleanupOldLogsSync(project, type, {
|
|
7142
6855
|
maxDays: retention.max_days,
|
|
@@ -7157,7 +6870,7 @@ const postProjectReviewRestartRoute = HttpRouter.add("POST", "/api/specialists/:
|
|
|
7157
6870
|
const project = params["project"];
|
|
7158
6871
|
const issueId = params["issueId"];
|
|
7159
6872
|
const { model, harness } = yield* readJsonBody;
|
|
7160
|
-
const { killAllReviewerSessions } = yield* Effect.promise(() => import("./review-agent-
|
|
6873
|
+
const { killAllReviewerSessions } = yield* Effect.promise(() => import("./review-agent-CpSHLzed.js"));
|
|
7161
6874
|
const killResult = yield* killAllReviewerSessions(project, issueId);
|
|
7162
6875
|
const projectConfig = resolveProjectFromIssueSync(issueId);
|
|
7163
6876
|
if (!projectConfig) return jsonResponse({ error: `Cannot resolve project for ${issueId}` }, { status: 404 });
|
|
@@ -7171,7 +6884,7 @@ const postProjectReviewRestartRoute = HttpRouter.add("POST", "/api/specialists/:
|
|
|
7171
6884
|
}));
|
|
7172
6885
|
branch = stdout.trim() || "unknown";
|
|
7173
6886
|
} catch {}
|
|
7174
|
-
const { spawnReviewRoleForIssue } = yield* Effect.promise(() => import("./review-agent-
|
|
6887
|
+
const { spawnReviewRoleForIssue } = yield* Effect.promise(() => import("./review-agent-CpSHLzed.js"));
|
|
7175
6888
|
const prUrl = getReviewStatusSync(issueId)?.prUrl;
|
|
7176
6889
|
const result = yield* spawnReviewRoleForIssue({
|
|
7177
6890
|
issueId,
|
|
@@ -7320,6 +7033,6 @@ const specialistsProjectRouteLayer = Layer.mergeAll(getProjectSpecialistStatusRo
|
|
|
7320
7033
|
*/
|
|
7321
7034
|
const specialistsRouteLayer = Layer.mergeAll(specialistsLegacyRouteLayer, specialistsProjectRouteLayer);
|
|
7322
7035
|
//#endregion
|
|
7323
|
-
export { readLauncherPinnedSessionId as $, resolveAllowedHarness as A, cleanupUnreferencedConversationAttachments as B, handleConversationCreate as C, handleConversationStop as D, handleConversationResume as E, tmuxSessionExists as F, isManagedConversationAttachmentPath as G, extractConversationAttachmentPaths as H, waitForPiTuiReady as I, evaluateSpawnGuardrails as J, removeConversationAttachment as K, waitForTmuxSession as L, spawnConversationSession as M, startConversationModelBackfill as N, handleConversationSwitchModel as O, stopConversationRuntime as P, getWorkAgentLifecycleStateSync as Q, cleanupConversationAttachments as R, conversationSessionAliveFromState as S, handleConversationRestartAll as T, getConversationAttachmentsRoot as U, ensureConversationAttachmentDir as V, hasConversationAttachment as W, resolveAgentGitInfo as X, invalidateAgentsCache as Y, resolveConversationGitInfo as Z, isPiControlChannelHarness as _,
|
|
7036
|
+
export { readLauncherPinnedSessionId as $, resolveAllowedHarness as A, cleanupUnreferencedConversationAttachments as B, handleConversationCreate as C, handleConversationStop as D, handleConversationResume as E, tmuxSessionExists as F, isManagedConversationAttachmentPath as G, extractConversationAttachmentPaths as H, waitForPiTuiReady as I, evaluateSpawnGuardrails as J, removeConversationAttachment as K, waitForTmuxSession as L, spawnConversationSession as M, startConversationModelBackfill as N, handleConversationSwitchModel as O, stopConversationRuntime as P, getWorkAgentLifecycleStateSync as Q, cleanupConversationAttachments as R, conversationSessionAliveFromState as S, handleConversationRestartAll as T, getConversationAttachmentsRoot as U, ensureConversationAttachmentDir as V, hasConversationAttachment as W, resolveAgentGitInfo as X, invalidateAgentsCache as Y, resolveConversationGitInfo as Z, isPiControlChannelHarness as _, agentsRouteLayer as a, isRespawnPending as at, validateConversationControlAckOrigin as b, codexConversationPendingInput as c, getTrustedOrigins as ct, handleConversationCodexApproval as d, validateOrigin as dt, resolveAgentHarness as et, handleConversationCompact as f, validateOriginHeaders as ft, handleConversationThinkingLevel as g, jsonStringResponse as gt, handleConversationPlanAction as h, jsonResponse as ht, validateSpecialistAutoCompleteMetadata as i, resolvePiSessionPath as it, shouldReportUnresolvedLiveSession as j, isInsideGitWorkTree as k, deliverConversationViaControlChannel as l, isTrustedOriginForHost as lt, handleConversationDeliveryMethod as m, getDefaultCwd as mt, _serverManagedMerges as n, resolveCodexRolloutPath as nt, saveAgentStateAndEmitEvent as o, waitForSessionRespawn as ot, handleConversationControlAck as p, httpHandler as pt, runInBatches as q, firePostMergeLifecycle as r, resolveJsonlPath as rt, saveAgentStateAndEmitEventProgram as s, getHeaderFromMap as st, specialistsRouteLayer as t, resolveClaudeSessionId as tt, handleConversationAbort as u, normalizeOrigin as ut, pickDeliverAs as v, handleConversationDelete as w, conversationNeedsRunningRepair as x, resolveConversationDeliveryMethod as y, cleanupOrphanedConversationAttachments as z };
|
|
7324
7037
|
|
|
7325
|
-
//# sourceMappingURL=specialists-
|
|
7038
|
+
//# sourceMappingURL=specialists-Dax7tqXC.js.map
|