
    )j2                     *   U d Z ddlZddlZddlmZmZ ddlZddlZddlm	Z	 ddl
mZmZmZ ddlmZmZmZmZmZmZ ddlmZmZ ddlmZ dd	lmZ dd
lmZ  ej        e           Z! e            Z"e"dz  Z#dZ$dZ%ddddZ& ej'        d          Z( e)h d          Z*da+de,dee,         fdZ-dee,e,f         fdZ. G d de,e	          Z/g dZ0e1e2d<   ddZ3dee,ef         de4fdZ5dee,ef         de4fdZ6d edee,         fd!Z7dee,ef         deee,         ee,         f         fd"Z8dee,ef         dee,ef         fd#Z9	 ddee,ef         d$ee,         dz  deee,ef                  fd%Z:d&e,d'eee,ef                  dee,ef         fd(Z;de4fd)Z<de,fd*Z=	 dd+e,d,ee,e,f         dz  de4fd-Z>dd.d/eee,ef                  d0ee,ef         d,ee,e,f         dz  dee,         fd1Z?de,fd2Z@	 dd3e/d4ee,         d5e,dz  de,dz  fd6ZAde4fd7ZBd8e,deee,ef         e,f         fd9ZCd:edee,         fd;ZDdee,         fd<ZEdee,         fd=ZFde,fd>ZGdde,d?e,de4fd@ZHdAdBdCe4deee,ef                  fdDZIdeee,ef                  deee,ef                  fdEZJddFe,dGe,de,fdHZKdIddJdKedLe,dMe,dNe4dOe,dz  de,fdPZL	 	 	 dde,dQe,dGe,dNe4de,f
dRZMe dSk    ro	  eNdT            eNdU            eNdV            ejO         eK                      ZPePdW         r eNdXePdY          dZ eQePR                    d[g                      d\            eNd]ePR                    d[g                        eNd^           ePd         dd_         D ]MZSeSR                    dF          rd`eSdF          dandbZT eNdceT eSd          ddeSde         ddf          dg           Nn eNdhePdi                      eNdj            ejO         eMdk                    ZPePdW         r eNdlePd                      eNdmePR                    dedn          ddo          dg            eNdp eQePd8                    dq           ePR                    dr          r eNdsePdr                     n eNdhePdi                      eNdt            ejO         eMdkdu                    ZPePdW         rP eNdvePdw                      eNdp eQePd8                    dq            eNdxePd8         ddy          dg           n eNdhePdi                     dzd{d|dFd}d~dig ddZUddd|d}ddd}ddddgddZV ejW        dzdeUd eBd           d ZX ejW        ddeVeXeBd           dS )u  
Skills Tool Module

This module provides tools for listing and viewing skill documents.
Skills are organized as directories containing a SKILL.md file (the main instructions)
and optional supporting files like references, templates, and examples.

Inspired by Anthropic's Claude Skills system with progressive disclosure architecture:
- Metadata (name ≤64 chars, description ≤1024 chars) - shown in skills_list
- Full Instructions - loaded via skill_view when needed
- Linked Files (references, templates) - loaded on demand

Directory Structure:
    skills/
    ├── my-skill/
    │   ├── SKILL.md           # Main instructions (required)
    │   ├── references/        # Supporting documentation
    │   │   ├── api.md
    │   │   └── examples.md
    │   ├── templates/         # Templates for output
    │   │   └── template.md
    │   └── assets/            # Supplementary files (agentskills.io standard)
    └── category/              # Category folder for organization
        └── another-skill/
            └── SKILL.md

SKILL.md Format (YAML Frontmatter, agentskills.io compatible):
    ---
    name: skill-name              # Required, max 64 chars
    description: Brief description # Required, max 1024 chars
    version: 1.0.0                # Optional
    license: MIT                  # Optional (agentskills.io)
    platforms: [macos]            # Optional — restrict to specific OS platforms
                                  #   Valid: macos, linux, windows
                                  #   Omit to load on all platforms (default)
    prerequisites:                # Optional — legacy runtime requirements
      env_vars: [API_KEY]         #   Legacy env var names are normalized into
                                  #   required_environment_variables on load.
      commands: [curl, jq]        #   Command checks remain advisory only.
    compatibility: Requires X     # Optional (agentskills.io)
    metadata:                     # Optional, arbitrary key-value (agentskills.io)
      hermes:
        tags: [fine-tuning, llm]
        related_skills: [peft, lora]
    ---

    # Skill Title

    Full instructions and content here...

Available tools:
- skills_list: List skills with metadata (progressive disclosure tier 1)
- skill_view: Load full skill content (progressive disclosure tier 2-3)

Usage:
    from tools.skills_tool import skills_list, skill_view, check_skills_requirements

    # List all skills (returns metadata only - token efficient)
    result = skills_list()

    # View a skill's main content (loads full instructions)
    content = skill_view("axolotl")

    # View a reference file within a skill (loads linked file)
    content = skill_view("axolotl", "references/dataset-formats.md")
    N)get_hermes_homedisplay_hermes_home)Enum)PathPurePosixPathPureWindowsPath)DictAnyListOptionalSetTuple)registry
tool_error)cfg_get)env_var_enabled)EXCLUDED_SKILL_DIRSskills@   i   darwinlinuxwin32)macosr   windowsz^[A-Za-z_][A-Za-z0-9_]*$>   sshmodaldockerdaytonasingularitynamereturnc                 2   ddl m} t          | t                    sdS |                                 }t          |                                          s5t          |                                          st          |          j        rdS  ||          rdS dS )uD  Return an error if a local skill lookup *name* can escape search roots.

    The skill ``name`` is joined onto each trusted search dir to build the
    on-disk lookup path, so it must stay relative and free of ``..`` segments —
    otherwise ``name="../outside"`` or an absolute path could select a skill
    (and read files) outside the skills directory. Mirrors the ``file_path``
    validation done later via ``tools.path_security``. We also reject Windows
    drive paths (e.g. ``C:\skills``), whose ``:`` would otherwise be misread as
    a plugin namespace separator.
    r   )has_traversal_componentzSkill name must be a string.z?Skill name must be a relative path within the skills directory.z9Skill name cannot contain '..' path traversal components.N)	tools.path_securityr#   
isinstancestrstripr   is_absoluter   drive)r    r#   	candidates      6/home/ubuntu/.hermes/hermes-agent/tools/skills_tool.py_skill_lookup_path_errorr,   o   s     <;;;;;dC   .--

Ii  ,,..Q9%%1133Q 9%%+Q
 QPy)) KJJ4    c                     t                      dz  } i }|                                 s|S |                     d          5 }|D ]}|                                }|rn|                    d          sYd|v rU|                    d          \  }}}|                                                    d          ||                                <   	 ddd           n# 1 swxY w Y   |S )z@Load profile-scoped environment variables from HERMES_HOME/.env.z.envutf-8encoding#="'N)r   existsopenr'   
startswith	partition)env_pathenv_varsflinekey_values          r+   load_envr@      s4     6)H!H?? 		(	( CA 	C 	CD::<<D CDOOC00 CSD[[ $s 3 3Q(-(;(;E(B(B%		CC C C C C C C C C C C C C C C Os    B
CCCc                       e Zd ZdZdZdZdS )SkillReadinessStatus	availablesetup_neededunsupportedN)__name__
__module____qualname__	AVAILABLESETUP_NEEDEDUNSUPPORTED r-   r+   rB   rB      s        I!LKKKr-   rB   )	zignore previous instructionszignore all previouszyou are nowzdisregard yourzforget your instructionsznew instructions:zsystem prompt:z<system>z]]>_INJECTION_PATTERNSc                 
    | a d S N)_secret_capture_callback)callbacks    r+   set_secret_capture_callbackrR      s    'r-   frontmatterc                 $    ddl m}  ||           S )u   Check if a skill is compatible with the current OS platform.

    Delegates to ``agent.skill_utils.skill_matches_platform`` — kept here
    as a public re-export so existing callers don't need updating.
    r   )skill_matches_platform)agent.skill_utilsrU   rS   _impls     r+   rU   rU      s'     BAAAAA5r-   c                 $    ddl m}  ||           S )uX  Check if a skill is relevant to the current runtime environment.

    Delegates to ``agent.skill_utils.skill_matches_environment`` — kept here
    as a public re-export so existing callers don't need updating. This is an
    offer-time relevance gate (kanban/docker/s6), NOT a hard-compatibility gate;
    explicit skill loads bypass it.
    r   )skill_matches_environment)rV   rZ   rW   s     r+   rZ   rZ      s'     EDDDDD5r-   r?   c                 R    | sg S t          | t                    r| g} d | D             S )Nc                 n    g | ]2}t          |                                          #t          |          3S rL   r&   r'   ).0items     r+   
<listcomp>z2_normalize_prerequisite_values.<locals>.<listcomp>   s3    ===$3t99??+<+<=CII===r-   )r%   r&   )r?   s    r+   _normalize_prerequisite_valuesra      s<     	% ==%====r-   c                     |                      d          }|rt          |t                    sg g fS t          |                     d                    t          |                     d                    fS )Nprerequisitesr:   commands)getr%   dictra   )rS   prereqss     r+   _collect_prerequisite_valuesrh      so     ooo..G *Wd33 2v&w{{:'>'>??&w{{:'>'>?? r-   c           	         |                      d          }t          |t                    sd g dS |                     d          }t          |t                    r5|                                r!t          |                                          nd }|                     d          }t          |t                    r|g}t          |t
                    sg }g }|D ]}t          |t                    st          |                     d          pd                                          }|sRt          |                     d          pd|                                           }t          |                     d	          p|                     d
          pd                                          }	||t          |                     dd                    d}
|	r|	|
d	<   |                    |
           ||dS )Nsetup)helpcollect_secretsrk   rl   env_var promptEnter value for provider_urlurlsecretT)rm   ro   rs   )re   r%   rf   r&   r'   listboolappend)rS   rj   	help_textnormalized_helpcollect_secrets_rawrl   r_   rm   ro   rq   entrys              r+   _normalize_setup_metadatar{      s   OOG$$EeT"" 5444		&!!I i%%	*3//*;*;	I   ))$566%t,, 423)400 ! ,.O# & &$%% 	dhhy))/R006688 	TXXh''G+Gg+G+GHHNNPP488N33LtxxL"MMSSUU 488Hd3344!
 !

  	1$0E.!u%%%%  *  r-   legacy_env_varsc                   	 t          |           	|                     d          }t          |t                    r|g}t          |t                    sg }g t                      dt          t          t          f         dd f	fd}|D ]E}t          |t                    r |d|i           %t          |t                    r ||           F	d         D ]_} ||                    d          |                    d          |                    d	          p	                    d
          d           `|t          |           \  }}|D ]} |d|i           S )Nrequired_environment_variablesrz   r!   c                    t          |                     d          p|                     d          pd                                          }|r|v rd S t                              |          sd S |t          |                     d          pd|                                           d}|                     d          p>|                     d          p)|                     d	          p                    d          }t          |t                     r+|                                r|                                |d<   |                     d
          }t          |t                     r+|                                r|                                |d
