rivet-design 0.9.7 → 0.9.9

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 (58) hide show
  1. package/dist/mcp/agent-variants/SessionStore.d.ts +5 -0
  2. package/dist/mcp/agent-variants/SessionStore.d.ts.map +1 -1
  3. package/dist/mcp/agent-variants/SessionStore.js +9 -0
  4. package/dist/mcp/agent-variants/SessionStore.js.map +1 -1
  5. package/dist/mcp/agent-variants/WorktreeOrchestrator.d.ts +42 -0
  6. package/dist/mcp/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
  7. package/dist/mcp/agent-variants/WorktreeOrchestrator.js +411 -16
  8. package/dist/mcp/agent-variants/WorktreeOrchestrator.js.map +1 -1
  9. package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +1 -1
  10. package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.js +20 -0
  11. package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.js.map +1 -1
  12. package/dist/mcp/agent-variants/createZeroToOneTool.d.ts +17 -1
  13. package/dist/mcp/agent-variants/createZeroToOneTool.d.ts.map +1 -1
  14. package/dist/mcp/agent-variants/createZeroToOneTool.js +31 -2
  15. package/dist/mcp/agent-variants/createZeroToOneTool.js.map +1 -1
  16. package/dist/mcp/agent-variants/tools.d.ts +3 -1
  17. package/dist/mcp/agent-variants/tools.d.ts.map +1 -1
  18. package/dist/mcp/agent-variants/tools.js +14 -8
  19. package/dist/mcp/agent-variants/tools.js.map +1 -1
  20. package/dist/mcp/server.d.ts.map +1 -1
  21. package/dist/mcp/server.js +41 -1
  22. package/dist/mcp/server.js.map +1 -1
  23. package/dist/routes/agentVariants.d.ts.map +1 -1
  24. package/dist/routes/agentVariants.js +120 -1
  25. package/dist/routes/agentVariants.js.map +1 -1
  26. package/dist/services/ProjectDetectionService.d.ts.map +1 -1
  27. package/dist/services/ProjectDetectionService.js +13 -1
  28. package/dist/services/ProjectDetectionService.js.map +1 -1
  29. package/dist/services/SessionBridgeService.d.ts +13 -0
  30. package/dist/services/SessionBridgeService.d.ts.map +1 -1
  31. package/dist/services/SessionBridgeService.js +36 -0
  32. package/dist/services/SessionBridgeService.js.map +1 -1
  33. package/dist/services/StaticPreviewServer.d.ts +24 -0
  34. package/dist/services/StaticPreviewServer.d.ts.map +1 -0
  35. package/dist/services/StaticPreviewServer.js +232 -0
  36. package/dist/services/StaticPreviewServer.js.map +1 -0
  37. package/dist/services/WorktreeManager.d.ts +16 -0
  38. package/dist/services/WorktreeManager.d.ts.map +1 -1
  39. package/dist/services/WorktreeManager.js +46 -0
  40. package/dist/services/WorktreeManager.js.map +1 -1
  41. package/dist/services/staticStarter.d.ts +23 -0
  42. package/dist/services/staticStarter.d.ts.map +1 -0
  43. package/dist/services/staticStarter.js +91 -0
  44. package/dist/services/staticStarter.js.map +1 -0
  45. package/dist/utils/skills/claude-skill.d.ts +1 -1
  46. package/dist/utils/skills/claude-skill.d.ts.map +1 -1
  47. package/dist/utils/skills/claude-skill.js +4 -2
  48. package/dist/utils/skills/claude-skill.js.map +1 -1
  49. package/dist/utils/skills/cursor-rules.d.ts +1 -1
  50. package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
  51. package/dist/utils/skills/cursor-rules.js +4 -2
  52. package/dist/utils/skills/cursor-rules.js.map +1 -1
  53. package/dist/utils/skills/shared-variants-protocol.d.ts +1 -1
  54. package/dist/utils/skills/shared-variants-protocol.d.ts.map +1 -1
  55. package/dist/utils/skills/shared-variants-protocol.js +2 -2
  56. package/package.json +1 -1
  57. package/src/ui/dist/assets/{main-CIqMI5Le.js → main-DXMHtjqM.js} +18 -18
  58. package/src/ui/dist/index.html +1 -1
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CURSOR_RULES_CONTENT = exports.CURSOR_RULES_FILENAME = exports.CURSOR_RULES_VERSION = void 0;
4
4
  const shared_variants_protocol_1 = require("./shared-variants-protocol");
5
- exports.CURSOR_RULES_VERSION = 21;
5
+ exports.CURSOR_RULES_VERSION = 22;
6
6
  exports.CURSOR_RULES_FILENAME = 'rivet.mdc';
7
7
  const CURSOR_RULES_VERSION_MARKER = `rivet-rules-version: ${exports.CURSOR_RULES_VERSION}`;
