chore: generate

This commit is contained in:
opencode-agent[bot] 2026-06-07 03:28:52 +00:00
commit 155e1f20d6
25 changed files with 492 additions and 329 deletions

View file

@ -1,15 +1,14 @@
import { Schema } from "effect"
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
export const HealthGroup = HttpApiGroup.make("server.health")
.add(
HttpApiEndpoint.get("health.get", "/api/health", {
success: Schema.Struct({ healthy: Schema.Literal(true) }),
}).annotateMerge(
OpenApi.annotations({
identifier: "v2.health.get",
summary: "Check server health",
description: "Check whether the API server is ready to accept requests.",
}),
),
)
export const HealthGroup = HttpApiGroup.make("server.health").add(
HttpApiEndpoint.get("health.get", "/api/health", {
success: Schema.Struct({ healthy: Schema.Literal(true) }),
}).annotateMerge(
OpenApi.annotations({
identifier: "v2.health.get",
summary: "Check server health",
description: "Check whether the API server is ready to accept requests.",
}),
),
)

View file

@ -83,6 +83,4 @@ export const PermissionGroup = HttpApiGroup.make("server.permission")
}),
),
)
.annotateMerge(
OpenApi.annotations({ title: "permissions", description: "Experimental permission routes." }),
)
.annotateMerge(OpenApi.annotations({ title: "permissions", description: "Experimental permission routes." }))

View file

@ -33,8 +33,7 @@ export const ProviderGroup = HttpApiGroup.make("server.provider")
OpenApi.annotations({
identifier: "v2.provider.get",
summary: "Get provider",
description:
"Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
description: "Retrieve a single AI provider so clients can inspect its availability and endpoint settings.",
}),
),
)

View file

@ -43,7 +43,11 @@ export const PermissionHandler = HttpApiBuilder.group(Api, "server.permission",
"permission.saved.list",
Effect.fn(function* (ctx) {
const location = yield* Location.Service
return { data: yield* (yield* PermissionSaved.Service).list({ projectID: ctx.query.projectID ?? location.project.id }) }
return {
data: yield* (yield* PermissionSaved.Service).list({
projectID: ctx.query.projectID ?? location.project.id,
}),
}
}),
)
.handle(

View file

@ -7,12 +7,9 @@ import { HttpApiMiddleware } from "effect/unstable/httpapi"
const AUTH_TOKEN_QUERY = "auth_token"
const WWW_AUTHENTICATE = 'Basic realm="Secure Area"'
export class Authorization extends HttpApiMiddleware.Service<Authorization>()(
"@opencode/HttpApiAuthorization",
{
error: UnauthorizedError,
},
) {}
export class Authorization extends HttpApiMiddleware.Service<Authorization>()("@opencode/HttpApiAuthorization", {
error: UnauthorizedError,
}) {}
function emptyCredential() {
return { username: "", password: Redacted.make("") }