Ë
    ¥©	jî  ã                   óê   — d Z ddlmZmZ ddlmZmZ ed   Zed   Zed   Z	ed   Z
 G d„ d	e«      Z G d
„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)z«
Pydantic models for PR Party API.
These models match the JSON contract defined in PR_PARTY_SPEC.md section 4.
IMMUTABLE after hour 2 - any changes require frontend sync.
é    )ÚLiteralÚOptional)Ú	BaseModelÚField)ÚaegisÚschemaÚpixelÚatlasÚechoÚcodex)ÚcriticalÚhighÚmediumÚlow)Úcrit_hitÚhitÚgrazeÚwhisper)ÚblockedÚchanges_requiredÚapprovedc                   ó‚  — e Zd ZU dZ edd¬«      Zeed<    edd¬«      Zeed<    edd¬«      Z	eed	<    edd
¬«      Z
eed<    edddd¬«      Zeed<    edd¬«      Zeed<    edd¬«      Zeed<    eddd¬«      Zeed<    eddd¬«      Zeed<    edd¬«      Zeed<    edd¬«      Zeed<    edd¬«      Zeed <   y!)"ÚFindingz-Single code review finding from Bob analysis..z Unique finding ID (e.g., 'F001')©ÚdescriptionÚidzShort finding titleÚtitlezTechnical explanationr   zIssue severity levelÚseverityr   éd   zHP damage (0-100)©ÚgeÚler   ÚdamagezAnimation typeÚdamage_typezAffected file pathÚ	file_pathé   zStart line number©r!   r   Ú
line_startzEnd line numberÚline_endzRelevant code excerptÚcode_snippetzAssigned characterÚcharacter_idzCharacter's voiced commentÚcharacter_dialogueN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   ÚstrÚ__annotations__r   r   r   ÚSeverityr#   Úintr$   Ú
DamageTyper%   r(   r)   r*   r+   ÚCharacterIdr,   © ó    ú+/var/www/html/prparty/backend/app/models.pyr   r      sæ   … Ù7Ù�CÐ%GÔH€BˆÓHÙ�sÐ(=Ô>€Eˆ3Ó>Ù˜SÐ.EÔF€K�ÓFÙ˜sÐ0FÔG€HˆhÓGÙ˜  cÐ7JÔK€FˆCÓKÙ# CÐ5EÔF€K�ÓFÙ˜3Ð,@ÔA€IˆsÓAÙ˜C AÐ3FÔG€J�ÓGÙ˜# !Ð1BÔC€HˆcÓCÙ˜cÐ/FÔG€L�#ÓGÙ % cÐ7KÔ L€L�+ÓLÙ# CÐ5QÔRÐ˜ÔRr8   r   c                   ó¨   — e Zd ZU dZ edd¬«      Zeed<    edd¬«      Ze	ed<    edd¬«      Z
eed	<    edd
¬«      Ze	ed<    edd¬«      Zeed<   y)ÚCharacterDialoguez0Dialogue between two characters about a finding..zRelated finding IDr   Ú
finding_idzFirst character speakingÚcharacter_1zFirst character's lineÚ
dialogue_1zSecond character respondingÚcharacter_2zSecond character's lineÚ
dialogue_2N)r-   r.   r/   r0   r   r<   r1   r2   r=   r6   r>   r?   r@   r7   r8   r9   r;   r;   '   s_   … Ù:Ù˜CÐ-AÔB€J�ÓBÙ$ SÐ6PÔQ€K�ÓQÙ˜CÐ-EÔF€J�ÓFÙ$ SÐ6SÔT€K�ÓTÙ˜CÐ-FÔG€J�ÔGr8   r;   c                   ó2  — e Zd ZU dZ edd¬«      Zeed<    edd¬«      Ze	ed<    edd¬«      Z
e	ed	<    edd
¬«      Zeed<    eddd¬«      Zeed<    edddd¬«      Zeed<    edd¬«      Zee   ed<    eed¬«      Zee   ed<    edd¬«      Ze	ed<   y)ÚEncounterResultz$Complete PR review encounter result..úGitHub PR numberr   Ú	pr_numberzPR titleÚpr_titlezPR author usernameÚ	pr_authorzFinal review verdictÚverdictr   zTotal HP damage dealtr'   Útotal_damager   zPR's remaining HPr    Úremaining_hpzAll validated findingsÚfindingszCharacter interactions)Údefault_factoryr   Ú	dialogueszISO 8601 timestampÚanalysis_timestampN)r-   r.   r/   r0   r   rD   r4   r2   rE   r1   rF   rG   ÚVerdictrH   rI   rJ   Úlistr   rL   r;   rM   r7   r8   r9   rB   rB   0   s·   … Ù.Ù˜3Ð,>Ô?€IˆsÓ?Ù˜#¨:Ô6€HˆcÓ6Ù˜3Ð,@ÔA€IˆsÓAÙ˜SÐ.DÔE€GˆWÓEÙ˜c aÐ5LÔM€L�#ÓMÙ˜c a¨CÐ=PÔQ€L�#ÓQÙ# CÐ5MÔN€Hˆd�7‰mÓNÙ).¸tÐQiÔ)j€IˆtÐ%Ñ&ÓjÙ# CÐ5IÔJÐ˜ÔJr8   rB   c                   óÌ   — e Zd ZU dZeed<   eed<   eed<   eed<    edd¬«      Ze	ed	<   e
ed
<   eed<    ed¬«      Ze	ed<    ed¬«      Ze	ed<   eed<    edd¬«      Zeed<   y)Ú
FindingRawz=Raw finding from Bob searcher pass (no character assignment).r   r   r   r   r   r   )r!   r"   r#   r$   r%   r&   )r!   r(   r)   r*   ÚgeneralzPCategory from model (security, database, ux, architecture, tests, documentation))Údefaultr   ÚcategoryN)r-   r.   r/   r0   r1   r2   r3   r   r#   r4   r5   r(   r)   rT   r7   r8   r9   rQ   rQ   =   st   … ÙGØƒGØƒJØÓØÓÙ˜1 Ô%€FˆCÓ%ØÓØƒNÙ˜q”k€J�Ó!Ù˜Q”K€HˆcÓØÓÙ )ð  :Lô  M€Hˆcô  Mr8   rQ   c                   ó6   — e Zd ZU dZ edd¬«      Zee   ed<   y)ÚFindingValidatedz?Validated finding from Bob validator pass (still no character).Nz"Why this finding was kept/modifiedr   Úvalidation_notes)	r-   r.   r/   r0   r   rW   r   r1   r2   r7   r8   r9   rV   rV   L   s   … ÙIÙ&+¨DÐ>bÔ&cÐ�h˜s‘mÔcr8   rV   c                   ó@   — e Zd ZU dZed   ed<    edd¬«      Zeed<   y)	ÚSSEEventz*Server-Sent Event structure for streaming.)ÚfindingÚdialogueÚcompleteÚerrorÚevent.zEvent payloadr   ÚdataN)	r-   r.   r/   r0   r   r2   r   r_   Údictr7   r8   r9   rY   rY   Q   s"   … Ù4ØÐ=Ñ>Ó>Ù�s¨Ô8€Dˆ$Ô8r8   rY   c                   óÆ   — e Zd ZU dZ edd¬«      Zee   ed<    edd¬«      Z	ee
   ed<    edd¬«      Zee
   ed	<    edd
