Record Class ArtifactDeliveryRequest
java.lang.Object
java.lang.Record
io.agentscope.harness.agent.artifact.ArtifactDeliveryRequest
- Record Components:
filePath- path of the generated file in the agent workspace, normalized the same way as other file tools (relative to the workspace, or absolute where permitted by the active filesystem)content- file bytes downloaded from the filesystemfileName- target file name after delivery; defaults to the basename offilePath. Always a plain file name — the tool rejects values containing path separators,.or.., so targets can resolve it directlydescription- short description of the artifact, may benullforce- whether an existing artifact with the samefileNameshould be overwritten (falseby default — the target rejects the delivery and the agent should retry with a newfileName)
public record ArtifactDeliveryRequest(String filePath, byte[] content, String fileName, String description, boolean force)
extends Record
A single artifact delivery request issued by the
deliver_artifact tool.
The tool downloads the file bytes from the agent filesystem and hands them to a configured
ArtifactDeliveryTarget, which is responsible for storing the artifact in its destination
(e.g. a project's artifacts directory / artifact store, WebDAV, an object store).
-
Constructor Summary
ConstructorsConstructorDescriptionArtifactDeliveryRequest(String filePath, byte[] content, String fileName, String description, boolean force) Creates an instance of aArtifactDeliveryRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbyte[]content()Returns the value of thecontentrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.fileName()Returns the value of thefileNamerecord component.filePath()Returns the value of thefilePathrecord component.booleanforce()Returns the value of theforcerecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ArtifactDeliveryRequest
public ArtifactDeliveryRequest(String filePath, byte[] content, String fileName, String description, boolean force) Creates an instance of aArtifactDeliveryRequestrecord class.- Parameters:
filePath- the value for thefilePathrecord componentcontent- the value for thecontentrecord componentfileName- the value for thefileNamerecord componentdescription- the value for thedescriptionrecord componentforce- the value for theforcerecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
filePath
Returns the value of thefilePathrecord component.- Returns:
- the value of the
filePathrecord component
-
content
public byte[] content()Returns the value of thecontentrecord component.- Returns:
- the value of the
contentrecord component
-
fileName
Returns the value of thefileNamerecord component.- Returns:
- the value of the
fileNamerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
force
public boolean force()Returns the value of theforcerecord component.- Returns:
- the value of the
forcerecord component
-