TPSentinel LogoTPSentinel

Quickstart

Start a Sentinel session with the headless core SDK

Quickstart

This quickstart uses @testpress/sentinel-core only.

Install

npm install @testpress/sentinel-core

Initialize Sentinel

import { TPSentinel } from '@testpress/sentinel-core'

const sentinel = TPSentinel.create({
  orgCode: 'your-org',
  sessionId: 'session-id',
  token: 'session-token',
})

Prepare and start Sentinel

const unsubscribe = sentinel.onStateChanged(state => {
  console.log('Sentinel state:', state)
})

try {
  await sentinel.prepare()
  await sentinel.start()
} catch (error) {
  console.error('Sentinel failed:', error)
}

sentinel.prepare() performs setup and can pause in the awaiting_user_action state when your application needs to collect input. Once Sentinel reaches ready, sentinel.start() begins active proctoring.

When you no longer need the state listener, unsubscribe it:

unsubscribe()

What this package gives you

@testpress/sentinel-core provides:

  • the setup flow
  • the runtime proctoring engine
  • the public event surface
  • browser-side policy-driven monitoring

It does not render any UI. If you want the default candidate-facing UI, continue to Adding UI.

On this page