[建议 / Feature] 支持任务、会话、项目的跨设备同步(对标 Codex / ChatGPT 的云端同步)
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 22
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
提交前确认 · Pre-submission checklist
- 我已搜索过现有 issue,确认这不是重复提议 / I searched existing issues and confirmed this isn't a duplicate.
- 我已阅读 CONTRIBUTING.md / I've read CONTRIBUTING.md.
问题类别 · Category
账号 / 登录 · Account / Login
涉及的 Agent 框架 · Agent framework
ZCode Agent(自研)
使用场景 · Use case
我在 macOS 和 Windows 两台机器上同时使用 ZCode(已登录同一账号),
但任务列表、会话历史、项目配置全部只存在本地 ~/.zcode/ 目录下
(tasks-index.sqlite、cli/db/db.sqlite、cli/rollout/*.jsonl 均为本地存储),
两台设备之间完全无法互通。
目前只能靠 Git 同步代码、dotfiles + 软链接同步个人配置、手动拷贝
rollout/*.jsonl 接续会话,体验割裂且 SQLite + WAL 放网盘同步容易损坏。
建议方案 · Proposal
希望像 Codex / ChatGPT 一样,登录同一账号即自动完成跨设备同步:
- 任务列表与任务状态跨设备可见(A 设备创建/暂停的任务,B 设备能查看和接续)
- 会话历史云端保存,支持在另一台设备上打开并继续同一会话
- 用户级配置同步:AGENTS.md、skills、commands、MCP 配置、模型偏好
(setting.json 中已有 settingsSyncFirstRunPromptHandled 标记,
说明客户端设置可能已有部分同步能力,希望扩展到上述内容) - 冲突处理:多设备并发修改时给出合并策略或以最后写入为准
预期价值 · Expected value
No response
你认为的优先级 · Your perceived priority
高 · High
你使用的 ZCode 版本 / 环境 · ZCode version / environment
- Windows 11(26200)+ macOS,两端均为最新版 ZCode 桌面端
补充材料 · Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the local storage mentioned in ~/.zcode/: tasks-index.sqlite, cli/db/db.sqlite, cli/rollout/*.jsonl, and setting.json, including the settingsSyncFirstRunPromptHandled marker. Trace how tasks, sessions, projects, and user configuration are currently read and written. Done should be defined as a cross-device synchronization design covering account scope, concurrent changes, and recovery from conflicts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sqlite
- Domain
- authentication, cloud, desktop, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100