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.
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| changeset_id | uuid | false | public.agent_changesets | The changeset the call staged its changes into. Its user is the user the agent acted for. | ||
| client_name | text | false | The client’s display name at the time of the call. History rows written by publishing the call’s changes show it as “via <client_name>”. | |||
| created_at | timestamp with time zone | now() | false | Timestamp when the record was created. | ||
| id | uuid | uuid_generate_v4() | false | public.agent_changeset_call_entities public.agent_changeset_calls public.entity_history public.page_history | A unique, stable identifier for the record. | |
| oauth_client_id | uuid | false | public.oauth_clients | The OAuth client (agent) that made the call. | ||
| oauth_grant_id | uuid | false | oauth_user_client_scopes.id of the grant the call’s token came from. Not a foreign key: revoking a grant deletes that row, and the audit trail must survive it. | |||
| ops | jsonb | false | The operations the call was given, as the agent sent them. | |||
| revert_of_call_id | uuid | true | public.agent_changeset_calls | If this call reverted an earlier call, that call. | ||
| summary | text | true | Short human-readable description of what the call changed. | |||
| tool_name | text | false | The MCP tool that was called. | |||
| updated_at | timestamp with time zone | now() | false | Timestamp when the record was last updated. The field is updated automatically by the set_timestamp trigger. |
| Name | Definition |
|---|---|
| AI agent changesets | 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. |
| Name | Type | Definition |
|---|---|---|
| agent_changeset_calls_changeset_id_fkey | FOREIGN KEY | FOREIGN KEY (changeset_id) REFERENCES agent_changesets(id) |
| agent_changeset_calls_changeset_id_not_null | n | NOT NULL changeset_id |
| agent_changeset_calls_client_name_not_null | n | NOT NULL client_name |
| agent_changeset_calls_created_at_not_null | n | NOT NULL created_at |
| agent_changeset_calls_id_not_null | n | NOT NULL id |
| agent_changeset_calls_oauth_client_id_fkey | FOREIGN KEY | FOREIGN KEY (oauth_client_id) REFERENCES oauth_clients(id) |
| agent_changeset_calls_oauth_client_id_not_null | n | NOT NULL oauth_client_id |
| agent_changeset_calls_oauth_grant_id_not_null | n | NOT NULL oauth_grant_id |
| agent_changeset_calls_ops_not_null | n | NOT NULL ops |
| agent_changeset_calls_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| agent_changeset_calls_revert_of_call_id_fkey | FOREIGN KEY | FOREIGN KEY (revert_of_call_id) REFERENCES agent_changeset_calls(id) |
| agent_changeset_calls_tool_name_not_null | n | NOT NULL tool_name |
| agent_changeset_calls_updated_at_not_null | n | NOT NULL updated_at |
| Name | Definition |
|---|---|
| agent_changeset_calls_pkey | CREATE UNIQUE INDEX agent_changeset_calls_pkey ON public.agent_changeset_calls USING btree (id) |
| idx_agent_changeset_calls_changeset | CREATE INDEX idx_agent_changeset_calls_changeset ON public.agent_changeset_calls USING btree (changeset_id, created_at) |
| Name | Definition |
|---|---|
| set_timestamp | CREATE TRIGGER set_timestamp BEFORE UPDATE ON public.agent_changeset_calls FOR EACH ROW EXECUTE FUNCTION trigger_set_timestamp() |
Generated by tbls