@reqvire-org/ads 0.4.4 → 0.4.6

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 (53) hide show
  1. package/README.md +11 -8
  2. package/dist/capture.mjs +1 -1
  3. package/dist/cli.mjs +1 -1
  4. package/dist/input-scope.mjs +57 -0
  5. package/dist/mcp/apps.mjs +7 -1
  6. package/dist/mcp/build-status.mjs +12 -3
  7. package/dist/mcp/drafts.mjs +7 -0
  8. package/dist/mcp/mutations.mjs +1 -1
  9. package/dist/mcp/preview-http.bundle.js +7 -0
  10. package/dist/mcp/preview-http.mjs +148 -0
  11. package/dist/mcp/preview-watch.mjs +14 -3
  12. package/dist/mcp/preview-widget.bundle.js +20 -20
  13. package/dist/mcp/resource-loader.js +1 -1
  14. package/dist/mcp/sandbox-host.mjs +6 -1
  15. package/dist/mcp/server.mjs +49 -9
  16. package/dist/mcp/showcase-host.mjs +56 -5
  17. package/dist/mcp/showcase-http.mjs +66 -0
  18. package/dist/preview-inputs.mjs +7 -2
  19. package/dist/scenario-registry.mjs +2 -2
  20. package/dist/scenarios-compiler.mjs +19 -1
  21. package/dist/showcase/client.bundle.js +54 -54
  22. package/dist/showcase/comparison.js +15 -12
  23. package/dist/showcase/connection.js +10 -0
  24. package/dist/showcase/http-client.bundle.js +9 -0
  25. package/dist/showcase/http-connection.js +86 -0
  26. package/dist/showcase/http-preview.js +81 -0
  27. package/dist/showcase-http-routes.mjs +31 -0
  28. package/dist/skills/README.md +2 -2
  29. package/dist/skills/ads-designer/references/captures.md +1 -1
  30. package/dist/skills/ads-designer/references/runtimes.md +18 -2
  31. package/dist/skills/ads-designer/references/workflows.md +16 -0
  32. package/dist/skills/ads-import/references/captures.md +1 -1
  33. package/dist/skills/ads-import/references/runtimes.md +18 -2
  34. package/dist/skills/ads-import/references/workflows.md +16 -0
  35. package/dist/skills/ads-migrate/SKILL.md +1 -0
  36. package/dist/skills/ads-migrate/references/0.4.3-to-0.4.4.md +9 -0
  37. package/dist/skills/ads-migrate/references/0.4.4-to-0.4.5.md +72 -0
  38. package/dist/skills/ads-port/references/captures.md +1 -1
  39. package/dist/skills/ads-port/references/runtimes.md +18 -2
  40. package/dist/skills/ads-port/references/workflows.md +16 -0
  41. package/dist/stage-timing.cjs +3 -2
  42. package/dist/validation-inputs.mjs +21 -3
  43. package/dist/verification/browser.mjs +2 -2
  44. package/docs/ADS.md +9 -7
  45. package/docs/ARCHITECTURE.md +56 -42
  46. package/docs/CHANGELOG.md +45 -25
  47. package/docs/GUIDE.md +15 -8
  48. package/docs/HTTP-SHOWCASE-POC.md +397 -0
  49. package/docs/MCP.md +63 -9
  50. package/docs/benchmarks/http-showcase-optimized.json +1879 -0
  51. package/docs/benchmarks/http-showcase-profile.json +308 -0
  52. package/docs/benchmarks/http-showcase.json +3069 -0
  53. package/package.json +1 -1
@@ -63,3 +63,19 @@ proposal. Do not silently leave requested work only in drafts. This completion
63
63
  rule also applies to MCP-only drafts; it does not impose draft acceptance on
64
64
  ordinary direct source edits. Never import marked `.ads` draft source into
65
65
  application or accepted ADS runtime code.
