vibe64 0.1.77 → 0.1.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/run.js +1327 -1322
- package/bin/server.js +106 -104
- package/bin/upgrade-state.js +2736 -2754
- package/dist/assets/{GithubBrowserTabs-B2r19V0U.js → GithubBrowserTabs-CXjft59b.js} +1 -1
- package/dist/assets/GithubBrowserTabs-CXjft59b.js.br +0 -0
- package/dist/assets/GithubBrowserTabs-CXjft59b.js.gz +0 -0
- package/dist/assets/{LocalDatabaseServer-Ck9nZrGW.js → LocalDatabaseServer-BFzbm_N5.js} +1 -1
- package/dist/assets/LocalDatabaseServer-BFzbm_N5.js.br +0 -0
- package/dist/assets/LocalDatabaseServer-BFzbm_N5.js.gz +0 -0
- package/dist/assets/{Vibe64DashboardPageHeader-C4iTKeE0.js → Vibe64DashboardPageHeader-PKaMTKQo.js} +1 -1
- package/dist/assets/Vibe64DashboardPageHeader-PKaMTKQo.js.br +0 -0
- package/dist/assets/Vibe64DashboardPageHeader-PKaMTKQo.js.gz +0 -0
- package/dist/assets/{Vibe64DatabaseWorkspace-ChA-2QPU.js → Vibe64DatabaseWorkspace-6d4O_5R5.js} +1 -1
- package/dist/assets/Vibe64DatabaseWorkspace-6d4O_5R5.js.br +0 -0
- package/dist/assets/Vibe64DatabaseWorkspace-6d4O_5R5.js.gz +0 -0
- package/dist/assets/{Vibe64FileArea-DBEJsJSq.js → Vibe64FileArea-C18bdRqO.js} +1 -1
- package/dist/assets/Vibe64FileArea-C18bdRqO.js.br +0 -0
- package/dist/assets/Vibe64FileArea-C18bdRqO.js.gz +0 -0
- package/dist/assets/Vibe64OutputControls-OgqYYbq7.js +8 -0
- package/dist/assets/Vibe64OutputControls-OgqYYbq7.js.br +0 -0
- package/dist/assets/Vibe64OutputControls-OgqYYbq7.js.gz +0 -0
- package/dist/assets/{Vibe64OutputControls-aQCEvUL2.css → Vibe64OutputControls-gSUdkqME.css} +1 -1
- package/dist/assets/Vibe64OutputControls-gSUdkqME.css.br +0 -0
- package/dist/assets/Vibe64OutputControls-gSUdkqME.css.gz +0 -0
- package/dist/assets/{Vibe64RepositoryWorkspace-sT07hHPs.js → Vibe64RepositoryWorkspace-Cpb9aDYs.js} +1 -1
- package/dist/assets/Vibe64RepositoryWorkspace-Cpb9aDYs.js.br +0 -0
- package/dist/assets/Vibe64RepositoryWorkspace-Cpb9aDYs.js.gz +0 -0
- package/dist/assets/{Vibe64SessionFiles-Djef01EV.js → Vibe64SessionFiles-DJadIknz.js} +1 -1
- package/dist/assets/Vibe64SessionFiles-DJadIknz.js.br +0 -0
- package/dist/assets/Vibe64SessionFiles-DJadIknz.js.gz +0 -0
- package/dist/assets/{Vibe64SessionSourceEditor-CIGBLYYN.js → Vibe64SessionSourceEditor-C8XuUkUH.js} +1 -1
- package/dist/assets/Vibe64SessionSourceEditor-C8XuUkUH.js.br +0 -0
- package/dist/assets/Vibe64SessionSourceEditor-C8XuUkUH.js.gz +0 -0
- package/dist/assets/{Vibe64UiStoryboardView-CjkWoB8b.js → Vibe64UiStoryboardView-KzCGAvty.js} +1 -1
- package/dist/assets/Vibe64UiStoryboardView-KzCGAvty.js.br +0 -0
- package/dist/assets/Vibe64UiStoryboardView-KzCGAvty.js.gz +0 -0
- package/dist/assets/{_pageId_-BTjeqgTN.js → _pageId_-Dz7wuvcV.js} +1 -1
- package/dist/assets/{_sessionId_-C7Jh2bL4.js → _sessionId_-UOSJikRr.js} +1 -1
- package/dist/assets/_sessionId_-UOSJikRr.js.br +0 -0
- package/dist/assets/_sessionId_-UOSJikRr.js.gz +0 -0
- package/dist/assets/{_sessionTool_-DITdXCS4.js → _sessionTool_-SN6SNAQM.js} +1 -1
- package/dist/assets/{access-DIaPNdxr.js → access-Ba7aprTh.js} +1 -1
- package/dist/assets/access-Ba7aprTh.js.br +0 -0
- package/dist/assets/access-Ba7aprTh.js.gz +0 -0
- package/dist/assets/{app-mELSmS67.js → app-nvpa3ah6.js} +1 -1
- package/dist/assets/app-nvpa3ah6.js.br +0 -0
- package/dist/assets/app-nvpa3ah6.js.gz +0 -0
- package/dist/assets/{changes-DlxKdjdP.js → changes-WQZLBU3x.js} +1 -1
- package/dist/assets/{client-CLpGzGwX.js → client-B5r45NvF.js} +2 -2
- package/dist/assets/client-B5r45NvF.js.br +0 -0
- package/dist/assets/client-B5r45NvF.js.gz +0 -0
- package/dist/assets/{client-CL02nP02.js → client-EaJLXb4V.js} +2 -2
- package/dist/assets/client-EaJLXb4V.js.br +0 -0
- package/dist/assets/client-EaJLXb4V.js.gz +0 -0
- package/dist/assets/{dashboard-km-kuDid.js → dashboard-S0qg7Ai6.js} +1 -1
- package/dist/assets/{english-definitions-CMICWgdF.js → english-definitions-B9nc8s8Y.js} +1 -1
- package/dist/assets/english-definitions-B9nc8s8Y.js.br +0 -0
- package/dist/assets/english-definitions-B9nc8s8Y.js.gz +0 -0
- package/dist/assets/{env-DjkxkxdX.js → env-Dqyw_NCv.js} +1 -1
- package/dist/assets/env-Dqyw_NCv.js.br +0 -0
- package/dist/assets/env-Dqyw_NCv.js.gz +0 -0
- package/dist/assets/{error-C7q1-2bC.js → error-DkUVRs7I.js} +1 -1
- package/dist/assets/error-DkUVRs7I.js.br +0 -0
- package/dist/assets/error-DkUVRs7I.js.gz +0 -0
- package/dist/assets/{fileTypes-Dbn0qwKS.js → fileTypes-Dp5WZ-_A.js} +1 -1
- package/dist/assets/fileTypes-Dp5WZ-_A.js.br +0 -0
- package/dist/assets/fileTypes-Dp5WZ-_A.js.gz +0 -0
- package/dist/assets/{health-BwJ6Z251.js → health-BkO5CcRR.js} +1 -1
- package/dist/assets/health-BkO5CcRR.js.br +0 -0
- package/dist/assets/health-BkO5CcRR.js.gz +0 -0
- package/dist/assets/{history-D2TywQVv.js → history-DanS1uI3.js} +1 -1
- package/dist/assets/history-DanS1uI3.js.br +0 -0
- package/dist/assets/history-DanS1uI3.js.gz +0 -0
- package/dist/assets/{index-D14nUmm7.js → index-CeCIadYg.js} +4 -4
- package/dist/assets/index-CeCIadYg.js.br +0 -0
- package/dist/assets/index-CeCIadYg.js.gz +0 -0
- package/dist/assets/{integrations-BZFXW2Cp.js → integrations-Dh4ViP8t.js} +96 -10
- package/dist/assets/integrations-Dh4ViP8t.js.br +0 -0
- package/dist/assets/integrations-Dh4ViP8t.js.gz +0 -0
- package/dist/assets/{issues-CLvbBTek.js → issues-D3ZjHBeZ.js} +1 -1
- package/dist/assets/issues-D3ZjHBeZ.js.br +0 -0
- package/dist/assets/issues-D3ZjHBeZ.js.gz +0 -0
- package/dist/assets/{learning-DwytxEXC.js → learning-C_3lMmYJ.js} +1 -1
- package/dist/assets/{packages-BeiF8W7l.js → packages-CPSq4jBh.js} +1 -1
- package/dist/assets/packages-CPSq4jBh.js.br +0 -0
- package/dist/assets/packages-CPSq4jBh.js.gz +0 -0
- package/dist/assets/{pages-BIRQk4b8.js → pages-C-c5itHs.js} +1 -1
- package/dist/assets/{pages-BnAyUdL4.js → pages-D91yb6IJ.js} +1 -1
- package/dist/assets/pages-D91yb6IJ.js.br +0 -0
- package/dist/assets/pages-D91yb6IJ.js.gz +0 -0
- package/dist/assets/{project-GnljGud1.js → project-DTIrUrUg.js} +11 -11
- package/dist/assets/project-DTIrUrUg.js.br +0 -0
- package/dist/assets/project-DTIrUrUg.js.gz +0 -0
- package/dist/assets/{project-files-e4-Q65vT.js → project-files-Djr-58SN.js} +1 -1
- package/dist/assets/project-files-Djr-58SN.js.br +0 -0
- package/dist/assets/project-files-Djr-58SN.js.gz +0 -0
- package/dist/assets/{project-W_VltXAt.css → project-fwVeri07.css} +1 -1
- package/dist/assets/project-fwVeri07.css.br +0 -0
- package/dist/assets/project-fwVeri07.css.gz +0 -0
- package/dist/assets/{project-shared-ShellOutlet-DKYDipmC.js → project-shared-ShellOutlet-Pj_fRyAX.js} +1 -1
- package/dist/assets/project-shared-ShellOutlet-Pj_fRyAX.js.br +0 -0
- package/dist/assets/project-shared-ShellOutlet-Pj_fRyAX.js.gz +0 -0
- package/dist/assets/{project-shared-VBottomSheet-BSE28ENQ.js → project-shared-VBottomSheet-BSLhkh3o.js} +1 -1
- package/dist/assets/project-shared-VBottomSheet-BSLhkh3o.js.br +0 -0
- package/dist/assets/project-shared-VBottomSheet-BSLhkh3o.js.gz +0 -0
- package/dist/assets/{project-shared-VToolbar-CrezJP9z.js → project-shared-VToolbar-BYx2aRBU.js} +1 -1
- package/dist/assets/project-shared-VToolbar-BYx2aRBU.js.br +0 -0
- package/dist/assets/project-shared-VToolbar-BYx2aRBU.js.gz +0 -0
- package/dist/assets/{project-shared-pageNames-6Jz0BfbS.js → project-shared-pageNames-D7IBGzQh.js} +1 -1
- package/dist/assets/project-shared-pageNames-D7IBGzQh.js.br +0 -0
- package/dist/assets/project-shared-pageNames-D7IBGzQh.js.gz +0 -0
- package/dist/assets/{pull-requests-DH9gWw10.js → pull-requests-DWmXOwB8.js} +1 -1
- package/dist/assets/pull-requests-DWmXOwB8.js.br +0 -0
- package/dist/assets/pull-requests-DWmXOwB8.js.gz +0 -0
- package/dist/assets/{repository-BNltUuvb.js → repository-CNSRmrFd.js} +1 -1
- package/dist/assets/{session-Ck9aH4Yl.js → session-BITnnyzW.js} +1 -1
- package/dist/assets/session-BITnnyzW.js.br +0 -0
- package/dist/assets/session-BITnnyzW.js.gz +0 -0
- package/dist/assets/{settings-D8Ofbk56.js → settings-CkoP7vBl.js} +1 -1
- package/dist/assets/settings-CkoP7vBl.js.br +0 -0
- package/dist/assets/settings-CkoP7vBl.js.gz +0 -0
- package/dist/assets/{useArchivedVibe64Sessions-LIZjeLbd.js → useArchivedVibe64Sessions-CDKBzS4q.js} +1 -1
- package/dist/assets/useArchivedVibe64Sessions-CDKBzS4q.js.br +0 -0
- package/dist/assets/useArchivedVibe64Sessions-CDKBzS4q.js.gz +0 -0
- package/dist/assets/{vibe64AttachmentDownload-1_XfvfYp.js → vibe64AttachmentDownload-BPNgZodV.js} +1 -1
- package/dist/assets/{vibe64SavedEnvValues-Bs7r4xWE.js → vibe64SavedEnvValues-BDBfgAh7.js} +1 -1
- package/dist/assets/{vue-flow-core-iwGljzru.js → vue-flow-core-S4cIQeQZ.js} +1 -1
- package/dist/assets/vue-flow-core-S4cIQeQZ.js.br +0 -0
- package/dist/assets/vue-flow-core-S4cIQeQZ.js.gz +0 -0
- package/dist/index.html +2 -2
- package/docs/colleague-usage/auto-workflow.md +3 -2
- package/docs/colleague-usage/development-env.md +2 -2
- package/docs/colleague-usage/plans.md +35 -13
- package/docs/colleague-usage/preview-starting-application.md +6 -0
- package/docs/colleague-usage/preview-stop-and-restart.md +51 -0
- package/docs/colleague-usage/preview.md +10 -37
- package/docs/colleague-usage/project-language-tools.md +8 -2
- package/docs/colleague-usage/staging-data-section.md +242 -0
- package/node_modules/@jskit-ai/assistant-core/CHANGELOG.md +2 -0
- package/node_modules/@jskit-ai/assistant-core/package.json +1 -1
- 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/connectors-catalog/package.json +1 -1
- package/node_modules/@jskit-ai/payments-core/CHANGELOG.md +5 -0
- package/node_modules/@jskit-ai/payments-core/README.md +72 -8
- package/node_modules/@jskit-ai/payments-core/contracts/configuration.schema.json +56 -1
- package/node_modules/@jskit-ai/payments-core/contracts/conformance.json +484 -0
- package/node_modules/@jskit-ai/payments-core/locales/en.json +17 -5
- package/node_modules/@jskit-ai/payments-core/package.json +2 -1
- package/node_modules/@local/vibe64-execution/src/host/execHelper.js +545 -542
- package/node_modules/@local/vibe64-execution/src/server/gitTurnCheckpointCommand.js +135 -127
- package/node_modules/@local/vibe64-execution/src/server/hostProfile.js +18 -11
- package/node_modules/@local/vibe64-genesis/README.md +25 -0
- package/node_modules/@local/vibe64-genesis/bin/vibe64-genesis-host-context +39 -39
- package/node_modules/@local/vibe64-genesis/package.json +2 -1
- package/node_modules/@local/vibe64-genesis/src/server/agentSpecs.js +261 -140
- package/node_modules/@local/vibe64-genesis/src/server/index.js +619 -520
- package/node_modules/@local/vibe64-genesis/src/server/packaging.js +49 -48
- package/node_modules/@local/vibe64-runtime/src/server/codexAppServerProcess.js +82 -82
- package/node_modules/@local/vibe64-source-editor/src/server/searchIndexWorker.js +36 -36
- package/node_modules/@local/vibe64-terminals/src/server/sessionWorkOperationCommand.js +580 -570
- package/package.json +7 -7
- package/server.bundle.mjs +32680 -32667
- package/dist/assets/GithubBrowserTabs-B2r19V0U.js.br +0 -0
- package/dist/assets/GithubBrowserTabs-B2r19V0U.js.gz +0 -0
- package/dist/assets/LocalDatabaseServer-Ck9nZrGW.js.br +0 -0
- package/dist/assets/LocalDatabaseServer-Ck9nZrGW.js.gz +0 -0
- package/dist/assets/Vibe64DashboardPageHeader-C4iTKeE0.js.br +0 -0
- package/dist/assets/Vibe64DashboardPageHeader-C4iTKeE0.js.gz +0 -0
- package/dist/assets/Vibe64DatabaseWorkspace-ChA-2QPU.js.br +0 -0
- package/dist/assets/Vibe64DatabaseWorkspace-ChA-2QPU.js.gz +0 -0
- package/dist/assets/Vibe64FileArea-DBEJsJSq.js.br +0 -0
- package/dist/assets/Vibe64FileArea-DBEJsJSq.js.gz +0 -0
- package/dist/assets/Vibe64OutputControls-DpFdKIO2.js +0 -8
- package/dist/assets/Vibe64OutputControls-DpFdKIO2.js.br +0 -0
- package/dist/assets/Vibe64OutputControls-DpFdKIO2.js.gz +0 -0
- package/dist/assets/Vibe64OutputControls-aQCEvUL2.css.br +0 -0
- package/dist/assets/Vibe64OutputControls-aQCEvUL2.css.gz +0 -0
- package/dist/assets/Vibe64RepositoryWorkspace-sT07hHPs.js.br +0 -0
- package/dist/assets/Vibe64RepositoryWorkspace-sT07hHPs.js.gz +0 -0
- package/dist/assets/Vibe64SessionFiles-Djef01EV.js.br +0 -0
- package/dist/assets/Vibe64SessionFiles-Djef01EV.js.gz +0 -0
- package/dist/assets/Vibe64SessionSourceEditor-CIGBLYYN.js.br +0 -0
- package/dist/assets/Vibe64SessionSourceEditor-CIGBLYYN.js.gz +0 -0
- package/dist/assets/Vibe64UiStoryboardView-CjkWoB8b.js.br +0 -0
- package/dist/assets/Vibe64UiStoryboardView-CjkWoB8b.js.gz +0 -0
- package/dist/assets/_sessionId_-C7Jh2bL4.js.br +0 -0
- package/dist/assets/_sessionId_-C7Jh2bL4.js.gz +0 -0
- package/dist/assets/access-DIaPNdxr.js.br +0 -0
- package/dist/assets/access-DIaPNdxr.js.gz +0 -0
- package/dist/assets/app-mELSmS67.js.br +0 -0
- package/dist/assets/app-mELSmS67.js.gz +0 -0
- package/dist/assets/client-CL02nP02.js.br +0 -0
- package/dist/assets/client-CL02nP02.js.gz +0 -0
- package/dist/assets/client-CLpGzGwX.js.br +0 -0
- package/dist/assets/client-CLpGzGwX.js.gz +0 -0
- package/dist/assets/english-definitions-CMICWgdF.js.br +0 -0
- package/dist/assets/english-definitions-CMICWgdF.js.gz +0 -0
- package/dist/assets/env-DjkxkxdX.js.br +0 -0
- package/dist/assets/env-DjkxkxdX.js.gz +0 -0
- package/dist/assets/error-C7q1-2bC.js.br +0 -0
- package/dist/assets/error-C7q1-2bC.js.gz +0 -0
- package/dist/assets/fileTypes-Dbn0qwKS.js.br +0 -0
- package/dist/assets/fileTypes-Dbn0qwKS.js.gz +0 -0
- package/dist/assets/health-BwJ6Z251.js.br +0 -0
- package/dist/assets/health-BwJ6Z251.js.gz +0 -0
- package/dist/assets/history-D2TywQVv.js.br +0 -0
- package/dist/assets/history-D2TywQVv.js.gz +0 -0
- package/dist/assets/index-D14nUmm7.js.br +0 -0
- package/dist/assets/index-D14nUmm7.js.gz +0 -0
- package/dist/assets/integrations-BZFXW2Cp.js.br +0 -0
- package/dist/assets/integrations-BZFXW2Cp.js.gz +0 -0
- package/dist/assets/issues-CLvbBTek.js.br +0 -0
- package/dist/assets/issues-CLvbBTek.js.gz +0 -0
- package/dist/assets/packages-BeiF8W7l.js.br +0 -0
- package/dist/assets/packages-BeiF8W7l.js.gz +0 -0
- package/dist/assets/pages-BnAyUdL4.js.br +0 -3
- package/dist/assets/pages-BnAyUdL4.js.gz +0 -0
- package/dist/assets/project-GnljGud1.js.br +0 -0
- package/dist/assets/project-GnljGud1.js.gz +0 -0
- package/dist/assets/project-W_VltXAt.css.br +0 -0
- package/dist/assets/project-W_VltXAt.css.gz +0 -0
- package/dist/assets/project-files-e4-Q65vT.js.br +0 -0
- package/dist/assets/project-files-e4-Q65vT.js.gz +0 -0
- package/dist/assets/project-shared-ShellOutlet-DKYDipmC.js.br +0 -0
- package/dist/assets/project-shared-ShellOutlet-DKYDipmC.js.gz +0 -0
- package/dist/assets/project-shared-VBottomSheet-BSE28ENQ.js.br +0 -0
- package/dist/assets/project-shared-VBottomSheet-BSE28ENQ.js.gz +0 -0
- package/dist/assets/project-shared-VToolbar-CrezJP9z.js.br +0 -0
- package/dist/assets/project-shared-VToolbar-CrezJP9z.js.gz +0 -0
- package/dist/assets/project-shared-pageNames-6Jz0BfbS.js.br +0 -0
- package/dist/assets/project-shared-pageNames-6Jz0BfbS.js.gz +0 -0
- package/dist/assets/pull-requests-DH9gWw10.js.br +0 -0
- package/dist/assets/pull-requests-DH9gWw10.js.gz +0 -0
- package/dist/assets/session-Ck9aH4Yl.js.br +0 -0
- package/dist/assets/session-Ck9aH4Yl.js.gz +0 -0
- package/dist/assets/settings-D8Ofbk56.js.br +0 -0
- package/dist/assets/settings-D8Ofbk56.js.gz +0 -0
- package/dist/assets/useArchivedVibe64Sessions-LIZjeLbd.js.br +0 -0
- package/dist/assets/useArchivedVibe64Sessions-LIZjeLbd.js.gz +0 -0
- package/dist/assets/vue-flow-core-iwGljzru.js.br +0 -0
- package/dist/assets/vue-flow-core-iwGljzru.js.gz +0 -0
|
@@ -81,6 +81,13 @@ together. Later checks reread changes to those declarations. Invalid resource
|
|
|
81
81
|
estimates retain their diagnostic and generic fallback; they do not by themselves
|
|
82
82
|
make an otherwise valid output unavailable.
|
|
83
83
|
|
|
84
|
+
A resource the app needs and doesn't have yet, such as its database or Redis,
|
|
85
|
+
keeps Preview from starting: Preview names the values to set in **Dash → Env**
|
|
86
|
+
under **Development**, or says Vibe64 is still setting the resource up, then you
|
|
87
|
+
press **Check again** (see [Choose a starting application](preview-starting-application.md)).
|
|
88
|
+
A files bucket is never one of them: without its settings the app uses its own
|
|
89
|
+
default storage, and Preview starts.
|
|
90
|
+
|
|
84
91
|
If the previewed application shows its own login screen, enter that application's
|
|
85
92
|
credentials. Its login and realtime connection run through the Preview address.
|
|
86
93
|
HTTPS previews retain the HTTPS scheme for applications that use it to set
|
|
@@ -196,43 +203,9 @@ see why.
|
|
|
196
203
|
application again. If startup fails, inspect the message and **Show run output**
|
|
197
204
|
before retrying. Hiding run output closes only the terminal view; it does not
|
|
198
205
|
stop the application.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
On managed hosts, service cleanup runs before remaining processes are terminated.
|
|
203
|
-
Wait for Stop to finish; a cleanup failure is not a successful stop.
|
|
204
|
-
Stopping Preview closes its browser process but keeps the coding assistant's
|
|
205
|
-
managed-browser registration. The same assistant can run another managed browser
|
|
206
|
-
check or test suite afterward without reopening its conversation.
|
|
207
|
-
It stays stopped after navigation, reload or reopening the session. Use the
|
|
208
|
-
toolbar's **Start preview** or **Restart preview** deliberately to run it again.
|
|
209
|
-
|
|
210
|
-
A Preview also stops when the platform restarts, for example during an update.
|
|
211
|
-
The pane then removes the old page instead of leaving it looking alive. It shows
|
|
212
|
-
**Preview state was lost after a server restart** with **Restart preview**, or,
|
|
213
|
-
once that has been seen, **Preview is not running** with a **Start preview**
|
|
214
|
-
button in the middle of the pane. Starting it runs the session's current code.
|
|
215
|
-
A Preview tab opened before the platform restart needs opening again from the
|
|
216
|
-
editor; its old access no longer works.
|
|
217
|
-
If Stop reports incomplete cleanup, retry Stop before starting. Browser tests
|
|
218
|
-
may temporarily run an isolated target, then restore the prior stopped choice.
|
|
219
|
-
Managed suites without `--target` also restore the previous running or stopped
|
|
220
|
-
Preview state, including after an assertion failure or cancellation. An explicitly
|
|
221
|
-
supplied external `PLAYWRIGHT_BASE_URL` does not start or stop managed Preview.
|
|
222
|
-
The selected target and its parameter values remain saved while stopped, including
|
|
223
|
-
after browser tests or an editor restart, for the next explicit Start.
|
|
224
|
-
If Preview reports an invalid saved stop state, use the explicit Stop action
|
|
225
|
-
before retrying Start; automatic recovery does not overwrite that state.
|
|
226
|
-
Colleague can offer the existing authorized stop/start actions, but a how-to
|
|
227
|
-
question alone does not authorize either action.
|
|
228
|
-
Retrying the same output reuses its running application when its settings and
|
|
229
|
-
environment still match. It does not start another process merely because a
|
|
230
|
-
new Preview address could be allocated. Use **Restart preview** when you intend
|
|
231
|
-
to replace that run.
|
|
232
|
-
Stopping or restarting a Preview includes processes in its child groups,
|
|
233
|
-
that are owned by that output. Wait for cleanup to finish before starting
|
|
234
|
-
another run. If cleanup fails, open **Resources** for the reported operation
|
|
235
|
-
and retry only after its running work has been stopped.
|
|
206
|
+
To stop Preview, and for what Preview shows after a stop or a platform restart
|
|
207
|
+
and what a start does while another run is starting or running, read
|
|
208
|
+
[Stopping and restarting Preview](preview-stop-and-restart.md).
|
|
236
209
|
|
|
237
210
|
Colleague can inspect the selected output and its logs, explain required fields,
|
|
238
211
|
and start or stop it through existing authorized actions. It must inspect current
|
|
@@ -8,9 +8,15 @@ database or run a migration.
|
|
|
8
8
|
|
|
9
9
|
Where pinned runtime packs are installed, Vibe64 uses the selected packs.
|
|
10
10
|
Otherwise standalone Vibe64 uses the developer's installed tools through its
|
|
11
|
-
ordinary PATH and does not require a Nix installation. Kotlin's
|
|
12
|
-
|
|
11
|
+
ordinary PATH and does not require a Nix installation. Kotlin's pack runs
|
|
12
|
+
`kotlinc` with its own Java runtime but does not put `java`, `javac`, Maven or
|
|
13
|
+
Gradle on PATH: a Kotlin project whose commands run them declares `java` too.
|
|
14
|
+
Rust links with the computer's C compiler (`cc`). Projects needing native
|
|
13
15
|
extensions or Go C integration also declare their required build toolchain.
|
|
16
|
+
Every Java program a managed command starts keeps its temporary files, among
|
|
17
|
+
them the native libraries of SQLite's JDBC driver, Netty or JNA, in the
|
|
18
|
+
command's temporary folder rather than `/tmp`; a project's own
|
|
19
|
+
`-Djava.io.tmpdir` still wins.
|
|
14
20
|
JSKIT, Vue, Laravel, Django, Rails, Spring Boot, Express and Next.js use the
|
|
15
21
|
tools specified by their project commands rather than a separate framework
|
|
16
22
|
runtime: Django uses `python`, Rails uses `ruby` with `cpp` for native gems (and
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
# Write the Staging data section
|
|
2
|
+
|
|
3
|
+
The `## Staging data` section of a project's `genesis/stack.md` says what the
|
|
4
|
+
project's Staging database holds: a database of Staging's own, empty or built
|
|
5
|
+
from a copy of production's data, or production's database itself. A project
|
|
6
|
+
without the section has its own empty Staging database.
|
|
7
|
+
|
|
8
|
+
## Who writes it
|
|
9
|
+
|
|
10
|
+
The section is part of the project's source. In a session, ask the coding agent
|
|
11
|
+
in the session's chat to write or change it, for example "Give Staging a
|
|
12
|
+
sampled copy of production's data: keep the last 90 days of orders". The agent
|
|
13
|
+
reads the exact grammar with `vibe64-helper spec staging-data` and writes the
|
|
14
|
+
section and the dump command it needs. Review
|
|
15
|
+
the change and **Save** the session as usual.
|
|
16
|
+
|
|
17
|
+
Which mode Staging uses is your decision: it decides whether Staging holds
|
|
18
|
+
production's data, or uses production's database itself. The agent drafts a
|
|
19
|
+
recipe for you to review, but never chooses a copy or a shared mode on its own.
|
|
20
|
+
|
|
21
|
+
Colleague can explain the modes and the recipe and help you choose; the
|
|
22
|
+
section itself is written in a session.
|
|
23
|
+
|
|
24
|
+
## Choose a mode
|
|
25
|
+
|
|
26
|
+
The section starts with the database and the mode, each on its own line:
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
## Staging data
|
|
30
|
+
|
|
31
|
+
- Database: `database`
|
|
32
|
+
- Mode: own copy, empty
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
`- Database:` names the database in the Stack's `## Resources` by its id, in
|
|
36
|
+
backticks. It is usually `database`, the id **Add a service** gives a MySQL or
|
|
37
|
+
PostgreSQL database. Only a MySQL or PostgreSQL database can have Staging data;
|
|
38
|
+
a SQLite database, Redis or a files bucket is refused.
|
|
39
|
+
|
|
40
|
+
`- Mode:` is one of these phrases, written exactly, without backticks:
|
|
41
|
+
|
|
42
|
+
| Mode | Staging's database |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| `own copy, empty` | Its own, and empty: the Deployment's Migrate step makes its tables. This is what a project without the section has. |
|
|
45
|
+
| `own copy, full` | Its own, built from a whole copy of production's database. |
|
|
46
|
+
| `own copy, sampled` | Its own, built from part of production's data, chosen by a recipe in the section. |
|
|
47
|
+
| `shared with production` | Production's database itself. Nothing is copied, and what Staging changes, production has. |
|
|
48
|
+
| `shared with production, structure frozen` | Production's database itself, and Staging never changes its structure. |
|
|
49
|
+
|
|
50
|
+
- Choose an empty copy when Staging can start with no data, such as an app
|
|
51
|
+
whose first account sets it up.
|
|
52
|
+
- Choose a full copy when production's data is small enough to copy whole.
|
|
53
|
+
- Choose a sampled copy when production's data is too big to copy, but Staging
|
|
54
|
+
needs real data to check against.
|
|
55
|
+
- Choose shared only when Staging must work on production's own data. A host
|
|
56
|
+
treats a Migrate on a shared Staging as a migration of production's database,
|
|
57
|
+
because it is one.
|
|
58
|
+
- Choose shared with its structure frozen when production's database must never
|
|
59
|
+
change shape from Staging: a host runs no Migrate on Staging at all, so the
|
|
60
|
+
code you publish to Staging must work with production's tables as they are.
|
|
61
|
+
|
|
62
|
+
A host never copies production's data into Staging over a live connection, and
|
|
63
|
+
Staging never connects to production's database in an own copy.
|
|
64
|
+
|
|
65
|
+
## The dump command
|
|
66
|
+
|
|
67
|
+
A full or sampled copy is built from a dump of production's database that the
|
|
68
|
+
app's own command writes. Name it in a `- Source:` line:
|
|
69
|
+
|
|
70
|
+
```markdown
|
|
71
|
+
- Source: dump written by command with `nodejs` in `.`: `node` `scripts/production-dump.js` `{dump}`
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- After `with` come the runtimes the command needs, then the folder it runs in,
|
|
75
|
+
then the command and each of its arguments, each in its own backticks, as in
|
|
76
|
+
the Stack's other commands.
|
|
77
|
+
- `{dump}` is the file the command writes the dump to. The host chooses the file
|
|
78
|
+
and puts its path there. Pass `{dump}` exactly once, as an argument of its
|
|
79
|
+
own: `--output` `{dump}` works, `--output={dump}` is refused. No other
|
|
80
|
+
`{...}` placeholder is allowed.
|
|
81
|
+
- The host runs the command with the settings it gives the app's Staging.
|
|
82
|
+
There, the database's own settings, such as `DB_HOST` and `DB_PASSWORD`,
|
|
83
|
+
name Staging's own database, so the command reads how to reach production's
|
|
84
|
+
dump, or production's database, from settings of its own, such as
|
|
85
|
+
`PRODUCTION_DUMP_URL`, which the person adds to Staging's settings. Keep
|
|
86
|
+
credentials out of the command line.
|
|
87
|
+
- The dump is one of these:
|
|
88
|
+
- for MySQL or MariaDB: SQL text, as `mariadb-dump` or `mysqldump` writes
|
|
89
|
+
it, plain or gzip-compressed, of one database's tables. Dump the database
|
|
90
|
+
by name, never with `--databases` or `--all-databases`, which make the dump
|
|
91
|
+
create its own database.
|
|
92
|
+
- for PostgreSQL: `pg_dump`'s custom format, `pg_dump -Fc`.
|
|
93
|
+
- The programs the command runs, such as `mysqldump` or `pg_dump`, must be
|
|
94
|
+
available where it runs: name them in the Deployment's Packages, as for any
|
|
95
|
+
program a Deployment step runs.
|
|
96
|
+
|
|
97
|
+
An empty copy and the shared modes have no Source; the section refuses one.
|
|
98
|
+
|
|
99
|
+
## A sampled copy's recipe
|
|
100
|
+
|
|
101
|
+
A sampled copy also says, for each table, which rows Staging keeps. Put the
|
|
102
|
+
rules under `### Tables`:
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
- Unlisted tables: all up to `10000` rows
|
|
106
|
+
|
|
107
|
+
### Tables
|
|
108
|
+
|
|
109
|
+
- `countries`: all
|
|
110
|
+
- `jobs`: recent by `created_at`, last `180` days
|
|
111
|
+
- `job_events`: recent by `id`, newest `200000` rows
|
|
112
|
+
- `messages`: recent by `sent_at`, last `90` days, newest `50000` rows
|
|
113
|
+
- `sessions`: none
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
- `all` keeps every row; `none` keeps the table empty, with its structure.
|
|
117
|
+
- `recent by` a column keeps the rows of the last `n` days by that column (1 to
|
|
118
|
+
36500 days), the newest `n` rows by it (1 to 100000000), or both, in that
|
|
119
|
+
order: the newest `n` rows of the last `n` days.
|
|
120
|
+
- `- Unlisted tables: all up to` `n` `rows` (1 to 10000000) is required: a table
|
|
121
|
+
the rules don't name is copied whole while it has at most that many rows. A
|
|
122
|
+
bigger one needs a rule of its own.
|
|
123
|
+
- Name each table once. Table and column names are letters, digits and `_`, up
|
|
124
|
+
to 64, starting with a letter or `_`, each in backticks.
|
|
125
|
+
|
|
126
|
+
A host keeps the copy whole: every row a kept row refers to is kept too,
|
|
127
|
+
through the database's own foreign keys. Two more headings cover what the
|
|
128
|
+
foreign keys don't say:
|
|
129
|
+
|
|
130
|
+
```markdown
|
|
131
|
+
### Links
|
|
132
|
+
|
|
133
|
+
- `jobs.vessel_id` to `vessels.id`
|
|
134
|
+
|
|
135
|
+
### Keep together
|
|
136
|
+
|
|
137
|
+
- `invoices` keeps every `invoice_lines` row by `invoice_id`
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
- `### Links` names a column that refers to another table's column without a
|
|
141
|
+
foreign key saying so, as `table.column` to `table.column`. The rows it
|
|
142
|
+
refers to are kept like those of a foreign key. Name each column once.
|
|
143
|
+
- `### Keep together` goes the other way: for every kept row of the first table,
|
|
144
|
+
every row of the second whose column refers to it is kept too, such as an
|
|
145
|
+
invoice's lines. The column is the second table's. Name each table and column
|
|
146
|
+
pair once.
|
|
147
|
+
|
|
148
|
+
Both are optional. A host loads the copy with the database's constraint checks
|
|
149
|
+
on, and checks after that no kept row refers to a row it left out.
|
|
150
|
+
|
|
151
|
+
## Contacts
|
|
152
|
+
|
|
153
|
+
A full or sampled copy holds real people's email addresses and phone numbers.
|
|
154
|
+
Name every column that holds one under `### Contacts`:
|
|
155
|
+
|
|
156
|
+
```markdown
|
|
157
|
+
### Contacts
|
|
158
|
+
|
|
159
|
+
- `users.email`: email
|
|
160
|
+
- `users.mobile`: phone
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
A host replaces those columns' values in Staging's copy with made-up ones, the
|
|
164
|
+
same at every build, so nothing Staging sends reaches a real person. When no
|
|
165
|
+
column holds one, write the heading with the one entry `- Nothing.`. A full or
|
|
166
|
+
sampled copy without `### Contacts` is refused, so a copy never leaves contacts
|
|
167
|
+
out by accident.
|
|
168
|
+
|
|
169
|
+
Only a full or sampled copy has `### Contacts`, and only a sampled copy has
|
|
170
|
+
`### Tables`, `### Links`, `### Keep together` and Unlisted tables. Headings
|
|
171
|
+
come after the Database, Mode, Source and Unlisted tables lines, in any order,
|
|
172
|
+
each once.
|
|
173
|
+
|
|
174
|
+
## A whole sampled section
|
|
175
|
+
|
|
176
|
+
```markdown
|
|
177
|
+
## Staging data
|
|
178
|
+
|
|
179
|
+
- Database: `database`
|
|
180
|
+
- Mode: own copy, sampled
|
|
181
|
+
- Source: dump written by command with `nodejs` in `.`: `node` `scripts/production-dump.js` `{dump}`
|
|
182
|
+
- Unlisted tables: all up to `10000` rows
|
|
183
|
+
|
|
184
|
+
### Tables
|
|
185
|
+
|
|
186
|
+
- `countries`: all
|
|
187
|
+
- `jobs`: recent by `created_at`, last `180` days
|
|
188
|
+
- `sessions`: none
|
|
189
|
+
|
|
190
|
+
### Links
|
|
191
|
+
|
|
192
|
+
- `jobs.vessel_id` to `vessels.id`
|
|
193
|
+
|
|
194
|
+
### Keep together
|
|
195
|
+
|
|
196
|
+
- `invoices` keeps every `invoice_lines` row by `invoice_id`
|
|
197
|
+
|
|
198
|
+
### Contacts
|
|
199
|
+
|
|
200
|
+
- `users.email`: email
|
|
201
|
+
- `users.mobile`: phone
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
A full copy is shorter:
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
## Staging data
|
|
208
|
+
|
|
209
|
+
- Database: `database`
|
|
210
|
+
- Mode: own copy, full
|
|
211
|
+
- Source: dump written by command with `nodejs` in `.`: `node` `scripts/production-dump.js` `{dump}`
|
|
212
|
+
|
|
213
|
+
### Contacts
|
|
214
|
+
|
|
215
|
+
- Nothing.
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
## When the section is refused
|
|
219
|
+
|
|
220
|
+
A section Vibe64 can't read is refused as a whole: the message names the line
|
|
221
|
+
of the section, says what is wrong and ends with
|
|
222
|
+
`Exact grammar: vibe64-helper spec staging-data.` Ask the coding agent to fix
|
|
223
|
+
it, or fix that line yourself. The most common ones:
|
|
224
|
+
|
|
225
|
+
- **declares no Staging data**: the section holds only `- Nothing.`. Declare a
|
|
226
|
+
mode, or remove the section to give Staging its own empty database.
|
|
227
|
+
- **needs a Mode** or **Unknown Staging data Mode**: write one of the five
|
|
228
|
+
phrases exactly.
|
|
229
|
+
- **builds Staging's own database from a dump of production's: add - Source:
|
|
230
|
+
...**: a full or sampled copy needs its dump command.
|
|
231
|
+
- **must pass `{dump}`**, **passes `{dump}` inside** or **has the placeholder**:
|
|
232
|
+
pass `{dump}` once, as an argument of its own.
|
|
233
|
+
- **has no Source**, **has no Unlisted tables** or **has no `### Tables`**: the
|
|
234
|
+
mode doesn't take that line or heading; remove it, or choose the mode that
|
|
235
|
+
does.
|
|
236
|
+
- **add `### Contacts`**: a copy names its contact columns, or says `- Nothing.`.
|
|
237
|
+
- **declares no resource** or **is a ... resource**: the Database line names a
|
|
238
|
+
resource the Stack doesn't have, or one that isn't a MySQL or PostgreSQL
|
|
239
|
+
database. Name the database's id from `## Resources`.
|
|
240
|
+
|
|
241
|
+
When and how a host builds or refreshes Staging's copy, and what it asks of you
|
|
242
|
+
before a shared Staging migrates, are in the host's own guides.
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- A native process's identity check on Linux no longer reports a running process group as exited when some other process on the host is reaped while `/proc` is being listed. `/proc` lists a process being reaped mid-listing without an entry type; a listing asked for entry types, as the scan's was, then `lstat`s that entry, and once the process has gone the whole listing rejects with `ENOENT`. The scan read that as no processes at all: an owned group whose processes were all running inspected as `mismatch`, `stop()` returned `processExitVerified: true` and `stopped: false` without signalling it, and a Codex app-server's status check could read a live runtime as exited. The scan now lists `/proc` by name. A process table that cannot be listed, or a process whose stat cannot be read for any reason but having gone (`ENOENT`, `ESRCH`) or being hidden from this user by `hidepid` (`EACCES`, `EPERM`), now makes the inspection `ambiguous`, as a failed `ps` already did on macOS, and an ambiguous inspection never proves an exit.
|
|
6
|
+
|
|
5
7
|
- Closing a Codex session, or a project, now ends only after the observation stops of its providers have finished. An observation stop starts from a failure nothing awaits: a notification the queue could not save, for example. Its last step saves the session's stopped work under the session's lock, but the close stopped the session's providers and returned without waiting for it. A host that removed or moved the session right after the close then raced those writes, and a recursive removal of the session's folder could fail with `ENOTEMPTY` on its lock folder. `releaseSession` now waits for its session's stops after draining the notification queue, including any stop those writes start. `stopProvidersForProject` waits for the stops of the sessions it stops. A stop that fails is still reported as `stopFailed`, and the close goes on after it.
|
|
6
8
|
- A Codex conversation no longer fails to start on a busy host because its app-server took longer to answer than the conversation's admission deadline. The common runtime's Codex driver passed `limits.admissionTimeoutMs` as the app-server's start deadline, so a host that set a short admission deadline (2 seconds, say, to notice a lost acknowledgement soon) also gave each start that long, and a start slowed by the host's load failed with `codex_app_server_ready_timeout` ("Codex app-server did not become ready at …"). The start now has its own 30-second bound, as OpenCode's has, and `admissionTimeoutMs` bounds only the requests that admit a message.
|
|
7
9
|
- An OpenCode message no longer fails with `TimeoutError: The operation was aborted due to timeout` when the shared OpenCode server answers its health probe in more than a second. Before each message's preparation, and when a conversation checks that its native session is ready, the runtime probed the running server with a fixed one-second deadline and failed the message when a busy host answered later. Each probe now waits up to the readiness bound a starting server has (`OPENCODE_READY_TIMEOUT_MS`, 30 seconds), so only a hung server fails it; `createOpenCodeSharedRuntime` takes `healthTimeoutMs` to set another. A refused connection still replaces the stopped server at once, and a probe that times out still keeps every other conversation on the server.
|
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Prepaid top-ups. `extensions.payments.topUps` (`name`, `currency`, `minimumAmount`, `maximumAmount`, amounts in the currency's smallest unit, Stripe's floor of 50) sells one-off Stripe Checkout payments of an amount the person chooses; `plans` may be empty only beside it. A Paddle connection with top-ups fails validation at its `integrationId` (`payments.configuration.paddleTopUps`), and an inverted range at `topUps/maximumAmount` (`payments.configuration.topUpRange`). `createPaymentCheckoutService` takes `topUps: { offer, credit }` and gains `topUp({actor, subjectId, amount, requestId, email?, description?})` and `confirmTopUp({actor, subjectId, topUpId})`, both authorized as action `topUp`; its `webhook` settles the four `checkout.session.*` top-up events. The verified webhook and the return page's confirmation (which reads the session from Stripe with the server's key) settle through one path: under the top-up's row lock, only the move to paid calls the application's `credit({reference, subjectId, amount, currency}, options)` inside the same transaction, so a top-up is credited once whichever door reports it first. The subject comes from the top-up written down at checkout, never from the event. New table `payment_top_ups` (migration `payments_core_top_ups.cjs`, in the payment tables' collation on MySQL and MariaDB); the store gains `createTopUp`, `inspectTopUp` and `withTopUp`. `TOP_UP_RETURN_PARAMETER` (`"paymentTopUp"`) is exported from `@jskit-ai/payments-core/shared/topUps`.
|
|
6
|
+
- **Breaking:** `createStripePaymentAdapter` requires `appEnv` (`appEnvironment(env)`) and refuses a live key (`sk_live_`, `rk_live_`) unless it is `production`, with `payment_live_key_refused` (409); test keys work everywhere. It takes `apiBaseUrl`, a stand-in for Stripe's API, in development and tests only (`payment_stand_in_refused`, 409, elsewhere).
|
|
7
|
+
- `PaymentError` takes `cause` in its options; a provider failure while starting or confirming a top-up is `payment_provider_unavailable` (502) with the provider's error as its cause.
|
|
8
|
+
- New messages: `jskit.errors.payment_live_key_refused`, `payment_stand_in_refused`, `payment_top_ups_unavailable`, `payment_top_up_amount_invalid`, `payment_top_up_missing`, `payment_provider_unavailable`; `jskit.payments.input.topUpDescription`, `jskit.payments.reference.otherAmount`, `jskit.payments.provider.topUpSession`, `jskit.payments.provider.topUpAmount`, `jskit.payments.configuration.paddleTopUps`, `jskit.payments.configuration.topUpRange`.
|
|
9
|
+
|
|
5
10
|
- The `webhook` and `deployment` readiness checks' text names the release in use ("Verify the release in use runs with this configuration and environment."), where it said the deployed webhook and the intended release; the check ids are unchanged.
|
|
6
11
|
- **Breaking:** `createPaymentCheckoutService` takes `appEnv` (the application's `APP_ENV`, `appEnvironment(env)`) in place of `sideEffects`, and requires it. Only production takes real payments: checkout and the billing portal in the live payment environment are refused elsewhere with `payment_sandbox_only` (409, "Only production takes real payments: use the sandbox payment environment."), which replaces `payment_test_copy`, before any provider write. The sandbox environment works everywhere.
|
|
7
12
|
- A test copy takes no real money: `createPaymentCheckoutService` takes `sideEffects` (default `simulate`), and unless it is `live`, checkout and the billing portal in the live payment environment are refused with `payment_test_copy` (409) before any provider write. The sandbox environment works either way.
|
|
@@ -6,9 +6,11 @@ is required to run them. PHP applications implement the same documented
|
|
|
6
6
|
contract using their own framework; they do not install this runtime.
|
|
7
7
|
|
|
8
8
|
Current implementation: a strict payment declaration, transactional Knex
|
|
9
|
-
storage, subscription feature checks, usage credits,
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
storage, subscription feature checks, usage credits, prepaid top-ups (one-off
|
|
10
|
+
Stripe Checkout payments credited once to the application's own balance),
|
|
11
|
+
official-SDK Stripe and Paddle webhook verification, subscription
|
|
12
|
+
reconciliation, checkout and customer portal adapters, and an explicitly
|
|
13
|
+
authorized checkout composition service.
|
|
12
14
|
Reviewed catalogue publication preserves environment-bound product/price IDs and
|
|
13
15
|
records ambiguous provider writes for recovery. Editor execution wiring and
|
|
14
16
|
automatic merchant onboarding remain separate unfinished work.
|
|
@@ -24,6 +26,9 @@ they are not an editor configuration database.
|
|
|
24
26
|
Public API imports:
|
|
25
27
|
|
|
26
28
|
- `@jskit-ai/payments-core/shared`: `validatePaymentConfiguration(document)`.
|
|
29
|
+
- `@jskit-ai/payments-core/shared/topUps`: `TOP_UP_RETURN_PARAMETER`
|
|
30
|
+
(`"paymentTopUp"`), the return URL's query parameter naming the top-up a
|
|
31
|
+
person comes back from.
|
|
27
32
|
- `@jskit-ai/payments-core/server/storage`: `PaymentStoreFeature`, the payment
|
|
28
33
|
tables' one owner: registered in the server providers, it owns them through
|
|
29
34
|
`runtime.resources` and provides the payment store as `payments.store`. A
|
|
@@ -38,8 +43,8 @@ The app authorizes billing identities and mounts its own routes. A billable
|
|
|
38
43
|
subject may be a user or an organization. Never derive that subject from an
|
|
39
44
|
untrusted customer ID or webhook metadata. The checkout service requires an
|
|
40
45
|
`authorize(actor, { subjectId, action })` function that returns exactly `true`.
|
|
41
|
-
The app must distinguish `account`, `history`, `checkout`, `portal`
|
|
42
|
-
administrator-only `reconcile`. `history` reads customer-scoped subscriptions
|
|
46
|
+
The app must distinguish `account`, `history`, `checkout`, `portal`, `topUp`
|
|
47
|
+
and administrator-only `reconcile`. `history` reads customer-scoped subscriptions
|
|
43
48
|
and invoice/transaction pages with no provider writes; its contract and CLI
|
|
44
49
|
composition are in [standalone setup](docs/standalone.md#provider-billing-history-from-an-app-or-cli).
|
|
45
50
|
Core grant/debit/reconciliation methods are trusted server APIs, not public
|
|
@@ -67,8 +72,15 @@ For concrete file loading, Env resolution and provider composition, see
|
|
|
67
72
|
Create one Stripe or Paddle adapter using `apiKey`, `webhookSecret`,
|
|
68
73
|
`environment`, `providerAccountId` (Stripe), `taxCategory` (Paddle), and `priceBindings`. Account
|
|
69
74
|
identity in this configuration is not a claim of provider verification.
|
|
75
|
+
The Stripe adapter also takes `appEnv` (`appEnvironment(env)`), and refuses
|
|
76
|
+
a live key (`sk_live_`, `rk_live_`) unless it is `production`
|
|
77
|
+
(`payment_live_key_refused`); test keys work everywhere. Development and
|
|
78
|
+
tests may point it at a stand-in for Stripe's API with `apiBaseUrl` (an
|
|
79
|
+
origin such as `http://127.0.0.1:12111`), which other environments refuse.
|
|
70
80
|
5. Create the checkout service with `adapter`, `store`, `payments`,
|
|
71
|
-
`merchantScope`, `returnUrl`, and the app's `authorize` function
|
|
81
|
+
`merchantScope`, `returnUrl`, `appEnv` and the app's `authorize` function,
|
|
82
|
+
plus `topUps: { offer: configuration.topUps, credit }` when it sells top-ups
|
|
83
|
+
([Prepaid top-ups](#prepaid-top-ups)).
|
|
72
84
|
6. Authenticated app routes call `checkout({actor, subjectId, email, planId,
|
|
73
85
|
requestId})` or `portal({actor, subjectId})`. Keep the returned checkout
|
|
74
86
|
request ID stable on transport retries; begin a new request for an expired
|
|
@@ -91,6 +103,51 @@ Checkout and a return page. Both providers' customer portals remain provider
|
|
|
91
103
|
hosted. Provider account registration and Paddle domain approval are separate
|
|
92
104
|
setup tasks; a successful API request does not prove approval.
|
|
93
105
|
|
|
106
|
+
## Prepaid top-ups
|
|
107
|
+
|
|
108
|
+
A configuration with `topUps` (see [the contract](docs/contract.md#prepaid-top-ups))
|
|
109
|
+
sells one-off Stripe Checkout payments of an amount the person chooses within
|
|
110
|
+
its limits, credited once to the application's own balance:
|
|
111
|
+
|
|
112
|
+
```js
|
|
113
|
+
const checkout = createPaymentCheckoutService({
|
|
114
|
+
adapter, store, payments, merchantScope, returnUrl, authorize, appEnv: appEnvironment(env),
|
|
115
|
+
topUps: {
|
|
116
|
+
offer: configuration.topUps,
|
|
117
|
+
// Inside the transaction that marks the top-up paid; write with `options` so both commit or neither does.
|
|
118
|
+
credit: ({ reference, subjectId, amount, currency }, options) => balances.add({ reference, subjectId, amount, currency }, options)
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The checkout service then has:
|
|
124
|
+
|
|
125
|
+
- `topUp({actor, subjectId, amount, requestId, email?, description?})`:
|
|
126
|
+
authorizes action `topUp`, checks the amount (an integer in the currency's
|
|
127
|
+
smallest unit, within `minimumAmount`..`maximumAmount`), writes the top-up
|
|
128
|
+
down and opens its Checkout payment. Answers
|
|
129
|
+
`{topUpId, status, amount, currency, url}`; navigate to `url` (in a framed
|
|
130
|
+
page, `@jskit-ai/payments-web`'s `openPaymentPage(url)` opens it in a new
|
|
131
|
+
tab). The same `requestId` answers the same top-up.
|
|
132
|
+
- `confirmTopUp({actor, subjectId, topUpId})`: the return page's call, with the
|
|
133
|
+
`paymentTopUp` query parameter Checkout returns with. It authorizes action
|
|
134
|
+
`topUp`, reads the session from Stripe with the server's key and settles it.
|
|
135
|
+
Answers the same shape plus `credited`, true only for the call that credited.
|
|
136
|
+
- `webhook({rawBody, signature})` settles the top-ups' Checkout events
|
|
137
|
+
(`checkout.session.completed`, `checkout.session.async_payment_succeeded`,
|
|
138
|
+
`checkout.session.async_payment_failed`, `checkout.session.expired`) through
|
|
139
|
+
the same path, before subscription events.
|
|
140
|
+
|
|
141
|
+
`credit` is called once per paid top-up with a stable `reference`
|
|
142
|
+
(`top-up:<topUpId>`), the subject the top-up was written down for, the amount
|
|
143
|
+
and the currency, and the options of the transaction that settles it. Its
|
|
144
|
+
handle calls take those options (spread under the application's own context
|
|
145
|
+
where it needs one) and join that transaction. It runs again only after its
|
|
146
|
+
transaction rolled back, so it writes nothing outside it; a balance kept
|
|
147
|
+
elsewhere must be idempotent on the reference. Composing top-ups with a Paddle
|
|
148
|
+
adapter, or without `offer` or `credit`, throws a TypeError naming the fix; a
|
|
149
|
+
service composed without them answers `topUp` with `payment_top_ups_unavailable`.
|
|
150
|
+
|
|
94
151
|
## Failures and evidence
|
|
95
152
|
|
|
96
153
|
Checkout writes an intent before contacting the provider. A crash or ambiguous
|
|
@@ -112,7 +169,12 @@ features or allowances.
|
|
|
112
169
|
Focused fixture evidence currently covers raw signatures with both official
|
|
113
170
|
SDKs, storage rollback, duplicate grants/renewals, subject/environment isolation,
|
|
114
171
|
concurrent debit requests, expired refunds, checkout authorization, uncertain
|
|
115
|
-
writes and explicit recovery.
|
|
172
|
+
writes and explicit recovery. Top-ups are tested through the real Stripe SDK
|
|
173
|
+
against a stand-in for Stripe's API (`test/support/fakeStripe.js`): checkout
|
|
174
|
+
creation and authorization, limits, each webhook outcome, the return page's
|
|
175
|
+
confirmation, foreign and tampered sessions, a failing credit, and live-key and
|
|
176
|
+
stand-in refusals; `test/topUps.mysql.test.js` races the webhook and the return
|
|
177
|
+
page over one payment on MariaDB and sees it credited once. SQLite fixtures do not establish PostgreSQL/MySQL
|
|
116
178
|
multi-process locking behavior. Live provider accounts and full generated-app
|
|
117
179
|
acceptance have not been exercised.
|
|
118
180
|
|
|
@@ -133,7 +195,9 @@ existing subscribers; publication does not cancel their subscriptions.
|
|
|
133
195
|
|
|
134
196
|
Configure Stripe deliveries for `invoice.paid`, `invoice.payment_failed`,
|
|
135
197
|
`invoice.payment_action_required`, and the `customer.subscription.*` lifecycle
|
|
136
|
-
used by the application
|
|
198
|
+
used by the application, and, for top-ups, `checkout.session.completed`,
|
|
199
|
+
`checkout.session.async_payment_succeeded`,
|
|
200
|
+
`checkout.session.async_payment_failed` and `checkout.session.expired`. Configure Paddle for `transaction.completed` and
|
|
137
201
|
`subscription.*` lifecycle deliveries. The provider adapter selects relevant
|
|
138
202
|
subscription events only after signature verification; signed standalone
|
|
139
203
|
invoices/transactions are ignored before application customer lookup.
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
},
|
|
28
28
|
"plans": {
|
|
29
29
|
"type": "object",
|
|
30
|
-
"minProperties": 1,
|
|
31
30
|
"maxProperties": 100,
|
|
32
31
|
"propertyNames": {
|
|
33
32
|
"$ref": "#/definitions/id"
|
|
@@ -35,8 +34,33 @@
|
|
|
35
34
|
"additionalProperties": {
|
|
36
35
|
"$ref": "#/definitions/plan"
|
|
37
36
|
}
|
|
37
|
+
},
|
|
38
|
+
"topUps": {
|
|
39
|
+
"$ref": "#/definitions/topUps"
|
|
38
40
|
}
|
|
39
41
|
},
|
|
42
|
+
"anyOf": [
|
|
43
|
+
{
|
|
44
|
+
"type": "object",
|
|
45
|
+
"properties": {
|
|
46
|
+
"plans": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"minProperties": 1
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"type": "object",
|
|
54
|
+
"required": [
|
|
55
|
+
"topUps"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"topUps": {
|
|
59
|
+
"type": "object"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
],
|
|
40
64
|
"definitions": {
|
|
41
65
|
"id": {
|
|
42
66
|
"type": "string",
|
|
@@ -143,6 +167,37 @@
|
|
|
143
167
|
"maximum": 1000000000
|
|
144
168
|
}
|
|
145
169
|
}
|
|
170
|
+
},
|
|
171
|
+
"topUps": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"required": [
|
|
175
|
+
"name",
|
|
176
|
+
"currency",
|
|
177
|
+
"minimumAmount",
|
|
178
|
+
"maximumAmount"
|
|
179
|
+
],
|
|
180
|
+
"properties": {
|
|
181
|
+
"name": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1,
|
|
184
|
+
"maxLength": 200
|
|
185
|
+
},
|
|
186
|
+
"currency": {
|
|
187
|
+
"type": "string",
|
|
188
|
+
"pattern": "^[A-Z]{3}$"
|
|
189
|
+
},
|
|
190
|
+
"minimumAmount": {
|
|
191
|
+
"type": "integer",
|
|
192
|
+
"minimum": 50,
|
|
193
|
+
"maximum": 99999999
|
|
194
|
+
},
|
|
195
|
+
"maximumAmount": {
|
|
196
|
+
"type": "integer",
|
|
197
|
+
"minimum": 50,
|
|
198
|
+
"maximum": 99999999
|
|
199
|
+
}
|
|
200
|
+
}
|
|
146
201
|
}
|
|
147
202
|
}
|
|
148
203
|
}
|