Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233import { Location } from "@opencode/schema/location"import { Schema } from "effect"import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"import { LocationQuery, locationQueryOpenApi } from "./location.js"
export const DebugGroup = HttpApiGroup.make("server.debug") .add( HttpApiEndpoint.get("debug.location", "/api/debug/location", { success: Schema.Array(Location.PublicRef), }).annotateMerge( OpenApi.annotations({ identifier: "debug.location.list", summary: "List loaded locations", description: "List locations currently loaded by the server.", }), ), ) .add( HttpApiEndpoint.delete("debug.location.evict", "/api/debug/location", { query: LocationQuery, success: HttpApiSchema.NoContent, }) .annotateMerge(locationQueryOpenApi) .annotateMerge( OpenApi.annotations({ identifier: "debug.location.evict", summary: "Evict a loaded location", description: "Dispose the requested location's cached services so its next use boots them fresh.", }), ), ) .annotateMerge(OpenApi.annotations({ title: "debug" }))