foundry-design-web-adapter 0.2.0-beta.5 → 0.2.0-beta.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 +23 -13
- package/dist/adapter.js +14 -13
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,30 +6,40 @@ Foundry is a local-first precision design workbench for Codex, Cursor, and Claud
|
|
|
6
6
|
|
|
7
7
|
Foundry is distributed through npm, so testers do not need GitHub access.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> **Current public beta:** `0.2.0-beta.6`. Install Foundry with the `@beta` tag. The unqualified npm `latest` tag still points to an earlier beta and is not the current testing channel.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Full documentation is available at [withfoundry.ai](https://withfoundry.ai).
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
### Recommended: one command
|
|
14
|
+
|
|
15
|
+
Open a terminal in the project, or ask Codex, Cursor, or Claude Code to run:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx foundry-design@beta
|
|
15
19
|
```
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
That command detects the project and active coding agent, installs or safely updates Foundry, repairs the shared agent connection, validates its integration, starts the project when needed, and opens the visual session. On the first installation only, restart the coding agent once so it can load the shared MCP connection. A reviewed batch can be queued before the restart and will be claimed when the agent reconnects.
|
|
18
22
|
|
|
19
|
-
|
|
23
|
+
After the restart, reopen the same project folder and ask:
|
|
20
24
|
|
|
21
25
|
```text
|
|
22
26
|
Start Foundry for this project and keep listening for Apply with agent requests.
|
|
23
27
|
```
|
|
24
28
|
|
|
25
|
-
That is the normal workflow. Foundry
|
|
29
|
+
That is the normal workflow. Foundry resumes the most recent session for the current source revision and keeps all review and apply state local.
|
|
26
30
|
|
|
27
31
|
### Manual installation
|
|
28
32
|
|
|
29
|
-
From the project you want to inspect, run:
|
|
33
|
+
From the first project you want to inspect, run:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npx foundry-design@beta setup --global
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For later projects, keep the shared agent connection and install only the development adapter:
|
|
30
40
|
|
|
31
41
|
```bash
|
|
32
|
-
npx foundry-design@beta setup
|
|
42
|
+
npx foundry-design@beta setup --agent none
|
|
33
43
|
```
|
|
34
44
|
|
|
35
45
|
Then restart the coding agent, reopen the same project folder, and ask:
|
|
@@ -38,7 +48,7 @@ Then restart the coding agent, reopen the same project folder, and ask:
|
|
|
38
48
|
Start Foundry for this project and keep listening for Apply with agent requests.
|
|
39
49
|
```
|
|
40
50
|
|
|
41
|
-
You do not need to run a second terminal command when the agent starts Foundry for you.
|
|
51
|
+
You do not need to run a second terminal command when the agent starts Foundry for you. Apply requests remain queued safely when the agent is offline. Run `npx foundry-design@beta doctor --repair` if the connection or generated integration needs repair.
|
|
42
52
|
|
|
43
53
|
Update an existing installation with:
|
|
44
54
|
|
|
@@ -56,13 +66,13 @@ npx foundry-design@beta uninstall
|
|
|
56
66
|
|
|
57
67
|
Supported automatic web integration currently includes Next.js App Router, Vite, and plain HTML. Generic web, SwiftUI, and React Native projects receive explicit setup guidance when a safe automatic edit is not available.
|
|
58
68
|
|
|
59
|
-
The
|
|
69
|
+
The npm setup above is the public beta installation path and includes the same portable skill and MCP connection used by the agent plugin bundle.
|
|
60
70
|
|
|
61
|
-
The beta supports Node.js 20 or newer. Read
|
|
71
|
+
The beta supports Node.js 20 or newer. Read the [local-first safety model](https://withfoundry.ai/#safety) before using it with sensitive work.
|
|
62
72
|
|
|
63
73
|
## Agent plugin
|
|
64
74
|
|
|
65
|
-
The portable plugin lives at `plugins/foundry-design-control`. The repository also includes marketplace manifests for Codex, Cursor, and Claude-compatible plugin import. Once installed, ask your agent:
|
|
75
|
+
The portable plugin lives at `plugins/foundry-design-control`. The repository also includes marketplace manifests for Codex, Cursor, and Claude-compatible plugin import. Until public marketplace review is complete, `setup --global` installs the same reusable skill and MCP connection from npm without requiring source-repository access. Once installed, ask your agent:
|
|
66
76
|
|
|
67
77
|
```text
|
|
68
78
|
Start Foundry for this project.
|
package/dist/adapter.js
CHANGED
|
@@ -1216,7 +1216,7 @@ var PANEL_CSS = `
|
|
|
1216
1216
|
.review-head strong { font-size:12px; }.review-summary { padding:12px 16px 12px;border-bottom:1px solid var(--fdc-line);background:#fcfcfc; }.review-summary strong { display:block;font-size:12px;font-weight:550;letter-spacing:-.01em; }.review-summary span { display:block;margin-top:4px;color:var(--fdc-muted);font-size:12px;line-height:1.45; }.review-summary.attention strong { color:#8b4d3d; }.review-toolbar button { height:28px;padding:0 8px;font-size:12px; }
|
|
1217
1217
|
.onboarding-card { bottom:84px;width:340px;padding:16px;border-radius:12px;box-shadow:0 16px 40px rgb(0 0 0 / 15%); }.onboarding-card-head { gap:8px; }.onboarding-card-head span { width:28px;height:28px;display:grid;place-items:center;color:#a75031;background:#fbf1ed;border-radius:8px; }.onboarding-card-head svg { width:16px;height:16px;color:inherit; }.onboarding-card-head strong { font-size:12px;letter-spacing:-.015em; }.onboarding-card>p { margin:8px 0 16px;font-size:12px;line-height:1.55; }.onboarding-steps { display:grid;grid-template-columns:1fr;gap:1px;border:1px solid var(--fdc-line);border-radius:8px;overflow:hidden;background:var(--fdc-line); }.onboarding-step { display:grid;grid-template-columns:24px 1fr;gap:8px;padding:8px 12px;background:white;text-align:left; }.onboarding-step b { color:#8a8a8a;font-size:8px;font-weight:500;letter-spacing:.04em; }.onboarding-step strong { display:block;font-size:12px;font-weight:550; }.onboarding-step small { display:block;margin-top:4px;color:var(--fdc-muted);font-size:8px;line-height:1.35; }.onboarding-actions { gap:8px;margin-top:12px; }.onboarding-actions button { height:32px;padding:0 12px;border-radius:8px;font-size:12px; }
|
|
1218
1218
|
.onboarding-card,.onboarding-step { color:var(--fdc-ink);background:var(--fdc-surface); }.onboarding-card-head span { color:#e7a68c;background:#36231d; }.onboarding-actions button { color:var(--fdc-ink);background:var(--fdc-elevated);border-color:var(--fdc-line); }.onboarding-actions .onboarding-start { color:#141416;background:#f0f1f3;border-color:#f0f1f3; }
|
|
1219
|
-
.status-popover { width:256px; }.status-popover-actions { display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-top:8px; }.status-popover .status-popover-actions button { height:32px;margin:0; }.status-popover .status-popover-actions [data-status-retry] { grid-column:1/-1; }
|
|
1219
|
+
.status-popover { width:256px; }.status-popover-actions { display:grid;grid-template-columns:1fr 1fr;gap:4px;margin-top:8px; }.status-popover .status-popover-actions button { height:32px;margin:0; }.status-popover .status-popover-actions [data-status-retry],.status-popover .status-popover-actions [data-status-repair] { grid-column:1/-1; }
|
|
1220
1220
|
.onboarding-card { width:360px; }.onboarding-card-head>strong { flex:1; }.onboarding-card-head .onboarding-close { width:28px;height:28px;display:grid;place-items:center;padding:0;border:0;border-radius:4px;background:transparent;color:var(--fdc-muted);cursor:pointer; }.onboarding-card-head .onboarding-close:hover { color:var(--fdc-ink);background:var(--fdc-subtle); }.onboarding-card-head .onboarding-close svg { width:12px;height:12px; }.onboarding-steps { gap:4px;border:0;overflow:visible;background:transparent; }.onboarding-step { min-height:40px;grid-template-columns:24px minmax(0,1fr);align-items:center;gap:8px;padding:8px;border:1px solid var(--fdc-line);border-radius:8px; }.onboarding-step b { width:20px;height:20px;display:grid;place-items:center;border:1px solid var(--fdc-line);border-radius:50%;color:var(--fdc-muted);font:500 8px/1 var(--fdc-font);letter-spacing:0; }.onboarding-step b svg { width:12px;height:12px; }.onboarding-step.complete>b { color:#141416;background:#8ae0c2;border-color:#8ae0c2; }.onboarding-step.current { border-color:var(--fdc-signal);box-shadow:0 0 0 4px rgb(59 130 246 / 10%); }
|
|
1221
1221
|
.review-summary { color:var(--fdc-ink);background:var(--fdc-paper); }.empty-state-icon { color:#9ec5ff;background:var(--fdc-signal-soft); }
|
|
1222
1222
|
.component-card,.health-card { color:var(--fdc-ink);background:var(--fdc-surface);border-color:var(--fdc-line); }.component-card.selected { color:var(--fdc-ink);background:var(--fdc-component-soft);border-color:#5c4b9e;box-shadow:0 0 0 4px rgb(155 135 245 / 10%); }.component-variants span,.component-actions button,.component-variants button { color:#c1b5f5;background:var(--fdc-component-soft);border-color:#4a406f; }.health-score::before { background:var(--fdc-surface); }.health-filters button { color:var(--fdc-muted); }.health-filters button:hover,.health-filters button.active { color:var(--fdc-ink);background:var(--fdc-elevated);border-color:var(--fdc-line); }.health-card p,.health-evidence { color:var(--fdc-muted); }.mapping-chooser { color:#f0c9a8;background:#35291d;border-color:#665039; }.mapping-chooser>strong,.mapping-option,.mapping-option small { color:#e7c29f; }.review-card.locating { background:var(--fdc-signal-soft); }.baseline-badge { color:#83d8bb;background:#18352c; }
|
|
@@ -1912,7 +1912,7 @@ function installFoundryInspector(options = {}) {
|
|
|
1912
1912
|
statusPill.setAttribute("aria-label", "Foundry session status");
|
|
1913
1913
|
statusPill.insertAdjacentHTML(
|
|
1914
1914
|
"afterend",
|
|
1915
|
-
'<div class="status-popover" hidden><strong data-status-title>Session connected</strong><span data-status-detail>Changes are stored locally.</span><code data-status-project></code><code data-status-revision></code><div class="status-popover-actions"><button data-status-checklist>Getting started</button><button data-status-diagnostics>Copy diagnostics</button><button data-status-retry>Check connection</button></div></div>'
|
|
1915
|
+
'<div class="status-popover" hidden><strong data-status-title>Session connected</strong><span data-status-detail>Changes are stored locally.</span><code data-status-project></code><code data-status-revision></code><div class="status-popover-actions"><button data-status-checklist>Getting started</button><button data-status-diagnostics>Copy diagnostics</button><button data-status-retry>Check connection</button><button data-status-repair>Copy repair command</button></div></div>'
|
|
1916
1916
|
);
|
|
1917
1917
|
shadow.querySelector(".panel").insertAdjacentHTML(
|
|
1918
1918
|
"beforeend",
|
|
@@ -2189,8 +2189,8 @@ function installFoundryInspector(options = {}) {
|
|
|
2189
2189
|
},
|
|
2190
2190
|
{
|
|
2191
2191
|
id: "agent",
|
|
2192
|
-
title: "Agent
|
|
2193
|
-
detail: "Keep
|
|
2192
|
+
title: "Agent connection",
|
|
2193
|
+
detail: "Keep it listening while you design. Offline batches wait safely."
|
|
2194
2194
|
},
|
|
2195
2195
|
{
|
|
2196
2196
|
id: "selection",
|
|
@@ -3513,12 +3513,12 @@ function installFoundryInspector(options = {}) {
|
|
|
3513
3513
|
const count = group.querySelector(".included-count");
|
|
3514
3514
|
if (count) count.textContent = `${included} included`;
|
|
3515
3515
|
});
|
|
3516
|
-
applyButton.textContent =
|
|
3517
|
-
applyButton.disabled = selectedCount === 0
|
|
3516
|
+
applyButton.textContent = selectedCount ? activeAgentPresence.connected ? `Apply ${selectedCount} with agent` : `Queue ${selectedCount} for agent` : "Apply with agent";
|
|
3517
|
+
applyButton.disabled = selectedCount === 0;
|
|
3518
3518
|
}
|
|
3519
3519
|
function agentConnectionMarkup() {
|
|
3520
3520
|
const agentName = activeAgentPresence.presence?.agent?.name;
|
|
3521
|
-
return `<div class="review-agent ${activeAgentPresence.connected ? "connected" : "disconnected"}" aria-live="polite"><i></i><div><strong>${activeAgentPresence.connected ? `${escapeHtml(agentName ?? "Coding agent")} is ready` : "
|
|
3521
|
+
return `<div class="review-agent ${activeAgentPresence.connected ? "connected" : "disconnected"}" aria-live="polite"><i></i><div><strong>${activeAgentPresence.connected ? `${escapeHtml(agentName ?? "Coding agent")} is ready` : "Agent currently offline"}</strong><span>${activeAgentPresence.connected ? "Apply requests will be claimed automatically while this agent keeps listening." : "You can queue this batch now. Codex, Cursor, or Claude Code will claim it when the Foundry listener reconnects."}</span></div>${activeAgentPresence.connected ? "" : "<button data-copy-agent-listener>Copy reconnect instruction</button>"}</div>`;
|
|
3522
3522
|
}
|
|
3523
3523
|
function updateAgentConnection() {
|
|
3524
3524
|
const current = reviewBody.querySelector(".review-agent");
|
|
@@ -3904,11 +3904,6 @@ function installFoundryInspector(options = {}) {
|
|
|
3904
3904
|
applyButton.disabled = true;
|
|
3905
3905
|
try {
|
|
3906
3906
|
activeAgentPresence = await sessionRequest("/agent-presence");
|
|
3907
|
-
if (!activeAgentPresence.connected) {
|
|
3908
|
-
updateAgentConnection();
|
|
3909
|
-
showToast("No coding agent is listening yet");
|
|
3910
|
-
return;
|
|
3911
|
-
}
|
|
3912
3907
|
const payload = await sessionRequest("/apply-runs", {
|
|
3913
3908
|
method: "POST",
|
|
3914
3909
|
body: JSON.stringify({
|
|
@@ -3918,6 +3913,8 @@ function installFoundryInspector(options = {}) {
|
|
|
3918
3913
|
});
|
|
3919
3914
|
clearReviewDraft();
|
|
3920
3915
|
renderReviewPayload(payload);
|
|
3916
|
+
if (!activeAgentPresence.connected)
|
|
3917
|
+
showToast("Queued. Your coding agent will claim this batch when it reconnects.");
|
|
3921
3918
|
} catch (error) {
|
|
3922
3919
|
showToast(error instanceof Error ? error.message : "Could not start apply run");
|
|
3923
3920
|
updateReviewSelection();
|
|
@@ -6221,6 +6218,10 @@ function installFoundryInspector(options = {}) {
|
|
|
6221
6218
|
void navigator.clipboard.writeText(JSON.stringify(diagnostics, null, 2));
|
|
6222
6219
|
showToast("Privacy-safe diagnostics copied");
|
|
6223
6220
|
});
|
|
6221
|
+
statusPopover.querySelector("[data-status-repair]").addEventListener("click", () => {
|
|
6222
|
+
void navigator.clipboard.writeText("npx foundry-design@beta doctor --repair");
|
|
6223
|
+
showToast("Repair command copied");
|
|
6224
|
+
});
|
|
6224
6225
|
interfaceThemeTrigger.addEventListener("click", () => {
|
|
6225
6226
|
if (interfaceThemeMenu.hidden) openInterfaceThemeMenu();
|
|
6226
6227
|
else closeInterfaceThemeMenu();
|
|
@@ -6243,7 +6244,7 @@ function installFoundryInspector(options = {}) {
|
|
|
6243
6244
|
void navigator.clipboard.writeText(
|
|
6244
6245
|
"Start Foundry for this project and keep listening for Apply with agent requests."
|
|
6245
6246
|
);
|
|
6246
|
-
showToast("
|
|
6247
|
+
showToast("Listener prompt copied");
|
|
6247
6248
|
return;
|
|
6248
6249
|
}
|
|
6249
6250
|
if (action === "apply" && recordedChangeCount > 0) {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA8DA,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,OAAO,IAAI,IAAI,CAAC;CACjB;AAu/BD,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,uBAA4B,GACpC,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA8DA,MAAM,WAAW,uBAAuB;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,MAAM,WAAW,0BAA0B;IACzC,OAAO,IAAI,IAAI,CAAC;IAChB,cAAc,IAAI,IAAI,CAAC;IACvB,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAAC;IACnC,OAAO,IAAI,IAAI,CAAC;CACjB;AAu/BD,wBAAgB,uBAAuB,CACrC,OAAO,GAAE,uBAA4B,GACpC,0BAA0B,CAm9K5B"}
|