Class AiAgentRunAction

java.lang.Object
io.jenkins.plugins.aiagentjob.AiAgentRunAction
All Implemented Interfaces:
Action, ModelObject, RunAction2

public class AiAgentRunAction extends Object implements Action, RunAction2
Per-build action that stores AI agent invocation metadata and provides the inline conversation view on the build page. Supports multiple invocations in a single build.
  • Constructor Details

    • AiAgentRunAction

      public AiAgentRunAction()
  • Method Details

    • getOrCreate

      public static AiAgentRunAction getOrCreate(Run<?,?> run)
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • onAttached

      public void onAttached(Run<?,?> run)
      Specified by:
      onAttached in interface RunAction2
    • onLoad

      public void onLoad(Run<?,?> run)
      Specified by:
      onLoad in interface RunAction2
    • markStarted

      public int markStarted(String agentTypeDisplayName, String prompt, String model, String commandLine, boolean yoloMode, boolean approvalsEnabled) throws IOException
      Throws:
      IOException
    • markCompleted

      public void markCompleted(int invocationId, int exitCode) throws IOException
      Throws:
      IOException
    • getInvocations

      public List<AiAgentRunAction.InvocationRecord> getInvocations()
    • getInvocationsNewestFirst

      public List<AiAgentRunAction.InvocationRecord> getInvocationsNewestFirst()
    • hasInvocations

      public boolean hasInvocations()
    • getLatestInvocationId

      public int getLatestInvocationId()
    • getAgentType

      public String getAgentType()
    • getPrompt

      public String getPrompt()
    • getModel

      public String getModel()
    • getCommandLine

      public String getCommandLine()
    • isYoloMode

      public boolean isYoloMode()
    • isApprovalsEnabled

      public boolean isApprovalsEnabled()
    • getStartedAt

      public String getStartedAt()
    • getCompletedAt

      public String getCompletedAt()
    • getExitCode

      public Integer getExitCode()
    • isLive

      public boolean isLive()
    • getPendingApprovals

      public List<ExecutionRegistry.PendingApproval> getPendingApprovals()
    • getPendingApprovals

      public List<ExecutionRegistry.PendingApproval> getPendingApprovals(int invocationId)
    • getEvents

      public List<AiAgentLogParser.EventView> getEvents()
    • getEvents

      public List<AiAgentLogParser.EventView> getEvents(int invocationId)
    • getUsageStats

      public AgentUsageStats getUsageStats()
    • getUsageStats

      public AgentUsageStats getUsageStats(int invocationId)
    • getRawLogFile

      public File getRawLogFile()
    • getRawLogFile

      public File getRawLogFile(int invocationId)
    • isInvocationLive

      public boolean isInvocationLive(int invocationId)
    • getInvocationExitCode

      public Integer getInvocationExitCode(int invocationId)
    • isLatestInvocation

      public boolean isLatestInvocation(int invocationId)
    • getInvocationModel

      public String getInvocationModel(int invocationId)
    • getInvocationPrompt

      public String getInvocationPrompt(int invocationId)
    • getInvocationAgentType

      public String getInvocationAgentType(int invocationId)
    • getInvocationCommandLine

      public String getInvocationCommandLine(int invocationId)
    • getInvocationStartedAt

      public String getInvocationStartedAt(int invocationId)
    • getInvocationCompletedAt

      public String getInvocationCompletedAt(int invocationId)
    • getInvocationYoloMode

      public boolean getInvocationYoloMode(int invocationId)
    • getInvocationApprovalsEnabled

      public boolean getInvocationApprovalsEnabled(int invocationId)
    • getSelectedInvocationId

      public int getSelectedInvocationId()
    • doApprove

      public Object doApprove(org.kohsuke.stapler.StaplerRequest2 req, @QueryParameter String id)
    • doDeny

      public Object doDeny(org.kohsuke.stapler.StaplerRequest2 req, @QueryParameter String id, @QueryParameter String reason)
    • doProgressiveEvents

      @GET public void doProgressiveEvents(org.kohsuke.stapler.StaplerRequest2 request, org.kohsuke.stapler.StaplerResponse2 response) throws IOException
      Throws:
      IOException
    • doIndex

      @GET public Object doIndex()
    • doConversation

      @GET public Object doConversation()
    • getRawContent

      public String getRawContent()
    • getRawContent

      public String getRawContent(int invocationId)
    • getRun

      public Run<?,?> getRun()