acp-sdk 0.10.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +21 -0
  3. data/README.md +15 -5
  4. data/lib/acp/agent_connection/client.rb +7 -19
  5. data/lib/acp/agent_connection/optional_method/spec.rb +42 -0
  6. data/lib/acp/agent_connection/optional_method.rb +36 -0
  7. data/lib/acp/agent_connection.rb +17 -40
  8. data/lib/acp/agent_process.rb +0 -13
  9. data/lib/acp/client_connection/streams.rb +183 -0
  10. data/lib/acp/client_connection.rb +227 -384
  11. data/lib/acp/protocol.rb +33 -0
  12. data/lib/acp/request_error.rb +7 -17
  13. data/lib/acp/transport/cancellation.rb +0 -7
  14. data/lib/acp/transport/reply.rb +0 -2
  15. data/lib/acp/transport/stderr_logger.rb +1 -2
  16. data/lib/acp/transport/stdio.rb +16 -22
  17. data/lib/acp/types/audio_content.rb +3 -46
  18. data/lib/acp/types/auth_method_terminal.rb +3 -59
  19. data/lib/acp/types/available_commands_update.rb +3 -32
  20. data/lib/acp/types/boolean_property_schema.rb +3 -41
  21. data/lib/acp/types/check.rb +210 -0
  22. data/lib/acp/types/config_option_update.rb +3 -32
  23. data/lib/acp/types/content.rb +3 -29
  24. data/lib/acp/types/{elicitation_url_mode → create_elicitation_request/mode/form}/scope.rb +1 -1
  25. data/lib/acp/types/create_elicitation_request/mode/form.rb +3 -3
  26. data/lib/acp/types/{elicitation_form_mode → create_elicitation_request/mode/url}/scope.rb +1 -1
  27. data/lib/acp/types/create_elicitation_request/mode/url.rb +3 -3
  28. data/lib/acp/types/current_mode_update.rb +3 -29
  29. data/lib/acp/types/diff.rb +3 -41
  30. data/lib/acp/types/elicitation_accept_action.rb +3 -26
  31. data/lib/acp/types/elicitation_form_mode.rb +3 -33
  32. data/lib/acp/types/elicitation_url_mode.rb +3 -35
  33. data/lib/acp/types/embedded_resource.rb +3 -44
  34. data/lib/acp/types/image_content.rb +3 -58
  35. data/lib/acp/types/integer_property_schema.rb +3 -60
  36. data/lib/acp/types/mcp_server_http.rb +3 -44
  37. data/lib/acp/types/mcp_server_sse.rb +3 -44
  38. data/lib/acp/types/multi_select_property_schema.rb +3 -70
  39. data/lib/acp/types/number_property_schema.rb +3 -60
  40. data/lib/acp/types/parse_error.rb +37 -0
  41. data/lib/acp/types/plan.rb +3 -29
  42. data/lib/acp/types/resource_link.rb +3 -79
  43. data/lib/acp/types/selected_permission_outcome.rb +3 -26
  44. data/lib/acp/types/session_config_boolean.rb +3 -21
  45. data/lib/acp/types/session_config_select.rb +3 -33
  46. data/lib/acp/types/session_info_update.rb +3 -42
  47. data/lib/acp/types/string_multi_select_items.rb +3 -29
  48. data/lib/acp/types/string_property_schema.rb +3 -105
  49. data/lib/acp/types/terminal.rb +3 -29
  50. data/lib/acp/types/text_content.rb +3 -40
  51. data/lib/acp/types/tool_call.rb +3 -115
  52. data/lib/acp/types/unstable/compaction_summary_chunk.rb +3 -35
  53. data/lib/acp/types/unstable/compaction_update.rb +3 -56
  54. data/lib/acp/types/unstable/idle_state_update.rb +3 -40
  55. data/lib/acp/types/unstable/mcp_server_acp.rb +3 -35
  56. data/lib/acp/types/unstable/nes_edit_suggestion.rb +3 -61
  57. data/lib/acp/types/unstable/nes_jump_suggestion.rb +3 -45
  58. data/lib/acp/types/unstable/nes_rename_suggestion.rb +3 -51
  59. data/lib/acp/types/unstable/nes_search_and_replace_suggestion.rb +3 -60
  60. data/lib/acp/types/unstable/notice.rb +3 -41
  61. data/lib/acp/types/unstable/plan_file.rb +3 -35
  62. data/lib/acp/types/unstable/plan_items.rb +3 -38
  63. data/lib/acp/types/unstable/plan_markdown.rb +3 -35
  64. data/lib/acp/types/unstable/plan_removed.rb +3 -26
  65. data/lib/acp/types/unstable/plan_update.rb +3 -33
  66. data/lib/acp/types/unstable/requires_action_state_update.rb +3 -21
  67. data/lib/acp/types/unstable/running_state_update.rb +3 -21
  68. data/lib/acp/types/unstable/session_message.rb +3 -56
  69. data/lib/acp/types/unstable/session_message_chunk.rb +3 -53
  70. data/lib/acp/types/unstable/subagent_update.rb +3 -65
  71. data/lib/acp/types/unstable/unknown_state_update.rb +3 -21
  72. data/lib/acp/types/unstable.rb +20 -20
  73. data/lib/acp/types/usage_update.rb +3 -41
  74. data/lib/acp/types.rb +7 -246
  75. data/lib/acp/version.rb +1 -1
  76. data/sig/generated/acp/agent_connection/client.rbs +10 -19
  77. data/sig/generated/acp/agent_connection/optional_method/spec.rbs +32 -0
  78. data/sig/generated/acp/agent_connection/optional_method.rbs +3 -0
  79. data/sig/generated/acp/agent_connection.rbs +16 -24
  80. data/sig/generated/acp/agent_process.rbs +0 -13
  81. data/sig/generated/acp/client_connection/streams.rbs +94 -0
  82. data/sig/generated/acp/client_connection.rbs +100 -159
  83. data/sig/generated/acp/protocol.rbs +9 -0
  84. data/sig/generated/acp/request_error.rbs +7 -17
  85. data/sig/generated/acp/transport/cancellation.rbs +0 -7
  86. data/sig/generated/acp/transport/reply.rbs +0 -2
  87. data/sig/generated/acp/transport/stderr_logger.rbs +1 -2
  88. data/sig/generated/acp/transport/stdio.rbs +9 -21
  89. data/sig/generated/acp/types/audio_content.rbs +1 -27
  90. data/sig/generated/acp/types/auth_method_terminal.rbs +1 -35
  91. data/sig/generated/acp/types/available_commands_update.rbs +1 -19
  92. data/sig/generated/acp/types/boolean_property_schema.rbs +1 -27
  93. data/sig/generated/acp/types/check.rbs +115 -0
  94. data/sig/generated/acp/types/config_option_update.rbs +1 -19
  95. data/sig/generated/acp/types/content.rbs +1 -19
  96. data/sig/generated/acp/types/{elicitation_url_mode → create_elicitation_request/mode/form}/scope.rbs +2 -2
  97. data/sig/generated/acp/types/create_elicitation_request/mode/form.rbs +3 -3
  98. data/sig/generated/acp/types/{elicitation_form_mode → create_elicitation_request/mode/url}/scope.rbs +2 -2
  99. data/sig/generated/acp/types/create_elicitation_request/mode/url.rbs +3 -3
  100. data/sig/generated/acp/types/current_mode_update.rbs +1 -19
  101. data/sig/generated/acp/types/diff.rbs +1 -27
  102. data/sig/generated/acp/types/elicitation_accept_action.rbs +1 -15
  103. data/sig/generated/acp/types/elicitation_form_mode.rbs +1 -19
  104. data/sig/generated/acp/types/elicitation_url_mode.rbs +1 -23
  105. data/sig/generated/acp/types/embedded_resource.rbs +1 -23
  106. data/sig/generated/acp/types/image_content.rbs +1 -31
  107. data/sig/generated/acp/types/integer_property_schema.rbs +1 -35
  108. data/sig/generated/acp/types/mcp_server_http.rbs +1 -27
  109. data/sig/generated/acp/types/mcp_server_sse.rbs +1 -27
  110. data/sig/generated/acp/types/multi_select_property_schema.rbs +1 -39
  111. data/sig/generated/acp/types/number_property_schema.rbs +1 -35
  112. data/sig/generated/acp/types/parse_error.rbs +22 -0
  113. data/sig/generated/acp/types/plan.rbs +1 -19
  114. data/sig/generated/acp/types/resource_link.rbs +1 -43
  115. data/sig/generated/acp/types/selected_permission_outcome.rbs +1 -19
  116. data/sig/generated/acp/types/session_config_boolean.rbs +1 -15
  117. data/sig/generated/acp/types/session_config_select.rbs +1 -19
  118. data/sig/generated/acp/types/session_info_update.rbs +1 -23
  119. data/sig/generated/acp/types/string_multi_select_items.rbs +1 -19
  120. data/sig/generated/acp/types/string_property_schema.rbs +1 -51
  121. data/sig/generated/acp/types/terminal.rbs +1 -19
  122. data/sig/generated/acp/types/text_content.rbs +1 -23
  123. data/sig/generated/acp/types/tool_call.rbs +1 -51
  124. data/sig/generated/acp/types/unstable/compaction_summary_chunk.rbs +1 -23
  125. data/sig/generated/acp/types/unstable/compaction_update.rbs +1 -31
  126. data/sig/generated/acp/types/unstable/idle_state_update.rbs +1 -23
  127. data/sig/generated/acp/types/unstable/mcp_server_acp.rbs +1 -23
  128. data/sig/generated/acp/types/unstable/nes_edit_suggestion.rbs +1 -31
  129. data/sig/generated/acp/types/unstable/nes_jump_suggestion.rbs +1 -27
  130. data/sig/generated/acp/types/unstable/nes_rename_suggestion.rbs +1 -31
  131. data/sig/generated/acp/types/unstable/nes_search_and_replace_suggestion.rbs +1 -35
  132. data/sig/generated/acp/types/unstable/notice.rbs +1 -27
  133. data/sig/generated/acp/types/unstable/plan_file.rbs +1 -23
  134. data/sig/generated/acp/types/unstable/plan_items.rbs +1 -23
  135. data/sig/generated/acp/types/unstable/plan_markdown.rbs +1 -23
  136. data/sig/generated/acp/types/unstable/plan_removed.rbs +1 -19
  137. data/sig/generated/acp/types/unstable/plan_update.rbs +1 -19
  138. data/sig/generated/acp/types/unstable/requires_action_state_update.rbs +1 -15
  139. data/sig/generated/acp/types/unstable/running_state_update.rbs +1 -15
  140. data/sig/generated/acp/types/unstable/session_message.rbs +1 -31
  141. data/sig/generated/acp/types/unstable/session_message_chunk.rbs +1 -31
  142. data/sig/generated/acp/types/unstable/subagent_update.rbs +1 -35
  143. data/sig/generated/acp/types/unstable/unknown_state_update.rbs +1 -15
  144. data/sig/generated/acp/types/usage_update.rbs +1 -27
  145. data/sig/generated/acp/types.rbs +6 -143
  146. data/sig/manual/acp/agent_connection.rbs +0 -30
  147. data/sig/manual/acp/client_connection.rbs +7 -2
  148. data/sig/manual/acp/{agent_connection/optional_method/logout.rbs → protocol.rbs} +3 -3
  149. data/sig/manual/acp/transport/stdio.rbs +0 -2
  150. data/sig/manual/acp/transport.rbs +25 -2
  151. metadata +16 -40
  152. data/lib/acp/agent_connection/optional_method/authenticate.rb +0 -21
  153. data/lib/acp/agent_connection/optional_method/close_session.rb +0 -21
  154. data/lib/acp/agent_connection/optional_method/delete_session.rb +0 -21
  155. data/lib/acp/agent_connection/optional_method/disable_provider.rb +0 -23
  156. data/lib/acp/agent_connection/optional_method/fork_session.rb +0 -23
  157. data/lib/acp/agent_connection/optional_method/list_providers.rb +0 -23
  158. data/lib/acp/agent_connection/optional_method/list_sessions.rb +0 -21
  159. data/lib/acp/agent_connection/optional_method/load_session.rb +0 -21
  160. data/lib/acp/agent_connection/optional_method/logout.rb +0 -21
  161. data/lib/acp/agent_connection/optional_method/resume_session.rb +0 -21
  162. data/lib/acp/agent_connection/optional_method/set_provider.rb +0 -23
  163. data/lib/acp/types/content_chunk.rb +0 -40
  164. data/sig/generated/acp/agent_connection/optional_method/authenticate.rbs +0 -13
  165. data/sig/generated/acp/agent_connection/optional_method/close_session.rbs +0 -13
  166. data/sig/generated/acp/agent_connection/optional_method/delete_session.rbs +0 -13
  167. data/sig/generated/acp/agent_connection/optional_method/disable_provider.rbs +0 -13
  168. data/sig/generated/acp/agent_connection/optional_method/fork_session.rbs +0 -13
  169. data/sig/generated/acp/agent_connection/optional_method/list_providers.rbs +0 -13
  170. data/sig/generated/acp/agent_connection/optional_method/list_sessions.rbs +0 -13
  171. data/sig/generated/acp/agent_connection/optional_method/load_session.rbs +0 -13
  172. data/sig/generated/acp/agent_connection/optional_method/logout.rbs +0 -13
  173. data/sig/generated/acp/agent_connection/optional_method/resume_session.rbs +0 -13
  174. data/sig/generated/acp/agent_connection/optional_method/set_provider.rbs +0 -13
  175. data/sig/generated/acp/types/content_chunk.rbs +0 -25
  176. data/sig/manual/acp/agent_connection/optional_method/authenticate.rbs +0 -6
  177. data/sig/manual/acp/agent_connection/optional_method/close_session.rbs +0 -6
  178. data/sig/manual/acp/agent_connection/optional_method/delete_session.rbs +0 -6
  179. data/sig/manual/acp/agent_connection/optional_method/disable_provider.rbs +0 -6
  180. data/sig/manual/acp/agent_connection/optional_method/fork_session.rbs +0 -6
  181. data/sig/manual/acp/agent_connection/optional_method/list_providers.rbs +0 -6
  182. data/sig/manual/acp/agent_connection/optional_method/list_sessions.rbs +0 -6
  183. data/sig/manual/acp/agent_connection/optional_method/load_session.rbs +0 -6
  184. data/sig/manual/acp/agent_connection/optional_method/resume_session.rbs +0 -6
  185. data/sig/manual/acp/agent_connection/optional_method/set_provider.rbs +0 -6
@@ -1,7 +1,7 @@
1
1
  # Generated from lib/acp/client_connection.rb with RBS::Inline
2
2
 
3
3
  class ACP::ClientConnection
4
- @transport: ACP::AgentConnection::_Transport
4
+ @transport: ACP::Transport::_Transport
5
5
 
6
6
  @permission: ACP::ClientConnection::_PermissionHandler
7
7
 
@@ -21,10 +21,6 @@ class ACP::ClientConnection
21
21
 
22
22
  @elicitation: (^(ACP::Types::CreateElicitationRequest) -> (ACP::Types::CreateElicitationResponse | ACP::RequestError))?
23
23
 
24
- @complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?
25
-
26
- @updates: ACP::ClientConnection::_UpdateHandler
27
-
28
24
  @mcp_message: (^(ACP::Types::Unstable::MessageMcpRequest) -> (ACP::Types::Unstable::MessageMcpResponse::t | ACP::RequestError))?
29
25
 
30
26
  @mcp_advertised: bool?
@@ -39,23 +35,68 @@ class ACP::ClientConnection
39
35
 
40
36
  @extension_notifications: Hash[String, ^(untyped) -> void]
41
37
 
42
- @lock: Thread::Mutex
38
+ @streams: ACP::ClientConnection::Streams
43
39
 
