npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

sentinel-js-sdk

v1.0.0-beta.5

Published

Sentinel JS SDK for proctoring setup, consent, and device checks.

Downloads

9

Readme

Sentinel SDK

AI-driven proctoring solution, built with React, TypeScript, and Vite, that ensures integrity and authenticity for online exams, certification courses, and other proctoring-related activities.

Tests


Installation

Install the package using npm or yarn:

# Using npm
npm install sentinel-js-sdk

# Using yarn
yarn add sentinel-js-sdk

# Using pnpm
pnpm add sentinel-js-sdk

Getting Started

Prerequisites

Make sure you have Node.js and yarn (or npm/pnpm) installed on your machine.

Usage

1. Initialize SDK

// Get SDK instance
const sdk = TPSentinelSDK.getInstance();

// Initialize with your organization code
sdk.initialize('your-org-code-here');

3. Start Proctoring

// Start a proctoring session with default policies
const proctor = await sdk.startProctor('session-123', 'session-token-abc');

// Or with custom policy overrides
const proctor = await sdk.startProctor('session-123', 'session-token-abc', {
  enableSnapshot: true,
  snapshotInterval: 30,
  snapshotResolution: '720p',
  anomalyDetectionTypes: ['multi_face', 'no_face', 'tab_switching', 'browser_minimize'],
  recordingEnabled: true,
  recordingMaxDuration: 3600
});

4. Set Checkpoint

// Set a checkpoint within the session
await proctor.setCheckpoint('checkpoint-1');

// Or with custom policy overrides for the checkpoint
await proctor.setCheckpoint('checkpoint-1', {
  snapshotInterval: 15,
  anomalyDetectionTypes: ['multi_face', 'tab_switching']
});

5. Complete Checkpoint

// Complete a checkpoint
await proctor.completeCheckpoint('checkpoint-1');

6. Capture Custom Events

// Capture custom events
await proctor.capture('user_interaction', { 
    action: 'click', 
    element: 'submit-button' 
});

7. Stop Proctoring

// Stop the proctoring session
await proctor.stop();

API Reference

TPSentinelSDK

getInstance()

Get the singleton instance of the SDK.

initialize(orgCode)

Initialize the SDK with your organization code.

Parameters:

  • orgCode (string): Your organization code

startProctor(sessionId, sessionToken, overridePolicies?)

Start a proctoring session.

Parameters:

  • sessionId (string): Unique session identifier
  • sessionToken (string): Session authentication token
  • overridePolicies (ProctoringPolicies, optional): Policy overrides for the session

Returns: Proctor instance

ProctoringPolicies

Configuration object for proctoring behavior:

interface ProctoringPolicies {
  // Snapshot Settings
  enableSnapshot?: boolean;
  snapshotInterval?: number;        // seconds
  snapshotResolution?: '480p' | '720p' | '1080p';
  
  // Anomaly Detection
  anomalyDetectionTypes?: AnomalyType[];
  enableAnomalyClip?: boolean;
  anomalyClipDuration?: number;     // seconds
  anomalyClipResolution?: '480p' | '720p' | '1080p';
  
  // Recording Settings
  recordingEnabled?: boolean;
  recordingMaxDuration?: number;    // seconds
  recordingResolution?: '480p' | '720p' | '1080p';
  
  // Event tracking
  trackNavigationChanges?: boolean;
  
  // Device & Identity
  deviceCheckEnabled?: boolean;
  idleTimeThreshold?: number;       // seconds
  identityVerificationType?: string;
  identityCheckAttemptLimit?: number;
}

AnomalyType

Available anomaly detection types:

type AnomalyType = 
  | 'multi_face'                    // Multiple faces detected
  | 'no_face'                       // No face detected
  | 'tab_switching'                 // Tab switching detected
  | 'phone_usage'                   // Phone usage detected
  | 'browser_minimize'              // Browser window minimized
  | 'browser_special_key'           // Special keys pressed (F12, Ctrl+Shift+I, etc.)
  | 'browser_permission_revocation' // Camera/microphone permissions revoked
  | 'screen_share'                  // Screen sharing detected
  | 'looking_away';                 // Person looking away from camera

Proctor

setCheckpoint(checkpointId, overridePolicies?)

Set a checkpoint within the session.

Parameters:

  • checkpointId (string): Checkpoint identifier
  • overridePolicies (ProctoringPolicies, optional): Policy overrides for the checkpoint

completeCheckpoint(checkpointId)

Complete a checkpoint.

Parameters:

  • checkpointId (string): Checkpoint identifier to complete

capture(eventName, eventData)

Capture a custom event.

Parameters:

  • eventName (string): Event name
  • eventData (object): Event data

stop()

Stop the proctoring session.

Default Policies

The SDK comes with sensible default policies:

{
  enableSnapshot: true,
  snapshotInterval: 30,
  snapshotResolution: '720p',
  enableAnomalyClip: true,
  anomalyClipDuration: 15,
  anomalyClipResolution: '720p',
  anomalyDetectionTypes: [
    'multi_face',
    'tab_switching',
    'no_face',
    'phone_usage',
    'browser_minimize',
    'browser_special_key',
    'browser_permission_revocation',
    'screen_share',
    'looking_away'
  ],
  deviceCheckEnabled: true,
  identityVerificationType: 'face_and_document',
  identityCheckAttemptLimit: 3,
  idleTimeThreshold: 300,
  trackNavigationChanges: true,
  recordingEnabled: true,
  recordingMaxDuration: 3600,
  recordingResolution: '1080p',
}

License

This project is licensed under the MIT License - see the LICENSE file for details.