Introduction
Architect's Check
Verify that .redactPII() is chained BEFORE .handle(). If your AI agent forgot the Presenter, undeclared fields still leak. The schema is your security boundary — always audit it.
What You Tell the AI
The code below is what your AI agent produces when you give it the prompt above. Vurb ships a SKILL.md — your AI reads it and produces idiomatic architecture on the first pass.
Step 1 — Context src/vurb.ts
import { initVurb } from '@vurb/core';
interface AppContext {
db: PrismaClient;
user: { id: string; role: string; tenantId: string };
}
const f = initVurb<AppContext>();Step 2 — Presenter views/InvoicePresenter.ts
const InvoicePresenter = f.presenter({
name: 'Invoice',
schema: InvoiceModel,
rules: (inv) => [
inv.status === 'overdue' ? 'Invoice is overdue. Mention it.' : null,
],
suggest: (inv) => [
inv.status === 'draft'
? suggest('billing.send', 'Send invoice', { id: inv.id })
: null,
].filter(Boolean),
});Step 3 — Tool tools/billing/get.ts
export const getInvoice = f.query('billing.get')
.describe('Retrieve an invoice by ID')
.withString('id', 'The unique invoice identifier')
.returns(InvoicePresenter)
.use(async ({ ctx, next }) => {
const user = await auth.verify(ctx.token);
return next({ ...ctx, user });
})
.handle(async (input, ctx) => {
return ctx.db.invoice.findUnique({
where: { id: input.id, tenantId: ctx.user.tenantId },
});
});Context → Presenter → Tool. Standard TypeScript. Zero proprietary syntax. Your AI already speaks Zod and TypeScript — the SKILL.md teaches it the architecture.
Installation
npm install @vurb/core @modelcontextprotocol/sdk zodNode.js 18+. MCP · Zod · TypeScript · WinterCG — zero new syntax to learn. Works with Vercel AI SDK, LangChain, and LlamaIndex via standard stdio or HTTP transports.
password_hash never reaches the wire. New columns are invisible unless declared.fast-redact. GDPR, LGPD, HIPAA — impossible to bypass. The developer cannot accidentally skip it.tools/list based on workflow state. Empty cart → cart.pay doesn't exist. Anti-hallucination.process, fs, net.TIP
Vurb blocks PII locally by default. Need to prove it in a compliance audit (SOC2/GDPR/HIPAA)? Connect to Vinkius Cloud for tamper-proof Audit Logs →
Ecosystem Packages
| Package | Purpose |
|---|---|
| @vurb/vercel | Deploy to Vercel — App Router, Edge or Node.js |
| @vurb/cloudflare | Deploy to Cloudflare Workers — D1, KV, R2 |
| @vurb/oauth | OAuth Device Flow (RFC 8628) |
| @vurb/prisma-gen | Auto-generate tools from Prisma schema |
| @vurb/openapi-gen | Generate tools from OpenAPI/Swagger specs |
| @vurb/skills | Progressive instruction distribution |
| @vurb/testing | Test harness — blast radius, snapshots |
| @vurb/inspector | Real-time TUI dashboard |