@sovr/sql-proxy
SQL Proxy for AI Agents — intercepts all SQL statements and routes them through the SOVR Policy Engine before execution.

Installation
npm install @sovr/sql-proxy
API Key Required — register at sovr.inc and set SOVR_API_KEY.
Quick Start
import { SqlProxy } from '@sovr/sql-proxy';
import { PolicyEngine, DEFAULT_RULES } from '@sovr/engine';
const engine = new PolicyEngine({ rules: DEFAULT_RULES });
const proxy = new SqlProxy({
engine,
apiKey: process.env.SOVR_API_KEY,
listenPort: 5433,
targetHost: 'localhost',
targetPort: 5432,
});
await proxy.start();
Features
- PostgreSQL Wire Protocol interception (Simple + Extended Query)
- 17 SQL statement types recognized
- DDL blocking and dangerous DML detection
- Table Whitelist and Blacklist ACL
- Billing Reporter with 7 event types
- Mandatory API Key enforcement
- Full audit trail with decision IDs
Links
License
BSL-1.1