@christianirack/brainllm 0.8.12 → 0.10.0

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.
Files changed (3) hide show
  1. package/README.md +45 -31
  2. package/brain.schema.json +630 -38
  3. package/package.json +17 -10
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- <p align="center"><img src="https://raw.githubusercontent.com/chrisifm/BRAINLLM/v0.8.12/docs/site/assets/logo.png" width="88" alt="BRAINLLM brain mark"></p>
1
+ <p align="center"><img src="https://raw.githubusercontent.com/chrisifm/BRAINLLM/v0.10.0/docs/site/assets/logo.png" width="88" alt="BRAINLLM brain mark"></p>
2
2
 
3
3
  # BRAINLLM
4
4
 
@@ -13,10 +13,10 @@
13
13
  <img src="https://img.shields.io/badge/built%20with-Rust-dea584?logo=rust&logoColor=white" alt="Built with Rust">
14
14
  <a href="https://chrisifm.github.io/BRAINLLM/"><img src="https://img.shields.io/badge/website-chrisifm.github.io%2FBRAINLLM-0071e3" alt="Website"></a>
15
15
  <a href="https://www.npmjs.com/package/@christianirack/brainllm"><img src="https://img.shields.io/npm/v/@christianirack/brainllm?color=cb3837" alt="npm version"></a>
16
- <a href="https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/LICENSE"><img src="https://img.shields.io/github/license/chrisifm/BRAINLLM" alt="License"></a>
16
+ <a href="https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/LICENSE"><img src="https://img.shields.io/github/license/chrisifm/BRAINLLM" alt="License"></a>
17
17
  </p>
18
18
 
19
- <p align="center"><a href="https://chrisifm.github.io/BRAINLLM/"><img src="https://raw.githubusercontent.com/chrisifm/BRAINLLM/v0.8.12/docs/site/assets/cover.png" alt="BRAINLLM — The web compiler for LLMs. Open the website: chrisifm.github.io/BRAINLLM"></a></p>
19
+ <p align="center"><a href="https://chrisifm.github.io/BRAINLLM/"><img src="https://raw.githubusercontent.com/chrisifm/BRAINLLM/v0.10.0/docs/site/assets/cover.png" alt="BRAINLLM — The web compiler for LLMs. Open the website: chrisifm.github.io/BRAINLLM"></a></p>
20
20
 
21
21
  <p align="center"><b>🌐 <a href="https://chrisifm.github.io/BRAINLLM/">chrisifm.github.io/BRAINLLM</a></b></p>
22
22
 
@@ -49,14 +49,14 @@ the baseline here:
49
49
  - **Real-time evidence while developing.** Compiler feedback, impact per save (diagnostics and bytes per view),
50
50
  runtime errors mapped to `.brain` lines, memory and leak inspection, over CLI and MCP.
51
51
 
