ArtifactDeliveryTarget
@FunctionalInterface public interface ArtifactDeliveryTarget
io/agentscope/harness/agent/artifact/ArtifactDeliveryTarget.java:33–48定义 Artifact Delivery 目标契约的接口。位于 io.agentscope.harness.agent.artifact 包。核心成员包括 deliver。
SPI for delivering artifacts produced by an agent (typically inside a sandbox) to a destination outside the agent filesystem — the host, a project artifact store, an object store, WebDAV, etc.
The framework stays business-agnostic: the generic deliver_artifact tool downloads the
file bytes from the filesystem and delegates the actual transport to the configured
ArtifactDeliveryTarget, which the application implements.
Configure on io.agentscope.harness.agent.HarnessAgent.Builder#artifactDeliveryTarget(ArtifactDeliveryTarget).
When set, the deliver_artifact tool is registered and the sandbox system prompt instructs
the model to use it; when unset, no delivery tool is exposed.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public ArtifactDeliveryResult deliver(RuntimeContext runtimeContext, ArtifactDeliveryRequest request) | 执行 `deliver` 方法。 Delivers the artifact carried by `request` to its destination. |
方法详情Method Detail
deliver
public ArtifactDeliveryResult deliver(RuntimeContext runtimeContext, ArtifactDeliveryRequest request)
执行 deliver 方法。
Delivers the artifact carried by request to its destination.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runtimeContext | RuntimeContext | 运行时上下文(类型 `RuntimeContext`)。per-call agent runtime; may be `null` when no merged context is available |
request | ArtifactDeliveryRequest | 请求(类型 `ArtifactDeliveryRequest`)。the artifact to deliver (source file path, bytes, target file name, description, and the `force` flag). `request.fileName()` is already validated by the tool to be a plain file name (no path separators, `.` or `..`); the target decides how to map it to its destination layout. |
ArtifactDeliveryResultio/agentscope/harness/agent/artifact/ArtifactDeliveryTarget.java:47