@pgnio/helios-mcp 0.0.0-stage → 0.2.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 +44 -2
- package/dist/chunk-EIAUO3XE.mjs +2955 -0
- package/dist/chunk-NCF7ASJB.mjs +2986 -0
- package/dist/chunk-NWGWXYTS.mjs +2964 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +2968 -0
- package/dist/cli.mjs +24 -0
- package/dist/index.d.mts +2138 -0
- package/dist/index.d.ts +2138 -0
- package/dist/index.js +3043 -0
- package/dist/index.mjs +52 -0
- package/docs/ai-agent-indicators/00_index.txt +210 -0
- package/docs/ai-agent-indicators/activity_ratio.txt +166 -0
- package/docs/ai-agent-indicators/activity_zscore.txt +166 -0
- package/docs/ai-agent-indicators/bayesian_overbought.txt +134 -0
- package/docs/ai-agent-indicators/directional_efficiency.txt +134 -0
- package/docs/ai-agent-indicators/hfi.txt +172 -0
- package/docs/ai-agent-indicators/hfi_weights.txt +124 -0
- package/docs/ai-agent-indicators/hmi.txt +305 -0
- package/docs/ai-agent-indicators/hmi_velocity.txt +155 -0
- package/docs/ai-agent-indicators/hurst_exponent.txt +136 -0
- package/docs/ai-agent-indicators/macd_divergence.txt +133 -0
- package/docs/ai-agent-indicators/macd_histogram.txt +145 -0
- package/docs/ai-agent-indicators/macd_signal.txt +119 -0
- package/docs/ai-agent-indicators/market_structure.txt +201 -0
- package/docs/ai-agent-indicators/poc.txt +131 -0
- package/docs/ai-agent-indicators/poc_distance.txt +129 -0
- package/docs/ai-agent-indicators/regime.txt +225 -0
- package/docs/ai-agent-indicators/rsi_divergence.txt +145 -0
- package/docs/ai-agent-indicators/squeeze_duration.txt +115 -0
- package/docs/ai-agent-indicators/squeeze_energy.txt +128 -0
- package/docs/ai-agent-indicators/support_resistance.txt +169 -0
- package/docs/ai-agent-indicators/tf_alignment.txt +165 -0
- package/docs/ai-agent-indicators/trend_interpretation.txt +98 -0
- package/docs/ai-agent-indicators/trend_strength.txt +134 -0
- package/docs/ai-agent-indicators/value_area_position.txt +142 -0
- package/docs/ai-agent-indicators/volatility_clustering.txt +160 -0
- package/docs/ai-agent-indicators/volatility_squeeze.txt +169 -0
- package/docs/ai-agent-indicators/volume_change_point.txt +151 -0
- package/docs/ai-agent-indicators/vwap.txt +133 -0
- package/docs/ai-agent-indicators/vwap_zscore.txt +154 -0
- package/docs/ai-agent-indicators/weighted_rsi.txt +148 -0
- package/docs/ai-agent-mcp/00_index.txt +110 -0
- package/docs/ai-agent-mcp/01_auth/00_overview.txt +51 -0
- package/docs/ai-agent-mcp/01_auth/01_tools.txt +94 -0
- package/docs/ai-agent-mcp/01_auth/02_data_contracts.txt +38 -0
- package/docs/ai-agent-mcp/01_auth/03_decision_rules.txt +25 -0
- package/docs/ai-agent-mcp/01_auth/04_failures_and_recovery.txt +46 -0
- package/docs/ai-agent-mcp/02_account/00_overview.txt +29 -0
- package/docs/ai-agent-mcp/02_account/01_tools.txt +67 -0
- package/docs/ai-agent-mcp/02_account/02_data_contracts.txt +34 -0
- package/docs/ai-agent-mcp/02_account/03_decision_rules.txt +17 -0
- package/docs/ai-agent-mcp/02_account/04_failures_and_recovery.txt +17 -0
- package/docs/ai-agent-mcp/03_market/00_overview.txt +27 -0
- package/docs/ai-agent-mcp/03_market/01_tools.txt +102 -0
- package/docs/ai-agent-mcp/03_market/02_data_contracts.txt +39 -0
- package/docs/ai-agent-mcp/03_market/03_decision_rules.txt +22 -0
- package/docs/ai-agent-mcp/03_market/04_failures_and_recovery.txt +18 -0
- package/docs/ai-agent-mcp/04_trading/00_overview.txt +25 -0
- package/docs/ai-agent-mcp/04_trading/01_tools.txt +123 -0
- package/docs/ai-agent-mcp/04_trading/02_data_contracts.txt +42 -0
- package/docs/ai-agent-mcp/04_trading/03_decision_rules.txt +30 -0
- package/docs/ai-agent-mcp/04_trading/04_failures_and_recovery.txt +25 -0
- package/docs/ai-agent-mcp/05_ledger/00_overview.txt +31 -0
- package/docs/ai-agent-mcp/05_ledger/01_tools.txt +80 -0
- package/docs/ai-agent-mcp/05_ledger/02_data_contracts.txt +46 -0
- package/docs/ai-agent-mcp/05_ledger/03_decision_rules.txt +44 -0
- package/docs/ai-agent-mcp/05_ledger/04_failures_and_recovery.txt +24 -0
- package/package.json +66 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2138 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
|
|
4
|
+
declare const agentDeviceStartInputSchema: z.ZodObject<{
|
|
5
|
+
clientName: z.ZodString;
|
|
6
|
+
scope: z.ZodArray<z.ZodEnum<{
|
|
7
|
+
"account:read": "account:read";
|
|
8
|
+
"market:read": "market:read";
|
|
9
|
+
"orders:write": "orders:write";
|
|
10
|
+
"orders:cancel": "orders:cancel";
|
|
11
|
+
}>>;
|
|
12
|
+
constraints: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
declare const agentDeviceStartOutputSchema: z.ZodObject<{
|
|
15
|
+
deviceCode: z.ZodString;
|
|
16
|
+
userCode: z.ZodString;
|
|
17
|
+
verificationUri: z.ZodString;
|
|
18
|
+
verificationUriComplete: z.ZodString;
|
|
19
|
+
expiresInSeconds: z.ZodNumber;
|
|
20
|
+
pollIntervalSeconds: z.ZodNumber;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
declare const agentTokenResponseSchema: z.ZodObject<{
|
|
23
|
+
accessToken: z.ZodString;
|
|
24
|
+
refreshToken: z.ZodString;
|
|
25
|
+
tokenType: z.ZodLiteral<"Bearer">;
|
|
26
|
+
expiresInSeconds: z.ZodNumber;
|
|
27
|
+
scope: z.ZodArray<z.ZodEnum<{
|
|
28
|
+
"account:read": "account:read";
|
|
29
|
+
"market:read": "market:read";
|
|
30
|
+
"orders:write": "orders:write";
|
|
31
|
+
"orders:cancel": "orders:cancel";
|
|
32
|
+
}>>;
|
|
33
|
+
ownerUserId: z.ZodString;
|
|
34
|
+
agentGrantId: z.ZodString;
|
|
35
|
+
}, z.core.$strip>;
|
|
36
|
+
/** Public Helios trades on Hyperliquid only; 'binance' is no longer accepted anywhere a provider is given. */
|
|
37
|
+
declare const providerSchema: z.ZodEnum<{
|
|
38
|
+
hyperliquid: "hyperliquid";
|
|
39
|
+
}>;
|
|
40
|
+
declare const walletStateSchema: z.ZodObject<{
|
|
41
|
+
provider: z.ZodLiteral<"hyperliquid">;
|
|
42
|
+
accountValue: z.ZodNumber;
|
|
43
|
+
availableBalance: z.ZodNumber;
|
|
44
|
+
withdrawable: z.ZodNumber;
|
|
45
|
+
totalMarginUsed: z.ZodNumber;
|
|
46
|
+
totalNotionalPosition: z.ZodNumber;
|
|
47
|
+
crossMarginAccountValue: z.ZodNumber;
|
|
48
|
+
isActivated: z.ZodBoolean;
|
|
49
|
+
fetchedAt: z.ZodString;
|
|
50
|
+
}, z.core.$strip>;
|
|
51
|
+
declare const openPositionsSnapshotSchema: z.ZodObject<{
|
|
52
|
+
provider: z.ZodLiteral<"hyperliquid">;
|
|
53
|
+
fetchedAt: z.ZodString;
|
|
54
|
+
totalUnrealizedPnl: z.ZodNumber;
|
|
55
|
+
positions: z.ZodArray<z.ZodObject<{
|
|
56
|
+
symbol: z.ZodString;
|
|
57
|
+
side: z.ZodEnum<{
|
|
58
|
+
LONG: "LONG";
|
|
59
|
+
SHORT: "SHORT";
|
|
60
|
+
}>;
|
|
61
|
+
size: z.ZodNumber;
|
|
62
|
+
entryPrice: z.ZodNumber;
|
|
63
|
+
markPrice: z.ZodNumber;
|
|
64
|
+
unrealizedPnl: z.ZodNumber;
|
|
65
|
+
margin: z.ZodNumber;
|
|
66
|
+
leverage: z.ZodNumber;
|
|
67
|
+
liquidationPrice: z.ZodOptional<z.ZodNumber>;
|
|
68
|
+
}, z.core.$strip>>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
declare const portfolioInputSchema: z.ZodObject<{
|
|
71
|
+
provider: z.ZodEnum<{
|
|
72
|
+
hyperliquid: "hyperliquid";
|
|
73
|
+
}>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
declare const portfolioSnapshotSchema: z.ZodObject<{
|
|
76
|
+
provider: z.ZodLiteral<"hyperliquid">;
|
|
77
|
+
totalBalance: z.ZodNumber;
|
|
78
|
+
availableBalance: z.ZodNumber;
|
|
79
|
+
totalMargin: z.ZodNumber;
|
|
80
|
+
unrealizedPnl: z.ZodNumber;
|
|
81
|
+
positions: z.ZodArray<z.ZodObject<{
|
|
82
|
+
symbol: z.ZodString;
|
|
83
|
+
side: z.ZodEnum<{
|
|
84
|
+
LONG: "LONG";
|
|
85
|
+
SHORT: "SHORT";
|
|
86
|
+
}>;
|
|
87
|
+
size: z.ZodNumber;
|
|
88
|
+
entryPrice: z.ZodNumber;
|
|
89
|
+
markPrice: z.ZodNumber;
|
|
90
|
+
unrealizedPnl: z.ZodNumber;
|
|
91
|
+
margin: z.ZodNumber;
|
|
92
|
+
leverage: z.ZodNumber;
|
|
93
|
+
liquidationPrice: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
}, z.core.$strip>>;
|
|
95
|
+
protectiveOrders: z.ZodArray<z.ZodObject<{
|
|
96
|
+
id: z.ZodString;
|
|
97
|
+
binanceOrderId: z.ZodOptional<z.ZodNumber>;
|
|
98
|
+
clientOrderId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
symbol: z.ZodString;
|
|
100
|
+
side: z.ZodEnum<{
|
|
101
|
+
BUY: "BUY";
|
|
102
|
+
SELL: "SELL";
|
|
103
|
+
}>;
|
|
104
|
+
positionSide: z.ZodEnum<{
|
|
105
|
+
LONG: "LONG";
|
|
106
|
+
SHORT: "SHORT";
|
|
107
|
+
BOTH: "BOTH";
|
|
108
|
+
}>;
|
|
109
|
+
status: z.ZodString;
|
|
110
|
+
kind: z.ZodEnum<{
|
|
111
|
+
STOP_LOSS: "STOP_LOSS";
|
|
112
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
113
|
+
}>;
|
|
114
|
+
groupId: z.ZodString;
|
|
115
|
+
stopPrice: z.ZodOptional<z.ZodString>;
|
|
116
|
+
parentClientOrderId: z.ZodOptional<z.ZodString>;
|
|
117
|
+
assetId: z.ZodOptional<z.ZodNumber>;
|
|
118
|
+
createdAt: z.ZodString;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
}, z.core.$strip>;
|
|
121
|
+
declare const ledgerFillsInputSchema: z.ZodObject<{
|
|
122
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
123
|
+
"24h": "24h";
|
|
124
|
+
"7d": "7d";
|
|
125
|
+
"30d": "30d";
|
|
126
|
+
}>>;
|
|
127
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
before: z.ZodOptional<z.ZodNumber>;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
declare const ledgerFillsPageSchema: z.ZodObject<{
|
|
131
|
+
window: z.ZodEnum<{
|
|
132
|
+
"24h": "24h";
|
|
133
|
+
"7d": "7d";
|
|
134
|
+
"30d": "30d";
|
|
135
|
+
}>;
|
|
136
|
+
limit: z.ZodNumber;
|
|
137
|
+
before: z.ZodOptional<z.ZodNumber>;
|
|
138
|
+
hasMore: z.ZodBoolean;
|
|
139
|
+
nextBefore: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
fetchedAt: z.ZodString;
|
|
141
|
+
fills: z.ZodArray<z.ZodObject<{
|
|
142
|
+
coin: z.ZodString;
|
|
143
|
+
px: z.ZodNumber;
|
|
144
|
+
sz: z.ZodNumber;
|
|
145
|
+
side: z.ZodEnum<{
|
|
146
|
+
B: "B";
|
|
147
|
+
A: "A";
|
|
148
|
+
}>;
|
|
149
|
+
time: z.ZodNumber;
|
|
150
|
+
dir: z.ZodString;
|
|
151
|
+
closedPnl: z.ZodNumber;
|
|
152
|
+
fee: z.ZodNumber;
|
|
153
|
+
crossed: z.ZodBoolean;
|
|
154
|
+
oid: z.ZodNumber;
|
|
155
|
+
tid: z.ZodNumber;
|
|
156
|
+
}, z.core.$strip>>;
|
|
157
|
+
}, z.core.$strip>;
|
|
158
|
+
declare const ledgerSummaryInputSchema: z.ZodObject<{
|
|
159
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
"24h": "24h";
|
|
161
|
+
"7d": "7d";
|
|
162
|
+
"30d": "30d";
|
|
163
|
+
}>>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
declare const ledgerSummarySchema: z.ZodObject<{
|
|
166
|
+
realizedPnl: z.ZodNumber;
|
|
167
|
+
totalFees: z.ZodNumber;
|
|
168
|
+
fillCount: z.ZodNumber;
|
|
169
|
+
closeCount: z.ZodNumber;
|
|
170
|
+
winCount: z.ZodNumber;
|
|
171
|
+
lossCount: z.ZodNumber;
|
|
172
|
+
averageWin: z.ZodNumber;
|
|
173
|
+
averageLoss: z.ZodNumber;
|
|
174
|
+
window: z.ZodEnum<{
|
|
175
|
+
"24h": "24h";
|
|
176
|
+
"7d": "7d";
|
|
177
|
+
"30d": "30d";
|
|
178
|
+
}>;
|
|
179
|
+
generatedAt: z.ZodString;
|
|
180
|
+
periods: z.ZodObject<{
|
|
181
|
+
'24h': z.ZodObject<{
|
|
182
|
+
realizedPnl: z.ZodNumber;
|
|
183
|
+
totalFees: z.ZodNumber;
|
|
184
|
+
fillCount: z.ZodNumber;
|
|
185
|
+
closeCount: z.ZodNumber;
|
|
186
|
+
winCount: z.ZodNumber;
|
|
187
|
+
lossCount: z.ZodNumber;
|
|
188
|
+
averageWin: z.ZodNumber;
|
|
189
|
+
averageLoss: z.ZodNumber;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
'7d': z.ZodObject<{
|
|
192
|
+
realizedPnl: z.ZodNumber;
|
|
193
|
+
totalFees: z.ZodNumber;
|
|
194
|
+
fillCount: z.ZodNumber;
|
|
195
|
+
closeCount: z.ZodNumber;
|
|
196
|
+
winCount: z.ZodNumber;
|
|
197
|
+
lossCount: z.ZodNumber;
|
|
198
|
+
averageWin: z.ZodNumber;
|
|
199
|
+
averageLoss: z.ZodNumber;
|
|
200
|
+
}, z.core.$strip>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
declare const marketSnapshotInputSchema: z.ZodObject<{
|
|
204
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
205
|
+
selected: "selected";
|
|
206
|
+
all: "all";
|
|
207
|
+
}>>;
|
|
208
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
209
|
+
}, z.core.$strip>;
|
|
210
|
+
declare const marketSnapshotChunkInputSchema: z.ZodObject<{
|
|
211
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
212
|
+
selected: "selected";
|
|
213
|
+
all: "all";
|
|
214
|
+
}>>;
|
|
215
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
216
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
declare const marketSnapshotSchema: z.ZodObject<{
|
|
220
|
+
schema: z.ZodLiteral<"helios.market_snapshot.v1">;
|
|
221
|
+
view: z.ZodLiteral<"market_overview">;
|
|
222
|
+
scope: z.ZodEnum<{
|
|
223
|
+
selected: "selected";
|
|
224
|
+
all: "all";
|
|
225
|
+
explicit: "explicit";
|
|
226
|
+
}>;
|
|
227
|
+
symbolCount: z.ZodNumber;
|
|
228
|
+
generatedAt: z.ZodString;
|
|
229
|
+
returnedSymbols: z.ZodArray<z.ZodString>;
|
|
230
|
+
semantics: z.ZodObject<{
|
|
231
|
+
nullMeans: z.ZodLiteral<"unavailable">;
|
|
232
|
+
percentScale: z.ZodLiteral<"already_percent">;
|
|
233
|
+
percentFields: z.ZodArray<z.ZodString>;
|
|
234
|
+
changeMapPercentKeys: z.ZodArray<z.ZodString>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
market: z.ZodObject<{
|
|
237
|
+
fieldIds: z.ZodArray<z.ZodString>;
|
|
238
|
+
values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
239
|
+
symbolLists: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
240
|
+
}, z.core.$strip>;
|
|
241
|
+
table: z.ZodObject<{
|
|
242
|
+
fieldIds: z.ZodArray<z.ZodString>;
|
|
243
|
+
rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
244
|
+
}, z.core.$strip>;
|
|
245
|
+
legend: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
246
|
+
}, z.core.$strip>;
|
|
247
|
+
declare const marketSnapshotChunkSchema: z.ZodObject<{
|
|
248
|
+
schema: z.ZodLiteral<"helios.market_snapshot_chunk.v1">;
|
|
249
|
+
view: z.ZodLiteral<"market_overview_chunk">;
|
|
250
|
+
scope: z.ZodEnum<{
|
|
251
|
+
selected: "selected";
|
|
252
|
+
all: "all";
|
|
253
|
+
explicit: "explicit";
|
|
254
|
+
}>;
|
|
255
|
+
totalSymbolCount: z.ZodNumber;
|
|
256
|
+
generatedAt: z.ZodString;
|
|
257
|
+
offset: z.ZodNumber;
|
|
258
|
+
limit: z.ZodNumber;
|
|
259
|
+
chunkSymbolCount: z.ZodNumber;
|
|
260
|
+
hasMore: z.ZodBoolean;
|
|
261
|
+
nextOffset: z.ZodOptional<z.ZodNumber>;
|
|
262
|
+
returnedSymbols: z.ZodArray<z.ZodString>;
|
|
263
|
+
semantics: z.ZodObject<{
|
|
264
|
+
nullMeans: z.ZodLiteral<"unavailable">;
|
|
265
|
+
percentScale: z.ZodLiteral<"already_percent">;
|
|
266
|
+
percentFields: z.ZodArray<z.ZodString>;
|
|
267
|
+
changeMapPercentKeys: z.ZodArray<z.ZodString>;
|
|
268
|
+
}, z.core.$strip>;
|
|
269
|
+
market: z.ZodObject<{
|
|
270
|
+
fieldIds: z.ZodArray<z.ZodString>;
|
|
271
|
+
values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
272
|
+
symbolLists: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
273
|
+
}, z.core.$strip>;
|
|
274
|
+
table: z.ZodObject<{
|
|
275
|
+
fieldIds: z.ZodArray<z.ZodString>;
|
|
276
|
+
rows: z.ZodArray<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>>;
|
|
277
|
+
}, z.core.$strip>;
|
|
278
|
+
legend: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
declare const marketSymbolDetailInputSchema: z.ZodObject<{
|
|
281
|
+
symbol: z.ZodString;
|
|
282
|
+
}, z.core.$strip>;
|
|
283
|
+
declare const marketSymbolDetailSchema: z.ZodObject<{
|
|
284
|
+
schema: z.ZodLiteral<"helios.market_symbol_detail.v1">;
|
|
285
|
+
generatedAt: z.ZodString;
|
|
286
|
+
symbol: z.ZodString;
|
|
287
|
+
semantics: z.ZodObject<{
|
|
288
|
+
nullMeans: z.ZodLiteral<"unavailable">;
|
|
289
|
+
percentScale: z.ZodLiteral<"already_percent">;
|
|
290
|
+
percentFields: z.ZodArray<z.ZodString>;
|
|
291
|
+
changeMapPercentKeys: z.ZodArray<z.ZodString>;
|
|
292
|
+
}, z.core.$strip>;
|
|
293
|
+
market: z.ZodObject<{
|
|
294
|
+
fieldIds: z.ZodArray<z.ZodString>;
|
|
295
|
+
values: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
296
|
+
symbolLists: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
297
|
+
}, z.core.$strip>;
|
|
298
|
+
row: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
299
|
+
symbolCtx: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
|
|
300
|
+
changeMap: z.ZodRecord<z.ZodString, z.ZodNullable<z.ZodNumber>>;
|
|
301
|
+
metrics: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
302
|
+
legend: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
303
|
+
}, z.core.$strip>;
|
|
304
|
+
declare const submitTradeIntentInputSchema: z.ZodObject<{
|
|
305
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
306
|
+
hyperliquid: "hyperliquid";
|
|
307
|
+
}>>;
|
|
308
|
+
symbol: z.ZodString;
|
|
309
|
+
intentType: z.ZodEnum<{
|
|
310
|
+
OPEN: "OPEN";
|
|
311
|
+
DCA: "DCA";
|
|
312
|
+
REVERSE: "REVERSE";
|
|
313
|
+
CLOSE: "CLOSE";
|
|
314
|
+
}>;
|
|
315
|
+
direction: z.ZodEnum<{
|
|
316
|
+
LONG: "LONG";
|
|
317
|
+
SHORT: "SHORT";
|
|
318
|
+
}>;
|
|
319
|
+
size: z.ZodObject<{
|
|
320
|
+
mode: z.ZodEnum<{
|
|
321
|
+
MARGIN_USD: "MARGIN_USD";
|
|
322
|
+
BASE_QUANTITY: "BASE_QUANTITY";
|
|
323
|
+
}>;
|
|
324
|
+
value: z.ZodNumber;
|
|
325
|
+
}, z.core.$strip>;
|
|
326
|
+
execution: z.ZodObject<{
|
|
327
|
+
style: z.ZodEnum<{
|
|
328
|
+
MARKET: "MARKET";
|
|
329
|
+
LIMIT_TAKER: "LIMIT_TAKER";
|
|
330
|
+
LIMIT_MAKER: "LIMIT_MAKER";
|
|
331
|
+
LIMIT_GTC: "LIMIT_GTC";
|
|
332
|
+
}>;
|
|
333
|
+
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
334
|
+
GTC: "GTC";
|
|
335
|
+
IOC: "IOC";
|
|
336
|
+
FOK: "FOK";
|
|
337
|
+
GTX: "GTX";
|
|
338
|
+
}>>;
|
|
339
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
340
|
+
}, z.core.$strip>;
|
|
341
|
+
maxSlippageBps: z.ZodOptional<z.ZodNumber>;
|
|
342
|
+
leverageOverride: z.ZodOptional<z.ZodNumber>;
|
|
343
|
+
marginModeOverride: z.ZodOptional<z.ZodEnum<{
|
|
344
|
+
ISOLATED: "ISOLATED";
|
|
345
|
+
CROSS: "CROSS";
|
|
346
|
+
}>>;
|
|
347
|
+
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
348
|
+
protection: z.ZodOptional<z.ZodObject<{
|
|
349
|
+
takeProfit: z.ZodOptional<z.ZodObject<{
|
|
350
|
+
kind: z.ZodEnum<{
|
|
351
|
+
MARKET: "MARKET";
|
|
352
|
+
LIMIT: "LIMIT";
|
|
353
|
+
}>;
|
|
354
|
+
triggerPrice: z.ZodNumber;
|
|
355
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
356
|
+
}, z.core.$strip>>;
|
|
357
|
+
stopLoss: z.ZodOptional<z.ZodObject<{
|
|
358
|
+
kind: z.ZodEnum<{
|
|
359
|
+
MARKET: "MARKET";
|
|
360
|
+
LIMIT: "LIMIT";
|
|
361
|
+
}>;
|
|
362
|
+
triggerPrice: z.ZodNumber;
|
|
363
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
364
|
+
}, z.core.$strip>>;
|
|
365
|
+
}, z.core.$strip>>;
|
|
366
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
367
|
+
}, z.core.$strip>;
|
|
368
|
+
declare const submitTradeIntentResultSchema: z.ZodObject<{
|
|
369
|
+
status: z.ZodLiteral<"submitted">;
|
|
370
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
371
|
+
placed: "placed";
|
|
372
|
+
replayed: "replayed";
|
|
373
|
+
}>>;
|
|
374
|
+
clientOrderId: z.ZodOptional<z.ZodString>;
|
|
375
|
+
orderStatus: z.ZodOptional<z.ZodString>;
|
|
376
|
+
rejectedProtection: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
377
|
+
kind: z.ZodString;
|
|
378
|
+
reason: z.ZodString;
|
|
379
|
+
}, z.core.$strip>>>;
|
|
380
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
381
|
+
hyperliquid: "hyperliquid";
|
|
382
|
+
}>>;
|
|
383
|
+
symbol: z.ZodString;
|
|
384
|
+
intentType: z.ZodEnum<{
|
|
385
|
+
OPEN: "OPEN";
|
|
386
|
+
DCA: "DCA";
|
|
387
|
+
REVERSE: "REVERSE";
|
|
388
|
+
CLOSE: "CLOSE";
|
|
389
|
+
}>;
|
|
390
|
+
direction: z.ZodEnum<{
|
|
391
|
+
LONG: "LONG";
|
|
392
|
+
SHORT: "SHORT";
|
|
393
|
+
}>;
|
|
394
|
+
size: z.ZodObject<{
|
|
395
|
+
mode: z.ZodEnum<{
|
|
396
|
+
MARGIN_USD: "MARGIN_USD";
|
|
397
|
+
BASE_QUANTITY: "BASE_QUANTITY";
|
|
398
|
+
}>;
|
|
399
|
+
value: z.ZodNumber;
|
|
400
|
+
}, z.core.$strip>;
|
|
401
|
+
execution: z.ZodObject<{
|
|
402
|
+
style: z.ZodEnum<{
|
|
403
|
+
MARKET: "MARKET";
|
|
404
|
+
LIMIT_TAKER: "LIMIT_TAKER";
|
|
405
|
+
LIMIT_MAKER: "LIMIT_MAKER";
|
|
406
|
+
LIMIT_GTC: "LIMIT_GTC";
|
|
407
|
+
}>;
|
|
408
|
+
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
409
|
+
GTC: "GTC";
|
|
410
|
+
IOC: "IOC";
|
|
411
|
+
FOK: "FOK";
|
|
412
|
+
GTX: "GTX";
|
|
413
|
+
}>>;
|
|
414
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
415
|
+
}, z.core.$strip>;
|
|
416
|
+
maxSlippageBps: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
leverageOverride: z.ZodOptional<z.ZodNumber>;
|
|
418
|
+
marginModeOverride: z.ZodOptional<z.ZodEnum<{
|
|
419
|
+
ISOLATED: "ISOLATED";
|
|
420
|
+
CROSS: "CROSS";
|
|
421
|
+
}>>;
|
|
422
|
+
reduceOnly: z.ZodBoolean;
|
|
423
|
+
hasProtection: z.ZodBoolean;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
declare const closePositionInputSchema: z.ZodObject<{
|
|
426
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
427
|
+
hyperliquid: "hyperliquid";
|
|
428
|
+
}>>;
|
|
429
|
+
symbol: z.ZodString;
|
|
430
|
+
maxSlippageBps: z.ZodOptional<z.ZodNumber>;
|
|
431
|
+
}, z.core.$strip>;
|
|
432
|
+
declare const closePositionResultSchema: z.ZodObject<{
|
|
433
|
+
status: z.ZodLiteral<"submitted">;
|
|
434
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
435
|
+
hyperliquid: "hyperliquid";
|
|
436
|
+
}>>;
|
|
437
|
+
symbol: z.ZodString;
|
|
438
|
+
mode: z.ZodLiteral<"FULL">;
|
|
439
|
+
maxSlippageBps: z.ZodOptional<z.ZodNumber>;
|
|
440
|
+
}, z.core.$strip>;
|
|
441
|
+
declare const setTpSlInputSchema: z.ZodObject<{
|
|
442
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
443
|
+
hyperliquid: "hyperliquid";
|
|
444
|
+
}>>;
|
|
445
|
+
symbol: z.ZodString;
|
|
446
|
+
applyTo: z.ZodEnum<{
|
|
447
|
+
FULL_POSITION: "FULL_POSITION";
|
|
448
|
+
CUSTOM_QUANTITY: "CUSTOM_QUANTITY";
|
|
449
|
+
}>;
|
|
450
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
451
|
+
parentClientOrderId: z.ZodString;
|
|
452
|
+
takeProfit: z.ZodOptional<z.ZodObject<{
|
|
453
|
+
kind: z.ZodEnum<{
|
|
454
|
+
MARKET: "MARKET";
|
|
455
|
+
LIMIT: "LIMIT";
|
|
456
|
+
}>;
|
|
457
|
+
triggerPrice: z.ZodNumber;
|
|
458
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
459
|
+
}, z.core.$strip>>;
|
|
460
|
+
stopLoss: z.ZodOptional<z.ZodObject<{
|
|
461
|
+
kind: z.ZodEnum<{
|
|
462
|
+
MARKET: "MARKET";
|
|
463
|
+
LIMIT: "LIMIT";
|
|
464
|
+
}>;
|
|
465
|
+
triggerPrice: z.ZodNumber;
|
|
466
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
467
|
+
}, z.core.$strip>>;
|
|
468
|
+
}, z.core.$strip>;
|
|
469
|
+
declare const setTpSlResultSchema: z.ZodObject<{
|
|
470
|
+
status: z.ZodLiteral<"submitted">;
|
|
471
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
472
|
+
hyperliquid: "hyperliquid";
|
|
473
|
+
}>>;
|
|
474
|
+
symbol: z.ZodString;
|
|
475
|
+
applyTo: z.ZodEnum<{
|
|
476
|
+
FULL_POSITION: "FULL_POSITION";
|
|
477
|
+
CUSTOM_QUANTITY: "CUSTOM_QUANTITY";
|
|
478
|
+
}>;
|
|
479
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
480
|
+
parentClientOrderId: z.ZodString;
|
|
481
|
+
hasTakeProfit: z.ZodBoolean;
|
|
482
|
+
hasStopLoss: z.ZodBoolean;
|
|
483
|
+
}, z.core.$strip>;
|
|
484
|
+
declare const deleteTpSlInputSchema: z.ZodObject<{
|
|
485
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
486
|
+
hyperliquid: "hyperliquid";
|
|
487
|
+
}>>;
|
|
488
|
+
symbol: z.ZodString;
|
|
489
|
+
orderId: z.ZodString;
|
|
490
|
+
}, z.core.$strip>;
|
|
491
|
+
declare const deleteTpSlResultSchema: z.ZodObject<{
|
|
492
|
+
status: z.ZodLiteral<"deleted">;
|
|
493
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
494
|
+
hyperliquid: "hyperliquid";
|
|
495
|
+
}>>;
|
|
496
|
+
symbol: z.ZodString;
|
|
497
|
+
orderId: z.ZodString;
|
|
498
|
+
}, z.core.$strip>;
|
|
499
|
+
declare const openOrderSchema: z.ZodObject<{
|
|
500
|
+
coin: z.ZodString;
|
|
501
|
+
side: z.ZodEnum<{
|
|
502
|
+
B: "B";
|
|
503
|
+
A: "A";
|
|
504
|
+
}>;
|
|
505
|
+
limitPx: z.ZodString;
|
|
506
|
+
sz: z.ZodString;
|
|
507
|
+
oid: z.ZodNumber;
|
|
508
|
+
timestamp: z.ZodNumber;
|
|
509
|
+
origSz: z.ZodString;
|
|
510
|
+
orderType: z.ZodString;
|
|
511
|
+
tif: z.ZodNullable<z.ZodString>;
|
|
512
|
+
reduceOnly: z.ZodBoolean;
|
|
513
|
+
isTrigger: z.ZodBoolean;
|
|
514
|
+
triggerPx: z.ZodString;
|
|
515
|
+
cloid: z.ZodNullable<z.ZodString>;
|
|
516
|
+
assetId: z.ZodOptional<z.ZodNumber>;
|
|
517
|
+
}, z.core.$strip>;
|
|
518
|
+
declare const cancelOrderInputSchema: z.ZodObject<{
|
|
519
|
+
symbol: z.ZodString;
|
|
520
|
+
oid: z.ZodNumber;
|
|
521
|
+
}, z.core.$strip>;
|
|
522
|
+
declare const cancelOrderResultSchema: z.ZodObject<{
|
|
523
|
+
status: z.ZodLiteral<"cancelled">;
|
|
524
|
+
symbol: z.ZodString;
|
|
525
|
+
oid: z.ZodNumber;
|
|
526
|
+
}, z.core.$strip>;
|
|
527
|
+
type AgentDeviceStartInput = z.infer<typeof agentDeviceStartInputSchema>;
|
|
528
|
+
type AgentDeviceStartOutput = z.infer<typeof agentDeviceStartOutputSchema>;
|
|
529
|
+
type AgentTokenResponse = z.infer<typeof agentTokenResponseSchema>;
|
|
530
|
+
type Provider = z.infer<typeof providerSchema>;
|
|
531
|
+
type WalletState = z.infer<typeof walletStateSchema>;
|
|
532
|
+
type OpenPositionsSnapshot = z.infer<typeof openPositionsSnapshotSchema>;
|
|
533
|
+
type PortfolioInput = z.infer<typeof portfolioInputSchema>;
|
|
534
|
+
type PortfolioSnapshot = z.infer<typeof portfolioSnapshotSchema>;
|
|
535
|
+
type LedgerFillsInput = z.infer<typeof ledgerFillsInputSchema>;
|
|
536
|
+
type LedgerFillsPage = z.infer<typeof ledgerFillsPageSchema>;
|
|
537
|
+
type LedgerSummaryInput = z.infer<typeof ledgerSummaryInputSchema>;
|
|
538
|
+
type LedgerSummary = z.infer<typeof ledgerSummarySchema>;
|
|
539
|
+
type MarketSnapshotInput = z.infer<typeof marketSnapshotInputSchema>;
|
|
540
|
+
type MarketSnapshot = z.infer<typeof marketSnapshotSchema>;
|
|
541
|
+
type MarketSnapshotChunkInput = z.infer<typeof marketSnapshotChunkInputSchema>;
|
|
542
|
+
type MarketSnapshotChunk = z.infer<typeof marketSnapshotChunkSchema>;
|
|
543
|
+
type MarketSymbolDetailInput = z.infer<typeof marketSymbolDetailInputSchema>;
|
|
544
|
+
type MarketSymbolDetail = z.infer<typeof marketSymbolDetailSchema>;
|
|
545
|
+
type SubmitTradeIntentInput = z.infer<typeof submitTradeIntentInputSchema>;
|
|
546
|
+
type SubmitTradeIntentResult = z.infer<typeof submitTradeIntentResultSchema>;
|
|
547
|
+
type ClosePositionInput = z.infer<typeof closePositionInputSchema>;
|
|
548
|
+
type ClosePositionResult = z.infer<typeof closePositionResultSchema>;
|
|
549
|
+
type SetTpSlInput = z.infer<typeof setTpSlInputSchema>;
|
|
550
|
+
type SetTpSlResult = z.infer<typeof setTpSlResultSchema>;
|
|
551
|
+
type DeleteTpSlInput = z.infer<typeof deleteTpSlInputSchema>;
|
|
552
|
+
type DeleteTpSlResult = z.infer<typeof deleteTpSlResultSchema>;
|
|
553
|
+
type OpenOrder = z.infer<typeof openOrderSchema>;
|
|
554
|
+
type CancelOrderInput = z.infer<typeof cancelOrderInputSchema>;
|
|
555
|
+
type CancelOrderResult = z.infer<typeof cancelOrderResultSchema>;
|
|
556
|
+
|
|
557
|
+
type FetchLike = typeof fetch;
|
|
558
|
+
interface HeliosAgentAuthClientOptions {
|
|
559
|
+
baseUrl: string;
|
|
560
|
+
fetch?: FetchLike;
|
|
561
|
+
headers?: HeadersInit;
|
|
562
|
+
}
|
|
563
|
+
declare class HeliosAgentAuthClient {
|
|
564
|
+
private readonly baseUrl;
|
|
565
|
+
private readonly fetchImpl;
|
|
566
|
+
private readonly headers;
|
|
567
|
+
constructor(options: HeliosAgentAuthClientOptions);
|
|
568
|
+
startLogin(input: AgentDeviceStartInput): Promise<AgentDeviceStartOutput>;
|
|
569
|
+
exchangeDeviceCode(deviceCode: string): Promise<AgentTokenResponse>;
|
|
570
|
+
refreshSession(refreshToken: string): Promise<AgentTokenResponse>;
|
|
571
|
+
private post;
|
|
572
|
+
private parseJson;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
interface HeliosAgentDataBridgeClientOptions {
|
|
576
|
+
baseUrl: string;
|
|
577
|
+
fetch?: FetchLike;
|
|
578
|
+
}
|
|
579
|
+
declare class HeliosAgentDataBridgeClient {
|
|
580
|
+
private readonly baseUrl;
|
|
581
|
+
private readonly fetchImpl;
|
|
582
|
+
constructor(options: HeliosAgentDataBridgeClientOptions);
|
|
583
|
+
getWalletState(accessToken: string): Promise<WalletState>;
|
|
584
|
+
getOpenPositions(accessToken: string): Promise<OpenPositionsSnapshot>;
|
|
585
|
+
getPortfolio(accessToken: string, input: PortfolioInput): Promise<PortfolioSnapshot>;
|
|
586
|
+
getLedgerFills(accessToken: string, input?: LedgerFillsInput): Promise<LedgerFillsPage>;
|
|
587
|
+
getLedgerSummary(accessToken: string, input?: LedgerSummaryInput): Promise<LedgerSummary>;
|
|
588
|
+
getMarketSnapshot(accessToken: string, input?: MarketSnapshotInput): Promise<MarketSnapshot>;
|
|
589
|
+
getMarketSnapshotChunk(accessToken: string, input?: MarketSnapshotChunkInput): Promise<MarketSnapshotChunk>;
|
|
590
|
+
getMarketSymbolDetail(accessToken: string, input: MarketSymbolDetailInput): Promise<MarketSymbolDetail>;
|
|
591
|
+
submitTradeIntent(accessToken: string, input: SubmitTradeIntentInput): Promise<SubmitTradeIntentResult>;
|
|
592
|
+
closePosition(accessToken: string, input: ClosePositionInput): Promise<ClosePositionResult>;
|
|
593
|
+
setTpSl(accessToken: string, input: SetTpSlInput): Promise<SetTpSlResult>;
|
|
594
|
+
deleteTpSl(accessToken: string, input: DeleteTpSlInput): Promise<DeleteTpSlResult>;
|
|
595
|
+
getOpenOrders(accessToken: string): Promise<OpenOrder[]>;
|
|
596
|
+
cancelOrder(accessToken: string, input: CancelOrderInput): Promise<CancelOrderResult>;
|
|
597
|
+
private request;
|
|
598
|
+
private buildProcedureUrl;
|
|
599
|
+
private parseJson;
|
|
600
|
+
private unwrapResult;
|
|
601
|
+
private extractErrorCode;
|
|
602
|
+
private extractErrorMessage;
|
|
603
|
+
/**
|
|
604
|
+
* Unwrap a tRPC error envelope, handling the superjson `{ json: ... }` wrapper
|
|
605
|
+
* that the data-bridge applies via its transformer configuration.
|
|
606
|
+
*/
|
|
607
|
+
private unwrapTrpcError;
|
|
608
|
+
}
|
|
609
|
+
declare const storedAgentSessionSchema: z.ZodObject<{
|
|
610
|
+
accessToken: z.ZodString;
|
|
611
|
+
refreshToken: z.ZodString;
|
|
612
|
+
tokenType: z.ZodLiteral<"Bearer">;
|
|
613
|
+
ownerUserId: z.ZodString;
|
|
614
|
+
agentGrantId: z.ZodString;
|
|
615
|
+
scope: z.ZodArray<z.ZodEnum<{
|
|
616
|
+
"account:read": "account:read";
|
|
617
|
+
"market:read": "market:read";
|
|
618
|
+
"orders:write": "orders:write";
|
|
619
|
+
"orders:cancel": "orders:cancel";
|
|
620
|
+
}>>;
|
|
621
|
+
accessTokenExpiresAt: z.ZodString;
|
|
622
|
+
createdAt: z.ZodString;
|
|
623
|
+
lastRefreshedAt: z.ZodString;
|
|
624
|
+
}, z.core.$strip>;
|
|
625
|
+
declare const agentSessionViewSchema: z.ZodObject<{
|
|
626
|
+
connected: z.ZodBoolean;
|
|
627
|
+
status: z.ZodEnum<{
|
|
628
|
+
pending: "pending";
|
|
629
|
+
rejected: "rejected";
|
|
630
|
+
expired: "expired";
|
|
631
|
+
disconnected: "disconnected";
|
|
632
|
+
connected: "connected";
|
|
633
|
+
failed: "failed";
|
|
634
|
+
}>;
|
|
635
|
+
ownerUserId: z.ZodOptional<z.ZodString>;
|
|
636
|
+
agentGrantId: z.ZodOptional<z.ZodString>;
|
|
637
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
638
|
+
"account:read": "account:read";
|
|
639
|
+
"market:read": "market:read";
|
|
640
|
+
"orders:write": "orders:write";
|
|
641
|
+
"orders:cancel": "orders:cancel";
|
|
642
|
+
}>>>;
|
|
643
|
+
accessTokenExpiresAt: z.ZodOptional<z.ZodString>;
|
|
644
|
+
lastRefreshedAt: z.ZodOptional<z.ZodString>;
|
|
645
|
+
}, z.core.$strip>;
|
|
646
|
+
type StoredAgentSession = z.infer<typeof storedAgentSessionSchema>;
|
|
647
|
+
type AgentSessionView = z.infer<typeof agentSessionViewSchema>;
|
|
648
|
+
interface AgentSessionStore {
|
|
649
|
+
getSession(): Promise<StoredAgentSession | null>;
|
|
650
|
+
setSession(session: StoredAgentSession): Promise<void>;
|
|
651
|
+
clearSession(): Promise<void>;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
declare function getDefaultHeliosAgentMcpSessionPath(): string;
|
|
655
|
+
declare const pendingAgentLoginSchema: z.ZodObject<{
|
|
656
|
+
status: z.ZodLiteral<"pending">;
|
|
657
|
+
deviceCode: z.ZodString;
|
|
658
|
+
userCode: z.ZodString;
|
|
659
|
+
verificationUri: z.ZodString;
|
|
660
|
+
verificationUriComplete: z.ZodString;
|
|
661
|
+
expiresInSeconds: z.ZodNumber;
|
|
662
|
+
pollIntervalSeconds: z.ZodNumber;
|
|
663
|
+
requestedScope: z.ZodArray<z.ZodEnum<{
|
|
664
|
+
"account:read": "account:read";
|
|
665
|
+
"market:read": "market:read";
|
|
666
|
+
"orders:write": "orders:write";
|
|
667
|
+
"orders:cancel": "orders:cancel";
|
|
668
|
+
}>>;
|
|
669
|
+
startedAt: z.ZodString;
|
|
670
|
+
}, z.core.$strip>;
|
|
671
|
+
type PendingAgentLogin = z.infer<typeof pendingAgentLoginSchema>;
|
|
672
|
+
interface AgentMcpSessionStore extends AgentSessionStore {
|
|
673
|
+
getActiveProvider(): Promise<Provider | null>;
|
|
674
|
+
setActiveProvider(provider: Provider): Promise<void>;
|
|
675
|
+
clearActiveProvider(): Promise<void>;
|
|
676
|
+
getPendingLogin(): Promise<PendingAgentLogin | null>;
|
|
677
|
+
setPendingLogin(pendingLogin: PendingAgentLogin): Promise<void>;
|
|
678
|
+
clearPendingLogin(): Promise<void>;
|
|
679
|
+
}
|
|
680
|
+
declare class FileAgentSessionStore implements AgentMcpSessionStore {
|
|
681
|
+
private readonly filePath;
|
|
682
|
+
constructor(filePath?: string);
|
|
683
|
+
getSession(): Promise<StoredAgentSession | null>;
|
|
684
|
+
getPendingLogin(): Promise<PendingAgentLogin | null>;
|
|
685
|
+
getActiveProvider(): Promise<Provider | null>;
|
|
686
|
+
setSession(session: StoredAgentSession): Promise<void>;
|
|
687
|
+
setPendingLogin(pendingLogin: PendingAgentLogin): Promise<void>;
|
|
688
|
+
setActiveProvider(activeProvider: Provider): Promise<void>;
|
|
689
|
+
clearSession(): Promise<void>;
|
|
690
|
+
clearPendingLogin(): Promise<void>;
|
|
691
|
+
clearActiveProvider(): Promise<void>;
|
|
692
|
+
private readState;
|
|
693
|
+
private writeState;
|
|
694
|
+
private writeStateOrDelete;
|
|
695
|
+
private deleteFile;
|
|
696
|
+
}
|
|
697
|
+
/**
|
|
698
|
+
* One request's session on the hosted server: the AI app's OAuth access token, held in memory for that request only.
|
|
699
|
+
* Nothing is written to disk and the provider is Hyperliquid unless the agent pins another for this request.
|
|
700
|
+
*/
|
|
701
|
+
declare class MemoryAgentMcpSessionStore implements AgentMcpSessionStore {
|
|
702
|
+
private session;
|
|
703
|
+
private activeProvider;
|
|
704
|
+
private pendingLogin;
|
|
705
|
+
constructor(session?: StoredAgentSession | null, activeProvider?: Provider | null);
|
|
706
|
+
getSession(): Promise<StoredAgentSession | null>;
|
|
707
|
+
setSession(session: StoredAgentSession): Promise<void>;
|
|
708
|
+
clearSession(): Promise<void>;
|
|
709
|
+
getActiveProvider(): Promise<Provider | null>;
|
|
710
|
+
setActiveProvider(provider: Provider): Promise<void>;
|
|
711
|
+
clearActiveProvider(): Promise<void>;
|
|
712
|
+
getPendingLogin(): Promise<PendingAgentLogin | null>;
|
|
713
|
+
setPendingLogin(pendingLogin: PendingAgentLogin): Promise<void>;
|
|
714
|
+
clearPendingLogin(): Promise<void>;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
interface HeliosAgentMcpProviderServiceOptions {
|
|
718
|
+
sessionStore: AgentMcpSessionStore;
|
|
719
|
+
}
|
|
720
|
+
type ActiveProviderView = {
|
|
721
|
+
configured: true;
|
|
722
|
+
provider: Provider;
|
|
723
|
+
} | {
|
|
724
|
+
configured: false;
|
|
725
|
+
provider: null;
|
|
726
|
+
};
|
|
727
|
+
declare class HeliosAgentMcpProviderService {
|
|
728
|
+
private readonly sessionStore;
|
|
729
|
+
constructor(options: HeliosAgentMcpProviderServiceOptions);
|
|
730
|
+
getActiveProvider(): Promise<ActiveProviderView>;
|
|
731
|
+
setActiveProvider(provider: Provider): Promise<ActiveProviderView>;
|
|
732
|
+
resolveProvider(explicitProvider?: Provider): Promise<Provider>;
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
interface HeliosAgentMcpAuthServiceOptions {
|
|
736
|
+
client: HeliosAgentAuthClient;
|
|
737
|
+
sessionStore: AgentMcpSessionStore;
|
|
738
|
+
refreshWindowMs?: number;
|
|
739
|
+
now?: () => Date;
|
|
740
|
+
/**
|
|
741
|
+
* False on the hosted server (helios.pgn.io/mcp): the AI app signed in through OAuth and holds the tokens, so the server
|
|
742
|
+
* never starts a device login of its own; an expired or revoked connection is an error the app answers by reconnecting.
|
|
743
|
+
*/
|
|
744
|
+
deviceLogin?: boolean;
|
|
745
|
+
}
|
|
746
|
+
declare const HOSTED_RECONNECT_MESSAGE = "Helios no longer accepts this connection (it expired or was revoked). Reconnect Helios in your AI app to continue.";
|
|
747
|
+
interface StartLoginResult {
|
|
748
|
+
status: 'pending';
|
|
749
|
+
deviceCode: string;
|
|
750
|
+
userCode: string;
|
|
751
|
+
verificationUri: string;
|
|
752
|
+
verificationUriComplete: string;
|
|
753
|
+
expiresInSeconds: number;
|
|
754
|
+
pollIntervalSeconds: number;
|
|
755
|
+
requestedScope: AgentDeviceStartInput['scope'];
|
|
756
|
+
startedAt: string;
|
|
757
|
+
}
|
|
758
|
+
type EnsureLoginResult = (AgentSessionView & {
|
|
759
|
+
status: 'connected';
|
|
760
|
+
connected: true;
|
|
761
|
+
}) | (StartLoginResult & {
|
|
762
|
+
connected: false;
|
|
763
|
+
message: string;
|
|
764
|
+
});
|
|
765
|
+
type PendingLoginResult = StartLoginResult & {
|
|
766
|
+
connected: false;
|
|
767
|
+
message: string;
|
|
768
|
+
};
|
|
769
|
+
type PollLoginResult = (AgentSessionView & {
|
|
770
|
+
status: 'connected';
|
|
771
|
+
connected: true;
|
|
772
|
+
}) | {
|
|
773
|
+
status: 'pending' | 'rejected' | 'expired' | 'failed';
|
|
774
|
+
connected: false;
|
|
775
|
+
message: string;
|
|
776
|
+
};
|
|
777
|
+
interface EnsureLoginOptions {
|
|
778
|
+
clientName?: string;
|
|
779
|
+
scope?: AgentDeviceStartInput['scope'];
|
|
780
|
+
constraints?: AgentDeviceStartInput['constraints'];
|
|
781
|
+
}
|
|
782
|
+
declare class HeliosAgentMcpAuthService {
|
|
783
|
+
private readonly client;
|
|
784
|
+
private readonly sessionStore;
|
|
785
|
+
private readonly refreshWindowMs;
|
|
786
|
+
private readonly now;
|
|
787
|
+
private readonly deviceLogin;
|
|
788
|
+
constructor(options: HeliosAgentMcpAuthServiceOptions);
|
|
789
|
+
startLogin(input: AgentDeviceStartInput): Promise<StartLoginResult>;
|
|
790
|
+
resetSessionAndStartLogin(input: AgentDeviceStartInput): Promise<StartLoginResult>;
|
|
791
|
+
private startDeviceLogin;
|
|
792
|
+
private buildStartLoginResult;
|
|
793
|
+
startRelogin(options?: EnsureLoginOptions): Promise<PendingLoginResult>;
|
|
794
|
+
clearSessionState(): Promise<void>;
|
|
795
|
+
invalidateIfUnauthorized(error: unknown, options?: EnsureLoginOptions): Promise<PendingLoginResult | null>;
|
|
796
|
+
refreshSessionAfterUnauthorized(error: unknown): Promise<StoredAgentSession | null>;
|
|
797
|
+
ensureLogin(options?: EnsureLoginOptions): Promise<EnsureLoginResult>;
|
|
798
|
+
/** Polls the given login, or the stored pending one when no device code is given. */
|
|
799
|
+
pollLogin(deviceCode?: string): Promise<PollLoginResult>;
|
|
800
|
+
whoami(): Promise<AgentSessionView>;
|
|
801
|
+
getAccessToken(): Promise<string | null>;
|
|
802
|
+
requireSession(): Promise<StoredAgentSession>;
|
|
803
|
+
private getValidSession;
|
|
804
|
+
private refreshStoredSession;
|
|
805
|
+
private getPendingLogin;
|
|
806
|
+
private clearPendingLoginIfMatches;
|
|
807
|
+
}
|
|
808
|
+
declare function retryAfterUnauthorizedRefresh<T>(options: {
|
|
809
|
+
authService: HeliosAgentMcpAuthService;
|
|
810
|
+
error: unknown;
|
|
811
|
+
loginOptions: EnsureLoginOptions;
|
|
812
|
+
retry: (accessToken: string) => Promise<T>;
|
|
813
|
+
}): Promise<T | PendingLoginResult | null>;
|
|
814
|
+
declare function formatHeliosLoginPrompt(result: Pick<StartLoginResult, 'verificationUriComplete' | 'userCode' | 'requestedScope'>): string;
|
|
815
|
+
|
|
816
|
+
interface HeliosAgentMcpAccountServiceOptions {
|
|
817
|
+
authService: HeliosAgentMcpAuthService;
|
|
818
|
+
dataBridgeClient: HeliosAgentDataBridgeClient;
|
|
819
|
+
providerService: HeliosAgentMcpProviderService;
|
|
820
|
+
}
|
|
821
|
+
type WalletStateResult = {
|
|
822
|
+
status: 'connected';
|
|
823
|
+
connected: true;
|
|
824
|
+
walletState: WalletState;
|
|
825
|
+
} | ({
|
|
826
|
+
status: 'pending';
|
|
827
|
+
connected: false;
|
|
828
|
+
message: string;
|
|
829
|
+
} & StartLoginResult);
|
|
830
|
+
type PortfolioResult = {
|
|
831
|
+
status: 'connected';
|
|
832
|
+
connected: true;
|
|
833
|
+
portfolio: PortfolioSnapshot;
|
|
834
|
+
} | ({
|
|
835
|
+
status: 'pending';
|
|
836
|
+
connected: false;
|
|
837
|
+
message: string;
|
|
838
|
+
} & StartLoginResult);
|
|
839
|
+
declare class HeliosAgentMcpAccountService {
|
|
840
|
+
private readonly authService;
|
|
841
|
+
private readonly dataBridgeClient;
|
|
842
|
+
private readonly providerService;
|
|
843
|
+
constructor(options: HeliosAgentMcpAccountServiceOptions);
|
|
844
|
+
getWalletState(): Promise<WalletStateResult>;
|
|
845
|
+
getPortfolio(input?: {
|
|
846
|
+
provider?: Provider;
|
|
847
|
+
}): Promise<PortfolioResult>;
|
|
848
|
+
private accountReadOptions;
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
interface HeliosAgentMcpDocsIndexEntry {
|
|
852
|
+
path: string;
|
|
853
|
+
section: string;
|
|
854
|
+
title: string;
|
|
855
|
+
bytes: number;
|
|
856
|
+
}
|
|
857
|
+
interface HeliosAgentMcpDocsIndex {
|
|
858
|
+
root: 'docs';
|
|
859
|
+
documents: HeliosAgentMcpDocsIndexEntry[];
|
|
860
|
+
}
|
|
861
|
+
interface HeliosAgentMcpDocument {
|
|
862
|
+
path: string;
|
|
863
|
+
section: string;
|
|
864
|
+
title: string;
|
|
865
|
+
body: string;
|
|
866
|
+
bytes: number;
|
|
867
|
+
}
|
|
868
|
+
interface HeliosAgentMcpDocsServiceOptions {
|
|
869
|
+
docsRoot: string;
|
|
870
|
+
}
|
|
871
|
+
interface GetHeliosAgentMcpDocumentInput {
|
|
872
|
+
path: string;
|
|
873
|
+
}
|
|
874
|
+
declare class HeliosAgentMcpDocsService {
|
|
875
|
+
private readonly docsRoot;
|
|
876
|
+
constructor(options: HeliosAgentMcpDocsServiceOptions);
|
|
877
|
+
getIndex(): Promise<HeliosAgentMcpDocsIndex>;
|
|
878
|
+
getDocument(input: GetHeliosAgentMcpDocumentInput): Promise<HeliosAgentMcpDocument>;
|
|
879
|
+
private readDocumentMetadata;
|
|
880
|
+
}
|
|
881
|
+
declare function getDefaultHeliosAgentMcpDocsRoot(): string;
|
|
882
|
+
|
|
883
|
+
interface HeliosAgentMcpLedgerServiceOptions {
|
|
884
|
+
authService: HeliosAgentMcpAuthService;
|
|
885
|
+
dataBridgeClient: HeliosAgentDataBridgeClient;
|
|
886
|
+
}
|
|
887
|
+
type PendingLedgerLoginResult = {
|
|
888
|
+
status: 'pending';
|
|
889
|
+
connected: false;
|
|
890
|
+
message: string;
|
|
891
|
+
} & StartLoginResult;
|
|
892
|
+
type OpenPositionsResult = {
|
|
893
|
+
status: 'connected';
|
|
894
|
+
connected: true;
|
|
895
|
+
openPositions: OpenPositionsSnapshot;
|
|
896
|
+
} | PendingLedgerLoginResult;
|
|
897
|
+
type LedgerFillsResult = {
|
|
898
|
+
status: 'connected';
|
|
899
|
+
connected: true;
|
|
900
|
+
fills: LedgerFillsPage;
|
|
901
|
+
} | PendingLedgerLoginResult;
|
|
902
|
+
type LedgerSummaryResult = {
|
|
903
|
+
status: 'connected';
|
|
904
|
+
connected: true;
|
|
905
|
+
summary: LedgerSummary;
|
|
906
|
+
} | PendingLedgerLoginResult;
|
|
907
|
+
declare class HeliosAgentMcpLedgerService {
|
|
908
|
+
private readonly authService;
|
|
909
|
+
private readonly dataBridgeClient;
|
|
910
|
+
constructor(options: HeliosAgentMcpLedgerServiceOptions);
|
|
911
|
+
getOpenPositions(): Promise<OpenPositionsResult>;
|
|
912
|
+
getFills(input?: LedgerFillsInput): Promise<LedgerFillsResult>;
|
|
913
|
+
getSummary(input?: LedgerSummaryInput): Promise<LedgerSummaryResult>;
|
|
914
|
+
private accountReadOptions;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
interface HeliosAgentMcpMarketServiceOptions {
|
|
918
|
+
authService: HeliosAgentMcpAuthService;
|
|
919
|
+
dataBridgeClient: HeliosAgentDataBridgeClient;
|
|
920
|
+
}
|
|
921
|
+
type MarketSnapshotResult = {
|
|
922
|
+
status: 'connected';
|
|
923
|
+
connected: true;
|
|
924
|
+
snapshot: MarketSnapshot;
|
|
925
|
+
} | ({
|
|
926
|
+
status: 'pending';
|
|
927
|
+
connected: false;
|
|
928
|
+
message: string;
|
|
929
|
+
} & StartLoginResult);
|
|
930
|
+
type MarketSnapshotChunkResult = {
|
|
931
|
+
status: 'connected';
|
|
932
|
+
connected: true;
|
|
933
|
+
snapshotChunk: MarketSnapshotChunk;
|
|
934
|
+
} | ({
|
|
935
|
+
status: 'pending';
|
|
936
|
+
connected: false;
|
|
937
|
+
message: string;
|
|
938
|
+
} & StartLoginResult);
|
|
939
|
+
type MarketSymbolDetailResult = {
|
|
940
|
+
status: 'connected';
|
|
941
|
+
connected: true;
|
|
942
|
+
detail: MarketSymbolDetail;
|
|
943
|
+
} | ({
|
|
944
|
+
status: 'pending';
|
|
945
|
+
connected: false;
|
|
946
|
+
message: string;
|
|
947
|
+
} & StartLoginResult);
|
|
948
|
+
declare class HeliosAgentMcpMarketService {
|
|
949
|
+
private readonly authService;
|
|
950
|
+
private readonly dataBridgeClient;
|
|
951
|
+
constructor(options: HeliosAgentMcpMarketServiceOptions);
|
|
952
|
+
getSnapshot(input?: MarketSnapshotInput): Promise<MarketSnapshotResult>;
|
|
953
|
+
getSnapshotChunk(input?: MarketSnapshotChunkInput): Promise<MarketSnapshotChunkResult>;
|
|
954
|
+
getSymbolDetail(input: MarketSymbolDetailInput): Promise<MarketSymbolDetailResult>;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
interface HeliosAgentMcpTradingServiceOptions {
|
|
958
|
+
authService: HeliosAgentMcpAuthService;
|
|
959
|
+
dataBridgeClient: HeliosAgentDataBridgeClient;
|
|
960
|
+
providerService: HeliosAgentMcpProviderService;
|
|
961
|
+
}
|
|
962
|
+
type PendingTradingLoginResult = {
|
|
963
|
+
status: 'pending';
|
|
964
|
+
connected: false;
|
|
965
|
+
message: string;
|
|
966
|
+
} & StartLoginResult;
|
|
967
|
+
type TradeIntentAction = 'OPEN' | 'DCA' | 'REVERSE';
|
|
968
|
+
type TradeIntentActionInput = Omit<SubmitTradeIntentInput, 'intentType'>;
|
|
969
|
+
type TradeIntentActionResult = {
|
|
970
|
+
status: 'connected';
|
|
971
|
+
connected: true;
|
|
972
|
+
submission: SubmitTradeIntentResult;
|
|
973
|
+
} | PendingTradingLoginResult;
|
|
974
|
+
type ClosePositionToolResult = {
|
|
975
|
+
status: 'connected';
|
|
976
|
+
connected: true;
|
|
977
|
+
closure: ClosePositionResult;
|
|
978
|
+
} | PendingTradingLoginResult;
|
|
979
|
+
type SetTpSlToolResult = {
|
|
980
|
+
status: 'connected';
|
|
981
|
+
connected: true;
|
|
982
|
+
protection: SetTpSlResult;
|
|
983
|
+
} | PendingTradingLoginResult;
|
|
984
|
+
type DeleteTpSlToolResult = {
|
|
985
|
+
status: 'connected';
|
|
986
|
+
connected: true;
|
|
987
|
+
deletion: DeleteTpSlResult;
|
|
988
|
+
} | PendingTradingLoginResult;
|
|
989
|
+
type OpenOrdersToolResult = {
|
|
990
|
+
status: 'connected';
|
|
991
|
+
connected: true;
|
|
992
|
+
orders: OpenOrder[];
|
|
993
|
+
} | PendingTradingLoginResult;
|
|
994
|
+
type CancelOrderToolResult = {
|
|
995
|
+
status: 'connected';
|
|
996
|
+
connected: true;
|
|
997
|
+
cancellation: CancelOrderResult;
|
|
998
|
+
} | PendingTradingLoginResult;
|
|
999
|
+
declare class HeliosAgentMcpTradingService {
|
|
1000
|
+
private readonly authService;
|
|
1001
|
+
private readonly dataBridgeClient;
|
|
1002
|
+
private readonly providerService;
|
|
1003
|
+
constructor(options: HeliosAgentMcpTradingServiceOptions);
|
|
1004
|
+
open(input: TradeIntentActionInput): Promise<TradeIntentActionResult>;
|
|
1005
|
+
dca(input: TradeIntentActionInput): Promise<TradeIntentActionResult>;
|
|
1006
|
+
reverse(input: TradeIntentActionInput): Promise<TradeIntentActionResult>;
|
|
1007
|
+
close(input: ClosePositionInput): Promise<ClosePositionToolResult>;
|
|
1008
|
+
setTpSl(input: SetTpSlInput): Promise<SetTpSlToolResult>;
|
|
1009
|
+
deleteTpSl(input: DeleteTpSlInput): Promise<DeleteTpSlToolResult>;
|
|
1010
|
+
getOpenOrders(): Promise<OpenOrdersToolResult>;
|
|
1011
|
+
cancelOrder(input: CancelOrderInput): Promise<CancelOrderToolResult>;
|
|
1012
|
+
private submitIntent;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
interface CreateHeliosAgentMcpServerOptions {
|
|
1016
|
+
identityServiceUrl: string;
|
|
1017
|
+
dataBridgeUrl: string;
|
|
1018
|
+
fetch?: FetchLike;
|
|
1019
|
+
sessionStore?: AgentMcpSessionStore;
|
|
1020
|
+
sessionPath?: string;
|
|
1021
|
+
refreshWindowMs?: number;
|
|
1022
|
+
docsRoot?: string;
|
|
1023
|
+
/**
|
|
1024
|
+
* The hosted server (apps/mcp-service): the session comes from the AI app's OAuth token, so the device-login tools are
|
|
1025
|
+
* left out (whoami stays) and no tool ever starts a login of its own.
|
|
1026
|
+
*/
|
|
1027
|
+
hosted?: boolean;
|
|
1028
|
+
}
|
|
1029
|
+
declare function createHeliosAgentMcpServer(options: CreateHeliosAgentMcpServerOptions): Promise<{
|
|
1030
|
+
server: McpServer;
|
|
1031
|
+
authService: HeliosAgentMcpAuthService;
|
|
1032
|
+
providerService: HeliosAgentMcpProviderService;
|
|
1033
|
+
accountService: HeliosAgentMcpAccountService;
|
|
1034
|
+
docsService: HeliosAgentMcpDocsService;
|
|
1035
|
+
ledgerService: HeliosAgentMcpLedgerService;
|
|
1036
|
+
marketService: HeliosAgentMcpMarketService;
|
|
1037
|
+
tradingService: HeliosAgentMcpTradingService;
|
|
1038
|
+
sessionStore: AgentMcpSessionStore;
|
|
1039
|
+
}>;
|
|
1040
|
+
declare function toolAnnotations(name: string): {
|
|
1041
|
+
readOnlyHint: boolean;
|
|
1042
|
+
destructiveHint: boolean;
|
|
1043
|
+
openWorldHint: boolean;
|
|
1044
|
+
};
|
|
1045
|
+
|
|
1046
|
+
interface HeliosMcpToolResult<TStructuredContent extends object> {
|
|
1047
|
+
content: Array<{
|
|
1048
|
+
type: 'text';
|
|
1049
|
+
text: string;
|
|
1050
|
+
}>;
|
|
1051
|
+
structuredContent: TStructuredContent;
|
|
1052
|
+
}
|
|
1053
|
+
interface HeliosMcpToolDefinition<TInput, TStructuredContent extends object> {
|
|
1054
|
+
name: string;
|
|
1055
|
+
title: string;
|
|
1056
|
+
description: string;
|
|
1057
|
+
inputSchema: z.ZodType<TInput>;
|
|
1058
|
+
execute(input: TInput): Promise<HeliosMcpToolResult<TStructuredContent>>;
|
|
1059
|
+
}
|
|
1060
|
+
declare function createHeliosDocsToolDefinitions(service: HeliosAgentMcpDocsService): readonly [{
|
|
1061
|
+
name: string;
|
|
1062
|
+
title: string;
|
|
1063
|
+
description: string;
|
|
1064
|
+
inputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1065
|
+
execute(): Promise<{
|
|
1066
|
+
content: {
|
|
1067
|
+
type: "text";
|
|
1068
|
+
text: string;
|
|
1069
|
+
}[];
|
|
1070
|
+
structuredContent: HeliosAgentMcpDocsIndex;
|
|
1071
|
+
}>;
|
|
1072
|
+
}, {
|
|
1073
|
+
name: string;
|
|
1074
|
+
title: string;
|
|
1075
|
+
description: string;
|
|
1076
|
+
inputSchema: z.ZodObject<{
|
|
1077
|
+
path: z.ZodString;
|
|
1078
|
+
}, z.core.$strip>;
|
|
1079
|
+
execute(input: {
|
|
1080
|
+
path: string;
|
|
1081
|
+
}): Promise<{
|
|
1082
|
+
content: {
|
|
1083
|
+
type: "text";
|
|
1084
|
+
text: string;
|
|
1085
|
+
}[];
|
|
1086
|
+
structuredContent: HeliosAgentMcpDocument;
|
|
1087
|
+
}>;
|
|
1088
|
+
}];
|
|
1089
|
+
declare function createHeliosAuthToolDefinitions(service: HeliosAgentMcpAuthService): readonly [{
|
|
1090
|
+
name: string;
|
|
1091
|
+
title: string;
|
|
1092
|
+
description: string;
|
|
1093
|
+
inputSchema: z.ZodObject<{
|
|
1094
|
+
clientName: z.ZodString;
|
|
1095
|
+
scope: z.ZodArray<z.ZodEnum<{
|
|
1096
|
+
"account:read": "account:read";
|
|
1097
|
+
"market:read": "market:read";
|
|
1098
|
+
"orders:write": "orders:write";
|
|
1099
|
+
"orders:cancel": "orders:cancel";
|
|
1100
|
+
}>>;
|
|
1101
|
+
constraints: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1102
|
+
}, z.core.$strip>;
|
|
1103
|
+
execute(input: {
|
|
1104
|
+
clientName: string;
|
|
1105
|
+
scope: ("account:read" | "market:read" | "orders:write" | "orders:cancel")[];
|
|
1106
|
+
constraints?: Record<string, unknown> | undefined;
|
|
1107
|
+
}): Promise<{
|
|
1108
|
+
content: {
|
|
1109
|
+
type: "text";
|
|
1110
|
+
text: string;
|
|
1111
|
+
}[];
|
|
1112
|
+
structuredContent: {
|
|
1113
|
+
actionRequired: true;
|
|
1114
|
+
loginUrl: string;
|
|
1115
|
+
nextStep: string;
|
|
1116
|
+
status: "pending";
|
|
1117
|
+
deviceCode: string;
|
|
1118
|
+
userCode: string;
|
|
1119
|
+
verificationUri: string;
|
|
1120
|
+
verificationUriComplete: string;
|
|
1121
|
+
expiresInSeconds: number;
|
|
1122
|
+
pollIntervalSeconds: number;
|
|
1123
|
+
requestedScope: ("account:read" | "market:read" | "orders:write" | "orders:cancel")[];
|
|
1124
|
+
startedAt: string;
|
|
1125
|
+
};
|
|
1126
|
+
}>;
|
|
1127
|
+
}, {
|
|
1128
|
+
name: string;
|
|
1129
|
+
title: string;
|
|
1130
|
+
description: string;
|
|
1131
|
+
inputSchema: z.ZodObject<{
|
|
1132
|
+
clientName: z.ZodOptional<z.ZodString>;
|
|
1133
|
+
scope: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1134
|
+
"account:read": "account:read";
|
|
1135
|
+
"market:read": "market:read";
|
|
1136
|
+
"orders:write": "orders:write";
|
|
1137
|
+
"orders:cancel": "orders:cancel";
|
|
1138
|
+
}>>>;
|
|
1139
|
+
constraints: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
1140
|
+
}, z.core.$strip>;
|
|
1141
|
+
execute(input: {
|
|
1142
|
+
clientName?: string | undefined;
|
|
1143
|
+
scope?: ("account:read" | "market:read" | "orders:write" | "orders:cancel")[] | undefined;
|
|
1144
|
+
constraints?: Record<string, unknown> | undefined;
|
|
1145
|
+
}): Promise<{
|
|
1146
|
+
content: {
|
|
1147
|
+
type: "text";
|
|
1148
|
+
text: string;
|
|
1149
|
+
}[];
|
|
1150
|
+
structuredContent: {
|
|
1151
|
+
status: "connected";
|
|
1152
|
+
connected: true;
|
|
1153
|
+
ownerUserId?: string | undefined;
|
|
1154
|
+
agentGrantId?: string | undefined;
|
|
1155
|
+
scope?: ("account:read" | "market:read" | "orders:write" | "orders:cancel")[] | undefined;
|
|
1156
|
+
accessTokenExpiresAt?: string | undefined;
|
|
1157
|
+
lastRefreshedAt?: string | undefined;
|
|
1158
|
+
} | {
|
|
1159
|
+
actionRequired: true;
|
|
1160
|
+
loginUrl: string;
|
|
1161
|
+
nextStep: string;
|
|
1162
|
+
deviceCode: string;
|
|
1163
|
+
userCode: string;
|
|
1164
|
+
verificationUri: string;
|
|
1165
|
+
verificationUriComplete: string;
|
|
1166
|
+
expiresInSeconds: number;
|
|
1167
|
+
pollIntervalSeconds: number;
|
|
1168
|
+
requestedScope: ("account:read" | "market:read" | "orders:write" | "orders:cancel")[];
|
|
1169
|
+
startedAt: string;
|
|
1170
|
+
status: "pending";
|
|
1171
|
+
connected: false;
|
|
1172
|
+
message: string;
|
|
1173
|
+
};
|
|
1174
|
+
}>;
|
|
1175
|
+
}, {
|
|
1176
|
+
name: string;
|
|
1177
|
+
title: string;
|
|
1178
|
+
description: string;
|
|
1179
|
+
inputSchema: z.ZodObject<{
|
|
1180
|
+
deviceCode: z.ZodOptional<z.ZodString>;
|
|
1181
|
+
}, z.core.$strip>;
|
|
1182
|
+
execute(input: {
|
|
1183
|
+
deviceCode?: string | undefined;
|
|
1184
|
+
}): Promise<{
|
|
1185
|
+
content: {
|
|
1186
|
+
type: "text";
|
|
1187
|
+
text: string;
|
|
1188
|
+
}[];
|
|
1189
|
+
structuredContent: {
|
|
1190
|
+
status: "connected";
|
|
1191
|
+
connected: true;
|
|
1192
|
+
ownerUserId?: string | undefined;
|
|
1193
|
+
agentGrantId?: string | undefined;
|
|
1194
|
+
scope?: ("account:read" | "market:read" | "orders:write" | "orders:cancel")[] | undefined;
|
|
1195
|
+
accessTokenExpiresAt?: string | undefined;
|
|
1196
|
+
lastRefreshedAt?: string | undefined;
|
|
1197
|
+
} | {
|
|
1198
|
+
status: "pending" | "rejected" | "expired" | "failed";
|
|
1199
|
+
connected: false;
|
|
1200
|
+
message: string;
|
|
1201
|
+
};
|
|
1202
|
+
}>;
|
|
1203
|
+
}, {
|
|
1204
|
+
name: string;
|
|
1205
|
+
title: string;
|
|
1206
|
+
description: string;
|
|
1207
|
+
inputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1208
|
+
execute(): Promise<{
|
|
1209
|
+
content: {
|
|
1210
|
+
type: "text";
|
|
1211
|
+
text: string;
|
|
1212
|
+
}[];
|
|
1213
|
+
structuredContent: {
|
|
1214
|
+
connected: boolean;
|
|
1215
|
+
status: "pending" | "connected" | "rejected" | "expired" | "disconnected" | "failed";
|
|
1216
|
+
ownerUserId?: string | undefined;
|
|
1217
|
+
agentGrantId?: string | undefined;
|
|
1218
|
+
scope?: ("account:read" | "market:read" | "orders:write" | "orders:cancel")[] | undefined;
|
|
1219
|
+
accessTokenExpiresAt?: string | undefined;
|
|
1220
|
+
lastRefreshedAt?: string | undefined;
|
|
1221
|
+
};
|
|
1222
|
+
}>;
|
|
1223
|
+
}];
|
|
1224
|
+
declare function createHeliosProviderToolDefinitions(service: HeliosAgentMcpProviderService): readonly [{
|
|
1225
|
+
name: string;
|
|
1226
|
+
title: string;
|
|
1227
|
+
description: string;
|
|
1228
|
+
inputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1229
|
+
execute(): Promise<{
|
|
1230
|
+
content: {
|
|
1231
|
+
type: "text";
|
|
1232
|
+
text: string;
|
|
1233
|
+
}[];
|
|
1234
|
+
structuredContent: ActiveProviderView;
|
|
1235
|
+
}>;
|
|
1236
|
+
}, {
|
|
1237
|
+
name: string;
|
|
1238
|
+
title: string;
|
|
1239
|
+
description: string;
|
|
1240
|
+
inputSchema: z.ZodObject<{
|
|
1241
|
+
provider: z.ZodEnum<{
|
|
1242
|
+
hyperliquid: "hyperliquid";
|
|
1243
|
+
}>;
|
|
1244
|
+
}, z.core.$strip>;
|
|
1245
|
+
execute(input: {
|
|
1246
|
+
provider: "hyperliquid";
|
|
1247
|
+
}): Promise<{
|
|
1248
|
+
content: {
|
|
1249
|
+
type: "text";
|
|
1250
|
+
text: string;
|
|
1251
|
+
}[];
|
|
1252
|
+
structuredContent: ActiveProviderView;
|
|
1253
|
+
}>;
|
|
1254
|
+
}];
|
|
1255
|
+
declare function createHeliosAccountToolDefinitions(service: HeliosAgentMcpAccountService): readonly [{
|
|
1256
|
+
name: string;
|
|
1257
|
+
title: string;
|
|
1258
|
+
description: string;
|
|
1259
|
+
inputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1260
|
+
execute(): Promise<{
|
|
1261
|
+
content: {
|
|
1262
|
+
type: "text";
|
|
1263
|
+
text: string;
|
|
1264
|
+
}[];
|
|
1265
|
+
structuredContent: {
|
|
1266
|
+
status: "connected";
|
|
1267
|
+
connected: true;
|
|
1268
|
+
walletState: WalletState;
|
|
1269
|
+
} | {
|
|
1270
|
+
actionRequired: true;
|
|
1271
|
+
loginUrl: string;
|
|
1272
|
+
nextStep: string;
|
|
1273
|
+
status: "pending";
|
|
1274
|
+
connected: false;
|
|
1275
|
+
message: string;
|
|
1276
|
+
deviceCode: string;
|
|
1277
|
+
userCode: string;
|
|
1278
|
+
verificationUri: string;
|
|
1279
|
+
verificationUriComplete: string;
|
|
1280
|
+
expiresInSeconds: number;
|
|
1281
|
+
pollIntervalSeconds: number;
|
|
1282
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1283
|
+
startedAt: string;
|
|
1284
|
+
};
|
|
1285
|
+
}>;
|
|
1286
|
+
}, {
|
|
1287
|
+
name: string;
|
|
1288
|
+
title: string;
|
|
1289
|
+
description: string;
|
|
1290
|
+
inputSchema: z.ZodObject<{
|
|
1291
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
1292
|
+
hyperliquid: "hyperliquid";
|
|
1293
|
+
}>>;
|
|
1294
|
+
}, z.core.$strip>;
|
|
1295
|
+
execute(input: {
|
|
1296
|
+
provider?: "hyperliquid" | undefined;
|
|
1297
|
+
}): Promise<{
|
|
1298
|
+
content: {
|
|
1299
|
+
type: "text";
|
|
1300
|
+
text: string;
|
|
1301
|
+
}[];
|
|
1302
|
+
structuredContent: {
|
|
1303
|
+
status: "connected";
|
|
1304
|
+
connected: true;
|
|
1305
|
+
portfolio: PortfolioSnapshot;
|
|
1306
|
+
} | {
|
|
1307
|
+
actionRequired: true;
|
|
1308
|
+
loginUrl: string;
|
|
1309
|
+
nextStep: string;
|
|
1310
|
+
status: "pending";
|
|
1311
|
+
connected: false;
|
|
1312
|
+
message: string;
|
|
1313
|
+
deviceCode: string;
|
|
1314
|
+
userCode: string;
|
|
1315
|
+
verificationUri: string;
|
|
1316
|
+
verificationUriComplete: string;
|
|
1317
|
+
expiresInSeconds: number;
|
|
1318
|
+
pollIntervalSeconds: number;
|
|
1319
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1320
|
+
startedAt: string;
|
|
1321
|
+
};
|
|
1322
|
+
}>;
|
|
1323
|
+
}];
|
|
1324
|
+
declare function createHeliosLedgerToolDefinitions(service: HeliosAgentMcpLedgerService): readonly [{
|
|
1325
|
+
name: string;
|
|
1326
|
+
title: string;
|
|
1327
|
+
description: string;
|
|
1328
|
+
inputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
1329
|
+
execute(): Promise<{
|
|
1330
|
+
content: {
|
|
1331
|
+
type: "text";
|
|
1332
|
+
text: string;
|
|
1333
|
+
}[];
|
|
1334
|
+
structuredContent: {
|
|
1335
|
+
status: "connected";
|
|
1336
|
+
connected: true;
|
|
1337
|
+
openPositions: OpenPositionsSnapshot;
|
|
1338
|
+
} | {
|
|
1339
|
+
actionRequired: true;
|
|
1340
|
+
loginUrl: string;
|
|
1341
|
+
nextStep: string;
|
|
1342
|
+
status: "pending";
|
|
1343
|
+
connected: false;
|
|
1344
|
+
message: string;
|
|
1345
|
+
deviceCode: string;
|
|
1346
|
+
userCode: string;
|
|
1347
|
+
verificationUri: string;
|
|
1348
|
+
verificationUriComplete: string;
|
|
1349
|
+
expiresInSeconds: number;
|
|
1350
|
+
pollIntervalSeconds: number;
|
|
1351
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1352
|
+
startedAt: string;
|
|
1353
|
+
};
|
|
1354
|
+
}>;
|
|
1355
|
+
}, {
|
|
1356
|
+
name: string;
|
|
1357
|
+
title: string;
|
|
1358
|
+
description: string;
|
|
1359
|
+
inputSchema: z.ZodObject<{
|
|
1360
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
1361
|
+
"24h": "24h";
|
|
1362
|
+
"7d": "7d";
|
|
1363
|
+
"30d": "30d";
|
|
1364
|
+
}>>;
|
|
1365
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1366
|
+
before: z.ZodOptional<z.ZodNumber>;
|
|
1367
|
+
}, z.core.$strip>;
|
|
1368
|
+
execute(input: {
|
|
1369
|
+
window?: "24h" | "7d" | "30d" | undefined;
|
|
1370
|
+
limit?: number | undefined;
|
|
1371
|
+
before?: number | undefined;
|
|
1372
|
+
}): Promise<{
|
|
1373
|
+
content: {
|
|
1374
|
+
type: "text";
|
|
1375
|
+
text: string;
|
|
1376
|
+
}[];
|
|
1377
|
+
structuredContent: {
|
|
1378
|
+
status: "connected";
|
|
1379
|
+
connected: true;
|
|
1380
|
+
fills: LedgerFillsPage;
|
|
1381
|
+
} | {
|
|
1382
|
+
actionRequired: true;
|
|
1383
|
+
loginUrl: string;
|
|
1384
|
+
nextStep: string;
|
|
1385
|
+
status: "pending";
|
|
1386
|
+
connected: false;
|
|
1387
|
+
message: string;
|
|
1388
|
+
deviceCode: string;
|
|
1389
|
+
userCode: string;
|
|
1390
|
+
verificationUri: string;
|
|
1391
|
+
verificationUriComplete: string;
|
|
1392
|
+
expiresInSeconds: number;
|
|
1393
|
+
pollIntervalSeconds: number;
|
|
1394
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1395
|
+
startedAt: string;
|
|
1396
|
+
};
|
|
1397
|
+
}>;
|
|
1398
|
+
}, {
|
|
1399
|
+
name: string;
|
|
1400
|
+
title: string;
|
|
1401
|
+
description: string;
|
|
1402
|
+
inputSchema: z.ZodObject<{
|
|
1403
|
+
window: z.ZodOptional<z.ZodEnum<{
|
|
1404
|
+
"24h": "24h";
|
|
1405
|
+
"7d": "7d";
|
|
1406
|
+
"30d": "30d";
|
|
1407
|
+
}>>;
|
|
1408
|
+
}, z.core.$strip>;
|
|
1409
|
+
execute(input: {
|
|
1410
|
+
window?: "24h" | "7d" | "30d" | undefined;
|
|
1411
|
+
}): Promise<{
|
|
1412
|
+
content: {
|
|
1413
|
+
type: "text";
|
|
1414
|
+
text: string;
|
|
1415
|
+
}[];
|
|
1416
|
+
structuredContent: {
|
|
1417
|
+
status: "connected";
|
|
1418
|
+
connected: true;
|
|
1419
|
+
summary: LedgerSummary;
|
|
1420
|
+
} | {
|
|
1421
|
+
actionRequired: true;
|
|
1422
|
+
loginUrl: string;
|
|
1423
|
+
nextStep: string;
|
|
1424
|
+
status: "pending";
|
|
1425
|
+
connected: false;
|
|
1426
|
+
message: string;
|
|
1427
|
+
deviceCode: string;
|
|
1428
|
+
userCode: string;
|
|
1429
|
+
verificationUri: string;
|
|
1430
|
+
verificationUriComplete: string;
|
|
1431
|
+
expiresInSeconds: number;
|
|
1432
|
+
pollIntervalSeconds: number;
|
|
1433
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1434
|
+
startedAt: string;
|
|
1435
|
+
};
|
|
1436
|
+
}>;
|
|
1437
|
+
}];
|
|
1438
|
+
declare function createHeliosMarketToolDefinitions(service: HeliosAgentMcpMarketService): readonly [{
|
|
1439
|
+
name: string;
|
|
1440
|
+
title: string;
|
|
1441
|
+
description: string;
|
|
1442
|
+
inputSchema: z.ZodObject<{
|
|
1443
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
1444
|
+
selected: "selected";
|
|
1445
|
+
all: "all";
|
|
1446
|
+
}>>;
|
|
1447
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1448
|
+
}, z.core.$strip>;
|
|
1449
|
+
execute(input: {
|
|
1450
|
+
scope?: "selected" | "all" | undefined;
|
|
1451
|
+
symbols?: string[] | undefined;
|
|
1452
|
+
}): Promise<{
|
|
1453
|
+
content: {
|
|
1454
|
+
type: "text";
|
|
1455
|
+
text: string;
|
|
1456
|
+
}[];
|
|
1457
|
+
structuredContent: {
|
|
1458
|
+
status: "connected";
|
|
1459
|
+
connected: true;
|
|
1460
|
+
snapshot: MarketSnapshot;
|
|
1461
|
+
} | {
|
|
1462
|
+
actionRequired: true;
|
|
1463
|
+
loginUrl: string;
|
|
1464
|
+
nextStep: string;
|
|
1465
|
+
status: "pending";
|
|
1466
|
+
connected: false;
|
|
1467
|
+
message: string;
|
|
1468
|
+
deviceCode: string;
|
|
1469
|
+
userCode: string;
|
|
1470
|
+
verificationUri: string;
|
|
1471
|
+
verificationUriComplete: string;
|
|
1472
|
+
expiresInSeconds: number;
|
|
1473
|
+
pollIntervalSeconds: number;
|
|
1474
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1475
|
+
startedAt: string;
|
|
1476
|
+
};
|
|
1477
|
+
}>;
|
|
1478
|
+
}, {
|
|
1479
|
+
name: string;
|
|
1480
|
+
title: string;
|
|
1481
|
+
description: string;
|
|
1482
|
+
inputSchema: z.ZodObject<{
|
|
1483
|
+
scope: z.ZodOptional<z.ZodEnum<{
|
|
1484
|
+
selected: "selected";
|
|
1485
|
+
all: "all";
|
|
1486
|
+
}>>;
|
|
1487
|
+
symbols: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1488
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1489
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
1490
|
+
}, z.core.$strip>;
|
|
1491
|
+
execute(input: {
|
|
1492
|
+
scope?: "selected" | "all" | undefined;
|
|
1493
|
+
symbols?: string[] | undefined;
|
|
1494
|
+
offset?: number | undefined;
|
|
1495
|
+
limit?: number | undefined;
|
|
1496
|
+
}): Promise<{
|
|
1497
|
+
content: {
|
|
1498
|
+
type: "text";
|
|
1499
|
+
text: string;
|
|
1500
|
+
}[];
|
|
1501
|
+
structuredContent: {
|
|
1502
|
+
status: "connected";
|
|
1503
|
+
connected: true;
|
|
1504
|
+
snapshotChunk: MarketSnapshotChunk;
|
|
1505
|
+
} | {
|
|
1506
|
+
actionRequired: true;
|
|
1507
|
+
loginUrl: string;
|
|
1508
|
+
nextStep: string;
|
|
1509
|
+
status: "pending";
|
|
1510
|
+
connected: false;
|
|
1511
|
+
message: string;
|
|
1512
|
+
deviceCode: string;
|
|
1513
|
+
userCode: string;
|
|
1514
|
+
verificationUri: string;
|
|
1515
|
+
verificationUriComplete: string;
|
|
1516
|
+
expiresInSeconds: number;
|
|
1517
|
+
pollIntervalSeconds: number;
|
|
1518
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1519
|
+
startedAt: string;
|
|
1520
|
+
};
|
|
1521
|
+
}>;
|
|
1522
|
+
}, {
|
|
1523
|
+
name: string;
|
|
1524
|
+
title: string;
|
|
1525
|
+
description: string;
|
|
1526
|
+
inputSchema: z.ZodObject<{
|
|
1527
|
+
symbol: z.ZodString;
|
|
1528
|
+
}, z.core.$strip>;
|
|
1529
|
+
execute(input: {
|
|
1530
|
+
symbol: string;
|
|
1531
|
+
}): Promise<{
|
|
1532
|
+
content: {
|
|
1533
|
+
type: "text";
|
|
1534
|
+
text: string;
|
|
1535
|
+
}[];
|
|
1536
|
+
structuredContent: {
|
|
1537
|
+
status: "connected";
|
|
1538
|
+
connected: true;
|
|
1539
|
+
detail: MarketSymbolDetail;
|
|
1540
|
+
} | {
|
|
1541
|
+
actionRequired: true;
|
|
1542
|
+
loginUrl: string;
|
|
1543
|
+
nextStep: string;
|
|
1544
|
+
status: "pending";
|
|
1545
|
+
connected: false;
|
|
1546
|
+
message: string;
|
|
1547
|
+
deviceCode: string;
|
|
1548
|
+
userCode: string;
|
|
1549
|
+
verificationUri: string;
|
|
1550
|
+
verificationUriComplete: string;
|
|
1551
|
+
expiresInSeconds: number;
|
|
1552
|
+
pollIntervalSeconds: number;
|
|
1553
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1554
|
+
startedAt: string;
|
|
1555
|
+
};
|
|
1556
|
+
}>;
|
|
1557
|
+
}];
|
|
1558
|
+
declare function createHeliosTradingToolDefinitions(service: HeliosAgentMcpTradingService): readonly [{
|
|
1559
|
+
name: string;
|
|
1560
|
+
title: string;
|
|
1561
|
+
description: string;
|
|
1562
|
+
inputSchema: z.ZodObject<{
|
|
1563
|
+
symbol: z.ZodString;
|
|
1564
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
1565
|
+
hyperliquid: "hyperliquid";
|
|
1566
|
+
}>>;
|
|
1567
|
+
direction: z.ZodEnum<{
|
|
1568
|
+
LONG: "LONG";
|
|
1569
|
+
SHORT: "SHORT";
|
|
1570
|
+
}>;
|
|
1571
|
+
size: z.ZodObject<{
|
|
1572
|
+
mode: z.ZodEnum<{
|
|
1573
|
+
MARGIN_USD: "MARGIN_USD";
|
|
1574
|
+
BASE_QUANTITY: "BASE_QUANTITY";
|
|
1575
|
+
}>;
|
|
1576
|
+
value: z.ZodNumber;
|
|
1577
|
+
}, z.core.$strip>;
|
|
1578
|
+
execution: z.ZodObject<{
|
|
1579
|
+
style: z.ZodEnum<{
|
|
1580
|
+
MARKET: "MARKET";
|
|
1581
|
+
LIMIT_TAKER: "LIMIT_TAKER";
|
|
1582
|
+
LIMIT_MAKER: "LIMIT_MAKER";
|
|
1583
|
+
LIMIT_GTC: "LIMIT_GTC";
|
|
1584
|
+
}>;
|
|
1585
|
+
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
1586
|
+
GTC: "GTC";
|
|
1587
|
+
IOC: "IOC";
|
|
1588
|
+
FOK: "FOK";
|
|
1589
|
+
GTX: "GTX";
|
|
1590
|
+
}>>;
|
|
1591
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1592
|
+
}, z.core.$strip>;
|
|
1593
|
+
maxSlippageBps: z.ZodOptional<z.ZodNumber>;
|
|
1594
|
+
leverageOverride: z.ZodOptional<z.ZodNumber>;
|
|
1595
|
+
marginModeOverride: z.ZodOptional<z.ZodEnum<{
|
|
1596
|
+
ISOLATED: "ISOLATED";
|
|
1597
|
+
CROSS: "CROSS";
|
|
1598
|
+
}>>;
|
|
1599
|
+
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1600
|
+
protection: z.ZodOptional<z.ZodObject<{
|
|
1601
|
+
takeProfit: z.ZodOptional<z.ZodObject<{
|
|
1602
|
+
kind: z.ZodEnum<{
|
|
1603
|
+
MARKET: "MARKET";
|
|
1604
|
+
LIMIT: "LIMIT";
|
|
1605
|
+
}>;
|
|
1606
|
+
triggerPrice: z.ZodNumber;
|
|
1607
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1608
|
+
}, z.core.$strip>>;
|
|
1609
|
+
stopLoss: z.ZodOptional<z.ZodObject<{
|
|
1610
|
+
kind: z.ZodEnum<{
|
|
1611
|
+
MARKET: "MARKET";
|
|
1612
|
+
LIMIT: "LIMIT";
|
|
1613
|
+
}>;
|
|
1614
|
+
triggerPrice: z.ZodNumber;
|
|
1615
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1616
|
+
}, z.core.$strip>>;
|
|
1617
|
+
}, z.core.$strip>>;
|
|
1618
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
1619
|
+
}, z.core.$strip>;
|
|
1620
|
+
execute(input: {
|
|
1621
|
+
symbol: string;
|
|
1622
|
+
direction: "LONG" | "SHORT";
|
|
1623
|
+
size: {
|
|
1624
|
+
mode: "MARGIN_USD" | "BASE_QUANTITY";
|
|
1625
|
+
value: number;
|
|
1626
|
+
};
|
|
1627
|
+
execution: {
|
|
1628
|
+
style: "MARKET" | "LIMIT_TAKER" | "LIMIT_MAKER" | "LIMIT_GTC";
|
|
1629
|
+
timeInForce?: "GTC" | "IOC" | "FOK" | "GTX" | undefined;
|
|
1630
|
+
limitPrice?: number | undefined;
|
|
1631
|
+
};
|
|
1632
|
+
provider?: "hyperliquid" | undefined;
|
|
1633
|
+
maxSlippageBps?: number | undefined;
|
|
1634
|
+
leverageOverride?: number | undefined;
|
|
1635
|
+
marginModeOverride?: "ISOLATED" | "CROSS" | undefined;
|
|
1636
|
+
reduceOnly?: boolean | undefined;
|
|
1637
|
+
protection?: {
|
|
1638
|
+
takeProfit?: {
|
|
1639
|
+
kind: "MARKET" | "LIMIT";
|
|
1640
|
+
triggerPrice: number;
|
|
1641
|
+
limitPrice?: number | undefined;
|
|
1642
|
+
} | undefined;
|
|
1643
|
+
stopLoss?: {
|
|
1644
|
+
kind: "MARKET" | "LIMIT";
|
|
1645
|
+
triggerPrice: number;
|
|
1646
|
+
limitPrice?: number | undefined;
|
|
1647
|
+
} | undefined;
|
|
1648
|
+
} | undefined;
|
|
1649
|
+
idempotencyKey?: string | undefined;
|
|
1650
|
+
}): Promise<{
|
|
1651
|
+
content: {
|
|
1652
|
+
type: "text";
|
|
1653
|
+
text: string;
|
|
1654
|
+
}[];
|
|
1655
|
+
structuredContent: {
|
|
1656
|
+
status: "connected";
|
|
1657
|
+
connected: true;
|
|
1658
|
+
submission: SubmitTradeIntentResult;
|
|
1659
|
+
} | {
|
|
1660
|
+
actionRequired: true;
|
|
1661
|
+
loginUrl: string;
|
|
1662
|
+
nextStep: string;
|
|
1663
|
+
status: "pending";
|
|
1664
|
+
connected: false;
|
|
1665
|
+
message: string;
|
|
1666
|
+
deviceCode: string;
|
|
1667
|
+
userCode: string;
|
|
1668
|
+
verificationUri: string;
|
|
1669
|
+
verificationUriComplete: string;
|
|
1670
|
+
expiresInSeconds: number;
|
|
1671
|
+
pollIntervalSeconds: number;
|
|
1672
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1673
|
+
startedAt: string;
|
|
1674
|
+
};
|
|
1675
|
+
}>;
|
|
1676
|
+
}, {
|
|
1677
|
+
name: string;
|
|
1678
|
+
title: string;
|
|
1679
|
+
description: string;
|
|
1680
|
+
inputSchema: z.ZodObject<{
|
|
1681
|
+
symbol: z.ZodString;
|
|
1682
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
1683
|
+
hyperliquid: "hyperliquid";
|
|
1684
|
+
}>>;
|
|
1685
|
+
direction: z.ZodEnum<{
|
|
1686
|
+
LONG: "LONG";
|
|
1687
|
+
SHORT: "SHORT";
|
|
1688
|
+
}>;
|
|
1689
|
+
size: z.ZodObject<{
|
|
1690
|
+
mode: z.ZodEnum<{
|
|
1691
|
+
MARGIN_USD: "MARGIN_USD";
|
|
1692
|
+
BASE_QUANTITY: "BASE_QUANTITY";
|
|
1693
|
+
}>;
|
|
1694
|
+
value: z.ZodNumber;
|
|
1695
|
+
}, z.core.$strip>;
|
|
1696
|
+
execution: z.ZodObject<{
|
|
1697
|
+
style: z.ZodEnum<{
|
|
1698
|
+
MARKET: "MARKET";
|
|
1699
|
+
LIMIT_TAKER: "LIMIT_TAKER";
|
|
1700
|
+
LIMIT_MAKER: "LIMIT_MAKER";
|
|
1701
|
+
LIMIT_GTC: "LIMIT_GTC";
|
|
1702
|
+
}>;
|
|
1703
|
+
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
1704
|
+
GTC: "GTC";
|
|
1705
|
+
IOC: "IOC";
|
|
1706
|
+
FOK: "FOK";
|
|
1707
|
+
GTX: "GTX";
|
|
1708
|
+
}>>;
|
|
1709
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1710
|
+
}, z.core.$strip>;
|
|
1711
|
+
maxSlippageBps: z.ZodOptional<z.ZodNumber>;
|
|
1712
|
+
leverageOverride: z.ZodOptional<z.ZodNumber>;
|
|
1713
|
+
marginModeOverride: z.ZodOptional<z.ZodEnum<{
|
|
1714
|
+
ISOLATED: "ISOLATED";
|
|
1715
|
+
CROSS: "CROSS";
|
|
1716
|
+
}>>;
|
|
1717
|
+
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1718
|
+
protection: z.ZodOptional<z.ZodObject<{
|
|
1719
|
+
takeProfit: z.ZodOptional<z.ZodObject<{
|
|
1720
|
+
kind: z.ZodEnum<{
|
|
1721
|
+
MARKET: "MARKET";
|
|
1722
|
+
LIMIT: "LIMIT";
|
|
1723
|
+
}>;
|
|
1724
|
+
triggerPrice: z.ZodNumber;
|
|
1725
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1726
|
+
}, z.core.$strip>>;
|
|
1727
|
+
stopLoss: z.ZodOptional<z.ZodObject<{
|
|
1728
|
+
kind: z.ZodEnum<{
|
|
1729
|
+
MARKET: "MARKET";
|
|
1730
|
+
LIMIT: "LIMIT";
|
|
1731
|
+
}>;
|
|
1732
|
+
triggerPrice: z.ZodNumber;
|
|
1733
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1734
|
+
}, z.core.$strip>>;
|
|
1735
|
+
}, z.core.$strip>>;
|
|
1736
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
1737
|
+
}, z.core.$strip>;
|
|
1738
|
+
execute(input: {
|
|
1739
|
+
symbol: string;
|
|
1740
|
+
direction: "LONG" | "SHORT";
|
|
1741
|
+
size: {
|
|
1742
|
+
mode: "MARGIN_USD" | "BASE_QUANTITY";
|
|
1743
|
+
value: number;
|
|
1744
|
+
};
|
|
1745
|
+
execution: {
|
|
1746
|
+
style: "MARKET" | "LIMIT_TAKER" | "LIMIT_MAKER" | "LIMIT_GTC";
|
|
1747
|
+
timeInForce?: "GTC" | "IOC" | "FOK" | "GTX" | undefined;
|
|
1748
|
+
limitPrice?: number | undefined;
|
|
1749
|
+
};
|
|
1750
|
+
provider?: "hyperliquid" | undefined;
|
|
1751
|
+
maxSlippageBps?: number | undefined;
|
|
1752
|
+
leverageOverride?: number | undefined;
|
|
1753
|
+
marginModeOverride?: "ISOLATED" | "CROSS" | undefined;
|
|
1754
|
+
reduceOnly?: boolean | undefined;
|
|
1755
|
+
protection?: {
|
|
1756
|
+
takeProfit?: {
|
|
1757
|
+
kind: "MARKET" | "LIMIT";
|
|
1758
|
+
triggerPrice: number;
|
|
1759
|
+
limitPrice?: number | undefined;
|
|
1760
|
+
} | undefined;
|
|
1761
|
+
stopLoss?: {
|
|
1762
|
+
kind: "MARKET" | "LIMIT";
|
|
1763
|
+
triggerPrice: number;
|
|
1764
|
+
limitPrice?: number | undefined;
|
|
1765
|
+
} | undefined;
|
|
1766
|
+
} | undefined;
|
|
1767
|
+
idempotencyKey?: string | undefined;
|
|
1768
|
+
}): Promise<{
|
|
1769
|
+
content: {
|
|
1770
|
+
type: "text";
|
|
1771
|
+
text: string;
|
|
1772
|
+
}[];
|
|
1773
|
+
structuredContent: {
|
|
1774
|
+
status: "connected";
|
|
1775
|
+
connected: true;
|
|
1776
|
+
submission: SubmitTradeIntentResult;
|
|
1777
|
+
} | {
|
|
1778
|
+
actionRequired: true;
|
|
1779
|
+
loginUrl: string;
|
|
1780
|
+
nextStep: string;
|
|
1781
|
+
status: "pending";
|
|
1782
|
+
connected: false;
|
|
1783
|
+
message: string;
|
|
1784
|
+
deviceCode: string;
|
|
1785
|
+
userCode: string;
|
|
1786
|
+
verificationUri: string;
|
|
1787
|
+
verificationUriComplete: string;
|
|
1788
|
+
expiresInSeconds: number;
|
|
1789
|
+
pollIntervalSeconds: number;
|
|
1790
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1791
|
+
startedAt: string;
|
|
1792
|
+
};
|
|
1793
|
+
}>;
|
|
1794
|
+
}, {
|
|
1795
|
+
name: string;
|
|
1796
|
+
title: string;
|
|
1797
|
+
description: string;
|
|
1798
|
+
inputSchema: z.ZodObject<{
|
|
1799
|
+
symbol: z.ZodString;
|
|
1800
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
1801
|
+
hyperliquid: "hyperliquid";
|
|
1802
|
+
}>>;
|
|
1803
|
+
direction: z.ZodEnum<{
|
|
1804
|
+
LONG: "LONG";
|
|
1805
|
+
SHORT: "SHORT";
|
|
1806
|
+
}>;
|
|
1807
|
+
size: z.ZodObject<{
|
|
1808
|
+
mode: z.ZodEnum<{
|
|
1809
|
+
MARGIN_USD: "MARGIN_USD";
|
|
1810
|
+
BASE_QUANTITY: "BASE_QUANTITY";
|
|
1811
|
+
}>;
|
|
1812
|
+
value: z.ZodNumber;
|
|
1813
|
+
}, z.core.$strip>;
|
|
1814
|
+
execution: z.ZodObject<{
|
|
1815
|
+
style: z.ZodEnum<{
|
|
1816
|
+
MARKET: "MARKET";
|
|
1817
|
+
LIMIT_TAKER: "LIMIT_TAKER";
|
|
1818
|
+
LIMIT_MAKER: "LIMIT_MAKER";
|
|
1819
|
+
LIMIT_GTC: "LIMIT_GTC";
|
|
1820
|
+
}>;
|
|
1821
|
+
timeInForce: z.ZodOptional<z.ZodEnum<{
|
|
1822
|
+
GTC: "GTC";
|
|
1823
|
+
IOC: "IOC";
|
|
1824
|
+
FOK: "FOK";
|
|
1825
|
+
GTX: "GTX";
|
|
1826
|
+
}>>;
|
|
1827
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1828
|
+
}, z.core.$strip>;
|
|
1829
|
+
maxSlippageBps: z.ZodOptional<z.ZodNumber>;
|
|
1830
|
+
leverageOverride: z.ZodOptional<z.ZodNumber>;
|
|
1831
|
+
marginModeOverride: z.ZodOptional<z.ZodEnum<{
|
|
1832
|
+
ISOLATED: "ISOLATED";
|
|
1833
|
+
CROSS: "CROSS";
|
|
1834
|
+
}>>;
|
|
1835
|
+
reduceOnly: z.ZodOptional<z.ZodBoolean>;
|
|
1836
|
+
protection: z.ZodOptional<z.ZodObject<{
|
|
1837
|
+
takeProfit: z.ZodOptional<z.ZodObject<{
|
|
1838
|
+
kind: z.ZodEnum<{
|
|
1839
|
+
MARKET: "MARKET";
|
|
1840
|
+
LIMIT: "LIMIT";
|
|
1841
|
+
}>;
|
|
1842
|
+
triggerPrice: z.ZodNumber;
|
|
1843
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1844
|
+
}, z.core.$strip>>;
|
|
1845
|
+
stopLoss: z.ZodOptional<z.ZodObject<{
|
|
1846
|
+
kind: z.ZodEnum<{
|
|
1847
|
+
MARKET: "MARKET";
|
|
1848
|
+
LIMIT: "LIMIT";
|
|
1849
|
+
}>;
|
|
1850
|
+
triggerPrice: z.ZodNumber;
|
|
1851
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1852
|
+
}, z.core.$strip>>;
|
|
1853
|
+
}, z.core.$strip>>;
|
|
1854
|
+
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
1855
|
+
}, z.core.$strip>;
|
|
1856
|
+
execute(input: {
|
|
1857
|
+
symbol: string;
|
|
1858
|
+
direction: "LONG" | "SHORT";
|
|
1859
|
+
size: {
|
|
1860
|
+
mode: "MARGIN_USD" | "BASE_QUANTITY";
|
|
1861
|
+
value: number;
|
|
1862
|
+
};
|
|
1863
|
+
execution: {
|
|
1864
|
+
style: "MARKET" | "LIMIT_TAKER" | "LIMIT_MAKER" | "LIMIT_GTC";
|
|
1865
|
+
timeInForce?: "GTC" | "IOC" | "FOK" | "GTX" | undefined;
|
|
1866
|
+
limitPrice?: number | undefined;
|
|
1867
|
+
};
|
|
1868
|
+
provider?: "hyperliquid" | undefined;
|
|
1869
|
+
maxSlippageBps?: number | undefined;
|
|
1870
|
+
leverageOverride?: number | undefined;
|
|
1871
|
+
marginModeOverride?: "ISOLATED" | "CROSS" | undefined;
|
|
1872
|
+
reduceOnly?: boolean | undefined;
|
|
1873
|
+
protection?: {
|
|
1874
|
+
takeProfit?: {
|
|
1875
|
+
kind: "MARKET" | "LIMIT";
|
|
1876
|
+
triggerPrice: number;
|
|
1877
|
+
limitPrice?: number | undefined;
|
|
1878
|
+
} | undefined;
|
|
1879
|
+
stopLoss?: {
|
|
1880
|
+
kind: "MARKET" | "LIMIT";
|
|
1881
|
+
triggerPrice: number;
|
|
1882
|
+
limitPrice?: number | undefined;
|
|
1883
|
+
} | undefined;
|
|
1884
|
+
} | undefined;
|
|
1885
|
+
idempotencyKey?: string | undefined;
|
|
1886
|
+
}): Promise<{
|
|
1887
|
+
content: {
|
|
1888
|
+
type: "text";
|
|
1889
|
+
text: string;
|
|
1890
|
+
}[];
|
|
1891
|
+
structuredContent: {
|
|
1892
|
+
status: "connected";
|
|
1893
|
+
connected: true;
|
|
1894
|
+
submission: SubmitTradeIntentResult;
|
|
1895
|
+
} | {
|
|
1896
|
+
actionRequired: true;
|
|
1897
|
+
loginUrl: string;
|
|
1898
|
+
nextStep: string;
|
|
1899
|
+
status: "pending";
|
|
1900
|
+
connected: false;
|
|
1901
|
+
message: string;
|
|
1902
|
+
deviceCode: string;
|
|
1903
|
+
userCode: string;
|
|
1904
|
+
verificationUri: string;
|
|
1905
|
+
verificationUriComplete: string;
|
|
1906
|
+
expiresInSeconds: number;
|
|
1907
|
+
pollIntervalSeconds: number;
|
|
1908
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1909
|
+
startedAt: string;
|
|
1910
|
+
};
|
|
1911
|
+
}>;
|
|
1912
|
+
}, {
|
|
1913
|
+
name: string;
|
|
1914
|
+
title: string;
|
|
1915
|
+
description: string;
|
|
1916
|
+
inputSchema: z.ZodObject<{
|
|
1917
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
1918
|
+
hyperliquid: "hyperliquid";
|
|
1919
|
+
}>>;
|
|
1920
|
+
symbol: z.ZodString;
|
|
1921
|
+
maxSlippageBps: z.ZodOptional<z.ZodNumber>;
|
|
1922
|
+
}, z.core.$strip>;
|
|
1923
|
+
execute(input: {
|
|
1924
|
+
symbol: string;
|
|
1925
|
+
provider?: "hyperliquid" | undefined;
|
|
1926
|
+
maxSlippageBps?: number | undefined;
|
|
1927
|
+
}): Promise<{
|
|
1928
|
+
content: {
|
|
1929
|
+
type: "text";
|
|
1930
|
+
text: string;
|
|
1931
|
+
}[];
|
|
1932
|
+
structuredContent: {
|
|
1933
|
+
status: "connected";
|
|
1934
|
+
connected: true;
|
|
1935
|
+
closure: ClosePositionResult;
|
|
1936
|
+
} | {
|
|
1937
|
+
actionRequired: true;
|
|
1938
|
+
loginUrl: string;
|
|
1939
|
+
nextStep: string;
|
|
1940
|
+
status: "pending";
|
|
1941
|
+
connected: false;
|
|
1942
|
+
message: string;
|
|
1943
|
+
deviceCode: string;
|
|
1944
|
+
userCode: string;
|
|
1945
|
+
verificationUri: string;
|
|
1946
|
+
verificationUriComplete: string;
|
|
1947
|
+
expiresInSeconds: number;
|
|
1948
|
+
pollIntervalSeconds: number;
|
|
1949
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
1950
|
+
startedAt: string;
|
|
1951
|
+
};
|
|
1952
|
+
}>;
|
|
1953
|
+
}, {
|
|
1954
|
+
name: string;
|
|
1955
|
+
title: string;
|
|
1956
|
+
description: string;
|
|
1957
|
+
inputSchema: z.ZodObject<{
|
|
1958
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
1959
|
+
hyperliquid: "hyperliquid";
|
|
1960
|
+
}>>;
|
|
1961
|
+
symbol: z.ZodString;
|
|
1962
|
+
applyTo: z.ZodEnum<{
|
|
1963
|
+
FULL_POSITION: "FULL_POSITION";
|
|
1964
|
+
CUSTOM_QUANTITY: "CUSTOM_QUANTITY";
|
|
1965
|
+
}>;
|
|
1966
|
+
quantity: z.ZodOptional<z.ZodNumber>;
|
|
1967
|
+
parentClientOrderId: z.ZodString;
|
|
1968
|
+
takeProfit: z.ZodOptional<z.ZodObject<{
|
|
1969
|
+
kind: z.ZodEnum<{
|
|
1970
|
+
MARKET: "MARKET";
|
|
1971
|
+
LIMIT: "LIMIT";
|
|
1972
|
+
}>;
|
|
1973
|
+
triggerPrice: z.ZodNumber;
|
|
1974
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1975
|
+
}, z.core.$strip>>;
|
|
1976
|
+
stopLoss: z.ZodOptional<z.ZodObject<{
|
|
1977
|
+
kind: z.ZodEnum<{
|
|
1978
|
+
MARKET: "MARKET";
|
|
1979
|
+
LIMIT: "LIMIT";
|
|
1980
|
+
}>;
|
|
1981
|
+
triggerPrice: z.ZodNumber;
|
|
1982
|
+
limitPrice: z.ZodOptional<z.ZodNumber>;
|
|
1983
|
+
}, z.core.$strip>>;
|
|
1984
|
+
}, z.core.$strip>;
|
|
1985
|
+
execute(input: {
|
|
1986
|
+
symbol: string;
|
|
1987
|
+
applyTo: "FULL_POSITION" | "CUSTOM_QUANTITY";
|
|
1988
|
+
parentClientOrderId: string;
|
|
1989
|
+
provider?: "hyperliquid" | undefined;
|
|
1990
|
+
quantity?: number | undefined;
|
|
1991
|
+
takeProfit?: {
|
|
1992
|
+
kind: "MARKET" | "LIMIT";
|
|
1993
|
+
triggerPrice: number;
|
|
1994
|
+
limitPrice?: number | undefined;
|
|
1995
|
+
} | undefined;
|
|
1996
|
+
stopLoss?: {
|
|
1997
|
+
kind: "MARKET" | "LIMIT";
|
|
1998
|
+
triggerPrice: number;
|
|
1999
|
+
limitPrice?: number | undefined;
|
|
2000
|
+
} | undefined;
|
|
2001
|
+
}): Promise<{
|
|
2002
|
+
content: {
|
|
2003
|
+
type: "text";
|
|
2004
|
+
text: string;
|
|
2005
|
+
}[];
|
|
2006
|
+
structuredContent: {
|
|
2007
|
+
status: "connected";
|
|
2008
|
+
connected: true;
|
|
2009
|
+
protection: SetTpSlResult;
|
|
2010
|
+
} | {
|
|
2011
|
+
actionRequired: true;
|
|
2012
|
+
loginUrl: string;
|
|
2013
|
+
nextStep: string;
|
|
2014
|
+
status: "pending";
|
|
2015
|
+
connected: false;
|
|
2016
|
+
message: string;
|
|
2017
|
+
deviceCode: string;
|
|
2018
|
+
userCode: string;
|
|
2019
|
+
verificationUri: string;
|
|
2020
|
+
verificationUriComplete: string;
|
|
2021
|
+
expiresInSeconds: number;
|
|
2022
|
+
pollIntervalSeconds: number;
|
|
2023
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
2024
|
+
startedAt: string;
|
|
2025
|
+
};
|
|
2026
|
+
}>;
|
|
2027
|
+
}, {
|
|
2028
|
+
name: string;
|
|
2029
|
+
title: string;
|
|
2030
|
+
description: string;
|
|
2031
|
+
inputSchema: z.ZodObject<{
|
|
2032
|
+
provider: z.ZodOptional<z.ZodEnum<{
|
|
2033
|
+
hyperliquid: "hyperliquid";
|
|
2034
|
+
}>>;
|
|
2035
|
+
symbol: z.ZodString;
|
|
2036
|
+
orderId: z.ZodString;
|
|
2037
|
+
}, z.core.$strip>;
|
|
2038
|
+
execute(input: {
|
|
2039
|
+
symbol: string;
|
|
2040
|
+
orderId: string;
|
|
2041
|
+
provider?: "hyperliquid" | undefined;
|
|
2042
|
+
}): Promise<{
|
|
2043
|
+
content: {
|
|
2044
|
+
type: "text";
|
|
2045
|
+
text: string;
|
|
2046
|
+
}[];
|
|
2047
|
+
structuredContent: {
|
|
2048
|
+
status: "connected";
|
|
2049
|
+
connected: true;
|
|
2050
|
+
deletion: DeleteTpSlResult;
|
|
2051
|
+
} | {
|
|
2052
|
+
actionRequired: true;
|
|
2053
|
+
loginUrl: string;
|
|
2054
|
+
nextStep: string;
|
|
2055
|
+
status: "pending";
|
|
2056
|
+
connected: false;
|
|
2057
|
+
message: string;
|
|
2058
|
+
deviceCode: string;
|
|
2059
|
+
userCode: string;
|
|
2060
|
+
verificationUri: string;
|
|
2061
|
+
verificationUriComplete: string;
|
|
2062
|
+
expiresInSeconds: number;
|
|
2063
|
+
pollIntervalSeconds: number;
|
|
2064
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
2065
|
+
startedAt: string;
|
|
2066
|
+
};
|
|
2067
|
+
}>;
|
|
2068
|
+
}, {
|
|
2069
|
+
name: string;
|
|
2070
|
+
title: string;
|
|
2071
|
+
description: string;
|
|
2072
|
+
inputSchema: z.ZodObject<{}, z.core.$strip>;
|
|
2073
|
+
execute(): Promise<{
|
|
2074
|
+
content: {
|
|
2075
|
+
type: "text";
|
|
2076
|
+
text: string;
|
|
2077
|
+
}[];
|
|
2078
|
+
structuredContent: {
|
|
2079
|
+
status: "connected";
|
|
2080
|
+
connected: true;
|
|
2081
|
+
orders: OpenOrder[];
|
|
2082
|
+
} | {
|
|
2083
|
+
actionRequired: true;
|
|
2084
|
+
loginUrl: string;
|
|
2085
|
+
nextStep: string;
|
|
2086
|
+
status: "pending";
|
|
2087
|
+
connected: false;
|
|
2088
|
+
message: string;
|
|
2089
|
+
deviceCode: string;
|
|
2090
|
+
userCode: string;
|
|
2091
|
+
verificationUri: string;
|
|
2092
|
+
verificationUriComplete: string;
|
|
2093
|
+
expiresInSeconds: number;
|
|
2094
|
+
pollIntervalSeconds: number;
|
|
2095
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
2096
|
+
startedAt: string;
|
|
2097
|
+
};
|
|
2098
|
+
}>;
|
|
2099
|
+
}, {
|
|
2100
|
+
name: string;
|
|
2101
|
+
title: string;
|
|
2102
|
+
description: string;
|
|
2103
|
+
inputSchema: z.ZodObject<{
|
|
2104
|
+
symbol: z.ZodString;
|
|
2105
|
+
oid: z.ZodNumber;
|
|
2106
|
+
}, z.core.$strip>;
|
|
2107
|
+
execute(input: {
|
|
2108
|
+
symbol: string;
|
|
2109
|
+
oid: number;
|
|
2110
|
+
}): Promise<{
|
|
2111
|
+
content: {
|
|
2112
|
+
type: "text";
|
|
2113
|
+
text: string;
|
|
2114
|
+
}[];
|
|
2115
|
+
structuredContent: {
|
|
2116
|
+
status: "connected";
|
|
2117
|
+
connected: true;
|
|
2118
|
+
cancellation: CancelOrderResult;
|
|
2119
|
+
} | {
|
|
2120
|
+
actionRequired: true;
|
|
2121
|
+
loginUrl: string;
|
|
2122
|
+
nextStep: string;
|
|
2123
|
+
status: "pending";
|
|
2124
|
+
connected: false;
|
|
2125
|
+
message: string;
|
|
2126
|
+
deviceCode: string;
|
|
2127
|
+
userCode: string;
|
|
2128
|
+
verificationUri: string;
|
|
2129
|
+
verificationUriComplete: string;
|
|
2130
|
+
expiresInSeconds: number;
|
|
2131
|
+
pollIntervalSeconds: number;
|
|
2132
|
+
requestedScope: AgentDeviceStartInput["scope"];
|
|
2133
|
+
startedAt: string;
|
|
2134
|
+
};
|
|
2135
|
+
}>;
|
|
2136
|
+
}];
|
|
2137
|
+
|
|
2138
|
+
export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, type DeleteTpSlToolResult, type EnsureLoginOptions, type EnsureLoginResult, FileAgentSessionStore, type GetHeliosAgentMcpDocumentInput, HOSTED_RECONNECT_MESSAGE, HeliosAgentMcpAccountService, type HeliosAgentMcpAccountServiceOptions, HeliosAgentMcpAuthService, type HeliosAgentMcpAuthServiceOptions, type HeliosAgentMcpDocsIndex, type HeliosAgentMcpDocsIndexEntry, HeliosAgentMcpDocsService, type HeliosAgentMcpDocsServiceOptions, type HeliosAgentMcpDocument, HeliosAgentMcpLedgerService, type HeliosAgentMcpLedgerServiceOptions, HeliosAgentMcpMarketService, type HeliosAgentMcpMarketServiceOptions, HeliosAgentMcpProviderService, type HeliosAgentMcpProviderServiceOptions, HeliosAgentMcpTradingService, type HeliosAgentMcpTradingServiceOptions, type HeliosMcpToolDefinition, type HeliosMcpToolResult, type LedgerFillsResult, type LedgerSummaryResult, type MarketSnapshotChunkResult, type MarketSnapshotResult, type MarketSymbolDetailResult, MemoryAgentMcpSessionStore, type OpenOrdersToolResult, type OpenPositionsResult, type PendingAgentLogin, type PendingLoginResult, type PollLoginResult, type PortfolioResult, type SetTpSlToolResult, type StartLoginResult, type TradeIntentAction, type TradeIntentActionInput, type TradeIntentActionResult, type WalletStateResult, createHeliosAccountToolDefinitions, createHeliosAgentMcpServer, createHeliosAuthToolDefinitions, createHeliosDocsToolDefinitions, createHeliosLedgerToolDefinitions, createHeliosMarketToolDefinitions, createHeliosProviderToolDefinitions, createHeliosTradingToolDefinitions, formatHeliosLoginPrompt, getDefaultHeliosAgentMcpDocsRoot, getDefaultHeliosAgentMcpSessionPath, pendingAgentLoginSchema, retryAfterUnauthorizedRefresh, toolAnnotations };
|