
Product
Socket for Asana Is Now Available
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.
@trigguard/protocol
Advanced tools
TypeScript SDK: types and JSON snapshots for the TrigGuard protocol (see repository spec/).
@trigguard/protocol (TypeScript SDK)Reference implementation for the TrigGuard protocol in TypeScript: vocabulary (PERMIT, DENY, SILENCE), enforcement semantics, and the DecisionRecord shape, plus JSON snapshots aligned with core/contracts/decision_contract.json.
Language-agnostic specification: spec/TG_PROTOCOL.md — this npm package is an SDK, not the full protocol.
Runtime evaluation and policy engines live in other packages and services; integrations conform to the spec.
npm install @trigguard/protocol
import { DECISION, ENFORCEMENT, type DecisionRecord } from "@trigguard/protocol";
const record: DecisionRecord = {
decision: DECISION.PERMIT,
enforcement: ENFORCEMENT.EXECUTED,
reason_code: "NO_POLICY_VIOLATION",
timestamp: new Date().toISOString(),
};
There is no evaluate() or validateDecision() in this package — only types and canonical constants so your code matches spec/TG_PROTOCOL.md. For JSON Schema and contract JSON via subpaths, see Subpath exports.
Published on the public registry under the @trigguard scope. For release process, see docs/release/PROTOCOL_RELEASE.md in the monorepo.
Develop inside the repo (no registry), use a path or workspace:
"@trigguard/protocol": "file:implementations/typescript"
(From a package at the repository root. From packages/*, use file:../../implementations/typescript.)
Or install from a Git URL / workspace as documented in the main TrigGuard repository.
| Decision | Meaning (high level) |
|---|---|
| PERMIT | Authorization to proceed under policy (subject to enforcement and deployment rules). |
| DENY | Action must not proceed as requested. |
| SILENCE | No authorization was issued; without authorization, execution cannot proceed (see SILENCE_DEFINITION export). |
Policy-only layers may restrict emitted decisions to PERMIT / DENY; full protocol surfaces also use SILENCE where applicable.
Other useful exports: type Decision, DECISIONS, SILENCE_DEFINITION, REASON_CODES, decisionContract.
The package exposes stable paths for the JSON schema and decision contract snapshot:
const schema = require("@trigguard/protocol/schema");
const contract = require("@trigguard/protocol/contract");
From implementations/typescript:
npm install
npm run build
build runs sync-contract (when the full monorepo is present), tsc, and asset copy into dist/. Published tarballs are built via prepack / prepare before npm publish.
Canonical source: github.com/TrigGuard-AI/TrigGuard — implementations/typescript/ (spec: spec/).
For installation paths and release tagging, see:
docs/developers/INSTALL_PROTOCOL.mddocs/release/PROTOCOL_RELEASE.mdsrc/contracts/decision_contract.json is kept in sync with core/contracts/decision_contract.json via npm run sync-contract in the monorepo. Do not edit kernel contracts from this README — follow governance and protocol integrity processes in the main repo.
FAQs
Shared TypeScript types and JSON contract snapshots for TrigGuard authorization decisions and records (PERMIT|DENY|ESCALATE|SILENCE).
The npm package @trigguard/protocol receives a total of 209 weekly downloads. As such, @trigguard/protocol popularity was classified as not popular.
We found that @trigguard/protocol demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Product
Create and manage Asana tasks directly from Socket alerts, with manual task creation, automated ticketing rules, and two-way sync.

Security News
Open VSX has removed three extension IDs from its malicious-extension list as the legitimate publishers they impersonated move to claim the names for themselves.

Product
Socket’s PHP and Composer support is now in Beta for all customers, with PHP reachability analysis generally available.