Summary
The terminal channel is fully modeled for inbound state (a terminalReducer plus all terminal/* actions) and the outbound command params are generated — but there is no typed builder to actually send the two client→server terminal commands, unlike the sibling session commands.
What exists today
- Protocol:
createTerminal and disposeTerminal, both @direction Client → Server.
- Swift (module
AgentHostProtocol): CreateTerminalParams and DisposeTerminalParams are generated; terminalReducer(state:action:) and the full set of terminal/* StateActions (terminal/data, terminal/exited, terminal/claimed, terminal/resized, …) exist and work.
The gap
AHPCommands has builders for createSession and disposeSession, but none for createTerminal / disposeTerminal.
AHPClient has no typed method for them either.
- So the terminal channel can be fully consumed (inbound, via the reducer) but cannot be driven (outbound, create/dispose) without
client.request(method: "createTerminal", params: …) using a raw method string.
Proposed enhancement
Add AHPCommands.createTerminal / AHPCommands.disposeTerminal builders (and/or AHPClient methods) for parity with createSession / disposeSession, so the generated CreateTerminalParams / DisposeTerminalParams are reachable through the typed surface.
Version
Observed at protocol version 0.5.2 (latest release) and current main.
Summary
The terminal channel is fully modeled for inbound state (a
terminalReducerplus allterminal/*actions) and the outbound command params are generated — but there is no typed builder to actually send the two client→server terminal commands, unlike the sibling session commands.What exists today
createTerminalanddisposeTerminal, both@direction Client → Server.AgentHostProtocol):CreateTerminalParamsandDisposeTerminalParamsare generated;terminalReducer(state:action:)and the full set ofterminal/*StateActions (terminal/data,terminal/exited,terminal/claimed,terminal/resized, …) exist and work.The gap
AHPCommandshas builders forcreateSessionanddisposeSession, but none forcreateTerminal/disposeTerminal.AHPClienthas no typed method for them either.client.request(method: "createTerminal", params: …)using a raw method string.Proposed enhancement
Add
AHPCommands.createTerminal/AHPCommands.disposeTerminalbuilders (and/orAHPClientmethods) for parity withcreateSession/disposeSession, so the generatedCreateTerminalParams/DisposeTerminalParamsare reachable through the typed surface.Version
Observed at protocol version
0.5.2(latest release) and currentmain.