Skip to content
ContractSpec
Start here

Package manual · platform

·Integrations and provider selection

lib.provider-runtime

Builder provider-runtime helpers for routing, context prep, runtime targets, and receipt normalization.

platformlibraryv2.0.4experimentalservernode
@lssm-tech/lib.provider-runtime
bun add @lssm-tech/lib.provider-runtime
Package source ↗Manifest ↗

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

Package guide

Website: https://contractspec.io

Builder provider-runtime helpers for runtime-target normalization, provider registration, routing policy upserts, execution-context preparation, receipt normalization, and comparison records.

What It Provides

  • Runtime-target and external-provider record factories.
  • Routing-policy and execution-context normalization helpers.
  • Managed-first Builder routing-policy bootstrap helpers.
  • Provider-output normalization into receipts, sources, patch proposals, activity records, and mobile review cards.
  • Comparison-run record factories shared by Builder runtime and compatibility integrations.

Public Entry Points

  • . resolves through ./src/index.ts
  • ./ai-improvement exposes AI-improvement provider receipt normalization helpers.

Runtime and credential mode taxonomy

Runtime target modes are limited to managed, local, and hybrid. Credential ownership modes are a separate resolver taxonomy (managed, byok, local, ephemeral, and none) and must not be accepted as runtime target modes. Provider-runtime helpers filter mixed mode arrays and preserve existing runtime defaults instead of coercing credential ownership tokens such as byok into managed runtime execution.

Use redactCredentialResolverPayload before logging resolver payloads that may include credential-looking fields. The helper preserves non-secret taxonomy fields such as runtimeMode while replacing token, secret, API key, authorization, password, credential, and private-key fields with [redacted].

Notes

  • This package is a compatibility surface. Prefer additive evolution.
  • It carries provider/runtime control-plane logic that should remain reusable outside the Builder runtime package.

Provider helpers accept only the supplied workspace fields they read. Normalized output preserves its existing literal shapes and remains structurally assignable to Builder-owned records; the platform never imports Builder workspace/state definitions.

Relationships

THIS PACKAGElib.provider-runtime16 import paths

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

4 declarations

Declared capabilities

Lib Provider Runtime

Builder provider-runtime helpers for routing, context prep, runtime targets, and receipt normalization.

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 .
  • testbun test
  • prebuildcontractspec-bun-build prebuild
  • typechecktsgo --noEmit