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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/README.md +15 -5
- data/lib/acp/agent_connection/client.rb +7 -19
- 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 +17 -40
- data/lib/acp/agent_process.rb +0 -13
- data/lib/acp/client_connection/streams.rb +183 -0
- data/lib/acp/client_connection.rb +227 -384
- data/lib/acp/protocol.rb +33 -0
- data/lib/acp/request_error.rb +7 -17
- data/lib/acp/transport/cancellation.rb +0 -7
- data/lib/acp/transport/reply.rb +0 -2
- data/lib/acp/transport/stderr_logger.rb +1 -2
- data/lib/acp/transport/stdio.rb +16 -22
- 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/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 +10 -19
- 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 +16 -24
- 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 +100 -159
- data/sig/generated/acp/protocol.rbs +9 -0
- data/sig/generated/acp/request_error.rbs +7 -17
- data/sig/generated/acp/transport/cancellation.rbs +0 -7
- 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 +9 -21
- 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 +0 -30
- 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 +16 -40
- 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/disable_provider.rb +0 -23
- data/lib/acp/agent_connection/optional_method/fork_session.rb +0 -23
- data/lib/acp/agent_connection/optional_method/list_providers.rb +0 -23
- 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/agent_connection/optional_method/set_provider.rb +0 -23
- 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/disable_provider.rbs +0 -13
- data/sig/generated/acp/agent_connection/optional_method/fork_session.rbs +0 -13
- data/sig/generated/acp/agent_connection/optional_method/list_providers.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/agent_connection/optional_method/set_provider.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/disable_provider.rbs +0 -6
- data/sig/manual/acp/agent_connection/optional_method/fork_session.rbs +0 -6
- data/sig/manual/acp/agent_connection/optional_method/list_providers.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
- data/sig/manual/acp/agent_connection/optional_method/set_provider.rbs +0 -6
|
@@ -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::NumberPropertySchema = ACP::Types::ElicitationPropertySchema::NumberPropertySchema
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :description #: String?
|
|
11
|
-
|
|
12
|
-
# @dynamic minimum
|
|
13
|
-
attr_reader :minimum #: Numeric?
|
|
14
|
-
|
|
15
|
-
# @dynamic maximum
|
|
16
|
-
attr_reader :maximum #: Numeric?
|
|
17
|
-
|
|
18
|
-
# @dynamic default
|
|
19
|
-
attr_reader :default #: Numeric?
|
|
20
|
-
|
|
21
|
-
# @dynamic meta
|
|
22
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
23
|
-
|
|
24
|
-
# @rbs title: String?
|
|
25
|
-
# @rbs description: String?
|
|
26
|
-
# @rbs minimum: Numeric?
|
|
27
|
-
# @rbs maximum: Numeric?
|
|
28
|
-
# @rbs default: Numeric?
|
|
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::NumberPropertySchema
|
|
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.number(hash['minimum'], 'minimum', allow_nil: true),
|
|
48
|
-
maximum: ACP::Types::Check.number(hash['maximum'], 'maximum', allow_nil: true),
|
|
49
|
-
default: ACP::Types::Check.number(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::NumberPropertySchema = ACP::Types::ElicitationPropertySchema::NumberPropertySchema
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Hand-authored support for the generated types: the generator neither emits
|
|
4
|
+
# nor deletes this file (see TypeGenerator::SUPPORT_FILES).
|
|
5
|
+
|
|
6
|
+
class ACP::Types::ParseError < StandardError
|
|
7
|
+
# @rbs @segments: Array[String | Integer]
|
|
8
|
+
# @rbs @detail: String
|
|
9
|
+
|
|
10
|
+
# @rbs segments: Array[String | Integer]
|
|
11
|
+
# @rbs detail: String
|
|
12
|
+
# @rbs return: void
|
|
13
|
+
def initialize(segments, detail)
|
|
14
|
+
@segments = segments.freeze
|
|
15
|
+
@detail = detail
|
|
16
|
+
super("#{path}: #{detail}")
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# @dynamic segments
|
|
20
|
+
attr_reader :segments #: Array[String | Integer]
|
|
21
|
+
|
|
22
|
+
# @rbs return: String
|
|
23
|
+
def path
|
|
24
|
+
segments.each_with_index.map do |segment, index|
|
|
25
|
+
if segment.is_a?(Integer) then "[#{segment}]"
|
|
26
|
+
elsif index.zero? then segment
|
|
27
|
+
else ".#{segment}"
|
|
28
|
+
end
|
|
29
|
+
end.join
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# @rbs *segments: (String | Integer)
|
|
33
|
+
# @rbs return: ACP::Types::ParseError
|
|
34
|
+
def prefix(*segments)
|
|
35
|
+
ACP::Types::ParseError.new([*segments, *@segments], @detail)
|
|
36
|
+
end
|
|
37
|
+
end
|
data/lib/acp/types/plan.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 :entries #: Array[ACP::Types::PlanEntry]
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::Plan = ACP::Types::SessionUpdate::Plan
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
11
|
-
|
|
12
|
-
# @rbs entries: Array[ACP::Types::PlanEntry]
|
|
13
|
-
# @rbs meta: Hash[String, untyped]?
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(entries:, meta: nil)
|
|
16
|
-
@entries = entries
|
|
17
|
-
@meta = meta
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::Plan
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
entries = ACP::Types::Check.array(ACP::Types::Check.key(hash, 'entries'), 'entries') do |item, path|
|
|
25
|
-
ACP::Types::Check.object(item, path, ACP::Types::PlanEntry)
|
|
26
|
-
end
|
|
27
|
-
new(entries:, meta: hash['_meta'])
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# @rbs return: Hash[String, untyped]
|
|
31
|
-
def to_h
|
|
32
|
-
{ 'entries' => entries.map(&:to_h), '_meta' => meta }.compact
|
|
33
|
-
end
|
|
34
|
-
end
|
|
8
|
+
ACP::Types::Plan = ACP::Types::SessionUpdate::Plan
|
|
@@ -2,83 +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::ResourceLink = ACP::Types::ContentBlock::ResourceLink
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :description #: String?
|
|
11
|
-
|
|
12
|
-
# @dynamic mime_type
|
|
13
|
-
attr_reader :mime_type #: String?
|
|
14
|
-
|
|
15
|
-
# @dynamic name
|
|
16
|
-
attr_reader :name #: String
|
|
17
|
-
|
|
18
|
-
# @dynamic size
|
|
19
|
-
attr_reader :size #: Integer?
|
|
20
|
-
|
|
21
|
-
# @dynamic title
|
|
22
|
-
attr_reader :title #: String?
|
|
23
|
-
|
|
24
|
-
# @dynamic uri
|
|
25
|
-
attr_reader :uri #: String
|
|
26
|
-
|
|
27
|
-
# @dynamic meta
|
|
28
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
29
|
-
|
|
30
|
-
# @rbs annotations: ACP::Types::Annotations?
|
|
31
|
-
# @rbs description: String?
|
|
32
|
-
# @rbs mime_type: String?
|
|
33
|
-
# @rbs name: String
|
|
34
|
-
# @rbs size: Integer?
|
|
35
|
-
# @rbs title: String?
|
|
36
|
-
# @rbs uri: String
|
|
37
|
-
# @rbs meta: Hash[String, untyped]?
|
|
38
|
-
# @rbs return: void
|
|
39
|
-
def initialize(name:, uri:, annotations: nil, description: nil, mime_type: nil, size: nil, title: nil, meta: nil)
|
|
40
|
-
@annotations = annotations
|
|
41
|
-
@description = description
|
|
42
|
-
@mime_type = mime_type
|
|
43
|
-
@name = name
|
|
44
|
-
@size = size
|
|
45
|
-
@title = title
|
|
46
|
-
@uri = uri
|
|
47
|
-
@meta = meta
|
|
48
|
-
freeze
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
# @rbs hash: Hash[String, untyped]
|
|
52
|
-
# @rbs return: ACP::Types::ResourceLink
|
|
53
|
-
def self.from_h(hash)
|
|
54
|
-
new(
|
|
55
|
-
annotations: ACP::Types::Check.object(
|
|
56
|
-
hash['annotations'],
|
|
57
|
-
'annotations',
|
|
58
|
-
ACP::Types::Annotations,
|
|
59
|
-
allow_nil: true
|
|
60
|
-
),
|
|
61
|
-
description: ACP::Types::Check.string(hash['description'], 'description', allow_nil: true),
|
|
62
|
-
mime_type: ACP::Types::Check.string(hash['mimeType'], 'mimeType', allow_nil: true),
|
|
63
|
-
name: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'name'), 'name'),
|
|
64
|
-
size: ACP::Types::Check.integer(hash['size'], 'size', allow_nil: true),
|
|
65
|
-
title: ACP::Types::Check.string(hash['title'], 'title', allow_nil: true),
|
|
66
|
-
uri: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'uri'), 'uri'),
|
|
67
|
-
meta: hash['_meta']
|
|
68
|
-
)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# @rbs return: Hash[String, untyped]
|
|
72
|
-
def to_h
|
|
73
|
-
{
|
|
74
|
-
'name' => name,
|
|
75
|
-
'uri' => uri,
|
|
76
|
-
'annotations' => annotations&.to_h,
|
|
77
|
-
'description' => description,
|
|
78
|
-
'mimeType' => mime_type,
|
|
79
|
-
'size' => size,
|
|
80
|
-
'title' => title,
|
|
81
|
-
'_meta' => meta
|
|
82
|
-
}.compact
|
|
83
|
-
end
|
|
84
|
-
end
|
|
8
|
+
ACP::Types::ResourceLink = ACP::Types::ContentBlock::ResourceLink
|
|
@@ -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 :option_id #: String
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::SelectedPermissionOutcome = ACP::Types::RequestPermissionOutcome::Selected
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
11
|
-
|
|
12
|
-
# @rbs option_id: String
|
|
13
|
-
# @rbs meta: Hash[String, untyped]?
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(option_id:, meta: nil)
|
|
16
|
-
@option_id = option_id
|
|
17
|
-
@meta = meta
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::SelectedPermissionOutcome
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
new(option_id: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'optionId'), 'optionId'), meta: hash['_meta'])
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
# @rbs return: Hash[String, untyped]
|
|
28
|
-
def to_h
|
|
29
|
-
{ 'optionId' => option_id, '_meta' => meta }.compact
|
|
30
|
-
end
|
|
31
|
-
end
|
|
8
|
+
ACP::Types::SelectedPermissionOutcome = ACP::Types::RequestPermissionOutcome::Selected
|
|
@@ -2,25 +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_value #: bool
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::SessionConfigBoolean = ACP::Types::SessionConfigOption::Kind::Boolean
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
# @rbs return: void
|
|
11
|
-
def initialize(current_value:)
|
|
12
|
-
@current_value = current_value
|
|
13
|
-
freeze
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
# @rbs hash: Hash[String, untyped]
|
|
17
|
-
# @rbs return: ACP::Types::SessionConfigBoolean
|
|
18
|
-
def self.from_h(hash)
|
|
19
|
-
new(current_value: ACP::Types::Check.boolean(ACP::Types::Check.key(hash, 'currentValue'), 'currentValue'))
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
# @rbs return: Hash[String, untyped]
|
|
23
|
-
def to_h
|
|
24
|
-
{ 'currentValue' => current_value }
|
|
25
|
-
end
|
|
26
|
-
end
|
|
8
|
+
ACP::Types::SessionConfigBoolean = ACP::Types::SessionConfigOption::Kind::Boolean
|
|
@@ -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 :current_value #: String
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::SessionConfigSelect = ACP::Types::SessionConfigOption::Kind::Select
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :options #: ACP::Types::SessionConfigSelectOptions::t
|
|
11
|
-
|
|
12
|
-
# @rbs current_value: String
|
|
13
|
-
# @rbs options: ACP::Types::SessionConfigSelectOptions::t
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(current_value:, options:)
|
|
16
|
-
@current_value = current_value
|
|
17
|
-
@options = options
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::SessionConfigSelect
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
new(
|
|
25
|
-
current_value: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'currentValue'), 'currentValue'),
|
|
26
|
-
options: ACP::Types::Check.objects(
|
|
27
|
-
ACP::Types::Check.key(hash, 'options'),
|
|
28
|
-
'options',
|
|
29
|
-
ACP::Types::SessionConfigSelectOptions
|
|
30
|
-
)
|
|
31
|
-
)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# @rbs return: Hash[String, untyped]
|
|
35
|
-
def to_h
|
|
36
|
-
{ 'currentValue' => current_value, 'options' => options.map(&:to_h) }
|
|
37
|
-
end
|
|
38
|
-
end
|
|
8
|
+
ACP::Types::SessionConfigSelect = ACP::Types::SessionConfigOption::Kind::Select
|
|
@@ -2,46 +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? | :unset
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::SessionInfoUpdate = ACP::Types::SessionUpdate::SessionInfoUpdate
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :updated_at #: String? | :unset
|
|
11
|
-
|
|
12
|
-
# @dynamic meta
|
|
13
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
14
|
-
|
|
15
|
-
# @rbs title: String? | :unset
|
|
16
|
-
# @rbs updated_at: String? | :unset
|
|
17
|
-
# @rbs meta: Hash[String, untyped]?
|
|
18
|
-
# @rbs return: void
|
|
19
|
-
def initialize(title: :unset, updated_at: :unset, meta: nil)
|
|
20
|
-
@title = title
|
|
21
|
-
@updated_at = updated_at
|
|
22
|
-
@meta = meta
|
|
23
|
-
freeze
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# @rbs hash: Hash[String, untyped]
|
|
27
|
-
# @rbs return: ACP::Types::SessionInfoUpdate
|
|
28
|
-
def self.from_h(hash)
|
|
29
|
-
new(
|
|
30
|
-
title: ACP::Types::Check.string(hash.fetch('title', :unset), 'title', allow_nil: true, allow_unset: true),
|
|
31
|
-
updated_at: ACP::Types::Check.string(
|
|
32
|
-
hash.fetch('updatedAt', :unset),
|
|
33
|
-
'updatedAt',
|
|
34
|
-
allow_nil: true,
|
|
35
|
-
allow_unset: true
|
|
36
|
-
),
|
|
37
|
-
meta: hash['_meta']
|
|
38
|
-
)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# @rbs return: Hash[String, untyped]
|
|
42
|
-
def to_h
|
|
43
|
-
{
|
|
44
|
-
'_meta' => meta
|
|
45
|
-
}.compact.merge({ 'title' => title, 'updatedAt' => updated_at }.reject { |_, value| value == :unset })
|
|
46
|
-
end
|
|
47
|
-
end
|
|
8
|
+
ACP::Types::SessionInfoUpdate = ACP::Types::SessionUpdate::SessionInfoUpdate
|
|
@@ -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 :enum #: Array[String]
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::StringMultiSelectItems = ACP::Types::MultiSelectItems::StringMultiSelectItems
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
11
|
-
|
|
12
|
-
# @rbs enum: Array[String]
|
|
13
|
-
# @rbs meta: Hash[String, untyped]?
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(enum:, meta: nil)
|
|
16
|
-
@enum = enum
|
|
17
|
-
@meta = meta
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::StringMultiSelectItems
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
enum = ACP::Types::Check.array(ACP::Types::Check.key(hash, 'enum'), 'enum') do |item, path|
|
|
25
|
-
ACP::Types::Check.string(item, path)
|
|
26
|
-
end
|
|
27
|
-
new(enum:, meta: hash['_meta'])
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# @rbs return: Hash[String, untyped]
|
|
31
|
-
def to_h
|
|
32
|
-
{ 'enum' => enum, '_meta' => meta }.compact
|
|
33
|
-
end
|
|
34
|
-
end
|
|
8
|
+
ACP::Types::StringMultiSelectItems = ACP::Types::MultiSelectItems::StringMultiSelectItems
|
|
@@ -2,109 +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::StringPropertySchema = ACP::Types::ElicitationPropertySchema::StringPropertySchema
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :description #: String?
|
|
11
|
-
|
|
12
|
-
# @dynamic min_length
|
|
13
|
-
attr_reader :min_length #: Integer?
|
|
14
|
-
|
|
15
|
-
# @dynamic max_length
|
|
16
|
-
attr_reader :max_length #: Integer?
|
|
17
|
-
|
|
18
|
-
# @dynamic pattern
|
|
19
|
-
attr_reader :pattern #: String?
|
|
20
|
-
|
|
21
|
-
# @dynamic format
|
|
22
|
-
attr_reader :format #: String?
|
|
23
|
-
|
|
24
|
-
# @dynamic default
|
|
25
|
-
attr_reader :default #: String?
|
|
26
|
-
|
|
27
|
-
# @dynamic enum
|
|
28
|
-
attr_reader :enum #: Array[String]?
|
|
29
|
-
|
|
30
|
-
# @dynamic one_of
|
|
31
|
-
attr_reader :one_of #: Array[ACP::Types::EnumOption]?
|
|
32
|
-
|
|
33
|
-
# @dynamic meta
|
|
34
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
35
|
-
|
|
36
|
-
# @rbs title: String?
|
|
37
|
-
# @rbs description: String?
|
|
38
|
-
# @rbs min_length: Integer?
|
|
39
|
-
# @rbs max_length: Integer?
|
|
40
|
-
# @rbs pattern: String?
|
|
41
|
-
# @rbs format: String?
|
|
42
|
-
# @rbs default: String?
|
|
43
|
-
# @rbs enum: Array[String]?
|
|
44
|
-
# @rbs one_of: Array[ACP::Types::EnumOption]?
|
|
45
|
-
# @rbs meta: Hash[String, untyped]?
|
|
46
|
-
# @rbs return: void
|
|
47
|
-
def initialize(
|
|
48
|
-
title: nil,
|
|
49
|
-
description: nil,
|
|
50
|
-
min_length: nil,
|
|
51
|
-
max_length: nil,
|
|
52
|
-
pattern: nil,
|
|
53
|
-
format: nil,
|
|
54
|
-
default: nil,
|
|
55
|
-
enum: nil,
|
|
56
|
-
one_of: nil,
|
|
57
|
-
meta: nil
|
|
58
|
-
)
|
|
59
|
-
@title = title
|
|
60
|
-
@description = description
|
|
61
|
-
@min_length = min_length
|
|
62
|
-
@max_length = max_length
|
|
63
|
-
@pattern = pattern
|
|
64
|
-
@format = format
|
|
65
|
-
@default = default
|
|
66
|
-
@enum = enum
|
|
67
|
-
@one_of = one_of
|
|
68
|
-
@meta = meta
|
|
69
|
-
freeze
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
# @rbs hash: Hash[String, untyped]
|
|
73
|
-
# @rbs return: ACP::Types::StringPropertySchema
|
|
74
|
-
def self.from_h(hash)
|
|
75
|
-
enum = ACP::Types::Check.array(hash['enum'], 'enum', allow_nil: true) do |item, path|
|
|
76
|
-
ACP::Types::Check.string(item, path)
|
|
77
|
-
end
|
|
78
|
-
one_of = ACP::Types::Check.array(hash['oneOf'], 'oneOf', allow_nil: true) do |item, path|
|
|
79
|
-
ACP::Types::Check.object(item, path, ACP::Types::EnumOption)
|
|
80
|
-
end
|
|
81
|
-
new(
|
|
82
|
-
title: ACP::Types::Check.string(hash['title'], 'title', allow_nil: true),
|
|
83
|
-
description: ACP::Types::Check.string(hash['description'], 'description', allow_nil: true),
|
|
84
|
-
min_length: ACP::Types::Check.integer(hash['minLength'], 'minLength', min: 0, allow_nil: true),
|
|
85
|
-
max_length: ACP::Types::Check.integer(hash['maxLength'], 'maxLength', min: 0, allow_nil: true),
|
|
86
|
-
pattern: ACP::Types::Check.string(hash['pattern'], 'pattern', allow_nil: true),
|
|
87
|
-
format: ACP::Types::Check.enum(hash['format'], 'format', %w[email uri date date-time], allow_nil: true),
|
|
88
|
-
default: ACP::Types::Check.string(hash['default'], 'default', allow_nil: true),
|
|
89
|
-
enum:,
|
|
90
|
-
one_of:,
|
|
91
|
-
meta: hash['_meta']
|
|
92
|
-
)
|
|
93
|
-
end
|
|
94
|
-
|
|
95
|
-
# @rbs return: Hash[String, untyped]
|
|
96
|
-
def to_h
|
|
97
|
-
{
|
|
98
|
-
'title' => title,
|
|
99
|
-
'description' => description,
|
|
100
|
-
'minLength' => min_length,
|
|
101
|
-
'maxLength' => max_length,
|
|
102
|
-
'pattern' => pattern,
|
|
103
|
-
'format' => format,
|
|
104
|
-
'default' => default,
|
|
105
|
-
'enum' => enum,
|
|
106
|
-
'oneOf' => one_of&.map(&:to_h),
|
|
107
|
-
'_meta' => meta
|
|
108
|
-
}.compact
|
|
109
|
-
end
|
|
110
|
-
end
|
|
8
|
+
ACP::Types::StringPropertySchema = ACP::Types::ElicitationPropertySchema::StringPropertySchema
|
data/lib/acp/types/terminal.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 :terminal_id #: String
|
|
5
|
+
# @rbs!
|
|
6
|
+
# class ACP::Types::Terminal = ACP::Types::ToolCallContent::Terminal
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
11
|
-
|
|
12
|
-
# @rbs terminal_id: String
|
|
13
|
-
# @rbs meta: Hash[String, untyped]?
|
|
14
|
-
# @rbs return: void
|
|
15
|
-
def initialize(terminal_id:, meta: nil)
|
|
16
|
-
@terminal_id = terminal_id
|
|
17
|
-
@meta = meta
|
|
18
|
-
freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# @rbs hash: Hash[String, untyped]
|
|
22
|
-
# @rbs return: ACP::Types::Terminal
|
|
23
|
-
def self.from_h(hash)
|
|
24
|
-
new(
|
|
25
|
-
terminal_id: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'terminalId'), 'terminalId'),
|
|
26
|
-
meta: hash['_meta']
|
|
27
|
-
)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
# @rbs return: Hash[String, untyped]
|
|
31
|
-
def to_h
|
|
32
|
-
{ 'terminalId' => terminal_id, '_meta' => meta }.compact
|
|
33
|
-
end
|
|
34
|
-
end
|
|
8
|
+
ACP::Types::Terminal = ACP::Types::ToolCallContent::Terminal
|
|
@@ -2,44 +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::TextContent = ACP::Types::ContentBlock::Text
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
attr_reader :text #: String
|
|
11
|
-
|
|
12
|
-
# @dynamic meta
|
|
13
|
-
attr_reader :meta #: Hash[String, untyped]?
|
|
14
|
-
|
|
15
|
-
# @rbs annotations: ACP::Types::Annotations?
|
|
16
|
-
# @rbs text: String
|
|
17
|
-
# @rbs meta: Hash[String, untyped]?
|
|
18
|
-
# @rbs return: void
|
|
19
|
-
def initialize(text:, annotations: nil, meta: nil)
|
|
20
|
-
@annotations = annotations
|
|
21
|
-
@text = text
|
|
22
|
-
@meta = meta
|
|
23
|
-
freeze
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# @rbs hash: Hash[String, untyped]
|
|
27
|
-
# @rbs return: ACP::Types::TextContent
|
|
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
|
-
text: ACP::Types::Check.string(ACP::Types::Check.key(hash, 'text'), 'text'),
|
|
37
|
-
meta: hash['_meta']
|
|
38
|
-
)
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# @rbs return: Hash[String, untyped]
|
|
42
|
-
def to_h
|
|
43
|
-
{ 'text' => text, 'annotations' => annotations&.to_h, '_meta' => meta }.compact
|
|
44
|
-
end
|
|
45
|
-
end
|
|
8
|
+
ACP::Types::TextContent = ACP::Types::ContentBlock::Text
|