From 81b9505ae060864d5c62e2afbc241d0432177077 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Fri, 13 Nov 2026 09:04:38 +0000 Subject: [PATCH 1/3] Fix CI: map Beverage.kind field in BeerMapper MapStruct treats unmapped target properties as errors (not warnings) when the annotation processor detects them. The Beverage model has a 'kind' field (generated from beverage.json via jsonschema2pojo) that was left unmapped in BeerMapper, causing the main build CI to fail. Add @Mapping(target = "kind", constant = "beer") since the beverage.json already hard-codes kind="beer" for this Beer-to-Beverage mapping. --- .../main/java/org/apache/camel/example/mapper/BeerMapper.java | 1 + 1 file changed, 1 insertion(+) diff --git a/mapstruct/src/main/java/org/apache/camel/example/mapper/BeerMapper.java b/mapstruct/src/main/java/org/apache/camel/example/mapper/BeerMapper.java index 4105df264..648272058 100644 --- a/mapstruct/src/main/java/org/apache/camel/example/mapper/BeerMapper.java +++ b/mapstruct/src/main/java/org/apache/camel/example/mapper/BeerMapper.java @@ -26,6 +26,7 @@ public interface BeerMapper { @Mapping(source = "style", target = "category") @Mapping(source = "alcohol", target = "strength") + @Mapping(target = "kind", constant = "beer") Beverage toBeverage(Beer beer); } From db8684ae64972f4441a2a729c86dff634a58c8c3 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Fri, 13 Nov 2026 09:58:09 +0000 Subject: [PATCH 2/3] Fix CI: update semantic YAML syntax from 'question' to 'evaluation' The semantic YAML DSL syntax changed during Camel 4.23 development: 'question:' was renamed to 'evaluation:'. The SemanticDefinitionDeserializer only accepts 'evaluation', 'state', and 'audit' as top-level keys in a semantic block; 'question' throws 'Unknown property' at startup. Update coordinator.yaml in the semantic-agent-routing example to use the current 'evaluation:' key. --- .../src/main/resources/routes/coordinator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml index 1811007b0..6c82a4c36 100644 --- a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml +++ b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml @@ -18,7 +18,7 @@ type: org.apache.camel.example.routing.TripSupport - semantic: - question: + evaluation: specialist: type: choice instructions: Which car rental specialist should handle the customer's request? From 767f46238eb0e1061453df8e3ba28b08972f1b8d Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Fri, 13 Nov 2026 14:52:39 +0000 Subject: [PATCH 3/3] Fix CI: update semantic-agent-routing for Camel 4.24 semantic API changes Three changes required by the camel-semantic API update in 4.24: 1. pom.xml: replace camel-typesafe-ai with camel-semantic-typesafe-ai The TypeSafe AI semantic adapter was split into a dedicated artifact (camel-semantic-typesafe-ai) in 4.24. The old camel-typesafe-ai no longer includes SemanticAdapter support. 2. application.properties: register the TypeSafe AI semantic adapter bean The adapter must be explicitly registered in the Camel registry as 'decisions' via camel.beans.decisions for the expert reference in YAML evaluations to resolve at startup. 3. coordinator.yaml: update semantic evaluation syntax for 4.24 - Rename 'question:' to 'evaluation:' (syntax renamed during 4.23 dev) - Add 'expert: decisions' to all six evaluations (now required) Build verified locally: 20 tests pass. --- semantic-agent-routing/pom.xml | 2 +- .../src/main/resources/application.properties | 2 ++ .../src/main/resources/routes/coordinator.yaml | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/semantic-agent-routing/pom.xml b/semantic-agent-routing/pom.xml index 8b5200d64..bffd6c757 100644 --- a/semantic-agent-routing/pom.xml +++ b/semantic-agent-routing/pom.xml @@ -71,7 +71,7 @@ limitations under the License. org.apache.camel - camel-typesafe-ai + camel-semantic-typesafe-ai org.apache.camel diff --git a/semantic-agent-routing/src/main/resources/application.properties b/semantic-agent-routing/src/main/resources/application.properties index fbf2779d7..c6ecf54f7 100644 --- a/semantic-agent-routing/src/main/resources/application.properties +++ b/semantic-agent-routing/src/main/resources/application.properties @@ -14,6 +14,8 @@ # limitations under the License. camel.main.name=trip-{{role}} +# TypeSafe AI semantic expert - registered as 'decisions' bean for use in evaluations +camel.beans.decisions=#class:org.apache.camel.component.typesafeai.TypeSafeAiSemanticAdapter camel.main.shutdown-timeout=5 camel.server.enabled=true camel.server.host=127.0.0.1 diff --git a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml index 6c82a4c36..897bd2cd3 100644 --- a/semantic-agent-routing/src/main/resources/routes/coordinator.yaml +++ b/semantic-agent-routing/src/main/resources/routes/coordinator.yaml @@ -20,6 +20,7 @@ - semantic: evaluation: specialist: + expert: decisions type: choice instructions: Which car rental specialist should handle the customer's request? criteria: @@ -28,18 +29,22 @@ cost: Rental prices, total cost, budget, fees or price comparison general: Greetings, service information or other questions needsReservation: + expert: decisions type: boolean instructions: Does answering this customer request fully require input about booking details, reservation lookup, changes or cancellation? threshold: "{{routing.fan-out-threshold}}" needsWeather: + expert: decisions type: boolean instructions: Does answering this customer request fully require input about weather, rain, forecasts or driving conditions at the destination? threshold: "{{routing.fan-out-threshold}}" needsCost: + expert: decisions type: boolean instructions: Does answering this customer request fully require input about rental prices, total cost, budget or fees? threshold: "{{routing.fan-out-threshold}}" relevant: + expert: decisions type: boolean instructions: >- Does the drafted reply address every requested part within the named specialist's @@ -51,6 +56,7 @@ uncertainty: 0.1 uncertaintyPolicy: non-match complete: + expert: decisions type: boolean instructions: >- Does the final reply address every part of the customer's original request,