Kumbatio

API Reference

Complete TypeScript API reference for @kumbatio/energy-system - entry points, engine, strategies, runtime, and adapters

@kumbatio/energy-system is a framework-agnostic TypeScript library for energy-aware application behavior.

This section has two halves, and they are kept honest in different ways:

Deliberately no version number is written on this page. The generated reference states the version it was built from, and it is the only place that can state it without going stale.

Requirements

The package is ESM-only ("type": "module") and requires Node.js >=24. It has one optional peer dependency: react >= 19.2 and @types/react >= 19.2, needed only for the /react entry point, which imports <Activity> - added in React 19.2. Earlier React majors throw on first render rather than degrading, which is why the range is a hard floor rather than a recommendation.

Entry points

Import pathContents
@kumbatio/energy-systemCore: engine, types, level definitions, built-in strategies, presence, focus sessions, notification gate, deferral, inbound-demand policy, metrics, external-level compatibility
@kumbatio/energy-system/reactEnergyProvider, hooks, and headless components (EnergyGate, EnergyIndicator)
@kumbatio/energy-system/domDirect DOM projection: applyEnergyLevel, readEnergyLevel, observeEnergyLevel
@kumbatio/energy-system/persistencePersistence adapters: localStoragePersistence, memoryPersistence
@kumbatio/energy-system/cssReference stylesheet (energy.css) implementing the UI visibility strategy in pure CSS

Three more subpaths are published as data rather than code, and exist so that consumers and other implementations can check themselves against this one: ./api-surface.json (the exact public surface), ./conformance.json (the level table and the values every built-in strategy resolves to), and ./spec/energy-state.schema.json with ./spec/conformance.schema.json. See Spec and conformance.

Explained pages

Core pages