Skip to content
ContractSpec
Start here

bundle.library

Composable ContractSpec library bundle for documentation, MCP, and runtime consumers.

bundlesbundlev5.0.8stableserverbun
@lssm-tech/bundle.library
bun add @lssm-tech/bundle.library
Package source ↗Manifest ↗

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

Package guide

Shared library bundle that composes docs, templates, integrations, MCP implementations, and reusable presentation surfaces.

What It Provides

  • Provides the reusable product-facing bundle consumed by API, web, and documentation surfaces.
  • Aggregates docs pages, integration marketplace UI, templates, example showcase pages, and library-side MCP implementations.
  • Includes reusable managed/BYOK credential setup UI for integration manifests and monorepo-aware env alias previews.
  • Acts as the main composition layer between lower-level libraries and app-specific delivery shells.
  • src/presentation/ contains presentation-layer components and renderers.

Installation

npm install @lssm-tech/bundle.library

or

bun add @lssm-tech/bundle.library

Usage

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

Architecture

  • src/application/ contains application services including MCP implementations and cross-surface orchestration.
  • src/components/ contains reusable docs, integrations, legal, shell, and template presentation code.
  • src/components/docs/agents/ contains the canonical public Agent Ecosystem hub and guides for multi-agent execution, self-improvement, durable runtime, self-maintaining APIs, deployment, and production qualification.
  • src/components/docs/examples/ derives showcase links from the discoverable example catalog and leaves preview rendering to the shared @lssm-tech/module.examples/runtime host.
  • src/features/, src.config/, src.infrastructure/, and src.libs/ hold bundle-local composition helpers.
  • src/presentation/ contains feature-specific UI composition exported to consuming apps.
  • src/index.ts is the root public barrel and package entrypoint.

Public Entry Points

  • Large multi-subpath bundle exporting docs, integrations, templates, shell layout, email helpers, and MCP application surfaces.
  • Export . resolves through ./src/index.ts.
  • Export ./application resolves through ./src/application/index.ts.
  • Export ./application/context-storage resolves through ./src/application/context-storage/index.ts.
  • Export ./application/mcp resolves through ./src/application/mcp/index.ts.
  • Export ./application/mcp/cliMcp resolves through ./src/application/mcp/cliMcp.ts.
  • Export ./application/mcp/common resolves through ./src/application/mcp/common.ts.
  • Export ./application/mcp/contractsMcp resolves through ./src/application/mcp/contractsMcp.ts.
  • Export ./application/mcp/contractsMcpResources resolves through ./src/application/mcp/contractsMcpResources.ts.
  • Export ./application/mcp/contractsMcpTools resolves through ./src/application/mcp/contractsMcpTools.ts.
  • Export ./application/mcp/contractsMcpTypes resolves through ./src/application/mcp/contractsMcpTypes.ts.
  • Export ./components/docs/agents exposes the public Agent Ecosystem page components consumed by the website delivery shell.
  • Exports under ./components/docs/{areas,packages,source-guides,source-examples,migration}/* (WEB-01-DOCS) render the converged source docs: the authored guides and /docs/core hub, the 22 areas and their directory, the regenerated package manuals and directory (package-manual-loader verifies the docs-generator hashes and refuses private packages), the example walkthroughs, and the docs-tree redirects.
  • The package publishes many generated export subpaths; treat package.json as the source of truth for the current subpath list and keep public-surface docs aligned when exports change.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run test — bun test
  • bun run lint — bun run 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 — rm -rf dist
  • 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.
  • Package exports.
  • Vnext ai-native.
  • Add latest models and align defaults.
  • Standardize tool naming to underscore notation.
  • Add changesets and apply pending fixes.

Notes

  • This bundle is consumed by multiple apps — breaking export changes cascade widely.
  • MCP server implementations must stay transport-agnostic (the app layer wires the transport).
  • Keep side effects behind explicit adapters; do not perform I/O at import time.

Cross-platform UI documentation and the customer markdown kit now cover translation-bound data-view filters and active chips.

Standalone declaration exports keep their existing public subpath names. The shared builder preserves their original declaration suffix and copies checked source declarations into dist, without overwriting emitted implementation types.

The 355 retained declaration-named implementation aliases select the existing canonical TypeScript module and its compiled JavaScript artifact. Public keys, condition keys and type targets remain unchanged. Eight historical test declarations derive through the existing TypeScript 5 compiler from their canonical test sources without evaluating those tests. Run bun run generate:mcp-test-declarations to regenerate them; prebuild checks that their exact compiler outputs remain current. The owning configuration freezes the reviewed map so source discovery cannot retire compatibility keys. The declaration generator resolves the package's catalog:testing TypeScript 5.9.3 dependency. The existing tsgo typecheck and mandatory TypeScript 7 consumer qualification remain separate gates.

Relationships

THIS PACKAGEbundle.library761 import paths

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

35 declarations

Declared capabilities

Bundle Library

Composable ContractSpec library bundle for documentation, MCP, and runtime consumers.

Scripts

  • cleanrm -rf dist
  • testbun test
  • lintbun run 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 .
  • buildcontractspec-bun-build build
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types
  • publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
  • publish:pkg:canarybun publish:pkg --tag canary
  • generate:mcp-test-declarationsnode scripts/generate-mcp-test-declarations.mjs --write
  • prebuildnode scripts/generate-mcp-test-declarations.mjs --check && contractspec-bun-build prebuild
  • typechecktsgo --noEmit
  • devcontractspec-bun-build dev