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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@testgorilla/tgo-ai-interview-test

v9.0.0

Published

AI Interview component

Readme

@testgorilla/tgo-ai-interview-test

AI Interview component for TestGorilla assessments.

Installation

npm install @testgorilla/tgo-ai-interview-test

Usage

import { AiInterviewTestComponent } from '@testgorilla/tgo-ai-interview-test';

@Component({
  imports: [AiInterviewTestComponent],
  template: `
    <tgo-ai-interview-test
      [question]="question"
      [test]="test"
      [isFirstQuestion]="false"
      [conversationUrl]="conversationUrl"
      [selectedMediaDevices]="selectedMediaDevices"
      [mediaAccessChanged]="mediaAccessChanged"
      [behaviorType]="test.behavior_type"
      (submissionStateChanged)="onSubmissionStateChanged($event)"
      (loadingStateChanged)="onLoadingStateChanged($event)"
      (requestMediaAccess)="onRequestMediaAccess()"
      (interviewFailed)="onInterviewFailed($event)"
      (telemetryEvent)="onTelemetryEvent($event)"
    ></tgo-ai-interview-test>
  `,
})
export class MyComponent {}

Assets (translations)

This package ships its translations under assets/i18n. Consumer apps must copy these assets into their build output so Transloco can load them at runtime.

  • Angular CLI / Nx: add an assets entry pointing at the package:
{
  "assets": [
    "src/favicon.ico",
    "src/assets",
    {
      "glob": "**/*",
      "input": "node_modules/@testgorilla/tgo-ai-interview-test/assets",
      "output": "assets/tgo-ai-interview-test"
    }
  ]
}

If you develop inside this repo (consuming the workspace sources), also include the local path:

{
  "glob": "**/*",
  "input": "packages/tgo-ai-interview-test/src/assets",
  "output": "assets/tgo-ai-interview-test"
}

After adding the asset entries, rebuild/re-serve your app so /assets/tgo-ai-interview-test/i18n/en.json is available.

API

Inputs

| Name | Type | Required | Default | Description | | -------------------- | ---------------------------------- | -------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | question | Question | Yes | - | Question data containing text/media content | | test | TestResultRead | Yes | - | Test configuration and metadata | | isFirstQuestion | boolean | No | false | Whether this is the first question in the test | | conversationUrl | string | No | - | Daily.co conversation URL for the AI interview | | selectedMediaDevices | SelectedMediaDevices | No | - | Selected audio/video device IDs | | mediaAccessChanged | Observable<SelectedMediaDevices> | No | - | Observable for media device changes | | behaviorType | string | null | No | - | Raw behavior_type of the test. Pass it straight through from the API — the library decides which values enable the instructions side panel. An unrecognised, null, or absent value renders no panel. |

Outputs

| Name | Type | Description | | ---------------------- | --------------------------------------------- | ---------------------------------------------------------- | | submissionStateChanged | EventEmitter<ISubmissionState | null> | Emits submission state when answer is submitted | | loadingStateChanged | EventEmitter<boolean> | Emits loading state changes | | requestMediaAccess | EventEmitter<void> | Emits when media access permission is needed | | interviewFailed | OutputEmitterRef<AiInterviewFailure> | Emits when the interview cannot run. No submission follows | | telemetryEvent | OutputEmitterRef<AiInterviewTelemetryEvent> | Device and media events for the host to log |

Interview failures

The interview fails instead of submitting when:

  • join() rejects (join_failed) or Daily raises a fatal error (daily_fatal_error), at any point;
  • 20 s after joining, there is no remote participant (no_remote_participant), no playable remote audio (no_remote_tracks) or no live candidate microphone (no_local_tracks). A candidate who muted themselves counts as live;
  • the avatar leaves before media was ever live (avatar_left_early).

The payload carries the phase, time since join, the Daily error type and details.on, the local and remote track states, the conversation and meeting session ids, and the last Daily network state. Log it whole, so failures can be segmented by what a retry could fix. A retry needs a new conversation URL, because each one is single-use.

telemetryEvent emits media_ready with elapsedMsSinceJoin once media is live, which is the data for tuning the 20 s window.

Daily connectivity check

DailyConnectivityService.probe() runs Daily's websocket connectivity test before the interview, for a pre-start gate with a retry. It never joins a room, so the conversation URL is not consumed. It resolves, never rejects, with isReachable (passed or warning), the per-region results and durationMs. It aborts after 15 s by default.

const { isReachable } = await inject(DailyConnectivityService).probe();

Do not run it while an interview is mounted: both share the page's single Daily call instance.

Compatibility

  • 9.0.0: a Daily fatal error, a rejected join, or the avatar leaving before media was live no longer emits submissionStateChanged; it emits interviewFailed. Hosts must handle interviewFailed, or a failed interview leaves the question with no way forward.

Peer Dependencies

This library requires the following peer dependencies:

  • @angular/common >= 21.0.0 < 22.0.0
  • @angular/core >= 21.0.0 < 22.0.0
  • @angular/animations >= 21.0.0 < 22.0.0
  • @angular/platform-browser >= 21.0.0 < 22.0.0
  • @ngneat/transloco >= 4.0.0 < 5.0.0
  • @testgorilla/tgo-ui >= 11.6.0 < 12.0.0
  • @daily-co/daily-js >= 0.85.0 < 1.0.0
  • angular-split >= 20.0.0 < 21.0.0 (resizable instructions side panel)
  • ngx-quill >= 30.0.0 < 31.0.0 (rendering the instructions rich text)
  • rxjs >= 7.0.0 < 8.0.0

Internal Dependencies

All required services, models, and components are included within this library:

  • MediaService - Handles audio/video recording and playback
  • ThemeService - Provides theme/company color configuration
  • Question, TestResultRead, SelectedMediaDevices, ISubmissionState - Type definitions
  • AudioAnimationComponent, VideoCountdownComponent, VimeoVideoComponent - UI components
  • InterviewStreamComponent - Daily.co video call integration component
  • InterviewVideoComponent - Video display component
  • ReviewInstructionsDialogComponent - Dialog component for review instructions
  • TranslocoLazyModuleUtils, getAvailableLangs - Translation utilities

Features

  • AI-powered interview via Daily.co video calls
  • Candidate video recording
  • Real-time video/audio stream handling
  • Media device selection
  • Translation support via Transloco
  • Review instructions dialog
  • Preview mode support