module.company-metrics
Governed CompanyOS metric definitions, deterministic aggregation, collection, alerts, digests, and publications.
@lssm-tech/module.company-metricsbun add @lssm-tech/module.company-metricsManifest declarations describe the current workspace; they do not verify registry publication or runtime execution.
Package guide
CompanyOS-owned, provider-neutral metrics domain. It defines deterministic comparison windows, core templates, source and persistence ports, governed discovery, polling safety, alerts, digests, access grants, immutable publications, and Pactena's scope-bound peer contract.
AI may propose mappings and explain referenced snapshots. It never calculates values, changes approved bindings, or authorizes collection. Raw provider payloads, credentials, prompts, SQL, shell fragments, and direct personal identifiers are outside this package.
The feature is guarded by company-metrics-v1. Consumers must require fresh CompanyOS authority and one of metrics.read_live, metrics.manage, metrics.collect, metrics.publish, metrics.deliver, or metrics.audit.
Browser projection consumers can import companyMetricsMessages from the existing /peer-client subpath (en/fr/es: title, unavailable, provisional, stale, growthNew, configure, evidence, denied). It reuses the canonical display catalogs without importing server governance or persistence. The root export remains compatible.
The /ui subpath is the reusable executive dashboard for hosts and bundles: createCompanyMetricsBrowserClient({ basePath }) is the typed same-origin operation client (credentialed dashboard read; mutations send one idempotency key in the idempotency-key header and body plus a correlation id; 401/403 map to denied, any other failure to unavailable without inferring values), and CompanyMetricsLiveDashboard({ client, locale }) renders the live projection, core-template enablement and governed discovery with en/fr/es copy (companyMetricsLiveMessages). Hosts keep only the route base path.
Relationships
Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.
3 declarations
@lssm-tech/lib.companyos-specworkspace:^
Read the package manual ↗@lssm-tech/lib.design-systemworkspace:^
Read the package manual ↗reactcatalog:
Declared capabilities
Governed CompanyOS metric definitions, deterministic aggregation, collection, alerts, digests, and publications.
Scripts
buildcontractspec-bun-build buildbuild:bundlecontractspec-bun-build transpilebuild:typescontractspec-bun-build typeslint:checknode ../../../../scripts/biome.cjs check .testbun testtypechecktsgo --noEmit