Skip to content

Commit 76ae278

Browse files
author
Mark Pollack
committed
Add annotation-based agent API (Phase 5A)
New modules: - acp-annotations: Zero-dependency annotation definitions (@AcpAgent, @initialize, @newSession, @prompt, @sessionid, @SessionState) - acp-agent-support: Reflection-based runtime for annotation processing Key components: - ArgumentResolver pattern with caching (Spring MVC-style) - ReturnValueHandler pattern for flexible return types - InterceptorChain with proper lifecycle tracking - AcpAgentSupport bootstrap class Features: - String return auto-converts to PromptResponse.text() - void return auto-converts to PromptResponse.endTurn() - Flexible parameter injection (request, context, capabilities) Validated by BuilderVsAnnotationComparisonTest showing: - 40% boilerplate reduction for basic lifecycle - 50% reduction for file operations - 60% reduction for terminal execution
1 parent e034359 commit 76ae278

33 files changed

+3111
-0
lines changed

acp-agent-support/pom.xml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>com.agentclientprotocol</groupId>
9+
<artifactId>acp-java-sdk</artifactId>
10+
<version>0.9.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<artifactId>acp-agent-support</artifactId>
14+
<name>ACP Agent Support</name>
15+
<description>Reflection-based runtime for annotation-driven ACP agents</description>
16+
17+
<dependencies>
18+
<!-- ACP dependencies -->
19+
<dependency>
20+
<groupId>com.agentclientprotocol</groupId>
21+
<artifactId>acp-annotations</artifactId>
22+
<version>${project.version}</version>
23+
</dependency>
24+
<dependency>
25+
<groupId>com.agentclientprotocol</groupId>
26+
<artifactId>acp-core</artifactId>
27+
<version>${project.version}</version>
28+
</dependency>
29+
30+
<!-- Logging -->
31+
<dependency>
32+
<groupId>org.slf4j</groupId>
33+
<artifactId>slf4j-api</artifactId>
34+
</dependency>
35+
36+
<!-- Test dependencies -->
37+
<dependency>
38+
<groupId>org.junit.jupiter</groupId>
39+
<artifactId>junit-jupiter</artifactId>
40+
<scope>test</scope>
41+
</dependency>
42+
<dependency>
43+
<groupId>org.assertj</groupId>
44+
<artifactId>assertj-core</artifactId>
45+
<scope>test</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>ch.qos.logback</groupId>
49+
<artifactId>logback-classic</artifactId>
50+
<scope>test</scope>
51+
</dependency>
52+
<dependency>
53+
<groupId>com.agentclientprotocol</groupId>
54+
<artifactId>acp-test</artifactId>
55+
<version>${project.version}</version>
56+
<scope>test</scope>
57+
</dependency>
58+
</dependencies>
59+
60+
</project>

0 commit comments

Comments
 (0)