From e5b2ce15188b4d2fd44f9cbc6c5cf73b182a3288 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Tue, 10 Mar 2026 18:26:29 -0700 Subject: [PATCH] Fix rebased runtime integration Co-authored-by: codex --- apps/server/src/serverRpc.ts | 2 +- apps/server/src/serverRuntime.ts | 7 ------- apps/server/src/wsServer.test.ts | 6 ++++-- apps/web/src/wsTransport.ts | 2 -- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/apps/server/src/serverRpc.ts b/apps/server/src/serverRpc.ts index 354f29ea59..0bd3f3d1a7 100644 --- a/apps/server/src/serverRpc.ts +++ b/apps/server/src/serverRpc.ts @@ -212,7 +212,7 @@ export const makeServerRpcHandlersLayer = Layer.unwrap( ), subscribeServerConfig: () => mapRpcStreamError( - keybindingsManager.changes.pipe( + keybindingsManager.streamChanges.pipe( Stream.mapEffect((event) => providerHealth.getStatuses.pipe( Effect.map((providers) => ({ diff --git a/apps/server/src/serverRuntime.ts b/apps/server/src/serverRuntime.ts index e416bb05e5..d8b67e4a7c 100644 --- a/apps/server/src/serverRuntime.ts +++ b/apps/server/src/serverRuntime.ts @@ -11,7 +11,6 @@ import { Keybindings } from "./keybindings"; import { OrchestrationEngineService } from "./orchestration/Services/OrchestrationEngine"; import { ProjectionSnapshotQuery } from "./orchestration/Services/ProjectionSnapshotQuery"; import { OrchestrationReactor } from "./orchestration/Services/OrchestrationReactor"; -import { ProviderService } from "./provider/Services/ProviderService"; export interface ServerBootstrapStateShape { readonly cwd: string; @@ -109,7 +108,6 @@ export const ServerRuntimeStateLive = Layer.effect( Effect.gen(function* () { const keybindingsManager = yield* Keybindings; const orchestrationReactor = yield* OrchestrationReactor; - const providerService = yield* ProviderService; yield* keybindingsManager.syncDefaultKeybindingsOnStartup.pipe( Effect.catch((error) => @@ -124,11 +122,6 @@ export const ServerRuntimeStateLive = Layer.effect( const startupScope = yield* Scope.make("sequential"); yield* Effect.addFinalizer(() => Scope.close(startupScope, Exit.void)); yield* Scope.provide(orchestrationReactor.start, startupScope); - yield* Effect.addFinalizer(() => - providerService - .stopAll() - .pipe(Effect.catch((cause) => Effect.logWarning("failed to stop provider service", { cause }))), - ); return { bootstrapState: yield* resolveBootstrapState(), diff --git a/apps/server/src/wsServer.test.ts b/apps/server/src/wsServer.test.ts index 50676b8da6..0c97380c47 100644 --- a/apps/server/src/wsServer.test.ts +++ b/apps/server/src/wsServer.test.ts @@ -7,6 +7,7 @@ import * as NodeHttpServer from "@effect/platform-node/NodeHttpServer"; import * as NodeServices from "@effect/platform-node/NodeServices"; import { DEFAULT_TERMINAL_ID, + DEFAULT_PROVIDER_INTERACTION_MODE, type ProviderRuntimeEvent, ServerRpcGroup, type ServerConfig as ServerConfigPayload, @@ -64,7 +65,6 @@ const defaultProviderService: ProviderServiceShape = { listSessions: () => Effect.succeed([]), getCapabilities: () => Effect.die(new Error("getCapabilities not implemented in test")), rollbackConversation: () => Effect.die(new Error("rollbackConversation not implemented in test")), - stopAll: () => Effect.void, streamEvents: Stream.empty as Stream.Stream, }; @@ -340,7 +340,9 @@ describe("wsServer", () => { expect(snapshot.threads).toHaveLength(1); expect(snapshot.projects[0]?.workspaceRoot).toBe("/workspace/example-project"); expect(snapshot.threads[0]?.projectId).toBe(bootstrap.bootstrapProjectId); - expect(snapshot.threads[0]?.interactionMode).toBe("chat"); + expect(snapshot.threads[0]?.interactionMode).toBe( + DEFAULT_PROVIDER_INTERACTION_MODE, + ); expect(snapshot.threads[0]?.runtimeMode).toBe("full-access"); }), ), diff --git a/apps/web/src/wsTransport.ts b/apps/web/src/wsTransport.ts index a402981a8a..c74df9630d 100644 --- a/apps/web/src/wsTransport.ts +++ b/apps/web/src/wsTransport.ts @@ -81,8 +81,6 @@ export class WsTransport { : envUrl && envUrl.length > 0 ? envUrl : `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.hostname}:${window.location.port}`); - this.url = normalizeWsUrl(resolvedUrl); - : `${window.location.protocol === "https:" ? "wss" : "ws"}://${window.location.hostname}:${window.location.port}`); this.url = normalizeWsUrl(resolvedUrl); this.connect(); }