Skip to content

Commit a855e14

Browse files
Hiksangclaude
andcommitted
chore(release): bump 0.12.18 → 0.13.0 (HL Outcome markets)
v0.13.0 adds HL HIP-4 Outcome markets as a new asset class. Verified end-to-end against mainnet (real place + cancel on asset id 100,000,010). Two rounds of independent Codex review closed before tag. Tests: 1305 → 1323 (+18). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3d48599 commit a855e14

4 files changed

Lines changed: 32 additions & 5 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
{
1212
"name": "perp-cli",
1313
"description": "Trade, bridge, arbitrage, and manage perp positions across 4 DEXes (Pacifica, Hyperliquid, Lighter, Aster) via natural language. Ships an MCP server with 18 tools / 3 resources / 2 prompts and an agentskills.io-compatible Skill bundle.",
14-
"version": "0.12.18",
14+
"version": "0.13.0",
1515
"author": {
1616
"name": "HypurrQuant",
1717
"email": "hypurrquant@proton.me"
@@ -39,5 +39,5 @@
3939
"strict": false
4040
}
4141
],
42-
"version": "0.12.18"
42+
"version": "0.13.0"
4343
}

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@ All notable changes to `perp-cli`. Format follows [Keep a Changelog](https://kee
44

55
## [Unreleased]
66

7+
## [0.13.0] — 2026-05-03
8+
9+
Adds Hyperliquid Outcome markets (HIP-4) support — a new asset class. Verified end-to-end against mainnet (place + cancel real order against asset id `100,000,010`). Two rounds of independent Codex review closed before release.
10+
11+
### Added
12+
- **`perp outcome` command tree**`list`, `book`, `positions`, `orders`, `buy`, `sell`, `cancel`. USDH-quoted, fully collateralized binary/range contracts; no leverage / no liquidation. $10 USDH min order. Currently 1 live market on mainnet (BTC binary daily settling at 06:00 UTC).
13+
- **`HyperliquidOutcomeAdapter`** — composes with `HyperliquidAdapter` for signing. Asset id formula `100_000_000 + (10 * outcome + side)`. Bypasses HL's cached spot-state for fresh post-fill positions, then invalidates the `acct:` cache after place/cancel for downstream readers.
14+
- **`OutcomeAdapter` interface** in `src/exchanges/outcome-interface.ts` (mirrors the SpotAdapter shape; ready for additional venues if HIP-4 pattern spreads).
15+
- **Probe scripts** under `scripts/probe-outcome-{ws,order}.ts` documenting the WebSocket and exchange-action shapes that informed this implementation.
16+
- **+16 unit tests** covering encoding (`10*outcome+side`), coin name conventions (`#<enc>`/`+<enc>`), description parsing, venue-rejection assertion helpers, and cancel-status validation. Total: 1305 → 1323.
17+
18+
### SSOT compliance
19+
- **Rule #2 (No Fallback):** venue rejections embedded in `status:"ok"` + `statuses[0].error` are now thrown as `EXCHANGE_ERROR` (not silently masked); unknown outcome → `SYMBOL_NOT_FOUND`; out-of-range side / encoding overflow → `INVALID_PARAMS`. `_resolveUserAddress()` prefers `_hl.address`, falls back to OWS-stored agent meta `userEvmAddress`, and throws `NO_SIGNER_AVAILABLE` only if both are absent (no silent zero-balance substitution).
20+
- **Rule #3 (Single Secret Source):** no new env vars; reuses existing HL agent.
21+
22+
### UX
23+
- **`--dry-run`** uses `command.optsWithGlobals()` so the parent program's flag is not shadowed; pre-validates min-notional so the dry-run output cannot lie about a viable order.
24+
- **Encoded-side mismatch detection**`outcome buy 2 #10` (where `#10` encodes outcome 1) throws `INVALID_PARAMS` with guidance instead of silently routing to outcome 2.
25+
- **Pre-checks spot USDH balance** on buy and surfaces `INSUFFICIENT_BALANCE` with a "bridge USDC→USDH" remediation instead of an opaque venue error.
26+
- **`outcome orders`** uses the normalised lowercase `buy`/`sell` from the HL adapter (was rendering all buys as SELL).
27+
28+
### Out of scope (deferred)
29+
- Portfolio aggregation of outcome holdings (roll into `perp portfolio`).
30+
- Landing page outcome line.
31+
- `outcome close <outcome> <side>` shortcut (use `outcome sell <outcome> <side> <usd>` for now).
32+
- HIP-4 builder/deployer mechanics for creating new outcomes/questions.
33+
734
## [0.12.18] — 2026-05-02
835

936
Closes Codex independent review of v0.12.17. 1 HIGH regression + 1 MEDIUM Rule #2 gap.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "perp-cli",
3-
"version": "0.12.18",
3+
"version": "0.13.0",
44
"description": "Multi-DEX Perpetual Futures CLI - Pacifica, Hyperliquid, Lighter, Aster",
55
"bin": {
66
"perp": "dist/index.js",

skills/perp-cli/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ allowed-tools: "Bash(perp:*), Bash(npx perp-cli:*), Bash(npx -y perp-cli:*)"
66
compatibility: "Requires Node.js 20 or newer and the perp-cli npm package (global install or npx). Network access required for exchange APIs and bridge providers. Mutating commands need wallet keys configured via 'perp wallet set EXCHANGE KEY' (Solana base58 / EVM hex / Aster API key). Skill is portable across Claude Code, Claude.ai, Cursor, Codex, and Gemini CLI — no platform-specific features."
77
metadata:
88
author: hypurrquant
9-
version: "0.12.18"
9+
version: "0.13.0"
1010
---
1111

1212
# perp-cli
@@ -44,7 +44,7 @@ Also bundled under `scripts/`: `preflight.sh`, `arb-monitor.sh`, `funding-analys
4444
### Step 1: Verify install + version
4545

4646
```bash
47-
perp --version 2>/dev/null # must be >= 0.12.18
47+
perp --version 2>/dev/null # must be >= 0.13.0
4848
npm install -g perp-cli@latest 2>/dev/null || npx -y perp-cli@latest --json --version
4949
```
5050

0 commit comments

Comments
 (0)