type: "terminal" for a login flow that needs its terminal UI. The Client launches the Agent program it already has configured in an interactive terminal, with the args and env the method supplies, and the user logs in there. The method cannot supply a command. Exit status zero means the login succeeded. The terminal process is separate from the ACP connection, so the Client does not call authenticate or auth/login for a terminal method.
In ACP v1, Clients opt in with clientCapabilities.auth.terminal: true and reconnect to the Agent after a successful login. In ACP v2, Clients opt in with capabilities.auth.terminal: {}. After a successful login they reconnect and resume their sessions with session/resume, or first retry on the existing connection.