Class AgentRulesResource
java.lang.Object
com.xebialabs.xlrelease.agentrules.api.AgentRulesResource
@Path("/agent-rules")
@Produces("application/json")
@Controller
public class AgentRulesResource
extends Object
Internal REST surface for the Agent Rules page. Rules themselves are ordinary shared
configurations, CRUD-ed through the existing
/api/v1/config endpoints and described by
/metadata/type/agentic.Rule — this resource only serves what has no existing home: the
run history.
Registered automatically: JaxRsApplication collects every Spring bean carrying
@Path, and the classpath-wide component scan includes this module. Session-cookie
authenticated via the catch-all security chain (this is a UI-facing resource, not an agent
protocol surface).
-
Constructor Summary
ConstructorsConstructorDescriptionAgentRulesResource(AgentRuleRunStore runStore, AgentRuleProposalStore proposalStore, AgentRuleDispatcher dispatcher, AgentRuleTokenService tokenService, com.xebialabs.xlrelease.security.PermissionChecker permissions) -
Method Summary
Modifier and TypeMethodDescriptionapprove(String proposalId, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Approves one pending proposal and executes its action on this request thread — attributed to the approver.Pending and recently decided propose-mode actions, newest first.Recent agent-rule runs, newest first.
-
Constructor Details
-
AgentRulesResource
@Autowired public AgentRulesResource(AgentRuleRunStore runStore, AgentRuleProposalStore proposalStore, AgentRuleDispatcher dispatcher, AgentRuleTokenService tokenService, com.xebialabs.xlrelease.security.PermissionChecker permissions)
-
-
Method Details
-
runs
@GET @Path("/runs") public List<AgentRuleRun> runs(@QueryParam("ruleId") String ruleId, @QueryParam("releaseId") String releaseId, @QueryParam("limit") Integer limit) Recent agent-rule runs, newest first.- Parameters:
ruleId- only runs of this rule, when givenreleaseId- only runs on this release, when givenlimit- maximum entries (default 100, capped by the store's retention window)
-
proposals
@GET @Path("/proposals") public List<AgentRuleProposal> proposals(@QueryParam("limit") Integer limit, @QueryParam("taskId") String taskId) Pending and recently decided propose-mode actions, newest first. WithtaskId, only PENDING proposals for that task — the shape the in-flow decision card needs. -
approve
@POST @Path("/proposals/{proposalId}/approve") public Map<String,String> approve(@PathParam("proposalId") String proposalId, @Context jakarta.servlet.http.HttpServletRequest request, @Context jakarta.servlet.http.HttpServletResponse response) Approves one pending proposal and executes its action on this request thread — attributed to the approver. Answers with the execution result; an already-decided or expired proposal is reported, never executed twice. -
reject
-