+
    lHàjpI  ã                  óV  € R 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Ht ^RIH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]4      t]! R]]RR7        ! R R]4      t]! R]]RR7        ! R R]4      t]! R]]R R7        ! 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 R2]4      t]! R3]]R4R7        ! R5 R6]4      t  ! R7 R8]4      t!]! R9] ]!R:R7        ! R; R<]4      t" ! R= R>]4      t#]! R?]"]#R@R7       ]! RA]"]#RBR7        ! RC RD]4      t$]! RE]$]#RFR7        ! RG RH]4      t% ! RI RJ]	4      t& ! RK RL]4      t']! RM]%]'RNR7        ! RO RP]4      t( ! RQ RR]4      t)]! RS](])RTR7        ! RU RV]4      t* ! RW RX]4      t+]! RY]*]+RZR7        ! R[ R\]4      t, ! R] R^]4      t-]! R_],]-R`R7        ! Ra Rb]4      t. ! Rc Rd]4      t/]! Re].]/RfR7        ! Rg Rh]	4      t0 ! Ri Rj]4      t1 ! Rk Rl]4      t2]! Rm]1]2RnR7        ! Ro Rp]	4      t3 ! Rq Rr]4      t4 ! Rs Rt]	4      t5 ! Ru Rv]4      t6]! Rw]4]6RxR7        ! Ry Rz]4      t7 ! R{ R|]4      t8]! R}]7]8R~R7        ! R R€]4      t9 ! R� R‚]4      t:]! Rƒ]9]:R„R7        ! 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“ R”]<4      t@]! R•]>]@R–R7        ! R— R˜]4      tA ! R™ Rš]4      tB ! R› Rœ]4      tC]! R�]A]CRžR7        ! RŸ R ]4      tD ! R¡ R¢]<4      tE]! R£]D]ER¤R7       R¥# )¦aR  Prompt submission, attachments, side agents, approvals, batch-clarify locks (``methods_prompt.py``)
and voice / wake-word control (``methods_voice.py``).

``profile`` rides on every method here: the desktop routes session-scoped calls through
``requestForOwnedSession`` / ``requestForBot`` / ``requestGatewayForProfile``, which stamp it.
)Úannotations)ÚField)Ú	JsonValueÚParamsÚResultÚWireEnum)Ú	OpenModelÚPendingApprovalÚSessionParams)Úmethodc                  ó"   € ] tR t^tRtRtRtRtR# )ÚClientSurfacezQWhere the user typed this turn; anything else is treated as the plain app window.Úhudz
voice-live© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú
voice_liveÚ__static_attributes__r   ó    ÚG/home/ubuntu/.hermes/hermes-agent/tui_gateway/contracts/prompt_voice.pyr   r      s   † Ù[à
€CØ„Jr   r   c                  óN  € ] tR t^t$ Rt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RRR7      tR]R&   ]! RRRR7      tR]R&   ]! RRRR7      tR]R &   R!tR# )"ÚPromptSubmitParamsaf  ``text`` is normally a string; the relay / hosted paths may hand a structured (parts list)
payload, and the busy path renders it. Truncation (rewind / edit / regenerate) needs explicit
consent: ``confirm_truncate`` plus one durable target (``truncate_before_row_id`` preferred,
``truncate_before_message_id``, or the legacy ``truncate_before_user_ordinal``).Ú r   ÚtextNú
str | NoneÚdisplay_kindúbool | NoneÚinterruptedÚqueuedÚsurfaceÚvoice_contextÚ
voice_turnÚtitle_previewú
int | NoneÚtruncate_before_user_ordinalÚtruncate_before_row_idÚtruncate_before_message_idÚconfirm_truncateÚconfirm_empty_truncateÚconfirm_deep_truncatezlist[int] | NoneÚrebind_survivor_row_idsTÚ_hosted_task)ÚdefaultÚexcludeÚaliaszJsonValue | NoneÚhosted_taskÚ_turn_authorÚturn_authorÚ_hosted_terminal_callbackÚhosted_terminal_callbackr   )r   r   r   r   r   r   Ú__annotations__r   r    r!   r"   r#   r$   r%   r'   r(   r)   r*   r+   r,   r-   r   r2   r4   r6   r   r   r   r   r   r      sï   ‡ ñXð
 €Dˆ)ÓØ#€L�*Ó#Ø#€K�Ó#Ø€FˆKÓØ€GˆZÓØ $€M�:Ó$Ø"€J�Ó"à $€M�:Ó$Ø/3Ð  *Ó3Ø)-Ð˜JÓ-Ø-1Ð 
Ó1Ø$(Ð�kÓ(Ø*.Ð˜KÓ.Ø)-Ð˜;Ó-Ø04ÐÐ-Ó4ñ %*°$ÀÈNÔ$[€KÐ!Ó[Ù$)°$ÀÈNÔ$[€KÐ!Ó[Ù16Ø˜dÐ*Eô2GÐÐ.÷ Gr   r   c                  ó&   € ] tR t^8tRtRtRtRtRtR# )ÚPromptSubmitStatusÚ	streamingr!   ÚsteeredÚ
redirectedr   N)	r   r   r   r   r:   r!   r;   r<   r   r   r   r   r9   r9   8   s   † Ø€IØ€FØ€GØ„Jr   r9   c                  óŒ   € ] tR t^?t$ Rt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# )ÚPromptSubmitResultzÿ``status`` is absent only on the typed-stop-phrase reply (``voice_stopped``). After a
truncation the survivor row ids let the client rebind its cached ``rowId``s (``None`` map
entries: drop the cached id). ``turn_isolation`` marks a compute-host dispatch.NzPromptSubmitStatus | NoneÚstatusr   Úvoice_stoppedr&   Úuser_row_idzlist[int | None] | NoneÚsurvivor_user_row_idszdict[str, int | None] | NoneÚsurvivor_row_id_mapÚturn_isolationr   Úadmission_idÚ	forwardedr   )r   r   r   r   r   r?   r7   r@   rA   rB   rC   rD   rE   rF   r   r   r   r   r>   r>   ?   sc   ‡ ñWð )-€FÐ%Ó,Ø!%€M�;Ó%ð #€K�Ó"Ø59ÐÐ2Ó9Ø8<ÐÐ5Ó<Ø"&€N�KÓ&ð  $€L�*Ó#Ø!€Iˆ{×!r   r>   zprompt.submitz_Send a user turn to a live session; busy sessions queue / steer / redirect instead of refusing.)ÚparamsÚresultÚdocc                  óT   € ] tR t^Yt$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R]R&   R	t
R# )
Ú	ImageMetauQ   ``tui_gateway/server.py::_image_meta`` â€” dimensions when PIL can open the file.Nr   Únamer&   ÚwidthÚheightÚtoken_estimater   )r   r   r   r   r   rL   r7   rM   rN   rO   r   r   r   r   rK   rK   Y   s-   ‡ Ù[à€Dˆ*ÓØ€Eˆ:ÓØ€FˆJÓØ!%€N�J×%r   rK   c                  óz   € ] tR t^bt$ 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# )ÚAttachedImageResultzU``methods_prompt.py::_attached_image_result``: the image is queued for the next turn.ÚboolÚattachedNr   Úpathr&   ÚcountÚ	remainderr   ÚbytesÚmessager   )r   r   r   r   r   r7   rT   rU   rV   r   rW   rX   r   r   r   r   rQ   rQ   b   sF   ‡ Ù_àƒNØ€Dˆ*ÓØ€Eˆ:ÓØ €IˆzÓ Ø€Dˆ*ÓØ€Eˆ:ÓØ€GˆZ×r   rQ   c                  ó   € ] tR t^ntRtR# )ÚClipboardPasteParamsr   N©r   r   r   r   r   r   r   r   rZ   rZ   n   ó   † Ûr   rZ   zclipboard.pastezNSave the host clipboard image into the session and queue it for the next turn.c                  ó"   € ] tR t^vt$ R]R&   RtR# )ÚImageAttachParamsÚstrrT   r   N©r   r   r   r   r7   r   r   r   r   r^   r^   v   ó   ‡ Ø
‡Ir   r^   zimage.attachz5Queue a gateway-visible image file for the next turn.c                  óT   € ] tR t^~t$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R]R&   Rt
R# )	ÚImageAttachBytesParamsu„   ``content_base64`` (or the ``data`` alias) carries the bytes; ``filename`` / ``ext`` only hint
the extension â€” magic bytes decide.Nr   Úcontent_base64ÚdataÚfilenameÚextr   )r   r   r   r   r   rd   r7   re   rf   rg   r   r   r   r   rc   rc   ~   s1   ‡ ñ-ð "&€N�JÓ%Ø€Dˆ*ÓØ€HˆjÓØ€Cˆ×r   rc   zimage.attach_byteszNQueue an image uploaded as base64 (remote client); reply mirrors image.attach.c                  óp   € ] tR t^Œt$ Rt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# )ÚPdfAttachParamsz�Host ``path`` or base64 ``content_base64`` / ``data``; ``first_page`` / ``last_page`` bound the
render (per-call page cap enforced server-side).Nr   rT   rd   re   rf   r&   Ú
first_pageÚ	last_pager   )r   r   r   r   r   rT   r7   rd   re   rf   rj   rk   r   r   r   r   ri   ri   Œ   sE   ‡ ñ8ð €Dˆ*ÓØ!%€N�JÓ%Ø€Dˆ*ÓØ€HˆjÓØ!€J�
Ó!Ø €Iˆz× r   ri   c                  ó,   € ] tR t^˜t$ R]R&   R]R&   RtR# )ÚPdfPager_   rT   ÚintÚpager   Nr`   r   r   r   rm   rm   ˜   s   ‡ Ø
ƒIØ
‡Ir   rm   c                  óT   € ] tR t^�t$ R]R&   R]R&   R]R&   R]R&   R]R	&   R]R
&   RtR# )ÚPdfAttachResultrR   rS   r_   rf   rn   Úpages_attachedzlist[PdfPage]ÚpagesrU   r   r   Nr`   r   r   r   rq   rq   �   s"   ‡ ØƒNØƒMØÓØÓØƒJØ
‡Ir   rq   z
pdf.attachzGRender a PDF's pages to PNG and queue them as images for the next turn.c                  óF   € ] tR t^ªt$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R# )ÚFileAttachParamszq``path`` when the file is gateway-visible, else ``data_url`` carries the bytes; ``name`` labels
an uploaded file.Nr   rT   Údata_urlrL   r   )
r   r   r   r   r   rT   r7   rv   rL   r   r   r   r   ru   ru   ª   s'   ‡ ñð €Dˆ*ÓØ€HˆjÓØ€Dˆ*×r   ru   c                  óT   € ] tR t^³t$ R]R&   R]R&   R]R&   R]R&   R]R&   R]R&   R	tR
# )ÚFileAttachResultrR   rS   r_   rL   rT   Úref_pathÚref_textÚuploadedr   Nr`   r   r   r   rx   rx   ³   s    ‡ ØƒNØ
ƒIØ
ƒIØƒMØƒMØ‡Nr   rx   zfile.attachzOStage a non-image file into the session workspace and hand back its @file: ref.c                  ó"   € ] tR t^Àt$ R]R&   RtR# )ÚImageDetachParamsr_   rT   r   Nr`   r   r   r   r}   r}   À   ra   r   r}   c                  ó,   € ] tR t^Ät$ R]R&   R]R&   RtR# )ÚImageDetachResultrR   Údetachedrn   rU   r   Nr`   r   r   r   r   r   Ä   s   ‡ ØƒNØ‡Jr   r   zimage.detachz,Drop a queued image before the turn is sent.c                  ó&   € ] tR t^Ít$ RtR]R&   RtR# )ÚInputDetectDropParamsNr   r   r   )r   r   r   r   r   r7   r   r   r   r   r‚   r‚   Í   s   ‡ Ø€Dˆ*×r   r‚   c                  ó^   € ] tR t^Ñt$ RtR]R&   RtR]R&   RtR]R&   RtR	]R
&   Rt	R]R&   Rt
R# )ÚInputDetectDropResultz¥``matched: false`` alone when the text is not a drop; an image drop is queued immediately
(``is_image`` + ``count``), a file drop only yields the ``text`` to insert.rR   ÚmatchedNr   Úis_imager   rT   r&   rU   r   r   )r   r   r   r   r   r7   r†   rT   rU   r   r   r   r   r   r„   r„   Ñ   s7   ‡ ñSð ƒMØ €HˆkÓ Ø€Dˆ*ÓØ€Eˆ:ÓØ€Dˆ*×r   r„   zinput.detect_dropzWRecognise a terminal file drop pasted into the composer and turn it into an attachment.c                  ó"   € ] tR t^ãt$ R]R&   RtR# )ÚSideAgentParamsr_   r   r   Nr`   r   r   r   rˆ   rˆ   ã   ra   r   rˆ   c                  ó&   € ] tR t^çt$ RtR]R&   RtR# )ÚTaskIdResultzkThe side agent runs detached; its answer lands on the parent session as an event carrying
this ``task_id``.r_   Útask_idr   N)r   r   r   r   r   r7   r   r   r   r   rŠ   rŠ   ç   s   ‡ ñð ‡Lr   rŠ   zprompt.backgroundzYRun a task on a fresh agent in the background; the answer arrives as background.complete.z
prompt.btwz[Side question over a snapshot of the live conversation; the answer arrives as btw.complete.c                  ó>   € ] tR t^ôt$ R]R&   RtR]R&   RtR]R&   RtR# )ÚPreviewRestartParamsr_   ÚurlNr   ÚcwdÚcontextr   )r   r   r   r   r7   r�   r�   r   r   r   r   r�   r�   ô   s   ‡ Ø	ƒHØ€CˆÓØ€GˆZ×r   r�   zpreview.restartzJSpawn a hidden agent that brings the desktop preview's dev server back up.c                  óH   € ] tR tRt$ R]R&   R]R&   RtR]R&   RtR	]R
&   RtR# )ÚClarifyLockParamsi  r_   Ú
request_idÚquestion_idr   r   ÚanswerNr   Úprofiler   )r   r   r   r   r7   r•   r–   r   r   r   r   r’   r’     s!   ‡ ØƒOØÓØ€FˆIÓØ€GˆZ×r   r’   c                  ó   € ] tR tRtRtRtRtR# )ÚClarifyLockStatusi  ÚokÚexpiredr   N)r   r   r   r   r™   rš   r   r   r   r   r˜   r˜     s   † Ø	€BØ„Gr   r˜   c                  ó4   € ] tR tRt$ RtR]R&   RtR]R&   RtR# )	ÚClarifyLockResulti  u¦   ``remaining`` lists the qids still unanswered; the lock that empties it resolves the request.
``expired``: the wait already ended (timeout / cancel) â€” not an error.r˜   r?   Nzlist[str] | NoneÚ	remainingr   )r   r   r   r   r   r7   r�   r   r   r   r   rœ   rœ     s   ‡ ñPð ÓØ"&€IÐ×&r   rœ   zclarify.lockzULock one answer of a batch clarify request (editable until every question is locked).c                  ó:   € ] tR tRt$ R]R&   R]R&   RtR]R&   R	tR# )
ÚRequestAnswerParamsi  r_   Úidzdict[str, JsonValue]rH   Nr   r–   r   ©r   r   r   r   r7   r–   r   r   r   r   rŸ   rŸ     s   ‡ ØƒGØ Ó Ø€GˆZ×r   rŸ   c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚRequestAnswerResulti  r˜   r?   r   Nr`   r   r   r   r£   r£     s   ‡ Ø×r   r£   zrequest.answeruS   Answer an open serverâ†’client request from a client that never received the frame.c                  ó   € ] tR tRtRtR# )ÚApprovalPendingParamsi*  r   Nr[   r   r   r   r¥   r¥   *  r\   r   r¥   c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚApprovalPendingResulti.  zlist[PendingApproval]Ú	approvalsr   Nr`   r   r   r   r§   r§   .  s   ‡ Ø$×$r   r§   zapproval.pendingzIReplay the approvals still waiting on this session (reconnect / polling).c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚApprovalReceivedParamsi6  r_   r“   r   Nr`   r   r   r   rª   rª   6  s   ‡ Ø‡Or   rª   c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚApprovalReceivedResulti:  rR   Úacknowledgedr   Nr`   r   r   r   r¬   r¬   :  s   ‡ Ø×r   r¬   zapproval.receivedzDTell the backend the card is on screen, so its timeout clock starts.c                  óF   € ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R&   R	t	R# )
ÚApprovalRespondParamsiB  z³``choice`` is one of the offered ``approval`` choices (once / session / always / deny); ``all``
resolves every pending approval, ``request_id`` a specific one, neither the oldest.Nr   Úchoicer   Úallr“   r   )
r   r   r   r   r   r°   r7   r±   r“   r   r   r   r   r¯   r¯   B  s(   ‡ ñ[ð €FˆJÓØ€CˆÓØ!€J�
×!r   r¯   c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚApprovalRespondResultiK  rn   Úresolvedr   Nr`   r   r   r   r³   r³   K  s   ‡ Ø‡Mr   r³   zapproval.respondzcDeliver the user's decision on a dangerous command (falls back to durable identity on a stale sid).c                  ó&   € ] tR tRtRtRtRtRtRtR# )ÚVoiceToggleActioniV  r?   ÚonÚoffÚttsr   N)	r   r   r   r   r?   r·   r¸   r¹   r   r   r   r   r¶   r¶   V  s   † Ø€FØ	€BØ
€CØ
„Cr   r¶   c                  óH   € ] tR tRt$ ]P
                  tR]R&   RtR]R&   Rt	R# )ÚVoiceToggleParamsi]  r¶   ÚactionNr   r–   r   )
r   r   r   r   r¶   r?   r¼   r7   r–   r   r   r   r   r»   r»   ]  s   ‡ Ø 1× 8Ñ 8€FÐÓ8Ø€GˆZ×r   r»   c                  ó€   € ] tR tRt$ Rt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# )ÚVoiceToggleResultib  zu``methods_voice.py::_voice_status_payload`` (+ the requirements probe on ``status``, the spoken
stop hint on ``on``).rR   Úenabledr_   Ú
record_keyr¹   Nr   Ú	stop_hintr   Ú	availableÚaudio_availableÚstt_availableÚdetailsr   )r   r   r   r   r   r7   rÁ   rÂ   rÃ   rÄ   rÅ   r   r   r   r   r¾   r¾   b  sJ   ‡ ñð ƒMØƒOØ	ƒIØ €IˆzÓ Ø!€Iˆ{Ó!Ø#'€O�[Ó'Ø!%€M�;Ó%Ø€GˆZ×r   r¾   zvoice.togglezG/voice parity: report, flip voice mode on/off, or toggle speech output.c                  ó   € ] tR tRtRtRtRtR# )ÚVoiceRecordActionit  ÚstartÚstopr   N)r   r   r   r   rÈ   rÉ   r   r   r   r   rÇ   rÇ   t  s   † Ø€EØ„Dr   rÇ   c                  óV   € ] tR tRt$ ]P
                  tR]R&   RtR]R&   Rt	R]R&   Rt
R# )	ÚVoiceRecordParamsiy  rÇ   r¼   Nr   Ú
session_idr–   r   )r   r   r   r   rÇ   rÈ   r¼   r7   rÌ   r–   r   r   r   r   rË   rË   y  s'   ‡ Ø 1× 7Ñ 7€FÐÓ7Ø!€J�
Ó!Ø€GˆZ×r   rË   c                  ó"   € ] tR tRtRtRtRtRtR# )ÚVoiceRecordStatusi  Ú	recordingÚstoppedÚbusyr   N)r   r   r   r   rÏ   rÐ   rÑ   r   r   r   r   rÎ   rÎ     s   † Ø€IØ€GØ„Dr   rÎ   c                  ó0   € ] tR tRt$ R]R&   RtR]R&   RtR# )ÚVoiceRecordResulti…  rÎ   r?   Nr   Úreasonr   )r   r   r   r   r7   rÔ   r   r   r   r   rÓ   rÓ   …  s   ‡ ØÓØ€FˆJ×r   rÓ   zvoice.recordzMVAD-bounded push-to-talk; the transcript arrives as a voice.transcript event.c                  ó0   € ] tR tRt$ R]R&   RtR]R&   RtR# )ÚVoiceTtsParamsiŽ  r_   r   Nr   r–   r   r¡   r   r   r   rÖ   rÖ   Ž  s   ‡ Ø
ƒIØ€GˆZ×r   rÖ   c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚVoiceTtsResulti“  r_   r?   r   Nr`   r   r   r   rØ   rØ   “  s   ‡ Ø‡Kr   rØ   z	voice.ttsz;Speak text through the backend TTS engine (barge-in aware).c                  ób   € ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R]R	&   Rt
R]R
&   RtR# )ÚWakeStartParamsiž  z³``surface`` names the caller ("tui" | "gui"); ``persist`` is the explicit gesture that also
flips ``wake_word.enabled`` on; ``client_capture`` asks for PCM streamed via wake.feed.Nr   r"   r   ÚpersistÚclient_capturerÌ   r–   r   )r   r   r   r   r   r"   r7   rÛ   rÜ   rÌ   r–   r   r   r   r   rÚ   rÚ   ž  s<   ‡ ñ_ð €GˆZÓØ€Gˆ[ÓØ"&€N�KÓ&Ø!€J�
Ó!Ø€GˆZ×r   rÚ   c                  ó¤   € ] tR tRt$ 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# )ÚWakeStartResulti©  zµ``started: false`` carries ``reason`` (unavailable / disabled / disabled_for_surface / owned);
``sample_rate`` / ``frame_length`` describe the PCM frames the armed detector expects.rR   ÚstartedNr   rÔ   ÚhintÚphraseÚproviderÚowner_surfacer   Úenabled_persistedÚcapturer&   Úsample_rateÚframe_lengthr   )r   r   r   r   r   r7   rÔ   rà   rá   râ   rã   rä   rå   ræ   rç   r   r   r   r   rÞ   rÞ   ©  sj   ‡ ñ^ð ƒMØ€FˆJÓØ€Dˆ*ÓØ€FˆJÓØ€HˆjÓØ $€M�:Ó$Ø%)Ð�{Ó)Ø€GˆZÓØ"€K�Ó"Ø#€L�*×#r   rÞ   z
wake.startzIArm the wake-word listener for the calling surface; refusals explain why.c                  ó4   € ] tR tRt$ RtR]R&   RtR]R&   RtR# )ÚWakeStopParamsi½  Nr   rÛ   r   r–   r   )r   r   r   r   rÛ   r7   r–   r   r   r   r   ré   ré   ½  s   ‡ Ø€Gˆ[ÓØ€GˆZ×r   ré   c                  ó*   € ] tR tRt$ RtRtR]R&   RtR# )ÚWakeOwnerResultiÂ  uk   ``methods_voice.py::_owner_result`` â€” ``reason: "not_owner"`` when the caller does not hold
the listener.Nr   rÔ   r   )r   r   r   r   r   rÔ   r7   r   r   r   r   rë   rë   Â  s   ‡ ñð €FˆJ×r   rë   c                  ó,   € ] tR tRt$ R]R&   R]R&   RtR# )ÚWakeStopResultiÉ  rR   rÐ   Údisabled_persistedr   Nr`   r   r   r   rí   rí   É  s   ‡ ØƒMØ×r   rí   z	wake.stopzKStop this surface's listener; persist also writes wake_word.enabled: false.c                  ó&   € ] tR tRt$ RtR]R&   RtR# )ÚWakeControlParamsiÒ  Nr   r–   r   )r   r   r   r   r–   r7   r   r   r   r   rð   rð   Ò  s   ‡ Ø€GˆZ×r   rð   c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚWakePauseResultiÖ  rR   Úpausedr   Nr`   r   r   r   rò   rò   Ö  s   ‡ Ø‡Lr   rò   z
wake.pausezBRelease the mic (e.g. while the desktop's browser captures audio).c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚWakeResumeResultiÞ  rR   Úresumedr   Nr`   r   r   r   rõ   rõ   Þ  s   ‡ Ø‡Mr   rõ   zwake.resumezAReclaim the mic after a pause; no-op if the listener isn't armed.c                  óB   € ] tR tRt$ RtR]R&   RtR]R&   RtR]R&   RtR# )	ÚWakeStatusParamsiæ  Nr   r"   r   rÜ   r–   r   )	r   r   r   r   r"   r7   rÜ   r–   r   r   r   r   rø   rø   æ  s    ‡ Ø€GˆZÓØ"&€N�KÓ&Ø€GˆZ×r   rø   c                  ó~   € ] tR tRt$ Rt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# )ÚWakeInputDeviceiì  u`   ``tools/wake_word.py::_describe_input_device`` â€” PortAudio diagnostics for the configured mic.Nzint | str | NoneÚselectorr   rL   Úerrorr&   Úmax_input_channelszfloat | NoneÚdefault_samplerateÚhostapi_indexÚhostapir   )r   r   r   r   r   rû   r7   rL   rü   rý   rþ   rÿ   r   r   r   r   r   rú   rú   ì  sN   ‡ Ùjà!%€HÐÓ%Ø€Dˆ*ÓØ€Eˆ:ÓØ%)Ð˜
Ó)Ø'+Ð˜Ó+Ø $€M�:Ó$Ø€GˆZ×r   rú   c                  ó¶   € ] tR tRt$ RtR]R&   R]R&   RtR]R&   R	]R
&   R	]R&   R	]R&   R]R&   R]R&   R	]R&   R]R&   R]R&   R	]R&   R]R&   R]R&   R]R&   RtR# )ÚWakeStatusResultiø  z�``enabled`` is config truth; ``listening`` is this caller's armed detector; ``audio_silent``
means armed but deaf (see ``hint``).rR   Ú	listeningÚowned_by_callerNr   rã   r_   rá   râ   Úconfigured_surfacerú   Úinput_devicerÂ   rà   r¿   Úaudio_silentrå   Úlocal_input_availablern   ræ   rç   r   )r   r   r   r   r   r7   rã   r   r   r   r   r  r  ø  s`   ‡ ñ,ð ƒOØÓØ $€M�:Ó$ØƒKØƒMØÓØ!Ó!ØƒOØ
ƒIØƒMØÓØƒLØÓØÓØ×r   r  zwake.statuszTEverything a client needs to draw the wake-word state and decide whether to (re)arm.c                  óT   € ] tR tRt$ RtRtR]R&   RtR]R&   RtR]R&   Rt	R]R	&   R
t
R# )ÚWakeFeedParamsi  zQ``pcm`` (or the ``pcm_b64`` alias): base64 int16 mono little-endian, 16 kHz only.Nr   ÚpcmÚpcm_b64r&   ræ   r–   r   )r   r   r   r   r   r  r7   r  ræ   r–   r   r   r   r   r
  r
    s-   ‡ Ù[à€CˆÓØ€GˆZÓØ"€K�Ó"Ø€GˆZ×r   r
  c                  ó"   € ] tR tRt$ R]R&   RtR# )ÚWakeFeedResulti  rR   Úfedr   Nr`   r   r   r   r  r    s   ‡ Ø	‡Ir   r  z	wake.feedzLPush client-captured PCM into the armed detector (mic-less remote backends).N)Fr   Ú
