Skip to content

Swift client: createTerminal / disposeTerminal have generated params but no AHPCommands builder #341

Description

@colbylwilliams

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions