All plugins

fail-shrink

When a pytest, jest, vitest, cargo test, go test, tsc, ruff, or eslint summary line shows, the result is a short block with that place and the same exit code. No summary line, or a poll with only output_preview, stays as Hermes returned it. Disclosure — rewrites long failing pytest/jest/vitest/cargo/go test/tsc/ruff/eslint terminal output into a short block and saves the full (ANSI-stripped, redacted) log under plugin-data/fail-shrink, keeping the newest 40 logs (32 MB) until the plugin data is deleted; the fail_full tool reads those saved logs only, makes no network calls and runs nothing, and is enabled on every platform, so anyone who can message the agent can ask it to read them.

TakeshiTGALToolsv0.1.0Updated 7 days ago

About

When a pytest, jest, vitest, cargo test, go test, tsc, ruff, or eslint summary line shows, the result is a short block with that place and the same exit code. No summary line, or a poll with only output_preview, stays as Hermes returned it. Disclosure — rewrites long failing pytest/jest/vitest/cargo/go test/tsc/ruff/eslint terminal output into a short block and saves the full (ANSI-stripped, redacted) log under plugin-data/fail-shrink, keeping the newest 40 logs (32 MB) until the plugin data is deleted; the fail_full tool reads those saved logs only, makes no network calls and runs nothing, and is enabled on every platform, so anyone who can message the agent can ask it to read them.

When a pytest, Jest, Vitest, cargo, Go, tsc, Ruff, or ESLint command fails, the terminal output becomes a short block only when that tool's own summary line is in the text. The block names the place on that line and one rerun command. The exit code stays on the result, so Hermes still counts the command as a failure. llmslim compresses old tool output. tool-slimmer cuts tool schemas. This plugin keeps the summary place of a test or a build. When that summary line is missing, the result stays as Hermes returned it.

A process_manage result is shrunk when the output Hermes passed contains that summary line and the result has status exited with a non-zero exit code. The other fields on that result stay. Hermes 0.22.2 keeps the last 2000 characters of a finished process in output. A poll result has output_preview and no output field, so a poll stays whole. The pytest log in fixtures/pytest.log is 15058 characters. Its last 2000 characters contain no summary line, so that completion stays whole. A tail that contains the summary line is shrunk to the node id or the file written on that line. Pytest uses each FAILED or ERROR row in the last short test summary info section. The stats line closes the section and adds no line number. When pytest cuts the message off a wide summary row, the block uses the message on the E line in that test's failure section, and the offset points at that E line. A short summary row with no message stays without one. Jest uses a FAIL row and the bullet under it. Vitest uses a FAIL row. Cargo uses each name under the last failures: list before test result: FAILED. Go uses each column-0 --- FAIL: row before the FAIL package line. tsc, Ruff, and ESLint use a complete diagnostic row, and that row includes the file and the line. A printed path, a traceback frame, and a helper frame stay out of the block. A pytest node id that contains .. keeps that path, and the rerun line is omitted. A citation counts only when its whole summary line is in the text. A tail that starts inside that line does not turn the remaining digits into a line number. When the short block shows 8 of a longer list, the other files are named on an also line and the rerun line covers every parsed name.

The full output is saved under this profile. The short block prints the path and the byte offset of the first failure. When pytest cut the message off a wide summary row, that offset is the E line in that test's failure section. fail_full reads that file from the offset you pass. fail_full does not open an approval card.

A passing command stays as Hermes returned it. A short result stays as Hermes returned it. A failure this plugin cannot classify stays as Hermes returned it. On a turn where you asked to see the whole log, the result stays as Hermes returned it. Phrases for that request include show the full log and show me everything. Fullwidth letters and an ideographic space still count as that request. The same request in Japanese, such as 全部見せて, is accepted on that turn.

The rerun line is built by a rule from the command that ran and the names in the log. The runner name matches in any letter case, so Pytest still produces a rerun line. The plugin does not ask a model to write it. A shell pipeline, a redirect, a substitution, or a quote that does not close leaves the summary place in the block and omits the rerun line.

json_shape is off. Set it to the boolean true in this plugin's settings when you also want a large JSON tool result reduced to a type sketch, the first item, and a path to the saved text. The string "true" does not turn it on. Terminal results and process_manage results are never shaped that way. A result Hermes already marks as a failure keeps the fields that carry that mark, and the sketch goes in output. A list whose text carries that mark stays whole. A success becomes the plain sketch.

Hermes strips ANSI color and redacts secrets before this hook runs. A long terminal result may already be cut at the head and the tail. The saved file is that text. This plugin does not read a Hermes spill file. The short block is the failing part. It is not a claim that the rest of the suite passed.

Measured on the captured logs

The files in fixtures/ are failure logs from the real tools below. Machine paths in those logs were replaced with a short placeholder before the files were stored. The failure text and the counts are the text in those files. The short block cites the summary row in that text.

logtoolcommandexit
pytestpytest 9.1.1python -m pytest -v tests/test_auth.py1
jestjestnpx jest --colors=false auth.test.js1
vitestvitest 3.2.4npx vitest run --reporter=verbose token.test.js1
cargocargocargo test --offline -- --test-threads=1101
gogogo test -count=1 .1
tsctscnpx tsc --pretty false --noEmit -p tsconfig.json2
ruffruffruff check --color never auth.py1
eslinteslintnpx eslint --no-color lint-me.js1

pytest.log contains the text pytest-9.1.1. vitest.log contains the text v3.2.4. The jest, cargo, go, tsc, ruff, and eslint logs do not contain a version string, so those rows do not name a version.

Characters are Unicode code points in the decoded log. Tokens use the tiktoken encoding o200k_base. The same fixture bytes were passed to rtk 1.1.0 as rtk pipe -f <filter>. The rtk cells count that stdout. rtk's own byte-divided-by-four figure is not in this table. rtk pipe has filters named pytest, vitest, cargo-test, go-test, tsc, and ruff-check. It has no jest filter and no eslint filter, so those two rtk cells are unmeasured.

The fail-shrink character column counts the short block in the output field. The count includes the saved-log path and the trailing newline. The directory prefix in this count is 19 characters. The file name is 40 characters. Three runs kept the same character count. The fail-shrink token column would be the tiktoken o200k_base count of that same block. That count was not retaken, so the cells say unmeasured.

lograw charactersraw tokensrtk charactersrtk tokensfail-shrink charactersfail-shrink tokens
pytest150584026479135300unmeasured
jest42771217unmeasuredunmeasured176unmeasured
vitest476215107225326unmeasured
cargo44691236483156186unmeasured
go1615338236168unmeasured
tsc91842762747622571142unmeasured
ruff2865491642066705589unmeasured
eslint62922018unmeasuredunmeasured789unmeasured

A passing pytest log in fixtures/pytest-ok.log is 98 characters. The hook leaves it unchanged.

Thirty seconds

hermes on PATH is Hermes 0.22.2. The scene follows symlinks and uses the python beside the real hermes file. That interpreter has pytest. This scene does not call a model. It calls handle_function_call in model_tools.py, which is the dispatcher hermes chat uses after a tool call. If that python has no pytest module, the failing command's output stays whole.

The registered hooks are pre_llm_call and transform_tool_result. pre_llm_call records whether you asked to see the whole log on this turn and adds no text. transform_tool_result replaces the output field of a classified failure.

set -eu
SCENE="$(mktemp -d)"
export HERMES_HOME="$SCENE/hermes"
mkdir -p "$HERMES_HOME"
hermes plugins install --no-enable "file://$PWD"
hermes plugins enable fail-shrink
cat > "$HERMES_HOME/config.yaml" << 'EOF'
_config_version: 50
plugins:
  enabled:
    - fail-shrink
approvals:
  mode: off
