module.provider-ranking
AI provider ranking module with persistence and pipeline orchestration
@lssm-tech/module.provider-rankingbun add @lssm-tech/module.provider-rankingManifest 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.tsexposes the composed module surface.
Public Entry Points
- Exports entities, pipeline helpers, named pipeline entrypoints, and storage surfaces.
- Export
.resolves through./src/index.ts. - Export
./entitiesresolves through./src/entities/index.ts. - Export
./pipelineresolves through./src/pipeline/index.ts. - Export
./pipeline/ingestion-pipelineresolves through./src/pipeline/ingestion-pipeline.ts. - Export
./pipeline/ranking-pipelineresolves through./src/pipeline/ranking-pipeline.ts. - Export
./storageresolves through./src/storage/index.ts.
Local Commands
bun run dev— contractspec-bun-build devbun run build— contractspec-bun-build buildbun run lint— bun lint:fixbun run lint:check— biome check .bun run lint:fix— biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .bun run typecheck— tsgo --noEmitbun run publish:pkg— bun publish --tolerate-republish --ignore-scripts --verbosebun run publish:pkg:canary— bun publish:pkg --tag canarybun run clean— rimraf dist .turbobun run build:bundle— contractspec-bun-build transpilebun run build:types— contractspec-bun-build typesbun 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-rankingfor 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
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
8 declarations
@lssm-tech/lib.provider-rankingworkspace:^
Read the package manual ↗@lssm-tech/lib.schemaworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-integrationsworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-spec-coreworkspace:^
Read the package manual ↗@lssm-tech/lib.ai-providersworkspace:^
Read the package manual ↗@lssm-tech/lib.contracts-runtime-coreworkspace:^
Read the package manual ↗
Declared capabilities
AI provider ranking module with persistence and pipeline orchestration
Scripts
publish:pkgbun publish --tolerate-republish --ignore-scripts --verbosepublish:pkg:canarybun publish:pkg --tag canarybuildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typesdevcontractspec-bun-build devcleanrimraf dist .turbolintbun lint:fixlint: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 prebuildtypechecktsgo --noEmit