Skip to content
ContractSpec
Start here

Package manual · platform

·Integrations and provider selection

module.provider-ranking

AI provider ranking module with persistence and pipeline orchestration

platformmodulev2.0.5experimentalservernode
@lssm-tech/module.provider-ranking
bun add @lssm-tech/module.provider-ranking
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Website: https://contractspec.io

Provider-ranking module that adds persistence adapters and pipeline orchestration on top of lower-level ranking logic.

What It Provides

  • Coordinates ingest, storage, scoring, and ranking refresh flows over provider benchmark data.
  • Exposes entities, pipelines, and storage interfaces for ranking-aware applications.
  • Sits between ranking libraries and deployable MCP or application shells.
  • src/pipeline/ contains pipeline stages and orchestration helpers.

Installation

npm install @lssm-tech/module.provider-ranking

or

bun add @lssm-tech/module.provider-ranking

Usage

Import the root entrypoint from @lssm-tech/module.provider-ranking, or choose a documented subpath when you only need one part of the package surface.

Architecture

  • src/entities/ defines ranking-related domain shapes.
  • src/pipeline/ contains ingestion and ranking orchestration stages.
  • src/storage/ contains persistence-facing interfaces and implementations.
  • src/index.ts exposes the composed module surface.

Public Entry Points

  • Exports entities, pipeline helpers, named pipeline entrypoints, and storage surfaces.
  • Export . resolves through ./src/index.ts.
  • Export ./entities resolves through ./src/entities/index.ts.
  • Export ./pipeline resolves through ./src/pipeline/index.ts.
  • Export ./pipeline/ingestion-pipeline resolves through ./src/pipeline/ingestion-pipeline.ts.
  • Export ./pipeline/ranking-pipeline resolves through ./src/pipeline/ranking-pipeline.ts.
  • Export ./storage resolves through ./src/storage/index.ts.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run lint — bun lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.
  • Resolve lint, build, and type errors across nine packages.
  • Add Composio universal fallback, fix provider-ranking types, and expand package exports.
  • Add first-class transport, auth, versioning, and BYOK support across all integrations.
  • Add AI provider ranking system with ranking-driven model selection.

Notes

  • Depends on lib.provider-ranking for scoring logic and ingesters -- this module adds persistence and orchestration.
  • Pipeline stages must be idempotent; re-ingesting the same benchmark data should not create duplicates.
  • Storage adapters are swappable -- always code against the interface, not the implementation.

MCP registries

@lssm-tech/module.provider-ranking/mcp owns the provider-ranking MCP surface shared by the provider-ranking-mcp app and the docs-site handler in bundle.library: createProviderRankingMcpRegistries({ store, ingesterRegistry? }) returns the operation registry (benchmark.ingest, benchmark.runCustom, ranking.refresh), the ranking:// resources (leaderboard and per-dimension leaderboard with optional transport/authMethod filters, model profile with lib.ai-providers enrichment, raw results) and the ranking.advisor prompt. store may be a resolver called per request. Hosts own the MCP server or HTTP handler, logging and the store lifetime. The handlers keep the command output shapes (ingestedAt, status) and do not route through IngestionPipeline / RankingPipeline, which return different shapes, record ingestion runs and report ingest failures as results rather than errors.

Relationships

THIS PACKAGEmodule.provider-ranking8 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

8 declarations

Declared capabilities

Module Provider Ranking

AI provider ranking module with persistence and pipeline orchestration

Scripts

  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • devcontractspec-bun-build dev
  • cleanrimraf dist .turbo
  • lintbun lint:fix
  • lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
  • lint:checknode ../../../../scripts/biome.cjs check .
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit