vibe64 0.1.70 → 0.1.71
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 +1074 -1072
- package/bin/upgrade-state.js +2386 -2385
- package/node_modules/@local/vibe64-genesis/src/server/agentSpecs.js +36 -31
- package/node_modules/@local/vibe64-terminals/src/server/sessionWorkOperationCommand.js +689 -687
- package/package.json +1 -1
- package/server.bundle.mjs +21977 -21976
|
@@ -64,34 +64,34 @@ quiredFiles")i[a]=f(p[2],l,t,p[1],u+1).map(E=>g(E,l,t,p[1],u+1));else{let[E]=f(p
|
|
|
64
64
|
dir")i[a]=g(E,l,t,"Inspector directory",u+1);else if(a==="previewLocator")i[a]=ut(E,t,u+1);else{let h=Number(E),M=a==="t\
|
|
65
65
|
imeout"?he:Ee;(!/^[1-9][0-9]*$/u.test(E)||!Number.isSafeInteger(h)||h>M)&&s(l,t,`${p[1]} must be from 1 to ${M}.`,u+1),i[a]=
|
|
66
66
|
a==="timeout"?h*1e3:h}}}return o(),r.length||s(l,t,"Use an Inspector entry or - Nothing."),r}function ut(e,n,t){return g(
|
|
67
|
-
e,l,n,"Preview locator",t,{allowRoot:!1}),e.endsWith(".js")||s(l,n,"Preview locator must name a .js file.",t),e}var fn=Object.freeze({parseVibe64ArchitectureInspectionLines:ct});var ge="vibe64.architecture-layout.v1",ye="Architecture layout",
|
|
67
|
+
e,l,n,"Preview locator",t,{allowRoot:!1}),e.endsWith(".js")||s(l,n,"Preview locator must name a .js file.",t),e}var fn=Object.freeze({parseVibe64ArchitectureInspectionLines:ct});var ge="vibe64.architecture-layout.v1",ye="Architecture layout",v="VIBE64_ARCHITECTURE_LAYOUT_INVALID",$=Object.freeze([
|
|
68
68
|
"layer","libraries","support"]);function pt(e,n={}){let{path:t="genesis/stack.md#Architecture layout"}=n;if(Array.isArray(
|
|
69
|
-
e)||s(
|
|
70
|
-
!o.purpose||!o.subsystems.length)&&s(
|
|
69
|
+
e)||s(v,t,"Expected exact Stack section lines."),y(e))return[];let r=[],c=new Set,i=new Set,o;function u(){o&&((!o.kind||
|
|
70
|
+
!o.purpose||!o.subsystems.length)&&s(v,t,`${o.id} needs Kind, Purpose and at least one Subsystem.`),r.push(o))}for(let[m,
|
|
71
71
|
S]of e.entries()){let R=S.trim();if(!R)continue;let p=R.match(/^### Group `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(p){u(),
|
|
72
|
-
c.has(p[1])&&s(
|
|
73
|
-
(!o||!a)&&s(
|
|
74
|
-
if(a[1]==="Subsystem"){let h=g(E[0],
|
|
75
|
-
ce.",m+1),i.add(h),o.subsystems.push({root:h})}else{let h=a[1].toLowerCase();o[h]!==void 0&&s(
|
|
76
|
-
1),h==="kind"&&!$.includes(E[0])&&s(
|
|
77
|
-
r.length||s(
|
|
72
|
+
c.has(p[1])&&s(v,t,"Duplicate group id.",m+1),c.add(p[1]),o={id:p[1],title:p[2],subsystems:[]};continue}let a=R.match(/^- (Kind|Purpose|Subsystem): (.+)$/u);
|
|
73
|
+
(!o||!a)&&s(v,t,"Expected a Group heading or Kind, Purpose, Subsystem field.",m+1);let E=f(a[2],v,t,a[1],m+1,{count:1});
|
|
74
|
+
if(a[1]==="Subsystem"){let h=g(E[0],v,t,"Subsystem root",m+1);i.has(h)&&s(v,t,"Each directory root may be placed only on\
|
|
75
|
+
ce.",m+1),i.add(h),o.subsystems.push({root:h})}else{let h=a[1].toLowerCase();o[h]!==void 0&&s(v,t,`Duplicate ${a[1]}.`,m+
|
|
76
|
+
1),h==="kind"&&!$.includes(E[0])&&s(v,t,`Kind must be ${$.slice(0,-1).join(", ")} or ${$.at(-1)}.`,m+1),o[h]=E[0]}}return u(),
|
|
77
|
+
r.length||s(v,t,"Use a Group entry or - Nothing."),r}var Sn=Object.freeze({parseVibe64ArchitectureLayoutLines:pt});var lt="custom",Se="vibe64.connected-sources.v2",X=Object.freeze([Object.freeze({value:"npm",label:"npm (Node.js)"}),Object.
|
|
78
78
|
freeze({value:"composer",label:"Composer (PHP)"}),Object.freeze({value:"pip",label:"pip (Python)"}),Object.freeze({value:"\
|
|
79
79
|
bundler",label:"Bundler (Ruby)"}),Object.freeze({value:"gomod",label:"Go modules"}),Object.freeze({value:"cargo",label:"\
|
|
80
80
|
Cargo (Rust)"}),Object.freeze({value:"maven",label:"Maven"}),Object.freeze({value:"gradle",label:"Gradle"}),Object.freeze(
|
|
81
|
-
{value:"nuget",label:"NuGet (.NET)"}),Object.freeze({value:lt,label:"custom"})]),
|
|
81
|
+
{value:"nuget",label:"NuGet (.NET)"}),Object.freeze({value:lt,label:"custom"})]),ve="Vibe64's preparer appends the absol\
|
|
82
82
|
ute script path and --phase prepare|verify, --source-root <the session's copy of the repository>, --project-root <consum\
|
|
83
83
|
ing project>, --sources-file <absolute Sources file> and --repository <GitHub URL> arguments to the Stack's Custom runne\
|
|
84
|
-
r command, once per phase; execution checks the script remains inside the consuming project.",
|
|
85
|
-
value));var
|
|
84
|
+
r command, once per phase; execution checks the script remains inside the consuming project.",_n=Object.freeze(X.map(e=>e.
|
|
85
|
+
value));var _e="Connected development",Re="vibe64.connected-development.v1";var Z="with `runtime` [in `workdir`]: `command` `argument`...",mt=Object.freeze({Prepare:`- Prepare \`label\` ${Z}`,Verify:`\
|
|
86
86
|
- Verify \`label\` ${Z}`,"Custom runner":`- Custom runner ${Z}`}),be=Object.freeze(["- Default package type: `type`","- \
|
|
87
87
|
Sources file: `path`",...Object.values(mt)]);var Te="vibe64.integration-setup.v1",Ie="Integration setup";var Oe="- Command with `runtime` in `workdir`: `command` `argument`...";var j="vibe64.preview-identity.command.v1";var J=new Set(["HOME","LOGNAME","NODE_OPTIONS","PATH","TMPDIR","USER"]),gt=new Set(["email","login","user-id"]),yt=1e4,St=3e4,
|
|
88
|
-
|
|
88
|
+
vt=[["- Command: ","command","Command","`tools/preview-identity` `argument`..."],["- Protocol: ","protocol","Protocol",`\
|
|
89
89
|
\`${j}\``],["- Identity types: ","identityTypes","Identity types",`one or more of ${[...gt].map(e=>`\`${e}\``).join(" ")}`],
|
|
90
90
|
["- Enabled environment: ","enabledEnvironment","Enabled environment","`ENV_NAME`"],["- Secret environment: ","secretEnv\
|
|
91
91
|
ironment","Secret environment","`ENV_NAME`"],["- Runtimes: ","runtimes","Runtimes","`runtime`..."],["- Timeout ms: ","ti\
|
|
92
|
-
meoutMs","Timeout ms",`\`1\` through \`${St}\` (default ${yt})`]],we=
|
|
92
|
+
meoutMs","Timeout ms",`\`1\` through \`${St}\` (default ${yt})`]],we=vt.map(([e,,,n])=>`${e}${n}`);var ke="vibe64.outputs.v1",Ne="Outputs";var _t=new Set(["finite","interactive"]),Rt=new Set(["development","test"]),bt=new Set(["terminal","web"]),Ae=16,Q=e=>[...e].
|
|
93
93
|
map(n=>`\`${n}\``).join(" or "),Ce=Object.freeze(["### Target `id`: Label","#### Parameter `id`: Label","#### Presentati\
|
|
94
|
-
on","#### Preview identity","#### Download `id`"]),N=Object.freeze({target:["- Default.",`- Mode: ${Q(
|
|
94
|
+
on","#### Preview identity","#### Download `id`"]),N=Object.freeze({target:["- Default.",`- Mode: ${Q(_t)}`,`- Data: ${Q(
|
|
95
95
|
Rt)}`,"- Workdir: `path`","- Runtimes: `runtime`...","- Prepare|Build|Run `label`: `command` `argument`..."],parameter:[
|
|
96
96
|
"- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${Q(bt)}`,"- Preferred port: `1024` th\
|
|
97
97
|
rough `65535`","- URL path: `/path`","- Ready when: `GET` `/path` returns `200`"],previewIdentity:we,download:["- Path: \
|
|
@@ -103,7 +103,7 @@ Running typical MiB","runningTypical"],["Running high MiB","runningHigh"],["Typi
|
|
|
103
103
|
h as `nodejs` or `php`. Paths are canonical project-relative paths; `.` is the project root.","A section containing only\
|
|
104
104
|
`- Nothing.` explicitly declares nothing. Blank lines are ignored."].join(`
|
|
105
105
|
`),d=e=>e.map(n=>` ${n}`).join(`
|
|
106
|
-
`);function
|
|
106
|
+
`);function _({name:e,title:n,section:t,contract:r="",summary:c,body:i,example:o}){return{name:e,title:n,section:t,example:o,
|
|
107
107
|
text:()=>[`# ${n}`,"",`Section: \`## ${t}\` in \`genesis/stack.md\`${r?`, contract \`${r}\``:""}. Vibe64 owns its gramma\
|
|
108
108
|
r and meaning; Genesis transports the exact section text.`,"",c,"",i.trim(),"",It,"","## Example","","```markdown",`## ${t}`,
|
|
109
109
|
"",o.trim(),"```",""].join(`
|
|
@@ -159,7 +159,7 @@ r and meaning; Genesis transports the exact section text.`,"",c,"",i.trim(),"",I
|
|
|
159
159
|
- Path: \`exports/report.csv\`
|
|
160
160
|
- Name: \`report.csv\`
|
|
161
161
|
- Media type: \`text/csv\`
|
|
162
|
-
`,hs=Object.freeze([
|
|
162
|
+
`,hs=Object.freeze([_({name:"workspace-setup",title:"Workspace setup",section:Ve,contract:Me,summary:"Ordered commands t\
|
|
163
163
|
hat prepare a session's working copy (dependencies, generated files, migrations) before any Output runs.",body:`
|
|
164
164
|
Each entry:
|
|
165
165
|
${d([Le])}
|
|
@@ -178,7 +178,7 @@ act recipe; changing any step runs setup again, and Outputs stay pending until i
|
|
|
178
178
|
step. Keep every step repeatable and non-destructive.
|
|
179
179
|
`,example:"\n- Prepare `Install dependencies` from `package.json` `package-lock.json` with `nodejs`: `npm` `ci`\n- Prepare\
|
|
180
180
|
`Migrate database` with `nodejs` if `migrations` exists: `npm` `run` `db:migrate`\n- Prepare `Install client` with `node\
|
|
181
|
-
js` in `client` when `client/package.json` exists: `npm` `ci`\n"}),
|
|
181
|
+
js` in `client` when `client/package.json` exists: `npm` `ci`\n"}),_({name:"outputs",title:"Outputs",section:Ne,contract:ke,
|
|
182
182
|
summary:"The runnable targets Vibe64 offers: interactive terminal or web apps shown in Preview, and finite runs that pro\
|
|
183
183
|
duce downloads.",body:`
|
|
184
184
|
Headings, each target followed by its entries and then optional blocks:
|
|
@@ -224,7 +224,7 @@ ${d(N.previewIdentity)}
|
|
|
224
224
|
its identity exchange disabled unless both are present.
|
|
225
225
|
- The command's stdin/stdout protocol: \`vibe64-helper spec preview-identity-command\`. The configured account names: \`vib\
|
|
226
226
|
e64-helper spec preview-identities\`.
|
|
227
|
-
`,example:Ot}),
|
|
227
|
+
`,example:Ot}),_({name:"deployment",title:"Deployment",section:ae,contract:oe,summary:"The commands that turn a project \
|
|
228
228
|
revision into a running deployed application.",body:`
|
|
229
229
|
Entries:
|
|
230
230
|
${d(C)}
|
|
@@ -273,8 +273,8 @@ ipt, and where the host lacks something the script fails with one plain sentence
|
|
|
273
273
|
k and memory of its own (a count from 1 to 100). Without it a host runs one copy. Declare it only when no copy keeps any\
|
|
274
274
|
thing a later request needs: uploaded files on its own disk, sign-ins or sessions in memory or in files, or a scheduled \
|
|
275
275
|
job that must run once. Such state belongs in a declared resource (a database, a bucket, Redis); a host never guesses it\
|
|
276
|
-
from the source.
|
|
277
|
-
|
|
276
|
+
from the source. A host that can't run Migrate once per release runs it in each copy as it starts, so a migration takes\
|
|
277
|
+
a lock and does nothing once applied.
|
|
278
278
|
- One Ready when entry is required (status 200 through 399). Workdir defaults to \`.\`. Each other entry appears at most o\
|
|
279
279
|
nce.
|
|
280
280
|
- Services: an application that runs as more than one kind of process (a different machine size, untrusted work kept apa\
|
|
@@ -299,7 +299,12 @@ ${d(H)}
|
|
|
299
299
|
its own folder; \`own bucket\` (the default) lets the person enter a bucket's settings.
|
|
300
300
|
- Recreate on restore lists project-relative globs (only \`*\` and \`**\`) that a restored deployment rebuilds with its Prep\
|
|
301
301
|
are step, such as installed dependencies. It requires a Prepare step.
|
|
302
|
-
- Migrate applies pending migrations without destroying data.
|
|
302
|
+
- Migrate applies pending migrations without destroying data. A host runs it once per release, on a temporary copy of th\
|
|
303
|
+
e new release with its Env and resources, before any copy of that release starts; a host that can't runs it as each copy\
|
|
304
|
+
starts. Either way the version before keeps serving on the migrated database while the release rolls out, and again if \
|
|
305
|
+
the release fails, and returning to an earlier version returns its code, never its schema. So a migration only adds what\
|
|
306
|
+
the version before still works with (expand first), and a column or table the code stops using is removed in a later re\
|
|
307
|
+
lease, once no version that reads it serves (contract later).
|
|
303
308
|
- Prepare and Build never need the database or another managed service: a host may run them alone, without those credent\
|
|
304
309
|
ials, to check that a revision builds before it publishes it.
|
|
305
310
|
- The host gives every step \`APP_ENV\`, the environment it deploys to: \`staging\` or \`production\`. Vibe64 runs a session's\
|
|
@@ -319,7 +324,7 @@ aging: process.env.STAGING_EMAIL_TO }[process.env.APP_ENV]; if (to) await mailer
|
|
|
319
324
|
info("%s: email to %s not sent", process.env.APP_ENV, message.to);\`
|
|
320
325
|
`,example:"\n- Runtimes: `nodejs`\n- Recreate on restore: `node_modules`\n- Generated secrets: `SESSION_SECRET`\n- Prepare `\
|
|
321
326
|
Install`: `npm` `ci`\n- Build `Build`: `npm` `run` `build`\n- Migrate `Migrate`: `npm` `run` `db:migrate`\n- Serve `Serve`:\
|
|
322
|
-
`env` `NODE_ENV=production` `node` `server.js`\n- Ready when: `GET` `/health` returns `200`\n"}),
|
|
327
|
+
`env` `NODE_ENV=production` `node` `server.js`\n- Ready when: `GET` `/health` returns `200`\n"}),_({name:"packaging",title:"\
|
|
323
328
|
Packaging",section:ue,contract:ce,summary:"Source facts Vibe64 needs to turn this project into distributable packages: r\
|
|
324
329
|
egistry packages, static web bundles and generated mobile app shells. Where each package is published (targets, channels\
|
|
325
330
|
, builders) is Vibe64 project state, never this section.",body:`
|
|
@@ -350,7 +355,7 @@ dependencies`: `npm` `ci`\n- Build `Build bundled client`: `npm` `run` `build`\n
|
|
|
350
355
|
Platforms: `android`\n- Id: `com.example.notes`\n- Name: `Notes`\n- Icon: `assets/icon-1024.png`\n- Version from: `package.\
|
|
351
356
|
json`\n- Deep link scheme from: `APP_URL_SCHEME`\n- Permission `camera`: Take photos to attach to notes.\n\n### Package `sdk\
|
|
352
357
|
`: Notes SDK\n\n- Packer: `npm`\n- Workdir: `packages/notes-sdk`\n- Runtimes: `nodejs`\n- Version from: `package.json`\n"}),
|
|
353
|
-
|
|
358
|
+
_({name:"resource-estimates",title:"Resource estimates",section:je,contract:xe,summary:"Optional memory planning hints f\
|
|
354
359
|
or Outputs and Workspace setup. They are not observed usage, reservations, minimum requirements or granted limits; the e\
|
|
355
360
|
xecution host owns those choices.",body:`
|
|
356
361
|
Headings: \`\` ### Output \`id\` \`\` (an id declared in Outputs) or \`### Workspace setup\` (requires declared setup steps), ea\
|
|
@@ -364,8 +369,8 @@ elds are rejected. The section is at most 64 KiB and 2048 lines.
|
|
|
364
369
|
- Invalid estimates never change Outputs availability or setup readiness; the host then uses its generic policy. Changin\
|
|
365
370
|
g only estimates does not rerun setup.
|
|
366
371
|
`,example:"\n### Output `app`\n\n- Startup typical MiB: `1024`\n- Startup high MiB: `1536`\n- Running typical MiB: `768`\n- Ru\
|
|
367
|
-
nning high MiB: `1536`\n\n### Workspace setup\n\n- Typical MiB: `1024`\n- High MiB: `1536`\n"}),
|
|
368
|
-
opment",title:"Connected development",section:
|
|
372
|
+
nning high MiB: `1536`\n\n### Workspace setup\n\n- Typical MiB: `1024`\n- High MiB: `1536`\n"}),_({name:"connected-devel\
|
|
373
|
+
opment",title:"Connected development",section:_e,contract:Re,summary:"How this project consumes the working source of it\
|
|
369
374
|
s connected repositories (its own dependencies under development) in a session.",body:`
|
|
370
375
|
Entries:
|
|
371
376
|
${d(be)}
|
|
@@ -381,10 +386,10 @@ on's connected repositories and excludes it from Git. Its JSON: \`{"schema":"${S
|
|
|
381
386
|
me":"\u2026","repository":"https://github.com/owner/repo","relationship":"dependency|composition","type":"npm","sourceRoot":"\
|
|
382
387
|
/absolute/session/connected/repo"}]}\`; each \`sourceRoot\` is this session's own copy of that repository, and a custom con\
|
|
383
388
|
nection also carries \`"script"\`.
|
|
384
|
-
- Custom connections: ${
|
|
389
|
+
- Custom connections: ${ve}
|
|
385
390
|
`,example:"\n- Default package type: `npm`\n- Sources file: `.connected-sources.json`\n- Prepare `Link connected packages` \
|
|
386
391
|
with `nodejs`: `node` `tools/link-connected.mjs`\n- Verify `Check connected packages` with `nodejs`: `node` `tools/verify\
|
|
387
|
-
-connected.mjs`\n"}),
|
|
392
|
+
-connected.mjs`\n"}),_({name:"project-services",title:"Project services",section:De,contract:Pe,summary:"Foreground help\
|
|
388
393
|
er processes (workers, local reference services) that Vibe64 starts before an Output.",body:`
|
|
389
394
|
Entries:
|
|
390
395
|
${d([$e])}
|
|
@@ -399,7 +404,7 @@ ver spawn untracked background work.
|
|
|
399
404
|
rd the address in the session's ignored runtime folder) and check your own instance's readiness. Never assume a shared f\
|
|
400
405
|
ixed port.
|
|
401
406
|
`,example:"\n- Start `worker` with `nodejs` in `tools`: `npm` `run` `worker`\n- Start `reference` per session with `nodejs\
|
|
402
|
-
`: `npm` `run` `reference:service`\n"}),
|
|
407
|
+
`: `npm` `run` `reference:service`\n"}),_({name:"integration-setup",title:"Integration setup",section:Ie,contract:Te,summary:"\
|
|
403
408
|
The one application-owned command the editor's Integrations controls call to configure, connect and check the applicatio\
|
|
404
409
|
n's external integrations.",body:`
|
|
405
410
|
Exactly one entry:
|
|
@@ -407,7 +412,7 @@ ${d([Oe])}
|
|
|
407
412
|
|
|
408
413
|
The command's request/response protocol and the \`integrations.json\` usage: \`vibe64-helper spec integration-setup-command\
|
|
409
414
|
\`.
|
|
410
|
-
`,example:"\n- Command with `nodejs` in `.`: `node` `scripts/integrations.js`\n"}),
|
|
415
|
+
`,example:"\n- Command with `nodejs` in `.`: `node` `scripts/integrations.js`\n"}),_({name:"architecture-inspection",title:"\
|
|
411
416
|
Architecture inspection",section:me,contract:de,summary:"Optional project-owned inspectors that the Architecture view ru\
|
|
412
417
|
ns to observe the application's structure (pages, routes, entry points).",body:`
|
|
413
418
|
Headings: \`\` ### Inspector \`id\`: Title \`\`, each followed by fields:
|
|
@@ -427,7 +432,7 @@ eal folder.
|
|
|
427
432
|
- \`cacheDirectory\` is an absolute directory for this inspector alone, outside the source; the inspector may read and wri\
|
|
428
433
|
te only there. When it is absent or unusable, inspect without a cache. Ignore unknown request fields.
|
|
429
434
|
`,example:"\n### Inspector `ui`: UI routes\n\n- Runtime: `nodejs`\n- Directory: `.`\n- Command: `node` `tools/inspect-ui.mjs`\
|
|
430
|
-
\n- Timeout seconds: `30`\n- Max output bytes: `1048576`\n- Entry files: `src/main.js`\n"}),
|
|
435
|
+
\n- Timeout seconds: `30`\n- Max output bytes: `1048576`\n- Entry files: `src/main.js`\n"}),_({name:"architecture-layout",
|
|
431
436
|
title:"Architecture layout",section:ye,contract:ge,summary:"Presentation groups for the Architecture view. Declarations \
|
|
432
437
|
neither discover subsystems nor change their ownership.",body:`
|
|
433
438
|
Headings: \`\` ### Group \`id\`: Title \`\`, each followed by:
|