Skip to content

fix: correct context.platform doc comment, bump to 2.30.1 - #37

Merged
safenestdev merged 1 commit into
mainfrom
fix/platform-doc-comment
Aug 26, 2026
Merged

fix: correct context.platform doc comment, bump to 2.30.1#37
safenestdev merged 1 commit into
mainfrom
fix/platform-doc-comment

Conversation

@safenestdev

Copy link
Copy Markdown
Contributor

Summary

Client report: context.platform's doc comment said "Platform type (e.g. "chat", "social_media", "gaming")" while the SDK actually treats the value as a free-text app/product name and appends its own identifier before sending it (resolvePlatform: "MyApp""MyApp - Node SDK"). An integrator following the doc's examples would send a bare category string instead of an identifiable app name, silently getting the wrong dashboard attribution.

Corrected the doc comment on ContextInput.platform and every other input type carrying the same field (image/video/voice/document/synthetic-content inputs, batch item context, voice-stream config context) to describe the actual behavior.

No runtime behavior change — types and doc comments only. Bumped to 2.30.1 since the corrected JSDoc only reaches consumers through the compiled .d.ts files, which requires a new publish.

Test plan

  • tsc --noEmit clean
  • npm run build clean — verified the corrected doc comment compiles into dist/types/safety.d.ts
  • Full suite: 7 files, 127 tests passing (no behavior touched)

The doc comment described platform as a coarse category ("chat",
"social_media", "gaming") when the SDK actually treats it as a free-text
app name and appends its own identifier before sending it ("MyApp" ->
"MyApp - Node SDK"). A client integration following the old doc's examples
got the wrong dashboard attribution. Corrected on ContextInput and every
other input type with the same platform field.
@safenestdev
safenestdev merged commit 7aaa7fc into main Aug 26, 2026
6 checks passed
@safenestdev
safenestdev deleted the fix/platform-doc-comment branch August 26, 2026 06:22
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