@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.
- package/README.md +11 -8
- package/dist/capture.mjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/input-scope.mjs +57 -0
- package/dist/mcp/apps.mjs +7 -1
- package/dist/mcp/build-status.mjs +12 -3
- package/dist/mcp/drafts.mjs +7 -0
- package/dist/mcp/mutations.mjs +1 -1
- package/dist/mcp/preview-http.bundle.js +7 -0
- package/dist/mcp/preview-http.mjs +148 -0
- package/dist/mcp/preview-watch.mjs +14 -3
- package/dist/mcp/preview-widget.bundle.js +20 -20
- package/dist/mcp/resource-loader.js +1 -1
- package/dist/mcp/sandbox-host.mjs +6 -1
- package/dist/mcp/server.mjs +49 -9
- package/dist/mcp/showcase-host.mjs +56 -5
- package/dist/mcp/showcase-http.mjs +66 -0
- package/dist/preview-inputs.mjs +7 -2
- package/dist/scenario-registry.mjs +2 -2
- package/dist/scenarios-compiler.mjs +19 -1
- package/dist/showcase/client.bundle.js +54 -54
- package/dist/showcase/comparison.js +15 -12
- package/dist/showcase/connection.js +10 -0
- package/dist/showcase/http-client.bundle.js +9 -0
- package/dist/showcase/http-connection.js +86 -0
- package/dist/showcase/http-preview.js +81 -0
- package/dist/showcase-http-routes.mjs +31 -0
- package/dist/skills/README.md +2 -2
- package/dist/skills/ads-designer/references/captures.md +1 -1
- package/dist/skills/ads-designer/references/runtimes.md +18 -2
- package/dist/skills/ads-designer/references/workflows.md +16 -0
- package/dist/skills/ads-import/references/captures.md +1 -1
- package/dist/skills/ads-import/references/runtimes.md +18 -2
- package/dist/skills/ads-import/references/workflows.md +16 -0
- package/dist/skills/ads-migrate/SKILL.md +1 -0
- package/dist/skills/ads-migrate/references/0.4.3-to-0.4.4.md +9 -0
- package/dist/skills/ads-migrate/references/0.4.4-to-0.4.5.md +72 -0
- package/dist/skills/ads-port/references/captures.md +1 -1
- package/dist/skills/ads-port/references/runtimes.md +18 -2
- package/dist/skills/ads-port/references/workflows.md +16 -0
- package/dist/stage-timing.cjs +3 -2
- package/dist/validation-inputs.mjs +21 -3
- package/dist/verification/browser.mjs +2 -2
- package/docs/ADS.md +9 -7
- package/docs/ARCHITECTURE.md +56 -42
- package/docs/CHANGELOG.md +45 -25
- package/docs/GUIDE.md +15 -8
- package/docs/HTTP-SHOWCASE-POC.md +397 -0
- package/docs/MCP.md +63 -9
- package/docs/benchmarks/http-showcase-optimized.json +1879 -0
- package/docs/benchmarks/http-showcase-profile.json +308 -0
- package/docs/benchmarks/http-showcase.json +3069 -0
- package/package.json +1 -1
package/docs/CHANGELOG.md
CHANGED
|
@@ -2,63 +2,83 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
-
## 0.4.
|
|
5
|
+
## 0.4.6
|
|
6
6
|
|
|
7
7
|
<!-- ads-local-tests:start -->
|
|
8
|
-
Local verification: **
|
|
9
|
-
Tested commit: `
|
|
10
|
-
Completed 2026-11-
|
|
8
|
+
Local verification: **883/883 passed** with `bun run test`.
|
|
9
|
+
Tested commit: `bb29264bf42ad07748f8c70097d76715af87b113`; Bun 1.4.4.
|
|
10
|
+
Completed 2026-11-11T15:06:17.009Z (619 seconds).
|
|
11
11
|
|
|
12
12
|
<!-- ads-local-test-proof
|
|
13
13
|
{
|
|
14
14
|
"schema": 3,
|
|
15
|
-
"version": "0.4.
|
|
16
|
-
"commit": "
|
|
17
|
-
"sourceSha256": "
|
|
15
|
+
"version": "0.4.6",
|
|
16
|
+
"commit": "bb29264bf42ad07748f8c70097d76715af87b113",
|
|
17
|
+
"sourceSha256": "4a6b98cb086f3ede9f1986b9dece7e997a04c747dfc27a63d70c2af2b94c18a4",
|
|
18
18
|
"command": "bun run test",
|
|
19
19
|
"result": "pass",
|
|
20
|
-
"tests":
|
|
21
|
-
"pass":
|
|
20
|
+
"tests": 883,
|
|
21
|
+
"pass": 883,
|
|
22
22
|
"fail": 0,
|
|
23
23
|
"skipped": 0,
|
|
24
24
|
"groups": [
|
|
25
25
|
{
|
|
26
26
|
"name": "unit",
|
|
27
|
-
"tests":
|
|
28
|
-
"pass":
|
|
27
|
+
"tests": 94,
|
|
28
|
+
"pass": 94,
|
|
29
29
|
"fail": 0,
|
|
30
30
|
"skipped": 0,
|
|
31
|
-
"reportSha256": "
|
|
31
|
+
"reportSha256": "6f9b3efeb096563dc697bf3205eb1900da7bbe7a19a57ba7cdd4b59aa8ab9664"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"name": "integration",
|
|
35
|
-
"tests":
|
|
36
|
-
"pass":
|
|
35
|
+
"tests": 628,
|
|
36
|
+
"pass": 628,
|
|
37
37
|
"fail": 0,
|
|
38
38
|
"skipped": 0,
|
|
39
|
-
"reportSha256": "
|
|
39
|
+
"reportSha256": "ebfd00b27d810cf0490cfb6f56001be00b04452cf3ed67ccf6c862f4102fe538"
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"name": "browser",
|
|
43
|
-
"tests":
|
|
44
|
-
"pass":
|
|
43
|
+
"tests": 161,
|
|
44
|
+
"pass": 161,
|
|
45
45
|
"fail": 0,
|
|
46
46
|
"skipped": 0,
|
|
47
|
-
"reportSha256": "
|
|
47
|
+
"reportSha256": "cd13d1dcd9d666e6f3e8121f91685413029d371f14ee07186067ef0e872f35e2"
|
|
48
48
|
}
|
|
49
49
|
],
|
|
50
|
-
"testOverrides": {
|
|
51
|
-
"ADS_INTEGRATION_WORKERS": "1",
|
|
52
|
-
"ADS_BROWSER_WORKERS": "1"
|
|
53
|
-
},
|
|
50
|
+
"testOverrides": {},
|
|
54
51
|
"bun": "1.4.4",
|
|
55
|
-
"completedAt": "2026-11-
|
|
56
|
-
"durationMs":
|
|
57
|
-
"logSha256": "
|
|
52
|
+
"completedAt": "2026-11-11T15:06:17.009Z",
|
|
53
|
+
"durationMs": 618512,
|
|
54
|
+
"logSha256": "a471ffb30a031272bca4f20fd6a919a77fd341ee6e721cd1e2b8b8dc5fdb8c29"
|
|
58
55
|
}
|
|
59
56
|
-->
|
|
60
57
|
<!-- ads-local-tests:end -->
|
|
61
58
|
|
|
59
|
+
- Preview and explorer requests reuse one content revision. A verified
|
|
60
|
+
`ads_show_scenario` (and the showcase's `/api/previews`) used to walk and hash
|
|
61
|
+
the project's inputs six to eight times; it now walks them once. Explorer and
|
|
62
|
+
build reads, and each one-second observation pass, also walk once. Freshness
|
|
63
|
+
stays content-based: a wait walks again when the compiler reports a new build,
|
|
64
|
+
and discovery/capture fence long work with a fresh walk.
|
|
65
|
+
- `ADS_PROFILE_STAGES` also records `build-status`, `preview-source-revision`,
|
|
66
|
+
`preview-ensure` and `showcase-api:*` stages, and labels each input walk with
|
|
67
|
+
its request scope.
|
|
68
|
+
- Projects need no migration: components, tokens, scenarios and configuration are unchanged.
|
|
69
|
+
|
|
70
|
+
## 0.4.5
|
|
71
|
+
|
|
72
|
+
- Make the local showcase use HTTP by default for discovery, scoped preview actions and checked assets. Keep MCP tools, resources and embedded Apps supported by the same engine; remove the experimental activation requirement.
|
|
73
|
+
- Deliver build reports through SSE, reconnect and reconcile missed updates, and refresh current state when a tab becomes visible. Retained previews show a stale-connection warning; no periodic HTTP browser status polling is required.
|
|
74
|
+
- Combine checked manifest preparation with bounded asset publication, reuse known revisions and pin asset reads to the authorized graph. Keep persistent opaque preview frames and verified Blob loading for worker dependencies.
|
|
75
|
+
- Use the HTTP showcase for captures and browser verification, retaining viewport, target, guide-layer, exact-revision and publication guarantees. Update browser automation for the single preview frame.
|
|
76
|
+
- Release a draft compiler that is still starting when its workspace is retired, without recreating deleted output or reporting a spurious background failure.
|
|
77
|
+
- Prove React and Preact product widgets through an independent MCP server and client, including interaction, themes, fonts and artwork; reject unrelated component code, CSS and assets in the served bundle.
|
|
78
|
+
- Document the delivery architecture and add the 0.4.4-to-0.4.5 migration guide. Project components, tokens, scenarios and configuration require no migration.
|
|
79
|
+
|
|
80
|
+
## 0.4.4
|
|
81
|
+
|
|
62
82
|
- Load the configured project stylesheet in generated Token and Brand previews. Track inlined CSS import dependencies by contents so same-size/same-time token edits refresh correctly; include Preact refresh helpers in the private compiler graph.
|
|
63
83
|
- Stop draft watcher reconciliation when its controller closes, and skip previews retired while another draft refreshes.
|
|
64
84
|
- Update watched previews through a private incremental module graph inside the existing isolated iframe. Preserve state and focus for compatible React/Preact edits, refresh styles and lazy branches, and reopen safely for incompatible updates or rejected revisions. Keep full Bun builds and native acceptance gates.
|
package/docs/GUIDE.md
CHANGED
|
@@ -153,6 +153,12 @@ project's existing build:
|
|
|
153
153
|
result. Static source checks do not establish complete extraction or
|
|
154
154
|
unused-style removal.
|
|
155
155
|
|
|
156
|
+
For product MCP Apps, make the widget's entry the production bundle root and
|
|
157
|
+
import the needed public design-system UI by name. The app's own MCP server
|
|
158
|
+
serves that built widget; it does not need ADS's server or showcase. Check both
|
|
159
|
+
runtime code and emitted CSS/assets for unrelated owners. See the
|
|
160
|
+
[product widget integration proof](MCP.md#product-widgets-and-payload-scope).
|
|
161
|
+
|
|
156
162
|
The [starter's dependencies](https://github.com/reqvire-org/ads/blob/main/starters/shared/package.json),
|
|
157
163
|
[entry build](https://github.com/reqvire-org/ads/blob/main/starters/shared/vite.config.ts),
|
|
158
164
|
and [native mounts](https://github.com/reqvire-org/ads/tree/main/starters)
|
|
@@ -264,7 +270,7 @@ Initialization:
|
|
|
264
270
|
- Adds the same checks and generation to `prebuild:showcase` when a standalone
|
|
265
271
|
`build:showcase` script exists, preserving its existing hook and build command.
|
|
266
272
|
- Adds `dev:showcase` as `ads showcase` when absent. An existing run command is
|
|
267
|
-
preserved; deliberately switch it when migrating to the built-in
|
|
273
|
+
preserved; deliberately switch it when migrating to the built-in showcase.
|
|
268
274
|
- Adds `ads-mcp` with guarded editing enabled and `ads-read-mcp` with editing
|
|
269
275
|
disabled, preserving existing scripts with those names. Both start the showcase.
|
|
270
276
|
- Appends `.ds/` to the project's ignore file and supplies a framework mount
|
|
@@ -824,7 +830,7 @@ owners' own ones unless `acceptance.behavior` is `false`.
|
|
|
824
830
|
|
|
825
831
|
## Showcase
|
|
826
832
|
|
|
827
|
-
ADS ships a minimal browser shell
|
|
833
|
+
ADS ships a minimal HTTP browser shell with isolated previews. `ads mcp` serves the
|
|
828
834
|
website alongside its stdio connection; `ads showcase` starts the same runtime
|
|
829
835
|
for browser-only use. Run commands from the project root. Open the printed URL,
|
|
830
836
|
or use `ads_status.showcaseUrl` from an already connected runtime: it is the URL
|
|
@@ -832,15 +838,14 @@ and port of the showcase that server is running. An available loopback port is
|
|
|
832
838
|
selected by default; `--port 4185` selects a fixed port.
|
|
833
839
|
`ads mcp --no-showcase` keeps a headless stdio server.
|
|
834
840
|
|
|
835
|
-
The
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
and refreshes the active scenario in the same App after a successful build.
|
|
841
|
+
The browser reads catalogues and opens previews through scoped HTTP services
|
|
842
|
+
backed by the same engine as MCP. SSE events refresh menus and build state;
|
|
843
|
+
the selected scenario updates inside its persistent iframe.
|
|
839
844
|
Compatible React/Preact edits retain component state, typed values and focus.
|
|
840
845
|
Edits that change hook signatures or module boundaries can reset state; failed
|
|
841
846
|
checks restore verified output. Errors identify
|
|
842
847
|
stale retained output. Its neutral header and left pane align and collapse
|
|
843
|
-
together. Themes flow through the
|
|
848
|
+
together. Themes flow through the preview host context. No project catalogue pages
|
|
844
849
|
or direct component imports are used by this client.
|
|
845
850
|
|
|
846
851
|
The project owns implementations, colocated scenarios/fixtures, foundation
|
|
@@ -962,7 +967,9 @@ Preact starter under ignored `.ds/playground/`. `bun run dev:react` selects Reac
|
|
|
962
967
|
The design source is `starters/shared/`; restart after editing it to generate a new
|
|
963
968
|
playground snapshot. `bun run build:showcase` compiles that starter’s scenarios.
|
|
964
969
|
The playground and receiving projects use the same initializer and packaged source.
|
|
965
|
-
The built-in
|
|
970
|
+
The built-in browser reads discovery and checked assets over HTTP and receives
|
|
971
|
+
build reports through SSE. MCP agents and embedded Apps retain their existing
|
|
972
|
+
interfaces. No delivery flag or project migration is required. Existing custom showcases
|
|
966
973
|
are preserved by init; replace their run command deliberately when migrating.
|
|
967
974
|
|
|
968
975
|
Run core and registered project checks before preview compilation, alongside
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
# HTTP showcase design and proof history
|
|
2
|
+
|
|
3
|
+
The HTTP showcase is being promoted to the 0.4.5 release candidate. It uses the
|
|
4
|
+
same compiler/checker/draft engine as 0.4.4 and remains separate from V3 assets,
|
|
5
|
+
source emission and iframe-removal proposals. Historical experiment results
|
|
6
|
+
below are retained with their original limitations; the latest matched results
|
|
7
|
+
are in [Optimized HTTP results](#optimized-http-results-2026-11-10).
|
|
8
|
+
|
|
9
|
+
Release preparation: HTTP is now the default local showcase. The initial 14
|
|
10
|
+
compatibility checks passed, including real guide/current/draft captures. The
|
|
11
|
+
separate React/Preact product MCP widget proof and both MCP/HTTP draft workflows
|
|
12
|
+
also pass. Draft retirement during asynchronous compiler startup now releases
|
|
13
|
+
the builder without recreating its workspace. The final complete analysis suite
|
|
14
|
+
passes its existing comparison gates; the measurements and earlier failed runs
|
|
15
|
+
are recorded below. Full-suite evidence is generated in the
|
|
16
|
+
[release changelog](CHANGELOG.md#045) by `bun run release:verify` and checked by
|
|
17
|
+
`bun run release:proof`. This document does not establish that 0.4.5 has been
|
|
18
|
+
published.
|
|
19
|
+
|
|
20
|
+
## Release analysis verification, 2026-11-11
|
|
21
|
+
|
|
22
|
+
The complete serial suite measured committed engine `37001f9` on Bun 1.4.4,
|
|
23
|
+
Linux x64, Intel Core Ultra 9 275HX, with the existing sampled process-tree
|
|
24
|
+
memory limit and a 3 GiB systemd scope cap. The recorded source digest is
|
|
25
|
+
`aee4b34e61629150f58abf8f29d8f9f5934a0f805b60c8442def7e3e852b249d`.
|
|
26
|
+
The [canonical report](../scripts/benchmarks/analysis/results/latest.json)
|
|
27
|
+
includes three trials for each size, spatial, branch, capture and composed
|
|
28
|
+
contrast scenarios. Rendering and registered behavior execution are excluded.
|
|
29
|
+
|
|
30
|
+
| Check, median / observed p95 | 8 owners | 24 owners | 8 owners, spatial |
|
|
31
|
+
| --- | ---: | ---: | ---: |
|
|
32
|
+
| Warm check | 90.5 / 113.1 ms | 141.2 / 170.7 ms | 101.6 / 123.0 ms |
|
|
33
|
+
| Source edit | 170.4 / 214.9 ms | 279.1 / 296.8 ms | 171.9 / 216.1 ms |
|
|
34
|
+
| Import edit | 158.4 / 190.6 ms | 257.0 / 312.7 ms | 161.7 / 194.1 ms |
|
|
35
|
+
| Audit selection | 29.2 / 50.0 ms | 39.6 / 45.0 ms | 32.8 / 44.8 ms |
|
|
36
|
+
| Draft acceptance | 360.3 / 401.6 ms | 547.1 / 615.9 ms | 372.0 / 426.7 ms |
|
|
37
|
+
| Draft rejection | 327.8 / 369.5 ms | 469.9 / 519.8 ms | 323.3 / 372.0 ms |
|
|
38
|
+
| Sampled process-tree peak RSS | 792.2 MiB | 589.4 MiB | 821.9 MiB |
|
|
39
|
+
|
|
40
|
+
This final run passed the unchanged timing and memory comparison gates. Earlier
|
|
41
|
+
complete runs failed: the first had timing regressions while unrelated Rust
|
|
42
|
+
builds were active, and both had 24-owner RSS peaks around 822–830 MiB, exceeding
|
|
43
|
+
the existing 782 MiB comparison limit. Those results are retained locally in
|
|
44
|
+
`output/http-release-analysis-failed.json` and
|
|
45
|
+
`output/http-release-analysis-repeat.json`; they were not committed as baselines.
|
|
46
|
+
The unchanged control passed at 594 MiB, with a focused repeat at 609 MiB.
|
|
47
|
+
Further diagnostic runs of the startup fix varied from 665 to 863 MiB. A
|
|
48
|
+
throwing diagnostic at the compiler startup entry point confirmed that this
|
|
49
|
+
benchmark does not invoke the changed startup body. The transient RSS cause is
|
|
50
|
+
not established. The passing final run does not erase that variation or establish
|
|
51
|
+
a memory improvement. No thresholds or production gates were relaxed.
|
|
52
|
+
|
|
53
|
+
## Architecture
|
|
54
|
+
|
|
55
|
+
The browser loads a dedicated HTTP shell bundle, without the MCP client or Apps
|
|
56
|
+
SDK. Ordinary HTTP endpoints provide discovery, status, icons, tokens, preview
|
|
57
|
+
selection and draft preview selection. An event stream reports changes. Preview
|
|
58
|
+
manifests retain known-revision/delta reuse. Compiled modules, styles, fonts and
|
|
59
|
+
images load through scoped, immutable HTTP URLs.
|
|
60
|
+
|
|
61
|
+
Agents retain the existing MCP tools. The HTTP adapter calls the same in-process
|
|
62
|
+
services and schema validation used by those tools; it does not make an MCP
|
|
63
|
+
connection or send JSON-RPC. There is one compiler, checker and draft engine.
|
|
64
|
+
The adapter exposes only actions already used by the browser. It does not add
|
|
65
|
+
browser controls for accepting or editing source, or an unrestricted tool-call
|
|
66
|
+
endpoint. Draft creation/editing/acceptance by agents continues through MCP.
|
|
67
|
+
|
|
68
|
+
Each preview remains in a persistent opaque iframe on the separate preview
|
|
69
|
+
origin. HTTP replaces the browser protocol and resource delivery, not isolation,
|
|
70
|
+
viewport behavior or hot-update state preservation. The extra MCP Apps hosting
|
|
71
|
+
frame is absent. Accepted and candidate previews have separate instances.
|
|
72
|
+
|
|
73
|
+
Workers also arrive over HTTP. Because browser Worker constructors reject direct
|
|
74
|
+
HTTP URLs from an opaque frame, the loader verifies the original worker bytes
|
|
75
|
+
and creates local Blob URLs for workers and modules that refer to them. Other
|
|
76
|
+
assets use native HTTP. Thus “HTTP” means no browser MCP traffic, not zero Blob
|
|
77
|
+
URLs. Removing the preview frame is a separate experiment.
|
|
78
|
+
|
|
79
|
+
## Endpoint boundary
|
|
80
|
+
|
|
81
|
+
| HTTP operation | Purpose |
|
|
82
|
+
| --- | --- |
|
|
83
|
+
| `GET /api/explorer` | Navigation, capabilities, draft references and status |
|
|
84
|
+
| `GET /api/build`, `/api/icons`, `/api/tokens`, `/api/scenarios`, `/api/drafts` | Explicit browser reads |
|
|
85
|
+
| `GET /api/previews/{manifest,live}?from=<revision>` | Full, delta or unchanged preview graph |
|
|
86
|
+
| `POST /api/previews` | Select a discovered scenario; preserve compiled/verified semantics |
|
|
87
|
+
| `POST /api/drafts/<id>/preview` | Prepare or select an isolated draft preview |
|
|
88
|
+
| `GET /api/drafts/<id>/<read>` | The corresponding read within that draft scope |
|
|
89
|
+
| `GET /api/events` | SSE build reports and catalogue notifications; reconnect triggers fresh discovery and scoped status reads |
|
|
90
|
+
| `POST /preview-http` | Open, prepare a checked graph with its assets, reconcile a retained instance, and retire it |
|
|
91
|
+
|
|
92
|
+
Direct draft showcase URLs under `/draft/<id>/` bind these services to the draft
|
|
93
|
+
workspace. The existing loopback host/origin guard applies. Routes reject
|
|
94
|
+
arbitrary files, nested draft scopes and generic tool dispatch. Request
|
|
95
|
+
cancellation reaches the shared services. Shutdown closes streams and requests.
|
|
96
|
+
|
|
97
|
+
The preview registry pins verified bytes for each active capability before
|
|
98
|
+
publication. Bounds: 16 frames, 4096 assets and 64 MiB retained per frame; pending
|
|
99
|
+
unleased frames expire after 60 seconds (checked every 10 seconds). A lost
|
|
100
|
+
lifetime stream permits reconnection within that grace period; explicit close,
|
|
101
|
+
scope retirement and server shutdown release assets immediately. Peer prefetch keeps the same 16 MiB/256-resource
|
|
102
|
+
bound as the existing loader. Slow event consumers are disconnected; at most 64
|
|
103
|
+
event streams are retained.
|
|
104
|
+
|
|
105
|
+
`prepare` replaces the separate browser manifest read and publication round trip.
|
|
106
|
+
The server captures one authorized graph, pins its reachable assets against that
|
|
107
|
+
graph and returns a full/delta/unchanged manifest with its HTTP base. A superseded
|
|
108
|
+
requested revision returns a changed result without publishing its assets.
|
|
109
|
+
Cancellation and asset digest/size checks remain binding. Each frame retains one
|
|
110
|
+
metadata graph for deltas; asset retention keeps the bounds above.
|
|
111
|
+
|
|
112
|
+
The HTTP browser does not poll build status periodically. It reads on selection,
|
|
113
|
+
receives subsequent reports through SSE, and reads fresh catalogue/status after
|
|
114
|
+
reconnection. Each accepted/draft frame reconciles its own scope. Returning to a
|
|
115
|
+
hidden preview also reconciles status. EventSource handles stream reconnection;
|
|
116
|
+
while disconnected, the UI labels the retained preview as potentially stale.
|
|
117
|
+
An expired frame capability reopens through the normal preview lifecycle.
|
|
118
|
+
Source reconciliation still runs on the server, covering missed filesystem
|
|
119
|
+
notifications. The MCP comparison path retains its existing polling behavior.
|
|
120
|
+
|
|
121
|
+
## Running and migration
|
|
122
|
+
|
|
123
|
+
Build with `bun run build`, then use the normal `ads showcase` or `ads mcp`
|
|
124
|
+
command. HTTP is the default; no `ADS_PROOF_HTTP_PREVIEW` environment variable or
|
|
125
|
+
`delivery=http` query parameter is required. The internal `delivery=blob` or
|
|
126
|
+
`delivery=mcp` comparison route retains the MCP browser for regression tests.
|
|
127
|
+
Agents and external MCP Apps continue using MCP normally.
|
|
128
|
+
|
|
129
|
+
No component, token, scenario, framework or project configuration migration is
|
|
130
|
+
required. Keep `.ds` evidence and tracked drafts. Follow the
|
|
131
|
+
[0.4.4 to 0.4.5 migration guide](../skills/ads-migrate/references/0.4.4-to-0.4.5.md)
|
|
132
|
+
to upgrade and restart the appropriate runtime.
|
|
133
|
+
|
|
134
|
+
## Proof and decision
|
|
135
|
+
|
|
136
|
+
- [x] React and Preact edits, state/focus/selection preservation, rejected edit
|
|
137
|
+
recovery, visited views, workers and WebAssembly, with browser `/mcp` blocked.
|
|
138
|
+
- [x] Separate HTTP bundle with no MCP transport or protocol implementation.
|
|
139
|
+
- [x] Scoped asset publication, integrity failures, retired capabilities and
|
|
140
|
+
abrupt-frame cleanup.
|
|
141
|
+
- [x] Draft comparisons, dependency changes, acceptance notifications and
|
|
142
|
+
direct draft URLs without browser MCP.
|
|
143
|
+
- [x] Endpoint validation, cancellation and event lifecycle checks.
|
|
144
|
+
- [x] Foundation views, themes, viewport and guide parity in the HTTP browser.
|
|
145
|
+
- [x] Serial matched comparison against the exact 0.4.4 release engine: cold and
|
|
146
|
+
second-view display, edit-to-visible and edit-to-verified latency, modules
|
|
147
|
+
rebuilt, completed response bytes, wire bytes, peak process-tree RSS and state.
|
|
148
|
+
- [x] Decide whether gains justify promoting the HTTP browser; record regressions
|
|
149
|
+
and remaining compatibility/capture work before any release decision.
|
|
150
|
+
|
|
151
|
+
Use three fresh alternating trials per variant with the same fixture, browser,
|
|
152
|
+
incremental compiler and checks. Record median/p95 and source/fixture hashes. Do
|
|
153
|
+
not compare against the former bundled compiler or run benchmarks alongside
|
|
154
|
+
tests. Count HTTP and MCP response bodies consistently; long-lived event streams
|
|
155
|
+
are not completed responses. Report bundle size separately from measured latency.
|
|
156
|
+
|
|
157
|
+
Foundation checks exposed shared incremental-compiler defects: generated previews
|
|
158
|
+
did not load the configured project stylesheet, inlined CSS imports were missing
|
|
159
|
+
from content invalidation, and isolated Preact foundations could not load refresh
|
|
160
|
+
helpers. The same fixes and React/Preact regression checks are included in both
|
|
161
|
+
comparison variants. They are not credited as HTTP improvements. The draft
|
|
162
|
+
workflow also had an intermittent late navigation failure during competing test
|
|
163
|
+
work; its subsequent isolated run passed. That observation remains a limitation
|
|
164
|
+
until broader repeated testing establishes reliability.
|
|
165
|
+
|
|
166
|
+
After the shared watcher lifecycle fix, the final focused HTTP browser run passed
|
|
167
|
+
all four checks: React and Preact hot updates/workers/rejection recovery, the full
|
|
168
|
+
draft comparison/acceptance workflow, and foundation/theme/guide rendering.
|
|
169
|
+
Each HTTP browser path asserts that it makes no MCP requests. This is focused
|
|
170
|
+
prototype verification, not a full-suite or HTTP capture-compatibility claim.
|
|
171
|
+
|
|
172
|
+
## Matched results, 2026-11-10
|
|
173
|
+
|
|
174
|
+
Baseline: 0.4.4 candidate commit `d8d9b2d`, including the shared
|
|
175
|
+
foundation/CSS fixes and draft watcher lifecycle fix. Three fresh alternating
|
|
176
|
+
trials per variant; nine samples per edit kind, on Bun 1.4.4, Linux x64, Intel
|
|
177
|
+
Core Ultra 9 275HX. No competing ADS test/benchmark jobs ran. Existing unrelated
|
|
178
|
+
applications remained running. Both variants use the current incremental compiler
|
|
179
|
+
and normal checking gates.
|
|
180
|
+
|
|
181
|
+
| Latency, median / observed p95 | 0.4.4 MCP browser | HTTP browser |
|
|
182
|
+
| --- | ---: | ---: |
|
|
183
|
+
| Cold visible | 4,986 / 5,368 ms | 4,066 / 4,175 ms |
|
|
184
|
+
| Cold verified | 6,371 / 6,385 ms | 5,483 / 6,074 ms |
|
|
185
|
+
| Second view, already warmed visible | 516 / 698 ms | 433 / 449 ms |
|
|
186
|
+
| Second view, already warmed verified | 518 / 700 ms | 444 / 453 ms |
|
|
187
|
+
| Owner-code edit visible | 897 / 1,058 ms | 1,065 / 1,321 ms |
|
|
188
|
+
| Owner-code edit verified | 2,181 / 2,603 ms | 2,308 / 2,595 ms |
|
|
189
|
+
| Owner-style edit visible | 882 / 1,088 ms | 1,102 / 1,261 ms |
|
|
190
|
+
| Owner-style edit verified | 2,056 / 2,407 ms | 2,023 / 2,309 ms |
|
|
191
|
+
| Shared dependency edit visible | 944 / 1,036 ms | 1,014 / 1,123 ms |
|
|
192
|
+
| Shared dependency edit verified | 2,106 / 2,372 ms | 1,974 / 2,571 ms |
|
|
193
|
+
| Token edit visible | 1,128 / 1,581 ms | 1,165 / 1,439 ms |
|
|
194
|
+
| Token edit verified | 2,816 / 3,580 ms | 2,747 / 3,354 ms |
|
|
195
|
+
|
|
196
|
+
| Resource measure, median | 0.4.4 MCP browser | HTTP browser |
|
|
197
|
+
| --- | ---: | ---: |
|
|
198
|
+
| Cold completed response bodies | 2,669,718 B | 1,914,413 B |
|
|
199
|
+
| Cold wire response bodies | 2,670,780 B | 916,099 B |
|
|
200
|
+
| Owner-code edit completed bodies | 261,777 B | 252,766 B |
|
|
201
|
+
| Owner-code edit wire bodies | 262,074 B | 246,683 B |
|
|
202
|
+
| Owner-style edit completed bodies | 292,980 B | 236,628 B |
|
|
203
|
+
| Shared dependency edit completed bodies | 289,236 B | 238,006 B |
|
|
204
|
+
| Token edit completed bodies | 383,421 B | 299,454 B |
|
|
205
|
+
| Owner-code DS modules transformed | 1 | 1 |
|
|
206
|
+
| Owner-code compiler time | 121 ms | 114 ms |
|
|
207
|
+
| Trial-peak process-tree RSS | 2,438 MiB | 2,360 MiB |
|
|
208
|
+
| Observed p95 trial-peak RSS | 2,571 MiB | 2,405 MiB |
|
|
209
|
+
| Full interaction state preserved | 36/36 edits | 36/36 edits |
|
|
210
|
+
| Preview frames, excluding the top page | 2 | 1 |
|
|
211
|
+
|
|
212
|
+
HTTP makes zero browser MCP requests in all three runs. Cold completed bodies fall
|
|
213
|
+
28.3%, wire bodies 65.7%, and median sampled peak RSS 3.2% (78 MiB). Wire savings
|
|
214
|
+
include gzip in the HTTP asset adapter; compression is also possible independently
|
|
215
|
+
of a transport migration. RSS sums resident pages across the process tree,
|
|
216
|
+
including shared mappings; it is not unique physical memory or JavaScript heap.
|
|
217
|
+
|
|
218
|
+
Cold visible/verified medians improve 18.4%/13.9% in this final run. However,
|
|
219
|
+
owner-code and owner-style edits become visible 18.7% and 24.9% more slowly.
|
|
220
|
+
Verified-edit changes are small and mixed. Both variants transform one DS module
|
|
221
|
+
per owner-code/style/dependency edit; a token edit transforms 18 and re-extracts
|
|
222
|
+
two Linaria modules in this fixture.
|
|
223
|
+
|
|
224
|
+
An earlier matched run reported a 262 MiB (10.4%) memory reduction, versus 78 MiB
|
|
225
|
+
(3.2%) here. Its cold-verification median did not improve, and it included an
|
|
226
|
+
unexplained 18.9-second baseline token-verification outlier. Those measurements
|
|
227
|
+
remain in Git history and `output/http-showcase-comparison/`; they are not pooled
|
|
228
|
+
with this final candidate or used to claim a stable 10% memory gain.
|
|
229
|
+
|
|
230
|
+
With only three cold/trial-peak samples and nine per edit kind, observed p95 is
|
|
231
|
+
the maximum sample, not a production-tail estimate. All second views had already
|
|
232
|
+
compiled in the background; these are not cold unseen-owner timings. Full
|
|
233
|
+
acceptance latency and registered behavior execution were outside this benchmark.
|
|
234
|
+
|
|
235
|
+
**Decision: retain the HTTP branch for further work; do not promote it into 0.4.4.**
|
|
236
|
+
Transfer savings and removal of browser MCP are established in these checks.
|
|
237
|
+
Memory savings are modest and variable, and the branch does not establish an
|
|
238
|
+
editing-speed improvement. Before promotion, profile the publication/transport
|
|
239
|
+
portion of slower edits, repeat draft lifecycle tests, and complete HTTP
|
|
240
|
+
capture/evidence compatibility. The release stays on the tested MCP browser path.
|
|
241
|
+
|
|
242
|
+
The [machine-readable results](benchmarks/http-showcase.json) retain all operation
|
|
243
|
+
samples and source/distribution/fixture/harness hashes. Full requests, compiler
|
|
244
|
+
stage records, screenshots and logs are in
|
|
245
|
+
`output/http-showcase-final/{release,http}-{1,2,3}/`. Run after building both
|
|
246
|
+
checkouts, with the existing prepared fixture:
|
|
247
|
+
|
|
248
|
+
```sh
|
|
249
|
+
bun scripts/benchmarks/preview/http.mjs /tmp/ads-release-0.4.4 output/http-showcase-final
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
## Latency diagnosis, 2026-11-10
|
|
253
|
+
|
|
254
|
+
One release profile and two HTTP profiles recorded request timings, the existing
|
|
255
|
+
browser performance measures, compiler timing and (in the second HTTP profile)
|
|
256
|
+
publication phases and source-check duration. They ran serially, with unrelated
|
|
257
|
+
applications left running. All 36 edits retained the complete interaction state;
|
|
258
|
+
both HTTP runs made zero browser MCP requests and all three runs reported no
|
|
259
|
+
browser errors. The build, reference synchronization and tooling lint passed.
|
|
260
|
+
The five focused HTTP publication, scope, routing, cancellation and lifecycle
|
|
261
|
+
checks also passed (zero failures).
|
|
262
|
+
This is a stage diagnosis, not a replacement for the matched benchmark above.
|
|
263
|
+
The release trace also had long delays before compilation: an owner-style edit
|
|
264
|
+
took 9.25 seconds to become visible, and a token edit took 6.18 seconds visible /
|
|
265
|
+
22.96 seconds verified. Their cause is not established by this profile, so no
|
|
266
|
+
cross-run speedup is inferred from these samples.
|
|
267
|
+
|
|
268
|
+
The median owner-code sample in the detailed HTTP run took 1,195 ms to become
|
|
269
|
+
visible. Its stages were:
|
|
270
|
+
|
|
271
|
+
| Sequential stage | Time |
|
|
272
|
+
| --- | ---: |
|
|
273
|
+
| Edit until compiler begins | 342 ms |
|
|
274
|
+
| Incremental compilation, one owner module | 107 ms |
|
|
275
|
+
| Compilation end until browser starts reading live manifest | 295 ms |
|
|
276
|
+
| Browser live-manifest request | 199 ms |
|
|
277
|
+
| HTTP publication request | 198 ms |
|
|
278
|
+
| Module load, refresh and visible-frame observation | 54 ms |
|
|
279
|
+
| Total | 1,195 ms |
|
|
280
|
+
|
|
281
|
+
The changed JavaScript download itself took 1.7 ms. The 295 ms interval includes
|
|
282
|
+
server publication and browser detection/status work; it is not a measurement
|
|
283
|
+
of polling delay alone. The frame checks status every 150 ms, and the outer shell
|
|
284
|
+
also reads it after build events.
|
|
285
|
+
|
|
286
|
+
The extra HTTP publication is a confirmed bottleneck. In this sample, its server
|
|
287
|
+
work took 196 ms: 177 ms rereading the live manifest and 18 ms pinning three new
|
|
288
|
+
assets. Across the three owner-code edits, the client publication step took
|
|
289
|
+
119–198 ms. The manifest was already requested by the browser immediately before
|
|
290
|
+
this operation. Both live-manifest reads call the same build-status service,
|
|
291
|
+
which captures the source revision again before permitting live access. Source
|
|
292
|
+
freshness remains necessary; the avoidable cost is repeating that work in two
|
|
293
|
+
sequential requests for one update.
|
|
294
|
+
|
|
295
|
+
Publication also retrieves each new asset through the generic resource reader.
|
|
296
|
+
That reader looks up and validates the current/history manifest for each asset,
|
|
297
|
+
even though publication already holds the selected graph. Pinning took 14–60 ms
|
|
298
|
+
across these edits. The native HTTP transfer and browser refresh following
|
|
299
|
+
publication were much smaller than these server preparation stages.
|
|
300
|
+
|
|
301
|
+
Both paths also spend substantial work on status and discovery. In the first
|
|
302
|
+
HTTP profile, one owner-code edit made 13 build-status requests (183 KB) during
|
|
303
|
+
its 2.07-second verification interval; the changed module was 8.8 KB. Source
|
|
304
|
+
checks in the detailed HTTP run took 0.78–1.33 seconds per edit and began after
|
|
305
|
+
the live compilation. Transport changes do not remove these checks. In its cold
|
|
306
|
+
sample, 2.25 seconds elapsed before selected-view compilation began and that
|
|
307
|
+
compilation took 772 ms; the view appeared at 4.06 seconds. Startup/discovery
|
|
308
|
+
within that first interval needs further profiling.
|
|
309
|
+
|
|
310
|
+
The next improvements to test are:
|
|
311
|
+
|
|
312
|
+
1. Return the manifest delta and its authorized HTTP publication together, using
|
|
313
|
+
one coherent source/revision check for that operation. Preserve scope,
|
|
314
|
+
integrity, supersession and rejected-edit recovery.
|
|
315
|
+
2. Pin assets against that already validated graph instead of repeating manifest
|
|
316
|
+
and history discovery for each asset.
|
|
317
|
+
3. Use build-change events to wake the frame and coalesce duplicate status reads,
|
|
318
|
+
retaining content reconciliation for missed events. Measure the common path
|
|
319
|
+
in the release engine as well as HTTP.
|
|
320
|
+
|
|
321
|
+
No latency optimization or validation-gate change was made during this diagnosis.
|
|
322
|
+
The branch adds opt-in timers only. The [profile summary](benchmarks/http-showcase-profile.json)
|
|
323
|
+
records all detailed HTTP edit stages, source identities and verification results.
|
|
324
|
+
Full request timelines remain under `output/http-profile/{release-1,http-1,http-deep-1}/`.
|
|
325
|
+
To reproduce, build the intended checkout and run the existing trial with
|
|
326
|
+
`ADS_PREVIEW_BENCH_PROFILE=1`, `ADS_PREVIEW_BENCH_DELIVERY=http`, and
|
|
327
|
+
`ADS_PREVIEW_BENCH_FIXTURE=output/http-comparison-fixture`; use a fresh output
|
|
328
|
+
directory. HTTP publication timers require this profiling revision. The released
|
|
329
|
+
checkout can be selected with `ADS_PREVIEW_BENCH_REPO=/tmp/ads-release-0.4.4`
|
|
330
|
+
and `ADS_PREVIEW_BENCH_DELIVERY=blob`.
|
|
331
|
+
|
|
332
|
+
## Optimized HTTP results, 2026-11-10
|
|
333
|
+
|
|
334
|
+
**Rerun complete after competing jobs were stopped.** The user authorized stopping six old CPU-bound Bun build/proof jobs; Neezler compilation had finished. Normal desktop applications and preview watchers remained running. Before measurement, sampled host CPU usage was **8.3%** across 24 logical CPUs. No competing build/proof jobs appeared in the ten-second load samples.
|
|
335
|
+
|
|
336
|
+
The complete analysis suite now passes its historical timing and memory limits. All source, distribution, client, harness and fixture hashes match the previous contended run, so no implementation or threshold change accounts for the recovery. The earlier noisy comparison is superseded; its raw evidence remains under `output/http-sse-optimized-comparison/`.
|
|
337
|
+
|
|
338
|
+
The combined graph preparation, pinned asset reads and event-driven build reports are implemented in this isolated POC. Periodic HTTP browser polling is removed. These measurements compare released **0.4.4**, the frozen HTTP POC before these changes, and optimized HTTP.
|
|
339
|
+
|
|
340
|
+
| Operation | Release visible / verified | Earlier HTTP visible / verified | Optimized HTTP visible / verified |
|
|
341
|
+
| --- | ---: | ---: | ---: |
|
|
342
|
+
| Cold display | 3,295 / 4,678 ms | 3,397 / 4,531 ms | 2,996 / 4,330 ms |
|
|
343
|
+
| Second view (already warmed) | 398 / 400 ms | 349 / 357 ms | 383 / 384 ms |
|
|
344
|
+
| Owner code edit | 714 / 1,716 ms | 818 / 1,757 ms | 589 / 1,594 ms |
|
|
345
|
+
| Owner style edit | 730 / 1,640 ms | 844 / 1,636 ms | 641 / 1,590 ms |
|
|
346
|
+
| Shared component edit | 753 / 1,628 ms | 812 / 1,624 ms | 594 / 1,557 ms |
|
|
347
|
+
| Token edit | 891 / 2,207 ms | 1,024 / 2,253 ms | 775 / 2,092 ms |
|
|
348
|
+
|
|
349
|
+
All edit categories pooled (36 edits per variant; medians):
|
|
350
|
+
|
|
351
|
+
| Metric | Release 0.4.4 | Earlier HTTP | Optimized HTTP |
|
|
352
|
+
| --- | ---: | ---: | ---: |
|
|
353
|
+
| Edit to visible | 767 ms | 841 ms | 638 ms |
|
|
354
|
+
| Edit to verified | 1,696 ms | 1,712 ms | 1,594 ms |
|
|
355
|
+
| Decoded response bytes per edit, including SSE | 270,420 B | 241,903 B | 189,270 B |
|
|
356
|
+
| Sampled process-tree peak RSS (median) | 2,270 MiB | 2,199 MiB | 2,235 MiB |
|
|
357
|
+
| Complete interaction state preserved | 36/36 | 36/36 | 36/36 |
|
|
358
|
+
|
|
359
|
+
Against the release, optimized HTTP improved median edit-to-visible latency by **17%**, verification latency by **6%**, and decoded response bytes by **30%**. Against earlier HTTP, the improvements were **24%**, **7%**, and **22%** respectively. These are local matched-run results, not guarantees for remote deployments.
|
|
360
|
+
|
|
361
|
+
No substantial memory benefit is demonstrated: optimized HTTP used **35 MiB (1.5%) less** sampled peak RSS than the release but **36 MiB (1.6%) more** than earlier HTTP. Warmed second-view navigation was **383 ms** versus **349 ms** in earlier HTTP, although below the release’s **398 ms**. Token verification p95 was **2,301 ms** versus the release’s **2,274 ms**; that is the maximum of nine samples, not a stable tail estimate.
|
|
362
|
+
|
|
363
|
+
Three serial rounds rotated variant order under a 3 GiB memory cap with swap disabled. Each edit category has nine samples; cold/navigation/RSS have three. Every second view was already background-compiled. Timings include ordinary source checking and paint gates; full acceptance and registered behavior execution are excluded from the preview timings and covered separately. No browser MCP requests or browser errors occurred in either HTTP variant.
|
|
364
|
+
|
|
365
|
+
Byte accounting version 2 includes open event-stream payloads. The headline comparison uses decoded response bytes. CDP may deliver encoded stream-byte accounting after decoded data, so per-operation wire estimates are not exact network bills. Older completed-response-only tables above remain historical measurements.
|
|
366
|
+
|
|
367
|
+
The previous build, lint/reference synchronization, six control/integration checks and six browser checks passed; this rerun uses exactly that implementation. Browser checks cover React/Preact HTTP and MCP editing, rejection/restoration, workers/Wasm, foundations/guides, and scoped draft reconnection with continued edits and acceptance. Fault-injection cases interrupt a real EventSource and verify no periodic HTTP status reads, a disconnect warning, fresh reads on reconnect and retained state. One earlier new-draft navigation timeout did not recur in three subsequent full HTTP draft runs; no assertion or timeout was weakened.
|
|
368
|
+
|
|
369
|
+
The repository-required analysis suite completed all three inventories plus focused branch, input-capture and contrast scenarios. It exited **0** and passed the unchanged historical comparison limits. The record is `scripts/benchmarks/analysis/results/latest.json`; no performance threshold was changed.
|
|
370
|
+
|
|
371
|
+
Analysis timings (median / p95, milliseconds):
|
|
372
|
+
|
|
373
|
+
| Scenario | 8 owners | 24 owners | 8 owners, spatial |
|
|
374
|
+
| --- | ---: | ---: | ---: |
|
|
375
|
+
| warm-check | 95.8 / 116.6 | 147.2 / 166.1 | 109.0 / 132.9 |
|
|
376
|
+
| source-edit-check | 178.2 / 230.3 | 281.7 / 344.6 | 165.4 / 191.8 |
|
|
377
|
+
| import-edit-check | 153.3 / 232.6 | 254.1 / 322.0 | 161.9 / 210.7 |
|
|
378
|
+
| audit-selection | 32.0 / 45.6 | 39.9 / 46.0 | 30.4 / 39.2 |
|
|
379
|
+
| draft-accept | 383.0 / 426.5 | 562.1 / 724.4 | 389.6 / 457.3 |
|
|
380
|
+
| draft-reject | 332.1 / 379.6 | 467.0 / 527.0 | 338.7 / 390.3 |
|
|
381
|
+
| Sampled process-tree peak RSS | 641.9 MiB | 579.1 MiB | 833.9 MiB |
|
|
382
|
+
|
|
383
|
+
This is focused POC evidence, not release approval. The production release is unchanged. HTTP capture/evidence compatibility remains a separate deferred gate.
|
|
384
|
+
|
|
385
|
+
[Preview results, p95 values, source hashes and host-load metadata](benchmarks/http-showcase-optimized.json). [Complete analysis record](../scripts/benchmarks/analysis/results/latest.json). Raw preview operations and screenshots are under `output/http-sse-rerun/preview/`; host-load samples and phase exit codes are in `output/http-sse-rerun/`.
|
|
386
|
+
|
|
387
|
+
Reproduce with unchanged, built checkouts and no competing build/benchmark jobs:
|
|
388
|
+
|
|
389
|
+
```sh
|
|
390
|
+
ADS_PREVIEW_BENCH_HTTP_BASELINE=/tmp/ads-http-before-optimizations \
|
|
391
|
+
systemd-run --user --scope -p MemoryMax=3G -p MemorySwapMax=0 \
|
|
392
|
+
bun scripts/benchmarks/preview/http.mjs /tmp/ads-release-0.4.4 \
|
|
393
|
+
output/http-sse-rerun/preview
|
|
394
|
+
# After preview measurements finish:
|
|
395
|
+
systemd-run --user --scope -p MemoryMax=3G -p MemorySwapMax=0 \
|
|
396
|
+
bun run bench:analysis:record
|
|
397
|
+
```
|