+
    iHàjE+  ã                  ón  € R t ^ RIHt ^ RIt^ RIHt ^ RIHtHtH	t	 ^ RI
Ht ]P                  ! ]4      tRtRtRtR	tR
RRRRR/tRtR
RRRRR/tRtR R ltR R ltR R ltR R ltR R ltR2R R  lltR! R" ltR# R$ ltR%tR&],           R',           t R(R)/R* R+ llt!R, R- lt"R. R/ lt#R0 R1 lt$. R3Ot%R# )4aS  Contextual first-touch onboarding hints, and the entry points of desktop first-run onboarding.

Each hint is shown once per install the *first* time a user hits a behavior
fork, tracked in ``config.yaml`` under ``onboarding.seen.<flag>``. Kept tiny and
dependency-free so both the CLI and gateway can import it.

First-run onboarding (one chat in the default profile, driven by ``setup_beat``) lives in the
siblings: ``onboarding_flow`` (beats and the run record, pure), ``onboarding_text`` (the words),
``onboarding_facts`` (the safe facts) and ``onboarding_record`` (where the run is stored).
)ÚannotationsN)ÚPath)ÚAnyÚMappingÚOptional)Úobserve_tool_resultÚbusy_input_promptÚtool_progress_promptÚopenclaw_residue_cleanupÚprofile_build_offeredÚqueueuÑ   ðŸ’¡ First-time tip â€” I queued your message instead of interrupting. Send `/busy interrupt` to make new messages stop the current task immediately, or `/busy status` to check. This notice won't appear again.Ústeeruù   ðŸ’¡ First-time tip â€” I steered your message into the current run; it will arrive after the next tool call instead of interrupting. Send `/busy interrupt` or `/busy queue` to change this, or `/busy status` to check. This notice won't appear again.Úredirectuù   ðŸ’¡ First-time tip â€” I redirected the current run using your message. Completed work stays in context, and `/stop` still cancels the task. Send `/busy queue` to wait for a separate turn, or `/busy status` to check. This notice won't appear again.u  ðŸ’¡ First-time tip â€” I just interrupted my current task to answer you. Send `/busy queue` to queue follow-ups for after the current task instead, `/busy steer` to inject them mid-run without interrupting, or `/busy status` to check. This notice won't appear again.z¬(tip) Your message was queued for the next turn. Use /busy interrupt to make Enter stop the current run instead, or /busy steer to inject mid-run. This tip only shows once.z¦(tip) Your message was steered into the current run; it arrives after the next tool call. Use /busy interrupt or /busy queue to change this. This tip only shows once.z­(tip) Your correction redirected the current run without discarding completed work. Use /stop to cancel or /busy queue to wait for a separate turn. This tip only shows once.z¨(tip) Your message interrupted the current run. Use /busy queue to queue messages for the next turn instead, or /busy steer to inject mid-run. This tip only shows once.c               ó    € V ^8„  d   QhRRRR/# ©é   ÚmodeÚstrÚreturn© )Úformats   "Ú5/home/ubuntu/.hermes/hermes-agent/agent/onboarding.pyÚ__annotate__r   J   s   € ÷ Qñ Q #ð Q¨#ñ Qó    c                ó6   € \         P                  V \        4      # )zMHint shown the first time a user messages while the agent is busy (markdown).)Ú_BUSY_INPUT_HINTS_GATEWAYÚgetÚ _BUSY_INPUT_HINT_GATEWAY_DEFAULT©r   s   &r   Úbusy_input_hint_gatewayr   J   s   € ä$×(Ñ(¨Ô/OÓPÐPr   c               ó    € V ^8„  d   QhRRRR/# r   r   )r   s   "r   r   r   O   s   € ÷ Iñ I˜cð I cñ Ir   c                ó6   € \         P                  V \        4      # )z=CLI version of the busy-input hint (plain text, no markdown).)Ú_BUSY_INPUT_HINTS_CLIr   Ú_BUSY_INPUT_HINT_CLI_DEFAULTr   s   &r   Úbusy_input_hint_clir$   O   s   € ä ×$Ñ$ TÔ+GÓHÐHr   c               ó   € V ^8„  d   QhRR/# ©r   r   r   r   )r   s   "r   r   r   T   s   € ÷ qñ q Cñ qr   c                 ó   € R # )uÇ   ðŸ’¡ First-time tip â€” that tool took a while and I'm streaming every step. If the progress messages feel noisy, send `/verbose` to cycle modes (all â†’ new â†’ off). This notice won't appear again.r   r   r   r   Útool_progress_hint_gatewayr(   T   s   € ñpr   c               ó   € V ^8„  d   QhRR/# r&   r   )r   s   "r   r   r   Y   s   € ÷ Wñ W ñ Wr   c                 ó   € R # )zŒ(tip) That tool ran for a while. Use /verbose to cycle tool-progress display modes (all -> new -> off -> verbose). This tip only shows once.r   r   r   r   Útool_progress_hint_clir+   Y   s   € ñVr   c               ó   € V ^8„  d   QhRR/# r&   r   )r   s   "r   r   r   ^   s   € ÷ 	ñ 	 3ñ 	r   c                 ó   €  R# )zpBanner shown the first time Hermes finds ``~/.openclaw/``: migrate first, cleanup (which breaks OpenClaw) after.u¬  A legacy OpenClaw directory was detected at ~/.openclaw/.
To port your config, memory, and skills over to Hermes, run `hermes import-agent openclaw` (from the agent-importers plugin: `hermes plugins install agent-importers`).
If you've already migrated and want to archive the old directory, run `hermes claw cleanup` (renames it to ~/.openclaw.pre-migration â€” OpenClaw will stop working after this).
This tip only shows once.r   r   r   r   Úopenclaw_residue_hint_clir.   ^   s   € ð	$ñr   c               ó    € V ^8„  d   QhRRRR/# )r   ÚhomezOptional[Path]r   Úboolr   )r   s   "r   r   r   j   s   € ÷ ñ  .ð ¸Dñ r   c                ó�   €  T ;'       g    \         P                  ! 4       R,          P                  4       #   \         d     R# i ; i)zITrue if ``$HOME/.openclaw`` is a directory (``home`` override for tests).z	.openclawF)r   r0   Úis_dirÚOSError)r0   s   &r   Údetect_openclaw_residuer5   j   s;   € ðØ×$Ð$œŸš›¨Õ3×;Ñ;Ó=Ð=øÜô Úðús   ‚6 ‹*6 ¶AÁAc               ó    € V ^8„  d   QhRRRR/# )r   ÚconfigúMapping[str, Any]r   r   )r   s   "r   r   r   r   s    € ÷ Añ AÐ 1ð AÐ6Gñ Ar   c                óˆ   € \        V \        4      '       d   V P                  R 4      MRp\        V\        4      '       d   V# / # )Ú
onboardingN)Ú
isinstancer   r   )r7   r:   s   & r   Ú_onboarding_sectionr<   r   s5   € Ü-7¸Ä×-HÒ-H�—‘˜LÔ)Èd€JÜ# J´×8Ò8ˆ:Ð@¸bÐ@r   c               ó    € V ^8„  d   QhRRRR/# )r   r7   r8   r   r   r   )r   s   "r   r   r   w   s   € ÷ Wñ WÐ0ð W°Sñ Wr   c                ó°   € \        V 4      P                  R4      p\        V\        4      '       d&   VP	                  4       P                  4       R8X  d   R# R# )zÇ``config.onboarding.profile_build``: ``"off"`` never offers; anything else -> ``"ask"``.

