mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-08-22 02:29:44 +00:00
2 lines
2.1 KiB
HTML
2 lines
2.1 KiB
HTML
<!doctype html><html lang="zh-CN"><head><meta charset="utf-8"><title>通信、会话与投递模型</title><style>:root{color-scheme:dark}body{margin:0;background:#0b1219;color:#e8f2f8;font:15px/1.65 system-ui}main{max-width:980px;margin:auto;padding:28px}header,section{background:#111c26;border:1px solid #294052;border-radius:12px;padding:20px;margin-bottom:16px}h1,h2{margin-top:0}a{color:#70d7ff}code,pre{background:#081018;border-radius:7px;padding:2px 6px}pre{padding:16px;white-space:pre-wrap}.tag{border:1px solid #426277;border-radius:999px;padding:2px 8px;margin-right:5px}</style></head><body><main class="praxis-model-document" data-praxis-anchor="model:communication-conversation" data-praxis-kind="uml_model" data-praxis-status="confirmed"><header><h1>通信、会话与投递模型</h1><p>消息如何获得稳定身份、进入会话并经历可验证的投递生命周期。</p><span class="tag">confirmed</span><span class="tag">4 elements</span></header><section><h2>模型判断</h2><p>Meshtastic、MeshCore 与 Reticulum 的线协议不同,但用户消息不能因此分裂成三套业务模型。统一发生在意图与投递事件层;协议差异停留在 backend 边界。</p><h2>不变量</h2><ol><li>重复 RX/ACK 不创建第二条业务消息。</li><li>终态只能由可验证事件驱动,UI 不猜测。</li><li>重试不改变原消息业务身份。</li><li>协议 namespace 参与持久化与去重键。</li></ol></section><section><h2>领域元素</h2><p><strong>ChatMessage / Conversation</strong> — 用户可见的消息与上下文。</p><p><strong>ChatMessageLedger</strong> — 投递事实唯一提交入口。</p><p><strong>ReceivePacketService</strong> — 接收验证与业务提交边界。</p></section><section><h2>源码证据</h2><p><code>modules/core_chat/include/chat/delivery/chat_message_ledger.h</code><br><code>modules/core_chat/src/delivery/chat_message_ledger.cpp</code><br><code>modules/core_mesh/include/mesh/usecase/receive_packet_service.h</code></p><p><a href="message-delivery-lifecycle.html">下钻:消息投递生命周期</a></p></section></main></body></html>
|