Spaces:
Running
Running
File size: 2,555 Bytes
4997b06 0cc127a a64c042 0cc127a 09e0e4a 0cc127a 09e0e4a 924d808 0cc127a adcfdc7 0cc127a adcfdc7 0cc127a 924d808 ef1ab71 924d808 29fb633 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | from enum import StrEnum
from typing import Literal, TypedDict
from pydantic import BaseModel, ConfigDict, Field
from multi_agent_sdlc.agents.reviewer.models import ReviewerSummary
class DevelopmentStatus(StrEnum):
NOT_STARTED = "not_started"
IMPLEMENTING = "implementing"
REPAIRING = "repairing"
COMPLETED = "completed"
BLOCKED = "blocked"
FAILED = "failed"
class VerificationStatus(StrEnum):
NOT_STARTED = "not_started"
VERIFYING = "verifying"
PASSED = "passed"
REPAIR_REQUIRED = "repair_required"
BLOCKED = "blocked"
class PlanReviewStatus(StrEnum):
NOT_STARTED = "not_started"
AWAITING_REVIEW = "awaiting_review"
APPROVED = "approved"
REVISION_REQUIRED = "revision_required"
REJECTED = "rejected"
PlanReviewDecisionValue = Literal[
"approved",
"revision_required",
"rejected",
]
class PlanReviewDecision(BaseModel):
model_config = ConfigDict(extra="forbid")
decision: PlanReviewDecisionValue
feedback: str | None = Field(
default=None,
description=(
"Human feedback explaining required revisions or the reason "
"for rejection."
),
)
class PreparePlanReviewUpdate(TypedDict):
plan_review_status: PlanReviewStatus
plan_review_decision: PlanReviewDecision | None
plan_review_content: str
class ReviewStatus(StrEnum):
NOT_STARTED = "not_started"
REVIEWING = "reviewing"
PASSED = "passed"
REPAIR_REQUIRED = "repair_required"
BLOCKED = "blocked"
class DeploymentStatus(StrEnum):
NOT_STARTED = "not_started"
SUCCEEDED = "succeeded"
FAILED = "failed"
class WorkflowOutcome(StrEnum):
SUCCEEDED = "succeeded"
PLAN_REJECTED = "plan_rejected"
CODER_FAILED = "coder_failed"
VERIFICATION_ABORTED = "verification_aborted"
REVIEWER_BLOCKED = "reviewer_blocked"
DEPLOYMENT_FAILED = "deployment_failed"
INTERNAL_ERROR = "internal_error"
class WorkflowTermination(BaseModel):
model_config = ConfigDict(extra="forbid", frozen=True)
outcome: WorkflowOutcome
reason: str
node: str
retryable: bool = False
class ReviewCycle(BaseModel):
cycle_number: int
# review_status: ReviewStatus
reviewer_summary: ReviewerSummary
class VerificationBlockDecision(StrEnum):
RETRY = "retry"
CODER_REPAIR = "coder-repair"
PROCEED_WITH_OVERRIDE = "proceed-with-override"
ABORT = "abort"
class VerificationBlockReview(BaseModel):
decision: VerificationBlockDecision
reason: str | None = None
|