AS AgentScopeAPI 手册 / API Reference

TaskDelivery

public record TaskDelivery( String taskId, String agentId, TaskStatus status, String result, String errorMessage, Instant completedAt)
源码Source io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45

承载任务 Delivery数据的记录类型。位于 io.agentscope.harness.agent.subagent.task 包。核心成员包括 taskId、agentId、status、result、errorMessage、completedAt。

Snapshot of a terminal-state subagent task awaiting (or undergoing) push delivery to the parent agent's reasoning loop. Returned by TaskRepository#findPendingDeliveries so that middleware can render it into a synthetic <system-reminder> message without re-querying the underlying record.

Fields are denormalised from TaskRecord on purpose — the consumer (SubagentsMiddleware) only needs the projection, and snapshotting up-front avoids racing with a later status mutation.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
taskIdString
执行任务标识相关操作。
task identifier
agentIdString
执行智能体标识相关操作。
which subagent type produced this result (may be `null` on legacy records)
statusTaskStatus
执行状态相关操作。
terminal status — one of COMPLETED / FAILED / CANCELLED
resultString
用于失败/已取消的补全负载;`null`。
completion payload; `null` for FAILED / CANCELLED
errorMessageString
用于已完成/已取消的失败消息;`null`。
failure message; `null` for COMPLETED / CANCELLED
completedAtInstant
执行已完成 At相关操作。
wall-clock instant the task reached its terminal status (best-effort — typically `TaskRecord#getLastUpdatedAt()`)

记录组件详情Record Component Detail

taskId

String taskId

执行任务标识相关操作。

task identifier

源码Source io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45

agentId

String agentId

执行智能体标识相关操作。

which subagent type produced this result (may be null on legacy records)

源码Source io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45

status

TaskStatus status

执行状态相关操作。

terminal status — one of COMPLETED / FAILED / CANCELLED

源码Source io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45

result

String result

用于失败/已取消的补全负载;null。

completion payload; null for FAILED / CANCELLED

源码Source io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45

errorMessage

String errorMessage

用于已完成/已取消的失败消息;null。

failure message; null for COMPLETED / CANCELLED

源码Source io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45

completedAt

Instant completedAt

执行已完成 At相关操作。

wall-clock instant the task reached its terminal status (best-effort — typically TaskRecord#getLastUpdatedAt())

源码Source io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45
基于官方固定版本源码静态生成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.