From d79e3061ad13b6e7443c74fa24a9c66bba8bdaaf Mon Sep 17 00:00:00 2001 From: Cristina Poncela Cubeiro <140309543+cristinaponcela@users.noreply.github.com> Date: Mon, 22 Jun 2026 14:53:07 +0200 Subject: [PATCH] cleanup: one shot vs stream --- packages/orchestrator/src/cli.ts | 2 +- packages/orchestrator/src/handler.ts | 29 ++++++++++++----------- packages/orchestrator/src/ipc/protocol.ts | 11 +++++++-- packages/orchestrator/src/ipc/server.ts | 12 ++++------ packages/orchestrator/src/supervisor.ts | 2 -- 5 files changed, 29 insertions(+), 27 deletions(-) diff --git a/packages/orchestrator/src/cli.ts b/packages/orchestrator/src/cli.ts index 88304ed6..856dd658 100644 --- a/packages/orchestrator/src/cli.ts +++ b/packages/orchestrator/src/cli.ts @@ -41,7 +41,7 @@ async function rpcStream(instanceId: string): Promise { await new Promise((resolve, reject) => { socket.once("connect", () => { - socket.write(encodeMessage({ type: "rpc", instanceId })); + socket.write(encodeMessage({ type: "rpc_stream", instanceId })); resolve(); }); socket.once("error", reject); diff --git a/packages/orchestrator/src/handler.ts b/packages/orchestrator/src/handler.ts index 1aea0219..89fcb154 100644 --- a/packages/orchestrator/src/handler.ts +++ b/packages/orchestrator/src/handler.ts @@ -15,6 +15,7 @@ import type { RpcBridgeResponse, RpcReadyResponse, RpcRequest, + RpcStreamRequest, SpawnRequest, SpawnResponse, StatusRequest, @@ -50,9 +51,8 @@ export async function handleIpcRequest(request: SpawnRequest): Promise; export async function handleIpcRequest(request: StopRequest): Promise; export async function handleIpcRequest(request: StatusRequest): Promise; -export async function handleIpcRequest( - request: RpcRequest, -): Promise; +export async function handleIpcRequest(request: RpcRequest): Promise; +export async function handleIpcRequest(request: RpcStreamRequest): Promise; export async function handleIpcRequest(request: OrchestratorRequest): Promise; export async function handleIpcRequest(request: OrchestratorRequest): Promise { switch (request.type) { @@ -103,17 +103,6 @@ export async function handleIpcRequest(request: OrchestratorRequest): Promise | ListResponse | ErrorResponse; (request: StopRequest): Promise | StopResponse | ErrorResponse; (request: StatusRequest): Promise | StatusResponse | ErrorResponse; - ( - request: RpcRequest, - ): - | Promise - | RpcBridgeResponse - | RpcReadyResponse - | ErrorResponse; + (request: RpcRequest): Promise | RpcBridgeResponse | ErrorResponse; + (request: RpcStreamRequest): Promise | RpcReadyResponse | ErrorResponse; (request: OrchestratorRequest): Promise | OrchestratorResponse; attach( instanceId: string, @@ -69,7 +65,7 @@ export async function startIpcServer(handler: IpcRequestHandler): Promise; handleUiResponse(response: RpcExtensionUIResponse): void; - setHostTheme(theme: unknown): void; close(): void; } | undefined { @@ -113,7 +112,6 @@ export class OrchestratorSupervisor { handleUiResponse: (response) => { live.rpc.handleUiResponse(response); }, - setHostTheme: (_theme) => {}, close: () => { if (live.onUiRequest === onUiRequest) { live.onUiRequest = undefined;