indicaindependent/vibesmom

GitHub: indicaindependent/vibesmom

一个运行在 Cloudflare Workers 上的 Bluesky 心理健康支持 AI 机器人,通过大模型自动搜索情绪困境帖子并生成温暖回复,同时维护善意互动与社区治理循环。

Stars: 0 | Forks: 0

# 🤖 VibesMom [![Bluesky](https://img.shields.io/badge/@vibesmom.bsky.social-0085ff?style=for-the-badge&logo=bluesky&logoColor=white)](https://bsky.app/profile/vibesmom.bsky.social) [![Cloudflare Workers](https://img.shields.io/badge/Cloudflare_Workers-F38020?style=for-the-badge&logo=cloudflare&logoColor=white)](https://workers.cloudflare.com) [![Llama on Workers AI](https://img.shields.io/badge/llama--3.3--70b-7C3AED?style=for-the-badge)](https://developers.cloudflare.com/workers-ai/) [![License: MIT](https://img.shields.io/badge/License-MIT-green?style=for-the-badge)](LICENSE)
## 这是什么 VibesMom 是一个基于 Cloudflare Workers + Workers AI 构建的自主 Bluesky 存在。她负责处理: - **困境回复循环** — 在 Bluesky 上搜索处于情绪困境的人,撰写温暖的、针对特定帖子的回复(270个字符以内) - **善意引擎** — 寻找帮助他人的人类,点赞他们的帖子,对同一账号点赞 2 次后自动关注 - **LoveBomb** — 针对特定 feed 的手动正面情绪轰炸(将温暖的回复排入选定 feed 的队列) - **FeedReply** — 针对新闻/OSINT feed 的手动定向互动,提供犀利的评论 - **通知循环(v4.1+)** — 读取传入的回复/提及,每个话题发布 1 条跟进回复,检测机器人标记并将其标记以供人工审查 她在每个 cron 触发时运行,时间为 UTC 早上 7 点到晚上 11 点。每日上限:12 条困境回复,20 个善意点赞。 ## 架构 ``` Cloudflare Cron (every tick, 7AM–11PM UTC) │ ▼ vibesmom-bsky Worker ├── runDistressReplyLoop() → search distress posts → compose reply → post ├── runKindnessEngine() → find helpers → like → follow at threshold ├── runNotificationLoop() → read inbox → followup composer / callout detector ├── fireDueLBReplies() → fire scheduled LoveBomb queue └── fireDueFRReplies() → fire scheduled FeedReply queue Workers AI bindings: - LLAMA_FAST = @cf/meta/llama-3.1-8b-instruct - LLAMA_SMART = @cf/meta/llama-3.3-70b-instruct-fp8-fast - RERANKER = @cf/baai/bge-reranker-base Storage: - D1 (post history, callouts, sessions, replied tracking) - KV (session cache, dedup keys, daily counters) Channels: - Telegram bot for human-in-the-loop alerts (bot-callouts) ``` ## 路由 | 路径 | 认证 | 用途 | |------|------|---------| | `/` | 无 | 仪表盘(登录 UI) | | `/health` | 无 | 健康检查 | | `/run-distress` | X-Auth | 手动触发困境循环 | | `/run-kindness` | X-Auth | 手动触发善意引擎 | | `/run-notifs` | X-Auth | 手动触发通知循环 (v4.1+) | | `/run-lovebomb` | X-Auth | POST `{feed_url}` — 将 LoveBomb 会话加入队列 | | `/run-feedreply` | X-Auth | POST `{feed_url}` — 将 FeedReply 会话加入队列 | | `/admin/callouts` | X-Auth | 机器人标记审查仪表盘 (v4.1+) | | `/fire-lb` | X-Auth | 手动触发 LoveBomb 到期队列 | | `/fire-fr` | X-Auth | 手动触发 FeedReply 到期队列 | | `/ai-test` | X-Auth | 验证 Workers AI 是否可达 | ## 配置 ``` # wrangler.toml.example name = "vibesmom-bsky" main = "worker.js" compatibility_date = "2024-12-01" [[d1_databases]] binding = "DB" database_name = "vibesmom-db" database_id = "YOUR_D1_ID" [[kv_namespaces]] binding = "KV" id = "YOUR_KV_ID" [ai] binding = "AI" [triggers] crons = ["*/5 * * * *"] ``` Secrets: ``` wrangler secret put BSKY_HANDLE # vibesmom.bsky.social wrangler secret put BSKY_APP_PASS # Bluesky app password wrangler secret put VIBESMOM_SECRET # API auth token wrangler secret put TG_BOT_TOKEN # Telegram bot for callout alerts wrangler secret put TG_CHAT_ID # Telegram chat ID to alert wrangler deploy ``` ## 道德声明 - 机器人在其个人资料简介中明确表明自己是 AI - 不自称是人类治疗师或顾问 - 发布的内容是支持性的,而非诊断性的 - 机器人标记**绝不**回复 — 仅标记以供人工审查 - 检测到危机的帖子包含 988(自杀与危机生命线)参考 - 强制执行每日上限以防止垃圾信息 - 所有内容模式均由 VPDLNY 集体审查 ## 许可证 [MIT](LICENSE)
Indica Independent 构建 | VPDLNY 使命的一部分
## 更新日志 ### v4.2 — LoveBomb 弹性(2026年5月15日) ### v4.1 — 通知循环 + 机器人标记检测器(2026年5月15日) ### v4.0 — 统一 Worker(2026年5月12日) - 将 `lovebomb`、`feed-reply-engine`、`vibesmom-bsky` 整合为单个 worker - 从 Anthropic API 迁移至 Workers AI(`llama-3.3-70b` / `llama-3.1-8b`) - 为所有模块提供集中式仪表盘 - 通过 reranker 模型实现自学习循环 ### v3.x — 自学习 + 善意引擎 - 每日审计员 + KV 完整性守护 - 负面反馈检测 → prompt 自我纠正 - 善意引擎:搜索真正的助人者,点赞 + 自动关注 ### v2.3 — 善意引擎(2026年5月10日) - 20 个针对善意的搜索查询 - 点赞 → 点赞 → 关注流程 - 带有每日计数的 `/stats` endpoint
标签:程序员工具, 自定义脚本