Skip to main content
Z

dsh-xixi-body

zhangxinleilyf/dsh-xixi-body

Diet, workout and body-metric tracker for DeepSeek Harness: 12 agent tools log meals, sets, water and weigh-ins from plain chat, and a six-tab left-sidebar panel shows the day, the week, sodium/sugar intake, e1RM and the body-weight trend. Local SQLite only, no network, works without any persona plugin.

Install

dsh plugin --profile web add github:zhangxinleilyf/dsh-xixi-body

README

dsh-xixi-body

Diet · workout · body-metric tracker for DeepSeek Harness. Log in chat, read it in the sidebar. Plain DSH plugin — no other plugin required.

饮食 / 训练 / 身体记录:在对话里一句话记下吃了什么、练了什么,左栏面板看当天与本周。

Diet tab

What it does

You say "午饭米饭加番茄炒蛋,一杯拿铁" and the agent writes it down; the sidebar panel (身体记录, order 2.5) shows the day, the week, and the trend. Six tabs:

Tab内容
饮食 Diet当天热量环、三大宏量、钠/糖/饮水、餐次明细,可改克数、删条目
训练 Training当天动作与每组重量×次数、容量、e1RM、部位组数
数据 Data近 14 天热量差、体重曲线、餐次热量分布、供能占比
历史 History按月按周列出每天吃了什么、练了什么、称了多少
评估 Assessment本周/本月快照与历史评估存档
动作库 Library91 条常见动作 + MET 表,可按部位/器械搜索

Install

# from npm
dsh plugin --profile web add dsh-xixi-body
# or straight from GitHub (no build step — the source is the artifact)
dsh plugin --profile web add github:zhangxinleilyf/dsh-xixi-body

Then restart the host once (the bundle list is read at boot) and refresh the Web GUI. The panel appears in the left sidebar under the name 身体记录.

Requirements: DSH >= 0.2.0-rc.1, Node >= 22.5.0 (uses built-in node:sqlite).

Standalone by design

The plugin talks to DSH only: ctx.webServer for the panel API, ctx.tools for the 12 agent tools, and an optional systemPrompt section. It does not import, read or require dsh-fish-soul or any persona plugin — with plain DSH the tools work exactly the same; the panel is what shows them. If you do run a persona plugin, the same tools simply become that character's hands (the prompt below is editable per install).

Tools

diet_log diet_query diet_fix water_log target_set · workout_log workout_query workout_fix exercise_fix · body_log body_fix · assessment

Each write tool takes the natural sentence you spoke and normalizes it (grams, sets, RPE); *_query returns the day with #ids so *_fix can edit or delete a single entry.

Data & privacy

  • Everything lives in one local SQLite file: $DSH_HOME/xixi-body/body.db (falls back to ~/.dsh/xixi-body/body.db). No network calls, no telemetry, no account.
  • GET /api/plugins/xixi-body/health returns counts only — no meal text, no body data.
  • The prompt is copied to $DSH_HOME/xixi-body/prompt.md on first run; edit that file to change how the agent talks about food and training. It is never overwritten afterwards.
  • Panel writes are limited to editing/removing a diet entry (same-origin + JSON only); everything else is written by the agent through the tools.

Develop

There is no build step: lib/ is shipped as-is.

npm run check      # node --check on every module
npm run pack:check # what npm would publish

Local install without publishing: junction/symlink the directory into ~/.dsh/profiles/<profile>/node_modules/dsh-xixi-body, add

- insert:
    - id: xixi-body
      name: 'dsh-xixi-body'

to that profile's cordis.patch.yml, then restart the host.

License

MIT. Exercise images come from free-exercise-db (CC BY-SA 3.0); food thumbnails are bundled for offline use.


中文说明

给 DSH 用的饮食 / 训练 / 身体记录插件。 一个左栏面板 + 12 个工具,数据存本地 SQLite,不联网、不上传。

  • 装:dsh plugin --profile web add dsh-xixi-body(或 github:zhangxinleilyf/dsh-xixi-body), 重启宿主,刷新页面,左栏出现「身体记录」。
  • 用:跟助手说「午饭米饭番茄炒蛋」「深蹲 100 公斤 5×5」「今早 68.4」,它会记上; 面板里看当天/本周/历史,条目改克数、删记录都在面板里做。
  • 独立:不依赖 fish-soul 或任何人设插件,工具走 DSH 自己的 ctx.tools,面板走 ctx.webServer;有人设插件时它就是那个角色的身体模块。
  • 数据:$DSH_HOME/xixi-body/body.db;提示词首次运行复制到 $DSH_HOME/xixi-body/prompt.md,改那份文件即可调整说话方式。
  • 要求:DSH >= 0.2.0-rc.1、Node >= 22.5.0(用内置 node:sqlite)。

Related plugins