vibe64 0.1.77 → 0.1.79

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 (242) hide show
  1. package/bin/run.js +1327 -1322
  2. package/bin/server.js +106 -104
  3. package/bin/upgrade-state.js +2736 -2754
  4. package/dist/assets/{GithubBrowserTabs-B2r19V0U.js → GithubBrowserTabs-CXjft59b.js} +1 -1
  5. package/dist/assets/GithubBrowserTabs-CXjft59b.js.br +0 -0
  6. package/dist/assets/GithubBrowserTabs-CXjft59b.js.gz +0 -0
  7. package/dist/assets/{LocalDatabaseServer-Ck9nZrGW.js → LocalDatabaseServer-BFzbm_N5.js} +1 -1
  8. package/dist/assets/LocalDatabaseServer-BFzbm_N5.js.br +0 -0
  9. package/dist/assets/LocalDatabaseServer-BFzbm_N5.js.gz +0 -0
  10. package/dist/assets/{Vibe64DashboardPageHeader-C4iTKeE0.js → Vibe64DashboardPageHeader-PKaMTKQo.js} +1 -1
  11. package/dist/assets/Vibe64DashboardPageHeader-PKaMTKQo.js.br +0 -0
  12. package/dist/assets/Vibe64DashboardPageHeader-PKaMTKQo.js.gz +0 -0
  13. package/dist/assets/{Vibe64DatabaseWorkspace-ChA-2QPU.js → Vibe64DatabaseWorkspace-6d4O_5R5.js} +1 -1
  14. package/dist/assets/Vibe64DatabaseWorkspace-6d4O_5R5.js.br +0 -0
  15. package/dist/assets/Vibe64DatabaseWorkspace-6d4O_5R5.js.gz +0 -0
  16. package/dist/assets/{Vibe64FileArea-DBEJsJSq.js → Vibe64FileArea-C18bdRqO.js} +1 -1
  17. package/dist/assets/Vibe64FileArea-C18bdRqO.js.br +0 -0
  18. package/dist/assets/Vibe64FileArea-C18bdRqO.js.gz +0 -0
  19. package/dist/assets/Vibe64OutputControls-OgqYYbq7.js +8 -0
  20. package/dist/assets/Vibe64OutputControls-OgqYYbq7.js.br +0 -0
  21. package/dist/assets/Vibe64OutputControls-OgqYYbq7.js.gz +0 -0
  22. package/dist/assets/{Vibe64OutputControls-aQCEvUL2.css → Vibe64OutputControls-gSUdkqME.css} +1 -1
  23. package/dist/assets/Vibe64OutputControls-gSUdkqME.css.br +0 -0
  24. package/dist/assets/Vibe64OutputControls-gSUdkqME.css.gz +0 -0
  25. package/dist/assets/{Vibe64RepositoryWorkspace-sT07hHPs.js → Vibe64RepositoryWorkspace-Cpb9aDYs.js} +1 -1
  26. package/dist/assets/Vibe64RepositoryWorkspace-Cpb9aDYs.js.br +0 -0
  27. package/dist/assets/Vibe64RepositoryWorkspace-Cpb9aDYs.js.gz +0 -0
  28. package/dist/assets/{Vibe64SessionFiles-Djef01EV.js → Vibe64SessionFiles-DJadIknz.js} +1 -1
  29. package/dist/assets/Vibe64SessionFiles-DJadIknz.js.br +0 -0
  30. package/dist/assets/Vibe64SessionFiles-DJadIknz.js.gz +0 -0
  31. package/dist/assets/{Vibe64SessionSourceEditor-CIGBLYYN.js → Vibe64SessionSourceEditor-C8XuUkUH.js} +1 -1
  32. package/dist/assets/Vibe64SessionSourceEditor-C8XuUkUH.js.br +0 -0
  33. package/dist/assets/Vibe64SessionSourceEditor-C8XuUkUH.js.gz +0 -0
  34. package/dist/assets/{Vibe64UiStoryboardView-CjkWoB8b.js → Vibe64UiStoryboardView-KzCGAvty.js} +1 -1
  35. package/dist/assets/Vibe64UiStoryboardView-KzCGAvty.js.br +0 -0
  36. package/dist/assets/Vibe64UiStoryboardView-KzCGAvty.js.gz +0 -0
  37. package/dist/assets/{_pageId_-BTjeqgTN.js → _pageId_-Dz7wuvcV.js} +1 -1
  38. package/dist/assets/{_sessionId_-C7Jh2bL4.js → _sessionId_-UOSJikRr.js} +1 -1
  39. package/dist/assets/_sessionId_-UOSJikRr.js.br +0 -0
  40. package/dist/assets/_sessionId_-UOSJikRr.js.gz +0 -0
  41. package/dist/assets/{_sessionTool_-DITdXCS4.js → _sessionTool_-SN6SNAQM.js} +1 -1
  42. package/dist/assets/{access-DIaPNdxr.js → access-Ba7aprTh.js} +1 -1
  43. package/dist/assets/access-Ba7aprTh.js.br +0 -0
  44. package/dist/assets/access-Ba7aprTh.js.gz +0 -0
  45. package/dist/assets/{app-mELSmS67.js → app-nvpa3ah6.js} +1 -1
  46. package/dist/assets/app-nvpa3ah6.js.br +0 -0
  47. package/dist/assets/app-nvpa3ah6.js.gz +0 -0
  48. package/dist/assets/{changes-DlxKdjdP.js → changes-WQZLBU3x.js} +1 -1
  49. package/dist/assets/{client-CLpGzGwX.js → client-B5r45NvF.js} +2 -2
  50. package/dist/assets/client-B5r45NvF.js.br +0 -0
  51. package/dist/assets/client-B5r45NvF.js.gz +0 -0
  52. package/dist/assets/{client-CL02nP02.js → client-EaJLXb4V.js} +2 -2
  53. package/dist/assets/client-EaJLXb4V.js.br +0 -0
  54. package/dist/assets/client-EaJLXb4V.js.gz +0 -0
  55. package/dist/assets/{dashboard-km-kuDid.js → dashboard-S0qg7Ai6.js} +1 -1
  56. package/dist/assets/{english-definitions-CMICWgdF.js → english-definitions-B9nc8s8Y.js} +1 -1
  57. package/dist/assets/english-definitions-B9nc8s8Y.js.br +0 -0
  58. package/dist/assets/english-definitions-B9nc8s8Y.js.gz +0 -0
  59. package/dist/assets/{env-DjkxkxdX.js → env-Dqyw_NCv.js} +1 -1
  60. package/dist/assets/env-Dqyw_NCv.js.br +0 -0
  61. package/dist/assets/env-Dqyw_NCv.js.gz +0 -0
  62. package/dist/assets/{error-C7q1-2bC.js → error-DkUVRs7I.js} +1 -1
  63. package/dist/assets/error-DkUVRs7I.js.br +0 -0
  64. package/dist/assets/error-DkUVRs7I.js.gz +0 -0
  65. package/dist/assets/{fileTypes-Dbn0qwKS.js → fileTypes-Dp5WZ-_A.js} +1 -1
  66. package/dist/assets/fileTypes-Dp5WZ-_A.js.br +0 -0
  67. package/dist/assets/fileTypes-Dp5WZ-_A.js.gz +0 -0
  68. package/dist/assets/{health-BwJ6Z251.js → health-BkO5CcRR.js} +1 -1
  69. package/dist/assets/health-BkO5CcRR.js.br +0 -0
  70. package/dist/assets/health-BkO5CcRR.js.gz +0 -0
  71. package/dist/assets/{history-D2TywQVv.js → history-DanS1uI3.js} +1 -1
  72. package/dist/assets/history-DanS1uI3.js.br +0 -0
  73. package/dist/assets/history-DanS1uI3.js.gz +0 -0
  74. package/dist/assets/{index-D14nUmm7.js → index-CeCIadYg.js} +4 -4
  75. package/dist/assets/index-CeCIadYg.js.br +0 -0
  76. package/dist/assets/index-CeCIadYg.js.gz +0 -0
  77. package/dist/assets/{integrations-BZFXW2Cp.js → integrations-Dh4ViP8t.js} +96 -10
  78. package/dist/assets/integrations-Dh4ViP8t.js.br +0 -0
  79. package/dist/assets/integrations-Dh4ViP8t.js.gz +0 -0
  80. package/dist/assets/{issues-CLvbBTek.js → issues-D3ZjHBeZ.js} +1 -1
  81. package/dist/assets/issues-D3ZjHBeZ.js.br +0 -0
  82. package/dist/assets/issues-D3ZjHBeZ.js.gz +0 -0
  83. package/dist/assets/{learning-DwytxEXC.js → learning-C_3lMmYJ.js} +1 -1
  84. package/dist/assets/{packages-BeiF8W7l.js → packages-CPSq4jBh.js} +1 -1
  85. package/dist/assets/packages-CPSq4jBh.js.br +0 -0
  86. package/dist/assets/packages-CPSq4jBh.js.gz +0 -0
  87. package/dist/assets/{pages-BIRQk4b8.js → pages-C-c5itHs.js} +1 -1
  88. package/dist/assets/{pages-BnAyUdL4.js → pages-D91yb6IJ.js} +1 -1
  89. package/dist/assets/pages-D91yb6IJ.js.br +0 -0
  90. package/dist/assets/pages-D91yb6IJ.js.gz +0 -0
  91. package/dist/assets/{project-GnljGud1.js → project-DTIrUrUg.js} +11 -11
  92. package/dist/assets/project-DTIrUrUg.js.br +0 -0
  93. package/dist/assets/project-DTIrUrUg.js.gz +0 -0
  94. package/dist/assets/{project-files-e4-Q65vT.js → project-files-Djr-58SN.js} +1 -1
  95. package/dist/assets/project-files-Djr-58SN.js.br +0 -0
  96. package/dist/assets/project-files-Djr-58SN.js.gz +0 -0
  97. package/dist/assets/{project-W_VltXAt.css → project-fwVeri07.css} +1 -1
  98. package/dist/assets/project-fwVeri07.css.br +0 -0
  99. package/dist/assets/project-fwVeri07.css.gz +0 -0
  100. package/dist/assets/{project-shared-ShellOutlet-DKYDipmC.js → project-shared-ShellOutlet-Pj_fRyAX.js} +1 -1
  101. package/dist/assets/project-shared-ShellOutlet-Pj_fRyAX.js.br +0 -0
  102. package/dist/assets/project-shared-ShellOutlet-Pj_fRyAX.js.gz +0 -0
  103. package/dist/assets/{project-shared-VBottomSheet-BSE28ENQ.js → project-shared-VBottomSheet-BSLhkh3o.js} +1 -1
  104. package/dist/assets/project-shared-VBottomSheet-BSLhkh3o.js.br +0 -0
  105. package/dist/assets/project-shared-VBottomSheet-BSLhkh3o.js.gz +0 -0
  106. package/dist/assets/{project-shared-VToolbar-CrezJP9z.js → project-shared-VToolbar-BYx2aRBU.js} +1 -1
  107. package/dist/assets/project-shared-VToolbar-BYx2aRBU.js.br +0 -0
  108. package/dist/assets/project-shared-VToolbar-BYx2aRBU.js.gz +0 -0
  109. package/dist/assets/{project-shared-pageNames-6Jz0BfbS.js → project-shared-pageNames-D7IBGzQh.js} +1 -1
  110. package/dist/assets/project-shared-pageNames-D7IBGzQh.js.br +0 -0
  111. package/dist/assets/project-shared-pageNames-D7IBGzQh.js.gz +0 -0
  112. package/dist/assets/{pull-requests-DH9gWw10.js → pull-requests-DWmXOwB8.js} +1 -1
  113. package/dist/assets/pull-requests-DWmXOwB8.js.br +0 -0
  114. package/dist/assets/pull-requests-DWmXOwB8.js.gz +0 -0
  115. package/dist/assets/{repository-BNltUuvb.js → repository-CNSRmrFd.js} +1 -1
  116. package/dist/assets/{session-Ck9aH4Yl.js → session-BITnnyzW.js} +1 -1
  117. package/dist/assets/session-BITnnyzW.js.br +0 -0
  118. package/dist/assets/session-BITnnyzW.js.gz +0 -0
  119. package/dist/assets/{settings-D8Ofbk56.js → settings-CkoP7vBl.js} +1 -1
  120. package/dist/assets/settings-CkoP7vBl.js.br +0 -0
  121. package/dist/assets/settings-CkoP7vBl.js.gz +0 -0
  122. package/dist/assets/{useArchivedVibe64Sessions-LIZjeLbd.js → useArchivedVibe64Sessions-CDKBzS4q.js} +1 -1
  123. package/dist/assets/useArchivedVibe64Sessions-CDKBzS4q.js.br +0 -0
  124. package/dist/assets/useArchivedVibe64Sessions-CDKBzS4q.js.gz +0 -0
  125. package/dist/assets/{vibe64AttachmentDownload-1_XfvfYp.js → vibe64AttachmentDownload-BPNgZodV.js} +1 -1
  126. package/dist/assets/{vibe64SavedEnvValues-Bs7r4xWE.js → vibe64SavedEnvValues-BDBfgAh7.js} +1 -1
  127. package/dist/assets/{vue-flow-core-iwGljzru.js → vue-flow-core-S4cIQeQZ.js} +1 -1
  128. package/dist/assets/vue-flow-core-S4cIQeQZ.js.br +0 -0
  129. package/dist/assets/vue-flow-core-S4cIQeQZ.js.gz +0 -0
  130. package/dist/index.html +2 -2
  131. package/docs/colleague-usage/auto-workflow.md +3 -2
  132. package/docs/colleague-usage/development-env.md +2 -2
  133. package/docs/colleague-usage/plans.md +35 -13
  134. package/docs/colleague-usage/preview-starting-application.md +6 -0
  135. package/docs/colleague-usage/preview-stop-and-restart.md +51 -0
  136. package/docs/colleague-usage/preview.md +10 -37
  137. package/docs/colleague-usage/project-language-tools.md +8 -2
  138. package/docs/colleague-usage/staging-data-section.md +242 -0
  139. package/node_modules/@jskit-ai/assistant-core/CHANGELOG.md +2 -0
  140. package/node_modules/@jskit-ai/assistant-core/package.json +1 -1
  141. package/node_modules/@jskit-ai/assistant-runtime/package.json +1 -1
  142. package/node_modules/@jskit-ai/assistant-voice/package.json +1 -1
  143. package/node_modules/@jskit-ai/connectors-catalog/package.json +1 -1
  144. package/node_modules/@jskit-ai/payments-core/CHANGELOG.md +5 -0
  145. package/node_modules/@jskit-ai/payments-core/README.md +72 -8
  146. package/node_modules/@jskit-ai/payments-core/contracts/configuration.schema.json +56 -1
  147. package/node_modules/@jskit-ai/payments-core/contracts/conformance.json +484 -0
  148. package/node_modules/@jskit-ai/payments-core/locales/en.json +17 -5
  149. package/node_modules/@jskit-ai/payments-core/package.json +2 -1
  150. package/node_modules/@local/vibe64-execution/src/host/execHelper.js +545 -542
  151. package/node_modules/@local/vibe64-execution/src/server/gitTurnCheckpointCommand.js +135 -127
  152. package/node_modules/@local/vibe64-execution/src/server/hostProfile.js +18 -11
  153. package/node_modules/@local/vibe64-genesis/README.md +25 -0
  154. package/node_modules/@local/vibe64-genesis/bin/vibe64-genesis-host-context +39 -39
  155. package/node_modules/@local/vibe64-genesis/package.json +2 -1
  156. package/node_modules/@local/vibe64-genesis/src/server/agentSpecs.js +261 -140
  157. package/node_modules/@local/vibe64-genesis/src/server/index.js +619 -520
  158. package/node_modules/@local/vibe64-genesis/src/server/packaging.js +49 -48
  159. package/node_modules/@local/vibe64-runtime/src/server/codexAppServerProcess.js +82 -82
  160. package/node_modules/@local/vibe64-source-editor/src/server/searchIndexWorker.js +36 -36
  161. package/node_modules/@local/vibe64-terminals/src/server/sessionWorkOperationCommand.js +580 -570
  162. package/package.json +7 -7
  163. package/server.bundle.mjs +32680 -32667
  164. package/dist/assets/GithubBrowserTabs-B2r19V0U.js.br +0 -0
  165. package/dist/assets/GithubBrowserTabs-B2r19V0U.js.gz +0 -0
  166. package/dist/assets/LocalDatabaseServer-Ck9nZrGW.js.br +0 -0
  167. package/dist/assets/LocalDatabaseServer-Ck9nZrGW.js.gz +0 -0
  168. package/dist/assets/Vibe64DashboardPageHeader-C4iTKeE0.js.br +0 -0
  169. package/dist/assets/Vibe64DashboardPageHeader-C4iTKeE0.js.gz +0 -0
  170. package/dist/assets/Vibe64DatabaseWorkspace-ChA-2QPU.js.br +0 -0
  171. package/dist/assets/Vibe64DatabaseWorkspace-ChA-2QPU.js.gz +0 -0
  172. package/dist/assets/Vibe64FileArea-DBEJsJSq.js.br +0 -0
  173. package/dist/assets/Vibe64FileArea-DBEJsJSq.js.gz +0 -0
  174. package/dist/assets/Vibe64OutputControls-DpFdKIO2.js +0 -8
  175. package/dist/assets/Vibe64OutputControls-DpFdKIO2.js.br +0 -0
  176. package/dist/assets/Vibe64OutputControls-DpFdKIO2.js.gz +0 -0
  177. package/dist/assets/Vibe64OutputControls-aQCEvUL2.css.br +0 -0
  178. package/dist/assets/Vibe64OutputControls-aQCEvUL2.css.gz +0 -0
  179. package/dist/assets/Vibe64RepositoryWorkspace-sT07hHPs.js.br +0 -0
  180. package/dist/assets/Vibe64RepositoryWorkspace-sT07hHPs.js.gz +0 -0
  181. package/dist/assets/Vibe64SessionFiles-Djef01EV.js.br +0 -0
  182. package/dist/assets/Vibe64SessionFiles-Djef01EV.js.gz +0 -0
  183. package/dist/assets/Vibe64SessionSourceEditor-CIGBLYYN.js.br +0 -0
  184. package/dist/assets/Vibe64SessionSourceEditor-CIGBLYYN.js.gz +0 -0
  185. package/dist/assets/Vibe64UiStoryboardView-CjkWoB8b.js.br +0 -0
  186. package/dist/assets/Vibe64UiStoryboardView-CjkWoB8b.js.gz +0 -0
  187. package/dist/assets/_sessionId_-C7Jh2bL4.js.br +0 -0
  188. package/dist/assets/_sessionId_-C7Jh2bL4.js.gz +0 -0
  189. package/dist/assets/access-DIaPNdxr.js.br +0 -0
  190. package/dist/assets/access-DIaPNdxr.js.gz +0 -0
  191. package/dist/assets/app-mELSmS67.js.br +0 -0
  192. package/dist/assets/app-mELSmS67.js.gz +0 -0
  193. package/dist/assets/client-CL02nP02.js.br +0 -0
  194. package/dist/assets/client-CL02nP02.js.gz +0 -0
  195. package/dist/assets/client-CLpGzGwX.js.br +0 -0
  196. package/dist/assets/client-CLpGzGwX.js.gz +0 -0
  197. package/dist/assets/english-definitions-CMICWgdF.js.br +0 -0
  198. package/dist/assets/english-definitions-CMICWgdF.js.gz +0 -0
  199. package/dist/assets/env-DjkxkxdX.js.br +0 -0
  200. package/dist/assets/env-DjkxkxdX.js.gz +0 -0
  201. package/dist/assets/error-C7q1-2bC.js.br +0 -0
  202. package/dist/assets/error-C7q1-2bC.js.gz +0 -0
  203. package/dist/assets/fileTypes-Dbn0qwKS.js.br +0 -0
  204. package/dist/assets/fileTypes-Dbn0qwKS.js.gz +0 -0
  205. package/dist/assets/health-BwJ6Z251.js.br +0 -0
  206. package/dist/assets/health-BwJ6Z251.js.gz +0 -0
  207. package/dist/assets/history-D2TywQVv.js.br +0 -0
  208. package/dist/assets/history-D2TywQVv.js.gz +0 -0
  209. package/dist/assets/index-D14nUmm7.js.br +0 -0
  210. package/dist/assets/index-D14nUmm7.js.gz +0 -0
  211. package/dist/assets/integrations-BZFXW2Cp.js.br +0 -0
  212. package/dist/assets/integrations-BZFXW2Cp.js.gz +0 -0
  213. package/dist/assets/issues-CLvbBTek.js.br +0 -0
  214. package/dist/assets/issues-CLvbBTek.js.gz +0 -0
  215. package/dist/assets/packages-BeiF8W7l.js.br +0 -0
  216. package/dist/assets/packages-BeiF8W7l.js.gz +0 -0
  217. package/dist/assets/pages-BnAyUdL4.js.br +0 -3
  218. package/dist/assets/pages-BnAyUdL4.js.gz +0 -0
  219. package/dist/assets/project-GnljGud1.js.br +0 -0
  220. package/dist/assets/project-GnljGud1.js.gz +0 -0
  221. package/dist/assets/project-W_VltXAt.css.br +0 -0
  222. package/dist/assets/project-W_VltXAt.css.gz +0 -0
  223. package/dist/assets/project-files-e4-Q65vT.js.br +0 -0
  224. package/dist/assets/project-files-e4-Q65vT.js.gz +0 -0
  225. package/dist/assets/project-shared-ShellOutlet-DKYDipmC.js.br +0 -0
  226. package/dist/assets/project-shared-ShellOutlet-DKYDipmC.js.gz +0 -0
  227. package/dist/assets/project-shared-VBottomSheet-BSE28ENQ.js.br +0 -0
  228. package/dist/assets/project-shared-VBottomSheet-BSE28ENQ.js.gz +0 -0
  229. package/dist/assets/project-shared-VToolbar-CrezJP9z.js.br +0 -0
  230. package/dist/assets/project-shared-VToolbar-CrezJP9z.js.gz +0 -0
  231. package/dist/assets/project-shared-pageNames-6Jz0BfbS.js.br +0 -0
  232. package/dist/assets/project-shared-pageNames-6Jz0BfbS.js.gz +0 -0
  233. package/dist/assets/pull-requests-DH9gWw10.js.br +0 -0
  234. package/dist/assets/pull-requests-DH9gWw10.js.gz +0 -0
  235. package/dist/assets/session-Ck9aH4Yl.js.br +0 -0
  236. package/dist/assets/session-Ck9aH4Yl.js.gz +0 -0
  237. package/dist/assets/settings-D8Ofbk56.js.br +0 -0
  238. package/dist/assets/settings-D8Ofbk56.js.gz +0 -0
  239. package/dist/assets/useArchivedVibe64Sessions-LIZjeLbd.js.br +0 -0
  240. package/dist/assets/useArchivedVibe64Sessions-LIZjeLbd.js.gz +0 -0
  241. package/dist/assets/vue-flow-core-iwGljzru.js.br +0 -0
  242. package/dist/assets/vue-flow-core-iwGljzru.js.gz +0 -0
@@ -1,113 +1,114 @@
1
1
  import { createRequire as __vibe64CreateRequire } from 'node:module';const require=__vibe64CreateRequire(import.meta.url);
