@chrisjowen/wheelhouse 0.16.1 → 0.17.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 (379) hide show
  1. package/build/client/_app/immutable/chunks/{eaKSEJEz.js → 79yuhTwS.js} +1 -1
  2. package/build/client/_app/immutable/chunks/79yuhTwS.js.br +0 -0
  3. package/build/client/_app/immutable/chunks/79yuhTwS.js.gz +0 -0
  4. package/build/client/_app/immutable/chunks/{DwipL_Cn.js → B1zE3zKP.js} +1 -1
  5. package/build/client/_app/immutable/chunks/B1zE3zKP.js.br +0 -0
  6. package/build/client/_app/immutable/chunks/B1zE3zKP.js.gz +0 -0
  7. package/build/client/_app/immutable/chunks/{CXqiEZDa.js → B3KHKydy.js} +1 -1
  8. package/build/client/_app/immutable/chunks/B3KHKydy.js.br +0 -0
  9. package/build/client/_app/immutable/chunks/B3KHKydy.js.gz +0 -0
  10. package/build/client/_app/immutable/chunks/{CI38zzdF.js → BPjwAHMu.js} +1 -1
  11. package/build/client/_app/immutable/chunks/BPjwAHMu.js.br +0 -0
  12. package/build/client/_app/immutable/chunks/BPjwAHMu.js.gz +0 -0
  13. package/build/client/_app/immutable/chunks/{Cx2pfZgS.js → BXiSaVju.js} +1 -1
  14. package/build/client/_app/immutable/chunks/BXiSaVju.js.br +0 -0
  15. package/build/client/_app/immutable/chunks/BXiSaVju.js.gz +0 -0
  16. package/build/client/_app/immutable/chunks/{CLj8aQLL.js → BosdQIFt.js} +1 -1
  17. package/build/client/_app/immutable/chunks/BosdQIFt.js.br +0 -0
  18. package/build/client/_app/immutable/chunks/BosdQIFt.js.gz +0 -0
  19. package/build/client/_app/immutable/chunks/{CFyednqY.js → CDSHscp6.js} +1 -1
  20. package/build/client/_app/immutable/chunks/CDSHscp6.js.br +3 -0
  21. package/build/client/_app/immutable/chunks/CDSHscp6.js.gz +0 -0
  22. package/build/client/_app/immutable/chunks/{BaV2UMay.js → CI19kiwT.js} +1 -1
  23. package/build/client/_app/immutable/chunks/CI19kiwT.js.br +0 -0
  24. package/build/client/_app/immutable/chunks/CI19kiwT.js.gz +0 -0
  25. package/build/client/_app/immutable/chunks/{DKuj2J54.js → CKE9neHp.js} +1 -1
  26. package/build/client/_app/immutable/chunks/CKE9neHp.js.br +0 -0
  27. package/build/client/_app/immutable/chunks/CKE9neHp.js.gz +0 -0
  28. package/build/client/_app/immutable/chunks/CLJu9cY5.js +2 -0
  29. package/build/client/_app/immutable/chunks/CLJu9cY5.js.br +0 -0
  30. package/build/client/_app/immutable/chunks/CLJu9cY5.js.gz +0 -0
  31. package/build/client/_app/immutable/chunks/{yB7gO-LO.js → CSU604UC.js} +1 -1
  32. package/build/client/_app/immutable/chunks/CSU604UC.js.br +0 -0
  33. package/build/client/_app/immutable/chunks/CSU604UC.js.gz +0 -0
  34. package/build/client/_app/immutable/chunks/{8PhaMXz9.js → CgZovtjz.js} +1 -1
  35. package/build/client/_app/immutable/chunks/CgZovtjz.js.br +0 -0
  36. package/build/client/_app/immutable/chunks/CgZovtjz.js.gz +0 -0
  37. package/build/client/_app/immutable/chunks/{-PxedOl8.js → ClYd4imU.js} +1 -1
  38. package/build/client/_app/immutable/chunks/ClYd4imU.js.br +0 -0
  39. package/build/client/_app/immutable/chunks/ClYd4imU.js.gz +0 -0
  40. package/build/client/_app/immutable/chunks/{CIDO3V-e.js → CsmF6Hwj.js} +1 -1
  41. package/build/client/_app/immutable/chunks/CsmF6Hwj.js.br +0 -0
  42. package/build/client/_app/immutable/chunks/CsmF6Hwj.js.gz +0 -0
  43. package/build/client/_app/immutable/chunks/Cwo48ib8.js +1 -0
  44. package/build/client/_app/immutable/chunks/Cwo48ib8.js.br +0 -0
  45. package/build/client/_app/immutable/chunks/Cwo48ib8.js.gz +0 -0
  46. package/build/client/_app/immutable/chunks/{CnNJ9y58.js → D8J1M-4m.js} +1 -1
  47. package/build/client/_app/immutable/chunks/D8J1M-4m.js.br +0 -0
  48. package/build/client/_app/immutable/chunks/D8J1M-4m.js.gz +0 -0
  49. package/build/client/_app/immutable/chunks/{DF5qBysY.js → DFrn6Xyh.js} +1 -1
  50. package/build/client/_app/immutable/chunks/DFrn6Xyh.js.br +0 -0
  51. package/build/client/_app/immutable/chunks/DFrn6Xyh.js.gz +0 -0
  52. package/build/client/_app/immutable/chunks/{C237xJzy.js → fhAu_Obx.js} +1 -1
  53. package/build/client/_app/immutable/chunks/fhAu_Obx.js.br +0 -0
  54. package/build/client/_app/immutable/chunks/fhAu_Obx.js.gz +0 -0
  55. package/build/client/_app/immutable/chunks/{_wNDtuC3.js → qmyjnG6s.js} +1 -1
  56. package/build/client/_app/immutable/chunks/qmyjnG6s.js.br +0 -0
  57. package/build/client/_app/immutable/chunks/qmyjnG6s.js.gz +0 -0
  58. package/build/client/_app/immutable/chunks/{CYD68e6V.js → xHBeYlGm.js} +1 -1
  59. package/build/client/_app/immutable/chunks/xHBeYlGm.js.br +0 -0
  60. package/build/client/_app/immutable/chunks/xHBeYlGm.js.gz +0 -0
  61. package/build/client/_app/immutable/entry/{app.BOOXafZJ.js → app.DwV2pwLU.js} +2 -2
  62. package/build/client/_app/immutable/entry/app.DwV2pwLU.js.br +0 -0
  63. package/build/client/_app/immutable/entry/app.DwV2pwLU.js.gz +0 -0
  64. package/build/client/_app/immutable/entry/start.CAfmMhjm.js +1 -0
  65. package/build/client/_app/immutable/entry/start.CAfmMhjm.js.br +0 -0
  66. package/build/client/_app/immutable/entry/start.CAfmMhjm.js.gz +0 -0
  67. package/build/client/_app/immutable/nodes/{0.py9DNAwX.js → 0.DF8hnsli.js} +1 -1
  68. package/build/client/_app/immutable/nodes/0.DF8hnsli.js.br +0 -0
  69. package/build/client/_app/immutable/nodes/0.DF8hnsli.js.gz +0 -0
  70. package/build/client/_app/immutable/nodes/{1.CLi5bKEj.js → 1.B5FnFSGX.js} +1 -1
  71. package/build/client/_app/immutable/nodes/1.B5FnFSGX.js.br +0 -0
  72. package/build/client/_app/immutable/nodes/1.B5FnFSGX.js.gz +0 -0
  73. package/build/client/_app/immutable/nodes/{10.yQfIVnsR.js → 10.COzSUd5H.js} +1 -1
  74. package/build/client/_app/immutable/nodes/10.COzSUd5H.js.br +0 -0
  75. package/build/client/_app/immutable/nodes/10.COzSUd5H.js.gz +0 -0
  76. package/build/client/_app/immutable/nodes/{11.B0fQm_d5.js → 11.hxSy1hC3.js} +1 -1
  77. package/build/client/_app/immutable/nodes/11.hxSy1hC3.js.br +0 -0
  78. package/build/client/_app/immutable/nodes/11.hxSy1hC3.js.gz +0 -0
  79. package/build/client/_app/immutable/nodes/{12.DobuoNGx.js → 12.C7_etTt9.js} +1 -1
  80. package/build/client/_app/immutable/nodes/12.C7_etTt9.js.br +0 -0
  81. package/build/client/_app/immutable/nodes/12.C7_etTt9.js.gz +0 -0
  82. package/build/client/_app/immutable/nodes/{13.DrO72J_j.js → 13.DmZBXkEn.js} +1 -1
  83. package/build/client/_app/immutable/nodes/13.DmZBXkEn.js.br +0 -0
  84. package/build/client/_app/immutable/nodes/13.DmZBXkEn.js.gz +0 -0
  85. package/build/client/_app/immutable/nodes/{14.B9bNPNMC.js → 14.B2FfmJwY.js} +1 -1
  86. package/build/client/_app/immutable/nodes/14.B2FfmJwY.js.br +0 -0
  87. package/build/client/_app/immutable/nodes/14.B2FfmJwY.js.gz +0 -0
  88. package/build/client/_app/immutable/nodes/{15.0P3R4toY.js → 15.DOXGz5UB.js} +1 -1
  89. package/build/client/_app/immutable/nodes/15.DOXGz5UB.js.br +0 -0
  90. package/build/client/_app/immutable/nodes/15.DOXGz5UB.js.gz +0 -0
  91. package/build/client/_app/immutable/nodes/{16.BnUrhlYC.js → 16.9Kdcqd35.js} +1 -1
  92. package/build/client/_app/immutable/nodes/16.9Kdcqd35.js.br +0 -0
  93. package/build/client/_app/immutable/nodes/16.9Kdcqd35.js.gz +0 -0
  94. package/build/client/_app/immutable/nodes/{17.CHTdkvmi.js → 17.rjXh_9jf.js} +1 -1
  95. package/build/client/_app/immutable/nodes/17.rjXh_9jf.js.br +0 -0
  96. package/build/client/_app/immutable/nodes/17.rjXh_9jf.js.gz +0 -0
  97. package/build/client/_app/immutable/nodes/{19.BqId6Q50.js → 19.BDL7z_Qb.js} +1 -1
  98. package/build/client/_app/immutable/nodes/19.BDL7z_Qb.js.br +0 -0
  99. package/build/client/_app/immutable/nodes/19.BDL7z_Qb.js.gz +0 -0
  100. package/build/client/_app/immutable/nodes/{2.CEJmYaPJ.js → 2.BCbkmPbx.js} +1 -1
  101. package/build/client/_app/immutable/nodes/2.BCbkmPbx.js.br +0 -0
  102. package/build/client/_app/immutable/nodes/2.BCbkmPbx.js.gz +0 -0
  103. package/build/client/_app/immutable/nodes/{20.CHH39Z2Z.js → 20.CmA-uI_h.js} +1 -1
  104. package/build/client/_app/immutable/nodes/20.CmA-uI_h.js.br +0 -0
  105. package/build/client/_app/immutable/nodes/20.CmA-uI_h.js.gz +0 -0
  106. package/build/client/_app/immutable/nodes/{21.CbnS5dV1.js → 21.DXJrG-NW.js} +1 -1
  107. package/build/client/_app/immutable/nodes/21.DXJrG-NW.js.br +0 -0
  108. package/build/client/_app/immutable/nodes/21.DXJrG-NW.js.gz +0 -0
  109. package/build/client/_app/immutable/nodes/{22.malZaF0r.js → 22.D1PSb-pN.js} +1 -1
  110. package/build/client/_app/immutable/nodes/22.D1PSb-pN.js.br +0 -0
  111. package/build/client/_app/immutable/nodes/22.D1PSb-pN.js.gz +0 -0
  112. package/build/client/_app/immutable/nodes/{23.B-MnoGp_.js → 23.DsgvXr3A.js} +1 -1
  113. package/build/client/_app/immutable/nodes/23.DsgvXr3A.js.br +0 -0
  114. package/build/client/_app/immutable/nodes/23.DsgvXr3A.js.gz +0 -0
  115. package/build/client/_app/immutable/nodes/{24.D4YfUDkp.js → 24.DYbfQRKi.js} +1 -1
  116. package/build/client/_app/immutable/nodes/24.DYbfQRKi.js.br +0 -0
  117. package/build/client/_app/immutable/nodes/24.DYbfQRKi.js.gz +0 -0
  118. package/build/client/_app/immutable/nodes/{25.CGUyx5gm.js → 25.DchwdBic.js} +1 -1
  119. package/build/client/_app/immutable/nodes/25.DchwdBic.js.br +0 -0
  120. package/build/client/_app/immutable/nodes/25.DchwdBic.js.gz +0 -0
  121. package/build/client/_app/immutable/nodes/{26.CSoLyIuT.js → 26.DGQvgO-w.js} +1 -1
  122. package/build/client/_app/immutable/nodes/26.DGQvgO-w.js.br +0 -0
  123. package/build/client/_app/immutable/nodes/26.DGQvgO-w.js.gz +0 -0
  124. package/build/client/_app/immutable/nodes/{28.CnDXbxut.js → 28.C-Ubf5oN.js} +1 -1
  125. package/build/client/_app/immutable/nodes/28.C-Ubf5oN.js.br +0 -0
  126. package/build/client/_app/immutable/nodes/28.C-Ubf5oN.js.gz +0 -0
  127. package/build/client/_app/immutable/nodes/{3.7M8y-hh1.js → 3.BZFHR-pC.js} +1 -1
  128. package/build/client/_app/immutable/nodes/3.BZFHR-pC.js.br +0 -0
  129. package/build/client/_app/immutable/nodes/3.BZFHR-pC.js.gz +0 -0
  130. package/build/client/_app/immutable/nodes/{4.C-_GUkXF.js → 4.CAiVTgL3.js} +1 -1
  131. package/build/client/_app/immutable/nodes/4.CAiVTgL3.js.br +0 -0
  132. package/build/client/_app/immutable/nodes/4.CAiVTgL3.js.gz +0 -0
  133. package/build/client/_app/immutable/nodes/{6.BtFuhrhK.js → 6.Bpt4zq5B.js} +1 -1
  134. package/build/client/_app/immutable/nodes/6.Bpt4zq5B.js.br +0 -0
  135. package/build/client/_app/immutable/nodes/6.Bpt4zq5B.js.gz +0 -0
  136. package/build/client/_app/immutable/nodes/{7.YcUXbAew.js → 7.DqfjvXPm.js} +1 -1
  137. package/build/client/_app/immutable/nodes/7.DqfjvXPm.js.br +0 -0
  138. package/build/client/_app/immutable/nodes/7.DqfjvXPm.js.gz +0 -0
  139. package/build/client/_app/immutable/nodes/{8.DsZ8ckdf.js → 8.CCshJNeL.js} +1 -1
  140. package/build/client/_app/immutable/nodes/8.CCshJNeL.js.br +0 -0
  141. package/build/client/_app/immutable/nodes/8.CCshJNeL.js.gz +0 -0
  142. package/build/client/_app/immutable/nodes/{9.C_to2yZ7.js → 9.DAgz6-ct.js} +1 -1
  143. package/build/client/_app/immutable/nodes/9.DAgz6-ct.js.br +0 -0
  144. package/build/client/_app/immutable/nodes/9.DAgz6-ct.js.gz +0 -0
  145. package/build/client/_app/version.json +1 -1
  146. package/build/client/_app/version.json.br +0 -0
  147. package/build/client/_app/version.json.gz +0 -0
  148. package/build/handler.js +4 -4
  149. package/build/index.js +4 -4
  150. package/build/server/chunks/chunks/{detail.js-C63yRaSC.js → detail.js-Dmv_JQut.js} +2 -2
  151. package/build/server/chunks/chunks/{feedback.js-CoDUWcj9.js → feedback.js-D3a2iMXg.js} +2 -2
  152. package/build/server/chunks/chunks/{internal.js-DRYzzYai.js → internal.js-B1bN3ll4.js} +3 -3
  153. package/build/server/chunks/chunks/{keychain.js-B__X3k_t.js → keychain.js-Cp8llbD0.js} +2 -2
  154. package/build/server/chunks/chunks/{marketplace-service.js-C0HaauhN.js → marketplace-service.js-Cx9Q0k8Q.js} +2 -2
  155. package/build/server/chunks/chunks/{page.js-duntsJGm.js → page.js-CoP2TAJ_.js} +2 -2
  156. package/build/server/chunks/chunks/{previewhelper2.js-KYHlnmkc.js → previewhelper2.js-BrTz0Tg7.js} +2 -2
  157. package/build/server/chunks/chunks/{repo.js-BuqHotOZ.js → repo.js-LJxMBx-J.js} +2 -2
  158. package/build/server/chunks/chunks/{runtime.js-r5K-2IqO.js → runtime.js-Div6Lnx3.js} +611 -241
  159. package/build/server/chunks/chunks/{service.js-DhsbI-7z.js → service.js-C-7gDnLN.js} +2 -2
  160. package/build/server/chunks/chunks/{service2.js-DtkDw6vU.js → service2.js-BsM3bqfY.js} +5 -6
  161. package/build/server/chunks/chunks/{starter.js-7_g91123.js → starter.js-BGIHa5RG.js} +2 -2
  162. package/build/server/chunks/chunks/{view.js-DsUz24Rz.js → view.js-B-5C4tjd.js} +2 -2
  163. package/build/server/chunks/entries/endpoints/api/apps/_op_/{_server.ts.js-Xzvf5h6k.js → _server.ts.js-u0ExtU7j.js} +5 -5
  164. package/build/server/chunks/entries/endpoints/api/cloud/{_server.ts.js-CGAcwpTU.js → _server.ts.js-BO-Upj5a.js} +3 -3
  165. package/build/server/chunks/entries/endpoints/api/cloud/previews/{_server.ts.js-B58Bz7g3.js → _server.ts.js-CqmlbD19.js} +5 -5
  166. package/build/server/chunks/entries/endpoints/api/events/{_server.ts.js-CnBeqc-z.js → _server.ts.js-BuNwFHVn.js} +5 -5
  167. package/build/server/chunks/entries/endpoints/api/files/{_server.ts.js-BBm-d7Q_.js → _server.ts.js-DjTqppEU.js} +5 -5
  168. package/build/server/chunks/entries/endpoints/api/firstmate/chat/{_server.ts.js-CMM6ufeL.js → _server.ts.js-C9cMNlgd.js} +5 -5
  169. package/build/server/chunks/entries/endpoints/api/firstmate/commands/{_server.ts.js-DVh0xnbz.js → _server.ts.js-DfpaVvxs.js} +5 -5
  170. package/build/server/chunks/entries/endpoints/api/firstmate/dismiss/{_server.ts.js-B6rsXvtL.js → _server.ts.js-8SzK4gCV.js} +5 -5
  171. package/build/server/chunks/entries/endpoints/api/firstmate/input/{_server.ts.js-BcnbVb8B.js → _server.ts.js-BQbD-LTs.js} +5 -5
  172. package/build/server/chunks/entries/endpoints/api/firstmate/interrupt/{_server.ts.js-B2vtZDSn.js → _server.ts.js-ClqS2YDJ.js} +5 -5
  173. package/build/server/chunks/entries/endpoints/api/firstmate/messages/{_server.ts.js-CqZYPGnv.js → _server.ts.js-BCazjeCb.js} +5 -5
  174. package/build/server/chunks/entries/endpoints/api/firstmate/pick/{_server.ts.js-DyvHq1QM.js → _server.ts.js-DbwR4fGz.js} +5 -5
  175. package/build/server/chunks/entries/endpoints/api/firstmate/reactions/{_server.ts.js-CkQOGcx8.js → _server.ts.js-CY5SLTEA.js} +5 -5
  176. package/build/server/chunks/entries/endpoints/api/firstmate/start/{_server.ts.js-NlWKPhvj.js → _server.ts.js-Co9V8-6k.js} +5 -5
  177. package/build/server/chunks/entries/endpoints/api/fleet/{_server.ts.js-CGqQFYCY.js → _server.ts.js-tC_Zgasq.js} +5 -5
  178. package/build/server/chunks/entries/endpoints/api/gateway/{_server.ts.js-9kdSlog2.js → _server.ts.js-BwROfRU7.js} +5 -5
  179. package/build/server/chunks/entries/endpoints/api/health/{_server.ts.js-BmX4U6It.js → _server.ts.js-BEmBVcdL.js} +5 -5
  180. package/build/server/chunks/entries/endpoints/api/inbox/{_server.ts.js-DGgwPazr.js → _server.ts.js-DdaypvH2.js} +5 -5
  181. package/build/server/chunks/entries/endpoints/api/inbox/report/{_server.ts.js-BhlPv4sX.js → _server.ts.js-BbDc6SzH.js} +5 -5
  182. package/build/server/chunks/entries/endpoints/api/insights/{_server.ts.js-CBv70Y5L.js → _server.ts.js-Bz4abExj.js} +5 -5
  183. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/config/{_server.ts.js-ZFjBkYRX.js → _server.ts.js-BNVKAFTs.js} +5 -5
  184. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/{_server.ts.js-Dye0RV5S.js → _server.ts.js-B1AaY6FI.js} +6 -6
  185. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/feedback/summary/{_server.ts.js-R01322_G.js → _server.ts.js-CP9sLBS7.js} +7 -7
  186. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/icon/_icon_/{_server.ts.js-D9D-pKLW.js → _server.ts.js-DBDdeN2z.js} +4 -4
  187. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/load/{_server.ts.js-bsKmmR9t.js → _server.ts.js-D4h_Mifs.js} +2 -2
  188. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/ui/_...path_/{_server.ts.js-KvMFVmRQ.js → _server.ts.js-BIrWdhtR.js} +5 -5
  189. package/build/server/chunks/entries/endpoints/api/plugins/_plugin_/update/{_server.ts.js-otZqZBEm.js → _server.ts.js-Cu_Y3EEq.js} +2 -2
  190. package/build/server/chunks/entries/endpoints/api/plugins/{_server.ts.js-BYHIZAYi.js → _server.ts.js-CDMP1Wcb.js} +5 -5
  191. package/build/server/chunks/entries/endpoints/api/plugins/inspect/{_server.ts.js-BpZ3GTwz.js → _server.ts.js-DHTVslXa.js} +2 -2
  192. package/build/server/chunks/entries/endpoints/api/plugins/install/{_server.ts.js-Cl9zK50Z.js → _server.ts.js-CoRV0mGt.js} +2 -2
  193. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/{_server.ts.js-BGPTLoZC.js → _server.ts.js-DZi9g4M6.js} +6 -6
  194. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/icon/_name_/{_server.ts.js-BVB932SW.js → _server.ts.js-lf9gC82y.js} +6 -6
  195. package/build/server/chunks/entries/endpoints/api/plugins/marketplace/registries/{_server.ts.js-D82HBSqM.js → _server.ts.js-Co8qdA33.js} +6 -6
  196. package/build/server/chunks/entries/endpoints/api/plugins/roles/{_server.ts.js-CMSUPmoz.js → _server.ts.js-DFoBOVVT.js} +4 -4
  197. package/build/server/chunks/entries/endpoints/api/plugins/updates/{_server.ts.js-DgYB9fQH.js → _server.ts.js-CzTVAiDc.js} +2 -2
  198. package/build/server/chunks/entries/endpoints/api/previews/check/{_server.ts.js-D87d2rZ_.js → _server.ts.js-BAZpTlCx.js} +5 -5
  199. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/{_server.ts.js-KhwSPgmC.js → _server.ts.js-jkk-r-nJ.js} +6 -6
  200. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/commands/{_server.ts.js-DZW5ka2V.js → _server.ts.js-BdsAFbko.js} +6 -6
  201. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/consent/{_server.ts.js-BNTbARpk.js → _server.ts.js-DiMBVbVj.js} +6 -6
  202. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/draft/{_server.ts.js-DOrtYzqZ.js → _server.ts.js-BtDKXwvJ.js} +6 -6
  203. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/file/{_server.ts.js-CUr8NM7B.js → _server.ts.js-C02cyG4M.js} +6 -6
  204. package/build/server/chunks/entries/endpoints/api/projects/_id_/passage/test/{_server.ts.js-2EJ0pusQ.js → _server.ts.js-CA0wN6yE.js} +6 -6
  205. package/build/server/chunks/entries/endpoints/api/second-mates/_id_/peek/{_server.ts.js-CElRDR1Y.js → _server.ts.js-BPPzbpED.js} +5 -5
  206. package/build/server/chunks/entries/endpoints/api/services/{_server.ts.js-DnOLyc7Y.js → _server.ts.js-FbF3xSIs.js} +5 -5
  207. package/build/server/chunks/entries/endpoints/api/setup/{_server.ts.js-CWMcwyIE.js → _server.ts.js-BmS6o8yc.js} +4 -4
  208. package/build/server/chunks/entries/endpoints/api/slots/{_server.ts.js-CG5PhG0B.js → _server.ts.js-EsX_IGvt.js} +5 -5
  209. package/build/server/chunks/entries/endpoints/api/tasks/_id_/{_server.ts.js-BaglzvAu.js → _server.ts.js-BgBAYDN4.js} +6 -6
  210. package/build/server/chunks/entries/endpoints/api/tasks/_id_/artifacts/_...name_/{_server.ts.js-B-Etpm4f.js → _server.ts.js-DuTLNykO.js} +5 -5
  211. package/build/server/chunks/entries/endpoints/api/tasks/_id_/diff/{_server.ts.js-Bi4V_zBg.js → _server.ts.js-DDy8igq7.js} +5 -5
  212. package/build/server/chunks/entries/endpoints/api/tasks/_id_/output/{_server.ts.js-BL8YDwGM.js → _server.ts.js-D5pfyCzV.js} +5 -5
  213. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/{_server.ts.js-Be6htkUX.js → _server.ts.js-BA8S2_Gc.js} +5 -5
  214. package/build/server/chunks/entries/endpoints/api/tasks/_id_/preview/helper/{_server.ts.js-D6RTMJ5Z.js → _server.ts.js-DbU3413y.js} +6 -6
  215. package/build/server/chunks/entries/endpoints/api/vault/{_server.ts.js-C-MF_p4N.js → _server.ts.js-BOfdrtdZ.js} +5 -5
  216. package/build/server/chunks/entries/endpoints/api/wheelhouse/source/{_server.ts.js-DH3NxauC.js → _server.ts.js-BA5eDd2l.js} +2 -2
  217. package/build/server/chunks/entries/endpoints/api/wheelhouse/update/{_server.ts.js-Cyptrvpa.js → _server.ts.js-D5fyMbR0.js} +2 -2
  218. package/build/server/chunks/entries/endpoints/api/wheelhouse/upgrade/{_server.ts.js-zslRlgO8.js → _server.ts.js-B53DnvyB.js} +2 -2
  219. package/build/server/chunks/entries/endpoints/tasks/_id_/review/{_server.ts.js-BawOwof0.js → _server.ts.js-bjte8O9v.js} +5 -5
  220. package/build/server/chunks/entries/{hooks.server.js-DoSFsv-T.js → hooks.server.js-vOikVCYe.js} +5 -5
  221. package/build/server/chunks/entries/pages/{_layout.server.ts.js-Be39BJt8.js → _layout.server.ts.js-MabiHA-3.js} +2 -2
  222. package/build/server/chunks/entries/pages/{_page.server.ts.js-BP0lx7aM.js → _page.server.ts.js-B2yCD9g1.js} +2 -2
  223. package/build/server/chunks/entries/pages/decisions/{_page.server.ts.js-C_gST4Ql.js → _page.server.ts.js-0eAEf9gY.js} +2 -2
  224. package/build/server/chunks/entries/pages/deck/{_page.server.ts.js-BmoQQEUP.js → _page.server.ts.js-COZ-0Oqo.js} +2 -2
  225. package/build/server/chunks/entries/pages/files/{_page.server.ts.js-CnW58Q1_.js → _page.server.ts.js-BewL0sIN.js} +2 -2
  226. package/build/server/chunks/entries/pages/harbour/{_page.server.ts.js-IwVthdWl.js → _page.server.ts.js-BnCRyETa.js} +2 -2
  227. package/build/server/chunks/entries/pages/headroom/{_page.server.ts.js-BNwH-NUG.js → _page.server.ts.js-D5_3UMoa.js} +2 -2
  228. package/build/server/chunks/entries/pages/inbox/{_page.server.ts.js-Xn2rpOlN.js → _page.server.ts.js-jVFavtAR.js} +2 -2
  229. package/build/server/chunks/entries/pages/plugins/_plugin_/_page_/{_page.server.ts.js-D9oc4Zbv.js → _page.server.ts.js-BZZjxm-x.js} +2 -2
  230. package/build/server/chunks/entries/pages/projects/_id_/{_page.server.ts.js-B8XcaDI6.js → _page.server.ts.js-ByYW-gv7.js} +3 -3
  231. package/build/server/chunks/entries/pages/projects/_id_/_plugin_/_tab_/{_page.server.ts.js-9PxhdtRJ.js → _page.server.ts.js-BDnIvRvv.js} +3 -3
  232. package/build/server/chunks/entries/pages/projects/_id_/passage/{_page.server.ts.js-DRw5dO8q.js → _page.server.ts.js-D--AVAN1.js} +4 -4
  233. package/build/server/chunks/entries/pages/projects/_id_/passage/edit/{_page.server.ts.js-9h5x_BlZ.js → _page.server.ts.js-Bh8glo5J.js} +2 -2
  234. package/build/server/chunks/entries/pages/remotes/{_page.server.ts.js-DjYOr7fW.js → _page.server.ts.js-CdD2bSZT.js} +2 -2
  235. package/build/server/chunks/entries/pages/settings/cloud/{_page.server.ts.js-DAG7EeWI.js → _page.server.ts.js-D-i30dSs.js} +2 -2
  236. package/build/server/chunks/entries/pages/settings/gateway/{_page.server.ts.js-CF7Pq68d.js → _page.server.ts.js-DvxWUFjz.js} +2 -2
  237. package/build/server/chunks/entries/pages/settings/plugins/{_page.server.ts.js-BcUQwg4K.js → _page.server.ts.js-1e73Wyr0.js} +2 -2
  238. package/build/server/chunks/entries/pages/settings/plugins/_plugin_/{_page.server.ts.js-BRBNSxOW.js → _page.server.ts.js-BePUsUZP.js} +2 -2
  239. package/build/server/chunks/entries/pages/settings/setup/{_page.server.ts.js-CWdA2rpo.js → _page.server.ts.js-jRF6Ywzb.js} +2 -2
  240. package/build/server/chunks/entries/pages/settings/update/{_page.server.ts.js-Ddip-Rpl.js → _page.server.ts.js-DugL5l6V.js} +2 -2
  241. package/build/server/chunks/entries/pages/setup/{_page.server.ts.js-BeaxanMx.js → _page.server.ts.js-BiA9elO2.js} +3 -3
  242. package/build/server/chunks/entries/pages/tasks/_id_/{_page.server.ts.js-C_hg-0na.js → _page.server.ts.js-C2g0PwaJ.js} +3 -3
  243. package/build/server/chunks/entries/pages/tasks/_id_/doc/{_page.server.ts.js-DJFCXtwU.js → _page.server.ts.js-BDtV-JJy.js} +2 -2
  244. package/build/server/chunks/entries/pages/time/{_page.server.ts.js-BPudgjHm.js → _page.server.ts.js-BbZ21xiD.js} +2 -2
  245. package/build/server/chunks/{handler-BCGgzMNK.js → handler-C9BTW4CD.js} +3 -3
  246. package/build/server/chunks/{index.js-D3B2sWMy.js → index.js-pXGRX2i2.js} +2 -2
  247. package/build/server/chunks/{manifest.js-wJn9bmrp.js → manifest.js-CJa1L_3F.js} +87 -87
  248. package/build/server/chunks/nodes/{0.js-zlZLRzvM.js → 0.js-C6oZQB5s.js} +7 -7
  249. package/build/server/chunks/nodes/{1.js--1gHO-TC.js → 1.js-Cttr3TG9.js} +2 -2
  250. package/build/server/chunks/nodes/{10.js-R4llf3g7.js → 10.js-CB68zmyq.js} +2 -2
  251. package/build/server/chunks/nodes/{11.js-Nz-YFyz6.js → 11.js-CebGVYzq.js} +7 -7
  252. package/build/server/chunks/nodes/{12.js-BFoN1hdZ.js → 12.js-D2y8h8be.js} +8 -8
  253. package/build/server/chunks/nodes/{13.js-C7uxCJSk.js → 13.js-udsCT8sc.js} +8 -8
  254. package/build/server/chunks/nodes/{14.js-KjfLhRwn.js → 14.js-LSLFIS3R.js} +9 -9
  255. package/build/server/chunks/nodes/{15.js-DbvBUigb.js → 15.js-DwkMtPw0.js} +8 -8
  256. package/build/server/chunks/nodes/{16.js-C0p6-_Wc.js → 16.js-D6ljBLvA.js} +6 -6
  257. package/build/server/chunks/nodes/{17.js-OgyjPP8E.js → 17.js-CLW6wG6e.js} +2 -2
  258. package/build/server/chunks/nodes/{19.js-CjveYWJd.js → 19.js-Do3gZhOd.js} +6 -6
  259. package/build/server/chunks/nodes/{2.js-DBCmgKJ3.js → 2.js-Bg6BRLgk.js} +7 -7
  260. package/build/server/chunks/nodes/{20.js-BO7QgmVR.js → 20.js-D6ikY3Qe.js} +7 -7
  261. package/build/server/chunks/nodes/{21.js-D1siyorn.js → 21.js-DG7qeWyl.js} +7 -7
  262. package/build/server/chunks/nodes/{22.js-BOJevTr3.js → 22.js-kAdDBEK4.js} +7 -7
  263. package/build/server/chunks/nodes/{23.js-By7E4CPh.js → 23.js-CgwizXkn.js} +7 -7
  264. package/build/server/chunks/nodes/{24.js-CpltmZ68.js → 24.js-LvCCKbXs.js} +4 -4
  265. package/build/server/chunks/nodes/{25.js-lcZJHDCG.js → 25.js-DD6hUVsN.js} +7 -7
  266. package/build/server/chunks/nodes/{26.js-BeZ6lpoO.js → 26.js-WwI1VHcM.js} +8 -8
  267. package/build/server/chunks/nodes/{27.js-CLYqG4lL.js → 27.js-Ciywgqr7.js} +7 -7
  268. package/build/server/chunks/nodes/{28.js-CBfIHgUg.js → 28.js-CDVsbZwJ.js} +7 -7
  269. package/build/server/chunks/nodes/{3.js-Bi0cxlWn.js → 3.js-Bk1K3VSg.js} +7 -7
  270. package/build/server/chunks/nodes/{4.js-BzCAFdWl.js → 4.js-DR53ln0s.js} +7 -7
  271. package/build/server/chunks/nodes/{5.js-CaYpi43a.js → 5.js-Bnpq5DqQ.js} +6 -6
  272. package/build/server/chunks/nodes/{6.js-DiorXbJJ.js → 6.js-sO4LxGqG.js} +7 -7
  273. package/build/server/chunks/nodes/{7.js-CP1Kjbql.js → 7.js-CjmrTr_m.js} +7 -7
  274. package/build/server/chunks/nodes/{8.js-BuPd1Oz6.js → 8.js-CY5LlZct.js} +7 -7
  275. package/build/server/chunks/nodes/{9.js-Djv-sGNi.js → 9.js-VSnIai5w.js} +2 -2
  276. package/dist/cli.js +919 -64
  277. package/dist/wh-vault.js +1 -1
  278. package/package.json +1 -1
  279. package/skills/manage-wheelhouse/SKILL.md +1 -0
  280. package/skills/manage-wheelhouse/references/operations.md +45 -44
  281. package/build/client/_app/immutable/chunks/-PxedOl8.js.br +0 -0
  282. package/build/client/_app/immutable/chunks/-PxedOl8.js.gz +0 -0
  283. package/build/client/_app/immutable/chunks/8PhaMXz9.js.br +0 -0
  284. package/build/client/_app/immutable/chunks/8PhaMXz9.js.gz +0 -0
  285. package/build/client/_app/immutable/chunks/BP2Qtph5.js +0 -1
  286. package/build/client/_app/immutable/chunks/BP2Qtph5.js.br +0 -0
  287. package/build/client/_app/immutable/chunks/BP2Qtph5.js.gz +0 -0
  288. package/build/client/_app/immutable/chunks/BaV2UMay.js.br +0 -0
  289. package/build/client/_app/immutable/chunks/BaV2UMay.js.gz +0 -0
  290. package/build/client/_app/immutable/chunks/C237xJzy.js.br +0 -0
  291. package/build/client/_app/immutable/chunks/C237xJzy.js.gz +0 -0
  292. package/build/client/_app/immutable/chunks/CFyednqY.js.br +0 -3
  293. package/build/client/_app/immutable/chunks/CFyednqY.js.gz +0 -0
  294. package/build/client/_app/immutable/chunks/CI38zzdF.js.br +0 -0
  295. package/build/client/_app/immutable/chunks/CI38zzdF.js.gz +0 -0
  296. package/build/client/_app/immutable/chunks/CIDO3V-e.js.br +0 -0
  297. package/build/client/_app/immutable/chunks/CIDO3V-e.js.gz +0 -0
  298. package/build/client/_app/immutable/chunks/CLj8aQLL.js.br +0 -0
  299. package/build/client/_app/immutable/chunks/CLj8aQLL.js.gz +0 -0
  300. package/build/client/_app/immutable/chunks/CXqiEZDa.js.br +0 -0
  301. package/build/client/_app/immutable/chunks/CXqiEZDa.js.gz +0 -0
  302. package/build/client/_app/immutable/chunks/CYD68e6V.js.br +0 -0
  303. package/build/client/_app/immutable/chunks/CYD68e6V.js.gz +0 -0
  304. package/build/client/_app/immutable/chunks/CejLiPvM.js +0 -2
  305. package/build/client/_app/immutable/chunks/CejLiPvM.js.br +0 -0
  306. package/build/client/_app/immutable/chunks/CejLiPvM.js.gz +0 -0
  307. package/build/client/_app/immutable/chunks/CnNJ9y58.js.br +0 -0
  308. package/build/client/_app/immutable/chunks/CnNJ9y58.js.gz +0 -0
  309. package/build/client/_app/immutable/chunks/Cx2pfZgS.js.br +0 -0
  310. package/build/client/_app/immutable/chunks/Cx2pfZgS.js.gz +0 -0
  311. package/build/client/_app/immutable/chunks/DF5qBysY.js.br +0 -0
  312. package/build/client/_app/immutable/chunks/DF5qBysY.js.gz +0 -0
  313. package/build/client/_app/immutable/chunks/DKuj2J54.js.br +0 -0
  314. package/build/client/_app/immutable/chunks/DKuj2J54.js.gz +0 -0
  315. package/build/client/_app/immutable/chunks/DwipL_Cn.js.br +0 -0
  316. package/build/client/_app/immutable/chunks/DwipL_Cn.js.gz +0 -0
  317. package/build/client/_app/immutable/chunks/_wNDtuC3.js.br +0 -0
  318. package/build/client/_app/immutable/chunks/_wNDtuC3.js.gz +0 -0
  319. package/build/client/_app/immutable/chunks/eaKSEJEz.js.br +0 -0
  320. package/build/client/_app/immutable/chunks/eaKSEJEz.js.gz +0 -0
  321. package/build/client/_app/immutable/chunks/yB7gO-LO.js.br +0 -0
  322. package/build/client/_app/immutable/chunks/yB7gO-LO.js.gz +0 -0
  323. package/build/client/_app/immutable/entry/app.BOOXafZJ.js.br +0 -0
  324. package/build/client/_app/immutable/entry/app.BOOXafZJ.js.gz +0 -0
  325. package/build/client/_app/immutable/entry/start.C3VwH72E.js +0 -1
  326. package/build/client/_app/immutable/entry/start.C3VwH72E.js.br +0 -0
  327. package/build/client/_app/immutable/entry/start.C3VwH72E.js.gz +0 -0
  328. package/build/client/_app/immutable/nodes/0.py9DNAwX.js.br +0 -0
  329. package/build/client/_app/immutable/nodes/0.py9DNAwX.js.gz +0 -0
  330. package/build/client/_app/immutable/nodes/1.CLi5bKEj.js.br +0 -0
  331. package/build/client/_app/immutable/nodes/1.CLi5bKEj.js.gz +0 -0
  332. package/build/client/_app/immutable/nodes/10.yQfIVnsR.js.br +0 -0
  333. package/build/client/_app/immutable/nodes/10.yQfIVnsR.js.gz +0 -0
  334. package/build/client/_app/immutable/nodes/11.B0fQm_d5.js.br +0 -0
  335. package/build/client/_app/immutable/nodes/11.B0fQm_d5.js.gz +0 -0
  336. package/build/client/_app/immutable/nodes/12.DobuoNGx.js.br +0 -0
  337. package/build/client/_app/immutable/nodes/12.DobuoNGx.js.gz +0 -0
  338. package/build/client/_app/immutable/nodes/13.DrO72J_j.js.br +0 -0
  339. package/build/client/_app/immutable/nodes/13.DrO72J_j.js.gz +0 -0
  340. package/build/client/_app/immutable/nodes/14.B9bNPNMC.js.br +0 -0
  341. package/build/client/_app/immutable/nodes/14.B9bNPNMC.js.gz +0 -0
  342. package/build/client/_app/immutable/nodes/15.0P3R4toY.js.br +0 -0
  343. package/build/client/_app/immutable/nodes/15.0P3R4toY.js.gz +0 -0
  344. package/build/client/_app/immutable/nodes/16.BnUrhlYC.js.br +0 -0
  345. package/build/client/_app/immutable/nodes/16.BnUrhlYC.js.gz +0 -0
  346. package/build/client/_app/immutable/nodes/17.CHTdkvmi.js.br +0 -0
  347. package/build/client/_app/immutable/nodes/17.CHTdkvmi.js.gz +0 -0
  348. package/build/client/_app/immutable/nodes/19.BqId6Q50.js.br +0 -0
  349. package/build/client/_app/immutable/nodes/19.BqId6Q50.js.gz +0 -0
  350. package/build/client/_app/immutable/nodes/2.CEJmYaPJ.js.br +0 -0
  351. package/build/client/_app/immutable/nodes/2.CEJmYaPJ.js.gz +0 -0
  352. package/build/client/_app/immutable/nodes/20.CHH39Z2Z.js.br +0 -0
  353. package/build/client/_app/immutable/nodes/20.CHH39Z2Z.js.gz +0 -0
  354. package/build/client/_app/immutable/nodes/21.CbnS5dV1.js.br +0 -0
  355. package/build/client/_app/immutable/nodes/21.CbnS5dV1.js.gz +0 -0
  356. package/build/client/_app/immutable/nodes/22.malZaF0r.js.br +0 -0
  357. package/build/client/_app/immutable/nodes/22.malZaF0r.js.gz +0 -0
  358. package/build/client/_app/immutable/nodes/23.B-MnoGp_.js.br +0 -0
  359. package/build/client/_app/immutable/nodes/23.B-MnoGp_.js.gz +0 -0
  360. package/build/client/_app/immutable/nodes/24.D4YfUDkp.js.br +0 -0
  361. package/build/client/_app/immutable/nodes/24.D4YfUDkp.js.gz +0 -0
  362. package/build/client/_app/immutable/nodes/25.CGUyx5gm.js.br +0 -0
  363. package/build/client/_app/immutable/nodes/25.CGUyx5gm.js.gz +0 -0
  364. package/build/client/_app/immutable/nodes/26.CSoLyIuT.js.br +0 -0
  365. package/build/client/_app/immutable/nodes/26.CSoLyIuT.js.gz +0 -0
  366. package/build/client/_app/immutable/nodes/28.CnDXbxut.js.br +0 -0
  367. package/build/client/_app/immutable/nodes/28.CnDXbxut.js.gz +0 -0
  368. package/build/client/_app/immutable/nodes/3.7M8y-hh1.js.br +0 -0
  369. package/build/client/_app/immutable/nodes/3.7M8y-hh1.js.gz +0 -0
  370. package/build/client/_app/immutable/nodes/4.C-_GUkXF.js.br +0 -0
  371. package/build/client/_app/immutable/nodes/4.C-_GUkXF.js.gz +0 -0
  372. package/build/client/_app/immutable/nodes/6.BtFuhrhK.js.br +0 -0
  373. package/build/client/_app/immutable/nodes/6.BtFuhrhK.js.gz +0 -0
  374. package/build/client/_app/immutable/nodes/7.YcUXbAew.js.br +0 -0
  375. package/build/client/_app/immutable/nodes/7.YcUXbAew.js.gz +0 -0
  376. package/build/client/_app/immutable/nodes/8.DsZ8ckdf.js.br +0 -0
  377. package/build/client/_app/immutable/nodes/8.DsZ8ckdf.js.gz +0 -0
  378. package/build/client/_app/immutable/nodes/9.C_to2yZ7.js.br +0 -0
  379. package/build/client/_app/immutable/nodes/9.C_to2yZ7.js.gz +0 -0
