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

@mastra/schema-compat

Latest version: v0.0.0-trace-row-cap-20261125114941

Overview

Last scanned
25 Nov 2026
Published
25 Nov 2026
npm package Publisher: abhiaiyer, calcsam, dschau, nikaiyer, rase-, smthomas, tylerbarnes, wardpeet
29,787 Stars
3,132 Forks
304 Versions
15.5M Downloads
TypeScript Repo language

Scan summary

@mastra/schema-compat was last scanned on 25 Nov 2026 at version 0.0.0-trace-row-cap-20261125114941. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 304 versions; the latest 5 were published within 2 days (24 and 25 Nov 2026).
  • Findings: No rules fired in version 0.0.0-trace-row-cap-20261125114941.
  • Downloads: 15,476,490 downloads.

Versions

304 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.0.0-trace-row-cap-20261125114941 LATEST 25 Nov 2026 No rules fired
0.0.0-vault-gh-token-20261125013335 25 Nov 2026 No rules fired
1.4.1 25 Nov 2026 No rules fired
0.0.0-vault-gh-token-20261124202825 24 Nov 2026 Not shown
0.0.0-doctor-native-engine-20261124200957 24 Nov 2026 Not shown

No rules fired in 0.0.0-trace-row-cap-20261125114941

Findings

Findings for v0.0.0-trace-row-cap-20261125114941. 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 0.0.0-trace-row-cap-20261125114941; other versions have their own rules, not their own score.

README

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

@mastra/schema-compat

Schema compatibility utilities that adapt Zod and JSON schemas to the different subsets and formats supported by AI model providers. Mastra uses these layers when tool inputs or structured outputs contain schema features a provider cannot accept directly.

Installation

npm install @mastra/schema-compat

Usage

Apply a provider layer to a Zod schema before passing it to an AI SDK API:

import { applyCompatLayer, OpenAISchemaCompatLayer } from '@mastra/schema-compat';
import { z } from 'zod';

const model = {
  provider: 'openai.chat',
  modelId: 'gpt-5.2',
  supportsStructuredOutputs: true,
};

const schema = z.object({
  name: z.string().email(),
  tags: z.array(z.string()).min(1),
});

const compatibleSchema = applyCompatLayer({
  schema,
  compatLayers: [new OpenAISchemaCompatLayer(model)],
  mode: 'aiSdkSchema',
});

Documentation

The package includes compatibility layers for Anthropic, DeepSeek, Google, Meta, OpenAI, and OpenAI reasoning models. A layer decides whether it applies to the supplied model information, selects the provider's schema target, and rewrites unsupported checks or structures without changing the application's source schema.

applyCompatLayer() chooses the first applicable layer and returns either an AI SDK schema or JSON Schema. convertZodSchemaToAISDKSchema() converts Zod directly, while convertSchemaToZod() converts supported schema inputs back to Zod. Standard Schema helpers are available for extracting schemas, converting them to JSON Schema, and applying OpenAI compatibility transforms to tools.

The package supports both Zod v3 and v4. SchemaCompatLayerV3 and SchemaCompatLayerV4 expose version-specific APIs, while SchemaCompatLayer dispatches based on the schema version. Utilities such as prepareJsonSchemaForOpenAIStrictMode() and ensureAllPropertiesRequired() handle strict structured-output requirements.

Provider layers commonly remove unsupported refinements, convert validation rules into descriptions, normalize nullable and union types, and target JSON Schema 7 or OpenAPI-compatible output as required by the provider.

Changelog

See the package changelog for version history and release notes.

Support

We have an open community Discord. Come and say hello and let us know if you have any questions or need any help getting things running.

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 @mastra/schema-compat

References

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

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Microsoft's Official agent framework Hijacked
AI & VibeSec

BREAKING: Hijacked Releases of Microsoft’s Official agent-framework Steals Azure and CI Credentials

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

Frame 2085668439 (1)
Group 1261154229