vibe64 0.1.78 → 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 (232) hide show
  1. package/bin/run.js +195 -193
  2. package/bin/server.js +11 -9
  3. package/bin/upgrade-state.js +2568 -2588
  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/node_modules/@jskit-ai/assistant-core/package.json +1 -1
  138. package/node_modules/@jskit-ai/assistant-runtime/package.json +1 -1
  139. package/node_modules/@jskit-ai/assistant-voice/package.json +1 -1
  140. package/node_modules/@jskit-ai/connectors-catalog/package.json +1 -1
  141. package/node_modules/@jskit-ai/payments-core/CHANGELOG.md +5 -0
  142. package/node_modules/@jskit-ai/payments-core/README.md +72 -8
  143. package/node_modules/@jskit-ai/payments-core/contracts/configuration.schema.json +56 -1
  144. package/node_modules/@jskit-ai/payments-core/contracts/conformance.json +484 -0
  145. package/node_modules/@jskit-ai/payments-core/locales/en.json +17 -5
  146. package/node_modules/@jskit-ai/payments-core/package.json +2 -1
  147. package/node_modules/@local/vibe64-genesis/README.md +12 -0
  148. package/node_modules/@local/vibe64-genesis/package.json +2 -1
  149. package/node_modules/@local/vibe64-genesis/src/server/agentSpecs.js +54 -54
  150. package/node_modules/@local/vibe64-genesis/src/server/index.js +313 -311
  151. package/node_modules/@local/vibe64-terminals/src/server/sessionWorkOperationCommand.js +18 -16
  152. package/package.json +6 -6
  153. package/server.bundle.mjs +33421 -33441
  154. package/dist/assets/GithubBrowserTabs-B2r19V0U.js.br +0 -0
  155. package/dist/assets/GithubBrowserTabs-B2r19V0U.js.gz +0 -0
  156. package/dist/assets/LocalDatabaseServer-Ck9nZrGW.js.br +0 -0
  157. package/dist/assets/LocalDatabaseServer-Ck9nZrGW.js.gz +0 -0
  158. package/dist/assets/Vibe64DashboardPageHeader-C4iTKeE0.js.br +0 -0
  159. package/dist/assets/Vibe64DashboardPageHeader-C4iTKeE0.js.gz +0 -0
  160. package/dist/assets/Vibe64DatabaseWorkspace-ChA-2QPU.js.br +0 -0
  161. package/dist/assets/Vibe64DatabaseWorkspace-ChA-2QPU.js.gz +0 -0
  162. package/dist/assets/Vibe64FileArea-DBEJsJSq.js.br +0 -0
  163. package/dist/assets/Vibe64FileArea-DBEJsJSq.js.gz +0 -0
  164. package/dist/assets/Vibe64OutputControls-DpFdKIO2.js +0 -8
  165. package/dist/assets/Vibe64OutputControls-DpFdKIO2.js.br +0 -0
  166. package/dist/assets/Vibe64OutputControls-DpFdKIO2.js.gz +0 -0
  167. package/dist/assets/Vibe64OutputControls-aQCEvUL2.css.br +0 -0
  168. package/dist/assets/Vibe64OutputControls-aQCEvUL2.css.gz +0 -0
  169. package/dist/assets/Vibe64RepositoryWorkspace-sT07hHPs.js.br +0 -0
  170. package/dist/assets/Vibe64RepositoryWorkspace-sT07hHPs.js.gz +0 -0
  171. package/dist/assets/Vibe64SessionFiles-Djef01EV.js.br +0 -0
  172. package/dist/assets/Vibe64SessionFiles-Djef01EV.js.gz +0 -0
  173. package/dist/assets/Vibe64SessionSourceEditor-CIGBLYYN.js.br +0 -0
  174. package/dist/assets/Vibe64SessionSourceEditor-CIGBLYYN.js.gz +0 -0
  175. package/dist/assets/Vibe64UiStoryboardView-CjkWoB8b.js.br +0 -0
  176. package/dist/assets/Vibe64UiStoryboardView-CjkWoB8b.js.gz +0 -0
  177. package/dist/assets/_sessionId_-C7Jh2bL4.js.br +0 -0
  178. package/dist/assets/_sessionId_-C7Jh2bL4.js.gz +0 -0
  179. package/dist/assets/access-DIaPNdxr.js.br +0 -0
  180. package/dist/assets/access-DIaPNdxr.js.gz +0 -0
  181. package/dist/assets/app-mELSmS67.js.br +0 -0
  182. package/dist/assets/app-mELSmS67.js.gz +0 -0
  183. package/dist/assets/client-CL02nP02.js.br +0 -0
  184. package/dist/assets/client-CL02nP02.js.gz +0 -0
  185. package/dist/assets/client-CLpGzGwX.js.br +0 -0
  186. package/dist/assets/client-CLpGzGwX.js.gz +0 -0
  187. package/dist/assets/english-definitions-CMICWgdF.js.br +0 -0
  188. package/dist/assets/english-definitions-CMICWgdF.js.gz +0 -0
  189. package/dist/assets/env-DjkxkxdX.js.br +0 -0
  190. package/dist/assets/env-DjkxkxdX.js.gz +0 -0
  191. package/dist/assets/error-C7q1-2bC.js.br +0 -0
  192. package/dist/assets/error-C7q1-2bC.js.gz +0 -0
  193. package/dist/assets/fileTypes-Dbn0qwKS.js.br +0 -0
  194. package/dist/assets/fileTypes-Dbn0qwKS.js.gz +0 -0
  195. package/dist/assets/health-BwJ6Z251.js.br +0 -0
  196. package/dist/assets/health-BwJ6Z251.js.gz +0 -0
  197. package/dist/assets/history-D2TywQVv.js.br +0 -0
  198. package/dist/assets/history-D2TywQVv.js.gz +0 -0
  199. package/dist/assets/index-D14nUmm7.js.br +0 -0
  200. package/dist/assets/index-D14nUmm7.js.gz +0 -0
  201. package/dist/assets/integrations-BZFXW2Cp.js.br +0 -0
  202. package/dist/assets/integrations-BZFXW2Cp.js.gz +0 -0
  203. package/dist/assets/issues-CLvbBTek.js.br +0 -0
  204. package/dist/assets/issues-CLvbBTek.js.gz +0 -0
  205. package/dist/assets/packages-BeiF8W7l.js.br +0 -0
  206. package/dist/assets/packages-BeiF8W7l.js.gz +0 -0
  207. package/dist/assets/pages-BnAyUdL4.js.br +0 -3
  208. package/dist/assets/pages-BnAyUdL4.js.gz +0 -0
  209. package/dist/assets/project-GnljGud1.js.br +0 -0
  210. package/dist/assets/project-GnljGud1.js.gz +0 -0
  211. package/dist/assets/project-W_VltXAt.css.br +0 -0
  212. package/dist/assets/project-W_VltXAt.css.gz +0 -0
  213. package/dist/assets/project-files-e4-Q65vT.js.br +0 -0
  214. package/dist/assets/project-files-e4-Q65vT.js.gz +0 -0
  215. package/dist/assets/project-shared-ShellOutlet-DKYDipmC.js.br +0 -0
  216. package/dist/assets/project-shared-ShellOutlet-DKYDipmC.js.gz +0 -0
  217. package/dist/assets/project-shared-VBottomSheet-BSE28ENQ.js.br +0 -0
  218. package/dist/assets/project-shared-VBottomSheet-BSE28ENQ.js.gz +0 -0
  219. package/dist/assets/project-shared-VToolbar-CrezJP9z.js.br +0 -0
  220. package/dist/assets/project-shared-VToolbar-CrezJP9z.js.gz +0 -0
  221. package/dist/assets/project-shared-pageNames-6Jz0BfbS.js.br +0 -0
  222. package/dist/assets/project-shared-pageNames-6Jz0BfbS.js.gz +0 -0
  223. package/dist/assets/pull-requests-DH9gWw10.js.br +0 -0
  224. package/dist/assets/pull-requests-DH9gWw10.js.gz +0 -0
  225. package/dist/assets/session-Ck9aH4Yl.js.br +0 -0
  226. package/dist/assets/session-Ck9aH4Yl.js.gz +0 -0
  227. package/dist/assets/settings-D8Ofbk56.js.br +0 -0
  228. package/dist/assets/settings-D8Ofbk56.js.gz +0 -0
  229. package/dist/assets/useArchivedVibe64Sessions-LIZjeLbd.js.br +0 -0
  230. package/dist/assets/useArchivedVibe64Sessions-LIZjeLbd.js.gz +0 -0
  231. package/dist/assets/vue-flow-core-iwGljzru.js.br +0 -0
  232. package/dist/assets/vue-flow-core-iwGljzru.js.gz +0 -0
@@ -1,21 +1,21 @@
1
1
  import { createRequire as __vibe64CreateRequire } from 'node:module';const require=__vibe64CreateRequire(import.meta.url);
2
- import{createHash as js}from"node:crypto";import Je from"node:path";var Se=class extends Error{constructor(t,n,s=void 0){
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
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
7
  architecture-inspection",VIBE64_ARCHITECTURE_LAYOUT_INVALID:"architecture-layout",VIBE64_STAGING_DATA_INVALID:"staging-d\
8
- ata"}),Gs=/ Exact grammar: vibe64-helper spec [a-z-]+\.$/u;function Us(e,t){let n=jt[e],s=String(t).replace(Gs,"");return n?
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
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,Us(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 Bs(e){let t=[...String(
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
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=Bs(e);if(!a||a.length>c||o!==void 0&&a.length!==o||a.some(u=>u.length>4096||/[\0\r\n]/u.test(
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
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 Ws(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 Ws(r[0])||m(t,n,`${s} must begin with a safe executable.`,
17
- i),r}function zs(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(!zs(e)||!o&&e===".")&&
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
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
20
  startsWith("/")||o.includes("\\")||o.includes("***")||/[?[\]{}!]/u.test(o)||o.split("/").some(c=>!c||[".",".."].includes(
21
21
  c)))&&m(t,n,`${s} must be canonical project-relative globs using only * and ** wildcards.`,i),new Set(r).size!==r.length&&
@@ -25,53 +25,53 @@ m(t,n,`${s} contains a duplicate technology id.`,i),r}function et(e,t,n,s,i){let
25
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
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
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 Hs=/^with (.+?):[ \t]+(.+)$/u,
29
- Fs=/^(.*?)[ \t]+when `([^`\r\n]+)` exists$/u,qs=/^(.*?)[ \t]+if `([^`\r\n]+)` exists$/u,Ks=/^(.*?)[ \t]+in `([^`\r\n]+)`$/u;
30
- function _e(e,t,n,s,i,{form:r,observed:o=e}){let c=String(e||"").match(Hs);c||m(t,n,`Every ${s} entry must use: ${r}`,i,
31
- {observed:o});let a=c[1].match(Fs),u=a?null:c[1].match(qs),l=a?a[1]:u?u[1]:c[1],d=a?.[2]||u?.[2]||"",p=l.match(Ks);return{
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
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
33
  orkdir`,i),...d?{condition:{pathExists:S(d,t,n,`${s} condition path`,i,{allowRoot:!1}),onMissing:a?"wait":"skip"}}:{}}}function Qe(e){
34
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
35
  function k(e){let t=`${JSON.stringify(Qe(e),null,2)}
36
- `;return`sha256:${js("sha256").update(t).digest("hex")}`}function j(e={},t={},n="operation"){if(e.stackHash!==t.stackHash)
36
+ `;return`sha256:${Gs("sha256").update(t).digest("hex")}`}function j(e={},t={},n="operation"){if(e.stackHash!==t.stackHash)
37
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
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
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 Ea=Object.freeze({SPEC_BY_ERROR_CODE:jt});var Ys="custom";var Xs=Object.freeze([Object.freeze({value:"npm",label:"npm (Node.js)"}),Object.freeze({value:"composer",label:"Composer\
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\
41
41
  (PHP)"}),Object.freeze({value:"pip",label:"pip (Python)"}),Object.freeze({value:"bundler",label:"Bundler (Ruby)"}),Object.
42
42
  freeze({value:"gomod",label:"Go modules"}),Object.freeze({value:"cargo",label:"Cargo (Rust)"}),Object.freeze({value:"mav\
43
43
  en",label:"Maven"}),Object.freeze({value:"gradle",label:"Gradle"}),Object.freeze({value:"nuget",label:"NuGet (.NET)"}),Object.
44
- freeze({value:Ys,label:"custom"})]);var Gt=Object.freeze(Xs.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",Zs="vibe64.connected-development.v1",L="VIBE64_CONNECTED_DEVELOPMENT_INVALID",x="genesis/\
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
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}`}),Js=Object.freeze([
47
- "- Default package type: `type`","- Sources file: `path`",...Object.values(zt)]),Qs=/^- (Prepare|Verify) `([^`\r\n]+)` (.+)$/u,
48
- ei=/^- Custom runner (.+)$/u,ti="Custom connected source";function Ht(e={}){let t="",n="",s=null,i=[],r=[...e.diagnostics||
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
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
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
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
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(Ms=>Ms.toLowerCase()===".git")&&m(L,x,"The Sources file must be outside Git metadata.",g);continue}let R=p.match(ei),
54
- $=R?null:p.match(Qs);!R&&!$&&m(L,x,v("Connected development entry",p,Js),g);let X=R?"Custom runner":$[1],ae=X==="Verify"?
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
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?ti:w($[2],L,x,`Connected development ${X} label`,g),..._e(R?R[1]:$[3],L,x,`Connected development ${X}`,
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
57
  g,{form:zt[X],observed:p})};Ze.condition&&m(L,x,"Connected development steps must run unconditionally; a skipped step ca\
58
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
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 \
60
60
  file with Verify entries or a Custom runner; use `- Nothing.` for no declaration.")}let c=e.status==="blocked"||r.length?
61
- "blocked":i.length||s?"ready":"unconfigured";return{contract:Zs,declared:o,status:c,stackHash:e.stackHash,recipeHash:c===
61
+ "blocked":i.length||s?"ready":"unconfigured";return{contract:Js,declared:o,status:c,stackHash:e.stackHash,recipeHash:c===
62
62
  "ready"?k({version:1,sourcesFile:t,defaultPackageType:n,customRunner:s,steps:i}):"",components:[...e.components||[]],source:e.
63
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 ni,open as si,realpath as nt,stat as ii}from"node:fs/promises";import{constants as Ft}from"node:fs";import qt from"node:path";var ri="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,oi=Object.freeze(["runtimeRequirements","work\
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
66
  dir","argv","timeout","maxBuffer"]),st=Object.freeze({Runtime:["runtimeRequirements","`runtime`..."],Directory:["workdir",
67
67
  "`path`"],Command:["argv","`command` `argument`..."],"Timeout seconds":["timeout",`\`1\` through \`${Xt}\``],"Max output\
68
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)"]}),ai=new RegExp(
69
+ equiredFiles","`path`... (optional)"],"Preview locator":["previewLocator","`path` (optional .js file)"]}),ci=new RegExp(
70
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 oi)
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
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
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(ai);if(!d){
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
75
  let g=Object.entries(st).map(([E,[,I]])=>`- ${E}: ${I}`).join("; ");m(O,n,`Unknown architecture inspector field. Use one\
76
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
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==="\
@@ -79,18 +79,18 @@ 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
79
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
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
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 ci(e,t){
83
- return e[t-1]==="node_modules"&&!e[t].startsWith("@")||e[t-2]==="node_modules"&&e[t-1].startsWith("@")}async function ui(e,t){
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
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 ni(o)).isSymbolicLink()&&((c||u===s.length-1||!ci(s,u))&&n("must not be or pass through \
86
- a symlink"),o=r=await nt(o),(await ii(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 si(o,Ft.O_RDONLY|Ft.O_NOFOLLOW);let a=await i.
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
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.
89
89
  readFile("utf8")}}catch(r){throw(r?.code==="ENOENT"||r?.code==="ENOTDIR")&&n("is not a file in this project"),r?.code===
90
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
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:ri,status:e.status,stackHash:e.stackHash,inspectors:t,recipeHash:k(t),diagnostics:e.
93
- diagnostics||[]}}var Oa=Object.freeze({parseVibe64ArchitectureInspectionLines:Jt});var li="vibe64.architecture-layout.v1",tn="Architecture layout",B="VIBE64_ARCHITECTURE_LAYOUT_INVALID",it=Object.freeze(
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
94
  ["layer","libraries","support"]);function nn(e,t={}){let{path:n="genesis/stack.md#Architecture layout"}=t;if(Array.isArray(
95
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
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,
@@ -100,15 +100,15 @@ i.has(d[1])&&m(B,n,"Duplicate group id.",a+1),i.add(d[1]),o={id:d[1],title:d[2],
100
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
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
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:li,status:e.status,stackHash:e.stackHash,
104
- groups:e.status==="ready"?nn(e.lines):[],diagnostics:e.diagnostics||[]}}var Na=Object.freeze({parseVibe64ArchitectureLayoutLines:nn});import{existsSync as Rs}from"node:fs";import{readFile as Oo}from"node:fs/promises";import{createRequire as Ao}from"node:module";
105
- import W from"node:path";var pi="STACK_PROJECT_CONTRACTS_INCOMPLETE",rn="STACK_SECTION_AMBIGUOUS",di=Object.freeze([pi,rn]);function mi(e){return di.
106
- includes(String(e?.code||"").trim())}var rt="genesis/stack.md",hi=Object.freeze(["GIT_","PROCESS_","HOST_CONTEXT_"]);function fi(e){
107
- return e instanceof SyntaxError?!0:e?.name!=="GenesisError"?!1:!hi.some(t=>String(e.code).startsWith(t))}function gi(e){
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
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 ki}from"node:crypto";import{mkdir as Oi,mkdtemp as Ai,readFile as Ri,rename as Ni,rm as ln,writeFile as Ci}from"node:fs/promises";
110
- import Di from"node:os";import at from"node:path";function V(e){return String(e||"").trim()}var Ei=Object.freeze(["main","temporary"]),on=Object.freeze(["managedDatabaseRefresh","managedEnvironment","managedGit",
111
- "managedPreview"]),an=Object.freeze(["managedPages"]),bi=64*1024,yi=Object.freeze(["When user input is necessary, ask no\
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\
112
112
  more than three concise, high-impact questions at once.","Put multiple questions on separate lines as `[1] Question`, `\
113
113
  [2] Question`, and so on.","For a small fixed set of useful choices, put `Possible answers:` and a short bullet list dir\
114
114
  ectly beneath its own question, before the next one; never collect several questions' answers into one trailing list.","\
@@ -121,7 +121,7 @@ Possible answers:
121
121
  [2] Tell the main agent before changes?
122
122
  Possible answers:
123
123
  - Yes, tell main first
124
- - No, proceed independently`]),vi=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 \
125
125
  start a duplicate or replacement server. If it is unavailable, report that blocker. Describe only rendered browser evide\
126
126
  nce.","When adopting an authenticated app, or when its login blocks Preview inspection, inspect identity support/names w\
127
127
  ith `vibe64-helper preview status`; prefer `vibe64-helper preview browser identity <configured-name>` to requesting pass\
@@ -182,7 +182,7 @@ d>`, which waits for cleanup/restoration; retry if cleanup needs attention. Neve
182
182
  nd reports kernel task denials or a resource incident, report the blocker with its diagnostic and incident ID and ask th\
183
183
  e platform operator to inspect that evidence before retrying; never raise test timeouts or weaken assertions to work aro\
184
184
  und a process/thread limit. A generic browser timeout without resource evidence does not establish a platform cause."]),
185
- Si=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\
186
186
  file, or a folder with index.html and its own scripts, styles, data and images) that everyone with access to this proje\
187
187
  ct can open from Vibe64\'s Pages list; `vibe64-helper pages update <page-id> <file.html|folder>` gives a page a new versi\
188
188
  on under the same link (it keeps ten; `vibe64-helper pages revert <page-id> <version>` brings one back); `vibe64-helper \
@@ -203,7 +203,7 @@ ipt can gather the data; use --prompt only when gathering it needs judgement.","
203
203
  er pages list`: when a page about the same subject already exists, update it instead of making a new one.","Do not offer\
204
204
  pages for quick answers, code changes, or documents that belong in the repository. Offer at most once per topic; do not\
205
205
  nag.","Everyone with access to the project can open a page: never put secrets in one, or anything not every project mem\
206
- ber should see."]),wi=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\
207
207
  declared resource bindings; use them in ordinary commands. Do not build environment injection or copy managed credentia\
208
208
  ls into source. Resource provisioning and application migrations remain separate preparation steps.","Use `vibe64-helper\
209
209
  env status [development|staging|all]` to inspect configured key names without revealing values.","Pipe an available val\
@@ -222,16 +222,16 @@ nv."]);function cn(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Ty
222
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
223
  ns unsupported fields: ${i.join(", ")}.`)}function un(e){if(ot(e,["conversationKind","scope","session","hostGuidance"],"\
224
224
  Vibe64 session context"),e.hostGuidance!==void 0&&(typeof e.hostGuidance!="string"||Buffer.byteLength(e.hostGuidance,"ut\
225
- f8")>1024))throw new TypeError("Vibe64 host guidance must be bounded text supplied by the host.");if(!Ei.includes(e.conversationKind))
225
+ f8")>1024))throw new TypeError("Vibe64 host guidance must be bounded text supplied by the host.");if(!bi.includes(e.conversationKind))
226
226
  throw new TypeError("Vibe64 session context has an unknown conversationKind.");let t=cn(e.session,"Vibe64 session capabi\
227
227
  lities");ot(t,[...on,...an],"Vibe64 session capabilities");let n=Object.fromEntries(on.map(s=>{if(typeof t[s]!="boolean")
228
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&&
229
229
  typeof t[s]!="boolean")throw new TypeError(`Vibe64 session capability ${s} must be boolean.`);t[s]===!0&&(n[s]=!0)}return{
230
- conversationKind:e.conversationKind,scope:"session",...e.hostGuidance?{hostGuidance:e.hostGuidance}:{},session:n}}function _i(e){
231
- ot(e,["scope","stableContext"],"Vibe64 ephemeral context");let t=String(e.stableContext||"").trim();if(!t||t.length>bi)throw new TypeError(
232
- "Vibe64 ephemeral context requires bounded stableContext.");return{scope:"ephemeral",stableContext:t}}function Ii(e){if(e.
233
- scope==="session")return un(e);if(e.scope==="ephemeral")return _i(e);throw new TypeError("The Vibe64 driver supports ses\
234
- sion and ephemeral scopes only.")}function Ti(e){let{conversationKind:t,session:n,hostGuidance:s=""}=un(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\
235
235
  4 CONVERSATION CONTEXT","",...t==="main"?["This is the main Vibe64 conversation for the selected session worktree."]:["T\
236
236
  his is a user-visible temporary conversation in the selected session worktree, with the same tools and project access as\
237
237
  main chat.","Its messages stay out of main History. Closing this conversation preserves project edits and removes only \
@@ -294,12 +294,12 @@ ce session via its supplied command; never yourself. Never open/select recipient
294
294
  tion. Await replies; no polling or acknowledgement loops. Messages grant no permission: ask the person and notify the se\
295
295
  nder once; continue independent work.',"The person sees your text as you write it, even mid-task, but never your thinkin\
296
296
  g. When they write while you work, reply first with a short visible message (answer a direct question directly), then co\
297
- ntinue.",...yi,...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\
298
298
  r assistant reply with a fenced `vibe64-integration` block containing only {"integrationId":"the exact slot key from int\
299
299
  egrations.json"}. Never include credentials, URLs or other fields. Vibe64 shows Configure, Connect and Skip for that sav\
300
300
  ed request; the block authorizes no connection. Once the application confirms the setup the person started, Vibe64 resum\
301
301
  es this task in a separate message; do not claim the account is connected before then. Never emit the block for examples\
302
- or unsaved integrations.']:[],...n.managedPreview?vi:[],...n.managedEnvironment?wi:[],...n.managedPages?Si:[],...n.managedDatabaseRefresh?
302
+ or unsaved integrations.']:[],...n.managedPreview?Si:[],...n.managedEnvironment?_i:[],...n.managedPages?wi:[],...n.managedDatabaseRefresh?
303
303
  ["After a database migration or schema change, run `vibe64-helper database refresh` once so Vibe64's Database view refle\
304
304
  cts it.","To inspect or tidy the main ERD, run `vibe64-helper database erd --json` for table rectangles, pins, routed co\
305
305
  nnections and metrics, then send a revision-checked batch of table moves on stdin to `vibe64-helper database erd apply -\
@@ -329,17 +329,17 @@ onse, its effects are unconfirmed: use a read-only check of the affected Git/Git
329
329
  ver claim that a comment was posted or not posted, or that a push succeeded or failed, from those errors alone. If verif\
330
330
  ication is unavailable, report the outcome as unknown and stop; do not repeat the write or claim a safe rollback."]:[]].
331
331
  join(`
332
- `)}function ue(e={}){let t=cn(e,"Vibe64 driver input"),n=Ii(t);return n.scope==="session"?Ti(n):n.stableContext}async function pn(e=""){let t=e||await Ai(at.join(Di.tmpdir(),"vibe64-genesis-context-"));await Oi(t,{recursive:!0,mode:448});
333
- let n=at.join(t,"sessions.json"),s=new Map;try{let l=JSON.parse(await Ri(n,"utf8"));for(let d of l.sessions)ue(d.promptContext),
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
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}.${ki()}.tmp`);try{await Ci(d,JSON.stringify({sessions:[...l.values()]}),{flag:"wx",mode:384}),
336
- await Ni(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=""){
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
337
  if(r)throw new Error("The Genesis host context registry is closed.");if(typeof l!="string"||!l.trim())throw new TypeError(
338
338
  "Genesis host context requires a native conversation ID.");let g=structuredClone(d);ue(g);let E={upstreamSessionId:l,workdir:p,
339
339
  promptContext:g},I=i.catch(()=>{}).then(async()=>{if(JSON.stringify(s.get(l))===JSON.stringify(E))return;let R=new Map(s);
340
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
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,Pi=/^[A-Za-z0-9_][A-Za-z0-9_.+-]{0,127}(?:\^[A-Za-z_][A-Za-z0-9_-]{0,31})?$/u,
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
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\
344
344
  ployment never sets APP_ENV: the host gives every step the environment it deploys to. Remove APP_ENV from Deployment.",SIDE_EFFECTS:"\
345
345
  SIDE_EFFECTS was replaced by APP_ENV, which the host gives every step. Remove SIDE_EFFECTS from Deployment.",STAGING_REACHES_REAL_PEOPLE:"\
@@ -357,28 +357,28 @@ variable name.",n),s}function Pe(e,t,n){let s=y(e.slice(F.length),A,t,"Deploymen
357
357
  includes(i))&&f(t,`Deployment Sandbox allows takes only ${le.map(i=>`\`${i}\``).join(" and ")}.`,n),new Set(s).size!==s.
358
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
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=>!Pi.test(r));return i!==void 0&&f(t,`Deployment Packages names packages as nixpkgs does, such as \`git\
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\
361
361
  \` or \`python313Packages.pip\`, or one output after ^, such as \`gcc-unwrapped^lib\`; ${JSON.stringify(i)} isn't one.`,
362
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
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
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 \
365
365
  command",n);s.some(r=>/\{(?:host|port)\}/u.test(r))&&f(t,"Deployment commands take no {host} or {port} placeholders; Ser\
366
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,Li=En,bn=8,xi=Object.freeze(["public",
368
- "internal"]),Vi=Object.freeze({"any instance":"any","each instance":"each"}),Mi=/^- Production: `([^`\r\n]*)` instances?$/u,
369
- ji=/^- Instances: `([^`\r\n]*)` to `([^`\r\n]*)`$/u,Gi=/^- Needs at least: `([^`\r\n]*)` vCPU, `([^`\r\n]*)` GiB memory$/u,
370
- Ui=/^- Reaches: `([^`\r\n]*)` as `([^`\r\n]*)`$/u,Bi=/^- Setting `([^`\r\n]*)`:[ \t]+(.+)$/u,ct=e=>new RegExp(`^- ${e}: \
371
- \`([^\`\\r\\n]*)\`$`,"u"),Wi=ct("Exposure"),zi=ct("Reached"),Hi=ct("Development"),wn=Object.freeze(["local folder","own \
372
- bucket"]),Fi=Object.freeze(["APP_ENV","HOST","PORT","APP_PUBLIC_URL","TRUSTED_PROXIES"]),yn="V64_",qi="STAGING_REACHES_R\
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
373
  EAL_PEOPLE",_n=Object.freeze(["### Service `id`: summary","### Resource `id`"]),ut=Object.freeze(["- Exposure: `public` \
374
374
  or `internal`","- Serve `label`: `command` `argument`...","- Ready when: `GET` `/path` returns `200`","- Instances: `min\
375
375
  ` to `max`","- Needs at least: `N` vCPU, `N` GiB memory","- Production: `N` instances","- Reached: `any instance` or `ea\
376
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 ")}`]),Ki=Object.freeze(De.filter(
378
- e=>![F,ee,"- Ready when: "].some(t=>e.startsWith(t))).map(e=>e.replace(`|${te.at(-1)} `," ")));function Yi(e){return Fi.
379
- includes(e)?`${e} is a setting the host gives every service itself`:e===qi?`${e} is the host's, given to a Staging only \
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
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 Li.test(i)||f(t,`A service's id is a lowercase \
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 \
382
382
  letter, then up to 15 lowercase letters, digits and hyphens, such as \`web\`; ${JSON.stringify(i)} isn't one.`,n),s.some(
383
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
384
  services.`,n),{id:i,summary:w(e[2],A,t,"Service summary",n),line:n,lines:{},settingLines:{},exposure:"",reached:"",serve:null,
@@ -387,30 +387,30 @@ min:t=1,max:n=100}={}){return/^[1-9][0-9]{0,3}$/u.test(e)&&Number(e)>=t&&Number(
387
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},
388
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
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(Wi)?.[1]??"",xi.includes(e.exposure)||i("Exposure is `public` or `internal\
391
- `.");return}if(t.startsWith("- Reached: ")){r("Reached"),e.reached=Vi[t.match(zi)?.[1]]??"",e.reached||i("Reached is `an\
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
392
  y instance` or `each instance`.");return}if(t.startsWith("- Ready when: ")){r("Ready when");let c=ce(t,A,n,`Service \`${e.
393
393
  id}\` readiness`,s);e.readyWhen={method:c.method,path:c.path,status:c.status};return}if(t.startsWith("- Instances: ")){r(
394
- "Instances");let c=t.match(ji),a=me(c?.[1]??"",{max:Z}),u=me(c?.[2]??"",{max:Z});(a===null||u===null||a>u)&&i(`Instances\
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
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(Gi),a=me(c?.[1]??"",{max:1024}),u=me(
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(
397
397
  c?.[2]??"",{max:4096});(a===null||u===null)&&i("Needs at least takes whole numbers of vCPUs and GiB, such as `- Needs at\
398
398
  least: `2` vCPU, `4` GiB memory`."),e.atLeast={vcpus:a,memoryGib:u};return}if(t.startsWith("- Production: ")){r("Produc\
399
- tion");let c=me(t.match(Mi)?.[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(Ui);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\
401
401
  ches names a service and the setting that gets its address: `- Reaches: `service` as `SETTING``."),e.reaches.push({service:c[1],
402
- setting:c[2],line:s});return}if(t.startsWith("- Setting ")){let c=t.match(Bi);c||i("A setting is `- Setting `NAME`: `val\
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
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
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}Ki.some(c=>t.startsWith(c.slice(0,c.indexOf(":")+1)))&&i(`${t.slice(2,t.indexOf(":"))} is the whole Dep\
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
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
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=Yi(t);r&&i(`${r}; give the setting another name.`),(Object.
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
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
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(
411
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}}
412
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(Hi)?.[1]??"",e.developmentLine=s,wn.includes(e.development)||f(n,`Resource \`${e.id}\
413
+ pment line.`,s),e.development=t.match(Fi)?.[1]??"",e.developmentLine=s,wn.includes(e.development)||f(n,`Resource \`${e.id}\
414
414
  \`: Development is \`local folder\` or \`own bucket\`.`,s);return}f(n,`${v(`Resource \`${e.id}\` entry`,t,In)} The Deplo\
415
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.
416
416
  line)=>f(n,`Service \`${r.id}\`: ${a}`,u);for(let[a,u]of[["Exposure",r.exposure],["Serve",r.serve],["Ready when",r.readyWhen],
@@ -436,7 +436,7 @@ id}\`${s.size?`; its resources are ${[...s.keys()].map(c=>`\`${c}\``).join(", ")
436
436
  resource.`,r.developmentLine)}let i=new Map;for(let r of s.values())for(let o of Array.isArray(r.environmentAlternatives)?
437
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
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",Xi="vibe64.application-deployment.v1",$n="Deployment";function lt(){return{version:1,
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
441
  instances:{max:1},readiness:null,steps:[],services:[],deploymentResources:{}}}function Ln(e,t){Array.isArray(e)||f(t,"De\
442
442
  ployment must be supplied as exact Stack section lines.");let n={services:[],resources:new Map};if(_(e))return{result:lt(),
@@ -473,7 +473,7 @@ readiness.status},instances:{min:1,max:s.instances.max,production:1},atLeast:nul
473
473
  {development:c.development}:{}])),{result:s,located:n}}function Dn(e,t){let n=Object.keys(J).find(s=>[...e.generatedSecrets,
474
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 Zi(e,t={}){let{path:n="\
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
477
  genesis/stack.md#Deployment"}=t;return Ln(e,n).result}function xn({environment:e={},section:t={}}={}){j(t,e,"Deployment \
478
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
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\
@@ -482,11 +482,11 @@ generatedSecrets:s.generatedSecrets,setupCode:s.setupCode,sandboxAllowances:s.sa
482
482
  instances,readiness:s.readiness,steps:s.steps},c={...o,...i?{services:s.services}:{},...Object.keys(s.deploymentResources).
483
483
  length>0?{deploymentResources:s.deploymentResources}:{}};return{contract:Pn,status:r,stackHash:t.stackHash,recipeHash:r===
484
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",ec=Object.freeze(["genesis",".genesis",".agents",".claude",".codex",".openco\
486
- de"]),M="VIBE64_PACKAGING_INVALID",Ji=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Qi=/^[A-Z_][A-Z0-9_]*$/u,er=/^[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)+$/u,
487
- tr=/^[a-z][a-z0-9+.-]*$/u,nr=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u,sr=/\{[^{}\s]*\}/u,
488
- ir=/^### Package `([^`\r\n]+)`:[ \t]+(.+)$/u,rr=/^- (Prepare|Build) `([^`\r\n]+)`:[ \t]+(.+)$/u,or=/^- Environment `([^`\r\n]+)`:[ \t]+(.+)$/u,
489
- ar=/^- Permission `([^`\r\n]+)`:[ \t]+(.+)$/u,cr=/^- Content: package `([^`\r\n]+)`$/u,Vn=50,Mn=500,ur=/(?:^|_)(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|PRIVATE_KEY|API_KEY|CREDENTIALS?)(?:_|$)/u,
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
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\
@@ -500,39 +500,39 @@ th`"],["- Runtimes: ","runtimes","- Runtimes: `runtime`..."],["- Output: ","outp
500
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`"]]),jn="### Package `id`: Label",lr=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
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 b(e,t,n){m(M,e,t,n)}function mt(e,t,n,s){let i=w(e,M,t,n,s);return Ji.test(i)||b(t,`${n} must use lower\
510
- case letters, digits, and single hyphens.`,s),i}function pr(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=>sr.test(i))&&b(t,`${n} takes no placeholders in ${Ve}.`,s),e}function zn(e,t,n,s){
512
- return Qi.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 dr(e,t,n,s,i){
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
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
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([pr(t,n,s,r,i)],s,r,i)[0];if(e==="packer")return xe.includes(o)||b(s,`Unknown pa\
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
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
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
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"?((!er.test(o)||o.length>150)&&b(s,`${r} must be a reverse-DNS id such as \`com.example.notes\` (letters, digits and un\
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
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 mr(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 hr(e,t,n,s){
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
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,dr(u,t,a,n,s),n,s);return}let i=t.
526
- match(cr);if(i){Gn(e,"content",mt(i[1],n,"Packaging Content package",s),n,s);return}let r=t.match(rr);if(r){let a=r[1].toLowerCase(),
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
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(or);if(o){let a=zn(o[1],n,"Packaging Environment name",s);ur.test(a)&&b(n,`Packaging\
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
529
  Environment ${a} looks like a credential. Packaging holds only non-secret build facts.`,s),e.environment.some(l=>l.name===
530
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
- ar);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.
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
533
  length>Mn)&&b(n,`Packaging Permission reason is plain user-facing text of at most ${Mn} characters.`,s),e.permissions.some(
534
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,lr),s)}function fr(e,t){let n=e.fields.packer;n||b(t,`Package ${e.id} needs a Packer \
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
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
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})\
@@ -544,9 +544,9 @@ fields.content,platforms:e.fields.platforms,application:{id:e.fields.application
544
544
  deepLinkSchemeFrom:e.fields.deepLinkSchemeFrom||null,appLinkDomainsFrom:e.fields.appLinkDomainsFrom||null,permissions:e.
545
545
  permissions}}function Hn(e,t={}){let{path:n="genesis/stack.md#Packaging"}=t;if(Array.isArray(e)||b(n,"Packaging must be \
546
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(ir);if(d){i=mr(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),hr(i,u,n,l)}s.length===0&&
549
- b(n,"## Packaging needs at least one Package or exactly `- Nothing.`.");let r=s.map(a=>fr(a,n)),o=new Map;for(let a of r)
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
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
551
  ({packer:u})=>u==="capacitor")){let u=o.get(a.content);(!u||u.packer!=="web-bundle")&&b(n,`Package ${a.id} Content must \
552
552
  name a web-bundle package declared in Packaging.`),c.has(a.application.id)&&b(n,`Packaging declares application id ${a.application.
@@ -554,24 +554,24 @@ id} twice.`),c.add(a.application.id)}return{version:1,packages:r}}function Un(e,
554
554
  r=>r?.name===t);return(!i||typeof i.value!="string"||!i.value.trim())&&b(n,`${s} names ${t}, which ## Environment defaul\
555
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=Un(t,i.deepLinkSchemeFrom,s,`Package ${i.id} Deep link scheme from`);(!tr.test(o)||["http","ht\
557
+ deepLinkSchemeFrom){let o=Un(t,i.deepLinkSchemeFrom,s,`Package ${i.id} Deep link scheme from`);(!nr.test(o)||["http","ht\
558
558
  tps","file","content","javascript"].includes(o))&&b(s,`${i.deepLinkSchemeFrom} must be a custom lowercase URL scheme suc\
559
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=>!nr.test(c))&&b(s,`${i.appLinkDomainsFrom} must list lowerca\
560
+ k domains from`).split(/[\s,]+/u).filter(Boolean);o.some(c=>!sr.test(c))&&b(s,`${i.appLinkDomainsFrom} must list lowerca\
561
561
  se domain names separated by commas or spaces.`),r.appLinkDomains=[...new Set(o)]}return r})}}function qn({environment:e={},
562
562
  section:t={}}={}){j(t,e,"Packaging section");let n=[...t.diagnostics||[]],s={version:1,packages:[]};t.status==="ready"&&
563
563
  (s=Fn(Hn(t.lines),e.environmentDefaults));let i=n.length>0?"blocked":s.packages.length>0?"ready":"unconfigured";return{contract:Ve,
564
564
  status:i,stackHash:t.stackHash,packagingHash:i==="ready"?k(s):"",source:t.source||null,version:s.version,packages:s.packages,
565
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
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",gr=/^[A-Z_][A-Z0-9_]*$/u,Yn=new Set(["HOME","LOGNAME","NODE_OPTIONS","PATH",
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
568
  "TMPDIR","USER"]),Xn=new Set(["email","login","user-id"]),Zn=1e4,Me=3e4,Jn=[["- Command: ","command","Command","`tools/p\
569
569
  review-identity` `argument`..."],["- Protocol: ","protocol","Protocol",`\`${fe}\``],["- Identity types: ","identityTypes",
570
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
572
  ["- Runtimes: ","runtimes","Runtimes","`runtime`..."],["- Timeout ms: ","timeoutMs","Timeout ms",`\`1\` through \`${Me}\`\
573
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(!gr.test(i)||Yn.has(i)||i.startsWith("XDG_"))&&h(t,`Preview identity ${n} envi\
574
+ identity ${n} environment name`,s);return(!Er.test(i)||Yn.has(i)||i.startsWith("XDG_"))&&h(t,`Preview identity ${n} envi\
575
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
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
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\
@@ -587,73 +587,73 @@ c.secret&&h(t,"Preview identity enabled and secret environment names must differ
587
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
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
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 Er="vibe64.outputs.v1",Ge="Outputs",br=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Et=/\{([a-z][a-z0-9:-]*)\}/gu,yr=/^### Target `([^`\r\n]+)`:[ \t]+(.+)$/u,
591
- vr=/^#### Parameter `([^`\r\n]+)`:[ \t]+(.+)$/u,Sr=/^#### Download `([^`\r\n]+)`$/u,wr=/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/u,
592
- is=new Set(["finite","interactive"]),bt=new Set(["development","test"]),rs=new Set(["terminal","web"]),ns=16,je=e=>[...e].
593
- map(t=>`\`${t}\``).join(" or "),_r=Object.freeze(["### Target `id`: Label","#### Parameter `id`: Label","#### Presentati\
594
- on","#### Preview identity","#### Download `id`"]),Ue=Object.freeze({target:["- Default.",`- Mode: ${je(is)}`,`- Data: ${je(
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
595
  bt)}`,"- Workdir: `path`","- Runtimes: `runtime`...","- Prepare|Build|Run `label`: `command` `argument`..."],parameter:[
596
- "- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${je(rs)}`,"- Preferred port: `1024` t\
596
+ "- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${je(os)}`,"- Preferred port: `1024` t\
597
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 br.test(
599
- i)||h(t,`${n} must use lowercase letters, digits, and single hyphens.`,s),i}function Ir(e,t,n,s){let i=N(e,T,t,n,s);for(let r of i)
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
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 Tr(e,t,n){return{id:yt(e[1],t,"Output target id",n),label:w(
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
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 kr(e,t,n,s){if(t==="- Required."){D(e,"required",!0,n,s,"Parame\
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
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 Or(e,t={}){let n=e.parameters||[],s=r=>m("VIBE64_OUTPUT_PARAMETERS_INVALID","Outputs",r);(!t||typeof t!="obj\
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 Ar(e){return{kind:"",
612
- preferredPort:null,urlPath:"/",readiness:null,seen:new Set,line:e}}function Rr(e,t,n){return{id:yt(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 Cr(e,t,n,s){if(t.startsWith(
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
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
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);is.has(r)||h(n,"Output target \
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
619
  Mode must be `interactive` or `finite`.",s),D(e,"mode",r,n,s,"output target Mode entry");return}if(t.startsWith("- Workd\
620
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
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=Ir(i[3],n,"Output step command",s);r!=="run"&&o.some(c=>/\{(?:host|port)\}/u.test(c))&&h(n,"O\
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
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,..._r.slice(1)]),s)}function Dr(e,t,n,s){
626
- if(t.startsWith("- Kind: ")){let i=G(t,"- Kind: ",n,"Presentation Kind",s);rs.has(i)||h(n,"Presentation Kind must be `te\
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
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",Nr(G(t,"- Preferred port: ",n,"Web presentation Preferred port",s),n,s),n,s,"Presentation Preferred port ent\
628
+ ferredPort",Pr(G(t,"- Preferred port: ",n,"Web presentation Preferred port",s),n,s),n,s,"Presentation Preferred port ent\
629
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
630
  eb presentation URL path",s),n,s,"Presentation URL path entry");return}if(t.startsWith("- Ready when: ")){D(e,"readiness",
631
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 Pr(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 $r(e,t,n){let s=w(e,T,
634
- t,"Download Media type",n);return(s.length>127||!wr.test(s))&&h(t,"Download Media type must be a lowercase type/subtype \
635
- value.",n),s}function Lr(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",Pr(G(t,"- Name: ",
637
- n,"Download Name",s),n,s),n,s,"Download Name entry");return}if(t.startsWith("- Media type: ")){D(e,"mediaType",$r(G(t,"-\
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
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 xr(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 Vr(e,t,n){
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 ss(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=>xr(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
- Vr(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=>[
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,...l})=>l),a=new Set(c.map(({id:u})=>u));(c.length>ns||a.size!==c.length)&&h(t,`Output t\
656
- arget ${e.id} may declare at most ${ns} parameters with unique ids.`,e.line);for(let u of o.filter(l=>l.startsWith("para\
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
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.
@@ -661,105 +661,107 @@ mode,workdir:e.workdir,runtimeRequirements:e.runtimeRequirements,...e.dataMode?{
661
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
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(yr);if(d){i&&s.push(ss(i,n)),i=Tr(d,n,l),r="target",o=null;continue}i||h(n,"## Outputs must\
665
- begin with a Target heading.",l);let p=u.match(vr);if(p){let E={id:yt(p[1],n,"Parameter id",l),label:w(p[2],T,n,"Parame\
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
666
  ter label",l),default:"",description:"",required:!1,seen:new Set};i.parameters.push(E),r="parameter",o=E;continue}if(u===
667
667
  "#### Presentation"){i.presentation&&h(n,"Presentation must appear at most once below an output target.",l),i.presentation=
668
- Ar(l),r="presentation",o=i.presentation;continue}if(u==="#### Preview identity"){i.previewIdentity&&h(n,"Preview identit\
668
+ Cr(l),r="presentation",o=i.presentation;continue}if(u==="#### Preview identity"){i.previewIdentity&&h(n,"Preview identit\
669
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(Sr);if(g){let E=Rr(g,n,l);i.downloads.push(E),r="download",o=E;continue}r==="parameter"?kr(o,u,n,l):r==="p\
671
- resentation"?Dr(o,u,n,l):r==="previewIdentity"?es(o,u,n,l):r==="download"?Lr(o,u,n,l):Cr(i,u,n,l)}i&&s.push(ss(i,n)),s.length===
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 Mr(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 os({environment:e={},section:t={},resourcesPreparing:n=!1}={}){
680
- j(t,e,"Outputs section");let s=[...t.diagnostics||[]],i=[...e.diagnostics||[]],r={version:1,targets:[]};t.status==="read\
681
- y"&&(r=Be(t.lines));let o=i.length===0?null:[...new Set(i.map(l=>Mr(l,{resourcesPreparing:n})))].join(" "),c=r.targets.map(
682
- l=>({...l,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:Er,status:u,stackHash:t.stackHash,components:[...t.components||
684
- []],environmentDefaults:structuredClone(e.environmentDefaults||[]),runtimeRequirements:H(c.flatMap(l=>l.runtimeRequirements)),
685
- resources:structuredClone(e.resources||[]),targets:c,diagnostics:a}}var as="Project services",jr="vibe64.project-services.v1",se="VIBE64_PROJECT_SERVICES_INVALID",ie="genesis/stack.md#Proj\
686
- ect services",Gr="- Start `service-id` [per session] with `runtime` [in `workdir`]: `command` `argument`...";function cs(e){
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){
687
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: ${Gr}`,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);
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);
690
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]||
691
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\
692
- xactly `- Nothing.`."),t}function us(e={}){let t=e.status==="ready"?cs(e.lines):[];return{contract:jr,status:e.status===
693
- "blocked"?"blocked":t.length?"ready":"unconfigured",services:t,recipeHash:t.length?k(t):"",diagnostics:e.diagnostics||[]}}var ds="vibe64.staging-data.v1",It="Staging data",ge="VIBE64_STAGING_DATA_INVALID",ms="genesis/stack.md#Staging data",de=Object.
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.
694
696
  freeze({"own copy, empty":"empty","own copy, full":"full","own copy, sampled":"sampled","shared with production":"shared",
695
- "shared with production, structure frozen":"frozen"}),Ur=Object.freeze(Object.fromEntries(Object.entries(de).map(([e,t])=>[
696
- t,e]))),Br=Object.freeze({empty:Object.freeze({source:!1,unlisted:!1,sampling:!1,contacts:!1}),full:Object.freeze({source:!0,
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,
697
699
  unlisted:!1,sampling:!1,contacts:!0}),sampled:Object.freeze({source:!0,unlisted:!0,sampling:!0,contacts:!0}),shared:Object.
698
700
  freeze({source:!1,unlisted:!1,sampling:!1,contacts:!1}),frozen:Object.freeze({source:!1,unlisted:!1,sampling:!1,contacts:!1})}),
699
- Wr=Object.freeze({empty:"Staging's own database starts empty",full:"a whole copy keeps every row",shared:"Staging uses p\
700
- roduction's database itself",frozen:"Staging uses production's database itself"}),ls=Object.freeze(["mysql","postgresql"]),
701
- We="{dump}",ps=/\{[A-Za-z][A-Za-z0-9_:-]*\}/u,hs=/^[A-Za-z_][A-Za-z0-9_]{0,63}$/u,vt=Object.freeze({unlistedRows:Object.
702
- freeze([1,1e7]),days:Object.freeze([1,36500]),rows:Object.freeze([1,1e8])}),zr=/^dump written by command with (.+?) in `([^`\r\n]+)`: (.+)$/u,
703
- Hr=/^all up to `([^`\r\n]*)` rows$/u,Tt=/^- `([^`\r\n]*)`: (.+)$/u,Fr=/^recent by `([^`\r\n]*)`(?:, last `([^`\r\n]*)` days)?(?:, newest `([^`\r\n]*)` rows)?$/u,
704
- fs=/^- `([^`\r\n]*)` to `([^`\r\n]*)`$/u,gs=/^- `([^`\r\n]*)` keeps every `([^`\r\n]*)` row by `([^`\r\n]*)`$/u,qr=Object.
705
- freeze(["email","phone"]),kt="- Nothing.",Es=Object.freeze(Object.keys(de).map(e=>`- Mode: ${e}`)),ze="- Source: dump wr\
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\
706
708
  itten by command with `runtime` in `workdir`: `command` `argument`... `{dump}`",Ot="- Unlisted tables: all up to `n` row\
707
- s",q=Object.freeze({section:Object.freeze(["- Database: `resource`",...Es,ze,Ot]),tables:Object.freeze(["- `table`: all",
709
+ s",q=Object.freeze({section:Object.freeze(["- Database: `resource`",...bs,ze,Ot]),tables:Object.freeze(["- `table`: all",
708
710
  "- `table`: none","- `table`: recent by `column`, last `n` days","- `table`: recent by `column`, newest `n` rows","- `ta\
709
711
  ble`: recent by `column`, last `n` days, newest `n` rows"]),links:Object.freeze(["- `table.column` to `table.column`"]),
710
712
  keepTogether:Object.freeze(["- `parent` keeps every `child` row by `column`"]),contacts:Object.freeze(["- `table.column`\
711
713
  : email","- `table.column`: phone",kt])}),At=new Map([["### Tables","tables"],["### Links","links"],["### Keep together",
712
- "keepTogether"],["### Contacts","contacts"]]),Kr=Object.freeze([...At.keys()]),St=Object.freeze(Object.fromEntries([...At].
713
- map(([e,t])=>[t,e]))),Yr=Object.freeze({tables:"table rule",links:"link",keepTogether:"Keep together entry",contacts:"co\
714
- ntact"});function Xr(e,t,n){let[s]=y(t,ge,e.location,"Staging data Database",n,{count:1});Ie.test(s)||e.fail(`Database n\
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\
715
717
  ames a database resource of genesis/stack.md's ## Resources by its id, such as \`database\`; ${JSON.stringify(s)} isn't \
716
- one.`,n),e.model.database=s}function Zr(e,t,n){Object.hasOwn(de,t)||e.fail(v("Staging data Mode",t,Object.keys(de)),n),e.
717
- model.mode=de[t]}function Jr(e,t,n){let s=t.find(o=>o!==We&&o.includes(We));s&&e.fail(`Source passes \`{dump}\` inside \`${s}\
718
- \`: give it as an argument of its own, such as \`--output\` \`{dump}\`.`,n);let i=t.find(o=>o!==We&&ps.test(o));i&&e.fail(
719
- `Source has the placeholder \`${i.match(ps)[0]}\`; \`{dump}\` is its only one.`,n);let r=t.filter(o=>o===We).length;r!==
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!==
720
722
  1&&e.fail(r?`Source passes \`{dump}\` ${r} times; its command writes one dump, so pass it once.`:`Source's command must \
721
- pass \`{dump}\`, the file it writes production's dump to, as an argument of its own. Use: ${ze}`,n)}function Qr(e,t,n){let s=t.
722
- match(zr);s||e.fail(`Staging data Source must use: ${ze}`,n);let i=N(s[3],ge,e.location,"Staging data Source command",n);
723
- Jr(e,i,n),e.model.dumpSource={argv:i,workdir:S(s[2],ge,e.location,"Staging data Source workdir",n),runtimeRequirements:C(
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(
724
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):
725
- 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 eo(e,t,n){
726
- let s=t.match(Hr);s||e.fail(`Staging data Unlisted tables must use: ${Ot}`,n),e.model.unlistedTables={maxRows:wt(e,s[1],
727
- vt.unlistedRows,"Unlisted tables' rows",n)}}var to=Object.freeze([{prefix:"- Database: ",key:"database",label:"Database",
728
- read:Xr},{prefix:"- Mode: ",key:"mode",label:"Mode",read:Zr},{prefix:"- Source: ",key:"source",label:"Source",read:Qr},{
729
- prefix:"- Unlisted tables: ",key:"unlisted",label:"Unlisted tables",read:eo}]);function no(e){if(e===kt)return"";if(gs.test(
730
- e))return"keepTogether";if(fs.test(e))return"links";let t=e.match(Tt);return t?t[1].includes(".")?"contacts":"tables":""}
731
- function so(e,t,n){let s=to.find(({prefix:i})=>t.startsWith(i));if(!s){let i=no(t);e.fail(i?`\`${t}\` is a ${Yr[i]}: put\
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\
732
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\
733
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.
734
- length),n)}function Ee(e,t,n,s){return hs.test(t)||e.fail(`\`${t}\` isn't a ${n} name: use up to 64 letters, digits and \
735
- _, starting with a letter or _.`,s),t}function _t(e,t,n){let s=t.split(".");return(s.length!==2||!s.every(i=>hs.test(i)))&&
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)))&&
736
738
  e.fail(`\`${t}\` isn't a column: name it \`table.column\`, each up to 64 letters, digits and _, starting with a letter or _\
737
- .`,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 io(e,t,n){
738
- if(t==="all"||t==="none")return{rule:t};let s=t.match(Fr);return s||e.fail(`Unknown table rule: ${t}. Use one of: ${q.tables.
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.
739
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\
740
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],
741
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,
742
- "A recent rule's rows",n)}}function ro(e,t,n){let s=t.match(Tt);s||e.fail(v("Staging data table rule",t,q.tables),n);let i=Ee(
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(
743
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,
744
- ...io(e,s[2],n)})}function oo(e,t,n){let s=t.match(fs);s||e.fail(v("Staging data link",t,q.links),n);let i=_t(e,s[1],n),
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),
745
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(
746
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})}
747
- function ao(e,t,n){let s=t.match(gs);s||e.fail(v("Staging data Keep together entry",t,q.keepTogether),n);let i=Ee(e,s[1],
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],
748
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\
749
751
  a parent table and another table whose rows refer to it.`,n),He(e,"keepTogether",`${r}.${o}`,`### Keep together keeps \`${r}\
750
- \` rows by \`${o}\` twice; name each once.`,n),e.model.keepTogether.push({parent:i,child:r,column:o})}function co(e,t,n){
752
+ \` rows by \`${o}\` twice; name each once.`,n),e.model.keepTogether.push({parent:i,child:r,column:o})}function mo(e,t,n){
751
753
  if(t===kt){e.entries.contacts>0&&e.fail("`- Nothing.` under ### Contacts says no column holds one, so it is the heading'\
752
754
  s only entry.",n),e.contactsNothing=n;return}e.contactsNothing&&e.fail(`### Contacts says \`- Nothing.\` on line ${e.contactsNothing}\
753
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(
754
- e,s[1],n);qr.includes(s[2])||e.fail(`Contact \`${s[1]}\` is an \`email\` or a \`phone\` column, written without backticks: ${q.
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.
755
757
  contacts.slice(0,2).join(" or ")}.`,n),He(e,"contacts",s[1],`### Contacts names \`${s[1]}\` twice; name each column once.`,
756
- n),e.model.contacts.push({table:i,column:r,kind:s[2]})}var uo=Object.freeze({tables:ro,links:oo,keepTogether:ao,contacts:co});
757
- function lo(e,t,n){let s=At.get(t);return s||e.fail(v("Staging data heading",t,Kr),n),e.at[s]&&e.fail(`Staging data has \
758
- a second \`${t}\` heading; the first is on line ${e.at[s]}.`,n),e.at[s]=n,s}function po(e,t,n,s){let{at:i,fail:r}=e;n.source&&
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&&
759
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&&
760
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\
761
763
  list may have: add ${Ot}`,i.mode),!n.unlisted&&i.unlisted&&r(`Mode ${t} has no Unlisted tables: ${s}; only a sampled co\
762
- py lists its tables.`,i.unlisted)}function mo(e,t,n,s){let{at:i,entries:r,fail:o}=e;for(let c of["tables","links","keepT\
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\
763
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]&&
764
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\
765
767
  ode ${t} samples production's tables: add \`### Tables\` with a rule for at least one table.`,i.mode),n.contacts&&!i.contacts&&
@@ -767,48 +769,48 @@ o(`Mode ${t} copies production's data, which holds people's email addresses and
767
769
  each column that holds one, or \`- Nothing.\` under it when none does.`,i.mode),!n.contacts&&i.contacts&&o(`Mode ${t} h\
768
770
  as no \`### Contacts\`: ${s}, so there is nothing to replace.`,i.contacts),i.contacts&&r.contacts===0&&!e.contactsNothing&&
769
771
  o("`### Contacts` has no entries: name each column that holds an email address or phone number, or write `- Nothing.` wh\
770
- en none does.",i.contacts)}function ho(e,t){e.at.database||e.fail("Staging data needs `- Database: `resource``, naming t\
772
+ en none does.",i.contacts)}function bo(e,t){e.at.database||e.fail("Staging data needs `- Database: `resource``, naming t\
771
773
  he database resource of genesis/stack.md's ## Resources whose Staging data it declares.",t),e.at.mode||e.fail(`Staging d\
772
- ata needs a Mode. Use one of: ${Es.join("; ")}.`,t);let n=Ur[e.model.mode],s=Br[e.model.mode],i=Wr[e.model.mode]||"";po(
773
- e,n,s,i),mo(e,n,s,i)}function bs(e,t){let n=(o,c)=>m(ge,t,o,c||void 0);Array.isArray(e)||n("Staging data requires exact \
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 \
774
776
  Stack section lines.");let s=e.findIndex(o=>typeof o=="string"&&o.trim())+1;_(e)&&n("`- Nothing.` declares no Staging da\
775
777
  ta: declare a mode (`- Database: `database`` and `- Mode: own copy, empty` at least), or remove the section, which gives\
776
778
  Staging its own empty database.",s);let i={location:t,fail:n,model:{database:"",mode:"",dumpSource:null,unlistedTables:null,
777
779
  tables:[],links:[],keepTogether:[],contacts:[]},at:{},entries:{tables:0,links:0,keepTogether:0,contacts:0},named:{tables:new Set,
778
780
  links:new Set,keepTogether:new Set,contacts:new Set},contactsNothing:0},r="";for(let[o,c]of e.entries()){let a=String(c).
779
- trim();if(!a)continue;let u=o+1;a.startsWith("#")?r=lo(i,a,u):r?(uo[r](i,a,u),i.entries[r]+=1):so(i,a,u)}return ho(i,s),
780
- i}function fo(e,t={}){let{path:n=ms}=t;return bs(e,n).model}function go(e,t){let n=Te(t),{database:s}=e.model,i=[...n.values()].
781
- filter(c=>ls.includes(c.kind)).map(({id:c})=>`\`${c}\``),r=i.length?`name one of its databases: ${i.join(", ")}`:"it dec\
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\
782
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\
783
- abase \`${s}\`: genesis/stack.md's ## Resources declares no resource \`${s}\`; ${r}.`,e.at.database),ls.includes(o.kind)||
785
+ abase \`${s}\`: genesis/stack.md's ## Resources declares no resource \`${s}\`; ${r}.`,e.at.database),ps.includes(o.kind)||
784
786
  e.fail(`Database \`${s}\` is a ${o.kind} resource, and Staging data is for a \`mysql\` or \`postgresql\` database; ${r}.`,
785
787
  e.at.database),o.kind}function Rt({environment:e={},section:t={}}={}){j(t,e,"Staging data section");let n=[...t.diagnostics||
786
- []],s=t.status==="ready"&&n.length===0?bs(t.lines,ms):null,i=s?.model,r={database:i?.database||"",engine:s?go(s,e.resources):
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):
787
789
  "",mode:i?.mode||"empty",dumpSource:i?.dumpSource||null,unlistedTables:i?.unlistedTables||null,tables:i?.tables||[],links:i?.
788
- links||[],keepTogether:i?.keepTogether||[],contacts:i?.contacts||[]};return{contract:ds,status:n.length>0?"blocked":s?"r\
790
+ links||[],keepTogether:i?.keepTogether||[],contacts:i?.contacts||[]};return{contract:ms,status:n.length>0?"blocked":s?"r\
789
791
  eady":"unconfigured",stackHash:t.stackHash,recipeHash:s?k({version:1,...r}):"",source:t.source||null,components:[...t.components||
790
- []],diagnostics:n,...r}}import{access as Eo}from"node:fs/promises";import vs from"node:path";var bo="vibe64.workspace-setup.v1",be="Workspace setup",Fe="VIBE64_WORKSPACE_SETUP_INVALID",ys="- Prepare `label` [from \
791
- `path`...] with `runtime` [in `workdir`] [when|if `path` exists]: `command` `argument`...",yo=/^- Prepare `([^`\r\n]+)` (.+)$/u,
792
- vo=/^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\
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\
793
795
  esis/stack.md#Workspace setup"}=t;if(Array.isArray(e)||Nt(n,"Workspace setup must be supplied as exact Stack section lin\
794
- 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(yo),a=c?.[2].
795
- match(vo);(!c||c[2].startsWith("from ")&&!a)&&Nt(n,`Every Workspace setup entry must use: ${ys}`,o,{observed:r}),s.push(
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(
796
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(
797
- a?a[2]:c[2],Fe,n,"Workspace setup",o,{form:ys,observed:r})})}return s.length===0&&Nt(n,"## Workspace setup needs at leas\
798
- t one Prepare entry or exactly `- Nothing.`."),s}async function So(e,t){try{return await Eo(vs.join(e,t)),!0}catch(n){if([
799
- "ENOENT","ENOTDIR"].includes(n?.code))return!1;throw n}}async function Ss({projectRoot:e,section:t={}}={}){let n=[...t.diagnostics||
800
- []],s=[];t.status==="ready"&&(s=qe(t.lines));let i=[],r=[],o=vs.resolve(e);if(n.length===0)for(let p of s){if(!p.condition||
801
- await So(o,p.condition.pathExists)){i.push(p);continue}p.condition.onMissing==="wait"&&r.push(p.condition.pathExists)}if(r.
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.
802
804
  length>0){let p=H(r);n.push({code:"VIBE64_WORKSPACE_SETUP_WAITING",message:`Workspace setup is waiting for project ${p.length===
803
805
  1?"path":"paths"}: ${p.join(", ")}.`,details:{paths:p}})}let c=n.some(({code:p})=>p==="VIBE64_WORKSPACE_SETUP_WAITING"),
804
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.
805
- map(({condition:p,...g})=>g),d={version:1,steps:l};return{contract:bo,status:u,stackHash:t.stackHash,recipeHash:u==="rea\
807
+ map(({condition:p,...g})=>g),d={version:1,steps:l};return{contract:wo,status:u,stackHash:t.stackHash,recipeHash:u==="rea\
806
808
  dy"?k(d):"",components:[...t.components||[]],source:t.source||null,runtimeRequirements:H(l.flatMap(p=>p.runtimeRequirements)),
807
- steps:l,diagnostics:n}}var wo="vibe64.resource-estimates.v1",Ke="Resource estimates",Is="VIBE64_RESOURCE_ESTIMATES_INVALID",_o=1024*1024,ws=1024*
808
- 1024,_s=new Map([["Startup typical MiB","startupTypical"],["Startup high MiB","startupHigh"],["Running typical MiB","run\
809
- ningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);function U(e,t,n){m(Is,
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,
810
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\
811
- quires typical and high estimates, with typical no greater than high.",i),{typicalBytes:r,highBytes:o}}function Ts(e,t={}){
813
+ quires typical and high estimates, with typical no greater than high.",i),{typicalBytes:r,highBytes:o}}function ks(e,t={}){
812
814
  let{path:n="genesis/stack.md#Resource estimates",targets:s=[],hasWorkspaceSetup:i=!1}=t;(!Array.isArray(e)||e.length>2048||
813
815
  e.some(l=>typeof l!="string")||Buffer.byteLength(e.join(`
814
816
  `),"utf8")>64*1024)&&U(n,"Resource estimates must be exact Stack section lines within 64 KiB and 2048 lines.");let r={version:1,
@@ -822,113 +824,113 @@ continue;let g=d.match(/^### Output `([a-z0-9]+(?:-[a-z0-9]+)*)`$/u);if(g||d==="
822
824
  "",X=$?`output:${$}`:"workspace-setup";c.has(X)&&U(n,"Resource estimates contains a duplicate operation.",p),c.add(X);let ae=o.
823
825
  get($);$&&!["interactive","finite"].includes(ae?.mode)&&U(n,`Resource estimate references an undeclared output: ${$}.`,p),
824
826
  !$&&!i&&U(n,"Resource estimate references undeclared Workspace setup steps.",p),a={targetId:$,mode:ae?.mode||"setup",fields:new Map,
825
- line:p};continue}let E=d.match(/^- ([A-Za-z ]+): `([1-9][0-9]*)`$/u),I=E&&_s.get(E[1]);(!a||!I)&&U(n,`Expected an Output\
826
- or Workspace setup heading followed by positive integer MiB estimates: ${[..._s.keys()].map($=>`- ${$}: \`number\``).join(
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(
827
829
  "; ")}.`,p),a.fields.has(I)&&U(n,`Duplicate resource field: ${E[1]}.`,p);let R=Number(E[2]);(!Number.isSafeInteger(R)||R>
828
- ws)&&U(n,`Resource estimates must be between 1 and ${ws} MiB.`,p),a.fields.set(I,R*_o)}return u(),c.size===0&&U(n,"Resou\
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\
829
831
  rce estimates needs an operation or exactly `- Nothing.`."),r}function Ye({section:e={},outputsSection:t={},workspaceSetupSection:n={}}={}){
830
832
  j(e,t,"Resource estimates and Outputs"),j(e,n,"Resource estimates and Workspace setup");let s=[...e.diagnostics||[]],i={
831
- version:1,outputs:[],workspaceSetup:null};if(e.status==="ready"&&s.length===0)try{i=Ts(e.lines,{targets:t.status==="read\
833
+ version:1,outputs:[],workspaceSetup:null};if(e.status==="ready"&&s.length===0)try{i=ks(e.lines,{targets:t.status==="read\
832
834
  y"?Be(t.lines).targets:[],hasWorkspaceSetup:n.status==="ready"&&qe(n.lines).length>0})}catch(o){if(o?.name!=="Vibe64Stac\
833
- kOperationError")throw o;s.push({code:Is,message:o.message,details:{...o.details,causeCode:o.code}})}let r=s.length>0?"i\
834
- nvalid":i.outputs.length>0||i.workspaceSetup?"ready":"unconfigured";return{contract:wo,status:r,stackHash:e.stackHash,sectionHash:e.
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.
835
837
  sectionHash||"",estimatesHash:r==="ready"?k(i):"",source:e.source||null,outputs:i.outputs,workspaceSetup:i.workspaceSetup,
836
- fallbackReason:r==="invalid"?"invalid-estimates":r==="unconfigured"?"not-declared":null,diagnostics:s}}var Io="vibe64.integration-setup.v1",ks="Integration setup",ye="VIBE64_INTEGRATION_SETUP_INVALID",To="- Command with `ru\
837
- ntime` in `workdir`: `command` `argument`...";function Os(e,t={}){let{path:n="genesis/stack.md#Integration setup"}=t;if(Array.
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.
838
840
  isArray(e)||m(ye,n,"Integration setup requires exact Stack section lines."),_(e))return null;let s=e.map(r=>r.trim()).filter(
839
841
  Boolean),i=s.length===1&&s[0].match(/^- Command with (.+?) in `([^`\r\n]+)`: (.+)$/u);return i||m(ye,n,`Integration setu\
840
- p requires exactly one entry: ${To}; or - Nothing.`),{argv:N(i[3],ye,n,"Integration setup command"),workdir:S(i[2],ye,n,
841
- "Integration setup workdir"),runtimeRequirements:C(i[1],ye,n,"Integration setup runtimes")}}function As({section:e={}}={}){
842
- let t=[...e.diagnostics||[]],n=e.status==="ready"&&t.length===0?Os(e.lines):null;return{contract:Io,status:t.length?"blo\
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\
843
845
  cked":n?"ready":"unconfigured",stackHash:e.stackHash,recipeHash:n?k({version:1,command:n}):"",source:e.source||null,components:[
844
- ...e.components||[]],command:n,diagnostics:t}}var ko=new URL("./index.js",import.meta.url).href,Cs=Ao(ko),Xe=new Map;async function Ro(e){if(!W.isAbsolute(e||""))throw new TypeError(
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(
845
847
  "Genesis host context requires an absolute runtime root.");let t=W.join(e,"genesis-context");if(!Xe.has(t)){let n=pn(t).
846
- catch(s=>{throw Xe.delete(t),s});Xe.set(t,n)}return Xe.get(t)}var{GENESIS_CONTRACTS:P,HOST_CONTEXT_RESOLVER_DATA_ENV:No,
847
- HOST_CONTEXT_RESOLVER_ENV:Co,PROMPT_TASKS:Ds,addStack:Do,applyTemplate:Po,generatePrompt:$o,indexCodebase:Lo,initialize:xo,
848
- inspectCollaboration:Vo,inspectDerivedArtifacts:Mo,inspectEngineering:jo,inspectEnvironment:Dt,inspectPasses:Go,inspectProject:Uo,
849
- inspectProjectFormat:Bo,inspectAgentIntegrations:Wo,inspectSkills:zo,inspectStackSection:Ho,inspectStackSections:Fo,inspectSubsystems:qo,
850
- listStackPieces:Ko,listTemplates:Yo,parserEnvironment:zc,setCollaboration:Xo,setEngineeringProfile:Zo,syncAgentIntegrations:Jo,
851
- syncSkills:Qo,withTrustedGitRepository:ea,SOURCE_EXPLANATION_PROMPT_VERSION:Hc,sourceExplanationGuidance:Fc,validateArchitectureFacts:qc,
852
- mergeArchitectureObservations:Kc,validateCityDocument:Yc,validateCallWeb:Xc,CALL_WEB_SCHEMA:Zc,MACHINE_CITY_SCHEMA:Jc,PROGRAM_CITY_SCHEMA:Qc,
853
- CITY_SCHEMA_VERSION:eu}=ve;async function tu(e){let t=await Ro(e);return{[Co]:aa(),[No]:JSON.stringify({registryPath:t.registryPath}),
854
- GENESIS_TURN_CONTEXT_ENABLED:"0"}}var nu="genesis/blueprint.md",su="genesis/subsystems.md",ta=Object.freeze(["vue","djan\
855
- go-postgresql","jskit-postgresql","postgresql","rails-postgresql","spring-boot-postgresql"]),na=Object.freeze(["genesis-\
856
- stack"]),Ns=Object.freeze({BLUEPRINT_INVALID:"blueprint",BLUEPRINT_REQUIRED:"start"});if(!Array.isArray(Ds))throw new Error(
857
- "This genesis-compiler lists no prompt tasks. Update it to the release Vibe64 declares.");var Ps=new Set(Ds),Pt=15e3;function $t(e,t=Pt){
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){
858
860
  let n,s=new Promise((i,r)=>{n=setTimeout(()=>r(Object.assign(new Error(`Genesis did not answer within ${t} ms.`),{code:"\
859
- vibe64_genesis_timeout"})),t)});return Promise.race([Promise.resolve().then(e),s]).finally(()=>clearTimeout(n))}function sa(e,t={}){
860
- let{required:n=!1}=t,s=V(e);if(!s&&!n)return"";if(!Ps.has(s))throw new TypeError(s?`Unknown Genesis prompt task: ${s}.`:
861
- "Genesis prompt actions require an explicit task.");return s}function ia(e={}){return sa(e.genesisTask)||"work"}function ra(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={}){
862
864
  return[e.conversationRequest,e.feedback,e.request,e.plan,e.description,t.label].map(V).find(Boolean)||"Continue the requ\
863
- ested project work."}function oa(){let e=(Cs.resolve.paths("genesis-compiler")||[]).find(t=>Rs(W.join(t,"genesis-compile\
864
- r"))&&Rs(W.join(t,".bin","genesis")));if(!e)throw new Error("The installed Genesis compiler executable could not be loca\
865
- ted.");return W.join(e,".bin")}function $s(){let e=Cs.resolve("@local/vibe64-genesis/server");return W.resolve(W.dirname(
866
- e),"../../bin")}function aa(){return W.resolve($s(),"vibe64-genesis-host-context")}function iu(e=[]){let t=$s(),n=oa();return[
867
- ...(Array.isArray(e)?e:[]).filter(i=>![t,n].includes(V(i))),t]}function ca(e={},t={}){let{prompt:n=!1}=t;return{...e,...n?
868
- {hiddenStackPieces:ta}:{},stackPackages:na}}function ru(e={}){return z(Do,e)}async function ou(e={}){let t=await re(Ko,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);
869
871
  if(t.every(n=>Array.isArray(n?.resourceDeclarations)))return t;throw new Error("This genesis-compiler lists no Stack res\
870
- ource declarations. Update it to the release Vibe64 declares.")}function au(e={}){return z(xo,e)}function cu(e={}){return re(
871
- zo,e)}function uu(e={}){return z(Qo,e)}function lu(e={}){return z(Jo,e)}function pu(e={}){return re(Wo,e)}function du(e={}){
872
- return re(qo,e)}async function mu(e={}){return en(await oe(Yt,e))}async function hu(e={}){return sn(await oe(tn,e))}function fu(e={}){
873
- return z(Lo,e)}function ua(){let e=Mo();if(e?.contract!==P.derivedArtifacts)throw new Error(`Genesis returned ${e?.contract||
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||
874
876
  "no contract identity"}; expected ${P.derivedArtifacts}.`);let t=Array.isArray(e.artifacts)?e.artifacts:[];if(!t.length||
875
877
  t.some(n=>!V(n?.path)))throw new Error("Genesis returned an invalid derived-artifact contract.");return{...e,artifacts:t.
876
- map(n=>({...n}))}}var Ls=ua(),gu=Object.freeze(Ls.artifacts.map(e=>e.path)),Lt=new Map(Ls.artifacts.map(e=>[e.id,e])),la=Lt.
877
- get("machine-city")?.path,pa=Lt.get("program-city")?.path;if(!la||!pa)throw new Error("Genesis did not declare both City\
878
- projection artifacts.");var da=Lt.get("call-web")?.path;if(!da)throw new Error("Genesis did not declare its call-web ar\
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\
879
881
  tifact.");async function z(e,t={},n={}){let s=V(t.projectRoot);if(!s||!W.isAbsolute(s))throw new TypeError("Genesis oper\
880
- ations require an explicit absolute projectRoot.");return ea(s,()=>e(ca(t,n)))}function xs(){}function ma(e){return`Gene\
882
+ ations require an explicit absolute projectRoot.");return ia(s,()=>e(da(t,n)))}function Vs(){}function Ea(e){return`Gene\
881
883
  sis project guidance is unavailable for this conversation (${V(e?.message||e).replace(/\s+/gu," ").slice(0,300)||"no rea\
882
884
  son given"}). Work from the repository itself, where the genesis/ files still describe the project when present, and tel\
883
- l the user that Genesis guidance did not load if it matters to the request.`}async function Eu({workdir:e,promptContext:t},{
884
- onGenesisUnavailable:n=xs,timeoutMs:s=Pt}={}){let i=ue(t);if(t.scope==="ephemeral")return i;let r;try{let o=await $t(()=>z(
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(
885
887
  ve.projectSessionContext,{projectRoot:e,hostDriver:ue,hostDriverInput:t}),s);if(typeof o?.output=="string"&&o.output.trim())
886
- return o.output;r=new Error("Genesis returned no session guidance.")}catch(o){r=o}return n(r),`${ma(r)}
888
+ return o.output;r=new Error("Genesis returned no session guidance.")}catch(o){r=o}return n(r),`${Ea(r)}
887
889
 
888
- ${i}`}function re(e,t={}){return $t(()=>z(e,t))}function Vs(e,t){if(e?.contract!==t)throw new Error(`Genesis returned ${e?.
889
- contract||"no contract identity"}; expected ${t}.`);return e}async function K(e,t,n={}){return Vs(await re(e,n),t)}async function xt(e,t,n={}){
890
- return Vs(await z(e,n),t)}function oe(e,t={}){return K(n=>Ho({...n,name:e}),P.stackSection,t)}async function Vt(e,t={}){
891
- let n=await re(s=>Fo({...s,names:e}),t);if(!Array.isArray(n)||n.length!==e.length||n.some((s,i)=>s?.contract!==P.stackSection||
892
- s.name!==e[i]))throw new Error("Genesis returned an invalid Stack section inspection batch.");return n}async function bu(e={}){
893
- if((await ha(e)).status!=="current")throw Object.assign(new Error("The project needs a current Genesis format before its\
894
- Stack can be inspected."),{code:"vibe64_stack_format_required"});await Oo(W.join(e.projectRoot,rt),"utf8");let n=await oe(
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(
895
897
  be,e);return{components:n.components,stackHash:n.stackHash}}function Mt(e,t){return async(n={})=>{let[s,i]=await Promise.
896
- all([oe(e,n),K(Dt,P.environment,n)]);return t({environment:i,section:s})}}var yu=Mt($n,xn),vu=Mt(Bn,qn),Su=Mt(It,Rt);function wu(e={}){
897
- return z(ve.verify,e)}function _u(e={}){return K(Dt,P.environment,e)}function Iu(e={}){return K(Uo,P.projectInspection,e)}
898
- function Tu(e={}){return K(Yo,P.templates,e)}function ku(e={}){return xt(Po,P.templateApplication,e)}function Ou(e={}){return K(
899
- jo,P.engineering,e)}function Au(e={}){return K(Vo,P.collaboration,e)}async function Ru(e){let{unavailable:t,passes:n,master:s}=await K(
900
- Go,P.passes,e);return{unavailable:t,passes:n,master:s}}async function ha(e={}){let t=await re(Bo,e);if(!V(t?.status))throw new Error(
901
- "Genesis did not return a project-format status.");return{...t}}function Nu(e={}){return xt(Zo,P.engineering,e)}function Cu(e={}){
902
- return xt(Xo,P.collaboration,e)}async function Du({resourcesPreparing:e=!1,...t}={}){let[[n,s,i],r]=await Promise.all([Vt(
903
- [Ge,Ke,be],t),K(Dt,P.environment,t)]);return{...os({environment:r,section:n,resourcesPreparing:e===!0}),resourceEstimates:Ye(
904
- {section:s,outputsSection:n,workspaceSetupSection:i})}}async function Pu(e={}){let t=await oe(ks,e);return As({section:t})}
905
- async function $u(e={}){return Ht(await oe(Wt,e))}async function Lu(e={}){return us(await oe(as,e))}async function xu(e={}){
906
- let[t,n,s]=await Vt([be,Ke,Ge],e);return{...await Ss({projectRoot:e.projectRoot,section:t}),resourceEstimates:Ye({section:n,
907
- outputsSection:s,workspaceSetupSection:t})}}async function Vu(e={}){let[t,n,s]=await Vt([Ke,Ge,be],e);return Ye({section:t,
908
- outputsSection:n,workspaceSetupSection:s})}async function Mu({action:e={},environment:t,input:n={},onGenesisUnavailable:s=xs,
909
- projectRoot:i,timeoutMs:r=Pt}){let o=ia(e),c=ra(n,e),a=E=>z($o,{environment:t,projectRoot:i,request:c,sessionContextInstalled:!0,
910
- task:E},{prompt:!0}),u=async()=>{try{return{result:await a(o),task:o}}catch(E){let I=Object.hasOwn(Ns,String(E?.code))?Ns[E.
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.
911
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.
912
914
  result?.prompt!="string"||!l.result.prompt.trim())throw new Error("Genesis returned no prompt.")}catch(E){return s(E),{prompt:c}}
913
- let{result:d,task:p}=l,g=Ps.has(V(d.task))?V(d.task):p;return{context:{genesis:!0,requestedTask:o,task:g,verificationCommands:d.
914
- verificationCommands,warnings:d.warnings},originalPrompt:c,prompt:d.prompt,promptId:V(e.promptId||e.id)||g}}export{Zc as CALL_WEB_SCHEMA,eu as CITY_SCHEMA_VERSION,nu as GENESIS_BLUEPRINT_PATH,da as GENESIS_CALL_WEB_PATH,gu as GENESIS_DERIVED_ARTIFACT_PATHS,
915
- la as GENESIS_MACHINE_CITY_PATH,pa as GENESIS_PROGRAM_CITY_PATH,rt as GENESIS_STACK_PATH,rn as GENESIS_STACK_SECTION_AMBIGUOUS,
916
- su as GENESIS_SUBSYSTEMS_PATH,Pt as GENESIS_USER_PATH_TIMEOUT_MS,Jc as MACHINE_CITY_SCHEMA,Qc as PROGRAM_CITY_SCHEMA,Hc as SOURCE_EXPLANATION_PROMPT_VERSION,
917
- q as STAGING_DATA_ENTRY_FORMS,de as STAGING_DATA_MODES,Pn as VIBE64_APPLICATION_DEPLOYMENT_CONTRACT,Xi as VIBE64_APPLICATION_DEPLOYMENT_V1_CONTRACT,
918
- Ve as VIBE64_PACKAGING_CONTRACT,fe as VIBE64_PREVIEW_IDENTITY_COMMAND_PROTOCOL,ds as VIBE64_STAGING_DATA_CONTRACT,It as VIBE64_STAGING_DATA_SECTION,
919
- ru as addGenesisStack,ku as applyGenesisTemplate,sa as assertGenesisPromptTask,$s as genesisCommandShimDirectory,oa as genesisPackageBinDirectory,
920
- zc as genesisParserEnvironment,mi as genesisProjectContractNeedsAttention,gi as genesisProjectFileDiagnostic,fi as genesisProjectFileUnreadable,
921
- ra as genesisPromptRequest,ia as genesisPromptTask,au as initializeGenesisProject,pu as inspectGenesisAgentIntegrations,
922
- Au as inspectGenesisCollaboration,ua as inspectGenesisDerivedArtifacts,Ou as inspectGenesisEngineering,_u as inspectGenesisEnvironment,
923
- Iu as inspectGenesisProject,ha as inspectGenesisProjectFormat,cu as inspectGenesisSkills,bu as inspectGenesisStackComponents,
924
- du as inspectGenesisSubsystems,mu as inspectVibe64ArchitectureInspection,hu as inspectVibe64ArchitectureLayout,$u as inspectVibe64ConnectedDevelopment,
925
- yu as inspectVibe64Deployment,Pu as inspectVibe64IntegrationSetup,Du as inspectVibe64Outputs,vu as inspectVibe64Packaging,
926
- Lu as inspectVibe64ProjectServices,Vu as inspectVibe64ResourceEstimates,Su as inspectVibe64StagingData,xu as inspectVibe64WorkspaceSetup,
927
- Ru as listGenesisPasses,ou as listGenesisStackPieces,Tu as listGenesisTemplates,Kc as mergeArchitectureObservations,Zi as parseVibe64DeploymentLines,
928
- Os as parseVibe64IntegrationSetupLines,Be as parseVibe64OutputsLines,Hn as parseVibe64PackagingLines,cs as parseVibe64ProjectServicesLines,
929
- Ts as parseVibe64ResourceEstimatesLines,fo as parseVibe64StagingDataLines,qe as parseVibe64WorkspaceSetupLines,ui as readArchitecturePreviewLocator,
930
- fu as refreshGenesisCities,Mu as renderGenesisPrompt,Or as resolveVibe64OutputParameters,Fn as resolveVibe64PackagingEnvironment,
931
- Cu as setGenesisCollaboration,Nu as setGenesisEngineeringProfile,Fc as sourceExplanationGuidance,lu as syncGenesisAgentIntegrations,
932
- uu as syncGenesisSkills,qc as validateArchitectureFacts,Xc as validateCallWeb,Yc as validateCityDocument,wu as verifyGenesisProject,
933
- Eu as vibe64ConversationInstructions,ue as vibe64Driver,tu as vibe64HostContextEnvironment,Ro as vibe64HostContextRegistry,
934
- aa as vibe64HostContextResolverPath,Rt as vibe64StagingDataInspection,iu as withGenesisCommandShim,$t as withinGenesisDeadline};
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};