fix(sdk): correct blocked-message docs to match the API (blockedReason is operator-only)#50
Open
tuyakhov wants to merge 1 commit into
Open
fix(sdk): correct blocked-message docs to match the API (blockedReason is operator-only)#50tuyakhov wants to merge 1 commit into
tuyakhov wants to merge 1 commit into
Conversation
senderkit-app PR #211 codified that the outbound abuse scanner's detailed detection breakdown is operator-only and never returned by the REST API. The messages.list / messages.get projection (and the MCP tools built on it) omit blockedReason; a blocked message's customer-facing timeline carries only a generic "Blocked by automated content safety checks." entry. The previous release (0.10.0) advertised a Message.blockedReason field that the API never populated. Remove it and update the Message.status / MESSAGE_STATUSES docs to describe the generic, customer-facing block reason instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U4xKXphsKiGp6AHvd7tzUf
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.
Why
Review of
senderkit-appchanges merged tomainsince the last SDK sync(v0.10.0, which added the
blockedstatus from app PR #196). One merged app PRdirectly affects the SDK/MCP surface:
senderkit-app #211 — "keep spam-detection detail out of customer-visible surfaces"
The outbound abuse scanner's detailed detection breakdown (which heuristic/LLM
verdict fired, scan mode, reason) is operator-only and is never returned
by the REST API. The
messages.list/messages.getprojection(
messageColumns) deliberately omitsblockedReason— the customer-facingtimelineinstead carries only a generic block entry:"Blocked by automated content safety checks."The detailed reason lives in theoperator-only admin abuse review.
The previous SDK release (0.10.0) advertised a
Message.blockedReasonfielddocumented as carrying the "human-readable trigger." That field was never
populated by the API — this corrects the type and docs to match real
behavior.
What changed
Messagetype: remove the never-populatedblockedReasonfield. Readsstill surface any extra server fields via the existing
[key: string]: unknownindex signature, so this only drops a misleading declaration — nofield the API actually sent.
Message.status/MESSAGE_STATUSESdocs: stop pointing atblockedReason; describe the generic, customer-facing block reason instead.This also covers the MCP/CLI surface, which is built on the same manifest.
Not SDK-relevant (reviewed, no action)
Other app PRs merged since the last run do not affect the SDK/CLI/MCP
contract:
refactors, #202/#205 operator-alert email hardening, #206 loopback/private-IP
false-positive fix): internal behavior; the
blockedstatus already shipped.cursor format (base64url of
{createdAt, id}) is unchanged — purely aninternal/UI refactor over the existing
cursor/nextCursorAPI the SDKalready supports.
shared-sender cap retune in #200): plans/limits aren't modeled by the SDK; the
send error contract is unchanged.
implementation to mirror yet — worth tracking for a future MCP change.
Verification
pnpm --filter @senderkit/sdktypecheck + build + tests (58) green; CLI tests(80) green.
🤖 Generated with Claude Code
https://claude.ai/code/session_01U4xKXphsKiGp6AHvd7tzUf
Generated by Claude Code