TaskRunSpec
public sealed interface TaskRunSpec
io/agentscope/harness/agent/subagent/task/TaskRunSpec.java:30–61定义任务运行规格契约的接口。位于 io.agentscope.harness.agent.subagent.task 包。
Discriminated union describing how a background subagent task should execute.
LocalTaskRunSpec runs the supplier on a local executor. RemoteTaskRunSpec
delegates to an AgentScope task HTTP API (see agentscope-extensions-agent-protocol).
AdoptedTaskRunSpec wraps an already-running CompletableFuture (used when a sync
execution is promoted to async on timeout).
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
LocalTaskRunSpec | 记录record | 承载本地任务运行规格数据的记录类型。 In-process execution via `Supplier`. |
RemoteTaskRunSpec | 记录record | 承载远程任务运行规格数据的记录类型。 Remote HTTP task execution. |
AdoptedTaskRunSpec | 记录record | 承载 Adopted 任务运行规格数据的记录类型。 Adopts an already-running `CompletableFuture` as a tracked background task. |
嵌套类详情Nested Class Detail
LocalTaskRunSpec
record LocalTaskRunSpec(Supplier<String> execution) implements TaskRunSpec承载本地任务运行规格数据的记录类型。位于 io.agentscope.harness.agent.subagent.task 包,实现 TaskRunSpec。核心成员包括 execution。
In-process execution via Supplier.
RemoteTaskRunSpec
record RemoteTaskRunSpec( String baseUrl, Map<String, String> headers, String agentId, String input, RemoteSubmitContext context) implements TaskRunSpec承载远程任务运行规格数据的记录类型。位于 io.agentscope.harness.agent.subagent.task 包,实现 TaskRunSpec。核心成员包括 baseUrl、headers、agentId、input、context、RemoteTaskRunSpec。
Remote HTTP task execution. The taskId is chosen by the client and used as the
remote task key end-to-end. context carries submission-time metadata (streaming
preference, propagated deny rules, parent identity); defaults to
RemoteSubmitContext#empty() for callers that predate this field.
AdoptedTaskRunSpec
record AdoptedTaskRunSpec(CompletableFuture<String> future) implements TaskRunSpec承载 Adopted 任务运行规格数据的记录类型。位于 io.agentscope.harness.agent.subagent.task 包,实现 TaskRunSpec。核心成员包括 future。
Adopts an already-running CompletableFuture as a tracked background task. Used when
a sync execution exceeds its timeout and is promoted to async: the future is still in
progress and only needs status-tracking callbacks, not a new executor submission.