<   |                     d          rd|d<                       |                               |           d S )Nr    rm   rn   ro   rp   )r    ro   rk   rq   rr   required_foroptionalT)r&   re   r'   _ENV_VAR_NAME_REmatchr%   addrv   )rz   env_name
normalizedrw   r   requiredseenrj   s        r+   _append_requiredz=_get_required_environment_variables.<locals>._append_required  s   uyy((FEIIi,@,@FBGGMMOO 	8t++F%%h// 	F %))H--N1NH1N1NOOUUWW&
 &

 IIf !yy((!yy! yy  	 	 i%% 	3)//*;*; 	3!*!2!2Jvyy00lC(( 	>\-?-?-A-A 	>)5););)=)=J~&99Z   	*%)Jz"
#####r-   r    rl   rm   ro   rq   rk   )r    ro   rk   )
r{   re   r%   rf   rt   setr	   r&   r
   rh   )
rS   r|   required_rawr   r_   r>   rm   r   r   rj   s
          @@@r+   #_get_required_environment_variablesr   
  s    &k22E??#CDDL,%% &$~lD)) %'HUUD$S#X $4 $ $ $ $ $ $ $ $>  # #dC   	fd^,,,dD!! 	#T"""'( 
 
++((8,,00EEIIf4E4E 	
 	
 	
 	
 9+FF" , ,&'*++++Or-   
skill_namemissing_entriesc                 0   |sg dd dS d |D             }t                      r!t          d          s|dt                      dS t          |dd dS d}g }|D ]9}d| i}|                    d          r|d         |d<   |                    d          r|d         |d<   	 t          |d         |d	         |          }nB# t
          $ r5 t                              d
