pub struct Changeset {
pub label: String,
pub uri_template: String,
pub description: Option<String>,
pub change_kind: String,
}Expand description
Catalogue entry describing one changeset the server can produce for a session.
Catalogue entries are intentionally lightweight — just enough to render a chip or list row without subscribing. Full per-changeset detail ({@link ChangesetState}) lives on the subscribable URI obtained by expanding {@link uriTemplate}.
Fields§
§label: StringHuman-readable label, e.g. "Uncommitted Changes".
uri_template: StringRFC 6570 URI template. Clients parse the variables directly out of the
template using the standard {name} syntax — they are not redeclared
here.
Only the following template shapes are defined by this protocol; any other variable name MUST be ignored by clients (there is no protocol-defined way to obtain values for unknown variables):
| Variables in template | Meaning |
|---|---|
| (none) | A static, session-wide changeset. The template is itself a subscribable URI. |
{turnId} | Per-turn slice. Expand with a Turn.id from the session. |
{originalTurnId} and {modifiedTurnId} | Diff between two turns. Both variables MUST be present. |
Future protocol versions MAY add new well-known variables.
description: Option<String>Optional longer description.
change_kind: StringAdvisory hint describing what kind of changeset this is, so clients can group, sort, or render an appropriate icon without parsing {@link uriTemplate}. Recognized values include:
'session': a static, session-wide changeset covering all changes the agent has produced in this session.'branch': changes relative to a base branch (e.g. a feature branch diffed againstmain).'uncommitted': the workspace’s current uncommitted changes.'turn': changes produced by a single turn. Typically paired with a{turnId}variable in {@link uriTemplate}.'compare-turns': a diff between two turns. Typically paired with{originalTurnId}and{modifiedTurnId}variables in {@link uriTemplate}.
Implementations MAY provide additional values; clients SHOULD fall back to a reasonable default when an unknown value is encountered.