mirror of
https://github.com/morluto/rea.git
synced 2026-11-23 23:15:58 +00:00
feat(mcp): refresh provider candidates without switching (#8487)
* fix(mcp): report provider candidate observation scope * feat(mcp): refresh provider candidates without switching * docs: clarify candidate inspection ownership * fix(mcp): clarify provider reselection on reopen * test(mcp): bound candidate refresh lifecycle gates * test(mcp): keep temporary fixture cleanup with its owner
This commit is contained in:
1 parent
1a0e2c77f2
commit
0b028cc75a
12 files changed
+516
-10
No files matched your search
@@ -47,6 +47,7 @@ interface BinarySessionStatusInput {
|
||||
readonly cleanupRetry?: AnalysisCleanupRetry;
|
||||
readonly detail?: BinarySessionDetail;
|
||||
readonly signal?: AbortSignal;
|
||||
readonly refreshCandidates?: boolean;
|
||||
}
|
||||
|
||||
/** Project internal provider routing state into the caller-visible session status. */
|
||||
@@ -66,6 +67,7 @@ export const binarySessionStatus = async ({
|
||||
cleanupRetry,
|
||||
detail = "complete",
|
||||
signal,
|
||||
refreshCandidates = false,
|
||||
}: BinarySessionStatusInput): Promise<JsonValue> => {
|
||||
const routeCapabilities = (
|
||||
bundleResourceRoot === undefined
|
||||
@@ -119,7 +121,13 @@ export const binarySessionStatus = async ({
|
||||
const analysisProviderCandidates =
|
||||
bundleResourceRoot !== undefined
|
||||
? []
|
||||
: (await router.candidateStatuses(route, signal)).map((candidate) =>
|
||||
: (
|
||||
await router.candidateStatuses(route, {
|
||||
...(signal === undefined ? {} : { signal }),
|
||||
...(target === undefined ? {} : { target }),
|
||||
refresh: refreshCandidates,
|
||||
})
|
||||
).map((candidate) =>
|
||||
detail === "summary"
|
||||
? {
|
||||
provider: providerSummary(candidate.provider),
|
||||
@@ -153,6 +161,12 @@ export const binarySessionStatus = async ({
|
||||
capabilities,
|
||||
analysis_provider_binding: analysisProviderBinding,
|
||||
analysis_provider_candidates: analysisProviderCandidates,
|
||||
analysis_provider_candidates_observed:
|
||||
bundleResourceRoot !== undefined
|
||||
? "not_applicable"
|
||||
: route.selection === undefined || refreshCandidates
|
||||
? "status_request"
|
||||
: "target_selection",
|
||||
analysis_run:
|
||||
runId === undefined
|
||||
? null
|
||||
|
||||
Reference in new issue
Block a user