3 ms·
Yeah share for sure pls
by timcobb 7mo ago
Yeah share for sure pls
- kaicianflone 7mo agoSure the core primitive is a runtime wrapper that turns any function into a governed decision point: import { consensus } from "@consensus-tools/wrapper"; const safeSend = consensus(sendEmail, { reviewers: [humanReviewer, aiSafetyReviewer], strategy: { mode: "unanimous" }, hooks: { onBlock: (ctx) => audit.log("blocked", ctx) }, }); await safeSend({ to: "user@example.com", body: "Hello" }); The call to sendEmail doesn't execute until every reviewer votes. Strategy modes handle the consensus logic (unanimous, majority, weighted, etc.), and guards can ALLOW, BLOCK, REWRITE, or escalate to REQUIRE_HUMAN before anything fires. The monorepo has 9 built-in policy types and 7 guard types designed so you can drop governance into an existing agent system without rewriting your orchestration. Repo's at github.com/consensus-tools if you want to poke around.