Memory Store、条目(entry)、版本(version)对象的完整结构定义。
由创建、获取、列表和归档接口返回。
由创建条目、获取条目、列表条目和更新条目接口返回。
条目
由列表版本和获取版本接口返回。
Memory Store 对象
由创建、获取、列表和归档接口返回。
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | Memory Store ID,前缀 memstore_ |
type | string | 固定为 "memory_store" |
name | string | 存储名称。服务器会自动 trim;最多 64 个字符 |
description | string | 存储描述。服务器会自动 trim;最多 1024 个字符 |
status | string | 存储状态。参见 Memory Store status |
entry_count | integer | 存储中活跃的 memory 条目数 |
total_size | integer | 活跃 memory 条目的总大小(字节) |
metadata | object | Metadata 对象。默认 {} |
archived_at | string | UTC 归档时间,仅在已归档时返回 |
created_at | string | UTC 创建时间 |
updated_at | string | UTC 最后更新时间 |
Memory Store status
| 值 | 说明 |
|---|---|
active | 存储可接受新的 memory 条目及条目更新 |
archived | 存储已归档。条目和版本可读取,但不能创建或更新条目 |
Memory entry 对象
由创建条目、获取条目、列表条目和更新条目接口返回。
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | Memory 条目 ID,前缀 mem_ |
type | string | 固定为 "memory" |
store_id | string | 所属 Memory Store ID |
path | string | 相对 memory 路径。最大 1024 字节;不能以 / 开头且不能包含 .. |
size | integer | 内容大小(字节) |
content_sha256 | string | 当前内容的 SHA-256 摘要 |
version | integer | 当前条目版本。首个版本为 1,每次更新递增 |
metadata | object | Metadata 对象。默认 {} |
content | string | 创建、获取和更新响应中返回(内容可用时)。列表响应中省略 |
created_at | string | UTC 创建时间 |
updated_at | string | UTC 最后更新时间 |
content 在创建和更新时必填。trim 后不能为空,且最大 100 KB。
Memory version 对象
由列表版本和获取版本接口返回。
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | Memory 版本 ID,前缀 memver_ |
type | string | 固定为 "memory_version" |
store_id | string | 所属 Memory Store ID |
entry_id | string | Memory 条目 ID |
entry_path | string | 记录此版本时条目的 path |
size | integer | 版本内容大小(字节) |
content_sha256 | string | 版本内容的 SHA-256 摘要 |
action | string | 版本动作。参见 Memory version action |
redacted | boolean | 版本内容是否已被编辑(脱敏) |
redacted_at | string | UTC 编辑时间,仅在 redacted 为 true 时返回 |
content | string | 仅在获取版本时且版本未编辑、内容可用时返回 |
created_at | string | UTC 创建时间 |
Memory version action
| 值 | 说明 |
|---|---|
created | 条目被创建 |
updated | 条目内容被更新 |
deleted | 条目被删除。历史版本记录中可包含此动作 |