Class CatalogCompatibilityGate

java.lang.Object
com.agentforge4j.config.loader.catalog.CatalogCompatibilityGate

public final class CatalogCompatibilityGate extends Object
Enforces compatibility between a shipped workflow catalog and the running framework, before the catalog's workflows are loaded.

Content-present predicate: a catalog is considered present when shipped-workflows/index resolves on the classpath and contains at least one non-blank entry. When it is absent or empty the gate is a no-op — a pure framework with no catalog jar loads zero shipped workflows, which is valid, not an error. When a catalog is present its shipped-workflows/agentforge4j-catalog.json manifest is required: a missing, unparseable, or out-of-range manifest fails fast with CatalogCompatibilityException. Test fixtures loaded from other roots (e.g. /test-workflows/) never trip this gate.

Resources are resolved through the same loader the locators use (WorkflowBundleLocator.class.getClassLoader()); version bounds are compared numerically by NumericVersion so a 0.0.1-SNAPSHOT framework satisfies a 0.0.1 minimum.

  • Constructor Details

    • CatalogCompatibilityGate

      public CatalogCompatibilityGate(ClassLoader loader, String frameworkVersion, int supportedSchemaVersion, com.fasterxml.jackson.databind.ObjectMapper mapper)
      Creates a gate. Prefer defaults() for production wiring; this constructor lets tests supply a classloader over a controlled catalog layout and a fixed framework version.
      Parameters:
      loader - classloader over which catalog resources are resolved
      frameworkVersion - the running framework version
      supportedSchemaVersion - the workflow schema version this framework supports
      mapper - JSON mapper for the manifest
  • Method Details