@@ -1,9 +1,9 @@
1
1
  import { readFile, readdir, stat, open, realpath, mkdir, writeFile, rename, rm, access, constants, lstat, chmod, appendFile, mkdtemp } from 'node:fs/promises';
2
2
  import os, { homedir, tmpdir } from 'node:os';
3
3
  import path from 'node:path';
4
- import { v as version, d as defaultKeychain } from './keychain.js-B__X3k_t.js';
4
+ import { v as version, d as defaultKeychain } from './keychain.js-Cp8llbD0.js';
5
5
  import { readFileSync, existsSync, mkdirSync, writeFileSync, renameSync, openSync, closeSync, watch, statSync, fstatSync, readSync, accessSync, constants as constants$1, realpathSync, lstatSync, rmSync } from 'node:fs';
6
- import { spawn, execFileSync } from 'node:child_process';
6
+ import { spawn, execFileSync, execFile } from 'node:child_process';
7
7
  import { l as loopbackPreview, f as frameRefusal } from './preview.js-CbgkVvT_.js';
8
8
  import { p as previewNoteOf, a as pageOf } from './previewnote.js-DB6VK2fp.js';
9
9
  import { p as plainStatus, c as clean } from './plain.js-Dc97sYaJ.js';
@@ -15,6 +15,8 @@ import { s as shortTitle } from './format.js-D3lWEg6U.js';
15
15
  import { r as runStep, c as checksLine } from './checks.js-DGdGhp1G.js';
