Unblock hosted agent cost E2E - #55
Closed
JaeLeex wants to merge 5 commits into
Closed
Conversation
Telegram-native interface for deploying, monitoring, and controlling autonomous trading agents on Hyperliquid — like wallet bots but for agents. New module: tg_bot/ (12 files) - /start: wallet create/import with encrypted keystore - /deploy: strategy selection keyboard (18 strategies), instrument picker, risk presets (conservative/default/aggressive), mainnet double-confirm - /status /pause /resume /stop /balance: agent lifecycle control - /apex: multi-strategy APEX orchestration mode - NotifyingEngine: TradingEngine subclass pushing fills, PnL, risk alerts to Telegram via async queue with throttling - EngineBridge: thread-safe bridge (async bot <-> blocking engine thread) CLI: `hl telegram start [--mainnet] [--dry-run]` Deploy: RUN_MODE=telegram in Railway, Dockerfile installs telegram dep
Design PR — spec document + code skeleton (type stubs, interfaces, config schemas) for integrating all 8 perpetual on-chain agent jobs into the hl CLI. - New `hl jobs` command group (list/info/register/run/status/claim/deregister) - JobEngine ABC with KeeperEngine, CooperativeEngine, ManagedEngine - JobEngineFactory dispatches on job category (keeper/operator/cooperative/managed) - Strategy interfaces: KeeperStrategy, CooperativeStrategy, ManagedStrategy - EventSubscriber ABC with ChainEventSubscriber (WebSocket) and LogPollingSubscriber - CustodyGuard for pre-signing tx validation (defense-in-depth) - JOB_REGISTRY with all 8 jobs pre-registered - JobConfig dataclass with YAML loading - LaTeX specification at docs/agent_cli_jobs_spec.tex
Use OpenRouter as the hosted Railway inference default and make the LLM strategy route OpenRouter models through the OpenAI-compatible API. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Add safe MCP trading, joinable cost/fill ledgers, cache metrics, and web-auth maker/taker role binding so funded testnet costing can run through agent-cli. Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Author
|
Superseded by #59 (jl/hosted-cost-metering-20260701, same tip). |
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.
Summary
hl trade/MCP trade flags with dry-run and max-notional guards.hl pairweb-auth flows for maker/taker wallet role selection and scoped CLI approvals.Test plan
python3 -m pytest tests/test_pair_money_cli.py tests/test_cost_metering.py tests/test_strategy_claude_agent.py tests/test_engine.py tests/test_mcp_money_tools.py tests/test_trade_command.pypython3 -m py_compile cli/web_auth.py cli/commands/pair.py cli/commands/trade.py cli/mcp_server.py modules/cost_metering.py strategies/claude_agent.py cli/engine.py scripts/pricing_aggregate.py scripts/funded_btcswp_combined_run.pyNotes
jl/hedge-agent-mcp-smoke-testbranch, so it includes earlier hosted-agent prerequisites already on that branch.hl pair bind-role makerandhl pair bind-role taker.Made with Cursor