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 11273b5
Browse filesBrowse the repository at this point in the historyBrowse files
Mark Pollack
committed
One framework-neutral ACP endpoint, a host contract and a shared TCK
All protocol semantics of the Streamable HTTP and WebSocket transports
move into acp-http-core: routing, sessions, the bounded SSE mailboxes
and WebSocket send queue, the status and close-code table, the Origin
check, keep-alive and drain, behind AcpHttpEndpoint. Hosts only adapt
I/O through the contract types (AcpHttpExchange, AcpHttpReply, SseFrame,
AcpWsHandshake, AcpWsOutbound, AcpWsHandler), marked @UnstableAcpApi.
One neutral WebSocket connection replaces the Jetty-native one.
acp-http-servlet is the servlet host, with no Jetty dependency: it
upgrades WebSocket requests on its own path through Jakarta WebSocket
2.1 and serializes outbound frames, as Tomcat requires.
acp-streamable-http-jetty becomes a launcher that runs the servlet host
on Jetty 12.1 with Jetty's Jakarta WebSocket implementation.
Spring MVC mounts the servlet host on server.port: HTTP, SSE and
WebSocket through the application's filter chain, so Spring Security
applies to /acp and the principal reaches the endpoint. The endpoint
drains before graceful shutdown (closing comment, then close 1001), and
text/event-stream is never compressed.
The transport TCK in acp-test (AcpHttpTransportTck) runs on the servlet
under Tomcat 11 and Jetty 12.1, on the embedded listener and on Spring
MVC. ArchUnit rules keep hosts free of protocol classes. The CI
Lincheck matrix follows the mailbox tests to acp-http-core.
|`com.agentclientprotocol.sdk.agent.transport`| Agent transports (`StdioAcpAgentTransport`; `StreamableHttpAcpAgentTransport` and `StreamableHttpAcpServlet` from acp-streamable-http-jetty) |
463
+
|`com.agentclientprotocol.sdk.agent.transport`| Agent transports (`StdioAcpAgentTransport`; `StreamableHttpAcpServlet` from acp-http-servlet; `StreamableHttpAcpAgentTransport` from acp-streamable-http-jetty; `StreamableHttpAcpAgentTransportOptions` from acp-http-core) |
464
+
|`com.agentclientprotocol.sdk.http.server`| The host contract from acp-http-core (`AcpHttpEndpoint`, `AcpHttpExchange`, `AcpHttpReply`, `AcpWsHandshake`), for writing a server adapter; unstable |
464
465
|`com.agentclientprotocol.sdk.agent.support`| Annotation-based agent runtime (`AcpAgentSupport`), with its `resolver`, `handler`, `interceptor` and `invocation` extension points |
@@ -476,7 +477,9 @@ that authenticates in front. Browser requests whose `Origin` is not a loopback o
476
477
|[`acp-core`](https://central.sonatype.com/artifact/com.agentclientprotocol/acp-core)| Client and Agent SDKs, stdio, WebSocket, and Streamable HTTP client transports; needs one JSON module |
477
478
|`acp-json-jackson2`| JSON implementation on Jackson 2 (`JacksonAcpJsonMapper`); brought in by the transport and agent-support modules |
478
479
|`acp-json-jackson3`| JSON implementation on Jackson 3 (`Jackson3AcpJsonMapper`) |
479
-
|`acp-streamable-http-jetty`| Jetty-backed Streamable HTTP agent transport for listener-backed remote agents; also accepts WebSocket upgrades on the same path |
480
+
|`acp-http-core`| The framework-neutral ACP endpoint behind every HTTP host: routing, sessions, SSE mailboxes, the status and close-code table, the `Origin` check and shutdown, and the host contract (`com.agentclientprotocol.sdk.http.server`) |
481
+
|`acp-http-servlet`| The endpoint as a Servlet 6 servlet, `StreamableHttpAcpServlet`, with WebSocket upgrades on the same path through Jakarta WebSocket 2.1: Spring MVC, Tomcat, Jetty, Undertow |
482
+
|`acp-streamable-http-jetty`| The SDK's own listener, `StreamableHttpAcpAgentTransport`: embedded Jetty 12.1 running the servlet, for agents served from a plain Java program |
480
483
|[`acp-annotations`](https://central.sonatype.com/artifact/com.agentclientprotocol/acp-annotations)|`@AcpAgent`, `@Prompt`, and other annotations |
| Streamable HTTP in your own Servlet 6 container |`StreamableHttpAcpClientTransport`|`StreamableHttpAcpServlet` (HTTP/SSE only; the WebSocket upgrade needs `StreamableHttpAcpAgentTransport`) | acp-core / acp-streamable-http-jetty|
497
+
| 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|
<description>The framework-neutral ACP Streamable HTTP and WebSocket endpoint: routing, sessions, SSE mailboxes, the status and close-code table, the Origin check and shutdown, behind the host contract every server adapter implements</description>
18
+
19
+
<properties>
20
+
<!-- Coverage floors: measured line 83%, branch 67% (the TCK covers the rest from the host
Copy file name to clipboardExpand all lines: acp-http-core/src/main/java/com/agentclientprotocol/sdk/agent/transport/StreamableHttpAcpAgentTransportOptions.java
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,10 @@
14
14
15
15
/**
16
16
* The limits and timings of an ACP Streamable HTTP and WebSocket endpoint, for
17
-
* {@link StreamableHttpAcpAgentTransport} and {@link StreamableHttpAcpServlet} alike. Every
17
+
* every host of the endpoint alike: the SDK's listener ({@code StreamableHttpAcpAgentTransport},
18
+
* module {@code acp-streamable-http-jetty}), its servlet ({@code StreamableHttpAcpServlet},
19
+
* module {@code acp-http-servlet}) and the framework integrations, all of which serve
20
+
* {@link com.agentclientprotocol.sdk.http.server.AcpHttpEndpoint}. Every
18
21
* buffer the endpoint keeps for a client is bounded by one of these, so a slow or hostile
19
22
* client cannot make the agent's memory grow without bound. Pass one to the listener's or the
20
23
* servlet's constructor when a default does not fit; start from {@link #builder()}, or use
@@ -46,9 +49,8 @@
46
49
* open at once, each open SSE stream holding one; applied by the listener only, since a
47
50
* servlet container configures its own HTTP/2; default 1024
48
51
* @param shutdownTimeout how long closing the endpoint
0 commit comments