@overdeck/desktop 0.47.1 → 0.48.0

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.
Files changed (444) hide show
  1. package/drizzle/overdeck/0000_overdeck_init.sql +59 -0
  2. package/package.json +1 -1
  3. package/server/{acceptance-criteria-Cd7ZGZCq.js → acceptance-criteria-DmtLDbtt.js} +2 -2
  4. package/server/{activity-logger-CyteR4JO.js → activity-logger-Co5qljIj.js} +55 -4
  5. package/server/activity-logger-K7FYGF_z.js +3 -0
  6. package/server/{advancing-selfheal-DieFp3qi.js → advancing-selfheal-8AR68Asf.js} +6 -6
  7. package/server/{agent-gc-BMcgTDl7.js → agent-gc-BmYeT6eH.js} +5 -5
  8. package/server/agent-state-Dq3s84-P.js +3 -0
  9. package/server/{agent-state-service-DFO6qvHp.js → agent-state-service-DK1Vay1E.js} +1 -1
  10. package/server/{agent-state-service-BOzQhLjU.js → agent-state-service-rjnzpHDx.js} +6 -6
  11. package/server/{agent-state-source-Ca_zCaII.js → agent-state-source-Ds968-j6.js} +1 -1
  12. package/server/{agents-CtACUuVG.js → agents-Dls7tfJH.js} +5 -5
  13. package/server/agents-IPSa5kzn.js +3 -0
  14. package/server/{archive-planning-Binfb99i.js → archive-planning-Cq7cyinS.js} +51 -24
  15. package/server/archive-planning-MbkGCBIY.js +2 -0
  16. package/server/{artifact-index-jobs-Jn7BGOtV.js → artifact-index-jobs-Dj_8kpTd.js} +3 -3
  17. package/server/{assemble-DsqK9OAq.js → assemble-BTCmbcfH.js} +20 -13
  18. package/server/{auto-spawn-consent-BooqhC3L.js → auto-spawn-consent-lXqRJ1Dr.js} +304 -121
  19. package/server/{backlog-auto-trigger-BADGPxov.js → backlog-auto-trigger-Dn-amzt6.js} +3 -3
  20. package/server/{behavior-B7biGtFT.js → behavior-DIMQMRzs.js} +2 -2
  21. package/server/{boot-reconciled-stop-events-bQUzU8ns.js → boot-reconciled-stop-events-D6SeUTIr.js} +1 -1
  22. package/server/{bridge-pool-patrol-DsPj6F7t.js → bridge-pool-patrol-BEjt-xF3.js} +2 -2
  23. package/server/{briefing-freshness-CUerZqWd.js → briefing-freshness-3PNmL_p3.js} +2 -2
  24. package/server/{build-info-D0q_i8WM.js → build-info-CJg813Hm.js} +3 -3
  25. package/server/{build-info-Du74MKiP.js → build-info-CXyeFsXu.js} +1 -1
  26. package/server/{checkpoint-manager-Cu-R5Uzg.js → checkpoint-manager-9t7G5c1V.js} +1 -1
  27. package/server/{checkpoint-manager-R5tnaxEY.js → checkpoint-manager-B2G38R3p.js} +3 -3
  28. package/server/checkpoint-worker.js +1 -1
  29. package/server/{checkpoints-wF84ubZ8.js → checkpoints-CuBgiXO-.js} +1 -1
  30. package/server/{checkpoints-DYtLu-PB.js → checkpoints-VTZMd4Qm.js} +2 -2
  31. package/server/{claude-hooks-provision-DXI3Wqlm.js → claude-hooks-provision-55SyQaPz.js} +2 -2
  32. package/server/{claude-hooks-provision-UKxCeOyj.js → claude-hooks-provision-CEUT-CZd.js} +1 -1
  33. package/server/{claude-permissions-DYVLnX9t.js → claude-permissions-Cn0dIu2i.js} +2 -2
  34. package/server/{claude-settings-overlay-DxP2F_gY.js → claude-settings-overlay-B19hdzSA.js} +1 -1
  35. package/server/{claude-settings-overlay-DsbpIq2d.js → claude-settings-overlay-Yg_ANh81.js} +2 -2
  36. package/server/{cli-DzRKxxP_.js → cli-C9S84iTy.js} +79 -22
  37. package/server/cli-M1cwZ__d.js +3 -0
  38. package/server/{cliproxy-CG4meRFc.js → cliproxy-CJq3KXU6.js} +2 -2
  39. package/server/{cliproxy-Cwzw39yN.js → cliproxy-DgEZlr7Y.js} +1 -1
  40. package/server/{close-issue-BX1bATJy.js → close-issue-DPxRddGR.js} +5 -5
  41. package/server/{closed-issue-reaper-hLt0W86J.js → closed-issue-reaper-C5Zn4GRS.js} +13 -13
  42. package/server/{closed-issue-reaper-DvnTSN6a.js → closed-issue-reaper-D-2B48Ri.js} +1 -1
  43. package/server/{codex-rnJN3v3_.js → codex-B3n_rkwn.js} +1 -1
  44. package/server/{codex-BYwi1uyW.js → codex-CjkD1PJu.js} +6 -6
  45. package/server/{codex-parser-Poyz29GE.js → codex-parser-DpB1Il-P.js} +2 -2
  46. package/server/{compaction-continuation-DtMfHN0f.js → compaction-continuation-DZD9ukSE.js} +3 -3
  47. package/server/{config-R793W0yA.js → config-C5saf4Ja.js} +1 -1
  48. package/server/{config-CX4vk1CV.js → config-DnLJATZk.js} +2 -2
  49. package/server/{config-ktAVnp4s.js → config-DvM8jtQK.js} +2 -2
  50. package/server/{config-yaml-CxdwhAIA.js → config-yaml-BSCqwmX0.js} +11299 -10972
  51. package/server/{conflict-gate-BSTlwCtF.js → conflict-gate-DXa_L28t.js} +1 -1
  52. package/server/{conflict-gate-BNv6UolH.js → conflict-gate-WfVqgalf.js} +4 -4
  53. package/server/{context-layers-DCdaGsRG.js → context-layers-D7UqH9Ab.js} +2 -2
  54. package/server/{context-layers-DlWsDiRF.js → context-layers-Dpz3Vd6d.js} +3 -3
  55. package/server/{control-settings-qYYHrIqy.js → control-settings-DVf6pKyv.js} +4 -4
  56. package/server/{conversation-compaction-BxUKObHb.js → conversation-compaction-5XuH6OBn.js} +1 -1
  57. package/server/{conversation-compaction-CXQrN3I_.js → conversation-compaction-COrbnX1J.js} +8 -8
  58. package/server/{conversation-service-CZiUE8Uw.js → conversation-service-BufdtnZF.js} +169 -10
  59. package/server/{conversation-service-CDnQ3ayN.js → conversation-service-DnUyIiLb.js} +1 -1
  60. package/server/{conversations-D7lR670u.js → conversations-B4rxz-Wl.js} +17 -10
  61. package/server/{conversations-DXl5YTf4.js → conversations-D1bwxQMy.js} +1 -1
  62. package/server/{cost-Aat8HfO_.js → cost-CpFDrJUS.js} +46 -2
  63. package/server/{cost-CWvN9FP2.js → cost-KLuwKCW9.js} +3 -3
  64. package/server/{cost-sync-DiUBXwl6.js → cost-sync-cesi9dp8.js} +3 -3
  65. package/server/{dag-5QlmH0oC.js → dag-BYiFMqpU.js} +2 -2
  66. package/server/{dangerous-git-ops-DWX6Og8c.js → dangerous-git-ops-BKvd3-Hk.js} +1 -1
  67. package/server/dashboard-db-worker.js +7 -7
  68. package/server/{deacon-PW_bg4uL.js → deacon-BbsWw8a6.js} +3 -3
  69. package/server/{deacon-B1LD5cJU.js → deacon-HdEh0Esp.js} +672 -181
  70. package/server/deacon-event-client-C93rvOT7.js +237 -0
  71. package/server/deacon-event-client-Ck5Ei7Mn.js +3 -0
  72. package/server/{deacon-nudge-log-DPHsO14z.js → deacon-nudge-log-BND_97Wo.js} +4 -3
  73. package/server/{deacon-pending-lifecycle-2ZflPxgo.js → deacon-pending-lifecycle-CD3YsiQK.js} +3 -3
  74. package/server/deacon-swarm-DgWADWd_.js +2 -0
  75. package/server/{deacon-swarm-DwGUgSVp.js → deacon-swarm-rqrl4TMs.js} +39 -18
  76. package/server/deacon.js +12 -210
  77. package/server/{dead-end-trip-B06RFIr2.js → dead-end-trip-DSF23CLX.js} +4 -3
  78. package/server/dead-end-trip-zKlS4v6f.js +2 -0
  79. package/server/delivery-CsbQdZkS.js +3 -0
  80. package/server/{deploy-patrol-BNjeCL8u.js → deploy-patrol-kARAkji4.js} +17 -21
  81. package/server/{deploy-queue-CKT_Ia9p.js → deploy-queue-Bj0HJT1i.js} +2 -2
  82. package/server/{deploy-queue-DMMYhFC8.js → deploy-queue-rjTUy1RM.js} +1 -1
  83. package/server/{deploy-window-DC8lze3d.js → deploy-window-B2IM-9G5.js} +10 -44
  84. package/server/{deploy-window-D_AimdNN.js → deploy-window-BNFWnA8D.js} +1 -1
  85. package/server/{dev-supervisor-C4F0vbno.js → dev-supervisor-B1mZYXz4.js} +2 -2
  86. package/server/{devcontainer-renderer-66sqMQIi.js → devcontainer-renderer-B-o68Z5B.js} +3 -3
  87. package/server/{dist-C5FT9lTG.js → dist-3W--cGMa.js} +1 -1
  88. package/server/dist-BR0QtwmS.js +3 -0
  89. package/server/{dist-src-B-AlGWSl.js → dist-src-C-Vk2jNk.js} +1 -1
  90. package/server/{docker-BxrFhTZ_.js → docker-DH3jUYg1.js} +1 -1
  91. package/server/{docker-CoAT8R0J.js → docker-meuLKLzV.js} +27 -20
  92. package/server/{dod-Bg6wsKTV.js → dod-D7-9dCOD.js} +1 -1
  93. package/server/{driver-CKVGi51s.js → driver-CmsY2RLl.js} +1 -1
  94. package/server/{durable-review-pipeline-D_DcfIGP.js → durable-review-pipeline-CStTgOAf.js} +1 -1
  95. package/server/{durable-review-pipeline-HkAgnx0L.js → durable-review-pipeline-Chq0lzjL.js} +1 -1
  96. package/server/{ensure-devcontainer-Bg5HJAcO.js → ensure-devcontainer-BE3llBWP.js} +1 -1
  97. package/server/{ensure-devcontainer-DTxChVuA.js → ensure-devcontainer-BXrY7C2Z.js} +4 -4
  98. package/server/{esm-shims-CaBWIR7f.js → esm-shims-Bzy4ZzNU.js} +1 -1
  99. package/server/event-store-COd2tOx8.js +3 -0
  100. package/server/{event-store-CrHcVC5_.js → event-store-D_AR-Y78.js} +184 -11
  101. package/server/{events-ChEFB7Jp.js → events-CCkFWa7X.js} +1 -1
  102. package/server/{events-DhRN-6vM.js → events-zjDQozet.js} +3 -3
  103. package/server/{factory-BezSPaTd.js → factory-DhavwKVc.js} +5 -5
  104. package/server/{feature-registry-population-DhswNiXx.js → feature-registry-population-DWGBKyWd.js} +4 -4
  105. package/server/{feature-registry-storage-CUVNpAso.js → feature-registry-storage-C5DkXmCM.js} +3 -3
  106. package/server/{features-B2CfNPFw.js → features-CC47YcCX.js} +2 -2
  107. package/server/{feedback-target-CMrEAoeA.js → feedback-target-D9Tex35_.js} +1 -1
  108. package/server/{feedback-target-VBr9gKgX.js → feedback-target-DoRCR3L-.js} +8 -8
  109. package/server/{feedback-writer-CY91ckuw.js → feedback-writer-CTSuA6lw.js} +1 -1
  110. package/server/{feedback-writer-xpFgU632.js → feedback-writer-DdsBdtNL.js} +5 -5
  111. package/server/{flywheel-DsICCjTR.js → flywheel-DHWHzaYK.js} +1 -1
  112. package/server/{flywheel-DQqsSm7P.js → flywheel-DJQa9az8.js} +14 -14
  113. package/server/{flywheel-CTVY3yCG.js → flywheel-TacAI9MA.js} +21 -17
  114. package/server/{flywheel-merge-order-C-TI4JGu.js → flywheel-merge-order-D2foPh88.js} +1 -1
  115. package/server/{flywheel-merge-order-CMGz-imq.js → flywheel-merge-order-DRtex2Dt.js} +7 -7
  116. package/server/forge-CdlCG9aS.js +3 -0
  117. package/server/{forge-RTNqJe6a.js → forge-c8LeC-tw.js} +2 -2
  118. package/server/{from-DxGcivc9.js → from-BogSwvr2.js} +1 -1
  119. package/server/{fs-lock-Bre3sGoz.js → fs-lock-D_GeJtXl.js} +3 -3
  120. package/server/{fts-operations-BuTdlZFA.js → fts-operations-DP9R-8Q3.js} +3 -3
  121. package/server/{git-utils-CedsVume.js → git-utils-C31x1lpE.js} +1 -1
  122. package/server/{git-utils-DtdoEXJk.js → git-utils-xQ74FoSn.js} +5 -4
  123. package/server/{github-app-DIE8BkHI.js → github-app-CpQSDlv8.js} +1 -1
  124. package/server/{github-app-gVnZcP9B.js → github-app-D2QuvZ3j.js} +3 -3
  125. package/server/{github-client-BrAC6ELh.js → github-client-D9YvJX5D.js} +3 -3
  126. package/server/{github-client-CBOkvBUl.js → github-client-Tpi3PmKX.js} +1 -1
  127. package/server/{github-pr-lookup-CgMULTPf.js → github-pr-lookup-DvBMv-IW.js} +2 -2
  128. package/server/{harness-binary-CnBHpd57.js → harness-binary-BHxWf_sX.js} +7 -6
  129. package/server/{harness-resolve-BVj6sI8m.js → harness-resolve-bj9WMABA.js} +4 -4
  130. package/server/{health-events-BBWO_Dh9.js → health-events-bCDPn59Z.js} +2 -2
  131. package/server/{health-events-Der6bOkm.js → health-events-qo7Ss34U.js} +1 -1
  132. package/server/{hooks-BOavco-e.js → hooks-Dyxtg5fk.js} +2 -2
  133. package/server/{hooks-BJNal-bs.js → hooks-X2XHBB2b.js} +1 -1
  134. package/server/{hume-DBocJFkA.js → hume-DrZEGpqc.js} +2 -2
  135. package/server/hume-YPsy4UA8.js +3 -0
  136. package/server/{idle-stack-reaper-DQFh8rDh.js → idle-stack-reaper-CJ1ygW0p.js} +37 -7
  137. package/server/{idle-stack-reaper-CyGxXOfC.js → idle-stack-reaper-uJGOb-vu.js} +1 -1
  138. package/server/{in-flight-guard-nXEKoxI7.js → in-flight-guard-CG2Eo-rr.js} +1 -1
  139. package/server/{infra-BDQDRopn.js → infra-CTrmVqc_.js} +111 -6
  140. package/server/{injection-DfFFEMKL.js → injection-BisQ0lpX.js} +1 -1
  141. package/server/{injection-CCopdUKz.js → injection-C9sxqbc2.js} +73 -193
  142. package/server/{inspect-agent-FCDlNT_i.js → inspect-agent-BoSO51YC.js} +12 -12
  143. package/server/inspect-agent-BykeOH4a.js +2 -0
  144. package/server/{internal-token-BG6yQKNL.js → internal-token-AvXePaQT.js} +2 -2
  145. package/server/{internal-token-BJZa40Ld.js → internal-token-Djkj-yqK.js} +1 -1
  146. package/server/{io-C0NV7y6C.js → io-mxOWMZ7I.js} +6 -6
  147. package/server/{issue-closed-CNNGbhWm.js → issue-closed-Bj_bCv_0.js} +7 -7
  148. package/server/{issue-lifecycle-DSH0GpWC.js → issue-lifecycle-A5YIpDZE.js} +1 -1
  149. package/server/{issue-lifecycle-BXfzxFCD.js → issue-lifecycle-BXUqaHzF.js} +32 -28
  150. package/server/{issue-service-singleton-F3A5VP6M.js → issue-service-singleton-BPNEXczv.js} +11 -11
  151. package/server/{issue-service-singleton-lwFJ4dHk.js → issue-service-singleton-CcaHjKPR.js} +1 -1
  152. package/server/{issues-DA-U_MpR.js → issues-AX-YBeAQ.js} +2 -2
  153. package/server/{jsonl-parser-BXiGANOh.js → jsonl-parser-CgYWQ20q.js} +7 -3
  154. package/server/kimi-code-BYbme0aV.js +579 -0
  155. package/server/kimi-code-D_Ppt82c.js +3 -0
  156. package/server/kimi-parser-B-JBg3Pv.js +147 -0
  157. package/server/{label-cleanup-BnxRk0Eo.js → label-cleanup-sXUlgdM0.js} +3 -3
  158. package/server/{lifecycle-DOgGnpIv.js → lifecycle-D2X3al0D.js} +2 -2
  159. package/server/{lifecycle-Di48-w4x.js → lifecycle-DjlljAZ1.js} +6 -6
  160. package/server/{lifecycle-io-eVG6v_8-.js → lifecycle-io-C5nVk55o.js} +1 -1
  161. package/server/{lifecycle-io-1XSeczTr.js → lifecycle-io-NPm1YtIG.js} +5 -5
  162. package/server/{linear-client-CvGo9n7M.js → linear-client--luYwCZg.js} +1 -1
  163. package/server/{linear-client-CYZRrcjp.js → linear-client-B8pLegW1.js} +3 -3
  164. package/server/{linear-mcp-auth-Cp0XaP96.js → linear-mcp-auth-BQVWV0I3.js} +6 -6
  165. package/server/{linear-mcp-auth-DoJnjdPZ.js → linear-mcp-auth-Dx81Zl4G.js} +1 -1
  166. package/server/memory-fts-worker.js +1 -1
  167. package/server/{merge-DO14mOr3.js → merge-Bx5Bh9pi.js} +3 -3
  168. package/server/{merge-ZF99ig6A.js → merge-Dqmh_zja.js} +1 -1
  169. package/server/{merge-agent-gpiRkcvj.js → merge-agent-DP9AUY29.js} +33 -33
  170. package/server/{merge-agent-C1-9zbP_.js → merge-agent-DWd0KfiS.js} +1 -1
  171. package/server/{merge-batch-C11ocNkO.js → merge-batch-BdmvTEAC.js} +1 -1
  172. package/server/{merge-completeness-CghMbyX7.js → merge-completeness-BfRwFjRx.js} +1 -1
  173. package/server/{merge-completeness-BUzPZy0E.js → merge-completeness-C1FevcDT.js} +4 -4
  174. package/server/merge-ops-B98tKc1e.js +2 -0
  175. package/server/merge-rebase-BLykMwPO.js +2 -0
  176. package/server/{merge-rebase-iwlUzZjr.js → merge-rebase-BX1xKsrE.js} +2 -2
  177. package/server/{merge-set-Dbnx4chw.js → merge-set-DsLjjLEV.js} +4 -4
  178. package/server/{merge-set-BymrheTj.js → merge-set-H6epHOsw.js} +1 -1
  179. package/server/{merge-sync-CM978zez.js → merge-sync-BEdfsQV4.js} +2 -2
  180. package/server/{merge-sync-CqEtqjI2.js → merge-sync-BebcWWGA.js} +1 -1
  181. package/server/{merge-train-DvLcAn1G.js → merge-train-D1I0lNOT.js} +4 -4
  182. package/server/{merge-train-deps-Cl_kcRbO.js → merge-train-deps-D_-C0Pk2.js} +4 -4
  183. package/server/{merge-verification-c9Y9mllw.js → merge-verification-DN1Ov9bU.js} +6 -6
  184. package/server/{merged-docker-cleanup-worker-CGiDOdv8.js → merged-docker-cleanup-worker-CfXSr2pA.js} +4 -4
  185. package/server/{merged-docker-cleanup-worker-DgsLOx3E.js → merged-docker-cleanup-worker-ybsPyHjB.js} +1 -1
  186. package/server/{multipart-parser-D0twwRjz.js → multipart-parser-CL5QG8iv.js} +2 -2
  187. package/server/{no-resume-mode-DZvP0M_S.js → no-resume-mode-DUR7Hi98.js} +1 -1
  188. package/server/node_modules/.package-lock.json +7 -7
  189. package/server/node_modules/brace-expansion/README.md +23 -1
  190. package/server/node_modules/brace-expansion/index.js +206 -85
  191. package/server/node_modules/brace-expansion/package.json +1 -1
  192. package/server/node_modules/msgpackr/dist/index-no-eval.cjs +34 -28
  193. package/server/node_modules/msgpackr/dist/index-no-eval.cjs.map +1 -1
  194. package/server/node_modules/msgpackr/dist/index-no-eval.min.js +1 -1
  195. package/server/node_modules/msgpackr/dist/index-no-eval.min.js.map +1 -1
  196. package/server/node_modules/msgpackr/dist/index.js +34 -28
  197. package/server/node_modules/msgpackr/dist/index.js.map +1 -1
  198. package/server/node_modules/msgpackr/dist/index.min.js +1 -1
  199. package/server/node_modules/msgpackr/dist/index.min.js.map +1 -1
  200. package/server/node_modules/msgpackr/dist/node.cjs +36 -29
  201. package/server/node_modules/msgpackr/dist/node.cjs.map +1 -1
  202. package/server/node_modules/msgpackr/dist/test.js +63 -32
  203. package/server/node_modules/msgpackr/dist/test.js.map +1 -1
  204. package/server/node_modules/msgpackr/dist/unpack-no-eval.cjs +34 -28
  205. package/server/node_modules/msgpackr/dist/unpack-no-eval.cjs.map +1 -1
  206. package/server/node_modules/msgpackr/package.json +1 -1
  207. package/server/node_modules/msgpackr/unpack.js +34 -28
  208. package/server/{orphan-proposed-reconciler-6r2OEfYd.js → orphan-proposed-reconciler-CEW1maPl.js} +1 -1
  209. package/server/{orphan-proposed-reconciler-DtQP6oE_.js → orphan-proposed-reconciler-DfqHZftT.js} +23 -22
  210. package/server/package-lock.json +8 -8
  211. package/server/package.json +1 -1
  212. package/server/{pan-dir-DAOb1V2-.js → pan-dir-DhgKfO86.js} +21 -6
  213. package/server/{paths-DuATV5iE.js → paths-BUuhi6jM.js} +17 -17
  214. package/server/{pending-lifecycle-claim-DQUHIDfX.js → pending-lifecycle-claim-DJlA1rTR.js} +2 -2
  215. package/server/{persistent-logger-CBj016pT.js → persistent-logger-s8cbpFNV.js} +2 -2
  216. package/server/{pickup-zXZl5lQI.js → pickup-2AxtB3dW.js} +1 -1
  217. package/server/{pipeline-membership-DHOXmvba.js → pipeline-membership-2_okL5bm.js} +1 -1
  218. package/server/{pipeline-membership-B2yUcBz7.js → pipeline-membership-Dqv6_0ig.js} +1 -1
  219. package/server/{pipeline-membership-gather-OkLXuvxR.js → pipeline-membership-gather-4F1-tXKI.js} +1 -1
  220. package/server/{pipeline-membership-gather-BIcJ-N0W.js → pipeline-membership-gather-CtJ_7aGf.js} +149 -17
  221. package/server/{pipeline-notifier-BmwrVKsO.js → pipeline-notifier-CO9rxJgB.js} +1 -1
  222. package/server/{pipeline-notifier-CxMes51i.js → pipeline-notifier-DDfVBJhJ.js} +2 -2
  223. package/server/{post-merge-lifecycle-worker-3u_rA4R0.js → post-merge-lifecycle-worker-DmSOkeNp.js} +3 -3
  224. package/server/{project-pipelines-C3SPFJ38.js → project-pipelines-72WE8GVK.js} +2 -2
  225. package/server/{project-repos-BOpBzkO6.js → project-repos-BAqDwtvi.js} +16 -11
  226. package/server/project-repos-Df90Zw7Y.js +3 -0
  227. package/server/projects-WqMWCdpa.js +3 -0
  228. package/server/{prompts-B0TtboFm.js → prompts-XkL10m8M.js} +2 -2
  229. package/server/{providers-O2smCvSz.js → providers-ClGPGkQ8.js} +15 -12
  230. package/server/providers-DFUOed8u.js +3 -0
  231. package/server/public/assets/{chunk-BO2N2NFS-D_pGACYN.js → chunk-BO2N2NFS-CeQUdPxr.js} +4 -4
  232. package/server/public/assets/{diagram-OG6HWLK6-BO6fe3hH.js → diagram-OG6HWLK6-B7rgk4yT.js} +1 -1
  233. package/server/public/assets/{dist-5zingMiA.js → dist-2RPazfXY.js} +3 -3
  234. package/server/public/assets/{dist-CVxhbI2E.js → dist-B9NInrVZ.js} +1 -1
  235. package/server/public/assets/{ganttDiagram-6RSMTGT7-Bgj4A7kp.js → ganttDiagram-6RSMTGT7-Bxp0gV14.js} +1 -1
  236. package/server/public/assets/{highlighted-body-OFNGDK62-DNPK7_cm.js → highlighted-body-OFNGDK62-CzoRTVlC.js} +1 -1
  237. package/server/public/assets/index-Cml-kHo6.css +1 -0
  238. package/server/public/assets/{index-DEpY-D1O.js → index-CvN8cEgs.js} +216 -215
  239. package/server/public/assets/{linear-BB0jQT16.js → linear-CFEEl3ND.js} +1 -1
  240. package/server/public/assets/mermaid-GHXKKRXX-CpV7nCBM.js +1 -0
  241. package/server/public/assets/{pieDiagram-4H26LBE5-DeGIzzpZ.js → pieDiagram-4H26LBE5-BeR8R0cr.js} +1 -1
  242. package/server/public/assets/{prod-XBLvikex.js → prod-CYjzjCrn.js} +4 -4
  243. package/server/public/assets/{quadrantDiagram-W4KKPZXB-BV9SLeWz.js → quadrantDiagram-W4KKPZXB-BpcTkFuW.js} +1 -1
  244. package/server/public/assets/{sankeyDiagram-5OEKKPKP-Dwja0gj8.js → sankeyDiagram-5OEKKPKP-Bx2ETEV5.js} +1 -1
  245. package/server/public/assets/{xychartDiagram-2RQKCTM6-DCB4qvfw.js → xychartDiagram-2RQKCTM6-BKgEAFaj.js} +1 -1
  246. package/server/public/index.html +2 -2
  247. package/server/{pull-requests-BonZ4WVG.js → pull-requests-B-KrUph5.js} +3 -3
  248. package/server/{pull-requests-DNcJUVWA.js → pull-requests-DK5k92B4.js} +1 -1
  249. package/server/{queries-DCX27GRr.js → queries-DVpl1vsU.js} +1212 -193
  250. package/server/{rally-Cxe7lKYX.js → rally-DbE561hD.js} +3 -3
  251. package/server/rally-O_st_X7n.js +3 -0
  252. package/server/{rally-api-CzkKenoi.js → rally-api-CZLeEd2C.js} +2 -2
  253. package/server/{rally-api-Cp50exEi.js → rally-api-DaHtn5QN.js} +1 -1
  254. package/server/{rally-client-Bu3Cekkw.js → rally-client-C-MAl8ur.js} +1 -1
  255. package/server/{rally-client-CyBBEDHu.js → rally-client-Ch3zRsBX.js} +5 -5
  256. package/server/{reap-terminal-sessions-CtAhr6L0.js → reap-terminal-sessions-C1n0ALRb.js} +2 -2
  257. package/server/{reap-terminal-sessions-DvFqQUnq.js → reap-terminal-sessions-DegFS2p1.js} +2 -2
  258. package/server/{rebuild-stack-hCQtprWC.js → rebuild-stack-C9Li44A3.js} +20 -10
  259. package/server/{rebuild-stack-BKYpIPDL.js → rebuild-stack-qC0jCNm6.js} +2 -2
  260. package/server/{reconstruct-cache-CF2avArx.js → reconstruct-cache-BHyiAg02.js} +7 -7
  261. package/server/record-aVzu-LGm.js +3 -0
  262. package/server/record-update-CZh46a2f.js +617 -0
  263. package/server/{record-update-DhI7eySG.js → record-update-DtdJK2Iw.js} +1 -1
  264. package/server/recovery-trip-CSNWSLDn.js +77 -0
  265. package/server/recovery-trip-_16hFKv4.js +3 -0
  266. package/server/{release-engine-_eO3VFth.js → release-engine-Be5MX5GP.js} +5 -5
  267. package/server/{release-set-vxgZwwZV.js → release-set-DJv_O6PS.js} +3 -3
  268. package/server/{remote-BienmcrZ.js → remote-BMM3uH2J.js} +3 -3
  269. package/server/{remote-CVPCc7Vy.js → remote-C0xVTHA5.js} +3 -3
  270. package/server/{remote-agents-kwsEZvXu.js → remote-agents-BIIoc5pD.js} +1 -1
  271. package/server/{remote-agents-kxraOCGT.js → remote-agents-EUiZ26bj.js} +7 -7
  272. package/server/{remote-completion-BtmZ42aP.js → remote-completion-BS4tJUn8.js} +13 -13
  273. package/server/resolver-BvHd6RE4.js +163 -0
  274. package/server/resume-9thEqAQR.js +3 -0
  275. package/server/{review-agent-CIRr0yYt.js → review-agent-BHGaBoBu.js} +29 -29
  276. package/server/{review-agent-UpAM4DmT.js → review-agent-CD3RQ-tc.js} +1 -1
  277. package/server/{review-artifacts-BCODM9ww.js → review-artifacts-DyhajWso.js} +6 -6
  278. package/server/{review-context-BBsNrDri.js → review-context-B-dlsPnx.js} +9 -9
  279. package/server/{review-convoy-liveness-l06_LYCt.js → review-convoy-liveness-D7M-s_nS.js} +2 -2
  280. package/server/{review-status-CacDM78F.js → review-status-B6wYcOtP.js} +1 -1
  281. package/server/{review-status-CwhA9wmd.js → review-status-CKLk5aZ-.js} +306 -59
  282. package/server/{review-status-emit-BPJwYcRy.js → review-status-emit-CJ7UmEVU.js} +3 -3
  283. package/server/{review-status-enrichment-DvyZAbGR.js → review-status-enrichment-DJRgGX7-.js} +3 -3
  284. package/server/review-status-limits-4EJDCGHO.js +7 -0
  285. package/server/{review-status-source-DWnFE0b6.js → review-status-source-7nU3Z2wL.js} +1 -1
  286. package/server/{review-status-source-B70ekARK.js → review-status-source-BsDYGfyv.js} +1 -1
  287. package/server/{review-status-sync-B0IS6Beh.js → review-status-sync-BLssMTEW.js} +1 -1
  288. package/server/{review-status-sync-h2CJX6ju.js → review-status-sync-BxBeHRde.js} +35 -11
  289. package/server/{review-verdict-feedback-yrrmgps_.js → review-verdict-feedback-5jWuzgpc.js} +22 -10
  290. package/server/{review-verdict-feedback-qRohbFG2.js → review-verdict-feedback-HRY9P4bN.js} +1 -1
  291. package/server/{rollup-CUoav0Op.js → rollup-BGIrCEkU.js} +79 -44
  292. package/server/rollup-CZB4UL9q.js +3 -0
  293. package/server/{scanner-ChURu_b-.js → scanner-DydjXPrz.js} +16 -9
  294. package/server/search-DdtIjAiu.js +395 -0
  295. package/server/{sequence-io-D9ITDxzq.js → sequence-io-Fw-cLyDs.js} +4 -4
  296. package/server/{sequencer-agent-m7gmaakW.js → sequencer-agent-BcpGMt5x.js} +15 -10
  297. package/server/server.js +1258 -438
  298. package/server/{service-BzFG0Us_.js → service-BFFkGsG4.js} +58 -58
  299. package/server/{session-fork-KBq4HIHF.js → session-fork-D0V-3e5P.js} +2 -2
  300. package/server/{session-history-C_EMhIIF.js → session-history-Bta5l9jY.js} +5 -5
  301. package/server/{settings-DejgzzLs.js → settings-Ce8B1daF.js} +2 -2
  302. package/server/{settings-BLbcDqUp.js → settings-E3FnEIUx.js} +3 -3
  303. package/server/settings-eOOJpxi_.js +2 -0
  304. package/server/{shadow-engineering-D8R9I8Yl.js → shadow-engineering-Mt9nJO4i.js} +3 -3
  305. package/server/{shadow-state-C0Af4clN.js → shadow-state-Bzj_AZCV.js} +1 -1
  306. package/server/{shadow-state-fzIqIMDD.js → shadow-state-DrkhoVSx.js} +2 -2
  307. package/server/{shadow-utils-Ugca_9ND.js → shadow-utils-H1GfqP06.js} +2 -2
  308. package/server/{ship-log-VAv-lHrF.js → ship-log-CFUIo4PR.js} +1 -1
  309. package/server/{smart-compaction-BcYY_Suf.js → smart-compaction-DSTq-Wua.js} +1 -1
  310. package/server/{smart-compaction-B2Xu5XEb.js → smart-compaction-Hzp3KCJX.js} +7 -7
  311. package/server/{spawn-planning-session-Dsv-350T.js → spawn-planning-session-C0uSA2SL.js} +2 -2
  312. package/server/{spawn-planning-session-DhCoBPct.js → spawn-planning-session-DN4son31.js} +23 -21
  313. package/server/{specialist-completion-z6v3ZqJE.js → specialist-completion-Cf6tpIh1.js} +1 -1
  314. package/server/{specialist-context-CrA5azkJ.js → specialist-context-DEUEkjIQ.js} +5 -5
  315. package/server/{specialist-handoff-logger-CmpZYJMB.js → specialist-handoff-logger-D_LmQDj3.js} +2 -2
  316. package/server/{specialist-logs-BorrIu0x.js → specialist-logs-7Ynue0R7.js} +3 -3
  317. package/server/{specialists-ZdrifiKx.js → specialists-CQwBEGlD.js} +1 -1
  318. package/server/{specialists-2yLmqph9.js → specialists-DAjPgYs_.js} +504 -238
  319. package/server/{specialists-Dfx9_Wzb.js → specialists-Hr6iW9fU.js} +18 -18
  320. package/server/{specialists-CH6ah6D-.js → specialists-MOoeB4A8.js} +1 -1
  321. package/server/specs-Dl88cbKY.js +3 -0
  322. package/server/{src-B948bGVR.js → src-BYdwL_n-.js} +668 -64
  323. package/server/{src-Dm_NV7f6.js → src-DQnkPN2i.js} +3 -3
  324. package/server/{src-B2e5rGu2.js → src-DhfDV0o4.js} +6 -6
  325. package/server/{stack-health-Bf2WdG4E.js → stack-health-D_iKwNRg.js} +107 -16
  326. package/server/stack-health-deVSdDwn.js +3 -0
  327. package/server/{stale-task-claims-D1Ll8fI5.js → stale-task-claims-BYJGqhLI.js} +5 -5
  328. package/server/{staleness-CuED1Psm.js → staleness-CopBDKnA.js} +1 -1
  329. package/server/{staleness-45qZ_a60.js → staleness-D8WeMUHd.js} +1 -1
  330. package/server/{state-home-B4EWfIxF.js → state-home-DjN8qduI.js} +24 -3
  331. package/server/{state-mapping-BEONzr8P.js → state-mapping-DlM7OYRW.js} +1 -1
  332. package/server/{state-migrate-Cd8BH33U.js → state-migrate-a2p1gtD7.js} +4 -4
  333. package/server/state-mirror-Cv_XgvT5.js +121 -0
  334. package/server/{stuck-remediation-ChcooZuk.js → stuck-remediation-CXJX_kki.js} +1 -1
  335. package/server/{stuck-remediation-DmY5UJLg.js → stuck-remediation-CbCRSz1v.js} +31 -732
  336. package/server/{substrate-bug-weights-service-BvTWrFUz.js → substrate-bug-weights-service-DxpopNd9.js} +3 -3
  337. package/server/{summary-fork--Jr8duYh.js → summary-fork-B61fjRJn.js} +2 -2
  338. package/server/{summary-fork-Ct514_Jl.js → summary-fork-B9pszUJN.js} +91 -10
  339. package/server/supervisor/{injection-budget-B3UyEONL.js → injection-budget-Ar7hgyJq.js} +1 -1
  340. package/server/supervisor/pty-supervisor.js +12 -3
  341. package/server/supervisor/{pty-token-CWRffcCa.js → pty-token-CXCFU0Z8.js} +1 -1
  342. package/server/{supervisor-B7BHGcNA.js → supervisor-BvnxbuuF.js} +6 -4
  343. package/server/supervisor-C69kpqvd.js +2 -0
  344. package/server/{swarm-readiness-MNE5O8hn.js → swarm-readiness-vTw1kqGa.js} +3 -3
  345. package/server/{system-prerequisites-Cin9ZgDx.js → system-prerequisites-LLzTEqsK.js} +3 -3
  346. package/server/{teardown-workspace-CvBpvc85.js → teardown-workspace-CqKKVJr1.js} +15 -15
  347. package/server/{test-agent-queue-DmSIqays.js → test-agent-queue-CWMq7oyG.js} +8 -7
  348. package/server/{test-verdict-BieVDAV1.js → test-verdict-NdtgRBuA.js} +1 -1
  349. package/server/{test-verdict-Cy2jJGTe.js → test-verdict-diIWE6hz.js} +15 -3
  350. package/server/{tldr-daemon-Ca0eovh3.js → tldr-daemon-B1Jhrtc8.js} +1 -1
  351. package/server/{tldr-daemon-IOssGwg7.js → tldr-daemon-Bpls1CJB.js} +2 -2
  352. package/server/{tmux-CfDHob9M.js → tmux-CImZaX4q.js} +10 -16
  353. package/server/tmux-Cjpx8L8u.js +4 -0
  354. package/server/{token-B10VFNOD.js → token-Bgpjo3tE.js} +2 -2
  355. package/server/token-util-BsjFll-k.js +3 -0
  356. package/server/{token-util-CZ8WPtdk.js → token-util-BymbpkJp.js} +1 -1
  357. package/server/{tracker-config-CHbrjg6m.js → tracker-config-4DaKVTfc.js} +2 -2
  358. package/server/{tracker-utils-DZZq_C0R.js → tracker-utils-BDeAXC-q.js} +2 -2
  359. package/server/{traefik-connect-GHomyBaD.js → traefik-connect-CC5FyxYj.js} +1 -1
  360. package/server/{tunnel-Dz7y434T.js → tunnel-CDWkeceJ.js} +1 -1
  361. package/server/{tunnel-Bdyb-sNq.js → tunnel-CPf5M-Pc.js} +3 -3
  362. package/server/{typed-errors-Bn_2WRU7.js → typed-errors-9K7Dq_Vn.js} +1 -1
  363. package/server/{typed-errors-BR_RmPS_.js → typed-errors-DrS5fb5z.js} +1 -1
  364. package/server/{types-D2ETIB8T.js → types-DzlUKiuf.js} +4 -3
  365. package/server/{types-Dh6RI5Vj.js → types-kI9ik8XO.js} +1 -1
  366. package/server/{uat-promote-verification-DyvQXvIn.js → uat-promote-verification-c_pxoxEc.js} +5 -5
  367. package/server/{uat-train-Dv0Bxer7.js → uat-train-CWGxBdJO.js} +0 -0
  368. package/server/{uat-train-diX_7shd.js → uat-train-CfCYd2ve.js} +1 -1
  369. package/server/{validate-606KcYZC.js → validate-f3ItVCfm.js} +3 -3
  370. package/server/{validation-Cf7aaV5A.js → validation-5G_wQtea.js} +1 -1
  371. package/server/{validation-CnrDul1x.js → validation-7tSiCM82.js} +4 -4
  372. package/server/{verification-artifact-GOaj8u2s.js → verification-artifact-9h9dH8uX.js} +1 -1
  373. package/server/{verification-artifact-D4b-bio9.js → verification-artifact-C_4WJnf6.js} +1 -1
  374. package/server/{verification-runner-DiPaUP-C.js → verification-runner-BV5F6wrA.js} +1 -1
  375. package/server/{verification-runner-B5MVxDvU.js → verification-runner-D58KmBhK.js} +18 -38
  376. package/server/{vtt-parser-CMU5EZ5R.js → vtt-parser-2iT9OHa9.js} +1 -1
  377. package/server/{work-agent-prompt-Csb3fbVR.js → work-agent-prompt-D03s4DD1.js} +9 -9
  378. package/server/{workflows-D87ajwV6.js → workflows-BMBwLYPV.js} +281 -98
  379. package/server/workflows-BOmWGpIh.js +2 -0
  380. package/server/{workspace-iD8oULqu.js → workspace-BgflNCH0.js} +3 -3
  381. package/server/{workspace-AIOM7n00.js → workspace-Cn9ywfSW.js} +1 -1
  382. package/server/{workspace-anchor-drift-19cJ1bH5.js → workspace-anchor-drift-C8Fy3shi.js} +1 -1
  383. package/server/{workspace-anchor-drift-C3mK5wNI.js → workspace-anchor-drift-CMiNncwq.js} +5 -8
  384. package/server/{workspace-config-CJ7RqQiP.js → workspace-config-aUc2nIz6.js} +1 -1
  385. package/server/{workspace-manager-CXfrw4rR.js → workspace-manager-Bem7ZBs9.js} +521 -292
  386. package/server/workspace-manager-C0CpNh3t.js +3 -0
  387. package/server/{workspace-metadata-BuMRco5P.js → workspace-metadata-C5iSlPRo.js} +1 -1
  388. package/server/{workspace-metadata-eHSj_NsP.js → workspace-metadata-UKmTYmDQ.js} +2 -2
  389. package/server/{workspaces-DbtMX2TM.js → workspaces-DqxgwDZ8.js} +143 -113
  390. package/sync-sources/hooks/notification-hook +12 -1
  391. package/sync-sources/hooks/pan-hook-lib.sh +226 -0
  392. package/sync-sources/hooks/session-start-hook +31 -4
  393. package/sync-sources/hooks/work-agent-stop-hook +23 -1
  394. package/sync-sources/skills/pan-memory/SKILL.md +19 -3
  395. package/sync-sources/skills/pan-projects/SKILL.md +9 -0
  396. package/sync-sources/skills/pan-restart/SKILL.md +26 -7
  397. package/sync-sources/skills/pan-workspace/SKILL.md +77 -0
  398. package/server/activity-logger-CMthG6Vd.js +0 -3
  399. package/server/agent-state-DyZJia9f.js +0 -3
  400. package/server/agents-Dnn4XgdB.js +0 -3
  401. package/server/archive-planning-BHCd_eL5.js +0 -2
  402. package/server/cli-D6mRfUE6.js +0 -3
  403. package/server/deacon-swarm-BkKR7SXu.js +0 -2
  404. package/server/delivery-C2M73sBg.js +0 -3
  405. package/server/dist-qcf9gAP0.js +0 -3
  406. package/server/event-store-5UKzh9Jf.js +0 -3
  407. package/server/forge-D647IMNa.js +0 -3
  408. package/server/fts-db-wROfFfje.js +0 -146
  409. package/server/hume-DtWN8oV5.js +0 -3
  410. package/server/inspect-agent-CPqXI81t.js +0 -2
  411. package/server/merge-ops-7QqziXAh.js +0 -2
  412. package/server/merge-rebase-B4pgzvQJ.js +0 -2
  413. package/server/node_modules/brace-expansion/.tap/coverage/8b906b8c-e21f-40b5-8c0d-214d8c2682c5.json +0 -757
  414. package/server/node_modules/brace-expansion/.tap/processinfo/8b906b8c-e21f-40b5-8c0d-214d8c2682c5.json +0 -719
  415. package/server/node_modules/brace-expansion/ADVISORY-CVE-2026-14257.md +0 -107
  416. package/server/node_modules/brace-expansion/dist/commonjs/index.d.ts +0 -8
  417. package/server/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +0 -1
  418. package/server/node_modules/brace-expansion/dist/commonjs/index.js +0 -263
  419. package/server/node_modules/brace-expansion/dist/commonjs/index.js.map +0 -1
  420. package/server/node_modules/brace-expansion/dist/commonjs/package.json +0 -3
  421. package/server/node_modules/brace-expansion/dist/esm/index.d.ts +0 -8
  422. package/server/node_modules/brace-expansion/dist/esm/index.d.ts.map +0 -1
  423. package/server/node_modules/brace-expansion/dist/esm/index.js +0 -259
  424. package/server/node_modules/brace-expansion/dist/esm/index.js.map +0 -1
  425. package/server/node_modules/brace-expansion/dist/esm/package.json +0 -3
  426. package/server/project-repos-BgW4lcIa.js +0 -3
  427. package/server/projects-_n3Zui6K.js +0 -3
  428. package/server/providers-BI1mOBQ4.js +0 -3
  429. package/server/public/assets/index-Ddkcz3WT.css +0 -1
  430. package/server/public/assets/mermaid-GHXKKRXX-BzPfaQJ1.js +0 -1
  431. package/server/rally-x6ztTQo4.js +0 -3
  432. package/server/record-BTwWhtBb.js +0 -3
  433. package/server/record-update-DaOKS7Wb.js +0 -277
  434. package/server/recovery-trip-D-wM9EfB.js +0 -44
  435. package/server/resume-DXIIfJNk.js +0 -3
  436. package/server/rollup-DxCjJaAM.js +0 -3
  437. package/server/settings-9jSGHBPY.js +0 -2
  438. package/server/specs-DKV3jIEs.js +0 -3
  439. package/server/stack-health-CoWAhA99.js +0 -3
  440. package/server/supervisor-CyR_mW5B.js +0 -2
  441. package/server/tmux-Ctk6RV5l.js +0 -3
  442. package/server/token-util-CrfQ2FKf.js +0 -3
  443. package/server/workflows-DN6NyVGd.js +0 -2
  444. package/server/workspace-manager-B38rFWA1.js +0 -3
