Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
271 lines (253 loc) · 12.4 KB
/
Copy pathpom.xml
File metadata and controls
271 lines (253 loc) · 12.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-java-tutorial</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ACP Java Tutorial</name>
<description>Progressive tutorial modules for learning the Agent Client Protocol (ACP) Java SDK</description>
<properties>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<acp-sdk.version>0.80.0</acp-sdk.version>
<spring-boot.version>4.1.0</spring-boot.version>
<!-- The ACP Spring Boot starter. From SDK 0.80.0 it is part of the SDK,
com.agentclientprotocol:acp-spring-boot-starter at the SDK's version (through 0.18.0 it was
org.springaicommunity:acp-spring-boot-starter 0.12.0). -->
<acp-spring-boot.groupId>com.agentclientprotocol</acp-spring-boot.groupId>
<acp-spring-boot.version>${acp-sdk.version}</acp-spring-boot.version>
<anthropic-sdk.version>2.34.0</anthropic-sdk.version>
<slf4j.version>2.0.9</slf4j.version>
<agentworks.version>1.6.0</agentworks.version>
<!-- Jackson, as the SDK manages it (its 2.22.3 CVE bump). Imported ahead of agentworks-bom,
and ahead of spring-boot-dependencies in the Spring Boot modules, since the first
import that manages an artifact wins. Module 41 keeps the Quarkus BOM's Jackson. -->
<jackson.version>2.22.3</jackson.version>
<jackson3.version>3.1.7</jackson3.version>
</properties>
<modules>
<!-- Part 1: First Steps (Client Basics) -->
<module>module-01-first-contact</module>
<module>module-02-protocol-basics</module>
<module>module-03-sessions</module>
<module>module-04-prompts</module>
<!-- Part 2: Client Features -->
<module>module-05-streaming-updates</module>
<module>module-06-update-types</module>
<module>module-07-agent-requests</module>
<module>module-08-permissions</module>
<!-- Part 3: Client Mastery -->
<module>module-09-session-resume</module>
<module>module-10-cancellation</module>
<module>module-11-error-handling</module>
<!-- Part 4: The Agent Side -->
<module>module-12-echo-agent</module>
<!-- The "juicier" reveal: same skeleton as the echo agent, but the
promptHandler calls a real LLM (Anthropic). First module where you
can point at the line of Java that invokes the AI. -->
<module>module-25-ai-chatbot-agent</module>
<module>module-14-sending-updates</module>
<module>module-15-agent-requests</module>
<!-- Part 5: Both Ends Together -->
<module>module-16-in-memory-testing</module>
<module>module-17-capability-negotiation</module>
<module>module-18-terminal-operations</module>
<!-- Part 5B: Session Management -->
<module>module-20-session-management</module>
<!-- Part 6: Advanced Integration -->
<module>module-19-mcp-servers</module>
<module>module-21-async-client</module>
<module>module-22-async-agent</module>
<!-- Part 9: Elicitation (stable in ACP v1 since protocol v1.7.0) -->
<module>module-31-elicitation</module>
<!-- Part 7: Spring Boot Integration (requires Java 21) -->
<module>module-23-spring-boot-agent</module>
<module>module-24-spring-boot-client</module>
<!-- Chatbot portability flavor: Spring AI ChatClient on the ACP starter -->
<module>module-26-spring-ai-chatbot</module>
<!-- Chatbot portability flavor: LangChain4j ChatModel -->
<module>module-27-langchain4j-chatbot</module>
<!-- Agentic flavor: the @Prompt handler drives a real Claude AGENT (tools,
multi-step loop) via agent-client - the bridge between the chatbot and bud. -->
<module>module-32-agent-client</module>
<!-- Part 8: IDE Integration (one module covers JetBrains, Zed, VS Code) -->
<module>module-29-jetbrains-integration</module>
<!-- Part 10: New in SDK 0.80.0 -->
<module>module-33-session-config-options</module>
<module>module-34-extension-methods</module>
<module>module-35-cancellation-timeouts</module>
<module>module-36-terminal-auth-logout</module>
<module>module-37-streamable-http-websocket</module>
<module>module-38-spring-boot-http</module>
<module>module-39-forward-compatibility</module>
<module>module-40-micronaut</module>
<module>module-41-quarkus</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-core</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<!-- Pin acp-annotations to the SDK version. acp-core 0.14.0 transitively
declares acp-annotations 0.12.0, which predates @Logout and breaks
AcpAgentSupport's handler discovery; depMgmt forces the matching version. -->
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-annotations</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<!-- JSON modules. From 0.18.0, acp-core carries no JSON implementation: a module
that depends on acp-core alone must add one. Plain Java modules use Jackson 2;
the Spring Boot 4 modules get Jackson 3 from the ACP starter. -->
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-json-jackson2</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-json-jackson3</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-agent-support</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-test</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<!-- Streamable HTTP + WebSocket agent listener (Jetty) and mountable servlet (0.80.0) -->
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-streamable-http-jetty</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<!-- Framework integrations (0.80.0): Micronaut 4 (module 40) and the Quarkus extension (module 41) -->
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-micronaut</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<dependency>
<groupId>com.agentclientprotocol</groupId>
<artifactId>acp-quarkus</artifactId>
<version>${acp-sdk.version}</version>
</dependency>
<!-- Anthropic Java SDK (chatbot agent, module 25). Aggregator jar:
pulls in anthropic-java-core + anthropic-java-client-okhttp. -->
<dependency>
<groupId>com.anthropic</groupId>
<artifactId>anthropic-java</artifactId>
<version>${anthropic-sdk.version}</version>
</dependency>
<!-- Jackson 2 and 3 BOMs (see jackson.version above): before agentworks-bom. -->
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>tools.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson3.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- agent-client (agentworks): the AgentClient abstraction + Claude model,
for the agentic module (32). Versions managed by the BOM. -->
<dependency>
<groupId>io.github.markpollack</groupId>
<artifactId>agentworks-bom</artifactId>
<version>${agentworks.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- ACP Spring Boot Starter (see acp-spring-boot.groupId above) -->
<dependency>
<groupId>${acp-spring-boot.groupId}</groupId>
<artifactId>acp-spring-boot-starter</artifactId>
<version>${acp-spring-boot.version}</version>
</dependency>
<!-- SLF4J simple binding for tutorial logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${slf4j.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Common dependencies for all tutorial modules -->
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.11.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<!-- Build against the next ACP Java SDK snapshot (0.81.0-SNAPSHOT on SDK main):
./mvnw -Psdk-candidate clean verify
The profile also activates when ACP_SDK_CANDIDATE is set in the environment, so that tools
which invoke ./mvnw themselves (integration-testing/RunIntegrationTest.java) build the
snapshot too: ACP_SDK_CANDIDATE=true jbang RunIntegrationTest.java module-12-echo-agent
The snapshot resolves from the Maven Central snapshot repository below; add -U to pick up
a newer one. A plain build uses the released SDK above. -->
<profile>
<id>sdk-candidate</id>
<activation>
<property>
<name>env.ACP_SDK_CANDIDATE</name>
</property>
</activation>
<properties>
<acp-sdk.version>0.81.0-SNAPSHOT</acp-sdk.version>
</properties>
<repositories>
<repository>
<id>central-snapshots</id>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
</profile>
</profiles>
</project>