Skip to content

fix(sdk): correct blocked-message docs to match the API (blockedReason is operator-only)#50

Open
tuyakhov wants to merge 1 commit into
mainfrom
claude/amazing-bardeen-5gkdih
Open

fix(sdk): correct blocked-message docs to match the API (blockedReason is operator-only)#50
tuyakhov wants to merge 1 commit into
mainfrom
claude/amazing-bardeen-5gkdih

Conversation

@tuyakhov

Copy link
Copy Markdown
Contributor

Why

Review of senderkit-app changes merged to main since the last SDK sync
(v0.10.0, which added the blocked status from app PR #196). One merged app PR
directly 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.get projection
(messageColumns) deliberately omits blockedReason — the customer-facing
timeline instead carries only a generic block entry:
"Blocked by automated content safety checks." The detailed reason lives in the
operator-only admin abuse review.

The previous SDK release (0.10.0) advertised a Message.blockedReason field
documented 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

  • Message type: remove the never-populated blockedReason field. Reads
    still surface any extra server fields via the existing [key: string]: unknown index signature, so this only drops a misleading declaration — no
    field the API actually sent.
  • Message.status / MESSAGE_STATUSES docs: stop pointing at
    blockedReason; describe the generic, customer-facing block reason instead.
    This also covers the MCP/CLI surface, which is built on the same manifest.
  • Added a patch changeset.

Not SDK-relevant (reviewed, no action)

Other app PRs merged since the last run do not affect the SDK/CLI/MCP
contract:

  • Abuse scanner refinements (#198 LLM-alone block threshold, #199/#201
    refactors, #202/#205 operator-alert email hardening, #206 loopback/private-IP
    false-positive fix): internal behavior; the blocked status already shipped.
  • Logs "load older history" + shared cursor codec (#203): the pagination
    cursor format (base64url of {createdAt, id}) is unchanged — purely an
    internal/UI refactor over the existing cursor/nextCursor API the SDK
    already supports.
  • Billing / pricing (Starter plan, capped Pro, template-cap copy, managed-SES
    shared-sender cap retune in #200): plans/limits aren't modeled by the SDK; the
    send error contract is unchanged.
  • Onboarding & admin UI (#207, #208, #209): dashboard-only.
  • Agent-driven Supabase wiring (MCP) spec+plan (#210): docs/spec only, no
    implementation to mirror yet — worth tracking for a future MCP change.

Verification

pnpm --filter @senderkit/sdk typecheck + build + tests (58) green; CLI tests
(80) green.

🤖 Generated with Claude Code

https://claude.ai/code/session_01U4xKXphsKiGp6AHvd7tzUf


Generated by Claude Code

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants