DefinitionStore
public interface DefinitionStore
io/agentscope/builder/web/catalog/DefinitionStore.java:29–51定义定义存储契约的接口。位于 io.agentscope.builder.web.catalog 包。核心成员包括 putText、getText、delete、deletePrefix、list。
Control-plane persistence for agent definition files (skills, optional workspace
assets, staged resources), independent of the session Hands AbstractFilesystem.
Structured config (tools[] / mcpServers[] / skill refs) remains in the DB
version snapshot; this store holds file payloads so any control-plane replica can build a
HarnessAgent without local disk affinity.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void putText(String ownerId, String agentId, String relativePath, String content) | 执行 `putText` 方法。 Writes or replaces a UTF-8 text file under the agent definition namespace. |
public Optional<String> getText(String ownerId, String agentId, String relativePath) | 获取文本。 Reads a UTF-8 text file, or empty when missing. |
public void delete(String ownerId, String agentId, String relativePath) | 删除数据。 Deletes one file key. |
public void deletePrefix(String ownerId, String agentId, String prefix) | 删除 `deletePrefix`。 Deletes every file whose relative path equals `prefix` or starts with `
prefix + "/"`. |
public List<String> list(String ownerId, String agentId, String prefix) | 执行列表相关操作。 Lists relative paths under `prefix` (inclusive of nested files). |
方法详情Method Detail
putText
public void putText(String ownerId, String agentId, String relativePath, String content)
执行 putText 方法。
Writes or replaces a UTF-8 text file under the agent definition namespace.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
relativePath | String | relative 路径(类型 `String`)。The relative path. |
content | String | 内容(类型 `String`)。The content. |
io/agentscope/builder/web/catalog/DefinitionStore.java:32getText
public Optional<String> getText(String ownerId, String agentId, String relativePath)
获取文本。
Reads a UTF-8 text file, or empty when missing.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
relativePath | String | relative 路径(类型 `String`)。The relative path. |
Optional<String>io/agentscope/builder/web/catalog/DefinitionStore.java:35delete
public void delete(String ownerId, String agentId, String relativePath)
删除数据。
Deletes one file key.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
relativePath | String | relative 路径(类型 `String`)。The relative path. |
io/agentscope/builder/web/catalog/DefinitionStore.java:38deletePrefix
public void deletePrefix(String ownerId, String agentId, String prefix)
删除 deletePrefix。
Deletes every file whose relative path equals prefix or starts with prefix + "/".
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
prefix | String | prefix(类型 `String`)。The prefix. |
io/agentscope/builder/web/catalog/DefinitionStore.java:44list
public List<String> list(String ownerId, String agentId, String prefix)
执行列表相关操作。
Lists relative paths under prefix (inclusive of nested files).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ownerId | String | 所有者标识(类型 `String`)。The owner id. |
agentId | String | 智能体标识(类型 `String`)。The agent id. |
prefix | String | prefix(类型 `String`)。The prefix. |
List<String>io/agentscope/builder/web/catalog/DefinitionStore.java:50