feat(server): add loaded locations debug endpoint
This commit is contained in:
parent
c3d26c4912
commit
a75978815a
13 changed files with 118 additions and 1 deletions
15
packages/protocol/src/groups/debug.ts
Normal file
15
packages/protocol/src/groups/debug.ts
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { Location } from "@opencode-ai/schema/location"
|
||||
import { Schema } from "effect"
|
||||
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
|
||||
|
||||
export const DebugGroup = HttpApiGroup.make("server.debug").add(
|
||||
HttpApiEndpoint.get("debug.location", "/api/debug/location", {
|
||||
success: Schema.Array(Location.Ref),
|
||||
}).annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.debug.location",
|
||||
summary: "List loaded locations",
|
||||
description: "List locations currently loaded by the server.",
|
||||
}),
|
||||
),
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue