@reqvire-org/ads 0.3.39 → 0.3.40

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.
@@ -12,6 +12,20 @@
12
12
  </nav>
13
13
  <div class="actions"><button id="preview-status" data-phase="opening" aria-label="Preview status: Connecting to ADS MCP…" title="Connecting to ADS MCP…" popovertarget="status-details"><span class="status-dot" aria-hidden="true"></span></button><div id="status-details" popover><p id="status" role="status">Connecting to ADS MCP…</p><p id="warmup-status" hidden></p></div><button id="viewport" aria-label="Phone viewport" aria-pressed="false" aria-controls="frame-slot" title="Preview at phone width (390 px)"><svg viewBox="0 0 16 16" aria-hidden="true"><rect x="4" y="1" width="8" height="14" rx="1.5"/><path d="M7 12.5h2"/></svg></button><button id="theme" aria-label="Use dark theme" title="Use dark theme"><svg viewBox="0 0 16 16"><path d="M13.5 9a5.5 5.5 0 0 1-6.5-6.5A5.5 5.5 0 1 0 13.5 9Z"/></svg></button><button id="minimize" aria-label="Minimize showcase menu" title="Minimize showcase menu (refresh to restore)"><svg viewBox="0 0 16 16"><path d="m4 10 4-4 4 4"/></svg></button></div>
14
14
  </header>
15
- <main><aside id="sidebar"><nav id="entries" aria-label="Tokens"></nav></aside><section id="preview" aria-label="Preview"><div id="loader" role="status" aria-label="Loading preview" hidden><span class="spinner" aria-hidden="true"></span></div><div id="preview-error" role="alert" hidden><p id="preview-error-message"></p><button id="retry-preview" type="button">Retry preview</button></div><div id="frame-slot"></div></section></main>
15
+ <main>
16
+ <aside id="sidebar"><nav id="entries" aria-label="Tokens"></nav></aside>
17
+ <section id="preview-workspace" aria-label="Preview workspace">
18
+ <div id="preview-error" role="alert" hidden>
19
+ <svg viewBox="0 0 16 16" aria-hidden="true"><path d="m8 2 7 12H1L8 2Z"/><path d="M8 6v3M8 11v.5"/></svg>
20
+ <p id="preview-error-message"></p>
21
+ <button id="preview-error-details" type="button" popovertarget="status-details">Details</button>
22
+ <button id="retry-preview" type="button">Retry preview</button>
23
+ </div>
24
+ <section id="preview" aria-label="Preview">
25
+ <div id="loader" role="status" aria-label="Loading preview" hidden><span class="spinner" aria-hidden="true"></span></div>
26
+ <div id="frame-slot"></div>
27
+ </section>
28
+ </section>
29
+ </main>
16
30
  <script type="module" src="/client.js"></script>
17
31
  </body></html>
@@ -1,3 +1,4 @@
1
+ import { previewFailureTitle } from "../src/preview-failure.mjs";
1
2
  /** One monochrome state per entry; proposal presence and build state are distinct. */