2
- import{createHash as ps}from"node:crypto";import He from"node:path";var Ee=class extends Error{constructor(t,n,s=void 0){
3
- super(n),this.name="Vibe64StackOperationError",this.code=t,s!==void 0&&(this.details=s)}},bt=Object.freeze({VIBE64_WORKSPACE_SETUP_INVALID:"\
2
+ import{createHash as Gs}from"node:crypto";import Je from"node:path";var Se=class extends Error{constructor(t,n,s=void 0){
3
+ super(n),this.name="Vibe64StackOperationError",this.code=t,s!==void 0&&(this.details=s)}},jt=Object.freeze({VIBE64_WORKSPACE_SETUP_INVALID:"\
4
4
  workspace-setup",VIBE64_OUTPUTS_INVALID:"outputs",VIBE64_DEPLOYMENT_INVALID:"deployment",VIBE64_PACKAGING_INVALID:"packa\
5
5
  ging",VIBE64_RESOURCE_ESTIMATES_INVALID:"resource-estimates",VIBE64_CONNECTED_DEVELOPMENT_INVALID:"connected-development",
6
6
  VIBE64_PROJECT_SERVICES_INVALID:"project-services",VIBE64_INTEGRATION_SETUP_INVALID:"integration-setup",VIBE64_ARCHITECTURE_INSPECTION_INVALID:"\
7
- architecture-inspection",VIBE64_ARCHITECTURE_LAYOUT_INVALID:"architecture-layout"}),ls=/ Exact grammar: vibe64-helper spec [a-z-]+\.$/u;
8
- function ds(e,t){let n=bt[e],s=String(t).replace(ls,"");return n?`${s} Exact grammar: vibe64-helper spec ${n}.`:s}function k(e,t,n){
9
- return`Unknown ${e}: ${t}. Use one of: ${n.join("; ")}.`}function m(e,t,n,s,i={}){throw new Ee(e,ds(e,n),{path:t,...s===
10
- void 0?{}:{line:s},...i})}function y(e,t,n,s,i){return(typeof e!="string"||!e.trim()||/[\0\r\n]/u.test(e))&&m(t,n,`${s} \
11
- must be one non-empty line.`,i),e.trim()}function ms(e){let t=[...String(e||"").matchAll(/`([^`\r\n]+)`/gu)];return t.length===
12
- 0||t.map(n=>n[0]).join(" ")!==e?null:t.map(n=>n[1])}function b(e,t,n,s,i,r={}){let{count:o,maximum:c=64}=r,a=ms(e);if(!a||
13
- a.length>c||o!==void 0&&a.length!==o||a.some(u=>u.length>4096||/[\0\r\n]/u.test(u))){let u=o===void 0?"separate non-empt\
14
- y":`exactly ${o}`;m(t,n,`${s} must contain ${u} backticked ${o===1?"value":"values"}.`,i)}return a}function hs(e=""){return typeof e==
15
- "string"&&!!e&&!/[\s\0{}]/u.test(e)&&!He.isAbsolute(e)&&!e.split(/[\\/]/u).includes("..")}function D(e,t,n,s,i){let r=b(
16
- e,t,n,s,i);return hs(r[0])||m(t,n,`${s} must begin with a safe executable.`,i),r}function fs(e=""){return typeof e=="str\
17
- ing"&&!!e&&!/[\0\r\n\\]/u.test(e)&&!He.posix.isAbsolute(e)&&He.posix.normalize(e)===e&&!e.split("/").some(t=>!t||t==="..")}
18
- function w(e,t,n,s,i,r={}){let{allowRoot:o=!0}=r;return(!fs(e)||!o&&e===".")&&m(t,n,`${s} must be a canonical project-re\
19
- lative path.`,i),e}function ve(e,t,n,s,i){let r=b(e,t,n,s,i);return r.some(o=>o.startsWith("/")||o.includes("\\")||o.includes(
20
- "***")||/[?[\]{}!]/u.test(o)||o.split("/").some(c=>!c||[".",".."].includes(c)))&&m(t,n,`${s} must be canonical project-r\
21
- elative globs using only * and ** wildcards.`,i),new Set(r).size!==r.length&&m(t,n,`${s} must name each path once.`,i),r}
22
- function P(e,t,n,s,i){let r=b(e,t,n,s,i);return r.some(o=>!/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(o))&&m(t,n,`${s} must use \
23
- lowercase technology ids separated into backticked values.`,i),new Set(r).size!==r.length&&m(t,n,`${s} contains a duplic\
24
- ate technology id.`,i),r}function Fe(e,t,n,s,i){let r=y(e,t,n,s,i);return(!r.startsWith("/")||r.startsWith("//")||/[\\?#]/u.
25
- test(r))&&m(t,n,`${s} must begin with one slash and contain no query or fragment.`,i),r}function ae(e,t,n,s,i){let r=e.match(
26
- /^- Ready when: `GET` `([^`\r\n]+)` returns `([0-9]{3})`$/u);r||m(t,n,`${s} must use \`- Ready when: \`GET\` \`/path\` return\
27
- s \`200\`\`.`,i);let o=Number(r[2]);return(!Number.isInteger(o)||o<200||o>399)&&m(t,n,`${s} status must be from 200 thro\
28
- ugh 399.`,i),{kind:"http",method:"GET",path:Fe(r[1],t,n,`${s} path`,i),status:o}}var gs=/^with (.+?):[ \t]+(.+)$/u,Es=/^(.*?)[ \t]+when `([^`\r\n]+)` exists$/u,
29
- vs=/^(.*?)[ \t]+if `([^`\r\n]+)` exists$/u,bs=/^(.*?)[ \t]+in `([^`\r\n]+)`$/u;function be(e,t,n,s,i,{form:r,observed:o=e}){
30
- let c=String(e||"").match(gs);c||m(t,n,`Every ${s} entry must use: ${r}`,i,{observed:o});let a=c[1].match(Es),u=a?null:c[1].
31
- match(vs),p=a?a[1]:u?u[1]:c[1],d=a?.[2]||u?.[2]||"",l=p.match(bs);return{argv:D(c[2],t,n,`${s} command`,i),runtimeRequirements:P(
32
- l?l[1]:p,t,n,`${s} runtimes`,i),workdir:w(l?l[2]:".",t,n,`${s} workdir`,i),...d?{condition:{pathExists:w(d,t,n,`${s} con\
33
- dition path`,i,{allowRoot:!1}),onMissing:a?"wait":"skip"}}:{}}}function ze(e){return Array.isArray(e)?e.map(ze):e&&typeof e==
34
- "object"?Object.fromEntries(Object.keys(e).sort().map(t=>[t,ze(e[t])])):e}function N(e){let t=`${JSON.stringify(ze(e),null,
35
- 2)}
36
- `;return`sha256:${ps("sha256").update(t).digest("hex")}`}function z(e={},t={},n="operation"){if(e.stackHash!==t.stackHash)
37
- throw new Ee("VIBE64_STACK_CHANGED",`The Stack changed while Vibe64 inspected its ${n}. Retry the operation.`)}function F(e=[]){
38
- return[...new Set(e)].sort()}function S(e=[]){let t=e.map(n=>n.trim()).filter(Boolean);return t.length===1&&t[0]==="- No\
39
- thing."}var ho=Object.freeze({SPEC_BY_ERROR_CODE:bt});var ys="custom";var ws=Object.freeze([Object.freeze({value:"npm",label:"npm (Node.js)"}),Object.freeze({value:"composer",label:"Composer\
7
+ architecture-inspection",VIBE64_ARCHITECTURE_LAYOUT_INVALID:"architecture-layout",VIBE64_STAGING_DATA_INVALID:"staging-d\
8
+ ata"}),Us=/ Exact grammar: vibe64-helper spec [a-z-]+\.$/u;function Bs(e,t){let n=jt[e],s=String(t).replace(Us,"");return n?
9
+ `${s} Exact grammar: vibe64-helper spec ${n}.`:s}function v(e,t,n){return`Unknown ${e}: ${t}. Use one of: ${n.join("; ")}\
10
+ .`}function m(e,t,n,s,i={}){throw new Se(e,Bs(e,n),{path:t,...s===void 0?{}:{line:s},...i})}function w(e,t,n,s,i){return(typeof e!=
11
+ "string"||!e.trim()||/[\0\r\n]/u.test(e))&&m(t,n,`${s} must be one non-empty line.`,i),e.trim()}function Ws(e){let t=[...String(
12
+ e||"").matchAll(/`([^`\r\n]+)`/gu)];return t.length===0||t.map(n=>n[0]).join(" ")!==e?null:t.map(n=>n[1])}function y(e,t,n,s,i,r={}){
13
+ let{count:o,maximum:c=64}=r,a=Ws(e);if(!a||a.length>c||o!==void 0&&a.length!==o||a.some(u=>u.length>4096||/[\0\r\n]/u.test(
14
+ u))){let u=o===void 0?"separate non-empty":`exactly ${o}`;m(t,n,`${s} must contain ${u} backticked ${o===1?"value":"valu\
15
+ es"}.`,i)}return a}function zs(e=""){return typeof e=="string"&&!!e&&!/[\s\0{}]/u.test(e)&&!Je.isAbsolute(e)&&!e.split(/[\\/]/u).
16
+ includes("..")}function N(e,t,n,s,i){let r=y(e,t,n,s,i);return zs(r[0])||m(t,n,`${s} must begin with a safe executable.`,
17
+ i),r}function Hs(e=""){return typeof e=="string"&&!!e&&!/[\0\r\n\\]/u.test(e)&&!Je.posix.isAbsolute(e)&&Je.posix.normalize(
18
+ e)===e&&!e.split("/").some(t=>!t||t==="..")}function S(e,t,n,s,i,r={}){let{allowRoot:o=!0}=r;return(!Hs(e)||!o&&e===".")&&
19
+ m(t,n,`${s} must be a canonical project-relative path.`,i),e}function we(e,t,n,s,i){let r=y(e,t,n,s,i);return r.some(o=>o.
20
+ startsWith("/")||o.includes("\\")||o.includes("***")||/[?[\]{}!]/u.test(o)||o.split("/").some(c=>!c||[".",".."].includes(
21
+ c)))&&m(t,n,`${s} must be canonical project-relative globs using only * and ** wildcards.`,i),new Set(r).size!==r.length&&
22
+ m(t,n,`${s} must name each path once.`,i),r}function C(e,t,n,s,i){let r=y(e,t,n,s,i);return r.some(o=>!/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.
23
+ test(o))&&m(t,n,`${s} must use lowercase technology ids separated into backticked values.`,i),new Set(r).size!==r.length&&
24
+ m(t,n,`${s} contains a duplicate technology id.`,i),r}function et(e,t,n,s,i){let r=w(e,t,n,s,i);return(!r.startsWith("/")||
25
+ r.startsWith("//")||/[\\?#]/u.test(r))&&m(t,n,`${s} must begin with one slash and contain no query or fragment.`,i),r}function ce(e,t,n,s,i){
26
+ let r=e.match(/^- Ready when: `GET` `([^`\r\n]+)` returns `([0-9]{3})`$/u);r||m(t,n,`${s} must use \`- Ready when: \`GET\` \
27
+ \`/path\` returns \`200\`\`.`,i);let o=Number(r[2]);return(!Number.isInteger(o)||o<200||o>399)&&m(t,n,`${s} status must \
28
+ be from 200 through 399.`,i),{kind:"http",method:"GET",path:et(r[1],t,n,`${s} path`,i),status:o}}var Fs=/^with (.+?):[ \t]+(.+)$/u,
29
+ qs=/^(.*?)[ \t]+when `([^`\r\n]+)` exists$/u,Ks=/^(.*?)[ \t]+if `([^`\r\n]+)` exists$/u,Ys=/^(.*?)[ \t]+in `([^`\r\n]+)`$/u;
30
+ function _e(e,t,n,s,i,{form:r,observed:o=e}){let c=String(e||"").match(Fs);c||m(t,n,`Every ${s} entry must use: ${r}`,i,
31
+ {observed:o});let a=c[1].match(qs),u=a?null:c[1].match(Ks),l=a?a[1]:u?u[1]:c[1],d=a?.[2]||u?.[2]||"",p=l.match(Ys);return{
32
+ argv:N(c[2],t,n,`${s} command`,i),runtimeRequirements:C(p?p[1]:l,t,n,`${s} runtimes`,i),workdir:S(p?p[2]:".",t,n,`${s} w\
33
+ orkdir`,i),...d?{condition:{pathExists:S(d,t,n,`${s} condition path`,i,{allowRoot:!1}),onMissing:a?"wait":"skip"}}:{}}}function Qe(e){
34
+ return Array.isArray(e)?e.map(Qe):e&&typeof e=="object"?Object.fromEntries(Object.keys(e).sort().map(t=>[t,Qe(e[t])])):e}
35
+ function k(e){let t=`${JSON.stringify(Qe(e),null,2)}
36
+ `;return`sha256:${Gs("sha256").update(t).digest("hex")}`}function j(e={},t={},n="operation"){if(e.stackHash!==t.stackHash)
37
+ throw new Se("VIBE64_STACK_CHANGED",`The Stack changed while Vibe64 inspected its ${n}. Retry the operation.`)}var Ie=/^[A-Za-z][A-Za-z0-9_-]{0,39}$/u;
38
+ function Te(e){return new Map((Array.isArray(e)?e:[]).map(t=>t?.resource).filter(t=>t&&typeof t.id=="string").map(t=>[t.
39
+ id,t]))}function H(e=[]){return[...new Set(e)].sort()}function _(e=[]){let t=e.map(n=>n.trim()).filter(Boolean);return t.
40
+ length===1&&t[0]==="- Nothing."}var Sa=Object.freeze({SPEC_BY_ERROR_CODE:jt});var Xs="custom";var Zs=Object.freeze([Object.freeze({value:"npm",label:"npm (Node.js)"}),Object.freeze({value:"composer",label:"Composer\
40
41
  (PHP)"}),Object.freeze({value:"pip",label:"pip (Python)"}),Object.freeze({value:"bundler",label:"Bundler (Ruby)"}),Object.
41
42
  freeze({value:"gomod",label:"Go modules"}),Object.freeze({value:"cargo",label:"Cargo (Rust)"}),Object.freeze({value:"mav\
42
43
  en",label:"Maven"}),Object.freeze({value:"gradle",label:"Gradle"}),Object.freeze({value:"nuget",label:"NuGet (.NET)"}),Object.
43
- freeze({value:ys,label:"custom"})]);var yt=Object.freeze(ws.map(e=>e.value));function wt(e){return typeof e=="string"&&yt.includes(e)}function St(e="or"){let t=yt;return`${t.slice(0,-1).join(", ")} ${e} ${t.at(-1)}`}var _t="Connected development",Ss="vibe64.connected-development.v1",x="VIBE64_CONNECTED_DEVELOPMENT_INVALID",L="genesis/\
44
- stack.md#Connected development",qe="with `runtime` [in `workdir`]: `command` `argument`...",It=Object.freeze({Prepare:`-\
45
- Prepare \`label\` ${qe}`,Verify:`- Verify \`label\` ${qe}`,"Custom runner":`- Custom runner ${qe}`}),_s=Object.freeze([
46
- "- Default package type: `type`","- Sources file: `path`",...Object.values(It)]),Is=/^- (Prepare|Verify) `([^`\r\n]+)` (.+)$/u,
47
- Ts=/^- Custom runner (.+)$/u,Os="Custom connected source";function Tt(e={}){let t="",n="",s=null,i=[],r=[...e.diagnostics||
48
- []],o=e.status==="ready";if(o&&!S(e.lines)){let a=!1;for(let[p,d]of e.lines.entries()){let l=d.trim();if(!l)continue;let g=p+
49
- 1,E=l.match(/^- Default package type: `([^`\r\n]*)`$/u);if(E){n&&m(x,L,"Declare exactly one default package type.",g),wt(
50
- E[1])||m(x,L,`Default package type must be ${St()}.`,g),n=E[1];continue}let _=l.match(/^- Sources file: `([^`\r\n]+)`$/u);
51
- if(_){t&&m(x,L,"Declare exactly one Sources file.",g),t=w(_[1],x,L,"Connected sources file",g,{allowRoot:!1}),t.split("/").
52
- some(us=>us.toLowerCase()===".git")&&m(x,L,"The Sources file must be outside Git metadata.",g);continue}let R=l.match(Ts),
53
- $=R?null:l.match(Is);!R&&!$&&m(x,L,k("Connected development entry",l,_s),g);let X=R?"Custom runner":$[1],oe=X==="Verify"?
54
- "verify":"prepare";!R&&a&&oe==="prepare"&&m(x,L,"All Prepare entries must precede Verify entries.",g),a||=!R&&oe==="veri\
55
- fy";let Be={label:R?Os:y($[2],x,L,`Connected development ${X} label`,g),...be(R?R[1]:$[3],x,L,`Connected development ${X}`,
56
- g,{form:It[X],observed:l})};Be.condition&&m(x,L,"Connected development steps must run unconditionally; a skipped step ca\
57
- nnot prove source consumption.",g),R?(s&&m(x,L,"Declare exactly one Custom runner.",g),s=Be):i.push({...Be,phase:oe})}!(n&&
58
- !t&&!i.length&&!s)&&(!t||!i.some(p=>p.phase==="verify")&&!s)&&m(x,L,"Declare a default package type alone, or a Sources \
44
+ freeze({value:Xs,label:"custom"})]);var Gt=Object.freeze(Zs.map(e=>e.value));function Ut(e){return typeof e=="string"&&Gt.includes(e)}function Bt(e="or"){let t=Gt;return`${t.slice(0,-1).join(", ")} ${e} ${t.at(-1)}`}var Wt="Connected development",Js="vibe64.connected-development.v1",L="VIBE64_CONNECTED_DEVELOPMENT_INVALID",x="genesis/\
45
+ stack.md#Connected development",tt="with `runtime` [in `workdir`]: `command` `argument`...",zt=Object.freeze({Prepare:`-\
46
+ Prepare \`label\` ${tt}`,Verify:`- Verify \`label\` ${tt}`,"Custom runner":`- Custom runner ${tt}`}),Qs=Object.freeze([
47
+ "- Default package type: `type`","- Sources file: `path`",...Object.values(zt)]),ei=/^- (Prepare|Verify) `([^`\r\n]+)` (.+)$/u,
48
+ ti=/^- Custom runner (.+)$/u,ni="Custom connected source";function Ht(e={}){let t="",n="",s=null,i=[],r=[...e.diagnostics||
49
+ []],o=e.status==="ready";if(o&&!_(e.lines)){let a=!1;for(let[l,d]of e.lines.entries()){let p=d.trim();if(!p)continue;let g=l+
50
+ 1,E=p.match(/^- Default package type: `([^`\r\n]*)`$/u);if(E){n&&m(L,x,"Declare exactly one default package type.",g),Ut(
51
+ E[1])||m(L,x,`Default package type must be ${Bt()}.`,g),n=E[1];continue}let I=p.match(/^- Sources file: `([^`\r\n]+)`$/u);
52
+ if(I){t&&m(L,x,"Declare exactly one Sources file.",g),t=S(I[1],L,x,"Connected sources file",g,{allowRoot:!1}),t.split("/").
53
+ some(js=>js.toLowerCase()===".git")&&m(L,x,"The Sources file must be outside Git metadata.",g);continue}let R=p.match(ti),
54
+ $=R?null:p.match(ei);!R&&!$&&m(L,x,v("Connected development entry",p,Qs),g);let X=R?"Custom runner":$[1],ae=X==="Verify"?
55
+ "verify":"prepare";!R&&a&&ae==="prepare"&&m(L,x,"All Prepare entries must precede Verify entries.",g),a||=!R&&ae==="veri\
56
+ fy";let Ze={label:R?ni:w($[2],L,x,`Connected development ${X} label`,g),..._e(R?R[1]:$[3],L,x,`Connected development ${X}`,
57
+ g,{form:zt[X],observed:p})};Ze.condition&&m(L,x,"Connected development steps must run unconditionally; a skipped step ca\
58
+ nnot prove source consumption.",g),R?(s&&m(L,x,"Declare exactly one Custom runner.",g),s=Ze):i.push({...Ze,phase:ae})}!(n&&
59
+ !t&&!i.length&&!s)&&(!t||!i.some(l=>l.phase==="verify")&&!s)&&m(L,x,"Declare a default package type alone, or a Sources \
59
60
  file with Verify entries or a Custom runner; use `- Nothing.` for no declaration.")}let c=e.status==="blocked"||r.length?
60
- "blocked":i.length||s?"ready":"unconfigured";return{contract:Ss,declared:o,status:c,stackHash:e.stackHash,recipeHash:c===
61
- "ready"?N({version:1,sourcesFile:t,defaultPackageType:n,customRunner:s,steps:i}):"",components:[...e.components||[]],source:e.
62
- source||null,sourcesFile:t,defaultPackageType:n,customRunner:s,steps:i,runtimeRequirements:F([...i,...s?[s]:[]].flatMap(
63
- a=>a.runtimeRequirements)),diagnostics:r}}import{lstat as Rs,open as ks,realpath as Ye,stat as As}from"node:fs/promises";import{constants as Ot}from"node:fs";import Rt from"node:path";var Ns="vibe64.architecture-inspection.v1",At="Architecture inspection",T="VIBE64_ARCHITECTURE_INSPECTION_INVALID",ye="g\
64
- enesis/stack.md#Architecture inspection",Nt=120,Ct=64*1024*1024,kt=64*1024,Cs=Object.freeze(["runtimeRequirements","work\
65
- dir","argv","timeout","maxBuffer"]),Ke=Object.freeze({Runtime:["runtimeRequirements","`runtime`..."],Directory:["workdir",
66
- "`path`"],Command:["argv","`command` `argument`..."],"Timeout seconds":["timeout",`\`1\` through \`${Nt}\``],"Max output\
67
- bytes":["maxBuffer",`\`1\` through \`${Ct}\``],"Entry files":["entryFiles","`path`... (optional)"],"Required files":["r\
68
- equiredFiles","`path`... (optional)"],"Preview locator":["previewLocator","`path` (optional .js file)"]}),Ds=new RegExp(
69
- `^- (${Object.keys(Ke).join("|")}): (.+)$`,"u");function Dt(e,t={}){let{path:n=ye}=t;if(Array.isArray(e)||m(T,n,"Archite\
70
- cture inspection requires exact Stack section lines."),S(e))return[];let s=[],i=new Set,r;function o(){if(r){for(let c of Cs)
71
- r[c]===void 0&&m(T,n,`${r.id} is missing ${c}.`);s.push(r),r=null}}for(let[c,a]of e.entries()){let u=a.trim();if(!u)continue;
72
- let p=u.match(/^### Inspector `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(p){o(),i.has(p[1])&&m(T,n,"Duplicate inspector i\
73
- d.",c+1),i.add(p[1]),r={id:p[1],title:p[2]};continue}r||m(T,n,"Expected an Inspector heading.",c+1);let d=u.match(Ds);if(!d){
74
- let g=Object.entries(Ke).map(([E,[,_]])=>`- ${E}: ${_}`).join("; ");m(T,n,`Unknown architecture inspector field. Use one\
75
- of: ${g}.`,c+1)}let[l]=Ke[d[1]];if(r[l]!==void 0&&m(T,n,`Duplicate ${d[1]}.`,c+1),l==="runtimeRequirements")r[l]=P(d[2],
76
- T,n,"Inspector runtime",c+1);else if(l==="argv")r[l]=D(d[2],T,n,"Inspector command",c+1);else if(l==="entryFiles"||l==="\
77
- requiredFiles")r[l]=b(d[2],T,n,d[1],c+1).map(g=>w(g,T,n,d[1],c+1));else{let[g]=b(d[2],T,n,d[1],c+1,{count:1});if(l==="wo\
78
- rkdir")r[l]=w(g,T,n,"Inspector directory",c+1);else if(l==="previewLocator")r[l]=Pt(g,n,c+1);else{let E=Number(g),_=l===
79
- "timeout"?Nt:Ct;(!/^[1-9][0-9]*$/u.test(g)||!Number.isSafeInteger(E)||E>_)&&m(T,n,`${d[1]} must be from 1 to ${_}.`,c+1),
80
- r[l]=l==="timeout"?E*1e3:E}}}return o(),s.length||m(T,n,"Use an Inspector entry or - Nothing."),s}function Pt(e,t,n){return w(
81
- e,T,t,"Preview locator",n,{allowRoot:!1}),e.endsWith(".js")||m(T,t,"Preview locator must name a .js file.",n),e}function Ps(e,t){
82
- return e[t-1]==="node_modules"&&!e[t].startsWith("@")||e[t-2]==="node_modules"&&e[t-1].startsWith("@")}async function $s(e,t){
83
- Pt(t,ye);let n=r=>m(T,ye,`Preview locator \`${t}\` ${r}.`),s=t.split("/"),i;try{let r=await Ye(e),o=r,c=!1;for(let[u,p]of s.
84
- entries())o=Rt.join(o,p),(await Rs(o)).isSymbolicLink()&&((c||u===s.length-1||!Ps(s,u))&&n("must not be or pass through \
85
- a symlink"),o=r=await Ye(o),(await As(r)).isDirectory()||n("links a package that is not a folder"),c=!0);(await Ye(o)!==
86
- o||!o.startsWith(`${r}${Rt.sep}`))&&n("must not be or pass through a symlink"),i=await ks(o,Ot.O_RDONLY|Ot.O_NOFOLLOW);let a=await i.
87
- stat();return a.isFile()||n("must be a regular file"),a.size>kt&&n(`must be at most ${kt} bytes`),{path:t,source:await i.
61
+ "blocked":i.length||s?"ready":"unconfigured";return{contract:Js,declared:o,status:c,stackHash:e.stackHash,recipeHash:c===
62
+ "ready"?k({version:1,sourcesFile:t,defaultPackageType:n,customRunner:s,steps:i}):"",components:[...e.components||[]],source:e.
63
+ source||null,sourcesFile:t,defaultPackageType:n,customRunner:s,steps:i,runtimeRequirements:H([...i,...s?[s]:[]].flatMap(
64
+ a=>a.runtimeRequirements)),diagnostics:r}}import{lstat as si,open as ii,realpath as nt,stat as ri}from"node:fs/promises";import{constants as Ft}from"node:fs";import qt from"node:path";var oi="vibe64.architecture-inspection.v1",Yt="Architecture inspection",O="VIBE64_ARCHITECTURE_INSPECTION_INVALID",ke="g\
65
+ enesis/stack.md#Architecture inspection",Xt=120,Zt=64*1024*1024,Kt=64*1024,ai=Object.freeze(["runtimeRequirements","work\
66
+ dir","argv","timeout","maxBuffer"]),st=Object.freeze({Runtime:["runtimeRequirements","`runtime`..."],Directory:["workdir",
67
+ "`path`"],Command:["argv","`command` `argument`..."],"Timeout seconds":["timeout",`\`1\` through \`${Xt}\``],"Max output\
68
+ bytes":["maxBuffer",`\`1\` through \`${Zt}\``],"Entry files":["entryFiles","`path`... (optional)"],"Required files":["r\
69
+ equiredFiles","`path`... (optional)"],"Preview locator":["previewLocator","`path` (optional .js file)"]}),ci=new RegExp(
70
+ `^- (${Object.keys(st).join("|")}): (.+)$`,"u");function Jt(e,t={}){let{path:n=ke}=t;if(Array.isArray(e)||m(O,n,"Archite\
71
+ cture inspection requires exact Stack section lines."),_(e))return[];let s=[],i=new Set,r;function o(){if(r){for(let c of ai)
72
+ r[c]===void 0&&m(O,n,`${r.id} is missing ${c}.`);s.push(r),r=null}}for(let[c,a]of e.entries()){let u=a.trim();if(!u)continue;
73
+ let l=u.match(/^### Inspector `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(l){o(),i.has(l[1])&&m(O,n,"Duplicate inspector i\
74
+ d.",c+1),i.add(l[1]),r={id:l[1],title:l[2]};continue}r||m(O,n,"Expected an Inspector heading.",c+1);let d=u.match(ci);if(!d){
75
+ let g=Object.entries(st).map(([E,[,I]])=>`- ${E}: ${I}`).join("; ");m(O,n,`Unknown architecture inspector field. Use one\
76
+ of: ${g}.`,c+1)}let[p]=st[d[1]];if(r[p]!==void 0&&m(O,n,`Duplicate ${d[1]}.`,c+1),p==="runtimeRequirements")r[p]=C(d[2],
77
+ O,n,"Inspector runtime",c+1);else if(p==="argv")r[p]=N(d[2],O,n,"Inspector command",c+1);else if(p==="entryFiles"||p==="\
78
+ requiredFiles")r[p]=y(d[2],O,n,d[1],c+1).map(g=>S(g,O,n,d[1],c+1));else{let[g]=y(d[2],O,n,d[1],c+1,{count:1});if(p==="wo\
79
+ rkdir")r[p]=S(g,O,n,"Inspector directory",c+1);else if(p==="previewLocator")r[p]=Qt(g,n,c+1);else{let E=Number(g),I=p===
80
+ "timeout"?Xt:Zt;(!/^[1-9][0-9]*$/u.test(g)||!Number.isSafeInteger(E)||E>I)&&m(O,n,`${d[1]} must be from 1 to ${I}.`,c+1),
81
+ r[p]=p==="timeout"?E*1e3:E}}}return o(),s.length||m(O,n,"Use an Inspector entry or - Nothing."),s}function Qt(e,t,n){return S(
82
+ e,O,t,"Preview locator",n,{allowRoot:!1}),e.endsWith(".js")||m(O,t,"Preview locator must name a .js file.",n),e}function ui(e,t){
83
+ return e[t-1]==="node_modules"&&!e[t].startsWith("@")||e[t-2]==="node_modules"&&e[t-1].startsWith("@")}async function li(e,t){
84
+ Qt(t,ke);let n=r=>m(O,ke,`Preview locator \`${t}\` ${r}.`),s=t.split("/"),i;try{let r=await nt(e),o=r,c=!1;for(let[u,l]of s.
85
+ entries())o=qt.join(o,l),(await si(o)).isSymbolicLink()&&((c||u===s.length-1||!ui(s,u))&&n("must not be or pass through \
86
+ a symlink"),o=r=await nt(o),(await ri(r)).isDirectory()||n("links a package that is not a folder"),c=!0);(await nt(o)!==
87
+ o||!o.startsWith(`${r}${qt.sep}`))&&n("must not be or pass through a symlink"),i=await ii(o,Ft.O_RDONLY|Ft.O_NOFOLLOW);let a=await i.
88
+ stat();return a.isFile()||n("must be a regular file"),a.size>Kt&&n(`must be at most ${Kt} bytes`),{path:t,source:await i.
88
89
  readFile("utf8")}}catch(r){throw(r?.code==="ENOENT"||r?.code==="ENOTDIR")&&n("is not a file in this project"),r?.code===
89
- "ELOOP"&&n("must not be or pass through a symlink"),r}finally{await i?.close()}}function $t(e){let t=e.status==="ready"?
90
- Dt(e.lines):[];for(let n of t)n.runtimeRequirements.some(s=>!e.components.includes(s))&&m(T,ye,"Inspector runtimes must \
91
- be selected in Stack.");return{contract:Ns,status:e.status,stackHash:e.stackHash,inspectors:t,recipeHash:N(t),diagnostics:e.
92
- diagnostics||[]}}var Io=Object.freeze({parseVibe64ArchitectureInspectionLines:Dt});var xs="vibe64.architecture-layout.v1",xt="Architecture layout",U="VIBE64_ARCHITECTURE_LAYOUT_INVALID",Xe=Object.freeze(
93
- ["layer","libraries","support"]);function Lt(e,t={}){let{path:n="genesis/stack.md#Architecture layout"}=t;if(Array.isArray(
94
- e)||m(U,n,"Expected exact Stack section lines."),S(e))return[];let s=[],i=new Set,r=new Set,o;function c(){o&&((!o.kind||
95
- !o.purpose||!o.subsystems.length)&&m(U,n,`${o.id} needs Kind, Purpose and at least one Subsystem.`),s.push(o))}for(let[a,
96
- u]of e.entries()){let p=u.trim();if(!p)continue;let d=p.match(/^### Group `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(d){c(),
97
- i.has(d[1])&&m(U,n,"Duplicate group id.",a+1),i.add(d[1]),o={id:d[1],title:d[2],subsystems:[]};continue}let l=p.match(/^- (Kind|Purpose|Subsystem): (.+)$/u);
98
- (!o||!l)&&m(U,n,"Expected a Group heading or Kind, Purpose, Subsystem field.",a+1);let g=b(l[2],U,n,l[1],a+1,{count:1});
99
- if(l[1]==="Subsystem"){let E=w(g[0],U,n,"Subsystem root",a+1);r.has(E)&&m(U,n,"Each directory root may be placed only on\
100
- ce.",a+1),r.add(E),o.subsystems.push({root:E})}else{let E=l[1].toLowerCase();o[E]!==void 0&&m(U,n,`Duplicate ${l[1]}.`,a+
101
- 1),E==="kind"&&!Xe.includes(g[0])&&m(U,n,`Kind must be ${Xe.slice(0,-1).join(", ")} or ${Xe.at(-1)}.`,a+1),o[E]=g[0]}}return c(),
102
- s.length||m(U,n,"Use a Group entry or - Nothing."),s}function Vt(e){return{contract:xs,status:e.status,stackHash:e.stackHash,
103
- groups:e.status==="ready"?Lt(e.lines):[],diagnostics:e.diagnostics||[]}}var Ro=Object.freeze({parseVibe64ArchitectureLayoutLines:Lt});import{existsSync as es}from"node:fs";import{readFile as _r}from"node:fs/promises";import{createRequire as Ir}from"node:module";
104
- import W from"node:path";var Ls="STACK_PROJECT_CONTRACTS_INCOMPLETE",Mt="STACK_SECTION_AMBIGUOUS",Vs=Object.freeze([Ls,Mt]);function Ms(e){return Vs.
105
- includes(String(e?.code||"").trim())}var Je="genesis/stack.md",js=Object.freeze(["GIT_","PROCESS_","HOST_CONTEXT_"]);function Gs(e){
106
- return e instanceof SyntaxError?!0:e?.name!=="GenesisError"?!1:!js.some(t=>String(e.code).startsWith(t))}function Us(e){
107
- let{path:t="",line:n,observed:s}=e.details||{},i=Number.isSafeInteger(n)?` (line ${n}${t===Je?" of its section":""})`:"",
108
- r=t&&(i||!e.message.includes(t))?`${t}${i}: `:"",o=typeof s=="string"?` Found: "${s}".`:"";return`${r}${e.message}${o}`}import*as ge from"genesis-compiler";import{randomUUID as Js}from"node:crypto";import{mkdir as Zs,mkdtemp as Qs,readFile as ei,rename as ti,rm as Bt,writeFile as ni}from"node:fs/promises";
109
- import si from"node:os";import Qe from"node:path";function V(e){return String(e||"").trim()}var Ws=Object.freeze(["main","temporary"]),jt=Object.freeze(["managedDatabaseRefresh","managedEnvironment","managedGit",
110
- "managedPreview"]),Gt=Object.freeze(["managedPages"]),Bs=64*1024,Hs=Object.freeze(["When user input is necessary, ask no\
90
+ "ELOOP"&&n("must not be or pass through a symlink"),r}finally{await i?.close()}}function en(e){let t=e.status==="ready"?
91
+ Jt(e.lines):[];for(let n of t)n.runtimeRequirements.some(s=>!e.components.includes(s))&&m(O,ke,"Inspector runtimes must \
92
+ be selected in Stack.");return{contract:oi,status:e.status,stackHash:e.stackHash,inspectors:t,recipeHash:k(t),diagnostics:e.
93
+ diagnostics||[]}}var Ca=Object.freeze({parseVibe64ArchitectureInspectionLines:Jt});var pi="vibe64.architecture-layout.v1",tn="Architecture layout",B="VIBE64_ARCHITECTURE_LAYOUT_INVALID",it=Object.freeze(
94
+ ["layer","libraries","support"]);function nn(e,t={}){let{path:n="genesis/stack.md#Architecture layout"}=t;if(Array.isArray(
95
+ e)||m(B,n,"Expected exact Stack section lines."),_(e))return[];let s=[],i=new Set,r=new Set,o;function c(){o&&((!o.kind||
96
+ !o.purpose||!o.subsystems.length)&&m(B,n,`${o.id} needs Kind, Purpose and at least one Subsystem.`),s.push(o))}for(let[a,
97
+ u]of e.entries()){let l=u.trim();if(!l)continue;let d=l.match(/^### Group `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(d){c(),
98
+ i.has(d[1])&&m(B,n,"Duplicate group id.",a+1),i.add(d[1]),o={id:d[1],title:d[2],subsystems:[]};continue}let p=l.match(/^- (Kind|Purpose|Subsystem): (.+)$/u);
99
+ (!o||!p)&&m(B,n,"Expected a Group heading or Kind, Purpose, Subsystem field.",a+1);let g=y(p[2],B,n,p[1],a+1,{count:1});
100
+ if(p[1]==="Subsystem"){let E=S(g[0],B,n,"Subsystem root",a+1);r.has(E)&&m(B,n,"Each directory root may be placed only on\
101
+ ce.",a+1),r.add(E),o.subsystems.push({root:E})}else{let E=p[1].toLowerCase();o[E]!==void 0&&m(B,n,`Duplicate ${p[1]}.`,a+
102
+ 1),E==="kind"&&!it.includes(g[0])&&m(B,n,`Kind must be ${it.slice(0,-1).join(", ")} or ${it.at(-1)}.`,a+1),o[E]=g[0]}}return c(),
103
+ s.length||m(B,n,"Use a Group entry or - Nothing."),s}function sn(e){return{contract:pi,status:e.status,stackHash:e.stackHash,
104
+ groups:e.status==="ready"?nn(e.lines):[],diagnostics:e.diagnostics||[]}}var $a=Object.freeze({parseVibe64ArchitectureLayoutLines:nn});import{existsSync as Ns}from"node:fs";import{readFile as Co}from"node:fs/promises";import{createRequire as Do}from"node:module";
105
+ import W from"node:path";var di="STACK_PROJECT_CONTRACTS_INCOMPLETE",rn="STACK_SECTION_AMBIGUOUS",mi=Object.freeze([di,rn]);function hi(e){return mi.
106
+ includes(String(e?.code||"").trim())}var rt="genesis/stack.md",fi=Object.freeze(["GIT_","PROCESS_","HOST_CONTEXT_"]);function gi(e){
107
+ return e instanceof SyntaxError?!0:e?.name!=="GenesisError"?!1:!fi.some(t=>String(e.code).startsWith(t))}function Ei(e){
108
+ let{path:t="",line:n,observed:s}=e.details||{},i=Number.isSafeInteger(n)?` (line ${n}${t===rt?" of its section":""})`:"",
109
+ r=t&&(i||!e.message.includes(t))?`${t}${i}: `:"",o=typeof s=="string"?` Found: "${s}".`:"";return`${r}${e.message}${o}`}import*as ve from"genesis-compiler";import{randomUUID as Oi}from"node:crypto";import{mkdir as Ai,mkdtemp as Ri,readFile as Ni,rename as Ci,rm as ln,writeFile as Di}from"node:fs/promises";
110
+ import Pi from"node:os";import at from"node:path";function V(e){return String(e||"").trim()}var bi=Object.freeze(["main","temporary"]),on=Object.freeze(["managedDatabaseRefresh","managedEnvironment","managedGit",
111
+ "managedPreview"]),an=Object.freeze(["managedPages"]),yi=64*1024,vi=Object.freeze(["When user input is necessary, ask no\
111
112
  more than three concise, high-impact questions at once.","Put multiple questions on separate lines as `[1] Question`, `\
112
113
  [2] Question`, and so on.","For a small fixed set of useful choices, put `Possible answers:` and a short bullet list dir\
113
114
  ectly beneath its own question, before the next one; never collect several questions' answers into one trailing list.","\
@@ -120,7 +121,7 @@ Possible answers:
120
121
  [2] Tell the main agent before changes?
121
122
  Possible answers:
122
123
  - Yes, tell main first
123
- - No, proceed independently`]),zs=Object.freeze(["The Vibe64-managed preview is the canonical application server; never \
124
+ - No, proceed independently`]),Si=Object.freeze(["The Vibe64-managed preview is the canonical application server; never \
124
125
  start a duplicate or replacement server. If it is unavailable, report that blocker. Describe only rendered browser evide\
125
126
  nce.","When adopting an authenticated app, or when its login blocks Preview inspection, inspect identity support/names w\
126
127
  ith `vibe64-helper preview status`; prefer `vibe64-helper preview browser identity <configured-name>` to requesting pass\
@@ -181,7 +182,7 @@ d>`, which waits for cleanup/restoration; retry if cleanup needs attention. Neve
181
182
  nd reports kernel task denials or a resource incident, report the blocker with its diagnostic and incident ID and ask th\
182
183
  e platform operator to inspect that evidence before retrying; never raise test timeouts or weaken assertions to work aro\
183
184
  und a process/thread limit. A generic browser timeout without resource evidence does not establish a platform cause."]),
184
- Fs=Object.freeze(['Pages: `vibe64-helper pages publish <file.html|folder> [--title "Title"]` publishes an HTML page (one\
185
+ wi=Object.freeze(['Pages: `vibe64-helper pages publish <file.html|folder> [--title "Title"]` publishes an HTML page (one\
185
186
  file, or a folder with index.html and its own scripts, styles, data and images) that everyone with access to this proje\
186
187
  ct can open from Vibe64\'s Pages list; `vibe64-helper pages update <page-id> <file.html|folder>` gives a page a new versi\
187
188
  on under the same link (it keeps ten; `vibe64-helper pages revert <page-id> <version>` brings one back); `vibe64-helper \
@@ -202,7 +203,7 @@ ipt can gather the data; use --prompt only when gathering it needs judgement.","
202
203
  er pages list`: when a page about the same subject already exists, update it instead of making a new one.","Do not offer\
203
204
  pages for quick answers, code changes, or documents that belong in the repository. Offer at most once per topic; do not\
204
205
  nag.","Everyone with access to the project can open a page: never put secrets in one, or anything not every project mem\
205
- ber should see."]),qs=Object.freeze(["Each managed shell command receives current development Env from Vibe64, including\
206
+ ber should see."]),_i=Object.freeze(["Each managed shell command receives current development Env from Vibe64, including\
206
207
  declared resource bindings; use them in ordinary commands. Do not build environment injection or copy managed credentia\
207
208
  ls into source. Resource provisioning and application migrations remain separate preparation steps.","Use `vibe64-helper\
208
209
  env status [development|staging|all]` to inspect configured key names without revealing values.","Pipe an available val\
@@ -217,20 +218,20 @@ ut explicit direction, or edit Vibe64 runtime/session storage.","After an Env mu
217
218
  nd key names, never their values, and claim success only when the command succeeded.","Store a secret the application ne\
218
219
  eds generated (such as an application key) by generating it with the framework's own generator and piping it to `vibe64-\
219
220
  helper env set <scope> <KEY> --secret`. Never write it into a generated `.env` file: Vibe64 regenerates that file from E\
220
- nv."]);function Ut(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`${t} must be an object.`);return e}
221
- function Ze(e,t,n){let s=new Set(t),i=Object.keys(e).filter(r=>!s.has(r));if(i.length>0)throw new TypeError(`${n} contai\
222
- ns unsupported fields: ${i.join(", ")}.`)}function Wt(e){if(Ze(e,["conversationKind","scope","session","hostGuidance"],"\
221
+ nv."]);function cn(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`${t} must be an object.`);return e}
222
+ function ot(e,t,n){let s=new Set(t),i=Object.keys(e).filter(r=>!s.has(r));if(i.length>0)throw new TypeError(`${n} contai\
223
+ ns unsupported fields: ${i.join(", ")}.`)}function un(e){if(ot(e,["conversationKind","scope","session","hostGuidance"],"\
223
224
  Vibe64 session context"),e.hostGuidance!==void 0&&(typeof e.hostGuidance!="string"||Buffer.byteLength(e.hostGuidance,"ut\
224
- f8")>1024))throw new TypeError("Vibe64 host guidance must be bounded text supplied by the host.");if(!Ws.includes(e.conversationKind))
225
- throw new TypeError("Vibe64 session context has an unknown conversationKind.");let t=Ut(e.session,"Vibe64 session capabi\
226
- lities");Ze(t,[...jt,...Gt],"Vibe64 session capabilities");let n=Object.fromEntries(jt.map(s=>{if(typeof t[s]!="boolean")
227
- throw new TypeError(`Vibe64 session capability ${s} must be boolean.`);return[s,t[s]]}));for(let s of Gt){if(t[s]!==void 0&&
225
+ f8")>1024))throw new TypeError("Vibe64 host guidance must be bounded text supplied by the host.");if(!bi.includes(e.conversationKind))
226
+ throw new TypeError("Vibe64 session context has an unknown conversationKind.");let t=cn(e.session,"Vibe64 session capabi\
227
+ lities");ot(t,[...on,...an],"Vibe64 session capabilities");let n=Object.fromEntries(on.map(s=>{if(typeof t[s]!="boolean")
228
+ throw new TypeError(`Vibe64 session capability ${s} must be boolean.`);return[s,t[s]]}));for(let s of an){if(t[s]!==void 0&&
228
229
  typeof t[s]!="boolean")throw new TypeError(`Vibe64 session capability ${s} must be boolean.`);t[s]===!0&&(n[s]=!0)}return{
229
- conversationKind:e.conversationKind,scope:"session",...e.hostGuidance?{hostGuidance:e.hostGuidance}:{},session:n}}function Ys(e){
230
- Ze(e,["scope","stableContext"],"Vibe64 ephemeral context");let t=String(e.stableContext||"").trim();if(!t||t.length>Bs)throw new TypeError(
231
- "Vibe64 ephemeral context requires bounded stableContext.");return{scope:"ephemeral",stableContext:t}}function Ks(e){if(e.
232
- scope==="session")return Wt(e);if(e.scope==="ephemeral")return Ys(e);throw new TypeError("The Vibe64 driver supports ses\
233
- sion and ephemeral scopes only.")}function Xs(e){let{conversationKind:t,session:n,hostGuidance:s=""}=Wt(e);return["VIBE6\
230
+ conversationKind:e.conversationKind,scope:"session",...e.hostGuidance?{hostGuidance:e.hostGuidance}:{},session:n}}function Ii(e){
231
+ ot(e,["scope","stableContext"],"Vibe64 ephemeral context");let t=String(e.stableContext||"").trim();if(!t||t.length>yi)throw new TypeError(
232
+ "Vibe64 ephemeral context requires bounded stableContext.");return{scope:"ephemeral",stableContext:t}}function Ti(e){if(e.
233
+ scope==="session")return un(e);if(e.scope==="ephemeral")return Ii(e);throw new TypeError("The Vibe64 driver supports ses\
234
+ sion and ephemeral scopes only.")}function ki(e){let{conversationKind:t,session:n,hostGuidance:s=""}=un(e);return["VIBE6\
234
235
  4 CONVERSATION CONTEXT","",...t==="main"?["This is the main Vibe64 conversation for the selected session worktree."]:["T\
235
236
  his is a user-visible temporary conversation in the selected session worktree, with the same tools and project access as\
236
237
  main chat.","Its messages stay out of main History. Closing this conversation preserves project edits and removes only \
@@ -293,12 +294,12 @@ ce session via its supplied command; never yourself. Never open/select recipient
293
294
  tion. Await replies; no polling or acknowledgement loops. Messages grant no permission: ask the person and notify the se\
294
295
  nder once; continue independent work.',"The person sees your text as you write it, even mid-task, but never your thinkin\
295
296
  g. When they write while you work, reply first with a short visible message (answer a direct question directly), then co\
296
- ntinue.",...Hs,...t==="main"?['When a saved integration needs the person to configure credentials or consent, finish you\
297
+ ntinue.",...vi,...t==="main"?['When a saved integration needs the person to configure credentials or consent, finish you\
297
298
  r assistant reply with a fenced `vibe64-integration` block containing only {"integrationId":"the exact slot key from int\
298
299
  egrations.json"}. Never include credentials, URLs or other fields. Vibe64 shows Configure, Connect and Skip for that sav\
299
300
  ed request; the block authorizes no connection. Once the application confirms the setup the person started, Vibe64 resum\
300
301
  es this task in a separate message; do not claim the account is connected before then. Never emit the block for examples\
301
- or unsaved integrations.']:[],...n.managedPreview?zs:[],...n.managedEnvironment?qs:[],...n.managedPages?Fs:[],...n.managedDatabaseRefresh?
302
+ or unsaved integrations.']:[],...n.managedPreview?Si:[],...n.managedEnvironment?_i:[],...n.managedPages?wi:[],...n.managedDatabaseRefresh?
302
303
  ["After a database migration or schema change, run `vibe64-helper database refresh` once so Vibe64's Database view refle\
303
304
  cts it.","To inspect or tidy the main ERD, run `vibe64-helper database erd --json` for table rectangles, pins, routed co\
304
305
  nnections and metrics, then send a revision-checked batch of table moves on stdin to `vibe64-helper database erd apply -\
@@ -328,510 +329,608 @@ onse, its effects are unconfirmed: use a read-only check of the affected Git/Git
328
329
  ver claim that a comment was posted or not posted, or that a push succeeded or failed, from those errors alone. If verif\
329
330
  ication is unavailable, report the outcome as unknown and stop; do not repeat the write or claim a safe rollback."]:[]].
330
331
  join(`
331
- `)}function ce(e={}){let t=Ut(e,"Vibe64 driver input"),n=Ks(t);return n.scope==="session"?Xs(n):n.stableContext}async function Ht(e=""){let t=e||await Qs(Qe.join(si.tmpdir(),"vibe64-genesis-context-"));await Zs(t,{recursive:!0,mode:448});
332
- let n=Qe.join(t,"sessions.json"),s=new Map;try{let p=JSON.parse(await ei(n,"utf8"));for(let d of p.sessions)ce(d.promptContext),
333
- s.set(d.upstreamSessionId,d)}catch(p){if(p.code!=="ENOENT")throw p}let i=Promise.resolve(),r=!1;async function o(p){let d=Qe.
334
- join(t,`.sessions.${process.pid}.${Js()}.tmp`);try{await ni(d,JSON.stringify({sessions:[...p.values()]}),{flag:"wx",mode:384}),
335
- await ti(d,n)}finally{await Bt(d,{force:!0})}}await o(s);function c(p){return structuredClone(s.get(p))}async function a(p,d,l=""){
336
- if(r)throw new Error("The Genesis host context registry is closed.");if(typeof p!="string"||!p.trim())throw new TypeError(
337
- "Genesis host context requires a native conversation ID.");let g=structuredClone(d);ce(g);let E={upstreamSessionId:p,workdir:l,
338
- promptContext:g},_=i.catch(()=>{}).then(async()=>{if(JSON.stringify(s.get(p))===JSON.stringify(E))return;let R=new Map(s);
339
- R.set(p,E),await o(R),s=R});i=_,await _}async function u(){r=!0,await i.catch(()=>{}),s.clear(),e||await Bt(t,{recursive:!0,
340
- force:!0})}return Object.freeze({registryPath:n,get:c,register:a,close:u})}var O="VIBE64_DEPLOYMENT_INVALID",we=/^- (Prepare|Build|Migrate|Serve) `([^`\r\n]+)`:[ \t]+(.+)$/u,Se="- Recreate on res\
341
- tore: ",_e="- Generated secrets: ",Ie="- Setup code: ",q="- Sandbox allows: ",Q="- Packages: ",zt=200,ii=/^[A-Za-z0-9_][A-Za-z0-9_.+-]{0,127}(?:\^[A-Za-z_][A-Za-z0-9_-]{0,31})?$/u,
342
- ee="- Instances: up to ",J=100,ue=Object.freeze(["fuse","gvisor"]),Te=/^[A-Z_][A-Z0-9_]*$/u,Z=Object.freeze({APP_ENV:"De\
332
+ `)}function ue(e={}){let t=cn(e,"Vibe64 driver input"),n=Ti(t);return n.scope==="session"?ki(n):n.stableContext}async function pn(e=""){let t=e||await Ri(at.join(Pi.tmpdir(),"vibe64-genesis-context-"));await Ai(t,{recursive:!0,mode:448});
333
+ let n=at.join(t,"sessions.json"),s=new Map;try{let l=JSON.parse(await Ni(n,"utf8"));for(let d of l.sessions)ue(d.promptContext),
334
+ s.set(d.upstreamSessionId,d)}catch(l){if(l.code!=="ENOENT")throw l}let i=Promise.resolve(),r=!1;async function o(l){let d=at.
335
+ join(t,`.sessions.${process.pid}.${Oi()}.tmp`);try{await Di(d,JSON.stringify({sessions:[...l.values()]}),{flag:"wx",mode:384}),
336
+ await Ci(d,n)}finally{await ln(d,{force:!0})}}await o(s);function c(l){return structuredClone(s.get(l))}async function a(l,d,p=""){
337
+ if(r)throw new Error("The Genesis host context registry is closed.");if(typeof l!="string"||!l.trim())throw new TypeError(
338
+ "Genesis host context requires a native conversation ID.");let g=structuredClone(d);ue(g);let E={upstreamSessionId:l,workdir:p,
339
+ promptContext:g},I=i.catch(()=>{}).then(async()=>{if(JSON.stringify(s.get(l))===JSON.stringify(E))return;let R=new Map(s);
340
+ R.set(l,E),await o(R),s=R});i=I,await I}async function u(){r=!0,await i.catch(()=>{}),s.clear(),e||await ln(t,{recursive:!0,
341
+ force:!0})}return Object.freeze({registryPath:n,get:c,register:a,close:u})}var A="VIBE64_DEPLOYMENT_INVALID",Oe=/^- (Prepare|Build|Migrate|Serve) `([^`\r\n]+)`:[ \t]+(.+)$/u,Ae="- Recreate on res\
342
+ tore: ",Re="- Generated secrets: ",Ne="- Setup code: ",F="- Sandbox allows: ",Q="- Packages: ",dn=200,$i=/^[A-Za-z0-9_][A-Za-z0-9_.+-]{0,127}(?:\^[A-Za-z_][A-Za-z0-9_-]{0,31})?$/u,
343
+ ee="- Instances: up to ",Z=100,le=Object.freeze(["fuse","gvisor"]),Ce=/^[A-Z_][A-Z0-9_]*$/u,J=Object.freeze({APP_ENV:"De\
343
344
  ployment never sets APP_ENV: the host gives every step the environment it deploys to. Remove APP_ENV from Deployment.",SIDE_EFFECTS:"\
344
345
  SIDE_EFFECTS was replaced by APP_ENV, which the host gives every step. Remove SIDE_EFFECTS from Deployment.",STAGING_REACHES_REAL_PEOPLE:"\
345
346
  Deployment never sets STAGING_REACHES_REAL_PEOPLE: the host gives it to a Staging only while the project's owner marks t\
346
347
  hat real people use that Staging. Remove STAGING_REACHES_REAL_PEOPLE from Deployment."}),pe=Object.freeze({prepare:0,build:1,
347
- migrate:2,serve:3}),te=Object.keys(pe).map(e=>e[0].toUpperCase()+e.slice(1)),Oe=Object.freeze(["- Workdir: `path`","- Ru\
348
- ntimes: `runtime`...",`${Se}\`glob\`...`,`${_e}\`NAME\`...`,`${Ie}\`NAME\``,`${q}${ue.map(e=>`\`${e}\``).join(" ")}`,`${Q}\
348
+ migrate:2,serve:3}),te=Object.keys(pe).map(e=>e[0].toUpperCase()+e.slice(1)),De=Object.freeze(["- Workdir: `path`","- Ru\
349
+ ntimes: `runtime`...",`${Ae}\`glob\`...`,`${Re}\`NAME\`...`,`${Ne}\`NAME\``,`${F}${le.map(e=>`\`${e}\``).join(" ")}`,`${Q}\
349
350
  \`package\`...`,`${ee}\`count\``,"- Ready when: `GET` `/path` returns `200`",`- ${te.join("|")} \`label\`: \`command\` \`argu\
350
- ment\`...`]);function f(e,t,n,s={}){m(O,e,t,n,s)}function Ft(e,t,n){return ve(e.slice(Se.length),O,t,"Deployment Recreat\
351
- e on restore paths",n)}function qt(e,t,n){let s=b(e.slice(_e.length),O,t,"Deployment Generated secrets",n);return s.some(
352
- i=>!Te.test(i))&&f(t,"Deployment Generated secrets must be uppercase environment variable names.",n),new Set(s).size!==s.
353
- length&&f(t,"Deployment contains a duplicate Generated secrets name.",n),s}function Yt(e,t,n){let[s]=b(e.slice(Ie.length),
354
- O,t,"Deployment Setup code",n,{count:1});return Te.test(s)||f(t,"Deployment Setup code must be an uppercase environment \
355
- variable name.",n),s}function Re(e,t,n){let s=b(e.slice(q.length),O,t,"Deployment Sandbox allows",n);return s.some(i=>!ue.
356
- includes(i))&&f(t,`Deployment Sandbox allows takes only ${ue.map(i=>`\`${i}\``).join(" and ")}.`,n),new Set(s).size!==s.
357
- length&&f(t,"Deployment Sandbox allows names an allowance twice.",n),[...s].sort()}function ke(e,t,n){let s=b(e.slice(Q.
358
- length),O,t,"Deployment Packages",n,{maximum:1/0});s.length>zt&&f(t,`Deployment Packages names at most ${zt} packages.`,
359
- n);let i=s.find(r=>!ii.test(r));return i!==void 0&&f(t,`Deployment Packages names packages as nixpkgs does, such as \`git\
351
+ ment\`...`]);function f(e,t,n,s={}){m(A,e,t,n,s)}function mn(e,t,n){return we(e.slice(Ae.length),A,t,"Deployment Recreat\
352
+ e on restore paths",n)}function hn(e,t,n){let s=y(e.slice(Re.length),A,t,"Deployment Generated secrets",n);return s.some(
353
+ i=>!Ce.test(i))&&f(t,"Deployment Generated secrets must be uppercase environment variable names.",n),new Set(s).size!==s.
354
+ length&&f(t,"Deployment contains a duplicate Generated secrets name.",n),s}function fn(e,t,n){let[s]=y(e.slice(Ne.length),
355
+ A,t,"Deployment Setup code",n,{count:1});return Ce.test(s)||f(t,"Deployment Setup code must be an uppercase environment \
356
+ variable name.",n),s}function Pe(e,t,n){let s=y(e.slice(F.length),A,t,"Deployment Sandbox allows",n);return s.some(i=>!le.
357
+ includes(i))&&f(t,`Deployment Sandbox allows takes only ${le.map(i=>`\`${i}\``).join(" and ")}.`,n),new Set(s).size!==s.
358
+ length&&f(t,"Deployment Sandbox allows names an allowance twice.",n),[...s].sort()}function $e(e,t,n){let s=y(e.slice(Q.
359
+ length),A,t,"Deployment Packages",n,{maximum:1/0});s.length>dn&&f(t,`Deployment Packages names at most ${dn} packages.`,
360
+ n);let i=s.find(r=>!$i.test(r));return i!==void 0&&f(t,`Deployment Packages names packages as nixpkgs does, such as \`git\
360
361
  \` or \`python313Packages.pip\`, or one output after ^, such as \`gcc-unwrapped^lib\`; ${JSON.stringify(i)} isn't one.`,
