+
    lHàj/$  ã                  óø  € R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^RI	H
t
HtHtHt ^RIHtHt ^RIHtHt  ! R R	]4      t ! R
 R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R  R!]4      t  ! R" R#]4      t! ! R$ R%]4      t"]! R&]"R'R(7        ! R) R*]4      t# ! R+ R,]#]4      t$]! R-]$R.R(7        ! R/ R0]4      t%]! R1]%]#R2R37        ! R4 R5]4      t&]! R6]%]&R7R37        ! R8 R9]4      t' ! R: R;]
4      t( ! R< R=]
4      t) ! R> R?]%4      t* ! R@ RA]4      t+]! RB]*]+RCR37       RD# )Eaû  The connection operation (``manage_connections`` card): the request event that opens a card,
the update frames that drive it, and the RPCs the card answers through.

Shapes are typed from ``tools/connectors/operation.py`` (``Target.snapshot``,
``ConnectionOperation.request_payload`` / ``_snapshot_locked``) and
``tui_gateway/methods_connectors.py`` (``_operation_view``, ``_connection_update``). The card is a
projection: every frame carries the full target snapshot, and the renderer never derives state.
)Úannotations)ÚLiteral)ÚField)ÚInstallPhase)ÚParamsÚPayloadÚResultÚWireEnum)ÚConnectorOwnerÚProfileParams)ÚeventÚmethodc                  ó&   € ] tR t^tRtRtRtRtRtR# )ÚConnectionTargetKindÚ	connectorÚmcpÚpluginÚskill© N)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r   r   r   r   Ú__static_attributes__r   ó    ÚO/home/ubuntu/.hermes/hermes-agent/tui_gateway/contracts/connectors_operation.pyr   r      s   † Ø€IØ
€Cà€FØ„Er   r   c                  ó*   € ] tR t^tRtRtRtRtRtRt	R# )ÚConnectionTargetActionÚ	authorizeÚconnectÚenableÚinstallÚ	reconnectr   N)
r   r   r   r   r   r   r    r!   r"   r   r   r   r   r   r      s   † Ø€IØ€GØ€FØ€GØ„Ir   r   c                  ó6   € ] tR t^'tRtRtRtRtRtRt	Rt
RtR	tR
# )ÚConnectionTargetStatez.``tools/connectors/contract.py::TargetState``.ÚpendingÚ	initiatedÚ	connectedÚskippedÚfailedÚexpiredÚnot_connectedr   N)r   r   r   r   Ú__doc__r%   r&   r'   r(   r)   r*   r+   r   r   r   r   r$   r$   '   s(   † Ù8à€GØ€IØ€IØ€GØ€FØ€GØ#„Mr   r$   c                  ó&   € ] tR t^3tRtRtRtRtRtR# )ÚConnectionActorz(``tools/connectors/contract.py::Actor``.ÚuserÚbackend_watcherÚclockr   N)	r   r   r   r   r,   r/   r0   r1   r   r   r   r   r.   r.   3   s   † Ù2à€DØ'€OØ„Er   r.   c                  ó*   € ] tR t^;tRtRtRtRtRtRt	R# )ÚConnectionSettleReasonz/``tools/connectors/contract.py::SettleReason``.Úall_resolvedÚcontinueÚdeadlineÚ	interruptr   N)
r   r   r   r   r,   r4   Ú	continue_r6   r7   r   r   r   r   r3   r3   ;   s   † Ù9à!€LØ€IØ€HØ„Ir   r3   c                  óR   € ] tR t^Dt$ RtR]R&   R]R&   R]R&   R]R&   RtR	]R
&   RtR# )ÚConnectionTargetEnvFieldzzOne credential an MCP install still needs; the card renders a field per entry and sends the
values back with the approval.ÚstrÚnameÚboolÚrequiredÚsecretÚdefaultNú
str | NoneÚpromptr   )r   r   r   r   r,   Ú__annotations__rB   r   r   r   r   r:   r:   D   s'   ‡ ñ&ð ƒIØƒNØƒLØƒLØ€FˆJ×r   r:   c                  ó"   € ] tR t^OtRtRtRtRtR# )ÚCatalogTierÚofficialÚverifiedÚ	communityr   N)r   r   r   r   rF   rG   rH   r   r   r   r   rE   rE   O   s   † Ø€HØ€HØ„Ir   rE   c                  ó*   € ] tR t^UtRtRtRtRtRtRt	R# )ÚCatalogAppStatezRThe desktop app a catalog plugin drives, from its ``hermes_platform`` declaration.ÚpresentÚmissing_appÚapp_not_runningÚunknownr   N)
r   r   r   r   r,   rK   rL   rM   rN   r   r   r   r   rJ   rJ   U   s   † Ù\à€GØ€KØ'€OØ„Gr   rJ   c                  ó"   € ] tR t^^tRtRtRtRtR# )ÚCatalogScanStatusÚpassedÚwarningsr)   r   N)r   r   r   r   rQ   rR   r)   r   r   r   r   rP   rP   ^   s   † Ø€FØ€HØ„Fr   rP   c                  ó0   € ] tR t^dt$ RtR]R&   R]R&   RtR# )ÚCatalogScanzHThe catalog's security scan of the pinned commit; read-only on the card.rP   Ústatusr;   Úsummaryr   N©r   r   r   r   r,   rC   r   r   r   r   rT   rT   d   s   ‡ ÙRàÓØ‡Lr   rT   c                  ó>   € ] tR t^kt$ RtR]R&   R]R&   RtR]R&   RtR# )	ÚCatalogApprovedzyThe non-secret Advanced choices the user approved on a catalog row; a Try again after the
operation settled repeats them.r=   Úforcer    NrA   Úrefr   )r   r   r   r   r,   rC   r[   r   r   r   r   rY   rY   k   s   ‡ ñ'ð ƒKØƒLØ€Cˆ×r   rY   c                  ó0   € ] tR t^tt$ RtR]R&   R]R&   RtR# )ÚCatalogServerErrorzTAn MCP server an installed plugin brought that did not connect, with the raw reason.r;   r<   Úerrorr   NrW   r   r   r   r]   r]   t   s   ‡ Ù^à
ƒIØ‡Jr   r]   c                  óè  € ] tR t^{t$ RtR]R&   R]R&   R]R&   R]R	&   R
tR]R&   R
tR]R&   R
tR]R&   R
t	R]R&   R
t
R]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R&   R
tR]R &   R
tR]R!&   R
tR"]R#&   R
tR]R$&   R
tR]R%&   R
tR]R&&   R
tR']R(&   R
tR]R)&   R
tR*]R+&   R
tR,]R-&   R
t R]R.&   R
t!R]R/&   R
t"R0]R1&   R
t#R]R2&   R3t$R
# )4ÚConnectionOperationTargetz¦``Target.snapshot``: the link minted up front rides here, never in the model result. ``extra``
keys a leg records (``tools``, ``hint``) are typed here as they appear.r;   r<   r   Úkindr   Úactionr$   ÚstateNzbool | NoneÚresolvedrA   ÚdetailÚinstructionsÚdiscovery_errorÚconnect_urlÚconnection_idÚaliasÚattemptz%list[ConnectionTargetEnvField] | NoneÚrequired_envzlist[str] | NoneÚtoolsÚhintÚdisplayÚdescriptionzCatalogTier | NoneÚtierÚ	platformsÚrepoÚshaÚsubdirzCatalogScan | NoneÚscanÚrequires_hermesÚhas_desktop_halfÚtarget_profilezCatalogAppState | NoneÚ	app_stater   zInstallPhase | NoneÚphasezCatalogApproved | NoneÚapprovedÚenabledÚmissing_envzlist[CatalogServerError] | NoneÚserver_errorsÚalready_installedr   )%r   r   r   r   r,   rC   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r   r{   r|   r}   r~   r   r€   r   r   r   r   r`   r`   {   sY  ‡ ñOð ƒIØ
ÓØ"Ó"Ø Ó à €HˆkÓ Ø€FˆJÓØ#€L�*Ó#Ø"&€O�ZÓ&Ø"€K�Ó"à $€M�:Ó$à€Eˆ:ÓØ€GˆZÓà:>€LÐ7Ó>Ø"€EÐÓ"Ø€Dˆ*Óà€GˆZÓØ"€K�Ó"Ø#€DÐ
Ó#Ø"&€IÐÓ&Ø€Dˆ*ÓØ€CˆÓØ€FˆJÓØ#€DÐ
Ó#à"&€O�ZÓ&Ø$(Ð�kÓ(à!%€N�JÓ%Ø(,€IÐ%Ó,à€Eˆ:ÓØ!%€EÐÓ%Ø'+€HÐ$Ó+à€Gˆ[ÓØ$(€KÐ!Ó(Ø59€MÐ2Ó9Ø%)Ð�{×)r   r`   c                  ó&   € ] tR t^¬t$ RtR]R&   RtR# )ÚConnectionDisplayzd``manage_connections`` action ``display``: the directory card, with these slugs pinned as Suggested.z	list[str]Ú	suggestedr   NrW   r   r   r   r‚   r‚   ¬   s   ‡ Ùnà×r   r‚   c                  ój   € ] tR t^²t$ RtR]R&   R]R&   R]R&   R]R&   R	]R
&   RtR]R&   RtR]R&   RtR# )ÚConnectionRequestPayloadz¸``ConnectionOperation.request_payload``: opens the card; also the ``pending_connection`` resume
snapshot so a client that missed the event restores the card with the server's deadline.r;   Úop_idÚintÚseqÚfloatÚdeadline_atÚtimeout_secondsúlist[ConnectionOperationTarget]ÚtargetsNrA   Útool_call_idzConnectionDisplay | Nonero   r   )	r   r   r   r   r,   rC   rŽ   ro   r   r   r   r   r…   r…   ²   s=   ‡ ñ`ð ƒJð 
ƒHØÓØÓØ,Ó,à#€L�*Ó#à(,€GÐ%×,r   r…   zconnection.requestzLA connection operation opened on this session; the desktop renders its card.)Údocc                  ój   € ] tR t^Çt$ RtR]R&   R]R&   R]R&   R]R	&   R
tR]R&   R
tR]R&   R]R&   RtR
# )ÚConnectionOperationStatuszF``methods_connectors._operation_view``: the operation's full snapshot.r;   r†   r‡   rˆ   r‰   rŠ   r=   ÚsettledNzfloat | NoneÚ
settled_atúConnectionSettleReason | NoneÚ
settled_byrŒ   r�   r   )	r   r   r   r   r,   rC   r“   r•   r   r   r   r   r‘   r‘   Ç   s5   ‡ ÙPàƒJØ	ƒHØÓØƒMØ#€J�Ó#Ø04€JÐ-Ó4Ø,×,r   r‘   c                  ó|   € ] tR t^Ót$ RtR]R&   RtR]R&   ]! RRR7      tR	]R
&   Rt	R	]R&   Rt
R]R&   RtR]R&   RtR# )ÚConnectionUpdatePayloadz£``methods_connectors._connection_update``: one target transition (``target``/``from``/``to``/
``actor``) or the settlement (none of those), with the full snapshot.r
   ÚownerNrA   ÚtargetÚfrom)r@   rj   zConnectionTargetState | NoneÚfrom_ÚtozConnectionActor | NoneÚactorre   r   )r   r   r   r   r,   rC   r™   r   r›   rœ   r�   re   r   r   r   r   r—   r—   Ó   sL   ‡ ñMð ÓØ€FˆJÓÙ*/¸ÀFÔ*K€EÐ'ÓKØ'+€BÐ$Ó+Ø$(€EÐ!Ó(Ø€FˆJ×r   r—   zconnection.updatezAOne transition or the settlement of an open connection operation.c                  ó,   € ] tR t^ât$ R]R&   R]R&   RtR# )ÚConnectionOperationParamsr
   r˜   r;   r†   r   N©r   r   r   r   rC   r   r   r   r   rŸ   rŸ   â   s   ‡ ØÓØ‡Jr   rŸ   zconnectors.operation.statusz>The current snapshot of one open session or account operation.)ÚparamsÚresultr�   c                  ó"   € ] tR t^ët$ R]R&   RtR# )ÚConnectionWakeResultúLiteral['ok']rU   r   Nr    r   r   r   r¤   r¤   ë   s   ‡ Ø×r   r¤   zconnectors.operation.wakezcThe browser leg came back (hermes://connections/done): read the accounts now, not at the next tick.c                  ó"   € ] tR t^ótRtRtRtRtR# )ÚConnectionAnswerStatuszLWhat the card says about one row: ``tools/connectors/mcp.py::apply_answer``.r|   r(   r   N)r   r   r   r   r,   r|   r(   r   r   r   r   r§   r§   ó   s   † ÙVà€HØ„Gr   r§   c                  óL   € ] tR t^út$ RtR]R&   R]R&   RtR]R&   RtR	]R
