feat(tools): add terminal output transform hook

This commit is contained in:
sjz-ks
2026-04-15 15:31:23 +08:00
committed by Teknium
parent 9d7aac7ed2
commit 2081b71c42
5 changed files with 243 additions and 2 deletions

View File

@@ -54,6 +54,7 @@ logger = logging.getLogger(__name__)
VALID_HOOKS: Set[str] = {
"pre_tool_call",
"post_tool_call",
"transform_terminal_output",
"pre_llm_call",
"post_llm_call",
"pre_api_request",

View File

@@ -245,7 +245,7 @@ TIPS = [
"Three plugin types: general (tools/hooks), memory providers, and context engines.",
"hermes plugins install owner/repo installs plugins directly from GitHub.",
"8 external memory providers available: Honcho, OpenViking, Mem0, Hindsight, and more.",
"Plugin hooks include pre_tool_call, post_tool_call, pre_llm_call, and post_llm_call.",
"Plugin hooks include pre_tool_call, post_tool_call, pre_llm_call, post_llm_call, and transform_terminal_output for foreground terminal output canonicalization.",
# --- Miscellaneous ---
"Prompt caching (Anthropic) reduces costs by reusing cached system prompt prefixes.",
@@ -345,4 +345,3 @@ def get_random_tip(exclude_recent: int = 0) -> str:
return random.choice(TIPS)