From b58818524d7eea4114b958ecd8b429ffcbee504c Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Fri, 25 Sep 2026 01:11:58 -0700 Subject: [PATCH] refactor(native-chat): type the owner-status reply as the host sends it The handoffStatus reply type still listed the terminal handoff's fields and states (terminal placement, host label, proof retry, queued and waiting phases, the to-terminal direction). No host writes them any more and the only client reader parses the reply as unknown, so they described nothing. The reply on the wire is unchanged. --- src/shared/agent-session-wire.ts | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/shared/agent-session-wire.ts b/src/shared/agent-session-wire.ts index e6e193b40dd..46864533315 100644 --- a/src/shared/agent-session-wire.ts +++ b/src/shared/agent-session-wire.ts @@ -35,26 +35,14 @@ import type { AgentProviderSessionMetadata } from './agent-session-resume' import type { StructuredAgentSessionProjectedStatus } from './structured-agent-session-projection' /** `agentSession.handoffStatus`. Named for the removed terminal handoff; released desktop clients - * still read `owner`, and older hosts can still send the terminal-era fields. */ + * still read `owner`. Clients parse the reply as unknown, since older hosts sent more fields. */ export type AgentSessionHandoffStatus = { owner: AgentSessionOwnerRuntimeKind | 'none' - direction: 'to-tui' | 'to-native' | null - phase: 'idle' | 'queued' | 'switching' | 'waiting-for-exit' | 'failed' + direction: 'to-native' | null + phase: 'idle' | 'switching' | 'failed' stage: AgentSessionHandoffStage | null operationId: string | null - hostLabel?: string - terminal?: { - handle: string - tabId: string - paneKey: string - ptyId?: string - } - error?: { - message: string - details?: string - recoverableOwner: AgentSessionOwnerRuntimeKind | 'none' - canRetryProof?: boolean - } + error?: { message: string; recoverableOwner: 'none' } } export type {