Class AgentProtocolTransport
java.lang.Object
io.agentscope.harness.agent.subagent.task.AgentProtocolTransport
- All Implemented Interfaces:
RemoteSubagentTransport
RemoteSubagentTransport backed by the Agent Protocol HTTP client.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel(RemoteTarget target, String taskId) getStatus(RemoteTarget target, String taskId) voidresume(RemoteTarget target, String taskId, List<RemoteConfirmDecision> decisions) streamEvents(RemoteTarget target, String taskId, long fromSeq, Consumer<RemoteAgentEvent> consumer) Opens an event stream for the remote task.voidsubmit(RemoteTarget target, String taskId, String agentId, String input, RemoteSubmitContext context) Stable transport type string persisted onTaskRecord.getTransportType().waitForResult(RemoteTarget target, String taskId, long timeoutSeconds)
-
Field Details
-
TYPE
- See Also:
-
-
Constructor Details
-
AgentProtocolTransport
public AgentProtocolTransport() -
AgentProtocolTransport
-
-
Method Details
-
transportType
Description copied from interface:RemoteSubagentTransportStable transport type string persisted onTaskRecord.getTransportType().- Specified by:
transportTypein interfaceRemoteSubagentTransport
-
submit
public void submit(RemoteTarget target, String taskId, String agentId, String input, RemoteSubmitContext context) throws Exception - Specified by:
submitin interfaceRemoteSubagentTransport- Throws:
Exception
-
getStatus
- Specified by:
getStatusin interfaceRemoteSubagentTransport- Throws:
Exception
-
waitForResult
public String waitForResult(RemoteTarget target, String taskId, long timeoutSeconds) throws Exception - Specified by:
waitForResultin interfaceRemoteSubagentTransport- Throws:
Exception
-
cancel
- Specified by:
cancelin interfaceRemoteSubagentTransport- Throws:
Exception
-
resume
public void resume(RemoteTarget target, String taskId, List<RemoteConfirmDecision> decisions) throws Exception - Specified by:
resumein interfaceRemoteSubagentTransport- Throws:
Exception
-
streamEvents
public Closeable streamEvents(RemoteTarget target, String taskId, long fromSeq, Consumer<RemoteAgentEvent> consumer) Description copied from interface:RemoteSubagentTransportOpens an event stream for the remote task. Default is a no-op so transports without streaming degrade gracefully to polling.- Specified by:
streamEventsin interfaceRemoteSubagentTransport- Returns:
- closeable handle that stops the subscription
-