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.
This commit is contained in:
Brennan Benson
2026-09-25 01:11:58 -07:00
parent 250250e59d
commit b58818524d
+4 -16
View File
@@ -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 {