rivet-design 0.12.4 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -26
- package/README.npm.md +50 -26
- package/bin/rivet.js +39 -24
- package/dist/{mcp/agent-variants → agent-variants}/SessionStore.d.ts +13 -20
- package/dist/agent-variants/SessionStore.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/SessionStore.js +74 -84
- package/dist/agent-variants/SessionStore.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/WorktreeOrchestrator.d.ts +58 -25
- package/dist/agent-variants/WorktreeOrchestrator.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/WorktreeOrchestrator.js +299 -57
- package/dist/agent-variants/WorktreeOrchestrator.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/WorktreeOrchestrator.testHelpers.d.ts +1 -9
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/WorktreeOrchestrator.testHelpers.js +3 -18
- package/dist/agent-variants/WorktreeOrchestrator.testHelpers.js.map +1 -0
- package/dist/agent-variants/briefContent.d.ts.map +1 -0
- package/dist/agent-variants/briefContent.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/contracts.d.ts +716 -722
- package/dist/agent-variants/contracts.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/contracts.js +4 -5
- package/dist/agent-variants/contracts.js.map +1 -0
- package/dist/agent-variants/createProjectArtifacts.d.ts.map +1 -0
- package/dist/agent-variants/createProjectArtifacts.js.map +1 -0
- package/dist/agent-variants/diffQa.d.ts.map +1 -0
- package/dist/agent-variants/diffQa.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/elementRefToTarget.d.ts +1 -1
- package/dist/agent-variants/elementRefToTarget.d.ts.map +1 -0
- package/dist/agent-variants/elementRefToTarget.js.map +1 -0
- package/dist/agent-variants/errors.d.ts.map +1 -0
- package/dist/agent-variants/errors.js.map +1 -0
- package/dist/agent-variants/generatedDestination.d.ts +29 -0
- package/dist/agent-variants/generatedDestination.d.ts.map +1 -0
- package/dist/agent-variants/generatedDestination.js +59 -0
- package/dist/agent-variants/generatedDestination.js.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/index.d.ts +3 -6
- package/dist/agent-variants/index.d.ts.map +1 -0
- package/dist/{mcp/agent-variants → agent-variants}/index.js +3 -6
- package/dist/agent-variants/index.js.map +1 -0
- package/dist/agent-variants/previewQa.d.ts.map +1 -0
- package/dist/agent-variants/previewQa.js.map +1 -0
- package/dist/agent-variants/runLabel.d.ts.map +1 -0
- package/dist/agent-variants/runLabel.js.map +1 -0
- package/dist/agent-variants/runPlan.d.ts.map +1 -0
- package/dist/agent-variants/runPlan.js.map +1 -0
- package/dist/agent-variants/sourceContext.d.ts.map +1 -0
- package/dist/agent-variants/sourceContext.js.map +1 -0
- package/dist/agent-variants/variantContext.d.ts.map +1 -0
- package/dist/agent-variants/variantContext.js.map +1 -0
- package/dist/cli/client.d.ts +43 -0
- package/dist/cli/client.d.ts.map +1 -0
- package/dist/cli/client.js +109 -0
- package/dist/cli/client.js.map +1 -0
- package/dist/cli/commandNames.d.ts +9 -0
- package/dist/cli/commandNames.d.ts.map +1 -0
- package/dist/cli/commandNames.js +24 -0
- package/dist/cli/commandNames.js.map +1 -0
- package/dist/cli/commands/auth.d.ts +10 -0
- package/dist/cli/commands/auth.d.ts.map +1 -0
- package/dist/cli/commands/auth.js +81 -0
- package/dist/cli/commands/auth.js.map +1 -0
- package/dist/cli/commands/elementSelector.d.ts +10 -0
- package/dist/cli/commands/elementSelector.d.ts.map +1 -0
- package/dist/cli/commands/elementSelector.js +41 -0
- package/dist/cli/commands/elementSelector.js.map +1 -0
- package/dist/cli/commands/evidence.d.ts +9 -0
- package/dist/cli/commands/evidence.d.ts.map +1 -0
- package/dist/cli/commands/evidence.js +85 -0
- package/dist/cli/commands/evidence.js.map +1 -0
- package/dist/cli/commands/mcpServe.d.ts +40 -0
- package/dist/cli/commands/mcpServe.d.ts.map +1 -0
- package/dist/cli/commands/mcpServe.js +485 -0
- package/dist/cli/commands/mcpServe.js.map +1 -0
- package/dist/cli/commands/open.d.ts +28 -0
- package/dist/cli/commands/open.d.ts.map +1 -0
- package/dist/cli/commands/open.js +280 -0
- package/dist/cli/commands/open.js.map +1 -0
- package/dist/cli/commands/reference.d.ts +8 -0
- package/dist/cli/commands/reference.d.ts.map +1 -0
- package/dist/cli/commands/reference.js +101 -0
- package/dist/cli/commands/reference.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +9 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +182 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/shared.d.ts +31 -0
- package/dist/cli/commands/shared.d.ts.map +1 -0
- package/dist/cli/commands/shared.js +82 -0
- package/dist/cli/commands/shared.js.map +1 -0
- package/dist/cli/commands/status.d.ts +10 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +61 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/stop.d.ts +8 -0
- package/dist/cli/commands/stop.d.ts.map +1 -0
- package/dist/cli/commands/stop.js +41 -0
- package/dist/cli/commands/stop.js.map +1 -0
- package/dist/cli/commands/variants.d.ts +4 -0
- package/dist/cli/commands/variants.d.ts.map +1 -0
- package/dist/cli/commands/variants.js +435 -0
- package/dist/cli/commands/variants.js.map +1 -0
- package/dist/cli/commands/wait.d.ts +10 -0
- package/dist/cli/commands/wait.d.ts.map +1 -0
- package/dist/cli/commands/wait.js +101 -0
- package/dist/cli/commands/wait.js.map +1 -0
- package/dist/cli/entry.d.ts +12 -0
- package/dist/cli/entry.d.ts.map +1 -0
- package/dist/cli/entry.js +61 -0
- package/dist/cli/entry.js.map +1 -0
- package/dist/cli/envelope.d.ts +60 -0
- package/dist/cli/envelope.d.ts.map +1 -0
- package/dist/cli/envelope.js +57 -0
- package/dist/cli/envelope.js.map +1 -0
- package/dist/cli/flags.d.ts +20 -0
- package/dist/cli/flags.d.ts.map +1 -0
- package/dist/cli/flags.js +72 -0
- package/dist/cli/flags.js.map +1 -0
- package/dist/cli/handoff.d.ts +54 -0
- package/dist/cli/handoff.d.ts.map +1 -0
- package/dist/cli/handoff.js +106 -0
- package/dist/cli/handoff.js.map +1 -0
- package/dist/cli/handoffStore.d.ts +24 -0
- package/dist/cli/handoffStore.d.ts.map +1 -0
- package/dist/cli/handoffStore.js +49 -0
- package/dist/cli/handoffStore.js.map +1 -0
- package/dist/cli/hostWorkNextAction.d.ts +45 -0
- package/dist/cli/hostWorkNextAction.d.ts.map +1 -0
- package/dist/cli/hostWorkNextAction.js +43 -0
- package/dist/cli/hostWorkNextAction.js.map +1 -0
- package/dist/cli/io.d.ts +17 -0
- package/dist/cli/io.d.ts.map +1 -0
- package/dist/cli/io.js +19 -0
- package/dist/cli/io.js.map +1 -0
- package/dist/cli/router.d.ts +23 -0
- package/dist/cli/router.d.ts.map +1 -0
- package/dist/cli/router.js +236 -0
- package/dist/cli/router.js.map +1 -0
- package/dist/cli/runnerSelection.d.ts +60 -0
- package/dist/cli/runnerSelection.d.ts.map +1 -0
- package/dist/cli/runnerSelection.js +93 -0
- package/dist/cli/runnerSelection.js.map +1 -0
- package/dist/cli/serverHandshake.d.ts +51 -0
- package/dist/cli/serverHandshake.d.ts.map +1 -0
- package/dist/cli/serverHandshake.js +144 -0
- package/dist/cli/serverHandshake.js.map +1 -0
- package/dist/index.d.ts +2 -14
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +84 -138
- package/dist/index.js.map +1 -1
- package/dist/install/allowlists.d.ts +65 -0
- package/dist/install/allowlists.d.ts.map +1 -0
- package/dist/install/allowlists.js +333 -0
- package/dist/install/allowlists.js.map +1 -0
- package/dist/install/codexGuidance.d.ts +11 -0
- package/dist/install/codexGuidance.d.ts.map +1 -0
- package/dist/install/codexGuidance.js +90 -0
- package/dist/install/codexGuidance.js.map +1 -0
- package/dist/install/harnesses.d.ts +37 -26
- package/dist/install/harnesses.d.ts.map +1 -1
- package/dist/install/harnesses.js +312 -502
- package/dist/install/harnesses.js.map +1 -1
- package/dist/install/legacyMcp.d.ts +26 -0
- package/dist/install/legacyMcp.d.ts.map +1 -0
- package/dist/install/legacyMcp.js +160 -0
- package/dist/install/legacyMcp.js.map +1 -0
- package/dist/install/mcpRegistration.d.ts +45 -0
- package/dist/install/mcpRegistration.d.ts.map +1 -0
- package/dist/install/mcpRegistration.js +215 -0
- package/dist/install/mcpRegistration.js.map +1 -0
- package/dist/mcp/changeBatchClassification.d.ts +20 -20
- package/dist/mcp/changeBatchClassification.d.ts.map +1 -1
- package/dist/mcp/changeBatchClassification.js +46 -46
- package/dist/mcp/changeBatchClassification.js.map +1 -1
- package/dist/proxy-middleware/proxy-config.d.ts +6 -0
- package/dist/proxy-middleware/proxy-config.d.ts.map +1 -1
- package/dist/proxy-middleware/proxy-config.js +162 -5
- package/dist/proxy-middleware/proxy-config.js.map +1 -1
- package/dist/routes/agentVariants.d.ts +14 -2
- package/dist/routes/agentVariants.d.ts.map +1 -1
- package/dist/routes/agentVariants.js +366 -65
- package/dist/routes/agentVariants.js.map +1 -1
- package/dist/routes/cli.d.ts +31 -0
- package/dist/routes/cli.d.ts.map +1 -0
- package/dist/routes/cli.js +95 -0
- package/dist/routes/cli.js.map +1 -0
- package/dist/routes/git.d.ts +1 -0
- package/dist/routes/git.d.ts.map +1 -1
- package/dist/routes/git.js +2 -1
- package/dist/routes/git.js.map +1 -1
- package/dist/routes/inlineStartTracker.d.ts +23 -0
- package/dist/routes/inlineStartTracker.d.ts.map +1 -0
- package/dist/routes/inlineStartTracker.js +17 -0
- package/dist/routes/inlineStartTracker.js.map +1 -0
- package/dist/routes/mcp.d.ts +2 -12
- package/dist/routes/mcp.d.ts.map +1 -1
- package/dist/routes/mcp.js +4 -785
- package/dist/routes/mcp.js.map +1 -1
- package/dist/server.d.ts +24 -9
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +169 -33
- package/dist/server.js.map +1 -1
- package/dist/services/CommitMessageGenerator.d.ts +9 -1
- package/dist/services/CommitMessageGenerator.d.ts.map +1 -1
- package/dist/services/CommitMessageGenerator.js +4 -1
- package/dist/services/CommitMessageGenerator.js.map +1 -1
- package/dist/services/ComponentSearchService.d.ts +4 -1
- package/dist/services/ComponentSearchService.d.ts.map +1 -1
- package/dist/services/ComponentSearchService.js.map +1 -1
- package/dist/services/ConfigManager.d.ts +8 -0
- package/dist/services/ConfigManager.d.ts.map +1 -1
- package/dist/services/ConfigManager.js +9 -0
- package/dist/services/ConfigManager.js.map +1 -1
- package/dist/services/HistoryReplayService.d.ts +20 -9
- package/dist/services/HistoryReplayService.d.ts.map +1 -1
- package/dist/services/HistoryReplayService.js +99 -43
- package/dist/services/HistoryReplayService.js.map +1 -1
- package/dist/services/MCPVariantsTelemetry.d.ts +1 -1
- package/dist/services/MCPVariantsTelemetry.d.ts.map +1 -1
- package/dist/services/MCPVariantsTelemetry.js +1 -0
- package/dist/services/MCPVariantsTelemetry.js.map +1 -1
- package/dist/services/PRTitleGenerator.d.ts +10 -2
- package/dist/services/PRTitleGenerator.d.ts.map +1 -1
- package/dist/services/PRTitleGenerator.js +8 -2
- package/dist/services/PRTitleGenerator.js.map +1 -1
- package/dist/services/ProjectDetectionService.d.ts.map +1 -1
- package/dist/services/ProjectDetectionService.js +14 -4
- package/dist/services/ProjectDetectionService.js.map +1 -1
- package/dist/services/ProjectMetadataStore.d.ts +115 -0
- package/dist/services/ProjectMetadataStore.d.ts.map +1 -0
- package/dist/services/ProjectMetadataStore.js +336 -0
- package/dist/services/ProjectMetadataStore.js.map +1 -0
- package/dist/services/SessionBridgeService.d.ts +52 -224
- package/dist/services/SessionBridgeService.d.ts.map +1 -1
- package/dist/services/SessionBridgeService.js +97 -649
- package/dist/services/SessionBridgeService.js.map +1 -1
- package/dist/services/SessionService.d.ts +4 -1
- package/dist/services/SessionService.d.ts.map +1 -1
- package/dist/services/SessionService.js +7 -4
- package/dist/services/SessionService.js.map +1 -1
- package/dist/services/StaticFileService.d.ts.map +1 -1
- package/dist/services/StaticFileService.js +6 -0
- package/dist/services/StaticFileService.js.map +1 -1
- package/dist/services/TelemetryService.d.ts +16 -80
- package/dist/services/TelemetryService.d.ts.map +1 -1
- package/dist/services/TelemetryService.js +18 -94
- package/dist/services/TelemetryService.js.map +1 -1
- package/dist/services/VariantGenerationService.d.ts +45 -0
- package/dist/services/VariantGenerationService.d.ts.map +1 -0
- package/dist/services/VariantGenerationService.js +214 -0
- package/dist/services/VariantGenerationService.js.map +1 -0
- package/dist/services/VariantHistoryService.d.ts +37 -1
- package/dist/services/VariantHistoryService.d.ts.map +1 -1
- package/dist/services/VariantHistoryService.js +122 -1
- package/dist/services/VariantHistoryService.js.map +1 -1
- package/dist/services/VariantRunService.d.ts +25 -6
- package/dist/services/VariantRunService.d.ts.map +1 -1
- package/dist/services/VariantRunService.js +99 -4
- package/dist/services/VariantRunService.js.map +1 -1
- package/dist/services/VariantsRuntime.d.ts +1 -3
- package/dist/services/VariantsRuntime.d.ts.map +1 -1
- package/dist/services/VariantsRuntime.js +0 -1
- package/dist/services/VariantsRuntime.js.map +1 -1
- package/dist/services/WorktreeManager.d.ts +1 -1
- package/dist/services/WorktreeManager.d.ts.map +1 -1
- package/dist/services/createAgentVariantsOrchestrator.d.ts +2 -2
- package/dist/services/createAgentVariantsOrchestrator.d.ts.map +1 -1
- package/dist/services/createAgentVariantsOrchestrator.js +2 -3
- package/dist/services/createAgentVariantsOrchestrator.js.map +1 -1
- package/dist/services/projectMetadataMigrations.d.ts +59 -0
- package/dist/services/projectMetadataMigrations.d.ts.map +1 -0
- package/dist/services/projectMetadataMigrations.js +109 -0
- package/dist/services/projectMetadataMigrations.js.map +1 -0
- package/dist/types/change-request-types.d.ts +32 -4
- package/dist/types/change-request-types.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +2 -1
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +3 -7
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/loopback.d.ts +3 -0
- package/dist/utils/loopback.d.ts.map +1 -0
- package/dist/utils/loopback.js +13 -0
- package/dist/utils/loopback.js.map +1 -0
- package/dist/utils/pid.d.ts +3 -0
- package/dist/utils/pid.d.ts.map +1 -0
- package/dist/utils/pid.js +15 -0
- package/dist/utils/pid.js.map +1 -0
- package/dist/utils/queueAccess.d.ts +7 -0
- package/dist/utils/queueAccess.d.ts.map +1 -1
- package/dist/utils/queueAccess.js +8 -1
- package/dist/utils/queueAccess.js.map +1 -1
- package/dist/utils/shouldRecordHostedDemoSessionAction.d.ts +3 -3
- package/dist/utils/shouldRecordHostedDemoSessionAction.d.ts.map +1 -1
- package/dist/utils/shouldRecordHostedDemoSessionAction.js +3 -19
- package/dist/utils/shouldRecordHostedDemoSessionAction.js.map +1 -1
- package/dist/utils/skillWriter.d.ts.map +1 -1
- package/dist/utils/skillWriter.js +12 -11
- package/dist/utils/skillWriter.js.map +1 -1
- package/dist/utils/skills/claude-skill.d.ts +7 -2
- package/dist/utils/skills/claude-skill.d.ts.map +1 -1
- package/dist/utils/skills/claude-skill.js +10 -83
- package/dist/utils/skills/claude-skill.js.map +1 -1
- package/dist/utils/skills/cli-guidance.d.ts +12 -0
- package/dist/utils/skills/cli-guidance.d.ts.map +1 -0
- package/dist/utils/skills/cli-guidance.js +59 -0
- package/dist/utils/skills/cli-guidance.js.map +1 -0
- package/dist/utils/skills/cursor-rules.d.ts +8 -2
- package/dist/utils/skills/cursor-rules.d.ts.map +1 -1
- package/dist/utils/skills/cursor-rules.js +11 -80
- package/dist/utils/skills/cursor-rules.js.map +1 -1
- package/dist/utils/variantSessionStart.d.ts +1 -1
- package/dist/utils/variantSessionStart.d.ts.map +1 -1
- package/dist/utils/variantSessionStart.js +1 -1
- package/dist/utils/variantSessionStart.js.map +1 -1
- package/package.json +4 -4
- package/src/ui/dist/assets/main-B725ucb9.js +419 -0
- package/src/ui/dist/assets/main-Dyos9I29.css +1 -0
- package/src/ui/dist/index.html +2 -2
- package/dist/mcp/agent-variants/SessionStore.d.ts.map +0 -1
- package/dist/mcp/agent-variants/SessionStore.js.map +0 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.d.ts.map +0 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.js.map +0 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +0 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.js.map +0 -1
- package/dist/mcp/agent-variants/areNaSourceContext.d.ts +0 -20
- package/dist/mcp/agent-variants/areNaSourceContext.d.ts.map +0 -1
- package/dist/mcp/agent-variants/areNaSourceContext.js +0 -118
- package/dist/mcp/agent-variants/areNaSourceContext.js.map +0 -1
- package/dist/mcp/agent-variants/briefContent.d.ts.map +0 -1
- package/dist/mcp/agent-variants/briefContent.js.map +0 -1
- package/dist/mcp/agent-variants/contracts.d.ts.map +0 -1
- package/dist/mcp/agent-variants/contracts.js.map +0 -1
- package/dist/mcp/agent-variants/createProjectArtifacts.d.ts.map +0 -1
- package/dist/mcp/agent-variants/createProjectArtifacts.js.map +0 -1
- package/dist/mcp/agent-variants/createZeroToOneTool.d.ts +0 -63
- package/dist/mcp/agent-variants/createZeroToOneTool.d.ts.map +0 -1
- package/dist/mcp/agent-variants/createZeroToOneTool.js +0 -265
- package/dist/mcp/agent-variants/createZeroToOneTool.js.map +0 -1
- package/dist/mcp/agent-variants/diffQa.d.ts.map +0 -1
- package/dist/mcp/agent-variants/diffQa.js.map +0 -1
- package/dist/mcp/agent-variants/elementRefToTarget.d.ts.map +0 -1
- package/dist/mcp/agent-variants/elementRefToTarget.js.map +0 -1
- package/dist/mcp/agent-variants/errors.d.ts.map +0 -1
- package/dist/mcp/agent-variants/errors.js.map +0 -1
- package/dist/mcp/agent-variants/generatedDestination.d.ts +0 -75
- package/dist/mcp/agent-variants/generatedDestination.d.ts.map +0 -1
- package/dist/mcp/agent-variants/generatedDestination.js +0 -103
- package/dist/mcp/agent-variants/generatedDestination.js.map +0 -1
- package/dist/mcp/agent-variants/index.d.ts.map +0 -1
- package/dist/mcp/agent-variants/index.js.map +0 -1
- package/dist/mcp/agent-variants/pendingChangesAdapter.d.ts +0 -38
- package/dist/mcp/agent-variants/pendingChangesAdapter.d.ts.map +0 -1
- package/dist/mcp/agent-variants/pendingChangesAdapter.js +0 -93
- package/dist/mcp/agent-variants/pendingChangesAdapter.js.map +0 -1
- package/dist/mcp/agent-variants/pinterestSourceContext.d.ts +0 -23
- package/dist/mcp/agent-variants/pinterestSourceContext.d.ts.map +0 -1
- package/dist/mcp/agent-variants/pinterestSourceContext.js +0 -137
- package/dist/mcp/agent-variants/pinterestSourceContext.js.map +0 -1
- package/dist/mcp/agent-variants/previewQa.d.ts.map +0 -1
- package/dist/mcp/agent-variants/previewQa.js.map +0 -1
- package/dist/mcp/agent-variants/runLabel.d.ts.map +0 -1
- package/dist/mcp/agent-variants/runLabel.js.map +0 -1
- package/dist/mcp/agent-variants/runPlan.d.ts.map +0 -1
- package/dist/mcp/agent-variants/runPlan.js.map +0 -1
- package/dist/mcp/agent-variants/sourceContext.d.ts.map +0 -1
- package/dist/mcp/agent-variants/sourceContext.js.map +0 -1
- package/dist/mcp/agent-variants/tools.d.ts +0 -187
- package/dist/mcp/agent-variants/tools.d.ts.map +0 -1
- package/dist/mcp/agent-variants/tools.js +0 -1165
- package/dist/mcp/agent-variants/tools.js.map +0 -1
- package/dist/mcp/agent-variants/variantContext.d.ts.map +0 -1
- package/dist/mcp/agent-variants/variantContext.js.map +0 -1
- package/dist/mcp/auth/httpOAuthProvider.d.ts +0 -103
- package/dist/mcp/auth/httpOAuthProvider.d.ts.map +0 -1
- package/dist/mcp/auth/httpOAuthProvider.js +0 -735
- package/dist/mcp/auth/httpOAuthProvider.js.map +0 -1
- package/dist/mcp/auth/tools.d.ts +0 -39
- package/dist/mcp/auth/tools.d.ts.map +0 -1
- package/dist/mcp/auth/tools.js +0 -304
- package/dist/mcp/auth/tools.js.map +0 -1
- package/dist/mcp/branding.d.ts +0 -4
- package/dist/mcp/branding.d.ts.map +0 -1
- package/dist/mcp/branding.js +0 -8
- package/dist/mcp/branding.js.map +0 -1
- package/dist/mcp/hostedServer.d.ts +0 -27
- package/dist/mcp/hostedServer.d.ts.map +0 -1
- package/dist/mcp/hostedServer.js +0 -71
- package/dist/mcp/hostedServer.js.map +0 -1
- package/dist/mcp/httpServer.d.ts +0 -63
- package/dist/mcp/httpServer.d.ts.map +0 -1
- package/dist/mcp/httpServer.js +0 -602
- package/dist/mcp/httpServer.js.map +0 -1
- package/dist/mcp/instructions.d.ts +0 -25
- package/dist/mcp/instructions.d.ts.map +0 -1
- package/dist/mcp/instructions.js +0 -39
- package/dist/mcp/instructions.js.map +0 -1
- package/dist/mcp/integrations/tools.d.ts +0 -19
- package/dist/mcp/integrations/tools.d.ts.map +0 -1
- package/dist/mcp/integrations/tools.js +0 -101
- package/dist/mcp/integrations/tools.js.map +0 -1
- package/dist/mcp/server.d.ts +0 -214
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js +0 -2536
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/toolAnalytics.d.ts +0 -26
- package/dist/mcp/toolAnalytics.d.ts.map +0 -1
- package/dist/mcp/toolAnalytics.js +0 -95
- package/dist/mcp/toolAnalytics.js.map +0 -1
- package/dist/mcp/types.d.ts +0 -7
- package/dist/mcp/types.d.ts.map +0 -1
- package/dist/mcp/types.js +0 -3
- package/dist/mcp/types.js.map +0 -1
- package/dist/mcp/watchLoopResumePrompt.d.ts +0 -16
- package/dist/mcp/watchLoopResumePrompt.d.ts.map +0 -1
- package/dist/mcp/watchLoopResumePrompt.js +0 -21
- package/dist/mcp/watchLoopResumePrompt.js.map +0 -1
- package/dist/prompts/agentModPrompts.d.ts +0 -4
- package/dist/prompts/agentModPrompts.d.ts.map +0 -1
- package/dist/prompts/agentModPrompts.js +0 -34
- package/dist/prompts/agentModPrompts.js.map +0 -1
- package/dist/prompts/tokenWriterPrompts.d.ts +0 -4
- package/dist/prompts/tokenWriterPrompts.d.ts.map +0 -1
- package/dist/prompts/tokenWriterPrompts.js +0 -59
- package/dist/prompts/tokenWriterPrompts.js.map +0 -1
- package/dist/routes/comments.d.ts +0 -3
- package/dist/routes/comments.d.ts.map +0 -1
- package/dist/routes/comments.js +0 -113
- package/dist/routes/comments.js.map +0 -1
- package/dist/routes/components.d.ts +0 -7
- package/dist/routes/components.d.ts.map +0 -1
- package/dist/routes/components.js +0 -88
- package/dist/routes/components.js.map +0 -1
- package/dist/routes/controls.d.ts +0 -7
- package/dist/routes/controls.d.ts.map +0 -1
- package/dist/routes/controls.js +0 -50
- package/dist/routes/controls.js.map +0 -1
- package/dist/routes/design.d.ts +0 -2
- package/dist/routes/design.d.ts.map +0 -1
- package/dist/routes/design.js +0 -29
- package/dist/routes/design.js.map +0 -1
- package/dist/routes/modifications.d.ts +0 -10
- package/dist/routes/modifications.d.ts.map +0 -1
- package/dist/routes/modifications.js +0 -394
- package/dist/routes/modifications.js.map +0 -1
- package/dist/routes/tokens.d.ts +0 -2
- package/dist/routes/tokens.d.ts.map +0 -1
- package/dist/routes/tokens.js +0 -115
- package/dist/routes/tokens.js.map +0 -1
- package/dist/services/AgentSessionService.d.ts +0 -91
- package/dist/services/AgentSessionService.d.ts.map +0 -1
- package/dist/services/AgentSessionService.js +0 -282
- package/dist/services/AgentSessionService.js.map +0 -1
- package/dist/services/BridgeBatchPipeline.d.ts +0 -103
- package/dist/services/BridgeBatchPipeline.d.ts.map +0 -1
- package/dist/services/BridgeBatchPipeline.js +0 -295
- package/dist/services/BridgeBatchPipeline.js.map +0 -1
- package/dist/services/BridgeQueueStore.d.ts +0 -28
- package/dist/services/BridgeQueueStore.d.ts.map +0 -1
- package/dist/services/BridgeQueueStore.js +0 -88
- package/dist/services/BridgeQueueStore.js.map +0 -1
- package/dist/services/CSSTokenWriter.d.ts +0 -22
- package/dist/services/CSSTokenWriter.d.ts.map +0 -1
- package/dist/services/CSSTokenWriter.js +0 -116
- package/dist/services/CSSTokenWriter.js.map +0 -1
- package/dist/services/DesignTokenService.d.ts +0 -39
- package/dist/services/DesignTokenService.d.ts.map +0 -1
- package/dist/services/DesignTokenService.js +0 -100
- package/dist/services/DesignTokenService.js.map +0 -1
- package/dist/services/InlineVariantGenerationService.d.ts +0 -51
- package/dist/services/InlineVariantGenerationService.d.ts.map +0 -1
- package/dist/services/InlineVariantGenerationService.js +0 -475
- package/dist/services/InlineVariantGenerationService.js.map +0 -1
- package/dist/services/InterfaceGenerationService.d.ts +0 -12
- package/dist/services/InterfaceGenerationService.d.ts.map +0 -1
- package/dist/services/InterfaceGenerationService.js +0 -256
- package/dist/services/InterfaceGenerationService.js.map +0 -1
- package/dist/services/TailwindConfigWriter.d.ts +0 -24
- package/dist/services/TailwindConfigWriter.d.ts.map +0 -1
- package/dist/services/TailwindConfigWriter.js +0 -105
- package/dist/services/TailwindConfigWriter.js.map +0 -1
- package/dist/services/TerminalAgentRunner.d.ts +0 -65
- package/dist/services/TerminalAgentRunner.d.ts.map +0 -1
- package/dist/services/TerminalAgentRunner.js +0 -511
- package/dist/services/TerminalAgentRunner.js.map +0 -1
- package/dist/services/VisualVariantAgentRunner.d.ts +0 -20
- package/dist/services/VisualVariantAgentRunner.d.ts.map +0 -1
- package/dist/services/VisualVariantAgentRunner.js +0 -66
- package/dist/services/VisualVariantAgentRunner.js.map +0 -1
- package/dist/services/adapters/TailwindCSSTokenAdapter.d.ts +0 -35
- package/dist/services/adapters/TailwindCSSTokenAdapter.d.ts.map +0 -1
- package/dist/services/adapters/TailwindCSSTokenAdapter.js +0 -278
- package/dist/services/adapters/TailwindCSSTokenAdapter.js.map +0 -1
- package/dist/services/agent/AgentCore.d.ts +0 -126
- package/dist/services/agent/AgentCore.d.ts.map +0 -1
- package/dist/services/agent/AgentCore.js +0 -759
- package/dist/services/agent/AgentCore.js.map +0 -1
- package/dist/services/agent/AgentModService.d.ts +0 -98
- package/dist/services/agent/AgentModService.d.ts.map +0 -1
- package/dist/services/agent/AgentModService.js +0 -400
- package/dist/services/agent/AgentModService.js.map +0 -1
- package/dist/services/agent/index.d.ts +0 -2
- package/dist/services/agent/index.d.ts.map +0 -1
- package/dist/services/agent/index.js +0 -6
- package/dist/services/agent/index.js.map +0 -1
- package/dist/types/editor-interface-types.d.ts +0 -67
- package/dist/types/editor-interface-types.d.ts.map +0 -1
- package/dist/types/editor-interface-types.js +0 -12
- package/dist/types/editor-interface-types.js.map +0 -1
- package/dist/utils/elementRefToContext.d.ts +0 -4
- package/dist/utils/elementRefToContext.d.ts.map +0 -1
- package/dist/utils/elementRefToContext.js +0 -63
- package/dist/utils/elementRefToContext.js.map +0 -1
- package/dist/utils/skills/shared-variants-protocol.d.ts +0 -69
- package/dist/utils/skills/shared-variants-protocol.d.ts.map +0 -1
- package/dist/utils/skills/shared-variants-protocol.js +0 -292
- package/dist/utils/skills/shared-variants-protocol.js.map +0 -1
- package/src/ui/dist/assets/main-Dnah9pII.css +0 -1
- package/src/ui/dist/assets/main-plq7aT76.js +0 -656
- /package/dist/{mcp/agent-variants → agent-variants}/briefContent.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/briefContent.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/createProjectArtifacts.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/createProjectArtifacts.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/diffQa.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/diffQa.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/elementRefToTarget.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/errors.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/errors.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/previewQa.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/previewQa.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/runLabel.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/runLabel.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/runPlan.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/runPlan.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/sourceContext.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/sourceContext.js +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/variantContext.d.ts +0 -0
- /package/dist/{mcp/agent-variants → agent-variants}/variantContext.js +0 -0
|
@@ -12,23 +12,54 @@ const os_1 = __importDefault(require("os"));
|
|
|
12
12
|
const path_1 = __importDefault(require("path"));
|
|
13
13
|
const child_process_1 = require("child_process");
|
|
14
14
|
const simple_git_1 = require("simple-git");
|
|
15
|
-
const logger_1 = require("
|
|
16
|
-
const devServerError_1 = require("
|
|
15
|
+
const logger_1 = require("../utils/logger");
|
|
16
|
+
const devServerError_1 = require("../utils/devServerError");
|
|
17
17
|
const errors_1 = require("./errors");
|
|
18
18
|
const createProjectArtifacts_1 = require("./createProjectArtifacts");
|
|
19
19
|
const contracts_1 = require("./contracts");
|
|
20
20
|
const briefContent_1 = require("./briefContent");
|
|
21
21
|
const runLabel_1 = require("./runLabel");
|
|
22
22
|
const runPlan_1 = require("./runPlan");
|
|
23
|
-
const viteReactTs_1 = require("
|
|
24
|
-
const StaticPreviewServer_1 = require("
|
|
25
|
-
const designCatalog_1 = require("
|
|
23
|
+
const viteReactTs_1 = require("../services/templates/viteReactTs");
|
|
24
|
+
const StaticPreviewServer_1 = require("../services/StaticPreviewServer");
|
|
25
|
+
const designCatalog_1 = require("../services/templates/designCatalog");
|
|
26
26
|
const previewQa_1 = require("./previewQa");
|
|
27
27
|
const diffQa_1 = require("./diffQa");
|
|
28
|
-
const VariantHistoryService_1 = require("
|
|
28
|
+
const VariantHistoryService_1 = require("../services/VariantHistoryService");
|
|
29
29
|
const variantContext_1 = require("./variantContext");
|
|
30
30
|
const log = (0, logger_1.createLogger)('AgentVariantsOrchestrator');
|
|
31
31
|
const FRESH_DEV_SERVER_HOST = '127.0.0.1';
|
|
32
|
+
const BRIEF_LABEL_MAX_LENGTH = 48;
|
|
33
|
+
const GENERIC_BRIEF_LABELS = new Set([
|
|
34
|
+
'variant',
|
|
35
|
+
'direction',
|
|
36
|
+
'option',
|
|
37
|
+
'untitled',
|
|
38
|
+
]);
|
|
39
|
+
const DIRECTIONAL_BRIEF_LABELS = [
|
|
40
|
+
'Refined Focus',
|
|
41
|
+
'Bold Contrast',
|
|
42
|
+
'Airy Layout',
|
|
43
|
+
'Editorial Polish',
|
|
44
|
+
'Playful Accent',
|
|
45
|
+
'Calm Minimal',
|
|
46
|
+
'Dense Utility',
|
|
47
|
+
'Sharp Detail',
|
|
48
|
+
];
|
|
49
|
+
const BRIEF_LABEL_ALTERNATIVES = [
|
|
50
|
+
'Focus',
|
|
51
|
+
'Contrast',
|
|
52
|
+
'Layout',
|
|
53
|
+
'Editorial',
|
|
54
|
+
'Accent',
|
|
55
|
+
'Minimal',
|
|
56
|
+
'Utility',
|
|
57
|
+
'Detail',
|
|
58
|
+
'Motion',
|
|
59
|
+
'Depth',
|
|
60
|
+
'Density',
|
|
61
|
+
'Color',
|
|
62
|
+
];
|
|
32
63
|
// Upper bound on waiting for in-flight history persists during session
|
|
33
64
|
// teardown. Generous enough for a full-repo snapshot on a large project;
|
|
34
65
|
// small enough that a wedged git subprocess (which has its own 120s block
|
|
@@ -62,6 +93,18 @@ const PROVISION_TIMEOUT_MS = (() => {
|
|
|
62
93
|
? parsed
|
|
63
94
|
: DEFAULT_PROVISION_TIMEOUT_MS;
|
|
64
95
|
})();
|
|
96
|
+
// Active variant dev servers are useful only while the Rivet app is being used.
|
|
97
|
+
// Reclaim them after app/API silence so abandoned sessions do not pin one child
|
|
98
|
+
// process per succeeded variant forever. The session state and worktrees stay
|
|
99
|
+
// intact; only live preview ports are cleared.
|
|
100
|
+
const DEFAULT_ACTIVE_VARIANT_SERVER_IDLE_TTL_MS = 30 * 60 * 1000;
|
|
101
|
+
const ACTIVE_VARIANT_SERVER_IDLE_TTL_MS = (() => {
|
|
102
|
+
const raw = process.env.RIVET_ACTIVE_VARIANT_SERVER_IDLE_TTL_MS;
|
|
103
|
+
const parsed = raw ? Number.parseInt(raw, 10) : NaN;
|
|
104
|
+
return Number.isFinite(parsed) && parsed > 0
|
|
105
|
+
? parsed
|
|
106
|
+
: DEFAULT_ACTIVE_VARIANT_SERVER_IDLE_TTL_MS;
|
|
107
|
+
})();
|
|
65
108
|
/** Sentinel so callers can distinguish a provisioning timeout from other errors. */
|
|
66
109
|
class ProvisionTimeoutError extends Error {
|
|
67
110
|
timeoutMs;
|
|
@@ -311,6 +354,64 @@ const DESIGN_CREATION_ACTION_RE = /\b(create|build|design|make|redesign|refresh|
|
|
|
311
354
|
const DESIGN_CREATION_SURFACE_RE = /\b(home\s?page|landing page|dashboard|screen|site|website|app|page|ui|interface|component|hero)\b/i;
|
|
312
355
|
const NON_VISUAL_CHANGE_RE = /\b(api|backend|database|event|lint|query|server|test|tracking|typecheck)\b/i;
|
|
313
356
|
const DIFF_CAPTURE_FAILURE_SUMMARY = 'Unable to verify the generated design diff; regenerate this variant so Rivet can confirm source changes.';
|
|
357
|
+
const briefLabelKey = (value) => value.trim().toLowerCase().replace(/\s+/g, ' ');
|
|
358
|
+
const truncateBriefLabel = (value) => {
|
|
359
|
+
const normalized = value.trim().replace(/\s+/g, ' ');
|
|
360
|
+
if (normalized.length <= BRIEF_LABEL_MAX_LENGTH) {
|
|
361
|
+
return normalized;
|
|
362
|
+
}
|
|
363
|
+
return `${normalized.slice(0, BRIEF_LABEL_MAX_LENGTH - 1).trimEnd()}…`;
|
|
364
|
+
};
|
|
365
|
+
const suffixFromGenericLabel = (label, slotIndex) => {
|
|
366
|
+
const words = label.trim().split(/\s+/).filter(Boolean);
|
|
367
|
+
return (words[words.length - 1] ??
|
|
368
|
+
BRIEF_LABEL_ALTERNATIVES[slotIndex % BRIEF_LABEL_ALTERNATIVES.length]);
|
|
369
|
+
};
|
|
370
|
+
const makeSpecificBriefLabel = (args) => {
|
|
371
|
+
const label = truncateBriefLabel(args.label);
|
|
372
|
+
if (!GENERIC_BRIEF_LABELS.has(briefLabelKey(label))) {
|
|
373
|
+
return label;
|
|
374
|
+
}
|
|
375
|
+
return truncateBriefLabel(`${args.runLabel} ${suffixFromGenericLabel(label, args.slotIndex)}`);
|
|
376
|
+
};
|
|
377
|
+
const firstUnusedDirectionalBriefLabel = (slotIndex, usedLabels) => {
|
|
378
|
+
for (let offset = 0; offset < DIRECTIONAL_BRIEF_LABELS.length; offset++) {
|
|
379
|
+
const candidate = truncateBriefLabel(DIRECTIONAL_BRIEF_LABELS[(slotIndex + offset) % DIRECTIONAL_BRIEF_LABELS.length]);
|
|
380
|
+
if (!usedLabels.has(briefLabelKey(candidate))) {
|
|
381
|
+
return candidate;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
return null;
|
|
385
|
+
};
|
|
386
|
+
const uniquifyBriefLabel = (args) => {
|
|
387
|
+
const preferred = makeSpecificBriefLabel(args);
|
|
388
|
+
if (!args.usedLabels.has(briefLabelKey(preferred))) {
|
|
389
|
+
args.usedLabels.add(briefLabelKey(preferred));
|
|
390
|
+
return preferred;
|
|
391
|
+
}
|
|
392
|
+
const directional = firstUnusedDirectionalBriefLabel(args.slotIndex, args.usedLabels);
|
|
393
|
+
if (directional) {
|
|
394
|
+
args.usedLabels.add(briefLabelKey(directional));
|
|
395
|
+
return directional;
|
|
396
|
+
}
|
|
397
|
+
for (let offset = 0; offset < BRIEF_LABEL_ALTERNATIVES.length; offset++) {
|
|
398
|
+
const alternative = BRIEF_LABEL_ALTERNATIVES[(args.slotIndex + offset) % BRIEF_LABEL_ALTERNATIVES.length];
|
|
399
|
+
const candidate = truncateBriefLabel(`${args.runLabel} ${alternative}`);
|
|
400
|
+
if (!args.usedLabels.has(briefLabelKey(candidate))) {
|
|
401
|
+
args.usedLabels.add(briefLabelKey(candidate));
|
|
402
|
+
return candidate;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
let suffix = 2;
|
|
406
|
+
while (true) {
|
|
407
|
+
const candidate = truncateBriefLabel(`${args.runLabel} ${suffix}`);
|
|
408
|
+
if (!args.usedLabels.has(briefLabelKey(candidate))) {
|
|
409
|
+
args.usedLabels.add(briefLabelKey(candidate));
|
|
410
|
+
return candidate;
|
|
411
|
+
}
|
|
412
|
+
suffix += 1;
|
|
413
|
+
}
|
|
414
|
+
};
|
|
314
415
|
const buildDiffCaptureFailureQa = (detail, message) => ({
|
|
315
416
|
status: 'failed',
|
|
316
417
|
issues: [
|
|
@@ -334,20 +435,18 @@ const isDesignCreationCodeGenInput = (input, prompt) => {
|
|
|
334
435
|
};
|
|
335
436
|
/**
|
|
336
437
|
* Wraps SessionStore for the operations that have side effects: approve
|
|
337
|
-
* (provision worktrees), reportComplete (capture diff
|
|
338
|
-
*
|
|
339
|
-
*
|
|
438
|
+
* (provision worktrees), reportComplete (capture diff), commit (apply picked
|
|
439
|
+
* output), cancel (teardown). Pure read paths bypass and call SessionStore
|
|
440
|
+
* directly.
|
|
340
441
|
*
|
|
341
442
|
* This is the terminal-native variant of the orchestrator: the user picks
|
|
342
443
|
* a single brief upfront, so there's only ever one code-gen item per
|
|
343
444
|
* session and no live preview / proxy retarget. Once the agent reports
|
|
344
|
-
* the variant succeeded, the
|
|
345
|
-
* pick step.
|
|
445
|
+
* the variant succeeded, the CLI can commit the chosen output directly.
|
|
346
446
|
*/
|
|
347
447
|
class AgentVariantsOrchestrator {
|
|
348
448
|
store;
|
|
349
449
|
worktrees;
|
|
350
|
-
adapter;
|
|
351
450
|
resolveEnv;
|
|
352
451
|
telemetry;
|
|
353
452
|
installDependencies;
|
|
@@ -358,6 +457,7 @@ class AgentVariantsOrchestrator {
|
|
|
358
457
|
variantHistory;
|
|
359
458
|
startStaticPreviewServerImpl;
|
|
360
459
|
provisionTimeoutMs;
|
|
460
|
+
activeVariantServerIdleTtlMs;
|
|
361
461
|
resources = new Map();
|
|
362
462
|
/**
|
|
363
463
|
* Committed dev servers from prior sessions that survived teardown. The
|
|
@@ -388,7 +488,6 @@ class AgentVariantsOrchestrator {
|
|
|
388
488
|
constructor(deps) {
|
|
389
489
|
this.store = deps.store;
|
|
390
490
|
this.worktrees = deps.worktreeManager;
|
|
391
|
-
this.adapter = deps.pendingChangesAdapter;
|
|
392
491
|
this.resolveEnv = deps.resolveProjectEnvironment;
|
|
393
492
|
this.telemetry = deps.telemetry ?? NOOP_TELEMETRY;
|
|
394
493
|
this.installDependencies =
|
|
@@ -402,6 +501,8 @@ class AgentVariantsOrchestrator {
|
|
|
402
501
|
this.startStaticPreviewServerImpl =
|
|
403
502
|
deps.startStaticPreviewServer ?? StaticPreviewServer_1.startStaticPreviewServer;
|
|
404
503
|
this.provisionTimeoutMs = deps.provisionTimeoutMs ?? PROVISION_TIMEOUT_MS;
|
|
504
|
+
this.activeVariantServerIdleTtlMs =
|
|
505
|
+
deps.activeVariantServerIdleTtlMs ?? ACTIVE_VARIANT_SERVER_IDLE_TTL_MS;
|
|
405
506
|
}
|
|
406
507
|
// --- Pure delegations (no side effects) ---------------------------------
|
|
407
508
|
propose(args) {
|
|
@@ -414,6 +515,7 @@ class AgentVariantsOrchestrator {
|
|
|
414
515
|
const result = this.store.propose(args);
|
|
415
516
|
this.activeSessionId = result.sessionId;
|
|
416
517
|
this.ensureResources(result.sessionId);
|
|
518
|
+
this.touchSession(result.sessionId);
|
|
417
519
|
const projectContext = args.projectContext ?? { kind: 'existing' };
|
|
418
520
|
const mode = this.getVariantsTelemetryMode(projectContext, args.target);
|
|
419
521
|
this.startVariantsRound({
|
|
@@ -483,6 +585,7 @@ class AgentVariantsOrchestrator {
|
|
|
483
585
|
registerUiClient() {
|
|
484
586
|
this.uiClientCount += 1;
|
|
485
587
|
this.lastUiClientActivityAt = Date.now();
|
|
588
|
+
this.touchActiveSession();
|
|
486
589
|
let released = false;
|
|
487
590
|
return () => {
|
|
488
591
|
if (released)
|
|
@@ -502,6 +605,19 @@ class AgentVariantsOrchestrator {
|
|
|
502
605
|
return (Date.now() - this.lastUiClientActivityAt <
|
|
503
606
|
AgentVariantsOrchestrator.UI_CLIENT_GRACE_MS);
|
|
504
607
|
}
|
|
608
|
+
/** @effect Records activity for the current variants session, if one exists. */
|
|
609
|
+
touchActiveSession() {
|
|
610
|
+
if (!this.activeSessionId)
|
|
611
|
+
return;
|
|
612
|
+
this.touchSession(this.activeSessionId);
|
|
613
|
+
}
|
|
614
|
+
/** @effect Resets idle cleanup for active variant preview servers. */
|
|
615
|
+
touchSession(sessionId) {
|
|
616
|
+
const resources = this.resources.get(sessionId);
|
|
617
|
+
if (!resources || resources.cleanupStarted)
|
|
618
|
+
return;
|
|
619
|
+
this.scheduleActivePreviewIdleTimer(resources);
|
|
620
|
+
}
|
|
505
621
|
/** Build the snapshot the chip cares about. Reads from SessionStore +
|
|
506
622
|
* per-resource state; safe to call at any time. */
|
|
507
623
|
buildActiveSnapshot() {
|
|
@@ -525,6 +641,7 @@ class AgentVariantsOrchestrator {
|
|
|
525
641
|
? projectContext.workspacePath
|
|
526
642
|
: undefined;
|
|
527
643
|
const artifacts = buildSessionArtifacts(sessionId, sessionProjectContext);
|
|
644
|
+
const hostWork = this.getHostWork(sessionId);
|
|
528
645
|
return {
|
|
529
646
|
active: true,
|
|
530
647
|
sessionId,
|
|
@@ -536,8 +653,21 @@ class AgentVariantsOrchestrator {
|
|
|
536
653
|
projectContext,
|
|
537
654
|
...(destinationPath ? { destinationPath } : {}),
|
|
538
655
|
...(artifacts.length > 0 ? { artifacts } : {}),
|
|
656
|
+
...(hostWork.length > 0 ? { hostWork } : {}),
|
|
539
657
|
};
|
|
540
658
|
}
|
|
659
|
+
getHostWork(sessionId) {
|
|
660
|
+
return this.store.getHostWork(sessionId).map((item) => {
|
|
661
|
+
const worktreePath = this.getWorktreePath(sessionId, item.workId);
|
|
662
|
+
const baseInput = item.input && typeof item.input === 'object'
|
|
663
|
+
? item.input
|
|
664
|
+
: {};
|
|
665
|
+
return {
|
|
666
|
+
...item,
|
|
667
|
+
input: { ...baseInput, worktreePath },
|
|
668
|
+
};
|
|
669
|
+
});
|
|
670
|
+
}
|
|
541
671
|
getVariantsTelemetryMode(projectContext, _target) {
|
|
542
672
|
if (projectContext.kind === 'fresh' && projectContext.variantContext) {
|
|
543
673
|
return 'source_grounded';
|
|
@@ -739,6 +869,7 @@ class AgentVariantsOrchestrator {
|
|
|
739
869
|
}
|
|
740
870
|
emitChange() {
|
|
741
871
|
try {
|
|
872
|
+
this.touchActiveSession();
|
|
742
873
|
this.events.emit('change', this.buildActiveSnapshot());
|
|
743
874
|
}
|
|
744
875
|
catch (err) {
|
|
@@ -953,6 +1084,7 @@ class AgentVariantsOrchestrator {
|
|
|
953
1084
|
sourceVariantId: target.variantId,
|
|
954
1085
|
instruction: target.instruction,
|
|
955
1086
|
count: target.count,
|
|
1087
|
+
...(target.briefs ? { briefs: target.briefs } : {}),
|
|
956
1088
|
currentHtml,
|
|
957
1089
|
targetElement: target.element,
|
|
958
1090
|
requestId: target.requestId,
|
|
@@ -1150,6 +1282,22 @@ class AgentVariantsOrchestrator {
|
|
|
1150
1282
|
return false;
|
|
1151
1283
|
}
|
|
1152
1284
|
}
|
|
1285
|
+
/**
|
|
1286
|
+
* Resolve the history source for a forked Vary row. If the immediate parent
|
|
1287
|
+
* is an adopted past direction, collapse against that original history row;
|
|
1288
|
+
* otherwise collapse against the same-session parent variant.
|
|
1289
|
+
*/
|
|
1290
|
+
resolveHistoryParentVariant(sessionId, sourceVariantId) {
|
|
1291
|
+
if (!sourceVariantId)
|
|
1292
|
+
return undefined;
|
|
1293
|
+
try {
|
|
1294
|
+
const sourceInput = this.store.getWorkItemInput(sessionId, sourceVariantId);
|
|
1295
|
+
return (sourceInput?.adoptedFrom ?? { sessionId, variantId: sourceVariantId });
|
|
1296
|
+
}
|
|
1297
|
+
catch {
|
|
1298
|
+
return { sessionId, variantId: sourceVariantId };
|
|
1299
|
+
}
|
|
1300
|
+
}
|
|
1153
1301
|
getVariantPick(sessionId) {
|
|
1154
1302
|
return this.store.getVariantPick(sessionId);
|
|
1155
1303
|
}
|
|
@@ -1346,6 +1494,33 @@ class AgentVariantsOrchestrator {
|
|
|
1346
1494
|
getDevServerPort(sessionId, workItemId) {
|
|
1347
1495
|
return this.resources.get(sessionId)?.worktrees.get(workItemId)?.port;
|
|
1348
1496
|
}
|
|
1497
|
+
/**
|
|
1498
|
+
* @effect Resolves the dev server port for a preview request and refreshes
|
|
1499
|
+
* active-preview retention for that session while the port is still live.
|
|
1500
|
+
*/
|
|
1501
|
+
resolveDevServerPortForPreview(sessionId, workItemId) {
|
|
1502
|
+
const port = this.getDevServerPort(sessionId, workItemId);
|
|
1503
|
+
if (typeof port === 'number') {
|
|
1504
|
+
this.touchSession(sessionId);
|
|
1505
|
+
}
|
|
1506
|
+
return port;
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* True work-item kind for a variant, or undefined when the session/item is
|
|
1510
|
+
* unknown. This is the authoritative routing signal for Vary/refine intakes:
|
|
1511
|
+
* an existing-project `code_gen` variant materialized as a static preview
|
|
1512
|
+
* (registerExistingStaticPreview) DISPLAYS as `static_artifact` and serves
|
|
1513
|
+
* HTML, but must fork via the code_gen/worktree path — HTML presence is not
|
|
1514
|
+
* a valid discriminator.
|
|
1515
|
+
*/
|
|
1516
|
+
getVariantWorkItemKind(sessionId, workItemId) {
|
|
1517
|
+
try {
|
|
1518
|
+
return this.store.getWorkItemKind(sessionId, workItemId);
|
|
1519
|
+
}
|
|
1520
|
+
catch {
|
|
1521
|
+
return undefined;
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1349
1524
|
getStaticPreviewHtml(sessionId, workItemId) {
|
|
1350
1525
|
// Primary: read the materialized index.html from the variant's per-variant
|
|
1351
1526
|
// directory (written by handleSucceededReport). The directory is the source
|
|
@@ -1476,9 +1651,9 @@ class AgentVariantsOrchestrator {
|
|
|
1476
1651
|
}
|
|
1477
1652
|
/**
|
|
1478
1653
|
* Unified one-call kickoff that collapses propose → report_briefs →
|
|
1479
|
-
* approve.
|
|
1480
|
-
*
|
|
1481
|
-
* approves so the session lands in `work_items_ready`.
|
|
1654
|
+
* approve. Uses AI-authored briefs supplied by agent callers, with a
|
|
1655
|
+
* deterministic prompt-derived fallback for human-direct calls, and
|
|
1656
|
+
* immediately approves so the session lands in `work_items_ready`.
|
|
1482
1657
|
*
|
|
1483
1658
|
* Supports both existing-project sessions (spawns code_gen work items
|
|
1484
1659
|
* for the agent to lease) and zero-to-one sessions (spawns
|
|
@@ -1523,6 +1698,11 @@ class AgentVariantsOrchestrator {
|
|
|
1523
1698
|
count,
|
|
1524
1699
|
briefs: args.briefs,
|
|
1525
1700
|
uniqueBriefIds: Boolean(appendSessionId),
|
|
1701
|
+
existingLabels: appendSessionId
|
|
1702
|
+
? this.store
|
|
1703
|
+
.getVariants(appendSessionId)
|
|
1704
|
+
.map((variant) => variant.label)
|
|
1705
|
+
: [],
|
|
1526
1706
|
});
|
|
1527
1707
|
let sessionId;
|
|
1528
1708
|
let variantIds;
|
|
@@ -1537,12 +1717,14 @@ class AgentVariantsOrchestrator {
|
|
|
1537
1717
|
? { variantContext: projectContext.variantContext }
|
|
1538
1718
|
: {}),
|
|
1539
1719
|
};
|
|
1540
|
-
const { createdWorkItemIds } =
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1720
|
+
const { createdWorkItemIds } = this.store.appendCodeGenVariants({
|
|
1721
|
+
...forkArgs,
|
|
1722
|
+
// Fork parent (Vary on a variant): seeds each new worktree from the
|
|
1723
|
+
// parent's tree instead of the base tree. Absent for a plain append.
|
|
1724
|
+
...(args.sourceVariantId
|
|
1725
|
+
? { sourceVariantId: args.sourceVariantId }
|
|
1726
|
+
: {}),
|
|
1727
|
+
});
|
|
1546
1728
|
variantIds = createdWorkItemIds;
|
|
1547
1729
|
this.startVariantsRound({
|
|
1548
1730
|
sessionId,
|
|
@@ -1665,31 +1847,42 @@ class AgentVariantsOrchestrator {
|
|
|
1665
1847
|
};
|
|
1666
1848
|
}
|
|
1667
1849
|
/**
|
|
1668
|
-
* Build the per-variant briefs for a unified start.
|
|
1669
|
-
*
|
|
1670
|
-
*
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
1673
|
-
* batch's briefIds can't collide with
|
|
1850
|
+
* Build the per-variant briefs for a unified start. Supplied briefs keep
|
|
1851
|
+
* meaningful direction labels, while duplicate or empty labels are made
|
|
1852
|
+
* unique against the visible session rows. The fallback derives a short
|
|
1853
|
+
* run-intent label from the prompt (e.g. "make it brighter" →
|
|
1854
|
+
* "Brighter 1/2/…") rather than an indistinct "Variant N". `uniqueBriefIds`
|
|
1855
|
+
* is set for the append path so the new batch's briefIds can't collide with
|
|
1856
|
+
* the live session's existing ones.
|
|
1674
1857
|
*/
|
|
1675
1858
|
buildUnifiedBriefs(args) {
|
|
1676
1859
|
const briefId = (i) => args.uniqueBriefIds ? `v-${(0, crypto_1.randomUUID)().slice(0, 8)}` : `v${i + 1}`;
|
|
1860
|
+
const runLabel = args.runLabel?.trim() || (0, runLabel_1.deriveRunLabel)(args.prompt);
|
|
1861
|
+
const usedLabels = new Set((args.existingLabels ?? []).map(briefLabelKey));
|
|
1862
|
+
const withUniqueLabel = (brief, slotIndex) => ({
|
|
1863
|
+
...brief,
|
|
1864
|
+
label: uniquifyBriefLabel({
|
|
1865
|
+
label: brief.label,
|
|
1866
|
+
runLabel,
|
|
1867
|
+
slotIndex,
|
|
1868
|
+
usedLabels,
|
|
1869
|
+
}),
|
|
1870
|
+
});
|
|
1677
1871
|
if (args.briefs) {
|
|
1678
|
-
return args.briefs.map((b, i) => (0, briefContent_1.normalizeBriefContent)({
|
|
1872
|
+
return args.briefs.map((b, i) => withUniqueLabel((0, briefContent_1.normalizeBriefContent)({
|
|
1679
1873
|
briefId: briefId(i),
|
|
1680
1874
|
label: b.label,
|
|
1681
1875
|
body: b.body,
|
|
1682
1876
|
...(b.visualReferenceUrl
|
|
1683
1877
|
? { visualReferenceUrl: b.visualReferenceUrl }
|
|
1684
1878
|
: {}),
|
|
1685
|
-
}));
|
|
1879
|
+
}), i));
|
|
1686
1880
|
}
|
|
1687
|
-
|
|
1688
|
-
return Array.from({ length: args.count }, (_, i) => ({
|
|
1881
|
+
return Array.from({ length: args.count }, (_, i) => withUniqueLabel({
|
|
1689
1882
|
briefId: briefId(i),
|
|
1690
1883
|
label: args.count > 1 ? `${runLabel} ${i + 1}` : runLabel,
|
|
1691
1884
|
body: synthesizeUnifiedBriefBody(args.prompt, i + 1, args.count),
|
|
1692
|
-
}));
|
|
1885
|
+
}, i));
|
|
1693
1886
|
}
|
|
1694
1887
|
/**
|
|
1695
1888
|
* The active sessionId IF it is an existing-project session for `projectPath`
|
|
@@ -2099,10 +2292,10 @@ class AgentVariantsOrchestrator {
|
|
|
2099
2292
|
};
|
|
2100
2293
|
}
|
|
2101
2294
|
/**
|
|
2102
|
-
* User has reviewed the rendered variants
|
|
2103
|
-
*
|
|
2104
|
-
*
|
|
2105
|
-
*
|
|
2295
|
+
* User has reviewed the rendered variants and picked one. Look up the
|
|
2296
|
+
* captured diff or generated project, apply it to the destination, and record
|
|
2297
|
+
* the pick. Idempotent on (sessionId, variantId): repeating the call returns
|
|
2298
|
+
* duplicate=true without applying again.
|
|
2106
2299
|
*/
|
|
2107
2300
|
async commitVariant(args) {
|
|
2108
2301
|
// Serialize per-session so two overlapping commits can't both run
|
|
@@ -2144,13 +2337,11 @@ class AgentVariantsOrchestrator {
|
|
|
2144
2337
|
// without going back through resources (which may have been torn down).
|
|
2145
2338
|
const existingPick = this.store.getVariantPick(args.sessionId);
|
|
2146
2339
|
if (existingPick && existingPick.variantId === args.variantId) {
|
|
2147
|
-
// Retry-safe history flip. If the first commit attempt
|
|
2148
|
-
// successfully but the history-persist task crashed
|
|
2149
|
-
//
|
|
2150
|
-
//
|
|
2151
|
-
//
|
|
2152
|
-
// terminal-status guard in `markStatus` makes this safely
|
|
2153
|
-
// idempotent.
|
|
2340
|
+
// Retry-safe history flip. If the first commit attempt applied
|
|
2341
|
+
// successfully but the history-persist task crashed, the chosen variant
|
|
2342
|
+
// stays at `completed` instead of `committed` on disk. Re-run the flip on
|
|
2343
|
+
// every duplicate attempt; the terminal-status guard in `markStatus`
|
|
2344
|
+
// makes this safely idempotent.
|
|
2154
2345
|
const projectContext = this.store.getProjectContext(args.sessionId);
|
|
2155
2346
|
let historyProjectPath;
|
|
2156
2347
|
if (projectContext.kind === 'fresh') {
|
|
@@ -2526,10 +2717,8 @@ class AgentVariantsOrchestrator {
|
|
|
2526
2717
|
throw new errors_1.AgentVariantsError('INVALID_STAGE_ACTION', `Variant ${args.variantId} has no captured diff yet — wait for report_variant_complete(succeeded) first`);
|
|
2527
2718
|
}
|
|
2528
2719
|
changedFilesCount = countDiffFiles(record.diff);
|
|
2529
|
-
// Apply the diff to the user's working tree
|
|
2530
|
-
//
|
|
2531
|
-
// enqueued the diff for an agent to apply; non-MCP sessions had no
|
|
2532
|
-
// agent and the variant was effectively lost.
|
|
2720
|
+
// Apply the diff to the user's working tree so the variant lands on the
|
|
2721
|
+
// current branch uncommitted.
|
|
2533
2722
|
if (!this.worktrees.applyDiffToProject) {
|
|
2534
2723
|
throw new errors_1.AgentVariantsError('RUNTIME_VALIDATION_FAILED', 'WorktreeManager does not support applying diffs to the project tree');
|
|
2535
2724
|
}
|
|
@@ -2584,7 +2773,6 @@ class AgentVariantsOrchestrator {
|
|
|
2584
2773
|
catch (err) {
|
|
2585
2774
|
log.warn(`persistVariantHistoryAtCommit failed for session ${args.sessionId}`, err);
|
|
2586
2775
|
}
|
|
2587
|
-
const enqueueResult = this.adapter.enqueue(envelope);
|
|
2588
2776
|
resources.committedVariantIds.add(args.variantId);
|
|
2589
2777
|
// For fresh `new-project` commits the committed variant IS the user's
|
|
2590
2778
|
// final result — there's no dev server to fall back to. Keep the session
|
|
@@ -2610,7 +2798,7 @@ class AgentVariantsOrchestrator {
|
|
|
2610
2798
|
isFresh: projectContext.kind === 'fresh',
|
|
2611
2799
|
});
|
|
2612
2800
|
this.emitChange();
|
|
2613
|
-
log.info(`Variant ${args.variantId} (${input.briefLabel}) committed by user
|
|
2801
|
+
log.info(`Variant ${args.variantId} (${input.briefLabel}) committed by user`);
|
|
2614
2802
|
if (!args.skipTeardown) {
|
|
2615
2803
|
// Once a variant is committed, the unpicked worktrees are no longer
|
|
2616
2804
|
// useful. Schedule teardown in the background so the agent's
|
|
@@ -2620,8 +2808,8 @@ class AgentVariantsOrchestrator {
|
|
|
2620
2808
|
});
|
|
2621
2809
|
}
|
|
2622
2810
|
return {
|
|
2623
|
-
enqueued:
|
|
2624
|
-
duplicate:
|
|
2811
|
+
enqueued: true,
|
|
2812
|
+
duplicate: false,
|
|
2625
2813
|
changedFilesCount,
|
|
2626
2814
|
payloadKind: payload.kind,
|
|
2627
2815
|
destinationPath: envelopeDestination,
|
|
@@ -3249,6 +3437,7 @@ class AgentVariantsOrchestrator {
|
|
|
3249
3437
|
durationMs: Date.now() - previewStartedAt,
|
|
3250
3438
|
});
|
|
3251
3439
|
log.info(`Variant ${args.workItemId} dev server up on port ${port} (worktree ${args.record.worktreePath}; cmd: ${dev.cmd} ${dev.args.join(' ')})`);
|
|
3440
|
+
this.touchSession(args.sessionId);
|
|
3252
3441
|
return port;
|
|
3253
3442
|
}
|
|
3254
3443
|
catch (err) {
|
|
@@ -3676,6 +3865,7 @@ class AgentVariantsOrchestrator {
|
|
|
3676
3865
|
snapshotDir,
|
|
3677
3866
|
baseDir,
|
|
3678
3867
|
serve,
|
|
3868
|
+
parentVariant: this.resolveHistoryParentVariant(args.sessionId, input.sourceVariantId),
|
|
3679
3869
|
});
|
|
3680
3870
|
}
|
|
3681
3871
|
/**
|
|
@@ -3913,6 +4103,7 @@ class AgentVariantsOrchestrator {
|
|
|
3913
4103
|
designSource: designArtifact?.source,
|
|
3914
4104
|
snapshotDir: sourceDir,
|
|
3915
4105
|
serve,
|
|
4106
|
+
parentVariant: this.resolveHistoryParentVariant(args.sessionId, input.sourceVariantId),
|
|
3916
4107
|
});
|
|
3917
4108
|
}
|
|
3918
4109
|
finally {
|
|
@@ -4437,6 +4628,7 @@ class AgentVariantsOrchestrator {
|
|
|
4437
4628
|
* stub dirs at the old paths.
|
|
4438
4629
|
*/
|
|
4439
4630
|
async stopAllDevServersForSession(resources) {
|
|
4631
|
+
this.clearActivePreviewIdleTimer(resources);
|
|
4440
4632
|
const stops = [];
|
|
4441
4633
|
for (const record of resources.worktrees.values()) {
|
|
4442
4634
|
if (!record.devServerProcess)
|
|
@@ -4449,6 +4641,56 @@ class AgentVariantsOrchestrator {
|
|
|
4449
4641
|
record.port = undefined;
|
|
4450
4642
|
}
|
|
4451
4643
|
await Promise.all(stops);
|
|
4644
|
+
return stops.length;
|
|
4645
|
+
}
|
|
4646
|
+
scheduleActivePreviewIdleTimer(resources) {
|
|
4647
|
+
if (!Number.isFinite(this.activeVariantServerIdleTtlMs) ||
|
|
4648
|
+
this.activeVariantServerIdleTtlMs <= 0) {
|
|
4649
|
+
return;
|
|
4650
|
+
}
|
|
4651
|
+
this.clearActivePreviewIdleTimer(resources);
|
|
4652
|
+
resources.activePreviewIdleTimer = setTimeout(() => {
|
|
4653
|
+
resources.activePreviewIdleTimer = undefined;
|
|
4654
|
+
void this.stopIdleVariantDevServers(resources.sessionId);
|
|
4655
|
+
}, this.activeVariantServerIdleTtlMs);
|
|
4656
|
+
resources.activePreviewIdleTimer.unref?.();
|
|
4657
|
+
}
|
|
4658
|
+
clearActivePreviewIdleTimer(resources) {
|
|
4659
|
+
if (!resources.activePreviewIdleTimer)
|
|
4660
|
+
return;
|
|
4661
|
+
clearTimeout(resources.activePreviewIdleTimer);
|
|
4662
|
+
resources.activePreviewIdleTimer = undefined;
|
|
4663
|
+
}
|
|
4664
|
+
/** @effect Stops idle variant child processes and clears dead preview ports. */
|
|
4665
|
+
async stopIdleVariantDevServers(sessionId) {
|
|
4666
|
+
const resources = this.resources.get(sessionId);
|
|
4667
|
+
if (!resources || resources.cleanupStarted)
|
|
4668
|
+
return;
|
|
4669
|
+
if (resources.activePreviewIdleStop) {
|
|
4670
|
+
await resources.activePreviewIdleStop;
|
|
4671
|
+
return;
|
|
4672
|
+
}
|
|
4673
|
+
const stop = (async () => {
|
|
4674
|
+
const stoppedCount = await this.stopAllDevServersForSession(resources);
|
|
4675
|
+
if (stoppedCount === 0)
|
|
4676
|
+
return;
|
|
4677
|
+
log.info(`Stopped ${stoppedCount} idle variant dev server(s) for session ${sessionId}`);
|
|
4678
|
+
// Keep the current behavior bounded: expired previews become unavailable
|
|
4679
|
+
// until fresh generation or another path explicitly starts servers again.
|
|
4680
|
+
try {
|
|
4681
|
+
this.switchPreviewPort?.(null);
|
|
4682
|
+
}
|
|
4683
|
+
catch (err) {
|
|
4684
|
+
log.warn(`switchPreviewPort(null) after idle variant server cleanup failed for ${sessionId}`, err);
|
|
4685
|
+
}
|
|
4686
|
+
this.emitChange();
|
|
4687
|
+
})().finally(() => {
|
|
4688
|
+
if (resources.activePreviewIdleStop === stop) {
|
|
4689
|
+
resources.activePreviewIdleStop = undefined;
|
|
4690
|
+
}
|
|
4691
|
+
});
|
|
4692
|
+
resources.activePreviewIdleStop = stop;
|
|
4693
|
+
await stop;
|
|
4452
4694
|
}
|
|
4453
4695
|
/**
|
|
4454
4696
|
* Spawn a fresh dev server at the user-facing destinationPath and retarget
|
|
@@ -4551,6 +4793,7 @@ class AgentVariantsOrchestrator {
|
|
|
4551
4793
|
if (resources.cleanupStarted)
|
|
4552
4794
|
return;
|
|
4553
4795
|
resources.cleanupStarted = true;
|
|
4796
|
+
this.clearActivePreviewIdleTimer(resources);
|
|
4554
4797
|
log.info(`Tearing down session ${sessionId} (reason: ${reason})`);
|
|
4555
4798
|
// Drain in-flight history persists BEFORE deleting worktrees: a tree
|
|
4556
4799
|
// snapshot's `git add -A --work-tree <worktree>` racing the deletion
|
|
@@ -5779,11 +6022,10 @@ const defaultMaterializeProject = async (sourceWorktreePath, destinationPath) =>
|
|
|
5779
6022
|
});
|
|
5780
6023
|
};
|
|
5781
6024
|
/**
|
|
5782
|
-
* Synthesize a
|
|
5783
|
-
*
|
|
5784
|
-
*
|
|
5785
|
-
*
|
|
5786
|
-
* future diversity hints can be added without a call-site change.
|
|
6025
|
+
* Synthesize a fallback brief body for a human-direct unified start slot.
|
|
6026
|
+
* Agent callers provide structured briefs before starting. Index/total are
|
|
6027
|
+
* unused for now but kept in the signature so future human-direct diversity
|
|
6028
|
+
* hints can be added without a call-site change.
|
|
5787
6029
|
*/
|
|
5788
6030
|
function synthesizeUnifiedBriefBody(prompt, _index, _total) {
|
|
5789
6031
|
const trimmed = prompt.trim().replace(/\s+/g, ' ').slice(0, 200);
|