__future__r   Úpydanticr   Úbaser   r   r   r   Úcommonr   r	   r
   Úregistryr   r   r   r9   r>   rK   rQ   rZ   r^   rc   ri   rm   rq   ru   rx   r}   r   r‚   r„   rˆ   rŠ   r�   r’   r˜   rœ   rŸ   r£   r¥   r§   rª   r¬   r¯   r³   r¶   r»   r¾   rÇ   rË   rÎ   rÓ   rÖ   rØ   rÚ   rÞ   ré   rë   rí   rð   rò   rõ   rø   rú   r  r
  r  r   r   r   Ú<module>r     sÇ  ðñõ #å ç 5Ó 5ß =Ñ =Ý ô
�Hô ôG˜ô Gô<˜ô ô"˜ô "ñ& €Ð1Ð:LØlõnô&�ô &ô	˜)ô 	ô	˜=ô 	ñ ÐÐ!5Ð>QØ[õ]ô˜ô ñ €~Ð/Ð8KØBõDô˜]ô ñ ÐÐ$:ÐCVØ[õ]ô	!�mô 	!ôˆiô ô
�fô ñ €|˜O°OØTõVô�}ô ô�vô ñ €}Ð-Ð6FØ\õ^ô˜ô ô˜ô ñ
 €~Ð/Ð8IØ9õ;ô˜Mô ô˜Iô ñ ÐÐ#8ÐAVØdõfô�mô ô�6ô ñ Ð ?¸<Øfõhá €|˜O°LØhõjô˜=ô ñ ÐÐ!5¸lØWõYô˜ô ô˜ô ô
'˜ô 'ñ €~Ð/Ð8IØbõdô˜&ô ô˜&ô ñ ÐÐ 3Ð<OØ`õbô	˜Mô 	ô%˜Fô %ñ ÐÐ"7Ð@UØVõXô˜]ô ô˜Vô ñ ÐÐ#9ÐBXØQõSô"˜Mô "ô˜Fô ñ ÐÐ"7Ð@UØpõrô˜ô ô˜ô ô
˜ô ñ €~Ð/Ð8IØTõVô˜ô ô
˜ô ô˜ô ô˜ô ñ
 €~Ð/Ð8IØZõ\ô�Vô ô
�Vô ñ €{˜>°.ØHõJô�fô ô$�fô $ñ  €|˜O°OØVõXô�Vô ô
�fô ô�_ô ñ
 €{˜>°.ØXõZô˜ô ô�oô ñ €|Ð-°oØOõQô�ô ñ €}Ð.Ð7GØNõPô�vô ô	�iô 	ô�vô ñ* €}Ð-Ð6FØaõcô�Vô ô�_ô ñ €{˜>°.ØY÷[r   