@rryando/arcs 3.11.0 → 4.0.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 (191) hide show
  1. package/dist/cli/commands/hooks.d.ts +46 -6
  2. package/dist/cli/commands/hooks.d.ts.map +1 -1
  3. package/dist/cli/commands/hooks.js +190 -52
  4. package/dist/cli/commands/hooks.js.map +1 -1
  5. package/dist/cli/commands/web.js +14 -4
  6. package/dist/cli/commands/web.js.map +1 -1
  7. package/dist/cli/config.d.ts +14 -3
  8. package/dist/cli/config.d.ts.map +1 -1
  9. package/dist/cli/config.js +39 -38
  10. package/dist/cli/config.js.map +1 -1
  11. package/dist/cli/instructions.d.ts +13 -1
  12. package/dist/cli/instructions.d.ts.map +1 -1
  13. package/dist/cli/instructions.js +38 -3
  14. package/dist/cli/instructions.js.map +1 -1
  15. package/dist/cli/setup.d.ts.map +1 -1
  16. package/dist/cli/setup.js +76 -11
  17. package/dist/cli/setup.js.map +1 -1
  18. package/dist/shared/session-vocabulary.d.ts +88 -0
  19. package/dist/shared/session-vocabulary.d.ts.map +1 -0
  20. package/dist/shared/session-vocabulary.js +114 -0
  21. package/dist/shared/session-vocabulary.js.map +1 -0
  22. package/dist/utils/claude-code-hook-install.d.ts +1 -1
  23. package/dist/utils/claude-code-hook-install.d.ts.map +1 -1
  24. package/dist/utils/claude-code-hook-install.js +68 -3
  25. package/dist/utils/claude-code-hook-install.js.map +1 -1
  26. package/dist/utils/claude-transcript.d.ts +81 -2
  27. package/dist/utils/claude-transcript.d.ts.map +1 -1
  28. package/dist/utils/claude-transcript.js +33 -2
  29. package/dist/utils/claude-transcript.js.map +1 -1
  30. package/dist/utils/git.d.ts +21 -0
  31. package/dist/utils/git.d.ts.map +1 -1
  32. package/dist/utils/git.js +65 -1
  33. package/dist/utils/git.js.map +1 -1
  34. package/dist/utils/hook-contract.d.ts +36 -0
  35. package/dist/utils/hook-contract.d.ts.map +1 -0
  36. package/dist/utils/hook-contract.js +35 -0
  37. package/dist/utils/hook-contract.js.map +1 -0
  38. package/dist/utils/hook-token-store.d.ts +39 -0
  39. package/dist/utils/hook-token-store.d.ts.map +1 -1
  40. package/dist/utils/hook-token-store.js +46 -3
  41. package/dist/utils/hook-token-store.js.map +1 -1
  42. package/dist/utils/session-store.d.ts +226 -0
  43. package/dist/utils/session-store.d.ts.map +1 -1
  44. package/dist/utils/session-store.js +266 -1
  45. package/dist/utils/session-store.js.map +1 -1
  46. package/dist/web-client/assets/{GraphCanvas-dNyZ458L.js → GraphCanvas-CTyf_XXQ.js} +1 -1
  47. package/dist/web-client/assets/{MarkdownEditor-BmU9mdkN.js → MarkdownEditor-af2vwQOX.js} +1 -1
  48. package/dist/web-client/assets/{abnfDiagram-VRR7QNED-D1BFBoeF.js → abnfDiagram-VRR7QNED-CdxcKX9t.js} +1 -1
  49. package/dist/web-client/assets/architecture-TIHT7OUA-Bt2-DmfV.js +1 -0
  50. package/dist/web-client/assets/{architectureDiagram-ZJ3FMSHR-CA8hTWUK.js → architectureDiagram-ZJ3FMSHR-DOISDv6o.js} +1 -1
  51. package/dist/web-client/assets/{blockDiagram-677ZJIJ3-CQpb_KwX.js → blockDiagram-677ZJIJ3-DKwtbttM.js} +1 -1
  52. package/dist/web-client/assets/{c4Diagram-LMCZKHZV-BhpHX84V.js → c4Diagram-LMCZKHZV-CilqK-Mm.js} +1 -1
  53. package/dist/web-client/assets/channel-C2mb9np_.js +1 -0
  54. package/dist/web-client/assets/{chunk-32BRIVSS-BUusQQa_.js → chunk-32BRIVSS-C79m1mkG.js} +1 -1
  55. package/dist/web-client/assets/{chunk-52WLFC77-nNYwlftl.js → chunk-52WLFC77-C6WelGWJ.js} +1 -1
  56. package/dist/web-client/assets/{chunk-C7G6YPKG-D0a-yqnK.js → chunk-C7G6YPKG-DLg7ryWI.js} +1 -1
  57. package/dist/web-client/assets/{chunk-EX3LRPZG-IDuRMN-4.js → chunk-EX3LRPZG-DjWgo4gL.js} +1 -1
  58. package/dist/web-client/assets/{chunk-FWX5IMBZ-D_spTcqi.js → chunk-FWX5IMBZ-BgS9p_zy.js} +2 -2
  59. package/dist/web-client/assets/{chunk-HOUHSVGY-C-bcxwZS.js → chunk-HOUHSVGY-DuVR7dZO.js} +1 -1
  60. package/dist/web-client/assets/{chunk-ICXQ74PX-CjmK2bAM.js → chunk-ICXQ74PX-Y8DlnIJM.js} +1 -1
  61. package/dist/web-client/assets/{chunk-MOJQB5TN-Bkc08KWY.js → chunk-MOJQB5TN-BEM3QgeD.js} +1 -1
  62. package/dist/web-client/assets/{chunk-OGEWGWER-BAAYYvG9.js → chunk-OGEWGWER-DlM8LxGr.js} +1 -1
  63. package/dist/web-client/assets/{chunk-PUDLZKDR-WXbPY7NM.js → chunk-PUDLZKDR-c6cqNVTx.js} +1 -1
  64. package/dist/web-client/assets/{chunk-Q4XR5HBZ-DcbnjxQE.js → chunk-Q4XR5HBZ-C5lNmcka.js} +1 -1
  65. package/dist/web-client/assets/{chunk-V7JOEXUC-C6t75PAp.js → chunk-V7JOEXUC-nSswxvSG.js} +1 -1
  66. package/dist/web-client/assets/{chunk-VAUOI2AC-DVrJ0Ic7.js → chunk-VAUOI2AC-CqJkCkT0.js} +1 -1
  67. package/dist/web-client/assets/{chunk-VR4S4FIN-MOOFvGS0.js → chunk-VR4S4FIN-D3pFchin.js} +1 -1
  68. package/dist/web-client/assets/{chunk-WYO6CB5R-sK7Y2NZD.js → chunk-WYO6CB5R-BI9c-NzI.js} +1 -1
  69. package/dist/web-client/assets/{chunk-ZGVPDNZ5-a13RQsku.js → chunk-ZGVPDNZ5-CKTF2kLR.js} +1 -1
  70. package/dist/web-client/assets/classDiagram-OUVF2IWQ-CPd_w3Zr.js +1 -0
  71. package/dist/web-client/assets/classDiagram-v2-EOCWNBFH-CPd_w3Zr.js +1 -0
  72. package/dist/web-client/assets/{cynefin-VYW2F7L2-D8xaH-wO.js → cynefin-VYW2F7L2-BrJrnfh1.js} +1 -1
  73. package/dist/web-client/assets/{cynefinDiagram-TSTJHNR4-Bt__EqJW.js → cynefinDiagram-TSTJHNR4-9jYzPWJZ.js} +1 -1
  74. package/dist/web-client/assets/{dagre-VKFMJZFB-Bwgjwflz.js → dagre-VKFMJZFB-B705Djpu.js} +1 -1
  75. package/dist/web-client/assets/{diagram-FQU43EPY-CaPDVUq2.js → diagram-FQU43EPY-BfQAlUlJ.js} +1 -1
  76. package/dist/web-client/assets/{diagram-G47NLZAW-BQLB9YYA.js → diagram-G47NLZAW-s1YDe06A.js} +1 -1
  77. package/dist/web-client/assets/{diagram-NH7WQ7WH-BWo84w8Y.js → diagram-NH7WQ7WH-Dy3z11Hc.js} +1 -1
  78. package/dist/web-client/assets/{diagram-OA4YK3LP-bKn6Pz5s.js → diagram-OA4YK3LP-Bius2xUN.js} +1 -1
  79. package/dist/web-client/assets/{diagram-WEI45ONY-BRqV5Oy6.js → diagram-WEI45ONY-D7x4VcHM.js} +1 -1
  80. package/dist/web-client/assets/{ebnfDiagram-CCIWWBDH-DhUXL1-7.js → ebnfDiagram-CCIWWBDH-CBg1xrmD.js} +1 -1
  81. package/dist/web-client/assets/{erDiagram-Q63AITRT-HXAQQ-_F.js → erDiagram-Q63AITRT-CJRvTFvd.js} +1 -1
  82. package/dist/web-client/assets/eventmodeling-45OFAUF4-CTKRC2Yj.js +1 -0
  83. package/dist/web-client/assets/flowDiagram-23GEKE2U-CaZjFyU1.js +1 -0
  84. package/dist/web-client/assets/{ganttDiagram-NO4QXBWP-D-Ddf_Ii.js → ganttDiagram-NO4QXBWP-C_LsypZ4.js} +1 -1
  85. package/dist/web-client/assets/{gitGraph-TEB2WS4Q-BmHzs0uF.js → gitGraph-TEB2WS4Q-Dx2XxdGk.js} +1 -1
  86. package/dist/web-client/assets/{gitGraphDiagram-IHSO6WYX-YnQWrlh_.js → gitGraphDiagram-IHSO6WYX-DiKWkGWQ.js} +1 -1
  87. package/dist/web-client/assets/{index-DCWxuIeQ.js → index-CYwhkPtc.js} +38 -36
  88. package/dist/web-client/assets/index-wSzUPvml.css +2 -0
  89. package/dist/web-client/assets/{info-DKCQHKI2-DCT_B7RN.js → info-DKCQHKI2-DORwHenK.js} +1 -1
  90. package/dist/web-client/assets/{infoDiagram-FWYZ7A6U-D-le1Zhq.js → infoDiagram-FWYZ7A6U-CQecXS1E.js} +1 -1
  91. package/dist/web-client/assets/{ishikawaDiagram-FXEZZL3T-Jr1x2VJB.js → ishikawaDiagram-FXEZZL3T-CWhj60Zp.js} +1 -1
  92. package/dist/web-client/assets/{journeyDiagram-5HDEW3XC-BF9ELxj-.js → journeyDiagram-5HDEW3XC-Cj3z2U8u.js} +1 -1
  93. package/dist/web-client/assets/{kanban-definition-HUTT4EX6-C4fJqAxu.js → kanban-definition-HUTT4EX6-DFmBRenP.js} +1 -1
  94. package/dist/web-client/assets/{line-7N7ikFxa.js → line-C_Hxz9xb.js} +1 -1
  95. package/dist/web-client/assets/{mermaid-parser.core-QbC1icPt.js → mermaid-parser.core-E3xRdzPn.js} +3 -3
  96. package/dist/web-client/assets/{mermaid.core-C26d_UJm.js → mermaid.core-C2_CcotH.js} +3 -3
  97. package/dist/web-client/assets/{mindmap-definition-LN4V7U3C-D6TV1JDf.js → mindmap-definition-LN4V7U3C-Bs7VxPid.js} +1 -1
  98. package/dist/web-client/assets/{packet-7NZHBO7P-CR1vrGj3.js → packet-7NZHBO7P-D2nqso7i.js} +1 -1
  99. package/dist/web-client/assets/{pegDiagram-2B236MQR-xOMBBtfV.js → pegDiagram-2B236MQR-Cepo1sIu.js} +1 -1
  100. package/dist/web-client/assets/{pie-RZYD4A2V-BbWuhjwy.js → pie-RZYD4A2V-Sx0IGbXt.js} +1 -1
  101. package/dist/web-client/assets/{pieDiagram-ENE6RG2P-MsfnsqgW.js → pieDiagram-ENE6RG2P-D-PMDNhk.js} +1 -1
  102. package/dist/web-client/assets/{quadrantDiagram-ABIIQ3AL-BoI7zKXF.js → quadrantDiagram-ABIIQ3AL-BNGC7Fms.js} +1 -1
  103. package/dist/web-client/assets/{radar-I7S5WNFK-CbYXKToJ.js → radar-I7S5WNFK-CFf_-2OC.js} +1 -1
  104. package/dist/web-client/assets/{railroad-3IZDKUUU-6LxHDkLe.js → railroad-3IZDKUUU-BvZeVRGh.js} +1 -1
  105. package/dist/web-client/assets/railroad-abnf-AHOZXSZD-DnGh6x2O.js +1 -0
  106. package/dist/web-client/assets/railroad-ebnf-EBAXGLYW-CGfgCoaE.js +1 -0
  107. package/dist/web-client/assets/railroad-peg-LSFZ7HO6-BzQxYdqp.js +1 -0
  108. package/dist/web-client/assets/{railroadDiagram-RFXS5EU6-D6RUoUki.js → railroadDiagram-RFXS5EU6-D0iK_k84.js} +1 -1
  109. package/dist/web-client/assets/{requirementDiagram-TGXJPOKE-B6k4BDpE.js → requirementDiagram-TGXJPOKE-BPdsw9tz.js} +1 -1
  110. package/dist/web-client/assets/{sankeyDiagram-HTMAVEWB-BUDF-UFr.js → sankeyDiagram-HTMAVEWB-maA6ukOJ.js} +1 -1
  111. package/dist/web-client/assets/{sequenceDiagram-DBY2YBRQ-D6GqcsUi.js → sequenceDiagram-DBY2YBRQ-DKmAjmgr.js} +1 -1
  112. package/dist/web-client/assets/{stateDiagram-2N3HPSRC-WfJCQAK5.js → stateDiagram-2N3HPSRC-esxmzk3w.js} +1 -1
  113. package/dist/web-client/assets/stateDiagram-v2-6OUMAXLB-hcBqlOLc.js +1 -0
  114. package/dist/web-client/assets/{swimlanes-5IMT3BWC-BtMo82mC.js → swimlanes-5IMT3BWC-DFd-wGBv.js} +1 -1
  115. package/dist/web-client/assets/swimlanesDiagram-G3AALYLV-DbSrPBYr.js +8 -0
  116. package/dist/web-client/assets/{timeline-definition-FHXFAJF6-CoAmv2Sn.js → timeline-definition-FHXFAJF6-C7SG8MQH.js} +1 -1
  117. package/dist/web-client/assets/{treeView-QDETBFTQ-BWsKzE1s.js → treeView-QDETBFTQ-M0rhxbs2.js} +1 -1
  118. package/dist/web-client/assets/{treemap-6X3UGDF4-i_qGtB3o.js → treemap-6X3UGDF4-BQfkQxSh.js} +1 -1
  119. package/dist/web-client/assets/{vennDiagram-L72KCM5P-DYkiLe-P.js → vennDiagram-L72KCM5P-CyIlb8ju.js} +1 -1
  120. package/dist/web-client/assets/{wardley-OPB4EBWU-Daaqr1Vp.js → wardley-OPB4EBWU-EE-7q8M1.js} +1 -1
  121. package/dist/web-client/assets/{wardleyDiagram-EHGQE667-Bofbsg3J.js → wardleyDiagram-EHGQE667-bY8XdYYS.js} +1 -1
  122. package/dist/web-client/assets/{xychartDiagram-FW5EYKEG-KNF4VTfL.js → xychartDiagram-FW5EYKEG-AhuXJ3de.js} +1 -1
  123. package/dist/web-client/index.html +2 -2
  124. package/dist/web-server/app.d.ts +4 -1
  125. package/dist/web-server/app.d.ts.map +1 -1
  126. package/dist/web-server/app.js +19 -0
  127. package/dist/web-server/app.js.map +1 -1
  128. package/dist/web-server/claude-runner.d.ts +109 -7
  129. package/dist/web-server/claude-runner.d.ts.map +1 -1
  130. package/dist/web-server/claude-runner.js +329 -50
  131. package/dist/web-server/claude-runner.js.map +1 -1
  132. package/dist/web-server/index.d.ts +2 -2
  133. package/dist/web-server/index.d.ts.map +1 -1
  134. package/dist/web-server/index.js +3 -2
  135. package/dist/web-server/index.js.map +1 -1
  136. package/dist/web-server/permission-policy.d.ts +46 -0
  137. package/dist/web-server/permission-policy.d.ts.map +1 -0
  138. package/dist/web-server/permission-policy.js +96 -0
  139. package/dist/web-server/permission-policy.js.map +1 -0
  140. package/dist/web-server/prompt-assembly.d.ts +454 -0
  141. package/dist/web-server/prompt-assembly.d.ts.map +1 -0
  142. package/dist/web-server/prompt-assembly.js +1122 -0
  143. package/dist/web-server/prompt-assembly.js.map +1 -0
  144. package/dist/web-server/routes/hook-events.d.ts +28 -3
  145. package/dist/web-server/routes/hook-events.d.ts.map +1 -1
  146. package/dist/web-server/routes/hook-events.js +209 -24
  147. package/dist/web-server/routes/hook-events.js.map +1 -1
  148. package/dist/web-server/routes/sessions.d.ts +7 -5
  149. package/dist/web-server/routes/sessions.d.ts.map +1 -1
  150. package/dist/web-server/routes/sessions.js +1030 -174
  151. package/dist/web-server/routes/sessions.js.map +1 -1
  152. package/dist/web-server/routes/workspace.d.ts +27 -0
  153. package/dist/web-server/routes/workspace.d.ts.map +1 -0
  154. package/dist/web-server/routes/workspace.js +280 -0
  155. package/dist/web-server/routes/workspace.js.map +1 -0
  156. package/dist/web-server/run-event-log.d.ts +167 -0
  157. package/dist/web-server/run-event-log.d.ts.map +1 -0
  158. package/dist/web-server/run-event-log.js +468 -0
  159. package/dist/web-server/run-event-log.js.map +1 -0
  160. package/dist/web-server/session-reconciler.d.ts +162 -0
  161. package/dist/web-server/session-reconciler.d.ts.map +1 -0
  162. package/dist/web-server/session-reconciler.js +363 -0
  163. package/dist/web-server/session-reconciler.js.map +1 -0
  164. package/dist/web-server/static.d.ts +7 -0
  165. package/dist/web-server/static.d.ts.map +1 -1
  166. package/dist/web-server/static.js +46 -3
  167. package/dist/web-server/static.js.map +1 -1
  168. package/dist/web-server/web-auth.d.ts +17 -0
  169. package/dist/web-server/web-auth.d.ts.map +1 -0
  170. package/dist/web-server/web-auth.js +33 -0
  171. package/dist/web-server/web-auth.js.map +1 -0
  172. package/dist/web-server/web-token.d.ts +39 -0
  173. package/dist/web-server/web-token.d.ts.map +1 -0
  174. package/dist/web-server/web-token.js +71 -0
  175. package/dist/web-server/web-token.js.map +1 -0
  176. package/opencode/arcs/manifest.json +8 -8
  177. package/package.json +1 -1
  178. package/scripts/claude-code-session-hook.mjs +49 -3
  179. package/scripts/deploy-claudecode-bundle.mjs +24 -3
  180. package/dist/web-client/assets/architecture-TIHT7OUA-CJqI5wNI.js +0 -1
  181. package/dist/web-client/assets/channel-C8DlmyVe.js +0 -1
  182. package/dist/web-client/assets/classDiagram-OUVF2IWQ-p32N1P_G.js +0 -1
  183. package/dist/web-client/assets/classDiagram-v2-EOCWNBFH-p32N1P_G.js +0 -1
  184. package/dist/web-client/assets/eventmodeling-45OFAUF4-Bj5P8mZJ.js +0 -1
  185. package/dist/web-client/assets/flowDiagram-23GEKE2U-37BztFri.js +0 -1
  186. package/dist/web-client/assets/index-3mNPVkix.css +0 -2
  187. package/dist/web-client/assets/railroad-abnf-AHOZXSZD-2Dg9wu0J.js +0 -1
  188. package/dist/web-client/assets/railroad-ebnf-EBAXGLYW-C_E2ot0R.js +0 -1
  189. package/dist/web-client/assets/railroad-peg-LSFZ7HO6-Bs9UQR1b.js +0 -1
  190. package/dist/web-client/assets/stateDiagram-v2-6OUMAXLB-BCMWGnsJ.js +0 -1
  191. package/dist/web-client/assets/swimlanesDiagram-G3AALYLV-DmudmLcK.js +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAS9C,SAAS,IAAI,CAAC,GAAW,EAAE,GAAW;IACpC,IAAI,CAAC;QACH,OAAO,QAAQ,CAAC,GAAG,EAAE;YACnB,QAAQ,EAAE,OAAO;YACjB,GAAG;YACH,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;SAChC,CAAC,CAAC,IAAI,EAAE,CAAC;IACZ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,GAAW;IACnC,OAAO,IAAI,CAAC,qCAAqC,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC;AACrE,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,IAAI,CAAC,4BAA4B,EAAE,GAAG,CAAC,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,SAAS,CACvB,GAAW,EACX,OAA4C;IAE5C,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,IAAI,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,OAAO,EAAE,KAAK,CAAC;IAE7B,I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AC,MAAM;QAAE,OAAO,EAAE,CAAC;IACvB,OAAO,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * The wire contract shared by everything on the Claude Code session bridge:
