Repository navigation
feat(client): collect device signals with security-kit (1.3.0) - #8
Merged
Merged
Conversation
security-kit is a dev dependency bundled into dist, so the SDK keeps zero runtime dependencies. The DeviceInput contract is unchanged and existing device ids are kept. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5Py9guKQFcFPmdme7bRjo
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5Py9guKQFcFPmdme7bRjo
Contributor
Author
|
CI is red at Fix needs the owner: make security-kit public like the other kits (its LICENSE is all rights reserved, same as theirs), or publish it to GitHub Packages and give this repo read access. After either, re-run this check. Generated by Claude Code |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5Py9guKQFcFPmdme7bRjo
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.
Requested by Himanshu · project thread
What and why
Before: the SDK had its own device-signal code in
src/graphql/device.ts, and it sent the full user agent and about a dozen raw browser values asinfo.After: the signals come from
@mgpl-diagnostics/security-kit/browser, the shared kit for both sides.infois now security-kit's coarse device info (os,browser, majorbrowserVersion,mobile,language,timezone,screen, plusextraInfo), and the fingerprint leaves out the browser version, so updates don't change it.DeviceInput { deviceId, fingerprint, clientSessionId, info }, so the api needs no change.mgpl.deviceId,mgpl.tabId), and ids created by 1.2.0 are kept.dist(noExternal), and the public types don't import it. The newsignalsoption takes a security-kit collector structurally, so an app can share one collector withsignalFetch/useDeviceSignals.How: the dev dependency is the published
@mgpl-diagnostics/security-kit@^0.2.0from GitHub Packages.Type
Checklist
main)npm run typecheckpassesnpm run buildpasses;dist/imports nothing from security-kit (checked)🤖 Generated with Claude Code
https://claude.ai/code/session_01L5Py9guKQFcFPmdme7bRjo