@0xinsider/mcp 3.6.2 → 3.9.0
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 +60 -18
- package/dist/catalog.generated.d.ts +56 -0
- package/dist/catalog.generated.d.ts.map +1 -1
- package/dist/catalog.generated.js +70 -0
- package/dist/catalog.generated.js.map +1 -1
- package/dist/client.d.ts +3 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js.map +1 -1
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/product-cli/index.d.ts.map +1 -1
- package/dist/product-cli/index.js +181 -26
- package/dist/product-cli/index.js.map +1 -1
- package/dist/product-cli/operations.d.ts +24 -0
- package/dist/product-cli/operations.d.ts.map +1 -0
- package/dist/product-cli/operations.js +239 -0
- package/dist/product-cli/operations.js.map +1 -0
- package/dist/prompts/index.js +2 -2
- package/dist/sdk/client.d.ts +262 -151
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/client.js +284 -145
- package/dist/sdk/client.js.map +1 -1
- package/dist/sdk/errors.d.ts +6 -5
- package/dist/sdk/errors.d.ts.map +1 -1
- package/dist/sdk/errors.js +13 -5
- package/dist/sdk/errors.js.map +1 -1
- package/dist/sdk/index.d.ts +4 -26
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +2 -1
- package/dist/sdk/index.js.map +1 -1
- package/dist/sdk/pagination.d.ts +3 -3
- package/dist/sdk/pagination.js +2 -2
- package/dist/sdk/schema.d.ts +1496 -212
- package/dist/sdk/schema.d.ts.map +1 -1
- package/dist/sdk/webhooks.d.ts +8 -60
- package/dist/sdk/webhooks.d.ts.map +1 -1
- package/dist/sdk/webhooks.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +21 -4
- package/dist/server.js.map +1 -1
- package/dist/tools/account.d.ts +5 -0
- package/dist/tools/account.d.ts.map +1 -0
- package/dist/tools/account.js +53 -0
- package/dist/tools/account.js.map +1 -0
- package/dist/tools/category-leaderboards.d.ts +5 -0
- package/dist/tools/category-leaderboards.d.ts.map +1 -0
- package/dist/tools/category-leaderboards.js +71 -0
- package/dist/tools/category-leaderboards.js.map +1 -0
- package/dist/tools/explore-markets.js +2 -2
- package/dist/tools/explore-markets.js.map +1 -1
- package/dist/tools/games.d.ts +4 -0
- package/dist/tools/games.d.ts.map +1 -1
- package/dist/tools/games.js +152 -6
- package/dist/tools/games.js.map +1 -1
- package/dist/tools/get-insider-radar.js +1 -1
- package/dist/tools/get-insider-radar.js.map +1 -1
- package/dist/tools/get-leaderboard.d.ts.map +1 -1
- package/dist/tools/get-leaderboard.js +36 -18
- package/dist/tools/get-leaderboard.js.map +1 -1
- package/dist/tools/get-market-flow.js +1 -1
- package/dist/tools/get-trader-pnl.js +3 -3
- package/dist/tools/get-trader-pnl.js.map +1 -1
- package/dist/tools/get-trader.js +3 -3
- package/dist/tools/get-trending-wallets.js +1 -1
- package/dist/tools/get-whale-trades.d.ts.map +1 -1
- package/dist/tools/get-whale-trades.js +14 -4
- package/dist/tools/get-whale-trades.js.map +1 -1
- package/dist/tools/market-reads.d.ts +2 -0
- package/dist/tools/market-reads.d.ts.map +1 -1
- package/dist/tools/market-reads.js +58 -4
- package/dist/tools/market-reads.js.map +1 -1
- package/dist/tools/pick-of-the-day.d.ts +1 -0
- package/dist/tools/pick-of-the-day.d.ts.map +1 -1
- package/dist/tools/pick-of-the-day.js +22 -2
- package/dist/tools/pick-of-the-day.js.map +1 -1
- package/dist/tools/read-parity.d.ts +1 -0
- package/dist/tools/read-parity.d.ts.map +1 -1
- package/dist/tools/read-parity.js +55 -14
- package/dist/tools/read-parity.js.map +1 -1
- package/dist/tools/search-markets.js +4 -4
- package/dist/tools/search-markets.js.map +1 -1
- package/dist/tools/sport-leaderboards.d.ts +5 -0
- package/dist/tools/sport-leaderboards.d.ts.map +1 -0
- package/dist/tools/sport-leaderboards.js +65 -0
- package/dist/tools/sport-leaderboards.js.map +1 -0
- package/dist/tools/trader-reads.js +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { API_CLIENT_OPERATIONS, READ_ONLY_POST_OPERATIONS, } from "#sdk";
|
|
2
|
+
/**
|
|
3
|
+
* Checked against the SDK's generated `OperationQuery` at compile time in both
|
|
4
|
+
* directions: a name the operation does not document fails, and so does a
|
|
5
|
+
* documented name left out, reported as `Property 'missing' is missing`. When
|
|
6
|
+
* the OpenAPI document adds or removes a query parameter, the SDK types move
|
|
7
|
+
* and `npm run check-types` names the row to change here.
|
|
8
|
+
*/
|
|
9
|
+
function completeQueryTable(table) {
|
|
10
|
+
return table;
|
|
11
|
+
}
|
|
12
|
+
// The SDK registry carries no runtime query metadata, so this is the CLI's one
|
|
13
|
+
// copy of it. Operation ids, methods and paths still come from
|
|
14
|
+
// `API_CLIENT_OPERATIONS`; nothing here restates them.
|
|
15
|
+
const QUERY_PARAMETERS = completeQueryTable({
|
|
16
|
+
batchGetMarketFlow: [],
|
|
17
|
+
batchGetTraders: [],
|
|
18
|
+
exploreMarkets: ["q", "category", "status", "platform", "sort", "limit", "cursor"],
|
|
19
|
+
getAccountIdentity: [],
|
|
20
|
+
getApiDiscovery: [],
|
|
21
|
+
getCategoryLeaderboard: ["active_within", "min_events", "limit", "cursor"],
|
|
22
|
+
getCombo: [],
|
|
23
|
+
getCombosSummary: [],
|
|
24
|
+
getCoverage: [],
|
|
25
|
+
getDailyReportSnapshot: ["date"],
|
|
26
|
+
getEdgeHunter: [
|
|
27
|
+
"view",
|
|
28
|
+
"kind",
|
|
29
|
+
"sports",
|
|
30
|
+
"leagues",
|
|
31
|
+
"market_types",
|
|
32
|
+
"condition_ids",
|
|
33
|
+
"event_slugs",
|
|
34
|
+
"series_slugs",
|
|
35
|
+
"category",
|
|
36
|
+
"cohort",
|
|
37
|
+
"admission",
|
|
38
|
+
"min_grade",
|
|
39
|
+
"horizon_hours",
|
|
40
|
+
"limit",
|
|
41
|
+
"cursor",
|
|
42
|
+
],
|
|
43
|
+
getEventReplaySince: ["trader", "condition_id", "min_grade", "min_size", "expand", "limit", "cursor"],
|
|
44
|
+
getGame: [],
|
|
45
|
+
getGameHolders: ["condition_ids", "limit"],
|
|
46
|
+
getGameSharpMoney: [],
|
|
47
|
+
getHealth: [],
|
|
48
|
+
getLargeTrade: [],
|
|
49
|
+
getMarketCandles: ["resolution", "from", "to"],
|
|
50
|
+
getMarketWalletsInOut: ["window"],
|
|
51
|
+
getMarketContextMarkdown: [],
|
|
52
|
+
getMarketFlow: ["timeframe"],
|
|
53
|
+
getMarketHolders: ["outcome", "min_grade", "limit", "cursor"],
|
|
54
|
+
getMarketTopHolders: ["limit"],
|
|
55
|
+
getMarketSnapshot: ["expand"],
|
|
56
|
+
getMonthlyReportSnapshot: ["month"],
|
|
57
|
+
getPickOfTheDay: [],
|
|
58
|
+
getPickOfTheDayArchive: [],
|
|
59
|
+
getPickOfTheDayStats: [],
|
|
60
|
+
getPickOfTheDayLedger: [],
|
|
61
|
+
getPickOfTheDayLedgerEntry: [],
|
|
62
|
+
getPositionTimeline: ["condition_id", "limit", "cursor"],
|
|
63
|
+
getPositionTimelineById: ["condition_id", "limit", "cursor"],
|
|
64
|
+
getReports: ["granularity", "period"],
|
|
65
|
+
getResolutionReport: ["date", "view"],
|
|
66
|
+
getSportLeaderboard: ["league", "sort", "limit"],
|
|
67
|
+
getStream: ["last_event_id", "seq", "event", "condition_id", "min_grade", "wallet", "min_size"],
|
|
68
|
+
getSuspiciousTrade: [],
|
|
69
|
+
getTrader: ["expand", "max_age_s"],
|
|
70
|
+
getTraderCategoryRecords: ["category"],
|
|
71
|
+
getTraderContext: [],
|
|
72
|
+
getTraderContextMarkdown: [],
|
|
73
|
+
getTraderExportSnapshot: [],
|
|
74
|
+
getTraderExportStatus: ["job_id"],
|
|
75
|
+
getTraderGradeAt: ["as_of"],
|
|
76
|
+
getTraderPnl: ["from", "to", "sections"],
|
|
77
|
+
getUsage: [],
|
|
78
|
+
getWebhook: [],
|
|
79
|
+
getWebhookVerificationAttempt: [],
|
|
80
|
+
getWeeklyReportSnapshot: ["week", "from", "to"],
|
|
81
|
+
getWhaleDatasetStatus: [],
|
|
82
|
+
listCategoryLeaders: [],
|
|
83
|
+
listComboFills: [
|
|
84
|
+
"result",
|
|
85
|
+
"legs",
|
|
86
|
+
"min_stake",
|
|
87
|
+
"min_multiplier",
|
|
88
|
+
"grades",
|
|
89
|
+
"sports",
|
|
90
|
+
"sort",
|
|
91
|
+
"window",
|
|
92
|
+
"limit",
|
|
93
|
+
"cursor",
|
|
94
|
+
"offset",
|
|
95
|
+
],
|
|
96
|
+
listGameMarkets: ["sports_market_type", "status", "limit", "cursor", "expand"],
|
|
97
|
+
listGameTrades: ["limit"],
|
|
98
|
+
listGames: ["sport", "league", "status", "starts_after", "starts_before", "window", "expand", "limit", "cursor"],
|
|
99
|
+
listLargePositions: ["condition_id", "category", "min_grade", "min_size", "limit", "cursor"],
|
|
100
|
+
listLargeTradeCounterpartyExecutions: ["snapshot_id", "limit", "cursor"],
|
|
101
|
+
listLargeTradeCounterpartyMakers: ["snapshot_id", "limit", "cursor"],
|
|
102
|
+
listLargeTradeHistory: [
|
|
103
|
+
"condition_id",
|
|
104
|
+
"event_slug",
|
|
105
|
+
"trader",
|
|
106
|
+
"category",
|
|
107
|
+
"platform",
|
|
108
|
+
"min_grade",
|
|
109
|
+
"min_size",
|
|
110
|
+
"min_market_volume_share",
|
|
111
|
+
"suspicious_only",
|
|
112
|
+
"from",
|
|
113
|
+
"to",
|
|
114
|
+
"sort",
|
|
115
|
+
"limit",
|
|
116
|
+
"cursor",
|
|
117
|
+
],
|
|
118
|
+
listLargeTrades: [
|
|
119
|
+
"category",
|
|
120
|
+
"min_grade",
|
|
121
|
+
"min_size",
|
|
122
|
+
"min_market_volume_share",
|
|
123
|
+
"suspicious_only",
|
|
124
|
+
"since",
|
|
125
|
+
"sort",
|
|
126
|
+
"condition_id",
|
|
127
|
+
"event_slug",
|
|
128
|
+
"limit",
|
|
129
|
+
"cursor",
|
|
130
|
+
],
|
|
131
|
+
listLeaderboard: ["category", "strategy", "sort", "dir", "activity", "limit", "cursor"],
|
|
132
|
+
listLeaderboardLeagues: [],
|
|
133
|
+
listPositions: [
|
|
134
|
+
"wallet",
|
|
135
|
+
"condition_id",
|
|
136
|
+
"category",
|
|
137
|
+
"side",
|
|
138
|
+
"min_grade",
|
|
139
|
+
"min_size",
|
|
140
|
+
"consistency",
|
|
141
|
+
"limit",
|
|
142
|
+
"cursor",
|
|
143
|
+
],
|
|
144
|
+
listSharpMoneyFlows: [
|
|
145
|
+
"timeframe",
|
|
146
|
+
"category",
|
|
147
|
+
"platform",
|
|
148
|
+
"min_grade",
|
|
149
|
+
"direction",
|
|
150
|
+
"condition_id",
|
|
151
|
+
"event_slug",
|
|
152
|
+
"limit",
|
|
153
|
+
"cursor",
|
|
154
|
+
],
|
|
155
|
+
listSuspiciousTrades: ["min_suspicion", "severity", "mode", "limit", "cursor"],
|
|
156
|
+
listTrendingWallets: ["window", "limit", "cursor"],
|
|
157
|
+
listWebhookDeliveries: ["limit", "cursor"],
|
|
158
|
+
listWebhookEvents: [],
|
|
159
|
+
listWebhooks: [],
|
|
160
|
+
searchContent: ["q", "limit"],
|
|
161
|
+
searchMarkets: ["q", "status", "category", "limit", "cursor"],
|
|
162
|
+
});
|
|
163
|
+
/**
|
|
164
|
+
* Reads the MCP catalog serves (`backend/src/mcp/tools/contract.rs`) on a
|
|
165
|
+
* path the general rule below excludes. None changes state, and neither
|
|
166
|
+
* webhook read returns the signing secret: the OpenAPI document returns it
|
|
167
|
+
* only on create and rotation.
|
|
168
|
+
*/
|
|
169
|
+
const CATALOG_READS = new Set([
|
|
170
|
+
"listWebhooks",
|
|
171
|
+
"getWebhook",
|
|
172
|
+
"getTraderExportSnapshot",
|
|
173
|
+
]);
|
|
174
|
+
const READ_ONLY_POSTS = new Set(READ_ONLY_POST_OPERATIONS);
|
|
175
|
+
const EXCLUDED_PATH = /\/(webhooks|stream|mcp)(\/|$)|\/export(\/|$)|\.md$/;
|
|
176
|
+
/**
|
|
177
|
+
* Whether `api call` may run an operation: a JSON GET outside webhook
|
|
178
|
+
* administration, streams, MCP, exports and Markdown, one of the catalog
|
|
179
|
+
* reads above, or a read-only POST batch. Every other write stays refused.
|
|
180
|
+
*/
|
|
181
|
+
export function isCliCallable(operation) {
|
|
182
|
+
if (READ_ONLY_POSTS.has(operation.operationId))
|
|
183
|
+
return true;
|
|
184
|
+
if (operation.method !== "GET" || "kind" in operation)
|
|
185
|
+
return false;
|
|
186
|
+
return CATALOG_READS.has(operation.operationId) || !EXCLUDED_PATH.test(operation.path);
|
|
187
|
+
}
|
|
188
|
+
export function pathParameters(path) {
|
|
189
|
+
return [...path.matchAll(/\{([^}]+)\}/g)].flatMap((match) => match[1] === undefined ? [] : [match[1]]);
|
|
190
|
+
}
|
|
191
|
+
function isTabled(operationId) {
|
|
192
|
+
return Object.hasOwn(QUERY_PARAMETERS, operationId);
|
|
193
|
+
}
|
|
194
|
+
/** Every operation `api call` accepts, in registry order. */
|
|
195
|
+
export function cliOperations(commandFor) {
|
|
196
|
+
return API_CLIENT_OPERATIONS.filter(isCliCallable).map((operation) => ({
|
|
197
|
+
operation_id: operation.operationId,
|
|
198
|
+
method: operation.method,
|
|
199
|
+
path: operation.path,
|
|
200
|
+
path_parameters: pathParameters(operation.path),
|
|
201
|
+
query_parameters: isTabled(operation.operationId)
|
|
202
|
+
? QUERY_PARAMETERS[operation.operationId]
|
|
203
|
+
: [],
|
|
204
|
+
body: operation.method !== "GET",
|
|
205
|
+
command: commandFor(operation.operationId),
|
|
206
|
+
}));
|
|
207
|
+
}
|
|
208
|
+
function distance(a, b) {
|
|
209
|
+
let previous = Array.from({ length: b.length + 1 }, (_, index) => index);
|
|
210
|
+
for (let i = 1; i <= a.length; i++) {
|
|
211
|
+
const current = [i];
|
|
212
|
+
for (let j = 1; j <= b.length; j++) {
|
|
213
|
+
const substitution = (previous[j - 1] ?? 0) + (a[i - 1] === b[j - 1] ? 0 : 1);
|
|
214
|
+
current.push(Math.min((previous[j] ?? 0) + 1, (current[j - 1] ?? 0) + 1, substitution));
|
|
215
|
+
}
|
|
216
|
+
previous = current;
|
|
217
|
+
}
|
|
218
|
+
return previous[b.length] ?? 0;
|
|
219
|
+
}
|
|
220
|
+
// `getGames` should find `listGames`, whose noun matches, as well as `getGame`.
|
|
221
|
+
const VERB = /^(get|list|search|explore|batch|fetch|read|show)(?=[A-Z])/;
|
|
222
|
+
function noun(id) {
|
|
223
|
+
return id.replace(VERB, "").toLowerCase();
|
|
224
|
+
}
|
|
225
|
+
/** Up to 3 callable ids closest to an unknown one, nearest first. */
|
|
226
|
+
export function suggestOperations(input, candidates) {
|
|
227
|
+
const wanted = input.toLowerCase();
|
|
228
|
+
const wantedNoun = noun(input);
|
|
229
|
+
return candidates
|
|
230
|
+
.map((id) => ({
|
|
231
|
+
id,
|
|
232
|
+
score: Math.min(distance(wanted, id.toLowerCase()), distance(wantedNoun, noun(id))),
|
|
233
|
+
}))
|
|
234
|
+
.filter(({ score }) => score <= Math.max(2, Math.floor(wanted.length / 4)))
|
|
235
|
+
.sort((a, b) => a.score - b.score || a.id.localeCompare(b.id))
|
|
236
|
+
.slice(0, 3)
|
|
237
|
+
.map(({ id }) => id);
|
|
238
|
+
}
|
|
239
|
+
//# sourceMappingURL=operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operations.js","sourceRoot":"","sources":["../../src/product-cli/operations.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,yBAAyB,GAG1B,MAAM,MAAM,CAAC;AAqBd;;;;;;GAMG;AACH,SAAS,kBAAkB,CACzB,KAIC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,+EAA+E;AAC/E,+DAA+D;AAC/D,uDAAuD;AACvD,MAAM,gBAAgB,GAAe,kBAAkB,CAAC;IACtD,kBAAkB,EAAE,EAAE;IACtB,eAAe,EAA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I,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;SAC1E,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SAC7D,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC;AACzB,CAAC"}
|
package/dist/prompts/index.js
CHANGED
|
@@ -11,13 +11,13 @@ export function registerPrompts(server) {
|
|
|
11
11
|
role: "user",
|
|
12
12
|
content: {
|
|
13
13
|
type: "text",
|
|
14
|
-
text: `Analyze the prediction market trader identified by ${address}. Use the get_trader tool with
|
|
14
|
+
text: `Analyze the prediction market trader identified by ${address}. Use the get_trader tool with the strategy and categories expand fields to get comprehensive data.
|
|
15
15
|
|
|
16
16
|
Provide:
|
|
17
17
|
1. **Overview** — Grade, score, rank, and what tier they fall in
|
|
18
18
|
2. **P&L Analysis** — Total, realized vs unrealized, recent trends (7d/30d)
|
|
19
19
|
3. **Strategy** — What type of trader they are and how they operate
|
|
20
|
-
4. **Risk Profile** —
|
|
20
|
+
4. **Risk Profile** — the sports and esports record in pnl.in_scope (realized P&L, settled markets, win rate) and what it says about consistency
|
|
21
21
|
5. **Category Strengths** — Where they perform best/worst
|
|
22
22
|
6. **Key Takeaway** — One-paragraph summary of whether this trader is worth following and why`,
|
|
23
23
|
},
|