Consensus control plane, plugin-first.
Modular, zero-dependency control plane for multi-chain consensus governance. Every state transition is fail-closed, every event is replayable, every plugin has a frozen API.
Install
npm install @mcptoolshop/consensus-os
# Node.js 18+ required. Zero runtime dependencies.
Boot
import { CoreLoader, createHealthSentinel, createReleaseVerifier } from '@mcptoolshop/consensus-os';
const loader = new CoreLoader({ configs: { 'health-sentinel': { intervalMs: 10_000 } } });
loader.register(createHealthSentinel());
loader.register(createReleaseVerifier());
await loader.boot();
Invariants
// Subscribe to events
loader.events.subscribe('health.*', (event) => {
console.log(`[${event.topic}]`, event.data);
});
// Gate a state transition
const verdict = await loader.invariants.check({ action: 'deploy' });
console.log('Allowed:', verdict.allowed);
Why ConsensusOS?
Multi-chain infrastructure without the hope-and-scripts approach.
Zero production dependencies
Nothing in your supply chain you didn't write. The entire control plane — event bus, invariant engine, plugin loader — ships with no runtime deps.
Fail-closed invariants
Invalid state transitions are always rejected, never partially applied. Register invariants once; they gate every future action until the engine shuts down.
Deterministic replay
Every event is ordered and stored. Reproduce any system state from the event history — debug incidents, test migrations, or audit governance decisions after the fact.
Modules & Adapters
Built-in plugins and chain adapters — register what you need, skip the rest.
Quick start
Install
npm install @mcptoolshop/consensus-os Register and boot plugins
import { CoreLoader, createHealthSentinel, createConfigGuardian, createXrplAdapter } from '@mcptoolshop/consensus-os';
const loader = new CoreLoader({
configs: { 'health-sentinel': { intervalMs: 10_000 } },
});
loader.register(createHealthSentinel());
loader.register(createConfigGuardian());
loader.register(createXrplAdapter());
await loader.boot(); Check invariants
const verdict = await loader.invariants.check({ action: 'deploy' });
if (!verdict.allowed) {
console.error('Blocked:', verdict.reasons);
}
await loader.shutdown(); // Graceful, reverse-boot order Build a custom plugin
import { BasePlugin, ManifestBuilder } from '@mcptoolshop/consensus-os/plugin';
class MyMonitor extends BasePlugin {
readonly manifest = ManifestBuilder.create('my-monitor')
.name('My Monitor')
.version('1.0.0')
.capability('sentinel')
.build();
protected async onStart() {
this.on('health.check.completed', (e) => this.log.info('Result', e.data));
this.emit('my-monitor.ready', { status: 'online' });
}
} Built for production governance
The full stack from event bus to chain adapter.
Frozen Plugin API v1
A stable contract that won't break your integrations. BasePlugin, ManifestBuilder, and validatePlugin() are locked — upgrade the core without touching your plugins.
Resource-bounded execution
CPU, memory, and time limits enforced via governor tokens. The policy layer rejects work that would exceed budgets before it starts.
Multi-chain out of the box
XRPL, Ethereum, and Cosmos adapters ship in the package. Each adapter speaks the shared event bus — subscribe to any chain event the same way.