@reqvire-org/ads 0.3.33 → 0.3.34
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/dist/behavior-libraries.mjs +93 -0
- package/dist/behaviors.mjs +0 -6
- package/dist/bootstrap-ds/ds.config.json +1 -0
- package/dist/capture.mjs +3 -3
- package/dist/check.mjs +2 -0
- package/dist/config.mjs +4 -0
- package/dist/lint-config.mjs +7 -0
- package/dist/mcp/build-status.mjs +1 -1
- package/dist/mcp/catalog.mjs +4 -2
- package/dist/mcp/draft-discovery.mjs +55 -0
- package/dist/mcp/drafts.mjs +135 -16
- package/dist/mcp/preview-watch.mjs +13 -2
- package/dist/mcp/preview-widget.bundle.js +14 -14
- package/dist/mcp/server.mjs +109 -27
- package/dist/scenario-inspector.mjs +5 -5
- package/dist/scenario-program.mjs +36 -0
- package/dist/scenario-registry.mjs +90 -0
- package/dist/scenarios-compiler.mjs +66 -22
- package/dist/scenarios.mjs +2 -1
- package/dist/showcase/client.bundle.js +39 -39
- package/dist/showcase/comparison.js +29 -5
- package/dist/showcase/draft-navigation.js +41 -0
- package/dist/showcase/index.html +1 -2
- package/dist/showcase/preview-state.js +19 -0
- package/dist/showcase/style.css +2 -2
- package/dist/skills/ads-break-ui/references/behaviors.md +10 -0
- package/dist/skills/ads-break-ui/references/drafts.md +43 -4
- package/dist/skills/ads-break-ui/references/validation.md +6 -0
- package/dist/skills/ads-designer/SKILL.md +7 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -0
- package/dist/skills/ads-designer/references/behaviors.md +10 -0
- package/dist/skills/ads-designer/references/drafts.md +43 -4
- package/dist/skills/ads-designer/references/validation.md +6 -0
- package/dist/skills/ads-import/SKILL.md +4 -0
- package/dist/skills/ads-import/references/behaviors.md +10 -0
- package/dist/skills/ads-import/references/drafts.md +43 -4
- package/dist/skills/ads-import/references/validation.md +6 -0
- package/dist/skills/ads-motion/references/behaviors.md +10 -0
- package/dist/skills/ads-motion/references/drafts.md +43 -4
- package/dist/skills/ads-motion/references/validation.md +6 -0
- package/dist/skills/ads-port/SKILL.md +8 -1
- package/dist/skills/ads-port/references/behaviors.md +10 -0
- package/dist/skills/ads-port/references/drafts.md +43 -4
- package/dist/skills/ads-port/references/native-implementation.md +14 -1
- package/dist/skills/ads-port/references/validation.md +6 -0
- package/dist/unit-contracts.mjs +2 -2
- package/dist/units.mjs +6 -0
- package/dist/verification/browser.d.mts +27 -0
- package/dist/verification.mjs +3 -0
- package/docs/ARCHITECTURE.md +82 -0
- package/docs/CHANGELOG.md +92 -0
- package/docs/GUIDE.md +29 -4
- package/docs/MCP.md +44 -4
- package/package.json +6 -4
|
@@ -49,6 +49,20 @@ Call `ads_show_draft({id,scenario?})`, then inspect its actual `showcaseUrl` in
|
|
|
49
49
|
browser. The preview reuses an isolated compiler workspace across edits and does
|
|
50
50
|
not run acceptance checks. Up to four draft compiler sessions stay warm; opening
|
|
51
51
|
more reclaims an older generated workspace without deleting its tracked proposal.
|
|
52
|
+
Creation queues compiler prewarming without delaying its response. Bursts of
|
|
53
|
+
creations coalesce, and only one queued compiler initializes at a time. A newer
|
|
54
|
+
speculative prewarm reclaims the older unused one; explicitly opened sessions
|
|
55
|
+
remain warm within the four-session bound. MCP edits
|
|
56
|
+
and direct draft-file edits notify warm previews through file events; periodic
|
|
57
|
+
reconciliation recovers missed events. Watched builds compile requested scenarios
|
|
58
|
+
and their dependencies, retaining roots used by other open previews. Full builds
|
|
59
|
+
and validation still cover the complete configured scope. Incremental semantic
|
|
60
|
+
analysis reuses unchanged TypeScript source trees without caching passing checks.
|
|
61
|
+
Reopening a known scenario renders through the existing compiler while a worker
|
|
62
|
+
refreshes catalogue metadata. Read `discovery.state` (`current`, `pending`,
|
|
63
|
+
`error`) and its metadata revision separately from the exact proposal revision.
|
|
64
|
+
New/missing scenario identities wait for fresh discovery. A previous preview may
|
|
65
|
+
stay visible until compilation finishes; pending/stale output is not evidence.
|
|
52
66
|
Reopen after edits to obtain the current revision.
|
|
53
67
|
Compilation is feedback, not passing behavior/visual evidence.
|
|
54
68
|
|
|
@@ -73,10 +87,35 @@ Independent shared-barrel exports are merged; overlapping source changes remain
|
|
|
73
87
|
explicit conflicts. Review the dependent's new revision before accepting it.
|
|
74
88
|
If a dependency is dropped, correct the remaining draft's dependency list.
|
|
75
89
|
|
|
76
|
-
DS Explorer
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
DS Explorer keeps drafts in the ordinary Tokens, Components, Patterns and
|
|
91
|
+
Composition navigation. A Draft badge marks an owner with a pending proposal,
|
|
92
|
+
whether or not it has an accepted version. Select that entry and use the header
|
|
93
|
+
Split view toggle to compare Accepted and Draft in the right pane. Both use the
|
|
94
|
+
same scenario/theme and available or phone viewport width. New owners appear
|
|
95
|
+
in their normal section; without an accepted counterpart they show only the
|
|
96
|
+
draft and disable comparison. There is no separate Drafts tab or scenario picker.
|
|
97
|
+
An isolated overlay can also render an unchanged scenario as an explicit review
|
|
98
|
+
context; that alone does not give its owner a Draft badge. Use `ads_drafts` for
|
|
99
|
+
draft-only MCP listing.
|
|
100
|
+
|
|
101
|
+
After 20 retained module revisions, Explorer restarts the affected App to release
|
|
102
|
+
its module cache, then restores the selected scenario/theme/viewport. Comparison
|
|
103
|
+
keeps the other version mounted; no manual reload or draft acceptance is needed.
|
|
104
|
+
|
|
105
|
+
Explorer entry glyphs separately show preview build states in monochrome: not
|
|
106
|
+
built, building, compiled/checking, ready, stale and failed. MCP draft summaries
|
|
107
|
+
include `preview` and preview calls include `build`; inspect `building`,
|
|
108
|
+
`current`, `stale`, scenario revisions and `preview.resourceUri` for detail.
|
|
109
|
+
Subscribe to `ads://project/build` and `ads://project/drafts` for standard
|
|
110
|
+
resource-update notifications on completion, failure and metadata refresh, or
|
|
111
|
+
subscribe only to an active draft's `preview.resourceUri` for its isolated report.
|
|
112
|
+
Modern clients use `subscriptions/listen` resource filters; older clients use
|
|
113
|
+
`resources/subscribe`. Re-read notified resources to update the existing view;
|
|
114
|
+
unsubscribe on teardown and resubscribe/read after reconnect. Removal invalidates
|
|
115
|
+
the scoped resource. Poll when the host does not forward notifications.
|
|
116
|
+
Build completion and mounted-App rendering readiness are separate. Ready draft
|
|
117
|
+
output remains unaccepted. Review the
|
|
118
|
+
current rendered revision and complete acceptance before finishing the change.
|
|
80
119
|
|
|
81
120
|
## Accept or drop
|
|
82
121
|
|
|
@@ -62,7 +62,20 @@ Dependency installation does not establish styling ownership. Keep only needed,
|
|
|
62
62
|
declared runtime dependencies; inspect any stylesheet, reset, theme provider or
|
|
63
63
|
visual default they require. Do not introduce a dependency's styling system or
|
|
64
64
|
global reset to make its pixels match. Adapt owned styles through Linaria and
|
|
65
|
-
shared Data; preserve
|
|
65
|
+
shared Data; preserve installed behavior libraries explicitly approved through
|
|
66
|
+
`behaviorLibraries` in `ds.config.json` and listed in `package.json` dependencies.
|
|
67
|
+
Use their installed APIs with minimal lifecycle/event integration; do not vendor
|
|
68
|
+
or rewrite their source. For hard behavior, prefer the project's declared library.
|
|
69
|
+
If none fits, suggest a framework-free package for approval or implement natively.
|
|
70
|
+
Do not add a package or allowlist entry without authorization already covering it.
|
|
71
|
+
ADS checks the declaration and installation, not third-party dependency internals.
|
|
72
|
+
|
|
73
|
+
Floating UI's `computePosition` can feed `x`/`y` through exact allowlisted writes
|
|
74
|
+
such as `element.style.setProperty("--ds-popover-x", x + "px")` and the equivalent
|
|
75
|
+
`--ds-popover-y`. Register only these measured properties in
|
|
76
|
+
`boundaries.styleWrites`; keep placement CSS and visual treatment in project
|
|
77
|
+
Linaria and clean up `autoUpdate` observers on unmount. Library approval creates
|
|
78
|
+
no additional inline-style or CSSProperties exception.
|
|
66
79
|
|
|
67
80
|
Preserve required capabilities, accessibility and interactions while applying
|
|
68
81
|
the project's visual language. Source pixels are a reference, not an automatic
|
|
@@ -67,3 +67,9 @@ separate latest validation result, alongside verification and mutation results.
|
|
|
67
67
|
Source changes during execution reject success and leave the previous full
|
|
68
68
|
baseline intact. Skipped registered behavior cases never pass; a project with no
|
|
69
69
|
registered behavior contracts reports that stage as skipped with a reason.
|
|
70
|
+
|
|
71
|
+
Registered browser verification queues the selected scenario roots together
|
|
72
|
+
before browser workers open their pages. They share one candidate graph and
|
|
73
|
+
keep independent App state. This avoids compiling a growing graph per page.
|
|
74
|
+
A graph revision changing during startup keeps the preview pending until a
|
|
75
|
+
coherent current build mounts; it does not establish passing case evidence.
|
package/dist/unit-contracts.mjs
CHANGED
|
@@ -96,14 +96,14 @@ export function staticContractValue(expression, checker, options, locations = ne
|
|
|
96
96
|
return read(expression);
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
export function inspectUnitContracts(options) {
|
|
99
|
+
export function inspectUnitContracts(options, suppliedProgram) {
|
|
100
100
|
if (options.unitContracts) return options.unitContracts;
|
|
101
101
|
const files = sourceFiles(options.dsRoot).filter(isContractFile);
|
|
102
102
|
const result = { contracts: [], diagnostics: [], program: null };
|
|
103
103
|
options.unitContracts = result;
|
|
104
104
|
if (!files.length) return result;
|
|
105
105
|
const inventory = inspectUnits(options);
|
|
106
|
-
const program = ts.createProgram(sourceFiles(options.dsRoot).filter(file => /\.[cm]?[jt]sx?$/.test(file)), { ...projectCompilerOptions(options), allowJs: true });
|
|
106
|
+
const program = suppliedProgram ?? ts.createProgram(sourceFiles(options.dsRoot).filter(file => /\.[cm]?[jt]sx?$/.test(file)), { ...projectCompilerOptions(options), allowJs: true });
|
|
107
107
|
result.program = program;
|
|
108
108
|
const checker = program.getTypeChecker();
|
|
109
109
|
const publicItems = [...publicApi(program, options), ...reviewApi(program, options)];
|
package/dist/units.mjs
CHANGED
|
@@ -64,6 +64,12 @@ export function configurationFiles(options) {
|
|
|
64
64
|
for (const file of files) visit(path.resolve(root,file),true, /^(?:ts|js)config[^/]*\.jsonc?$/.test(file));
|
|
65
65
|
for (const plugin of config.oxlint.plugins) visit(path.resolve(root, plugin.path), true);
|
|
66
66
|
const pkg = existsSync(path.join(root, "package.json")) ? JSON.parse(readFileSync(path.join(root, "package.json"), "utf8")) : {};
|
|
67
|
+
// Explicit build-tool config flags identify setup files even inside the ADS
|
|
68
|
+
// directory. Their tooling imports are not production behavior dependencies.
|
|
69
|
+
for (const command of Object.values(pkg.scripts ?? {})) if (typeof command === "string") {
|
|
70
|
+
for (const match of command.matchAll(/\b(?:vite|vitest|playwright)\b[^;&|\n]*?\s(?:--config(?:=|\s+)|-c\s+)(?:"([^"]+)"|'([^']+)'|([^\s;&|]+))/g))
|
|
71
|
+
visit(path.resolve(root, match[1] ?? match[2] ?? match[3]), true);
|
|
72
|
+
}
|
|
67
73
|
const scripts = new Set();
|
|
68
74
|
function script(name) {
|
|
69
75
|
if (scripts.has(name)) return;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { Frame, Page } from "@playwright/test";
|
|
2
|
+
|
|
3
|
+
/** Development-only helpers; Playwright is provided by the project's runner. */
|
|
4
|
+
export interface VerificationRequest {
|
|
5
|
+
schemaVersion: 1;
|
|
6
|
+
runId: string;
|
|
7
|
+
projectRoot: string;
|
|
8
|
+
framework: string;
|
|
9
|
+
profile: string;
|
|
10
|
+
mode: string;
|
|
11
|
+
checks: { id: string; scenario?: string; [key: string]: unknown }[];
|
|
12
|
+
scenarios: Record<string, string>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface PaintAuditResult {
|
|
16
|
+
ok: boolean;
|
|
17
|
+
complete?: boolean;
|
|
18
|
+
verified: { owner: string; binding: string; variable: string }[];
|
|
19
|
+
diagnostics: string[];
|
|
20
|
+
limits?: string[];
|
|
21
|
+
scope?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function verificationRequest(): VerificationRequest;
|
|
25
|
+
export function auditBehaviorPaints(frame: Frame): Promise<PaintAuditResult>;
|
|
26
|
+
export function openBehaviorScenario(page: Page, checkId: string, options?: { timeout?: number }): Promise<Frame>;
|
|
27
|
+
export function openPreviewScenario(page: Page, url: string, scenario: string, options?: { timeout?: number }): Promise<Frame>;
|
package/dist/verification.mjs
CHANGED
|
@@ -258,6 +258,9 @@ export function createVerificationController(root, { reportRoot = root, onProgre
|
|
|
258
258
|
if (profile.mode === "browser" && group.some(check => check.scenario)) {
|
|
259
259
|
const { startAdsMcp } = await import("./mcp/server.mjs");
|
|
260
260
|
host ??= await startAdsMcp(root, { stdio: false, showcase: true });
|
|
261
|
+
// Queue all selected roots before parallel browser workers open. A
|
|
262
|
+
// single graph avoids repeated compilation and startup handovers.
|
|
263
|
+
await host.warmScenarios([...new Set(group.map(check => check.scenario).filter(Boolean))], signal);
|
|
261
264
|
for (const check of group.filter(check => check.scenario)) {
|
|
262
265
|
const url = new URL(host.url);
|
|
263
266
|
url.searchParams.set("scenario", check.scenario);
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -241,6 +241,29 @@ dependencies, with no runtime supplied by the MCP host. Shared controllers do no
|
|
|
241
241
|
import styled consumers or introduce another skin layer. Existing measurement and
|
|
242
242
|
style-write boundaries still apply.
|
|
243
243
|
|
|
244
|
+
Projects can explicitly allow installed runtime packages with
|
|
245
|
+
`"behaviorLibraries": ["@floating-ui/dom", "tabbable"]` in `ds.config.json`.
|
|
246
|
+
Each name must also appear in `package.json` dependencies and be installed.
|
|
247
|
+
Production ADS code may import those packages and their subpaths directly from
|
|
248
|
+
components, patterns or controllers; extract a shared controller only when the
|
|
249
|
+
behavior is shared. Other external runtime imports fail
|
|
250
|
+
`behavior-library-undeclared`. Type-only imports and development roles retain
|
|
251
|
+
their existing rules, as do the configured framework and Linaria exceptions.
|
|
252
|
+
`ads lint-config` reports import locations and the exact list to declare.
|
|
253
|
+
|
|
254
|
+
This is project approval, not a recursive dependency audit or a guarantee about
|
|
255
|
+
third-party internals. ADS reads installed versions without executing packages
|
|
256
|
+
or scanning their dependency source or stylesheets. The declaration authorizes
|
|
257
|
+
package imports and subpaths. Existing source styling and measured-geometry
|
|
258
|
+
checks retain their scope; it introduces no new package-CSS certification gate. Use libraries as installed, with minimal lifecycle/event integration.
|
|
259
|
+
For example, Floating UI's `computePosition` can supply `x` and `y` to an
|
|
260
|
+
allowlisted producer's `style.setProperty("--ds-popover-x", ...)` and
|
|
261
|
+
`style.setProperty("--ds-popover-y", ...)`; project Linaria owns positioning
|
|
262
|
+
rules and visual treatment. Register those exact properties using the existing
|
|
263
|
+
`boundaries.styleWrites` mechanism. Clean up positioning observers on unmount.
|
|
264
|
+
The project preview compiler bundles used library code into the normal MCP App
|
|
265
|
+
resource graph; declarations alone do not load packages or change its sandbox.
|
|
266
|
+
|
|
244
267
|
Optional `<Owner>.ads.contract.ts` modules identify public APIs or private
|
|
245
268
|
implementation symbols, named guarantees and registered execution checks. Scenario
|
|
246
269
|
`exercises` links public behavior APIs to reachable demonstrations; `covers`
|
|
@@ -464,6 +487,60 @@ scenario inspection run in the background. Inspection uses a persistent worker
|
|
|
464
487
|
to keep the compiler responsive. Rapid edits replace pending work, with one
|
|
465
488
|
verification run in flight. Production builds retain their own optimization.
|
|
466
489
|
|
|
490
|
+
Preview discovery shares `.ds/scenario-registry.json` between the MCP host,
|
|
491
|
+
draft selector and compiler processes. The snapshot contains scenario metadata
|
|
492
|
+
and diagnostics, keyed to the full relevant source/dependency/directory revision
|
|
493
|
+
and the loaded ADS code/runtime. Accepted and draft roots retain separate
|
|
494
|
+
snapshots. A matching snapshot avoids repeating TypeScript analysis during
|
|
495
|
+
startup; changed inputs or missing/corrupt snapshots trigger fresh discovery.
|
|
496
|
+
Explicit catalogue reads fence their in-memory registry against current source,
|
|
497
|
+
so edits and removals are visible before the next observation/reconciliation tick.
|
|
498
|
+
Reopening an already known draft scenario retains its last discovered metadata
|
|
499
|
+
while a persistent worker refreshes the catalogue. It does not run synchronous
|
|
500
|
+
semantic discovery on the preview request. New/missing scenario identities await
|
|
501
|
+
worker discovery; accepted comparison metadata is independently revision-fenced.
|
|
502
|
+
The response's `discovery` distinguishes current, pending and failed metadata
|
|
503
|
+
from the exact proposal revision and the actual preview build. Superseded worker
|
|
504
|
+
results cannot replace newer requests; drop/shutdown retires their state/worker.
|
|
505
|
+
Preview analysis retains a bounded set of TypeScript programs and unchanged
|
|
506
|
+
source trees across edits; module lookups are refreshed so added/deleted files
|
|
507
|
+
cannot inherit old resolution results. Full validation uses fresh independent
|
|
508
|
+
analysis. Watched graphs include requested scenario roots and their dependencies,
|
|
509
|
+
preserving roots used by other mounted Apps; untouched catalogue entries are not
|
|
510
|
+
compiled until requested. Unwatched full builds retain complete entry coverage.
|
|
511
|
+
Snapshot publication fences source edits during inspection. This cache supplies
|
|
512
|
+
no passing validation or behavior evidence: architecture and acceptance checks
|
|
513
|
+
continue to inspect and validate source independently.
|
|
514
|
+
|
|
515
|
+
Draft creation queues background compiler initialization. One prewarm runs at a
|
|
516
|
+
time, newer pending drafts supersede unused queued work and reclaim an older
|
|
517
|
+
unused speculative session, and explicit preview requests share the same startup.
|
|
518
|
+
Explicitly opened sessions remain subject to the four-session bound.
|
|
519
|
+
File events and MCP writes synchronize warm
|
|
520
|
+
overlays after a short debounce; a slower periodic reconciliation recovers lost
|
|
521
|
+
events and replaced directories. Closing ADS stops queued jobs, source watchers
|
|
522
|
+
and every owned compiler.
|
|
523
|
+
|
|
524
|
+
Draft build reports flow from their preview hosts into the parent build resource
|
|
525
|
+
and proposal summaries. `ads://project/build.drafts` identifies active proposal
|
|
526
|
+
builds, their scenario states, session/revision, freshness and scoped resource
|
|
527
|
+
addresses; `ads_drafts` and relevant discovery/preview results carry compact
|
|
528
|
+
status. Draft source edits immediately mark an existing preview queued/stale.
|
|
529
|
+
Build transitions change the parent resource fingerprint and emit standard
|
|
530
|
+
resource-update notifications for build/draft subscribers, including completion
|
|
531
|
+
and failure without another edit. Active scoped build resources are listed and
|
|
532
|
+
subscribable; removal emits a final invalidation and a resource-list change.
|
|
533
|
+
Observers share draft events across connections, detach when closed and serialize
|
|
534
|
+
refreshes so overlapping file events cannot replay older state. Native report-file
|
|
535
|
+
events notify promptly; periodic observation also covers missed/replaced files.
|
|
536
|
+
Stateless HTTP mutation handlers forward refreshes to those observers; they do
|
|
537
|
+
not initialize fresh observation and misclassify each request as a source edit.
|
|
538
|
+
Draft-only edits preserve accepted registry/catalogue snapshots. Capture updates
|
|
539
|
+
reuse source-fenced discovery rather than allocating another semantic program.
|
|
540
|
+
Explorer uses these reports for monochrome
|
|
541
|
+
entry glyphs and refreshes its mounted Apps. A ready draft preview remains
|
|
542
|
+
unaccepted; catalogue metadata or compiled feedback cannot establish acceptance.
|
|
543
|
+
|
|
467
544
|
Live resources are fenced to the current source digest and managed session.
|
|
468
545
|
They never update accepted artifacts, the successful graph cache or `current`.
|
|
469
546
|
Only validation and compilation passing against unchanged source can publish the
|
|
@@ -482,6 +559,11 @@ matching checked candidate graph and scenario registry carry into the project's
|
|
|
482
559
|
otherwise the normal watcher builds it in the background. Builds tied to a
|
|
483
560
|
temporary candidate location are rebuilt. Source, dependencies, compiler and
|
|
484
561
|
output content determine reuse, with no expiry based on elapsed time.
|
|
562
|
+
Cache recording checks the compiled source stamp before and after hashing
|
|
563
|
+
dependencies. An edit racing publication cannot associate previous output with
|
|
564
|
+
newer inputs; it leaves the previous cache intact and requires the next build.
|
|
565
|
+
A transferred checked graph can refresh older watcher metadata without recompiling
|
|
566
|
+
it, while a partial watched graph cannot replace the complete catalogue.
|
|
485
567
|
|
|
486
568
|
After the selected view paints, a connected showcase can prefetch changed peers'
|
|
487
569
|
static resources into the App's existing byte cache. This bounded, opportunistic
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,97 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.34
|
|
4
|
+
|
|
5
|
+
<!-- ads-local-tests:start -->
|
|
6
|
+
Local verification: **535/535 passed** with `ADS_TEST_BUN=1 npm test`.
|
|
7
|
+
Tested commit: `7e1573d7c1d210b5955cf41778ac3886b515d6af`; Node v24.13.0, Bun 1.3.13.
|
|
8
|
+
Completed 2026-10-22T20:53:31.087Z (614 seconds).
|
|
9
|
+
|
|
10
|
+
<!-- ads-local-test-proof
|
|
11
|
+
{
|
|
12
|
+
"schema": 1,
|
|
13
|
+
"version": "0.3.34",
|
|
14
|
+
"commit": "7e1573d7c1d210b5955cf41778ac3886b515d6af",
|
|
15
|
+
"sourceSha256": "c020f82b1ceab0b30bb61722b26e8bba44c72e115687032fc7a5377487896c96",
|
|
16
|
+
"command": "ADS_TEST_BUN=1 npm test",
|
|
17
|
+
"result": "pass",
|
|
18
|
+
"tests": 535,
|
|
19
|
+
"pass": 535,
|
|
20
|
+
"fail": 0,
|
|
21
|
+
"cancelled": 0,
|
|
22
|
+
"skipped": 0,
|
|
23
|
+
"node": "v24.13.0",
|
|
24
|
+
"bun": "1.3.13",
|
|
25
|
+
"completedAt": "2026-10-22T20:53:31.087Z",
|
|
26
|
+
"durationMs": 613940,
|
|
27
|
+
"logSha256": "d66e7ddc9334e67567af1c47644e23c82348ab03e0297589301f7f5f00e72005"
|
|
28
|
+
}
|
|
29
|
+
-->
|
|
30
|
+
<!-- ads-local-tests:end -->
|
|
31
|
+
|
|
32
|
+
- Ship typed browser verification helpers so strict project typechecks retain
|
|
33
|
+
Playwright's DOM callback inference. Recognize explicitly configured nested
|
|
34
|
+
Vite/Playwright build files as tooling rather than ADS runtime imports.
|
|
35
|
+
|
|
36
|
+
- Batch selected verification scenario roots into one watched graph before parallel
|
|
37
|
+
browser startup. Keep graph handovers pending until a coherent current build
|
|
38
|
+
mounts, preserving selection fencing and avoiding transient startup failures.
|
|
39
|
+
Keep first-visit resources lazy; background peer prefetch follows later edits.
|
|
40
|
+
|
|
41
|
+
- Add `behaviorLibraries`, an explicit project allowlist for installed runtime
|
|
42
|
+
dependencies and subpaths. Enforce it across production ADS source, retaining
|
|
43
|
+
type-only/development and controller skin/framework rules. Require package.json
|
|
44
|
+
dependencies and installation, with actionable lint-config migration messages.
|
|
45
|
+
This is project approval; ADS does not audit third-party source/dependency trees.
|
|
46
|
+
- Report allowed package versions and direct/local-controller usage in MCP status
|
|
47
|
+
and catalog. Preserve existing styling/geometry boundaries and normal sandboxed
|
|
48
|
+
preview bundling. Update design, port and import guidance and the empty starter.
|
|
49
|
+
|
|
50
|
+
- Require a committed local verification stamp in this changelog before release.
|
|
51
|
+
CI verifies its tested commit and source digest instead of repeating the heavy
|
|
52
|
+
browser/package suite. Run the complete suite serially with Bun coverage locally.
|
|
53
|
+
|
|
54
|
+
- Fence cache recording before and after dependency hashing against the compiled
|
|
55
|
+
source revision. An edit during publication cannot make previous output reusable
|
|
56
|
+
for new source. Cover the race with a deterministic regression test.
|
|
57
|
+
- Adopt current checked graph metadata during accepted-edit handover, avoiding a
|
|
58
|
+
second compilation when the watcher still holds previous scenario titles.
|
|
59
|
+
Preserve the full catalogue when reusing partial watched graphs.
|
|
60
|
+
- Allow three minutes for the complete browser workflow with twenty continued
|
|
61
|
+
edits, captures and four dependency acceptances, retaining all assertions and
|
|
62
|
+
reporting each acceptance duration.
|
|
63
|
+
|
|
64
|
+
- Remove synchronous semantic discovery from known draft preview refreshes.
|
|
65
|
+
Refresh metadata in a persistent worker, coalesce revisions and discard stale
|
|
66
|
+
results; discover new identities before selecting them and retain exact-revision
|
|
67
|
+
acceptance checks. Report metadata freshness separately from rendered builds.
|
|
68
|
+
- Show monochrome preview-state glyphs in Explorer entries. Expose draft build
|
|
69
|
+
states in MCP summaries and the parent build resource, with completion/failure
|
|
70
|
+
resource notifications so existing views update without another source edit.
|
|
71
|
+
List active scoped draft build resources and support filtered subscriptions,
|
|
72
|
+
removal invalidation, unsubscribe and reconnect across both MCP protocol eras.
|
|
73
|
+
Serialize overlapping refreshes and detach closed shared observers.
|
|
74
|
+
- Keep stateless HTTP edits on the shared observer instead of treating each new
|
|
75
|
+
request as a source change. Preserve accepted discovery/catalogue caches for
|
|
76
|
+
draft-only edits and reuse revision-fenced metadata for capture updates.
|
|
77
|
+
- Automatically restart only the affected comparison App at its module-revision
|
|
78
|
+
limit, keeping the other version mounted during long draft editing sessions.
|
|
79
|
+
- Refresh draft overlays through file events and immediate MCP edit notifications;
|
|
80
|
+
retain periodic reconciliation for missed events. Queue compiler prewarming
|
|
81
|
+
during creation, coalescing bursts and sharing startup with explicit previews.
|
|
82
|
+
- Reuse TypeScript source trees across preview revisions while refreshing module
|
|
83
|
+
resolution. Compile requested scenario roots in watched graphs; preserve other
|
|
84
|
+
mounted roots and keep full builds/validation complete.
|
|
85
|
+
- Reuse revision-keyed scenario discovery across draft previews, MCP hosts and
|
|
86
|
+
compiler workers. Keep source/tool invalidation and independent validation;
|
|
87
|
+
missing or corrupt generated registry snapshots fall back to fresh discovery.
|
|
88
|
+
Fence explicit catalogue reads against source rather than waiting for polling.
|
|
89
|
+
- Move Explorer draft comparison into ordinary catalogue selection. Enable the
|
|
90
|
+
Split view button for accepted entries with drafts, show new draft owners in
|
|
91
|
+
their normal sections, and remove the separate Drafts tab and scenario picker.
|
|
92
|
+
- Keep owner badges distinct from unchanged overlay review contexts and preserve
|
|
93
|
+
scenario ownership/group metadata when discovering draft-only previews.
|
|
94
|
+
|
|
3
95
|
## 0.3.33
|
|
4
96
|
|
|
5
97
|
- Add auto-mode tracked drafts with persistent manifests and terminal `.ads`
|
package/docs/GUIDE.md
CHANGED
|
@@ -866,10 +866,10 @@ Published npm versions cannot be replaced, even by moving or recreating a Git
|
|
|
866
866
|
tag; see [npm publishing rules](https://docs.npmjs.com/cli/v11/commands/npm-publish/).
|
|
867
867
|
|
|
868
868
|
Update `package.json` and its lockfile with
|
|
869
|
-
`npm version <new-version> --no-git-tag-version --ignore-scripts
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
creates the GitHub release. Stable tags publish as `latest`; prerelease tags
|
|
869
|
+
`npm version <new-version> --no-git-tag-version --ignore-scripts`. Follow the
|
|
870
|
+
[local verification and changelog stamp workflow](#releasing-the-ads-tool), then
|
|
871
|
+
push the matching `v<new-version>` tag. `release.yml` checks version availability
|
|
872
|
+
and the committed local proof, packs, publishes and creates the GitHub release. Stable tags publish as `latest`; prerelease tags
|
|
873
873
|
publish as `next`. Check the workflow result and npm version before updating
|
|
874
874
|
consumer dependencies. The manual workflow moves a label to an existing
|
|
875
875
|
published version; it does not publish new source.
|
|
@@ -898,3 +898,28 @@ all themes; inspect `literals`/`diagnostics` for raw values, cycles and limits.
|
|
|
898
898
|
Choose exact targets/origins and documented geometry exceptions in project code;
|
|
899
899
|
register the command in `mcp.mutationChecks` and the normal build. ADS owns no
|
|
900
900
|
universal spacing scale and infers no design meaning from token names.
|
|
901
|
+
|
|
902
|
+
## Releasing the ADS tool
|
|
903
|
+
|
|
904
|
+
Run the complete tool, browser and packed npm/Bun suite locally before tagging.
|
|
905
|
+
Commit the implementation, documentation and package version first, then run
|
|
906
|
+
`npm run release:verify` with Node, Bun and Chrome available. Tests run serially;
|
|
907
|
+
use an OS memory limit when exercising the full browser/compiler suite. The
|
|
908
|
+
runner forces `ADS_TEST_BUN=1`, rejects failed, cancelled or skipped tests, and
|
|
909
|
+
refuses uncommitted inputs or source changes during the run.
|
|
910
|
+
|
|
911
|
+
A successful run writes a generated verification stamp under the matching
|
|
912
|
+
version in `docs/CHANGELOG.md`. It records the tested implementation commit,
|
|
913
|
+
command, counts, runtimes, completion time, duration, source SHA-256 and log
|
|
914
|
+
SHA-256. The full log remains in `output/local-tests.log`. Commit that stamp
|
|
915
|
+
and tag the resulting commit. Do not hand-author a passing stamp.
|
|
916
|
+
|
|
917
|
+
`npm run release:proof` verifies that the tested commit is an ancestor and its
|
|
918
|
+
source digest matches both the release tree and working inputs. Only generated
|
|
919
|
+
proof blocks and the machine-specific, unpackaged `.mcp.json` launcher are
|
|
920
|
+
excluded from the digest; other tracked changes require another local run.
|
|
921
|
+
Untracked release source must be committed before testing. This is a record of
|
|
922
|
+
trusted local verification, not a signed attestation or a substitute for review.
|
|
923
|
+
|
|
924
|
+
Release CI checks the committed proof, builds and packs the tool, and publishes
|
|
925
|
+
the tagged version with its changelog entry as the release notes. It does not repeat the local browser/package suite.
|
package/docs/MCP.md
CHANGED
|
@@ -13,6 +13,13 @@ preview watcher and serves the built-in browser showcase, so the client needs
|
|
|
13
13
|
only one launch command. Source editing is disabled by default; `--mutations`
|
|
14
14
|
enables guarded ADS edits. MCP does not install skills or add a production runtime.
|
|
15
15
|
|
|
16
|
+
`ads_status.behaviorLibraries` reports each explicitly allowed project package,
|
|
17
|
+
its installed version and the ADS units that use it. Catalog entries expose their
|
|
18
|
+
`behaviorLibraries`, following local helpers and controllers. This allowlist
|
|
19
|
+
permits imports; it does not load packages or audit third-party dependencies.
|
|
20
|
+
Used code is bundled by the project's normal preview compiler into the resources
|
|
21
|
+
read by the sandboxed MCP App. Existing style and geometry boundaries still apply.
|
|
22
|
+
|
|
16
23
|
Websites and product MCP Apps reuse the project's public design-system UI. The
|
|
17
24
|
consuming application owns data, actions, mounting, MCP communication and serving.
|
|
18
25
|
The ADS MCP server supports development, inspection and review of that UI. Its
|
|
@@ -57,15 +64,48 @@ being imported into application source. Normal imports of marked draft source,
|
|
|
57
64
|
including aliases/symlinks, fail guards; use the isolated preview overlay instead.
|
|
58
65
|
Install the exported `draftImportGuard()` in application Vite/Rollup builds too.
|
|
59
66
|
|
|
60
|
-
Explorer
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
67
|
+
Explorer keeps pending proposals in the ordinary catalogue, with Draft badges
|
|
68
|
+
on their owners, including new owners without an accepted version. Selecting an
|
|
69
|
+
entry with a draft enables the upper-header Split view toggle to compare Accepted
|
|
70
|
+
and Draft in the right pane using separate opaque MCP Apps, the same scenario/theme
|
|
71
|
+
and matched available/phone viewport widths. New-only entries show their draft
|
|
72
|
+
and disable comparison. Unchanged scenarios available as explicit overlay review
|
|
73
|
+
contexts do not acquire owner badges. There is no separate Drafts tab or scenario
|
|
74
|
+
picker; `ads_drafts` provides draft-only MCP listing. Project
|
|
64
75
|
code remains inside the existing sandbox; no additional iframe origin is allowed.
|
|
65
76
|
Draft resource reads are explicitly scoped through `ads://drafts/<id>/resource`.
|
|
66
77
|
`ads://project/drafts` supports resource subscriptions; tool outcomes and persisted
|
|
67
78
|
events/status are the fallback when a host does not deliver notifications.
|
|
68
79
|
|
|
80
|
+
For an existing preview, `ads_show_draft` reuses known scenario metadata while a
|
|
81
|
+
worker refreshes discovery. Its `discovery.state` is `current`, `pending` or
|
|
82
|
+
`error`; `discovery.revision` identifies the metadata snapshot, separately from
|
|
83
|
+
the returned exact proposal `revision`. New/missing identities await discovery.
|
|
84
|
+
The previous view may remain visible until the new compilation is available.
|
|
85
|
+
Acceptance always runs its fresh checks against the exact reviewed revision.
|
|
86
|
+
After 20 retained module revisions, Explorer automatically restarts the affected
|
|
87
|
+
App to release its module cache. Draft comparison preserves the other version's
|
|
88
|
+
mounted state and the selected scenario/theme/viewport.
|
|
89
|
+
|
|
90
|
+
Build state is separate from the Draft badge. Explorer entry glyphs show not
|
|
91
|
+
built, building, compiled/checking, ready, stale and failed using monochrome
|
|
92
|
+
shapes with accessible descriptions. Relevant MCP results expose `build` or
|
|
93
|
+
`preview` with `state`, `building`, `current`, `stale`, scenario/revision data and
|
|
94
|
+
a build-resource address. `ads://project/build` includes active `drafts`; each
|
|
95
|
+
draft's `preview.resourceUri` addresses its complete isolated build report.
|
|
96
|
+
Subscribe to `ads://project/build`, `ads://project/drafts`, or an active draft's
|
|
97
|
+
`preview.resourceUri` (also listed by `resources/list`): standard
|
|
98
|
+
`notifications/resources/updated` signals progress, completion, failure and
|
|
99
|
+
metadata refresh without another edit. Re-read the resource after a notification;
|
|
100
|
+
hosts without notifications can poll it. A scoped subscription receives only that
|
|
101
|
+
draft's build changes, including a final invalidation when its session is removed.
|
|
102
|
+
Unsubscribe when leaving the view; subscribe again and read current status after
|
|
103
|
+
reconnecting. Modern clients use `subscriptions/listen` resource filters; older
|
|
104
|
+
clients use `resources/subscribe` and `resources/unsubscribe`. Notifications
|
|
105
|
+
invalidate data; they do not carry the build report. Ready means compilation and
|
|
106
|
+
its checks completed; the mounted App separately reports when rendering is ready.
|
|
107
|
+
A ready draft remains unaccepted.
|
|
108
|
+
|
|
69
109
|
Agents must finish coherent design changes by accepting required drafts. A
|
|
70
110
|
preview-only proposal is unfinished unless the user asked to retain it. Failed
|
|
71
111
|
checks require repair or an explicit unfinished-blocker report, never bypassing
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reqvire-org/ads",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.34",
|
|
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": {
|
|
@@ -37,18 +37,20 @@
|
|
|
37
37
|
"sync:skill-references": "node scripts/sync-skill-references.mjs",
|
|
38
38
|
"check:skill-references": "node scripts/sync-skill-references.mjs --check",
|
|
39
39
|
"lint": "npm run lint:tool",
|
|
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",
|
|
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
42
|
"lint:ds": "node dist/cli.mjs lint-config && node dist/cli.mjs check && oxlint --deny-warnings --config .ds/oxlintrc.json src design-system",
|
|
43
43
|
"lint:style": "biome lint --config-path=biome.css.json .",
|
|
44
44
|
"preview": "node dist/cli.mjs showcase",
|
|
45
45
|
"preview:showcase": "node dist/cli.mjs showcase",
|
|
46
46
|
"typecheck": "tsc --noEmit",
|
|
47
|
-
"test": "npm run build && node --test --test-concurrency=
|
|
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
50
|
"ads": "node dist/cli.mjs",
|
|
51
|
-
"prepack": "npm run build"
|
|
51
|
+
"prepack": "npm run build",
|
|
52
|
+
"release:verify": "node scripts/local-test-proof.mjs",
|
|
53
|
+
"release:proof": "node scripts/local-test-proof.mjs --check"
|
|
52
54
|
},
|
|
53
55
|
"dependencies": {
|
|
54
56
|
"@modelcontextprotocol/server": "2.3.1",
|