return structured next action for game query plan

This commit is contained in:
devmrko
2026-07-27 14:49:30 +09:00
parent 698baee583
commit af311f60f8

View File

@@ -382,6 +382,20 @@ public class McpSseService {
private ObjectNode gameQueryPlanResponse(GameCatalogVectorService.Resolution resolution) {
ObjectNode response = gameCatalogVectorResponse(resolution);
response.put("status", resolution.candidates().isEmpty() ? "NO_MATCH" : "SUPPORTED");
ArrayNode supported = response.putArray("supportedGames");
for (GameCatalogVectorService.GameCandidate c : resolution.candidates()) {
ObjectNode item = supported.addObject();
item.put("gameKey", c.gameKey());
item.put("gameId", c.gameId());
item.put("gameName", c.gameName());
item.put("gamePrefix", c.gamePrefix());
item.put("cosineDistance", c.similarity());
}
response.putArray("unmatchedGames");
response.put("nextAction", resolution.candidates().isEmpty()
? "STOP_NO_MATCH"
: ("MULTI_GAME".equals(resolution.scopeType())
? "CALL_FEWSHOT_PER_GAME" : "CALL_FEWSHOT"));
String mode = switch (resolution.scopeType()) {
case "SINGLE_GAME" -> "SINGLE";
case "MULTI_GAME" -> "FAN_OUT";