Class ReviewSession
java.lang.Object
ai.tabforge.workshop.orchestrator.ReviewSession
When Claude AI periodically calls GetReportTool in order to obtain review status (and so, when GetReportTool calls
)
the GetReportToll will return JSON filled with data from this class.
An instance of this class is created in
} and is stored in an internal list of active sessions.
TODO: GetReportTool description must document all possible response formats:
RUNNING, AWAITING_HUMAN, COMPLETED, CANCELLED, FAILED
invalid reference
OrchestratorAgent#getStatus()
invalid @link
{@link OrchestratorAgent#startReview())
CERTIFICATION NOTE — Domain 1: Agentic Architecture & Orchestration (27%):
Covers Task Statement 1.7: "Manage session state, resumption, and forking".
ReviewSession is the live state of one review — it is created when the review
starts, mutated as agents report progress, paused when escalation occurs, and
finalized when the review completes. The orchestrator never loses track of where
a session is — even after a human-in-the-loop pause and resumption.
-
Constructor Summary
ConstructorsConstructorDescriptionReviewSession(String reviewId, ReviewScope scope, ReviewReport.ReviewStatus status, ReviewReport report, EscalationRequest pendingEscalation, String startedAt) -
Method Summary
Modifier and TypeMethodDescriptiongetLatch()intIn the phase 1, agents (launched by} will run sequentially, one after another.invalid @link
{@link OrchestratorAgent#startReview(ReviewScope))getScope()intvoidsetCurrentAgentName(String currentAgentName) Being called by} when the agent startsinvalid @link
{@link OrchestratorAgent#startReview())voidsetCurrentlyProcessedFile(String currentlyProcessedFile) voidsetLatch(CountDownLatch latch) voidsetPendingEscalation(EscalationRequest pendingEscalation) voidsetProcessedFiles(int processedFiles) voidsetReport(ReviewReport report) voidsetStatus(ReviewReport.ReviewStatus status) voidsetTotalFiles(int totalFiles)
-
Constructor Details
-
ReviewSession
public ReviewSession() -
ReviewSession
public ReviewSession(String reviewId, ReviewScope scope, ReviewReport.ReviewStatus status, ReviewReport report, EscalationRequest pendingEscalation, String startedAt)
-
-
Method Details
-
getLatch
-
setLatch
- Parameters:
latch-(which is called ininvalid reference
OrchestratorAgent#escalate()) - will make CountDownLatch and preserve it here Will be read and released in theinvalid reference
SubAgent#execute(). It needs to be stored in the session, because that way it can be retrieved in resumeAfterEscalation() - which accept the reviewIdinvalid reference
OrchestratorAgent#resumeAfterEscalation()
-
getCurrentAgentName
-
setCurrentAgentName
Being called by} when the agent startsinvalid @link
{@link OrchestratorAgent#startReview())- Parameters:
currentAgentName-
-
getTotalFiles
public int getTotalFiles() -
setTotalFiles
public void setTotalFiles(int totalFiles) -
getProcessedFiles
public int getProcessedFiles() -
setProcessedFiles
public void setProcessedFiles(int processedFiles) -
getCurrentlyProcessedFile
-
setCurrentlyProcessedFile
-
getProgress
In the phase 1, agents (launched by} will run sequentially, one after another. When Claude AI periodically calls GetReportTool in order to obtain review status (and so, when GetReportTool callsinvalid @link
{@link OrchestratorAgent#startReview(ReviewScope))) then, if the status is notinvalid reference
OrchestratorAgent#getStatus()ReviewReport.ReviewStatus.COMPLETED, the GetReportToll might return following JSON, filled with values from this class: Status RUNNING:
Pay attention on: "progress": "SecurityAuditor 60% — analyzing OrderResource.java" Following method returns that value{ "status": "RUNNING", "progress": "SecurityAuditor 60% — analyzing OrderResource.java" }- Returns:
-
getReviewId
-
getScope
-
getStatus
-
setStatus
-
getReport
-
setReport
-
getPendingEscalation
-
setPendingEscalation
-
getStartedAt
-