Only governs whether the offer is made; lookups inside the flow are
consented to separately in conversation.
Úprofile_buildÚoffÚask)r<   r   r;   r   ÚstripÚlower)r7   r   s   & r   Úprofile_build_moderD   w   sG   € ô ˜vÓ&×*Ñ*¨?Ó;€DÜ˜t¤S×)Ò)¨d¯j©j«l×.@Ñ.@Ó.BÀeÔ.Kˆ5ÐVÐQVÐVr   a  If this message is itself a real request or task, DO THE TASK FIRST -- call whatever tools it needs -- and only then, in the closing sentences of that same reply, do what this note asks. Never let this note replace or skip work the user actually asked for. z:[System note: This is the user's very first message ever. zzWhat this note asks: briefly introduce yourself and mention that /help shows available commands, in one or two sentences.]Úonboarding_run_activeFc               ó0   € V ^8„  d   QhRRRRRRRRRRR	R
/# )r   r7   r8   Úconfig_pathr   Úsession_history_emptyr1   Úinstall_has_prior_sessionsrE   r   zOptional[str]r   )r   s   "r   r   r   ’   sD   € ÷  ñ  Øð àð ð  ð	 ð
 !%ð ð  ð ð ñ r   c               óH  € V'       d   V'       g	   V'       d   R#  \        V 4      R8X  d?   \        V \        4      '       g)   \        V\        4       \	        4       P                  4       # \        #   \         d'   p\        P                  RT4       \        u Rp?# Rp?ii ; i)a  Return a one-shot sidecar note for the install's first-ever message.

Matches the gateway first-contact path: when ``profile_build`` is ``ask``
and the offer has not been latched yet, return the opt-in profile-build
directive and persist ``onboarding.seen.profile_build_offered``. Otherwise
return the plain intro note. Returns ``None`` when this is not the first
contact (non-empty session history or prior sessions exist on the install).
``onboarding_run_active``: the chat is running first-run onboarding, whose opening replaces this note.
NrA   z5first_contact_turn_note failed, using plain intro: %s)
rD   Úis_seenÚPROFILE_BUILD_FLAGÚ	mark_seenÚprofile_build_directiverB   ÚPLAIN_INTRO_NOTEÚ	ExceptionÚloggerÚdebug)r7   rG   rH   rI   rE   Úes   &&$$$ r   Úfirst_contact_turn_noterT   ’   sx   € ÷" !×$>×BWÙð
 ä˜vÓ&¨%Ô/Ü˜FÔ$6×7Ò7ä�kÔ#5Ô6Ü*Ó,×2Ñ2Ó4Ð4ÜÐøÜô  Ü�‰ÐLÈaÔPÜÕûð ús$   œAA0 Á*A0 Á0B!Á;BÂB!ÂB!c               ó   € V ^8„  d   QhRR/# r&   r   )r   s   "r   r   r   ²   s   € ÷ ñ  ñ r   c                 ó*   € R\         ,           R,           # )zæSystem-note directive appended to the very first message ever.

