diff --git a/itk/pom.xml b/itk/pom.xml
index b2d11e5d4..ca46a76ae 100644
--- a/itk/pom.xml
+++ b/itk/pom.xml
@@ -98,8 +98,49 @@
+
+
+ ${project.basedir}/a2a-itk/protos
+
+
+
+
+ io.github.ascopes
+ protobuf-maven-plugin
+ 4.1.2
+
+ ${protobuf-java.version}
+
+ ${a2a.itk.proto.dir}
+
+
+
+
+ generate-sources
+
+ generate
+
+
+
+
io.quarkus
quarkus-maven-plugin
diff --git a/itk/run_itk.sh b/itk/run_itk.sh
index 0ab793490..7e4104450 100755
--- a/itk/run_itk.sh
+++ b/itk/run_itk.sh
@@ -31,7 +31,10 @@ cleanup() {
# Register cleanup function to run on script exit
trap cleanup EXIT
-# 1. Pull a2a-itk and checkout revision
+# 1. Pull a2a-itk and checkout revision.
+# The clone doubles as the single source of truth for instruction.proto:
+# protobuf-maven-plugin in itk/pom.xml reads it directly from
+# ${project.basedir}/a2a-itk/protos (see the `a2a.itk.proto.dir` property).
: "${A2A_ITK_REVISION:?A2A_ITK_REVISION environment variable must be set}"
if [ ! -d "a2a-itk" ]; then
@@ -47,17 +50,14 @@ if git symbolic-ref -q HEAD > /dev/null; then
fi
cd ..
-# 2. Copy latest instruction.proto from a2a-itk
-cp a2a-itk/protos/instruction.proto src/main/proto/instruction.proto
-
-# 3. Build itk_service container image from root of a2a-itk
+# 2. Build itk_service container image from root of a2a-itk
CONTAINER_BUILD_ARGS=""
if [ "$CONTAINER_RT" = "podman" ]; then
CONTAINER_BUILD_ARGS="--format docker"
fi
$CONTAINER_RT build $CONTAINER_BUILD_ARGS -t itk_service a2a-itk
-# 4. Start container service with a single mount: the a2a-java repo
+# 3. Start container service with a single mount: the a2a-java repo
A2A_JAVA_ROOT=$(cd .. && pwd)
# Stop existing container if any
@@ -80,7 +80,7 @@ $CONTAINER_RT run -d --name itk-service \
-p 8000:8000 \
itk_service
-# 5. Verify service is up and send post request
+# 4. Verify service is up and send post request
MAX_RETRIES=30
echo "Waiting for ITK service to start on 127.0.0.1:8000..."
set +e
diff --git a/itk/src/main/proto/instruction.proto b/itk/src/main/proto/instruction.proto
deleted file mode 100644
index c607567aa..000000000
--- a/itk/src/main/proto/instruction.proto
+++ /dev/null
@@ -1,60 +0,0 @@
-syntax = "proto3";
-
-package itk;
-
-
-message Instruction {
- // what should the "agent" do
- oneof step {
- CallAgent call_agent = 1;
- ReturnResponse return_response = 2;
- SeriesOfSteps steps = 3;
- }
-}
-
-// Behavior messages
-message SendMessageBehavior {}
-message PushNotificationBehavior {
- string url = 1;
-}
-message ResubscribeBehavior {}
-
-// gets the agent card from a remote agent, calls it and returns the response
-message CallAgent {
- // which transport use to get agent card and later call
- string transport = 1;
- // where to get the agent card from
- string agent_card_uri = 2;
- // instruction for the called agent
- Instruction instruction = 3;
- // whether to use streaming
- bool streaming = 4;
-
- // behavior mode
- oneof behavior {
- SendMessageBehavior send_message = 5;
- PushNotificationBehavior push_notification = 6;
- ResubscribeBehavior resubscribe = 7;
- }
-}
-
-// this option just returns a response
-message ReturnResponse {
- // what to return to the calling agent
- string response = 1;
- // whether to hold the task in WORKING state instead of completing it
- bool hold_task = 2;
-}
-
-// executes step series and returns response based on response_generator
-message SeriesOfSteps {
- repeated Instruction instructions = 1;
-
- enum ResponseGenerator {
- // default
- RESPONSE_GENERATOR_UNSPECIFIED = 0;
- RESPONSE_GENERATOR_CONCAT = 1;
- }
-
- ResponseGenerator response_generator = 2;
-}
diff --git a/pom.xml b/pom.xml
index d0e6dbd38..2c1958176 100644
--- a/pom.xml
+++ b/pom.xml
@@ -599,8 +599,13 @@
transport/grpc
transport/rest
-
- itk
+
compat-0.3
@@ -648,6 +653,19 @@
+
+
+ itk
+
+ itk
+
+