AS AgentScopeAPI 手册 / API Reference

ArtifactDeliveryResult

public record ArtifactDeliveryResult( boolean successful, boolean conflict, String error, String message)
源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:27–45

ArtifactDeliveryTarget#deliver尝试的结果。位于 io.agentscope.harness.agent.artifact 包。核心成员包括 successful、conflict、error、message、success、fail。

Result of an ArtifactDeliveryTarget#deliver attempt.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
successfulboolean
执行 `successful` 方法。
whether the artifact was delivered
conflictboolean
执行 `conflict` 方法。
whether the delivery was rejected because an artifact with the same name already exists and `force` was `false`
errorString
执行错误相关操作。
error description on failure, `null` on success
messageString
执行消息相关操作。
human-readable confirmation detail on success (may be `null`)

方法摘要Method Summary

方法Method说明Description
public static ArtifactDeliveryResult success()
static
返回成功。
Returns the success.
public static ArtifactDeliveryResult success(String message)
static
设置成功。
Performs the success operation.
public static ArtifactDeliveryResult fail(String error)
static
设置该参数。
Performs the fail operation.
public static ArtifactDeliveryResult conflict(String error)
static
设置该参数。
Performs the conflict operation.

记录组件详情Record Component Detail

successful

boolean successful

执行 successful 方法。

whether the artifact was delivered

源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:27–45

conflict

boolean conflict

执行 conflict 方法。

whether the delivery was rejected because an artifact with the same name already exists and force was false

源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:27–45

error

String error

执行错误相关操作。

error description on failure, null on success

源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:27–45

message

String message

执行消息相关操作。

human-readable confirmation detail on success (may be null)

源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:27–45

方法详情Method Detail

success

public static ArtifactDeliveryResult success()
static

返回成功。

Returns the success.

返回Returns ArtifactDeliveryResult
返回ArtifactDeliveryResult。Returns artifact delivery result.
源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:30–32

success

public static ArtifactDeliveryResult success(String message)
static

设置成功。

Performs the success operation.

参数Parameters
名称Name类型Type说明Description
messageString消息(类型 `String`)。The message.
返回Returns ArtifactDeliveryResult
返回ArtifactDeliveryResult。Returns artifact delivery result.
源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:34–36

fail

public static ArtifactDeliveryResult fail(String error)
static

设置该参数。

Performs the fail operation.

参数Parameters
名称Name类型Type说明Description
errorString错误(类型 `String`)。The error.
返回Returns ArtifactDeliveryResult
返回ArtifactDeliveryResult。Returns artifact delivery result.
源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:38–40

conflict

public static ArtifactDeliveryResult conflict(String error)
static

设置该参数。

Performs the conflict operation.

参数Parameters
名称Name类型Type说明Description
errorString错误(类型 `String`)。The error.
返回Returns ArtifactDeliveryResult
返回ArtifactDeliveryResult。Returns artifact delivery result.
源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryResult.java:42–44
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.