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: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ changes accumulate. Track in-flight protocol changes via PRs touching

Spec version: `0.4.0`

### Added

- `RootState` now carries an optional `_meta` property bag for
implementation-defined metadata about the agent host itself, mirroring the
MCP `_meta` convention. A well-known `hostBuild` key may carry build
information (version, commit, date) about the program hosting the agent host.

## [0.3.0] — 2026-06-05

Spec version: `0.3.0`
Expand Down
7 changes: 7 additions & 0 deletions clients/go/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ tag whose matching `## [X.Y.Z]` heading is missing from this file.

## [Unreleased]

### Added

- `RootState` now exposes an optional `_meta` property bag (`Meta
map[string]json.RawMessage`) for implementation-defined agent-host metadata,
such as a well-known `hostBuild` key carrying the host's build
version/commit/date.

## [0.3.0] — 2026-06-05

Implements AHP 0.3.0.
Expand Down
4 changes: 4 additions & 0 deletions clients/go/ahptypes/state.generated.go
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ type RootState struct {
Terminals []TerminalInfo `json:"terminals,omitempty"`
// Agent host configuration schema and current values
Config *RootConfigState `json:"config,omitempty"`
// Additional implementation-defined metadata about the agent host itself.
//
// Clients MAY look for well-known keys here to provide enhanced UI.
Meta map[string]json.RawMessage `json:"_meta,omitempty"`
}

// Live agent-host configuration metadata.
Expand Down
6 changes: 6 additions & 0 deletions clients/kotlin/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ versions (`*-SNAPSHOT`) are explicitly rejected by the publish pipeline; bump

## [Unreleased]

### Added

- `RootState` now exposes an optional `_meta` property bag (`meta: Map<String,
JsonElement>?`) for implementation-defined agent-host metadata, such as a
well-known `hostBuild` key carrying the host's build version/commit/date.

## [0.3.0] — 2026-06-05

Implements AHP 0.3.0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,14 @@ data class RootState(
/**
* Agent host configuration schema and current values
*/
val config: RootConfigState? = null
val config: RootConfigState? = null,
/**
* Additional implementation-defined metadata about the agent host itself.
*
* Clients MAY look for well-known keys here to provide enhanced UI.
*/
@SerialName("_meta")
val meta: Map<String, JsonElement>? = null
)

@Serializable
Expand Down
6 changes: 6 additions & 0 deletions clients/rust/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ matching `## [X.Y.Z]` heading is missing from this file.

## [Unreleased]

### Added

- `RootState` now exposes an optional `_meta` property bag (`meta:
Option<JsonObject>`) for implementation-defined agent-host metadata, such as
a well-known `hostBuild` key carrying the host's build version/commit/date.

## [0.3.0] — 2026-06-05

Implements AHP 0.3.0.
Expand Down
5 changes: 5 additions & 0 deletions clients/rust/crates/ahp-types/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,11 @@ pub struct RootState {
/// Agent host configuration schema and current values
#[serde(default, skip_serializing_if = "Option::is_none")]
pub config: Option<RootConfigState>,
/// Additional implementation-defined metadata about the agent host itself.
///
/// Clients MAY look for well-known keys here to provide enhanced UI.
#[serde(rename = "_meta", default, skip_serializing_if = "Option::is_none")]
pub meta: Option<JsonObject>,
}

/// Live agent-host configuration metadata.
Expand Down
1 change: 1 addition & 0 deletions clients/rust/crates/ahp/examples/reducers_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ fn main() {
active_sessions: None,
terminals: None,
config: None,
meta: None,
};

