JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28
  • Score
    100M100P100Q93701F
  • License MIT

Shared types, schemas, and model catalog for the Tokenite SDK and CLI. Public protocol surface.

Package Exports

  • @tokenite/shared
  • @tokenite/shared/asset-urls
  • @tokenite/shared/assets
  • @tokenite/shared/catalog
  • @tokenite/shared/providers
  • @tokenite/shared/result
  • @tokenite/shared/schemas/cli-login
  • @tokenite/shared/schemas/discovery

Readme

@tokenite/shared

Public protocol surface for the Tokenite SDK and CLI.

This package contains:

  • Zod schemas + types for the OAuth, app, account, connection, key, budget, usage, and proxy-error surfaces.
  • Provider registry — supported LLM providers (Anthropic, OpenAI, Google, Grok, AWS Bedrock), their key prefix hints, display names, and brand colors.
  • Model catalog — known models per provider with pricing (input / output / cache), context window, and capability tiers.
  • Result types — small Result<T, E> helper used by the SDK error envelope.

You normally don't install this directly — it's a transitive dependency of @tokenite/sdk and @tokenite/cli. Install one of those:

npm install @tokenite/sdk
# or
npm install -g @tokenite/cli

Direct use

If you want to validate an incoming Tokenite proxy response in your own code, or look up pricing for a model:

import {
  proxyResponseSchema,
  isProxyError,
  providerSchema,
  type Provider,
} from '@tokenite/shared';

import { listProviders, tryGetProvider } from '@tokenite/shared/providers';
import { catalog, pricingFor } from '@tokenite/shared/catalog';

const parsed = proxyResponseSchema.parse(unknownInput);
const anthropic = tryGetProvider('anthropic');
const cost = pricingFor('anthropic', 'claude-sonnet-4-6');

License

MIT