Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void should_createLlmClientOnlyOnce_When_multipleBuildMethodsCalled() throws IOE
config = new A2ATConfig(
new net.openan.a2at.sdk.core.model.PromptRuntimeConfig(
config.prompt().language(), config.prompt().sourceType(), resolvedRoot),
config.llm(), config.inputLimits(), config.negotiation(), config.promptCompliance());
config.llm(), config.inputLimits(), config.negotiation());

DefaultA2ATClientBuilder builder =
DefaultA2ATClientBuilder.builder().config(config).envPath(envFile);
Expand All @@ -69,7 +69,7 @@ void buildPromptGenerationOrchestratorFallsBackToBuiltinScenarioCatalog() throws
config = new A2ATConfig(
new net.openan.a2at.sdk.core.model.PromptRuntimeConfig(
config.prompt().language(), config.prompt().sourceType(), resolvedRoot),
config.llm(), config.inputLimits(), config.negotiation(), config.promptCompliance());
config.llm(), config.inputLimits(), config.negotiation());

DefaultA2ATClientBuilder builder =
DefaultA2ATClientBuilder.builder().config(config).envPath(envFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public record A2ATConfig(
PromptRuntimeConfig prompt,
LlmConfig llm,
InputLimitConfig inputLimits,
NegotiationConfig negotiation,
PromptComplianceConfig promptCompliance) {
NegotiationConfig negotiation) {

/**
* Loads one unified SDK config from one `.env` file path.
Expand All @@ -29,8 +28,7 @@ public record A2ATConfig(
PromptRuntimeConfig.fromMap(values),
LlmConfig.fromMap(values),
InputLimitConfig.fromMap(values),
NegotiationConfig.fromMap(values),
PromptComplianceConfig.fromMap(values));
NegotiationConfig.fromMap(values));
}

/**
Expand Down Expand Up @@ -62,8 +60,7 @@ public record A2ATConfig(
config.prompt().language(), config.prompt().sourceType(), resolvedLocalRootPath.toString()),
config.llm(),
config.inputLimits(),
config.negotiation(),
config.promptCompliance());
config.negotiation());
}

private static Path envBaseDir(Path envPath) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,4 @@ public static final class Input {
/** Maximum length in characters accepted for free-text inputs before they reach an LLM step. */
public static final String MAX_TEXT_CHARS = "A2AT_INPUT_TEXT_MAX_CHARS";
}

/** Prompt compliance configuration keys. */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public static final class PromptCompliance {

/** Enables or disables prompt compliance checks. */
public static final String ENABLED = "A2AT_PROMPT_COMPLIANCE_ENABLED";
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@ void should_preserveBlankLocalRoot_When_resolvingPromptResourceLocalRootDir() th
loaded.prompt().language(), loaded.prompt().sourceType(), " "),
loaded.llm(),
loaded.inputLimits(),
loaded.negotiation(),
loaded.promptCompliance());
loaded.negotiation());

A2ATConfig resolved = A2ATConfig.resolvePromptResourceLocalRootDir(config, envFile);

Expand Down Expand Up @@ -242,8 +241,7 @@ void should_resolveRelativeLocalRootAgainstCwd_When_envPathIsSingleSegment() thr
new PromptRuntimeConfig(loaded.prompt().language(), "local_file", "prompt_resources"),
loaded.llm(),
loaded.inputLimits(),
loaded.negotiation(),
loaded.promptCompliance());
loaded.negotiation());

A2ATConfig resolved = A2ATConfig.resolvePromptResourceLocalRootDir(config, Path.of(".env"));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.openan.a2at.sdk.core.model.InputLimitConfig;
import net.openan.a2at.sdk.core.model.LlmConfig;
import net.openan.a2at.sdk.core.model.NegotiationConfig;
import net.openan.a2at.sdk.core.model.PromptComplianceConfig;
import net.openan.a2at.sdk.core.model.PromptRuntimeConfig;
import net.openan.a2at.sdk.core.validation.ContentValidator;
import net.openan.a2at.sdk.corpus.engine.config.CorpusEnvConfig;
Expand Down Expand Up @@ -82,8 +81,7 @@ public static Runtime taskRuntime() {
new PromptRuntimeConfig("zh-CN", PromptRuntimeConfig.SOURCE_TYPE_CLASSPATH, null),
llmConfig,
new InputLimitConfig(InputLimitConfig.DEFAULT_MAX_TEXT_CHARS),
new NegotiationConfig("in_memory"),
new PromptComplianceConfig(false));
new NegotiationConfig("in_memory"));

ClientPromptGenerationOrchestrator clientGeneration = DefaultA2ATClientBuilder.builder()
.config(config)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ private static Path writeEnv() throws IOException {
A2AT_LLM_BASE_URL=https://llm.example.test/v1
A2AT_LLM_API_KEY=test-key
A2AT_NEGOTIATION_STATE_STORE_TYPE=in_memory
A2AT_PROMPT_COMPLIANCE_ENABLED=false
""");
return envFile;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ private static Path writeEnv(String language) throws IOException {
A2AT_LLM_BASE_URL=https://llm.example.test/v1
A2AT_LLM_API_KEY=test-key
A2AT_NEGOTIATION_STATE_STORE_TYPE=in_memory
A2AT_PROMPT_COMPLIANCE_ENABLED=false
"""
.formatted(language));
return envFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import net.openan.a2at.sdk.core.model.InputLimitConfig;
import net.openan.a2at.sdk.core.model.LlmConfig;
import net.openan.a2at.sdk.core.model.NegotiationConfig;
import net.openan.a2at.sdk.core.model.PromptComplianceConfig;
import net.openan.a2at.sdk.core.model.PromptRuntimeConfig;
import net.openan.a2at.sdk.llm.LLMClient;
import net.openan.a2at.sdk.llm.LLMClientConfig;
Expand Down Expand Up @@ -103,8 +102,7 @@ void llmClientConfigDerivedFromConfigLlmNotFromEnvPath() throws IOException {
3,
List.of()),
new InputLimitConfig(InputLimitConfig.DEFAULT_MAX_TEXT_CHARS),
new NegotiationConfig("in_memory"),
new PromptComplianceConfig(false));
new NegotiationConfig("in_memory"));

DefaultA2ATServerBuilder builder =
DefaultA2ATServerBuilder.builder().config(config).envPath(envFile);
Expand Down
4 changes: 0 additions & 4 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ A2AT_PROMPT_SOURCE_TYPE=classpath
# and LLM prompts are always loaded from the classpath.
A2AT_PROMPT_RESOURCE_LOCAL_ROOT_DIR=

# Prompt compliance
# Enables or disables prompt compliance checks.
A2AT_PROMPT_COMPLIANCE_ENABLED=false

# Input limits
# Maximum length in characters (String.length()) accepted for free-text inputs (FromText generation and
# prompt validation entry points) before they reach an LLM step; oversized inputs fail fast with the
Expand Down
Loading