
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
@tokenlens/core
Advanced tools

Core types and fast registry utilities for TokenLens. Build canonical model registries with alias resolution and strong typing.
Install
npm i @tokenlens/corepnpm add @tokenlens/coreyarn add @tokenlens/coreExports
createRegistry(models: Model[]) to build a fast provider+model lookup with alias resolution.Model, Provider, Status, Pricing, ContextCaps, usage shapes.Quick Start
import { createRegistry, type Model } from '@tokenlens/core';
const reg = createRegistry([
{
id: 'openai:gpt-4o',
provider: 'openai',
status: 'stable',
context: { combinedMax: 128000 },
source: 'docs',
} satisfies Model,
]);
// Resolve shorthands/aliases to the canonical entry
const m = reg.resolveModel('gpt-4o');
console.log(m?.id); // 'openai:gpt-4o'
See also
@tokenlens/models for a prebuilt models catalog.@tokenlens/helpers for context/cost utilities layered on top.License MIT
FAQs
Core types and registry utilities for TokenLens (model metadata).
The npm package @tokenlens/core receives a total of 418,524 weekly downloads. As such, @tokenlens/core popularity was classified as popular.
We found that @tokenlens/core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.