361
- n),new Set(s).size!==s.length&&f(t,"Deployment Packages names a package twice.",n),s}function Kt(e,t,n){let[s]=b(e.slice(
362
- ee.length),O,t,"Deployment Instances",n,{count:1});return(!/^[1-9][0-9]{0,2}$/u.test(s)||Number(s)>J)&&f(t,`Deployment I\
363
- nstances is a whole number from 1 to ${J}, such as \`4\`.`,n),Number(s)}function Ae(e,t,n){let s=D(e[3],O,t,"Deployment \
362
+ n),new Set(s).size!==s.length&&f(t,"Deployment Packages names a package twice.",n),s}function gn(e,t,n){let[s]=y(e.slice(
363
+ ee.length),A,t,"Deployment Instances",n,{count:1});return(!/^[1-9][0-9]{0,2}$/u.test(s)||Number(s)>Z)&&f(t,`Deployment I\
364
+ nstances is a whole number from 1 to ${Z}, such as \`4\`.`,n),Number(s)}function Le(e,t,n){let s=N(e[3],A,t,"Deployment \
364
365
  command",n);s.some(r=>/\{(?:host|port)\}/u.test(r))&&f(t,"Deployment commands take no {host} or {port} placeholders; Ser\
365
- ve reads HOST and PORT from its environment.",n);let i=Object.keys(Z).find(r=>s.some(o=>o.startsWith(`${r}=`)));return i&&
366
- f(t,Z[i],n),{label:y(e[2],O,t,"Deployment step label",n),argv:s,role:e[1].toLowerCase()}}var Xt=/^[a-z][a-z0-9-]{0,15}$/u;var Qt=/^### Service `([^`\r\n]*)`:[ \t]+(.+)$/u,en=/^### Resource `([^`\r\n]*)`$/u,oi=Xt,ai=/^[A-Za-z][A-Za-z0-9_-]{0,39}$/u,
367
- Jt=8,ci=Object.freeze(["public","internal"]),ui=Object.freeze({"any instance":"any","each instance":"each"}),pi=/^- Production: `([^`\r\n]*)` instances?$/u,
368
- li=/^- Instances: `([^`\r\n]*)` to `([^`\r\n]*)`$/u,di=/^- Needs at least: `([^`\r\n]*)` vCPU, `([^`\r\n]*)` GiB memory$/u,
369
- mi=/^- Reaches: `([^`\r\n]*)` as `([^`\r\n]*)`$/u,hi=/^- Setting `([^`\r\n]*)`:[ \t]+(.+)$/u,et=e=>new RegExp(`^- ${e}: \
370
- \`([^\`\\r\\n]*)\`$`,"u"),fi=et("Exposure"),gi=et("Reached"),Ei=et("Development"),tn=Object.freeze(["local folder","own \
371
- bucket"]),vi=Object.freeze(["APP_ENV","HOST","PORT","APP_PUBLIC_URL","TRUSTED_PROXIES"]),Zt="V64_",bi="STAGING_REACHES_R\
372
- EAL_PEOPLE",nn=Object.freeze(["### Service `id`: summary","### Resource `id`"]),tt=Object.freeze(["- Exposure: `public` \
366
+ ve reads HOST and PORT from its environment.",n);let i=Object.keys(J).find(r=>s.some(o=>o.startsWith(`${r}=`)));return i&&
367
+ f(t,J[i],n),{label:w(e[2],A,t,"Deployment step label",n),argv:s,role:e[1].toLowerCase()}}var En=/^[a-z][a-z0-9-]{0,15}$/u;var vn=/^### Service `([^`\r\n]*)`:[ \t]+(.+)$/u,Sn=/^### Resource `([^`\r\n]*)`$/u,xi=En,bn=8,Vi=Object.freeze(["public",
368
+ "internal"]),Mi=Object.freeze({"any instance":"any","each instance":"each"}),ji=/^- Production: `([^`\r\n]*)` instances?$/u,
369
+ Gi=/^- Instances: `([^`\r\n]*)` to `([^`\r\n]*)`$/u,Ui=/^- Needs at least: `([^`\r\n]*)` vCPU, `([^`\r\n]*)` GiB memory$/u,
370
+ Bi=/^- Reaches: `([^`\r\n]*)` as `([^`\r\n]*)`$/u,Wi=/^- Setting `([^`\r\n]*)`:[ \t]+(.+)$/u,ct=e=>new RegExp(`^- ${e}: \
371
+ \`([^\`\\r\\n]*)\`$`,"u"),zi=ct("Exposure"),Hi=ct("Reached"),Fi=ct("Development"),wn=Object.freeze(["local folder","own \
372
+ bucket"]),qi=Object.freeze(["APP_ENV","HOST","PORT","APP_PUBLIC_URL","TRUSTED_PROXIES"]),yn="V64_",Ki="STAGING_REACHES_R\
373
+ EAL_PEOPLE",_n=Object.freeze(["### Service `id`: summary","### Resource `id`"]),ut=Object.freeze(["- Exposure: `public` \
373
374
  or `internal`","- Serve `label`: `command` `argument`...","- Ready when: `GET` `/path` returns `200`","- Instances: `min\
374
375
  ` to `max`","- Needs at least: `N` vCPU, `N` GiB memory","- Production: `N` instances","- Reached: `any instance` or `ea\
375
- ch instance`","- Reaches: `service` as `SETTING`","- Setting `NAME`: `value`",`${Q}\`package\`...`,`${q}${ue.map(e=>`\`${e}\
376
- \``).join(" ")}`]),sn=Object.freeze([`- Development: ${tn.map(e=>`\`${e}\``).join(" or ")}`]),yi=Object.freeze(Oe.filter(
377
- e=>![q,ee,"- Ready when: "].some(t=>e.startsWith(t))).map(e=>e.replace(`|${te.at(-1)} `," ")));function wi(e){return vi.
378
- includes(e)?`${e} is a setting the host gives every service itself`:e===bi?`${e} is the host's, given to a Staging only \
379
- while the project's owner marks that real people use it`:e.startsWith(Zt)?`${e} starts with ${Zt}, which names the facts\
380
- the host gives each instance`:""}function rn(e,t,n,s){let i=e[1];return oi.test(i)||f(t,`A service's id is a lowercase \
376
+ ch instance`","- Reaches: `service` as `SETTING`","- Setting `NAME`: `value`",`${Q}\`package\`...`,`${F}${le.map(e=>`\`${e}\
377
+ \``).join(" ")}`]),In=Object.freeze([`- Development: ${wn.map(e=>`\`${e}\``).join(" or ")}`]),Yi=Object.freeze(De.filter(
378
+ e=>![F,ee,"- Ready when: "].some(t=>e.startsWith(t))).map(e=>e.replace(`|${te.at(-1)} `," ")));function Xi(e){return qi.
379
+ includes(e)?`${e} is a setting the host gives every service itself`:e===Ki?`${e} is the host's, given to a Staging only \
380
+ while the project's owner marks that real people use it`:e.startsWith(yn)?`${e} starts with ${yn}, which names the facts\
381
+ the host gives each instance`:""}function Tn(e,t,n,s){let i=e[1];return xi.test(i)||f(t,`A service's id is a lowercase \
381
382
  letter, then up to 15 lowercase letters, digits and hyphens, such as \`web\`; ${JSON.stringify(i)} isn't one.`,n),s.some(
382
- r=>r.id===i)&&f(t,`Deployment declares service \`${i}\` twice.`,n),s.length===Jt&&f(t,`A Deployment declares at most ${Jt}\
383
- services.`,n),{id:i,summary:y(e[2],O,t,"Service summary",n),line:n,lines:{},settingLines:{},exposure:"",reached:"",serve:null,
384
- readyWhen:null,instances:null,production:null,atLeast:null,reaches:[],settings:{},packages:[],sandboxAllowances:[]}}function le(e,{
385
- min:t=1,max:n=100}={}){return/^[1-9][0-9]{0,3}$/u.test(e)&&Number(e)>=t&&Number(e)<=n?Number(e):null}function on(e,t,n,s){
383
+ r=>r.id===i)&&f(t,`Deployment declares service \`${i}\` twice.`,n),s.length===bn&&f(t,`A Deployment declares at most ${bn}\
384
+ services.`,n),{id:i,summary:w(e[2],A,t,"Service summary",n),line:n,lines:{},settingLines:{},exposure:"",reached:"",serve:null,
385
+ readyWhen:null,instances:null,production:null,atLeast:null,reaches:[],settings:{},packages:[],sandboxAllowances:[]}}function me(e,{
386
+ min:t=1,max:n=100}={}){return/^[1-9][0-9]{0,3}$/u.test(e)&&Number(e)>=t&&Number(e)<=n?Number(e):null}function kn(e,t,n,s){
386
387
  let i=c=>f(n,`Service \`${e.id}\`: ${c}`,s),r=c=>{Object.hasOwn(e.lines,c)&&i(`it has a second ${c} line.`),e.lines[c]=s},
387
- o=t.match(we);if(o){o[1]!=="Serve"&&i(`${o[1]} is the whole Deployment's, since one build serves every service: put it a\
388
- bove the first ### heading.`),r("Serve");let c=Ae(o,n,s);e.serve={label:c.label,argv:c.argv};return}if(t.startsWith("- E\
389
- xposure: ")){r("Exposure"),e.exposure=t.match(fi)?.[1]??"",ci.includes(e.exposure)||i("Exposure is `public` or `internal\
390
- `.");return}if(t.startsWith("- Reached: ")){r("Reached"),e.reached=ui[t.match(gi)?.[1]]??"",e.reached||i("Reached is `an\
391
- y instance` or `each instance`.");return}if(t.startsWith("- Ready when: ")){r("Ready when");let c=ae(t,O,n,`Service \`${e.
388
+ o=t.match(Oe);if(o){o[1]!=="Serve"&&i(`${o[1]} is the whole Deployment's, since one build serves every service: put it a\
389
+ bove the first ### heading.`),r("Serve");let c=Le(o,n,s);e.serve={label:c.label,argv:c.argv};return}if(t.startsWith("- E\
390
+ xposure: ")){r("Exposure"),e.exposure=t.match(zi)?.[1]??"",Vi.includes(e.exposure)||i("Exposure is `public` or `internal\
391
+ `.");return}if(t.startsWith("- Reached: ")){r("Reached"),e.reached=Mi[t.match(Hi)?.[1]]??"",e.reached||i("Reached is `an\
392
+ y instance` or `each instance`.");return}if(t.startsWith("- Ready when: ")){r("Ready when");let c=ce(t,A,n,`Service \`${e.
392
393
  id}\` readiness`,s);e.readyWhen={method:c.method,path:c.path,status:c.status};return}if(t.startsWith("- Instances: ")){r(
393
- "Instances");let c=t.match(li),a=le(c?.[1]??"",{max:J}),u=le(c?.[2]??"",{max:J});(a===null||u===null||a>u)&&i(`Instances\
394
- is a range of whole numbers from 1 to ${J}, the least first, such as \`- Instances: \`1\` to \`6\`\`.`),e.instances={min:a,
395
- max:u};return}if(t.startsWith("- Needs at least: ")){r("Needs at least");let c=t.match(di),a=le(c?.[1]??"",{max:1024}),u=le(
394
+ "Instances");let c=t.match(Gi),a=me(c?.[1]??"",{max:Z}),u=me(c?.[2]??"",{max:Z});(a===null||u===null||a>u)&&i(`Instances\
395
+ is a range of whole numbers from 1 to ${Z}, the least first, such as \`- Instances: \`1\` to \`6\`\`.`),e.instances={min:a,
396
+ max:u};return}if(t.startsWith("- Needs at least: ")){r("Needs at least");let c=t.match(Ui),a=me(c?.[1]??"",{max:1024}),u=me(
396
397
  c?.[2]??"",{max:4096});(a===null||u===null)&&i("Needs at least takes whole numbers of vCPUs and GiB, such as `- Needs at\
397
398
  least: `2` vCPU, `4` GiB memory`."),e.atLeast={vcpus:a,memoryGib:u};return}if(t.startsWith("- Production: ")){r("Produc\
398
- tion");let c=le(t.match(pi)?.[1]??"",{max:J});c===null&&i("Production says how many instances Production starts with, su\
399
- ch as `- Production: `2` instances`."),e.production=c;return}if(t.startsWith("- Reaches: ")){let c=t.match(mi);c||i("Rea\
399
+ tion");let c=me(t.match(ji)?.[1]??"",{max:Z});c===null&&i("Production says how many instances Production starts with, su\
400
+ ch as `- Production: `2` instances`."),e.production=c;return}if(t.startsWith("- Reaches: ")){let c=t.match(Bi);c||i("Rea\
400
401
  ches names a service and the setting that gets its address: `- Reaches: `service` as `SETTING``."),e.reaches.push({service:c[1],
401
- setting:c[2],line:s});return}if(t.startsWith("- Setting ")){let c=t.match(hi);c||i("A setting is `- Setting `NAME`: `val\
402
- ue``.");let[a]=b(c[2],O,n,`Service \`${e.id}\` Setting ${c[1]}`,s,{count:1});an(e,c[1],n,s),e.settings[c[1]]=a,e.settingLines[c[1]]=
403
- s;return}if(t.startsWith(Q)){r("Packages"),e.packages=ke(t,n,s);return}if(t.startsWith(q)){r("Sandbox allows"),e.sandboxAllowances=
404
- Re(t,n,s);return}yi.some(c=>t.startsWith(c.slice(0,c.indexOf(":")+1)))&&i(`${t.slice(2,t.indexOf(":"))} is the whole Dep\
405
- loyment's: put it above the first ### heading.`),f(n,k(`Service \`${e.id}\` entry`,t,tt),s)}function an(e,t,n,s){let i=o=>f(
406
- n,`Service \`${e.id}\`: ${o}`,s);Te.test(t)||i(`${JSON.stringify(t)} isn't a setting's name: use capitals, digits and _,\
407
- such as \`API_URL\`.`),t==="SIDE_EFFECTS"&&i(Z.SIDE_EFFECTS);let r=wi(t);r&&i(`${r}; give the setting another name.`),(Object.
408
- hasOwn(e.settings,t)||e.reaches.some(o=>o.setting===t&&o.line!==s))&&i(`it names the setting ${t} twice.`)}function cn(e,t,n,s){
409
- let i=e[1];return ai.test(i)||f(t,`### Resource names a resource of ## Resources by its id, such as \`files\`; ${JSON.stringify(
402
+ setting:c[2],line:s});return}if(t.startsWith("- Setting ")){let c=t.match(Wi);c||i("A setting is `- Setting `NAME`: `val\
403
+ ue``.");let[a]=y(c[2],A,n,`Service \`${e.id}\` Setting ${c[1]}`,s,{count:1});On(e,c[1],n,s),e.settings[c[1]]=a,e.settingLines[c[1]]=
404
+ s;return}if(t.startsWith(Q)){r("Packages"),e.packages=$e(t,n,s);return}if(t.startsWith(F)){r("Sandbox allows"),e.sandboxAllowances=
405
+ Pe(t,n,s);return}Yi.some(c=>t.startsWith(c.slice(0,c.indexOf(":")+1)))&&i(`${t.slice(2,t.indexOf(":"))} is the whole Dep\
406
+ loyment's: put it above the first ### heading.`),f(n,v(`Service \`${e.id}\` entry`,t,ut),s)}function On(e,t,n,s){let i=o=>f(
407
+ n,`Service \`${e.id}\`: ${o}`,s);Ce.test(t)||i(`${JSON.stringify(t)} isn't a setting's name: use capitals, digits and _,\
408
+ such as \`API_URL\`.`),t==="SIDE_EFFECTS"&&i(J.SIDE_EFFECTS);let r=Xi(t);r&&i(`${r}; give the setting another name.`),(Object.
409
+ hasOwn(e.settings,t)||e.reaches.some(o=>o.setting===t&&o.line!==s))&&i(`it names the setting ${t} twice.`)}function An(e,t,n,s){
410
+ let i=e[1];return Ie.test(i)||f(t,`### Resource names a resource of ## Resources by its id, such as \`files\`; ${JSON.stringify(
410
411
  i)} isn't one.`,n),s.has(i)&&f(t,`Deployment has a second ### Resource \`${i}\`.`,n),{id:i,line:n,development:"",developmentLine:0}}
411
- function un(e,t,n,s){if(t.startsWith("- Development: ")){e.developmentLine&&f(n,`Resource \`${e.id}\` has a second Develo\
412
- pment line.`,s),e.development=t.match(Ei)?.[1]??"",e.developmentLine=s,tn.includes(e.development)||f(n,`Resource \`${e.id}\
413
- \`: Development is \`local folder\` or \`own bucket\`.`,s);return}f(n,`${k(`Resource \`${e.id}\` entry`,t,sn)} The Deplo\
414
- yment's own entries come before the first ### heading.`,s)}function pn(e,t,n){let s=e.map(r=>r.id);for(let r of e){let o=(a,u=r.
412
+ function Rn(e,t,n,s){if(t.startsWith("- Development: ")){e.developmentLine&&f(n,`Resource \`${e.id}\` has a second Develo\
413
+ pment line.`,s),e.development=t.match(Fi)?.[1]??"",e.developmentLine=s,wn.includes(e.development)||f(n,`Resource \`${e.id}\
414
+ \`: Development is \`local folder\` or \`own bucket\`.`,s);return}f(n,`${v(`Resource \`${e.id}\` entry`,t,In)} The Deplo\
415
+ yment's own entries come before the first ### heading.`,s)}function Nn(e,t,n){let s=e.map(r=>r.id);for(let r of e){let o=(a,u=r.
415
416
  line)=>f(n,`Service \`${r.id}\`: ${a}`,u);for(let[a,u]of[["Exposure",r.exposure],["Serve",r.serve],["Ready when",r.readyWhen],
416
- ["Instances",r.instances]])u||o(`it needs a${a==="Exposure"||a==="Instances"?"n":""} ${a} line: ${tt.find(p=>p.startsWith(
417
+ ["Instances",r.instances]])u||o(`it needs a${a==="Exposure"||a==="Instances"?"n":""} ${a} line: ${ut.find(l=>l.startsWith(
417
418
  a==="Serve"?"- Serve":`- ${a}:`))}.`);r.reached&&r.exposure==="public"&&o("Reached is for an internal service; a public \
418
419
  one is reached at its address.",r.lines.Reached);let c=r.production??r.instances.min;(c<r.instances.min||c>r.instances.max)&&
419
420
  o(`Production starts with ${c} instances, outside its Instances, ${r.instances.min} to ${r.instances.max}.`,r.lines.Production);
420
421
  for(let a of r.reaches)a.service===r.id&&o("a service doesn't reach itself.",a.line),s.includes(a.service)||o(`there is \
421
422
  no service \`${a.service}\`; this Deployment's services are ${s.map(u=>`\`${u}\``).join(", ")}. Fix the name in its Reac\
