feat(server): add loaded locations debug endpoint

This commit is contained in:
Dax Raad
2026-07-05 15:59:44 -04:00
parent c3d26c4912
commit a75978815a
13 changed files with 118 additions and 1 deletions
+21
View File
@@ -276,6 +276,8 @@ import type {
V2CredentialRemoveResponses,
V2CredentialUpdateErrors,
V2CredentialUpdateResponses,
V2DebugLocationErrors,
V2DebugLocationResponses,
V2EventChangesErrors,
V2EventChangesResponses,
V2EventSubscribeErrors,
@@ -8036,6 +8038,20 @@ export class Vcs2 extends HeyApiClient {
}
}
export class Debug extends HeyApiClient {
/**
* List loaded locations
*
* List locations currently loaded by the server.
*/
public location<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) {
return (options?.client ?? this.client).get<V2DebugLocationResponses, V2DebugLocationErrors, ThrowOnError>({
url: "/api/debug/location",
...options,
})
}
}
export class V2 extends HeyApiClient {
private _health?: Health
get health(): Health {
@@ -8156,6 +8172,11 @@ export class V2 extends HeyApiClient {
get vcs(): Vcs2 {
return (this._vcs ??= new Vcs2({ client: this.client }))
}
private _debug?: Debug
get debug(): Debug {
return (this._debug ??= new Debug({ client: this.client }))
}
}
export class OpencodeClient extends HeyApiClient {
+29
View File
@@ -19054,6 +19054,35 @@ export type V2VcsDiffResponses = {
export type V2VcsDiffResponse = V2VcsDiffResponses[keyof V2VcsDiffResponses]
export type V2DebugLocationData = {
body?: never
path?: never
query?: never
url: "/api/debug/location"
}
export type V2DebugLocationErrors = {
/**
* InvalidRequestError
*/
400: InvalidRequestErrorV2
/**
* UnauthorizedError
*/
401: UnauthorizedErrorV2
}
export type V2DebugLocationError = V2DebugLocationErrors[keyof V2DebugLocationErrors]
export type V2DebugLocationResponses = {
/**
* Success
*/
200: Array<LocationRef2>
}
export type V2DebugLocationResponse = V2DebugLocationResponses[keyof V2DebugLocationResponses]
export type PtyConnectData = {
body?: never
path: {