Class EmptyContractResourcesAction

java.lang.Object
com.egoge.ai.atlas.plugin.EmptyContractResourcesAction
All Implemented Interfaces:
org.gradle.workers.WorkAction<EmptyContractResourcesAction.Parameters>

public abstract class EmptyContractResourcesAction extends Object implements org.gradle.workers.WorkAction<EmptyContractResourcesAction.Parameters>
Writes the empty contract (FR-008) into a compilation's class output, submitted from compileJava.doLast only after the caller has confirmed, through ContractDeclarations, that the class output declares no @AgenticEntity or @AgenticExposed at all: that confirmation, not anything this action does, is what authorizes overwriting a stale "META-INF/ai-atlas/api.ir.json" an earlier, declaring compilation may have left behind (FR-016).

It writes exactly two files: a freshly built canonical EmptyContract.json(java.lang.String, int) at "META-INF/ai-atlas/api.ir.json", and the "empty" ContractResources.Manifest at "META-INF/ai-atlas/contract-resources.json", whose only artifact is that IR's digest. Any other reserved path already present (a leftover openapi-v1.json or mcp-tools.json, for example) is left untouched, for the release workflow to reject by name, naming clean.

Loaded from the project's annotationProcessor classpath in an isolated class loader, so the empty IR and manifest shape are those of the processor version that compiled.

  • Constructor Details

    • EmptyContractResourcesAction

      public EmptyContractResourcesAction()
  • Method Details