|d          d           d|d         ddd}Y nw xY wt          |t                    o!t          |                    d                    }t          |t                    o!t          |                    d                    }	|r|	sd}|                    |d                    ;||d dS )NF)missing_namessetup_skippedgateway_setup_hintc                     g | ]
}|d          S r    rL   )r^   rz   s     r+   r`   z;_capture_required_environment_variables.<locals>.<listcomp>Z  s    @@@uU6]@@@r-   HERMES_INTERACTIVEr   rk   r   r    ro   z#Secret capture callback failed for Texc_info)success	stored_as	validatedskippedr   r   )_is_gateway_surfacer   _gateway_setup_hintrP   re   	Exceptionloggerwarningr%   rf   ru   rv   )
r   r   r   r   remaining_namesrz   metadatacallback_resultr   r   s
             r+   '_capture_required_environment_variablesr   O  sI     
""&
 
 	
 A@@@@M  
_5I%J%J 
*""5"7"7
 
 	
  '*""&
 
 	
 M!#O  ". ". *-99V 	-$V}HV99^$$ 	=',^'<H^$	6fh OO
  		 		 		NNEeFmEEPT     !"6]"	 OOO			 _d33 
	**9
 9
 _d33 
	**9
 9
  	7 	uV}---- )&"  s   B==<C<;C<c                  `    t          d          rdS ddlm}  t           | d                    S )NHERMES_GATEWAY_SESSIONTr   get_session_envHERMES_SESSION_PLATFORM)r   gateway.session_contextr   ru   r   s    r+   r   r     sC    /00 t777777 9::;;;r-   c                      t          t          j        dd                                                                                    pdS )NTERMINAL_ENVlocal)r&   osgetenvr'   lowerrL   r-   r+   _get_terminal_backend_namer     s9    ry112288::@@BBMgMr-   var_nameenv_snapshotc                     |t                      }| |v r"t          |                    |                     S t          t          j        |                     S rO   )r@   ru   re   r   r   )r   r   s     r+   _is_env_var_persistedr     sR     zz<L$$X..///	(##$$$r-   r   required_env_varscapture_resultc                    t          |d                   }|t                      }g }| D ]I}|d         }|                    d          r ||v st          ||          s|                    |           J|S )Nr   r    r   )r   r@   re   r   rv   )r   r   r   r   	remainingrz   r    s          r+   %_remaining_required_environment_namesr     s     788MzzI" # #V}99Z   	=  (=dL(Q(Q T"""r-   c                  X    	 ddl m}  | S # t          $ r dt                       dcY S w xY w)Nr   *GATEWAY_SECRET_CAPTURE_UNSUPPORTED_MESSAGEziSecure secret entry is not available. Load this skill in the local CLI to be prompted, or add the key to z/.env manually.)gateway.platforms.baser   r   r   r   s    r+   r   r     s~    bUUUUUU99 b b b b  |O  |Q  |Q  b  b  b  	b  	b  	bbs   
 ))readiness_statusmissing
setup_helpc                 z    | t           j        k    r*|rd                    |          nd}d| d}|r| d| S |S d S )N, zrequired prerequisitesz.Setup needed before using this skill: missing . )rB   rJ   join)r   r   r   missing_strnotes        r+   _build_setup_noter     se    
 /<<<,3Qdii(((9QNNNN 	*))Z)))4r-   c                      dS )zOSkills are always available -- the directory is created on first use if needed.TrL   rL   r-   r+   check_skills_requirementsr     s    4r-   contentc                 $    ddl m}  ||           S )u   Parse YAML frontmatter from markdown content.

    Delegates to ``agent.skill_utils.parse_frontmatter`` — kept here
    as a public re-export so existing callers don't need updating.
    r   )parse_frontmatter)rV   r   )r   r   s     r+   _parse_frontmatterr     s'     433333W%%%r-   
skill_pathc                    t           g}	 ddlm} |                     |                       n# t          $ r Y nw xY w|D ]L}	 |                     |          }|j        }t          |          dk    r
|d         c S =# t          $ r Y Iw xY wdS )z
    Extract category from skill path based on directory structure.

    For paths like: ~/.hermes/skills/mlops/axolotl/SKILL.md -> "mlops"
    Also works for external skill dirs configured via skills.external_dirs.
    r   get_external_skills_dirs   N)	
SKILLS_DIRrV   r   extendr   relative_topartslen
ValueError)r   dirs_to_checkr   
skills_dirrel_pathr   s         r+   _get_category_from_pathr     s      LM>>>>>>55778888   #  
	!--j99HNE5zzQQx  	 	 	H	4s   #. 
;;6A==
B
	B
c                 4   | sg S t          | t                    rd | D             S t          |                                           } |                     d          r|                     d          r
| dd         } d |                     d          D             S )uB  
    Parse tags from frontmatter value.

    Handles:
    - Already-parsed list (from yaml.safe_load): [tag1, tag2]
    - String with brackets: "[tag1, tag2]"
    - Comma-separated string: "tag1, tag2"

    Args:
        tags_value: Raw tags value — may be a list or string

    Returns:
        List of tag strings
    c                 T    g | ]%}|t          |                                          &S rL   r]   r^   ts     r+   r`   z_parse_tags.<locals>.<listcomp>  s+    8881a8A888r-   []   c                     g | ]=}|                                 |                                                      d           >S )r4   )r'   r   s     r+   r`   z_parse_tags.<locals>.<listcomp>!  s9    OOOqQWWYYOAGGIIOOE""OOOr-   ,)r%   rt   r&   r'   r7   endswithsplit)
tags_values    r+   _parse_tagsr     s      	 *d## 988
8888 Z&&((JS!! &j&9&9#&>&> &"%
OOJ,<,<S,A,AOOOOr-   c                  "    ddl m}   |             S )u   Load disabled skill names from config.

    Delegates to ``agent.skill_utils.get_disabled_skill_names`` — kept here
    as a public re-export so existing callers don't need updating.
    r   get_disabled_skill_names)rV   r   r   s    r+   _get_disabled_skill_namesr   %  s%     ;:::::##%%%r-   c                  L    	 ddl m}   | d          pdS # t          $ r Y dS w xY w)zResolve the current platform from gateway session context.

    Mirrors the platform-resolution logic in
    ``agent.skill_utils.get_disabled_skill_names`` so that
    ``_is_skill_disabled`` respects ``HERMES_SESSION_PLATFORM``.
    r   r   r   rn   )r   r   r   r   s    r+   _get_session_platformr   /  sQ    ;;;;;;899?R?   rrs    
