vibe64 0.1.65 → 0.1.67

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 (153) hide show
  1. package/bin/run.js +2004 -1363
  2. package/bin/server.js +282 -276
  3. package/bin/upgrade-state.js +4673 -4470
  4. package/dist/assets/{GithubBrowserTabs-D21Nl3QI.js → GithubBrowserTabs-CW3GBeJu.js} +1 -1
  5. package/dist/assets/{LocalDatabaseServer-POxY1K1U.js → LocalDatabaseServer-DYh3UF9q.js} +1 -1
  6. package/dist/assets/{SelectField-Dezd0B3y.js → SelectField-Df50ZFLj.js} +1 -1
  7. package/dist/assets/{ShellOutlet-DfF9vsWA.js → ShellOutlet-DkLdtzJW.js} +1 -1
  8. package/dist/assets/{Vibe64AuthSettingsButton-I3ufyScN.js → Vibe64AuthSettingsButton-Cksj7FS6.js} +1 -1
  9. package/dist/assets/{Vibe64AuthSettingsButton-DFfFPrd7.css → Vibe64AuthSettingsButton-DfKYI6ZS.css} +1 -1
  10. package/dist/assets/{Vibe64ConversationLog-C04oOQ2g.js → Vibe64ConversationLog-BC0eDtUP.js} +1 -1
  11. package/dist/assets/{Vibe64DashboardShell-BbrOUmRD.js → Vibe64DashboardShell-DX5dOXAB.js} +1 -1
  12. package/dist/assets/{Vibe64DatabaseWorkspace-VPEM2o1v.js → Vibe64DatabaseWorkspace-8i-RDc9y.js} +1 -1
  13. package/dist/assets/{Vibe64FileArea-C_nC2bPk.js → Vibe64FileArea-EK5yUio3.js} +1 -1
  14. package/dist/assets/{Vibe64OutputControls-DTO3Fw3x.js → Vibe64OutputControls--LB4G83q.js} +1 -1
  15. package/dist/assets/{Vibe64RepositoryWorkspace-B8xcCOvL.js → Vibe64RepositoryWorkspace-D6uJCype.js} +1 -1
  16. package/dist/assets/{Vibe64SessionFiles-Cb9Mxsyq.js → Vibe64SessionFiles-DVHGc7hd.js} +1 -1
  17. package/dist/assets/{Vibe64SessionSourceEditor-CVQ3NRjh.js → Vibe64SessionSourceEditor-Bws5ihr-.js} +1 -1
  18. package/dist/assets/{Vibe64UiStoryboardView-BV4JFgcZ.js → Vibe64UiStoryboardView-BmABkyG4.js} +1 -1
  19. package/dist/assets/{Vibe64UnavailableSessions-DGQAxYE-.js → Vibe64UnavailableSessions-C6Bkwsqk.js} +1 -1
  20. package/dist/assets/{_pageId_-CkG15vv4.js → _pageId_-FjW-3sqF.js} +1 -1
  21. package/dist/assets/{_sessionId_-Bka3RUmK.js → _sessionId_-4cH83Bfi.js} +1 -1
  22. package/dist/assets/_slug_-Cazfy5ui.js +14 -0
  23. package/dist/assets/_slug_-DQDycgFK.css +1 -0
  24. package/dist/assets/{access-Xo3unxGO.js → access-mxcxtn7b.js} +1 -1
  25. package/dist/assets/{app-B0spNegd.js → app-8zP_FAuO.js} +1 -1
  26. package/dist/assets/assistantRouting-Bbxguvre.js +3 -0
  27. package/dist/assets/{changes-DFv4tuoO.js → changes-cmlEyHug.js} +1 -1
  28. package/dist/assets/{client-4uCr4dYG.js → client-BJBzomgt.js} +1 -1
  29. package/dist/assets/{client-CVuXqm4b.js → client-C1i-bIgL.js} +1 -1
  30. package/dist/assets/{client-Dlg1kjjO.js → client-C7yZ1hEm.js} +1 -1
  31. package/dist/assets/{client-CevjVK2b.js → client-CQ49uWhR.js} +1 -1
  32. package/dist/assets/{client-DR0w56e8.js → client-D46Uu-YO.js} +2 -2
  33. package/dist/assets/{client-BjMjS6lX.js → client-DKNTl1to.js} +2 -2
  34. package/dist/assets/{conversation-OkWbkHjm.js → conversation-CFJRkeTj.js} +3 -3
  35. package/dist/assets/{conversation-DReMq0MF.css → conversation-COcuIkcD.css} +1 -1
  36. package/dist/assets/conversation-CexAK3Qk.js +1 -0
  37. package/dist/assets/{dashboard-CAca9MQn.js → dashboard-CMtWKazq.js} +1 -1
  38. package/dist/assets/{english-definitions-BtX8KA5g.js → english-definitions-DiyU9O9D.js} +1 -1
  39. package/dist/assets/{env-DrNyBVkB.js → env-LUc22Wgd.js} +1 -1
  40. package/dist/assets/{error-BqMxhgpB.js → error-BccdQn04.js} +1 -1
  41. package/dist/assets/{error-BQ7r64JO.js → error-DPDAz9Td.js} +1 -1
  42. package/dist/assets/{errorMessageHelpers-B49LyMJi.js → errorMessageHelpers-G32Hjqfm.js} +1 -1
  43. package/dist/assets/{health-B5yTW5Tt.js → health-CfMjMJFf.js} +1 -1
  44. package/dist/assets/{history-S3anp6xg.js → history-hX_kNskf.js} +1 -1
  45. package/dist/assets/{httpClient-Bwitq9Xf.js → httpClient-C71X5grL.js} +1 -1
  46. package/dist/assets/{i18n-BuXRXGaO.js → i18n-5EHeMSvt.js} +1 -1
  47. package/dist/assets/{i18n-DQPYjuW7.js → i18n-BSfPKqM3.js} +1 -1
  48. package/dist/assets/{i18n-Dm74yE_M.js → i18n-Dq-ep9n7.js} +1 -1
  49. package/dist/assets/index-BJWiPV6i.css +1 -0
  50. package/dist/assets/index-FVeEbKiO.js +134 -0
  51. package/dist/assets/{integrations-C7dj7el_.js → integrations-Ccb8EOEO.js} +14 -15
  52. package/dist/assets/{integrations-CwgrZgmM.css → integrations-CtnIjM1Y.css} +1 -1
  53. package/dist/assets/{issues-OkV4v4GX.js → issues-Bxtt7oqi.js} +1 -1
  54. package/dist/assets/{learning-lW9nBGjT.js → learning-BUx9jo91.js} +1 -1
  55. package/dist/assets/{pages-shOT9IVe.js → pages-D43zM2UW.js} +1 -1
  56. package/dist/assets/{project-files-D_K1N0JF.js → project-files-BX3zZCcl.js} +1 -1
  57. package/dist/assets/{publish-Bxe4ZCqe.js → publish-DatierL2.js} +1 -1
  58. package/dist/assets/{pull-requests-CQvk0TeH.js → pull-requests-DNkOjcuy.js} +1 -1
  59. package/dist/assets/{repository-CI2CqDwF.js → repository-0EKOcyTL.js} +1 -1
  60. package/dist/assets/{settings-DIVrFrs4.js → settings-DbR9JIc3.js} +1 -1
  61. package/dist/assets/{studioGateApi-UqmdV50W.js → studioGateApi-B9EUTtMx.js} +1 -1
  62. package/dist/assets/{studioUrls-k_pQIuPs.js → studioUrls-BR4ZL-TN.js} +1 -1
  63. package/dist/assets/{useArchivedVibe64Sessions-BkWrTOzg.js → useArchivedVibe64Sessions-B8VDhA9F.js} +1 -1
  64. package/dist/assets/useAssistantAttachments-C9kAnWqw.js +2 -0
  65. package/dist/assets/useCommand-CfqxMb4C.js +1 -0
  66. package/dist/assets/{useEndpointResource-DZTjr9gg.js → useEndpointResource-BwGXpV2u.js} +1 -1
  67. package/dist/assets/{useUiFeedback-BU4NyMq8.js → useUiFeedback-8Wvg7A_S.js} +1 -1
  68. package/dist/assets/{useVibe64ConversationLog-BADhWyNY.js → useVibe64ConversationLog-7wgLlKG5.js} +2 -2
  69. package/dist/assets/useVibe64Learning-DkneotqS.js +5 -0
  70. package/dist/assets/{useVibe64SessionData-DvFvAJC-.js → useVibe64SessionData-DuJ-dHR8.js} +1 -1
  71. package/dist/assets/{useVibe64SessionSelection-BukDTAxb.js → useVibe64SessionSelection-BwjtqeIR.js} +1 -1
  72. package/dist/assets/{vibe64FileUpload-BDkcaUyk.js → vibe64FileUpload-D_rOa1R8.js} +1 -1
  73. package/dist/assets/{vibe64RepositoryRealtime-DX2DEqIz.js → vibe64RepositoryRealtime-CVGNqwxz.js} +1 -1
  74. package/dist/assets/vibe64SavedEnvValues-CCZew0j7.js +1 -0
  75. package/dist/assets/{vibe64SessionFocus-CzuP3qPT.js → vibe64SessionFocus-B4diopOJ.js} +1 -1
  76. package/dist/index.html +23 -23
  77. package/docs/colleague-usage/ai-accounts.md +7 -7
  78. package/docs/colleague-usage/ai-model-setups.md +1 -1
  79. package/docs/colleague-usage/ai-tasks.md +2 -1
  80. package/docs/colleague-usage/auto-workflow.md +67 -44
  81. package/docs/colleague-usage/chat-settings.md +115 -114
  82. package/docs/colleague-usage/coding-agent-goal-pause.md +34 -12
  83. package/docs/colleague-usage/coding-agent-goals.md +33 -16
  84. package/docs/colleague-usage/coding-agent-history.md +9 -0
  85. package/docs/colleague-usage/coding-agent-questions.md +7 -0
  86. package/docs/colleague-usage/coding-agent-recovery.md +3 -0
  87. package/docs/colleague-usage/coding-agents.md +10 -4
  88. package/docs/colleague-usage/connected-repositories.md +4 -1
  89. package/docs/colleague-usage/developing-vibe64.md +11 -5
  90. package/docs/colleague-usage/development-env.md +74 -32
  91. package/docs/colleague-usage/github-work.md +39 -5
  92. package/docs/colleague-usage/integrations.md +2 -2
  93. package/docs/colleague-usage/main-chat-approvals.md +7 -6
  94. package/docs/colleague-usage/message-delivery-recovery.md +1 -1
  95. package/docs/colleague-usage/passes.md +260 -0
  96. package/docs/colleague-usage/plans.md +27 -16
  97. package/docs/colleague-usage/session-timeline.md +93 -0
  98. package/docs/colleague-usage/temporary-chats.md +6 -0
  99. package/docs/colleague-usage/ui-pass.md +30 -32
  100. package/docs/colleague-usage/workspace-preparation.md +51 -0
  101. package/node_modules/@jskit-ai/assistant-core/CHANGELOG.md +12 -0
  102. package/node_modules/@jskit-ai/assistant-core/locales/en.json +2 -0
  103. package/node_modules/@jskit-ai/assistant-core/package.json +1 -1
  104. package/node_modules/@jskit-ai/assistant-runtime/CHANGELOG.md +5 -0
  105. package/node_modules/@jskit-ai/assistant-runtime/package.json +1 -1
  106. package/node_modules/@jskit-ai/assistant-voice/package.json +1 -1
  107. package/node_modules/@jskit-ai/connector-google-calendar/CHANGELOG.md +1 -0
  108. package/node_modules/@jskit-ai/connector-google-calendar/package.json +1 -1
  109. package/node_modules/@jskit-ai/connector-google-calendar/patterns/calendar-cli/example/.env.example +1 -0
  110. package/node_modules/@jskit-ai/connectors-catalog/CHANGELOG.md +1 -0
  111. package/node_modules/@jskit-ai/connectors-catalog/package.json +1 -1
  112. package/node_modules/@jskit-ai/connectors-catalog/patterns/api-key-connection/PATTERN.md +4 -1
  113. package/node_modules/@jskit-ai/connectors-catalog/patterns/oauth-connection/PATTERN.md +3 -1
  114. package/node_modules/@jskit-ai/connectors-core/CHANGELOG.md +1 -0
  115. package/node_modules/@jskit-ai/connectors-core/README.md +3 -1
  116. package/node_modules/@jskit-ai/connectors-core/package.json +1 -1
  117. package/node_modules/@jskit-ai/http-runtime/CHANGELOG.md +1 -0
  118. package/node_modules/@jskit-ai/http-runtime/package.json +1 -1
  119. package/node_modules/@jskit-ai/kernel/CHANGELOG.md +6 -0
  120. package/node_modules/@jskit-ai/kernel/package.json +3 -4
  121. package/node_modules/@jskit-ai/payments-core/CHANGELOG.md +1 -0
  122. package/node_modules/@jskit-ai/payments-core/locales/en.json +1 -1
  123. package/node_modules/@jskit-ai/payments-core/package.json +1 -1
  124. package/node_modules/@jskit-ai/realtime/CHANGELOG.md +1 -0
  125. package/node_modules/@jskit-ai/realtime/package.json +1 -1
  126. package/node_modules/@jskit-ai/realtime/patterns/realtime-application/example/.env.example +1 -0
  127. package/node_modules/@jskit-ai/resource-core/package.json +1 -1
  128. package/node_modules/@jskit-ai/uploads-runtime/package.json +1 -1
  129. package/node_modules/@local/vibe64-core/package.json +2 -0
  130. package/node_modules/@local/vibe64-execution/package.json +1 -0
  131. package/node_modules/@local/vibe64-execution/src/host/execHelper.js +715 -666
  132. package/node_modules/@local/vibe64-genesis/bin/vibe64-genesis-host-context +989 -847
  133. package/node_modules/@local/vibe64-genesis/src/server/agentSpecs.js +129 -107
  134. package/node_modules/@local/vibe64-genesis/src/server/index.js +632 -614
  135. package/node_modules/@local/vibe64-genesis/src/server/packaging.js +27 -28
  136. package/node_modules/@local/vibe64-genesis/src/server/promptContext.js +172 -162
  137. package/node_modules/@local/vibe64-runtime/package.json +1 -0
  138. package/node_modules/@local/vibe64-runtime/src/server/codexAppServerProcess.js +1042 -898
  139. package/node_modules/@local/vibe64-terminals/package.json +2 -1
  140. package/node_modules/@local/vibe64-terminals/src/server/opencodeSessionEnvironmentPlugin.js +560 -420
  141. package/node_modules/@local/vibe64-terminals/src/server/sessionWorkOperationCommand.js +586 -581
  142. package/package.json +15 -15
  143. package/server.bundle.mjs +44592 -44103
  144. package/dist/assets/_slug_-7Oo7pGKn.js +0 -14
  145. package/dist/assets/_slug_-BaxjtsgP.css +0 -1
  146. package/dist/assets/assistantRouting-B9cub38g.js +0 -3
  147. package/dist/assets/conversation-D7T_us2O.js +0 -1
  148. package/dist/assets/index-DSyb-mRJ.css +0 -1
  149. package/dist/assets/index-JBqyg0mr.js +0 -134
  150. package/dist/assets/useAssistantAttachments-DqlNFiha.js +0 -2
  151. package/dist/assets/useCommand-D-MIMmhp.js +0 -1
  152. package/dist/assets/useVibe64Learning-CbsI-XHB.js +0 -5
  153. package/dist/assets/vibe64SavedEnvValues-CgfMvj_h.js +0 -1
@@ -1,110 +1,113 @@
1
1
  import { createRequire as __vibe64CreateRequire } from 'node:module';const require=__vibe64CreateRequire(import.meta.url);
