Package com.egoge.ai.atlas.plugin
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe work's inputs. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.workers.WorkAction
getParameters
-
Constructor Details
-
EmptyContractResourcesAction
public EmptyContractResourcesAction()
-
-
Method Details
-
execute
public void execute()- Specified by:
executein interfaceorg.gradle.workers.WorkAction<EmptyContractResourcesAction.Parameters>
-