refactor(maestro): rename brokerStreamUrl to attachStreamUrl
There is no broker: the SPA opens the daemon's /api/attach/:id directly through the maestro-web proxy. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
8ff5046ff3
commit
69586a4da5
+3
-3
@@ -5,7 +5,7 @@ import "@xterm/xterm/css/xterm.css";
|
||||
import type { ClientControl, Uuid } from "./types.js";
|
||||
|
||||
/**
|
||||
* A single live attach: an xterm terminal bound to a daemon-broker WebSocket.
|
||||
* A single live attach: an xterm terminal bound to the daemon's attach WebSocket.
|
||||
*
|
||||
* The connection is **decoupled from the UI**: it owns a long-lived WS that
|
||||
* keeps streaming PTY output into the terminal buffer whether or not the view
|
||||
@@ -56,7 +56,7 @@ function esc(s: string): string {
|
||||
* reverse-proxies this WebSocket to the co-located daemon's `/api/attach/:id`
|
||||
* endpoint.
|
||||
*/
|
||||
function brokerStreamUrl(sessionId: Uuid): string {
|
||||
function attachStreamUrl(sessionId: Uuid): string {
|
||||
const proto = location.protocol === "https:" ? "wss:" : "ws:";
|
||||
return `${proto}//${location.host}/api/attach/${encodeURIComponent(sessionId)}`;
|
||||
}
|
||||
@@ -264,7 +264,7 @@ export function createAttachConnection(
|
||||
}
|
||||
};
|
||||
|
||||
const ws = new WebSocket(brokerStreamUrl(sessionId));
|
||||
const ws = new WebSocket(attachStreamUrl(sessionId));
|
||||
ws.binaryType = "arraybuffer";
|
||||
|
||||
const sendControl = (msg: ClientControl) => {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// anything malformed — a corrupt or stale blob falls back to a single empty tab.
|
||||
//
|
||||
// Sessions that no longer exist when a layout is restored are not pruned here
|
||||
// (the session list isn't known yet at boot); their panes attach, the broker
|
||||
// (the session list isn't known yet at boot); their panes attach, the daemon
|
||||
// closes the dead socket, and the pane auto-closes (see ConnectionPool.onClosed).
|
||||
|
||||
import { freshId, type Layout, type Node, type Tab } from "./layout.js";
|
||||
|
||||
Reference in New Issue
Block a user