
Product
Socket for ClickUp Is Now Available
Create ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.
@decionis/shield
Advanced tools
Ask a user's Decionis Shield for spending authority before your app or AI agent executes.
Decionis Shield SDK — let your app or AI agent ask the user's Shield before spending their money.
npm install @decionis/shield
Published on npm as @decionis/shield.
import { ShieldClient } from "@decionis/shield";
const shield = new ShieldClient(); // sandbox by default
const decision = await shield.authorize({
amount: 89,
currency: "USD",
purpose: "Book hotel",
merchant: "Hilton"
});
if (decision.allowed) await execute();
No account or key is required in sandbox. No real money can move.
switch (decision.verdict) {
case "ALLOW":
await execute();
break;
case "ASK": {
const final = await shield.requestApproval(decision.decisionId);
if (final.verdict === "ALLOW") await execute();
break;
}
case "BLOCK":
await cancel();
}
An error is not permission. The SDK fails closed and every ShieldError has safeToExecute: false.
const decision = await shield.authorize(
{ amount: 267, currency: "EUR", purpose: "Book hotel" },
{ scenario: "travel-approval" }
);
// ASK — hold until approval
Run all scenarios with npx @decionis/shield-demo --all, or npm run shield:demo:all from this repository.
DECIONIS_SHIELD_ENV=production
DECIONIS_SHIELD_API_KEY=shield_pk_...
const shield = new ShieldClient({
environment: "production",
identity: {
appId: "app.travel.example",
displayName: "Example Travel Agent",
developer: "Example, Inc."
}
});
Production keys belong on servers, never in browsers. Production provisioning is not yet self-service; the client intentionally refuses to run without both a key and integration identity.
authorize(request, options?) → ShieldDecisionrequestApproval(decisionId) → current ShieldDecisiongetDecision(decisionId) → current ShieldDecisiongetDossier(dossierId) → evidence and advanced metadatasandboxScenarios → deterministic local fixturesThe package is TypeScript-first, ESM, dependency-free at runtime, Node.js 20+, and browser-safe for sandbox use. See the five-minute quickstart and REST contract.
Applications must request Shield authorization before executing the consequential action. Shield does not universally intercept arbitrary card or bank transactions.
Apache-2.0. Use of the hosted Shield service is governed separately.
FAQs
Ask a user's Decionis Shield for spending authority before your app or AI agent executes.
We found that @decionis/shield 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 ClickUp tasks from Socket alerts, automate ticketing with custom rules, and keep alert and task status synchronized.

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.