acp-sdk 0.12.0 → 0.13.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 +11 -0
- data/lib/acp/agent_connection/client.rb +2 -2
- data/lib/acp/agent_connection.rb +2 -2
- data/lib/acp/client_connection/streams.rb +2 -2
- data/lib/acp/client_connection.rb +2 -2
- data/lib/acp/version.rb +1 -1
- data/sig/generated/acp/agent_connection/client.rbs +3 -3
- data/sig/generated/acp/agent_connection.rbs +3 -3
- data/sig/generated/acp/client_connection/streams.rbs +3 -3
- data/sig/generated/acp/client_connection.rbs +3 -3
- data/sig/manual/acp/agent_connection.rbs +0 -22
- data/sig/manual/acp/client_connection.rbs +0 -7
- data/sig/manual/acp/transport.rbs +0 -16
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fdea95657cb02b7563bbc7730fe4b346cb7e80f08ab78071b0da79e3d46704e3
|
|
4
|
+
data.tar.gz: 57efa048c5f5959d842e89d750ea2bd92e6caf4e4d6fc0c54964f2eaca577776
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d4120fff675aa4c1afa4c9101b5403997f6a281c1eab85c34b2515958e4ee87fd0a13e1083015a66a0549a88e1b18d7aa264b948277a6650ad4062fffef6d046
|
|
7
|
+
data.tar.gz: 3cba7edd6dccf7300211347d17114550588cd1ce7ba581f4da53f4d7623beffe923fd1912dd9a7c42e698d823f2dfad4a9344920a5962c3e9e77c39467d51409
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.13.0](https://github.com/bottrall/acp-sdk/compare/v0.12.0...v0.13.0) (2026-10-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* the ACP::Transport::_Transport, ACP::Transport::_Peer, ACP::ClientConnection::Streams::_Sender and ACP::AgentConnection::_Client interfaces no longer exist. Name ACP::Transport::Stdio and ACP::AgentConnection::Client instead.
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* type transport and client seams as concrete classes ([#149](https://github.com/bottrall/acp-sdk/issues/149)) ([89805a0](https://github.com/bottrall/acp-sdk/commit/89805a0a462701a9528a059a63dc5147ba2285c2))
|
|
13
|
+
|
|
3
14
|
## [0.12.0](https://github.com/bottrall/acp-sdk/compare/v0.11.0...v0.12.0) (2026-10-13)
|
|
4
15
|
|
|
5
16
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
class ACP::AgentConnection::Client
|
|
4
|
-
# @rbs @peer: ACP::Transport::
|
|
4
|
+
# @rbs @peer: ACP::Transport::Stdio
|
|
5
5
|
# @rbs @mcp_advertised: bool
|
|
6
6
|
|
|
7
7
|
# @dynamic capabilities, capabilities=
|
|
8
8
|
attr_accessor :capabilities #: ACP::Types::ClientCapabilities?
|
|
9
9
|
|
|
10
|
-
# @rbs peer: ACP::Transport::
|
|
10
|
+
# @rbs peer: ACP::Transport::Stdio
|
|
11
11
|
# @rbs mcp_advertised: bool
|
|
12
12
|
# @rbs return: void
|
|
13
13
|
def initialize(peer:, mcp_advertised: false)
|
data/lib/acp/agent_connection.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
class ACP::AgentConnection
|
|
4
|
-
# @rbs @transport: ACP::Transport::
|
|
4
|
+
# @rbs @transport: ACP::Transport::Stdio
|
|
5
5
|
# @rbs @capabilities: ACP::Types::AgentCapabilities
|
|
6
6
|
# @rbs @agent_info: ACP::Types::Implementation?
|
|
7
7
|
# @rbs @auth_methods: Array[ACP::Types::AuthMethod::t]
|
|
@@ -18,7 +18,7 @@ class ACP::AgentConnection
|
|
|
18
18
|
'session/set_config_option' => :change_session_config_option
|
|
19
19
|
}.freeze #: Hash[String, Symbol]
|
|
20
20
|
|
|
21
|
-
# @rbs transport: ACP::Transport::
|
|
21
|
+
# @rbs transport: ACP::Transport::Stdio
|
|
22
22
|
# @rbs capabilities: ACP::Types::AgentCapabilities
|
|
23
23
|
# @rbs agent_info: ACP::Types::Implementation?
|
|
24
24
|
# @rbs auth_methods: Array[ACP::Types::AuthMethod::t]
|
|
@@ -8,7 +8,7 @@ class ACP::ClientConnection::Streams
|
|
|
8
8
|
outcome: ACP::Types::RequestPermissionOutcome::Cancelled.new
|
|
9
9
|
) #: ACP::Types::RequestPermissionResponse
|
|
10
10
|
|
|
11
|
-
# @rbs @sender: ACP::
|
|
11
|
+
# @rbs @sender: ACP::Transport::Stdio
|
|
12
12
|
# @rbs @permission: ACP::ClientConnection::_PermissionHandler
|
|
13
13
|
# @rbs @updates: ACP::ClientConnection::_UpdateHandler
|
|
14
14
|
# @rbs @complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?
|
|
@@ -18,7 +18,7 @@ class ACP::ClientConnection::Streams
|
|
|
18
18
|
# @rbs @pending_permissions: Hash[String, Array[Thread::Queue]]
|
|
19
19
|
# @rbs @outstanding_elicitations: Hash[String, bool]
|
|
20
20
|
|
|
21
|
-
# @rbs sender: ACP::
|
|
21
|
+
# @rbs sender: ACP::Transport::Stdio
|
|
22
22
|
# @rbs permission: ACP::ClientConnection::_PermissionHandler
|
|
23
23
|
# @rbs updates: ACP::ClientConnection::_UpdateHandler
|
|
24
24
|
# @rbs logger: ACP::Transport::_Logger
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
class ACP::ClientConnection
|
|
4
|
-
# @rbs @transport: ACP::Transport::
|
|
4
|
+
# @rbs @transport: ACP::Transport::Stdio
|
|
5
5
|
# @rbs @permission: ACP::ClientConnection::_PermissionHandler
|
|
6
6
|
# @rbs @read_text_file: (^(ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError))?
|
|
7
7
|
# @rbs @write_text_file: (^(ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError))?
|
|
@@ -145,7 +145,7 @@ class ACP::ClientConnection
|
|
|
145
145
|
)
|
|
146
146
|
].freeze #: Array[ACP::ClientConnection::Route]
|
|
147
147
|
|
|
148
|
-
# @rbs transport: ACP::Transport::
|
|
148
|
+
# @rbs transport: ACP::Transport::Stdio
|
|
149
149
|
# @rbs permission: ACP::ClientConnection::_PermissionHandler
|
|
150
150
|
# @rbs read_text_file: (^(ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError))?
|
|
151
151
|
# @rbs write_text_file: (^(ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError))?
|
data/lib/acp/version.rb
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
class ACP::AgentConnection::Client
|
|
4
4
|
@mcp_advertised: bool
|
|
5
5
|
|
|
6
|
-
@peer: ACP::Transport::
|
|
6
|
+
@peer: ACP::Transport::Stdio
|
|
7
7
|
|
|
8
8
|
# @dynamic capabilities, capabilities=
|
|
9
9
|
attr_accessor capabilities: ACP::Types::ClientCapabilities?
|
|
10
10
|
|
|
11
|
-
# @rbs peer: ACP::Transport::
|
|
11
|
+
# @rbs peer: ACP::Transport::Stdio
|
|
12
12
|
# @rbs mcp_advertised: bool
|
|
13
13
|
# @rbs return: void
|
|
14
|
-
def initialize: (peer: ACP::Transport::
|
|
14
|
+
def initialize: (peer: ACP::Transport::Stdio, ?mcp_advertised: bool) -> void
|
|
15
15
|
|
|
16
16
|
# @rbs session_id: String
|
|
17
17
|
# @rbs update: ACP::Types::SessionUpdate::t
|
|
@@ -15,14 +15,14 @@ class ACP::AgentConnection
|
|
|
15
15
|
|
|
16
16
|
@capabilities: ACP::Types::AgentCapabilities
|
|
17
17
|
|
|
18
|
-
@transport: ACP::Transport::
|
|
18
|
+
@transport: ACP::Transport::Stdio
|
|
19
19
|
|
|
20
20
|
# The schema has no initialize capability for modes or config options: an
|
|
21
21
|
# agent offers them per session, in its session responses, so they are
|
|
22
22
|
# routed whenever the agent defines them.
|
|
23
23
|
PER_SESSION: Hash[String, Symbol]
|
|
24
24
|
|
|
25
|
-
# @rbs transport: ACP::Transport::
|
|
25
|
+
# @rbs transport: ACP::Transport::Stdio
|
|
26
26
|
# @rbs capabilities: ACP::Types::AgentCapabilities
|
|
27
27
|
# @rbs agent_info: ACP::Types::Implementation?
|
|
28
28
|
# @rbs auth_methods: Array[ACP::Types::AuthMethod::t]
|
|
@@ -31,7 +31,7 @@ class ACP::AgentConnection
|
|
|
31
31
|
# @rbs logger: ACP::Transport::_Logger
|
|
32
32
|
# @rbs &factory: (ACP::AgentConnection::Client) -> ACP::AgentConnection::_Agent
|
|
33
33
|
# @rbs return: void
|
|
34
|
-
def initialize: (transport: ACP::Transport::
|
|
34
|
+
def initialize: (transport: ACP::Transport::Stdio, capabilities: ACP::Types::AgentCapabilities, ?agent_info: ACP::Types::Implementation?, ?auth_methods: Array[ACP::Types::AuthMethod::t], ?extension_requests: Hash[String, ^(untyped) -> untyped], ?extension_notifications: Hash[String, ^(untyped) -> void], ?logger: ACP::Transport::_Logger) { (ACP::AgentConnection::Client) -> ACP::AgentConnection::_Agent } -> void
|
|
35
35
|
|
|
36
36
|
# @rbs return: Thread
|
|
37
37
|
def start: () -> Thread
|
|
@@ -22,15 +22,15 @@ class ACP::ClientConnection::Streams
|
|
|
22
22
|
|
|
23
23
|
@permission: ACP::ClientConnection::_PermissionHandler
|
|
24
24
|
|
|
25
|
-
@sender: ACP::
|
|
25
|
+
@sender: ACP::Transport::Stdio
|
|
26
26
|
|
|
27
|
-
# @rbs sender: ACP::
|
|
27
|
+
# @rbs sender: ACP::Transport::Stdio
|
|
28
28
|
# @rbs permission: ACP::ClientConnection::_PermissionHandler
|
|
29
29
|
# @rbs updates: ACP::ClientConnection::_UpdateHandler
|
|
30
30
|
# @rbs logger: ACP::Transport::_Logger
|
|
31
31
|
# @rbs complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?
|
|
32
32
|
# @rbs return: void
|
|
33
|
-
def initialize: (sender: ACP::
|
|
33
|
+
def initialize: (sender: ACP::Transport::Stdio, permission: ACP::ClientConnection::_PermissionHandler, updates: ACP::ClientConnection::_UpdateHandler, logger: ACP::Transport::_Logger, ?complete_elicitation: (^(ACP::Types::CompleteElicitationNotification) -> void)?) -> void
|
|
34
34
|
|
|
35
35
|
# The request waits on its own thread so the caller's thread can yield each
|
|
36
36
|
# update as it arrives. The reader thread queues an update before it settles
|
|
@@ -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::Transport::
|
|
4
|
+
@transport: ACP::Transport::Stdio
|
|
5
5
|
|
|
6
6
|
@permission: ACP::ClientConnection::_PermissionHandler
|
|
7
7
|
|
|
@@ -96,7 +96,7 @@ class ACP::ClientConnection
|
|
|
96
96
|
# up others.
|
|
97
97
|
SERVE: Array[ACP::ClientConnection::Route]
|
|
98
98
|
|
|
99
|
-
# @rbs transport: ACP::Transport::
|
|
99
|
+
# @rbs transport: ACP::Transport::Stdio
|
|
100
100
|
# @rbs permission: ACP::ClientConnection::_PermissionHandler
|
|
101
101
|
# @rbs read_text_file: (^(ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError))?
|
|
102
102
|
# @rbs write_text_file: (^(ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError))?
|
|
@@ -117,7 +117,7 @@ class ACP::ClientConnection
|
|
|
117
117
|
# @rbs streams: ACP::ClientConnection::Streams?
|
|
118
118
|
# @rbs logger: ACP::Transport::_Logger
|
|
119
119
|
# @rbs return: void
|
|
120
|
-
def initialize: (transport: ACP::Transport::
|
|
120
|
+
def initialize: (transport: ACP::Transport::Stdio, 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
|
|
121
121
|
|
|
122
122
|
# @rbs return: Thread
|
|
123
123
|
def start: () -> Thread
|
|
@@ -85,26 +85,4 @@ class ACP::AgentConnection
|
|
|
85
85
|
# Runs on the transport's reader thread, so it must return quickly.
|
|
86
86
|
def mcp_message_notification: (ACP::Types::Unstable::MessageMcpNotification notification) -> void
|
|
87
87
|
end
|
|
88
|
-
|
|
89
|
-
# What an agent sees of ACP::AgentConnection::Client, so tests can pass a fake.
|
|
90
|
-
interface _Client
|
|
91
|
-
def update: (String session_id, ACP::Types::SessionUpdate::t update) -> void
|
|
92
|
-
def available_commands: (String session_id, Array[ACP::Types::AvailableCommand] commands) -> void
|
|
93
|
-
def request_permission: (ACP::Types::RequestPermissionRequest) -> (ACP::Types::RequestPermissionResponse | ACP::RequestError)
|
|
94
|
-
def cancel_requests: () -> void
|
|
95
|
-
def cancelled?: () -> bool
|
|
96
|
-
def read_text_file: (ACP::Types::ReadTextFileRequest) -> (ACP::Types::ReadTextFileResponse | ACP::RequestError)
|
|
97
|
-
def write_text_file: (ACP::Types::WriteTextFileRequest) -> (ACP::Types::WriteTextFileResponse | ACP::RequestError)
|
|
98
|
-
def create_terminal: (ACP::Types::CreateTerminalRequest) -> (ACP::Types::CreateTerminalResponse | ACP::RequestError)
|
|
99
|
-
def terminal_output: (ACP::Types::TerminalOutputRequest) -> (ACP::Types::TerminalOutputResponse | ACP::RequestError)
|
|
100
|
-
def wait_for_terminal_exit: (ACP::Types::WaitForTerminalExitRequest) -> (ACP::Types::WaitForTerminalExitResponse | ACP::RequestError)
|
|
101
|
-
def kill_terminal: (ACP::Types::KillTerminalRequest) -> (ACP::Types::KillTerminalResponse | ACP::RequestError)
|
|
102
|
-
def release_terminal: (ACP::Types::ReleaseTerminalRequest) -> (ACP::Types::ReleaseTerminalResponse | ACP::RequestError)
|
|
103
|
-
def create_elicitation: (ACP::Types::CreateElicitationRequest request) -> (ACP::Types::CreateElicitationResponse | ACP::RequestError)
|
|
104
|
-
def complete_elicitation: (ACP::Types::CompleteElicitationNotification notification) -> void
|
|
105
|
-
def mcp_message: (ACP::Types::Unstable::MessageMcpRequest request) -> (ACP::Types::Unstable::MessageMcpResponse::t | ACP::RequestError)
|
|
106
|
-
def ext_request: (String method, ?untyped params) -> (Hash[String, untyped] | ACP::RequestError)
|
|
107
|
-
def ext_notify: (String method, ?untyped params) -> void
|
|
108
|
-
def capabilities: () -> ACP::Types::ClientCapabilities?
|
|
109
|
-
end
|
|
110
88
|
end
|
|
@@ -9,10 +9,3 @@ class ACP::ClientConnection
|
|
|
9
9
|
def call: (ACP::Types::SessionNotification) -> void
|
|
10
10
|
end
|
|
11
11
|
end
|
|
12
|
-
|
|
13
|
-
class ACP::ClientConnection::Streams
|
|
14
|
-
interface _Sender
|
|
15
|
-
def request: (String method, ?untyped params) -> (Hash[String, untyped] | ACP::RequestError)
|
|
16
|
-
def cancellation: () -> ACP::Transport::Cancellation?
|
|
17
|
-
end
|
|
18
|
-
end
|
|
@@ -5,22 +5,6 @@ module ACP::Transport
|
|
|
5
5
|
def error: (String message) -> void
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
interface _Peer
|
|
9
|
-
def request: (String method, ?untyped params) -> (Hash[String, untyped] | ACP::RequestError)
|
|
10
|
-
def notify: (String method, ?untyped params) -> void
|
|
11
|
-
def cancellation: () -> ACP::Transport::Cancellation?
|
|
12
|
-
def cancel_requests: () -> void
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
interface _Transport
|
|
16
|
-
include _Peer
|
|
17
|
-
|
|
18
|
-
def start: (
|
|
19
|
-
requests: Hash[String, ACP::Transport::Stdio::_Handler],
|
|
20
|
-
notifications: Hash[String, ACP::Transport::Stdio::_NotificationHandler]
|
|
21
|
-
) -> Thread
|
|
22
|
-
end
|
|
23
|
-
|
|
24
8
|
interface _Parser
|
|
25
9
|
def from_h: (Hash[String, untyped]) -> untyped
|
|
26
10
|
end
|