Class GetReleaseStatusSkill

java.lang.Object
com.xebialabs.xlrelease.a2a.server.GetReleaseStatusSkill
All Implemented Interfaces:
A2aServerSkill

public class GetReleaseStatusSkill extends Object implements A2aServerSkill
The first built-in A2A skill: a read-only release status summary, so an external agent can ask "where is this release?" and learn — in its own protocol's terms — whether a human is currently in the loop (an active gate or manual task).

The release id is taken from message metadata releaseId when present, otherwise the first release-id-shaped token in the message text. Permission checking is the host API's: the lookup runs as the authenticated caller.

  • Constructor Details

    • GetReleaseStatusSkill

      public GetReleaseStatusSkill(com.xebialabs.xlrelease.api.v1.ReleaseApi releaseApi, A2aReleaseTaskMapper mapper)
  • Method Details

    • id

      public String id()
      Description copied from interface: A2aServerSkill
      Skill id as advertised on the Agent Card and addressed via message metadata skillId.
      Specified by:
      id in interface A2aServerSkill
    • name

      public String name()
      Description copied from interface: A2aServerSkill
      Human-readable name for the Agent Card.
      Specified by:
      name in interface A2aServerSkill
    • description

      public String description()
      Description copied from interface: A2aServerSkill
      What the skill does and what input it expects — agents read this to decide what to send.
      Specified by:
      description in interface A2aServerSkill
    • readOnly

      public boolean readOnly()
      Description copied from interface: A2aServerSkill
      Whether the skill only reads Release state. When the A2A feature's read-only mode is on, skills returning false are hidden from the Agent Card and rejected if called anyway.
      Specified by:
      readOnly in interface A2aServerSkill
    • invoke

      public A2aSkillOutcome invoke(String text, Map<String,String> metadata)
      Description copied from interface: A2aServerSkill
      Executes the skill.

      Runs on the HTTP request thread under the caller's authenticated identity, so host API calls are permission-checked as that caller. Return A2aSkillOutcome.text(String) for an immediately-complete result, or A2aSkillOutcome.release(String) for work delegated to a release, whose live state becomes the A2A task from then on. Throw IllegalArgumentException for bad input (becomes a failed A2A task with the message as explanation), A2aContractViolationException for a governance handoff-contract violation (becomes a rejected task); any other exception is reported as a failed task without internal detail.

      Specified by:
      invoke in interface A2aServerSkill
      Parameters:
      text - the concatenated text parts of the incoming message
      metadata - the incoming message's metadata values, stringified