@pgnio/helios-mcp 0.2.4 → 0.2.6
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/dist/chunk-7EDI4KLD.mjs +3042 -0
- package/dist/chunk-WLCFIWFP.mjs +3048 -0
- package/dist/cli.js +15 -6
- package/dist/cli.mjs +1 -1
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +17 -6
- package/dist/index.mjs +3 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -221,7 +221,7 @@ var marketSnapshotValueSchema = import_zod.z.union([import_zod.z.string(), impor
|
|
|
221
221
|
var marketSnapshotInputSchema = import_zod.z.object({
|
|
222
222
|
scope: marketSnapshotScopeSchema.optional(),
|
|
223
223
|
symbols: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional(),
|
|
224
|
-
fields: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional().describe("Table columns to return; sym and base always come back. Ids: rank, lp, bv, qv, ts, r1m, r3m, r5m, r15m, r30m, r1h, r2h, r4h, r6h, r8h, r12h, r24h, r3d, r7d, hmi, hmiv, reg, ob, de, hfi, ar, ms, vcc, vcp, obosd, obosp, vwap, vwz, poc, pocd, vap, macdh, macds, macdd, srs, srr, sr, az, hfiw, trv, tri, trh, hs."),
|
|
224
|
+
fields: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional().describe("Table columns to return; sym and base always come back. Ids: rank, lp, bv, qv, ts, r1m, r3m, r5m, r15m, r30m, r1h, r2h, r4h, r6h, r8h, r12h, r24h, r3d, r7d, hmi, hmiv, reg, ob, de, hfi, ar, ms, vcc, vcp, obosd, obosp, vwap, vwz, poc, pocd, vap, macdh, macds, macdd, srs, srr, fh24, fl24, fh7, fl7, sr, az, hfiw, trv, tri, trh, hs."),
|
|
225
225
|
sort: import_zod.z.enum(["rank"]).optional().describe('"rank" orders rows by market cap rank, unranked last.')
|
|
226
226
|
});
|
|
227
227
|
var marketSnapshotChunkInputSchema = marketSnapshotInputSchema.extend({
|
|
@@ -273,7 +273,8 @@ var marketSnapshotChunkSchema = import_zod.z.object({
|
|
|
273
273
|
legend: import_zod.z.record(import_zod.z.string(), import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.string())]))
|
|
274
274
|
});
|
|
275
275
|
var marketSymbolDetailInputSchema = import_zod.z.object({
|
|
276
|
-
symbol: import_zod.z.string().min(1)
|
|
276
|
+
symbol: import_zod.z.string().min(1),
|
|
277
|
+
full: import_zod.z.boolean().optional().describe("true adds every raw indicator and the price history (large, ~25 KB). Omit for the compact row and market context.")
|
|
277
278
|
});
|
|
278
279
|
var marketSymbolDetailSchema = import_zod.z.object({
|
|
279
280
|
schema: import_zod.z.literal("helios.market_symbol_detail.v1"),
|
|
@@ -1448,6 +1449,10 @@ var DEFAULT_SNAPSHOT_FIELDS = [
|
|
|
1448
1449
|
"ms",
|
|
1449
1450
|
"srs",
|
|
1450
1451
|
"srr",
|
|
1452
|
+
"fh24",
|
|
1453
|
+
"fl24",
|
|
1454
|
+
"fh7",
|
|
1455
|
+
"fl7",
|
|
1451
1456
|
"vwz",
|
|
1452
1457
|
"tri"
|
|
1453
1458
|
];
|
|
@@ -1465,6 +1470,10 @@ function topOfSnapshot(snapshot, input, top = DEFAULT_SNAPSHOT_TOP) {
|
|
|
1465
1470
|
const returnedSymbols = baseIndex === -1 ? snapshot.returnedSymbols.slice(0, top) : rows.map((row) => String(row[baseIndex]));
|
|
1466
1471
|
return { ...snapshot, symbolCount: rows.length, returnedSymbols, table: { ...snapshot.table, rows } };
|
|
1467
1472
|
}
|
|
1473
|
+
function compactSymbolDetail(detail, full) {
|
|
1474
|
+
if (full) return detail;
|
|
1475
|
+
return { ...detail, changeMap: {}, metrics: null };
|
|
1476
|
+
}
|
|
1468
1477
|
var HeliosAgentMcpMarketService = class {
|
|
1469
1478
|
constructor(options) {
|
|
1470
1479
|
__publicField(this, "authService");
|
|
@@ -1569,7 +1578,7 @@ var HeliosAgentMcpMarketService = class {
|
|
|
1569
1578
|
}
|
|
1570
1579
|
const session = await this.authService.requireSession();
|
|
1571
1580
|
try {
|
|
1572
|
-
const detail = await this.dataBridgeClient.getMarketSymbolDetail(session.accessToken, input);
|
|
1581
|
+
const detail = compactSymbolDetail(await this.dataBridgeClient.getMarketSymbolDetail(session.accessToken, { symbol: input.symbol }), input.full);
|
|
1573
1582
|
return {
|
|
1574
1583
|
status: "connected",
|
|
1575
1584
|
connected: true,
|
|
@@ -1581,7 +1590,7 @@ var HeliosAgentMcpMarketService = class {
|
|
|
1581
1590
|
error,
|
|
1582
1591
|
loginOptions,
|
|
1583
1592
|
retry: async (accessToken) => {
|
|
1584
|
-
const detail = await this.dataBridgeClient.getMarketSymbolDetail(accessToken, input);
|
|
1593
|
+
const detail = compactSymbolDetail(await this.dataBridgeClient.getMarketSymbolDetail(accessToken, { symbol: input.symbol }), input.full);
|
|
1585
1594
|
return {
|
|
1586
1595
|
status: "connected",
|
|
1587
1596
|
connected: true,
|
|
@@ -2653,7 +2662,7 @@ function createHeliosMarketToolDefinitions(service) {
|
|
|
2653
2662
|
{
|
|
2654
2663
|
name: "helios_market_get_symbol_detail",
|
|
2655
2664
|
title: "Get Helios Symbol Detail",
|
|
2656
|
-
description: "Returns
|
|
2665
|
+
description: "Returns one coin: every snapshot column plus Hyperliquid context (funding, open interest, max leverage, mark price). For several coins, use helios_market_get_snapshot with symbols instead; pass full only when you need raw indicators.",
|
|
2657
2666
|
inputSchema: marketSymbolDetailInputSchema,
|
|
2658
2667
|
async execute(input) {
|
|
2659
2668
|
const result = marketSymbolDetailToolOutputSchema.parse(await service.getSymbolDetail(input));
|
|
@@ -2877,7 +2886,7 @@ async function createHeliosAgentMcpServer(options) {
|
|
|
2877
2886
|
const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
|
|
2878
2887
|
const server = new McpServer({
|
|
2879
2888
|
name: "helios",
|
|
2880
|
-
version: "0.2.
|
|
2889
|
+
version: "0.2.6"
|
|
2881
2890
|
});
|
|
2882
2891
|
const sessionStore = options.sessionStore ?? new FileAgentSessionStore(options.sessionPath ?? getDefaultHeliosAgentMcpSessionPath());
|
|
2883
2892
|
const client = new HeliosAgentAuthClient({
|
package/dist/cli.mjs
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -287,6 +287,7 @@ declare const marketSnapshotChunkSchema: z.ZodObject<{
|
|
|
287
287
|
}, z.core.$strip>;
|
|
288
288
|
declare const marketSymbolDetailInputSchema: z.ZodObject<{
|
|
289
289
|
symbol: z.ZodString;
|
|
290
|
+
full: z.ZodOptional<z.ZodBoolean>;
|
|
290
291
|
}, z.core.$strip>;
|
|
291
292
|
declare const marketSymbolDetailSchema: z.ZodObject<{
|
|
292
293
|
schema: z.ZodLiteral<"helios.market_symbol_detail.v1">;
|
|
@@ -964,6 +965,11 @@ declare const DEFAULT_SNAPSHOT_FIELDS: readonly string[];
|
|
|
964
965
|
declare function withSnapshotDefaults<T extends MarketSnapshotInput>(input: T): T;
|
|
965
966
|
/** A ranked snapshot cut to its top coins, unless the agent named its symbols. */
|
|
966
967
|
declare function topOfSnapshot(snapshot: MarketSnapshot, input: MarketSnapshotInput, top?: number): MarketSnapshot;
|
|
968
|
+
/**
|
|
969
|
+
* A symbol detail without the raw indicator objects and price history unless the agent asked for `full`. Those are
|
|
970
|
+
* ~25 KB a coin; the row already carries every snapshot column, and changeMap repeats the row's returns.
|
|
971
|
+
*/
|
|
972
|
+
declare function compactSymbolDetail(detail: MarketSymbolDetail, full: boolean | undefined): MarketSymbolDetail;
|
|
967
973
|
declare class HeliosAgentMcpMarketService {
|
|
968
974
|
private readonly authService;
|
|
969
975
|
private readonly dataBridgeClient;
|
|
@@ -1568,9 +1574,11 @@ declare function createHeliosMarketToolDefinitions(service: HeliosAgentMcpMarket
|
|
|
1568
1574
|
description: string;
|
|
1569
1575
|
inputSchema: z.ZodObject<{
|
|
1570
1576
|
symbol: z.ZodString;
|
|
1577
|
+
full: z.ZodOptional<z.ZodBoolean>;
|
|
1571
1578
|
}, z.core.$strip>;
|
|
1572
1579
|
execute(input: {
|
|
1573
1580
|
symbol: string;
|
|
1581
|
+
full?: boolean | undefined;
|
|
1574
1582
|
}): Promise<{
|
|
1575
1583
|
content: {
|
|
1576
1584
|
type: "text";
|
|
@@ -2178,4 +2186,4 @@ declare function createHeliosTradingToolDefinitions(service: HeliosAgentMcpTradi
|
|
|
2178
2186
|
}>;
|
|
2179
2187
|
}];
|
|
2180
2188
|
|
|
2181
|
-
export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, DEFAULT_SNAPSHOT_FIELDS, DEFAULT_SNAPSHOT_TOP, 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, topOfSnapshot, withDataText, withSnapshotDefaults };
|
|
2189
|
+
export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, DEFAULT_SNAPSHOT_FIELDS, DEFAULT_SNAPSHOT_TOP, 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, compactSymbolDetail, createHeliosAccountToolDefinitions, createHeliosAgentMcpServer, createHeliosAuthToolDefinitions, createHeliosDocsToolDefinitions, createHeliosLedgerToolDefinitions, createHeliosMarketToolDefinitions, createHeliosProviderToolDefinitions, createHeliosTradingToolDefinitions, formatHeliosLoginPrompt, getDefaultHeliosAgentMcpDocsRoot, getDefaultHeliosAgentMcpSessionPath, pendingAgentLoginSchema, retryAfterUnauthorizedRefresh, toolAnnotations, topOfSnapshot, withDataText, withSnapshotDefaults };
|
package/dist/index.d.ts
CHANGED
|
@@ -287,6 +287,7 @@ declare const marketSnapshotChunkSchema: z.ZodObject<{
|
|
|
287
287
|
}, z.core.$strip>;
|
|
288
288
|
declare const marketSymbolDetailInputSchema: z.ZodObject<{
|
|
289
289
|
symbol: z.ZodString;
|
|
290
|
+
full: z.ZodOptional<z.ZodBoolean>;
|
|
290
291
|
}, z.core.$strip>;
|
|
291
292
|
declare const marketSymbolDetailSchema: z.ZodObject<{
|
|
292
293
|
schema: z.ZodLiteral<"helios.market_symbol_detail.v1">;
|
|
@@ -964,6 +965,11 @@ declare const DEFAULT_SNAPSHOT_FIELDS: readonly string[];
|
|
|
964
965
|
declare function withSnapshotDefaults<T extends MarketSnapshotInput>(input: T): T;
|
|
965
966
|
/** A ranked snapshot cut to its top coins, unless the agent named its symbols. */
|
|
966
967
|
declare function topOfSnapshot(snapshot: MarketSnapshot, input: MarketSnapshotInput, top?: number): MarketSnapshot;
|
|
968
|
+
/**
|
|
969
|
+
* A symbol detail without the raw indicator objects and price history unless the agent asked for `full`. Those are
|
|
970
|
+
* ~25 KB a coin; the row already carries every snapshot column, and changeMap repeats the row's returns.
|
|
971
|
+
*/
|
|
972
|
+
declare function compactSymbolDetail(detail: MarketSymbolDetail, full: boolean | undefined): MarketSymbolDetail;
|
|
967
973
|
declare class HeliosAgentMcpMarketService {
|
|
968
974
|
private readonly authService;
|
|
969
975
|
private readonly dataBridgeClient;
|
|
@@ -1568,9 +1574,11 @@ declare function createHeliosMarketToolDefinitions(service: HeliosAgentMcpMarket
|
|
|
1568
1574
|
description: string;
|
|
1569
1575
|
inputSchema: z.ZodObject<{
|
|
1570
1576
|
symbol: z.ZodString;
|
|
1577
|
+
full: z.ZodOptional<z.ZodBoolean>;
|
|
1571
1578
|
}, z.core.$strip>;
|
|
1572
1579
|
execute(input: {
|
|
1573
1580
|
symbol: string;
|
|
1581
|
+
full?: boolean | undefined;
|
|
1574
1582
|
}): Promise<{
|
|
1575
1583
|
content: {
|
|
1576
1584
|
type: "text";
|
|
@@ -2178,4 +2186,4 @@ declare function createHeliosTradingToolDefinitions(service: HeliosAgentMcpTradi
|
|
|
2178
2186
|
}>;
|
|
2179
2187
|
}];
|
|
2180
2188
|
|
|
2181
|
-
export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, DEFAULT_SNAPSHOT_FIELDS, DEFAULT_SNAPSHOT_TOP, 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, topOfSnapshot, withDataText, withSnapshotDefaults };
|
|
2189
|
+
export { type ActiveProviderView, type AgentMcpSessionStore, type CancelOrderToolResult, type ClosePositionToolResult, type CreateHeliosAgentMcpServerOptions, DEFAULT_SNAPSHOT_FIELDS, DEFAULT_SNAPSHOT_TOP, 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, compactSymbolDetail, createHeliosAccountToolDefinitions, createHeliosAgentMcpServer, createHeliosAuthToolDefinitions, createHeliosDocsToolDefinitions, createHeliosLedgerToolDefinitions, createHeliosMarketToolDefinitions, createHeliosProviderToolDefinitions, createHeliosTradingToolDefinitions, formatHeliosLoginPrompt, getDefaultHeliosAgentMcpDocsRoot, getDefaultHeliosAgentMcpSessionPath, pendingAgentLoginSchema, retryAfterUnauthorizedRefresh, toolAnnotations, topOfSnapshot, withDataText, withSnapshotDefaults };
|
package/dist/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __export(index_exports, {
|
|
|
44
44
|
HeliosAgentMcpProviderService: () => HeliosAgentMcpProviderService,
|
|
45
45
|
HeliosAgentMcpTradingService: () => HeliosAgentMcpTradingService,
|
|
46
46
|
MemoryAgentMcpSessionStore: () => MemoryAgentMcpSessionStore,
|
|
47
|
+
compactSymbolDetail: () => compactSymbolDetail,
|
|
47
48
|
createHeliosAccountToolDefinitions: () => createHeliosAccountToolDefinitions,
|
|
48
49
|
createHeliosAgentMcpServer: () => createHeliosAgentMcpServer,
|
|
49
50
|
createHeliosAuthToolDefinitions: () => createHeliosAuthToolDefinitions,
|
|
@@ -260,7 +261,7 @@ var marketSnapshotValueSchema = import_zod.z.union([import_zod.z.string(), impor
|
|
|
260
261
|
var marketSnapshotInputSchema = import_zod.z.object({
|
|
261
262
|
scope: marketSnapshotScopeSchema.optional(),
|
|
262
263
|
symbols: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional(),
|
|
263
|
-
fields: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional().describe("Table columns to return; sym and base always come back. Ids: rank, lp, bv, qv, ts, r1m, r3m, r5m, r15m, r30m, r1h, r2h, r4h, r6h, r8h, r12h, r24h, r3d, r7d, hmi, hmiv, reg, ob, de, hfi, ar, ms, vcc, vcp, obosd, obosp, vwap, vwz, poc, pocd, vap, macdh, macds, macdd, srs, srr, sr, az, hfiw, trv, tri, trh, hs."),
|
|
264
|
+
fields: import_zod.z.array(import_zod.z.string().min(1)).min(1).optional().describe("Table columns to return; sym and base always come back. Ids: rank, lp, bv, qv, ts, r1m, r3m, r5m, r15m, r30m, r1h, r2h, r4h, r6h, r8h, r12h, r24h, r3d, r7d, hmi, hmiv, reg, ob, de, hfi, ar, ms, vcc, vcp, obosd, obosp, vwap, vwz, poc, pocd, vap, macdh, macds, macdd, srs, srr, fh24, fl24, fh7, fl7, sr, az, hfiw, trv, tri, trh, hs."),
|
|
264
265
|
sort: import_zod.z.enum(["rank"]).optional().describe('"rank" orders rows by market cap rank, unranked last.')
|
|
265
266
|
});
|
|
266
267
|
var marketSnapshotChunkInputSchema = marketSnapshotInputSchema.extend({
|
|
@@ -312,7 +313,8 @@ var marketSnapshotChunkSchema = import_zod.z.object({
|
|
|
312
313
|
legend: import_zod.z.record(import_zod.z.string(), import_zod.z.union([import_zod.z.string(), import_zod.z.array(import_zod.z.string())]))
|
|
313
314
|
});
|
|
314
315
|
var marketSymbolDetailInputSchema = import_zod.z.object({
|
|
315
|
-
symbol: import_zod.z.string().min(1)
|
|
316
|
+
symbol: import_zod.z.string().min(1),
|
|
317
|
+
full: import_zod.z.boolean().optional().describe("true adds every raw indicator and the price history (large, ~25 KB). Omit for the compact row and market context.")
|
|
316
318
|
});
|
|
317
319
|
var marketSymbolDetailSchema = import_zod.z.object({
|
|
318
320
|
schema: import_zod.z.literal("helios.market_symbol_detail.v1"),
|
|
@@ -1487,6 +1489,10 @@ var DEFAULT_SNAPSHOT_FIELDS = [
|
|
|
1487
1489
|
"ms",
|
|
1488
1490
|
"srs",
|
|
1489
1491
|
"srr",
|
|
1492
|
+
"fh24",
|
|
1493
|
+
"fl24",
|
|
1494
|
+
"fh7",
|
|
1495
|
+
"fl7",
|
|
1490
1496
|
"vwz",
|
|
1491
1497
|
"tri"
|
|
1492
1498
|
];
|
|
@@ -1504,6 +1510,10 @@ function topOfSnapshot(snapshot, input, top = DEFAULT_SNAPSHOT_TOP) {
|
|
|
1504
1510
|
const returnedSymbols = baseIndex === -1 ? snapshot.returnedSymbols.slice(0, top) : rows.map((row) => String(row[baseIndex]));
|
|
1505
1511
|
return { ...snapshot, symbolCount: rows.length, returnedSymbols, table: { ...snapshot.table, rows } };
|
|
1506
1512
|
}
|
|
1513
|
+
function compactSymbolDetail(detail, full) {
|
|
1514
|
+
if (full) return detail;
|
|
1515
|
+
return { ...detail, changeMap: {}, metrics: null };
|
|
1516
|
+
}
|
|
1507
1517
|
var HeliosAgentMcpMarketService = class {
|
|
1508
1518
|
constructor(options) {
|
|
1509
1519
|
__publicField(this, "authService");
|
|
@@ -1608,7 +1618,7 @@ var HeliosAgentMcpMarketService = class {
|
|
|
1608
1618
|
}
|
|
1609
1619
|
const session = await this.authService.requireSession();
|
|
1610
1620
|
try {
|
|
1611
|
-
const detail = await this.dataBridgeClient.getMarketSymbolDetail(session.accessToken, input);
|
|
1621
|
+
const detail = compactSymbolDetail(await this.dataBridgeClient.getMarketSymbolDetail(session.accessToken, { symbol: input.symbol }), input.full);
|
|
1612
1622
|
return {
|
|
1613
1623
|
status: "connected",
|
|
1614
1624
|
connected: true,
|
|
@@ -1620,7 +1630,7 @@ var HeliosAgentMcpMarketService = class {
|
|
|
1620
1630
|
error,
|
|
1621
1631
|
loginOptions,
|
|
1622
1632
|
retry: async (accessToken) => {
|
|
1623
|
-
const detail = await this.dataBridgeClient.getMarketSymbolDetail(accessToken, input);
|
|
1633
|
+
const detail = compactSymbolDetail(await this.dataBridgeClient.getMarketSymbolDetail(accessToken, { symbol: input.symbol }), input.full);
|
|
1624
1634
|
return {
|
|
1625
1635
|
status: "connected",
|
|
1626
1636
|
connected: true,
|
|
@@ -2726,7 +2736,7 @@ function createHeliosMarketToolDefinitions(service) {
|
|
|
2726
2736
|
{
|
|
2727
2737
|
name: "helios_market_get_symbol_detail",
|
|
2728
2738
|
title: "Get Helios Symbol Detail",
|
|
2729
|
-
description: "Returns
|
|
2739
|
+
description: "Returns one coin: every snapshot column plus Hyperliquid context (funding, open interest, max leverage, mark price). For several coins, use helios_market_get_snapshot with symbols instead; pass full only when you need raw indicators.",
|
|
2730
2740
|
inputSchema: marketSymbolDetailInputSchema,
|
|
2731
2741
|
async execute(input) {
|
|
2732
2742
|
const result = marketSymbolDetailToolOutputSchema.parse(await service.getSymbolDetail(input));
|
|
@@ -2950,7 +2960,7 @@ async function createHeliosAgentMcpServer(options) {
|
|
|
2950
2960
|
const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
|
|
2951
2961
|
const server = new McpServer({
|
|
2952
2962
|
name: "helios",
|
|
2953
|
-
version: "0.2.
|
|
2963
|
+
version: "0.2.6"
|
|
2954
2964
|
});
|
|
2955
2965
|
const sessionStore = options.sessionStore ?? new FileAgentSessionStore(options.sessionPath ?? getDefaultHeliosAgentMcpSessionPath());
|
|
2956
2966
|
const client = new HeliosAgentAuthClient({
|
|
@@ -3080,6 +3090,7 @@ function registerTool(server, tool) {
|
|
|
3080
3090
|
HeliosAgentMcpProviderService,
|
|
3081
3091
|
HeliosAgentMcpTradingService,
|
|
3082
3092
|
MemoryAgentMcpSessionStore,
|
|
3093
|
+
compactSymbolDetail,
|
|
3083
3094
|
createHeliosAccountToolDefinitions,
|
|
3084
3095
|
createHeliosAgentMcpServer,
|
|
3085
3096
|
createHeliosAuthToolDefinitions,
|
package/dist/index.mjs
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
HeliosAgentMcpProviderService,
|
|
12
12
|
HeliosAgentMcpTradingService,
|
|
13
13
|
MemoryAgentMcpSessionStore,
|
|
14
|
+
compactSymbolDetail,
|
|
14
15
|
createHeliosAccountToolDefinitions,
|
|
15
16
|
createHeliosAgentMcpServer,
|
|
16
17
|
createHeliosAuthToolDefinitions,
|
|
@@ -28,7 +29,7 @@ import {
|
|
|
28
29
|
topOfSnapshot,
|
|
29
30
|
withDataText,
|
|
30
31
|
withSnapshotDefaults
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-WLCFIWFP.mjs";
|
|
32
33
|
export {
|
|
33
34
|
DEFAULT_SNAPSHOT_FIELDS,
|
|
34
35
|
DEFAULT_SNAPSHOT_TOP,
|
|
@@ -42,6 +43,7 @@ export {
|
|
|
42
43
|
HeliosAgentMcpProviderService,
|
|
43
44
|
HeliosAgentMcpTradingService,
|
|
44
45
|
MemoryAgentMcpSessionStore,
|
|
46
|
+
compactSymbolDetail,
|
|
45
47
|
createHeliosAccountToolDefinitions,
|
|
46
48
|
createHeliosAgentMcpServer,
|
|
47
49
|
createHeliosAuthToolDefinitions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgnio/helios-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "Helios MCP server: connect an AI agent to your Helios account to read markets and your portfolio and to trade on Hyperliquid. Most apps can use the hosted URL https://helios.pgn.io/mcp instead.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://helios.pgn.io/?connect=ai",
|