66
+
67
+ ## Shipping product MCP widgets
68
+
69
+ Use the application's own MCP server and mounting/action adapter. Import needed
70
+ UI by name from the generated public design-system entry and build from the
71
+ widget entry with the application's production framework/Linaria pipeline.
72
+ Do not embed a complete design-system library, an ADS preview graph, or review
73
+ code. Preserve intentional CSS/JavaScript side effects; inspect the actual
74
+ emitted code, CSS, fonts and artwork for unrelated owners. Shared foundation
75
+ token/theme CSS may remain; JavaScript tree shaking alone does not prove that
76
+ unused component CSS or assets were removed.
77
+
78
+ Verify the served HTML with a real MCP client and Apps host: read the resource,
79
+ render it, exercise an action back to the product server, and check themes,
80
+ fonts and assets without an ADS server running. An ADS showcase or MCP Explorer
81
+ pass establishes development-preview behavior, not the product integration.
@@ -25,7 +25,7 @@ ads_capture({
25
25
 
26
26
  The ID above is illustrative; use one returned by discovery. `theme` names one of the
27
27
  project's declared themes (`ads_status.themes`); the default is the first declared theme at
28
- 1280 × 800 CSS pixels. Capture uses the real sandboxed MCP App with the
28
+ 1280 × 800 CSS pixels. Capture uses the real isolated preview through the local HTTP showcase with the
29
29
  requested viewport and excludes showcase navigation. The default image records
30
30
  the complete widget viewport, including its current scroll/state; it does not
31
31
  automatically stitch every scroll position into one image.
@@ -164,8 +164,8 @@ The preview UI reuses bounded, scope-specific manifest revisions and asks for
164
164
  changed records internally. Tool results remain graph references. Full-resource
165
165
  reads and older-server fallback remain supported. Restart the project's ADS
166
166
  runtime and reconnect after upgrading; changing an installed package does not
167
- replace the running compiler. HTTP asset delivery is a separate, unreleased
168
- experiment and is not required for these improvements.
167
+ replace the running compiler. ADS 0.4.5 also makes HTTP delivery the default for
168
+ the local browser; MCP agents and embedded Apps retain their interfaces.
169
169
 
170
170
  `ads compile .` builds all production previews for project builds or CI.
171
171
  `ads compile . --watch` runs the same source scheduler continuously.
@@ -219,3 +219,19 @@ Unchanged worker output reuses dependency hashes; changes to transitive inputs
219
219
  rebuild it. Temporary worker compiler processes run sequentially and exit after
220
220
  producing output. Their build lifetime is separate from runtime worker cleanup,
221
221
  which remains owned by the component/controller.
222
+
223
+ ### HTTP showcase delivery (0.4.5)
224
+
225
+ The local browser uses HTTP JSON, checked asset URLs and SSE build reports;
226
+ agents use MCP against the same engine. Use the runtime's normal showcase URL.
227
+ No proof switch, project Vite server or authored-source migration is needed.
228
+ Preview iframes remain isolated and persistent. Workers and referring modules
229
+ use verified Blob URLs where browser sandbox restrictions require them.
230
+
231
+ A broken event stream marks the retained preview potentially stale. ADS reconnects
232
+ and rereads current discovery/build state without periodic status polling; it
233
+ also reconciles when the tab becomes visible. Wait for a current verified preview
234
+ before using it as evidence. Screenshots, audits and behavior checks use the
235
+ local HTTP host with their existing readiness and revision gates. External MCP
236
+ Apps continue to use MCP resources. See the target version's migration guide for
237
+ upgrade/restart instructions; a guide alone does not prove publication.
@@ -63,3 +63,19 @@ proposal. Do not silently leave requested work only in drafts. This completion
63
63
  rule also applies to MCP-only drafts; it does not impose draft acceptance on
64
64
  ordinary direct source edits. Never import marked `.ads` draft source into
65
65
  application or accepted ADS runtime code.
66
+
67
+ ## Shipping product MCP widgets
68
+
69
+ Use the application's own MCP server and mounting/action adapter. Import needed
70
+ UI by name from the generated public design-system entry and build from the
71
+ widget entry with the application's production framework/Linaria pipeline.
72
+ Do not embed a complete design-system library, an ADS preview graph, or review
73
+ code. Preserve intentional CSS/JavaScript side effects; inspect the actual
74
+ emitted code, CSS, fonts and artwork for unrelated owners. Shared foundation
75
+ token/theme CSS may remain; JavaScript tree shaking alone does not prove that
76
+ unused component CSS or assets were removed.
77
+
78
+ Verify the served HTML with a real MCP client and Apps host: read the resource,
79
+ render it, exercise an action back to the product server, and check themes,
80
+ fonts and assets without an ADS server running. An ADS showcase or MCP Explorer
81
+ pass establishes development-preview behavior, not the product integration.
@@ -55,3 +55,4 @@ Load only the guide(s) for the requested transition.
55
55
  |------|----|-------|
56
56
  | 0.4.1 | 0.4.2 | [Showcase, review boundaries and preview migration](references/0.4.1-to-0.4.2.md) |
57
57
  | 0.4.3 | 0.4.4 | [Incremental previews and manifest reuse](references/0.4.3-to-0.4.4.md) |
58
+ | 0.4.4 | 0.4.5 | [HTTP showcase delivery and reconnect behavior](references/0.4.4-to-0.4.5.md) |
@@ -78,3 +78,12 @@ Report the from/to installed versions, commands and rendered states actually
78
78
  verified, unresolved findings, and the running showcase URL. Editing performance
79
79
  depends on the project: the integration benchmark showed faster compatible edits
80
80
  and lower transfer volume, but slower cold verification and no memory improvement.
81
+
82
+ ## HTTP experiment is not a 0.4.4 migration
83
+
84
+ The separate HTTP branch removes MCP from the showcase browser while retaining
85
+ MCP for agents and the same compiler/check/draft services. Its preview iframe
86
+ remains. This requires no changes to project components, scenarios or tokens.
87
+ Do not enable proof environment switches in a release migration or claim that
88
+ 0.4.4 includes this transport. Compare the experimental branch against the exact
89
+ release before recommending a later migration.
@@ -0,0 +1,72 @@
1
+ # ADS 0.4.4 → 0.4.5
2
+
3
+ Confirm the target version in the installed package or registry. This guide also
4
+ accompanies a local release candidate and does not establish publication.
5
+
6
+ This upgrade makes HTTP the default delivery path for the local showcase.
7
+ Components, tokens, scenarios, mount adapters, behavior checks and configuration
8
+ need no migration. Keep the application's framework, package manager, runtime
9
+ and TypeScript. ADS tooling still requires Bun ≥1.4.1.
10
+
11
+ ## Upgrade and restart
12
+
13
+ 1. Upgrade ADS with the project's existing package manager and dependency
14
+ placement; for an existing npm dev dependency, use
15
+ `npm install --save-dev @reqvire-org/ads@0.4.5`. Use the supplied tarball for
16
+ a candidate. Preserve unrelated dependency and lockfile edits.
17
+ 2. Stop and restart only that project's ADS runtime with the upgraded package.
18
+ Reconnect MCP clients and open the normal showcase URL from `ads_status`.
19
+ Remove `ADS_PROOF_HTTP_PREVIEW` from experimental launchers and remove the
20
+ `delivery` query parameter from saved experiment links. Neither is needed.
21
+ 3. Keep project source, tracked drafts and `.ds` evidence. ADS invalidates compiler
22
+ artifacts by fingerprint. Do not replace the design system with a starter,
23
+ erase caches wholesale, add a separate preview server or edit generated files.
24
+
25
+ ## What changes
26
+
27
+ The local browser gets discovery, checked assets and preview actions over HTTP;
28
+ build reports arrive through SSE. It contains no MCP client. Agents and external
29
+ MCP Apps keep their tools, resources and transports against the same engine.
30
+ One persistent opaque iframe isolates each local preview. Worker scripts and
31
+ referring modules still use verified Blob URLs where the browser requires them.
32
+
33
+ Compatible edits retain state as in 0.4.4; this remains conditional, not durable
34
+ application state. A lost event stream marks the retained preview potentially
35
+ stale. Reconnection and returning to a visible tab reconcile current state
36
+ without periodic browser status polling. A visible update is not proof that
37
+ checks passed. Captures, audits and registered behaviors use verified output;
38
+ exact-revision acceptance and publication gates are unchanged.
39
+
40
+ Custom automation should use the exported `openPreviewScenario` helper and
41
+ locators within the returned frame. The local showcase now has one preview
42
+ iframe instead of an MCP proxy containing another App iframe. Do not depend on
43
+ the old nested-frame selectors. External MCP Apps retain their host's framing.
44
+ Internal `/api/` and asset-capability URLs are not new public integration APIs;
45
+ use CLI/MCP for agent integrations.
46
+
47
+ ## Verify the receiving project
48
+
49
+ Run the upgraded local CLI's `check`, `compile` and `validate` commands, plus
50
+ the project's typecheck, production build and relevant tests. Reuse checks
51
+ already registered with validation. Inspect real scenarios in relevant themes
52
+ and viewports, a compatible stateful edit, a token/style edit, and any existing
53
+ draft comparison. Use `ads_capture` for clean and requested guide captures;
54
+ verify selected targets and viewport dimensions when those workflows are used.
55
+
56
+ If the application serves product MCP widgets, keep its own server and build
57
+ integration. Check its served widget in a real MCP client, including an action
58
+ round trip, themes and assets. Confirm that unrelated component code, CSS and
59
+ artwork are absent from that widget's bundle. ADS's development preview tests
60
+ do not replace this product integration check; the HTTP showcase is not a
61
+ new production runtime dependency.
62
+
63
+ If a preview fails, inspect build diagnostics and confirm the connected project
64
+ and installed version. Restart the upgraded runtime rather than adding a
65
+ polling workaround or bypassing checks. Preserve diagnostics and the failing
66
+ fixture for a regression. A rollback restores only this upgrade's package and
67
+ lockfile changes, followed by a runtime restart; keep unrelated work and drafts.
68
+
69
+ Report installed versions, changes, checks actually run and unresolved failures.
70
+ The matched local benchmark improved median edit visibility and response bytes,
71
+ but did not demonstrate a meaningful memory reduction. Do not promise the same
72
+ latency for every project or network.
@@ -25,7 +25,7 @@ ads_capture({
25
25
 
26
26
  The ID above is illustrative; use one returned by discovery. `theme` names one of the
27
27
  project's declared themes (`ads_status.themes`); the default is the first declared theme at
28
- 1280 × 800 CSS pixels. Capture uses the real sandboxed MCP App with the
28
+ 1280 × 800 CSS pixels. Capture uses the real isolated preview through the local HTTP showcase with the
29
29
  requested viewport and excludes showcase navigation. The default image records
30
30
  the complete widget viewport, including its current scroll/state; it does not
31
31
  automatically stitch every scroll position into one image.
@@ -164,8 +164,8 @@ The preview UI reuses bounded, scope-specific manifest revisions and asks for
164
164
  changed records internally. Tool results remain graph references. Full-resource
165
165
  reads and older-server fallback remain supported. Restart the project's ADS
166
166
  runtime and reconnect after upgrading; changing an installed package does not
167
- replace the running compiler. HTTP asset delivery is a separate, unreleased
168
- experiment and is not required for these improvements.
167
+ replace the running compiler. ADS 0.4.5 also makes HTTP delivery the default for
168
+ the local browser; MCP agents and embedded Apps retain their interfaces.
169
169
 
170
170
  `ads compile .` builds all production previews for project builds or CI.
171
171
  `ads compile . --watch` runs the same source scheduler continuously.
@@ -219,3 +219,19 @@ Unchanged worker output reuses dependency hashes; changes to transitive inputs
219
219
  rebuild it. Temporary worker compiler processes run sequentially and exit after
220
220
  producing output. Their build lifetime is separate from runtime worker cleanup,
221
221
  which remains owned by the component/controller.
222
+
223
+ ### HTTP showcase delivery (0.4.5)
224
+
225
+ The local browser uses HTTP JSON, checked asset URLs and SSE build reports;
226
+ agents use MCP against the same engine. Use the runtime's normal showcase URL.
227
+ No proof switch, project Vite server or authored-source migration is needed.
228
+ Preview iframes remain isolated and persistent. Workers and referring modules
229
+ use verified Blob URLs where browser sandbox restrictions require them.
230
+
231
+ A broken event stream marks the retained preview potentially stale. ADS reconnects
232
+ and rereads current discovery/build state without periodic status polling; it
233
+ also reconciles when the tab becomes visible. Wait for a current verified preview
234
+ before using it as evidence. Screenshots, audits and behavior checks use the
235
+ local HTTP host with their existing readiness and revision gates. External MCP
236
+ Apps continue to use MCP resources. See the target version's migration guide for
237
+ upgrade/restart instructions; a guide alone does not prove publication.
@@ -63,3 +63,19 @@ proposal. Do not silently leave requested work only in drafts. This completion
63
63
  rule also applies to MCP-only drafts; it does not impose draft acceptance on
64
64
  ordinary direct source edits. Never import marked `.ads` draft source into
65
65
  application or accepted ADS runtime code.
66
+
67
+ ## Shipping product MCP widgets
68
+
69
+ Use the application's own MCP server and mounting/action adapter. Import needed
70
+ UI by name from the generated public design-system entry and build from the
71
+ widget entry with the application's production framework/Linaria pipeline.
72
+ Do not embed a complete design-system library, an ADS preview graph, or review
73
+ code. Preserve intentional CSS/JavaScript side effects; inspect the actual
74
+ emitted code, CSS, fonts and artwork for unrelated owners. Shared foundation
75
+ token/theme CSS may remain; JavaScript tree shaking alone does not prove that
76
+ unused component CSS or assets were removed.
77
+
78
+ Verify the served HTML with a real MCP client and Apps host: read the resource,
79
+ render it, exercise an action back to the product server, and check themes,
80
+ fonts and assets without an ADS server running. An ADS showcase or MCP Explorer
81
+ pass establishes development-preview behavior, not the product integration.
@@ -2,11 +2,12 @@ const { appendFileSync } = require("node:fs");
2
2
  const { performance } = require("node:perf_hooks");
3
3
 
4
4
  /** Opt-in development tracing, inherited by compiler children. No output normally. */
5
- function timeStage(stage, run) {
5
+ function timeStage(stage, run, detail) {
6
6
  const output = process.env.ADS_PROFILE_STAGES;
7
7
  if (!output) return run();
8
8
  const started = performance.now();
9
- const record = () => appendFileSync(output, JSON.stringify({ stage, pid: process.pid, ms: performance.now() - started }) + "\n");
9
+ const extra = typeof detail === "function" ? detail() : detail;
10
+ const record = () => appendFileSync(output, JSON.stringify({ stage, pid: process.pid, ms: performance.now() - started, ...extra }) + "\n");
10
11
  let pending = false;
11
12
  try {
12
13
  const result = run();
@@ -11,6 +11,7 @@ import { configurationFiles } from "./units.mjs";
11
11
  import { createPreviewFileFilter } from "./preview-files.mjs";
12
12
  import { projectNoticeFiles } from "./project-documents.mjs";
13
13
  import timing from "./stage-timing.cjs";
14
+ import { inInputRequestScope, inputRequestScopeId, inputScopeKey, scopedInputs } from "./input-scope.mjs";
14
15
 
15
16
  const digest = (file) => `sha256:${createHash("sha256").update(readFileSync(file)).digest("hex")}`;
16
17
  const ignored = new Set(["output", "test-results", "playwright-report", ".playwright-cli"]);
@@ -54,9 +55,26 @@ async function references(file, content, revision) {
54
55
  return result;
55
56
  }
56
57
 
57
- /** Mandatory UI/guard inputs, real local dependencies and declared opaque inputs. */
58
- export function validationInputFiles(options, extraFiles = [], limits = {}) {
59
- return timing.timeStage("input-capture", () => withModuleResolutionScope(() => captureInputs(options, extraFiles, limits)));
58
+ /** Mandatory UI/guard inputs, real local dependencies and declared opaque inputs.
59
+ * Inside a read-only request scope, unbounded captures share one walk; `fresh`
60
+ * re-walks (a content fence) and `observed` re-walks when paired evidence changed. */
61
+ export function validationInputFiles(options, extraFiles = [], { fresh, observed, ...limits } = {}) {
62
+ const capture = (bounds) =>
63
+ timing.timeStage("input-capture", () => withModuleResolutionScope(() => captureInputs(options, extraFiles, bounds)), () => ({ scope: inputRequestScopeId() }));
64
+ if (!inInputRequestScope() || extraFiles.length || limits.maxFiles !== undefined || limits.maxBytes !== undefined) return capture(limits);
65
+ const { onFile } = limits;
66
+ return scopedInputs(
67
+ inputScopeKey(options),
68
+ async (contents) => {
69
+ const files = contents ? new Map() : undefined;
70
+ const digests = await capture(files ? { onFile: (file, content, revision) => files.set(file, [content, revision]) } : {});
71
+ return { digests, files };
72
+ },
73
+ { fresh, observed, contents: !!onFile },
74
+ ).then(({ digests, files }) => {
75
+ if (onFile) for (const [file, [content, revision]] of files) onFile(file, content, revision);
76
+ return { ...digests };
77
+ });
60
78
  }
61
79
  async function captureInputs(options, extraFiles, { maxFiles = Infinity, maxBytes = Infinity, onFile }) {
62
80
  const supplied = options.config;
@@ -238,7 +238,7 @@ async function openPreviewScenario(page, url, scenario, { timeout = 30000 } = {}
238
238
  code: state.code ?? "ADS_PREVIEW_STARTUP",
239
239
  ...state.resourceUri ? { resourceUri: state.resourceUri } : {}
240
240
  };
241
- throw new Error(state.message || "The MCP App failed before verification.");
241
+ throw new Error(state.message || "The preview failed before verification.");
242
242
  }
243
243
  }
244
244
  const error = await page.evaluate(() => {
@@ -255,7 +255,7 @@ async function openPreviewScenario(page, url, scenario, { timeout = 30000 } = {}
255
255
  }
256
256
  await page.waitForTimeout(50);
257
257
  }
258
- throw new Error("Timed out waiting for the selected MCP App scenario to become current and ready. Inspect ads_status and ads://project/build.");
258
+ throw new Error("Timed out waiting for the selected preview scenario to become current and ready. Inspect ads_status and ads://project/build.");
259
259
  } catch (error) {
260
260
  boundary ??= {
261
261
  category: requests.length ? "transport" : "runner",
package/docs/ADS.md CHANGED
@@ -50,7 +50,7 @@ Websites and MCP Apps consume the same public components, patterns, controllers,
50
50
  tokens and styles. Application adapters own routing, stores, MCP communication,
51
51
  tool-result mapping, mounting and serving. ADS's own MCP server supplies
52
52
  design-system development, inspection and review. Its showcase exercises the
53
- real UI inside an MCP App; normal application checks verify website integration.
53
+ real UI inside an isolated preview; normal application checks verify website integration.
54
54
  Verification claims remain scoped to the states and environments actually tested.
55
55
 
56
56
  Framework choice belongs to the receiving project. Linaria is required for the
@@ -60,10 +60,10 @@ for checked formats and gaps.
60
60
 
61
61
  ## Showcase contract
62
62
 
63
- The showcase is a minimal shell plus an MCP client and Apps host, shipped with
64
- ADS tooling. It discovers brand/token/component/pattern/composition
65
- scenarios from MCP tool results, invokes preview tools and responds to resource
66
- notifications. The project does not author a second catalogue or browser app.
63
+ The local showcase is a minimal HTTP shell shipped with ADS tooling. It
64
+ discovers brand/token/component/pattern/composition scenarios, invokes scoped
65
+ preview actions and receives build reports through SSE from the shared ADS
66
+ engine. Agents and external MCP Apps retain their MCP interfaces. The project does not author a second catalogue or browser app.
67
67
 
68
68
  `ads mcp` starts the loopback website alongside stdio. Open the URL returned by
69
69
  `ads_status`. Without an agent connection, `ads showcase` starts the same runtime
@@ -74,8 +74,10 @@ and the App slot. The layout inspector draws selected bounds, grid tracks, gaps,
74
74
  padding, margins and mini-unit squares from actual rendered geometry inside the
75
75
  App, following size and scroll position. It draws tracks only where grid tracks
76
76
  exist. `ads_capture` can select the same layers through its optional `guides`
77
- argument; omitted guides leave screenshots clean. The browser host uses a separate-origin sandbox proxy; project runtimes,
78
- styles, fonts and UI execute/apply only in the App iframe. Components, patterns,
77
+ argument; omitted guides leave screenshots clean. The local browser uses one
78
+ persistent opaque preview iframe on a separate origin; external MCP Apps use
79
+ their host sandbox. Project runtimes, styles, fonts and UI remain inside the
80
+ preview frame. Components, patterns,
79
81
  token values, scenarios, fixtures and their Linaria styles remain project-owned.
80
82
  App presentation comes from the selected compiled scenario; reusable review layouts live in development-only `review/` through its separate public entry. Do not recreate
81
83
  production widgets inside the client or scenario.
@@ -8,7 +8,7 @@ patterns, token values, and branding.
8
8
  ADS manages project-owned UI for websites and MCP Apps. Both use the same public
9
9
  components, patterns, controllers, tokens and styles. The consuming application
10
10
  supplies data, actions, mounting and integration, including serving its MCP Apps.
11
- The ADS showcase renders those real implementations inside MCP Apps; its previews
11
+ The ADS showcase renders those real implementations in isolated HTTP frames; its previews
12
12
  and registered checks provide evidence for the exercised states and conditions.
13
13
  Normal application checks verify website integration.
14
14
 
@@ -460,11 +460,11 @@ visual scenario. Static registration is separate from current passing evidence.
460
460
 
461
461
  Manifests, checks, scenarios and fixtures are development inputs; production
462
462
  imports only actual components/controllers and their styles. Browser checks can
463
- exercise the real MCP App. React development StrictMode uses a project development
463
+ exercise the real isolated preview. React development StrictMode uses a project development
464
464
  harness, since production previews do not replay those effects. The
465
465
  [behavior contract](BEHAVIORS.md) defines profiles, execution and evidence freshness.
466
466
 
467
- The normal compiled import graph delivers controller dependencies through MCP
467
+ The normal compiled import graph delivers controller dependencies through HTTP or MCP
468
468
  resources. There is no eager global controller registry. ESM splitting and selected
469
469
  asset loading remain in place; tree shaking depends on actual imports, exports and
470
470
  side effects, rather than the controller directory name.
@@ -509,35 +509,33 @@ resolve to normal accepted source after promotion.
509
509
  The [draft guide](../skills/ads-designer/references/drafts.md) defines lifecycle,
510
510
  completion requirements, build integration and recovery.
511
511
 
512
- Humans and coding agents inspect the same project through MCP. The showcase is
513
- **a minimal shell plus an MCP client and Apps host**, shipped as development
514
- tooling. Its header, section tabs (Brand, shown first when the project previews its
515
- artwork, then Tokens, Icons when the project has a glyph set, Components, Patterns and
516
- Composition), collapsible left menu,
517
- grid overlay and theme switches and preview area stay neutral. Through the App's host
518
- context, the grid inspector highlights actual computed grid tracks inside the rendered
519
- widgets, following each container's padding, gaps, size and scroll position. The client discovers entries, invokes tools, forwards App
520
- resource requests and subscribes to changes. It contains no project UI catalogue
521
- or implementation imports.
522
-
523
- The server supplies catalogues, the token and brand views it builds, source guides, preview Apps,
524
- build status and diagnostics. Agents connect over stdio; the browser uses a
525
- loopback HTTP MCP endpoint in the same runtime. Both share ADS's managed Bun
526
- preview compiler. Starting MCP starts the website; a browser-only command starts the same
527
- runtime without stdio. Shutdown closes the website, connections and compiler.
528
- Local and external compatible hosts load the same reusable preview App. The
529
- browser host uses a separate-origin sandbox proxy around its opaque App iframe.
530
- Project JavaScript, styles, fonts and UI run only inside that App; the outer
531
- shell forwards resource bytes without applying project styles or executing its
532
- runtime. This keeps the host neutral while compositions retain their full skin.
533
-
534
- Alternative HTTP preview asset delivery is deferred and excluded from this
535
- release. Its bounded local proof improved first display, but showed no meaningful
536
- verified-edit or acceptance gain and no clear process-memory improvement. Frame
537
- cleanup needed an additional lifetime connection; broader framework, worker/Wasm,
538
- resource-limit and capture/evidence coverage remains unfinished. External MCP
539
- Apps still require the existing adapter. The released path therefore keeps MCP
540
- resource delivery, with persistent-frame updates and bounded manifest reuse/deltas.
512
+ Humans and coding agents inspect the same project through one ADS runtime.
513
+ The local showcase is a minimal HTTP shell. It discovers navigation and scoped
514
+ preview actions through a narrow JSON adapter over the same services used by
515
+ MCP. Agents and external MCP Apps retain MCP tools/resources; the HTTP browser
516
+ bundle contains no MCP SDK or JSON-RPC implementation. The shell has no project
517
+ implementation imports and does not execute project code.
518
+
519
+ The local preview is one persistent opaque iframe on a separate loopback origin,
520
+ without the extra MCP Apps proxy frame. Checked manifests use bounded revision
521
+ reuse/deltas; immutable asset URLs refer to pinned, authorized graph bytes, never
522
+ filesystem paths. Ordinary modules, CSS, fonts and images load over HTTP. Worker
523
+ scripts and modules referring to them use verified Blob URLs because the opaque
524
+ sandbox cannot directly create workers from another origin. External MCP Apps
525
+ continue to use the existing resource adapter and sandbox proxy.
526
+
527
+ HTTP build reports arrive over SSE. Connect/reconnect and visibility resume
528
+ reconcile discovery and scoped build state; there is no periodic HTTP status
529
+ poll. Interrupted connections mark retained previews potentially stale. Frame
530
+ capabilities have a separate lifetime connection, a bounded reconnect grace,
531
+ and immediate retirement on explicit close, scope removal or shutdown. The
532
+ [HTTP design and measurements](HTTP-SHOWCASE-POC.md) record limits and historical
533
+ comparisons. Captures and verification use the default local HTTP host while
534
+ preserving exact viewport, revision, readiness and publication gates.
535
+
536
+ Starting MCP starts the website; browser-only showcase starts the same runtime
537
+ without stdio. All modes share the managed Bun compiler. Shutdown closes the
538
+ website, streams, frame capabilities, connections and compiler.
541
539
 
542
540
  The ADS host gives inline App documents an `about:srcdoc` base when the App
543
541
  provides no explicit base URL. Fragment links then stay inside their own document
@@ -554,8 +552,8 @@ handlers. Hosts outside ADS choose their own sandbox and CSP permissions.
554
552
 
555
553
  ADS's Bun preview compiler publishes a versioned dependency graph: shared runtime and
556
554
  foundation assets, plus independently addressable scenario modules. Inside the
557
- App, a resource loader obtains the selected dependency closure through MCP,
558
- verifies its content and mounts it using the project's framework adapter. Native
555
+ preview, the selected dependency closure loads from checked HTTP assets or
556
+ verified MCP resources and mounts it using the project's framework adapter. Native
559
557
  ES modules preserve shared runtime identity, cycles and live bindings. Switching
560
558
  scenarios unmounts the previous view while keeping unchanged dependencies cached.
561
559
  Persistence is a host lifecycle choice; a new external widget loads the same
@@ -569,7 +567,7 @@ their IDs and caches. The App still verifies the digest of the final bytes and
569
567
  rejects any identity collision without partially registering the new graph.
570
568
 
571
569
  The showcase's resource bridge can recover a transient fetch failure with at most
572
- three read attempts and bounded backoff. This applies only to `resources/read`;
570
+ three read attempts and bounded backoff. This applies only to resource reads;
573
571
  tool calls, assertions and whole checks are never replayed. Cancellation,
574
572
  HTTP/protocol/content errors and integrity failures remain failures. Browser
575
573
  diagnostics record retries, and verification retains recovered startup reads in
@@ -586,10 +584,11 @@ Ordinary shutdown removes owned session output while retaining that cache.
586
584
 
587
585
  ```mermaid
588
586
  flowchart LR
589
- Host[Minimal host: navigation and MCP client] --> Proxy[Separate-origin sandbox proxy]
590
- Proxy --> App[Opaque App: loader and project preview]
591
- App -->|resource reads via bridge| MCP[ADS MCP server]
592
- MCP --> Graph[Compiled graph: runtime, CSS, fonts, scenarios]
587
+ Host[Local HTTP showcase] --> Frame[Persistent opaque preview]
588
+ Frame -->|checked asset URLs| HTTP[Scoped HTTP delivery]
589
+ External[External MCP App] -->|resource reads| MCP[MCP adapter]
590
+ HTTP --> Graph[Shared checked graph]
591
+ MCP --> Graph
593
592
  ```
594
593
 
595
594
  The shell belongs to tooling. Components, patterns, design values, scenario inputs
@@ -941,6 +940,14 @@ Standalone compilation writes `.ds/build-status.json`. Managed compilation uses
941
940
  `ADS_MCP_BUILD_STATUS` and `ADS_MCP_BUILD_SESSION` launch variables. Session identity
942
941
  separates revisions across restarts; source and artifact digests establish
943
942
  freshness independently of process state.
943
+ Those source digests come from one content walk per read-only request: a tool
944
+ call such as `ads_show_scenario` or `ads_status`, an accepted-project resource read
945
+ (including the showcase's HTTP reads), one observation pass, or one preview wait.
946
+ Discovery, the registry and build status within that request share it. While a
947
+ request waits for a build, it walks again only after the compiler's status report
948
+ changes. Discovery and capture fence long work with a fresh walk. Mutations, acceptance,
949
+ validation, captures and draft resources keep their own fresh reads. Compiler
950
+ children, timers and shared discovery tasks start outside any request's revision.
944
951
  Compilation remains necessary for TSX and Linaria;
945
952
  there is one preview pipeline with automatic updates.
946
953
 
@@ -963,14 +970,14 @@ semantics; choosing a framework does not install one into the tooling host.
963
970
 
964
971
  The capture unit is a registered, independently mountable scenario or one of its
965
972
  project-declared `captureTargets`. Components, patterns, compositions and token
966
- previews use the same real MCP App, fixtures and adapter as interactive review.
973
+ previews use the same real isolated frame, fixtures and adapter as interactive review.
967
974
  Shared controllers/hooks need a visible demonstration. Capture introduces no
968
975
  tool-owned component templates, styling or fixture inference.
969
976
 
970
977
  ADS owns isolated preview hosting, App readiness and an owned Playwright process;
971
978
  the receiving project supplies Playwright and its installed browser. The capture
972
- host is the existing minimal MCP client/bridge with navigation hidden, giving the
973
- sandboxed App the requested viewport. Project runtime, fonts and styles remain
979
+ host is the HTTP showcase with navigation hidden, giving the
980
+ isolated preview the requested viewport. Project runtime, fonts and styles remain
974
981
  inside the App resource graph. The image excludes showcase chrome.
975
982
 
976
983
  Captures exist only when requested. `ads_capture` replaces current and removes any
@@ -1411,3 +1418,10 @@ transformations, illustration meaning and optical quality remain outside this
1411
1418
  image guard. Assets remain shared inputs for change selection, so their edits
1412
1419
  widen verification to consuming UI. Browser measurements are not included in
1413
1420
  analysis/acceptance performance benchmarks.
1421
+
1422
+ ## HTTP showcase delivery
1423
+
1424
+ The 0.4.5 local showcase uses HTTP for discovery, status, events, preview actions
1425
+ and checked assets. Agents retain MCP against the same engine. See the
1426
+ [scope, endpoint boundary and proof history](HTTP-SHOWCASE-POC.md). The persistent
1427
+ preview iframe preserves isolation and viewport behavior.