Messaging transport and authorization principles¶
Messaging adds a transport to existing platform services. It does not add a trading engine or give a model authority to execute code. Setup is described in the usage guide.
Transport boundary¶
Provider adapters normalize authenticated identity, text and reply context. Feishu's official SDK runs in a separate process because it owns an asyncio lifecycle; sends use a stable delivery UUID. WeChat uses iLink QR login, HTTP polling and context-bound text sends. WeCom uses an authenticated WebSocket, heartbeat and explicit send acknowledgements.
The design follows nanobot's channel separation, while keeping this platform's services and Python range. Protocol sources include Tencent iLink, Feishu's SDK, and WeCom's Python SDK. Reference frontend scripts and the full nanobot runtime are not imported.
Authority and replay¶
The transport supplies sender, conversation and provider message identifier. Model text cannot supply that identity. Local approval binds a short-lived code to that tuple and grants individual operations and resources. Confirmations also bind to the current grant revision, action snapshot and expiry.
Confirmation consumption and request creation share the inbound transaction. Concurrent duplicate provider messages share one replay identifier. Parameters and source snapshots are resolved without running a strategy during preview and are checked again before execution. Natural-language text is a question rather than a mutation proposal.
Requests and model history are isolated by binding; knowledge history also uses the named library. Lookup and cancellation require ownership. Revocation blocks future work and delivery, while running work retains explicit cancellation semantics. An already in-flight network message cannot be recalled.
Persisted outcomes¶
Business state commits before best-effort terminal publication. Discovery reads recorded results and local health. Per-binding watermarks feed independent outbox records; network requests occur outside business transactions.
Cross-process leases elect one owner, with standby takeover after release or expiry. Worker processes persist domain task identifiers and actual outcomes. Recovery marks interrupted submissions as uncertain and interrupted sends as ambiguous instead of rerunning them. Domain failures and partial results do not become success merely because the wrapper returned.
Event keys prevent ordinary duplicate fanout but cannot prove exactly-once delivery across lost acknowledgements. Safe connection failures or explicit retryable rejection can retry within policy. Ambiguous outcomes stop. Feishu's UUID provides an additional provider guard; WeCom ACKs distinguish acceptance from missing acknowledgement. WeChat context and send limits remain upstream conditions.
Privacy and verification¶
Credentials stay in local environment files; cursors and reply context remain in the ignored runtime database. Diagnostics expose readiness and categorized outcomes. Outbound text masks known secrets, common private paths and recognizable internal URLs. This reduces accidental leakage; it does not classify every confidential business fact.
Remote model operations reuse RPM and Langfuse instrumentation without exporting credentials or raw transport frames. Bounded message bodies expire, while hashed identifiers and metadata may remain for replay protection. Runtime state is never published or committed.
Verification distinguishes permissions, real local wire exchanges, task outcomes, recovery, browser actions and external account receipt. Publication, source discovery, local delivery and provider delay are measured separately. Local protocol acceptance does not establish that a real account has been bound.