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", log: "/log",
} as const } as const
export const ControlApi = HttpApi.make("control") export const ControlApi = HttpApi.make("control").add(
.add(
HttpApiGroup.make("control") HttpApiGroup.make("control")
.add( .add(
HttpApiEndpoint.put("authSet", ControlPaths.auth, { HttpApiEndpoint.put("authSet", ControlPaths.auth, {
@@ -69,4 +68,4 @@ export const ControlApi = HttpApi.make("control")
), ),
) )
.annotateMerge(OpenApi.annotations({ title: "control", description: "Control plane routes." })), .annotateMerge(OpenApi.annotations({ title: "control", description: "Control plane routes." })),
) )
@@ -11,8 +11,7 @@ export const EventPaths = {
event: "/event", event: "/event",
} as const } as const
export const EventApi = HttpApi.make("event") export const EventApi = HttpApi.make("event").add(
.add(
HttpApiGroup.make("event") HttpApiGroup.make("event")
.add( .add(
HttpApiEndpoint.get("subscribe", EventPaths.event, { 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." })), .annotateMerge(OpenApi.annotations({ title: "event", description: "Instance event stream route." })),
) )
function eventData(data: unknown) { function eventData(data: unknown) {
return `data: ${JSON.stringify(data)}\n\n` return `data: ${JSON.stringify(data)}\n\n`
@@ -37,8 +37,7 @@ export const GlobalPaths = {
upgrade: "/global/upgrade", upgrade: "/global/upgrade",
} as const } as const
export const GlobalApi = HttpApi.make("global") export const GlobalApi = HttpApi.make("global").add(
.add(
HttpApiGroup.make("global") HttpApiGroup.make("global")
.add( .add(
HttpApiEndpoint.get("health", GlobalPaths.health, { HttpApiEndpoint.get("health", GlobalPaths.health, {
@@ -99,4 +98,4 @@ export const GlobalApi = HttpApi.make("global")
), ),
) )
.annotateMerge(OpenApi.annotations({ title: "global", description: "Global server routes." })), .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") export const PtyConnectApi = HttpApi.make("pty-connect").add(
.add(
HttpApiGroup.make("pty-connect") HttpApiGroup.make("pty-connect")
.add( .add(
HttpApiEndpoint.get("connect", PtyPaths.connect, { HttpApiEndpoint.get("connect", PtyPaths.connect, {
@@ -125,12 +124,13 @@ export const PtyConnectApi = HttpApi.make("pty-connect")
OpenApi.annotations({ OpenApi.annotations({
identifier: "pty.connect", identifier: "pty.connect",
summary: "Connect to PTY session", 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." })), .annotateMerge(OpenApi.annotations({ title: "pty", description: "PTY websocket route." })),
) )
export const ptyHandlers = Layer.unwrap( export const ptyHandlers = Layer.unwrap(
Effect.gen(function* () { Effect.gen(function* () {
@@ -80,7 +80,9 @@ function reflectedHttpApiRoutes() {
function openApiRouteKeys(spec: { paths: Record<string, Partial<Record<(typeof methods)[number], unknown>>> }) { function openApiRouteKeys(spec: { paths: Record<string, Partial<Record<(typeof methods)[number], unknown>>> }) {
return Object.entries(spec.paths) 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() .sort()
} }