##platformc                    	 ddl m}  |            }|                    di           }|p!t          j        d          pt                      }|rt          |d|          }|| |v S | |                    dg           v S # t          $ r Y dS w xY w)	a  Check if a skill is disabled in config.

    Resolves the active platform from (in order of precedence):
    1. Explicit ``platform`` argument
    2. ``HERMES_PLATFORM`` environment variable
    3. ``HERMES_SESSION_PLATFORM`` from gateway session context
    r   )load_configr   HERMES_PLATFORMplatform_disabledNdisabledF)hermes_cli.configr   re   r   r   r   r   r   )r    r   r   config
skills_cfgresolved_platformr   s          r+   _is_skill_disabledr   =  s    111111ZZ"--
$_	2C(D(D_H]H_H_ 	1 '
4GIZ [ [ ,000z~~j"5555   uus   A"A= %A= =
B
BF)skip_disabledr   c           	      &   ddl m}m} g }t                      }| rt                      nt	                      }g }t
                                          r|                    t
                     |                     |                       |D ]} ||d          D ]}t          d |j
        D                       r"|j        }		 |                    d          dd         }
t          |
          \  }}t          |          sjt          |          sz|                    d	|	j                  dt$                   }||v r||v r|                    d
d          }|sY|                                                    d          D ]1}|                                }|r|                    d          s|} n2t-          |          t.          k    r|dt.          dz
           dz   }t1          |          }|                    |           |                    |||d           # t4          t6          f$ r'}t8                              d||           Y d}~d}~wt<          $ r)}t8                              d||d           Y d}~d}~ww xY w|S )a^  Recursively find all skills in ~/.hermes/skills/ and external dirs.

    Args:
        skip_disabled: If True, return ALL skills regardless of disabled
            state (used by ``hermes skills`` config UI). Default False
            filters out disabled skills.

    Returns:
        List of skill metadata dicts (name, description, category).
    r   )r   iter_skill_index_filesSKILL.mdc              3   (   K   | ]}|t           v V  d S rO   )_EXCLUDED_SKILL_DIRS)r^   parts     r+   	<genexpr>z#_find_all_skills.<locals>.<genexpr>n  s(      KKD4//KKKKKKr-   r/   r0   Ni  r    descriptionrn   
