feat(tools): clawmes_info — agent-callable bridge for read-only commands (v0.17.0) - #39
Merged
Merged
Conversation
…nds (v0.17.0) The Hermes Desktop app filters its slash-command autocomplete to a built-in allowlist (desktop-slash-commands.ts), so clawmes plugin slash commands don't appear in the / menu and their output renders as a non-selectable status line. Confirmed against the desktop source. This adds a single read-only TOOL so clawmes is usable from natural language in the desktop and renders as a proper tool card: * clawmes_info(op, args) — ops: wallet, balance, portfolio, research, scan, trending, leaderboard, my_launches. Bridges to the existing async command handlers via an async-safe runner (handles both no-loop and running-loop contexts). Any HTML card a command generates (e.g. /research) is surfaced as a preview attachment via json_result(preview=...). Read-only by design; write actions keep their gated tools (defi_swap, transfer). Tool count 52 -> 53; updated the doctor test + release smoke assertion + plugin.yaml (both copies). Verification: 4574 passed, 8 skipped; 100% line coverage (16,249 stmts, 0 missing); ruff check + format clean repo-wide; plugin.yaml byte-identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
You launched the desktop and saw no clawmes commands in the
/menu, and the ones you typed rendered as a gray, non-selectable status line. Traced to the desktop source:desktop-slash-commands.tsfilters the slash autocomplete to a built-in allowlist, so plugin slash commands are excluded by design and their output renders as a status notice rather than a chat bubble.The desktop is built around natural-language chat where the agent calls tools — and tool results render as proper, selectable cards (where our links + preview cards live). So this re-exposes the key informational commands as an agent-callable tool.
What
clawmes_info(tool #53, read-only, toolsetclawmes-trading):op(enum) + optionalargs. Ops:wallet,balance,portfolio,research,scan,trending,leaderboard,my_launches./research) is surfaced as a preview attachment viajson_result(preview=...)— so the cards render in the desktop too.asynccommand handlers via an async-safe runner that works whether or not an event loop is already running (both branches tested).Read-only by design — write actions keep their own gated tools (
defi_swap,transfer). This also sidesteps the gray-status-line issue: tool results are first-class cards.Changes
clawmes/tools/clawmes_info.py+ wired intoregister_all.plugin.yaml(both copies).Verification
ruff check+ruff format --checkclean repo-wideplugin.yamlbyte-identicalNote
Wallet connection (
/connect) still needsWALLETCONNECT_PROJECT_IDin~/.hermes/.envregardless of surface. Scheduler/write commands (/dca,/buy, etc.) intentionally remain gated tools / slash commands, not in this read bridge.