New:Socket for Asana Is Now Available.Learn more
Get Started

@trigguard/decision

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trigguard/decision

TrigGuard HTTP decision client: authorize() → POST /decide (no policy in-process)

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
18
63.64%
Maintainers
1
Weekly downloads
 
Created
Source

TrigGuard Node decision client (@trigguard/decision)

Official thin client for the TrigGuard decision endpoint: a single authorize() call. No policy logic in this package — the remote service decides.

Install

Published name (npm scope):

npm install @trigguard/decision

The unscoped name trigguard on the public registry is not this package (different artifact / owner). Use @trigguard/decision for this HTTP client.

Monorepo / path install:

npm install file:./sdk/node

Usage

const { authorize } = require("@trigguard/decision");

const decision = await authorize(
  {
    surface: "spendCommit",
    signals: {
      riskScore: 0.8,
    },
    context: {
      amount: 1200,
    },
  },
  {
    // optional; defaults shown via env
    // endpoint: "https://decision.trigguard.ai/decide",
    // token: process.env.TRIGGUARD_TOKEN,
  }
);

if (decision.decision !== "PERMIT") {
  throw new Error("Action blocked by TrigGuard");
}

Environment

VariablePurpose
TRIGGUARD_ENDPOINTDecision URL (default: https://decision.trigguard.ai/decide)
TRIGGUARD_TOKENBearer token when not passed in options.token

Publish (maintainers)

cd sdk/node && npm login && npm publish --access public

See docs/distribution/PUBLISH_DECISION_CLIENT.md for npm pack verification and registry notes.

Note: The monorepo also ships a broader unified workspace package packages/trigguard-sdk (npm name trigguard when published from that tree). Keep the two packages distinct: @trigguard/decision = HTTP decide only.

See also

  • SDK quickstart
  • Full TypeScript SDK: sdk/js/trigguard (@trigguard/sdk)

Keywords

trigguard

FAQs

Package last updated on 24 Apr 2026

Related posts