Class ScenarioSchema

java.lang.Object
com.agentforge4j.testkit.scenario.ScenarioSchema

public final class ScenarioSchema extends Object
Accessor for the JSON-schema that defines the catalog scenario expected-result.json contract (the workflow to drive, the ordered human gate responses, and the assertions to project onto a run). The schema is shipped as a classpath resource alongside this class inside the testkit artifact.

The resource is loaded by a class in its own module, so it resolves whether the testkit is read as a named JPMS module or flattened onto the classpath — and an external catalog repo consuming the published testkit artifact reaches it through this API rather than reaching into testkit source paths.

  • Field Details

    • RESOURCE_NAME

      public static final String RESOURCE_NAME
      Resource name of the scenario schema, relative to this class's package.
      See Also:
  • Method Details

    • open

      public static InputStream open()
      Opens the scenario schema resource as a stream.
      Returns:
      an open stream over the schema JSON; the caller closes it
      Throws:
      IllegalStateException - if the schema resource is absent from the testkit artifact
    • json

      public static String json()
      Reads the scenario schema as a UTF-8 string.
      Returns:
      the schema JSON text