44
- @streams: Hash[String, Thread::Queue]
40
+ @logger: ACP::Transport::_Logger
45
41
 
46
- @pending_permissions: Hash[String, Array[Thread::Queue]]
42
+ IGNORE: ^(ACP::Types::SessionNotification) -> void
47
43
 
48
- @outstanding_elicitations: Hash[String, bool]
44
+ class Route
45
+ @label: String
49
46
 
50
- @logger: ACP::Transport::_Logger
47
+ @key: String
51
48
 
52
- PROTOCOL_VERSION: Integer
49
+ @refuse: Symbol
53
50
 
54
- IGNORE: ^(ACP::Types::SessionNotification) -> void
51
+ @advertised: ^(untyped) -> (bool | nil)
52
+
53
+ @family: Symbol
54
+
55
+ @handler: Symbol
56
+
57
+ @type: ACP::Transport::_Parser
58
+
59
+ @wire: String
55
60
 
56
- CANCELLED: ACP::Types::RequestPermissionResponse
61
+ # @rbs wire: String
62
+ # @rbs type: ACP::Transport::_Parser
63
+ # @rbs handler: Symbol
64
+ # @rbs family: Symbol
65
+ # @rbs key: String
66
+ # @rbs advertised: ^(untyped) -> (bool | nil)
67
+ # @rbs refuse: Symbol
68
+ # @rbs label: String?
69
+ # @rbs return: void
70
+ def initialize: (wire: String, type: ACP::Transport::_Parser, handler: Symbol, family: Symbol, key: String, ?advertised: ^(untyped) -> (bool | nil), ?refuse: Symbol, ?label: String?) -> void
57
71
 
58
- # @rbs transport: ACP::AgentConnection::_Transport
72
+ # @dynamic wire, type, handler, family, advertised, refuse, key, label
73
+ attr_reader wire: String
74
+
75
+ attr_reader type: ACP::Transport::_Parser
76
+
77
+ attr_reader handler: Symbol
78
+
79
+ attr_reader family: Symbol
80
+
81
+ attr_reader advertised: ^(untyped) -> (bool | nil)
82
+
83
+ attr_reader refuse: Symbol
84
+
85
+ attr_reader key: String
86
+
87
+ attr_reader label: String
88
+ end
89
+
90
+ # The routes are registered at start, before connect records the
91
+ # advertisement, so each one answers its refusal until then. The terminal
92
+ # capability is a single bool, so its five routes share one gate.
93
+ #
94
+ # The terminal handlers may block for as long as the command runs, so the
95
+ # transport must serve each request on its own thread for this not to hold
96
+ # up others.
97
+ SERVE: Array[ACP::ClientConnection::Route]
98
+
99
+ # @rbs transport: ACP::Transport::_Transport
59
100
  # @rbs permission: ACP::ClientConnection::_PermissionHandler
60
101
  # @rbs read_text_file: (^(ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError))?
61
102
  # @rbs write_text_file: (^(ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError))?
@@ -73,9 +114,10 @@ class ACP::ClientConnection
73
114
  # (ACP::Types::Unstable::MessageMcpResponse::t | ACP::RequestError))?
74
115
  # @rbs extension_requests: Hash[String, ^(untyped) -> untyped]
75
116
  # @rbs extension_notifications: Hash[String, ^(untyped) -> void]
117
+ # @rbs streams: ACP::ClientConnection::Streams?
76
118
  # @rbs logger: ACP::Transport::_Logger
77
119
  # @rbs return: void
