Skip to main content

opendiff

Append-only, multi-tenant raw memory in Postgres — every meeting, message, and config a team's tools produce, stored byte-verbatim, versioned, and content-addressed — exposed read-only over HTTP and MCP so skills and agents can reason over it.

The argument for building it: BRIEFING.md. The canonical design: spec.md. Backing research: research/.

Quickstart

docker compose up -d                 # postgres:16 on :5433
uv venv && uv pip install -e ".[dev]"

opendiff migrate                     # tables, triggers, RLS, grants
opendiff tenant create acme          # → tenant id
opendiff token create acme --name me # → odf_… bearer token (shown once)

opendiff serve                       # http://127.0.0.1:8000

Ingest your Granola workspace:

export GRANOLA_API_KEY=grn_…
curl -sX POST localhost:8000/v1/sources \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"kind":"granola","name":"prod","credential_ref":"env://GRANOLA_API_KEY"}'
curl -sX POST localhost:8000/v1/sources/<source-id>/sync \
  -H "Authorization: Bearer $TOKEN"

Read it in Claude Code:

claude mcp add opendiff -e OPENDIFF_TOKEN=$TOKEN -- \
  uv run --project /path/to/opendiff opendiff mcp

Eight read-only tools: ls · cat · stat · history · find · read_many · unrouted · sources. Start with ls(''), search with find(query=…).

Shape of the thing

Granola ─┐
Slack ───┤→ INGESTION APIs → store/ → Postgres raw memory ─┬→ HTTP read + sync (§8)
future ──┘   + CustomerResolver   append-only · RLS         └→ MCP, stdio      (§9)
                                  content-addressed             ↓
                                                     CachedHttpReader (§10)
                                                     local cache · pinned reads
  • Append-only, enforced twice — triggers and role grants; the app role cannot UPDATE or DELETE content even in a raw psql session.
  • Multi-tenant from migration 0001 — Postgres RLS with force row level security; an unset tenant returns zero rows, never all rows.
  • One read implementation — HTTP and MCP are transports over store/read.py; a parity test asserts byte-identical JSON.
  • Connectors call the public API — no private ingest path; the watermark advances only on a clean, complete drain.

Tests

pytest                    # unit + integration + e2e (testcontainers postgres)
pytest -m live            # §14.3 — the real Granola API; needs GRANOLA_API_KEY

The e2e suite runs against the real 82-meeting corpus in granola-transcripts/ (private, never committed) and asserts exact byte counts, dedup no-ops, and twin-tenant isolation.

Metadata

Release files for opendiff 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opendiff 0.1.0
File Size Uploaded Provenance Actions
opendiff-0.1.0.tar.gz 79.3 kB Without provenance Details for opendiff-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opendiff 0.1.0
File Interpreter ABI Platform Actions
opendiff-0.1.0-py3-none-any.whl Python 3 none any Details for opendiff-0.1.0-py3-none-any.whl

Total release size: 156.3 kB

Release files / opendiff-0.1.0.tar.gz

Download URL opendiff-0.1.0.tar.gz
Size 79.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f5dba4cd952687cc85fe1d8bba705f1cdf20b640ffa9b1cb93b8b579458b95be
BLAKE2b-256 checksum
How to use checksums
f0b29bb60be92d82f33a1173c3fc2ca666655f0978f0f1d4d1692429a823c9ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / opendiff-0.1.0-py3-none-any.whl

Download URL opendiff-0.1.0-py3-none-any.whl
Size 77.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
849f237966a26cb975b411e6cfd4ceb3635b4fac25756375d0277e8fb261b224
BLAKE2b-256 checksum
How to use checksums
106205b7a8d0750a1b446bafb41e79dda991a38125f3620d184fb72c5263e719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for opendiff 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page