+
    jHàjU	  ã                  óR   € R t ^ RIHt ^ RIHt ^ RIHtHt R R ltRR/R R	 llt	R# )
a¢  Which runtime record describes a profile the host multiplexer may serve.

One rule for ``/api/status`` and the messaging card so the two surfaces never pick different records
for the same profile. Read-only: it selects and projects existing ``gateway_state.json`` records and
writes nothing. ``gateway.status`` is resolved at call time so its test seams
(``monkeypatch.setattr(gateway.status, ...)``) still intercept.
)Úannotations)ÚPath)ÚAnyÚOptionalc               ó    € V ^8„  d   QhRRRR/# )é   Úlivenessr   ÚreturnúOptional[int]© )Úformats   "Ú:/home/ubuntu/.hermes/hermes-agent/gateway/status_served.pyÚ__annotate__r      s   € ÷ Añ A ð A¨ñ Aó    c                ó@   € V P                   R8X  d   R# V P                  # )z¨``liveness.pid`` when it was proven on THIS host; None for a health-probe answer, whose PID
belongs to the remote container and may collide with an unrelated local one.ÚhealthN)ÚsourceÚpid)r   s   &r   Úlocal_liveness_pidr      s   € ð —?‘? hÔ.ˆ4Ð@°H·L±LÐ@r   Úgateway_pidNc               ó(   € V ^8„  d   QhRRRRRRRR/# )r   Úhomer   Úown_runtimezOptional[dict[str, Any]]r   r
   r	   r   )r   s   "r   r   r      s2   € ÷ \ñ \Ø
ð\Ø5ð\ØGTð\àñ\r   c               ó  € ^ RI Hp Ve   VP                  WR7      e   R# VP                  V 4      pVe   V^,          '       g   R# Vw  rVVe	   WR8w  d   R# VP	                  V 4      ;'       g    Rp/ VCRVP                  Wg4      /C# )a…  The multiplexer's record projected onto ``home``'s profile (bare platform keys, the shape a
standalone gateway writes) when it is that profile's live runtime record, else None.

- ``own_runtime`` wins whenever it proves a live gateway of ``home`` -- an own ``--force`` one, or
  the host's own record on the host itself, which must stay whole so other profiles'
  ``<profile>:<platform>`` failures remain visible there;
- a missing/unreadable multiplexer record (``(pid, {})``) is no record;
- ``gateway_pid`` (a PID the caller proved on this host) must BE the multiplexer, so a gateway of
  the profile's own holding its lock keeps its record.
)ÚstatusN)Úexpected_homeÚdefaultÚ	platforms)Úgatewayr   Úget_runtime_status_running_pidÚ multiplexer_liveness_for_profileÚprofile_name_for_homeÚ"profile_platforms_from_multiplexer)r   r   r   r   ÚservedÚmux_pidÚrecordÚnames   &&$     r   Úserved_profile_runtimer'      s�   € õ àÒ 6×#HÑ#HÈÐ#HÓ#iÒ#uÙØ×4Ñ4°TÓ:€FØ‚~˜V AŸYœYÙØ�O€GØÒ 7Ô#9Ùð ×'Ñ'¨Ó-×:Ð:°€DØ[ˆfÐ[�k 6×#LÑ#LÈVÓ#ZÑ[Ð[r   )
Ú__doc__Ú
__future__r   Úpathlibr   Útypingr   r   r   r'   r   r   r   Ú<module>r,      s0   ðñõ #å ß  õAð\ØW[÷\ñ \r   