78
- def initialize: (transport: ACP::AgentConnection::_Transport, permission: ACP::ClientConnection::_PermissionHandler, ?read_text_file: (^(ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError))?, ?write_text_file: (^(ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError))?, ?create_terminal: (^(ACP::Types::CreateTerminalRequest) -> (ACP::Types::CreateTerminalResponse | ACP::RequestError))?, ?terminal_output: (^(ACP::Types::TerminalOutputRequest) -> (ACP::Types::TerminalOutputResponse | ACP::RequestError))?, ?wait_for_terminal_exit: (^(ACP::Types::WaitForTerminalExitRequest) -> (ACP::Types::WaitForTerminalExitResponse | ACP::RequestError))?, ?kill_terminal: (^(ACP::Types::KillTerminalRequest) -> (ACP::Types::KillTerminalResponse | ACP::RequestError))?, ?release_terminal: (^(ACP::Types::ReleaseTerminalRequest) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError))?, ?elicitation: (^(ACP::Types::CreateElicitationRequest) -> (ACP::Types::CreateElicitationResponse | ACP::RequestError))?, ?complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?, ?updates: ACP::ClientConnection::_UpdateHandler, ?mcp_message: (^(ACP::Types::Unstable::MessageMcpRequest) -> (ACP::Types::Unstable::MessageMcpResponse::t | ACP::RequestError))?, ?extension_requests: Hash[String, ^(untyped) -> untyped], ?extension_notifications: Hash[String, ^(untyped) -> void], ?logger: ACP::Transport::_Logger) -> void
120
+ def initialize: (transport: ACP::Transport::_Transport, permission: ACP::ClientConnection::_PermissionHandler, ?read_text_file: (^(ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError))?, ?write_text_file: (^(ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError))?, ?create_terminal: (^(ACP::Types::CreateTerminalRequest) -> (ACP::Types::CreateTerminalResponse | ACP::RequestError))?, ?terminal_output: (^(ACP::Types::TerminalOutputRequest) -> (ACP::Types::TerminalOutputResponse | ACP::RequestError))?, ?wait_for_terminal_exit: (^(ACP::Types::WaitForTerminalExitRequest) -> (ACP::Types::WaitForTerminalExitResponse | ACP::RequestError))?, ?kill_terminal: (^(ACP::Types::KillTerminalRequest) -> (ACP::Types::KillTerminalResponse | ACP::RequestError))?, ?release_terminal: (^(ACP::Types::ReleaseTerminalRequest) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError))?, ?elicitation: (^(ACP::Types::CreateElicitationRequest) -> (ACP::Types::CreateElicitationResponse | ACP::RequestError))?, ?complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?, ?updates: ACP::ClientConnection::_UpdateHandler, ?mcp_message: (^(ACP::Types::Unstable::MessageMcpRequest) -> (ACP::Types::Unstable::MessageMcpResponse::t | ACP::RequestError))?, ?extension_requests: Hash[String, ^(untyped) -> untyped], ?extension_notifications: Hash[String, ^(untyped) -> void], ?streams: ACP::ClientConnection::Streams?, ?logger: ACP::Transport::_Logger) -> void
79
121
 
80
122
  # @rbs return: Thread
81
123
  def start: () -> Thread
@@ -89,72 +131,74 @@ class ACP::ClientConnection
89
131
 
90
132
  # @rbs request: ACP::Types::NewSessionRequest
91
133
  # @rbs return: ACP::Types::NewSessionResponse | ACP::RequestError
92
- def session_new: (ACP::Types::NewSessionRequest request) -> (ACP::Types::NewSessionResponse | ACP::RequestError)
134
+ def new_session: (ACP::Types::NewSessionRequest request) -> (ACP::Types::NewSessionResponse | ACP::RequestError)
93
135
 
94
136
  # @rbs request: ACP::Types::PromptRequest
95
137
  # @rbs &block: (ACP::Types::SessionUpdate::t) -> void
96
138
  # @rbs return: ACP::Types::PromptResponse | ACP::RequestError
97
- def session_prompt: (ACP::Types::PromptRequest request) { (ACP::Types::SessionUpdate::t) -> void } -> (ACP::Types::PromptResponse | ACP::RequestError)
139
+ def prompt_session: (ACP::Types::PromptRequest request) { (ACP::Types::SessionUpdate::t) -> void } -> (ACP::Types::PromptResponse | ACP::RequestError)
98
140
 
99
141
  # @rbs request: ACP::Types::LoadSessionRequest
100
142
  # @rbs &block: (ACP::Types::SessionUpdate::t) -> void
101
143
  # @rbs return: ACP::Types::LoadSessionResponse | ACP::RequestError
102
- def session_load: (ACP::Types::LoadSessionRequest request) { (ACP::Types::SessionUpdate::t) -> void } -> (ACP::Types::LoadSessionResponse | ACP::RequestError)
144
+ def load_session: (ACP::Types::LoadSessionRequest request) { (ACP::Types::SessionUpdate::t) -> void } -> (ACP::Types::LoadSessionResponse | ACP::RequestError)
103
145
 
104
146
  # @rbs request: ACP::Types::ListSessionsRequest
105
147
  # @rbs return: ACP::Types::ListSessionsResponse | ACP::RequestError
106
- def session_list: (ACP::Types::ListSessionsRequest request) -> (ACP::Types::ListSessionsResponse | ACP::RequestError)
148
+ def list_sessions: (ACP::Types::ListSessionsRequest request) -> (ACP::Types::ListSessionsResponse | ACP::RequestError)
107
149
 
108
- # The agent does not replay history on resume, so unlike session_load there
150
+ # The agent does not replay history on resume, so unlike load_session there
109
151
  # is nothing to stream and no block is taken.
110
152
  #
111
153
  # @rbs request: ACP::Types::ResumeSessionRequest
112
154
  # @rbs return: ACP::Types::ResumeSessionResponse | ACP::RequestError
113
- def session_resume: (ACP::Types::ResumeSessionRequest request) -> (ACP::Types::ResumeSessionResponse | ACP::RequestError)
155
+ def resume_session: (ACP::Types::ResumeSessionRequest request) -> (ACP::Types::ResumeSessionResponse | ACP::RequestError)
114
156
 
115
157
  # @rbs request: ACP::Types::CloseSessionRequest
116
158
  # @rbs return: ACP::Types::CloseSessionResponse | ACP::RequestError
117
- def session_close: (ACP::Types::CloseSessionRequest request) -> (ACP::Types::CloseSessionResponse | ACP::RequestError)
159
+ def close_session: (ACP::Types::CloseSessionRequest request) -> (ACP::Types::CloseSessionResponse | ACP::RequestError)
118
160
 
119
161
  # @rbs request: ACP::Types::DeleteSessionRequest
120
162
  # @rbs return: ACP::Types::DeleteSessionResponse | ACP::RequestError
121
- def session_delete: (ACP::Types::DeleteSessionRequest request) -> (ACP::Types::DeleteSessionResponse | ACP::RequestError)
163
+ def delete_session: (ACP::Types::DeleteSessionRequest request) -> (ACP::Types::DeleteSessionResponse | ACP::RequestError)
122
164
 
