yebo-protect
v1.0.2
Published
yebo.protect() — the single function that puts Yebo before every AI agent action
Maintainers
Readme
@yebo/protect
The authorization layer for the agentic era.
yebo.protect() wraps any AI agent action with deterministic authorization — ALLOW, REQUIRE_APPROVAL, or DENY — backed by Stripe execution and a cryptographic audit receipt.
Installation
npm install @yebo/protectQuick Start
import { protect } from "@yebo/protect";
const result = await protect({
type: "payment",
amount: 5000,
vendor: "Acme Corp",
stripeSecretKey: process.env.STRIPE_SECRET_KEY,
});
if (result.decision === "ALLOW") {
console.log("Payment executed:", result.execution?.stripe_payment_intent_id);
} else if (result.decision === "REQUIRE_APPROVAL") {
console.log("Pending approval:", result.pending_id);
} else {
console.log("Blocked:", result.reason);
}Three Outcomes
| Decision | Meaning |
|---|---|
| ALLOW | Safe. Executes automatically via Stripe. |
| REQUIRE_APPROVAL | Pauses. Human must approve before execution. |
| DENY | Blocked. No execution. Reason provided. |
Policy Configuration
Set thresholds in yebo.policy.json:
{
"auto_approve_below": 500,
"deny_above": 10000,
"currency": "USD"
}Links
License
MIT
