@reqvire-org/ads 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bun-compiler.mjs +6 -5
- package/dist/check.mjs +3 -43
- package/dist/contrast-composition.mjs +6 -60
- package/dist/contrast-styles.mjs +88 -0
- package/dist/mcp/build-status.mjs +8 -3
- package/dist/mcp/drafts.mjs +6 -1
- package/dist/mcp/preview-widget.bundle.js +47 -47
- package/dist/mcp/resource-loader.js +1 -201
- package/dist/mcp/server.mjs +10 -3
- package/dist/preview-bun.mjs +75 -60
- package/dist/preview-incremental.mjs +358 -0
- package/dist/preview-manifest-update.mjs +70 -0
- package/dist/preview-resources.mjs +33 -1
- package/dist/render-composition.mjs +27 -5
- package/dist/skills/README.md +1 -1
- package/dist/skills/ads-designer/SKILL.md +5 -1
- package/dist/skills/ads-designer/references/accessibility.md +6 -2
- package/dist/skills/ads-designer/references/runtimes.md +15 -0
- package/dist/skills/ads-import/references/runtimes.md +15 -0
- package/dist/skills/ads-migrate/SKILL.md +2 -1
- package/dist/skills/ads-migrate/references/0.4.1-to-0.4.2.md +2 -3
- package/dist/skills/ads-migrate/references/0.4.3-to-0.4.4.md +80 -0
- package/dist/skills/ads-port/references/runtimes.md +15 -0
- package/dist/style-token-rules.mjs +51 -0
- package/docs/ARCHITECTURE.md +69 -14
- package/docs/CACHING.md +40 -1
- package/docs/CHANGELOG.md +35 -22
- package/docs/GUIDE.md +23 -3
- package/docs/MCP.md +41 -16
- package/docs/benchmarks/README.md +1 -1
- package/package.json +6 -4
package/docs/MCP.md
CHANGED
|
@@ -805,6 +805,7 @@ the tool result. `resources/read` supplies these registered resources:
|
|
|
805
805
|
| `ui://ads/preview` | Tool-owned App bootstrap, official App SDK and resource loader |
|
|
806
806
|
| `ads://preview/manifest` | ADS preview compiler's versioned scenario/dependency graph |
|
|
807
807
|
| `ads://preview/live` | Current-source compiled feedback while checks are pending; explicitly unverified |
|
|
808
|
+
| `ads://preview/manifest{?from}` / `ads://preview/live{?from}` | Internal UI updates relative to a known SHA-256 graph revision |
|
|
808
809
|
| `ads://assets/<hash>.js` | Compiled shared runtime or scenario module |
|
|
809
810
|
| `ads://assets/<hash>.css` | Extracted foundation or scenario styles |
|
|
810
811
|
| `ads://assets/<hash>.woff2` (and other asset types) | Binary font/image/worker assets |
|
|
@@ -817,6 +818,18 @@ and asset references. URIs are immutable identities; manifests publish atomicall
|
|
|
817
818
|
after all files exist. The server validates the graph and served bytes. Binary
|
|
818
819
|
resources use MCP `blob` content rather than text encoding.
|
|
819
820
|
|
|
821
|
+
The App retains known manifests and uses the verified `manifestRevision` from
|
|
822
|
+
`ads://project/build` (or a current live/tool selection) to reuse one without
|
|
823
|
+
another graph download. When a read is needed, `?from=<revision>` returns a
|
|
824
|
+
version-1 envelope: `full` with `manifest`, `unchanged` with current metadata,
|
|
825
|
+
or `delta` with changed/removed asset and scenario records and, when changed,
|
|
826
|
+
scenario order. Updates name their exact `baseRevision`; the App reconstructs
|
|
827
|
+
and validates the graph without changing its cached base. Missing/pruned history
|
|
828
|
+
or a delta larger than the full response returns `full`. Omitting `from` still
|
|
829
|
+
returns the original manifest shape. Live queries retain the same current-source
|
|
830
|
+
and session checks. These exchanges stay inside the preview resource bridge;
|
|
831
|
+
tool replies continue to carry selection/status and graph references, not graphs.
|
|
832
|
+
|
|
820
833
|
The loader runs **inside the App iframe**. It reads through the host's resource
|
|
821
834
|
bridge, verifies bytes, materializes Blob URLs and native ESM import maps, loads
|
|
822
835
|
CSS/fonts, then invokes the selected module's `mount(container)`. It caches
|
|
@@ -881,10 +894,11 @@ showcase puts these states in a small monochrome header indicator with tooltip
|
|
|
881
894
|
and expandable details; it keeps status and loading overlays out of the widget
|
|
882
895
|
area. Other Apps hosts retain the in-App status fallback.
|
|
883
896
|
|
|
884
|
-
### ADS-owned
|
|
897
|
+
### ADS-owned preview compiler
|
|
885
898
|
|
|
886
|
-
Bun 1.4.1+
|
|
887
|
-
|
|
899
|
+
ADS runs on Bun 1.4.1+ and compiles previews independently of the application's
|
|
900
|
+
bundler. Watched previews use a private incremental module graph; complete
|
|
901
|
+
unwatched previews use Bun builds. Configure `framework`; ADS supplies its compiler and
|
|
888
902
|
publishes the graph to `.ds/preview/`:
|
|
889
903
|
|
|
890
904
|
```json
|
|
@@ -893,7 +907,7 @@ publishes the graph to `.ds/preview/`:
|
|
|
893
907
|
|
|
894
908
|
Use `preact` for native Preact. The project retains its framework mount in
|
|
895
909
|
`showcase/mcp/main.ads.mount.tsx` under the ADS root. It exports
|
|
896
|
-
`mountScenario(Scenario,container)` and returns cleanup.
|
|
910
|
+
`mountScenario(Scenario,container)` and returns cleanup. ADS selects the framework JSX
|
|
897
911
|
runtime, resolves the public alias and extracts Linaria through the shared tag
|
|
898
912
|
resolver. Project application build settings stay under project control.
|
|
899
913
|
|
|
@@ -904,14 +918,17 @@ continuous compiler. Project setup can call `compilePreviews` from
|
|
|
904
918
|
always runs native gates; `acceptance.scripts`, `acceptance.behavior` and
|
|
905
919
|
`acceptance.audit` choose additional scripts and whether the owners' tests and audit run. Oxlint is not an ADS gate dependency.
|
|
906
920
|
|
|
907
|
-
MCP warms the prioritized view first, then
|
|
908
|
-
|
|
921
|
+
MCP warms the prioritized view first, then warms remaining views sequentially
|
|
922
|
+
through the retained module graph, without delaying service startup. One compiler job runs
|
|
909
923
|
at a time; foreground selections take priority over queued warming. Compiled views stay cached; unchanged warmed navigation
|
|
910
924
|
needs no compilation. Linaria transforms and worker bundles reuse source and
|
|
911
925
|
transitive dependency hashes. Worker compilation also uses Bun and temporary
|
|
912
926
|
worker compiler processes release their heaps after output is captured.
|
|
913
927
|
|
|
914
|
-
The build resource includes `warmup: {state,completed,total,failed}
|
|
928
|
+
The build resource includes `warmup: {state,completed,total,failed}` and optional
|
|
929
|
+
`manifestRevision`, identifying the integrity-checked verified graph for its
|
|
930
|
+
session. The revision alone does not authorize freshness: the selected entry's
|
|
931
|
+
`current` and live status still govern rendering. Build changes
|
|
915
932
|
notify supported MCP subscribers and Explorer updates automatically. Warming and
|
|
916
933
|
acceptance never suspend the interactive compiler. Cached output remains visible
|
|
917
934
|
while changed source compiles and validates.
|
|
@@ -931,11 +948,14 @@ reuses successful validation/output only when inputs, compiler/tool code,
|
|
|
931
948
|
lockfile, recorded dependencies and content digests match. A source edit
|
|
932
949
|
revalidates the project and incrementally updates the watched module graph. Both
|
|
933
950
|
must succeed against unchanged source before verified atomic publication; a failed or
|
|
934
|
-
superseded build cannot become current. Files outside
|
|
935
|
-
validation and a reconciled build. Preview refresh retains the
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
951
|
+
superseded build cannot become current. Files outside the compiled module graph still trigger
|
|
952
|
+
validation and a reconciled build. Preview refresh retains the iframe and compatible component state across
|
|
953
|
+
source and style edits, including loaded lazy branches. Token/paint audits rerun
|
|
954
|
+
against the new manifest. React Refresh and native Prefresh determine compatible
|
|
955
|
+
component/hook updates. Incompatible exports, compiler changes or added/removed
|
|
956
|
+
source files that require renewing import resolution reopen the
|
|
957
|
+
isolated frame; rejected revisions also use a clean frame when restoring already
|
|
958
|
+
executed old code. Navigation to another scenario mounts that scenario normally. Normal application builds retain their own chunking and optimization.
|
|
939
959
|
|
|
940
960
|
Accepted MCP edits enqueue preparation even without an open preview. Matching
|
|
941
961
|
validated candidate graphs seed the same project cache; location-dependent,
|
|
@@ -951,14 +971,19 @@ directories under `.ds/preview/sessions/`. Tiny
|
|
|
951
971
|
`.ds/scenarios/<id>/index.html` descriptors retain the reporter/registry contract;
|
|
952
972
|
they are not standalone runnable previews. Six previous graph revisions retain
|
|
953
973
|
old assets for in-flight reads; older references expire with a refresh error.
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
974
|
+
Watched manifests carry `refresh: {version: 1, epoch}` and module records carry
|
|
975
|
+
`hot: {id, source}`: a session-stable logical ID and SHA-256 of the module before
|
|
976
|
+
resource-address rewriting. Complete manifests omit these optional fields.
|
|
977
|
+
The App rejects malformed/duplicate refresh identities. Watched Apps bound
|
|
978
|
+
retained metadata to 4096 records and materialized resources to 64 MiB; complete
|
|
979
|
+
bundled Apps retain the 20 selected-module-revision limit. At the next mount the
|
|
980
|
+
built-in host recreates the App when a limit is exceeded; external hosts receive
|
|
981
|
+
`ADS_PREVIEW_REOPEN`. In-flight superseded refresh also requires a clean frame. Manifest size is capped at 2 MiB and individual resources
|
|
957
982
|
at 16 MiB; those development transport limits do not alter production bundles.
|
|
958
983
|
|
|
959
984
|
### One client command, managed preview builds
|
|
960
985
|
|
|
961
|
-
With a declared framework, `ads mcp` starts ADS's
|
|
986
|
+
With a declared framework, `ads mcp` starts ADS's watched preview
|
|
962
987
|
compiler and warms the prioritized view followed by the remaining graph in
|
|
963
988
|
the background. Jobs run sequentially; foreground selections have priority. The client configuration above stays the same; no second terminal
|
|
964
989
|
or separately managed server is needed. The same compiler also builds every draft
|
|
@@ -29,7 +29,7 @@ Other performance work needs a workload specific to the changed path:
|
|
|
29
29
|
| --- | --- |
|
|
30
30
|
| Persisted batch task reports | [Cache ownership and controls](../CACHING.md); `tests/integration/task-cache.test.mjs` |
|
|
31
31
|
| Preview compilation and imported computed CSS | [Preview architecture](../ARCHITECTURE.md); `tests/browser/bun-preview.test.mjs`, `tests/integration/analysis-preview-cache.test.mjs`, `tests/integration/preview-cache.test.mjs` |
|
|
32
|
-
| Browser delivery, navigation and lazy resources | [MCP previews](../MCP.md#ads-owned-
|
|
32
|
+
| Browser delivery, navigation and lazy resources | [MCP previews](../MCP.md#ads-owned-preview-compiler); affected browser/resource tests |
|
|
33
33
|
| Execution ownership, cancellation and recovery | [Execution coordination](../MCP.md#shared-process-execution-coordination); `tests/integration/execution-coordination.test.mjs` |
|
|
34
34
|
|
|
35
35
|
Correctness tests establish their assertions, not a performance baseline. For a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqvire-org/ads",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
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": {
|
|
@@ -60,9 +60,12 @@
|
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@modelcontextprotocol/server": "2.4.0",
|
|
63
|
+
"@prefresh/vite": "2.4.11",
|
|
64
|
+
"@vitejs/plugin-react": "4.7.0",
|
|
63
65
|
"@wyw-in-js/transform": "2.1.3",
|
|
64
66
|
"axe-core": "4.14.0",
|
|
65
67
|
"css-tree": "3.2.1",
|
|
68
|
+
"es-module-lexer": "1.7.0",
|
|
66
69
|
"postcss": "^8.5.30",
|
|
67
70
|
"postcss-selector-parser": "^7.1.6",
|
|
68
71
|
"postcss-value-parser": "^4.2.0",
|
|
@@ -70,6 +73,7 @@
|
|
|
70
73
|
"sharp": "^0.35.5",
|
|
71
74
|
"turbo": "2.11.10",
|
|
72
75
|
"typescript": "7.1.0-beta",
|
|
76
|
+
"vite": "6.4.3",
|
|
73
77
|
"yaml": "2.9.1",
|
|
74
78
|
"zod": "4.4.3"
|
|
75
79
|
},
|
|
@@ -89,14 +93,12 @@
|
|
|
89
93
|
"@types/node": "^25.9.2",
|
|
90
94
|
"@types/react": "^19.2.17",
|
|
91
95
|
"@types/react-dom": "^19.2.3",
|
|
92
|
-
"@vitejs/plugin-react": "^4.3.4",
|
|
93
96
|
"@wyw-in-js/babel-preset": "^2.0.1",
|
|
94
97
|
"@wyw-in-js/vite": "^2.0.1",
|
|
95
98
|
"oxlint": "^1.69.0",
|
|
96
99
|
"preact": "11.0.1",
|
|
97
100
|
"react": "^19.2.7",
|
|
98
|
-
"react-dom": "^19.2.7"
|
|
99
|
-
"vite": "^6.0.7"
|
|
101
|
+
"react-dom": "^19.2.7"
|
|
100
102
|
},
|
|
101
103
|
"license": "MIT",
|
|
102
104
|
"peerDependencies": {
|