Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ Spec version: `0.3.0`
- Removed the `additions`, `deletions`, and `files` fields from
`ChangesetSummary`. Aggregate counts now live on `SessionSummary.changes`;
per-changeset views derive their own totals from `ChangesetState.files`.
- Renamed the `ChangesetSummary` interface to `Changeset` (catalogue entry
on `SessionSummary.changesets`). The on-the-wire shape is unchanged.
- Moved the `changesets` catalogue from `SessionSummary` to
`SessionState`. The `session/changesetsChanged` action now updates
`state.changesets` directly instead of `state.summary.changesets`.
- Renamed the `ChangesetSummary` interface to `Changeset`. The
on-the-wire shape is unchanged.
- Renamed the `UserMessage` type to `Message` and surfaced it consistently
across turn state (`Turn.message`, `ActiveTurn.message`, `PendingMessage.message`)
and the actions that carry it (`session/turnStarted`,
Expand Down
3 changes: 2 additions & 1 deletion clients/go/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ tag whose matching `## [X.Y.Z]` heading is missing from this file.

### Changed

- Renamed the `ChangesetSummary` type to `Changeset` (catalogue entry on `SessionSummary.changesets`). The on-the-wire shape is unchanged.
- Renamed the `ChangesetSummary` type to `Changeset`. The on-the-wire shape is unchanged.
- Moved the `changesets` catalogue from `SessionSummary` to `SessionState`. The `session/changesetsChanged` action now updates `state.changesets` directly instead of `state.summary.changesets`.

### Removed

Expand Down
6 changes: 5 additions & 1 deletion clients/go/ahp/reducers.go
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,11 @@ func ApplyActionToSession(state *ahptypes.SessionState, action ahptypes.StateAct
state.Summary.Activity = a.Activity
return ReduceOutcomeApplied
case *ahptypes.SessionChangesetsChangedAction:
state.Summary.Changesets = append([]ahptypes.Changeset(nil), a.Changesets...)
if a.Changesets == nil {
state.Changesets = nil
} else {
state.Changesets = append([]ahptypes.Changeset(nil), a.Changesets...)
}
return ReduceOutcomeApplied
case *ahptypes.SessionConfigChangedAction:
if state.Config == nil {
Expand Down
5 changes: 3 additions & 2 deletions clients/go/ahptypes/actions.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,9 @@ type SessionActivityChangedAction struct {

// The {@link Changeset | catalogue of changesets} the agent host
// advertises for this session changed. Replaces
// `state.summary.changesets` entirely (full-replacement semantics) — set
// to `undefined` to clear the catalogue.
// {@link SessionState.changesets | `state.changesets`} entirely
// (full-replacement semantics) — set to `undefined` to clear the
// catalogue.
//
// Producers dispatch this whenever entries are added or removed. The
// fan-out happens through this action so observers see catalogue
Expand Down
9 changes: 1 addition & 8 deletions clients/go/ahptypes/notifications.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ type SessionRemovedParams struct {
// {@link SessionSummary | `SessionSummary`} changes for a session the
// server has surfaced via `listSessions()` or `root/sessionAdded`.
// Servers MAY coalesce or debounce updates for noisy fields (for example,
// `modifiedAt` bumps while a turn is streaming, or rapidly changing
// `changesets`) at their discretion.
// `modifiedAt` bumps while a turn is streaming) at their discretion.
// - Clients that have no cached entry for `session` MAY ignore the
// notification; it is not a substitute for `root/sessionAdded`.
type SessionSummaryChangedParams struct {
Expand Down Expand Up @@ -185,12 +184,6 @@ type PartialSessionSummary struct {
Agent *AgentSelection `json:"agent,omitempty"`
// The working directory URI for this session
WorkingDirectory *URI `json:"workingDirectory,omitempty"`
// Catalogue of changesets the server can produce for this session. Each
// entry advertises a subscribable view of file changes (uncommitted,
// session-wide, per-turn, etc.) and the URI template the client expands
// before subscribing. See {@link Changeset} for the full shape and
// {@link /guide/changesets | Changesets} for an overview of the model.
Changesets []Changeset `json:"changesets,omitempty"`
// Aggregate summary of file changes associated with this session. Servers
// may populate this to give clients a quick at-a-glance view of the
// session's footprint (e.g., for list rendering) without requiring the
Expand Down
12 changes: 6 additions & 6 deletions clients/go/ahptypes/state.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,12 @@ type SessionState struct {
// and the host propagates them into this list (typically with the
// container's `clientId` set and `children` populated).
Customizations []Customization `json:"customizations,omitempty"`
// Catalogue of changesets the server can produce for this session. Each
// entry advertises a subscribable view of file changes (uncommitted,
// session-wide, per-turn, etc.) and the URI template the client expands
// before subscribing. See {@link Changeset} for the full shape and
// {@link /guide/changesets | Changesets} for an overview of the model.
Changesets []Changeset `json:"changesets,omitempty"`
// Additional provider-specific metadata for this session.
//
// Clients MAY look for well-known keys here to provide enhanced UI.
Expand Down Expand Up @@ -609,12 +615,6 @@ type SessionSummary struct {
Agent *AgentSelection `json:"agent,omitempty"`
// The working directory URI for this session
WorkingDirectory *URI `json:"workingDirectory,omitempty"`
// Catalogue of changesets the server can produce for this session. Each
// entry advertises a subscribable view of file changes (uncommitted,
// session-wide, per-turn, etc.) and the URI template the client expands
// before subscribing. See {@link Changeset} for the full shape and
// {@link /guide/changesets | Changesets} for an overview of the model.
Changesets []Changeset `json:"changesets,omitempty"`
// Aggregate summary of file changes associated with this session. Servers
// may populate this to give clients a quick at-a-glance view of the
// session's footprint (e.g., for list rendering) without requiring the
Expand Down
3 changes: 2 additions & 1 deletion clients/kotlin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ versions (`*-SNAPSHOT`) are explicitly rejected by the publish pipeline; bump

### Changed

- Renamed the `ChangesetSummary` type to `Changeset` (catalogue entry on `SessionSummary.changesets`). The on-the-wire shape is unchanged.
- Renamed the `ChangesetSummary` type to `Changeset`. The on-the-wire shape is unchanged.
- Moved the `changesets` catalogue from `SessionSummary` to `SessionState`. The `session/changesetsChanged` action now updates `state.changesets` directly instead of `state.summary.changesets`.

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -924,9 +924,7 @@ public fun sessionReducer(state: SessionState, action: StateAction): SessionStat
)

is StateActionSessionChangesetsChanged -> state.copy(
// Clear the field entirely when no changesets are provided, matching
// TS `{ ...summaryWithoutChangesets }` semantics (omits the key).
summary = state.summary.copy(changesets = action.value.changesets),
changesets = action.value.changesets,
)

is StateActionSessionConfigChanged -> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,14 +192,6 @@ data class PartialSessionSummary(
* The working directory URI for this session
*/
val workingDirectory: String? = null,
/**
* Catalogue of changesets the server can produce for this session. Each
* entry advertises a subscribable view of file changes (uncommitted,
* session-wide, per-turn, etc.) and the URI template the client expands
* before subscribing. See {@link Changeset} for the full shape and
* {@link /guide/changesets | Changesets} for an overview of the model.
*/
val changesets: List<Changeset>? = null,
/**
* Aggregate summary of file changes associated with this session. Servers
* may populate this to give clients a quick at-a-glance view of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,14 @@ data class SessionState(
* container's `clientId` set and `children` populated).
*/
val customizations: List<Customization>? = null,
/**
* Catalogue of changesets the server can produce for this session. Each
* entry advertises a subscribable view of file changes (uncommitted,
* session-wide, per-turn, etc.) and the URI template the client expands
* before subscribing. See {@link Changeset} for the full shape and
* {@link /guide/changesets | Changesets} for an overview of the model.
*/
val changesets: List<Changeset>? = null,
/**
* Additional provider-specific metadata for this session.
*
Expand Down Expand Up @@ -984,14 +992,6 @@ data class SessionSummary(
* The working directory URI for this session
*/
val workingDirectory: String? = null,
/**
* Catalogue of changesets the server can produce for this session. Each
* entry advertises a subscribable view of file changes (uncommitted,
* session-wide, per-turn, etc.) and the URI template the client expands
* before subscribing. See {@link Changeset} for the full shape and
* {@link /guide/changesets | Changesets} for an overview of the model.
*/
val changesets: List<Changeset>? = null,
/**
* Aggregate summary of file changes associated with this session. Servers
* may populate this to give clients a quick at-a-glance view of the
Expand Down
3 changes: 2 additions & 1 deletion clients/rust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ matching `## [X.Y.Z]` heading is missing from this file.

### Changed

- Renamed the `ChangesetSummary` type to `Changeset` (catalogue entry on `SessionSummary.changesets`). The on-the-wire shape is unchanged.
- Renamed the `ChangesetSummary` type to `Changeset`. The on-the-wire shape is unchanged.
- Moved the `changesets` catalogue from `SessionSummary` to `SessionState`. The `session/changesetsChanged` action now updates `state.changesets` directly instead of `state.summary.changesets`.

### Removed

Expand Down
5 changes: 3 additions & 2 deletions clients/rust/crates/ahp-types/src/actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,8 +577,9 @@ pub struct SessionActivityChangedAction {

/// The {@link Changeset | catalogue of changesets} the agent host
/// advertises for this session changed. Replaces
/// `state.summary.changesets` entirely (full-replacement semantics) — set
/// to `undefined` to clear the catalogue.
/// {@link SessionState.changesets | `state.changesets`} entirely
/// (full-replacement semantics) — set to `undefined` to clear the
/// catalogue.
///
/// Producers dispatch this whenever entries are added or removed. The
/// fan-out happens through this action so observers see catalogue
Expand Down
10 changes: 1 addition & 9 deletions clients/rust/crates/ahp-types/src/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ pub struct SessionRemovedParams {
/// {@link SessionSummary | `SessionSummary`} changes for a session the
/// server has surfaced via `listSessions()` or `root/sessionAdded`.
/// Servers MAY coalesce or debounce updates for noisy fields (for example,
/// `modifiedAt` bumps while a turn is streaming, or rapidly changing
/// `changesets`) at their discretion.
/// `modifiedAt` bumps while a turn is streaming) at their discretion.
/// - Clients that have no cached entry for `session` MAY ignore the
/// notification; it is not a substitute for `root/sessionAdded`.
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
Expand Down Expand Up @@ -218,13 +217,6 @@ pub struct PartialSessionSummary {
/// The working directory URI for this session
#[serde(default, skip_serializing_if = "Option::is_none")]
pub working_directory: Option<Uri>,
/// Catalogue of changesets the server can produce for this session. Each
/// entry advertises a subscribable view of file changes (uncommitted,
/// session-wide, per-turn, etc.) and the URI template the client expands
/// before subscribing. See {@link Changeset} for the full shape and
/// {@link /guide/changesets | Changesets} for an overview of the model.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub changesets: Option<Vec<Changeset>>,
/// Aggregate summary of file changes associated with this session. Servers
/// may populate this to give clients a quick at-a-glance view of the
/// session's footprint (e.g., for list rendering) without requiring the
Expand Down
14 changes: 7 additions & 7 deletions clients/rust/crates/ahp-types/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,13 @@ pub struct SessionState {
/// container's `clientId` set and `children` populated).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub customizations: Option<Vec<Customization>>,
/// Catalogue of changesets the server can produce for this session. Each
/// entry advertises a subscribable view of file changes (uncommitted,
/// session-wide, per-turn, etc.) and the URI template the client expands
/// before subscribing. See {@link Changeset} for the full shape and
/// {@link /guide/changesets | Changesets} for an overview of the model.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub changesets: Option<Vec<Changeset>>,
/// Additional provider-specific metadata for this session.
///
/// Clients MAY look for well-known keys here to provide enhanced UI.
Expand Down Expand Up @@ -782,13 +789,6 @@ pub struct SessionSummary {
/// The working directory URI for this session
#[serde(default, skip_serializing_if = "Option::is_none")]
pub working_directory: Option<Uri>,
/// Catalogue of changesets the server can produce for this session. Each
/// entry advertises a subscribable view of file changes (uncommitted,
/// session-wide, per-turn, etc.) and the URI template the client expands
/// before subscribing. See {@link Changeset} for the full shape and
/// {@link /guide/changesets | Changesets} for an overview of the model.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub changesets: Option<Vec<Changeset>>,
/// Aggregate summary of file changes associated with this session. Servers
/// may populate this to give clients a quick at-a-glance view of the
/// session's footprint (e.g., for list rendering) without requiring the
Expand Down
3 changes: 0 additions & 3 deletions clients/rust/crates/ahp/src/hosts/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,9 +720,6 @@ fn apply_summary_changes(
if let Some(v) = &changes.working_directory {
existing.working_directory = Some(v.clone());
}
if let Some(v) = &changes.changesets {
existing.changesets = Some(v.clone());
}
}

// ─── Random helpers (no external dep on `rand`) ─────────────────────────────
Expand Down
4 changes: 2 additions & 2 deletions clients/rust/crates/ahp/src/reducers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ pub fn apply_action_to_session(state: &mut SessionState, action: &StateAction) -
ReduceOutcome::Applied
}
StateAction::SessionChangesetsChanged(a) => {
state.summary.changesets = a.changesets.clone();
state.changesets = a.changesets.clone();
ReduceOutcome::Applied
}
StateAction::SessionConfigChanged(a) => {
Expand Down Expand Up @@ -1219,7 +1219,6 @@ mod tests {
model: None,
agent: None,
working_directory: None,
changesets: None,
changes: None,
},
lifecycle: SessionLifecycle::Creating,
Expand All @@ -1233,6 +1232,7 @@ mod tests {
input_requests: None,
config: None,
customizations: None,
changesets: None,
meta: None,
}
}
Expand Down
1 change: 0 additions & 1 deletion clients/rust/crates/ahp/tests/hosts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,6 @@ fn make_summary(uri: &str, title: &str, modified_at: i64) -> ahp_types::state::S
model: None,
agent: None,
working_directory: None,
changesets: None,
changes: None,
}
}
Expand Down
3 changes: 1 addition & 2 deletions clients/rust/crates/ahp/tests/multi_host_state_mirror.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ fn session_state(title: &str, resource: &str) -> SessionState {
model: None,
agent: None,
working_directory: None,
changesets: None,
changes: None,
},
lifecycle: SessionLifecycle::Ready,
Expand All @@ -70,6 +69,7 @@ fn session_state(title: &str, resource: &str) -> SessionState {
input_requests: None,
config: None,
customizations: None,
changesets: None,
meta: None,
}
}
Expand Down Expand Up @@ -364,7 +364,6 @@ fn non_action_event_is_ignored() {
model: None,
agent: None,
working_directory: None,
changesets: None,
changes: None,
},
}),
Expand Down
1 change: 0 additions & 1 deletion clients/swift/AHPApp/AHPApp/Store/AppStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,6 @@ final class AppStore {
if let v = changes.project { summary.project = v }
if let v = changes.model { summary.model = v }
if let v = changes.workingDirectory { summary.workingDirectory = v }
if let v = changes.changesets { summary.changesets = v }
sessionSummariesCache[uri] = summary
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,6 @@ public struct PartialSessionSummary: Codable, Sendable {
public var agent: AgentSelection?
/// The working directory URI for this session
public var workingDirectory: String?
/// Catalogue of changesets the server can produce for this session. Each
/// entry advertises a subscribable view of file changes (uncommitted,
/// session-wide, per-turn, etc.) and the URI template the client expands
/// before subscribing. See {@link Changeset} for the full shape and
/// {@link /guide/changesets | Changesets} for an overview of the model.
public var changesets: [Changeset]?
/// Aggregate summary of file changes associated with this session. Servers
/// may populate this to give clients a quick at-a-glance view of the
/// session's footprint (e.g., for list rendering) without requiring the
Expand All @@ -188,7 +182,6 @@ public struct PartialSessionSummary: Codable, Sendable {
model: ModelSelection? = nil,
agent: AgentSelection? = nil,
workingDirectory: String? = nil,
changesets: [Changeset]? = nil,
changes: ChangesSummary? = nil
) {
self.resource = resource
Expand All @@ -202,7 +195,6 @@ public struct PartialSessionSummary: Codable, Sendable {
self.model = model
self.agent = agent
self.workingDirectory = workingDirectory
self.changesets = changesets
self.changes = changes
}
}
Loading
Loading