You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0cd8df3
Browse filesBrowse the repository at this point in the historyBrowse files
Mark Pollack
committed
acp-core: a supported in-process transport, InMemoryTransportPair
An application that connects its own ACP client to its own agent in one JVM
(a web endpoint driving an @AcpAgent, for instance) had to take
InMemoryTransportPair from acp-test, a test artifact, at runtime.
The pair now lives in acp-core as
com.agentclientprotocol.sdk.agent.transport.InMemoryTransportPair, reusing the
acp-test implementation, with what a supported transport needs:
- One JSON mapper per pair: create() takes the classpath default once,
create(AcpJsonMapper) takes one the application configures (the test copy
created a mapper for every conversion).
- Either side's close ends the connection for both: both transports'
awaitTermination() complete, so AcpSyncAgent.run() returns when the client
closes and the client fails its waiting requests at once instead of at their
timeout; a request the agent sent the client and that is still unanswered
fails with -32603, as on stdio. Messages sent before the end are delivered;
a send after it fails with AcpConnectionException. Both reproduced first:
the new lifecycle tests fail on the acp-test class.
- connect() and start() complete at once, as the transport interfaces
specify; one message's handler failure no longer stops the next; transport
errors are logged at WARN by default.
The send queue becomes InMemoryChannel, whose close is serialised with the
sends (a plain tryEmitComplete could be lost to FAIL_NON_SERIALIZED). A
Lincheck model check covers it and fails when the accept lock is removed.
acp-test's InMemoryTransportPair is deprecated and delegates to the acp-core
class. The repository's own tests move to the acp-core class, acp-core's
private test copy is removed, and AcpAgentHostTest keeps its client open
until the host stops, since closing it is now a transport end.
|`com.agentclientprotocol.sdk.agent.transport`| Agent transports (`StdioAcpAgentTransport`; `StreamableHttpAcpServlet` from acp-http-servlet; `StreamableHttpAcpAgentTransport` from acp-streamable-http-jetty; `StreamableHttpAcpAgentTransportOptions` from acp-http-core) |
463
+
|`com.agentclientprotocol.sdk.agent.transport`| Agent transports (`StdioAcpAgentTransport`; the in-process `InMemoryTransportPair`, which also hands out its client side; `StreamableHttpAcpServlet` from acp-http-servlet; `StreamableHttpAcpAgentTransport` from acp-streamable-http-jetty; `StreamableHttpAcpAgentTransportOptions` from acp-http-core) |
464
464
|`com.agentclientprotocol.sdk.http.webflux`| The Spring WebFlux host from acp-http-webflux (`AcpWebFluxHost`) |
465
465
|`com.agentclientprotocol.sdk.http.server`| The host contract from acp-http-core (`AcpHttpEndpoint`, `AcpHttpExchange`, `AcpHttpReply`, `AcpWsHandshake`), for writing a server adapter; unstable |
466
466
|`com.agentclientprotocol.sdk.agent.support`| Annotation-based agent runtime (`AcpAgentSupport`), with its `resolver`, `handler`, `interceptor` and `invocation` extension points |
@@ -469,7 +469,7 @@ that authenticates in front. Browser requests whose `Origin` is not a loopback o
|`com.agentclientprotocol.sdk.json`| JSON mapping abstraction (`AcpJsonMapper`, `TypeRef`); the Jackson 2 implementation (`JacksonAcpJsonMapper`) from acp-json-jackson2 |
471
471
|`com.agentclientprotocol.sdk.json.jackson3`| Jackson 3 implementation (`Jackson3AcpJsonMapper`) from acp-json-jackson3 |
472
-
|`com.agentclientprotocol.sdk.test`| Test support from acp-test (`InMemoryTransportPair`, `MockAcpAgent`, `MockAcpClient`) |
472
+
|`com.agentclientprotocol.sdk.test`| Test support from acp-test (`MockAcpAgent`, `MockAcpClient`) |
473
473
474
474
### Maven Artifacts
475
475
@@ -494,6 +494,7 @@ that authenticates in front. Browser requests whose `Origin` is not a loopback o
| Streamable HTTP and WebSocket in your own Servlet 6 container |`StreamableHttpAcpClientTransport`, `WebSocketAcpClientTransport`|`StreamableHttpAcpServlet` (WebSocket where the container has Jakarta WebSocket 2.1) | acp-core / acp-http-servlet |
@@ -574,9 +575,10 @@ profile on demand and uploads the report.
Copy file name to clipboardExpand all lines: acp-agent-support/src/test/java/com/agentclientprotocol/sdk/agent/support/AcpAgentSupportBuilderReuseTest.java
Copy file name to clipboardExpand all lines: acp-agent-support/src/test/java/com/agentclientprotocol/sdk/agent/support/AcpAgentSupportBuilderStateTest.java
Copy file name to clipboardExpand all lines: acp-agent-support/src/test/java/com/agentclientprotocol/sdk/agent/support/AcpAgentSupportConnectionContextTest.java
Copy file name to clipboardExpand all lines: acp-agent-support/src/test/java/com/agentclientprotocol/sdk/agent/support/AcpAgentSupportErrorPathTest.java
Copy file name to clipboardExpand all lines: acp-agent-support/src/test/java/com/agentclientprotocol/sdk/agent/support/AcpAgentSupportExtensionTest.java
Copy file name to clipboardExpand all lines: acp-agent-support/src/test/java/com/agentclientprotocol/sdk/agent/support/AcpAgentSupportHandlerExecutorTest.java
Copy file name to clipboardExpand all lines: acp-agent-support/src/test/java/com/agentclientprotocol/sdk/agent/support/AcpAgentSupportLifecycleTest.java
0 commit comments