EOF
HERMES_BIN="$(command -v hermes)"
while [ -L "$HERMES_BIN" ]; do
  _dest="$(readlink "$HERMES_BIN")"
  case "$_dest" in
    /*) HERMES_BIN="$_dest" ;;
    *) HERMES_BIN="$(dirname "$HERMES_BIN")/$_dest" ;;
  esac
done
PY="$(dirname "$HERMES_BIN")/python"
WORK="$SCENE/work"
mkdir -p "$WORK"
cat > "$WORK/test_token.py" << 'EOF'
def test_token_expired():
    print("\n".join(f"stale token line {i:03d}" for i in range(70)))
    assert 1 == 0
EOF
cd "$WORK"
"$PY" - "$PY" "$WORK/test_token.py" << 'PY'
import json
import sys
from hermes_cli.plugins import discover_plugins
from model_tools import handle_function_call

discover_plugins(force=True)
py, test_file = sys.argv[1], sys.argv[2]
unchanged = handle_function_call(
    "terminal",
    {"command": "echo hello-unchanged"},
    skip_pre_tool_call_hook=True,
)
print("UNCHANGED")
print(unchanged)
failed = handle_function_call(
    "terminal",
    {"command": py + " -m pytest -q " + test_file},
    skip_pre_tool_call_hook=True,
)
print("FAILED")
print(failed)
payload = None
if isinstance(failed, str):
    try:
        payload = json.loads(failed)
    except json.JSONDecodeError:
        payload = None
output = payload.get("output") if isinstance(payload, dict) else str(failed)
if not isinstance(output, str):
    output = ""
print("OUTPUT")
print(output)
if isinstance(payload, dict):
    print("EXIT", payload.get("exit_code"))
path = ""
for line in output.splitlines():
    if line.startswith("full log: "):
        parts = line.split()
        if len(parts) >= 3:
            path = parts[2]
if not path:
    print("FULL skipped")
else:
    body = json.loads(handle_function_call("fail_full", {"path": path, "offset": 0, "limit": 180}))
    print("FULL")
    print(json.dumps({"ok": body.get("ok"), "size": body.get("size")}, sort_keys=True))
    print((body.get("text") or "")[:180])
PY

The second scene clears HERMES_HOME and uses a fresh HOME. Hermes then uses $HOME/.hermes.

set -eu
SCENE="$(mktemp -d)"
export HOME="$SCENE/user"
mkdir -p "$HOME"
env -u HERMES_HOME HOME="$HOME" hermes plugins install --no-enable "file://$PWD"
env -u HERMES_HOME HOME="$HOME" hermes plugins enable fail-shrink
HERMES_DIR="$HOME/.hermes"
cat > "$HERMES_DIR/config.yaml" << 'EOF'
_config_version: 50
plugins:
  enabled:
    - fail-shrink
approvals:
  mode: off
EOF
HERMES_BIN="$(command -v hermes)"
while [ -L "$HERMES_BIN" ]; do
  _dest="$(readlink "$HERMES_BIN")"
  case "$_dest" in
    /*) HERMES_BIN="$_dest" ;;
    *) HERMES_BIN="$(dirname "$HERMES_BIN")/$_dest" ;;
  esac
done
PY="$(dirname "$HERMES_BIN")/python"
WORK="$SCENE/work"
mkdir -p "$WORK"
cat > "$WORK/test_token.py" << 'EOF'
def test_token_expired():
    print("\n".join(f"stale token line {i:03d}" for i in range(70)))
    assert 1 == 0
EOF
cd "$WORK"
env -u HERMES_HOME HOME="$HOME" "$PY" - "$PY" "$WORK/test_token.py" << 'PY'
import json
import sys
from hermes_cli.plugins import discover_plugins
from model_tools import handle_function_call

discover_plugins(force=True)
py, test_file = sys.argv[1], sys.argv[2]
failed = handle_function_call(
    "terminal",
    {"command": py + " -m pytest -q " + test_file},
    skip_pre_tool_call_hook=True,
)
print("FAILED")
print(failed)
payload = None
if isinstance(failed, str):
    try:
        payload = json.loads(failed)
    except json.JSONDecodeError:
        payload = None
output = payload.get("output") if isinstance(payload, dict) else str(failed)
if not isinstance(output, str):
    output = ""
print("OUTPUT")
print(output)
if isinstance(payload, dict):
    print("EXIT", payload.get("exit_code"))
path = ""
for line in output.splitlines():
    if line.startswith("full log: "):
        parts = line.split()
        if len(parts) >= 3:
            path = parts[2]
if not path:
    print("FULL skipped")
else:
    body = json.loads(handle_function_call("fail_full", {"path": path, "offset": 0, "limit": 80}))
    print("FULL")
    print(json.dumps({"ok": body.get("ok"), "size": body.get("size")}, sort_keys=True))
PY

Do not point HERMES_HOME at a profile you already use. The saved logs remain after you disable the plugin. hermes plugins remove fail-shrink deletes the installed plugin directory and leaves that same log directory. Delete <HERMES_HOME>/plugin-data/fail-shrink to remove the logs. In the second scene that directory is $HOME/.hermes/plugin-data/fail-shrink.

Turning it off

Enabling the plugin turns fail_full on for every platform. hermes tools disable fail-shrink --platform cli hides fail_full on the cli platform. The same command with --platform telegram hides it there. The shrink hook still rewrites a classified failure after the tool is hidden. hermes plugins disable fail-shrink stops the hook and the tool.

What stays on disk

Each saved log is one file. The directory holds at most 40 files, 8 MiB each, and 32 MiB together. Saving takes a POSIX directory fd. Linux and macOS provide that fd. flock locks the directory when the module is present, and an exclusive lock file does it when flock is absent. A host without a directory fd leaves the failure whole and saves nothing. A file over 20,000 lines is not saved, and that result stays whole. When a new file does not fit, the oldest file is removed. fail_full reads one of those files. The default limit is 8000 bytes and the maximum is 32000. An offset past the end is an error. An offset equal to the size returns empty text.

The plugin starts without reading the sample logs in fixtures/.

README from the reviewed commit 58ccb47; it updates when the author re-pins.

More by TakeshiTGAL

39 plugins by TakeshiTGAL in the catalog.

TakeshiTGALjp-subsidiesJapanese subsidy search and weekly watch, built on the jGrants public API. Disclosure — Searches api.jgrants-portal.go.jp with no API key and no daily request cap; each call waits at most 60 seconds and retries at most twice, and a result is a search match, not proof that every subsidy came back. The plugin has no user list of its own: anyone you allow on your Hermes gateway can call these tools and change this profile's watch, and the agent can set up a watch by itself. In a Chatwork room listed in CHATWORK_ROOMS, everyone can call them while CHATWORK_ALLOWED_USERS is unset. The tools are on for every platform, including gateways; turn them off per platform with hermes tools. While the plugin is enabled, its skill adds one line to the skills index of every session, including surfaces where the tools are turned off, and its pre_llm_call paragraph is added on those surfaces too. The /subsidies command is outside hermes tools; limit it with allow_admin_from or user_allowed_commands, or disable the plugin. The optional weekly watch is an unattended cron job that runs a script with no model call and is not a sandbox; delivering it to bot-chat instead runs one model turn on the fetched text. If delivery fails after the script runs, those subsidies are already marked seen and the text stays under cron/output/. Uninstall leaves the cron job, scripts/jp-subsidies-weekly-*.py and plugin-data/jp-subsidies/ until you run hermes cron remove and delete the files. The plugin does not store the name or ID of who asked. Not tested against a live gateway, with the Chatwork plugin loaded, or for result sets of several hundred rows. subsidies_detail compares a corporation's published industry, capital, employee count, and address with the call text as characters, returns a cap only when the call states one, and does not estimate an award. pre_tool_call blocks subsidies_search unless keyword is contained in industry text copied from a tool result, including a list of industry strings. A company name does not pass, including when the industry text is contained in the company name. When industry text was returned and the keyword is not that text, the block does not say the industry was missing. The block says the search was not run, eligibility is not_claimed, and no award was estimated. A company name contained in business_summary does not pass as an industry keyword. That holds when the name field is absent and the summary is トヨタ自動車は自動車を製造する。: トヨタ自動車 does not pass and 自動車 does. transform_tool_result remembers industry text and returns nothing, so the tool result is unchanged. pre_llm_call adds its paragraph only on a subsidy question (補助金, 助成金, jGrants, or 募集) or when subsidies_search, subsidies_detail, or subsidies_watch_setup was called in the previous turn, and adds nothing on other turns. A company name alone or an unrelated question does not add it. The paragraph says to call subsidies_search only with industry text copied from a tool result, that eligibility is not_claimed, and not to estimate an award or write 対象です.Communitytools1TakeshiTGALwyoming-voice-bridgeWyoming speech-to-text and text-to-speech for a Wyoming server you run (stt/tts provider wyoming), plus a wyoming_voice_status tool that lists the server's models and voices. Disclosure — Audio and text to speak go to the WYOMING_* host:port you set over cleartext, unauthenticated TCP (public addresses accepted). Once selected, the providers send speech in every session, including cron and webhooks. This build imports the installed package only when its file tree is the official wyoming 1.5.4 wheel, and a different tree sends nothing. This build lists no ffmpeg digest, so audio that is not already 16 kHz, 16-bit, mono WAV is not converted. wyoming_voice_status asks with one public pre_tool_call line. Choosing always stores one command_allowlist line for that same which and the same host:port list. A later call skips the question only when a person is present. cron, hermes -q, webhook, msgraph_webhook, and api_server do not send a describe, even after always. yolo and approvals off skip the prompt, and this plugin does not add a refusal for those modes. The plugin does not import Hermes approval, config, or write-guard modules. Hermes 0.21.4 does not list the skill. The v0.21.5 canary and Hermes 0.22.2 add one skill line to every session that loads the plugin, including a surface where the tools are turned off. The status tool is on for every surface, including the gateway, and a guest there can call it and approve it when a person can answer. Turn the wyoming_voice toolset off per surface with hermes tools.Communityvoice1TakeshiTGALauthor-feedEach watch run costs 0 tokens, and the unmanned run holds no tools. Read one public profile and watch one account, with profile_get, author_feed and author_watch. It reads public posts and profiles from the Bluesky social media network, which is built on the AT Protocol (atproto), without signing in. Disclosure — HTTPS GET only to public.api.bsky.app, no API key. Hermes starts the watch Python when the cron job fires. The tools are on for every surface, including gateways, and ask for no approval: anyone you allow on your gateway can call them. Turn a surface off with hermes tools. While the plugin is enabled, its skill adds one line to the skills index of every session, including surfaces where the tools are turned off. hermes author-feed schedule writes a script and creates one cron job that does not call a model. Each run costs 0 tokens and has no daily cap. Empty script output sends nothing. Delivered to local unless you pass --deliver, so no chat by default. Run hermes author-feed unschedule before removal. That removes the job and the script. A leftover job after the plugin is gone stops with hermes cron remove <id>. The scheduled script does not run under plugins.isolation: host, so that setting does not stop the watch. The author_watch tool still refuses a run that is not the saved cron job, including under plugins.isolation: host, and posts that notice on every run of the tool. The first run only records what is already there. One run reads at most the latest 3 pages and announces a new post by this account on them. When every row on those pages is new, with no saved post or mark, and the feed still offers another cursor, it also posts a possible-miss notice, at most once in 24 hours while that keeps happening. Replies, including the account's own thread continuations, are not announced. It relies on private Hermes parts, so an update can stop it. State stays in <HERMES_HOME>/plugin-data/author-feed after uninstall. Seen post URIs advance only on the saved cron job after a successful fetch. The script allows that when cron/executions.db shows that job running under the parent pid and cron/jobs.json names author-feed-watch.py. A direct run and another cron job exit 3 with no GET and no write. The author_watch tool allows that only for the saved job id. Delivery accepts origin, local, all, bot-chat, the Hermes 0.21.6 cron platform names, and public registry names that declare a cron delivery env var. A refused name can be set with hermes cron edit <id> --deliver. bot-chat places the watched account's post text in another model turn that has the profile's tools. hermes cron create cannot set a per-job tool list. A job made by 0.1.x keeps its model turn until the next schedule. On Hermes 0.21.4 and 0.21.5 this plugin does not load, and a leftover job keeps its model turn until hermes cron remove <id>. Running schedule again updates the interval and deliver target and switches an existing model job to the script.CommunitytoolsTakeshiTGALcsharp-game-editorGive it one feature for the Unity project open in your editor, and it builds the scripts, objects and scene in one plan, stops that plan when the compile reports an error CS line, and plays the scene when the compile is clean. Disclosure — Needs MCP for Unity pinned to v10.3.0, plus git and uv. Hermes starts mcpforunityserver==10.3.0 through uvx with telemetry and the update check off. Disk reads run at once. apply_plan asks once and puts back a file the plan did not name. A plan that deletes, runs editor code, can lose unsaved work or writes outside the project asks again, and that summary is sent only when every line fits the approval card; otherwise nothing is sent and confirm_risky_plan asks. unity_docs sends the query to docs.unity3d.com after Hermes asks. unity_generate can call paid providers you configured in MCP for Unity; that call was not part of the check. Tools are on by default on every surface, including the gateway. Only users the gateway admits can reach the tools, and this plugin keeps no user list of its own. Cron and a session with nobody to answer decline. Logs stay in <HERMES_HOME>/plugin-data/agent-plugin-csharp-game-editor-<hash>/logs. Stop with hermes plugins disable csharp-game-editor, or hermes tools for one surface. macOS only.Communitytools

Developer Mode

Explore built-in Hermes toolsets and actions.

HermesAgent

Developer?

Create a Hermes extension for Desktop or agent workflows.

Developer Section