rivet-design 0.12.4 → 0.13.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.
- package/README.md +50 -26
- package/README.npm.md +50 -26
- package/bin/rivet.js +39 -24
- package/dist/{mcp/agent-variants → agent-variants}/SessionStore.d.ts +11 -19
- package/dist/agent-variants/SessionStore.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/SessionStore.js +64 -79
- package/dist/agent-variants/SessionStore.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/WorktreeOrchestrator.d.ts +53 -21
- package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/WorktreeOrchestrator.js +291 -49
- package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/WorktreeOrchestrator.testHelpers.d.ts +1 -9
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/WorktreeOrchestrator.testHelpers.js +3 -18
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js.map +1 -0
- package/dist/agent-variants/briefContent.d.ts.map +1 -0
- package/dist/agent-variants/briefContent.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/contracts.d.ts +715 -721
- package/dist/agent-variants/contracts.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/contracts.js +2 -3
- package/dist/agent-variants/contracts.js.map +1 -0
- package/dist/agent-variants/createProjectArtifacts.d.ts.map +1 -0
- package/dist/agent-variants/createProjectArtifacts.js.map +1 -0
- package/dist/agent-variants/diffQa.d.ts.map +1 -0
- package/dist/agent-variants/diffQa.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/elementRefToTarget.d.ts +1 -1
- package/dist/agent-variants/elementRefToTarget.d.ts.map +1 -0
- package/dist/agent-variants/elementRefToTarget.js.map +1 -0
- package/dist/agent-variants/errors.d.ts.map +1 -0
- package/dist/agent-variants/errors.js.map +1 -0
- package/dist/agent-variants/generatedDestination.d.ts +29 -0
- package/dist/agent-variants/generatedDestination.d.ts.map +1 -0
- package/dist/agent-variants/generatedDestination.js +59 -0
- package/dist/agent-variants/generatedDestination.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/index.d.ts +3 -6
- package/dist/agent-variants/index.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/index.js +3 -6
- package/dist/agent-variants/index.js.map +1 -0
- package/dist/agent-variants/previewQa.d.ts.map +1 -0
- package/dist/agent-variants/previewQa.js.map +1 -0
- package/dist/agent-variants/runLabel.d.ts.map +1 -0
- package/dist/agent-variants/runLabel.js.map +1 -0
- package/dist/agent-variants/runPlan.d.ts.map +1 -0
- package/dist/agent-variants/runPlan.js.map +1 -0
- package/dist/agent-variants/sourceContext.d.ts.map +1 -0
- package/dist/agent-variants/sourceContext.js.map +1 -0
- package/dist/agent-variants/variantContext.d.ts.map +1 -0
- package/dist/agent-variants/variantContext.js.map +1 -0
- package/dist/cli/client.d.ts +43 -0
- package/dist/cli/client.d.ts.map +1 -0
- package/dist/cli/client.js +109 -0
- package/dist/cli/client.js.map +1 -0
- package/dist/cli/commandNames.d.ts +9 -0
- package/dist/cli/commandNames.d.ts.map +1 -0
- package/dist/cli/commandNames.js +24 -0
- package/dist/cli/commandNames.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +10 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +81 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/elementSelector.d.ts +10 -0
- package/dist/cli/commands/elementSelector.d.ts.map +1 -0
- package/dist/cli/commands/elementSelector.js +41 -0
- package/dist/cli/commands/elementSelector.js.map +1 -0
- package/dist/cli/commands/evidence.d.ts +9 -0
- package/dist/cli/commands/evidence.d.ts.map +1 -0
- package/dist/cli/commands/evidence.js +85 -0
- package/dist/cli/commands/evidence.js.map +1 -0
- package/dist/cli/commands/mcpServe.d.ts +40 -0
- package/dist/cli/commands/mcpServe.d.ts.map +1 -0
- package/dist/cli/commands/mcpServe.js +440 -0
- package/dist/cli/commands/mcpServe.js.map +1 -0
- package/dist/cli/commands/open.d.ts +28 -0
- package/dist/cli/commands/open.d.ts.map +1 -0
- package/dist/cli/commands/open.js +280 -0
- package/dist/cli/commands/open.js.map +1 -0
- package/dist/cli/commands/reference.d.ts +8 -0
- package/dist/cli/commands/reference.d.ts.map +1 -0
- package/dist/cli/commands/reference.js +101 -0
- package/dist/cli/commands/reference.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +9 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +182 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/shared.d.ts +31 -0
- package/dist/cli/commands/shared.d.ts.map +1 -0
- package/dist/cli/commands/shared.js +82 -0
- package/dist/cli/commands/shared.js.map +1 -0
- package/dist/cli/commands/status.d.ts +10 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +61 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +8 -0
- package/dist/cli/commands/stop.d.ts.map +1 -0
- package/dist/cli/commands/stop.js +41 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/variants.d.ts +4 -0
- package/dist/cli/commands/variants.d.ts.map +1 -0
- package/dist/cli/commands/variants.js +374 -0
- package/dist/cli/commands/variants.js.map +1 -0
- package/dist/cli/commands/wait.d.ts +10 -0
- package/dist/cli/commands/wait.d.ts.map +1 -0
- package/dist/cli/commands/wait.js +101 -0
- package/dist/cli/commands/wait.js.map +1 -0
- package/dist/cli/entry.d.ts +12 -0
- package/dist/cli/entry.d.ts.map +1 -0
- package/dist/cli/entry.js +61 -0
- package/dist/cli/entry.js.map +1 -0
- package/dist/cli/envelope.d.ts +60 -0
- package/dist/cli/envelope.d.ts.map +1 -0
- package/dist/cli/envelope.js +57 -0
- package/dist/cli/envelope.js.map +1 -0
- package/dist/cli/flags.d.ts +20 -0
- package/dist/cli/flags.d.ts.map +1 -0
- package/dist/cli/flags.js +72 -0
- package/dist/cli/flags.js.map +1 -0
- package/dist/cli/handoff.d.ts +54 -0
- package/dist/cli/handoff.d.ts.map +1 -0
- package/dist/cli/handoff.js +106 -0
- package/dist/cli/handoff.js.map +1 -0
- package/dist/cli/handoffStore.d.ts +24 -0
- package/dist/cli/handoffStore.d.ts.map +1 -0
- package/dist/cli/handoffStore.js +49 -0
- package/dist/cli/handoffStore.js.map +1 -0
- package/dist/cli/hostWorkNextAction.d.ts +45 -0
- package/dist/cli/hostWorkNextAction.d.ts.map +1 -0
- package/dist/cli/hostWorkNextAction.js +43 -0
- package/dist/cli/hostWorkNextAction.js.map +1 -0
- package/dist/cli/io.d.ts +17 -0
- package/dist/cli/io.d.ts.map +1 -0
- package/dist/cli/io.js +19 -0
- package/dist/cli/io.js.map +1 -0
- package/dist/cli/router.d.ts +23 -0
- package/dist/cli/router.d.ts.map +1 -0
- package/dist/cli/router.js +236 -0
- package/dist/cli/router.js.map +1 -0
- package/dist/cli/runnerSelection.d.ts +60 -0
- package/dist/cli/runnerSelection.d.ts.map +1 -0
- package/dist/cli/runnerSelection.js +93 -0
- package/dist/cli/runnerSelection.js.map +1 -0
- package/dist/cli/serverHandshake.d.ts +51 -0
- package/dist/cli/serverHandshake.d.ts.map +1 -0
- package/dist/cli/serverHandshake.js +144 -0
- package/dist/cli/serverHandshake.js.map +1 -0
- package/dist/index.d.ts +2 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +84 -138
- package/dist/index.js.map +1 -1
- package/dist/install/allowlists.d.ts +65 -0
- package/dist/install/allowlists.d.ts.map +1 -0
- package/dist/install/allowlists.js +333 -0
- package/dist/install/allowlists.js.map +1 -0
- package/dist/install/codexGuidance.d.ts +11 -0
- package/dist/install/codexGuidance.d.ts.map +1 -0
- package/dist/install/codexGuidance.js +90 -0
- package/dist/install/codexGuidance.js.map +1 -0
- package/dist/install/harnesses.d.ts +37 -26
- package/dist/install/harnesses.d.ts.map +1 -1
- package/dist/install/harnesses.js +312 -502
- package/dist/install/harnesses.js.map +1 -1
- package/dist/install/legacyMcp.d.ts +26 -0
- package/dist/install/legacyMcp.d.ts.map +1 -0
- package/dist/install/legacyMcp.js +160 -0
- package/dist/install/legacyMcp.js.map +1 -0
- package/dist/install/mcpRegistration.d.ts +45 -0
- package/dist/install/mcpRegistration.d.ts.map +1 -0
- package/dist/install/mcpRegistration.js +215 -0
- package/dist/install/mcpRegistration.js.map +1 -0
- package/dist/mcp/changeBatchClassification.d.ts +18 -20
- package/dist/mcp/changeBatchClassification.d.ts.map +1 -1
- package/dist/mcp/changeBatchClassification.js +41 -46
- package/dist/mcp/changeBatchClassification.js.map +1 -1
- package/dist/proxy-middleware/proxy-config.d.ts +6 -0
- package/dist/proxy-middleware/proxy-config.d.ts.map +1 -1
- package/dist/proxy-middleware/proxy-config.js +162 -5
- package/dist/proxy-middleware/proxy-config.js.map +1 -1
- package/dist/routes/agentVariants.d.ts +14 -2
- package/dist/routes/agentVariants.d.ts.map +1 -1
- package/dist/routes/agentVariants.js +321 -65
- package/dist/routes/agentVariants.js.map +1 -1
- package/dist/routes/cli.d.ts +31 -0
- package/dist/routes/cli.d.ts.map +1 -0
- package/dist/routes/cli.js +95 -0
- package/dist/routes/cli.js.map +1 -0
- package/dist/routes/git.d.ts +1 -0
- package/dist/routes/git.d.ts.map +1 -1
- package/dist/routes/git.js +2 -1
- package/dist/routes/git.js.map +1 -1
- package/dist/routes/inlineStartTracker.d.ts +23 -0
- package/dist/routes/inlineStartTracker.d.ts.map +1 -0
- package/dist/routes/inlineStartTracker.js +17 -0
- package/dist/routes/inlineStartTracker.js.map +1 -0
- package/dist/routes/mcp.d.ts +2 -12
- package/dist/routes/mcp.d.ts.map +1 -1
- package/dist/routes/mcp.js +4 -785
- package/dist/routes/mcp.js.map +1 -1
- package/dist/server.d.ts +24 -9
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +169 -33
- package/dist/server.js.map +1 -1
- package/dist/services/CommitMessageGenerator.d.ts +9 -1
- package/dist/services/CommitMessageGenerator.d.ts.map +1 -1
- package/dist/services/CommitMessageGenerator.js +4 -1
- package/dist/services/CommitMessageGenerator.js.map +1 -1
- package/dist/services/ComponentSearchService.d.ts +4 -1
- package/dist/services/ComponentSearchService.d.ts.map +1 -1
- package/dist/services/ComponentSearchService.js.map +1 -1
- package/dist/services/ConfigManager.d.ts +8 -0
- package/dist/services/ConfigManager.d.ts.map +1 -1
- package/dist/services/ConfigManager.js +9 -0
- package/dist/services/ConfigManager.js.map +1 -1
- package/dist/services/HistoryReplayService.d.ts +20 -9
- package/dist/services/HistoryReplayService.d.ts.map +1 -1
- package/dist/services/HistoryReplayService.js +99 -43
- package/dist/services/HistoryReplayService.js.map +1 -1
- package/dist/services/MCPVariantsTelemetry.d.ts +1 -1
- package/dist/services/MCPVariantsTelemetry.d.ts.map +1 -1
- package/dist/services/MCPVariantsTelemetry.js +1 -0
- package/dist/services/MCPVariantsTelemetry.js.map +1 -1
- package/dist/services/PRTitleGenerator.d.ts +10 -2
- package/dist/services/PRTitleGenerator.d.ts.map +1 -1
- package/dist/services/PRTitleGenerator.js +8 -2
- package/dist/services/PRTitleGenerator.js.map +1 -1
- package/dist/services/ProjectDetectionService.d.ts.map +1 -1
- package/dist/services/ProjectDetectionService.js +14 -4
- package/dist/services/ProjectDetectionService.js.map +1 -1
- package/dist/services/ProjectMetadataStore.d.ts +115 -0
- package/dist/services/ProjectMetadataStore.d.ts.map +1 -0
- package/dist/services/ProjectMetadataStore.js +336 -0
- package/dist/services/ProjectMetadataStore.js.map +1 -0
- package/dist/services/SessionBridgeService.d.ts +52 -224
- package/dist/services/SessionBridgeService.d.ts.map +1 -1
- package/dist/services/SessionBridgeService.js +97 -649
- package/dist/services/SessionBridgeService.js.map +1 -1
- package/dist/services/SessionService.d.ts +4 -1
- package/dist/services/SessionService.d.ts.map +1 -1
- package/dist/services/SessionService.js +7 -4
- package/dist/services/SessionService.js.map +1 -1
- package/dist/services/StaticFileService.d.ts.map +1 -1
- package/dist/services/StaticFileService.js +6 -0
- package/dist/services/StaticFileService.js.map +1 -1
- package/dist/services/TelemetryService.d.ts +16 -80
- package/dist/services/TelemetryService.d.ts.map +1 -1
- package/dist/services/TelemetryService.js +18 -94
- package/dist/services/TelemetryService.js.map +1 -1
- package/dist/services/VariantGenerationService.d.ts +52 -0
- package/dist/services/VariantGenerationService.d.ts.map +1 -0
- package/dist/services/VariantGenerationService.js +272 -0
- package/dist/services/VariantGenerationService.js.map +1 -0
- package/dist/services/VariantHistoryService.d.ts +37 -1
- package/dist/services/VariantHistoryService.d.ts.map +1 -1
- package/dist/services/VariantHistoryService.js +122 -1
- package/dist/services/VariantHistoryService.js.map +1 -1
- package/dist/services/VariantRunService.d.ts +25 -6
- package/dist/services/VariantRunService.d.ts.map +1 -1
- package/dist/services/VariantRunService.js +98 -4
- package/dist/services/VariantRunService.js.map +1 -1
- package/dist/services/VariantsRuntime.d.ts +1 -3
- package/dist/services/VariantsRuntime.d.ts.map +1 -1
- package/dist/services/VariantsRuntime.js +0 -1
- package/dist/services/VariantsRuntime.js.map +1 -1
- package/dist/services/WorktreeManager.d.ts +1 -1
- package/dist/services/WorktreeManager.d.ts.map +1 -1
- package/dist/services/createAgentVariantsOrchestrator.d.ts +2 -2
- package/dist/services/createAgentVariantsOrchestrator.d.ts.map +1 -1
- package/dist/services/createAgentVariantsOrchestrator.js +2 -3
- package/dist/services/createAgentVariantsOrchestrator.js.map +1 -1
- package/dist/services/projectMetadataMigrations.d.ts +59 -0
- package/dist/services/projectMetadataMigrations.d.ts.map +1 -0
- package/dist/services/projectMetadataMigrations.js +109 -0
- package/dist/services/projectMetadataMigrations.js.map +1 -0
- package/dist/types/change-request-types.d.ts +22 -0
- package/dist/types/change-request-types.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +2 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +3 -7
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/loopback.d.ts +3 -0
- package/dist/utils/loopback.d.ts.map +1 -0
- package/dist/utils/loopback.js +13 -0
- package/dist/utils/loopback.js.map +1 -0
- package/dist/utils/pid.d.ts +3 -0
- package/dist/utils/pid.d.ts.map +1 -0
- package/dist/utils/pid.js +15 -0
- package/dist/utils/pid.js.map +1 -0
- package/dist/utils/queueAccess.d.ts +7 -0
- package/dist/utils/queueAccess.d.ts.map +1 -1
- package/dist/utils/queueAccess.js +8 -1
- package/dist/utils/queueAccess.js.map +1 -1
- package/dist/utils/shouldRecordHostedDemoSessionAction.d.ts +3 -3
- package/dist/utils/shouldRecordHostedDemoSessionAction.d.ts.map +1 -1
- package/dist/utils/shouldRecordHostedDemoSessionAction.js +3 -19
- package/dist/utils/shouldRecordHostedDemoSessionAction.js.map +1 -1
- package/dist/utils/skillWriter.d.ts.map +1 -1
- package/dist/utils/skillWriter.js +12 -11
- package/dist/utils/skillWriter.js.map +1 -1
- package/dist/utils/skills/claude-skill.d.ts +7 -2
- package/dist/utils/skills/claude-skill.d.ts.map +1 -1
- package/dist/utils/skills/claude-skill.js +10 -83
- package/dist/utils/skills/claude-skill.js.map +1 -1
- package/dist/utils/skills/cli-guidance.d.ts +12 -0
- package/dist/utils/skills/cli-guidance.d.ts.map +1 -0
- package/dist/utils/skills/cli-guidance.js +57 -0
- package/dist/utils/skills/cli-guidance.js.map +1 -0
- package/dist/utils/skills/cursor-rules.d.ts +8 -2
- package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
- package/dist/utils/skills/cursor-rules.js +11 -80
- package/dist/utils/skills/cursor-rules.js.map +1 -1
- package/dist/utils/variantSessionStart.d.ts +1 -1
- package/dist/utils/variantSessionStart.d.ts.map +1 -1
- package/dist/utils/variantSessionStart.js +1 -1
- package/dist/utils/variantSessionStart.js.map +1 -1
- package/package.json +4 -4
- package/src/ui/dist/assets/main-BWOvFoal.js +419 -0
- package/src/ui/dist/assets/main-Dyos9I29.css +1 -0
- package/src/ui/dist/index.html +2 -2
- package/dist/mcp/agent-variants/SessionStore.d.ts.map +0 -1
- package/dist/mcp/agent-variants/SessionStore.js.map +0 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.d.ts.map +0 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.js.map +0 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +0 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.js.map +0 -1
- package/dist/mcp/agent-variants/areNaSourceContext.d.ts +0 -20
- package/dist/mcp/agent-variants/areNaSourceContext.d.ts.map +0 -1
- package/dist/mcp/agent-variants/areNaSourceContext.js +0 -118
- package/dist/mcp/agent-variants/areNaSourceContext.js.map +0 -1
- package/dist/mcp/agent-variants/briefContent.d.ts.map +0 -1
- package/dist/mcp/agent-variants/briefContent.js.map +0 -1
- package/dist/mcp/agent-variants/contracts.d.ts.map +0 -1
- package/dist/mcp/agent-variants/contracts.js.map +0 -1
- package/dist/mcp/agent-variants/createProjectArtifacts.d.ts.map +0 -1
- package/dist/mcp/agent-variants/createProjectArtifacts.js.map +0 -1
- package/dist/mcp/agent-variants/createZeroToOneTool.d.ts +0 -63
- package/dist/mcp/agent-variants/createZeroToOneTool.d.ts.map +0 -1
- package/dist/mcp/agent-variants/createZeroToOneTool.js +0 -265
- package/dist/mcp/agent-variants/createZeroToOneTool.js.map +0 -1
- package/dist/mcp/agent-variants/diffQa.d.ts.map +0 -1
- package/dist/mcp/agent-variants/diffQa.js.map +0 -1
- package/dist/mcp/agent-variants/elementRefToTarget.d.ts.map +0 -1
- package/dist/mcp/agent-variants/elementRefToTarget.js.map +0 -1
- package/dist/mcp/agent-variants/errors.d.ts.map +0 -1
- package/dist/mcp/agent-variants/errors.js.map +0 -1
- package/dist/mcp/agent-variants/generatedDestination.d.ts +0 -75
- package/dist/mcp/agent-variants/generatedDestination.d.ts.map +0 -1
- package/dist/mcp/agent-variants/generatedDestination.js +0 -103
- package/dist/mcp/agent-variants/generatedDestination.js.map +0 -1
- package/dist/mcp/agent-variants/index.d.ts.map +0 -1
- package/dist/mcp/agent-variants/index.js.map +0 -1
- package/dist/mcp/agent-variants/pendingChangesAdapter.d.ts +0 -38
- package/dist/mcp/agent-variants/pendingChangesAdapter.d.ts.map +0 -1
- package/dist/mcp/agent-variants/pendingChangesAdapter.js +0 -93
- package/dist/mcp/agent-variants/pendingChangesAdapter.js.map +0 -1
- package/dist/mcp/agent-variants/pinterestSourceContext.d.ts +0 -23
- package/dist/mcp/agent-variants/pinterestSourceContext.d.ts.map +0 -1
- package/dist/mcp/agent-variants/pinterestSourceContext.js +0 -137
- package/dist/mcp/agent-variants/pinterestSourceContext.js.map +0 -1
- package/dist/mcp/agent-variants/previewQa.d.ts.map +0 -1
- package/dist/mcp/agent-variants/previewQa.js.map +0 -1
- package/dist/mcp/agent-variants/runLabel.d.ts.map +0 -1
- package/dist/mcp/agent-variants/runLabel.js.map +0 -1
- package/dist/mcp/agent-variants/runPlan.d.ts.map +0 -1
- package/dist/mcp/agent-variants/runPlan.js.map +0 -1
- package/dist/mcp/agent-variants/sourceContext.d.ts.map +0 -1
- package/dist/mcp/agent-variants/sourceContext.js.map +0 -1
- package/dist/mcp/agent-variants/tools.d.ts +0 -187
- package/dist/mcp/agent-variants/tools.d.ts.map +0 -1
- package/dist/mcp/agent-variants/tools.js +0 -1165
- package/dist/mcp/agent-variants/tools.js.map +0 -1
- package/dist/mcp/agent-variants/variantContext.d.ts.map +0 -1
- package/dist/mcp/agent-variants/variantContext.js.map +0 -1
- package/dist/mcp/auth/httpOAuthProvider.d.ts +0 -103
- package/dist/mcp/auth/httpOAuthProvider.d.ts.map +0 -1
- package/dist/mcp/auth/httpOAuthProvider.js +0 -735
- package/dist/mcp/auth/httpOAuthProvider.js.map +0 -1
- package/dist/mcp/auth/tools.d.ts +0 -39
- package/dist/mcp/auth/tools.d.ts.map +0 -1
- package/dist/mcp/auth/tools.js +0 -304
- package/dist/mcp/auth/tools.js.map +0 -1
- package/dist/mcp/branding.d.ts +0 -4
- package/dist/mcp/branding.d.ts.map +0 -1
- package/dist/mcp/branding.js +0 -8
- package/dist/mcp/branding.js.map +0 -1
- package/dist/mcp/hostedServer.d.ts +0 -27
- package/dist/mcp/hostedServer.d.ts.map +0 -1
- package/dist/mcp/hostedServer.js +0 -71
- package/dist/mcp/hostedServer.js.map +0 -1
- package/dist/mcp/httpServer.d.ts +0 -63
- package/dist/mcp/httpServer.d.ts.map +0 -1
- package/dist/mcp/httpServer.js +0 -602
- package/dist/mcp/httpServer.js.map +0 -1
- package/dist/mcp/instructions.d.ts +0 -25
- package/dist/mcp/instructions.d.ts.map +0 -1
- package/dist/mcp/instructions.js +0 -39
- package/dist/mcp/instructions.js.map +0 -1
- package/dist/mcp/integrations/tools.d.ts +0 -19
- package/dist/mcp/integrations/tools.d.ts.map +0 -1
- package/dist/mcp/integrations/tools.js +0 -101
- package/dist/mcp/integrations/tools.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -214
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -2536
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/toolAnalytics.d.ts +0 -26
- package/dist/mcp/toolAnalytics.d.ts.map +0 -1
- package/dist/mcp/toolAnalytics.js +0 -95
- package/dist/mcp/toolAnalytics.js.map +0 -1
- package/dist/mcp/types.d.ts +0 -7
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/mcp/types.js +0 -3
- package/dist/mcp/types.js.map +0 -1
- package/dist/mcp/watchLoopResumePrompt.d.ts +0 -16
- package/dist/mcp/watchLoopResumePrompt.d.ts.map +0 -1
- package/dist/mcp/watchLoopResumePrompt.js +0 -21
- package/dist/mcp/watchLoopResumePrompt.js.map +0 -1
- package/dist/prompts/agentModPrompts.d.ts +0 -4
- package/dist/prompts/agentModPrompts.d.ts.map +0 -1
- package/dist/prompts/agentModPrompts.js +0 -34
- package/dist/prompts/agentModPrompts.js.map +0 -1
- package/dist/prompts/tokenWriterPrompts.d.ts +0 -4
- package/dist/prompts/tokenWriterPrompts.d.ts.map +0 -1
- package/dist/prompts/tokenWriterPrompts.js +0 -59
- package/dist/prompts/tokenWriterPrompts.js.map +0 -1
- package/dist/routes/comments.d.ts +0 -3
- package/dist/routes/comments.d.ts.map +0 -1
- package/dist/routes/comments.js +0 -113
- package/dist/routes/comments.js.map +0 -1
- package/dist/routes/components.d.ts +0 -7
- package/dist/routes/components.d.ts.map +0 -1
- package/dist/routes/components.js +0 -88
- package/dist/routes/components.js.map +0 -1
- package/dist/routes/controls.d.ts +0 -7
- package/dist/routes/controls.d.ts.map +0 -1
- package/dist/routes/controls.js +0 -50
- package/dist/routes/controls.js.map +0 -1
- package/dist/routes/design.d.ts +0 -2
- package/dist/routes/design.d.ts.map +0 -1
- package/dist/routes/design.js +0 -29
- package/dist/routes/design.js.map +0 -1
- package/dist/routes/modifications.d.ts +0 -10
- package/dist/routes/modifications.d.ts.map +0 -1
- package/dist/routes/modifications.js +0 -394
- package/dist/routes/modifications.js.map +0 -1
- package/dist/routes/tokens.d.ts +0 -2
- package/dist/routes/tokens.d.ts.map +0 -1
- package/dist/routes/tokens.js +0 -115
- package/dist/routes/tokens.js.map +0 -1
- package/dist/services/AgentSessionService.d.ts +0 -91
- package/dist/services/AgentSessionService.d.ts.map +0 -1
- package/dist/services/AgentSessionService.js +0 -282
- package/dist/services/AgentSessionService.js.map +0 -1
- package/dist/services/BridgeBatchPipeline.d.ts +0 -103
- package/dist/services/BridgeBatchPipeline.d.ts.map +0 -1
- package/dist/services/BridgeBatchPipeline.js +0 -295
- package/dist/services/BridgeBatchPipeline.js.map +0 -1
- package/dist/services/BridgeQueueStore.d.ts +0 -28
- package/dist/services/BridgeQueueStore.d.ts.map +0 -1
- package/dist/services/BridgeQueueStore.js +0 -88
- package/dist/services/BridgeQueueStore.js.map +0 -1
- package/dist/services/CSSTokenWriter.d.ts +0 -22
- package/dist/services/CSSTokenWriter.d.ts.map +0 -1
- package/dist/services/CSSTokenWriter.js +0 -116
- package/dist/services/CSSTokenWriter.js.map +0 -1
- package/dist/services/DesignTokenService.d.ts +0 -39
- package/dist/services/DesignTokenService.d.ts.map +0 -1
- package/dist/services/DesignTokenService.js +0 -100
- package/dist/services/DesignTokenService.js.map +0 -1
- package/dist/services/InlineVariantGenerationService.d.ts +0 -51
- package/dist/services/InlineVariantGenerationService.d.ts.map +0 -1
- package/dist/services/InlineVariantGenerationService.js +0 -475
- package/dist/services/InlineVariantGenerationService.js.map +0 -1
- package/dist/services/InterfaceGenerationService.d.ts +0 -12
- package/dist/services/InterfaceGenerationService.d.ts.map +0 -1
- package/dist/services/InterfaceGenerationService.js +0 -256
- package/dist/services/InterfaceGenerationService.js.map +0 -1
- package/dist/services/TailwindConfigWriter.d.ts +0 -24
- package/dist/services/TailwindConfigWriter.d.ts.map +0 -1
- package/dist/services/TailwindConfigWriter.js +0 -105
- package/dist/services/TailwindConfigWriter.js.map +0 -1
- package/dist/services/TerminalAgentRunner.d.ts +0 -65
- package/dist/services/TerminalAgentRunner.d.ts.map +0 -1
- package/dist/services/TerminalAgentRunner.js +0 -511
- package/dist/services/TerminalAgentRunner.js.map +0 -1
- package/dist/services/VisualVariantAgentRunner.d.ts +0 -20
- package/dist/services/VisualVariantAgentRunner.d.ts.map +0 -1
- package/dist/services/VisualVariantAgentRunner.js +0 -66
- package/dist/services/VisualVariantAgentRunner.js.map +0 -1
- package/dist/services/adapters/TailwindCSSTokenAdapter.d.ts +0 -35
- package/dist/services/adapters/TailwindCSSTokenAdapter.d.ts.map +0 -1
- package/dist/services/adapters/TailwindCSSTokenAdapter.js +0 -278
- package/dist/services/adapters/TailwindCSSTokenAdapter.js.map +0 -1
- package/dist/services/agent/AgentCore.d.ts +0 -126
- package/dist/services/agent/AgentCore.d.ts.map +0 -1
- package/dist/services/agent/AgentCore.js +0 -759
- package/dist/services/agent/AgentCore.js.map +0 -1
- package/dist/services/agent/AgentModService.d.ts +0 -98
- package/dist/services/agent/AgentModService.d.ts.map +0 -1
- package/dist/services/agent/AgentModService.js +0 -400
- package/dist/services/agent/AgentModService.js.map +0 -1
- package/dist/services/agent/index.d.ts +0 -2
- package/dist/services/agent/index.d.ts.map +0 -1
- package/dist/services/agent/index.js +0 -6
- package/dist/services/agent/index.js.map +0 -1
- package/dist/types/editor-interface-types.d.ts +0 -67
- package/dist/types/editor-interface-types.d.ts.map +0 -1
- package/dist/types/editor-interface-types.js +0 -12
- package/dist/types/editor-interface-types.js.map +0 -1
- package/dist/utils/elementRefToContext.d.ts +0 -4
- package/dist/utils/elementRefToContext.d.ts.map +0 -1
- package/dist/utils/elementRefToContext.js +0 -63
- package/dist/utils/elementRefToContext.js.map +0 -1
- package/dist/utils/skills/shared-variants-protocol.d.ts +0 -69
- package/dist/utils/skills/shared-variants-protocol.d.ts.map +0 -1
- package/dist/utils/skills/shared-variants-protocol.js +0 -292
- package/dist/utils/skills/shared-variants-protocol.js.map +0 -1
- package/src/ui/dist/assets/main-Dnah9pII.css +0 -1
- package/src/ui/dist/assets/main-plq7aT76.js +0 -656
- /package/dist/{mcp/agent-variants → agent-variants}/briefContent.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/briefContent.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/createProjectArtifacts.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/createProjectArtifacts.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/diffQa.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/diffQa.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/elementRefToTarget.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/errors.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/errors.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/previewQa.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/previewQa.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/runLabel.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/runLabel.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/runPlan.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/runPlan.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/sourceContext.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/sourceContext.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/variantContext.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/variantContext.js +0 -0
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export type ControlValue = string | number | boolean;
|
|
2
|
-
/** A single CSS declaration a control resolves to when applied to the preview. */
|
|
3
|
-
export type CssDecl = {
|
|
4
|
-
selector: string;
|
|
5
|
-
property: string;
|
|
6
|
-
value: string;
|
|
7
|
-
};
|
|
8
|
-
export type BindingStatus = 'resolved' | 'unresolved' | 'stale';
|
|
9
|
-
/**
|
|
10
|
-
* Where a selector-bound control writes. Carries a resolution status so the UI
|
|
11
|
-
* can degrade gracefully when the selector no longer matches the live DOM
|
|
12
|
-
* (validated client-side after generation and after HMR).
|
|
13
|
-
*/
|
|
14
|
-
export type ControlBinding = {
|
|
15
|
-
selector: string;
|
|
16
|
-
property: string;
|
|
17
|
-
status: BindingStatus;
|
|
18
|
-
};
|
|
19
|
-
/**
|
|
20
|
-
* A generated control. `kind` is an open string — the UI renderer/resolver
|
|
21
|
-
* registry dispatches on it. `config` holds kind-specific data (validated on the
|
|
22
|
-
* backend for known kinds). Selector-bound kinds (scoped-slider, swatch-set)
|
|
23
|
-
* carry a `binding`; composite kinds (option-cards) keep their declarations in
|
|
24
|
-
* `config`.
|
|
25
|
-
*/
|
|
26
|
-
export type GeneratedControl = {
|
|
27
|
-
id: string;
|
|
28
|
-
kind: string;
|
|
29
|
-
label: string;
|
|
30
|
-
default?: ControlValue;
|
|
31
|
-
/** The project's real value before tuning (reset target). */
|
|
32
|
-
baseline?: ControlValue;
|
|
33
|
-
binding?: ControlBinding;
|
|
34
|
-
config: Record<string, unknown>;
|
|
35
|
-
};
|
|
36
|
-
export type InterfaceSection = {
|
|
37
|
-
id: string;
|
|
38
|
-
title: string;
|
|
39
|
-
controls: GeneratedControl[];
|
|
40
|
-
};
|
|
41
|
-
export type EditorInterface = {
|
|
42
|
-
version: number;
|
|
43
|
-
/** The natural-language intent that produced this interface. */
|
|
44
|
-
intent: string;
|
|
45
|
-
sections: InterfaceSection[];
|
|
46
|
-
};
|
|
47
|
-
/** The uncommitted local draft of control values for an interface. */
|
|
48
|
-
export type InterfaceSession = {
|
|
49
|
-
values: Record<string, ControlValue>;
|
|
50
|
-
};
|
|
51
|
-
export type ScopedSliderConfig = {
|
|
52
|
-
min: number;
|
|
53
|
-
max: number;
|
|
54
|
-
step?: number;
|
|
55
|
-
unit?: string;
|
|
56
|
-
};
|
|
57
|
-
export type SwatchSetConfig = {
|
|
58
|
-
swatches: string[];
|
|
59
|
-
};
|
|
60
|
-
export type OptionCardsConfig = {
|
|
61
|
-
options: Array<{
|
|
62
|
-
id: string;
|
|
63
|
-
label: string;
|
|
64
|
-
declarations: CssDecl[];
|
|
65
|
-
}>;
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=editor-interface-types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor-interface-types.d.ts","sourceRoot":"","sources":["../../src/types/editor-interface-types.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAErD,kFAAkF;AAClF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,CAAC;AAEhE;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC;CACvB,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,gBAAgB,EAAE,CAAC;CAC9B,CAAC;AAEF,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAkB,YAAY,CAAC,CAAC;CACtD,CAAC;AAMF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,EAAE,KAAK,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,YAAY,EAAE,OAAO,EAAE,CAAC;KACzB,CAAC,CAAC;CACJ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Generative Editor Interfaces — the schema for an LLM-generated editing UI.
|
|
3
|
-
// See docs/generative-editor-interfaces.md.
|
|
4
|
-
//
|
|
5
|
-
// The product is the *generation*: the user describes an editing task and the
|
|
6
|
-
// model authors a bespoke interface (whatever affordances fit). The renderer is
|
|
7
|
-
// generic and dispatches on `control.kind`, so the vocabulary is open and
|
|
8
|
-
// forward-compatible — an unknown kind degrades to a labeled fallback rather
|
|
9
|
-
// than breaking the spec. Shared between backend (generation) and UI
|
|
10
|
-
// (rendering/binding) via @rivet/core/types.
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
//# sourceMappingURL=editor-interface-types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"editor-interface-types.js","sourceRoot":"","sources":["../../src/types/editor-interface-types.ts"],"names":[],"mappings":";AAAA,6EAA6E;AAC7E,4CAA4C;AAC5C,EAAE;AACF,8EAA8E;AAC9E,gFAAgF;AAChF,0EAA0E;AAC1E,6EAA6E;AAC7E,qEAAqE;AACrE,6CAA6C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"elementRefToContext.d.ts","sourceRoot":"","sources":["../../src/utils/elementRefToContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAmChE,eAAO,MAAM,mBAAmB,GAAI,SAAS,UAAU,KAAG,cA6BxD,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.elementRefToContext = void 0;
|
|
4
|
-
const DEFAULT_BOUNDING_RECT = {
|
|
5
|
-
x: 0,
|
|
6
|
-
y: 0,
|
|
7
|
-
width: 0,
|
|
8
|
-
height: 0,
|
|
9
|
-
top: 0,
|
|
10
|
-
left: 0,
|
|
11
|
-
right: 0,
|
|
12
|
-
bottom: 0,
|
|
13
|
-
};
|
|
14
|
-
const COMPONENT_NODE_TYPES = new Set([
|
|
15
|
-
'function',
|
|
16
|
-
'class',
|
|
17
|
-
'memo',
|
|
18
|
-
'forwardRef',
|
|
19
|
-
'context',
|
|
20
|
-
'unknown',
|
|
21
|
-
]);
|
|
22
|
-
const toComponentNode = (node) => {
|
|
23
|
-
const type = COMPONENT_NODE_TYPES.has(node.type)
|
|
24
|
-
? node.type
|
|
25
|
-
: 'unknown';
|
|
26
|
-
return {
|
|
27
|
-
name: node.name,
|
|
28
|
-
type,
|
|
29
|
-
depth: node.depth ?? 0,
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
const elementRefToContext = (element) => ({
|
|
33
|
-
xpath: element.xpath,
|
|
34
|
-
tagName: element.tagName,
|
|
35
|
-
className: element.className,
|
|
36
|
-
id: element.id,
|
|
37
|
-
textContent: element.textContent ?? '',
|
|
38
|
-
innerHTML: '',
|
|
39
|
-
attributes: element.attributes ?? {},
|
|
40
|
-
computedStyles: {},
|
|
41
|
-
boundingRect: DEFAULT_BOUNDING_RECT,
|
|
42
|
-
...(element.rivetId ? { rivetId: element.rivetId } : {}),
|
|
43
|
-
...(element.componentTree
|
|
44
|
-
? { componentTree: element.componentTree.map(toComponentNode) }
|
|
45
|
-
: {}),
|
|
46
|
-
...(element.filePaths.length > 0
|
|
47
|
-
? {
|
|
48
|
-
filePaths: element.filePaths.map((filePath) => ({
|
|
49
|
-
filePath,
|
|
50
|
-
})),
|
|
51
|
-
}
|
|
52
|
-
: {}),
|
|
53
|
-
...(element.parentElementSummary
|
|
54
|
-
? {
|
|
55
|
-
parentElementSummary: {
|
|
56
|
-
...element.parentElementSummary,
|
|
57
|
-
id: '',
|
|
58
|
-
},
|
|
59
|
-
}
|
|
60
|
-
: {}),
|
|
61
|
-
});
|
|
62
|
-
exports.elementRefToContext = elementRefToContext;
|
|
63
|
-
//# sourceMappingURL=elementRefToContext.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"elementRefToContext.js","sourceRoot":"","sources":["../../src/utils/elementRefToContext.ts"],"names":[],"mappings":";;;AAGA,MAAM,qBAAqB,GAAG;IAC5B,CAAC,EAAE,CAAC;IACJ,CAAC,EAAE,CAAC;IACJ,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;IACT,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;CACV,CAAC;AAEF,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAAwB;IAC1D,UAAU;IACV,OAAO;IACP,MAAM;IACN,YAAY;IACZ,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG,CACtB,IAAsD,EACvC,EAAE;IACjB,MAAM,IAAI,GAAG,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,IAA6B,CAAC;QACvE,CAAC,CAAE,IAAI,CAAC,IAA8B;QACtC,CAAC,CAAC,SAAS,CAAC;IACd,OAAO;QACL,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI;QACJ,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;KACvB,CAAC;AACJ,CAAC,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,OAAmB,EAAkB,EAAE,CAAC,CAAC;IAC3E,KAAK,EAAE,OAAO,CAAC,KAAK;IACpB,OAAO,EAAE,OAAO,CAAC,OAAO;IACxB,SAAS,EAAE,OAAO,CAAC,SAAS;IAC5B,EAAE,EAAE,OAAO,CAAC,EAAE;IACd,WAAW,EAAE,OAAO,CAAC,WAAW,IAAI,EAAE;IACtC,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,OAAO,CAAC,UAAU,IAAI,EAAE;IACpC,cAAc,EAAE,EAAE;IAClB,YAAY,EAAE,qBAAqB;IACnC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACxD,GAAG,CAAC,OAAO,CAAC,aAAa;QACvB,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,eAAe,CAAC,EAAE;QAC/D,CAAC,CAAC,EAAE,CAAC;IACP,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;QAC9B,CAAC,CAAC;YACE,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;gBAC9C,QAAQ;aACT,CAAC,CAAC;SACJ;QACH,CAAC,CAAC,EAAE,CAAC;IACP,GAAG,CAAC,OAAO,CAAC,oBAAoB;QAC9B,CAAC,CAAC;YACE,oBAAoB,EAAE;gBACpB,GAAG,OAAO,CAAC,oBAAoB;gBAC/B,EAAE,EAAE,EAAE;aACP;SACF;QACH,CAAC,CAAC,EAAE,CAAC;CACR,CAAC,CAAC;AA7BU,QAAA,mBAAmB,uBA6B7B"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Watch → lease → act flow shared by apply and variant batches.
|
|
3
|
-
* Imported by agent skill files so MCP semantics stay aligned with the bridge.
|
|
4
|
-
*/
|
|
5
|
-
export declare const DURABLE_BATCH_HANDOFF_SECTION = "## Durable batch handoff (apply + variant)\n\nBoth point-and-click **apply** batches and in-editor **variant** batches use the same bridge pickup pipeline: **queued \u2192 leased \u2192 acted on**. Apply leases are released by an explicit apply ack; generated variant work is released by `report_work_item` (kind `status`) when every tracked work item reaches a terminal state. The host agent must keep this loop alive whenever the visual editor is open.\n\n**One loop for both kinds:**\n\n1. `watch_for_changes({ sessionId })` \u2014 blocks until work exists. While blocked with no lease yet, bridge status is `WATCHING` (this is **not** round complete).\n2. Pickup returns `{ leaseId, requestId, kind: 'apply' | 'variant', mergedRequestIds?, \u2026 }`. Re-polling the same `requestId` is idempotent \u2014 you get the same lease back.\n3. **Act** on the leased payload:\n - `kind: 'apply'` \u2192 edit files from `sourceFiles` / `changes[]`\n - `kind: 'variant'` \u2192 `start_variants` / static refine / `continue_variants` per the batch shape\n4. **Release** the leased work only after acting:\n - apply leases \u2192 `get_pending_changes({ sessionId, message, refresh_git: true })`\n - UI-originated `variant_request` / `static_preview_refine` leases \u2192 process via `start_variants` or scoped `continue_variants({ action: 'request_work', workItemIds })`, call `report_work_item(kind='status')` for every generated item, and let the server release the bridge lease after all tracked items finish\n - Do NOT use `ack_batch` to skip or finish generated variant work; unclaimed or unfinished variant leases return a structured `variant_ack_blocked` error\n5. Immediately call `watch_for_changes` again while `hasUnfinishedWork` / `pendingVariantRequests` is non-zero.\n\n**Status semantics (do not confuse with batch lifecycle):**\n\n| Status | Meaning |\n|---|---|\n| `WATCHING` | Watch loop blocked, nothing leased yet \u2014 **keep waiting** |\n| `APPLYING` | Apply lease active, agent working |\n| `READY` | **Only after explicit apply ack** \u2014 safe for Rivet UI to clear markers |\n\n`READY` before `refresh_git` was a spurious idle pulse \u2014 ignore it. Never treat `WATCHING` as completion.\n\n**Queue-time merge:** several Sends may merge into one apply lease (`mergedRequestIds`). One agent pass + one `refresh_git` clears markers for **all** merged request ids.";
|
|
6
|
-
/**
|
|
7
|
-
* Canonical brief format instruction — single source of truth.
|
|
8
|
-
* Imported by claude-skill.ts, cursor-rules.ts, and tools.ts so the
|
|
9
|
-
* wording can never silently diverge between agents.
|
|
10
|
-
*/
|
|
11
|
-
export declare const BRIEF_FORMAT_INSTRUCTION: string;
|
|
12
|
-
/**
|
|
13
|
-
* User-facing overview — what to tell the user when they ask what Rivet does
|
|
14
|
-
* or when the agent first opens the editor.
|
|
15
|
-
*/
|
|
16
|
-
export declare const RIVET_OVERVIEW = "## What Rivet does\n\nRivet helps you **explore multiple design directions** for your web app. It generates parallel variants you can compare side by side, refine with precision, and share or implement.\n\n### How to use Rivet\n\n1. **Start from your coding agent.** Use `/rivet` in Claude Code, or tell your agent \"Use Rivet variants\" or \"Explore with Rivet\" along with your design request.\n2. **Connect design references** (optional). Click **Connect design references** in the editor to link your Pinterest or Are.na account. Include relevant pins or boards and Rivet will extract design context from them to inform the variants it generates.\n3. **Refine with the comment tool.** Select any part of the UI and use the comment tool to make more precise variants of that section, or leave comments describing what you'd like to change within a variant.\n4. **Share or implement.** When you're happy, click the **Share** button to get a shareable link you can send to a collaborator \u2014 or share it back to your coding agent to implement the chosen direction.";
|
|
17
|
-
/** Routing table — identical in every agent skill file */
|
|
18
|
-
export declare const PICKING_THE_FLOW_TABLE = "## Picking the flow\n\n| User says | Flow |\n|---|---|\n| \"/rivet\", \"use rivet variants\", \"explore with rivet\", \"show me design options for X\", \"create variants of X\", \"show me 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** (`start_variants`, `mode='zero_to_one'`, with `userContext`) |\n| \"make a visual change to X\", \"tweak this button\", \"open the editor so I can click around\" \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| \"open rivet\", \"use rivet here\" \u2014 with **no** specific change described yet, **and** the server instructions include the first-run onboarding block | **Proactive first directions** (below) \u2014 orient on the project, propose 3 distinct directions, and open the editor already generating once the user picks. Without that first-run block, a bare open goes to the **Visual editor** instead. |";
|
|
19
|
-
/**
|
|
20
|
-
* First-run onboarding flow. When the user opens Rivet without describing a
|
|
21
|
-
* change, lead with a proposal instead of a blank editor: orient cheaply on the
|
|
22
|
-
* project, propose 3 distinct directions in chat, and only open the editor once
|
|
23
|
-
* the user picks — so it opens already generating, never empty.
|
|
24
|
-
*
|
|
25
|
-
* This is the one entry flow that PAUSES for confirmation before generating
|
|
26
|
-
* (everywhere else reporting briefs starts directions immediately). It reuses
|
|
27
|
-
* the on-demand brief logic + `start_variants({ mode: 'existing' })` — the only
|
|
28
|
-
* new behaviour is the proactive trigger, a bounded orientation read, and the
|
|
29
|
-
* text proposal + confirmation gate.
|
|
30
|
-
*/
|
|
31
|
-
export declare const PROACTIVE_FIRST_DIRECTIONS_SECTION = "## Proactive first directions\n\n**Only do this when the connect-time server instructions include the first-run onboarding block** (\"First Rivet session \u2014 lead with a proposal\"). That block appears only until the user has run variants once; on later sessions (or if it is absent) a bare open goes straight to the **Visual Editor flow** \u2014 do NOT propose.\n\n**Also skip it once the user has kicked off any variants run in this session.** The onboarding block is injected once at connect and is not refreshed mid-session, so it can linger after the user's first run \u2014 if you have already started variants (or just did), treat the block as spent and route a later bare open to the Visual Editor flow instead of proposing again.\n\nWhen the user opens Rivet with **no change or direction described yet** \u2014 a bare \"open rivet\" / \"use rivet here\" on that first session \u2014 do NOT open an empty editor and tell them to go type a request. Lead with a concrete proposal: glance at their project, suggest **3 distinct directions** for one surface, and open the editor only once they pick (so it opens with variants already streaming, never blank).\n\nThis is the ONE entry flow that pauses for confirmation before generating. Everywhere else in the variants flow, reporting briefs starts the directions immediately \u2014 here you propose first and wait.\n\n### 1. Orient cheaply \u2014 do NOT crawl the repo\n\nRead only enough to name ONE surface and describe its current visual character. There is no fixed file list and no file count to hit \u2014 there is a goal and a budget:\n\n- **Goal:** be able to state what the main surface is (framework, layout, key sections) and its current design character (light/dark, palette, density, mood).\n- **Cheapest high-signal reads first:** `package.json` (framework), a top-level glance at the `app`/`pages`/`src` or routes directory (candidate surfaces), and the theme \u2014 `tailwind.config`, the `:root` CSS variables, or `globals.css`. The theme is usually ONE file and reveals almost the entire design character.\n- **Then** read the single surface you'll propose for \u2014 the route/page/component the editor would render at its entry. Usually one file.\n- **Stop the moment you can name the surface + its character.** Do NOT follow imports down the tree, and do NOT read `node_modules`, tests, build output, or config beyond `package.json`. A handful of files, seconds not minutes.\n- If you genuinely cannot characterize a surface (empty / HTML-only folder, or an unreadable project), skip the deep read and propose along generic design levers (typography, color/mood, layout/density) \u2014 say that's what you did rather than over-reading to compensate.\n\n### 2. Draft 3 distinct directions\n\nUse the same brief discipline as the on-demand flow, framed to NAME the change (clearer for a first-time user than vibe words):\n- **Label:** a plain \u2264 4-word title that names what the direction changes (e.g. \"Editorial serif type\", \"Warm light theme\", \"Dense command layout\"). No em-dash / en-dash / colon compounds; not a vibe word.\n- **Body:** exactly ONE sentence, \u2264 12 words, describing the direction and any scope it respects.\n- **Each direction MUST lead with a DIFFERENT dominant lever** \u2014 e.g. one leads with typography, one with color/mood, one with layout/density \u2014 so the three render as visibly different results, not three flavors of \"nicer.\" Adapt every label and body to what you actually read; generic copy that could apply to any project is a failure.\n\n### 3. Propose in chat and NAME your assumption\n\nPresent the 3 directions as PLAIN TEXT (no fabricated UI, no browser tab, no URL). State which surface you looked at so a wrong guess is a one-line correction, and offer the escape hatches:\n\n> I looked at your home screen (`app/page.tsx`). Here are 3 directions I'd explore:\n> \u2022 **<label>** \u2014 <body>\n> \u2022 **<label>** \u2014 <body>\n> \u2022 **<label>** \u2014 <body>\n> Want me to run all 3? (Or point me at a different screen, or just open the editor so you can click around.)\n\nHandle the reply:\n- **\"run them\" / \"yes\" / picks a subset** \u2192 go to step 4 (drop any directions they didn't want).\n- **\"no, the <other> screen\"** \u2192 re-orient on that surface (cheap) and re-propose.\n- **\"just let me click around\" / any point-and-click request** \u2192 this is the Visual Editor flow: call `open_visual_editor` and follow it. Do NOT force a variants kickoff.\n\n### 4. On confirm \u2014 kick off; the editor opens already generating\n\nCall `start_variants({ mode: 'existing', briefs })` with the confirmed directions. There is no user prompt to pass verbatim here, so synthesize a short `prompt` from the surface you proposed for (e.g. \"Explore 3 directions for the home screen\"). `start_variants` detects the framework, opens the editor, and starts every direction \u2014 so the editor appears with variants already streaming, never empty. From here, follow **Agent Variants flow \u2192 Sub-flow A** from step 2 onward (parallel code-gen, ready, watch, apply), and keep the `watch_for_changes` loop alive per `editorNextAction`.";
|
|
32
|
-
/**
|
|
33
|
-
* Coordinator + elastic-worker protocol for handling the user's IN-EDITOR
|
|
34
|
-
* changes (comments / "Apply" tweaks / "Vary" requests) concurrently, instead
|
|
35
|
-
* of one batch at a time. The server already owns the work-model (per-batch
|
|
36
|
-
* `workItemIds` leases, same-variant fold, FIFO backpressure, abort signalling)
|
|
37
|
-
* — this section tells the agent how to orchestrate against it so several
|
|
38
|
-
* changes render in parallel and the UI's instant placeholders resolve fast.
|
|
39
|
-
*
|
|
40
|
-
* Parameterised on the one thing that differs per agent: how a worker is
|
|
41
|
-
* dispatched (Claude Code = a real background `Task` sub-agent; Cursor = inline
|
|
42
|
-
* parallel tool calls, since it has no backgroundable sub-agents).
|
|
43
|
-
*/
|
|
44
|
-
export declare function buildConcurrentRefineSection(opts: {
|
|
45
|
-
/** How the coordinator dispatches a worker for one batch (mechanism differs). */
|
|
46
|
-
dispatchWorker: string;
|
|
47
|
-
/** Loop-back timing sentence — immediate (Claude background) vs after the
|
|
48
|
-
* batch is generated (Cursor inline). */
|
|
49
|
-
loopBack: string;
|
|
50
|
-
/** Per-agent bullet list of the specific mistakes that break parallelism for
|
|
51
|
-
* THIS agent (background sub-agents vs inline), rendered under the shared
|
|
52
|
-
* "Common mistakes" sub-block. */
|
|
53
|
-
commonMistakes: string;
|
|
54
|
-
}): string;
|
|
55
|
-
/**
|
|
56
|
-
* Builds the full Agent Variants flow section, parameterised on the small
|
|
57
|
-
* number of lines that differ between Claude Code and Cursor.
|
|
58
|
-
*/
|
|
59
|
-
export declare function buildAgentVariantsSection(opts: {
|
|
60
|
-
/** "IN THIS CHAT" for Claude Code, "in chat" for Cursor */
|
|
61
|
-
inChatEmphasis: string;
|
|
62
|
-
/** Full text of the parallel code-gen step (mechanism differs per agent) */
|
|
63
|
-
step9: string;
|
|
64
|
-
/** Closing sentence of the watch step (how changes are surfaced differs slightly) */
|
|
65
|
-
step11Suffix: string;
|
|
66
|
-
/** Label used in the "never generate natively" rule, e.g. "Task sub-agents" or "Task tool" */
|
|
67
|
-
nativeGenLabel: string;
|
|
68
|
-
}): string;
|
|
69
|
-
//# sourceMappingURL=shared-variants-protocol.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared-variants-protocol.d.ts","sourceRoot":"","sources":["../../../src/utils/skills/shared-variants-protocol.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,6BAA6B,61EA2BqI,CAAC;AAEhL;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,QAIgF,CAAC;AAEtH;;;GAGG;AACH,eAAO,MAAM,cAAc,ijCASgL,CAAC;AAE5M,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,8iDASkW,CAAC;AAEtY;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kCAAkC,6kKA4CoiB,CAAC;AAEplB;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE;IACjD,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB;8CAC0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB;;uCAEmC;IACnC,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,CA8BT;AAED;;;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,CAkHT"}
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PROACTIVE_FIRST_DIRECTIONS_SECTION = exports.PICKING_THE_FLOW_TABLE = exports.RIVET_OVERVIEW = exports.BRIEF_FORMAT_INSTRUCTION = exports.DURABLE_BATCH_HANDOFF_SECTION = void 0;
|
|
4
|
-
exports.buildConcurrentRefineSection = buildConcurrentRefineSection;
|
|
5
|
-
exports.buildAgentVariantsSection = buildAgentVariantsSection;
|
|
6
|
-
const describe_motion_protocol_1 = require("./describe-motion-protocol");
|
|
7
|
-
/**
|
|
8
|
-
* Watch → lease → act flow shared by apply and variant batches.
|
|
9
|
-
* Imported by agent skill files so MCP semantics stay aligned with the bridge.
|
|
10
|
-
*/
|
|
11
|
-
exports.DURABLE_BATCH_HANDOFF_SECTION = `## Durable batch handoff (apply + variant)
|
|
12
|
-
|
|
13
|
-
Both point-and-click **apply** batches and in-editor **variant** batches use the same bridge pickup pipeline: **queued → leased → acted on**. Apply leases are released by an explicit apply ack; generated variant work is released by \`report_work_item\` (kind \`status\`) when every tracked work item reaches a terminal state. The host agent must keep this loop alive whenever the visual editor is open.
|
|
14
|
-
|
|
15
|
-
**One loop for both kinds:**
|
|
16
|
-
|
|
17
|
-
1. \`watch_for_changes({ sessionId })\` — blocks until work exists. While blocked with no lease yet, bridge status is \`WATCHING\` (this is **not** round complete).
|
|
18
|
-
2. Pickup returns \`{ leaseId, requestId, kind: 'apply' | 'variant', mergedRequestIds?, … }\`. Re-polling the same \`requestId\` is idempotent — you get the same lease back.
|
|
19
|
-
3. **Act** on the leased payload:
|
|
20
|
-
- \`kind: 'apply'\` → edit files from \`sourceFiles\` / \`changes[]\`
|
|
21
|
-
- \`kind: 'variant'\` → \`start_variants\` / static refine / \`continue_variants\` per the batch shape
|
|
22
|
-
4. **Release** the leased work only after acting:
|
|
23
|
-
- apply leases → \`get_pending_changes({ sessionId, message, refresh_git: true })\`
|
|
24
|
-
- UI-originated \`variant_request\` / \`static_preview_refine\` leases → process via \`start_variants\` or scoped \`continue_variants({ action: 'request_work', workItemIds })\`, call \`report_work_item(kind='status')\` for every generated item, and let the server release the bridge lease after all tracked items finish
|
|
25
|
-
- Do NOT use \`ack_batch\` to skip or finish generated variant work; unclaimed or unfinished variant leases return a structured \`variant_ack_blocked\` error
|
|
26
|
-
5. Immediately call \`watch_for_changes\` again while \`hasUnfinishedWork\` / \`pendingVariantRequests\` is non-zero.
|
|
27
|
-
|
|
28
|
-
**Status semantics (do not confuse with batch lifecycle):**
|
|
29
|
-
|
|
30
|
-
| Status | Meaning |
|
|
31
|
-
|---|---|
|
|
32
|
-
| \`WATCHING\` | Watch loop blocked, nothing leased yet — **keep waiting** |
|
|
33
|
-
| \`APPLYING\` | Apply lease active, agent working |
|
|
34
|
-
| \`READY\` | **Only after explicit apply ack** — safe for Rivet UI to clear markers |
|
|
35
|
-
|
|
36
|
-
\`READY\` before \`refresh_git\` was a spurious idle pulse — ignore it. Never treat \`WATCHING\` as completion.
|
|
37
|
-
|
|
38
|
-
**Queue-time merge:** several Sends may merge into one apply lease (\`mergedRequestIds\`). One agent pass + one \`refresh_git\` clears markers for **all** merged request ids.`;
|
|
39
|
-
/**
|
|
40
|
-
* Canonical brief format instruction — single source of truth.
|
|
41
|
-
* Imported by claude-skill.ts, cursor-rules.ts, and tools.ts so the
|
|
42
|
-
* wording can never silently diverge between agents.
|
|
43
|
-
*/
|
|
44
|
-
exports.BRIEF_FORMAT_INSTRUCTION = 'Label: ≤ 4 words, a plain standalone title (e.g. "Soft spring blur", "Crisp linear motion"). ' +
|
|
45
|
-
'NEVER a "Title — descriptor" compound: no em dashes, en dashes, or colons in the label — any descriptor belongs in the body. ' +
|
|
46
|
-
'Body: exactly ONE sentence, ≤ 12 words — a single evocative descriptor of the direction ' +
|
|
47
|
-
'(e.g. "Apple-style spring physics with ambient blur and soft edges"). No bullet points, no lists, no line breaks.';
|
|
48
|
-
/**
|
|
49
|
-
* User-facing overview — what to tell the user when they ask what Rivet does
|
|
50
|
-
* or when the agent first opens the editor.
|
|
51
|
-
*/
|
|
52
|
-
exports.RIVET_OVERVIEW = `## What Rivet does
|
|
53
|
-
|
|
54
|
-
Rivet helps you **explore multiple design directions** for your web app. It generates parallel variants you can compare side by side, refine with precision, and share or implement.
|
|
55
|
-
|
|
56
|
-
### How to use Rivet
|
|
57
|
-
|
|
58
|
-
1. **Start from your coding agent.** Use \`/rivet\` in Claude Code, or tell your agent "Use Rivet variants" or "Explore with Rivet" along with your design request.
|
|
59
|
-
2. **Connect design references** (optional). Click **Connect design references** in the editor to link your Pinterest or Are.na account. Include relevant pins or boards and Rivet will extract design context from them to inform the variants it generates.
|
|
60
|
-
3. **Refine with the comment tool.** Select any part of the UI and use the comment tool to make more precise variants of that section, or leave comments describing what you'd like to change within a variant.
|
|
61
|
-
4. **Share or implement.** When you're happy, click the **Share** button to get a shareable link you can send to a collaborator — or share it back to your coding agent to implement the chosen direction.`;
|
|
62
|
-
/** Routing table — identical in every agent skill file */
|
|
63
|
-
exports.PICKING_THE_FLOW_TABLE = `## Picking the flow
|
|
64
|
-
|
|
65
|
-
| User says | Flow |
|
|
66
|
-
|---|---|
|
|
67
|
-
| "/rivet", "use rivet variants", "explore with rivet", "show me design options for X", "create variants of X", "show me options for X", "explore approaches to X" | **Agent variants — existing project** (\`start_variants\`, \`mode='existing'\`) |
|
|
68
|
-
| "build me a settings page from scratch", "add a feature for Y" | **Agent variants — existing project** (\`start_variants\`, no \`target\`) |
|
|
69
|
-
| "create a new Vite todo app", "scaffold a fresh dashboard" | **Agent variants — fresh project** (\`start_variants\`, \`mode='zero_to_one'\`) |
|
|
70
|
-
| "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\`) |
|
|
71
|
-
| "make a visual change to X", "tweak this button", "open the editor so I can click around" — **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. |
|
|
72
|
-
| "open rivet", "use rivet here" — with **no** specific change described yet, **and** the server instructions include the first-run onboarding block | **Proactive first directions** (below) — orient on the project, propose 3 distinct directions, and open the editor already generating once the user picks. Without that first-run block, a bare open goes to the **Visual editor** instead. |`;
|
|
73
|
-
/**
|
|
74
|
-
* First-run onboarding flow. When the user opens Rivet without describing a
|
|
75
|
-
* change, lead with a proposal instead of a blank editor: orient cheaply on the
|
|
76
|
-
* project, propose 3 distinct directions in chat, and only open the editor once
|
|
77
|
-
* the user picks — so it opens already generating, never empty.
|
|
78
|
-
*
|
|
79
|
-
* This is the one entry flow that PAUSES for confirmation before generating
|
|
80
|
-
* (everywhere else reporting briefs starts directions immediately). It reuses
|
|
81
|
-
* the on-demand brief logic + `start_variants({ mode: 'existing' })` — the only
|
|
82
|
-
* new behaviour is the proactive trigger, a bounded orientation read, and the
|
|
83
|
-
* text proposal + confirmation gate.
|
|
84
|
-
*/
|
|
85
|
-
exports.PROACTIVE_FIRST_DIRECTIONS_SECTION = `## Proactive first directions
|
|
86
|
-
|
|
87
|
-
**Only do this when the connect-time server instructions include the first-run onboarding block** ("First Rivet session — lead with a proposal"). That block appears only until the user has run variants once; on later sessions (or if it is absent) a bare open goes straight to the **Visual Editor flow** — do NOT propose.
|
|
88
|
-
|
|
89
|
-
**Also skip it once the user has kicked off any variants run in this session.** The onboarding block is injected once at connect and is not refreshed mid-session, so it can linger after the user's first run — if you have already started variants (or just did), treat the block as spent and route a later bare open to the Visual Editor flow instead of proposing again.
|
|
90
|
-
|
|
91
|
-
When the user opens Rivet with **no change or direction described yet** — a bare "open rivet" / "use rivet here" on that first session — do NOT open an empty editor and tell them to go type a request. Lead with a concrete proposal: glance at their project, suggest **3 distinct directions** for one surface, and open the editor only once they pick (so it opens with variants already streaming, never blank).
|
|
92
|
-
|
|
93
|
-
This is the ONE entry flow that pauses for confirmation before generating. Everywhere else in the variants flow, reporting briefs starts the directions immediately — here you propose first and wait.
|
|
94
|
-
|
|
95
|
-
### 1. Orient cheaply — do NOT crawl the repo
|
|
96
|
-
|
|
97
|
-
Read only enough to name ONE surface and describe its current visual character. There is no fixed file list and no file count to hit — there is a goal and a budget:
|
|
98
|
-
|
|
99
|
-
- **Goal:** be able to state what the main surface is (framework, layout, key sections) and its current design character (light/dark, palette, density, mood).
|
|
100
|
-
- **Cheapest high-signal reads first:** \`package.json\` (framework), a top-level glance at the \`app\`/\`pages\`/\`src\` or routes directory (candidate surfaces), and the theme — \`tailwind.config\`, the \`:root\` CSS variables, or \`globals.css\`. The theme is usually ONE file and reveals almost the entire design character.
|
|
101
|
-
- **Then** read the single surface you'll propose for — the route/page/component the editor would render at its entry. Usually one file.
|
|
102
|
-
- **Stop the moment you can name the surface + its character.** Do NOT follow imports down the tree, and do NOT read \`node_modules\`, tests, build output, or config beyond \`package.json\`. A handful of files, seconds not minutes.
|
|
103
|
-
- If you genuinely cannot characterize a surface (empty / HTML-only folder, or an unreadable project), skip the deep read and propose along generic design levers (typography, color/mood, layout/density) — say that's what you did rather than over-reading to compensate.
|
|
104
|
-
|
|
105
|
-
### 2. Draft 3 distinct directions
|
|
106
|
-
|
|
107
|
-
Use the same brief discipline as the on-demand flow, framed to NAME the change (clearer for a first-time user than vibe words):
|
|
108
|
-
- **Label:** a plain ≤ 4-word title that names what the direction changes (e.g. "Editorial serif type", "Warm light theme", "Dense command layout"). No em-dash / en-dash / colon compounds; not a vibe word.
|
|
109
|
-
- **Body:** exactly ONE sentence, ≤ 12 words, describing the direction and any scope it respects.
|
|
110
|
-
- **Each direction MUST lead with a DIFFERENT dominant lever** — e.g. one leads with typography, one with color/mood, one with layout/density — so the three render as visibly different results, not three flavors of "nicer." Adapt every label and body to what you actually read; generic copy that could apply to any project is a failure.
|
|
111
|
-
|
|
112
|
-
### 3. Propose in chat and NAME your assumption
|
|
113
|
-
|
|
114
|
-
Present the 3 directions as PLAIN TEXT (no fabricated UI, no browser tab, no URL). State which surface you looked at so a wrong guess is a one-line correction, and offer the escape hatches:
|
|
115
|
-
|
|
116
|
-
> I looked at your home screen (\`app/page.tsx\`). Here are 3 directions I'd explore:
|
|
117
|
-
> • **<label>** — <body>
|
|
118
|
-
> • **<label>** — <body>
|
|
119
|
-
> • **<label>** — <body>
|
|
120
|
-
> Want me to run all 3? (Or point me at a different screen, or just open the editor so you can click around.)
|
|
121
|
-
|
|
122
|
-
Handle the reply:
|
|
123
|
-
- **"run them" / "yes" / picks a subset** → go to step 4 (drop any directions they didn't want).
|
|
124
|
-
- **"no, the <other> screen"** → re-orient on that surface (cheap) and re-propose.
|
|
125
|
-
- **"just let me click around" / any point-and-click request** → this is the Visual Editor flow: call \`open_visual_editor\` and follow it. Do NOT force a variants kickoff.
|
|
126
|
-
|
|
127
|
-
### 4. On confirm — kick off; the editor opens already generating
|
|
128
|
-
|
|
129
|
-
Call \`start_variants({ mode: 'existing', briefs })\` with the confirmed directions. There is no user prompt to pass verbatim here, so synthesize a short \`prompt\` from the surface you proposed for (e.g. "Explore 3 directions for the home screen"). \`start_variants\` detects the framework, opens the editor, and starts every direction — so the editor appears with variants already streaming, never empty. From here, follow **Agent Variants flow → Sub-flow A** from step 2 onward (parallel code-gen, ready, watch, apply), and keep the \`watch_for_changes\` loop alive per \`editorNextAction\`.`;
|
|
130
|
-
/**
|
|
131
|
-
* Coordinator + elastic-worker protocol for handling the user's IN-EDITOR
|
|
132
|
-
* changes (comments / "Apply" tweaks / "Vary" requests) concurrently, instead
|
|
133
|
-
* of one batch at a time. The server already owns the work-model (per-batch
|
|
134
|
-
* `workItemIds` leases, same-variant fold, FIFO backpressure, abort signalling)
|
|
135
|
-
* — this section tells the agent how to orchestrate against it so several
|
|
136
|
-
* changes render in parallel and the UI's instant placeholders resolve fast.
|
|
137
|
-
*
|
|
138
|
-
* Parameterised on the one thing that differs per agent: how a worker is
|
|
139
|
-
* dispatched (Claude Code = a real background `Task` sub-agent; Cursor = inline
|
|
140
|
-
* parallel tool calls, since it has no backgroundable sub-agents).
|
|
141
|
-
*/
|
|
142
|
-
function buildConcurrentRefineSection(opts) {
|
|
143
|
-
return `## Handling in-editor changes concurrently (Coordinator + workers)
|
|
144
|
-
|
|
145
|
-
Once variants are live in the editor, the user fires changes as they go — an "Apply" tweak to one card, a "Vary" on another, a comment on a third — often **several before the first finishes**. Handle them **concurrently**, never one-at-a-time, so each change starts rendering the moment it's sent (the panel already shows instant placeholders for it).
|
|
146
|
-
|
|
147
|
-
**You are the Coordinator.** In hosts with background workers, dispatch variant work and loop without generating in the coordinator. In hosts without background workers, process the scoped batch inline, then immediately re-enter the watch loop.
|
|
148
|
-
|
|
149
|
-
1. Call \`watch_for_changes({ sessionId })\` — it blocks until the user sends a change batch, then returns \`{ leaseId, kind, … }\` directly (no separate \`get_pending_changes\` pickup for these).
|
|
150
|
-
2. When the response is \`kind: 'static_preview_refine'\`, read **\`response.workItemIds\`** — the exact work items the server created for THIS batch — and \`response.applyGuide\` (fork vs in-place).
|
|
151
|
-
3. ${opts.dispatchWorker} ${opts.loopBack}
|
|
152
|
-
4. Keep a bounded pool — at most \`MAX_WORKERS\` (≈4) in flight — and a \`worker → workItemIds\` map. When the pool is full, just keep calling \`watch_for_changes\`; the extra batches wait in the server's FIFO (backpressure is enforced server-side, cap 16) and you dispatch them as workers free up.
|
|
153
|
-
5. After each worker finishes, do **not** call \`ack_batch\`. Each worker's \`report_work_item\` (kind \`status\`) calls are the completion signal; once all tracked work items finish, the server releases the bridge lease. Then re-watch.
|
|
154
|
-
|
|
155
|
-
**Worker (one per batch):**
|
|
156
|
-
- Calls \`continue_variants({ action: 'request_work', workItemIds })\` with EXACTLY its batch's ids — this leases only those, so workers never steal each other's work. Use the \`leaseId\` from this response on every \`report_work_item(kind='status')\`.
|
|
157
|
-
- For each leased item, follows \`applyGuide\`: **fork** → generate a NEW sibling variation of \`input.currentHtml\` applying \`input.instruction\` (with a synthesized \`title\`/\`description\`); **in-place** → edit \`input.currentHtml\` to apply \`input.instruction\` and keep the variant's name. Then \`report_work_item(kind='status')\` with the full updated \`output.html\`.
|
|
158
|
-
- Sends \`status: 'running'\` heartbeats for slow items, and on \`{ aborted: true }\` from any report it stops that item immediately (no retry) and exits.
|
|
159
|
-
|
|
160
|
-
**Coalescing — dispatch exactly what the server gives you, never split or merge:**
|
|
161
|
-
- Repeated "Apply" tweaks to the SAME variant are **folded server-side** into ONE in-place refine work item, so N tweaks to one card arrive as ONE \`workItemId\` → ONE worker. Distinct variants and "Vary" forks arrive as separate ids → separate workers in parallel. Don't second-guess this; one worker per \`workItemIds\` batch is always correct.
|
|
162
|
-
|
|
163
|
-
**Cancellation ("clipping" a superseded change):**
|
|
164
|
-
- The iframe calls \`cancel_variants\` (with the card's \`variantId\`) itself when the user cancels a card — you don't. The affected worker's next heartbeat / report then returns \`{ aborted: true }\` and it stops. \`response.rejectedRefinements\` lists targets the server dropped (already sent / no longer editable) — tell the user those were skipped; never retry them.
|
|
165
|
-
|
|
166
|
-
**Do NOT stop and ask "keep watching?" in this flow** — keep the coordinator loop alive so every change is picked up instantly. (That stop-and-ask handshake is only for the plain point-and-click diff-apply path.)
|
|
167
|
-
|
|
168
|
-
**Resuming — never go deaf.** The coordinator loop is the ONLY thing draining the queue; the server holds queued changes in a FIFO (cap 16) with NO auto-drain. The moment a variants session is live, START the watch loop — don't wait to be asked. On ANY new turn while a session is active — including after an interruption, a hand-off, or context compaction — your FIRST action is to call \`watch_for_changes\` again and drain anything pending before doing other work. \`start_variants\` / \`continue_variants\` / \`watch_for_changes\` responses include a **\`pendingVariantRequests\`** field (integer: how many change batches are still queued). If it is \`> 0\` you have stranded work — keep draining (call \`watch_for_changes\`) until it reaches \`0\`. A non-zero count after you stopped watching means changes are silently waiting.
|
|
169
|
-
|
|
170
|
-
**Common mistakes that break parallelism (do NOT do these):**
|
|
171
|
-
${opts.commonMistakes}`;
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Builds the full Agent Variants flow section, parameterised on the small
|
|
175
|
-
* number of lines that differ between Claude Code and Cursor.
|
|
176
|
-
*/
|
|
177
|
-
function buildAgentVariantsSection(opts) {
|
|
178
|
-
return `## Agent Variants flow
|
|
179
|
-
|
|
180
|
-
For requests like *"create variants of X"*, *"show me options for the dropdown"*, *"build me a settings page"*, or *"create a new Vite todo app"* — DO NOT generate variants natively via the ${opts.nativeGenLabel} or parallel tool calls. Use this protocol so the user sees variants render in parallel and picks based on the rendered code, not text descriptions ${opts.inChatEmphasis}.
|
|
181
|
-
|
|
182
|
-
There are three sub-flows. Pick by project state:
|
|
183
|
-
|
|
184
|
-
- **Existing project** → \`start_variants({ mode: 'existing' })\` — single-call kickoff, no in-chat approval gate.
|
|
185
|
-
- **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").
|
|
186
|
-
- **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\\>".
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
### Sub-flow A: Existing project — use \`start_variants({ mode: 'existing' })\`
|
|
191
|
-
|
|
192
|
-
1. **Call \`start_variants\`** with:
|
|
193
|
-
- \`prompt\`: the user's request verbatim
|
|
194
|
-
- \`briefs\`: an array of N \`{ label, body }\` objects, one per variant. \`briefs.length\` sets the variant count — default 3. Honor the user's intent: an explicit number ("give me 5"), a relative ask ("more options", "a few extra"), or a qualitative cue ("lots of variety") should all adjust the count up or down from the default. Only use 3 when the user gives no count signal at all. Do NOT also pass \`count\`. ${exports.BRIEF_FORMAT_INSTRUCTION} Each brief MUST describe a DIFFERENT direction; do NOT copy the user's prompt verbatim into bodies. The UI renders \`label\` as the variant card title and \`body\` as its description, so this is what the user sees and compares.
|
|
195
|
-
- \`mode\`: \`'existing'\`
|
|
196
|
-
- \`target\` (optional): \`{ type: 'element'|'file'|'route', ref }\` — set this for refinement requests pinned to a specific element/file/route. When \`input.target\` is present, scope the change to that element/file/route and its immediate section — do not restyle the rest of the page.
|
|
197
|
-
- \`projectPath\` (optional): defaults to the MCP server's cwd; pass explicitly if the variants target a different directory
|
|
198
|
-
|
|
199
|
-
Response: \`{ sessionId, stage: 'work_items_ready', mode: 'existing', leaseId, leaseTtlMs, variants: [{ variantId, briefId, label, workItem }], project: { projectPath, framework }, visualEditor?, editorNextAction? }\`. The server already detected the framework, opened the Rivet visual editor (share \`visualEditor.url\` with the user immediately), and started every variant — you do NOT need to call \`open_visual_editor\` or \`continue_variants(request_work)\` for the initial generation lease. If \`editorNextAction\` is present, keep that structured \`watch_for_changes\` loop alive on \`visualEditor.sessionId\`; the variants \`sessionId\` and visual-editor \`sessionId\` can differ. Each \`variants[i].workItem\` carries \`input.worktreePath\` (where to edit files) and \`attempt\`.
|
|
200
|
-
|
|
201
|
-
2. ${opts.step9}
|
|
202
|
-
|
|
203
|
-
**Verify CSS or markup changes before reporting success.** For existing-project \`code_gen\` work items, inspect the worktree diff and only call \`report_work_item\` (kind \`status\`) with \`status: 'succeeded'\` once the diff adds styling, components, or structured markup. Empty or deletion-only diffs fail QA; Rivet re-leases the work item once with \`input.qaRetry\` so you can regenerate.
|
|
204
|
-
|
|
205
|
-
**The FIRST LINE of each variant's output stream MUST be a ≤4-word label** (matching the \`BRIEF_FORMAT_INSTRUCTION\` shape — e.g. "Spring blur", "Linear sharp") so the user recognises the direction as variants stream in. The code body follows. Use the \`leaseId\` from the start_variants response on every \`report_work_item(kind='status')\` call.
|
|
206
|
-
|
|
207
|
-
3. **When all variants reach \`stage: 'ready'\` or \`'degraded'\`, tell the user the variants are ready** and explain how to compare them. Each variant has its own dev server running in an isolated worktree. The Rivet iframe shows a chip at the bottom-center: prev/label/next/check/dismiss. The user cycles between the live, running variants by clicking prev/next (the iframe re-mounts onto the variant's dev server in ~50ms via proxy retarget). When they like one, they click the check on the chip — that commits the variant.
|
|
208
|
-
|
|
209
|
-
You do NOT need to print diffs in chat. The user picks visually in the iframe. You also do NOT need to call \`cancel_variants\` yourself — the iframe surfaces a cancel button per variant card, and the UI calls \`cancel_variants({ sessionId, variantId })\` directly when the user clicks it.
|
|
210
|
-
|
|
211
|
-
4. **Watch for the user's pick.** Use the structured \`editorNextAction\` when present; otherwise use the active visual-editor session returned by \`open_visual_editor\`. That \`watch_for_changes\` call blocks until the user clicks the check on the chip. Poll \`get_pending_changes\` only as a manual fallback for hosts that cannot block.
|
|
212
|
-
${opts.step11Suffix}
|
|
213
|
-
|
|
214
|
-
5. **Apply the variant.** From the \`VariantChangeItem\` payload:
|
|
215
|
-
- \`payload.kind === 'diff-applied'\` → the server already \`git apply\`'d the unified diff to the user's working tree (uncommitted). DO NOT re-apply — just acknowledge the variant and let the user review.
|
|
216
|
-
- \`payload.kind === 'diff'\` → (legacy) \`git apply\` the unified diff against the user's project root
|
|
217
|
-
- \`payload.kind === 'project-created'\` → the server already materialized and committed the destination project; continue from \`destinationPath\` (optionally run \`npm install\`)
|
|
218
|
-
|
|
219
|
-
Tell the user which variant was applied (use \`variantLabel\` from the change item). You can also call \`commit_variant({ sessionId, variantId, confirmedByUser: true })\` yourself if the user expressed their pick in chat ("go with #2", "the spring one") — same effect, just routed through the agent rather than the chip.
|
|
220
|
-
|
|
221
|
-
---
|
|
222
|
-
|
|
223
|
-
### Sub-flow B: Fresh project (prompt-only) — use \`start_variants({ mode: 'zero_to_one' })\`
|
|
224
|
-
|
|
225
|
-
For brand-new projects the user describes from scratch ("build me a Vite todo app", "make a Pomodoro timer", "scaffold a kanban board"), use the same single-call kickoff. The server derives the destination directory, opens the editor on it, starts all variants, and returns everything in one response. No in-chat approval gate.
|
|
226
|
-
|
|
227
|
-
1. **Call \`start_variants\`** with:
|
|
228
|
-
- \`prompt\`: the user's request verbatim
|
|
229
|
-
- \`briefs\`: an array of N \`{ label, body }\` objects, one per variant. \`briefs.length\` sets the variant count — default 3. Honor the user's intent: an explicit number ("give me 5"), a relative ask ("more options", "a few extra"), or a qualitative cue ("lots of variety") should all adjust the count up or down from the default. Only use 3 when the user gives no count signal at all. Do NOT also pass \`count\`. ${exports.BRIEF_FORMAT_INSTRUCTION} Each brief MUST describe a DIFFERENT direction; do NOT copy the user's prompt verbatim into bodies. The UI renders \`label\` as the variant card title and \`body\` as its description.
|
|
230
|
-
- \`mode\`: \`'zero_to_one'\`
|
|
231
|
-
- \`framework\` (optional, defaults to \`'vite'\`)
|
|
232
|
-
- \`destinationParent\` (optional, absolute path; defaults to the user's home dir)
|
|
233
|
-
|
|
234
|
-
Response: \`{ sessionId, stage: 'work_items_ready', mode: 'zero_to_one', leaseId, leaseTtlMs, variants: [...], scaffoldBaseWorkItemId, destinationPath, visualEditor?, editorNextAction? }\`. 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 \`open_visual_editor\` step here because the zero-to-one destination is a brand-new directory the server derives. If \`editorNextAction\` is present, keep that structured \`watch_for_changes\` loop alive on \`visualEditor.sessionId\`. 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\`.
|
|
235
|
-
|
|
236
|
-
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_work_item(kind='status')\` 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\`.
|
|
237
|
-
|
|
238
|
-
---
|
|
239
|
-
|
|
240
|
-
### Sub-flow C: Fresh project (source-grounded) — \`start_variants\`
|
|
241
|
-
|
|
242
|
-
**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.
|
|
243
|
-
|
|
244
|
-
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.
|
|
245
|
-
|
|
246
|
-
1. **Call \`start_variants\`** with:
|
|
247
|
-
- \`prompt\`: the user's request verbatim
|
|
248
|
-
- \`mode\`: \`'zero_to_one'\`
|
|
249
|
-
- \`framework\` (optional, defaults to \`'vite'\`)
|
|
250
|
-
- \`destinationParent\` (optional, absolute path)
|
|
251
|
-
- \`userContext\`: one entry per raw source the user supplied. Do NOT pre-summarize — pass the raw reference:
|
|
252
|
-
- inspiration URL → \`{ transport: 'url', url, label?, userIntent? }\`
|
|
253
|
-
- local image / video / file → \`{ transport: 'file_path', path, mimeType?, label?, userIntent? }\`
|
|
254
|
-
- directory → \`{ transport: 'directory_path', path, label?, userIntent? }\`
|
|
255
|
-
- pasted brief / written design context → \`{ transport: 'text', content, label?, userIntent? }\`
|
|
256
|
-
Image-only and video-only calls (no URLs) are supported. Do not invent a URL for a local file.
|
|
257
|
-
|
|
258
|
-
Response (source-grounded): \`{ sessionId, stage: 'awaiting_source_plan', mode: 'zero_to_one', sourcePlanWorkItem, nextAction: 'continue_variants', destinationPath, visualEditor?, editorNextAction? }\`. Share \`visualEditor.url\` with the user immediately. If \`editorNextAction\` is present, keep that structured \`watch_for_changes\` loop alive on \`visualEditor.sessionId\` while you drive source planning and generation.
|
|
259
|
-
|
|
260
|
-
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:
|
|
261
|
-
- 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.
|
|
262
|
-
- 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.
|
|
263
|
-
- 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\`.
|
|
264
|
-
- \`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.
|
|
265
|
-
|
|
266
|
-
3. **Call \`report_work_item\`** with \`{ kind: 'source_plan', sessionId, workItemId, leaseId, attempt, sourcePlan: { actions, metadata, executionPlan, bindings? } }\`. Response: \`{ stage: 'awaiting_briefs', briefWorkItem, executionPlan, nextAction: 'report_work_item' }\`.
|
|
267
|
-
|
|
268
|
-
4. **Report briefs and start generating — no approval gate.** Call \`report_work_item(kind='brief')\` 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\`.
|
|
269
|
-
|
|
270
|
-
---
|
|
271
|
-
|
|
272
|
-
${describe_motion_protocol_1.DESCRIBE_MOTION_PROTOCOL}
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
### Rules
|
|
277
|
-
|
|
278
|
-
- **Never** generate variants natively (${opts.nativeGenLabel}, parallel tool calls, your own creative process) without going through \`start_variants\` first.
|
|
279
|
-
- **Sequential Varys accumulate — never orphan the earlier batch.** For an existing project, calling \`start_variants\` again while a session is live APPENDS the new directions to that SAME active session, so every batch renders side-by-side in the editor (Rivet keeps one active session per project and never supersedes it). Just call \`start_variants\` per Vary with distinct \`briefs\`; do not pass a prior \`sessionId\` or try to manage accumulation yourself. When a variant-request batch hands you a \`requestId\`, pass it straight through to \`start_variants\` so the editor maps its loading placeholders to the new cards.
|
|
280
|
-
- Always pass the user's prompt verbatim — don't paraphrase.
|
|
281
|
-
- Prefer \`start_variants\` (with the matching \`mode\`); it replaces the older multi-call kickoff and also handles project detection, \`open_visual_editor\`, and \`continue_variants(request_work)\` server-side for kickoff, but it is not a durable watcher. When it returns \`editorNextAction\`, the host agent must keep the \`watch_for_changes\` loop active. The standalone \`open_visual_editor\` stays registered for the Visual Editor flow (point-and-click changes without variants).
|
|
282
|
-
- 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.
|
|
283
|
-
- 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.
|
|
284
|
-
- The user picks AFTER seeing the variants render LIVE in the iframe, not before. Hand off to the iframe chip for visual cycling + commit.
|
|
285
|
-
- 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.
|
|
286
|
-
- Parallel code-gen is the only step where you fan out — every other step is one tool call.
|
|
287
|
-
- **Per-variant cancel** is handled by the iframe — the UI calls \`cancel_variants({ sessionId, variantId })\` when the user clicks the cancel button on a card. You do not need to call this from the agent side. Call \`cancel_variants\` without a \`variantId\` to kill the entire session.
|
|
288
|
-
- **Honor aborts mid-generation.** When the user removes or cancels a direction while it is still generating, the very next \`report_work_item(kind='status')\` 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_work_item(kind='status')\` 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.
|
|
289
|
-
- 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. This whole-page bar applies when there is NO \`target\`; when the request targets a specific element/file/route, scope the change to that element and its immediate section instead and leave the rest of the page intact.
|
|
290
|
-
- **QA re-lease**: an existing-project \`code_gen\` work item re-surfaced by \`request_work\` with \`input.qaRetry\` failed the diff task-fit QA gate — its diff added no styling, components, or structured markup for the requested design. Read the QA notes, regenerate that variant so the diff implements the design, then re-report — at most one retry per variant. After the retry a still-empty diff fails the variant terminally rather than looping.`;
|
|
291
|
-
}
|
|
292
|
-
//# sourceMappingURL=shared-variants-protocol.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared-variants-protocol.js","sourceRoot":"","sources":["../../../src/utils/skills/shared-variants-protocol.ts"],"names":[],"mappings":";;;AA+IA,oEAwCC;AAMD,8DA2HC;AAxTD,yEAAsE;AAEtE;;;GAGG;AACU,QAAA,6BAA6B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;+KA2BkI,CAAC;AAEhL;;;;GAIG;AACU,QAAA,wBAAwB,GACnC,+FAA+F;IAC/F,+HAA+H;IAC/H,0FAA0F;IAC1F,mHAAmH,CAAC;AAEtH;;;GAGG;AACU,QAAA,cAAc,GAAG;;;;;;;;;2MAS6K,CAAC;AAE5M,0DAA0D;AAC7C,QAAA,sBAAsB,GAAG;;;;;;;;;qYAS+V,CAAC;AAEtY;;;;;;;;;;;GAWG;AACU,QAAA,kCAAkC,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mlBA4CiiB,CAAC;AAEplB;;;;;;;;;;;GAWG;AACH,SAAgB,4BAA4B,CAAC,IAU5C;IACC,OAAO;;;;;;;;KAQJ,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,QAAQ;;;;;;;;;;;;;;;;;;;;EAoBvC,IAAI,CAAC,cAAc,EAAE,CAAC;AACxB,CAAC;AAED;;;GAGG;AACH,SAAgB,yBAAyB,CAAC,IASzC;IACC,OAAO;;gMAEuL,IAAI,CAAC,cAAc,uJAAuJ,IAAI,CAAC,cAAc;;;;;;;;;;;;;;qaAcwC,gCAAwB;;;;;;;KAOxb,IAAI,CAAC,KAAK;;;;;;;;;;;KAWV,IAAI,CAAC,YAAY;;;;;;;;;;;;;;;;;qaAiB+Y,gCAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2C3b,mDAAwB;;;;;;0CAMgB,IAAI,CAAC,cAAc;;;;;;;;;;;;icAYoY,CAAC;AAClc,CAAC"}
|