独立、可自托管的 AI 动态心智状态引擎:驱动力、念头池、疲惫、睡眠与意图。
# Add to your Claude Code skills
git clone https://github.com/tianyupaipai-cmd/xinchao-dynamic-mindGuides for using ai agents skills like xinchao-dynamic-mind.
xinchao-dynamic-mind is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by tianyupaipai-cmd. 独立、可自托管的 AI 动态心智状态引擎:驱动力、念头池、疲惫、睡眠与意图。. It has 54 GitHub stars.
xinchao-dynamic-mind's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/tianyupaipai-cmd/xinchao-dynamic-mind" and add it to your Claude Code skills directory (see the Installation section above).
xinchao-dynamic-mind is primarily written in JavaScript. It is open-source under tianyupaipai-cmd on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh xinchao-dynamic-mind against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.

心潮是一个独立、可自托管的 AI 动态状态层。它在对话之外持续维护驱动力、念头池、疲惫、睡眠、梦境余韵与短期窗口状态,并通过 HTTP API 或远程 MCP 接入不同模型、设备和前端。
心潮模拟可解释的动态状态,不宣称产生意识、情感或生命。核心状态机可离线运行;模型、长期记忆、OAuth 和通知均为可选适配器。
Mcp-Session-Id,不再依赖模型临时编写窗口 ID。xinchao_handoff_note 最多 1200 字、默认 72 小时过期,不保存整段聊天原文。xinchao_event 使用 event_id 防止网络重试造成重复结算。完整差异见 CHANGELOG.md。
只要终端支持以下任一方式即可接入:
心潮不绑定 Claude。Claude、Codex、其他 Agent、自建网页和移动应用可以共享同一个服务端,但每条 MCP 连接会获得独立窗口会话。
要求:Node.js 20 或更高版本。
cp .env.example .env
openssl rand -hex 32
# 将输出填入 .env 的 SERVICE_TOKEN
npm test
npm start
检查服务:
curl http://127.0.0.1:18110/health
Docker:
cp .env.example .env
mkdir -p state memory-data
docker compose up -d --build
docker compose ps
Compose 默认只映射到 127.0.0.1:18110。远程使用时请自行配置 HTTPS 反向代理或 Cloudflare Tunnel,不能直接开放裸端口。
在 .env 中启用:
MCP_ENABLED=true
OAUTH_ENABLED=true
OAUTH_PUBLIC_BASE_URL=https://xinchao.example.com
OAUTH_APPROVAL_TOKEN=至少16位的独立授权口令
远程 MCP 地址:
https://xinchao.example.com/mcp
支持动态客户端注册的客户端不需要手动填写 Client ID 或 Client Secret。授权口令只在你自己的授权页面输入,不要写入客户端 URL、仓库或截图。
| 工具 | 作用 |
|---|---|
xinchao_context |
获取当前动态短态和近期连续性;同一窗口首次启动默认只交付一次 |
xinchao_event |
回传一次明确互动及有界窗口状态;event_id 用于幂等 |
xinchao_handoff_note |
保存限时近期进度摘要,不保存整段聊天原文 |
session_id 是可选覆盖值。正常情况下服务端会使用 MCP 连接自带的稳定窗口 ID。
除 /health 与 OAuth 发现/授权端点外,业务 API 都要求:
Authorization: Bearer <SERVICE_TOKEN>
| 方法 | 路径 | 作用 |
|---|---|---|
GET |
/health |
健康状态与版本 |
GET |
/v1/state |
读取完整动态状态 |
GET |
/v1/intent |
读取当前意图 |
GET |
/v1/breath-context |
获取紧凑梦境余韵 |
GET |
/v1/context |
获取 Context Envelope |
POST |
/v1/settle |
执行状态结算 |
POST |
/v1/conversation-event |
写入一次明确互动事件 |
POST |
/v1/handoff-note |
保存短期交接摘要 |
POST |
/v1/drive-feedback |
管理端受控反馈接口 |
POST |
/mcp |
Streamable HTTP MCP |
长期记忆不是心潮的必需组件。启用外部记忆时:
OMBRE_MCP_URL=https://memory.example.com/mcp
OMBRE_MCP_TOKEN=
OMBRE_READ_ENABLED=false
OMBRE_WRITE_ENABLED=false
CONTEXT_OMBRE_ENABLED=false
.env、state/、memory-data/、OAuth 状态或真实 Token。SERVICE_TOKEN、MCP_PATH_TOKEN 与 OAUTH_APPROVAL_TOKEN 必须彼此独立。xinchao_event 不接受聊天正文;交接便签也只应保存脱水后的近期进度。npm test
当前测试覆盖状态结算、睡眠与醒来、念头池、窗口隔离、幂等互动、Context Envelope、交接便签、OAuth、MCP 协议、外部记忆适配、通知去重和隐私审计。
src/ 状态机、MCP、OAuth 与可选适配器
test/ Node.js 原生测试
configs/ 可替换提示词
scripts/ 本地配置、部署与烟雾测试
state/ 运行状态挂载目录(不提交真实数据)
memory-data/ 可选外部心跳挂载目录