2
- import{createHash as Cn}from"node:crypto";import Te from"node:path";var ae=class extends Error{constructor(n,t,s=void 0){
3
- super(t),this.name="Vibe64StackOperationError",this.code=n,s!==void 0&&(this.details=s)}},it=Object.freeze({VIBE64_WORKSPACE_SETUP_INVALID:"\
2
+ import{createHash as $n}from"node:crypto";import Oe from"node:path";var ae=class extends Error{constructor(n,t,s=void 0){
3
+ super(t),this.name="Vibe64StackOperationError",this.code=n,s!==void 0&&(this.details=s)}},ct=Object.freeze({VIBE64_WORKSPACE_SETUP_INVALID:"\
4
4
  workspace-setup",VIBE64_OUTPUTS_INVALID:"outputs",VIBE64_DEPLOYMENT_INVALID:"deployment",VIBE64_PACKAGING_INVALID:"packa\
5
5
  ging",VIBE64_RESOURCE_ESTIMATES_INVALID:"resource-estimates",VIBE64_CONNECTED_DEVELOPMENT_INVALID:"connected-development",
6
6
  VIBE64_PROJECT_SERVICES_INVALID:"project-services",VIBE64_INTEGRATION_SETUP_INVALID:"integration-setup",VIBE64_ARCHITECTURE_INSPECTION_INVALID:"\
7
- architecture-inspection",VIBE64_ARCHITECTURE_LAYOUT_INVALID:"architecture-layout"}),Pn=/ Exact grammar: vibe64-helper spec [a-z-]+\.$/u;
8
- function Dn(e,n){let t=it[e],s=String(n).replace(Pn,"");return t?`${s} Exact grammar: vibe64-helper spec ${t}.`:s}function D(e,n,t){
9
- return`Unknown ${e}: ${n}. Use one of: ${t.join("; ")}.`}function d(e,n,t,s,r={}){throw new ae(e,Dn(e,t),{path:n,...s===
10
- void 0?{}:{line:s},...r})}function v(e,n,t,s,r){return(typeof e!="string"||!e.trim()||/[\0\r\n]/u.test(e))&&d(n,t,`${s} \
11
- must be one non-empty line.`,r),e.trim()}function $n(e){let n=[...String(e||"").matchAll(/`([^`\r\n]+)`/gu)];return n.length===
12
- 0||n.map(t=>t[0]).join(" ")!==e?null:n.map(t=>t[1])}function I(e,n,t,s,r,i={}){let{count:o,maximum:c=64}=i,a=$n(e);if(!a||
13
- a.length>c||o!==void 0&&a.length!==o||a.some(u=>u.length>4096||/[\0\r\n]/u.test(u))){let u=o===void 0?"separate non-empt\
14
- y":`exactly ${o}`;d(n,t,`${s} must contain ${u} backticked ${o===1?"value":"values"}.`,r)}return a}function Vn(e=""){return typeof e==
15
- "string"&&!!e&&!/[\s\0{}]/u.test(e)&&!Te.isAbsolute(e)&&!e.split(/[\\/]/u).includes("..")}function A(e,n,t,s,r){let i=I(
16
- e,n,t,s,r);return Vn(i[0])||d(n,t,`${s} must begin with a safe executable.`,r),i}function xn(e=""){return typeof e=="str\
17
- ing"&&!!e&&!/[\0\r\n\\]/u.test(e)&&!Te.posix.isAbsolute(e)&&Te.posix.normalize(e)===e&&!e.split("/").some(n=>!n||n==="..")}
18
- function b(e,n,t,s,r,i={}){let{allowRoot:o=!0}=i;return(!xn(e)||!o&&e===".")&&d(n,t,`${s} must be a canonical project-re\
19
- lative path.`,r),e}function N(e,n,t,s,r){let i=I(e,n,t,s,r);return i.some(o=>!/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(o))&&d(
20
- n,t,`${s} must use lowercase technology ids separated into backticked values.`,r),new Set(i).size!==i.length&&d(n,t,`${s}\
21
- contains a duplicate technology id.`,r),i}function _e(e,n,t,s,r){let i=v(e,n,t,s,r);return(!i.startsWith("/")||i.startsWith(
22
- "//")||/[\\?#]/u.test(i))&&d(n,t,`${s} must begin with one slash and contain no query or fragment.`,r),i}function ce(e,n,t,s,r){
23
- let i=e.match(/^- Ready when: `GET` `([^`\r\n]+)` returns `([0-9]{3})`$/u);i||d(n,t,`${s} must use \`- Ready when: \`GET\` \
24
- \`/path\` returns \`200\`\`.`,r);let o=Number(i[2]);return(!Number.isInteger(o)||o<200||o>399)&&d(n,t,`${s} status must \
25
- be from 200 through 399.`,r),{kind:"http",method:"GET",path:_e(i[1],n,t,`${s} path`,r),status:o}}var jn=/^with (.+?):[ \t]+(.+)$/u,
26
- Ln=/^(.*?)[ \t]+when `([^`\r\n]+)` exists$/u,Mn=/^(.*?)[ \t]+if `([^`\r\n]+)` exists$/u,Gn=/^(.*?)[ \t]+in `([^`\r\n]+)`$/u;
27
- function ue(e,n,t,s,r,{form:i,observed:o=e}){let c=String(e||"").match(jn);c||d(n,t,`Every ${s} entry must use: ${i}`,r,
28
- {observed:o});let a=c[1].match(Ln),u=a?null:c[1].match(Mn),p=a?a[1]:u?u[1]:c[1],m=a?.[2]||u?.[2]||"",l=p.match(Gn);return{
29
- argv:A(c[2],n,t,`${s} command`,r),runtimeRequirements:N(l?l[1]:p,n,t,`${s} runtimes`,r),workdir:b(l?l[2]:".",n,t,`${s} w\
30
- orkdir`,r),...m?{condition:{pathExists:b(m,n,t,`${s} condition path`,r,{allowRoot:!1}),onMissing:a?"wait":"skip"}}:{}}}function ke(e){
31
- return Array.isArray(e)?e.map(ke):e&&typeof e=="object"?Object.fromEntries(Object.keys(e).sort().map(n=>[n,ke(e[n])])):e}
32
- function R(e){let n=`${JSON.stringify(ke(e),null,2)}
33
- `;return`sha256:${Cn("sha256").update(n).digest("hex")}`}function H(e={},n={},t="operation"){if(e.stackHash!==n.stackHash)
34
- throw new ae("VIBE64_STACK_CHANGED",`The Stack changed while Vibe64 inspected its ${t}. Retry the operation.`)}function z(e=[]){
35
- return[...new Set(e)].sort()}function w(e=[]){let n=e.map(t=>t.trim()).filter(Boolean);return n.length===1&&n[0]==="- No\
36
- thing."}var yi=Object.freeze({SPEC_BY_ERROR_CODE:it});var Un="custom";var Bn=Object.freeze([Object.freeze({value:"npm",label:"npm (Node.js)"}),Object.freeze({value:"composer",label:"Composer\
7
+ architecture-inspection",VIBE64_ARCHITECTURE_LAYOUT_INVALID:"architecture-layout"}),Vn=/ Exact grammar: vibe64-helper spec [a-z-]+\.$/u;
8
+ function xn(e,n){let t=ct[e],s=String(n).replace(Vn,"");return t?`${s} Exact grammar: vibe64-helper spec ${t}.`:s}function D(e,n,t){
9
+ return`Unknown ${e}: ${n}. Use one of: ${t.join("; ")}.`}function d(e,n,t,s,i={}){throw new ae(e,xn(e,t),{path:n,...s===
10
+ void 0?{}:{line:s},...i})}function v(e,n,t,s,i){return(typeof e!="string"||!e.trim()||/[\0\r\n]/u.test(e))&&d(n,t,`${s} \
11
+ must be one non-empty line.`,i),e.trim()}function jn(e){let n=[...String(e||"").matchAll(/`([^`\r\n]+)`/gu)];return n.length===
12
+ 0||n.map(t=>t[0]).join(" ")!==e?null:n.map(t=>t[1])}function w(e,n,t,s,i,r={}){let{count:o,maximum:u=64}=r,a=jn(e);if(!a||
13
+ a.length>u||o!==void 0&&a.length!==o||a.some(c=>c.length>4096||/[\0\r\n]/u.test(c))){let c=o===void 0?"separate non-empt\
14
+ y":`exactly ${o}`;d(n,t,`${s} must contain ${c} backticked ${o===1?"value":"values"}.`,i)}return a}function Ln(e=""){return typeof e==
15
+ "string"&&!!e&&!/[\s\0{}]/u.test(e)&&!Oe.isAbsolute(e)&&!e.split(/[\\/]/u).includes("..")}function N(e,n,t,s,i){let r=w(
16
+ e,n,t,s,i);return Ln(r[0])||d(n,t,`${s} must begin with a safe executable.`,i),r}function Mn(e=""){return typeof e=="str\
17
+ ing"&&!!e&&!/[\0\r\n\\]/u.test(e)&&!Oe.posix.isAbsolute(e)&&Oe.posix.normalize(e)===e&&!e.split("/").some(n=>!n||n==="..")}
18
+ function b(e,n,t,s,i,r={}){let{allowRoot:o=!0}=r;return(!Mn(e)||!o&&e===".")&&d(n,t,`${s} must be a canonical project-re\
19
+ lative path.`,i),e}function ce(e,n,t,s,i){let r=w(e,n,t,s,i);return r.some(o=>o.startsWith("/")||o.includes("\\")||o.includes(
20
+ "***")||/[?[\]{}!]/u.test(o)||o.split("/").some(u=>!u||[".",".."].includes(u)))&&d(n,t,`${s} must be canonical project-r\
21
+ elative globs using only * and ** wildcards.`,i),new Set(r).size!==r.length&&d(n,t,`${s} must name each path once.`,i),r}
22
+ function C(e,n,t,s,i){let r=w(e,n,t,s,i);return r.some(o=>!/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(o))&&d(n,t,`${s} must use \
23
+ lowercase technology ids separated into backticked values.`,i),new Set(r).size!==r.length&&d(n,t,`${s} contains a duplic\
24
+ ate technology id.`,i),r}function Re(e,n,t,s,i){let r=v(e,n,t,s,i);return(!r.startsWith("/")||r.startsWith("//")||/[\\?#]/u.
25
+ test(r))&&d(n,t,`${s} must begin with one slash and contain no query or fragment.`,i),r}function ue(e,n,t,s,i){let r=e.match(
26
+ /^- Ready when: `GET` `([^`\r\n]+)` returns `([0-9]{3})`$/u);r||d(n,t,`${s} must use \`- Ready when: \`GET\` \`/path\` return\
27
+ s \`200\`\`.`,i);let o=Number(r[2]);return(!Number.isInteger(o)||o<200||o>399)&&d(n,t,`${s} status must be from 200 thro\
28
+ ugh 399.`,i),{kind:"http",method:"GET",path:Re(r[1],n,t,`${s} path`,i),status:o}}var Gn=/^with (.+?):[ \t]+(.+)$/u,Un=/^(.*?)[ \t]+when `([^`\r\n]+)` exists$/u,
29
+ Bn=/^(.*?)[ \t]+if `([^`\r\n]+)` exists$/u,Wn=/^(.*?)[ \t]+in `([^`\r\n]+)`$/u;function pe(e,n,t,s,i,{form:r,observed:o=e}){
30
+ let u=String(e||"").match(Gn);u||d(n,t,`Every ${s} entry must use: ${r}`,i,{observed:o});let a=u[1].match(Un),c=a?null:u[1].
31
+ match(Bn),p=a?a[1]:c?c[1]:u[1],m=a?.[2]||c?.[2]||"",l=p.match(Wn);return{argv:N(u[2],n,t,`${s} command`,i),runtimeRequirements:C(
32
+ l?l[1]:p,n,t,`${s} runtimes`,i),workdir:b(l?l[2]:".",n,t,`${s} workdir`,i),...m?{condition:{pathExists:b(m,n,t,`${s} con\
33
+ dition path`,i,{allowRoot:!1}),onMissing:a?"wait":"skip"}}:{}}}function Ae(e){return Array.isArray(e)?e.map(Ae):e&&typeof e==
34
+ "object"?Object.fromEntries(Object.keys(e).sort().map(n=>[n,Ae(e[n])])):e}function A(e){let n=`${JSON.stringify(Ae(e),null,
35
+ 2)}
36
+ `;return`sha256:${$n("sha256").update(n).digest("hex")}`}function z(e={},n={},t="operation"){if(e.stackHash!==n.stackHash)
37
+ throw new ae("VIBE64_STACK_CHANGED",`The Stack changed while Vibe64 inspected its ${t}. Retry the operation.`)}function F(e=[]){
38
+ return[...new Set(e)].sort()}function S(e=[]){let n=e.map(t=>t.trim()).filter(Boolean);return n.length===1&&n[0]==="- No\
39
+ thing."}var Tr=Object.freeze({SPEC_BY_ERROR_CODE:ct});var Hn="custom";var zn=Object.freeze([Object.freeze({value:"npm",label:"npm (Node.js)"}),Object.freeze({value:"composer",label:"Composer\
37
40
  (PHP)"}),Object.freeze({value:"pip",label:"pip (Python)"}),Object.freeze({value:"bundler",label:"Bundler (Ruby)"}),Object.
38
41
  freeze({value:"gomod",label:"Go modules"}),Object.freeze({value:"cargo",label:"Cargo (Rust)"}),Object.freeze({value:"mav\
39
42
  en",label:"Maven"}),Object.freeze({value:"gradle",label:"Gradle"}),Object.freeze({value:"nuget",label:"NuGet (.NET)"}),Object.
40
- freeze({value:Un,label:"custom"})]);var ot=Object.freeze(Bn.map(e=>e.value));function at(e){return typeof e=="string"&&ot.includes(e)}function ct(e="or"){let n=ot;return`${n.slice(0,-1).join(", ")} ${e} ${n.at(-1)}`}var ut="Connected development",Wn="vibe64.connected-development.v1",$="VIBE64_CONNECTED_DEVELOPMENT_INVALID",V="genesis/\
41
- stack.md#Connected development",Oe="with `runtime` [in `workdir`]: `command` `argument`...",pt=Object.freeze({Prepare:`-\
42
- Prepare \`label\` ${Oe}`,Verify:`- Verify \`label\` ${Oe}`,"Custom runner":`- Custom runner ${Oe}`}),Hn=Object.freeze([
43
- "- Default package type: `type`","- Sources file: `path`",...Object.values(pt)]),zn=/^- (Prepare|Verify) `([^`\r\n]+)` (.+)$/u,
44
- Fn=/^- Custom runner (.+)$/u,qn="Custom connected source";function lt(e={}){let n="",t="",s=null,r=[],i=[...e.diagnostics||
45
- []],o=e.status==="ready";if(o&&!w(e.lines)){let a=!1;for(let[p,m]of e.lines.entries()){let l=m.trim();if(!l)continue;let f=p+
46
- 1,g=l.match(/^- Default package type: `([^`\r\n]*)`$/u);if(g){t&&d($,V,"Declare exactly one default package type.",f),at(
47
- g[1])||d($,V,`Default package type must be ${ct()}.`,f),t=g[1];continue}let S=l.match(/^- Sources file: `([^`\r\n]+)`$/u);
48
- if(S){n&&d($,V,"Declare exactly one Sources file.",f),n=b(S[1],$,V,"Connected sources file",f,{allowRoot:!1}),n.split("/").
49
- some(Nn=>Nn.toLowerCase()===".git")&&d($,V,"The Sources file must be outside Git metadata.",f);continue}let _=l.match(Fn),
50
- P=_?null:l.match(zn);!_&&!P&&d($,V,D("Connected development entry",l,Hn),f);let Y=_?"Custom runner":P[1],Q=Y==="Verify"?
43
+ freeze({value:Hn,label:"custom"})]);var ut=Object.freeze(zn.map(e=>e.value));function pt(e){return typeof e=="string"&&ut.includes(e)}function lt(e="or"){let n=ut;return`${n.slice(0,-1).join(", ")} ${e} ${n.at(-1)}`}var dt="Connected development",Fn="vibe64.connected-development.v1",$="VIBE64_CONNECTED_DEVELOPMENT_INVALID",V="genesis/\
44
+ stack.md#Connected development",Ne="with `runtime` [in `workdir`]: `command` `argument`...",mt=Object.freeze({Prepare:`-\
45
+ Prepare \`label\` ${Ne}`,Verify:`- Verify \`label\` ${Ne}`,"Custom runner":`- Custom runner ${Ne}`}),qn=Object.freeze([
46
+ "- Default package type: `type`","- Sources file: `path`",...Object.values(mt)]),Kn=/^- (Prepare|Verify) `([^`\r\n]+)` (.+)$/u,
47
+ Yn=/^- Custom runner (.+)$/u,Xn="Custom connected source";function ht(e={}){let n="",t="",s=null,i=[],r=[...e.diagnostics||
48
+ []],o=e.status==="ready";if(o&&!S(e.lines)){let a=!1;for(let[p,m]of e.lines.entries()){let l=m.trim();if(!l)continue;let f=p+
49
+ 1,g=l.match(/^- Default package type: `([^`\r\n]*)`$/u);if(g){t&&d($,V,"Declare exactly one default package type.",f),pt(
50
+ g[1])||d($,V,`Default package type must be ${lt()}.`,f),t=g[1];continue}let I=l.match(/^- Sources file: `([^`\r\n]+)`$/u);
51
+ if(I){n&&d($,V,"Declare exactly one Sources file.",f),n=b(I[1],$,V,"Connected sources file",f,{allowRoot:!1}),n.split("/").
52
+ some(Dn=>Dn.toLowerCase()===".git")&&d($,V,"The Sources file must be outside Git metadata.",f);continue}let _=l.match(Yn),
53
+ P=_?null:l.match(Kn);!_&&!P&&d($,V,D("Connected development entry",l,qn),f);let Y=_?"Custom runner":P[1],Q=Y==="Verify"?
51
54
  "verify":"prepare";!_&&a&&Q==="prepare"&&d($,V,"All Prepare entries must precede Verify entries.",f),a||=!_&&Q==="verify";
52
- let Ie={label:_?qn:v(P[2],$,V,`Connected development ${Y} label`,f),...ue(_?_[1]:P[3],$,V,`Connected development ${Y}`,f,
53
- {form:pt[Y],observed:l})};Ie.condition&&d($,V,"Connected development steps must run unconditionally; a skipped step cann\
54
- ot prove source consumption.",f),_?(s&&d($,V,"Declare exactly one Custom runner.",f),s=Ie):r.push({...Ie,phase:Q})}!(t&&
55
- !n&&!r.length&&!s)&&(!n||!r.some(p=>p.phase==="verify")&&!s)&&d($,V,"Declare a default package type alone, or a Sources \
56
- file with Verify entries or a Custom runner; use `- Nothing.` for no declaration.")}let c=e.status==="blocked"||i.length?
57
- "blocked":r.length||s?"ready":"unconfigured";return{contract:Wn,declared:o,status:c,stackHash:e.stackHash,recipeHash:c===
58
- "ready"?R({version:1,sourcesFile:n,defaultPackageType:t,customRunner:s,steps:r}):"",components:[...e.components||[]],source:e.
59
- source||null,sourcesFile:n,defaultPackageType:t,customRunner:s,steps:r,runtimeRequirements:z([...r,...s?[s]:[]].flatMap(
60
- a=>a.runtimeRequirements)),diagnostics:i}}import{lstat as Kn,open as Yn,realpath as Re,stat as Xn}from"node:fs/promises";import{constants as dt}from"node:fs";import mt from"node:path";var Jn="vibe64.architecture-inspection.v1",ft="Architecture inspection",k="VIBE64_ARCHITECTURE_INSPECTION_INVALID",pe="g\
61
- enesis/stack.md#Architecture inspection",gt=120,Et=64*1024*1024,ht=64*1024,Zn=Object.freeze(["runtimeRequirements","work\
62
- dir","argv","timeout","maxBuffer"]),Ae=Object.freeze({Runtime:["runtimeRequirements","`runtime`..."],Directory:["workdir",
63
- "`path`"],Command:["argv","`command` `argument`..."],"Timeout seconds":["timeout",`\`1\` through \`${gt}\``],"Max output\
64
- bytes":["maxBuffer",`\`1\` through \`${Et}\``],"Entry files":["entryFiles","`path`... (optional)"],"Required files":["r\
65
- equiredFiles","`path`... (optional)"],"Preview locator":["previewLocator","`path` (optional .js file)"]}),Qn=new RegExp(
66
- `^- (${Object.keys(Ae).join("|")}): (.+)$`,"u");function yt(e,n={}){let{path:t=pe}=n;if(Array.isArray(e)||d(k,t,"Archite\
67
- cture inspection requires exact Stack section lines."),w(e))return[];let s=[],r=new Set,i;function o(){if(i){for(let c of Zn)
68
- i[c]===void 0&&d(k,t,`${i.id} is missing ${c}.`);s.push(i),i=null}}for(let[c,a]of e.entries()){let u=a.trim();if(!u)continue;
69
- let p=u.match(/^### Inspector `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(p){o(),r.has(p[1])&&d(k,t,"Duplicate inspector i\
70
- d.",c+1),r.add(p[1]),i={id:p[1],title:p[2]};continue}i||d(k,t,"Expected an Inspector heading.",c+1);let m=u.match(Qn);if(!m){
71
- let f=Object.entries(Ae).map(([g,[,S]])=>`- ${g}: ${S}`).join("; ");d(k,t,`Unknown architecture inspector field. Use one\
72
- of: ${f}.`,c+1)}let[l]=Ae[m[1]];if(i[l]!==void 0&&d(k,t,`Duplicate ${m[1]}.`,c+1),l==="runtimeRequirements")i[l]=N(m[2],
73
- k,t,"Inspector runtime",c+1);else if(l==="argv")i[l]=A(m[2],k,t,"Inspector command",c+1);else if(l==="entryFiles"||l==="\
74
- requiredFiles")i[l]=I(m[2],k,t,m[1],c+1).map(f=>b(f,k,t,m[1],c+1));else{let[f]=I(m[2],k,t,m[1],c+1,{count:1});if(l==="wo\
75
- rkdir")i[l]=b(f,k,t,"Inspector directory",c+1);else if(l==="previewLocator")i[l]=bt(f,t,c+1);else{let g=Number(f),S=l===
76
- "timeout"?gt:Et;(!/^[1-9][0-9]*$/u.test(f)||!Number.isSafeInteger(g)||g>S)&&d(k,t,`${m[1]} must be from 1 to ${S}.`,c+1),
77
- i[l]=l==="timeout"?g*1e3:g}}}return o(),s.length||d(k,t,"Use an Inspector entry or - Nothing."),s}function bt(e,n,t){return b(
78
- e,k,n,"Preview locator",t,{allowRoot:!1}),e.endsWith(".js")||d(k,n,"Preview locator must name a .js file.",t),e}function es(e,n){
79
- return e[n-1]==="node_modules"&&!e[n].startsWith("@")||e[n-2]==="node_modules"&&e[n-1].startsWith("@")}async function ts(e,n){
80
- bt(n,pe);let t=i=>d(k,pe,`Preview locator \`${n}\` ${i}.`),s=n.split("/"),r;try{let i=await Re(e),o=i,c=!1;for(let[u,p]of s.
81
- entries())o=mt.join(o,p),(await Kn(o)).isSymbolicLink()&&((c||u===s.length-1||!es(s,u))&&t("must not be or pass through \
82
- a symlink"),o=i=await Re(o),(await Xn(i)).isDirectory()||t("links a package that is not a folder"),c=!0);(await Re(o)!==
83
- o||!o.startsWith(`${i}${mt.sep}`))&&t("must not be or pass through a symlink"),r=await Yn(o,dt.O_RDONLY|dt.O_NOFOLLOW);let a=await r.
84
- stat();return a.isFile()||t("must be a regular file"),a.size>ht&&t(`must be at most ${ht} bytes`),{path:n,source:await r.
85
- readFile("utf8")}}catch(i){throw(i?.code==="ENOENT"||i?.code==="ENOTDIR")&&t("is not a file in this project"),i?.code===
86
- "ELOOP"&&t("must not be or pass through a symlink"),i}finally{await r?.close()}}function vt(e){let n=e.status==="ready"?
87
- yt(e.lines):[];for(let t of n)t.runtimeRequirements.some(s=>!e.components.includes(s))&&d(k,pe,"Inspector runtimes must \
88
- be selected in Stack.");return{contract:Jn,status:e.status,stackHash:e.stackHash,inspectors:n,recipeHash:R(n),diagnostics:e.
89
- diagnostics||[]}}var Ri=Object.freeze({parseVibe64ArchitectureInspectionLines:yt});var ns="vibe64.architecture-layout.v1",wt="Architecture layout",U="VIBE64_ARCHITECTURE_LAYOUT_INVALID",Ne=Object.freeze(
90
- ["layer","libraries","support"]);function St(e,n={}){let{path:t="genesis/stack.md#Architecture layout"}=n;if(Array.isArray(
91
- e)||d(U,t,"Expected exact Stack section lines."),w(e))return[];let s=[],r=new Set,i=new Set,o;function c(){o&&((!o.kind||
55
+ let _e={label:_?Xn:v(P[2],$,V,`Connected development ${Y} label`,f),...pe(_?_[1]:P[3],$,V,`Connected development ${Y}`,f,
56
+ {form:mt[Y],observed:l})};_e.condition&&d($,V,"Connected development steps must run unconditionally; a skipped step cann\
57
+ ot prove source consumption.",f),_?(s&&d($,V,"Declare exactly one Custom runner.",f),s=_e):i.push({..._e,phase:Q})}!(t&&
58
+ !n&&!i.length&&!s)&&(!n||!i.some(p=>p.phase==="verify")&&!s)&&d($,V,"Declare a default package type alone, or a Sources \
59
+ file with Verify entries or a Custom runner; use `- Nothing.` for no declaration.")}let u=e.status==="blocked"||r.length?
60
+ "blocked":i.length||s?"ready":"unconfigured";return{contract:Fn,declared:o,status:u,stackHash:e.stackHash,recipeHash:u===
61
+ "ready"?A({version:1,sourcesFile:n,defaultPackageType:t,customRunner:s,steps:i}):"",components:[...e.components||[]],source:e.
62
+ source||null,sourcesFile:n,defaultPackageType:t,customRunner:s,steps:i,runtimeRequirements:F([...i,...s?[s]:[]].flatMap(
63
+ a=>a.runtimeRequirements)),diagnostics:r}}import{lstat as Jn,open as Zn,realpath as Ce,stat as Qn}from"node:fs/promises";import{constants as ft}from"node:fs";import gt from"node:path";var es="vibe64.architecture-inspection.v1",yt="Architecture inspection",k="VIBE64_ARCHITECTURE_INSPECTION_INVALID",le="g\
64
+ enesis/stack.md#Architecture inspection",bt=120,vt=64*1024*1024,Et=64*1024,ts=Object.freeze(["runtimeRequirements","work\
65
+ dir","argv","timeout","maxBuffer"]),Pe=Object.freeze({Runtime:["runtimeRequirements","`runtime`..."],Directory:["workdir",
66
+ "`path`"],Command:["argv","`command` `argument`..."],"Timeout seconds":["timeout",`\`1\` through \`${bt}\``],"Max output\
67
+ bytes":["maxBuffer",`\`1\` through \`${vt}\``],"Entry files":["entryFiles","`path`... (optional)"],"Required files":["r\
68
+ equiredFiles","`path`... (optional)"],"Preview locator":["previewLocator","`path` (optional .js file)"]}),ns=new RegExp(
69
+ `^- (${Object.keys(Pe).join("|")}): (.+)$`,"u");function wt(e,n={}){let{path:t=le}=n;if(Array.isArray(e)||d(k,t,"Archite\
70
+ cture inspection requires exact Stack section lines."),S(e))return[];let s=[],i=new Set,r;function o(){if(r){for(let u of ts)
71
+ r[u]===void 0&&d(k,t,`${r.id} is missing ${u}.`);s.push(r),r=null}}for(let[u,a]of e.entries()){let c=a.trim();if(!c)continue;
72
+ let p=c.match(/^### Inspector `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(p){o(),i.has(p[1])&&d(k,t,"Duplicate inspector i\
73
+ d.",u+1),i.add(p[1]),r={id:p[1],title:p[2]};continue}r||d(k,t,"Expected an Inspector heading.",u+1);let m=c.match(ns);if(!m){
74
+ let f=Object.entries(Pe).map(([g,[,I]])=>`- ${g}: ${I}`).join("; ");d(k,t,`Unknown architecture inspector field. Use one\
75
+ of: ${f}.`,u+1)}let[l]=Pe[m[1]];if(r[l]!==void 0&&d(k,t,`Duplicate ${m[1]}.`,u+1),l==="runtimeRequirements")r[l]=C(m[2],
76
+ k,t,"Inspector runtime",u+1);else if(l==="argv")r[l]=N(m[2],k,t,"Inspector command",u+1);else if(l==="entryFiles"||l==="\
77
+ requiredFiles")r[l]=w(m[2],k,t,m[1],u+1).map(f=>b(f,k,t,m[1],u+1));else{let[f]=w(m[2],k,t,m[1],u+1,{count:1});if(l==="wo\
78
+ rkdir")r[l]=b(f,k,t,"Inspector directory",u+1);else if(l==="previewLocator")r[l]=St(f,t,u+1);else{let g=Number(f),I=l===
79
+ "timeout"?bt:vt;(!/^[1-9][0-9]*$/u.test(f)||!Number.isSafeInteger(g)||g>I)&&d(k,t,`${m[1]} must be from 1 to ${I}.`,u+1),
80
+ r[l]=l==="timeout"?g*1e3:g}}}return o(),s.length||d(k,t,"Use an Inspector entry or - Nothing."),s}function St(e,n,t){return b(
81
+ e,k,n,"Preview locator",t,{allowRoot:!1}),e.endsWith(".js")||d(k,n,"Preview locator must name a .js file.",t),e}function ss(e,n){
82
+ return e[n-1]==="node_modules"&&!e[n].startsWith("@")||e[n-2]==="node_modules"&&e[n-1].startsWith("@")}async function is(e,n){
83
+ St(n,le);let t=r=>d(k,le,`Preview locator \`${n}\` ${r}.`),s=n.split("/"),i;try{let r=await Ce(e),o=r,u=!1;for(let[c,p]of s.
84
+ entries())o=gt.join(o,p),(await Jn(o)).isSymbolicLink()&&((u||c===s.length-1||!ss(s,c))&&t("must not be or pass through \
85
+ a symlink"),o=r=await Ce(o),(await Qn(r)).isDirectory()||t("links a package that is not a folder"),u=!0);(await Ce(o)!==
86
+ o||!o.startsWith(`${r}${gt.sep}`))&&t("must not be or pass through a symlink"),i=await Zn(o,ft.O_RDONLY|ft.O_NOFOLLOW);let a=await i.
87
+ stat();return a.isFile()||t("must be a regular file"),a.size>Et&&t(`must be at most ${Et} bytes`),{path:n,source:await i.
88
+ readFile("utf8")}}catch(r){throw(r?.code==="ENOENT"||r?.code==="ENOTDIR")&&t("is not a file in this project"),r?.code===
89
+ "ELOOP"&&t("must not be or pass through a symlink"),r}finally{await i?.close()}}function It(e){let n=e.status==="ready"?
90
+ wt(e.lines):[];for(let t of n)t.runtimeRequirements.some(s=>!e.components.includes(s))&&d(k,le,"Inspector runtimes must \
91
+ be selected in Stack.");return{contract:es,status:e.status,stackHash:e.stackHash,inspectors:n,recipeHash:A(n),diagnostics:e.
92
+ diagnostics||[]}}var $r=Object.freeze({parseVibe64ArchitectureInspectionLines:wt});var rs="vibe64.architecture-layout.v1",Tt="Architecture layout",U="VIBE64_ARCHITECTURE_LAYOUT_INVALID",De=Object.freeze(
93
+ ["layer","libraries","support"]);function kt(e,n={}){let{path:t="genesis/stack.md#Architecture layout"}=n;if(Array.isArray(
94
+ e)||d(U,t,"Expected exact Stack section lines."),S(e))return[];let s=[],i=new Set,r=new Set,o;function u(){o&&((!o.kind||
92
95
  !o.purpose||!o.subsystems.length)&&d(U,t,`${o.id} needs Kind, Purpose and at least one Subsystem.`),s.push(o))}for(let[a,
93
- u]of e.entries()){let p=u.trim();if(!p)continue;let m=p.match(/^### Group `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(m){c(),
94
- r.has(m[1])&&d(U,t,"Duplicate group id.",a+1),r.add(m[1]),o={id:m[1],title:m[2],subsystems:[]};continue}let l=p.match(/^- (Kind|Purpose|Subsystem): (.+)$/u);
95
- (!o||!l)&&d(U,t,"Expected a Group heading or Kind, Purpose, Subsystem field.",a+1);let f=I(l[2],U,t,l[1],a+1,{count:1});
96
- if(l[1]==="Subsystem"){let g=b(f[0],U,t,"Subsystem root",a+1);i.has(g)&&d(U,t,"Each directory root may be placed only on\
97
- ce.",a+1),i.add(g),o.subsystems.push({root:g})}else{let g=l[1].toLowerCase();o[g]!==void 0&&d(U,t,`Duplicate ${l[1]}.`,a+
98
- 1),g==="kind"&&!Ne.includes(f[0])&&d(U,t,`Kind must be ${Ne.slice(0,-1).join(", ")} or ${Ne.at(-1)}.`,a+1),o[g]=f[0]}}return c(),
99
- s.length||d(U,t,"Use a Group entry or - Nothing."),s}function It(e){return{contract:ns,status:e.status,stackHash:e.stackHash,
100
- groups:e.status==="ready"?St(e.lines):[],diagnostics:e.diagnostics||[]}}var Ci=Object.freeze({parseVibe64ArchitectureLayoutLines:St});import{existsSync as Sn}from"node:fs";import{readFile as Nr}from"node:fs/promises";import{createRequire as Cr}from"node:module";
101
- import B from"node:path";var ss="STACK_PROJECT_CONTRACTS_INCOMPLETE",Tt="STACK_SECTION_AMBIGUOUS",rs=Object.freeze([ss,Tt]);function is(e){return rs.
102
- includes(String(e?.code||"").trim())}var Ce="genesis/stack.md",os=Object.freeze(["GIT_","PROCESS_","HOST_CONTEXT_"]);function as(e){
103
- return e instanceof SyntaxError?!0:e?.name!=="GenesisError"?!1:!os.some(n=>String(e.code).startsWith(n))}function cs(e){
104
- let{path:n="",line:t,observed:s}=e.details||{},r=Number.isSafeInteger(t)?` (line ${t}${n===Ce?" of its section":""})`:"",
105
- i=n&&(r||!e.message.includes(n))?`${n}${r}: `:"",o=typeof s=="string"?` Found: "${s}".`:"";return`${i}${e.message}${o}`}import*as oe from"genesis-compiler";import{randomUUID as ys}from"node:crypto";import{mkdir as bs,mkdtemp as vs,readFile as ws,rename as Ss,rm as At,writeFile as Is}from"node:fs/promises";
106
- import Ts from"node:os";import De from"node:path";function x(e){return String(e||"").trim()}var us=Object.freeze(["main","temporary"]),kt=Object.freeze(["managedDatabaseRefresh","managedEnvironment","managedGit",
107
- "managedPreview"]),_t=Object.freeze(["managedPages"]),ps=64*1024,ls=Object.freeze(["When user input is necessary, ask no\
96
+ c]of e.entries()){let p=c.trim();if(!p)continue;let m=p.match(/^### Group `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(m){u(),
97
+ i.has(m[1])&&d(U,t,"Duplicate group id.",a+1),i.add(m[1]),o={id:m[1],title:m[2],subsystems:[]};continue}let l=p.match(/^- (Kind|Purpose|Subsystem): (.+)$/u);
98
+ (!o||!l)&&d(U,t,"Expected a Group heading or Kind, Purpose, Subsystem field.",a+1);let f=w(l[2],U,t,l[1],a+1,{count:1});
99
+ if(l[1]==="Subsystem"){let g=b(f[0],U,t,"Subsystem root",a+1);r.has(g)&&d(U,t,"Each directory root may be placed only on\
100
+ ce.",a+1),r.add(g),o.subsystems.push({root:g})}else{let g=l[1].toLowerCase();o[g]!==void 0&&d(U,t,`Duplicate ${l[1]}.`,a+
101
+ 1),g==="kind"&&!De.includes(f[0])&&d(U,t,`Kind must be ${De.slice(0,-1).join(", ")} or ${De.at(-1)}.`,a+1),o[g]=f[0]}}return u(),
102
+ s.length||d(U,t,"Use a Group entry or - Nothing."),s}function _t(e){return{contract:rs,status:e.status,stackHash:e.stackHash,
103
+ groups:e.status==="ready"?kt(e.lines):[],diagnostics:e.diagnostics||[]}}var jr=Object.freeze({parseVibe64ArchitectureLayoutLines:kt});import{existsSync as Tn}from"node:fs";import{readFile as Vi}from"node:fs/promises";import{createRequire as xi}from"node:module";
104
+ import B from"node:path";var os="STACK_PROJECT_CONTRACTS_INCOMPLETE",Ot="STACK_SECTION_AMBIGUOUS",as=Object.freeze([os,Ot]);function cs(e){return as.
105
+ includes(String(e?.code||"").trim())}var $e="genesis/stack.md",us=Object.freeze(["GIT_","PROCESS_","HOST_CONTEXT_"]);function ps(e){
106
+ return e instanceof SyntaxError?!0:e?.name!=="GenesisError"?!1:!us.some(n=>String(e.code).startsWith(n))}function ls(e){
107
+ let{path:n="",line:t,observed:s}=e.details||{},i=Number.isSafeInteger(t)?` (line ${t}${n===$e?" of its section":""})`:"",
108
+ r=n&&(i||!e.message.includes(n))?`${n}${i}: `:"",o=typeof s=="string"?` Found: "${s}".`:"";return`${r}${e.message}${o}`}import*as oe from"genesis-compiler";import{randomUUID as ws}from"node:crypto";import{mkdir as Ss,mkdtemp as Is,readFile as Ts,rename as ks,rm as Pt,writeFile as _s}from"node:fs/promises";
109
+ import Os from"node:os";import xe from"node:path";function x(e){return String(e||"").trim()}var ds=Object.freeze(["main","temporary"]),At=Object.freeze(["managedDatabaseRefresh","managedEnvironment","managedGit",
110
+ "managedPreview"]),Rt=Object.freeze(["managedPages"]),ms=64*1024,hs=Object.freeze(["When user input is necessary, ask no\
108
111
  more than three concise, high-impact questions at once.","Put multiple questions on separate lines as `[1] Question`, `\
109
112
  [2] Question`, and so on.","For a small fixed set of useful choices, put `Possible answers:` and a short bullet list dir\
110
113
  ectly beneath its own question, before the next one; never collect several questions' answers into one trailing list.","\
@@ -117,7 +120,7 @@ Possible answers:
117
120
  [2] Tell the main agent before changes?
118
121
  Possible answers:
119
122
  - Yes, tell main first
120
- - No, proceed independently`]),ds=Object.freeze(["The Vibe64-managed preview is the canonical application server; never \
123
+ - No, proceed independently`]),fs=Object.freeze(["The Vibe64-managed preview is the canonical application server; never \
121
124
  start a duplicate or replacement server. If it is unavailable, report that blocker. Describe only rendered browser evide\
122
125
  nce.","When adopting an authenticated app, or when its login blocks Preview inspection, inspect identity support/names w\
123
126
  ith `vibe64-helper preview status`; prefer `vibe64-helper preview browser identity <configured-name>` to requesting pass\
@@ -129,105 +132,105 @@ from the app framework's own pattern as part of the work instead of merely offer
129
132
  or confirms (you may propose existing app accounts) with `vibe64-helper preview identities save` (`vibe64-helper spec pr\
130
133
  eview-identities`), then verify each with `vibe64-helper preview browser identity <name>`; a saved selector alone proves\
131
134
  no access. Use existing sessions/permissions, reject missing/disabled accounts, and disable the adapter without Vibe64\u2019\
132
- s per-run enable flag and secret. Do not create users, change roles, reset passwords or weaken production auth for impor\
133
- t. If choices are deferred/declined, say access stays unconfigured and continue independent setup work without repeated \
134
- credential requests. Public/non-web apps need no adapter.","Use `vibe64-helper preview status`, `screenshot`, `logs`, an\
135
- d `browser eval` (Playwright code on stdin) for rendered inspection.","When the person asks to see a page of the app, ru\
136
- n `vibe64-helper preview open <path>` with its path inside the app (for example `/orders/42?tab=notes`): it moves the Pr\
137
- eview they have open to that page and says the AI opened it. Your managed browser is a separate copy and never moves the\
138
- ir pane. If it reports `moved: 0`, give them the path to type into the Preview address box.","The top Preview toolbar St\
139
- op and `vibe64-helper preview stop` stop this session's application and managed browser, not chat or source. Status repo\
140
- rts the saved stopped choice. A status read, screenshot, browser inspection, source edit or session reopening is not per\
141
- mission to restart it; use `vibe64-helper preview ensure --wait` only for a deliberate Start. Scoped browser tests resto\
142
- re the prior stopped choice.","For interactive navigation, use the proxy URL from `vibe64-helper preview inspect-url` or\
143
- status `currentPage.url` / `endpoints.browser.url`. Inside browser eval, use `await page.goto(new URL('/your-path', pre\
144
- view.url).href)`. The direct application endpoint under diagnostics bypasses Preview identity and is not a browser-navig\
145
- ation URL.","Use the managed preview browser for interactive browsing and `vibe64-helper playwright` only for an existin\
146
- g configured project suite; never install another browser. Pin `@playwright/test` exactly to the `platformVersion` that \
147
- `vibe64-helper playwright readiness` reports. The login state belongs to the host: pass `process.env.PLAYWRIGHT_STORAGE_\
148
- STATE` unchanged to `use.storageState`, and never read, parse or edit that file or its cookies in the Playwright config \
149
- (`vibe64-helper playwright` refuses such a config). If tests run signed out with it, that is a host defect: report it wi\
150
- th the evidence; do not work around it.","For browser evidence, batch related actions and assertions, return only needed\
151
- values and inspect relevant locators or regions; screenshot at meaningful checkpoints or failures, not after every clic\
152
- k. Reuse the managed browser when isolation permits, keep required viewport, identity and security checks, and use exist\
153
- ing automated cases for repeat verification.","For browser tests that write or reset data, inspect `vibe64-helper previe\
154
- w targets --json` and the project's `genesis/stack.md` Outputs. Run `vibe64-helper playwright --target <declared-test-ta\
155
- rget> test <suite arguments>` (or `npm-run <script>` in place of `test`). Vibe64 starts that web target, waits for readi\
156
- ness, uses its declared application identity, and restores the previous Preview when the command finishes or is cancelle\
157
- d; report restoration failures.","A target name is not proof of test isolation. Before running a destructive suite, the \
158
- application must verify the server's actual test database and suppress real email, invoices, payments, and other externa\
159
- l effects. Keep managed Env unchanged. The test launcher and its preview-identity command must use the same database. Fo\
160
- llow the application's declared test resources and never invent a database name. Never spoof safety checks by changing o\
161
- nly the test runner's environment.","If no suitable test target exists, add one through the project's existing Outputs c\
162
- ontract and application-owned test scripts within authorized scope; normal Preview stays the default. Validate the exact\
163
- disposable database before resetting it, prepare fixtures before reporting readiness, and make Playwright use PLAYWRIGH\
164
- T_BASE_URL (the started target's URL) without starting another server. If test resources or external-effect controls are\
165
- missing, report that blocker. `vibe64-helper preview ensure --target <id> --wait --json` deliberately selects an intera\
166
- ctive target until changed. If browser startup is slow, measure migrations, fixtures and server startup before retrying \
167
- or extending deadlines.","Keep test output small: run relevant files/cases, save stdout/stderr to local artifacts and ke\
168
- ep exit status. Report counts, duration, failed cases, actionable errors and artifact paths, reading only needed failure\
169
- excerpts. Retain startup, resource and Preview-restoration errors even if tests pass, and trailing wrapper diagnostics \
170
- separately from JSON. Do not rerun for output or reread unchanged logs.","Batch related browser tests in one managed sui\
171
- te (one Preview switch and restore). Suites and live Preview actions are sequential: no browser actions, ensure/restart \
172
- or target changes during a suite or restoration. Wait on the original execution, including background runs, through clea\
173
- nup/restoration (empty polls: yield_time_ms: 30000 where supported; shorter only for interactive input); read-only statu\
174
- s/logs stay available. Before live inspection, confirm `vibe64-helper playwright status` shows no active run and `vibe64\
175
- -helper preview status` is ready on the restored target. To stop, run `vibe64-helper playwright cancel <run-id>`, which \
176
- waits for cleanup/restoration; retry if cleanup needs attention. Never kill test/Preview PIDs or change locks; launcher \
177
- exit alone does not prove tests stopped. Recheck status before reporting a busy blocker.","If a managed command reports \
178
- kernel task denials or a resource incident, report the blocker with its diagnostic and incident ID and ask the platform \
179
- operator to inspect that evidence before retrying; never raise test timeouts or weaken assertions to work around a proce\
180
- ss/thread limit. A generic browser timeout without resource evidence does not establish a platform cause."]),ms=Object.freeze(
181
- ['Pages: `vibe64-helper pages publish <file.html|folder> [--title "Title"]` publishes an HTML page (one file, or a folde\
182
- r with index.html and its own scripts, styles, data and images) that everyone with access to this project can open from \
183
- Vibe64\'s Pages list; `vibe64-helper pages update <page-id> <file.html|folder>` gives a page a new version under the same\
184
- link (it keeps ten; `vibe64-helper pages revert <page-id> <version>` brings one back); `vibe64-helper pages list` lists\
185
- them. A page runs sandboxed and loads only its own files, never other addresses, CDNs or Vibe64 itself, so ship every s\
186
- cript, style and data file inside it. Write page files outside the repository (for example in VIBE64_DROP_ZONE) unless t\
187
- hey belong there. Give the printed link in the chat as a Markdown link; Vibe64 shows it as a card.',"Before writing a pa\
188
- ge, read `vibe64-helper pages guide` in full and follow it: link `_vibe64/page.css` and build from its components (a hea\
189
- der, summary tiles first, sections of cards, status pills, tables for comparisons, inline SVG charts), never a wall of t\
190
- ext.",'After answering with a report, comparison, status or progress overview, dashboard, diagram, plan or review, end t\
191
- he reply with a one-line offer, such as "Want this as a page everyone on the project can open?" (or, when a related page\
192
- exists, offer to add it there). Make or change a page only once they say yes.',"When the person says the result is for \
193
- other people (a colleague, the team, a client, a manager, a meeting) or that they will come back to it, make the page wi\
194
- thout asking and give its link.","When a page's content will change over time (test results, progress, metrics), say the\
195
- page can be kept up to date. When the person wants that, build it as the guide's \"A page that keeps itself up to date\" \
196
- says: index.html for the layout, data.json for the numbers, then `vibe64-helper pages refresh <page-id>` with --every or\
197
- --daily. Choose --command with a small script that writes data.json, which needs no AI, whenever a script can gather th\
198
- e data; use --prompt only when gathering it needs judgement.","Before making a page, check `vibe64-helper pages list`: w\
199
- hen a page about the same subject already exists, update it instead of making a new one.","Do not offer pages for quick \
200
- answers, code changes, or documents that belong in the repository. Offer at most once per topic; do not nag.","Everyone \
201
- with access to the project can open a page: never put secrets in one, or anything not every project member should see."]),
202
- hs=Object.freeze(["Each managed shell command receives current development Env from Vibe64, including declared resource \
203
- bindings; use them in ordinary commands. Do not build environment injection or copy managed credentials into source. Res\
204
- ource provisioning and application migrations remain separate preparation steps.","Use `vibe64-helper env status [develo\
205
- pment|production|all]` to inspect configured key names without revealing values.","Pipe an available value to `vibe64-he\
206
- lper env set <development|production> <KEY> [--secret]`; it drops the one final newline that `echo` or a generator print\
207
- s and stores every other character exactly. Never put values in arguments, logs, or repository files. Use empty stdin on\
208
- ly when the user requested an empty value. The host decides whose session may change production values; when it refuses,\
209
- report its message instead of retrying.","When the person refers to a saved key, account or accounts hub, run `vibe64-h\
210
- elper env saved` (names, descriptions and fields, never values) and link the matching field to the variable the applicat\
211
- ion reads with `vibe64-helper env link <development|production> <KEY> <saved-id> <field-id>` instead of asking for the v\
212
- alue.","Keep development and production values separate. Never invent credentials, copy a value between scopes without e\
213
- xplicit direction, or edit Vibe64 runtime/session storage.","After an Env mutation, report only the affected scope and k\
214
- ey names, never their values, and claim success only when the command succeeded.","Store a secret the application needs \
215
- generated (such as an application key) by generating it with the framework's own generator and piping it to `vibe64-help\
216
- er env set <scope> <KEY> --secret`. Never write it into a generated `.env` file: Vibe64 regenerates that file from Env."]);
217
- function Ot(e,n){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`${n} must be an object.`);return e}function Pe(e,n,t){
218
- let s=new Set(n),r=Object.keys(e).filter(i=>!s.has(i));if(r.length>0)throw new TypeError(`${t} contains unsupported fiel\
219
- ds: ${r.join(", ")}.`)}function Rt(e){if(Pe(e,["conversationKind","scope","session","hostGuidance"],"Vibe64 session cont\
220
- ext"),e.hostGuidance!==void 0&&(typeof e.hostGuidance!="string"||Buffer.byteLength(e.hostGuidance,"utf8")>1024))throw new TypeError(
221
- "Vibe64 host guidance must be bounded text supplied by the host.");if(!us.includes(e.conversationKind))throw new TypeError(
222
- "Vibe64 session context has an unknown conversationKind.");let n=Ot(e.session,"Vibe64 session capabilities");Pe(n,[...kt,
223
- ..._t],"Vibe64 session capabilities");let t=Object.fromEntries(kt.map(s=>{if(typeof n[s]!="boolean")throw new TypeError(
224
- `Vibe64 session capability ${s} must be boolean.`);return[s,n[s]]}));for(let s of _t){if(n[s]!==void 0&&typeof n[s]!="bo\
225
- olean")throw new TypeError(`Vibe64 session capability ${s} must be boolean.`);n[s]===!0&&(t[s]=!0)}return{conversationKind:e.
226
- conversationKind,scope:"session",...e.hostGuidance?{hostGuidance:e.hostGuidance}:{},session:t}}function fs(e){Pe(e,["sco\
227
- pe","stableContext"],"Vibe64 ephemeral context");let n=String(e.stableContext||"").trim();if(!n||n.length>ps)throw new TypeError(
228
- "Vibe64 ephemeral context requires bounded stableContext.");return{scope:"ephemeral",stableContext:n}}function gs(e){if(e.
229
- scope==="session")return Rt(e);if(e.scope==="ephemeral")return fs(e);throw new TypeError("The Vibe64 driver supports ses\
230
- sion and ephemeral scopes only.")}function Es(e){let{conversationKind:n,session:t,hostGuidance:s=""}=Rt(e);return["VIBE6\
135
+ s per-run enable flag and secret. Do not create users, change roles, reset passwords or weaken the application's own aut\
136
+ h for import. If choices are deferred/declined, say access stays unconfigured and continue independent setup work withou\
137
+ t repeated credential requests. Public/non-web apps need no adapter.","Use `vibe64-helper preview status`, `screenshot`,\
138
+ `logs`, and `browser eval` (Playwright code on stdin) for rendered inspection.","When the person asks to see a page of \
139
+ the app, run `vibe64-helper preview open <path>` with its path inside the app (for example `/orders/42?tab=notes`): it m\
140
+ oves the Preview they have open to that page and says the AI opened it. Your managed browser is a separate copy and neve\
141
+ r moves their pane. If it reports `moved: 0`, give them the path to type into the Preview address box.","The top Preview\
142
+ toolbar Stop and `vibe64-helper preview stop` stop this session's application and managed browser, not chat or source. \
143
+ Status reports the saved stopped choice. A status read, screenshot, browser inspection, source edit or session reopening\
144
+ is not permission to restart it; use `vibe64-helper preview ensure --wait` only for a deliberate Start. Scoped browser \
145
+ tests restore the prior stopped choice.","For interactive navigation, use the proxy URL from `vibe64-helper preview insp\
146
+ ect-url` or status `currentPage.url` / `endpoints.browser.url`. Inside browser eval, use `await page.goto(new URL('/your\
147
+ -path', preview.url).href)`. The direct application endpoint under diagnostics bypasses Preview identity and is not a br\
148
+ owser-navigation URL.","Use the managed preview browser for interactive browsing and `vibe64-helper playwright` only for\
149
+ an existing configured project suite; never install another browser. Pin `@playwright/test` exactly to the `platformVer\
150
+ sion` that `vibe64-helper playwright readiness` reports. The login state belongs to the host: pass `process.env.PLAYWRIG\
151
+ HT_STORAGE_STATE` unchanged to `use.storageState`, and never read, parse or edit that file or its cookies in the Playwri\
152
+ ght config (`vibe64-helper playwright` refuses such a config). If tests run signed out with it, that is a host defect: r\
153
+ eport it with the evidence; do not work around it.","For browser evidence, batch related actions and assertions, return \
154
+ only needed values and inspect relevant locators or regions; screenshot at meaningful checkpoints or failures, not after\
155
+ every click. Reuse the managed browser when isolation permits, keep required viewport, identity and security checks, an\
156
+ d use existing automated cases for repeat verification.","For browser tests that write or reset data, inspect `vibe64-he\
157
+ lper preview targets --json` and the project's `genesis/stack.md` Outputs. Run `vibe64-helper playwright --target <decla\
158
+ red-test-target> test <suite arguments>` (or `npm-run <script>` in place of `test`). Vibe64 starts that web target, wait\
159
+ s for readiness, uses its declared application identity, and restores the previous Preview when the command finishes or \
160
+ is cancelled; report restoration failures.","A target name is not proof of test isolation. Before running a destructive \
161
+ suite, the application must verify the server's actual test database and suppress real email, invoices, payments, and ot\
162
+ her external effects. Keep managed Env unchanged. The test launcher and its preview-identity command must use the same d\
163
+ atabase. Follow the application's declared test resources and never invent a database name. Never spoof safety checks by\
164
+ changing only the test runner's environment.","If no suitable test target exists, add one through the project's existin\
165
+ g Outputs contract and application-owned test scripts within authorized scope; normal Preview stays the default. Validat\
166
+ e the exact disposable database before resetting it, prepare fixtures before reporting readiness, and make Playwright us\
167
+ e PLAYWRIGHT_BASE_URL (the started target's URL) without starting another server. If test resources or external-effect c\
168
+ ontrols are missing, report that blocker. `vibe64-helper preview ensure --target <id> --wait --json` deliberately select\
169
+ s an interactive target until changed. If browser startup is slow, measure migrations, fixtures and server startup befor\
170
+ e retrying or extending deadlines.","Keep test output small: run relevant files/cases, save stdout/stderr to local artif\
171
+ acts and keep exit status. Report counts, duration, failed cases, actionable errors and artifact paths, reading only nee\
172
+ ded failure excerpts. Retain startup, resource and Preview-restoration errors even if tests pass, and trailing wrapper d\
173
+ iagnostics separately from JSON. Do not rerun for output or reread unchanged logs.","Batch related browser tests in one \
174
+ managed suite (one Preview switch and restore). Suites and live Preview actions are sequential: no browser actions, ensu\
175
+ re/restart or target changes during a suite or restoration. Wait on the original execution, including background runs, t\
176
+ hrough cleanup/restoration (empty polls: yield_time_ms: 30000 where supported; shorter only for interactive input); read\
177
+ -only status/logs stay available. Before live inspection, confirm `vibe64-helper playwright status` shows no active run \
178
+ and `vibe64-helper preview status` is ready on the restored target. To stop, run `vibe64-helper playwright cancel <run-i\
179
+ d>`, which waits for cleanup/restoration; retry if cleanup needs attention. Never kill test/Preview PIDs or change locks\
180
+ ; launcher exit alone does not prove tests stopped. Recheck status before reporting a busy blocker.","If a managed comma\
181
+ nd reports kernel task denials or a resource incident, report the blocker with its diagnostic and incident ID and ask th\
182
+ e platform operator to inspect that evidence before retrying; never raise test timeouts or weaken assertions to work aro\
183
+ und a process/thread limit. A generic browser timeout without resource evidence does not establish a platform cause."]),
184
+ gs=Object.freeze(['Pages: `vibe64-helper pages publish <file.html|folder> [--title "Title"]` publishes an HTML page (one\
185
+ file, or a folder with index.html and its own scripts, styles, data and images) that everyone with access to this proje\
186
+ ct can open from Vibe64\'s Pages list; `vibe64-helper pages update <page-id> <file.html|folder>` gives a page a new versi\
187
+ on under the same link (it keeps ten; `vibe64-helper pages revert <page-id> <version>` brings one back); `vibe64-helper \
188
+ pages list` lists them. A page runs sandboxed and loads only its own files, never other addresses, CDNs or Vibe64 itself\
189
+ , so ship every script, style and data file inside it. Write page files outside the repository (for example in VIBE64_DR\
190
+ OP_ZONE) unless they belong there. Give the printed link in the chat as a Markdown link; Vibe64 shows it as a card.',"Be\
191
+ fore writing a page, read `vibe64-helper pages guide` in full and follow it: link `_vibe64/page.css` and build from its \
192
+ components (a header, summary tiles first, sections of cards, status pills, tables for comparisons, inline SVG charts), \
193
+ never a wall of text.",'After answering with a report, comparison, status or progress overview, dashboard, diagram, plan\
194
+ or review, end the reply with a one-line offer, such as "Want this as a page everyone on the project can open?" (or, wh\
195
+ en a related page exists, offer to add it there). Make or change a page only once they say yes.',"When the person says t\
196
+ he result is for other people (a colleague, the team, a client, a manager, a meeting) or that they will come back to it,\
197
+ make the page without asking and give its link.","When a page's content will change over time (test results, progress, \
198
+ metrics), say the page can be kept up to date. When the person wants that, build it as the guide's \"A page that keeps it\
199
+ self up to date\" says: index.html for the layout, data.json for the numbers, then `vibe64-helper pages refresh <page-id>\
200
+ ` with --every or --daily. Choose --command with a small script that writes data.json, which needs no AI, whenever a scr\
201
+ ipt can gather the data; use --prompt only when gathering it needs judgement.","Before making a page, check `vibe64-help\
202
+ er pages list`: when a page about the same subject already exists, update it instead of making a new one.","Do not offer\
203
+ pages for quick answers, code changes, or documents that belong in the repository. Offer at most once per topic; do not\
204
+ nag.","Everyone with access to the project can open a page: never put secrets in one, or anything not every project mem\
205
+ ber should see."]),Es=Object.freeze(["Each managed shell command receives current development Env from Vibe64, including\
206
+ declared resource bindings; use them in ordinary commands. Do not build environment injection or copy managed credentia\
207
+ ls into source. Resource provisioning and application migrations remain separate preparation steps.","Use `vibe64-helper\
208
+ env status [development|staging|all]` to inspect configured key names without revealing values.","Pipe an available val\
209
+ ue to `vibe64-helper env set <development|staging> <KEY> [--secret]`; it drops the one final newline that `echo` or a ge\
210
+ nerator prints and stores every other character exactly. Never put values in arguments, logs, or repository files. Use e\
211
+ mpty stdin only when the user requested an empty value. The host decides whose session may change staging values; when i\
212
+ t refuses, report its message instead of retrying.","When the person refers to a saved key, account or accounts hub, run\
213
+ `vibe64-helper env saved` (names, descriptions and fields, never values) and link the matching field to the variable th\
214
+ e application reads with `vibe64-helper env link <development|staging> <KEY> <saved-id> <field-id>` instead of asking fo\
215
+ r the value.","Keep development and staging values separate. Never invent credentials, copy a value between scopes witho\
216
+ ut explicit direction, or edit Vibe64 runtime/session storage.","After an Env mutation, report only the affected scope a\
217
+ nd key names, never their values, and claim success only when the command succeeded.","Store a secret the application ne\
218
+ eds generated (such as an application key) by generating it with the framework's own generator and piping it to `vibe64-\
219
+ helper env set <scope> <KEY> --secret`. Never write it into a generated `.env` file: Vibe64 regenerates that file from E\
220
+ nv."]);function Nt(e,n){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`${n} must be an object.`);return e}
221
+ function Ve(e,n,t){let s=new Set(n),i=Object.keys(e).filter(r=>!s.has(r));if(i.length>0)throw new TypeError(`${t} contai\
222
+ ns unsupported fields: ${i.join(", ")}.`)}function Ct(e){if(Ve(e,["conversationKind","scope","session","hostGuidance"],"\
223
+ Vibe64 session context"),e.hostGuidance!==void 0&&(typeof e.hostGuidance!="string"||Buffer.byteLength(e.hostGuidance,"ut\
224
+ f8")>1024))throw new TypeError("Vibe64 host guidance must be bounded text supplied by the host.");if(!ds.includes(e.conversationKind))
225
+ throw new TypeError("Vibe64 session context has an unknown conversationKind.");let n=Nt(e.session,"Vibe64 session capabi\
226
+ lities");Ve(n,[...At,...Rt],"Vibe64 session capabilities");let t=Object.fromEntries(At.map(s=>{if(typeof n[s]!="boolean")
227
+ throw new TypeError(`Vibe64 session capability ${s} must be boolean.`);return[s,n[s]]}));for(let s of Rt){if(n[s]!==void 0&&
228
+ typeof n[s]!="boolean")throw new TypeError(`Vibe64 session capability ${s} must be boolean.`);n[s]===!0&&(t[s]=!0)}return{
229
+ conversationKind:e.conversationKind,scope:"session",...e.hostGuidance?{hostGuidance:e.hostGuidance}:{},session:t}}function ys(e){
230
+ Ve(e,["scope","stableContext"],"Vibe64 ephemeral context");let n=String(e.stableContext||"").trim();if(!n||n.length>ms)throw new TypeError(
231
+ "Vibe64 ephemeral context requires bounded stableContext.");return{scope:"ephemeral",stableContext:n}}function bs(e){if(e.
232
+ scope==="session")return Ct(e);if(e.scope==="ephemeral")return ys(e);throw new TypeError("The Vibe64 driver supports ses\
233
+ sion and ephemeral scopes only.")}function vs(e){let{conversationKind:n,session:t,hostGuidance:s=""}=Ct(e);return["VIBE6\
231
234
  4 CONVERSATION CONTEXT","",...n==="main"?["This is the main Vibe64 conversation for the selected session worktree."]:["T\
232
235
  his is a user-visible temporary conversation in the selected session worktree, with the same tools and project access as\
233
236
  main chat.","Its messages stay out of main History. Closing this conversation preserves project edits and removes only \
@@ -251,461 +254,476 @@ on is needed.","Before changing dependencies or porting code, check whether the
251
254
  oes, it arrives with Update: never redo it here. While Update failed or is pending, Update owns the session: do not repa\
252
255
  ir setup or workspace preparation first. Local work the saved version supersedes, such as a stale or partial dependency \
253
256
  bump it completes, is resolved by taking the saved version: say so plainly in one sentence and never ask the person to c\
254
- hoose, because Vibe64's checkpoint keeps the original. Ask only about genuine product decisions.","Connected repositorie\
255
- s are this session's own copies at `../connected/<name>`, listed in the Stack's Sources file and in `vibe64-helper sessi\
256
- on status --json` under `repository.connected`: edit them like this session's source; Save and Update cover them, so nev\
257
- er commit, push, fetch or rebase them yourself.","Vibe64-owned contracts (Stack sections such as Workspace setup and Out\
258
- puts, the Preview identity protocol and integration setup) have exact specs: list them with `vibe64-helper spec` and rea\
259
- d `vibe64-helper spec <name>` before writing or changing one; never reconstruct them from Vibe64 source or bundles.",'Bu\
260
- ild every email, SMS, push notification, payment or third-party webhook the application sends to follow `SIDE_EFFECTS` (\
261
- `vibe64-helper spec deployment`): unless it is exactly `live`, simulate it, log it and show a small "Test copy" banner. \
262
- The host sets it; never set it in Env, source or a Deployment step.',"Use `vibe64-helper --help` for additional managed \
263
- commands; each group accepts `--help`. Use the groups enabled for this session below.",'When the user asks to rename thi\
264
- s session, run `vibe64-helper session rename "Name"`; it changes only the display name, not its ID or directories.','Coo\
265
- rdinate authorized work via `vibe64-helper session message-project <project> [--session <id-or-name>] "Message" [message\
266
- -id]`. Without --session, the pinned/selected session receives it; in your own project that is often you. To reach anoth\
267
- er session, by name or as "the other session", first run `vibe64-helper session list-project <project>` (your own projec\
268
- t included), then pass its ID or name to --session. If exactly one other active session is listed, use it; ask only when\
269
- several could be meant. Never say no other session exists without listing. Reply to the exact source session via its su\
270
- pplied command; never yourself. Never open/select recipients. Write natural Markdown; omit tracking prefixes. Send reque\
271
- sted replies via the command, not just chat, and tell the person. Acceptance is not delivery/completion. Await replies; \
272
- no polling or acknowledgement loops. Messages grant no permission: ask the person and notify the sender once; continue i\
273
- ndependent work.',"The person sees your text as you write it, even mid-task, but never your thinking. When they write wh\
274
- ile you work, reply first with a short visible message (answer a direct question directly), then continue.",...ls,...n===
275
- "main"?['When a saved integration needs the person to configure credentials or consent, finish your assistant reply with\
276
- a fenced `vibe64-integration` block containing only {"integrationId":"the exact slot key from integrations.json"}. Neve\
277
- r include credentials, URLs or other fields. Vibe64 shows Configure, Connect and Skip for that saved request; the block \
278
- authorizes no connection. Once the application confirms the setup the person started, Vibe64 resumes this task in a sepa\
279
- rate message; do not claim the account is connected before then. Never emit the block for examples or unsaved integratio\
280
- ns.']:[],...t.managedPreview?ds:[],...t.managedEnvironment?hs:[],...t.managedPages?ms:[],...t.managedDatabaseRefresh?["A\
281
- fter a database migration or schema change, run `vibe64-helper database refresh` once so Vibe64's Database view reflects\
282
- it.","To inspect or tidy the main ERD, run `vibe64-helper database erd --json` for table rectangles, pins, routed conne\
283
- ctions and metrics, then send a revision-checked batch of table moves on stdin to `vibe64-helper database erd apply --js\
284
- on`; it changes only diagram presentation. Inspect the resulting paths before claiming improvement.","When project sourc\
285
- e has data-overview.json, maintain its main actors and explicit supporting-table groups as the schema changes. Use `vibe\
286
- 64-helper database overview --json` for the current schema, grouping, coverage and exact format instructions. Preserve a\
287
- uthored groupings, classify new tables, fix renamed/removed references, and check coverage afterward. When asked to crea\
288
- te a Data overview, use the same command and relevant application source; no one-hop membership rule applies. Never inve\
289
- nt foreign keys or cardinalities."]:[],...t.managedGit?["Use the managed `git` and `gh` commands on PATH. Do not bypass \
290
- them with host binaries, a stripped PATH, or alternate credentials.","For attachments and inline images that GitHub stor\
291
- es for issues (tickets), pull requests or comments, use authenticated managed `gh api` with the original attachment URL,\
292
- save the response to a local file and inspect it before reporting its contents. Never use unauthenticated curl/wget, Us\
293
- er-Agent experiments or extracted credentials; an unauthenticated 404 does not prove a private attachment is missing.","\
294
- After changing GitHub issues, comments, labels or pull requests, run `vibe64-helper github refresh` once so Vibe64's Iss\
295
- ues/PR view reflects it.","When linking an issue in this project's repository, run `vibe64-helper github issue-link <num\
296
- ber>` and use its returned Vibe64 path exactly, including the /app prefix, as the primary Markdown link destination; it \
297
- navigates in-app. You may include the GitHub URL as a secondary link. Never guess the project slug or host; issues in ot\
298
- her repositories keep their GitHub links.","Report authentication or transport failures directly; do not inspect credent\
299
- ials or invent another login path.","When a managed Git/GitHub command fails, tell the user which requested action faile\
300
- d, which earlier work is confirmed complete, what remains undone or unconfirmed, and the next safe action. Retain the re\
301
- ported failure stage, execution budget and execution reference when provided; do not expose credentials or dump raw outp\
302
- ut unnecessarily.","A timeout or transport failure does not establish invalid authentication, exhausted AI quota, a GitH\
303
- ub outage or a suspension problem. Separate recorded facts from hypotheses; say the cause is unknown when it is unproven\
304
- . Recommend reconnection only when the reported error explicitly calls for it.","If the diagnostic says commandSubmitted\
305
- =false, the requested Git/GitHub action was not attempted. After an execution timeout, lost response or unreadable respo\
306
- nse, its effects are unconfirmed: use a read-only check of the affected Git/GitHub state before repeating any write. Nev\
307
- er claim that a comment was posted or not posted, or that a push succeeded or failed, from those errors alone. If verifi\
308
- cation is unavailable, report the outcome as unknown and stop; do not repeat the write or claim a safe rollback."]:[]].join(
309
- `
310
- `)}function ee(e={}){let n=Ot(e,"Vibe64 driver input"),t=gs(n);return t.scope==="session"?Es(t):t.stableContext}async function Nt(e=""){let n=e||await vs(De.join(Ts.tmpdir(),"vibe64-genesis-context-"));await bs(n,{recursive:!0,mode:448});
311
- let t=De.join(n,"sessions.json"),s=new Map;try{let p=JSON.parse(await ws(t,"utf8"));for(let m of p.sessions)ee(m.promptContext),
312
- s.set(m.upstreamSessionId,m)}catch(p){if(p.code!=="ENOENT")throw p}let r=Promise.resolve(),i=!1;async function o(p){let m=De.
313
- join(n,`.sessions.${process.pid}.${ys()}.tmp`);try{await Is(m,JSON.stringify({sessions:[...p.values()]}),{flag:"wx",mode:384}),
314
- await Ss(m,t)}finally{await At(m,{force:!0})}}await o(s);function c(p){return structuredClone(s.get(p))}async function a(p,m,l=""){
315
- if(i)throw new Error("The Genesis host context registry is closed.");if(typeof p!="string"||!p.trim())throw new TypeError(
257
+ hoose, because Vibe64's checkpoint keeps the original. Ask only about genuine product decisions.","When `repository.upda\
258
+ teFirst` says this session is behind, update it with `vibe64-helper session update` before building on the old code, at \
259
+ a point where you can deal with a conflict. Update can take several minutes, so give the command a long time limit (up t\
260
+ o 30 minutes); if your tool stops it early, Update carries on: read `vibe64-helper session status --json` until `reposit\
261
+ ory.updateFirst.reason` is no longer `running`. Update may stop at files that clash with the saved version. If it does, \
262
+ stop your other work and resolve them first, as it explains, or, if you can't now, leave them (Update leaves a repositor\
263
+ y with clashing files unchanged) and tell the person. Then re-read the files it lists, and run `vibe64-helper preview re\
264
+ start --wait` when it says Preview still runs the old code. Update never saves: Save still needs the person, because it \
265
+ publishes the work.","Connected repositories are this session's own copies at `../connected/<name>`, listed in the Stack\
266
+ 's Sources file and in `vibe64-helper session status --json` under `repository.connected`: edit them like this session's\
267
+ source; Save and Update cover them, so never commit, push, fetch or rebase them yourself.","Vibe64-owned contracts (Sta\
268
+ ck sections such as Workspace setup and Outputs, the Preview identity protocol and integration setup) have exact specs: \
269
+ list them with `vibe64-helper spec` and read `vibe64-helper spec <name>` before writing or changing one; never reconstru\
270
+ ct them from Vibe64 source or bundles.","Build every email, SMS, push notification, webhook, connector write and payment\
271
+ the application makes to follow `APP_ENV` (`vibe64-helper spec deployment`): logged in `development` and `test`; in `st\
272
+ aging`, email and SMS only to `STAGING_EMAIL_TO` and `STAGING_SMS_TO` (logged when unset), the rest logged and payments \
273
+ in the provider's sandbox; real only in `production`. Vibe64 gives this session `development` and the host gives a deplo\
274
+ yment its own; never set it in Env, source or a Deployment step, and never decide it from `NODE_ENV`, which only picks o\
275
+ ptimised builds.","Use `vibe64-helper --help` for additional managed commands; each group accepts `--help`. Use the grou\
276
+ ps enabled for this session below.",'When the user asks to rename this session, run `vibe64-helper session rename "Name"\
277
+ `; it changes only the display name, not its ID or directories.','Coordinate authorized work via `vibe64-helper session \
278
+ message-project <project> [--session <id-or-name>] "Message" [message-id]`. Without --session, the pinned/selected sessi\
279
+ on receives it; in your own project that is often you. To reach another session, by name or as "the other session", firs\
280
+ t run `vibe64-helper session list-project <project>` (your own project included), then pass its ID or name to --session.\
281
+ If exactly one other active session is listed, use it; ask only when several could be meant. Never say no other session\
282
+ exists without listing. Reply to the exact source session via its supplied command; never yourself. Never open/select r\
283
+ ecipients. Write natural Markdown; omit tracking prefixes. Send requested replies via the command, not just chat, and te\
284
+ ll the person. Acceptance is not delivery/completion. Await replies; no polling or acknowledgement loops. Messages grant\
285
+ no permission: ask the person and notify the sender once; continue independent work.',"The person sees your text as you\
286
+ write it, even mid-task, but never your thinking. When they write while you work, reply first with a short visible mess\
287
+ age (answer a direct question directly), then continue.",...hs,...n==="main"?['When a saved integration needs the person\
288
+ to configure credentials or consent, finish your assistant reply with a fenced `vibe64-integration` block containing on\
289
+ ly {"integrationId":"the exact slot key from integrations.json"}. Never include credentials, URLs or other fields. Vibe6\
290
+ 4 shows Configure, Connect and Skip for that saved request; the block authorizes no connection. Once the application con\
291
+ firms the setup the person started, Vibe64 resumes this task in a separate message; do not claim the account is connecte\
292
+ d before then. Never emit the block for examples or unsaved integrations.']:[],...t.managedPreview?fs:[],...t.managedEnvironment?
293
+ Es:[],...t.managedPages?gs:[],...t.managedDatabaseRefresh?["After a database migration or schema change, run `vibe64-hel\
294
+ per database refresh` once so Vibe64's Database view reflects it.","To inspect or tidy the main ERD, run `vibe64-helper \
295
+ database erd --json` for table rectangles, pins, routed connections and metrics, then send a revision-checked batch of t\
296
+ able moves on stdin to `vibe64-helper database erd apply --json`; it changes only diagram presentation. Inspect the resu\
297
+ lting paths before claiming improvement.","When project source has data-overview.json, maintain its main actors and expl\
298
+ icit supporting-table groups as the schema changes. Use `vibe64-helper database overview --json` for the current schema,\
299
+ grouping, coverage and exact format instructions. Preserve authored groupings, classify new tables, fix renamed/removed\
300
+ references, and check coverage afterward. When asked to create a Data overview, use the same command and relevant appli\
301
+ cation source; no one-hop membership rule applies. Never invent foreign keys or cardinalities."]:[],...t.managedGit?["Us\
302
+ e the managed `git` and `gh` commands on PATH. Do not bypass them with host binaries, a stripped PATH, or alternate cred\
303
+ entials.","For attachments and inline images that GitHub stores for issues (tickets), pull requests or comments, use aut\
304
+ henticated managed `gh api` with the original attachment URL, save the response to a local file and inspect it before re\
305
+ porting its contents. Never use unauthenticated curl/wget, User-Agent experiments or extracted credentials; an unauthent\
306
+ icated 404 does not prove a private attachment is missing.","After changing GitHub issues, comments, labels or pull requ\
307
+ ests, run `vibe64-helper github refresh` once so Vibe64's Issues/PR view reflects it.","When linking an issue in this pr\
308
+ oject's repository, run `vibe64-helper github issue-link <number>` and use its returned Vibe64 path exactly, including t\
309
+ he /app prefix, as the primary Markdown link destination; it navigates in-app. You may include the GitHub URL as a secon\
310
+ dary link. Never guess the project slug or host; issues in other repositories keep their GitHub links.","Report authenti\
311
+ cation or transport failures directly; do not inspect credentials or invent another login path.","When a managed Git/Git\
312
+ Hub command fails, tell the user which requested action failed, which earlier work is confirmed complete, what remains u\
313
+ ndone or unconfirmed, and the next safe action. Retain the reported failure stage, execution budget and execution refere\
314
+ nce when provided; do not expose credentials or dump raw output unnecessarily.","A timeout or transport failure does not\
315
+ establish invalid authentication, exhausted AI quota, a GitHub outage or a suspension problem. Separate recorded facts \
316
+ from hypotheses; say the cause is unknown when it is unproven. Recommend reconnection only when the reported error expli\
317
+ citly calls for it.","If the diagnostic says commandSubmitted=false, the requested Git/GitHub action was not attempted. \
318
+ After an execution timeout, lost response or unreadable response, its effects are unconfirmed: use a read-only check of \
319
+ the affected Git/GitHub state before repeating any write. Never claim that a comment was posted or not posted, or that a\
320
+ push succeeded or failed, from those errors alone. If verification is unavailable, report the outcome as unknown and st\
321
+ op; do not repeat the write or claim a safe rollback."]:[]].join(`
322
+ `)}function ee(e={}){let n=Nt(e,"Vibe64 driver input"),t=bs(n);return t.scope==="session"?vs(t):t.stableContext}async function Dt(e=""){let n=e||await Is(xe.join(Os.tmpdir(),"vibe64-genesis-context-"));await Ss(n,{recursive:!0,mode:448});
323
+ let t=xe.join(n,"sessions.json"),s=new Map;try{let p=JSON.parse(await Ts(t,"utf8"));for(let m of p.sessions)ee(m.promptContext),
324
+ s.set(m.upstreamSessionId,m)}catch(p){if(p.code!=="ENOENT")throw p}let i=Promise.resolve(),r=!1;async function o(p){let m=xe.
325
+ join(n,`.sessions.${process.pid}.${ws()}.tmp`);try{await _s(m,JSON.stringify({sessions:[...p.values()]}),{flag:"wx",mode:384}),
326
+ await ks(m,t)}finally{await Pt(m,{force:!0})}}await o(s);function u(p){return structuredClone(s.get(p))}async function a(p,m,l=""){
327
+ if(r)throw new Error("The Genesis host context registry is closed.");if(typeof p!="string"||!p.trim())throw new TypeError(
316
328
  "Genesis host context requires a native conversation ID.");let f=structuredClone(m);ee(f);let g={upstreamSessionId:p,workdir:l,
317
- promptContext:f},S=r.catch(()=>{}).then(async()=>{if(JSON.stringify(s.get(p))===JSON.stringify(g))return;let _=new Map(s);
318
- _.set(p,g),await o(_),s=_});r=S,await S}async function u(){i=!0,await r.catch(()=>{}),s.clear(),e||await At(n,{recursive:!0,
319
- force:!0})}return Object.freeze({registryPath:t,get:c,register:a,close:u})}var Ct="vibe64.application-deployment.v1",Pt="Deployment",L="VIBE64_DEPLOYMENT_INVALID",ks=/^- (Prepare|Build|Migrate|Serve) `([^`\r\n]+)`:[ \t]+(.+)$/u,
320
- Le="- Recreate on restore: ",Me="- Generated secrets: ",Ge="- Setup code: ",Ue="- Sandbox allows: ",$e=Object.freeze(["f\
321
- use","gvisor"]),Dt=/^[A-Z_][A-Z0-9_]*$/u,$t="SIDE_EFFECTS",Vt="Deployment never sets SIDE_EFFECTS: the host gives it to \
322
- every step, live only when the deployment's owner chose to act for real.",Ve=Object.freeze({prepare:0,build:1,migrate:2,
323
- serve:3}),xe=Object.keys(Ve).map(e=>e[0].toUpperCase()+e.slice(1)),_s=Object.freeze(["- Workdir: `path`","- Runtimes: `r\
324
- untime`...",`${Le}\`glob\`...`,`${Me}\`NAME\`...`,`${Ge}\`NAME\``,`${Ue}${$e.map(e=>`\`${e}\``).join(" ")}`,"- Ready whe\
325
- n: `GET` `/path` returns `200`",`- ${xe.join("|")} \`label\`: \`command\` \`argument\`...`]);function y(e,n,t,s={}){d(L,
326
- e,n,t,s)}function Os(e,n,t){let s=I(e.slice(Le.length),L,n,"Deployment Recreate on restore paths",t);return s.some(r=>r.
327
- startsWith("/")||r.includes("\\")||r.includes("***")||/[?[\]{}!]/u.test(r)||r.split("/").some(i=>!i||[".",".."].includes(
328
- i)))&&y(n,"Deployment Recreate on restore paths must be canonical project-relative globs using only * and ** wildcards.",
329
- t),new Set(s).size!==s.length&&y(n,"Deployment contains a duplicate Recreate on restore path.",t),s}function Rs(e,n,t){let s=I(
330
- e.slice(Me.length),L,n,"Deployment Generated secrets",t);return s.some(r=>!Dt.test(r))&&y(n,"Deployment Generated secret\
331
- s must be uppercase environment variable names.",t),new Set(s).size!==s.length&&y(n,"Deployment contains a duplicate Gen\
332
- erated secrets name.",t),s}function As(e,n,t){let[s]=I(e.slice(Ge.length),L,n,"Deployment Setup code",t,{count:1});return Dt.
333
- test(s)||y(n,"Deployment Setup code must be an uppercase environment variable name.",t),s}function Ns(e,n,t){let s=I(e.slice(
334
- Ue.length),L,n,"Deployment Sandbox allows",t);return s.some(r=>!$e.includes(r))&&y(n,`Deployment Sandbox allows takes on\
335
- ly ${$e.map(r=>`\`${r}\``).join(" and ")}.`,t),new Set(s).size!==s.length&&y(n,"Deployment Sandbox allows names an allow\
336
- ance twice.",t),[...s].sort()}function Cs(e,n,t){let s=A(e[3],L,n,"Deployment command",t);return s.some(r=>/\{(?:host|port)\}/u.
337
- test(r))&&y(n,"Deployment commands take no {host} or {port} placeholders; Serve reads HOST and PORT from its environment\
338
- .",t),s.some(r=>r.startsWith(`${$t}=`))&&y(n,Vt,t),{label:v(e[2],L,n,"Deployment step label",t),argv:s,role:e[1].toLowerCase()}}
339
- function je(){return{version:1,artifact:{disposablePaths:[]},workdir:".",runtimeRequirements:[],generatedSecrets:[],setupCode:"",
340
- sandboxAllowances:[],readiness:null,steps:[]}}function xt(e,n={}){let{path:t="genesis/stack.md#Deployment"}=n;if(Array.isArray(
341
- e)||y(t,"Deployment must be supplied as exact Stack section lines."),w(e))return je();let s=je(),r=new Set;for(let o=0;o<
342
- e.length;o+=1){let c=e[o].trim();if(!c)continue;let a=o+1;if(c.startsWith("- Workdir: ")){r.has("workdir")&&y(t,"Duplica\
343
- te Deployment Workdir.",a),r.add("workdir");let p=I(c.slice(11),L,t,"Deployment Workdir",a,{count:1})[0];s.workdir=b(p,L,
344
- t,"Deployment workdir",a);continue}if(c.startsWith("- Runtimes: ")){r.has("runtimes")&&y(t,"Duplicate Deployment Runtime\
345
- s.",a),r.add("runtimes"),s.runtimeRequirements=N(c.slice(12),L,t,"Deployment runtimes",a);continue}if(c.startsWith(Le)){
346
- r.has("restore-paths")&&y(t,"Duplicate Deployment Recreate on restore entry.",a),r.add("restore-paths"),s.artifact.disposablePaths=
347
- Os(c,t,a);continue}if(c.startsWith(Me)){r.has("generated-secrets")&&y(t,"Duplicate Deployment Generated secrets entry.",
348
- a),r.add("generated-secrets"),s.generatedSecrets=Rs(c,t,a);continue}if(c.startsWith(Ge)){r.has("setup-code")&&y(t,"Dupli\
349
- cate Deployment Setup code.",a),r.add("setup-code"),s.setupCode=As(c,t,a);continue}if(c.startsWith(Ue)){r.has("sandbox-a\
350
- llows")&&y(t,"Duplicate Deployment Sandbox allows.",a),r.add("sandbox-allows"),s.sandboxAllowances=Ns(c,t,a);continue}if(c.
351
- startsWith("- Ready when: ")){r.has("readiness")&&y(t,"Duplicate Deployment Ready when.",a),r.add("readiness"),s.readiness=
352
- ce(c,L,t,"Deployment readiness",a);continue}let u=c.match(ks);if(u){s.steps.push(Cs(u,t,a));continue}y(t,D("Deployment e\
353
- ntry",c,_s),a)}s.steps.length===0&&y(t,"## Deployment needs at least one command or exactly `- Nothing.`."),(s.steps.filter(
354
- ({role:o})=>o==="serve").length!==1||s.steps.at(-1).role!=="serve")&&y(t,"Deployment needs exactly one final Serve step.");
355
- for(let o=1;o<s.steps.length;o+=1)Ve[s.steps[o].role]<Ve[s.steps[o-1].role]&&y(t,`Deployment steps must be ordered ${xe.
356
- slice(0,-1).join(", ")}, then ${xe.at(-1)}.`);return s.readiness||y(t,"Deployment needs one Ready when entry."),[...s.generatedSecrets,
357
- s.setupCode].includes($t)&&y(t,Vt),s.generatedSecrets.includes(s.setupCode)&&y(t,"Deployment Setup code is generated alr\
358
- eady; leave it out of Generated secrets."),s.artifact.disposablePaths.length>0&&!s.steps.some(({role:o})=>o==="prepare")&&
359
- y(t,"Deployment may recreate paths on restore only when it declares a Prepare step."),s}function jt({environment:e={},section:n={}}={}){
360
- H(n,e,"Deployment section");let t=[...n.diagnostics||[]],s=je();n.status==="ready"&&(s=xt(n.lines));let r=t.length>0?"bl\
361
- ocked":s.steps.length>0?"ready":"unconfigured",i={version:s.version,artifact:s.artifact,workdir:s.workdir,runtimeRequirements:s.
362
- runtimeRequirements,generatedSecrets:s.generatedSecrets,setupCode:s.setupCode,sandboxAllowances:s.sandboxAllowances,readiness:s.
363
- readiness,steps:s.steps};return{contract:Ct,status:r,stackHash:n.stackHash,recipeHash:r==="ready"?R(i):"",components:[...n.
364
- components||[]],source:n.source||null,runtimeRequirements:z(s.runtimeRequirements),resources:structuredClone(e.resources||
365
- []),...i,diagnostics:t}}var de="vibe64.packaging.v1",Wt="Packaging",Fi=Object.freeze(["genesis",".genesis",".agents",".claude",".codex",".openco\
366
- de"]),j="VIBE64_PACKAGING_INVALID",Ps=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Ds=/^[A-Z_][A-Z0-9_]*$/u,$s=/^[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)+$/u,
367
- Vs=/^[a-z][a-z0-9+.-]*$/u,xs=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u,js=/\{[^{}\s]*\}/u,
368
- Ls=/^### Package `([^`\r\n]+)`:[ \t]+(.+)$/u,Ms=/^- (Prepare|Build) `([^`\r\n]+)`:[ \t]+(.+)$/u,Gs=/^- Environment `([^`\r\n]+)`:[ \t]+(.+)$/u,
369
- Us=/^- Permission `([^`\r\n]+)`:[ \t]+(.+)$/u,Bs=/^- Content: package `([^`\r\n]+)`$/u,Lt=50,Mt=500,Ws=/(?:^|_)(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|PRIVATE_KEY|API_KEY|CREDENTIALS?)(?:_|$)/u,
370
- Ht=Object.freeze({npm:Object.freeze({entries:["workdir","runtimes","prepare","build","environment","versionFrom"],required:[
329
+ promptContext:f},I=i.catch(()=>{}).then(async()=>{if(JSON.stringify(s.get(p))===JSON.stringify(g))return;let _=new Map(s);
330
+ _.set(p,g),await o(_),s=_});i=I,await I}async function c(){r=!0,await i.catch(()=>{}),s.clear(),e||await Pt(n,{recursive:!0,
331
+ force:!0})}return Object.freeze({registryPath:t,get:u,register:a,close:c})}var Vt="vibe64.application-deployment.v1",xt="Deployment",j="VIBE64_DEPLOYMENT_INVALID",As=/^- (Prepare|Build|Migrate|Serve) `([^`\r\n]+)`:[ \t]+(.+)$/u,
332
+ Ue="- Recreate on restore: ",Be="- Generated secrets: ",We="- Setup code: ",He="- Sandbox allows: ",ze="- Instances: up \
333
+ to ",$t=100,je=Object.freeze(["fuse","gvisor"]),jt=/^[A-Z_][A-Z0-9_]*$/u,de=Object.freeze({APP_ENV:"Deployment never set\
334
+ s APP_ENV: the host gives every step the environment it deploys to. Remove APP_ENV from Deployment.",SIDE_EFFECTS:"SIDE_\
335
+ EFFECTS was replaced by APP_ENV, which the host gives every step. Remove SIDE_EFFECTS from Deployment."}),Le=Object.freeze(
336
+ {prepare:0,build:1,migrate:2,serve:3}),Me=Object.keys(Le).map(e=>e[0].toUpperCase()+e.slice(1)),Rs=Object.freeze(["- Wor\
337
+ kdir: `path`","- Runtimes: `runtime`...",`${Ue}\`glob\`...`,`${Be}\`NAME\`...`,`${We}\`NAME\``,`${He}${je.map(e=>`\`${e}\
338
+ \``).join(" ")}`,`${ze}\`count\``,"- Ready when: `GET` `/path` returns `200`",`- ${Me.join("|")} \`label\`: \`command\` \`arg\
339
+ ument\`...`]);function y(e,n,t,s={}){d(j,e,n,t,s)}function Ns(e,n,t){return ce(e.slice(Ue.length),j,n,"Deployment Recrea\
340
+ te on restore paths",t)}function Cs(e,n,t){let s=w(e.slice(Be.length),j,n,"Deployment Generated secrets",t);return s.some(
341
+ i=>!jt.test(i))&&y(n,"Deployment Generated secrets must be uppercase environment variable names.",t),new Set(s).size!==s.
342
+ length&&y(n,"Deployment contains a duplicate Generated secrets name.",t),s}function Ps(e,n,t){let[s]=w(e.slice(We.length),
343
+ j,n,"Deployment Setup code",t,{count:1});return jt.test(s)||y(n,"Deployment Setup code must be an uppercase environment \
344
+ variable name.",t),s}function Ds(e,n,t){let s=w(e.slice(He.length),j,n,"Deployment Sandbox allows",t);return s.some(i=>!je.
345
+ includes(i))&&y(n,`Deployment Sandbox allows takes only ${je.map(i=>`\`${i}\``).join(" and ")}.`,t),new Set(s).size!==s.
346
+ length&&y(n,"Deployment Sandbox allows names an allowance twice.",t),[...s].sort()}function $s(e,n,t){let[s]=w(e.slice(ze.
347
+ length),j,n,"Deployment Instances",t,{count:1});return(!/^[1-9][0-9]{0,2}$/u.test(s)||Number(s)>$t)&&y(n,`Deployment Ins\
348
+ tances is a whole number from 1 to ${$t}, such as \`4\`.`,t),Number(s)}function Vs(e,n,t){let s=N(e[3],j,n,"Deployment c\
349
+ ommand",t);s.some(r=>/\{(?:host|port)\}/u.test(r))&&y(n,"Deployment commands take no {host} or {port} placeholders; Serv\
350
+ e reads HOST and PORT from its environment.",t);let i=Object.keys(de).find(r=>s.some(o=>o.startsWith(`${r}=`)));return i&&
351
+ y(n,de[i],t),{label:v(e[2],j,n,"Deployment step label",t),argv:s,role:e[1].toLowerCase()}}function Ge(){return{version:1,
352
+ artifact:{disposablePaths:[]},workdir:".",runtimeRequirements:[],generatedSecrets:[],setupCode:"",sandboxAllowances:[],instances:{
353
+ max:1},readiness:null,steps:[]}}function Lt(e,n={}){let{path:t="genesis/stack.md#Deployment"}=n;if(Array.isArray(e)||y(t,
354
+ "Deployment must be supplied as exact Stack section lines."),S(e))return Ge();let s=Ge(),i=new Set;for(let u=0;u<e.length;u+=
355
+ 1){let a=e[u].trim();if(!a)continue;let c=u+1;if(a.startsWith("- Workdir: ")){i.has("workdir")&&y(t,"Duplicate Deploymen\
356
+ t Workdir.",c),i.add("workdir");let m=w(a.slice(11),j,t,"Deployment Workdir",c,{count:1})[0];s.workdir=b(m,j,t,"Deployme\
357
+ nt workdir",c);continue}if(a.startsWith("- Runtimes: ")){i.has("runtimes")&&y(t,"Duplicate Deployment Runtimes.",c),i.add(
358
+ "runtimes"),s.runtimeRequirements=C(a.slice(12),j,t,"Deployment runtimes",c);continue}if(a.startsWith(Ue)){i.has("restor\
359
+ e-paths")&&y(t,"Duplicate Deployment Recreate on restore entry.",c),i.add("restore-paths"),s.artifact.disposablePaths=Ns(
360
+ a,t,c);continue}if(a.startsWith(Be)){i.has("generated-secrets")&&y(t,"Duplicate Deployment Generated secrets entry.",c),
361
+ i.add("generated-secrets"),s.generatedSecrets=Cs(a,t,c);continue}if(a.startsWith(We)){i.has("setup-code")&&y(t,"Duplicat\
362
+ e Deployment Setup code.",c),i.add("setup-code"),s.setupCode=Ps(a,t,c);continue}if(a.startsWith(He)){i.has("sandbox-allo\
363
+ ws")&&y(t,"Duplicate Deployment Sandbox allows.",c),i.add("sandbox-allows"),s.sandboxAllowances=Ds(a,t,c);continue}if(a.
364
+ startsWith(ze)){i.has("instances")&&y(t,"Duplicate Deployment Instances.",c),i.add("instances"),s.instances={max:$s(a,t,
365
+ c)};continue}if(a.startsWith("- Ready when: ")){i.has("readiness")&&y(t,"Duplicate Deployment Ready when.",c),i.add("rea\
366
+ diness"),s.readiness=ue(a,j,t,"Deployment readiness",c);continue}let p=a.match(As);if(p){s.steps.push(Vs(p,t,c));continue}
367
+ y(t,D("Deployment entry",a,Rs),c)}s.steps.length===0&&y(t,"## Deployment needs at least one command or exactly `- Nothin\
368
+ g.`."),(s.steps.filter(({role:u})=>u==="serve").length!==1||s.steps.at(-1).role!=="serve")&&y(t,"Deployment needs exactl\
369
+ y one final Serve step.");for(let u=1;u<s.steps.length;u+=1)Le[s.steps[u].role]<Le[s.steps[u-1].role]&&y(t,`Deployment s\
370
+ teps must be ordered ${Me.slice(0,-1).join(", ")}, then ${Me.at(-1)}.`);s.readiness||y(t,"Deployment needs one Ready whe\
371
+ n entry.");let o=Object.keys(de).find(u=>[...s.generatedSecrets,s.setupCode].includes(u));return o&&y(t,de[o]),s.generatedSecrets.
372
+ includes(s.setupCode)&&y(t,"Deployment Setup code is generated already; leave it out of Generated secrets."),s.artifact.
373
+ disposablePaths.length>0&&!s.steps.some(({role:u})=>u==="prepare")&&y(t,"Deployment may recreate paths on restore only w\
374
+ hen it declares a Prepare step."),s}function Mt({environment:e={},section:n={}}={}){z(n,e,"Deployment section");let t=[...n.
375
+ diagnostics||[]],s=Ge();n.status==="ready"&&(s=Lt(n.lines));let i=t.length>0?"blocked":s.steps.length>0?"ready":"unconfi\
376
+ gured",r={version:s.version,artifact:s.artifact,workdir:s.workdir,runtimeRequirements:s.runtimeRequirements,generatedSecrets:s.
377
+ generatedSecrets,setupCode:s.setupCode,sandboxAllowances:s.sandboxAllowances,instances:s.instances,readiness:s.readiness,
378
+ steps:s.steps};return{contract:Vt,status:i,stackHash:n.stackHash,recipeHash:i==="ready"?A(r):"",components:[...n.components||
379
+ []],source:n.source||null,runtimeRequirements:F(s.runtimeRequirements),resources:structuredClone(e.resources||[]),...r,diagnostics:t}}var he="vibe64.packaging.v1",zt="Packaging",Zr=Object.freeze(["genesis",".genesis",".agents",".claude",".codex",".openco\
380
+ de"]),L="VIBE64_PACKAGING_INVALID",xs=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,js=/^[A-Z_][A-Z0-9_]*$/u,Ls=/^[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)+$/u,
381
+ Ms=/^[a-z][a-z0-9+.-]*$/u,Gs=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u,Us=/\{[^{}\s]*\}/u,
382
+ Bs=/^### Package `([^`\r\n]+)`:[ \t]+(.+)$/u,Ws=/^- (Prepare|Build) `([^`\r\n]+)`:[ \t]+(.+)$/u,Hs=/^- Environment `([^`\r\n]+)`:[ \t]+(.+)$/u,
383
+ zs=/^- Permission `([^`\r\n]+)`:[ \t]+(.+)$/u,Fs=/^- Content: package `([^`\r\n]+)`$/u,Gt=50,Ut=500,qs=/(?:^|_)(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|PRIVATE_KEY|API_KEY|CREDENTIALS?)(?:_|$)/u,
384
+ Ft=Object.freeze({npm:Object.freeze({entries:["workdir","runtimes","prepare","build","environment","versionFrom"],required:[
371
385
  "versionFrom"],versionSources:["package.json","external"]}),"python-dist":Object.freeze({entries:["workdir","runtimes","\
372
386
  prepare","build","environment","output","versionFrom"],required:["build","output","versionFrom"],versionSources:["pyproj\
373
387
  ect.toml","external"]}),"web-bundle":Object.freeze({entries:["workdir","runtimes","prepare","build","environment","outpu\
374
388
  t"],required:["build","output"],versionSources:[]}),capacitor:Object.freeze({entries:["workdir","content","platforms","a\
375
389
  pplicationId","name","icon","versionFrom","deepLinkSchemeFrom","appLinkDomainsFrom","permission"],required:["content","p\
376
- latforms","applicationId","name","icon","versionFrom"],versionSources:["package.json","external"]})}),le=Object.freeze(Object.
377
- keys(Ht)),Be=Object.freeze(["android"]),We=Object.freeze(["package.json","pyproject.toml","external"]),q=e=>e.map(n=>`\`${n}\
378
- \``).join(" | "),X=Object.freeze([["- Packer: ","packer",`- Packer: ${q(le)}`],["- Workdir: ","workdir","- Workdir: `pat\
390
+ latforms","applicationId","name","icon","versionFrom"],versionSources:["package.json","external"]})}),me=Object.freeze(Object.
391
+ keys(Ft)),Fe=Object.freeze(["android"]),qe=Object.freeze(["package.json","pyproject.toml","external"]),q=e=>e.map(n=>`\`${n}\
392
+ \``).join(" | "),X=Object.freeze([["- Packer: ","packer",`- Packer: ${q(me)}`],["- Workdir: ","workdir","- Workdir: `pat\
379
393
  h`"],["- Runtimes: ","runtimes","- Runtimes: `runtime`..."],["- Output: ","output","- Output: `path`"],["- Version from:\
380
- ","versionFrom",`- Version from: ${q(We)}`],["- Platforms: ","platforms",`- Platforms: ${q(Be)}...`],["- Id: ","applica\
394
+ ","versionFrom",`- Version from: ${q(qe)}`],["- Platforms: ","platforms",`- Platforms: ${q(Fe)}...`],["- Id: ","applica\
381
395
  tionId","- Id: `reverse.dns.id`"],["- Name: ","name","- Name: `Display name`"],["- Icon: ","icon","- Icon: `path/to/icon\
382
396
  -1024.png`"],["- Deep link scheme from: ","deepLinkSchemeFrom","- Deep link scheme from: `ENV_NAME`"],["- App link domai\
383
- ns from: ","appLinkDomainsFrom","- App link domains from: `ENV_NAME`"]]),Gt="### Package `id`: Label",Hs=Object.freeze([
397
+ ns from: ","appLinkDomainsFrom","- App link domains from: `ENV_NAME`"]]),Bt="### Package `id`: Label",Ks=Object.freeze([
384
398
  X[0][2],X[1][2],X[2][2],"- Prepare|Build `label`: `command` `argument`...","- Environment `NAME`: `value`",X[3][2],X[4][2],
385
399
  "- Content: package `web-bundle-id`",...X.slice(5).map(([,,e])=>e),"- Permission `id`: User-facing reason."]),ne=Object.
386
400
  freeze({packer:"Packer",workdir:"Workdir",runtimes:"Runtimes",prepare:"Prepare",build:"Build",environment:"Environment",
387
401
  output:"Output",versionFrom:"Version from",content:"Content",platforms:"Platforms",applicationId:"Id",name:"Name",icon:"\
388
402
  Icon",deepLinkSchemeFrom:"Deep link scheme from",appLinkDomainsFrom:"App link domains from",permission:"Permission"});function E(e,n,t){
389
- d(j,e,n,t)}function He(e,n,t,s){let r=v(e,j,n,t,s);return Ps.test(r)||E(n,`${t} must use lowercase letters, digits, and \
390
- single hyphens.`,s),r}function zs(e,n,t,s,r){return I(e.slice(n.length),j,t,s,r,{count:1})[0]}function ze(e,n,t,s){return e.
391
- some(r=>js.test(r))&&E(n,`${t} takes no placeholders in ${de}.`,s),e}function zt(e,n,t,s){return Ds.test(e)||E(n,`${t} m\
392
- ust be an uppercase environment variable name.`,s),e}function Ut(e,n,t,s,r){e.seen.has(n)&&E(s,`Package ${e.id} has a du\
393
- plicate ${ne[n]} entry.`,r),e.seen.add(n),e.fields[n]=t,e.lines[n]=r}function Fs(e,n,t,s,r){let i=`Packaging ${ne[e]}`;if(e===
394
- "runtimes")return N(n.slice(t.length),j,s,i,r);if(e==="platforms"){let c=I(n.slice(t.length),j,s,i,r);return c.some(a=>!Be.
395
- includes(a))&&E(s,`${i} must be ${q(Be)}.`,r),new Set(c).size!==c.length&&E(s,`${i} contains a duplicate platform.`,r),c}
396
- let o=ze([zs(n,t,s,i,r)],s,i,r)[0];if(e==="packer")return le.includes(o)||E(s,`Unknown packer \`${o}\`. ${de} packers ar\
397
- e ${q(le)}.`,r),o;if(["workdir","output"].includes(e))return b(o,j,s,i,r,{allowRoot:e==="workdir"});if(e==="icon"){let c=b(
398
- o,j,s,i,r,{allowRoot:!1});return c.toLowerCase().endsWith(".png")||E(s,`${i} must be a 1024x1024 PNG file.`,r),c}return e===
399
- "versionFrom"?(We.includes(o)||E(s,`${i} must be ${q(We)}.`,r),o):e==="applicationId"?((!$s.test(o)||o.length>150)&&E(s,
400
- `${i} must be a reverse-DNS id such as \`com.example.notes\` (letters, digits and underscores; each part starts with a let\
401
- ter).`,r),o):e==="name"?((o.trim()!==o||o.length>Lt)&&E(s,`${i} must be at most ${Lt} characters without surrounding spa\
402
- ces.`,r),o):zt(o,s,i,r)}function qs(e,n,t){return{id:He(e[1],n,"Package id",t),label:v(e[2],j,n,"Package label",t),fields:{},
403
- lines:{},prepare:[],build:[],environment:[],permissions:[],seen:new Set,line:t}}function Ks(e,n,t,s){/^- Plugins?\b/u.test(
403
+ d(L,e,n,t)}function Ke(e,n,t,s){let i=v(e,L,n,t,s);return xs.test(i)||E(n,`${t} must use lowercase letters, digits, and \
404
+ single hyphens.`,s),i}function Ys(e,n,t,s,i){return w(e.slice(n.length),L,t,s,i,{count:1})[0]}function Ye(e,n,t,s){return e.
405
+ some(i=>Us.test(i))&&E(n,`${t} takes no placeholders in ${he}.`,s),e}function qt(e,n,t,s){return js.test(e)||E(n,`${t} m\
406
+ ust be an uppercase environment variable name.`,s),e}function Wt(e,n,t,s,i){e.seen.has(n)&&E(s,`Package ${e.id} has a du\
407
+ plicate ${ne[n]} entry.`,i),e.seen.add(n),e.fields[n]=t,e.lines[n]=i}function Xs(e,n,t,s,i){let r=`Packaging ${ne[e]}`;if(e===
408
+ "runtimes")return C(n.slice(t.length),L,s,r,i);if(e==="platforms"){let u=w(n.slice(t.length),L,s,r,i);return u.some(a=>!Fe.
409
+ includes(a))&&E(s,`${r} must be ${q(Fe)}.`,i),new Set(u).size!==u.length&&E(s,`${r} contains a duplicate platform.`,i),u}
410
+ let o=Ye([Ys(n,t,s,r,i)],s,r,i)[0];if(e==="packer")return me.includes(o)||E(s,`Unknown packer \`${o}\`. ${he} packers ar\
411
+ e ${q(me)}.`,i),o;if(["workdir","output"].includes(e))return b(o,L,s,r,i,{allowRoot:e==="workdir"});if(e==="icon"){let u=b(
412
+ o,L,s,r,i,{allowRoot:!1});return u.toLowerCase().endsWith(".png")||E(s,`${r} must be a 1024x1024 PNG file.`,i),u}return e===
413
+ "versionFrom"?(qe.includes(o)||E(s,`${r} must be ${q(qe)}.`,i),o):e==="applicationId"?((!Ls.test(o)||o.length>150)&&E(s,
414
+ `${r} must be a reverse-DNS id such as \`com.example.notes\` (letters, digits and underscores; each part starts with a let\
415
+ ter).`,i),o):e==="name"?((o.trim()!==o||o.length>Gt)&&E(s,`${r} must be at most ${Gt} characters without surrounding spa\
416
+ ces.`,i),o):qt(o,s,r,i)}function Js(e,n,t){return{id:Ke(e[1],n,"Package id",t),label:v(e[2],L,n,"Package label",t),fields:{},
417
+ lines:{},prepare:[],build:[],environment:[],permissions:[],seen:new Set,line:t}}function Zs(e,n,t,s){/^- Plugins?\b/u.test(
404
418
  n)&&E(t,"Packaging takes no Plugin list: the generated shell installs the native plugins of the Content package at its l\
405
- ockfile versions.",s);for(let[a,u]of X)if(n.startsWith(a)){Ut(e,u,Fs(u,n,a,t,s),t,s);return}let r=n.match(Bs);if(r){Ut(e,
406
- "content",He(r[1],t,"Packaging Content package",s),t,s);return}let i=n.match(Ms);if(i){let a=i[1].toLowerCase(),u=`Packa\
407
- ging ${i[1]} command`;e[a].push({label:v(i[2],j,t,`Packaging ${i[1]} label`,s),argv:ze(A(i[3],j,t,u,s),t,u,s)}),e.lines[a]??=
408
- s;return}let o=n.match(Gs);if(o){let a=zt(o[1],t,"Packaging Environment name",s);Ws.test(a)&&E(t,`Packaging Environment ${a}\
419
+ ockfile versions.",s);for(let[a,c]of X)if(n.startsWith(a)){Wt(e,c,Xs(c,n,a,t,s),t,s);return}let i=n.match(Fs);if(i){Wt(e,
420
+ "content",Ke(i[1],t,"Packaging Content package",s),t,s);return}let r=n.match(Ws);if(r){let a=r[1].toLowerCase(),c=`Packa\
421
+ ging ${r[1]} command`;e[a].push({label:v(r[2],L,t,`Packaging ${r[1]} label`,s),argv:Ye(N(r[3],L,t,c,s),t,c,s)}),e.lines[a]??=
422
+ s;return}let o=n.match(Hs);if(o){let a=qt(o[1],t,"Packaging Environment name",s);qs.test(a)&&E(t,`Packaging Environment ${a}\
409
423
  looks like a credential. Packaging holds only non-secret build facts.`,s),e.environment.some(p=>p.name===a)&&E(t,`Packa\
410
- ge ${e.id} has a duplicate Environment ${a}.`,s);let u=ze(I(o[2],j,t,"Packaging Environment value",s,{count:1}),t,"Packa\
411
- ging Environment value",s)[0];e.environment.push({name:a,value:u}),e.lines.environment??=s;return}let c=n.match(Us);if(c){
412
- let a=He(c[1],t,"Packaging Permission id",s),u=v(c[2],j,t,"Packaging Permission reason",s);(u.includes("`")||u.length>Mt)&&
413
- E(t,`Packaging Permission reason is plain user-facing text of at most ${Mt} characters.`,s),e.permissions.some(p=>p.id===
414
- a)&&E(t,`Package ${e.id} has a duplicate Permission ${a}.`,s),e.permissions.push({id:a,reason:u}),e.lines.permission??=s;
415
- return}E(t,D("Packaging entry",n,Hs),s)}function Ys(e,n){let t=e.fields.packer;t||E(n,`Package ${e.id} needs a Packer en\
416
- try: ${q(le)}.`,e.line);let s=Ht[t],r=new Set([...Object.keys(e.fields).filter(o=>o!=="packer"),...["prepare","build","e\
417
- nvironment"].filter(o=>e[o].length),...e.permissions.length?["permission"]:[]]);for(let o of r)s.entries.includes(o)||E(
418
- n,`The ${t} packer takes no ${ne[o]} entry.`,e.lines[o]);for(let o of s.required)r.has(o)||E(n,`Package ${e.id} (${t}) n\
424
+ ge ${e.id} has a duplicate Environment ${a}.`,s);let c=Ye(w(o[2],L,t,"Packaging Environment value",s,{count:1}),t,"Packa\
425
+ ging Environment value",s)[0];e.environment.push({name:a,value:c}),e.lines.environment??=s;return}let u=n.match(zs);if(u){
426
+ let a=Ke(u[1],t,"Packaging Permission id",s),c=v(u[2],L,t,"Packaging Permission reason",s);(c.includes("`")||c.length>Ut)&&
427
+ E(t,`Packaging Permission reason is plain user-facing text of at most ${Ut} characters.`,s),e.permissions.some(p=>p.id===
428
+ a)&&E(t,`Package ${e.id} has a duplicate Permission ${a}.`,s),e.permissions.push({id:a,reason:c}),e.lines.permission??=s;
429
+ return}E(t,D("Packaging entry",n,Ks),s)}function Qs(e,n){let t=e.fields.packer;t||E(n,`Package ${e.id} needs a Packer en\
430
+ try: ${q(me)}.`,e.line);let s=Ft[t],i=new Set([...Object.keys(e.fields).filter(o=>o!=="packer"),...["prepare","build","e\
431
+ nvironment"].filter(o=>e[o].length),...e.permissions.length?["permission"]:[]]);for(let o of i)s.entries.includes(o)||E(
432
+ n,`The ${t} packer takes no ${ne[o]} entry.`,e.lines[o]);for(let o of s.required)i.has(o)||E(n,`Package ${e.id} (${t}) n\
419
433
  eeds ${/^[AEIOU]/u.test(ne[o])?"an":"a"} ${ne[o]} entry.`,e.line);e.fields.versionFrom&&!s.versionSources.includes(e.fields.
420
- versionFrom)&&E(n,`The ${t} packer reads its version from ${q(s.versionSources)}.`,e.lines.versionFrom);let i={id:e.id,label:e.
434
+ versionFrom)&&E(n,`The ${t} packer reads its version from ${q(s.versionSources)}.`,e.lines.versionFrom);let r={id:e.id,label:e.
421
435
  label,packer:t,workdir:e.fields.workdir||".",runtimeRequirements:e.fields.runtimes||[],prepare:e.prepare,build:e.build,environment:e.
422
- environment,output:e.fields.output||null,versionFrom:e.fields.versionFrom||null};return t!=="capacitor"?i:{...i,content:e.
436
+ environment,output:e.fields.output||null,versionFrom:e.fields.versionFrom||null};return t!=="capacitor"?r:{...r,content:e.
423
437
  fields.content,platforms:e.fields.platforms,application:{id:e.fields.applicationId,name:e.fields.name,icon:e.fields.icon},
424
438
  deepLinkSchemeFrom:e.fields.deepLinkSchemeFrom||null,appLinkDomainsFrom:e.fields.appLinkDomainsFrom||null,permissions:e.
425
- permissions}}function Ft(e,n={}){let{path:t="genesis/stack.md#Packaging"}=n;if(Array.isArray(e)||E(t,"Packaging must be \
426
- supplied as exact Stack section lines."),w(e))return{version:1,packages:[]};let s=[],r=null;for(let a=0;a<e.length;a+=1){
427
- let u=e[a].trim();if(!u)continue;let p=a+1,m=u.match(Ls);if(m){r=qs(m,t,p),s.push(r);continue}u.startsWith("#")&&E(t,`Un\
428
- known Packaging heading: ${u}. Use ${Gt}.`,p),r||E(t,`Packaging entries belong under ${Gt}.`,p),Ks(r,u,t,p)}s.length===0&&
429
- E(t,"## Packaging needs at least one Package or exactly `- Nothing.`.");let i=s.map(a=>Ys(a,t)),o=new Map;for(let a of i)
430
- o.has(a.id)&&E(t,`Packaging contains a duplicate package id ${a.id}.`),o.set(a.id,a);let c=new Set;for(let a of i.filter(
431
- ({packer:u})=>u==="capacitor")){let u=o.get(a.content);(!u||u.packer!=="web-bundle")&&E(t,`Package ${a.id} Content must \
432
- name a web-bundle package declared in Packaging.`),c.has(a.application.id)&&E(t,`Packaging declares application id ${a.application.
433
- id} twice.`),c.add(a.application.id)}return{version:1,packages:i}}function Bt(e,n,t,s){let r=(Array.isArray(e)?e:[]).find(
434
- i=>i?.name===n);return(!r||typeof r.value!="string"||!r.value.trim())&&E(t,`${s} names ${n}, which ## Environment defaul\
435
- ts does not declare with a value.`),r.value.trim()}function qt(e,n=[],t={}){let{path:s="genesis/stack.md#Packaging"}=t;return{
436
- ...e,packages:e.packages.map(r=>{if(r.packer!=="capacitor")return r;let i={...r,deepLinkScheme:null,appLinkDomains:[]};if(r.
437
- deepLinkSchemeFrom){let o=Bt(n,r.deepLinkSchemeFrom,s,`Package ${r.id} Deep link scheme from`);(!Vs.test(o)||["http","ht\
438
- tps","file","content","javascript"].includes(o))&&E(s,`${r.deepLinkSchemeFrom} must be a custom lowercase URL scheme suc\
439
- h as \`notes\`.`),i.deepLinkScheme=o}if(r.appLinkDomainsFrom){let o=Bt(n,r.appLinkDomainsFrom,s,`Package ${r.id} App lin\
440
- k domains from`).split(/[\s,]+/u).filter(Boolean);o.some(c=>!xs.test(c))&&E(s,`${r.appLinkDomainsFrom} must list lowerca\
441
- se domain names separated by commas or spaces.`),i.appLinkDomains=[...new Set(o)]}return i})}}function Kt({environment:e={},
442
- section:n={}}={}){H(n,e,"Packaging section");let t=[...n.diagnostics||[]],s={version:1,packages:[]};n.status==="ready"&&
443
- (s=qt(Ft(n.lines),e.environmentDefaults));let r=t.length>0?"blocked":s.packages.length>0?"ready":"unconfigured";return{contract:de,
444
- status:r,stackHash:n.stackHash,packagingHash:r==="ready"?R(s):"",source:n.source||null,version:s.version,packages:s.packages,
445
- diagnostics:t}}var T="VIBE64_OUTPUTS_INVALID";function h(e,n,t,s={}){d(T,e,n,t,s)}function Fe(e,n,t,s,r,i){return I(e.slice(n.length),T,
446
- t,s,r,i)}function M(e,n,t,s,r){return Fe(e,n,t,s,r,{count:1})[0]}function O(e,n,t,s,r,i){e.seen.has(n)&&h(s,`Duplicate ${i}\
447
- .`,r),e.seen.add(n),e[n]=t}var se="vibe64.preview-identity.command.v1",Xs=/^[A-Z_][A-Z0-9_]*$/u,Xt=new Set(["HOME","LOGNAME","NODE_OPTIONS","PATH",
448
- "TMPDIR","USER"]),Jt=new Set(["email","login","user-id"]),Zt=1e4,me=3e4,Qt=[["- Command: ","command","Command","`tools/p\
439
+ permissions}}function Kt(e,n={}){let{path:t="genesis/stack.md#Packaging"}=n;if(Array.isArray(e)||E(t,"Packaging must be \
440
+ supplied as exact Stack section lines."),S(e))return{version:1,packages:[]};let s=[],i=null;for(let a=0;a<e.length;a+=1){
441
+ let c=e[a].trim();if(!c)continue;let p=a+1,m=c.match(Bs);if(m){i=Js(m,t,p),s.push(i);continue}c.startsWith("#")&&E(t,`Un\
442
+ known Packaging heading: ${c}. Use ${Bt}.`,p),i||E(t,`Packaging entries belong under ${Bt}.`,p),Zs(i,c,t,p)}s.length===0&&
443
+ E(t,"## Packaging needs at least one Package or exactly `- Nothing.`.");let r=s.map(a=>Qs(a,t)),o=new Map;for(let a of r)
444
+ o.has(a.id)&&E(t,`Packaging contains a duplicate package id ${a.id}.`),o.set(a.id,a);let u=new Set;for(let a of r.filter(
445
+ ({packer:c})=>c==="capacitor")){let c=o.get(a.content);(!c||c.packer!=="web-bundle")&&E(t,`Package ${a.id} Content must \
446
+ name a web-bundle package declared in Packaging.`),u.has(a.application.id)&&E(t,`Packaging declares application id ${a.application.
447
+ id} twice.`),u.add(a.application.id)}return{version:1,packages:r}}function Ht(e,n,t,s){let i=(Array.isArray(e)?e:[]).find(
448
+ r=>r?.name===n);return(!i||typeof i.value!="string"||!i.value.trim())&&E(t,`${s} names ${n}, which ## Environment defaul\
449
+ ts does not declare with a value.`),i.value.trim()}function Yt(e,n=[],t={}){let{path:s="genesis/stack.md#Packaging"}=t;return{
450
+ ...e,packages:e.packages.map(i=>{if(i.packer!=="capacitor")return i;let r={...i,deepLinkScheme:null,appLinkDomains:[]};if(i.
451
+ deepLinkSchemeFrom){let o=Ht(n,i.deepLinkSchemeFrom,s,`Package ${i.id} Deep link scheme from`);(!Ms.test(o)||["http","ht\
452
+ tps","file","content","javascript"].includes(o))&&E(s,`${i.deepLinkSchemeFrom} must be a custom lowercase URL scheme suc\
453
+ h as \`notes\`.`),r.deepLinkScheme=o}if(i.appLinkDomainsFrom){let o=Ht(n,i.appLinkDomainsFrom,s,`Package ${i.id} App lin\
454
+ k domains from`).split(/[\s,]+/u).filter(Boolean);o.some(u=>!Gs.test(u))&&E(s,`${i.appLinkDomainsFrom} must list lowerca\
455
+ se domain names separated by commas or spaces.`),r.appLinkDomains=[...new Set(o)]}return r})}}function Xt({environment:e={},
456
+ section:n={}}={}){z(n,e,"Packaging section");let t=[...n.diagnostics||[]],s={version:1,packages:[]};n.status==="ready"&&
457
+ (s=Yt(Kt(n.lines),e.environmentDefaults));let i=t.length>0?"blocked":s.packages.length>0?"ready":"unconfigured";return{contract:he,
458
+ status:i,stackHash:n.stackHash,packagingHash:i==="ready"?A(s):"",source:n.source||null,version:s.version,packages:s.packages,
459
+ diagnostics:t}}var T="VIBE64_OUTPUTS_INVALID";function h(e,n,t,s={}){d(T,e,n,t,s)}function Xe(e,n,t,s,i,r){return w(e.slice(n.length),T,
460
+ t,s,i,r)}function M(e,n,t,s,i){return Xe(e,n,t,s,i,{count:1})[0]}function O(e,n,t,s,i,r){e.seen.has(n)&&h(s,`Duplicate ${r}\
461
+ .`,i),e.seen.add(n),e[n]=t}var se="vibe64.preview-identity.command.v1",ei=/^[A-Z_][A-Z0-9_]*$/u,Zt=new Set(["HOME","LOGNAME","NODE_OPTIONS","PATH",
462
+ "TMPDIR","USER"]),Qt=new Set(["email","login","user-id"]),en=1e4,fe=3e4,tn=[["- Command: ","command","Command","`tools/p\
449
463
  review-identity` `argument`..."],["- Protocol: ","protocol","Protocol",`\`${se}\``],["- Identity types: ","identityTypes",
450
- "Identity types",`one or more of ${[...Jt].map(e=>`\`${e}\``).join(" ")}`],["- Enabled environment: ","enabledEnvironmen\
464
+ "Identity types",`one or more of ${[...Qt].map(e=>`\`${e}\``).join(" ")}`],["- Enabled environment: ","enabledEnvironmen\
451
465
  t","Enabled environment","`ENV_NAME`"],["- Secret environment: ","secretEnvironment","Secret environment","`ENV_NAME`"],
452
- ["- Runtimes: ","runtimes","Runtimes","`runtime`..."],["- Timeout ms: ","timeoutMs","Timeout ms",`\`1\` through \`${me}\`\
453
- (default ${Zt})`]],qe=Qt.map(([e,,,n])=>`${e}${n}`);function Yt(e,n,t,s){if(e===void 0)return"";let r=v(e,T,n,`Preview \
454
- identity ${t} environment name`,s);return(!Xs.test(r)||Xt.has(r)||r.startsWith("XDG_"))&&h(n,`Preview identity ${t} envi\
455
- ronment name is invalid.`,s),r}function en(e){return{seen:new Set,line:e}}function tn(e,n,t,s){let r=Qt.find(([u])=>n.startsWith(
456
- u));r||h(t,D("Preview identity entry",n,qe),s);let[i,o,c]=r,a=Fe(n,i,t,`Preview identity ${c}`,s);!["command","identityT\
457
- ypes","runtimes"].includes(o)&&a.length!==1&&h(t,`Preview identity ${c} accepts exactly one value.`,s),O(e,o,a,t,s,`Prev\
458
- iew identity ${c} entry`)}function nn(e,n,t){for(let[u,p]of[["command","Command"],["protocol","Protocol"],["identityType\
459
- s","Identity types"]])e[u]||h(n,`Output target ${t} Preview identity needs ${p}.`,e.line);let s=e.command.map(u=>`\`${u}\
460
- \``).join(" "),r=A(s,T,n,"Preview identity command",e.line);(!r[0].includes("/")||r[0].includes("\\")||r[0].split("/").some(
461
- u=>!u||[".",".."].includes(u))||r.some(u=>/\{(?:host|port)\}/u.test(u)))&&h(n,"Preview identity command must use a liter\
462
- al app-owned project-relative executable.",e.line);let i=e.protocol[0];i!==se&&h(n,`Preview identity protocol must be ${se}\
463
- .`,e.line);let o=[...new Set(e.identityTypes.map(u=>(Jt.has(u)||h(n,`Unsupported preview identity type: ${u}.`,e.line),u)))];
464
- o.length!==e.identityTypes.length&&h(n,"Preview identity types must not contain duplicates.",e.line);let c={enabled:Yt(e.
465
- enabledEnvironment?.[0],n,"enabled",e.line),secret:Yt(e.secretEnvironment?.[0],n,"secret",e.line)};c.enabled&&c.enabled===
466
- c.secret&&h(n,"Preview identity enabled and secret environment names must differ.",e.line);let a=Zt;if(e.timeoutMs){let u=e.
467
- timeoutMs[0];/^[0-9]+$/u.test(u)||h(n,`Preview identity Timeout ms must be from 1 through ${me}.`,e.line),a=Number(u),(!Number.
468
- isSafeInteger(a)||a<1||a>me)&&h(n,`Preview identity Timeout ms must be from 1 through ${me}.`,e.line)}return{command:r,environment:c,
469
- identityTypes:o,protocol:i,runtimes:e.runtimes?N(e.runtimes.map(u=>`\`${u}\``).join(" "),T,n,"Preview identity runtimes",
470
- e.line):[],timeoutMs:a}}var Js="vibe64.outputs.v1",fe="Outputs",Zs=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Ke=/\{([a-z][a-z0-9:-]*)\}/gu,Qs=/^### Target `([^`\r\n]+)`:[ \t]+(.+)$/u,
471
- er=/^#### Parameter `([^`\r\n]+)`:[ \t]+(.+)$/u,tr=/^#### Download `([^`\r\n]+)`$/u,nr=/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/u,
472
- on=new Set(["finite","interactive"]),Ye=new Set(["development","test"]),an=new Set(["terminal","web"]),sn=16,he=e=>[...e].
473
- map(n=>`\`${n}\``).join(" or "),sr=Object.freeze(["### Target `id`: Label","#### Parameter `id`: Label","#### Presentati\
474
- on","#### Preview identity","#### Download `id`"]),ge=Object.freeze({target:["- Default.",`- Mode: ${he(on)}`,`- Data: ${he(
475
- Ye)}`,"- Workdir: `path`","- Runtimes: `runtime`...","- Prepare|Build|Run `label`: `command` `argument`..."],parameter:[
476
- "- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${he(an)}`,"- Preferred port: `1024` t\
477
- hrough `65535`","- URL path: `/path`","- Ready when: `GET` `/path` returns `200`"],previewIdentity:qe,download:["- Path:\
478
- `path`","- Name: `file-name`","- Media type: `type/subtype`"]});function Xe(e,n,t,s){let r=v(e,T,n,t,s);return Zs.test(
479
- r)||h(n,`${t} must use lowercase letters, digits, and single hyphens.`,s),r}function rr(e,n,t,s){let r=A(e,T,n,t,s);for(let i of r)
480
- i.replace(Ke,"").includes("{parameter:")&&h(n,`${t} has an invalid {parameter:id} placeholder.`,s),[...i.matchAll(Ke)].some(
466
+ ["- Runtimes: ","runtimes","Runtimes","`runtime`..."],["- Timeout ms: ","timeoutMs","Timeout ms",`\`1\` through \`${fe}\`\
467
+ (default ${en})`]],Je=tn.map(([e,,,n])=>`${e}${n}`);function Jt(e,n,t,s){if(e===void 0)return"";let i=v(e,T,n,`Preview \
468
+ identity ${t} environment name`,s);return(!ei.test(i)||Zt.has(i)||i.startsWith("XDG_"))&&h(n,`Preview identity ${t} envi\
469
+ ronment name is invalid.`,s),i}function nn(e){return{seen:new Set,line:e}}function sn(e,n,t,s){let i=tn.find(([c])=>n.startsWith(
470
+ c));i||h(t,D("Preview identity entry",n,Je),s);let[r,o,u]=i,a=Xe(n,r,t,`Preview identity ${u}`,s);!["command","identityT\
471
+ ypes","runtimes"].includes(o)&&a.length!==1&&h(t,`Preview identity ${u} accepts exactly one value.`,s),O(e,o,a,t,s,`Prev\
472
+ iew identity ${u} entry`)}function rn(e,n,t){for(let[c,p]of[["command","Command"],["protocol","Protocol"],["identityType\
473
+ s","Identity types"]])e[c]||h(n,`Output target ${t} Preview identity needs ${p}.`,e.line);let s=e.command.map(c=>`\`${c}\
474
+ \``).join(" "),i=N(s,T,n,"Preview identity command",e.line);(!i[0].includes("/")||i[0].includes("\\")||i[0].split("/").some(
475
+ c=>!c||[".",".."].includes(c))||i.some(c=>/\{(?:host|port)\}/u.test(c)))&&h(n,"Preview identity command must use a liter\
476
+ al app-owned project-relative executable.",e.line);let r=e.protocol[0];r!==se&&h(n,`Preview identity protocol must be ${se}\
477
+ .`,e.line);let o=[...new Set(e.identityTypes.map(c=>(Qt.has(c)||h(n,`Unsupported preview identity type: ${c}.`,e.line),c)))];
478
+ o.length!==e.identityTypes.length&&h(n,"Preview identity types must not contain duplicates.",e.line);let u={enabled:Jt(e.
479
+ enabledEnvironment?.[0],n,"enabled",e.line),secret:Jt(e.secretEnvironment?.[0],n,"secret",e.line)};u.enabled&&u.enabled===
480
+ u.secret&&h(n,"Preview identity enabled and secret environment names must differ.",e.line);let a=en;if(e.timeoutMs){let c=e.
481
+ timeoutMs[0];/^[0-9]+$/u.test(c)||h(n,`Preview identity Timeout ms must be from 1 through ${fe}.`,e.line),a=Number(c),(!Number.
482
+ isSafeInteger(a)||a<1||a>fe)&&h(n,`Preview identity Timeout ms must be from 1 through ${fe}.`,e.line)}return{command:i,environment:u,
483
+ identityTypes:o,protocol:r,runtimes:e.runtimes?C(e.runtimes.map(c=>`\`${c}\``).join(" "),T,n,"Preview identity runtimes",
484
+ e.line):[],timeoutMs:a}}var ti="vibe64.outputs.v1",Ee="Outputs",ni=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Ze=/\{([a-z][a-z0-9:-]*)\}/gu,si=/^### Target `([^`\r\n]+)`:[ \t]+(.+)$/u,
485
+ ii=/^#### Parameter `([^`\r\n]+)`:[ \t]+(.+)$/u,ri=/^#### Download `([^`\r\n]+)`$/u,oi=/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/u,
486
+ cn=new Set(["finite","interactive"]),Qe=new Set(["development","test"]),un=new Set(["terminal","web"]),on=16,ge=e=>[...e].
487
+ map(n=>`\`${n}\``).join(" or "),ai=Object.freeze(["### Target `id`: Label","#### Parameter `id`: Label","#### Presentati\
488
+ on","#### Preview identity","#### Download `id`"]),ye=Object.freeze({target:["- Default.",`- Mode: ${ge(cn)}`,`- Data: ${ge(
489
+ Qe)}`,"- Workdir: `path`","- Runtimes: `runtime`...","- Prepare|Build|Run `label`: `command` `argument`..."],parameter:[
490
+ "- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${ge(un)}`,"- Preferred port: `1024` t\
491
+ hrough `65535`","- URL path: `/path`","- Ready when: `GET` `/path` returns `200`"],previewIdentity:Je,download:["- Path:\
492
+ `path`","- Name: `file-name`","- Media type: `type/subtype`"]});function et(e,n,t,s){let i=v(e,T,n,t,s);return ni.test(
493
+ i)||h(n,`${t} must use lowercase letters, digits, and single hyphens.`,s),i}function ci(e,n,t,s){let i=N(e,T,n,t,s);for(let r of i)
494
+ r.replace(Ze,"").includes("{parameter:")&&h(n,`${t} has an invalid {parameter:id} placeholder.`,s),[...r.matchAll(Ze)].some(
481
495
  o=>!["host","port"].includes(o[1])&&!/^parameter:[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(o[1]))&&h(n,`${t} supports only {host}\
482
- , {port}, and {parameter:id} placeholders.`,s);return r}function ir(e,n,t){return{id:Xe(e[1],n,"Output target id",t),label:v(
496
+ , {port}, and {parameter:id} placeholders.`,s);return i}function ui(e,n,t){return{id:et(e[1],n,"Output target id",t),label:v(
483
497
  e[2],T,n,"Output target label",t),default:!1,mode:"",workdir:".",runtimeRequirements:[],steps:[],presentation:null,previewIdentity:null,
484
- downloads:[],parameters:[],seen:new Set,line:t}}function or(e,n,t,s){if(n==="- Required."){O(e,"required",!0,t,s,"Parame\
485
- ter Required entry");return}for(let[r,i]of[["Default","default"],["Description","description"]]){let o=`- ${r}: `;if(n.startsWith(
486
- o)){let c=M(n,o,t,`Parameter ${r}`,s);O(e,i,c,t,s,`Parameter ${r} entry`);return}}h(t,D("Outputs parameter entry",n,ge.parameter),
487
- s)}function ar(e,n={}){let t=e.parameters||[],s=i=>d("VIBE64_OUTPUT_PARAMETERS_INVALID","Outputs",i);(!n||typeof n!="obj\
488
- ect"||Array.isArray(n))&&s("Output parameters must be an object of text values.");let r=new Set(t.map(({id:i})=>i));for(let i of Object.
489
- keys(n))r.has(i)||s(`Unknown output parameter: ${i}.`);return Object.fromEntries(t.map(i=>{let o=Object.hasOwn(n,i.id)?n[i.
490
- id]:i.default;return(typeof o!="string"||o.length>4096||/[\0\r\n]/u.test(o))&&s(`${i.label} must be a single line of tex\
491
- t, at most 4096 characters.`),i.required&&!o.trim()&&s(`${i.label} is required.`),[i.id,o]}))}function cr(e){return{kind:"",
492
- preferredPort:null,urlPath:"/",readiness:null,seen:new Set,line:e}}function ur(e,n,t){return{id:Xe(e[1],n,"Download id",
493
- t),path:"",name:"",mediaType:"",seen:new Set,line:t}}function pr(e,n,t){/^[0-9]+$/u.test(e)||h(n,"Web presentation prefe\
498
+ downloads:[],parameters:[],seen:new Set,line:t}}function pi(e,n,t,s){if(n==="- Required."){O(e,"required",!0,t,s,"Parame\
499
+ ter Required entry");return}for(let[i,r]of[["Default","default"],["Description","description"]]){let o=`- ${i}: `;if(n.startsWith(
500
+ o)){let u=M(n,o,t,`Parameter ${i}`,s);O(e,r,u,t,s,`Parameter ${i} entry`);return}}h(t,D("Outputs parameter entry",n,ye.parameter),
501
+ s)}function li(e,n={}){let t=e.parameters||[],s=r=>d("VIBE64_OUTPUT_PARAMETERS_INVALID","Outputs",r);(!n||typeof n!="obj\
502
+ ect"||Array.isArray(n))&&s("Output parameters must be an object of text values.");let i=new Set(t.map(({id:r})=>r));for(let r of Object.
503
+ keys(n))i.has(r)||s(`Unknown output parameter: ${r}.`);return Object.fromEntries(t.map(r=>{let o=Object.hasOwn(n,r.id)?n[r.
504
+ 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\
505
+ t, at most 4096 characters.`),r.required&&!o.trim()&&s(`${r.label} is required.`),[r.id,o]}))}function di(e){return{kind:"",
506
+ preferredPort:null,urlPath:"/",readiness:null,seen:new Set,line:e}}function mi(e,n,t){return{id:et(e[1],n,"Download id",
507
+ t),path:"",name:"",mediaType:"",seen:new Set,line:t}}function hi(e,n,t){/^[0-9]+$/u.test(e)||h(n,"Web presentation prefe\
494
508
  rred port must be an integer from 1024 through 65535.",t);let s=Number(e);return(!Number.isSafeInteger(s)||s<1024||s>65535)&&
495
- h(n,"Web presentation preferred port must be an integer from 1024 through 65535.",t),s}function lr(e,n,t,s){if(n.startsWith(
496
- "- Data: ")){let i=M(n,"- Data: ",t,"Output target Data",s);Ye.has(i)||h(t,`Output target Data must be ${he(Ye)}.`,s),O(
497
- e,"dataMode",i,t,s,"output target Data entry");return}if(n==="- Default."){O(e,"default",!0,t,s,"output target Default e\
498
- ntry");return}if(n.startsWith("- Mode: ")){let i=M(n,"- Mode: ",t,"Output target Mode",s);on.has(i)||h(t,"Output target \
499
- Mode must be `interactive` or `finite`.",s),O(e,"mode",i,t,s,"output target Mode entry");return}if(n.startsWith("- Workd\
509
+ h(n,"Web presentation preferred port must be an integer from 1024 through 65535.",t),s}function fi(e,n,t,s){if(n.startsWith(
510
+ "- Data: ")){let r=M(n,"- Data: ",t,"Output target Data",s);Qe.has(r)||h(t,`Output target Data must be ${ge(Qe)}.`,s),O(
511
+ e,"dataMode",r,t,s,"output target Data entry");return}if(n==="- Default."){O(e,"default",!0,t,s,"output target Default e\
512
+ ntry");return}if(n.startsWith("- Mode: ")){let r=M(n,"- Mode: ",t,"Output target Mode",s);cn.has(r)||h(t,"Output target \
513
+ Mode must be `interactive` or `finite`.",s),O(e,"mode",r,t,s,"output target Mode entry");return}if(n.startsWith("- Workd\
500
514
  ir: ")){O(e,"workdir",b(M(n,"- Workdir: ",t,"Output target Workdir",s),T,t,"Output target workdir",s),t,s,"output target\
501
- Workdir entry");return}if(n.startsWith("- Runtimes: ")){O(e,"runtimeRequirements",N(n.slice(12),T,t,"Output target runt\
502
- imes",s),t,s,"output target Runtimes entry");return}let r=n.match(/^- (Prepare|Build|Run) `([^`\r\n]+)`:[ \t]+(.+)$/u);if(r){
503
- let i=r[1].toLowerCase(),o=rr(r[3],t,"Output step command",s);i!=="run"&&o.some(c=>/\{(?:host|port)\}/u.test(c))&&h(t,"O\
504
- nly a web presentation's Run step may use {host} or {port} placeholders.",s),e.steps.push({label:v(r[2],T,t,"Output step\
505
- label",s),argv:o,role:i});return}h(t,D("Outputs target entry",n,[...ge.target,...sr.slice(1)]),s)}function dr(e,n,t,s){
506
- if(n.startsWith("- Kind: ")){let r=M(n,"- Kind: ",t,"Presentation Kind",s);an.has(r)||h(t,"Presentation Kind must be `te\
507
- rminal` or `web`.",s),O(e,"kind",r,t,s,"Presentation Kind entry");return}if(n.startsWith("- Preferred port: ")){O(e,"pre\
508
- ferredPort",pr(M(n,"- Preferred port: ",t,"Web presentation Preferred port",s),t,s),t,s,"Presentation Preferred port ent\
509
- ry");return}if(n.startsWith("- URL path: ")){O(e,"urlPath",_e(M(n,"- URL path: ",t,"Web presentation URL path",s),T,t,"W\
515
+ Workdir entry");return}if(n.startsWith("- Runtimes: ")){O(e,"runtimeRequirements",C(n.slice(12),T,t,"Output target runt\
516
+ imes",s),t,s,"output target Runtimes entry");return}let i=n.match(/^- (Prepare|Build|Run) `([^`\r\n]+)`:[ \t]+(.+)$/u);if(i){
517
+ let r=i[1].toLowerCase(),o=ci(i[3],t,"Output step command",s);r!=="run"&&o.some(u=>/\{(?:host|port)\}/u.test(u))&&h(t,"O\
518
+ nly a web presentation's Run step may use {host} or {port} placeholders.",s),e.steps.push({label:v(i[2],T,t,"Output step\
519
+ label",s),argv:o,role:r});return}h(t,D("Outputs target entry",n,[...ye.target,...ai.slice(1)]),s)}function gi(e,n,t,s){
520
+ if(n.startsWith("- Kind: ")){let i=M(n,"- Kind: ",t,"Presentation Kind",s);un.has(i)||h(t,"Presentation Kind must be `te\
521
+ rminal` or `web`.",s),O(e,"kind",i,t,s,"Presentation Kind entry");return}if(n.startsWith("- Preferred port: ")){O(e,"pre\
522
+ ferredPort",hi(M(n,"- Preferred port: ",t,"Web presentation Preferred port",s),t,s),t,s,"Presentation Preferred port ent\
523
+ ry");return}if(n.startsWith("- URL path: ")){O(e,"urlPath",Re(M(n,"- URL path: ",t,"Web presentation URL path",s),T,t,"W\
510
524
  eb presentation URL path",s),t,s,"Presentation URL path entry");return}if(n.startsWith("- Ready when: ")){O(e,"readiness",
511
- ce(n,T,t,"Web presentation readiness",s),t,s,"Presentation Ready when entry");return}h(t,D("Presentation entry",n,ge.presentation),
512
- s)}function mr(e,n,t){let s=v(e,T,n,"Download Name",t);return(s.length>255||[".",".."].includes(s)||/[\\/\0]/u.test(s)||
513
- s.trim()!==s)&&h(n,"Download Name must be a safe filename without path separators.",t),s}function hr(e,n,t){let s=v(e,T,
514
- n,"Download Media type",t);return(s.length>127||!nr.test(s))&&h(n,"Download Media type must be a lowercase type/subtype \
515
- value.",t),s}function fr(e,n,t,s){if(n.startsWith("- Path: ")){O(e,"path",b(M(n,"- Path: ",t,"Download Path",s),T,t,"Dow\
516
- nload path",s,{allowRoot:!1}),t,s,"Download Path entry");return}if(n.startsWith("- Name: ")){O(e,"name",mr(M(n,"- Name: ",
517
- t,"Download Name",s),t,s),t,s,"Download Name entry");return}if(n.startsWith("- Media type: ")){O(e,"mediaType",hr(M(n,"-\
518
- Media type: ",t,"Download Media type",s),t,s),t,s,"Download Media type entry");return}h(t,D("Download entry",n,ge.download),
519
- s)}function gr(e,n,t){for(let[s,r]of[["path","Path"],["name","Name"],["mediaType","Media type"]])e[s]||h(n,`Output targe\
520
- t ${t} Download ${e.id} needs ${r}.`,e.line);return{id:e.id,path:e.path,name:e.name,mediaType:e.mediaType}}function Er(e,n,t){
525
+ ue(n,T,t,"Web presentation readiness",s),t,s,"Presentation Ready when entry");return}h(t,D("Presentation entry",n,ye.presentation),
526
+ s)}function Ei(e,n,t){let s=v(e,T,n,"Download Name",t);return(s.length>255||[".",".."].includes(s)||/[\\/\0]/u.test(s)||
527
+ s.trim()!==s)&&h(n,"Download Name must be a safe filename without path separators.",t),s}function yi(e,n,t){let s=v(e,T,
528
+ n,"Download Media type",t);return(s.length>127||!oi.test(s))&&h(n,"Download Media type must be a lowercase type/subtype \
529
+ value.",t),s}function bi(e,n,t,s){if(n.startsWith("- Path: ")){O(e,"path",b(M(n,"- Path: ",t,"Download Path",s),T,t,"Dow\
530
+ nload path",s,{allowRoot:!1}),t,s,"Download Path entry");return}if(n.startsWith("- Name: ")){O(e,"name",Ei(M(n,"- Name: ",
531
+ t,"Download Name",s),t,s),t,s,"Download Name entry");return}if(n.startsWith("- Media type: ")){O(e,"mediaType",yi(M(n,"-\
532
+ Media type: ",t,"Download Media type",s),t,s),t,s,"Download Media type entry");return}h(t,D("Download entry",n,ye.download),
533
+ s)}function vi(e,n,t){for(let[s,i]of[["path","Path"],["name","Name"],["mediaType","Media type"]])e[s]||h(n,`Output targe\
534
+ t ${t} Download ${e.id} needs ${i}.`,e.line);return{id:e.id,path:e.path,name:e.name,mediaType:e.mediaType}}function wi(e,n,t){
521
535
  return e.kind||h(n,`Output target ${t} Presentation needs Kind.`,e.line),e.kind==="terminal"?((e.preferredPort!==null||e.
522
536
  readiness||e.seen.has("urlPath"))&&h(n,`Output target ${t} terminal Presentation accepts only Kind.`,e.line),{kind:"term\
523
537
  inal"}):(e.readiness||h(n,`Output target ${t} web Presentation needs one Ready when entry.`,e.line),{kind:"web",preferredPort:e.
524
- preferredPort,urlPath:e.urlPath,readiness:e.readiness})}function rn(e,n){e.mode||h(n,`Output target ${e.id} needs one Mo\
538
+ preferredPort,urlPath:e.urlPath,readiness:e.readiness})}function an(e,n){e.mode||h(n,`Output target ${e.id} needs one Mo\
525
539
  de entry.`,e.line),e.steps.length===0&&h(n,`Output target ${e.id} needs at least one step.`,e.line);let t={prepare:0,build:1,
526
- run:2};for(let u=1;u<e.steps.length;u+=1)t[e.steps[u].role]<t[e.steps[u-1].role]&&h(n,`Output target ${e.id} steps must \
527
- be ordered Prepare, Build, then Run.`,e.line);let s=e.steps.filter(({role:u})=>u==="run"),r=e.downloads.map(u=>gr(u,n,e.
528
- id));new Set(r.map(({id:u})=>u)).size!==r.length&&h(n,`Output target ${e.id} contains a duplicate Download id.`,e.line),
540
+ run:2};for(let c=1;c<e.steps.length;c+=1)t[e.steps[c].role]<t[e.steps[c-1].role]&&h(n,`Output target ${e.id} steps must \
541
+ be ordered Prepare, Build, then Run.`,e.line);let s=e.steps.filter(({role:c})=>c==="run"),i=e.downloads.map(c=>vi(c,n,e.
542
+ id));new Set(i.map(({id:c})=>c)).size!==i.length&&h(n,`Output target ${e.id} contains a duplicate Download id.`,e.line),
529
543
  e.mode==="finite"?((s.length>0||e.presentation||e.previewIdentity)&&h(n,`Finite output target ${e.id} cannot have Run, P\
530
- resentation, or Preview identity entries.`,e.line),r.length===0&&h(n,`Finite output target ${e.id} needs at least one Do\
544
+ resentation, or Preview identity entries.`,e.line),i.length===0&&h(n,`Finite output target ${e.id} needs at least one Do\
531
545
  wnload.`,e.line)):s.length!==1||e.steps.at(-1).role!=="run"?h(n,`Interactive output target ${e.id} needs exactly one fin\
532
- al Run step.`,e.line):e.presentation||h(n,`Interactive output target ${e.id} needs one Presentation.`,e.line);let i=e.presentation?
533
- Er(e.presentation,n,e.id):null,o=e.steps.flatMap(({argv:u})=>u.flatMap(p=>[...p.matchAll(Ke)].map(m=>m[1])));o.some(u=>[
534
- "host","port"].includes(u))&&i?.kind!=="web"&&h(n,"Only a web output target may use {host} or {port} placeholders.",e.line);
535
- let c=e.parameters.map(({seen:u,...p})=>p),a=new Set(c.map(({id:u})=>u));(c.length>sn||a.size!==c.length)&&h(n,`Output t\
536
- arget ${e.id} may declare at most ${sn} parameters with unique ids.`,e.line);for(let u of o.filter(p=>p.startsWith("para\
537
- meter:"))){let p=u.slice(10);a.has(p)||h(n,`Undeclared output parameter: ${p}.`,e.line)}for(let u of c)o.includes(`param\
538
- eter:${u.id}`)||h(n,`Output parameter ${u.id} must be used in a step command.`,e.line);return e.previewIdentity&&i?.kind!==
546
+ al Run step.`,e.line):e.presentation||h(n,`Interactive output target ${e.id} needs one Presentation.`,e.line);let r=e.presentation?
547
+ wi(e.presentation,n,e.id):null,o=e.steps.flatMap(({argv:c})=>c.flatMap(p=>[...p.matchAll(Ze)].map(m=>m[1])));o.some(c=>[
548
+ "host","port"].includes(c))&&r?.kind!=="web"&&h(n,"Only a web output target may use {host} or {port} placeholders.",e.line);
549
+ let u=e.parameters.map(({seen:c,...p})=>p),a=new Set(u.map(({id:c})=>c));(u.length>on||a.size!==u.length)&&h(n,`Output t\
550
+ arget ${e.id} may declare at most ${on} parameters with unique ids.`,e.line);for(let c of o.filter(p=>p.startsWith("para\
551
+ meter:"))){let p=c.slice(10);a.has(p)||h(n,`Undeclared output parameter: ${p}.`,e.line)}for(let c of u)o.includes(`param\
552
+ eter:${c.id}`)||h(n,`Output parameter ${c.id} must be used in a step command.`,e.line);return e.previewIdentity&&r?.kind!==
539
553
  "web"&&h(n,"Only a web output target may declare Preview identity.",e.line),{id:e.id,label:e.label,default:e.default,mode:e.
540
- mode,workdir:e.workdir,runtimeRequirements:e.runtimeRequirements,...e.dataMode?{dataMode:e.dataMode}:{},steps:e.steps,presentation:i,
541
- downloads:r,...c.length?{parameters:c}:{},...e.previewIdentity?{previewIdentity:nn(e.previewIdentity,n,e.id)}:{}}}function Ee(e,n={}){
554
+ mode,workdir:e.workdir,runtimeRequirements:e.runtimeRequirements,...e.dataMode?{dataMode:e.dataMode}:{},steps:e.steps,presentation:r,
555
+ downloads:i,...u.length?{parameters:u}:{},...e.previewIdentity?{previewIdentity:rn(e.previewIdentity,n,e.id)}:{}}}function be(e,n={}){
542
556
  let{path:t="genesis/stack.md#Outputs"}=n;if(Array.isArray(e)||h(t,"Outputs must be supplied as exact Stack section lines\
543
- ."),w(e))return{version:1,targets:[]};let s=[],r=null,i="target",o=null;for(let a=0;a<e.length;a+=1){let u=e[a].trim();if(!u)
544
- continue;let p=a+1,m=u.match(Qs);if(m){r&&s.push(rn(r,t)),r=ir(m,t,p),i="target",o=null;continue}r||h(t,"## Outputs must\
545
- begin with a Target heading.",p);let l=u.match(er);if(l){let g={id:Xe(l[1],t,"Parameter id",p),label:v(l[2],T,t,"Parame\
546
- ter label",p),default:"",description:"",required:!1,seen:new Set};r.parameters.push(g),i="parameter",o=g;continue}if(u===
547
- "#### Presentation"){r.presentation&&h(t,"Presentation must appear at most once below an output target.",p),r.presentation=
548
- cr(p),i="presentation",o=r.presentation;continue}if(u==="#### Preview identity"){r.previewIdentity&&h(t,"Preview identit\
549
- y must appear at most once below an output target.",p),r.previewIdentity=en(p),i="previewIdentity",o=r.previewIdentity;continue}
550
- let f=u.match(tr);if(f){let g=ur(f,t,p);r.downloads.push(g),i="download",o=g;continue}i==="parameter"?or(o,u,t,p):i==="p\
551
- resentation"?dr(o,u,t,p):i==="previewIdentity"?tn(o,u,t,p):i==="download"?fr(o,u,t,p):lr(r,u,t,p)}r&&s.push(rn(r,t)),s.length===
552
- 0&&h(t,"## Outputs needs at least one Target or exactly `- Nothing.`.");let c=s.map(({id:a})=>a);return new Set(c).size!==
553
- c.length&&h(t,"Outputs contains a duplicate target id."),s.filter(({default:a})=>a).length>1&&h(t,"Outputs may declare a\
554
- t most one default target."),{version:1,targets:s}}function yr(e,n={}){let{resourcesPreparing:t=!1}=n,s=e.details||{},r=Array.
555
- isArray(s.missing)?s.missing:[],i=(Array.isArray(s.alternatives)?s.alternatives:[]).map((c,a)=>Array.isArray(r[a])&&r[a].
556
- length?r[a].join(" and "):String(c)).filter(Boolean);if(e.code!=="STACK_RESOURCE_MISSING"||!i.length)return e.message;let o=String(
557
+ ."),S(e))return{version:1,targets:[]};let s=[],i=null,r="target",o=null;for(let a=0;a<e.length;a+=1){let c=e[a].trim();if(!c)
558
+ continue;let p=a+1,m=c.match(si);if(m){i&&s.push(an(i,t)),i=ui(m,t,p),r="target",o=null;continue}i||h(t,"## Outputs must\
559
+ begin with a Target heading.",p);let l=c.match(ii);if(l){let g={id:et(l[1],t,"Parameter id",p),label:v(l[2],T,t,"Parame\
560
+ ter label",p),default:"",description:"",required:!1,seen:new Set};i.parameters.push(g),r="parameter",o=g;continue}if(c===
561
+ "#### Presentation"){i.presentation&&h(t,"Presentation must appear at most once below an output target.",p),i.presentation=
562
+ di(p),r="presentation",o=i.presentation;continue}if(c==="#### Preview identity"){i.previewIdentity&&h(t,"Preview identit\
563
+ y must appear at most once below an output target.",p),i.previewIdentity=nn(p),r="previewIdentity",o=i.previewIdentity;continue}
564
+ let f=c.match(ri);if(f){let g=mi(f,t,p);i.downloads.push(g),r="download",o=g;continue}r==="parameter"?pi(o,c,t,p):r==="p\
565
+ resentation"?gi(o,c,t,p):r==="previewIdentity"?sn(o,c,t,p):r==="download"?bi(o,c,t,p):fi(i,c,t,p)}i&&s.push(an(i,t)),s.length===
566
+ 0&&h(t,"## Outputs needs at least one Target or exactly `- Nothing.`.");let u=s.map(({id:a})=>a);return new Set(u).size!==
567
+ u.length&&h(t,"Outputs contains a duplicate target id."),s.filter(({default:a})=>a).length>1&&h(t,"Outputs may declare a\
568
+ t most one default target."),{version:1,targets:s}}function Si(e,n={}){let{resourcesPreparing:t=!1}=n,s=e.details||{},i=Array.
569
+ isArray(s.missing)?s.missing:[],r=(Array.isArray(s.alternatives)?s.alternatives:[]).map((u,a)=>Array.isArray(i[a])&&i[a].
570
+ length?i[a].join(" and "):String(u)).filter(Boolean);if(e.code!=="STACK_RESOURCE_MISSING"||!r.length)return e.message;let o=String(
557
571
  s.resource||"").trim()||"resources";return t?`Vibe64 is still setting up this app's ${o}. Preview can start when workspa\
558
- ce setup finishes; then press Check again.`:`This app needs its ${o} before Preview can start: set ${i.join(", or ")} in\
559
- Env (in Dash, under Development), then press Check again.`}function cn({environment:e={},section:n={},resourcesPreparing:t=!1}={}){
560
- H(n,e,"Outputs section");let s=[...n.diagnostics||[]],r=[...e.diagnostics||[]],i={version:1,targets:[]};n.status==="read\
561
- y"&&(i=Ee(n.lines));let o=r.length===0?null:[...new Set(r.map(p=>yr(p,{resourcesPreparing:t})))].join(" "),c=i.targets.map(
562
- p=>({...p,source:n.source||null,available:s.length===0&&r.length===0,disabledReason:o})),a=[...s,...r],u="ready";return a.
563
- length>0?u="blocked":c.length===0&&(u="unconfigured"),{contract:Js,status:u,stackHash:n.stackHash,components:[...n.components||
564
- []],environmentDefaults:structuredClone(e.environmentDefaults||[]),runtimeRequirements:z(c.flatMap(p=>p.runtimeRequirements)),
565
- resources:structuredClone(e.resources||[]),targets:c,diagnostics:a}}var un="Project services",br="vibe64.project-services.v1",J="VIBE64_PROJECT_SERVICES_INVALID",Z="genesis/stack.md#Projec\
566
- t services",vr="- Start `service-id` [per session] with `runtime` [in `workdir`]: `command` `argument`...";function pn(e){
567
- if(Array.isArray(e)||d(J,Z,"Expected exact Project services section lines."),w(e))return[];let n=[];for(let[t,s]of e.entries()){
568
- let r=s.trim();if(!r)continue;let i=t+1,o=r.match(/^- Start `([a-z][a-z0-9-]{0,63})`( per session)? with (.+?): (.+)$/u);
569
- o||d(J,Z,`Use: ${vr}`,i),n.some(({id:a})=>a===o[1])&&d(J,Z,"Duplicate project service id.",i);let c=o[3].match(/^(.*?) in `([^`\r\n]+)`$/u);
570
- n.push({id:o[1],...o[2]?{scope:"session"}:{},runtimeRequirements:N(c?c[1]:o[3],J,Z,"Service runtimes",i),workdir:b(c?.[2]||
571
- ".",J,Z,"Service workdir",i),argv:A(o[4],J,Z,"Service command",i)})}return n.length||d(J,Z,"Declare a service or exactly\
572
- `- Nothing.`."),n}function ln(e={}){let n=e.status==="ready"?pn(e.lines):[];return{contract:br,status:e.status==="block\
573
- ed"?"blocked":n.length?"ready":"unconfigured",services:n,recipeHash:n.length?R(n):"",diagnostics:e.diagnostics||[]}}import{access as wr}from"node:fs/promises";import mn from"node:path";var Sr="vibe64.workspace-setup.v1",re="Workspace setup",Ze="VIBE64_WORKSPACE_SETUP_INVALID",dn="- Prepare `label` with `\
574
- runtime` [in `workdir`] [when|if `path` exists]: `command` `argument`...",Ir=/^- Prepare `([^`\r\n]+)` (.+)$/u;function Je(e,n,t,s={}){
575
- d(Ze,e,n,t,s)}function ye(e,n={}){let{path:t="genesis/stack.md#Workspace setup"}=n;if(Array.isArray(e)||Je(t,"Workspace \
576
- setup must be supplied as exact Stack section lines."),w(e))return[];let s=[];for(let r=0;r<e.length;r+=1){let i=e[r].trim();
577
- if(!i)continue;let o=r+1,c=i.match(Ir);c||Je(t,`Every Workspace setup entry must use: ${dn}`,o,{observed:i}),s.push({label:v(
578
- c[1],Ze,t,"Workspace setup step label",o),...ue(c[2],Ze,t,"Workspace setup",o,{form:dn,observed:i})})}return s.length===
579
- 0&&Je(t,"## Workspace setup needs at least one Prepare entry or exactly `- Nothing.`."),s}async function Tr(e,n){try{return await wr(
580
- mn.join(e,n)),!0}catch(t){if(["ENOENT","ENOTDIR"].includes(t?.code))return!1;throw t}}async function hn({projectRoot:e,section:n={}}={}){
581
- let t=[...n.diagnostics||[]],s=[];n.status==="ready"&&(s=ye(n.lines));let r=[],i=[],o=mn.resolve(e);if(t.length===0)for(let l of s){
582
- if(!l.condition||await Tr(o,l.condition.pathExists)){r.push(l);continue}l.condition.onMissing==="wait"&&i.push(l.condition.
583
- pathExists)}if(i.length>0){let l=z(i);t.push({code:"VIBE64_WORKSPACE_SETUP_WAITING",message:`Workspace setup is waiting \
584
- for project ${l.length===1?"path":"paths"}: ${l.join(", ")}.`,details:{paths:l}})}let c=t.some(({code:l})=>l==="VIBE64_W\
585
- ORKSPACE_SETUP_WAITING"),a=t.some(({code:l})=>l!=="VIBE64_WORKSPACE_SETUP_WAITING"),u="unconfigured";a?u="blocked":!c&&r.
586
- length>0&&(u="ready");let p=r.map(({condition:l,...f})=>f),m={version:1,steps:p};return{contract:Sr,status:u,stackHash:n.
587
- stackHash,recipeHash:u==="ready"?R(m):"",components:[...n.components||[]],source:n.source||null,runtimeRequirements:z(p.
588
- flatMap(l=>l.runtimeRequirements)),steps:p,diagnostics:t}}var kr="vibe64.resource-estimates.v1",be="Resource estimates",En="VIBE64_RESOURCE_ESTIMATES_INVALID",_r=1024*1024,fn=1024*
589
- 1024,gn=new Map([["Startup typical MiB","startupTypical"],["Startup high MiB","startupHigh"],["Running typical MiB","run\
590
- ningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);function G(e,n,t){d(En,
591
- e,n,t)}function Qe(e,n,t,s,r){let i=e.get(n),o=e.get(t);return(i===void 0||o===void 0||i>o)&&G(s,"Each resource phase re\
592
- quires typical and high estimates, with typical no greater than high.",r),{typicalBytes:i,highBytes:o}}function yn(e,n={}){
593
- let{path:t="genesis/stack.md#Resource estimates",targets:s=[],hasWorkspaceSetup:r=!1}=n;(!Array.isArray(e)||e.length>2048||
572
+ ce setup finishes; then press Check again.`:`This app needs its ${o} before Preview can start: set ${r.join(", or ")} in\
573
+ Env (in Dash, under Development), then press Check again.`}function pn({environment:e={},section:n={},resourcesPreparing:t=!1}={}){
574
+ z(n,e,"Outputs section");let s=[...n.diagnostics||[]],i=[...e.diagnostics||[]],r={version:1,targets:[]};n.status==="read\
575
+ y"&&(r=be(n.lines));let o=i.length===0?null:[...new Set(i.map(p=>Si(p,{resourcesPreparing:t})))].join(" "),u=r.targets.map(
576
+ p=>({...p,source:n.source||null,available:s.length===0&&i.length===0,disabledReason:o})),a=[...s,...i],c="ready";return a.
577
+ length>0?c="blocked":u.length===0&&(c="unconfigured"),{contract:ti,status:c,stackHash:n.stackHash,components:[...n.components||
578
+ []],environmentDefaults:structuredClone(e.environmentDefaults||[]),runtimeRequirements:F(u.flatMap(p=>p.runtimeRequirements)),
579
+ resources:structuredClone(e.resources||[]),targets:u,diagnostics:a}}var ln="Project services",Ii="vibe64.project-services.v1",J="VIBE64_PROJECT_SERVICES_INVALID",Z="genesis/stack.md#Projec\
580
+ t services",Ti="- Start `service-id` [per session] with `runtime` [in `workdir`]: `command` `argument`...";function dn(e){
581
+ if(Array.isArray(e)||d(J,Z,"Expected exact Project services section lines."),S(e))return[];let n=[];for(let[t,s]of e.entries()){
582
+ let i=s.trim();if(!i)continue;let r=t+1,o=i.match(/^- Start `([a-z][a-z0-9-]{0,63})`( per session)? with (.+?): (.+)$/u);
583
+ o||d(J,Z,`Use: ${Ti}`,r),n.some(({id:a})=>a===o[1])&&d(J,Z,"Duplicate project service id.",r);let u=o[3].match(/^(.*?) in `([^`\r\n]+)`$/u);
584
+ n.push({id:o[1],...o[2]?{scope:"session"}:{},runtimeRequirements:C(u?u[1]:o[3],J,Z,"Service runtimes",r),workdir:b(u?.[2]||
585
+ ".",J,Z,"Service workdir",r),argv:N(o[4],J,Z,"Service command",r)})}return n.length||d(J,Z,"Declare a service or exactly\
586
+ `- Nothing.`."),n}function mn(e={}){let n=e.status==="ready"?dn(e.lines):[];return{contract:Ii,status:e.status==="block\
587
+ ed"?"blocked":n.length?"ready":"unconfigured",services:n,recipeHash:n.length?A(n):"",diagnostics:e.diagnostics||[]}}import{access as ki}from"node:fs/promises";import fn from"node:path";var _i="vibe64.workspace-setup.v1",ie="Workspace setup",ve="VIBE64_WORKSPACE_SETUP_INVALID",hn="- Prepare `label` [from \
588
+ `path`...] with `runtime` [in `workdir`] [when|if `path` exists]: `command` `argument`...",Oi=/^- Prepare `([^`\r\n]+)` (.+)$/u,
589
+ Ai=/^from ((?:`[^`\r\n]+`[ \t]+)+)(with .+)$/u;function tt(e,n,t,s={}){d(ve,e,n,t,s)}function we(e,n={}){let{path:t="gen\
590
+ esis/stack.md#Workspace setup"}=n;if(Array.isArray(e)||tt(t,"Workspace setup must be supplied as exact Stack section lin\
591
+ es."),S(e))return[];let s=[];for(let i=0;i<e.length;i+=1){let r=e[i].trim();if(!r)continue;let o=i+1,u=r.match(Oi),a=u?.[2].
592
+ match(Ai);(!u||u[2].startsWith("from ")&&!a)&&tt(t,`Every Workspace setup entry must use: ${hn}`,o,{observed:r}),s.push(
593
+ {label:v(u[1],ve,t,"Workspace setup step label",o),...a?{inputs:ce(a[1].trimEnd(),ve,t,"Workspace setup inputs",o)}:{},...pe(
594
+ a?a[2]:u[2],ve,t,"Workspace setup",o,{form:hn,observed:r})})}return s.length===0&&tt(t,"## Workspace setup needs at leas\
595
+ t one Prepare entry or exactly `- Nothing.`."),s}async function Ri(e,n){try{return await ki(fn.join(e,n)),!0}catch(t){if([
596
+ "ENOENT","ENOTDIR"].includes(t?.code))return!1;throw t}}async function gn({projectRoot:e,section:n={}}={}){let t=[...n.diagnostics||
597
+ []],s=[];n.status==="ready"&&(s=we(n.lines));let i=[],r=[],o=fn.resolve(e);if(t.length===0)for(let l of s){if(!l.condition||
598
+ await Ri(o,l.condition.pathExists)){i.push(l);continue}l.condition.onMissing==="wait"&&r.push(l.condition.pathExists)}if(r.
599
+ length>0){let l=F(r);t.push({code:"VIBE64_WORKSPACE_SETUP_WAITING",message:`Workspace setup is waiting for project ${l.length===
600
+ 1?"path":"paths"}: ${l.join(", ")}.`,details:{paths:l}})}let u=t.some(({code:l})=>l==="VIBE64_WORKSPACE_SETUP_WAITING"),
601
+ a=t.some(({code:l})=>l!=="VIBE64_WORKSPACE_SETUP_WAITING"),c="unconfigured";a?c="blocked":!u&&i.length>0&&(c="ready");let p=i.
602
+ map(({condition:l,...f})=>f),m={version:1,steps:p};return{contract:_i,status:c,stackHash:n.stackHash,recipeHash:c==="rea\
603
+ dy"?A(m):"",components:[...n.components||[]],source:n.source||null,runtimeRequirements:F(p.flatMap(l=>l.runtimeRequirements)),
604
+ steps:p,diagnostics:t}}var Ni="vibe64.resource-estimates.v1",Se="Resource estimates",bn="VIBE64_RESOURCE_ESTIMATES_INVALID",Ci=1024*1024,En=1024*
605
+ 1024,yn=new Map([["Startup typical MiB","startupTypical"],["Startup high MiB","startupHigh"],["Running typical MiB","run\
606
+ ningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);function G(e,n,t){d(bn,
607
+ e,n,t)}function nt(e,n,t,s,i){let r=e.get(n),o=e.get(t);return(r===void 0||o===void 0||r>o)&&G(s,"Each resource phase re\
608
+ quires typical and high estimates, with typical no greater than high.",i),{typicalBytes:r,highBytes:o}}function vn(e,n={}){
609
+ let{path:t="genesis/stack.md#Resource estimates",targets:s=[],hasWorkspaceSetup:i=!1}=n;(!Array.isArray(e)||e.length>2048||
594
610
  e.some(p=>typeof p!="string")||Buffer.byteLength(e.join(`
595
- `),"utf8")>64*1024)&&G(t,"Resource estimates must be exact Stack section lines within 64 KiB and 2048 lines.");let i={version:1,
596
- outputs:[],workspaceSetup:null};if(w(e))return i;let o=new Map(s.map(p=>[p.id,p])),c=new Set,a=null;function u(){if(!a)return;
611
+ `),"utf8")>64*1024)&&G(t,"Resource estimates must be exact Stack section lines within 64 KiB and 2048 lines.");let r={version:1,
612
+ outputs:[],workspaceSetup:null};if(S(e))return r;let o=new Map(s.map(p=>[p.id,p])),u=new Set,a=null;function c(){if(!a)return;
597
613
  let{targetId:p,mode:m,fields:l,line:f}=a;if(m==="interactive"){(l.has("typical")||l.has("high"))&&G(t,"Interactive outpu\
598
- ts require separate Startup and Running estimates.",f),i.outputs.push({targetId:p,mode:m,startup:Qe(l,"startupTypical","\
599
- startupHigh",t,f),running:Qe(l,"runningTypical","runningHigh",t,f)});return}(l.size!==2||!l.has("typical")||!l.has("high"))&&
600
- G(t,"Finite outputs and Workspace setup require only Typical MiB and High MiB.",f);let g=Qe(l,"typical","high",t,f);p?i.
601
- outputs.push({targetId:p,mode:m,execution:g}):i.workspaceSetup=g}for(let p=0;p<e.length;p+=1){let m=e[p].trim(),l=p+1;if(!m)
602
- continue;let f=m.match(/^### Output `([a-z0-9]+(?:-[a-z0-9]+)*)`$/u);if(f||m==="### Workspace setup"){u();let P=f?.[1]||
603
- "",Y=P?`output:${P}`:"workspace-setup";c.has(Y)&&G(t,"Resource estimates contains a duplicate operation.",l),c.add(Y);let Q=o.
614
+ ts require separate Startup and Running estimates.",f),r.outputs.push({targetId:p,mode:m,startup:nt(l,"startupTypical","\
615
+ startupHigh",t,f),running:nt(l,"runningTypical","runningHigh",t,f)});return}(l.size!==2||!l.has("typical")||!l.has("high"))&&
616
+ G(t,"Finite outputs and Workspace setup require only Typical MiB and High MiB.",f);let g=nt(l,"typical","high",t,f);p?r.
617
+ outputs.push({targetId:p,mode:m,execution:g}):r.workspaceSetup=g}for(let p=0;p<e.length;p+=1){let m=e[p].trim(),l=p+1;if(!m)
618
+ continue;let f=m.match(/^### Output `([a-z0-9]+(?:-[a-z0-9]+)*)`$/u);if(f||m==="### Workspace setup"){c();let P=f?.[1]||
619
+ "",Y=P?`output:${P}`:"workspace-setup";u.has(Y)&&G(t,"Resource estimates contains a duplicate operation.",l),u.add(Y);let Q=o.
604
620
  get(P);P&&!["interactive","finite"].includes(Q?.mode)&&G(t,`Resource estimate references an undeclared output: ${P}.`,l),
605
- !P&&!r&&G(t,"Resource estimate references undeclared Workspace setup steps.",l),a={targetId:P,mode:Q?.mode||"setup",fields:new Map,
606
- line:l};continue}let g=m.match(/^- ([A-Za-z ]+): `([1-9][0-9]*)`$/u),S=g&&gn.get(g[1]);(!a||!S)&&G(t,`Expected an Output\
607
- or Workspace setup heading followed by positive integer MiB estimates: ${[...gn.keys()].map(P=>`- ${P}: \`number\``).join(
608
- "; ")}.`,l),a.fields.has(S)&&G(t,`Duplicate resource field: ${g[1]}.`,l);let _=Number(g[2]);(!Number.isSafeInteger(_)||_>
609
- fn)&&G(t,`Resource estimates must be between 1 and ${fn} MiB.`,l),a.fields.set(S,_*_r)}return u(),c.size===0&&G(t,"Resou\
610
- rce estimates needs an operation or exactly `- Nothing.`."),i}function ve({section:e={},outputsSection:n={},workspaceSetupSection:t={}}={}){
611
- H(e,n,"Resource estimates and Outputs"),H(e,t,"Resource estimates and Workspace setup");let s=[...e.diagnostics||[]],r={
612
- version:1,outputs:[],workspaceSetup:null};if(e.status==="ready"&&s.length===0)try{r=yn(e.lines,{targets:n.status==="read\
613
- y"?Ee(n.lines).targets:[],hasWorkspaceSetup:t.status==="ready"&&ye(t.lines).length>0})}catch(o){if(o?.name!=="Vibe64Stac\
614
- kOperationError")throw o;s.push({code:En,message:o.message,details:{...o.details,causeCode:o.code}})}let i=s.length>0?"i\
615
- nvalid":r.outputs.length>0||r.workspaceSetup?"ready":"unconfigured";return{contract:kr,status:i,stackHash:e.stackHash,sectionHash:e.
616
- sectionHash||"",estimatesHash:i==="ready"?R(r):"",source:e.source||null,outputs:r.outputs,workspaceSetup:r.workspaceSetup,
617
- fallbackReason:i==="invalid"?"invalid-estimates":i==="unconfigured"?"not-declared":null,diagnostics:s}}var Or="vibe64.integration-setup.v1",bn="Integration setup",ie="VIBE64_INTEGRATION_SETUP_INVALID",Rr="- Command with `ru\
618
- ntime` in `workdir`: `command` `argument`...";function vn(e,n={}){let{path:t="genesis/stack.md#Integration setup"}=n;if(Array.
619
- isArray(e)||d(ie,t,"Integration setup requires exact Stack section lines."),w(e))return null;let s=e.map(i=>i.trim()).filter(
620
- Boolean),r=s.length===1&&s[0].match(/^- Command with (.+?) in `([^`\r\n]+)`: (.+)$/u);return r||d(ie,t,`Integration setu\
621
- p requires exactly one entry: ${Rr}; or - Nothing.`),{argv:A(r[3],ie,t,"Integration setup command"),workdir:b(r[2],ie,t,
622
- "Integration setup workdir"),runtimeRequirements:N(r[1],ie,t,"Integration setup runtimes")}}function wn({section:e={}}={}){
623
- let n=[...e.diagnostics||[]],t=e.status==="ready"&&n.length===0?vn(e.lines):null;return{contract:Or,status:n.length?"blo\
624
- cked":t?"ready":"unconfigured",stackHash:e.stackHash,recipeHash:t?R({version:1,command:t}):"",source:e.source||null,components:[
625
- ...e.components||[]],command:t,diagnostics:n}}var Ar=new URL("./index.js",import.meta.url).href,Tn=Cr(Ar),we=new Map;async function Pr(e){if(!B.isAbsolute(e||""))throw new TypeError(
626
- "Genesis host context requires an absolute runtime root.");let n=B.join(e,"genesis-context");if(!we.has(n)){let t=Nt(n).
627
- catch(s=>{throw we.delete(n),s});we.set(n,t)}return we.get(n)}var{GENESIS_CONTRACTS:C,HOST_CONTEXT_RESOLVER_DATA_ENV:Dr,
628
- HOST_CONTEXT_RESOLVER_ENV:$r,addStack:Vr,applyTemplate:xr,generatePrompt:jr,indexCodebase:Lr,initialize:Mr,inspectCollaboration:Gr,
629
- inspectDerivedArtifacts:Ur,inspectEngineering:Br,inspectEnvironment:Se,inspectProject:Wr,inspectProjectFormat:Hr,inspectAgentIntegrations:zr,
630
- inspectSkills:Fr,inspectStackSection:qr,inspectStackSections:Kr,inspectSubsystems:Yr,listTemplates:Xr,parserEnvironment:$o,
631
- setCollaboration:Jr,setEngineeringProfile:Zr,syncAgentIntegrations:Qr,syncSkills:ei,withTrustedGitRepository:ti,SOURCE_EXPLANATION_PROMPT_VERSION:Vo,
632
- sourceExplanationGuidance:xo,validateArchitectureFacts:jo,mergeArchitectureObservations:Lo,validateCityDocument:Mo,validateCallWeb:Go,
633
- CALL_WEB_SCHEMA:Uo,MACHINE_CITY_SCHEMA:Bo,PROGRAM_CITY_SCHEMA:Wo,CITY_SCHEMA_VERSION:Ho}=oe;async function zo(e){let n=await Pr(
634
- e);return{[$r]:ci(),[Dr]:JSON.stringify({registryPath:n.registryPath}),GENESIS_TURN_CONTEXT_ENABLED:"0"}}var Fo="genesis\
635
- /blueprint.md",qo="genesis/subsystems.md",ni=Object.freeze(["vue","django-postgresql","jskit-postgresql","postgresql","r\
636
- ails-postgresql","spring-boot-postgresql"]),si=Object.freeze(["genesis-stack"]),In=Object.freeze({BLUEPRINT_INVALID:"blu\
637
- eprint",BLUEPRINT_REQUIRED:"start"}),kn=new Set(["adopt","blueprint","describe","deslop","program","review","start","ui-\
638
- pass","work"]),et=15e3;function tt(e,n=et){let t,s=new Promise((r,i)=>{t=setTimeout(()=>i(Object.assign(new Error(`Genes\
639
- is did not answer within ${n} ms.`),{code:"vibe64_genesis_timeout"})),n)});return Promise.race([Promise.resolve().then(e),
640
- s]).finally(()=>clearTimeout(t))}function ri(e,n={}){let{required:t=!1}=n,s=x(e);if(!s&&!t)return"";if(!kn.has(s))throw new TypeError(
641
- s?`Unknown Genesis prompt task: ${s}.`:"Genesis prompt actions require an explicit task.");return s}function ii(e={}){return ri(
642
- e.genesisTask)||"work"}function oi(e={},n={}){return[e.conversationRequest,e.feedback,e.request,e.plan,e.description,n.label].
643
- map(x).find(Boolean)||"Continue the requested project work."}function ai(){let e=(Tn.resolve.paths("genesis-compiler")||
644
- []).find(n=>Sn(B.join(n,"genesis-compiler"))&&Sn(B.join(n,".bin","genesis")));if(!e)throw new Error("The installed Genes\
645
- is compiler executable could not be located.");return B.join(e,".bin")}function _n(){let e=Tn.resolve("@local/vibe64-gen\
646
- esis/server");return B.resolve(B.dirname(e),"../../bin")}function ci(){return B.resolve(_n(),"vibe64-genesis-host-contex\
647
- t")}function Ko(e=[]){let n=_n(),t=ai();return[...(Array.isArray(e)?e:[]).filter(r=>![n,t].includes(x(r))),n]}function ui(e={},n={}){
648
- let{prompt:t=!1}=n;return{...e,...t?{hiddenStackPieces:ni}:{},stackPackages:si}}function Yo(e={}){return W(Vr,e)}function Xo(e={}){
649
- return W(Mr,e)}function Jo(e={}){return te(Fr,e)}function Zo(e={}){return W(ei,e)}function Qo(e={}){return W(Qr,e)}function ea(e={}){
650
- return te(zr,e)}function ta(e={}){return te(Yr,e)}async function na(e={}){return vt(await K(ft,e))}async function sa(e={}){
651
- return It(await K(wt,e))}function ra(e={}){return W(Lr,e)}function pi(){let e=Ur();if(e?.contract!==C.derivedArtifacts)throw new Error(
652
- `Genesis returned ${e?.contract||"no contract identity"}; expected ${C.derivedArtifacts}.`);let n=Array.isArray(e.artifacts)?
653
- e.artifacts:[];if(!n.length||n.some(t=>!x(t?.path)))throw new Error("Genesis returned an invalid derived-artifact contra\
654
- ct.");return{...e,artifacts:n.map(t=>({...t}))}}var On=pi(),ia=Object.freeze(On.artifacts.map(e=>e.path)),nt=new Map(On.
655
- artifacts.map(e=>[e.id,e])),li=nt.get("machine-city")?.path,di=nt.get("program-city")?.path;if(!li||!di)throw new Error(
656
- "Genesis did not declare both City projection artifacts.");var mi=nt.get("call-web")?.path;if(!mi)throw new Error("Genes\
657
- is did not declare its call-web artifact.");async function W(e,n={},t={}){let s=x(n.projectRoot);if(!s||!B.isAbsolute(s))
658
- throw new TypeError("Genesis operations require an explicit absolute projectRoot.");return ti(s,()=>e(ui(n,t)))}function Rn(){}
659
- function hi(e){return`Genesis project guidance is unavailable for this conversation (${x(e?.message||e).replace(/\s+/gu,
660
- " ").slice(0,300)||"no reason given"}). Work from the repository itself, where the genesis/ files still describe the pro\
661
- ject when present, and tell the user that Genesis guidance did not load if it matters to the request.`}async function oa({
662
- workdir:e,promptContext:n},{onGenesisUnavailable:t=Rn,timeoutMs:s=et}={}){let r=ee(n);if(n.scope==="ephemeral")return r;
663
- let i;try{let o=await tt(()=>W(oe.projectSessionContext,{projectRoot:e,hostDriver:ee,hostDriverInput:n}),s);if(typeof o?.
664
- output=="string"&&o.output.trim())return o.output;i=new Error("Genesis returned no session guidance.")}catch(o){i=o}return t(
665
- i),`${hi(i)}
621
+ !P&&!i&&G(t,"Resource estimate references undeclared Workspace setup steps.",l),a={targetId:P,mode:Q?.mode||"setup",fields:new Map,
622
+ line:l};continue}let g=m.match(/^- ([A-Za-z ]+): `([1-9][0-9]*)`$/u),I=g&&yn.get(g[1]);(!a||!I)&&G(t,`Expected an Output\
623
+ or Workspace setup heading followed by positive integer MiB estimates: ${[...yn.keys()].map(P=>`- ${P}: \`number\``).join(
624
+ "; ")}.`,l),a.fields.has(I)&&G(t,`Duplicate resource field: ${g[1]}.`,l);let _=Number(g[2]);(!Number.isSafeInteger(_)||_>
625
+ En)&&G(t,`Resource estimates must be between 1 and ${En} MiB.`,l),a.fields.set(I,_*Ci)}return c(),u.size===0&&G(t,"Resou\
626
+ rce estimates needs an operation or exactly `- Nothing.`."),r}function Ie({section:e={},outputsSection:n={},workspaceSetupSection:t={}}={}){
627
+ z(e,n,"Resource estimates and Outputs"),z(e,t,"Resource estimates and Workspace setup");let s=[...e.diagnostics||[]],i={
628
+ version:1,outputs:[],workspaceSetup:null};if(e.status==="ready"&&s.length===0)try{i=vn(e.lines,{targets:n.status==="read\
629
+ y"?be(n.lines).targets:[],hasWorkspaceSetup:t.status==="ready"&&we(t.lines).length>0})}catch(o){if(o?.name!=="Vibe64Stac\
630
+ kOperationError")throw o;s.push({code:bn,message:o.message,details:{...o.details,causeCode:o.code}})}let r=s.length>0?"i\
631
+ nvalid":i.outputs.length>0||i.workspaceSetup?"ready":"unconfigured";return{contract:Ni,status:r,stackHash:e.stackHash,sectionHash:e.
632
+ sectionHash||"",estimatesHash:r==="ready"?A(i):"",source:e.source||null,outputs:i.outputs,workspaceSetup:i.workspaceSetup,
633
+ fallbackReason:r==="invalid"?"invalid-estimates":r==="unconfigured"?"not-declared":null,diagnostics:s}}var Pi="vibe64.integration-setup.v1",wn="Integration setup",re="VIBE64_INTEGRATION_SETUP_INVALID",Di="- Command with `ru\
634
+ ntime` in `workdir`: `command` `argument`...";function Sn(e,n={}){let{path:t="genesis/stack.md#Integration setup"}=n;if(Array.
635
+ isArray(e)||d(re,t,"Integration setup requires exact Stack section lines."),S(e))return null;let s=e.map(r=>r.trim()).filter(
636
+ Boolean),i=s.length===1&&s[0].match(/^- Command with (.+?) in `([^`\r\n]+)`: (.+)$/u);return i||d(re,t,`Integration setu\
637
+ p requires exactly one entry: ${Di}; or - Nothing.`),{argv:N(i[3],re,t,"Integration setup command"),workdir:b(i[2],re,t,
638
+ "Integration setup workdir"),runtimeRequirements:C(i[1],re,t,"Integration setup runtimes")}}function In({section:e={}}={}){
639
+ let n=[...e.diagnostics||[]],t=e.status==="ready"&&n.length===0?Sn(e.lines):null;return{contract:Pi,status:n.length?"blo\
640
+ cked":t?"ready":"unconfigured",stackHash:e.stackHash,recipeHash:t?A({version:1,command:t}):"",source:e.source||null,components:[
641
+ ...e.components||[]],command:t,diagnostics:n}}var $i=new URL("./index.js",import.meta.url).href,_n=xi($i),Te=new Map;async function ji(e){if(!B.isAbsolute(e||""))throw new TypeError(
642
+ "Genesis host context requires an absolute runtime root.");let n=B.join(e,"genesis-context");if(!Te.has(n)){let t=Dt(n).
643
+ catch(s=>{throw Te.delete(n),s});Te.set(n,t)}return Te.get(n)}var{GENESIS_CONTRACTS:R,HOST_CONTEXT_RESOLVER_DATA_ENV:Li,
644
+ HOST_CONTEXT_RESOLVER_ENV:Mi,PROMPT_TASKS:On,addStack:Gi,applyTemplate:Ui,generatePrompt:Bi,indexCodebase:Wi,initialize:Hi,
645
+ inspectCollaboration:zi,inspectDerivedArtifacts:Fi,inspectEngineering:qi,inspectEnvironment:ke,inspectPasses:Ki,inspectProject:Yi,
646
+ inspectProjectFormat:Xi,inspectAgentIntegrations:Ji,inspectSkills:Zi,inspectStackSection:Qi,inspectStackSections:er,inspectSubsystems:tr,
647
+ listTemplates:nr,parserEnvironment:Go,setCollaboration:sr,setEngineeringProfile:ir,syncAgentIntegrations:rr,syncSkills:or,
648
+ withTrustedGitRepository:ar,SOURCE_EXPLANATION_PROMPT_VERSION:Uo,sourceExplanationGuidance:Bo,validateArchitectureFacts:Wo,
649
+ mergeArchitectureObservations:Ho,validateCityDocument:zo,validateCallWeb:Fo,CALL_WEB_SCHEMA:qo,MACHINE_CITY_SCHEMA:Ko,PROGRAM_CITY_SCHEMA:Yo,
650
+ CITY_SCHEMA_VERSION:Xo}=oe;async function Jo(e){let n=await ji(e);return{[Mi]:hr(),[Li]:JSON.stringify({registryPath:n.registryPath}),
651
+ GENESIS_TURN_CONTEXT_ENABLED:"0"}}var Zo="genesis/blueprint.md",Qo="genesis/subsystems.md",cr=Object.freeze(["vue","djan\
652
+ go-postgresql","jskit-postgresql","postgresql","rails-postgresql","spring-boot-postgresql"]),ur=Object.freeze(["genesis-\
653
+ stack"]),kn=Object.freeze({BLUEPRINT_INVALID:"blueprint",BLUEPRINT_REQUIRED:"start"});if(!Array.isArray(On))throw new Error(
654
+ "This genesis-compiler lists no prompt tasks. Update it to the release Vibe64 declares.");var An=new Set(On),st=15e3;function it(e,n=st){
655
+ let t,s=new Promise((i,r)=>{t=setTimeout(()=>r(Object.assign(new Error(`Genesis did not answer within ${n} ms.`),{code:"\
656
+ vibe64_genesis_timeout"})),n)});return Promise.race([Promise.resolve().then(e),s]).finally(()=>clearTimeout(t))}function pr(e,n={}){
657
+ let{required:t=!1}=n,s=x(e);if(!s&&!t)return"";if(!An.has(s))throw new TypeError(s?`Unknown Genesis prompt task: ${s}.`:
658
+ "Genesis prompt actions require an explicit task.");return s}function lr(e={}){return pr(e.genesisTask)||"work"}function dr(e={},n={}){
659
+ return[e.conversationRequest,e.feedback,e.request,e.plan,e.description,n.label].map(x).find(Boolean)||"Continue the requ\
660
+ ested project work."}function mr(){let e=(_n.resolve.paths("genesis-compiler")||[]).find(n=>Tn(B.join(n,"genesis-compile\
661
+ r"))&&Tn(B.join(n,".bin","genesis")));if(!e)throw new Error("The installed Genesis compiler executable could not be loca\
662
+ ted.");return B.join(e,".bin")}function Rn(){let e=_n.resolve("@local/vibe64-genesis/server");return B.resolve(B.dirname(
663
+ e),"../../bin")}function hr(){return B.resolve(Rn(),"vibe64-genesis-host-context")}function ea(e=[]){let n=Rn(),t=mr();return[
664
+ ...(Array.isArray(e)?e:[]).filter(i=>![n,t].includes(x(i))),n]}function fr(e={},n={}){let{prompt:t=!1}=n;return{...e,...t?
665
+ {hiddenStackPieces:cr}:{},stackPackages:ur}}function ta(e={}){return W(Gi,e)}function na(e={}){return W(Hi,e)}function sa(e={}){
666
+ return te(Zi,e)}function ia(e={}){return W(or,e)}function ra(e={}){return W(rr,e)}function oa(e={}){return te(Ji,e)}function aa(e={}){
667
+ return te(tr,e)}async function ca(e={}){return It(await K(yt,e))}async function ua(e={}){return _t(await K(Tt,e))}function pa(e={}){
668
+ return W(Wi,e)}function gr(){let e=Fi();if(e?.contract!==R.derivedArtifacts)throw new Error(`Genesis returned ${e?.contract||
669
+ "no contract identity"}; expected ${R.derivedArtifacts}.`);let n=Array.isArray(e.artifacts)?e.artifacts:[];if(!n.length||
670
+ n.some(t=>!x(t?.path)))throw new Error("Genesis returned an invalid derived-artifact contract.");return{...e,artifacts:n.
671
+ map(t=>({...t}))}}var Nn=gr(),la=Object.freeze(Nn.artifacts.map(e=>e.path)),rt=new Map(Nn.artifacts.map(e=>[e.id,e])),Er=rt.
672
+ get("machine-city")?.path,yr=rt.get("program-city")?.path;if(!Er||!yr)throw new Error("Genesis did not declare both City\
673
+ projection artifacts.");var br=rt.get("call-web")?.path;if(!br)throw new Error("Genesis did not declare its call-web ar\
674
+ tifact.");async function W(e,n={},t={}){let s=x(n.projectRoot);if(!s||!B.isAbsolute(s))throw new TypeError("Genesis oper\
675
+ ations require an explicit absolute projectRoot.");return ar(s,()=>e(fr(n,t)))}function Cn(){}function vr(e){return`Gene\
676
+ sis project guidance is unavailable for this conversation (${x(e?.message||e).replace(/\s+/gu," ").slice(0,300)||"no rea\
677
+ son given"}). Work from the repository itself, where the genesis/ files still describe the project when present, and tel\
678
+ l the user that Genesis guidance did not load if it matters to the request.`}async function da({workdir:e,promptContext:n},{
679
+ onGenesisUnavailable:t=Cn,timeoutMs:s=st}={}){let i=ee(n);if(n.scope==="ephemeral")return i;let r;try{let o=await it(()=>W(
680
+ oe.projectSessionContext,{projectRoot:e,hostDriver:ee,hostDriverInput:n}),s);if(typeof o?.output=="string"&&o.output.trim())
681
+ return o.output;r=new Error("Genesis returned no session guidance.")}catch(o){r=o}return t(r),`${vr(r)}
666
682
 
667
- ${r}`}function te(e,n={}){return tt(()=>W(e,n))}function An(e,n){if(e?.contract!==n)throw new Error(`Genesis returned ${e?.
668
- contract||"no contract identity"}; expected ${n}.`);return e}async function F(e,n,t={}){return An(await te(e,t),n)}async function st(e,n,t={}){
669
- return An(await W(e,t),n)}function K(e,n={}){return F(t=>qr({...t,name:e}),C.stackSection,n)}async function rt(e,n={}){let t=await te(
670
- s=>Kr({...s,names:e}),n);if(!Array.isArray(t)||t.length!==e.length||t.some((s,r)=>s?.contract!==C.stackSection||s.name!==
671
- e[r]))throw new Error("Genesis returned an invalid Stack section inspection batch.");return t}async function aa(e={}){if((await fi(
683
+ ${i}`}function te(e,n={}){return it(()=>W(e,n))}function Pn(e,n){if(e?.contract!==n)throw new Error(`Genesis returned ${e?.
684
+ contract||"no contract identity"}; expected ${n}.`);return e}async function H(e,n,t={}){return Pn(await te(e,t),n)}async function ot(e,n,t={}){
685
+ return Pn(await W(e,t),n)}function K(e,n={}){return H(t=>Qi({...t,name:e}),R.stackSection,n)}async function at(e,n={}){let t=await te(
686
+ s=>er({...s,names:e}),n);if(!Array.isArray(t)||t.length!==e.length||t.some((s,i)=>s?.contract!==R.stackSection||s.name!==
687
+ e[i]))throw new Error("Genesis returned an invalid Stack section inspection batch.");return t}async function ma(e={}){if((await wr(
672
688
  e)).status!=="current")throw Object.assign(new Error("The project needs a current Genesis format before its Stack can be\
673
- inspected."),{code:"vibe64_stack_format_required"});await Nr(B.join(e.projectRoot,Ce),"utf8");let t=await K(re,e);return{
674
- components:t.components,stackHash:t.stackHash}}async function ca(e={}){let[n,t]=await Promise.all([K(Pt,e),F(Se,C.environment,
675
- e)]);return jt({environment:t,section:n})}async function ua(e={}){let[n,t]=await Promise.all([K(Wt,e),F(Se,C.environment,
676
- e)]);return Kt({environment:t,section:n})}function pa(e={}){return W(oe.verify,e)}function la(e={}){return F(Se,C.environment,
677
- e)}function da(e={}){return F(Wr,C.projectInspection,e)}function ma(e={}){return F(Xr,C.templates,e)}function ha(e={}){return st(
678
- xr,C.templateApplication,e)}function fa(e={}){return F(Br,C.engineering,e)}function ga(e={}){return F(Gr,C.collaboration,
679
- e)}async function fi(e={}){let n=await te(Hr,e);if(!x(n?.status))throw new Error("Genesis did not return a project-forma\
680
- t status.");return{...n}}function Ea(e={}){return st(Zr,C.engineering,e)}function ya(e={}){return st(Jr,C.collaboration,
681
- e)}async function ba({resourcesPreparing:e=!1,...n}={}){let[[t,s,r],i]=await Promise.all([rt([fe,be,re],n),F(Se,C.environment,
682
- n)]);return{...cn({environment:i,section:t,resourcesPreparing:e===!0}),resourceEstimates:ve({section:s,outputsSection:t,
683
- workspaceSetupSection:r})}}async function va(e={}){let n=await K(bn,e);return wn({section:n})}async function wa(e={}){return lt(
684
- await K(ut,e))}async function Sa(e={}){return ln(await K(un,e))}async function Ia(e={}){let[n,t,s]=await rt([re,be,fe],e);
685
- return{...await hn({projectRoot:e.projectRoot,section:n}),resourceEstimates:ve({section:t,outputsSection:s,workspaceSetupSection:n})}}
686
- async function Ta(e={}){let[n,t,s]=await rt([be,fe,re],e);return ve({section:n,outputsSection:t,workspaceSetupSection:s})}
687
- async function ka({action:e={},environment:n,input:t={},onGenesisUnavailable:s=Rn,projectRoot:r,timeoutMs:i=et}){let o=ii(
688
- e),c=oi(t,e),a=g=>W(jr,{environment:n,projectRoot:r,request:c,sessionContextInstalled:!0,task:g},{prompt:!0}),u=async()=>{
689
- try{return{result:await a(o),task:o}}catch(g){let S=Object.hasOwn(In,String(g?.code))?In[g.code]:"";if(!S||S===o||t.automaticGenesisTask===
690
- !0)throw g;return{result:await a(S),task:S}}},p;try{if(p=await tt(u,i),typeof p.result?.prompt!="string"||!p.result.prompt.
691
- trim())throw new Error("Genesis returned no prompt.")}catch(g){return s(g),{prompt:c}}let{result:m,task:l}=p,f=kn.has(x(
689
+ inspected."),{code:"vibe64_stack_format_required"});await Vi(B.join(e.projectRoot,$e),"utf8");let t=await K(ie,e);return{
690
+ components:t.components,stackHash:t.stackHash}}async function ha(e={}){let[n,t]=await Promise.all([K(xt,e),H(ke,R.environment,
691
+ e)]);return Mt({environment:t,section:n})}async function fa(e={}){let[n,t]=await Promise.all([K(zt,e),H(ke,R.environment,
692
+ e)]);return Xt({environment:t,section:n})}function ga(e={}){return W(oe.verify,e)}function Ea(e={}){return H(ke,R.environment,
693
+ e)}function ya(e={}){return H(Yi,R.projectInspection,e)}function ba(e={}){return H(nr,R.templates,e)}function va(e={}){return ot(
694
+ Ui,R.templateApplication,e)}function wa(e={}){return H(qi,R.engineering,e)}function Sa(e={}){return H(zi,R.collaboration,
695
+ e)}async function Ia(e){let{unavailable:n,passes:t,master:s}=await H(Ki,R.passes,e);return{unavailable:n,passes:t,master:s}}
696
+ async function wr(e={}){let n=await te(Xi,e);if(!x(n?.status))throw new Error("Genesis did not return a project-format s\
697
+ tatus.");return{...n}}function Ta(e={}){return ot(ir,R.engineering,e)}function ka(e={}){return ot(sr,R.collaboration,e)}
698
+ async function _a({resourcesPreparing:e=!1,...n}={}){let[[t,s,i],r]=await Promise.all([at([Ee,Se,ie],n),H(ke,R.environment,
699
+ n)]);return{...pn({environment:r,section:t,resourcesPreparing:e===!0}),resourceEstimates:Ie({section:s,outputsSection:t,
700
+ workspaceSetupSection:i})}}async function Oa(e={}){let n=await K(wn,e);return In({section:n})}async function Aa(e={}){return ht(
701
+ await K(dt,e))}async function Ra(e={}){return mn(await K(ln,e))}async function Na(e={}){let[n,t,s]=await at([ie,Se,Ee],e);
702
+ return{...await gn({projectRoot:e.projectRoot,section:n}),resourceEstimates:Ie({section:t,outputsSection:s,workspaceSetupSection:n})}}
703
+ async function Ca(e={}){let[n,t,s]=await at([Se,Ee,ie],e);return Ie({section:n,outputsSection:t,workspaceSetupSection:s})}
704
+ async function Pa({action:e={},environment:n,input:t={},onGenesisUnavailable:s=Cn,projectRoot:i,timeoutMs:r=st}){let o=lr(
705
+ e),u=dr(t,e),a=g=>W(Bi,{environment:n,projectRoot:i,request:u,sessionContextInstalled:!0,task:g},{prompt:!0}),c=async()=>{
706
+ try{return{result:await a(o),task:o}}catch(g){let I=Object.hasOwn(kn,String(g?.code))?kn[g.code]:"";if(!I||I===o||t.automaticGenesisTask===
707
+ !0)throw g;return{result:await a(I),task:I}}},p;try{if(p=await it(c,r),typeof p.result?.prompt!="string"||!p.result.prompt.
708
+ trim())throw new Error("Genesis returned no prompt.")}catch(g){return s(g),{prompt:u}}let{result:m,task:l}=p,f=An.has(x(
692
709
  m.task))?x(m.task):l;return{context:{genesis:!0,requestedTask:o,task:f,verificationCommands:m.verificationCommands,warnings:m.
693
- warnings},originalPrompt:c,prompt:m.prompt,promptId:x(e.promptId||e.id)||f}}export{Uo as CALL_WEB_SCHEMA,Ho as CITY_SCHEMA_VERSION,Fo as GENESIS_BLUEPRINT_PATH,mi as GENESIS_CALL_WEB_PATH,ia as GENESIS_DERIVED_ARTIFACT_PATHS,
694
- li as GENESIS_MACHINE_CITY_PATH,di as GENESIS_PROGRAM_CITY_PATH,Ce as GENESIS_STACK_PATH,Tt as GENESIS_STACK_SECTION_AMBIGUOUS,
695
- qo as GENESIS_SUBSYSTEMS_PATH,et as GENESIS_USER_PATH_TIMEOUT_MS,Bo as MACHINE_CITY_SCHEMA,Wo as PROGRAM_CITY_SCHEMA,Vo as SOURCE_EXPLANATION_PROMPT_VERSION,
696
- Ct as VIBE64_APPLICATION_DEPLOYMENT_CONTRACT,de as VIBE64_PACKAGING_CONTRACT,se as VIBE64_PREVIEW_IDENTITY_COMMAND_PROTOCOL,
697
- Yo as addGenesisStack,ha as applyGenesisTemplate,ri as assertGenesisPromptTask,_n as genesisCommandShimDirectory,ai as genesisPackageBinDirectory,
698
- $o as genesisParserEnvironment,is as genesisProjectContractNeedsAttention,cs as genesisProjectFileDiagnostic,as as genesisProjectFileUnreadable,
699
- oi as genesisPromptRequest,ii as genesisPromptTask,Xo as initializeGenesisProject,ea as inspectGenesisAgentIntegrations,
700
- ga as inspectGenesisCollaboration,pi as inspectGenesisDerivedArtifacts,fa as inspectGenesisEngineering,la as inspectGenesisEnvironment,
701
- da as inspectGenesisProject,fi as inspectGenesisProjectFormat,Jo as inspectGenesisSkills,aa as inspectGenesisStackComponents,
702
- ta as inspectGenesisSubsystems,na as inspectVibe64ArchitectureInspection,sa as inspectVibe64ArchitectureLayout,wa as inspectVibe64ConnectedDevelopment,
703
- ca as inspectVibe64Deployment,va as inspectVibe64IntegrationSetup,ba as inspectVibe64Outputs,ua as inspectVibe64Packaging,
704
- Sa as inspectVibe64ProjectServices,Ta as inspectVibe64ResourceEstimates,Ia as inspectVibe64WorkspaceSetup,ma as listGenesisTemplates,
705
- Lo as mergeArchitectureObservations,xt as parseVibe64DeploymentLines,vn as parseVibe64IntegrationSetupLines,Ee as parseVibe64OutputsLines,
706
- Ft as parseVibe64PackagingLines,pn as parseVibe64ProjectServicesLines,yn as parseVibe64ResourceEstimatesLines,ye as parseVibe64WorkspaceSetupLines,
707
- ts as readArchitecturePreviewLocator,ra as refreshGenesisCities,ka as renderGenesisPrompt,ar as resolveVibe64OutputParameters,
708
- qt as resolveVibe64PackagingEnvironment,ya as setGenesisCollaboration,Ea as setGenesisEngineeringProfile,xo as sourceExplanationGuidance,
709
- Qo as syncGenesisAgentIntegrations,Zo as syncGenesisSkills,jo as validateArchitectureFacts,Go as validateCallWeb,Mo as validateCityDocument,
710
- pa as verifyGenesisProject,oa as vibe64ConversationInstructions,ee as vibe64Driver,zo as vibe64HostContextEnvironment,Pr as vibe64HostContextRegistry,
711
- ci as vibe64HostContextResolverPath,Ko as withGenesisCommandShim,tt as withinGenesisDeadline};
710
+ warnings},originalPrompt:u,prompt:m.prompt,promptId:x(e.promptId||e.id)||f}}export{qo as CALL_WEB_SCHEMA,Xo as CITY_SCHEMA_VERSION,Zo as GENESIS_BLUEPRINT_PATH,br as GENESIS_CALL_WEB_PATH,la as GENESIS_DERIVED_ARTIFACT_PATHS,
711
+ Er as GENESIS_MACHINE_CITY_PATH,yr as GENESIS_PROGRAM_CITY_PATH,$e as GENESIS_STACK_PATH,Ot as GENESIS_STACK_SECTION_AMBIGUOUS,
712
+ Qo as GENESIS_SUBSYSTEMS_PATH,st as GENESIS_USER_PATH_TIMEOUT_MS,Ko as MACHINE_CITY_SCHEMA,Yo as PROGRAM_CITY_SCHEMA,Uo as SOURCE_EXPLANATION_PROMPT_VERSION,
713
+ Vt as VIBE64_APPLICATION_DEPLOYMENT_CONTRACT,he as VIBE64_PACKAGING_CONTRACT,se as VIBE64_PREVIEW_IDENTITY_COMMAND_PROTOCOL,
714
+ ta as addGenesisStack,va as applyGenesisTemplate,pr as assertGenesisPromptTask,Rn as genesisCommandShimDirectory,mr as genesisPackageBinDirectory,
715
+ Go as genesisParserEnvironment,cs as genesisProjectContractNeedsAttention,ls as genesisProjectFileDiagnostic,ps as genesisProjectFileUnreadable,
716
+ dr as genesisPromptRequest,lr as genesisPromptTask,na as initializeGenesisProject,oa as inspectGenesisAgentIntegrations,
717
+ Sa as inspectGenesisCollaboration,gr as inspectGenesisDerivedArtifacts,wa as inspectGenesisEngineering,Ea as inspectGenesisEnvironment,
718
+ ya as inspectGenesisProject,wr as inspectGenesisProjectFormat,sa as inspectGenesisSkills,ma as inspectGenesisStackComponents,
719
+ aa as inspectGenesisSubsystems,ca as inspectVibe64ArchitectureInspection,ua as inspectVibe64ArchitectureLayout,Aa as inspectVibe64ConnectedDevelopment,
720
+ ha as inspectVibe64Deployment,Oa as inspectVibe64IntegrationSetup,_a as inspectVibe64Outputs,fa as inspectVibe64Packaging,
721
+ Ra as inspectVibe64ProjectServices,Ca as inspectVibe64ResourceEstimates,Na as inspectVibe64WorkspaceSetup,Ia as listGenesisPasses,
722
+ ba as listGenesisTemplates,Ho as mergeArchitectureObservations,Lt as parseVibe64DeploymentLines,Sn as parseVibe64IntegrationSetupLines,
723
+ be as parseVibe64OutputsLines,Kt as parseVibe64PackagingLines,dn as parseVibe64ProjectServicesLines,vn as parseVibe64ResourceEstimatesLines,
724
+ we as parseVibe64WorkspaceSetupLines,is as readArchitecturePreviewLocator,pa as refreshGenesisCities,Pa as renderGenesisPrompt,
725
+ li as resolveVibe64OutputParameters,Yt as resolveVibe64PackagingEnvironment,ka as setGenesisCollaboration,Ta as setGenesisEngineeringProfile,
726
+ Bo as sourceExplanationGuidance,ra as syncGenesisAgentIntegrations,ia as syncGenesisSkills,Wo as validateArchitectureFacts,
727
+ Fo as validateCallWeb,zo as validateCityDocument,ga as verifyGenesisProject,da as vibe64ConversationInstructions,ee as vibe64Driver,
728
+ Jo as vibe64HostContextEnvironment,ji as vibe64HostContextRegistry,hr as vibe64HostContextResolverPath,ea as withGenesisCommandShim,
729
+ it as withinGenesisDeadline};