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, {
@@ -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, {
@@ -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, {
@@ -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,7 +124,8 @@ 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.",
}), }),
), ),
) )
@@ -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()
} }