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
|
@@ -1,63 +1,63 @@
|
|
|
1
1
|
import { createRequire as __vibe64CreateRequire } from 'node:module';const require=__vibe64CreateRequire(import.meta.url);
|
|
2
|
-
function
|
|
3
|
-
output:
|
|
4
|
-
let u=
|
|
5
|
-
`)).trim();return{code:
|
|
6
|
-
Number(
|
|
7
|
-
ct"&&!Array.isArray(b)?{execution:b}:{},...typeof s=="boolean"?{retryable:s}:{}}}function C(e="",
|
|
8
|
-
d",
|
|
9
|
-
stderr??(
|
|
10
|
-
import{stripVTControlCharacters as
|
|
2
|
+
function x(e=""){return String(e??"").trim()}function me(e=0){let t=Number(e);return Number.isSafeInteger(t)?t:1}function M({code:e="",error:t="",exitCode:r=0,ok:n=null,
|
|
3
|
+
output:o="",outputEncoding:i="utf8",pid:c=null,signal:a="",stderr:h="",stdout:l="",timedOut:d=!1,execution:b=null,retryable:s=null}={}){
|
|
4
|
+
let u=me(r),w=String(l||""),g=String(h||""),k=String(o||[w,g].filter(Boolean).join(`
|
|
5
|
+
`)).trim();return{code:x(e),error:x(t),exitCode:u,ok:n===null?u===0:n===!0,output:k,pid:Number.isSafeInteger(Number(c))?
|
|
6
|
+
Number(c):null,signal:x(a),stderr:g,stdout:w,...i==="base64"?{outputEncoding:i}:{},timedOut:d===!0,...b&&typeof b=="obje\
|
|
7
|
+
ct"&&!Array.isArray(b)?{execution:b}:{},...typeof s=="boolean"?{retryable:s}:{}}}function C(e="",t="vibe64_command_faile\
|
|
8
|
+
d",r={}){let n=x(e)||"Vibe64 command failed.";return M({...r,code:t,error:n,exitCode:1,ok:!1,output:x(r.output)||n,stderr:r.
|
|
9
|
+
stderr??(r.outputEncoding==="base64"?Buffer.from(n).toString("base64"):n),stdout:r.stdout??""})}import{spawn as pe}from"node:child_process";import{statSync as he}from"node:fs";import we from"node:path";import{StringDecoder as be}from"node:string_decoder";
|
|
10
|
+
import{stripVTControlCharacters as ge}from"node:util";var B=1e8,H=5e3,_e=Object.freeze({SIGABRT:"Aborted",SIGALRM:"Timeo\
|
|
11
11
|
ut or timer",SIGHUP:"Terminal closed",SIGINT:"User interruption with CTRL-C",SIGKILL:"Forced termination",SIGPIPE:"Broke\
|
|
12
12
|
n pipe or socket",SIGQUIT:"User interruption with CTRL-\\",SIGSEGV:"Segmentation fault",SIGTERM:"Termination",SIGUSR1:"A\
|
|
13
|
-
pplication-specific signal",SIGUSR2:"Application-specific signal"}),
|
|
14
|
-
er}","gu"),z=Object.freeze({" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"});function
|
|
15
|
-
|
|
16
|
-
toString(16)}`})}function ke(e){return
|
|
17
|
-
`).map(
|
|
18
|
-
`)}function
|
|
19
|
-
'"','""')}"`:`'${
|
|
20
|
-
return
|
|
21
|
-
${
|
|
22
|
-
${
|
|
23
|
-
${
|
|
24
|
-
timedOut)return`Command timed out after ${e.timeout} milliseconds${
|
|
25
|
-
was larger than ${e.maxBuffer.limit} ${e.maxBuffer.unit}${
|
|
26
|
-
${e.spawnError.code}${
|
|
27
|
-
return e.exitCode!==void 0?`Command failed with exit code ${e.exitCode}`:"Command failed"}function
|
|
28
|
-
ke(
|
|
29
|
-
${
|
|
30
|
-
|
|
31
|
-
i=!0}return
|
|
32
|
-
utf8",timeout:h=0}={}){let l=Number.isSafeInteger(i)&&i>0?i:B,d={all:N(
|
|
33
|
-
e,
|
|
34
|
-
commandLine:
|
|
35
|
-
w=!1,g=null,
|
|
36
|
-
()=>{!w&&s.kill("SIGKILL")&&(u.forcefullyTerminated=!0)},
|
|
37
|
-
{limit:l,stream:m,unit:"characters"},f.destroy()),typeof
|
|
38
|
-
on("data",
|
|
39
|
-
s.stdin.end(
|
|
13
|
+
pplication-specific signal",SIGUSR2:"Application-specific signal"}),Te=/^[\w./-]+$/u,Ee=new RegExp("\\p{Separator}|\\p{Oth\
|
|
14
|
+
er}","gu"),z=Object.freeze({" ":" ","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"});function U(e){return e.replaceAll(
|
|
15
|
+
Ee,t=>{if(z[t]!==void 0)return z[t];let r=t.codePointAt(0);return r<=65535?`\\u${r.toString(16).padStart(4,"0")}`:`\\U${r.
|
|
16
|
+
toString(16)}`})}function ke(e){return ge(e).split(`
|
|
17
|
+
`).map(U).join(`
|
|
18
|
+
`)}function ye(e,t){return[e,...t].map(r=>{let n=U(String(r));return Te.test(n)?n:process.platform==="win32"?`"${n.replaceAll(
|
|
19
|
+
'"','""')}"`:`'${n.replaceAll("'","'\\''")}'`}).join(" ")}function ve(e,t){let r=String(e?.message??e);if(t===process.cwd())
|
|
20
|
+
return r;try{if(!he(t).isDirectory())return`The "cwd" option is not a directory: ${t}.
|
|
21
|
+
${r}`}catch(n){return`The "cwd" option is invalid: ${t}.
|
|
22
|
+
${n.message}
|
|
23
|
+
${r}`}return r}function Se(e){let t=e.forcefullyTerminated?` and was forcefully terminated after ${H} milliseconds`:"";if(e.
|
|
24
|
+
timedOut)return`Command timed out after ${e.timeout} milliseconds${t}`;if(e.maxBuffer)return`Command's ${e.maxBuffer.stream}\
|
|
25
|
+
was larger than ${e.maxBuffer.limit} ${e.maxBuffer.unit}${t}`;if(e.spawnError?.code!==void 0)return`Command failed with\
|
|
26
|
+
${e.spawnError.code}${t}`;if(e.signal){let r=_e[e.signal];return`Command was killed with ${e.signal}${r?` (${r})`:""}`}
|
|
27
|
+
return e.exitCode!==void 0?`Command failed with exit code ${e.exitCode}`:"Command failed"}function Ie(e){let t=e.spawnError?
|
|
28
|
+
ke(ve(e.spawnError,e.cwd)):e.maxBuffer?"maxBuffer exceeded":"";return`${Se(e)}: ${e.commandLine}${t?`
|
|
29
|
+
${t}`:""}`}function N(e,t){let r=new be(e),n=[],o=0,i=!1;return{write(c){if(i)return!1;let a=r.write(c);return o+a.length>
|
|
30
|
+
t?(n.push(a.slice(0,t-o)),o=t,i=!0,!1):(n.push(a),o+=a.length,!0)},text(){if(!i){let c=r.end();c&&n.push(c.slice(0,t-o)),
|
|
31
|
+
i=!0}return n.join("")}}}function F(e,t,{cwd:r="",env:n={},input:o=void 0,maxBuffer:i=B,onOutput:c=null,outputEncoding:a="\
|
|
32
|
+
utf8",timeout:h=0}={}){let l=Number.isSafeInteger(i)&&i>0?i:B,d={all:N(a,l*2),stderr:N(a,l),stdout:N(a,l)},b=o!=null,s=pe(
|
|
33
|
+
e,t,{cwd:r||void 0,detached:process.platform!=="win32",env:n,stdio:[b?"pipe":"ignore","pipe","pipe"],windowsHide:!0}),u={
|
|
34
|
+
commandLine:ye(e,t),cwd:we.resolve(r||"."),forcefullyTerminated:!1,maxBuffer:null,spawnError:null,timedOut:!1,timeout:h},
|
|
35
|
+
w=!1,g=null,k=()=>{};s.on("error",m=>{u.spawnError||=m,s.pid===void 0&&k()});let S=()=>{w||!s.kill("SIGTERM")||g||(g=setTimeout(
|
|
36
|
+
()=>{!w&&s.kill("SIGKILL")&&(u.forcefullyTerminated=!0)},H))},P=(m,f)=>_=>{if(d.all.write(_),d[m].write(_)||(u.maxBuffer||=
|
|
37
|
+
{limit:l,stream:m,unit:"characters"},f.destroy()),typeof c=="function")try{c(String(_||""))}catch{}};s.stdout&&s.stdout.
|
|
38
|
+
on("data",P("stdout",s.stdout)),s.stderr&&s.stderr.on("data",P("stderr",s.stderr)),b&&s.stdin&&(s.stdin.on("error",()=>{}),
|
|
39
|
+
s.stdin.end(o));let v=h>0?setTimeout(()=>{u.timedOut=!0,S()},h):null;return{completion:new Promise(m=>{k=(f,_)=>{if(w)return;
|
|
40
40
|
w=!0,clearTimeout(v),clearTimeout(g);let T=u.spawnError?{}:{exitCode:typeof f=="number"&&f>=0?f:void 0,signal:_||void 0},
|
|
41
41
|
$=u.spawnError||u.timedOut||u.maxBuffer||T.exitCode!==0;m({all:d.all.text(),code:u.spawnError?.code,exitCode:T.exitCode,
|
|
42
|
-
shortMessage:$?
|
|
43
|
-
once("close",
|
|
44
|
-
|
|
45
|
-
values()].find(
|
|
46
|
-
!0}catch(
|
|
47
|
-
n32"?[...
|
|
48
|
-
CH")return!1;throw
|
|
49
|
-
|
|
50
|
-
let i=await
|
|
51
|
-
|
|
52
|
-
now()+Math.max(0,Number(
|
|
53
|
-
let{killTimeoutMs:
|
|
54
|
-
|
|
55
|
-
outputEncoding:l="utf8",signal:d=null,timeout:b=15e3}=
|
|
56
|
-
if(d?.aborted)return C("Command cancelled.","vibe64_command_cancelled",{execution:i});try{let p=F(e,
|
|
57
|
-
maxBuffer:
|
|
42
|
+
shortMessage:$?Ie({...u,...T}):"",signal:T.signal,stderr:d.stderr.text(),stdout:d.stdout.text(),timedOut:u.timedOut})},s.
|
|
43
|
+
once("close",k)}),kill:m=>s.kill(m),pid:s.pid}}import{mkdir as _t,open as Tt,readdir as xe,readFile as Ce}from"node:fs/promises";import{fileURLToPath as Re}from"node:url";var Pe=new URL("./engines/detached.js",import.meta.url).href,V=new Map,Oe=3e3,Ae=1e3,yt=Re(new URL("./detachedReaper.js",
|
|
44
|
+
Pe));function L(e=null){let t=Number(e);if(!Number.isSafeInteger(t)||t<=0)return!1;if(process.platform==="win32"){let r=[...V.
|
|
45
|
+
values()].find(n=>n.pid===t);return r?.child?.exitCode===null&&r?.child?.signalCode===null}try{return process.kill(-t,0),
|
|
46
|
+
!0}catch(r){return r?.code==="EPERM"}}function K(e=null,t="SIGTERM"){if(!L(e))return!1;try{return process.platform==="wi\
|
|
47
|
+
n32"?[...V.values()].find(n=>n.pid===Number(e))?.child?.kill(t):process.kill(-Number(e),t),!0}catch(r){if(r?.code==="ESR\
|
|
48
|
+
CH")return!1;throw r}}async function Y(e=null,t=10){let r=Number(e);if(process.platform!=="linux"||!Number.isSafeInteger(
|
|
49
|
+
r)||r<=0)return[];let n=[];for(let o of await xe("/proc").catch(()=>[])){if(n.length>=t)break;if(!/^\d+$/u.test(o))continue;
|
|
50
|
+
let i=await Ce(`/proc/${o}/stat`,"utf8").catch(()=>""),c=i.lastIndexOf(")"),a=c<0?[]:i.slice(c+2).split(" ");Number(a[2])!==
|
|
51
|
+
r||a[0]==="Z"||n.push({command:i.slice(i.indexOf("(")+1,c),pid:Number(o)})}return n}async function j(e=null,t=0){let r=Date.
|
|
52
|
+
now()+Math.max(0,Number(t)||0);for(;L(e)&&Date.now()<r;)await new Promise(n=>setTimeout(n,25));return!L(e)}async function J(e=null,t={}){
|
|
53
|
+
let{killTimeoutMs:r=Ae,termTimeoutMs:n=Oe}=t;K(e,"SIGTERM");let o=await j(e,n);return o||(K(e,"SIGKILL"),o=await j(e,r)),
|
|
54
|
+
o}var W=new Map;async function X(e="",t=[],r={}){let{cwd:n="",env:o={},execution:i=null,input:c=void 0,maxBuffer:a=void 0,onOutput:h=null,
|
|
55
|
+
outputEncoding:l="utf8",signal:d=null,timeout:b=15e3}=r,s,u,w,g=null,k=Promise.withResolvers(),S=()=>{w||=u(),w.then(k.resolve)};
|
|
56
|
+
if(d?.aborted)return C("Command cancelled.","vibe64_command_cancelled",{execution:i});try{let p=F(e,t,{cwd:n,env:o,input:c,
|
|
57
|
+
maxBuffer:a,onOutput:h,outputEncoding:l,timeout:b});g=Number(p.pid);let m;u=()=>{if(!m){let T;process.platform!=="win32"?
|
|
58
58
|
T=J(g).catch(()=>!1):(p.kill("SIGKILL"),T=p.completion.then(()=>!0)),m=T.then($=>($||(m=null),$))}return m},i?.id&&W.set(
|
|
59
|
-
i.id,u),d?.addEventListener("abort",S,{once:!0}),d?.aborted&&S();let f=await Promise.race([p.completion,
|
|
60
|
-
p.completion:{exitCode:1})]),_=typeof f.exitCode=="number"?f.exitCode:1;s=
|
|
59
|
+
i.id,u),d?.addEventListener("abort",S,{once:!0}),d?.aborted&&S();let f=await Promise.race([p.completion,k.promise.then(T=>T?
|
|
60
|
+
p.completion:{exitCode:1})]),_=typeof f.exitCode=="number"?f.exitCode:1;s=M({code:f.timedOut===!0?"vibe64_command_captur\
|
|
61
61
|
e_timed_out":f.code?"vibe64_command_capture_failed":"",error:_===0?"":f.shortMessage,exitCode:_,output:f.all||(_===0?"":
|
|
62
62
|
f.shortMessage),outputEncoding:l,signal:f.signal,stderr:f.stderr,stdout:f.stdout,timedOut:f.timedOut===!0,execution:i})}catch(p){
|
|
63
63
|
s=C(p.message,"vibe64_command_capture_failed",{execution:i,outputEncoding:l})}finally{d?.removeEventListener("abort",S)}
|
|
@@ -66,86 +66,94 @@ The command finished",f=p.length?`: ${p.map(_=>`${_.command} (pid ${_.pid})`).jo
|
|
|
66
66
|
`${m}, and its execution scope did not become empty${f}.`,"vibe64_execution_drain_failed",{execution:i,output:s?.output,
|
|
67
67
|
outputEncoding:l,signal:s?.signal,stderr:s?.stderr,stdout:s?.stdout,timedOut:s?.timedOut}),remainingProcesses:p}}i?.id&&
|
|
68
68
|
W.delete(i.id);let v=i&&{...i,state:"finished"};return d?.aborted?C("Command cancelled.","vibe64_command_cancelled",{...s,
|
|
69
|
-
execution:v,outputEncoding:l}):v?{...s,execution:v}:s}import{createHash as
|
|
70
|
-
import y from"node:path";import{fileURLToPath as
|
|
71
|
-
"vibe64.hostProfile"),A=Symbol.for("vibe64.hostProfile.previousUmask"),De=["runtimePackRoot","sharedCacheRoot","
|
|
72
|
-
|
|
73
|
-
function q(e){
|
|
74
|
-
function ee(e
|
|
75
|
-
throw new TypeError(`
|
|
76
|
-
"
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
69
|
+
execution:v,outputEncoding:l}):v?{...s,execution:v}:s}import{createHash as Be}from"node:crypto";import{lstat as oe,mkdir as ze,mkdtemp as He,readdir as Ue,rm as ie,statfs as Fe}from"node:fs/promises";
|
|
70
|
+
import y from"node:path";import{fileURLToPath as Ke}from"node:url";import $e from"node:path";import Z from"node:process";import{isMainThread as Me}from"node:worker_threads";var Q=Symbol.for(
|
|
71
|
+
"vibe64.hostProfile"),A=Symbol.for("vibe64.hostProfile.previousUmask"),De=["runtimePackRoot","sharedCacheRoot","execHelp\
|
|
72
|
+
erPath"],G=Object.freeze({runtimePackRoot:"",sharedCacheRoot:"",loginEnvironment:null,execHelperPath:"",sharedGroupAccess:!1});
|
|
73
|
+
function q(e){Me&&(e&&!(A in globalThis)?globalThis[A]=Z.umask(7):!e&&A in globalThis&&(Z.umask(globalThis[A]),delete globalThis[A]))}
|
|
74
|
+
var Ne=/^(?:\/(?:%u|[A-Za-z0-9._-])+)+$/u;function ee(e,t){if(typeof e!="string"||!Ne.test(e)||e.split("/").includes("..")||
|
|
75
|
+
e.replaceAll("%u","").includes("%"))throw new TypeError(`Host profile loginEnvironment ${t} must be an absolute path, "%\
|
|
76
|
+
u" standing for the login.`);return e}function Le(e){if(e===null)return null;let{env:t,path:r}=e||{};if(typeof e!="objec\
|
|
77
|
+
t"||Object.keys(e).some(i=>i!=="env"&&i!=="path")||!t||typeof t!="object"||Array.isArray(t)||!Array.isArray(r))throw new TypeError(
|
|
78
|
+
"Host profile loginEnvironment must be null or { env, path }.");let n=Object.keys(t),o=n.find(i=>!/^[A-Z][A-Z0-9_]*$/u.test(
|
|
79
|
+
i)||["HOME","LOGNAME","PATH","TMPDIR","USER","XDG_RUNTIME_DIR"].includes(i));if(o!==void 0)throw new TypeError(`Host pro\
|
|
80
|
+
file loginEnvironment cannot set ${o}.`);return Object.freeze({env:Object.freeze(Object.fromEntries(n.map(i=>[i,ee(t[i],
|
|
81
|
+
i)]))),path:Object.freeze(r.map(i=>ee(i,"path")))})}function te(e=null){if(e===null)return delete globalThis[Q],q(!1),G;
|
|
82
|
+
let t=Object.keys(e).filter(o=>!(o in G));if(t.length)throw new TypeError(`Unknown host profile setting: ${t.join(", ")}\
|
|
83
|
+
.`);let r={...G,...e};for(let o of De)if(typeof r[o]!="string"||r[o]&&!$e.isAbsolute(r[o]))throw new TypeError(`Host pro\
|
|
84
|
+
file ${o} must be an absolute path or empty.`);if(typeof r.sharedGroupAccess!="boolean")throw new TypeError("Host profil\
|
|
85
|
+
e sharedGroupAccess must be true or false.");r.loginEnvironment=Le(r.loginEnvironment);let n=Object.freeze(r);return globalThis[Q]=
|
|
86
|
+
n,q(n.sharedGroupAccess),n}var Ge=new URL("./gitTurnCheckpoint.js",import.meta.url).href,je=3e4;var Bt=Ke(new URL("./gitTurnCheckpointCommand.js",Ge)),Ve=15*6e4,Ye=512*1024*1024,Je=1024*1024*1024,se=new Set(["cancell\
|
|
87
|
+
ed","completed","failed","interrupted"]),D=new Map;async function ce({outerTurnId:e="",outcome:t="completed",project:r={},
|
|
88
|
+
runCommand:n,sessionId:o="",temporaryDiskBudgetBytes:i,temporaryDiskReserveBytes:c,timestamp:a="",worktreePath:h=""}={}){
|
|
89
|
+
let l=rt({outerTurnId:e,outcome:t,sessionId:o,timestamp:a,worktreePath:h}),d=nt(l);return Qe(l.worktreePath,()=>We({identity:l,
|
|
90
|
+
project:r,refs:d,runCommand:n,temporaryDiskBudgetBytes:i,temporaryDiskReserveBytes:c}))}async function We({identity:e={},project:t={},refs:r={},runCommand:n,temporaryDiskBudgetBytes:o,temporaryDiskReserveBytes:i}={}){
|
|
91
|
+
let c=await O(n,e.worktreePath,["rev-parse","--verify",r.turnRef],{project:t});if(c)return ne({commit:c,identity:e,project:t,
|
|
92
|
+
refs:r,runCommand:n});let a=await E(n,e.worktreePath,["rev-parse","--verify","HEAD"],{project:t}),h=await Xe({baseCommit:a,
|
|
93
|
+
project:t,runCommand:n,temporaryDiskBudgetBytes:o,temporaryDiskReserveBytes:i,worktreePath:e.worktreePath}),l=await de(n,
|
|
94
|
+
e.worktreePath,{project:t});for(let d=0;;d+=1){let b=await O(n,e.worktreePath,["rev-parse","--verify",r.latestRef],{project:t}),
|
|
95
|
+
s=b||a,u=await E(n,e.worktreePath,["commit-tree",h,"-p",s],{env:it(e.timestamp),input:le(e),project:t});try{await E(n,e.
|
|
88
96
|
worktreePath,["update-ref","--stdin"],{input:`start
|
|
89
|
-
create ${
|
|
90
|
-
update ${
|
|
97
|
+
create ${r.turnRef} ${u}
|
|
98
|
+
update ${r.latestRef} ${u} ${b||l}
|
|
91
99
|
prepare
|
|
92
100
|
commit
|
|
93
|
-
`,project:
|
|
94
|
-
identity:e,project:
|
|
95
|
-
if(d>=2||
|
|
96
|
-
outcome:e.outcome,sessionId:e.sessionId,tree:h,turnRef:
|
|
97
|
-
worktreePath:
|
|
98
|
-
l=y.join(h,"vibe64-checkpoints");await
|
|
99
|
-
ndex");try{let s={GIT_INDEX_FILE:b};await
|
|
100
|
-
w=>String(w||"")).filter(Boolean):[];return await
|
|
101
|
-
temporaryDiskReserveBytes:i,worktreePath:
|
|
102
|
-
1"},project:
|
|
103
|
-
let
|
|
104
|
-
e-")).map(async
|
|
105
|
-
recursive:!0})}))}function
|
|
106
|
-
|
|
107
|
-
paths:
|
|
108
|
-
length>0?
|
|
109
|
-
iles","--others","--exclude-standard","-z","--",...
|
|
110
|
-
let m=y.resolve(
|
|
101
|
+
`,project:t})}catch(w){let g=await O(n,e.worktreePath,["rev-parse","--verify",r.turnRef],{project:t});if(g)return ne({commit:g,
|
|
102
|
+
identity:e,project:t,refs:r,runCommand:n});let k=await O(n,e.worktreePath,["rev-parse","--verify",r.latestRef],{project:t});
|
|
103
|
+
if(d>=2||k===b)throw w;continue}return{baseCommit:s,commit:u,created:!0,latestRef:r.latestRef,ok:!0,outerTurnId:e.outerTurnId,
|
|
104
|
+
outcome:e.outcome,sessionId:e.sessionId,tree:h,turnRef:r.turnRef}}}async function Xe({baseCommit:e="HEAD",paths:t=[],project:r={},runCommand:n,temporaryDiskBudgetBytes:o,temporaryDiskReserveBytes:i,
|
|
105
|
+
worktreePath:c=""}={}){let a=y.resolve(R(c,"worktreePath")),h=await E(n,a,["rev-parse","--absolute-git-dir"],{project:r}),
|
|
106
|
+
l=y.join(h,"vibe64-checkpoints");await ze(l,{recursive:!0}),await Ze(l);let d=await He(y.join(l,".tree-")),b=y.join(d,"i\
|
|
107
|
+
ndex");try{let s={GIT_INDEX_FILE:b};await E(n,a,["read-tree",e||"HEAD"],{env:s,project:r});let u=Array.isArray(t)?t.map(
|
|
108
|
+
w=>String(w||"")).filter(Boolean):[];return await qe({gitDirectory:h,paths:u,project:r,runCommand:n,temporaryDiskBudgetBytes:o,
|
|
109
|
+
temporaryDiskReserveBytes:i,worktreePath:a}),await E(n,a,["add","-A","--",...u.length>0?u:["."]],{env:{...s,GIT_LITERAL_PATHSPECS:"\
|
|
110
|
+
1"},project:r}),await E(n,a,["write-tree"],{env:s,project:r})}finally{await ie(d,{force:!0,recursive:!0})}}async function Ze(e=""){
|
|
111
|
+
let t=Date.now(),r=await Ue(e,{withFileTypes:!0});await Promise.all(r.filter(n=>n.isDirectory()&&n.name.startsWith(".tre\
|
|
112
|
+
e-")).map(async n=>{let o=y.join(e,n.name),i=await oe(o).catch(()=>null);i?.isDirectory()&&t-i.mtimeMs>Ve&&await ie(o,{force:!0,
|
|
113
|
+
recursive:!0})}))}function Qe(e="",t=async()=>null){let r=y.resolve(e),o=(D.get(r)||Promise.resolve()).catch(()=>null).then(
|
|
114
|
+
t),i=o.then(()=>null,()=>null).finally(()=>{D.get(r)===i&&D.delete(r)});return D.set(r,i),o}async function qe({gitDirectory:e="",
|
|
115
|
+
paths:t=[],project:r={},runCommand:n,temporaryDiskBudgetBytes:o,temporaryDiskReserveBytes:i,worktreePath:c=""}={}){let a=t.
|
|
116
|
+
length>0?t:["."],[h,l,d]=await Promise.all([E(n,c,["diff","--name-only","-z","HEAD","--",...a],{project:r}),E(n,c,["ls-f\
|
|
117
|
+
iles","--others","--exclude-standard","-z","--",...a],{project:r}),Fe(e)]),b=[...new Set([...re(h),...re(l)])],s=[];for(let p of b){
|
|
118
|
+
let m=y.resolve(c,p),f=y.relative(c,m);if(f===".."||f.startsWith(`..${y.sep}`)||y.isAbsolute(f))throw I("Git returned a \
|
|
111
119
|
checkpoint candidate outside the session source.","vibe64_checkpoint_candidate_invalid");let _=await oe(m).catch(T=>T?.code===
|
|
112
120
|
"ENOENT"?null:Promise.reject(T));_?.isFile()&&s.push({bytes:Number(_.size||0),path:f})}let u=s.reduce((p,m)=>p+m.bytes,0),
|
|
113
|
-
w=Math.min(Number.MAX_SAFE_INTEGER,u*2),g=
|
|
114
|
-
max(0,S-
|
|
115
|
-
(${p.bytes} bytes)`).join(", ");throw
|
|
116
|
-
t ${w} temporary bytes; the safe budget is ${
|
|
121
|
+
w=Math.min(Number.MAX_SAFE_INTEGER,u*2),g=et(o),k=tt(i),S=Math.max(0,Number(d.bavail)*Number(d.bsize)),P=Math.min(g,Math.
|
|
122
|
+
max(0,S-k));if(w<=P)return;let v=s.sort((p,m)=>m.bytes-p.bytes||p.path.localeCompare(m.path)).slice(0,5).map(p=>`${p.path}\
|
|
123
|
+
(${p.bytes} bytes)`).join(", ");throw I([`Vibe64 refused this checkpoint because changed, unignored files may need abou\
|
|
124
|
+
t ${w} temporary bytes; the safe budget is ${P} bytes.`,v?`Largest candidates: ${v}.`:"","Keep needed files in place and\
|
|
117
125
|
add generated or local-only artifacts to .gitignore, or ask an operator to review the checkpoint disk budget."].filter(
|
|
118
|
-
Boolean).join(" "),"vibe64_checkpoint_disk_budget_exceeded")}function
|
|
119
|
-
function
|
|
120
|
-
env.VIBE64_CHECKPOINT_DISK_RESERVE_BYTES,
|
|
121
|
-
|
|
122
|
-
let i=await
|
|
123
|
-
if(!
|
|
124
|
-
smatch");let
|
|
125
|
-
e","--verify",
|
|
126
|
-
ref",
|
|
127
|
-
created:!1,latestRef:
|
|
128
|
-
function
|
|
129
|
-
ome").toLowerCase();if(!
|
|
130
|
-
int_outcome_invalid");let
|
|
131
|
-
p must be an ISO date.","vibe64_checkpoint_timestamp_invalid");let
|
|
132
|
-
e,"outerTurnId"),outcome:i,sessionId:R(
|
|
133
|
-
let
|
|
134
|
-
efs/vibe64/checkpoints/${
|
|
126
|
+
Boolean).join(" "),"vibe64_checkpoint_disk_budget_exceeded")}function re(e=""){return String(e||"").split("\0").filter(Boolean)}
|
|
127
|
+
function et(e){return ae(e,process.env.VIBE64_CHECKPOINT_TEMPORARY_DISK_BUDGET_BYTES,Ye,1)}function tt(e){return ae(e,process.
|
|
128
|
+
env.VIBE64_CHECKPOINT_DISK_RESERVE_BYTES,Je,0)}function ae(e,t,r,n){let o=e==null||e===""?t:e,i=Number(o===void 0||o===""?
|
|
129
|
+
r:o);return Number.isSafeInteger(i)&&i>=n?i:r}async function ne({commit:e="",identity:t={},project:r={},refs:n={},runCommand:o}={}){
|
|
130
|
+
let i=await E(o,t.worktreePath,["show","-s","--format=%B",e],{project:r}),c=[...se].find(l=>i===le({...t,outcome:l}).trim());
|
|
131
|
+
if(!c)throw I("Existing Vibe64 turn checkpoint does not match its durable turn identity.","vibe64_checkpoint_identity_mi\
|
|
132
|
+
smatch");let a=await E(o,t.worktreePath,["rev-parse",`${e}^{tree}`],{project:r});if(!await O(o,t.worktreePath,["rev-pars\
|
|
133
|
+
e","--verify",n.latestRef],{project:r})){let l=await de(o,t.worktreePath,{project:r});await E(o,t.worktreePath,["update-\
|
|
134
|
+
ref",n.latestRef,e,l],{project:r})}return{baseCommit:await E(o,t.worktreePath,["rev-parse",`${e}^`],{project:r}),commit:e,
|
|
135
|
+
created:!1,latestRef:n.latestRef,ok:!0,outerTurnId:t.outerTurnId,outcome:c,sessionId:t.sessionId,tree:a,turnRef:n.turnRef}}
|
|
136
|
+
function rt({outerTurnId:e="",outcome:t="completed",sessionId:r="",timestamp:n="",worktreePath:o=""}={}){let i=R(t,"outc\
|
|
137
|
+
ome").toLowerCase();if(!se.has(i))throw I(`Unsupported Vibe64 turn checkpoint outcome: ${i||"(empty)"}.`,"vibe64_checkpo\
|
|
138
|
+
int_outcome_invalid");let c=R(n,"timestamp");if(!Number.isFinite(Date.parse(c)))throw I("Vibe64 turn checkpoint timestam\
|
|
139
|
+
p must be an ISO date.","vibe64_checkpoint_timestamp_invalid");let a=y.resolve(R(o,"worktreePath"));return{outerTurnId:R(
|
|
140
|
+
e,"outerTurnId"),outcome:i,sessionId:R(r,"sessionId"),timestamp:new Date(c).toISOString(),worktreePath:a}}function nt(e={}){
|
|
141
|
+
let t=ot(e.sessionId),r=ue(e.outerTurnId);return{latestRef:`${t}/latest`,turnRef:`${t}/${r}`}}function ot(e=""){return`r\
|
|
142
|
+
efs/vibe64/checkpoints/${ue(e)}`}function ue(e=""){return Be("sha256").update(String(e)).digest("hex").slice(0,32)}function le(e={}){
|
|
135
143
|
return[`vibe64 checkpoint: session ${e.sessionId} turn ${e.outerTurnId}`,"","Vibe64-Checkpoint: true",`Vibe64-Session: ${e.
|
|
136
144
|
sessionId}`,`Vibe64-Outer-Turn: ${e.outerTurnId}`,`Vibe64-Turn-Outcome: ${e.outcome}`,""].join(`
|
|
137
|
-
`)}function
|
|
138
|
-
e,
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
"vibe64_checkpoint_git_failed");return String(
|
|
142
|
-
return e({actor:"daemon",allowedRoots:[
|
|
143
|
-
mode:"capture",project:
|
|
144
|
-
|
|
145
|
-
kpoint ${
|
|
146
|
-
vibe64_checkpoint_failed"){let
|
|
147
|
-
timeout})}async function
|
|
148
|
-
"Checkpoint input is too large.");return JSON.parse(e||"{}")}try{let e=await
|
|
149
|
-
typeof e.input=="object"?e.input:{},
|
|
145
|
+
`)}function it(e=""){return{GIT_AUTHOR_DATE:e,GIT_COMMITTER_DATE:e}}async function de(e,t,r={}){let{project:n={}}=r,o=await O(
|
|
146
|
+
e,t,["rev-parse","--show-object-format"],{project:n});return"0".repeat(o==="sha256"?64:40)}async function O(e,t,r,n={}){
|
|
147
|
+
let o=await fe(e,t,r,n);return o.ok===!0?String(o.stdout||"").trim():""}async function E(e,t,r,n={}){let o=await fe(e,t,
|
|
148
|
+
r,n);if(o.ok!==!0)throw I(String(o.stderr||o.stdout||o.output||o.error||"Git checkpoint command failed.").trim(),o.code||
|
|
149
|
+
"vibe64_checkpoint_git_failed");return String(o.stdout||"").trim()}function fe(e,t,r,n={}){let{env:o={},input:i,project:c={}}=n;
|
|
150
|
+
return e({actor:"daemon",allowedRoots:[t],args:r,command:"git",cwd:t,env:o,envPolicy:"session",gitSafeDirectories:[t],input:i,
|
|
151
|
+
mode:"capture",project:c,purpose:"source",runtimes:["git"],timeout:je})}function R(e="",t="value"){let r=String(e||"").trim(),
|
|
152
|
+
n=Array.from(r).some(o=>{let i=o.codePointAt(0);return i<=31||i===127});if(!r||r.length>512||n)throw I(`Vibe64 turn chec\
|
|
153
|
+
kpoint ${t} is invalid.`,`vibe64_checkpoint_${t.replaceAll(/[^A-Za-z0-9]+/gu,"_").toLowerCase()}_invalid`);return r}function I(e="",t="\
|
|
154
|
+
vibe64_checkpoint_failed"){let r=new Error(e||"Vibe64 turn checkpoint failed.");return r.code=t,r}var st=64*1024;function ct(e={}){return X(e.command,e.args,{cwd:e.cwd,env:{...process.env,...e.env||{}},input:e.input,timeout:e.
|
|
155
|
+
timeout})}async function at(){let e="";for await(let t of process.stdin)if(e+=String(t||""),Buffer.byteLength(e)>st)throw new Error(
|
|
156
|
+
"Checkpoint input is too large.");return JSON.parse(e||"{}")}try{let e=await at();te(e?.hostProfile||null);let t=e?.input&&
|
|
157
|
+
typeof e.input=="object"?e.input:{},r=await ce({...t,runCommand:ct});process.stdout.write(JSON.stringify({ok:!0,value:r}))}catch(e){
|
|
150
158
|
process.stdout.write(JSON.stringify({error:{code:String(e?.code||"vibe64_checkpoint_failed"),message:String(e?.message||
|
|
151
159
|
"Vibe64 turn checkpoint failed.")},ok:!1})),process.exitCode=1}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
import { createRequire as __vibe64CreateRequire } from 'node:module';const require=__vibe64CreateRequire(import.meta.url);
|
|
2
|
-
import
|
|
3
|
-
"vibe64.hostProfile"),
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
function
|
|
7
|
-
throw new TypeError(`
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import p from"node:path";import f from"node:process";import{isMainThread as b}from"node:worker_threads";var c=Symbol.for(
|
|
3
|
+
"vibe64.hostProfile"),s=Symbol.for("vibe64.hostProfile.previousUmask"),m=["runtimePackRoot","sharedCacheRoot","execHelpe\
|
|
4
|
+
rPath"],l=Object.freeze({runtimePackRoot:"",sharedCacheRoot:"",loginEnvironment:null,execHelperPath:"",sharedGroupAccess:!1});
|
|
5
|
+
function a(e){b&&(e&&!(s in globalThis)?globalThis[s]=f.umask(7):!e&&s in globalThis&&(f.umask(globalThis[s]),delete globalThis[s]))}
|
|
6
|
+
var g=/^(?:\/(?:%u|[A-Za-z0-9._-])+)+$/u;function u(e,r){if(typeof e!="string"||!g.test(e)||e.split("/").includes("..")||
|
|
7
|
+
e.replaceAll("%u","").includes("%"))throw new TypeError(`Host profile loginEnvironment ${r} must be an absolute path, "%\
|
|
8
|
+
u" standing for the login.`);return e}function d(e){if(e===null)return null;let{env:r,path:t}=e||{};if(typeof e!="object"||
|
|
9
|
+
Object.keys(e).some(o=>o!=="env"&&o!=="path")||!r||typeof r!="object"||Array.isArray(r)||!Array.isArray(t))throw new TypeError(
|
|
10
|
+
"Host profile loginEnvironment must be null or { env, path }.");let i=Object.keys(r),n=i.find(o=>!/^[A-Z][A-Z0-9_]*$/u.test(
|
|
11
|
+
o)||["HOME","LOGNAME","PATH","TMPDIR","USER","XDG_RUNTIME_DIR"].includes(o));if(n!==void 0)throw new TypeError(`Host pro\
|
|
12
|
+
file loginEnvironment cannot set ${n}.`);return Object.freeze({env:Object.freeze(Object.fromEntries(i.map(o=>[o,u(r[o],o)]))),
|
|
13
|
+
path:Object.freeze(t.map(o=>u(o,"path")))})}function A(e=null){if(e===null)return delete globalThis[c],a(!1),l;let r=Object.
|
|
14
|
+
keys(e).filter(n=>!(n in l));if(r.length)throw new TypeError(`Unknown host profile setting: ${r.join(", ")}.`);let t={...l,
|
|
15
|
+
...e};for(let n of m)if(typeof t[n]!="string"||t[n]&&!p.isAbsolute(t[n]))throw new TypeError(`Host profile ${n} must be \
|
|
16
|
+
an absolute path or empty.`);if(typeof t.sharedGroupAccess!="boolean")throw new TypeError("Host profile sharedGroupAcces\
|
|
17
|
+
s must be true or false.");t.loginEnvironment=d(t.loginEnvironment);let i=Object.freeze(t);return globalThis[c]=i,a(i.sharedGroupAccess),
|
|
18
|
+
i}function h(){return globalThis[c]||l}function O(){return h().sharedGroupAccess?{inheritingDirectory:1528,directory:504,
|
|
19
|
+
file:432}:{inheritingDirectory:448,directory:448,file:384}}function H(){return h().sharedGroupAccess?"0007":""}export{A as configureVibe64Host,h as vibe64Host,H as vibe64ProcessUmask,O as vibe64SharedModes};
|
|
@@ -18,6 +18,18 @@ its `package.json` declares; only Genesis's own source repository serves its
|
|
|
18
18
|
own skills), and preservation of customizations. Callers
|
|
19
19
|
own source-write exclusion and the assistant's context refresh lifecycle.
|
|
20
20
|
|
|
21
|
+
## Resources a Development run needs
|
|
22
|
+
|
|
23
|
+
`./shared/resourceKinds` owns which declared Stack resources development needs
|
|
24
|
+
before the application runs: every kind but a `bucket`, without whose settings
|
|
25
|
+
the application uses its own default storage (`resourceRequiredInDevelopment`;
|
|
26
|
+
`resourceKindIsPersonSupplied` says a bucket is always the person's own). The
|
|
27
|
+
project's Env reads it through `@local/vibe64-project/server/resourceEnvironment`.
|
|
28
|
+
Genesis counts every declared resource as required, so the Outputs inspection
|
|
29
|
+
drops Genesis's `STACK_RESOURCE_MISSING` for a resource development does without,
|
|
30
|
+
by its id among the Stack's resources; every other diagnostic still disables the
|
|
31
|
+
targets.
|
|
32
|
+
|
|
21
33
|
## Resource estimates
|
|
22
34
|
|
|
23
35
|
`inspectVibe64ResourceEstimates()` reads the optional project-owned
|
|
@@ -38,6 +50,19 @@ only estimates does not change the preparation recipe identity. Mixed Stack
|
|
|
38
50
|
identities throw `VIBE64_STACK_CHANGED` so callers re-inspect instead of using
|
|
39
51
|
hints for a different source snapshot. Inspection never rewrites project source.
|
|
40
52
|
|
|
53
|
+
## Staging data
|
|
54
|
+
|
|
55
|
+
`inspectVibe64StagingData()` reads the optional project-owned `Staging data`
|
|
56
|
+
section as `vibe64.staging-data.v1`: the database resource of `## Resources`
|
|
57
|
+
it is for (a `mysql` or `postgresql` one, whose kind the result names as
|
|
58
|
+
`engine`), its mode (an own copy, empty, full or sampled, or production's
|
|
59
|
+
database, shared or with its structure frozen), the application's command that
|
|
60
|
+
writes production's dump to `{dump}`, and a sampled copy's table rules, links,
|
|
61
|
+
keep-together entries and contact columns. An absent section is `unconfigured`,
|
|
62
|
+
mode `empty`; a refusal throws `VIBE64_STAGING_DATA_INVALID` at its line. The
|
|
63
|
+
grammar is `vibe64 spec staging-data`; the Program page is
|
|
64
|
+
`genesis/program/projects/staging-data.md`.
|
|
65
|
+
|
|
41
66
|
## Agent specs
|
|
42
67
|
|
|
43
68
|
`./server/agentSpecs` holds the agent-readable spec of every Vibe64 Stack
|
|
@@ -408,12 +408,12 @@ f.commandHash),platform:b(f.platform),runtimeToken:b(f.runtimeToken),startTimeTi
|
|
|
408
408
|
version||0)}}function L(l={}){let f=z(l);return!!(f.version===c&&Object.values(d).includes(f.platform)&&/^[a-f0-9]{12}$/u.
|
|
409
409
|
test(f.commandHash)&&/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/iu.test(f.runtimeToken)&&/^\d+$/u.
|
|
410
410
|
test(f.startTimeTicks))}function q(l=[],f=""){let h=l.find(g=>g.startsWith(`${f}=`));return h?h.slice(f.length+1):""}async function H(l){
|
|
411
|
-
let f=await Cr(`/proc/${l}/stat`,"utf8")
|
|
412
|
-
|
|
413
|
-
[];return{...h,commandHash:q(S,
|
|
414
|
-
|
|
415
|
-
l.length;h+=Eo)for(let g of await Promise.all(l.slice(h,h+Eo).map(H)))g&&f.push(g);return f}
|
|
416
|
-
|
|
411
|
+
let f;try{f=await Cr(`/proc/${l}/stat`,"utf8")}catch(C){if(["EACCES","ENOENT","EPERM","ESRCH"].includes(String(C?.code||
|
|
412
|
+
"")))return null;throw C}let h=N(f);if(!h||h.state==="Z")return null;let g=null,I=!0;try{g=await Cr(`/proc/${l}/environ`)}catch(C){
|
|
413
|
+
if(String(C?.code||"")==="ENOENT")return null;I=!1}let S=I?g.toString("utf8").split("\0"):[];return{...h,commandHash:q(S,
|
|
414
|
+
e),environmentReadable:I,pid:Number(l),runtimeToken:q(S,t)}}async function R(){let l=(await oc("/proc")).filter(h=>/^\d+$/u.
|
|
415
|
+
test(h)),f=[];for(let h=0;h<l.length;h+=Eo)for(let g of await Promise.all(l.slice(h,h+Eo).map(H)))g&&f.push(g);return f}
|
|
416
|
+
let P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(l=""){let f=/^\w{3}\s+(\w{3})\s+(\d{1,2})\s+(\d{2}):(\d{2}):(\d{2})\s+(\d{4})$/u.
|
|
417
417
|
exec(String(l).trim()),h=f?P.indexOf(f[1]):-1;if(h<0)return"";let[,,g,I,S,C,k]=f.map(Number);return String(Date.UTC(k,h,
|
|
418
418
|
g,I,S,C)/1e3)}function M(l=""){let f=new Map;for(let h of String(l).split(`
|
|
419
419
|
`)){let g=/^\s*(\d+) (.*)$/u.exec(h);g&&f.set(Number(g[1]),g[2])}return f}function W(l,f){if(l===void 0||!f?.startsWith(
|
|
@@ -426,39 +426,39 @@ pid:se,processGroupId:Number(E[2]),runtimeToken:q(pe||[],t),startTimeTicks:A(E[5
|
|
|
426
426
|
values(p).includes(l?.status)?l.status:p.AMBIGUOUS;return{processGroupIds:[...new Set((Array.isArray(l?.processGroupIds)?
|
|
427
427
|
l.processGroupIds:[]).map(Number).filter(h=>Number.isSafeInteger(h)&&h>0))],status:f}}async function yr(l={}){if(!v(l))return{
|
|
428
428
|
processGroupIds:[],status:p.INVALID};if(l.processState===m.STOPPED)return{processGroupIds:[],status:p.ABSENT};let f=l.processIdentity,
|
|
429
|
-
h=f.platform!==u?null:o==="darwin"?
|
|
430
|
-
|
|
431
|
-
E.
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
filter(D=>D
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
429
|
+
h=f.platform!==u?null:await(o==="darwin"?Ie():R()).catch(()=>null);if(!h)return{processGroupIds:[],status:p.AMBIGUOUS};let g=Number(
|
|
430
|
+
l.pid),I=h.filter(({processGroupId:E})=>E===g),S=[],C=I.some(({environmentReadable:E})=>!E);for(let E of h)E.environmentReadable&&
|
|
431
|
+
E.runtimeToken===f.runtimeToken&&E.commandHash===f.commandHash&&S.push(E);let k=S.find(({pid:E})=>E===g);if(k&&k.startTimeTicks!==
|
|
432
|
+
f.startTimeTicks)return{processGroupIds:[],status:p.AMBIGUOUS};if(S.length===0)return C?{processGroupIds:[],status:p.AMBIGUOUS}:
|
|
433
|
+
{processGroupIds:[],status:I.length>0||T(g)?p.MISMATCH:p.ABSENT};let D=[...new Set(S.map(({processGroupId:E})=>E))];for(let E of D)
|
|
434
|
+
if(h.filter(pe=>pe.processGroupId===E).some(pe=>!pe.environmentReadable||!S.some(({pid:Ja})=>Ja===pe.pid)))return{processGroupIds:[],
|
|
435
|
+
status:p.AMBIGUOUS};return I.some(E=>!S.some(({pid:se})=>se===E.pid))?{processGroupIds:[],status:p.AMBIGUOUS}:{processGroupIds:D,
|
|
436
|
+
status:p.EXACT}}async function Se(l={},f={}){let h=f.processIdentityInspector??yr;return tt(await h(l))}async function _t(l={},f={},h=0){
|
|
437
|
+
let g=Date.now()+h,I=await Se(l,f);for(;Date.now()<g&&I.status===p.EXACT;)await Ao(100),I=await Se(l,f);return I}async function ke(l={},f={}){
|
|
438
|
+
let h=V(f.processIdentitySettleTimeoutMs,{fallback:1e3}),g=V(f.processIdentitySettlePollMs,{fallback:a}),I=Date.now()+h,
|
|
439
|
+
S=await Se(l,f);for(;S.status===p.AMBIGUOUS&&Date.now()<I;)await Ao(Math.min(g,Math.max(1,I-Date.now()))),S=await Se(l,f);
|
|
440
|
+
return S}async function Ct(l={},f="SIGTERM",h={}){let g=h.signalProcessGroup??O,I=await ke(l,h);if(I.status!==p.EXACT)return{
|
|
441
|
+
inspection:I,signaledProcessGroups:[]};let S=Number(l.pid),C=[...I.processGroupIds.filter(D=>D!==S),...I.processGroupIds.
|
|
442
|
+
filter(D=>D===S)],k=[];for(let D of C){let E=await ke(l,h);if(E.status===p.ABSENT||E.status===p.MISMATCH)return{inspection:E,
|
|
443
|
+
signaledProcessGroups:k};if(E.status!==p.EXACT)return{inspection:E,signaledProcessGroups:k};E.processGroupIds.includes(D)&&
|
|
444
|
+
(g(D,f),k.push(D))}return{inspection:await ke(l,h),signaledProcessGroups:k}}async function Ir(l={},f={}){if(!v(l))return{
|
|
445
|
+
identityStatus:p.INVALID,processExitVerified:!1,stopped:!1};if(l.processState===m.STOPPED&&l.processExitVerifiedAt)return{
|
|
446
|
+
alreadyStopped:!0,identityStatus:p.ABSENT,processExitVerified:!0,stopped:!1};let h=await ke(l,f);if(h.status===p.ABSENT||
|
|
447
|
+
h.status===p.MISMATCH)return{identityStatus:h.status,processExitVerified:!0,stopped:!1};if(h.status!==p.EXACT)return{identityStatus:h.
|
|
448
|
+
status,processExitVerified:!1,stopped:!1};let g=await Ct(l,"SIGTERM",f);if(g.inspection.status===p.AMBIGUOUS)return{identityStatus:g.
|
|
449
|
+
inspection.status,processExitVerified:!1,signaledProcessGroups:g.signaledProcessGroups,stopped:!1};let I=await _t(l,f,V(
|
|
450
|
+
f.termTimeoutMs,{fallback:3e3})),S=[...g.signaledProcessGroups];if(I.status===p.EXACT){let k=await Ct(l,"SIGKILL",f);if(S=
|
|
451
|
+
[...new Set([...S,...k.signaledProcessGroups])],k.inspection.status===p.AMBIGUOUS)return{identityStatus:k.inspection.status,
|
|
452
|
+
processExitVerified:!1,signaledProcessGroups:S,stopped:!1};I=await _t(l,f,V(f.killTimeoutMs,{fallback:1e3}))}let C=[p.ABSENT,
|
|
453
|
+
p.MISMATCH].includes(I.status);return{descendantProcessGroups:S.filter(k=>k!==Number(l.pid)),identityStatus:I.status,pid:Number(
|
|
454
|
+
l.pid),processExitVerified:C,signaledProcessGroups:S,stopped:C&&S.length>0}}async function Sr(l){if(o!=="darwin")return N(
|
|
455
|
+
await Cr(`/proc/${l}/stat`,"utf8").catch(()=>""));let f=String(await s(["-o","pgid=,lstart=","-p",String(l)]).catch(()=>"")),
|
|
456
|
+
h=/^\s*(\d+)\s+(.+?)\s*$/u.exec(f);return h?{processGroupId:Number(h[1]),startTimeTicks:A(h[2])}:null}async function xr({
|
|
457
|
+
commandHash:l="",pid:f=null,reportedIdentity:h=null,runtimeToken:g=""}={}){let I=b(l),S=b(g),C=z(h);if(L(C)&&C.commandHash===
|
|
458
|
+
I&&C.runtimeToken===S)return C;let k=Number(f),D=u&&Number.isSafeInteger(k)&&k>0?await Sr(k):null;if(!D?.startTimeTicks||
|
|
459
|
+
D.processGroupId!==k){let E=new Error(`${n} process identity could not be captured.`);throw E.code=r,E}return{commandHash:I,
|
|
460
|
+
platform:u,runtimeToken:S,startTimeTicks:D.startTimeTicks,version:c}}return Object.freeze({normalize:z,isValid:L,normalizeInspection:tt,
|
|
461
|
+
capture:xr,inspect:Se,stop:Ir,isProcessAlive:y})}import{execFile as dc}from"node:child_process";import{promisify as uc}from"node:util";var Sh=Object.freeze(["plugins","apps","daemon_auto_start"]);var xh=Object.freeze([[".tmp",/^(?:plugins(?:$|[.-])|git-|bundled-marketplaces$)/u],["cache",/^(?:remote_plugin_catalog|codex_apps_tools|codex_apps_server_info|codex_app_directory|bundled_plugin_exclusions)$/u]]);var Eh=uc(dc);function xe(t=""){return Array.from(String(t)).some(e=>{let n=e.codePointAt(0);return n<=31||n===127})}var Nt=(t,e,n,r={})=>Object.freeze({id:t,contextWindow:e,variants:Object.freeze(n),...r}),lc=Object.freeze([Object.freeze(
|
|
462
462
|
{id:"deepseek",baseUrl:"https://api.deepseek.com/",claudeBaseUrl:"https://api.deepseek.com/anthropic",claudeAutoCompactWindow:786432,
|
|
463
463
|
webSearch:!1,models:Object.freeze([Nt("deepseek-flash",1048576,["low","high","max"],{images:!0,freeformPatch:!0,codexHistoryRouting:!0}),
|
|
464
464
|
Nt("deepseek-v4-pro",1048576,["low","high","max"],{freeformPatch:!0,codexHistoryRouting:!0})])}),Object.freeze({id:"zai-\
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"./server/packaging": "./src/server/packaging.js",
|
|
10
10
|
"./server/promptContext": "./src/server/promptContext.js",
|
|
11
11
|
"./shared/connectedPackageTypes": "./src/shared/connectedPackageTypes.js",
|
|
12
|
-
"./shared/deploymentServiceNames": "./src/shared/deploymentServiceNames.js"
|
|
12
|
+
"./shared/deploymentServiceNames": "./src/shared/deploymentServiceNames.js",
|
|
13
|
+
"./shared/resourceKinds": "./src/shared/resourceKinds.js"
|
|
13
14
|
}
|
|
14
15
|
}
|