Class AgenticExtension

java.lang.Object
com.egoge.ai.atlas.plugin.AgenticExtension

public abstract class AgenticExtension extends Object
Extension object for configuring the AI-ATLAS Gradle plugin.

Example usage in build.gradle.kts:

 agentic {
     version.set("0.1.0")
     mcpEnabled.set(true)
     restEnabled.set(true)
 }
 
  • Constructor Summary

    Constructors
    Constructor
    Description
    AgenticExtension(org.gradle.api.model.ObjectFactory objects)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.provider.Property<String>
    Base path prefix for generated REST endpoints.
    abstract org.gradle.api.provider.Property<Integer>
    Major API version number for generated REST endpoints and OpenAPI paths.
    abstract org.gradle.api.provider.Property<Boolean>
    Collection exposure safety.
    abstract org.gradle.api.provider.Property<Boolean>
    Constraints and hints in the generated surfaces.
    abstract org.gradle.api.file.RegularFileProperty
    The committed contract baseline the compatibility gate compares the build against.
    abstract org.gradle.api.provider.Property<Boolean>
    Lock mode.
    abstract org.gradle.api.provider.Property<String>
    Maven group for AI-ATLAS modules.
    abstract org.gradle.api.provider.Property<Boolean>
    Enable MCP tool generation and runtime support.
    abstract org.gradle.api.provider.Property<Boolean>
    Enable OpenAPI spec generation.
    abstract org.gradle.api.provider.Property<String>
    Version string for the OpenAPI info.version field.
    abstract org.gradle.api.provider.Property<String>
    Path to a custom PII patterns file.
    abstract org.gradle.api.provider.Property<Boolean>
    Per-channel field projections.
    The release settings: directory, changelog, tag name and release policy.
    abstract org.gradle.api.provider.Property<String>
    The version agenticRelease releases the contract as.
    abstract org.gradle.api.provider.Property<Boolean>
    Whether a release's version major must equal the contract's apiMajor.
    abstract org.gradle.api.provider.Property<Boolean>
    Explicit REST metadata and the opt-in CRUD convention.
    abstract org.gradle.api.provider.Property<Boolean>
    Enable REST controller generation and runtime support.
    abstract org.gradle.api.provider.Property<Boolean>
    Strict mode.
    abstract org.gradle.api.provider.Property<String>
    The version of the ai-atlas annotations, processor and runtime dependencies the plugin adds.
    void
    release(org.gradle.api.Action<? super ReleaseSpec> action)
    Configures the release settings.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AgenticExtension

      @Inject public AgenticExtension(org.gradle.api.model.ObjectFactory objects)
      Parameters:
      objects - creates the nested release settings
  • Method Details

    • getVersion

      public abstract org.gradle.api.provider.Property<String> getVersion()
      The version of the ai-atlas annotations, processor and runtime dependencies the plugin adds. Defaults to this plugin's own version, which the plugin and processor require to match. It never defaults to the project's own version, so releasing the project under any version leaves the ai-atlas version unchanged. It must be set explicitly only when the plugin cannot determine its own version, which happens only when the plugin's classes are loaded without the version resource its build writes and without jar metadata. Not the version a contract is released as: see getReleaseVersion().
    • getGroup

      public abstract org.gradle.api.provider.Property<String> getGroup()
      Maven group for AI-ATLAS modules. Defaults to "ai.atlas".
    • getMcpEnabled

      public abstract org.gradle.api.provider.Property<Boolean> getMcpEnabled()
      Enable MCP tool generation and runtime support. Defaults to true.
    • getRestEnabled

      public abstract org.gradle.api.provider.Property<Boolean> getRestEnabled()
      Enable REST controller generation and runtime support. Defaults to true.
    • getOpenApiEnabled

      public abstract org.gradle.api.provider.Property<Boolean> getOpenApiEnabled()
      Enable OpenAPI spec generation. Defaults to true.
    • getPiiPatternsFile

      public abstract org.gradle.api.provider.Property<String> getPiiPatternsFile()
      Path to a custom PII patterns file. Each line is a regex fragment; lines starting with # are comments. When set, the custom file replaces the built-in defaults. The -Aai.atlas.pii.patterns additive option still works on top.
    • getApiBasePath

      public abstract org.gradle.api.provider.Property<String> getApiBasePath()
      Base path prefix for generated REST endpoints. Defaults to "/api". Must start with "/" and must not end with "/". Generated path formula: {basePath}/v{majorVersion}/{service-kebab}/{method-kebab}
    • getApiMajorVersion

      public abstract org.gradle.api.provider.Property<Integer> getApiMajorVersion()
      Major API version number for generated REST endpoints and OpenAPI paths. Defaults to 1. Must be a positive integer. Appears in URL as /v{majorVersion}/.
    • getOpenApiInfoVersion

      public abstract org.gradle.api.provider.Property<String> getOpenApiInfoVersion()
      Version string for the OpenAPI info.version field. Defaults to "{majorVersion}.0.0". Should follow SemVer. This is the API document version, not the URL path version.
    • getStrict

      public abstract org.gradle.api.provider.Property<Boolean> getStrict()
      Strict mode. Defaults to false. When true, ai-atlas quality diagnostics that are warnings by default (e.g. an AI tool without a description of its own) fail the build.
    • getContractBaseline

      public abstract org.gradle.api.file.RegularFileProperty getContractBaseline()
      The committed contract baseline the compatibility gate compares the build against. Defaults to <projectDir>/.atlas/api.ir.json. Only atlasAccept writes it.
    • getContractLocked

      public abstract org.gradle.api.provider.Property<Boolean> getContractLocked()
      Lock mode. Defaults to false. When true, any difference between the baseline and the current contract fails the build until it is accepted with atlasAccept.
    • getConstraints

      public abstract org.gradle.api.provider.Property<Boolean> getConstraints()
      Constraints and hints in the generated surfaces. Unset by default, and then not passed to the compilation, whose processor defaults to false; a value set here overrides one in options.compilerArgs. When true, the OpenAPI document, the REST controllers and the MCP tool classes carry the contract's constraints, and META-INF/ai-atlas/mcp-tools.json is generated with each tool's input schema and hints.
    • getProjections

      public abstract org.gradle.api.provider.Property<Boolean> getProjections()
      Per-channel field projections. Unset by default, and then not passed to the compilation, whose processor defaults to false; a value set here overrides one in options.compilerArgs. When true, @AgenticField(channels) narrows the channels whose responses carry a field: the REST controllers and the OpenAPI document keep each entity's DTO, and the MCP tool classes return a separate AI record wherever the two projections differ. When false, an explicit @AgenticField(channels) fails the compilation.
    • getRest

      public abstract org.gradle.api.provider.Property<Boolean> getRest()
      Explicit REST metadata and the opt-in CRUD convention. Unset by default, and then not passed to the compilation, whose processor defaults to false; a value set here overrides one in options.compilerArgs. When true, @AgenticExposed(rest = @Rest(...)) and @AgenticParam(in) decide each REST operation's HTTP method, path, parameter locations and success status, and an entity request body binds a generated, whitelisted input record. When false, every operation keeps the RPC mapping and any REST declaration fails the compilation.
    • getCollections

      public abstract org.gradle.api.provider.Property<Boolean> getCollections()
      Collection exposure safety. Unset by default, and then not passed to the compilation, whose processor defaults to false; a value set here overrides one in options.compilerArgs. When true, a Spring Data Pageable is bound as page and size, a Page or Slice result keeps its metadata in an envelope, maxResults and @AgenticParam(paging) declare bounds, and an unbounded collection result is a warning, an error under strict for MCP tools. When false, those declarations fail the compilation.
    • getReleaseVersion

      public abstract org.gradle.api.provider.Property<String> getReleaseVersion()
      The version agenticRelease releases the contract as. Defaults to the project version. It must be MAJOR.MINOR.PATCH: a -SNAPSHOT or other pre-release is refused. It is independent of getVersion(), the ai-atlas dependency version, and of getApiMajorVersion(), unless getReleaseVersionTracksApiMajor() is on.
    • getReleaseVersionTracksApiMajor

      public abstract org.gradle.api.provider.Property<Boolean> getReleaseVersionTracksApiMajor()
      Whether a release's version major must equal the contract's apiMajor. Defaults to false, so a product at 5.x can serve API v2.
    • getRelease

      public ReleaseSpec getRelease()
      The release settings: directory, changelog, tag name and release policy.
    • release

      public void release(org.gradle.api.Action<? super ReleaseSpec> action)
      Configures the release settings.
      Parameters:
      action - the configuration