Repository navigation
feat(messages): post text as Markdown by default - #31
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One-way doors
Approving this PR accepts the choice made for each door below.
slack_post_messageandslack_reply_to_threadtool contract changes. Before,textwent to Slack astext, so Slack read it as mrkdwn. Nowtextdefaults to standard Markdown and goes to Slack asmarkdown_text. A client that still writes mrkdwn such as*bold*or<https://example.com|label>gets a different rendering unless it passesformat: "slack_mrkdwn". I chose Markdown as the default because agents write standard Markdown by habit, and Slack now renders it.Why
Agents write standard Markdown, but Slack read our
textas mrkdwn. Headings,**bold**, and links came out as raw symbols. Slack'smarkdown_textfield renders standard Markdown, so the server now sendstextthere by default.What changed
slack_post_messageandslack_reply_to_threadtake a newformatfield:markdown(default) orslack_mrkdwn.toSlackMessageBodyinsrc/message-body.tsmapsformattomarkdown_textortext.markdown_text, fails schema validation before the API call.Scope
Blast Radius
Every caller of the two posting tools now gets Markdown rendering. Plain text renders the same either way. Text written in mrkdwn renders differently until the caller sets
format: "slack_mrkdwn".Verification
npm test: 20 tests pass, including 4 new ones for the default, the opt-out, the length limit, and the tool input schema.npm run buildandnpm run lintpass.