TaskDelivery
public record TaskDelivery( String taskId, String agentId, TaskStatus status, String result, String errorMessage, Instant completedAt)
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 |
|---|---|---|
taskId | String | 执行任务标识相关操作。 task identifier |
agentId | String | 执行智能体标识相关操作。 which subagent type produced this result (may be `null` on legacy
records) |
status | TaskStatus | 执行状态相关操作。 terminal status — one of COMPLETED / FAILED / CANCELLED |
result | String | 用于失败/已取消的补全负载;`null`。 completion payload; `null` for FAILED / CANCELLED |
errorMessage | String | 用于已完成/已取消的失败消息;`null`。 failure message; `null` for COMPLETED / CANCELLED |
completedAt | Instant | 执行已完成 At相关操作。 wall-clock instant the task reached its terminal status (best-effort —
typically `TaskRecord#getLastUpdatedAt()`) |
记录组件详情Record Component Detail
taskId
String taskId执行任务标识相关操作。
task identifier
io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45agentId
String agentId执行智能体标识相关操作。
which subagent type produced this result (may be null on legacy
records)
io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45status
TaskStatus status执行状态相关操作。
terminal status — one of COMPLETED / FAILED / CANCELLED
io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45result
String result用于失败/已取消的补全负载;null。
completion payload; null for FAILED / CANCELLED
io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45errorMessage
String errorMessage用于已完成/已取消的失败消息;null。
failure message; null for COMPLETED / CANCELLED
io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45completedAt
Instant completedAt执行已完成 At相关操作。
wall-clock instant the task reached its terminal status (best-effort —
typically TaskRecord#getLastUpdatedAt())
io/agentscope/harness/agent/subagent/task/TaskDelivery.java:39–45