8
8
  const AGENT_VARIANTS_SECTION = (0, shared_variants_protocol_1.buildAgentVariantsSection)({
@@ -21,7 +21,7 @@ alwaysApply: false
21
21
  <!-- ${CURSOR_RULES_VERSION_MARKER} -->
22
22
  # Rivet
23
23
 
24
- Two flows: the **visual editor** (point-and-click changes to a running web app) and the **agent-variants flow** (explore N parallel design directions before committing).
24
+ Two flows: the **visual editor** (point-and-click changes to a web app — including an empty or HTML-only folder, which opens in static mode) and the **agent-variants flow** (explore N parallel design directions before committing).
25
25
 
26
26
  > Tip: type \`@rivet.mdc\` in chat to invoke this rule manually.
27
27
 
@@ -31,6 +31,8 @@ ${shared_variants_protocol_1.PICKING_THE_FLOW_TABLE}
31
31
 
32
32
  ## Starting a session
33
33
 
34
+ An **empty or HTML-only folder is a valid target** — \`detect_project\` returns \`framework: 'static'\` for it and \`open_visual_editor\` opens it in static mode (no dev server). When the user says "open rivet" / "use rivet here" in such a folder, open the editor — do NOT refuse or reroute to variants because there's "no app yet."
35
+
34
36
  1. Call \`detect_project\` — returns project info including \`framework\` and \`projectPath\`
35
37
  2. Call \`open_visual_editor({ projectPath, framework })\` — do NOT pass \`startPort\` or any port; the tool handles port selection automatically
36
38
  3. Tell the user: "Rivet is ready — make your visual changes and click 'Send to Cursor'."
@@ -1 +1 @@
1
- {"version":3,"file":"cursor-rules.js","sourceRoot":"","sources":["../../../src/utils/skills/cursor-rules.ts"],"names":[],"mappings":";;;AAAA,yEAGoC;AAEvB,QAAA,oBAAoB,GAAG,EAAE,CAAC;AAC1B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACjD,MAAM,2BAA2B,GAAG,wBAAwB,4BAAoB,EAAE,CAAC;AAEnF,MAAM,sBAAsB,GAAG,IAAA,oDAAyB,EAAC;IACvD,cAAc,EAAE,SAAS;IACzB,KAAK,EAAE;;;iKAGwJ;IAC/J,YAAY,EAAE,iFAAiF;IAC/F,cAAc,EAAE,WAAW;CAC5B,CAAC,CAAC;AAEU,QAAA,oBAAoB,GAAG;;;;OAI7B,2BAA2B;;;;;;;EAOhC,iDAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoCtB,sBAAsB;CACvB,CAAC"}
1
+ {"version":3,"file":"cursor-rules.js","sourceRoot":"","sources":["../../../src/utils/skills/cursor-rules.ts"],"names":[],"mappings":";;;AAAA,yEAGoC;AAEvB,QAAA,oBAAoB,GAAG,EAAE,CAAC;AAC1B,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACjD,MAAM,2BAA2B,GAAG,wBAAwB,4BAAoB,EAAE,CAAC;AAEnF,MAAM,sBAAsB,GAAG,IAAA,oDAAyB,EAAC;IACvD,cAAc,EAAE,SAAS;IACzB,KAAK,EAAE;;;iKAGwJ;IAC/J,YAAY,EAAE,iFAAiF;IAC/F,cAAc,EAAE,WAAW;CAC5B,CAAC,CAAC;AAEU,QAAA,oBAAoB,GAAG;;;;OAI7B,2BAA2B;;;;;;;EAOhC,iDAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsCtB,sBAAsB;CACvB,CAAC"}
@@ -5,7 +5,7 @@
5
5
  */
6
6
  export declare const BRIEF_FORMAT_INSTRUCTION: string;
7
7
  /** Routing table — identical in every agent skill file */
8
- export declare const PICKING_THE_FLOW_TABLE = "## Picking the flow\n\n| User says | Flow |\n|---|---|\n| \"open rivet\", \"make a visual change to X\" | **Visual editor** (below) |\n| \"create variants of X\", \"show me 3-5 options for X\", \"explore approaches to X\" | **Agent variants \u2014 existing project** (`start_variants`, `mode='existing'`) |\n| \"build me a settings page from scratch\", \"add a feature for Y\" | **Agent variants \u2014 existing project** (`start_variants`, no `target`) |\n| \"create a new Vite todo app\", \"scaffold a fresh dashboard\" | **Agent variants \u2014 fresh project** (`start_variants`, `mode='zero_to_one'`) |\n| \"build me a dashboard like stripe.com\", \"use this URL as inspiration\" | **Agent variants \u2014 fresh, source-grounded** (`extract_inspiration_context` \u2192 `start_variants`, `mode='zero_to_one'`) |";
8
+ export declare const PICKING_THE_FLOW_TABLE = "## Picking the flow\n\n| User says | Flow |\n|---|---|\n| \"open rivet\", \"use rivet here\", \"make a visual change to X\" \u2014 **including in an empty or HTML-only folder** | **Visual editor** (below). An empty / HTML-only directory is a valid target \u2014 it opens in **static mode** (no dev server). Do NOT reroute to variants or refuse just because there's no app/dev server yet. |\n| \"create variants of X\", \"show me 3-5 options for X\", \"explore approaches to X\" | **Agent variants \u2014 existing project** (`start_variants`, `mode='existing'`) |\n| \"build me a settings page from scratch\", \"add a feature for Y\" | **Agent variants \u2014 existing project** (`start_variants`, no `target`) |\n| \"create a new Vite todo app\", \"scaffold a fresh dashboard\" | **Agent variants \u2014 fresh project** (`start_variants`, `mode='zero_to_one'`) |\n| \"build me a dashboard like stripe.com\", \"use this URL as inspiration\" | **Agent variants \u2014 fresh, source-grounded** (`extract_inspiration_context` \u2192 `start_variants`, `mode='zero_to_one'`) |";
9
9
  /**
10
10
  * Builds the full Agent Variants flow section, parameterised on the small
11
11
  * number of lines that differ between Claude Code and Cursor.
@@ -1 +1 @@
1
- {"version":3,"file":"shared-variants-protocol.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/shared-variants-protocol.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAGgF,CAAC;AAEtH,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,mzBAQoK,CAAC;AAExM;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,2DAA2D;IAC3D,cAAc,EAAE,MAAM,CAAC;IACvB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,YAAY,EAAE,MAAM,CAAC;IACrB,8FAA8F;IAC9F,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,CA2GT"}
1
+ {"version":3,"file":"shared-variants-protocol.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/shared-variants-protocol.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAGgF,CAAC;AAEtH,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,mjCAQoK,CAAC;AAExM;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE;IAC9C,2DAA2D;IAC3D,cAAc,EAAE,MAAM,CAAC;IACvB,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd,qFAAqF;IACrF,YAAY,EAAE,MAAM,CAAC;IACrB,8FAA8F;IAC9F,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,CA2GT"}
@@ -16,7 +16,7 @@ exports.PICKING_THE_FLOW_TABLE = `## Picking the flow
16
16
 
17
17
  | User says | Flow |
18
18
  |---|---|
19
- | "open rivet", "make a visual change to X" | **Visual editor** (below) |
19
+ | "open rivet", "use rivet here", "make a visual change to X" — **including in an empty or HTML-only folder** | **Visual editor** (below). An empty / HTML-only directory is a valid target — it opens in **static mode** (no dev server). Do NOT reroute to variants or refuse just because there's no app/dev server yet. |
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'\`) |
@@ -82,7 +82,7 @@ For brand-new projects the user describes from scratch ("build me a Vite todo ap
82
82
  - \`framework\` (optional, defaults to \`'vite'\`)
83
83
  - \`destinationParent\` (optional, absolute path; defaults to the user's home dir)
84
84
 
85
- Response: \`{ sessionId, stage: 'work_items_ready', mode: 'zero_to_one', leaseId, leaseTtlMs, variants: [...], scaffoldBaseWorkItemId, destinationPath, visualEditor? }\`. The server opened the editor for you if \`visualEditor\` is present — share \`visualEditor.url\` with the user immediately ("Generating variants — watch here: <url>"). Skip the manual \`detect_project\` / \`open_visual_editor\` step (the destination project doesn't exist yet, so \`detect_project\` would fail). Each \`variants[i].workItem\` carries \`input\` and \`attempt\`.
85
+ Response: \`{ sessionId, stage: 'work_items_ready', mode: 'zero_to_one', leaseId, leaseTtlMs, variants: [...], scaffoldBaseWorkItemId, destinationPath, visualEditor? }\`. The server opened the editor for you if \`visualEditor\` is present — share \`visualEditor.url\` with the user immediately ("Generating variants — watch here: <url>"). Skip the manual \`detect_project\` / \`open_visual_editor\` step here because the zero-to-one destination is a brand-new directory the server derives — it doesn't exist on disk yet, so \`detect_project\` on it would fail. This applies ONLY to the not-yet-created zero-to-one destination. An **existing** empty or HTML-only folder is a perfectly valid \`open_visual_editor\` target (it opens in static mode) — do not generalize this skip to "empty dirs can't be opened." Each \`variants[i].workItem\` carries \`input\` and \`attempt\`.
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rivet-design",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
4
4
  "description": "Local visual web development tool with AI-powered code modification",
5
5
  "main": "dist/index.js",
6
6
  "workspaces": [