ChatTodo
ChatTodo 提供有序任务树、原子变更、SQLite 持久化、版本冲突检测和撤销能力,供 ChatSite 任务树工作台及其他 Python 程序调用。
安装:pip install "ChatTodo>=0.1.0,<0.2.0"。
文档:https://arch.gh.wzhecnu.cn/ChatTodo/
完整网页请安装 ChatSite[todo];ChatTodo 本身是领域库,不启动 Web 服务。
Python API
from chatenv import get_paths
from chattodo.board import BoardStore
store = BoardStore(get_paths().home_dir / "chattodo" / "boards.sqlite3")
board = store.create("example-user", title="项目计划")
root = board["nodes"][0]["id"]
result = store.mutate(
board["id"], "example-user", board["revision"], "create-first-task",
[{"op": "create", "node": {
"id": "first-task", "parent_id": root,
"title": "明确需求", "body": "## 目标\n明确交付范围。",
}}],
)
print(result["change"]["counts"])
validate_nodes/apply_operations:纯函数校验与变更,不修改调用者输入。BoardStore.create/list/get/mutate/undo/save_view/history/delete:持久化接口。- 稳定节点 ID、四种任务状态、Markdown 正文、父子关系和兄弟排序。
- 修改批次原子应用;旧 revision 冲突;同一 request_id 幂等且绑定原始内容。
- 视图坐标/缩放/折叠状态与语义 revision 分离。
- SQLite 专用目录与文件私有,拒绝危险链接/特殊文件;owner 间隔离。
浏览器页面、登录、同源 API、模型调用与站点部署属于 ChatSite,不在 ChatTodo 中重复实现 Web 服务。模型配置不属于此领域包。
开发验证
python -m pytest -q
chattodo --version
chattodo --tree
chattodo --tree-brief
python -m build
当前 CLI 保留标准根选项;领域能力以 Python API 提供,不伪造尚不存在的业务命令。
Metadata
Release files for ChatTodo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chattodo-0.1.0.tar.gz | 12.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chattodo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.9 kB
Release files / chattodo-0.1.0.tar.gz
| Download URL | chattodo-0.1.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa1a8c611460d345792390b9ba30d9f09836e98a29a88ec537f8955d42660bde
|
|
BLAKE2b-256 checksum How to use checksums |
0659f0c4c4f3213de6bdf68b646fbf6a7aab2776b9238cb033d720a14317153e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency logRelease files / chattodo-0.1.0-py3-none-any.whl
| Download URL | chattodo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 13.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ddfc996df23b778703729b59401e29772db8ba6b8e110f6ecf3e9ac6c88ce4ba
|
|
BLAKE2b-256 checksum How to use checksums |
35f548f78c293c6a8ae175978389365ed93bca90f532881962f573c2ddea10ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 9, 2026.
Transparency log