@reqvire-org/ads 0.3.36 → 0.3.37

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 (83) hide show
  1. package/README.md +10 -8
  2. package/dist/bootstrap-ds/README.md +8 -9
  3. package/dist/bootstrap-ds/ds.config.json +1 -8
  4. package/dist/bootstrap-ds/package.json +4 -3
  5. package/dist/bootstrap-ds/scripts/build-mcp-previews.mjs +2 -32
  6. package/dist/bun-compiler.mjs +13 -0
  7. package/dist/bun-worker.mjs +9 -0
  8. package/dist/check.mjs +7 -4
  9. package/dist/cli.mjs +11 -7
  10. package/dist/config.mjs +22 -4
  11. package/dist/development-runtime.mjs +3 -1
  12. package/dist/init.mjs +16 -18
  13. package/dist/mcp/build-status.mjs +6 -4
  14. package/dist/mcp/context.mjs +9 -4
  15. package/dist/mcp/drafts.mjs +4 -2
  16. package/dist/mcp/mutations.mjs +4 -14
  17. package/dist/mcp/preview-watch.mjs +21 -9
  18. package/dist/mcp/preview-widget.bundle.js +58 -63
  19. package/dist/mcp/preview-work.mjs +1 -15
  20. package/dist/mcp/project-widget.bundle.js +57 -62
  21. package/dist/mcp/prompts.mjs +2 -2
  22. package/dist/mcp/resource-loader.js +32 -10
  23. package/dist/mcp/server.mjs +89 -34
  24. package/dist/mcp/widget.bundle.js +59 -64
  25. package/dist/preview-builder.mjs +17 -5
  26. package/dist/preview-bun.mjs +266 -0
  27. package/dist/preview-imports.mjs +73 -0
  28. package/dist/preview-resources.mjs +26 -14
  29. package/dist/scenario-inspector.mjs +11 -4
  30. package/dist/scenarios-compiler.mjs +47 -6
  31. package/dist/showcase/client.bundle.js +68 -72
  32. package/dist/showcase/index.html +2 -2
  33. package/dist/showcase/sandbox.bundle.js +1 -1
  34. package/dist/showcase/style.css +4 -0
  35. package/dist/skills/ads-break-ui/SKILL.md +39 -40
  36. package/dist/skills/ads-break-ui/references/drafts.md +6 -3
  37. package/dist/skills/ads-break-ui/references/guarded-editing.md +4 -3
  38. package/dist/skills/ads-break-ui/references/runtimes.md +91 -140
  39. package/dist/skills/ads-break-ui/references/validation.md +13 -3
  40. package/dist/skills/ads-break-ui/references/workflows.md +82 -0
  41. package/dist/skills/ads-designer/SKILL.md +38 -39
  42. package/dist/skills/ads-designer/assets/bootstrap-ds/README.md +8 -9
  43. package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -8
  44. package/dist/skills/ads-designer/assets/bootstrap-ds/package.json +4 -3
  45. package/dist/skills/ads-designer/assets/bootstrap-ds/scripts/build-mcp-previews.mjs +2 -32
  46. package/dist/skills/ads-designer/references/cli.md +24 -20
  47. package/dist/skills/ads-designer/references/drafts.md +6 -3
  48. package/dist/skills/ads-designer/references/guarded-editing.md +4 -3
  49. package/dist/skills/ads-designer/references/runtimes.md +91 -140
  50. package/dist/skills/ads-designer/references/validation.md +13 -3
  51. package/dist/skills/ads-designer/references/workflows.md +82 -0
  52. package/dist/skills/ads-import/SKILL.md +40 -42
  53. package/dist/skills/ads-import/references/cli.md +24 -20
  54. package/dist/skills/ads-import/references/drafts.md +6 -3
  55. package/dist/skills/ads-import/references/guarded-editing.md +4 -3
  56. package/dist/skills/ads-import/references/runtimes.md +91 -140
  57. package/dist/skills/ads-import/references/validation.md +13 -3
  58. package/dist/skills/ads-import/references/workflows.md +82 -0
  59. package/dist/skills/ads-motion/SKILL.md +37 -38
  60. package/dist/skills/ads-motion/references/drafts.md +6 -3
  61. package/dist/skills/ads-motion/references/guarded-editing.md +4 -3
  62. package/dist/skills/ads-motion/references/runtimes.md +91 -140
  63. package/dist/skills/ads-motion/references/validation.md +13 -3
  64. package/dist/skills/ads-motion/references/workflows.md +82 -0
  65. package/dist/skills/ads-port/SKILL.md +37 -38
  66. package/dist/skills/ads-port/references/cli.md +24 -20
  67. package/dist/skills/ads-port/references/drafts.md +6 -3
  68. package/dist/skills/ads-port/references/guarded-editing.md +4 -3
  69. package/dist/skills/ads-port/references/runtimes.md +91 -140
  70. package/dist/skills/ads-port/references/validation.md +13 -3
  71. package/dist/skills/ads-port/references/workflows.md +82 -0
  72. package/dist/usage.mjs +84 -0
  73. package/dist/validation.mjs +0 -12
  74. package/dist/verification/browser.mjs +77 -48
  75. package/docs/ADS.md +17 -11
  76. package/docs/ARCHITECTURE.md +43 -29
  77. package/docs/BEHAVIORS.md +3 -3
  78. package/docs/CHANGELOG.md +60 -12
  79. package/docs/GUIDE.md +96 -53
  80. package/docs/MCP.md +96 -122
  81. package/docs/benchmarks/bun-previews.md +91 -0
  82. package/docs/benchmarks/gidi-preview-memory.md +4 -0
  83. package/package.json +15 -13
@@ -0,0 +1,91 @@
1
+ # Native Bun previews: compilation, resources and restart reuse
2
+
3
+ Local measurements on 23 October 2026, using the same frozen 865-file Gidi
4
+ snapshot (4,389,282 authored bytes, 151 scenarios) as the earlier memory work.
5
+ The live Gidi checkout and its installed ADS package were not patched. Real
6
+ MCP Apps ran in headless Chrome. These are local observations, not service limits.
7
+
8
+ ## Startup and warming
9
+
10
+ | Measurement | Native Bun result |
11
+ | --- | ---: |
12
+ | MCP serving URL | 0.98–1.12 s |
13
+ | First requested Slack settings preview compiled, including startup | 6.1–6.4 s |
14
+ | All 151 views compiled, including startup | 7.7–7.9 s |
15
+ | All 151 views current after native gates | 16.9–20.4 s |
16
+ | Selecting an already warmed Popover, no compilation | 0.29–0.56 s |
17
+ | Peak process-tree PSS, including browser verification | 2.17 GiB |
18
+ | Main process RSS after semantic worker retirement | 409–413 MiB |
19
+
20
+ Each run used a 4 GiB process-tree memory limit, disabled swap within that
21
+ scope, and a 1,000 MiB Node heap limit. It loaded Slack settings and exercised
22
+ the real Popover control after warming. Two warm-cache restarts then recovered
23
+ all 151 current views in 3.8 and 4.1 seconds, with **zero Bun compiler
24
+ invocations**, identical graph identity, and 313–315 MiB main-process RSS.
25
+ Cached bytes are still integrity-checked and republished into each managed session.
26
+
27
+ The initial sequential scheduler repeatedly bundled growing prefixes of the
28
+ catalogue. An earlier run of that implementation took 206 seconds to make all
29
+ 151 views current. The current scheduler compiles the prioritized view first,
30
+ then the remaining graph in one background job. Jobs remain sequential in one
31
+ compiler, with foreground requests ahead of queued warming. That earlier run
32
+ used a 3 GiB scope and a different Node heap limit, so it is not an exact
33
+ controlled timing ratio.
34
+
35
+ Two restart defects were found with these checks: removed generated entry files
36
+ were accidentally treated as source dependencies, and graphs followed navigation
37
+ order rather than canonical discovery order. Both are covered by restart tests,
38
+ including a remembered view that is not first in the catalogue.
39
+
40
+ ## CSS ownership and deferred resources
41
+
42
+ With all 151 scenarios compiled together, the frozen snapshot's development
43
+ dependency closures contain approximately:
44
+
45
+ | Preview | Owner CSS | Complete CSS dependency closure |
46
+ | --- | ---: | ---: |
47
+ | Popover | 5.5 kB | 18.6 kB |
48
+ | MessageScroller | 1.1 kB | 43.2 kB |
49
+ | Conversation pattern | 4.3 kB | 90.7 kB |
50
+ | Native AppShell | 15.1 kB | 48.6 kB |
51
+ | Full chat composition | — | 175.0 kB |
52
+
53
+ Closures include the 6.6 kB foundation. The 53.3 kB font is a separate asset,
54
+ not embedded in CSS. Development comments include source paths, so byte counts
55
+ vary slightly with the isolated working directory. These are preview resources,
56
+ not measurements of the consuming application's minified production output.
57
+
58
+ The full chat demonstration eagerly imports every route plus voice, terminal
59
+ and workflow demonstrations. Its larger closure reflects that composition;
60
+ ADS cannot defer an application's ordinary static imports automatically.
61
+ Pure public barrels are narrowed only when their owning package explicitly
62
+ declares an applicable `sideEffects` policy. Executable/unknown barrels retain
63
+ normal bundler semantics.
64
+
65
+ ADS's own `composition/OnDemand` example demonstrates the supported alternative
66
+ using its real shell and components. Browser tests observe actual MCP resource
67
+ reads: the Details module and SummaryList CSS remain unread until Details opens,
68
+ load once, and retain both page notes and left-pane state on revisit. Warming
69
+ all 44 example views neither fetches unopened peers nor remounts the shell.
70
+ A separate browser regression updates an opened lazy branch's CSS without
71
+ changing its JavaScript bytes; the visible styles update and form state remains.
72
+
73
+ ## Reproduction
74
+
75
+ Use a frozen source snapshot and idle consumers; do not benchmark by editing a
76
+ live developer's files. `scripts/benchmarks/gidi-preview-memory/prepare.mjs`
77
+ creates isolated inputs. Set `ADS_BENCH_NATIVE=1` for the native compiler and
78
+ `ADS_BENCH_OUTPUT` for the owned output directory. The monitor samples all child
79
+ processes' PSS/RSS from `/proc`; run it in a bounded memory scope:
80
+
81
+ ```sh
82
+ ADS_BENCH_NATIVE=1 ADS_BENCH_OUTPUT=output/bun-proof \
83
+ node scripts/benchmarks/gidi-preview-memory/prepare.mjs /path/to/gidi candidate 1
84
+ ADS_BENCH_WARM=1 ADS_BENCH_BROWSER=1 ADS_BENCH_DRIVER=./preview.mjs \
85
+ bun scripts/benchmarks/gidi-preview-memory/monitor.mjs output/bun-proof/candidate-1
86
+ ```
87
+
88
+ `tests/bun-preview.test.mjs` verifies React/Preact rendering, workers/assets,
89
+ source updates and unchanged restarts. `tests/example-lazy-browser.test.mjs`
90
+ checks the real example; `tests/lazy-styles-browser.test.mjs` covers CSS-only lazy
91
+ updates. These focused checks supplement the complete release test suite.
@@ -1,5 +1,9 @@
1
1
  # Gidi draft acceptance: memory and compiler reuse
