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

@one2x/mcap-ssot

v0.1.4

Published

Generated MCAP SSOT contract for TypeScript consumers (Model / Cap / Variable enums + per-modality model groupings).

Downloads

795

Readme

@one2x/mcap-ssot

TypeScript bindings for the MCAP SSOT — model ids, cap keys, and request/response variable names. Generated from config/ssot/*.yaml in the mcap repository and published from CI on every SSOT regen.

Previously published as the unscoped mcap-ssot (last release 0.4.2). The scoped @one2x/mcap-ssot line restarts at 0.0.1.

Why

Three downstream Rust / TypeScript / Python projects hard-code MCAP identifiers (model wire ids, cap keys, JSON field names). Without a shared source they drift; a typo on Lark or a SKU rename breaks every consumer until each one is patched by hand.

This package is the TypeScript half of the answer. It re-exports the same identifiers MCAP's Rust Model, Spec and cap registry already use, so any rename in SSOT becomes a TS compile error in every consumer that imports the constant.

Usage

import {
  Cap,
  Model,
  RequestVar,
  VIDEO_MODELS,
} from "@one2x/mcap-ssot"

// Cap key as the harness task `kind`:
batchTasks.push({
  kind: Cap.PromptToImage,        // "prompt_to_image"
  payload: {
    model: Model.Sora_2_2025_12_08, // "sora_2_2025_12_08"
    [RequestVar.PROMPT]: "a cat",
    [RequestVar.ASPECT_RATIO]: "16:9",
  },
})

// Or as a zod allowlist for a tool's input schema:
import { z } from "zod"

const inputSchema = z.object({
  model: z.enum(VIDEO_MODELS).optional(),
})

What's exported

  • Cap — every capabilities.yaml row's key, indexed by PascalCase identifier.

  • Model — every functions.yaml row's wire id, indexed by the SSOT enum-variant name (matches Rust Model::*).

  • IMAGE_MODELS / VIDEO_MODELS / MUSIC_MODELS / TTS_MODELS / ASR_MODELS / CHAT_MODELS — model id tuples grouped by primary response modality, for use with z.enum(...).

  • RequestVar — request-side variables, indexed by SSOT rust_const; values are wire-level JSON keys.

  • ResponseVar — same shape, response side.

  • RequestVarTypes / TaskPayload — the local TS type of every request variable, keyed by wire key (projection of config/spec_types.yaml, identical to MCAP's Rust binding table). Build payloads against TaskPayload and a shape MCAP would reject becomes a TS compile error instead of a runtime failure:

    import type { TaskPayload } from "@one2x/mcap-ssot"
    
    const payload: TaskPayload = {
      model: Model.KlingV3Pro,
      prompt: "a cat",
      input_reference_images: [{ url: "https://cdn/ref.png" }], // ReferenceImage[]
      // input_reference_images: ["https://cdn/ref.png"],       // ← TS error, by design
    }
  • Payload interfaces — ReferenceImage (strictly { url }; bare url strings are rejected server-side), MultiPromptItem, Dimensions, ChatMessage family, ChatTool, JsonValue.

Regenerating

From the mcap repository root:

npm --prefix packages/mcap-ssot run generate   # rewrite src/*.ts from yaml
npm --prefix packages/mcap-ssot run build      # tsc -> dist/

Both run automatically on npm publish via prepublishOnly.