Repository navigation
feat(msteams): per-send replyStyle override so cron can post top-level (ENG-14117) - #20
jerhinesmith wants to merge 1 commit into
Conversation
…l (ENG-14117)
Arguijo (Teams) needs scheduled cron runs to post a NEW top-level channel
message while back-and-forth conversations stay threaded. Today everything
threads because channels.msteams.replyStyle resolves to the global "thread"
default (confirmed on host: the Daily Email Summary cron posts via the message
tool / msteams:send proactive path, which inherits the channel's resolved
replyStyle). There is no per-message override, so a global flip to "top-level"
would also break conversational threading.
Add an optional replyStyleOverride that wins over the resolved/global replyStyle
for a single send:
- resolveMSTeamsProactiveReplyStyle({ ..., replyStyleOverride }) returns the
override when set (else unchanged).
- resolveMSTeamsSendContext({ ..., replyStyleOverride }) threads it through.
- sendMessageMSTeams({ ..., replyStyleOverride }) accepts it.
Global default unchanged → conversations stay threaded; opt-in only.
Tests: 3 new send-context cases (top-level override on a thread-default channel;
thread override on a top-level config; undefined override = no change). Full
msteams send/outbound/policy suites green (39); tsc -p tsconfig.extensions.json
clean.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
CI note — The failing step is
|
|
@jerhinesmith @insomnius @convyusboy Is PR #20 helpful? — It was the seed, but it's now superseded and should be closed. PR #20 (jerhinesmith/eng-14117-msteams-replystyle-override, open draft from 2026-06-18) added only the core mechanism and explicitly left the last-mile Both of those follow-ups have since landed on boon as separate merged PRs, making #20's own diff redundant:
So the answer to #20's own open question ("which surface do we want — tool param or cron-delivery field?") was resolved by shipping both. The current boon |
What
Adds an opt-in
replyStyleOverridethat wins over the resolved/global MS TeamsreplyStylefor a single send — so a scheduled cron can post a new top-level channel message while interactive conversations stay threaded. Globalchannels.msteams.replyStyleis unchanged.Threaded through three layers:
resolveMSTeamsProactiveReplyStyle({ …, replyStyleOverride })— returns the override when set, else unchanged.resolveMSTeamsSendContext({ …, replyStyleOverride })— passes it through.sendMessageMSTeams({ …, replyStyleOverride })— accepts it.Why (confirmed with Arief + live host)
Arguijo's surface is Teams (ticket was filed as Slack — corrected). Arief confirmed the goal: "each daily scheduled run posts a new top-level message, conversations stay threaded… boon-agent never posts top-level in teams."
On
boon-agent10-pilot(read-only SSM):channels.msteams.replyStyle: "thread"(global). TheDaily Email Summarycron posts via the message tool /msteams:sendproactive path (confirmed:"name":"msteams:send" "sent proactive message"), which inherits the channel's resolvedreplyStyle→ always threads. A global flip to"top-level"would also break conversational threading (extensions/msteams/src/policy.ts,send-context.ts), so a per-send override is the correct mechanism (mirrors Slack's existingtopLevel).Tests
extensions/msteams/src/send-context.test.ts+3 cases: top-level override on a thread-default channel; thread override on a top-level config; undefined override = no change. Fullsend-context/send/outbound/policysuites green (39).tsc -p tsconfig.extensions.jsonclean (0 errors).This PR implements + tests the core override mechanism but does not yet expose it to the agent. Two follow-ups, deliberately left for review because they cross shared interfaces:
topLevel: true(orreplyStyle) param to the msteamsmessagetool (channel.ts) and map it toreplyStyleOverride. This mirrors Slack'stopLevel. The agent-facing send currently routes through the genericoutbound.sendTextcontract (outbound.ts:142,{cfg,to,text,deps}) which has no style field — extending that shared interface is the cross-cutting part I didn't want to do speculatively.CronDelivery.replyStyle(src/cron/types.ts) → cron delivery dispatch, so it's set on the job rather than per tool-call.Which surface do we want — a
message-tool param (works for any agent-initiated top-level post) or a cron-delivery field (cron-only)? Happy to complete whichever you prefer.Scope / verification caveats
arief-openclaw-testhas Teams live but no top-level cron configured; I can verify once the tool-param/delivery surface is chosen).🤖 Generated with Claude Code
Summary by cubic
Adds a per-send
replyStyleOverrideto MS Teams so scheduled runs can post a new top‑level channel message while interactive conversations stay threaded. Addresses ENG-14117 without changing the globalchannels.msteams.replyStyle.New Features
replyStyleOverridetosendMessageMSTeams, threaded throughresolveMSTeamsSendContextand honored byresolveMSTeamsProactiveReplyStyle."top-level"or"thread"). Omitted = existing behavior.Migration
replyStyleOverride: "top-level"for cron posts.messagetool param (e.g.,topLevel) or a cron delivery field. Please confirm preferred surface.Written for commit 4e47310. Summary will update on new commits.