Skip to content
ContractSpec
Start here

Package manual · examples

·Examples and implementation patterns

example.companyos-communicationos-operating-cockpit

Deterministic combined CompanyOS and CommunicationOS operating cockpit example for governed conversation-to-work loops.

examplesexamplev2.0.6experimentalservernode
@lssm-tech/example.companyos-communicationos-operating-cockpit
bun add @lssm-tech/example.companyos-communicationos-operating-cockpit
Package source ↗Manifest ↗

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

Package guide

Deterministic combined example that turns CommunicationOS thread/action evidence into a CompanyOS work execution plan, runs it through policy-gated dry-run execution, and feeds the result back into a CommunicationOS audit/action state.

Boundaries

  • Provider-free by default: no network I/O, credentials, outbound messages, deployments, or production actions.
  • Imports reusable modules/libs only; it does not import other examples.
  • Package-local src/contracts describe proof fixtures for this example, not canonical reusable cross-OS contracts.
  • CompanyOS execution uses deterministic module adapters from @lssm-tech/module.companyos.
  • Message-originated commands enter the CommunicationOS command inbox as evidence only; production sends and CompanyOS high-impact bypass attempts are blocked before execution.

Rich cockpit proof

  • The UI exports an app-like TemplateShell cockpit from @lssm-tech/lib.example-shared-ui/TemplateShell with ten named screens: home, dashboard, CommunicationOS inbox, thread detail, evidence map, CompanyOS work graph, policy gate, dry-run console, audit feedback, and starter-kit guide.
  • The start/home and dashboard screens introduce the cross-OS story, deterministic safety boundaries, metrics, production-readiness checks, command lanes, operator notes, and quick actions before the deeper workflow screens.
  • Sidebar navigation, thread selection, evidence drill-down, workflow-stage inspection, policy approval, dry-run execution, audit viewing, operator notes, and reset are backed by a pure reducer so the preview is interactive without providers or side effects.
  • Selecting a CommunicationOS thread advances deterministic state into CompanyOS work mapping; running the dry-run advances the proof into CommunicationOS audit feedback without outbound effects.
  • Reusable starter-kit proof imports CompanyOS and CommunicationOS UI/runtime surfaces from @lssm-tech/module.companyos and @lssm-tech/module.communication-os; scenario copy and fixtures remain package-local.
  • The proof summary includes commandInboxStatus: blocked and companyOsBridgeStatus: blocked so release evidence catches any accidental execution bypass.

Public integration surfaces

Import the package-native cockpit UI from @lssm-tech/example.companyos-communicationos-operating-cockpit/ui when a host wants the combined proof without depending on another example package. The ./ui subpath exports:

  • OperatingCockpitPreview for the deterministic app-like cockpit.
  • OperatingCockpitScreen, OPERATING_COCKPIT_SCREEN_HREFS, and operatingCockpitNavigation for host routing, docs anchors, and preview catalogs.
  • createInitialOperatingCockpitState, reduceOperatingCockpitState, serializeOperatingCockpitState, parseOperatingCockpitState, and createInMemoryOperatingCockpitPersistence for host-owned state snapshots. The example never writes to browser storage, disk, or a backend by itself; hosts provide persistence adapters explicitly.
  • OriginChip, OriginChipProps, and COCKPIT_ORIGIN_KINDS for rendering source-origin context from CompanyOS action-origin types while falling back safely for unknown kinds.

Public discovery is integrated through @lssm-tech/module.examples: registry entries point at this package's ./docs, feature entrypoint, sandbox link, LLMS guide, and package-native ./ui preview. Regenerate the example registry after changing these exports or discovery fields.

Commands

bash
bun run --cwd examples/companyos-communicationos-operating-cockpit test
bun run --cwd examples/companyos-communicationos-operating-cockpit typecheck
bun run --cwd examples/companyos-communicationos-operating-cockpit build
bun run --cwd examples/companyos-communicationos-operating-cockpit lint:check
bun run --cwd examples/registry generate:registry
bun test packages/bundles/marketing/src/components/templates/template-catalog.test.ts packages/bundles/marketing/src/components/templates/template-preview.test.ts

VoiceOps operating cockpit story

The cockpit fixture now starts from the Rivage Retail voice escalation: CommunicationOS holds the redacted voice evidence, CompanyOS drafts an internal security-documentation product gap, and customer-facing promises/security claims remain blocked. The dry-run remains deterministic and side-effect free while surfacing the same receipt/proof language as the VoiceOps workbench.

Roadmap: UI/UX refresh

The example is still intentionally thin around @lssm-tech/bundle.managed-companyos cockpit templates. The next refresh should make the cockpit feel like a proper operator product surface while keeping the package deterministic and provider-free:

  • Implement the reusable UI work in packages/bundles/managed-companyos/src/ui/cockpit/templates/operating-cockpit, then let this example provide fixtures and proof coverage.
  • Upgrade the home/dashboard into an operator-grade command center with loop state, selected thread, policy, dry-run, audit, contact identity, and evidence context.
  • Add richer CommunicationOS inbox/thread/contact affordances inspired by the messaging workspace: searchable conversations, contact-to-conversation navigation, detail drawers, edit/delete actions, and evidence-aware actions.
  • Keep provider adapters host-owned; the example must remain no-network, no-credential, no-send, and no-production-action by default.

Declaration publication uses contractspec-bun-build types through build:types; build runs bundle and declaration generation. The build config preserves declared exports and excludes test-only files from generated build artifacts. Package tests and typecheck remain separate verification gates.

Full build regenerates JavaScript and declarations in one output transaction, restoring previous dist if either stage fails. Standalone build:bundle still preserves declarations; use full build to reconcile obsolete output layouts.

Relationships

THIS PACKAGEexample.companyos-communicationos-operating-cockpit9 import paths

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

10 declarations

Declared capabilities

This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.

Scripts

  • buildcontractspec-bun-build build
  • typechecktsgo --noEmit
  • testbun test
  • smokebun test src/example.smoke.test.ts
  • lint:checknode ../../scripts/biome.cjs check .
  • lintbun lint:fix
  • lint:fixnode ../../scripts/biome.cjs check --write .
  • preflightbun run build && bun run typecheck && bun run test && bun run smoke
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types