refactor(protocol): extract server contracts (#33708)

This commit is contained in:
Kit Langton
2026-06-24 22:15:31 -04:00
committed by GitHub
parent f9dac262ff
commit 56a37c3640
77 changed files with 1070 additions and 878 deletions
@@ -9,14 +9,12 @@ import { eq } from "drizzle-orm"
import { Effect, Layer, Schema } from "effect"
import { HttpRouter } from "effect/unstable/http"
import { HttpApiMiddleware } from "effect/unstable/httpapi"
import { InvalidRequestError, SessionNotFoundError } from "../errors"
import type { LocationServices } from "../groups/location"
import { InvalidRequestError, SessionNotFoundError } from "@opencode-ai/protocol/errors"
import type { LocationServices } from "../location"
export class SessionLocationMiddleware extends HttpApiMiddleware.Service<
SessionLocationMiddleware,
{
provides: LocationServices
}
{ provides: LocationServices }
>()("@opencode/HttpApiSessionLocation", {
error: [InvalidRequestError, SessionNotFoundError],
}) {}