Module agentforge4j.config.loader
Class AgentBundleArtifactValidator
java.lang.Object
com.agentforge4j.config.loader.agent.AgentBundleArtifactValidator
- All Implemented Interfaces:
ArtifactValidator
ArtifactValidator that asserts a generated agent bundle "loads as a valid AgentDefinition" by running
the production parse/validate path on the captured artifacts: Jackson-parse agent.json, validate core fields,
resolve the system prompt (inline or from the captured systemprompt.md / boundaries.md), and build
the definition (applying the record's invariants). Any parse, validation, or build failure yields an invalid result,
which the runtime turns into a fail-closed run.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAgentBundleArtifactValidator(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Creates a validator over the given mapper. -
Method Summary
Modifier and TypeMethodDescriptionvalidate(ArtifactValidationContext context) Validates the captured artifacts.The stable identifier aVALIDATEstep uses to select this validator.
-
Field Details
-
VALIDATOR_ID
Stable id aVALIDATEstep uses to select this validator.- See Also:
-
AGENT_FILE_NAME
Required bundle entry carrying the agent definition JSON.- See Also:
-
-
Constructor Details
-
AgentBundleArtifactValidator
public AgentBundleArtifactValidator(com.fasterxml.jackson.databind.ObjectMapper objectMapper) Creates a validator over the given mapper.- Parameters:
objectMapper- the mapper used to parseagent.json; must not benull
-
-
Method Details
-
validatorId
Description copied from interface:ArtifactValidatorThe stable identifier aVALIDATEstep uses to select this validator.- Specified by:
validatorIdin interfaceArtifactValidator- Returns:
- non-blank validator id
-
validate
Description copied from interface:ArtifactValidatorValidates the captured artifacts.- Specified by:
validatein interfaceArtifactValidator- Parameters:
context- read-only view of the selecting step's declared artifacts- Returns:
- the validation outcome
-