16
16
  import net, { createServer } from 'node:net';
17
17
  import { D as DECIDED_MAX, d as detectHosted, p as portInHost, h as hostedAddress } from './decisionform.js-Ds5LU9Wh.js';
18
+ import { p as parseHarness, H as HARNESS_NAMES } from './harness.js-DPojOlFJ.js';
19
+ import { d as defaultConfigDir, P as PluginConfigFile, a as PLUGINS_FILE, R as ROLES, b as SLOT_SCOPE, i as isEnabled, E as EMPTY_CONFIG, S as SLOTS, C as CAPABILITIES, c as chooseRole, e as changePlugin } from './config.js-CjvhJWDv.js';
18
20
  import { timingSafeEqual, randomBytes, randomUUID, createHash, createHmac } from 'node:crypto';
19
21
  import { T as TERMINAL_PATH, a as TERMINAL_PROTOCOL, b as TERMINAL_CLOSE, S as SETUP_TERMINAL_PATH, c as TOKEN_PROTOCOL_PREFIX } from './terminal.js-BUurgI6D.js';
20
22
  import WebSocket, { WebSocketServer } from 'ws';
@@ -22,7 +24,6 @@ import { r as roundId, t as testLine } from './buildlog.js-BCKtSKOt.js';
22
24
  import { a as alertsFor, r as raise, s as sessionAlert, d as digest, A as ALERT_KINDS } from './bell.js-DuW71LLn.js';
23
25
  import { C as CHOICES, N as NOTE_MAX, b as closable, p as picksLine, d as closeText, e as answerText, D as DECIDED_LABEL, f as choiceLabel, g as awaitsAnswer, o as optionsFor, h as holdCardId, q as questionLine, a as answerOf } from './inbox.js-CnikIOgr.js';
24
26
  import { D as DOC_EXT$1 } from './docpath.js-D27w_pf9.js';
25
- import { d as defaultConfigDir, P as PluginConfigFile, a as PLUGINS_FILE, R as ROLES, b as SLOT_SCOPE, i as isEnabled, E as EMPTY_CONFIG, S as SLOTS, C as CAPABILITIES, c as chooseRole, e as changePlugin } from './config.js-CjvhJWDv.js';
26
27
  import { d as defaultPluginsDir, r as readInstalled, S as SUPPORTED_API_VERSIONS, s as settingViews, m as manifestPath, p as parseManifest, f as fromExport } from './settings2.js-8JjZvg3U.js';
27
28
  import { pathToFileURL } from 'node:url';
28
29
  import { l as localhostName, m as matchHost, a as loopbackAddresses, v as validHostTemplate } from './addresses.js-DmMJzvLK.js';
@@ -31,7 +32,6 @@ import { p as projectTabHref, a as parseSlotKey } from './keys.js-iHygUPeb.js';
31
32
  import { v as validPullRequestQuery } from './pullrequests.js-CCzk2sqm.js';
32
33
  import { createServer as createServer$1 } from 'node:http';
33
34
  import { n as needsYou } from './harbour.js-D3N7u1_p.js';
34
- import { p as parseHarness, H as HARNESS_NAMES } from './harness.js-DPojOlFJ.js';
35
35
  import { R as ROLE_WORDS } from './words.js-DDFrKS99.js';
36
36
  import './urls.js-CM6aklCF.js';
37
37
  import './previewhelper.js-D_I_aa96.js';
@@ -3500,24 +3500,24 @@ function deriveLiveTask(task2, ctx, fmRoot) {
3500
3500
  shots: signals?.shots ?? []
3501
3501
  };
3502
3502
  }
