fix(core): preserve SDK plugins across location eviction (#35725)
This commit is contained in:
parent
f488089179
commit
8deb0e5780
13 changed files with 209 additions and 105 deletions
|
|
@ -61,6 +61,7 @@ export const groupNames = {
|
|||
} as const
|
||||
|
||||
export const endpointNames = {
|
||||
"debug.location.evict": "evictLocation",
|
||||
"session.messages": "list",
|
||||
"integration.connect.key": "connectKey",
|
||||
"integration.connect.oauth": "connectOauth",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import { Location } from "@opencode-ai/schema/location"
|
||||
import { Schema } from "effect"
|
||||
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/unstable/httpapi"
|
||||
import { HttpApiEndpoint, HttpApiGroup, HttpApiSchema, OpenApi } from "effect/unstable/httpapi"
|
||||
import { LocationQuery, locationQueryOpenApi } from "./location.js"
|
||||
|
||||
export const DebugGroup = HttpApiGroup.make("server.debug")
|
||||
.add(
|
||||
|
|
@ -14,4 +15,18 @@ export const DebugGroup = HttpApiGroup.make("server.debug")
|
|||
}),
|
||||
),
|
||||
)
|
||||
.add(
|
||||
HttpApiEndpoint.delete("debug.location.evict", "/api/debug/location", {
|
||||
query: LocationQuery,
|
||||
success: HttpApiSchema.NoContent,
|
||||
})
|
||||
.annotateMerge(locationQueryOpenApi)
|
||||
.annotateMerge(
|
||||
OpenApi.annotations({
|
||||
identifier: "v2.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" }))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue