Polyweave

@polyweave/redflag (1.0.2)

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

Installation

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

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