chore: generate

This commit is contained in:
opencode-agent[bot]
2026-06-04 06:59:09 +00:00
parent 1ff19103a2
commit 30ec231aaf
19 changed files with 3592 additions and 2882 deletions

View File

@@ -34,13 +34,15 @@ export const eventHandlers = HttpApiBuilder.group(V2Api, "v2.event", (handlers)
return HttpServerResponse.stream(
Stream.make(connected).pipe(
Stream.concat(
events.all().pipe(
Stream.filter(
(event) =>
event.location?.directory === location.directory &&
event.location.workspaceID === location.workspaceID,
events
.all()
.pipe(
Stream.filter(
(event) =>
event.location?.directory === location.directory &&
event.location.workspaceID === location.workspaceID,
),
),
),
),
Stream.map(eventData),
Stream.pipeThroughChannel(Sse.encode()),

View File

@@ -14,23 +14,24 @@ import { schemaErrorLayer } from "./middleware/schema-error"
export function createRoutes(password?: string) {
return HttpApiBuilder.layer(V2Api).pipe(
Layer.provide(v2Handlers),
Layer.provide(v2AuthorizationLayer),
Layer.provide(schemaErrorLayer),
Layer.provide(
password
? ServerAuth.Config.layer({ username: "opencode", password: Option.some(password) })
: ServerAuth.Config.defaultLayer,
),
Layer.provide(LocationServiceMap.layer),
Layer.provide(PermissionSaved.layer),
Layer.provide(SessionV2.defaultLayer),
Layer.provide(Database.defaultLayer),
Layer.provide(EventV2.defaultLayer),
Layer.provide(FetchHttpClient.layer),
Layer.provide(v2Handlers),
Layer.provide(v2AuthorizationLayer),
Layer.provide(schemaErrorLayer),
Layer.provide(
password
? ServerAuth.Config.layer({ username: "opencode", password: Option.some(password) })
: ServerAuth.Config.defaultLayer,
),
Layer.provide(LocationServiceMap.layer),
Layer.provide(PermissionSaved.layer),
Layer.provide(SessionV2.defaultLayer),
Layer.provide(Database.defaultLayer),
Layer.provide(EventV2.defaultLayer),
Layer.provide(FetchHttpClient.layer),
)
}
export const routes = createRoutes()
export const webHandler = () => HttpRouter.toWebHandler(routes.pipe(Layer.provide(HttpServer.layerServices)), { disableLogger: true })
export const webHandler = () =>
HttpRouter.toWebHandler(routes.pipe(Layer.provide(HttpServer.layerServices)), { disableLogger: true })