Hermes Decision Trace

结论:不建议整包替换 baileyh8/hermes-feishu-streaming-card,我已经按“部分吸收 + 本地原生巩固”把 P0 落下来了。

不建议整包替换 baileyh8/hermes-feishu-streaming-card,我已经按“部分吸收 + 本地原生巩固”把 P0 落下来了。 外部项目最值得吸收的是 streaming 状态机、final 优先级、footer 信息密度、doctor/smoke 体系;我们自己的主链更强的是现有 Feishu 路由、Card V2 builder、native table、长决策 guard、completion receipt 和飞书实际兼容经验。 已完成 - 扩展 gateway/runtime…

🧭
推荐路径

先按已确认方向推进,不继续扩大改动面。

🔎
关键依据

见证据摘要与完整记录中的状态、产物和校验链。

🛠️
落地方式

先把已验证方案当成稳定基线:保留当前 schedule / deliver / workdir,不急着继续扩面;新增候选先读源码、看 output、做 run-now 验证,再决定是否转 script-only。

证据摘要

  • 正文保留完整证据链;本页顶部只展示可读摘要。

行动清单

按需继续推进。

边界 / 风险

风险 / 边界

正文未抽取到明确风险;上线前仍需确认权限、回退路径与运行态影响。

完整记录

结论:不建议整包替换 baileyh8/hermes-feishu-streaming-card,我已经按“部分吸收 + 本地原生巩固”把 P0 落下来了。

结论

这是一条由 Feishu 长回复 guard 自动补救生成的 decision trace。原回复超过飞书安全展示阈值,已转为 HTML/wiki/retain 后再回发短入口。

摘要

结论:不建议整包替换 baileyh8/hermes-feishu-streaming-card,我已经按“部分吸收 + 本地原生巩固”把 P0 落下来了。 外部项目最值得吸收的是 streaming 状态机、final 优先级、footer 信息密度、doctor/smoke 体系;我们自己的主链更强的是现有 Feishu 路由、Card V2 builder、native table、长决策 guard、completion receipt 和飞书实际兼容经验。 已完成 - 扩展 gateway/runtime…

完整记录

结论:不建议整包替换 baileyh8/hermes-feishu-streaming-card,我已经按“部分吸收 + 本地原生巩固”把 P0 落下来了。

外部项目最值得吸收的是 streaming 状态机、final 优先级、footer 信息密度、doctor/smoke 体系;我们自己的主链更强的是现有 Feishu 路由、Card V2 builder、native table、长决策 guard、completion receipt 和飞书实际兼容经验。

已完成

  • 扩展 gateway/runtime_footer.py
  • 新增 style: classic | compact | debug
  • 新增字段:
  • duration
  • provider_model
  • input_tokens
  • output_tokens
  • total_tokens
  • tool_count
  • profile
  • sent_at compact 模式短时间格式
  • 保持旧 API 兼容:format_runtime_footer() 默认仍不带 ---build_footer_line() 继续按配置决定 hr
  • 接入 gateway/run.py
  • final footer 构造时透传:
  • turn duration
  • input/output tokens
  • tool_count
  • profile
  • 没改 Feishu card 主结构,只增强 footer 内容
  • 补测试
  • tests/gateway/test_runtime_footer.py
  • 覆盖 compact/debug v3 footer、style override、Feishu compact fields
  • 新增本地工具
  • tools/feishu_card_smoke_matrix.py
  • 生成 5 类 smoke payload + HTML preview
  • 覆盖短回复、native table、compact receipt、long decision guard、tool summary
  • tools/feishu_card_doctor.py
  • 只读诊断 Feishu credentials、footer config、builder import、native table payload
  • 小补 /footer status
  • gateway/slash_commands.py 里 status 回传补了 style
  • 这个最后一小补还没来得及重新跑测试,因为工具调用额度到了;属于低风险展示字段补充,但需要后续补跑一下。

真实验证结果

已跑:

python -m pytest tests/gateway/test_runtime_footer.py tests/gateway/test_feishu.py tests/gateway/test_feishu_long_decision_autopublish.py -q -o addopts='' 250 passed, 9 warnings in 3.41s

已跑 smoke/doctor:

python tools/feishu_card_smoke_matrix.py --preview --out-dir artifacts/feishu-card-smoke/latest-v3 ok: true python tools/feishu_card_doctor.py --explain Result: PASS

生成物:

/home/ht/.hermes/hermes-agent/artifacts/feishu-card-smoke/latest-v3/preview.html /home/ht/.hermes/hermes-agent/artifacts/feishu-card-smoke/latest-v3/result.json /home/ht/.hermes/hermes-agent/artifacts/feishu-card-smoke/latest-v3/payloads/

浏览器预览也看过:页面正常,s2-native-tabletag: table,footer 示例正常显示 42s · custom-HS-5.2 · in 13k / out 1.1k · ctx 34% · tools 3 · HH:MM

当前边界

  • 我没有重启 live gateway。按之前约定,gateway 重启会影响当前飞书对话运行态,不能擅自做。
  • 当前 ~/.hermes/config.yaml 里的 live footer 配置还是:
  • fields: [model, sent_at]
  • 没有切到 v3 compact 字段
  • 所以代码能力已经有了,但 live 飞书回复要显示完整 v3 footer,还需要后续改配置并重启 gateway 生效。

建议下一步

  1. 先补跑一次包含 gateway/slash_commands.py 的 focused tests。
  2. 用安全配置链把 Feishu 平台 footer 改成 compact v3,例如:
  • duration
  • provider_model
  • input_tokens
  • output_tokens
  • context_pct
  • tool_count
  • sent_at
  1. 你确认后再重启 gateway,随后用一条真实飞书消息验证 runtime footer 是否进入最终 card。

---

custom:axon-HS-5.2 · 2026-06-25 22:05