123
165
  # @rbs request: ACP::Types::Unstable::ForkSessionRequest
124
166
  # @rbs return: (ACP::Types::Unstable::ForkSessionResponse | ACP::RequestError)
125
- def session_fork: (ACP::Types::Unstable::ForkSessionRequest request) -> (ACP::Types::Unstable::ForkSessionResponse | ACP::RequestError)
167
+ def fork_session: (ACP::Types::Unstable::ForkSessionRequest request) -> (ACP::Types::Unstable::ForkSessionResponse | ACP::RequestError)
126
168
 
127
169
  # @rbs request: ACP::Types::Unstable::ListProvidersRequest
128
170
  # @rbs return: (ACP::Types::Unstable::ListProvidersResponse | ACP::RequestError)
129
- def providers_list: (ACP::Types::Unstable::ListProvidersRequest request) -> (ACP::Types::Unstable::ListProvidersResponse | ACP::RequestError)
171
+ def list_providers: (ACP::Types::Unstable::ListProvidersRequest request) -> (ACP::Types::Unstable::ListProvidersResponse | ACP::RequestError)
130
172
 
131
173
  # @rbs request: ACP::Types::Unstable::SetProviderRequest
132
174
  # @rbs return: (ACP::Types::Unstable::SetProviderResponse | ACP::RequestError)
133
- def providers_set: (ACP::Types::Unstable::SetProviderRequest request) -> (ACP::Types::Unstable::SetProviderResponse | ACP::RequestError)
175
+ # The name is the wire-mandated providers/set, not an attribute writer.
176
+ def set_provider: (ACP::Types::Unstable::SetProviderRequest request) -> (ACP::Types::Unstable::SetProviderResponse | ACP::RequestError)
134
177
 
135
178
  # @rbs request: ACP::Types::Unstable::DisableProviderRequest
136
179
  # @rbs return: (ACP::Types::Unstable::DisableProviderResponse | ACP::RequestError)
137
- def providers_disable: (ACP::Types::Unstable::DisableProviderRequest request) -> (ACP::Types::Unstable::DisableProviderResponse | ACP::RequestError)
180
+ def disable_provider: (ACP::Types::Unstable::DisableProviderRequest request) -> (ACP::Types::Unstable::DisableProviderResponse | ACP::RequestError)
138
181
 
139
182
  # The spec requires a pending session/request_permission to be answered with
140
- # the cancelled outcome once the turn is cancelled, so every queue registered
141
- # for the session gets one before this returns. The notification goes first
142
- # so the wire order is cancel, then the cancelled replies.
183
+ # the cancelled outcome once the turn is cancelled. The notification goes
184
+ # first so the wire order is cancel, then the cancelled replies.
143
185
  #
144
186
  # @rbs notification: ACP::Types::CancelNotification
145
187
  # @rbs return: void
146
- def session_cancel: (ACP::Types::CancelNotification notification) -> void
188
+ def cancel_session: (ACP::Types::CancelNotification notification) -> void
147
189
 
148
190
  # @rbs request: ACP::Types::SetSessionModeRequest
149
191
  # @rbs return: ACP::Types::SetSessionModeResponse | ACP::RequestError
150
- def session_set_mode: (ACP::Types::SetSessionModeRequest request) -> (ACP::Types::SetSessionModeResponse | ACP::RequestError)
192
+ # The name is the wire-mandated session/set_mode, not an attribute writer.
193
+ def set_session_mode: (ACP::Types::SetSessionModeRequest request) -> (ACP::Types::SetSessionModeResponse | ACP::RequestError)
151
194
 
152
195
  # The reply carries the session's complete option list, so it replaces any
153
196
  # state held from an earlier reply rather than merging into it.
154
197
  #
155
198
  # @rbs request: ACP::Types::SetSessionConfigOptionRequest
156
199
  # @rbs return: ACP::Types::SetSessionConfigOptionResponse | ACP::RequestError
157
- def session_set_config_option: (ACP::Types::SetSessionConfigOptionRequest request) -> (ACP::Types::SetSessionConfigOptionResponse | ACP::RequestError)
200
+ # The name is the wire-mandated session/set_config_option, not an attribute writer.
201
+ def set_session_config_option: (ACP::Types::SetSessionConfigOptionRequest request) -> (ACP::Types::SetSessionConfigOptionResponse | ACP::RequestError)
158
202
 
159
203
  # @rbs request: ACP::Types::AuthenticateRequest
160
204
  # @rbs return: ACP::Types::AuthenticateResponse | ACP::RequestError
@@ -164,9 +208,7 @@ class ACP::ClientConnection
164
208
  # @rbs return: ACP::Types::LogoutResponse | ACP::RequestError
165
209
  def logout: (ACP::Types::LogoutRequest request) -> (ACP::Types::LogoutResponse | ACP::RequestError)
166
210
 
167
- # Sends an extension request, keyed by its raw `_`-prefixed wire name, and
168
- # returns the agent's reply as-is: extension methods have no schema to
169
- # parse the result into.
211
+ # Extension methods have no schema to parse the result into.
170
212
  #
171
213
  # @rbs method: String
172
214
  # @rbs params: untyped
@@ -193,142 +235,41 @@ class ACP::ClientConnection
193
235
 
194
236
  private
195
237
 
196
- # The route is only registered when a handler serves it, but the agent's
197
- # advertisement is only known after connect, so an unadvertised request
198
- # still reaches the route and is refused there.
199
- #
200
- # @rbs return: Hash[String, ACP::Transport::Stdio::_Handler]
201
- def mcp_requests: () -> Hash[String, ACP::Transport::Stdio::_Handler]
202
-
203
- # The stable McpCapabilities has no acp field, so the gate re-reads the raw
204
- # initialize reply with the unstable types when they are opted into.
205
- #
206
- # @rbs result: (Hash[String, untyped] | ACP::RequestError)
207
- # @rbs return: bool
208
- def agent_mcp_advertised?: (Hash[String, untyped] | ACP::RequestError result) -> bool
209
-
210
- # @rbs type: ACP::AgentConnection::_Parser
211
- # @rbs result: (Hash[String, untyped] | ACP::RequestError)
212
- # @rbs return: untyped
213
- def parse: (ACP::AgentConnection::_Parser type, Hash[String, untyped] | ACP::RequestError result) -> untyped
238
+ # @rbs route: ACP::ClientConnection::Route
239
+ # @rbs return: ^(untyped) -> (untyped | ACP::RequestError)
240
+ def serve: (ACP::ClientConnection::Route route) -> ^(untyped) -> (untyped | ACP::RequestError)
214
241
 
