> ## Documentation Index
> Fetch the complete documentation index at: https://quintsecurity.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Protobuf Schemas

> Shared contract definitions for the Quint platform

# Protobuf Schemas

The `quint-proto` repository contains the authoritative Protobuf schema definitions shared across all Quint components. All schemas are versioned under `quint/v1/` and managed with [Buf](https://buf.build).

## Schema Files

<CardGroup cols={2}>
  <Card title="common.proto" icon="shapes" href="/proto/common">
    Shared types: JSON-RPC wrappers, enums (Action, Verdict, Direction, DataClassification, MCPTransport)
  </Card>

  <Card title="auth.proto" icon="key" href="/proto/auth">
    Authentication: Passkey/WebAuthn, API keys, sessions
  </Card>

  <Card title="policy.proto" icon="shield" href="/proto/policy">
    Policy configuration: server policies, tool rules, scoring policies
  </Card>

  <Card title="proxy.proto" icon="filter" href="/proto/proxy">
    Proxy interception: intercepted messages, policy decisions, audit queries
  </Card>

  <Card title="audit.proto" icon="clipboard-check" href="/proto/audit">
    Signed audit logs: Ed25519 signatures, chain-linked entries, export bundles
  </Card>

  <Card title="risk_evaluation.proto" icon="gauge-high" href="/proto/risk-evaluation">
    Risk scoring: action context, score decomposition, risk assessment, gRPC service
  </Card>
</CardGroup>

## Consumers

| Component   | Language   | Import                                  |
| ----------- | ---------- | --------------------------------------- |
| quint-proxy | Go         | `gen/go/quint/v1`                       |
| quint-cli   | TypeScript | `gen/ts`                                |
| quint-infra | Python     | gRPC stubs from `risk_evaluation.proto` |

## Build

```bash theme={null}
# Generate Go + TypeScript code
make generate

# Lint against STANDARD rules
make lint

# Clean generated code
make clean
```

### buf.gen.yaml

```yaml theme={null}
version: v2
plugins:
  - remote: buf.build/protocolbuffers/go
    out: gen/go
    opt: paths=source_relative
  - remote: buf.build/bufbuild/es
    out: gen/ts
```

## Versioning

All schemas are under `quint/v1/`. Breaking changes require a new version (`quint/v2/`). The `buf breaking` check enforces FILE-level breaking change detection.

## Design Principles

1. **Canonical action format**: `domain:scope:verb` (e.g., `mcp:github:pr.create`)
2. **Backward compatibility**: Legacy flat fields coexist with new canonical nested context
3. **Dual auth**: Passkey/WebAuthn for interactive, API keys (`qk_` prefix) for headless
4. **Signed audit trail**: Ed25519 per-entry signatures with SHA-256 chain linking
5. **4-layer scoring**: Intrinsic, GNN, policy, temporal — all expressed in `ScoreDecomposition`
