feat(worktree): add managed workspace cloning (#30117)

This commit is contained in:
Dax
2026-05-31 11:57:44 -04:00
committed by GitHub
parent 331bed2469
commit 5661af2034
23 changed files with 2374 additions and 28 deletions

View File

@@ -1,6 +1,8 @@
import { Config } from "@/config/config"
import { EventV2 } from "@opencode-ai/core/event"
import { InstanceDisposed } from "@/server/event"
import "@opencode-ai/core/account"
import "@/server/event"
import { Schema } from "effect"
import { HttpApi, HttpApiEndpoint, HttpApiError, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
import { described } from "./metadata"

View File

@@ -19,6 +19,9 @@ const apiLayer = HttpRouter.serve(
HttpApiBuilder.layer(RootHttpApi).pipe(
Layer.provide([controlHandlers, 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
HttpRouter.provideRequest(Layer.succeedContext(Context.empty() as Context.Context<unknown>)),
),
{ disableListenLog: true, disableLogger: true },
).pipe(
@@ -33,9 +36,6 @@ const apiLayer = HttpRouter.serve(
}),
),
Layer.provide(ServerAuth.Config.layer({ password: Option.none(), username: "opencode" })),
// Raw HttpApi routes expose an opaque handler context at the web boundary.
// oxlint-disable-next-line typescript-eslint/no-unsafe-type-assertion
Layer.provide(Layer.succeedContext(Context.empty() as Context.Context<unknown>)),
)
const it = testEffect(apiLayer)