Skip to main content

Module agent_changesets

Module agent_changesets 

Source
Expand description

Controllers for requests starting with /api/v0/main-frontend/agent-changesets: the review page of the changes a user’s AI agent staged.

Structs§

AgentChangesetsQuery
AgentPreviewLink
A login-free link to one page of a changeset as staged.
MainFrontendAgentChangesetsApiDoc 🔒
ReviewedRevisionRequest
A publish or discard of the changeset as the user reviewed it.

Functions§

_add_routes
authorize_own_changeset 🔒
Loads the changeset and checks that it is the user’s and that they may still edit its course.
create_preview_link 🔒
POST /api/v0/main-frontend/agent-changesets/{changeset_id}/preview-link/{page_id} - Mints a short-lived preview link for a page of the user’s changeset, so the review page can open the staged page as students would see it.
discard_changeset 🔒
POST /api/v0/main-frontend/agent-changesets/{changeset_id}/discard - Drops the user’s open changeset. Nothing of it reaches the live course. Rejected without changes if the changeset is no longer open or no longer the reviewed revision.
get_changeset 🔒
GET /api/v0/main-frontend/agent-changesets/{changeset_id} - One of the user’s changesets for the review page: what each staged entity changes, field by field and for pages as students see them, its risk reasons, the conflicts and the agent calls that staged the changes.
get_changeset_counts 🔒
GET /api/v0/main-frontend/agent-changesets/counts?course_id= - Whether the signed-in user has agent changesets in the course, and how many entities their open one stages, for the course management tab and its badge.
get_changesets 🔒
GET /api/v0/main-frontend/agent-changesets?course_id= - The signed-in user’s agent changesets in the course, newest first, with what each changes.
publish_changeset 🔒
POST /api/v0/main-frontend/agent-changesets/{changeset_id}/publish - Publishes the user’s open changeset, risky changes included. Rejected without changes if the changeset is no longer open or no longer the reviewed revision, if any staged page or entity changed live since it was staged, or if saving a staged entity fails.