Skip to content

Commit 5f2d888

Browse files
yarin-magclaude
andcommitted
fix(start): register /stream SSE route in CLI start command
The SSE endpoint was only wired in index.ts, not in start.ts (the CLI 'marionette start' path). The catch-all app.get("*") was intercepting GET /stream and returning index.html, causing the dashboard EventSource to receive text/html instead of text/event-stream. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 98196fc commit 5f2d888

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

apps/server/src/cli/start.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function start(): Promise<void> {
3232

3333
const server = app.listen(config.port, () => {
3434
logger.info(`Server listening on http://localhost:${config.port}`);
35-
logger.info(`WebSocket: ws://localhost:${config.port}/stream`);
35+
logger.info(`SSE stream: http://localhost:${config.port}/stream`);
3636
});
3737

3838
const agentService = new AgentService();
@@ -43,6 +43,7 @@ export async function start(): Promise<void> {
4343
wsService.start();
4444

4545
app.use("/api", createApiRoutes(wsService, commandService, eventService));
46+
app.get("/stream", (req, res) => wsService.handleSseConnection(req, res));
4647

4748
// Serve bundled React app
4849
const webDist = process.env.WEB_DIST ?? resolve(distDir, "../web");

0 commit comments

Comments
 (0)