422
- hes line.`,a.line),r.reaches.filter(u=>u.service===a.service).length>1&&o(`it reaches \`${a.service}\` twice.`,a.line),an(
423
+ hes line.`,a.line),r.reaches.filter(u=>u.service===a.service).length>1&&o(`it reaches \`${a.service}\` twice.`,a.line),On(
423
424
  r,a.setting,n,a.line);for(let a of[...r.reaches.map(u=>u.setting),...Object.keys(r.settings)])if(t.generatedSecrets.includes(
424
- a)||t.setupCode===a){let u=r.reaches.find(p=>p.setting===a)?.line??r.settingLines[a];o(`${a} is the Deployment's ${t.setupCode===
425
+ a)||t.setupCode===a){let u=r.reaches.find(l=>l.setting===a)?.line??r.settingLines[a];o(`${a} is the Deployment's ${t.setupCode===
425
426
  a?"Setup code":"generated secret"}, which every service gets already; give the setting another name.`,u)}}let i=e.filter(
426
427
  r=>r.exposure==="public");return i.length!==1&&f(n,i.length===0?"A Deployment with services has exactly one public servi\
427
428
  ce: give one of them `- Exposure: `public``.":`A Deployment with services has exactly one public service; ${i.map(({id:r})=>`\
428
429
  \`${r}\``).join(" and ")} are both public.`,i[1]?.line??e[0].line),e.map(r=>({id:r.id,summary:r.summary,exposure:r.exposure,
429
430
  reached:r.reached||"any",serve:r.serve,readyWhen:r.readyWhen,instances:{min:r.instances.min,max:r.instances.max,production:r.
430
431
  production??r.instances.min},atLeast:r.atLeast,reaches:r.reaches.map(({service:o,setting:c})=>({service:o,setting:c})),settings:r.
431
- settings,packages:r.packages,sandboxAllowances:r.sandboxAllowances}))}function ln(e,t,n){let s=new Map((Array.isArray(t)?
432
- t:[]).map(r=>r?.resource).filter(r=>r&&typeof r.id=="string").map(r=>[r.id,r]));for(let r of e.resources.values()){let o=s.
433
- get(r.id);o||f(n,`### Resource \`${r.id}\`: genesis/stack.md's ## Resources declares no resource \`${r.id}\`${s.size?`; \
434
- its resources are ${[...s.keys()].map(c=>`\`${c}\``).join(", ")}`:""}.`,r.line),r.development&&o.kind!=="bucket"&&f(n,`R\
435
- esource \`${r.id}\`: Development says how development provides a bucket, and \`${r.id}\` is a ${o.kind} resource.`,r.developmentLine)}
436
- let i=new Map;for(let r of s.values())for(let o of Array.isArray(r.environmentAlternatives)?r.environmentAlternatives:[])
437
- for(let c of Object.values(o?.bindings??{}))typeof c=="string"&&i.set(c,r.id);for(let r of e.services){let o=[...r.reaches.
438
- map(c=>[c.setting,c.line]),...Object.entries(r.settingLines)];for(let[c,a]of o)i.has(c)&&f(n,`Service \`${r.id}\`: ${c} \
439
- is the setting resource \`${i.get(c)}\` binds; give the setting another name.`,a)}}var mn="vibe64.application-deployment.v2",Si="vibe64.application-deployment.v1",hn="Deployment";function nt(){return{version:1,
432
+ settings,packages:r.packages,sandboxAllowances:r.sandboxAllowances}))}function Cn(e,t,n){let s=Te(t);for(let r of e.resources.
433
+ values()){let o=s.get(r.id);o||f(n,`### Resource \`${r.id}\`: genesis/stack.md's ## Resources declares no resource \`${r.
434
+ id}\`${s.size?`; its resources are ${[...s.keys()].map(c=>`\`${c}\``).join(", ")}`:""}.`,r.line),r.development&&o.kind!==
435
+ "bucket"&&f(n,`Resource \`${r.id}\`: Development says how development provides a bucket, and \`${r.id}\` is a ${o.kind} \
436
+ resource.`,r.developmentLine)}let i=new Map;for(let r of s.values())for(let o of Array.isArray(r.environmentAlternatives)?
437
+ r.environmentAlternatives:[])for(let c of Object.values(o?.bindings??{}))typeof c=="string"&&i.set(c,r.id);for(let r of e.
438
+ services){let o=[...r.reaches.map(c=>[c.setting,c.line]),...Object.entries(r.settingLines)];for(let[c,a]of o)i.has(c)&&f(
439
+ n,`Service \`${r.id}\`: ${c} is the setting resource \`${i.get(c)}\` binds; give the setting another name.`,a)}}var Pn="vibe64.application-deployment.v2",Zi="vibe64.application-deployment.v1",$n="Deployment";function lt(){return{version:1,
440
440
  artifact:{disposablePaths:[]},workdir:".",runtimeRequirements:[],generatedSecrets:[],setupCode:"",sandboxAllowances:[],packages:[],
441
- instances:{max:1},readiness:null,steps:[],services:[],deploymentResources:{}}}function fn(e,t){Array.isArray(e)||f(t,"De\
442
- ployment must be supplied as exact Stack section lines.");let n={services:[],resources:new Map};if(S(e))return{result:nt(),
443
- located:n};let s=nt(),i=new Set,r=e.some(c=>c.trim().startsWith("### Service ")),o=null;for(let c=0;c<e.length;c+=1){let a=e[c].
444
- trim();if(!a)continue;let u=c+1;if(a.startsWith("#")){let d=a.match(Qt),l=d?null:a.match(en);d?(o={service:rn(d,t,u,n.services)},
445
- n.services.push(o.service)):l?(o={resource:cn(l,t,u,n.resources)},n.resources.set(o.resource.id,o.resource)):f(t,k("Depl\
446
- oyment heading",a,nn),u);continue}if(o?.service){on(o.service,a,t,u);continue}if(o?.resource){un(o.resource,a,t,u);continue}
447
- let p=a.match(we);if(r&&(p?.[1]==="Serve"||[q,ee,"- Ready when: ","- Instances: "].some(d=>a.startsWith(d)))&&f(t,`In a \
441
+ instances:{max:1},readiness:null,steps:[],services:[],deploymentResources:{}}}function Ln(e,t){Array.isArray(e)||f(t,"De\
442
+ ployment must be supplied as exact Stack section lines.");let n={services:[],resources:new Map};if(_(e))return{result:lt(),
443
+ located:n};let s=lt(),i=new Set,r=e.some(c=>c.trim().startsWith("### Service ")),o=null;for(let c=0;c<e.length;c+=1){let a=e[c].
444
+ trim();if(!a)continue;let u=c+1;if(a.startsWith("#")){let d=a.match(vn),p=d?null:a.match(Sn);d?(o={service:Tn(d,t,u,n.services)},
445
+ n.services.push(o.service)):p?(o={resource:An(p,t,u,n.resources)},n.resources.set(o.resource.id,o.resource)):f(t,v("Depl\
446
+ oyment heading",a,_n),u);continue}if(o?.service){kn(o.service,a,t,u);continue}if(o?.resource){Rn(o.resource,a,t,u);continue}
447
+ let l=a.match(Oe);if(r&&(l?.[1]==="Serve"||[F,ee,"- Ready when: ","- Instances: "].some(d=>a.startsWith(d)))&&f(t,`In a \
448
448
  Deployment with services, each service says its own Serve, Ready when, Instances and Sandbox allows: move \`${a}\` under \
449
449
  its \`### Service\` heading.`,u),a.startsWith("- Workdir: ")){i.has("workdir")&&f(t,"Duplicate Deployment Workdir.",u),i.
450
- add("workdir");let d=b(a.slice(11),O,t,"Deployment Workdir",u,{count:1})[0];s.workdir=w(d,O,t,"Deployment workdir",u);continue}
450
+ add("workdir");let d=y(a.slice(11),A,t,"Deployment Workdir",u,{count:1})[0];s.workdir=S(d,A,t,"Deployment workdir",u);continue}
451
451
  if(a.startsWith("- Runtimes: ")){i.has("runtimes")&&f(t,"Duplicate Deployment Runtimes.",u),i.add("runtimes"),s.runtimeRequirements=
452
- P(a.slice(12),O,t,"Deployment runtimes",u);continue}if(a.startsWith(Se)){i.has("restore-paths")&&f(t,"Duplicate Deployme\
453
- nt Recreate on restore entry.",u),i.add("restore-paths"),s.artifact.disposablePaths=Ft(a,t,u);continue}if(a.startsWith(_e)){
452
+ C(a.slice(12),A,t,"Deployment runtimes",u);continue}if(a.startsWith(Ae)){i.has("restore-paths")&&f(t,"Duplicate Deployme\
453
+ nt Recreate on restore entry.",u),i.add("restore-paths"),s.artifact.disposablePaths=mn(a,t,u);continue}if(a.startsWith(Re)){
454
454
  i.has("generated-secrets")&&f(t,"Duplicate Deployment Generated secrets entry.",u),i.add("generated-secrets"),s.generatedSecrets=
455
- qt(a,t,u);continue}if(a.startsWith(Ie)){i.has("setup-code")&&f(t,"Duplicate Deployment Setup code.",u),i.add("setup-code"),
456
- s.setupCode=Yt(a,t,u);continue}if(a.startsWith(q)){i.has("sandbox-allows")&&f(t,"Duplicate Deployment Sandbox allows.",u),
457
- i.add("sandbox-allows"),s.sandboxAllowances=Re(a,t,u);continue}if(a.startsWith(Q)){i.has("packages")&&f(t,"Duplicate Dep\
458
- loyment Packages.",u),i.add("packages"),s.packages=ke(a,t,u);continue}if(a.startsWith(ee)){i.has("instances")&&f(t,"Dupl\
459
- icate Deployment Instances.",u),i.add("instances"),s.instances={max:Kt(a,t,u)};continue}if(a.startsWith("- Ready when: ")){
460
- i.has("readiness")&&f(t,"Duplicate Deployment Ready when.",u),i.add("readiness"),s.readiness=ae(a,O,t,"Deployment readin\
461
- ess",u);continue}if(p){s.steps.push(Ae(p,t,u));continue}f(t,k("Deployment entry",a,Oe),u)}if(r){for(let a=1;a<s.steps.length;a+=
462
- 1)pe[s.steps[a].role]<pe[s.steps[a-1].role]&&f(t,`Deployment steps must be ordered ${te.slice(0,-1).join(", ")}.`);dn(s,
463
- t),s.services=pn(n.services,s,t);let c=s.services.find(a=>a.exposure==="public");s.steps.push({label:c.serve.label,argv:[
455
+ hn(a,t,u);continue}if(a.startsWith(Ne)){i.has("setup-code")&&f(t,"Duplicate Deployment Setup code.",u),i.add("setup-code"),
456
+ s.setupCode=fn(a,t,u);continue}if(a.startsWith(F)){i.has("sandbox-allows")&&f(t,"Duplicate Deployment Sandbox allows.",u),
457
+ i.add("sandbox-allows"),s.sandboxAllowances=Pe(a,t,u);continue}if(a.startsWith(Q)){i.has("packages")&&f(t,"Duplicate Dep\
458
+ loyment Packages.",u),i.add("packages"),s.packages=$e(a,t,u);continue}if(a.startsWith(ee)){i.has("instances")&&f(t,"Dupl\
459
+ icate Deployment Instances.",u),i.add("instances"),s.instances={max:gn(a,t,u)};continue}if(a.startsWith("- Ready when: ")){
460
+ i.has("readiness")&&f(t,"Duplicate Deployment Ready when.",u),i.add("readiness"),s.readiness=ce(a,A,t,"Deployment readin\
461
+ ess",u);continue}if(l){s.steps.push(Le(l,t,u));continue}f(t,v("Deployment entry",a,De),u)}if(r){for(let a=1;a<s.steps.length;a+=
462
+ 1)pe[s.steps[a].role]<pe[s.steps[a-1].role]&&f(t,`Deployment steps must be ordered ${te.slice(0,-1).join(", ")}.`);Dn(s,
463
+ t),s.services=Nn(n.services,s,t);let c=s.services.find(a=>a.exposure==="public");s.steps.push({label:c.serve.label,argv:[
464
464
  ...c.serve.argv],role:"serve"}),s.readiness={kind:"http",...c.readyWhen},s.instances={max:c.instances.max},s.sandboxAllowances=
465
465
  [...new Set(s.services.flatMap(a=>a.sandboxAllowances))].sort()}else{s.steps.length===0&&f(t,"## Deployment needs at lea\
466
466
  st one command or exactly `- Nothing.`."),(s.steps.filter(({role:u})=>u==="serve").length!==1||s.steps.at(-1).role!=="se\
467
467
  rve")&&f(t,"Deployment needs exactly one final Serve step.");for(let u=1;u<s.steps.length;u+=1)pe[s.steps[u].role]<pe[s.
468
468
  steps[u-1].role]&&f(t,`Deployment steps must be ordered ${te.slice(0,-1).join(", ")}, then ${te.at(-1)}.`);s.readiness||
469
- f(t,"Deployment needs one Ready when entry."),dn(s,t);let a=s.steps.at(-1);s.services=[{id:"web",summary:"",exposure:"pu\
469
+ f(t,"Deployment needs one Ready when entry."),Dn(s,t);let a=s.steps.at(-1);s.services=[{id:"web",summary:"",exposure:"pu\
470
470
  blic",reached:"any",serve:{label:a.label,argv:[...a.argv]},readyWhen:{method:s.readiness.method,path:s.readiness.path,status:s.
471
471
  readiness.status},instances:{min:1,max:s.instances.max,production:1},atLeast:null,reaches:[],settings:{},packages:[],sandboxAllowances:[
472
472
  ...s.sandboxAllowances]}]}return s.deploymentResources=Object.fromEntries([...n.resources.values()].map(c=>[c.id,c.development?
473
- {development:c.development}:{}])),{result:s,located:n}}function dn(e,t){let n=Object.keys(Z).find(s=>[...e.generatedSecrets,
474
- e.setupCode].includes(s));n&&f(t,Z[n]),e.generatedSecrets.includes(e.setupCode)&&f(t,"Deployment Setup code is generated\
473
+ {development:c.development}:{}])),{result:s,located:n}}function Dn(e,t){let n=Object.keys(J).find(s=>[...e.generatedSecrets,
474
+ e.setupCode].includes(s));n&&f(t,J[n]),e.generatedSecrets.includes(e.setupCode)&&f(t,"Deployment Setup code is generated\
475
475
  already; leave it out of Generated secrets."),e.artifact.disposablePaths.length>0&&!e.steps.some(({role:s})=>s==="prepa\
476
- re")&&f(t,"Deployment may recreate paths on restore only when it declares a Prepare step.")}function _i(e,t={}){let{path:n="\
477
- genesis/stack.md#Deployment"}=t;return fn(e,n).result}function gn({environment:e={},section:t={}}={}){z(t,e,"Deployment \
478
- section");let n=[...t.diagnostics||[]],s=nt(),i=!1;if(t.status==="ready"){let a="genesis/stack.md#Deployment",u=fn(t.lines,
479
- a);ln(u.located,e.resources,a),s=u.result,i=u.located.services.length>0}let r=n.length>0?"blocked":s.steps.length>0?"rea\
476
+ re")&&f(t,"Deployment may recreate paths on restore only when it declares a Prepare step.")}function Ji(e,t={}){let{path:n="\
477
+ genesis/stack.md#Deployment"}=t;return Ln(e,n).result}function xn({environment:e={},section:t={}}={}){j(t,e,"Deployment \
478
+ section");let n=[...t.diagnostics||[]],s=lt(),i=!1;if(t.status==="ready"){let a="genesis/stack.md#Deployment",u=Ln(t.lines,
479
+ a);Cn(u.located,e.resources,a),s=u.result,i=u.located.services.length>0}let r=n.length>0?"blocked":s.steps.length>0?"rea\
480
480
  dy":"unconfigured",o={version:s.version,artifact:s.artifact,workdir:s.workdir,runtimeRequirements:s.runtimeRequirements,
481
481
  generatedSecrets:s.generatedSecrets,setupCode:s.setupCode,sandboxAllowances:s.sandboxAllowances,packages:s.packages,instances:s.
482
482
  instances,readiness:s.readiness,steps:s.steps},c={...o,...i?{services:s.services}:{},...Object.keys(s.deploymentResources).
483
- length>0?{deploymentResources:s.deploymentResources}:{}};return{contract:mn,status:r,stackHash:t.stackHash,recipeHash:r===
484
- "ready"?N(c):"",components:[...t.components||[]],source:t.source||null,runtimeRequirements:F(s.runtimeRequirements),resources:structuredClone(
485
- e.resources||[]),...o,services:s.services,deploymentResources:s.deploymentResources,diagnostics:n}}var Ce="vibe64.packaging.v1",Sn="Packaging",Jo=Object.freeze(["genesis",".genesis",".agents",".claude",".codex",".openco\
486
- de"]),M="VIBE64_PACKAGING_INVALID",Ii=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Ti=/^[A-Z_][A-Z0-9_]*$/u,Oi=/^[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)+$/u,
487
- Ri=/^[a-z][a-z0-9+.-]*$/u,ki=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u,Ai=/\{[^{}\s]*\}/u,
488
- Ni=/^### Package `([^`\r\n]+)`:[ \t]+(.+)$/u,Ci=/^- (Prepare|Build) `([^`\r\n]+)`:[ \t]+(.+)$/u,Di=/^- Environment `([^`\r\n]+)`:[ \t]+(.+)$/u,
489
- Pi=/^- Permission `([^`\r\n]+)`:[ \t]+(.+)$/u,$i=/^- Content: package `([^`\r\n]+)`$/u,En=50,vn=500,xi=/(?:^|_)(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|PRIVATE_KEY|API_KEY|CREDENTIALS?)(?:_|$)/u,
490
- _n=Object.freeze({npm:Object.freeze({entries:["workdir","runtimes","prepare","build","environment","versionFrom"],required:[
483
+ length>0?{deploymentResources:s.deploymentResources}:{}};return{contract:Pn,status:r,stackHash:t.stackHash,recipeHash:r===
484
+ "ready"?k(c):"",components:[...t.components||[]],source:t.source||null,runtimeRequirements:H(s.runtimeRequirements),resources:structuredClone(
485
+ e.resources||[]),...o,services:s.services,deploymentResources:s.deploymentResources,diagnostics:n}}var Ve="vibe64.packaging.v1",Bn="Packaging",ic=Object.freeze(["genesis",".genesis",".agents",".claude",".codex",".openco\
486
+ de"]),M="VIBE64_PACKAGING_INVALID",Qi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,er=/^[A-Z_][A-Z0-9_]*$/u,tr=/^[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)+$/u,
487
+ nr=/^[a-z][a-z0-9+.-]*$/u,sr=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u,ir=/\{[^{}\s]*\}/u,
488
+ rr=/^### Package `([^`\r\n]+)`:[ \t]+(.+)$/u,or=/^- (Prepare|Build) `([^`\r\n]+)`:[ \t]+(.+)$/u,ar=/^- Environment `([^`\r\n]+)`:[ \t]+(.+)$/u,
489
+ cr=/^- Permission `([^`\r\n]+)`:[ \t]+(.+)$/u,ur=/^- Content: package `([^`\r\n]+)`$/u,Vn=50,Mn=500,lr=/(?:^|_)(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|PRIVATE_KEY|API_KEY|CREDENTIALS?)(?:_|$)/u,
490
+ Wn=Object.freeze({npm:Object.freeze({entries:["workdir","runtimes","prepare","build","environment","versionFrom"],required:[
491
491
  "versionFrom"],versionSources:["package.json","external"]}),"python-dist":Object.freeze({entries:["workdir","runtimes","\
492
492
  prepare","build","environment","output","versionFrom"],required:["build","output","versionFrom"],versionSources:["pyproj\
493
493
  ect.toml","external"]}),"web-bundle":Object.freeze({entries:["workdir","runtimes","prepare","build","environment","outpu\
494
494
  t"],required:["build","output"],versionSources:[]}),capacitor:Object.freeze({entries:["workdir","content","platforms","a\
495
495
  pplicationId","name","icon","versionFrom","deepLinkSchemeFrom","appLinkDomainsFrom","permission"],required:["content","p\
496
- latforms","applicationId","name","icon","versionFrom"],versionSources:["package.json","external"]})}),Ne=Object.freeze(Object.
497
- keys(_n)),st=Object.freeze(["android"]),it=Object.freeze(["package.json","pyproject.toml","external"]),Y=e=>e.map(t=>`\`${t}\
498
- \``).join(" | "),ne=Object.freeze([["- Packer: ","packer",`- Packer: ${Y(Ne)}`],["- Workdir: ","workdir","- Workdir: `pa\
496
+ latforms","applicationId","name","icon","versionFrom"],versionSources:["package.json","external"]})}),xe=Object.freeze(Object.
497
+ keys(Wn)),pt=Object.freeze(["android"]),dt=Object.freeze(["package.json","pyproject.toml","external"]),Y=e=>e.map(t=>`\`${t}\
498
+ \``).join(" | "),ne=Object.freeze([["- Packer: ","packer",`- Packer: ${Y(xe)}`],["- Workdir: ","workdir","- Workdir: `pa\
499
499
  th`"],["- Runtimes: ","runtimes","- Runtimes: `runtime`..."],["- Output: ","output","- Output: `path`"],["- Version from\
500
- : ","versionFrom",`- Version from: ${Y(it)}`],["- Platforms: ","platforms",`- Platforms: ${Y(st)}...`],["- Id: ","applic\
500
+ : ","versionFrom",`- Version from: ${Y(dt)}`],["- Platforms: ","platforms",`- Platforms: ${Y(pt)}...`],["- Id: ","applic\
501
501
  ationId","- Id: `reverse.dns.id`"],["- Name: ","name","- Name: `Display name`"],["- Icon: ","icon","- Icon: `path/to/ico\
502
502
  n-1024.png`"],["- Deep link scheme from: ","deepLinkSchemeFrom","- Deep link scheme from: `ENV_NAME`"],["- App link doma\
503
- ins from: ","appLinkDomainsFrom","- App link domains from: `ENV_NAME`"]]),bn="### Package `id`: Label",Li=Object.freeze(
503
+ ins from: ","appLinkDomainsFrom","- App link domains from: `ENV_NAME`"]]),jn="### Package `id`: Label",pr=Object.freeze(
504
504
  [ne[0][2],ne[1][2],ne[2][2],"- Prepare|Build `label`: `command` `argument`...","- Environment `NAME`: `value`",ne[3][2],
505
505
  ne[4][2],"- Content: package `web-bundle-id`",...ne.slice(5).map(([,,e])=>e),"- Permission `id`: User-facing reason."]),
506
- de=Object.freeze({packer:"Packer",workdir:"Workdir",runtimes:"Runtimes",prepare:"Prepare",build:"Build",environment:"Env\
506
+ he=Object.freeze({packer:"Packer",workdir:"Workdir",runtimes:"Runtimes",prepare:"Prepare",build:"Build",environment:"Env\
507
507
  ironment",output:"Output",versionFrom:"Version from",content:"Content",platforms:"Platforms",applicationId:"Id",name:"Na\
508
508
  me",icon:"Icon",deepLinkSchemeFrom:"Deep link scheme from",appLinkDomainsFrom:"App link domains from",permission:"Permis\
509
- sion"});function v(e,t,n){m(M,e,t,n)}function rt(e,t,n,s){let i=y(e,M,t,n,s);return Ii.test(i)||v(t,`${n} must use lower\
510
- case letters, digits, and single hyphens.`,s),i}function Vi(e,t,n,s,i){return b(e.slice(t.length),M,n,s,i,{count:1})[0]}
511
- function ot(e,t,n,s){return e.some(i=>Ai.test(i))&&v(t,`${n} takes no placeholders in ${Ce}.`,s),e}function In(e,t,n,s){
512
- return Ti.test(e)||v(t,`${n} must be an uppercase environment variable name.`,s),e}function yn(e,t,n,s,i){e.seen.has(t)&&
513
- v(s,`Package ${e.id} has a duplicate ${de[t]} entry.`,i),e.seen.add(t),e.fields[t]=n,e.lines[t]=i}function Mi(e,t,n,s,i){
514
- let r=`Packaging ${de[e]}`;if(e==="runtimes")return P(t.slice(n.length),M,s,r,i);if(e==="platforms"){let c=b(t.slice(n.length),
515
- M,s,r,i);return c.some(a=>!st.includes(a))&&v(s,`${r} must be ${Y(st)}.`,i),new Set(c).size!==c.length&&v(s,`${r} contai\
516
- ns a duplicate platform.`,i),c}let o=ot([Vi(t,n,s,r,i)],s,r,i)[0];if(e==="packer")return Ne.includes(o)||v(s,`Unknown pa\
517
- cker \`${o}\`. ${Ce} packers are ${Y(Ne)}.`,i),o;if(["workdir","output"].includes(e))return w(o,M,s,r,i,{allowRoot:e==="\
518
- workdir"});if(e==="icon"){let c=w(o,M,s,r,i,{allowRoot:!1});return c.toLowerCase().endsWith(".png")||v(s,`${r} must be a\
519
- 1024x1024 PNG file.`,i),c}return e==="versionFrom"?(it.includes(o)||v(s,`${r} must be ${Y(it)}.`,i),o):e==="application\
520
- Id"?((!Oi.test(o)||o.length>150)&&v(s,`${r} must be a reverse-DNS id such as \`com.example.notes\` (letters, digits and un\
521
- derscores; each part starts with a letter).`,i),o):e==="name"?((o.trim()!==o||o.length>En)&&v(s,`${r} must be at most ${En}\
522
- characters without surrounding spaces.`,i),o):In(o,s,r,i)}function ji(e,t,n){return{id:rt(e[1],t,"Package id",n),label:y(
523
- e[2],M,t,"Package label",n),fields:{},lines:{},prepare:[],build:[],environment:[],permissions:[],seen:new Set,line:n}}function Gi(e,t,n,s){
524
- /^- Plugins?\b/u.test(t)&&v(n,"Packaging takes no Plugin list: the generated shell installs the native plugins of the Co\
525
- ntent package at its lockfile versions.",s);for(let[a,u]of ne)if(t.startsWith(a)){yn(e,u,Mi(u,t,a,n,s),n,s);return}let i=t.
526
- match($i);if(i){yn(e,"content",rt(i[1],n,"Packaging Content package",s),n,s);return}let r=t.match(Ci);if(r){let a=r[1].toLowerCase(),
527
- u=`Packaging ${r[1]} command`;e[a].push({label:y(r[2],M,n,`Packaging ${r[1]} label`,s),argv:ot(D(r[3],M,n,u,s),n,u,s)}),
528
- e.lines[a]??=s;return}let o=t.match(Di);if(o){let a=In(o[1],n,"Packaging Environment name",s);xi.test(a)&&v(n,`Packaging\
529
- Environment ${a} looks like a credential. Packaging holds only non-secret build facts.`,s),e.environment.some(p=>p.name===
530
- a)&&v(n,`Package ${e.id} has a duplicate Environment ${a}.`,s);let u=ot(b(o[2],M,n,"Packaging Environment value",s,{count:1}),
509
+ sion"});function b(e,t,n){m(M,e,t,n)}function mt(e,t,n,s){let i=w(e,M,t,n,s);return Qi.test(i)||b(t,`${n} must use lower\
510
+ case letters, digits, and single hyphens.`,s),i}function dr(e,t,n,s,i){return y(e.slice(t.length),M,n,s,i,{count:1})[0]}
511
+ function ht(e,t,n,s){return e.some(i=>ir.test(i))&&b(t,`${n} takes no placeholders in ${Ve}.`,s),e}function zn(e,t,n,s){
512
+ return er.test(e)||b(t,`${n} must be an uppercase environment variable name.`,s),e}function Gn(e,t,n,s,i){e.seen.has(t)&&
513
+ b(s,`Package ${e.id} has a duplicate ${he[t]} entry.`,i),e.seen.add(t),e.fields[t]=n,e.lines[t]=i}function mr(e,t,n,s,i){
514
+ let r=`Packaging ${he[e]}`;if(e==="runtimes")return C(t.slice(n.length),M,s,r,i);if(e==="platforms"){let c=y(t.slice(n.length),
515
+ M,s,r,i);return c.some(a=>!pt.includes(a))&&b(s,`${r} must be ${Y(pt)}.`,i),new Set(c).size!==c.length&&b(s,`${r} contai\
516
+ ns a duplicate platform.`,i),c}let o=ht([dr(t,n,s,r,i)],s,r,i)[0];if(e==="packer")return xe.includes(o)||b(s,`Unknown pa\
517
+ cker \`${o}\`. ${Ve} packers are ${Y(xe)}.`,i),o;if(["workdir","output"].includes(e))return S(o,M,s,r,i,{allowRoot:e==="\
518
+ workdir"});if(e==="icon"){let c=S(o,M,s,r,i,{allowRoot:!1});return c.toLowerCase().endsWith(".png")||b(s,`${r} must be a\
519
+ 1024x1024 PNG file.`,i),c}return e==="versionFrom"?(dt.includes(o)||b(s,`${r} must be ${Y(dt)}.`,i),o):e==="application\
520
+ Id"?((!tr.test(o)||o.length>150)&&b(s,`${r} must be a reverse-DNS id such as \`com.example.notes\` (letters, digits and un\
521
+ derscores; each part starts with a letter).`,i),o):e==="name"?((o.trim()!==o||o.length>Vn)&&b(s,`${r} must be at most ${Vn}\
522
+ characters without surrounding spaces.`,i),o):zn(o,s,r,i)}function hr(e,t,n){return{id:mt(e[1],t,"Package id",n),label:w(
523
+ e[2],M,t,"Package label",n),fields:{},lines:{},prepare:[],build:[],environment:[],permissions:[],seen:new Set,line:n}}function fr(e,t,n,s){
524
+ /^- Plugins?\b/u.test(t)&&b(n,"Packaging takes no Plugin list: the generated shell installs the native plugins of the Co\
525
+ ntent package at its lockfile versions.",s);for(let[a,u]of ne)if(t.startsWith(a)){Gn(e,u,mr(u,t,a,n,s),n,s);return}let i=t.
526
+ match(ur);if(i){Gn(e,"content",mt(i[1],n,"Packaging Content package",s),n,s);return}let r=t.match(or);if(r){let a=r[1].toLowerCase(),
527
+ u=`Packaging ${r[1]} command`;e[a].push({label:w(r[2],M,n,`Packaging ${r[1]} label`,s),argv:ht(N(r[3],M,n,u,s),n,u,s)}),
528
+ e.lines[a]??=s;return}let o=t.match(ar);if(o){let a=zn(o[1],n,"Packaging Environment name",s);lr.test(a)&&b(n,`Packaging\
529
+ Environment ${a} looks like a credential. Packaging holds only non-secret build facts.`,s),e.environment.some(l=>l.name===
530
+ a)&&b(n,`Package ${e.id} has a duplicate Environment ${a}.`,s);let u=ht(y(o[2],M,n,"Packaging Environment value",s,{count:1}),
531
531
  n,"Packaging Environment value",s)[0];e.environment.push({name:a,value:u}),e.lines.environment??=s;return}let c=t.match(
532
- Pi);if(c){let a=rt(c[1],n,"Packaging Permission id",s),u=y(c[2],M,n,"Packaging Permission reason",s);(u.includes("`")||u.
533
- length>vn)&&v(n,`Packaging Permission reason is plain user-facing text of at most ${vn} characters.`,s),e.permissions.some(
534
- p=>p.id===a)&&v(n,`Package ${e.id} has a duplicate Permission ${a}.`,s),e.permissions.push({id:a,reason:u}),e.lines.permission??=
535
- s;return}v(n,k("Packaging entry",t,Li),s)}function Ui(e,t){let n=e.fields.packer;n||v(t,`Package ${e.id} needs a Packer \
536
- entry: ${Y(Ne)}.`,e.line);let s=_n[n],i=new Set([...Object.keys(e.fields).filter(o=>o!=="packer"),...["prepare","build",
532
+ cr);if(c){let a=mt(c[1],n,"Packaging Permission id",s),u=w(c[2],M,n,"Packaging Permission reason",s);(u.includes("`")||u.
533
+ length>Mn)&&b(n,`Packaging Permission reason is plain user-facing text of at most ${Mn} characters.`,s),e.permissions.some(
534
+ l=>l.id===a)&&b(n,`Package ${e.id} has a duplicate Permission ${a}.`,s),e.permissions.push({id:a,reason:u}),e.lines.permission??=
535
+ s;return}b(n,v("Packaging entry",t,pr),s)}function gr(e,t){let n=e.fields.packer;n||b(t,`Package ${e.id} needs a Packer \
536
+ entry: ${Y(xe)}.`,e.line);let s=Wn[n],i=new Set([...Object.keys(e.fields).filter(o=>o!=="packer"),...["prepare","build",
537
537
  "environment"].filter(o=>e[o].length),...e.permissions.length?["permission"]:[]]);for(let o of i)s.entries.includes(o)||
538
- v(t,`The ${n} packer takes no ${de[o]} entry.`,e.lines[o]);for(let o of s.required)i.has(o)||v(t,`Package ${e.id} (${n})\
539
- needs ${/^[AEIOU]/u.test(de[o])?"an":"a"} ${de[o]} entry.`,e.line);e.fields.versionFrom&&!s.versionSources.includes(e.fields.
540
- versionFrom)&&v(t,`The ${n} packer reads its version from ${Y(s.versionSources)}.`,e.lines.versionFrom);let r={id:e.id,label:e.
538
+ b(t,`The ${n} packer takes no ${he[o]} entry.`,e.lines[o]);for(let o of s.required)i.has(o)||b(t,`Package ${e.id} (${n})\
539
+ needs ${/^[AEIOU]/u.test(he[o])?"an":"a"} ${he[o]} entry.`,e.line);e.fields.versionFrom&&!s.versionSources.includes(e.fields.
540
+ versionFrom)&&b(t,`The ${n} packer reads its version from ${Y(s.versionSources)}.`,e.lines.versionFrom);let r={id:e.id,label:e.
541
541
  label,packer:n,workdir:e.fields.workdir||".",runtimeRequirements:e.fields.runtimes||[],prepare:e.prepare,build:e.build,environment:e.
542
542
  environment,output:e.fields.output||null,versionFrom:e.fields.versionFrom||null};return n!=="capacitor"?r:{...r,content:e.
543
543
  fields.content,platforms:e.fields.platforms,application:{id:e.fields.applicationId,name:e.fields.name,icon:e.fields.icon},
544
544
  deepLinkSchemeFrom:e.fields.deepLinkSchemeFrom||null,appLinkDomainsFrom:e.fields.appLinkDomainsFrom||null,permissions:e.
545
- permissions}}function Tn(e,t={}){let{path:n="genesis/stack.md#Packaging"}=t;if(Array.isArray(e)||v(n,"Packaging must be \
546
- supplied as exact Stack section lines."),S(e))return{version:1,packages:[]};let s=[],i=null;for(let a=0;a<e.length;a+=1){
547
- let u=e[a].trim();if(!u)continue;let p=a+1,d=u.match(Ni);if(d){i=ji(d,n,p),s.push(i);continue}u.startsWith("#")&&v(n,`Un\
548
- known Packaging heading: ${u}. Use ${bn}.`,p),i||v(n,`Packaging entries belong under ${bn}.`,p),Gi(i,u,n,p)}s.length===0&&
549
- v(n,"## Packaging needs at least one Package or exactly `- Nothing.`.");let r=s.map(a=>Ui(a,n)),o=new Map;for(let a of r)
550
- o.has(a.id)&&v(n,`Packaging contains a duplicate package id ${a.id}.`),o.set(a.id,a);let c=new Set;for(let a of r.filter(
551
- ({packer:u})=>u==="capacitor")){let u=o.get(a.content);(!u||u.packer!=="web-bundle")&&v(n,`Package ${a.id} Content must \
552
- name a web-bundle package declared in Packaging.`),c.has(a.application.id)&&v(n,`Packaging declares application id ${a.application.
553
- id} twice.`),c.add(a.application.id)}return{version:1,packages:r}}function wn(e,t,n,s){let i=(Array.isArray(e)?e:[]).find(
554
- r=>r?.name===t);return(!i||typeof i.value!="string"||!i.value.trim())&&v(n,`${s} names ${t}, which ## Environment defaul\
555
- ts does not declare with a value.`),i.value.trim()}function On(e,t=[],n={}){let{path:s="genesis/stack.md#Packaging"}=n;return{
545
+ permissions}}function Hn(e,t={}){let{path:n="genesis/stack.md#Packaging"}=t;if(Array.isArray(e)||b(n,"Packaging must be \
546
+ supplied as exact Stack section lines."),_(e))return{version:1,packages:[]};let s=[],i=null;for(let a=0;a<e.length;a+=1){
547
+ let u=e[a].trim();if(!u)continue;let l=a+1,d=u.match(rr);if(d){i=hr(d,n,l),s.push(i);continue}u.startsWith("#")&&b(n,`Un\
548
+ known Packaging heading: ${u}. Use ${jn}.`,l),i||b(n,`Packaging entries belong under ${jn}.`,l),fr(i,u,n,l)}s.length===0&&
549
+ b(n,"## Packaging needs at least one Package or exactly `- Nothing.`.");let r=s.map(a=>gr(a,n)),o=new Map;for(let a of r)
550
+ o.has(a.id)&&b(n,`Packaging contains a duplicate package id ${a.id}.`),o.set(a.id,a);let c=new Set;for(let a of r.filter(
551
+ ({packer:u})=>u==="capacitor")){let u=o.get(a.content);(!u||u.packer!=="web-bundle")&&b(n,`Package ${a.id} Content must \
552
+ name a web-bundle package declared in Packaging.`),c.has(a.application.id)&&b(n,`Packaging declares application id ${a.application.
553
+ id} twice.`),c.add(a.application.id)}return{version:1,packages:r}}function Un(e,t,n,s){let i=(Array.isArray(e)?e:[]).find(
554
+ r=>r?.name===t);return(!i||typeof i.value!="string"||!i.value.trim())&&b(n,`${s} names ${t}, which ## Environment defaul\
555
+ ts does not declare with a value.`),i.value.trim()}function Fn(e,t=[],n={}){let{path:s="genesis/stack.md#Packaging"}=n;return{
556
556
  ...e,packages:e.packages.map(i=>{if(i.packer!=="capacitor")return i;let r={...i,deepLinkScheme:null,appLinkDomains:[]};if(i.
557
- deepLinkSchemeFrom){let o=wn(t,i.deepLinkSchemeFrom,s,`Package ${i.id} Deep link scheme from`);(!Ri.test(o)||["http","ht\
558
- tps","file","content","javascript"].includes(o))&&v(s,`${i.deepLinkSchemeFrom} must be a custom lowercase URL scheme suc\
559
- h as \`notes\`.`),r.deepLinkScheme=o}if(i.appLinkDomainsFrom){let o=wn(t,i.appLinkDomainsFrom,s,`Package ${i.id} App lin\
560
- k domains from`).split(/[\s,]+/u).filter(Boolean);o.some(c=>!ki.test(c))&&v(s,`${i.appLinkDomainsFrom} must list lowerca\
561
- se domain names separated by commas or spaces.`),r.appLinkDomains=[...new Set(o)]}return r})}}function Rn({environment:e={},
562
- section:t={}}={}){z(t,e,"Packaging section");let n=[...t.diagnostics||[]],s={version:1,packages:[]};t.status==="ready"&&
563
- (s=On(Tn(t.lines),e.environmentDefaults));let i=n.length>0?"blocked":s.packages.length>0?"ready":"unconfigured";return{contract:Ce,
564
- status:i,stackHash:t.stackHash,packagingHash:i==="ready"?N(s):"",source:t.source||null,version:s.version,packages:s.packages,
565
- diagnostics:n}}var I="VIBE64_OUTPUTS_INVALID";function h(e,t,n,s={}){m(I,e,t,n,s)}function at(e,t,n,s,i,r){return b(e.slice(t.length),I,
566
- n,s,i,r)}function j(e,t,n,s,i){return at(e,t,n,s,i,{count:1})[0]}function A(e,t,n,s,i,r){e.seen.has(t)&&h(s,`Duplicate ${r}\
567
- .`,i),e.seen.add(t),e[t]=n}var me="vibe64.preview-identity.command.v1",Wi=/^[A-Z_][A-Z0-9_]*$/u,An=new Set(["HOME","LOGNAME","NODE_OPTIONS","PATH",
568
- "TMPDIR","USER"]),Nn=new Set(["email","login","user-id"]),Cn=1e4,De=3e4,Dn=[["- Command: ","command","Command","`tools/p\
569
- review-identity` `argument`..."],["- Protocol: ","protocol","Protocol",`\`${me}\``],["- Identity types: ","identityTypes",
570
- "Identity types",`one or more of ${[...Nn].map(e=>`\`${e}\``).join(" ")}`],["- Enabled environment: ","enabledEnvironmen\
557
+ deepLinkSchemeFrom){let o=Un(t,i.deepLinkSchemeFrom,s,`Package ${i.id} Deep link scheme from`);(!nr.test(o)||["http","ht\
558
+ tps","file","content","javascript"].includes(o))&&b(s,`${i.deepLinkSchemeFrom} must be a custom lowercase URL scheme suc\
559
+ h as \`notes\`.`),r.deepLinkScheme=o}if(i.appLinkDomainsFrom){let o=Un(t,i.appLinkDomainsFrom,s,`Package ${i.id} App lin\
560
+ k domains from`).split(/[\s,]+/u).filter(Boolean);o.some(c=>!sr.test(c))&&b(s,`${i.appLinkDomainsFrom} must list lowerca\
561
+ se domain names separated by commas or spaces.`),r.appLinkDomains=[...new Set(o)]}return r})}}function qn({environment:e={},
562
+ section:t={}}={}){j(t,e,"Packaging section");let n=[...t.diagnostics||[]],s={version:1,packages:[]};t.status==="ready"&&
563
+ (s=Fn(Hn(t.lines),e.environmentDefaults));let i=n.length>0?"blocked":s.packages.length>0?"ready":"unconfigured";return{contract:Ve,
564
+ status:i,stackHash:t.stackHash,packagingHash:i==="ready"?k(s):"",source:t.source||null,version:s.version,packages:s.packages,
565
+ diagnostics:n}}var T="VIBE64_OUTPUTS_INVALID";function h(e,t,n,s={}){m(T,e,t,n,s)}function ft(e,t,n,s,i,r){return y(e.slice(t.length),T,
566
+ n,s,i,r)}function G(e,t,n,s,i){return ft(e,t,n,s,i,{count:1})[0]}function D(e,t,n,s,i,r){e.seen.has(t)&&h(s,`Duplicate ${r}\
567
+ .`,i),e.seen.add(t),e[t]=n}var fe="vibe64.preview-identity.command.v1",Er=/^[A-Z_][A-Z0-9_]*$/u,Yn=new Set(["HOME","LOGNAME","NODE_OPTIONS","PATH",
568
+ "TMPDIR","USER"]),Xn=new Set(["email","login","user-id"]),Zn=1e4,Me=3e4,Jn=[["- Command: ","command","Command","`tools/p\
569
+ review-identity` `argument`..."],["- Protocol: ","protocol","Protocol",`\`${fe}\``],["- Identity types: ","identityTypes",
570
+ "Identity types",`one or more of ${[...Xn].map(e=>`\`${e}\``).join(" ")}`],["- Enabled environment: ","enabledEnvironmen\
571
571
  t","Enabled environment","`ENV_NAME`"],["- Secret environment: ","secretEnvironment","Secret environment","`ENV_NAME`"],
572
- ["- Runtimes: ","runtimes","Runtimes","`runtime`..."],["- Timeout ms: ","timeoutMs","Timeout ms",`\`1\` through \`${De}\`\
573
- (default ${Cn})`]],ct=Dn.map(([e,,,t])=>`${e}${t}`);function kn(e,t,n,s){if(e===void 0)return"";let i=y(e,I,t,`Preview \
574
- identity ${n} environment name`,s);return(!Wi.test(i)||An.has(i)||i.startsWith("XDG_"))&&h(t,`Preview identity ${n} envi\
575
- ronment name is invalid.`,s),i}function Pn(e){return{seen:new Set,line:e}}function $n(e,t,n,s){let i=Dn.find(([u])=>t.startsWith(
576
- u));i||h(n,k("Preview identity entry",t,ct),s);let[r,o,c]=i,a=at(t,r,n,`Preview identity ${c}`,s);!["command","identityT\
577
- ypes","runtimes"].includes(o)&&a.length!==1&&h(n,`Preview identity ${c} accepts exactly one value.`,s),A(e,o,a,n,s,`Prev\
578
- iew identity ${c} entry`)}function xn(e,t,n){for(let[u,p]of[["command","Command"],["protocol","Protocol"],["identityType\
579
- s","Identity types"]])e[u]||h(t,`Output target ${n} Preview identity needs ${p}.`,e.line);let s=e.command.map(u=>`\`${u}\
580
- \``).join(" "),i=D(s,I,t,"Preview identity command",e.line);(!i[0].includes("/")||i[0].includes("\\")||i[0].split("/").some(
572
+ ["- Runtimes: ","runtimes","Runtimes","`runtime`..."],["- Timeout ms: ","timeoutMs","Timeout ms",`\`1\` through \`${Me}\`\
573
+ (default ${Zn})`]],gt=Jn.map(([e,,,t])=>`${e}${t}`);function Kn(e,t,n,s){if(e===void 0)return"";let i=w(e,T,t,`Preview \
574
+ identity ${n} environment name`,s);return(!Er.test(i)||Yn.has(i)||i.startsWith("XDG_"))&&h(t,`Preview identity ${n} envi\
575
+ ronment name is invalid.`,s),i}function Qn(e){return{seen:new Set,line:e}}function es(e,t,n,s){let i=Jn.find(([u])=>t.startsWith(
576
+ u));i||h(n,v("Preview identity entry",t,gt),s);let[r,o,c]=i,a=ft(t,r,n,`Preview identity ${c}`,s);!["command","identityT\
577
+ ypes","runtimes"].includes(o)&&a.length!==1&&h(n,`Preview identity ${c} accepts exactly one value.`,s),D(e,o,a,n,s,`Prev\
578
+ iew identity ${c} entry`)}function ts(e,t,n){for(let[u,l]of[["command","Command"],["protocol","Protocol"],["identityType\
579
+ s","Identity types"]])e[u]||h(t,`Output target ${n} Preview identity needs ${l}.`,e.line);let s=e.command.map(u=>`\`${u}\
580
+ \``).join(" "),i=N(s,T,t,"Preview identity command",e.line);(!i[0].includes("/")||i[0].includes("\\")||i[0].split("/").some(
581
581
  u=>!u||[".",".."].includes(u))||i.some(u=>/\{(?:host|port)\}/u.test(u)))&&h(t,"Preview identity command must use a liter\
582
- al app-owned project-relative executable.",e.line);let r=e.protocol[0];r!==me&&h(t,`Preview identity protocol must be ${me}\
583
- .`,e.line);let o=[...new Set(e.identityTypes.map(u=>(Nn.has(u)||h(t,`Unsupported preview identity type: ${u}.`,e.line),u)))];
584
- o.length!==e.identityTypes.length&&h(t,"Preview identity types must not contain duplicates.",e.line);let c={enabled:kn(e.
585
- enabledEnvironment?.[0],t,"enabled",e.line),secret:kn(e.secretEnvironment?.[0],t,"secret",e.line)};c.enabled&&c.enabled===
586
- c.secret&&h(t,"Preview identity enabled and secret environment names must differ.",e.line);let a=Cn;if(e.timeoutMs){let u=e.
587
- timeoutMs[0];/^[0-9]+$/u.test(u)||h(t,`Preview identity Timeout ms must be from 1 through ${De}.`,e.line),a=Number(u),(!Number.
588
- isSafeInteger(a)||a<1||a>De)&&h(t,`Preview identity Timeout ms must be from 1 through ${De}.`,e.line)}return{command:i,environment:c,
589
- identityTypes:o,protocol:r,runtimes:e.runtimes?P(e.runtimes.map(u=>`\`${u}\``).join(" "),I,t,"Preview identity runtimes",
590
- e.line):[],timeoutMs:a}}var Bi="vibe64.outputs.v1",$e="Outputs",Hi=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,ut=/\{([a-z][a-z0-9:-]*)\}/gu,zi=/^### Target `([^`\r\n]+)`:[ \t]+(.+)$/u,
591
- Fi=/^#### Parameter `([^`\r\n]+)`:[ \t]+(.+)$/u,qi=/^#### Download `([^`\r\n]+)`$/u,Yi=/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/u,
592
- Mn=new Set(["finite","interactive"]),pt=new Set(["development","test"]),jn=new Set(["terminal","web"]),Ln=16,Pe=e=>[...e].
593
- map(t=>`\`${t}\``).join(" or "),Ki=Object.freeze(["### Target `id`: Label","#### Parameter `id`: Label","#### Presentati\
594
- on","#### Preview identity","#### Download `id`"]),xe=Object.freeze({target:["- Default.",`- Mode: ${Pe(Mn)}`,`- Data: ${Pe(
595
- pt)}`,"- Workdir: `path`","- Runtimes: `runtime`...","- Prepare|Build|Run `label`: `command` `argument`..."],parameter:[
596
- "- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${Pe(jn)}`,"- Preferred port: `1024` t\
597
- hrough `65535`","- URL path: `/path`","- Ready when: `GET` `/path` returns `200`"],previewIdentity:ct,download:["- Path:\
598
- `path`","- Name: `file-name`","- Media type: `type/subtype`"]});function lt(e,t,n,s){let i=y(e,I,t,n,s);return Hi.test(
599
- i)||h(t,`${n} must use lowercase letters, digits, and single hyphens.`,s),i}function Xi(e,t,n,s){let i=D(e,I,t,n,s);for(let r of i)
600
- r.replace(ut,"").includes("{parameter:")&&h(t,`${n} has an invalid {parameter:id} placeholder.`,s),[...r.matchAll(ut)].some(
582
+ al app-owned project-relative executable.",e.line);let r=e.protocol[0];r!==fe&&h(t,`Preview identity protocol must be ${fe}\
583
+ .`,e.line);let o=[...new Set(e.identityTypes.map(u=>(Xn.has(u)||h(t,`Unsupported preview identity type: ${u}.`,e.line),u)))];
584
+ o.length!==e.identityTypes.length&&h(t,"Preview identity types must not contain duplicates.",e.line);let c={enabled:Kn(e.
585
+ enabledEnvironment?.[0],t,"enabled",e.line),secret:Kn(e.secretEnvironment?.[0],t,"secret",e.line)};c.enabled&&c.enabled===
586
+ c.secret&&h(t,"Preview identity enabled and secret environment names must differ.",e.line);let a=Zn;if(e.timeoutMs){let u=e.
587
+ timeoutMs[0];/^[0-9]+$/u.test(u)||h(t,`Preview identity Timeout ms must be from 1 through ${Me}.`,e.line),a=Number(u),(!Number.
588
+ isSafeInteger(a)||a<1||a>Me)&&h(t,`Preview identity Timeout ms must be from 1 through ${Me}.`,e.line)}return{command:i,environment:c,
589
+ identityTypes:o,protocol:r,runtimes:e.runtimes?C(e.runtimes.map(u=>`\`${u}\``).join(" "),T,t,"Preview identity runtimes",
590
+ e.line):[],timeoutMs:a}}var br="bucket";function yr(e=""){return e===br}function ns(e={}){return!yr(e.kind)}var vr="vibe64.outputs.v1",Ge="Outputs",Sr=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Et=/\{([a-z][a-z0-9:-]*)\}/gu,wr=/^### Target `([^`\r\n]+)`:[ \t]+(.+)$/u,
591
+ _r=/^#### Parameter `([^`\r\n]+)`:[ \t]+(.+)$/u,Ir=/^#### Download `([^`\r\n]+)`$/u,Tr=/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/u,
592
+ rs=new Set(["finite","interactive"]),bt=new Set(["development","test"]),os=new Set(["terminal","web"]),ss=16,je=e=>[...e].
593
+ map(t=>`\`${t}\``).join(" or "),kr=Object.freeze(["### Target `id`: Label","#### Parameter `id`: Label","#### Presentati\
594
+ on","#### Preview identity","#### Download `id`"]),Ue=Object.freeze({target:["- Default.",`- Mode: ${je(rs)}`,`- Data: ${je(
595
+ bt)}`,"- Workdir: `path`","- Runtimes: `runtime`...","- Prepare|Build|Run `label`: `command` `argument`..."],parameter:[
596
+ "- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${je(os)}`,"- Preferred port: `1024` t\
597
+ hrough `65535`","- URL path: `/path`","- Ready when: `GET` `/path` returns `200`"],previewIdentity:gt,download:["- Path:\
598
+ `path`","- Name: `file-name`","- Media type: `type/subtype`"]});function yt(e,t,n,s){let i=w(e,T,t,n,s);return Sr.test(
599
+ i)||h(t,`${n} must use lowercase letters, digits, and single hyphens.`,s),i}function Or(e,t,n,s){let i=N(e,T,t,n,s);for(let r of i)
600
+ r.replace(Et,"").includes("{parameter:")&&h(t,`${n} has an invalid {parameter:id} placeholder.`,s),[...r.matchAll(Et)].some(
601
601
  o=>!["host","port"].includes(o[1])&&!/^parameter:[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(o[1]))&&h(t,`${n} supports only {host}\
602
- , {port}, and {parameter:id} placeholders.`,s);return i}function Ji(e,t,n){return{id:lt(e[1],t,"Output target id",n),label:y(
603
- e[2],I,t,"Output target label",n),default:!1,mode:"",workdir:".",runtimeRequirements:[],steps:[],presentation:null,previewIdentity:null,
604
- downloads:[],parameters:[],seen:new Set,line:n}}function Zi(e,t,n,s){if(t==="- Required."){A(e,"required",!0,n,s,"Parame\
602
+ , {port}, and {parameter:id} placeholders.`,s);return i}function Ar(e,t,n){return{id:yt(e[1],t,"Output target id",n),label:w(
603
+ e[2],T,t,"Output target label",n),default:!1,mode:"",workdir:".",runtimeRequirements:[],steps:[],presentation:null,previewIdentity:null,
604
+ downloads:[],parameters:[],seen:new Set,line:n}}function Rr(e,t,n,s){if(t==="- Required."){D(e,"required",!0,n,s,"Parame\
605
605
  ter Required entry");return}for(let[i,r]of[["Default","default"],["Description","description"]]){let o=`- ${i}: `;if(t.startsWith(
606
- o)){let c=j(t,o,n,`Parameter ${i}`,s);A(e,r,c,n,s,`Parameter ${i} entry`);return}}h(n,k("Outputs parameter entry",t,xe.parameter),
607
- s)}function Qi(e,t={}){let n=e.parameters||[],s=r=>m("VIBE64_OUTPUT_PARAMETERS_INVALID","Outputs",r);(!t||typeof t!="obj\
606
+ o)){let c=G(t,o,n,`Parameter ${i}`,s);D(e,r,c,n,s,`Parameter ${i} entry`);return}}h(n,v("Outputs parameter entry",t,Ue.parameter),
607
+ s)}function Nr(e,t={}){let n=e.parameters||[],s=r=>m("VIBE64_OUTPUT_PARAMETERS_INVALID","Outputs",r);(!t||typeof t!="obj\
608
608
  ect"||Array.isArray(t))&&s("Output parameters must be an object of text values.");let i=new Set(n.map(({id:r})=>r));for(let r of Object.
609
609
  keys(t))i.has(r)||s(`Unknown output parameter: ${r}.`);return Object.fromEntries(n.map(r=>{let o=Object.hasOwn(t,r.id)?t[r.
610
610
  id]:r.default;return(typeof o!="string"||o.length>4096||/[\0\r\n]/u.test(o))&&s(`${r.label} must be a single line of tex\
611
- t, at most 4096 characters.`),r.required&&!o.trim()&&s(`${r.label} is required.`),[r.id,o]}))}function er(e){return{kind:"",
612
- preferredPort:null,urlPath:"/",readiness:null,seen:new Set,line:e}}function tr(e,t,n){return{id:lt(e[1],t,"Download id",
613
- n),path:"",name:"",mediaType:"",seen:new Set,line:n}}function nr(e,t,n){/^[0-9]+$/u.test(e)||h(t,"Web presentation prefe\
611
+ t, at most 4096 characters.`),r.required&&!o.trim()&&s(`${r.label} is required.`),[r.id,o]}))}function Cr(e){return{kind:"",
612
+ preferredPort:null,urlPath:"/",readiness:null,seen:new Set,line:e}}function Dr(e,t,n){return{id:yt(e[1],t,"Download id",
613
+ n),path:"",name:"",mediaType:"",seen:new Set,line:n}}function Pr(e,t,n){/^[0-9]+$/u.test(e)||h(t,"Web presentation prefe\
614
614
  rred port must be an integer from 1024 through 65535.",n);let s=Number(e);return(!Number.isSafeInteger(s)||s<1024||s>65535)&&
615
- h(t,"Web presentation preferred port must be an integer from 1024 through 65535.",n),s}function sr(e,t,n,s){if(t.startsWith(
616
- "- Data: ")){let r=j(t,"- Data: ",n,"Output target Data",s);pt.has(r)||h(n,`Output target Data must be ${Pe(pt)}.`,s),A(
617
- e,"dataMode",r,n,s,"output target Data entry");return}if(t==="- Default."){A(e,"default",!0,n,s,"output target Default e\
618
- ntry");return}if(t.startsWith("- Mode: ")){let r=j(t,"- Mode: ",n,"Output target Mode",s);Mn.has(r)||h(n,"Output target \
619
- Mode must be `interactive` or `finite`.",s),A(e,"mode",r,n,s,"output target Mode entry");return}if(t.startsWith("- Workd\
620
- ir: ")){A(e,"workdir",w(j(t,"- Workdir: ",n,"Output target Workdir",s),I,n,"Output target workdir",s),n,s,"output target\
621
- Workdir entry");return}if(t.startsWith("- Runtimes: ")){A(e,"runtimeRequirements",P(t.slice(12),I,n,"Output target runt\
615
+ h(t,"Web presentation preferred port must be an integer from 1024 through 65535.",n),s}function $r(e,t,n,s){if(t.startsWith(
616
+ "- Data: ")){let r=G(t,"- Data: ",n,"Output target Data",s);bt.has(r)||h(n,`Output target Data must be ${je(bt)}.`,s),D(
617
+ e,"dataMode",r,n,s,"output target Data entry");return}if(t==="- Default."){D(e,"default",!0,n,s,"output target Default e\
618
+ ntry");return}if(t.startsWith("- Mode: ")){let r=G(t,"- Mode: ",n,"Output target Mode",s);rs.has(r)||h(n,"Output target \
619
+ Mode must be `interactive` or `finite`.",s),D(e,"mode",r,n,s,"output target Mode entry");return}if(t.startsWith("- Workd\
620
+ ir: ")){D(e,"workdir",S(G(t,"- Workdir: ",n,"Output target Workdir",s),T,n,"Output target workdir",s),n,s,"output target\
621
+ Workdir entry");return}if(t.startsWith("- Runtimes: ")){D(e,"runtimeRequirements",C(t.slice(12),T,n,"Output target runt\
622
622
  imes",s),n,s,"output target Runtimes entry");return}let i=t.match(/^- (Prepare|Build|Run) `([^`\r\n]+)`:[ \t]+(.+)$/u);if(i){
623
- let r=i[1].toLowerCase(),o=Xi(i[3],n,"Output step command",s);r!=="run"&&o.some(c=>/\{(?:host|port)\}/u.test(c))&&h(n,"O\
624
- nly a web presentation's Run step may use {host} or {port} placeholders.",s),e.steps.push({label:y(i[2],I,n,"Output step\
625
- label",s),argv:o,role:r});return}h(n,k("Outputs target entry",t,[...xe.target,...Ki.slice(1)]),s)}function ir(e,t,n,s){
626
- if(t.startsWith("- Kind: ")){let i=j(t,"- Kind: ",n,"Presentation Kind",s);jn.has(i)||h(n,"Presentation Kind must be `te\
627
- rminal` or `web`.",s),A(e,"kind",i,n,s,"Presentation Kind entry");return}if(t.startsWith("- Preferred port: ")){A(e,"pre\
628
- ferredPort",nr(j(t,"- Preferred port: ",n,"Web presentation Preferred port",s),n,s),n,s,"Presentation Preferred port ent\
629
- ry");return}if(t.startsWith("- URL path: ")){A(e,"urlPath",Fe(j(t,"- URL path: ",n,"Web presentation URL path",s),I,n,"W\
630
- eb presentation URL path",s),n,s,"Presentation URL path entry");return}if(t.startsWith("- Ready when: ")){A(e,"readiness",
631
- ae(t,I,n,"Web presentation readiness",s),n,s,"Presentation Ready when entry");return}h(n,k("Presentation entry",t,xe.presentation),
632
- s)}function rr(e,t,n){let s=y(e,I,t,"Download Name",n);return(s.length>255||[".",".."].includes(s)||/[\\/\0]/u.test(s)||
633
- s.trim()!==s)&&h(t,"Download Name must be a safe filename without path separators.",n),s}function or(e,t,n){let s=y(e,I,
634
- t,"Download Media type",n);return(s.length>127||!Yi.test(s))&&h(t,"Download Media type must be a lowercase type/subtype \
635
- value.",n),s}function ar(e,t,n,s){if(t.startsWith("- Path: ")){A(e,"path",w(j(t,"- Path: ",n,"Download Path",s),I,n,"Dow\
636
- nload path",s,{allowRoot:!1}),n,s,"Download Path entry");return}if(t.startsWith("- Name: ")){A(e,"name",rr(j(t,"- Name: ",
637
- n,"Download Name",s),n,s),n,s,"Download Name entry");return}if(t.startsWith("- Media type: ")){A(e,"mediaType",or(j(t,"-\
638
- Media type: ",n,"Download Media type",s),n,s),n,s,"Download Media type entry");return}h(n,k("Download entry",t,xe.download),
639
- s)}function cr(e,t,n){for(let[s,i]of[["path","Path"],["name","Name"],["mediaType","Media type"]])e[s]||h(t,`Output targe\
640
- t ${n} Download ${e.id} needs ${i}.`,e.line);return{id:e.id,path:e.path,name:e.name,mediaType:e.mediaType}}function ur(e,t,n){
623
+ let r=i[1].toLowerCase(),o=Or(i[3],n,"Output step command",s);r!=="run"&&o.some(c=>/\{(?:host|port)\}/u.test(c))&&h(n,"O\
624
+ nly a web presentation's Run step may use {host} or {port} placeholders.",s),e.steps.push({label:w(i[2],T,n,"Output step\
625
+ label",s),argv:o,role:r});return}h(n,v("Outputs target entry",t,[...Ue.target,...kr.slice(1)]),s)}function Lr(e,t,n,s){
626
+ if(t.startsWith("- Kind: ")){let i=G(t,"- Kind: ",n,"Presentation Kind",s);os.has(i)||h(n,"Presentation Kind must be `te\
627
+ rminal` or `web`.",s),D(e,"kind",i,n,s,"Presentation Kind entry");return}if(t.startsWith("- Preferred port: ")){D(e,"pre\
628
+ ferredPort",Pr(G(t,"- Preferred port: ",n,"Web presentation Preferred port",s),n,s),n,s,"Presentation Preferred port ent\
629
+ ry");return}if(t.startsWith("- URL path: ")){D(e,"urlPath",et(G(t,"- URL path: ",n,"Web presentation URL path",s),T,n,"W\
630
+ eb presentation URL path",s),n,s,"Presentation URL path entry");return}if(t.startsWith("- Ready when: ")){D(e,"readiness",
631
+ ce(t,T,n,"Web presentation readiness",s),n,s,"Presentation Ready when entry");return}h(n,v("Presentation entry",t,Ue.presentation),
632
+ s)}function xr(e,t,n){let s=w(e,T,t,"Download Name",n);return(s.length>255||[".",".."].includes(s)||/[\\/\0]/u.test(s)||
633
+ s.trim()!==s)&&h(t,"Download Name must be a safe filename without path separators.",n),s}function Vr(e,t,n){let s=w(e,T,
634
+ t,"Download Media type",n);return(s.length>127||!Tr.test(s))&&h(t,"Download Media type must be a lowercase type/subtype \
635
+ value.",n),s}function Mr(e,t,n,s){if(t.startsWith("- Path: ")){D(e,"path",S(G(t,"- Path: ",n,"Download Path",s),T,n,"Dow\
636
+ nload path",s,{allowRoot:!1}),n,s,"Download Path entry");return}if(t.startsWith("- Name: ")){D(e,"name",xr(G(t,"- Name: ",
637
+ n,"Download Name",s),n,s),n,s,"Download Name entry");return}if(t.startsWith("- Media type: ")){D(e,"mediaType",Vr(G(t,"-\
638
+ Media type: ",n,"Download Media type",s),n,s),n,s,"Download Media type entry");return}h(n,v("Download entry",t,Ue.download),
639
+ s)}function jr(e,t,n){for(let[s,i]of[["path","Path"],["name","Name"],["mediaType","Media type"]])e[s]||h(t,`Output targe\
640
+ t ${n} Download ${e.id} needs ${i}.`,e.line);return{id:e.id,path:e.path,name:e.name,mediaType:e.mediaType}}function Gr(e,t,n){
641
641
  return e.kind||h(t,`Output target ${n} Presentation needs Kind.`,e.line),e.kind==="terminal"?((e.preferredPort!==null||e.
642
642
  readiness||e.seen.has("urlPath"))&&h(t,`Output target ${n} terminal Presentation accepts only Kind.`,e.line),{kind:"term\
643
643
  inal"}):(e.readiness||h(t,`Output target ${n} web Presentation needs one Ready when entry.`,e.line),{kind:"web",preferredPort:e.
644
- preferredPort,urlPath:e.urlPath,readiness:e.readiness})}function Vn(e,t){e.mode||h(t,`Output target ${e.id} needs one Mo\
644
+ preferredPort,urlPath:e.urlPath,readiness:e.readiness})}function is(e,t){e.mode||h(t,`Output target ${e.id} needs one Mo\
645
645
  de entry.`,e.line),e.steps.length===0&&h(t,`Output target ${e.id} needs at least one step.`,e.line);let n={prepare:0,build:1,
646
646
  run:2};for(let u=1;u<e.steps.length;u+=1)n[e.steps[u].role]<n[e.steps[u-1].role]&&h(t,`Output target ${e.id} steps must \
647
- be ordered Prepare, Build, then Run.`,e.line);let s=e.steps.filter(({role:u})=>u==="run"),i=e.downloads.map(u=>cr(u,t,e.
647
+ be ordered Prepare, Build, then Run.`,e.line);let s=e.steps.filter(({role:u})=>u==="run"),i=e.downloads.map(u=>jr(u,t,e.
648
648
  id));new Set(i.map(({id:u})=>u)).size!==i.length&&h(t,`Output target ${e.id} contains a duplicate Download id.`,e.line),
649
649
  e.mode==="finite"?((s.length>0||e.presentation||e.previewIdentity)&&h(t,`Finite output target ${e.id} cannot have Run, P\
650
650
  resentation, or Preview identity entries.`,e.line),i.length===0&&h(t,`Finite output target ${e.id} needs at least one Do\
651
651
  wnload.`,e.line)):s.length!==1||e.steps.at(-1).role!=="run"?h(t,`Interactive output target ${e.id} needs exactly one fin\
652
652
  al Run step.`,e.line):e.presentation||h(t,`Interactive output target ${e.id} needs one Presentation.`,e.line);let r=e.presentation?
653
- ur(e.presentation,t,e.id):null,o=e.steps.flatMap(({argv:u})=>u.flatMap(p=>[...p.matchAll(ut)].map(d=>d[1])));o.some(u=>[
653
+ Gr(e.presentation,t,e.id):null,o=e.steps.flatMap(({argv:u})=>u.flatMap(l=>[...l.matchAll(Et)].map(d=>d[1])));o.some(u=>[
654
654
  "host","port"].includes(u))&&r?.kind!=="web"&&h(t,"Only a web output target may use {host} or {port} placeholders.",e.line);
655
- let c=e.parameters.map(({seen:u,...p})=>p),a=new Set(c.map(({id:u})=>u));(c.length>Ln||a.size!==c.length)&&h(t,`Output t\
656
- arget ${e.id} may declare at most ${Ln} parameters with unique ids.`,e.line);for(let u of o.filter(p=>p.startsWith("para\
657
- meter:"))){let p=u.slice(10);a.has(p)||h(t,`Undeclared output parameter: ${p}.`,e.line)}for(let u of c)o.includes(`param\
655
+ let c=e.parameters.map(({seen:u,...l})=>l),a=new Set(c.map(({id:u})=>u));(c.length>ss||a.size!==c.length)&&h(t,`Output t\
656
+ arget ${e.id} may declare at most ${ss} parameters with unique ids.`,e.line);for(let u of o.filter(l=>l.startsWith("para\
657
+ meter:"))){let l=u.slice(10);a.has(l)||h(t,`Undeclared output parameter: ${l}.`,e.line)}for(let u of c)o.includes(`param\
658
658
  eter:${u.id}`)||h(t,`Output parameter ${u.id} must be used in a step command.`,e.line);return e.previewIdentity&&r?.kind!==
659
659
  "web"&&h(t,"Only a web output target may declare Preview identity.",e.line),{id:e.id,label:e.label,default:e.default,mode:e.
660
660
  mode,workdir:e.workdir,runtimeRequirements:e.runtimeRequirements,...e.dataMode?{dataMode:e.dataMode}:{},steps:e.steps,presentation:r,
661
- downloads:i,...c.length?{parameters:c}:{},...e.previewIdentity?{previewIdentity:xn(e.previewIdentity,t,e.id)}:{}}}function Le(e,t={}){
661
+ downloads:i,...c.length?{parameters:c}:{},...e.previewIdentity?{previewIdentity:ts(e.previewIdentity,t,e.id)}:{}}}function Be(e,t={}){
662
662
  let{path:n="genesis/stack.md#Outputs"}=t;if(Array.isArray(e)||h(n,"Outputs must be supplied as exact Stack section lines\
663
- ."),S(e))return{version:1,targets:[]};let s=[],i=null,r="target",o=null;for(let a=0;a<e.length;a+=1){let u=e[a].trim();if(!u)
664
- continue;let p=a+1,d=u.match(zi);if(d){i&&s.push(Vn(i,n)),i=Ji(d,n,p),r="target",o=null;continue}i||h(n,"## Outputs must\
665
- begin with a Target heading.",p);let l=u.match(Fi);if(l){let E={id:lt(l[1],n,"Parameter id",p),label:y(l[2],I,n,"Parame\
666
- ter label",p),default:"",description:"",required:!1,seen:new Set};i.parameters.push(E),r="parameter",o=E;continue}if(u===
667
- "#### Presentation"){i.presentation&&h(n,"Presentation must appear at most once below an output target.",p),i.presentation=
668
- er(p),r="presentation",o=i.presentation;continue}if(u==="#### Preview identity"){i.previewIdentity&&h(n,"Preview identit\
669
- y must appear at most once below an output target.",p),i.previewIdentity=Pn(p),r="previewIdentity",o=i.previewIdentity;continue}
670
- let g=u.match(qi);if(g){let E=tr(g,n,p);i.downloads.push(E),r="download",o=E;continue}r==="parameter"?Zi(o,u,n,p):r==="p\
671
- resentation"?ir(o,u,n,p):r==="previewIdentity"?$n(o,u,n,p):r==="download"?ar(o,u,n,p):sr(i,u,n,p)}i&&s.push(Vn(i,n)),s.length===
663
+ ."),_(e))return{version:1,targets:[]};let s=[],i=null,r="target",o=null;for(let a=0;a<e.length;a+=1){let u=e[a].trim();if(!u)
664
+ continue;let l=a+1,d=u.match(wr);if(d){i&&s.push(is(i,n)),i=Ar(d,n,l),r="target",o=null;continue}i||h(n,"## Outputs must\
665
+ begin with a Target heading.",l);let p=u.match(_r);if(p){let E={id:yt(p[1],n,"Parameter id",l),label:w(p[2],T,n,"Parame\
666
+ ter label",l),default:"",description:"",required:!1,seen:new Set};i.parameters.push(E),r="parameter",o=E;continue}if(u===
667
+ "#### Presentation"){i.presentation&&h(n,"Presentation must appear at most once below an output target.",l),i.presentation=
668
+ Cr(l),r="presentation",o=i.presentation;continue}if(u==="#### Preview identity"){i.previewIdentity&&h(n,"Preview identit\
669
+ y must appear at most once below an output target.",l),i.previewIdentity=Qn(l),r="previewIdentity",o=i.previewIdentity;continue}
670
+ let g=u.match(Ir);if(g){let E=Dr(g,n,l);i.downloads.push(E),r="download",o=E;continue}r==="parameter"?Rr(o,u,n,l):r==="p\
671
+ resentation"?Lr(o,u,n,l):r==="previewIdentity"?es(o,u,n,l):r==="download"?Mr(o,u,n,l):$r(i,u,n,l)}i&&s.push(is(i,n)),s.length===
672
672
  0&&h(n,"## Outputs needs at least one Target or exactly `- Nothing.`.");let c=s.map(({id:a})=>a);return new Set(c).size!==
673
673
  c.length&&h(n,"Outputs contains a duplicate target id."),s.filter(({default:a})=>a).length>1&&h(n,"Outputs may declare a\
674
- t most one default target."),{version:1,targets:s}}function pr(e,t={}){let{resourcesPreparing:n=!1}=t,s=e.details||{},i=Array.
674
+ t most one default target."),{version:1,targets:s}}function Ur(e,t={}){let{resourcesPreparing:n=!1}=t,s=e.details||{},i=Array.
675
675
  isArray(s.missing)?s.missing:[],r=(Array.isArray(s.alternatives)?s.alternatives:[]).map((c,a)=>Array.isArray(i[a])&&i[a].
676
676
  length?i[a].join(" and "):String(c)).filter(Boolean);if(e.code!=="STACK_RESOURCE_MISSING"||!r.length)return e.message;let o=String(
677
677
  s.resource||"").trim()||"resources";return n?`Vibe64 is still setting up this app's ${o}. Preview can start when workspa\
678
678
  ce setup finishes; then press Check again.`:`This app needs its ${o} before Preview can start: set ${r.join(", or ")} in\
679
- Env (in Dash, under Development), then press Check again.`}function Gn({environment:e={},section:t={},resourcesPreparing:n=!1}={}){
680
- z(t,e,"Outputs section");let s=[...t.diagnostics||[]],i=[...e.diagnostics||[]],r={version:1,targets:[]};t.status==="read\
681
- y"&&(r=Le(t.lines));let o=i.length===0?null:[...new Set(i.map(p=>pr(p,{resourcesPreparing:n})))].join(" "),c=r.targets.map(
682
- p=>({...p,source:t.source||null,available:s.length===0&&i.length===0,disabledReason:o})),a=[...s,...i],u="ready";return a.
683
- length>0?u="blocked":c.length===0&&(u="unconfigured"),{contract:Bi,status:u,stackHash:t.stackHash,components:[...t.components||
684
- []],environmentDefaults:structuredClone(e.environmentDefaults||[]),runtimeRequirements:F(c.flatMap(p=>p.runtimeRequirements)),
685
- resources:structuredClone(e.resources||[]),targets:c,diagnostics:a}}var Un="Project services",lr="vibe64.project-services.v1",se="VIBE64_PROJECT_SERVICES_INVALID",ie="genesis/stack.md#Proj\
686
- ect services",dr="- Start `service-id` [per session] with `runtime` [in `workdir`]: `command` `argument`...";function Wn(e){
687
- if(Array.isArray(e)||m(se,ie,"Expected exact Project services section lines."),S(e))return[];let t=[];for(let[n,s]of e.entries()){
679
+ Env (in Dash, under Development), then press Check again.`}function Br(e={}){let t=new Set((e.resources||[]).filter(n=>n?.
680
+ resource&&!ns(n.resource)).map(n=>n.resource.id));return(e.diagnostics||[]).filter(n=>!(n?.code==="STACK_RESOURCE_MISSIN\
681
+ G"&&t.has(n.details?.resource)))}function as({environment:e={},section:t={},resourcesPreparing:n=!1}={}){j(t,e,"Outputs \
682
+ section");let s=[...t.diagnostics||[]],i=Br(e),r={version:1,targets:[]};t.status==="ready"&&(r=Be(t.lines));let o=i.length===
683
+ 0?null:[...new Set(i.map(l=>Ur(l,{resourcesPreparing:n})))].join(" "),c=r.targets.map(l=>({...l,source:t.source||null,available:s.
684
+ length===0&&i.length===0,disabledReason:o})),a=[...s,...i],u="ready";return a.length>0?u="blocked":c.length===0&&(u="unc\
685
+ onfigured"),{contract:vr,status:u,stackHash:t.stackHash,components:[...t.components||[]],environmentDefaults:structuredClone(
686
+ e.environmentDefaults||[]),runtimeRequirements:H(c.flatMap(l=>l.runtimeRequirements)),resources:structuredClone(e.resources||
687
+ []),targets:c,diagnostics:a}}var cs="Project services",Wr="vibe64.project-services.v1",se="VIBE64_PROJECT_SERVICES_INVALID",ie="genesis/stack.md#Proj\
688
+ ect services",zr="- Start `service-id` [per session] with `runtime` [in `workdir`]: `command` `argument`...";function us(e){
689
+ if(Array.isArray(e)||m(se,ie,"Expected exact Project services section lines."),_(e))return[];let t=[];for(let[n,s]of e.entries()){
688
690
  let i=s.trim();if(!i)continue;let r=n+1,o=i.match(/^- Start `([a-z][a-z0-9-]{0,63})`( per session)? with (.+?): (.+)$/u);
689
- o||m(se,ie,`Use: ${dr}`,r),t.some(({id:a})=>a===o[1])&&m(se,ie,"Duplicate project service id.",r);let c=o[3].match(/^(.*?) in `([^`\r\n]+)`$/u);
690
- t.push({id:o[1],...o[2]?{scope:"session"}:{},runtimeRequirements:P(c?c[1]:o[3],se,ie,"Service runtimes",r),workdir:w(c?.[2]||
691
- ".",se,ie,"Service workdir",r),argv:D(o[4],se,ie,"Service command",r)})}return t.length||m(se,ie,"Declare a service or e\
692
- xactly `- Nothing.`."),t}function Bn(e={}){let t=e.status==="ready"?Wn(e.lines):[];return{contract:lr,status:e.status===
693
- "blocked"?"blocked":t.length?"ready":"unconfigured",services:t,recipeHash:t.length?N(t):"",diagnostics:e.diagnostics||[]}}import{access as mr}from"node:fs/promises";import zn from"node:path";var hr="vibe64.workspace-setup.v1",he="Workspace setup",Ve="VIBE64_WORKSPACE_SETUP_INVALID",Hn="- Prepare `label` [from \
694
- `path`...] with `runtime` [in `workdir`] [when|if `path` exists]: `command` `argument`...",fr=/^- Prepare `([^`\r\n]+)` (.+)$/u,
695
- gr=/^from ((?:`[^`\r\n]+`[ \t]+)+)(with .+)$/u;function dt(e,t,n,s={}){m(Ve,e,t,n,s)}function Me(e,t={}){let{path:n="gen\
696
- esis/stack.md#Workspace setup"}=t;if(Array.isArray(e)||dt(n,"Workspace setup must be supplied as exact Stack section lin\
697
- es."),S(e))return[];let s=[];for(let i=0;i<e.length;i+=1){let r=e[i].trim();if(!r)continue;let o=i+1,c=r.match(fr),a=c?.[2].
698
- match(gr);(!c||c[2].startsWith("from ")&&!a)&&dt(n,`Every Workspace setup entry must use: ${Hn}`,o,{observed:r}),s.push(
699
- {label:y(c[1],Ve,n,"Workspace setup step label",o),...a?{inputs:ve(a[1].trimEnd(),Ve,n,"Workspace setup inputs",o)}:{},...be(
700
- a?a[2]:c[2],Ve,n,"Workspace setup",o,{form:Hn,observed:r})})}return s.length===0&&dt(n,"## Workspace setup needs at leas\
701
- t one Prepare entry or exactly `- Nothing.`."),s}async function Er(e,t){try{return await mr(zn.join(e,t)),!0}catch(n){if([
702
- "ENOENT","ENOTDIR"].includes(n?.code))return!1;throw n}}async function Fn({projectRoot:e,section:t={}}={}){let n=[...t.diagnostics||
703
- []],s=[];t.status==="ready"&&(s=Me(t.lines));let i=[],r=[],o=zn.resolve(e);if(n.length===0)for(let l of s){if(!l.condition||
704
- await Er(o,l.condition.pathExists)){i.push(l);continue}l.condition.onMissing==="wait"&&r.push(l.condition.pathExists)}if(r.
705
- length>0){let l=F(r);n.push({code:"VIBE64_WORKSPACE_SETUP_WAITING",message:`Workspace setup is waiting for project ${l.length===
706
- 1?"path":"paths"}: ${l.join(", ")}.`,details:{paths:l}})}let c=n.some(({code:l})=>l==="VIBE64_WORKSPACE_SETUP_WAITING"),
707
- a=n.some(({code:l})=>l!=="VIBE64_WORKSPACE_SETUP_WAITING"),u="unconfigured";a?u="blocked":!c&&i.length>0&&(u="ready");let p=i.
708
- map(({condition:l,...g})=>g),d={version:1,steps:p};return{contract:hr,status:u,stackHash:t.stackHash,recipeHash:u==="rea\
709
- dy"?N(d):"",components:[...t.components||[]],source:t.source||null,runtimeRequirements:F(p.flatMap(l=>l.runtimeRequirements)),
710
- steps:p,diagnostics:n}}var vr="vibe64.resource-estimates.v1",je="Resource estimates",Kn="VIBE64_RESOURCE_ESTIMATES_INVALID",br=1024*1024,qn=1024*
711
- 1024,Yn=new Map([["Startup typical MiB","startupTypical"],["Startup high MiB","startupHigh"],["Running typical MiB","run\
712
- ningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);function G(e,t,n){m(Kn,
713
- e,t,n)}function mt(e,t,n,s,i){let r=e.get(t),o=e.get(n);return(r===void 0||o===void 0||r>o)&&G(s,"Each resource phase re\
714
- quires typical and high estimates, with typical no greater than high.",i),{typicalBytes:r,highBytes:o}}function Xn(e,t={}){
691
+ o||m(se,ie,`Use: ${zr}`,r),t.some(({id:a})=>a===o[1])&&m(se,ie,"Duplicate project service id.",r);let c=o[3].match(/^(.*?) in `([^`\r\n]+)`$/u);
692
+ t.push({id:o[1],...o[2]?{scope:"session"}:{},runtimeRequirements:C(c?c[1]:o[3],se,ie,"Service runtimes",r),workdir:S(c?.[2]||
693
+ ".",se,ie,"Service workdir",r),argv:N(o[4],se,ie,"Service command",r)})}return t.length||m(se,ie,"Declare a service or e\
694
+ xactly `- Nothing.`."),t}function ls(e={}){let t=e.status==="ready"?us(e.lines):[];return{contract:Wr,status:e.status===
695
+ "blocked"?"blocked":t.length?"ready":"unconfigured",services:t,recipeHash:t.length?k(t):"",diagnostics:e.diagnostics||[]}}var ms="vibe64.staging-data.v1",It="Staging data",ge="VIBE64_STAGING_DATA_INVALID",hs="genesis/stack.md#Staging data",de=Object.
696
+ freeze({"own copy, empty":"empty","own copy, full":"full","own copy, sampled":"sampled","shared with production":"shared",
697
+ "shared with production, structure frozen":"frozen"}),Hr=Object.freeze(Object.fromEntries(Object.entries(de).map(([e,t])=>[
698
+ t,e]))),Fr=Object.freeze({empty:Object.freeze({source:!1,unlisted:!1,sampling:!1,contacts:!1}),full:Object.freeze({source:!0,
699
+ unlisted:!1,sampling:!1,contacts:!0}),sampled:Object.freeze({source:!0,unlisted:!0,sampling:!0,contacts:!0}),shared:Object.
700
+ freeze({source:!1,unlisted:!1,sampling:!1,contacts:!1}),frozen:Object.freeze({source:!1,unlisted:!1,sampling:!1,contacts:!1})}),
701
+ qr=Object.freeze({empty:"Staging's own database starts empty",full:"a whole copy keeps every row",shared:"Staging uses p\
702
+ roduction's database itself",frozen:"Staging uses production's database itself"}),ps=Object.freeze(["mysql","postgresql"]),
703
+ We="{dump}",ds=/\{[A-Za-z][A-Za-z0-9_:-]*\}/u,fs=/^[A-Za-z_][A-Za-z0-9_]{0,63}$/u,vt=Object.freeze({unlistedRows:Object.
704
+ freeze([1,1e7]),days:Object.freeze([1,36500]),rows:Object.freeze([1,1e8])}),Kr=/^dump written by command with (.+?) in `([^`\r\n]+)`: (.+)$/u,
705
+ Yr=/^all up to `([^`\r\n]*)` rows$/u,Tt=/^- `([^`\r\n]*)`: (.+)$/u,Xr=/^recent by `([^`\r\n]*)`(?:, last `([^`\r\n]*)` days)?(?:, newest `([^`\r\n]*)` rows)?$/u,
706
+ gs=/^- `([^`\r\n]*)` to `([^`\r\n]*)`$/u,Es=/^- `([^`\r\n]*)` keeps every `([^`\r\n]*)` row by `([^`\r\n]*)`$/u,Zr=Object.
707
+ freeze(["email","phone"]),kt="- Nothing.",bs=Object.freeze(Object.keys(de).map(e=>`- Mode: ${e}`)),ze="- Source: dump wr\
708
+ itten by command with `runtime` in `workdir`: `command` `argument`... `{dump}`",Ot="- Unlisted tables: all up to `n` row\
709
+ s",q=Object.freeze({section:Object.freeze(["- Database: `resource`",...bs,ze,Ot]),tables:Object.freeze(["- `table`: all",
710
+ "- `table`: none","- `table`: recent by `column`, last `n` days","- `table`: recent by `column`, newest `n` rows","- `ta\
711
+ ble`: recent by `column`, last `n` days, newest `n` rows"]),links:Object.freeze(["- `table.column` to `table.column`"]),
712
+ keepTogether:Object.freeze(["- `parent` keeps every `child` row by `column`"]),contacts:Object.freeze(["- `table.column`\
713
+ : email","- `table.column`: phone",kt])}),At=new Map([["### Tables","tables"],["### Links","links"],["### Keep together",
714
+ "keepTogether"],["### Contacts","contacts"]]),Jr=Object.freeze([...At.keys()]),St=Object.freeze(Object.fromEntries([...At].
715
+ map(([e,t])=>[t,e]))),Qr=Object.freeze({tables:"table rule",links:"link",keepTogether:"Keep together entry",contacts:"co\
716
+ ntact"});function eo(e,t,n){let[s]=y(t,ge,e.location,"Staging data Database",n,{count:1});Ie.test(s)||e.fail(`Database n\
717
+ ames a database resource of genesis/stack.md's ## Resources by its id, such as \`database\`; ${JSON.stringify(s)} isn't \
718
+ one.`,n),e.model.database=s}function to(e,t,n){Object.hasOwn(de,t)||e.fail(v("Staging data Mode",t,Object.keys(de)),n),e.
719
+ model.mode=de[t]}function no(e,t,n){let s=t.find(o=>o!==We&&o.includes(We));s&&e.fail(`Source passes \`{dump}\` inside \`${s}\
720
+ \`: give it as an argument of its own, such as \`--output\` \`{dump}\`.`,n);let i=t.find(o=>o!==We&&ds.test(o));i&&e.fail(
721
+ `Source has the placeholder \`${i.match(ds)[0]}\`; \`{dump}\` is its only one.`,n);let r=t.filter(o=>o===We).length;r!==
722
+ 1&&e.fail(r?`Source passes \`{dump}\` ${r} times; its command writes one dump, so pass it once.`:`Source's command must \
723
+ pass \`{dump}\`, the file it writes production's dump to, as an argument of its own. Use: ${ze}`,n)}function so(e,t,n){let s=t.
724
+ match(Kr);s||e.fail(`Staging data Source must use: ${ze}`,n);let i=N(s[3],ge,e.location,"Staging data Source command",n);
725
+ no(e,i,n),e.model.dumpSource={argv:i,workdir:S(s[2],ge,e.location,"Staging data Source workdir",n),runtimeRequirements:C(
726
+ s[1],ge,e.location,"Staging data Source runtimes",n)}}function wt(e,t,[n,s],i,r){let o=/^[1-9][0-9]*$/u.test(t)?Number(t):
727
+ Number.NaN;return o>=n&&o<=s||e.fail(`${i} must be a whole number from ${n} to ${s}; \`${t}\` isn't one.`,r),o}function io(e,t,n){
728
+ let s=t.match(Yr);s||e.fail(`Staging data Unlisted tables must use: ${Ot}`,n),e.model.unlistedTables={maxRows:wt(e,s[1],
729
+ vt.unlistedRows,"Unlisted tables' rows",n)}}var ro=Object.freeze([{prefix:"- Database: ",key:"database",label:"Database",
730
+ read:eo},{prefix:"- Mode: ",key:"mode",label:"Mode",read:to},{prefix:"- Source: ",key:"source",label:"Source",read:so},{
731
+ prefix:"- Unlisted tables: ",key:"unlisted",label:"Unlisted tables",read:io}]);function oo(e){if(e===kt)return"";if(Es.test(
732
+ e))return"keepTogether";if(gs.test(e))return"links";let t=e.match(Tt);return t?t[1].includes(".")?"contacts":"tables":""}
733
+ function ao(e,t,n){let s=ro.find(({prefix:i})=>t.startsWith(i));if(!s){let i=oo(t);e.fail(i?`\`${t}\` is a ${Qr[i]}: put\
734
+ it under \`${St[i]}\`, after the section's own entries.`:v("Staging data entry",t,q.section),n)}e.at[s.key]&&e.fail(`St\
735
+ aging data has a second ${s.label} entry; the first is on line ${e.at[s.key]}.`,n),e.at[s.key]=n,s.read(e,t.slice(s.prefix.
736
+ length),n)}function Ee(e,t,n,s){return fs.test(t)||e.fail(`\`${t}\` isn't a ${n} name: use up to 64 letters, digits and \
737
+ _, starting with a letter or _.`,s),t}function _t(e,t,n){let s=t.split(".");return(s.length!==2||!s.every(i=>fs.test(i)))&&
738
+ e.fail(`\`${t}\` isn't a column: name it \`table.column\`, each up to 64 letters, digits and _, starting with a letter or _\
739
+ .`,n),{table:s[0],column:s[1]}}function He(e,t,n,s,i){e.named[t].has(n)&&e.fail(s,i),e.named[t].add(n)}function co(e,t,n){
740
+ if(t==="all"||t==="none")return{rule:t};let s=t.match(Xr);return s||e.fail(`Unknown table rule: ${t}. Use one of: ${q.tables.
741
+ join("; ")}.`,n),s[2]===void 0&&s[3]===void 0&&e.fail("A recent rule keeps its table's rows of the last `n` days, its ne\
742
+ west `n` rows, or both: add `, last `n` days`, `, newest `n` rows` or both, in that order.",n),{rule:"recent",by:Ee(e,s[1],
743
+ "column",n),days:s[2]===void 0?null:wt(e,s[2],vt.days,"A recent rule's days",n),rows:s[3]===void 0?null:wt(e,s[3],vt.rows,
744
+ "A recent rule's rows",n)}}function uo(e,t,n){let s=t.match(Tt);s||e.fail(v("Staging data table rule",t,q.tables),n);let i=Ee(
745
+ e,s[1],"table",n);He(e,"tables",i,`### Tables names \`${i}\` twice; give each table one rule.`,n),e.model.tables.push({table:i,
746
+ ...co(e,s[2],n)})}function lo(e,t,n){let s=t.match(gs);s||e.fail(v("Staging data link",t,q.links),n);let i=_t(e,s[1],n),
747
+ r=_t(e,s[2],n);s[1]===s[2]&&e.fail(`\`${s[1]}\` links to itself; a link names the column another column refers to.`,n),He(
748
+ e,"links",s[1],`### Links links \`${s[1]}\` twice; a column refers to one column.`,n),e.model.links.push({from:i,to:r})}
749
+ function po(e,t,n){let s=t.match(Es);s||e.fail(v("Staging data Keep together entry",t,q.keepTogether),n);let i=Ee(e,s[1],
750
+ "table",n),r=Ee(e,s[2],"table",n),o=Ee(e,s[3],"column",n);i===r&&e.fail(`\`${i}\` keeps its own rows; Keep together names\
751
+ a parent table and another table whose rows refer to it.`,n),He(e,"keepTogether",`${r}.${o}`,`### Keep together keeps \`${r}\
752
+ \` rows by \`${o}\` twice; name each once.`,n),e.model.keepTogether.push({parent:i,child:r,column:o})}function mo(e,t,n){
753
+ if(t===kt){e.entries.contacts>0&&e.fail("`- Nothing.` under ### Contacts says no column holds one, so it is the heading'\
754
+ s only entry.",n),e.contactsNothing=n;return}e.contactsNothing&&e.fail(`### Contacts says \`- Nothing.\` on line ${e.contactsNothing}\
755
+ : remove it, or this contact.`,n);let s=t.match(Tt);s||e.fail(v("Staging data contact",t,q.contacts),n);let{table:i,column:r}=_t(
756
+ e,s[1],n);Zr.includes(s[2])||e.fail(`Contact \`${s[1]}\` is an \`email\` or a \`phone\` column, written without backticks: ${q.
757
+ contacts.slice(0,2).join(" or ")}.`,n),He(e,"contacts",s[1],`### Contacts names \`${s[1]}\` twice; name each column once.`,
758
+ n),e.model.contacts.push({table:i,column:r,kind:s[2]})}var ho=Object.freeze({tables:uo,links:lo,keepTogether:po,contacts:mo});
759
+ function fo(e,t,n){let s=At.get(t);return s||e.fail(v("Staging data heading",t,Jr),n),e.at[s]&&e.fail(`Staging data has \
760
+ a second \`${t}\` heading; the first is on line ${e.at[s]}.`,n),e.at[s]=n,s}function go(e,t,n,s){let{at:i,fail:r}=e;n.source&&
761
+ !i.source&&r(`Mode ${t} builds Staging's own database from a dump of production's: add ${ze}`,i.mode),!n.source&&i.source&&
762
+ r(`Mode ${t} has no Source: ${s}.`,i.source),n.unlisted&&!i.unlisted&&r(`Mode ${t} says how many rows a table it doesn't\
763
+ list may have: add ${Ot}`,i.mode),!n.unlisted&&i.unlisted&&r(`Mode ${t} has no Unlisted tables: ${s}; only a sampled co\
764
+ py lists its tables.`,i.unlisted)}function Eo(e,t,n,s){let{at:i,entries:r,fail:o}=e;for(let c of["tables","links","keepT\
765
+ ogether"])!n.sampling&&i[c]&&o(`Mode ${t} has no \`${St[c]}\`: ${s}; only own copy, sampled samples its tables.`,i[c]),i[c]&&
766
+ r[c]===0&&o(`\`${St[c]}\` has no entries: add one (${q[c][0]}) or remove the heading.`,i[c]);n.sampling&&!i.tables&&o(`M\
767
+ ode ${t} samples production's tables: add \`### Tables\` with a rule for at least one table.`,i.mode),n.contacts&&!i.contacts&&
768
+ o(`Mode ${t} copies production's data, which holds people's email addresses and phone numbers: add \`### Contacts\` naming\
769
+ each column that holds one, or \`- Nothing.\` under it when none does.`,i.mode),!n.contacts&&i.contacts&&o(`Mode ${t} h\
770
+ as no \`### Contacts\`: ${s}, so there is nothing to replace.`,i.contacts),i.contacts&&r.contacts===0&&!e.contactsNothing&&
771
+ o("`### Contacts` has no entries: name each column that holds an email address or phone number, or write `- Nothing.` wh\
772
+ en none does.",i.contacts)}function bo(e,t){e.at.database||e.fail("Staging data needs `- Database: `resource``, naming t\
773
+ he database resource of genesis/stack.md's ## Resources whose Staging data it declares.",t),e.at.mode||e.fail(`Staging d\
774
+ ata needs a Mode. Use one of: ${bs.join("; ")}.`,t);let n=Hr[e.model.mode],s=Fr[e.model.mode],i=qr[e.model.mode]||"";go(
775
+ e,n,s,i),Eo(e,n,s,i)}function ys(e,t){let n=(o,c)=>m(ge,t,o,c||void 0);Array.isArray(e)||n("Staging data requires exact \
776
+ Stack section lines.");let s=e.findIndex(o=>typeof o=="string"&&o.trim())+1;_(e)&&n("`- Nothing.` declares no Staging da\
777
+ ta: declare a mode (`- Database: `database`` and `- Mode: own copy, empty` at least), or remove the section, which gives\
778
+ Staging its own empty database.",s);let i={location:t,fail:n,model:{database:"",mode:"",dumpSource:null,unlistedTables:null,
779
+ tables:[],links:[],keepTogether:[],contacts:[]},at:{},entries:{tables:0,links:0,keepTogether:0,contacts:0},named:{tables:new Set,
780
+ links:new Set,keepTogether:new Set,contacts:new Set},contactsNothing:0},r="";for(let[o,c]of e.entries()){let a=String(c).
781
+ trim();if(!a)continue;let u=o+1;a.startsWith("#")?r=fo(i,a,u):r?(ho[r](i,a,u),i.entries[r]+=1):ao(i,a,u)}return bo(i,s),
782
+ i}function yo(e,t={}){let{path:n=hs}=t;return ys(e,n).model}function vo(e,t){let n=Te(t),{database:s}=e.model,i=[...n.values()].
783
+ filter(c=>ps.includes(c.kind)).map(({id:c})=>`\`${c}\``),r=i.length?`name one of its databases: ${i.join(", ")}`:"it dec\
784
+ lares no `mysql` or `postgresql` database; add one to the Stack, or remove the section",o=n.get(s);return o||e.fail(`Dat\
785
+ abase \`${s}\`: genesis/stack.md's ## Resources declares no resource \`${s}\`; ${r}.`,e.at.database),ps.includes(o.kind)||
786
+ e.fail(`Database \`${s}\` is a ${o.kind} resource, and Staging data is for a \`mysql\` or \`postgresql\` database; ${r}.`,
787
+ e.at.database),o.kind}function Rt({environment:e={},section:t={}}={}){j(t,e,"Staging data section");let n=[...t.diagnostics||
788
+ []],s=t.status==="ready"&&n.length===0?ys(t.lines,hs):null,i=s?.model,r={database:i?.database||"",engine:s?vo(s,e.resources):
789
+ "",mode:i?.mode||"empty",dumpSource:i?.dumpSource||null,unlistedTables:i?.unlistedTables||null,tables:i?.tables||[],links:i?.
790
+ links||[],keepTogether:i?.keepTogether||[],contacts:i?.contacts||[]};return{contract:ms,status:n.length>0?"blocked":s?"r\
791
+ eady":"unconfigured",stackHash:t.stackHash,recipeHash:s?k({version:1,...r}):"",source:t.source||null,components:[...t.components||
792
+ []],diagnostics:n,...r}}import{access as So}from"node:fs/promises";import Ss from"node:path";var wo="vibe64.workspace-setup.v1",be="Workspace setup",Fe="VIBE64_WORKSPACE_SETUP_INVALID",vs="- Prepare `label` [from \
793
+ `path`...] with `runtime` [in `workdir`] [when|if `path` exists]: `command` `argument`...",_o=/^- Prepare `([^`\r\n]+)` (.+)$/u,
794
+ Io=/^from ((?:`[^`\r\n]+`[ \t]+)+)(with .+)$/u;function Nt(e,t,n,s={}){m(Fe,e,t,n,s)}function qe(e,t={}){let{path:n="gen\
795
+ esis/stack.md#Workspace setup"}=t;if(Array.isArray(e)||Nt(n,"Workspace setup must be supplied as exact Stack section lin\
796
+ es."),_(e))return[];let s=[];for(let i=0;i<e.length;i+=1){let r=e[i].trim();if(!r)continue;let o=i+1,c=r.match(_o),a=c?.[2].
797
+ match(Io);(!c||c[2].startsWith("from ")&&!a)&&Nt(n,`Every Workspace setup entry must use: ${vs}`,o,{observed:r}),s.push(
798
+ {label:w(c[1],Fe,n,"Workspace setup step label",o),...a?{inputs:we(a[1].trimEnd(),Fe,n,"Workspace setup inputs",o)}:{},..._e(
799
+ a?a[2]:c[2],Fe,n,"Workspace setup",o,{form:vs,observed:r})})}return s.length===0&&Nt(n,"## Workspace setup needs at leas\
800
+ t one Prepare entry or exactly `- Nothing.`."),s}async function To(e,t){try{return await So(Ss.join(e,t)),!0}catch(n){if([
801
+ "ENOENT","ENOTDIR"].includes(n?.code))return!1;throw n}}async function ws({projectRoot:e,section:t={}}={}){let n=[...t.diagnostics||
802
+ []],s=[];t.status==="ready"&&(s=qe(t.lines));let i=[],r=[],o=Ss.resolve(e);if(n.length===0)for(let p of s){if(!p.condition||
803
+ await To(o,p.condition.pathExists)){i.push(p);continue}p.condition.onMissing==="wait"&&r.push(p.condition.pathExists)}if(r.
804
+ length>0){let p=H(r);n.push({code:"VIBE64_WORKSPACE_SETUP_WAITING",message:`Workspace setup is waiting for project ${p.length===
805
+ 1?"path":"paths"}: ${p.join(", ")}.`,details:{paths:p}})}let c=n.some(({code:p})=>p==="VIBE64_WORKSPACE_SETUP_WAITING"),
806
+ a=n.some(({code:p})=>p!=="VIBE64_WORKSPACE_SETUP_WAITING"),u="unconfigured";a?u="blocked":!c&&i.length>0&&(u="ready");let l=i.
807
+ map(({condition:p,...g})=>g),d={version:1,steps:l};return{contract:wo,status:u,stackHash:t.stackHash,recipeHash:u==="rea\
808
+ dy"?k(d):"",components:[...t.components||[]],source:t.source||null,runtimeRequirements:H(l.flatMap(p=>p.runtimeRequirements)),
809
+ steps:l,diagnostics:n}}var ko="vibe64.resource-estimates.v1",Ke="Resource estimates",Ts="VIBE64_RESOURCE_ESTIMATES_INVALID",Oo=1024*1024,_s=1024*
810
+ 1024,Is=new Map([["Startup typical MiB","startupTypical"],["Startup high MiB","startupHigh"],["Running typical MiB","run\
811
+ ningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);function U(e,t,n){m(Ts,
812
+ e,t,n)}function Ct(e,t,n,s,i){let r=e.get(t),o=e.get(n);return(r===void 0||o===void 0||r>o)&&U(s,"Each resource phase re\
813
+ quires typical and high estimates, with typical no greater than high.",i),{typicalBytes:r,highBytes:o}}function ks(e,t={}){
715
814
  let{path:n="genesis/stack.md#Resource estimates",targets:s=[],hasWorkspaceSetup:i=!1}=t;(!Array.isArray(e)||e.length>2048||
716
- e.some(p=>typeof p!="string")||Buffer.byteLength(e.join(`
717
- `),"utf8")>64*1024)&&G(n,"Resource estimates must be exact Stack section lines within 64 KiB and 2048 lines.");let r={version:1,
718
- outputs:[],workspaceSetup:null};if(S(e))return r;let o=new Map(s.map(p=>[p.id,p])),c=new Set,a=null;function u(){if(!a)return;
719
- let{targetId:p,mode:d,fields:l,line:g}=a;if(d==="interactive"){(l.has("typical")||l.has("high"))&&G(n,"Interactive outpu\
720
- ts require separate Startup and Running estimates.",g),r.outputs.push({targetId:p,mode:d,startup:mt(l,"startupTypical","\
721
- startupHigh",n,g),running:mt(l,"runningTypical","runningHigh",n,g)});return}(l.size!==2||!l.has("typical")||!l.has("high"))&&
722
- G(n,"Finite outputs and Workspace setup require only Typical MiB and High MiB.",g);let E=mt(l,"typical","high",n,g);p?r.
723
- outputs.push({targetId:p,mode:d,execution:E}):r.workspaceSetup=E}for(let p=0;p<e.length;p+=1){let d=e[p].trim(),l=p+1;if(!d)
815
+ e.some(l=>typeof l!="string")||Buffer.byteLength(e.join(`
816
+ `),"utf8")>64*1024)&&U(n,"Resource estimates must be exact Stack section lines within 64 KiB and 2048 lines.");let r={version:1,
817
+ outputs:[],workspaceSetup:null};if(_(e))return r;let o=new Map(s.map(l=>[l.id,l])),c=new Set,a=null;function u(){if(!a)return;
818
+ let{targetId:l,mode:d,fields:p,line:g}=a;if(d==="interactive"){(p.has("typical")||p.has("high"))&&U(n,"Interactive outpu\
819
+ ts require separate Startup and Running estimates.",g),r.outputs.push({targetId:l,mode:d,startup:Ct(p,"startupTypical","\
820
+ startupHigh",n,g),running:Ct(p,"runningTypical","runningHigh",n,g)});return}(p.size!==2||!p.has("typical")||!p.has("high"))&&
821
+ U(n,"Finite outputs and Workspace setup require only Typical MiB and High MiB.",g);let E=Ct(p,"typical","high",n,g);l?r.
822
+ outputs.push({targetId:l,mode:d,execution:E}):r.workspaceSetup=E}for(let l=0;l<e.length;l+=1){let d=e[l].trim(),p=l+1;if(!d)
724
823
  continue;let g=d.match(/^### Output `([a-z0-9]+(?:-[a-z0-9]+)*)`$/u);if(g||d==="### Workspace setup"){u();let $=g?.[1]||
725
- "",X=$?`output:${$}`:"workspace-setup";c.has(X)&&G(n,"Resource estimates contains a duplicate operation.",l),c.add(X);let oe=o.
726
- get($);$&&!["interactive","finite"].includes(oe?.mode)&&G(n,`Resource estimate references an undeclared output: ${$}.`,l),
727
- !$&&!i&&G(n,"Resource estimate references undeclared Workspace setup steps.",l),a={targetId:$,mode:oe?.mode||"setup",fields:new Map,
728
- line:l};continue}let E=d.match(/^- ([A-Za-z ]+): `([1-9][0-9]*)`$/u),_=E&&Yn.get(E[1]);(!a||!_)&&G(n,`Expected an Output\
729
- or Workspace setup heading followed by positive integer MiB estimates: ${[...Yn.keys()].map($=>`- ${$}: \`number\``).join(
730
- "; ")}.`,l),a.fields.has(_)&&G(n,`Duplicate resource field: ${E[1]}.`,l);let R=Number(E[2]);(!Number.isSafeInteger(R)||R>
731
- qn)&&G(n,`Resource estimates must be between 1 and ${qn} MiB.`,l),a.fields.set(_,R*br)}return u(),c.size===0&&G(n,"Resou\
732
- rce estimates needs an operation or exactly `- Nothing.`."),r}function Ge({section:e={},outputsSection:t={},workspaceSetupSection:n={}}={}){
733
- z(e,t,"Resource estimates and Outputs"),z(e,n,"Resource estimates and Workspace setup");let s=[...e.diagnostics||[]],i={
734
- version:1,outputs:[],workspaceSetup:null};if(e.status==="ready"&&s.length===0)try{i=Xn(e.lines,{targets:t.status==="read\
735
- y"?Le(t.lines).targets:[],hasWorkspaceSetup:n.status==="ready"&&Me(n.lines).length>0})}catch(o){if(o?.name!=="Vibe64Stac\
736
- kOperationError")throw o;s.push({code:Kn,message:o.message,details:{...o.details,causeCode:o.code}})}let r=s.length>0?"i\
737
- nvalid":i.outputs.length>0||i.workspaceSetup?"ready":"unconfigured";return{contract:vr,status:r,stackHash:e.stackHash,sectionHash:e.
738
- sectionHash||"",estimatesHash:r==="ready"?N(i):"",source:e.source||null,outputs:i.outputs,workspaceSetup:i.workspaceSetup,
739
- fallbackReason:r==="invalid"?"invalid-estimates":r==="unconfigured"?"not-declared":null,diagnostics:s}}var yr="vibe64.integration-setup.v1",Jn="Integration setup",fe="VIBE64_INTEGRATION_SETUP_INVALID",wr="- Command with `ru\
740
- ntime` in `workdir`: `command` `argument`...";function Zn(e,t={}){let{path:n="genesis/stack.md#Integration setup"}=t;if(Array.
741
- isArray(e)||m(fe,n,"Integration setup requires exact Stack section lines."),S(e))return null;let s=e.map(r=>r.trim()).filter(
742
- Boolean),i=s.length===1&&s[0].match(/^- Command with (.+?) in `([^`\r\n]+)`: (.+)$/u);return i||m(fe,n,`Integration setu\
743
- p requires exactly one entry: ${wr}; or - Nothing.`),{argv:D(i[3],fe,n,"Integration setup command"),workdir:w(i[2],fe,n,
744
- "Integration setup workdir"),runtimeRequirements:P(i[1],fe,n,"Integration setup runtimes")}}function Qn({section:e={}}={}){
745
- let t=[...e.diagnostics||[]],n=e.status==="ready"&&t.length===0?Zn(e.lines):null;return{contract:yr,status:t.length?"blo\
746
- cked":n?"ready":"unconfigured",stackHash:e.stackHash,recipeHash:n?N({version:1,command:n}):"",source:e.source||null,components:[
747
- ...e.components||[]],command:n,diagnostics:t}}var Sr=new URL("./index.js",import.meta.url).href,ns=Ir(Sr),Ue=new Map;async function Tr(e){if(!W.isAbsolute(e||""))throw new TypeError(
748
- "Genesis host context requires an absolute runtime root.");let t=W.join(e,"genesis-context");if(!Ue.has(t)){let n=Ht(t).
749
- catch(s=>{throw Ue.delete(t),s});Ue.set(t,n)}return Ue.get(t)}var{GENESIS_CONTRACTS:C,HOST_CONTEXT_RESOLVER_DATA_ENV:Or,
750
- HOST_CONTEXT_RESOLVER_ENV:Rr,PROMPT_TASKS:ss,addStack:kr,applyTemplate:Ar,generatePrompt:Nr,indexCodebase:Cr,initialize:Dr,
751
- inspectCollaboration:Pr,inspectDerivedArtifacts:$r,inspectEngineering:xr,inspectEnvironment:We,inspectPasses:Lr,inspectProject:Vr,
752
- inspectProjectFormat:Mr,inspectAgentIntegrations:jr,inspectSkills:Gr,inspectStackSection:Ur,inspectStackSections:Wr,inspectSubsystems:Br,
753
- listStackPieces:Hr,listTemplates:zr,parserEnvironment:Ma,setCollaboration:Fr,setEngineeringProfile:qr,syncAgentIntegrations:Yr,
754
- syncSkills:Kr,withTrustedGitRepository:Xr,SOURCE_EXPLANATION_PROMPT_VERSION:ja,sourceExplanationGuidance:Ga,validateArchitectureFacts:Ua,
755
- mergeArchitectureObservations:Wa,validateCityDocument:Ba,validateCallWeb:Ha,CALL_WEB_SCHEMA:za,MACHINE_CITY_SCHEMA:Fa,PROGRAM_CITY_SCHEMA:qa,
756
- CITY_SCHEMA_VERSION:Ya}=ge;async function Ka(e){let t=await Tr(e);return{[Rr]:so(),[Or]:JSON.stringify({registryPath:t.registryPath}),
757
- GENESIS_TURN_CONTEXT_ENABLED:"0"}}var Xa="genesis/blueprint.md",Ja="genesis/subsystems.md",Jr=Object.freeze(["vue","djan\
758
- go-postgresql","jskit-postgresql","postgresql","rails-postgresql","spring-boot-postgresql"]),Zr=Object.freeze(["genesis-\
759
- stack"]),ts=Object.freeze({BLUEPRINT_INVALID:"blueprint",BLUEPRINT_REQUIRED:"start"});if(!Array.isArray(ss))throw new Error(
760
- "This genesis-compiler lists no prompt tasks. Update it to the release Vibe64 declares.");var is=new Set(ss),ht=15e3;function ft(e,t=ht){
824
+ "",X=$?`output:${$}`:"workspace-setup";c.has(X)&&U(n,"Resource estimates contains a duplicate operation.",p),c.add(X);let ae=o.
825
+ get($);$&&!["interactive","finite"].includes(ae?.mode)&&U(n,`Resource estimate references an undeclared output: ${$}.`,p),
826
+ !$&&!i&&U(n,"Resource estimate references undeclared Workspace setup steps.",p),a={targetId:$,mode:ae?.mode||"setup",fields:new Map,
827
+ line:p};continue}let E=d.match(/^- ([A-Za-z ]+): `([1-9][0-9]*)`$/u),I=E&&Is.get(E[1]);(!a||!I)&&U(n,`Expected an Output\
828
+ or Workspace setup heading followed by positive integer MiB estimates: ${[...Is.keys()].map($=>`- ${$}: \`number\``).join(
829
+ "; ")}.`,p),a.fields.has(I)&&U(n,`Duplicate resource field: ${E[1]}.`,p);let R=Number(E[2]);(!Number.isSafeInteger(R)||R>
830
+ _s)&&U(n,`Resource estimates must be between 1 and ${_s} MiB.`,p),a.fields.set(I,R*Oo)}return u(),c.size===0&&U(n,"Resou\
831
+ rce estimates needs an operation or exactly `- Nothing.`."),r}function Ye({section:e={},outputsSection:t={},workspaceSetupSection:n={}}={}){
832
+ j(e,t,"Resource estimates and Outputs"),j(e,n,"Resource estimates and Workspace setup");let s=[...e.diagnostics||[]],i={
833
+ version:1,outputs:[],workspaceSetup:null};if(e.status==="ready"&&s.length===0)try{i=ks(e.lines,{targets:t.status==="read\
834
+ y"?Be(t.lines).targets:[],hasWorkspaceSetup:n.status==="ready"&&qe(n.lines).length>0})}catch(o){if(o?.name!=="Vibe64Stac\
835
+ kOperationError")throw o;s.push({code:Ts,message:o.message,details:{...o.details,causeCode:o.code}})}let r=s.length>0?"i\
836
+ nvalid":i.outputs.length>0||i.workspaceSetup?"ready":"unconfigured";return{contract:ko,status:r,stackHash:e.stackHash,sectionHash:e.
837
+ sectionHash||"",estimatesHash:r==="ready"?k(i):"",source:e.source||null,outputs:i.outputs,workspaceSetup:i.workspaceSetup,
838
+ fallbackReason:r==="invalid"?"invalid-estimates":r==="unconfigured"?"not-declared":null,diagnostics:s}}var Ao="vibe64.integration-setup.v1",Os="Integration setup",ye="VIBE64_INTEGRATION_SETUP_INVALID",Ro="- Command with `ru\
839
+ ntime` in `workdir`: `command` `argument`...";function As(e,t={}){let{path:n="genesis/stack.md#Integration setup"}=t;if(Array.
840
+ isArray(e)||m(ye,n,"Integration setup requires exact Stack section lines."),_(e))return null;let s=e.map(r=>r.trim()).filter(
841
+ Boolean),i=s.length===1&&s[0].match(/^- Command with (.+?) in `([^`\r\n]+)`: (.+)$/u);return i||m(ye,n,`Integration setu\
842
+ p requires exactly one entry: ${Ro}; or - Nothing.`),{argv:N(i[3],ye,n,"Integration setup command"),workdir:S(i[2],ye,n,
843
+ "Integration setup workdir"),runtimeRequirements:C(i[1],ye,n,"Integration setup runtimes")}}function Rs({section:e={}}={}){
844
+ let t=[...e.diagnostics||[]],n=e.status==="ready"&&t.length===0?As(e.lines):null;return{contract:Ao,status:t.length?"blo\
845
+ cked":n?"ready":"unconfigured",stackHash:e.stackHash,recipeHash:n?k({version:1,command:n}):"",source:e.source||null,components:[
846
+ ...e.components||[]],command:n,diagnostics:t}}var No=new URL("./index.js",import.meta.url).href,Ds=Do(No),Xe=new Map;async function Po(e){if(!W.isAbsolute(e||""))throw new TypeError(
847
+ "Genesis host context requires an absolute runtime root.");let t=W.join(e,"genesis-context");if(!Xe.has(t)){let n=pn(t).
848
+ catch(s=>{throw Xe.delete(t),s});Xe.set(t,n)}return Xe.get(t)}var{GENESIS_CONTRACTS:P,HOST_CONTEXT_RESOLVER_DATA_ENV:$o,
849
+ HOST_CONTEXT_RESOLVER_ENV:Lo,PROMPT_TASKS:Ps,addStack:xo,applyTemplate:Vo,generatePrompt:Mo,indexCodebase:jo,initialize:Go,
850
+ inspectCollaboration:Uo,inspectDerivedArtifacts:Bo,inspectEngineering:Wo,inspectEnvironment:Dt,inspectPasses:zo,inspectProject:Ho,
851
+ inspectProjectFormat:Fo,inspectAgentIntegrations:qo,inspectSkills:Ko,inspectStackSection:Yo,inspectStackSections:Xo,inspectSubsystems:Zo,
852
+ listStackPieces:Jo,listTemplates:Qo,parserEnvironment:Xc,setCollaboration:ea,setEngineeringProfile:ta,syncAgentIntegrations:na,
853
+ syncSkills:sa,withTrustedGitRepository:ia,SOURCE_EXPLANATION_PROMPT_VERSION:Zc,sourceExplanationGuidance:Jc,validateArchitectureFacts:Qc,
854
+ mergeArchitectureObservations:eu,validateCityDocument:tu,validateCallWeb:nu,CALL_WEB_SCHEMA:su,MACHINE_CITY_SCHEMA:iu,PROGRAM_CITY_SCHEMA:ru,
855
+ CITY_SCHEMA_VERSION:ou}=ve;async function au(e){let t=await Po(e);return{[Lo]:pa(),[$o]:JSON.stringify({registryPath:t.registryPath}),
856
+ GENESIS_TURN_CONTEXT_ENABLED:"0"}}var cu="genesis/blueprint.md",uu="genesis/subsystems.md",ra=Object.freeze(["vue","djan\
857
+ go-postgresql","jskit-postgresql","postgresql","rails-postgresql","spring-boot-postgresql"]),oa=Object.freeze(["genesis-\
858
+ stack"]),Cs=Object.freeze({BLUEPRINT_INVALID:"blueprint",BLUEPRINT_REQUIRED:"start"});if(!Array.isArray(Ps))throw new Error(
859
+ "This genesis-compiler lists no prompt tasks. Update it to the release Vibe64 declares.");var $s=new Set(Ps),Pt=15e3;function $t(e,t=Pt){
761
860
  let n,s=new Promise((i,r)=>{n=setTimeout(()=>r(Object.assign(new Error(`Genesis did not answer within ${t} ms.`),{code:"\
762
- vibe64_genesis_timeout"})),t)});return Promise.race([Promise.resolve().then(e),s]).finally(()=>clearTimeout(n))}function Qr(e,t={}){
763
- let{required:n=!1}=t,s=V(e);if(!s&&!n)return"";if(!is.has(s))throw new TypeError(s?`Unknown Genesis prompt task: ${s}.`:
764
- "Genesis prompt actions require an explicit task.");return s}function eo(e={}){return Qr(e.genesisTask)||"work"}function to(e={},t={}){
861
+ vibe64_genesis_timeout"})),t)});return Promise.race([Promise.resolve().then(e),s]).finally(()=>clearTimeout(n))}function aa(e,t={}){
862
+ let{required:n=!1}=t,s=V(e);if(!s&&!n)return"";if(!$s.has(s))throw new TypeError(s?`Unknown Genesis prompt task: ${s}.`:
863
+ "Genesis prompt actions require an explicit task.");return s}function ca(e={}){return aa(e.genesisTask)||"work"}function ua(e={},t={}){
765
864
  return[e.conversationRequest,e.feedback,e.request,e.plan,e.description,t.label].map(V).find(Boolean)||"Continue the requ\
766
- ested project work."}function no(){let e=(ns.resolve.paths("genesis-compiler")||[]).find(t=>es(W.join(t,"genesis-compile\
767
- r"))&&es(W.join(t,".bin","genesis")));if(!e)throw new Error("The installed Genesis compiler executable could not be loca\
768
- ted.");return W.join(e,".bin")}function rs(){let e=ns.resolve("@local/vibe64-genesis/server");return W.resolve(W.dirname(
769
- e),"../../bin")}function so(){return W.resolve(rs(),"vibe64-genesis-host-context")}function Za(e=[]){let t=rs(),n=no();return[
770
- ...(Array.isArray(e)?e:[]).filter(i=>![t,n].includes(V(i))),t]}function io(e={},t={}){let{prompt:n=!1}=t;return{...e,...n?
771
- {hiddenStackPieces:Jr}:{},stackPackages:Zr}}function Qa(e={}){return B(kr,e)}async function ec(e={}){let t=await re(Hr,e);
865
+ ested project work."}function la(){let e=(Ds.resolve.paths("genesis-compiler")||[]).find(t=>Ns(W.join(t,"genesis-compile\
866
+ r"))&&Ns(W.join(t,".bin","genesis")));if(!e)throw new Error("The installed Genesis compiler executable could not be loca\
867
+ ted.");return W.join(e,".bin")}function Ls(){let e=Ds.resolve("@local/vibe64-genesis/server");return W.resolve(W.dirname(
868
+ e),"../../bin")}function pa(){return W.resolve(Ls(),"vibe64-genesis-host-context")}function lu(e=[]){let t=Ls(),n=la();return[
869
+ ...(Array.isArray(e)?e:[]).filter(i=>![t,n].includes(V(i))),t]}function da(e={},t={}){let{prompt:n=!1}=t;return{...e,...n?
870
+ {hiddenStackPieces:ra}:{},stackPackages:oa}}function pu(e={}){return z(xo,e)}async function du(e={}){let t=await re(Jo,e);
772
871
  if(t.every(n=>Array.isArray(n?.resourceDeclarations)))return t;throw new Error("This genesis-compiler lists no Stack res\
773
- ource declarations. Update it to the release Vibe64 declares.")}function tc(e={}){return B(Dr,e)}function nc(e={}){return re(
774
- Gr,e)}function sc(e={}){return B(Kr,e)}function ic(e={}){return B(Yr,e)}function rc(e={}){return re(jr,e)}function oc(e={}){
775
- return re(Br,e)}async function ac(e={}){return $t(await K(At,e))}async function cc(e={}){return Vt(await K(xt,e))}function uc(e={}){
776
- return B(Cr,e)}function ro(){let e=$r();if(e?.contract!==C.derivedArtifacts)throw new Error(`Genesis returned ${e?.contract||
777
- "no contract identity"}; expected ${C.derivedArtifacts}.`);let t=Array.isArray(e.artifacts)?e.artifacts:[];if(!t.length||
872
+ ource declarations. Update it to the release Vibe64 declares.")}function mu(e={}){return z(Go,e)}function hu(e={}){return re(
873
+ Ko,e)}function fu(e={}){return z(sa,e)}function gu(e={}){return z(na,e)}function Eu(e={}){return re(qo,e)}function bu(e={}){
874
+ return re(Zo,e)}async function yu(e={}){return en(await oe(Yt,e))}async function vu(e={}){return sn(await oe(tn,e))}function Su(e={}){
875
+ return z(jo,e)}function ma(){let e=Bo();if(e?.contract!==P.derivedArtifacts)throw new Error(`Genesis returned ${e?.contract||
876
+ "no contract identity"}; expected ${P.derivedArtifacts}.`);let t=Array.isArray(e.artifacts)?e.artifacts:[];if(!t.length||
778
877
  t.some(n=>!V(n?.path)))throw new Error("Genesis returned an invalid derived-artifact contract.");return{...e,artifacts:t.
779
- map(n=>({...n}))}}var os=ro(),pc=Object.freeze(os.artifacts.map(e=>e.path)),gt=new Map(os.artifacts.map(e=>[e.id,e])),oo=gt.
780
- get("machine-city")?.path,ao=gt.get("program-city")?.path;if(!oo||!ao)throw new Error("Genesis did not declare both City\
781
- projection artifacts.");var co=gt.get("call-web")?.path;if(!co)throw new Error("Genesis did not declare its call-web ar\
782
- tifact.");async function B(e,t={},n={}){let s=V(t.projectRoot);if(!s||!W.isAbsolute(s))throw new TypeError("Genesis oper\
783
- ations require an explicit absolute projectRoot.");return Xr(s,()=>e(io(t,n)))}function as(){}function uo(e){return`Gene\
878
+ map(n=>({...n}))}}var xs=ma(),wu=Object.freeze(xs.artifacts.map(e=>e.path)),Lt=new Map(xs.artifacts.map(e=>[e.id,e])),ha=Lt.
879
+ get("machine-city")?.path,fa=Lt.get("program-city")?.path;if(!ha||!fa)throw new Error("Genesis did not declare both City\
880
+ projection artifacts.");var ga=Lt.get("call-web")?.path;if(!ga)throw new Error("Genesis did not declare its call-web ar\
881
+ tifact.");async function z(e,t={},n={}){let s=V(t.projectRoot);if(!s||!W.isAbsolute(s))throw new TypeError("Genesis oper\
882
+ ations require an explicit absolute projectRoot.");return ia(s,()=>e(da(t,n)))}function Vs(){}function Ea(e){return`Gene\
784
883
  sis project guidance is unavailable for this conversation (${V(e?.message||e).replace(/\s+/gu," ").slice(0,300)||"no rea\
785
884
  son given"}). Work from the repository itself, where the genesis/ files still describe the project when present, and tel\
786
- l the user that Genesis guidance did not load if it matters to the request.`}async function lc({workdir:e,promptContext:t},{
787
- onGenesisUnavailable:n=as,timeoutMs:s=ht}={}){let i=ce(t);if(t.scope==="ephemeral")return i;let r;try{let o=await ft(()=>B(
788
- ge.projectSessionContext,{projectRoot:e,hostDriver:ce,hostDriverInput:t}),s);if(typeof o?.output=="string"&&o.output.trim())
789
- return o.output;r=new Error("Genesis returned no session guidance.")}catch(o){r=o}return n(r),`${uo(r)}
885
+ l the user that Genesis guidance did not load if it matters to the request.`}async function _u({workdir:e,promptContext:t},{
886
+ onGenesisUnavailable:n=Vs,timeoutMs:s=Pt}={}){let i=ue(t);if(t.scope==="ephemeral")return i;let r;try{let o=await $t(()=>z(
887
+ ve.projectSessionContext,{projectRoot:e,hostDriver:ue,hostDriverInput:t}),s);if(typeof o?.output=="string"&&o.output.trim())
888
+ return o.output;r=new Error("Genesis returned no session guidance.")}catch(o){r=o}return n(r),`${Ea(r)}
790
889
 
791
- ${i}`}function re(e,t={}){return ft(()=>B(e,t))}function cs(e,t){if(e?.contract!==t)throw new Error(`Genesis returned ${e?.
792
- contract||"no contract identity"}; expected ${t}.`);return e}async function H(e,t,n={}){return cs(await re(e,n),t)}async function Et(e,t,n={}){
793
- return cs(await B(e,n),t)}function K(e,t={}){return H(n=>Ur({...n,name:e}),C.stackSection,t)}async function vt(e,t={}){let n=await re(
794
- s=>Wr({...s,names:e}),t);if(!Array.isArray(n)||n.length!==e.length||n.some((s,i)=>s?.contract!==C.stackSection||s.name!==
795
- e[i]))throw new Error("Genesis returned an invalid Stack section inspection batch.");return n}async function dc(e={}){if((await po(
796
- e)).status!=="current")throw Object.assign(new Error("The project needs a current Genesis format before its Stack can be\
797
- inspected."),{code:"vibe64_stack_format_required"});await _r(W.join(e.projectRoot,Je),"utf8");let n=await K(he,e);return{
798
- components:n.components,stackHash:n.stackHash}}async function mc(e={}){let[t,n]=await Promise.all([K(hn,e),H(We,C.environment,
799
- e)]);return gn({environment:n,section:t})}async function hc(e={}){let[t,n]=await Promise.all([K(Sn,e),H(We,C.environment,
800
- e)]);return Rn({environment:n,section:t})}function fc(e={}){return B(ge.verify,e)}function gc(e={}){return H(We,C.environment,
801
- e)}function Ec(e={}){return H(Vr,C.projectInspection,e)}function vc(e={}){return H(zr,C.templates,e)}function bc(e={}){return Et(
802
- Ar,C.templateApplication,e)}function yc(e={}){return H(xr,C.engineering,e)}function wc(e={}){return H(Pr,C.collaboration,
803
- e)}async function Sc(e){let{unavailable:t,passes:n,master:s}=await H(Lr,C.passes,e);return{unavailable:t,passes:n,master:s}}
804
- async function po(e={}){let t=await re(Mr,e);if(!V(t?.status))throw new Error("Genesis did not return a project-format s\
805
- tatus.");return{...t}}function _c(e={}){return Et(qr,C.engineering,e)}function Ic(e={}){return Et(Fr,C.collaboration,e)}
806
- async function Tc({resourcesPreparing:e=!1,...t}={}){let[[n,s,i],r]=await Promise.all([vt([$e,je,he],t),H(We,C.environment,
807
- t)]);return{...Gn({environment:r,section:n,resourcesPreparing:e===!0}),resourceEstimates:Ge({section:s,outputsSection:n,
808
- workspaceSetupSection:i})}}async function Oc(e={}){let t=await K(Jn,e);return Qn({section:t})}async function Rc(e={}){return Tt(
809
- await K(_t,e))}async function kc(e={}){return Bn(await K(Un,e))}async function Ac(e={}){let[t,n,s]=await vt([he,je,$e],e);
810
- return{...await Fn({projectRoot:e.projectRoot,section:t}),resourceEstimates:Ge({section:n,outputsSection:s,workspaceSetupSection:t})}}
811
- async function Nc(e={}){let[t,n,s]=await vt([je,$e,he],e);return Ge({section:t,outputsSection:n,workspaceSetupSection:s})}
812
- async function Cc({action:e={},environment:t,input:n={},onGenesisUnavailable:s=as,projectRoot:i,timeoutMs:r=ht}){let o=eo(
813
- e),c=to(n,e),a=E=>B(Nr,{environment:t,projectRoot:i,request:c,sessionContextInstalled:!0,task:E},{prompt:!0}),u=async()=>{
814
- try{return{result:await a(o),task:o}}catch(E){let _=Object.hasOwn(ts,String(E?.code))?ts[E.code]:"";if(!_||_===o||n.automaticGenesisTask===
815
- !0)throw E;return{result:await a(_),task:_}}},p;try{if(p=await ft(u,r),typeof p.result?.prompt!="string"||!p.result.prompt.
816
- trim())throw new Error("Genesis returned no prompt.")}catch(E){return s(E),{prompt:c}}let{result:d,task:l}=p,g=is.has(V(
817
- d.task))?V(d.task):l;return{context:{genesis:!0,requestedTask:o,task:g,verificationCommands:d.verificationCommands,warnings:d.
818
- warnings},originalPrompt:c,prompt:d.prompt,promptId:V(e.promptId||e.id)||g}}export{za as CALL_WEB_SCHEMA,Ya as CITY_SCHEMA_VERSION,Xa as GENESIS_BLUEPRINT_PATH,co as GENESIS_CALL_WEB_PATH,pc as GENESIS_DERIVED_ARTIFACT_PATHS,
819
- oo as GENESIS_MACHINE_CITY_PATH,ao as GENESIS_PROGRAM_CITY_PATH,Je as GENESIS_STACK_PATH,Mt as GENESIS_STACK_SECTION_AMBIGUOUS,
820
- Ja as GENESIS_SUBSYSTEMS_PATH,ht as GENESIS_USER_PATH_TIMEOUT_MS,Fa as MACHINE_CITY_SCHEMA,qa as PROGRAM_CITY_SCHEMA,ja as SOURCE_EXPLANATION_PROMPT_VERSION,
821
- mn as VIBE64_APPLICATION_DEPLOYMENT_CONTRACT,Si as VIBE64_APPLICATION_DEPLOYMENT_V1_CONTRACT,Ce as VIBE64_PACKAGING_CONTRACT,
822
- me as VIBE64_PREVIEW_IDENTITY_COMMAND_PROTOCOL,Qa as addGenesisStack,bc as applyGenesisTemplate,Qr as assertGenesisPromptTask,
823
- rs as genesisCommandShimDirectory,no as genesisPackageBinDirectory,Ma as genesisParserEnvironment,Ms as genesisProjectContractNeedsAttention,
824
- Us as genesisProjectFileDiagnostic,Gs as genesisProjectFileUnreadable,to as genesisPromptRequest,eo as genesisPromptTask,
825
- tc as initializeGenesisProject,rc as inspectGenesisAgentIntegrations,wc as inspectGenesisCollaboration,ro as inspectGenesisDerivedArtifacts,
826
- yc as inspectGenesisEngineering,gc as inspectGenesisEnvironment,Ec as inspectGenesisProject,po as inspectGenesisProjectFormat,
827
- nc as inspectGenesisSkills,dc as inspectGenesisStackComponents,oc as inspectGenesisSubsystems,ac as inspectVibe64ArchitectureInspection,
828
- cc as inspectVibe64ArchitectureLayout,Rc as inspectVibe64ConnectedDevelopment,mc as inspectVibe64Deployment,Oc as inspectVibe64IntegrationSetup,
829
- Tc as inspectVibe64Outputs,hc as inspectVibe64Packaging,kc as inspectVibe64ProjectServices,Nc as inspectVibe64ResourceEstimates,
830
- Ac as inspectVibe64WorkspaceSetup,Sc as listGenesisPasses,ec as listGenesisStackPieces,vc as listGenesisTemplates,Wa as mergeArchitectureObservations,
831
- _i as parseVibe64DeploymentLines,Zn as parseVibe64IntegrationSetupLines,Le as parseVibe64OutputsLines,Tn as parseVibe64PackagingLines,
832
- Wn as parseVibe64ProjectServicesLines,Xn as parseVibe64ResourceEstimatesLines,Me as parseVibe64WorkspaceSetupLines,$s as readArchitecturePreviewLocator,
833
- uc as refreshGenesisCities,Cc as renderGenesisPrompt,Qi as resolveVibe64OutputParameters,On as resolveVibe64PackagingEnvironment,
834
- Ic as setGenesisCollaboration,_c as setGenesisEngineeringProfile,Ga as sourceExplanationGuidance,ic as syncGenesisAgentIntegrations,
835
- sc as syncGenesisSkills,Ua as validateArchitectureFacts,Ha as validateCallWeb,Ba as validateCityDocument,fc as verifyGenesisProject,
836
- lc as vibe64ConversationInstructions,ce as vibe64Driver,Ka as vibe64HostContextEnvironment,Tr as vibe64HostContextRegistry,
837
- so as vibe64HostContextResolverPath,Za as withGenesisCommandShim,ft as withinGenesisDeadline};
890
+ ${i}`}function re(e,t={}){return $t(()=>z(e,t))}function Ms(e,t){if(e?.contract!==t)throw new Error(`Genesis returned ${e?.
891
+ contract||"no contract identity"}; expected ${t}.`);return e}async function K(e,t,n={}){return Ms(await re(e,n),t)}async function xt(e,t,n={}){
892
+ return Ms(await z(e,n),t)}function oe(e,t={}){return K(n=>Yo({...n,name:e}),P.stackSection,t)}async function Vt(e,t={}){
893
+ let n=await re(s=>Xo({...s,names:e}),t);if(!Array.isArray(n)||n.length!==e.length||n.some((s,i)=>s?.contract!==P.stackSection||
894
+ s.name!==e[i]))throw new Error("Genesis returned an invalid Stack section inspection batch.");return n}async function Iu(e={}){
895
+ if((await ba(e)).status!=="current")throw Object.assign(new Error("The project needs a current Genesis format before its\
896
+ Stack can be inspected."),{code:"vibe64_stack_format_required"});await Co(W.join(e.projectRoot,rt),"utf8");let n=await oe(
897
+ be,e);return{components:n.components,stackHash:n.stackHash}}function Mt(e,t){return async(n={})=>{let[s,i]=await Promise.
898
+ all([oe(e,n),K(Dt,P.environment,n)]);return t({environment:i,section:s})}}var Tu=Mt($n,xn),ku=Mt(Bn,qn),Ou=Mt(It,Rt);function Au(e={}){
899
+ return z(ve.verify,e)}function Ru(e={}){return K(Dt,P.environment,e)}function Nu(e={}){return K(Ho,P.projectInspection,e)}
900
+ function Cu(e={}){return K(Qo,P.templates,e)}function Du(e={}){return xt(Vo,P.templateApplication,e)}function Pu(e={}){return K(
901
+ Wo,P.engineering,e)}function $u(e={}){return K(Uo,P.collaboration,e)}async function Lu(e){let{unavailable:t,passes:n,master:s}=await K(
902
+ zo,P.passes,e);return{unavailable:t,passes:n,master:s}}async function ba(e={}){let t=await re(Fo,e);if(!V(t?.status))throw new Error(
903
+ "Genesis did not return a project-format status.");return{...t}}function xu(e={}){return xt(ta,P.engineering,e)}function Vu(e={}){
904
+ return xt(ea,P.collaboration,e)}async function Mu({resourcesPreparing:e=!1,...t}={}){let[[n,s,i],r]=await Promise.all([Vt(
905
+ [Ge,Ke,be],t),K(Dt,P.environment,t)]);return{...as({environment:r,section:n,resourcesPreparing:e===!0}),resourceEstimates:Ye(
906
+ {section:s,outputsSection:n,workspaceSetupSection:i})}}async function ju(e={}){let t=await oe(Os,e);return Rs({section:t})}
907
+ async function Gu(e={}){return Ht(await oe(Wt,e))}async function Uu(e={}){return ls(await oe(cs,e))}async function Bu(e={}){
908
+ let[t,n,s]=await Vt([be,Ke,Ge],e);return{...await ws({projectRoot:e.projectRoot,section:t}),resourceEstimates:Ye({section:n,
909
+ outputsSection:s,workspaceSetupSection:t})}}async function Wu(e={}){let[t,n,s]=await Vt([Ke,Ge,be],e);return Ye({section:t,
910
+ outputsSection:n,workspaceSetupSection:s})}async function zu({action:e={},environment:t,input:n={},onGenesisUnavailable:s=Vs,
911
+ projectRoot:i,timeoutMs:r=Pt}){let o=ca(e),c=ua(n,e),a=E=>z(Mo,{environment:t,projectRoot:i,request:c,sessionContextInstalled:!0,
912
+ task:E},{prompt:!0}),u=async()=>{try{return{result:await a(o),task:o}}catch(E){let I=Object.hasOwn(Cs,String(E?.code))?Cs[E.
913
+ code]:"";if(!I||I===o||n.automaticGenesisTask===!0)throw E;return{result:await a(I),task:I}}},l;try{if(l=await $t(u,r),typeof l.
914
+ result?.prompt!="string"||!l.result.prompt.trim())throw new Error("Genesis returned no prompt.")}catch(E){return s(E),{prompt:c}}
915
+ let{result:d,task:p}=l,g=$s.has(V(d.task))?V(d.task):p;return{context:{genesis:!0,requestedTask:o,task:g,verificationCommands:d.
916
+ verificationCommands,warnings:d.warnings},originalPrompt:c,prompt:d.prompt,promptId:V(e.promptId||e.id)||g}}export{su as CALL_WEB_SCHEMA,ou as CITY_SCHEMA_VERSION,cu as GENESIS_BLUEPRINT_PATH,ga as GENESIS_CALL_WEB_PATH,wu as GENESIS_DERIVED_ARTIFACT_PATHS,
917
+ ha as GENESIS_MACHINE_CITY_PATH,fa as GENESIS_PROGRAM_CITY_PATH,rt as GENESIS_STACK_PATH,rn as GENESIS_STACK_SECTION_AMBIGUOUS,
918
+ uu as GENESIS_SUBSYSTEMS_PATH,Pt as GENESIS_USER_PATH_TIMEOUT_MS,iu as MACHINE_CITY_SCHEMA,ru as PROGRAM_CITY_SCHEMA,Zc as SOURCE_EXPLANATION_PROMPT_VERSION,
919
+ q as STAGING_DATA_ENTRY_FORMS,de as STAGING_DATA_MODES,Pn as VIBE64_APPLICATION_DEPLOYMENT_CONTRACT,Zi as VIBE64_APPLICATION_DEPLOYMENT_V1_CONTRACT,
920
+ Ve as VIBE64_PACKAGING_CONTRACT,fe as VIBE64_PREVIEW_IDENTITY_COMMAND_PROTOCOL,ms as VIBE64_STAGING_DATA_CONTRACT,It as VIBE64_STAGING_DATA_SECTION,
921
+ pu as addGenesisStack,Du as applyGenesisTemplate,aa as assertGenesisPromptTask,Ls as genesisCommandShimDirectory,la as genesisPackageBinDirectory,
922
+ Xc as genesisParserEnvironment,hi as genesisProjectContractNeedsAttention,Ei as genesisProjectFileDiagnostic,gi as genesisProjectFileUnreadable,
923
+ ua as genesisPromptRequest,ca as genesisPromptTask,mu as initializeGenesisProject,Eu as inspectGenesisAgentIntegrations,
924
+ $u as inspectGenesisCollaboration,ma as inspectGenesisDerivedArtifacts,Pu as inspectGenesisEngineering,Ru as inspectGenesisEnvironment,
925
+ Nu as inspectGenesisProject,ba as inspectGenesisProjectFormat,hu as inspectGenesisSkills,Iu as inspectGenesisStackComponents,
926
+ bu as inspectGenesisSubsystems,yu as inspectVibe64ArchitectureInspection,vu as inspectVibe64ArchitectureLayout,Gu as inspectVibe64ConnectedDevelopment,
927
+ Tu as inspectVibe64Deployment,ju as inspectVibe64IntegrationSetup,Mu as inspectVibe64Outputs,ku as inspectVibe64Packaging,
928
+ Uu as inspectVibe64ProjectServices,Wu as inspectVibe64ResourceEstimates,Ou as inspectVibe64StagingData,Bu as inspectVibe64WorkspaceSetup,
929
+ Lu as listGenesisPasses,du as listGenesisStackPieces,Cu as listGenesisTemplates,eu as mergeArchitectureObservations,Ji as parseVibe64DeploymentLines,
930
+ As as parseVibe64IntegrationSetupLines,Be as parseVibe64OutputsLines,Hn as parseVibe64PackagingLines,us as parseVibe64ProjectServicesLines,
931
+ ks as parseVibe64ResourceEstimatesLines,yo as parseVibe64StagingDataLines,qe as parseVibe64WorkspaceSetupLines,li as readArchitecturePreviewLocator,
932
+ Su as refreshGenesisCities,zu as renderGenesisPrompt,Nr as resolveVibe64OutputParameters,Fn as resolveVibe64PackagingEnvironment,
933
+ Vu as setGenesisCollaboration,xu as setGenesisEngineeringProfile,Jc as sourceExplanationGuidance,gu as syncGenesisAgentIntegrations,
934
+ fu as syncGenesisSkills,Qc as validateArchitectureFacts,nu as validateCallWeb,tu as validateCityDocument,Au as verifyGenesisProject,
935
+ _u as vibe64ConversationInstructions,ue as vibe64Driver,au as vibe64HostContextEnvironment,Po as vibe64HostContextRegistry,
936
+ pa as vibe64HostContextResolverPath,Rt as vibe64StagingDataInspection,lu as withGenesisCommandShim,$t as withinGenesisDeadline};