Class WorkspaceProtocolTaskRepository
java.lang.Object
io.agentscope.extensions.agentprotocol.WorkspaceProtocolTaskRepository
- All Implemented Interfaces:
ProtocolTaskRepository
ProtocolTaskRepository backed by a dedicated WorkspaceManager writing into the
synthetic AgentProtocolConstants.PROTOCOL_AGENT_ID /
AgentProtocolConstants.PROTOCOL_SESSION_ID bucket.
Pass a manager rooted at the protocol control-plane path (not an execution agent's workspace) so multi-agent deployments keep task metadata separate from each agent's files.
-
Constructor Summary
ConstructorsConstructorDescriptionWorkspaceProtocolTaskRepository(io.agentscope.harness.agent.workspace.WorkspaceManager workspaceManager) WorkspaceProtocolTaskRepository(Path taskStorePath) Creates a repository rooted attaskStorePathwith a fresh local workspace manager. -
Method Summary
Modifier and TypeMethodDescriptionOptional<io.agentscope.harness.agent.subagent.task.TaskRecord>Returns the task with the given id, or empty if unknown.voidsave(io.agentscope.harness.agent.subagent.task.TaskRecord record) Upserts the given task record.io.agentscope.harness.agent.workspace.WorkspaceManagerReturns the underlying workspace manager (control-plane root only).
-
Constructor Details
-
WorkspaceProtocolTaskRepository
public WorkspaceProtocolTaskRepository(io.agentscope.harness.agent.workspace.WorkspaceManager workspaceManager) -
WorkspaceProtocolTaskRepository
Creates a repository rooted attaskStorePathwith a fresh local workspace manager.
-
-
Method Details
-
workspaceManager
public io.agentscope.harness.agent.workspace.WorkspaceManager workspaceManager()Returns the underlying workspace manager (control-plane root only). -
save
public void save(io.agentscope.harness.agent.subagent.task.TaskRecord record) Description copied from interface:ProtocolTaskRepositoryUpserts the given task record.- Specified by:
savein interfaceProtocolTaskRepository
-
find
Description copied from interface:ProtocolTaskRepositoryReturns the task with the given id, or empty if unknown.- Specified by:
findin interfaceProtocolTaskRepository
-