rivet-design 0.17.3 → 0.17.5
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/bin/rivet.js +0 -16
- package/dist/agent-variants/SessionStore.d.ts +0 -239
- package/dist/agent-variants/SessionStore.d.ts.map +1 -1
- package/dist/agent-variants/SessionStore.js +10 -368
- package/dist/agent-variants/SessionStore.js.map +1 -1
- package/dist/agent-variants/VariantWorkspaceManager.d.ts +0 -10
- package/dist/agent-variants/VariantWorkspaceManager.d.ts.map +1 -1
- package/dist/agent-variants/VariantWorkspaceManager.js +0 -17
- package/dist/agent-variants/VariantWorkspaceManager.js.map +1 -1
- package/dist/agent-variants/WorkerExecutorService.d.ts +1 -105
- package/dist/agent-variants/WorkerExecutorService.d.ts.map +1 -1
- package/dist/agent-variants/WorkerExecutorService.js +11 -182
- package/dist/agent-variants/WorkerExecutorService.js.map +1 -1
- package/dist/agent-variants/WorktreeOrchestrator.d.ts +9 -611
- package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
- package/dist/agent-variants/WorktreeOrchestrator.js +111 -1468
- package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -1
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts +0 -7
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +1 -1
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js +2 -25
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js.map +1 -1
- package/dist/agent-variants/briefContent.d.ts +0 -11
- package/dist/agent-variants/briefContent.d.ts.map +1 -1
- package/dist/agent-variants/briefContent.js +0 -12
- package/dist/agent-variants/briefContent.js.map +1 -1
- package/dist/agent-variants/contextAssets.d.ts +0 -3
- package/dist/agent-variants/contextAssets.d.ts.map +1 -1
- package/dist/agent-variants/contextAssets.js +0 -3
- package/dist/agent-variants/contextAssets.js.map +1 -1
- package/dist/agent-variants/contracts.d.ts +5 -493
- package/dist/agent-variants/contracts.d.ts.map +1 -1
- package/dist/agent-variants/contracts.js +2 -167
- package/dist/agent-variants/contracts.js.map +1 -1
- package/dist/agent-variants/createProjectArtifacts.d.ts +0 -17
- package/dist/agent-variants/createProjectArtifacts.d.ts.map +1 -1
- package/dist/agent-variants/createProjectArtifacts.js +0 -10
- package/dist/agent-variants/createProjectArtifacts.js.map +1 -1
- package/dist/agent-variants/diffQa.d.ts +0 -1
- package/dist/agent-variants/diffQa.d.ts.map +1 -1
- package/dist/agent-variants/diffQa.js +0 -1
- package/dist/agent-variants/diffQa.js.map +1 -1
- package/dist/agent-variants/directionAuthoring.d.ts +0 -13
- package/dist/agent-variants/directionAuthoring.d.ts.map +1 -1
- package/dist/agent-variants/directionAuthoring.js +12 -46
- package/dist/agent-variants/directionAuthoring.js.map +1 -1
- package/dist/agent-variants/elementRefToTarget.d.ts +0 -17
- package/dist/agent-variants/elementRefToTarget.d.ts.map +1 -1
- package/dist/agent-variants/elementRefToTarget.js +0 -17
- package/dist/agent-variants/elementRefToTarget.js.map +1 -1
- package/dist/agent-variants/generatedDestination.d.ts +0 -3
- package/dist/agent-variants/generatedDestination.d.ts.map +1 -1
- package/dist/agent-variants/generatedDestination.js +0 -3
- package/dist/agent-variants/generatedDestination.js.map +1 -1
- package/dist/agent-variants/previewQa.d.ts +0 -6
- package/dist/agent-variants/previewQa.d.ts.map +1 -1
- package/dist/agent-variants/previewQa.js +0 -5
- package/dist/agent-variants/previewQa.js.map +1 -1
- package/dist/agent-variants/runLabel.d.ts +0 -15
- package/dist/agent-variants/runLabel.d.ts.map +1 -1
- package/dist/agent-variants/runLabel.js +0 -19
- package/dist/agent-variants/runLabel.js.map +1 -1
- package/dist/agent-variants/runPlan.d.ts +3 -84
- package/dist/agent-variants/runPlan.d.ts.map +1 -1
- package/dist/agent-variants/runPlan.js +0 -51
- package/dist/agent-variants/runPlan.js.map +1 -1
- package/dist/agent-variants/sourceContext.d.ts +0 -10
- package/dist/agent-variants/sourceContext.d.ts.map +1 -1
- package/dist/agent-variants/sourceContext.js +0 -36
- package/dist/agent-variants/sourceContext.js.map +1 -1
- package/dist/agent-variants/variantContext.d.ts +0 -6
- package/dist/agent-variants/variantContext.d.ts.map +1 -1
- package/dist/agent-variants/variantContext.js +0 -9
- package/dist/agent-variants/variantContext.js.map +1 -1
- package/dist/agent-variants/videoKeyframes.d.ts +0 -7
- package/dist/agent-variants/videoKeyframes.d.ts.map +1 -1
- package/dist/agent-variants/videoKeyframes.js +0 -7
- package/dist/agent-variants/videoKeyframes.js.map +1 -1
- package/dist/agent-variants/workItemBriefing.d.ts +0 -21
- package/dist/agent-variants/workItemBriefing.d.ts.map +1 -1
- package/dist/agent-variants/workItemBriefing.js +0 -49
- package/dist/agent-variants/workItemBriefing.js.map +1 -1
- package/dist/agent-variants/workerRuntime.d.ts +1 -137
- package/dist/agent-variants/workerRuntime.d.ts.map +1 -1
- package/dist/agent-variants/workerRuntime.js +8 -147
- package/dist/agent-variants/workerRuntime.js.map +1 -1
- package/dist/cli/browser.d.ts +0 -1
- package/dist/cli/browser.d.ts.map +1 -1
- package/dist/cli/browser.js +0 -1
- package/dist/cli/browser.js.map +1 -1
- package/dist/cli/callerRunnerPaths.d.ts +0 -50
- package/dist/cli/callerRunnerPaths.d.ts.map +1 -1
- package/dist/cli/callerRunnerPaths.js +0 -59
- package/dist/cli/callerRunnerPaths.js.map +1 -1
- package/dist/cli/client.d.ts +0 -18
- package/dist/cli/client.d.ts.map +1 -1
- package/dist/cli/client.js +0 -28
- package/dist/cli/client.js.map +1 -1
- package/dist/cli/commandNames.d.ts +0 -7
- package/dist/cli/commandNames.d.ts.map +1 -1
- package/dist/cli/commandNames.js +0 -7
- package/dist/cli/commandNames.js.map +1 -1
- package/dist/cli/commands/auth.d.ts +0 -6
- package/dist/cli/commands/auth.d.ts.map +1 -1
- package/dist/cli/commands/auth.js +0 -6
- package/dist/cli/commands/auth.js.map +1 -1
- package/dist/cli/commands/elementSelector.d.ts +0 -6
- package/dist/cli/commands/elementSelector.d.ts.map +1 -1
- package/dist/cli/commands/elementSelector.js +0 -7
- package/dist/cli/commands/elementSelector.js.map +1 -1
- package/dist/cli/commands/evidence.d.ts +0 -6
- package/dist/cli/commands/evidence.d.ts.map +1 -1
- package/dist/cli/commands/evidence.js +0 -6
- package/dist/cli/commands/evidence.js.map +1 -1
- package/dist/cli/commands/libraryOpen.d.ts +0 -1
- package/dist/cli/commands/libraryOpen.d.ts.map +1 -1
- package/dist/cli/commands/libraryOpen.js +3 -3
- package/dist/cli/commands/libraryOpen.js.map +1 -1
- package/dist/cli/commands/mcpServe.d.ts +0 -24
- package/dist/cli/commands/mcpServe.d.ts.map +1 -1
- package/dist/cli/commands/mcpServe.js +31 -102
- package/dist/cli/commands/mcpServe.js.map +1 -1
- package/dist/cli/commands/open.d.ts +0 -8
- package/dist/cli/commands/open.d.ts.map +1 -1
- package/dist/cli/commands/open.js +0 -57
- package/dist/cli/commands/open.js.map +1 -1
- package/dist/cli/commands/reference.d.ts +0 -5
- package/dist/cli/commands/reference.d.ts.map +1 -1
- package/dist/cli/commands/reference.js +0 -27
- package/dist/cli/commands/reference.js.map +1 -1
- package/dist/cli/commands/serve.d.ts +0 -5
- package/dist/cli/commands/serve.d.ts.map +1 -1
- package/dist/cli/commands/serve.js +0 -34
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/shared.d.ts +0 -16
- package/dist/cli/commands/shared.d.ts.map +1 -1
- package/dist/cli/commands/shared.js +0 -19
- package/dist/cli/commands/shared.js.map +1 -1
- package/dist/cli/commands/status.d.ts +0 -6
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +0 -11
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/stop.d.ts +0 -5
- package/dist/cli/commands/stop.d.ts.map +1 -1
- package/dist/cli/commands/stop.js +0 -6
- package/dist/cli/commands/stop.js.map +1 -1
- package/dist/cli/commands/update.d.ts +0 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +0 -1
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/variants.d.ts +0 -1
- package/dist/cli/commands/variants.d.ts.map +1 -1
- package/dist/cli/commands/variants.js +0 -31
- package/dist/cli/commands/variants.js.map +1 -1
- package/dist/cli/commands/wait.d.ts +0 -21
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +0 -23
- package/dist/cli/commands/wait.js.map +1 -1
- package/dist/cli/entry.d.ts +0 -10
- package/dist/cli/entry.d.ts.map +1 -1
- package/dist/cli/entry.js +0 -13
- package/dist/cli/entry.js.map +1 -1
- package/dist/cli/envelope.d.ts +1 -25
- package/dist/cli/envelope.d.ts.map +1 -1
- package/dist/cli/envelope.js +0 -19
- package/dist/cli/envelope.js.map +1 -1
- package/dist/cli/flags.d.ts +0 -7
- package/dist/cli/flags.d.ts.map +1 -1
- package/dist/cli/flags.js +0 -7
- package/dist/cli/flags.js.map +1 -1
- package/dist/cli/handoff.d.ts +0 -33
- package/dist/cli/handoff.d.ts.map +1 -1
- package/dist/cli/handoff.js +0 -42
- package/dist/cli/handoff.js.map +1 -1
- package/dist/cli/handoffStore.d.ts +0 -11
- package/dist/cli/handoffStore.d.ts.map +1 -1
- package/dist/cli/handoffStore.js +0 -10
- package/dist/cli/handoffStore.js.map +1 -1
- package/dist/cli/hostWorkNextAction.d.ts +0 -11
- package/dist/cli/hostWorkNextAction.d.ts.map +1 -1
- package/dist/cli/hostWorkNextAction.js +0 -4
- package/dist/cli/hostWorkNextAction.js.map +1 -1
- package/dist/cli/io.d.ts +0 -9
- package/dist/cli/io.d.ts.map +1 -1
- package/dist/cli/io.js +0 -1
- package/dist/cli/io.js.map +1 -1
- package/dist/cli/resolveDefaultNodeEnv.d.ts +0 -5
- package/dist/cli/resolveDefaultNodeEnv.d.ts.map +1 -1
- package/dist/cli/resolveDefaultNodeEnv.js +0 -5
- package/dist/cli/resolveDefaultNodeEnv.js.map +1 -1
- package/dist/cli/router.d.ts +0 -21
- package/dist/cli/router.d.ts.map +1 -1
- package/dist/cli/router.js +0 -46
- package/dist/cli/router.js.map +1 -1
- package/dist/cli/runnerSelection.d.ts +0 -58
- package/dist/cli/runnerSelection.d.ts.map +1 -1
- package/dist/cli/runnerSelection.js +0 -16
- package/dist/cli/runnerSelection.js.map +1 -1
- package/dist/cli/serverHandshake.d.ts +0 -36
- package/dist/cli/serverHandshake.d.ts.map +1 -1
- package/dist/cli/serverHandshake.js +0 -29
- package/dist/cli/serverHandshake.js.map +1 -1
- package/dist/cli/serverUnavailable.d.ts +0 -1
- package/dist/cli/serverUnavailable.d.ts.map +1 -1
- package/dist/cli/serverUnavailable.js +0 -1
- package/dist/cli/serverUnavailable.js.map +1 -1
- package/dist/cli/serverVersion.d.ts +0 -22
- package/dist/cli/serverVersion.d.ts.map +1 -1
- package/dist/cli/serverVersion.js +0 -12
- package/dist/cli/serverVersion.js.map +1 -1
- package/dist/cli/telemetry.d.ts +0 -4
- package/dist/cli/telemetry.d.ts.map +1 -1
- package/dist/cli/telemetry.js +0 -4
- package/dist/cli/telemetry.js.map +1 -1
- package/dist/config/evaluateFlags.d.ts +0 -4
- package/dist/config/evaluateFlags.d.ts.map +1 -1
- package/dist/config/evaluateFlags.js +0 -11
- package/dist/config/evaluateFlags.js.map +1 -1
- package/dist/config/featureFlagUserKey.d.ts +0 -3
- package/dist/config/featureFlagUserKey.d.ts.map +1 -1
- package/dist/config/featureFlagUserKey.js +0 -3
- package/dist/config/featureFlagUserKey.js.map +1 -1
- package/dist/config/flags.d.ts +0 -14
- package/dist/config/flags.d.ts.map +1 -1
- package/dist/config/flags.js +0 -27
- package/dist/config/flags.js.map +1 -1
- package/dist/config/proxy.d.ts +0 -3
- package/dist/config/proxy.d.ts.map +1 -1
- package/dist/config/proxy.js +0 -11
- package/dist/config/proxy.js.map +1 -1
- package/dist/config/telemetry.d.ts +0 -13
- package/dist/config/telemetry.d.ts.map +1 -1
- package/dist/config/telemetry.js +0 -13
- package/dist/config/telemetry.js.map +1 -1
- package/dist/config/telemetryContract.d.ts +0 -1
- package/dist/config/telemetryContract.d.ts.map +1 -1
- package/dist/config/telemetryContract.js +0 -1
- package/dist/config/telemetryContract.js.map +1 -1
- package/dist/hosts/workerDefaults.d.ts +0 -69
- package/dist/hosts/workerDefaults.d.ts.map +1 -1
- package/dist/hosts/workerDefaults.js +0 -68
- package/dist/hosts/workerDefaults.js.map +1 -1
- package/dist/index-core.d.ts.map +1 -1
- package/dist/index-core.js +0 -2
- package/dist/index-core.js.map +1 -1
- package/dist/index.d.ts +0 -20
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -105
- package/dist/index.js.map +1 -1
- package/dist/install/allowlists.d.ts +0 -32
- package/dist/install/allowlists.d.ts.map +1 -1
- package/dist/install/allowlists.js +0 -44
- package/dist/install/allowlists.js.map +1 -1
- package/dist/install/automaticCliUpdate.d.ts +0 -6
- package/dist/install/automaticCliUpdate.d.ts.map +1 -1
- package/dist/install/automaticCliUpdate.js +0 -13
- package/dist/install/automaticCliUpdate.js.map +1 -1
- package/dist/install/channelCli.d.ts +0 -1
- package/dist/install/channelCli.d.ts.map +1 -1
- package/dist/install/channelCli.js +0 -3
- package/dist/install/channelCli.js.map +1 -1
- package/dist/install/channelManager.d.ts +0 -14
- package/dist/install/channelManager.d.ts.map +1 -1
- package/dist/install/channelManager.js +0 -22
- package/dist/install/channelManager.js.map +1 -1
- package/dist/install/codexGuidance.d.ts +0 -1
- package/dist/install/codexGuidance.d.ts.map +1 -1
- package/dist/install/codexGuidance.js +0 -7
- package/dist/install/codexGuidance.js.map +1 -1
- package/dist/install/globalBootstrap.d.ts +0 -25
- package/dist/install/globalBootstrap.d.ts.map +1 -1
- package/dist/install/globalBootstrap.js +0 -10
- package/dist/install/globalBootstrap.js.map +1 -1
- package/dist/install/harnesses.d.ts +0 -66
- package/dist/install/harnesses.d.ts.map +1 -1
- package/dist/install/harnesses.js +0 -60
- package/dist/install/harnesses.js.map +1 -1
- package/dist/install/installationChannel.d.ts +0 -1
- package/dist/install/installationChannel.d.ts.map +1 -1
- package/dist/install/installationChannel.js +0 -1
- package/dist/install/installationChannel.js.map +1 -1
- package/dist/install/legacyMcp.d.ts +0 -23
- package/dist/install/legacyMcp.d.ts.map +1 -1
- package/dist/install/legacyMcp.js +3 -46
- package/dist/install/legacyMcp.js.map +1 -1
- package/dist/install/mcpRegistration.d.ts +0 -41
- package/dist/install/mcpRegistration.d.ts.map +1 -1
- package/dist/install/mcpRegistration.js +2 -70
- package/dist/install/mcpRegistration.js.map +1 -1
- package/dist/library/HubClient.d.ts +0 -2
- package/dist/library/HubClient.d.ts.map +1 -1
- package/dist/library/HubClient.js +0 -4
- package/dist/library/HubClient.js.map +1 -1
- package/dist/library/HubServer.d.ts +0 -1
- package/dist/library/HubServer.d.ts.map +1 -1
- package/dist/library/HubServer.js +0 -1
- package/dist/library/HubServer.js.map +1 -1
- package/dist/library/StaticPreviewServer.d.ts +0 -1
- package/dist/library/StaticPreviewServer.d.ts.map +1 -1
- package/dist/library/StaticPreviewServer.js +0 -1
- package/dist/library/StaticPreviewServer.js.map +1 -1
- package/dist/library/http.d.ts +0 -2
- package/dist/library/http.d.ts.map +1 -1
- package/dist/library/http.js +0 -2
- package/dist/library/http.js.map +1 -1
- package/dist/library/importFiles.d.ts +0 -6
- package/dist/library/importFiles.d.ts.map +1 -1
- package/dist/library/importFiles.js +45 -11
- package/dist/library/importFiles.js.map +1 -1
- package/dist/mcp/changeBatchClassification.d.ts +0 -40
- package/dist/mcp/changeBatchClassification.d.ts.map +1 -1
- package/dist/mcp/changeBatchClassification.js +0 -34
- package/dist/mcp/changeBatchClassification.js.map +1 -1
- package/dist/prompts/commentVariationPrompts.d.ts +0 -5
- package/dist/prompts/commentVariationPrompts.d.ts.map +1 -1
- package/dist/prompts/commentVariationPrompts.js +0 -5
- package/dist/prompts/commentVariationPrompts.js.map +1 -1
- package/dist/prototype-host.js +0 -15
- package/dist/prototype-host.js.map +1 -1
- package/dist/proxy-middleware/preview-bridge.d.ts +0 -2
- package/dist/proxy-middleware/preview-bridge.d.ts.map +1 -1
- package/dist/proxy-middleware/preview-bridge.js +7 -7
- package/dist/proxy-middleware/preview-bridge.js.map +1 -1
- package/dist/proxy-middleware/preview-connections.d.ts +8 -0
- package/dist/proxy-middleware/preview-connections.d.ts.map +1 -0
- package/dist/proxy-middleware/preview-connections.js +29 -0
- package/dist/proxy-middleware/preview-connections.js.map +1 -0
- package/dist/proxy-middleware/proxy-config.d.ts +0 -12
- package/dist/proxy-middleware/proxy-config.d.ts.map +1 -1
- package/dist/proxy-middleware/proxy-config.js +41 -90
- package/dist/proxy-middleware/proxy-config.js.map +1 -1
- package/dist/routes/account.d.ts +0 -1
- package/dist/routes/account.d.ts.map +1 -1
- package/dist/routes/account.js +0 -2
- package/dist/routes/account.js.map +1 -1
- package/dist/routes/agentVariants.d.ts +0 -15
- package/dist/routes/agentVariants.d.ts.map +1 -1
- package/dist/routes/agentVariants.js +14 -325
- package/dist/routes/agentVariants.js.map +1 -1
- package/dist/routes/cli.d.ts +0 -17
- package/dist/routes/cli.d.ts.map +1 -1
- package/dist/routes/cli.js +0 -13
- package/dist/routes/cli.js.map +1 -1
- package/dist/routes/emptyStatePage.d.ts +0 -12
- package/dist/routes/emptyStatePage.d.ts.map +1 -1
- package/dist/routes/emptyStatePage.js +0 -12
- package/dist/routes/emptyStatePage.js.map +1 -1
- package/dist/routes/git.d.ts.map +1 -1
- package/dist/routes/git.js +0 -13
- package/dist/routes/git.js.map +1 -1
- package/dist/routes/inlineStartTracker.d.ts +0 -16
- package/dist/routes/inlineStartTracker.d.ts.map +1 -1
- package/dist/routes/inlineStartTracker.js.map +1 -1
- package/dist/routes/integrations.d.ts +0 -6
- package/dist/routes/integrations.d.ts.map +1 -1
- package/dist/routes/integrations.js +0 -6
- package/dist/routes/integrations.js.map +1 -1
- package/dist/routes/library/app.d.ts +0 -1
- package/dist/routes/library/app.d.ts.map +1 -1
- package/dist/routes/library/app.js +0 -1
- package/dist/routes/library/app.js.map +1 -1
- package/dist/routes/library/index.d.ts +0 -1
- package/dist/routes/library/index.d.ts.map +1 -1
- package/dist/routes/library/index.js +0 -1
- package/dist/routes/library/index.js.map +1 -1
- package/dist/routes/library/middleware.d.ts +0 -3
- package/dist/routes/library/middleware.d.ts.map +1 -1
- package/dist/routes/library/middleware.js +0 -4
- package/dist/routes/library/middleware.js.map +1 -1
- package/dist/routes/library/navigation.d.ts +0 -1
- package/dist/routes/library/navigation.d.ts.map +1 -1
- package/dist/routes/library/navigation.js +0 -1
- package/dist/routes/library/navigation.js.map +1 -1
- package/dist/routes/library/projects.d.ts +0 -1
- package/dist/routes/library/projects.d.ts.map +1 -1
- package/dist/routes/library/projects.js +0 -1
- package/dist/routes/library/projects.js.map +1 -1
- package/dist/routes/library/staticPreview.d.ts +0 -1
- package/dist/routes/library/staticPreview.d.ts.map +1 -1
- package/dist/routes/library/staticPreview.js +0 -1
- package/dist/routes/library/staticPreview.js.map +1 -1
- package/dist/routes/library/variants.d.ts +0 -1
- package/dist/routes/library/variants.d.ts.map +1 -1
- package/dist/routes/library/variants.js +0 -1
- package/dist/routes/library/variants.js.map +1 -1
- package/dist/routes/mcp.d.ts +0 -3
- package/dist/routes/mcp.d.ts.map +1 -1
- package/dist/routes/mcp.js +3 -4
- package/dist/routes/mcp.js.map +1 -1
- package/dist/routes/prototypeHost.d.ts +0 -2
- package/dist/routes/prototypeHost.d.ts.map +1 -1
- package/dist/routes/prototypeHost.js +6 -32
- package/dist/routes/prototypeHost.js.map +1 -1
- package/dist/routes/static.d.ts +0 -3
- package/dist/routes/static.d.ts.map +1 -1
- package/dist/routes/static.js +0 -6
- package/dist/routes/static.js.map +1 -1
- package/dist/routes/support.d.ts +0 -3
- package/dist/routes/support.d.ts.map +1 -1
- package/dist/routes/support.js +0 -3
- package/dist/routes/support.js.map +1 -1
- package/dist/server.d.ts +0 -42
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1 -129
- package/dist/server.js.map +1 -1
- package/dist/services/AuthService.d.ts +0 -76
- package/dist/services/AuthService.d.ts.map +1 -1
- package/dist/services/AuthService.js +0 -112
- package/dist/services/AuthService.js.map +1 -1
- package/dist/services/BrowserAgentClient.d.ts +1 -21
- package/dist/services/BrowserAgentClient.d.ts.map +1 -1
- package/dist/services/BrowserAgentClient.js +0 -10
- package/dist/services/BrowserAgentClient.js.map +1 -1
- package/dist/services/BundleStore.d.ts +0 -18
- package/dist/services/BundleStore.d.ts.map +1 -1
- package/dist/services/BundleStore.js +0 -10
- package/dist/services/BundleStore.js.map +1 -1
- package/dist/services/CliLogForwarder.d.ts +0 -26
- package/dist/services/CliLogForwarder.d.ts.map +1 -1
- package/dist/services/CliLogForwarder.js +1 -33
- package/dist/services/CliLogForwarder.js.map +1 -1
- package/dist/services/CommitMessageGenerator.d.ts +0 -6
- package/dist/services/CommitMessageGenerator.d.ts.map +1 -1
- package/dist/services/CommitMessageGenerator.js +0 -3
- package/dist/services/CommitMessageGenerator.js.map +1 -1
- package/dist/services/ComponentSearchService.d.ts +2 -16
- package/dist/services/ComponentSearchService.d.ts.map +1 -1
- package/dist/services/ComponentSearchService.js +2 -56
- package/dist/services/ComponentSearchService.js.map +1 -1
- package/dist/services/ConfigManager.d.ts +0 -113
- package/dist/services/ConfigManager.d.ts.map +1 -1
- package/dist/services/ConfigManager.js +0 -101
- package/dist/services/ConfigManager.js.map +1 -1
- package/dist/services/DependencyPreparationService.d.ts +28 -0
- package/dist/services/DependencyPreparationService.d.ts.map +1 -0
- package/dist/services/DependencyPreparationService.js +322 -0
- package/dist/services/DependencyPreparationService.js.map +1 -0
- package/dist/services/DevServerRuntimeService.d.ts +0 -20
- package/dist/services/DevServerRuntimeService.d.ts.map +1 -1
- package/dist/services/DevServerRuntimeService.js +0 -46
- package/dist/services/DevServerRuntimeService.js.map +1 -1
- package/dist/services/FeatureFlagService.d.ts +0 -15
- package/dist/services/FeatureFlagService.d.ts.map +1 -1
- package/dist/services/FeatureFlagService.js +0 -23
- package/dist/services/FeatureFlagService.js.map +1 -1
- package/dist/services/GatewayClient.d.ts +0 -27
- package/dist/services/GatewayClient.d.ts.map +1 -1
- package/dist/services/GatewayClient.js +0 -25
- package/dist/services/GatewayClient.js.map +1 -1
- package/dist/services/HistoryReplayService.d.ts +2 -32
- package/dist/services/HistoryReplayService.d.ts.map +1 -1
- package/dist/services/HistoryReplayService.js +55 -65
- package/dist/services/HistoryReplayService.js.map +1 -1
- package/dist/services/HubDiscovery.d.ts +0 -8
- package/dist/services/HubDiscovery.d.ts.map +1 -1
- package/dist/services/HubDiscovery.js +0 -8
- package/dist/services/HubDiscovery.js.map +1 -1
- package/dist/services/HubNavigation.d.ts +0 -6
- package/dist/services/HubNavigation.d.ts.map +1 -1
- package/dist/services/HubNavigation.js +5 -8
- package/dist/services/HubNavigation.js.map +1 -1
- package/dist/services/IntegrationsClient.d.ts +0 -34
- package/dist/services/IntegrationsClient.d.ts.map +1 -1
- package/dist/services/IntegrationsClient.js +0 -27
- package/dist/services/IntegrationsClient.js.map +1 -1
- package/dist/services/LocalGitService.d.ts +0 -57
- package/dist/services/LocalGitService.d.ts.map +1 -1
- package/dist/services/LocalGitService.js +4 -85
- package/dist/services/LocalGitService.js.map +1 -1
- package/dist/services/MCPOnboardingTelemetry.d.ts +0 -9
- package/dist/services/MCPOnboardingTelemetry.d.ts.map +1 -1
- package/dist/services/MCPOnboardingTelemetry.js +0 -9
- package/dist/services/MCPOnboardingTelemetry.js.map +1 -1
- package/dist/services/MCPVariantsTelemetry.d.ts +0 -2
- package/dist/services/MCPVariantsTelemetry.d.ts.map +1 -1
- package/dist/services/MCPVariantsTelemetry.js +0 -2
- package/dist/services/MCPVariantsTelemetry.js.map +1 -1
- package/dist/services/OperatingSystemServices.d.ts +0 -22
- package/dist/services/OperatingSystemServices.d.ts.map +1 -1
- package/dist/services/OperatingSystemServices.js +22 -80
- package/dist/services/OperatingSystemServices.js.map +1 -1
- package/dist/services/PRTitleGenerator.d.ts +0 -7
- package/dist/services/PRTitleGenerator.d.ts.map +1 -1
- package/dist/services/PRTitleGenerator.js +0 -3
- package/dist/services/PRTitleGenerator.js.map +1 -1
- package/dist/services/ProjectCardPreviews.d.ts +0 -5
- package/dist/services/ProjectCardPreviews.d.ts.map +1 -1
- package/dist/services/ProjectCardPreviews.js +0 -5
- package/dist/services/ProjectCardPreviews.js.map +1 -1
- package/dist/services/ProjectDetectionService.d.ts +0 -4
- package/dist/services/ProjectDetectionService.d.ts.map +1 -1
- package/dist/services/ProjectDetectionService.js +2 -44
- package/dist/services/ProjectDetectionService.js.map +1 -1
- package/dist/services/ProjectFolderPicker.d.ts +0 -3
- package/dist/services/ProjectFolderPicker.d.ts.map +1 -1
- package/dist/services/ProjectFolderPicker.js +0 -4
- package/dist/services/ProjectFolderPicker.js.map +1 -1
- package/dist/services/ProjectImport.d.ts +0 -1
- package/dist/services/ProjectImport.d.ts.map +1 -1
- package/dist/services/ProjectImport.js +0 -3
- package/dist/services/ProjectImport.js.map +1 -1
- package/dist/services/ProjectLibrary.d.ts +0 -18
- package/dist/services/ProjectLibrary.d.ts.map +1 -1
- package/dist/services/ProjectLibrary.js +0 -20
- package/dist/services/ProjectLibrary.js.map +1 -1
- package/dist/services/ProjectMetadataStore.d.ts +0 -73
- package/dist/services/ProjectMetadataStore.d.ts.map +1 -1
- package/dist/services/ProjectMetadataStore.js +0 -90
- package/dist/services/ProjectMetadataStore.js.map +1 -1
- package/dist/services/ProjectPackageManager.d.ts +23 -0
- package/dist/services/ProjectPackageManager.d.ts.map +1 -0
- package/dist/services/ProjectPackageManager.js +185 -0
- package/dist/services/ProjectPackageManager.js.map +1 -0
- package/dist/services/ProjectRegistry.d.ts +0 -16
- package/dist/services/ProjectRegistry.d.ts.map +1 -1
- package/dist/services/ProjectRegistry.js +0 -18
- package/dist/services/ProjectRegistry.js.map +1 -1
- package/dist/services/ProjectRuntimeService.d.ts +0 -4
- package/dist/services/ProjectRuntimeService.d.ts.map +1 -1
- package/dist/services/ProjectRuntimeService.js +0 -5
- package/dist/services/ProjectRuntimeService.js.map +1 -1
- package/dist/services/ProjectScreenshotService.d.ts +0 -5
- package/dist/services/ProjectScreenshotService.d.ts.map +1 -1
- package/dist/services/ProjectScreenshotService.js +0 -6
- package/dist/services/ProjectScreenshotService.js.map +1 -1
- package/dist/services/ProjectStorage.d.ts +0 -4
- package/dist/services/ProjectStorage.d.ts.map +1 -1
- package/dist/services/ProjectStorage.js +0 -4
- package/dist/services/ProjectStorage.js.map +1 -1
- package/dist/services/PrototypeBuildService.d.ts +1 -23
- package/dist/services/PrototypeBuildService.d.ts.map +1 -1
- package/dist/services/PrototypeBuildService.js +6 -31
- package/dist/services/PrototypeBuildService.js.map +1 -1
- package/dist/services/PrototypeDeployService.d.ts +0 -20
- package/dist/services/PrototypeDeployService.d.ts.map +1 -1
- package/dist/services/PrototypeDeployService.js +1 -24
- package/dist/services/PrototypeDeployService.js.map +1 -1
- package/dist/services/RequestAuthContext.d.ts +0 -5
- package/dist/services/RequestAuthContext.d.ts.map +1 -1
- package/dist/services/RequestAuthContext.js +0 -5
- package/dist/services/RequestAuthContext.js.map +1 -1
- package/dist/services/SessionBridgeService.d.ts.map +1 -1
- package/dist/services/SessionBridgeService.js +0 -2
- package/dist/services/SessionBridgeService.js.map +1 -1
- package/dist/services/SessionService.d.ts +0 -4
- package/dist/services/SessionService.d.ts.map +1 -1
- package/dist/services/SessionService.js +1 -22
- package/dist/services/SessionService.js.map +1 -1
- package/dist/services/StaticFileService.d.ts +0 -9
- package/dist/services/StaticFileService.d.ts.map +1 -1
- package/dist/services/StaticFileService.js +0 -11
- package/dist/services/StaticFileService.js.map +1 -1
- package/dist/services/StaticLibraryPreviews.d.ts +0 -3
- package/dist/services/StaticLibraryPreviews.d.ts.map +1 -1
- package/dist/services/StaticLibraryPreviews.js +0 -3
- package/dist/services/StaticLibraryPreviews.js.map +1 -1
- package/dist/services/StaticPreviewServer.d.ts +0 -16
- package/dist/services/StaticPreviewServer.d.ts.map +1 -1
- package/dist/services/StaticPreviewServer.js +2 -28
- package/dist/services/StaticPreviewServer.js.map +1 -1
- package/dist/services/SupabaseAuthService.d.ts +0 -11
- package/dist/services/SupabaseAuthService.d.ts.map +1 -1
- package/dist/services/SupabaseAuthService.js +0 -11
- package/dist/services/SupabaseAuthService.js.map +1 -1
- package/dist/services/SupportTicketService.d.ts +0 -4
- package/dist/services/SupportTicketService.d.ts.map +1 -1
- package/dist/services/SupportTicketService.js +0 -4
- package/dist/services/SupportTicketService.js.map +1 -1
- package/dist/services/TelemetryService.d.ts +0 -182
- package/dist/services/TelemetryService.d.ts.map +1 -1
- package/dist/services/TelemetryService.js +0 -193
- package/dist/services/TelemetryService.js.map +1 -1
- package/dist/services/TreeStore.d.ts +0 -72
- package/dist/services/TreeStore.d.ts.map +1 -1
- package/dist/services/TreeStore.js +2 -101
- package/dist/services/TreeStore.js.map +1 -1
- package/dist/services/VariantGenerationService.d.ts +0 -32
- package/dist/services/VariantGenerationService.d.ts.map +1 -1
- package/dist/services/VariantGenerationService.js +5 -62
- package/dist/services/VariantGenerationService.js.map +1 -1
- package/dist/services/VariantHistoryService.d.ts +0 -114
- package/dist/services/VariantHistoryService.d.ts.map +1 -1
- package/dist/services/VariantHistoryService.js +2 -144
- package/dist/services/VariantHistoryService.js.map +1 -1
- package/dist/services/VariantRunService.d.ts +0 -31
- package/dist/services/VariantRunService.d.ts.map +1 -1
- package/dist/services/VariantRunService.js +0 -35
- package/dist/services/VariantRunService.js.map +1 -1
- package/dist/services/VariantsRuntime.d.ts +0 -3
- package/dist/services/VariantsRuntime.d.ts.map +1 -1
- package/dist/services/VariantsRuntime.js +0 -5
- package/dist/services/VariantsRuntime.js.map +1 -1
- package/dist/services/WorktreeManager.d.ts +1 -220
- package/dist/services/WorktreeManager.d.ts.map +1 -1
- package/dist/services/WorktreeManager.js +75 -372
- package/dist/services/WorktreeManager.js.map +1 -1
- package/dist/services/accessTokenRefresh.d.ts +0 -25
- package/dist/services/accessTokenRefresh.d.ts.map +1 -1
- package/dist/services/accessTokenRefresh.js +0 -25
- package/dist/services/accessTokenRefresh.js.map +1 -1
- package/dist/services/adapters/TailwindTokenAdapter.d.ts +0 -29
- package/dist/services/adapters/TailwindTokenAdapter.d.ts.map +1 -1
- package/dist/services/adapters/TailwindTokenAdapter.js +1 -46
- package/dist/services/adapters/TailwindTokenAdapter.js.map +1 -1
- package/dist/services/createAgentVariantsOrchestrator.d.ts +0 -18
- package/dist/services/createAgentVariantsOrchestrator.d.ts.map +1 -1
- package/dist/services/createAgentVariantsOrchestrator.js +0 -22
- package/dist/services/createAgentVariantsOrchestrator.js.map +1 -1
- package/dist/services/extractors/CSSVariableExtractor.d.ts +0 -25
- package/dist/services/extractors/CSSVariableExtractor.d.ts.map +1 -1
- package/dist/services/extractors/CSSVariableExtractor.js +1 -42
- package/dist/services/extractors/CSSVariableExtractor.js.map +1 -1
- package/dist/services/historyRoots.d.ts +0 -12
- package/dist/services/historyRoots.d.ts.map +1 -1
- package/dist/services/historyRoots.js +0 -13
- package/dist/services/historyRoots.js.map +1 -1
- package/dist/services/libraryErrors.d.ts +0 -1
- package/dist/services/libraryErrors.d.ts.map +1 -1
- package/dist/services/libraryErrors.js +0 -1
- package/dist/services/libraryErrors.js.map +1 -1
- package/dist/services/pendingLogin.d.ts +0 -13
- package/dist/services/pendingLogin.d.ts.map +1 -1
- package/dist/services/pendingLogin.js +0 -3
- package/dist/services/pendingLogin.js.map +1 -1
- package/dist/services/staticProjectTarget.d.ts +0 -4
- package/dist/services/staticProjectTarget.d.ts.map +1 -1
- package/dist/services/staticProjectTarget.js +0 -4
- package/dist/services/staticProjectTarget.js.map +1 -1
- package/dist/services/staticStarter.d.ts +0 -20
- package/dist/services/staticStarter.d.ts.map +1 -1
- package/dist/services/staticStarter.js +0 -20
- package/dist/services/staticStarter.js.map +1 -1
- package/dist/services/templates/designCatalog.d.ts +0 -11
- package/dist/services/templates/designCatalog.d.ts.map +1 -1
- package/dist/services/templates/designCatalog.js +0 -26
- package/dist/services/templates/designCatalog.js.map +1 -1
- package/dist/services/templates/viteReactTs.d.ts +0 -26
- package/dist/services/templates/viteReactTs.d.ts.map +1 -1
- package/dist/services/templates/viteReactTs.js +0 -20
- package/dist/services/templates/viteReactTs.js.map +1 -1
- package/dist/storage/library/BundleMetadataStore.d.ts +0 -16
- package/dist/storage/library/BundleMetadataStore.d.ts.map +1 -1
- package/dist/storage/library/BundleMetadataStore.js +0 -17
- package/dist/storage/library/BundleMetadataStore.js.map +1 -1
- package/dist/storage/library/CoordinatorRecords.d.ts +0 -9
- package/dist/storage/library/CoordinatorRecords.d.ts.map +1 -1
- package/dist/storage/library/CoordinatorRecords.js +0 -9
- package/dist/storage/library/CoordinatorRecords.js.map +1 -1
- package/dist/storage/library/ProjectPreviewCache.d.ts +0 -4
- package/dist/storage/library/ProjectPreviewCache.d.ts.map +1 -1
- package/dist/storage/library/ProjectPreviewCache.js +0 -4
- package/dist/storage/library/ProjectPreviewCache.js.map +1 -1
- package/dist/storage/library/ProjectRecords.d.ts +0 -17
- package/dist/storage/library/ProjectRecords.d.ts.map +1 -1
- package/dist/storage/library/ProjectRecords.js +0 -17
- package/dist/storage/library/ProjectRecords.js.map +1 -1
- package/dist/storage/library/database.d.ts +0 -3
- package/dist/storage/library/database.d.ts.map +1 -1
- package/dist/storage/library/database.js +0 -3
- package/dist/storage/library/database.js.map +1 -1
- package/dist/storage/library/migrations.d.ts +0 -2
- package/dist/storage/library/migrations.d.ts.map +1 -1
- package/dist/storage/library/migrations.js +0 -2
- package/dist/storage/library/migrations.js.map +1 -1
- package/dist/storage/library/sourcePresentation.d.ts +0 -1
- package/dist/storage/library/sourcePresentation.d.ts.map +1 -1
- package/dist/storage/library/sourcePresentation.js +0 -1
- package/dist/storage/library/sourcePresentation.js.map +1 -1
- package/dist/storage/project-metadata/ProjectMetadataRecords.d.ts +0 -11
- package/dist/storage/project-metadata/ProjectMetadataRecords.d.ts.map +1 -1
- package/dist/storage/project-metadata/ProjectMetadataRecords.js +0 -13
- package/dist/storage/project-metadata/ProjectMetadataRecords.js.map +1 -1
- package/dist/storage/project-metadata/database.d.ts +0 -1
- package/dist/storage/project-metadata/database.d.ts.map +1 -1
- package/dist/storage/project-metadata/database.js +0 -7
- package/dist/storage/project-metadata/database.js.map +1 -1
- package/dist/storage/project-metadata/migrations.d.ts +0 -42
- package/dist/storage/project-metadata/migrations.d.ts.map +1 -1
- package/dist/storage/project-metadata/migrations.js +0 -41
- package/dist/storage/project-metadata/migrations.js.map +1 -1
- package/dist/types/account.d.ts +0 -1
- package/dist/types/account.d.ts.map +1 -1
- package/dist/types/change-request-types.d.ts +0 -167
- package/dist/types/change-request-types.d.ts.map +1 -1
- package/dist/types/change-types.d.ts +0 -1
- package/dist/types/change-types.d.ts.map +1 -1
- package/dist/types/change-types.js +0 -1
- package/dist/types/change-types.js.map +1 -1
- package/dist/types/project-library.d.ts +0 -1
- package/dist/types/project-library.d.ts.map +1 -1
- package/dist/types/style-manipulation-types.d.ts +0 -69
- package/dist/types/style-manipulation-types.d.ts.map +1 -1
- package/dist/types/style-manipulation-types.js +0 -26
- package/dist/types/style-manipulation-types.js.map +1 -1
- package/dist/types/token-types.d.ts +0 -30
- package/dist/types/token-types.d.ts.map +1 -1
- package/dist/types/token-types.js +0 -1
- package/dist/types/token-types.js.map +1 -1
- package/dist/types/variant-history.d.ts +0 -39
- package/dist/types/variant-history.d.ts.map +1 -1
- package/dist/utils/branchNames.d.ts +0 -1
- package/dist/utils/branchNames.d.ts.map +1 -1
- package/dist/utils/branchNames.js +0 -2
- package/dist/utils/branchNames.js.map +1 -1
- package/dist/utils/cloneOrCopyDirSync.d.ts +0 -12
- package/dist/utils/cloneOrCopyDirSync.d.ts.map +1 -1
- package/dist/utils/cloneOrCopyDirSync.js +1 -15
- package/dist/utils/cloneOrCopyDirSync.js.map +1 -1
- package/dist/utils/devServerCommand.d.ts +0 -23
- package/dist/utils/devServerCommand.d.ts.map +1 -1
- package/dist/utils/devServerCommand.js +0 -24
- package/dist/utils/devServerCommand.js.map +1 -1
- package/dist/utils/devServerError.d.ts +2 -16
- package/dist/utils/devServerError.d.ts.map +1 -1
- package/dist/utils/devServerError.js +4 -17
- package/dist/utils/devServerError.js.map +1 -1
- package/dist/utils/displayLocale.d.ts +0 -2
- package/dist/utils/displayLocale.d.ts.map +1 -1
- package/dist/utils/displayLocale.js +0 -2
- package/dist/utils/displayLocale.js.map +1 -1
- package/dist/utils/elementFileHintSignals.d.ts +0 -5
- package/dist/utils/elementFileHintSignals.d.ts.map +1 -1
- package/dist/utils/elementFileHintSignals.js +0 -5
- package/dist/utils/elementFileHintSignals.js.map +1 -1
- package/dist/utils/formatElementTargetingContext.d.ts +0 -6
- package/dist/utils/formatElementTargetingContext.d.ts.map +1 -1
- package/dist/utils/formatElementTargetingContext.js +3 -9
- package/dist/utils/formatElementTargetingContext.js.map +1 -1
- package/dist/utils/hostAgentEnv.d.ts +0 -17
- package/dist/utils/hostAgentEnv.d.ts.map +1 -1
- package/dist/utils/hostAgentEnv.js +0 -17
- package/dist/utils/hostAgentEnv.js.map +1 -1
- package/dist/utils/htmlDocument.d.ts +2 -8
- package/dist/utils/htmlDocument.d.ts.map +1 -1
- package/dist/utils/htmlDocument.js +20 -16
- package/dist/utils/htmlDocument.js.map +1 -1
- package/dist/utils/internalGitIdentity.d.ts +2 -0
- package/dist/utils/internalGitIdentity.d.ts.map +1 -0
- package/dist/utils/internalGitIdentity.js +12 -0
- package/dist/utils/internalGitIdentity.js.map +1 -0
- package/dist/utils/logger.d.ts +0 -5
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +2 -19
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/loginShellPath.d.ts +0 -9
- package/dist/utils/loginShellPath.d.ts.map +1 -1
- package/dist/utils/loginShellPath.js +0 -69
- package/dist/utils/loginShellPath.js.map +1 -1
- package/dist/utils/loopback.d.ts +0 -1
- package/dist/utils/loopback.d.ts.map +1 -1
- package/dist/utils/loopback.js +0 -1
- package/dist/utils/loopback.js.map +1 -1
- package/dist/utils/pid.d.ts +0 -1
- package/dist/utils/pid.d.ts.map +1 -1
- package/dist/utils/pid.js +0 -1
- package/dist/utils/pid.js.map +1 -1
- package/dist/utils/portUtils.d.ts +1 -14
- package/dist/utils/portUtils.d.ts.map +1 -1
- package/dist/utils/portUtils.js +1 -21
- package/dist/utils/portUtils.js.map +1 -1
- package/dist/utils/queueAccess.d.ts +0 -9
- package/dist/utils/queueAccess.d.ts.map +1 -1
- package/dist/utils/queueAccess.js +0 -9
- package/dist/utils/queueAccess.js.map +1 -1
- package/dist/utils/skillWriter.d.ts +0 -17
- package/dist/utils/skillWriter.d.ts.map +1 -1
- package/dist/utils/skillWriter.js +0 -20
- package/dist/utils/skillWriter.js.map +1 -1
- package/dist/utils/skills/claude-skill.d.ts +0 -5
- package/dist/utils/skills/claude-skill.d.ts.map +1 -1
- package/dist/utils/skills/claude-skill.js +0 -5
- package/dist/utils/skills/claude-skill.js.map +1 -1
- package/dist/utils/skills/cli-guidance.d.ts +0 -8
- package/dist/utils/skills/cli-guidance.d.ts.map +1 -1
- package/dist/utils/skills/cli-guidance.js +0 -8
- package/dist/utils/skills/cli-guidance.js.map +1 -1
- package/dist/utils/skills/cursor-rules.d.ts +0 -6
- package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
- package/dist/utils/skills/cursor-rules.js +0 -6
- package/dist/utils/skills/cursor-rules.js.map +1 -1
- package/dist/utils/variantPreviewPort.d.ts +0 -3
- package/dist/utils/variantPreviewPort.d.ts.map +1 -1
- package/dist/utils/variantPreviewPort.js +0 -3
- package/dist/utils/variantPreviewPort.js.map +1 -1
- package/dist/utils/windowPlacement.d.ts +0 -4
- package/dist/utils/windowPlacement.d.ts.map +1 -1
- package/dist/utils/windowPlacement.js +0 -4
- package/dist/utils/windowPlacement.js.map +1 -1
- package/package.json +15 -14
- package/scripts/verify-node-version.cjs +0 -3
- package/src/ui/dist/assets/{LibraryApp-PQNnarmo.js → LibraryApp-x6PbzlGr.js} +1 -1
- package/src/ui/dist/assets/{main-C7hdsU-C.js → main-BW1Odsqp.js} +76 -76
- package/src/ui/dist/assets/main-DDQRZm89.css +1 -0
- package/src/ui/dist/index.html +2 -2
- package/dist/utils/skills/describe-motion-protocol.d.ts +0 -10
- package/dist/utils/skills/describe-motion-protocol.d.ts.map +0 -1
- package/dist/utils/skills/describe-motion-protocol.js +0 -231
- package/dist/utils/skills/describe-motion-protocol.js.map +0 -1
- package/src/ui/dist/assets/main-BUZjlAHd.css +0 -1
|
@@ -7,9 +7,6 @@ const contracts_1 = require("./contracts");
|
|
|
7
7
|
const briefContent_1 = require("./briefContent");
|
|
8
8
|
const runLabel_1 = require("./runLabel");
|
|
9
9
|
const runPlan_1 = require("./runPlan");
|
|
10
|
-
/** The variant card subtitle must stay ≤ 10 words (matches the UI's
|
|
11
|
-
* summarizeVariantSubtitle). briefBody can be longer because it also feeds
|
|
12
|
-
* code_gen, so cap only the UI-facing description copy sent over the wire. */
|
|
13
10
|
const MAX_SUBTITLE_WORDS = 10;
|
|
14
11
|
const MAX_RELEVANT_FILES = 12;
|
|
15
12
|
const capSubtitleWords = (text) => {
|
|
@@ -19,25 +16,12 @@ const capSubtitleWords = (text) => {
|
|
|
19
16
|
: `${words.slice(0, MAX_SUBTITLE_WORDS).join(' ')}…`;
|
|
20
17
|
};
|
|
21
18
|
const mergeRelevantFiles = (...groups) => Array.from(new Set(groups.flatMap((group) => group ?? []).filter(Boolean))).slice(0, MAX_RELEVANT_FILES);
|
|
22
|
-
/** TTL for a lease on a code_gen work item. Bumped to 20min after a timing
|
|
23
|
-
* audit found first-variant single-round code-gen routinely runs 540–950s
|
|
24
|
-
* (4+ Task sub-agents in parallel), so the previous 10min cap was the most
|
|
25
|
-
* frequently binding lease and caused recoverable LEASE_EXPIRED churn. The
|
|
26
|
-
* recovery path (re-lease + re-report) works, but the re-lease delay before
|
|
27
|
-
* the chip's pills lit up was noticeable. */
|
|
28
19
|
exports.DEFAULT_LEASE_TTL_MS = 20 * 60 * 1000;
|
|
29
|
-
/** TTL for a lease on a scaffold_base work item. Longer than code_gen because
|
|
30
|
-
* npm/yarn create can be slow on a cold cache. Raised to 30min alongside the
|
|
31
|
-
* code_gen bump; scaffold timing has never bound, but a longer lease is safe. */
|
|
32
20
|
exports.SCAFFOLD_LEASE_TTL_MS = 30 * 60 * 1000;
|
|
33
21
|
const SYSTEM_CLOCK = { now: () => Date.now() };
|
|
34
|
-
/** True when a work item is a past variant adopted into the active session
|
|
35
|
-
* (see {@link SessionStore.appendAdoptedStaticVariant}). Adopted variants are
|
|
36
|
-
* surfaced as session members but excluded from generation accounting. */
|
|
37
22
|
function isAdoptedVariant(item) {
|
|
38
23
|
return Boolean(item.input.adoptedFrom);
|
|
39
24
|
}
|
|
40
|
-
/** True when a static preview is a Vary sibling forked from another variant. */
|
|
41
25
|
function isForkedStaticPreviewVariant(item) {
|
|
42
26
|
return (item.kind === 'static_preview' &&
|
|
43
27
|
Boolean(item.input.sourceVariantId));
|
|
@@ -50,7 +34,6 @@ function leaseTtlForKind(kind) {
|
|
|
50
34
|
? exports.SCAFFOLD_LEASE_TTL_MS
|
|
51
35
|
: exports.DEFAULT_LEASE_TTL_MS;
|
|
52
36
|
}
|
|
53
|
-
/** Describes the work item contract returned to an agent lease holder. */
|
|
54
37
|
function descriptorFor(item) {
|
|
55
38
|
return {
|
|
56
39
|
id: item.id,
|
|
@@ -83,7 +66,6 @@ exports.SOURCE_PLAN_ACTION_OPTIONS = [
|
|
|
83
66
|
instructions: 'Inspect interaction references natively and use the Rivet Describe Motion protocol to produce motion_guidance metadata.',
|
|
84
67
|
},
|
|
85
68
|
];
|
|
86
|
-
/** Returns the completion payload shape required for each leased work item. */
|
|
87
69
|
function outputSchemaFor(kind) {
|
|
88
70
|
switch (kind) {
|
|
89
71
|
case 'source_plan':
|
|
@@ -147,19 +129,10 @@ const briefWorkItemContext = (projectContext) => {
|
|
|
147
129
|
},
|
|
148
130
|
};
|
|
149
131
|
};
|
|
150
|
-
// Source-artifact kinds that represent agent-described attached images.
|
|
151
|
-
// These need their own DESIGN.md slot in the source_plan output, alongside
|
|
152
|
-
// any URL-keyed entries. `siteBrief` / `urlText` are pasted text — they
|
|
153
|
-
// feed SOURCE_CONTEXT only and do NOT get a DESIGN.md.
|
|
154
132
|
const IMAGE_ARTIFACT_KINDS = new Set([
|
|
155
133
|
'visualBrief',
|
|
156
134
|
'screenshotNotes',
|
|
157
135
|
]);
|
|
158
|
-
/**
|
|
159
|
-
* Stable per-session ref for image-derived design sources. Indexed over the
|
|
160
|
-
* filtered list of image-kind artifacts so the ref survives reordering of
|
|
161
|
-
* text-only artifacts in the same `sourceArtifacts` array.
|
|
162
|
-
*/
|
|
163
136
|
const buildImageRefs = (artifacts) => {
|
|
164
137
|
if (!artifacts)
|
|
165
138
|
return [];
|
|
@@ -172,12 +145,6 @@ const buildImageRefs = (artifacts) => {
|
|
|
172
145
|
return refs;
|
|
173
146
|
};
|
|
174
147
|
exports.buildImageRefs = buildImageRefs;
|
|
175
|
-
/**
|
|
176
|
-
* Source-grounded fresh sessions require a single `source_plan` planning hop
|
|
177
|
-
* before briefs. The hop fires when Rivet has captured a read-only user
|
|
178
|
-
* context bundle (the sole source-intake surface). The source-plan agent
|
|
179
|
-
* inspects raw context and reports actions plus metadata.
|
|
180
|
-
*/
|
|
181
148
|
const requiresSourcePlan = (projectContext) => projectContext.kind === 'fresh' && Boolean(projectContext.variantContext);
|
|
182
149
|
const listSection = (title, items) => {
|
|
183
150
|
if (items.length === 0)
|
|
@@ -185,9 +152,6 @@ const listSection = (title, items) => {
|
|
|
185
152
|
return [`## ${title}`, '', ...items.map((item) => `- ${item}`), ''];
|
|
186
153
|
};
|
|
187
154
|
const hasSharedSource = (sourceIds, candidateSourceIds) => candidateSourceIds.some((sourceId) => sourceIds.includes(sourceId));
|
|
188
|
-
/**
|
|
189
|
-
* Formats motion metadata that applies to the same raw sources as the design metadata.
|
|
190
|
-
*/
|
|
191
155
|
const buildMotionGuidanceMarkdown = (sourceIds, metadata) => {
|
|
192
156
|
const matchingMotion = metadata.filter((entry) => entry.kind === 'motion_guidance' &&
|
|
193
157
|
hasSharedSource(sourceIds, entry.sourceIds));
|
|
@@ -208,9 +172,6 @@ const buildMotionGuidanceMarkdown = (sourceIds, metadata) => {
|
|
|
208
172
|
}
|
|
209
173
|
return lines;
|
|
210
174
|
};
|
|
211
|
-
/**
|
|
212
|
-
* Converts design-system metadata into the markdown artifact variant agents consume.
|
|
213
|
-
*/
|
|
214
175
|
const buildDesignMarkdownFromMetadata = (entry, metadata) => {
|
|
215
176
|
if (entry.data.designMarkdown) {
|
|
216
177
|
return entry.data.designMarkdown;
|
|
@@ -231,9 +192,6 @@ const buildDesignMarkdownFromMetadata = (entry, metadata) => {
|
|
|
231
192
|
];
|
|
232
193
|
return `${lines.join('\n').trim()}\n`;
|
|
233
194
|
};
|
|
234
|
-
/**
|
|
235
|
-
* Builds design-context entries from action metadata when the report does not provide them directly.
|
|
236
|
-
*/
|
|
237
195
|
const designContextsFromActionMetadata = (metadata) => {
|
|
238
196
|
if (!metadata)
|
|
239
197
|
return [];
|
|
@@ -273,25 +231,13 @@ const METADATA_KIND_BY_ACTION_KIND = {
|
|
|
273
231
|
extract_design_system: 'design_system',
|
|
274
232
|
describe_motion: 'motion_guidance',
|
|
275
233
|
};
|
|
276
|
-
/**
|
|
277
|
-
* Validates the reported source plan's action/metadata invariants:
|
|
278
|
-
* - metadata is produced BY actions, so metadata reported with zero actions
|
|
279
|
-
* is rejected (it would otherwise build DESIGN.md from an orphaned payload);
|
|
280
|
-
* - every metadata entry references real raw-context sources;
|
|
281
|
-
* - every reported action produces the metadata kind it claims to.
|
|
282
|
-
*/
|
|
283
234
|
const validateActionMetadataOutputs = (args) => {
|
|
284
235
|
const actions = args.sourcePlan.actions;
|
|
285
236
|
const metadata = args.sourcePlan.metadata;
|
|
286
|
-
// Metadata is produced BY actions. A plan that reports metadata with no
|
|
287
|
-
// actions has nothing to produce it — reject rather than silently building
|
|
288
|
-
// design context from an orphaned, otherwise-unvalidated payload.
|
|
289
237
|
if (actions.length === 0 && metadata.length > 0) {
|
|
290
238
|
throw new errors_1.AgentVariantsError('SOURCE_CONTEXT_INVALID', 'source_plan reported metadata without any actions; metadata must be produced by a reported action');
|
|
291
239
|
}
|
|
292
240
|
const sourceIds = new Set(args.bundle?.userContext.map((source) => source.id) ?? []);
|
|
293
|
-
// Validate metadata sourceIds independently of `actions` so an empty action
|
|
294
|
-
// list can never skip the check wholesale.
|
|
295
241
|
for (const entry of metadata) {
|
|
296
242
|
const unknownSourceIds = entry.sourceIds.filter((sourceId) => sourceIds.size > 0 && !sourceIds.has(sourceId));
|
|
297
243
|
if (unknownSourceIds.length > 0) {
|
|
@@ -382,7 +328,6 @@ class SessionStore {
|
|
|
382
328
|
constructor(clock = SYSTEM_CLOCK) {
|
|
383
329
|
this.clock = clock;
|
|
384
330
|
}
|
|
385
|
-
// --- Lifecycle ----------------------------------------------------------
|
|
386
331
|
propose(args) {
|
|
387
332
|
const sessionId = args.sessionId ?? (0, crypto_1.randomUUID)();
|
|
388
333
|
if (this.sessions.has(sessionId)) {
|
|
@@ -457,8 +402,6 @@ class SessionStore {
|
|
|
457
402
|
}
|
|
458
403
|
reportBriefs(args) {
|
|
459
404
|
const session = this.requireSession(args.sessionId);
|
|
460
|
-
// Idempotent replay: accept regardless of current stage so retries after a
|
|
461
|
-
// stage advance still return the same response without mutating state.
|
|
462
405
|
const fp = fingerprint([
|
|
463
406
|
'reportBriefs',
|
|
464
407
|
args.sessionId,
|
|
@@ -522,8 +465,6 @@ class SessionStore {
|
|
|
522
465
|
}
|
|
523
466
|
this.validatePlanningReport(item, args.leaseId, args.attempt);
|
|
524
467
|
const { executionPlan, actions, metadata, bindings } = args.sourcePlan;
|
|
525
|
-
// Canonical path: every reported action must produce its matching metadata
|
|
526
|
-
// kind, and action sourceIds must reference real raw-context sources.
|
|
527
468
|
validateActionMetadataOutputs({
|
|
528
469
|
bundle: session.projectContext.kind === 'fresh'
|
|
529
470
|
? session.projectContext.variantContext
|
|
@@ -531,13 +472,6 @@ class SessionStore {
|
|
|
531
472
|
sourcePlan: args.sourcePlan,
|
|
532
473
|
});
|
|
533
474
|
if (session.projectContext.kind === 'fresh') {
|
|
534
|
-
// Derive DESIGN.md context directly from `design_system` action
|
|
535
|
-
// metadata. Each entry uses explicit `designMarkdown` when present, or
|
|
536
|
-
// is synthesized from the structured observations. Brief fan-out
|
|
537
|
-
// (provisionFreshWorktrees) reads slot [min(briefIndex, length-1)] with
|
|
538
|
-
// a slot-0 fallback, so a single design system ships one shared markdown
|
|
539
|
-
// while multiple design systems land on deterministic slots in report
|
|
540
|
-
// order.
|
|
541
475
|
const projectDesignContexts = designContextsFromActionMetadata(metadata);
|
|
542
476
|
session.projectContext = {
|
|
543
477
|
...session.projectContext,
|
|
@@ -603,25 +537,12 @@ class SessionStore {
|
|
|
603
537
|
const executionPlan = session.projectContext.kind === 'fresh'
|
|
604
538
|
? session.projectContext.executionPlan
|
|
605
539
|
: undefined;
|
|
606
|
-
// Surface an agent-flagged clarification as a hard blocker rather than
|
|
607
|
-
// silently downgrading to a static preview. The agent sets
|
|
608
|
-
// `userQuestion` when it cannot decide between static_preview and
|
|
609
|
-
// vite_app without more info from the user.
|
|
610
540
|
if (executionPlan?.userQuestion) {
|
|
611
541
|
throw new errors_1.AgentVariantsError('MISSING_REQUIRED_INPUT', executionPlan.userQuestion);
|
|
612
542
|
}
|
|
613
|
-
// Resolve the canonical run plan once. The topology decision below (and
|
|
614
|
-
// the orchestrator's provision/commit decisions later) read off this
|
|
615
|
-
// single source of truth rather than re-deriving from `kind` /
|
|
616
|
-
// `executionPlan.mode`. Fresh sessions default to static_preview when no
|
|
617
|
-
// plan was reported (source-less zero-to-one); source-grounded sessions
|
|
618
|
-
// carry an executionPlan from `report_source_plan`.
|
|
619
543
|
const policy = (0, runPlan_1.resolveRunPlanPolicy)(session.projectContext);
|
|
620
544
|
const wantsStaticPreview = policy.topology === 'static_preview';
|
|
621
545
|
const codeGenIds = [];
|
|
622
|
-
// For generated Vite apps, code_gen items depend on a single scaffold_base
|
|
623
|
-
// item so the orchestrator can do the Vite skeleton + npm install + asset
|
|
624
|
-
// copy before the agent leases the code_gen.
|
|
625
546
|
let scaffoldBaseId;
|
|
626
547
|
if (policy.needsScaffoldBase) {
|
|
627
548
|
scaffoldBaseId = (0, crypto_1.randomUUID)();
|
|
@@ -643,15 +564,10 @@ class SessionStore {
|
|
|
643
564
|
if (briefIndex === -1)
|
|
644
565
|
return;
|
|
645
566
|
const brief = session.briefs[briefIndex];
|
|
646
|
-
// D-VR2: Plumb the optional per-brief visualReferenceUrl into the
|
|
647
|
-
// resulting work-item input. Omitted (not nulled) when absent so the
|
|
648
|
-
// shape stays backward-compatible for callers that destructure.
|
|
649
567
|
const visualRef = brief.visualReferenceUrl
|
|
650
568
|
? { visualReferenceUrl: brief.visualReferenceUrl }
|
|
651
569
|
: {};
|
|
652
570
|
const context = resolveVariantWorkItemContext({
|
|
653
|
-
// Existing-project sessions also carry a server-owned context bundle
|
|
654
|
-
// (no source_plan stage), so thread it for both kinds.
|
|
655
571
|
bundle: session.projectContext.variantContext,
|
|
656
572
|
projectContext: session.projectContext,
|
|
657
573
|
brief,
|
|
@@ -664,8 +580,6 @@ class SessionStore {
|
|
|
664
580
|
? freshDesignContext[Math.min(briefIndex, freshDesignContext.length - 1)]
|
|
665
581
|
: undefined;
|
|
666
582
|
if (wantsStaticPreview) {
|
|
667
|
-
// Generated + static_preview: HTML is the deliverable. No scaffold or
|
|
668
|
-
// code_gen — the static_preview item is leased directly.
|
|
669
583
|
const staticPreviewItem = {
|
|
670
584
|
id: (0, crypto_1.randomUUID)(),
|
|
671
585
|
kind: 'static_preview',
|
|
@@ -693,15 +607,6 @@ class SessionStore {
|
|
|
693
607
|
session.workItemOrder.push(staticPreviewItem.id);
|
|
694
608
|
}
|
|
695
609
|
else {
|
|
696
|
-
// Existing project OR fresh+vite_app: code_gen against a worktree.
|
|
697
|
-
// Fresh+vite_app additionally depends on scaffold_base so the agent
|
|
698
|
-
// doesn't lease code_gen before the Vite skeleton lands.
|
|
699
|
-
//
|
|
700
|
-
// Per-slot designContextEntry is read by provisionFreshWorktrees to
|
|
701
|
-
// decide what DESIGN.md to write per variant. Falls back to slot 0
|
|
702
|
-
// when the session has fewer designContext entries than variants
|
|
703
|
-
// (the common case after report_source_plan ships one shared
|
|
704
|
-
// markdown).
|
|
705
610
|
const codeGenItem = {
|
|
706
611
|
id: (0, crypto_1.randomUUID)(),
|
|
707
612
|
kind: 'code_gen',
|
|
@@ -739,7 +644,6 @@ class SessionStore {
|
|
|
739
644
|
scaffoldBaseWorkItemId: scaffoldBaseId,
|
|
740
645
|
};
|
|
741
646
|
}
|
|
742
|
-
// --- Lease management ---------------------------------------------------
|
|
743
647
|
requestWork(args) {
|
|
744
648
|
const session = this.requireSession(args.sessionId);
|
|
745
649
|
this.assertStage(session, [
|
|
@@ -749,9 +653,6 @@ class SessionStore {
|
|
|
749
653
|
]);
|
|
750
654
|
this.expireStaleLeases(session);
|
|
751
655
|
let leasable = this.leasableItems(session);
|
|
752
|
-
// Targeted lease: restrict to a single named item so callers that just
|
|
753
|
-
// enqueued a specific work item (e.g. refineVariant) can't accidentally
|
|
754
|
-
// lease an unrelated leasable item that happens to sort earlier.
|
|
755
656
|
if (args.workItemId !== undefined) {
|
|
756
657
|
const target = leasable.find((item) => item.id === args.workItemId);
|
|
757
658
|
if (!target) {
|
|
@@ -760,19 +661,12 @@ class SessionStore {
|
|
|
760
661
|
leasable = [target];
|
|
761
662
|
}
|
|
762
663
|
else if (args.workItemIds !== undefined) {
|
|
763
|
-
// Scoped lease: restrict to a specific batch's work items so concurrent
|
|
764
|
-
// owners (e.g. several watchers each handling their own Vary run) don't
|
|
765
|
-
// greedily lease each other's items. Leases whatever subset of the
|
|
766
|
-
// requested ids is still leasable; only errors if NONE are.
|
|
767
664
|
const wanted = new Set(args.workItemIds);
|
|
768
665
|
leasable = leasable.filter((item) => wanted.has(item.id));
|
|
769
666
|
if (leasable.length === 0) {
|
|
770
667
|
throw new errors_1.AgentVariantsError('INVALID_STAGE_ACTION', 'None of the requested work items are currently leasable (already leased, running, or done)');
|
|
771
668
|
}
|
|
772
669
|
}
|
|
773
|
-
// `workItemIds` takes precedence over `requestedLeaseCount`: a scoped batch
|
|
774
|
-
// leases ALL of its still-leasable items, not a count-capped subset (the
|
|
775
|
-
// scoping above already narrowed `leasable` to exactly that batch).
|
|
776
670
|
const limit = args.workItemIds !== undefined
|
|
777
671
|
? leasable.length
|
|
778
672
|
: (args.requestedLeaseCount ?? leasable.length);
|
|
@@ -806,15 +700,6 @@ class SessionStore {
|
|
|
806
700
|
}
|
|
807
701
|
reportComplete(args) {
|
|
808
702
|
const session = this.requireSession(args.sessionId);
|
|
809
|
-
// Cooperative abort: if the work item was removed/cancelled while the agent
|
|
810
|
-
// was still working it (delete-while-loading, cancel_variant, or session
|
|
811
|
-
// cancel), its lease was deliberately cleared. Returning an opaque
|
|
812
|
-
// STALE_LEASE here forces the agent to guess; instead hand back an explicit
|
|
813
|
-
// `aborted` so it drops this work item right away — no retry, no recording
|
|
814
|
-
// soon-to-be-discarded output. Checked before the terminal-stage, lease,
|
|
815
|
-
// and fingerprint gates so it still fires once removal has driven the
|
|
816
|
-
// session terminal. Uses a non-throwing lookup so a report for an item that
|
|
817
|
-
// never existed still falls through to requireWorkItem's clear error.
|
|
818
703
|
const abortTarget = session.workItems.get(args.workItemId);
|
|
819
704
|
if (abortTarget &&
|
|
820
705
|
(abortTarget.removed || abortTarget.status === 'cancelled')) {
|
|
@@ -825,8 +710,6 @@ class SessionStore {
|
|
|
825
710
|
};
|
|
826
711
|
}
|
|
827
712
|
if (contracts_1.TERMINAL_STAGES.has(session.stage)) {
|
|
828
|
-
// idempotent: terminal sessions accept replays of accepted fingerprints,
|
|
829
|
-
// reject new mutating reports.
|
|
830
713
|
const fp = fingerprint([
|
|
831
714
|
'reportComplete',
|
|
832
715
|
args.sessionId,
|
|
@@ -855,7 +738,6 @@ class SessionStore {
|
|
|
855
738
|
return cached;
|
|
856
739
|
this.validateLease(item, args.leaseId, args.attempt);
|
|
857
740
|
if (args.status === 'running') {
|
|
858
|
-
// mid-status heartbeat: extend lease, return progress.
|
|
859
741
|
const now = this.clock.now();
|
|
860
742
|
if (item.lease) {
|
|
861
743
|
item.lease.leaseExpiresAt = now + leaseTtlForKind(item.kind);
|
|
@@ -870,9 +752,6 @@ class SessionStore {
|
|
|
870
752
|
item.error = args.error;
|
|
871
753
|
if (args.runtime)
|
|
872
754
|
item.runtime = args.runtime;
|
|
873
|
-
// Apply an agent-synthesized title/description so the variant card shows a
|
|
874
|
-
// meaningful name (parent identity + the change) instead of the provisional
|
|
875
|
-
// instruction text. Only on success; capped so the label stays short.
|
|
876
755
|
if (args.status === 'succeeded' && (args.title || args.description)) {
|
|
877
756
|
const input = item.input;
|
|
878
757
|
if (args.title)
|
|
@@ -885,24 +764,10 @@ class SessionStore {
|
|
|
885
764
|
if (args.status === 'failed') {
|
|
886
765
|
this.cascadeDependencyFailure(session, item.id);
|
|
887
766
|
}
|
|
888
|
-
else if (args.status === 'succeeded') {
|
|
889
|
-
// succeeded items unblock dependents — handled in leasableItems()
|
|
890
|
-
}
|
|
891
767
|
const result = this.evaluateTerminal(session);
|
|
892
768
|
session.acceptedFingerprints.set(fp, result);
|
|
893
769
|
return result;
|
|
894
770
|
}
|
|
895
|
-
/**
|
|
896
|
-
* Re-open a succeeded variant work item for one QA-driven regeneration.
|
|
897
|
-
* Consumes the agent's report (validating the lease), then resets the item
|
|
898
|
-
* to `pending` so it becomes leasable again via `request_work`, stashing the
|
|
899
|
-
* QA notes onto its input so the re-leased descriptor carries the notes the
|
|
900
|
-
* agent must address before re-reporting.
|
|
901
|
-
*
|
|
902
|
-
* The work item never reaches a terminal status, so the session stays in
|
|
903
|
-
* `waiting_for_results` and never goes terminal off the back of a QA
|
|
904
|
-
* failure. Idempotent on replay via the accepted-fingerprint cache.
|
|
905
|
-
*/
|
|
906
771
|
requeueForRegeneration(args) {
|
|
907
772
|
const session = this.requireSession(args.sessionId);
|
|
908
773
|
const fp = fingerprint([
|
|
@@ -918,8 +783,6 @@ class SessionStore {
|
|
|
918
783
|
this.assertStage(session, ['work_items_ready', 'waiting_for_results']);
|
|
919
784
|
const item = this.requireWorkItem(session, args.workItemId);
|
|
920
785
|
this.validateLease(item, args.leaseId, args.attempt);
|
|
921
|
-
// Reset to pending so request_work re-surfaces it. The re-lease increments
|
|
922
|
-
// `attempt`, so the regenerated report carries a fresh fingerprint.
|
|
923
786
|
item.status = 'pending';
|
|
924
787
|
item.lease = undefined;
|
|
925
788
|
item.output = undefined;
|
|
@@ -933,11 +796,6 @@ class SessionStore {
|
|
|
933
796
|
session.acceptedFingerprints.set(fp, result);
|
|
934
797
|
return result;
|
|
935
798
|
}
|
|
936
|
-
/**
|
|
937
|
-
* Creates a refinable HTML work item for a completed static preview variant.
|
|
938
|
-
* The target variant remains the user-facing snapshot; this work item only
|
|
939
|
-
* tracks the in-flight refinement and is surfaced through its `refinement`.
|
|
940
|
-
*/
|
|
941
799
|
createRefineVariantWorkItem(args) {
|
|
942
800
|
const session = this.requireSession(args.sessionId);
|
|
943
801
|
const target = this.requireWorkItem(session, args.variantId);
|
|
@@ -988,15 +846,6 @@ class SessionStore {
|
|
|
988
846
|
session.stage = 'work_items_ready';
|
|
989
847
|
return item;
|
|
990
848
|
}
|
|
991
|
-
/**
|
|
992
|
-
* Fork a completed static_preview variant into N NEW sibling variants. Unlike
|
|
993
|
-
* {@link createRefineVariantWorkItem} (which overwrites the source variant in
|
|
994
|
-
* place), each forked item is a fresh `static_preview` work item with its own
|
|
995
|
-
* id, seeded from the source variant's HTML (`currentHtml`) plus the user's
|
|
996
|
-
* instruction. This backs the "Vary" action, where `variantRequest.count`
|
|
997
|
-
* asks for N new explorations rather than an in-place edit. Returns the
|
|
998
|
-
* created items so the caller can lease them via the normal request-work path.
|
|
999
|
-
*/
|
|
1000
849
|
createForkedStaticPreviewWorkItems(args) {
|
|
1001
850
|
const session = this.requireSession(args.sessionId);
|
|
1002
851
|
const source = this.requireWorkItem(session, args.sourceVariantId);
|
|
@@ -1022,10 +871,6 @@ class SessionStore {
|
|
|
1022
871
|
source.output?.html;
|
|
1023
872
|
const briefs = args.briefs?.map(briefContent_1.normalizeBriefContent);
|
|
1024
873
|
const total = Math.min(briefs?.length ?? Math.max(Math.trunc(args.count) || 1, 1), contracts_1.VARIANT_COUNT_MAX);
|
|
1025
|
-
// Label/describe forked variants by the CHANGE requested (the Vary
|
|
1026
|
-
// instruction), not the source brief — otherwise every run on the same
|
|
1027
|
-
// variant reads identically ("<source> · variation N") and concurrent runs
|
|
1028
|
-
// are indistinguishable in the Directions list.
|
|
1029
874
|
const instruction = args.instruction.trim();
|
|
1030
875
|
const prettyInstruction = instruction
|
|
1031
876
|
? instruction.charAt(0).toUpperCase() + instruction.slice(1)
|
|
@@ -1046,8 +891,6 @@ class SessionStore {
|
|
|
1046
891
|
dependsOn: [],
|
|
1047
892
|
input: {
|
|
1048
893
|
briefId: `${sourceInput.briefId ?? 'v'}-vary-${(0, crypto_1.randomUUID)().slice(0, 8)}`,
|
|
1049
|
-
// Agent-authored metadata is visible from the start. Human-direct
|
|
1050
|
-
// fallback metadata can still be replaced on completion.
|
|
1051
894
|
briefLabel: brief?.label ?? `${labelBase}${suffix}`,
|
|
1052
895
|
briefBody: brief?.body ?? prettyInstruction,
|
|
1053
896
|
...(args.runLabel ? { runLabel: args.runLabel } : {}),
|
|
@@ -1056,8 +899,6 @@ class SessionStore {
|
|
|
1056
899
|
: {}),
|
|
1057
900
|
instruction: args.instruction,
|
|
1058
901
|
sourceVariantId: args.sourceVariantId,
|
|
1059
|
-
// Parent identity, so the agent can synthesize a name/description that
|
|
1060
|
-
// combines the source variant with the requested change.
|
|
1061
902
|
...(sourceInput.briefLabel
|
|
1062
903
|
? { sourceLabel: sourceInput.briefLabel }
|
|
1063
904
|
: {}),
|
|
@@ -1075,33 +916,12 @@ class SessionStore {
|
|
|
1075
916
|
acceptedReports: [],
|
|
1076
917
|
};
|
|
1077
918
|
session.workItems.set(item.id, item);
|
|
1078
|
-
// Surface newest siblings at the top of the Directions list: unshift each
|
|
1079
|
-
// in creation order so the batch ends up [variation N … variation 1]
|
|
1080
|
-
// ahead of the pre-existing variants.
|
|
1081
919
|
session.workItemOrder.unshift(item.id);
|
|
1082
920
|
created.push(item);
|
|
1083
921
|
}
|
|
1084
922
|
session.stage = 'work_items_ready';
|
|
1085
923
|
return created;
|
|
1086
924
|
}
|
|
1087
|
-
/**
|
|
1088
|
-
* Append new code_gen variants to an EXISTING-project session that already
|
|
1089
|
-
* holds variants — the worktree-backed analog of
|
|
1090
|
-
* {@link createForkedStaticPreviewWorkItems}. A second "Vary" on an existing
|
|
1091
|
-
* project lands here so its variants ACCUMULATE in the live session instead
|
|
1092
|
-
* of orphaning the prior ones in a fresh, superseding session. The new items
|
|
1093
|
-
* are leasable via {@link requestWork} exactly like the initial code_gen
|
|
1094
|
-
* batch; the orchestrator provisions a worktree per item and runs each
|
|
1095
|
-
* through the normal completion/preview pipeline.
|
|
1096
|
-
*
|
|
1097
|
-
* With `sourceVariantId`, forks a succeeded code_gen parent: each new item
|
|
1098
|
-
* is stamped with the source id (+ sourceLabel/sourceBody) so the
|
|
1099
|
-
* orchestrator seeds its worktree from the parent's tree rather than git
|
|
1100
|
-
* HEAD / Original. Backs code_gen "Vary" targeting a parent variant.
|
|
1101
|
-
*
|
|
1102
|
-
* Reopens the session to `work_items_ready` so the appended pending work is
|
|
1103
|
-
* visible and drives the stage back through generation to ready/degraded.
|
|
1104
|
-
*/
|
|
1105
925
|
appendCodeGenVariants(args) {
|
|
1106
926
|
const session = this.requireSession(args.sessionId);
|
|
1107
927
|
const source = args.sourceVariantId
|
|
@@ -1180,8 +1000,6 @@ class SessionStore {
|
|
|
1180
1000
|
acceptedReports: [],
|
|
1181
1001
|
};
|
|
1182
1002
|
session.workItems.set(item.id, item);
|
|
1183
|
-
// Surface the newest Vary batch at the top of the Directions list, matching
|
|
1184
|
-
// the static-preview fork ordering.
|
|
1185
1003
|
session.workItemOrder.unshift(item.id);
|
|
1186
1004
|
session.briefs.push(brief);
|
|
1187
1005
|
createdWorkItemIds.push(item.id);
|
|
@@ -1189,24 +1007,6 @@ class SessionStore {
|
|
|
1189
1007
|
session.stage = 'work_items_ready';
|
|
1190
1008
|
return { createdWorkItemIds, briefs: args.briefs };
|
|
1191
1009
|
}
|
|
1192
|
-
/**
|
|
1193
|
-
* Adopt a PAST variant (from a prior session's persisted history) into THIS
|
|
1194
|
-
* active session as a first-class, already-`succeeded` `static_preview`
|
|
1195
|
-
* variant. Triggered when the user makes their first edit (a comment or a
|
|
1196
|
-
* Vary) on a selected past direction: the past variant is rehydrated as a
|
|
1197
|
-
* live session member so the comment/refine machinery scopes and routes to it
|
|
1198
|
-
* exactly like a freshly-generated variant. The caller (orchestrator) registers
|
|
1199
|
-
* the static-preview record that points at the rehydrated files so the snapshot
|
|
1200
|
-
* surfaces it as a `static_artifact`.
|
|
1201
|
-
*
|
|
1202
|
-
* Kept as `static_preview` regardless of the host session's primary variant
|
|
1203
|
-
* kind so {@link createRefineVariantWorkItem} / {@link createForkedStaticPreviewWorkItems}
|
|
1204
|
-
* accept it. Adopted variants are pre-completed artifacts, so they are excluded
|
|
1205
|
-
* from progress/summary/terminal accounting and never reopen the session.
|
|
1206
|
-
*
|
|
1207
|
-
* Idempotent: re-adopting the same `{sessionId, variantId}` returns the
|
|
1208
|
-
* existing work item id (`created: false`) rather than duplicating it.
|
|
1209
|
-
*/
|
|
1210
1010
|
appendAdoptedStaticVariant(args) {
|
|
1211
1011
|
const session = this.requireSession(args.sessionId);
|
|
1212
1012
|
if (session.stage === 'cancelled' || session.stage === 'failed') {
|
|
@@ -1242,27 +1042,9 @@ class SessionStore {
|
|
|
1242
1042
|
acceptedReports: [],
|
|
1243
1043
|
};
|
|
1244
1044
|
session.workItems.set(item.id, item);
|
|
1245
|
-
// Adoption is triggered by the user's first in-place edit (a comment /
|
|
1246
|
-
// refine) on an ALREADY-DISPLAYED past direction — not a request for a new
|
|
1247
|
-
// exploration. Appending (rather than unshifting to the top) preserves the
|
|
1248
|
-
// positions of the existing active variants so a refined card does NOT
|
|
1249
|
-
// leapfrog a newer Vary/fork batch. Genuinely new variants (Vary / fork /
|
|
1250
|
-
// append) still surface at the top via their own `unshift` paths. Stage is
|
|
1251
|
-
// intentionally left untouched — the adopted variant is already complete,
|
|
1252
|
-
// so the session must not reopen to `work_items_ready`.
|
|
1253
1045
|
session.workItemOrder.push(item.id);
|
|
1254
1046
|
return { workItemId: item.id, briefId, created: true };
|
|
1255
1047
|
}
|
|
1256
|
-
/**
|
|
1257
|
-
* Create an active session whose initial visible direction is a static
|
|
1258
|
-
* variant rehydrated from persisted history.
|
|
1259
|
-
*
|
|
1260
|
-
* This is the no-usable-session counterpart to
|
|
1261
|
-
* {@link appendAdoptedStaticVariant}: the session starts terminal/ready
|
|
1262
|
-
* because the adopted artifact is already generated, and the adopted work item
|
|
1263
|
-
* remains excluded from generation progress because this run did not generate
|
|
1264
|
-
* fresh variants.
|
|
1265
|
-
*/
|
|
1266
1048
|
createSessionFromStaticHistoryVariant(args) {
|
|
1267
1049
|
const sessionId = (0, crypto_1.randomUUID)();
|
|
1268
1050
|
const record = {
|
|
@@ -1293,7 +1075,6 @@ class SessionStore {
|
|
|
1293
1075
|
briefId: adopted.briefId,
|
|
1294
1076
|
};
|
|
1295
1077
|
}
|
|
1296
|
-
/** Find an already-adopted variant by its source identity, or undefined. */
|
|
1297
1078
|
findAdoptedVariant(session, source) {
|
|
1298
1079
|
for (const item of session.workItems.values()) {
|
|
1299
1080
|
if (item.removed)
|
|
@@ -1308,13 +1089,6 @@ class SessionStore {
|
|
|
1308
1089
|
}
|
|
1309
1090
|
return undefined;
|
|
1310
1091
|
}
|
|
1311
|
-
/**
|
|
1312
|
-
* Stamp a UI correlation id onto already-created variant work items so the
|
|
1313
|
-
* snapshot surfaces it and the panel can map its optimistic placeholders to
|
|
1314
|
-
* the real cards (see {@link ActiveVariantSnapshot.requestId}). Skips ids
|
|
1315
|
-
* that are unknown to the session. Used by `start_variants` for both the
|
|
1316
|
-
* initial batch and the appended (accumulated) batch.
|
|
1317
|
-
*/
|
|
1318
1092
|
assignVariantRequestId(sessionId, workItemIds, requestId) {
|
|
1319
1093
|
const session = this.requireSession(sessionId);
|
|
1320
1094
|
for (const id of workItemIds) {
|
|
@@ -1325,14 +1099,6 @@ class SessionStore {
|
|
|
1325
1099
|
item.input = { ...input, requestId };
|
|
1326
1100
|
}
|
|
1327
1101
|
}
|
|
1328
|
-
/**
|
|
1329
|
-
* Fold a newer instruction into a variant's still-pending refinement. Used
|
|
1330
|
-
* when a second refinement is requested for a variant that already has a
|
|
1331
|
-
* queued (not yet leased) refinement: the new instruction is appended so the
|
|
1332
|
-
* agent applies both rather than dropping the later request. The latest
|
|
1333
|
-
* request's fidelity replaces the queued choice; omission restores the
|
|
1334
|
-
* server default. Returns false when no pending refinement exists.
|
|
1335
|
-
*/
|
|
1336
1102
|
appendPendingRefineVariantInstruction(args) {
|
|
1337
1103
|
const session = this.requireSession(args.sessionId);
|
|
1338
1104
|
const refineItem = [...session.workItems.values()].find((item) => {
|
|
@@ -1356,11 +1122,6 @@ class SessionStore {
|
|
|
1356
1122
|
}
|
|
1357
1123
|
return true;
|
|
1358
1124
|
}
|
|
1359
|
-
/**
|
|
1360
|
-
* Lease the pending refinement already associated with a specific static
|
|
1361
|
-
* preview variant. Keeps multi-target refinement batches independent of
|
|
1362
|
-
* work-item order.
|
|
1363
|
-
*/
|
|
1364
1125
|
leaseRefineItemForVariant(args) {
|
|
1365
1126
|
const session = this.requireSession(args.sessionId);
|
|
1366
1127
|
const runningRefinement = [...session.workItems.values()].find((item) => {
|
|
@@ -1387,15 +1148,6 @@ class SessionStore {
|
|
|
1387
1148
|
workItemId: refineItem.id,
|
|
1388
1149
|
});
|
|
1389
1150
|
}
|
|
1390
|
-
/**
|
|
1391
|
-
* Mark a server-owned work item as succeeded without going through the
|
|
1392
|
-
* lease + agent-report path. Used for `scaffold_base` items where the
|
|
1393
|
-
* orchestrator runs the scaffold + npm install in the background and needs
|
|
1394
|
-
* to unblock dependent code_gen items when it's done.
|
|
1395
|
-
*
|
|
1396
|
-
* Bypasses lease validation because no lease was ever issued for internal
|
|
1397
|
-
* items. Idempotent: completing an already-succeeded item is a no-op.
|
|
1398
|
-
*/
|
|
1399
1151
|
completeInternal(args) {
|
|
1400
1152
|
const session = this.requireSession(args.sessionId);
|
|
1401
1153
|
const item = this.requireWorkItem(session, args.workItemId);
|
|
@@ -1410,11 +1162,6 @@ class SessionStore {
|
|
|
1410
1162
|
item.lease = undefined;
|
|
1411
1163
|
return this.evaluateTerminal(session);
|
|
1412
1164
|
}
|
|
1413
|
-
/**
|
|
1414
|
-
* Mark a server-owned work item as failed, cascading DEPENDENCY_FAILED to
|
|
1415
|
-
* its dependents. Used when the orchestrator's background scaffold work
|
|
1416
|
-
* (npm install, file writes) fails and we need the session to degrade.
|
|
1417
|
-
*/
|
|
1418
1165
|
failInternal(args) {
|
|
1419
1166
|
const session = this.requireSession(args.sessionId);
|
|
1420
1167
|
const item = this.requireWorkItem(session, args.workItemId);
|
|
@@ -1430,7 +1177,6 @@ class SessionStore {
|
|
|
1430
1177
|
this.cascadeDependencyFailure(session, item.id);
|
|
1431
1178
|
return this.evaluateTerminal(session);
|
|
1432
1179
|
}
|
|
1433
|
-
// --- Cancel / cleanup ---------------------------------------------------
|
|
1434
1180
|
cancel(args) {
|
|
1435
1181
|
const session = this.requireSession(args.sessionId);
|
|
1436
1182
|
if (session.stage === 'cancelled') {
|
|
@@ -1444,18 +1190,8 @@ class SessionStore {
|
|
|
1444
1190
|
item.lease = undefined;
|
|
1445
1191
|
}
|
|
1446
1192
|
}
|
|
1447
|
-
// No cleanup_runtime items in Phase 1; status starts as pending until
|
|
1448
|
-
// Phase 2 wires the worktree teardown.
|
|
1449
1193
|
return { stage: 'cancelled', cleanupStatus: 'pending' };
|
|
1450
1194
|
}
|
|
1451
|
-
/**
|
|
1452
|
-
* Cancel a single work item without tearing down its sibling variants or
|
|
1453
|
-
* the session itself. Idempotent on terminal states — already-cancelled,
|
|
1454
|
-
* succeeded, or failed items return their current status with
|
|
1455
|
-
* `alreadyTerminal: true` and no state change. Triggers
|
|
1456
|
-
* `evaluateTerminal` so the session can reach a terminal stage if this
|
|
1457
|
-
* was the last in-flight item.
|
|
1458
|
-
*/
|
|
1459
1195
|
cancelWorkItem(args) {
|
|
1460
1196
|
const session = this.requireSession(args.sessionId);
|
|
1461
1197
|
const item = this.requireWorkItem(session, args.workItemId);
|
|
@@ -1479,14 +1215,6 @@ class SessionStore {
|
|
|
1479
1215
|
alreadyTerminal: false,
|
|
1480
1216
|
};
|
|
1481
1217
|
}
|
|
1482
|
-
/**
|
|
1483
|
-
* Remove a variant from the UI. The work item is retained in the session
|
|
1484
|
-
* (and the caller persists it to `.rivet/variants/` as `removed`) but its
|
|
1485
|
-
* `removed` flag excludes it from the active snapshot, progress/summary, and
|
|
1486
|
-
* terminal evaluation — so it is never rendered again. Any in-flight work is
|
|
1487
|
-
* cancelled first so the hidden variant doesn't keep a lease or resurface via
|
|
1488
|
-
* `request_work`; terminal variants keep their final status. Idempotent.
|
|
1489
|
-
*/
|
|
1490
1218
|
removeWorkItem(args) {
|
|
1491
1219
|
const session = this.requireSession(args.sessionId);
|
|
1492
1220
|
const item = this.requireWorkItem(session, args.workItemId);
|
|
@@ -1503,10 +1231,6 @@ class SessionStore {
|
|
|
1503
1231
|
item.lease = undefined;
|
|
1504
1232
|
}
|
|
1505
1233
|
item.removed = true;
|
|
1506
|
-
// Cancel any in-flight refinement for this variant too — otherwise a
|
|
1507
|
-
// pending/running refine_variant keeps the session busy (evaluateTerminal
|
|
1508
|
-
// waits on it) and request_work could keep leasing hidden refinement work
|
|
1509
|
-
// after the parent variant was removed.
|
|
1510
1234
|
for (const other of session.workItems.values()) {
|
|
1511
1235
|
if (other.kind !== 'refine_variant')
|
|
1512
1236
|
continue;
|
|
@@ -1526,12 +1250,6 @@ class SessionStore {
|
|
|
1526
1250
|
alreadyRemoved: false,
|
|
1527
1251
|
};
|
|
1528
1252
|
}
|
|
1529
|
-
/**
|
|
1530
|
-
* Rename a variant: patches the brief label held in the work item's `input`
|
|
1531
|
-
* blob (the same field `variantsOf` reads for the snapshot `label`), so the
|
|
1532
|
-
* next `emitChange` pushes the new title to the UI. Pure metadata edit — it
|
|
1533
|
-
* never touches status, lease, or refinement state. Idempotent.
|
|
1534
|
-
*/
|
|
1535
1253
|
renameWorkItem(args) {
|
|
1536
1254
|
const session = this.requireSession(args.sessionId);
|
|
1537
1255
|
const item = this.requireWorkItem(session, args.workItemId);
|
|
@@ -1543,12 +1261,6 @@ class SessionStore {
|
|
|
1543
1261
|
sessionStage: session.stage,
|
|
1544
1262
|
};
|
|
1545
1263
|
}
|
|
1546
|
-
/**
|
|
1547
|
-
* Re-home every non-removed work item in one request batch whose effective
|
|
1548
|
-
* run label matches. The explicit request id prevents same-label batches in
|
|
1549
|
-
* one session from affecting each other; an absent id selects the session's
|
|
1550
|
-
* initial batch. The new label is stamped per item as `input.runLabel`.
|
|
1551
|
-
*/
|
|
1552
1264
|
renameRun(args) {
|
|
1553
1265
|
const session = this.requireSession(args.sessionId);
|
|
1554
1266
|
const sessionFallback = session.runLabel ?? (0, runLabel_1.deriveRunLabel)(session.prompt);
|
|
@@ -1568,7 +1280,6 @@ class SessionStore {
|
|
|
1568
1280
|
}
|
|
1569
1281
|
return { workItemIds, sessionStage: session.stage };
|
|
1570
1282
|
}
|
|
1571
|
-
// --- Variant pick handoff ----------------------------------------------
|
|
1572
1283
|
recordVariantPick(args) {
|
|
1573
1284
|
const session = this.requireSession(args.sessionId);
|
|
1574
1285
|
if (!['ready', 'degraded'].includes(session.stage)) {
|
|
@@ -1584,15 +1295,12 @@ class SessionStore {
|
|
|
1584
1295
|
session.variantPick = args.envelope;
|
|
1585
1296
|
return { duplicate: false };
|
|
1586
1297
|
}
|
|
1587
|
-
// --- Read accessors -----------------------------------------------------
|
|
1588
1298
|
getStage(sessionId) {
|
|
1589
1299
|
return this.requireSession(sessionId).stage;
|
|
1590
1300
|
}
|
|
1591
1301
|
getPrompt(sessionId) {
|
|
1592
1302
|
return this.requireSession(sessionId).prompt;
|
|
1593
1303
|
}
|
|
1594
|
-
/** The run's label — the agent-provided one if present, else a heuristic
|
|
1595
|
-
* derived from the prompt. */
|
|
1596
1304
|
getRunLabel(sessionId) {
|
|
1597
1305
|
const session = this.requireSession(sessionId);
|
|
1598
1306
|
return session.runLabel ?? (0, runLabel_1.deriveRunLabel)(session.prompt);
|
|
@@ -1611,8 +1319,6 @@ class SessionStore {
|
|
|
1611
1319
|
const session = this.requireSession(sessionId);
|
|
1612
1320
|
return this.variantsOf(session);
|
|
1613
1321
|
}
|
|
1614
|
-
/** Record the run's worker-runtime lease summary (see
|
|
1615
|
-
* ActiveSnapshot.workerRuntime). Latest batch wins. */
|
|
1616
1322
|
setWorkerRuntime(sessionId, summary) {
|
|
1617
1323
|
const session = this.sessions.get(sessionId);
|
|
1618
1324
|
if (session)
|
|
@@ -1621,16 +1327,15 @@ class SessionStore {
|
|
|
1621
1327
|
getWorkerRuntime(sessionId) {
|
|
1622
1328
|
return this.sessions.get(sessionId)?.workerRuntime;
|
|
1623
1329
|
}
|
|
1624
|
-
/** The runtime that executed a work item's worker, when the executor
|
|
1625
|
-
* reported one — read at history-persist time so manifests carry it. */
|
|
1626
1330
|
getWorkItemRuntime(sessionId, workItemId) {
|
|
1627
1331
|
return this.sessions.get(sessionId)?.workItems.get(workItemId)?.runtime;
|
|
1628
1332
|
}
|
|
1629
1333
|
getHostWork(sessionId) {
|
|
1630
1334
|
const session = this.requireSession(sessionId);
|
|
1631
|
-
return [...session.workItems.values()]
|
|
1632
|
-
|
|
1633
|
-
|
|
1335
|
+
return [...session.workItems.values()].flatMap((item) => {
|
|
1336
|
+
const { lease } = item;
|
|
1337
|
+
if (!lease || item.status !== 'running')
|
|
1338
|
+
return [];
|
|
1634
1339
|
const input = item.input && typeof item.input === 'object'
|
|
1635
1340
|
? item.input
|
|
1636
1341
|
: {};
|
|
@@ -1642,10 +1347,10 @@ class SessionStore {
|
|
|
1642
1347
|
variantId,
|
|
1643
1348
|
kind: item.kind,
|
|
1644
1349
|
status: item.status,
|
|
1645
|
-
leaseId:
|
|
1646
|
-
leaseOwner:
|
|
1647
|
-
attempt:
|
|
1648
|
-
leaseExpiresAt:
|
|
1350
|
+
leaseId: lease.leaseId,
|
|
1351
|
+
leaseOwner: lease.leaseOwner,
|
|
1352
|
+
attempt: lease.attempt,
|
|
1353
|
+
leaseExpiresAt: lease.leaseExpiresAt,
|
|
1649
1354
|
input: item.input,
|
|
1650
1355
|
outputSchema: outputSchemaFor(item.kind),
|
|
1651
1356
|
};
|
|
@@ -1654,7 +1359,6 @@ class SessionStore {
|
|
|
1654
1359
|
getVariantPick(sessionId) {
|
|
1655
1360
|
return this.requireSession(sessionId).variantPick;
|
|
1656
1361
|
}
|
|
1657
|
-
/** Validates a report lease without mutating the work item. */
|
|
1658
1362
|
validateReportLease(args) {
|
|
1659
1363
|
const session = this.requireSession(args.sessionId);
|
|
1660
1364
|
const item = this.requireWorkItem(session, args.workItemId);
|
|
@@ -1663,8 +1367,6 @@ class SessionStore {
|
|
|
1663
1367
|
hasSession(sessionId) {
|
|
1664
1368
|
return this.sessions.has(sessionId);
|
|
1665
1369
|
}
|
|
1666
|
-
/** Read a work item's input blob — used by the orchestrator to recover
|
|
1667
|
-
* briefLabel / target / projectContext when committing the output. */
|
|
1668
1370
|
getWorkItemInput(sessionId, workItemId) {
|
|
1669
1371
|
const session = this.requireSession(sessionId);
|
|
1670
1372
|
const item = this.requireWorkItem(session, workItemId);
|
|
@@ -1675,37 +1377,24 @@ class SessionStore {
|
|
|
1675
1377
|
const item = this.requireWorkItem(session, workItemId);
|
|
1676
1378
|
return item.output;
|
|
1677
1379
|
}
|
|
1678
|
-
/** Returns the authoritative status after report validation and post-processing. */
|
|
1679
1380
|
getWorkItemStatus(sessionId, workItemId) {
|
|
1680
1381
|
const session = this.requireSession(sessionId);
|
|
1681
1382
|
return this.requireWorkItem(session, workItemId).status;
|
|
1682
1383
|
}
|
|
1683
|
-
/** Replaces a completed work item's output after server-side post-processing. */
|
|
1684
1384
|
replaceWorkItemOutput(sessionId, workItemId, output) {
|
|
1685
1385
|
const session = this.requireSession(sessionId);
|
|
1686
1386
|
const item = this.requireWorkItem(session, workItemId);
|
|
1687
1387
|
item.output = output;
|
|
1688
1388
|
}
|
|
1689
|
-
/** Read a work item's `kind` discriminator (brief | source_plan |
|
|
1690
|
-
* static_preview | code_gen | scaffold_base). Used by callers that need to
|
|
1691
|
-
* branch their validation on the work-item shape — e.g. enforcing the
|
|
1692
|
-
* inline-HTML contract on static_preview `succeeded` reports. */
|
|
1693
1389
|
getWorkItemKind(sessionId, workItemId) {
|
|
1694
1390
|
const session = this.requireSession(sessionId);
|
|
1695
1391
|
const item = this.requireWorkItem(session, workItemId);
|
|
1696
1392
|
return item.kind;
|
|
1697
1393
|
}
|
|
1698
|
-
/** True when the work item forks an existing variant (execution mode
|
|
1699
|
-
* "vary"). Non-throwing so telemetry callers can read it on any item:
|
|
1700
|
-
* unknown session or work item reads as not-a-fork. */
|
|
1701
1394
|
isVaryForkWorkItem(sessionId, workItemId) {
|
|
1702
1395
|
const item = this.sessions.get(sessionId)?.workItems.get(workItemId);
|
|
1703
1396
|
return Boolean(item && item.input.sourceVariantId);
|
|
1704
1397
|
}
|
|
1705
|
-
/** True when the work item was removed or cancelled out from under the agent.
|
|
1706
|
-
* The orchestrator checks this to short-circuit the schema/QA gates before a
|
|
1707
|
-
* `report_variant_complete` it's about to abort. Non-throwing: unknown
|
|
1708
|
-
* session or work item reads as not-aborted. */
|
|
1709
1398
|
isWorkItemAborted(sessionId, workItemId) {
|
|
1710
1399
|
const session = this.sessions.get(sessionId);
|
|
1711
1400
|
if (!session)
|
|
@@ -1713,11 +1402,9 @@ class SessionStore {
|
|
|
1713
1402
|
const item = session.workItems.get(workItemId);
|
|
1714
1403
|
return Boolean(item && (item.removed || item.status === 'cancelled'));
|
|
1715
1404
|
}
|
|
1716
|
-
/** Read the projectContext for a session (existing | fresh). */
|
|
1717
1405
|
getProjectContext(sessionId) {
|
|
1718
1406
|
return this.requireSession(sessionId).projectContext;
|
|
1719
1407
|
}
|
|
1720
|
-
// --- Internals ----------------------------------------------------------
|
|
1721
1408
|
requireSession(sessionId) {
|
|
1722
1409
|
const s = this.sessions.get(sessionId);
|
|
1723
1410
|
if (!s) {
|
|
@@ -1737,19 +1424,6 @@ class SessionStore {
|
|
|
1737
1424
|
throw new errors_1.AgentVariantsError('INVALID_STAGE_ACTION', `Action not allowed in stage ${session.stage}; allowed: ${allowed.join(', ')}`);
|
|
1738
1425
|
}
|
|
1739
1426
|
}
|
|
1740
|
-
/**
|
|
1741
|
-
* Validates a report against a planning work item (source_plan or brief).
|
|
1742
|
-
*
|
|
1743
|
-
* Planning items are single-planner and attempt-gated. `propose` /
|
|
1744
|
-
* `start_variants` hand back the source_plan item, and `report_source_plan`
|
|
1745
|
-
* hands back the brief item, WITHOUT issuing a lease — so the agent reports
|
|
1746
|
-
* against them directly (no `request_work` round-trip) and may carry a stale
|
|
1747
|
-
* or guessed `leaseId` from an earlier stage. When the item carries an active
|
|
1748
|
-
* lease (the agent went through `request_work`, e.g. a recovery re-lease),
|
|
1749
|
-
* validate it strictly. Otherwise gate on `attempt` alone and ignore any
|
|
1750
|
-
* provided leaseId, so a direct report no longer fails with LEASE_MISMATCH
|
|
1751
|
-
* and force a wasteful re-request → re-report round-trip.
|
|
1752
|
-
*/
|
|
1753
1427
|
validatePlanningReport(item, leaseId, attempt) {
|
|
1754
1428
|
if (item.lease) {
|
|
1755
1429
|
this.validateLease(item, leaseId ?? '', attempt);
|
|
@@ -1788,9 +1462,10 @@ class SessionStore {
|
|
|
1788
1462
|
const out = [];
|
|
1789
1463
|
for (const id of session.workItemOrder) {
|
|
1790
1464
|
const item = session.workItems.get(id);
|
|
1465
|
+
if (!item)
|
|
1466
|
+
throw new Error(`Missing ordered work item: ${id}`);
|
|
1791
1467
|
if (item.kind === 'brief')
|
|
1792
1468
|
continue;
|
|
1793
|
-
// Server-owned items never surface to external agents.
|
|
1794
1469
|
if (item.internal)
|
|
1795
1470
|
continue;
|
|
1796
1471
|
if (item.status !== 'pending')
|
|
@@ -1843,23 +1518,10 @@ class SessionStore {
|
|
|
1843
1518
|
}
|
|
1844
1519
|
terminalItems(session) {
|
|
1845
1520
|
const kind = this.variantWorkItemKind(session);
|
|
1846
|
-
// Removed variants are excluded everywhere progress/summary/terminal
|
|
1847
|
-
// accounting reads from, so a removed variant neither blocks the session
|
|
1848
|
-
// from going terminal nor inflates the ready/total counts. Adopted past
|
|
1849
|
-
// variants are likewise excluded: they are pre-completed artifacts pulled in
|
|
1850
|
-
// for editing, not part of this run's generation, so they must not inflate
|
|
1851
|
-
// progress/total or flip a failed run to degraded.
|
|
1852
1521
|
return [...session.workItems.values()].filter((i) => (i.kind === kind || isForkedStaticPreviewVariant(i)) &&
|
|
1853
1522
|
!i.removed &&
|
|
1854
1523
|
!isAdoptedVariant(i));
|
|
1855
1524
|
}
|
|
1856
|
-
/**
|
|
1857
|
-
* The work-item kind that represents a user-facing variant for this
|
|
1858
|
-
* session. Drives both progress accounting and the active variants
|
|
1859
|
-
* snapshot. Fresh+vite_app sessions use `code_gen` like existing
|
|
1860
|
-
* projects; fresh+static_preview (the default for source-less 0→1)
|
|
1861
|
-
* keeps `static_preview` as the deliverable.
|
|
1862
|
-
*/
|
|
1863
1525
|
variantWorkItemKind(session) {
|
|
1864
1526
|
if (session.projectContext.kind !== 'fresh')
|
|
1865
1527
|
return 'code_gen';
|
|
@@ -1876,9 +1538,6 @@ class SessionStore {
|
|
|
1876
1538
|
};
|
|
1877
1539
|
}
|
|
1878
1540
|
const items = this.terminalItems(session);
|
|
1879
|
-
// No live variants (e.g. the user removed them all) — don't flip an empty
|
|
1880
|
-
// session to a terminal "ready" state with zero successes; leave the stage
|
|
1881
|
-
// as-is.
|
|
1882
1541
|
if (items.length === 0) {
|
|
1883
1542
|
return {
|
|
1884
1543
|
stage: session.stage,
|
|
@@ -1975,22 +1634,11 @@ class SessionStore {
|
|
|
1975
1634
|
briefId: input.briefId ?? '',
|
|
1976
1635
|
label: input.briefLabel ?? 'Variant',
|
|
1977
1636
|
status: item.status,
|
|
1978
|
-
// The filter above admits only code_gen / static_preview items
|
|
1979
|
-
// (incl. adopted + forked static previews). Clients route Vary/apply
|
|
1980
|
-
// on this — never on the display preview kind, which diverges for
|
|
1981
|
-
// existing-project code_gen variants materialized as static HTML.
|
|
1982
1637
|
workItemKind: item.kind,
|
|
1983
1638
|
createdAt: new Date(session.createdAt).toISOString(),
|
|
1984
|
-
// Prefer the per-item label stamped by an appended Vary batch; the
|
|
1985
|
-
// session-level fallback is correct only for the first batch (its
|
|
1986
|
-
// prompt is the session prompt). Without this, accumulated batches
|
|
1987
|
-
// all show batch 1's tag.
|
|
1988
1639
|
runLabel: input.runLabel ??
|
|
1989
1640
|
session.runLabel ??
|
|
1990
1641
|
(0, runLabel_1.deriveRunLabel)(session.prompt),
|
|
1991
|
-
// Correlation id of the UI request that produced this variant (a fork)
|
|
1992
|
-
// or, for an in-place refine, the request driving its refinement —
|
|
1993
|
-
// lets the UI map its optimistic placeholders to real cards.
|
|
1994
1642
|
...(input.requestId
|
|
1995
1643
|
? { requestId: input.requestId }
|
|
1996
1644
|
: refineRequestId
|
|
@@ -2020,9 +1668,6 @@ class SessionStore {
|
|
|
2020
1668
|
}
|
|
2021
1669
|
: {}),
|
|
2022
1670
|
...(item.error?.code ? { errorCode: String(item.error.code) } : {}),
|
|
2023
|
-
// The failure detail (exit code + stderr/result tail) must survive
|
|
2024
|
-
// into the snapshot — dropping it here reduced every executor
|
|
2025
|
-
// failure to a bare EXECUTOR_WORKER_FAILED in `variants status`.
|
|
2026
1671
|
...(item.error?.message
|
|
2027
1672
|
? { errorMessage: capErrorMessage(item.error.message) }
|
|
2028
1673
|
: {}),
|
|
@@ -2032,9 +1677,6 @@ class SessionStore {
|
|
|
2032
1677
|
}
|
|
2033
1678
|
}
|
|
2034
1679
|
exports.SessionStore = SessionStore;
|
|
2035
|
-
/** Snapshot-side bound on failure detail. The executor already caps its
|
|
2036
|
-
* stderr/result capture, but host-reported errors are unbounded — the
|
|
2037
|
-
* status envelope should never balloon on a chatty failure. */
|
|
2038
1680
|
function capErrorMessage(message) {
|
|
2039
1681
|
const MAX = 1000;
|
|
2040
1682
|
return message.length > MAX ? `${message.slice(0, MAX)}…` : message;
|