foundry-design 0.2.0-beta.6 → 0.2.0-beta.7

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 CHANGED
@@ -6,7 +6,7 @@ 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
- > **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.
9
+ > **Current public beta:** `0.2.0-beta.7`. 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
 
@@ -96,7 +96,9 @@ Foundry remains local-first. Installing the plugin does not create an account, e
96
96
  - Persistent, coalescing change ledger with JSON and consolidated prompt export
97
97
  - Compact in-preview review with editable approved batches and unresolved-target blocking
98
98
  - Persistent Apply with agent runs across Codex, Cursor, and Claude Code through MCP
99
+ - Leased agent handoffs that safely return abandoned or interrupted claims to the queue
99
100
  - Live source, rebuild, validation, retry, and rendered-verification progress
101
+ - Rendered verification that resumes after refresh and does not depend on Review remaining open
100
102
  - Local MCP bridge for agent access
101
103
  - Debug adapters for web, SwiftUI, and React Native on iOS Simulator
102
104
  - Verification records that compare requested and rendered values
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ import { startBasicPreviewProxy } from './proxy.js';
15
15
  const args = process.argv.slice(2);
16
16
  const command = args[0]?.startsWith('-') ? 'launch' : (args[0] ?? 'launch');
17
17
  const runtimeRepository = resolve(fileURLToPath(new URL('../../../', import.meta.url)));
