vibe64 0.1.40 → 0.1.41
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 +1841 -1837
- package/bin/upgrade-state.js +2693 -2685
- package/dist/assets/{GithubBrowserTabs-BoDkGFtY.js → GithubBrowserTabs-YvIe2BdE.js} +1 -1
- package/dist/assets/{Vibe64AuthSettingsButton-CmiidAs5.js → Vibe64AuthSettingsButton-DLdfT68V.js} +1 -1
- package/dist/assets/{Vibe64DashboardShell-MCzEQCWu.js → Vibe64DashboardShell-DMPz6fIx.js} +1 -1
- package/dist/assets/{Vibe64DatabaseWorkspace-DM9V017v.js → Vibe64DatabaseWorkspace-BCEIOlSg.js} +1 -1
- package/dist/assets/{Vibe64OutputControls-CU9H0Dur.js → Vibe64OutputControls-DMoqL0VD.js} +1 -1
- package/dist/assets/{Vibe64RepositoryWorkspace-DaAChLA8.js → Vibe64RepositoryWorkspace-BdwRwbxp.js} +1 -1
- package/dist/assets/{Vibe64SessionFiles-CM2EzXBf.js → Vibe64SessionFiles-ChJWUOqm.js} +1 -1
- package/dist/assets/{_sessionId_-DVHd6D5V.js → _sessionId_-Bw0KfJeR.js} +1 -1
- package/dist/assets/_slug_-CAmuBm-M.css +1 -0
- package/dist/assets/_slug_-q9prK_gX.js +25 -0
- package/dist/assets/{access-BbzSuMt5.js → access-C05Nkq6r.js} +1 -1
- package/dist/assets/{app-BNh2oZg-.js → app-D1CGY9Xm.js} +1 -1
- package/dist/assets/{changes-D8Koqrqg.js → changes-D17XpgGz.js} +1 -1
- package/dist/assets/{client-CybfBKCn.js → client-BxGiylrJ.js} +1 -1
- package/dist/assets/{client-D6UGamrv.css → client-C8jwAMY9.css} +1 -1
- package/dist/assets/{dashboard-DLrmf5ed.js → dashboard-BXXgeQ0Q.js} +1 -1
- package/dist/assets/{definitions-DgyQJgn-.js → definitions-SNvFDEFS.js} +1 -1
- package/dist/assets/{env-rVQwLtYr.js → env-sXAQqKWk.js} +1 -1
- package/dist/assets/{health-B6r9LLrd.js → health-Cr34pf2p.js} +1 -1
- package/dist/assets/{history-C6xLWUxL.js → history-N1iRZaab.js} +1 -1
- package/dist/assets/{index-BC29JK2e.css → index-B17d4wpZ.css} +1 -1
- package/dist/assets/index-Mxalhei8.js +138 -0
- package/dist/assets/{integrations-CcrqPXxj.js → integrations-BmwFvHgZ.js} +1 -1
- package/dist/assets/{issues-DEjIlMdl.js → issues-BbiG7dCV.js} +1 -1
- package/dist/assets/{learning-BP1xvd8w.js → learning-CUCuuoHM.js} +1 -1
- package/dist/assets/{publish-CVXolnAG.js → publish-4r_4K5IY.js} +1 -1
- package/dist/assets/{publish-CPWnztCc.css → publish-BFTsAMCF.css} +1 -1
- package/dist/assets/{pull-requests-DdgzLzY_.js → pull-requests-DY9jg3cE.js} +1 -1
- package/dist/assets/{repository-5S0LzRq3.js → repository-DhXdoMP6.js} +1 -1
- package/dist/assets/{settings-BKP_eQ3F.js → settings-Cj4u-76p.js} +1 -1
- package/dist/assets/{useArchivedVibe64Sessions-D8DWpcSy.js → useArchivedVibe64Sessions-BXNg8oES.js} +1 -1
- package/dist/assets/{useVibe64ConversationLog-D-Vkq0sK.js → useVibe64ConversationLog-C1xjhFtS.js} +1 -1
- package/dist/assets/{useVibe64DatabaseTools-Dpm53ruL.js → useVibe64DatabaseTools-H6H-YJQX.js} +1 -1
- package/dist/assets/{useVibe64SessionData-CGJXj3r7.js → useVibe64SessionData-CnDOFFHb.js} +1 -1
- package/dist/assets/{useVibe64SessionSelection-BEqKR412.js → useVibe64SessionSelection-J87nJ9p5.js} +1 -1
- package/dist/assets/{vibe64SessionFocus-tv2wz7_H.js → vibe64SessionFocus-DlN8NwcE.js} +1 -1
- package/dist/index.html +5 -5
- package/docs/colleague-usage/ai-onboarding.md +3 -1
- package/docs/colleague-usage/learning-environment.md +39 -25
- package/docs/colleague-usage/learning-mode-ui.md +18 -9
- package/docs/colleague-usage/learning-practice-projects.md +2 -2
- package/docs/colleague-usage/learning-teacher-guide.md +2 -1
- package/docs/colleague-usage/learning-with-colleague.md +3 -3
- package/docs/colleague-usage/lesson-authoring.md +1 -1
- package/docs/colleague-usage/lesson-step-bar.md +38 -24
- package/docs/colleague-usage/preview-starting-application.md +10 -1
- package/docs/colleague-usage/project-setup.md +2 -2
- package/docs/colleague-usage/publishing.md +3 -1
- package/docs/colleague-usage/starter-apps.md +2 -2
- package/docs/training-content.md +2 -2
- 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/realtime/package.json +1 -1
- package/node_modules/@local/vibe64-genesis/bin/vibe64-genesis-host-context +77 -80
- package/node_modules/@local/vibe64-genesis/src/server/agentSpecs.js +6 -6
- package/node_modules/@local/vibe64-genesis/src/server/index.js +195 -194
- package/node_modules/@local/vibe64-genesis/src/server/promptContext.js +144 -149
- package/node_modules/@local/vibe64-terminals/src/server/sessionWorkOperationCommand.js +8 -7
- package/package.json +8 -8
- package/server.bundle.mjs +14269 -14252
- package/dist/assets/_slug_-DsfaE8Vh.js +0 -25
- package/dist/assets/_slug_-_qfQqdHb.css +0 -1
- package/dist/assets/index-B9P6KjvH.js +0 -138
|
@@ -51,21 +51,21 @@ flatMap(d=>d.runtimeRequirements)),steps:p,diagnostics:n}}var mn="custom";var fn
|
|
|
51
51
|
(PHP)"}),Object.freeze({value:"pip",label:"pip (Python)"}),Object.freeze({value:"bundler",label:"Bundler (Ruby)"}),Object.
|
|
52
52
|
freeze({value:"gomod",label:"Go modules"}),Object.freeze({value:"cargo",label:"Cargo (Rust)"}),Object.freeze({value:"mav\
|
|
53
53
|
en",label:"Maven"}),Object.freeze({value:"gradle",label:"Gradle"}),Object.freeze({value:"nuget",label:"NuGet (.NET)"}),Object.
|
|
54
|
-
freeze({value:mn,label:"custom"})]);var Fe=Object.freeze(fn.map(e=>e.value));function Ke(e){return typeof e=="string"&&Fe.includes(e)}function Ye(e="or"){let t=Fe;return`${t.slice(0,-1).join(", ")} ${e} ${t.at(-1)}`}var
|
|
54
|
+
freeze({value:mn,label:"custom"})]);var Fe=Object.freeze(fn.map(e=>e.value));function Ke(e){return typeof e=="string"&&Fe.includes(e)}function Ye(e="or"){let t=Fe;return`${t.slice(0,-1).join(", ")} ${e} ${t.at(-1)}`}var Xe="Connected development",hn="vibe64.connected-development.v1",x="VIBE64_CONNECTED_DEVELOPMENT_INVALID",P="genesis/\
|
|
55
55
|
stack.md#Connected development",ke="with `runtime` [in `workdir`]: `command` `argument`...",gn=Object.freeze(["- Default\
|
|
56
56
|
package type: `type`","- Sources file: `path`",`- Prepare \`label\` ${ke}`,`- Verify \`label\` ${ke}`,`- Custom runner ${ke}`]);
|
|
57
|
-
function
|
|
57
|
+
function Je(e={}){let t="",n="",s=null,r=[],i=[...e.diagnostics||[]],o=e.status==="ready";if(o&&!b(e.lines)){let u=!1;for(let[
|
|
58
58
|
p,m]of e.lines.entries()){let d=m.trim();if(!d)continue;let h=p+1,y=d.match(/^- Default package type: `([^`\r\n]*)`$/u);
|
|
59
59
|
if(y){n&&l(x,P,"Declare exactly one default package type.",h),Ke(y[1])||l(x,P,`Default package type must be ${Ye()}.`,h),
|
|
60
|
-
n=y[1];continue}let
|
|
61
|
-
t=E(
|
|
60
|
+
n=y[1];continue}let X=d.match(/^- Sources file: `([^`\r\n]+)`$/u);if(X){t&&l(x,P,"Declare exactly one Sources file.",h),
|
|
61
|
+
t=E(X[1],x,P,"Connected sources file",h,{allowRoot:!1}),t.split("/").some(z=>z.toLowerCase()===".git")&&l(x,P,"The Sourc\
|
|
62
62
|
es file must be outside Git metadata.",h);continue}let k=d.startsWith("- Custom runner "),te=d.match(/^- (Prepare|Verify) /u);
|
|
63
|
-
!k&&!te&&l(x,P,D("Connected development entry",d,gn),h);let
|
|
64
|
-
l(x,P,"All Prepare entries must precede Verify entries.",h),u||=!k&&
|
|
63
|
+
!k&&!te&&l(x,P,D("Connected development entry",d,gn),h);let J=te?.[1]==="Verify"?"verify":"prepare";!k&&u&&J==="prepare"&&
|
|
64
|
+
l(x,P,"All Prepare entries must precede Verify entries.",h),u||=!k&&J==="verify";let ae;try{let z=k?d.replace("- Custom \
|
|
65
65
|
runner ","- Prepare `Custom connected source` "):d.replace(/^- Verify /u,"- Prepare ");[ae]=Q([z],{path:P})}catch(z){if(z.
|
|
66
66
|
code!=="VIBE64_WORKSPACE_SETUP_INVALID")throw z;l(x,P,z.message,h)}ae.condition&&l(x,P,"Connected development steps must\
|
|
67
67
|
run unconditionally; a skipped step cannot prove source consumption.",h),k?(s&&l(x,P,"Declare exactly one Custom runner\
|
|
68
|
-
.",h),s=ae):r.push({...ae,phase:
|
|
68
|
+
.",h),s=ae):r.push({...ae,phase:J})}!(n&&!t&&!r.length&&!s)&&(!t||!r.some(p=>p.phase==="verify")&&!s)&&l(x,P,"Declare a \
|
|
69
69
|
default package type alone, or a Sources file with Verify entries or a Custom runner; use `- Nothing.` for no declaratio\
|
|
70
70
|
n.")}let a=e.status==="blocked"||i.length?"blocked":r.length||s?"ready":"unconfigured";return{contract:hn,declared:o,status:a,
|
|
71
71
|
stackHash:e.stackHash,recipeHash:a==="ready"?S({version:1,sourcesFile:t,defaultPackageType:n,customRunner:s,steps:r}):"",
|
|
@@ -99,7 +99,7 @@ if(d[1]==="Subsystem"){let y=E(h[0],n,t,"Subsystem root",u+1);i.has(y)&&l(n,t,"E
|
|
|
99
99
|
ce.",u+1),i.add(y),o.subsystems.push({root:y})}else{let y=d[1].toLowerCase();o[y]!==void 0&&l(n,t,`Duplicate ${d[1]}.`,u+
|
|
100
100
|
1),y==="kind"&&!Oe.includes(h[0])&&l(n,t,`Kind must be ${Oe.slice(0,-1).join(", ")} or ${Oe.at(-1)}.`,u+1),o[y]=h[0]}}return a(),
|
|
101
101
|
s.length||l(n,t,"Use a Group entry or - Nothing."),s}function tt(e){return{contract:"vibe64.architecture-layout.v1",status:e.
|
|
102
|
-
status,stackHash:e.stackHash,groups:e.status==="ready"?yn(e.lines):[],diagnostics:e.diagnostics||[]}}import{existsSync as qt}from"node:fs";import{readFile as
|
|
102
|
+
status,stackHash:e.stackHash,groups:e.status==="ready"?yn(e.lines):[],diagnostics:e.diagnostics||[]}}import{existsSync as qt}from"node:fs";import{readFile as xs}from"node:fs/promises";import{createRequire as Ls}from"node:module";
|
|
103
103
|
import j from"node:path";var nt="STACK_PROJECT_CONTRACTS_INCOMPLETE",st="STACK_SECTION_AMBIGUOUS",vn=Object.freeze([nt,st]);function wn(e){return vn.
|
|
104
104
|
includes(String(e?.code||"").trim())}import*as oe from"genesis-compiler";import{mkdir as Nn,mkdtemp as Cn,readFile as Dn,rename as Pn,rm as Vn,writeFile as $n}from"node:fs/promises";import xn from"node:os";
|
|
105
105
|
import Ae from"node:path";var In=Object.freeze(["main","temporary"]),rt=Object.freeze(["managedDatabaseRefresh","managedEnvironment","managedGit",
|
|
@@ -120,74 +120,70 @@ Possible answers:
|
|
|
120
120
|
start a duplicate or replacement server. If it is unavailable, report that blocker. Describe only rendered browser evide\
|
|
121
121
|
nce.","When adopting an authenticated app, or when its login blocks Preview inspection, inspect identity support/names w\
|
|
122
122
|
ith `vibe64-helper preview status`; prefer `vibe64-helper preview browser identity <configured-name>` to requesting pass\
|
|
123
|
-
words. If unconfigured, ask which existing accounts (email/login/user ID) represent admin
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
)
|
|
130
|
-
|
|
131
|
-
enable flag and secret. Do not create users, change roles, reset passwords or weaken production auth for
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
ted scope and key names, never their values, and claim success only when the command succeeded.","Store a secret the app\
|
|
188
|
-
lication needs generated (such as an application key) by generating it with the framework's own generator and piping it \
|
|
189
|
-
to `vibe64-helper env set <scope> <KEY> --secret`. Never write it into a generated `.env` file: Vibe64 regenerates that \
|
|
190
|
-
file from Env."]);function it(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`${t} must be an object.`);return e}function Re(e,t,n){
|
|
123
|
+
words. If unconfigured, ask which existing accounts (email/login/user ID) represent admin, other required roles and the \
|
|
124
|
+
default; reuse prior answers and wait for their choices before configuring access. Never infer admin rights from names o\
|
|
125
|
+
r the Vibe64 viewer.","A web app with login accounts has an application-owned adapter in the Outputs `#### Preview ident\
|
|
126
|
+
ity` block (`vibe64-helper spec outputs`, `vibe64-helper spec preview-identity-command`); when it is missing, set it up \
|
|
127
|
+
from the app framework's own pattern as part of the work instead of merely offering it. Save selectors the person gives \
|
|
128
|
+
or confirms (you may propose existing app accounts) with `vibe64-helper preview identities save` (`vibe64-helper spec pr\
|
|
129
|
+
eview-identities`), then verify each with `vibe64-helper preview browser identity <name>`; a saved selector alone proves\
|
|
130
|
+
no access. Use existing sessions/permissions, reject missing/disabled accounts, and disable the adapter without Vibe64\u2019\
|
|
131
|
+
s per-run enable flag and secret. Do not create users, change roles, reset passwords or weaken production auth for impor\
|
|
132
|
+
t. If choices are deferred/declined, say access stays unconfigured and continue independent setup work without repeated \
|
|
133
|
+
credential requests. Public/non-web apps need no adapter.","Use `vibe64-helper preview status`, `screenshot`, `logs`, an\
|
|
134
|
+
d `browser eval` (Playwright code on stdin) for rendered inspection.","The top Preview toolbar Stop and `vibe64-helper p\
|
|
135
|
+
review stop` stop this session's application and managed browser, not chat or source. Status reports the saved stopped c\
|
|
136
|
+
hoice. A status read, screenshot, browser inspection, source edit or session reopening is not permission to restart it; \
|
|
137
|
+
use `vibe64-helper preview ensure --wait` only for a deliberate Start. Scoped browser tests restore the prior stopped ch\
|
|
138
|
+
oice.","For interactive navigation, use the proxy URL from `vibe64-helper preview inspect-url` or status `currentPage.ur\
|
|
139
|
+
l` / `endpoints.browser.url`. Inside browser eval, use `await page.goto(new URL('/your-path', preview.url).href)`. The d\
|
|
140
|
+
irect application endpoint under diagnostics bypasses Preview identity and is not a browser-navigation URL.","Use the ma\
|
|
141
|
+
naged preview browser for interactive browsing and `vibe64-helper playwright` only for an existing configured project su\
|
|
142
|
+
ite; report a platform or project-test blocker rather than installing another browser or changing its dependencies.","Fo\
|
|
143
|
+
r browser evidence, batch related actions and assertions, return only needed values and inspect relevant locators or reg\
|
|
144
|
+
ions; screenshot at meaningful checkpoints or failures, not after every click. Reuse the managed browser when isolation \
|
|
145
|
+
permits, keep required viewport, identity and security checks, and use existing automated cases for repeat verification.",
|
|
146
|
+
"For browser tests that write or reset data, inspect `vibe64-helper preview targets --json` and the project's `genesis/s\
|
|
147
|
+
tack.md` Outputs. Run `vibe64-helper playwright --target <declared-test-target> test <suite arguments>` (or `npm-run <sc\
|
|
148
|
+
ript>` in place of `test`). Vibe64 starts that web target, waits for readiness, uses its declared application identity, \
|
|
149
|
+
and restores the previous Preview when the command finishes or is cancelled; report restoration failures.","A target nam\
|
|
150
|
+
e is not proof of test isolation. Before running a destructive suite, the application must verify the server's actual te\
|
|
151
|
+
st database and suppress real email, invoices, payments, and other external effects. Keep managed Env unchanged. The tes\
|
|
152
|
+
t launcher and its preview-identity command must use the same database. Follow the application's declared test resources\
|
|
153
|
+
and never invent a database name. Never spoof safety checks by changing only the test runner's environment.","If no sui\
|
|
154
|
+
table test target exists, add one through the project's existing Outputs contract and application-owned test scripts wit\
|
|
155
|
+
hin authorized scope; normal Preview stays the default. Validate the exact disposable database before resetting it, prep\
|
|
156
|
+
are fixtures before reporting readiness, and make Playwright use PLAYWRIGHT_BASE_URL (the started target's URL) without \
|
|
157
|
+
starting another server. If test resources or external-effect controls are missing, report that blocker. `vibe64-helper \
|
|
158
|
+
preview ensure --target <id> --wait --json` deliberately selects an interactive target until changed. If browser startup\
|
|
159
|
+
is slow, measure migrations, fixtures and server startup before retrying or extending deadlines.","Keep test output sma\
|
|
160
|
+
ll: run relevant files/cases, save stdout/stderr to local artifacts and keep exit status. Report counts, duration, faile\
|
|
161
|
+
d cases, actionable errors and artifact paths, reading only needed failure excerpts. Retain startup, resource and Previe\
|
|
162
|
+
w-restoration errors even if tests pass, and trailing wrapper diagnostics separately from JSON. Do not rerun for output \
|
|
163
|
+
or reread unchanged logs.","Batch related browser tests in one managed suite (one Preview switch and restore). Suites an\
|
|
164
|
+
d live Preview actions are sequential: no browser actions, ensure/restart or target changes during a suite or restoratio\
|
|
165
|
+
n. Wait on the original execution, including background runs, through cleanup/restoration (empty polls: yield_time_ms: 3\
|
|
166
|
+
0000 where supported; shorter only for interactive input); read-only status/logs stay available. Before live inspection,\
|
|
167
|
+
confirm `vibe64-helper playwright status` shows no active run and `vibe64-helper preview status` is ready on the restor\
|
|
168
|
+
ed target. To stop, run `vibe64-helper playwright cancel <run-id>`, which waits for cleanup/restoration; retry if cleanu\
|
|
169
|
+
p needs attention. Never kill test/Preview PIDs or change locks; launcher exit alone does not prove tests stopped. Reche\
|
|
170
|
+
ck status before reporting a busy blocker.","If a managed command reports kernel task denials or a resource incident, re\
|
|
171
|
+
port the blocker with its diagnostic and incident ID and ask the platform operator to inspect that evidence before retry\
|
|
172
|
+
ing; never raise test timeouts or weaken assertions to work around a process/thread limit. A generic browser timeout wit\
|
|
173
|
+
hout resource evidence does not establish a platform cause."]),_n=Object.freeze(["Each managed shell command receives cu\
|
|
174
|
+
rrent development Env from Vibe64, including declared resource bindings; use them in ordinary commands. Do not build env\
|
|
175
|
+
ironment injection or copy managed credentials into source. Resource provisioning and application migrations remain sepa\
|
|
176
|
+
rate preparation steps.","Use `vibe64-helper env status [development|production|all]` to inspect configured key names wi\
|
|
177
|
+
thout revealing values.","Pipe an available value to `vibe64-helper env set <development|production> <KEY> [--secret]`; \
|
|
178
|
+
never put values in arguments, logs, or repository files. Use empty stdin only when the user requested an empty value.",
|
|
179
|
+
"When the person refers to a saved key, account or accounts hub, run `vibe64-helper env saved` (names, descriptions and \
|
|
180
|
+
fields, never values) and link the matching field to the variable the application reads with `vibe64-helper env link <de\
|
|
181
|
+
velopment|production> <KEY> <saved-id> <field-id>` instead of asking for the value.","Keep development and production va\
|
|
182
|
+
lues separate. Never invent credentials, copy a value between scopes without explicit direction, or edit Vibe64 runtime/\
|
|
183
|
+
session storage.","After an Env mutation, report only the affected scope and key names, never their values, and claim su\
|
|
184
|
+
ccess only when the command succeeded.","Store a secret the application needs generated (such as an application key) by \
|
|
185
|
+
generating it with the framework's own generator and piping it to `vibe64-helper env set <scope> <KEY> --secret`. Never \
|
|
186
|
+
write it into a generated `.env` file: Vibe64 regenerates that file from Env."]);function it(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`${t} must be an object.`);return e}function Re(e,t,n){
|
|
191
187
|
let s=new Set(t),r=Object.keys(e).filter(i=>!s.has(i));if(r.length>0)throw new TypeError(`${n} contains unsupported fiel\
|
|
192
188
|
ds: ${r.join(", ")}.`)}function ot(e){if(Re(e,["conversationKind","scope","session","hostGuidance"],"Vibe64 session cont\
|
|
193
189
|
ext"),e.hostGuidance!==void 0&&(typeof e.hostGuidance!="string"||Buffer.byteLength(e.hostGuidance,"utf8")>1024))throw new TypeError(
|
|
@@ -227,40 +223,38 @@ s not delivery/completion. Await replies; no polling or acknowledgement loops. M
|
|
|
227
223
|
son and notify the sender once; continue independent work.',...Tn,...t==="main"?['When a saved integration needs the per\
|
|
228
224
|
son to configure credentials or consent, finish your assistant reply with a fenced `vibe64-integration` block containing\
|
|
229
225
|
only {"integrationId":"the exact slot key from integrations.json"}. Never include credentials, URLs or other fields. Vi\
|
|
230
|
-
be64 shows Configure, Connect and Skip for that saved request; the block authorizes no connection.
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
e
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
ion is unavailable, report the outcome as unknown and stop; do not repeat the write or claim it was safely rolled back."]:
|
|
263
|
-
[]].join(`
|
|
226
|
+
be64 shows Configure, Connect and Skip for that saved request; the block authorizes no connection. Once the application \
|
|
227
|
+
confirms the setup the person started, Vibe64 resumes this task in a separate message; do not claim the account is conne\
|
|
228
|
+
cted before then. Never emit the block for examples or unsaved integrations.']:[],...n.managedPreview?kn:[],...n.managedEnvironment?
|
|
229
|
+
_n:[],...n.managedDatabaseRefresh?["After a database migration or schema change, run `vibe64-helper database refresh` on\
|
|
230
|
+
ce so Vibe64's Database view reflects it.","To inspect or tidy the main ERD, run `vibe64-helper database erd --json` for\
|
|
231
|
+
table rectangles, pins, routed connections and metrics, then send a revision-checked batch of table moves on stdin to `\
|
|
232
|
+
vibe64-helper database erd apply --json`; it changes only diagram presentation. Inspect the resulting paths before claim\
|
|
233
|
+
ing improvement.","When project source has data-overview.json, maintain its main actors and explicit supporting-table gr\
|
|
234
|
+
oups as the schema changes. Use `vibe64-helper database overview --json` for the current schema, grouping, coverage and \
|
|
235
|
+
exact format instructions. Preserve authored groupings, classify new tables, fix renamed/removed references, and check c\
|
|
236
|
+
overage afterward. When asked to create a Data overview, use the same command and relevant application source; no one-ho\
|
|
237
|
+
p membership rule applies. Never invent foreign keys or cardinalities."]:[],...n.managedGit?["Use the managed `git` and \
|
|
238
|
+
`gh` commands on PATH. Do not bypass them with host binaries, a stripped PATH, or alternate credentials.","For GitHub-ho\
|
|
239
|
+
sted attachments and inline images in issues (tickets), pull requests or comments, use authenticated managed `gh api` wi\
|
|
240
|
+
th the original attachment URL, save the response to a local file and inspect it before reporting its contents. Never us\
|
|
241
|
+
e unauthenticated curl/wget, User-Agent experiments or extracted credentials; an unauthenticated 404 does not prove a pr\
|
|
242
|
+
ivate attachment is missing.","After changing GitHub issues, comments, labels or pull requests, run `vibe64-helper githu\
|
|
243
|
+
b refresh` once so Vibe64's Issues/PR view reflects it.","When linking an issue in this project's repository, run `vibe6\
|
|
244
|
+
4-helper github issue-link <number>` and use its returned Vibe64 path exactly, including the /app prefix, as the primary\
|
|
245
|
+
Markdown link destination; it navigates in-app. You may include the GitHub URL as a secondary link. Never guess the pro\
|
|
246
|
+
ject slug or host; issues in other repositories keep their GitHub links.","Report authentication or transport failures d\
|
|
247
|
+
irectly; do not inspect credentials or invent another login path.","When a managed Git/GitHub command fails, tell the us\
|
|
248
|
+
er which requested action failed, which earlier work is confirmed complete, what remains undone or unconfirmed, and the \
|
|
249
|
+
next safe action. Retain the reported failure stage, execution budget and execution reference when provided; do not expo\
|
|
250
|
+
se credentials or dump raw output unnecessarily.","A timeout or transport failure does not establish invalid authenticat\
|
|
251
|
+
ion, exhausted AI quota, a GitHub outage or a suspension problem. Separate recorded facts from hypotheses; say the cause\
|
|
252
|
+
is unknown when it is unproven. Recommend reconnection only when the reported error explicitly calls for it.","If the d\
|
|
253
|
+
iagnostic says commandSubmitted=false, the requested Git/GitHub action was not attempted. After an execution timeout, lo\
|
|
254
|
+
st response or unreadable response, its effects are unconfirmed: use a read-only check of the affected Git/GitHub state \
|
|
255
|
+
before repeating any write. Never claim that a comment was posted or not posted, or that a push succeeded or failed, fro\
|
|
256
|
+
m those errors alone. If verification is unavailable, report the outcome as unknown and stop; do not repeat the write or\
|
|
257
|
+
claim a safe rollback."]:[]].join(`
|
|
264
258
|
`)}function ee(e={}){let t=it(e,"Vibe64 driver input"),n=Rn(t);return n.scope==="session"?An(n):n.stableContext}async function at(e=""){let t=e||await Cn(Ae.join(xn.tmpdir(),"vibe64-genesis-context-"));await Nn(t,{recursive:!0,mode:448});
|
|
265
259
|
let n=Ae.join(t,"sessions.json"),s=new Map;try{let a=JSON.parse(await Dn(n,"utf8"));for(let u of a.sessions)ee(u.promptContext),
|
|
266
260
|
s.set(u.upstreamSessionId,u)}catch(a){if(a.code!=="ENOENT")throw a}let r=Promise.resolve(),i=!1;async function o(a){let u=Ae.
|
|
@@ -298,11 +292,11 @@ a Prepare step."),n}function lt({environment:e={},section:t={}}={}){G(t,e,"Deplo
|
|
|
298
292
|
[]],s=De();t.status==="ready"&&(s=pt(t.lines));let r=n.length>0?"blocked":s.steps.length>0?"ready":"unconfigured",i={version:s.
|
|
299
293
|
version,artifact:s.artifact,workdir:s.workdir,runtimeRequirements:s.runtimeRequirements,readiness:s.readiness,steps:s.steps};
|
|
300
294
|
return{contract:ct,status:r,stackHash:t.stackHash,recipeHash:r==="ready"?S(i):"",components:[...t.components||[]],source:t.
|
|
301
|
-
source||null,runtimeRequirements:B(s.runtimeRequirements),resources:structuredClone(e.resources||[]),...i,diagnostics:n}}var le="vibe64.packaging.v1",Et="Packaging",
|
|
295
|
+
source||null,runtimeRequirements:B(s.runtimeRequirements),resources:structuredClone(e.resources||[]),...i,diagnostics:n}}var le="vibe64.packaging.v1",Et="Packaging",Fr=Object.freeze(["genesis",".genesis",".agents",".claude",".codex",".openco\
|
|
302
296
|
de"]),V="VIBE64_PACKAGING_INVALID",Bn=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u,Un=/^[A-Z_][A-Z0-9_]*$/u,Wn=/^[a-zA-Z][a-zA-Z0-9_]*(?:\.[a-zA-Z][a-zA-Z0-9_]*)+$/u,
|
|
303
297
|
Hn=/^[a-z][a-z0-9+.-]*$/u,zn=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,63}$/u,qn=/\{[^{}\s]*\}/u,
|
|
304
298
|
Fn=/^### Package `([^`\r\n]+)`:[ \t]+(.+)$/u,Kn=/^- (Prepare|Build) `([^`\r\n]+)`:[ \t]+(.+)$/u,Yn=/^- Environment `([^`\r\n]+)`:[ \t]+(.+)$/u,
|
|
305
|
-
|
|
299
|
+
Xn=/^- Permission `([^`\r\n]+)`:[ \t]+(.+)$/u,Jn=/^- Content: package `([^`\r\n]+)`$/u,dt=50,mt=500,Zn=/(?:^|_)(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|PRIVATE_KEY|API_KEY|CREDENTIALS?)(?:_|$)/u,
|
|
306
300
|
bt=Object.freeze({npm:Object.freeze({entries:["workdir","runtimes","prepare","build","environment","versionFrom"],required:[
|
|
307
301
|
"versionFrom"],versionSources:["package.json","external"]}),"python-dist":Object.freeze({entries:["workdir","runtimes","\
|
|
308
302
|
prepare","build","environment","output","versionFrom"],required:["build","output","versionFrom"],versionSources:["pyproj\
|
|
@@ -338,13 +332,13 @@ ter).`,r),o):e==="name"?((o.trim()!==o||o.length>dt)&&g(s,`${i} must be at most
|
|
|
338
332
|
ces.`,r),o):yt(o,s,i,r)}function ns(e,t,n){return{id:xe(e[1],t,"Package id",n),label:v(e[2],V,t,"Package label",n),fields:{},
|
|
339
333
|
lines:{},prepare:[],build:[],environment:[],permissions:[],seen:new Set,line:n}}function ss(e,t,n,s){/^- Plugins?\b/u.test(
|
|
340
334
|
t)&&g(n,"Packaging takes no Plugin list: the generated shell installs the native plugins of the Content package at its l\
|
|
341
|
-
ockfile versions.",s);for(let[u,c]of q)if(t.startsWith(u)){ht(e,c,ts(c,t,u,n,s),n,s);return}let r=t.match(
|
|
335
|
+
ockfile versions.",s);for(let[u,c]of q)if(t.startsWith(u)){ht(e,c,ts(c,t,u,n,s),n,s);return}let r=t.match(Jn);if(r){ht(e,
|
|
342
336
|
"content",xe(r[1],n,"Packaging Content package",s),n,s);return}let i=t.match(Kn);if(i){let u=i[1].toLowerCase(),c=`Packa\
|
|
343
337
|
ging ${i[1]} command`;e[u].push({label:v(i[2],V,n,`Packaging ${i[1]} label`,s),argv:Le(_(i[3],V,n,c,s),n,c,s)}),e.lines[u]??=
|
|
344
338
|
s;return}let o=t.match(Yn);if(o){let u=yt(o[1],n,"Packaging Environment name",s);Zn.test(u)&&g(n,`Packaging Environment ${u}\
|
|
345
339
|
looks like a credential. Packaging holds only non-secret build facts.`,s),e.environment.some(p=>p.name===u)&&g(n,`Packa\
|
|
346
340
|
ge ${e.id} has a duplicate Environment ${u}.`,s);let c=Le(I(o[2],V,n,"Packaging Environment value",s,{count:1}),n,"Packa\
|
|
347
|
-
ging Environment value",s)[0];e.environment.push({name:u,value:c}),e.lines.environment??=s;return}let a=t.match(
|
|
341
|
+
ging Environment value",s)[0];e.environment.push({name:u,value:c}),e.lines.environment??=s;return}let a=t.match(Xn);if(a){
|
|
348
342
|
let u=xe(a[1],n,"Packaging Permission id",s),c=v(a[2],V,n,"Packaging Permission reason",s);(c.includes("`")||c.length>mt)&&
|
|
349
343
|
g(n,`Packaging Permission reason is plain user-facing text of at most ${mt} characters.`,s),e.permissions.some(p=>p.id===
|
|
350
344
|
u)&&g(n,`Package ${e.id} has a duplicate Permission ${u}.`,s),e.permissions.push({id:u,reason:c}),e.lines.permission??=s;
|
|
@@ -487,20 +481,26 @@ d,t,c);s.downloads.push(h),r="download",i=h;continue}r==="parameter"?hs(i,u,t,c)
|
|
|
487
481
|
viewIdentity"?Os(i,u,t,c):r==="download"?Ts(i,u,t,c):vs(s,u,t,c)}s&&n.push(kt(s,t)),n.length===0&&f(t,"## Outputs needs \
|
|
488
482
|
at least one Target or exactly `- Nothing.`.");let o=n.map(({id:a})=>a);return new Set(o).size!==o.length&&f(t,"Outputs \
|
|
489
483
|
contains a duplicate target id."),n.filter(({default:a})=>a).length>1&&f(t,"Outputs may declare at most one default targ\
|
|
490
|
-
et."),{version:1,targets:n}}function
|
|
491
|
-
[]
|
|
492
|
-
(
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
t
|
|
484
|
+
et."),{version:1,targets:n}}function Ns(e,{resourcesPreparing:t=!1}={}){let n=e.details||{},s=Array.isArray(n.missing)?n.
|
|
485
|
+
missing:[],r=(Array.isArray(n.alternatives)?n.alternatives:[]).map((o,a)=>Array.isArray(s[a])&&s[a].length?s[a].join(" a\
|
|
486
|
+
nd "):String(o)).filter(Boolean);if(e.code!=="STACK_RESOURCE_MISSING"||!r.length)return e.message;let i=String(n.resource||
|
|
487
|
+
"").trim()||"resources";return t?`Vibe64 is still setting up this app's ${i}. Preview can start when workspace setup fin\
|
|
488
|
+
ishes; then press Check again.`:`This app needs its ${i} before Preview can start: set ${r.join(", or ")} in Env (in Das\
|
|
489
|
+
h, under Development), then press Check again.`}function Pt({environment:e={},section:t={},resourcesPreparing:n=!1}={}){
|
|
490
|
+
G(t,e,"Outputs section");let s=[...t.diagnostics||[]],r=[...e.diagnostics||[]],i={version:1,targets:[]};t.status==="read\
|
|
491
|
+
y"&&(i=ge(t.lines));let o=r.length===0?null:[...new Set(r.map(p=>Ns(p,{resourcesPreparing:n})))].join(" "),a=i.targets.map(
|
|
492
|
+
p=>({...p,source:t.source||null,available:s.length===0&&r.length===0,disabledReason:o})),u=[...s,...r],c="ready";return u.
|
|
493
|
+
length>0?c="blocked":a.length===0&&(c="unconfigured"),{contract:_t,status:c,stackHash:t.stackHash,components:[...t.components||
|
|
494
|
+
[]],environmentDefaults:structuredClone(e.environmentDefaults||[]),runtimeRequirements:B(a.flatMap(p=>p.runtimeRequirements)),
|
|
495
|
+
resources:structuredClone(e.resources||[]),targets:a,diagnostics:u}}var Vt="Project services",Cs="vibe64.project-services.v1",F="VIBE64_PROJECT_SERVICES_INVALID",K="genesis/stack.md#Projec\
|
|
496
|
+
t services",Ds="- Start `service-id` [per session] with `runtime` [in `workdir`]: `command` `argument`...";function $t(e){
|
|
497
497
|
if(Array.isArray(e)||l(F,K,"Expected exact Project services section lines."),b(e))return[];let t=[];for(let[n,s]of e.entries()){
|
|
498
498
|
let r=s.trim();if(!r)continue;let i=n+1,o=r.match(/^- Start `([a-z][a-z0-9-]{0,63})`( per session)? with (.+?): (.+)$/u);
|
|
499
|
-
o||l(F,K,`Use: ${
|
|
499
|
+
o||l(F,K,`Use: ${Ds}`,i),t.some(({id:u})=>u===o[1])&&l(F,K,"Duplicate project service id.",i);let a=o[3].match(/^(.*?) in `([^`\r\n]+)`$/u);
|
|
500
500
|
t.push({id:o[1],...o[2]?{scope:"session"}:{},runtimeRequirements:O(a?a[1]:o[3],F,K,"Service runtimes",i),workdir:E(a?.[2]||
|
|
501
501
|
".",F,K,"Service workdir",i),argv:_(o[4],F,K,"Service command",i)})}return t.length||l(F,K,"Declare a service or exactly\
|
|
502
|
-
`- Nothing.`."),t}function xt(e={}){let t=e.status==="ready"?$t(e.lines):[];return{contract:
|
|
503
|
-
ed"?"blocked":t.length?"ready":"unconfigured",services:t,recipeHash:t.length?S(t):"",diagnostics:e.diagnostics||[]}}var jt="vibe64.resource-estimates.v1",Ee="Resource estimates",Gt="VIBE64_RESOURCE_ESTIMATES_INVALID",
|
|
502
|
+
`- Nothing.`."),t}function xt(e={}){let t=e.status==="ready"?$t(e.lines):[];return{contract:Cs,status:e.status==="block\
|
|
503
|
+
ed"?"blocked":t.length?"ready":"unconfigured",services:t,recipeHash:t.length?S(t):"",diagnostics:e.diagnostics||[]}}var jt="vibe64.resource-estimates.v1",Ee="Resource estimates",Gt="VIBE64_RESOURCE_ESTIMATES_INVALID",Ps=1024*1024,Lt=1024*
|
|
504
504
|
1024,Mt=new Map([["Startup typical MiB","startupTypical"],["Startup high MiB","startupHigh"],["Running typical MiB","run\
|
|
505
505
|
ningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);function L(e,t,n){l(Gt,
|
|
506
506
|
e,t,n)}function Be(e,t,n,s,r){let i=e.get(t),o=e.get(n);return(i===void 0||o===void 0||i>o)&&L(s,"Each resource phase re\
|
|
@@ -516,12 +516,12 @@ L(t,"Finite outputs and Workspace setup require only Typical MiB and High MiB.",
|
|
|
516
516
|
outputs.push({targetId:c,mode:p,execution:h}):r.workspaceSetup=h}for(let c=0;c<e.length;c+=1){let p=e[c].trim(),m=c+1;if(!p)
|
|
517
517
|
continue;let d=p.match(/^### Output `([a-z0-9]+(?:-[a-z0-9]+)*)`$/u);if(d||p==="### Workspace setup"){u();let k=d?.[1]||
|
|
518
518
|
"",te=k?`output:${k}`:"workspace-setup";o.has(te)&&L(t,"Resource estimates contains a duplicate operation.",m),o.add(te);
|
|
519
|
-
let
|
|
520
|
-
.`,m),!k&&!s&&L(t,"Resource estimate references undeclared Workspace setup steps.",m),a={targetId:k,mode:
|
|
519
|
+
let J=i.get(k);k&&!["interactive","finite"].includes(J?.mode)&&L(t,`Resource estimate references an undeclared output: ${k}\
|
|
520
|
+
.`,m),!k&&!s&&L(t,"Resource estimate references undeclared Workspace setup steps.",m),a={targetId:k,mode:J?.mode||"setup",
|
|
521
521
|
fields:new Map,line:m};continue}let h=p.match(/^- ([A-Za-z ]+): `([1-9][0-9]*)`$/u),y=h&&Mt.get(h[1]);(!a||!y)&&L(t,`Exp\
|
|
522
522
|
ected an Output or Workspace setup heading followed by positive integer MiB estimates: ${[...Mt.keys()].map(k=>`- ${k}: \
|
|
523
|
-
\`number\``).join("; ")}.`,m),a.fields.has(y)&&L(t,`Duplicate resource field: ${h[1]}.`,m);let
|
|
524
|
-
|
|
523
|
+
\`number\``).join("; ")}.`,m),a.fields.has(y)&&L(t,`Duplicate resource field: ${h[1]}.`,m);let X=Number(h[2]);(!Number.isSafeInteger(
|
|
524
|
+
X)||X>Lt)&&L(t,`Resource estimates must be between 1 and ${Lt} MiB.`,m),a.fields.set(y,X*Ps)}return u(),o.size===0&&L(t,
|
|
525
525
|
"Resource estimates needs an operation or exactly `- Nothing.`."),r}function be({section:e={},outputsSection:t={},workspaceSetupSection:n={}}={}){
|
|
526
526
|
G(e,t,"Resource estimates and Outputs"),G(e,n,"Resource estimates and Workspace setup");let s=[...e.diagnostics||[]],r={
|
|
527
527
|
version:1,outputs:[],workspaceSetup:null};if(e.status==="ready"&&s.length===0)try{r=Bt(e.lines,{targets:t.status==="read\
|
|
@@ -529,88 +529,89 @@ y"?ge(t.lines).targets:[],hasWorkspaceSetup:n.status==="ready"&&Q(n.lines).lengt
|
|
|
529
529
|
OperationError")throw o;s.push({code:Gt,message:o.message,details:{...o.details,causeCode:o.code}})}let i=s.length>0?"in\
|
|
530
530
|
valid":r.outputs.length>0||r.workspaceSetup?"ready":"unconfigured";return{contract:jt,status:i,stackHash:e.stackHash,sectionHash:e.
|
|
531
531
|
sectionHash||"",estimatesHash:i==="ready"?S(r):"",source:e.source||null,outputs:r.outputs,workspaceSetup:r.workspaceSetup,
|
|
532
|
-
fallbackReason:i==="invalid"?"invalid-estimates":i==="unconfigured"?"not-declared":null,diagnostics:s}}var Ut="vibe64.integration-setup.v1",Wt="Integration setup",ie="VIBE64_INTEGRATION_SETUP_INVALID",
|
|
532
|
+
fallbackReason:i==="invalid"?"invalid-estimates":i==="unconfigured"?"not-declared":null,diagnostics:s}}var Ut="vibe64.integration-setup.v1",Wt="Integration setup",ie="VIBE64_INTEGRATION_SETUP_INVALID",Vs="- Command with `ru\
|
|
533
533
|
ntime` in `workdir`: `command` `argument`...";function Ht(e,{path:t="genesis/stack.md#Integration setup"}={}){if(Array.isArray(
|
|
534
534
|
e)||l(ie,t,"Integration setup requires exact Stack section lines."),b(e))return null;let n=e.map(r=>r.trim()).filter(Boolean),
|
|
535
535
|
s=n.length===1&&n[0].match(/^- Command with (.+?) in `([^`\r\n]+)`: (.+)$/u);return s||l(ie,t,`Integration setup require\
|
|
536
|
-
s exactly one entry: ${
|
|
536
|
+
s exactly one entry: ${Vs}; or - Nothing.`),{argv:_(s[3],ie,t,"Integration setup command"),workdir:E(s[2],ie,t,"Integrat\
|
|
537
537
|
ion setup workdir"),runtimeRequirements:O(s[1],ie,t,"Integration setup runtimes")}}function zt({section:e={}}={}){let t=[
|
|
538
538
|
...e.diagnostics||[]],n=e.status==="ready"&&t.length===0?Ht(e.lines):null;return{contract:Ut,status:t.length?"blocked":n?
|
|
539
539
|
"ready":"unconfigured",stackHash:e.stackHash,recipeHash:n?S({version:1,command:n}):"",source:e.source||null,components:[
|
|
540
|
-
...e.components||[]],command:n,diagnostics:t}}var
|
|
540
|
+
...e.components||[]],command:n,diagnostics:t}}var $s=new URL("./index.js",import.meta.url).href,Ft=Ls($s),ye=new Map;async function Ms(e){if(!j.isAbsolute(e||""))throw new TypeError(
|
|
541
541
|
"Genesis host context requires an absolute runtime root.");let t=j.join(e,"genesis-context");if(!ye.has(t)){let n=at(t).
|
|
542
|
-
catch(s=>{throw ye.delete(t),s});ye.set(t,n)}return ye.get(t)}async function
|
|
543
|
-
stringify({registryPath:t.registryPath}),GENESIS_TURN_CONTEXT_ENABLED:"0"}}var{GENESIS_CONTRACTS:N,HOST_CONTEXT_RESOLVER_DATA_ENV:
|
|
544
|
-
HOST_CONTEXT_RESOLVER_ENV:
|
|
545
|
-
inspectDerivedArtifacts:
|
|
546
|
-
inspectSkills:Js,inspectStackSection:
|
|
547
|
-
setCollaboration:
|
|
548
|
-
sourceExplanationGuidance:
|
|
549
|
-
mergeArchitectureObservations:
|
|
550
|
-
...
|
|
551
|
-
["genesis-stack"]),
|
|
552
|
-
return String(e||"").trim()}function Kt(e,{required:t=!1}={}){let n=Y(e);if(!n&&!t)return"";if(!
|
|
553
|
-
n?`Unknown Genesis prompt task: ${n}.`:"Genesis prompt actions require an explicit task.");return n}function
|
|
554
|
-
e.genesisTask)||"work"}function
|
|
555
|
-
map(Y).find(Boolean)||"Continue the requested project work."}function
|
|
542
|
+
catch(s=>{throw ye.delete(t),s});ye.set(t,n)}return ye.get(t)}async function Ii(e){let t=await Ms(e);return{[Gs]:hr(),[js]:JSON.
|
|
543
|
+
stringify({registryPath:t.registryPath}),GENESIS_TURN_CONTEXT_ENABLED:"0"}}var{GENESIS_CONTRACTS:N,HOST_CONTEXT_RESOLVER_DATA_ENV:js,
|
|
544
|
+
HOST_CONTEXT_RESOLVER_ENV:Gs,addStack:Bs,applyTemplate:Us,generatePrompt:Ue,indexCodebase:Ws,initialize:Hs,inspectCollaboration:zs,
|
|
545
|
+
inspectDerivedArtifacts:qs,inspectEngineering:Fs,inspectEnvironment:ve,inspectProject:Ks,inspectProjectFormat:Ys,inspectAgentIntegrations:Xs,
|
|
546
|
+
inspectSkills:Js,inspectStackSection:Zs,inspectStackSections:Qs,inspectSubsystems:er,listTemplates:tr,parserEnvironment:nr,
|
|
547
|
+
setCollaboration:sr,setEngineeringProfile:rr,syncAgentIntegrations:ir,syncSkills:or,withTrustedGitRepository:ar,SOURCE_EXPLANATION_PROMPT_VERSION:Si,
|
|
548
|
+
sourceExplanationGuidance:Ti,sourceExplanationReviewGuidance:ki,validateArchitectureFacts:_i,validateArchitectureObservations:Oi,
|
|
549
|
+
mergeArchitectureObservations:Ri}=oe,Ai="genesis/blueprint.md",Ni="genesis/subsystems.md",cr=!1,ur=Object.freeze(["vue",
|
|
550
|
+
...cr?[]:["django-postgresql","jskit-postgresql","postgresql","rails-postgresql","spring-boot-postgresql"]]),pr=Object.freeze(
|
|
551
|
+
["genesis-stack"]),lr=new Set(["adopt","blueprint","describe","deslop","program","review","start","work"]);function Y(e=""){
|
|
552
|
+
return String(e||"").trim()}function Kt(e,{required:t=!1}={}){let n=Y(e);if(!n&&!t)return"";if(!lr.has(n))throw new TypeError(
|
|
553
|
+
n?`Unknown Genesis prompt task: ${n}.`:"Genesis prompt actions require an explicit task.");return n}function dr(e={}){return Kt(
|
|
554
|
+
e.genesisTask)||"work"}function mr(e={},t={}){return[e.conversationRequest,e.feedback,e.request,e.plan,e.description,t.label].
|
|
555
|
+
map(Y).find(Boolean)||"Continue the requested project work."}function Ci(e={}){return nr(e)}function fr(){let e=(Ft.resolve.
|
|
556
556
|
paths("genesis-compiler")||[]).find(t=>qt(j.join(t,"genesis-compiler"))&&qt(j.join(t,".bin","genesis")));if(!e)throw new Error(
|
|
557
557
|
"The installed Genesis compiler executable could not be located.");return j.join(e,".bin")}function Yt(){let e=Ft.resolve(
|
|
558
|
-
"@local/vibe64-genesis/server");return j.resolve(j.dirname(e),"../../bin")}function
|
|
559
|
-
enesis-host-context")}function
|
|
560
|
-
r))),t]}function
|
|
561
|
-
return T(
|
|
562
|
-
return T(
|
|
563
|
-
Ze,e))}async function
|
|
558
|
+
"@local/vibe64-genesis/server");return j.resolve(j.dirname(e),"../../bin")}function hr(){return j.resolve(Yt(),"vibe64-g\
|
|
559
|
+
enesis-host-context")}function Di(e=[]){let t=Yt(),n=fr();return[...(Array.isArray(e)?e:[]).filter(r=>![t,n].includes(Y(
|
|
560
|
+
r))),t]}function gr(e={},{prompt:t=!1}={}){return{...e,...t?{hiddenStackPieces:ur}:{},stackPackages:pr}}function Pi(e={}){
|
|
561
|
+
return T(Bs,e)}function Vi(e={}){return T(Hs,e)}function $i(e={}){return T(Js,e)}function xi(e={}){return T(or,e)}function Li(e={}){
|
|
562
|
+
return T(ir,e)}function Mi(e={}){return T(Xs,e)}function ji(e={}){return T(er,e)}async function Gi(e={}){return Qe(await H(
|
|
563
|
+
Ze,e))}async function Bi(e={}){return tt(await H(et,e))}function Ui(e={}){return T(Ws,e)}function Er(){let e=qs();if(e?.
|
|
564
564
|
contract!==N.derivedArtifacts)throw new Error(`Genesis returned ${e?.contract||"no contract identity"}; expected ${N.derivedArtifacts}\
|
|
565
565
|
.`);let t=Array.isArray(e.artifacts)?e.artifacts:[];if(!t.length||t.some(n=>!Y(n?.path)))throw new Error("Genesis return\
|
|
566
|
-
ed an invalid derived-artifact contract.");return{...e,artifacts:t.map(n=>({...n}))}}var
|
|
567
|
-
map(e=>e.path)),
|
|
568
|
-
if(!
|
|
566
|
+
ed an invalid derived-artifact contract.");return{...e,artifacts:t.map(n=>({...n}))}}var Xt=Er(),Wi=Object.freeze(Xt.artifacts.
|
|
567
|
+
map(e=>e.path)),Jt=new Map(Xt.artifacts.map(e=>[e.id,e])),br=Jt.get("machine-city")?.path,yr=Jt.get("program-city")?.path;
|
|
568
|
+
if(!br||!yr)throw new Error("Genesis did not declare both City projection artifacts.");async function T(e,t={},n={}){let s=Y(
|
|
569
569
|
t.projectRoot);if(!s||!j.isAbsolute(s))throw new TypeError("Genesis operations require an explicit absolute projectRoot.");
|
|
570
|
-
return
|
|
570
|
+
return ar(s,()=>e(gr(t,n)))}async function Hi({workdir:e,promptContext:t}){let n=ee(t);return t.scope==="ephemeral"?n:(await T(
|
|
571
571
|
oe.projectSessionContext,{projectRoot:e,hostDriver:ee,hostDriverInput:t})).output}async function $(e,t,n={}){let s=await T(
|
|
572
572
|
e,n);if(s?.contract!==t)throw new Error(`Genesis returned ${s?.contract||"no contract identity"}; expected ${t}.`);return s}
|
|
573
|
-
function H(e,t={}){return $(n=>
|
|
573
|
+
function H(e,t={}){return $(n=>Zs({...n,name:e}),N.stackSection,t)}async function We(e,t={}){let n=await T(s=>Qs({...s,names:e}),
|
|
574
574
|
t);if(!Array.isArray(n)||n.length!==e.length||n.some((s,r)=>s?.contract!==N.stackSection||s.name!==e[r]))throw new Error(
|
|
575
|
-
"Genesis returned an invalid Stack section inspection batch.");return n}async function
|
|
575
|
+
"Genesis returned an invalid Stack section inspection batch.");return n}async function zi(e={}){if((await vr(e)).status!==
|
|
576
576
|
"current")throw Object.assign(new Error("The project needs a current Genesis format before its Stack can be inspected."),
|
|
577
|
-
{code:"vibe64_stack_format_required"});await
|
|
578
|
-
components:n.components,stackHash:n.stackHash}}async function
|
|
579
|
-
e)]);return lt({environment:n,section:t})}async function
|
|
580
|
-
e)]);return It({environment:n,section:t})}function
|
|
581
|
-
e)}function
|
|
582
|
-
|
|
583
|
-
e)}async function
|
|
584
|
-
status.");return{...t}}function
|
|
585
|
-
async function
|
|
586
|
-
section:
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
resourceEstimates:be({section:n,outputsSection:s,workspaceSetupSection:t})}}
|
|
590
|
-
[Ee,he,ne],e);return be({section:t,outputsSection:n,workspaceSetupSection:s})}
|
|
591
|
-
env,input:n={},projectRoot:s}={}){let r=
|
|
592
|
-
task:o},{prompt:!0})}catch(c){if(c?.code===
|
|
593
|
-
projectRoot:s,request:i,sessionContextInstalled:!0,
|
|
594
|
-
|
|
595
|
-
let u=Kt(a.task)||o;return{context:{genesis:!0,requestedTask:r,
|
|
596
|
-
warnings},originalPrompt:i,prompt:a.prompt,promptId:Y(e.promptId||
|
|
597
|
-
|
|
598
|
-
|
|
577
|
+
{code:"vibe64_stack_format_required"});await xs(j.join(e.projectRoot,"genesis/stack.md"),"utf8");let n=await H(ne,e);return{
|
|
578
|
+
components:n.components,stackHash:n.stackHash}}async function qi(e={}){let[t,n]=await Promise.all([H(ut,e),$(ve,N.environment,
|
|
579
|
+
e)]);return lt({environment:n,section:t})}async function Fi(e={}){let[t,n]=await Promise.all([H(Et,e),$(ve,N.environment,
|
|
580
|
+
e)]);return It({environment:n,section:t})}function Ki(e={}){return T(oe.verify,e)}function Yi(e={}){return $(ve,N.environment,
|
|
581
|
+
e)}function Xi(e={}){return $(Ks,N.projectInspection,e)}function Ji(e={}){return $(tr,N.templates,e)}function Zi(e={}){return $(
|
|
582
|
+
Us,N.templateApplication,e)}function Qi(e={}){return $(Fs,N.engineering,e)}function eo(e={}){return $(zs,N.collaboration,
|
|
583
|
+
e)}async function vr(e={}){let t=await T(Ys,e);if(!Y(t?.status))throw new Error("Genesis did not return a project-format\
|
|
584
|
+
status.");return{...t}}function to(e={}){return $(rr,N.engineering,e)}function no(e={}){return $(sr,N.collaboration,e)}
|
|
585
|
+
async function so({resourcesPreparing:e=!1,...t}={}){let[[n,s,r],i]=await Promise.all([We([he,Ee,ne],t),$(ve,N.environment,
|
|
586
|
+
t)]);return{...Pt({environment:i,section:n,resourcesPreparing:e===!0}),resourceEstimates:be({section:s,outputsSection:n,
|
|
587
|
+
workspaceSetupSection:r})}}async function ro(e={}){let t=await H(Wt,e);return zt({section:t})}async function io(e={}){return Je(
|
|
588
|
+
await H(Xe,e))}async function oo(e={}){return xt(await H(Vt,e))}async function ao(e={}){let[t,n,s]=await We([ne,Ee,he],e);
|
|
589
|
+
return{...await qe({projectRoot:e.projectRoot,section:t}),resourceEstimates:be({section:n,outputsSection:s,workspaceSetupSection:t})}}
|
|
590
|
+
async function co(e={}){let[t,n,s]=await We([Ee,he,ne],e);return be({section:t,outputsSection:n,workspaceSetupSection:s})}
|
|
591
|
+
async function uo({action:e={},environment:t=process.env,input:n={},projectRoot:s}={}){let r=dr(e),i=mr(n,e),o=r,a;try{a=
|
|
592
|
+
await T(Ue,{environment:t,projectRoot:s,request:i,sessionContextInstalled:!0,task:o},{prompt:!0})}catch(c){if(c?.code===
|
|
593
|
+
"BLUEPRINT_INVALID"&&r!=="blueprint")o="blueprint",a=await T(Ue,{environment:t,projectRoot:s,request:i,sessionContextInstalled:!0,
|
|
594
|
+
task:o},{prompt:!0});else if(c?.code==="BLUEPRINT_REQUIRED"&&r!=="start")o="start",a=await T(Ue,{environment:t,projectRoot:s,
|
|
595
|
+
request:i,sessionContextInstalled:!0,task:o},{prompt:!0});else throw c}let u=Kt(a.task)||o;return{context:{genesis:!0,requestedTask:r,
|
|
596
|
+
task:u,verificationCommands:a.verificationCommands,warnings:a.warnings},originalPrompt:i,prompt:a.prompt,promptId:Y(e.promptId||
|
|
597
|
+
e.id)||u}}export{Ai as GENESIS_BLUEPRINT_PATH,Wi as GENESIS_DERIVED_ARTIFACT_PATHS,br as GENESIS_MACHINE_CITY_PATH,yr as GENESIS_PROGRAM_CITY_PATH,
|
|
598
|
+
nt as GENESIS_STACK_CONTRACTS_INCOMPLETE,st as GENESIS_STACK_SECTION_AMBIGUOUS,Ni as GENESIS_SUBSYSTEMS_PATH,js as HOST_CONTEXT_RESOLVER_DATA_ENV,
|
|
599
|
+
Gs as HOST_CONTEXT_RESOLVER_ENV,Si as SOURCE_EXPLANATION_PROMPT_VERSION,ct as VIBE64_APPLICATION_DEPLOYMENT_CONTRACT,ut as VIBE64_APPLICATION_DEPLOYMENT_SECTION,
|
|
599
600
|
Ut as VIBE64_INTEGRATION_SETUP_CONTRACT,Wt as VIBE64_INTEGRATION_SETUP_SECTION,_t as VIBE64_OUTPUTS_CONTRACT,he as VIBE64_OUTPUTS_SECTION,
|
|
600
601
|
le as VIBE64_PACKAGING_CONTRACT,Et as VIBE64_PACKAGING_SECTION,fe as VIBE64_PREVIEW_IDENTITY_COMMAND_PROTOCOL,jt as VIBE64_RESOURCE_ESTIMATES_CONTRACT,
|
|
601
|
-
Ee as VIBE64_RESOURCE_ESTIMATES_SECTION,ze as VIBE64_WORKSPACE_SETUP_CONTRACT,ne as VIBE64_WORKSPACE_SETUP_SECTION,
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
602
|
+
Ee as VIBE64_RESOURCE_ESTIMATES_SECTION,ze as VIBE64_WORKSPACE_SETUP_CONTRACT,ne as VIBE64_WORKSPACE_SETUP_SECTION,Pi as addGenesisStack,
|
|
603
|
+
Zi as applyGenesisTemplate,Kt as assertGenesisPromptTask,Yt as genesisCommandShimDirectory,fr as genesisPackageBinDirectory,
|
|
604
|
+
Ci as genesisParserEnvironment,wn as genesisProjectContractNeedsAttention,mr as genesisPromptRequest,dr as genesisPromptTask,
|
|
605
|
+
Vi as initializeGenesisProject,Mi as inspectGenesisAgentIntegrations,eo as inspectGenesisCollaboration,Er as inspectGenesisDerivedArtifacts,
|
|
606
|
+
Qi as inspectGenesisEngineering,Yi as inspectGenesisEnvironment,Xi as inspectGenesisProject,vr as inspectGenesisProjectFormat,
|
|
607
|
+
$i as inspectGenesisSkills,zi as inspectGenesisStackComponents,H as inspectGenesisStackSection,ji as inspectGenesisSubsystems,
|
|
608
|
+
Gi as inspectVibe64ArchitectureInspection,Bi as inspectVibe64ArchitectureLayout,io as inspectVibe64ConnectedDevelopment,
|
|
609
|
+
qi as inspectVibe64Deployment,ro as inspectVibe64IntegrationSetup,so as inspectVibe64Outputs,Fi as inspectVibe64Packaging,
|
|
610
|
+
oo as inspectVibe64ProjectServices,co as inspectVibe64ResourceEstimates,ao as inspectVibe64WorkspaceSetup,Ji as listGenesisTemplates,
|
|
611
|
+
Ri as mergeArchitectureObservations,pt as parseVibe64DeploymentLines,Ht as parseVibe64IntegrationSetupLines,ge as parseVibe64OutputsLines,
|
|
611
612
|
vt as parseVibe64PackagingLines,$t as parseVibe64ProjectServicesLines,Bt as parseVibe64ResourceEstimatesLines,Q as parseVibe64WorkspaceSetupLines,
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
613
|
+
Ui as refreshGenesisCities,uo as renderGenesisPrompt,gs as resolveVibe64OutputParameters,wt as resolveVibe64PackagingEnvironment,
|
|
614
|
+
no as setGenesisCollaboration,to as setGenesisEngineeringProfile,Ti as sourceExplanationGuidance,ki as sourceExplanationReviewGuidance,
|
|
615
|
+
Li as syncGenesisAgentIntegrations,xi as syncGenesisSkills,_i as validateArchitectureFacts,Oi as validateArchitectureObservations,
|
|
616
|
+
Ki as verifyGenesisProject,Hi as vibe64ConversationInstructions,ee as vibe64Driver,Ii as vibe64HostContextEnvironment,Ms as vibe64HostContextRegistry,
|
|
617
|
+
hr as vibe64HostContextResolverPath,Di as withGenesisCommandShim};
|