feat: expose _meta in tool metadata and map parametersSchema to inputSchema
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 27s
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 27s
This commit is contained in:
@@ -12,7 +12,9 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.List;
|
||||
import java.util.HashSet;
|
||||
import java.util.HashMap;
|
||||
import io.shinhanlife.dap.lib.dto.OperationType;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
/**
|
||||
* Tool(Agent)의 명세 및 라우팅 정보를 담고 있는 메타데이터 클래스
|
||||
* Redis 레지스트리에 저장되며, Planner와 Router 간의 통신 객체(Plan)로 사용됩니다.
|
||||
@@ -55,6 +57,7 @@ public class ToolMetadata {
|
||||
private List<String> requiredEnvKeys;
|
||||
|
||||
// 2. 파라미터 스키마 (JSON Schema 형태의 Map)
|
||||
@JsonProperty("inputSchema")
|
||||
private Map<String, Object> parametersSchema;
|
||||
private Map<String, Object> outputSchema;
|
||||
|
||||
@@ -143,4 +146,31 @@ public class ToolMetadata {
|
||||
if (parametersSchema == null || !parametersSchema.containsKey("required")) return Set.of();
|
||||
return new HashSet<>((List<String>) parametersSchema.get("required"));
|
||||
}
|
||||
|
||||
@JsonProperty("_meta")
|
||||
public Map<String, Object> get_meta() {
|
||||
Map<String, Object> meta = new HashMap<>();
|
||||
meta.put("uid", this.uid);
|
||||
meta.put("semver", this.semver);
|
||||
meta.put("moduleName", this.moduleName);
|
||||
meta.put("categoryKey", this.categoryKey);
|
||||
meta.put("endpoint", this.endpoint);
|
||||
meta.put("podUrl", this.podUrl);
|
||||
meta.put("visible", this.visible);
|
||||
meta.put("enabled", this.enabled);
|
||||
meta.put("isRegistered", this.isRegistered);
|
||||
meta.put("requiresApproval", this.requiresApproval);
|
||||
meta.put("readOnlyHint", this.readOnlyHint);
|
||||
meta.put("destructiveHint", this.destructiveHint);
|
||||
meta.put("idempotentHint", this.idempotentHint);
|
||||
meta.put("openWorldHint", this.openWorldHint);
|
||||
meta.put("integrationType", this.integrationType);
|
||||
meta.put("mciServiceId", this.mciServiceId);
|
||||
meta.put("operationType", this.operationType);
|
||||
meta.put("retryEnabled", this.retryEnabled);
|
||||
meta.put("circuitBreakerFailureThreshold", this.circuitBreakerFailureThreshold);
|
||||
meta.put("circuitBreakerOpenMillis", this.circuitBreakerOpenMillis);
|
||||
meta.put("timeoutMillis", this.timeoutMillis);
|
||||
return meta;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user