@unhedged/mcp 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +81 -0
  3. package/dist/cli.d.ts +2 -0
  4. package/dist/cli.js +48 -0
  5. package/dist/client/errors.d.ts +15 -0
  6. package/dist/client/errors.js +40 -0
  7. package/dist/client/http.d.ts +21 -0
  8. package/dist/client/http.js +132 -0
  9. package/dist/client/types.d.ts +140 -0
  10. package/dist/client/types.js +6 -0
  11. package/dist/config.d.ts +7 -0
  12. package/dist/config.js +27 -0
  13. package/dist/index.d.ts +6 -0
  14. package/dist/index.js +4 -0
  15. package/dist/init/index.d.ts +10 -0
  16. package/dist/init/index.js +137 -0
  17. package/dist/init/snippet.d.ts +35 -0
  18. package/dist/init/snippet.js +72 -0
  19. package/dist/prompts/frontmatter.d.ts +28 -0
  20. package/dist/prompts/frontmatter.js +113 -0
  21. package/dist/prompts/index.d.ts +10 -0
  22. package/dist/prompts/index.js +50 -0
  23. package/dist/prompts/loader.d.ts +13 -0
  24. package/dist/prompts/loader.js +36 -0
  25. package/dist/safety/index.d.ts +1 -0
  26. package/dist/safety/index.js +1 -0
  27. package/dist/safety/spend-cap.d.ts +33 -0
  28. package/dist/safety/spend-cap.js +64 -0
  29. package/dist/server.d.ts +3 -0
  30. package/dist/server.js +75 -0
  31. package/dist/tools/balance.d.ts +2 -0
  32. package/dist/tools/balance.js +175 -0
  33. package/dist/tools/bets.d.ts +2 -0
  34. package/dist/tools/bets.js +109 -0
  35. package/dist/tools/index.d.ts +4 -0
  36. package/dist/tools/index.js +17 -0
  37. package/dist/tools/market-maker.d.ts +2 -0
  38. package/dist/tools/market-maker.js +38 -0
  39. package/dist/tools/markets.d.ts +2 -0
  40. package/dist/tools/markets.js +120 -0
  41. package/dist/tools/orders.d.ts +2 -0
  42. package/dist/tools/orders.js +256 -0
  43. package/dist/tools/portfolio.d.ts +2 -0
  44. package/dist/tools/portfolio.js +34 -0
  45. package/dist/tools/types.d.ts +44 -0
  46. package/dist/tools/types.js +10 -0
  47. package/package.json +54 -0
  48. package/skills/cash-out.md +51 -0
  49. package/skills/market-creator-assistant.md +45 -0
  50. package/skills/market-maker-workflow.md +58 -0
  51. package/skills/market-research.md +42 -0
  52. package/skills/place-hedged-position.md +51 -0
  53. package/skills/portfolio-review.md +34 -0
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: portfolio-review
3
+ description: Read-only summary of the user's Unhedged portfolio — open positions, P&L, win rate, and risk concentration.
4
+ arguments: []
5
+ ---
6
+
7
+ # Portfolio review workflow
8
+
9
+ You are giving the user a read-only snapshot of their Unhedged portfolio. **Do not place, cancel, or withdraw anything** during this skill.
10
+
11
+ ## Steps
12
+
13
+ 1. Call `get_portfolio` to fetch the summary and bounded active-position preview. The response's `positions` array contains at most 50 rows; use `positionsTotal` to tell whether it is complete.
14
+ 2. Call `get_balance` to fetch current available + locked balances.
15
+ 3. Optionally call `list_bets` (with no filters) and `list_orders` account-wide to expand on current activity. For orders, use `limit: 500` and follow `nextCursor` until it is null when a complete inventory matters.
16
+
17
+ ## What to report back
18
+
19
+ Lead with the headline numbers:
20
+ - **Available USD**: from balance.available.
21
+ - **Locked**: sum of `lockedBets + lockedEngine + lockedWithdraws`. Break out which category dominates if it's interesting.
22
+ - **Active/ended position rows**: `portfolio.positionsTotal`. Do not substitute `portfolio.positions.length`: that array is only a preview. `summary.pendingBets` is a count of pending parimutuel bet records, not a replacement for the position-row total.
23
+ - **Lifetime ROI**: `portfolio.summary.roi`, rounded to one decimal place and shown with `%`. It is already expressed in percentage points; do not multiply it by 100. Frame negative ROI honestly; don't sugar-coat.
24
+ - **Win rate**: `portfolio.summary.winRate`, handled the same way.
25
+
26
+ Then call out the top three positions by cost (`totalBetAmount`, or `betAmount` when provided) and what they're betting on. If the portfolio preview is incomplete (`positionsTotal > positions.length`), label any position ranking as "among the previewed rows" rather than account-wide. A complete active-position ranking requires paged `/api/v1/portfolio/me/positions` data from an authorized REST client; `/api/v1/portfolio/me/history` is the separate settled-position feed. If any single position is >25% of the user's total locked exposure, flag it as **concentration risk** — that's their call to act on or not.
27
+
28
+ If `portfolio.summary.totalPayouts` is large relative to `totalWagered`, mention it positively. If `totalLosses` dominates, note it factually without lecturing.
29
+
30
+ ## Guardrails
31
+
32
+ - Strictly read-only. The first instinct should never be "let me also place a hedge for them" — that's a separate skill the user can invoke explicitly.
33
+ - Don't editorialize on the *quality* of the user's bets. You don't know their thesis.
34
+ - Numbers from the API are strings — parse with `Number()` before computing percentages.