forked from kimhyungsik/ax_hub_mcp_tool
fix: clean up fully qualified java.util imports
This commit is contained in:
@@ -9,7 +9,9 @@ import lombok.Data;
|
|||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
1import java.util.Set;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.HashSet;
|
||||||
/**
|
/**
|
||||||
* Tool(Agent)의 명세 및 라우팅 정보를 담고 있는 메타데이터 클래스
|
* Tool(Agent)의 명세 및 라우팅 정보를 담고 있는 메타데이터 클래스
|
||||||
* Redis 레지스트리에 저장되며, Planner와 Router 간의 통신 객체(Plan)로 사용됩니다.
|
* Redis 레지스트리에 저장되며, Planner와 Router 간의 통신 객체(Plan)로 사용됩니다.
|
||||||
@@ -102,13 +104,13 @@ public class ToolMetadata {
|
|||||||
private Long timeoutMillis = 0L;
|
private Long timeoutMillis = 0L;
|
||||||
|
|
||||||
// --- Guardrail 호환성을 위한 메서드 추가 ---
|
// --- Guardrail 호환성을 위한 메서드 추가 ---
|
||||||
public java.util.Set<String> allowedArguments() {
|
public Set<String> allowedArguments() {
|
||||||
if (parametersSchema == null || !parametersSchema.containsKey("properties")) return java.util.Set.of();
|
if (parametersSchema == null || !parametersSchema.containsKey("properties")) return Set.of();
|
||||||
return ((Map<String, Object>) parametersSchema.get("properties")).keySet();
|
return ((Map<String, Object>) parametersSchema.get("properties")).keySet();
|
||||||
}
|
}
|
||||||
|
|
||||||
public java.util.Set<String> requiredArguments() {
|
public Set<String> requiredArguments() {
|
||||||
if (parametersSchema == null || !parametersSchema.containsKey("required")) return java.util.Set.of();
|
if (parametersSchema == null || !parametersSchema.containsKey("required")) return Set.of();
|
||||||
return new java.util.HashSet<>((java.util.List<String>) parametersSchema.get("required"));
|
return new HashSet<>((List<String>) parametersSchema.get("required"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -20,6 +20,7 @@ import java.time.Instant;
|
|||||||
import java.util.HexFormat;
|
import java.util.HexFormat;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
@@ -186,7 +187,7 @@ public class RedisToolTraceService {
|
|||||||
trace.put("elapsedMillis", elapsedMillis);
|
trace.put("elapsedMillis", elapsedMillis);
|
||||||
trace.put("idempotencyKeyHash", hashText(arguments.path("idempotencyKey").asText("")));
|
trace.put("idempotencyKeyHash", hashText(arguments.path("idempotencyKey").asText("")));
|
||||||
|
|
||||||
java.util.List<String> argNames = new java.util.ArrayList<>();
|
List<String> argNames = new ArrayList<>();
|
||||||
arguments.fieldNames().forEachRemaining(argNames::add);
|
arguments.fieldNames().forEachRemaining(argNames::add);
|
||||||
trace.put("argumentNames", argNames);
|
trace.put("argumentNames", argNames);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user