2
2
 
3
+ Historical ADS 0.3.35 measurement. The compiler parking and project Vite adapter
4
+ described here have been superseded by independent interactive compilation and
5
+ ADS-owned Bun previews; see [native preview measurements](bun-previews.md).
6
+
3
7
  Measured on 23 October 2026 using a frozen Gidi source snapshot and real MCP
4
8
  Apps in headless Chrome. The installed Gidi package and working source were not
5
9
  patched. The baseline distribution matched published ADS 0.3.34 byte for byte.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.3.36",
3
+ "version": "0.3.37",
4
4
  "type": "module",
5
5
  "description": "A design system your agent can see and shape. Your components. Your look. Your code.",
6
6
  "repository": {
@@ -21,16 +21,16 @@
21
21
  ],
22
22
  "scripts": {
23
23
  "dev": "npm run dev:showcase",
24
- "ads-mcp": "node scripts/build-ads-tool.mjs 1>&2 && node dist/cli.mjs mcp --mutations",
25
- "ads-read-mcp": "node scripts/build-ads-tool.mjs 1>&2 && node dist/cli.mjs mcp",
26
- "dev:showcase": "node scripts/build-ads-tool.mjs && node dist/cli.mjs showcase",
24
+ "ads-mcp": "node scripts/build-ads-tool.mjs 1>&2 && bun dist/cli.mjs mcp --mutations",
25
+ "ads-read-mcp": "node scripts/build-ads-tool.mjs 1>&2 && bun dist/cli.mjs mcp",
26
+ "dev:showcase": "node scripts/build-ads-tool.mjs && bun dist/cli.mjs showcase",
27
27
  "dev:mcp-explorer": "node scripts/build-ads-tool.mjs && node mcp-explorer/server.mjs",
28
28
  "build": "npm run lint:tool && npm run build:tool",
29
29
  "build:tool": "node scripts/build-ads-tool.mjs",
30
30
  "build:project": "npm run build:tool && npm run lint:project && npm run generate:icons && npm run typecheck && vite build && node scripts/build-mcp-previews.mjs",
31
31
  "build:lib": "npm run generate:icons && vite build",
32
- "build:showcase": "npm run build:tool && node scripts/build-mcp-previews.mjs",
33
- "build:mcp-previews": "node scripts/build-mcp-previews.mjs",
32
+ "build:showcase": "npm run build:tool && bun dist/cli.mjs compile .",
33
+ "build:mcp-previews": "bun dist/cli.mjs compile .",
34
34
  "generate:icons": "node scripts/generate-icons.mjs",
35
35
  "sync:skill-starter": "node scripts/sync-skill-starter.mjs",
36
36
  "check:skill-starter": "node scripts/sync-skill-starter.mjs --check",
@@ -39,15 +39,15 @@
39
39
  "lint": "npm run lint:tool",
40
40
  "lint:tool": "npm run check:skill-starter && npm run check:skill-references && oxlint --deny-warnings src preview-client showcase-client mcp-explorer tests/*.test.mjs tests/helpers scripts/build-ads-tool.mjs scripts/pack-ads-tool.mjs scripts/sync-skill-references.mjs scripts/local-test-proof.mjs",
41
41
  "lint:project": "npm run lint:ds && npm run lint:style && npm run check:skill-starter",
42
- "lint:ds": "node dist/cli.mjs lint-config && node dist/cli.mjs check && oxlint --deny-warnings --config .ds/oxlintrc.json src design-system",
42
+ "lint:ds": "bun dist/cli.mjs check",
43
43
  "lint:style": "biome lint --config-path=biome.css.json .",
44
- "preview": "node dist/cli.mjs showcase",
45
- "preview:showcase": "node dist/cli.mjs showcase",
44
+ "preview": "bun dist/cli.mjs showcase",
45
+ "preview:showcase": "bun dist/cli.mjs showcase",
46
46
  "typecheck": "tsc --noEmit",
47
47
  "test": "npm run build && node --test --test-reporter=tap --test-concurrency=1 tests/*.test.mjs",
48
48
  "test:tool": "npm test",
49
49
  "pack:tool": "node scripts/pack-ads-tool.mjs",
50
- "ads": "node dist/cli.mjs",
50
+ "ads": "bun dist/cli.mjs",
51
51
  "prepack": "npm run build",
52
52
  "release:verify": "node scripts/local-test-proof.mjs",
53
53
  "release:proof": "node scripts/local-test-proof.mjs --check"
@@ -61,7 +61,8 @@
61
61
  "sharp": "^0.35.5",
62
62
  "typescript": "^5.9.3",
63
63
  "yaml": "2.9.1",
64
- "zod": "4.4.3"
64
+ "zod": "4.4.3",
65
+ "@wyw-in-js/transform": "2.1.3"
65
66
  },
66
67
  "devDependencies": {
67
68
  "@babel/core": "^7.29.7",
@@ -82,7 +83,6 @@
82
83
  "@vitejs/plugin-react": "^4.3.4",
83
84
  "@wyw-in-js/babel-preset": "^2.0.1",
84
85
  "@wyw-in-js/vite": "^2.0.1",
85
- "esbuild": "0.25.12",
86
86
  "oxlint": "^1.69.0",
87
87
  "preact": "11.0.1",
88
88
  "react": "^19.2.7",
@@ -118,7 +118,9 @@
118
118
  "./scenarios": "./dist/scenarios.mjs",
119
119
  "./scenarios/vite": "./dist/scenarios-vite.mjs",
120
120
  "./scenarios/compiler": "./dist/scenarios-compiler.mjs",
121
- "./verification": "./dist/verification/browser.mjs"
121
+ "./verification": "./dist/verification/browser.mjs",
122
+ "./scenarios/bun": "./dist/preview-bun.mjs",
123
+ "./scenarios/compile": "./dist/bun-compiler.mjs"
122
124
  },
123
125
  "files": [
124
126
  "dist",