Deterministic action policy
Normalize every tool call into an attributable action and return a reproducible allow, deny, or require-approval decision from explicit policy.
Open source / AI-agent security
A policy firewall for AI agents, tool calls, and MCP connections. Dvar sits between reasoning and execution so every proposed action can be evaluated, approved, constrained, and audited before it affects a real system.
Features / 01
Dvar evaluates proposed actions with explicit identity, environment, tool metadata, arguments, policy, approval state, runtime limits, and output controls.
Normalize every tool call into an attributable action and return a reproducible allow, deny, or require-approval decision from explicit policy.
Discover MCP tools, classify capabilities, generate reviewable inventories, and detect server, schema, annotation, destination, and capability changes.
Create signed, expiring, replay-resistant approval grants tied to the reviewed action, user, environment, rule, scope, and selected fields.
Apply quotas, cost and monetary limits, loop detection, retry ceilings, circuit breakers, and shared Redis or Valkey state at the execution boundary.
Filter JSON and text outputs, deny binary by default, redact secrets, supervise local subprocesses, and avoid inherited environments by default.
Wrap Vercel AI SDK style tools and other framework surfaces without making Dvar depend on a single model provider or agent framework.
Dvar 0.7 / Alpha channel
Version 0.7 combines the core policy engine with MCP enforcement, approvals, runtime safety, stdio hardening, output guards, and the first framework adapter surface.
Package
Install the package from npm's alpha channel and use the same runtime for function tools, MCP proxying, approvals, runtime controls, output filtering, and adapters.
Configuration
Define monitor, enforce, strict, or off modes with explicit defaults, policy rules, guardrails, integrity settings, approval requirements, and runtime failure behavior.
Lockfile
Review tool inventories before trusting MCP capabilities, then detect future schema, metadata, destination, and capability drift before execution.
Adapter
Wrap AI SDK style tools so framework execution passes through Dvar while preserving the tool shape expected by generateText and streamText.
Capabilities / 02
Use Dvar to limit what agents may do, when they may do it, and what evidence is retained for review and incident response.
Allow, deny, and require-approval decisions for AI-agent actions
Monitor-first rollout with would-allow, would-deny, and would-require-approval observations
MCP Streamable HTTP scanning, proxying, inventory files, and lockfiles
Signed approval grants with once, session, and task scopes
Task, session, call, cost, monetary, depth, retry, and loop controls
Stdio subprocess supervision with executable identity and environment policy
Output classification, redaction, size limits, and deny-pattern blocking
Vercel AI SDK adapter and framework-neutral conformance helpers
Use cases / 03
Scan MCP servers, review capability drift, enforce lockfiles, and stop unknown or changed tools before they reach production systems.
Require approval for payments, data exports, account changes, infrastructure operations, repository writes, and other high-impact tool calls.
Constrain loops, retries, repeated actions, cost, monetary value, depth, and session volume before an agent exhausts budget or damages systems.
Wrap agent-framework tool objects so application teams keep familiar SDK ergonomics while routing execution through deterministic policy.
Integration surfaces / 04
Dvar is local-first and vendor-neutral. It can sit around ordinary functions, MCP servers, local tools, and framework tool definitions.
@rokadhq/dvar
Protect ordinary TypeScript functions with normalized action records, argument validation, policy decisions, approvals, runtime safety, and output guards.
@rokadhq/dvar/mcp
Scan and proxy MCP Streamable HTTP servers with pre-execution policy checks, lockfile integrity, request attribution, and bounded forwarding.
@rokadhq/dvar/approvals
Issue and verify signed approval grants with expiry, scope, identity, environment, rule, action, and replay protections.
@rokadhq/dvar/runtime-safety
Apply quotas, call ceilings, cost and monetary limits, loop detection, circuit breakers, and shared Redis or Valkey state.
@rokadhq/dvar/stdio
Supervise subprocess execution with shell-free spawning, executable inspection, argument checks, environment allowlists, and output caps.
@rokadhq/dvar/adapters/vercel-ai-sdk
Wrap Vercel AI SDK style tools, compose approval hints, preserve tool metadata, and route execution through Dvar protected tools.
Dvar FAQ / 05
Understand Dvar's boundary, rollout model, approval semantics, and how Rokad can help integrate it into agentic systems.
Dvar protects proposed actions: tool calls, MCP calls, local subprocesses, framework tool execution, and other side-effect boundaries routed through its wrapper or proxy.
No. Dvar complements application authorization, IAM, OAuth, database permissions, network policy, sandboxing, secrets management, and human review. It does not replace them.
No. Monitor mode allows execution while recording what Dvar would have denied or escalated. It is intended for safe adoption before enforcing policy.
Yes. The core runtime, policy engine, MCP scanner, lockfile workflow, replay tooling, approval primitives, and audit events are local-first.
Yes. Rokad can design agent action policy, harden MCP access, connect approvals, add runtime safety, test monitor-mode evidence, and manage rollout into enforcement.
Start with Dvar 0.7