feat: add TEST_EXPRESSION command with request-reply infrastructure
Adds CompletableFuture-based request-reply mechanism for commands that need synchronous results. CommandReply record in core, pendingReplies map in AgentRegistryService, test-expression endpoint on config controller with 5s timeout. CommandAckRequest extended with optional data field. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,5 +6,6 @@ package com.cameleer3.server.app.dto;
|
||||
*
|
||||
* @param status "SUCCESS" or "FAILURE"
|
||||
* @param message human-readable description of the result
|
||||
* @param data optional structured JSON data returned by the agent (e.g. expression evaluation results)
|
||||
*/
|
||||
public record CommandAckRequest(String status, String message) {}
|
||||
public record CommandAckRequest(String status, String message, String data) {}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.cameleer3.server.app.dto;
|
||||
|
||||
/**
|
||||
* Request body for testing a tap expression against sample data via a live agent.
|
||||
*
|
||||
* @param expression the expression to evaluate (e.g. Simple, JSONPath, XPath)
|
||||
* @param language the expression language identifier
|
||||
* @param body sample message body to evaluate the expression against
|
||||
* @param target what the expression targets (e.g. "body", "header", "property")
|
||||
*/
|
||||
public record TestExpressionRequest(String expression, String language, String body, String target) {}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.cameleer3.server.app.dto;
|
||||
|
||||
/**
|
||||
* Response from testing a tap expression against sample data.
|
||||
*
|
||||
* @param result the evaluation result (null if an error occurred)
|
||||
* @param error error message if evaluation failed (null on success)
|
||||
*/
|
||||
public record TestExpressionResponse(String result, String error) {}
|
||||
Reference in New Issue
Block a user