Repository navigation
fix(bot-mode): deliver local DMs into Desktop-owned Bot Chat (#101060) - #101564
FalconOrtiz wants to merge 2 commits into
Conversation
…earch#101060) When the target Bot Chat already holds a desktop/tui lease, the one-shot CLI path was fenced out after message_agent acked sent. Hand the payload to the live owner through a durable runtime queue so the open chat runs the turn, with target_busy only when no owner claims in time. Co-authored-by: fangliquanflq <fangliquan@qq.com> Co-authored-by: 686f6c61 <github@00b.tech> Co-authored-by: Cursor <cursoragent@cursor.com>
|
Thanks for picking this up — this is the right shape (owner-side handoff, complement to #101293's relay fast path) and it's the only open PR that touches the local runner path #101060 needs. I reviewed the diff against the failure modes we hit reproducing #101060 on Windows (three lost replies in one evening on Blocking
Follow-ups
Reproduction harness that this PR should turn green: Forge (open tab) → |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
Addressed grym3s blocking trio on
Focused pytest: 19 passed. Local e2e smoke: |
|
Requesting squash-merge when you are satisfied with re-review. grym3s blocking trio addressed on I do not have merge rights on |
Adapt FalconOrtiz's owner-mailbox proposal from #101564 onto the current notification poller and topical modules. The durable mailbox is cross-process ingress only: the existing owner admits its normal prompt turn after the current turn and human FIFO clear. Retain immutable receipts, stable admission identities, capability and lease fencing, compression lineage, and disable blind recovery replay of imported turns. The original stale server hunks and expiring receipt protocol were rebuilt rather than cherry-picked: the current facade decomposition and durable busy admission contract differ. Credit the earlier owner-mailbox work in #100544 and durable producer work in #100319. Co-authored-by: fangliquanflq <fangliquan@qq.com> Co-authored-by: 686f6c61 <github@00b.tech>
|
Thanks @FalconOrtiz — your owner-mailbox proposal was adapted and landed in #105442, main I am leaving this PR open rather than calling the entire diff superseded: your second commit also retains payloads and typed receipts for failed legacy CLI/peer deliveries. Main preserves that evidence for live-owner ingress, but the legacy |
Adapt FalconOrtiz's owner-mailbox proposal from NousResearch#101564 onto the current notification poller and topical modules. The durable mailbox is cross-process ingress only: the existing owner admits its normal prompt turn after the current turn and human FIFO clear. Retain immutable receipts, stable admission identities, capability and lease fencing, compression lineage, and disable blind recovery replay of imported turns. The original stale server hunks and expiring receipt protocol were rebuilt rather than cherry-picked: the current facade decomposition and durable busy admission contract differ. Credit the earlier owner-mailbox work in NousResearch#100544 and durable producer work in NousResearch#100319. Co-authored-by: fangliquanflq <fangliquan@qq.com> Co-authored-by: 686f6c61 <github@00b.tech>
Why
message_agentbetween local profiles still used a one-shot CLI turn into the canonical Bot Chat. When Desktop already held that session lease, the runner exited 1 after the tool had already returnedstatus: sent, so the DM never appeared and the sender treated dispatch as success. #101293 fixed the Desktop-relay path via in-processprompt.submit; the local CLI path stayed broken (reconfirmed on #101060).Scope
tools/bot_live_delivery.py: durable pending/claim/receipt handoff under the target profile runtime dir.tools/bot_mode_dm.py_run_delivery: when a Desktop/TUI owner holds Bot Chat, deliver through that handoff instead of the fenced CLI; keeptarget_busywhen no owner claims in time.tui_gateway/server.py: idle notification poller claims one pending DM and runs it through_run_prompt_submitwith a terminal receipt; new leases markbot_live_delivery_consumer._run_deliveryhandoff path.Out of scope: changing the async
sentack shape, peer/A2A transports, crondeliver=bot-chat(see #100319).Tradeoffs
Reuses the #100544 live-owner handoff idea in a smaller form rather than inventing a second Desktop-only RPC. Accepts Desktop/TUI surface owners without requiring a prior consumer flag so already-open Bot Chats work after upgrade. CLI owners stay on the existing subprocess path.
Blast Radius
Local Bot Mode teammate DMs when the target Bot Chat is open in Desktop/TUI. Relay deliveries already covered by #101293 stay unchanged. Idle poller adds a cheap filesystem probe per session tick.
Verification
12 passed, exit 0.
Fixes #101060