The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(threads): expose turn state and run ledger wire schemas
Steven Enamakel0f3c8b7c0079
diff --git a/crates/openhuman-core/src/threads/turn_state/rpc_types.rs b/crates/openhuman-core/src/threads/turn_state/rpc_types.rsindex 3d04284521..a1043a7c6d 100644--- a/crates/openhuman-core/src/threads/turn_state/rpc_types.rs+++ b/crates/openhuman-core/src/threads/turn_state/rpc_types.rs@@ -9,14 +9,14 @@ use serde::{Deserialize, Serialize};use tinyagents_session::turn_state::types::{PersistedToolFailure, TurnState};/// Request payload for `openhuman.threads_turn_state_get`.-#[derive(Debug, Clone, Serialize, Deserialize)]+#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]#[serde(deny_unknown_fields)]pub struct GetTurnStateRequest {pub thread_id: String,}/// Response payload for `openhuman.threads_turn_state_get`.-#[derive(Debug, Clone, Serialize, Deserialize)]+#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]#[serde(rename_all = "camelCase")]pub struct GetTurnStateResponse {/// `None` when no snapshot exists for the thread.@@ -26,7 +26,7 @@ pub struct GetTurnStateResponse {/// Response payload for `openhuman.threads_turn_state_list` and/// `openhuman.threads_turn_state_history`.-#[derive(Debug, Clone, Serialize, Deserialize)]+#[derive(Debug, Clone, Serialize, Deserialize, schemars::JsonSchema)]#[serde(rename_all = "camelCase")]pub struct ListTurnStatesResponse {pub turn_states: Vec<TurnState>,diff --git a/crates/openhuman-core/src/threads/wire_schema.rs b/crates/openhuman-core/src/threads/wire_schema.rsindex 74dff5e249..ecb57a11fe 100644--- a/crates/openhuman-core/src/threads/wire_schema.rs+++ b/crates/openhuman-core/src/threads/wire_schema.rs@@ -8,6 +8,12 @@ use crate::threads::rpc_models::{PurgeConversationThreadsResponse,};+#[derive(JsonSchema)]+#[serde(rename_all = "camelCase")]+pub struct RunLedgerGetWireResponse {+ pub run: Option<tinyagents_session::run_ledger::types::AgentRun>,+}+/// Root schema whose properties provide the UI-facing thread record aliases.#[derive(JsonSchema)]#[serde(rename_all = "camelCase")]@@ -20,10 +26,15 @@ pub struct ThreadWireTypes {pub purge_result: PurgeConversationThreadsResponse,pub thread_search_hit: super::ops::ThreadSearchHit,pub thread_search: super::ops::ThreadSearchResponse,- pub turn_state: tinyagents_session::turn_state::types::TurnState,+ pub get_turn_state: super::turn_state::rpc_types::GetTurnStateResponse,+ pub list_turn_states: super::turn_state::rpc_types::ListTurnStatesResponse,+ pub clear_turn_state: super::turn_state::rpc_types::ClearTurnStateResponse,pub agent_run: tinyagents_session::run_ledger::types::AgentRun,pub run_event: tinyagents_session::run_ledger::types::RunEvent,pub run_telemetry: tinyagents_session::run_ledger::types::RunTelemetry,+ pub agent_run_list: tinyagents_session::run_ledger::types::AgentRunListResponse,+ pub agent_run_get: RunLedgerGetWireResponse,+ pub run_event_list: tinyagents_session::run_ledger::types::RunEventListResponse,}/// Serialize the authoritative core/session record schemas for TypeScript codegen.