acp-sdk 0.7.0 → 0.8.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +2 -1
- data/lib/acp/agent_connection/client.rb +1 -1
- data/lib/acp/agent_connection.rb +3 -1
- data/lib/acp/client_connection.rb +93 -4
- data/lib/acp/request_error.rb +15 -2
- data/lib/acp/types/agent_auth_capabilities.rb +4 -1
- data/lib/acp/types/agent_capabilities.rb +20 -5
- data/lib/acp/types/annotations.rb +6 -3
- data/lib/acp/types/audio_content.rb +8 -3
- data/lib/acp/types/auth_capabilities.rb +1 -1
- data/lib/acp/types/auth_method/terminal.rb +11 -5
- data/lib/acp/types/auth_method_agent.rb +6 -1
- data/lib/acp/types/auth_method_terminal.rb +11 -5
- data/lib/acp/types/authenticate_request.rb +1 -1
- data/lib/acp/types/available_command.rb +3 -3
- data/lib/acp/types/available_commands_update.rb +7 -4
- data/lib/acp/types/blob_resource_contents.rb +6 -1
- data/lib/acp/types/boolean_property_schema.rb +6 -1
- data/lib/acp/types/cancel_notification.rb +4 -1
- data/lib/acp/types/cancel_request_notification.rb +9 -1
- data/lib/acp/types/client_capabilities.rb +15 -5
- data/lib/acp/types/client_session_capabilities.rb +6 -3
- data/lib/acp/types/close_session_request.rb +4 -1
- data/lib/acp/types/complete_elicitation_notification.rb +4 -1
- data/lib/acp/types/config_option_update.rb +7 -4
- data/lib/acp/types/content.rb +4 -1
- data/lib/acp/types/content_block/audio.rb +8 -3
- data/lib/acp/types/content_block/image.rb +9 -4
- data/lib/acp/types/content_block/resource.rb +11 -2
- data/lib/acp/types/content_block/resource_link.rb +12 -7
- data/lib/acp/types/content_block/text.rb +7 -2
- data/lib/acp/types/content_chunk.rb +2 -2
- data/lib/acp/types/cost.rb +5 -1
- data/lib/acp/types/create_elicitation_request/mode/form.rb +5 -1
- data/lib/acp/types/create_elicitation_request/mode/url.rb +2 -2
- data/lib/acp/types/create_elicitation_request.rb +1 -1
- data/lib/acp/types/create_elicitation_response/action/accept.rb +6 -1
- data/lib/acp/types/create_terminal_request.rb +12 -6
- data/lib/acp/types/create_terminal_response.rb +4 -1
- data/lib/acp/types/current_mode_update.rb +4 -1
- data/lib/acp/types/delete_session_request.rb +4 -1
- data/lib/acp/types/diff.rb +6 -1
- data/lib/acp/types/elicitation_accept_action.rb +6 -1
- data/lib/acp/types/elicitation_capabilities.rb +2 -2
- data/lib/acp/types/elicitation_form_mode.rb +5 -1
- data/lib/acp/types/elicitation_property_schema/boolean_property_schema.rb +6 -1
- data/lib/acp/types/elicitation_property_schema/integer_property_schema.rb +5 -5
- data/lib/acp/types/elicitation_property_schema/multi_select_property_schema.rb +9 -6
- data/lib/acp/types/elicitation_property_schema/number_property_schema.rb +5 -5
- data/lib/acp/types/elicitation_property_schema/string_property_schema.rb +15 -9
- data/lib/acp/types/elicitation_request_scope.rb +8 -1
- data/lib/acp/types/elicitation_schema.rb +11 -5
- data/lib/acp/types/elicitation_session_scope.rb +4 -1
- data/lib/acp/types/elicitation_url_mode.rb +2 -2
- data/lib/acp/types/embedded_resource.rb +11 -2
- data/lib/acp/types/enum_option.rb +6 -1
- data/lib/acp/types/env_variable.rb +5 -1
- data/lib/acp/types/file_system_capabilities.rb +5 -1
- data/lib/acp/types/http_header.rb +5 -1
- data/lib/acp/types/image_content.rb +9 -4
- data/lib/acp/types/implementation.rb +6 -1
- data/lib/acp/types/initialize_request.rb +18 -3
- data/lib/acp/types/initialize_response.rb +17 -4
- data/lib/acp/types/integer_property_schema.rb +5 -5
- data/lib/acp/types/kill_terminal_request.rb +5 -1
- data/lib/acp/types/list_sessions_request.rb +5 -1
- data/lib/acp/types/list_sessions_response.rb +5 -2
- data/lib/acp/types/load_session_request.rb +14 -4
- data/lib/acp/types/load_session_response.rb +5 -2
- data/lib/acp/types/mcp_capabilities.rb +5 -1
- data/lib/acp/types/mcp_server/http.rb +6 -3
- data/lib/acp/types/mcp_server/sse.rb +6 -3
- data/lib/acp/types/mcp_server_http.rb +6 -3
- data/lib/acp/types/mcp_server_sse.rb +6 -3
- data/lib/acp/types/mcp_server_stdio.rb +10 -4
- data/lib/acp/types/multi_select_items/string_multi_select_items.rb +4 -1
- data/lib/acp/types/multi_select_property_schema.rb +9 -6
- data/lib/acp/types/new_session_request.rb +13 -3
- data/lib/acp/types/new_session_response.rb +6 -3
- data/lib/acp/types/number_property_schema.rb +5 -5
- data/lib/acp/types/permission_option.rb +10 -1
- data/lib/acp/types/plan.rb +4 -1
- data/lib/acp/types/plan_entry.rb +7 -3
- data/lib/acp/types/prompt_capabilities.rb +6 -1
- data/lib/acp/types/prompt_request.rb +5 -2
- data/lib/acp/types/prompt_response.rb +8 -1
- data/lib/acp/types/read_text_file_request.rb +4 -4
- data/lib/acp/types/read_text_file_response.rb +1 -1
- data/lib/acp/types/release_terminal_request.rb +5 -1
- data/lib/acp/types/request_permission_outcome/selected.rb +1 -1
- data/lib/acp/types/request_permission_request.rb +10 -3
- data/lib/acp/types/request_permission_response.rb +8 -1
- data/lib/acp/types/resource_link.rb +12 -7
- data/lib/acp/types/resume_session_request.rb +14 -4
- data/lib/acp/types/resume_session_response.rb +5 -2
- data/lib/acp/types/selected_permission_outcome.rb +1 -1
- data/lib/acp/types/session_capabilities.rb +20 -7
- data/lib/acp/types/session_config_boolean.rb +1 -1
- data/lib/acp/types/session_config_option/kind/boolean.rb +1 -1
- data/lib/acp/types/session_config_option/kind/select.rb +6 -2
- data/lib/acp/types/session_config_option.rb +3 -3
- data/lib/acp/types/session_config_options_capabilities.rb +6 -1
- data/lib/acp/types/session_config_select.rb +6 -2
- data/lib/acp/types/session_config_select_group.rb +6 -3
- data/lib/acp/types/session_config_select_option.rb +6 -1
- data/lib/acp/types/session_config_select_options.rb +6 -2
- data/lib/acp/types/session_info.rb +12 -5
- data/lib/acp/types/session_info_update.rb +10 -1
- data/lib/acp/types/session_mode.rb +6 -1
- data/lib/acp/types/session_mode_state.rb +8 -2
- data/lib/acp/types/session_notification.rb +2 -2
- data/lib/acp/types/session_update/agent_message_chunk.rb +2 -2
- data/lib/acp/types/session_update/agent_thought_chunk.rb +2 -2
- data/lib/acp/types/session_update/available_commands_update.rb +7 -4
- data/lib/acp/types/session_update/config_option_update.rb +7 -4
- data/lib/acp/types/session_update/current_mode_update.rb +4 -1
- data/lib/acp/types/session_update/plan.rb +4 -1
- data/lib/acp/types/session_update/session_info_update.rb +10 -1
- data/lib/acp/types/session_update/tool_call.rb +23 -7
- data/lib/acp/types/session_update/tool_call_update.rb +23 -7
- data/lib/acp/types/session_update/usage_update.rb +3 -3
- data/lib/acp/types/session_update/user_message_chunk.rb +2 -2
- data/lib/acp/types/set_session_config_option_request/value/boolean.rb +1 -1
- data/lib/acp/types/set_session_config_option_request/value/value_id.rb +1 -1
- data/lib/acp/types/set_session_config_option_request.rb +2 -2
- data/lib/acp/types/set_session_config_option_response.rb +7 -4
- data/lib/acp/types/set_session_mode_request.rb +5 -1
- data/lib/acp/types/string_multi_select_items.rb +4 -1
- data/lib/acp/types/string_property_schema.rb +15 -9
- data/lib/acp/types/terminal.rb +4 -1
- data/lib/acp/types/terminal_exit_status.rb +5 -1
- data/lib/acp/types/terminal_output_request.rb +5 -1
- data/lib/acp/types/terminal_output_response.rb +8 -3
- data/lib/acp/types/text_content.rb +7 -2
- data/lib/acp/types/text_resource_contents.rb +6 -1
- data/lib/acp/types/titled_multi_select_items.rb +4 -1
- data/lib/acp/types/tool_call.rb +23 -7
- data/lib/acp/types/tool_call_content/content.rb +4 -1
- data/lib/acp/types/tool_call_content/diff.rb +6 -1
- data/lib/acp/types/tool_call_content/terminal.rb +4 -1
- data/lib/acp/types/tool_call_location.rb +5 -1
- data/lib/acp/types/tool_call_update.rb +23 -7
- data/lib/acp/types/unstructured_command_input.rb +1 -1
- data/lib/acp/types/usage_update.rb +3 -3
- data/lib/acp/types/wait_for_terminal_exit_request.rb +5 -1
- data/lib/acp/types/wait_for_terminal_exit_response.rb +5 -1
- data/lib/acp/types/write_text_file_request.rb +3 -3
- data/lib/acp/types.rb +247 -0
- data/lib/acp/version.rb +1 -1
- data/sig/generated/acp/client_connection.rbs +39 -1
- data/sig/generated/acp/request_error.rbs +12 -1
- data/sig/generated/acp/types.rbs +143 -0
- metadata +1 -1
data/sig/generated/acp/types.rbs
CHANGED
|
@@ -1,4 +1,147 @@
|
|
|
1
1
|
# Generated from lib/acp/types.rb with RBS::Inline
|
|
2
2
|
|
|
3
3
|
module ACP::Types
|
|
4
|
+
# Raised by the generated from_h when a param does not match its schema
|
|
5
|
+
# type; the connection boundaries rescue it into an invalid-params reply
|
|
6
|
+
# that names the failing path.
|
|
7
|
+
class ParseError < StandardError
|
|
8
|
+
@segments: Array[String | Integer]
|
|
9
|
+
|
|
10
|
+
@detail: String
|
|
11
|
+
|
|
12
|
+
# @rbs segments: Array[String | Integer]
|
|
13
|
+
# @rbs detail: String
|
|
14
|
+
# @rbs return: void
|
|
15
|
+
def initialize: (Array[String | Integer] segments, String detail) -> void
|
|
16
|
+
|
|
17
|
+
# @dynamic segments
|
|
18
|
+
attr_reader segments: Array[String | Integer]
|
|
19
|
+
|
|
20
|
+
# @rbs return: String
|
|
21
|
+
def path: () -> String
|
|
22
|
+
|
|
23
|
+
# Prepends a container's segments so nested failures report an absolute path.
|
|
24
|
+
#
|
|
25
|
+
# @rbs *segments: (String | Integer)
|
|
26
|
+
# @rbs return: ACP::Types::ParseError
|
|
27
|
+
def prefix: (*String | Integer segments) -> ACP::Types::ParseError
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# The guards the generated from_h methods call. Each takes the fetched value
|
|
31
|
+
# and the path to it, and raises ParseError naming that path when the value
|
|
32
|
+
# does not match the schema type. Nested from_h failures come back with the
|
|
33
|
+
# field path prepended, so the reported path is absolute.
|
|
34
|
+
module Check
|
|
35
|
+
# @rbs hash: Hash[String, untyped]
|
|
36
|
+
# @rbs key: String
|
|
37
|
+
# @rbs return: untyped
|
|
38
|
+
def self.key: (Hash[String, untyped] hash, String key) -> untyped
|
|
39
|
+
|
|
40
|
+
# @rbs value: untyped
|
|
41
|
+
# @rbs path: String | Array[String | Integer]
|
|
42
|
+
# @rbs allow_nil: bool
|
|
43
|
+
# @rbs allow_unset: bool
|
|
44
|
+
# @rbs return: untyped
|
|
45
|
+
def self.string: (untyped value, String | Array[String | Integer] path, ?allow_nil: bool, ?allow_unset: bool) -> untyped
|
|
46
|
+
|
|
47
|
+
# @rbs value: untyped
|
|
48
|
+
# @rbs path: String | Array[String | Integer]
|
|
49
|
+
# @rbs allow_nil: bool
|
|
50
|
+
# @rbs allow_unset: bool
|
|
51
|
+
# @rbs return: untyped
|
|
52
|
+
def self.boolean: (untyped value, String | Array[String | Integer] path, ?allow_nil: bool, ?allow_unset: bool) -> untyped
|
|
53
|
+
|
|
54
|
+
# @rbs value: untyped
|
|
55
|
+
# @rbs path: String | Array[String | Integer]
|
|
56
|
+
# @rbs min: Integer?
|
|
57
|
+
# @rbs max: Integer?
|
|
58
|
+
# @rbs allow_nil: bool
|
|
59
|
+
# @rbs allow_unset: bool
|
|
60
|
+
# @rbs return: untyped
|
|
61
|
+
def self.integer: (untyped value, String | Array[String | Integer] path, ?min: Integer?, ?max: Integer?, ?allow_nil: bool, ?allow_unset: bool) -> untyped
|
|
62
|
+
|
|
63
|
+
# @rbs value: untyped
|
|
64
|
+
# @rbs path: String | Array[String | Integer]
|
|
65
|
+
# @rbs min: Integer?
|
|
66
|
+
# @rbs max: Integer?
|
|
67
|
+
# @rbs allow_nil: bool
|
|
68
|
+
# @rbs allow_unset: bool
|
|
69
|
+
# @rbs return: untyped
|
|
70
|
+
def self.number: (untyped value, String | Array[String | Integer] path, ?min: Integer?, ?max: Integer?, ?allow_nil: bool, ?allow_unset: bool) -> untyped
|
|
71
|
+
|
|
72
|
+
# @rbs value: untyped
|
|
73
|
+
# @rbs path: String | Array[String | Integer]
|
|
74
|
+
# @rbs values: Array[untyped]
|
|
75
|
+
# @rbs allow_nil: bool
|
|
76
|
+
# @rbs allow_unset: bool
|
|
77
|
+
# @rbs return: untyped
|
|
78
|
+
def self.enum: (untyped value, String | Array[String | Integer] path, Array[untyped] values, ?allow_nil: bool, ?allow_unset: bool) -> untyped
|
|
79
|
+
|
|
80
|
+
# @rbs value: untyped
|
|
81
|
+
# @rbs path: String | Array[String | Integer]
|
|
82
|
+
# @rbs classes: Array[untyped]
|
|
83
|
+
# @rbs allow_nil: bool
|
|
84
|
+
# @rbs allow_unset: bool
|
|
85
|
+
# @rbs ?&items: (untyped, Array[String | Integer]) -> void
|
|
86
|
+
# @rbs return: untyped
|
|
87
|
+
def self.one_of: (untyped value, String | Array[String | Integer] path, Array[untyped] classes, ?allow_nil: bool, ?allow_unset: bool) ?{ (?) -> untyped } -> untyped
|
|
88
|
+
|
|
89
|
+
# @rbs value: untyped
|
|
90
|
+
# @rbs path: String | Array[String | Integer]
|
|
91
|
+
# @rbs allow_nil: bool
|
|
92
|
+
# @rbs allow_unset: bool
|
|
93
|
+
# @rbs &check: (untyped, Array[String | Integer]) -> void
|
|
94
|
+
# @rbs return: untyped
|
|
95
|
+
def self.hash: (untyped value, String | Array[String | Integer] path, ?allow_nil: bool, ?allow_unset: bool) { (untyped, Array[String | Integer]) -> void } -> untyped
|
|
96
|
+
|
|
97
|
+
# @rbs value: untyped
|
|
98
|
+
# @rbs path: String | Array[String | Integer]
|
|
99
|
+
# @rbs allow_nil: bool
|
|
100
|
+
# @rbs allow_unset: bool
|
|
101
|
+
# @rbs &check: (untyped, Array[String | Integer]) -> void
|
|
102
|
+
# @rbs return: untyped
|
|
103
|
+
def self.array: (untyped value, String | Array[String | Integer] path, ?allow_nil: bool, ?allow_unset: bool) { (untyped, Array[String | Integer]) -> void } -> untyped
|
|
104
|
+
|
|
105
|
+
# @rbs value: untyped
|
|
106
|
+
# @rbs path: String | Array[String | Integer]
|
|
107
|
+
# @rbs klass: untyped
|
|
108
|
+
# @rbs allow_nil: bool
|
|
109
|
+
# @rbs allow_unset: bool
|
|
110
|
+
# @rbs return: untyped
|
|
111
|
+
def self.object: (untyped value, String | Array[String | Integer] path, untyped klass, ?allow_nil: bool, ?allow_unset: bool) -> untyped
|
|
112
|
+
|
|
113
|
+
# @rbs value: untyped
|
|
114
|
+
# @rbs path: String | Array[String | Integer]
|
|
115
|
+
# @rbs klass: untyped
|
|
116
|
+
# @rbs allow_nil: bool
|
|
117
|
+
# @rbs allow_unset: bool
|
|
118
|
+
# @rbs return: untyped
|
|
119
|
+
def self.objects: (untyped value, String | Array[String | Integer] path, untyped klass, ?allow_nil: bool, ?allow_unset: bool) -> untyped
|
|
120
|
+
|
|
121
|
+
# @rbs value: untyped
|
|
122
|
+
# @rbs allow_nil: bool
|
|
123
|
+
# @rbs allow_unset: bool
|
|
124
|
+
# @rbs return: bool
|
|
125
|
+
def self.skipped?: (untyped value, bool allow_nil, bool allow_unset) -> bool
|
|
126
|
+
|
|
127
|
+
# @rbs path: String | Array[String | Integer]
|
|
128
|
+
# @rbs return: Array[String | Integer]
|
|
129
|
+
def self.segments: (String | Array[String | Integer] path) -> Array[String | Integer]
|
|
130
|
+
|
|
131
|
+
# @rbs value: untyped
|
|
132
|
+
# @rbs return: String
|
|
133
|
+
def self.describe: (untyped value) -> String
|
|
134
|
+
|
|
135
|
+
# @rbs value: Numeric
|
|
136
|
+
# @rbs min: Integer?
|
|
137
|
+
# @rbs max: Integer?
|
|
138
|
+
# @rbs return: bool
|
|
139
|
+
def self.within?: (Numeric value, Integer? min, Integer? max) -> bool
|
|
140
|
+
|
|
141
|
+
# @rbs name: String
|
|
142
|
+
# @rbs min: Integer?
|
|
143
|
+
# @rbs max: Integer?
|
|
144
|
+
# @rbs return: String
|
|
145
|
+
def self.bounded: (String name, Integer? min, Integer? max) -> String
|
|
146
|
+
end
|
|
4
147
|
end
|