@christianirack/brainllm 0.9.0 → 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 +31 -31
  2. package/brain.schema.json +567 -48
  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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/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.9.0/SPEC.md), the served `brain spec` and [EVOLUTION.md](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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.9.0/bench/build/expanded.md). The original three-stack
147
- [historical results](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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.9.0/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.9.0/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.9.0/SPEC.md) and [tool internals](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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
 
@@ -303,11 +303,11 @@ For an existing app, run `brain agent setup` to merge local registrations, or
303
303
  The hook checks the app after `.brain`, `.jsbrain` and `.cssbrain` edits; it does not run tests or download packages.
304
304
  Use `brain mcp --profile minimal` for six core tools, or `--profile backend` for resource/job contracts and generators.
305
305
  With a source installation, change the registration to command `brain` and arguments `["mcp"]`.
306
- Other clients use their own MCP settings. See [the backend/agent contract](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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).
307
307
 
308
308
  </details>
309
309
 
310
- For an existing frontend, start with the [migration workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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
311
311
  React, Angular, Vue, Svelte, Next and Nuxt projects. Port one tested route or component at a time, preserve its
312
312
  behavior and keep a rollback path. It is an incremental workflow, not an automatic transpiler.
313
313
 
@@ -325,7 +325,7 @@ behavior and keep a rollback path. It is an incremental workflow, not an automat
325
325
  ```
326
326
 
327
327
  The compiler handles signal reads and writes. Derived values update when their inputs change. Styles can live in
328
- the same file and are scoped to the component. The [served spec](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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.
329
329
 
330
330
  ## Readable intent. Lean browser output.
331
331
 
@@ -333,7 +333,7 @@ An internal function named `back_to_home` can become a short identifier in produ
333
333
  on scope and the other names in the module. Keep meaningful names where the agent reasons about the code; let the
334
334
  compiler shorten eligible bindings in what the browser receives.
335
335
 
336
- This example comes from the [minifier's scope regression tests](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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):
337
337
 
338
338
  ```js
339
339
  // Before
@@ -368,29 +368,29 @@ BRAINLLM includes protections at several stages of the app loop:
368
368
  tests and diagnostics; failed stages remain visible to the agent.
369
369
 
370
370
  These are implemented mechanisms, not a promise to catch every bug or repair every failure. The agent still needs
371
- to test the user's workflow. See [runtime behavior in the spec](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/SPEC.md#errors-at-runtime),
372
- [component boundaries](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/runtime/brain-guard.js) and [compiler diagnostics](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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/).
373
373
 
374
374
  ## Build the tool your agent needs
375
375
 
376
376
  **Build with it. Let your LLM make it better.**
377
377
 
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.9.0/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)
379
379
 
380
380
  A failed compilation can become a regression test. A repeated slow step can become a benchmark. A fix made while
381
381
  building your app can become a contribution that helps the next developer and their agent.
382
382
 
383
383
  Found a compiler gap while building an app? Turn the smallest reproducible case into a regression test and a
384
- contribution. BRAINLLM includes an [evolution workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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
385
385
  binaries and reversible activation. Configured automatic pushes go to review branches; merges require the
386
386
  principal author's review. This is an explicit development workflow, not a compiler that silently rewrites itself
387
- on every build. Read the [agent improvement playbook](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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
388
388
  to investigate.
389
389
 
390
390
  Human developers and LLM contributors are welcome. Useful first contributions include reproducible compiler bugs,
391
391
  behavior-preserving migration examples, clearer diagnostics and performance improvements with before/after data.
392
392
 
393
- 1. Read [CONTRIBUTING.md](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/CONTRIBUTING.md) and the relevant [internals](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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).
394
394
  2. Make a focused change with a regression test and synthetic sample data.
395
395
  3. Run `bash scripts/verify.sh`. It builds the CLI and checks Rust, runtime, tooling, diagnostic fixtures, privacy
396
396
  and repository language. Verification also requires ripgrep.
@@ -401,7 +401,7 @@ Never include app secrets, private source or customer data in a contribution.
401
401
 
402
402
  ## Know what you are adopting
403
403
 
404
- BRAINLLM is **0.9.0** (see [CHANGELOG.md](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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
405
405
  as planned in the source specification are not a supported promise; `brain spec` serves the implemented contract.
406
406
  Third-party React, Angular and Vue components do not become BRAINLLM components automatically. Benchmark wins in
407
407
  build time do not imply that every runtime workload is faster.
@@ -410,15 +410,15 @@ build time do not imply that every runtime workload is faster.
410
410
 
411
411
  | You want to… | Start here |
412
412
  |---|---|
413
- | Give an agent the project context | [llms.txt](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/llms.txt) |
414
- | Write an app | [SPEC.md](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/SPEC.md) and `brain spec` |
415
- | Migrate an existing frontend | [Migration guide](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/docs/MIGRATION.md) |
416
- | Improve the compiler while using it | [Evolution workflow](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/docs/EVOLUTION.md) and [agent ideas](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/docs/AGENT-IDEAS.md) |
417
- | Understand the implementation | [Internals](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/docs/INTERNALS.md) and [crates](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/crates/) |
418
- | Inspect examples and reproduce measurements | [Examples](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/examples/) and [benchmarks](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/bench/) |
419
- | Contribute a change | [Contributor guide](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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) |
420
420
 
421
- Released under the [MIT license](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/LICENSE).
421
+ Released under the [MIT license](https://github.com/chrisifm/BRAINLLM/blob/v0.10.0/LICENSE).
422
422
 
423
423
  Created and maintained by **Christian Irack Flores Maldonado**, principal author.
424
424
  [ingenieria.dev](https://ingenieria.dev) · [irack.mx](https://irack.mx) · [christian@irack.mx](mailto:christian@irack.mx)
@@ -430,5 +430,5 @@ Every merged contribution helps the next developer and their agent. Thank you to
430
430
 
431
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)
432
432
 
433
- Attribution is refreshed through a reviewed pull request. [How it works](https://github.com/chrisifm/BRAINLLM/blob/v0.9.0/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).
434
434
  <!-- contributors:end -->
package/brain.schema.json CHANGED
@@ -5,9 +5,202 @@
5
5
  "description": "BRAINLLM app configuration. Precedence: flag > BRAIN_* variable > brain.json > defaults.",
6
6
  "type": "object",
7
7
  "properties": {
8
- "compilerBranding": { "type": "boolean", "default": true, "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." },
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
+ },
9
197
  "output": {
10
- "type": "string", "enum": ["auto", "static"], "default": "auto",
198
+ "type": "string",
199
+ "enum": [
200
+ "auto",
201
+ "static"
202
+ ],
203
+ "default": "auto",
11
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."
12
205
  },
13
206
  "staticOutput": {
@@ -15,12 +208,45 @@
15
208
  "additionalProperties": false,
16
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.",
17
210
  "properties": {
18
- "host": { "type": "string", "enum": ["generic", "github-pages"], "default": "generic", "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." },
19
- "fonts": { "type": "string", "minLength": 1, "maxLength": 192, "description": "Hashed public/imported fonts; defaults to the assets directory unless explicitly overridden. Packaged SDK relative trees stay intact." },
20
- "precompressed": { "type": "boolean", "default": true, "description": "Emit useful .gz/.br/.zst variants. false emits ordinary raw web files only; does not remove authored public files." },
21
- "hostFiles": { "type": "boolean", "default": true, "description": "Emit optional _headers/_redirects and nginx/Caddy configuration hints. false requires configuring headers and redirects on the host." },
22
- "compression": { "type": "string", "enum": ["small", "fast"], "default": "small", "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." },
23
- "inlineCss": { "type": "boolean", "default": true, "description": "Allow small stylesheets inline; false emits generated CSS as separate hashed files in the css folder. Dynamic style attributes are unaffected." },
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
+ },
24
250
  "js": {
25
251
  "type": "string",
26
252
  "minLength": 1,
@@ -52,11 +278,32 @@
52
278
  "description": "`brain trace`, the development capture of `brain run`. It never reaches a production build.",
53
279
  "additionalProperties": false,
54
280
  "properties": {
55
- "enabled": { "type": "boolean", "default": true },
56
- "redact": { "type": "array", "items": { "type": "string" }, "description": "Extra field names to hide, on top of passwords, tokens, cookies and secrets" },
57
- "maxBodyKB": { "type": "integer", "minimum": 1, "default": 16 },
58
- "maxMB": { "type": "integer", "minimum": 1, "default": 64 },
59
- "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
+ }
60
307
  }
61
308
  },
62
309
  "$schema": {
@@ -90,12 +337,73 @@
90
337
  "server": {
91
338
  "type": "object",
92
339
  "additionalProperties": false,
93
- "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.",
94
341
  "properties": {
95
- "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." },
96
- "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." },
97
- "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." },
98
- "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
+ }
99
407
  }
100
408
  },
101
409
  "csp": {
@@ -107,7 +415,10 @@
107
415
  "type": "array",
108
416
  "maxItems": 64,
109
417
  "uniqueItems": true,
110
- "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
+ },
111
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)."
112
423
  },
113
424
  "mediaSrc": {
@@ -134,21 +445,30 @@
134
445
  "type": "array",
135
446
  "maxItems": 64,
136
447
  "uniqueItems": true,
137
- "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
+ },
138
452
  "description": "Origins pages may embed in an iframe, besides the site's own. A literal iframe outside this list is reported as B0811."
139
453
  },
140
454
  "formAction": {
141
455
  "type": "array",
142
456
  "maxItems": 64,
143
457
  "uniqueItems": true,
144
- "items": { "type": "string", "pattern": "^(https://[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:[0-9]+)?$" },
458
+ "items": {
459
+ "type": "string",
460
+ "pattern": "^(https://[a-z0-9.-]+|http://(localhost|127\\.0\\.0\\.1))(:[0-9]+)?$"
461
+ },
145
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."
146
463
  },
147
464
  "connectSrc": {
148
465
  "type": "array",
149
466
  "maxItems": 64,
150
467
  "uniqueItems": true,
151
- "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
+ },
152
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."
153
473
  }
154
474
  }
@@ -174,24 +494,36 @@
174
494
  "minItems": 1,
175
495
  "maxItems": 8,
176
496
  "uniqueItems": true,
177
- "items": { "type": "string", "format": "uri", "pattern": "^https?://[^/@?#\\s]+$" },
497
+ "items": {
498
+ "type": "string",
499
+ "format": "uri",
500
+ "pattern": "^https?://[^/@?#\\s]+$"
501
+ },
178
502
  "description": "Canonical public HTTP(S) origins without path or trailing slash. Defaults to the origin of PUBLIC_SITE_URL. --origin replaces this list."
179
503
  },
180
504
  "sockets": {
181
505
  "description": "Absent/false disables native live resources. Every socket origin must also occur in the resolved HTTP origins; no implicit CORS expansion.",
182
506
  "oneOf": [
183
- { "const": false },
507
+ {
508
+ "const": false
509
+ },
184
510
  {
185
511
  "type": "object",
186
512
  "additionalProperties": false,
187
- "required": ["allowedOrigins"],
513
+ "required": [
514
+ "allowedOrigins"
515
+ ],
188
516
  "properties": {
189
517
  "allowedOrigins": {
190
518
  "type": "array",
191
519
  "minItems": 1,
192
520
  "maxItems": 8,
193
521
  "uniqueItems": true,
194
- "items": { "type": "string", "format": "uri", "pattern": "^https?://[^/@?#\\s]+$" }
522
+ "items": {
523
+ "type": "string",
524
+ "format": "uri",
525
+ "pattern": "^https?://[^/@?#\\s]+$"
526
+ }
195
527
  }
196
528
  }
197
529
  }
@@ -224,7 +556,10 @@
224
556
  "default": 2048
225
557
  },
226
558
  "update": {
227
- "enum": ["auto", "prompt"],
559
+ "enum": [
560
+ "auto",
561
+ "prompt"
562
+ ],
228
563
  "default": "auto",
229
564
  "description": "prompt: a new service worker waits until the page calls applyUpdate()"
230
565
  },
@@ -234,14 +569,44 @@
234
569
  "description": "Service worker strategies for same-origin data paths; first match wins",
235
570
  "items": {
236
571
  "type": "object",
237
- "required": ["match", "strategy"],
572
+ "required": [
573
+ "match",
574
+ "strategy"
575
+ ],
238
576
  "additionalProperties": false,
239
577
  "properties": {
240
- "match": { "type": "string", "pattern": "^/[^*?#\\s]*\\*?$" },
241
- "strategy": { "enum": ["cache-first", "network-first", "stale-while-revalidate", "network-only"] },
242
- "maxEntries": { "type": "integer", "minimum": 1, "maximum": 1000, "default": 64 },
243
- "maxAge": { "type": ["string", "integer"], "description": "30s, 10m, 1h, 7d or seconds; omitted = no age limit" },
244
- "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
+ }
245
610
  }
246
611
  }
247
612
  }
@@ -264,10 +629,26 @@
264
629
  "type": "object",
265
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.",
266
631
  "properties": {
267
- "performance": { "type": "number", "minimum": 0, "maximum": 100 },
268
- "accessibility": { "type": "number", "minimum": 0, "maximum": 100 },
269
- "best-practices": { "type": "number", "minimum": 0, "maximum": 100 },
270
- "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
+ }
271
652
  }
272
653
  }
273
654
  }
@@ -276,7 +657,9 @@
276
657
  "type": "object",
277
658
  "properties": {
278
659
  "siteName": {
279
- "type": "string", "minLength": 1, "maxLength": 512,
660
+ "type": "string",
661
+ "minLength": 1,
662
+ "maxLength": 512,
280
663
  "description": "Public display name for SEO and discovery files. Overrides root name without renaming the package."
281
664
  },
282
665
  "minScore": {
@@ -287,7 +670,10 @@
287
670
  },
288
671
  "focus": {
289
672
  "type": "array",
290
- "items": { "type": "string", "minLength": 1 },
673
+ "items": {
674
+ "type": "string",
675
+ "minLength": 1
676
+ },
291
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"
292
678
  },
293
679
  "sitemap": {
@@ -331,7 +717,11 @@
331
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"
332
718
  },
333
719
  "trailingSlash": {
334
- "enum": ["never", "always", "ignore"],
720
+ "enum": [
721
+ "never",
722
+ "always",
723
+ "ignore"
724
+ ],
335
725
  "default": "never",
336
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"
337
727
  },
@@ -389,16 +779,40 @@
389
779
  "analytics": {
390
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.",
391
781
  "oneOf": [
392
- { "type": "boolean" },
782
+ {
783
+ "type": "boolean"
784
+ },
393
785
  {
394
786
  "type": "object",
395
787
  "additionalProperties": false,
396
788
  "properties": {
397
- "enabled": { "type": "boolean" },
398
- "consent": { "enum": ["required", "none"], "description": "required: record nothing until consent('analytics')" },
399
- "retentionDays": { "type": "integer", "minimum": 1, "maximum": 3650, "default": 180 },
400
- "countryHeader": { "type": "string", "pattern": "^[a-z0-9-]{1,64}$", "description": "Proxy header with an ISO country code, e.g. cf-ipcountry" },
401
- "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
+ }
402
816
  }
403
817
  }
404
818
  ]
@@ -440,9 +854,18 @@
440
854
  },
441
855
  "lint": {
442
856
  "type": "object",
443
- "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.",
444
858
  "propertyNames": {
445
- "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
+ }
446
869
  },
447
870
  "additionalProperties": {
448
871
  "enum": [
@@ -468,6 +891,102 @@
468
891
  ],
469
892
  "default": "baseline-widely",
470
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
+ ]
471
990
  }
472
991
  }
473
992
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@christianirack/brainllm",
3
- "version": "0.9.0",
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.9.0",
19
- "@christianirack/brainllm-darwin-x64": "0.9.0",
20
- "@christianirack/brainllm-linux-x64": "0.9.0",
21
- "@christianirack/brainllm-linux-arm64": "0.9.0",
22
- "@christianirack/brainllm-linux-x64-musl": "0.9.0",
23
- "@christianirack/brainllm-win32-x64": "0.9.0",
24
- "@christianirack/brainllm-win32-arm64": "0.9.0"
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
  ],