-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReviewState.py
More file actions
33 lines (27 loc) · 792 Bytes
/
ReviewState.py
File metadata and controls
33 lines (27 loc) · 792 Bytes
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
from typing import TypedDict, List, Dict, Optional
from typing_extensions import Annotated
import operator
class AgentFinding(TypedDict):
agent: str
line: int
issue: str
severity: str
fix: str
class ReviewState(TypedDict):
"""Shared state between all agents in the review graph"""
code: str
filename: str
code_lines: List[str]
findings: Annotated[List[AgentFinding], operator.add]
agent_summaries: Dict[str, str]
total_issues: int
critical_issues: int
warnings: int
suggestions: int
issues_by_agent: Dict[str, int]
has_syntax_errors: bool
has_security_issues: bool
needs_performance_review: bool
skip_documentation: bool
final_report: Optional[str]
terminal_summary: Optional[str]