Skip to main content
Glama
sva-gate

sva-gate

by eyeoverthink

@eyeoverthink/sva-gate (v1.0.0)

CI: Node + MCP + Python License: Apache-2.0

Zero-dependency 3-layer verification SDK, CLI, and stdio MCP server for AI agents.

Unifies the proven standards from eyeoverthink/sva-standard (v1.7.0, 106/106 tri-runtime conformance) and eyeoverthink/logic-chain-judge (v1.0.0, 321 tests) into one installable package with zero external runtime dependencies (Node 22+ ESM with TypeScript .d.ts definitions + pure Python 3.10+ stdlib companion in python/).


1. Drop Into Claude Code / Cursor / Codex / Any MCP Client (4 Lines)

{
  "mcpServers": {
    "sva-gate": {
      "command": "npx",
      "args": ["-y", "@eyeoverthink/sva-gate", "mcp"]
    }
  }
}

Gives any agent 6 deterministic verification tools over stdio JSON-RPC 2.0:

MCP Tool

Layer

What It Enforces

sva_seal_text

Layer 2 (EMA/1)

Seals PII/secrets (emails, SSNs, API keys, phones) into typed placeholders + StreamSealGuard cross-token split-secret sealing + zero-width prompt-injection scan

sva_mint_receipt

Layer 1 (SVA-ER/1)

Mints an Ed25519-signed, RFC 6962 0x00/0x01 Merkle-proven receipt + matching OPEG/1 S4_COMMIT envelope

sva_verify_receipt

Layer 1 (SVA-ER/1 + AER-1)

Verifies SVA-ER/1 receipts AND IETF draft-zambo-aer1-26 (AER-1 v0.4) receipts offline

sva_opeg_check

Layer 2 (OPEG/1)

Fail-closed pre-commit gate: blocks DIRECT_INFERENCE, tampered R_san digests, and invalid receipts (sva-er/1 or aer-1)

sva_judge_audit

Layer 3 (SVA-JEV/1)

Calibrated epistemic judge gates: Wilson 95% CI > 2/3, author self-vote exclusion, mandatory verbatim >= 12-char quotes, hidden planted-fake traps, and zero-LLM new_terms invention scanner

sva_crystallize_skill

Layer 1 (VSC/1)

Zero-LLM deterministic parameter binder induction with leave-one-out verification and novel-wording near-miss rejection


Related MCP server: gamai-trust

2. CLI Quick Start (10-Second Offline Self-Test)

# Run built-in 3-layer verification (receipts + OPEG tamper block + StreamSealGuard + SVA-JEV/1 + skill crystallizer)
npx @eyeoverthink/sva-gate self-test

# Seal secrets & scan for prompt injection
npx @eyeoverthink/sva-gate seal "Patient SSN 123-45-6789 key sk-ant-api03-abcdefghijklmnop1234567890"

# Demo cross-token split-secret streaming redaction
npx @eyeoverthink/sva-gate stream-demo

# Mint a signed SVA-ER/1 receipt + OPEG/1 envelope
npx @eyeoverthink/sva-gate mint '{"answer":42,"unit":"ms"}'

# Verify an SVA-ER/1 OR IETF AER-1 v0.4 receipt offline
npx @eyeoverthink/sva-gate verify receipt.json [deliverable.json]

# Evaluate an OPEG/1 gate or SVA-JEV/1 judge envelope fail-closed
npx @eyeoverthink/sva-gate gate opeg-envelope.json
npx @eyeoverthink/sva-gate judge jev-envelope.json

3. JS / TypeScript SDK (0 Dependencies)

import {
  mintSvaEr1,
  verifyAnyReceipt,
  evaluateOpeg1,
  evaluateSvaJev1,
  StreamSealGuard,
  JEV_SEMANTICS,
} from '@eyeoverthink/sva-gate';

// 1. Mint & verify an SVA-ER/1 receipt + OPEG/1 S4_COMMIT envelope
const { receipt, deliverable, opegEnvelope } = mintSvaEr1({ rSan: { ok: true, value: 42 } });
console.log(verifyAnyReceipt(receipt, { deliverable })); // { format: 'sva-er/1', ok: true, outcome: 'verified', ... }
console.log(evaluateOpeg1(opegEnvelope));                // { ok: true, gate: 'pass', ... }

// 2. Seal split-token API keys across streaming chunks
const sg = new StreamSealGuard();
const safe = ['Key sk-', 'ant-api03-abcdefghijklmnop1234567890 ok'].map((c) => sg.push(c)).join('') + sg.flush();

// 3. Enforce SVA-JEV/1 epistemic judge gates
const verdict = evaluateSvaJev1({
  spec: 'sva-jev/1',
  semantics: JEV_SEMANTICS,
  mode: 'claim_trace',
  ledgerTexts: ['[stage 1] Enforce 80% quorum via verify_run.'],
  briefText: 'Enforce 80% quorum with 9999 retries via invented_helper_v2.',
  plantedFakes: [{ id: 'fake-1', verdict: 'unsupported' }],
});
// -> { ok: false, newTerms: ['9999', 'invented_helper_v2'], ... }

4. Pure Python 3.10+ Companion (python/)

Zero pip dependencies (standard library only):

pip install ./python
python -m unittest discover -s python/tests -v
from sva_gate import JEV_SEMANTICS, evaluate_sva_jev1
res = evaluate_sva_jev1({
    "spec": "sva-jev/1",
    "semantics": JEV_SEMANTICS,
    "mode": "calibration",
    "answered": 36, "total": 36, "right": 33, "realFound": 12, "realTotal": 12,
})

Honest Limits

  • Signatures prove post-signing integrity and key possession, not that a compromised host didn't fabricate data prior to signing. Local unsynced clocks are explicitly labeled unattested.

  • SVA-JEV/1 verdicts are stamped stability-signal-not-correctness — multi-model consensus is never proof of truth.

  • Deterministic new_terms catches invented numbers and code identifiers, not subtle semantic paraphrasing.

License

Apache-2.0 — see LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      B
      maintenance
      Enables AI assistants and autonomous agents to intercept arithmetic and algebraic hallucinations via exact rational verification, seal multi-step reasoning chains with SHA-256 Merkle commitments, and optionally bridge deep verification to a remote sovereign enclave. It also supports BFT epistemic consensus across multi-agent proposals and tamper-evident session sealing.
      15
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables agents to verify claims against tamper-evident evidence, check inputs for prompt injection, and record blocked attacks as reusable antibodies. It also exposes trust statistics and a self-contained demo over stdio, so refusal and unverified outcomes are surfaced as first-class results.
      5
      1
      Apache 2.0
    • A
      license
      B
      quality
      B
      maintenance
      Enables MCP clients to verify claims against evidence, generate and validate tamper-evident receipts, and pre-filter prompt-injection attempts through stdio JSON-RPC tools.
      5
      825 PyPI
      Apache 2.0
    • A
      license
      B
      quality
      B
      maintenance
      Enables AI agents to verify hybrid post-quantum transaction envelopes against spending policies, pre-flight quote decisions, run adversarial quantum-downgrade attack simulations, export hash-chained ML-DSA-87 attested audit bundles, probe live QoreX RPC/precompile state, and register scoped agent policies. It exposes six tools over stdio with structured content and secret-input refusal.
      6
      Apache 2.0