• - 角色(机器人本体 / owner)、门禁判定逻辑、授权交互(同意/拒绝)
    - .whitelist.json 格式 + 手动加白名单方法
    - 引用回复授权的坑(type 57 appmsg,title + refermsg 提取)
    - 相关方法表
    - TL;DR 加 step 0 白名单门禁;避雷清单加引用回复授权条目
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    yibo authored
     
    Browse File »
  • 代码(server/services/wechat/auto-reply.js):
    - 切到 /v1/runs + GET /events SSE 长连接替代 /v1/chat/completions 同步阻塞
    - 监听新事件:
        message.complete  → 主路径多步消息(每 turn 末尾的可见 content)
        message.delta     → content tokens 兜底
        reasoning.delta   → 默认丢弃;STREAM_REASONING=true 时加 🧠 前缀
        reasoning.available → 同上
        tool.started      → flush 累积;STREAM_TOOL_PROGRESS=true 时发 🔧 进度
        run.completed     → 最终 output utterance + resolve
    - 串行 sendChain:第一条带 quote+@,后续仅文本;A11y 完成前不发下一条
    - 诊断日志节流(高频事件 5s 一次)
    - log() 去掉 fs.appendFileSync(sync I/O 在高频流式下会卡死 node)
    
    Hermes upstream 补丁(phone 上 ~/hermes-agent/gateway/platforms/api_server.py):
    - 加 _reasoning_cb + reasoning_callback wire-up(_create_agent 签名 / AIAgent 构造)
    - 加 _interim_cb + interim_assistant_callback wire-up(同上)
    - /v1/runs 启动 agent 时把两个新回调都传进去
    - 发现:原 hermes /v1/runs 默认只挂 stream_delta_callback + tool_progress_callback,
      漏了 gateway 平台用的另外几个关键回调,导致 /v1/runs 客户端只能收到最终一条回复
    
    实测 Kimi 限制:
    - Kimi-k2.6 在 hermes agentic mode 下 assistant_message.content 永远空
    - 所有内容在 reasoning_content → interim_assistant_callback 因 content 为空 return → 不 fire
    - 短期 workaround: STREAM_REASONING=true
    - 长期: prompt 工程 / SOUL.md 优化
    
    HANDOFF.md:
    - 新章节 §十一 A11y 显式状态机(5 状态 + classifier + dispatch)
    - 新章节 §十二 流式多步消息(SSE 事件表 + hermes 补丁说明 + Kimi 限制 + ENV flag 表)
    - 已知待办从 6 条扩到 9 条(新增 Kimi content 沉默、长消息分段、群消息合流、流式重试、多模型 fallback、SOUL.md 优化等)
    - 避雷清单加 4 条今天新踩的坑
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    yibo authored
     
    Browse File »

  • - 群聊页 obn 标题带 (成员数) 后缀,equals 比对永远 false → strip 后再比
    - LauncherUI fragment 容器 + CLEAR_TASK 不重置内部 fragment → 状态机
      NO_CHAT_VIEW 优先点底部"微信"tab fallback BACK
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    yibo authored
     
    Browse File »
  • - pgrep -f 在 su shell 下自匹配的 spawn 风暴 / 永远不重启二选一
    - start-ar.sh dash wrapper 触发 phone 上 hermes-snap hook 污染 *.js 末尾
    - HERMES_TIMEOUT 120s 在 turns=9 长 context 下偶发不够
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    yibo authored
     
    Browse File »
  • 包含:
    - 运行中进程清单(auto-reply / hermes gateway / A11y service)
    - phone 路径 ↔ Mac repo 路径对照表
    - 启停 / A11y 校验 / 日志查看 / 手动测试发送命令速查
    - Clash mixed proxy 网络拓扑陷阱(Termux UID 被 VPN 排除,必须走 7890)
    - 当前 hermes 后端配置(Moonshot CN + kimi-k2.6)
    - 两种接手开发流程(phone 上 clone repo / 手动 scp)
    - 已知待办(群昵称查询、引用@回复、wake-lock、清理)
    - 避雷清单(前人踩过的所有坑)
    
    同步到 phone: /data/data/com.termux/files/home/hermes-wechat/HANDOFF.md
    
    Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
    yibo authored
     
    Browse File »