@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,16 +1,18 @@
|
|
|
1
|
-
import { C as init_tier_table, Et as getIssueRecordPathForWorkspace, Fn as init_projects, Nt as readIssueRecordForWorkspaceSync,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { C as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { C as init_tier_table, Et as getIssueRecordPathForWorkspace, Fn as init_projects, It as resolveProjectForIssue, Nt as readIssueRecordForWorkspaceSync, Ot as getProjectConfigFromWorkspacePath, Pt as readIssueRecordSync, cn as init_state_plane, f as loadConfigSync, kn as getProjectSync, kt as init_record, ln as isStatePlaneOnlyStatus, qn as resolveProjectFromIssueSync, t as init_config_yaml, w as resolveTieredExecutionEnabled, zn as listProjectsSync } from "./config-yaml-CqaAyn8y.js";
|
|
2
|
+
import { n as updateIssueRecord, r as updateIssueRecordForWorkspace, t as init_record_update } from "./record-update-BltEmPge.js";
|
|
3
|
+
import { D as listPaneValues, R as sessionExists, S as init_tmux, i as capturePane, k as listSessionNames, w as isPaneDead } from "./tmux-U55cNGFG.js";
|
|
4
|
+
import { c as init_review_status, s as getReviewStatusSync, y as setReviewStatusSync } from "./review-status-DANr0t-v.js";
|
|
5
|
+
import { An as decideResumeGate, C as init_slot_reconcile, Fn as getAgentStateSync, Ft as init_spawn_prep, Ht as init_resolve_tier, I as init_messaging, In as init_agent_state, J as init_spawn, L as messageAgent, Mn as getAgentResumeGateBlockReason, Pt as defaultRunWorkspace, Q as stopAgent, T as reconcileSlotState, Ut as resolveTier, X as spawnRun, Z as init_termination, _ as spawnTierSupervisor, _r as getAgentRuntimeSnapshot, _t as init_config, at as init_concurrency, b as init_tier_feed, ft as getCachedMemoryVerdict, g as shouldSupervise, h as loadPrdDraft, it as getConcurrencyLimits, m as init_tier_supervisor, p as deliverCommitForReview, pt as init_memory_verdict_cache, st as releaseSwarmSlot, tt as countRunningSwarmSlotsForIssue, ut as tryReserveSwarmSlot, v as supervisorAgentId, vr as init_agent_runtime, w as listSlotAssignments, y as broadcastCommit, yt as loadCloisterConfigSync } from "./queries-C0LCGG21.js";
|
|
6
|
+
import { C as init_specs, d as readPlanSync, i as findPlanSync, n as applyStatusOverrides, o as init_io, v as init_types, x as findSpecByIssue, y as subItemsOf } from "./io-DkC4sFSy.js";
|
|
7
|
+
import { s as init_control_settings, u as isDeaconGloballyPausedSync } from "./control-settings-BguNQ1F_.js";
|
|
8
|
+
import { i as createActiveSlice, l as init_dag, n as blockingParentCount, o as getDispatchableItems } from "./dag-C6kYyF17.js";
|
|
9
|
+
import { r as init_swarm_readiness, t as analyzeSwarmReadiness } from "./swarm-readiness-sXB1vhzo.js";
|
|
10
|
+
import { t as recordRecoveryFailure } from "./recovery-trip-Cn7KJVkS.js";
|
|
10
11
|
import { join } from "node:path";
|
|
11
12
|
import { Effect } from "effect";
|
|
12
13
|
import { existsSync, readdirSync } from "fs";
|
|
13
14
|
import { join as join$1 } from "path";
|
|
15
|
+
import { hostname } from "node:os";
|
|
14
16
|
import { existsSync as existsSync$1 } from "node:fs";
|
|
15
17
|
import { exec } from "node:child_process";
|
|
16
18
|
import { promisify } from "node:util";
|
|
@@ -22,6 +24,7 @@ init_config_yaml();
|
|
|
22
24
|
init_tmux();
|
|
23
25
|
init_review_status();
|
|
24
26
|
init_specs();
|
|
27
|
+
init_types();
|
|
25
28
|
init_io();
|
|
26
29
|
init_agent_runtime();
|
|
27
30
|
init_agent_state();
|
|
@@ -125,9 +128,188 @@ function commandFailure(error) {
|
|
|
125
128
|
};
|
|
126
129
|
}
|
|
127
130
|
//#endregion
|
|
128
|
-
//#region ../../lib/
|
|
131
|
+
//#region ../../lib/pan-dir/task-door.ts
|
|
129
132
|
init_swarm_readiness();
|
|
130
133
|
init_slot_reconcile();
|
|
134
|
+
/** Single task-mutation write door over the immutable vBRIEF specification. */
|
|
135
|
+
init_record_update();
|
|
136
|
+
var TaskStatusChangeError = class extends Error {
|
|
137
|
+
constructor(message, details) {
|
|
138
|
+
super(message);
|
|
139
|
+
this.details = details;
|
|
140
|
+
this.name = "TaskStatusChangeError";
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
const TERMINAL = new Set(["completed", "cancelled"]);
|
|
144
|
+
function statusFor(type) {
|
|
145
|
+
if (type === "claim") return "running";
|
|
146
|
+
if (type === "done") return "completed";
|
|
147
|
+
if (type === "block") return "blocked";
|
|
148
|
+
if (type === "unblock") return "pending";
|
|
149
|
+
return "cancelled";
|
|
150
|
+
}
|
|
151
|
+
function allowedFrom(type, status) {
|
|
152
|
+
if (type === "claim") return status === "pending";
|
|
153
|
+
if (type === "done") return status === "running";
|
|
154
|
+
if (type === "block") return status === "pending" || status === "running";
|
|
155
|
+
if (type === "unblock") return status === "blocked";
|
|
156
|
+
return status === "pending" || status === "running" || status === "blocked";
|
|
157
|
+
}
|
|
158
|
+
function taskError(issueId, itemId, operation, currentStatus, owner, extra) {
|
|
159
|
+
const ownerText = owner ? ` The current claim owner is ${owner}.` : "";
|
|
160
|
+
const recovery = `Run \`pan task show ${issueId} ${itemId}\` to inspect the current task state before retrying.`;
|
|
161
|
+
return new TaskStatusChangeError(`Task ${itemId} on ${issueId} is ${currentStatus}, so ${operation} is not allowed.${ownerText}${extra ? ` ${extra}` : ""} ${recovery}`, {
|
|
162
|
+
issueId,
|
|
163
|
+
itemId,
|
|
164
|
+
operation,
|
|
165
|
+
currentStatus,
|
|
166
|
+
owner
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
function archiveClaim(record, itemId, outcome, reason, forced, now) {
|
|
170
|
+
const claim = record.tasks?.claims[itemId];
|
|
171
|
+
if (!claim || !record.tasks) return;
|
|
172
|
+
const entry = {
|
|
173
|
+
...claim,
|
|
174
|
+
itemId,
|
|
175
|
+
outcome,
|
|
176
|
+
reason,
|
|
177
|
+
forced: forced || void 0,
|
|
178
|
+
releasedAt: now
|
|
179
|
+
};
|
|
180
|
+
record.tasks.claimHistory = [...record.tasks.claimHistory ?? [], entry].slice(-50);
|
|
181
|
+
delete record.tasks.claims[itemId];
|
|
182
|
+
}
|
|
183
|
+
async function applyTaskStatusChange(project, issueId, operation) {
|
|
184
|
+
const normalizedIssueId = issueId.toUpperCase();
|
|
185
|
+
const writerId = operation.writerId ?? process.env.OVERDECK_AGENT_ID ?? `cli-${process.pid}@${hostname()}`;
|
|
186
|
+
let result;
|
|
187
|
+
await updateIssueRecord(project, normalizedIssueId, (record) => {
|
|
188
|
+
const planPath = findPlanSync(join(project.path, "workspaces", `feature-${normalizedIssueId.toLowerCase()}`));
|
|
189
|
+
if (!planPath) throw new Error(`The vBRIEF for ${normalizedIssueId} is missing or unreadable. Return the issue to planning before changing task state.`);
|
|
190
|
+
const item = applyStatusOverrides(readPlanSync(planPath), record.statusOverrides ?? {}).plan.items.find(({ id }) => id === operation.itemId);
|
|
191
|
+
if (!item) throw new Error(`Task ${operation.itemId} does not exist in the immutable vBRIEF for ${normalizedIssueId}. Return the issue to planning to change scope.`);
|
|
192
|
+
const currentStatus = item.status;
|
|
193
|
+
const currentSequence = record.tasks?.sequence ?? 0;
|
|
194
|
+
const existingClaim = record.tasks?.claims[operation.itemId];
|
|
195
|
+
if (operation.expectedSequence !== void 0 && operation.expectedSequence !== currentSequence) throw new TaskStatusChangeError(`Task sequence conflict for ${normalizedIssueId}: expected ${operation.expectedSequence}, but the current sequence is ${currentSequence}. Run \`pan task next ${normalizedIssueId}\` and retry with the new sequence.`, {
|
|
196
|
+
issueId: normalizedIssueId,
|
|
197
|
+
itemId: operation.itemId,
|
|
198
|
+
operation: operation.type,
|
|
199
|
+
currentStatus,
|
|
200
|
+
currentSequence
|
|
201
|
+
});
|
|
202
|
+
if (TERMINAL.has(currentStatus)) throw taskError(normalizedIssueId, operation.itemId, operation.type, currentStatus, existingClaim?.writerId);
|
|
203
|
+
if (operation.force && !operation.reason) throw taskError(normalizedIssueId, operation.itemId, operation.type, currentStatus, existingClaim?.writerId, "A forced transition requires --reason.");
|
|
204
|
+
if ((operation.type === "block" || operation.type === "cancel") && !operation.reason) throw taskError(normalizedIssueId, operation.itemId, operation.type, currentStatus, existingClaim?.writerId, "This transition requires --reason.");
|
|
205
|
+
if (operation.type === "claim" && currentStatus === "running" && existingClaim?.writerId === writerId) {
|
|
206
|
+
result = {
|
|
207
|
+
issueId: normalizedIssueId,
|
|
208
|
+
itemId: operation.itemId,
|
|
209
|
+
status: "running",
|
|
210
|
+
sequence: currentSequence,
|
|
211
|
+
claim: existingClaim,
|
|
212
|
+
idempotent: true
|
|
213
|
+
};
|
|
214
|
+
return record;
|
|
215
|
+
}
|
|
216
|
+
const ownerRestricted = (operation.type === "done" || operation.type === "block" || operation.type === "cancel") && currentStatus === "running";
|
|
217
|
+
if (!operation.force && ownerRestricted && existingClaim?.writerId !== writerId) throw taskError(normalizedIssueId, operation.itemId, operation.type, currentStatus, existingClaim?.writerId ?? "missing claim owner");
|
|
218
|
+
if (!operation.force && !allowedFrom(operation.type, currentStatus)) throw taskError(normalizedIssueId, operation.itemId, operation.type, currentStatus, existingClaim?.writerId);
|
|
219
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
220
|
+
const nextStatus = statusFor(operation.type);
|
|
221
|
+
record.tasks ??= {
|
|
222
|
+
sequence: 0,
|
|
223
|
+
claims: {}
|
|
224
|
+
};
|
|
225
|
+
record.statusOverrides = {
|
|
226
|
+
...record.statusOverrides ?? {},
|
|
227
|
+
[operation.itemId]: nextStatus
|
|
228
|
+
};
|
|
229
|
+
const subIds = operation.subItemIds?.length ? new Set(operation.subItemIds) : new Set(operation.type === "done" ? subItemsOf(item).map(({ id }) => id) : []);
|
|
230
|
+
for (const subId of subIds) record.statusOverrides[`${operation.itemId}.${subId}`] = nextStatus;
|
|
231
|
+
if (operation.type === "claim") record.tasks.claims[operation.itemId] = {
|
|
232
|
+
writerId,
|
|
233
|
+
agentId: process.env.OVERDECK_AGENT_ID ?? null,
|
|
234
|
+
pid: process.pid,
|
|
235
|
+
host: hostname(),
|
|
236
|
+
claimedAt: now
|
|
237
|
+
};
|
|
238
|
+
else if (existingClaim) archiveClaim(record, operation.itemId, nextStatus === "completed" ? "completed" : nextStatus === "blocked" ? "blocked" : "cancelled", operation.reason, operation.force ?? false, now);
|
|
239
|
+
if (operation.reason) record.tasks.statusReasons = {
|
|
240
|
+
...record.tasks.statusReasons ?? {},
|
|
241
|
+
[operation.itemId]: {
|
|
242
|
+
reason: operation.reason,
|
|
243
|
+
updatedAt: now,
|
|
244
|
+
forced: operation.force || void 0
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
record.tasks.sequence = currentSequence + 1;
|
|
248
|
+
result = {
|
|
249
|
+
issueId: normalizedIssueId,
|
|
250
|
+
itemId: operation.itemId,
|
|
251
|
+
status: nextStatus,
|
|
252
|
+
sequence: record.tasks.sequence,
|
|
253
|
+
claim: record.tasks.claims[operation.itemId]
|
|
254
|
+
};
|
|
255
|
+
return record;
|
|
256
|
+
}, { writerId });
|
|
257
|
+
if (!result) throw new Error(`Task mutation for ${normalizedIssueId}/${operation.itemId} produced no result.`);
|
|
258
|
+
return result;
|
|
259
|
+
}
|
|
260
|
+
//#endregion
|
|
261
|
+
//#region ../../lib/swarm-policy.ts
|
|
262
|
+
function resolveSwarmPolicyLayers(global = {}, project = {}, issue = {}, cli = {}) {
|
|
263
|
+
const resolve = (key, fallback) => {
|
|
264
|
+
for (const [source, layer] of [
|
|
265
|
+
["cli", cli],
|
|
266
|
+
["issue", issue],
|
|
267
|
+
["project", project],
|
|
268
|
+
["global", global]
|
|
269
|
+
]) if (layer[key] !== void 0) return {
|
|
270
|
+
value: layer[key],
|
|
271
|
+
source
|
|
272
|
+
};
|
|
273
|
+
return {
|
|
274
|
+
value: fallback,
|
|
275
|
+
source: "default"
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
const mode = resolve("mode", "off");
|
|
279
|
+
const maxSlots = resolve("maxSlots", 3);
|
|
280
|
+
const autoAdvance = resolve("autoAdvance", true);
|
|
281
|
+
return {
|
|
282
|
+
mode: mode.value,
|
|
283
|
+
maxSlots: maxSlots.value,
|
|
284
|
+
autoAdvance: autoAdvance.value,
|
|
285
|
+
source: {
|
|
286
|
+
mode: mode.source,
|
|
287
|
+
maxSlots: maxSlots.source,
|
|
288
|
+
autoAdvance: autoAdvance.source
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
function resolveSwarmPolicy(issueId, cli = {}) {
|
|
293
|
+
const global = loadConfigSync().config.swarm;
|
|
294
|
+
if (!issueId) return resolveSwarmPolicyLayers(global, {}, {}, cli);
|
|
295
|
+
const resolved = resolveProjectFromIssueSync(issueId);
|
|
296
|
+
const project = resolved ? getProjectSync(resolved.projectKey) : void 0;
|
|
297
|
+
const issue = project ? readIssueRecordSync(project, issueId)?.swarm?.policy : void 0;
|
|
298
|
+
return resolveSwarmPolicyLayers(global, project?.swarm, issue, cli);
|
|
299
|
+
}
|
|
300
|
+
function resolveAutomaticSwarmPolicy(issueId, manual = false, inProgress = false) {
|
|
301
|
+
const policy = resolveSwarmPolicy(issueId);
|
|
302
|
+
return {
|
|
303
|
+
policy,
|
|
304
|
+
enabled: manual || policy.mode !== "off" && (policy.autoAdvance || !inProgress)
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
function resolveSwarmMaxSlots(issueId, configured) {
|
|
308
|
+
return Math.min(Math.max(1, Math.floor(configured)), Math.max(1, Math.floor(resolveSwarmPolicy(issueId).maxSlots)));
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region ../../lib/cloister/deacon-workspaces.ts
|
|
312
|
+
init_projects();
|
|
131
313
|
function listFeatureWorkspaces(options = {}) {
|
|
132
314
|
const includeSlotWorkspaces = options.includeSlotWorkspaces ?? true;
|
|
133
315
|
const projects = listProjectsSync();
|
|
@@ -293,6 +475,7 @@ async function defaultSendCompletionNudge(agentId, issueId) {
|
|
|
293
475
|
}
|
|
294
476
|
//#endregion
|
|
295
477
|
//#region ../../lib/cloister/deacon-swarm-finalization.ts
|
|
478
|
+
init_io();
|
|
296
479
|
async function defaultRequestIssueReview(issueId, workspacePath) {
|
|
297
480
|
setReviewStatusSync(issueId, {
|
|
298
481
|
reviewStatus: "pending",
|
|
@@ -304,7 +487,7 @@ async function defaultRequestIssueReview(issueId, workspacePath) {
|
|
|
304
487
|
autoRequeueCount: 0,
|
|
305
488
|
reviewRequestedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
306
489
|
});
|
|
307
|
-
const { spawnReviewRoleForIssue } = await import("./review-agent-
|
|
490
|
+
const { spawnReviewRoleForIssue } = await import("./review-agent-CpSHLzed.js");
|
|
308
491
|
return Effect.runPromise(spawnReviewRoleForIssue({
|
|
309
492
|
issueId,
|
|
310
493
|
workspace: workspacePath,
|
|
@@ -365,6 +548,42 @@ async function gcMergedSlots(issueId, workspacePath, slots, deps) {
|
|
|
365
548
|
return actions;
|
|
366
549
|
}
|
|
367
550
|
//#endregion
|
|
551
|
+
//#region ../../lib/cloister/deacon-swarm-record.ts
|
|
552
|
+
init_record();
|
|
553
|
+
init_record_update();
|
|
554
|
+
async function writeSwarmFinalizedAt(workspacePath, issueId, finalizedAt) {
|
|
555
|
+
await updateIssueRecordForWorkspace(workspacePath, issueId.toUpperCase(), (record) => ({
|
|
556
|
+
...record,
|
|
557
|
+
swarm: {
|
|
558
|
+
...record.swarm ?? {},
|
|
559
|
+
finalizedAt
|
|
560
|
+
}
|
|
561
|
+
}));
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* PAN-2372 WI-3 / FR-6: clear a slot's completion marker once the coordinator
|
|
565
|
+
* (WI-4) has consumed it (merge/requeue). No-op when no marker exists for the
|
|
566
|
+
* slot, so callers can clear unconditionally on the terminal transition.
|
|
567
|
+
*/
|
|
568
|
+
async function clearSwarmSlotCompletion(workspacePath, issueId, slotIndex) {
|
|
569
|
+
const normalizedIssueId = issueId.toUpperCase();
|
|
570
|
+
const current = readIssueRecordForWorkspaceSync(workspacePath, normalizedIssueId);
|
|
571
|
+
if (!current?.swarm?.slotCompletions || !(String(slotIndex) in current.swarm.slotCompletions)) return;
|
|
572
|
+
await updateIssueRecordForWorkspace(workspacePath, normalizedIssueId, (record) => {
|
|
573
|
+
const existing = record.swarm?.slotCompletions;
|
|
574
|
+
if (!existing || !(String(slotIndex) in existing)) return record;
|
|
575
|
+
const next = { ...existing };
|
|
576
|
+
delete next[String(slotIndex)];
|
|
577
|
+
return {
|
|
578
|
+
...record,
|
|
579
|
+
swarm: {
|
|
580
|
+
...record.swarm,
|
|
581
|
+
slotCompletions: next
|
|
582
|
+
}
|
|
583
|
+
};
|
|
584
|
+
});
|
|
585
|
+
}
|
|
586
|
+
//#endregion
|
|
368
587
|
//#region ../../lib/cloister/swarm-tiered-hooks.ts
|
|
369
588
|
/**
|
|
370
589
|
* PAN-2385 — tiered-execution commit hooks for the swarm dispatch path.
|
|
@@ -386,6 +605,7 @@ async function gcMergedSlots(issueId, workspacePath, slots, deps) {
|
|
|
386
605
|
* Both hooks are best-effort: the commit has already landed, so a delivery
|
|
387
606
|
* failure logs loudly and never blocks the merge loop.
|
|
388
607
|
*/
|
|
608
|
+
init_config_yaml();
|
|
389
609
|
init_resolve_tier();
|
|
390
610
|
init_tier_feed();
|
|
391
611
|
init_tier_supervisor();
|
|
@@ -449,8 +669,8 @@ async function fireTieredCommitHooks(options, deps = defaultDeps$1) {
|
|
|
449
669
|
workspace: workspacePath,
|
|
450
670
|
issueId,
|
|
451
671
|
sha,
|
|
452
|
-
|
|
453
|
-
|
|
672
|
+
itemTitle: item.title,
|
|
673
|
+
itemId: item.id,
|
|
454
674
|
tiers: listeners,
|
|
455
675
|
feedConfig: tiered.feed
|
|
456
676
|
})).filter((delivery) => delivery.result.ok).length;
|
|
@@ -474,7 +694,7 @@ async function fireTieredCommitHooks(options, deps = defaultDeps$1) {
|
|
|
474
694
|
issueId,
|
|
475
695
|
item,
|
|
476
696
|
sha,
|
|
477
|
-
|
|
697
|
+
itemId: item.id,
|
|
478
698
|
prdMarkdown
|
|
479
699
|
});
|
|
480
700
|
actions.push(`[tiered] supervisor review dispatched for ${issueId} item ${item.id} (subscribe=${supervisor.subscribe})`);
|
|
@@ -519,6 +739,7 @@ function decideAgentAutonomousRedrive(state, agentDir, owesRework) {
|
|
|
519
739
|
}
|
|
520
740
|
//#endregion
|
|
521
741
|
//#region ../../lib/cloister/swarm-failed-slot.ts
|
|
742
|
+
init_record_update();
|
|
522
743
|
init_agent_state();
|
|
523
744
|
async function archiveFailedSwarmSlot(issueId, workspacePath, slot, deps, now = /* @__PURE__ */ new Date()) {
|
|
524
745
|
const normalized = issueId.toUpperCase();
|
|
@@ -540,16 +761,15 @@ async function archiveFailedSwarmSlot(issueId, workspacePath, slot, deps, now =
|
|
|
540
761
|
reason: slot.reason ?? "failed swarm slot",
|
|
541
762
|
supersededAt: now.toISOString()
|
|
542
763
|
};
|
|
543
|
-
|
|
544
|
-
writeIssueRecordForWorkspaceSync(workspacePath, normalized, {
|
|
764
|
+
await updateIssueRecordForWorkspace(workspacePath, normalized, (existing) => ({
|
|
545
765
|
...existing,
|
|
546
766
|
swarm: {
|
|
547
767
|
...existing.swarm ?? {},
|
|
548
768
|
supersededAttempts: [...existing.swarm?.supersededAttempts ?? [], attempt]
|
|
549
769
|
}
|
|
550
|
-
});
|
|
551
|
-
clearSwarmSlotCompletion(workspacePath, normalized, slot.slotIndex);
|
|
552
|
-
deps.clearSlotAssignment(workspacePath, normalized, slot.slotIndex, slot.itemId);
|
|
770
|
+
}));
|
|
771
|
+
await clearSwarmSlotCompletion(workspacePath, normalized, slot.slotIndex);
|
|
772
|
+
await deps.clearSlotAssignment(workspacePath, normalized, slot.slotIndex, slot.itemId);
|
|
553
773
|
return attempt;
|
|
554
774
|
}
|
|
555
775
|
async function requeueFailedSwarmSlots(issueId, workspacePath, classified, doc, reconciled, deps, blockedSlotIndexes = /* @__PURE__ */ new Set()) {
|
|
@@ -566,7 +786,7 @@ async function requeueFailedSwarmSlots(issueId, workspacePath, classified, doc,
|
|
|
566
786
|
continue;
|
|
567
787
|
}
|
|
568
788
|
const attempt = await archiveFailedSwarmSlot(issueId, workspacePath, slot, deps);
|
|
569
|
-
await deps.applyTaskOperationToPlanFile(
|
|
789
|
+
await deps.applyTaskOperationToPlanFile(issueId, {
|
|
570
790
|
type: "unblock",
|
|
571
791
|
itemId: slot.itemId,
|
|
572
792
|
writerId: "deacon-swarm",
|
|
@@ -585,7 +805,7 @@ async function requeueFailedSwarmSlots(issueId, workspacePath, classified, doc,
|
|
|
585
805
|
}
|
|
586
806
|
};
|
|
587
807
|
actions.push(`[swarm] archived failed slot ${slot.slotIndex} (item ${slot.itemId}) for ${issueId}`);
|
|
588
|
-
const failure = recordRecoveryFailure(workspacePath, issueId, "swarm-slot-requeue", slot.itemId);
|
|
808
|
+
const failure = await recordRecoveryFailure(workspacePath, issueId, "swarm-slot-requeue", slot.itemId);
|
|
589
809
|
if (failure.emitNeedsYou) actions.push(`[swarm] needs-you ${issueId}: slot item ${slot.itemId} failed ${failure.trip.tripCount} times`);
|
|
590
810
|
}
|
|
591
811
|
return {
|
|
@@ -602,6 +822,7 @@ function applySupersededSlotHighWater(occupied, reconciled, configuredMax) {
|
|
|
602
822
|
//#region ../../lib/cloister/deacon-swarm.ts
|
|
603
823
|
init_slot_reconcile();
|
|
604
824
|
init_record();
|
|
825
|
+
init_record_update();
|
|
605
826
|
init_tmux();
|
|
606
827
|
init_io();
|
|
607
828
|
init_review_status();
|
|
@@ -641,7 +862,9 @@ const defaultDeps = {
|
|
|
641
862
|
sendCompletionNudge: defaultSendCompletionNudge,
|
|
642
863
|
slotWorktreeExists: existsSync$1,
|
|
643
864
|
verifyAndMergeSlot,
|
|
644
|
-
applyTaskOperationToPlanFile: (
|
|
865
|
+
applyTaskOperationToPlanFile: (issueId, operation, workspacePath = "") => {
|
|
866
|
+
return applyTaskStatusChange(resolveProjectForIssue(issueId) ?? getProjectConfigFromWorkspacePath(workspacePath), issueId, operation);
|
|
867
|
+
},
|
|
645
868
|
fireTieredCommitHooks,
|
|
646
869
|
recordSlotAssignment,
|
|
647
870
|
clearSlotAssignment,
|
|
@@ -730,7 +953,12 @@ async function coordinateSwarmSlots(opts = {}, deps = defaultDeps) {
|
|
|
730
953
|
const readiness = analyzeSwarmReadiness(doc);
|
|
731
954
|
const slotEligibleCount = readiness.items.filter((item) => item.slotEligible).length;
|
|
732
955
|
const swarmInProgress = Object.entries(overrides ?? {}).some(([key, value]) => !key.includes(".") && value === "completed");
|
|
733
|
-
const
|
|
956
|
+
const { policy, enabled } = resolveAutomaticSwarmPolicy(issueId, opts.manual, swarmInProgress);
|
|
957
|
+
if (!enabled) {
|
|
958
|
+
actions.push(`[swarm] ${issueId}: swarming off (${policy.source.mode}) — no automatic dispatch, recovery, merge, or cleanup; use an explicit swarm command or stop the legacy sessions`);
|
|
959
|
+
continue;
|
|
960
|
+
}
|
|
961
|
+
const dispatchEligible = enabled && readiness.swarmEligible && (slotEligibleCount >= 2 || swarmInProgress);
|
|
734
962
|
if (dispatchEligible) actions.push(`[swarm] considered ${issueId}: swarm eligible`);
|
|
735
963
|
const reconciled = await deps.reconcileSlotState(issueId, workspace.workspacePath, doc);
|
|
736
964
|
if (!dispatchEligible) {
|
|
@@ -751,7 +979,7 @@ async function coordinateSwarmSlots(opts = {}, deps = defaultDeps) {
|
|
|
751
979
|
}
|
|
752
980
|
const requeue = await requeueFailedSwarmSlots(issueId, workspace.workspacePath, classified, doc, reconciled, deps, blockedSlotIndexes);
|
|
753
981
|
actions.push(...requeue.actions);
|
|
754
|
-
actions.push(...recordStalledSlotRecovery(issueId, classified, workspace.workspacePath));
|
|
982
|
+
actions.push(...await recordStalledSlotRecovery(issueId, classified, workspace.workspacePath));
|
|
755
983
|
actions.push(...await mergeReadySlots(issueId, workspace.workspacePath, doc, classified, deps, blockedSlotIndexes));
|
|
756
984
|
actions.push(...await gcMergedSlots(issueId, workspace.workspacePath, reconciled.merged, deps));
|
|
757
985
|
actions.push(...await gcOrphanedSlots(issueId, workspace.workspacePath, reconciled, deps));
|
|
@@ -891,7 +1119,7 @@ function swarmStallThresholdMs() {
|
|
|
891
1119
|
async function mergeReadySlots(issueId, workspacePath, doc, slots, deps = defaultDeps, blockedSlotIndexes = /* @__PURE__ */ new Set()) {
|
|
892
1120
|
const actions = [];
|
|
893
1121
|
const itemsById = new Map(doc.plan.items.map((item) => [item.id, item]));
|
|
894
|
-
|
|
1122
|
+
join$1(workspacePath, ".pan", "spec.vbrief.json");
|
|
895
1123
|
for (const slot of slots) {
|
|
896
1124
|
if (slot.lifecycle !== "ready-to-merge") continue;
|
|
897
1125
|
if (blockedSlotIndexes.has(slot.slotIndex)) {
|
|
@@ -914,12 +1142,12 @@ async function mergeReadySlots(issueId, workspacePath, doc, slots, deps = defaul
|
|
|
914
1142
|
featureWorkspace: workspacePath
|
|
915
1143
|
}, slot.slotIndex, item);
|
|
916
1144
|
if (result.merged) {
|
|
917
|
-
await deps.applyTaskOperationToPlanFile(
|
|
1145
|
+
await deps.applyTaskOperationToPlanFile(issueId, {
|
|
918
1146
|
type: "done",
|
|
919
1147
|
itemId: item.id,
|
|
920
1148
|
writerId: "deacon-swarm"
|
|
921
1149
|
}, workspacePath);
|
|
922
|
-
clearSwarmSlotCompletion(workspacePath, issueId, slot.slotIndex);
|
|
1150
|
+
await clearSwarmSlotCompletion(workspacePath, issueId, slot.slotIndex);
|
|
923
1151
|
actions.push(`[swarm] merged slot ${slot.slotIndex} (item ${item.id}) for ${issueId}`);
|
|
924
1152
|
try {
|
|
925
1153
|
actions.push(...await deps.fireTieredCommitHooks({
|
|
@@ -934,7 +1162,7 @@ async function mergeReadySlots(issueId, workspacePath, doc, slots, deps = defaul
|
|
|
934
1162
|
continue;
|
|
935
1163
|
}
|
|
936
1164
|
if (result.conflicts) {
|
|
937
|
-
recordFailedMergeBlock({
|
|
1165
|
+
await recordFailedMergeBlock({
|
|
938
1166
|
issueId,
|
|
939
1167
|
itemId: item.id,
|
|
940
1168
|
slotIndex: slot.slotIndex,
|
|
@@ -1004,23 +1232,23 @@ function getFailedMergeBlocks(issueId, workspacePath) {
|
|
|
1004
1232
|
function getSwarmFinalizedAt(issueId, workspacePath) {
|
|
1005
1233
|
return workspacePath ? readIssueRecordForWorkspaceSync(workspacePath, issueId.toUpperCase())?.swarm?.finalizedAt : void 0;
|
|
1006
1234
|
}
|
|
1007
|
-
function recordSwarmFinalizedAt(issueId, workspacePath, finalizedAt) {
|
|
1008
|
-
writeSwarmFinalizedAt(workspacePath, issueId.toUpperCase(), finalizedAt);
|
|
1235
|
+
async function recordSwarmFinalizedAt(issueId, workspacePath, finalizedAt) {
|
|
1236
|
+
await writeSwarmFinalizedAt(workspacePath, issueId.toUpperCase(), finalizedAt);
|
|
1009
1237
|
}
|
|
1010
|
-
function recordFailedMergeBlock(block, workspacePath) {
|
|
1238
|
+
async function recordFailedMergeBlock(block, workspacePath) {
|
|
1011
1239
|
const normalizedBlock = {
|
|
1012
1240
|
...block,
|
|
1013
1241
|
issueId: block.issueId.toUpperCase()
|
|
1014
1242
|
};
|
|
1015
1243
|
failedMergeBlocks.set(`${normalizedBlock.issueId}:${normalizedBlock.slotIndex}`, normalizedBlock);
|
|
1016
|
-
if (workspacePath) writeSwarmFailedMergeBlock(workspacePath, normalizedBlock.issueId, normalizedBlock.slotIndex, normalizedBlock);
|
|
1244
|
+
if (workspacePath) await writeSwarmFailedMergeBlock(workspacePath, normalizedBlock.issueId, normalizedBlock.slotIndex, normalizedBlock);
|
|
1017
1245
|
}
|
|
1018
|
-
function recordStalledSlotRecovery(issueId, slots, workspacePath) {
|
|
1246
|
+
async function recordStalledSlotRecovery(issueId, slots, workspacePath) {
|
|
1019
1247
|
const actions = [];
|
|
1020
1248
|
const normalizedIssueId = issueId.toUpperCase();
|
|
1021
1249
|
for (const slot of slots.filter((s) => s.lifecycle === "stalled")) {
|
|
1022
1250
|
if (getFailedMergeBlock(normalizedIssueId, slot.slotIndex, workspacePath)) continue;
|
|
1023
|
-
recordFailedMergeBlock({
|
|
1251
|
+
await recordFailedMergeBlock({
|
|
1024
1252
|
issueId: normalizedIssueId,
|
|
1025
1253
|
itemId: slot.itemId,
|
|
1026
1254
|
slotIndex: slot.slotIndex,
|
|
@@ -1032,22 +1260,21 @@ function recordStalledSlotRecovery(issueId, slots, workspacePath) {
|
|
|
1032
1260
|
return actions;
|
|
1033
1261
|
}
|
|
1034
1262
|
function writeSwarmFailedMergeBlock(workspacePath, issueId, slotIndex, block) {
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
});
|
|
1263
|
+
return updateIssueRecordForWorkspace(workspacePath, issueId.toUpperCase(), (record) => {
|
|
1264
|
+
const existingSwarm = record.swarm ?? {};
|
|
1265
|
+
const foldedBlocks = { ...existingSwarm.failedMergeBlocks ?? {} };
|
|
1266
|
+
if (existingSwarm.failedMergeBlock) foldedBlocks[String(existingSwarm.failedMergeBlock.slotIndex)] = existingSwarm.failedMergeBlock;
|
|
1267
|
+
if (block) foldedBlocks[String(slotIndex)] = block;
|
|
1268
|
+
else delete foldedBlocks[String(slotIndex)];
|
|
1269
|
+
return {
|
|
1270
|
+
...record,
|
|
1271
|
+
swarm: {
|
|
1272
|
+
...existingSwarm,
|
|
1273
|
+
failedMergeBlocks: foldedBlocks,
|
|
1274
|
+
failedMergeBlock: void 0
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
}).then(() => void 0);
|
|
1051
1278
|
}
|
|
1052
1279
|
function recordSlotMergeFire(branchKey, now = Date.now()) {
|
|
1053
1280
|
recentSlotMergeFires.set(branchKey, now + SLOT_MERGE_REFIRE_COOLDOWN_MS);
|
|
@@ -1063,7 +1290,7 @@ async function dispatchNextWave(issueId, workspacePath, doc, reconciled, readine
|
|
|
1063
1290
|
const actions = [];
|
|
1064
1291
|
const mergedItemIds = new Set(reconciled.merged.map((slot) => slot.itemId));
|
|
1065
1292
|
const slotEligibleIds = new Set(readiness.items.filter((item) => item.slotEligible).map((item) => item.id));
|
|
1066
|
-
const configuredMaxSlotIndex =
|
|
1293
|
+
const configuredMaxSlotIndex = resolveSwarmMaxSlots(issueId, (deps.getMaxSlotIndex ?? defaultGetMaxSlotIndex)());
|
|
1067
1294
|
const occupiedSlotIndexes = new Set([
|
|
1068
1295
|
...blockedSlotIndexes,
|
|
1069
1296
|
...reconciled.inFlight.map((slot) => slot.slotIndex),
|
|
@@ -1079,7 +1306,6 @@ async function dispatchNextWave(issueId, workspacePath, doc, reconciled, readine
|
|
|
1079
1306
|
const sessionNames = deps.listSessionNames ? await deps.listSessionNames() : [];
|
|
1080
1307
|
const inFlightItemIds = new Set(reconciled.inFlight.map((slot) => slot.itemId));
|
|
1081
1308
|
const selectedItemIds = [];
|
|
1082
|
-
const planPath = join$1(workspacePath, ".pan", "spec.vbrief.json");
|
|
1083
1309
|
for (const item of getDispatchableItems(doc, mergedItemIds)) {
|
|
1084
1310
|
if (blockedItemIds.has(item.id)) continue;
|
|
1085
1311
|
if (!slotEligibleIds.has(item.id)) continue;
|
|
@@ -1115,25 +1341,25 @@ async function dispatchNextWave(issueId, workspacePath, doc, reconciled, readine
|
|
|
1115
1341
|
continue;
|
|
1116
1342
|
}
|
|
1117
1343
|
try {
|
|
1118
|
-
await deps.applyTaskOperationToPlanFile(
|
|
1344
|
+
await deps.applyTaskOperationToPlanFile(issueId, {
|
|
1119
1345
|
type: "claim",
|
|
1120
1346
|
itemId: item.id,
|
|
1121
1347
|
writerId: "deacon-swarm"
|
|
1122
1348
|
}, workspacePath);
|
|
1123
|
-
deps.recordSlotAssignment(workspacePath, issueId, {
|
|
1349
|
+
await deps.recordSlotAssignment(workspacePath, issueId, {
|
|
1124
1350
|
slotIndex,
|
|
1125
1351
|
itemId: item.id,
|
|
1126
1352
|
agentId: `agent-${issueId.toLowerCase()}-slot-${slotIndex}`,
|
|
1127
1353
|
branch: `feature/${issueId.toLowerCase()}-slot-${slotIndex}`
|
|
1128
1354
|
});
|
|
1129
1355
|
if (!(deps.shouldDispatch ?? defaultShouldDispatch)(issueId)) {
|
|
1130
|
-
await deps.applyTaskOperationToPlanFile(
|
|
1356
|
+
await deps.applyTaskOperationToPlanFile(issueId, {
|
|
1131
1357
|
type: "unblock",
|
|
1132
1358
|
itemId: item.id,
|
|
1133
1359
|
writerId: "deacon-swarm",
|
|
1134
1360
|
reason: "dispatch halted: freeze/hold active"
|
|
1135
1361
|
}, workspacePath).catch(() => void 0);
|
|
1136
|
-
deps.clearSlotAssignment(workspacePath, issueId, slotIndex, item.id);
|
|
1362
|
+
await deps.clearSlotAssignment(workspacePath, issueId, slotIndex, item.id);
|
|
1137
1363
|
deps.releaseSwarmSlot();
|
|
1138
1364
|
actions.push(`[swarm] dispatch-halted ${item.id}: freeze/hold active`);
|
|
1139
1365
|
continue;
|
|
@@ -1148,13 +1374,13 @@ async function dispatchNextWave(issueId, workspacePath, doc, reconciled, readine
|
|
|
1148
1374
|
selectedItemIds.push(item.id);
|
|
1149
1375
|
actions.push(`[swarm] dispatched ${dispatchPhaseForItem(doc, item)} slot ${slotIndex} (item ${item.id}) for ${issueId}`);
|
|
1150
1376
|
} catch (error) {
|
|
1151
|
-
await deps.applyTaskOperationToPlanFile(
|
|
1377
|
+
await deps.applyTaskOperationToPlanFile(issueId, {
|
|
1152
1378
|
type: "unblock",
|
|
1153
1379
|
itemId: item.id,
|
|
1154
1380
|
writerId: "deacon-swarm",
|
|
1155
1381
|
reason: `slot dispatch failed: ${error instanceof Error ? error.message : String(error)}`
|
|
1156
1382
|
}, workspacePath).catch(() => void 0);
|
|
1157
|
-
deps.clearSlotAssignment(workspacePath, issueId, slotIndex, item.id);
|
|
1383
|
+
await deps.clearSlotAssignment(workspacePath, issueId, slotIndex, item.id);
|
|
1158
1384
|
deps.releaseSwarmSlot();
|
|
1159
1385
|
actions.push(`[swarm] failed-dispatch ${item.id} for ${issueId}: ${error instanceof Error ? error.message : String(error)}`);
|
|
1160
1386
|
}
|
|
@@ -1162,25 +1388,25 @@ async function dispatchNextWave(issueId, workspacePath, doc, reconciled, readine
|
|
|
1162
1388
|
return actions;
|
|
1163
1389
|
}
|
|
1164
1390
|
function recordSlotAssignment(workspacePath, issueId, assignment) {
|
|
1165
|
-
writeSwarmSlotAssignments(workspacePath, issueId, (existing) => [...existing.filter((slot) => slot.slotIndex !== assignment.slotIndex && slot.itemId !== assignment.itemId), {
|
|
1391
|
+
return writeSwarmSlotAssignments(workspacePath, issueId, (existing) => [...existing.filter((slot) => slot.slotIndex !== assignment.slotIndex && slot.itemId !== assignment.itemId), {
|
|
1166
1392
|
...assignment,
|
|
1167
1393
|
assignedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
1168
1394
|
}]);
|
|
1169
1395
|
}
|
|
1170
1396
|
function clearSlotAssignment(workspacePath, issueId, slotIndex, itemId) {
|
|
1171
|
-
writeSwarmSlotAssignments(workspacePath, issueId, (existing) => existing.filter((slot) => slot.slotIndex !== slotIndex && (itemId === void 0 || slot.itemId !== itemId)));
|
|
1397
|
+
return writeSwarmSlotAssignments(workspacePath, issueId, (existing) => existing.filter((slot) => slot.slotIndex !== slotIndex && (itemId === void 0 || slot.itemId !== itemId)));
|
|
1172
1398
|
}
|
|
1173
1399
|
function writeSwarmSlotAssignments(workspacePath, issueId, update) {
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
}
|
|
1183
|
-
});
|
|
1400
|
+
return updateIssueRecordForWorkspace(workspacePath, issueId.toUpperCase(), (record) => {
|
|
1401
|
+
const slotAssignments = update(record.swarm?.slotAssignments ?? []).filter((assignment) => Number.isInteger(assignment.slotIndex) && assignment.slotIndex > 0 && assignment.itemId.trim().length > 0).sort((a, b) => a.slotIndex - b.slotIndex);
|
|
1402
|
+
return {
|
|
1403
|
+
...record,
|
|
1404
|
+
swarm: {
|
|
1405
|
+
...record.swarm ?? {},
|
|
1406
|
+
slotAssignments
|
|
1407
|
+
}
|
|
1408
|
+
};
|
|
1409
|
+
}).then(() => void 0);
|
|
1184
1410
|
}
|
|
1185
1411
|
function slotIndexConflictReason(issueId, workspacePath, slotIndex, sessionNames, reconciled, deps) {
|
|
1186
1412
|
const issueLower = issueId.toLowerCase();
|
|
@@ -1243,6 +1469,6 @@ function registeredSlotCapacityAvailable(issueId, selectedCount, liveSlotCount =
|
|
|
1243
1469
|
return liveSlotCount + selectedCount < limits.reservedSwarmSlots;
|
|
1244
1470
|
}
|
|
1245
1471
|
//#endregion
|
|
1246
|
-
export { gcMergedSlots as _, getFailedMergeBlock as a, isSwarmAdvanceCoolingDown as c, recordStalledSlotRecovery as d, recordSwarmAdvanceFailure as f, decideAgentAutonomousRedrive as g, registeredSlotCapacityAvailable as h, dispatchNextWave as i, mergeReadySlots as l, recordSwarmFinalizedAt as m, classifyInFlightSlots as n, getFailedMergeBlocks as o, recordSwarmAdvanceSuccess as p, coordinateSwarmSlots as r, getSwarmFinalizedAt as s, allocateSlotIndex as t, recordFailedMergeBlock as u, gcOrphanedSlots as v, listFeatureWorkspaces as y };
|
|
1472
|
+
export { gcMergedSlots as _, getFailedMergeBlock as a, resolveSwarmPolicy as b, isSwarmAdvanceCoolingDown as c, recordStalledSlotRecovery as d, recordSwarmAdvanceFailure as f, decideAgentAutonomousRedrive as g, registeredSlotCapacityAvailable as h, dispatchNextWave as i, mergeReadySlots as l, recordSwarmFinalizedAt as m, classifyInFlightSlots as n, getFailedMergeBlocks as o, recordSwarmAdvanceSuccess as p, coordinateSwarmSlots as r, getSwarmFinalizedAt as s, allocateSlotIndex as t, recordFailedMergeBlock as u, gcOrphanedSlots as v, listFeatureWorkspaces as y };
|
|
1247
1473
|
|
|
1248
|
-
//# sourceMappingURL=deacon-swarm-
|
|
1474
|
+
//# sourceMappingURL=deacon-swarm-BPmBmSoU.js.map
|
package/server/deacon.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { en as flushAllPendingAutoCommits, nn as init_auto_commit } from "./config-yaml-CqaAyn8y.js";
|
|
2
2
|
import { a as init_activity_logger, o as setActivityEventStoreProvider } from "./activity-logger-pcbf-e30.js";
|
|
3
|
-
import { c as init_review_status, s as getReviewStatusSync } from "./review-status-
|
|
4
|
-
import {
|
|
5
|
-
import { r as setCloisterEventStoreProvider, t as getCloisterService } from "./service-
|
|
6
|
-
import { i as ensureInternalTokenSync, s as init_internal_token, t as INTERNAL_TOKEN_HEADER } from "./internal-token-
|
|
7
|
-
import { F as setAgentStatusChangedNotifier, I as setAgentStoppedNotifier, L as setMergeReadyNotifier, M as resetPatrolHeartbeatForStartup, N as runPatrol } from "./deacon-
|
|
8
|
-
import { t as enrichReviewStatus } from "./review-status-enrichment-
|
|
3
|
+
import { c as init_review_status, s as getReviewStatusSync } from "./review-status-DANr0t-v.js";
|
|
4
|
+
import { Nn as getAgentState, s as init_agents } from "./queries-C0LCGG21.js";
|
|
5
|
+
import { r as setCloisterEventStoreProvider, t as getCloisterService } from "./service-CLVBC_1Y.js";
|
|
6
|
+
import { i as ensureInternalTokenSync, s as init_internal_token, t as INTERNAL_TOKEN_HEADER } from "./internal-token-Cl-1IxaE.js";
|
|
7
|
+
import { F as setAgentStatusChangedNotifier, I as setAgentStoppedNotifier, L as setMergeReadyNotifier, M as resetPatrolHeartbeatForStartup, N as runPatrol } from "./deacon-Dru5onpk.js";
|
|
8
|
+
import { t as enrichReviewStatus } from "./review-status-enrichment-DwOg4UfL.js";
|
|
9
9
|
import { Effect } from "effect";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
//#region ../../lib/cloister/deacon-event-client.ts
|
|
@@ -319,6 +319,13 @@ async function shutdown(signal) {
|
|
|
319
319
|
} catch (err) {
|
|
320
320
|
console.error("[deacon-child] Cloister stop failed:", err);
|
|
321
321
|
}
|
|
322
|
+
try {
|
|
323
|
+
const { killAllGateProcessGroups } = await import("./validation-DpTNakM6.js");
|
|
324
|
+
const reaped = killAllGateProcessGroups();
|
|
325
|
+
if (reaped > 0) console.log(`[deacon-child] reaped ${reaped} in-flight gate process group(s)`);
|
|
326
|
+
} catch (err) {
|
|
327
|
+
console.error("[deacon-child] gate process reap failed:", err);
|
|
328
|
+
}
|
|
322
329
|
await Effect.runPromise(flushAllPendingAutoCommits()).catch((err) => {
|
|
323
330
|
console.error("[deacon-child] auto-commit shutdown flush failed:", err);
|
|
324
331
|
});
|