rivet-design 0.10.8 → 0.11.0

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.
Files changed (156) hide show
  1. package/dist/index.d.ts +47 -3
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +277 -123
  4. package/dist/index.js.map +1 -1
  5. package/dist/mcp/agent-variants/SessionStore.d.ts +28 -4
  6. package/dist/mcp/agent-variants/SessionStore.d.ts.map +1 -1
  7. package/dist/mcp/agent-variants/SessionStore.js +356 -123
  8. package/dist/mcp/agent-variants/SessionStore.js.map +1 -1
  9. package/dist/mcp/agent-variants/WorktreeOrchestrator.d.ts +84 -4
  10. package/dist/mcp/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
  11. package/dist/mcp/agent-variants/WorktreeOrchestrator.js +744 -145
  12. package/dist/mcp/agent-variants/WorktreeOrchestrator.js.map +1 -1
  13. package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.d.ts +8 -3
  14. package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +1 -1
  15. package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.js +8 -3
  16. package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.js.map +1 -1
  17. package/dist/mcp/agent-variants/contracts.d.ts +7984 -1625
  18. package/dist/mcp/agent-variants/contracts.d.ts.map +1 -1
  19. package/dist/mcp/agent-variants/contracts.js +312 -154
  20. package/dist/mcp/agent-variants/contracts.js.map +1 -1
  21. package/dist/mcp/agent-variants/createZeroToOneTool.d.ts +2 -3
  22. package/dist/mcp/agent-variants/createZeroToOneTool.d.ts.map +1 -1
  23. package/dist/mcp/agent-variants/createZeroToOneTool.js +49 -39
  24. package/dist/mcp/agent-variants/createZeroToOneTool.js.map +1 -1
  25. package/dist/mcp/agent-variants/designCritique.d.ts +167 -0
  26. package/dist/mcp/agent-variants/designCritique.d.ts.map +1 -0
  27. package/dist/mcp/agent-variants/designCritique.js +717 -0
  28. package/dist/mcp/agent-variants/designCritique.js.map +1 -0
  29. package/dist/mcp/agent-variants/diffQa.d.ts +7 -0
  30. package/dist/mcp/agent-variants/diffQa.d.ts.map +1 -0
  31. package/dist/mcp/agent-variants/diffQa.js +67 -0
  32. package/dist/mcp/agent-variants/diffQa.js.map +1 -0
  33. package/dist/mcp/agent-variants/index.d.ts +3 -3
  34. package/dist/mcp/agent-variants/index.d.ts.map +1 -1
  35. package/dist/mcp/agent-variants/index.js +2 -1
  36. package/dist/mcp/agent-variants/index.js.map +1 -1
  37. package/dist/mcp/agent-variants/pinterestSourceContext.d.ts +4 -2
  38. package/dist/mcp/agent-variants/pinterestSourceContext.d.ts.map +1 -1
  39. package/dist/mcp/agent-variants/pinterestSourceContext.js +7 -6
  40. package/dist/mcp/agent-variants/pinterestSourceContext.js.map +1 -1
  41. package/dist/mcp/agent-variants/previewQa.d.ts +6 -4
  42. package/dist/mcp/agent-variants/previewQa.d.ts.map +1 -1
  43. package/dist/mcp/agent-variants/previewQa.js +140 -13
  44. package/dist/mcp/agent-variants/previewQa.js.map +1 -1
  45. package/dist/mcp/agent-variants/sourceContext.d.ts +20 -5
  46. package/dist/mcp/agent-variants/sourceContext.d.ts.map +1 -1
  47. package/dist/mcp/agent-variants/sourceContext.js +99 -115
  48. package/dist/mcp/agent-variants/sourceContext.js.map +1 -1
  49. package/dist/mcp/agent-variants/tools.d.ts +7 -0
  50. package/dist/mcp/agent-variants/tools.d.ts.map +1 -1
  51. package/dist/mcp/agent-variants/tools.js +216 -15
  52. package/dist/mcp/agent-variants/tools.js.map +1 -1
  53. package/dist/mcp/agent-variants/variantContext.d.ts +19 -0
  54. package/dist/mcp/agent-variants/variantContext.d.ts.map +1 -0
  55. package/dist/mcp/agent-variants/variantContext.js +355 -0
  56. package/dist/mcp/agent-variants/variantContext.js.map +1 -0
  57. package/dist/mcp/auth/httpOAuthProvider.d.ts +103 -0
  58. package/dist/mcp/auth/httpOAuthProvider.d.ts.map +1 -0
  59. package/dist/mcp/auth/httpOAuthProvider.js +454 -0
  60. package/dist/mcp/auth/httpOAuthProvider.js.map +1 -0
  61. package/dist/mcp/auth/tools.d.ts +2 -0
  62. package/dist/mcp/auth/tools.d.ts.map +1 -1
  63. package/dist/mcp/auth/tools.js +12 -5
  64. package/dist/mcp/auth/tools.js.map +1 -1
  65. package/dist/mcp/httpServer.d.ts +36 -0
  66. package/dist/mcp/httpServer.d.ts.map +1 -0
  67. package/dist/mcp/httpServer.js +307 -0
  68. package/dist/mcp/httpServer.js.map +1 -0
  69. package/dist/mcp/server.d.ts +17 -0
  70. package/dist/mcp/server.d.ts.map +1 -1
  71. package/dist/mcp/server.js +41 -19
  72. package/dist/mcp/server.js.map +1 -1
  73. package/dist/proxy-middleware/proxy-config.d.ts.map +1 -1
  74. package/dist/proxy-middleware/proxy-config.js +5 -2
  75. package/dist/proxy-middleware/proxy-config.js.map +1 -1
  76. package/dist/routes/agentVariants.d.ts.map +1 -1
  77. package/dist/routes/agentVariants.js +6 -4
  78. package/dist/routes/agentVariants.js.map +1 -1
  79. package/dist/routes/mcp.d.ts.map +1 -1
  80. package/dist/routes/mcp.js +2 -1
  81. package/dist/routes/mcp.js.map +1 -1
  82. package/dist/server.d.ts +9 -0
  83. package/dist/server.d.ts.map +1 -1
  84. package/dist/server.js +13 -5
  85. package/dist/server.js.map +1 -1
  86. package/dist/services/AuthService.d.ts +1 -0
  87. package/dist/services/AuthService.d.ts.map +1 -1
  88. package/dist/services/AuthService.js +11 -1
  89. package/dist/services/AuthService.js.map +1 -1
  90. package/dist/services/BrowserAgentClient.d.ts +54 -0
  91. package/dist/services/BrowserAgentClient.d.ts.map +1 -0
  92. package/dist/services/BrowserAgentClient.js +126 -0
  93. package/dist/services/BrowserAgentClient.js.map +1 -0
  94. package/dist/services/ConfigManager.d.ts +5 -0
  95. package/dist/services/ConfigManager.d.ts.map +1 -1
  96. package/dist/services/ConfigManager.js +25 -3
  97. package/dist/services/ConfigManager.js.map +1 -1
  98. package/dist/services/DevServerRuntimeService.d.ts +119 -0
  99. package/dist/services/DevServerRuntimeService.d.ts.map +1 -0
  100. package/dist/services/DevServerRuntimeService.js +657 -0
  101. package/dist/services/DevServerRuntimeService.js.map +1 -0
  102. package/dist/services/GatewayClient.d.ts +25 -0
  103. package/dist/services/GatewayClient.d.ts.map +1 -1
  104. package/dist/services/GatewayClient.js +70 -11
  105. package/dist/services/GatewayClient.js.map +1 -1
  106. package/dist/services/InlineVariantGenerationService.d.ts +2 -0
  107. package/dist/services/InlineVariantGenerationService.d.ts.map +1 -1
  108. package/dist/services/InlineVariantGenerationService.js +70 -3
  109. package/dist/services/InlineVariantGenerationService.js.map +1 -1
  110. package/dist/services/RequestAuthContext.d.ts +7 -1
  111. package/dist/services/RequestAuthContext.d.ts.map +1 -1
  112. package/dist/services/RequestAuthContext.js +15 -2
  113. package/dist/services/RequestAuthContext.js.map +1 -1
  114. package/dist/services/SessionBridgeService.d.ts +1 -0
  115. package/dist/services/SessionBridgeService.d.ts.map +1 -1
  116. package/dist/services/SessionBridgeService.js +16 -1
  117. package/dist/services/SessionBridgeService.js.map +1 -1
  118. package/dist/services/VariantRunService.d.ts +1 -0
  119. package/dist/services/VariantRunService.d.ts.map +1 -1
  120. package/dist/services/VariantRunService.js +1 -0
  121. package/dist/services/VariantRunService.js.map +1 -1
  122. package/dist/services/VariantsRuntime.d.ts.map +1 -1
  123. package/dist/services/VariantsRuntime.js +1 -0
  124. package/dist/services/VariantsRuntime.js.map +1 -1
  125. package/dist/services/WorktreeManager.d.ts +1 -8
  126. package/dist/services/WorktreeManager.d.ts.map +1 -1
  127. package/dist/services/WorktreeManager.js +1 -28
  128. package/dist/services/WorktreeManager.js.map +1 -1
  129. package/dist/services/createAgentVariantsOrchestrator.d.ts.map +1 -1
  130. package/dist/services/createAgentVariantsOrchestrator.js +7 -0
  131. package/dist/services/createAgentVariantsOrchestrator.js.map +1 -1
  132. package/dist/utils/skills/describe-motion-protocol.d.ts +2 -3
  133. package/dist/utils/skills/describe-motion-protocol.d.ts.map +1 -1
  134. package/dist/utils/skills/describe-motion-protocol.js +50 -35
  135. package/dist/utils/skills/describe-motion-protocol.js.map +1 -1
  136. package/dist/utils/skills/shared-variants-protocol.d.ts +1 -1
  137. package/dist/utils/skills/shared-variants-protocol.d.ts.map +1 -1
  138. package/dist/utils/skills/shared-variants-protocol.js +21 -15
  139. package/dist/utils/skills/shared-variants-protocol.js.map +1 -1
  140. package/dist/utils/variantSessionStart.d.ts +3 -0
  141. package/dist/utils/variantSessionStart.d.ts.map +1 -0
  142. package/dist/utils/variantSessionStart.js +7 -0
  143. package/dist/utils/variantSessionStart.js.map +1 -0
  144. package/package.json +2 -1
  145. package/src/ui/dist/assets/{main-WqlDU4Ou.js → main-Cw6Pd8ye.js} +204 -204
  146. package/src/ui/dist/assets/main-DkCj7b2K.css +1 -0
  147. package/src/ui/dist/index.html +2 -2
  148. package/dist/mcp/agent-variants/designContextStore.d.ts +0 -160
  149. package/dist/mcp/agent-variants/designContextStore.d.ts.map +0 -1
  150. package/dist/mcp/agent-variants/designContextStore.js +0 -295
  151. package/dist/mcp/agent-variants/designContextStore.js.map +0 -1
  152. package/dist/mcp/agent-variants/inspirationDesignContext.d.ts +0 -440
  153. package/dist/mcp/agent-variants/inspirationDesignContext.d.ts.map +0 -1
  154. package/dist/mcp/agent-variants/inspirationDesignContext.js +0 -2467
  155. package/dist/mcp/agent-variants/inspirationDesignContext.js.map +0 -1
  156. package/src/ui/dist/assets/main-auZA25j4.css +0 -1
@@ -20,7 +20,7 @@ exports.PICKING_THE_FLOW_TABLE = `## Picking the flow
20
20
  | "create variants of X", "show me 3-5 options for X", "explore approaches to X" | **Agent variants — existing project** (\`start_variants\`, \`mode='existing'\`) |
21
21
  | "build me a settings page from scratch", "add a feature for Y" | **Agent variants — existing project** (\`start_variants\`, no \`target\`) |
22
22
  | "create a new Vite todo app", "scaffold a fresh dashboard" | **Agent variants — fresh project** (\`start_variants\`, \`mode='zero_to_one'\`) |
23
- | "build me a dashboard like stripe.com", "use this URL as inspiration" | **Agent variants — fresh, source-grounded** (\`extract_inspiration_context\` → \`start_variants\`, \`mode='zero_to_one'\`) |`;
23
+ | "build me a dashboard like stripe.com", "use this URL as inspiration" | **Agent variants — fresh, source-grounded** (\`start_variants\`, \`mode='zero_to_one'\`, with \`userContext\`) |`;
24
24
  /**
25
25
  * Builds the full Agent Variants flow section, parameterised on the small
26
26
  * number of lines that differ between Claude Code and Cursor.
@@ -34,7 +34,7 @@ There are three sub-flows. Pick by project state:
34
34
 
35
35
  - **Existing project** → \`start_variants({ mode: 'existing' })\` — single-call kickoff, no in-chat approval gate.
36
36
  - **Fresh project (prompt-only)** → \`start_variants({ mode: 'zero_to_one' })\` — same single-call kickoff, server derives the destination path and opens the editor. Use this when the user just describes the app ("build me a Vite todo app", "make a Pomodoro timer").
37
- - **Fresh project (source-grounded, inspiration URLs)** → call \`extract_inspiration_context\` first, then \`start_variants({ mode: 'zero_to_one' })\` with the returned \`designContext\` + \`sourceContext\` forwarded as-is. Same single-call kickoff, no in-chat approval gate. Use this when the user gives a URL to mimic, attaches design context, or asks for "something like \\<site\\>".
37
+ - **Fresh project (source-grounded, raw references)** → \`start_variants({ mode: 'zero_to_one' })\` with a \`userContext\` array (inspiration URLs, local images/videos, directories, or pasted text). start_variants runs the source-research (\`source_plan\`) flow so you can inspect the raw sources and report design/motion metadata before briefs. Use this when the user gives a URL to mimic, attaches an image/video, references a file, or asks for "something like \\<site\\>".
38
38
 
39
39
  ---
40
40
 
@@ -86,34 +86,39 @@ For brand-new projects the user describes from scratch ("build me a Vite todo ap
86
86
 
87
87
  2. **From here, follow Sub-flow A steps 2-5** (parallel code-gen with first-line label using each variant's \`workItem.input.worktreePath\` and the shared \`leaseId\`, then ready, watch, apply). The work items are \`static_preview\` for zero-to-one — agent output must be passed to \`report_variant_complete\` as a JSON **object** with shape \`{ html: string, css?: string, js?: string }\` (self-contained HTML, no React/Vite-only imports). Do NOT stringify it — pass \`output: { html: "<!doctype html>..." }\`, not \`output: "{\\"html\\": \\"...\\"}"\`. On commit, the apply payload is \`payload.kind === 'project-created'\` — the server materialized the chosen variant to \`destinationPath\`.
88
88
 
89
+ **Aesthetic self-critique gate (re-lease on \`design_quality\` failure).** After a 0→1 variant is reported \`succeeded\`, Rivet renders it, screenshots it, and scores it on a design rubric against the bound DESIGN.md. The gate is strict and task-aware: beyond the aesthetic score it runs an artifact lint plus severity-coded checks for task fit, source fidelity, UI polish, readability, and responsive behavior. A \`critical\`-severity defect (unusable UI, unreadable text, missing required content or primary action) fails the variant no matter how high its visual scores are; \`major\` issues cap the score below the pass bar. If a variant fails, the server **re-opens that same work item** (it becomes leasable again via \`continue_variants({ action: 'request_work' })\`) carrying a \`input.designCritique = { summary, dimensionScores }\` payload whose summary lists the exact issues to fix. When a re-leased work item has \`input.designCritique\`, you MUST read the critique and **regenerate that variant to address every listed issue** before calling \`report_variant_complete\` again — do not re-submit the same output. This costs at most **one** retry per variant; after the retry a still-\`major\` (non-critical) variant is accepted as degraded (but committable), while an unresolved \`critical\` defect hard-fails the variant (commit disabled). Never loop more than once.
90
+
89
91
  ---
90
92
 
91
93
  ### Sub-flow C: Fresh project (source-grounded) — \`start_variants\`
92
94
 
93
- **Trigger:** the user provided inspiration URLs ("like stripe.com"), attached an image in chat (pasted screenshot/mockup), attached a video/gif/screen recording ("match this animation", "build the hover from this clip"), referenced an image or video file path (e.g. \`~/Desktop/mockup.png\`, \`~/Desktop/hover.mov\`), or supplied written design context. Image-only and video-only requests with no URLs are valid and belong in this sub-flow — do not fall back to Sub-flow B.
95
+ **Trigger:** the user provided inspiration URLs ("like stripe.com"), attached an image in chat (pasted screenshot/mockup), attached a video/gif/screen recording ("match this animation", "build the hover from this clip"), referenced an image or video file path (e.g. \`~/Desktop/mockup.png\`, \`~/Desktop/hover.mov\`), referenced a directory, or supplied written design context. Image-only and video-only requests with no URLs are valid and belong in this sub-flow — do not fall back to Sub-flow B.
94
96
 
95
- Use the same \`start_variants({ mode: 'zero_to_one' })\` entry point as Sub-flow B, but pass a \`sourceContext\`. When \`sourceContext\` carries \`sourceUrls\`, \`sourceArtifacts\`, or \`sourceIntent\`, start_variants detects the source-grounded input and runs the source-research flow automatically — returning \`stage: 'awaiting_source_plan'\` instead of the prompt-only single-call \`work_items_ready\`. start_variants is the single fresh-project entry point — there is no separate source-grounded kickoff tool.
97
+ Use the same \`start_variants({ mode: 'zero_to_one' })\` entry point as Sub-flow B, but pass a \`userContext\` array of raw sources. Any \`userContext\` switches start_variants into the source-research flow — returning \`stage: 'awaiting_source_plan'\` instead of the prompt-only single-call \`work_items_ready\`. Rivet stores the raw sources read-only; you inspect them natively during source planning and report what metadata to derive. start_variants is the single fresh-project entry point — there is no separate source-grounded kickoff tool.
96
98
 
97
99
  1. **Call \`start_variants\`** with:
98
100
  - \`prompt\`: the user's request verbatim
99
101
  - \`mode\`: \`'zero_to_one'\`
100
102
  - \`framework\` (optional, defaults to \`'vite'\`)
101
103
  - \`destinationParent\` (optional, absolute path)
102
- - \`sourceContext\`:
103
- - \`sourceUrls\` (optional): every inspiration URL the user provided
104
- - \`preserveBrand\` (optional): true when the user wants brand colors/type/voice preserved exactly
105
- - \`sourceArtifacts\` (optional): pasted briefs, screenshot notes, written design context, **agent-described images**, OR **agent-described videos**. If the user attached one or more images in chat OR referenced an image file path: for path references, open the file with your \`Read\` tool first; then in both cases describe what you see — layout, colour palette, typography, component patterns, voice — and pass each image as a \`sourceArtifacts\` entry with \`kind: 'visualBrief'\` (overall design system) or \`kind: 'screenshotNotes'\` (specific screen). If the user attached a video, gif, screen recording, or frame sequence OR referenced a video file path: run the **Describe Motion protocol** (see section below) to extract a structured motion spec, and pass each spec as a \`sourceArtifacts\` entry with \`kind: 'motionBrief'\`. One \`motionBrief\` per distinct interaction in the video — do not merge multiple interactions into one entry. Do not invent a URL for an image or video. \`sourceArtifacts\` can fully replace \`sourceUrls\` — image-only and video-only calls (no URLs) are supported.
104
+ - \`userContext\`: one entry per raw source the user supplied. Do NOT pre-summarize — pass the raw reference:
105
+ - inspiration URL → \`{ transport: 'url', url, label?, userIntent? }\`
106
+ - local image / video / file \`{ transport: 'file_path', path, mimeType?, label?, userIntent? }\`
107
+ - directory \`{ transport: 'directory_path', path, label?, userIntent? }\`
108
+ - pasted brief / written design context → \`{ transport: 'text', content, label?, userIntent? }\`
109
+ Image-only and video-only calls (no URLs) are supported. Do not invent a URL for a local file.
106
110
 
107
111
  Response (source-grounded): \`{ sessionId, stage: 'awaiting_source_plan', mode: 'zero_to_one', sourcePlanWorkItem, nextAction: 'continue_variants', destinationPath, visualEditor? }\`. Share \`visualEditor.url\` with the user immediately.
108
112
 
109
- 2. **Process the source_plan work item.** Classify the inspiration sources, produce per-slot DESIGN.md, and choose \`executionPlan.mode\`:
110
- - DESIGN.md per slot matches the bundled catalog shape under \`src/services/templates/designmd/*.md\` (Visual Theme & Atmosphere → Color Palette & Roles → Typography Rules → Component Stylings → Layout Principles → Depth & Elevation → Do's & Don'ts → Responsive Behavior → Agent Prompt Guide). For sections you cannot determine from the source, write \`Not observed\` rather than inventing values.
111
- - When a \`motionBrief\` is present, fold its timing / easing / choreography into the **Component Stylings** and any motion-related guidance sections of the matching DESIGN.md slot, and treat the motionBrief as authoritative for those properties — visual styling can diverge per variant, motion fidelity should not.
113
+ 2. **Process the source_plan work item.** Inspect the raw \`input.userContext\` natively (open URLs, \`Read\` images, run the Describe Motion protocol on videos), choose actions from \`input.availableActions\`, and report the metadata they produce:
114
+ - For visual references, report an \`extract_design_system\` action with linked \`design_system\` metadata. Use the existing **extract_inspiration_context** / design-context capability named in \`availableActions\`. Provide \`data.designMarkdown\` (a DESIGN.md matching the bundled catalog shape under \`src/services/templates/designmd/*.md\`: Visual Theme & Atmosphere → Color Palette & Roles → Typography Rules → Component Stylings → Layout Principles → Depth & Elevation → Do's & Don'ts → Responsive Behavior → Agent Prompt Guide; write \`Not observed\` for sections you cannot determine) or the structured observations Rivet synthesizes DESIGN.md from.
115
+ - For motion references, report a \`describe_motion\` action with linked \`motion_guidance\` metadata (run the **Describe Motion protocol** below; the spec becomes \`data.motionMarkdown\`). One \`describe_motion\` action per distinct interaction. Treat motion guidance as authoritative timing/easing/choreography — visual styling can diverge per variant, motion fidelity should not.
116
+ - Every reported action MUST have matching metadata linked by \`actionId\`; otherwise Rivet rejects the report. Use the stable \`id\` values from \`input.userContext\` as \`sourceIds\`.
112
117
  - \`executionPlan.mode\`: \`vite_app\` for requests needing large assets / Three.js / package dependencies / routing; \`static_preview\` for self-contained HTML/CSS/JS prototypes. If ambiguous, set \`executionPlan.userQuestion\` instead of guessing — Rivet surfaces it as a clarification blocker.
113
118
 
114
- 3. **Call \`report_source_plan\`** with \`{ sessionId, workItemId, leaseId, attempt, sourcePlan }\`. Response: \`{ stage: 'awaiting_briefs', briefWorkItem, executionPlan, nextAction: 'report_variant_briefs' }\`.
119
+ 3. **Call \`report_source_plan\`** with \`{ sessionId, workItemId, leaseId, attempt, sourcePlan: { actions, metadata, executionPlan, bindings? } }\`. Response: \`{ stage: 'awaiting_briefs', briefWorkItem, executionPlan, nextAction: 'report_variant_briefs' }\`.
115
120
 
116
- 4. **Report briefs and start generating — no approval gate.** Call \`report_variant_briefs\` with N briefs; the server starts every direction immediately and returns \`stage: 'work_items_ready'\`. Do NOT pause to ask the user to approve the briefs first. Then call \`continue_variants({ action: 'request_work' })\` and follow Sub-flow A steps 2-5. Work items are \`static_preview\` or \`code_gen\` depending on \`executionPlan.mode\`. On commit, the apply payload is \`payload.kind === 'project-created'\` — the server materialized the chosen variant to \`destinationPath\`.
121
+ 4. **Report briefs and start generating — no approval gate.** Call \`report_variant_briefs\` with N briefs; the server starts every direction immediately and returns \`stage: 'work_items_ready'\`. Do NOT pause to ask the user to approve the briefs first. Then call \`continue_variants({ action: 'request_work' })\` and follow Sub-flow A steps 2-5. Work items are \`static_preview\` or \`code_gen\` depending on \`executionPlan.mode\`. On commit, the apply payload is \`payload.kind === 'project-created'\` — the server materialized the chosen variant to \`destinationPath\`. The **aesthetic self-critique gate** (see Sub-flow B step 2) applies to both \`static_preview\` and \`vite_app\` variants here: a re-leased work item carrying \`input.designCritique\` must be regenerated to address the critique before re-reporting (one retry max).
117
122
 
118
123
  ---
119
124
 
@@ -126,13 +131,14 @@ ${describe_motion_protocol_1.DESCRIBE_MOTION_PROTOCOL}
126
131
  - **Never** generate variants natively (${opts.nativeGenLabel}, parallel tool calls, your own creative process) without going through \`start_variants\` first.
127
132
  - Always pass the user's prompt verbatim — don't paraphrase.
128
133
  - Prefer \`start_variants\` (with the matching \`mode\`) over the older \`propose_variants\` → \`report_variant_briefs\` → \`approve_variant_briefs\` chain. The unified call also handles \`detect_project\`, \`open_visual_editor\`, and \`continue_variants(request_work)\` server-side. The older tools and standalone \`detect_project\` / \`open_visual_editor\` stay registered for the Visual Editor flow (point-and-click changes without variants).
129
- - For source-grounded fresh projects, run \`extract_inspiration_context\` FIRST and forward its output into \`start_variants\` don't try to pack inspiration URLs into \`start_variants\` directly without extraction.
134
+ - For source-grounded fresh projects, pass the raw references as \`userContext\` to \`start_variants\` and do the design/motion extraction DURING source planning (report \`extract_design_system\` / \`describe_motion\` actions with metadata) don't pre-summarize references before kickoff.
130
135
  - Briefs are never an approval gate — reporting them starts the directions immediately. Do not pause to ask the user "do these look good?" before generating. If you mention briefs in chat at all they are PLAIN TEXT; do not render UI, open a browser tab, or fabricate a URL.
131
136
  - The user picks AFTER seeing the variants render LIVE in the iframe, not before. Hand off to the iframe chip for visual cycling + commit.
132
137
  - Don't dump diffs in chat by default. The iframe chip is the primary review surface. If the user explicitly asks "show me the diffs", then print them.
133
138
  - Parallel code-gen is the only step where you fan out — every other step is one tool call.
134
139
  - **Per-variant cancel** is handled by the iframe — the UI calls \`cancel_variant({ sessionId, variantId })\` when the user clicks the cancel button on a card. You do not need to call this from the agent side. Use \`cancel_variants\` (plural) only to kill an entire session.
135
140
  - **Honor aborts mid-generation.** When the user removes or cancels a direction while it is still generating, the very next \`report_variant_complete\` for that work item returns \`{ aborted: true }\`. Treat that as a hard stop for that one direction: abandon it immediately, do NOT retry or re-report it, and keep going on the rest. For directions that take a while to build, send periodic \`status: 'running'\` heartbeats through \`report_variant_complete\` so an abort is caught early instead of after you have spent the work — a cleared lease surfacing as \`{ aborted: true }\` (rather than an error) is the signal to drop it.
136
- - Quality bar is mandatory: avoid generic hero-card pages; preserve source depth, realistic workflow detail, and responsive interaction states unless the user explicitly asks for a lighter build.`;
141
+ - Quality bar is mandatory: avoid generic hero-card pages; preserve source depth, realistic workflow detail, and responsive interaction states unless the user explicitly asks for a lighter build.
142
+ - **Aesthetic self-critique re-lease**: a 0→1 work item re-surfaced by \`request_work\` with \`input.designCritique\` failed the strict design-quality gate (aesthetic score, or a severity-coded task-fit / source-fidelity / UI-polish / readability / responsive finding). Read the critique, regenerate that variant to address every listed issue, then re-report — at most one retry per variant. After the retry the server accepts a still-\`major\` variant as degraded; an unresolved \`critical\` defect hard-fails it rather than looping.`;
137
143
  }
138
144
  //# sourceMappingURL=shared-variants-protocol.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shared-variants-protocol.js","sourceRoot":"","sources":["../../../src/utils/skills/shared-variants-protocol.ts"],"names":[],"mappings":";;;AA2BA,8DAsHC;AAjJD,yEAAsE;AAEtE;;;;GAIG;AACU,QAAA,wBAAwB,GACnC,kGAAkG;IAClG,0FAA0F;IAC1F,mHAAmH,CAAC;AAEtH,0DAA0D;AAC7C,QAAA,sBAAsB,GAAG;;;;;;;;uMAQiK,CAAC;AAExM;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,IASzC;IACC,OAAO;;oMAE2L,IAAI,CAAC,cAAc,uJAAuJ,IAAI,CAAC,cAAc;;;;;;;;;;;;;;uKAc1N,gCAAwB;;;;;;;KAO1L,IAAI,CAAC,KAAK;;;;;;;;;;;KAWV,IAAI,CAAC,YAAY;;;;;;;;;;;;;;;;;uKAiBiJ,gCAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwC7L,mDAAwB;;;;;;0CAMgB,IAAI,CAAC,cAAc;;;;;;;;;;oMAUuI,CAAC;AACrM,CAAC"}
1
+ {"version":3,"file":"shared-variants-protocol.js","sourceRoot":"","sources":["../../../src/utils/skills/shared-variants-protocol.ts"],"names":[],"mappings":";;;AA2BA,8DA4HC;AAvJD,yEAAsE;AAEtE;;;;GAIG;AACU,QAAA,wBAAwB,GACnC,kGAAkG;IAClG,0FAA0F;IAC1F,mHAAmH,CAAC;AAEtH,0DAA0D;AAC7C,QAAA,sBAAsB,GAAG;;;;;;;;2LAQqJ,CAAC;AAE5L;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,IASzC;IACC,OAAO;;oMAE2L,IAAI,CAAC,cAAc,uJAAuJ,IAAI,CAAC,cAAc;;;;;;;;;;;;;;uKAc1N,gCAAwB;;;;;;;KAO1L,IAAI,CAAC,KAAK;;;;;;;;;;;KAWV,IAAI,CAAC,YAAY;;;;;;;;;;;;;;;;;uKAiBiJ,gCAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6C7L,mDAAwB;;;;;;0CAMgB,IAAI,CAAC,cAAc;;;;;;;;;;;uhBAW0d,CAAC;AACxhB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ActiveSnapshot } from '../mcp/agent-variants';
2
+ export declare const isVariantSessionStartBlocked: (snapshot: ActiveSnapshot | undefined) => boolean;
3
+ //# sourceMappingURL=variantSessionStart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variantSessionStart.d.ts","sourceRoot":"","sources":["../../src/utils/variantSessionStart.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,eAAO,MAAM,4BAA4B,GACvC,UAAU,cAAc,GAAG,SAAS,KACnC,OAA4E,CAAC"}
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isVariantSessionStartBlocked = void 0;
4
+ const contracts_1 = require("../mcp/agent-variants/contracts");
5
+ const isVariantSessionStartBlocked = (snapshot) => snapshot?.active === true && !contracts_1.TERMINAL_STAGES.has(snapshot.stage);
6
+ exports.isVariantSessionStartBlocked = isVariantSessionStartBlocked;
7
+ //# sourceMappingURL=variantSessionStart.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variantSessionStart.js","sourceRoot":"","sources":["../../src/utils/variantSessionStart.ts"],"names":[],"mappings":";;;AACA,+DAAkE;AAE3D,MAAM,4BAA4B,GAAG,CAC1C,QAAoC,EAC3B,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,IAAI,CAAC,2BAAe,CAAC,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAFnE,QAAA,4BAA4B,gCAEuC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rivet-design",
3
- "version": "0.10.8",
3
+ "version": "0.11.0",
4
4
  "description": "Local visual web development tool with AI-powered code modification",
5
5
  "main": "dist/index.js",
6
6
  "workspaces": [
@@ -129,6 +129,7 @@
129
129
  "knip": "^5.63.1",
130
130
  "lint-staged": "^16.1.6",
131
131
  "playwright": "^1.58.2",
132
+ "playwright-core": "^1.58.2",
132
133
  "prettier": "^3.6.2",
133
134
  "prettier-plugin-tailwindcss": "^0.7.2",
134
135
  "supabase": "^2.47.2",