TypeScript — @decionis/shield
Node.js, server agents, and browser-safe sandbox.
Let your app ask before it spends. Add user-controlled spending permissions to apps and AI agents with a few lines of code. Decionis Shield is the consumer spending surface of the protocol: the user sets the limits, your agent asks before it spends.
Your app wants to spend. Shield decides whether it has permission. No policy graphs, signature plumbing, or enterprise organization model is required for first success.
$ npm install @decionis/shieldimport { 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();ShieldKit 0.1.0 is public. npm artifacts are verified before every release. The client starts in sandbox mode, so the first decision costs nothing and moves nothing.
Every authorization resolves to exactly one of three answers.
| Verdict | Meaning | Your application's behavior |
|---|---|---|
| ALLOW | This exact action is authorized now. | Execute once and preserve the decision ID. |
| ASK | The user must approve. | Hold. Execute only after a later ALLOW. |
| BLOCK | The action is not authorized. | Stop. Do not execute. |
Approval is a hold, never a soft allow. Shield orchestrates Presence when the user's rules require human approval. Your application waits for a final ALLOW bound to the same action.
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();
}Understand Shield from one command. Every fixture is labelled sandbox evidence, replays deterministically, and cannot authorize real execution.
npx @decionis/shield-demo --all| Scenario | Verdict |
|---|---|
| Normal purchase | ALLOW |
| Purchase above automatic limit | ASK |
| Subscription below threshold | ALLOW |
| Subscription price increase | ASK |
| Unknown autonomous agent | BLOCK |
| Agent exceeds weekly allowance | BLOCK |
| Expired spending permission | BLOCK |
One authorization contract, four ways in.
Node.js, server agents, and browser-safe sandbox.
iOS and macOS with native async/await types.
One contract for any trusted backend.
Consumer-friendly tools for agent runtimes.
Applications must request Shield authorization before executing the consequential action.
Shield deterministically controls Shield-integrated execution. Observed activity and sandbox simulations must be labelled as such. Shield does not universally intercept arbitrary card or bank transactions.
Decionis Protocol is enterprise execution authority. Presence is human authorization and verification. Shield is consumer, app, and agent spending authority — the surface this page documents.
Start in sandbox, handle ASK correctly, inspect the dossier, then complete production identity and compatibility validation.
The consumer product this authorizes against is Decionis Shield (App Store); the wider developer surface lives at the Decionis developer hub.