3
+ * the event names the hook is registered under, and the address it posts to.
4
+ *
5
+ * These values are duplicated across process boundaries by necessity — the
6
+ * server validates them, the installer writes them into settings.json, and
7
+ * `scripts/claude-code-session-hook.mjs` runs standalone under Claude Code with
8
+ * no ARCS import available. Every duplicate that CAN import derives from here;
9
+ * the one that cannot (the `.mjs`, which must stay dependency-free so a broken
10
+ * bridge is inert rather than fatal) keeps its own literals and is pinned to
11
+ * this module by `test/hook-contract-parity.test.ts`, which fails on any
12
+ * divergence in either direction.
13
+ */
14
+ /**
15
+ * The four Claude Code events the bridge registers for. One script is installed
16
+ * under all of them; it dispatches internally on `hook_event_name`.
17
+ *
18
+ * A readonly tuple so `z.enum()` consumes it directly — the route's validation
19
+ * and the installer's registration can never drift apart. Adding a fifth event
20
+ * here without adding it to the hook script breaks the parity test.
21
+ */
22
+ export declare const HOOK_EVENTS: readonly ["SessionStart", "UserPromptSubmit", "SessionEnd", "Stop"];
23
+ export type HookEventName = (typeof HOOK_EVENTS)[number];
24
+ /** Loopback only: `arcs web` refuses to bind anything else. */
25
+ export declare const DEFAULT_WEB_HOST = "127.0.0.1";
26
+ /** Default `arcs web` port, and therefore the port every hook is installed with. */
27
+ export declare const DEFAULT_WEB_PORT = 4173;
28
+ /**
29
+ * Where an installed hook posts when `--url` was not given.
30
+ *
31
+ * Baked into the settings.json command string at install time, so changing it
32
+ * only affects hooks installed afterwards — an already-installed hook keeps
33
+ * posting to the URL it was written with.
34
+ */
35
+ export declare const DEFAULT_SERVER_URL = "http://127.0.0.1:4173";
36
+ //# sourceMappingURL=hook-contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook-contract.d.ts","sourceRoot":"","sources":["../../src/utils/hook-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,qEAAsE,CAAC;AAE/F,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,+DAA+D;AAC/D,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAE5C,oFAAoF;AACpF,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,0BAAmD,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The wire contract shared by everything on the Claude Code session bridge:
3
+ * the event names the hook is registered under, and the address it posts to.
4
+ *
5
+ * These values are duplicated across process boundaries by necessity — the
6
+ * server validates them, the installer writes them into settings.json, and
7
+ * `scripts/claude-code-session-hook.mjs` runs standalone under Claude Code with
8
+ * no ARCS import available. Every duplicate that CAN import derives from here;
9
+ * the one that cannot (the `.mjs`, which must stay dependency-free so a broken
10
+ * bridge is inert rather than fatal) keeps its own literals and is pinned to
11
+ * this module by `test/hook-contract-parity.test.ts`, which fails on any
12
+ * divergence in either direction.
13
+ */
14
+ /**
15
+ * The four Claude Code events the bridge registers for. One script is installed
16
+ * under all of them; it dispatches internally on `hook_event_name`.
17
+ *
18
+ * A readonly tuple so `z.enum()` consumes it directly — the route's validation
19
+ * and the installer's registration can never drift apart. Adding a fifth event
20
+ * here without adding it to the hook script breaks the parity test.
21
+ */
22
+ export const HOOK_EVENTS = ["SessionStart", "UserPromptSubmit", "SessionEnd", "Stop"];
23
+ /** Loopback only: `arcs web` refuses to bind anything else. */
24
+ export const DEFAULT_WEB_HOST = "127.0.0.1";
25
+ /** Default `arcs web` port, and therefore the port every hook is installed with. */
26
+ export const DEFAULT_WEB_PORT = 4173;
27
+ /**
28
+ * Where an installed hook posts when `--url` was not given.
29
+ *
30
+ * Baked into the settings.json command string at install time, so changing it
31
+ * only affects hooks installed afterwards — an already-installed hook keeps
32
+ * posting to the URL it was written with.
33
+ */
34
+ export const DEFAULT_SERVER_URL = `http://${DEFAULT_WEB_HOST}:${DEFAULT_WEB_PORT}`;
35
+ //# sourceMappingURL=hook-contract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hook-contract.js","sourceRoot":"","sources":["../../src/utils/hook-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,CAAU,CAAC;AAI/F,+DAA+D;AAC/D,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAE5C,oFAAoF;AACpF,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAErC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,gBAAgB,IAAI,gBAAgB,EAAE,CAAC"}
@@ -12,6 +12,45 @@
12
12
  */