r2   r   ...)r    r  categoryz Failed to read skill file %s: %sz)Skipping skill at %s: failed to parse: %sTr   )rV   r   r  r   r   r   r5   rv   r   anyr   parent	read_textr   rU   rZ   re   r    MAX_NAME_LENGTHr'   r   r7   r   MAX_DESCRIPTION_LENGTHr   r   UnicodeDecodeErrorPermissionErrorr   debugr   )r   r   r  r   
seen_namesr   dirs_to_scanscan_dirskill_md	skill_dirr   rS   bodyr    r  r<   r
  es                     r+   _find_all_skillsr  S  s    SRRRRRRRFeeJ &Fsuuu+D+F+FH L (J'''0022333  2 2..xDD 1	 1	HKKHNKKKKK  I+",,g,>>uuE$6w$?$?!T-k:: 0== "vy~>>?O?OP:%%8##)oomR@@" " $

 2 24 8 8 " "#zz|| "(<(< "*.K!E{##&<<<"-.I/E/I.I"JU"RK28<<t$$$ #. (      '8   ?1MMM   ?1W[     	[1	f Ms=   ?H#H#,H#H#CH##J4IJ#JJc                 &    t          | d           S )z3Keep every skill listing path ordered the same way.c                 @    |                      d          pd| d         fS )Nr
  rn   r    re   )ss    r+   <lambda>z_sort_skills.<locals>.<lambda>  s     z):):)@b!F)(L r-   )r=   )sorted)r   s    r+   _sort_skillsr!    s    &LLMMMMr-   r
  task_idc                 H    	 t                                           sGt                               dd           t          j        dg g dt                       ddd          S t                      }|st          j        dg g ddd          S  r fd	|D             }t          |          }t          d
 |D                       }t          j        d||t          |          ddd          S # t          $ r(}t          t          |          d          cY d}~S d}~ww xY w)a  
    List all available skills (progressive disclosure tier 1 - minimal metadata).

    Returns only name + description to minimize token usage. Use skill_view() to
    load full content, tags, related files, etc.

    Args:
        category: Optional category filter (e.g., "mlops")
        task_id: Optional task identifier used to probe the active backend

    Returns:
        JSON string with minimal skill info: name, description, category
    T)parentsexist_okz-No skills found. Skills directory created at z/skills/)r   r   
categoriesmessageFensure_asciiz%No skills found in skills/ directory.c                 F    g | ]}|                     d           k    |S r
  r  )r^   r  r
  s     r+   r`   zskills_list.<locals>.<listcomp>  s/    QQQ1553D3D3P3P!3P3P3Pr-   c                 b    h | ],}|                     d           |                     d           -S r+  r  r^   r  s     r+   	<setcomp>zskills_list.<locals>.<setcomp>  s5    HHH1aeeJ6G6GHQUU:HHHr-   z@Use skill_view(name) to see full content, tags, and linked files)r   r   r&  counthintr   N)r   r5   mkdirjsondumpsr   r  r!  r   r   r   r   r&   )r
  r"  
all_skillsr&  r  s   `    r+   skills_listr6    s   31  "" 
	TD999:# "$nObOdOdnnn	  #    &''
 		:# "$F	  #     	RQQQQZQQQJ "*--
 HH
HHH
 

 z$(ZZ  	
 	
 	
 		
  1 1 1#a&&%0000000001s+   AC/ #*C/ A C/ /
D!9DD!D!T
preprocess
session_idr  	namespacebarer8  r9  c          
         ddl m}m} | |            v rt          j        dd| d| dd          S 	 |                     d	          n9# t          $ r,}t          j        dd
| d d| dd          cY d}~S d}~ww xY wi }	 t                    \  }}	n# t          $ r Y nw xY wt          |          s0t          j        dd| d dt          j
        j        dd          S t          fdt          D                       rt                              d|           t!          |                    dd                    }
t%          |
          t&          k    r|
dt&          dz
           dz   }
	 fd |                                |          D             }|r+d                    |          }d| d| d| d|d          d	}nd| d}n# t          $ r d}Y nw xY w}|rI	 ddlm}  || j        |          }n.# t          $ r! t                              d |d!"           Y nw xY wt          j        d!| d |r| | n||
dt          j        j        d#d          S )$z8Read a plugin-provided skill, apply guards, return JSON.r   )_get_disabled_pluginsget_plugin_managerFzPlugin 'z5' is disabled. Re-enable with: hermes plugins enable r   errorr(  r/   r0   Failed to read skill ':': NSkill '$' is not supported on this platform.r   r@  r   c              3   D   K   | ]}|                                 v V  d S rO   )r   )r^   pr   s     r+   r  z&_serve_plugin_skill.<locals>.<genexpr>  s0      
=
=A1
=
=
=
=
=
=r-   zIPlugin skill '%s:%s' contains patterns that may indicate prompt injectionr  rn   r   r	  c                      g | ]
}|k    |S rL   rL   )r^   r  r;  s     r+   r`   z'_serve_plugin_skill.<locals>.<listcomp>+  s*     
 
 
Dyy yyr-   r   z,[Bundle context: This skill is part of the 'z' plugin.
Sibling skills: z..
Use qualified form to invoke siblings (e.g. z).]

z' plugin.]

preprocess_skill_contentr9  z'Could not preprocess plugin skill %s:%sTr   )r   r    r   r  linked_filesr   )hermes_cli.pluginsr=  r>  r3  r4  r  r   r   rU   rB   rK   r?   r  rM   r   r   r&   re   r   r  list_plugin_skillsr   agent.skill_preprocessingrK  r  r  rI   )r  r:  r;  r8  r9  r=  r>  r  parsed_frontmatterr>   r  siblingssib_listbannerrendered_contentrK  r   s     `             @r+   _serve_plugin_skillrV    s7    MLLLLLLL))++++z Iy I I=FI I  	
 	
 	
 		

$$g$66 
 
 
z(Y(Y(YT(Y(YVW(Y(YZZ
 
 
 	
 	
 	
 	
 	
 	

 *, 27 ; ;AA    ""455 
z Y9YYtYYY$8$D$J 
 
 
 
 	
 
=
=
=
=)<
=
=
=== 
Wt	
 	
 	

 (,,]B??@@K
;000!">$:Q$>">?%G
 
 
 
))++>>yII
 
 
  	^yy**H`y ` `#+` `?H` `KSTU;` ` ` F ^I]]]F     	JJJJJJ77%     
  	 	 	LL99dUY      	
 : ))4))8>T&4"2444DT&  4 > D	
 	
 
 
 
 
sT   A 
B!A?9B?B
B 
B*)B*9AG G%$G%-H (H21H2	file_pathc                 &   NOPQRST 	 t          |           }|rt          j        d|ddd          S d}d| v r3ddlm}m} dd	lm}m}	  ||           \  Q}
 |Q          s t          j        dd
Q d|  ddd          S  |              |	            }|	                    |           }|]|
                                s5|                    |            t          j        dd|  d| ddd          S t          |Q|
||          S |                    Q          }|rBt          j        dd|
 dQ dQfd|D             dQ dt          |           ddd          S |
rQ d|
 }ddlm} |r+t          |          }|rt          j        d|ddd          S g }t           
                                r|                    t                      |                     |                       |st          j        dddd          S dTd}ddlm} g Ot)                      Sdt*          t,                   dt,          ddfOSfd }|D ]}|| z  }|                                r'|d!z  
                                r |||d!z             nF|                    d"          
                                r |d|                    d"                     |r||z  }|                                r'|d!z  
                                r |||d!z             nF|                    d"          
                                r |d|                    d"                      ||d!          D ]}|j        j        | k    r ||j        |           $	 |                    d#$          }t9          |          \  }}n# t:          $ r i }Y nw xY w|                    d%          | k    r ||j        |           |                    |  d"          D ]}|j        d!k    r |d|           t          O          d&k    rd' OD             }tA          j!        tD                    #                    d(| t          O          d)$                    |                     t          j        dd*|  d+t          O           d,|d-d.d          S OrOd         \  T}|r|
                                sLd/ tK          tM                                dd0         D             }t          j        dd|  d1|d2dd          S 	 |                    d#$          }n6# t:          $ r)}t          j        dd3|  d+| dd          cY d}~S d}~ww xY wd4}t           '                                g}	 |                    d5 |d&d         D                        n# t:          $ r Y nw xY w|D ]=} 	 |'                                (                    |            d} n# tR          $ r Y :w xY w|*                                NtW          Nfd6tX          D                       }!|s|!rtg }"|r|"                    d7|            |!r|"                    d8           tA          j!        tD                    #                    d9| d)$                    |"                     i }#	 t9          |          \  }#}n# t:          $ r i }#Y nw xY wt[          |#          s-t          j        dd|  d:t\          j/        j0        d;d          S |#                    d%|j        j                  }$tc          |$          rt          j        dd|$ d<dd          S |rTrdd=l2m3}%m4}&  |&|          rt          j        dd>d?dd          S T|z  }' |%|'T          }(|(rt          j        d|(d?dd          S |'
                                sg g g g g d@})T                    dA          D ]/}*|*5                                r|*j        d!k    rtm          |*(                    T                    }+|+7                    dB          r|)dC                             |+           w|+7                    dD          r|)dE                             |+           |+7                    dF          r|)dG                             |+           |+7                    dH          r|)dI                             |+           |*j8        dJv r|)dK                             |+           1dL |)9                                D             })t          j        ddM| dN|  d|)dOdPd          S 	 |'                    d#$          }nO# tt          $ rB t          j        d4| |dQ|'j         dR|';                                j<         dSd4dTd          cY S w xY wt          j        d4| |||'j8        dUd          S |#},g }-g }.g }/g }0TrXTdCz  }1|1
                                r!TfdV|1=                    dW          D             }-TdEz  }2|2
                                r9dXD ]6}3|.                    TfdY|2                    |3          D                        7TdGz  }4|4
                                ra|4                    dA          D ]K}*|*5                                r5|/                    tm          |*(                    T                               LTdIz  }5|5
                                r9dZD ]6}3|0                    Tfd[|5=                    |3          D                        7i }6|,                    d\          }7t}          |7t~                    r|7                    d]i           pi }6t          |6                    d^          p|,                    d^d_                    }8t          |6                    d`          p|,                    d`d_                    }9i }:|-r|-|:dC<   |.r|.|:dE<   |/r|/|:dG<   |0r|0|:dI<   	 tm          |(                    t                               };nO# tR          $ rB |j        j        r,tm          |(                    |j        j                            n|j        };Y nw xY w|,                    d%Ts|jA        nTj                  }<t          |,          \  }=}t          |,|=          }>t                      }?t                      PPfda|>D             }@t          |<|@          }A|@rt                      Pt          |>|APb          Rt          R          }BRfdc|>D             }C|Cr@	 dddlImJ}D  |D|C           n-# t:          $ r  t          L                    de|<d4f           Y nw xY w|,                    dgg           }Et}          |Et                    sg }Eg }F|ErD	 ddhlNmO}G  |G|E          }F|Frd4}Bn-# t:          $ r  t          L                    di|<d4f           Y nw xY w|}H|rC	 ddjlPmQ}I  |I|T|k          }Hn-# t:          $ r  t          L                    dl|<d4f           Y nw xY wi dmd4d%|<dn|,                    dnd_          d^|8d`|9do|Hdp|;dqTrtm          T          nddr|:r|:ndds|:rdtnddu|>dvg dwRdx|Fdyg dz|Bd{|Ad{         d||Brt\          jR        j0        nt\          jS        j0        i}Jt          d} |>D             d          }K|Kr|K|Jd~<   |Ad         r|Ad         |Jd<   |Br`d RD             d |FD             z   }Lt          t\          jR        |L|K          }M|?t          v r|Mr|M d|?W                                 d}M|Mr|M|Jd<   |,                    d          r|,d         |Jd<   t}          |7t~                    r|7|Jd\<   t          j        |Jd          S # t:          $ r(}t          tm          |          d          cY d}~S d}~ww xY w)a  
    View the content of a skill or a specific file within a skill directory.

    Args:
        name: Name or path of the skill (e.g., "axolotl" or "03-fine-tuning/axolotl").
            Qualified names like "plugin:skill" resolve to plugin-provided skills.
        file_path: Optional path to a specific file within the skill (e.g., "references/api.md")
        task_id: Optional task identifier used to probe the active backend
        preprocess: Apply configured SKILL.md template and inline shell rendering
            to main skill content. Internal slash/preload callers disable this
            because they render the skill message themselves.

    Returns:
        JSON string with skill content or error message
    Fz>Use a skill name or relative path within the skills directory.)r   r@  r0  r(  NrB  r   )is_valid_namespaceparse_qualified_name)discover_pluginsr>  zInvalid namespace 'z' in 'z('. Namespaces must match [a-zA-Z0-9_-]+.r?  rD  z' file no longer exists at uT   . The registry entry has been cleaned up — try again after the plugin is reloaded.r7  z' not found in plugin 'z'.c                     g | ]	} d | 
S )rB  rL   )r^   r  r:  s     r+   r`   zskill_view.<locals>.<listcomp>  s'    ,S,S,SA	-?-?A-?-?,S,S,Sr-   zThe 'z' plugin provides z
 skill(s).)r   r@  available_skillsr0  /r   zISkills directory does not exist yet. It will be created on first install.)r  sdsmdr!   c                     	 |                                 }n# t          $ r |}Y nw xY w|v rd S                     |                               | |f           d S rO   )resolver   r   rv   )r_  r`  r=   
candidatesseen_mds      r+   _recordzskill_view.<locals>._record  sy    kkmm   g~~KKr3i(((((s    ''r  .mdr/   r0   r    r   c                 2    g | ]\  }}t          |          S rL   )r&   )r^   r>   r`  s      r+   r`   zskill_view.<locals>.<listcomp>!  s"    777&!SSXX777r-   u3   Skill name collision for '%s': %d candidates — %sz; zAmbiguous skill name 'rC  u    skills match across your local skills dir and external_dirs. Refusing to guess — load one explicitly by its categorized path.zPass the full relative path instead of the bare name (e.g., 'category/skill-name'), or rename one of the colliding skills so each name is unique.)r   r@  matchesr0  c                     g | ]
}|d          S r   rL   r-  s     r+   r`   zskill_view.<locals>.<listcomp><  s    RRRq6RRRr-      z' not found.z+Use skills_list to see all available skillsrA  Tc              3   >   K   | ]}|                                 V  d S rO   )rb  )r^   ds     r+   r  zskill_view.<locals>.<genexpr>X  s*       C C C C C C C Cr-   c              3       K   | ]}|v V  	d S rO   rL   )r^   rH  _content_lowers     r+   r  zskill_view.<locals>.<genexpr>f  s(      !S!S!!~"5!S!S!S!S!S!Sr-   zHskill file is outside the trusted skills directory (~/.hermes/skills/): zBskill content contains patterns that may indicate prompt injectionz#Skill security warning for '%s': %srE  rF  zT' is disabled. Enable it with `hermes skills` or inspect the files directly on disk.)validate_within_dirr#   z%Path traversal ('..') is not allowed.z.Use a relative path within the skill directory)
references	templatesassetsscriptsother*zreferences/rp  z
templates/rq  zassets/rr  zscripts/rs  >   .py.sh.tex.yml.json.yamlrf  rt  c                     i | ]
\  }}|||S rL   rL   )r^   kvs      r+   
<dictcomp>zskill_view.<locals>.<dictcomp>  s#    "Q"Q"QDAqq"Q1a"Q"Q"Qr-   zFile 'z' not found in skill 'z0Use one of the available file paths listed above)r   r@  available_filesr0  z[Binary file: z, size: z bytes])r   r    filer   	is_binary)r   r    r  r   	file_typec                 T    g | ]$}t          |                                        %S rL   r&   r   r^   r;   r  s     r+   r`   zskill_view.<locals>.<listcomp>  s:     # # #67Ci0011# # #r-   *.md)r  *.pyz*.yamlz*.ymlz*.jsonz*.tex*.shc                 T    g | ]$}t          |                                        %S rL   r  r  s     r+   r`   zskill_view.<locals>.<listcomp>  s=        !  i 8 899  r-   )r  r  z*.bashz*.jsz*.tsz*.rbc                 T    g | ]$}t          |                                        %S rL   r  r  s     r+   r`   zskill_view.<locals>.<listcomp>   s-    VVV1Q]]95566VVVr-   r   hermestagsrn   related_skillsc                 j    g | ]/}|                     d           t          |d                   -|0S )r   r    )re   r   )r^   r  r   s     r+   r`   zskill_view.<locals>.<listcomp>H  sS     %
 %
 %
55$$%
 *!F)\BB	%
%
 %
 %
r-   r   c                 4    g | ]}|d          v|d          S r   rL   )r^   r  remaining_missing_required_envss     r+   r`   zskill_view.<locals>.<listcomp>^  s7     
 
 
y ??? fI???r-   )register_env_passthroughz/Could not register env passthrough for skill %sr   required_credential_files)register_credential_filesz0Could not register credential files for skill %srJ  rL  z)Could not preprocess skill content for %sr   r  r   pathr  rM  
usage_hintzzTo view linked files, call skill_view(name, file_path) where file_path is e.g. 'references/api.md' or 'assets/config.yaml'r~   required_commands&missing_required_environment_variablesmissing_credential_filesmissing_required_commandsrD   r   r   c              3   P   K   | ]!}|                     d           |d          V  "dS )rk   Nr  )r^   r  s     r+   r  zskill_view.<locals>.<genexpr>  s5      QQ155==Q1V9QQQQQQr-   r   r   c                     g | ]}d | S )zenv $rL   )r^   r   s     r+   r`   zskill_view.<locals>.<listcomp>  s.       '/"""  r-   c                     g | ]}d | S )zfile rL   )r^   r  s     r+   r`   zskill_view.<locals>.<listcomp>  s+       #'  r-   r   zW-backed skills need these requirements available inside the remote environment as well.
setup_notecompatibilityr1  )Yr,   r3  r4  rV   rY  rZ  rN  r[  r>  find_plugin_skillr5   remove_plugin_skillrV  rO  r   r   r   rv   r   r  r   r   r   is_dirwith_suffixr  r    r  r   r   re   rgloblogging	getLoggerrF   r   r   r!  r  rb  r   r   r   r  rM   rU   rB   rK   r?   r   r$   ro  r#   is_filer&   r7   suffixitemsr  statst_sizeglobr%   rf   r   stemrh   r   r   r@   r   r   ru   tools.env_passthroughr  r   r  rt   tools.credential_filesr  rP  rK  rJ   rI   nextr   _REMOTE_ENV_BACKENDSupperr   )Ur    rW  r"  r8  lookup_errorlocal_category_namerY  rZ  r[  r>  r;  pmplugin_skill_mdrC   r   all_dirsr  r  re  
search_dirdirect_pathcategorized_pathfound_skill_md
fm_contentfmr>   found_mdpathsr   r  _outside_skills_dir_trusted_dirs_td_injection_detected	_warningsrQ  resolved_namero  r#   target_filetraversal_errorr  r;   relrS   reference_filestemplate_filesasset_filesscript_filesreferences_dirtemplates_dirext
assets_dirscripts_dirhermes_metar   r  r  rM  r   r   r|   r   backendmissing_required_env_varsr   rD   available_env_namesr  required_cred_files_rawmissing_cred_filesr  rU  rK  resultr   missing_itemsr  rn  rc  r   r:  r  rd  r  sU                                                                                 @@@@@@@r+   
skill_viewr  W  s|   *`	1
 055 	:$)\ 
 #    +/ $;;RRRRRRRROOOOOOOO22488OIt%%i00 
z#(E) E E4 E E E  "'	 	 	 	 ##%%B 22488O*&--// **4000:',!7$ !7 !7#2!7 !7 !7  &+    +#)&    --i88I 	z#(!U4!U!U	!U!U!U,S,S,S,S,S,S,S _	 _ _S^^ _ _ _	  "'     <)2&;&;T&;&;#>>>>>>  
	34GHHL z#(!- ` 
 "'     	(OOJ'''0022333 	:$h  #    	 	=<<<<<8:
uu	) 	)T 	)d 	) 	) 	) 	) 	) 	) 	) # '	, '	,J %t+K!!## >z)A(I(I(K(K >[:%=>>>>((//6688 >k55e<<===
 # G#-0C#C #**,, G2BZ2O1W1W1Y1Y GG,.>.KLLLL%11%88??AA GGD"2">">u"E"EFFF #9"8Z"P"P 