18
- const CURRENT_VERSION = '0.2.0-beta.6';
18
+ const CURRENT_VERSION = '0.2.0-beta.7';
19
19
  function flag(name) {
20
20
  const index = args.indexOf(name);
21
21
  return index >= 0 ? args[index + 1] : undefined;
package/dist/installer.js CHANGED
@@ -8,7 +8,7 @@ import { promisify } from 'node:util';
8
8
  import { detectPlatform } from './project.js';
9
9
  const START = '>>> Foundry Design Control';
10
10
  const END = '<<< Foundry Design Control';
11
- const GENERATOR_VERSION = '0.2.0-beta.6';
11
+ const GENERATOR_VERSION = '0.2.0-beta.7';
12
12
  const TRANSACTION_FILE = 'setup-transaction.json';
13
13
  const execFileAsync = promisify(execFile);
14
14
  const DEFAULT_SKILL_ROOT = fileURLToPath(new URL('./skill/foundry-design-control/', import.meta.url));
@@ -44,13 +44,14 @@ Read [change-contract.md](references/change-contract.md) when interpreting or tr
44
44
 
45
45
  1. Read the project design graph with `foundry_design_get_project_design`.
46
46
  2. For an interactive web session, keep calling `foundry_design_wait_for_apply` in bounded waits as soon as Foundry starts. Include the current source revision, design-graph revision, and agent identity. A reviewed run may already be queued while the agent was offline. A `waiting` result means poll again while the session remains active, not that the workflow is complete.
47
- 3. If a run is claimed, read [apply-run-contract.md](references/apply-run-contract.md) and follow its state transitions. Do not edit from an unreviewed draft ledger.
48
- 4. Reinspect current source before editing. Stop if the claimed run reports a stale revision, stale graph, unresolved target, or unresolved operation.
49
- 5. Report `applying`, then implement the user's selected semantic mapping at the narrowest source of truth.
50
- 6. Preserve existing tokens and component conventions. Prefer a matching token over a new literal. Do not invent a global token for an instance-scoped adjustment.
51
- 7. Apply the batch as a normal, reviewable source diff. Never write generated preview styles into production code.
52
- 8. Report `rebuilding` with changed files and validation results. Report `failed` for a terminal source or validation failure.
53
- 9. Report any request that cannot be represented without changing the requested scope or architecture.
47
+ 3. If a run is claimed, retain its `claimAttemptId`, read [apply-run-contract.md](references/apply-run-contract.md), and follow its state transitions. Do not edit from an unreviewed draft ledger.
48
+ 4. Immediately report `applying` with the current `claimAttemptId`, then reinspect current source before editing. If a prerequisite prevents that immediate transition, extend the short handoff lease with `foundry_design_heartbeat_apply_run` while the run remains `claimed`.
49
+ 5. Stop if the claim is no longer active or the source inspection finds a stale revision, stale graph, unresolved target, or unresolved operation. Return to `foundry_design_wait_for_apply` when Foundry has safely requeued an abandoned handoff.
50
+ 6. Implement the user's selected semantic mapping at the narrowest source of truth.
51
+ 7. Preserve existing tokens and component conventions. Prefer a matching token over a new literal. Do not invent a global token for an instance-scoped adjustment.
52
+ 8. Apply the batch as a normal, reviewable source diff. Never write generated preview styles into production code.
53
+ 9. Report `rebuilding` and every later agent state with the same `claimAttemptId`, including changed files and validation results. Report `failed` for a terminal source or validation failure.
54
+ 10. Report any request that cannot be represented without changing the requested scope or architecture.
54
55
 
55
56
  ## Verify
56
57
 
@@ -5,24 +5,25 @@ Use the apply run as the authoritative lifecycle for a reviewed web batch.
5
5
  ## Claim
6
6
 
7
7
  1. Read `foundry_design_get_project_design`, then call `foundry_design_wait_for_apply` with the current project revision, design-graph revision, and agent identity.
8
- 2. Accept only a run in `claimed`. If it returns `needs_attention`, report the source or design-graph mismatch and wait for the user to retry.
8
+ 2. Accept only a run in `claimed` with a `claimAttemptId`. If it returns `needs_attention`, report the source or design-graph mismatch and wait for the user to retry.
9
9
  3. Use only the run's `changeIds`. Re-read the session to obtain their approved values and evidence.
10
10
  4. For every operation, use only its `selectedMappingId`. Stop if an approved change has multiple candidates without a selected mapping.
11
+ 5. A claim is a short handoff lease, not evidence that source work has begun. Immediately report `applying`. If a prerequisite prevents that transition, call `foundry_design_heartbeat_apply_run` before the lease expires.
11
12
 
12
13
  ## Progress
13
14
 
14
- Report state with `foundry_design_update_apply_run`:
15
+ Report state with `foundry_design_update_apply_run`. Include the same `claimAttemptId` in every update:
15
16
 
16
17
  1. `applying` before source edits.
17
18
  2. `rebuilding` after edits, including every changed source file and each validation result.
18
19
  3. `verifying` only when changed files are present and the affected surface rebuilt successfully.
19
20
  4. `failed` for a terminal edit, build, or validation failure, including a concise error.
20
21
 
21
- Do not skip states, claim a non-queued run, or start another run in the same session. Repeating a claim for the same run is idempotent.
22
+ Do not skip states, claim a non-queued run, or start another run in the same session. Repeating a claim for the same run and agent identity is idempotent. If the lease expires before `applying`, Foundry clears the abandoned claim and returns the run to `queued`. A stale agent must not edit source or send progress after that point. Wait for and claim the queued run again.
22
23
 
23
24
  ## Verification
24
25
 
25
- When the run reaches `verifying`, the web adapter reloads the page to remove temporary overrides, waits for stable target geometry, measures only the run's approved changes, and records results. Read the run until it becomes:
26
+ When the run reaches `verifying`, the web adapter reloads the page to remove temporary overrides, even when Review is closed. It waits for stable target geometry, measures only the run's approved changes, and records results. Read the run until it becomes:
26
27
 
27
28
  - `passed`: return the changed files, validation summary, and verification count.
28
29
  - `needs_attention`: explain each mismatch and wait for an explicit in-product retry.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foundry-design",
3
- "version": "0.2.0-beta.6",
3
+ "version": "0.2.0-beta.7",
4
4
  "description": "Install and run the local-first Foundry visual design control plane",
5
5
  "type": "module",
6
6
  "files": [
@@ -34,8 +34,8 @@
34
34
  "inspector"
35
35
  ],
36
36
  "dependencies": {
37
- "foundry-design-protocol": "0.2.0-beta.6",
38
- "foundry-design-runtime": "0.2.0-beta.6"
37
+ "foundry-design-protocol": "0.2.0-beta.7",
38
+ "foundry-design-runtime": "0.2.0-beta.7"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "tsc -p tsconfig.json && node ../../scripts/copy-cli-skill.mjs",