@cryptoquant_official/mcp 0.0.5 → 0.0.6-alpha2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +329 -59
  3. package/dist/ai-sdk/anthropic.d.ts +125 -0
  4. package/dist/ai-sdk/anthropic.d.ts.map +1 -0
  5. package/dist/ai-sdk/anthropic.js +278 -0
  6. package/dist/ai-sdk/anthropic.js.map +1 -0
  7. package/dist/ai-sdk/execute.d.ts +35 -0
  8. package/dist/ai-sdk/execute.d.ts.map +1 -0
  9. package/dist/ai-sdk/execute.js +531 -0
  10. package/dist/ai-sdk/execute.js.map +1 -0
  11. package/dist/ai-sdk/index.d.ts +51 -0
  12. package/dist/ai-sdk/index.d.ts.map +1 -0
  13. package/dist/ai-sdk/index.js +53 -0
  14. package/dist/ai-sdk/index.js.map +1 -0
  15. package/dist/ai-sdk/prompts.d.ts +34 -0
  16. package/dist/ai-sdk/prompts.d.ts.map +1 -0
  17. package/dist/ai-sdk/prompts.js +74 -0
  18. package/dist/ai-sdk/prompts.js.map +1 -0
  19. package/dist/ai-sdk/schemas.d.ts +66 -0
  20. package/dist/ai-sdk/schemas.d.ts.map +1 -0
  21. package/dist/ai-sdk/schemas.js +136 -0
  22. package/dist/ai-sdk/schemas.js.map +1 -0
  23. package/dist/ai-sdk/tools.d.ts +165 -0
  24. package/dist/ai-sdk/tools.d.ts.map +1 -0
  25. package/dist/ai-sdk/tools.js +152 -0
  26. package/dist/ai-sdk/tools.js.map +1 -0
  27. package/dist/ai-sdk/types.d.ts +149 -0
  28. package/dist/ai-sdk/types.d.ts.map +1 -0
  29. package/dist/ai-sdk/types.js +5 -0
  30. package/dist/ai-sdk/types.js.map +1 -0
  31. package/dist/core/auth/storage.d.ts.map +1 -0
  32. package/dist/core/auth/storage.js.map +1 -0
  33. package/dist/core/cache/storage.d.ts +110 -0
  34. package/dist/core/cache/storage.d.ts.map +1 -0
  35. package/dist/core/cache/storage.js +356 -0
  36. package/dist/core/cache/storage.js.map +1 -0
  37. package/dist/core/cache/summary.d.ts.map +1 -0
  38. package/dist/core/cache/summary.js.map +1 -0
  39. package/dist/{cache → core/cache}/types.d.ts +25 -0
  40. package/dist/{cache → core/cache}/types.d.ts.map +1 -1
  41. package/dist/core/cache/types.js.map +1 -0
  42. package/dist/core/config.d.ts.map +1 -0
  43. package/dist/core/config.js.map +1 -0
  44. package/dist/core/discovery.d.ts.map +1 -0
  45. package/dist/core/discovery.js.map +1 -0
  46. package/dist/core/index.d.ts +16 -0
  47. package/dist/core/index.d.ts.map +1 -0
  48. package/dist/core/index.js +19 -0
  49. package/dist/core/index.js.map +1 -0
  50. package/dist/{permissions.d.ts → core/permissions.d.ts} +1 -1
  51. package/dist/core/permissions.d.ts.map +1 -0
  52. package/dist/{permissions.js → core/permissions.js} +6 -6
  53. package/dist/core/permissions.js.map +1 -0
  54. package/dist/core/plan-limits.d.ts.map +1 -0
  55. package/dist/core/plan-limits.js.map +1 -0
  56. package/dist/core/utils.d.ts.map +1 -0
  57. package/dist/{utils.js → core/utils.js} +2 -2
  58. package/dist/core/utils.js.map +1 -0
  59. package/dist/http/chat-proxy.d.ts +32 -0
  60. package/dist/http/chat-proxy.d.ts.map +1 -0
  61. package/dist/http/chat-proxy.js +310 -0
  62. package/dist/http/chat-proxy.js.map +1 -0
  63. package/dist/http/index.d.ts +12 -0
  64. package/dist/http/index.d.ts.map +1 -0
  65. package/dist/http/index.js +30 -0
  66. package/dist/http/index.js.map +1 -0
  67. package/dist/http/server.d.ts +20 -0
  68. package/dist/http/server.d.ts.map +1 -0
  69. package/dist/http/server.js +231 -0
  70. package/dist/http/server.js.map +1 -0
  71. package/dist/shared/index.d.ts +164 -0
  72. package/dist/shared/index.d.ts.map +1 -0
  73. package/dist/shared/index.js +79 -0
  74. package/dist/shared/index.js.map +1 -0
  75. package/dist/shared/intent-routing.generated.d.ts +40 -0
  76. package/dist/shared/intent-routing.generated.d.ts.map +1 -0
  77. package/dist/shared/intent-routing.generated.js +518 -0
  78. package/dist/shared/intent-routing.generated.js.map +1 -0
  79. package/dist/shared/metrics-data.generated.d.ts +176 -0
  80. package/dist/shared/metrics-data.generated.d.ts.map +1 -0
  81. package/dist/shared/metrics-data.generated.js +3077 -0
  82. package/dist/shared/metrics-data.generated.js.map +1 -0
  83. package/dist/shared/skill-prompts.generated.d.ts +38 -0
  84. package/dist/shared/skill-prompts.generated.d.ts.map +1 -0
  85. package/dist/shared/skill-prompts.generated.js +89 -0
  86. package/dist/shared/skill-prompts.generated.js.map +1 -0
  87. package/dist/shared/workflows.generated.d.ts +48 -0
  88. package/dist/shared/workflows.generated.d.ts.map +1 -0
  89. package/dist/shared/workflows.generated.js +352 -0
  90. package/dist/shared/workflows.generated.js.map +1 -0
  91. package/dist/stdio/index.d.ts +10 -0
  92. package/dist/stdio/index.d.ts.map +1 -0
  93. package/dist/stdio/index.js +30 -0
  94. package/dist/stdio/index.js.map +1 -0
  95. package/dist/stdio/tools/auth.d.ts.map +1 -0
  96. package/dist/{tools → stdio/tools}/auth.js +10 -8
  97. package/dist/stdio/tools/auth.js.map +1 -0
  98. package/dist/stdio/tools/core.d.ts.map +1 -0
  99. package/dist/{tools → stdio/tools}/core.js +32 -145
  100. package/dist/stdio/tools/core.js.map +1 -0
  101. package/package.json +52 -13
  102. package/dist/auth/storage.d.ts.map +0 -1
  103. package/dist/auth/storage.js.map +0 -1
  104. package/dist/cache/storage.d.ts +0 -47
  105. package/dist/cache/storage.d.ts.map +0 -1
  106. package/dist/cache/storage.js +0 -140
  107. package/dist/cache/storage.js.map +0 -1
  108. package/dist/cache/summary.d.ts.map +0 -1
  109. package/dist/cache/summary.js.map +0 -1
  110. package/dist/cache/types.js.map +0 -1
  111. package/dist/config.d.ts.map +0 -1
  112. package/dist/config.js.map +0 -1
  113. package/dist/discovery.d.ts.map +0 -1
  114. package/dist/discovery.js.map +0 -1
  115. package/dist/index.d.ts +0 -18
  116. package/dist/index.d.ts.map +0 -1
  117. package/dist/index.js +0 -47
  118. package/dist/index.js.map +0 -1
  119. package/dist/permissions.d.ts.map +0 -1
  120. package/dist/permissions.js.map +0 -1
  121. package/dist/plan-limits.d.ts.map +0 -1
  122. package/dist/plan-limits.js.map +0 -1
  123. package/dist/tools/auth.d.ts.map +0 -1
  124. package/dist/tools/auth.js.map +0 -1
  125. package/dist/tools/core.d.ts.map +0 -1
  126. package/dist/tools/core.js.map +0 -1
  127. package/dist/utils.d.ts.map +0 -1
  128. package/dist/utils.js.map +0 -1
  129. /package/dist/{auth → core/auth}/storage.d.ts +0 -0
  130. /package/dist/{auth → core/auth}/storage.js +0 -0
  131. /package/dist/{cache → core/cache}/summary.d.ts +0 -0
  132. /package/dist/{cache → core/cache}/summary.js +0 -0
  133. /package/dist/{cache → core/cache}/types.js +0 -0
  134. /package/dist/{config.d.ts → core/config.d.ts} +0 -0
  135. /package/dist/{config.js → core/config.js} +0 -0
  136. /package/dist/{discovery.d.ts → core/discovery.d.ts} +0 -0
  137. /package/dist/{discovery.js → core/discovery.js} +0 -0
  138. /package/dist/{plan-limits.d.ts → core/plan-limits.d.ts} +0 -0
  139. /package/dist/{plan-limits.js → core/plan-limits.js} +0 -0
  140. /package/dist/{utils.d.ts → core/utils.d.ts} +0 -0
  141. /package/dist/{tools → stdio/tools}/auth.d.ts +0 -0
  142. /package/dist/{tools → stdio/tools}/core.d.ts +0 -0