let envelopes = vec![
Expand Down
1 change: 1 addition & 0 deletions clients/rust/crates/ahp/src/hosts/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ pub(super) fn spawn(
active_sessions: None,
terminals: None,
config: None,
meta: None,
},
subscriptions: config.initial_subscriptions.clone(),
completion_trigger_characters: vec![],
Expand Down
1 change: 1 addition & 0 deletions clients/rust/crates/ahp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
//! active_sessions: None,
//! terminals: None,
//! config: None,
//! meta: None,
//! };
//!
//! let action = StateAction::RootActiveSessionsChanged(
Expand Down
1 change: 1 addition & 0 deletions clients/rust/crates/ahp/src/multi_host_state_mirror.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ impl MultiHostStateMirror {
active_sessions: None,
terminals: None,
config: None,
meta: None,
});
apply_action_to_root(root, &envelope.action);
return;
Expand Down
2 changes: 2 additions & 0 deletions clients/rust/crates/ahp/src/reducers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
//! active_sessions: None,
//! terminals: None,
//! config: None,
//! meta: None,
//! };
//!
//! // A root-scoped action mutates `RootState`.
Expand Down Expand Up @@ -1342,6 +1343,7 @@ mod tests {
active_sessions: None,
terminals: None,
config: None,
meta: None,
};
let a = StateAction::RootActiveSessionsChanged(
ahp_types::actions::RootActiveSessionsChangedAction { active_sessions: 3 },
Expand Down
1 change: 1 addition & 0 deletions clients/rust/crates/ahp/tests/multi_host_state_mirror.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ fn root_snapshot(agents: Vec<AgentInfo>) -> Snapshot {
active_sessions: None,
terminals: None,
config: None,
meta: None,
})),
from_seq: 0,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,17 +450,31 @@ public struct RootState: Codable, Sendable {
public var terminals: [TerminalInfo]?
/// Agent host configuration schema and current values
public var config: RootConfigState?
/// Additional implementation-defined metadata about the agent host itself.
///
/// Clients MAY look for well-known keys here to provide enhanced UI.
public var meta: [String: AnyCodable]?

enum CodingKeys: String, CodingKey {
case agents
case activeSessions
case terminals
case config
case meta = "_meta"
}

public init(
agents: [AgentInfo],
activeSessions: Int? = nil,
terminals: [TerminalInfo]? = nil,
config: RootConfigState? = nil
config: RootConfigState? = nil,
meta: [String: AnyCodable]? = nil
) {
self.agents = agents
self.activeSessions = activeSessions
self.terminals = terminals
self.config = config
self.meta = meta
}
}

Expand Down
6 changes: 6 additions & 0 deletions clients/swift/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ the tag matches the version pinned in [`VERSION`](VERSION).

## [Unreleased]

### Added

- `RootState` now exposes an optional `_meta` property bag (`meta: [String:
AnyCodable]?`) for implementation-defined agent-host metadata, such as a
well-known `hostBuild` key carrying the host's build version/commit/date.

## [0.3.0] — 2026-06-05

Implements AHP 0.3.0.
Expand Down
6 changes: 6 additions & 0 deletions clients/typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ hotfix escape hatch.

## [Unreleased]

### Added

- `RootState` now exposes an optional `_meta` property bag (`_meta?:
Record<string, unknown>`) for implementation-defined agent-host metadata, such
as a well-known `hostBuild` key carrying the host's build version/commit/date.

## [0.3.0] — 2026-06-05

Implements AHP 0.3.0.
Expand Down
5 changes: 5 additions & 0 deletions schema/actions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,11 @@
"config": {
"$ref": "#/$defs/RootConfigState",
"description": "Agent host configuration schema and current values"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional implementation-defined metadata about the agent host itself.\n\nClients MAY look for well-known keys here to provide enhanced UI."
}
},
"required": [
Expand Down
5 changes: 5 additions & 0 deletions schema/commands.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,11 @@
"config": {
"$ref": "#/$defs/RootConfigState",
"description": "Agent host configuration schema and current values"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional implementation-defined metadata about the agent host itself.\n\nClients MAY look for well-known keys here to provide enhanced UI."
}
},
"required": [
Expand Down
5 changes: 5 additions & 0 deletions schema/errors.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,11 @@
"config": {
"$ref": "#/$defs/RootConfigState",
"description": "Agent host configuration schema and current values"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional implementation-defined metadata about the agent host itself.\n\nClients MAY look for well-known keys here to provide enhanced UI."
}
},
"required": [
Expand Down
5 changes: 5 additions & 0 deletions schema/notifications.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,11 @@
"config": {
"$ref": "#/$defs/RootConfigState",
"description": "Agent host configuration schema and current values"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional implementation-defined metadata about the agent host itself.\n\nClients MAY look for well-known keys here to provide enhanced UI."
}
},
"required": [
Expand Down
5 changes: 5 additions & 0 deletions schema/state.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@
"config": {
"$ref": "#/$defs/RootConfigState",
"description": "Agent host configuration schema and current values"
},
"_meta": {
"type": "object",
"additionalProperties": {},
"description": "Additional implementation-defined metadata about the agent host itself.\n\nClients MAY look for well-known keys here to provide enhanced UI."
}
},
"required": [
Expand Down
6 changes: 6 additions & 0 deletions types/channels-root/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ export interface RootState {
terminals?: TerminalInfo[];
/** Agent host configuration schema and current values */
config?: RootConfigState;
/**
* Additional implementation-defined metadata about the agent host itself.
*
* Clients MAY look for well-known keys here to provide enhanced UI.
*/
_meta?: Record<string, unknown>;
}

/**
Expand Down
Loading