215
- # The request waits on its own thread so the caller's thread can yield each
216
- # update as it arrives. The reader thread queues an update before it settles
217
- # a reply sent after it, so the queue closes only after the last one.
218
- #
219
- # @rbs session_id: String
220
- # @rbs method: String
221
- # @rbs params: Hash[String, untyped]
222
- # @rbs &block: (ACP::Types::SessionUpdate::t) -> void
223
- # @rbs return: (Hash[String, untyped] | ACP::RequestError)
224
- def stream: (String session_id, String method, Hash[String, untyped] params) { (ACP::Types::SessionUpdate::t) -> void } -> (Hash[String, untyped] | ACP::RequestError)
242
+ # @rbs route: ACP::ClientConnection::Route
243
+ # @rbs return: ACP::RequestError
244
+ def refuse: (ACP::ClientConnection::Route route) -> ACP::RequestError
225
245
 
226
- # Pushes under the lock so a stream cannot close its queue between the
227
- # lookup and the push. A malformed notification has no reply to carry the
228
- # failure.
229
- #
230
- # @rbs params: untyped
246
+ # @rbs name: String
247
+ # @rbs family: Symbol
248
+ # @rbs capabilities: untyped
231
249
  # @rbs return: void
232
- def dispatch: (untyped params) -> void
250
+ def check_served: (String name, Symbol family, untyped capabilities) -> void
233
251
 
234
- # The handler runs on its own thread so a cancelled request is answered
235
- # without waiting for it, and whatever it returns after that is pushed to a
236
- # queue nobody reads.
252
+ # The unstable types are referenced while the row is built, so the route can
253
+ # only be served when the caller opted in with `require 'acp/types/unstable'`.
254
+ # It is registered only when a handler serves it: unlike the fs and terminal
255
+ # gates, the mcp gate reads the agent's advertisement, so nothing forces an
256
+ # advertised request to have a handler.
237
257
  #
238
- # @rbs params: untyped
239
- # @rbs return: (ACP::Types::RequestPermissionResponse | ACP::RequestError)
240
- def request_permission: (untyped params) -> (ACP::Types::RequestPermissionResponse | ACP::RequestError)
241
-
242
- # @rbs session_id: String
243
- # @rbs replies: Thread::Queue
244
- # @rbs return: void
245
- def register_permission: (String session_id, Thread::Queue replies) -> void
258
+ # @rbs return: Hash[String, ^(untyped) -> (untyped | ACP::RequestError)]
259
+ def mcp_requests: () -> Hash[String, ^(untyped) -> (untyped | ACP::RequestError)]
246
260
 
247
- # @rbs session_id: String
248
- # @rbs replies: Thread::Queue
249
- # @rbs return: void
250
- def unregister_permission: (String session_id, Thread::Queue replies) -> void
251
-
252
- # The routes are registered at start, before connect records the advertised
253
- # capabilities, so each one answers -32601 until then.
254
- #
255
- # @rbs params: untyped
256
- # @rbs return: (ACP::Types::ReadTextFileResponse | ACP::RequestError)
257
- def read_text_file: (untyped params) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError)
258
-
259
- # @rbs params: untyped
260
- # @rbs return: (ACP::Types::WriteTextFileResponse | ACP::RequestError)
261
- def write_text_file: (untyped params) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError)
262
-
263
- # The terminal routes are registered at start, before connect records the
264
- # advertised capability, so each one answers -32601 until then.
265
- #
266
- # @rbs params: untyped
267
- # @rbs return: (ACP::Types::CreateTerminalResponse | ACP::RequestError)
268
- def create_terminal: (untyped params) -> (ACP::Types::CreateTerminalResponse | ACP::RequestError)
269
-
270
- # @rbs params: untyped
271
- # @rbs return: (ACP::Types::TerminalOutputResponse | ACP::RequestError)
272
- def terminal_output: (untyped params) -> (ACP::Types::TerminalOutputResponse | ACP::RequestError)
273
-
274
- # The handler may block for as long as the command runs, so the transport
275
- # must serve each request on its own thread for this not to hold up others.
276
- #
277
- # @rbs params: untyped
278
- # @rbs return: (ACP::Types::WaitForTerminalExitResponse | ACP::RequestError)
279
- def wait_for_terminal_exit: (untyped params) -> (ACP::Types::WaitForTerminalExitResponse | ACP::RequestError)
280
-
281
- # @rbs params: untyped
282
- # @rbs return: (ACP::Types::KillTerminalResponse | ACP::RequestError)
283
- def kill_terminal: (untyped params) -> (ACP::Types::KillTerminalResponse | ACP::RequestError)
284
-
285
- # @rbs params: untyped
286
- # @rbs return: (ACP::Types::ReleaseTerminalResponse | ACP::RequestError)
287
- def release_terminal: (untyped params) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError)
288
-
289
- # The route is registered at start, before connect records the agent's
290
- # advertisement, so an unadvertised request answers -32601 until then.
291
- #
292
- # @rbs params: untyped
293
- # @rbs return: (ACP::Types::Unstable::MessageMcpResponse::t | ACP::RequestError)
294
- def mcp_message: (untyped params) -> (ACP::Types::Unstable::MessageMcpResponse::t | ACP::RequestError)
261
+ # @rbs type: ACP::Transport::_Parser
262
+ # @rbs result: (Hash[String, untyped] | ACP::RequestError)
263
+ # @rbs return: untyped
264
+ def parse: (ACP::Transport::_Parser type, Hash[String, untyped] | ACP::RequestError result) -> untyped
295
265
 
296
- # The routes are registered at start, before connect records the advertised
266
+ # The route is registered at start, before connect records the advertised
297
267
  # capabilities, so a request for an unadvertised mode answers -32602.
298
268
  #
299
269
  # @rbs params: untyped
300
270
  # @rbs return: (ACP::Types::CreateElicitationResponse | ACP::RequestError)
301
271
  def create_elicitation: (untyped params) -> (ACP::Types::CreateElicitationResponse | ACP::RequestError)
302
272
 
303
- # The spec requires a completion for an unknown or already-completed
304
- # elicitation id to be ignored, so only an id registered by a served
305
- # url-mode request reaches the handler. It runs on the transport's reader
306
- # thread, so it must return quickly.
307
- #
308
- # @rbs params: untyped
309
- # @rbs return: void
310
- def complete_elicitation: (untyped params) -> void
311
-
312
- # @rbs elicitation_id: String
313
- # @rbs return: void
314
- def register_elicitation: (String elicitation_id) -> void
315
-
316
- # The fs capabilities initialize advertises that no injected handler serves.
317
- #
318
- # @rbs capabilities: ACP::Types::FileSystemCapabilities?
319
- # @rbs return: Array[String]
320
- def unserved_fs_methods: (ACP::Types::FileSystemCapabilities? capabilities) -> Array[String]
321
-
322
- # The terminal capabilities initialize advertises that no injected handler
323
- # serves.
324
- #
325
- # @rbs capabilities: bool?
326
- # @rbs return: Array[String]
327
- def unserved_terminal_methods: (bool? capabilities) -> Array[String]
328
-
329
- # The elicitation capabilities initialize advertises that no injected
330
- # handler serves.
331
- #
332
273
  # @rbs capabilities: ACP::Types::ElicitationCapabilities?
