rivet-design 0.24.0 → 0.26.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 +2 -2
- package/README.npm.md +2 -2
- package/dist/agent-variants/PreviewRuntime.d.ts +1 -20
- package/dist/agent-variants/PreviewRuntime.js +1 -102
- package/dist/agent-variants/SessionStore.d.ts +1 -8
- package/dist/agent-variants/SessionStore.js +2 -32
- package/dist/agent-variants/WorkspaceInventory.d.ts +0 -3
- package/dist/agent-variants/WorkspaceInventory.js +5 -28
- package/dist/agent-variants/WorktreeOrchestrator.d.ts +4 -34
- package/dist/agent-variants/WorktreeOrchestrator.js +11 -661
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts +0 -7
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js +1 -34
- package/dist/agent-variants/contracts.d.ts +0 -80
- package/dist/agent-variants/contracts.js +1 -14
- package/dist/agent-variants/designContext.d.ts +9 -0
- package/dist/agent-variants/designContext.js +81 -0
- package/dist/agent-variants/index.d.ts +1 -1
- package/dist/agent-variants/runPlan.d.ts +0 -2
- package/dist/agent-variants/runPlan.js +0 -3
- package/dist/agent-variants/variant-project-runtime.d.ts +0 -2
- package/dist/agent-variants/variantWorkspaceFiles.d.ts +0 -3
- package/dist/agent-variants/variantWorkspaceFiles.js +1 -59
- package/dist/agent-variants/variantsTelemetry.d.ts +0 -8
- package/dist/cli/browser.d.ts +4 -2
- package/dist/cli/browser.js +5 -5
- package/dist/cli/browserSignIn.d.ts +15 -0
- package/dist/cli/browserSignIn.js +54 -0
- package/dist/cli/client.js +11 -0
- package/dist/cli/commands/evidence.js +1 -1
- package/dist/cli/commands/libraryOpen.d.ts +2 -0
- package/dist/cli/commands/libraryOpen.js +18 -4
- package/dist/cli/commands/mcpServe.d.ts +2 -2
- package/dist/cli/commands/mcpServe.js +1 -0
- package/dist/cli/commands/open.d.ts +2 -1
- package/dist/cli/commands/open.js +7 -6
- package/dist/cli/commands/reference.js +1 -1
- package/dist/cli/commands/variants.js +2 -43
- package/dist/cli/envelope.d.ts +3 -0
- package/dist/cli/envelope.js +13 -13
- package/dist/cli/router.js +3 -2
- package/dist/cli/telemetry.js +4 -2
- package/dist/config/flags.d.ts +0 -6
- package/dist/config/flags.js +0 -2
- package/dist/config/pluginMetrics.js +0 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -10
- package/dist/install/mcpRegistration.js +1 -0
- package/dist/mcp/explorationTools.js +0 -17
- package/dist/prototype-host.js +7 -0
- package/dist/proxy-middleware/preview-bridge.d.ts +0 -1
- package/dist/proxy-middleware/preview-bridge.js +31 -3
- package/dist/routes/account.js +4 -2
- package/dist/routes/agentVariants.js +1 -156
- package/dist/routes/editorAccess.d.ts +1 -0
- package/dist/routes/editorAccess.js +13 -4
- package/dist/routes/library/browserAccess.d.ts +3 -1
- package/dist/routes/library/browserAccess.js +5 -3
- package/dist/routes/library/index.js +1 -0
- package/dist/server.js +1 -0
- package/dist/services/AuthService.js +10 -8
- package/dist/services/ConfigManager.d.ts +18 -1
- package/dist/services/ConfigManager.js +91 -4
- package/dist/services/SessionBridgeService.d.ts +0 -2
- package/dist/services/SessionBridgeService.js +0 -26
- package/dist/services/TelemetryService.d.ts +4 -15
- package/dist/services/TelemetryService.js +29 -33
- package/dist/services/VariantHistoryService.js +3 -1
- package/dist/services/VariantRunService.d.ts +0 -5
- package/dist/services/VariantRunService.js +0 -3
- package/dist/services/WorktreeManager.d.ts +0 -3
- package/dist/services/WorktreeManager.js +7 -54
- package/dist/services/createAgentVariantsOrchestrator.js +1 -1
- package/dist/services/profiles/DesignProfiles.js +4 -3
- package/dist/types/preview-bridge.d.ts +4 -0
- package/dist/types/preview-bridge.js +6 -0
- package/dist/utils/editorAccess.d.ts +1 -0
- package/dist/utils/editorAccess.js +11 -1
- package/dist/utils/skills/claude-skill.d.ts +1 -1
- package/dist/utils/skills/claude-skill.js +1 -1
- package/dist/utils/skills/cli-guidance.d.ts +1 -1
- package/dist/utils/skills/cli-guidance.js +7 -9
- package/dist/utils/skills/codex-skill.d.ts +1 -1
- package/dist/utils/skills/codex-skill.js +1 -1
- package/dist/utils/skills/cursor-rules.d.ts +1 -1
- package/dist/utils/skills/cursor-rules.js +1 -1
- package/package.json +10 -3
- package/src/ui/dist/assets/{LibraryEntry-DS6EDW1V.js → LibraryEntry-CFkd6v_O.js} +13 -12
- package/src/ui/dist/assets/main-B_jie9r3.js +439 -0
- package/src/ui/dist/assets/main-W3oTuTTl.css +1 -0
- package/src/ui/dist/index.html +2 -2
- package/dist/agent-variants/PreviewRuntime.d.ts.map +0 -1
- package/dist/agent-variants/PreviewRuntime.js.map +0 -1
- package/dist/agent-variants/SessionStore.d.ts.map +0 -1
- package/dist/agent-variants/SessionStore.js.map +0 -1
- package/dist/agent-variants/VariantWorkspaceManager.d.ts.map +0 -1
- package/dist/agent-variants/VariantWorkspaceManager.js.map +0 -1
- package/dist/agent-variants/WorkerExecutorService.d.ts.map +0 -1
- package/dist/agent-variants/WorkerExecutorService.js.map +0 -1
- package/dist/agent-variants/WorkspaceInventory.d.ts.map +0 -1
- package/dist/agent-variants/WorkspaceInventory.js.map +0 -1
- package/dist/agent-variants/WorkspaceProvisioning.d.ts.map +0 -1
- package/dist/agent-variants/WorkspaceProvisioning.js.map +0 -1
- package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +0 -1
- package/dist/agent-variants/WorktreeOrchestrator.js.map +0 -1
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +0 -1
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js.map +0 -1
- package/dist/agent-variants/briefContent.d.ts.map +0 -1
- package/dist/agent-variants/briefContent.js.map +0 -1
- package/dist/agent-variants/contextAssets.d.ts.map +0 -1
- package/dist/agent-variants/contextAssets.js.map +0 -1
- package/dist/agent-variants/contracts.d.ts.map +0 -1
- package/dist/agent-variants/contracts.js.map +0 -1
- package/dist/agent-variants/createProjectArtifacts.d.ts +0 -61
- package/dist/agent-variants/createProjectArtifacts.d.ts.map +0 -1
- package/dist/agent-variants/createProjectArtifacts.js +0 -113
- package/dist/agent-variants/createProjectArtifacts.js.map +0 -1
- package/dist/agent-variants/designContextArtifacts.d.ts +0 -25
- package/dist/agent-variants/designContextArtifacts.d.ts.map +0 -1
- package/dist/agent-variants/designContextArtifacts.js +0 -471
- package/dist/agent-variants/designContextArtifacts.js.map +0 -1
- package/dist/agent-variants/diffQa.d.ts.map +0 -1
- package/dist/agent-variants/diffQa.js.map +0 -1
- package/dist/agent-variants/directionBriefs.d.ts.map +0 -1
- package/dist/agent-variants/directionBriefs.js.map +0 -1
- package/dist/agent-variants/errors.d.ts.map +0 -1
- package/dist/agent-variants/errors.js.map +0 -1
- package/dist/agent-variants/generatedDestination.d.ts.map +0 -1
- package/dist/agent-variants/generatedDestination.js.map +0 -1
- package/dist/agent-variants/generationCapacity.d.ts.map +0 -1
- package/dist/agent-variants/generationCapacity.js.map +0 -1
- package/dist/agent-variants/guidancePrompt.d.ts.map +0 -1
- package/dist/agent-variants/guidancePrompt.js.map +0 -1
- package/dist/agent-variants/index.d.ts.map +0 -1
- package/dist/agent-variants/index.js.map +0 -1
- package/dist/agent-variants/previewQa.d.ts.map +0 -1
- package/dist/agent-variants/previewQa.js.map +0 -1
- package/dist/agent-variants/runLabel.d.ts.map +0 -1
- package/dist/agent-variants/runLabel.js.map +0 -1
- package/dist/agent-variants/runPlan.d.ts.map +0 -1
- package/dist/agent-variants/runPlan.js.map +0 -1
- package/dist/agent-variants/sourceContext.d.ts.map +0 -1
- package/dist/agent-variants/sourceContext.js.map +0 -1
- package/dist/agent-variants/staticPreviewFiles.d.ts.map +0 -1
- package/dist/agent-variants/staticPreviewFiles.js.map +0 -1
- package/dist/agent-variants/staticPreviewRefinements.d.ts.map +0 -1
- package/dist/agent-variants/staticPreviewRefinements.js.map +0 -1
- package/dist/agent-variants/variant-project-runtime.d.ts.map +0 -1
- package/dist/agent-variants/variant-project-runtime.js.map +0 -1
- package/dist/agent-variants/variant-start-types.d.ts.map +0 -1
- package/dist/agent-variants/variant-start-types.js.map +0 -1
- package/dist/agent-variants/variantContext.d.ts.map +0 -1
- package/dist/agent-variants/variantContext.js.map +0 -1
- package/dist/agent-variants/variantWorkspaceFiles.d.ts.map +0 -1
- package/dist/agent-variants/variantWorkspaceFiles.js.map +0 -1
- package/dist/agent-variants/variantsTelemetry.d.ts.map +0 -1
- package/dist/agent-variants/variantsTelemetry.js.map +0 -1
- package/dist/agent-variants/videoKeyframes.d.ts.map +0 -1
- package/dist/agent-variants/videoKeyframes.js.map +0 -1
- package/dist/agent-variants/workItemBriefing.d.ts.map +0 -1
- package/dist/agent-variants/workItemBriefing.js.map +0 -1
- package/dist/agent-variants/workItemContextFiles.d.ts.map +0 -1
- package/dist/agent-variants/workItemContextFiles.js.map +0 -1
- package/dist/agent-variants/workItemInput.d.ts.map +0 -1
- package/dist/agent-variants/workItemInput.js.map +0 -1
- package/dist/agent-variants/workItemPreviewRoutes.d.ts.map +0 -1
- package/dist/agent-variants/workItemPreviewRoutes.js.map +0 -1
- package/dist/agent-variants/workerRuntime.d.ts.map +0 -1
- package/dist/agent-variants/workerRuntime.js.map +0 -1
- package/dist/cli/browser.d.ts.map +0 -1
- package/dist/cli/browser.js.map +0 -1
- package/dist/cli/callerModel.d.ts.map +0 -1
- package/dist/cli/callerModel.js.map +0 -1
- package/dist/cli/callerRunnerPaths.d.ts.map +0 -1
- package/dist/cli/callerRunnerPaths.js.map +0 -1
- package/dist/cli/client.d.ts.map +0 -1
- package/dist/cli/client.js.map +0 -1
- package/dist/cli/commandNames.d.ts.map +0 -1
- package/dist/cli/commandNames.js.map +0 -1
- package/dist/cli/commands/auth.d.ts.map +0 -1
- package/dist/cli/commands/auth.js.map +0 -1
- package/dist/cli/commands/context.d.ts.map +0 -1
- package/dist/cli/commands/context.js.map +0 -1
- package/dist/cli/commands/contextRequest.d.ts.map +0 -1
- package/dist/cli/commands/contextRequest.js.map +0 -1
- package/dist/cli/commands/contextVerification.d.ts.map +0 -1
- package/dist/cli/commands/contextVerification.js.map +0 -1
- package/dist/cli/commands/elementSelector.d.ts.map +0 -1
- package/dist/cli/commands/elementSelector.js.map +0 -1
- package/dist/cli/commands/evidence.d.ts.map +0 -1
- package/dist/cli/commands/evidence.js.map +0 -1
- package/dist/cli/commands/generationPreflight.d.ts.map +0 -1
- package/dist/cli/commands/generationPreflight.js.map +0 -1
- package/dist/cli/commands/guidanceReferences.d.ts.map +0 -1
- package/dist/cli/commands/guidanceReferences.js.map +0 -1
- package/dist/cli/commands/guidanceUpload.d.ts.map +0 -1
- package/dist/cli/commands/guidanceUpload.js.map +0 -1
- package/dist/cli/commands/guidanceVerifierPackage.d.ts.map +0 -1
- package/dist/cli/commands/guidanceVerifierPackage.js.map +0 -1
- package/dist/cli/commands/libraryOpen.d.ts.map +0 -1
- package/dist/cli/commands/libraryOpen.js.map +0 -1
- package/dist/cli/commands/mcpServe.d.ts.map +0 -1
- package/dist/cli/commands/mcpServe.js.map +0 -1
- package/dist/cli/commands/open.d.ts.map +0 -1
- package/dist/cli/commands/open.js.map +0 -1
- package/dist/cli/commands/profile.d.ts.map +0 -1
- package/dist/cli/commands/profile.js.map +0 -1
- package/dist/cli/commands/reference.d.ts.map +0 -1
- package/dist/cli/commands/reference.js.map +0 -1
- package/dist/cli/commands/serve.d.ts.map +0 -1
- package/dist/cli/commands/serve.js.map +0 -1
- package/dist/cli/commands/shared.d.ts.map +0 -1
- package/dist/cli/commands/shared.js.map +0 -1
- package/dist/cli/commands/status.d.ts.map +0 -1
- package/dist/cli/commands/status.js.map +0 -1
- package/dist/cli/commands/stop.d.ts.map +0 -1
- package/dist/cli/commands/stop.js.map +0 -1
- package/dist/cli/commands/update.d.ts.map +0 -1
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/commands/variants.d.ts.map +0 -1
- package/dist/cli/commands/variants.js.map +0 -1
- package/dist/cli/commands/version.d.ts.map +0 -1
- package/dist/cli/commands/version.js.map +0 -1
- package/dist/cli/commands/wait.d.ts.map +0 -1
- package/dist/cli/commands/wait.js.map +0 -1
- package/dist/cli/editorSession.d.ts.map +0 -1
- package/dist/cli/editorSession.js.map +0 -1
- package/dist/cli/entry.d.ts.map +0 -1
- package/dist/cli/entry.js.map +0 -1
- package/dist/cli/envelope.d.ts.map +0 -1
- package/dist/cli/envelope.js.map +0 -1
- package/dist/cli/flags.d.ts.map +0 -1
- package/dist/cli/flags.js.map +0 -1
- package/dist/cli/guidance.d.ts.map +0 -1
- package/dist/cli/guidance.js.map +0 -1
- package/dist/cli/handoff.d.ts.map +0 -1
- package/dist/cli/handoff.js.map +0 -1
- package/dist/cli/handoffStore.d.ts.map +0 -1
- package/dist/cli/handoffStore.js.map +0 -1
- package/dist/cli/hostWorkNextAction.d.ts.map +0 -1
- package/dist/cli/hostWorkNextAction.js.map +0 -1
- package/dist/cli/io.d.ts.map +0 -1
- package/dist/cli/io.js.map +0 -1
- package/dist/cli/projectRuntimeUpgrade.d.ts.map +0 -1
- package/dist/cli/projectRuntimeUpgrade.js.map +0 -1
- package/dist/cli/referenceOnboarding.d.ts.map +0 -1
- package/dist/cli/referenceOnboarding.js.map +0 -1
- package/dist/cli/resolveDefaultNodeEnv.d.ts.map +0 -1
- package/dist/cli/resolveDefaultNodeEnv.js.map +0 -1
- package/dist/cli/router.d.ts.map +0 -1
- package/dist/cli/router.js.map +0 -1
- package/dist/cli/runnerSelection.d.ts.map +0 -1
- package/dist/cli/runnerSelection.js.map +0 -1
- package/dist/cli/runtimeInterruption.d.ts.map +0 -1
- package/dist/cli/runtimeInterruption.js.map +0 -1
- package/dist/cli/serverHandshake.d.ts.map +0 -1
- package/dist/cli/serverHandshake.js.map +0 -1
- package/dist/cli/serverShutdown.d.ts.map +0 -1
- package/dist/cli/serverShutdown.js.map +0 -1
- package/dist/cli/serverUnavailable.d.ts.map +0 -1
- package/dist/cli/serverUnavailable.js.map +0 -1
- package/dist/cli/serverVersion.d.ts.map +0 -1
- package/dist/cli/serverVersion.js.map +0 -1
- package/dist/cli/synchronizeRuntimes.d.ts.map +0 -1
- package/dist/cli/synchronizeRuntimes.js.map +0 -1
- package/dist/cli/telemetry.d.ts.map +0 -1
- package/dist/cli/telemetry.js.map +0 -1
- package/dist/config/evaluateFlags.d.ts.map +0 -1
- package/dist/config/evaluateFlags.js.map +0 -1
- package/dist/config/featureFlagUserKey.d.ts.map +0 -1
- package/dist/config/featureFlagUserKey.js.map +0 -1
- package/dist/config/flags.d.ts.map +0 -1
- package/dist/config/flags.js.map +0 -1
- package/dist/config/pluginMetrics.d.ts.map +0 -1
- package/dist/config/pluginMetrics.js.map +0 -1
- package/dist/config/proxy.d.ts.map +0 -1
- package/dist/config/proxy.js.map +0 -1
- package/dist/config/telemetry.d.ts.map +0 -1
- package/dist/config/telemetry.js.map +0 -1
- package/dist/config/telemetryContract.d.ts.map +0 -1
- package/dist/config/telemetryContract.js.map +0 -1
- package/dist/config/telemetryPolicy.d.ts.map +0 -1
- package/dist/config/telemetryPolicy.js.map +0 -1
- package/dist/hosts/pluginContext.d.ts.map +0 -1
- package/dist/hosts/pluginContext.js.map +0 -1
- package/dist/hosts/workerDefaults.d.ts.map +0 -1
- package/dist/hosts/workerDefaults.js.map +0 -1
- package/dist/index-core.d.ts.map +0 -1
- package/dist/index-core.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/install/agentSkill.d.ts.map +0 -1
- package/dist/install/agentSkill.js.map +0 -1
- package/dist/install/allowlists.d.ts.map +0 -1
- package/dist/install/allowlists.js.map +0 -1
- package/dist/install/automaticCliUpdate.d.ts.map +0 -1
- package/dist/install/automaticCliUpdate.js.map +0 -1
- package/dist/install/channelCli.d.ts.map +0 -1
- package/dist/install/channelCli.js.map +0 -1
- package/dist/install/channelManager.d.ts.map +0 -1
- package/dist/install/channelManager.js.map +0 -1
- package/dist/install/codexGuidance.d.ts.map +0 -1
- package/dist/install/codexGuidance.js.map +0 -1
- package/dist/install/codexSkill.d.ts.map +0 -1
- package/dist/install/codexSkill.js.map +0 -1
- package/dist/install/cursorSkill.d.ts.map +0 -1
- package/dist/install/cursorSkill.js.map +0 -1
- package/dist/install/globalBootstrap.d.ts.map +0 -1
- package/dist/install/globalBootstrap.js.map +0 -1
- package/dist/install/harnesses.d.ts.map +0 -1
- package/dist/install/harnesses.js.map +0 -1
- package/dist/install/installationChannel.d.ts.map +0 -1
- package/dist/install/installationChannel.js.map +0 -1
- package/dist/install/legacyMcp.d.ts.map +0 -1
- package/dist/install/legacyMcp.js.map +0 -1
- package/dist/install/mcpRegistration.d.ts.map +0 -1
- package/dist/install/mcpRegistration.js.map +0 -1
- package/dist/library/BrowserSessions.d.ts.map +0 -1
- package/dist/library/BrowserSessions.js.map +0 -1
- package/dist/library/HubClient.d.ts.map +0 -1
- package/dist/library/HubClient.js.map +0 -1
- package/dist/library/HubServer.d.ts.map +0 -1
- package/dist/library/HubServer.js.map +0 -1
- package/dist/library/StaticPreviewServer.d.ts.map +0 -1
- package/dist/library/StaticPreviewServer.js.map +0 -1
- package/dist/library/browserLaunch.d.ts.map +0 -1
- package/dist/library/browserLaunch.js.map +0 -1
- package/dist/library/http.d.ts.map +0 -1
- package/dist/library/http.js.map +0 -1
- package/dist/library/hubPort.d.ts.map +0 -1
- package/dist/library/hubPort.js.map +0 -1
- package/dist/library/importFiles.d.ts.map +0 -1
- package/dist/library/importFiles.js.map +0 -1
- package/dist/mcp/changeBatchClassification.d.ts.map +0 -1
- package/dist/mcp/changeBatchClassification.js.map +0 -1
- package/dist/mcp/designContextTools.d.ts.map +0 -1
- package/dist/mcp/designContextTools.js.map +0 -1
- package/dist/mcp/explorationSchema.d.ts.map +0 -1
- package/dist/mcp/explorationSchema.js.map +0 -1
- package/dist/mcp/explorationTools.d.ts.map +0 -1
- package/dist/mcp/explorationTools.js.map +0 -1
- package/dist/mcp/getExploration.d.ts.map +0 -1
- package/dist/mcp/getExploration.js.map +0 -1
- package/dist/mcp/intentTool.d.ts.map +0 -1
- package/dist/mcp/intentTool.js.map +0 -1
- package/dist/mcp/preferenceTools.d.ts.map +0 -1
- package/dist/mcp/preferenceTools.js.map +0 -1
- package/dist/mcp/profileAccess.d.ts.map +0 -1
- package/dist/mcp/profileAccess.js.map +0 -1
- package/dist/mcp/referenceTools.d.ts.map +0 -1
- package/dist/mcp/referenceTools.js.map +0 -1
- package/dist/prototype-host.d.ts.map +0 -1
- package/dist/prototype-host.js.map +0 -1
- package/dist/proxy-middleware/preview-bridge.d.ts.map +0 -1
- package/dist/proxy-middleware/preview-bridge.js.map +0 -1
- package/dist/proxy-middleware/preview-connections.d.ts.map +0 -1
- package/dist/proxy-middleware/preview-connections.js.map +0 -1
- package/dist/proxy-middleware/proxy-config.d.ts.map +0 -1
- package/dist/proxy-middleware/proxy-config.js.map +0 -1
- package/dist/routes/account.d.ts.map +0 -1
- package/dist/routes/account.js.map +0 -1
- package/dist/routes/agentVariants.d.ts.map +0 -1
- package/dist/routes/agentVariants.js.map +0 -1
- package/dist/routes/cli.d.ts.map +0 -1
- package/dist/routes/cli.js.map +0 -1
- package/dist/routes/editorAccess.d.ts.map +0 -1
- package/dist/routes/editorAccess.js.map +0 -1
- package/dist/routes/emptyStatePage.d.ts.map +0 -1
- package/dist/routes/emptyStatePage.js.map +0 -1
- package/dist/routes/inlineStartTracker.d.ts.map +0 -1
- package/dist/routes/inlineStartTracker.js.map +0 -1
- package/dist/routes/installRef.d.ts.map +0 -1
- package/dist/routes/installRef.js.map +0 -1
- package/dist/routes/integrations.d.ts.map +0 -1
- package/dist/routes/integrations.js.map +0 -1
- package/dist/routes/library/app.d.ts.map +0 -1
- package/dist/routes/library/app.js.map +0 -1
- package/dist/routes/library/browserAccess.d.ts.map +0 -1
- package/dist/routes/library/browserAccess.js.map +0 -1
- package/dist/routes/library/guidance.d.ts.map +0 -1
- package/dist/routes/library/guidance.js.map +0 -1
- package/dist/routes/library/index.d.ts.map +0 -1
- package/dist/routes/library/index.js.map +0 -1
- package/dist/routes/library/middleware.d.ts.map +0 -1
- package/dist/routes/library/middleware.js.map +0 -1
- package/dist/routes/library/navigation.d.ts.map +0 -1
- package/dist/routes/library/navigation.js.map +0 -1
- package/dist/routes/library/profiles.d.ts.map +0 -1
- package/dist/routes/library/profiles.js.map +0 -1
- package/dist/routes/library/projects.d.ts.map +0 -1
- package/dist/routes/library/projects.js.map +0 -1
- package/dist/routes/library/referenceOnboarding.d.ts.map +0 -1
- package/dist/routes/library/referenceOnboarding.js.map +0 -1
- package/dist/routes/library/schemas.d.ts.map +0 -1
- package/dist/routes/library/schemas.js.map +0 -1
- package/dist/routes/library/staticPreview.d.ts.map +0 -1
- package/dist/routes/library/staticPreview.js.map +0 -1
- package/dist/routes/library/types.d.ts.map +0 -1
- package/dist/routes/library/types.js.map +0 -1
- package/dist/routes/library/variants.d.ts.map +0 -1
- package/dist/routes/library/variants.js.map +0 -1
- package/dist/routes/mcp.d.ts.map +0 -1
- package/dist/routes/mcp.js.map +0 -1
- package/dist/routes/prototypeHost.d.ts.map +0 -1
- package/dist/routes/prototypeHost.js.map +0 -1
- package/dist/routes/referenceProfiles.d.ts.map +0 -1
- package/dist/routes/referenceProfiles.js.map +0 -1
- package/dist/routes/runtimeAdmission.d.ts.map +0 -1
- package/dist/routes/runtimeAdmission.js.map +0 -1
- package/dist/routes/shareAvailability.d.ts.map +0 -1
- package/dist/routes/shareAvailability.js.map +0 -1
- package/dist/routes/static.d.ts.map +0 -1
- package/dist/routes/static.js.map +0 -1
- package/dist/routes/staticPreviewPolicy.d.ts.map +0 -1
- package/dist/routes/staticPreviewPolicy.js.map +0 -1
- package/dist/routes/support.d.ts.map +0 -1
- package/dist/routes/support.js.map +0 -1
- package/dist/routes/telemetry.d.ts.map +0 -1
- package/dist/routes/telemetry.js.map +0 -1
- package/dist/routes/variantRequestSchema.d.ts.map +0 -1
- package/dist/routes/variantRequestSchema.js.map +0 -1
- package/dist/server.d.ts.map +0 -1
- package/dist/server.js.map +0 -1
- package/dist/services/AuthService.d.ts.map +0 -1
- package/dist/services/AuthService.js.map +0 -1
- package/dist/services/BrowserAgentClient.d.ts.map +0 -1
- package/dist/services/BrowserAgentClient.js.map +0 -1
- package/dist/services/BundleStore.d.ts.map +0 -1
- package/dist/services/BundleStore.js.map +0 -1
- package/dist/services/CliLogForwarder.d.ts.map +0 -1
- package/dist/services/CliLogForwarder.js.map +0 -1
- package/dist/services/ConfigManager.d.ts.map +0 -1
- package/dist/services/ConfigManager.js.map +0 -1
- package/dist/services/DependencyPreparationService.d.ts.map +0 -1
- package/dist/services/DependencyPreparationService.js.map +0 -1
- package/dist/services/DevServerRuntimeService.d.ts.map +0 -1
- package/dist/services/DevServerRuntimeService.js.map +0 -1
- package/dist/services/FeatureFlagService.d.ts.map +0 -1
- package/dist/services/FeatureFlagService.js.map +0 -1
- package/dist/services/GuidanceVerifierRunner.d.ts.map +0 -1
- package/dist/services/GuidanceVerifierRunner.js.map +0 -1
- package/dist/services/HistoryReplayService.d.ts.map +0 -1
- package/dist/services/HistoryReplayService.js.map +0 -1
- package/dist/services/HubDiscovery.d.ts.map +0 -1
- package/dist/services/HubDiscovery.js.map +0 -1
- package/dist/services/HubNavigation.d.ts.map +0 -1
- package/dist/services/HubNavigation.js.map +0 -1
- package/dist/services/IntegrationsClient.d.ts.map +0 -1
- package/dist/services/IntegrationsClient.js.map +0 -1
- package/dist/services/MCPOnboardingTelemetry.d.ts.map +0 -1
- package/dist/services/MCPOnboardingTelemetry.js.map +0 -1
- package/dist/services/MCPVariantsTelemetry.d.ts.map +0 -1
- package/dist/services/MCPVariantsTelemetry.js.map +0 -1
- package/dist/services/OperatingSystemServices.d.ts.map +0 -1
- package/dist/services/OperatingSystemServices.js.map +0 -1
- package/dist/services/PreviewEnvironment.d.ts.map +0 -1
- package/dist/services/PreviewEnvironment.js.map +0 -1
- package/dist/services/ProjectCardPreviews.d.ts.map +0 -1
- package/dist/services/ProjectCardPreviews.js.map +0 -1
- package/dist/services/ProjectDetectionService.d.ts.map +0 -1
- package/dist/services/ProjectDetectionService.js.map +0 -1
- package/dist/services/ProjectFolderPicker.d.ts.map +0 -1
- package/dist/services/ProjectFolderPicker.js.map +0 -1
- package/dist/services/ProjectImport.d.ts.map +0 -1
- package/dist/services/ProjectImport.js.map +0 -1
- package/dist/services/ProjectLibrary.d.ts.map +0 -1
- package/dist/services/ProjectLibrary.js.map +0 -1
- package/dist/services/ProjectMetadataStore.d.ts.map +0 -1
- package/dist/services/ProjectMetadataStore.js.map +0 -1
- package/dist/services/ProjectPackageManager.d.ts.map +0 -1
- package/dist/services/ProjectPackageManager.js.map +0 -1
- package/dist/services/ProjectRegistry.d.ts.map +0 -1
- package/dist/services/ProjectRegistry.js.map +0 -1
- package/dist/services/ProjectRuntimeService.d.ts.map +0 -1
- package/dist/services/ProjectRuntimeService.js.map +0 -1
- package/dist/services/ProjectScreenshotService.d.ts.map +0 -1
- package/dist/services/ProjectScreenshotService.js.map +0 -1
- package/dist/services/ProjectStorage.d.ts.map +0 -1
- package/dist/services/ProjectStorage.js.map +0 -1
- package/dist/services/PrototypeBuildService.d.ts.map +0 -1
- package/dist/services/PrototypeBuildService.js.map +0 -1
- package/dist/services/PrototypeDeployService.d.ts.map +0 -1
- package/dist/services/PrototypeDeployService.js.map +0 -1
- package/dist/services/RequestAuthContext.d.ts.map +0 -1
- package/dist/services/RequestAuthContext.js.map +0 -1
- package/dist/services/RuntimeAdmission.d.ts.map +0 -1
- package/dist/services/RuntimeAdmission.js.map +0 -1
- package/dist/services/SessionBridgeService.d.ts.map +0 -1
- package/dist/services/SessionBridgeService.js.map +0 -1
- package/dist/services/StaticFileService.d.ts.map +0 -1
- package/dist/services/StaticFileService.js.map +0 -1
- package/dist/services/StaticLibraryPreviews.d.ts.map +0 -1
- package/dist/services/StaticLibraryPreviews.js.map +0 -1
- package/dist/services/StaticPreviewServer.d.ts.map +0 -1
- package/dist/services/StaticPreviewServer.js.map +0 -1
- package/dist/services/SupabaseAuthService.d.ts.map +0 -1
- package/dist/services/SupabaseAuthService.js.map +0 -1
- package/dist/services/SupportTicketService.d.ts.map +0 -1
- package/dist/services/SupportTicketService.js.map +0 -1
- package/dist/services/TelemetryService.d.ts.map +0 -1
- package/dist/services/TelemetryService.js.map +0 -1
- package/dist/services/TreeStore.d.ts.map +0 -1
- package/dist/services/TreeStore.js.map +0 -1
- package/dist/services/VariantGenerationService.d.ts.map +0 -1
- package/dist/services/VariantGenerationService.js.map +0 -1
- package/dist/services/VariantHistoryService.d.ts.map +0 -1
- package/dist/services/VariantHistoryService.js.map +0 -1
- package/dist/services/VariantRunService.d.ts.map +0 -1
- package/dist/services/VariantRunService.js.map +0 -1
- package/dist/services/VariantsRuntime.d.ts.map +0 -1
- package/dist/services/VariantsRuntime.js.map +0 -1
- package/dist/services/WorktreeManager.d.ts.map +0 -1
- package/dist/services/WorktreeManager.js.map +0 -1
- package/dist/services/accessTokenRefresh.d.ts.map +0 -1
- package/dist/services/accessTokenRefresh.js.map +0 -1
- package/dist/services/authUpdate.d.ts.map +0 -1
- package/dist/services/authUpdate.js.map +0 -1
- package/dist/services/createAgentVariantsOrchestrator.d.ts.map +0 -1
- package/dist/services/createAgentVariantsOrchestrator.js.map +0 -1
- package/dist/services/generationGuidance.d.ts.map +0 -1
- package/dist/services/generationGuidance.js.map +0 -1
- package/dist/services/guidanceDelivery.d.ts.map +0 -1
- package/dist/services/guidanceDelivery.js.map +0 -1
- package/dist/services/guidanceImages.d.ts.map +0 -1
- package/dist/services/guidanceImages.js.map +0 -1
- package/dist/services/guidanceReferences.d.ts.map +0 -1
- package/dist/services/guidanceReferences.js.map +0 -1
- package/dist/services/historyRoots.d.ts.map +0 -1
- package/dist/services/historyRoots.js.map +0 -1
- package/dist/services/libraryErrors.d.ts.map +0 -1
- package/dist/services/libraryErrors.js.map +0 -1
- package/dist/services/packageManagerProcess.d.ts.map +0 -1
- package/dist/services/packageManagerProcess.js.map +0 -1
- package/dist/services/pendingLogin.d.ts.map +0 -1
- package/dist/services/pendingLogin.js.map +0 -1
- package/dist/services/profiles/DesignProfiles.d.ts.map +0 -1
- package/dist/services/profiles/DesignProfiles.js.map +0 -1
- package/dist/services/profiles/MemoryModelService.d.ts.map +0 -1
- package/dist/services/profiles/MemoryModelService.js.map +0 -1
- package/dist/services/profiles/MemoryRuntime.d.ts.map +0 -1
- package/dist/services/profiles/MemoryRuntime.js.map +0 -1
- package/dist/services/profiles/ProfileAgent.d.ts.map +0 -1
- package/dist/services/profiles/ProfileAgent.js.map +0 -1
- package/dist/services/profiles/ProfileAnalysis.d.ts.map +0 -1
- package/dist/services/profiles/ProfileAnalysis.js.map +0 -1
- package/dist/services/profiles/ProfileImportSchedule.d.ts.map +0 -1
- package/dist/services/profiles/ProfileImportSchedule.js.map +0 -1
- package/dist/services/profiles/ProfileImports.d.ts.map +0 -1
- package/dist/services/profiles/ProfileImports.js.map +0 -1
- package/dist/services/profiles/ProfileIndex.d.ts.map +0 -1
- package/dist/services/profiles/ProfileIndex.js.map +0 -1
- package/dist/services/profiles/ProfileMedia.d.ts.map +0 -1
- package/dist/services/profiles/ProfileMedia.js.map +0 -1
- package/dist/services/profiles/ProfilePlanning.d.ts.map +0 -1
- package/dist/services/profiles/ProfilePlanning.js.map +0 -1
- package/dist/services/profiles/ProfilePreparation.d.ts.map +0 -1
- package/dist/services/profiles/ProfilePreparation.js.map +0 -1
- package/dist/services/profiles/ProfileVariants.d.ts.map +0 -1
- package/dist/services/profiles/ProfileVariants.js.map +0 -1
- package/dist/services/profiles/ReferenceReader.d.ts.map +0 -1
- package/dist/services/profiles/ReferenceReader.js.map +0 -1
- package/dist/services/profiles/analysisBatch.d.ts.map +0 -1
- package/dist/services/profiles/analysisBatch.js.map +0 -1
- package/dist/services/profiles/boardPage.d.ts.map +0 -1
- package/dist/services/profiles/boardPage.js.map +0 -1
- package/dist/services/profiles/cosmosPage.d.ts.map +0 -1
- package/dist/services/profiles/cosmosPage.js.map +0 -1
- package/dist/services/profiles/engineAccess.d.ts.map +0 -1
- package/dist/services/profiles/engineAccess.js.map +0 -1
- package/dist/services/profiles/memoryComponents.d.ts.map +0 -1
- package/dist/services/profiles/memoryComponents.js.map +0 -1
- package/dist/services/profiles/modelContract.d.ts.map +0 -1
- package/dist/services/profiles/modelContract.js.map +0 -1
- package/dist/services/profiles/nativeImages.d.ts.map +0 -1
- package/dist/services/profiles/nativeImages.js.map +0 -1
- package/dist/services/profiles/profileAccount.d.ts.map +0 -1
- package/dist/services/profiles/profileAccount.js.map +0 -1
- package/dist/services/profiles/profileContext.d.ts.map +0 -1
- package/dist/services/profiles/profileContext.js.map +0 -1
- package/dist/services/profiles/profileEvidence.d.ts.map +0 -1
- package/dist/services/profiles/profileEvidence.js.map +0 -1
- package/dist/services/profiles/profileQueries.d.ts.map +0 -1
- package/dist/services/profiles/profileQueries.js.map +0 -1
- package/dist/services/profiles/profileSearch.d.ts.map +0 -1
- package/dist/services/profiles/profileSearch.js.map +0 -1
- package/dist/services/profiles/profileSelection.d.ts.map +0 -1
- package/dist/services/profiles/profileSelection.js.map +0 -1
- package/dist/services/profiles/selectionContext.d.ts.map +0 -1
- package/dist/services/profiles/selectionContext.js.map +0 -1
- package/dist/services/profiles/xPage.d.ts.map +0 -1
- package/dist/services/profiles/xPage.js.map +0 -1
- package/dist/services/referenceImages.d.ts.map +0 -1
- package/dist/services/referenceImages.js.map +0 -1
- package/dist/services/retainedTextFiles.d.ts.map +0 -1
- package/dist/services/retainedTextFiles.js.map +0 -1
- package/dist/services/runtimeActivity.d.ts.map +0 -1
- package/dist/services/runtimeActivity.js.map +0 -1
- package/dist/services/runtimeVersion.d.ts.map +0 -1
- package/dist/services/runtimeVersion.js.map +0 -1
- package/dist/services/staticProjectTarget.d.ts.map +0 -1
- package/dist/services/staticProjectTarget.js.map +0 -1
- package/dist/services/stopRuntimeProcess.d.ts.map +0 -1
- package/dist/services/stopRuntimeProcess.js.map +0 -1
- package/dist/services/templates/designCatalog.d.ts.map +0 -1
- package/dist/services/templates/designCatalog.js.map +0 -1
- package/dist/services/templates/viteReactTs.d.ts.map +0 -1
- package/dist/services/templates/viteReactTs.js.map +0 -1
- package/dist/storage/library/BrowserAuthorizationRecords.d.ts.map +0 -1
- package/dist/storage/library/BrowserAuthorizationRecords.js.map +0 -1
- package/dist/storage/library/BundleMetadataStore.d.ts.map +0 -1
- package/dist/storage/library/BundleMetadataStore.js.map +0 -1
- package/dist/storage/library/CoordinatorRecords.d.ts.map +0 -1
- package/dist/storage/library/CoordinatorRecords.js.map +0 -1
- package/dist/storage/library/ProjectPreviewCache.d.ts.map +0 -1
- package/dist/storage/library/ProjectPreviewCache.js.map +0 -1
- package/dist/storage/library/ProjectRecords.d.ts.map +0 -1
- package/dist/storage/library/ProjectRecords.js.map +0 -1
- package/dist/storage/library/ProjectRuntimeRecords.d.ts.map +0 -1
- package/dist/storage/library/ProjectRuntimeRecords.js.map +0 -1
- package/dist/storage/library/database.d.ts.map +0 -1
- package/dist/storage/library/database.js.map +0 -1
- package/dist/storage/library/migrations.d.ts.map +0 -1
- package/dist/storage/library/migrations.js.map +0 -1
- package/dist/storage/library/schema/browserAuthorization.d.ts.map +0 -1
- package/dist/storage/library/schema/browserAuthorization.js.map +0 -1
- package/dist/storage/library/schema/bundle.d.ts.map +0 -1
- package/dist/storage/library/schema/bundle.js.map +0 -1
- package/dist/storage/library/schema/coordinator.d.ts.map +0 -1
- package/dist/storage/library/schema/coordinator.js.map +0 -1
- package/dist/storage/library/schema/projectRuntime.d.ts.map +0 -1
- package/dist/storage/library/schema/projectRuntime.js.map +0 -1
- package/dist/storage/library/schema/registry.d.ts.map +0 -1
- package/dist/storage/library/schema/registry.js.map +0 -1
- package/dist/storage/library/sourcePresentation.d.ts.map +0 -1
- package/dist/storage/library/sourcePresentation.js.map +0 -1
- package/dist/storage/profiles/ProfilePlans.d.ts.map +0 -1
- package/dist/storage/profiles/ProfilePlans.js.map +0 -1
- package/dist/storage/profiles/ProfileRecords.d.ts.map +0 -1
- package/dist/storage/profiles/ProfileRecords.js.map +0 -1
- package/dist/storage/profiles/contextReceipts.d.ts.map +0 -1
- package/dist/storage/profiles/contextReceipts.js.map +0 -1
- package/dist/storage/profiles/guidanceVerifier.d.ts.map +0 -1
- package/dist/storage/profiles/guidanceVerifier.js.map +0 -1
- package/dist/storage/profiles/migrations.d.ts.map +0 -1
- package/dist/storage/profiles/migrations.js.map +0 -1
- package/dist/storage/profiles/planSchema.d.ts.map +0 -1
- package/dist/storage/profiles/planSchema.js.map +0 -1
- package/dist/storage/profiles/schema.d.ts.map +0 -1
- package/dist/storage/profiles/schema.js.map +0 -1
- package/dist/storage/project-metadata/ProjectMetadataRecords.d.ts.map +0 -1
- package/dist/storage/project-metadata/ProjectMetadataRecords.js.map +0 -1
- package/dist/storage/project-metadata/database.d.ts.map +0 -1
- package/dist/storage/project-metadata/database.js.map +0 -1
- package/dist/storage/project-metadata/migrations.d.ts.map +0 -1
- package/dist/storage/project-metadata/migrations.js.map +0 -1
- package/dist/storage/project-metadata/schema.d.ts.map +0 -1
- package/dist/storage/project-metadata/schema.js.map +0 -1
- package/dist/types/account.d.ts.map +0 -1
- package/dist/types/account.js.map +0 -1
- package/dist/types/change-request-types.d.ts.map +0 -1
- package/dist/types/change-request-types.js.map +0 -1
- package/dist/types/change-types.d.ts.map +0 -1
- package/dist/types/change-types.js.map +0 -1
- package/dist/types/cosmos-profile.d.ts.map +0 -1
- package/dist/types/cosmos-profile.js.map +0 -1
- package/dist/types/cosmos.d.ts.map +0 -1
- package/dist/types/cosmos.js.map +0 -1
- package/dist/types/design-library.d.ts.map +0 -1
- package/dist/types/design-library.js.map +0 -1
- package/dist/types/design-profile.d.ts.map +0 -1
- package/dist/types/design-profile.js.map +0 -1
- package/dist/types/guidance-references.d.ts.map +0 -1
- package/dist/types/guidance-references.js.map +0 -1
- package/dist/types/guidance-verifier.d.ts.map +0 -1
- package/dist/types/guidance-verifier.js.map +0 -1
- package/dist/types/guidance.d.ts.map +0 -1
- package/dist/types/guidance.js.map +0 -1
- package/dist/types/preview-routes.d.ts.map +0 -1
- package/dist/types/preview-routes.js.map +0 -1
- package/dist/types/project-library.d.ts.map +0 -1
- package/dist/types/project-library.js.map +0 -1
- package/dist/types/reference-connectors.d.ts.map +0 -1
- package/dist/types/reference-connectors.js.map +0 -1
- package/dist/types/reference-onboarding.d.ts.map +0 -1
- package/dist/types/reference-onboarding.js.map +0 -1
- package/dist/types/reference-pages.d.ts.map +0 -1
- package/dist/types/reference-pages.js.map +0 -1
- package/dist/types/variant-history.d.ts.map +0 -1
- package/dist/types/variant-history.js.map +0 -1
- package/dist/types/variant-reference.d.ts.map +0 -1
- package/dist/types/variant-reference.js.map +0 -1
- package/dist/types/x-bookmarks.d.ts.map +0 -1
- package/dist/types/x-bookmarks.js.map +0 -1
- package/dist/utils/ProviderRateLimit.d.ts.map +0 -1
- package/dist/utils/ProviderRateLimit.js.map +0 -1
- package/dist/utils/cloneOrCopyDirSync.d.ts.map +0 -1
- package/dist/utils/cloneOrCopyDirSync.js.map +0 -1
- package/dist/utils/devServerCommand.d.ts.map +0 -1
- package/dist/utils/devServerCommand.js.map +0 -1
- package/dist/utils/devServerError.d.ts.map +0 -1
- package/dist/utils/devServerError.js.map +0 -1
- package/dist/utils/displayLocale.d.ts.map +0 -1
- package/dist/utils/displayLocale.js.map +0 -1
- package/dist/utils/editorAccess.d.ts.map +0 -1
- package/dist/utils/editorAccess.js.map +0 -1
- package/dist/utils/errnoCode.d.ts.map +0 -1
- package/dist/utils/errnoCode.js.map +0 -1
- package/dist/utils/errorMessage.d.ts.map +0 -1
- package/dist/utils/errorMessage.js.map +0 -1
- package/dist/utils/hostedLogPrivacy.d.ts.map +0 -1
- package/dist/utils/hostedLogPrivacy.js.map +0 -1
- package/dist/utils/hostedLogging.d.ts.map +0 -1
- package/dist/utils/hostedLogging.js.map +0 -1
- package/dist/utils/htmlDocument.d.ts.map +0 -1
- package/dist/utils/htmlDocument.js.map +0 -1
- package/dist/utils/installRef.d.ts.map +0 -1
- package/dist/utils/installRef.js.map +0 -1
- package/dist/utils/internalGitIdentity.d.ts.map +0 -1
- package/dist/utils/internalGitIdentity.js.map +0 -1
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/loginShellPath.d.ts.map +0 -1
- package/dist/utils/loginShellPath.js.map +0 -1
- package/dist/utils/loopback.d.ts.map +0 -1
- package/dist/utils/loopback.js.map +0 -1
- package/dist/utils/pathContainment.d.ts.map +0 -1
- package/dist/utils/pathContainment.js.map +0 -1
- package/dist/utils/pid.d.ts.map +0 -1
- package/dist/utils/pid.js.map +0 -1
- package/dist/utils/portUtils.d.ts.map +0 -1
- package/dist/utils/portUtils.js.map +0 -1
- package/dist/utils/queueAccess.d.ts.map +0 -1
- package/dist/utils/queueAccess.js.map +0 -1
- package/dist/utils/skillWriter.d.ts.map +0 -1
- package/dist/utils/skillWriter.js.map +0 -1
- package/dist/utils/skills/claude-skill.d.ts.map +0 -1
- package/dist/utils/skills/claude-skill.js.map +0 -1
- package/dist/utils/skills/cli-guidance.d.ts.map +0 -1
- package/dist/utils/skills/cli-guidance.js.map +0 -1
- package/dist/utils/skills/codex-skill.d.ts.map +0 -1
- package/dist/utils/skills/codex-skill.js.map +0 -1
- package/dist/utils/skills/cursor-rules.d.ts.map +0 -1
- package/dist/utils/skills/cursor-rules.js.map +0 -1
- package/dist/utils/staticPreviewPage.d.ts.map +0 -1
- package/dist/utils/staticPreviewPage.js.map +0 -1
- package/dist/utils/subprocessEnvironment.d.ts.map +0 -1
- package/dist/utils/subprocessEnvironment.js.map +0 -1
- package/dist/utils/variantSessionStart.d.ts.map +0 -1
- package/dist/utils/variantSessionStart.js.map +0 -1
- package/dist/utils/windowPlacement.d.ts.map +0 -1
- package/dist/utils/windowPlacement.js.map +0 -1
- package/dist/utils/writeFileAtomic.d.ts.map +0 -1
- package/dist/utils/writeFileAtomic.js.map +0 -1
- package/src/ui/dist/assets/main-CXP-A-qy.css +0 -1
- package/src/ui/dist/assets/main-CdH16hGP.js +0 -435
|
@@ -13,15 +13,12 @@ const events_1 = require("events");
|
|
|
13
13
|
const fs_1 = __importDefault(require("fs"));
|
|
14
14
|
const path_1 = __importDefault(require("path"));
|
|
15
15
|
const DependencyPreparationService_1 = require("../services/DependencyPreparationService");
|
|
16
|
-
const simple_git_1 = require("simple-git");
|
|
17
16
|
const logger_1 = require("../utils/logger");
|
|
18
17
|
const errors_1 = require("./errors");
|
|
19
|
-
const createProjectArtifacts_1 = require("./createProjectArtifacts");
|
|
20
18
|
const contracts_1 = require("./contracts");
|
|
21
19
|
const workItemBriefing_1 = require("./workItemBriefing");
|
|
22
20
|
const briefContent_1 = require("./briefContent");
|
|
23
21
|
const runLabel_1 = require("./runLabel");
|
|
24
|
-
const runPlan_1 = require("./runPlan");
|
|
25
22
|
const previewQa_1 = require("./previewQa");
|
|
26
23
|
const WorkspaceInventory_1 = require("./WorkspaceInventory");
|
|
27
24
|
const WorkspaceProvisioning_1 = require("./WorkspaceProvisioning");
|
|
@@ -29,10 +26,9 @@ const PreviewRuntime_1 = require("./PreviewRuntime");
|
|
|
29
26
|
const diffQa_1 = require("./diffQa");
|
|
30
27
|
const VariantHistoryService_1 = require("../services/VariantHistoryService");
|
|
31
28
|
const variantContext_1 = require("./variantContext");
|
|
32
|
-
const
|
|
29
|
+
const designContext_1 = require("./designContext");
|
|
33
30
|
const variantsTelemetry_1 = require("./variantsTelemetry");
|
|
34
31
|
const variantWorkspaceFiles_1 = require("./variantWorkspaceFiles");
|
|
35
|
-
const errnoCode_1 = require("../utils/errnoCode");
|
|
36
32
|
const errorMessage_1 = require("../utils/errorMessage");
|
|
37
33
|
const pathContainment_1 = require("../utils/pathContainment");
|
|
38
34
|
var variantWorkspaceFiles_2 = require("./variantWorkspaceFiles");
|
|
@@ -195,12 +191,12 @@ const isDesignCreationCodeGenInput = (input, prompt) => {
|
|
|
195
191
|
DESIGN_CREATION_SURFACE_RE.test(text));
|
|
196
192
|
};
|
|
197
193
|
class AgentVariantsOrchestrator {
|
|
194
|
+
getProjectPath;
|
|
198
195
|
store;
|
|
199
196
|
worktrees;
|
|
200
197
|
resolveEnv;
|
|
201
198
|
telemetry;
|
|
202
199
|
installDependencies;
|
|
203
|
-
materializeProject;
|
|
204
200
|
previewQaRunner;
|
|
205
201
|
variantHistory;
|
|
206
202
|
provisionTimeoutMs;
|
|
@@ -210,10 +206,10 @@ class AgentVariantsOrchestrator {
|
|
|
210
206
|
workspaceInventory;
|
|
211
207
|
workspaceProvisioning;
|
|
212
208
|
previewRuntime;
|
|
213
|
-
inflightCommits = new Map();
|
|
214
209
|
activeSessionId = null;
|
|
215
210
|
events = new events_1.EventEmitter();
|
|
216
211
|
constructor(deps) {
|
|
212
|
+
this.getProjectPath = deps.getProjectPath;
|
|
217
213
|
this.store = deps.store;
|
|
218
214
|
this.worktrees = deps.worktreeManager;
|
|
219
215
|
this.workspaceInventory = new WorkspaceInventory_1.WorkspaceInventory({
|
|
@@ -223,8 +219,6 @@ class AgentVariantsOrchestrator {
|
|
|
223
219
|
this.telemetry = deps.telemetry ?? variantsTelemetry_1.NOOP_TELEMETRY;
|
|
224
220
|
this.installDependencies =
|
|
225
221
|
deps.installDependencies ?? variantWorkspaceFiles_1.defaultInstallDependencies;
|
|
226
|
-
this.materializeProject =
|
|
227
|
-
deps.materializeProject ?? variantWorkspaceFiles_1.defaultMaterializeProject;
|
|
228
222
|
this.previewQaRunner = deps.previewQaRunner ?? defaultPreviewQaRunner;
|
|
229
223
|
this.variantHistory = deps.variantHistory ?? new VariantHistoryService_1.VariantHistoryService();
|
|
230
224
|
this.provisionTimeoutMs = deps.provisionTimeoutMs ?? PROVISION_TIMEOUT_MS;
|
|
@@ -256,16 +250,11 @@ class AgentVariantsOrchestrator {
|
|
|
256
250
|
hasUiClients: () => this.uiClientCount > 0,
|
|
257
251
|
changed: () => this.emitChange(),
|
|
258
252
|
switchPreviewPort: deps.switchPreviewPort,
|
|
259
|
-
setCommittedDevServerHealth: deps.setCommittedDevServerHealth,
|
|
260
|
-
startStaticPreviewServer: deps.startStaticPreviewServer,
|
|
261
253
|
activeVariantServerIdleTtlMs: this.activeVariantServerIdleTtlMs,
|
|
262
254
|
devServerRestartDelayMs: this.devServerRestartDelayMs,
|
|
263
255
|
});
|
|
264
256
|
}
|
|
265
257
|
propose(args) {
|
|
266
|
-
void this.previewRuntime.stopLingeringCommitted().catch((err) => {
|
|
267
|
-
log.warn('Stopping lingering committed dev servers failed', err);
|
|
268
|
-
});
|
|
269
258
|
const result = this.store.propose(args);
|
|
270
259
|
this.activeSessionId = result.sessionId;
|
|
271
260
|
this.ensureResources(result.sessionId);
|
|
@@ -360,11 +349,10 @@ class AgentVariantsOrchestrator {
|
|
|
360
349
|
: null;
|
|
361
350
|
const variants = this.getVariants(sessionId);
|
|
362
351
|
const sessionProjectContext = this.store.getProjectContext(sessionId);
|
|
363
|
-
const projectContext = (0,
|
|
352
|
+
const projectContext = (0, designContext_1.toActiveProjectContext)(sessionProjectContext);
|
|
364
353
|
const destinationPath = projectContext.kind === 'fresh'
|
|
365
354
|
? projectContext.workspacePath
|
|
366
355
|
: undefined;
|
|
367
|
-
const artifacts = (0, designContextArtifacts_1.buildSessionArtifacts)(sessionId, sessionProjectContext);
|
|
368
356
|
const hostWork = this.getHostWork(sessionId).map((item) => {
|
|
369
357
|
if ('guidance' in item) {
|
|
370
358
|
const publicItem = { ...item };
|
|
@@ -390,7 +378,6 @@ class AgentVariantsOrchestrator {
|
|
|
390
378
|
variants,
|
|
391
379
|
projectContext,
|
|
392
380
|
...(destinationPath ? { destinationPath } : {}),
|
|
393
|
-
...(artifacts.length > 0 ? { artifacts } : {}),
|
|
394
381
|
...(hostWork.length > 0 ? { hostWork } : {}),
|
|
395
382
|
...(workerRuntime ? { workerRuntime } : {}),
|
|
396
383
|
};
|
|
@@ -778,10 +765,7 @@ class AgentVariantsOrchestrator {
|
|
|
778
765
|
if (leasedWorkItemIds.length === 0)
|
|
779
766
|
return;
|
|
780
767
|
const leased = new Set(leasedWorkItemIds);
|
|
781
|
-
const
|
|
782
|
-
const projectPath = projectContext.kind === 'fresh'
|
|
783
|
-
? projectContext.workspaceRoot
|
|
784
|
-
: projectContext.projectPath;
|
|
768
|
+
const projectPath = this.getProjectPath();
|
|
785
769
|
for (const item of this.getHostWork(sessionId)) {
|
|
786
770
|
if (!leased.has(item.workId))
|
|
787
771
|
continue;
|
|
@@ -888,9 +872,6 @@ class AgentVariantsOrchestrator {
|
|
|
888
872
|
entryPath: args.entryPath,
|
|
889
873
|
isWebsite: Boolean(args.previewRoutes?.length),
|
|
890
874
|
});
|
|
891
|
-
void this.previewRuntime.stopLingeringCommitted().catch((err) => {
|
|
892
|
-
log.warn('Stopping lingering committed dev servers failed', err);
|
|
893
|
-
});
|
|
894
875
|
const created = this.store.createSessionFromStaticHistoryVariant({
|
|
895
876
|
source: args.source,
|
|
896
877
|
prompt: args.prompt ?? args.description ?? args.label,
|
|
@@ -948,9 +929,6 @@ class AgentVariantsOrchestrator {
|
|
|
948
929
|
return { sessionId, variantId: sourceVariantId };
|
|
949
930
|
}
|
|
950
931
|
}
|
|
951
|
-
getVariantPick(sessionId) {
|
|
952
|
-
return this.store.getVariantPick(sessionId);
|
|
953
|
-
}
|
|
954
932
|
refineVariant(args) {
|
|
955
933
|
this.telemetry.trackAgentVariantsRefinementRequested?.({
|
|
956
934
|
sessionId: args.sessionId,
|
|
@@ -1061,7 +1039,6 @@ class AgentVariantsOrchestrator {
|
|
|
1061
1039
|
}
|
|
1062
1040
|
const qa = resources?.qaResults.get(variant.workItemId);
|
|
1063
1041
|
const isSucceeded = variant.status === 'succeeded';
|
|
1064
|
-
const qaFailed = qa?.status === 'failed';
|
|
1065
1042
|
const canView = Boolean(preview) || (isSucceeded && Boolean(port));
|
|
1066
1043
|
const previewFailure = this.previewRuntime.getFailure(sessionId, variant.workItemId);
|
|
1067
1044
|
const previewUnavailable = !canView && isSucceeded && previewFailure
|
|
@@ -1070,13 +1047,9 @@ class AgentVariantsOrchestrator {
|
|
|
1070
1047
|
portInUse: previewFailure.portInUse || undefined,
|
|
1071
1048
|
}
|
|
1072
1049
|
: undefined;
|
|
1073
|
-
const canCommit = isSucceeded && !qaFailed;
|
|
1074
|
-
const commitDisabledReason = qaFailed
|
|
1075
|
-
? (qa?.summary ?? 'Variant failed QA')
|
|
1076
|
-
: 'Wait for a successful variant';
|
|
1077
1050
|
return {
|
|
1078
1051
|
...variant,
|
|
1079
|
-
design: (0,
|
|
1052
|
+
design: (0, designContext_1.enrichDesignSource)(variant.design),
|
|
1080
1053
|
...(preview ? { preview } : {}),
|
|
1081
1054
|
port,
|
|
1082
1055
|
...(changedFilesCount !== undefined ? { changedFilesCount } : {}),
|
|
@@ -1093,12 +1066,6 @@ class AgentVariantsOrchestrator {
|
|
|
1093
1066
|
qa,
|
|
1094
1067
|
}),
|
|
1095
1068
|
},
|
|
1096
|
-
commit: canCommit
|
|
1097
|
-
? { enabled: true }
|
|
1098
|
-
: {
|
|
1099
|
-
enabled: false,
|
|
1100
|
-
reason: commitDisabledReason,
|
|
1101
|
-
},
|
|
1102
1069
|
},
|
|
1103
1070
|
};
|
|
1104
1071
|
});
|
|
@@ -1175,14 +1142,6 @@ class AgentVariantsOrchestrator {
|
|
|
1175
1142
|
return undefined;
|
|
1176
1143
|
}
|
|
1177
1144
|
}
|
|
1178
|
-
getDesignContextMarkdown(sessionId, artifactId) {
|
|
1179
|
-
const artifact = (0, designContextArtifacts_1.findDesignContextArtifact)(this.store.getProjectContext(sessionId), artifactId);
|
|
1180
|
-
return artifact?.content;
|
|
1181
|
-
}
|
|
1182
|
-
getDesignContextViewerHtml(sessionId, artifactId) {
|
|
1183
|
-
const artifact = (0, designContextArtifacts_1.findDesignContextArtifact)(this.store.getProjectContext(sessionId), artifactId);
|
|
1184
|
-
return artifact ? (0, designContextArtifacts_1.buildDesignContextViewerDocument)(artifact) : undefined;
|
|
1185
|
-
}
|
|
1186
1145
|
hasStaticPreviewAssets(sessionId, workItemId) {
|
|
1187
1146
|
const record = this.workspaceInventory.getStaticPreview(sessionId, workItemId);
|
|
1188
1147
|
return Boolean(record?.hasAssets);
|
|
@@ -1471,8 +1430,6 @@ class AgentVariantsOrchestrator {
|
|
|
1471
1430
|
const ctx = this.store.getProjectContext(sessionId);
|
|
1472
1431
|
if (ctx.kind !== 'existing' || ctx.projectPath !== projectPath)
|
|
1473
1432
|
return null;
|
|
1474
|
-
if (this.store.getVariantPick(sessionId))
|
|
1475
|
-
return null;
|
|
1476
1433
|
const stage = this.store.getStage(sessionId);
|
|
1477
1434
|
if (stage === 'cancelled' || stage === 'failed')
|
|
1478
1435
|
return null;
|
|
@@ -1836,385 +1793,8 @@ class AgentVariantsOrchestrator {
|
|
|
1836
1793
|
sessionStage: result.sessionStage,
|
|
1837
1794
|
};
|
|
1838
1795
|
}
|
|
1839
|
-
async
|
|
1840
|
-
|
|
1841
|
-
const run = (async () => {
|
|
1842
|
-
if (prior) {
|
|
1843
|
-
await prior.catch(() => undefined);
|
|
1844
|
-
}
|
|
1845
|
-
return this.commitVariantImpl(args);
|
|
1846
|
-
})();
|
|
1847
|
-
this.inflightCommits.set(args.sessionId, run);
|
|
1848
|
-
try {
|
|
1849
|
-
return await run;
|
|
1850
|
-
}
|
|
1851
|
-
catch (error) {
|
|
1852
|
-
this.telemetry.trackAgentVariantsCommitFailed?.({
|
|
1853
|
-
sessionId: args.sessionId,
|
|
1854
|
-
targetVariantId: args.variantId,
|
|
1855
|
-
mode: 'commit',
|
|
1856
|
-
requestStatus: 'failed',
|
|
1857
|
-
failureReason: error,
|
|
1858
|
-
});
|
|
1859
|
-
throw error;
|
|
1860
|
-
}
|
|
1861
|
-
finally {
|
|
1862
|
-
if (this.inflightCommits.get(args.sessionId) === run) {
|
|
1863
|
-
this.inflightCommits.delete(args.sessionId);
|
|
1864
|
-
}
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
async commitVariantImpl(args) {
|
|
1868
|
-
const existingPick = this.store.getVariantPick(args.sessionId);
|
|
1869
|
-
if (existingPick && existingPick.variantId === args.variantId) {
|
|
1870
|
-
const projectContext = this.store.getProjectContext(args.sessionId);
|
|
1871
|
-
let historyProjectPath;
|
|
1872
|
-
if (projectContext.kind === 'fresh') {
|
|
1873
|
-
historyProjectPath = projectContext.workspacePath;
|
|
1874
|
-
}
|
|
1875
|
-
else {
|
|
1876
|
-
try {
|
|
1877
|
-
historyProjectPath = (await this.resolveEnv(args.sessionId))
|
|
1878
|
-
?.projectPath;
|
|
1879
|
-
}
|
|
1880
|
-
catch {
|
|
1881
|
-
historyProjectPath = undefined;
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
if (historyProjectPath) {
|
|
1885
|
-
void this.persistVariantHistoryAtCommit({
|
|
1886
|
-
sessionId: args.sessionId,
|
|
1887
|
-
chosenVariantId: args.variantId,
|
|
1888
|
-
projectPath: historyProjectPath,
|
|
1889
|
-
projectKind: projectContext.kind,
|
|
1890
|
-
destinationPath: existingPick.destinationPath ?? historyProjectPath,
|
|
1891
|
-
}).catch((err) => {
|
|
1892
|
-
log.warn(`persistVariantHistoryAtCommit (duplicate retry) failed for session ${args.sessionId}`, err);
|
|
1893
|
-
});
|
|
1894
|
-
}
|
|
1895
|
-
const replayPort = this.previewRuntime.getCommittedPort(args.sessionId);
|
|
1896
|
-
return {
|
|
1897
|
-
enqueued: false,
|
|
1898
|
-
duplicate: true,
|
|
1899
|
-
changedFilesCount: existingPick.changedFilesCount,
|
|
1900
|
-
payloadKind: existingPick.payload.kind === 'new-project'
|
|
1901
|
-
? 'project-created'
|
|
1902
|
-
: existingPick.payload.kind,
|
|
1903
|
-
destinationPath: existingPick.destinationPath,
|
|
1904
|
-
...(replayPort
|
|
1905
|
-
? { previewUrl: `http://${FRESH_DEV_SERVER_HOST}:${replayPort}` }
|
|
1906
|
-
: {}),
|
|
1907
|
-
};
|
|
1908
|
-
}
|
|
1909
|
-
const resources = this.resources.get(args.sessionId);
|
|
1910
|
-
if (!resources) {
|
|
1911
|
-
throw new errors_1.AgentVariantsError('SESSION_NOT_FOUND', `No live resources for session ${args.sessionId} (already torn down?)`);
|
|
1912
|
-
}
|
|
1913
|
-
const variantSnapshot = this.getVariants(args.sessionId).find((variant) => variant.workItemId === args.variantId);
|
|
1914
|
-
if (!variantSnapshot || variantSnapshot.actions?.commit?.enabled !== true) {
|
|
1915
|
-
throw new errors_1.AgentVariantsError('INVALID_STAGE_ACTION', variantSnapshot?.actions?.commit?.reason ??
|
|
1916
|
-
'Variant is not committable');
|
|
1917
|
-
}
|
|
1918
|
-
await this.settleHistoryPersists();
|
|
1919
|
-
const input = this.store.requireVariantWorkItemInput({
|
|
1920
|
-
sessionId: args.sessionId,
|
|
1921
|
-
workItemId: args.variantId,
|
|
1922
|
-
kinds: ['code_gen', 'static_preview'],
|
|
1923
|
-
});
|
|
1924
|
-
const projectContext = this.store.getProjectContext(args.sessionId);
|
|
1925
|
-
if (projectContext.kind === 'fresh') {
|
|
1926
|
-
await this.persistCompletedFreshVariantsForCommit(args.sessionId);
|
|
1927
|
-
}
|
|
1928
|
-
let payload;
|
|
1929
|
-
let envelopeDestination;
|
|
1930
|
-
let changedFilesCount;
|
|
1931
|
-
let runnablePaths;
|
|
1932
|
-
let committedPreviewPort;
|
|
1933
|
-
if (projectContext.kind === 'fresh') {
|
|
1934
|
-
const destinationPath = projectContext.workspacePath;
|
|
1935
|
-
let realDestination;
|
|
1936
|
-
try {
|
|
1937
|
-
realDestination = fs_1.default.realpathSync(destinationPath);
|
|
1938
|
-
}
|
|
1939
|
-
catch {
|
|
1940
|
-
realDestination = undefined;
|
|
1941
|
-
}
|
|
1942
|
-
const commitPolicy = (0, runPlan_1.resolveRunPlanPolicy)(projectContext).commit;
|
|
1943
|
-
const isViteApp = commitPolicy === 'materialize_project';
|
|
1944
|
-
if (isViteApp) {
|
|
1945
|
-
this.assertDestinationAvailable(destinationPath);
|
|
1946
|
-
}
|
|
1947
|
-
else {
|
|
1948
|
-
const compareBase = realDestination ?? destinationPath;
|
|
1949
|
-
const anyAssetBaseIsDestination = [
|
|
1950
|
-
...this.workspaceInventory.getStaticPreviews(args.sessionId),
|
|
1951
|
-
].some((sp) => sp.assetBase === compareBase);
|
|
1952
|
-
if (!anyAssetBaseIsDestination) {
|
|
1953
|
-
const allowed = new Set();
|
|
1954
|
-
for (const sp of this.workspaceInventory.getStaticPreviews(args.sessionId)) {
|
|
1955
|
-
if (sp.assetBase &&
|
|
1956
|
-
(0, pathContainment_1.isPathStrictlyInsideRoot)(compareBase, sp.assetBase)) {
|
|
1957
|
-
allowed.add(path_1.default.basename(sp.assetBase));
|
|
1958
|
-
}
|
|
1959
|
-
}
|
|
1960
|
-
this.assertDestinationAvailable(destinationPath, allowed);
|
|
1961
|
-
}
|
|
1962
|
-
}
|
|
1963
|
-
if (isViteApp) {
|
|
1964
|
-
const record = this.workspaceInventory.getWorktree(args.sessionId, args.variantId);
|
|
1965
|
-
if (!record) {
|
|
1966
|
-
throw new errors_1.AgentVariantsError('WORK_ITEM_NOT_FOUND', `Unknown variantId ${args.variantId} for session ${args.sessionId}`);
|
|
1967
|
-
}
|
|
1968
|
-
let usedRename = false;
|
|
1969
|
-
let isDependencyInstallRequired = false;
|
|
1970
|
-
try {
|
|
1971
|
-
if ((0, variantWorkspaceFiles_1.areSameVolume)(record.worktreePath, destinationPath)) {
|
|
1972
|
-
await this.previewRuntime.stopVariantServers(args.sessionId);
|
|
1973
|
-
isDependencyInstallRequired = await (0, variantWorkspaceFiles_1.resolveNodeModulesSymlink)(record.worktreePath);
|
|
1974
|
-
await this.renameWorktreeIntoDestination(record.worktreePath, destinationPath);
|
|
1975
|
-
usedRename = true;
|
|
1976
|
-
}
|
|
1977
|
-
else {
|
|
1978
|
-
await this.materializeProject(record.worktreePath, destinationPath);
|
|
1979
|
-
}
|
|
1980
|
-
}
|
|
1981
|
-
catch (err) {
|
|
1982
|
-
const message = (0, errorMessage_1.errorMessage)(err);
|
|
1983
|
-
throw new errors_1.AgentVariantsError('RUNTIME_VALIDATION_FAILED', `Failed to materialize vite_app variant to ${destinationPath}: ${message}`);
|
|
1984
|
-
}
|
|
1985
|
-
changedFilesCount = (0, variantWorkspaceFiles_1.countWorktreeFiles)(destinationPath);
|
|
1986
|
-
if (!usedRename) {
|
|
1987
|
-
void this.installDependencies(destinationPath)
|
|
1988
|
-
.then(() => this.previewRuntime.startCommitted({
|
|
1989
|
-
sessionId: args.sessionId,
|
|
1990
|
-
destinationPath,
|
|
1991
|
-
}))
|
|
1992
|
-
.catch((err) => {
|
|
1993
|
-
log.warn(`Background install + committed dev server start after vite_app commit failed for ${destinationPath}`, err);
|
|
1994
|
-
});
|
|
1995
|
-
}
|
|
1996
|
-
else if (isDependencyInstallRequired) {
|
|
1997
|
-
await this.installDependencies(destinationPath);
|
|
1998
|
-
}
|
|
1999
|
-
if (usedRename) {
|
|
2000
|
-
try {
|
|
2001
|
-
runnablePaths = this.preserveUnchosenVariants({
|
|
2002
|
-
sessionId: args.sessionId,
|
|
2003
|
-
chosenVariantId: args.variantId,
|
|
2004
|
-
destinationPath,
|
|
2005
|
-
});
|
|
2006
|
-
}
|
|
2007
|
-
catch (err) {
|
|
2008
|
-
log.warn(`preserveUnchosenVariants failed for session ${args.sessionId}; continuing without history`, err);
|
|
2009
|
-
}
|
|
2010
|
-
committedPreviewPort = await this.previewRuntime.startCommitted({
|
|
2011
|
-
sessionId: args.sessionId,
|
|
2012
|
-
destinationPath,
|
|
2013
|
-
mode: 'vite_app',
|
|
2014
|
-
});
|
|
2015
|
-
}
|
|
2016
|
-
payload = {
|
|
2017
|
-
kind: 'project-created',
|
|
2018
|
-
destinationPath,
|
|
2019
|
-
changedFilesCount,
|
|
2020
|
-
note: usedRename
|
|
2021
|
-
? 'Vite app moved to destinationPath (rename); node_modules came along.'
|
|
2022
|
-
: 'Vite app materialized at destinationPath; `npm install` running in the background.',
|
|
2023
|
-
};
|
|
2024
|
-
envelopeDestination = destinationPath;
|
|
2025
|
-
}
|
|
2026
|
-
else {
|
|
2027
|
-
const staticPreview = this.workspaceInventory.getStaticPreview(args.sessionId, args.variantId);
|
|
2028
|
-
const htmlFromDir = staticPreview
|
|
2029
|
-
? this.getStaticPreviewHtml(args.sessionId, args.variantId)
|
|
2030
|
-
: undefined;
|
|
2031
|
-
const htmlFromSnapshot = await this.variantHistory.readStaticPreview({
|
|
2032
|
-
projectPath: projectContext.workspacePath,
|
|
2033
|
-
sessionId: args.sessionId,
|
|
2034
|
-
variantId: args.variantId,
|
|
2035
|
-
});
|
|
2036
|
-
if (!staticPreview && !htmlFromSnapshot) {
|
|
2037
|
-
throw new errors_1.AgentVariantsError('INVALID_STAGE_ACTION', `No static preview found for variant ${args.variantId} — wait for report_variant_complete(succeeded) first`);
|
|
2038
|
-
}
|
|
2039
|
-
try {
|
|
2040
|
-
fs_1.default.mkdirSync(destinationPath, { recursive: true });
|
|
2041
|
-
let flattenBase = realDestination;
|
|
2042
|
-
if (!flattenBase) {
|
|
2043
|
-
try {
|
|
2044
|
-
flattenBase = fs_1.default.realpathSync(destinationPath);
|
|
2045
|
-
}
|
|
2046
|
-
catch {
|
|
2047
|
-
flattenBase = destinationPath;
|
|
2048
|
-
}
|
|
2049
|
-
}
|
|
2050
|
-
const chosenAssetBase = staticPreview?.assetBase;
|
|
2051
|
-
if (chosenAssetBase &&
|
|
2052
|
-
(0, pathContainment_1.isPathStrictlyInsideRoot)(flattenBase, chosenAssetBase)) {
|
|
2053
|
-
for (const entry of fs_1.default.readdirSync(chosenAssetBase)) {
|
|
2054
|
-
const src = path_1.default.join(chosenAssetBase, entry);
|
|
2055
|
-
const dst = path_1.default.join(flattenBase, entry);
|
|
2056
|
-
if (path_1.default.resolve(dst) === path_1.default.resolve(chosenAssetBase)) {
|
|
2057
|
-
continue;
|
|
2058
|
-
}
|
|
2059
|
-
if (fs_1.default.existsSync(dst)) {
|
|
2060
|
-
fs_1.default.rmSync(dst, { recursive: true, force: true });
|
|
2061
|
-
}
|
|
2062
|
-
try {
|
|
2063
|
-
fs_1.default.renameSync(src, dst);
|
|
2064
|
-
}
|
|
2065
|
-
catch (err) {
|
|
2066
|
-
if ((0, errnoCode_1.errnoCode)(err) !== 'EXDEV')
|
|
2067
|
-
throw err;
|
|
2068
|
-
fs_1.default.cpSync(src, dst, { recursive: true });
|
|
2069
|
-
fs_1.default.rmSync(src, { recursive: true, force: true });
|
|
2070
|
-
}
|
|
2071
|
-
}
|
|
2072
|
-
fs_1.default.rmSync(chosenAssetBase, { recursive: true, force: true });
|
|
2073
|
-
}
|
|
2074
|
-
for (const other of this.workspaceInventory.getStaticPreviews(args.sessionId)) {
|
|
2075
|
-
if (other.workItemId === args.variantId)
|
|
2076
|
-
continue;
|
|
2077
|
-
if (other.assetBase &&
|
|
2078
|
-
(0, pathContainment_1.isPathStrictlyInsideRoot)(flattenBase, other.assetBase)) {
|
|
2079
|
-
fs_1.default.rmSync(other.assetBase, { recursive: true, force: true });
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
fs_1.default.writeFileSync(path_1.default.join(destinationPath, 'index.html'), htmlFromDir ?? htmlFromSnapshot ?? '', 'utf8');
|
|
2083
|
-
}
|
|
2084
|
-
catch (err) {
|
|
2085
|
-
const message = (0, errorMessage_1.errorMessage)(err);
|
|
2086
|
-
throw new errors_1.AgentVariantsError('RUNTIME_VALIDATION_FAILED', `Failed to write static preview to ${destinationPath}: ${message}`);
|
|
2087
|
-
}
|
|
2088
|
-
changedFilesCount = (0, variantWorkspaceFiles_1.countWorktreeFiles)(destinationPath);
|
|
2089
|
-
committedPreviewPort = await this.previewRuntime.startCommitted({
|
|
2090
|
-
sessionId: args.sessionId,
|
|
2091
|
-
destinationPath,
|
|
2092
|
-
mode: 'static_preview',
|
|
2093
|
-
});
|
|
2094
|
-
payload = {
|
|
2095
|
-
kind: 'project-created',
|
|
2096
|
-
destinationPath,
|
|
2097
|
-
changedFilesCount,
|
|
2098
|
-
note: 'Static preview written to index.html at destinationPath.',
|
|
2099
|
-
};
|
|
2100
|
-
envelopeDestination = destinationPath;
|
|
2101
|
-
}
|
|
2102
|
-
}
|
|
2103
|
-
else {
|
|
2104
|
-
const env = await this.resolveEnv(args.sessionId);
|
|
2105
|
-
const record = this.workspaceInventory.getWorktree(args.sessionId, args.variantId);
|
|
2106
|
-
const saved = record
|
|
2107
|
-
? null
|
|
2108
|
-
: await this.getSavedVariant({
|
|
2109
|
-
projectPath: env.projectPath,
|
|
2110
|
-
sessionId: args.sessionId,
|
|
2111
|
-
variantId: args.variantId,
|
|
2112
|
-
});
|
|
2113
|
-
const diff = record?.diff ?? saved?.diff;
|
|
2114
|
-
if (!record && !saved) {
|
|
2115
|
-
throw new errors_1.AgentVariantsError('WORK_ITEM_NOT_FOUND', `Unknown variantId ${args.variantId} for session ${args.sessionId}`);
|
|
2116
|
-
}
|
|
2117
|
-
if (diff === undefined) {
|
|
2118
|
-
throw new errors_1.AgentVariantsError('INVALID_STAGE_ACTION', `Variant ${args.variantId} has no captured diff yet — wait for report_variant_complete(succeeded) first`);
|
|
2119
|
-
}
|
|
2120
|
-
changedFilesCount = (0, variantWorkspaceFiles_1.countDiffFiles)(diff);
|
|
2121
|
-
if (!this.worktrees.applyDiffToProject) {
|
|
2122
|
-
throw new errors_1.AgentVariantsError('RUNTIME_VALIDATION_FAILED', 'WorktreeManager does not support applying diffs to the project tree');
|
|
2123
|
-
}
|
|
2124
|
-
try {
|
|
2125
|
-
await this.worktrees.applyDiffToProject(diff, env.projectPath);
|
|
2126
|
-
}
|
|
2127
|
-
catch (err) {
|
|
2128
|
-
const message = (0, errorMessage_1.errorMessage)(err);
|
|
2129
|
-
throw new errors_1.AgentVariantsError('RUNTIME_VALIDATION_FAILED', `Failed to apply variant ${args.variantId} to ${env.projectPath}: ${message}`);
|
|
2130
|
-
}
|
|
2131
|
-
payload = {
|
|
2132
|
-
kind: 'diff-applied',
|
|
2133
|
-
diff,
|
|
2134
|
-
target: input.target,
|
|
2135
|
-
changedFilesCount,
|
|
2136
|
-
note: "Variant diff applied to the user's working tree (uncommitted).",
|
|
2137
|
-
};
|
|
2138
|
-
envelopeDestination = env.projectPath;
|
|
2139
|
-
}
|
|
2140
|
-
const envelope = {
|
|
2141
|
-
sourceSessionId: args.sessionId,
|
|
2142
|
-
variantId: args.variantId,
|
|
2143
|
-
variantLabel: input.briefLabel,
|
|
2144
|
-
destinationPath: envelopeDestination,
|
|
2145
|
-
changedFilesCount,
|
|
2146
|
-
payload,
|
|
2147
|
-
};
|
|
2148
|
-
this.store.recordVariantPick({
|
|
2149
|
-
sessionId: args.sessionId,
|
|
2150
|
-
envelope,
|
|
2151
|
-
});
|
|
2152
|
-
const historyProjectPath = projectContext.kind === 'fresh'
|
|
2153
|
-
? projectContext.workspacePath
|
|
2154
|
-
: envelopeDestination;
|
|
2155
|
-
try {
|
|
2156
|
-
await this.persistVariantHistoryAtCommit({
|
|
2157
|
-
sessionId: args.sessionId,
|
|
2158
|
-
chosenVariantId: args.variantId,
|
|
2159
|
-
projectPath: historyProjectPath,
|
|
2160
|
-
projectKind: projectContext.kind,
|
|
2161
|
-
destinationPath: envelopeDestination,
|
|
2162
|
-
runnablePaths,
|
|
2163
|
-
});
|
|
2164
|
-
}
|
|
2165
|
-
catch (err) {
|
|
2166
|
-
log.warn(`persistVariantHistoryAtCommit failed for session ${args.sessionId}`, err);
|
|
2167
|
-
}
|
|
2168
|
-
resources.committedVariantIds.add(args.variantId);
|
|
2169
|
-
if (this.activeSessionId === args.sessionId &&
|
|
2170
|
-
payload.kind !== 'project-created') {
|
|
2171
|
-
this.activeSessionId = null;
|
|
2172
|
-
}
|
|
2173
|
-
const dwellMsFromTerminal = resources.terminalAt
|
|
2174
|
-
? Date.now() - resources.terminalAt
|
|
2175
|
-
: null;
|
|
2176
|
-
this.telemetry.track('agent_variants.committed', {
|
|
2177
|
-
source: 'mcp',
|
|
2178
|
-
sessionId: args.sessionId,
|
|
2179
|
-
workItemId: args.variantId,
|
|
2180
|
-
payloadKind: payload.kind,
|
|
2181
|
-
changedFilesCount,
|
|
2182
|
-
dwellMsFromTerminal,
|
|
2183
|
-
isFresh: projectContext.kind === 'fresh',
|
|
2184
|
-
});
|
|
2185
|
-
this.emitChange();
|
|
2186
|
-
log.info(`Variant ${args.variantId} (${input.briefLabel}) committed by user`);
|
|
2187
|
-
if (!args.skipTeardown) {
|
|
2188
|
-
void this.teardownSession(args.sessionId, 'committed').catch((err) => {
|
|
2189
|
-
log.warn(`teardownSession after commit failed for ${args.sessionId}`, err);
|
|
2190
|
-
});
|
|
2191
|
-
}
|
|
2192
|
-
return {
|
|
2193
|
-
enqueued: true,
|
|
2194
|
-
duplicate: false,
|
|
2195
|
-
changedFilesCount,
|
|
2196
|
-
payloadKind: payload.kind,
|
|
2197
|
-
destinationPath: envelopeDestination,
|
|
2198
|
-
...(committedPreviewPort
|
|
2199
|
-
? {
|
|
2200
|
-
previewUrl: `http://${FRESH_DEV_SERVER_HOST}:${committedPreviewPort}`,
|
|
2201
|
-
}
|
|
2202
|
-
: {}),
|
|
2203
|
-
};
|
|
2204
|
-
}
|
|
2205
|
-
async cleanupCommittedSession(sessionId) {
|
|
2206
|
-
await this.teardownSession(sessionId, 'committed');
|
|
2207
|
-
}
|
|
2208
|
-
assertDestinationAvailable(destinationPath, additionalAllowedEntries = new Set()) {
|
|
2209
|
-
if (!fs_1.default.existsSync(destinationPath))
|
|
2210
|
-
return;
|
|
2211
|
-
const entries = fs_1.default.readdirSync(destinationPath);
|
|
2212
|
-
const userVisibleEntries = entries.filter((entry) => entry !== '.rivet' &&
|
|
2213
|
-
entry !== '.gitignore' &&
|
|
2214
|
-
!additionalAllowedEntries.has(entry));
|
|
2215
|
-
if (userVisibleEntries.length === 0)
|
|
2216
|
-
return;
|
|
2217
|
-
throw new errors_1.AgentVariantsError('DESTINATION_NOT_EMPTY', `Destination ${destinationPath} is not empty (${userVisibleEntries.length} entries) — refuse to materialize.`);
|
|
1796
|
+
async cleanupSession(sessionId) {
|
|
1797
|
+
await this.teardownSession(sessionId, 'shutdown');
|
|
2218
1798
|
}
|
|
2219
1799
|
getVariantDiff(sessionId, variantId) {
|
|
2220
1800
|
return this.workspaceInventory.getWorktree(sessionId, variantId)?.diff;
|
|
@@ -2938,7 +2518,7 @@ class AgentVariantsOrchestrator {
|
|
|
2938
2518
|
kinds: ['static_preview', 'code_gen'],
|
|
2939
2519
|
});
|
|
2940
2520
|
const sessionPrompt = this.store.getPrompt(args.sessionId);
|
|
2941
|
-
const designArtifact = (0,
|
|
2521
|
+
const designArtifact = (0, designContext_1.resolveDesignArtifact)(input.designContextEntry);
|
|
2942
2522
|
const worktreeRecord = this.workspaceInventory.getWorktree(args.sessionId, args.workItemId);
|
|
2943
2523
|
const staticPreview = this.workspaceInventory.getStaticPreview(args.sessionId, args.workItemId);
|
|
2944
2524
|
let sourceDir = null;
|
|
@@ -3058,52 +2638,6 @@ class AgentVariantsOrchestrator {
|
|
|
3058
2638
|
}
|
|
3059
2639
|
}
|
|
3060
2640
|
}
|
|
3061
|
-
async persistCompletedFreshVariantsForCommit(sessionId) {
|
|
3062
|
-
const projectContext = this.store.getProjectContext(sessionId);
|
|
3063
|
-
if (projectContext.kind !== 'fresh')
|
|
3064
|
-
return;
|
|
3065
|
-
const variants = this.store
|
|
3066
|
-
.getVariants(sessionId)
|
|
3067
|
-
.filter((variant) => variant.status === 'succeeded');
|
|
3068
|
-
for (const variant of variants) {
|
|
3069
|
-
try {
|
|
3070
|
-
await this.persistCompletedArtifactVariant({
|
|
3071
|
-
sessionId,
|
|
3072
|
-
workItemId: variant.workItemId,
|
|
3073
|
-
});
|
|
3074
|
-
}
|
|
3075
|
-
catch (err) {
|
|
3076
|
-
log.warn(`persistCompletedFreshVariantsForCommit failed for ${sessionId}/${variant.workItemId}`, err);
|
|
3077
|
-
}
|
|
3078
|
-
}
|
|
3079
|
-
}
|
|
3080
|
-
async persistVariantHistoryAtCommit(args) {
|
|
3081
|
-
const variants = this.store.getVariants(args.sessionId);
|
|
3082
|
-
for (const variant of variants) {
|
|
3083
|
-
if (variant.status !== 'succeeded')
|
|
3084
|
-
continue;
|
|
3085
|
-
const workItemId = variant.workItemId;
|
|
3086
|
-
const isChosen = workItemId === args.chosenVariantId;
|
|
3087
|
-
const status = isChosen
|
|
3088
|
-
? 'committed'
|
|
3089
|
-
: 'rejected';
|
|
3090
|
-
const saved = isChosen
|
|
3091
|
-
? await this.getSavedVariant({
|
|
3092
|
-
projectPath: args.projectPath,
|
|
3093
|
-
sessionId: args.sessionId,
|
|
3094
|
-
variantId: workItemId,
|
|
3095
|
-
})
|
|
3096
|
-
: null;
|
|
3097
|
-
await this.variantHistory.markStatus({
|
|
3098
|
-
projectPath: args.projectPath,
|
|
3099
|
-
sessionId: saved?.manifest.sessionId ?? args.sessionId,
|
|
3100
|
-
variantId: saved?.manifest.variantId ?? workItemId,
|
|
3101
|
-
status,
|
|
3102
|
-
destinationPath: isChosen ? args.destinationPath : undefined,
|
|
3103
|
-
runnablePath: args.runnablePaths?.get(workItemId),
|
|
3104
|
-
});
|
|
3105
|
-
}
|
|
3106
|
-
}
|
|
3107
2641
|
async markPersistedVariantsCancelled(sessionId) {
|
|
3108
2642
|
if (!this.store.hasSession(sessionId))
|
|
3109
2643
|
return;
|
|
@@ -3186,180 +2720,6 @@ class AgentVariantsOrchestrator {
|
|
|
3186
2720
|
return undefined;
|
|
3187
2721
|
}
|
|
3188
2722
|
}
|
|
3189
|
-
preserveUnchosenVariants(args) {
|
|
3190
|
-
const resources = this.resources.get(args.sessionId);
|
|
3191
|
-
const runnablePaths = new Map();
|
|
3192
|
-
if (!resources)
|
|
3193
|
-
return runnablePaths;
|
|
3194
|
-
const destinationParent = path_1.default.dirname(args.destinationPath);
|
|
3195
|
-
const projectSlug = path_1.default.basename(args.destinationPath);
|
|
3196
|
-
const historyDir = (0, createProjectArtifacts_1.createVariantsHistoryPath)(destinationParent, projectSlug);
|
|
3197
|
-
const briefs = this.store.getBriefs(args.sessionId);
|
|
3198
|
-
const variants = this.store.getVariants(args.sessionId);
|
|
3199
|
-
const briefIndexById = new Map(briefs.map((b, i) => [b.briefId, i]));
|
|
3200
|
-
const manifestEntries = [];
|
|
3201
|
-
let chosenSlug = '';
|
|
3202
|
-
for (const variant of variants) {
|
|
3203
|
-
const input = this.store.getVariantWorkItemInput(args.sessionId, variant.workItemId);
|
|
3204
|
-
const label = input?.briefLabel ?? variant.label ?? 'variant';
|
|
3205
|
-
const slug = (0, createProjectArtifacts_1.createProjectVariantSlug)(label);
|
|
3206
|
-
const briefIdx = briefIndexById.get(variant.briefId) ?? 0;
|
|
3207
|
-
const numericPrefix = String(briefIdx + 1).padStart(2, '0');
|
|
3208
|
-
const folderName = `${numericPrefix}-${slug}`;
|
|
3209
|
-
if (variant.workItemId === args.chosenVariantId) {
|
|
3210
|
-
chosenSlug = slug;
|
|
3211
|
-
runnablePaths.set(variant.workItemId, projectSlug);
|
|
3212
|
-
manifestEntries.push({
|
|
3213
|
-
variantId: variant.workItemId,
|
|
3214
|
-
label,
|
|
3215
|
-
slug,
|
|
3216
|
-
folder: null,
|
|
3217
|
-
isChosen: true,
|
|
3218
|
-
chosenPath: `../${projectSlug}`,
|
|
3219
|
-
});
|
|
3220
|
-
continue;
|
|
3221
|
-
}
|
|
3222
|
-
const record = this.workspaceInventory.getWorktree(args.sessionId, variant.workItemId);
|
|
3223
|
-
if (!record) {
|
|
3224
|
-
manifestEntries.push({
|
|
3225
|
-
variantId: variant.workItemId,
|
|
3226
|
-
label,
|
|
3227
|
-
slug,
|
|
3228
|
-
folder: null,
|
|
3229
|
-
isChosen: false,
|
|
3230
|
-
});
|
|
3231
|
-
continue;
|
|
3232
|
-
}
|
|
3233
|
-
if (!fs_1.default.existsSync(record.worktreePath)) {
|
|
3234
|
-
manifestEntries.push({
|
|
3235
|
-
variantId: variant.workItemId,
|
|
3236
|
-
label,
|
|
3237
|
-
slug,
|
|
3238
|
-
folder: null,
|
|
3239
|
-
isChosen: false,
|
|
3240
|
-
});
|
|
3241
|
-
continue;
|
|
3242
|
-
}
|
|
3243
|
-
try {
|
|
3244
|
-
const newPath = this.worktrees.moveWorktreeToHistory
|
|
3245
|
-
? this.worktrees.moveWorktreeToHistory(record.worktreePath, historyDir, folderName)
|
|
3246
|
-
: (() => {
|
|
3247
|
-
fs_1.default.mkdirSync(historyDir, { recursive: true });
|
|
3248
|
-
const dest = path_1.default.join(historyDir, folderName);
|
|
3249
|
-
fs_1.default.renameSync(record.worktreePath, dest);
|
|
3250
|
-
return dest;
|
|
3251
|
-
})();
|
|
3252
|
-
record.worktreePath = newPath;
|
|
3253
|
-
runnablePaths.set(variant.workItemId, `${path_1.default.basename(historyDir)}/${folderName}`);
|
|
3254
|
-
manifestEntries.push({
|
|
3255
|
-
variantId: variant.workItemId,
|
|
3256
|
-
label,
|
|
3257
|
-
slug,
|
|
3258
|
-
folder: folderName,
|
|
3259
|
-
isChosen: false,
|
|
3260
|
-
});
|
|
3261
|
-
}
|
|
3262
|
-
catch (err) {
|
|
3263
|
-
log.warn(`moveWorktreeToHistory failed for variant ${variant.workItemId}`, err);
|
|
3264
|
-
manifestEntries.push({
|
|
3265
|
-
variantId: variant.workItemId,
|
|
3266
|
-
label,
|
|
3267
|
-
slug,
|
|
3268
|
-
folder: null,
|
|
3269
|
-
isChosen: false,
|
|
3270
|
-
});
|
|
3271
|
-
}
|
|
3272
|
-
}
|
|
3273
|
-
const manifest = {
|
|
3274
|
-
schemaVersion: createProjectArtifacts_1.CREATE_PROJECT_MANIFEST_SCHEMA_VERSION,
|
|
3275
|
-
createdAt: new Date().toISOString(),
|
|
3276
|
-
sessionId: args.sessionId,
|
|
3277
|
-
chosenVariantId: args.chosenVariantId,
|
|
3278
|
-
chosenSlug: chosenSlug || projectSlug,
|
|
3279
|
-
variants: manifestEntries,
|
|
3280
|
-
};
|
|
3281
|
-
try {
|
|
3282
|
-
(0, createProjectArtifacts_1.writeCreateProjectManifestFile)((0, createProjectArtifacts_1.createVariantsHistoryManifestPath)(destinationParent, projectSlug), manifest);
|
|
3283
|
-
}
|
|
3284
|
-
catch (err) {
|
|
3285
|
-
log.warn(`Writing variants history manifest failed for ${historyDir}`, err);
|
|
3286
|
-
}
|
|
3287
|
-
this.workspaceInventory.preserveViteSibling(args.sessionId);
|
|
3288
|
-
return runnablePaths;
|
|
3289
|
-
}
|
|
3290
|
-
async renameWorktreeIntoDestination(sourceWorktreePath, destinationPath) {
|
|
3291
|
-
const destinationParent = path_1.default.dirname(destinationPath);
|
|
3292
|
-
await fs_1.default.promises.mkdir(destinationParent, { recursive: true });
|
|
3293
|
-
let preservedRivetParent;
|
|
3294
|
-
const existingRivetPath = path_1.default.join(destinationPath, '.rivet');
|
|
3295
|
-
if (fs_1.default.existsSync(destinationPath)) {
|
|
3296
|
-
preservedRivetParent = await fs_1.default.promises.mkdtemp(path_1.default.join(destinationParent, '.rivet-preserve-'));
|
|
3297
|
-
if (fs_1.default.existsSync(existingRivetPath)) {
|
|
3298
|
-
await fs_1.default.promises.rename(existingRivetPath, path_1.default.join(preservedRivetParent, '.rivet'));
|
|
3299
|
-
}
|
|
3300
|
-
await fs_1.default.promises.rm(destinationPath, { recursive: true, force: true });
|
|
3301
|
-
}
|
|
3302
|
-
try {
|
|
3303
|
-
await fs_1.default.promises.rename(sourceWorktreePath, destinationPath);
|
|
3304
|
-
}
|
|
3305
|
-
catch (err) {
|
|
3306
|
-
if (preservedRivetParent && !fs_1.default.existsSync(destinationPath)) {
|
|
3307
|
-
await fs_1.default.promises.mkdir(destinationPath, { recursive: true });
|
|
3308
|
-
const preservedRivetPath = path_1.default.join(preservedRivetParent, '.rivet');
|
|
3309
|
-
if (fs_1.default.existsSync(preservedRivetPath)) {
|
|
3310
|
-
await fs_1.default.promises.rename(preservedRivetPath, existingRivetPath);
|
|
3311
|
-
}
|
|
3312
|
-
}
|
|
3313
|
-
throw err;
|
|
3314
|
-
}
|
|
3315
|
-
if (preservedRivetParent) {
|
|
3316
|
-
const preservedRivetPath = path_1.default.join(preservedRivetParent, '.rivet');
|
|
3317
|
-
if (fs_1.default.existsSync(preservedRivetPath)) {
|
|
3318
|
-
if (fs_1.default.existsSync(existingRivetPath)) {
|
|
3319
|
-
await fs_1.default.promises.cp(preservedRivetPath, existingRivetPath, {
|
|
3320
|
-
recursive: true,
|
|
3321
|
-
force: true,
|
|
3322
|
-
});
|
|
3323
|
-
await fs_1.default.promises.rm(preservedRivetPath, {
|
|
3324
|
-
recursive: true,
|
|
3325
|
-
force: true,
|
|
3326
|
-
});
|
|
3327
|
-
}
|
|
3328
|
-
else {
|
|
3329
|
-
await fs_1.default.promises.rename(preservedRivetPath, existingRivetPath);
|
|
3330
|
-
}
|
|
3331
|
-
}
|
|
3332
|
-
await fs_1.default.promises.rm(preservedRivetParent, {
|
|
3333
|
-
recursive: true,
|
|
3334
|
-
force: true,
|
|
3335
|
-
});
|
|
3336
|
-
}
|
|
3337
|
-
const dotGit = path_1.default.join(destinationPath, '.git');
|
|
3338
|
-
try {
|
|
3339
|
-
fs_1.default.rmSync(dotGit, { recursive: true, force: true });
|
|
3340
|
-
}
|
|
3341
|
-
catch { }
|
|
3342
|
-
try {
|
|
3343
|
-
const git = (0, simple_git_1.simpleGit)(destinationPath);
|
|
3344
|
-
await git.raw(['init']);
|
|
3345
|
-
await git.raw(['add', '-A']);
|
|
3346
|
-
await git
|
|
3347
|
-
.raw([
|
|
3348
|
-
'-c',
|
|
3349
|
-
'user.name=Rivet',
|
|
3350
|
-
'-c',
|
|
3351
|
-
'user.email=hello@tryrivet.design',
|
|
3352
|
-
'commit',
|
|
3353
|
-
'--no-gpg-sign',
|
|
3354
|
-
'-m',
|
|
3355
|
-
'Initial commit (created with Rivet)',
|
|
3356
|
-
])
|
|
3357
|
-
.catch(() => { });
|
|
3358
|
-
}
|
|
3359
|
-
catch (err) {
|
|
3360
|
-
log.warn(`Initial git history setup at ${destinationPath} failed`, err);
|
|
3361
|
-
}
|
|
3362
|
-
}
|
|
3363
2723
|
async teardownSession(sessionId, reason) {
|
|
3364
2724
|
const resources = this.resources.get(sessionId);
|
|
3365
2725
|
if (!resources)
|
|
@@ -3374,17 +2734,8 @@ class AgentVariantsOrchestrator {
|
|
|
3374
2734
|
this.settleHistoryPersists(),
|
|
3375
2735
|
new Promise((resolve) => setTimeout(resolve, SETTLE_PERSISTS_TEARDOWN_TIMEOUT_MS)),
|
|
3376
2736
|
]);
|
|
3377
|
-
await this.previewRuntime.closeSession(sessionId
|
|
3378
|
-
|
|
3379
|
-
try {
|
|
3380
|
-
isFresh = this.store.getProjectContext(sessionId).kind === 'fresh';
|
|
3381
|
-
}
|
|
3382
|
-
catch { }
|
|
3383
|
-
await this.workspaceInventory.disposeAssignments({
|
|
3384
|
-
sessionId,
|
|
3385
|
-
isFresh,
|
|
3386
|
-
isCommitted: reason === 'committed',
|
|
3387
|
-
});
|
|
2737
|
+
await this.previewRuntime.closeSession(sessionId);
|
|
2738
|
+
await this.workspaceInventory.disposeAssignments({ sessionId });
|
|
3388
2739
|
this.resources.delete(sessionId);
|
|
3389
2740
|
}
|
|
3390
2741
|
ensureResources(sessionId) {
|
|
@@ -3392,7 +2743,6 @@ class AgentVariantsOrchestrator {
|
|
|
3392
2743
|
if (!r) {
|
|
3393
2744
|
r = {
|
|
3394
2745
|
sessionId,
|
|
3395
|
-
committedVariantIds: new Set(),
|
|
3396
2746
|
startedAt: Date.now(),
|
|
3397
2747
|
nextRoundIndex: 0,
|
|
3398
2748
|
rounds: new Map(),
|