Skip to content

Commit c234de4

Browse files
authored
Merge pull request #30 from ehsavoie/rest
feat: Adding JSON+HTTP/REST transport
2 parents 0a993dc + cb1c8ac commit c234de4

22 files changed

Lines changed: 1105 additions & 10 deletions

File tree

.github/workflows/run-tck.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,13 @@ jobs:
7676
working-directory: a2a-tck
7777
- name: Start the WildFly SUT
7878
run: |
79-
SUT_JSONRPC_URL=http://localhost:8080 SUT_GRPC_URL=http://localhost:9555 mvn wildfly:start -B -Dversion.sdk=${SDK_VERSION} -pl tck -Dstartup-timeout=120 -Dwildfly.serverArgs="--stability=preview"
79+
SUT_JSONRPC_URL=http://localhost:8080 SUT_REST_URL=http://localhost:8080 SUT_GRPC_URL=http://localhost:9555 mvn wildfly:start -B -Dversion.sdk=${SDK_VERSION} -pl tck -Dstartup-timeout=120 -Dwildfly.serverArgs="--stability=preview"
8080
- name: Run TCK
8181
env:
8282
SUT_JSONRPC_URL: http://localhost:8080
8383
TCK_STREAMING_TIMEOUT: 4.0
8484
run: |
85-
./run_tck.py --sut-url ${SUT_JSONRPC_URL} --category all --transports jsonrpc,grpc --compliance-report report.json
85+
./run_tck.py --sut-url ${SUT_JSONRPC_URL} --category all --transports jsonrpc,grpc,rest --compliance-report report.json
8686
working-directory: a2a-tck
8787
- name: Start the WildFly SUT
8888
run: |

.gitignore

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,53 @@
1-
.idea
2-
target/
1+
# ignore .svn metadata files
2+
.svn
3+
# ignore Maven generated target folders
4+
~
5+
target
6+
# ignore downloaded maven
7+
/tools/maven
8+
/tools/maven.zip
9+
/tools/wrapper
10+
# ignore eclipse files
11+
.project
12+
.classpath
13+
.settings
14+
.metadata
15+
.checkstyle
16+
# ignore m2e annotation processing files
17+
.factorypath
18+
# ignore IDEA files
19+
*.iml
20+
*.ipr
21+
*.iws
22+
.idea/*
23+
!.idea/icon.png
24+
# ignore vscode files
25+
.vscode/*
26+
# ignore NetBeans files
27+
nbactions.xml
28+
nb-configuration.xml
29+
catalog.xml
30+
#
31+
maven-ant-tasks.jar
32+
test-output
33+
transaction.log
34+
# vim files
35+
*.swp
36+
/.gitk-tmp.*
37+
atlassian-ide-plugin.xml
38+
# temp files
39+
*~
40+
# maven versions plugin
41+
pom.xml.versionsBackup
42+
# hprof dumps
43+
/*.hprof
44+
# ignore 'randomly' strewn around logs
45+
server.log
46+
# ignore java crashes
47+
hs_err_pid*.log
48+
# H2 databases produced by tests
49+
*.h2.db
50+
# JBoss transaction generated files
51+
PutObjectStoreDirHere
52+
#OS X stuff
53+
.DS_Store

examples/simple/server/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,5 +215,27 @@
215215
</plugins>
216216
</build>
217217
</profile>
218+
<profile>
219+
<id>rest</id>
220+
<properties>
221+
<!-- Enable provisioning of WildFly server. -->
222+
<wildfly.maven.plugin.phase>package</wildfly.maven.plugin.phase>
223+
</properties>
224+
225+
<dependencies>
226+
<!--
227+
Include the HTTP+JSON/REST Jakarta server jars
228+
-->
229+
<dependency>
230+
<groupId>${project.groupId}</groupId>
231+
<artifactId>a2a-java-sdk-jakarta-rest</artifactId>
232+
<version>${project.version}</version>
233+
</dependency>
234+
<dependency>
235+
<groupId>com.google.protobuf</groupId>
236+
<artifactId>protobuf-java-util</artifactId>
237+
</dependency>
238+
</dependencies>
239+
</profile>
218240
</profiles>
219241
</project>

impl/rest/pom.xml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
3+
xmlns="http://maven.apache.org/POM/4.0.0"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<parent>
8+
<groupId>org.wildfly.a2a</groupId>
9+
<artifactId>a2a-java-sdk-jakarta-parent</artifactId>
10+
<version>0.3.0.Beta1-SNAPSHOT</version>
11+
<relativePath>../../pom.xml</relativePath>
12+
</parent>
13+
14+
<artifactId>a2a-java-sdk-jakarta-rest</artifactId>
15+
16+
<packaging>jar</packaging>
17+
18+
<name>Java A2A SDK for Jakarta - HTTP+JSON/REST</name>
19+
<description>Jakarta SDK for the Agent2Agent Protocol (A2A) - HTTP+JSON/REST</description>
20+
21+
<dependencies>
22+
<dependency>
23+
<groupId>io.github.a2asdk</groupId>
24+
<artifactId>a2a-java-sdk-transport-rest</artifactId>
25+
<exclusions>
26+
<exclusion>
27+
<groupId>jakarta.enterprise</groupId>
28+
<artifactId>jakarta.enterprise.cdi-api</artifactId>
29+
</exclusion>
30+
<exclusion>
31+
<groupId>jakarta.inject</groupId>
32+
<artifactId>jakarta.inject-api</artifactId>
33+
</exclusion>
34+
</exclusions>
35+
</dependency>
36+
<dependency>
37+
<groupId>io.github.a2asdk</groupId>
38+
<artifactId>a2a-java-sdk-tests-server-common</artifactId>
39+
<scope>provided</scope>
40+
</dependency>
41+
<dependency>
42+
<groupId>jakarta.servlet</groupId>
43+
<artifactId>jakarta.servlet-api</artifactId>
44+
<scope>provided</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>io.github.a2asdk</groupId>
48+
<artifactId>a2a-java-sdk-tests-server-common</artifactId>
49+
<type>test-jar</type>
50+
<scope>test</scope>
51+
</dependency>
52+
<dependency>
53+
<groupId>jakarta.inject</groupId>
54+
<artifactId>jakarta.inject-api</artifactId>
55+
<scope>provided</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>jakarta.enterprise</groupId>
59+
<artifactId>jakarta.enterprise.cdi-api</artifactId>
60+
<scope>provided</scope>
61+
</dependency>
62+
<dependency>
63+
<groupId>jakarta.ws.rs</groupId>
64+
<artifactId>jakarta.ws.rs-api</artifactId>
65+
<scope>provided</scope>
66+
</dependency>
67+
</dependencies>
68+
</project>

0 commit comments

Comments
 (0)