Skip to content

Unblock hosted agent cost E2E - #55

Closed
JaeLeex wants to merge 5 commits into
mainfrom
jl/hedge-agent-mcp-smoke-test
Closed

Unblock hosted agent cost E2E#55
JaeLeex wants to merge 5 commits into
mainfrom
jl/hedge-agent-mcp-smoke-test

Conversation

@JaeLeex

@JaeLeex JaeLeex commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add safe noninteractive hl trade/MCP trade flags with dry-run and max-notional guards.
  • Add joinable LLM cost, route, runtime, and trade ledgers plus cache metrics for pricing aggregation.
  • Add hl pair web-auth flows for maker/taker wallet role selection and scoped CLI approvals.
  • Add a funded BTCSWP combined-run script to link LLM decision cost with submitted trade fills.

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.py
  • python3 -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.py

Notes

  • This PR is opened from the existing jl/hedge-agent-mcp-smoke-test branch, so it includes earlier hosted-agent prerequisites already on that branch.
  • Live funded E2E requires a paired web-auth session and funded testnet maker/taker wallet selection through hl pair bind-role maker and hl pair bind-role taker.

Made with Cursor

JaeLeex and others added 5 commits March 26, 2026 16:51
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>
@JaeLeex

JaeLeex commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #59 (jl/hosted-cost-metering-20260701, same tip).

@JaeLeex JaeLeex closed this Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant