Skip to main content

daybook-suite

DAYBOOK 起居注:纯文本、零依赖、只增不改的长期记忆账本(pip 发行版)

安装

pip install daybook-suite

用法

daybook index                      # 生成/刷新索引
daybook query 类=实验 时间=2026-10   # 按字段精确查条目原文
daybook backup                     # 手动备份
daybook watch 30                   # 监视各卷,变动即重算索引 + 自动备份

你的数据放在哪(重要)

第一次运行会在运行目录就位 daybook.conf 与 sample/(示例三卷), 账本、索引、备份、各数据卷全部落在该目录,不会写进 Python 安装目录。

运行目录的挑选次序:

  1. --home=/path(当次指定)
  2. 环境变量 DAYBOOK_HOME
  3. 当前目录(仅当它已含 daybook.conf —— 即"用我自己那本账")

三者都没有 ⇒ 壳报错并要求显式指定;不再默认使用 ~/.daybook(该默认曾误改家目录软链下的真实账本)。

产品代码留在包内(以软链接入运行目录),pip install -U 升级代码时不会动你的数据。 要用自己的账本:把 daybook.conf 里 [卷] 的路径改成你自己的纯文本卷即可(相对该目录或绝对路径都行)。

八件要紧的事

  1. 纯文本 —— 卷是纯文本,任何编辑器、任何年代都能打开。
  2. 零依赖 —— 只用 Python 标准库,不装任何第三方包。
  3. 只增不改 —— 追加写,旧的条目不删不改(append-only 纪律)。
  4. 多写者安全 —— 带锁写入,多人/多进程同时记不会互相踩。
  5. 图是引用 —— 结构以引用表达,不复制正文。
  6. 可挂长期记忆 —— 可作为 AI 智能体的可读长期记忆底座。
  7. 够快 —— 索引随取随算,日常规模下即时完成。
  8. 跨年代 —— 不依赖特定工具链,十年后仍读得出。

三件套

件 名 作用 许可
daybook-suite 起居注 账本体:索引 / 查询 / 备份 / 监视 MIT
daybook-mcp 璇玑 MCP 接口(resources / tools / prompts) MIT
daybook-orch 司南 智能体编排中心 AGPL-3.0-or-later(共享件仍 MIT)

授权分层

本包全件 MIT(起居注=账本体:基座 daybook.py/daybook_append.py/safeio.py/daybook_record.py/daybook_hook.py/daybook_session_hook.py)。

逐件以文件头 SPDX-License-Identifier 为准;包内另附 LICENSING.md(分层说明)。

升级须知(v4.0.6 行为变更,必读) / Upgrade notes (v4.0.6)

  1. 非空卷首次索引退 5,需认基线:首次索引不写回证据,先退 5;执行一次 python3 daybook.py baseline 后才写回游标与封存,之后 index 为 0。证据缺失同样停在 5。 The first index of a non-empty volume exits 5 and writes nothing back; run daybook.py baseline once, then index is 0.
  2. 作者必填:daybook_append.py 只接受 卷 类 标题 作者 "正文";旧 3/4 参形态、显式 未标/空值与 --name= 一律拒写并退 2;独立模式也拒机器 id。MCP 写路径不受影响; MCP 不认基线,daybook_index 遇证据缺失返回 rc=5、不写不重建。 The author is mandatory; legacy forms and placeholders exit 2; the MCP path is unaffected.

发行名归属(官方渠道声明)

daybook-suite 是版权持有人(手艺人老宋)注册并持有的官方发行名。判 official 三条须同时成立:

  1. PyPI 页 Homepage 指向 https://daybooksuite.com;
  2. PyPI 页 Repository/Source 指向 https://github.com/songliansheng1972/daybook-suite;
  3. GitHub Release 的 tag 与仓库 CHANGELOG.md 的版本号对得上。

其余渠道上的同名包均非官方,不得以之名作「官方/兼容/认证」背书。

商标(名不可乱用)

daybook/起居注/璇玑/司南 及三个发行名 daybook-suite/daybook-mcp/daybook-orch 均为署名标识,且已列入商标申请范围(第 9 类·可下载软件;第 42 类·软件开发与平台服务)。

  • 可以用我们的码(遵 MIT/AGPL 分层,见包内 LICENSING.md);
  • 不可以用我们的名——不得自称「官方/兼容/认证」,不得用于衍生产品之命名、分发、推广, 亦不得注册与之相同或近似之商标、包名、域名;分叉须另立其名。
  • 申请范围、标识清单与使用规则正本见包内 TRADEMARK.md。
  • ⚠️ 当前状态为拟申请、尚未核准;保护力自核准之日起算,本页不构成核准证明。核准前标识标 ™。

链接

Metadata

Release files for daybook-suite 4.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for daybook-suite 4.0.7
File Size Uploaded Provenance Actions
daybook_suite-4.0.7.tar.gz 304.9 kB Without provenance Details for daybook_suite-4.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for daybook-suite 4.0.7
File Interpreter ABI Platform Actions
daybook_suite-4.0.7-py3-none-any.whl Python 3 none any Details for daybook_suite-4.0.7-py3-none-any.whl

Total release size: 629.4 kB

Release files / daybook_suite-4.0.7.tar.gz

Download URL daybook_suite-4.0.7.tar.gz
Size 304.9 kB
Tags Source
SHA-256 checksum
How to use checksums
9f3467191f0dc9d95f546da44f86fa24a2964f7944862e56b926158d188450b5
BLAKE2b-256 checksum
How to use checksums
ee45b728bb6bfe54458a6bbe20df5436952f88c458c88952b8cb767a83a3dacc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Release files / daybook_suite-4.0.7-py3-none-any.whl

Download URL daybook_suite-4.0.7-py3-none-any.whl
Size 324.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4737782361e6a8bbb36b887d9ee6d3f5b3ec762d31269071ebda2a23b769b87d
BLAKE2b-256 checksum
How to use checksums
47782e3edb82511d9d0ac743df1b89ff71683d64a4b52f23a350231ab8a02eb1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.12

Security for daybook-suite 4.0.7

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page