mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-24 16:54:43 +00:00
fix: ghost skill P0/P1 mitigation - [SKILL_PRUNED] marker + safety rule
This commit is contained in:
parent
95715dcb03
commit
846a5fd4f0
2 changed files with 13 additions and 2 deletions
|
|
@ -551,7 +551,13 @@ def _summarize_tool_result(tool_name: str, tool_args: str, tool_content: str) ->
|
|||
code_preview += "..."
|
||||
return f"[execute_code] `{code_preview}` ({line_count} lines output)"
|
||||
|
||||
if tool_name in {"skill_view", "skills_list", "skill_manage"}:
|
||||
if tool_name == "skill_view":
|
||||
name = args.get("name", "?")
|
||||
if content_len > 5000:
|
||||
return f"[skill_view] name={name} ({content_len:,} chars) [SKILL_PRUNED: content lost in compression; reload with skill_view before relying on it]"
|
||||
return f"[skill_view] name={name} ({content_len:,} chars)"
|
||||
|
||||
if tool_name in {"skills_list", "skill_manage"}:
|
||||
name = args.get("name", "?")
|
||||
return f"[{tool_name}] name={name} ({content_len:,} chars)"
|
||||
|
||||
|
|
|
|||
|
|
@ -175,7 +175,12 @@ SKILLS_GUIDANCE = (
|
|||
"skill with skill_manage so you can reuse it next time.\n"
|
||||
"When using a skill and finding it outdated, incomplete, or wrong, "
|
||||
"patch it immediately with skill_manage(action='patch') — don't wait to be asked. "
|
||||
"Skills that aren't maintained become liabilities."
|
||||
"Skills that aren't maintained become liabilities.\n"
|
||||
"\n"
|
||||
"## Skill Safety Rule\n"
|
||||
"1. **UNAVAILABLE** — If a skill placeholder contains `[SKILL_PRUNED]`, the skill content was lost in compression and is inaccessible.\n"
|
||||
"2. **RELOAD** — Before performing any action that depends on a skill, re-check its content with `skill_view(name='...')` if it shows `[SKILL_PRUNED]`.\n"
|
||||
"3. **WAIT** — If a skill is loading or was just pruned, wait for the reload confirmation before proceeding."
|
||||
)
|
||||
|
||||
KANBAN_GUIDANCE = (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue