@polyweave/quorum (1.0.3)
Published 2026-07-11 00:56:14 +00:00 by Dvorak
Installation
@polyweave:registry=https://hub.kl1.tenere.ai/api/packages/Polyweave/npm/npm install @polyweave/quorum@1.0.3"@polyweave/quorum": "1.0.3"About this package
quorum
Quorum and first-ahead-by-k voting primitives for Polyweave orchestration.
Synopsis
import { createQuorumSession, firstAheadByK, stableCandidateKey } from '@polyweave/quorum';
const session = createQuorumSession({ voters: 5, threshold: 3 });
const winner = firstAheadByK(candidates, k);
Install
npm install @polyweave/quorum
API
createQuorumSession(options)
Creates a quorum session with configurable voter count and threshold.
firstAheadByK(candidates, k)
Selects the candidate that is first ahead by k votes.
stableCandidateKey(candidate)
Returns a stable string key for a candidate for consistent comparison.
summarizeVoteCounts(votes)
Returns a summary of vote counts across candidates.
Tests
npm test
Requirements
Node.js 18 or later. ESM only.
License
MIT
Dependencies
Dependencies
| ID | Version |
|---|---|
| @polyweave/core | * |
Development Dependencies
| ID | Version |
|---|---|
| @rigor/core | * |
Keywords
polyweave
quorum
voting
llm