333
274
  # @rbs return: Array[String]
334
275
  def unserved_elicitation_modes: (ACP::Types::ElicitationCapabilities? capabilities) -> Array[String]
@@ -0,0 +1,9 @@
1
+ # Generated from lib/acp/protocol.rb with RBS::Inline
2
+
3
+ module ACP::Protocol
4
+ PROTOCOL_VERSION: Integer
5
+
6
+ # @rbs capabilities: (ACP::Types::AgentCapabilities | ACP::Types::Unstable::AgentCapabilities | Hash[String, untyped])
7
+ # @rbs return: bool
8
+ def mcp_acp_advertised?: (ACP::Types::AgentCapabilities | ACP::Types::Unstable::AgentCapabilities | Hash[String, untyped] capabilities) -> bool
9
+ end
@@ -1,8 +1,6 @@
1
1
  # Generated from lib/acp/request_error.rb with RBS::Inline
2
2
 
3
- # The schema's JSON-RPC Error object, named after the official SDKs'
4
- # RequestError: built by handlers and local refusals, and decoded from a
5
- # peer's error replies by the transport.
3
+ # Named after the official SDKs' RequestError rather than the schema's Error.
6
4
  class ACP::RequestError
7
5
  PARSE_ERROR: Integer
8
6
 
@@ -52,28 +50,21 @@ class ACP::RequestError
52
50
  # @rbs return: ACP::RequestError
53
51
  def self.invalid_params: (?Array[String]? errors) -> ACP::RequestError
54
52
 
55
- # The method-not-found code for a method the client's capabilities do not
56
- # advertise, with a message that names the capability so it can be told
57
- # apart from an unknown method.
53
+ # The message names the capability so the refusal can be told apart from an
54
+ # unknown method, though both use the -32601 code.
58
55
  #
59
56
  # @rbs capability: String
60
57
  # @rbs return: ACP::RequestError
61
58
  def self.unadvertised: (String capability) -> ACP::RequestError
62
59
 
63
- # The invalid-params code for a request whose mode the client's
64
- # capabilities do not advertise, with a message that names the mode so it
65
- # can be told apart from malformed params. The spec gives elicitation a
66
- # mode in its params, so an unadvertised one is invalid params rather than
67
- # method not found.
60
+ # The message names the mode so the refusal can be told apart from malformed
61
+ # params. The spec gives elicitation a mode in its params, so an unadvertised
62
+ # one is invalid params rather than method not found.
68
63
  #
69
64
  # @rbs mode: String
70
65
  # @rbs return: ACP::RequestError
71
66
  def self.unadvertised_mode: (String mode) -> ACP::RequestError
72
67
 
73
- # unadvertised names a capability of the client's, this one a capability of
74
- # the agent's: the same method-not-found code, with a message naming which
75
- # side's advertisement is missing.
76
- #
77
68
  # @rbs capability: String
78
69
  # @rbs return: ACP::RequestError
79
70
  def self.unadvertised_agent: (String capability) -> ACP::RequestError
@@ -88,8 +79,7 @@ class ACP::RequestError
88
79
  # @rbs return: ACP::RequestError
89
80
  def self.invalid_response: (untyped response) -> ACP::RequestError
90
81
 
91
- # A local refusal of an initialize reply that names a version the SDK does
92
- # not speak; the message names both versions so logs can tell it from a
82
+ # The message names both versions so logs can tell this local refusal from a
93
83
  # peer's error.
94
84
  #
95
85
  # @rbs requested: Integer
@@ -1,15 +1,8 @@
1
1
  # Generated from lib/acp/transport/cancellation.rb with RBS::Inline
2
2
 
3
- # Whether the peer cancelled one request. The transport creates one per served
4
- # request, marks it when the peer's $/cancel_request arrives, and hands it to
5
- # the serving thread, whose handler can observe it and end the request early.
6
3
  class ACP::Transport::Cancellation
7
4
  KEY: Symbol
8
5
 
9
- # Connections read this to expose the serving state to their handlers and
10
- # write it to carry serving identity onto a thread they spawn; nil off a
11
- # serve thread.
12
- #
13
6
  # @rbs return: ACP::Transport::Cancellation?
14
7
  def self.current: () -> ACP::Transport::Cancellation?
15
8
 
@@ -1,7 +1,5 @@
1
1
  # Generated from lib/acp/transport/reply.rb with RBS::Inline
2
2
 
3
- # A request handler's outcome plus a callback the transport runs once that
4
- # outcome is on the wire, for messages the peer must only see after the reply.
5
3
  class ACP::Transport::Reply
6
4
  # @dynamic result
7
5
  attr_reader result: ACP::Transport::Stdio::_ToH
@@ -1,7 +1,6 @@
1
1
  # Generated from lib/acp/transport/stderr_logger.rb with RBS::Inline
2
2
 
3
- # The default sink for dropped messages and swallowed errors: the spec
4
- # sanctions agents logging to stderr.
3
+ # The spec sanctions agents logging to stderr.
5
4
  class ACP::Transport::StderrLogger
6
5
  # @rbs message: String
7
6
  # @rbs return: void
@@ -1,10 +1,9 @@
1
1
  # Generated from lib/acp/transport/stdio.rb with RBS::Inline
2
2
 
3
- # JSON-RPC 2.0 over newline-delimited JSON on an IO pair. A reader thread
4
- # dispatches inbound messages while outbound requests are pending, and each
5
- # inbound request is served on its own thread, so a handler can make an
6
- # outbound request mid-turn and still see notifications (e.g. session/cancel)
7
- # that arrive meanwhile.
3
+ # A reader thread dispatches inbound messages while outbound requests are
4
+ # pending, and each inbound request is served on its own thread, so a handler
5
+ # can make an outbound request mid-turn and still see notifications (e.g.
6
+ # session/cancel) that arrive meanwhile.
8
7
  class ACP::Transport::Stdio
9
8
  @logger: ACP::Transport::_Logger
10
9
 
@@ -32,9 +31,6 @@ class ACP::Transport::Stdio
32
31
  # @rbs return: void
33
32
  def initialize: (input: _Reader, output: _Writer, ?logger: ACP::Transport::_Logger) -> void
34
33
 
