@polyweave/redflag (1.0.1)
Published 2026-07-10 19:55:24 +00:00 by Dvorak
Installation
@polyweave:registry=https://hub.kl1.tenere.ai/api/packages/Polyweave/npm/npm install @polyweave/redflag@1.0.1"@polyweave/redflag": "1.0.1"About this package
redflag
Output red-flag detection primitives for reliable Polyweave LLM protocols.
Synopsis
import { createRedflagDuplex, createRedflagGate, inspectOutput, createMakersRedflagPreset } from '@polyweave/redflag';
const gate = createRedflagGate([createMakersRedflagPreset()]);
const result = inspectOutput(output, { redflags: gate });
Install
npm install @polyweave/redflag
API
createRedflagDuplex(options)
Creates a duplex stream that inspects and flags LLM output.
createRedflagGate(presets)
Creates a gating function that checks output against configured red-flag presets.
inspectOutput(output, options)
Inspects an output for red-flag conditions using configured detectors.
createMakersRedflagPreset()
Returns a preset red-flag detector with built-in heuristics.
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
redflag
validation
llm