rivet-design 0.10.8 → 0.10.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +47 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +277 -123
- package/dist/index.js.map +1 -1
- package/dist/mcp/agent-variants/SessionStore.d.ts +23 -1
- package/dist/mcp/agent-variants/SessionStore.d.ts.map +1 -1
- package/dist/mcp/agent-variants/SessionStore.js +42 -0
- package/dist/mcp/agent-variants/SessionStore.js.map +1 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.d.ts +75 -2
- package/dist/mcp/agent-variants/WorktreeOrchestrator.d.ts.map +1 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.js +697 -116
- package/dist/mcp/agent-variants/WorktreeOrchestrator.js.map +1 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.d.ts +7 -2
- package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.d.ts.map +1 -1
- package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.js +7 -2
- package/dist/mcp/agent-variants/WorktreeOrchestrator.testHelpers.js.map +1 -1
- package/dist/mcp/agent-variants/contracts.d.ts +1163 -233
- package/dist/mcp/agent-variants/contracts.d.ts.map +1 -1
- package/dist/mcp/agent-variants/contracts.js +12 -4
- package/dist/mcp/agent-variants/contracts.js.map +1 -1
- package/dist/mcp/agent-variants/designCritique.d.ts +163 -0
- package/dist/mcp/agent-variants/designCritique.d.ts.map +1 -0
- package/dist/mcp/agent-variants/designCritique.js +710 -0
- package/dist/mcp/agent-variants/designCritique.js.map +1 -0
- package/dist/mcp/agent-variants/diffQa.d.ts +7 -0
- package/dist/mcp/agent-variants/diffQa.d.ts.map +1 -0
- package/dist/mcp/agent-variants/diffQa.js +67 -0
- package/dist/mcp/agent-variants/diffQa.js.map +1 -0
- package/dist/mcp/agent-variants/index.d.ts +2 -2
- package/dist/mcp/agent-variants/index.d.ts.map +1 -1
- package/dist/mcp/agent-variants/index.js +2 -1
- package/dist/mcp/agent-variants/index.js.map +1 -1
- package/dist/mcp/agent-variants/previewQa.d.ts.map +1 -1
- package/dist/mcp/agent-variants/previewQa.js +7 -0
- package/dist/mcp/agent-variants/previewQa.js.map +1 -1
- package/dist/mcp/agent-variants/tools.js +8 -0
- package/dist/mcp/agent-variants/tools.js.map +1 -1
- package/dist/mcp/auth/httpOAuthProvider.d.ts +103 -0
- package/dist/mcp/auth/httpOAuthProvider.d.ts.map +1 -0
- package/dist/mcp/auth/httpOAuthProvider.js +454 -0
- package/dist/mcp/auth/httpOAuthProvider.js.map +1 -0
- package/dist/mcp/auth/tools.d.ts +2 -0
- package/dist/mcp/auth/tools.d.ts.map +1 -1
- package/dist/mcp/auth/tools.js +12 -5
- package/dist/mcp/auth/tools.js.map +1 -1
- package/dist/mcp/httpServer.d.ts +36 -0
- package/dist/mcp/httpServer.d.ts.map +1 -0
- package/dist/mcp/httpServer.js +307 -0
- package/dist/mcp/httpServer.js.map +1 -0
- package/dist/mcp/server.d.ts +17 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +37 -17
- package/dist/mcp/server.js.map +1 -1
- package/dist/proxy-middleware/proxy-config.d.ts.map +1 -1
- package/dist/proxy-middleware/proxy-config.js +5 -2
- package/dist/proxy-middleware/proxy-config.js.map +1 -1
- package/dist/routes/agentVariants.d.ts.map +1 -1
- package/dist/routes/agentVariants.js +2 -1
- package/dist/routes/agentVariants.js.map +1 -1
- package/dist/routes/mcp.d.ts.map +1 -1
- package/dist/routes/mcp.js +2 -1
- package/dist/routes/mcp.js.map +1 -1
- package/dist/server.d.ts +9 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +13 -5
- package/dist/server.js.map +1 -1
- package/dist/services/AuthService.d.ts +1 -0
- package/dist/services/AuthService.d.ts.map +1 -1
- package/dist/services/AuthService.js +11 -1
- package/dist/services/AuthService.js.map +1 -1
- package/dist/services/ConfigManager.d.ts +5 -0
- package/dist/services/ConfigManager.d.ts.map +1 -1
- package/dist/services/ConfigManager.js +25 -3
- package/dist/services/ConfigManager.js.map +1 -1
- package/dist/services/DevServerRuntimeService.d.ts +119 -0
- package/dist/services/DevServerRuntimeService.d.ts.map +1 -0
- package/dist/services/DevServerRuntimeService.js +657 -0
- package/dist/services/DevServerRuntimeService.js.map +1 -0
- package/dist/services/GatewayClient.d.ts +25 -0
- package/dist/services/GatewayClient.d.ts.map +1 -1
- package/dist/services/GatewayClient.js +70 -11
- package/dist/services/GatewayClient.js.map +1 -1
- package/dist/services/RequestAuthContext.d.ts +7 -1
- package/dist/services/RequestAuthContext.d.ts.map +1 -1
- package/dist/services/RequestAuthContext.js +15 -2
- package/dist/services/RequestAuthContext.js.map +1 -1
- package/dist/services/SessionBridgeService.d.ts +1 -0
- package/dist/services/SessionBridgeService.d.ts.map +1 -1
- package/dist/services/SessionBridgeService.js +16 -1
- package/dist/services/SessionBridgeService.js.map +1 -1
- package/dist/services/createAgentVariantsOrchestrator.d.ts.map +1 -1
- package/dist/services/createAgentVariantsOrchestrator.js +7 -0
- package/dist/services/createAgentVariantsOrchestrator.js.map +1 -1
- package/dist/utils/skills/shared-variants-protocol.d.ts.map +1 -1
- package/dist/utils/skills/shared-variants-protocol.js +5 -2
- package/dist/utils/skills/shared-variants-protocol.js.map +1 -1
- package/dist/utils/variantSessionStart.d.ts +3 -0
- package/dist/utils/variantSessionStart.d.ts.map +1 -0
- package/dist/utils/variantSessionStart.js +7 -0
- package/dist/utils/variantSessionStart.js.map +1 -0
- package/package.json +1 -1
- package/src/ui/dist/assets/{main-WqlDU4Ou.js → main-Cwwhwfjq.js} +151 -151
- package/src/ui/dist/assets/{main-auZA25j4.css → main-Do6whVIm.css} +1 -1
- package/src/ui/dist/index.html +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { ProjectDetectionService } from './index-core';
|
|
1
2
|
import { TerminalAgentRunner, type EmbeddedAgentKind } from './services/TerminalAgentRunner';
|
|
3
|
+
import { SessionBridgeService } from './services/SessionBridgeService';
|
|
2
4
|
import type { Framework } from './services/ProjectDetectionService';
|
|
5
|
+
import { DevServerRuntimeService, type StartDevServerResult } from './services/DevServerRuntimeService';
|
|
3
6
|
export type CLIOptions = {
|
|
4
7
|
userPort?: number;
|
|
5
8
|
rivetPort?: number;
|
|
@@ -31,10 +34,10 @@ export type CLIOptions = {
|
|
|
31
34
|
export declare const DEFAULT_PORT = 4000;
|
|
32
35
|
export declare const DEFAULT_USER_PORT = 3000;
|
|
33
36
|
type AgentDevServerContext = {
|
|
34
|
-
ownership: 'external' | 'none';
|
|
37
|
+
ownership: 'external' | 'none' | 'rivet_owned';
|
|
35
38
|
host: string | null;
|
|
36
39
|
port: number | null;
|
|
37
|
-
startedByRivet:
|
|
40
|
+
startedByRivet: boolean;
|
|
38
41
|
};
|
|
39
42
|
type AgentDevServerHealth = AgentDevServerContext & {
|
|
40
43
|
isReachable: boolean | null;
|
|
@@ -43,15 +46,50 @@ type AgentDevServerHealth = AgentDevServerContext & {
|
|
|
43
46
|
};
|
|
44
47
|
type AgentDevServerContextOptions = {
|
|
45
48
|
framework: Framework;
|
|
49
|
+
ownership?: AgentDevServerContext['ownership'];
|
|
46
50
|
devServerHost?: string;
|
|
47
51
|
userDevServerPort: number;
|
|
52
|
+
startedByRivet?: boolean;
|
|
48
53
|
};
|
|
49
54
|
/**
|
|
50
55
|
* Builds the dev-server context advertised to the embedded agent UI.
|
|
51
56
|
*/
|
|
52
|
-
export declare const buildAgentDevServerContext: ({ framework, devServerHost, userDevServerPort, }: AgentDevServerContextOptions) => AgentDevServerContext;
|
|
57
|
+
export declare const buildAgentDevServerContext: ({ framework, ownership, devServerHost, userDevServerPort, startedByRivet, }: AgentDevServerContextOptions) => AgentDevServerContext;
|
|
58
|
+
type AgentProject = {
|
|
59
|
+
id: string;
|
|
60
|
+
path: string;
|
|
61
|
+
devServerPort: number;
|
|
62
|
+
devServerHost?: string;
|
|
63
|
+
status: 'detected' | 'connected' | 'error';
|
|
64
|
+
packageManager: 'npm' | 'yarn' | 'pnpm';
|
|
65
|
+
framework: Framework;
|
|
66
|
+
entryPoint?: string;
|
|
67
|
+
};
|
|
68
|
+
type AgentDevServerResolution = {
|
|
69
|
+
project: AgentProject;
|
|
70
|
+
userDevServerPort: number;
|
|
71
|
+
devServerContext: AgentDevServerContext;
|
|
72
|
+
cleanup?: () => Promise<void>;
|
|
73
|
+
ownedProcess?: Extract<StartDevServerResult, {
|
|
74
|
+
success: true;
|
|
75
|
+
}>['process'];
|
|
76
|
+
};
|
|
77
|
+
type AgentDevServerResolverOptions = {
|
|
78
|
+
projectPath: string;
|
|
79
|
+
options: Pick<CLIOptions, 'framework' | 'entry' | 'userPort'>;
|
|
80
|
+
detection?: Pick<ProjectDetectionService, 'detectProject' | 'detectFramework' | 'detectPackageManager' | 'readConfiguredPort' | 'findRunningDevServer'>;
|
|
81
|
+
runtime?: DevServerRuntimeService;
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Resolves the target app endpoint for embedded agent mode.
|
|
85
|
+
*/
|
|
86
|
+
export declare const resolveAgentDevServer: ({ projectPath, options, detection, runtime, }: AgentDevServerResolverOptions) => Promise<AgentDevServerResolution>;
|
|
53
87
|
/** Builds the current preview server health state used by variant preview routing. */
|
|
54
88
|
export declare const buildAgentDevServerHealth: (context: AgentDevServerContext) => AgentDevServerHealth;
|
|
89
|
+
/**
|
|
90
|
+
* Updates bridge health when the active owned app dev server exits.
|
|
91
|
+
*/
|
|
92
|
+
export declare const updateOwnedDevServerHealthOnExit: (bridge: Pick<SessionBridgeService, "getDevServerHealth" | "isActive" | "updateDevServerHealth">, ownedDevServerPort: number | null) => void;
|
|
55
93
|
/**
|
|
56
94
|
* Returns whether embedded agent variants can be offered for this runtime.
|
|
57
95
|
*/
|
|
@@ -60,6 +98,12 @@ export declare const isAgentVariantsEnabled: (options: Pick<CLIOptions, "noGit">
|
|
|
60
98
|
* @effect Stops active terminal agent processes before the CLI exits on OS signals.
|
|
61
99
|
*/
|
|
62
100
|
export declare const registerAgentSignalHandlers: (runner: Pick<TerminalAgentRunner, "stopActiveRuns">) => void;
|
|
101
|
+
/**
|
|
102
|
+
* @effect Sends a best-effort signal to an owned app dev server before process exit.
|
|
103
|
+
*/
|
|
104
|
+
export declare const registerOwnedDevServerSignalHandlers: (options: {
|
|
105
|
+
kill: (signal: NodeJS.Signals) => unknown;
|
|
106
|
+
}) => void;
|
|
63
107
|
export declare const main: (args?: string[]) => Promise<void>;
|
|
64
108
|
export declare const parseArgs: (args: string[]) => CLIOptions;
|
|
65
109
|
export {};
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"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"}
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
36
36
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.parseArgs = exports.main = exports.registerAgentSignalHandlers = exports.isAgentVariantsEnabled = exports.buildAgentDevServerHealth = exports.buildAgentDevServerContext = exports.DEFAULT_USER_PORT = exports.DEFAULT_PORT = void 0;
|
|
39
|
+
exports.parseArgs = exports.main = exports.registerOwnedDevServerSignalHandlers = exports.registerAgentSignalHandlers = exports.isAgentVariantsEnabled = exports.updateOwnedDevServerHealthOnExit = exports.buildAgentDevServerHealth = exports.resolveAgentDevServer = exports.buildAgentDevServerContext = exports.DEFAULT_USER_PORT = exports.DEFAULT_PORT = void 0;
|
|
40
40
|
/* eslint-disable no-console */
|
|
41
41
|
const child_process_1 = require("child_process");
|
|
42
42
|
const dotenv = __importStar(require("dotenv"));
|
|
@@ -51,6 +51,7 @@ const AgentSessionService_1 = require("./services/AgentSessionService");
|
|
|
51
51
|
const TerminalAgentRunner_1 = require("./services/TerminalAgentRunner");
|
|
52
52
|
const ConfigManager_1 = require("./services/ConfigManager");
|
|
53
53
|
const SessionBridgeService_1 = require("./services/SessionBridgeService");
|
|
54
|
+
const DevServerRuntimeService_1 = require("./services/DevServerRuntimeService");
|
|
54
55
|
const TelemetryService_1 = require("./services/TelemetryService");
|
|
55
56
|
const skillWriter_1 = require("./utils/skillWriter");
|
|
56
57
|
const portUtils_1 = require("./utils/portUtils");
|
|
@@ -62,7 +63,7 @@ exports.DEFAULT_USER_PORT = 3000;
|
|
|
62
63
|
/**
|
|
63
64
|
* Builds the dev-server context advertised to the embedded agent UI.
|
|
64
65
|
*/
|
|
65
|
-
const buildAgentDevServerContext = ({ framework, devServerHost, userDevServerPort, }) => {
|
|
66
|
+
const buildAgentDevServerContext = ({ framework, ownership, devServerHost, userDevServerPort, startedByRivet, }) => {
|
|
66
67
|
if (framework === 'static' || userDevServerPort === 0) {
|
|
67
68
|
return {
|
|
68
69
|
ownership: 'none',
|
|
@@ -72,13 +73,136 @@ const buildAgentDevServerContext = ({ framework, devServerHost, userDevServerPor
|
|
|
72
73
|
};
|
|
73
74
|
}
|
|
74
75
|
return {
|
|
75
|
-
ownership: 'external',
|
|
76
|
+
ownership: ownership ?? 'external',
|
|
76
77
|
host: devServerHost ?? 'localhost',
|
|
77
78
|
port: userDevServerPort,
|
|
78
|
-
startedByRivet: false,
|
|
79
|
+
startedByRivet: startedByRivet ?? false,
|
|
79
80
|
};
|
|
80
81
|
};
|
|
81
82
|
exports.buildAgentDevServerContext = buildAgentDevServerContext;
|
|
83
|
+
/**
|
|
84
|
+
* Resolves the target app endpoint for embedded agent mode.
|
|
85
|
+
*/
|
|
86
|
+
const resolveAgentDevServer = async ({ projectPath, options, detection = new index_core_1.ProjectDetectionService(), runtime = (0, DevServerRuntimeService_1.createDevServerRuntimeService)(), }) => {
|
|
87
|
+
if (options.userPort) {
|
|
88
|
+
const framework = options.framework ?? 'nextjs';
|
|
89
|
+
const packageManager = await detection.detectPackageManager(projectPath);
|
|
90
|
+
const project = {
|
|
91
|
+
id: path_1.default.basename(projectPath),
|
|
92
|
+
framework,
|
|
93
|
+
path: projectPath,
|
|
94
|
+
devServerPort: options.userPort,
|
|
95
|
+
devServerHost: 'localhost',
|
|
96
|
+
status: 'detected',
|
|
97
|
+
packageManager,
|
|
98
|
+
};
|
|
99
|
+
return {
|
|
100
|
+
project,
|
|
101
|
+
userDevServerPort: options.userPort,
|
|
102
|
+
devServerContext: (0, exports.buildAgentDevServerContext)({
|
|
103
|
+
framework,
|
|
104
|
+
devServerHost: project.devServerHost,
|
|
105
|
+
userDevServerPort: options.userPort,
|
|
106
|
+
}),
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
try {
|
|
110
|
+
const project = (await detection.detectProject(projectPath, options.framework, options.entry, [], options.userPort));
|
|
111
|
+
const userDevServerPort = project.devServerPort;
|
|
112
|
+
return {
|
|
113
|
+
project,
|
|
114
|
+
userDevServerPort,
|
|
115
|
+
devServerContext: (0, exports.buildAgentDevServerContext)({
|
|
116
|
+
framework: project.framework,
|
|
117
|
+
devServerHost: project.devServerHost,
|
|
118
|
+
userDevServerPort,
|
|
119
|
+
}),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
catch (error) {
|
|
123
|
+
const isNoServerError = error instanceof Error && error.message.includes('No running dev server');
|
|
124
|
+
if (!isNoServerError) {
|
|
125
|
+
throw error;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
const framework = options.framework ?? detection.detectFramework(projectPath);
|
|
129
|
+
const packageManager = await detection.detectPackageManager(projectPath);
|
|
130
|
+
if (framework === 'static') {
|
|
131
|
+
const project = {
|
|
132
|
+
id: path_1.default.basename(projectPath),
|
|
133
|
+
framework,
|
|
134
|
+
path: projectPath,
|
|
135
|
+
devServerPort: 0,
|
|
136
|
+
devServerHost: 'localhost',
|
|
137
|
+
status: 'detected',
|
|
138
|
+
packageManager,
|
|
139
|
+
entryPoint: options.entry ?? 'index.html',
|
|
140
|
+
};
|
|
141
|
+
return {
|
|
142
|
+
project,
|
|
143
|
+
userDevServerPort: 0,
|
|
144
|
+
devServerContext: (0, exports.buildAgentDevServerContext)({
|
|
145
|
+
framework,
|
|
146
|
+
userDevServerPort: 0,
|
|
147
|
+
}),
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
const runningServer = await detection.findRunningDevServer(projectPath, []);
|
|
151
|
+
if (runningServer) {
|
|
152
|
+
const project = {
|
|
153
|
+
id: path_1.default.basename(projectPath),
|
|
154
|
+
framework,
|
|
155
|
+
path: projectPath,
|
|
156
|
+
devServerPort: runningServer.port,
|
|
157
|
+
devServerHost: runningServer.host,
|
|
158
|
+
status: 'detected',
|
|
159
|
+
packageManager,
|
|
160
|
+
};
|
|
161
|
+
return {
|
|
162
|
+
project,
|
|
163
|
+
userDevServerPort: runningServer.port,
|
|
164
|
+
devServerContext: (0, exports.buildAgentDevServerContext)({
|
|
165
|
+
framework,
|
|
166
|
+
devServerHost: runningServer.host,
|
|
167
|
+
userDevServerPort: runningServer.port,
|
|
168
|
+
}),
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
const preferredPort = detection.readConfiguredPort(projectPath) ??
|
|
172
|
+
(framework === 'vite' || framework === 'svelte' ? 5173 : exports.DEFAULT_USER_PORT);
|
|
173
|
+
const started = await runtime.start({
|
|
174
|
+
projectPath,
|
|
175
|
+
framework,
|
|
176
|
+
packageManager,
|
|
177
|
+
preferredPort,
|
|
178
|
+
});
|
|
179
|
+
if (!started.success) {
|
|
180
|
+
throw new Error(started.error);
|
|
181
|
+
}
|
|
182
|
+
const project = {
|
|
183
|
+
id: path_1.default.basename(projectPath),
|
|
184
|
+
framework,
|
|
185
|
+
path: projectPath,
|
|
186
|
+
devServerPort: started.port,
|
|
187
|
+
devServerHost: started.host,
|
|
188
|
+
status: 'detected',
|
|
189
|
+
packageManager,
|
|
190
|
+
};
|
|
191
|
+
return {
|
|
192
|
+
project,
|
|
193
|
+
userDevServerPort: started.port,
|
|
194
|
+
devServerContext: (0, exports.buildAgentDevServerContext)({
|
|
195
|
+
framework,
|
|
196
|
+
ownership: 'rivet_owned',
|
|
197
|
+
devServerHost: started.host,
|
|
198
|
+
userDevServerPort: started.port,
|
|
199
|
+
startedByRivet: true,
|
|
200
|
+
}),
|
|
201
|
+
cleanup: started.stop,
|
|
202
|
+
ownedProcess: started.process,
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
exports.resolveAgentDevServer = resolveAgentDevServer;
|
|
82
206
|
/** Builds the current preview server health state used by variant preview routing. */
|
|
83
207
|
const buildAgentDevServerHealth = (context) => ({
|
|
84
208
|
...context,
|
|
@@ -87,6 +211,23 @@ const buildAgentDevServerHealth = (context) => ({
|
|
|
87
211
|
lastCheckedAt: Date.now(),
|
|
88
212
|
});
|
|
89
213
|
exports.buildAgentDevServerHealth = buildAgentDevServerHealth;
|
|
214
|
+
/**
|
|
215
|
+
* Updates bridge health when the active owned app dev server exits.
|
|
216
|
+
*/
|
|
217
|
+
const updateOwnedDevServerHealthOnExit = (bridge, ownedDevServerPort) => {
|
|
218
|
+
const currentHealth = bridge.getDevServerHealth();
|
|
219
|
+
if (!bridge.isActive() ||
|
|
220
|
+
currentHealth.ownership !== 'rivet_owned' ||
|
|
221
|
+
currentHealth.port !== ownedDevServerPort) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
bridge.updateDevServerHealth({
|
|
225
|
+
isReachable: false,
|
|
226
|
+
reason: 'upstream_unreachable',
|
|
227
|
+
lastCheckedAt: Date.now(),
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
exports.updateOwnedDevServerHealthOnExit = updateOwnedDevServerHealthOnExit;
|
|
90
231
|
/**
|
|
91
232
|
* Returns whether embedded agent variants can be offered for this runtime.
|
|
92
233
|
*/
|
|
@@ -101,6 +242,22 @@ const registerAgentSignalHandlers = (runner) => {
|
|
|
101
242
|
process.prependOnceListener('SIGTERM', stopAgentChildren);
|
|
102
243
|
};
|
|
103
244
|
exports.registerAgentSignalHandlers = registerAgentSignalHandlers;
|
|
245
|
+
/**
|
|
246
|
+
* @effect Sends a best-effort signal to an owned app dev server before process exit.
|
|
247
|
+
*/
|
|
248
|
+
const registerOwnedDevServerSignalHandlers = (options) => {
|
|
249
|
+
const stopOwnedDevServer = () => {
|
|
250
|
+
try {
|
|
251
|
+
options.kill('SIGTERM');
|
|
252
|
+
}
|
|
253
|
+
catch {
|
|
254
|
+
// The process may have already exited; async shutdown remains authoritative.
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
process.prependOnceListener('SIGINT', stopOwnedDevServer);
|
|
258
|
+
process.prependOnceListener('SIGTERM', stopOwnedDevServer);
|
|
259
|
+
};
|
|
260
|
+
exports.registerOwnedDevServerSignalHandlers = registerOwnedDevServerSignalHandlers;
|
|
104
261
|
/** Host for production hosted tryout; aligns with `DEMO_PUBLIC_BASE_URL` on Render. */
|
|
105
262
|
const DEMO_TRYOUT_PUBLIC_HOST = 'demo.rivet.design';
|
|
106
263
|
const isDemoTryoutPublicBaseUrl = (url) => {
|
|
@@ -128,9 +285,25 @@ const main = async (args = process.argv.slice(2)) => {
|
|
|
128
285
|
return;
|
|
129
286
|
}
|
|
130
287
|
if (command === 'mcp') {
|
|
131
|
-
const { startMCPServer } = await Promise.resolve().then(() => __importStar(require('./mcp/server')));
|
|
132
288
|
const editorFlagIndex = args.indexOf('--editor');
|
|
133
289
|
const mcpEditor = editorFlagIndex !== -1 ? args[editorFlagIndex + 1] : undefined;
|
|
290
|
+
if (args.includes('--http')) {
|
|
291
|
+
// Streamable HTTP + MCP OAuth so clients (Cursor/Claude/Codex) can
|
|
292
|
+
// offer their native "Connect" sign-in instead of the stdio login tool.
|
|
293
|
+
const { startMCPServerHttp } = await Promise.resolve().then(() => __importStar(require('./mcp/httpServer')));
|
|
294
|
+
const portFlagIndex = args.indexOf('--port');
|
|
295
|
+
const parsedPort = portFlagIndex !== -1
|
|
296
|
+
? Number.parseInt(args[portFlagIndex + 1] ?? '', 10)
|
|
297
|
+
: Number.NaN;
|
|
298
|
+
await startMCPServerHttp({
|
|
299
|
+
port: Number.isInteger(parsedPort) && parsedPort > 0
|
|
300
|
+
? parsedPort
|
|
301
|
+
: undefined,
|
|
302
|
+
mcpEditor,
|
|
303
|
+
});
|
|
304
|
+
return;
|
|
305
|
+
}
|
|
306
|
+
const { startMCPServer } = await Promise.resolve().then(() => __importStar(require('./mcp/server')));
|
|
134
307
|
await startMCPServer(mcpEditor);
|
|
135
308
|
return;
|
|
136
309
|
}
|
|
@@ -582,135 +755,116 @@ const handleAgent = async (args) => {
|
|
|
582
755
|
const agentLabel = agentKind === 'codex' ? 'Codex' : 'Claude Code';
|
|
583
756
|
console.log(`\n⚠️ Rivet agent mode uses ${agentLabel} bypass permissions.`);
|
|
584
757
|
console.log('Only run this in local projects you trust.\n');
|
|
585
|
-
const projectDetection = new index_core_1.ProjectDetectionService();
|
|
586
758
|
const projectPath = process.cwd();
|
|
587
|
-
|
|
588
|
-
let userDevServerPort;
|
|
589
|
-
try {
|
|
590
|
-
project = await projectDetection.detectProject(projectPath, options.framework, options.entry, [], options.userPort);
|
|
591
|
-
userDevServerPort = options.userPort || project.devServerPort;
|
|
592
|
-
}
|
|
593
|
-
catch (error) {
|
|
594
|
-
if (options.userPort) {
|
|
595
|
-
userDevServerPort = options.userPort;
|
|
596
|
-
project = {
|
|
597
|
-
id: path_1.default.basename(projectPath),
|
|
598
|
-
framework: (options.framework || 'nextjs'),
|
|
599
|
-
path: projectPath,
|
|
600
|
-
devServerPort: options.userPort,
|
|
601
|
-
devServerHost: 'localhost',
|
|
602
|
-
status: 'detected',
|
|
603
|
-
packageManager: 'npm',
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
else {
|
|
607
|
-
const isNoServerError = error instanceof Error &&
|
|
608
|
-
error.message.includes('No running dev server');
|
|
609
|
-
if (!isNoServerError) {
|
|
610
|
-
throw error;
|
|
611
|
-
}
|
|
612
|
-
log.error('❌ No dev server detected.');
|
|
613
|
-
log.error(' Please start your dev server first (e.g., npm run dev), then run rivet agent again.');
|
|
614
|
-
process.exit(1);
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
if (userDevServerPort === undefined) {
|
|
618
|
-
log.error('❌ Could not determine dev server port.');
|
|
619
|
-
process.exit(1);
|
|
620
|
-
}
|
|
621
|
-
let rivetPort = options.rivetPort ?? (await (0, portUtils_1.findAvailablePort)(exports.DEFAULT_PORT));
|
|
622
|
-
const devServerContext = (0, exports.buildAgentDevServerContext)({
|
|
623
|
-
framework: project.framework,
|
|
624
|
-
devServerHost: project.devServerHost,
|
|
625
|
-
userDevServerPort,
|
|
626
|
-
});
|
|
627
|
-
const runner = new TerminalAgentRunner_1.TerminalAgentRunner({
|
|
628
|
-
agent: agentKind,
|
|
629
|
-
agentBin: options.agentBin,
|
|
630
|
-
claudeBin: options.claudeBin,
|
|
631
|
-
model: options.model,
|
|
632
|
-
timeoutSeconds: options.agentTimeoutSeconds ?? TerminalAgentRunner_1.DEFAULT_AGENT_TIMEOUT_SECONDS,
|
|
633
|
-
});
|
|
634
|
-
const areAgentVariantsEnabled = (0, exports.isAgentVariantsEnabled)(options);
|
|
635
|
-
const variantsRuntime = areAgentVariantsEnabled
|
|
636
|
-
? (0, VariantsRuntime_1.createVariantsRuntime)({
|
|
637
|
-
projectPath,
|
|
638
|
-
telemetry,
|
|
639
|
-
runner,
|
|
640
|
-
devServerContext,
|
|
641
|
-
devServerHealth: (0, exports.buildAgentDevServerHealth)(devServerContext),
|
|
642
|
-
})
|
|
643
|
-
: undefined;
|
|
644
|
-
const bridge = variantsRuntime?.bridge ?? new SessionBridgeService_1.SessionBridgeService();
|
|
645
|
-
if (!variantsRuntime) {
|
|
646
|
-
bridge.startSession(projectPath);
|
|
647
|
-
bridge.setDevServerContext(devServerContext);
|
|
648
|
-
bridge.updateDevServerHealth((0, exports.buildAgentDevServerHealth)(devServerContext));
|
|
649
|
-
}
|
|
650
|
-
const sessionId = bridge.getSessionId() ?? bridge.startSession(projectPath);
|
|
651
|
-
const agentVariantsOrchestrator = variantsRuntime?.orchestrator;
|
|
652
|
-
const variantRunService = variantsRuntime?.runService;
|
|
653
|
-
const agentSession = new AgentSessionService_1.AgentSessionService({
|
|
654
|
-
bridge,
|
|
759
|
+
const agentDevServer = await (0, exports.resolveAgentDevServer)({
|
|
655
760
|
projectPath,
|
|
656
|
-
|
|
657
|
-
variantRunService,
|
|
658
|
-
worktreeProjectLocator: agentVariantsOrchestrator,
|
|
761
|
+
options,
|
|
659
762
|
});
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
763
|
+
const { project, userDevServerPort, devServerContext } = agentDevServer;
|
|
764
|
+
try {
|
|
765
|
+
let rivetPort = options.rivetPort ?? (await (0, portUtils_1.findAvailablePort)(exports.DEFAULT_PORT));
|
|
766
|
+
const runner = new TerminalAgentRunner_1.TerminalAgentRunner({
|
|
767
|
+
agent: agentKind,
|
|
768
|
+
agentBin: options.agentBin,
|
|
769
|
+
claudeBin: options.claudeBin,
|
|
770
|
+
model: options.model,
|
|
771
|
+
timeoutSeconds: options.agentTimeoutSeconds ?? TerminalAgentRunner_1.DEFAULT_AGENT_TIMEOUT_SECONDS,
|
|
772
|
+
});
|
|
773
|
+
const areAgentVariantsEnabled = (0, exports.isAgentVariantsEnabled)(options);
|
|
774
|
+
const variantsRuntime = areAgentVariantsEnabled
|
|
775
|
+
? (0, VariantsRuntime_1.createVariantsRuntime)({
|
|
670
776
|
projectPath,
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
777
|
+
telemetry,
|
|
778
|
+
runner,
|
|
779
|
+
devServerContext,
|
|
780
|
+
devServerHealth: (0, exports.buildAgentDevServerHealth)(devServerContext),
|
|
781
|
+
})
|
|
782
|
+
: undefined;
|
|
783
|
+
const bridge = variantsRuntime?.bridge ?? new SessionBridgeService_1.SessionBridgeService();
|
|
784
|
+
if (!variantsRuntime) {
|
|
785
|
+
bridge.startSession(projectPath);
|
|
786
|
+
bridge.setDevServerContext(devServerContext);
|
|
787
|
+
bridge.updateDevServerHealth((0, exports.buildAgentDevServerHealth)(devServerContext));
|
|
788
|
+
}
|
|
789
|
+
const sessionId = bridge.getSessionId() ?? bridge.startSession(projectPath);
|
|
790
|
+
if (agentDevServer.ownedProcess) {
|
|
791
|
+
const ownedDevServerPort = devServerContext.port;
|
|
792
|
+
(0, exports.registerOwnedDevServerSignalHandlers)(agentDevServer.ownedProcess);
|
|
793
|
+
agentDevServer.ownedProcess.once('exit', () => {
|
|
794
|
+
(0, exports.updateOwnedDevServerHealthOnExit)(bridge, ownedDevServerPort);
|
|
682
795
|
});
|
|
683
|
-
serverStarted = true;
|
|
684
796
|
}
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
797
|
+
const agentVariantsOrchestrator = variantsRuntime?.orchestrator;
|
|
798
|
+
const variantRunService = variantsRuntime?.runService;
|
|
799
|
+
const agentSession = new AgentSessionService_1.AgentSessionService({
|
|
800
|
+
bridge,
|
|
801
|
+
projectPath,
|
|
802
|
+
runner,
|
|
803
|
+
variantRunService,
|
|
804
|
+
worktreeProjectLocator: agentVariantsOrchestrator,
|
|
805
|
+
});
|
|
806
|
+
let serverStarted = false;
|
|
807
|
+
let retries = 0;
|
|
808
|
+
const maxRetries = 5;
|
|
809
|
+
while (!serverStarted && retries < maxRetries) {
|
|
810
|
+
try {
|
|
811
|
+
await (0, server_1.startServer)({
|
|
812
|
+
userPort: userDevServerPort,
|
|
813
|
+
userHost: project.devServerHost,
|
|
814
|
+
framework: project.framework,
|
|
815
|
+
telemetry,
|
|
816
|
+
projectPath,
|
|
817
|
+
staticEntry: project.entryPoint,
|
|
818
|
+
styleFramework: options.styleFramework,
|
|
819
|
+
tailwindConfig: options.tailwindConfig,
|
|
820
|
+
sessionBridge: bridge,
|
|
821
|
+
variantsRuntime,
|
|
822
|
+
mcpEditor: agentKind === 'codex' ? 'codex' : 'claude',
|
|
823
|
+
agentApplyMode: 'embedded',
|
|
824
|
+
agentRunController: agentSession,
|
|
825
|
+
rivetPort,
|
|
826
|
+
isGitEnabled: options.noGit ? false : true,
|
|
827
|
+
skipProcessHandlers: retries > 0,
|
|
828
|
+
beforeShutdown: agentDevServer.cleanup,
|
|
829
|
+
});
|
|
830
|
+
serverStarted = true;
|
|
691
831
|
}
|
|
692
|
-
|
|
693
|
-
|
|
832
|
+
catch (err) {
|
|
833
|
+
const code = err?.code;
|
|
834
|
+
if (code === 'EADDRINUSE' && !options.rivetPort) {
|
|
835
|
+
retries++;
|
|
836
|
+
rivetPort = await (0, portUtils_1.findAvailablePort)(rivetPort + 1);
|
|
837
|
+
log.debug(`Port in use, retrying with port ${rivetPort} (attempt ${retries}/${maxRetries})`);
|
|
838
|
+
}
|
|
839
|
+
else {
|
|
840
|
+
await agentDevServer.cleanup?.();
|
|
841
|
+
throw err;
|
|
842
|
+
}
|
|
694
843
|
}
|
|
695
844
|
}
|
|
845
|
+
if (!serverStarted) {
|
|
846
|
+
await agentDevServer.cleanup?.();
|
|
847
|
+
log.error(`❌ Could not start Rivet server after ${maxRetries} attempts.`);
|
|
848
|
+
process.exit(1);
|
|
849
|
+
}
|
|
850
|
+
agentSession.start();
|
|
851
|
+
(0, exports.registerAgentSignalHandlers)(runner);
|
|
852
|
+
log.info(`✅ Rivet agent server started on http://${agentHost}:${rivetPort}`);
|
|
853
|
+
log.info(`${runner.getDisplayName()} session: ${agentSession.getContinuousSessionId()}`);
|
|
854
|
+
if (!options.noBrowser) {
|
|
855
|
+
const rivetUiPath = project.framework === 'static' ? '/' : '/rivet';
|
|
856
|
+
await (0, open_1.default)(`http://${agentHost}:${rivetPort}${rivetUiPath}`);
|
|
857
|
+
log.info('🌐 Opened Rivet in your browser');
|
|
858
|
+
}
|
|
859
|
+
log.info(`✅ Rivet agent connected to your ${project.framework} project`);
|
|
860
|
+
log.info(`Bridge session: ${sessionId}`);
|
|
861
|
+
log.info('Press Ctrl+C to stop');
|
|
862
|
+
await new Promise(() => { });
|
|
696
863
|
}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
864
|
+
catch (error) {
|
|
865
|
+
await agentDevServer.cleanup?.();
|
|
866
|
+
throw error;
|
|
700
867
|
}
|
|
701
|
-
agentSession.start();
|
|
702
|
-
(0, exports.registerAgentSignalHandlers)(runner);
|
|
703
|
-
log.info(`✅ Rivet agent server started on http://${agentHost}:${rivetPort}`);
|
|
704
|
-
log.info(`${runner.getDisplayName()} session: ${agentSession.getContinuousSessionId()}`);
|
|
705
|
-
if (!options.noBrowser) {
|
|
706
|
-
const rivetUiPath = project.framework === 'static' ? '/' : '/rivet';
|
|
707
|
-
await (0, open_1.default)(`http://${agentHost}:${rivetPort}${rivetUiPath}`);
|
|
708
|
-
log.info('🌐 Opened Rivet in your browser');
|
|
709
|
-
}
|
|
710
|
-
log.info(`✅ Rivet agent connected to your ${project.framework} project`);
|
|
711
|
-
log.info(`Bridge session: ${sessionId}`);
|
|
712
|
-
log.info('Press Ctrl+C to stop');
|
|
713
|
-
await new Promise(() => { });
|
|
714
868
|
};
|
|
715
869
|
const showHelp = () => {
|
|
716
870
|
console.log(`
|