Scan your whole stack
Are you using @trainheroic-unofficial/dto?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v4.3.2
@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.
| Version | Published | Status |
|---|---|---|
| 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 |
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.
The publisher’s own README, as collected from the registry.
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.
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.
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).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.responses module holds the tolerant schemas the SDK uses to sanity-check an API
response before trusting it; these schemas accept unknown fields.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 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.
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).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.