&   RtR# )ÚConnectionAnswerTargetztOne row's answer from the card. ``env`` carries the credential values an install asked for
through ``required_env``.r;   r<   r§   rU   NrA   re   zdict[str, str] | NoneÚenvr   )	r   r   r   r   r,   rC   re   rª   r   r   r   r   r©   r©   ú   s)   ‡ ñ!ð ƒIØ"Ó"Ø€FˆJÓØ!%€CÐ	×%r   r©   c                  óT   € ] tR tRt$ Rt]! ]R7      tR]R&   Rt	R]R&   Rt
R	]R
&   RtR# )ÚConnectionAnsweri  z’The card's answer: per-target outcomes and an optional Continue
(``settled_by: "continue"``). Settlement is derived from target states afterwards.)Údefault_factoryzlist[ConnectionAnswerTarget]r�   Nr”   r•   rA   Úsaidr   )r   r   r   r   r,   r   Úlistr�   rC   r•   r®   r   r   r   r   r¬   r¬     s/   ‡ ñZñ -2À$Ô,G€GÐ)ÓGØ04€JÐ-Ó4à€Dˆ*×r   r¬   c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚConnectionRespondParamsi  r¬   r¢   r   Nr    r   r   r   r±   r±     s   ‡ Ø×r   r±   c                  ó,   € ] tR tRt$ R]R&   R]R&   RtR# )ÚConnectionRespondResulti  r¥   rU   r=   r’   r   Nr    r   r   r   r³   r³     s   ‡ ØÓØ‡Mr   r³   zconnection.respondz<Per-target outcomes from the card, and an optional Continue.N),r,   Ú
__future__r   Útypingr   Úpydanticr   Úhermes_cli.plugin_install_phaser   Úbaser   r   r   r	   Úcommonr
   r   Úregistryr   r   r   r   r$   r.   r3   r:   rE   rJ   rP   rT   rY   r]   r`   r‚   r…   r‘   r—   rŸ   r¤   r§   r©   r¬   r±   r³   r   r   r   Ú<module>r»      s¶  ðñõ #å å å 8ç 3Ó 3ß 1ß #ô˜8ô ô˜Xô ô	$˜Hô 	$ô�hô ô˜Xô ô˜wô ô�(ô ô�hô ô˜ô ô�'ô ô�gô ô˜ô ô.* ô .*ôb˜ô ô-˜wô -ñ" ÐÐ4Ø
XõZô	- ô 	-ô	Ð7¸ô 	ñ ÐÐ2Ø
MõOô ô ñ
 Ð$Ð-FÐOhØKõMô˜6ô ñ Ð"Ð+DÐMaØpõrô˜Xô ô&˜Vô &ô�vô ôÐ7ô ô˜fô ñ
 ÐÐ$;ÐD[ØI÷Kr   