52
- **[Visit the site](https://chrisifm.github.io/BRAINLLM/)** · **[Build your first app](#give-your-agent-its-first-task)** · **[Read the spec](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/SPEC.md)** · **[See the benchmarks](#show-me-the-numbers)** · **[Contribute](#build-the-tool-your-agent-needs)**
52
+ **[Visit the site](https://chrisifm.github.io/BRAINLLM/)** · **[Build your first app](#give-your-agent-its-first-task)** · **[Read the spec](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/SPEC.md)** · **[See the benchmarks](#show-me-the-numbers)** · **[Contribute](#build-the-tool-your-agent-needs)**
53
53
 
54
54
  ## A frontend language with the model in mind
55
55
 
56
56
  An agent writing your app needs a contract it can follow and feedback it can act on. BRAINLLM makes that loop
57
57
  explicit: read the spec, generate a component, check it, apply the fix, test the result.
58
58
 
59
- ![An agent reads the BRAINLLM contract, writes a component and uses compiler feedback to validate the app](https://github.com/chrisifm/BRAINLLM/raw/v0.8.12/docs/site/assets/agent-loop.png)
59
+ ![An agent reads the BRAINLLM contract, writes a component and uses compiler feedback to validate the app](https://github.com/chrisifm/BRAINLLM/raw/v0.10.0/docs/site/assets/agent-loop.png)
60
60
 
61
61
  - **Less to guess.** `brain spec` defines the supported language. One component format, a prescribed project
62
62
  structure and generators keep the model working inside a known contract.
@@ -84,7 +84,7 @@ agent has to reconstruct while preserving code that a developer can read and rev
84
84
  | Verification and delivery | Tests, `brain doctor` and the production build make validation part of the workflow |
85
85
  | Tested compiler improvements | Isolated proposals, validation gates and optional review-branch pushes let the agent contribute fixes |
86
86
 
87
- Use [SPEC.md](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/SPEC.md), the served `brain spec` and [EVOLUTION.md](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/EVOLUTION.md) for exact contracts and limits.
87
+ Use [SPEC.md](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/SPEC.md), the served `brain spec` and [EVOLUTION.md](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/EVOLUTION.md) for exact contracts and limits.
88
88
 
89
89
  ## Where it fits in the frontend stack
90
90
 
@@ -143,8 +143,8 @@ stack. Builds run serially on a shared machine. Variance matters: inspect the ra
143
143
  The output strategies differ (including SSR, client rendering and an Astro React island); this comparison measures
144
144
  production build duration for this fixture, not universal app performance or feature equivalence.
145
145
 
146
- Read the [expanded method, versions, payloads and results](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/bench/build/expanded.md). The original three-stack
147
- [historical results](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/bench/build/results/summary.md) remain available unchanged. Use `bench/build/expanded.mjs`
146
+ Read the [expanded method, versions, payloads and results](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/bench/build/expanded.md). The original three-stack
147
+ [historical results](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/bench/build/results/summary.md) remain available unchanged. Use `bench/build/expanded.mjs`
148
148
  with the documented frozen binary and scratch-directory setup to reproduce this seven-stack run.
149
149
 
150
150
  **Ask your agent to challenge the result:**
@@ -167,11 +167,11 @@ numbers support it. Do not upload results or publish anything automatically.
167
167
  Clean up only the temporary resources this run created.
168
168
  ```
169
169
 
170
- A separate [cache-key microbenchmark](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/bench/build/results/compiler-cache-lookup.json) measured **43.3× faster key
170
+ A separate [cache-key microbenchmark](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/bench/build/results/compiler-cache-lookup.json) measured **43.3× faster key
171
171
  lookup** after removing an unnecessary parse: 10,000 lookups of a 1,050-byte input. That number measures this
172
172
  internal operation only. It is not a full-build speedup or a webpack comparison.
173
173
 
174
- The [benchmark report](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/bench/REPORT.md) also tracks agent-generated apps, browser behavior, payload size and
174
+ The [benchmark report](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/bench/REPORT.md) also tracks agent-generated apps, browser behavior, payload size and
175
175
  failure recovery. Historical LLM results describe their frozen model/spec/compiler runs; they do not guarantee
176
176
  that a new prompt or compiler revision will pass. This project is open to developers and researchers who want to
177
177
  investigate how language design and compiler feedback affect agent behavior. Bring a hypothesis and a reproducer.
@@ -195,7 +195,7 @@ what each result actually establishes.
195
195
 
196
196
  Browser tooling and the preview supervisor currently require macOS or Linux. Screenshot baselines need stable browser,
197
197
  font and app-data inputs. Runtime mount-time/heap budgets remain planned; the compiler rejects those settings rather
198
- than pretending to measure them. See the [implemented contract](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/SPEC.md) and [tool internals](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/INTERNALS.md).
198
+ than pretending to measure them. See the [implemented contract](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/SPEC.md) and [tool internals](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/INTERNALS.md).
199
199
 
200
200
  ## Give your agent its first task
201
201
 
@@ -273,6 +273,20 @@ cd my-app
273
273
  brain run
274
274
  ```
275
275
 
276
+ For a website that needs only ordinary file hosting:
277
+
278
+ ```sh
279
+ brain new my-site --static
280
+ cd my-site
281
+ brain build --static --site https://example.com
282
+ ```
283
+
284
+ Replace the example origin with your own. Upload the contents of `dist/`: prerendered HTML, minified assets and
285
+ SEO files, with optional gzip/Brotli copies. No BRAINLLM/Node/Rust server is needed on the host. Static mode rejects
286
+ request-time server features. Read `brain guide static` for routes, build-time data and hosting configuration.
287
+ For GitHub Pages, set `staticOutput.host` to `github-pages` and read `brain guide github-pages`. Compiler attribution is on by default; only an explicit user request permits top-level `compilerBranding:false` to remove generated visible/hidden signatures and compiler links.
288
+ With an npm-installed compiler, use `npx brain` for these commands.
289
+
276
290
  With a source installation, use the installed `brain` commands directly. That workflow does not require
277
291
  `npm install` in the generated app.
278
292
 
@@ -289,11 +303,11 @@ For an existing app, run `brain agent setup` to merge local registrations, or
289
303
  The hook checks the app after `.brain`, `.jsbrain` and `.cssbrain` edits; it does not run tests or download packages.
290
304
  Use `brain mcp --profile minimal` for six core tools, or `--profile backend` for resource/job contracts and generators.
291
305
  With a source installation, change the registration to command `brain` and arguments `["mcp"]`.
292
- Other clients use their own MCP settings. See [the backend/agent contract](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/BACKEND.md).
306
+ Other clients use their own MCP settings. See [the backend/agent contract](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/BACKEND.md).
293
307
 
294
308
  </details>
295
309
 
296
- For an existing frontend, start with the [migration workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/MIGRATION.md). Its read-only planner recognizes
310
+ For an existing frontend, start with the [migration workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/MIGRATION.md). Its read-only planner recognizes
297
311
  React, Angular, Vue, Svelte, Next and Nuxt projects. Port one tested route or component at a time, preserve its
298
312
  behavior and keep a rollback path. It is an incremental workflow, not an automatic transpiler.
299
313
 
@@ -311,7 +325,7 @@ behavior and keep a rollback path. It is an incremental workflow, not an automat
311
325
  ```
312
326
 
313
327
  The compiler handles signal reads and writes. Derived values update when their inputs change. Styles can live in
314
- the same file and are scoped to the component. The [served spec](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/SPEC.md) defines the supported syntax.
328
+ the same file and are scoped to the component. The [served spec](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/SPEC.md) defines the supported syntax.
315
329
 
316
330
  ## Readable intent. Lean browser output.
317
331
 
@@ -319,7 +333,7 @@ An internal function named `back_to_home` can become a short identifier in produ
319
333
  on scope and the other names in the module. Keep meaningful names where the agent reasons about the code; let the
320
334
  compiler shorten eligible bindings in what the browser receives.
321
335
 
322
- This example comes from the [minifier's scope regression tests](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/crates/brain-min/src/mangle.rs):
336
+ This example comes from the [minifier's scope regression tests](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/crates/brain-min/src/mangle.rs):
323
337
 
324
338
  ```js
325
339
  // Before
@@ -354,29 +368,29 @@ BRAINLLM includes protections at several stages of the app loop:
354
368
  tests and diagnostics; failed stages remain visible to the agent.
355
369
 
356
370
  These are implemented mechanisms, not a promise to catch every bug or repair every failure. The agent still needs
357
- to test the user's workflow. See [runtime behavior in the spec](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/SPEC.md#errors-at-runtime),
358
- [component boundaries](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/runtime/brain-guard.js) and [compiler diagnostics](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/crates/brain-check/).
371
+ to test the user's workflow. See [runtime behavior in the spec](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/SPEC.md#errors-at-runtime),
372
+ [component boundaries](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/runtime/brain-guard.js) and [compiler diagnostics](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/crates/brain-check/).
359
373
 
360
374
  ## Build the tool your agent needs
361
375
 
362
376
  **Build with it. Let your LLM make it better.**
363
377
 
364
- ![An LLM turns an observed problem into an isolated fix, runs validation and submits a contribution for human review](https://github.com/chrisifm/BRAINLLM/raw/v0.8.12/docs/site/assets/improvement-loop.png)
378
+ ![An LLM turns an observed problem into an isolated fix, runs validation and submits a contribution for human review](https://github.com/chrisifm/BRAINLLM/raw/v0.10.0/docs/site/assets/improvement-loop.png)
365
379
 
366
380
  A failed compilation can become a regression test. A repeated slow step can become a benchmark. A fix made while
367
381
  building your app can become a contribution that helps the next developer and their agent.
368
382
 
369
383
  Found a compiler gap while building an app? Turn the smallest reproducible case into a regression test and a
370
- contribution. BRAINLLM includes an [evolution workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/EVOLUTION.md) for isolated proposals, validated compiler
384
+ contribution. BRAINLLM includes an [evolution workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/EVOLUTION.md) for isolated proposals, validated compiler
371
385
  binaries and reversible activation. Configured automatic pushes go to review branches; merges require the
372
386
  principal author's review. This is an explicit development workflow, not a compiler that silently rewrites itself
373
- on every build. Read the [agent improvement playbook](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/AGENT-IDEAS.md) for an opt-in prompt and concrete ideas
387
+ on every build. Read the [agent improvement playbook](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/AGENT-IDEAS.md) for an opt-in prompt and concrete ideas
374
388
  to investigate.
375
389
 
376
390
  Human developers and LLM contributors are welcome. Useful first contributions include reproducible compiler bugs,
377
391
  behavior-preserving migration examples, clearer diagnostics and performance improvements with before/after data.
378
392
 
379
- 1. Read [CONTRIBUTING.md](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/CONTRIBUTING.md) and the relevant [internals](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/INTERNALS.md).
393
+ 1. Read [CONTRIBUTING.md](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/CONTRIBUTING.md) and the relevant [internals](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/INTERNALS.md).
380
394
  2. Make a focused change with a regression test and synthetic sample data.
381
395
  3. Run `bash scripts/verify.sh`. It builds the CLI and checks Rust, runtime, tooling, diagnostic fixtures, privacy
382
396
  and repository language. Verification also requires ripgrep.
@@ -387,7 +401,7 @@ Never include app secrets, private source or customer data in a contribution.
387
401
 
388
402
  ## Know what you are adopting
389
403
 
390
- BRAINLLM is **0.8.12** (see [CHANGELOG.md](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/CHANGELOG.md)). Start with a small app or an isolated route and test the behavior you need. Features marked
404
+ BRAINLLM is **0.10.0** (see [CHANGELOG.md](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/CHANGELOG.md)). Start with a small app or an isolated route and test the behavior you need. Features marked
391
405
  as planned in the source specification are not a supported promise; `brain spec` serves the implemented contract.
392
406
  Third-party React, Angular and Vue components do not become BRAINLLM components automatically. Benchmark wins in
393
407
  build time do not imply that every runtime workload is faster.
@@ -396,15 +410,15 @@ build time do not imply that every runtime workload is faster.
396
410
 
397
411
  | You want to… | Start here |
398
412
  |---|---|
399
- | Give an agent the project context | [llms.txt](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/llms.txt) |
400
- | Write an app | [SPEC.md](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/SPEC.md) and `brain spec` |
401
- | Migrate an existing frontend | [Migration guide](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/MIGRATION.md) |
402
- | Improve the compiler while using it | [Evolution workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/EVOLUTION.md) and [agent ideas](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/AGENT-IDEAS.md) |
403
- | Understand the implementation | [Internals](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/INTERNALS.md) and [crates](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/crates/) |
404
- | Inspect examples and reproduce measurements | [Examples](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/examples/) and [benchmarks](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/bench/) |
405
- | Contribute a change | [Contributor guide](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/CONTRIBUTING.md) |
413
+ | Give an agent the project context | [llms.txt](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/llms.txt) |
414
+ | Write an app | [SPEC.md](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/SPEC.md) and `brain spec` |
415
+ | Migrate an existing frontend | [Migration guide](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/MIGRATION.md) |
416
+ | Improve the compiler while using it | [Evolution workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/EVOLUTION.md) and [agent ideas](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/AGENT-IDEAS.md) |
417
+ | Understand the implementation | [Internals](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/INTERNALS.md) and [crates](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/crates/) |
418
+ | Inspect examples and reproduce measurements | [Examples](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/examples/) and [benchmarks](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/bench/) |
419
+ | Contribute a change | [Contributor guide](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/CONTRIBUTING.md) |
406
420
 
407
- Released under the [MIT license](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/LICENSE).
421
+ Released under the [MIT license](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/LICENSE).
408
422
 
409
423
  Created and maintained by **Christian Irack Flores Maldonado**, principal author.
410
424
  [ingenieria.dev](https://ingenieria.dev) · [irack.mx](https://irack.mx) · [christian@irack.mx](mailto:christian@irack.mx)
@@ -416,5 +430,5 @@ Every merged contribution helps the next developer and their agent. Thank you to
416
430
 
417
431
  [<img src="https://avatars.githubusercontent.com/u/1562002?v=4" width="48" height="48" alt="chrisifm">](https://github.com/chrisifm) [chrisifm](https://github.com/chrisifm)
418
432
 
419
- Attribution is refreshed through a reviewed pull request. [How it works](https://github.com/chrisifm/BRAINLLM/blob/v0.8.12/docs/CONTRIBUTORS.md).
433
+ Attribution is refreshed through a reviewed pull request. [How it works](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/docs/CONTRIBUTORS.md).
420
434
  <!-- contributors:end -->
package/brain.schema.json CHANGED
@@ -5,16 +5,305 @@
5
5
  "description": "BRAINLLM app configuration. Precedence: flag > BRAIN_* variable > brain.json > defaults.",
6
6
  "type": "object",
7
7
  "properties": {
8
+ "google": {
9
+ "type": "object",
10
+ "description": "Legacy tags remain compatible. Opt in to basic mode for a consent-gated declared-event bridge, strict per-environment destinations and optional banner; see docs/GOOGLE-ANALYTICS.md.",
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "analytics": {
14
+ "type": [
15
+ "string",
16
+ "null"
17
+ ],
18
+ "description": "Legacy ID format remains compatible; basic mode applies the strict destination format."
19
+ },
20
+ "tagManager": {
21
+ "type": [
22
+ "string",
23
+ "null"
24
+ ],
25
+ "description": "Legacy ID format remains compatible; basic mode applies the strict destination format."
26
+ },
27
+ "siteVerification": {
28
+ "type": "string"
29
+ },
30
+ "mode": {
31
+ "const": "basic"
32
+ },
33
+ "banner": {
34
+ "type": "boolean",
35
+ "default": false
36
+ },
37
+ "environments": {
38
+ "type": "object",
39
+ "minProperties": 1,
40
+ "maxProperties": 20,
41
+ "propertyNames": {
42
+ "pattern": "^[A-Za-z][A-Za-z0-9_-]{0,63}$"
43
+ },
44
+ "additionalProperties": {
45
+ "type": "object",
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "analytics": {
49
+ "type": [
50
+ "string",
51
+ "null"
52
+ ],
53
+ "pattern": "^G-[A-Z0-9]{1,32}$"
54
+ },
55
+ "tagManager": {
56
+ "type": [
57
+ "string",
58
+ "null"
59
+ ],
60
+ "pattern": "^GTM-[A-Z0-9]{1,32}$"
61
+ }
62
+ },
63
+ "not": {
64
+ "required": [
65
+ "analytics",
66
+ "tagManager"
67
+ ],
68
+ "properties": {
69
+ "analytics": {
70
+ "type": "string"
71
+ },
72
+ "tagManager": {
73
+ "type": "string"
74
+ }
75
+ }
76
+ }
77
+ }
78
+ },
79
+ "events": {
80
+ "type": "object",
81
+ "maxProperties": 100,
82
+ "propertyNames": {
83
+ "allOf": [
84
+ {
85
+ "pattern": "^[A-Za-z0-9_.:-]{1,64}$"
86
+ },
87
+ {
88
+ "not": {
89
+ "enum": [
90
+ "__proto__",
91
+ "constructor",
92
+ "prototype"
93
+ ]
94
+ }
95
+ }
96
+ ]
97
+ },
98
+ "additionalProperties": {
99
+ "type": "string",
100
+ "pattern": "^(?!(?:[Gg][Aa]_|[Gg][Oo][Oo][Gg][Ll][Ee]_|[Ff][Ii][Rr][Ee][Bb][Aa][Ss][Ee]_))[A-Za-z][A-Za-z0-9_]{0,39}$"
101
+ }
102
+ },
103
+ "funnels": {
104
+ "type": "object",
105
+ "maxProperties": 20,
106
+ "propertyNames": {
107
+ "pattern": "^(?!(?:[Gg][Aa]_|[Gg][Oo][Oo][Gg][Ll][Ee]_|[Ff][Ii][Rr][Ee][Bb][Aa][Ss][Ee]_))[A-Za-z][A-Za-z0-9_]{0,39}$"
108
+ },
109
+ "additionalProperties": {
110
+ "type": "array",
111
+ "minItems": 2,
112
+ "maxItems": 20,
113
+ "items": {
114
+ "type": "string",
115
+ "pattern": "^(?!(?:[Gg][Aa]_|[Gg][Oo][Oo][Gg][Ll][Ee]_|[Ff][Ii][Rr][Ee][Bb][Aa][Ss][Ee]_))[A-Za-z][A-Za-z0-9_]{0,39}$"
116
+ },
117
+ "uniqueItems": true
118
+ }
119
+ }
120
+ },
121
+ "if": {
122
+ "anyOf": [
123
+ {
124
+ "required": [
125
+ "mode"
126
+ ]
127
+ },
128
+ {
129
+ "required": [
130
+ "environments"
131
+ ]
132
+ },
133
+ {
134
+ "required": [
135
+ "events"
136
+ ]
137
+ },
138
+ {
139
+ "required": [
140
+ "funnels"
141
+ ]
142
+ },
143
+ {
144
+ "required": [
145
+ "banner"
146
+ ]
147
+ }
148
+ ]
149
+ },
150
+ "then": {
151
+ "not": {
152
+ "required": [
153
+ "analytics",
154
+ "tagManager"
155
+ ],
156
+ "properties": {
157
+ "analytics": {
158
+ "type": "string"
159
+ },
160
+ "tagManager": {
161
+ "type": "string"
162
+ }
163
+ }
164
+ },
165
+ "properties": {
166
+ "analytics": {
167
+ "type": [
168
+ "string",
169
+ "null"
170
+ ],
171
+ "pattern": "^G-[A-Z0-9]{1,32}$"
172
+ },
173
+ "tagManager": {
174
+ "type": [
175
+ "string",
176
+ "null"
177
+ ],
178
+ "pattern": "^GTM-[A-Z0-9]{1,32}$"
179
+ }
180
+ }
181
+ }
182
+ },
183
+ "compilerBranding": {
184
+ "type": "boolean",
185
+ "default": true,
186
+ "description": "Compiler attribution in production artifacts and headers. Set false only at the user's explicit request; removes generated visible/hidden signatures and compiler repository/landing links. Does not rewrite authored content or third-party licenses."
187
+ },
188
+ "compilerBrandingScope": {
189
+ "type": "string",
190
+ "enum": [
191
+ "file",
192
+ "page"
193
+ ],
194
+ "default": "file",
195
+ "description": "file preserves attribution on generated browser JS/CSS. Explicit page scope keeps document comments, generator metadata, visible credit and build attribution without repeating comments in browser dependencies. Never select page or disable branding without the user's explicit request. Authored and third-party bytes retain their licenses."
196
+ },
197
+ "output": {
198
+ "type": "string",
199
+ "enum": [
200
+ "auto",
201
+ "static"
202
+ ],
203
+ "default": "auto",
204
+ "description": "static requires portable .html/.js/.css output and rejects request-time server dependencies. Honored by build, doctor and MCP. auto preserves normal server selection."
205
+ },
206
+ "staticOutput": {
207
+ "type": "object",
208
+ "additionalProperties": false,
209
+ "description": "Optional generated asset folders for static output only. Defaults preserve the normal layout. Paths are safe relative URL directories; . means the output root. Public originals retain their source paths; packaged SDKs preserve their complete layout beneath the js folder.",
210
+ "properties": {
211
+ "host": {
212
+ "type": "string",
213
+ "enum": [
214
+ "generic",
215
+ "github-pages"
216
+ ],
217
+ "default": "generic",
218
+ "description": "github-pages emits a root .nojekyll and 404.html, requires the public HTTPS origin and defaults hostFiles to false. Set base separately for project repositories."
219
+ },
220
+ "fonts": {
221
+ "type": "string",
222
+ "minLength": 1,
223
+ "maxLength": 192,
224
+ "description": "Hashed public/imported fonts; defaults to the assets directory unless explicitly overridden. Packaged SDK relative trees stay intact."
225
+ },
226
+ "precompressed": {
227
+ "type": "boolean",
228
+ "default": true,
229
+ "description": "Emit useful .gz/.br/.zst variants. false emits ordinary raw web files only; does not remove authored public files."
230
+ },
231
+ "hostFiles": {
232
+ "type": "boolean",
233
+ "default": true,
234
+ "description": "Emit optional _headers/_redirects and nginx/Caddy configuration hints. false requires configuring headers and redirects on the host."
235
+ },
236
+ "compression": {
237
+ "type": "string",
238
+ "enum": [
239
+ "small",
240
+ "fast"
241
+ ],
242
+ "default": "small",
243
+ "description": "Precompression profile: small preserves production size optimization; fast spends less build time encoding gzip/Brotli/zstd. Both retain raw files, useful compressed variants and actual-byte budget checks."
244
+ },
245
+ "inlineCss": {
246
+ "type": "boolean",
247
+ "default": true,
248
+ "description": "Allow small stylesheets inline; false emits generated CSS as separate hashed files in the css folder. Dynamic style attributes are unaffected."
249
+ },
250
+ "js": {
251
+ "type": "string",
252
+ "minLength": 1,
253
+ "maxLength": 192,
254
+ "description": "Generated JavaScript, workers and packaged SDK trees (default _b)."
255
+ },
256
+ "css": {
257
+ "type": "string",
258
+ "minLength": 1,
259
+ "maxLength": 192,
260
+ "description": "Generated stylesheets (default _b)."
261
+ },
262
+ "images": {
263
+ "type": "string",
264
+ "minLength": 1,
265
+ "maxLength": 192,
266
+ "description": "Generated hashed image copies (default _b); an override also places social images beneath this directory/og."
267
+ },
268
+ "assets": {
269
+ "type": "string",
270
+ "minLength": 1,
271
+ "maxLength": 192,
272
+ "description": "Other generated assets such as fonts and imported binaries (default _b)."
273
+ }
274
+ }
275
+ },
8
276
  "trace": {
9
277
  "type": "object",
10
278
  "description": "`brain trace`, the development capture of `brain run`. It never reaches a production build.",
11
279
  "additionalProperties": false,
12
280
  "properties": {
13
- "enabled": { "type": "boolean", "default": true },
14
- "redact": { "type": "array", "items": { "type": "string" }, "description": "Extra field names to hide, on top of passwords, tokens, cookies and secrets" },
15
- "maxBodyKB": { "type": "integer", "minimum": 1, "default": 16 },
16
- "maxMB": { "type": "integer", "minimum": 1, "default": 64 },
17
- "maxAgeHours": { "type": "integer", "minimum": 1, "default": 72 }
281
+ "enabled": {
282
+ "type": "boolean",
283
+ "default": true
284
+ },
285
+ "redact": {
286
+ "type": "array",
287
+ "items": {
288
+ "type": "string"
289
+ },
290
+ "description": "Extra field names to hide, on top of passwords, tokens, cookies and secrets"
291
+ },
292
+ "maxBodyKB": {
293
+ "type": "integer",
294
+ "minimum": 1,
295
+ "default": 16
296
+ },
297
+ "maxMB": {
298
+ "type": "integer",
299
+ "minimum": 1,
300
+ "default": 64
301
+ },
302
+ "maxAgeHours": {
303
+ "type": "integer",
304
+ "minimum": 1,
305
+ "default": 72
306
+ }
18
307
  }
19
308
  },
20
309
  "$schema": {
@@ -48,12 +337,73 @@
48
337
  "server": {
49
338
  "type": "object",
50
339
  "additionalProperties": false,
51
- "description": "Limits shared by brain run and the production server (dist/server.mjs). BRAIN_MAX_BODY_KB, BRAIN_TIMEOUT_MS and BRAIN_RPC_LIMIT override them at run time. brain check reports an invalid value as B0707.",
340
+ "description": "Server request limits and explicit optional startup data warmup. The warmup deadline is independent of RPC/load request timeout.",
52
341
  "properties": {
53
- "maxBodyKB": { "type": "integer", "minimum": 1, "maximum": 65536, "default": 1024, "description": "Largest RPC or form body in KiB (1024 bytes); a larger body is answered with 413. Raise it for files sent as base64 in RPC arguments." },
54
- "timeoutMs": { "type": "integer", "minimum": 100, "maximum": 600000, "default": 10000, "description": "Deadline for a server function call and for load(); past it the server answers 504." },
55
- "earlyHints": { "type": "boolean", "default": false, "description": "Send 103 Early Hints from the Node server. Leave off behind nginx below 1.29, which takes a 103 as the final response. Link headers are always sent. BRAIN_EARLY_HINTS=1 or 0 overrides it." },
56
- "rpcPerMinute": { "type": "integer", "minimum": 1, "maximum": 100000, "default": 60, "description": "Calls per client IP and function per minute; past it the server answers 429 with Retry-After." }
342
+ "maxBodyKB": {
343
+ "type": "integer",
344
+ "minimum": 1,
345
+ "maximum": 65536,
346
+ "default": 1024,
347
+ "description": "Largest RPC or form body in KiB (1024 bytes); a larger body is answered with 413. Raise it for files sent as base64 in RPC arguments."
348
+ },
349
+ "timeoutMs": {
350
+ "type": "integer",
351
+ "minimum": 100,
352
+ "maximum": 600000,
353
+ "default": 10000,
354
+ "description": "Deadline for a server function call and for load(); past it the server answers 504."
355
+ },
356
+ "earlyHints": {
357
+ "type": "boolean",
358
+ "default": false,
359
+ "description": "Send 103 Early Hints from the Node server. Leave off behind nginx below 1.29, which takes a 103 as the final response. Link headers are always sent. BRAIN_EARLY_HINTS=1 or 0 overrides it."
360
+ },
361
+ "rpcPerMinute": {
362
+ "type": "integer",
363
+ "minimum": 1,
364
+ "maximum": 100000,
365
+ "default": 60,
366
+ "description": "Calls per client IP and function per minute; past it the server answers 429 with Retry-After."
367
+ },
368
+ "warmup": {
369
+ "type": "object",
370
+ "additionalProperties": false,
371
+ "required": [
372
+ "paths"
373
+ ],
374
+ "description": "Opt-in production startup data reads. Exact public cached SSR routes only, anonymous read-only GET, at most two concurrent requests. Requires a known site origin. No headers, cookies, credentials, writes or external warmup URLs. Absent creates no data warmup requests.",
375
+ "properties": {
376
+ "paths": {
377
+ "type": "array",
378
+ "minItems": 1,
379
+ "maxItems": 8,
380
+ "uniqueItems": true,
381
+ "items": {
382
+ "type": "string",
383
+ "minLength": 1,
384
+ "maxLength": 256,
385
+ "pattern": "^/(?!/)"
386
+ },
387
+ "description": "Canonical public paths including base/locale; no query, hash, traversal, encoded separators, credentials or parameter patterns. Runtime/build enforce the exact route and 256-byte limit."
388
+ },
389
+ "timeoutMs": {
390
+ "type": "integer",
391
+ "minimum": 100,
392
+ "maximum": 10000,
393
+ "default": 8000,
394
+ "description": "Absolute opt-in module/data warmup budget including abort and cleanup."
395
+ },
396
+ "onError": {
397
+ "type": "string",
398
+ "enum": [
399
+ "continue",
400
+ "abort"
401
+ ],
402
+ "default": "continue",
403
+ "description": "continue permits readiness after clean partial failures; abort rejects startup/reload. An overdue CPU task or incomplete cleanup is always fatal."
404
+ }
405
+ }
406
+ }
57
407
  }
58
408
  },
59
409
  "csp": {
@@ -65,21 +415,60 @@
65
415
  "type": "array",
66
416
  "maxItems": 64,
67
417
  "uniqueItems": true,
68
- "items": { "type": "string", "pattern": "^(https://[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:([0-9]+|\\*))?$" },
418
+ "items": {
419
+ "type": "string",
420
+ "pattern": "^(https://[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:([0-9]+|\\*))?$"
421
+ },
69
422
  "description": "Exact hosts pages may load scripts from, besides the site's own. A literal script outside this list is reported as B0811; a third-party script tag still needs integrity (B0123)."
70
423
  },
424
+ "mediaSrc": {
425
+ "type": "array",
426
+ "maxItems": 64,
427
+ "uniqueItems": true,
428
+ "items": {
429
+ "type": "string",
430
+ "pattern": "^(blob:|(https://[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:[0-9]+)?)$"
431
+ },
432
+ "description": "Sources for audio and video, besides the own origin. Allows blob: and exact HTTPS origins; HTTP is local-loopback only. Omitted keeps default-src fallback."
433
+ },
434
+ "workerSrc": {
435
+ "type": "array",
436
+ "maxItems": 64,
437
+ "uniqueItems": true,
438
+ "items": {
439
+ "type": "string",
440
+ "pattern": "^(blob:|(https://[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:[0-9]+)?)$"
441
+ },
442
+ "description": "Sources for Worker, SharedWorker and ServiceWorker scripts, besides the own origin. Allows blob: and exact HTTPS origins; HTTP is local-loopback only. Omitted preserves the standard worker directive fallback."
443
+ },
71
444
  "frameSrc": {
72
445
  "type": "array",
73
446
  "maxItems": 64,
74
447
  "uniqueItems": true,
75
- "items": { "type": "string", "pattern": "^(https://(\\*\\.)?[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:([0-9]+|\\*))?$" },
448
+ "items": {
449
+ "type": "string",
450
+ "pattern": "^(https://(\\*\\.)?[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:([0-9]+|\\*))?$"
451
+ },
76
452
  "description": "Origins pages may embed in an iframe, besides the site's own. A literal iframe outside this list is reported as B0811."
77
453
  },
454
+ "formAction": {
455
+ "type": "array",
456
+ "maxItems": 64,
457
+ "uniqueItems": true,
458
+ "items": {
459
+ "type": "string",
460
+ "pattern": "^(https://[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:[0-9]+)?$"
461
+ },
462
+ "description": "Exact origins native forms may submit to, besides the own origin. HTTPS or local-loopback HTTP only; no wildcard, path, blob or socket sources. Omitted or [] keeps form-action own-origin only."
463
+ },
78
464
  "connectSrc": {
79
465
  "type": "array",
80
466
  "maxItems": 64,
81
467
  "uniqueItems": true,
82
- "items": { "type": "string", "pattern": "^((https|wss)://(\\*\\.)?[a-z0-9.-]+|(http|ws)://(localhost|127\\.0\\.0\\.1))(:([0-9]+|\\*))?$" },
468
+ "items": {
469
+ "type": "string",
470
+ "pattern": "^((https|wss)://(\\*\\.)?[a-z0-9.-]+|(http|ws)://(localhost|127\\.0\\.0\\.1))(:([0-9]+|\\*))?$"
471
+ },
83
472
  "description": "Origins pages may call besides the site's own, which is always allowed. Replaces the broad `https: wss:` of `connect-src`; [] means the own origin only. Omitted keeps the broad form and `brain check` warns B0795."
84
473
  }
85
474
  }
@@ -105,24 +494,36 @@
105
494
  "minItems": 1,
106
495
  "maxItems": 8,
107
496
  "uniqueItems": true,
108
- "items": { "type": "string", "format": "uri", "pattern": "^https?://[^/@?#\\s]+$" },
497
+ "items": {
498
+ "type": "string",
499
+ "format": "uri",
500
+ "pattern": "^https?://[^/@?#\\s]+$"
501
+ },
109
502
  "description": "Canonical public HTTP(S) origins without path or trailing slash. Defaults to the origin of PUBLIC_SITE_URL. --origin replaces this list."
110
503
  },
111
504
  "sockets": {
112
505
  "description": "Absent/false disables native live resources. Every socket origin must also occur in the resolved HTTP origins; no implicit CORS expansion.",
113
506
  "oneOf": [
114
- { "const": false },
507
+ {
508
+ "const": false
509
+ },
115
510
  {
116
511
  "type": "object",
117
512
  "additionalProperties": false,
118
- "required": ["allowedOrigins"],
513
+ "required": [
514
+ "allowedOrigins"
515
+ ],
119
516
  "properties": {
120
517
  "allowedOrigins": {
121
518
  "type": "array",
122
519
  "minItems": 1,
123
520
  "maxItems": 8,
124
521
  "uniqueItems": true,
125
- "items": { "type": "string", "format": "uri", "pattern": "^https?://[^/@?#\\s]+$" }
522
+ "items": {
523
+ "type": "string",
524
+ "format": "uri",
525
+ "pattern": "^https?://[^/@?#\\s]+$"
526
+ }
126
527
  }
127
528
  }
128
529
  }
@@ -155,7 +556,10 @@
155
556
  "default": 2048
156
557
  },
157
558
  "update": {
158
- "enum": ["auto", "prompt"],
559
+ "enum": [
560
+ "auto",
561
+ "prompt"
562
+ ],
159
563
  "default": "auto",
160
564
  "description": "prompt: a new service worker waits until the page calls applyUpdate()"
161
565
  },
@@ -165,14 +569,44 @@
165
569
  "description": "Service worker strategies for same-origin data paths; first match wins",
166
570
  "items": {
167
571
  "type": "object",
168
- "required": ["match", "strategy"],
572
+ "required": [
573
+ "match",
574
+ "strategy"
575
+ ],
169
576
  "additionalProperties": false,
170
577
  "properties": {
171
- "match": { "type": "string", "pattern": "^/[^*?#\\s]*\\*?$" },
172
- "strategy": { "enum": ["cache-first", "network-first", "stale-while-revalidate", "network-only"] },
173
- "maxEntries": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 64 },
174
- "maxAge": { "type": ["string", "integer"], "description": "30s, 10m, 1h, 7d or seconds; omitted = no age limit" },
175
- "timeout": { "type": ["string", "integer"], "description": "network-first deadline, 1s to 60s (default 3s)" }
578
+ "match": {
579
+ "type": "string",
580
+ "pattern": "^/[^*?#\\s]*\\*?$"
581
+ },
582
+ "strategy": {
583
+ "enum": [
584
+ "cache-first",
585
+ "network-first",
586
+ "stale-while-revalidate",
587
+ "network-only"
588
+ ]
589
+ },
590
+ "maxEntries": {
591
+ "type": "integer",
592
+ "minimum": 1,
593
+ "maximum": 1000,
594
+ "default": 64
595
+ },
596
+ "maxAge": {
597
+ "type": [
598
+ "string",
599
+ "integer"
600
+ ],
601
+ "description": "30s, 10m, 1h, 7d or seconds; omitted = no age limit"
602
+ },
603
+ "timeout": {
604
+ "type": [
605
+ "string",
606
+ "integer"
607
+ ],
608
+ "description": "network-first deadline, 1s to 60s (default 3s)"
609
+ }
176
610
  }
177
611
  }
178
612
  }
@@ -195,10 +629,26 @@
195
629
  "type": "object",
196
630
  "description": "Minimum score per category for `brain lighthouse`. Accessibility and SEO default to 100 because they depend only on the page; performance and best-practices are checked only when set.",
197
631
  "properties": {
198
- "performance": { "type": "number", "minimum": 0, "maximum": 100 },
199
- "accessibility": { "type": "number", "minimum": 0, "maximum": 100 },
200
- "best-practices": { "type": "number", "minimum": 0, "maximum": 100 },
201
- "seo": { "type": "number", "minimum": 0, "maximum": 100 }
632
+ "performance": {
633
+ "type": "number",
634
+ "minimum": 0,
635
+ "maximum": 100
636
+ },
637
+ "accessibility": {
638
+ "type": "number",
639
+ "minimum": 0,
640
+ "maximum": 100
641
+ },
642
+ "best-practices": {
643
+ "type": "number",
644
+ "minimum": 0,
645
+ "maximum": 100
646
+ },
647
+ "seo": {
648
+ "type": "number",
649
+ "minimum": 0,
650
+ "maximum": 100
651
+ }
202
652
  }
203
653
  }
204
654
  }
@@ -206,6 +656,12 @@
206
656
  "seo": {
207
657
  "type": "object",
208
658
  "properties": {
659
+ "siteName": {
660
+ "type": "string",
661
+ "minLength": 1,
662
+ "maxLength": 512,
663
+ "description": "Public display name for SEO and discovery files. Overrides root name without renaming the package."
664
+ },
209
665
  "minScore": {
210
666
  "type": "number",
211
667
  "minimum": 0,
@@ -214,7 +670,10 @@
214
670
  },
215
671
  "focus": {
216
672
  "type": "array",
217
- "items": { "type": "string", "minLength": 1 },
673
+ "items": {
674
+ "type": "string",
675
+ "minLength": 1
676
+ },
218
677
  "description": "Terms the site wants to be known for, most relevant first. `brain seo audit` reports where each one lives and how pages link to it; more than 3 is a warning, and nothing here blocks a build"
219
678
  },
220
679
  "sitemap": {
@@ -258,7 +717,11 @@
258
717
  "description": "Write sections.json, the manifest of every section (title, description, home page, feed and pages with URL, Markdown copy and lastmod), linked from every page; false turns it off"
259
718
  },
260
719
  "trailingSlash": {
261
- "enum": ["never", "always", "ignore"],
720
+ "enum": [
721
+ "never",
722
+ "always",
723
+ "ignore"
724
+ ],
262
725
  "default": "never",
263
726
  "description": "One URL per page for crawlers: never = /about/ answers 301 to /about; always = /about answers 301 to /about/; ignore = both are served. Folded into the same single hop as redirects.json"
264
727
  },
@@ -316,16 +779,40 @@
316
779
  "analytics": {
317
780
  "description": "First-party behavior analytics stored in the native backend's Postgres (docs/backend/analytics.md). On by default when a native backend runs; false turns it off.",
318
781
  "oneOf": [
319
- { "type": "boolean" },
782
+ {
783
+ "type": "boolean"
784
+ },
320
785
  {
321
786
  "type": "object",
322
787
  "additionalProperties": false,
323
788
  "properties": {
324
- "enabled": { "type": "boolean" },
325
- "consent": { "enum": ["required", "none"], "description": "required: record nothing until consent('analytics')" },
326
- "retentionDays": { "type": "integer", "minimum": 1, "maximum": 3650, "default": 180 },
327
- "countryHeader": { "type": "string", "pattern": "^[a-z0-9-]{1,64}$", "description": "Proxy header with an ISO country code, e.g. cf-ipcountry" },
328
- "eventsPerMinute": { "type": "integer", "minimum": 1, "maximum": 6000, "default": 600 }
789
+ "enabled": {
790
+ "type": "boolean"
791
+ },
792
+ "consent": {
793
+ "enum": [
794
+ "required",
795
+ "none"
796
+ ],
797
+ "description": "required: record nothing until consent('analytics')"
798
+ },
799
+ "retentionDays": {
800
+ "type": "integer",
801
+ "minimum": 1,
802
+ "maximum": 3650,
803
+ "default": 180
804
+ },
805
+ "countryHeader": {
806
+ "type": "string",
807
+ "pattern": "^[a-z0-9-]{1,64}$",
808
+ "description": "Proxy header with an ISO country code, e.g. cf-ipcountry"
809
+ },
810
+ "eventsPerMinute": {
811
+ "type": "integer",
812
+ "minimum": 1,
813
+ "maximum": 6000,
814
+ "default": 600
815
+ }
329
816
  }
330
817
  }
331
818
  ]
@@ -367,9 +854,18 @@
367
854
  },
368
855
  "lint": {
369
856
  "type": "object",
370
- "description": "Per-rule level, e.g. {\"B1307\": \"off\"}. Only the quality families (B09xx-B13xx) can be changed; other overrides are ignored.",
857
+ "description": "Per-rule level, e.g. {\"B1307\": \"off\"}. Quality families B09xx-B13xx can be changed. Optional WebMCP advice B1706/B1707/B1708 accepts off/info/warning; error overrides are ignored. Security and tool contracts cannot be lowered.",
371
858
  "propertyNames": {
372
- "pattern": "^B(09|1[0-3])[0-9]{2}$"
859
+ "pattern": "^B(?:(09|1[0-3])[0-9]{2}|170[678])$"
860
+ },
861
+ "patternProperties": {
862
+ "^B170[678]$": {
863
+ "enum": [
864
+ "off",
865
+ "info",
866
+ "warning"
867
+ ]
868
+ }
373
869
  },
374
870
  "additionalProperties": {
375
871
  "enum": [
@@ -395,6 +891,102 @@
395
891
  ],
396
892
  "default": "baseline-widely",
397
893
  "description": "Browser support target for B21xx warnings. Explicit years must not be newer than the pinned web-features dataset."
894
+ },
895
+ "sentry": {
896
+ "oneOf": [
897
+ {
898
+ "const": false
899
+ },
900
+ {
901
+ "type": "object",
902
+ "additionalProperties": false,
903
+ "required": [
904
+ "enabled"
905
+ ],
906
+ "properties": {
907
+ "enabled": {
908
+ "type": "boolean"
909
+ }
910
+ }
911
+ }
912
+ ],
913
+ "default": false,
914
+ "description": "Optional private browser error reporting through the Node server. Requires explicit analytics consent and private BRAIN_SENTRY_DSN. Unsupported for static output. No automatic source-map upload."
915
+ },
916
+ "routeParams": {
917
+ "type": "object",
918
+ "description": "Explicit frontend route constraints keyed by exact brain map route. Whole raw encoded single segments use the bounded deterministic ASCII grammar; unknown routes/names, duplicate keys and invalid patterns fail B1880. See docs/ROUTE-CONSTRAINTS.md. Not authorization.",
919
+ "propertyNames": {
920
+ "pattern": "^/"
921
+ },
922
+ "additionalProperties": {
923
+ "type": "object",
924
+ "minProperties": 1,
925
+ "propertyNames": {
926
+ "pattern": "^[A-Za-z_$][A-Za-z0-9_$]*$"
927
+ },
928
+ "additionalProperties": {
929
+ "type": "string",
930
+ "minLength": 1,
931
+ "maxLength": 256
932
+ }
933
+ }
934
+ },
935
+ "vitals": {
936
+ "default": false,
937
+ "description": "Independent explicit native document-performance aggregates. Requires existing Node/SSR and fixed native backend; no static conversion. Consent and DNT/GPC enforced, declared public patterns only; see docs/backend/vitals.md.",
938
+ "oneOf": [
939
+ {
940
+ "const": false
941
+ },
942
+ {
943
+ "type": "object",
944
+ "additionalProperties": false,
945
+ "required": [
946
+ "enabled"
947
+ ],
948
+ "properties": {
949
+ "enabled": {
950
+ "type": "boolean"
951
+ },
952
+ "routes": {
953
+ "type": "array",
954
+ "minItems": 0,
955
+ "maxItems": 512,
956
+ "uniqueItems": true,
957
+ "items": {
958
+ "type": "string",
959
+ "minLength": 1,
960
+ "maxLength": 160,
961
+ "pattern": "^(/|(/[A-Za-z0-9_-]+|/:[a-z][a-z0-9_]*)+)$"
962
+ }
963
+ },
964
+ "retentionDays": {
965
+ "type": "integer",
966
+ "minimum": 1,
967
+ "maximum": 90,
968
+ "default": 30
969
+ }
970
+ },
971
+ "if": {
972
+ "properties": {
973
+ "enabled": {
974
+ "const": true
975
+ }
976
+ }
977
+ },
978
+ "then": {
979
+ "required": [
980
+ "routes"
981
+ ],
982
+ "properties": {
983
+ "routes": {
984
+ "minItems": 1
985
+ }
986
+ }
987
+ }
988
+ }
989
+ ]
398
990
  }
399
991
  }
400
992
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@christianirack/brainllm",
3
- "version": "0.8.12",
4
- "description": "BRAINLLM: the Rust-powered full-stack web compiler for LLMs and AI agents. Native brain CLI, dev server, optimized builds, PostgreSQL backend and MCP server.",
3
+ "version": "0.10.0",
4
+ "description": "BRAINLLM: a Rust-powered frontend and full-stack web compiler. Optimized JavaScript, SSR, SEO-ready static sites, a PostgreSQL backend and MCP tools for LLMs and AI agents.",
5
5
  "bin": {
6
6
  "brain": "bin/brain.js"
7
7
  },
@@ -15,13 +15,13 @@
15
15
  "node": ">=22"
16
16
  },
17
17
  "optionalDependencies": {
18
- "@christianirack/brainllm-darwin-arm64": "0.8.12",
19
- "@christianirack/brainllm-darwin-x64": "0.8.12",
20
- "@christianirack/brainllm-linux-x64": "0.8.12",
21
- "@christianirack/brainllm-linux-arm64": "0.8.12",
22
- "@christianirack/brainllm-linux-x64-musl": "0.8.12",
23
- "@christianirack/brainllm-win32-x64": "0.8.12",
24
- "@christianirack/brainllm-win32-arm64": "0.8.12"
18
+ "@christianirack/brainllm-darwin-arm64": "0.10.0",
19
+ "@christianirack/brainllm-darwin-x64": "0.10.0",
20
+ "@christianirack/brainllm-linux-x64": "0.10.0",
21
+ "@christianirack/brainllm-linux-arm64": "0.10.0",
22
+ "@christianirack/brainllm-linux-x64-musl": "0.10.0",
23
+ "@christianirack/brainllm-win32-x64": "0.10.0",
24
+ "@christianirack/brainllm-win32-arm64": "0.10.0"
25
25
  },
26
26
  "keywords": [
27
27
  "llm",
@@ -39,11 +39,14 @@
39
39
  "back-end",
40
40
  "fullstack",
41
41
  "full-stack",
42
+ "javascript",
43
+ "nodejs",
44
+ "html",
45
+ "css",
42
46
  "cli",
43
47
  "command-line",
44
48
  "developer-tools",
45
49
  "design-system",
46
- "css",
47
50
  "testing",
48
51
  "e2e",
49
52
  "postgresql",
@@ -60,6 +63,10 @@
60
63
  "reactive",
61
64
  "components",
62
65
  "ssr",
66
+ "ssg",
67
+ "static-site-generator",
68
+ "static-site",
69
+ "seo",
63
70
  "spa",
64
71
  "web"
65
72
  ],