forked from kimhyungsik/ax_hub_mcp_tool
refactor: remove retryEnabled from tool metadata
This commit is contained in:
@@ -30,7 +30,6 @@ public @interface GrowToolHint {
|
||||
String inputSchemaResource() default "";
|
||||
String outputSchemaResource() default "";
|
||||
long timeoutMillis() default 5000L;
|
||||
boolean retryEnabled() default true;
|
||||
int retryMaxAttempts() default 3;
|
||||
|
||||
// Meta 정보 추가 (보고용 샘플)
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.List;
|
||||
public record ToolManifestMeta(
|
||||
String version,
|
||||
long timeoutMillis,
|
||||
boolean retryEnabled,
|
||||
int retryMaxAttempts,
|
||||
boolean enabled,
|
||||
List<String> exampleQueries,
|
||||
|
||||
@@ -22,7 +22,6 @@ import org.springframework.stereotype.Service;
|
||||
public class ToolManifestService {
|
||||
|
||||
private static final long DEFAULT_TIMEOUT_MILLIS = 5000L;
|
||||
private static final boolean DEFAULT_RETRY_ENABLED = true;
|
||||
private static final int DEFAULT_RETRY_MAX_ATTEMPTS = 3;
|
||||
private static final AtomicLong LAST_ISSUED_REVISION = new AtomicLong();
|
||||
private final Supplier<List<ToolMetadata>> toolSupplier;
|
||||
@@ -91,7 +90,6 @@ public class ToolManifestService {
|
||||
isTrue(tool.getIdempotentHint()), isTrue(tool.getOpenWorldHint())),
|
||||
new ToolManifestMeta(defaultString(tool.getSemver(), "1.0.0"),
|
||||
positiveOrDefault(tool.getTimeoutMillis(), DEFAULT_TIMEOUT_MILLIS),
|
||||
tool.getRetryEnabled() == null ? DEFAULT_RETRY_ENABLED : tool.getRetryEnabled(),
|
||||
positiveOrDefault(tool.getRetryMaxAttempts(), DEFAULT_RETRY_MAX_ATTEMPTS),
|
||||
tool.getEnabled() == null || tool.getEnabled(),
|
||||
defaultList(tool.getExampleQueries()), defaultList(tool.getTags()),
|
||||
|
||||
@@ -41,7 +41,6 @@ public final class ToolMetadataMcpMapper {
|
||||
put(meta, "required_env_keys", metadata.getRequiredEnvKeys());
|
||||
put(meta, "owner_org", metadata.getOwnerOrg());
|
||||
meta.put("timeoutMillis", positiveOrDefault(metadata.getTimeoutMillis(), 5000L));
|
||||
meta.put("retryEnabled", metadata.getRetryEnabled() == null || metadata.getRetryEnabled());
|
||||
meta.put("retryMaxAttempts", positiveOrDefault(metadata.getRetryMaxAttempts(), 3));
|
||||
return Map.copyOf(meta);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,6 @@ public class ToolRegistryHeartbeatSender {
|
||||
meta.setName(subToolName);
|
||||
meta.setSemver("1.0.0");
|
||||
meta.setTimeoutMillis(hintAnnotation == null ? 5000L : positiveOrDefault(hintAnnotation.timeoutMillis(), 5000L));
|
||||
meta.setRetryEnabled(hintAnnotation == null || hintAnnotation.retryEnabled());
|
||||
meta.setRetryMaxAttempts(hintAnnotation == null ? 3 : positiveOrDefault(hintAnnotation.retryMaxAttempts(), 3));
|
||||
meta.setEnabled(true);
|
||||
meta.setDescription(functionAnnotation.description());
|
||||
@@ -327,4 +326,4 @@ public class ToolRegistryHeartbeatSender {
|
||||
*/
|
||||
private record ToolAnnotationMetadata(McpTool mcpTool, GrowToolHint growToolHint) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +233,6 @@ public class ToolScaffolder {
|
||||
.append(" requiresApproval = ").append(isMutation).append(",\n")
|
||||
.append(" categoryKey = \"").append(tool.group().toLowerCase(Locale.ROOT)).append("\",\n")
|
||||
.append(" timeoutMillis = 5000L,\n")
|
||||
.append(" retryEnabled = true,\n")
|
||||
.append(" retryMaxAttempts = 3,\n");
|
||||
if (tool.interfaceId() != null && !tool.interfaceId().isBlank()) {
|
||||
methods.append(" mappingId = \"").append(javaText(tool.interfaceId())).append("\",\n");
|
||||
@@ -388,7 +387,6 @@ public class ToolScaffolder {
|
||||
.append(" requiresApproval = ").append(isMutation).append(",\n")
|
||||
.append(" categoryKey = \"").append(tool.group().toLowerCase(Locale.ROOT)).append("\",\n")
|
||||
.append(" timeoutMillis = 5000L,\n")
|
||||
.append(" retryEnabled = true,\n")
|
||||
.append(" retryMaxAttempts = 3,\n");
|
||||
String mappingId = option(tool.interfaceId(), tool.httpApiName());
|
||||
if (mappingId != null && !mappingId.isBlank()) {
|
||||
@@ -773,7 +771,6 @@ public class ToolScaffolder {
|
||||
sb.append(" requiresApproval = ").append(isMutation).append(",\n");
|
||||
sb.append(" categoryKey = \"").append(group.toLowerCase(Locale.ROOT)).append("\",\n");
|
||||
sb.append(" timeoutMillis = 5000L,\n");
|
||||
sb.append(" retryEnabled = true,\n");
|
||||
sb.append(" retryMaxAttempts = 3,\n");
|
||||
if (interfaceId != null && !interfaceId.isBlank()) {
|
||||
sb.append(" mappingId = \"").append(interfaceId).append("\",\n");
|
||||
|
||||
@@ -121,8 +121,6 @@ public class ToolMetadata {
|
||||
@Builder.Default
|
||||
private OperationType operationType = OperationType.READ;
|
||||
|
||||
@Builder.Default
|
||||
private Boolean retryEnabled = true;
|
||||
@Builder.Default
|
||||
private Integer retryMaxAttempts = 3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user