Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(types): align turn state aliases with generated wire schema

Steven Enamakel691ced9f236d
diff --git a/app/src/types/turnState.ts b/app/src/types/turnState.ts
index 4ac27a9f14..dcfce24e4a 100644
--- a/app/src/types/turnState.ts
+++ b/app/src/types/turnState.ts
@@ -1,7 +1,7 @@
/** TypeScript aliases generated from the persisted Rust session record schemas. */
import type { ThreadWireTypes } from './threadWire.generated';
-export type PersistedTurnState = ThreadWireTypes['turnState'];
+export type PersistedTurnState = ThreadWireTypes['getTurnState']['state'];
export type PersistedTurnLifecycle = PersistedTurnState['lifecycle'];
export type PersistedTurnPhase = NonNullable<PersistedTurnState['phase']>;
export type PersistedToolTimelineEntry = PersistedTurnState['toolTimeline'][number];
@@ -14,8 +14,8 @@ export type PersistedSubagentTranscriptItem = NonNullable<
PersistedSubagentActivity['transcript']
>[number];
-export type GetTurnStateResponse = Pick<ThreadWireTypes, 'turnState'>;
-export type ListTurnStatesResponse = ThreadWireTypes['turnStates'];
+export type GetTurnStateResponse = ThreadWireTypes['getTurnState'];
+export type ListTurnStatesResponse = ThreadWireTypes['listTurnStates'];
export type ClearTurnStateResponse = ThreadWireTypes['clearTurnState'];
export type AgentRun = ThreadWireTypes['agentRun'];
@@ -24,5 +24,5 @@ export type AgentRunStatus = AgentRun['status'];
export type RunTelemetry = NonNullable<AgentRun['telemetry']>;
export type RunEvent = ThreadWireTypes['runEvent'];
export type AgentRunListResponse = ThreadWireTypes['agentRunList'];
-export type AgentRunGetResponse = Pick<ThreadWireTypes, 'agentRunGet'>;
+export type AgentRunGetResponse = ThreadWireTypes['agentRunGet'];
export type RunEventListResponse = ThreadWireTypes['runEventList'];
diff --git a/crates/openhuman-core/src/threads/wire_schema_tests.rs b/crates/openhuman-core/src/threads/wire_schema_tests.rs
index 683c8961b2..9f4d21d512 100644
--- a/crates/openhuman-core/src/threads/wire_schema_tests.rs
+++ b/crates/openhuman-core/src/threads/wire_schema_tests.rs
@@ -15,7 +15,9 @@ fn thread_wire_schema_exports_the_core_and_session_records() {
"purgeResult",
"threadSearchHit",
"threadSearch",
- "turnState",
+ "getTurnState",
+ "listTurnStates",
+ "clearTurnState",
"agentRun",
"runEvent",
"runTelemetry",