@@ -0,0 +1,278 @@
1
+ /**
2
+ * Anthropic SDK Integration for CryptoQuant Tools
3
+ *
4
+ * Provides CryptoQuant tools in native Anthropic SDK format for direct use
5
+ * with @anthropic-ai/sdk's client.messages.create().
6
+ *
7
+ * @packageDocumentation
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * import Anthropic from '@anthropic-ai/sdk';
12
+ * import { createAnthropicTools, createToolExecutor } from '@cryptoquant_official/mcp/ai-sdk';
13
+ *
14
+ * const client = new Anthropic({ apiKey: process.env.CLAUDE_API_KEY });
15
+ * const toolDefinitions = createAnthropicTools();
16
+ * const executeTool = createToolExecutor({ cryptoquantApiKey: process.env.CRYPTOQUANT_API_KEY });
17
+ *
18
+ * const response = await client.messages.create({
19
+ * model: 'claude-sonnet-4-20250514',
20
+ * max_tokens: 4096,
21
+ * tools: toolDefinitions,
22
+ * messages: [{ role: 'user', content: 'What is MVRV?' }],
23
+ * });
24
+ *
25
+ * // Handle tool calls
26
+ * for (const block of response.content) {
27
+ * if (block.type === 'tool_use') {
28
+ * const result = await executeTool(block.name, block.input);
29
+ * // ... use result
30
+ * }
31
+ * }
32
+ * ```
33
+ */
34
+ import { executeDescribeMetric, executeDiscoverEndpoints, executeInitialize, executeMarketSummary, executeQueryData, executeTradingSignal, executeWhaleActivity, } from "./execute.js";
35
+ /**
36
+ * Cache TTL recommendations for each tool (in seconds)
37
+ * Consumers can use this to implement caching strategies
38
+ */
39
+ export const toolCacheTTL = {
40
+ initialize: 3600, // 1 hour - session info
41
+ discover_endpoints: 86400, // 1 day - endpoint list rarely changes
42
+ describe_metric: 86400, // 1 day - static metric descriptions
43
+ query_data: 60, // 1 minute - real-time data
44
+ market_summary: 60, // 1 minute - real-time summary
45
+ trading_signal: 60, // 1 minute - real-time signal
46
+ whale_activity: 300, // 5 minutes - whale data
47
+ };
48
+ /**
49
+ * Raw JSON schemas for each tool
50
+ * Single source of truth - matches schemas.ts definitions
51
+ */
52
+ const toolSchemas = {
53
+ initialize: {
54
+ type: "object",
55
+ properties: {
56
+ api_key: {
57
+ type: "string",
58
+ description: "CryptoQuant API key (optional if already provided in config)",
59
+ },
60
+ },
61
+ required: [],
62
+ },
63
+ discover_endpoints: {
64
+ type: "object",
65
+ properties: {
66
+ asset: {
67
+ type: "string",
68
+ enum: ["btc", "eth", "alt", "stablecoin", "erc20", "trx", "xrp"],
69
+ description: "Asset to filter by (e.g., btc, eth)",
70
+ },
71
+ category: {
72
+ type: "string",
73
+ description: "Category filter (e.g., market-data, exchange-flows, network-data)",
74
+ },
75
+ query: {
76
+ type: "string",
77
+ description: "Search term to filter endpoints by name or path",
78
+ },
79
+ },
80
+ required: [],
81
+ },
82
+ query_data: {
83
+ type: "object",
84
+ properties: {
85
+ endpoint: {
86
+ type: "string",
87
+ description: "API endpoint path (e.g., /v1/btc/market-data/mvrv)",
88
+ },
89
+ window: {
90
+ type: "string",
91
+ enum: ["hour", "day", "block"],
92
+ description: "Time window granularity",
93
+ },
94
+ limit: {
95
+ type: "number",
96
+ description: "Number of data points to return (default: 30, max: 1000)",
97
+ },
98
+ from: {
99
+ type: "string",
100
+ description: "Start date in ISO 8601 format (e.g., 2024-01-01)",
101
+ },
102
+ to: {
103
+ type: "string",
104
+ description: "End date in ISO 8601 format",
105
+ },
106
+ },
107
+ required: ["endpoint"],
108
+ },
109
+ describe_metric: {
110
+ type: "object",
111
+ properties: {
112
+ metric_id: {
113
+ type: "string",
114
+ description: "Metric ID to describe (e.g., mvrv, sopr, nupl, netflow)",
115
+ },
116
+ },
117
+ required: ["metric_id"],
118
+ },
119
+ market_summary: {
120
+ type: "object",
121
+ properties: {
122
+ asset: {
123
+ type: "string",
124
+ enum: ["btc", "eth"],
125
+ description: "Asset to analyze (default: btc)",
126
+ },
127
+ },
128
+ required: [],
129
+ },
130
+ trading_signal: {
131
+ type: "object",
132
+ properties: {
133
+ asset: {
134
+ type: "string",
135
+ enum: ["btc", "eth"],
136
+ description: "Asset to analyze (default: btc)",
137
+ },
138
+ },
139
+ required: [],
140
+ },
141
+ whale_activity: {
142
+ type: "object",
143
+ properties: {
144
+ asset: {
145
+ type: "string",
146
+ enum: ["btc", "eth"],
147
+ description: "Asset to analyze (default: btc)",
148
+ },
149
+ timeframe: {
150
+ type: "string",
151
+ enum: ["24h", "7d", "30d"],
152
+ description: "Timeframe for analysis (default: 24h)",
153
+ },
154
+ },
155
+ required: [],
156
+ },
157
+ };
158
+ /**
159
+ * Tool descriptions for each tool
160
+ */
161
+ const toolDescriptions = {
162
+ initialize: "Initialize CryptoQuant session. Must be called before querying data.",
163
+ discover_endpoints: "Discover available API endpoints. Filter by asset (btc, eth, alt, stablecoin, erc20) and/or category (market-data, exchange-flows, network-data, etc.)",
164
+ query_data: "Query on-chain data from CryptoQuant API. Common endpoints: /v1/btc/market-data/mvrv (MVRV ratio), /v1/btc/market-indicator/sopr (SOPR), /v1/btc/exchange-flows/netflow (Exchange netflow)",
165
+ describe_metric: "Get explanation of a specific metric including thresholds and interpretation guidance. Use when user asks 'what is X?' about metrics like MVRV, SOPR, NUPL, etc.",
166
+ market_summary: "Get quick market status summary using key on-chain metrics (MVRV, SOPR, Netflow). Returns overall market sentiment with bullish/bearish signals.",
167
+ trading_signal: "Generate Buy/Sell/Hold trading signal with confidence score based on weighted on-chain metrics. Returns signal (STRONG BUY/BUY/HOLD/CAUTION/SELL) with detailed breakdown.",
168
+ whale_activity: "Monitor whale (large holder) activity including exchange flows and whale ratio. Identifies accumulation or distribution patterns by large players.",
169
+ };
170
+ /**
171
+ * Create CryptoQuant tool definitions in Anthropic SDK format
172
+ *
173
+ * Returns an array of tool definitions compatible with @anthropic-ai/sdk's
174
+ * client.messages.create() tools parameter.
175
+ *
176
+ * @returns Array of Anthropic-compatible tool definitions
177
+ *
178
+ * @example
179
+ * ```typescript
180
+ * import Anthropic from '@anthropic-ai/sdk';
181
+ * import { createAnthropicTools } from '@cryptoquant_official/mcp/ai-sdk';
182
+ *
183
+ * const client = new Anthropic({ apiKey: process.env.CLAUDE_API_KEY });
184
+ *
185
+ * const response = await client.messages.create({
186
+ * model: 'claude-sonnet-4-20250514',
187
+ * max_tokens: 4096,
188
+ * tools: createAnthropicTools(),
189
+ * messages: [{ role: 'user', content: 'Analyze Bitcoin market' }],
190
+ * });
191
+ * ```
192
+ */
193
+ export function createAnthropicTools() {
194
+ const toolNames = [
195
+ "initialize",
196
+ "discover_endpoints",
197
+ "query_data",
198
+ "describe_metric",
199
+ "market_summary",
200
+ "trading_signal",
201
+ "whale_activity",
202
+ ];
203
+ return toolNames.map((name) => ({
204
+ name,
205
+ description: toolDescriptions[name],
206
+ input_schema: toolSchemas[name],
207
+ }));
208
+ }
209
+ /**
210
+ * Create a tool executor function for handling tool calls
211
+ *
212
+ * Returns a function that executes CryptoQuant tools by name.
213
+ * Handles all type casting internally - consumers just pass the raw input.
214
+ *
215
+ * @param context - Execution context with API key
216
+ * @returns Async function that executes tools by name
217
+ *
218
+ * @example
219
+ * ```typescript
220
+ * import { createToolExecutor } from '@cryptoquant_official/mcp/ai-sdk';
221
+ *
222
+ * const executeTool = createToolExecutor({
223
+ * cryptoquantApiKey: process.env.CRYPTOQUANT_API_KEY,
224
+ * });
225
+ *
226
+ * // In your agentic loop:
227
+ * for (const block of response.content) {
228
+ * if (block.type === 'tool_use') {
229
+ * const result = await executeTool(block.name, block.input);
230
+ * toolResults.push({
231
+ * type: 'tool_result',
232
+ * tool_use_id: block.id,
233
+ * content: JSON.stringify(result),
234
+ * });
235
+ * }
236
+ * }
237
+ * ```
238
+ */
239
+ export function createToolExecutor(context) {
240
+ const executors = {
241
+ initialize: (input) => executeInitialize(input, context),
242
+ discover_endpoints: (input) => executeDiscoverEndpoints(input),
243
+ query_data: (input) => executeQueryData(input, context),
244
+ describe_metric: (input) => executeDescribeMetric(input),
245
+ market_summary: (input) => executeMarketSummary(input, context),
246
+ trading_signal: (input) => executeTradingSignal(input, context),
247
+ whale_activity: (input) => executeWhaleActivity(input, context),
248
+ };
249
+ return async (name, input) => {
250
+ const executor = executors[name];
251
+ if (!executor) {
252
+ return { error: `Unknown tool: ${name}` };
253
+ }
254
+ return executor(input);
255
+ };
256
+ }
257
+ /**
258
+ * Get tool names as an array
259
+ * Useful for validation or iteration
260
+ */
261
+ export function getToolNames() {
262
+ return [
263
+ "initialize",
264
+ "discover_endpoints",
265
+ "query_data",
266
+ "describe_metric",
267
+ "market_summary",
268
+ "trading_signal",
269
+ "whale_activity",
270
+ ];
271
+ }
272
+ /**
273
+ * Check if a string is a valid CryptoQuant tool name
274
+ */
275
+ export function isValidToolName(name) {
276
+ return getToolNames().includes(name);
277
+ }
278
+ //# sourceMappingURL=anthropic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anthropic.js","sourceRoot":"","sources":["../../src/ai-sdk/anthropic.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAsCtB;;;GAGG;AACH,MAAM,CAAC,MAAM,YAAY,GAAwC;IAC/D,UAAU,EAAE,IAAI,EAAE,wBAAwB;IAC1C,kBAAkB,EAAE,KAAK,EAAE,uCAAuC;IAClE,eAAe,EAAE,KAAK,EAAE,qCAAqC;IAC7D,UAAU,EAAE,EAAE,EAAE,4BAA4B;IAC5C,cAAc,EAAE,EAAE,EAAE,+BAA+B;IACnD,cAAc,EAAE,EAAE,EAAE,8BAA8B;IAClD,cAAc,EAAE,GAAG,EAAE,yBAAyB;CAC/C,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,UAAU,EAAE;QACV,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,8DAA8D;aACjE;SACF;QACD,QAAQ,EAAE,EAAc;KACzB;IACD,kBAAkB,EAAE;QAClB,IAAI,EAAE,QAAiB;QACvB,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC;gBAChE,WAAW,EAAE,qCAAqC;aACnD;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,mEAAmE;aACtE;YACD,KAAK,EAAE;gBACL,IAAI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ClE,kBAAkB,EAAE,CAAC,KAAK,EAAE,EAAE,CAC5B,wBAAwB,CAAC,KAA2C,CAAC;QACvE,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE,CACpB,gBAAgB,CAAC,KAAmC,EAAE,OAAO,CAAC;QAChE,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE,CACzB,qBAAqB,CAAC,KAAwC,CAAC;QACjE,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE,CACxB,oBAAoB,CAAC,KAAuC,EAAE,OAAO,CAAC;QACxE,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE,CACxB,oBAAoB,CAAC,KAAuC,EAAE,OAAO,CAAC;QACxE,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE,CACxB,oBAAoB,CAAC,KAAuC,EAAE,OAAO,CAAC;KACzE,CAAC;IAEF,OAAO,KAAK,EACV,IAAY,EACZ,KAA8B,EACZ,EAAE;QACpB,MAAM,QAAQ,GAAG,SAAS,CAAC,IAA2B,CAAC,CAAC;QACxD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,EAAE,KAAK,EAAE,iBAAiB,IAAI,EAAE,EAAE,CAAC;QAC5C,CAAC;QACD,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO;QACL,YAAY;QACZ,oBAAoB;QACpB,YAAY;QACZ,iBAAiB;QACjB,gBAAgB;QAChB,gBAAgB;QAChB,gBAAgB;KACjB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,OAAO,YAAY,EAAE,CAAC,QAAQ,CAAC,IAA2B,CAAC,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Tool execution logic for CryptoQuant tools
3
+ * Shared between AI SDK integration and chat-proxy
4
+ */
5
+ import type { DescribeMetricParams, DiscoverEndpointsParams, InitializeParams, MarketSummaryParams, QueryDataParams, TradingSignalParams, WhaleActivityParams } from "./schemas.js";
6
+ import type { DescribeResult, DiscoverResult, InitializeResult, MarketSummaryResult, QueryResult, TradingSignalResult, ToolExecutionContext, WhaleActivityResult } from "./types.js";
7
+ /**
8
+ * Execute initialize tool
9
+ */
10
+ export declare function executeInitialize(params: InitializeParams, context: ToolExecutionContext): Promise<InitializeResult>;
11
+ /**
12
+ * Execute discover_endpoints tool
13
+ */
14
+ export declare function executeDiscoverEndpoints(params: DiscoverEndpointsParams): Promise<DiscoverResult>;
15
+ /**
16
+ * Execute query_data tool
17
+ */
18
+ export declare function executeQueryData(params: QueryDataParams, _context: ToolExecutionContext): Promise<QueryResult>;
19
+ /**
20
+ * Execute describe_metric tool
21
+ */
22
+ export declare function executeDescribeMetric(params: DescribeMetricParams): Promise<DescribeResult>;
23
+ /**
24
+ * Execute market_summary tool
25
+ */
26
+ export declare function executeMarketSummary(params: MarketSummaryParams, _context: ToolExecutionContext): Promise<MarketSummaryResult>;
27
+ /**
28
+ * Execute trading_signal tool
29
+ */
30
+ export declare function executeTradingSignal(params: TradingSignalParams, _context: ToolExecutionContext): Promise<TradingSignalResult>;
31
+ /**
32
+ * Execute whale_activity tool
33
+ */
34
+ export declare function executeWhaleActivity(params: WhaleActivityParams, _context: ToolExecutionContext): Promise<WhaleActivityResult>;
35
+ //# sourceMappingURL=execute.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execute.d.ts","sourceRoot":"","sources":["../../src/ai-sdk/execute.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAuBH,OAAO,KAAK,EACV,oBAAoB,EACpB,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,oBAAoB,EAC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