collectbase
摄入边界(ingestion boundary):把各来源的原始会话收拢、归一成标准 session,推进 memory system。
collectbase 是从 memory.talk 里进程内的 sync 剥离出来的独立服务,与 seekbase 平级:
- seekbase 管「数据怎么存怎么查」;
- collectbase 管「经验怎么进来」。
内部按数据来源拆成一个个 worker(claude-code / codex / openclaw / …):每个来源一个 worker,各自监听上游、把私有格式归一成标准 session、经 ingest 接口推给 memory。它认识「来源、游标、rounds」,不结晶、不治理、不碰数据库。
collectbase 是独立模块:核心只依赖 pydantic + aiosqlite,对 memory system 只经 HTTP ingest 接口(/v3/sessions/ensure · /append)说话,不 import 任何 memory 侧代码。
独立运行
pip install -e ".[http,watch]" # http=HttpSink, watch=fs 实时监听
cp collectbase.example.toml collectbase.toml # 填 sink.base_url + [[workers]]
collectbase serve -c collectbase.toml # 常驻:backfill + watch
collectbase status -c collectbase.toml # 一次冷扫,打印 totals 退出
嵌入用法(库):
from collectbase import Collectbase, HttpSink
from collectbase.workers import ClaudeCodeWorker
cb = await Collectbase.open(
checkpoint_dir="./collect",
sink=HttpSink("http://memory-host:8000"),
workers=[ClaudeCodeWorker()], # 或 CodexWorker / OpenclawWorker
)
await cb.start(); ...; await cb.close()
内置 worker:claude-code · codex(fs 型)· openclaw(HTTP poll 型)。加一个来源见 docs/worker.md。
文档
设计与契约见 DESIGN.md;子系统展开见 docs/——重点是 docs/worker.md(怎么用几十行写一个 worker:声明监听哪些文件、把一条记录解析成标准 round)与 docs/session-format.md(标准化产物)。
状态:M1+M2 已实现并测试(29 passed);engine / checkpoint / sink(InProcess + Http)/ 三个内置 worker 齐活,可独立跑通。
Metadata
Release files for collectbase 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 | Provenance | |
|---|---|---|---|---|
| collectbase-0.1.0.tar.gz | 54.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| collectbase-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.9 kB
Release files / collectbase-0.1.0.tar.gz
| Download URL | collectbase-0.1.0.tar.gz |
|---|---|
| Size | 54.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c3d80dac8fbf09efff6f42c8d655a00807b95afad1afb2e2463c8c3f6759f27
|
|
BLAKE2b-256 checksum How to use checksums |
3a60231175d8b3320c44a0947fd26d1c6b9031564787ed4d372f57df7b9517fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / collectbase-0.1.0-py3-none-any.whl
| Download URL | collectbase-0.1.0-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
88064b9dd53017e447668a332396a9dc62f0f2f7d35dfe352d133fd8b2a929b5
|
|
BLAKE2b-256 checksum How to use checksums |
e0ce7050d5be6a373dde6a07ac6290bba22bd524155c0c100b561d83c97ab2f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for collectbase 0.1.0
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.