acp-sdk 0.9.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +32 -0
- data/README.md +20 -8
- data/lib/acp/agent_connection/client.rb +31 -13
- data/lib/acp/agent_connection/optional_method/spec.rb +42 -0
- data/lib/acp/agent_connection/optional_method.rb +36 -0
- data/lib/acp/agent_connection.rb +67 -20
- data/lib/acp/agent_process.rb +0 -13
- data/lib/acp/client_connection/streams.rb +183 -0
- data/lib/acp/client_connection.rb +280 -338
- data/lib/acp/protocol.rb +33 -0
- data/lib/acp/request_error.rb +13 -13
- data/lib/acp/transport/cancellation.rb +13 -3
- data/lib/acp/transport/reply.rb +0 -2
- data/lib/acp/transport/stderr_logger.rb +1 -2
- data/lib/acp/transport/stdio.rb +25 -26
- data/lib/acp/types/audio_content.rb +3 -46
- data/lib/acp/types/auth_method_terminal.rb +3 -59
- data/lib/acp/types/available_commands_update.rb +3 -32
- data/lib/acp/types/boolean_property_schema.rb +3 -41
- data/lib/acp/types/check.rb +210 -0
- data/lib/acp/types/config_option_update.rb +3 -32
- data/lib/acp/types/content.rb +3 -29
- data/lib/acp/types/{elicitation_url_mode → create_elicitation_request/mode/form}/scope.rb +1 -1
- data/lib/acp/types/create_elicitation_request/mode/form.rb +3 -3
- data/lib/acp/types/{elicitation_form_mode → create_elicitation_request/mode/url}/scope.rb +1 -1
- data/lib/acp/types/create_elicitation_request/mode/url.rb +3 -3
- data/lib/acp/types/current_mode_update.rb +3 -29
- data/lib/acp/types/diff.rb +3 -41
- data/lib/acp/types/elicitation_accept_action.rb +3 -26
- data/lib/acp/types/elicitation_form_mode.rb +3 -33
- data/lib/acp/types/elicitation_url_mode.rb +3 -35
- data/lib/acp/types/embedded_resource.rb +3 -44
- data/lib/acp/types/image_content.rb +3 -58
- data/lib/acp/types/integer_property_schema.rb +3 -60
- data/lib/acp/types/mcp_server_http.rb +3 -44
- data/lib/acp/types/mcp_server_sse.rb +3 -44
- data/lib/acp/types/multi_select_property_schema.rb +3 -70
- data/lib/acp/types/number_property_schema.rb +3 -60
- data/lib/acp/types/parse_error.rb +37 -0
- data/lib/acp/types/plan.rb +3 -29
- data/lib/acp/types/resource_link.rb +3 -79
- data/lib/acp/types/selected_permission_outcome.rb +3 -26
- data/lib/acp/types/session_config_boolean.rb +3 -21
- data/lib/acp/types/session_config_select.rb +3 -33
- data/lib/acp/types/session_info_update.rb +3 -42
- data/lib/acp/types/string_multi_select_items.rb +3 -29
- data/lib/acp/types/string_property_schema.rb +3 -105
- data/lib/acp/types/terminal.rb +3 -29
- data/lib/acp/types/text_content.rb +3 -40
- data/lib/acp/types/tool_call.rb +3 -115
- data/lib/acp/types/unstable/compaction_summary_chunk.rb +3 -35
- data/lib/acp/types/unstable/compaction_update.rb +3 -56
- data/lib/acp/types/unstable/idle_state_update.rb +3 -40
- data/lib/acp/types/unstable/mcp_server_acp.rb +3 -35
- data/lib/acp/types/unstable/message_mcp_response/result.rb +1 -1
- data/lib/acp/types/unstable/nes_edit_suggestion.rb +3 -61
- data/lib/acp/types/unstable/nes_jump_suggestion.rb +3 -45
- data/lib/acp/types/unstable/nes_rename_suggestion.rb +3 -51
- data/lib/acp/types/unstable/nes_search_and_replace_suggestion.rb +3 -60
- data/lib/acp/types/unstable/notice.rb +3 -41
- data/lib/acp/types/unstable/plan_file.rb +3 -35
- data/lib/acp/types/unstable/plan_items.rb +3 -38
- data/lib/acp/types/unstable/plan_markdown.rb +3 -35
- data/lib/acp/types/unstable/plan_removed.rb +3 -26
- data/lib/acp/types/unstable/plan_update.rb +3 -33
- data/lib/acp/types/unstable/requires_action_state_update.rb +3 -21
- data/lib/acp/types/unstable/running_state_update.rb +3 -21
- data/lib/acp/types/unstable/session_message.rb +3 -56
- data/lib/acp/types/unstable/session_message_chunk.rb +3 -53
- data/lib/acp/types/unstable/subagent_update.rb +3 -65
- data/lib/acp/types/unstable/unknown_state_update.rb +3 -21
- data/lib/acp/types/unstable.rb +20 -20
- data/lib/acp/types/usage_update.rb +3 -41
- data/lib/acp/types.rb +7 -246
- data/lib/acp/version.rb +1 -1
- data/sig/generated/acp/agent_connection/client.rbs +25 -15
- data/sig/generated/acp/agent_connection/optional_method/spec.rbs +32 -0
- data/sig/generated/acp/agent_connection/optional_method.rbs +3 -0
- data/sig/generated/acp/agent_connection.rbs +34 -13
- data/sig/generated/acp/agent_process.rbs +0 -13
- data/sig/generated/acp/client_connection/streams.rbs +94 -0
- data/sig/generated/acp/client_connection.rbs +128 -131
- data/sig/generated/acp/protocol.rbs +9 -0
- data/sig/generated/acp/request_error.rbs +11 -13
- data/sig/generated/acp/transport/cancellation.rbs +9 -3
- data/sig/generated/acp/transport/reply.rbs +0 -2
- data/sig/generated/acp/transport/stderr_logger.rbs +1 -2
- data/sig/generated/acp/transport/stdio.rbs +14 -22
- data/sig/generated/acp/types/audio_content.rbs +1 -27
- data/sig/generated/acp/types/auth_method_terminal.rbs +1 -35
- data/sig/generated/acp/types/available_commands_update.rbs +1 -19
- data/sig/generated/acp/types/boolean_property_schema.rbs +1 -27
- data/sig/generated/acp/types/check.rbs +115 -0
- data/sig/generated/acp/types/config_option_update.rbs +1 -19
- data/sig/generated/acp/types/content.rbs +1 -19
- data/sig/generated/acp/types/{elicitation_url_mode → create_elicitation_request/mode/form}/scope.rbs +2 -2
- data/sig/generated/acp/types/create_elicitation_request/mode/form.rbs +3 -3
- data/sig/generated/acp/types/{elicitation_form_mode → create_elicitation_request/mode/url}/scope.rbs +2 -2
- data/sig/generated/acp/types/create_elicitation_request/mode/url.rbs +3 -3
- data/sig/generated/acp/types/current_mode_update.rbs +1 -19
- data/sig/generated/acp/types/diff.rbs +1 -27
- data/sig/generated/acp/types/elicitation_accept_action.rbs +1 -15
- data/sig/generated/acp/types/elicitation_form_mode.rbs +1 -19
- data/sig/generated/acp/types/elicitation_url_mode.rbs +1 -23
- data/sig/generated/acp/types/embedded_resource.rbs +1 -23
- data/sig/generated/acp/types/image_content.rbs +1 -31
- data/sig/generated/acp/types/integer_property_schema.rbs +1 -35
- data/sig/generated/acp/types/mcp_server_http.rbs +1 -27
- data/sig/generated/acp/types/mcp_server_sse.rbs +1 -27
- data/sig/generated/acp/types/multi_select_property_schema.rbs +1 -39
- data/sig/generated/acp/types/number_property_schema.rbs +1 -35
- data/sig/generated/acp/types/parse_error.rbs +22 -0
- data/sig/generated/acp/types/plan.rbs +1 -19
- data/sig/generated/acp/types/resource_link.rbs +1 -43
- data/sig/generated/acp/types/selected_permission_outcome.rbs +1 -19
- data/sig/generated/acp/types/session_config_boolean.rbs +1 -15
- data/sig/generated/acp/types/session_config_select.rbs +1 -19
- data/sig/generated/acp/types/session_info_update.rbs +1 -23
- data/sig/generated/acp/types/string_multi_select_items.rbs +1 -19
- data/sig/generated/acp/types/string_property_schema.rbs +1 -51
- data/sig/generated/acp/types/terminal.rbs +1 -19
- data/sig/generated/acp/types/text_content.rbs +1 -23
- data/sig/generated/acp/types/tool_call.rbs +1 -51
- data/sig/generated/acp/types/unstable/compaction_summary_chunk.rbs +1 -23
- data/sig/generated/acp/types/unstable/compaction_update.rbs +1 -31
- data/sig/generated/acp/types/unstable/idle_state_update.rbs +1 -23
- data/sig/generated/acp/types/unstable/mcp_server_acp.rbs +1 -23
- data/sig/generated/acp/types/unstable/nes_edit_suggestion.rbs +1 -31
- data/sig/generated/acp/types/unstable/nes_jump_suggestion.rbs +1 -27
- data/sig/generated/acp/types/unstable/nes_rename_suggestion.rbs +1 -31
- data/sig/generated/acp/types/unstable/nes_search_and_replace_suggestion.rbs +1 -35
- data/sig/generated/acp/types/unstable/notice.rbs +1 -27
- data/sig/generated/acp/types/unstable/plan_file.rbs +1 -23
- data/sig/generated/acp/types/unstable/plan_items.rbs +1 -23
- data/sig/generated/acp/types/unstable/plan_markdown.rbs +1 -23
- data/sig/generated/acp/types/unstable/plan_removed.rbs +1 -19
- data/sig/generated/acp/types/unstable/plan_update.rbs +1 -19
- data/sig/generated/acp/types/unstable/requires_action_state_update.rbs +1 -15
- data/sig/generated/acp/types/unstable/running_state_update.rbs +1 -15
- data/sig/generated/acp/types/unstable/session_message.rbs +1 -31
- data/sig/generated/acp/types/unstable/session_message_chunk.rbs +1 -31
- data/sig/generated/acp/types/unstable/subagent_update.rbs +1 -35
- data/sig/generated/acp/types/unstable/unknown_state_update.rbs +1 -15
- data/sig/generated/acp/types/usage_update.rbs +1 -27
- data/sig/generated/acp/types.rbs +6 -143
- data/sig/manual/acp/agent_connection.rbs +28 -28
- data/sig/manual/acp/client_connection.rbs +7 -2
- data/sig/manual/acp/{agent_connection/optional_method/logout.rbs → protocol.rbs} +3 -3
- data/sig/manual/acp/transport/stdio.rbs +0 -2
- data/sig/manual/acp/transport.rbs +25 -2
- metadata +17 -29
- data/lib/acp/agent_connection/optional_method/authenticate.rb +0 -21
- data/lib/acp/agent_connection/optional_method/close_session.rb +0 -21
- data/lib/acp/agent_connection/optional_method/delete_session.rb +0 -21
- data/lib/acp/agent_connection/optional_method/list_sessions.rb +0 -21
- data/lib/acp/agent_connection/optional_method/load_session.rb +0 -21
- data/lib/acp/agent_connection/optional_method/logout.rb +0 -21
- data/lib/acp/agent_connection/optional_method/resume_session.rb +0 -21
- data/lib/acp/types/content_chunk.rb +0 -40
- data/sig/generated/acp/agent_connection/optional_method/authenticate.rbs +0 -13
- data/sig/generated/acp/agent_connection/optional_method/close_session.rbs +0 -13
- data/sig/generated/acp/agent_connection/optional_method/delete_session.rbs +0 -13
- data/sig/generated/acp/agent_connection/optional_method/list_sessions.rbs +0 -13
- data/sig/generated/acp/agent_connection/optional_method/load_session.rbs +0 -13
- data/sig/generated/acp/agent_connection/optional_method/logout.rbs +0 -13
- data/sig/generated/acp/agent_connection/optional_method/resume_session.rbs +0 -13
- data/sig/generated/acp/types/content_chunk.rbs +0 -25
- data/sig/manual/acp/agent_connection/optional_method/authenticate.rbs +0 -6
- data/sig/manual/acp/agent_connection/optional_method/close_session.rbs +0 -6
- data/sig/manual/acp/agent_connection/optional_method/delete_session.rbs +0 -6
- data/sig/manual/acp/agent_connection/optional_method/list_sessions.rbs +0 -6
- data/sig/manual/acp/agent_connection/optional_method/load_session.rbs +0 -6
- data/sig/manual/acp/agent_connection/optional_method/resume_session.rbs +0 -6
|
@@ -2,36 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :config_options #: Array[ACP::Types::SessionConfigOption]
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::ConfigOptionUpdate = ACP::Types::SessionUpdate::ConfigOptionUpdate
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
11
|
-
|
|
12
|
-
# @rbs config_options: Array[ACP::Types::SessionConfigOption]
|
|
13
|
-
# @rbs meta: Hash[String, untyped]?
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(config_options:, meta: nil)
|
|
16
|
-
@config_options = config_options
|
|
17
|
-
@meta = meta
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::ConfigOptionUpdate
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
config_options = ACP::Types::Check.array(
|
|
25
|
-
ACP::Types::Check.key(hash, 'configOptions'),
|
|
26
|
-
'configOptions'
|
|
27
|
-
) do |item, path|
|
|
28
|
-
ACP::Types::Check.object(item, path, ACP::Types::SessionConfigOption)
|
|
29
|
-
end
|
|
30
|
-
new(config_options:, meta: hash['_meta'])
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# @rbs return: Hash[String, untyped]
|
|
34
|
-
def to_h
|
|
35
|
-
{ 'configOptions' => config_options.map(&:to_h), '_meta' => meta }.compact
|
|
36
|
-
end
|
|
37
|
-
end
|
|
8
|
+
ACP::Types::ConfigOptionUpdate = ACP::Types::SessionUpdate::ConfigOptionUpdate
|
data/lib/acp/types/content.rb
CHANGED
|
@@ -2,33 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :content #: ACP::Types::ContentBlock::t
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::Content = ACP::Types::ToolCallContent::Content
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
11
|
-
|
|
12
|
-
# @rbs content: ACP::Types::ContentBlock::t
|
|
13
|
-
# @rbs meta: Hash[String, untyped]?
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(content:, meta: nil)
|
|
16
|
-
@content = content
|
|
17
|
-
@meta = meta
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::Content
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
new(
|
|
25
|
-
content: ACP::Types::Check.object(ACP::Types::Check.key(hash, 'content'), 'content', ACP::Types::ContentBlock),
|
|
26
|
-
meta: hash['_meta']
|
|
27
|
-
)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# @rbs return: Hash[String, untyped]
|
|
31
|
-
def to_h
|
|
32
|
-
{ 'content' => content.to_h, '_meta' => meta }.compact
|
|
33
|
-
end
|
|
34
|
-
end
|
|
8
|
+
ACP::Types::Content = ACP::Types::ToolCallContent::Content
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
module ACP::Types::
|
|
5
|
+
module ACP::Types::CreateElicitationRequest::Mode::Form::Scope
|
|
6
6
|
# @rbs!
|
|
7
7
|
# type t = ACP::Types::ElicitationSessionScope
|
|
8
8
|
# | ACP::Types::ElicitationRequestScope
|
|
@@ -7,10 +7,10 @@ class ACP::Types::CreateElicitationRequest::Mode::Form
|
|
|
7
7
|
attr_reader :requested_schema #: ACP::Types::ElicitationSchema
|
|
8
8
|
|
|
9
9
|
# @dynamic scope
|
|
10
|
-
attr_reader :scope #: ACP::Types::
|
|
10
|
+
attr_reader :scope #: ACP::Types::CreateElicitationRequest::Mode::Form::Scope::t
|
|
11
11
|
|
|
12
12
|
# @rbs requested_schema: ACP::Types::ElicitationSchema
|
|
13
|
-
# @rbs scope: ACP::Types::
|
|
13
|
+
# @rbs scope: ACP::Types::CreateElicitationRequest::Mode::Form::Scope::t
|
|
14
14
|
# @rbs return: void
|
|
15
15
|
def initialize(requested_schema:, scope:)
|
|
16
16
|
@requested_schema = requested_schema
|
|
@@ -27,7 +27,7 @@ class ACP::Types::CreateElicitationRequest::Mode::Form
|
|
|
27
27
|
'requestedSchema',
|
|
28
28
|
ACP::Types::ElicitationSchema
|
|
29
29
|
),
|
|
30
|
-
scope: ACP::Types::
|
|
30
|
+
scope: ACP::Types::CreateElicitationRequest::Mode::Form::Scope.from_h(hash)
|
|
31
31
|
)
|
|
32
32
|
end
|
|
33
33
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
module ACP::Types::
|
|
5
|
+
module ACP::Types::CreateElicitationRequest::Mode::Url::Scope
|
|
6
6
|
# @rbs!
|
|
7
7
|
# type t = ACP::Types::ElicitationSessionScope
|
|
8
8
|
# | ACP::Types::ElicitationRequestScope
|
|
@@ -10,11 +10,11 @@ class ACP::Types::CreateElicitationRequest::Mode::Url
|
|
|
10
10
|
attr_reader :url #: String
|
|
11
11
|
|
|
12
12
|
# @dynamic scope
|
|
13
|
-
attr_reader :scope #: ACP::Types::
|
|
13
|
+
attr_reader :scope #: ACP::Types::CreateElicitationRequest::Mode::Url::Scope::t
|
|
14
14
|
|
|
15
15
|
# @rbs elicitation_id: String
|
|
16
16
|
# @rbs url: String
|
|
17
|
-
# @rbs scope: ACP::Types::
|
|
17
|
+
# @rbs scope: ACP::Types::CreateElicitationRequest::Mode::Url::Scope::t
|
|
18
18
|
# @rbs return: void
|
|
19
19
|
def initialize(elicitation_id:, url:, scope:)
|
|
20
20
|
@elicitation_id = elicitation_id
|
|
@@ -29,7 +29,7 @@ class ACP::Types::CreateElicitationRequest::Mode::Url
|
|
|
29
29
|
new(
|
|
30
30
|
elicitation_id: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'elicitationId'), 'elicitationId'),
|
|
31
31
|
url: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'url'), 'url'),
|
|
32
|
-
scope: ACP::Types::
|
|
32
|
+
scope: ACP::Types::CreateElicitationRequest::Mode::Url::Scope.from_h(hash)
|
|
33
33
|
)
|
|
34
34
|
end
|
|
35
35
|
|
|
@@ -2,33 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :current_mode_id #: String
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::CurrentModeUpdate = ACP::Types::SessionUpdate::CurrentModeUpdate
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
11
|
-
|
|
12
|
-
# @rbs current_mode_id: String
|
|
13
|
-
# @rbs meta: Hash[String, untyped]?
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(current_mode_id:, meta: nil)
|
|
16
|
-
@current_mode_id = current_mode_id
|
|
17
|
-
@meta = meta
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::CurrentModeUpdate
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
new(
|
|
25
|
-
current_mode_id: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'currentModeId'), 'currentModeId'),
|
|
26
|
-
meta: hash['_meta']
|
|
27
|
-
)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# @rbs return: Hash[String, untyped]
|
|
31
|
-
def to_h
|
|
32
|
-
{ 'currentModeId' => current_mode_id, '_meta' => meta }.compact
|
|
33
|
-
end
|
|
34
|
-
end
|
|
8
|
+
ACP::Types::CurrentModeUpdate = ACP::Types::SessionUpdate::CurrentModeUpdate
|
data/lib/acp/types/diff.rb
CHANGED
|
@@ -2,45 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :path #: String
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::Diff = ACP::Types::ToolCallContent::Diff
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :old_text #: String?
|
|
11
|
-
|
|
12
|
-
# @dynamic new_text
|
|
13
|
-
attr_reader :new_text #: String
|
|
14
|
-
|
|
15
|
-
# @dynamic meta
|
|
16
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
17
|
-
|
|
18
|
-
# @rbs path: String
|
|
19
|
-
# @rbs old_text: String?
|
|
20
|
-
# @rbs new_text: String
|
|
21
|
-
# @rbs meta: Hash[String, untyped]?
|
|
22
|
-
# @rbs return: void
|
|
23
|
-
def initialize(path:, new_text:, old_text: nil, meta: nil)
|
|
24
|
-
@path = path
|
|
25
|
-
@old_text = old_text
|
|
26
|
-
@new_text = new_text
|
|
27
|
-
@meta = meta
|
|
28
|
-
freeze
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# @rbs hash: Hash[String, untyped]
|
|
32
|
-
# @rbs return: ACP::Types::Diff
|
|
33
|
-
def self.from_h(hash)
|
|
34
|
-
new(
|
|
35
|
-
path: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'path'), 'path'),
|
|
36
|
-
old_text: ACP::Types::Check.string(hash['oldText'], 'oldText', allow_nil: true),
|
|
37
|
-
new_text: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'newText'), 'newText'),
|
|
38
|
-
meta: hash['_meta']
|
|
39
|
-
)
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# @rbs return: Hash[String, untyped]
|
|
43
|
-
def to_h
|
|
44
|
-
{ 'path' => path, 'newText' => new_text, 'oldText' => old_text, '_meta' => meta }.compact
|
|
45
|
-
end
|
|
46
|
-
end
|
|
8
|
+
ACP::Types::Diff = ACP::Types::ToolCallContent::Diff
|
|
@@ -2,30 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :content #: (Hash[String, String | Integer | Numeric | bool | Array[String]])?
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::ElicitationAcceptAction = ACP::Types::CreateElicitationResponse::Action::Accept
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
# @rbs return: void
|
|
11
|
-
def initialize(content: nil)
|
|
12
|
-
@content = content
|
|
13
|
-
freeze
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# @rbs hash: Hash[String, untyped]
|
|
17
|
-
# @rbs return: ACP::Types::ElicitationAcceptAction
|
|
18
|
-
def self.from_h(hash)
|
|
19
|
-
content = ACP::Types::Check.hash(hash['content'], 'content', allow_nil: true) do |value, path|
|
|
20
|
-
ACP::Types::Check.one_of(value, path, [String, Integer, Numeric, TrueClass, FalseClass, Array]) do |item, path|
|
|
21
|
-
ACP::Types::Check.string(item, path)
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
new(content:)
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# @rbs return: Hash[String, untyped]
|
|
28
|
-
def to_h
|
|
29
|
-
{ 'content' => content }.compact
|
|
30
|
-
end
|
|
31
|
-
end
|
|
8
|
+
ACP::Types::ElicitationAcceptAction = ACP::Types::CreateElicitationResponse::Action::Accept
|
|
@@ -2,37 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :requested_schema #: ACP::Types::ElicitationSchema
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::ElicitationFormMode = ACP::Types::CreateElicitationRequest::Mode::Form
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :scope #: ACP::Types::ElicitationFormMode::Scope::t
|
|
11
|
-
|
|
12
|
-
# @rbs requested_schema: ACP::Types::ElicitationSchema
|
|
13
|
-
# @rbs scope: ACP::Types::ElicitationFormMode::Scope::t
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(requested_schema:, scope:)
|
|
16
|
-
@requested_schema = requested_schema
|
|
17
|
-
@scope = scope
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::ElicitationFormMode
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
new(
|
|
25
|
-
requested_schema: ACP::Types::Check.object(
|
|
26
|
-
ACP::Types::Check.key(hash, 'requestedSchema'),
|
|
27
|
-
'requestedSchema',
|
|
28
|
-
ACP::Types::ElicitationSchema
|
|
29
|
-
),
|
|
30
|
-
scope: ACP::Types::ElicitationFormMode::Scope.from_h(hash)
|
|
31
|
-
)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# @rbs return: Hash[String, untyped]
|
|
35
|
-
def to_h
|
|
36
|
-
{ 'requestedSchema' => requested_schema.to_h }.merge(scope.to_h)
|
|
37
|
-
end
|
|
38
|
-
end
|
|
8
|
+
ACP::Types::ElicitationFormMode = ACP::Types::CreateElicitationRequest::Mode::Form
|
|
@@ -2,39 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :elicitation_id #: String
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::ElicitationUrlMode = ACP::Types::CreateElicitationRequest::Mode::Url
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :url #: String
|
|
11
|
-
|
|
12
|
-
# @dynamic scope
|
|
13
|
-
attr_reader :scope #: ACP::Types::ElicitationUrlMode::Scope::t
|
|
14
|
-
|
|
15
|
-
# @rbs elicitation_id: String
|
|
16
|
-
# @rbs url: String
|
|
17
|
-
# @rbs scope: ACP::Types::ElicitationUrlMode::Scope::t
|
|
18
|
-
# @rbs return: void
|
|
19
|
-
def initialize(elicitation_id:, url:, scope:)
|
|
20
|
-
@elicitation_id = elicitation_id
|
|
21
|
-
@url = url
|
|
22
|
-
@scope = scope
|
|
23
|
-
freeze
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# @rbs hash: Hash[String, untyped]
|
|
27
|
-
# @rbs return: ACP::Types::ElicitationUrlMode
|
|
28
|
-
def self.from_h(hash)
|
|
29
|
-
new(
|
|
30
|
-
elicitation_id: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'elicitationId'), 'elicitationId'),
|
|
31
|
-
url: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'url'), 'url'),
|
|
32
|
-
scope: ACP::Types::ElicitationUrlMode::Scope.from_h(hash)
|
|
33
|
-
)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# @rbs return: Hash[String, untyped]
|
|
37
|
-
def to_h
|
|
38
|
-
{ 'elicitationId' => elicitation_id, 'url' => url }.merge(scope.to_h)
|
|
39
|
-
end
|
|
40
|
-
end
|
|
8
|
+
ACP::Types::ElicitationUrlMode = ACP::Types::CreateElicitationRequest::Mode::Url
|
|
@@ -2,48 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :annotations #: ACP::Types::Annotations?
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::EmbeddedResource = ACP::Types::ContentBlock::Resource
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :resource #: ACP::Types::EmbeddedResourceResource::t
|
|
11
|
-
|
|
12
|
-
# @dynamic meta
|
|
13
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
14
|
-
|
|
15
|
-
# @rbs annotations: ACP::Types::Annotations?
|
|
16
|
-
# @rbs resource: ACP::Types::EmbeddedResourceResource::t
|
|
17
|
-
# @rbs meta: Hash[String, untyped]?
|
|
18
|
-
# @rbs return: void
|
|
19
|
-
def initialize(resource:, annotations: nil, meta: nil)
|
|
20
|
-
@annotations = annotations
|
|
21
|
-
@resource = resource
|
|
22
|
-
@meta = meta
|
|
23
|
-
freeze
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# @rbs hash: Hash[String, untyped]
|
|
27
|
-
# @rbs return: ACP::Types::EmbeddedResource
|
|
28
|
-
def self.from_h(hash)
|
|
29
|
-
new(
|
|
30
|
-
annotations: ACP::Types::Check.object(
|
|
31
|
-
hash['annotations'],
|
|
32
|
-
'annotations',
|
|
33
|
-
ACP::Types::Annotations,
|
|
34
|
-
allow_nil: true
|
|
35
|
-
),
|
|
36
|
-
resource: ACP::Types::Check.object(
|
|
37
|
-
ACP::Types::Check.key(hash, 'resource'),
|
|
38
|
-
'resource',
|
|
39
|
-
ACP::Types::EmbeddedResourceResource
|
|
40
|
-
),
|
|
41
|
-
meta: hash['_meta']
|
|
42
|
-
)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# @rbs return: Hash[String, untyped]
|
|
46
|
-
def to_h
|
|
47
|
-
{ 'resource' => resource.to_h, 'annotations' => annotations&.to_h, '_meta' => meta }.compact
|
|
48
|
-
end
|
|
49
|
-
end
|
|
8
|
+
ACP::Types::EmbeddedResource = ACP::Types::ContentBlock::Resource
|
|
@@ -2,62 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :annotations #: ACP::Types::Annotations?
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::ImageContent = ACP::Types::ContentBlock::Image
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :data #: String
|
|
11
|
-
|
|
12
|
-
# @dynamic mime_type
|
|
13
|
-
attr_reader :mime_type #: String
|
|
14
|
-
|
|
15
|
-
# @dynamic uri
|
|
16
|
-
attr_reader :uri #: String?
|
|
17
|
-
|
|
18
|
-
# @dynamic meta
|
|
19
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
20
|
-
|
|
21
|
-
# @rbs annotations: ACP::Types::Annotations?
|
|
22
|
-
# @rbs data: String
|
|
23
|
-
# @rbs mime_type: String
|
|
24
|
-
# @rbs uri: String?
|
|
25
|
-
# @rbs meta: Hash[String, untyped]?
|
|
26
|
-
# @rbs return: void
|
|
27
|
-
def initialize(data:, mime_type:, annotations: nil, uri: nil, meta: nil)
|
|
28
|
-
@annotations = annotations
|
|
29
|
-
@data = data
|
|
30
|
-
@mime_type = mime_type
|
|
31
|
-
@uri = uri
|
|
32
|
-
@meta = meta
|
|
33
|
-
freeze
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# @rbs hash: Hash[String, untyped]
|
|
37
|
-
# @rbs return: ACP::Types::ImageContent
|
|
38
|
-
def self.from_h(hash)
|
|
39
|
-
new(
|
|
40
|
-
annotations: ACP::Types::Check.object(
|
|
41
|
-
hash['annotations'],
|
|
42
|
-
'annotations',
|
|
43
|
-
ACP::Types::Annotations,
|
|
44
|
-
allow_nil: true
|
|
45
|
-
),
|
|
46
|
-
data: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'data'), 'data'),
|
|
47
|
-
mime_type: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'mimeType'), 'mimeType'),
|
|
48
|
-
uri: ACP::Types::Check.string(hash['uri'], 'uri', allow_nil: true),
|
|
49
|
-
meta: hash['_meta']
|
|
50
|
-
)
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
# @rbs return: Hash[String, untyped]
|
|
54
|
-
def to_h
|
|
55
|
-
{
|
|
56
|
-
'data' => data,
|
|
57
|
-
'mimeType' => mime_type,
|
|
58
|
-
'annotations' => annotations&.to_h,
|
|
59
|
-
'uri' => uri,
|
|
60
|
-
'_meta' => meta
|
|
61
|
-
}.compact
|
|
62
|
-
end
|
|
63
|
-
end
|
|
8
|
+
ACP::Types::ImageContent = ACP::Types::ContentBlock::Image
|
|
@@ -2,64 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :title #: String?
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::IntegerPropertySchema = ACP::Types::ElicitationPropertySchema::IntegerPropertySchema
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :description #: String?
|
|
11
|
-
|
|
12
|
-
# @dynamic minimum
|
|
13
|
-
attr_reader :minimum #: Integer?
|
|
14
|
-
|
|
15
|
-
# @dynamic maximum
|
|
16
|
-
attr_reader :maximum #: Integer?
|
|
17
|
-
|
|
18
|
-
# @dynamic default
|
|
19
|
-
attr_reader :default #: Integer?
|
|
20
|
-
|
|
21
|
-
# @dynamic meta
|
|
22
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
23
|
-
|
|
24
|
-
# @rbs title: String?
|
|
25
|
-
# @rbs description: String?
|
|
26
|
-
# @rbs minimum: Integer?
|
|
27
|
-
# @rbs maximum: Integer?
|
|
28
|
-
# @rbs default: Integer?
|
|
29
|
-
# @rbs meta: Hash[String, untyped]?
|
|
30
|
-
# @rbs return: void
|
|
31
|
-
def initialize(title: nil, description: nil, minimum: nil, maximum: nil, default: nil, meta: nil)
|
|
32
|
-
@title = title
|
|
33
|
-
@description = description
|
|
34
|
-
@minimum = minimum
|
|
35
|
-
@maximum = maximum
|
|
36
|
-
@default = default
|
|
37
|
-
@meta = meta
|
|
38
|
-
freeze
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# @rbs hash: Hash[String, untyped]
|
|
42
|
-
# @rbs return: ACP::Types::IntegerPropertySchema
|
|
43
|
-
def self.from_h(hash)
|
|
44
|
-
new(
|
|
45
|
-
title: ACP::Types::Check.string(hash['title'], 'title', allow_nil: true),
|
|
46
|
-
description: ACP::Types::Check.string(hash['description'], 'description', allow_nil: true),
|
|
47
|
-
minimum: ACP::Types::Check.integer(hash['minimum'], 'minimum', allow_nil: true),
|
|
48
|
-
maximum: ACP::Types::Check.integer(hash['maximum'], 'maximum', allow_nil: true),
|
|
49
|
-
default: ACP::Types::Check.integer(hash['default'], 'default', allow_nil: true),
|
|
50
|
-
meta: hash['_meta']
|
|
51
|
-
)
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
# @rbs return: Hash[String, untyped]
|
|
55
|
-
def to_h
|
|
56
|
-
{
|
|
57
|
-
'title' => title,
|
|
58
|
-
'description' => description,
|
|
59
|
-
'minimum' => minimum,
|
|
60
|
-
'maximum' => maximum,
|
|
61
|
-
'default' => default,
|
|
62
|
-
'_meta' => meta
|
|
63
|
-
}.compact
|
|
64
|
-
end
|
|
65
|
-
end
|
|
8
|
+
ACP::Types::IntegerPropertySchema = ACP::Types::ElicitationPropertySchema::IntegerPropertySchema
|
|
@@ -2,48 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :name #: String
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::McpServerHttp = ACP::Types::McpServer::Http
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :url #: String
|
|
11
|
-
|
|
12
|
-
# @dynamic headers
|
|
13
|
-
attr_reader :headers #: Array[ACP::Types::HttpHeader]
|
|
14
|
-
|
|
15
|
-
# @dynamic meta
|
|
16
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
17
|
-
|
|
18
|
-
# @rbs name: String
|
|
19
|
-
# @rbs url: String
|
|
20
|
-
# @rbs headers: Array[ACP::Types::HttpHeader]
|
|
21
|
-
# @rbs meta: Hash[String, untyped]?
|
|
22
|
-
# @rbs return: void
|
|
23
|
-
def initialize(name:, url:, headers:, meta: nil)
|
|
24
|
-
@name = name
|
|
25
|
-
@url = url
|
|
26
|
-
@headers = headers
|
|
27
|
-
@meta = meta
|
|
28
|
-
freeze
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# @rbs hash: Hash[String, untyped]
|
|
32
|
-
# @rbs return: ACP::Types::McpServerHttp
|
|
33
|
-
def self.from_h(hash)
|
|
34
|
-
headers = ACP::Types::Check.array(ACP::Types::Check.key(hash, 'headers'), 'headers') do |item, path|
|
|
35
|
-
ACP::Types::Check.object(item, path, ACP::Types::HttpHeader)
|
|
36
|
-
end
|
|
37
|
-
new(
|
|
38
|
-
name: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'name'), 'name'),
|
|
39
|
-
url: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'url'), 'url'),
|
|
40
|
-
headers:,
|
|
41
|
-
meta: hash['_meta']
|
|
42
|
-
)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# @rbs return: Hash[String, untyped]
|
|
46
|
-
def to_h
|
|
47
|
-
{ 'name' => name, 'url' => url, 'headers' => headers.map(&:to_h), '_meta' => meta }.compact
|
|
48
|
-
end
|
|
49
|
-
end
|
|
8
|
+
ACP::Types::McpServerHttp = ACP::Types::McpServer::Http
|
|
@@ -2,48 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Generated by bin/types from schema/schema.json. Do not edit.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
attr_reader :name #: String
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::McpServerSse = ACP::Types::McpServer::Sse
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :url #: String
|
|
11
|
-
|
|
12
|
-
# @dynamic headers
|
|
13
|
-
attr_reader :headers #: Array[ACP::Types::HttpHeader]
|
|
14
|
-
|
|
15
|
-
# @dynamic meta
|
|
16
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
17
|
-
|
|
18
|
-
# @rbs name: String
|
|
19
|
-
# @rbs url: String
|
|
20
|
-
# @rbs headers: Array[ACP::Types::HttpHeader]
|
|
21
|
-
# @rbs meta: Hash[String, untyped]?
|
|
22
|
-
# @rbs return: void
|
|
23
|
-
def initialize(name:, url:, headers:, meta: nil)
|
|
24
|
-
@name = name
|
|
25
|
-
@url = url
|
|
26
|
-
@headers = headers
|
|
27
|
-
@meta = meta
|
|
28
|
-
freeze
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# @rbs hash: Hash[String, untyped]
|
|
32
|
-
# @rbs return: ACP::Types::McpServerSse
|
|
33
|
-
def self.from_h(hash)
|
|
34
|
-
headers = ACP::Types::Check.array(ACP::Types::Check.key(hash, 'headers'), 'headers') do |item, path|
|
|
35
|
-
ACP::Types::Check.object(item, path, ACP::Types::HttpHeader)
|
|
36
|
-
end
|
|
37
|
-
new(
|
|
38
|
-
name: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'name'), 'name'),
|
|
39
|
-
url: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'url'), 'url'),
|
|
40
|
-
headers:,
|
|
41
|
-
meta: hash['_meta']
|
|
42
|
-
)
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
# @rbs return: Hash[String, untyped]
|
|
46
|
-
def to_h
|
|
47
|
-
{ 'name' => name, 'url' => url, 'headers' => headers.map(&:to_h), '_meta' => meta }.compact
|
|
48
|
-
end
|
|
49
|
-
end
|
|
8
|
+
ACP::Types::McpServerSse = ACP::Types::McpServer::Sse
|