vibe64 0.1.32 → 0.1.34
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.
- package/bin/run.js +1717 -1648
- package/bin/server.js +81 -68
- package/bin/upgrade-state.js +5438 -5189
- package/dist/assets/{GithubBrowserTabs-2bEGbRAs.js → GithubBrowserTabs-DO5PHon-.js} +1 -1
- package/dist/assets/GithubMarkdown-BQ6MfCDJ.js +3 -0
- package/dist/assets/GithubMarkdown-U7-j-qNI.css +1 -0
- package/dist/assets/StudioErrorNotice-sQfmeR-z.js +1 -0
- package/dist/assets/VAlert-P256xaE0.js +1 -0
- package/dist/assets/VAutocomplete-BDb95qJX.js +1 -0
- package/dist/assets/VAvatar-9ilDR2r2.css +1 -0
- package/dist/assets/VAvatar-DPzqDH4r.js +1 -0
- package/dist/assets/VBtn-B2MBK2DL.js +1 -0
- package/dist/assets/VCard-mXy0k4aS.js +1 -0
- package/dist/assets/VCheckbox-C7A1ZW4D.js +1 -0
- package/dist/assets/VChip-CcI-Oo2J.js +1 -0
- package/dist/assets/VDialog-Bu3EfKb1.js +1 -0
- package/dist/assets/VDivider-BMEqUoAB.js +1 -0
- package/dist/assets/VExpansionPanels-Dgjrop0V.js +1 -0
- package/dist/assets/VMenu-C_x18lwb.js +1 -0
- package/dist/assets/VOverlay-CeMZurIN.js +1 -0
- package/dist/assets/VRadioGroup-CUu2-KIP.js +1 -0
- package/dist/assets/VRow-Cpw7OHQV.js +1 -0
- package/dist/assets/{VSelect-DY-ZuBJJ.js → VSelect-DL3HaA5m.js} +1 -1
- package/dist/assets/VSheet-DZWsu0kL.js +1 -0
- package/dist/assets/VSkeletonLoader-CttxM1tw.js +1 -0
- package/dist/assets/VSpacer-Dhmsvk4t.js +1 -0
- package/dist/assets/{VSwitch-Bm1bwl2V.js → VSwitch-BRHeDJkH.js} +1 -1
- package/dist/assets/VTextField-BR2eZeFT.js +1 -0
- package/dist/assets/VTextarea-DbqamXJd.js +1 -0
- package/dist/assets/Vibe64AsyncModuleState-Dx7YKRPp.js +1 -0
- package/dist/assets/Vibe64DashboardBackButton-DD9UR77P.css +1 -0
- package/dist/assets/Vibe64DashboardBackButton-yE6cyYg2.js +1 -0
- package/dist/assets/Vibe64DashboardPageHeader-BXQR00HK.js +1 -0
- package/dist/assets/Vibe64DashboardPageHeader-Gm1IvlHx.css +1 -0
- package/dist/assets/Vibe64DashboardShell-CuCVMhOc.js +1 -0
- package/dist/assets/Vibe64DashboardShell-MBkUHjs-.css +1 -0
- package/dist/assets/Vibe64DatabaseWorkspace-BONJdxBS.js +18 -0
- package/dist/assets/{Vibe64DatabaseWorkspace-C39Jvver.css → Vibe64DatabaseWorkspace-CR4pzzcf.css} +1 -1
- package/dist/assets/Vibe64OutputControls-DAAmA09l.js +8 -0
- package/dist/assets/{Vibe64OutputControls-CsZFv12r.css → Vibe64OutputControls-DPBsyDZM.css} +1 -1
- package/dist/assets/{Vibe64RepositoryWorkspace-ebUaYOU4.js → Vibe64RepositoryWorkspace-ByQlZbyO.js} +2 -2
- package/dist/assets/{Vibe64RepositoryWorkspace-Cqm6TOFk.css → Vibe64RepositoryWorkspace-CVHcT93M.css} +1 -1
- package/dist/assets/Vibe64SessionFiles-B0u9HKdF.js +107 -0
- package/dist/assets/Vibe64SessionFiles-NjOMVwPR.css +1 -0
- package/dist/assets/Vibe64TemporaryAiFixAction-BGlcrq4d.js +1 -0
- package/dist/assets/Vibe64UiStoryboardView-3WXph5bz.css +1 -0
- package/dist/assets/Vibe64UiStoryboardView-Brlwdvqi.js +7 -0
- package/dist/assets/Vibe64UnavailableSessions-zwlWlcZD.js +1 -0
- package/dist/assets/_sessionId_-CvOkQbVy.js +1 -0
- package/dist/assets/{_sessionTool_-B39BIzzZ.js → _sessionTool_-Dwod5ns9.js} +1 -1
- package/dist/assets/_slug_-B31c15cc.css +1 -0
- package/dist/assets/_slug_-Dy35qLo1.js +1 -0
- package/dist/assets/access-BVu5XYm2.js +1 -0
- package/dist/assets/app-DRXCcv05.css +1 -0
- package/dist/assets/app-zt7HwQKT.js +1 -0
- package/dist/assets/assistantRouting-CwbwfkwB.js +3 -0
- package/dist/assets/{changes-ByjS7QGx.js → changes-olY8cnFK.js} +1 -1
- package/dist/assets/{client-C-tpoG6F.js → client-BrV4QPwG.js} +1 -1
- package/dist/assets/createSimpleFunctional-CZTGuNuR.js +1 -0
- package/dist/assets/dashboard-BnXD-H4R.js +1 -0
- package/dist/assets/definitions-DaOPIkyB.js +1 -0
- package/dist/assets/env-DJhnLOH7.css +1 -0
- package/dist/assets/env-DN0vW4EI.js +1 -0
- package/dist/assets/{error-DFKtZBJ8.js → error-DgrgRbJJ.js} +1 -1
- package/dist/assets/{error-DE4zo8Lk.js → error-Dug56can.js} +1 -1
- package/dist/assets/health-7oIQODer.css +1 -0
- package/dist/assets/health-Z6m96GDr.js +1 -0
- package/dist/assets/history-BOwbCRQP.css +1 -0
- package/dist/assets/history-BxlpB-YH.js +1 -0
- package/dist/assets/incoming-BOxRVlOM.js +2 -0
- package/dist/assets/incoming-DWDrmxyH.css +1 -0
- package/dist/assets/index-BUq-MczL.js +86 -0
- package/dist/assets/{index-D4MsP3dq.css → index-DtmBqE3h.css} +1 -1
- package/dist/assets/{integrations-B4txOZfY.js → integrations-BFltGDVI.js} +1 -1
- package/dist/assets/issues-1iS5zoed.js +1 -0
- package/dist/assets/issues-XnpGgdmn.css +1 -0
- package/dist/assets/layout-BkWVNT37.js +1 -0
- package/dist/assets/lazy-NHSwD9FS.js +1 -0
- package/dist/assets/mdi-C54lQ0i_.js +1 -0
- package/dist/assets/{pages-BW2l8fNe.js → pages-DuMgH61T.js} +1 -1
- package/dist/assets/{placement-JxzrmUR3.js → placement-CwTqWLQH.js} +1 -1
- package/dist/assets/placement-DLsU3pCW.js +1 -0
- package/dist/assets/pull-requests-BJOwNL4k.js +1 -0
- package/dist/assets/pull-requests-CdbhyFOv.css +1 -0
- package/dist/assets/{repository-BTC3lkrh.js → repository-JWLVST3D.js} +1 -1
- package/dist/assets/{VAvatar-CAFvgSUo.js → ripple-BVltMmyV.js} +2 -2
- package/dist/assets/ripple-DqhAt1Ze.css +1 -0
- package/dist/assets/runtime-core.esm-bundler-DGXg_mpN.js +3 -0
- package/dist/assets/{session-CG-TUCJt.css → session-5qADMzDP.css} +1 -1
- package/dist/assets/session-C5Nj8Dlq.js +1 -0
- package/dist/assets/settings-BopLnpB0.css +1 -0
- package/dist/assets/settings-c273Ikrm.js +1 -0
- package/dist/assets/ssrBoot-Rlh6kLbD.js +1 -0
- package/dist/assets/{studioGateApi-C0GvzVlt.js → studioGateApi-DhA9IJGZ.js} +1 -1
- package/dist/assets/{studioUrls-CIab-Axb.js → studioUrls-Dj8rXeXO.js} +1 -1
- package/dist/assets/{useApi-BPuI6ZR9-Dr8wK_Co.js → useApi-BPuI6ZR9-CFWU1m37.js} +1 -1
- package/dist/assets/useArchivedVibe64Sessions-CVZx2Rtm.js +1 -0
- package/dist/assets/useCommand-DWuxfAV0.js +1 -0
- package/dist/assets/useEndpointResource-MWVNfmMa.js +1 -0
- package/dist/assets/{usePaths-DVTieF_G.js → usePaths-Db88-HOm.js} +1 -1
- package/dist/assets/{useUiFeedback-Tzi-PRlX.js → useUiFeedback-0FqKuZRP.js} +1 -1
- package/dist/assets/useVibe64ConversationLog-8cKh1eDm.js +1 -0
- package/dist/assets/useVibe64DatabaseTools-BcRG1s3i.js +1 -0
- package/dist/assets/useVibe64LearningMode-Bl0dGdCh.js +28 -0
- package/dist/assets/useVibe64LearningMode-C3PcXdVg.css +1 -0
- package/dist/assets/useVibe64ProjectScope-DOEVkBqX.js +1 -0
- package/dist/assets/useVibe64SessionData-DFTyLzci.js +1 -0
- package/dist/assets/useVibe64SessionSelection-j9lsllx4.js +1 -0
- package/dist/assets/useVibe64SystemGraph-tNkIwSBQ.js +1 -0
- package/dist/assets/{useVibe64Terminal-C2XJ9Y1K.js → useVibe64Terminal-BPnN25WH.js} +1 -1
- package/dist/assets/vibe64AssistantHost-DdE_-lZF.js +1 -0
- package/dist/assets/vibe64LessonDashboard-DlKYjisq.js +1 -0
- package/dist/assets/vibe64ProjectScope.local-DqT6e5un.js +1 -0
- package/dist/assets/vibe64RepositoryRealtime-DXk0Jai3.js +1 -0
- package/dist/assets/vibe64SessionFocus-OJ2toBd9.css +1 -0
- package/dist/assets/vibe64SessionFocus-kqPOPaOH.js +1 -0
- package/dist/assets/{vibe64SessionInfo-D8l22MFm.js → vibe64SessionInfo-BHxtTrLX.js} +1 -1
- package/dist/assets/vibe64SessionToolDefinitions-NfLd1HZI.js +1 -0
- package/dist/assets/vue-flow-core-BlVEnES8.js +26 -0
- package/dist/index.html +51 -48
- package/docs/colleague-usage/account-profile-and-appearance.md +29 -0
- package/docs/colleague-usage/ai-accounts-and-routing.md +23 -4
- package/docs/colleague-usage/ai-balance-and-allowance.md +4 -0
- package/docs/colleague-usage/architecture-explanations.md +99 -0
- package/docs/colleague-usage/auto-workflow.md +49 -11
- package/docs/colleague-usage/coding-agent-failures.md +94 -0
- package/docs/colleague-usage/coding-agent-goal-pause.md +110 -0
- package/docs/colleague-usage/coding-agent-goals.md +140 -38
- package/docs/colleague-usage/coding-agent-history.md +20 -2
- package/docs/colleague-usage/coding-agent-recovery.md +136 -0
- package/docs/colleague-usage/coding-agents.md +138 -150
- package/docs/colleague-usage/colleague-recovery.md +28 -5
- package/docs/colleague-usage/colleague-upgrade-recovery.md +4 -0
- package/docs/colleague-usage/colleague-watches.md +84 -0
- package/docs/colleague-usage/colleague.md +18 -34
- package/docs/colleague-usage/connected-contributions.md +196 -0
- package/docs/colleague-usage/connected-projects.md +196 -0
- package/docs/colleague-usage/conversation-context.md +67 -1
- package/docs/colleague-usage/dashboard-navigation.md +79 -5
- package/docs/colleague-usage/database.md +11 -0
- package/docs/colleague-usage/developing-vibe64.md +137 -0
- package/docs/colleague-usage/development-copies.md +20 -0
- package/docs/colleague-usage/development-env.md +34 -0
- package/docs/colleague-usage/file-interfaces.md +156 -0
- package/docs/colleague-usage/github-work.md +88 -1
- package/docs/colleague-usage/health-checks.md +32 -0
- package/docs/colleague-usage/incoming-changes.md +94 -0
- package/docs/colleague-usage/learning-chat-retention.md +11 -2
- package/docs/colleague-usage/learning-code-questions.md +55 -0
- package/docs/colleague-usage/learning-course-catalogue.md +118 -0
- package/docs/colleague-usage/learning-diagrams-and-voice.md +97 -0
- package/docs/colleague-usage/learning-history.md +17 -9
- package/docs/colleague-usage/learning-lesson-watch.md +95 -0
- package/docs/colleague-usage/learning-mode-ui.md +187 -85
- package/docs/colleague-usage/learning-native-session.md +12 -10
- package/docs/colleague-usage/learning-practical-exercises.md +71 -0
- package/docs/colleague-usage/learning-practical-gestures.md +18 -1
- package/docs/colleague-usage/learning-practice-projects.md +55 -4
- package/docs/colleague-usage/learning-session-creation.md +7 -7
- package/docs/colleague-usage/learning-teacher-guide.md +52 -0
- package/docs/colleague-usage/learning-with-colleague.md +59 -80
- package/docs/colleague-usage/lesson-authoring.md +12 -4
- package/docs/colleague-usage/lesson-practical-assessment.md +3 -1
- package/docs/colleague-usage/managed-app-access.md +6 -0
- package/docs/colleague-usage/message-delivery-recovery.md +56 -0
- package/docs/colleague-usage/plans.md +14 -7
- package/docs/colleague-usage/preview-browser-checks.md +61 -0
- package/docs/colleague-usage/preview-lesson-presentation.md +56 -0
- package/docs/colleague-usage/preview-starting-application.md +92 -0
- package/docs/colleague-usage/preview.md +70 -96
- package/docs/colleague-usage/project-architecture.md +229 -0
- package/docs/colleague-usage/project-language-tools.md +31 -0
- package/docs/colleague-usage/project-messages.md +106 -0
- package/docs/colleague-usage/project-settings.md +22 -0
- package/docs/colleague-usage/project-setup.md +29 -2
- package/docs/colleague-usage/session-terminal.md +42 -0
- package/docs/colleague-usage/sessions.md +122 -52
- package/docs/colleague-usage/teaching-content.md +12 -6
- package/docs/colleague-usage/temporary-chat-context.md +29 -0
- package/docs/colleague-usage/temporary-chats.md +95 -2
- package/docs/colleague-usage/voice-chat.md +10 -43
- package/docs/colleague-usage/voice-face-and-speaking-voice.md +73 -0
- package/docs/colleague-usage/workspace-preparation.md +89 -0
- package/docs/training-content.md +208 -7
- package/node_modules/@jskit-ai/assistant-core/package.json +1 -1
- package/node_modules/@jskit-ai/assistant-runtime/README.md +29 -0
- package/node_modules/@jskit-ai/assistant-runtime/package.json +1 -1
- package/node_modules/@jskit-ai/assistant-voice/package.json +1 -1
- package/node_modules/@jskit-ai/connector-google-calendar/package.json +1 -1
- package/node_modules/@jskit-ai/connectors-catalog/package.json +1 -1
- package/node_modules/@jskit-ai/connectors-core/package.json +1 -1
- package/node_modules/@jskit-ai/http-runtime/package.json +1 -1
- package/node_modules/@jskit-ai/kernel/package.json +1 -1
- package/node_modules/@jskit-ai/payments-core/package.json +1 -1
- package/node_modules/@jskit-ai/realtime/package.json +1 -1
- package/node_modules/@jskit-ai/resource-core/package.json +1 -1
- package/node_modules/@jskit-ai/resource-crud-core/package.json +1 -1
- package/node_modules/@jskit-ai/uploads-runtime/package.json +1 -1
- package/node_modules/@local/vibe64-core/package.json +1 -0
- package/node_modules/@local/vibe64-execution/src/host/execHelper.js +280 -272
- package/node_modules/@local/vibe64-genesis/README.md +15 -0
- package/node_modules/@local/vibe64-genesis/bin/vibe64-genesis-host-context +879 -1225
- package/node_modules/@local/vibe64-genesis/package.json +2 -1
- package/node_modules/@local/vibe64-genesis/src/server/index.js +496 -418
- package/node_modules/@local/vibe64-genesis/src/server/promptContext.js +165 -146
- package/node_modules/@local/vibe64-runtime/src/server/agentSessionCommandHook.js +8 -8
- package/node_modules/@local/vibe64-runtime/src/server/codexAppServerProcess.js +128 -129
- package/node_modules/@local/vibe64-system-graph/README.md +136 -6
- package/node_modules/@local/vibe64-terminals/package.json +3 -0
- package/node_modules/@local/vibe64-terminals/src/server/sessionWorkOperationCommand.js +1527 -1326
- package/node_modules/@local/vibe64-training/package.json +6 -1
- package/node_modules/@local/vibe64-voice/package.json +1 -0
- package/package.json +16 -16
- package/server.bundle.mjs +42853 -40268
- package/dist/assets/StudioErrorNotice-Ccjvcn9C.js +0 -1
- package/dist/assets/VAlert-B7ciJKQL.js +0 -1
- package/dist/assets/VAutocomplete-QjMk5d_j.js +0 -1
- package/dist/assets/VAvatar-nHaK192T.css +0 -1
- package/dist/assets/VBtn-Kl_qcBsy.js +0 -1
- package/dist/assets/VCard-nrJPeo91.js +0 -1
- package/dist/assets/VCheckbox-DTRAWOIf.js +0 -1
- package/dist/assets/VChip-Dfs5jX0f.js +0 -1
- package/dist/assets/VDialog-Dt1VjJg1.js +0 -1
- package/dist/assets/VDivider-DFsS0OTx.js +0 -1
- package/dist/assets/VExpansionPanels-CYKU0cAr.js +0 -1
- package/dist/assets/VMenu-BLxobsuU.js +0 -1
- package/dist/assets/VOverlay-BvFVZKNS.js +0 -1
- package/dist/assets/VRadioGroup-DzQzpCfg.js +0 -1
- package/dist/assets/VRow-BR2RMCM1.js +0 -1
- package/dist/assets/VSheet-BA95RNmA.js +0 -1
- package/dist/assets/VSkeletonLoader-hpJqr0HL.js +0 -1
- package/dist/assets/VSpacer-B1l1hVvU.js +0 -1
- package/dist/assets/VTextField-CA_p3N4d.js +0 -1
- package/dist/assets/VTextarea-NyCqY4h5.js +0 -1
- package/dist/assets/Vibe64AsyncModuleState-DEFlqJ97.js +0 -1
- package/dist/assets/Vibe64DashboardShell-BNv2I-P8.js +0 -1
- package/dist/assets/Vibe64DashboardShell-w20wNTGW.css +0 -1
- package/dist/assets/Vibe64DatabaseWorkspace-CuY5lN1o.js +0 -43
- package/dist/assets/Vibe64OutputControls-D2JuYlYU.js +0 -8
- package/dist/assets/Vibe64SessionFiles-C-rWehq_.js +0 -34
- package/dist/assets/Vibe64SessionFiles-Dsr6KQNP.css +0 -1
- package/dist/assets/Vibe64SubsystemsView-BvdU_o6H.css +0 -1
- package/dist/assets/Vibe64SubsystemsView-DJCjSzQM.js +0 -1
- package/dist/assets/Vibe64SystemWorldView-B91ioQaO.js +0 -4312
- package/dist/assets/Vibe64SystemWorldView-BXiQ7_Qb.css +0 -1
- package/dist/assets/Vibe64UnavailableSessions-OvnoD3ZB.js +0 -1
- package/dist/assets/_sessionId_-JTvMh54L.js +0 -1
- package/dist/assets/_slug_-DP_heCDa.js +0 -1
- package/dist/assets/_slug_-DmBZGb0q.css +0 -1
- package/dist/assets/access-C8GQIS19.js +0 -1
- package/dist/assets/app-B83lF61Y.js +0 -1
- package/dist/assets/app-ByLIQ3SB.css +0 -1
- package/dist/assets/assistantRouting-TDtryU6o.js +0 -1
- package/dist/assets/createSimpleFunctional-DPIT6zsT.js +0 -1
- package/dist/assets/dashboard-CWGFPojJ.js +0 -1
- package/dist/assets/definitions-BeLcvOW3.js +0 -1
- package/dist/assets/display-BLmcO-5p.js +0 -1
- package/dist/assets/env-7bqFyF_E.css +0 -1
- package/dist/assets/env-BVwxNL8M.js +0 -1
- package/dist/assets/health-BzNhp7r8.js +0 -1
- package/dist/assets/health-DoHTXTGx.css +0 -1
- package/dist/assets/history-BPeZGofK.js +0 -1
- package/dist/assets/history-iMQxp5AR.css +0 -1
- package/dist/assets/httpClient-BaaZuFvF.js +0 -1
- package/dist/assets/index-5sKwLHOH.js +0 -86
- package/dist/assets/issues-DCEhGlfn.css +0 -1
- package/dist/assets/issues-wby50y9b.js +0 -3
- package/dist/assets/layout-YCn17mK1.js +0 -1
- package/dist/assets/lazy-CvQfXeLg.js +0 -1
- package/dist/assets/mdi-C31_SZp-.js +0 -1
- package/dist/assets/placement-C4R2t6rl.js +0 -1
- package/dist/assets/pull-requests-BNK6mq2u.css +0 -1
- package/dist/assets/pull-requests-lNQAigaC.js +0 -1
- package/dist/assets/runtime-core.esm-bundler-DMrccYS5.js +0 -3
- package/dist/assets/session-D38nzG41.js +0 -1
- package/dist/assets/settings-CFyUJ_kR.js +0 -1
- package/dist/assets/settings-vWsAEoE9.css +0 -1
- package/dist/assets/useArchivedVibe64Sessions-C2DSq2Z4.js +0 -1
- package/dist/assets/useCommand-BzThFLYP.js +0 -1
- package/dist/assets/useEndpointResource-C2KD4Ub_.js +0 -1
- package/dist/assets/useVibe64ConversationLog-CMUlXJtU.js +0 -1
- package/dist/assets/useVibe64DatabaseTools-DBcKhm6B.js +0 -1
- package/dist/assets/useVibe64LearningMode-BPRWM5Rp.js +0 -28
- package/dist/assets/useVibe64LearningMode-PJUv0O25.css +0 -1
- package/dist/assets/useVibe64SessionData-CdtJbAIx.js +0 -1
- package/dist/assets/useVibe64SessionSelection-aR0f6xVT.js +0 -1
- package/dist/assets/useVibe64SystemGraph-DeTPBn0e.js +0 -1
- package/dist/assets/vibe64AssistantHost-Dgyz4TrT.js +0 -1
- package/dist/assets/vibe64ProjectScope.local-GOSMVDRi.js +0 -1
- package/dist/assets/vibe64RepositoryRealtime-t5Al8BlU.js +0 -1
- package/dist/assets/vibe64SessionFocus-CcN6Grgw.js +0 -1
- package/dist/assets/vibe64SessionFocus-ChabllPA.css +0 -1
- package/dist/assets/vibe64SessionToolDefinitions-BaO1DEup.js +0 -1
- /package/dist/assets/{vibe64RepositoryRealtime-D_mq1dFE.css → Vibe64TemporaryAiFixAction-D_mq1dFE.css} +0 -0
|
@@ -1,428 +1,506 @@
|
|
|
1
1
|
import { createRequire as __vibe64CreateRequire } from 'node:module';const require=__vibe64CreateRequire(import.meta.url);
|
|
2
|
-
import{
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import{createHash as ft}from"node:crypto";import ae from"node:path";var ee=class extends Error{constructor(t,n,s=void 0){
|
|
3
|
+
super(n),this.name="Vibe64StackOperationError",this.code=t,s!==void 0&&(this.details=s)}};function p(e,t,n,s,r={}){throw new ee(
|
|
4
|
+
e,n,{path:t,...s===void 0?{}:{line:s},...r})}function O(e,t,n,s,r){return(typeof e!="string"||!e.trim()||/[\0\r\n]/u.test(
|
|
5
|
+
e))&&p(t,n,`${s} must be one non-empty line.`,r),e.trim()}function ht(e){let t=[...String(e||"").matchAll(/`([^`\r\n]+)`/gu)];
|
|
6
|
+
return t.length===0||t.map(n=>n[0]).join(" ")!==e?null:t.map(n=>n[1])}function C(e,t,n,s,r,{count:i,maximum:o=64}={}){let c=ht(
|
|
7
|
+
e);if(!c||c.length>o||i!==void 0&&c.length!==i||c.some(u=>u.length>4096||/[\0\r\n]/u.test(u))){let u=i===void 0?"separat\
|
|
8
|
+
e non-empty":`exactly ${i}`;p(t,n,`${s} must contain ${u} backticked ${i===1?"value":"values"}.`,r)}return c}function gt(e=""){
|
|
9
|
+
return typeof e=="string"&&!!e&&!/[\s\0{}]/u.test(e)&&!ae.isAbsolute(e)&&!e.split(/[\\/]/u).includes("..")}function _(e,t,n,s,r){
|
|
10
|
+
let i=C(e,t,n,s,r);return gt(i[0])||p(t,n,`${s} must begin with a safe executable.`,r),i}function yt(e=""){return typeof e==
|
|
11
|
+
"string"&&!!e&&!/[\0\r\n\\]/u.test(e)&&!ae.posix.isAbsolute(e)&&ae.posix.normalize(e)===e&&!e.split("/").some(t=>!t||t===
|
|
12
|
+
"..")}function g(e,t,n,s,r,{allowRoot:i=!0}={}){return(!yt(e)||!i&&e===".")&&p(t,n,`${s} must be a canonical project-rel\
|
|
13
|
+
ative path.`,r),e}function R(e,t,n,s,r){let i=C(e,t,n,s,r);return i.some(o=>!/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(o))&&p(t,
|
|
14
|
+
n,`${s} must use lowercase technology ids separated into backticked values.`,r),new Set(i).size!==i.length&&p(t,n,`${s} \
|
|
15
|
+
contains a duplicate technology id.`,r),i}function ue(e,t,n,s,r){let i=O(e,t,n,s,r);return(!i.startsWith("/")||i.startsWith(
|
|
16
|
+
"//")||/[\\?#]/u.test(i))&&p(t,n,`${s} must begin with one slash and contain no query or fragment.`,r),i}function te(e,t,n,s,r){
|
|
17
|
+
let i=e.match(/^- Ready when: `GET` `([^`\r\n]+)` returns `([0-9]{3})`$/u);i||p(t,n,`${s} must use \`- Ready when: \`GET\` \
|
|
18
|
+
\`/path\` returns \`200\`\`.`,r);let o=Number(i[2]);return(!Number.isInteger(o)||o<200||o>399)&&p(t,n,`${s} status must \
|
|
19
|
+
be from 200 through 399.`,r),{kind:"http",method:"GET",path:ue(i[1],t,n,`${s} path`,r),status:o}}function ce(e){return Array.
|
|
20
|
+
isArray(e)?e.map(ce):e&&typeof e=="object"?Object.fromEntries(Object.keys(e).sort().map(t=>[t,ce(e[t])])):e}function T(e){
|
|
21
|
+
let t=`${JSON.stringify(ce(e),null,2)}
|
|
22
|
+
`;return`sha256:${ft("sha256").update(t).digest("hex")}`}function G(e={},t={},n="operation"){if(e.stackHash!==t.stackHash)
|
|
23
|
+
throw new ee("VIBE64_STACK_CHANGED",`The Stack changed while Vibe64 inspected its ${n}. Retry the operation.`)}function B(e=[]){
|
|
24
|
+
return[...new Set(e)].sort()}function b(e=[]){let t=e.map(n=>n.trim()).filter(Boolean);return t.length===1&&t[0]==="- No\
|
|
25
|
+
thing."}import{access as bt}from"node:fs/promises";import Se from"node:path";var Te="vibe64.workspace-setup.v1",X="Workspace setup",K="VIBE64_WORKSPACE_SETUP_INVALID",wt=/^- Prepare `([^`\r\n]+)` with (.+?):[ \t]+(.+)$/u,
|
|
26
|
+
Et=/^(.*?)[ \t]+when `([^`\r\n]+)` exists$/u,vt=/^(.*?)[ \t]+if `([^`\r\n]+)` exists$/u,St=/^(.*?)[ \t]+in `([^`\r\n]+)`$/u;
|
|
27
|
+
function pe(e,t,n,s={}){p(K,e,t,n,s)}function F(e,{path:t="genesis/stack.md#Workspace setup"}={}){if(Array.isArray(e)||pe(
|
|
28
|
+
t,"Workspace setup must be supplied as exact Stack section lines."),b(e))return[];let n=[];for(let s=0;s<e.length;s+=1){
|
|
29
|
+
let r=e[s].trim();if(!r)continue;let i=s+1,o=r.match(wt);o||pe(t,"Every Workspace setup entry must use: - Prepare `label\
|
|
30
|
+
` with `runtime` [in `workdir`] [when|if `path` exists]: `command` `argument`...",i,{observed:r});let c=o[2].match(Et),u=c?
|
|
31
|
+
null:o[2].match(vt),a=c?c[1]:u?u[1]:o[2],m=c?.[2]||u?.[2]||"",l=a.match(St),d=l?l[1]:a,h=l?l[2]:".";n.push({label:O(o[1],
|
|
32
|
+
K,t,"Workspace setup step label",i),argv:_(o[3],K,t,"Workspace setup command",i),runtimeRequirements:R(d,K,t,"Workspace \
|
|
33
|
+
setup runtimes",i),workdir:g(h,K,t,"Workspace setup workdir",i),...m?{condition:{pathExists:g(m,K,t,"Workspace setup con\
|
|
34
|
+
dition path",i,{allowRoot:!1}),onMissing:c?"wait":"skip"}}:{}})}return n.length===0&&pe(t,"## Workspace setup needs at l\
|
|
35
|
+
east one Prepare entry or exactly `- Nothing.`."),n}async function Tt(e,t){try{return await bt(Se.join(e,t)),!0}catch(n){
|
|
36
|
+
if(["ENOENT","ENOTDIR"].includes(n?.code))return!1;throw n}}async function Ie({projectRoot:e,section:t={}}={}){let n=[...t.
|
|
37
|
+
diagnostics||[]],s=[];t.status==="ready"&&(s=F(t.lines));let r=[],i=[],o=Se.resolve(e);if(n.length===0)for(let d of s){if(!d.
|
|
38
|
+
condition||await Tt(o,d.condition.pathExists)){r.push(d);continue}d.condition.onMissing==="wait"&&i.push(d.condition.pathExists)}
|
|
39
|
+
if(i.length>0){let d=B(i);n.push({code:"VIBE64_WORKSPACE_SETUP_WAITING",message:`Workspace setup is waiting for project ${d.
|
|
40
|
+
length===1?"path":"paths"}: ${d.join(", ")}.`,details:{paths:d}})}let c=n.some(({code:d})=>d==="VIBE64_WORKSPACE_SETUP_W\
|
|
41
|
+
AITING"),u=n.some(({code:d})=>d!=="VIBE64_WORKSPACE_SETUP_WAITING"),a="unconfigured";u?a="blocked":!c&&r.length>0&&(a="r\
|
|
42
|
+
eady");let m=r.map(({condition:d,...h})=>h),l={version:1,steps:m};return{contract:Te,status:a,stackHash:t.stackHash,recipeHash:a===
|
|
43
|
+
"ready"?T(l):"",components:[...t.components||[]],source:t.source||null,runtimeRequirements:B(m.flatMap(d=>d.runtimeRequirements)),
|
|
44
|
+
steps:m,diagnostics:n}}var It="custom",kt=Object.freeze([Object.freeze({value:"npm",label:"npm (Node.js)"}),Object.freeze({value:"composer",label:"\
|
|
45
|
+
Composer (PHP)"}),Object.freeze({value:"pip",label:"pip (Python)"}),Object.freeze({value:"bundler",label:"Bundler (Ruby)"}),
|
|
46
|
+
Object.freeze({value:"gomod",label:"Go modules"}),Object.freeze({value:"cargo",label:"Cargo (Rust)"}),Object.freeze({value:"\
|
|
47
|
+
maven",label:"Maven"}),Object.freeze({value:"gradle",label:"Gradle"}),Object.freeze({value:"nuget",label:"NuGet (.NET)"}),
|
|
48
|
+
Object.freeze({value:It,label:"custom"})]),ke=Object.freeze(kt.map(e=>e.value));function Oe(e){return typeof e=="string"&&
|
|
49
|
+
ke.includes(e)}function _e(e="or"){let t=ke;return`${t.slice(0,-1).join(", ")} ${e} ${t.at(-1)}`}var Re="Connected development",Ot="vibe64.connected-development.v1",D="VIBE64_CONNECTED_DEVELOPMENT_INVALID",N="genesis/\
|
|
50
|
+
stack.md#Connected development";function Ae(e={}){let t="",n="",s=null,r=[],i=[...e.diagnostics||[]],o=e.status==="ready";
|
|
51
|
+
if(o&&!b(e.lines)){let u=!1;for(let[m,l]of e.lines.entries()){let d=l.trim();if(!d)continue;let h=m+1,y=d.match(/^- Default package type: `([^`\r\n]*)`$/u);
|
|
52
|
+
if(y){n&&p(D,N,"Declare exactly one default package type.",h),Oe(y[1])||p(D,N,`Default package type must be ${_e()}.`,h),
|
|
53
|
+
n=y[1];continue}let q=d.match(/^- Sources file: `([^`\r\n]+)`$/u);if(q){t&&p(D,N,"Declare exactly one Sources file.",h),
|
|
54
|
+
t=g(q[1],D,N,"Connected sources file",h,{allowRoot:!1}),t.split("/").some($=>$.toLowerCase()===".git")&&p(D,N,"The Sourc\
|
|
55
|
+
es file must be outside Git metadata.",h);continue}let k=d.startsWith("- Custom runner "),J=d.match(/^- (Prepare|Verify) /u);
|
|
56
|
+
!k&&!J&&p(D,N,"Declare a Sources file and Prepare/Verify entries using the Workspace setup command grammar.",h);let z=J?.[1]===
|
|
57
|
+
"Verify"?"verify":"prepare";!k&&u&&z==="prepare"&&p(D,N,"All Prepare entries must precede Verify entries.",h),u||=!k&&z===
|
|
58
|
+
"verify";let Z;try{let $=k?d.replace("- Custom runner ","- Prepare `Custom connected source` "):d.replace(/^- Verify /u,
|
|
59
|
+
"- Prepare ");[Z]=F([$],{path:N})}catch($){if($.code!=="VIBE64_WORKSPACE_SETUP_INVALID")throw $;p(D,N,$.message,h)}Z.condition&&
|
|
60
|
+
p(D,N,"Connected development steps must run unconditionally; a skipped step cannot prove source consumption.",h),k?(s&&p(
|
|
61
|
+
D,N,"Declare exactly one Custom runner.",h),s=Z):r.push({...Z,phase:z})}!(n&&!t&&!r.length&&!s)&&(!t||!r.some(m=>m.phase===
|
|
62
|
+
"verify")&&!s)&&p(D,N,"Declare a default package type alone, or a Sources file with Verify entries or a Custom runner; u\
|
|
63
|
+
se `- Nothing.` for no declaration.")}let c=e.status==="blocked"||i.length?"blocked":r.length||s?"ready":"unconfigured";
|
|
64
|
+
return{contract:Ot,declared:o,status:c,stackHash:e.stackHash,recipeHash:c==="ready"?T({version:1,sourcesFile:t,defaultPackageType:n,
|
|
65
|
+
customRunner:s,steps:r}):"",components:[...e.components||[]],source:e.source||null,sourcesFile:t,defaultPackageType:n,customRunner:s,
|
|
66
|
+
steps:r,runtimeRequirements:B([...r,...s?[s]:[]].flatMap(u=>u.runtimeRequirements)),diagnostics:i}}var Ce="Architecture inspection",E="VIBE64_ARCHITECTURE_INSPECTION_INVALID";function _t(e,{path:t="genesis/stack.md#Arch\
|
|
67
|
+
itecture inspection"}={}){if(Array.isArray(e)||p(E,t,"Architecture inspection requires exact Stack section lines."),b(e))
|
|
68
|
+
return[];let n=[],s=new Set,r;function i(){if(r){for(let o of["runtimeRequirements","workdir","argv","timeout","maxBuffe\
|
|
69
|
+
r"])r[o]===void 0&&p(E,t,`${r.id} is missing ${o}.`);n.push(r),r=null}}for(let[o,c]of e.entries()){let u=c.trim();if(!u)
|
|
70
|
+
continue;let a=u.match(/^### Inspector `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(a){i(),s.has(a[1])&&p(E,t,"Duplicate in\
|
|
71
|
+
spector id.",o+1),s.add(a[1]),r={id:a[1],title:a[2]};continue}r||p(E,t,"Expected an Inspector heading.",o+1);let m=u.match(
|
|
72
|
+
/^- (Runtime|Directory|Command|Timeout seconds|Max output bytes|Entry files|Required files): (.+)$/u);m||p(E,t,"Unknown \
|
|
73
|
+
architecture inspector field.",o+1);let l={Runtime:"runtimeRequirements",Directory:"workdir",Command:"argv","Timeout sec\
|
|
74
|
+
onds":"timeout","Max output bytes":"maxBuffer","Entry files":"entryFiles","Required files":"requiredFiles"}[m[1]];if(r[l]!==
|
|
75
|
+
void 0&&p(E,t,`Duplicate ${m[1]}.`,o+1),l==="runtimeRequirements")r[l]=R(m[2],E,t,"Inspector runtime",o+1);else if(l==="\
|
|
76
|
+
argv")r[l]=_(m[2],E,t,"Inspector command",o+1);else if(l==="entryFiles"||l==="requiredFiles")r[l]=C(m[2],E,t,m[1],o+1).map(
|
|
77
|
+
d=>g(d,E,t,m[1],o+1));else{let[d]=C(m[2],E,t,m[1],o+1,{count:1});if(l==="workdir")r[l]=g(d,E,t,"Inspector directory",o+1);else{
|
|
78
|
+
let h=Number(d),y=l==="timeout"?60:4*1024*1024;(!/^[1-9][0-9]*$/u.test(d)||!Number.isSafeInteger(h)||h>y)&&p(E,t,`${m[1]}\
|
|
79
|
+
must be from 1 to ${y}.`,o+1),r[l]=l==="timeout"?h*1e3:h}}}return i(),n.length||p(E,t,"Use an Inspector entry or - Noth\
|
|
80
|
+
ing."),n}function Ne(e){let t=e.status==="ready"?_t(e.lines):[];for(let n of t)n.runtimeRequirements.some(s=>!e.components.
|
|
81
|
+
includes(s))&&p(E,"genesis/stack.md#Architecture inspection","Inspector runtimes must be selected in Stack.");return{contract:"\
|
|
82
|
+
vibe64.architecture-inspection.v1",status:e.status,stackHash:e.stackHash,inspectors:t,recipeHash:T(t),diagnostics:e.diagnostics||
|
|
83
|
+
[]}}var De="Architecture layout";function Rt(e,{path:t="genesis/stack.md#Architecture layout"}={}){let n="VIBE64_ARCHITECTUR\
|
|
84
|
+
E_LAYOUT_INVALID";if(Array.isArray(e)||p(n,t,"Expected exact Stack section lines."),b(e))return[];let s=[],r=new Set,i=new Set,
|
|
85
|
+
o;function c(){o&&((!o.kind||!o.purpose||!o.subsystems.length)&&p(n,t,`${o.id} needs Kind, Purpose and at least one Subs\
|
|
86
|
+
ystem.`),s.push(o))}for(let[u,a]of e.entries()){let m=a.trim();if(!m)continue;let l=m.match(/^### Group `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);
|
|
87
|
+
if(l){c(),r.has(l[1])&&p(n,t,"Duplicate group id.",u+1),r.add(l[1]),o={id:l[1],title:l[2],subsystems:[]};continue}let d=m.
|
|
88
|
+
match(/^- (Kind|Purpose|Subsystem): (.+)$/u);(!o||!d)&&p(n,t,"Expected a Group heading or Kind, Purpose, Subsystem field\
|
|
89
|
+
.",u+1);let h=C(d[2],n,t,d[1],u+1,{count:1});if(d[1]==="Subsystem"){let y=g(h[0],n,t,"Subsystem root",u+1);i.has(y)&&p(n,
|
|
90
|
+
t,"Each directory root may be placed only once.",u+1),i.add(y),o.subsystems.push({root:y})}else{let y=d[1].toLowerCase();
|
|
91
|
+
o[y]!==void 0&&p(n,t,`Duplicate ${d[1]}.`,u+1),y==="kind"&&!["layer","libraries","support"].includes(h[0])&&p(n,t,"Kind \
|
|
92
|
+
must be layer, libraries or support.",u+1),o[y]=h[0]}}return c(),s.length||p(n,t,"Use a Group entry or - Nothing."),s}function xe(e){
|
|
93
|
+
return{contract:"vibe64.architecture-layout.v1",status:e.status,stackHash:e.stackHash,groups:e.status==="ready"?Rt(e.lines):
|
|
94
|
+
[],diagnostics:e.diagnostics||[]}}import{existsSync as ct}from"node:fs";import{readFile as Rn}from"node:fs/promises";import{createRequire as An}from"node:module";
|
|
95
|
+
import j from"node:path";var Ve="STACK_PROJECT_CONTRACTS_INCOMPLETE",Pe="STACK_SECTION_AMBIGUOUS",At=Object.freeze([Ve,Pe]);function Ct(e){return At.
|
|
96
|
+
includes(String(e?.code||"").trim())}import*as we from"genesis-compiler";import{mkdir as $t,mkdtemp as Gt,readFile as Lt,rename as Ut,rm as Wt,writeFile as Ht}from"node:fs/promises";import qt from"node:os";
|
|
97
|
+
import de from"node:path";var Nt=Object.freeze(["main","temporary"]),je=Object.freeze(["managedDatabaseRefresh","managedEnvironment","managedGit",
|
|
98
|
+
"managedPreview"]),Dt=64*1024,xt=Object.freeze(["When user input is necessary, ask no more than three concise, high-impa\
|
|
6
99
|
ct questions at once.","Put multiple questions on separate lines as `[1] Question`, `[2] Question`, and so on.","For a s\
|
|
7
|
-
mall fixed set of useful choices,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
e
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
100
|
+
mall fixed set of useful choices, put `Possible answers:` and a short bullet list directly beneath its own question, bef\
|
|
101
|
+
ore the next one; never collect several questions' answers into one trailing list.","Each bullet is one distinct, comple\
|
|
102
|
+
te answer: Yes and No are separate bullets; never join alternatives with a slash or `or`. Omit the list for free-text an\
|
|
103
|
+
swers. The user may always type a different answer.",`Example:
|
|
104
|
+
[1] Which density?
|
|
105
|
+
Possible answers:
|
|
106
|
+
- Compact
|
|
107
|
+
- Comfortable
|
|
108
|
+
[2] Tell the main agent before changes?
|
|
109
|
+
Possible answers:
|
|
110
|
+
- Yes, tell main first
|
|
111
|
+
- No, proceed independently`]),Vt=Object.freeze(["The Vibe64-managed preview is the canonical application server; never \
|
|
112
|
+
start a duplicate or replacement server. If it is unavailable, report that blocker. Describe only rendered browser evide\
|
|
113
|
+
nce.","When adopting an authenticated app, or when its login blocks Preview inspection, inspect identity support/names w\
|
|
114
|
+
ith `vibe64-helper preview status`; prefer `vibe64-helper preview browser identity <configured-name>` to requesting pass\
|
|
115
|
+
words. If unconfigured, ask which existing accounts (email/login/user ID) represent admin and other required roles, and \
|
|
116
|
+
the default. Reuse prior answers; wait for their choices before configuring access. Never infer admin rights from names \
|
|
117
|
+
or the Vibe64 viewer.","Offer the application-owned `vibe64.preview-identity.command.v1` adapter in Outputs Preview iden\
|
|
118
|
+
tity, and guide named selectors through Dashboard > App access > Managed app access. Use existing sessions/permissions, \
|
|
119
|
+
reject missing/disabled accounts, and disable the adapter without Vibe64\u2019s per-run enable flag and secret. Do not create\
|
|
120
|
+
users, change roles, reset passwords or weaken production auth for import. Verify the selected account\u2019s actual Preview\
|
|
121
|
+
access; a saved selector is insufficient. If deferred/declined, explain access remains unconfigured and continue indepe\
|
|
122
|
+
ndent setup work without repeated credential requests. Public/non-web apps need no adapter.","Use `vibe64-helper preview\
|
|
123
|
+
status`, `screenshot`, `logs`, and `browser eval` (Playwright code on stdin) for rendered inspection.","The top Preview\
|
|
124
|
+
toolbar Stop and `vibe64-helper preview stop` stop this session's application and managed browser, not chat or source. \
|
|
125
|
+
Status reports the saved stopped choice. A status read, screenshot, browser inspection, source edit or session reopening\
|
|
126
|
+
is not permission to restart it; use `vibe64-helper preview ensure --wait` only for a deliberate Start. Scoped browser \
|
|
127
|
+
tests restore the prior stopped choice.","For interactive navigation, use the proxy URL from `vibe64-helper preview insp\
|
|
128
|
+
ect-url` or status `currentPage.url` / `endpoints.browser.url`. Inside browser eval, use `await page.goto(new URL('/your\
|
|
129
|
+
-path', preview.url).href)`. The direct application endpoint under diagnostics bypasses Preview identity and is not a br\
|
|
130
|
+
owser-navigation URL.","Use the managed preview browser for interactive browsing and `vibe64-helper playwright` only for\
|
|
131
|
+
an existing configured project suite; report a platform or project-test blocker rather than installing another browser \
|
|
132
|
+
or changing its dependencies.","For browser evidence, batch related actions and assertions, return only needed values an\
|
|
133
|
+
d inspect relevant locators or regions; screenshot at meaningful visual checkpoints or failures, not after every click. \
|
|
134
|
+
Reuse the managed browser when test isolation permits. Preserve required viewport, identity and security checks; use exi\
|
|
135
|
+
sting automated cases for repeat verification.","For browser tests that write or reset data, inspect `vibe64-helper prev\
|
|
136
|
+
iew targets --json` and the project's `genesis/stack.md` Outputs. Run `vibe64-helper playwright --target <declared-test-\
|
|
137
|
+
target> test <suite arguments>` or `vibe64-helper playwright --target <declared-test-target> npm-run <script>`. Vibe64 s\
|
|
138
|
+
tarts that web target, waits for readiness, uses its declared application identity, and restores the previous Preview wh\
|
|
139
|
+
en the command finishes or is cancelled; report restoration failures.","A target name is not proof of test isolation. Be\
|
|
140
|
+
fore running a destructive suite, the application must verify the server's actual test database and suppress real email,\
|
|
141
|
+
invoices, payments, and other external effects. Keep managed Env unchanged. The test launcher and its preview-identity \
|
|
142
|
+
command must use the same database. Use a declared BROWSER_TEST_DB_NAME for reusable browser fixtures, separate from dis\
|
|
143
|
+
posable TEST_DB_NAME. Never spoof safety checks by changing DB_NAME only in the test runner.","If no suitable test targe\
|
|
144
|
+
t exists, add one through the project's existing Outputs contract and application-owned test scripts within authorized s\
|
|
145
|
+
cope, keeping normal Preview as default. Validate the exact disposable database before resetting it, prepare fixtures be\
|
|
146
|
+
fore reporting readiness, and make Playwright use PLAYWRIGHT_BASE_URL without starting another server. If the required t\
|
|
147
|
+
est resources or external-effect controls are missing, report that specific blocker. Use `vibe64-helper preview ensure -\
|
|
148
|
+
-target <id> --wait --json` only to deliberately select an interactive target; it stays selected until changed.","Keep r\
|
|
149
|
+
outine browser startup incremental: reuse the isolated test schema, apply only pending migrations, and reset fixture dat\
|
|
150
|
+
a deterministically. Do not drop and rebuild the database or run a production frontend build for every focused browser c\
|
|
151
|
+
heck. Keep fresh-schema migration checks separate. If startup is slow, measure migrations, fixtures, and server startup \
|
|
152
|
+
before retrying or extending deadlines.","Keep test output small: run relevant files/cases, save stdout/stderr to local \
|
|
153
|
+
artifacts and preserve exit status. Report counts, duration, failed cases, actionable errors and artifact paths. Read on\
|
|
154
|
+
ly needed failure excerpts, not full passing/JSON/TAP/request/trace/image output. Retain startup, resource and Preview-r\
|
|
155
|
+
estoration errors even if tests pass, and trailing wrapper diagnostics separately from JSON. Do not rerun for output or \
|
|
156
|
+
reread unchanged logs; inspect on new output, changed state or a concrete blocker.","Batch related browser tests in one \
|
|
157
|
+
managed suite (one Preview switch and restore). Suites and live Preview actions are sequential: no browser actions, ensu\
|
|
158
|
+
re/restart or target changes during a suite or restoration. Wait on the original execution, including background runs, t\
|
|
159
|
+
hrough cleanup/restoration (empty polls: yield_time_ms: 30000 where supported; shorter only for interactive input or an \
|
|
160
|
+
immediate check); read-only status/logs stay available. Before live inspection, confirm `vibe64-helper playwright status\
|
|
161
|
+
` has no active run and `vibe64-helper preview status` is ready on the restored target. To stop, read suite status then \
|
|
162
|
+
run `vibe64-helper playwright cancel <run-id>`, which waits for cleanup/restoration; retry it if cleanup needs attention\
|
|
163
|
+
. Never kill individual test/Preview PIDs or change locks. Launcher exit alone does not prove tests stopped. Recheck cur\
|
|
164
|
+
rent status before reporting a busy blocker.","If a managed command reports kernel task denials or a resource incident, \
|
|
165
|
+
retain its diagnostic and incident ID when reporting the blocker. Ask the platform operator to inspect that resource evi\
|
|
166
|
+
dence before retrying; do not increase test timeouts or weaken assertions to work around a process/thread limit. A gener\
|
|
167
|
+
ic browser timeout without resource evidence does not establish a platform cause."]),Pt=Object.freeze(["Each managed she\
|
|
168
|
+
ll command receives current development Env from Vibe64, including declared resource bindings; use them in ordinary comm\
|
|
169
|
+
ands. Do not build environment injection or copy managed credentials into source. Resource provisioning and application \
|
|
170
|
+
migrations remain separate preparation steps.","Use `vibe64-helper env status [development|production|all]` to inspect c\
|
|
171
|
+
onfigured key names without revealing values.","Pipe an available value to `vibe64-helper env set <development|productio\
|
|
172
|
+
n> <KEY> [--secret]`; never put values in arguments, logs, or repository files. Use empty stdin only when the user reque\
|
|
173
|
+
sted an empty value.","Keep development and production values separate. Never invent credentials, copy a value between s\
|
|
174
|
+
copes without explicit direction, or edit Vibe64 runtime/session storage.","After an Env mutation, report only the affec\
|
|
175
|
+
ted scope and key names, never their values, and claim success only when the command succeeded.","When declared, TEST_DB\
|
|
176
|
+
_NAME is the exact disposable integration database and BROWSER_TEST_DB_NAME is a separate reusable browser-fixture datab\
|
|
177
|
+
ase whose migration ledger survives routine runs. Follow the application\u2019s declared test resources; never reset DB_NAME,\
|
|
178
|
+
share these test identities, or invent a database name."]);function Be(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`${t} must be an object.`);return e}function le(e,t,n){
|
|
179
|
+
let s=new Set(t),r=Object.keys(e).filter(i=>!s.has(i));if(r.length>0)throw new TypeError(`${n} contains unsupported fiel\
|
|
180
|
+
ds: ${r.join(", ")}.`)}function Me(e){if(le(e,["conversationKind","scope","session","hostGuidance"],"Vibe64 session cont\
|
|
181
|
+
ext"),e.hostGuidance!==void 0&&(typeof e.hostGuidance!="string"||Buffer.byteLength(e.hostGuidance,"utf8")>1024))throw new TypeError(
|
|
182
|
+
"Vibe64 host guidance must be bounded text supplied by the host.");if(!Nt.includes(e.conversationKind))throw new TypeError(
|
|
183
|
+
"Vibe64 session context has an unknown conversationKind.");let t=Be(e.session,"Vibe64 session capabilities");le(t,je,"Vi\
|
|
184
|
+
be64 session capabilities");let n=Object.fromEntries(je.map(s=>{if(typeof t[s]!="boolean")throw new TypeError(`Vibe64 se\
|
|
185
|
+
ssion capability ${s} must be boolean.`);return[s,t[s]]}));return{conversationKind:e.conversationKind,scope:"session",...e.
|
|
186
|
+
hostGuidance?{hostGuidance:e.hostGuidance}:{},session:n}}function jt(e){le(e,["scope","stableContext"],"Vibe64 ephemeral\
|
|
187
|
+
context");let t=String(e.stableContext||"").trim();if(!t||t.length>Dt)throw new TypeError("Vibe64 ephemeral context req\
|
|
188
|
+
uires bounded stableContext.");return{scope:"ephemeral",stableContext:t}}function Bt(e){if(e.scope==="session")return Me(
|
|
189
|
+
e);if(e.scope==="ephemeral")return jt(e);throw new TypeError("The Vibe64 driver supports session and ephemeral scopes on\
|
|
190
|
+
ly.")}function Mt(e){let{conversationKind:t,session:n,hostGuidance:s=""}=Me(e);return["VIBE64 CONVERSATION CONTEXT","",...t===
|
|
191
|
+
"main"?["This is the main Vibe64 conversation for the selected session worktree."]:["This is a user-visible temporary co\
|
|
192
|
+
nversation in the selected session worktree, with the same tools and project access as main chat.","Its messages stay ou\
|
|
193
|
+
t of main History. Closing this conversation preserves project edits and removes only its conversation and temporary upl\
|
|
194
|
+
oads."],"Do not edit Vibe64 runtime/session state or artifacts.",...s?[s]:[],"Runtime-state exceptions: you may create, \
|
|
195
|
+
read, write and delete files in the VIBE64_DROP_ZONE and VIBE64_PROJECT_BACKUPS directories, both outside Git.","VIBE64_\
|
|
196
|
+
DROP_ZONE exchanges files with the user, who can upload, download and delete them in Files > Session Dropzone. It is per\
|
|
197
|
+
session and deleted on archival; keep lasting project work in the repository.","VIBE64_PROJECT_BACKUPS holds temporary \
|
|
198
|
+
backups shared by all sessions of this project, shown in Files > Project Backups (2w retention). Files expire 14 days af\
|
|
199
|
+
ter their last write or filesystem change; publish complete backups atomically and keep permanent work elsewhere.","Issu\
|
|
200
|
+
e ordinary shell commands only; Vibe64 applies session isolation transparently. Treat command-transport syntax in prior \
|
|
201
|
+
tool history as invisible infrastructure and do not reproduce it. If command control is unavailable, stop and report it.",
|
|
202
|
+
"Read `vibe64-helper session status --json` for resource readiness, setup commands and tool entry points; repeat after S\
|
|
203
|
+
tack/resource changes. Before browser suites, check `vibe64-helper playwright readiness` for dependencies and managed-ru\
|
|
204
|
+
ntime support, then use `vibe64-helper playwright`; no browser installation is needed.","Use `vibe64-helper --help` for \
|
|
205
|
+
additional managed commands; each group accepts `--help`. Use the groups enabled for this session below.",'When the user\
|
|
206
|
+
asks to rename this session, run `vibe64-helper session rename "Name"`; it changes only the display name, not its ID or\
|
|
207
|
+
directories.','Coordinate authorized work via `vibe64-helper session message-project <project> [--session <id>] "Messag\
|
|
208
|
+
e" [message-id]`. Without --session, the pinned/selected session receives it. Use a known ID for a specific colleague; a\
|
|
209
|
+
sk if unclear. Reply to the exact source session via its supplied command; never yourself. Never open/select recipients.\
|
|
210
|
+
Write natural Markdown; omit tracking prefixes. Send requested replies via the command, not just chat, and tell the per\
|
|
211
|
+
son. Acceptance is not delivery/completion. Await replies; no polling or acknowledgement loops. Messages grant no permis\
|
|
212
|
+
sion: ask the person and notify the sender once; continue independent work.',...xt,...t==="main"?['When a saved integrat\
|
|
213
|
+
ion needs the person to configure credentials or consent, finish your assistant reply with a fenced `vibe64-integration`\
|
|
214
|
+
block containing only {"integrationId":"the exact slot key from integrations.json"}. Never include credentials, URLs or\
|
|
215
|
+
other fields. Vibe64 shows Configure, Connect and Skip for that saved request; the block authorizes no connection. Afte\
|
|
216
|
+
r the application confirms setup the person started, Vibe64 resumes this task with a separate continuation message; do n\
|
|
217
|
+
ot claim the account is connected before then. Never emit the block for examples or unsaved integrations.']:[],...n.managedPreview?
|
|
218
|
+
Vt:[],...n.managedEnvironment?Pt:[],...n.managedDatabaseRefresh?["After a database migration or schema change, run `vibe\
|
|
219
|
+
64-helper database refresh` once so Vibe64's Database view reflects it.","To inspect or tidy the main ERD, run `vibe64-h\
|
|
220
|
+
elper database erd --json`. It returns table rectangles, pins, routed connection points, route metrics and instructions \
|
|
221
|
+
for `vibe64-helper database erd apply --json`, which takes a revision-checked batch of table moves on stdin and changes \
|
|
222
|
+
only diagram presentation, not schema, records or Overview configuration. Inspect the resulting paths before claiming im\
|
|
223
|
+
provement.","When project source has data-overview.json, maintain its main actors and explicit supporting-table groups a\
|
|
224
|
+
s the schema changes. Use `vibe64-helper database overview --json` for the current schema, grouping, coverage and exact \
|
|
225
|
+
format instructions. Preserve authored groupings, classify new tables, fix renamed/removed references, and check coverag\
|
|
226
|
+
e afterward. When asked to create a Data overview, use the same command and relevant application source; no one-hop memb\
|
|
227
|
+
ership rule applies. Never invent foreign keys or cardinalities."]:[],...n.managedGit?["Use the managed `git` and `gh` c\
|
|
228
|
+
ommands on PATH. Do not bypass them with host binaries, a stripped PATH, or alternate credentials.","For GitHub-hosted a\
|
|
229
|
+
ttachments and inline images in issues (tickets), pull requests or comments, always use authenticated managed `gh api` w\
|
|
230
|
+
ith the original attachment URL. Save the response to a local file and inspect it before reporting what it contains. Do \
|
|
231
|
+
not use unauthenticated curl/wget, User-Agent experiments, or extract credentials for a separate HTTP client. An unauthe\
|
|
232
|
+
nticated 404 does not prove a private attachment is missing.","After changing GitHub issues, comments, labels or pull re\
|
|
233
|
+
quests, run `vibe64-helper github refresh` once so Vibe64's Issues/PR view reflects it.","When linking an issue in this \
|
|
234
|
+
project's repository, run `vibe64-helper github issue-link <number>` and use its returned Vibe64 path exactly as the pri\
|
|
235
|
+
mary Markdown link destination, including the /app prefix. Root-relative or same-origin Vibe64 links navigate in-app wit\
|
|
236
|
+
hout reloading. You may include the GitHub URL as a secondary link. Do not guess the project slug or host; issues in oth\
|
|
237
|
+
er repositories keep their GitHub links.","Report authentication or transport failures directly; do not inspect credenti\
|
|
238
|
+
als or invent another login path.","When a managed Git/GitHub command fails, tell the user which requested action failed\
|
|
239
|
+
, which earlier work is confirmed complete, what remains undone or unconfirmed, and the next safe action. Retain the rep\
|
|
240
|
+
orted failure stage, execution budget and execution reference when provided; do not expose credentials or dump raw outpu\
|
|
241
|
+
t unnecessarily.","A timeout or transport failure does not establish invalid authentication, exhausted AI quota, a GitHu\
|
|
242
|
+
b outage or a suspension problem. Separate recorded facts from hypotheses; say the cause is unknown when it is unproven.\
|
|
243
|
+
Recommend reconnection only when the reported error explicitly calls for it.","If the diagnostic says commandSubmitted=\
|
|
244
|
+
false, the requested Git/GitHub action was not attempted. After an execution timeout, lost response or unreadable respon\
|
|
245
|
+
se, its effects remain unconfirmed: use a read-only check of the affected Git/GitHub state before repeating any write. N\
|
|
246
|
+
ever claim that a comment was posted or not posted, or that a push succeeded or failed, solely from those errors. If ver\
|
|
247
|
+
ification is unavailable, report the outcome as unknown and stop; do not repeat the write or claim it was safely rolled \
|
|
248
|
+
back."]:[]].join(`
|
|
249
|
+
`)}function Y(e={}){let t=Be(e,"Vibe64 driver input"),n=Bt(t);return n.scope==="session"?Mt(n):n.stableContext}async function $e(e=""){let t=e||await Gt(de.join(qt.tmpdir(),"vibe64-genesis-context-"));await $t(t,{recursive:!0,mode:448});
|
|
250
|
+
let n=de.join(t,"sessions.json"),s=new Map;try{let c=JSON.parse(await Lt(n,"utf8"));for(let u of c.sessions)Y(u.promptContext),
|
|
251
|
+
s.set(u.upstreamSessionId,u)}catch(c){if(c.code!=="ENOENT")throw c}let r=Promise.resolve(),i=!1;async function o(c){let u=de.
|
|
252
|
+
join(t,"sessions.tmp");await Ht(u,JSON.stringify({sessions:[...c.values()]}),{mode:384}),await Ut(u,n)}return await o(s),
|
|
253
|
+
{registryPath:n,get(c){return structuredClone(s.get(c))},async register(c,u,a=""){if(i)throw new Error("The Genesis host\
|
|
142
254
|
context registry is closed.");if(typeof c!="string"||!c.trim())throw new TypeError("Genesis host context requires a nat\
|
|
143
|
-
ive conversation ID.");let
|
|
144
|
-
then(async()=>{if(JSON.stringify(
|
|
145
|
-
async close(){
|
|
146
|
-
|
|
147
|
-
e,n
|
|
148
|
-
|
|
149
|
-
return t.length===0||t.map(n=>n[0]).join(" ")!==e?null:t.map(n=>n[1])}function V(e,t,n,r,i,{count:s,maximum:a=64}={}){let c=ht(
|
|
150
|
-
e);if(!c||c.length>a||s!==void 0&&c.length!==s||c.some(u=>u.length>4096||/[\0\r\n]/u.test(u))){let u=s===void 0?"separat\
|
|
151
|
-
e non-empty":`exactly ${s}`;h(t,n,`${r} must contain ${u} backticked ${s===1?"value":"values"}.`,i)}return c}function ft(e=""){
|
|
152
|
-
return typeof e=="string"&&!!e&&!/[\s\0{}]/u.test(e)&&!ne.isAbsolute(e)&&!e.split(/[\\/]/u).includes("..")}function k(e,t,n,r,i){
|
|
153
|
-
let s=V(e,t,n,r,i);return ft(s[0])||h(t,n,`${r} must begin with a safe executable.`,i),s}function gt(e=""){return typeof e==
|
|
154
|
-
"string"&&!!e&&!/[\0\r\n\\]/u.test(e)&&!ne.posix.isAbsolute(e)&&ne.posix.normalize(e)===e&&!e.split("/").some(t=>!t||t===
|
|
155
|
-
"..")}function I(e,t,n,r,i,{allowRoot:s=!0}={}){return(!gt(e)||!s&&e===".")&&h(t,n,`${r} must be a canonical project-rel\
|
|
156
|
-
ative path.`,i),e}function R(e,t,n,r,i){let s=V(e,t,n,r,i);return s.some(a=>!/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(a))&&h(t,
|
|
157
|
-
n,`${r} must use lowercase technology ids separated into backticked values.`,i),new Set(s).size!==s.length&&h(t,n,`${r} \
|
|
158
|
-
contains a duplicate technology id.`,i),s}function se(e,t,n,r,i){let s=b(e,t,n,r,i);return(!s.startsWith("/")||s.startsWith(
|
|
159
|
-
"//")||/[\\?#]/u.test(s))&&h(t,n,`${r} must begin with one slash and contain no query or fragment.`,i),s}function q(e,t,n,r,i){
|
|
160
|
-
let s=e.match(/^- Ready when: `GET` `([^`\r\n]+)` returns `([0-9]{3})`$/u);s||h(t,n,`${r} must use \`- Ready when: \`GET\` \
|
|
161
|
-
\`/path\` returns \`200\`\`.`,i);let a=Number(s[2]);return(!Number.isInteger(a)||a<200||a>399)&&h(t,n,`${r} status must \
|
|
162
|
-
be from 200 through 399.`,i),{kind:"http",method:"GET",path:se(s[1],t,n,`${r} path`,i),status:a}}function re(e){return Array.
|
|
163
|
-
isArray(e)?e.map(re):e&&typeof e=="object"?Object.fromEntries(Object.keys(e).sort().map(t=>[t,re(e[t])])):e}function A(e){
|
|
164
|
-
let t=`${JSON.stringify(re(e),null,2)}
|
|
165
|
-
`;return`sha256:${mt("sha256").update(t).digest("hex")}`}function j(e={},t={},n="operation"){if(e.stackHash!==t.stackHash)
|
|
166
|
-
throw new H("VIBE64_STACK_CHANGED",`The Stack changed while Vibe64 inspected its ${n}. Retry the operation.`)}function P(e=[]){
|
|
167
|
-
return[...new Set(e)].sort()}function T(e=[]){let t=e.map(n=>n.trim()).filter(Boolean);return t.length===1&&t[0]==="- No\
|
|
168
|
-
thing."}var Ee="vibe64.application-deployment.v1",Se="Deployment",x="VIBE64_DEPLOYMENT_INVALID",wt=/^- (Prepare|Build|Migrate|Serve) `([^`\r\n]+)`:[ \t]+(.+)$/u,
|
|
169
|
-
Ie="- Recreate on restore: ",ve=Object.freeze({prepare:0,build:1,migrate:2,serve:3});function v(e,t,n,r={}){h(x,e,t,n,r)}
|
|
170
|
-
function yt(e,t,n){let r=V(e.slice(Ie.length),x,t,"Deployment Recreate on restore paths",n);return r.some(i=>i.startsWith(
|
|
171
|
-
"/")||i.includes("\\")||i.includes("***")||/[?[\]{}!]/u.test(i)||i.split("/").some(s=>!s||[".",".."].includes(s)))&&v(t,
|
|
255
|
+
ive conversation ID.");let m=structuredClone(u);Y(m);let l={upstreamSessionId:c,workdir:a,promptContext:m},d=r.catch(()=>{}).
|
|
256
|
+
then(async()=>{if(JSON.stringify(s.get(c))===JSON.stringify(l))return;let h=new Map(s);h.set(c,l),await o(h),s=h});r=d,await d},
|
|
257
|
+
async close(){i=!0,await r.catch(()=>{}),s.clear(),e||await Wt(t,{recursive:!0,force:!0})}}}var Le="vibe64.application-deployment.v1",Ue="Deployment",M="VIBE64_DEPLOYMENT_INVALID",zt=/^- (Prepare|Build|Migrate|Serve) `([^`\r\n]+)`:[ \t]+(.+)$/u,
|
|
258
|
+
We="- Recreate on restore: ",Ge=Object.freeze({prepare:0,build:1,migrate:2,serve:3});function A(e,t,n,s={}){p(M,e,t,n,s)}
|
|
259
|
+
function Kt(e,t,n){let s=C(e.slice(We.length),M,t,"Deployment Recreate on restore paths",n);return s.some(r=>r.startsWith(
|
|
260
|
+
"/")||r.includes("\\")||r.includes("***")||/[?[\]{}!]/u.test(r)||r.split("/").some(i=>!i||[".",".."].includes(i)))&&A(t,
|
|
172
261
|
"Deployment Recreate on restore paths must be canonical project-relative globs using only * and ** wildcards.",n),new Set(
|
|
173
|
-
|
|
174
|
-
e[2],
|
|
175
|
-
version:1,artifact:{disposablePaths:[]},workdir:".",runtimeRequirements:[],readiness:null,steps:[]}}function
|
|
176
|
-
genesis/stack.md#Deployment"}={}){if(Array.isArray(e)||
|
|
177
|
-
|
|
178
|
-
"- Workdir: ")){
|
|
179
|
-
yment Workdir",c,{count:1})[0];n.workdir=
|
|
180
|
-
"runtimes")&&
|
|
181
|
-
nt runtimes",c);continue}if(
|
|
182
|
-
y.",c),
|
|
183
|
-
adiness")&&
|
|
184
|
-
let u=
|
|
185
|
-
t,"## Deployment needs at least one command or exactly `- Nothing.`."),(n.steps.filter(({role:
|
|
186
|
-
1||n.steps.at(-1).role!=="serve")&&
|
|
187
|
-
1)
|
|
188
|
-
return n.readiness||
|
|
189
|
-
"prepare")&&
|
|
190
|
-
section:t={}}={}){
|
|
191
|
-
length>0?"blocked":
|
|
192
|
-
runtimeRequirements,readiness:
|
|
193
|
-
"ready"?
|
|
194
|
-
e.resources||[]),...
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
"HOME","LOGNAME","NODE_OPTIONS","PATH","TMPDIR","USER"]),
|
|
198
|
-
nteractive"]),
|
|
262
|
+
s).size!==s.length&&A(t,"Deployment contains a duplicate Recreate on restore path.",n),s}function Ft(e,t,n){return{label:O(
|
|
263
|
+
e[2],M,t,"Deployment step label",n),argv:_(e[3],M,t,"Deployment command",n),role:e[1].toLowerCase()}}function me(){return{
|
|
264
|
+
version:1,artifact:{disposablePaths:[]},workdir:".",runtimeRequirements:[],readiness:null,steps:[]}}function He(e,{path:t="\
|
|
265
|
+
genesis/stack.md#Deployment"}={}){if(Array.isArray(e)||A(t,"Deployment must be supplied as exact Stack section lines."),
|
|
266
|
+
b(e))return me();let n=me(),s=new Set;for(let i=0;i<e.length;i+=1){let o=e[i].trim();if(!o)continue;let c=i+1;if(o.startsWith(
|
|
267
|
+
"- Workdir: ")){s.has("workdir")&&A(t,"Duplicate Deployment Workdir.",c),s.add("workdir");let a=C(o.slice(11),M,t,"Deplo\
|
|
268
|
+
yment Workdir",c,{count:1})[0];n.workdir=g(a,M,t,"Deployment workdir",c);continue}if(o.startsWith("- Runtimes: ")){s.has(
|
|
269
|
+
"runtimes")&&A(t,"Duplicate Deployment Runtimes.",c),s.add("runtimes"),n.runtimeRequirements=R(o.slice(12),M,t,"Deployme\
|
|
270
|
+
nt runtimes",c);continue}if(o.startsWith(We)){s.has("restore-paths")&&A(t,"Duplicate Deployment Recreate on restore entr\
|
|
271
|
+
y.",c),s.add("restore-paths"),n.artifact.disposablePaths=Kt(o,t,c);continue}if(o.startsWith("- Ready when: ")){s.has("re\
|
|
272
|
+
adiness")&&A(t,"Duplicate Deployment Ready when.",c),s.add("readiness"),n.readiness=te(o,M,t,"Deployment readiness",c);continue}
|
|
273
|
+
let u=o.match(zt);if(u){n.steps.push(Ft(u,t,c));continue}A(t,`Unknown Deployment entry: ${o}.`,c)}n.steps.length===0&&A(
|
|
274
|
+
t,"## Deployment needs at least one command or exactly `- Nothing.`."),(n.steps.filter(({role:i})=>i==="serve").length!==
|
|
275
|
+
1||n.steps.at(-1).role!=="serve")&&A(t,"Deployment needs exactly one final Serve step.");for(let i=1;i<n.steps.length;i+=
|
|
276
|
+
1)Ge[n.steps[i].role]<Ge[n.steps[i-1].role]&&A(t,"Deployment steps must be ordered Prepare, Build, Migrate, then Serve.");
|
|
277
|
+
return n.readiness||A(t,"Deployment needs one Ready when entry."),n.artifact.disposablePaths.length>0&&!n.steps.some(({role:i})=>i===
|
|
278
|
+
"prepare")&&A(t,"Deployment may recreate paths on restore only when it declares a Prepare step."),n}function qe({environment:e={},
|
|
279
|
+
section:t={}}={}){G(t,e,"Deployment section");let n=[...t.diagnostics||[]],s=me();t.status==="ready"&&(s=He(t.lines));let r=n.
|
|
280
|
+
length>0?"blocked":s.steps.length>0?"ready":"unconfigured",i={version:s.version,artifact:s.artifact,workdir:s.workdir,runtimeRequirements:s.
|
|
281
|
+
runtimeRequirements,readiness:s.readiness,steps:s.steps};return{contract:Le,status:r,stackHash:t.stackHash,recipeHash:r===
|
|
282
|
+
"ready"?T(i):"",components:[...t.components||[]],source:t.source||null,runtimeRequirements:B(s.runtimeRequirements),resources:structuredClone(
|
|
283
|
+
e.resources||[]),...i,diagnostics:n}}var Fe="vibe64.outputs.v1",ne="Outputs",fe="vibe64.preview-identity.command.v1",w="VIBE64_OUTPUTS_INVALID",Yt=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,
|
|
284
|
+
he=/\{([a-z][a-z0-9:-]*)\}/gu,Jt=/^### Target `([^`\r\n]+)`:[ \t]+(.+)$/u,Xt=/^#### Parameter `([^`\r\n]+)`:[ \t]+(.+)$/u,
|
|
285
|
+
Qt=/^#### Download `([^`\r\n]+)`$/u,Zt=/^[A-Z_][A-Z0-9_]*$/u,en=/^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$/u,tn=new Set([
|
|
286
|
+
"HOME","LOGNAME","NODE_OPTIONS","PATH","TMPDIR","USER"]),nn=new Set(["email","login","user-id"]),sn=new Set(["finite","i\
|
|
287
|
+
nteractive"]),rn=new Set(["terminal","web"]),on=[["- Command: ","command","Command"],["- Protocol: ","protocol","Protoco\
|
|
199
288
|
l"],["- Identity types: ","identityTypes","Identity types"],["- Enabled environment: ","enabledEnvironment","Enabled env\
|
|
200
289
|
ironment"],["- Secret environment: ","secretEnvironment","Secret environment"],["- Runtimes: ","runtimes","Runtimes"],["\
|
|
201
|
-
- Timeout ms: ","timeoutMs","Timeout ms"]];function
|
|
202
|
-
test(
|
|
203
|
-
t.length),
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
, {port}, and {parameter:id} placeholders.`,
|
|
207
|
-
e.seen.add(t),e[t]=n}function
|
|
290
|
+
- Timeout ms: ","timeoutMs","Timeout ms"]];function f(e,t,n,s={}){p(w,e,t,n,s)}function ge(e,t,n,s){let r=O(e,w,t,n,s);return Yt.
|
|
291
|
+
test(r)||f(t,`${n} must use lowercase letters, digits, and single hyphens.`,s),r}function Ye(e,t,n,s,r,i){return C(e.slice(
|
|
292
|
+
t.length),w,n,s,r,i)}function P(e,t,n,s,r){return Ye(e,t,n,s,r,{count:1})[0]}function an(e,t,n,s){let r=_(e,w,t,n,s);for(let i of r)
|
|
293
|
+
i.replace(he,"").includes("{parameter:")&&f(t,`${n} has an invalid {parameter:id} placeholder.`,s),[...i.matchAll(he)].some(
|
|
294
|
+
o=>!["host","port"].includes(o[1])&&!/^parameter:[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(o[1]))&&f(t,`${n} supports only {host}\
|
|
295
|
+
, {port}, and {parameter:id} placeholders.`,s);return r}function v(e,t,n,s,r,i){e.seen.has(t)&&f(s,`Duplicate ${i}.`,r),
|
|
296
|
+
e.seen.add(t),e[t]=n}function cn(e,t,n){return{id:ge(e[1],t,"Output target id",n),label:O(e[2],w,t,"Output target label",
|
|
208
297
|
n),default:!1,mode:"",workdir:".",runtimeRequirements:[],steps:[],presentation:null,previewIdentity:null,downloads:[],parameters:[],
|
|
209
|
-
seen:new Set,line:n}}function
|
|
210
|
-
for(let[i
|
|
211
|
-
`Parameter ${
|
|
212
|
-
let n=e.parameters||[],
|
|
213
|
-
|
|
214
|
-
has(
|
|
215
|
-
return(typeof
|
|
216
|
-
6 characters.`),
|
|
217
|
-
urlPath:"/",readiness:null,seen:new Set,line:e}}function
|
|
218
|
-
mediaType:"",seen:new Set,line:n}}function
|
|
219
|
-
n integer from 1024 through 65535.",n);let
|
|
220
|
-
ntation preferred port must be an integer from 1024 through 65535.",n),
|
|
221
|
-
let
|
|
222
|
-
lopment` or `test`.",
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
startsWith("- Workdir: ")){
|
|
226
|
-
n,
|
|
227
|
-
Output target runtimes",
|
|
228
|
-
if(
|
|
229
|
-
|
|
230
|
-
t step label",
|
|
231
|
-
"- Kind: ")){let
|
|
232
|
-
.",
|
|
233
|
-
t,"- Preferred port: ",n,"Web presentation Preferred port",
|
|
234
|
-
startsWith("- URL path: ")){
|
|
235
|
-
RL path",
|
|
236
|
-
|
|
237
|
-
let
|
|
238
|
-
wnload Name must be a safe filename without path separators.",n),
|
|
239
|
-
n);return(
|
|
240
|
-
if(t.startsWith("- Path: ")){
|
|
241
|
-
"Download Path entry");return}if(t.startsWith("- Name: ")){
|
|
242
|
-
ownload Name entry");return}if(t.startsWith("- Media type: ")){
|
|
243
|
-
type",
|
|
244
|
-
r
|
|
245
|
-
.`,e.line);return{id:e.id,path:e.path,name:e.name,mediaType:e.mediaType}}function
|
|
246
|
-
e,
|
|
247
|
-
ntity ${n} environment name is invalid.`,
|
|
248
|
-
([
|
|
249
|
-
|
|
250
|
-
ue.`,
|
|
251
|
-
Protocol"],["identityTypes","Identity types"]])e[
|
|
252
|
-
command.map(
|
|
253
|
-
|
|
254
|
-
mand must use a literal app-owned project-relative executable.",e.line);let
|
|
255
|
-
y protocol must be ${
|
|
256
|
-
y type: ${
|
|
257
|
-
e.line);let c={enabled:
|
|
258
|
-
line)};c.enabled&&c.enabled===c.secret&&
|
|
259
|
-
let u=1e4;if(e.timeoutMs){let
|
|
260
|
-
ugh 30000.",e.line),u=Number(
|
|
261
|
-
through 30000.",e.line)}return{command:
|
|
262
|
-
\`${
|
|
298
|
+
seen:new Set,line:n}}function un(e,t,n,s){if(t==="- Required."){v(e,"required",!0,n,s,"Parameter Required entry");return}
|
|
299
|
+
for(let[r,i]of[["Default","default"],["Description","description"]]){let o=`- ${r}: `;if(t.startsWith(o)){let c=P(t,o,n,
|
|
300
|
+
`Parameter ${r}`,s);v(e,i,c,n,s,`Parameter ${r} entry`);return}}f(n,`Unknown Outputs parameter entry: ${t}.`,s)}function pn(e,t={}){
|
|
301
|
+
let n=e.parameters||[],s=i=>p("VIBE64_OUTPUT_PARAMETERS_INVALID","Outputs",i);(!t||typeof t!="object"||Array.isArray(t))&&
|
|
302
|
+
s("Output parameters must be an object of text values.");let r=new Set(n.map(({id:i})=>i));for(let i of Object.keys(t))r.
|
|
303
|
+
has(i)||s(`Unknown output parameter: ${i}.`);return Object.fromEntries(n.map(i=>{let o=Object.hasOwn(t,i.id)?t[i.id]:i.default;
|
|
304
|
+
return(typeof o!="string"||o.length>4096||/[\0\r\n]/u.test(o))&&s(`${i.label} must be a single line of text, at most 409\
|
|
305
|
+
6 characters.`),i.required&&!o.trim()&&s(`${i.label} is required.`),[i.id,o]}))}function ln(e){return{kind:"",preferredPort:null,
|
|
306
|
+
urlPath:"/",readiness:null,seen:new Set,line:e}}function dn(e,t,n){return{id:ge(e[1],t,"Download id",n),path:"",name:"",
|
|
307
|
+
mediaType:"",seen:new Set,line:n}}function mn(e,t,n){/^[0-9]+$/u.test(e)||f(t,"Web presentation preferred port must be a\
|
|
308
|
+
n integer from 1024 through 65535.",n);let s=Number(e);return(!Number.isSafeInteger(s)||s<1024||s>65535)&&f(t,"Web prese\
|
|
309
|
+
ntation preferred port must be an integer from 1024 through 65535.",n),s}function fn(e,t,n,s){if(t.startsWith("- Data: ")){
|
|
310
|
+
let i=P(t,"- Data: ",n,"Output target Data",s);["development","test"].includes(i)||f(n,"Output target Data must be `deve\
|
|
311
|
+
lopment` or `test`.",s),v(e,"dataMode",i,n,s,"output target Data entry");return}if(t==="- Default."){v(e,"default",!0,n,
|
|
312
|
+
s,"output target Default entry");return}if(t.startsWith("- Mode: ")){let i=P(t,"- Mode: ",n,"Output target Mode",s);sn.has(
|
|
313
|
+
i)||f(n,"Output target Mode must be `interactive` or `finite`.",s),v(e,"mode",i,n,s,"output target Mode entry");return}if(t.
|
|
314
|
+
startsWith("- Workdir: ")){v(e,"workdir",g(P(t,"- Workdir: ",n,"Output target Workdir",s),w,n,"Output target workdir",s),
|
|
315
|
+
n,s,"output target Workdir entry");return}if(t.startsWith("- Runtimes: ")){v(e,"runtimeRequirements",R(t.slice(12),w,n,"\
|
|
316
|
+
Output target runtimes",s),n,s,"output target Runtimes entry");return}let r=t.match(/^- (Prepare|Build|Run) `([^`\r\n]+)`:[ \t]+(.+)$/u);
|
|
317
|
+
if(r){let i=r[1].toLowerCase(),o=an(r[3],n,"Output step command",s);i!=="run"&&o.some(c=>/\{(?:host|port)\}/u.test(c))&&
|
|
318
|
+
f(n,"Only a web presentation's Run step may use {host} or {port} placeholders.",s),e.steps.push({label:O(r[2],w,n,"Outpu\
|
|
319
|
+
t step label",s),argv:o,role:i});return}f(n,`Unknown Outputs target entry: ${t}.`,s)}function hn(e,t,n,s){if(t.startsWith(
|
|
320
|
+
"- Kind: ")){let r=P(t,"- Kind: ",n,"Presentation Kind",s);rn.has(r)||f(n,"Presentation Kind must be `terminal` or `web`\
|
|
321
|
+
.",s),v(e,"kind",r,n,s,"Presentation Kind entry");return}if(t.startsWith("- Preferred port: ")){v(e,"preferredPort",mn(P(
|
|
322
|
+
t,"- Preferred port: ",n,"Web presentation Preferred port",s),n,s),n,s,"Presentation Preferred port entry");return}if(t.
|
|
323
|
+
startsWith("- URL path: ")){v(e,"urlPath",ue(P(t,"- URL path: ",n,"Web presentation URL path",s),w,n,"Web presentation U\
|
|
324
|
+
RL path",s),n,s,"Presentation URL path entry");return}if(t.startsWith("- Ready when: ")){v(e,"readiness",te(t,w,n,"Web p\
|
|
325
|
+
resentation readiness",s),n,s,"Presentation Ready when entry");return}f(n,`Unknown Presentation entry: ${t}.`,s)}function gn(e,t,n){
|
|
326
|
+
let s=O(e,w,t,"Download Name",n);return(s.length>255||[".",".."].includes(s)||/[\\/\0]/u.test(s)||s.trim()!==s)&&f(t,"Do\
|
|
327
|
+
wnload Name must be a safe filename without path separators.",n),s}function yn(e,t,n){let s=O(e,w,t,"Download Media type",
|
|
328
|
+
n);return(s.length>127||!en.test(s))&&f(t,"Download Media type must be a lowercase type/subtype value.",n),s}function bn(e,t,n,s){
|
|
329
|
+
if(t.startsWith("- Path: ")){v(e,"path",g(P(t,"- Path: ",n,"Download Path",s),w,n,"Download path",s,{allowRoot:!1}),n,s,
|
|
330
|
+
"Download Path entry");return}if(t.startsWith("- Name: ")){v(e,"name",gn(P(t,"- Name: ",n,"Download Name",s),n,s),n,s,"D\
|
|
331
|
+
ownload Name entry");return}if(t.startsWith("- Media type: ")){v(e,"mediaType",yn(P(t,"- Media type: ",n,"Download Media\
|
|
332
|
+
type",s),n,s),n,s,"Download Media type entry");return}f(n,`Unknown Download entry: ${t}.`,s)}function wn(e,t,n){for(let[
|
|
333
|
+
s,r]of[["path","Path"],["name","Name"],["mediaType","Media type"]])e[s]||f(t,`Output target ${n} Download ${e.id} needs ${r}\
|
|
334
|
+
.`,e.line);return{id:e.id,path:e.path,name:e.name,mediaType:e.mediaType}}function ze(e,t,n,s){if(e===void 0)return"";let r=O(
|
|
335
|
+
e,w,t,`Preview identity ${n} environment name`,s);return(!Zt.test(r)||tn.has(r)||r.startsWith("XDG_"))&&f(t,`Preview ide\
|
|
336
|
+
ntity ${n} environment name is invalid.`,s),r}function En(e){return{seen:new Set,line:e}}function vn(e,t,n,s){let r=on.find(
|
|
337
|
+
([a])=>t.startsWith(a));r||f(n,`Unknown Preview identity entry: ${t}.`,s);let[i,o,c]=r,u=Ye(t,i,n,`Preview identity ${c}`,
|
|
338
|
+
s);!["command","identityTypes","runtimes"].includes(o)&&u.length!==1&&f(n,`Preview identity ${c} accepts exactly one val\
|
|
339
|
+
ue.`,s),v(e,o,u,n,s,`Preview identity ${c} entry`)}function Sn(e,t,n){for(let[a,m]of[["command","Command"],["protocol","\
|
|
340
|
+
Protocol"],["identityTypes","Identity types"]])e[a]||f(t,`Output target ${n} Preview identity needs ${m}.`,e.line);let s=e.
|
|
341
|
+
command.map(a=>`\`${a}\``).join(" "),r=_(s,w,t,"Preview identity command",e.line);(!r[0].includes("/")||r[0].includes("\\")||
|
|
342
|
+
r[0].split("/").some(a=>!a||[".",".."].includes(a))||r.some(a=>/\{(?:host|port)\}/u.test(a)))&&f(t,"Preview identity com\
|
|
343
|
+
mand must use a literal app-owned project-relative executable.",e.line);let i=e.protocol[0];i!==fe&&f(t,`Preview identit\
|
|
344
|
+
y protocol must be ${fe}.`,e.line);let o=[...new Set(e.identityTypes.map(a=>(nn.has(a)||f(t,`Unsupported preview identit\
|
|
345
|
+
y type: ${a}.`,e.line),a)))];o.length!==e.identityTypes.length&&f(t,"Preview identity types must not contain duplicates.",
|
|
346
|
+
e.line);let c={enabled:ze(e.enabledEnvironment?.[0],t,"enabled",e.line),secret:ze(e.secretEnvironment?.[0],t,"secret",e.
|
|
347
|
+
line)};c.enabled&&c.enabled===c.secret&&f(t,"Preview identity enabled and secret environment names must differ.",e.line);
|
|
348
|
+
let u=1e4;if(e.timeoutMs){let a=e.timeoutMs[0];/^[0-9]+$/u.test(a)||f(t,"Preview identity Timeout ms must be from 1 thro\
|
|
349
|
+
ugh 30000.",e.line),u=Number(a),(!Number.isSafeInteger(u)||u<1||u>3e4)&&f(t,"Preview identity Timeout ms must be from 1 \
|
|
350
|
+
through 30000.",e.line)}return{command:r,environment:c,identityTypes:o,protocol:i,runtimes:e.runtimes?R(e.runtimes.map(a=>`\
|
|
351
|
+
\`${a}\``).join(" "),w,t,"Preview identity runtimes",e.line):[],timeoutMs:u}}function Tn(e,t,n){return e.kind||f(t,`Outp\
|
|
263
352
|
ut target ${n} Presentation needs Kind.`,e.line),e.kind==="terminal"?((e.preferredPort!==null||e.readiness||e.seen.has("\
|
|
264
|
-
urlPath"))&&
|
|
353
|
+
urlPath"))&&f(t,`Output target ${n} terminal Presentation accepts only Kind.`,e.line),{kind:"terminal"}):(e.readiness||f(
|
|
265
354
|
t,`Output target ${n} web Presentation needs one Ready when entry.`,e.line),{kind:"web",preferredPort:e.preferredPort,urlPath:e.
|
|
266
|
-
urlPath,readiness:e.readiness})}function
|
|
267
|
-
length===0&&
|
|
268
|
-
steps.length;
|
|
269
|
-
ld, then Run.`,e.line);let
|
|
270
|
-
size!==
|
|
271
|
-
presentation||e.previewIdentity)&&
|
|
272
|
-
ntries.`,e.line),
|
|
273
|
-
steps.at(-1).role!=="run"?
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
kind!=="web"&&
|
|
277
|
-
...
|
|
278
|
-
t 16 parameters with unique ids.`,e.line);for(let
|
|
279
|
-
|
|
280
|
-
er ${
|
|
355
|
+
urlPath,readiness:e.readiness})}function Ke(e,t){e.mode||f(t,`Output target ${e.id} needs one Mode entry.`,e.line),e.steps.
|
|
356
|
+
length===0&&f(t,`Output target ${e.id} needs at least one step.`,e.line);let n={prepare:0,build:1,run:2};for(let a=1;a<e.
|
|
357
|
+
steps.length;a+=1)n[e.steps[a].role]<n[e.steps[a-1].role]&&f(t,`Output target ${e.id} steps must be ordered Prepare, Bui\
|
|
358
|
+
ld, then Run.`,e.line);let s=e.steps.filter(({role:a})=>a==="run"),r=e.downloads.map(a=>wn(a,t,e.id));new Set(r.map(({id:a})=>a)).
|
|
359
|
+
size!==r.length&&f(t,`Output target ${e.id} contains a duplicate Download id.`,e.line),e.mode==="finite"?((s.length>0||e.
|
|
360
|
+
presentation||e.previewIdentity)&&f(t,`Finite output target ${e.id} cannot have Run, Presentation, or Preview identity e\
|
|
361
|
+
ntries.`,e.line),r.length===0&&f(t,`Finite output target ${e.id} needs at least one Download.`,e.line)):s.length!==1||e.
|
|
362
|
+
steps.at(-1).role!=="run"?f(t,`Interactive output target ${e.id} needs exactly one final Run step.`,e.line):e.presentation||
|
|
363
|
+
f(t,`Interactive output target ${e.id} needs one Presentation.`,e.line);let i=e.presentation?Tn(e.presentation,t,e.id):null,
|
|
364
|
+
o=e.steps.flatMap(({argv:a})=>a.flatMap(m=>[...m.matchAll(he)].map(l=>l[1])));o.some(a=>["host","port"].includes(a))&&i?.
|
|
365
|
+
kind!=="web"&&f(t,"Only a web output target may use {host} or {port} placeholders.",e.line);let c=e.parameters.map(({seen:a,
|
|
366
|
+
...m})=>m),u=new Set(c.map(({id:a})=>a));(c.length>16||u.size!==c.length)&&f(t,`Output target ${e.id} may declare at mos\
|
|
367
|
+
t 16 parameters with unique ids.`,e.line);for(let a of o.filter(m=>m.startsWith("parameter:"))){let m=a.slice(10);u.has(
|
|
368
|
+
m)||f(t,`Undeclared output parameter: ${m}.`,e.line)}for(let a of c)o.includes(`parameter:${a.id}`)||f(t,`Output paramet\
|
|
369
|
+
er ${a.id} must be used in a step command.`,e.line);return e.previewIdentity&&i?.kind!=="web"&&f(t,"Only a web output ta\
|
|
281
370
|
rget may declare Preview identity.",e.line),{id:e.id,label:e.label,default:e.default,mode:e.mode,workdir:e.workdir,runtimeRequirements:e.
|
|
282
|
-
runtimeRequirements,...e.dataMode?{dataMode:e.dataMode}:{},steps:e.steps,presentation:
|
|
283
|
-
{},...e.previewIdentity?{previewIdentity:
|
|
284
|
-
|
|
285
|
-
let n=[],
|
|
286
|
-
if(
|
|
287
|
-
let
|
|
288
|
-
required:!1,seen:new Set};
|
|
289
|
-
t,"Presentation must appear at most once below an output target.",
|
|
290
|
-
continue}if(u==="#### Preview identity"){
|
|
291
|
-
ut target.",
|
|
292
|
-
|
|
293
|
-
viewIdentity"?
|
|
294
|
-
at least one Target or exactly `- Nothing.`.");let
|
|
295
|
-
contains a duplicate target id."),n.filter(({default:c})=>c).length>1&&
|
|
296
|
-
et."),{version:1,targets:n}}function
|
|
297
|
-
[]],
|
|
298
|
-
message:
|
|
299
|
-
c=[...n,...
|
|
300
|
-
stackHash,components:[...t.components||[]],environmentDefaults:structuredClone(e.environmentDefaults||[]),runtimeRequirements:
|
|
301
|
-
|
|
302
|
-
t services";function
|
|
303
|
-
for(let[n,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
c?c[1]:
|
|
307
|
-
return t.length||
|
|
308
|
-
[];return{contract:
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
t,
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
o
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
"
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
"",
|
|
357
|
-
"
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
return
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
{
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
"
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
return
|
|
385
|
-
|
|
386
|
-
e.
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
{
|
|
393
|
-
|
|
394
|
-
n
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
Fe as assertGenesisPromptTask,Ye as genesisCommandShimDirectory,Vn as genesisPackageBinDirectory,Rr as genesisParserEnvironment,
|
|
419
|
-
Cn as genesisPromptRequest,xn as genesisPromptTask,Ar as initializeGenesisProject,Cr as inspectGenesisAgentIntegrations,
|
|
420
|
-
qr as inspectGenesisCollaboration,$n as inspectGenesisDerivedArtifacts,Hr as inspectGenesisEngineering,Wr as inspectGenesisEnvironment,
|
|
421
|
-
Gr as inspectGenesisProject,Wn as inspectGenesisProjectFormat,Nr as inspectGenesisSkills,Mr as inspectGenesisStackComponents,
|
|
422
|
-
E as inspectGenesisStackSection,Vr as inspectGenesisSubsystems,Br as inspectVibe64Deployment,Yr as inspectVibe64IntegrationSetup,
|
|
423
|
-
Fr as inspectVibe64Outputs,Jr as inspectVibe64ProjectServices,Qr as inspectVibe64ResourceEstimates,Xr as inspectVibe64WorkspaceSetup,
|
|
424
|
-
Lr as listGenesisTemplates,Te as parseVibe64DeploymentLines,Ue as parseVibe64IntegrationSetupLines,K as parseVibe64OutputsLines,
|
|
425
|
-
xe as parseVibe64ProjectServicesLines,We as parseVibe64ResourceEstimatesLines,F as parseVibe64WorkspaceSetupLines,jr as refreshGenesisCities,
|
|
426
|
-
Zr as renderGenesisPrompt,Vt as resolveVibe64OutputParameters,Kr as setGenesisCollaboration,zr as setGenesisEngineeringProfile,
|
|
427
|
-
xr as syncGenesisAgentIntegrations,Dr as syncGenesisSkills,$r as vibe64ConversationInstructions,W as vibe64Driver,Tr as vibe64HostContextEnvironment,
|
|
428
|
-
an as vibe64HostContextRegistry,jn as vibe64HostContextResolverPath,Or as withGenesisCommandShim};
|
|
371
|
+
runtimeRequirements,...e.dataMode?{dataMode:e.dataMode}:{},steps:e.steps,presentation:i,downloads:r,...c.length?{parameters:c}:
|
|
372
|
+
{},...e.previewIdentity?{previewIdentity:Sn(e.previewIdentity,t,e.id)}:{}}}function se(e,{path:t="genesis/stack.md#Outpu\
|
|
373
|
+
ts"}={}){if(Array.isArray(e)||f(t,"Outputs must be supplied as exact Stack section lines."),b(e))return{version:1,targets:[]};
|
|
374
|
+
let n=[],s=null,r="target",i=null;for(let c=0;c<e.length;c+=1){let u=e[c].trim();if(!u)continue;let a=c+1,m=u.match(Jt);
|
|
375
|
+
if(m){s&&n.push(Ke(s,t)),s=cn(m,t,a),r="target",i=null;continue}s||f(t,"## Outputs must begin with a Target heading.",a);
|
|
376
|
+
let l=u.match(Xt);if(l){let h={id:ge(l[1],t,"Parameter id",a),label:O(l[2],w,t,"Parameter label",a),default:"",description:"",
|
|
377
|
+
required:!1,seen:new Set};s.parameters.push(h),r="parameter",i=h;continue}if(u==="#### Presentation"){s.presentation&&f(
|
|
378
|
+
t,"Presentation must appear at most once below an output target.",a),s.presentation=ln(a),r="presentation",i=s.presentation;
|
|
379
|
+
continue}if(u==="#### Preview identity"){s.previewIdentity&&f(t,"Preview identity must appear at most once below an outp\
|
|
380
|
+
ut target.",a),s.previewIdentity=En(a),r="previewIdentity",i=s.previewIdentity;continue}let d=u.match(Qt);if(d){let h=dn(
|
|
381
|
+
d,t,a);s.downloads.push(h),r="download",i=h;continue}r==="parameter"?un(i,u,t,a):r==="presentation"?hn(i,u,t,a):r==="pre\
|
|
382
|
+
viewIdentity"?vn(i,u,t,a):r==="download"?bn(i,u,t,a):fn(s,u,t,a)}s&&n.push(Ke(s,t)),n.length===0&&f(t,"## Outputs needs \
|
|
383
|
+
at least one Target or exactly `- Nothing.`.");let o=n.map(({id:c})=>c);return new Set(o).size!==o.length&&f(t,"Outputs \
|
|
384
|
+
contains a duplicate target id."),n.filter(({default:c})=>c).length>1&&f(t,"Outputs may declare at most one default targ\
|
|
385
|
+
et."),{version:1,targets:n}}function Je({environment:e={},section:t={}}={}){G(t,e,"Outputs section");let n=[...t.diagnostics||
|
|
386
|
+
[]],s=[...e.diagnostics||[]],r={version:1,targets:[]};t.status==="ready"&&(r=se(t.lines));let i=s.length===0?null:s.map(
|
|
387
|
+
({message:a})=>a).join(" "),o=r.targets.map(a=>({...a,source:t.source||null,available:n.length===0&&s.length===0,disabledReason:i})),
|
|
388
|
+
c=[...n,...s],u="ready";return c.length>0?u="blocked":o.length===0&&(u="unconfigured"),{contract:Fe,status:u,stackHash:t.
|
|
389
|
+
stackHash,components:[...t.components||[]],environmentDefaults:structuredClone(e.environmentDefaults||[]),runtimeRequirements:B(
|
|
390
|
+
o.flatMap(a=>a.runtimeRequirements)),resources:structuredClone(e.resources||[]),targets:o,diagnostics:c}}var Xe="Project services",In="vibe64.project-services.v1",L="VIBE64_PROJECT_SERVICES_INVALID",U="genesis/stack.md#Projec\
|
|
391
|
+
t services";function Qe(e){if(Array.isArray(e)||p(L,U,"Expected exact Project services section lines."),b(e))return[];let t=[];
|
|
392
|
+
for(let[n,s]of e.entries()){let r=s.trim();if(!r)continue;let i=n+1,o=r.match(/^- Start `([a-z][a-z0-9-]{0,63})`( per session)? with (.+?): (.+)$/u);
|
|
393
|
+
o||p(L,U,"Use: - Start `service-id` [per session] with `runtime` [in `workdir`]: `command` `argument`...",i),t.some(({id:u})=>u===
|
|
394
|
+
o[1])&&p(L,U,"Duplicate project service id.",i);let c=o[3].match(/^(.*?) in `([^`\r\n]+)`$/u);t.push({id:o[1],...o[2]?{scope:"\
|
|
395
|
+
session"}:{},runtimeRequirements:R(c?c[1]:o[3],L,U,"Service runtimes",i),workdir:g(c?.[2]||".",L,U,"Service workdir",i),
|
|
396
|
+
argv:_(o[4],L,U,"Service command",i)})}return t.length||p(L,U,"Declare a service or exactly `- Nothing.`."),t}function Ze(e={}){
|
|
397
|
+
let t=e.status==="ready"?Qe(e.lines):[];return{contract:In,status:e.status==="blocked"?"blocked":t.length?"ready":"uncon\
|
|
398
|
+
figured",services:t,recipeHash:t.length?T(t):"",diagnostics:e.diagnostics||[]}}var tt="vibe64.resource-estimates.v1",re="Resource estimates",nt="VIBE64_RESOURCE_ESTIMATES_INVALID",kn=1024*1024,et=1024*
|
|
399
|
+
1024,On=new Map([["Startup typical MiB","startupTypical"],["Startup high MiB","startupHigh"],["Running typical MiB","run\
|
|
400
|
+
ningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);function x(e,t,n){p(nt,
|
|
401
|
+
e,t,n)}function ye(e,t,n,s,r){let i=e.get(t),o=e.get(n);return(i===void 0||o===void 0||i>o)&&x(s,"Each resource phase re\
|
|
402
|
+
quires typical and high estimates, with typical no greater than high.",r),{typicalBytes:i,highBytes:o}}function st(e,{path:t="\
|
|
403
|
+
genesis/stack.md#Resource estimates",targets:n=[],hasWorkspaceSetup:s=!1}={}){(!Array.isArray(e)||e.length>2048||e.some(
|
|
404
|
+
a=>typeof a!="string")||Buffer.byteLength(e.join(`
|
|
405
|
+
`),"utf8")>64*1024)&&x(t,"Resource estimates must be exact Stack section lines within 64 KiB and 2048 lines.");let r={version:1,
|
|
406
|
+
outputs:[],workspaceSetup:null};if(b(e))return r;let i=new Map(n.map(a=>[a.id,a])),o=new Set,c=null;function u(){if(!c)return;
|
|
407
|
+
let{targetId:a,mode:m,fields:l,line:d}=c;if(m==="interactive"){(l.has("typical")||l.has("high"))&&x(t,"Interactive outpu\
|
|
408
|
+
ts require separate Startup and Running estimates.",d),r.outputs.push({targetId:a,mode:m,startup:ye(l,"startupTypical","\
|
|
409
|
+
startupHigh",t,d),running:ye(l,"runningTypical","runningHigh",t,d)});return}(l.size!==2||!l.has("typical")||!l.has("high"))&&
|
|
410
|
+
x(t,"Finite outputs and Workspace setup require only Typical MiB and High MiB.",d);let h=ye(l,"typical","high",t,d);a?r.
|
|
411
|
+
outputs.push({targetId:a,mode:m,execution:h}):r.workspaceSetup=h}for(let a=0;a<e.length;a+=1){let m=e[a].trim(),l=a+1;if(!m)
|
|
412
|
+
continue;let d=m.match(/^### Output `([a-z0-9]+(?:-[a-z0-9]+)*)`$/u);if(d||m==="### Workspace setup"){u();let k=d?.[1]||
|
|
413
|
+
"",J=k?`output:${k}`:"workspace-setup";o.has(J)&&x(t,"Resource estimates contains a duplicate operation.",l),o.add(J);let z=i.
|
|
414
|
+
get(k);k&&!["interactive","finite"].includes(z?.mode)&&x(t,`Resource estimate references an undeclared output: ${k}.`,l),
|
|
415
|
+
!k&&!s&&x(t,"Resource estimate references undeclared Workspace setup steps.",l),c={targetId:k,mode:z?.mode||"setup",fields:new Map,
|
|
416
|
+
line:l};continue}let h=m.match(/^- ([A-Za-z ]+): `([1-9][0-9]*)`$/u),y=h&&On.get(h[1]);(!c||!y)&&x(t,"Expected an Output\
|
|
417
|
+
or Workspace setup heading followed by positive integer MiB estimates.",l),c.fields.has(y)&&x(t,`Duplicate resource fie\
|
|
418
|
+
ld: ${h[1]}.`,l);let q=Number(h[2]);(!Number.isSafeInteger(q)||q>et)&&x(t,`Resource estimates must be between 1 and ${et}\
|
|
419
|
+
MiB.`,l),c.fields.set(y,q*kn)}return u(),o.size===0&&x(t,"Resource estimates needs an operation or exactly `- Nothing.`\
|
|
420
|
+
."),r}function ie({section:e={},outputsSection:t={},workspaceSetupSection:n={}}={}){G(e,t,"Resource estimates and Output\
|
|
421
|
+
s"),G(e,n,"Resource estimates and Workspace setup");let s=[...e.diagnostics||[]],r={version:1,outputs:[],workspaceSetup:null};
|
|
422
|
+
if(e.status==="ready"&&s.length===0)try{r=st(e.lines,{targets:t.status==="ready"?se(t.lines).targets:[],hasWorkspaceSetup:n.
|
|
423
|
+
status==="ready"&&F(n.lines).length>0})}catch(o){if(o?.name!=="Vibe64StackOperationError")throw o;s.push({code:nt,message:o.
|
|
424
|
+
message,details:{...o.details,causeCode:o.code}})}let i=s.length>0?"invalid":r.outputs.length>0||r.workspaceSetup?"ready":
|
|
425
|
+
"unconfigured";return{contract:tt,status:i,stackHash:e.stackHash,sectionHash:e.sectionHash||"",estimatesHash:i==="ready"?
|
|
426
|
+
T(r):"",source:e.source||null,outputs:r.outputs,workspaceSetup:r.workspaceSetup,fallbackReason:i==="invalid"?"invalid-es\
|
|
427
|
+
timates":i==="unconfigured"?"not-declared":null,diagnostics:s}}var rt="vibe64.integration-setup.v1",it="Integration setup",Q="VIBE64_INTEGRATION_SETUP_INVALID";function ot(e,{path:t="\
|
|
428
|
+
genesis/stack.md#Integration setup"}={}){if(Array.isArray(e)||p(Q,t,"Integration setup requires exact Stack section line\
|
|
429
|
+
s."),b(e))return null;let n=e.map(r=>r.trim()).filter(Boolean),s=n.length===1&&n[0].match(/^- Command with (.+?) in `([^`\r\n]+)`: (.+)$/u);
|
|
430
|
+
return s||p(Q,t,"Integration setup requires exactly one entry: - Command with `runtime` in `workdir`: `command` `argumen\
|
|
431
|
+
t`...; or - Nothing."),{argv:_(s[3],Q,t,"Integration setup command"),workdir:g(s[2],Q,t,"Integration setup workdir"),runtimeRequirements:R(
|
|
432
|
+
s[1],Q,t,"Integration setup runtimes")}}function at({section:e={}}={}){let t=[...e.diagnostics||[]],n=e.status==="ready"&&
|
|
433
|
+
t.length===0?ot(e.lines):null;return{contract:rt,status:t.length?"blocked":n?"ready":"unconfigured",stackHash:e.stackHash,
|
|
434
|
+
recipeHash:n?T({version:1,command:n}):"",source:e.source||null,components:[...e.components||[]],command:n,diagnostics:t}}var _n=new URL("./index.js",import.meta.url).href,ut=An(_n),oe=new Map;async function Cn(e){if(!j.isAbsolute(e||""))throw new TypeError(
|
|
435
|
+
"Genesis host context requires an absolute runtime root.");let t=j.join(e,"genesis-context");if(!oe.has(t)){let n=$e(t).
|
|
436
|
+
catch(s=>{throw oe.delete(t),s});oe.set(t,n)}return oe.get(t)}async function pr(e){let t=await Cn(e);return{[Dn]:as(),[Nn]:JSON.
|
|
437
|
+
stringify({registryPath:t.registryPath}),GENESIS_TURN_CONTEXT_ENABLED:"0"}}var{GENESIS_CONTRACTS:I,HOST_CONTEXT_RESOLVER_DATA_ENV:Nn,
|
|
438
|
+
HOST_CONTEXT_RESOLVER_ENV:Dn,addStack:xn,applyTemplate:Vn,generatePrompt:be,indexCodebase:Pn,initialize:jn,inspectCollaboration:Bn,
|
|
439
|
+
inspectDerivedArtifacts:Mn,inspectEngineering:$n,inspectEnvironment:Ee,inspectProject:Gn,inspectProjectFormat:Ln,inspectAgentIntegrations:Un,
|
|
440
|
+
inspectSkills:Wn,inspectStackSection:Hn,inspectStackSections:qn,inspectSubsystems:zn,listTemplates:Kn,parserEnvironment:Fn,
|
|
441
|
+
setCollaboration:Yn,setEngineeringProfile:Jn,syncAgentIntegrations:Xn,syncSkills:Qn,withTrustedGitRepository:Zn,SOURCE_EXPLANATION_PROMPT_VERSION:lr,
|
|
442
|
+
sourceExplanationGuidance:dr,sourceExplanationReviewGuidance:mr,validateArchitectureFacts:fr,validateArchitectureObservations:hr,
|
|
443
|
+
mergeArchitectureObservations:gr}=we,yr="genesis/blueprint.md",es=!1,ts=Object.freeze(["vue",...es?[]:["jskit-postgresql",
|
|
444
|
+
"postgresql"]]),ns=Object.freeze(["genesis-stack"]),ss=new Set(["adopt","blueprint","describe","deslop","program","revie\
|
|
445
|
+
w","start","work"]);function W(e=""){return String(e||"").trim()}function pt(e,{required:t=!1}={}){let n=W(e);if(!n&&!t)
|
|
446
|
+
return"";if(!ss.has(n))throw new TypeError(n?`Unknown Genesis prompt task: ${n}.`:"Genesis prompt actions require an exp\
|
|
447
|
+
licit task.");return n}function rs(e={}){return pt(e.genesisTask)||"work"}function is(e={},t={}){return[e.conversationRequest,
|
|
448
|
+
e.feedback,e.request,e.plan,e.description,t.label].map(W).find(Boolean)||"Continue the requested project work."}function br(e={}){
|
|
449
|
+
return Fn(e)}function os(){let e=(ut.resolve.paths("genesis-compiler")||[]).find(t=>ct(j.join(t,"genesis-compiler"))&&ct(
|
|
450
|
+
j.join(t,".bin","genesis")));if(!e)throw new Error("The installed Genesis compiler executable could not be located.");return j.
|
|
451
|
+
join(e,".bin")}function lt(){let e=ut.resolve("@local/vibe64-genesis/server");return j.resolve(j.dirname(e),"../../bin")}
|
|
452
|
+
function as(){return j.resolve(lt(),"vibe64-genesis-host-context")}function wr(e=[]){let t=lt(),n=os();return[...(Array.
|
|
453
|
+
isArray(e)?e:[]).filter(r=>![t,n].includes(W(r))),t]}function cs(e={},{prompt:t=!1}={}){return{...e,...t?{hiddenStackPieces:ts}:
|
|
454
|
+
{},stackPackages:ns}}function Er(e={}){return S(xn,e)}function vr(e={}){return S(jn,e)}function Sr(e={}){return S(Wn,e)}
|
|
455
|
+
function Tr(e={}){return S(Qn,e)}function Ir(e={}){return S(Xn,e)}function kr(e={}){return S(Un,e)}function Or(e={}){return S(
|
|
456
|
+
zn,e)}async function _r(e={}){return Ne(await H(Ce,e))}async function Rr(e={}){return xe(await H(De,e))}function Ar(e={}){
|
|
457
|
+
return S(Pn,e)}function us(){let e=Mn();if(e?.contract!==I.derivedArtifacts)throw new Error(`Genesis returned ${e?.contract||
|
|
458
|
+
"no contract identity"}; expected ${I.derivedArtifacts}.`);let t=Array.isArray(e.artifacts)?e.artifacts:[];if(!t.length||
|
|
459
|
+
t.some(n=>!W(n?.path)))throw new Error("Genesis returned an invalid derived-artifact contract.");return{...e,artifacts:t.
|
|
460
|
+
map(n=>({...n}))}}var dt=us(),Cr=Object.freeze(dt.artifacts.map(e=>e.path)),mt=new Map(dt.artifacts.map(e=>[e.id,e])),ps=mt.
|
|
461
|
+
get("machine-city")?.path,ls=mt.get("program-city")?.path;if(!ps||!ls)throw new Error("Genesis did not declare both City\
|
|
462
|
+
projection artifacts.");async function S(e,t={},n={}){let s=W(t.projectRoot);if(!s||!j.isAbsolute(s))throw new TypeError(
|
|
463
|
+
"Genesis operations require an explicit absolute projectRoot.");return Zn(s,()=>e(cs(t,n)))}async function Nr({workdir:e,
|
|
464
|
+
promptContext:t}){let n=Y(t);return t.scope==="ephemeral"?n:(await S(we.projectSessionContext,{projectRoot:e,hostDriver:Y,
|
|
465
|
+
hostDriverInput:t})).output}async function V(e,t,n={}){let s=await S(e,n);if(s?.contract!==t)throw new Error(`Genesis re\
|
|
466
|
+
turned ${s?.contract||"no contract identity"}; expected ${t}.`);return s}function H(e,t={}){return V(n=>Hn({...n,name:e}),
|
|
467
|
+
I.stackSection,t)}async function ve(e,t={}){let n=await S(s=>qn({...s,names:e}),t);if(!Array.isArray(n)||n.length!==e.length||
|
|
468
|
+
n.some((s,r)=>s?.contract!==I.stackSection||s.name!==e[r]))throw new Error("Genesis returned an invalid Stack section in\
|
|
469
|
+
spection batch.");return n}async function Dr(e={}){if((await ds(e)).status!=="current")throw Object.assign(new Error("Th\
|
|
470
|
+
e project needs a current Genesis format before its Stack can be inspected."),{code:"vibe64_stack_format_required"});await Rn(
|
|
471
|
+
j.join(e.projectRoot,"genesis/stack.md"),"utf8");let n=await H(X,e);return{components:n.components,stackHash:n.stackHash}}
|
|
472
|
+
async function xr(e={}){let[t,n]=await Promise.all([H(Ue,e),V(Ee,I.environment,e)]);return qe({environment:n,section:t})}
|
|
473
|
+
function Vr(e={}){return V(Ee,I.environment,e)}function Pr(e={}){return V(Gn,I.projectInspection,e)}function jr(e={}){return V(
|
|
474
|
+
Kn,I.templates,e)}function Br(e={}){return V(Vn,I.templateApplication,e)}function Mr(e={}){return V($n,I.engineering,e)}
|
|
475
|
+
function $r(e={}){return V(Bn,I.collaboration,e)}async function ds(e={}){let t=await S(Ln,e);if(!W(t?.status))throw new Error(
|
|
476
|
+
"Genesis did not return a project-format status.");return{...t}}function Gr(e={}){return V(Jn,I.engineering,e)}function Lr(e={}){
|
|
477
|
+
return V(Yn,I.collaboration,e)}async function Ur(e={}){let[[t,n,s],r]=await Promise.all([ve([ne,re,X],e),V(Ee,I.environment,
|
|
478
|
+
e)]);return{...Je({environment:r,section:t}),resourceEstimates:ie({section:n,outputsSection:t,workspaceSetupSection:s})}}
|
|
479
|
+
async function Wr(e={}){let t=await H(it,e);return at({section:t})}async function Hr(e={}){return Ae(await H(Re,e))}async function qr(e={}){
|
|
480
|
+
return Ze(await H(Xe,e))}async function zr(e={}){let[t,n,s]=await ve([X,re,ne],e);return{...await Ie({projectRoot:e.projectRoot,
|
|
481
|
+
section:t}),resourceEstimates:ie({section:n,outputsSection:s,workspaceSetupSection:t})}}async function Kr(e={}){let[t,n,
|
|
482
|
+
s]=await ve([re,ne,X],e);return ie({section:t,outputsSection:n,workspaceSetupSection:s})}async function Fr({action:e={},
|
|
483
|
+
environment:t=process.env,input:n={},projectRoot:s}={}){let r=rs(e),i=is(n,e),o=r,c;try{c=await S(be,{environment:t,projectRoot:s,
|
|
484
|
+
request:i,sessionContextInstalled:!0,task:o},{prompt:!0})}catch(a){if(a?.code==="BLUEPRINT_INVALID"&&r!=="blueprint")o="\
|
|
485
|
+
blueprint",c=await S(be,{environment:t,projectRoot:s,request:i,sessionContextInstalled:!0,task:o},{prompt:!0});else if(a?.
|
|
486
|
+
code==="BLUEPRINT_REQUIRED"&&r!=="start")o="start",c=await S(be,{environment:t,projectRoot:s,request:i,sessionContextInstalled:!0,
|
|
487
|
+
task:o},{prompt:!0});else throw a}let u=pt(c.task)||o;return{context:{genesis:!0,requestedTask:r,task:u,verificationCommands:c.
|
|
488
|
+
verificationCommands,warnings:c.warnings},originalPrompt:i,prompt:c.prompt,promptId:W(e.promptId||e.id)||u}}export{yr as GENESIS_BLUEPRINT_PATH,Cr as GENESIS_DERIVED_ARTIFACT_PATHS,ps as GENESIS_MACHINE_CITY_PATH,ls as GENESIS_PROGRAM_CITY_PATH,
|
|
489
|
+
Ve as GENESIS_STACK_CONTRACTS_INCOMPLETE,Pe as GENESIS_STACK_SECTION_AMBIGUOUS,Nn as HOST_CONTEXT_RESOLVER_DATA_ENV,Dn as HOST_CONTEXT_RESOLVER_ENV,
|
|
490
|
+
lr as SOURCE_EXPLANATION_PROMPT_VERSION,Le as VIBE64_APPLICATION_DEPLOYMENT_CONTRACT,Ue as VIBE64_APPLICATION_DEPLOYMENT_SECTION,
|
|
491
|
+
rt as VIBE64_INTEGRATION_SETUP_CONTRACT,it as VIBE64_INTEGRATION_SETUP_SECTION,Fe as VIBE64_OUTPUTS_CONTRACT,ne as VIBE64_OUTPUTS_SECTION,
|
|
492
|
+
fe as VIBE64_PREVIEW_IDENTITY_COMMAND_PROTOCOL,tt as VIBE64_RESOURCE_ESTIMATES_CONTRACT,re as VIBE64_RESOURCE_ESTIMATES_SECTION,
|
|
493
|
+
Te as VIBE64_WORKSPACE_SETUP_CONTRACT,X as VIBE64_WORKSPACE_SETUP_SECTION,Er as addGenesisStack,Br as applyGenesisTemplate,
|
|
494
|
+
pt as assertGenesisPromptTask,lt as genesisCommandShimDirectory,os as genesisPackageBinDirectory,br as genesisParserEnvironment,
|
|
495
|
+
Ct as genesisProjectContractNeedsAttention,is as genesisPromptRequest,rs as genesisPromptTask,vr as initializeGenesisProject,
|
|
496
|
+
kr as inspectGenesisAgentIntegrations,$r as inspectGenesisCollaboration,us as inspectGenesisDerivedArtifacts,Mr as inspectGenesisEngineering,
|
|
497
|
+
Vr as inspectGenesisEnvironment,Pr as inspectGenesisProject,ds as inspectGenesisProjectFormat,Sr as inspectGenesisSkills,
|
|
498
|
+
Dr as inspectGenesisStackComponents,H as inspectGenesisStackSection,Or as inspectGenesisSubsystems,_r as inspectVibe64ArchitectureInspection,
|
|
499
|
+
Rr as inspectVibe64ArchitectureLayout,Hr as inspectVibe64ConnectedDevelopment,xr as inspectVibe64Deployment,Wr as inspectVibe64IntegrationSetup,
|
|
500
|
+
Ur as inspectVibe64Outputs,qr as inspectVibe64ProjectServices,Kr as inspectVibe64ResourceEstimates,zr as inspectVibe64WorkspaceSetup,
|
|
501
|
+
jr as listGenesisTemplates,gr as mergeArchitectureObservations,He as parseVibe64DeploymentLines,ot as parseVibe64IntegrationSetupLines,
|
|
502
|
+
se as parseVibe64OutputsLines,Qe as parseVibe64ProjectServicesLines,st as parseVibe64ResourceEstimatesLines,F as parseVibe64WorkspaceSetupLines,
|
|
503
|
+
Ar as refreshGenesisCities,Fr as renderGenesisPrompt,pn as resolveVibe64OutputParameters,Lr as setGenesisCollaboration,Gr as setGenesisEngineeringProfile,
|
|
504
|
+
dr as sourceExplanationGuidance,mr as sourceExplanationReviewGuidance,Ir as syncGenesisAgentIntegrations,Tr as syncGenesisSkills,
|
|
505
|
+
fr as validateArchitectureFacts,hr as validateArchitectureObservations,Nr as vibe64ConversationInstructions,Y as vibe64Driver,
|
|
506
|
+
pr as vibe64HostContextEnvironment,Cn as vibe64HostContextRegistry,as as vibe64HostContextResolverPath,wr as withGenesisCommandShim};
|