@clawdstrike/engine-remote
v0.1.1
Published
Policy engine adapter that calls hushd /api/v1/eval
Downloads
153
Maintainers
Readme
@clawdstrike/engine-remote
Policy engine adapter that calls a running hushd daemon for evaluation.
This is useful when you want TypeScript tool-boundary enforcement but prefer the Rust policy engine
for ruleset parsing and evaluation, without spawning the hush CLI per request.
Usage
import { createHushdEngine } from "@clawdstrike/engine-remote";
const engine = createHushdEngine({
baseUrl: "http://127.0.0.1:9876",
// token: process.env.HUSHD_CHECK_KEY,
timeoutMs: 10_000,
});
const decision = await engine.evaluate(event);
if (decision.status === "deny") throw new Error(decision.message ?? "Blocked by policy");