@coinrithm/mcp-trading 0.7.2 → 0.7.4
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 +171 -113
- package/README.md +277 -238
- package/dist/agent/act.d.ts +2 -2
- package/dist/agent/act.js +24 -3
- package/dist/agent/cli.js +68 -23
- package/dist/agent/client.d.ts +33 -0
- package/dist/agent/client.js +34 -7
- package/dist/agent/decision.d.ts +3 -0
- package/dist/agent/decision.js +26 -3
- package/dist/agent/decisionValidator.js +2 -1
- package/dist/agent/deploymentOverlay.js +25 -5
- package/dist/agent/engine.d.ts +2 -1
- package/dist/agent/engine.js +4 -1
- package/dist/agent/extract.js +3 -1
- package/dist/agent/gate.js +25 -5
- package/dist/agent/index.js +0 -1
- package/dist/agent/indicators.js +4 -2
- package/dist/agent/manifest.js +1 -1
- package/dist/agent/mechanical.d.ts +36 -0
- package/dist/agent/mechanical.js +286 -0
- package/dist/agent/observe.d.ts +4 -0
- package/dist/agent/observe.js +140 -53
- package/dist/agent/prompt.d.ts +3 -1
- package/dist/agent/prompt.js +17 -6
- package/dist/agent/providers.js +39 -4
- package/dist/agent/resolve.js +23 -6
- package/dist/agent/resolvePm.js +14 -3
- package/dist/agent/runEvidence.js +6 -2
- package/dist/agent/runner.d.ts +8 -2
- package/dist/agent/runner.js +363 -59
- package/dist/agent/scorecard.js +12 -4
- package/dist/agent/setups.js +57 -9
- package/dist/agent/skill.js +1 -1
- package/dist/agent/state.js +9 -4
- package/dist/agent/types.d.ts +17 -2
- package/dist/agent/types.js +2 -1
- package/dist/agent/util.js +11 -4
- package/dist/agent/version.d.ts +1 -1
- package/dist/agent/version.js +1 -1
- package/dist/client.d.ts +51 -0
- package/dist/client.js +30 -3
- package/dist/executionPolicy.d.ts +2 -0
- package/dist/executionPolicy.js +21 -0
- package/dist/http.js +13 -3
- package/dist/tools.d.ts +23 -0
- package/dist/tools.js +796 -39
- package/package.json +86 -78
package/CHANGELOG.md
CHANGED
|
@@ -1,113 +1,171 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to `@coinrithm/mcp-trading` are documented here. The package
|
|
4
|
-
ships two binaries — `coinrithm-mcp` (the MCP server) and `coinrithm-agent` (the
|
|
5
|
-
self-host agent runner) — versioned together. The CoinRithm **API contract** is
|
|
6
|
-
versioned separately (see `openapi.yaml` `info.version`, currently `1.
|
|
7
|
-
|
|
8
|
-
## 0.7.
|
|
9
|
-
|
|
10
|
-
Docs
|
|
11
|
-
|
|
12
|
-
- **
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
`
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- **
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
- **
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- **
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
`
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
-
|
|
113
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@coinrithm/mcp-trading` are documented here. The package
|
|
4
|
+
ships two binaries — `coinrithm-mcp` (the MCP server) and `coinrithm-agent` (the
|
|
5
|
+
self-host agent runner) — versioned together. The CoinRithm **API contract** is
|
|
6
|
+
versioned separately (see `openapi.yaml` `info.version`, currently `1.6.0`).
|
|
7
|
+
|
|
8
|
+
## 0.7.4
|
|
9
|
+
|
|
10
|
+
Docs-only. No tool behavior change, no API-surface change.
|
|
11
|
+
|
|
12
|
+
- **Acceptable Use of Market Data.** The README (root and this package) and
|
|
13
|
+
`openapi.yaml` (`info.termsOfService`, `info.description`, and the
|
|
14
|
+
`public-pm-data` tag) now reference and summarize CoinRithm's licensing
|
|
15
|
+
flow-down restriction on Market Data from third-party prediction-market
|
|
16
|
+
venues: read-only use for paper-trading context and settled-outcome
|
|
17
|
+
scoring only — no model training/fine-tuning/benchmarking, no
|
|
18
|
+
redistribution or bulk-extraction, no use to build a competing product.
|
|
19
|
+
Full terms: <https://www.coinrithm.com/en/terms-of-use>
|
|
20
|
+
|
|
21
|
+
## 0.7.3
|
|
22
|
+
|
|
23
|
+
Quality-engine surfaces + independent forecasts. Additive; no breaking change.
|
|
24
|
+
|
|
25
|
+
- **Quality verdicts in tool responses.** `discover_pm_markets`, `pm_quote`, and
|
|
26
|
+
the `pm_data_*` tools now surface the persisted truth-engine `quality` object
|
|
27
|
+
(`decisionEligible`, warning/block reason codes, `policyVersion`, `assessedAt`).
|
|
28
|
+
Markets with critical failures stay visible but cannot drive paper opens or
|
|
29
|
+
alerts.
|
|
30
|
+
- **`openBlocked` preview on `pm_quote`.** Quotes preview the open-time quality
|
|
31
|
+
gate (`openBlocked` + `openBlockReasons`), so an agent can skip a market that
|
|
32
|
+
would 422 before burning the open attempt. The self-host runner
|
|
33
|
+
(`coinrithm-agent`) does this skip automatically.
|
|
34
|
+
- **Independent forecasts in the runner.** The self-host agent runner elicits the
|
|
35
|
+
model's OWN probability (judged from the question/resolution criteria/deadline,
|
|
36
|
+
never anchored to the market price) and submits it as `forecastProbability` on
|
|
37
|
+
PM opens — feeding the public calibration dataset with proper-scoring-rule
|
|
38
|
+
forecasts. Clamped to [1,99]; omitted (never faked) when the model does not
|
|
39
|
+
produce one; `HOUSE_AGENT_FORECAST_ENABLED=false` disables.
|
|
40
|
+
- **`crossPlatform` on event lists** documented in the API contract: sibling
|
|
41
|
+
venues pricing the same question, on list rows.
|
|
42
|
+
- **ForecastEx venue truth.** Public MCP discovery copy and registry metadata
|
|
43
|
+
now describe all 11 live venues, including ForecastEx.
|
|
44
|
+
- **Contract synchronization.** Runner templates and example bundles pin the
|
|
45
|
+
served OpenAPI 1.6.0 contract; canonical scorecard paths are unambiguous.
|
|
46
|
+
|
|
47
|
+
## 0.7.2
|
|
48
|
+
|
|
49
|
+
Docs-truth + privacy release. No tool behavior change, no API-surface change.
|
|
50
|
+
|
|
51
|
+
- **Ten venues in the public listing.** `pm_data_*` tool copy, the README, and
|
|
52
|
+
`server.json` now name all ten venues (adds Futuur and Myriad). npm `0.7.1` was
|
|
53
|
+
published before those landed, so the registry listing still advertised "eight
|
|
54
|
+
venues"; npm versions are immutable, so correcting the public listing required
|
|
55
|
+
a new release.
|
|
56
|
+
- **`source` parameter description** on `pm_data_events` / `pm_data_event_detail`
|
|
57
|
+
now enumerates all ten venue slugs. Accepted values are unchanged — this is
|
|
58
|
+
description text only, which is why it is a patch and not a minor.
|
|
59
|
+
- **Privacy.** Raw model output is no longer persisted, enforcing the package's
|
|
60
|
+
no-chain-of-thought promise.
|
|
61
|
+
- **New tripwire.** `server.json` (the MCP-registry listing) is now guarded
|
|
62
|
+
against version and venue-count drift; it had no guard, which is how it went
|
|
63
|
+
stale in the first place.
|
|
64
|
+
- Refreshed stale Arena-gate example copy.
|
|
65
|
+
|
|
66
|
+
## 0.7.1
|
|
67
|
+
|
|
68
|
+
Docs + registry-metadata release; no tool behavior changes.
|
|
69
|
+
|
|
70
|
+
- **README refresh**: the keyless `pm_data_*` data surface is now front and
|
|
71
|
+
center — 8 venues (Polymarket, Kalshi, Smarkets, Limitless, Manifold,
|
|
72
|
+
Metaculus, PredictIt, Rothera — the "seven venues" line predated Rothera),
|
|
73
|
+
the anonymous hosted-endpoint path, and the `referenceProbability` /
|
|
74
|
+
`volumeHistory` fields the data tools return.
|
|
75
|
+
- **`server.json`**: hosted endpoint's `Authorization` header marked optional
|
|
76
|
+
(the `pm_data_*` tools work anonymously — verified live) and the server
|
|
77
|
+
description now leads with the keyless data surface.
|
|
78
|
+
- Ships the post-0.7.0 commits: `pm_data_event` advertises `volumeHistory`,
|
|
79
|
+
`pm_data_events` advertises `referenceProbability` on list items, and the
|
|
80
|
+
hosted MCP root (`GET /`) serves a self-describing JSON landing (with a
|
|
81
|
+
405 + hint on `GET /mcp`).
|
|
82
|
+
|
|
83
|
+
## 0.7.0
|
|
84
|
+
|
|
85
|
+
(Retroactive entry — released 2026-07-05 without a changelog note.)
|
|
86
|
+
|
|
87
|
+
- **Four keyless `pm_data_*` tools** — CoinRithm's free public cross-venue
|
|
88
|
+
prediction-market dataset over MCP, no API key required and yours is never
|
|
89
|
+
attached: `pm_data_overview` (market-wide stats), `pm_data_events`
|
|
90
|
+
(cross-venue event list), `pm_data_event` (detail incl.
|
|
91
|
+
`crossSourceMatches` + resolution evidence), `pm_data_whales`
|
|
92
|
+
(large-trade tape).
|
|
93
|
+
|
|
94
|
+
## 0.5.0
|
|
95
|
+
|
|
96
|
+
Agent-runner quality + reliability release. `coinrithm-agent` got materially
|
|
97
|
+
smarter and less noisy; `coinrithm-mcp` is unchanged in shape. Bundles the work
|
|
98
|
+
since 0.4.0.
|
|
99
|
+
|
|
100
|
+
- **Prediction markets are a first-class venue** in the decide prompt: a short
|
|
101
|
+
`pmN` ref so small models trade PM reliably, eligible-outcome filtering (only
|
|
102
|
+
backend-openable outcomes reach the model), and futures-capped agents steered
|
|
103
|
+
to PM (a separate budget) instead of re-rejecting.
|
|
104
|
+
- **PM anti-churn — now actually effective.** The candidate list is pre-filtered
|
|
105
|
+
to exclude markets the agent already holds, and the runner + server both block
|
|
106
|
+
re-betting a held market+outcome (no more one-agent, 25-identical-bets churn).
|
|
107
|
+
An earlier version read the wrong `/positions/pm` fields and was silently dead;
|
|
108
|
+
fixed.
|
|
109
|
+
- **Settlement-feedback learning loop.** The agent sees how its own recent bets
|
|
110
|
+
actually resolved (win/loss/void + realized PnL) as reflective context, so it
|
|
111
|
+
learns from outcomes across cycles.
|
|
112
|
+
- **Per-trade reasoning stays honest about the market.** A multi-action decision
|
|
113
|
+
no longer stamps its primary rationale onto a secondary trade about a different
|
|
114
|
+
market — the trade's public Arena "why" always matches the market it's on.
|
|
115
|
+
- **Futures reliability.** The model is unblinded to per-position mark /
|
|
116
|
+
liquidation / stop / take-profit prices; take-profit is auto-clamped to a valid
|
|
117
|
+
R:R target off the stop (kills the `take_profit_not_*_mark` reject waves); and a
|
|
118
|
+
marking-down PM book now trips the equity-drawdown kill-switch too.
|
|
119
|
+
- **News capability.** Recent high-importance news for the watchlist coins is fed
|
|
120
|
+
into the decide context as a market-catalyst layer.
|
|
121
|
+
- **Robustness + contract accuracy.** Scheduler/runner hardening, flat-state
|
|
122
|
+
prompt steers (weak models stop hallucinating closes), manage-enum
|
|
123
|
+
normalization, and the PM contract now documents real entry friction rather
|
|
124
|
+
than a disclose-only stance.
|
|
125
|
+
- **Security.** `hono` bumped to 4.12.27 (high-severity advisories: serve-static
|
|
126
|
+
path traversal, CORS wildcard-with-credentials, body-limit bypass).
|
|
127
|
+
- **Docs.** The npm README leads with value / free / OKF / Studio; stale
|
|
128
|
+
scheduler and `minDecidedTrades` claims corrected.
|
|
129
|
+
|
|
130
|
+
## 0.4.0
|
|
131
|
+
|
|
132
|
+
- **Deterministic scorecard engine (`computeScorecard`).** The reproducible-
|
|
133
|
+
evaluation engine for `coinrithm.agent.scorecard.v1` — pure math over an
|
|
134
|
+
agent's realized track record (no network, no model): realized PnL, win rate,
|
|
135
|
+
expectancy, profit factor, reward-to-risk, Sharpe, Sortino, deflated /
|
|
136
|
+
probabilistic Sharpe (Bailey & López de Prado — skill vs luck with a multiple-
|
|
137
|
+
testing penalty), max drawdown, and Brier + ECE calibration for probabilistic
|
|
138
|
+
calls. Same inputs → identical metrics **and** a sha256 `contentHash` of the
|
|
139
|
+
canonicalized result, so a scorecard whose hash doesn't reproduce isn't
|
|
140
|
+
trusted. Metrics are computed AFTER the run from immutable evidence (leakage-
|
|
141
|
+
separation), so tuning-to-the-metric is structurally impossible. Returns
|
|
142
|
+
`null` for thin records — never a fabricated number.
|
|
143
|
+
- **Resolver: committable file metadata + functionality pin.** The OKF resolver
|
|
144
|
+
now carries per-file metadata and pins functionality through resolution, so a
|
|
145
|
+
bundle's behavior is reproducible from its committed files.
|
|
146
|
+
|
|
147
|
+
## 0.3.0
|
|
148
|
+
|
|
149
|
+
- **Agent risk config: coin deny-list (`blocklist`).** `risk.blocklist` lets an
|
|
150
|
+
agent name symbols it must never open, even if they are on the watchlist —
|
|
151
|
+
deny wins over allow. Enforced in the runner's decision validator (rejects
|
|
152
|
+
`futures_open` / `spot_order` on a denied symbol) and surfaced in the system
|
|
153
|
+
prompt, so the model is told the boundary and the runner re-checks it.
|
|
154
|
+
- **Docs: Open Knowledge Format positioning.** Clarified that a CoinRithm agent
|
|
155
|
+
is an OKF bundle — a portable directory of markdown + frontmatter that is
|
|
156
|
+
model-agnostic (run the same definition on any model). Develop and prove it
|
|
157
|
+
free on paper, then run it anywhere.
|
|
158
|
+
- npm keywords refreshed (`open-knowledge-format`, `okf`, `model-agnostic`,
|
|
159
|
+
`gemini`) for registry discovery.
|
|
160
|
+
|
|
161
|
+
## 0.2.0
|
|
162
|
+
|
|
163
|
+
- Added the **`coinrithm-agent`** self-host runner binary alongside the MCP
|
|
164
|
+
server: a folder-as-architecture (OKF) agent you bring your own model key to,
|
|
165
|
+
with caps enforced by the runner (not the model), dry-run by default,
|
|
166
|
+
paper-only.
|
|
167
|
+
|
|
168
|
+
## 0.1.x
|
|
169
|
+
|
|
170
|
+
- Initial `coinrithm-mcp` MCP server: reads, quotes, scoped spot/futures/PM
|
|
171
|
+
writes, ledger export, and Agent Arena integration over a user-minted API key.
|