@coinrithm/mcp-trading 0.7.7 → 0.7.9
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/CHANGELOG.md +178 -0
- package/README.md +86 -69
- package/dist/agent/act.js +19 -6
- package/dist/agent/capitalSizing.d.ts +32 -0
- package/dist/agent/capitalSizing.js +270 -0
- package/dist/agent/client.d.ts +8 -1
- package/dist/agent/client.js +98 -39
- package/dist/agent/decision.d.ts +392 -0
- package/dist/agent/decision.js +177 -0
- package/dist/agent/decisionReceipt.d.ts +48 -0
- package/dist/agent/decisionReceipt.js +619 -0
- package/dist/agent/decisionValidator.d.ts +19 -2
- package/dist/agent/decisionValidator.js +74 -3
- package/dist/agent/engine.d.ts +1 -0
- package/dist/agent/engine.js +1 -0
- package/dist/agent/gate.js +14 -11
- package/dist/agent/observe.js +175 -34
- package/dist/agent/pmContext.d.ts +13 -0
- package/dist/agent/pmContext.js +136 -0
- package/dist/agent/prompt.d.ts +11 -1
- package/dist/agent/prompt.js +135 -7
- package/dist/agent/providerCapabilities.d.ts +3 -0
- package/dist/agent/providerCapabilities.js +41 -3
- package/dist/agent/providers.d.ts +2 -1
- package/dist/agent/providers.js +222 -86
- package/dist/agent/resolve.js +1 -0
- package/dist/agent/runner.d.ts +4 -1
- package/dist/agent/runner.js +369 -38
- package/dist/agent/scorecard.js +7 -1
- package/dist/agent/skill.js +17 -0
- package/dist/agent/skillValidator.d.ts +1 -0
- package/dist/agent/skillValidator.js +56 -0
- package/dist/agent/state.js +23 -2
- package/dist/agent/strictLint.js +19 -0
- package/dist/agent/templates.js +4 -0
- package/dist/agent/thesis.d.ts +40 -0
- package/dist/agent/thesis.js +319 -0
- package/dist/agent/types.d.ts +127 -0
- package/dist/client.js +3 -2
- package/dist/http.d.ts +7 -1
- package/dist/http.js +36 -16
- package/dist/httpCompletion.d.ts +33 -0
- package/dist/httpCompletion.js +220 -0
- package/dist/retryAfter.d.ts +1 -0
- package/dist/retryAfter.js +16 -0
- package/dist/tools.js +19 -1
- package/package.json +4 -2
package/dist/tools.js
CHANGED
|
@@ -196,6 +196,8 @@ const EVENT_SUMMARY_FIELDS = [
|
|
|
196
196
|
"startDate",
|
|
197
197
|
"endDate",
|
|
198
198
|
"resolvedAt",
|
|
199
|
+
"resolvedAtBasis",
|
|
200
|
+
"settlementWindowClosedAt",
|
|
199
201
|
"freshness",
|
|
200
202
|
"volume",
|
|
201
203
|
"volume24h",
|
|
@@ -205,6 +207,8 @@ const EVENT_SUMMARY_FIELDS = [
|
|
|
205
207
|
"bestBid",
|
|
206
208
|
"bestAsk",
|
|
207
209
|
"spread",
|
|
210
|
+
"spreadPoints",
|
|
211
|
+
"probabilityBook",
|
|
208
212
|
"marketsCount",
|
|
209
213
|
"referenceProbability",
|
|
210
214
|
"crossPlatform",
|
|
@@ -215,6 +219,7 @@ const OUTCOME_SUMMARY_FIELDS = [
|
|
|
215
219
|
"externalMarketId",
|
|
216
220
|
"name",
|
|
217
221
|
"probability",
|
|
222
|
+
"normalizedProbability",
|
|
218
223
|
"priceChange24h",
|
|
219
224
|
];
|
|
220
225
|
const WHALE_TRADE_FIELDS = [
|
|
@@ -253,7 +258,17 @@ function eventSummary(value) {
|
|
|
253
258
|
if (!isJsonRecord(value))
|
|
254
259
|
return value;
|
|
255
260
|
const source = isJsonRecord(value.source)
|
|
256
|
-
? pick(value.source, [
|
|
261
|
+
? pick(value.source, [
|
|
262
|
+
"id",
|
|
263
|
+
"name",
|
|
264
|
+
"kind",
|
|
265
|
+
"supportsTrading",
|
|
266
|
+
// Quotes remain venue-native. Magnitude cannot distinguish a 0.5-point
|
|
267
|
+
// bid from a 0.5 ratio; keep the API's explicit unit with the number.
|
|
268
|
+
"quoteScale",
|
|
269
|
+
"methodology",
|
|
270
|
+
"supportsMarketMetrics",
|
|
271
|
+
])
|
|
257
272
|
: value.source;
|
|
258
273
|
const outcomes = Array.isArray(value.outcomes)
|
|
259
274
|
? value.outcomes
|
|
@@ -799,6 +814,9 @@ export function registerTools(server, client) {
|
|
|
799
814
|
"1H=60x1-minute, 1D=288x5-minute, 1W=672x15-minute, 1M=720x1-hour, " +
|
|
800
815
|
"3M=540x4-hour candles. Candles are oldest to newest with t in unix " +
|
|
801
816
|
"SECONDS; o/h/l/c in fiat (default USD), v always in USD. " +
|
|
817
|
+
"These are sampled composite-price bars, not venue trade candles. " +
|
|
818
|
+
"v is the mean rolling 24-hour quote-volume observation in the bar, " +
|
|
819
|
+
"NOT volume traded during that candle; do not sum v across bars. " +
|
|
802
820
|
PAPER_NOTE,
|
|
803
821
|
inputSchema: {
|
|
804
822
|
coinId: z
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinrithm/mcp-trading",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.9",
|
|
4
4
|
"mcpName": "io.github.CoinRithm/mcp-trading",
|
|
5
5
|
"description": "CoinRithm paper-trading toolkit: an MCP server (coinrithm-mcp) AND a self-host agent runner (coinrithm-agent) for spot, futures, and prediction markets with a user-minted API key.",
|
|
6
6
|
"type": "module",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"build": "tsc -p tsconfig.json",
|
|
32
32
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
33
33
|
"test": "vitest run",
|
|
34
|
+
"test:coverage": "vitest run --coverage",
|
|
34
35
|
"lint": "eslint src",
|
|
35
36
|
"lint:fix": "eslint src --fix",
|
|
36
37
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
@@ -77,10 +78,11 @@
|
|
|
77
78
|
"@eslint/js": "^9.13.0",
|
|
78
79
|
"@types/express": "^4.17.21",
|
|
79
80
|
"@types/node": "^20.14.0",
|
|
81
|
+
"@vitest/coverage-v8": "4.1.11",
|
|
80
82
|
"eslint": "^9.13.0",
|
|
81
83
|
"prettier": "^3.3.3",
|
|
82
84
|
"typescript": "^5.5.0",
|
|
83
85
|
"typescript-eslint": "^8.11.0",
|
|
84
|
-
"vitest": "
|
|
86
|
+
"vitest": "4.1.11"
|
|
85
87
|
}
|
|
86
88
|
}
|