2026-07-16 09:24:26 +08:00

36 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 本地数据与目录
## 原则
数据以本地普通文件保存,保持易读、易调试、易由 Agent 修改。早期不承诺兼容性,不预先建设 schema migration重要数据依靠备份格式变更需要时再写一次性转换脚本。
Runtime 是唯一写入者CLI/Web/Desktop 均通过 Runtime 读取或修改数据。
## 目录
```text
~/.agent/
tasks/<task-id>/
space.json
conversations/
runs/
workspace/
<project-root>/.agent/
project.json
conversations/
runs/
```
Conversation 与 Run 优先采用 JSONLSpace/Project 元信息采用小型 JSON 文件。生成并执行的脚本文本进入 Run 日志,不额外维护脚本库;真正写进 Workspace 的文件自然保留。
## Task 升级
Task Workspace 的组织尽量与 Project 工作区一致。升级为 Project 时,将该专属目录迁移至用户指定路径并写入 Project 元信息。
## 待细化
- ID 和文件命名规则。
- Run 日志与产物的具体划分。
- 备份、归档和数据清理策略。