13
13
  export declare function hookTokenPath(projectDir: string): string;
14
14
  export declare function readHookToken(projectDir: string): Promise<string | undefined>;
15
+ /**
16
+ * Rotates the on-disk token, owner-only.
17
+ *
18
+ * Unlike the web token there is no in-memory copy to verify against — the hook
19
+ * subprocess re-reads this file at every checkpoint, so the FILE is the
20
+ * credential and its mode is the whole control. `writeJson` stages a temp file
21
+ * and renames it into place with no mode argument, so the token lands 0644
22
+ * (world-readable) on a default umask — and it lands that way on EVERY write,
23
+ * not just the first: the rename swaps in the freshly created temp inode, whose
24
+ * mode came from the umask, and the previous file's mode is discarded with the
25
+ * inode it belonged to. (A mode passed at open() would in fact have covered this
26
+ * writer, precisely because every write creates the destination inode; the
27
+ * "applies only at create" caveat bites a direct non-atomic open(path,"w",mode)
28
+ * over an existing file, which is not this path.) The chmod is nonetheless
29
+ * unconditional rather than conditional on the mode read back, so the 0600
30
+ * guarantee survives a future switch away from the atomic writer.
31
+ *
32
+ * The directory is narrowed too: the staged temp file is a fresh inode born
33
+ * under the umask, so it is briefly world-readable between write and rename.
34
+ * 0o700 on the enclosing directory — which holds nothing but this token —
35
+ * denies another account the traversal needed to reach that window at all.
36
+ *
37
+ * What this buys, stated honestly: 0o600 is a cross-user control. It keeps
38
+ * other UNIX accounts out; it is NOT a defense against a process running as
39
+ * THIS user, which can read the file at any mode. Nor is this the token's only
40
+ * copy — `arcs hooks install-claude-code --write` embeds the same value in the
41
+ * workspace's .claude/settings.local.json, which is now created 0o600 and
42
+ * chmodded 0o600 unconditionally too (claude-code-hook-install.ts), though that
43
+ * copy is inlined into the hook command string and so still leaks to `ps` on
44
+ * every hook fire. So this is a floor on ARCS's own copy, not a guarantee about
45
+ * the secret.
46
+ *
47
+ * A chmod failure propagates and fails the install command. That is
48
+ * deliberate — the caller (`arcs hooks install-claude-code`) has not printed
49
+ * the snippet yet, so the run fails closed and the user reruns to rotate,
50
+ * rather than silently installing a token this process could not protect. The
51
+ * hook's own read path (readHookToken/verifyHookToken) is untouched by this and
52
+ * still never throws.
53
+ */
15
54
  export declare function writeHookToken(projectDir: string, token: string): Promise<void>;
