@reqvire-org/ads 0.3.33 → 0.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/behavior-libraries.mjs +93 -0
- package/dist/behaviors.mjs +0 -6
- package/dist/bootstrap-ds/ds.config.json +1 -0
- package/dist/capture.mjs +3 -3
- package/dist/check-runner.mjs +7 -0
- package/dist/check.mjs +2 -0
- package/dist/config.mjs +4 -0
- package/dist/lint-config.mjs +7 -0
- package/dist/mcp/build-status.mjs +1 -1
- package/dist/mcp/catalog.mjs +4 -2
- package/dist/mcp/draft-discovery.mjs +55 -0
- package/dist/mcp/drafts.mjs +135 -16
- package/dist/mcp/mutations.mjs +16 -8
- package/dist/mcp/preview-owner-guard.mjs +36 -1
- package/dist/mcp/preview-watch.mjs +100 -14
- package/dist/mcp/preview-widget.bundle.js +14 -14
- package/dist/mcp/preview-work.mjs +41 -0
- package/dist/mcp/server.mjs +131 -36
- package/dist/preview-builder.mjs +1 -0
- package/dist/scenario-inspector.mjs +16 -10
- package/dist/scenario-program.mjs +36 -0
- package/dist/scenario-registry.mjs +106 -0
- package/dist/scenarios-compiler.mjs +154 -43
- package/dist/scenarios.mjs +2 -1
- package/dist/showcase/client.bundle.js +39 -39
- package/dist/showcase/comparison.js +29 -5
- package/dist/showcase/draft-navigation.js +41 -0
- package/dist/showcase/index.html +1 -2
- package/dist/showcase/preview-state.js +19 -0
- package/dist/showcase/style.css +2 -2
- package/dist/skills/ads-break-ui/references/behaviors.md +10 -0
- package/dist/skills/ads-break-ui/references/drafts.md +43 -4
- package/dist/skills/ads-break-ui/references/runtimes.md +9 -0
- package/dist/skills/ads-break-ui/references/validation.md +6 -0
- package/dist/skills/ads-designer/SKILL.md +7 -0
- package/dist/skills/ads-designer/assets/bootstrap-ds/ds.config.json +1 -0
- package/dist/skills/ads-designer/references/behaviors.md +10 -0
- package/dist/skills/ads-designer/references/drafts.md +43 -4
- package/dist/skills/ads-designer/references/runtimes.md +9 -0
- package/dist/skills/ads-designer/references/validation.md +6 -0
- package/dist/skills/ads-import/SKILL.md +4 -0
- package/dist/skills/ads-import/references/behaviors.md +10 -0
- package/dist/skills/ads-import/references/drafts.md +43 -4
- package/dist/skills/ads-import/references/runtimes.md +9 -0
- package/dist/skills/ads-import/references/validation.md +6 -0
- package/dist/skills/ads-motion/references/behaviors.md +10 -0
- package/dist/skills/ads-motion/references/drafts.md +43 -4
- package/dist/skills/ads-motion/references/runtimes.md +9 -0
- package/dist/skills/ads-motion/references/validation.md +6 -0
- package/dist/skills/ads-port/SKILL.md +8 -1
- package/dist/skills/ads-port/references/behaviors.md +10 -0
- package/dist/skills/ads-port/references/drafts.md +43 -4
- package/dist/skills/ads-port/references/native-implementation.md +14 -1
- package/dist/skills/ads-port/references/runtimes.md +9 -0
- package/dist/skills/ads-port/references/validation.md +6 -0
- package/dist/unit-contracts.mjs +2 -2
- package/dist/units.mjs +6 -0
- package/dist/validation-checks.mjs +23 -3
- package/dist/validation.mjs +19 -10
- package/dist/verification/browser.d.mts +27 -0
- package/dist/verification.mjs +8 -4
- package/docs/ARCHITECTURE.md +110 -0
- package/docs/CHANGELOG.md +114 -0
- package/docs/GUIDE.md +34 -5
- package/docs/MCP.md +54 -9
- package/docs/benchmarks/gidi-preview-memory.md +141 -0
- package/package.json +6 -4
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import { AppBridge, PostMessageTransport } from "@modelcontextprotocol/ext-apps/app-bridge";
|
|
2
2
|
|
|
3
3
|
/** Each version gets its own ordinary opaque MCP App, never another browser shell. */
|
|
4
|
-
export async function mountComparisonApp({slot,title,sandboxUrl,resourceUri,result,readResource,callTool,context,onError}) {
|
|
4
|
+
export async function mountComparisonApp({slot,title,sandboxUrl,resourceUri,result,readResource,callTool,context,onError,onState}) {
|
|
5
|
+
const options={slot,title,sandboxUrl,resourceUri,readResource,callTool,context,onError,onState};
|
|
6
|
+
let latest=result,active,opening,restarting,closed=false;
|
|
7
|
+
function reopen(){
|
|
8
|
+
if(closed||restarting)return;
|
|
9
|
+
onState?.({state:"loading"});
|
|
10
|
+
restarting=Promise.resolve().then(async()=>{
|
|
11
|
+
await opening;
|
|
12
|
+
await active?.close();
|
|
13
|
+
if(closed)return;
|
|
14
|
+
opening=mountVersion({...options,result:latest,onReopen:reopen});
|
|
15
|
+
try{active=await opening;}finally{opening=undefined;}
|
|
16
|
+
}).catch(error=>{if(!closed)onError(error);}).finally(()=>{restarting=undefined;});
|
|
17
|
+
}
|
|
18
|
+
opening=mountVersion({...options,result:latest,onReopen:reopen});
|
|
19
|
+
try{active=await opening;}finally{opening=undefined;}
|
|
20
|
+
return{
|
|
21
|
+
async updateResult(value){latest=value;await restarting;if(!closed)await active.updateResult(latest);},
|
|
22
|
+
refreshContext(){if(!closed&&!restarting)active.refreshContext();},
|
|
23
|
+
async close(){closed=true;await restarting;await active?.close();},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
async function mountVersion({slot,title,sandboxUrl,resourceUri,result,readResource,callTool,context,onError,onState,onReopen}){
|
|
28
|
+
let disposed=false;
|
|
5
29
|
const resource=await readResource({uri:resourceUri});
|
|
6
30
|
const content=resource.contents.find(item=>item.mimeType==="text/html;profile=mcp-app"&&typeof item.text==="string");
|
|
7
31
|
if(!content)throw new Error("Comparison preview App is unavailable.");
|
|
8
32
|
const frame=document.createElement("iframe");frame.title=title;frame.setAttribute("sandbox","allow-scripts allow-same-origin allow-forms");frame.src=sandboxUrl;slot.append(frame);
|
|
9
33
|
const bridge=new AppBridge(null,{name:"ADS showcase",version:"1.0.0"},{serverResources:{},serverTools:{},logging:{}},{hostContext:context(frame)});
|
|
10
|
-
bridge.onreadresource=readResource;bridge.oncalltool=callTool;bridge.onerror=onError;
|
|
11
|
-
bridge.onloggingmessage=value=>{if(value.logger
|
|
34
|
+
bridge.onreadresource=readResource;bridge.oncalltool=callTool;bridge.onerror=error=>{if(!disposed)onError(error);};
|
|
35
|
+
bridge.onloggingmessage=value=>{if(disposed||value.logger!=="ads-preview")return;if(value.data?.code==="ADS_PREVIEW_REOPEN"){onReopen();return;}onState?.(value.data);if(value.data?.state==="error")onError(new Error(value.data.message));};
|
|
12
36
|
let timer;
|
|
13
37
|
const initialized=new Promise((resolve,reject)=>{timer=setTimeout(()=>reject(new Error("Comparison App initialization timed out.")),15000);bridge.oninitialized=()=>{clearTimeout(timer);resolve();};});
|
|
14
38
|
bridge.onsandboxready=()=>bridge.sendSandboxResourceReady({html:content.text,csp:content._meta?.ui?.csp,sandbox:"allow-scripts allow-forms"});
|
|
@@ -16,6 +40,6 @@ export async function mountComparisonApp({slot,title,sandboxUrl,resourceUri,resu
|
|
|
16
40
|
try{
|
|
17
41
|
await Promise.all([bridge.connect(new PostMessageTransport(frame.contentWindow,frame.contentWindow)),initialized]);
|
|
18
42
|
observer.observe(frame);await bridge.sendToolInput({arguments:{}});await bridge.sendToolResult(result);
|
|
19
|
-
}catch(error){observer.disconnect();await bridge.close();throw error;}finally{clearTimeout(timer);}
|
|
20
|
-
return {updateResult:value=>bridge.sendToolResult(value),refreshContext:()=>bridge.setHostContext(context(frame)),async close(){observer.disconnect();try{await bridge.teardownResource({},{timeout:500});}catch{/* A disconnected App may not acknowledge teardown. */}await bridge.close();}};
|
|
43
|
+
}catch(error){observer.disconnect();frame.remove();await bridge.close();throw error;}finally{clearTimeout(timer);}
|
|
44
|
+
return {updateResult:value=>bridge.sendToolResult(value),refreshContext:()=>bridge.setHostContext(context(frame)),async close(){disposed=true;observer.disconnect();try{await bridge.teardownResource({},{timeout:500});}catch{/* A disconnected App may not acknowledge teardown. */}await bridge.close();frame.remove();}};
|
|
21
45
|
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export function ownsScenario(unit, id) {
|
|
2
|
+
return id === unit || id.startsWith(unit + "/") || id.startsWith(unit + ".");
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
/** Proposals remain attached to the ordinary catalogue, including new owners. */
|
|
6
|
+
export function withDraftEntries(scenarios, categories, drafts, previews = new Map()) {
|
|
7
|
+
const references = new Map(drafts.map(({ id, title, revision, state, preview }) => [id, { id, title, revision, state, ...(preview ? { preview } : {}) }]));
|
|
8
|
+
const entries = new Map(scenarios.map(item => [item.id, { ...item, drafts: (item.drafts ?? []).flatMap(draft => references.has(draft.id) ? [references.get(draft.id)] : []) }]));
|
|
9
|
+
for (const item of categories) {
|
|
10
|
+
const existing = entries.get(item.id);
|
|
11
|
+
entries.set(item.id, { ...existing, ...item, kind: "tokens", drafts: existing?.drafts ?? [] });
|
|
12
|
+
}
|
|
13
|
+
const owns = (unit, item) => unit === "tokens" && item.kind === "tokens" || (item.unit ? item.unit === unit : ownsScenario(unit, item.id));
|
|
14
|
+
const attach = (entry, draft) => {
|
|
15
|
+
if (!entry.drafts.some(item => item.id === draft.id)) entry.drafts.push(references.get(draft.id));
|
|
16
|
+
};
|
|
17
|
+
// Resolve known draft scenarios first so another proposal for the same new
|
|
18
|
+
// owner cannot leave a duplicate placeholder in the catalogue.
|
|
19
|
+
for (const draft of drafts) {
|
|
20
|
+
const preview = previews.get(draft.id);
|
|
21
|
+
for (const item of preview?.scenarios ?? []) {
|
|
22
|
+
if (!draft.units.some(unit => owns(unit, item))) continue;
|
|
23
|
+
let entry = entries.get(item.id);
|
|
24
|
+
if (!entry) {
|
|
25
|
+
entry = { ...item, draftOnly: true, drafts: [] };
|
|
26
|
+
entries.set(item.id, entry);
|
|
27
|
+
}
|
|
28
|
+
attach(entry, draft);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
for (const draft of drafts) {
|
|
32
|
+
for (const unit of draft.units) {
|
|
33
|
+
const kind = unit.split("/")[0];
|
|
34
|
+
if (!["tokens", "components", "patterns", "composition"].includes(kind)) continue;
|
|
35
|
+
const owned = [...entries.values()].filter(item => owns(unit, item));
|
|
36
|
+
if (owned.length) for (const item of owned) attach(item, draft);
|
|
37
|
+
else entries.set(unit, { id: unit, unit, title: unit.split("/").at(-1), kind, draftOnly: true, pendingDraftScenario: true, drafts: [references.get(draft.id)] });
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return { scenarios: [...entries.values()], categories: [...entries.values()].filter(item => item.kind === "tokens") };
|
|
41
|
+
}
|
package/dist/showcase/index.html
CHANGED
|
@@ -9,10 +9,9 @@
|
|
|
9
9
|
<button data-section="components"><svg viewBox="0 0 16 16"><path d="m8 1 6 3.5v7L8 15l-6-3.5v-7L8 1Zm-6 3.5 6 3.5 6-3.5M8 8v7"/></svg>Components</button>
|
|
10
10
|
<button data-section="patterns"><svg viewBox="0 0 16 16"><rect x="2" y="2" width="5" height="5"/><rect x="10" y="2" width="4" height="5"/><rect x="2" y="10" width="5" height="4"/><rect x="10" y="10" width="4" height="4"/></svg>Patterns</button>
|
|
11
11
|
<button data-section="composition"><svg viewBox="0 0 16 16"><path d="M2 2h4v4H2zM10 2h4v4h-4zM2 10h4v4H2zM10 10h4v4h-4z"/></svg>Composition</button>
|
|
12
|
-
<button data-section="drafts"><svg viewBox="0 0 16 16"><path d="M3 2h7l3 3v9H3zM10 2v4h3M5 9h5M5 12h4"/></svg>Drafts</button>
|
|
13
12
|
</nav>
|
|
14
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></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>
|
|
15
14
|
</header>
|
|
16
|
-
<main><aside id="sidebar"><nav id="entries" aria-label="Tokens"></nav></aside><section id="preview" aria-label="Preview"><div id="
|
|
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="frame-slot"></div></section></main>
|
|
17
16
|
<script type="module" src="/client.js"></script>
|
|
18
17
|
</body></html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** One monochrome state per entry; proposal presence and build state are distinct. */
|
|
2
|
+
export function entryPreviewState(item, report, preferredDraft) {
|
|
3
|
+
const draft = item.drafts?.find(value => value.id === preferredDraft) ?? item.drafts?.[0];
|
|
4
|
+
const proposal = draft && (report?.drafts?.find(value => value.id === draft.id) ?? draft.preview);
|
|
5
|
+
const build = draft ? proposal?.scenarios?.find(value => value.id === item.id) ?? proposal : report?.previews?.find(value => value.id === item.id) ?? item.build;
|
|
6
|
+
const state = build?.state === "error" ? "error" : build?.state === "checking" || build?.live ? "checking"
|
|
7
|
+
: 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
|
+
return { state, label: `${draft ? "Draft · " : ""}${labels[state]}${draft && state === "ready" ? " · unaccepted" : ""}` };
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const previewGlyphs = {
|
|
13
|
+
unreported: '<circle cx="8" cy="8" r="3"/>',
|
|
14
|
+
building: '<circle cx="8" cy="8" r="5" stroke-dasharray="22 10"/>',
|
|
15
|
+
checking: '<circle cx="8" cy="8" r="5" stroke-dasharray="3 3"/><path d="m6 8 1.5 1.5L10 6"/>',
|
|
16
|
+
ready: '<circle cx="8" cy="8" r="5"/><path d="m5.5 8 1.7 1.7 3.3-3.4"/>',
|
|
17
|
+
stale: '<circle cx="8" cy="8" r="5" stroke-dasharray="2 3"/>',
|
|
18
|
+
error: '<circle cx="8" cy="8" r="5"/><path d="M8 5.5v3M8 10.5h.01"/>',
|
|
19
|
+
};
|
package/dist/showcase/style.css
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
:root{font:13px/1.5 system-ui,sans-serif;color-scheme:light;background:#fafafa;color:#444;--frame-bg:#fafafa;--frame-ink:#444;--frame-line:#ddd;--pane-width:min(276px,42vw)}
|
|
2
2
|
:root[data-theme="dark"]{color-scheme:dark;--frame-bg:#181818;--frame-ink:#ddd;--frame-line:#444;background:var(--frame-bg);color:var(--frame-ink)}
|
|
3
|
+
.entry-preview{float:right;display:inline-flex;align-items:center;margin-inline-start:8px;opacity:.65}.entry-preview svg{width:14px;height:14px}.entry-preview[data-state="building"] svg{animation:preview-spin 1s linear infinite}.entry-preview[data-state="error"],.entry-preview[data-state="ready"]{opacity:1}@keyframes preview-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.entry-preview svg{animation:none!important}}
|
|
3
4
|
*{box-sizing:border-box}body{margin:0;height:100vh;display:flex;flex-direction:column;overflow:hidden}button,a{font:inherit;color:inherit}button{cursor:pointer;background:transparent;border:1px solid var(--frame-line);border-radius:4px}button:focus-visible,a:focus-visible{outline:2px solid var(--frame-ink);outline-offset:2px}svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round;flex:none}svg:not([aria-label]){pointer-events:none}
|
|
4
5
|
header{height:52px;display:flex;flex:none;border-bottom:1px solid var(--frame-line);align-items:stretch;background:var(--frame-bg)}#brand{width:var(--pane-width);display:flex;flex:none;gap:8px;align-items:center;padding:0 12px;border-right:1px solid var(--frame-line);font-weight:600;white-space:nowrap}#brand .mark{font-weight:700}#title{min-width:0;overflow:hidden;text-overflow:ellipsis}#pane-toggle{width:28px;height:28px;margin-inline-start:auto;display:grid;place-items:center;flex:none}.collapsed #brand{width:44px;padding:0 8px;border-right:0}.collapsed #brand .mark,.collapsed #title{display:none}
|
|
5
6
|
#sections{display:flex;gap:4px;align-items:center;min-width:0;overflow-x:auto;padding:8px}#sections button{display:flex;align-items:center;gap:8px;flex:none;border-color:transparent;padding:6px 10px}#sections button[aria-current="page"]{border-color:var(--frame-line)}#sections svg{opacity:.7}.actions{display:flex;align-items:center;gap:4px;margin-inline-start:auto;padding:8px;flex:none}.actions button{width:28px;height:28px;display:grid;place-items:center}
|
|
@@ -17,7 +18,6 @@ main{flex:1;min-height:0;display:flex}#sidebar{width:var(--pane-width);flex:none
|
|
|
17
18
|
:root[data-viewport="phone"] #frame-slot{width:min(390px,100%);margin-inline:auto}
|
|
18
19
|
#viewport[aria-pressed="true"]{background:var(--frame-ink);color:var(--frame-bg)}
|
|
19
20
|
#split-view[aria-pressed="true"]{background:var(--frame-ink);color:var(--frame-bg)}button:disabled{cursor:default;opacity:.45}
|
|
20
|
-
.draft-badge{font-size:11px;padding:1px 5px;margin-inline-start:8px}.draft-comparison{height:100%;display:grid;grid-template-columns:minmax(0,1fr);min-width:0}.draft-comparison[data-split="true"]{grid-template-columns:repeat(2,minmax(0,1fr))}.draft-version{display:flex;flex-direction:column;min-width:0;min-height:0}.draft-version+ .draft-version{border-inline-start:1px solid var(--frame-line)}.draft-version h2{font-size:12px;font-weight:600;padding:6px 12px;margin:0;border-bottom:1px solid var(--frame-line)}.draft-stage{flex:1;min-height:0;display:flex;justify-content:center}.draft-stage iframe{min-width:0}
|
|
21
|
-
#draft-controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;padding:6px 12px;border-bottom:1px solid var(--frame-line)}#draft-scenario{font:inherit;background:var(--frame-bg);color:var(--frame-ink);border:1px solid var(--frame-line);border-radius:4px;max-width:260px}#draft-state{font-size:12px}
|
|
21
|
+
.draft-badge{display:inline-block;font-size:11px;font-weight:400;white-space:nowrap;padding:1px 5px;margin-inline-start:8px;border:1px solid var(--frame-line);border-radius:4px}.draft-comparison{height:100%;display:grid;grid-template-columns:minmax(0,1fr);min-width:0}.draft-comparison[data-split="true"]{grid-template-columns:repeat(2,minmax(0,1fr))}.draft-version{display:flex;flex-direction:column;min-width:0;min-height:0}.draft-version+ .draft-version{border-inline-start:1px solid var(--frame-line)}.draft-version h2{font-size:12px;font-weight:600;padding:6px 12px;margin:0;border-bottom:1px solid var(--frame-line)}.draft-stage{flex:1;min-height:0;display:flex;justify-content:center}.draft-stage iframe{min-width:0}
|
|
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)}}
|
|
@@ -21,6 +21,16 @@ UI references are allowed, but shared controllers cannot import component/patter
|
|
|
21
21
|
runtime implementations. Keep business data in application adapters. Measured
|
|
22
22
|
style writes retain exact `boundaries.styleWrites` properties; they do not allow
|
|
23
23
|
shared-token overrides or an extra styling layer.
|
|
24
|
+
Projects explicitly approve installed runtime packages through
|
|
25
|
+
`behaviorLibraries` in `ds.config.json`; each must also be a `package.json`
|
|
26
|
+
dependency. Components, patterns and controllers may use them directly, including
|
|
27
|
+
package subpaths. Extract a shared controller when behavior is shared. Type-only
|
|
28
|
+
and development-role imports retain their existing rules. An empty/missing list
|
|
29
|
+
allows no additional runtime packages beyond the configured framework and Linaria.
|
|
30
|
+
ADS checks declarations and installed versions, not third-party source or
|
|
31
|
+
transitive dependency trees. The preview build bundles used code normally inside
|
|
32
|
+
the MCP App sandbox. Existing project styling and measured-geometry guards keep
|
|
33
|
+
their scope; declaration creates no broad style-write permissions.
|
|
24
34
|
These gates inspect supported direct imports, markup and style boundaries.
|
|
25
35
|
External package internals and delegated DOM behavior still require source,
|
|
26
36
|
build and browser review; declaring a dependency does not prove it is headless.
|
|
@@ -49,6 +49,20 @@ Call `ads_show_draft({id,scenario?})`, then inspect its actual `showcaseUrl` in
|
|
|
49
49
|
browser. The preview reuses an isolated compiler workspace across edits and does
|
|
50
50
|
not run acceptance checks. Up to four draft compiler sessions stay warm; opening
|
|
51
51
|
more reclaims an older generated workspace without deleting its tracked proposal.
|
|
52
|
+
Creation queues compiler prewarming without delaying its response. Bursts of
|
|
53
|
+
creations coalesce, and only one queued compiler initializes at a time. A newer
|
|
54
|
+
speculative prewarm reclaims the older unused one; explicitly opened sessions
|
|
55
|
+
remain warm within the four-session bound. MCP edits
|
|
56
|
+
and direct draft-file edits notify warm previews through file events; periodic
|
|
57
|
+
reconciliation recovers missed events. Watched builds compile requested scenarios
|
|
58
|
+
and their dependencies, retaining roots used by other open previews. Full builds
|
|
59
|
+
and validation still cover the complete configured scope. Incremental semantic
|
|
60
|
+
analysis reuses unchanged TypeScript source trees without caching passing checks.
|
|
61
|
+
Reopening a known scenario renders through the existing compiler while a worker
|
|
62
|
+
refreshes catalogue metadata. Read `discovery.state` (`current`, `pending`,
|
|
63
|
+
`error`) and its metadata revision separately from the exact proposal revision.
|
|
64
|
+
New/missing scenario identities wait for fresh discovery. A previous preview may
|
|
65
|
+
stay visible until compilation finishes; pending/stale output is not evidence.
|
|
52
66
|
Reopen after edits to obtain the current revision.
|
|
53
67
|
Compilation is feedback, not passing behavior/visual evidence.
|
|
54
68
|
|
|
@@ -73,10 +87,35 @@ Independent shared-barrel exports are merged; overlapping source changes remain
|
|
|
73
87
|
explicit conflicts. Review the dependent's new revision before accepting it.
|
|
74
88
|
If a dependency is dropped, correct the remaining draft's dependency list.
|
|
75
89
|
|
|
76
|
-
DS Explorer
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
DS Explorer keeps drafts in the ordinary Tokens, Components, Patterns and
|
|
91
|
+
Composition navigation. A Draft badge marks an owner with a pending proposal,
|
|
92
|
+
whether or not it has an accepted version. Select that entry and use the header
|
|
93
|
+
Split view toggle to compare Accepted and Draft in the right pane. Both use the
|
|
94
|
+
same scenario/theme and available or phone viewport width. New owners appear
|
|
95
|
+
in their normal section; without an accepted counterpart they show only the
|
|
96
|
+
draft and disable comparison. There is no separate Drafts tab or scenario picker.
|
|
97
|
+
An isolated overlay can also render an unchanged scenario as an explicit review
|
|
98
|
+
context; that alone does not give its owner a Draft badge. Use `ads_drafts` for
|
|
99
|
+
draft-only MCP listing.
|
|
100
|
+
|
|
101
|
+
After 20 retained module revisions, Explorer restarts the affected App to release
|
|
102
|
+
its module cache, then restores the selected scenario/theme/viewport. Comparison
|
|
103
|
+
keeps the other version mounted; no manual reload or draft acceptance is needed.
|
|
104
|
+
|
|
105
|
+
Explorer entry glyphs separately show preview build states in monochrome: not
|
|
106
|
+
built, building, compiled/checking, ready, stale and failed. MCP draft summaries
|
|
107
|
+
include `preview` and preview calls include `build`; inspect `building`,
|
|
108
|
+
`current`, `stale`, scenario revisions and `preview.resourceUri` for detail.
|
|
109
|
+
Subscribe to `ads://project/build` and `ads://project/drafts` for standard
|
|
110
|
+
resource-update notifications on completion, failure and metadata refresh, or
|
|
111
|
+
subscribe only to an active draft's `preview.resourceUri` for its isolated report.
|
|
112
|
+
Modern clients use `subscriptions/listen` resource filters; older clients use
|
|
113
|
+
`resources/subscribe`. Re-read notified resources to update the existing view;
|
|
114
|
+
unsubscribe on teardown and resubscribe/read after reconnect. Removal invalidates
|
|
115
|
+
the scoped resource. Poll when the host does not forward notifications.
|
|
116
|
+
Build completion and mounted-App rendering readiness are separate. Ready draft
|
|
117
|
+
output remains unaccepted. Review the
|
|
118
|
+
current rendered revision and complete acceptance before finishing the change.
|
|
80
119
|
|
|
81
120
|
## Accept or drop
|
|
82
121
|
|
|
@@ -103,6 +103,15 @@ compiler. Existing custom adapters still work; they must adopt the helper to gai
|
|
|
103
103
|
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
104
|
Keep the full validation callback and production build behavior.
|
|
105
105
|
|
|
106
|
+
Managed acceptance builds every scenario in production mode and shares the
|
|
107
|
+
candidate compiler/checked output with browser verification. Remove
|
|
108
|
+
`build:mcp-previews` from `mcp.mutationChecks` after upgrading ADS; keep that script
|
|
109
|
+
in normal builds. Explicit project commands still run as configured. During
|
|
110
|
+
acceptance ADS parks accepted/draft compilers but retains their publications;
|
|
111
|
+
an old view remains visible while verified preview requests wait. Do not launch
|
|
112
|
+
a second compiler to work around that wait. Semantic workers retire after five
|
|
113
|
+
idle seconds and rediscover from revision-fenced metadata when needed.
|
|
114
|
+
|
|
106
115
|
The shared watched builder reuses completed self-contained IIFE worker bundles
|
|
107
116
|
for constructor URLs and standard `?worker`/`?worker&url` imports. It uses Vite's
|
|
108
117
|
configured worker plugins, deduplicates pending requests, tracks real worker and
|
|
@@ -67,3 +67,9 @@ separate latest validation result, alongside verification and mutation results.
|
|
|
67
67
|
Source changes during execution reject success and leave the previous full
|
|
68
68
|
baseline intact. Skipped registered behavior cases never pass; a project with no
|
|
69
69
|
registered behavior contracts reports that stage as skipped with a reason.
|
|
70
|
+
|
|
71
|
+
Registered browser verification queues the selected scenario roots together
|
|
72
|
+
before browser workers open their pages. They share one candidate graph and
|
|
73
|
+
keep independent App state. This avoids compiling a growing graph per page.
|
|
74
|
+
A graph revision changing during startup keeps the preview pending until a
|
|
75
|
+
coherent current build mounts; it does not establish passing case evidence.
|
|
@@ -152,6 +152,13 @@ matching-property fixes, plus the build resolver for preserving opaque custom
|
|
|
152
152
|
properties through extraction. Review warnings in the real `cx` composition and verify
|
|
153
153
|
computed styles across affected sizes/states; retain intentional product behavior.
|
|
154
154
|
|
|
155
|
+
For positioning, menu/listbox keyboard handling, focus trapping and virtual lists,
|
|
156
|
+
prefer an installed library already listed in `ds.config.json` behaviorLibraries.
|
|
157
|
+
Use it directly in its consuming component, pattern or controller, with project-owned
|
|
158
|
+
styling and existing measured-geometry boundaries. If none fits, suggest a suitable
|
|
159
|
+
framework-free package for approval or implement natively. Add dependencies and
|
|
160
|
+
allowlist entries only with authorization; existing approval need not be repeated.
|
|
161
|
+
|
|
155
162
|
Controllers are UI behavior owners: private helpers stay with their component or
|
|
156
163
|
pattern; reusable controllers use discovered `controllers/<Name>` units. Use the
|
|
157
164
|
project's configured framework and declared dependencies, or plain TypeScript,
|
|
@@ -21,6 +21,16 @@ UI references are allowed, but shared controllers cannot import component/patter
|
|
|
21
21
|
runtime implementations. Keep business data in application adapters. Measured
|
|
22
22
|
style writes retain exact `boundaries.styleWrites` properties; they do not allow
|
|
23
23
|
shared-token overrides or an extra styling layer.
|
|
24
|
+
Projects explicitly approve installed runtime packages through
|
|
25
|
+
`behaviorLibraries` in `ds.config.json`; each must also be a `package.json`
|
|
26
|
+
dependency. Components, patterns and controllers may use them directly, including
|
|
27
|
+
package subpaths. Extract a shared controller when behavior is shared. Type-only
|
|
28
|
+
and development-role imports retain their existing rules. An empty/missing list
|
|
29
|
+
allows no additional runtime packages beyond the configured framework and Linaria.
|
|
30
|
+
ADS checks declarations and installed versions, not third-party source or
|
|
31
|
+
transitive dependency trees. The preview build bundles used code normally inside
|
|
32
|
+
the MCP App sandbox. Existing project styling and measured-geometry guards keep
|
|
33
|
+
their scope; declaration creates no broad style-write permissions.
|
|
24
34
|
These gates inspect supported direct imports, markup and style boundaries.
|
|
25
35
|
External package internals and delegated DOM behavior still require source,
|
|
26
36
|
build and browser review; declaring a dependency does not prove it is headless.
|
|
@@ -49,6 +49,20 @@ Call `ads_show_draft({id,scenario?})`, then inspect its actual `showcaseUrl` in
|
|
|
49
49
|
browser. The preview reuses an isolated compiler workspace across edits and does
|
|
50
50
|
not run acceptance checks. Up to four draft compiler sessions stay warm; opening
|
|
51
51
|
more reclaims an older generated workspace without deleting its tracked proposal.
|
|
52
|
+
Creation queues compiler prewarming without delaying its response. Bursts of
|
|
53
|
+
creations coalesce, and only one queued compiler initializes at a time. A newer
|
|
54
|
+
speculative prewarm reclaims the older unused one; explicitly opened sessions
|
|
55
|
+
remain warm within the four-session bound. MCP edits
|
|
56
|
+
and direct draft-file edits notify warm previews through file events; periodic
|
|
57
|
+
reconciliation recovers missed events. Watched builds compile requested scenarios
|
|
58
|
+
and their dependencies, retaining roots used by other open previews. Full builds
|
|
59
|
+
and validation still cover the complete configured scope. Incremental semantic
|
|
60
|
+
analysis reuses unchanged TypeScript source trees without caching passing checks.
|
|
61
|
+
Reopening a known scenario renders through the existing compiler while a worker
|
|
62
|
+
refreshes catalogue metadata. Read `discovery.state` (`current`, `pending`,
|
|
63
|
+
`error`) and its metadata revision separately from the exact proposal revision.
|
|
64
|
+
New/missing scenario identities wait for fresh discovery. A previous preview may
|
|
65
|
+
stay visible until compilation finishes; pending/stale output is not evidence.
|
|
52
66
|
Reopen after edits to obtain the current revision.
|
|
53
67
|
Compilation is feedback, not passing behavior/visual evidence.
|
|
54
68
|
|
|
@@ -73,10 +87,35 @@ Independent shared-barrel exports are merged; overlapping source changes remain
|
|
|
73
87
|
explicit conflicts. Review the dependent's new revision before accepting it.
|
|
74
88
|
If a dependency is dropped, correct the remaining draft's dependency list.
|
|
75
89
|
|
|
76
|
-
DS Explorer
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
DS Explorer keeps drafts in the ordinary Tokens, Components, Patterns and
|
|
91
|
+
Composition navigation. A Draft badge marks an owner with a pending proposal,
|
|
92
|
+
whether or not it has an accepted version. Select that entry and use the header
|
|
93
|
+
Split view toggle to compare Accepted and Draft in the right pane. Both use the
|
|
94
|
+
same scenario/theme and available or phone viewport width. New owners appear
|
|
95
|
+
in their normal section; without an accepted counterpart they show only the
|
|
96
|
+
draft and disable comparison. There is no separate Drafts tab or scenario picker.
|
|
97
|
+
An isolated overlay can also render an unchanged scenario as an explicit review
|
|
98
|
+
context; that alone does not give its owner a Draft badge. Use `ads_drafts` for
|
|
99
|
+
draft-only MCP listing.
|
|
100
|
+
|
|
101
|
+
After 20 retained module revisions, Explorer restarts the affected App to release
|
|
102
|
+
its module cache, then restores the selected scenario/theme/viewport. Comparison
|
|
103
|
+
keeps the other version mounted; no manual reload or draft acceptance is needed.
|
|
104
|
+
|
|
105
|
+
Explorer entry glyphs separately show preview build states in monochrome: not
|
|
106
|
+
built, building, compiled/checking, ready, stale and failed. MCP draft summaries
|
|
107
|
+
include `preview` and preview calls include `build`; inspect `building`,
|
|
108
|
+
`current`, `stale`, scenario revisions and `preview.resourceUri` for detail.
|
|
109
|
+
Subscribe to `ads://project/build` and `ads://project/drafts` for standard
|
|
110
|
+
resource-update notifications on completion, failure and metadata refresh, or
|
|
111
|
+
subscribe only to an active draft's `preview.resourceUri` for its isolated report.
|
|
112
|
+
Modern clients use `subscriptions/listen` resource filters; older clients use
|
|
113
|
+
`resources/subscribe`. Re-read notified resources to update the existing view;
|
|
114
|
+
unsubscribe on teardown and resubscribe/read after reconnect. Removal invalidates
|
|
115
|
+
the scoped resource. Poll when the host does not forward notifications.
|
|
116
|
+
Build completion and mounted-App rendering readiness are separate. Ready draft
|
|
117
|
+
output remains unaccepted. Review the
|
|
118
|
+
current rendered revision and complete acceptance before finishing the change.
|
|
80
119
|
|
|
81
120
|
## Accept or drop
|
|
82
121
|
|
|
@@ -103,6 +103,15 @@ compiler. Existing custom adapters still work; they must adopt the helper to gai
|
|
|
103
103
|
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
104
|
Keep the full validation callback and production build behavior.
|
|
105
105
|
|
|
106
|
+
Managed acceptance builds every scenario in production mode and shares the
|
|
107
|
+
candidate compiler/checked output with browser verification. Remove
|
|
108
|
+
`build:mcp-previews` from `mcp.mutationChecks` after upgrading ADS; keep that script
|
|
109
|
+
in normal builds. Explicit project commands still run as configured. During
|
|
110
|
+
acceptance ADS parks accepted/draft compilers but retains their publications;
|
|
111
|
+
an old view remains visible while verified preview requests wait. Do not launch
|
|
112
|
+
a second compiler to work around that wait. Semantic workers retire after five
|
|
113
|
+
idle seconds and rediscover from revision-fenced metadata when needed.
|
|
114
|
+
|
|
106
115
|
The shared watched builder reuses completed self-contained IIFE worker bundles
|
|
107
116
|
for constructor URLs and standard `?worker`/`?worker&url` imports. It uses Vite's
|
|
108
117
|
configured worker plugins, deduplicates pending requests, tracks real worker and
|
|
@@ -67,3 +67,9 @@ separate latest validation result, alongside verification and mutation results.
|
|
|
67
67
|
Source changes during execution reject success and leave the previous full
|
|
68
68
|
baseline intact. Skipped registered behavior cases never pass; a project with no
|
|
69
69
|
registered behavior contracts reports that stage as skipped with a reason.
|
|
70
|
+
|
|
71
|
+
Registered browser verification queues the selected scenario roots together
|
|
72
|
+
before browser workers open their pages. They share one candidate graph and
|
|
73
|
+
keep independent App state. This avoids compiling a growing graph per page.
|
|
74
|
+
A graph revision changing during startup keeps the preview pending until a
|
|
75
|
+
coherent current build mounts; it does not establish passing case evidence.
|
|
@@ -282,6 +282,10 @@ style ownership, documentation, and verification. Copy selected items and needed
|
|
|
282
282
|
helpers/styles/assets into the matching target layers. Reuse target dependencies
|
|
283
283
|
only after checking compatible APIs and behavior. Merge only necessary external
|
|
284
284
|
dependencies and build support; keep the target's framework and unrelated scripts.
|
|
285
|
+
When selected items use an external behavior package, confirm authorization to add
|
|
286
|
+
it to the destination's `behaviorLibraries` and `package.json` dependencies, reusing
|
|
287
|
+
an existing compatible installation. Do not ask again when that choice is already
|
|
288
|
+
authorized. Preserve the installed library API; ADS's style/geometry rules still apply.
|
|
285
289
|
|
|
286
290
|
Preserve interaction, accessibility, lifecycle, gestures, and animation mechanics.
|
|
287
291
|
Rewrite paths, token references, and exports as required by the integration. A different
|
|
@@ -21,6 +21,16 @@ UI references are allowed, but shared controllers cannot import component/patter
|
|
|
21
21
|
runtime implementations. Keep business data in application adapters. Measured
|
|
22
22
|
style writes retain exact `boundaries.styleWrites` properties; they do not allow
|
|
23
23
|
shared-token overrides or an extra styling layer.
|
|
24
|
+
Projects explicitly approve installed runtime packages through
|
|
25
|
+
`behaviorLibraries` in `ds.config.json`; each must also be a `package.json`
|
|
26
|
+
dependency. Components, patterns and controllers may use them directly, including
|
|
27
|
+
package subpaths. Extract a shared controller when behavior is shared. Type-only
|
|
28
|
+
and development-role imports retain their existing rules. An empty/missing list
|
|
29
|
+
allows no additional runtime packages beyond the configured framework and Linaria.
|
|
30
|
+
ADS checks declarations and installed versions, not third-party source or
|
|
31
|
+
transitive dependency trees. The preview build bundles used code normally inside
|
|
32
|
+
the MCP App sandbox. Existing project styling and measured-geometry guards keep
|
|
33
|
+
their scope; declaration creates no broad style-write permissions.
|
|
24
34
|
These gates inspect supported direct imports, markup and style boundaries.
|
|
25
35
|
External package internals and delegated DOM behavior still require source,
|
|
26
36
|
build and browser review; declaring a dependency does not prove it is headless.
|
|
@@ -49,6 +49,20 @@ Call `ads_show_draft({id,scenario?})`, then inspect its actual `showcaseUrl` in
|
|
|
49
49
|
browser. The preview reuses an isolated compiler workspace across edits and does
|
|
50
50
|
not run acceptance checks. Up to four draft compiler sessions stay warm; opening
|
|
51
51
|
more reclaims an older generated workspace without deleting its tracked proposal.
|
|
52
|
+
Creation queues compiler prewarming without delaying its response. Bursts of
|
|
53
|
+
creations coalesce, and only one queued compiler initializes at a time. A newer
|
|
54
|
+
speculative prewarm reclaims the older unused one; explicitly opened sessions
|
|
55
|
+
remain warm within the four-session bound. MCP edits
|
|
56
|
+
and direct draft-file edits notify warm previews through file events; periodic
|
|
57
|
+
reconciliation recovers missed events. Watched builds compile requested scenarios
|
|
58
|
+
and their dependencies, retaining roots used by other open previews. Full builds
|
|
59
|
+
and validation still cover the complete configured scope. Incremental semantic
|
|
60
|
+
analysis reuses unchanged TypeScript source trees without caching passing checks.
|
|
61
|
+
Reopening a known scenario renders through the existing compiler while a worker
|
|
62
|
+
refreshes catalogue metadata. Read `discovery.state` (`current`, `pending`,
|
|
63
|
+
`error`) and its metadata revision separately from the exact proposal revision.
|
|
64
|
+
New/missing scenario identities wait for fresh discovery. A previous preview may
|
|
65
|
+
stay visible until compilation finishes; pending/stale output is not evidence.
|
|
52
66
|
Reopen after edits to obtain the current revision.
|
|
53
67
|
Compilation is feedback, not passing behavior/visual evidence.
|
|
54
68
|
|
|
@@ -73,10 +87,35 @@ Independent shared-barrel exports are merged; overlapping source changes remain
|
|
|
73
87
|
explicit conflicts. Review the dependent's new revision before accepting it.
|
|
74
88
|
If a dependency is dropped, correct the remaining draft's dependency list.
|
|
75
89
|
|
|
76
|
-
DS Explorer
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
DS Explorer keeps drafts in the ordinary Tokens, Components, Patterns and
|
|
91
|
+
Composition navigation. A Draft badge marks an owner with a pending proposal,
|
|
92
|
+
whether or not it has an accepted version. Select that entry and use the header
|
|
93
|
+
Split view toggle to compare Accepted and Draft in the right pane. Both use the
|
|
94
|
+
same scenario/theme and available or phone viewport width. New owners appear
|
|
95
|
+
in their normal section; without an accepted counterpart they show only the
|
|
96
|
+
draft and disable comparison. There is no separate Drafts tab or scenario picker.
|
|
97
|
+
An isolated overlay can also render an unchanged scenario as an explicit review
|
|
98
|
+
context; that alone does not give its owner a Draft badge. Use `ads_drafts` for
|
|
99
|
+
draft-only MCP listing.
|
|
100
|
+
|
|
101
|
+
After 20 retained module revisions, Explorer restarts the affected App to release
|
|
102
|
+
its module cache, then restores the selected scenario/theme/viewport. Comparison
|
|
103
|
+
keeps the other version mounted; no manual reload or draft acceptance is needed.
|
|
104
|
+
|
|
105
|
+
Explorer entry glyphs separately show preview build states in monochrome: not
|
|
106
|
+
built, building, compiled/checking, ready, stale and failed. MCP draft summaries
|
|
107
|
+
include `preview` and preview calls include `build`; inspect `building`,
|
|
108
|
+
`current`, `stale`, scenario revisions and `preview.resourceUri` for detail.
|
|
109
|
+
Subscribe to `ads://project/build` and `ads://project/drafts` for standard
|
|
110
|
+
resource-update notifications on completion, failure and metadata refresh, or
|
|
111
|
+
subscribe only to an active draft's `preview.resourceUri` for its isolated report.
|
|
112
|
+
Modern clients use `subscriptions/listen` resource filters; older clients use
|
|
113
|
+
`resources/subscribe`. Re-read notified resources to update the existing view;
|
|
114
|
+
unsubscribe on teardown and resubscribe/read after reconnect. Removal invalidates
|
|
115
|
+
the scoped resource. Poll when the host does not forward notifications.
|
|
116
|
+
Build completion and mounted-App rendering readiness are separate. Ready draft
|
|
117
|
+
output remains unaccepted. Review the
|
|
118
|
+
current rendered revision and complete acceptance before finishing the change.
|
|
80
119
|
|
|
81
120
|
## Accept or drop
|
|
82
121
|
|
|
@@ -103,6 +103,15 @@ compiler. Existing custom adapters still work; they must adopt the helper to gai
|
|
|
103
103
|
incremental transforms. Upgrade the project dependency and restart the builder.
|
|
104
104
|
Keep the full validation callback and production build behavior.
|
|
105
105
|
|
|
106
|
+
Managed acceptance builds every scenario in production mode and shares the
|
|
107
|
+
candidate compiler/checked output with browser verification. Remove
|
|
108
|
+
`build:mcp-previews` from `mcp.mutationChecks` after upgrading ADS; keep that script
|
|
109
|
+
in normal builds. Explicit project commands still run as configured. During
|
|
110
|
+
acceptance ADS parks accepted/draft compilers but retains their publications;
|
|
111
|
+
an old view remains visible while verified preview requests wait. Do not launch
|
|
112
|
+
a second compiler to work around that wait. Semantic workers retire after five
|
|
113
|
+
idle seconds and rediscover from revision-fenced metadata when needed.
|
|
114
|
+
|
|
106
115
|
The shared watched builder reuses completed self-contained IIFE worker bundles
|
|
107
116
|
for constructor URLs and standard `?worker`/`?worker&url` imports. It uses Vite's
|
|
108
117
|
configured worker plugins, deduplicates pending requests, tracks real worker and
|
|
@@ -67,3 +67,9 @@ separate latest validation result, alongside verification and mutation results.
|
|
|
67
67
|
Source changes during execution reject success and leave the previous full
|
|
68
68
|
baseline intact. Skipped registered behavior cases never pass; a project with no
|
|
69
69
|
registered behavior contracts reports that stage as skipped with a reason.
|
|
70
|
+
|
|
71
|
+
Registered browser verification queues the selected scenario roots together
|
|
72
|
+
before browser workers open their pages. They share one candidate graph and
|
|
73
|
+
keep independent App state. This avoids compiling a growing graph per page.
|
|
74
|
+
A graph revision changing during startup keeps the preview pending until a
|
|
75
|
+
coherent current build mounts; it does not establish passing case evidence.
|
|
@@ -21,6 +21,16 @@ UI references are allowed, but shared controllers cannot import component/patter
|
|
|
21
21
|
runtime implementations. Keep business data in application adapters. Measured
|
|
22
22
|
style writes retain exact `boundaries.styleWrites` properties; they do not allow
|
|
23
23
|
shared-token overrides or an extra styling layer.
|
|
24
|
+
Projects explicitly approve installed runtime packages through
|
|
25
|
+
`behaviorLibraries` in `ds.config.json`; each must also be a `package.json`
|
|
26
|
+
dependency. Components, patterns and controllers may use them directly, including
|
|
27
|
+
package subpaths. Extract a shared controller when behavior is shared. Type-only
|
|
28
|
+
and development-role imports retain their existing rules. An empty/missing list
|
|
29
|
+
allows no additional runtime packages beyond the configured framework and Linaria.
|
|
30
|
+
ADS checks declarations and installed versions, not third-party source or
|
|
31
|
+
transitive dependency trees. The preview build bundles used code normally inside
|
|
32
|
+
the MCP App sandbox. Existing project styling and measured-geometry guards keep
|
|
33
|
+
their scope; declaration creates no broad style-write permissions.
|
|
24
34
|
These gates inspect supported direct imports, markup and style boundaries.
|
|
25
35
|
External package internals and delegated DOM behavior still require source,
|
|
26
36
|
build and browser review; declaring a dependency does not prove it is headless.
|
|
@@ -49,6 +49,20 @@ Call `ads_show_draft({id,scenario?})`, then inspect its actual `showcaseUrl` in
|
|
|
49
49
|
browser. The preview reuses an isolated compiler workspace across edits and does
|
|
50
50
|
not run acceptance checks. Up to four draft compiler sessions stay warm; opening
|
|
51
51
|
more reclaims an older generated workspace without deleting its tracked proposal.
|
|
52
|
+
Creation queues compiler prewarming without delaying its response. Bursts of
|
|
53
|
+
creations coalesce, and only one queued compiler initializes at a time. A newer
|
|
54
|
+
speculative prewarm reclaims the older unused one; explicitly opened sessions
|
|
55
|
+
remain warm within the four-session bound. MCP edits
|
|
56
|
+
and direct draft-file edits notify warm previews through file events; periodic
|
|
57
|
+
reconciliation recovers missed events. Watched builds compile requested scenarios
|
|
58
|
+
and their dependencies, retaining roots used by other open previews. Full builds
|
|
59
|
+
and validation still cover the complete configured scope. Incremental semantic
|
|
60
|
+
analysis reuses unchanged TypeScript source trees without caching passing checks.
|
|
61
|
+
Reopening a known scenario renders through the existing compiler while a worker
|
|
62
|
+
refreshes catalogue metadata. Read `discovery.state` (`current`, `pending`,
|
|
63
|
+
`error`) and its metadata revision separately from the exact proposal revision.
|
|
64
|
+
New/missing scenario identities wait for fresh discovery. A previous preview may
|
|
65
|
+
stay visible until compilation finishes; pending/stale output is not evidence.
|
|
52
66
|
Reopen after edits to obtain the current revision.
|
|
53
67
|
Compilation is feedback, not passing behavior/visual evidence.
|
|
54
68
|
|
|
@@ -73,10 +87,35 @@ Independent shared-barrel exports are merged; overlapping source changes remain
|
|
|
73
87
|
explicit conflicts. Review the dependent's new revision before accepting it.
|
|
74
88
|
If a dependency is dropped, correct the remaining draft's dependency list.
|
|
75
89
|
|
|
76
|
-
DS Explorer
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
90
|
+
DS Explorer keeps drafts in the ordinary Tokens, Components, Patterns and
|
|
91
|
+
Composition navigation. A Draft badge marks an owner with a pending proposal,
|
|
92
|
+
whether or not it has an accepted version. Select that entry and use the header
|
|
93
|
+
Split view toggle to compare Accepted and Draft in the right pane. Both use the
|
|
94
|
+
same scenario/theme and available or phone viewport width. New owners appear
|
|
95
|
+
in their normal section; without an accepted counterpart they show only the
|
|
96
|
+
draft and disable comparison. There is no separate Drafts tab or scenario picker.
|
|
97
|
+
An isolated overlay can also render an unchanged scenario as an explicit review
|
|
98
|
+
context; that alone does not give its owner a Draft badge. Use `ads_drafts` for
|
|
99
|
+
draft-only MCP listing.
|
|
100
|
+
|
|
101
|
+
After 20 retained module revisions, Explorer restarts the affected App to release
|
|
102
|
+
its module cache, then restores the selected scenario/theme/viewport. Comparison
|
|
103
|
+
keeps the other version mounted; no manual reload or draft acceptance is needed.
|
|
104
|
+
|
|
105
|
+
Explorer entry glyphs separately show preview build states in monochrome: not
|
|
106
|
+
built, building, compiled/checking, ready, stale and failed. MCP draft summaries
|
|
107
|
+
include `preview` and preview calls include `build`; inspect `building`,
|
|
108
|
+
`current`, `stale`, scenario revisions and `preview.resourceUri` for detail.
|
|
109
|
+
Subscribe to `ads://project/build` and `ads://project/drafts` for standard
|
|
110
|
+
resource-update notifications on completion, failure and metadata refresh, or
|
|
111
|
+
subscribe only to an active draft's `preview.resourceUri` for its isolated report.
|
|
112
|
+
Modern clients use `subscriptions/listen` resource filters; older clients use
|
|
113
|
+
`resources/subscribe`. Re-read notified resources to update the existing view;
|
|
114
|
+
unsubscribe on teardown and resubscribe/read after reconnect. Removal invalidates
|
|
115
|
+
the scoped resource. Poll when the host does not forward notifications.
|
|
116
|
+
Build completion and mounted-App rendering readiness are separate. Ready draft
|
|
117
|
+
output remains unaccepted. Review the
|
|
118
|
+
current rendered revision and complete acceptance before finishing the change.
|
|
80
119
|
|
|
81
120
|
## Accept or drop
|
|
82
121
|
|