Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@trainheroic-unofficial/dto

Latest version: v4.3.2

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: alanripple
4 Stars
2 Forks
18 Versions
848 Downloads
TypeScript Repo language

Scan summary

@trainheroic-unofficial/dto was last scanned on 29 Nov 2026 at version 4.3.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 18 versions; the latest was published on 29 Nov 2026.
  • Findings: No rules fired in version 4.3.2.
  • Downloads: 848 downloads.

Versions

18 versions published
Versions and the rules that fired in each
VersionPublishedStatus
4.3.2 LATEST 29 Nov 2026 No rules fired
4.3.1 20 Nov 2026 No rules fired
4.2.0 29 Oct 2026 No rules fired
4.1.1 13 Oct 2026 Not shown
4.1.0 9 Oct 2026 Not shown

No rules fired in 4.3.2

Findings

Findings for v4.3.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 4.3.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@trainheroic-unofficial/dto

Domain DTOs and zod schemas for the TrainHeroic API. This package is the single source of truth for request and response shapes. The SDK, the MCP tool layer, and the CLI all import their types from here.

Part of the trainheroic-unofficial workspace.

Contents

  • Install
  • What's inside
  • Develop

Install

Published to npm as a single ESM entry with type declarations; other packages in this workspace depend on it via workspace:*. You can install it on its own:

npm install @trainheroic-unofficial/dto

It depends on zod (v4), pulled in automatically as a dependency. Each schema travels with its inferred type, so you validate and type from one import. .parse() throws a ZodError on bad data; use .safeParse() if you want a result object instead.

import { workoutSpecSchema, type WorkoutSpec } from "@trainheroic-unofficial/dto";

// `input` is untrusted data (e.g. a parsed JSON file or request body).
const spec: WorkoutSpec = workoutSpecSchema.parse(input);

It imports no node:* and touches no filesystem, so it runs in Node, browsers, and Cloudflare workerd.

What's inside

Schemas come in two flavors. Input schemas are strict enough to validate user-supplied data such as workout specs, exercise-create bodies, and message drafts. Response schemas are deliberately tolerant: they use loose objects and accept a number or a numeric string for ids, so upstream API drift adds fields without breaking parsing.

src/ is organized by domain (common, exercise, workout, messaging, responses), re-exported through index.ts. The central pieces:

  • idSchema normalizes the API's number-or-string ids.
  • workoutSpecSchema / WorkoutSpec is the input you hand to the SDK's workout encoder (the code in js that turns a spec into TrainHeroic's payload): an optional top-level instruction plus an array of blocks, where each block carries an exercises array and each exercise references an exercise-library id. blockSpecSchema and exerciseSpecSchema are its parts; leaderboardSpecSchema covers Red Zone leaderboards (TrainHeroic's competitive block type, where athletes are ranked on a score).
  • The read-back types (ReadResult, ReadBlock, ReadExercise) describe a session decoded back out of the API into a readable shape, and Advisory carries the unit notes and warnings the encoder emits. Workout input requires primaryUnit for populated reps and secondaryUnit for populated weight; the builder maps each unit to a TrainHeroic param type, using the exercise's library default when it already has that unit.
  • The responses module holds the tolerant schemas the SDK uses to sanity-check an API response before trusting it; these schemas accept unknown fields.

Develop

Run pnpm install once at the repo root (Node >= 24, pnpm 11), then from this package:

pnpm build       # tsdown -> dist (ESM + .d.mts)
pnpm typecheck
pnpm test                                  # vitest
pnpm exec vitest run test/workout.test.ts  # one file

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @trainheroic-unofficial/dto

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229