@lssm-tech/example.integration-hubexample.integration-hub
Integration Hub example with sync engine and field mappings for ContractSpec
@lssm-tech/example.integration-hubSource, release and verification context
Source snapshot bcc79fcc · Declared package version 5.0.5. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.
See where this package fits.
Follow a declared connection, inspect an import, then open the source guide when you need the detail.
Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.
@lssm-tech/example.integration-hub
Website: https://contractspec.io
Integration Hub example with sync engine and field mappings for ContractSpec.
What This Demonstrates
- Connection management with typed schemas and enums.
- Integration lifecycle (create, configure, sync).
- Sync engine with field mapping and status tracking.
- MCP server example for tool integration.
- Capability and feature definition patterns.
- React UI with a cockpit-style Integration Hub command center, screen navigation, hooks, markdown renderers, and shared ContractSpec tables for connections and sync configs.
- Contract-backed visualizations for integration mix, connection health, and sync-state comparison.
- Client-mode table capabilities including sorting, pagination, column visibility, pinning, resizing, and expanded operational details.
- Event definitions and operation test-specs.
- Managed/BYOK credential setup metadata with monorepo-aware Next and Expo env aliases plus an interactive mode switch in the hub UI.
- Registry-derived provider seeding from
createDefaultIntegrationSpecRegistry()so the preview covers the complete shipped integration catalog, including BYOK-only entries with explicit managed-mode exemption metadata. - Redacted connection credential previews; handlers return secret placeholders instead of raw key material.
- Runtime resolver and governance screens that explain managed/BYOK fallback, policy evidence, and release-review posture.
- Managed/BYOK database mutation examples in
src/setup/database-mutation-examples.tsroute durable writes through the provider-database./governed-mutationhelper only after an owning domain command emitsdomainCommandRef,policyDecisionRef,idempotencyKey,transactionBoundary,expectedWriteSet,auditEventRefs,replayRef, andcorrelationRefevidence; fixtures use redacted refs only and never embed raw database credentials. - Phase 5 DS1/DS4: all UI cards in the catalog use
IntegrationCardSurface(hover elevation + focus ring) andIntegrationHealthDotfrom@lssm-tech/bundle.managed-companyos/ui/integrations. Empty states useEmptyStateIllustrated. The credential setup flow is wrapped inWizardStepper. A dedicated Rich Interactions screen demonstrates every DS1 atom and molecule in one place.
Reusable bundle integration
The example demonstrates the Integration Hub but does not own the reusable Managed CompanyOS production surfaces. Hosts should compose the canonical bundle surfaces directly:
- View-model builders from
@lssm-tech/bundle.managed-companyos/view-models/integration-*. - Templates from
@lssm-tech/bundle.managed-companyos/ui/templates. - Capability atoms and design primitives from
@lssm-tech/bundle.managed-companyos/ui/integrations.
Example UI files should remain demo/adaptation layers over those imports. Do not fork credential, secret, connection, sync, audit, or role-morph logic locally. Managed/BYOK turn-on flows must require an explicit ownership-mode choice and may render only redacted credential references.
Design System Integration (Phase 5 DS1)
The example imports DS1 primitives from the bundle — it does not re-implement them.
| Primitive | Origin | Usage in example |
|---|---|---|
IntegrationCardSurface |
atoms-design bundle |
Provider catalog cards |
IntegrationHealthDot |
atoms-design bundle |
Status dot in catalog + rich-interactions |
EmptyStateIllustrated |
molecules-design bundle |
Catalog empty state, rich-interactions |
LastRunPill |
atoms-design bundle |
Rich interactions showcase |
RotationCountdown |
atoms-design bundle |
Rich interactions showcase |
ScopeChip |
atoms-design bundle |
Rich interactions showcase |
SecurityShieldBadge |
atoms-design bundle |
Rich interactions showcase |
AffinityScoreBar |
atoms-design bundle |
Recommended row demo |
WizardStepper |
molecules-design bundle |
Credential setup preview |
DiffPreviewCard |
molecules-design bundle |
Sync drift banner demo |
Consumers that want to adopt these primitives directly should import from
@lssm-tech/bundle.managed-companyos/ui/integrations — not from this example package.
Running Locally
From examples/integration-hub:
bun run devbun run buildbun run testbun run typecheck
Usage
Use @lssm-tech/example.integration-hub as a reference implementation, or import its exported surfaces into a workspace that composes ContractSpec examples and bundles.
Architecture
src/connectionis part of the package's public or composition surface.src/docs/contains docblocks and documentation-facing exports.src/events.tsis package-level event definitions.src/example.tsis the runnable example entrypoint.src/handlers/contains handlers or demo adapters wired to contract surfaces.src/index.tsis the root public barrel and package entrypoint.src/integrationis part of the package's public or composition surface.src/setupexposes BYOK credential manifests, secret-reference fixtures, and monorepo env aliases.src/ui/IntegrationDashboard.*subpaths expose advanced UI composition pieces for hosts that want to reuse the command-center shell, navigation, screen model, or individual rich screens. The default./ui/IntegrationDashboardexport wraps its command center in the sharedNestedCommandShellfrom@lssm-tech/lib.example-shared-ui; keep local navigation inside that reusable nested-safe shell unless a preview-specific containment guardrail requires otherwise. Prefer./ui/IntegrationDashboardunless custom composition is required.- Production apps should consume bundle Integration Hub view-models/templates directly; this package remains an example adapter and documentation surface.
Public Entry Points
- Export
.resolves through./src/index.ts. - Export
./connectionresolves through./src/connection/index.ts. - Export
./connection/connection.enumresolves through./src/connection/connection.enum.ts. - Export
./connection/connection.operationresolves through./src/connection/connection.operation.ts. - Export
./connection/connection.presentationresolves through./src/connection/connection.presentation.ts. - Export
./connection/connection.schemaresolves through./src/connection/connection.schema.ts. - Export
./docsresolves through./src/docs/index.ts. - Export
./docs/integration-hub.docblockis an alias of./docsand resolves through./src/docs/index.ts. - Export
./eventsresolves through./src/events.ts. - Export
./exampleresolves through./src/example.ts. - Export
./setupresolves through./src/setup/index.ts. - Export
./setup/credential-setupresolves through./src/setup/credential-setup.ts. - The package publishes 52 total export subpaths; keep docs aligned with
package.json.
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 validate— contractspec validate "src/**/*"bun 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 run:mcp— bun tsx src/run-mcp.tsbun run prebuild— contractspec-bun-build prebuild
Recent Updates
- Replace eslint+prettier by biomejs to optimize speed.
- Vnext ai-native.
- Missing contract layers.
- 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 Integration Hub BYOK credential setup metadata and Next/Expo alias previews.
- Seed Integration Hub from the shipped provider registry and expose typed ownership mode plus redacted credential previews through handler flows.
- Upgrade the Integration Hub dashboard into a rich command-center demo with provider catalog, managed/BYOK credential, connection, sync, runtime governance, and assistant screens.
Notes
- Works alongside
@lssm-tech/lib.ai-agent,@lssm-tech/lib.contracts-spec,@lssm-tech/lib.design-system,@lssm-tech/lib.example-shared-ui,@lssm-tech/lib.runtime-sandbox, ...
UI projection imports use existing domain-specific view-model subpaths to avoid loading unrelated server domains through the all-domain barrel.
Declared capabilities.
This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.
Imports and export paths.
58 entriesThese are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.
58 imports · showing 35
@lssm-tech/example.integration-hub/connection@lssm-tech/example.integration-hub/connection/connection.enum@lssm-tech/example.integration-hub/connection/connection.operation@lssm-tech/example.integration-hub/connection/connection.presentation@lssm-tech/example.integration-hub/connection/connection.schema@lssm-tech/example.integration-hub/docs@lssm-tech/example.integration-hub/docs/integration-hub.docblock@lssm-tech/example.integration-hub/events@lssm-tech/example.integration-hub/example@lssm-tech/example.integration-hub/handlers@lssm-tech/example.integration-hub/handlers/integration.handlers@lssm-tech/example.integration-hub/integration@lssm-tech/example.integration-hub/integration-hub.capability@lssm-tech/example.integration-hub/integration-hub.feature@lssm-tech/example.integration-hub/integration/integration.enum@lssm-tech/example.integration-hub/integration/integration.operations@lssm-tech/example.integration-hub/integration/integration.presentation@lssm-tech/example.integration-hub/integration/integration.schema@lssm-tech/example.integration-hub/mcp-example@lssm-tech/example.integration-hub/run-mcp@lssm-tech/example.integration-hub/seeders@lssm-tech/example.integration-hub/setup@lssm-tech/example.integration-hub/setup/credential-setup@lssm-tech/example.integration-hub/setup/database-mutation-examples@lssm-tech/example.integration-hub/sync@lssm-tech/example.integration-hub/sync-engine@lssm-tech/example.integration-hub/sync/sync.enum@lssm-tech/example.integration-hub/sync/sync.operations@lssm-tech/example.integration-hub/sync/sync.presentation@lssm-tech/example.integration-hub/sync/sync.schema@lssm-tech/example.integration-hub/tests/operations.test-spec@lssm-tech/example.integration-hub/ui@lssm-tech/example.integration-hub/ui/hooks@lssm-tech/example.integration-hub/ui/hooks/integration-data-port@lssm-tech/example.integration-hub/ui/hooks/useIntegrationData@lssm-tech/example.integration-hub/ui/IntegrationDashboard@lssm-tech/example.integration-hub/ui/IntegrationDashboard.credential-screen@lssm-tech/example.integration-hub/ui/IntegrationDashboard.model@lssm-tech/example.integration-hub/ui/IntegrationDashboard.nav@lssm-tech/example.integration-hub/ui/IntegrationDashboard.operations@lssm-tech/example.integration-hub/ui/IntegrationDashboard.preview-fixtures@lssm-tech/example.integration-hub/ui/IntegrationDashboard.rich-interactions@lssm-tech/example.integration-hub/ui/IntegrationDashboard.runtime-screen@lssm-tech/example.integration-hub/ui/IntegrationDashboard.screens@lssm-tech/example.integration-hub/ui/IntegrationDashboard.visualizations@lssm-tech/example.integration-hub/ui/IntegrationHubChat@lssm-tech/example.integration-hub/ui/IntegrationHubCredentialSetupPreview@lssm-tech/example.integration-hub/ui/IntegrationHubCredentialSetupPreview.model@lssm-tech/example.integration-hub/ui/renderers@lssm-tech/example.integration-hub/ui/renderers/integration.markdown@lssm-tech/example.integration-hub/ui/tables/ConnectionsTable@lssm-tech/example.integration-hub/ui/tables/integration-table.shared@lssm-tech/example.integration-hub/ui/tables/IntegrationTables@lssm-tech/example.integration-hub/ui/tables/SyncConfigsTable@lssm-tech/example.integration-hub/visualizations@lssm-tech/example.integration-hub/visualizations/catalog@lssm-tech/example.integration-hub/visualizations/selectorsNo export paths match this search.
Dependencies and related packages.
Runtime dependencies 16
- @lssm-tech/bundle.managed-companyos
- workspace:^
- @lssm-tech/lib.ai-agent
- workspace:^
- @lssm-tech/lib.contracts-integrations
- workspace:^
- @lssm-tech/lib.contracts-spec
- workspace:^
- @lssm-tech/lib.crypto-utils
- workspace:^
- @lssm-tech/lib.design-system
- workspace:^
- @lssm-tech/lib.example-shared-ui
- workspace:^
- @lssm-tech/lib.presentation-runtime-core
- workspace:^
- @lssm-tech/lib.presentation-runtime-react
- workspace:^
- @lssm-tech/lib.runtime-sandbox
- workspace:^
- @lssm-tech/lib.schema
- workspace:^
- @lssm-tech/lib.ui-kit-web
- workspace:^
- @lssm-tech/module.ai-chat
- workspace:^
- @lssm-tech/module.integration-hub
- workspace:^
- react
- catalog:
- react-dom
- catalog:
Development dependencies 6
- @lssm-tech/tool.bun
- workspace:*
- @lssm-tech/tool.typescript
- workspace:*
- @types/react
- catalog:types
- @types/react-dom
- catalog:types
- happy-dom
- catalog:testing
- typescript
- catalog:
Package scripts.
Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.
bun publish --tolerate-republish --ignore-scripts --verbosebun publish:pkg --tag canarycontractspec-bun-build buildcontractspec-bun-build transpilecontractspec-bun-build typescontractspec-bun-build devbun tsx src/run-mcp.tsrimraf dist .turbobun lint:fixnode ../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../scripts/biome.cjs check --write .node ../../scripts/biome.cjs check .bun testcontractspec validate "src/**/*"contractspec-bun-build prebuildtsgo --noEmit