@sureshotlabs/hunch-agent-tools 0.1.1
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.
- package/README.md +260 -0
- package/build/hunch-agent.js +17724 -0
- package/build/hunch-mcp.js +33699 -0
- package/package.json +41 -0
- package/skills/hunch-trading/SKILL.md +67 -0
- package/skills/hunch-trading/agents/openai.yaml +7 -0
- package/skills/hunch-trading/bin/hunch-agent.js +17724 -0
- package/skills/hunch-trading/references/tools.md +125 -0
- package/skills/hunch-trading/scripts/hunch +28 -0
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Hunch Agent Tools
|
|
2
|
+
|
|
3
|
+
## MCP Tools
|
|
4
|
+
|
|
5
|
+
- `hunch_search_discovery`: search events or markets by text/entity query and
|
|
6
|
+
filters. Results are event-shaped rows even when `view=markets`; use
|
|
7
|
+
`hunch_get_market_detail` for one flat market object.
|
|
8
|
+
- `hunch_browse_discovery`: browse ranked discovery feeds without a required
|
|
9
|
+
query; any query is only a secondary filter. Results are event-shaped rows
|
|
10
|
+
even when `view=markets`.
|
|
11
|
+
- `hunch_get_discovery_top_lists`: ranked discovery top lists/sidebar data for
|
|
12
|
+
trending, volume movers, liquidity movers, price movers, and optional
|
|
13
|
+
sparklines. Use for sidebars/leaderboards, not general search.
|
|
14
|
+
- `hunch_get_discovery_map`: semantic discovery map nodes and previews.
|
|
15
|
+
`level` starts at `1`; `0` is invalid. Use `hunch_get_signals` with
|
|
16
|
+
`scope=node` and `targetId` for node explanations.
|
|
17
|
+
- `hunch_get_market_detail`: detailed public market data, canonical market ID,
|
|
18
|
+
and Hunch app link.
|
|
19
|
+
- `hunch_get_event_detail`: event-level public data and related markets. Use
|
|
20
|
+
`marketsPreviewLimit` to keep compact responses small.
|
|
21
|
+
- `hunch_get_arbitrage_clusters`: Hunch cross-venue arbitrage/mispricing
|
|
22
|
+
clusters; useful for broad opportunity discovery, not guaranteed exact
|
|
23
|
+
matches for one requested market.
|
|
24
|
+
- `hunch_get_market_alternatives`: exact cross-venue alternatives for one
|
|
25
|
+
Hunch market ID, including midpoint comparison, icons, and Hunch links.
|
|
26
|
+
- `hunch_get_similar_markets`: strict market-level semantic similar markets for
|
|
27
|
+
one market ID. It can exclude same-event or same-series matches and return
|
|
28
|
+
fewer results. If coverage is empty or sparse, inspect `eventFallback` or
|
|
29
|
+
call `hunch_get_similar_events`.
|
|
30
|
+
- `hunch_get_similar_events`: semantic similar events, optionally anchored to a
|
|
31
|
+
selected market ID.
|
|
32
|
+
- `hunch_get_market_holders`: public holder leaderboard for one market.
|
|
33
|
+
- `hunch_get_market_price_history`: normalized YES/NO chart history for one
|
|
34
|
+
market. `startTs`/`endTs` are Unix seconds; `sides` wins over `side`.
|
|
35
|
+
- `hunch_get_event_price_history`: normalized chart history for an event's top
|
|
36
|
+
markets. `startTs`/`endTs` are Unix seconds; `sides` wins over `side`.
|
|
37
|
+
- `hunch_get_tracking_overview`: the public tracking page read model. Compact
|
|
38
|
+
mode uses small defaults and one leaderboard by default. Use `sections`,
|
|
39
|
+
`topWalletSections`, and `topMarketsLimit` to control payload size.
|
|
40
|
+
- `hunch_get_wallet_intel`: public wallet profile plus optional sections.
|
|
41
|
+
- `hunch_get_wallet_activity`: public wallet activity rows. Pass `walletId` as
|
|
42
|
+
a Hunch UUID, or pass `address` plus optional `chain` to resolve first.
|
|
43
|
+
- `hunch_get_wallet_positions`: current or historical public wallet positions.
|
|
44
|
+
Pass `walletId` as a Hunch UUID, or pass `address` plus optional `chain` to
|
|
45
|
+
resolve first.
|
|
46
|
+
- `hunch_get_wallet_series`: public wallet activity, performance, and PnL time
|
|
47
|
+
series. Pass `walletId` as a Hunch UUID, or pass `address` plus optional
|
|
48
|
+
`chain`; `limit` trims returned point arrays.
|
|
49
|
+
- `hunch_get_wallet_signals`: public wallet activity signals. Pass `walletId`
|
|
50
|
+
as a Hunch UUID, or pass `address` plus optional `chain` to resolve first.
|
|
51
|
+
- `hunch_get_signals`: global, event, market, or map-node signals. Use
|
|
52
|
+
`marketId`, `eventId`, or `targetId` according to `scope`.
|
|
53
|
+
- `hunch_get_trades`: recent public trade tape.
|
|
54
|
+
|
|
55
|
+
All tools accept `responseMode` when supported:
|
|
56
|
+
|
|
57
|
+
- `compact`: default, small payloads for agent reasoning.
|
|
58
|
+
- `standard`: descriptions, metadata, and larger previews.
|
|
59
|
+
- `full`: raw backend payload.
|
|
60
|
+
|
|
61
|
+
## CLI Commands
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
scripts/hunch discovery-browse --venues polymarket,kalshi --sort totalvol --limit 10 --json
|
|
65
|
+
scripts/hunch discovery-search "election" --limit 10 --json
|
|
66
|
+
scripts/hunch market-detail <market-id> --standard --json
|
|
67
|
+
scripts/hunch event-detail <event-id> --standard --json
|
|
68
|
+
scripts/hunch discovery-map --venues polymarket,kalshi,limitless --json
|
|
69
|
+
scripts/hunch discovery-top-lists --trending-limit 10 --volume-movers-sort-by absolute --json
|
|
70
|
+
scripts/hunch arbitrage-clusters --min-liquidity 1000 --limit 10 --json
|
|
71
|
+
scripts/hunch market-alternatives polymarket:553828 --venues polymarket,kalshi,limitless --json
|
|
72
|
+
scripts/hunch similar-markets <market-id> --limit 10 --json
|
|
73
|
+
scripts/hunch similar-events <event-id> --market-id <market-id> --limit 10 --json
|
|
74
|
+
scripts/hunch market-holders <market-id> --limit 20 --json
|
|
75
|
+
scripts/hunch market-price-history <market-id> --range 1d --sides BOTH --json
|
|
76
|
+
scripts/hunch event-price-history <event-id> --range 1d --limit 5 --json
|
|
77
|
+
scripts/hunch tracking-overview --window-hours 24 --json
|
|
78
|
+
scripts/hunch wallet-intel <address> --chain polygon --include-signals --json
|
|
79
|
+
scripts/hunch wallet-activity --wallet-id <uuid> --limit 50 --json
|
|
80
|
+
scripts/hunch wallet-positions --wallet-id <uuid> --history --json
|
|
81
|
+
scripts/hunch wallet-series <wallet-id> --window-hours 168 --json
|
|
82
|
+
scripts/hunch wallet-signals --wallet-id <uuid> --limit 50 --json
|
|
83
|
+
scripts/hunch signals --event-id <event-id> --include-similar-markets --json
|
|
84
|
+
scripts/hunch trades --market-id <market-id> --limit 25 --json
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`HUNCH_API_BASE_URL` controls the target API. `HUNCH_APP_BASE_URL` controls app
|
|
88
|
+
links in compact/standard responses. Both default to production. No auth token
|
|
89
|
+
is required or used by this public package.
|
|
90
|
+
|
|
91
|
+
Useful filters:
|
|
92
|
+
|
|
93
|
+
- Discovery: `--venues`, `--view`, `--sort`, `--sort-dir`, `--category`,
|
|
94
|
+
`--min-volume24h`, `--min-liquidity`, `--max-spread`.
|
|
95
|
+
- Discovery top lists: per-list limits, volume/liquidity floors, absolute or
|
|
96
|
+
percent mover sort modes, and optional volume/liquidity/movement sparklines.
|
|
97
|
+
- Arbitrage: `--min-liquidity`, `--min-venue-count`, `--min-spread`,
|
|
98
|
+
`--sort-by`.
|
|
99
|
+
- Market alternatives: `--venues`, `--limit`, and `--source-limit`.
|
|
100
|
+
- Similar/event page: `--limit`, `--venue`, `--active-only`, `--cutoff`,
|
|
101
|
+
`--market-id`, `--include-details`, `--include-event-fallback`,
|
|
102
|
+
`--range`, `--bucket-minutes`, `--side`, `--sides`.
|
|
103
|
+
- Tracking and wallet intel: `--window-hours`, `--scope`, `--wallet-id`,
|
|
104
|
+
`--include-signals`, `--include-activity`, `--include-positions`,
|
|
105
|
+
`--include-series`, labels, categories, tags, and attribution filters.
|
|
106
|
+
|
|
107
|
+
When answering users, show titles, venues, odds/metrics, and Hunch links first.
|
|
108
|
+
Use stable Hunch IDs only as secondary technical references. Link formats:
|
|
109
|
+
|
|
110
|
+
- Event: `https://app.hunch.trade/events/<eventId>`
|
|
111
|
+
- Market: `https://app.hunch.trade/events/<eventId>?market=<marketId>`
|
|
112
|
+
- Tracking wallet:
|
|
113
|
+
`https://app.hunch.trade/tracking/wallet/<address>?chain=<chain>`
|
|
114
|
+
- Tracking overview: `https://app.hunch.trade/tracking?...`
|
|
115
|
+
- Arbitrage: `https://app.hunch.trade/arbitrage`
|
|
116
|
+
|
|
117
|
+
For event-page questions, use event detail first, then add specific context as
|
|
118
|
+
needed: `market-alternatives <selected-market-id>`, `signals --event-id`,
|
|
119
|
+
`similar-events`, `event-price-history`, `trades --event-id`, and
|
|
120
|
+
`market-holders <selected-market-id>`. Discovery-map node insights use
|
|
121
|
+
`signals --scope node --target-id <node-id>`; request `discovery-map --standard`
|
|
122
|
+
when signal previews are needed.
|
|
123
|
+
|
|
124
|
+
Price history uses `range` for the requested time window and `bucketMinutes`
|
|
125
|
+
for candle size. `interval` is still accepted as a legacy alias for `range`.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env sh
|
|
2
|
+
set -eu
|
|
3
|
+
|
|
4
|
+
if [ -n "${HUNCH_AGENT_BIN:-}" ]; then
|
|
5
|
+
exec "$HUNCH_AGENT_BIN" "$@"
|
|
6
|
+
fi
|
|
7
|
+
|
|
8
|
+
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
9
|
+
SKILL_ROOT=$(CDPATH= cd -- "$SCRIPT_DIR/.." && pwd)
|
|
10
|
+
PLUGIN_ROOT=$(CDPATH= cd -- "$SKILL_ROOT/../.." && pwd)
|
|
11
|
+
|
|
12
|
+
SKILL_CLI="$SKILL_ROOT/bin/hunch-agent.js"
|
|
13
|
+
PLUGIN_CLI="$PLUGIN_ROOT/plugin-dist/hunch-agent.js"
|
|
14
|
+
DEV_CLI="$PLUGIN_ROOT/apps/mcp-hunch/dist/cli.js"
|
|
15
|
+
|
|
16
|
+
if [ -f "$SKILL_CLI" ]; then
|
|
17
|
+
exec node "$SKILL_CLI" "$@"
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
if [ -f "$PLUGIN_CLI" ]; then
|
|
21
|
+
exec node "$PLUGIN_CLI" "$@"
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
if [ -f "$DEV_CLI" ]; then
|
|
25
|
+
exec node "$DEV_CLI" "$@"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
exec hunch-agent "$@"
|