Polyweave

@polyweave/quorum (1.0.2)

Published 2026-07-11 00:45:00 +00:00 by Dvorak

Installation

@polyweave:registry=https://hub.kl1.tenere.ai/api/packages/Polyweave/npm/
npm install @polyweave/quorum@1.0.2
"@polyweave/quorum": "1.0.2"

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
Details
npm
2026-07-11 00:45:00 +00:00
5
John Dvorak
SEE LICENSE IN LICENSE
3.6 KiB
Assets (1)
Versions (4) View all
1.0.6 2026-07-11
1.0.3 2026-07-11
1.0.2 2026-07-11
1.0.1 2026-07-10