16
55
  /**
17
56
  * Constant-time token comparison. Returns false when the project has no token
@@ -1 +1 @@
1
- {"version":3,"file":"hook-token-store.d.ts","sourceRoot":"","sources":["../../src/utils/hook-token-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAYH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAGnF;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGrF;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ7F"}
1
+ {"version":3,"file":"hook-token-store.d.ts","sourceRoot":"","sources":["../../src/utils/hook-token-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAaH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAExD;AAED,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAGnF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMrF;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ7F"}
@@ -11,7 +11,8 @@
11
11
  * only with itself, and the loser simply has to rerun install).
12
12
  */
13
13
  import { timingSafeEqual } from "node:crypto";
14
- import { join } from "node:path";
14
+ import { chmod } from "node:fs/promises";
15
+ import { dirname, join } from "node:path";
15
16
  import { readJsonSafe } from "./json.js";
16
17
  import { ensureDir, nowISO, writeJson } from "./storage-utils.js";
17
18
  export function hookTokenPath(projectDir) {
@@ -21,9 +22,51 @@ export async function readHookToken(projectDir) {
21
22
  const file = await readJsonSafe(hookTokenPath(projectDir));
22
23
  return typeof file?.token === "string" && file.token ? file.token : undefined;
23
24
  }
25
+ /**
26
+ * Rotates the on-disk token, owner-only.
27
+ *
28
+ * Unlike the web token there is no in-memory copy to verify against — the hook
29
+ * subprocess re-reads this file at every checkpoint, so the FILE is the
30
+ * credential and its mode is the whole control. `writeJson` stages a temp file
31
+ * and renames it into place with no mode argument, so the token lands 0644
32
+ * (world-readable) on a default umask — and it lands that way on EVERY write,
33
+ * not just the first: the rename swaps in the freshly created temp inode, whose
34
+ * mode came from the umask, and the previous file's mode is discarded with the
35
+ * inode it belonged to. (A mode passed at open() would in fact have covered this
36
+ * writer, precisely because every write creates the destination inode; the
37
+ * "applies only at create" caveat bites a direct non-atomic open(path,"w",mode)
38
+ * over an existing file, which is not this path.) The chmod is nonetheless
39
+ * unconditional rather than conditional on the mode read back, so the 0600
40
+ * guarantee survives a future switch away from the atomic writer.
41
+ *
42
+ * The directory is narrowed too: the staged temp file is a fresh inode born
43
+ * under the umask, so it is briefly world-readable between write and rename.
44
+ * 0o700 on the enclosing directory — which holds nothing but this token —
45
+ * denies another account the traversal needed to reach that window at all.
46
+ *
47
+ * What this buys, stated honestly: 0o600 is a cross-user control. It keeps
48
+ * other UNIX accounts out; it is NOT a defense against a process running as
49
+ * THIS user, which can read the file at any mode. Nor is this the token's only
50
+ * copy — `arcs hooks install-claude-code --write` embeds the same value in the
51
+ * workspace's .claude/settings.local.json, which is now created 0o600 and
52
+ * chmodded 0o600 unconditionally too (claude-code-hook-install.ts), though that
53
+ * copy is inlined into the hook command string and so still leaks to `ps` on
54
+ * every hook fire. So this is a floor on ARCS's own copy, not a guarantee about
55
+ * the secret.
56
+ *
57
+ * A chmod failure propagates and fails the install command. That is
58
+ * deliberate — the caller (`arcs hooks install-claude-code`) has not printed
59
+ * the snippet yet, so the run fails closed and the user reruns to rotate,
60
+ * rather than silently installing a token this process could not protect. The
61
+ * hook's own read path (readHookToken/verifyHookToken) is untouched by this and
62
+ * still never throws.
63
+ */
24
64
  export async function writeHookToken(projectDir, token) {
25
- await ensureDir(join(projectDir, "hooks"));
26
- await writeJson(hookTokenPath(projectDir), { token, createdAt: nowISO() });
65
+ const path = hookTokenPath(projectDir);
66
+ await ensureDir(dirname(path));
67
+ await chmod(dirname(path), 0o700);
68
+ await writeJson(path, { token, createdAt: nowISO() });
69
+ await chmod(path, 0o600);
27
70
  }
28
71
  /**
29
72
  * Constant-time token comparison. Returns false when the project has no token
@@ -1 +1 @@
1
- {"version":3,"file":"hook-token-store.js","sourceRoot":"","sources":["../../src/utils/hook-token-store.ts"],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AM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;IAClC,MAAM,SAAS,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IACtD,MAAM,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,UAAkB,EAAE,SAAiB;IACzE,MAAM,KAAK,GAAG,MAAM,aAAa,CAAC,UAAU,CAAC,CAAC;IAC9C,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IAEvC,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC7C,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC/C,IAAI,QAAQ,CAAC,MAAM,KAAK,MAAM,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACpD,OAAO,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC3C,CAAC"}
@@ -7,12 +7,36 @@
7
7
  */
8
8
  export type { SessionLinkedNodeType, SessionRuntimeType, SessionStatus, } from "./storage-utils.js";
9
9
  export { SESSION_LINKED_NODE_TYPES, SESSION_RUNTIME_TYPES, SESSION_STATUSES, } from "./storage-utils.js";
10
+ /**
11
+ * Where a session record came from — its provenance, not its state.
12
+ *
13
+ * - `observed` — a runtime session ARCS merely watches: a terminal `claude`
14
+ * session announcing itself through the hook bridge, or an opencode session
15
+ * discovered (or created) on a live opencode server. ARCS can nudge it, but
16
+ * something outside ARCS drives it.
17
+ * - `arcs` — a record ARCS minted for itself (the headless oneshot/stable
18
+ * threads). No terminal is attached, so nothing ever drains its message
19
+ * queue; it is driven by headless runs only.
20
+ *
21
+ * Declared here rather than in storage-utils alongside the other session enums
22
+ * because origin is derived by this module (legacy promotion below) and every
23
+ * consumer already imports the session enums through this file.
24
+ */
25
+ export declare const SESSION_ORIGINS: readonly ["observed", "arcs"];
26
+ export type SessionOrigin = (typeof SESSION_ORIGINS)[number];
10
27
  export interface SessionMeta {
11
28
  id: string;
12
29
  normalizedId: string;
13
30
  runtimeType: import("./storage-utils.js").SessionRuntimeType;
14
31
  /** Runtime-native session id, verbatim (e.g. opencode "ses_04f…"). */
15
32
  runtimeSessionId: string;
33
+ /**
34
+ * Provenance of the record. Persisted, never client-settable, and never
35
+ * rewritten by an upsert — whoever created the record fixed it. Always
36
+ * present on a value read through this module even when the stored record
37
+ * predates the field (see `withDerivedOrigin`).
38
+ */
39
+ origin: SessionOrigin;
16
40
  status: import("./storage-utils.js").SessionStatus;
17
41
  startedAt: string;
18
42
  lastMessageAt?: string;
@@ -31,6 +55,42 @@ export interface SessionMeta {
31
55
  * the queue itself at its next checkpoint. Absent means "nothing pending".
32
56
  */
33
57
  messageQueue?: string[];
58
+ /**
59
+ * Id of the headless run currently claimed on this record — written when the
60
+ * run is spawned and cleared when it settles (`beginSessionRun` /
61
+ * `settleSessionRun`). Its presence IS the claim: a record carrying one is
62
+ * believed to have a live `claude` child behind it.
63
+ *
64
+ * Written for the runs ARCS drives itself, so in practice every `arcs`-origin
65
+ * thread; an `observed` record only carries one while a headless run targets
66
+ * it. Deliberately absent from `UpdateSessionInput`: a claim is a fact about
67
+ * a process, never something a caller hands in.
68
+ */
69
+ currentRunId?: string;
70
+ /**
71
+ * OS pid of the claimed run's child. Persisted because in-memory liveness
72
+ * dies with the server and the restart case is exactly the one that has to be
73
+ * recoverable — the startup sweep probes this pid to tell a live run from an
74
+ * orphaned claim.
75
+ */
76
+ currentRunPid?: number;
77
+ /**
78
+ * ISO-8601 proof of life for the claimed run. Same unit as every other
79
+ * top-level timestamp on this record; `metadata.run.*` keeps epoch ms and the
80
+ * two never mix.
81
+ *
82
+ * SHORTCUT: nothing refreshes this mid-run yet, so it equals the run's spawn
83
+ * time and RUN_HEARTBEAT_TTL_MS has to cover a whole run; upgrade to a
84
+ * periodic touch (and a far shorter TTL) when the runner grows a heartbeat.
85
+ */
86
+ heartbeatAt?: string;
87
+ /**
88
+ * ISO-8601 time of the last runtime checkpoint ARCS observed — Claude Code's
89
+ * `UserPromptSubmit` and `Stop` hooks. The only liveness evidence an
90
+ * `observed` session ever produces: nothing else reports that a terminal
91
+ * session is still working.
92
+ */
93
+ lastCheckpointAt?: string;
34
94
  metadata?: Record<string, unknown>;
35
95
  }
36
96
  export interface SessionIndex {
@@ -39,6 +99,13 @@ export interface SessionIndex {
39
99
  export interface CreateSessionInput {
40
100
  runtimeType: import("./storage-utils.js").SessionRuntimeType;
41
101
  runtimeSessionId: string;
102
+ /**
103
+ * Provenance, set once at creation and defaulting to `observed`. Only the
104
+ * ARCS-minted headless threads pass `arcs`. Deliberately absent from every
105
+ * request schema: origin is what capability is derived from, so a client that
106
+ * could set it could talk itself out of the queue refusal below.
107
+ */
108
+ origin?: SessionOrigin;
42
109
  status?: import("./storage-utils.js").SessionStatus;
43
110
  startedAt?: string;
44
111
  lastMessageAt?: string;
@@ -51,6 +118,12 @@ export interface UpdateSessionInput {
51
118
  status?: import("./storage-utils.js").SessionStatus;
52
119
  /** Pass `null` to clear; pass an ISO timestamp to set. */
53
120
  lastMessageAt?: string | null;
121
+ /**
122
+ * ISO timestamp of a runtime checkpoint just observed (`null` clears it).
123
+ * Settable here — unlike the run claim — because a checkpoint is a report the
124
+ * hook bridge relays, not a process ARCS owns.
125
+ */
126
+ lastCheckpointAt?: string | null;
54
127
  /** Pass `null` to clear; pass a string to set. */
55
128
  userEmail?: string | null;
56
129
  /** Pass `null` to clear; merged shallowly into the existing metadata. */
@@ -75,6 +148,91 @@ export interface SessionFilters {
75
148
  runtimeType?: import("./storage-utils.js").SessionRuntimeType;
76
149
  }
77
150
  export declare function readSessionIndex(projectDir: string): Promise<SessionIndex>;
151
+ /**
152
+ * Capability: may a message be handed to this session through `messageQueue`?
153
+ *
154
+ * Queued delivery only works when something drains the queue, and the only
155
+ * drainer is the Claude Code hook script running inside a real terminal
156
+ * session — an `observed` claude-code record. An `arcs`-origin thread has no
157
+ * terminal attached, so a message queued for it would sit there forever
158
+ * (that black hole is what the queue refusal on POST /message closes), and
159
+ * opencode records take live injection instead of ever queueing.
160
+ *
161
+ * Derived from `origin`, never from a metadata string.
162
+ */
163
+ export declare function canQueue(session: SessionMeta): boolean;
164
+ /**
165
+ * What a session is doing right now, as a reader of the UI would say it.
166
+ *
167
+ * DERIVED, never stored: there is no `phase` field on `SessionMeta` and no way
168
+ * to write one through this module. A stored phase is a second source of truth
169
+ * that goes stale the instant a process dies without telling anyone — which is
170
+ * precisely the "stuck on running forever" failure this replaces.
171
+ */
172
+ export declare const SESSION_PHASES: readonly ["running", "idle", "failed", "ended"];
173
+ export type SessionPhase = (typeof SESSION_PHASES)[number];
174
+ /**
175
+ * Outcome vocabulary persisted on `metadata.run.outcome`. A superset of the
176
+ * runner's own `RunOutcome` ("success" | "error" | "timeout"): `interrupted` is
177
+ * never produced BY a run, it is written FOR a run whose process disappeared
178
+ * without ever settling — a restart's orphan. Declared here rather than
179
+ * imported from the web server because `utils/` must not depend on
180
+ * `web-server/`; claude-runner's union stays exactly what a child can return.
181
+ */
182
+ export declare const SESSION_RUN_OUTCOMES: readonly ["success", "error", "timeout", "interrupted"];
183
+ export type SessionRunOutcome = (typeof SESSION_RUN_OUTCOMES)[number];
184
+ /**
185
+ * How long a run claim's heartbeat counts as proof of life. Sized to the
186
+ * runner's default 10-minute run ceiling because nothing refreshes the
187
+ * heartbeat mid-run yet (see `SessionMeta.heartbeatAt`) — a shorter window
188
+ * would demote a perfectly healthy long run to `idle`.
189
+ */
190
+ export declare const RUN_HEARTBEAT_TTL_MS: number;
191
+ /**
192
+ * How long a runtime checkpoint counts as proof of life for an observed
193
+ * session. Deliberately shorter than the run TTL: checkpoints arrive at every
194
+ * prompt and every turn end, so a terminal that has produced neither in five
195
+ * minutes is waiting on a human, not working.
196
+ */
197
+ export declare const CHECKPOINT_TTL_MS: number;
198
+ export interface SessionPhaseOptions {
199
+ /** Clock in epoch ms; defaults to `Date.now()`. */
200
+ now?: number;
201
+ heartbeatTtlMs?: number;
202
+ checkpointTtlMs?: number;
203
+ }
204
+ /**
205
+ * The record's run claim, or `undefined` when it holds none. Validated rather
206
+ * than trusted: a hand-edited index can carry anything under this key.
207
+ */
208
+ export declare function sessionRunClaim(session: SessionMeta): string | undefined;
209
+ /**
210
+ * Derives a session's phase from its own persisted evidence, in one place.
211
+ *
212
+ * Precedence, strongest first:
213
+ * 1. a terminal `status` — `failed` is `failed`, `completed`/`disconnected`
214
+ * are `ended`. Nothing observed later reopens a session that is over.
215
+ * 2. a run claim (`currentRunId`) — ARCS spawned a child for this record, so
216
+ * its `heartbeatAt` is the freshest evidence there is. Stale means the
217
+ * claim outlived its proof of life, which reads `idle`, not `failed`: the
218
+ * run is settled by the reconciler, not guessed at here.
219
+ * 3. `lastCheckpointAt` — the only signal an observed terminal session emits.
220
+ *
221
+ * `metadata.run.outcome` is deliberately NOT an input. That field is run-level
222
+ * history (rendered next to the run), while phase answers "is this session live
223
+ * right now" — a run that failed an hour ago leaves the session idle and ready
224
+ * for the next one, not permanently `failed`.
225
+ *
226
+ * Pure: a record plus a clock, no I/O, no process probing. Liveness that needs
227
+ * the world (a pid, `claude agents`) belongs to the reconciler, which starts
228
+ * from this value and can only ever demote it.
229
+ *
230
+ * SHORTCUT: checkpoint freshness cannot tell `UserPromptSubmit` (turn started)
231
+ * from `Stop` (turn ended), so a session reads `running` for the TTL after its
232
+ * last turn; upgrade to a persisted checkpoint kind when the panel needs
233
+ * turn-level precision.
234
+ */
235
+ export declare function deriveSessionPhase(session: SessionMeta, options?: SessionPhaseOptions): SessionPhase;
78
236
  export declare function createSession(projectDir: string, input: CreateSessionInput): Promise<SessionMeta>;
79
237
  /**
80
238
  * Create-or-update by runtime session id. Used by runtime discovery bridges,
@@ -109,5 +267,73 @@ export declare function enqueueSessionMessage(projectDir: string, sessionId: str
109
267
  * is the accepted trade for never replaying a message twice into a session.
110
268
  */
111
269
  export declare function drainSessionMessageQueue(projectDir: string, sessionId: string): Promise<string[]>;
270
+ export interface BeginSessionRunInput {
271
+ /** Caller-minted id for this run — the claim's identity. */
272
+ runId: string;
273
+ /** OS pid of the spawned child; absent/`null` when the spawn produced none. */
274
+ pid?: number | null;
275
+ /** ISO override for the heartbeat and `updatedAt` stamps (tests). */
276
+ now?: string;
277
+ }
278
+ export interface SettleSessionRunInput {
279
+ /**
280
+ * Settles only when it matches the persisted claim. Omit to settle whatever
281
+ * claim is there (the startup sweep passes the id it read, so a run that
282
+ * started in between is never settled out from under itself).
283
+ */
284
+ runId?: string;
285
+ outcome: SessionRunOutcome;
286
+ error?: string;
287
+ /** Epoch ms for `metadata.run.endedAt` — defaults to now. */
288
+ endedAt?: number;
289
+ /**
290
+ * Extra `metadata.run` fields stamped in the SAME write as the outcome: what
291
+ * the RUNNER measured and no claim could have known at spawn (the pid and
292
+ * startedAt the child actually reported, the run's mode, the stream
293
+ * observations). Merged UNDER the settle's own fields, so `outcome`/`endedAt`/
294
+ * `error` can never be smuggled past the settle that owns them.
295
+ */
296
+ run?: Record<string, unknown>;
297
+ /**
298
+ * Sibling `metadata` keys written in the same read-modify-write, shallow
299
+ * merged as `updateSession` merges. The seed-decision repair rides here: a
300
+ * settle that released the claim in one write and repaired the record in a
301
+ * second is readable in between as "this run failed" while still carrying the
302
+ * seed state that failed it — and the second write can land AFTER a newer run
303
+ * has already claimed the record, clobbering its live `metadata.run`. Merged
304
+ * UNDER `run`, so `run` can never be rewritten through this door.
305
+ */
306
+ metadata?: Record<string, unknown>;
307
+ /** ISO override for `updatedAt` (tests). */
308
+ now?: string;
309
+ }
310
+ /**
311
+ * Claims a session for a headless run: persists the run id, the child's pid and
312
+ * the first heartbeat, all of which survive the server process that made them.
313
+ *
314
+ * The claim is what makes a run recoverable. In-memory liveness (the runner's
315
+ * `liveRuns` map) dies with the server, so without a persisted claim a run
316
+ * interrupted by a restart would leave the session reading `running` forever
317
+ * with nothing left that could ever settle it.
318
+ */
319
+ export declare function beginSessionRun(projectDir: string, sessionId: string, input: BeginSessionRunInput): Promise<SessionMeta>;
320
+ /**
321
+ * Releases a session's run claim, records how the run ended on `metadata.run`,
322
+ * and applies whatever the settle repaired — in ONE lock acquisition.
323
+ *
324
+ * Read-modify-write has to be atomic: `metadata.run` is replaced wholesale by
325
+ * every writer, so settling through the generic `updateSession` would race the
326
+ * route's own write-back and could drop the run's pid/startedAt.
327
+ *
328
+ * Everything a settle concludes therefore goes in HERE rather than in a
329
+ * follow-up `updateSession`. The claim is the only thing serializing a run
330
+ * against the next one, and releasing it is the LAST thing this write does — so
331
+ * a conclusion left to a second write is both observable in the gap (the record
332
+ * reads settled while still carrying the state the run just disproved) and
333
+ * unguarded outside it: the `input.runId` check above holds only for the
334
+ * duration of this lock, and a newer run can claim the record the moment it is
335
+ * released.
336
+ */
337
+ export declare function settleSessionRun(projectDir: string, sessionId: string, input: SettleSessionRunInput): Promise<SessionMeta>;
112
338
  export declare function deleteSession(projectDir: string, sessionId: string): Promise<void>;
113
339
  //# sourceMappingURL=session-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-store.d.ts","sourceRoot":"","sources":["../../src/utils/session-store.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA4BH,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,yBAAyB,EACzB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAM5B,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,oBAAoB,EAAE,kBAAkB,CAAC;IAC7D,sEAAsE;IACtE,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,OAAO,oBAAo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