vibe64 0.1.67 → 0.1.68
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.
|
@@ -1,106 +1,105 @@
|
|
|
1
1
|
import { createRequire as __vibe64CreateRequire } from 'node:module';const require=__vibe64CreateRequire(import.meta.url);
|
|
2
|
-
import{ARCHITECTURE_OBSERVATIONS_SCHEMA as
|
|
3
|
-
or",this.code=n,r!==void 0&&(this.details=r)}},
|
|
2
|
+
import{ARCHITECTURE_OBSERVATIONS_SCHEMA as dt}from"genesis-compiler";import $ from"node:path";var M=class extends Error{constructor(n,t,r=void 0){super(t),this.name="Vibe64StackOperationErr\
|
|
3
|
+
or",this.code=n,r!==void 0&&(this.details=r)}},z=Object.freeze({VIBE64_WORKSPACE_SETUP_INVALID:"workspace-setup",VIBE64_OUTPUTS_INVALID:"\
|
|
4
4
|
outputs",VIBE64_DEPLOYMENT_INVALID:"deployment",VIBE64_PACKAGING_INVALID:"packaging",VIBE64_RESOURCE_ESTIMATES_INVALID:"\
|
|
5
5
|
resource-estimates",VIBE64_CONNECTED_DEVELOPMENT_INVALID:"connected-development",VIBE64_PROJECT_SERVICES_INVALID:"projec\
|
|
6
6
|
t-services",VIBE64_INTEGRATION_SETUP_INVALID:"integration-setup",VIBE64_ARCHITECTURE_INSPECTION_INVALID:"architecture-in\
|
|
7
7
|
spection",VIBE64_ARCHITECTURE_LAYOUT_INVALID:"architecture-layout"}),Ne=/ Exact grammar: vibe64-helper spec [a-z-]+\.$/u;
|
|
8
|
-
function Ae(e,n){let t=
|
|
9
|
-
n.map(t=>t[1])}function
|
|
8
|
+
function Ae(e,n){let t=z[e],r=String(n).replace(Ne,"");return t?`${r} Exact grammar: vibe64-helper spec ${t}.`:r}function s(e,n,t,r,c={}){throw new M(e,Ae(e,t),{path:n,...r===void 0?{}:{line:r},...c})}function Pe(e){let n=[...String(e||"").matchAll(/`([^`\r\n]+)`/gu)];return n.length===0||n.map(t=>t[0]).join(" ")!==e?null:
|
|
9
|
+
n.map(t=>t[1])}function _(e,n,t,r,c,i={}){let{count:o,maximum:u=64}=i,d=Pe(e);if(!d||d.length>u||o!==void 0&&d.length!==
|
|
10
10
|
o||d.some(y=>y.length>4096||/[\0\r\n]/u.test(y))){let y=o===void 0?"separate non-empty":`exactly ${o}`;s(n,t,`${r} must \
|
|
11
|
-
contain ${y} backticked ${o===1?"value":"values"}.`,c)}return d}function
|
|
12
|
-
test(e)&&!$.isAbsolute(e)&&!e.split(/[\\/]/u).includes("..")}function
|
|
11
|
+
contain ${y} backticked ${o===1?"value":"values"}.`,c)}return d}function Ce(e=""){return typeof e=="string"&&!!e&&!/[\s\0{}]/u.
|
|
12
|
+
test(e)&&!$.isAbsolute(e)&&!e.split(/[\\/]/u).includes("..")}function I(e,n,t,r,c){let i=_(e,n,t,r,c);return Ce(i[0])||s(
|
|
13
13
|
n,t,`${r} must begin with a safe executable.`,c),i}function De(e=""){return typeof e=="string"&&!!e&&!/[\0\r\n\\]/u.test(
|
|
14
14
|
e)&&!$.posix.isAbsolute(e)&&$.posix.normalize(e)===e&&!e.split("/").some(n=>!n||n==="..")}function E(e,n,t,r,c,i={}){let{
|
|
15
|
-
allowRoot:o=!0}=i;return(!De(e)||!o&&e===".")&&s(n,t,`${r} must be a canonical project-relative path.`,c),e}function
|
|
15
|
+
allowRoot:o=!0}=i;return(!De(e)||!o&&e===".")&&s(n,t,`${r} must be a canonical project-relative path.`,c),e}function k(e,n,t,r,c){let i=_(e,n,t,r,c);return i.some(o=>!/^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(o))&&s(n,t,`${r} must use \
|
|
16
16
|
lowercase technology ids separated into backticked values.`,c),new Set(i).size!==i.length&&s(n,t,`${r} contains a duplic\
|
|
17
|
-
ate technology id.`,c),i}function g(e=[]){let n=e.map(t=>t.trim()).filter(Boolean);return n.length===1&&n[0]==="- Nothing."}var
|
|
18
|
-
{SPEC_BY_ERROR_CODE:
|
|
19
|
-
up to ";var Ue=Object.freeze(["fuse","gvisor"]);var yt=Object.freeze({APP_ENV:"Deployment never sets APP_ENV: the host gives every step the environment it deploys to. R\
|
|
17
|
+
ate technology id.`,c),i}function g(e=[]){let n=e.map(t=>t.trim()).filter(Boolean);return n.length===1&&n[0]==="- Nothing."}var Et=Object.freeze(
|
|
18
|
+
{SPEC_BY_ERROR_CODE:z});var F="vibe64.application-deployment.v1",q="Deployment";var Ve="- Recreate on restore: ",je="- Generated secrets: ",xe="- Setup code: ",Le="- Sandbox allows: ",Be="- Packages: ";var Ue="- Instances: up to ";var We=Object.freeze(["fuse","gvisor"]);var _t=Object.freeze({APP_ENV:"Deployment never sets APP_ENV: the host gives every step the environment it deploys to. R\
|
|
20
19
|
emove APP_ENV from Deployment.",SIDE_EFFECTS:"SIDE_EFFECTS was replaced by APP_ENV, which the host gives every step. Rem\
|
|
21
|
-
ove SIDE_EFFECTS from Deployment."}),
|
|
20
|
+
ove SIDE_EFFECTS from Deployment."}),Ge=Object.freeze({prepare:0,build:1,migrate:2,serve:3}),x=Object.keys(Ge).map(e=>e[0].
|
|
22
21
|
toUpperCase()+e.slice(1)),K=Object.freeze(["- Workdir: `path`","- Runtimes: `runtime`...",`${Ve}\`glob\`...`,`${je}\`NAME\
|
|
23
|
-
\`...`,`${
|
|
24
|
-
200`",`- ${
|
|
22
|
+
\`...`,`${xe}\`NAME\``,`${Le}${We.map(e=>`\`${e}\``).join(" ")}`,`${Be}\`package\`...`,`${Ue}\`count\``,"- Ready when: `\
|
|
23
|
+
GET` `/path` returns `200`",`- ${x.join("|")} \`label\`: \`command\` \`argument\`...`]);var Y="vibe64.packaging.v1",X="Packaging",St=Object.freeze(["genesis",".genesis",".agents",".claude",".codex",".opencode"]);var He=Object.freeze({npm:Object.freeze({entries:["workdir","runtimes","prepare","build","environment","versionFrom"],required:[
|
|
25
24
|
"versionFrom"],versionSources:["package.json","external"]}),"python-dist":Object.freeze({entries:["workdir","runtimes","\
|
|
26
25
|
prepare","build","environment","output","versionFrom"],required:["build","output","versionFrom"],versionSources:["pyproj\
|
|
27
26
|
ect.toml","external"]}),"web-bundle":Object.freeze({entries:["workdir","runtimes","prepare","build","environment","outpu\
|
|
28
27
|
t"],required:["build","output"],versionSources:[]}),capacitor:Object.freeze({entries:["workdir","content","platforms","a\
|
|
29
28
|
pplicationId","name","icon","versionFrom","deepLinkSchemeFrom","appLinkDomainsFrom","permission"],required:["content","p\
|
|
30
29
|
latforms","applicationId","name","icon","versionFrom"],versionSources:["package.json","external"]})}),B=Object.freeze(Object.
|
|
31
|
-
keys(
|
|
32
|
-
\``).join(" | "),
|
|
30
|
+
keys(He)),ze=Object.freeze(["android"]),Fe=Object.freeze(["package.json","pyproject.toml","external"]),L=e=>e.map(n=>`\`${n}\
|
|
31
|
+
\``).join(" | "),v=Object.freeze([["- Packer: ","packer",`- Packer: ${L(B)}`],["- Workdir: ","workdir","- Workdir: `path\
|
|
33
32
|
`"],["- Runtimes: ","runtimes","- Runtimes: `runtime`..."],["- Output: ","output","- Output: `path`"],["- Version from: ",
|
|
34
|
-
"versionFrom",`- Version from: ${
|
|
33
|
+
"versionFrom",`- Version from: ${L(Fe)}`],["- Platforms: ","platforms",`- Platforms: ${L(ze)}...`],["- Id: ","applicatio\
|
|
35
34
|
nId","- Id: `reverse.dns.id`"],["- Name: ","name","- Name: `Display name`"],["- Icon: ","icon","- Icon: `path/to/icon-10\
|
|
36
35
|
24.png`"],["- Deep link scheme from: ","deepLinkSchemeFrom","- Deep link scheme from: `ENV_NAME`"],["- App link domains \
|
|
37
|
-
from: ","appLinkDomainsFrom","- App link domains from: `ENV_NAME`"]]),
|
|
38
|
-
|
|
39
|
-
ntent: package `web-bundle-id`",...
|
|
36
|
+
from: ","appLinkDomainsFrom","- App link domains from: `ENV_NAME`"]]),Z="### Package `id`: Label",J=Object.freeze([v[0][2],
|
|
37
|
+
v[1][2],v[2][2],"- Prepare|Build `label`: `command` `argument`...","- Environment `NAME`: `value`",v[3][2],v[4][2],"- Co\
|
|
38
|
+
ntent: package `web-bundle-id`",...v.slice(5).map(([,,e])=>e),"- Permission `id`: User-facing reason."]),It=Object.freeze(
|
|
40
39
|
{packer:"Packer",workdir:"Workdir",runtimes:"Runtimes",prepare:"Prepare",build:"Build",environment:"Environment",output:"\
|
|
41
40
|
Output",versionFrom:"Version from",content:"Content",platforms:"Platforms",applicationId:"Id",name:"Name",icon:"Icon",deepLinkSchemeFrom:"\
|
|
42
|
-
Deep link scheme from",appLinkDomainsFrom:"App link domains from",permission:"Permission"});var Q="vibe64.architecture-inspection.v1",ee="Architecture inspection",l="VIBE64_ARCHITECTURE_INSPECTION_INVALID",
|
|
43
|
-
nesis/stack.md#Architecture inspection",te=120,ne=64*1024*1024,se=64*1024,
|
|
41
|
+
Deep link scheme from",appLinkDomainsFrom:"App link domains from",permission:"Permission"});var Q="vibe64.architecture-inspection.v1",ee="Architecture inspection",l="VIBE64_ARCHITECTURE_INSPECTION_INVALID",qe="ge\
|
|
42
|
+
nesis/stack.md#Architecture inspection",te=120,ne=64*1024*1024,se=64*1024,Ke=Object.freeze(["runtimeRequirements","workd\
|
|
44
43
|
ir","argv","timeout","maxBuffer"]),N=Object.freeze({Runtime:["runtimeRequirements","`runtime`..."],Directory:["workdir",
|
|
45
44
|
"`path`"],Command:["argv","`command` `argument`..."],"Timeout seconds":["timeout",`\`1\` through \`${te}\``],"Max output\
|
|
46
45
|
bytes":["maxBuffer",`\`1\` through \`${ne}\``],"Entry files":["entryFiles","`path`... (optional)"],"Required files":["r\
|
|
47
|
-
equiredFiles","`path`... (optional)"],"Preview locator":["previewLocator","`path` (optional .js file)"]}),
|
|
48
|
-
`^- (${Object.keys(N).join("|")}): (.+)$`,"u");function
|
|
49
|
-
ture inspection requires exact Stack section lines."),g(e))return[];let r=[],c=new Set,i;function o(){if(i){for(let u of
|
|
46
|
+
equiredFiles","`path`... (optional)"],"Preview locator":["previewLocator","`path` (optional .js file)"]}),Ye=new RegExp(
|
|
47
|
+
`^- (${Object.keys(N).join("|")}): (.+)$`,"u");function Xe(e,n={}){let{path:t=qe}=n;if(Array.isArray(e)||s(l,t,"Architec\
|
|
48
|
+
ture inspection requires exact Stack section lines."),g(e))return[];let r=[],c=new Set,i;function o(){if(i){for(let u of Ke)
|
|
50
49
|
i[u]===void 0&&s(l,t,`${i.id} is missing ${u}.`);r.push(i),i=null}}for(let[u,d]of e.entries()){let y=d.trim();if(!y)continue;
|
|
51
|
-
let
|
|
52
|
-
d.",u+1),c.add(
|
|
53
|
-
let f=Object.entries(N).map(([m,[,
|
|
54
|
-
of: ${f}.`,u+1)}let[a]=N[p[1]];if(i[a]!==void 0&&s(l,t,`Duplicate ${p[1]}.`,u+1),a==="runtimeRequirements")i[a]=
|
|
55
|
-
t,"Inspector runtime",u+1);else if(a==="argv")i[a]=
|
|
56
|
-
quiredFiles")i[a]=
|
|
57
|
-
dir")i[a]=E(f,l,t,"Inspector directory",u+1);else if(a==="previewLocator")i[a]=
|
|
58
|
-
imeout"?te:ne;(!/^[1-9][0-9]*$/u.test(f)||!Number.isSafeInteger(m)||m>
|
|
59
|
-
a==="timeout"?m*1e3:m}}}return o(),r.length||s(l,t,"Use an Inspector entry or - Nothing."),r}function
|
|
60
|
-
e,l,n,"Preview locator",t,{allowRoot:!1}),e.endsWith(".js")||s(l,n,"Preview locator must name a .js file.",t),e}var vt=Object.freeze({parseVibe64ArchitectureInspectionLines:
|
|
50
|
+
let S=y.match(/^### Inspector `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(S){o(),c.has(S[1])&&s(l,t,"Duplicate inspector i\
|
|
51
|
+
d.",u+1),c.add(S[1]),i={id:S[1],title:S[2]};continue}i||s(l,t,"Expected an Inspector heading.",u+1);let p=y.match(Ye);if(!p){
|
|
52
|
+
let f=Object.entries(N).map(([m,[,P]])=>`- ${m}: ${P}`).join("; ");s(l,t,`Unknown architecture inspector field. Use one \
|
|
53
|
+
of: ${f}.`,u+1)}let[a]=N[p[1]];if(i[a]!==void 0&&s(l,t,`Duplicate ${p[1]}.`,u+1),a==="runtimeRequirements")i[a]=k(p[2],l,
|
|
54
|
+
t,"Inspector runtime",u+1);else if(a==="argv")i[a]=I(p[2],l,t,"Inspector command",u+1);else if(a==="entryFiles"||a==="re\
|
|
55
|
+
quiredFiles")i[a]=_(p[2],l,t,p[1],u+1).map(f=>E(f,l,t,p[1],u+1));else{let[f]=_(p[2],l,t,p[1],u+1,{count:1});if(a==="work\
|
|
56
|
+
dir")i[a]=E(f,l,t,"Inspector directory",u+1);else if(a==="previewLocator")i[a]=Ze(f,t,u+1);else{let m=Number(f),P=a==="t\
|
|
57
|
+
imeout"?te:ne;(!/^[1-9][0-9]*$/u.test(f)||!Number.isSafeInteger(m)||m>P)&&s(l,t,`${p[1]} must be from 1 to ${P}.`,u+1),i[a]=
|
|
58
|
+
a==="timeout"?m*1e3:m}}}return o(),r.length||s(l,t,"Use an Inspector entry or - Nothing."),r}function Ze(e,n,t){return E(
|
|
59
|
+
e,l,n,"Preview locator",t,{allowRoot:!1}),e.endsWith(".js")||s(l,n,"Preview locator must name a .js file.",t),e}var vt=Object.freeze({parseVibe64ArchitectureInspectionLines:Xe});var ie="vibe64.architecture-layout.v1",re="Architecture layout",b="VIBE64_ARCHITECTURE_LAYOUT_INVALID",A=Object.freeze([
|
|
61
60
|
"layer","libraries","support"]);function Je(e,n={}){let{path:t="genesis/stack.md#Architecture layout"}=n;if(Array.isArray(
|
|
62
|
-
e)||s(
|
|
63
|
-
!o.purpose||!o.subsystems.length)&&s(
|
|
64
|
-
y]of e.entries()){let
|
|
65
|
-
c.has(p[1])&&s(
|
|
66
|
-
(!o||!a)&&s(
|
|
67
|
-
if(a[1]==="Subsystem"){let m=E(f[0],
|
|
68
|
-
ce.",d+1),i.add(m),o.subsystems.push({root:m})}else{let m=a[1].toLowerCase();o[m]!==void 0&&s(
|
|
69
|
-
1),m==="kind"&&!A.includes(f[0])&&s(
|
|
70
|
-
r.length||s(
|
|
61
|
+
e)||s(b,t,"Expected exact Stack section lines."),g(e))return[];let r=[],c=new Set,i=new Set,o;function u(){o&&((!o.kind||
|
|
62
|
+
!o.purpose||!o.subsystems.length)&&s(b,t,`${o.id} needs Kind, Purpose and at least one Subsystem.`),r.push(o))}for(let[d,
|
|
63
|
+
y]of e.entries()){let S=y.trim();if(!S)continue;let p=S.match(/^### Group `([a-z0-9]+(?:-[a-z0-9]+)*)`: (.+)$/u);if(p){u(),
|
|
64
|
+
c.has(p[1])&&s(b,t,"Duplicate group id.",d+1),c.add(p[1]),o={id:p[1],title:p[2],subsystems:[]};continue}let a=S.match(/^- (Kind|Purpose|Subsystem): (.+)$/u);
|
|
65
|
+
(!o||!a)&&s(b,t,"Expected a Group heading or Kind, Purpose, Subsystem field.",d+1);let f=_(a[2],b,t,a[1],d+1,{count:1});
|
|
66
|
+
if(a[1]==="Subsystem"){let m=E(f[0],b,t,"Subsystem root",d+1);i.has(m)&&s(b,t,"Each directory root may be placed only on\
|
|
67
|
+
ce.",d+1),i.add(m),o.subsystems.push({root:m})}else{let m=a[1].toLowerCase();o[m]!==void 0&&s(b,t,`Duplicate ${a[1]}.`,d+
|
|
68
|
+
1),m==="kind"&&!A.includes(f[0])&&s(b,t,`Kind must be ${A.slice(0,-1).join(", ")} or ${A.at(-1)}.`,d+1),o[m]=f[0]}}return u(),
|
|
69
|
+
r.length||s(b,t,"Use a Group entry or - Nothing."),r}var Nt=Object.freeze({parseVibe64ArchitectureLayoutLines:Je});var Qe="custom",oe="vibe64.connected-sources.v2",U=Object.freeze([Object.freeze({value:"npm",label:"npm (Node.js)"}),Object.
|
|
71
70
|
freeze({value:"composer",label:"Composer (PHP)"}),Object.freeze({value:"pip",label:"pip (Python)"}),Object.freeze({value:"\
|
|
72
71
|
bundler",label:"Bundler (Ruby)"}),Object.freeze({value:"gomod",label:"Go modules"}),Object.freeze({value:"cargo",label:"\
|
|
73
72
|
Cargo (Rust)"}),Object.freeze({value:"maven",label:"Maven"}),Object.freeze({value:"gradle",label:"Gradle"}),Object.freeze(
|
|
74
|
-
{value:"nuget",label:"NuGet (.NET)"}),Object.freeze({value:
|
|
73
|
+
{value:"nuget",label:"NuGet (.NET)"}),Object.freeze({value:Qe,label:"custom"})]),ae="Vibe64's preparer appends the absol\
|
|
75
74
|
ute script path and --phase prepare|verify, --source-root <the session's copy of the repository>, --project-root <consum\
|
|
76
75
|
ing project>, --sources-file <absolute Sources file> and --repository <GitHub URL> arguments to the Stack's Custom runne\
|
|
77
|
-
r command, once per phase; execution checks the script remains inside the consuming project.",
|
|
78
|
-
value));var ce="Connected development",ue="vibe64.connected-development.v1";var W="with `runtime` [in `workdir`]: `command` `argument`...",
|
|
76
|
+
r command, once per phase; execution checks the script remains inside the consuming project.",Pt=Object.freeze(U.map(e=>e.
|
|
77
|
+
value));var ce="Connected development",ue="vibe64.connected-development.v1";var W="with `runtime` [in `workdir`]: `command` `argument`...",tt=Object.freeze({Prepare:`- Prepare \`label\` ${W}`,Verify:`\
|
|
79
78
|
- Verify \`label\` ${W}`,"Custom runner":`- Custom runner ${W}`}),pe=Object.freeze(["- Default package type: `type`","- \
|
|
80
|
-
Sources file: `path`",...Object.values(
|
|
81
|
-
|
|
82
|
-
\`${D}\``],["- Identity types: ","identityTypes","Identity types",`one or more of ${[...
|
|
79
|
+
Sources file: `path`",...Object.values(tt)]);var le="vibe64.integration-setup.v1",de="Integration setup";var me="- Command with `runtime` in `workdir`: `command` `argument`...";var D="vibe64.preview-identity.command.v1";var G=new Set(["HOME","LOGNAME","NODE_OPTIONS","PATH","TMPDIR","USER"]),rt=new Set(["email","login","user-id"]),ot=1e4,at=3e4,
|
|
80
|
+
ct=[["- Command: ","command","Command","`tools/preview-identity` `argument`..."],["- Protocol: ","protocol","Protocol",`\
|
|
81
|
+
\`${D}\``],["- Identity types: ","identityTypes","Identity types",`one or more of ${[...rt].map(e=>`\`${e}\``).join(" ")}`],
|
|
83
82
|
["- Enabled environment: ","enabledEnvironment","Enabled environment","`ENV_NAME`"],["- Secret environment: ","secretEnv\
|
|
84
83
|
ironment","Secret environment","`ENV_NAME`"],["- Runtimes: ","runtimes","Runtimes","`runtime`..."],["- Timeout ms: ","ti\
|
|
85
|
-
meoutMs","Timeout ms",`\`1\` through \`${
|
|
84
|
+
meoutMs","Timeout ms",`\`1\` through \`${at}\` (default ${ot})`]],he=ct.map(([e,,,n])=>`${e}${n}`);var fe="vibe64.outputs.v1",Ee="Outputs";var ut=new Set(["finite","interactive"]),pt=new Set(["development","test"]),lt=new Set(["terminal","web"]),ge=16,H=e=>[...e].
|
|
86
85
|
map(n=>`\`${n}\``).join(" or "),ye=Object.freeze(["### Target `id`: Label","#### Parameter `id`: Label","#### Presentati\
|
|
87
|
-
on","#### Preview identity","#### Download `id`"]),O=Object.freeze({target:["- Default.",`- Mode: ${H(
|
|
88
|
-
|
|
89
|
-
"- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${H(
|
|
86
|
+
on","#### Preview identity","#### Download `id`"]),O=Object.freeze({target:["- Default.",`- Mode: ${H(ut)}`,`- Data: ${H(
|
|
87
|
+
pt)}`,"- Workdir: `path`","- Runtimes: `runtime`...","- Prepare|Build|Run `label`: `command` `argument`..."],parameter:[
|
|
88
|
+
"- Default: `text`","- Description: `text`","- Required."],presentation:[`- Kind: ${H(lt)}`,"- Preferred port: `1024` th\
|
|
90
89
|
rough `65535`","- URL path: `/path`","- Ready when: `GET` `/path` returns `200`"],previewIdentity:he,download:["- Path: \
|
|
91
|
-
`path`","- Name: `file-name`","- Media type: `type/subtype`"]});var
|
|
92
|
-
.";var
|
|
93
|
-
Running typical MiB","runningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);var
|
|
90
|
+
`path`","- Name: `file-name`","- Media type: `type/subtype`"]});var _e="Project services",be="vibe64.project-services.v1";var Te="- Start `service-id` [per session] with `runtime` [in `workdir`]: `command` `argument`...";var Se="vibe64.workspace-setup.v1",Ie="Workspace setup";var ke="- Prepare `label` [from `path`...] with `runtime` [in `workdir`] [when|if `path` exists]: `command` `argument`..\
|
|
91
|
+
.";var we="vibe64.resource-estimates.v1",ve="Resource estimates";var ln=1024*1024,Oe=1024*1024,Re=new Map([["Startup typical MiB","startupTypical"],["Startup high MiB","startupHigh"],["\
|
|
92
|
+
Running typical MiB","runningTypical"],["Running high MiB","runningHigh"],["Typical MiB","typical"],["High MiB","high"]]);var mt=["Command values: the executable and every argument are separate backticked values separated by single spaces (at\
|
|
94
93
|
most 64 values of at most 4096 characters, no line breaks). The executable is a name on PATH or a project-relative path\
|
|
95
94
|
, never absolute and never containing `..`.","Runtimes are lowercase technology ids selected in the project's Stack, suc\
|
|
96
95
|
h as `nodejs` or `php`. Paths are canonical project-relative paths; `.` is the project root.","A section containing only\
|
|
97
96
|
`- Nothing.` explicitly declares nothing. Blank lines are ignored."].join(`
|
|
98
97
|
`),h=e=>e.map(n=>` ${n}`).join(`
|
|
99
|
-
`);function
|
|
98
|
+
`);function T({name:e,title:n,section:t,contract:r="",summary:c,body:i,example:o}){return{name:e,title:n,section:t,example:o,
|
|
100
99
|
text:()=>[`# ${n}`,"",`Section: \`## ${t}\` in \`genesis/stack.md\`${r?`, contract \`${r}\``:""}. Vibe64 owns its gramma\
|
|
101
|
-
r and meaning; Genesis transports the exact section text.`,"",c,"",i.trim(),"",
|
|
100
|
+
r and meaning; Genesis transports the exact section text.`,"",c,"",i.trim(),"",mt,"","## Example","","```markdown",`## ${t}`,
|
|
102
101
|
"",o.trim(),"```",""].join(`
|
|
103
|
-
`)}}var
|
|
102
|
+
`)}}var ht=`
|
|
104
103
|
### Target \`app\`: Application
|
|
105
104
|
|
|
106
105
|
- Default.
|
|
@@ -152,10 +151,10 @@ r and meaning; Genesis transports the exact section text.`,"",c,"",i.trim(),"",d
|
|
|
152
151
|
- Path: \`exports/report.csv\`
|
|
153
152
|
- Name: \`report.csv\`
|
|
154
153
|
- Media type: \`text/csv\`
|
|
155
|
-
`,wn=Object.freeze([
|
|
154
|
+
`,wn=Object.freeze([T({name:"workspace-setup",title:"Workspace setup",section:Ie,contract:Se,summary:"Ordered commands t\
|
|
156
155
|
hat prepare a session's working copy (dependencies, generated files, migrations) before any Output runs.",body:`
|
|
157
156
|
Each entry:
|
|
158
|
-
${h([
|
|
157
|
+
${h([ke])}
|
|
159
158
|
|
|
160
159
|
- \`\` in \`workdir\` \`\` runs the command in that project directory (default \`.\`).
|
|
161
160
|
- \`\` when \`path\` exists \`\` waits: setup stays waiting until the path exists (for example a manifest the agent has not cr\
|
|
@@ -171,7 +170,7 @@ act recipe; changing any step runs setup again, and Outputs stay pending until i
|
|
|
171
170
|
step. Keep every step repeatable and non-destructive.
|
|
172
171
|
`,example:"\n- Prepare `Install dependencies` from `package.json` `package-lock.json` with `nodejs`: `npm` `ci`\n- Prepare\
|
|
173
172
|
`Migrate database` with `nodejs` if `migrations` exists: `npm` `run` `db:migrate`\n- Prepare `Install client` with `node\
|
|
174
|
-
js` in `client` when `client/package.json` exists: `npm` `ci`\n"}),
|
|
173
|
+
js` in `client` when `client/package.json` exists: `npm` `ci`\n"}),T({name:"outputs",title:"Outputs",section:Ee,contract:fe,
|
|
175
174
|
summary:"The runnable targets Vibe64 offers: interactive terminal or web apps shown in Preview, and finite runs that pro\
|
|
176
175
|
duce downloads.",body:`
|
|
177
176
|
Headings, each target followed by its entries and then optional blocks:
|
|
@@ -217,12 +216,12 @@ ${h(O.previewIdentity)}
|
|
|
217
216
|
its identity exchange disabled unless both are present.
|
|
218
217
|
- The command's stdin/stdout protocol: \`vibe64-helper spec preview-identity-command\`. The configured account names: \`vib\
|
|
219
218
|
e64-helper spec preview-identities\`.
|
|
220
|
-
`,example:
|
|
219
|
+
`,example:ht}),T({name:"deployment",title:"Deployment",section:q,contract:F,summary:"The commands that turn a project re\
|
|
221
220
|
vision into a running deployed application.",body:`
|
|
222
221
|
Entries:
|
|
223
222
|
${h(K)}
|
|
224
223
|
|
|
225
|
-
- Steps are ordered ${
|
|
224
|
+
- Steps are ordered ${x.join(", ")}; exactly one Serve step comes last. Serve starts the long-running application, which\
|
|
226
225
|
listens on the address given by the \`HOST\` and \`PORT\` environment variables. Arguments are passed literally (no \`{host}\
|
|
227
226
|
\` or \`{port}\` placeholders), so a server that takes its address only as arguments needs a committed project script that \
|
|
228
227
|
reads them.
|
|
@@ -250,11 +249,18 @@ e its owner permits it, and refuses a deploy that needs one it does not grant ra
|
|
|
250
249
|
nly when the application needs it, never to make a failing deploy pass: an allowance widens what an intruder in the appl\
|
|
251
250
|
ication could reach, so whether to grant it is the project owner's decision, never an assistant's. An assistant never ad\
|
|
252
251
|
ds or changes this line on its own; it explains the failure and asks the person.
|
|
253
|
-
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
252
|
+
- Packages names the system packages the application's steps and service need beyond its runtimes, by their nixpkgs name\
|
|
253
|
+
s: an attribute such as \`git\` or \`python313Packages.pip\`, or one output of it after \`^\`, such as \`gcc-unwrapped^lib\` (at\
|
|
254
|
+
most 200, each once). A host that builds the deployment's machine from a package collection installs exactly these besi\
|
|
255
|
+
de the runtimes and refuses a name it doesn't have; a host that runs the deployment on a machine it does not build ignor\
|
|
256
|
+
es the line, so there the packages must already be installed. Name every program a step or the service runs that is not \
|
|
257
|
+
part of a runtime, such as \`git\` for a Prepare step that clones, or a browser the service starts; never install one from\
|
|
258
|
+
a script instead.
|
|
259
|
+
- Host-level preparation beyond the package manager and Packages, such as devices or host permissions, goes in one scrip\
|
|
260
|
+
t per hosting environment, \`scripts/hosting/<host>.sh\`, which the \`HOSTING_SCRIPT\` environment variable names and the Pr\
|
|
261
|
+
epare step runs; an application that needs none has no such script. It never works around Vibe64's rules: what Vibe64 pr\
|
|
262
|
+
ovides, such as a runtime or a sandbox allowance, is declared in this section, never installed or switched on by the scr\
|
|
263
|
+
ipt, and where the host lacks something the script fails with one plain sentence instead of switching features off.
|
|
258
264
|
- Instances says how many identical copies of the application a host may run at once behind one address, each with a dis\
|
|
259
265
|
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\
|
|
260
266
|
thing a later request needs: uploaded files on its own disk, sign-ins or sessions in memory or in files, or a scheduled \
|
|
@@ -285,12 +291,12 @@ aging: process.env.STAGING_EMAIL_TO }[process.env.APP_ENV]; if (to) await mailer
|
|
|
285
291
|
info("%s: email to %s not sent", process.env.APP_ENV, message.to);\`
|
|
286
292
|
`,example:"\n- Runtimes: `nodejs`\n- Recreate on restore: `node_modules`\n- Generated secrets: `SESSION_SECRET`\n- Prepare `\
|
|
287
293
|
Install`: `npm` `ci`\n- Build `Build`: `npm` `run` `build`\n- Migrate `Migrate`: `npm` `run` `db:migrate`\n- Serve `Serve`:\
|
|
288
|
-
`env` `NODE_ENV=production` `node` `server.js`\n- Ready when: `GET` `/health` returns `200`\n"}),
|
|
294
|
+
`env` `NODE_ENV=production` `node` `server.js`\n- Ready when: `GET` `/health` returns `200`\n"}),T({name:"packaging",title:"\
|
|
289
295
|
Packaging",section:X,contract:Y,summary:"Source facts Vibe64 needs to turn this project into distributable packages: reg\
|
|
290
296
|
istry packages, static web bundles and generated mobile app shells. Where each package is published (targets, channels, \
|
|
291
297
|
builders) is Vibe64 project state, never this section.",body:`
|
|
292
|
-
Headings: \`\` ${
|
|
293
|
-
${h(
|
|
298
|
+
Headings: \`\` ${Z} \`\`, each followed by entries:
|
|
299
|
+
${h(J)}
|
|
294
300
|
|
|
295
301
|
- Packers (closed set): ${B.map(e=>`\`${e}\``).join(", ")}. Package ids are unique lowercase ids with single hyphens.
|
|
296
302
|
- \`npm\`: Version from \`package.json\` or \`external\`; Vibe64 runs \`npm pack\` in Workdir after the optional Prepare and Bui\
|
|
@@ -316,7 +322,7 @@ dependencies`: `npm` `ci`\n- Build `Build bundled client`: `npm` `run` `build`\n
|
|
|
316
322
|
Platforms: `android`\n- Id: `com.example.notes`\n- Name: `Notes`\n- Icon: `assets/icon-1024.png`\n- Version from: `package.\
|
|
317
323
|
json`\n- Deep link scheme from: `APP_URL_SCHEME`\n- Permission `camera`: Take photos to attach to notes.\n\n### Package `sdk\
|
|
318
324
|
`: Notes SDK\n\n- Packer: `npm`\n- Workdir: `packages/notes-sdk`\n- Runtimes: `nodejs`\n- Version from: `package.json`\n"}),
|
|
319
|
-
|
|
325
|
+
T({name:"resource-estimates",title:"Resource estimates",section:ve,contract:we,summary:"Optional memory planning hints f\
|
|
320
326
|
or Outputs and Workspace setup. They are not observed usage, reservations, minimum requirements or granted limits; the e\
|
|
321
327
|
xecution host owns those choices.",body:`
|
|
322
328
|
Headings: \`\` ### Output \`id\` \`\` (an id declared in Outputs) or \`### Workspace setup\` (requires declared setup steps), ea\
|
|
@@ -330,7 +336,7 @@ elds are rejected. The section is at most 64 KiB and 2048 lines.
|
|
|
330
336
|
- Invalid estimates never change Outputs availability or setup readiness; the host then uses its generic policy. Changin\
|
|
331
337
|
g only estimates does not rerun setup.
|
|
332
338
|
`,example:"\n### Output `app`\n\n- Startup typical MiB: `1024`\n- Startup high MiB: `1536`\n- Running typical MiB: `768`\n- Ru\
|
|
333
|
-
nning high MiB: `1536`\n\n### Workspace setup\n\n- Typical MiB: `1024`\n- High MiB: `1536`\n"}),
|
|
339
|
+
nning high MiB: `1536`\n\n### Workspace setup\n\n- Typical MiB: `1024`\n- High MiB: `1536`\n"}),T({name:"connected-devel\
|
|
334
340
|
opment",title:"Connected development",section:ce,contract:ue,summary:"How this project consumes the working source of it\
|
|
335
341
|
s connected repositories (its own dependencies under development) in a session.",body:`
|
|
336
342
|
Entries:
|
|
@@ -350,10 +356,10 @@ nection also carries \`"script"\`.
|
|
|
350
356
|
- Custom connections: ${ae}
|
|
351
357
|
`,example:"\n- Default package type: `npm`\n- Sources file: `.connected-sources.json`\n- Prepare `Link connected packages` \
|
|
352
358
|
with `nodejs`: `node` `tools/link-connected.mjs`\n- Verify `Check connected packages` with `nodejs`: `node` `tools/verify\
|
|
353
|
-
-connected.mjs`\n"}),
|
|
359
|
+
-connected.mjs`\n"}),T({name:"project-services",title:"Project services",section:_e,contract:be,summary:"Foreground help\
|
|
354
360
|
er processes (workers, local reference services) that Vibe64 starts before an Output.",body:`
|
|
355
361
|
Entries:
|
|
356
|
-
${h([
|
|
362
|
+
${h([Te])}
|
|
357
363
|
|
|
358
364
|
- Service ids are unique, start with a lowercase letter and use up to 64 lowercase letters, digits and hyphens. Workdir \
|
|
359
365
|
defaults to \`.\`.
|
|
@@ -365,7 +371,7 @@ ver spawn untracked background work.
|
|
|
365
371
|
rd the address in the session's ignored runtime folder) and check your own instance's readiness. Never assume a shared f\
|
|
366
372
|
ixed port.
|
|
367
373
|
`,example:"\n- Start `worker` with `nodejs` in `tools`: `npm` `run` `worker`\n- Start `reference` per session with `nodejs\
|
|
368
|
-
`: `npm` `run` `reference:service`\n"}),
|
|
374
|
+
`: `npm` `run` `reference:service`\n"}),T({name:"integration-setup",title:"Integration setup",section:de,contract:le,summary:"\
|
|
369
375
|
The one application-owned command the editor's Integrations controls call to configure, connect and check the applicatio\
|
|
370
376
|
n's external integrations.",body:`
|
|
371
377
|
Exactly one entry:
|
|
@@ -373,7 +379,7 @@ ${h([me])}
|
|
|
373
379
|
|
|
374
380
|
The command's request/response protocol and the \`integrations.json\` usage: \`vibe64-helper spec integration-setup-command\
|
|
375
381
|
\`.
|
|
376
|
-
`,example:"\n- Command with `nodejs` in `.`: `node` `scripts/integrations.js`\n"}),
|
|
382
|
+
`,example:"\n- Command with `nodejs` in `.`: `node` `scripts/integrations.js`\n"}),T({name:"architecture-inspection",title:"\
|
|
377
383
|
Architecture inspection",section:ee,contract:Q,summary:"Optional project-owned inspectors that the Architecture view run\
|
|
378
384
|
s to observe the application's structure (pages, routes, entry points).",body:`
|
|
379
385
|
Headings: \`\` ### Inspector \`id\`: Title \`\`, each followed by fields:
|
|
@@ -388,12 +394,12 @@ ject files before the inspector runs.
|
|
|
388
394
|
inked package folder (\`node_modules/<name>\` or \`node_modules/@scope/<name>\`); the file must stay inside that package's r\
|
|
389
395
|
eal folder.
|
|
390
396
|
- On analysis the command receives one \`jskit.architecture-inspection-input.v1\` JSON request on stdin (files with hashes\
|
|
391
|
-
, packages, package identity, UI discovery, the Stack hash and an optional \`cacheDirectory\`) and must print one \`${
|
|
397
|
+
, packages, package identity, UI discovery, the Stack hash and an optional \`cacheDirectory\`) and must print one \`${dt}\
|
|
392
398
|
\` JSON document; Genesis owns that observation schema.
|
|
393
399
|
- \`cacheDirectory\` is an absolute directory for this inspector alone, outside the source; the inspector may read and wri\
|
|
394
400
|
te only there. When it is absent or unusable, inspect without a cache. Ignore unknown request fields.
|
|
395
401
|
`,example:"\n### Inspector `ui`: UI routes\n\n- Runtime: `nodejs`\n- Directory: `.`\n- Command: `node` `tools/inspect-ui.mjs`\
|
|
396
|
-
\n- Timeout seconds: `30`\n- Max output bytes: `1048576`\n- Entry files: `src/main.js`\n"}),
|
|
402
|
+
\n- Timeout seconds: `30`\n- Max output bytes: `1048576`\n- Entry files: `src/main.js`\n"}),T({name:"architecture-layout",
|
|
397
403
|
title:"Architecture layout",section:re,contract:ie,summary:"Presentation groups for the Architecture view. Declarations \
|
|
398
404
|
neither discover subsystems nor change their ownership.",body:`
|
|
399
405
|
Headings: \`\` ### Group \`id\`: Title \`\`, each followed by:
|