Skip to content

feat: flagRiskTerms + detection-settings types (2.31.0) - #38

Merged
safenestdev merged 1 commit into
mainfrom
fix/flag-risk-terms-and-settings-types
Aug 27, 2026
Merged

feat: flagRiskTerms + detection-settings types (2.31.0)#38
safenestdev merged 1 commit into
mainfrom
fix/flag-risk-terms-and-settings-types

Conversation

@safenestdev

Copy link
Copy Markdown
Contributor

Summary

  • Adds flagRiskTerms to detectBullying/detectUnsafe/analyze() and risk_terms to BullyingResult/UnsafeResult, mirroring the already-shipped flagProfanity/profanity pair. Server support has existed since PR #149; the SDK never got it.
  • Adds default_flag_profanity/default_flag_risk_terms to DetectionSettings/UpdateDetectionSettingsInput. Both already round-trip through the untyped requestWithRetry passthrough — this is a types-only fix, no behavior change.

Root cause of a real customer report: a user tried to enable profanity detection via the account-level setting and had no typed way to set it, or confirm it took, through the SDK (which is what the MCP server builds on).

Test plan

  • npm test — 143/143 passing (16 new: tests/flagRiskTerms.test.ts, tests/detectionSettings.test.ts)
  • npx tsc --noEmit clean
  • npm run build clean

…-settings types (2.31.0)

The API added options.flag_risk_terms + default_flag_risk_terms alongside
flag_profanity (PR #149), and default_flag_profanity/default_flag_risk_terms
on GET/PUT /settings/detection, but neither reached the SDK's types or
request-building. A customer trying to turn on profanity/risk-term detection
through DetectionSettings had no typed way to set or verify either default.
@safenestdev
safenestdev merged commit 5e88199 into main Aug 27, 2026
6 checks passed
@safenestdev
safenestdev deleted the fix/flag-risk-terms-and-settings-types branch August 27, 2026 11:10
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.

1 participant