feat(core): moving sessions (#30640)
This commit is contained in:
@@ -6,10 +6,12 @@ import { HttpApiBuilder } from "effect/unstable/httpapi"
|
||||
import { Auth } from "../../src/auth"
|
||||
import { Config } from "../../src/config/config"
|
||||
import { Installation } from "../../src/installation"
|
||||
import { MoveSession } from "@opencode-ai/core/control-plane/move-session"
|
||||
import { ServerAuth } from "../../src/server/auth"
|
||||
import { RootHttpApi } from "../../src/server/routes/instance/httpapi/api"
|
||||
import { GlobalPaths } from "../../src/server/routes/instance/httpapi/groups/global"
|
||||
import { controlHandlers } from "../../src/server/routes/instance/httpapi/handlers/control"
|
||||
import { controlPlaneHandlers } from "../../src/server/routes/instance/httpapi/handlers/control-plane"
|
||||
import { globalHandlers } from "../../src/server/routes/instance/httpapi/handlers/global"
|
||||
import { authorizationLayer } from "../../src/server/routes/instance/httpapi/middleware/authorization"
|
||||
import { schemaErrorLayer } from "../../src/server/routes/instance/httpapi/middleware/schema-error"
|
||||
@@ -17,7 +19,7 @@ import { testEffect } from "../lib/effect"
|
||||
|
||||
const apiLayer = HttpRouter.serve(
|
||||
HttpApiBuilder.layer(RootHttpApi).pipe(
|
||||
Layer.provide([controlHandlers, globalHandlers]),
|
||||
Layer.provide([controlHandlers, controlPlaneHandlers, globalHandlers]),
|
||||
Layer.provide([authorizationLayer, schemaErrorLayer]),
|
||||
// Raw HttpApi routes expose an opaque handler context at the request boundary.
|
||||
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion
|
||||
@@ -28,6 +30,7 @@ const apiLayer = HttpRouter.serve(
|
||||
Layer.provideMerge(NodeHttpServer.layerTest),
|
||||
Layer.provide(Layer.mock(Auth.Service)({})),
|
||||
Layer.provide(Layer.mock(Config.Service)({})),
|
||||
Layer.provide(Layer.mock(MoveSession.Service)({})),
|
||||
Layer.provide(
|
||||
Layer.mock(Installation.Service)({
|
||||
method: () => Effect.succeed("npm"),
|
||||
|
||||
Reference in New Issue
Block a user