2
3
  export function entryPreviewState(item, report, preferredDraft) {
3
4
  const draft = item.drafts?.find(value => value.id === preferredDraft) ?? item.drafts?.[0];
@@ -5,7 +6,7 @@ export function entryPreviewState(item, report, preferredDraft) {
5
6
  const build = draft ? proposal?.scenarios?.find(value => value.id === item.id) ?? proposal : report?.previews?.find(value => value.id === item.id) ?? item.build;
6
7
  const state = build?.state === "error" ? "error" : build?.state === "checking" || build?.live ? "checking"
7
8
  : build?.building || ["queued", "building"].includes(build?.state) ? "building" : build?.current ? "ready" : build?.stale ? "stale" : "unreported";
8
- const labels = { error: "Preview build failed", checking: "Preview compiled; checking changes", building: "Preview build in progress", ready: "Preview build complete", stale: "Previous preview; current source not built", unreported: "Preview not built" };
9
+ const labels = { error: previewFailureTitle(build), checking: "Preview compiled; checking changes", building: "Preview build in progress", ready: "Preview build complete", stale: "Previous preview; current source not built", unreported: "Preview not built" };
9
10
  return { state, label: `${draft ? "Draft · " : ""}${labels[state]}${draft && state === "ready" ? " · unaccepted" : ""}` };
10
11
  }
11
12
 
@@ -22,6 +22,9 @@ main{flex:1;min-height:0;display:flex}#sidebar{width:var(--pane-width);flex:none
22
22
  :root[data-viewport="phone"] #frame-slot:has(.draft-comparison){width:100%}:root[data-viewport="phone"] .draft-stage iframe{width:min(390px,100%)}
23
23
  @media(max-width:760px){.draft-comparison[data-split="true"]{grid-template-columns:minmax(0,1fr);grid-template-rows:repeat(2,minmax(0,1fr))}.draft-version+ .draft-version{border-inline-start:0;border-top:1px solid var(--frame-line)}}
24
24
 
25
- #preview-error{flex-shrink:0;margin:16px;max-height:40vh;overflow:auto;padding:16px;border:1px solid var(--frame-line);border-radius:6px;background:var(--frame-bg);color:var(--frame-ink)}#preview-error-message{margin:0 0 12px;white-space:pre-wrap;overflow-wrap:anywhere}
25
+ #preview-workspace{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column}
26
+ /* Host diagnostics belong to workspace chrome, outside the rendered canvas. */
27
+ #preview-error{display:flex;align-items:center;gap:8px;flex:none;min-height:40px;padding:6px 12px;border-bottom:1px solid var(--frame-line);background:var(--frame-bg);color:var(--frame-ink)}#preview-error-message{flex:1;min-width:0;margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#preview-error button{flex:none;padding:3px 8px}
28
+ @media(max-width:480px){#preview-error{flex-wrap:wrap}#preview-error-message{flex-basis:calc(100% - 24px)}#preview-error-details{margin-inline-start:22px}}
26
29
 
27
30
  #preview-status[data-warmup="warming"][data-phase="ready"] .status-dot{background:transparent;border:1.5px solid currentColor;animation:status-pulse 1.6s ease-in-out infinite}#warmup-status{margin:8px 0 0;opacity:.7}
@@ -346,6 +346,13 @@ scenarios unmounts the previous view while keeping unchanged dependencies cached
346
346
  Persistence is a host lifecycle choice; a new external widget loads the same
347
347
  resources independently. Resource sharing is scoped to an App instance.
348
348
 
349
+ Resource IDs hash original bytes and the transitive graph of URLs they rewrite.
350
+ Cyclic module groups share a deterministic fingerprint. This makes
351
+ IDs independent of compiler filename hashing: rewriting a changed dependency
352
+ cannot put different bytes behind an existing URI. Unrelated graph branches keep
353
+ their IDs and caches. The App still verifies the digest of the final bytes and
354
+ rejects any identity collision without partially registering the new graph.
355
+
349
356
  The showcase's resource bridge can recover a transient fetch failure with at most
350
357
  three read attempts and bounded backoff. This applies only to `resources/read`;
351
358
  tool calls, assertions and whole checks are never replayed. Cancellation,
package/docs/CHANGELOG.md CHANGED
@@ -1,50 +1,49 @@
1
1
  # Changelog
2
2
 
3
- ## 0.3.39
3
+ ## 0.3.40
4
4
 
5
5
  <!-- ads-local-tests:start -->
6
- Local verification: **594/594 passed** with `ADS_TEST_BUN=1 npm test`.
7
- Evidence adopted from the completed working-tree run of package 0.3.38; Node v24.13.0, Bun 1.4.1.
8
- Release source commit: `37bb8f1436d717b451dfe04546e582fc6c61cc99`. This commit was not the execution HEAD.
9
- Runtime code and tests match the completed run. Only release version metadata and policy documentation changed afterward.
10
- The release owner explicitly approved reusing this completed run; no new full run is claimed.
11
- Completed 2026-10-23T23:00:40.992Z (799 seconds).
6
+ Local verification: **602/602 passed** with `ADS_TEST_BUN=1 npm test`.
7
+ Tested commit: `eb5d277c1f5198d54318ca0a3fa836e1eb7ee2a3`; Node v24.13.0, Bun 1.4.1.
8
+ Completed 2026-10-24T18:24:27.888Z (829 seconds).
12
9
 
13
10
  <!-- ads-local-test-proof
14
11
  {
15
12
  "schema": 1,
16
- "version": "0.3.39",
17
- "commit": "37bb8f1436d717b451dfe04546e582fc6c61cc99",
18
- "sourceSha256": "c44e5946aa23eb9a440e6d6e97dbecb413be4941fb56c51b5bdc4fde0f909e1c",
13
+ "version": "0.3.40",
14
+ "commit": "eb5d277c1f5198d54318ca0a3fa836e1eb7ee2a3",
15
+ "sourceSha256": "597fe2f9983e64fac21e3d4584e5bae7068a24fde7f00bde9a57c89ea41fa597",
19
16
  "command": "ADS_TEST_BUN=1 npm test",
20
17
  "result": "pass",
21
- "tests": 594,
22
- "pass": 594,
18
+ "tests": 602,
19
+ "pass": 602,
23
20
  "fail": 0,
24
21
  "cancelled": 0,
25
22
  "skipped": 0,
26
23
  "node": "v24.13.0",
27
24
  "bun": "1.4.1",
28
- "completedAt": "2026-10-23T23:00:40.992Z",
29
- "durationMs": 798977.027594,
30
- "logSha256": "75ea7b860945aeb06837fdb2d43a22c27553d48c847cd910de52a9036690e2ba",
31
- "evidenceOrigin": {
32
- "kind": "adopted-completed-working-tree-run",
33
- "testedVersion": "0.3.38",
34
- "executionSource": "Uncommitted working tree before release commit",
35
- "releaseSourceCommit": "37bb8f1436d717b451dfe04546e582fc6c61cc99",
36
- "postRunChanges": [
37
- "Package and lockfile version: 0.3.38 to 0.3.39",
38
- "Changelog release heading",
39
- "README and portable behavior-policy documentation"
40
- ],
41
- "runtimeAndTests": "Unchanged from the completed 594-test run",
42
- "authorization": "Release owner explicitly approved reuse of the completed verification instead of rerunning solely for the release proof."
43
- }
25
+ "completedAt": "2026-10-24T18:24:27.888Z",
26
+ "durationMs": 829113,
27
+ "logSha256": "810783acb0791a199a1e773d8da6779ed537f8a632971b851da40446ebe6fd97"
44
28
  }
45
29
  -->
46
30
  <!-- ads-local-tests:end -->
47
31
 
32
+ - Fix immutable preview resource collisions when a compiler keeps dependency
33
+ filenames stable. Resource identities include transitive dependencies, with
34
+ cycle-aware hashing; unrelated preview branches retain their cached identities.
35
+ Rejected resource graphs no longer partially update the App loader.
36
+ - Move Explorer failures out of the rendered canvas into a compact workspace
37
+ status strip below the toolbar. Details opens the full diagnostics; Retry and
38
+ the retained preview remain available, including at phone widths.
39
+ - Preserve project/scenario/graph failure scope and validation/discovery/build
40
+ phase in preview reports. Explorer and MCP distinguish project validation
41
+ failures from errors in the selected preview, and retain the actual diagnostic
42
+ file, line, column and rule instead of reporting the compiler launcher location.
43
+
44
+
45
+ ## 0.3.39
46
+
48
47
  - Start stdio prewarming only on the real initialized connection, preventing
49
48
  disposable MCP negotiation probes from launching competing compilers. HTTP-only
50
49
  hosts can still prewarm immediately.
package/docs/MCP.md CHANGED
@@ -192,9 +192,10 @@ HTML in an opaque sandbox. Project UI is never imported into the shell.
192
192
 
193
193
  The built-in client refreshes menus after catalogue changes and automatically
194
194
  refreshes the active scenario inside the same reusable App after a current
195
- successful build. Failed builds show
196
- file/line diagnostics and identify a retained view as stale. Themes and available
197
- space flow through host context. Other coding-agent hosts retain their own reload
195
+ successful build. Failed builds show a compact status strip below the toolbar,
196
+ outside the App canvas. Details opens full file/line diagnostics; Retry requests
197
+ the selected preview again. The retained view is identified as stale. Themes and
198
+ available space flow through host context. Other coding-agent hosts retain their own reload
198
199
  policy. A disconnected subscription marks retained output stale and tears down
199
200
  App watchers; refresh the page after restarting ADS. Compilation remains necessary for project TSX/Linaria, performed by the
200
201
  managed project compiler on demand and after relevant source changes.
@@ -1384,6 +1385,14 @@ storage directory and `ads://guides/reporting`, without listing report contents.
1384
1385
  All five skills include the same portable
1385
1386
  [reporting reference](../skills/ads-designer/references/reporting.md).
1386
1387
 
1388
+ Build errors carry optional `failure: {scope, phase}` metadata. `scope` is
1389
+ `project`, `graph` or `scenario`; `phase` is `validation`, `discovery` or `build`.
1390
+ A failed project gate blocks verification across previews; it does not establish
1391
+ that every component failed compilation. Diagnostics retain their owning source
1392
+ file, line, column and rule code. Explorer labels project validation explicitly
1393
+ and shows errors for the selected preview rather than borrowing an unrelated
1394
+ scenario's failure. A retained earlier view is not current-source evidence.
1395
+
1387
1396
  ## Complete and affected validation
1388
1397
 
1389
1398
  `ads_validate({})` and `ads validate` share the full validation engine.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reqvire-org/ads",
3
- "version": "0.3.39",
3
+ "version": "0.3.40",
4
4
  "type": "module",
5
5
  "description": "A design system your agent can see and shape. Your components. Your look. Your code.",
6
6
  "repository": {