Short opt-in profile-build flow persisting to the user-profile memory store;
phrased so the agent ASKS before any lookup and never silently reads
connected accounts.
z<

[System note: This is the user's very first message ever. uÆ  What this note asks: after a one-sentence introduction (mention /help shows commands), OFFER â€” do not assume â€” to build a short profile of them so you can be more useful, and explain they can decline or do it later. If and ONLY IF they accept:
  1. Ask for whatever they're comfortable sharing (name, what they do, how they like you to work). Volunteered facts come first.
  2. Before ANY external lookup, say what you intend to look up and get explicit consent for that step. Never read their connected accounts (email, calendar, etc.) silently â€” ask each time.
  3. With consent, you may use web_search to confirm public details (e.g. employer, public profiles) from the data points they gave.
  4. Save each confirmed, durable fact with the memory tool using target="user" â€” keep entries compact and high-signal.
If they decline at any point, stop immediately and continue normally. Keep the whole exchange light and conversational, not an interrogation.])ÚTASK_FIRST_CLAUSEr   r   r   rN   rN   ²   s    € ð	EÜGXõ	Yð1õ	1ðr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r7   r8   Úflagr   r   r1   r   )r   s   "r   r   r   Ì   s'   € ÷ Hñ HÐ%ð H¨Sð H°Tñ Hr   c                óš   € \        V 4      P                  R4      p\        V\        4      '       d   \	        VP                  V4      4      # R# )z>True if the user has already been shown this first-touch hint.ÚseenF)r<   r   r;   r   r1   )r7   rY   r[   s   && r   rK   rK   Ì   s;   € ä˜vÓ&×*Ñ*¨6Ó2€DÜ#-¨d´G×#<Ò#<Œ4�—‘˜“ÓÐGÀ%ÐGr   c               ó$   € V ^8„  d   QhRRRRRR/# )r   rG   r   rY   r   r   r1   r   )r   s   "r   r   r   Ò   s!   € ÷ ñ ˜4ð  sð ¨tñ r   c                óò  €  ^ RI HpHp  T! T 4      p\        TP                  R4      \        4      '       g   / TR&   TR,          P                  R4      p\        T\        4      '       g   / ;qeR,          R&   TP                  T4      RJd   RYa&   T! Y4       R#   \         d"   p\        P                  RT4        Rp?R# Rp?ii ; i  \         d"   p\        P                  RY4        Rp?R# Rp?ii ; i)	zWPersist ``onboarding.seen.<flag> = True`` atomically; False on any error (best-effort).)Úatomic_config_writeÚread_user_config_rawz/onboarding: failed to import config helpers: %sNFr:   r[   Tz&onboarding: failed to mark flag %s: %s)	Úhermes_cli.configr^   r_   rP   rQ   rR   r;   r   Údict)rG   rY   r^   r_   rS   Úcfgr[   s   &&     r   rM   rM   Ò   sÖ   € ðßOðÙ(¨Ó5ˆÜ˜#Ÿ'™' ,Ó/´×6Ò6Ø "ˆC�ÑØ�<Õ ×$Ñ$ VÓ,ˆÜ˜$¤×%Ò%Ø/1Ð1ˆD�|Õ$ VÑ,Ø�8‰8�D‹> Ó%ØˆD‰JÙ Ô1Ùøô ô Ü�‰ÐFÈÔJÝûðûô ô Ü�‰Ð=¸tÔGÝûðús/   ‚B ‹BC
 ÂCÂ&CÃCÃ
C6ÃC1Ã1C6)N)ÚBUSY_INPUT_FLAGÚOPENCLAW_RESIDUE_FLAGrO   rL   ÚTOOL_PROGRESS_FLAGr$   r   r5   rT   rK   rM   r   r.   rN   rD   r+   r(   )&Ú__doc__Ú
__future__r   ÚloggingÚpathlibr   Útypingr   r   r   Úagent.onboarding_recordr   Ú	getLoggerÚ__name__rQ   rc   re   rd   rL   r   r   r"   r#   r   r$   r(   r+   r.   r5   r<   rD   rW   rO   rT   rN   rK   rM   Ú__all__r   r   r   Ú<module>ro      s*  ðñ	õ #ã Ý ß )Ñ )å 7à	×	Ò	˜8Ó	$€ð &€Ø+Ð Ø2Ð Ø,Ð ð ð	ið ð	<ð ð	CðÐ ð"Pð !ð ð	Sð ð	Mð ð	WðÐ ðKð õQõ
Iõ
qõ
Wõ
	÷õAõ
Wðð ð AØõð4õ4ð ð ð #(÷ õ@õ4Hõò.‚r   