dm: emit thread_uuid on the SENT and VERIFIED line

dm_send already knows the thread UUID at send time (alias resolution, nav URL capture, autoprovision capture) but dropped it: the only stdout channel the board parses carried no thread info, so every auto-logged DM row had thread_uuid null.

Now prints '... SENT and VERIFIED thread=<uuid>' when known, unchanged line otherwise (main-chat sends, UUID-capture failures stay honestly null -- never fabricated). Backward compatible: board _BOX_DM_SENT_RE has no end anchor; bl consumers (job-dispatch.py, siphon-bl.py) use substring matching.

Worktree note: unrelated uncommitted changes remain (job_id followup-correlation hunks in this file, followup-sweeper.py, response-harvester.py, untracked helpers) -- not mine, not staged.

Session: sidechat/box-dms-ui
This commit is contained in:
op-thread-uuid
2026-10-04 17:44:33 +00:00
parent 33a0f295b6
commit ae4f2640ad
+6
View File
@@ -466,6 +466,12 @@ def dm_send(agent, target, message, verify=True, raw=False,
if nudge_meta: if nudge_meta:
_sent["nudge_meta"] = nudge_meta _sent["nudge_meta"] = nudge_meta
log_event(_sent) log_event(_sent)
# Thread UUID on the verification line: the board server's
# _box_dm_send_run parses it into the auto-logged DM row.
# Stays None for main-chat sends and UUID-capture failures.
if thread_uuid:
print(f"DM {msg_id} from {agent} to {recipient}/{target}: SENT and VERIFIED thread={thread_uuid}")
else:
print(f"DM {msg_id} from {agent} to {recipient}/{target}: SENT and VERIFIED") print(f"DM {msg_id} from {agent} to {recipient}/{target}: SENT and VERIFIED")
# Follow-up record creation: if tags request tracking, POST to the # Follow-up record creation: if tags request tracking, POST to the
# VM's /api/box/followups endpoint. Fail gracefully -- the DM already # VM's /api/box/followups endpoint. Fail gracefully -- the DM already