SharedWorkspacePaths
public final class SharedWorkspacePaths
io/agentscope/builder/web/workspace/SharedWorkspacePaths.java:29–103共享工作区 Paths,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.workspace 包。核心成员包括 resolveSessionDataPath、workspaceRoot、resolveAgentDataPath、SharedWorkspacePaths。
Resolves on-disk paths derived from the platform-wide shared workspace root, without composing any filesystem instances. Owning the routing/composition responsibility is the harness; this utility only exists so platform features that need a stable side-channel directory (notably the per-user marketplaces git-clone cache and per-agent workspace scaffolding) can derive a predictable path without reinventing the layout.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public SharedWorkspacePaths(Path workspaceRoot) | 初始化 `SharedWorkspacePaths` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Path resolveSessionDataPath(String ownerId, String sessionId) | 解析会话数据路径。 Stable, non-user-controlled directory for a single authenticated session. |
public Path workspaceRoot() | 返回工作区根。 Returns the workspace root. |
public Path resolveAgentDataPath(String workspacePath, String fallbackAgentId) | 解析智能体数据路径。 Resolves the user-supplied workspace path for an agent into an absolute on-disk data root. |
构造器详情Constructor Detail
SharedWorkspacePaths
public SharedWorkspacePaths(Path workspaceRoot)
初始化 SharedWorkspacePaths 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspaceRoot | Path | 工作区根(类型 `Path`)。The workspace root. |
io/agentscope/builder/web/workspace/SharedWorkspacePaths.java:33–35方法详情Method Detail
resolveSessionDataPath
public Path resolveSessionDataPath(String ownerId, String sessionId)
解析会话数据路径。
Stable, non-user-controlled directory for a single authenticated session.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
sessionId | String | 会话标识(类型 `String`)。The session id. |
Pathio/agentscope/builder/web/workspace/SharedWorkspacePaths.java:42–64workspaceRoot
public Path workspaceRoot()
返回工作区根。
Returns the workspace root.
Pathio/agentscope/builder/web/workspace/SharedWorkspacePaths.java:66–68resolveAgentDataPath
public Path resolveAgentDataPath(String workspacePath, String fallbackAgentId)
解析智能体数据路径。
Resolves the user-supplied workspace path for an agent into an absolute on-disk data root.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workspacePath | String | 工作区路径(类型 `String`)。The workspace path. |
fallbackAgentId | String | 回退智能体标识(类型 `String`)。The fallback agent id. |
Pathio/agentscope/builder/web/workspace/SharedWorkspacePaths.java:82–102