System Overview
SINT Protocol sits as a mandatory intermediary between AI decision-making and the physical world. No AI agent can actuate a physical resource without passing through the Policy Gateway.Package Map
The monorepo atsint-ai/sint-protocol is organized into packages/, apps/, and sdks/.
- Core
- Persistence
- Bridges
- Engines
- Avatar & Client
| Package | Path | Responsibility |
|---|---|---|
@sint/core | packages/core | Shared TypeScript types, Zod schemas, constants. All other packages import from here. |
@sint/gate-capability-tokens | packages/gate-capability-tokens | Ed25519 token issuance, validation, delegation. Wraps @noble/ed25519. |
@sint/gate-policy-gateway | packages/gate-policy-gateway | The intercept engine. Policy evaluation pipeline, tier assignment, constraint enforcement. |
@sint/gate-evidence-ledger | packages/gate-evidence-ledger | SHA-256 hash chain ledger. Append-only evidence records, proof receipts, SIEM export. |
Gateway Server
Thegateway-server app (apps/gateway-server) is a Hono-based HTTP server — chosen for its edge-compatible runtime, typed routing, and middleware composability.
Route Modules
32 endpoints across 10 route modules:| Module | Prefix | Endpoints | Auth |
|---|---|---|---|
health | /health | GET /, GET /ready, GET /live | None |
intercept | /v1/intercept | POST / | Ed25519 agent signature |
tokens | /v1/tokens | POST /, GET /:id, POST /delegate, DELETE /:id, GET / | Ed25519 + API key |
ledger | /v1/ledger | GET /, GET /:id, GET /proof/:id, POST /verify, GET /export | API key |
approvals | /v1/approvals | GET /, GET /:id, POST /:id/approve, POST /:id/deny, GET /stream (SSE) | API key |
discovery | /v1/discovery | GET /agents, GET /agents/:id, POST /agents/register, DELETE /agents/:id | API key |
economy | /v1/economy | GET /balance, POST /charge, GET /transactions | Ed25519 agent signature |
a2a | /v1/a2a | POST /delegate, GET /trust-chain/:id, POST /revoke | Ed25519 agent signature |
risk-stream | /v1/risk | GET /stream (WebSocket), GET /snapshot | API key |
dashboard | /v1/dashboard | GET /stats, GET /agents, GET /alerts | API key |
Authentication
Ed25519 Agent Authentication
Ed25519 Agent Authentication
Agents sign requests with their private key. The gateway verifies the signature against the agent’s registered public key in the trust registry.The
@noble/ed25519 library handles all crypto. No dependency on Node.js crypto — works in edge runtimes.API Key Admin Authentication
API Key Admin Authentication
Administrative endpoints (ledger, approvals, dashboard) use a bearer token:Keys are scoped (read-only vs. read-write) and stored hashed in PostgreSQL. Rate limiting is enforced per-key via Redis sliding window counters.
Apps
gateway-server
Production HTTP server. Hono + PostgreSQL + Redis. Deployable to Railway, Docker, or any Node.js 20+ host. Entry:
apps/gateway-server/src/index.ts.sintctl
CLI tool for operators. Token management, ledger inspection, agent registration, e-stop triggering. Entry:
apps/sintctl/src/index.ts.sint-mcp
MCP (Model Context Protocol) bridge server. Exposes SINT Gate as MCP tools, enabling LLMs (Claude, GPT-4o, etc.) to request physical actions through a standards-compliant interface.
sint-mcp-scanner
Scans existing MCP tool definitions and generates SINT capability token templates. Bootstraps governance for MCP-native AI agents.
dashboard
React 19 + Redux Toolkit operator interface. Real-time risk stream via WebSocket, approval queue management, agent registry, ledger explorer.
Security Architecture
Token Forgery Protection
Capability tokens are Ed25519-signed JWTs. The signature covers:intercept() call — not cached. Revocation is immediate via the ledger.
Attenuation-Only Delegation
A delegated token cannot grant more permissions than its parent.Math.min() enforcement applies to all numeric constraints. Delegation depth is capped at 3 to prevent unbounded chains.
Goal Hijack Detection
The policy gateway scans every action’s payload against 25+ regex patterns for prompt injection and goal hijacking attempts:- Override instructions (
ignore previous instructions,you are now, etc.) - Exfiltration patterns (
send to,upload,transmit all) - Safety bypass attempts (
disable safety,emergency override,skip verification) - Jailbreak patterns (base64-encoded instructions, unicode lookalikes)
Circuit Breaker
InvariantI-G2: the e-stop preempts all pending and in-flight intercept calls. Once tripped, no action is approved until manually reset by an authorized operator. CSML anomaly scores above threshold auto-trip the breaker.
Data Flow
EveryPOST /v1/intercept call traverses this pipeline synchronously:
Schema Validation
Zod parses the request body against
InterceptRequestSchema. Malformed input is rejected with 400 before any crypto operations.Token Verification
Ed25519 signature verified. Expiry checked. Nonce checked against Redis (replay prevention). Revocation status checked against ledger.
Policy Evaluation
Active policies for the resource+action pair are loaded. Each policy rule is evaluated against the token claims and request context.
Constraint Check
PhysicalActionContext values (force, velocity, temperature, geofence) are checked against token constraints. Math.min applied for delegated tokens.Tier Assignment
Safety tier determined from token + physical context. Human-detected proximity forces tier escalation (monotonic — never decreases mid-session).
CSML Anomaly Scoring
Continuous Safety Monitoring Language evaluates behavioral anomalies (velocity spikes, unusual action sequences, out-of-envelope movements). Score above threshold → circuit breaker trip candidate.
Evidence Logging
Decision (APPROVE/DENY/ESCALATE), token hash, action hash, tier, constraints, and CSML score appended to the SHA-256 hash chain ledger.