35
- # Returns the reader thread, which ends at EOF on input after releasing any
36
- # pending outbound requests.
37
- #
38
34
  # @rbs requests: Hash[String, _Handler]
39
35
  # @rbs notifications: Hash[String, _NotificationHandler]
40
36
  # @rbs return: Thread
@@ -42,8 +38,8 @@ class ACP::Transport::Stdio
42
38
 
43
39
  # @rbs method: String
44
40
  # @rbs params: untyped
45
- # @rbs return: (Hash[String, untyped] | ACP::RequestError)
46
- def request: (String method, ?untyped params) -> (Hash[String, untyped] | ACP::RequestError)
41
+ # @rbs return: untyped
42
+ def request: (String method, ?untyped params) -> untyped
47
43
 
48
44
  # @rbs method: String
49
45
  # @rbs params: untyped
@@ -63,11 +59,6 @@ class ACP::Transport::Stdio
63
59
  # @rbs return: void
64
60
  def cancel_requests: () -> void
65
61
 
66
- # The cancellation of the request the calling thread is serving, or nil off
67
- # a serve thread. A handler observes the peer's $/cancel_request through it
68
- # and can end early with ACP::RequestError.request_cancelled; whatever it
69
- # returns, the transport sends exactly one response.
70
- #
71
62
  # @rbs return: ACP::Transport::Cancellation?
72
63
  def cancellation: () -> ACP::Transport::Cancellation?
73
64
 
@@ -142,9 +133,6 @@ class ACP::Transport::Stdio
142
133
  # @rbs return: (_ToH | ACP::RequestError | ACP::Transport::Reply)
143
134
  def invoke: (_Handler handler, untyped params) -> (_ToH | ACP::RequestError | ACP::Transport::Reply)
144
135
 
145
- # The success arm is whatever the handler returned, which the transport only
146
- # knows serializes with to_h; RequestError picks the error arm of the reply.
147
- #
148
136
  # @rbs id: untyped
149
137
  # @rbs outcome: (_ToH | ACP::RequestError)
150
138
  # @rbs return: void
@@ -155,9 +143,9 @@ class ACP::Transport::Stdio
155
143
  def register: (Thread::Queue queue) -> Integer?
156
144
 
157
145
  # @rbs id: untyped
158
- # @rbs result: (Hash[String, untyped] | ACP::RequestError)
159
- # @rbs return: void
160
- def settle: (untyped id, Hash[String, untyped] | ACP::RequestError result) -> void
146
+ # @rbs result: untyped
147
+ # @rbs return: Thread::Queue?
148
+ def settle: (untyped id, untyped result) -> Thread::Queue?
161
149
 
162
150
  # @rbs return: void
163
151
  def close: () -> void
@@ -1,29 +1,3 @@
1
1
  # Generated from lib/acp/types/audio_content.rb with RBS::Inline
2
2
 
3
- class ACP::Types::AudioContent
4
- # @dynamic annotations
5
- attr_reader annotations: ACP::Types::Annotations?
6
-
7
- # @dynamic data
8
- attr_reader data: String
9
-
10
- # @dynamic mime_type
11
- attr_reader mime_type: String
12
-
13
- # @dynamic meta
14
- attr_reader meta: Hash[String, untyped]?
15
-
16
- # @rbs annotations: ACP::Types::Annotations?
17
- # @rbs data: String
18
- # @rbs mime_type: String
19
- # @rbs meta: Hash[String, untyped]?
20
- # @rbs return: void
21
- def initialize: (data: String, mime_type: String, ?annotations: ACP::Types::Annotations?, ?meta: Hash[String, untyped]?) -> void
22
-
23
- # @rbs hash: Hash[String, untyped]
24
- # @rbs return: ACP::Types::AudioContent
25
- def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::AudioContent
26
-
27
- # @rbs return: Hash[String, untyped]
28
- def to_h: () -> Hash[String, untyped]
29
- end
3
+ class ACP::Types::AudioContent = ACP::Types::ContentBlock::Audio
@@ -1,37 +1,3 @@
1
1
  # Generated from lib/acp/types/auth_method_terminal.rb with RBS::Inline
2
2
 
3
- class ACP::Types::AuthMethodTerminal
4
- # @dynamic id
5
- attr_reader id: String
6
-
7
- # @dynamic name
8
- attr_reader name: String
9
-
10
- # @dynamic description
11
- attr_reader description: String?
12
-
13
- # @dynamic args
14
- attr_reader args: Array[String]?
15
-
16
- # @dynamic env
17
- attr_reader env: Hash[String, String]?
18
-
19
- # @dynamic meta
20
- attr_reader meta: Hash[String, untyped]?
21
-
22
- # @rbs id: String
23
- # @rbs name: String
24
- # @rbs description: String?
25
- # @rbs args: Array[String]?
26
- # @rbs env: Hash[String, String]?
27
- # @rbs meta: Hash[String, untyped]?
28
- # @rbs return: void
29
- def initialize: (id: String, name: String, ?description: String?, ?args: Array[String]?, ?env: Hash[String, String]?, ?meta: Hash[String, untyped]?) -> void
30
-
31
- # @rbs hash: Hash[String, untyped]
32
- # @rbs return: ACP::Types::AuthMethodTerminal
33
- def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::AuthMethodTerminal
34
-
35
- # @rbs return: Hash[String, untyped]
36
- def to_h: () -> Hash[String, untyped]
37
- end
3
+ class ACP::Types::AuthMethodTerminal = ACP::Types::AuthMethod::Terminal
@@ -1,21 +1,3 @@
1
1
  # Generated from lib/acp/types/available_commands_update.rb with RBS::Inline
2
2
 
3
- class ACP::Types::AvailableCommandsUpdate
4
- # @dynamic available_commands
5
- attr_reader available_commands: Array[ACP::Types::AvailableCommand]
6
-
7
- # @dynamic meta
8
- attr_reader meta: Hash[String, untyped]?
9
-
10
- # @rbs available_commands: Array[ACP::Types::AvailableCommand]
11
- # @rbs meta: Hash[String, untyped]?
12
- # @rbs return: void
13
- def initialize: (available_commands: Array[ACP::Types::AvailableCommand], ?meta: Hash[String, untyped]?) -> void
14
-
15
- # @rbs hash: Hash[String, untyped]
16
- # @rbs return: ACP::Types::AvailableCommandsUpdate
17
- def self.from_h: (Hash[String, untyped] hash) -> ACP::Types::AvailableCommandsUpdate
18
-
19
- # @rbs return: Hash[String, untyped]
20
- def to_h: () -> Hash[String, untyped]
21
- end
3
+ class ACP::Types::AvailableCommandsUpdate = ACP::Types::SessionUpdate::AvailableCommandsUpdate