Command Dispatcher¶
This module provides a lightweight yet powerful dispatcher for “exclamation
commands” that are commonly used in chat-based user interfaces. It converts
messages such as !help
or !deposit 100
into asynchronous function calls
and returns a reply via direct message on Nostr.
- class agentstr.commands.Commands(nostr_client: NostrClient, commands: dict[str, Callable[[str, str], None]])[source]¶
Bases:
object
- class agentstr.commands.DefaultCommands(db: Database, nostr_client: NostrClient, agent_info: AgentCard)[source]¶
Bases:
Commands
- __init__(db: Database, nostr_client: NostrClient, agent_info: AgentCard)[source]¶