Skip to main content

my-heart-health

心理打卡 Agent 🔒 — 记录睡眠 / 压力 / 情绪日记,每周自动把日志批量交给复盘 Agent,帮你看到情绪波动规律、触发事件,输出简单总结。不做诊断。

依赖 acps-sdk 2.1.0 实现智能体互联(AIP + ACS)。

设计

┌─────────────────────┐       AIP RPC (acps-sdk)        ┌─────────────────────┐
│  Tracker Agent       │ ──── week JSON ───────────────► │  Reviewer Agent      │
│  (Leader, CLI)       │ ◄── summary text ─────────────  │  (Partner, FastAPI)  │
│                      │                                  │                      │
│  - record            │                                  │  - 接收一周日志       │
│  - list / week       │                                  │  - 趋势/触发因素统计   │
│  - review (联网)     │                                  │  - 返回总结 Product   │
└─────────────────────┘                                  └─────────────────────┘
           │                                                     │
           ▼                                                     ▼
   ~/.my-heart-health/journal.json                        纯 Python 算法
   (本地 JSON 日志,离线可查)                             (不调 LLM / 不联网)

快速上手

# 1. 安装(本地开发)
pip install -e .
# 或从源码构建 wheel
pip install build && python -m build
pip install dist/my_heart_health-1.0.2-py3-none-any.whl

# 2. 启动复盘 Agent(另开一个终端)
my-heart-health-reviewer
# 监听 http://127.0.0.1:8765/aip/rpc

# 3. 打卡
my-heart-health record --sleep 7.5 --stress 3 --mood 平静 --mood 满足 --trigger 工作 --diary "今天效率不错"
my-heart-health list              # 看历史
my-heart-health week              # 看本周本地统计(不联网)
my-heart-health review            # 上周日志发给复盘 Agent

项目结构

my_heart_health/
├── __init__.py
├── cli.py               # click CLI 入口
├── agent/
│   ├── tracker.py       # 打卡 Agent(Leader,AipRpcClient 调用复盘)
│   └── reviewer.py      # 复盘 Agent(Partner,FastAPI + AIP RPC Server)
├── models/entries.py    # MoodEntry / WeekLog 数据模型
├── storage/journal.py   # 本地 JSON 存储
└── analysis/patterns.py # 周模式分析(趋势、触发因素、文本总结)

关于"每周自动"

推荐用系统自带的 cron / launchd / 任务计划程序 每周一早上触发:

# macOS / Linux 示例:每周一 09:00 自动把上一周日志发给复盘 Agent
0 9 * * 1  my-heart-health review >> ~/.my-heart-health/review.log 2>&1

本包本身不内置定时器,避免引入复杂依赖。

免责声明

本工具仅帮助你整理自主记录的睡眠、压力、情绪数据的统计趋势,不构成任何医学诊断。如有持续困扰,请咨询专业人士。

Metadata

Release files for my-heart-health 1.0.2

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

Source distribution (sdist)

Source distribution for my-heart-health 1.0.2
File Size Uploaded Provenance Actions
my_heart_health-1.0.2.tar.gz 13.7 kB Without provenance Details for my_heart_health-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for my-heart-health 1.0.2
File Interpreter ABI Platform Actions
my_heart_health-1.0.2-py3-none-any.whl Python 3 none any Details for my_heart_health-1.0.2-py3-none-any.whl

Total release size: 29.8 kB

Release files / my_heart_health-1.0.2.tar.gz

Download URL my_heart_health-1.0.2.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3a5b878d3620825ef7a4a3c681df4a37c02e81c1aab3b59387f66d72024ab0f2
BLAKE2b-256 checksum
How to use checksums
299ab4c28c7d805e510fd6f4610102de9db19ee629e97342182f5c303e056b48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.2

Release files / my_heart_health-1.0.2-py3-none-any.whl

Download URL my_heart_health-1.0.2-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9a2967fea759c12a8e69642537da4e9debc58c092f6c62d21fd40dc148b72df2
BLAKE2b-256 checksum
How to use checksums
09843890df0958f9c65ba07a6302784c0f02722ae6e0761811a8276729caf99c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.2

Security for my-heart-health 1.0.2

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.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files No provenance

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