@@ -4,6 +4,7 @@ CREATE TABLE `agents` (
4
4
  `role` text NOT NULL,
5
5
  `status` text NOT NULL,
6
6
  `workspace` text NOT NULL,
7
+ `workspace_id` text,
7
8
  `session_id` text,
8
9
  `harness` text NOT NULL,
9
10
  `model` text NOT NULL,
@@ -97,6 +98,7 @@ CREATE TABLE `conversations` (
97
98
  `fork_fallback_reason` text,
98
99
  `delivery_method` text,
99
100
  `spawn_error` text,
101
+ `workspace_id` text,
100
102
  FOREIGN KEY (`handoff_target_conv_id`) REFERENCES `conversations`(`id`) ON UPDATE no action ON DELETE no action,
101
103
  FOREIGN KEY (`cleared_to_conv_id`) REFERENCES `conversations`(`id`) ON UPDATE no action ON DELETE no action
102
104
  );
@@ -566,3 +568,60 @@ CREATE TABLE `flywheel_substrate_bugs` (
566
568
  );--> statement-breakpoint
567
569
  CREATE INDEX `idx_fsb_filed_at` ON `flywheel_substrate_bugs` (`filed_at`);--> statement-breakpoint
568
570
  CREATE INDEX `idx_fsb_status` ON `flywheel_substrate_bugs` (`status`);--> statement-breakpoint
571
+ CREATE TABLE `event_idempotency` (
572
+ `key` text PRIMARY KEY NOT NULL,
573
+ `sequence` integer NOT NULL,
574
+ `created_at` integer NOT NULL
575
+ );--> statement-breakpoint
576
+ CREATE TABLE `projects` (
577
+ `id` text PRIMARY KEY NOT NULL,
578
+ `name` text NOT NULL,
579
+ `primary_path` text NOT NULL,
580
+ `created_at` integer NOT NULL,
581
+ `last_accessed_at` integer NOT NULL,
582
+ `is_system` integer DEFAULT 0 NOT NULL
583
+ );--> statement-breakpoint
584
+ CREATE UNIQUE INDEX `projects_primary_path_idx` ON `projects` (`primary_path`);--> statement-breakpoint
585
+ CREATE TABLE `workspaces` (
586
+ `id` text PRIMARY KEY NOT NULL,
587
+ `project_id` text NOT NULL,
588
+ `kind` text NOT NULL,
589
+ `name` text NOT NULL,
590
+ `path` text NOT NULL,
591
+ `branch_name` text,
592
+ `parent_branch` text,
593
+ `parent_branch_guessed` integer DEFAULT 0 NOT NULL,
594
+ `is_git_repository` integer DEFAULT 1 NOT NULL,
595
+ `issue_id` text,
596
+ `layout_config` text,
597
+ `is_favorite` integer DEFAULT 0,
598
+ `is_archived` integer DEFAULT 0,
599
+ `title` text,
600
+ `created_at` integer NOT NULL,
601
+ `last_accessed_at` integer NOT NULL,
602
+ FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade,
603
+ CHECK (`kind` IN ('main','issue','scratch'))
604
+ );--> statement-breakpoint
605
+ CREATE INDEX `idx_workspace_project` ON `workspaces` (`project_id`);--> statement-breakpoint
606
+ CREATE INDEX `idx_workspace_kind` ON `workspaces` (`kind`);--> statement-breakpoint
607
+ CREATE INDEX `idx_workspace_last_accessed` ON `workspaces` (`last_accessed_at`);--> statement-breakpoint
608
+ CREATE TABLE `project_targets` (
609
+ `project_id` text NOT NULL,
610
+ `path` text NOT NULL,
611
+ `is_primary` integer DEFAULT 0 NOT NULL,
612
+ `created_at` integer NOT NULL,
613
+ `last_used_at` integer NOT NULL,
614
+ PRIMARY KEY(`project_id`, `path`),
615
+ FOREIGN KEY (`project_id`) REFERENCES `projects`(`id`) ON UPDATE no action ON DELETE cascade
616
+ );--> statement-breakpoint
617
+ CREATE UNIQUE INDEX `idx_project_targets_one_primary` ON `project_targets` (`project_id`) WHERE `is_primary` = 1;--> statement-breakpoint
618
+ CREATE TABLE `pinned_docs` (
619
+ `id` text PRIMARY KEY NOT NULL,
620
+ `scope` text NOT NULL,
621
+ `scope_id` text NOT NULL,
622
+ `doc_path` text NOT NULL,
623
+ `created_at` integer NOT NULL,
624
+ CHECK (`scope` IN ('workspace','project')),
625
+ UNIQUE(`scope`, `scope_id`, `doc_path`)
626
+ );--> statement-breakpoint
627
+ CREATE INDEX `idx_pinned_docs_scope` ON `pinned_docs` (`scope`, `scope_id`);--> statement-breakpoint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@overdeck/desktop",
3
- "version": "0.47.1",
3
+ "version": "0.48.0",
4
4
  "description": "Overdeck Command Deck — AI agent monitoring desktop app",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,4 +1,4 @@
1
- import { m as readWorkspacePlanSync, o as init_io, v as init_types, y as subItemsOf } from "./io-C0NV7y6C.js";
1
+ import { b as subItemsOf, h as readWorkspacePlanSync, s as init_io, y as init_types } from "./io-mxOWMZ7I.js";
2
2
  import "effect";
3
3
  //#region ../../lib/xbrief/acceptance-criteria.ts
4
4
  init_io();
@@ -59,4 +59,4 @@ function extractACFromDocument(doc) {
59
59
  //#endregion
60
60
  export { getXBriefACStatusSync as n, extractACFromDocument as t };
61
61
 
62
- //# sourceMappingURL=acceptance-criteria-Cd7ZGZCq.js.map
62
+ //# sourceMappingURL=acceptance-criteria-DmtLDbtt.js.map
@@ -1,4 +1,5 @@
1
1
  import { n as __esmMin } from "./rolldown-runtime-DNCzzKnI.js";
2
+ import { f as init_config, s as getDashboardApiUrlSync } from "./config-DnLJATZk.js";
2
3
  import "effect";
3
4
  import { randomUUID } from "crypto";
4
5
  //#region ../../lib/activity-logger.ts
@@ -47,7 +48,10 @@ function appendActivityEvent(event) {
47
48
  * logical activity.
48
49
  */
49
50
  async function emitActivityEntryDurable(options) {
50
- await persistActivityEvent({
51
+ await persistActivityEvent(buildActivityEntryEvent(options));
52
+ }
53
+ function buildActivityEntryEvent(options) {
54
+ return {
51
55
  type: "activity.entry",
52
56
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
53
57
  payload: {
@@ -63,7 +67,53 @@ async function emitActivityEntryDurable(options) {
63
67
  link: options.link,
64
68
  desktop: options.desktop
65
69
  }
66
- });
70
+ };
71
+ }
72
+ /**
73
+ * PAN-3092: emit an activity entry AT MOST ONCE for a given id, and tell the
74
+ * caller what actually happened to it.
75
+ *
76
+ * Reusing an id is not enough on its own: the reducer replaces the visible row,
77
+ * but a second `activity.entry` event is still appended, re-published to every
78
+ * connected client, and re-dated to the front of the feed — a repeat warning.
79
+ * The claim and the append therefore happen inside one store transaction, so
80
+ * concurrent callers cannot both observe absence and append.
81
+ *
82
+ * The outcome is reported only after that transaction settles. `appendAsync`
83
+ * cannot be used for this: in the deacon child it resolves on local enqueue
84
+ * before any HTTP request, and in the in-process store a failed batch resolves
85
+ * with sequence 0 rather than rejecting — both would report success for an
86
+ * event that never persisted.
87
+ */
88
+ async function emitActivityEntryOnce(options) {
89
+ const store = getActivityEventStore();
90
+ if (!store) return "failed";
91
+ const event = buildActivityEntryEvent(options);
92
+ if (!store.appendOnce) try {
93
+ await persistActivityEvent(event);
94
+ return "unconfirmed";
95
+ } catch {
96
+ return "failed";
97
+ }
98
+ try {
99
+ const result = await store.appendOnce(event, options.id);
100
+ return typeof result === "string" ? result : result.outcome;
101
+ } catch {
102
+ return "failed";
103
+ }
104
+ }
105
+ /**
106
+ * Emit an idempotent activity through the in-process store when available, or
107
+ * through the settled internal event endpoint from short-lived CLI processes.
108
+ */
109
+ async function emitActivityEntryOncePortable(options) {
110
+ if (getActivityEventStore()) return emitActivityEntryOnce(options);
111
+ try {
112
+ const { createDeaconEventClient } = await import("./deacon-event-client-Ck5Ei7Mn.js");
113
+ return await createDeaconEventClient({ dashboardUrl: getDashboardApiUrlSync() }).appendOnce(buildActivityEntryEvent(options), options.id);
114
+ } catch {
115
+ return "failed";
116
+ }
67
117
  }
68
118
  /**
69
119
  * Emit an activity.entry domain event without blocking the caller. Failures are
@@ -193,9 +243,10 @@ function emitDashboardLifecycleSync(status, options) {
193
243
  }
194
244
  var activityEventStoreProvider;
195
245
  var init_activity_logger = __esmMin((() => {
246
+ init_config();
196
247
  activityEventStoreProvider = null;
197
248
  }));
198
249
  //#endregion
199
- export { emitDashboardLifecycleSync as a, emitActivityTtsSync as i, emitActivityEntryDurable as n, init_activity_logger as o, emitActivityEntrySync as r, setActivityEventStoreProvider as s, emitActivityDetailedSync as t };
250
+ export { emitActivityEntrySync as a, init_activity_logger as c, emitActivityEntryOncePortable as i, setActivityEventStoreProvider as l, emitActivityEntryDurable as n, emitActivityTtsSync as o, emitActivityEntryOnce as r, emitDashboardLifecycleSync as s, emitActivityDetailedSync as t };
200
251
 
201
- //# sourceMappingURL=activity-logger-CyteR4JO.js.map
252
+ //# sourceMappingURL=activity-logger-Co5qljIj.js.map
@@ -0,0 +1,3 @@
1
+ import { a as emitActivityEntrySync, c as init_activity_logger, o as emitActivityTtsSync } from "./activity-logger-Co5qljIj.js";
2
+ init_activity_logger();
3
+ export { emitActivityEntrySync, emitActivityTtsSync };
@@ -1,8 +1,8 @@
1
- import { D as killSession, M as listSessionNames, w as init_tmux } from "./tmux-CfDHob9M.js";
2
- import { d as getReviewStatusSync, h as loadReviewStatuses, p as init_review_status } from "./review-status-CwhA9wmd.js";
3
- import { r as logDeaconEventSync, t as init_persistent_logger } from "./persistent-logger-CBj016pT.js";
4
- import { _r as saveAgentStateSync, b as init_agents, rr as getAgentStateSync, ur as markAgentStoppedState } from "./queries-DCX27GRr.js";
5
- import { a as selectMergedAdvancingSessions, t as init_reap_terminal_sessions } from "./reap-terminal-sessions-CtAhr6L0.js";
1
+ import { C as init_tmux, E as killSession, j as listSessionNames } from "./tmux-CImZaX4q.js";
2
+ import { d as getReviewStatusSync, h as loadReviewStatuses, p as init_review_status } from "./review-status-CKLk5aZ-.js";
3
+ import { r as logDeaconEventSync, t as init_persistent_logger } from "./persistent-logger-s8cbpFNV.js";
4
+ import { Dr as markAgentStoppedState, Pr as saveAgentStateSync, b as init_agents, br as getAgentStateSync } from "./queries-DVpl1vsU.js";
5
+ import { a as selectMergedAdvancingSessions, t as init_reap_terminal_sessions } from "./reap-terminal-sessions-C1n0ALRb.js";
6
6
  import { Effect } from "effect";
7
7
  //#region ../../lib/cloister/advancing-selfheal.ts
8
8
  init_agents();
@@ -135,4 +135,4 @@ async function runBootAdvancingSelfHeal(deps = defaultBootAdvancingSelfHealDeps)
135
135
  //#endregion
136
136
  export { checkMergedAdvancingSessions, markAdvancingSessionStopped, reconcileInFlightJournals, runBootAdvancingSelfHeal };
137
137
 
138
- //# sourceMappingURL=advancing-selfheal-DieFp3qi.js.map
138
+ //# sourceMappingURL=advancing-selfheal-8AR68Asf.js.map
@@ -1,7 +1,7 @@
1
- import { Pt as init_record, Rt as readIssueRecordForWorkspaceSync } from "./config-yaml-CxdwhAIA.js";
2
- import { c as listAllAgentsSync, l as removeAgentSync, o as init_agents } from "./agents-CtACUuVG.js";
3
- import { n as resolveGitHubIssueSync, t as init_tracker_utils } from "./tracker-utils-DZZq_C0R.js";
4
- import { n as mapGitHubStateToCanonical, t as init_state_mapping } from "./state-mapping-BEONzr8P.js";
1
+ import { Z as readIssueRecordForWorkspaceSync, q as init_record } from "./config-yaml-BSCqwmX0.js";
2
+ import { c as listAllAgentsSync, l as removeAgentSync, o as init_agents } from "./agents-Dls7tfJH.js";
3
+ import { n as resolveGitHubIssueSync, t as init_tracker_utils } from "./tracker-utils-BDeAXC-q.js";
4
+ import { n as mapGitHubStateToCanonical, t as init_state_mapping } from "./state-mapping-DlM7OYRW.js";
5
5
  import { readdir, readlink } from "fs/promises";
6
6
  import { execFile } from "child_process";
7
7
  import { promisify } from "util";
@@ -112,4 +112,4 @@ function pruneTerminalStoppedAgents() {
112
112
  //#endregion
113
113
  export { pidsWithCwdUnder as a, sweepAutoCloseOutCache as i, pruneTerminalStoppedAgents as n, getAutoCloseOutCanonicalState as r, pruneStoppedAgentsForIssue as t };
114
114
 
115
- //# sourceMappingURL=agent-gc-BMcgTDl7.js.map
115
+ //# sourceMappingURL=agent-gc-BmYeT6eH.js.map
@@ -0,0 +1,3 @@
1
+ import { Ir as setAgentPausedSync, br as getAgentStateSync, dr as clearAgentPausedSync, pr as clearAgentTroubledSync, xr as init_agent_state } from "./queries-DVpl1vsU.js";
2
+ init_agent_state();
3
+ export { clearAgentPausedSync, clearAgentTroubledSync, getAgentStateSync, setAgentPausedSync };
@@ -1,2 +1,2 @@
1
- import { i as mergeRuntimeBySequence, n as AgentStateServiceLive, r as getRuntimeSnapshot, t as AgentStateService } from "./agent-state-service-BOzQhLjU.js";
1
+ import { i as mergeRuntimeBySequence, n as AgentStateServiceLive, r as getRuntimeSnapshot, t as AgentStateService } from "./agent-state-service-rjnzpHDx.js";
2
2
  export { AgentStateService, AgentStateServiceLive, getRuntimeSnapshot, mergeRuntimeBySequence };
@@ -1,7 +1,7 @@
1
- import { a as init_event_store, i as initEventStore } from "./event-store-CrHcVC5_.js";
2
- import { h as applyEvent, m as INITIAL_READ_MODEL_STATE, t as init_src } from "./src-B948bGVR.js";
3
- import { n as init_boot_reconciled_stop_events, t as emitBootReconciledStopEvents } from "./boot-reconciled-stop-events-bQUzU8ns.js";
4
- import { l as markAgentStateServiceInProcess, o as getRuntimeSnapshot$1, r as init_session_history, s as init_agent_runtime_mirror, t as appendSessionIdToHistory, u as setAgentRuntimeMirror } from "./session-history-C_EMhIIF.js";
1
+ import { a as init_event_store, i as initEventStore } from "./event-store-D_AR-Y78.js";
2
+ import { h as applyEvent, m as INITIAL_READ_MODEL_STATE, t as init_src } from "./src-BYdwL_n-.js";
3
+ import { n as init_boot_reconciled_stop_events, t as emitBootReconciledStopEvents } from "./boot-reconciled-stop-events-D6SeUTIr.js";
4
+ import { l as markAgentStateServiceInProcess, o as getRuntimeSnapshot$1, r as init_session_history, s as init_agent_runtime_mirror, t as appendSessionIdToHistory, u as setAgentRuntimeMirror } from "./session-history-Bta5l9jY.js";
5
5
  import { Context, Effect, Layer, SubscriptionRef } from "effect";
6
6
  //#region services/agent-state-service.ts
7
7
  /**
@@ -60,7 +60,7 @@ const AgentStateServiceLive = Layer.effect(AgentStateService, Effect.gen(functio
60
60
  const store = yield* Effect.promise(() => initEventStore());
61
61
  const ref = yield* SubscriptionRef.make({});
62
62
  const seedFromSources = Effect.gen(function* () {
63
- const { reconstructCacheAuto } = yield* Effect.promise(() => import("./reconstruct-cache-CF2avArx.js"));
63
+ const { reconstructCacheAuto } = yield* Effect.promise(() => import("./reconstruct-cache-BHyiAg02.js"));
64
64
  const result = yield* Effect.promise(() => reconstructCacheAuto());
65
65
  const seeded = result.agentRuntimeById;
66
66
  yield* Effect.promise(() => emitBootReconciledStopEvents(store, result.markedStoppedIds, seeded, "[AgentStateService] Failed to emit boot-reconciled stop event:"));
@@ -113,4 +113,4 @@ function applyEventToRef(ref, ev) {
113
113
  //#endregion
114
114
  export { mergeRuntimeBySequence as i, AgentStateServiceLive as n, getRuntimeSnapshot as r, AgentStateService as t };
115
115
 
116
- //# sourceMappingURL=agent-state-service-BOzQhLjU.js.map
116
+ //# sourceMappingURL=agent-state-service-rjnzpHDx.js.map
@@ -18,4 +18,4 @@ var init_agent_state_source = __esmMin((() => {
18
18
  //#endregion
19
19
  export { readFeedbackAgentStates as n, registerFeedbackAgentStateReader as r, init_agent_state_source as t };
20
20
 
21
- //# sourceMappingURL=agent-state-source-Ca_zCaII.js.map
21
+ //# sourceMappingURL=agent-state-source-Ds968-j6.js.map
@@ -1,8 +1,8 @@
1
1
  import { n as __esmMin } from "./rolldown-runtime-DNCzzKnI.js";
2
- import { ci as getOverdeckHome, li as init_paths } from "./config-yaml-CxdwhAIA.js";
3
- import { _ as integer, a as EventBus, b as and, c as Records, d as getOverdeckDatabaseSync, f as init_infra, h as text, l as Tmux, m as sqliteTable, p as init_sqlite_core, r as Db, v as init_drizzle_orm, x as eq } from "./infra-BDQDRopn.js";
4
- import { n as init_issues, t as IssueId } from "./issues-DA-U_MpR.js";
5
- import { n as logAgentLifecycleSync, t as init_persistent_logger } from "./persistent-logger-CBj016pT.js";
2
+ import { hi as init_paths, mi as getOverdeckHome } from "./config-yaml-BSCqwmX0.js";
3
+ import { _ as integer, a as EventBus, b as and, c as Records, d as getOverdeckDatabaseSync, f as init_infra, h as text, l as Tmux, m as sqliteTable, p as init_sqlite_core, r as Db, v as init_drizzle_orm, x as eq } from "./infra-CTrmVqc_.js";
4
+ import { n as init_issues, t as IssueId } from "./issues-AX-YBeAQ.js";
5
+ import { n as logAgentLifecycleSync, t as init_persistent_logger } from "./persistent-logger-s8cbpFNV.js";
6
6
  import { join } from "node:path";
7
7
  import { Context, Effect, Layer, Schema } from "effect";
8
8
  import { readFileSync, readdirSync, rmSync, statSync } from "node:fs";
@@ -979,4 +979,4 @@ var init_agents = __esmMin((() => {
979
979
  //#endregion
980
980
  export { countAgentsByStatusRole as a, listAllAgentsSync as c, isTerminalIssueStage as d, countAgentsByStatus as i, removeAgentSync as l, AgentsResolverLive as n, init_agents as o, backfillAgentsSync as r, listAgentIdsByPrefixSync as s, AgentsResolver as t, getIssueStageSync as u };
981
981
 
982
- //# sourceMappingURL=agents-CtACUuVG.js.map
982
+ //# sourceMappingURL=agents-Dls7tfJH.js.map
@@ -0,0 +1,3 @@
1
+ import { $n as buildDefaultResumeContinueMessage, $r as waitForReadySignal, Ar as recordAgentFailureSync, B as detectCrashedAgents, C as replayCrashedStandingAgent, Cr as isAgentTroubled, Dr as markAgentStoppedState, Er as markAgentRunningState, Et as spawnRun, Fr as setAgentPaused, Gn as determineModel, H as restartAgent, Ir as setAgentPausedSync, Jn as getProviderTmuxFlags, Jr as clearReadySignal, Jt as deliverAgentPermissionDecision, Kn as getProviderEnvForModel, Lr as setAgentYieldedSync, Mn as roleAgentDefinitionPath, Mr as resetAgentFailureCount, Nr as saveAgentState, On as getProviderAuthMode, Or as markAgentTroubled, Ot as stopAgent, Pn as waitForPromptReady, Pr as saveAgentStateSync, Qr as waitForAgentIdle, Rr as wipeAgentStateDirs, S as contextWindowForModel, Sn as describeOhmypiSpawnFailure, Sr as isAgentPaused, T as shouldReplayCompactAtTierRunBoundary, Tt as spawnAgent, Un as buildCavemanExports, V as recoverAgent, Wn as buildSpawnEnvForModel, Xr as normalizeAgentId, Xt as deliverResumeMessageWithTranscriptConfirmation, Yr as isQualifiedAgentId, Yt as deliverInitialPromptWithRetry, Zr as resolveAgentTargetSync, _t as getActivity, a as listRunningAgentsSync, at as buildCompactRecoverySeed, b as init_agents, br as getAgentStateSync, bt as getSessionId, cn as buildAgentLaunchConfig, cr as SESSION_EXITED_BEFORE_KICKOFF, dn as retrieveSpawnTimeMemoryContext, dr as clearAgentPausedSync, ei as getAgentRuntimeState, en as setAgentDeliveryMethod, er as buildResumeContinueMessage, fn as transitionIssueToInProgress, fr as clearAgentTroubled, ft as messageAgent, gr as getAgentDir, gt as appendActivity, i as listRunningAgents, jn as injectPiConversationMemory, kn as getRoleRuntimeBaseCommand, kr as recordAgentFailure, kt as stopAgentSync, lr as __testInternals, mr as clearYieldForResumeSync, nr as decideSupervisorForWorkAgent, o as warnOnBareNumericIssueIds, or as writeChannelsBridgeMcpConfig, pn as transitionIssueToInReview, pr as clearAgentTroubledSync, qn as getProviderExportsForModel, qt as deliverAgentMessage, r as listAgentStates, ri as saveAgentRuntimeState, rr as dismissDevChannelsDialog, sn as assertWorkspaceStackHealthyForSpawn, sr as GOVERNOR_SLOT_PAUSE_REASON_PREFIX, st as resumeAgent, t as dropLegacyAgentStatesMissingRoleAsync, ti as getAgentRuntimeStateSync, tr as decideChannelsForWorkAgent, ur as clearAgentPaused, vr as getAgentState, vt as getLatestSessionId, w as replayStandingAgent, wn as getAgentRuntimeBaseCommand, wr as isRole, x as compactAtTierRunBoundary, xn as OHMYPI_AGENT_READY_TIMEOUT_SECONDS, xt as saveSessionId, yr as getAgentStateFilePath, yt as getLatestSessionIdSync, z as autoRecoverAgents, zr as writeAgentStateJsonSync } from "./queries-DVpl1vsU.js";
2
+ init_agents();
3
+ export { GOVERNOR_SLOT_PAUSE_REASON_PREFIX, OHMYPI_AGENT_READY_TIMEOUT_SECONDS, SESSION_EXITED_BEFORE_KICKOFF, __testInternals, appendActivity, assertWorkspaceStackHealthyForSpawn, autoRecoverAgents, buildAgentLaunchConfig, buildCavemanExports, buildCompactRecoverySeed, buildDefaultResumeContinueMessage, buildResumeContinueMessage, buildSpawnEnvForModel, clearAgentPaused, clearAgentPausedSync, clearAgentTroubled, clearAgentTroubledSync, clearReadySignal, clearYieldForResumeSync, compactAtTierRunBoundary, contextWindowForModel, decideChannelsForWorkAgent, decideSupervisorForWorkAgent, deliverAgentMessage, deliverAgentPermissionDecision, deliverInitialPromptWithRetry, deliverResumeMessageWithTranscriptConfirmation, describeOhmypiSpawnFailure, detectCrashedAgents, determineModel, dismissDevChannelsDialog, dropLegacyAgentStatesMissingRoleAsync, getActivity, getAgentDir, getAgentRuntimeBaseCommand, getAgentRuntimeState, getAgentRuntimeStateSync, getAgentState, getAgentStateFilePath, getAgentStateSync, getLatestSessionId, getLatestSessionIdSync, getProviderAuthMode, getProviderEnvForModel, getProviderExportsForModel, getProviderTmuxFlags, getRoleRuntimeBaseCommand, getSessionId, injectPiConversationMemory, isAgentPaused, isAgentTroubled, isQualifiedAgentId, isRole, listAgentStates, listRunningAgents, listRunningAgentsSync, markAgentRunningState, markAgentStoppedState, markAgentTroubled, messageAgent, normalizeAgentId, recordAgentFailure, recordAgentFailureSync, recoverAgent, replayCrashedStandingAgent, replayStandingAgent, resetAgentFailureCount, resolveAgentTargetSync, restartAgent, resumeAgent, retrieveSpawnTimeMemoryContext, roleAgentDefinitionPath, saveAgentRuntimeState, saveAgentState, saveAgentStateSync, saveSessionId, setAgentDeliveryMethod, setAgentPaused, setAgentPausedSync, setAgentYieldedSync, shouldReplayCompactAtTierRunBoundary, spawnAgent, spawnRun, stopAgent, stopAgentSync, transitionIssueToInProgress, transitionIssueToInReview, waitForAgentIdle, waitForPromptReady, waitForReadySignal, warnOnBareNumericIssueIds, wipeAgentStateDirs, writeAgentStateJsonSync, writeChannelsBridgeMcpConfig };
@@ -1,11 +1,12 @@
1
- import { Jr as PROJECT_PRDS_COMPLETED_SUBDIR, Kr as PROJECT_DOCS_SUBDIR, Lr as ARCHIVES_DIR, Xr as PROJECT_PRDS_SUBDIR, Yr as PROJECT_PRDS_PLANNED_SUBDIR, li as init_paths, qr as PROJECT_PRDS_ACTIVE_SUBDIR } from "./config-yaml-CxdwhAIA.js";
2
- import { a as PAN_DIRNAME, c as PAN_SESSIONS_FILENAME, i as PAN_CONTINUE_FILENAME, n as PAN_CONTEXT_FILENAME, s as PAN_FEEDBACK_DIRNAME, u as PAN_SPEC_FILENAME } from "./types-D2ETIB8T.js";
3
- import { a as getDraftPath, o as getIssueDraftPath, t as init_pan_dir } from "./pan-dir-DAOb1V2-.js";
4
- import { a as stepSkipped, i as stepOk, n as init_types, r as stepFailed } from "./types-Dh6RI5Vj.js";
1
+ import { $r as PROJECT_PRDS_ACTIVE_SUBDIR, Qr as PROJECT_DOCS_SUBDIR, Ur as ARCHIVES_DIR, ei as PROJECT_PRDS_COMPLETED_SUBDIR, hi as init_paths, ni as PROJECT_PRDS_SUBDIR, ti as PROJECT_PRDS_PLANNED_SUBDIR } from "./config-yaml-BSCqwmX0.js";
2
+ import { a as PAN_DIRNAME, c as PAN_SESSIONS_FILENAME, i as PAN_CONTINUE_FILENAME, n as PAN_CONTEXT_FILENAME, s as PAN_FEEDBACK_DIRNAME, u as PAN_SPEC_FILENAME } from "./types-DzlUKiuf.js";
3
+ import { a as getDraftPath, o as getIssueDraftPath, t as init_pan_dir } from "./pan-dir-DhgKfO86.js";
4
+ import { a as stepSkipped, i as stepOk, n as init_types, r as stepFailed } from "./types-kI9ik8XO.js";
5
5
  import { Effect } from "effect";
6
6
  import { existsSync, readdirSync } from "fs";
7
7
  import { dirname, join } from "path";
8
- import { cp, mkdir, rename } from "fs/promises";
8
+ import { access, readFile, readdir } from "node:fs/promises";
9
+ import { cp as cp$1, mkdir as mkdir$1, rename as rename$1 } from "fs/promises";
9
10
  import { exec } from "child_process";
10
11
  import { promisify } from "util";
11
12
  //#region ../../lib/prd-locations.ts
@@ -24,6 +25,17 @@ import { promisify } from "util";
24
25
  */
25
26
  init_paths();
26
27
  init_pan_dir();
28
+ /** Read Markdown from any location returned by this module's PRD resolvers. */
29
+ async function readPrdContent(loc) {
30
+ if (loc.format === "flat" || loc.format === "pan-draft") return readFile(loc.path, "utf8").catch(() => null);
31
+ const firstMarkdown = (await readdir(loc.path).catch(() => [])).filter((file) => file.endsWith(".md")).sort((a, b) => {
32
+ if (a === "prd.md") return -1;
33
+ if (b === "prd.md") return 1;
34
+ return a.localeCompare(b);
35
+ })[0];
36
+ if (!firstMarkdown) return null;
37
+ return readFile(join(loc.path, firstMarkdown), "utf8").catch(() => null);
38
+ }
27
39
  const STATUS_DIRS = {
28
40
  active: PROJECT_PRDS_ACTIVE_SUBDIR,
29
41
  planned: PROJECT_PRDS_PLANNED_SUBDIR,
@@ -72,13 +84,26 @@ function findPrdAtStatusSync(projectPath, issueId, status) {
72
84
  for (const c of candidates) if (existsSync(c.path)) return c;
73
85
  return null;
74
86
  }
75
- function findDraftPrdSync(projectPath, issueId) {
76
- const candidates = [getIssueDraftPath(projectPath, issueId), getDraftPath(projectPath, `${issueId.toLowerCase()}.md`)];
77
- for (const path of candidates) if (existsSync(path)) return {
78
- path,
87
+ function draftPrdCandidates(projectPath, issueId) {
88
+ return [{
89
+ path: getIssueDraftPath(projectPath, issueId),
90
+ format: "pan-draft",
91
+ status: "draft"
92
+ }, {
93
+ path: getDraftPath(projectPath, `${issueId.toLowerCase()}.md`),
79
94
  format: "pan-draft",
80
95
  status: "draft"
81
- };
96
+ }];
97
+ }
98
+ function findDraftPrdSync(projectPath, issueId) {
99
+ for (const candidate of draftPrdCandidates(projectPath, issueId)) if (existsSync(candidate.path)) return candidate;
100
+ return null;
101
+ }
102
+ async function findDraftPrdAsync(projectPath, issueId) {
103
+ for (const candidate of draftPrdCandidates(projectPath, issueId)) try {
104
+ await access(candidate.path);
105
+ return candidate;
106
+ } catch {}
82
107
  return null;
83
108
  }
84
109
  /**
@@ -96,6 +121,8 @@ function findPrdAnywhereSync(projectPath, issueId) {
96
121
  }
97
122
  return findDraftPrdSync(projectPath, issueId);
98
123
  }
124
+ /** Async Effect variant of {@link findDraftPrdAsync}. */
125
+ const findDraftPrd = (projectPath, issueId) => Effect.promise(() => findDraftPrdAsync(projectPath, issueId));
99
126
  //#endregion
100
127
  //#region ../../lib/lifecycle/archive-planning.ts
101
128
  /**
@@ -173,7 +200,7 @@ async function movePrdImpl(ctx, opts) {
173
200
  const completedFlat = join(ctx.projectPath, PROJECT_DOCS_SUBDIR, PROJECT_PRDS_SUBDIR, PROJECT_PRDS_COMPLETED_SUBDIR, `${issueLower}-plan.md`);
174
201
  const dest = source.format === "subdir" ? completedSubdir : completedFlat;
175
202
  const destParent = dirname(dest);
176
- if (!existsSync(destParent)) await mkdir(destParent, { recursive: true });
203
+ if (!existsSync(destParent)) await mkdir$1(destParent, { recursive: true });
177
204
  const formatLabel = source.format === "subdir" ? "PRD subdirectory" : "PRD";
178
205
  const flatActive = source.format === "flat" ? join(ctx.projectPath, PROJECT_DOCS_SUBDIR, PROJECT_PRDS_SUBDIR, PROJECT_PRDS_ACTIVE_SUBDIR) : null;
179
206
  const flatCompleted = source.format === "flat" ? join(ctx.projectPath, PROJECT_DOCS_SUBDIR, PROJECT_PRDS_SUBDIR, PROJECT_PRDS_COMPLETED_SUBDIR) : null;
@@ -187,7 +214,7 @@ async function movePrdImpl(ctx, opts) {
187
214
  await execAsync(`git mv "${resolvedSidecarSource}" "${sidecarDest}"`, { cwd: ctx.projectPath });
188
215
  } catch {
189
216
  try {
190
- await cp(resolvedSidecarSource, sidecarDest);
217
+ await cp$1(resolvedSidecarSource, sidecarDest);
191
218
  } catch {}
192
219
  }
193
220
  await execAsync(`git commit -m "chore: move ${ctx.issueId} PRD to completed"`, { cwd: ctx.projectPath });
@@ -199,10 +226,10 @@ async function movePrdImpl(ctx, opts) {
199
226
  return stepFailed(step, `PRD source ${source.path} is missing — nothing to preserve`);
200
227
  }
201
228
  try {
202
- await cp(source.path, dest, { recursive: true });
229
+ await cp$1(source.path, dest, { recursive: true });
203
230
  if (!existsSync(dest)) return stepFailed(step, "PRD copy appeared to succeed but destination not found");
204
231
  if (resolvedSidecarSource && sidecarDest) try {
205
- await cp(resolvedSidecarSource, sidecarDest);
232
+ await cp$1(resolvedSidecarSource, sidecarDest);
206
233
  } catch {}
207
234
  return stepOk(step, [`Copied ${formatLabel} to completed/ (git mv failed, plain copy succeeded)`]);
208
235
  } catch (err) {
@@ -231,39 +258,39 @@ async function archiveWorkspaceArtifactsImpl(ctx) {
231
258
  if (existsSync(archiveDir)) {
232
259
  let version = 1;
233
260
  while (existsSync(`${archiveDir}.${version}`)) version++;
234
- await rename(archiveDir, `${archiveDir}.${version}`);
261
+ await rename$1(archiveDir, `${archiveDir}.${version}`);
235
262
  }
236
- await mkdir(archiveDir, { recursive: true });
263
+ await mkdir$1(archiveDir, { recursive: true });
237
264
  const details = [];
238
265
  const panDir = join(workspacePath, PAN_DIRNAME);
239
266
  const feedbackDir = join(panDir, PAN_FEEDBACK_DIRNAME);
240
267
  if (existsSync(feedbackDir)) {
241
- await cp(feedbackDir, join(archiveDir, "feedback"), { recursive: true });
268
+ await cp$1(feedbackDir, join(archiveDir, "feedback"), { recursive: true });
242
269
  details.push("Archived feedback/");
243
270
  }
244
271
  const continueFile = join(panDir, PAN_CONTINUE_FILENAME);
245
272
  if (existsSync(continueFile)) {
246
- await cp(continueFile, join(archiveDir, PAN_CONTINUE_FILENAME));
273
+ await cp$1(continueFile, join(archiveDir, PAN_CONTINUE_FILENAME));
247
274
  details.push(`Archived ${PAN_CONTINUE_FILENAME}`);
248
275
  }
249
276
  const specFile = join(panDir, PAN_SPEC_FILENAME);
250
277
  if (existsSync(specFile)) {
251
- await cp(specFile, join(archiveDir, PAN_SPEC_FILENAME));
278
+ await cp$1(specFile, join(archiveDir, PAN_SPEC_FILENAME));
252
279
  details.push(`Archived ${PAN_SPEC_FILENAME}`);
253
280
  }
254
281
  const sessionsFile = join(panDir, PAN_SESSIONS_FILENAME);
255
282
  if (existsSync(sessionsFile)) {
256
- await cp(sessionsFile, join(archiveDir, PAN_SESSIONS_FILENAME));
283
+ await cp$1(sessionsFile, join(archiveDir, PAN_SESSIONS_FILENAME));
257
284
  details.push(`Archived ${PAN_SESSIONS_FILENAME}`);
258
285
  }
259
286
  const contextFile = join(panDir, PAN_CONTEXT_FILENAME);
260
287
  if (existsSync(contextFile)) {
261
- await cp(contextFile, join(archiveDir, PAN_CONTEXT_FILENAME));
288
+ await cp$1(contextFile, join(archiveDir, PAN_CONTEXT_FILENAME));
262
289
  details.push(`Archived ${PAN_CONTEXT_FILENAME}`);
263
290
  }
264
291
  const prdFile = join(panDir, "prd.md");
265
292
  if (existsSync(prdFile)) {
266
- await cp(prdFile, join(archiveDir, "prd.md"));
293
+ await cp$1(prdFile, join(archiveDir, "prd.md"));
267
294
  details.push("Archived workspace prd.md");
268
295
  }
269
296
  details.push(`Archived to ${archiveDir}`);
@@ -284,6 +311,6 @@ function archivePlanning(ctx, opts = {}) {
284
311
  });
285
312
  }
286
313
  //#endregion
287
- export { inferBranchFromWorkspace as a, findWorkspacePath as i, archiveWorkspaceArtifacts as n, movePrd as o, findAllWorkspacePaths as r, findPrdAnywhereSync as s, archivePlanning as t };
314
+ export { inferBranchFromWorkspace as a, findPrdAnywhereSync as c, findWorkspacePath as i, readPrdContent as l, archiveWorkspaceArtifacts as n, movePrd as o, findAllWorkspacePaths as r, findDraftPrd as s, archivePlanning as t };
288
315
 
289
- //# sourceMappingURL=archive-planning-Binfb99i.js.map
316
+ //# sourceMappingURL=archive-planning-Cq7cyinS.js.map
@@ -0,0 +1,2 @@
1
+ import { i as findWorkspacePath } from "./archive-planning-Cq7cyinS.js";
2
+ export { findWorkspacePath };
@@ -1,5 +1,5 @@
1
- import { ci as getOverdeckHome, li as init_paths } from "./config-yaml-CxdwhAIA.js";
2
- import { n as openDatabase, t as init_driver } from "./driver-CKVGi51s.js";
1
+ import { hi as init_paths, mi as getOverdeckHome } from "./config-yaml-BSCqwmX0.js";
2
+ import { n as openDatabase, t as init_driver } from "./driver-CmsY2RLl.js";
3
3
  import { dirname, join } from "node:path";
4
4
  import { mkdirSync } from "node:fs";
5
5
  import { randomBytes } from "node:crypto";
@@ -208,4 +208,4 @@ function unshareArtifactBySlugJob(slug) {
208
208
  //#endregion
209
209
  export { getArtifactBySlugJob, listArtifactsForWorkspaceOrIssueJob, unshareArtifactBySlugJob };
210
210
 
211
- //# sourceMappingURL=artifact-index-jobs-Jn7BGOtV.js.map
211
+ //# sourceMappingURL=artifact-index-jobs-Dj_8kpTd.js.map
@@ -1,5 +1,5 @@
1
1
  import { n as __esmMin } from "./rolldown-runtime-DNCzzKnI.js";
2
- import { Qr as SYNC_SOURCES, ci as getOverdeckHome, li as init_paths } from "./config-yaml-CxdwhAIA.js";
2
+ import { hi as init_paths, ii as SYNC_SOURCES, mi as getOverdeckHome } from "./config-yaml-BSCqwmX0.js";
3
3
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "fs";
4
4
  import { join } from "path";
5
5
  //#region ../../lib/context-layers/layers.ts
@@ -94,14 +94,18 @@ This file is committed to the repo; \`workspace.md\` is not.
94
94
  //#endregion
95
95
  //#region ../../lib/context-layers/harness.ts
96
96
  /**
97
- * Render a canonical layer body for a single harness.
98
- *
99
- * Strips every `{{#harness:*}}` / `{{/harness:*}}` marker and drops the spans
100
- * that are not covered by the target harness. Runs of 3+ blank lines left by
101
- * removed spans collapse to a single blank line so output stays tidy.
97
+ * Render a canonical layer body for one harness, or a union of harnesses
98
+ * sharing one physical target file (e.g. AGENTS.md, read natively by both
99
+ * ohmypi and kimi-code — PAN-1837 review fix: rendering AGENTS.md for
100
+ * 'ohmypi' alone stripped every span authored only under
101
+ * {{#harness:kimi-code}}, so Kimi-specific context never survived `pan
102
+ * sync`). A span is kept when it is covered by no harness marker (always-on)
103
+ * or by a marker naming any of the target harnesses; every marker is
104
+ * stripped from the output. Runs of 3+ blank lines left by removed spans
105
+ * collapse to a single blank line so output stays tidy.
102
106
  */
103
107
  function renderForHarness(content, harness) {
104
- const target = HARNESS_MARKERS[harness];
108
+ const targets = new Set((Array.isArray(harness) ? harness : [harness]).map((h) => HARNESS_MARKERS[h]));
105
109
  const openCounts = /* @__PURE__ */ new Map();
106
110
  let out = "";
107
111
  let lastIndex = 0;
@@ -110,7 +114,7 @@ function renderForHarness(content, harness) {
110
114
  let anyOpen = false;
111
115
  for (const [name, count] of openCounts) if (count > 0) {
112
116
  anyOpen = true;
113
- if (name === target) covered = true;
117
+ if (targets.has(name)) covered = true;
114
118
  }
115
119
  if (!anyOpen || covered) out += text;
116
120
  };
@@ -172,14 +176,16 @@ var init_harness = __esmMin((() => {
172
176
  "claude-code": "claude",
173
177
  ohmypi: "ohmypi",
174
178
  codex: "codex",
175
- acp: "acp"
179
+ acp: "acp",
180
+ "kimi-code": "kimi-code"
176
181
  };
177
182
  KNOWN_HARNESS_MARKERS = new Set([
178
183
  "claude",
179
184
  "pi",
180
185
  "ohmypi",
181
186
  "codex",
182
- "acp"
187
+ "acp",
188
+ "kimi-code"
183
189
  ]);
184
190
  MARKER_RE = /\{\{([#/])harness:([a-zA-Z0-9_-]+)\}\}/g;
185
191
  }));
@@ -274,8 +280,9 @@ function renderGlobalLayer(harness, includeDevRules) {
274
280
  return [renderForHarness(readLayerContent(globalContextFile()), harness).trim(), renderBundledRules(harness, includeDevRules)].filter((s) => s.length > 0).join("\n\n---\n\n");
275
281
  }
276
282
  /**
277
- * Render a project layer for one harness. Returns '' when the project has no
278
- * `project.md` — sync then leaves that project's CLAUDE.md alone.
283
+ * Render a project layer for one harness, or a union of harnesses sharing
284
+ * one physical target file. Returns '' when the project has no
285
+ * `project.md` — sync then leaves that project's CLAUDE.md/AGENTS.md alone.
279
286
  */
280
287
  function renderProjectLayer(projectRoot, harness) {
281
288
  const raw = readLayerContent(resolveProjectContextFile(projectRoot));
@@ -336,4 +343,4 @@ var init_assemble = __esmMin((() => {
336
343
  //#endregion
337
344
  export { projectContextDir as A, ensureProjectLayer as C, legacyProjectContextFile as D, init_layers as E, workspaceContextDir as F, workspaceContextFile as I, readLayerContent as M, resolveProjectContextFile as N, legacyWorkspaceContextFile as O, resolveWorkspaceContextFile as P, codexGlobalContextFile as S, globalContextFile as T, KNOWN_HARNESS_MARKERS as _, REGION_BEGIN as a, validateTemplate as b, init_render as c, userContentOutsideRegion as d, init_rules as f, HARNESS_MARKERS as g, renderBundledRules as h, workspaceContextWithoutProjectLayer as i, projectContextFile as j, piGlobalContextFile as k, renderGlobalLayer as l, readBundledRules as m, PROJECT_LAYER_START as n, REGION_END as o, parseRule as p, init_assemble as r, hasManagedRegion as s, PROJECT_LAYER_END as t, renderProjectLayer as u, init_harness as v, globalContextDir as w, PROJECT_STARTER as x, renderForHarness as y };
338
345
 
339
- //# sourceMappingURL=assemble-DsqK9OAq.js.map
346
+ //# sourceMappingURL=assemble-BTCmbcfH.js.map