3503
- function deriveBacklogTask(record, ctx, orphan) {
3504
- const ledger = ctx.ledger.get(record.id) ?? null;
3505
- const track = trackOf(record.kind ?? ledger?.dispatched?.kind ?? null);
3506
- const prUrl = record.prUrl ?? ledger?.merged?.pr ?? ledger?.prReady?.pr ?? null;
3503
+ function deriveBacklogTask(record2, ctx, orphan) {
3504
+ const ledger = ctx.ledger.get(record2.id) ?? null;
3505
+ const track = trackOf(record2.kind ?? ledger?.dispatched?.kind ?? null);
3506
+ const prUrl = record2.prUrl ?? ledger?.merged?.pr ?? ledger?.prReady?.pr ?? null;
3507
3507
  let status2;
3508
3508
  let summary2 = null;
3509
3509
  let attention = null;
3510
- if (record.state === "done" || track === "ship" && ledger?.merged) {
3510
+ if (record2.state === "done" || track === "ship" && ledger?.merged) {
3511
3511
  status2 = "landed";
3512
- const verb = record.completion.verb || (record.state === "done" ? "done" : "merged");
3513
- const when = ledger?.merged ? ageText(Math.max(0, ctx.nowSeconds - ledger.merged.ts)) : record.completion.date ? `on ${record.completion.date}` : null;
3512
+ const verb = record2.completion.verb || (record2.state === "done" ? "done" : "merged");
3513
+ const when = ledger?.merged ? ageText(Math.max(0, ctx.nowSeconds - ledger.merged.ts)) : record2.completion.date ? `on ${record2.completion.date}` : null;
3514
3514
  summary2 = when ? `${verb[0].toUpperCase()}${verb.slice(1)} ${when}.` : null;
3515
- } else if (record.captainActionable) {
3515
+ } else if (record2.captainActionable) {
3516
3516
  status2 = "needs-decision";
3517
3517
  attention = {
3518
3518
  kind: "decision",
3519
3519
  owner: "captain",
3520
- text: record.holdReason ?? "Firstmate is holding this for you.",
3520
+ text: record2.holdReason ?? "Firstmate is holding this for you.",
3521
3521
  url: null
3522
3522
  };
3523
3523
  summary2 = attention.text;
@@ -3526,12 +3526,12 @@ function deriveBacklogTask(record, ctx, orphan) {
3526
3526
  summary2 = "Firstmate lists this as in flight, but has no worker record for it.";
3527
3527
  } else {
3528
3528
  status2 = "queued";
3529
- summary2 = record.unresolvedBlockerIds.length ? `Waiting on ${record.unresolvedBlockerIds.join(", ")}.` : "Not started yet.";
3529
+ summary2 = record2.unresolvedBlockerIds.length ? `Waiting on ${record2.unresolvedBlockerIds.join(", ")}.` : "Not started yet.";
3530
3530
  }
3531
- const projectId = record.repo ?? ledger?.dispatched?.project ?? UNASSIGNED;
3531
+ const projectId = record2.repo ?? ledger?.dispatched?.project ?? UNASSIGNED;
3532
3532
  const passage = (ctx.stagesFor ?? stagesFor)(projectId).passage({
3533
3533
  track,
3534
- backlogState: record.state,
3534
+ backlogState: record2.state,
3535
3535
  live: false,
3536
3536
  crewState: null,
3537
3537
  crewSource: null,
@@ -3539,20 +3539,20 @@ function deriveBacklogTask(record, ctx, orphan) {
3539
3539
  yolo: null,
3540
3540
  prUrl,
3541
3541
  prReady: false,
3542
- merged: record.state === "done" || ledger?.merged !== null && ledger?.merged !== void 0,
3542
+ merged: record2.state === "done" || ledger?.merged !== null && ledger?.merged !== void 0,
3543
3543
  reportPresent: false,
3544
- captainHold: record.captainActionable,
3545
- taskId: record.id,
3546
- landedAt: landedAt(ledger, record.state === "done" ? record.completion.date : null),
3544
+ captainHold: record2.captainActionable,
3545
+ taskId: record2.id,
3546
+ landedAt: landedAt(ledger, record2.state === "done" ? record2.completion.date : null),
3547
3547
  preview: previewFact(ledger)
3548
3548
  });
3549
- const title = record.title ?? record.id;
3549
+ const title = record2.title ?? record2.id;
3550
3550
  return {
3551
- id: record.id,
3551
+ id: record2.id,
3552
3552
  title,
3553
3553
  shortTitle: shortTitle(title, projectId),
3554
3554
  projectId,
3555
- kind: record.kind,
3555
+ kind: record2.kind,
3556
3556
  track,
3557
3557
  status: status2,
3558
3558
  statusLabel: STATUS_LABEL[status2],
@@ -3560,10 +3560,10 @@ function deriveBacklogTask(record, ctx, orphan) {
3560
3560
  runs: track === "ship" && prUrl ? taskRuns({
3561
3561
  prUrl,
3562
3562
  ledger,
3563
- feedback: ctx.review?.get(record.id)?.feedback ?? null,
3563
+ feedback: ctx.review?.get(record2.id)?.feedback ?? null,
3564
3564
  sent: ctx.sent ?? [],
3565
- taskId: record.id,
3566
- merged: record.state === "done" || !!ledger?.merged
3565
+ taskId: record2.id,
3566
+ merged: record2.state === "done" || !!ledger?.merged
3567
3567
  }) : null,
3568
3568
  summary: summary2,
3569
3569
  summaryIsHistory: false,
@@ -3578,32 +3578,32 @@ function deriveBacklogTask(record, ctx, orphan) {
3578
3578
  attention,
3579
3579
  current: null,
3580
3580
  pr: prUrl ? { url: prUrl, number: prNumber(prUrl) } : null,
3581
- since: record.since,
3582
- completedOn: record.state === "done" ? record.completion.date : null,
3581
+ since: record2.since,
3582
+ completedOn: record2.state === "done" ? record2.completion.date : null,
3583
3583
  mergedAt: ledger?.merged ? isoSeconds(ledger.merged.ts) : null,
3584
3584
  preview: preview(ledger),
3585
3585
  board: board(ledger),
3586
- blockedBy: record.unresolvedBlockerIds,
3586
+ blockedBy: record2.unresolvedBlockerIds,
3587
3587
  hasReport: false,
3588
3588
  outputAvailable: false,
3589
- outputNote: record.state === "done" ? "This task has landed; its worker is gone." : "No worker is running for this task.",
3590
- thumb: ctx.thumbs.get(record.id) ?? { kind: "none" },
3591
- screenshots: ctx.review?.get(record.id)?.screenshots ?? 0,
3592
- shots: ctx.review?.get(record.id)?.shots ?? []
3589
+ outputNote: record2.state === "done" ? "This task has landed; its worker is gone." : "No worker is running for this task.",
3590
+ thumb: ctx.thumbs.get(record2.id) ?? { kind: "none" },
3591
+ screenshots: ctx.review?.get(record2.id)?.screenshots ?? 0,
3592
+ shots: ctx.review?.get(record2.id)?.shots ?? []
3593
3593
  };
3594
3594
  }
3595
3595
  function backlogOnly(snapshot) {
3596
3596
  const live = new Set(snapshot.tasks.map((t) => t.id));
3597
3597
  const orphans = new Set(snapshot.orphanInFlight);
3598
- return snapshot.backlog.records.filter((r) => !live.has(r.id) && r.kind !== "secondmate").filter((r) => r.state === "queued" || r.state === "done" || orphans.has(r.id)).map((record) => ({ record, orphan: orphans.has(record.id) }));
3598
+ return snapshot.backlog.records.filter((r) => !live.has(r.id) && r.kind !== "secondmate").filter((r) => r.state === "queued" || r.state === "done" || orphans.has(r.id)).map((record2) => ({ record: record2, orphan: orphans.has(record2.id) }));
3599
3599
  }
3600
3600
  const isSecondMateRow = (t) => t.kind === "secondmate";
3601
3601
  function deriveTasks(snapshot, ctx) {
3602
3602
  const fmRoot = snapshot.roots.fmRoot;
3603
3603
  const rows = snapshot.tasks.filter((t) => !isSecondMateRow(t));
3604
3604
  const tasks = rows.map((t) => deriveLiveTask(t, ctx, fmRoot));
3605
- for (const { record, orphan } of backlogOnly(snapshot)) {
3606
- tasks.push(deriveBacklogTask(record, ctx, orphan));
3605
+ for (const { record: record2, orphan } of backlogOnly(snapshot)) {
3606
+ tasks.push(deriveBacklogTask(record2, ctx, orphan));
3607
3607
  }
3608
3608
  const paths = /* @__PURE__ */ new Map();
3609
3609
  for (const t of rows) {
@@ -4106,8 +4106,8 @@ class EvidenceReader {
4106
4106
  });
4107
4107
  }
4108
4108
  return this.prs.get(`${id} ${url}`, async () => {
4109
- const cached = await this.contributions(id, url);
4110
- if (cached) return cached;
4109
+ const cached2 = await this.contributions(id, url);
4110
+ if (cached2) return cached2;
4111
4111
  if (!this.useGh) {
4112
4112
  return { available: false, reason: "No cached PR observation from Firstmate." };
4113
4113
  }
@@ -5862,11 +5862,17 @@ function writeRemembered(configDir, r) {
5862
5862
  `, { mode: 420 });
5863
5863
  renameSync(tmp, file);
5864
5864
  }
5865
- const NAME = "manage-wheelhouse";
5866
- const RECEIPT = ".wheelhouse-managed.json";
5867
- const FILES = ["SKILL.md", "references/operations.md"];
5868
- const hash = (text2) => createHash("sha256").update(text2).digest("hex");
5869
5865
  const REVIEW_SURFACE_MARKER = "<!-- wheelhouse:review-surface -->";
5866
+ const SKILLS = [
5867
+ {
5868
+ name: "manage-wheelhouse",
5869
+ files: ["SKILL.md", "references/operations.md"],
5870
+ assumptions: [
5871
+ { file: "bin/fm-inbox.sh", marker: "fm-inbox.sh reply" },
5872
+ { file: "bin/fm-inbox.sh", marker: "fm-inbox.sh receipts" }
5873
+ ]
5874
+ }
5875
+ ];
5870
5876
  const plain = (s) => s.replace(/[^\p{L}\p{N} ._()-]+/gu, " ").replace(/\s+/g, " ").trim().slice(0, 60) || "the plugin";
5871
5877
  function reviewSurfaceSection(surface) {
5872
5878
  if (!surface) {
@@ -5887,7 +5893,29 @@ function reviewSurfaceSection(surface) {
5887
5893
  `- Wheelhouse rewrites this section whenever the role changes: the captain chooses another plugin or the built-in, or turns ${name2} off or removes it.`
5888
5894
  ].join("\n");
5889
5895
  }
5890
- const renderSkill = (text2, surface) => text2.replace(REVIEW_SURFACE_MARKER, () => reviewSurfaceSection(surface));
5896
+ async function renderSkill(skillsRoot, skill, inputs) {
5897
+ const tree = {};
5898
+ for (const file of skill.files) {
5899
+ const text2 = await readFile(path.join(skillsRoot, skill.name, file), "utf8");
5900
+ tree[file] = file === "SKILL.md" ? text2.replace(REVIEW_SURFACE_MARKER, () => reviewSurfaceSection(inputs.reviewSurface)) : text2;
5901
+ }
5902
+ return tree;
5903
+ }
5904
+ const sha256 = (text2) => createHash("sha256").update(text2).digest("hex");
5905
+ const hashTree = (tree) => Object.fromEntries(Object.entries(tree).map(([file, text2]) => [file, sha256(text2)]));
5906
+ function sameHashes(a, b) {
5907
+ const keys = Object.keys(a);
5908
+ return keys.length === Object.keys(b).length && keys.every((k) => b[k] === a[k]);
5909
+ }
5910
+ async function present(file) {
5911
+ try {
5912
+ await lstat(file);
5913
+ return true;
5914
+ } catch (e) {
5915
+ if (e.code === "ENOENT") return false;
5916
+ throw e;
5917
+ }
5918
+ }
5891
5919
  async function physical(file) {
5892
5920
  try {
5893
5921
  return await realpath(file);
@@ -5898,161 +5926,436 @@ async function physical(file) {
5898
5926
  return path.join(await physical(parent), path.basename(file));
5899
5927
  }
5900
5928
  }
5901
- async function present(file) {
5902
- try {
5903
- await lstat(file);
5904
- return true;
5905
- } catch (e) {
5906
- if (e.code === "ENOENT") return false;
5907
- throw e;
5929
+ async function insideAny(targets, protectedDirs) {
5930
+ const real2 = await Promise.all(targets.map(physical));
5931
+ for (const dir of protectedDirs) {
5932
+ const p = await physical(path.resolve(dir));
5933
+ if (real2.some((t) => t === p || t.startsWith(p + path.sep))) return true;
5908
5934
  }
5935
+ return false;
5909
5936
  }
5910
- async function contents(dir, prefix = "") {
5911
- const result2 = {};
5937
+ async function readTree(dir, prefix = "") {
5938
+ const tree = {};
5912
5939
  for (const entry of await readdir(dir, { withFileTypes: true })) {
5913
5940
  const rel = prefix + entry.name;
5914
5941
  if (entry.isDirectory())
5915
- Object.assign(result2, await contents(path.join(dir, entry.name), rel + "/"));
5916
- else if (entry.isFile()) result2[rel] = hash(await readFile(path.join(dir, entry.name), "utf8"));
5917
- else throw new Error("The skill contains a symbolic link or special file.");
5918
- }
5919
- return result2;
5942
+ Object.assign(tree, await readTree(path.join(dir, entry.name), rel + "/"));
5943
+ else if (entry.isFile()) tree[rel] = await readFile(path.join(dir, entry.name), "utf8");
5944
+ else throw new Error(`${rel} is a symbolic link or special file.`);
5945
+ }
5946
+ return tree;
5947
+ }
5948
+ async function writeTree(dir, tree) {
5949
+ for (const [file, text2] of Object.entries(tree)) {
5950
+ await mkdir(path.dirname(path.join(dir, file)), { recursive: true });
5951
+ await writeFile(path.join(dir, file), text2);
5952
+ }
5953
+ }
5954
+ async function replaceTree(dir, tree) {
5955
+ const stage2 = `${dir}.new-${process.pid}-${Date.now()}`;
5956
+ await rm(stage2, { recursive: true, force: true });
5957
+ await writeTree(stage2, tree);
5958
+ await mkdir(stage2, { recursive: true });
5959
+ await rm(dir, { recursive: true, force: true });
5960
+ await rename(stage2, dir);
5961
+ }
5962
+ async function writeAtomic$1(file, text2, mode = 384) {
5963
+ await mkdir(path.dirname(file), { recursive: true });
5964
+ const tmp = `${file}.${process.pid}-${Date.now()}.tmp`;
5965
+ await writeFile(tmp, text2, { mode });
5966
+ await rename(tmp, file);
5967
+ }
5968
+ const MANIFEST_SCHEMA = "wheelhouse-material.v1";
5969
+ const materialDir = (configDir) => path.join(configDir, "agent-material");
5970
+ const manifestFile = (dir) => path.join(dir, "manifest.json");
5971
+ const settingsFile = (dir) => path.join(dir, "settings.json");
5972
+ const folder = (id) => id.replace(/[^A-Za-z0-9@._-]/g, "_");
5973
+ const baseDir = (dir, id) => path.join(dir, "base", folder(id));
5974
+ const proposedDir = (dir, id) => path.join(dir, "proposed", folder(id));
5975
+ function emptyManifest(version2, harness) {
5976
+ return {
5977
+ schema: MANIFEST_SCHEMA,
5978
+ wheelhouse: { version: version2 },
5979
+ firstmate: null,
5980
+ render: { reviewSurface: null, harness },
5981
+ items: {},
5982
+ history: []
5983
+ };
5984
+ }
5985
+ function valid(m) {
5986
+ const x = m;
5987
+ return !!x && x.schema === MANIFEST_SCHEMA && typeof x.items === "object" && x.items !== null && Array.isArray(x.history) && typeof x.render === "object" && x.render !== null;
5920
5988
  }
5921
- async function inspect(target, hashes) {
5922
- if (!await present(target)) return "absent";
5989
+ async function readManifest(dir, look = false) {
5990
+ const file = manifestFile(dir);
5991
+ let text2;
5992
+ try {
5993
+ text2 = await readFile(file, "utf8");
5994
+ } catch (e) {
5995
+ if (e.code === "ENOENT") return null;
5996
+ throw e;
5997
+ }
5923
5998
  try {
5924
- if (!(await lstat(target)).isDirectory()) return "foreign";
5925
- const receipt = JSON.parse(await readFile(path.join(target, RECEIPT), "utf8"));
5926
- const actual = await contents(target);
5927
- delete actual[RECEIPT];
5928
- const unchanged = receipt.schema === "wheelhouse-skill.v1" && receipt.files && Object.keys(actual).length === Object.keys(receipt.files).length && Object.entries(actual).every(([file, digest2]) => receipt.files[file] === digest2);
5929
- if (!unchanged) return "foreign";
5930
- return receipt.version === version && Object.keys(actual).length === Object.keys(hashes).length && Object.entries(hashes).every(([file, digest2]) => actual[file] === digest2) ? "current" : "managed";
5999
+ const m = JSON.parse(text2);
6000
+ if (valid(m)) return m;
5931
6001
  } catch {
5932
- return await present(target) ? "foreign" : "absent";
5933
6002
  }
6003
+ if (!look) await rename(file, `${file}.invalid-${Date.now()}`);
6004
+ return null;
5934
6005
  }
5935
- async function installWheelhouseSkill(install, env, sourceDir = env.WHEELHOUSE_INSTALL_DIR ? path.join(env.WHEELHOUSE_INSTALL_DIR, "skills", NAME) : void 0, surface = null) {
5936
- if (env.WHEELHOUSE_MANAGE_SKILL === "0")
5937
- return { state: "disabled", message: "Wheelhouse skill installation is disabled." };
5938
- if (!sourceDir)
5939
- return {
5940
- state: "disabled",
5941
- message: "Wheelhouse skill is left as it is: only the packaged Wheelhouse server installs it."
5942
- };
5943
- const parent = path.resolve(
5944
- env.CLAUDE_CONFIG_DIR || path.join(env.HOME || homedir(), ".claude"),
5945
- "skills"
5946
- );
5947
- const target = path.join(parent, NAME);
5948
- const current = {
5949
- state: "current",
5950
- message: `Wheelhouse skill is current at ${target}.`
5951
- };
5952
- let stage2 = null;
6006
+ async function writeManifest(dir, m) {
6007
+ m.history = m.history.slice(-50);
6008
+ await writeAtomic$1(manifestFile(dir), JSON.stringify(m, null, 2) + "\n");
6009
+ }
6010
+ const saveBase = (dir, id, tree) => replaceTree(baseDir(dir, id), tree);
6011
+ async function saveProposed(dir, id, tree) {
6012
+ if (tree) await replaceTree(proposedDir(dir, id), tree);
6013
+ else await rm(proposedDir(dir, id), { recursive: true, force: true });
6014
+ }
6015
+ async function readOff(dir) {
5953
6016
  try {
5954
- const destinations = [await physical(parent), await physical(target)];
5955
- for (const dir of [install.firstmateDir, install.homeDir]) {
5956
- const protectedDir = await physical(path.resolve(dir));
5957
- if (destinations.some(
5958
- (destination) => destination === protectedDir || destination.startsWith(protectedDir + path.sep)
5959
- ))
5960
- return {
5961
- state: "skipped",
5962
- message: `Left ${target} unchanged: user skills location is inside Firstmate's checkout or home.`
5963
- };
5964
- }
5965
- await mkdir(parent, { recursive: true });
5966
- const files = Object.fromEntries(
5967
- await Promise.all(
5968
- FILES.map(async (file) => {
5969
- const text2 = await readFile(path.join(sourceDir, file), "utf8");
5970
- return [file, file === "SKILL.md" ? renderSkill(text2, surface) : text2];
5971
- })
5972
- )
5973
- );
5974
- const hashes = Object.fromEntries(
5975
- Object.entries(files).map(([file, text2]) => [file, hash(text2)])
5976
- );
5977
- const found = await inspect(target, hashes);
5978
- if (found === "current") return current;
5979
- if (found === "foreign")
5980
- return {
5981
- state: "skipped",
5982
- message: `Left ${target} unchanged: locally edited or not managed by Wheelhouse. Move it aside to install the bundled skill.`
5983
- };
5984
- let now = found;
5985
- const exists2 = found === "managed";
5986
- stage2 = await mkdtemp(path.join(parent, ".wheelhouse-skill-"));
5987
- for (const [file, text2] of Object.entries(files)) {
5988
- await mkdir(path.dirname(path.join(stage2, file)), { recursive: true });
5989
- await writeFile(path.join(stage2, file), text2);
5990
- }
5991
- await writeFile(
5992
- path.join(stage2, RECEIPT),
5993
- JSON.stringify({ schema: "wheelhouse-skill.v1", version, files: hashes }) + "\n"
6017
+ const s = JSON.parse(await readFile(settingsFile(dir), "utf8"));
6018
+ return new Set(
6019
+ Object.entries(s.items ?? {}).filter(([, on]) => on === false).map(([id]) => id)
5994
6020
  );
6021
+ } catch {
6022
+ return /* @__PURE__ */ new Set();
6023
+ }
6024
+ }
6025
+ const chains = /* @__PURE__ */ new Map();
6026
+ function serialize(dir, work) {
6027
+ const prev = chains.get(dir) ?? Promise.resolve();
6028
+ const run = prev.then(work, work);
6029
+ const settled2 = run.catch(() => {
6030
+ });
6031
+ chains.set(dir, settled2);
6032
+ void settled2.then(() => {
6033
+ if (chains.get(dir) === settled2) chains.delete(dir);
6034
+ });
6035
+ return run;
6036
+ }
6037
+ const RECEIPT = ".wheelhouse-managed.json";
6038
+ const RECEIPT_SCHEMA = "wheelhouse-skill.v1";
6039
+ function receiptHashes(text2) {
6040
+ try {
6041
+ const r = JSON.parse(text2);
6042
+ if (r.schema !== RECEIPT_SCHEMA || !r.files || typeof r.files !== "object") return null;
6043
+ const files = Object.entries(r.files);
6044
+ return files.every(([, v]) => typeof v === "string") ? r.files : null;
6045
+ } catch {
6046
+ return null;
6047
+ }
6048
+ }
6049
+ async function readLocal(target) {
6050
+ try {
6051
+ if (!await present(target)) return { kind: "absent" };
6052
+ if (!(await lstat(target)).isDirectory())
6053
+ return { kind: "unreadable", reason: "it is a symbolic link or not a folder" };
6054
+ const tree = await readTree(target);
6055
+ const receipt = RECEIPT in tree ? receiptHashes(tree[RECEIPT]) : null;
6056
+ delete tree[RECEIPT];
6057
+ return { kind: "files", tree, receipt };
6058
+ } catch (e) {
6059
+ if (!await present(target).catch(() => true)) return { kind: "absent" };
6060
+ return { kind: "unreadable", reason: e.message };
6061
+ }
6062
+ }
6063
+ const receiptText = (version2, hashes) => JSON.stringify({ schema: RECEIPT_SCHEMA, version: version2, files: hashes }) + "\n";
6064
+ async function swapIn(target, tree, receipt, check2) {
6065
+ const parent = path.dirname(target);
6066
+ await mkdir(parent, { recursive: true });
6067
+ const stage2 = await mkdtemp(path.join(parent, ".wheelhouse-skill-"));
6068
+ let placed = false;
6069
+ try {
6070
+ await writeTree(stage2, tree);
6071
+ await writeFile(path.join(stage2, RECEIPT), receipt);
5995
6072
  const backup = stage2 + "-previous";
5996
6073
  for (let attempt2 = 1; ; attempt2++) {
5997
- let error = new Error("another copy appeared while installing");
5998
- if (now !== "foreign")
5999
- try {
6000
- if (now === "managed") await rename(target, backup);
6001
- await rename(stage2, target);
6002
- break;
6003
- } catch (e) {
6004
- error = e;
6005
- await rename(backup, target).catch(() => {
6006
- });
6007
- } finally {
6008
- await rm(backup, { recursive: true, force: true });
6009
- }
6010
- now = await inspect(target, hashes);
6011
- if (now === "current") return current;
6012
- if (attempt2 === 20) throw error;
6074
+ const now = await readLocal(target);
6075
+ const verdict = check2(now);
6076
+ if (verdict !== "replace") return verdict;
6077
+ try {
6078
+ if (now.kind !== "absent") await rename(target, backup);
6079
+ await rename(stage2, target);
6080
+ placed = true;
6081
+ return "swapped";
6082
+ } catch (e) {
6083
+ await rename(backup, target).catch(() => {
6084
+ });
6085
+ if (attempt2 === 20) throw e;
6086
+ } finally {
6087
+ await rm(backup, { recursive: true, force: true });
6088
+ }
6013
6089
  await new Promise((resolve) => setTimeout(resolve, 10 * attempt2));
6014
6090
  }
6015
- stage2 = null;
6016
- return {
6017
- state: exists2 ? "updated" : "installed",
6018
- message: `Wheelhouse skill ${exists2 ? "updated" : "installed"} at ${target}.`
6019
- };
6020
- } catch (e) {
6021
- return {
6022
- state: "error",
6023
- message: `Could not install Wheelhouse skill at ${target}: ${e.message}`
6024
- };
6025
6091
  } finally {
6026
- if (stage2) await rm(stage2, { recursive: true, force: true });
6092
+ if (!placed) await rm(stage2, { recursive: true, force: true });
6093
+ }
6094
+ }
6095
+ function skillRootDir(root, env) {
6096
+ const home = env.HOME || homedir();
6097
+ return root === "claude" ? path.resolve(env.CLAUDE_CONFIG_DIR || path.join(home, ".claude"), "skills") : path.resolve(home, ".agents", "skills");
6098
+ }
6099
+ const rootsFor = (harness) => harness === "claude" ? ["claude"] : ["claude", "agents"];
6100
+ const skillId = (name2, root) => `skill:${name2}@${root}`;
6101
+ function plannedSkills(env, harness) {
6102
+ return SKILLS.flatMap(
6103
+ (skill) => rootsFor(harness).map((root) => ({
6104
+ id: skillId(skill.name, root),
6105
+ skill,
6106
+ target: path.join(skillRootDir(root, env), skill.name)
6107
+ }))
6108
+ );
6109
+ }
6110
+ function decide(o) {
6111
+ if (o.local === "unreadable") return "foreign";
6112
+ if (o.local === null) return "install";
6113
+ if (!o.bases.length) return "foreign";
6114
+ const local = o.local;
6115
+ if (sameHashes(local, o.next)) return "current";
6116
+ if (o.kept && sameHashes(local, o.kept.local) && sameHashes(o.next, o.kept.next)) return "kept";
6117
+ return o.bases.some((b) => sameHashes(local, b)) ? "update" : "modified";
6118
+ }
6119
+ const AS_STATE = {
6120
+ install: "installed",
6121
+ update: "updated",
6122
+ current: "current",
6123
+ kept: "kept",
6124
+ modified: "modified",
6125
+ foreign: "foreign"
6126
+ };
6127
+ const localHashes = (l) => l.kind === "absent" ? null : l.kind === "unreadable" ? "unreadable" : hashTree(l.tree);
6128
+ function message$3(state, id, target, detail) {
6129
+ switch (state) {
6130
+ case "installed":
6131
+ return `Wheelhouse skill installed at ${target}.`;
6132
+ case "updated":
6133
+ return `Wheelhouse skill updated at ${target}.`;
6134
+ case "current":
6135
+ return `Wheelhouse skill is current at ${target}.`;
6136
+ case "kept":
6137
+ return `Wheelhouse skill at ${target} keeps its local edits, as asked.`;
6138
+ case "modified":
6139
+ return `Left ${target} unchanged: it was locally edited${detail ? ` (${detail})` : ""}. \`wheelhouse skills diff ${id}\` compares it with this version; \`accept\` or \`keep\` settles it.`;
6140
+ case "foreign":
6141
+ return `Left ${target} unchanged: not managed by Wheelhouse${detail ? ` (${detail})` : ""}. \`wheelhouse skills adopt ${id}\` replaces it with the bundled version.`;
6142
+ case "refused":
6143
+ return `Left ${target} unchanged: ${detail ?? "it is inside Firstmate's checkout or home"}.`;
6144
+ case "off":
6145
+ return `${id} is turned off; \`wheelhouse skills sync ${id}\` turns it on again.`;
6146
+ case "error":
6147
+ return `Could not install Wheelhouse skill at ${target}: ${detail}`;
6148
+ }
6149
+ }
6150
+ function record(m, id, kind, target, bundle, version2, files, now) {
6151
+ m.items[id] = { id, kind, target, bundle, version: version2, files, writtenAt: now.toISOString() };
6152
+ }
6153
+ async function syncSkill(ctx, dir, m, item, tree, dryRun) {
6154
+ const { id, target } = item;
6155
+ const result2 = (state, detail) => ({
6156
+ id,
6157
+ kind: "skill-dir",
6158
+ target,
6159
+ state,
6160
+ message: message$3(state, id, target, detail)
6161
+ });
6162
+ if (await insideAny([path.dirname(target), target], [ctx.install.firstmateDir, ctx.install.homeDir]))
6163
+ return result2("refused", "user skills location is inside Firstmate's checkout or home");
6164
+ const next = hashTree(tree);
6165
+ const rec = m.items[id];
6166
+ const verdict = (l) => decide({
6167
+ local: localHashes(l),
6168
+ next,
6169
+ bases: [rec?.files, l.kind === "files" ? l.receipt : null].filter((b) => !!b),
6170
+ kept: rec?.kept
6171
+ });
6172
+ const now = await readLocal(target);
6173
+ const first = verdict(now);
6174
+ const at = ctx.now?.() ?? /* @__PURE__ */ new Date();
6175
+ if (dryRun) {
6176
+ return result2(AS_STATE[first], now.kind === "unreadable" ? now.reason : void 0);
6177
+ }
6178
+ if (first === "install" || first === "update") {
6179
+ const outcome = await swapIn(target, tree, receiptText(ctx.version, next), (l) => {
6180
+ const v = verdict(l);
6181
+ return v === "install" || v === "update" ? "replace" : v === "current" ? "done" : "stop";
6182
+ });
6183
+ if (outcome === "stop") return syncSkill(ctx, dir, m, item, tree, dryRun);
6184
+ record(m, id, "skill-dir", target, item.skill.name, ctx.version, next, at);
6185
+ await saveBase(dir, id, tree);
6186
+ await saveProposed(dir, id, null);
6187
+ return result2(
6188
+ outcome === "swapped" ? first === "install" ? "installed" : "updated" : "current"
6189
+ );
6190
+ }
6191
+ if (first === "current") {
6192
+ if (!rec || !sameHashes(rec.files, next) || rec.kept) {
6193
+ record(m, id, "skill-dir", target, item.skill.name, ctx.version, next, at);
6194
+ await saveBase(dir, id, tree);
6195
+ }
6196
+ await saveProposed(dir, id, null);
6197
+ return result2("current");
6198
+ }
6199
+ if (first === "modified") {
6200
+ if (!rec && now.kind === "files" && now.receipt)
6201
+ record(m, id, "skill-dir", target, item.skill.name, "unknown", now.receipt, at);
6202
+ await saveProposed(dir, id, tree);
6203
+ return result2("modified");
6204
+ }
6205
+ return result2(first, now.kind === "unreadable" ? now.reason : void 0);
6206
+ }
6207
+ function gitHead(dir) {
6208
+ return new Promise(
6209
+ (resolve) => execFile(
6210
+ "git",
6211
+ ["-C", dir, "rev-parse", "HEAD"],
6212
+ { timeout: 5e3 },
6213
+ (error, stdout) => resolve(error ? null : stdout.trim() || null)
6214
+ )
6215
+ );
6216
+ }
6217
+ async function checkAssumptions(firstmateDir) {
6218
+ const checks = [];
6219
+ const seen = /* @__PURE__ */ new Set();
6220
+ for (const a of SKILLS.flatMap((s) => s.assumptions)) {
6221
+ const key = `${a.file}\0${a.marker}`;
6222
+ if (seen.has(key)) continue;
6223
+ seen.add(key);
6224
+ let text2 = "";
6225
+ try {
6226
+ text2 = await readFile(path.join(firstmateDir, a.file), "utf8");
6227
+ } catch {
6228
+ }
6229
+ checks.push({ ...a, present: text2.includes(a.marker) });
6027
6230
  }
6231
+ return checks;
6232
+ }
6233
+ function summary$1(items, drift) {
6234
+ const notable = items.filter((i) => i.state !== "current" && i.state !== "off");
6235
+ const lines = (notable.length ? notable : items).map((i) => i.message);
6236
+ if (drift.length)
6237
+ lines.push(
6238
+ `Firstmate's checkout no longer has ${drift.map((d) => `\`${d.marker}\` in ${d.file}`).join(", ")}, which the bundled skills rely on; they may describe it wrongly until Wheelhouse is updated.`
6239
+ );
6240
+ const state = items.some((i) => i.state === "error") ? "error" : drift.length || items.some((i) => i.state === "modified" || i.state === "foreign" || i.state === "refused") ? "attention" : "ok";
6241
+ return { state, message: lines.join(" ") || "Wheelhouse installs nothing here.", items, drift };
6242
+ }
6243
+ const disabled = (message2) => ({
6244
+ state: "disabled",
6245
+ message: message2,
6246
+ items: [],
6247
+ drift: []
6248
+ });
6249
+ async function syncMaterial(ctx, inputs, opts = {}) {
6250
+ if (ctx.env.WHEELHOUSE_MANAGE_SKILL === "0")
6251
+ return disabled("Wheelhouse skill installation is disabled.");
6252
+ if (!ctx.skillsRoot)
6253
+ return disabled(
6254
+ "Wheelhouse skill is left as it is: only the packaged Wheelhouse server installs it."
6255
+ );
6256
+ const skillsRoot = ctx.skillsRoot;
6257
+ const dir = materialDir(ctx.configDir);
6258
+ const dryRun = opts.dryRun ?? false;
6259
+ return serialize(dir, async () => {
6260
+ const m = await readManifest(dir, dryRun) ?? emptyManifest(ctx.version, inputs.harness);
6261
+ const off2 = await readOff(dir);
6262
+ const items = [];
6263
+ const trees = /* @__PURE__ */ new Map();
6264
+ for (const item of plannedSkills(ctx.env, inputs.harness)) {
6265
+ if (opts.only && !opts.only.includes(item.id)) continue;
6266
+ if (off2.has(item.id)) {
6267
+ items.push({
6268
+ id: item.id,
6269
+ kind: "skill-dir",
6270
+ target: item.target,
6271
+ state: "off",
6272
+ message: message$3("off", item.id, item.target)
6273
+ });
6274
+ continue;
6275
+ }
6276
+ let tree = trees.get(item.skill.name);
6277
+ if (!tree) {
6278
+ tree = await renderSkill(skillsRoot, item.skill, inputs).catch((e) => e);
6279
+ trees.set(item.skill.name, tree);
6280
+ }
6281
+ try {
6282
+ if (tree instanceof Error) throw tree;
6283
+ items.push(await syncSkill(ctx, dir, m, item, tree, dryRun));
6284
+ } catch (e) {
6285
+ items.push({
6286
+ id: item.id,
6287
+ kind: "skill-dir",
6288
+ target: item.target,
6289
+ state: "error",
6290
+ message: message$3("error", item.id, item.target, e.message)
6291
+ });
6292
+ }
6293
+ }
6294
+ const assumptions = await checkAssumptions(ctx.install.firstmateDir);
6295
+ const drift = assumptions.filter((a) => !a.present);
6296
+ if (!dryRun) {
6297
+ const now = (ctx.now?.() ?? /* @__PURE__ */ new Date()).toISOString();
6298
+ m.firstmate = {
6299
+ dir: ctx.install.firstmateDir,
6300
+ home: ctx.install.homeDir,
6301
+ commit: await (ctx.commit ?? gitHead)(ctx.install.firstmateDir),
6302
+ checkedAt: now,
6303
+ assumptions
6304
+ };
6305
+ m.render = { reviewSurface: inputs.reviewSurface, harness: inputs.harness };
6306
+ const changes = items.filter((i) => i.state === "installed" || i.state === "updated").map((i) => ({ id: i.id, state: i.state }));
6307
+ if (changes.length) m.history.push({ at: now, version: ctx.version, changes });
6308
+ m.wheelhouse = { version: ctx.version };
6309
+ try {
6310
+ await writeManifest(dir, m);
6311
+ } catch (e) {
6312
+ return {
6313
+ ...summary$1(items, drift),
6314
+ state: "error",
6315
+ message: `Could not record Wheelhouse's agent material in ${dir}: ${e.message}`
6316
+ };
6317
+ }
6318
+ }
6319
+ return summary$1(items, drift);
6320
+ }).catch((e) => ({
6321
+ state: "error",
6322
+ message: `Could not sync Wheelhouse's agent material in ${dir}: ${e.message}`,
6323
+ items: [],
6324
+ drift: []
6325
+ }));
6326
+ }
6327
+ function reviewSurfaceOf(active, statuses) {
6328
+ if (!active) return null;
6329
+ const status2 = statuses.find((s) => s.id === active.id && s.state === "loaded");
6330
+ return { id: active.id, name: active.name, repository: status2?.repository ?? null };
6028
6331
  }
6029
6332
  const RETRY_MS = 6e4;
6030
- class SkillSync {
6031
- constructor(surface, install, log = () => {
6333
+ class MaterialSync {
6334
+ constructor(inputs, run, log = () => {
6032
6335
  }, now = Date.now) {
6033
- this.surface = surface;
6034
- this.install = install;
6336
+ this.inputs = inputs;
6337
+ this.run = run;
6035
6338
  this.log = log;
6036
6339
  this.now = now;
6037
6340
  }
6038
- surface;
6039
- install;
6341
+ inputs;
6342
+ run;
6040
6343
  log;
6041
6344
  now;
6042
- /** The surface last installed: a plugin id, '' for the built-in, undefined before the first. */
6043
6345
  last;
6044
6346
  chain = Promise.resolve();
6045
- /** The last failed install: its surface key, when it ran, and its message. */
6046
6347
  failed = null;
6047
- /** Reinstall the skill when the active review surface changed; null when it had not. */
6348
+ latest = null;
6349
+ /** Sync when the inputs changed; null when they had not. */
6048
6350
  sync() {
6049
6351
  const run = this.chain.then(async () => {
6050
- const surface = await this.surface();
6051
- const key = surface?.id ?? "";
6352
+ const inputs = await this.inputs();
6353
+ const key = JSON.stringify(inputs);
6052
6354
  if (key === this.last) return null;
6053
6355
  const f = this.failed;
6054
6356
  if (f?.key === key && this.now() - f.at < RETRY_MS) return null;
6055
- const r = await this.install(surface);
6357
+ const r = await this.run({ reviewSurface: inputs.reviewSurface, harness: inputs.harness });
6358
+ this.latest = r;
6056
6359
  if (r.state === "error") {
6057
6360
  this.last = void 0;
6058
6361
  this.failed = { key, at: this.now(), message: r.message };
@@ -6068,11 +6371,68 @@ class SkillSync {
6068
6371
  });
6069
6372
  return run;
6070
6373
  }
6374
+ /** The last sync's outcome, for /api/health. */
6375
+ view() {
6376
+ const r = this.latest;
6377
+ if (!r) return { state: "unknown", message: null, items: [], drift: [] };
6378
+ return {
6379
+ state: r.state,
6380
+ message: r.message,
6381
+ items: r.items.map(({ id, state, target }) => ({ id, state, target })),
6382
+ drift: r.drift.map(({ file, marker }) => ({ file, marker }))
6383
+ };
6384
+ }
6071
6385
  }
6072
- function reviewSurfaceOf(active, statuses) {
6073
- if (!active) return null;
6074
- const status2 = statuses.find((s) => s.id === active.id && s.state === "loaded");
6075
- return { id: active.id, name: active.name, repository: status2?.repository ?? null };
6386
+ function cached(fn, ms, now = Date.now) {
6387
+ let at = -Infinity;
6388
+ let value = null;
6389
+ return () => {
6390
+ if (!value || now() - at >= ms) {
6391
+ at = now();
6392
+ value = fn();
6393
+ }
6394
+ return value;
6395
+ };
6396
+ }
6397
+ function materialContext(install, env) {
6398
+ return {
6399
+ install,
6400
+ env,
6401
+ configDir: defaultConfigDir(env),
6402
+ skillsRoot: env.WHEELHOUSE_INSTALL_DIR ? path.join(env.WHEELHOUSE_INSTALL_DIR, "skills") : void 0,
6403
+ version
6404
+ };
6405
+ }
6406
+ function serverHarness(env) {
6407
+ try {
6408
+ return parseHarness(env.WHEELHOUSE_HARNESS);
6409
+ } catch {
6410
+ return "claude";
6411
+ }
6412
+ }
6413
+ async function syncForServer(install, env, plugins) {
6414
+ const reviewSurface = plugins ? reviewSurfaceOf(await plugins.roleProvider("review.surface"), plugins.status()) : null;
6415
+ return syncMaterial(materialContext(install, env), {
6416
+ reviewSurface,
6417
+ harness: serverHarness(env)
6418
+ });
6419
+ }
6420
+ const COMMIT_MS = 6e4;
6421
+ function materialSync(install, env, plugins, log) {
6422
+ const commit2 = cached(() => gitHead(install.firstmateDir), COMMIT_MS);
6423
+ const ctx = { ...materialContext(install, env), commit: () => commit2() };
6424
+ return new MaterialSync(
6425
+ async () => ({
6426
+ reviewSurface: reviewSurfaceOf(
6427
+ await plugins.roleProvider("review.surface"),
6428
+ plugins.status()
6429
+ ),
6430
+ harness: serverHarness(env),
6431
+ firstmateCommit: await commit2()
6432
+ }),
6433
+ (inputs) => syncMaterial(ctx, inputs),
6434
+ log
6435
+ );
6076
6436
  }
6077
6437
  const SESSION_HEADER = "x-wheelhouse-session";
6078
6438
  const LOOPBACK_HOST = /^(127\.0\.0\.1|localhost|\[::1\])(:\d+)?$/i;
@@ -7844,6 +8204,12 @@ class BuildReader {
7844
8204
  }
7845
8205
  }
7846
8206
  const DEFAULT_INTERVAL$1 = 5e3;
8207
+ const UNSYNCED_MATERIAL = {
8208
+ state: "unknown",
8209
+ message: null,
8210
+ items: [],
8211
+ drift: []
8212
+ };
7847
8213
  const CARD_SHOTS = 4;
7848
8214
  class Collector {
7849
8215
  opts;
@@ -7852,6 +8218,7 @@ class Collector {
7852
8218
  running = false;
7853
8219
  ticking = null;
7854
8220
  listeners = /* @__PURE__ */ new Set();
8221
+ material = null;
7855
8222
  snapshot = null;
7856
8223
  ready = null;
7857
8224
  readyError = null;
@@ -8003,7 +8370,7 @@ class Collector {
8003
8370
  worktree: t.worktree.present ? t.worktree.path : null,
8004
8371
  row: t
8005
8372
  })),
8006
- ...backlogOnly(snap).map(({ record }) => ({ id: record.id, worktree: null, row: null }))
8373
+ ...backlogOnly(snap).map(({ record: record2 }) => ({ id: record2.id, worktree: null, row: null }))
8007
8374
  ];
8008
8375
  const thumbs = /* @__PURE__ */ new Map();
8009
8376
  const review = /* @__PURE__ */ new Map();
@@ -8201,6 +8568,10 @@ class Collector {
8201
8568
  return this.snapshot?.tasks.find((t) => t.id === id) ?? null;
8202
8569
  }
8203
8570
  mateFacts = null;
8571
+ /** Where health reads the last sync of Wheelhouse's agent material (material/sync.ts). */
8572
+ setMaterial(f) {
8573
+ this.material = f;
8574
+ }
8204
8575
  /** Where a second mate's task's PR and preview come from, once read (matetasks.ts). */
8205
8576
  setMateFacts(f) {
8206
8577
  this.mateFacts = f;
@@ -8301,7 +8672,8 @@ class Collector {
8301
8672
  configDir: null,
8302
8673
  problem: "Passage files are not set up.",
8303
8674
  checksRunning: 0
8304
- }
8675
+ },
8676
+ material: this.material?.() ?? UNSYNCED_MATERIAL
8305
8677
  };
8306
8678
  }
8307
8679
  messaging() {
@@ -10582,9 +10954,9 @@ class InboxService {
10582
10954
  line = p.line;
10583
10955
  }
10584
10956
  const text2 = closing ? closeText(card, note2 || null) : answerText(card, choice, note2 || null, decided ? null : line, decided || null);
10585
- const valid = validateSend(requestId, text2, card.taskId);
10586
- if (!valid.ok) return valid;
10587
- const sent = await messenger.send(valid.input);
10957
+ const valid2 = validateSend(requestId, text2, card.taskId);
10958
+ if (!valid2.ok) return valid2;
10959
+ const sent = await messenger.send(valid2.input);
10588
10960
  if (sent.ok && sent.message.delivery !== "failed") {
10589
10961
  await this.deps.answered?.record({
10590
10962
  requestId: sent.message.requestId,
@@ -10922,11 +11294,11 @@ class WatchStore {
10922
11294
  get(projectId) {
10923
11295
  return this.projects.get(projectId) ?? null;
10924
11296
  }
10925
- set(projectId, record) {
11297
+ set(projectId, record2) {
10926
11298
  this.projects.set(projectId, {
10927
- mode: record.mode,
10928
- rule: record.rule,
10929
- seen: record.seen.slice(-MAX_SEEN)
11299
+ mode: record2.mode,
11300
+ rule: record2.rule,
11301
+ seen: record2.seen.slice(-MAX_SEEN)
10930
11302
  });
10931
11303
  }
10932
11304
  forget(projectId) {
@@ -10985,13 +11357,13 @@ class IssueWatcher {
10985
11357
  }
10986
11358
  const rule = ruleKey(watchRule(settings, p.id));
10987
11359
  if (!p.ok || !p.rule || ruleKey(p.rule) !== rule) continue;
10988
- const record = store.get(p.id);
10989
- if (!record || record.mode !== mode || record.rule !== rule) {
11360
+ const record2 = store.get(p.id);
11361
+ if (!record2 || record2.mode !== mode || record2.rule !== rule) {
10990
11362
  store.set(p.id, { mode, rule, seen: p.issues.map((i) => i.url) });
10991
11363
  changed = true;
10992
11364
  continue;
10993
11365
  }
10994
- const seen = new Set(record.seen);
11366
+ const seen = new Set(record2.seen);
10995
11367
  for (const issue of p.issues) {
10996
11368
  if (seen.has(issue.url)) continue;
10997
11369
  if (issue.inHand) {
@@ -11004,7 +11376,7 @@ class IssueWatcher {
11004
11376
  seen.add(issue.url);
11005
11377
  }
11006
11378
  }
11007
- if (seen.size !== record.seen.length) {
11379
+ if (seen.size !== record2.seen.length) {
11008
11380
  store.set(p.id, { mode, rule, seen: [...seen] });
11009
11381
  changed = true;
11010
11382
  }
@@ -13110,8 +13482,8 @@ function toolResult(r) {
13110
13482
  return { ok: true, result: r };
13111
13483
  }
13112
13484
  function appHtml(r, uri) {
13113
- const contents2 = Array.isArray(r?.contents) ? r.contents.filter(isRecord) : [];
13114
- const item = contents2.find((c) => c.uri === uri) ?? contents2[0];
13485
+ const contents = Array.isArray(r?.contents) ? r.contents.filter(isRecord) : [];
13486
+ const item = contents.find((c) => c.uri === uri) ?? contents[0];
13115
13487
  if (!item) return { ok: false, reason: "the server sent no content." };
13116
13488
  const mime = String(item.mimeType ?? "").replace(/\s+/g, "").toLowerCase();
13117
13489
  if (mime !== APP_MIME) {
@@ -14623,8 +14995,8 @@ class PassageService {
14623
14995
  const refsFor = async () => {
14624
14996
  if (refs) return refs;
14625
14997
  if (!f.prUrl || !this.useGh) return null;
14626
- const cached = this.refs.status(`refs|${f.prUrl}`)?.result;
14627
- refs = cached && !cached.problem ? cached.refs : (await readTaskRefs(f.prUrl, this.deps)).refs;
14998
+ const cached2 = this.refs.status(`refs|${f.prUrl}`)?.result;
14999
+ refs = cached2 && !cached2.problem ? cached2.refs : (await readTaskRefs(f.prUrl, this.deps)).refs;
14628
15000
  return refs;
14629
15001
  };
14630
15002
  const ctx = async (checkId, spec, releaseTag) => ({
@@ -15903,15 +16275,15 @@ class Gateway {
15903
16275
  }
15904
16276
  const requestId = `${channel}:${e.id}`;
15905
16277
  const taskId = e.inReplyTo ? this.deps.record.sentAt(e.inReplyTo)?.taskId ?? null : null;
15906
- const valid = validateSend(requestId, `${provenance(label(channel))}
16278
+ const valid2 = validateSend(requestId, `${provenance(label(channel))}
15907
16279
  ${text2}`, taskId);
15908
- if (!valid.ok) {
15909
- this.log(channel, { event: "refuse", from: e.from, id: e.id, reason: valid.error });
15910
- await say(valid.error);
16280
+ if (!valid2.ok) {
16281
+ this.log(channel, { event: "refuse", from: e.from, id: e.id, reason: valid2.error });
16282
+ await say(valid2.error);
15911
16283
  return;
15912
16284
  }
15913
16285
  if (this.deps.record.note(requestId)) {
15914
- const r2 = await this.deps.messenger.send(valid.input);
16286
+ const r2 = await this.deps.messenger.send(valid2.input);
15915
16287
  this.log(
15916
16288
  channel,
15917
16289
  r2.ok ? { event: "accept", from: e.from, id: e.id, requestId, taskId, what: "redelivered" } : { event: "refuse", from: e.from, id: e.id, requestId, reason: r2.error }
@@ -15941,7 +16313,7 @@ ${text2}`, taskId);
15941
16313
  replied: null
15942
16314
  });
15943
16315
  await this.deps.record.save();
15944
- const r = await this.deps.messenger.send(valid.input);
16316
+ const r = await this.deps.messenger.send(valid2.input);
15945
16317
  if (!r.ok) {
15946
16318
  this.log(channel, { event: "refuse", from: e.from, id: e.id, requestId, reason: r.error });
15947
16319
  const n = this.deps.record.note(requestId);
@@ -16173,9 +16545,9 @@ ${text2}`, taskId);
16173
16545
  * piece; returns where that piece went, or null when it could not be sent.
16174
16546
  */
16175
16547
  async post(channel, adapter, to, draft, replyTo = null, what = "notice") {
16176
- const record = this.deps.record;
16548
+ const record2 = this.deps.record;
16177
16549
  const actions = draft.actions.slice(0, adapter.limits.buttons);
16178
- const tokens = actions.map((a) => record.grant(channel, a.action, BUTTON_TTL_MS));
16550
+ const tokens = actions.map((a) => record2.grant(channel, a.action, BUTTON_TTL_MS));
16179
16551
  const buttons = [
16180
16552
  ...actions.map((a, i) => ({ label: a.label, token: tokens[i], style: a.style })),
16181
16553
  ...draft.links.map((l) => ({ label: l.label, url: l.url }))
@@ -16193,13 +16565,13 @@ ${text2}`, taskId);
16193
16565
  });
16194
16566
  }
16195
16567
  } catch (e) {
16196
- record.revoke(tokens);
16568
+ record2.revoke(tokens);
16197
16569
  this.log(channel, { event: "error", what, reason: e.message });
16198
16570
  return null;
16199
16571
  }
16200
16572
  if (!ref) return null;
16201
- record.attach(tokens, ref);
16202
- record.addSent({
16573
+ record2.attach(tokens, ref);
16574
+ record2.addSent({
16203
16575
  channel,
16204
16576
  ref,
16205
16577
  taskId: draft.taskId,
@@ -16208,7 +16580,7 @@ ${text2}`, taskId);
16208
16580
  text: tokens.length ? pieces[pieces.length - 1] : "",
16209
16581
  links: draft.links.filter((l) => buttons.some((b) => "url" in b && b.url === l.url))
16210
16582
  });
16211
- await record.save();
16583
+ await record2.save();
16212
16584
  this.log(channel, { event: "send", from: to.id, id: ref.id, taskId: draft.taskId, what });
16213
16585
  return ref;
16214
16586
  }
@@ -16756,8 +17128,8 @@ function normalize(entry, sessionId) {
16756
17128
  async function piSnapshot(opts) {
16757
17129
  if (!opts.sessionNonce?.trim()) return null;
16758
17130
  try {
16759
- const receiptText = await readBounded(opts.hookFile, RECEIPT_BYTES$1);
16760
- const receipt = receiptText === null ? null : object$2(JSON.parse(receiptText));
17131
+ const receiptText2 = await readBounded(opts.hookFile, RECEIPT_BYTES$1);
17132
+ const receipt = receiptText2 === null ? null : object$2(JSON.parse(receiptText2));
16761
17133
  if (!receipt || receipt.wheelhouse_nonce !== opts.sessionNonce || typeof receipt.session_id !== "string" || !receipt.session_id || typeof receipt.transcript_path !== "string" || !path.isAbsolute(receipt.transcript_path) || typeof receipt.cwd !== "string" || !path.isAbsolute(receipt.cwd) || !(receipt.leaf_id === null || typeof receipt.leaf_id === "string"))
16762
17134
  return null;
16763
17135
  const sessionId = receipt.session_id;
@@ -16915,19 +17287,19 @@ async function newestFor(o, dir) {
16915
17287
  }
16916
17288
  let best = null;
16917
17289
  for (const d of dirs) {
16918
- const folder = path.join(o.projectsDir, d);
17290
+ const folder2 = path.join(o.projectsDir, d);
16919
17291
  let files;
16920
17292
  try {
16921
- files = (await readdir(folder)).filter((f) => f.endsWith(".jsonl"));
17293
+ files = (await readdir(folder2)).filter((f) => f.endsWith(".jsonl"));
16922
17294
  } catch {
16923
17295
  continue;
16924
17296
  }
16925
17297
  let newest2 = null;
16926
17298
  for (const f of files) {
16927
17299
  try {
16928
- const s = await stat(path.join(folder, f));
17300
+ const s = await stat(path.join(folder2, f));
16929
17301
  if (!newest2 || s.mtimeMs > newest2.mtime)
16930
- newest2 = { file: path.join(folder, f), mtime: s.mtimeMs };
17302
+ newest2 = { file: path.join(folder2, f), mtime: s.mtimeMs };
16931
17303
  } catch {
16932
17304
  }
16933
17305
  }
@@ -17085,9 +17457,9 @@ class ChatFeed {
17085
17457
  this.source = source;
17086
17458
  const records2 = [];
17087
17459
  this.calls.clear();
17088
- for (const record of snapshot?.records ?? []) {
17089
- this.noteToolCalls(record);
17090
- const compact = slim(record);
17460
+ for (const record2 of snapshot?.records ?? []) {
17461
+ this.noteToolCalls(record2);
17462
+ const compact = slim(record2);
17091
17463
  if (compact) records2.push(compact);
17092
17464
  }
17093
17465
  if (records2.length > MAX_RECORDS) {
@@ -17164,17 +17536,17 @@ class ChatFeed {
17164
17536
  lines.pop();
17165
17537
  if (startedMidway) lines.shift();
17166
17538
  const fresh = [];
17167
- const seen = new Set(this.records.map((record) => record.uuid));
17539
+ const seen = new Set(this.records.map((record2) => record2.uuid));
17168
17540
  for (const line of lines) {
17169
17541
  if (!line.trim()) continue;
17170
17542
  try {
17171
17543
  const raw = JSON.parse(line);
17172
17544
  const decoded = this.opts.decode ? this.opts.decode(raw, this.session?.harness ?? "claude") : [raw];
17173
- for (const record of decoded) {
17174
- if (this.opts.decode && this.session?.harness !== "claude" && seen.has(record.uuid))
17545
+ for (const record2 of decoded) {
17546
+ if (this.opts.decode && this.session?.harness !== "claude" && seen.has(record2.uuid))
17175
17547
  continue;
17176
- this.noteToolCalls(record);
17177
- const r = slim(record);
17548
+ this.noteToolCalls(record2);
17549
+ const r = slim(record2);
17178
17550
  if (r) {
17179
17551
  fresh.push(r);
17180
17552
  seen.add(r.uuid);
@@ -17954,15 +18326,15 @@ class HerdrBackend {
17954
18326
  }
17955
18327
  async readRecord() {
17956
18328
  try {
17957
- const record = parseRecord(await readFile(this.recordFile, "utf8"));
17958
- return record && record.session === this.session ? record : null;
18329
+ const record2 = parseRecord(await readFile(this.recordFile, "utf8"));
18330
+ return record2 && record2.session === this.session ? record2 : null;
17959
18331
  } catch {
17960
18332
  return null;
17961
18333
  }
17962
18334
  }
17963
- async writeRecord(record) {
18335
+ async writeRecord(record2) {
17964
18336
  const tmp = `${this.recordFile}.${process.pid}.tmp`;
17965
- await writeFile(tmp, JSON.stringify(record), { mode: 384 });
18337
+ await writeFile(tmp, JSON.stringify(record2), { mode: 384 });
17966
18338
  await rename(tmp, this.recordFile);
17967
18339
  }
17968
18340
  /** The pane to type into: the one running() found live, else the recorded one. */
@@ -17979,9 +18351,9 @@ class HerdrBackend {
17979
18351
  return null;
17980
18352
  }
17981
18353
  if (!status2.running) return false;
17982
- const record = await this.readRecord();
17983
- if (!record) return false;
17984
- const r = await this.herdr(["pane", "get", record.paneId]);
18354
+ const record2 = await this.readRecord();
18355
+ if (!record2) return false;
18356
+ const r = await this.herdr(["pane", "get", record2.paneId]);
17985
18357
  if (!r.ok) {
17986
18358
  if (herdrCode(r) === "pane_not_found") return false;
17987
18359
  this.lastProblem = `herdr could not report Firstmate's pane: ${herdrError(r)}`;
@@ -17993,8 +18365,8 @@ class HerdrBackend {
17993
18365
  this.lastProblem = "herdr gave an answer about Firstmate's pane that Wheelhouse does not understand.";
17994
18366
  return null;
17995
18367
  }
17996
- if (terminal !== record.terminalId) return false;
17997
- this.live = record;
18368
+ if (terminal !== record2.terminalId) return false;
18369
+ this.live = record2;
17998
18370
  return true;
17999
18371
  }
18000
18372
  /** Start the session's herdr server when it is not running, wait for it to answer, and give its status. */
@@ -18027,7 +18399,7 @@ class HerdrBackend {
18027
18399
  const started = compareVersions(status2.clientVersion, HERDR_PANE_START_VERSION) < 0 ? await this.startAgent(sh, spec) : await this.startInWorkspace(sh, spec);
18028
18400
  if ("error" in started) return { ok: false, error: started.error };
18029
18401
  const { paneId, terminalId } = started;
18030
- const record = {
18402
+ const record2 = {
18031
18403
  schema: RECORD_SCHEMA,
18032
18404
  session: this.session,
18033
18405
  paneId,
@@ -18035,14 +18407,14 @@ class HerdrBackend {
18035
18407
  env: { ...spec.env }
18036
18408
  };
18037
18409
  try {
18038
- await this.writeRecord(record);
18410
+ await this.writeRecord(record2);
18039
18411
  } catch (e) {
18040
18412
  return {
18041
18413
  ok: false,
18042
18414
  error: `herdr started Firstmate in pane ${paneId}, but Wheelhouse could not record it: ${e.message}`
18043
18415
  };
18044
18416
  }
18045
- this.live = record;
18417
+ this.live = record2;
18046
18418
  await this.herdr([
18047
18419
  "terminal",
18048
18420
  "session",
@@ -18850,9 +19222,9 @@ async function locateCodexTranscript(opts, state) {
18850
19222
  const relative = path.relative(root, file);
18851
19223
  if (cwd !== receiptCwd || !relative || relative.startsWith("..") || path.isAbsolute(relative))
18852
19224
  return null;
18853
- const record = object(await readJson(file, META_BYTES, true));
18854
- const meta = object(record?.payload);
18855
- if (record?.type !== "session_meta" || !meta || meta.id !== receipt.session_id || meta.originator !== "codex-tui" || meta.source !== "cli" && meta.source !== "vscode" || typeof meta.cwd !== "string" || !path.isAbsolute(meta.cwd) || await realpath(meta.cwd) !== cwd)
19225
+ const record2 = object(await readJson(file, META_BYTES, true));
19226
+ const meta = object(record2?.payload);
19227
+ if (record2?.type !== "session_meta" || !meta || meta.id !== receipt.session_id || meta.originator !== "codex-tui" || meta.source !== "cli" && meta.source !== "vscode" || typeof meta.cwd !== "string" || !path.isAbsolute(meta.cwd) || await realpath(meta.cwd) !== cwd)
18856
19228
  return null;
18857
19229
  return { how: "hook", file };
18858
19230
  } catch {
@@ -18883,11 +19255,11 @@ function mcpResult(value) {
18883
19255
  return typeof result2.message === "string" ? result2.message : "";
18884
19256
  }
18885
19257
  function codexRecords(raw) {
18886
- const record = object(raw);
18887
- const payload = object(record?.payload);
18888
- if (record?.type !== "event_msg" || !payload || typeof record.timestamp !== "string" || !Number.isFinite(Date.parse(record.timestamp)))
19258
+ const record2 = object(raw);
19259
+ const payload = object(record2?.payload);
19260
+ if (record2?.type !== "event_msg" || !payload || typeof record2.timestamp !== "string" || !Number.isFinite(Date.parse(record2.timestamp)))
18889
19261
  return [];
18890
- const timestamp2 = record.timestamp;
19262
+ const timestamp2 = record2.timestamp;
18891
19263
  const turnId = typeof payload.turn_id === "string" ? payload.turn_id : null;
18892
19264
  if (payload.type === "task_complete" && turnId) {
18893
19265
  return [
@@ -19564,11 +19936,8 @@ async function create(env, opts = {}) {
19564
19936
  sandbox: (key, csp) => sandbox.url(key, csp),
19565
19937
  version
19566
19938
  });
19567
- const skill = new SkillSync(
19568
- async () => reviewSurfaceOf(await plugins.roleProvider("review.surface"), plugins.status()),
19569
- (surface) => installWheelhouseSkill(install, env, void 0, surface),
19570
- (line) => console.log(line)
19571
- );
19939
+ const skill = materialSync(install, env, plugins, (line) => console.log(line));
19940
+ collector.setMaterial(() => skill.view());
19572
19941
  await skill.sync();
19573
19942
  if (opts.startSession === false) {
19574
19943
  console.log("Firstmate: connected by setup; it starts when setup finishes.");
@@ -19667,9 +20036,9 @@ async function createGateway(install, env, deps) {
19667
20036
  if (!messenger) return null;
19668
20037
  const configDir = defaultConfigDir(env);
19669
20038
  const stateDir = defaultStateDir(env);
19670
- let record;
20039
+ let record2;
19671
20040
  try {
19672
- record = await GatewayRecord.open(
20041
+ record2 = await GatewayRecord.open(
19673
20042
  path.join(path.dirname(storeFileFor(stateDir, install.homeDir)), "gateway.json")
19674
20043
  );
19675
20044
  } catch (e) {
@@ -19679,7 +20048,7 @@ async function createGateway(install, env, deps) {
19679
20048
  const audits = /* @__PURE__ */ new Map();
19680
20049
  const gateway = new Gateway({
19681
20050
  settings: new GatewaySettings(gatewayDir(configDir), defaultKeychain()),
19682
- record,
20051
+ record: record2,
19683
20052
  audit: (c) => {
19684
20053
  let log = audits.get(c);
19685
20054
  if (!log) {
@@ -19902,7 +20271,8 @@ function unconfiguredHealth(error) {
19902
20271
  },
19903
20272
  ledger: { available: false, reason: null },
19904
20273
  messaging: { available: false, reason: error, store: null },
19905
- passages: { configDir: null, problem: error, checksRunning: 0 }
20274
+ passages: { configDir: null, problem: error, checksRunning: 0 },
20275
+ material: UNSYNCED_MATERIAL
19906
20276
  };
19907
20277
  }
19908
20278
  function unavailableMessages(reason) {
@@ -20276,5 +20646,5 @@ const runtime = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.definePrope
20276
20646
  upgradeRuntime
20277
20647
  }, Symbol.toStringTag, { value: "Module" }));
20278
20648
 
20279
- export { resolveSessionBackend as $, currentGateway as A, currentPlugins as B, currentPluginPage as C, watchSettingsError as D, changePluginConfig as E, runBounded as F, GATEWAY_CHANNELS as G, which as H, INPUT_MAX_BYTES as I, pluginIconFile as J, pluginUiFile as K, LOOPBACK_HOST as L, MAX_CHAT_CALLS as M, chooseRoleProvider as N, previewProber as O, PROJECT_ID as P, MAX_FILE_BYTES$1 as Q, REQUEST_ID$1 as R, PEEK_DEFAULT_LINES as S, pluginService as T, refusesSetup as U, checkHerdr as V, WATCH_PLUGIN as W, HERDR_MIN_VERSION as X, findFirstmateDir as Y, looksLikeFirstmate as Z, SETUP_SUGGESTIONS as _, sessionToken as a, readSavedBackend as a0, DEFAULT_HERDR_SESSION as a1, writeSavedBackend as a2, reviewSurfaceOf as a3, installWheelhouseSkill as a4, writeRemembered as a5, reconnectRuntime as a6, setupWorkDir as a7, setupTerminals as a8, checkCompatibility as a9, bundledPluginsDir as aa, currentSlots as ab, GAPS as ac, WORKTREE_GONE as ad, PEEK_MAX_LINES as ae, parseChange as af, MAX_VALUE_BYTES as ag, currentDecisions as ah, readDoc as ai, currentTime as aj, runtime as ak, currentPullRequestTabs as b, currentReviewSurface as c, currentHostedPreviews as d, currentAddressRewrites as e, currentInbox as f, getRuntime as g, currentHeadroom as h, isMutating as i, currentHealth as j, currentFleet as k, currentRailInsights as l, loadSlots as m, currentPreviewPorts as n, currentMessages as o, serverInstance as p, unconfiguredHealth as q, refuseMutation as r, servedOrigin as s, currentFileRoots as t, unconfiguredFleet as u, readAsset as v, unavailableFirstmate as w, parseMateTaskId as x, validateSend as y, isReactionId as z };
20280
- //# sourceMappingURL=runtime.js-r5K-2IqO.js.map
20649
+ export { resolveSessionBackend as $, currentGateway as A, currentPlugins as B, currentPluginPage as C, watchSettingsError as D, changePluginConfig as E, runBounded as F, GATEWAY_CHANNELS as G, which as H, INPUT_MAX_BYTES as I, pluginIconFile as J, pluginUiFile as K, LOOPBACK_HOST as L, MAX_CHAT_CALLS as M, chooseRoleProvider as N, previewProber as O, PROJECT_ID as P, MAX_FILE_BYTES$1 as Q, REQUEST_ID$1 as R, PEEK_DEFAULT_LINES as S, pluginService as T, refusesSetup as U, checkHerdr as V, WATCH_PLUGIN as W, HERDR_MIN_VERSION as X, findFirstmateDir as Y, looksLikeFirstmate as Z, SETUP_SUGGESTIONS as _, sessionToken as a, readSavedBackend as a0, DEFAULT_HERDR_SESSION as a1, writeSavedBackend as a2, syncForServer as a3, writeRemembered as a4, reconnectRuntime as a5, setupWorkDir as a6, setupTerminals as a7, checkCompatibility as a8, bundledPluginsDir as a9, currentSlots as aa, GAPS as ab, WORKTREE_GONE as ac, PEEK_MAX_LINES as ad, parseChange as ae, MAX_VALUE_BYTES as af, currentDecisions as ag, readDoc as ah, currentTime as ai, runtime as aj, currentPullRequestTabs as b, currentReviewSurface as c, currentHostedPreviews as d, currentAddressRewrites as e, currentInbox as f, getRuntime as g, currentHeadroom as h, isMutating as i, currentHealth as j, currentFleet as k, currentRailInsights as l, loadSlots as m, currentPreviewPorts as n, currentMessages as o, serverInstance as p, unconfiguredHealth as q, refuseMutation as r, servedOrigin as s, currentFileRoots as t, unconfiguredFleet as u, readAsset as v, unavailableFirstmate as w, parseMateTaskId as x, validateSend as y, isReactionId as z };
20650
+ //# sourceMappingURL=runtime.js-Div6Lnx3.js.map