Gnomon Brings Git-Style Branching and Merges to Postgres
BitsInfra released Gnomon, a PostgreSQL extension that adds Git-style branches, history, three-way merges and undo directly inside the existing database, with branches storing only their own changes and copying nothing. Aimed at agent workflows, it lets an agent get an isolated branch of the real database via a connection string, then diff every changed field, merge back to main, or undo the merge.
Related Entities
Full Report
Gnomon is a PostgreSQL extension that gives your database branches, history, merges and undo. Give an agent its own branch of your real database, as nothing more than a connection string. See every field it changed, merge it into main when it's right, and undo it if it wasn't.
Gnomon runs inside the Postgres you already have. One extension, no copies, no second database.
Install the extension, then take a branch, change something on it and look at what changed:
create extension gnomon;
select gnomon.track('orders'); -- history starts now, no backfill
select gnomon.create_branch('agent/refunds');
select gnomon.use('agent/refunds');
-- Every query from here on runs on the branch
update orders set status = 'refunded' where id = 4182;
select * from gnomon.diff('agent/refunds'); -- every row and field it changed
select gnomon.merge('agent/refunds'); -- three-way, type-aware, conflicts as rows
select gnomon.undo_merge(1); -- and backA branch reads everything from main and keeps only what it changes, so it opens instantly and copies nothing, however big your database is. Your application doesn't change: point a session at a branch and the queries it already runs read and write the branch instead of main.
One command gives an agent a database role, a branch of its own and a connection string. It reads and writes its branch, and the database refuses the rest, main included, even when the agent asks for it by name.
gnomon agent create support-bot
Merging is for the people you choose, or for an agent within rules you write: at most twenty rows, only these tables, every check passing. Postgres enforces them, whatever the agent is told.
The TypeScript and Python SDKs give each task your agents take on a run: a branch of its own, with limits already set. Merge it, send it for review, or let it go.
npm install @bitsinfra/gnomon # TypeScript
pip install gnomon-postgres # PythonBindings for Node, Go, Ruby, Java, Elixir, .NET and PHP put your application's sessions and tests on a branch, through the drivers and ORMs you already use.