Package com.egoge.ai.atlas.plugin
Class AgenticExtension
java.lang.Object
com.egoge.ai.atlas.plugin.AgenticExtension
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 -
Method Summary
Modifier and TypeMethodDescriptionabstract 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.RegularFilePropertyThe 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>getGroup()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 versionagenticReleasereleases the contract as.abstract org.gradle.api.provider.Property<Boolean>Whether a release's version major must equal the contract'sapiMajor.abstract org.gradle.api.provider.Property<Boolean>getRest()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-atlasannotations,processorandruntimedependencies the plugin adds.voidrelease(org.gradle.api.Action<? super ReleaseSpec> action) Configures the release settings.
-
Constructor Details
-
AgenticExtension
@Inject public AgenticExtension(org.gradle.api.model.ObjectFactory objects) - Parameters:
objects- creates the nested release settings
-
-
Method Details
-
getVersion
The version of the ai-atlasannotations,processorandruntimedependencies 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: seegetReleaseVersion(). -
getGroup
Maven group for AI-ATLAS modules. Defaults to "ai.atlas". -
getMcpEnabled
Enable MCP tool generation and runtime support. Defaults to true. -
getRestEnabled
Enable REST controller generation and runtime support. Defaults to true. -
getOpenApiEnabled
Enable OpenAPI spec generation. Defaults to true. -
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.patternsadditive option still works on top. -
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
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
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
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. OnlyatlasAcceptwrites it. -
getContractLocked
Lock mode. Defaults to false. When true, any difference between the baseline and the current contract fails the build until it is accepted withatlasAccept. -
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 inoptions.compilerArgs. When true, the OpenAPI document, the REST controllers and the MCP tool classes carry the contract's constraints, andMETA-INF/ai-atlas/mcp-tools.jsonis generated with each tool's input schema and hints. -
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 inoptions.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
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 inoptions.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
Collection exposure safety. Unset by default, and then not passed to the compilation, whose processor defaults to false; a value set here overrides one inoptions.compilerArgs. When true, a Spring DataPageableis bound aspageandsize, aPageorSliceresult keeps its metadata in an envelope,maxResultsand@AgenticParam(paging)declare bounds, and an unbounded collection result is a warning, an error understrictfor MCP tools. When false, those declarations fail the compilation. -
getReleaseVersion
The versionagenticReleasereleases the contract as. Defaults to the project version. It must beMAJOR.MINOR.PATCH: a-SNAPSHOTor other pre-release is refused. It is independent ofgetVersion(), the ai-atlas dependency version, and ofgetApiMajorVersion(), unlessgetReleaseVersionTracksApiMajor()is on. -
getReleaseVersionTracksApiMajor
Whether a release's version major must equal the contract'sapiMajor. Defaults to false, so a product at 5.x can serve API v2. -
getRelease
The release settings: directory, changelog, tag name and release policy. -
release
Configures the release settings.- Parameters:
action- the configuration
-