volaro 0.0.2 → 0.1.0-alpha.10
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/README.md +175 -22
- package/bin/vl.js +829 -28
- package/compiler/SOURCE_INFO.json +6 -0
- package/compiler/SOURCE_REV +1 -0
- package/compiler/validator/vlcheck/__init__.py +10 -0
- package/compiler/validator/vlcheck/__main__.py +197 -0
- package/compiler/validator/vlcheck/ast_nodes.py +457 -0
- package/compiler/validator/vlcheck/benchmark_signal.py +86 -0
- package/compiler/validator/vlcheck/checks.py +3193 -0
- package/compiler/validator/vlcheck/diagnostics.py +91 -0
- package/compiler/validator/vlcheck/elements.py +1260 -0
- package/compiler/validator/vlcheck/layoutcompose.py +412 -0
- package/compiler/validator/vlcheck/lexer.py +384 -0
- package/compiler/validator/vlcheck/pagemanifest.py +389 -0
- package/compiler/validator/vlcheck/pageroutes.py +468 -0
- package/compiler/validator/vlcheck/parser.py +1842 -0
- package/compiler/validator/vlcheck/project_config.py +97 -0
- package/compiler/validator/vlcheck/resolve.py +1085 -0
- package/compiler/validator/vlcheck/routes_cli.py +172 -0
- package/compiler/validator/vlcheck/test_ids.py +99 -0
- package/compiler/vlbuild/styling/README.md +48 -0
- package/compiler/vlbuild/styling/build-css.mjs +181 -0
- package/compiler/vlbuild/styling/package-lock.json +1254 -0
- package/compiler/vlbuild/styling/package.json +15 -0
- package/compiler/vlbuild/styling/test-build-css.mjs +149 -0
- package/compiler/vlbuild/vlbuild/__init__.py +16 -0
- package/compiler/vlbuild/vlbuild/__main__.py +376 -0
- package/compiler/vlbuild/vlbuild/assets/vlrouter.js +740 -0
- package/compiler/vlbuild/vlbuild/assets/vlrouter.min.js +2 -0
- package/compiler/vlbuild/vlbuild/assets/vlrt.css +289 -0
- package/compiler/vlbuild/vlbuild/assets/vlrt.js +1648 -0
- package/compiler/vlbuild/vlbuild/assets/vlrt.min.css +2 -0
- package/compiler/vlbuild/vlbuild/assets/vlrt.min.js +2 -0
- package/compiler/vlbuild/vlbuild/emit.py +3732 -0
- package/compiler/vlbuild/vlbuild/pages_build.py +508 -0
- package/compiler/vlbuild/vlbuild/project.py +338 -0
- package/compiler/vlbuild/vlbuild/runtime_assets.py +41 -0
- package/compiler/vlbuild/vlbuild/server_emit.py +2149 -0
- package/compiler/vlbuild/vlbuild/static_assets.py +130 -0
- package/compiler/vlbuild/vlbuild/style_config.py +414 -0
- package/compiler/vlbuild/vlbuild/styling.py +41 -0
- package/examples/station.vl +2 -2
- package/language/crib.md +632 -24
- package/language/spec.md +722 -19
- package/language/supported.md +711 -0
- package/lib/env.js +107 -0
- package/package.json +19 -2
- package/scripts/record-provenance.mjs +51 -0
- package/scripts/selftest.mjs +108 -0
- package/scripts/sync-compiler.sh +64 -0
package/README.md
CHANGED
|
@@ -1,46 +1,199 @@
|
|
|
1
1
|
# Volaro
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**Limited alpha** (this is `0.1.0-alpha.10`), published under both the
|
|
4
|
+
`latest` and `alpha` dist-tags: `npm install volaro`.
|
|
4
5
|
|
|
5
6
|
Volaro is an experimental application language intended for AI authoring and
|
|
6
|
-
human review. This package
|
|
7
|
-
|
|
7
|
+
human review. This package ships the language reference **and a working
|
|
8
|
+
compiler for a supported subset**: `volaro check`, `volaro build`,
|
|
9
|
+
`volaro dev`.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
The command is **`volaro`** (canonical). **`vl` is a compatibility alias** for
|
|
12
|
+
the same binary. Run it via your project's `npm run …` scripts or
|
|
13
|
+
`npx --no-install volaro …` inside the project — a bare `npx volaro` / `npx vl`
|
|
14
|
+
from elsewhere may resolve an unrelated package.
|
|
15
|
+
|
|
16
|
+
## What you need
|
|
17
|
+
|
|
18
|
+
- **Python 3.10+** — runs the compiler, which is bundled inside this package
|
|
19
|
+
(`compiler/`). `volaro` finds `python3` on your PATH; set `VOLARO_PYTHON` to
|
|
20
|
+
choose a different interpreter. A missing or too-old Python is reported with
|
|
21
|
+
the fix, not a stack trace.
|
|
22
|
+
- **Node.js** — runs the `volaro` command and the dev server. The minimum
|
|
23
|
+
depends on what you build:
|
|
24
|
+
|
|
25
|
+
| App shape | Node | Verified in CI |
|
|
26
|
+
|---|---|---|
|
|
27
|
+
| Minimal single-page (view only): `check` / `build` / static `dev` | **≥ 18** | 18, 20, 22, 24 (packaging matrix) |
|
|
28
|
+
| Full-stack: a `service` backed by a `model` → generated `server.js` (`node:sqlite`) | **≥ 22.5** | 22, 24 (packaging matrix, full-stack `dev`) |
|
|
29
|
+
| Password-auth: the generated server's built-in Argon2 | **≥ 24.7** | 24 only (`./verify.sh` browser journey) |
|
|
30
|
+
|
|
31
|
+
A green packaging matrix establishes the minimal-app row across 18–24; it
|
|
32
|
+
does **not** by itself establish the full-stack or auth rows on 18/20.
|
|
33
|
+
|
|
34
|
+
### Operating systems
|
|
35
|
+
|
|
36
|
+
| OS | Status |
|
|
37
|
+
|---|---|
|
|
38
|
+
| **Linux** | **Verified** — CI (`verify` + `packaging` matrix) and an isolated-install test |
|
|
39
|
+
| **macOS** | **Unverified** — never run. No known blocker, but no evidence. |
|
|
40
|
+
| **Windows** | **Unverified** — the `npm.cmd` / `PYTHONPATH` handling is present but untested; the packaging test scripts are `bash`. |
|
|
41
|
+
|
|
42
|
+
Do not treat this as cross-platform support. Only Linux has been tested.
|
|
43
|
+
|
|
44
|
+
No global install, no repository checkout, and no network access are needed
|
|
45
|
+
once the package is installed.
|
|
46
|
+
|
|
47
|
+
## Commands
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
volaro check <path>... # validate .vl source (full resolver), exit non-zero on error
|
|
51
|
+
volaro build app.vl # transpile to ./build (index.html + app.js + runtime)
|
|
52
|
+
volaro build app.vl -o dist --release
|
|
53
|
+
volaro dev # build ./app.vl, serve http://127.0.0.1:5173, rebuild on change
|
|
54
|
+
volaro crib # the authoring reference (write from this)
|
|
55
|
+
volaro supported # what THIS version accepts (the shipped-feature guide)
|
|
56
|
+
volaro spec # the full language design (a superset of this build)
|
|
57
|
+
volaro example sensors # a worked example (also: station)
|
|
58
|
+
volaro version | volaro help
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Benchmark timing log
|
|
62
|
+
|
|
63
|
+
`check` and `build` can append machine-readable compile attempts to a JSONL
|
|
64
|
+
file. Use one unique run ID for the first attempt and every repair attempt in a
|
|
65
|
+
single trial:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
volaro check app.vl --benchmark-log benchmark.jsonl --benchmark-run test-006-v-01
|
|
69
|
+
# If it fails, repair app.vl and repeat the exact command with the same run ID.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
A first-pass success writes a `clean` summary with `t_clean_ms`. A failure
|
|
73
|
+
followed by a success writes a `recovered` summary with `t_fail_ms`,
|
|
74
|
+
`t_repair_ms`, `t_recompile_ms`, and `t_recover_ms`. The log also retains every
|
|
75
|
+
raw attempt, the number of failures, and compiler overhead not attributable to
|
|
76
|
+
repair. A completed run ID cannot be reused, and a run cannot mix `check` and
|
|
77
|
+
`build` attempts or change compiler arguments between attempts.
|
|
78
|
+
|
|
79
|
+
The timer measures the compiler subprocess. `T-repair` is the observed wall
|
|
80
|
+
time between a failed compiler exit and the next compiler start. It measures
|
|
81
|
+
the autonomous repair loop, including agent and tool overhead; it is not a
|
|
82
|
+
claim about model-inference time alone.
|
|
83
|
+
|
|
84
|
+
**Every failed attempt is classified, not just counted.** Each raw `attempt`
|
|
85
|
+
record carries a `classification`: `source_diagnostic` (the compiler ran to
|
|
86
|
+
completion and correctly reported a problem with your source — the only case
|
|
87
|
+
`t_fail_ms` is ever populated for), `operational_failure` (the compiler process
|
|
88
|
+
itself crashed, was killed, or stopped on an invocation/configuration problem —
|
|
89
|
+
`crash_exception_type`/`crash_exception_message` are set when it was a crash),
|
|
90
|
+
`silent_failure` (a non-zero exit with no output at all), or `unknown_failure`
|
|
91
|
+
(a non-zero exit with output that carried none of the compiler's own
|
|
92
|
+
diagnostic signal). This is reported by the compiler itself over a private
|
|
93
|
+
side channel — never guessed from whether stdout/stderr happened to have
|
|
94
|
+
anything in it, since an internal crash prints output too. A `recovered`
|
|
95
|
+
summary whose original failing attempt was not `source_diagnostic` has
|
|
96
|
+
`t_fail_ms: null`, `timing_complete: false`, and a `timing_incomplete_reason`
|
|
97
|
+
explaining why — treat it as an invalid recovery-time sample, not a slow one.
|
|
98
|
+
|
|
99
|
+
**A `recovered` summary can also be invalidated by the wall clock.**
|
|
100
|
+
`t_repair_ms`/`t_recover_ms` are computed from separate processes' own
|
|
101
|
+
timestamps; if one of those timestamps predates an earlier one (a system
|
|
102
|
+
clock step between two attempts), the summary has `clock_anomaly: true`,
|
|
103
|
+
`timing_complete: false`, and the affected fields are `null` — never a
|
|
104
|
+
clamped, misleadingly small positive number.
|
|
105
|
+
|
|
106
|
+
`volaro dev` serves a static bundle for a single-page app. If the app compiles
|
|
107
|
+
to a full-stack server (`server.js`), it runs that instead and needs
|
|
108
|
+
Node 22.5+ for `node:sqlite`. A multi-page project build always emits a
|
|
109
|
+
`server.js` (it serves `public/` and answers a direct link or refresh on a
|
|
110
|
+
dynamic route), so `volaro dev` on a project directory runs that server.
|
|
111
|
+
|
|
112
|
+
## Scaffold a project
|
|
10
113
|
|
|
11
114
|
```bash
|
|
12
|
-
|
|
13
|
-
npx volaro spec
|
|
14
|
-
npx volaro example sensors
|
|
15
|
-
npx volaro example station
|
|
115
|
+
npm create volaro my-app # the separate create-volaro package
|
|
16
116
|
```
|
|
17
117
|
|
|
18
|
-
|
|
118
|
+
(If `npm create volaro` prints "This release is a placeholder", npm is
|
|
119
|
+
reusing a cached copy of the old `0.0.1`: run `npm cache clean --force`.)
|
|
120
|
+
|
|
121
|
+
It writes one single-page starter, a `volaro.json`, and `package.json` scripts
|
|
122
|
+
(`dev` / `build` / `check`) that call `volaro`.
|
|
19
123
|
|
|
20
124
|
## Scope and evidence
|
|
21
125
|
|
|
22
|
-
The project-authored twelve-feature corpus records roughly 3.00× source
|
|
23
|
-
against selected baselines
|
|
126
|
+
The project-authored twelve-feature corpus records roughly 3.00× source
|
|
127
|
+
density against selected baselines — not a general productivity result.
|
|
24
128
|
Security and accessibility checks cover a tested prototype subset, not a
|
|
25
|
-
universal guarantee. Independent human-readability validation
|
|
129
|
+
universal guarantee. Independent human-readability validation is outstanding.
|
|
26
130
|
|
|
27
|
-
|
|
131
|
+
**Pages, routing and nested layouts are implemented** (2026-09-23). A project
|
|
132
|
+
directory with any `app/**/index.vl` builds as a real multi-page app: nested
|
|
133
|
+
`_layout.vl` shells placing content with `@children`, `(group)` folders that add
|
|
134
|
+
layout ancestry but no URL segment, typed `[name=type]` dynamic parameters, and
|
|
135
|
+
optional `_loading.vl` / `_error.vl` / `_not-found.vl` boundaries, served by a
|
|
136
|
+
client router with a direct-link/refresh fallback in the generated server. Point
|
|
137
|
+
`volaro build` / `volaro dev` at the project directory; `volaro routes` prints
|
|
138
|
+
what was discovered. A single `.vl` entry file still builds exactly as before.
|
|
28
139
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
140
|
+
**Still out of scope:** server-side rendering and hydration (the shell is
|
|
141
|
+
route-agnostic and the client does the first render); `theme` / `recipe` styling
|
|
142
|
+
in a multi-page build, so styled output is single-entry only; catch-all routes,
|
|
143
|
+
per-file route prefixes, and inherited authorization. **`npm create volaro`
|
|
144
|
+
scaffolds a single-page starter** — a multi-page starter is later work.
|
|
145
|
+
|
|
146
|
+
## Not included
|
|
33
147
|
|
|
34
|
-
|
|
35
|
-
|
|
148
|
+
Migrations, deployable production output, a specified stdlib surface, and
|
|
149
|
+
escape hatches to npm packages (email, payments, storage) are not here. Styled
|
|
150
|
+
builds (`theme` / `recipe`) additionally need a one-time
|
|
151
|
+
`npm ci` inside `compiler/vlbuild/styling`; the single-page starter does not
|
|
152
|
+
use them.
|
|
36
153
|
|
|
37
|
-
|
|
154
|
+
**Form controls:** `input` (a full type matrix, including `checkbox`/`radio`
|
|
155
|
+
binding a `checked` state), `textarea`, `select`/`option`/`optgroup`,
|
|
156
|
+
`fieldset`/`legend`, `datalist`, `button`, `link`. `disabled:` works on
|
|
157
|
+
`button input textarea select fieldset optgroup option`. A toggle is
|
|
158
|
+
`button pressed:<bool>` (a toggle button, `aria-pressed`; there is no
|
|
159
|
+
`switch` role). There is no standalone `label` element. `variant:` is a literal
|
|
160
|
+
style name, not a computed expression. `if` used as an expression is binary
|
|
161
|
+
(`if c a else b`); `match` and block `if` are statements only. A module-level
|
|
162
|
+
`fn` is not available to a view. **`volaro supported` and `volaro crib` are
|
|
163
|
+
authoritative** for what this build accepts — `volaro spec` describes the
|
|
164
|
+
wider language design, not this subset.
|
|
38
165
|
|
|
39
166
|
## Local testing
|
|
40
167
|
|
|
41
|
-
|
|
42
|
-
|
|
168
|
+
```bash
|
|
169
|
+
npm pack # runs prepack -> vendors compiler/ -> volaro-*.tgz
|
|
170
|
+
npm test # scripts/selftest.mjs: check + build in a temp dir
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
The legacy `volara` npm package is unrelated to this release.
|
|
43
174
|
|
|
44
175
|
## License
|
|
45
176
|
|
|
46
177
|
MIT
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
## Local assets
|
|
181
|
+
|
|
182
|
+
Put public files in `assets/` beside your entry `.vl` file and use
|
|
183
|
+
`img src:"assets/logo.svg" alt:"Logo"`. Build and dev copy them to the browser
|
|
184
|
+
bundle. Dev watches changes; refresh the browser after a rebuild. Missing
|
|
185
|
+
literal asset references fail the build. Output `assets/` is compiler-owned.
|
|
186
|
+
|
|
187
|
+
## Package provenance
|
|
188
|
+
|
|
189
|
+
`compiler/SOURCE_REV` records the source commit. `compiler/SOURCE_INFO.json`
|
|
190
|
+
adds its origin, Git dirty status where available, and a SHA-256 digest of
|
|
191
|
+
compiler and CLI/documentation content. A package version alone does not
|
|
192
|
+
identify a local candidate; preserve the tarball hash as well.
|
|
193
|
+
|
|
194
|
+
Packaging a Git export uses `.volaro-source-rev`, expanded by `git archive`.
|
|
195
|
+
For other exported source, set `VOLARO_SOURCE_REV` to the full source commit
|
|
196
|
+
hash before `npm pack`. Missing/invalid revisions fail packaging; an explicit
|
|
197
|
+
revision cannot override a different checkout HEAD. Export metadata identifies
|
|
198
|
+
the base revision, not an assurance that someone has not modified the export;
|
|
199
|
+
the content hash distinguishes modified candidates. Nothing is published by packing.
|