+
    lHàj=
  ã                   óª   € R t ^ RIHtHtHtHtHt ^ RIHtH	t	H
t
 RtRRRRRR	R
RRR	RRR//RR.//tR R lt]P                  ! RR]]]. RRRR7	       R# )zÓFeishu Document Tool -- read document content via Feishu/Lark API.

Provides ``feishu_doc_read`` for reading document content as plain text.
Uses the same lazy-import + BaseRequest pattern as feishu_comment.py.
)Ú_check_feishuÚbuild_requestÚ
get_clientÚraw_bodyÚ
set_client)ÚregistryÚ
tool_errorÚtool_resultz5/open-apis/docx/v1/documents/:document_id/raw_contentÚnameÚfeishu_doc_readÚdescriptionz…Read the full content of a Feishu/Lark document as plain text. Useful when you need more context beyond the quoted text in a comment.Ú
parametersÚtypeÚobjectÚ
propertiesÚ	doc_tokenÚstringz>The document token (from the document URL or comment context).Úrequiredc                ó0   € V ^8„  d   QhR\         R\        /# )é   ÚargsÚreturn)ÚdictÚstr)Úformats   "Ú:/home/ubuntu/.hermes/hermes-agent/tools/feishu_doc_tool.pyÚ__annotate__r   $   s   € ÷ ?ñ ?¤$ð ?´Sñ ?ó    c           
      óð  € V P                  R R4      P                  4       pV'       g   \        R4      # \        4       pVf   \        R4      #  \	        R\
        RV/R7      pTP                  T4      p\        TR	R4      pT^ 8w  d   \        R
T R\        TRR4       24      # \        T4      pTe/    \        RTP                  R/ 4      P                  RR4      R7      # \        TRR4      pT'       dL   \        T\        4      '       d   TP                  RR4      M\        TR\        T4      4      p	\        RT	R7      # \        R4      #   \         d    \        R4      u # i ; i  \         d     L”i ; i)r   Ú zdoc_token is requiredNz=Feishu client not available (not in a Feishu comment context)ÚGETÚdocument_id)Úpathszlark_oapi not installedÚcodezFailed to read document: code=z msg=Úmsgzunknown errorTÚdataÚcontent)Úsuccessr&   z%No content returned from document API)ÚgetÚstripr   r   r   Ú_RAW_CONTENT_URIÚImportErrorÚrequestÚgetattrr   r	   ÚAttributeErrorÚ
isinstancer   r   )
r   Úkwargsr   Úclientr,   Úresponser#   Úbodyr%   r&   s
   &,        r   Ú_handle_feishu_doc_readr4   $   sl  € Ø—‘˜ bÓ)×/Ñ/Ó1€IßÜÐ1Ó2Ð2Ü‹\€FØ‚~ÜÐYÓZÐZð5Ü Ô'7ÀÈyÐ?YÔZˆð
 �~‰~˜gÓ&€HÜ�8˜V TÓ*€DØˆq„yÜÐ:¸4¸&ÀÄgÈhÐX]Ð_nÓFoÐEpÐqÓrÐrä�HÓ€DØÒð	Ü t°T·X±X¸fÀbÓ5I×5MÑ5MÈiÐY[Ó5\Ô]Ð]ô �8˜V TÓ*€DßÜ-7¸¼d×-CÒ-C�$—(‘(˜9 bÔ)ÌÐQUÐW`ÔbeÐfjÓbkÓIlˆÜ 4°Ô9Ð9ÜÐ=Ó>Ð>øô' ô 5ÜÐ3Ó4Ò4ð5ûô ô 	Ùð	ús$   ÁE Â3,E' ÅE$Å#E$Å'E5Å4E5Ú
feishu_docFzRead Feishu document contentu   ðŸ“„)	r
   ÚtoolsetÚschemaÚhandlerÚcheck_fnÚrequires_envÚis_asyncr   ÚemojiN)Ú__doc__Útools.feishu_larkr   r   r   r   r   Útools.registryr   r   r	   r*   ÚFEISHU_DOC_READ_SCHEMAr4   Úregister© r   r   Ú<module>rC      s›   ðñ÷õ ÷ =Ñ <àJÐ ð ÐØð	Qð Ø�ØØØ˜ØÐ_ðð
ð 	�[�Mð	ðÐ õ&?ð> 	× Ò Ø	 LÐ9OÐYpØ¨°eÐIgØ
÷r   