Skip to content

The agent that grows with you

docs: distinguish canonical Bot admission from retired UI ownership

Teknium2d22a7cd441e
diff --git a/tools/bot_live_delivery.py b/tools/bot_live_delivery.py
index 2b9f143c2f4..3d2f6839efe 100644
--- a/tools/bot_live_delivery.py
+++ b/tools/bot_live_delivery.py
@@ -1,9 +1,8 @@
-"""Durable, at-most-once handoff to an existing Bot Chat owner.
+"""Canonical Bot Chat transport and durable legacy delivery receipts.
-Adapted from FalconOrtiz's live-owner mailbox (#101564). A single private
-record advances queued -> claimed -> terminal under a process-shared lock.
-Claims never expire: a crashed consumer leaves an inspectable unknown outcome,
-not permission to execute the same input again. Receipts are permanent.
+Only gateway/session_bot.py admits execution. Old claimed/terminal records remain
+inspectable; the legacy UI claim consumer is retired. No authority means refusal.
+Receipt storage derives from FalconOrtiz's live-owner mailbox (#101564).
"""
from __future__ import annotations
diff --git a/tools/bot_mode_dm.py b/tools/bot_mode_dm.py
index 75b808c47ae..139bf7ca766 100644
--- a/tools/bot_mode_dm.py
+++ b/tools/bot_mode_dm.py
@@ -419,16 +419,10 @@ def _local_delivery_home(argv: list[str]) -> Path | None:
def _run_delivery(argv: list[str], dm_file: str, *, stdin_file: bool,
profile_home: Path | None = None) -> int:
- """Route to the live owner before attempting a CLI transport. Live deliveries
- retain their intent/payload and immutable receipt; only CLI/peer payloads are
- removed after consumption. The CLI turn window holds the profile lock, so two
- deliveries into one profile queue; a bounded wait ends in a 'target_busy' refusal.
-
- Local (query-file) turns get one policy-gated retry (#93091 item 5): transient failures re-run the same
- session; a context_overflow re-run lets the retried turn's pre-API compaction pass compact the Bot Chat
- transcript first (agent/conversation_loop.py) — the sanctioned compression lever; no fresh session is
- ever minted. Auth/quota/config failures never retry. Peer transports (stdin mode) retry on their own
- gateway's deliver path, not here.
+ """Admit local DMs only through the profile authority; retain uncertain intent.
+
+ The optional peer stdin transport remains an explicit remote route, never a
+ fallback after local admission. Background processes wait for delivery only.
"""
# The live consumer owns turn admission; never compete for its CLI lease.
if not stdin_file:
diff --git a/tui_gateway/methods_bot_relay.py b/tui_gateway/methods_bot_relay.py
index 434a23408e1..68ae0b1b401 100644
--- a/tui_gateway/methods_bot_relay.py
+++ b/tui_gateway/methods_bot_relay.py
@@ -21,9 +21,8 @@ def _relay_root() -> Path:
return home.parent.parent if home.parent.name == "profiles" else home
-# Per-attempt turn timeout and attempt ceiling for bot_relay.deliver. The Desktop client mirrors
-# both (apps/desktop/src/plugins/hermes-bots/relay.ts: RELAY_TURN_ATTEMPT_MS / RELAY_TURN_MAX_ATTEMPTS)
-# and its relay-deliver-budget test reads these two lines, so a change here must be deliberate (#93911).
+# Historical Desktop deadline mirrors; no subprocess retry is performed here.
+# Remove with the renderer relay deadline/receipt migration.
TURN_ATTEMPT_TIMEOUT_SECONDS = 600
TURN_MAX_ATTEMPTS = 2 # first attempt + the policy-gated re-run