How a teacher’s AI agent edits course material through the MCP server without touching what students see. Every agent write is staged in the teacher’s open changeset for the course and reaches students only when the changeset is published; each call is logged with what it changed so that it can be reverted, and saves from the web UI and agents alike leave history.
One open changeset per teacher and course holds the full staged state of every entity it changes. Reads overlay these rows on the live content, and publishing writes them back.
| Name | Columns | Comment | Type |
|---|---|---|---|
| public.agent_changeset_entities | 11 | One page or entity an agent changeset changes, with its full staged state. Reads of the staged state overlay these rows on the live content; publishing writes after_snapshot back, pages through the same page save the CMS uses. Rows are removed when a later call stages the entity back to its base state or the user discards the entity. No deleted_at: a row is the current staged state, so it is deleted outright, and agent_changeset_call_entities keeps the history. | BASE TABLE |
| public.agent_changeset_preview_links | 9 | Login-free links that show a page of a course, or all of its pages, as published or as a changeset stages them. Each row is one link; only a hash of its token is stored, so reading the table does not reveal live links. Expired rows are deleted when a new link is minted. | BASE TABLE |
| public.agent_changesets | 9 | Unpublished course content changes one user’s AI agent has staged in one course. Every agent write lands in the user’s open changeset for the course; nothing reaches students until the changeset is published, by the agent with the material:publish scope or by the user on the review page. No deleted_at: a changeset ends in a final status instead, and its rows stay as the record of what was staged. | BASE TABLE |
One row per agent write call, with each touched entity’s snapshot before the call. A call is the unit an agent reverts, and published changes point back to the call that staged them.
| Name | Columns | Comment | Type |
|---|---|---|---|
| public.agent_changeset_call_entities | 9 | Each entity an agent write call touched, with its full snapshot just before the call and a digest of its snapshot just after it. Reverting the call restores the before snapshots. No deleted_at: part of the call’s audit log. | BASE TABLE |
| public.agent_changeset_calls | 11 | Audit log of agent write calls: one row per call that staged changes. A call is also the unit an agent reverts. No deleted_at: an audit log is never edited or removed. | BASE TABLE |
A snapshot after every save, from the web UI and agents alike, so any entity can be restored: pages in page_history, everything else in entity_history.
| Name | Columns | Comment | Type |
|---|---|---|---|
| public.entity_history | 11 | A full snapshot of a chapter, course module, course’s settings or course default review config after every save, from the web UI and from agents alike, like page_history for pages. The entity can be restored to any of these. No deleted_at: history is append-only. | BASE TABLE |
| public.page_history | 11 | Contains all past and current revisions of each page’s content. | BASE TABLE |
OAuth for MCP clients. Clients register through a metadata document at their client id URL, the user grants scopes per client, and tokens are bound to the MCP endpoint.
| Name | Columns | Comment | Type |
|---|---|---|---|
| public.oauth_access_tokens | 12 | Access tokens (opaque, hashed at rest). May be Bearer or DPoP-bound. | BASE TABLE |
| public.oauth_auth_codes | 16 | Temporary authorization codes issued to clients after user consent (pending grants). | BASE TABLE |
| public.oauth_clients | 20 | Registered OAuth 2.x clients (public and confidential). | BASE TABLE |
| public.oauth_refresh_tokens | 13 | Refresh tokens (opaque, hashed). May be sender-constrained by DPoP. | BASE TABLE |
| public.oauth_user_client_scopes | 7 | Stores remembered consent: which scopes a user has granted to a client. | BASE TABLE |
| Name | Columns | Comment | Type |
|---|---|---|---|
| public.courses | 29 | Collection of course materials and exercises that define a online course. | BASE TABLE |
| public.pages | 17 | A web page that either contains course material or information about a course. The content of the page is stored in the content field as as an array of blocks that have to be rendered before showing to users. Each page has a unique URL which can be customized if necessary. | BASE TABLE |
| public.users | 6 | Either students, teachers or staff. | BASE TABLE |
Generated by tbls