The event chain is an immutable audit log of every mutation in your pod. Every entity creation, every property update, every AI action — recorded, reviewable, and reversible. Trust by architecture, not by policy.
Traditional apps trust their own code. If a bug corrupts data, you hope a backup exists. If an AI hallucinates and writes garbage, you may never know what changed. Synap takes a different approach: every write operation is recorded as an immutable event before it takes effect. This means you always have a complete history of what happened, who did it, when, and why.
The event chain is not a feature you opt into — it is the foundation of every write path in Synap. User actions, AI mutations, and connector syncs all flow through it. There is no way to write data without creating an event.
Every mutation to your data pod generates an event with a timestamp, the actor (user ID, agent ID, or connector ID), the operation type (create, update, delete), the target entity or resource, and a snapshot of what changed — both the previous and new values. Events are append-only. They cannot be edited or deleted.
Not all writes are equal. Direct user actions — clicking a button, typing in a field — go through the standard tRPC/Drizzle write path and are recorded immediately. But AI agent mutations and external connector syncs go through a different gate: checkPermissionOrPropose().
This function checks whether the action is auto-approved (based on RBAC roles and a configurable whitelist) or requires human review. If review is needed, the action becomes a proposal — a pending mutation that sits in your proposals queue until you approve, reject, or edit it.
checkPermissionOrPropose()If you are familiar with git, the event chain might sound similar — and the concepts do overlap. But there are key differences. The event chain is real-time (events are recorded as they happen, not in batches), automatic (no manual commits), and per-mutation (each property change is its own event, not grouped into files). You do not need to "save" or "commit" — every action is captured the moment it occurs.
The auto-approve behavior is configurable per workspace. A DEFAULT_AUTO_APPROVE whitelist defines which operations are safe enough to skip review (for example, AI reading data is always approved, while AI deleting entities always requires review). Workspace admins can override these defaults to be more permissive or more restrictive based on their needs.
For architecture details and implementation specifics, see the Event sourcing explained and Event flow architecture in the technical docs.