chore: generate

This commit is contained in:
opencode-agent[bot]
2026-04-27 20:52:42 +00:00
parent acd15dcc8a
commit dfc0075f90
5 changed files with 136 additions and 137 deletions
@@ -31,8 +31,7 @@ export const ControlPaths = {
log: "/log",
} as const
export const ControlApi = HttpApi.make("control")
.add(
export const ControlApi = HttpApi.make("control").add(
HttpApiGroup.make("control")
.add(
HttpApiEndpoint.put("authSet", ControlPaths.auth, {
@@ -69,4 +68,4 @@ export const ControlApi = HttpApi.make("control")
),
)
.annotateMerge(OpenApi.annotations({ title: "control", description: "Control plane routes." })),
)
)
@@ -11,8 +11,7 @@ export const EventPaths = {
event: "/event",
} as const
export const EventApi = HttpApi.make("event")
.add(
export const EventApi = HttpApi.make("event").add(
HttpApiGroup.make("event")
.add(
HttpApiEndpoint.get("subscribe", EventPaths.event, {
@@ -26,7 +25,7 @@ export const EventApi = HttpApi.make("event")
),
)
.annotateMerge(OpenApi.annotations({ title: "event", description: "Instance event stream route." })),
)
)
function eventData(data: unknown) {
return `data: ${JSON.stringify(data)}\n\n`
@@ -37,8 +37,7 @@ export const GlobalPaths = {
upgrade: "/global/upgrade",
} as const
export const GlobalApi = HttpApi.make("global")
.add(
export const GlobalApi = HttpApi.make("global").add(
HttpApiGroup.make("global")
.add(
HttpApiEndpoint.get("health", GlobalPaths.health, {
@@ -99,4 +98,4 @@ export const GlobalApi = HttpApi.make("global")
),
)
.annotateMerge(OpenApi.annotations({ title: "global", description: "Global server routes." })),
)
)
@@ -113,8 +113,7 @@ export const PtyApi = HttpApi.make("pty")
}),
)
export const PtyConnectApi = HttpApi.make("pty-connect")
.add(
export const PtyConnectApi = HttpApi.make("pty-connect").add(
HttpApiGroup.make("pty-connect")
.add(
HttpApiEndpoint.get("connect", PtyPaths.connect, {
@@ -125,12 +124,13 @@ export const PtyConnectApi = HttpApi.make("pty-connect")
OpenApi.annotations({
identifier: "pty.connect",
summary: "Connect to PTY session",
description: "Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
description:
"Establish a WebSocket connection to interact with a pseudo-terminal (PTY) session in real-time.",
}),
),
)
.annotateMerge(OpenApi.annotations({ title: "pty", description: "PTY websocket route." })),
)
)
export const ptyHandlers = Layer.unwrap(
Effect.gen(function* () {
@@ -80,7 +80,9 @@ function reflectedHttpApiRoutes() {
function openApiRouteKeys(spec: { paths: Record<string, Partial<Record<(typeof methods)[number], unknown>>> }) {
return Object.entries(spec.paths)
.flatMap(([path, item]) => methods.filter((method) => item[method]).map((method) => `${method.toUpperCase()} ${path}`))
.flatMap(([path, item]) =>
methods.filter((method) => item[method]).map((method) => `${method.toUpperCase()} ${path}`),
)
.sort()
}