¬«      Zee
   ed<    edd¬«      Zee
   ed<   y)ÚAnalyzeRequestzRequest to analyze a PR.NrC   r   rD   zRepository ownerÚ
repo_ownerzRepository nameÚ	repo_namezAFull GitHub PR URL (e.g., https://github.com/owner/repo/pull/123)Ú
github_urlz0Fixture name for offline testing (pr1, pr2, pr3)Úuse_fixture)r-   r.   r/   r0   r   rD   r   r4   r2   rc   r1   rd   re   rf   r7   r8   r9   rb   rb   W   ss   … Ù"Ù$ TÐ7IÔJ€Iˆx˜‰}ÓJÙ % dÐ8JÔ K€J�˜‘ÓKÙ$ TÐ7HÔI€Iˆx˜‰}ÓIÙ % dÐ8{Ô |€J�˜‘Ó|Ù!& tÐ9kÔ!l€K�˜#‘Ôlr8   rb   N)r0   Útypingr   r   Úpydanticr   r   r6   r3   r5   rN   r   r;   rB   rQ   rV   rY   rb   r7   r8   r9   ú<module>ri      s¦   ðñ÷
 %ß %ð ÐJÑK€ð Ð6Ñ7€ð Ð:Ñ;€
ð Ð;Ñ
<€ôSˆiô Sô H˜	ô Hô
K�iô 
KôM�ô Môd�zô dô
9ˆyô 9ôm�Yõ mr8   