@reqvire-org/ads 0.3.10 → 0.3.11
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/mcp/build-status.mjs +14 -4
- package/dist/mcp/preview-watch.mjs +7 -5
- package/dist/mcp/server.mjs +11 -8
- package/dist/preview-inputs.mjs +24 -0
- package/dist/scenarios-compiler.mjs +26 -20
- package/dist/showcase/client.bundle.js +17 -17
- package/dist/skills/ads-break-ui/references/scenarios.md +15 -0
- package/dist/skills/ads-designer/references/scenarios.md +15 -0
- package/dist/skills/ads-import/references/scenarios.md +15 -0
- package/dist/skills/ads-migrate/references/scenarios.md +15 -0
- package/dist/skills/ads-motion/references/scenarios.md +15 -0
- package/dist/verification.mjs +2 -2
- package/docs/ARCHITECTURE.md +10 -3
- package/docs/CHANGELOG.md +13 -0
- package/docs/MCP.md +20 -1
- package/package.json +1 -1
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
Use this reference for `scenario-render`, `scenario-coverage` or `showcase-class`
|
|
4
4
|
diagnostics. MCP serves the same guide as `ads://guides/scenarios`.
|
|
5
5
|
|
|
6
|
+
All preview kinds open at `?scenario=<discovered-id>`. Use the returned showcase
|
|
7
|
+
link instead of inferring a section from an ID's directory: an owner-local token
|
|
8
|
+
scenario may live under `components/` or `patterns/`, with `kind: "tokens"`.
|
|
9
|
+
Legacy `?category=` links remain aliases. The `ads_show_tokens` tool retains its
|
|
10
|
+
`category` argument; both preview tools return canonical `?scenario=` links.
|
|
11
|
+
|
|
12
|
+
After an edit, check the build's `current`/`stale` fields and `sourceRevision`.
|
|
13
|
+
Source evidence is captured before compilation and checked against current project
|
|
14
|
+
inputs; an unchanged artifact or running watcher cannot establish freshness.
|
|
15
|
+
`ADS_PREVIEW_STALE_SOURCE` means the retained output awaits a current build.
|
|
16
|
+
Guarded writes explicitly invalidate the compiler, and content reconciliation
|
|
17
|
+
recovers missed atomic replacements. Do not touch source to force freshness;
|
|
18
|
+
inspect build diagnostics. Upgrade the project's compiler dependency together
|
|
19
|
+
with MCP when an older reporter lacks source evidence.
|
|
20
|
+
|
|
6
21
|
## Owner-local token previews load their own definitions
|
|
7
22
|
|
|
8
23
|
Keep the registered token sheet imported by its runtime owner for product use.
|
package/dist/verification.mjs
CHANGED
|
@@ -171,8 +171,8 @@ export function createVerificationController(root) {
|
|
|
171
171
|
const { startAdsMcp } = await import("./mcp/server.mjs");
|
|
172
172
|
host ??= await startAdsMcp(root, { stdio: false, showcase: true });
|
|
173
173
|
for (const check of group.filter(check => check.scenario)) {
|
|
174
|
-
const url = new URL(host.url)
|
|
175
|
-
url.searchParams.set(
|
|
174
|
+
const url = new URL(host.url);
|
|
175
|
+
url.searchParams.set("scenario", check.scenario);
|
|
176
176
|
scenarios[check.scenario] = url.href;
|
|
177
177
|
}
|
|
178
178
|
}
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -288,7 +288,10 @@ Reassembling a second screen from shared primitives still allows design drift.
|
|
|
288
288
|
The server discovers one path-derived scenario registry. The showcase's four
|
|
289
289
|
sections—Tokens, Components, Patterns and Composition—browse that same registry
|
|
290
290
|
through MCP results. They do not initialize the entry or define
|
|
291
|
-
its UI.
|
|
291
|
+
its UI. Every preview uses `?scenario=<id>`; discovered `kind` selects its section,
|
|
292
|
+
including token scenarios colocated with component/pattern owners. Existing
|
|
293
|
+
`?category=` links remain compatibility aliases. The host supplies theme and
|
|
294
|
+
available space; the public implementation
|
|
292
295
|
supplies presentation. Several related public parts may share a scenario with
|
|
293
296
|
their required parent. Every declared token and every public renderable component
|
|
294
297
|
and pattern needs addressable coverage. Token references must exist in the real
|
|
@@ -304,8 +307,12 @@ The skill-local [scenario guide](../skills/ads-designer/references/scenarios.md)
|
|
|
304
307
|
explains evidence, limits and diagnostics.
|
|
305
308
|
|
|
306
309
|
After source changes, validation and compilation must both succeed before a new
|
|
307
|
-
graph becomes current. MCP announces build/resource updates.
|
|
308
|
-
|
|
310
|
+
graph becomes current. MCP announces build/resource updates.
|
|
311
|
+
Build success records the project input digest captured before compilation;
|
|
312
|
+
status reads independently verify that digest and the output bytes. Guarded
|
|
313
|
+
publication invalidates the compiler explicitly. Content reconciliation recovers
|
|
314
|
+
missed atomic file replacements, so OS watch delivery cannot establish freshness.
|
|
315
|
+
The built-in client refreshes discovery and sends the current selection to the existing App, whose
|
|
309
316
|
loader mounts the new module graph. Failed builds retain the previous view with
|
|
310
317
|
visible stale diagnostics. Invalid scenario metadata at startup and later source
|
|
311
318
|
failures stay in the watcher's recoverable diagnostic path. Fixing source triggers validation again.
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.3.11
|
|
4
|
+
|
|
5
|
+
- Bind preview success to project input content as well as artifact bytes. Source
|
|
6
|
+
edits immediately mark older output stale, including edits missed by OS watches
|
|
7
|
+
and changes made during a build; reject reports without source evidence.
|
|
8
|
+
- Recover missed atomic replacements with one-second input reconciliation and
|
|
9
|
+
explicitly invalidate the live compiler after accepted single/coupled edits.
|
|
10
|
+
Retain the same process and verify repeated replacements with generic fixtures.
|
|
11
|
+
- Use canonical `?scenario=<id>` links for every preview kind and select the
|
|
12
|
+
showcase section from discovered metadata. Preserve legacy `?category=` links
|
|
13
|
+
as aliases, unify MCP preview and browser-check links, and cover all kinds,
|
|
14
|
+
owner-local tokens, navigation and reloads in a real sandboxed-App regression.
|
|
15
|
+
|
|
3
16
|
## 0.3.10
|
|
4
17
|
|
|
5
18
|
- Attach registered owner-local token sheets to independently compiled token
|
package/docs/MCP.md
CHANGED
|
@@ -15,6 +15,14 @@ The agent keeps its stdio connection; the browser connects to `/mcp` on the same
|
|
|
15
15
|
runtime using HTTP and the current modern protocol. Both share the configured
|
|
16
16
|
preview watcher and artifacts. Stdout remains exclusively JSON-RPC.
|
|
17
17
|
|
|
18
|
+
Every registered preview uses `?scenario=<discovered-id>`, including token
|
|
19
|
+
previews colocated under components or patterns. The client selects its section
|
|
20
|
+
from the scenario's discovered `kind`, never from the ID's path prefix. Existing
|
|
21
|
+
`?category=<id>` links remain accepted and normalize to `?scenario=`; an explicit
|
|
22
|
+
`scenario` parameter takes precedence when both are present. `ads_show_tokens`
|
|
23
|
+
keeps its `category` tool argument and returns the same canonical showcase link
|
|
24
|
+
as `ads_show_scenario` for that ID.
|
|
25
|
+
|
|
18
26
|
For browser-only work, run `ads showcase` inside the project. It starts the same
|
|
19
27
|
runtime without stdio. `--port 4185` selects a port; otherwise the OS chooses an
|
|
20
28
|
available one. For a stable address, add `"--port", "4191"` to the server's `args`
|
|
@@ -701,7 +709,18 @@ Tool summaries include the first three diagnostics per preview, capped at 1,000
|
|
|
701
709
|
characters each, with counts and truncation flags; the build resource retains
|
|
702
710
|
the complete bounded report.
|
|
703
711
|
A watcher session separates revisions across restarts, and an artifact digest
|
|
704
|
-
checks that the served output matches the reported successful build.
|
|
712
|
+
checks that the served output matches the reported successful build. Each build
|
|
713
|
+
captures a `sourceRevision` before compilation. Status reads compare that content
|
|
714
|
+
digest with current project inputs; unchanged output cannot remain current after
|
|
715
|
+
source changes. Such previews retain their last successful revision and output,
|
|
716
|
+
but report `current: false`, `stale: true` and `ADS_PREVIEW_STALE_SOURCE` while
|
|
717
|
+
awaiting the current build. Changes during compilation also invalidate success.
|
|
718
|
+
|
|
719
|
+
Guarded single-owner edits and transactions explicitly invalidate the managed
|
|
720
|
+
compiler after publication. Filesystem events provide fast updates; one-second
|
|
721
|
+
input reconciliation recovers missed atomic replacements without touching source
|
|
722
|
+
or restarting MCP. Keep the project compiler's ADS dependency and the MCP package
|
|
723
|
+
updated together: older reports without source evidence cannot establish freshness.
|
|
705
724
|
|
|
706
725
|
On each status transition MCP sends `notifications/resources/updated` to build
|
|
707
726
|
resource subscribers. Legacy connections use `resources/subscribe`; modern
|