C 
C!(-55GN1>BBB!/!9!97!9!K!KJ.z::EB    BBB66&>>T))GN1>BBB ',,\\\:: , ,=J..GD(+++, z??Q77J777Eh''//Ec*ootyy'7'7   :$] ] ]#j// ] ] ]  %C  #   $  	0",Q-Ix 
	x00 
	RRL9I9K9K,L,LSbS,QRRRI:$9t999(1I	  #   		(('(::GG 	 	 	:$BdBBqBB  #        	 ##++--.	   C Chqrrl C C CCCCC 	 	 	D	  	 	C  ""..s333&+#   
 !!!S!S!S!S?R!S!S!SSS 	s"5 	sI" x  !vlt!v!vwww" g  !efffh''//0UW[]a]f]fgp]q]qrrr-/	$$6w$?$?! 	$ 	$ 	$!#	$ &&899 	:$QtQQQ(<(H(N 
 #    +..vx7KLLm,, 
	:$`- ` ` `  #	 	 	 	  b	 b	XXXXXXXX '&y11 z#(!H P 
 "'    $i/K 21+yIIO z#(!0 P 
 "'    %%'' , #%!# !# # #-- A AAyy{{ Aqv';';!!--	":":;;>>-88 A+L9@@EEEE ^^L99 A+K8??DDDD ^^I66 A+H5<<SAAAA ^^J77 A+I6==cBBBBX *   ,G4;;C@@@ #R"QO4I4I4K4K"Q"Q"Qz#(!S)!S!S4!S!S!S+: R	  "'   %///AA%   z#' $ )#qK4D#q#qkN^N^N`N`Nh#q#q#q%)  "'	 	 	 	 	 	 :# %&!,!3  #	 	 	 	 )  %	&5N$$&& # # # #;I;N;Nv;V;V# # # &3M##%%   C #))   %2%8%8%=%=      #X-J  "" J#))#.. J JAyy{{ J#**3q}}Y/G/G+H+HIII#i/K!!## M  C ''VVVV@P@PQT@U@UVVV    ??:..h%% 	;",,x44:K;??622Qkoofb6Q6QRR$OO,--VAQSU1V1V
 

  	9)8L& 	7(6L% 	1%0L" 	3&2L#	v8//
;;<<HH 	v 	v 	vLTOLbus8//0FGGHHHhphuHHH	v !__FHMM	
 

 :+FF?
 
 -..zz%
 %
 %
 %
&%
 %
 %
! A%
 
 % 	&#::L*O%+
 +
 +
'
 ;<<

 
 
 
&
 
 

  
		JJJJJJ(()<====   E!       #.//2Mr"R"R1488 	)&(##%" 	LLLLLL%>%>?V%W%W"% (#'L   F!       # 	NNNNNN#;#;&$ $ $  
    ?VZ      

t
J
 ;??="==
 D	

 n
 '
 H
 9>Y$
 LBLLd
   W  W
 -.?
  
 56U
  '(:!
" (#
$ L%
& ^O<'
( !6 4 A G G%/5-
 
2 QQ.?QQQSWXX
 	.#-F< ./ 	P+9:N+OF'( 	2 3R   +=  M
 +$1 J
 ...:. *  V  VW]]__  V  V  V
 2'1|$ ???++ 	C&1/&BF?#h%% 	*!)F:z&u5555 1 1 1#a&&%0000000001s  * A A3 8 A %; !A, E? (N76 7O OC> A. 5U  
U?U:4U?5 :U?? 'W  
W W )X 
X XB1 [  [(% '[((> 'A 32 &, F" 7f  A	g g# >H7 6'q  A	r*' )r**C /v   'v+( *v++4  w6 5 6'x  x   (x= < ='y'$ &y''E6 
A@(A@@A@@A@__main__u   🎯 Skills Tool Testz<============================================================u   
📋 Listing all skills:r   zFound r/  z skills in r&  z categorieszCategories: z
First 10 skills:
   r   z] rn   u     • z: r  <   r	  zError: r@  u   
📖 Viewing skill 'axolotl':axolotlzName: zDescription: zN/Ad   zContent length: z charsrM  zLinked files: uE   
📄 Viewing reference file 'axolotl/references/dataset-formats.md':zreferences/dataset-formats.mdzFile: r  z	Preview:    r6  zVList available skills (name + description). Use skill_view(name) to load full content.objectstringz*Optional category filter to narrow results)typer  )r  
propertiesr   )r    r  
parametersr  ah  Skills allow for loading information about specific tasks and workflows, as well as scripts and templates. Load a skill's full content or access its linked files (references, templates, scripts). First call returns SKILL.md content plus a 'linked_files' dict showing available references/templates/scripts. To access those, call again with file_path parameter.zThe skill name (use skills_list to see available skills). For plugin-provided skills, use the qualified form 'plugin:skill' (e.g. 'superpowers:writing-plans').zOPTIONAL: Path to a linked file within the skill (e.g., 'references/api.md', 'templates/config.yaml', 'scripts/validate.py'). Omit to get the main SKILL.md content.)r    rW  c                 p    t          |                     d          |                    d                    S )Nr
  r"  )r
  r"  )r6  re   )argskws     r+   r  r  &  s2    {*%%rvvi/@/@      r-   u   📚)r    toolsetschemahandlercheck_fnemojic                    |                      dd          }t          ||                      d          |                     d                    }	 t          j        |          }t	          |t
                    rf|                     d          rQ|                     d          p|}|r8ddlm}m}  |t          |                      |t          |                     n# t          $ r Y nw xY w|S )	ztInvoke skill_view, then bump view_count on success. Best-effort: a
    telemetry failure never breaks the tool call.r    rn   rW  r"  )rW  r"  r   r   )bump_use	bump_view)re   r  r3  loadsr%   rf   tools.skill_usager  r  r&   r   )r  r  r    r  parsedresolvedr  r  s           r+   _skill_view_with_bumpr  ,  s    88FBD--rvvi7H7H  FF##fd## 
	(

9(=(= 
	( zz&))1TH (AAAAAAAA	#h--((( X'''   Ms   BC   
C-,C-)r!   NrO   )NN)NNT)Y__doc__r3  r  hermes_constantsr   r   r   reenumr   pathlibr   r   r   typingr	   r
   r   r   r   r   tools.registryr   r   r   r   utilsr   rV   r   r  r  rF   r   HERMES_HOMEr   r  r  _PLATFORM_MAPcompiler   	frozensetr  rP   r&   r,   r@   rB   rM   rt   __annotations__rR   ru   rU   rZ   ra   rh   r{   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r!  r6  rV  r  printr  r  r   re   skillcatSKILLS_LIST_SCHEMASKILL_VIEW_SCHEMAregisterr  rL   r-   r+   <module>r	     s<  A A AF   A A A A A A A A 				 				       8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 / / / / / / / / % % % % % % ! ! ! ! ! ! I I I I I I		8	$	$ o8#
  
  
 2:9::  y888     3 8C=    6$sCx.              3      
 
 
 T 
 
 
( ( ( (
S#X 4    	4S> 	d 	 	 	 	># >$s) > > > >	c3h	
49d3i 	 	 	 	*4S> *d38n * * * *^ )-B Bc3hB#Y%B 
$sCx.B B B BJKK$sCx.)K 
#s(^K K K K\<T < < < <NC N N N N
 :>% %%!%c3h$!6%	% % % % +/	  DcN+cN sCx.4'	
 
#Y   (bS b b b b " *#Y d
 	4Z	   4    
& &d38nc.A(B & & & & #    4PtCy P P P P>&3s8 & & & &s     S C 4    , /4 M M Mt MT#s(^8L M M M M`Nd38n- N$tCH~2F N N N N
A1 A1# A1s A1c A1 A1 A1 A1X !e e eee e
 e d
e 	e e e eT 	u	1 u	1
u	1u	1 u	1 	u	1
 	u	1 u	1 u	1 u	1t z	E
!"""	E(OOO 
E
&'''TZ&&Fi 
+_VG___VZZb5Q5Q1R1R___	
 	
 	
 	;VZZb99;;<<<"###H%crc* 	Q 	QE/4yy/D/DL+eJ'++++"CEO3OfOO}1Ecrc1JOOOPPPP	Q 	)w))*** 
E
+,,,TZ

9--..Fi +'vf~''(((Ifjj>>ttDIIIJJJ?VI%6!7!7???@@@::n%% 	=E;6.#9;;<<<)w))*** 
E
RSSSTZ

9.MNNOOFi +'vf~''(((?VI%6!7!7???@@@6&+DSD16667777)w))*** k K 
 	 	     ~ !  A 
 !  F 	
 	
 H   &  	  '
	 	 	 	  2  	!&
     r-   