Skip to content

Add databases component (Valkey) - #77

Merged
greyoak111 merged 2 commits into
mainfrom
comp/databases
Nov 11, 2026
Merged

greyoak111 merged 2 commits into
mainfrom
comp/databases

Conversation

@greyoak111

@greyoak111 greyoak111 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

组件 / Component

  • id: databases
  • 上游 / Upstream: Valkey 9.1.3 (Termux main)
  • 许可证 / License: BSD-3-Clause
  • 主页 / Homepage: https://valkey.io

What

A local Valkey (Redis-compatible) server with a non-interactive wrapper:

  • ccdb init / start / stop / status / info — data in ~/.cccodroid/databases/valkey
  • ccdb cli <command> — runs valkey-cli against 127.0.0.1:6380
  • binds 127.0.0.1 only; no password and no external exposure (the skill warns against changing that)
  • port and data directory can be overridden with CCDB_VALKEY_PORT / CCDB_HOME

This version ships Valkey only. PostgreSQL is deliberately not included: the base has libicu 78.3 while the packaged postgresql 18.6 needs libicu 79.1, so both the bionic and glibc PostgreSQL packages fail to start (the glibc one also lacks libxml2.so.2). The description, skill and recipe notes say this explicitly; PostgreSQL is deferred until a toolkit update.

体积与共用包 / Size and sharing

  • 组件 tar 包 1.7 MB · 装后 4.4 MB · 1 个包(valkey 包本身 1.1 MB)
  • 无与其他组件共用的包 / no packages shared with other components

Tested

ccdb selftest starts a temporary Valkey on a free port under $TMPDIR, runs SET/GET and stops it:

===== 总结 ===== valkey=9.1.3 start=PASS set=PASS get=PASS stop=PASS

Local audit against devkit-2026.10.28: 0 errors; 🟡 because the component ships its own wrapper (usr/bin/ccdb).

检查 / Checklist

  • node tools/check-recipes.mjs 通过 / passes
  • ci-build.mjs --dry 依赖都能解 / resolves (also built for devkit-2026.10.28)
  • 读过组件编写规则 / read the authoring rules
  • 描述与 skill 里的版本、能力以实际打进包的为准 / description and skill match what is packaged (explicitly Valkey-only)
  • 看过审计报告 / read the audit report (shared packages and risk levels above)
  • 第一次运行要下载的:skill 里写明大小与来源、先问用户 / first-run downloads disclosed and ask first (N/A — no runtime downloads)
  • SKILL.md 不会让 Claude 读取或打印令牌、密码 / never reads or prints secrets
  • 对外发布、删除类操作写明先问用户 / asks before public or destructive actions (deleting the data directory needs confirmation)
  • needs 如实填写 / filled honestly (shizuku, display, gpu all false)
  • 不涉及反代、共享或转售账户、破甲、批量操控账号 / not for reverse proxies, shared accounts, jailbreaking or mass-controlled accounts

真机测试 / Device test

  • node tools/verify-device.mjs 全过,记录另开 PR 进 verified.json / not run yet; can follow up
  • 设备 / Device:
  • cccodroid 版本 / version:

🤖 Generated with Claude Code

合并前补的 / Added before merge

  • ccdb start 起 Valkey 前去掉 CCAPP_RUN、CCAPP_RUN_ID、CLAUDECODE、CLAUDE_CODE_ENTRYPOINT:否则网关重启或停止那一轮对话时,Valkey 会被当成那一轮留下的进程清掉(同 openai-bridge 的 start-bridge.sh)。/ ccdb start now drops cccodroid's run marks so the daemon survives stopping the turn or a gateway restart.

Local Valkey bound to 127.0.0.1 with a ccdb wrapper for init/start/stop/
status/cli and a temp-instance selftest. PostgreSQL is deliberately not
included: the base libicu 78.3 does not match the packaged postgresql 18.6
(libicu 79.1), and both bionic and glibc PostgreSQL fail to start.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

组件审计报告

底座 devkit-2026.10.28(3768afcf79a7)· 规则见 tools/audit.mjs 开头。🟢 看报告即可 · 🟡 要读脚本和 skill · 🔴 要逐行审

🟡 databases 9.1.3-r1

下载 1.7 MB · 装后 4.4 MB · 33 个文件 · 1 个包 (第一次发布)

  • ✅ 不会盖掉底座的文件
  • ✅ 3 个 ELF 检查过
  • ✅ 每个 ELF 要的库都找得到
  • ✅ bin 入口与 selftest 命令都在

人要看的:

  • 🟡 配方自带文件 1 个:usr/bin/ccdb

和别的组件共用的包:无

包清单
包 版本 下载
valkey 9.1.3 1.1 MB

CI 实跑 selftest(arm64 + termux-docker)

组件 结果 说明
databases ✅ 退出码 0;最后一行:===== 总结 ===== valkey=9.1.3 start=PASS set=PASS get=PASS stop=PASS

环境同 App 里 Claude 的 Bash 工具(PREFIX / HOME / TMPDIR / termux-exec),没有 GPU、屏幕、Shizuku。通过只说明「装得上、跑得起来」,安卓特有的问题仍要真机。

ccdb start daemonizes valkey-server with the caller's environment, so it
inherited CCAPP_RUN / CCAPP_RUN_ID from the Claude turn that started it.
cccodroid then treats it as a leftover of that turn: it is killed when the
turn is stopped (0.6.17) or when the gateway restarts. Drop the run marks
before starting, like openai-bridge's start-bridge.sh does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@greyoak111
greyoak111 merged commit 1fb8647 into main Nov 11, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants