mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-01 08:21:50 +08:00
Approval system: - wallet/approval.py: PendingWalletTx stash, submit_pending(), pop_pending(), execute_approved() — mirrors the dangerous-command approval pattern - tools/wallet_tool.py: wallet_send now stashes pending txs when policy returns require_approval (using task_id as session key) - cli.py: Post-agent-loop check for pending wallet approvals, invokes wallet_approval_callback for interactive TUI prompt, executes on approve - hermes_cli/callbacks.py: wallet_approval_callback — TUI prompt showing tx details with approve/deny choices (matches approval_callback pattern) - gateway/run.py: Picks up pending wallet txs after agent response, shows approval hint with /approve /deny. /approve handler dispatches wallet tx execution via execute_approved(). Export/Import: - wallet/manager.py: export_private_key() — CLI-only, never agent-exposed - wallet/cli.py: 'hermes wallet export' with passphrase re-entry confirmation, safety warnings, import instructions. Import updated with --type flag and migration-focused messaging. UX improvements: - Create messaging emphasizes fresh wallets + funding over personal wallet import - Import framed as migration tool, not personal wallet onboarding Tested: approval stash/execute path confirmed on Solana mainnet