Skip to main content

Proof Registry protocol: client, reference server, and static-JSON emitter.

Project description

proof-engine-registry

Protocol, client, and reference server for the Proof Registry — the JSON-over-HTTPS layer that lets LLM wikis (and other tools) ask "is this claim already proven?" and either use the existing proof or commission a new one.

Spec: docs/registry-protocol.md.

Install

pip install proof-engine-registry

Config

~/.config/proof-engine/registries.toml
[[registry]]
name = "public"
url = "https://proofengine.info"

[[registry]]
name = "acme-internal"
url = "https://proofs.acme.com"
token_env = "ACME_PROOFS_TOKEN"
publish = true

Client

from proof_engine_registry import RegistryClient, load_registries
client = RegistryClient(load_registries())
hit = client.lookup("The sky is blue.")
if hit:
    print(hit.proof_url)

Self-host

proof-registry serve ./my-proofs --port 8080 --token-env MY_TOKEN

Useful flags:

Flag Default Purpose
--token-env (none) Env var holding the bearer token required for POST /proofs. Omit to disable publishing.
--cors-origin * Value for Access-Control-Allow-Origin on read responses. Use a specific origin to restrict access.
--log-json off Emit one JSON access record per request to stderr. Authorization headers are never logged.
--problem-type-base https://proofengine.info/errors Base URI for type fields in RFC 7807 error bodies. Override to point at your own docs.

Production deployment

The reference server uses plain stdlib HTTP and binds to 127.0.0.1 by default. Suitable for development and local team use. For public exposure over the open internet, front the server with a TLS-terminating reverse proxy (nginx, Caddy, Cloudflare, AWS ALB) and route only encrypted traffic from the proxy to the server. Bearer tokens MUST NOT travel the network in cleartext.

Errors

JSON error responses follow RFC 7807 Problem Details:

HTTP/1.1 404 Not Found
Content-Type: application/problem+json

{
  "type": "https://proofengine.info/errors/not-found",
  "status": 404,
  "title": "Resource not found",
  "detail": "no proof with that claim_hash",
  "code": "not_found"
}

The code field preserves the legacy short machine key for log-aggregation tooling. Full canonical-error table in the protocol spec.

Conformance

A protocol-version-aware conformance suite ships with the package:

cd packages/proof-engine-registry && python -m pytest tests/test_conformance.py -v

It runs against both the static-JSON emit and the reference server. Any third-party server claiming to speak the protocol can run the same suite.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

proof_engine_registry-1.33.0.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proof_engine_registry-1.33.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file proof_engine_registry-1.33.0.tar.gz.

File metadata

  • Download URL: proof_engine_registry-1.33.0.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for proof_engine_registry-1.33.0.tar.gz
Algorithm Hash digest
SHA256 4b161d1f833b86f93a72a29bd070677e8e2f00edc5de63955606c19cbe387600
MD5 f9d450ab6f1972e315907a8a44d3bb2c
BLAKE2b-256 d0a9a32861615efd84145ec84370cd5698ddb68c29875e9921d411ef31da958d

See more details on using hashes here.

File details

Details for the file proof_engine_registry-1.33.0-py3-none-any.whl.

File metadata

File hashes

Hashes for proof_engine_registry-1.33.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d2eb27643e6d7205c99eb110c6fc51c570bcc69f1242aeeb7217738db563491
MD5 246db6334835673f92cfe56b070849f5
BLAKE2b-256 260b04ef8181dce13c6f40215e31aa5f7ca324908d4a0279365ae9af87bfc7c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page