@coinrithm/mcp-trading 0.7.19 → 0.7.20

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 CHANGED
@@ -1,922 +1,942 @@
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.9.0`).
7
-
8
- ## 0.7.19 (2026-10-16)
9
-
10
- MCP server:
11
-
12
- - The local stdio server starts without `COINRITHM_API_KEY` in data-only
13
- mode, like the hosted server: `npx -y @coinrithm/mcp-trading` works with no
14
- account. Keyless data tools (`pm_data_*`, `get_arena_*`,
15
- `get_crypto_movers`) answer; every keyed tool returns the structured
16
- `missing_api_key` result, which now also names `COINRITHM_API_KEY` for the
17
- local server. `server.json` marks the key optional.
18
- - Upstream requests time out after 35 s and report `upstream_timeout`
19
- instead of hanging the tool call.
20
- - Hosted HTTP entry: per-client admission (120 requests a minute) and an
21
- in-flight cap (64), answered as JSON-RPC 429/503 with `Retry-After`; a stop
22
- signal drains open requests for up to 8 s while `/healthz` answers 503;
23
- `/health` and `/healthz` report `version`.
24
-
25
- The default surface stays at 41 tools. Generated against API contract 1.9.0.
26
-
27
- ## 0.7.18 (2026-10-15)
28
-
29
- MCP server:
30
-
31
- - `get_arena_leaderboard` and `get_arena_agent` describe `arena-ranking-v2`
32
- (live since 2026-10-14): the score is realized PnL plus open losses
33
- (min(0, unrealized)); open gains never raise a rank; an agent with more
34
- than 10% of its start balance in unpriced open positions is rank pending.
35
- A decided trade is one futures position or one spot round trip.
36
- - Prediction-market comparison output ranks rows that are not traded on both
37
- legs (`bothSidesTraded: false`) last, so an untraded pair is never the
38
- headline gap.
39
- - Tool descriptions name consensus probability v3 (open-interest weights
40
- where every venue reports open interest, else the liquidity rule; the
41
- basis is returned as `weightBasis`).
42
-
43
- The default surface stays at 41 tools. Generated against API contract 1.9.0.
44
-
45
- ## 0.7.17 (2026-10-13)
46
-
47
- MCP server:
48
-
49
- - Opt-in PM paper v2 tools. `COINRITHM_PM_PAPER_V2_TOOLS_ENABLED=true` adds
50
- `discover_pm_paper_v2_markets` (`GET /api/agent/pm/v2/discover`, scope
51
- `read`), `open_pm_paper_v2` (`POST /api/agent/pm/v2/open`, scope `trade:pm`),
52
- `close_pm_paper_v2` (`POST /api/agent/pm/v2/close`, scope `trade:pm`) and
53
- `get_pm_paper_v2_positions` (`GET /api/agent/pm/v2/positions`, scope `read`).
54
- They serve separately configured house keys only. `maxCashBudget` is an exact
55
- decimal total that includes entry fees. `open_pm_paper_v2` requires
56
- `forecastProbability` for the bought side (percent above 1 and below 100, or
57
- a fraction below 1; exactly 1 is refused, matching the API). A close can
58
- return HTTP 202
59
- (accepted, still pending); only `executed: true` confirms the exit.
60
- - Opt-in spot reference tool. `COINRITHM_SPOT_REFERENCE_TOOLS_ENABLED=true` adds
61
- `get_spot_reference` (`GET /api/agent/spot/reference/:coinId`, scope `read`):
62
- a Binance spot last-ticker reference (USDT) with a stored REST consensus
63
- fallback (USD), each with its own status and expiry. It is not an executable
64
- quote and does not change market context, quotes or fills.
65
- - Both flags are off by default. The default surface stays at 41 tools; with
66
- both flags on it is 46.
67
- - API clients add `discoverPmPaperV2`, `openPmPaperV2`, `replayPmPaperV2Open`,
68
- `closePmPaperV2`, `pmPaperV2Positions` and `getSpotReference`.
69
-
70
- Agent runner and engine:
71
-
72
- - Capital-sizing agents: a correct-side futures take-profit that sits inside
73
- the agent's own `capitalSizing.minRewardRisk` floor is widened to that floor
74
- (fees included) instead of the open being refused as
75
- `capital_quote_reward_risk_too_low`. A target at or beyond the floor is never
76
- changed; agents without a capital policy are unaffected. Each repair is
77
- logged and persisted as `takeProfitRepair` (requested target, applied target
78
- and reason: `missing`, `wrong_side` or `below_reward_risk_floor`). Economics
79
- that cannot produce a finite target fail closed.
80
- - `capitalSizing.highConviction` (opt-in, `equity_fraction_v1`): a
81
- `futures_open` whose confidence is at or above `minConfidence` is sized and
82
- rechecked with its own `perTicketCapitalPct` and `futuresRiskPct` instead of
83
- the base ones. Total allocation, cash reserve, open-margin and reward:risk
84
- caps still apply; prediction-market and spot sizing never read confidence.
85
- Leo and Mia opt in (0.85 / 50% / 5%); the other house agents are unchanged.
86
- - The runner now shows the agent its last decision's refused actions (action,
87
- rejection code and a short reason) in the next prompt, so it fixes the cause
88
- instead of resubmitting the same action. The list is kept in the persisted
89
- run state, capped at five, replaced by every validated decision and cleared
90
- when the model chooses to skip.
91
- Explicit server refusals of stop/target updates are included when the mark
92
- moves after local validation. Network and server failures remain uncertain
93
- outcomes; they are not described as confirmed refusals.
94
- - Prompts list each open futures position's stop-loss side of the observed mark
95
- for `futures_set_sltp`, including whether a stop at the entry price would be
96
- refused.
97
- - Prompts mark watched coins whose perpetual reference is stale or unavailable
98
- as blocked for a NEW `futures_open` and give the remaining
99
- `futuresEntryChoices`. When no candidate remains, the prompt does not offer
100
- `futures_open` for that cycle. Runner validation, existing positions, closes
101
- and stop/target updates keep their rules.
102
- - Futures closes answered with the `hl_paper_v2` execution model: an accepted
103
- but unfilled exit (HTTP 202) is recorded as pending, not as executed or
104
- failed, and does not advance the reject or failure kill-switch counters.
105
- Replayed responses do not consume write budget or repeat journal entries.
106
- Legacy responses keep their existing meaning.
107
- - PM paper v2 houses now fail closed locally on a missing or invalid
108
- `forecastProbability`: the decision schema and the structured-output JSON
109
- schema require it, so such a decision is rejected (`pm_v2_invalid_decision`)
110
- before any checkpoint or API request, instead of reaching the API's
111
- `forecast_required` refusal. The prompt states the accepted range. Stored
112
- pending requests from earlier versions still replay unchanged. The hosted
113
- scheduler picks this up through its `../mcp-trading` dependency.
114
- - Engine exports for hosted, explicitly enrolled PM paper v2 houses:
115
- `runPmPaperCycle`, `readPmHousePolicies`, `selectPmHousePolicy` and
116
- `parseDecisionForContract`. The `coinrithm-agent` CLI does not run this
117
- cycle, and existing agents keep the legacy decision contract.
118
-
119
- ## 0.7.16 (published 2026-10-07)
120
-
121
- - Preserve independently timed funding-by-venue context in watchlist and
122
- discovered entries, including regular and compact prompts. Keep raw rates,
123
- interval normalization and unknown source/next-funding times distinct from
124
- settlement funding.
125
- - Bench reports retain up to two safe route attempts with response source,
126
- failure class, actions-string diagnostic and admission categories. Legacy
127
- missing evidence remains unknown; error text, latency, prompts and raw model
128
- output are excluded. Record explicit truncation for nonstandard providers.
129
- - Carry open interest, positioning, sampled liquidations, macro proxies,
130
- chain TVL, stablecoin supply and sampled order-book depth through the runner
131
- with their separate freshness, coverage and provenance limits.
132
- - Keep news source URLs/categories and every related PM coin in context; add
133
- the opt-in per-coin-horizon PM cap. Objective guidance stays within the
134
- authored strategy and hard caps. Use the supported MCP SDK 1.31 dependency.
135
-
136
- - Bench: the PM baselines now preserve the recorded agent's PM board policy
137
- (for house agents: depth 30, churn removed), the original opportunity set.
138
- Before, they asked for the uncurated 12-row page a live mechanical agent
139
- reads, and a cassette recorded without it (house Mia) reported the market
140
- as missing. Originally mechanical recordings keep their uncurated board;
141
- live mechanical agents are unchanged. New recordings need only the original
142
- pass and mark PM baseline readiness after successful PM reads, rather than
143
- assuming that an enabled PM venue guarantees recorded evidence.
144
- - Bench: two more PM baselines, `baseline:base-rate` (uninformative 50%) and
145
- `baseline:random` (seeded 20-80%), next to `baseline:skip` and
146
- `baseline:market`. They replay the same recorded market pass, so existing
147
- corpora need no re-recording; futures/spot-only corpora still get skip only.
148
- - Add `coinrithm-agent label --corpus <dir> [--horizon-hours 24] [--overwrite]`:
149
- writes `labels/<cassetteId>.json` price bars from candles published after
150
- each cassette's asOf (reads only). It waits for the horizon to elapse, uses
151
- the finest bar size the cassette's age still allows, keeps existing PM and
152
- funding labels, and writes PM settlement only from the public event
153
- verdict (settlement-eligible + "settle" + a provider won/lost outcome
154
- result; anything else stays unlabelled). Only
155
- bars that close by the horizon are stored, and an existing file for
156
- another horizon is reported (`horizon_mismatch`), never kept silently.
157
- - Bench futures scoring walks only bars that open after asOf and close by
158
- the horizon end; a horizon off the bar grid stops at the last full bar
159
- before it (`horizonFlooredToBar`), so no price after the horizon is used.
160
- - Add optional per-agent `signals` thresholds (`rsiOversold`, `rsiOverbought`,
161
- `strongMovePct`, `leanMovePct`, `minStrength`) and a `data.indicatorRange`
162
- data diet (`1D` 5m bars, `1W` 15m, `1M` 1h, `3M` 4h). They change the setup
163
- shortlist AND the gate that decides when the model is called, so personality
164
- changes what an agent notices. Absent blocks keep the previous constants and
165
- the 1D range exactly. Both are validated fail-closed, strict-linted and
166
- `$ref`-able; the prompt names the agent's bar size and RSI levels.
167
-
168
- - Every watch entry now carries perpetual open interest when the API serves it
169
- (`openInterest`: single-side USD over Bybit and OKX, 1h and 24h change,
170
- `asOf`, `stale`), read from the existing `/api/agent/market` call. The prompt
171
- explains how to read it with price; it is context, never a trade rule. Older
172
- APIs without the block leave entries unchanged.
173
-
174
- - Add an agent test bench: `coinrithm-agent record` saves the read inputs of
175
- dry-run cycles as cassettes (writes refused, no model call), and
176
- `coinrithm-agent bench` replays them through the production runner for
177
- several agent variants and repeats, next to skip and market-implied
178
- baselines. The deterministic report gives reject codes, action overlap,
179
- repeat consistency, seeded paired bootstrap CIs, a calibrated A/A null
180
- rate, a chronological holdout and optional label scoring. Quotes are
181
- synthesized and counted; see "Bench" in docs/agent-runner.md for the limits.
182
-
183
- - Add an optional `universe` block (market boundaries): a market-cap rank
184
- band, a minimum 24h volume, stablecoins in or out, curated sectors and chain
185
- ecosystems in or out, and the sort that defines an opportunity. Each cycle
186
- the runner asks `GET /api/agent/universe` for rows inside those boundaries,
187
- resolves the top `resolveTop` (max 10) into full `discovered` watch entries
188
- and passes the rest as context. Rows are re-checked client-side, so a server
189
- can narrow the set but never widen it; the blocklist still wins and every
190
- cap applies. A failed screener degrades to the watchlist only. The block
191
- can live in its own file via `$ref`. Without it, `universe_scan` keeps the
192
- previous top-gainers scan exactly. Needs backend-v2 with the screener.
193
-
194
- - Add three optional, runner-enforced prediction-market policy fields, so
195
- numbers that strategies stated only in prose become executable. Absent keeps
196
- the previous behaviour exactly; malformed values fail closed.
197
- - `risk.pmMinEdgeGapPct` (0..100): the forecast must beat the fee-inclusive
198
- cost by that share of the room left to 100 (16 means cost 50 needs 58). It
199
- never lowers the global minimum edge, and with it set a `pm_open` without
200
- `forecastProbability` is rejected (`pm_forecast_required`,
201
- `pm_edge_below_gap_rule`). Mechanical benchmarks are exempt.
202
- - `risk.pmMaxEdgePoints` (0..100): overconfidence guard; the forecast may
203
- beat the fee-inclusive cost by at most that many points, and a forecast
204
- becomes mandatory (`pm_edge_overconfident`). This is an optional action
205
- constraint; its effect on future performance requires separate evaluation.
206
- - `risk.pmMaxOpenPerEvent` (1..50): open bets per event (source + slug),
207
- counting held positions and opens accepted this cycle (`pm_event_cap`).
208
- - `risk.pmMaxOpenPerCoinHorizon` (1..50): open bets on the same directly
209
- linked coin whose events end within 24 h of each other, across different
210
- events, counting held positions and opens accepted this cycle
211
- (`pm_coin_horizon_cap`; a value outside 1..50 fails closed). Every linked
212
- coin is kept. Reads the additive discover `relatedCoins` and
213
- `/positions/pm` `relatedCoins` / `eventEndDate`; a missing coin, or an end
214
- that is missing, past or over 5 years out, never blocks. A count cap, not
215
- a correlation model, over the open positions the feed returns (at most
216
- 200, newest first).
217
- - `risk.pmMinMinutesToClose` (0..10080): reject a market whose known close is
218
- nearer than that to the later of `observation.asOf` and the validation
219
- clock after the model call (`pm_closes_too_soon`). An unknown or
220
- unparseable close never blocks.
221
-
222
- - Keep repeated provider 404/410 availability failures out of the generic model
223
- failure kill-switch. BYO and self-hosted agents retain their configured model
224
- and provider holds without entering a disable/revive loop. Transient failures
225
- and invalid decisions still count toward the existing kill-switch.
226
- - Keep rejected model text out of retained parser errors: JSON syntax errors
227
- omit input excerpts, and schema errors omit rejected enum values and unknown
228
- field names. Useful field/type diagnostics remain; validation is unchanged.
229
- - Reject OpenAI-compatible and Anthropic responses that explicitly end at the
230
- output token limit, and Anthropic responses stopped at the context-window
231
- limit, even if their partial decision text happens to be valid JSON. No action
232
- from that incomplete response reaches execution. Preserve reported token usage
233
- and the hosted router's existing bounded malformed-response fallback. A
234
- truncated direct-provider retry also retains its malformed classification.
235
- - Classify rejected actions strings with bounded, fixed diagnostic categories.
236
- JSON5 is used only for diagnostics; string-valued actions remain rejected.
237
- No raw model output is retained by this diagnostic path.
238
-
239
- ## 0.7.15 (published 2026-10-02)
240
-
241
- The verified release includes source changes through 1 October 2026. Its public
242
- archive and MCP Registry delivery are recorded in the repository publishing log.
243
-
244
- - PM board rows carry event settlement context from discovery's optional
245
- `resolution`. Where `scope` is `per_outcome`, each row also carries its own
246
- provider-bound `outcomeRule`, preserving exact primary/secondary terms or
247
- explicit unknown status. Event-level text does not substitute for another
248
- outcome's rule. Missing fields on older APIs remain unknown.
249
- - Futures agents see `futuresCapacity` in the user prompt: open vs maximum
250
- positions, slots left and margin headroom, computed exactly as the runner
251
- validates. With no slot or no margin left, the prompt says plainly that no
252
- futures_open (new or add) can pass. Production showed agents at 3 of 3
253
- positions proposing a new open on most cycles (max_positions 222 and
254
- open_margin_exceeds_cap 116 rejections in 6h), each a wasted model call.
255
- The validator still enforces both caps.
256
- - The PM system prompt no longer claims a "genuine information edge" on crypto
257
- price markets or makes a PM bet REQUIRED. It says the market already prices
258
- the same public data, that short-dated price markets are usually efficient,
259
- and that a bet needs a probability gap larger than costs plus a named reason;
260
- skipping PM is always valid. The ref anti-hallucination rule is unchanged.
261
- - Every non-mechanical agent (not only `objective.primary: calibration`) gets
262
- the micro-contract churn filter and the deeper 30-row discovery page,
263
- including the Bitcoin fallback. Mechanical baselines keep the unmodified
264
- 12-row universe.
265
- - PM board rows carry the discover event's optional `referenceProbability` as
266
- event-level `consensus` (`prob` 0..1, `venues`, `spreadPts`, `kind`,
267
- `outcome`), never mapped to or flipped for a specific outcome. Absent or
268
- unusable stays unknown.
269
- - Non-mechanical PM agents see their own settled forecast record
270
- (`pmCalibration` from `GET /api/agent/performance`) when it has at least 20
271
- settled forecasts. It is read at most once per 30 minutes per credential,
272
- without retries, and omitted on any failure.
273
-
274
- - Preflight new futures entries using informational reference eligibility;
275
- validate the available position and margin capacity across actions in the
276
- same cycle. Adds/exits retain their separate rules, and the API rechecks
277
- execution-time eligibility. Preserve reported capacity and spot fill
278
- receipts in decision evidence without claiming full historical replay.
279
- - Describe forecasts as market-aware, not price-blinded. A capacity-limited
280
- agent may still exit or adjust protection. Withheld-action diagnostics are
281
- attributed to the provider response that produced them.
282
- - Add `get_news` for scored crypto news, bringing the source MCP surface to
283
- 41 tools. Arena reads work without a key; discovery defaults to open
284
- markets. Default event results remain compact, with `detail: "full"` for
285
- the complete event response. Preserve event subtitles and per-outcome
286
- price basis in bounded output.
287
-
288
- - The hosted HTTP server recovers the pasted-markdown descriptor link
289
- (`/mcp` followed by `](`, literal or percent-encoded): GET/HEAD redirect to
290
- the service descriptor and POST runs the same MCP handler as `POST /mcp`.
291
- Every other unknown path stays 404 and `GET /mcp` stays 405.
292
- - `pm_data_canonical` documents the canonical `consensus` (or null) and the
293
- labelled `consensusHistory`, and names orientation `flipped` as the API does.
294
-
295
- - Preserve optional observed-price flags and bounded source provenance in public
296
- market summaries, including the exact sides of venue comparisons. A missing
297
- observed price remains distinct from an observed zero and unknown provenance.
298
- This source change is not included in published npm `0.7.14`.
299
-
300
- - Hosted scheduler rollout supports the opt-in `whale_context` runner capability. After the deterministic
301
- gate fires for a PM-scoped, non-mechanical cycle, it attaches bounded public
302
- tape context and up to two validated wallet movement summaries to the
303
- observation. Reads are best effort with explicit availability status and do
304
- not widen candidates or change risk/write gates. The observation fingerprint
305
- includes this context; the existing partial persisted audit projection does
306
- not store raw whale or wallet samples. Published MCP `0.7.14` remains unchanged.
307
-
308
- - Preserve full public `walletAddress` values in whale tape and default event
309
- summaries for direct wallet-tool follow-up on Polymarket, Limitless and Myriad.
310
- Anonymous/null and absent identities remain unchanged. This source fix is not
311
- included in the published npm `0.7.14` package.
312
- - Record explicit zero model calls, tokens, inference cost and action writes for
313
- cycles that return before inference due to a kill switch, observed drawdown,
314
- failed account reads or an empty market selection. Historical records remain
315
- unchanged; failures after a possible provider call retain unknown evidence.
316
-
317
- ## 0.7.14
318
-
319
- - Scope permanent model-error streaks to the attempted provider/model. Discard
320
- legacy unattributed streaks and reset availability failures on a successful
321
- provider response, including malformed decisions. Old-route failures cannot
322
- request an early hold on a replacement model; agent risk limits are unchanged.
323
- - Attribute a routed permanent-error hold to the attempt that produced the error,
324
- even when a later fallback is rate-limited; keep actual-call metering unchanged.
325
- - Preflight futures protection updates against observed side, mark and liquidation
326
- prices, including retained triggers. Reject known invalid end-states with an
327
- actionable reason before a write; the API remains authoritative as prices move.
328
- - Add the optional `risk.pmMinEntryProbabilityPct` policy (0..100 points): the
329
- runner rejects `pm_open` when the chosen outcome's raw market probability at
330
- entry is below the floor, with a reason that names both numbers. Fees stay
331
- in the forecast-edge check, so a 19-point outcome fails a 20-point floor even
332
- when fees lift its cost above 20. Absent keeps today's behaviour; a set floor
333
- with no quoted probability fails closed. The floor is rendered in the prompt's
334
- hard caps.
335
- - Retain candle timestamps and compact coverage/interval evidence alongside
336
- indicators, separately from market-price freshness. Missing timestamps stay
337
- unknown; nominal five-minute cadence does not imply current or regular bars.
338
- Model input and private decision evidence retain the same context.
339
- - Load optional `character/entries.md`, `exits.md`, `sizing.md` and `research.md`
340
- from local bundles so Studio strategy sections reach the model, manifest and
341
- compiled definition. Existing bundles without these files are unchanged.
342
- - Include the exact compiled strategy definition and its digest in local
343
- inspection; expose the same snapshot builder to engine consumers.
344
- - Add `run --expect-definition` to reject a changed baseline before model or
345
- account access. The digest is not a full replay record or broker adapter.
346
- - Hosted validation accepts `limits.maxDailyLossMusd: 0` as no daily loss cap,
347
- matching the runner and the hosted API; negative and non-finite values are
348
- still rejected.
349
- - Tactic cap merges treat 0 as unlimited for `maxTradesPerDay` and
350
- `maxDailyLossMusd`: a tactic may tighten 0 to a positive cap but can no
351
- longer turn a positive cap into 0. Writes and margins keep lower-is-tighter.
352
-
353
- Publication and hosted deployment are verified separately. See the repository's
354
- [release status](https://github.com/CoinRithm/coinrithm-agent-trading#version-clarity)
355
- for registry availability and the hosted runtime evidence.
356
-
357
- ## 0.7.13
358
-
359
- - Preserve optional per-outcome venue terms in compact prediction-market output,
360
- including explicit unavailable values and valid false/zero facts.
361
- - Include candle volume coverage in agent fundamentals: positive counts identify
362
- missing expected venues; unknown coverage stays unknown. Preserve measured zero
363
- volume and keep each volume paired with its own coverage.
364
- - Classify provider capacity failures consistently, including HTTP 503
365
- resource exhaustion, in runner results and configured same-model retries.
366
- - Export `classifyProviderFailure` from the supported engine entry point.
367
- Retry counts and trading behavior are unchanged.
368
- - Surface signed cumulative futures funding and its applied-through timestamp to
369
- the agent observation so funding already reflected in balances is not counted twice.
370
- - Add public whale-wallet context to the 40-tool surface: bounded 7-day or
371
- 30-day wallet activity and source/wallet movement detail, with provenance and
372
- provider-reported context kept distinct from CoinRithm's observed trade flow.
373
- - Clarify `pm_data_calibration` as market-price calibration: the primary lane
374
- uses one complete-book snapshot in the inclusive 20–28 hour pre-resolution
375
- window, with event-weighted ECE and separate `finalPrice`/`ownCapture` lanes.
376
-
377
- Publication and hosted deployment are verified separately. See the repository's
378
- [release status](https://github.com/CoinRithm/coinrithm-agent-trading#version-clarity)
379
- for registry availability and the hosted runtime evidence.
380
-
381
- ## 0.7.12 — 2026-09-15
382
-
383
- Clarify `whoami`, `cancel_spot_order` and `report_pm_opportunity` descriptions,
384
- removing execution-cost prose unrelated to these operations. Document actual
385
- authentication, side effects, result fields and retry behavior.
386
-
387
- Spot cancellation now advertises its existing idempotent behavior. Opportunity
388
- reporting no longer advertises unconditional idempotency: duplicate protection
389
- requires `decisionId` (or `agentTrace.decisionId`) under the same API key; the
390
- first stored record wins. Reporting remains a write despite requiring only the
391
- `read` scope, and its evidence remains explicitly self-reported.
392
-
393
- Tool names, accepted inputs and execution behavior are unchanged. Published on
394
- npm and deployed to hosted MCP on 2026-09-15; registry and GitHub downloads match
395
- the CI archive. A clean registry installation passed startup and tool metadata
396
- checks. See the [release record](https://github.com/CoinRithm/coinrithm-agent-trading/releases/tag/mcp-trading-v0.7.12).
397
- Glama's evaluation score is separate from package delivery.
398
-
399
- ## 0.7.11 — 2026-09-15
400
-
401
- Fix opportunity reporting that previously treated resolved API failures as
402
- successful submissions. Only `ok: true` confirms a report. HTTP errors remain
403
- unconfirmed; transport failures and exceptions have an unknown delivery outcome.
404
-
405
- `CycleResult.opportunity` now contains confirmed reports only. The additive
406
- `opportunityReport` field preserves the attempted payload, outcome and status,
407
- without API error bodies or exception details. Existing consumers should use
408
- this field when they need attempted rather than confirmed evidence.
409
-
410
- The reporter retains its one-invocation-per-cycle latch and adds no retries.
411
- Focused regressions compare successful and failed reporting in skip/act cycles
412
- and verify unchanged trading results and runner state. SDK versions are unchanged.
413
- This source entry does not establish registry publication or hosted deployment.
414
-
415
- ## 0.7.10 — 2026-09-15
416
-
417
- Source changes following the published 0.7.9 release. The TypeScript SDK remains
418
- 0.3.1 and Python remains 1.8.1; their runtime source is unchanged.
419
-
420
- - Persist file-backed run identity before execution so a first-cycle process
421
- crash cannot discard the idempotency identity. Transport uncertainty is still
422
- not automatically replayed or recorded as a completed trade.
423
- - Fix runner startup on Node 18: use the imported Node crypto API instead of
424
- depending on a global crypto object. The installed-package matrix reproduced
425
- this failure on Linux, Windows and macOS.
426
- - Add the supported `@coinrithm/mcp-trading/engine` entry point, preserving
427
- existing deep imports, and separate observation accounting and opportunity
428
- reporting from cycle ordering.
429
- - Add opt-in, machine-checked crypto return predicates and visible warnings for
430
- inactive/reserved configuration. Existing agents are not automatically opted in.
431
- - Serialize scheduler migrations in a bounded transaction; add an offline
432
- credential-rotation helper and interruption/recovery rehearsal.
433
- - Pin workflow actions and verify release-tool checksums. Add installed-package
434
- compatibility and restart smoke checks across operating systems and runtimes.
435
-
436
- 0.7.10 was published and deployed on 2026-09-15. Registry and GitHub downloads
437
- matched the CI-tested archive; hosted MCP and scheduler deployments finished.
438
- See the [release record](https://github.com/CoinRithm/coinrithm-agent-trading/releases/tag/mcp-trading-v0.7.10).
439
-
440
- ## 0.7.9 - 2026-09-15
441
-
442
- Published on npm and verified on 2026-09-15: the registry archive matches the
443
- reviewed artifact and passes fresh-install checks. See the
444
- [combined release notes](https://github.com/CoinRithm/coinrithm-agent-trading/releases/tag/mcp-trading-v0.7.9)
445
- for source provenance, verification and community acknowledgments.
446
-
447
- Public market-data fidelity and runner reliability release. No MCP tool was
448
- renamed or removed, and the API **contract stays 1.7.0**.
449
-
450
- **PM evaluation budget.** Event-driven periodic prediction-market evaluations
451
- now respect `maxLlmCallsPerHour` after their cooldown elapses. Budget skips make
452
- no provider call and consume no call allowance. PM keeps its own cooldown;
453
- open-position management and explicit always-on behavior retain their existing
454
- exemptions. This runner gate is separate from hosted provider-capacity admission.
455
-
456
- **Retry-After parsing.** Missing, blank or malformed headers no longer become
457
- zero-delay retries. The runner API client uses its existing five-second fallback;
458
- explicit zero, numeric seconds and HTTP dates remain supported. Model-provider
459
- cooldowns share the parser and retain their existing one-hour cap.
460
-
461
- **API request deadlines.** Each runner API operation now has a 30-second total
462
- deadline covering response headers, body reads and all 429 retry waits. The
463
- same client serves the hosted scheduler. Embedded callers can set a finite
464
- `requestTimeoutMs` and supply an `AbortSignal`. A timeout or cancellation returns
465
- an uncertain transport result without automatically replaying a trading write.
466
- Timers and listeners are removed when the operation finishes.
467
-
468
- **State persistence.** Self-host state is serialized to a private temporary file
469
- and atomically renamed over the previous state. A failed serialization or rename
470
- leaves the prior state intact. This is atomic replacement, not a claim of durable
471
- storage across power loss.
472
-
473
- **Agent conversion.** `coinrithm-agent eject` preserves explicit `triggerPolicy`
474
- and `capitalSizing` blocks. Previously conversion could restore default hourly
475
- budgets and drop equity sizing.
476
-
477
- **Release verification.** All-source coverage gates, mandatory PostgreSQL CI,
478
- dependency updates and corrected client setup docs are included. See the
479
- [reliability record](https://github.com/CoinRithm/coinrithm-agent-trading/blob/main/docs/RELIABILITY.md).
480
-
481
- **Confirmed-action journal.** Completed-action memory now requires an action
482
- to be both accepted and executed. Failed writes and uncertain transport results
483
- retain their attempt evidence without becoming completed moves in the next
484
- decision prompt. Dry-run proposals remain unexecuted.
485
-
486
- **Direct NVIDIA retry.** One complete HTTP 500/502/503/504 response can be
487
- retried once on the identical direct NVIDIA route within the original deadline.
488
- Both attempts are retained. This does not retry trading writes or change the
489
- hosted shared-pool routing policy.
490
-
491
- **Capital reconciliation.** Frozen-balance rounding residue down to -1e-8 is
492
- normalized only in the sizing calculation after the independent reads agree.
493
- Negative spendable cash still fails closed; wallet balances are not changed.
494
-
495
- **Private decision input evidence.** The bounded numeric projection includes
496
- nested indicator inputs and context movers, with legacy v1 records still readable.
497
- It does not retain hidden reasoning or raw model output.
498
-
499
- **Compact prediction-market evidence.** Discovery and compact event-detail
500
- responses now retain the API's `source.quoteScale`, `source.methodology` and
501
- `source.supportsMarketMetrics`, plus `spreadPoints`, `probabilityBook` and
502
- each retained outcome's `normalizedProbability`. Venue-native bid/ask quotes
503
- are never rescaled or interpreted from magnitude. Normalization remains the
504
- API's calculation over the original full book, not the truncated top-five
505
- outcome list. Existing payload bounds and explicit `detail: full` behavior
506
- are unchanged.
507
-
508
- **Settlement-time provenance.** Compact events retain `resolvedAtBasis` and
509
- `settlementWindowClosedAt`, keeping provider expiration distinct from an
510
- announced settlement time. Null and absent upstream evidence stay null and
511
- absent; the MCP does not infer missing values.
512
-
513
- **Candle semantics.** The `get_candles` description now states that these are
514
- sampled composite-price bars. Each bar's `v` is a mean rolling 24-hour
515
- quote-volume observation in USD, not volume traded during the candle, and
516
- must not be summed across bars.
517
-
518
- **HTTP completion diagnostics.** The hosted HTTP
519
- entry now has a bounded, stderr-only completion observer with final SDK-result
520
- and finish/abort accounting. Initialization, discovery, tool failures and
521
- successful delivery are distinct; unknown tool names are normalized. Records
522
- contain no arguments, bodies, credentials, caller/RPC IDs or caller-origin labels.
523
- Credential presence is not authentication. Durations describe the HTTP request,
524
- shared by batch members; server finish does not prove client receipt or use.
525
- Stdio, tools, authentication and dependency versions are unchanged. See
526
- `DEPLOY.md` for the measurement and retention limits. Hosted source/image
527
- `18a0bb6a8a0665e91cebc10225fec6f7ebcdaaf7` passed a bounded anonymous smoke on
528
- 2026-09-13. Hosted verification and npm publication are separate release steps.
529
-
530
- **Deployment boundaries.** Hosted scheduler admission reasons are private
531
- scheduler telemetry, not a new SDK or MCP response field. The API's corrected
532
- comparison probabilities and enriched spread names use the existing response
533
- shape and reach current clients through fresh API reads. Outcome display names
534
- may change; use source/event/outcome identifiers for identity, never summed
535
- prices or matching labels alone. These fixes do not establish trading returns.
536
-
537
- ## 0.7.8
538
-
539
- Runner decision-quality, evidence and paper-capital release. Additive: no MCP
540
- tool was renamed or removed, and the API **contract stays 1.7.0**. This release
541
- contains all package changes since published 0.7.7 (`gitHead` `80d0cae`), not
542
- just the previously listed thesis work.
543
-
544
- **Thesis exits.** Every opening action (`futures_open`, `spot_order`,
545
- `pm_open`) now carries a `thesis`: a one-sentence summary plus an
546
- `invalidation` with at least one machine-checkable condition (`priceBelow` /
547
- `priceAbove` for coins, `probabilityBelow` / `probabilityAbove` for prediction
548
- markets, a `maxHoldMinutes` time stop, and a free-text `catalyst` the model
549
- re-judges itself). The runner binds the thesis to the position the server
550
- returns, sanitized side-aware (a rising price never invalidates a long; a
551
- wrong-side level is dropped rather than re-signed; the time stop is clamped to
552
- 60 minutes .. 30 days), persists it in the run state (`RunState.theses`, the
553
- same state file / `agent_state` JSON as before, no schema change) and
554
- re-evaluates it every cycle. A futures position whose price level or time stop
555
- is breached is closed by the runner before the model is asked anything, logged
556
- as a `thesis_invalidated` exit with its own idempotency key, after the
557
- kill-switch and drawdown checks and never instead of them. Prediction-market
558
- positions have no close endpoint, so a broken PM thesis is surfaced to the
559
- model instead (do not add, let it settle). The parser is tolerant (a malformed
560
- thesis never fails the open; a thesis copied onto a close is ignored) and the
561
- structured-output schema requires it, so schema-enforced hosted models always
562
- emit one.
563
-
564
- **Fundamentals in the observation.** Each watch entry now carries
565
- `fundamentals` sourced only from calls the runner already makes: `categories`,
566
- `marketCapRank` and `marketCapUsd` from the market context; `volume24hUsd` from
567
- the candles the `indicators` capability already fetches (live-probed
568
- 2026-09-02: each bar's `v` is a rolling 24h volume, so the latest bar is the
569
- 24h figure, never the sum); and up to three `headlines` with `publishedAt`
570
- timestamps from the one `news` call, attributed through the curated coin-news
571
- graph. Discovered PM markets carry `endDate` and `liquidityUsd`; open PM
572
- positions carry their title, side, entry and current probability and
573
- `openedAt`; open futures positions carry `openedAt`. The system prompt states
574
- the thesis contract, the runner-enforced exit and how to grade a trade on the
575
- fundamentals. Not carried, because no agent endpoint serves them: an "about"
576
- text per coin, a 24h probability change and a cross-venue divergence per PM
577
- market.
578
-
579
- **Fix:** the public movers feed serializes `change24h` / `currentPrice` as
580
- decimal strings; the universe-scan context rows read them strictly as numbers
581
- and shipped `undefined` for every mover.
582
-
583
- **Opt-in equity-based paper sizing.** A runner can size entries from a
584
- conservative fraction of its independently attributed paper book instead of a
585
- fixed stake/margin. The book is accepted only when wallet identity, cash
586
- partitions, held-position attribution and spot-mark coverage reconcile. Quotes
587
- then enforce per-entry, per-symbol, deployed-capital and daily-entry limits;
588
- fee buffers and the API's fee-inclusive quote evidence are included. Any
589
- missing or inconsistent evidence fails closed. Legacy positions on a different
590
- book remain visible for management but never inflate the current book's buying
591
- power.
592
-
593
- **Prediction-market decisions use executable economics.** PM opens now reject
594
- an invalid raw probability and a model forecast that does not clear the quoted
595
- entry price. Forecast edge is measured against the actual fee/slippage-adjusted
596
- fill, not the headline market probability. Quote-expiry outcomes are recorded
597
- separately from risk/balance rejection, and futures risk/reward validation uses
598
- fee-inclusive entry and stop economics.
599
-
600
- **Decision evidence is structured and bounded.** Cycles can expose a sanitized,
601
- partial private decision-input record: configuration and observation
602
- fingerprints, daily budget and guard state, plus bounded observation rows with
603
- explicit omission counts. It is not a prompt, transcript, raw model output or
604
- hidden reasoning record. The runner also reports quote/validation evidence for
605
- abstained, forecast-only and quote-expired PM opportunities. Hosted persistence
606
- and retention remain the caller's responsibility.
607
-
608
- **Runtime controls are more faithful.** The model sees the remaining daily
609
- entry/add budget rather than only static maxima. Entry caps still block new
610
- risk, while closes and other risk-reducing actions remain available. Direct
611
- provider HTTP 429 responses are capacity skips rather than model failures, so
612
- BYO agents do not build a failure streak during ordinary quota pressure.
613
- Structured-tool decisions remain required where the provider supports that
614
- contract.
615
-
616
- **Scorecard fix.** Maximum drawdown now measures decline from starting equity,
617
- so an immediate loss is no longer hidden by treating the first post-trade point
618
- as the high-water mark.
619
-
620
- ## 0.7.7
621
-
622
- Reliability release. Every change here came from a live production failure, not
623
- from a roadmap. Additive: no tool renamed or removed, and the API **contract
624
- stays 1.7.0** because nothing on the documented surface changed.
625
-
626
- **Model requests are now built from a declared capability table, not
627
- assumptions.** `providerCapabilities.ts` states, per model family, which
628
- parameter carries the completion budget, whether a non-default temperature is
629
- allowed, and what extra body fields the family needs. Two failures this fixes:
630
-
631
- - **OpenAI's current models rejected our requests outright.** `gpt-5*` and
632
- `o*` refuse `max_tokens` and any non-default `temperature`; they take
633
- `max_completion_tokens`. The family is detected by MODEL id, not just the
634
- provider name, so an OpenAI-compatible gateway serving `gpt-5` gets the same
635
- shape. If you brought your own OpenAI key, this is why it now works.
636
- - **NVIDIA Nemotron models emitted a think-chain where the JSON decision
637
- belonged**, which failed every cycle. The `chat_template_kwargs.enable_thinking=false`
638
- switch and the "detailed thinking off" system hint are now encoded as data
639
- rather than re-learned by failing.
640
-
641
- **New: `probeDecisionContract()`.** An HTTP 200 is not proof a route can run an
642
- agent. Both production failure modes returned 200s: a think-chain in the JSON
643
- slot, and an empty completion because a reasoning model spent its whole budget
644
- before answering. The probe sends a canned mini-observation through the REAL
645
- decision parser at a >=1024 completion allowance and classifies the result as
646
- `http`, `empty` or `parse`. Use it before adopting any model id; provider
647
- catalogs list ids that 404 on invoke.
648
-
649
- **Provider trouble no longer disables an agent.** A permanent-looking model
650
- error (404/410/decommissioned) used to disable the agent after a threshold. On
651
- 2026-08-26 NVIDIA end-of-lifed an entire model line and 35 agents died on that
652
- path. The runner now reports a hold and keeps retrying each cadence, recovering
653
- by itself when the provider does. Disables remain for what deserves them:
654
- revoked credentials, drawdown, kill-switch, user action.
655
-
656
- **Failures carry structured metadata.** A failed `decide()` now returns
657
- `status` and, when the provider sends one, `retryAfterMs` (parsed from
658
- `Retry-After` in both delta-seconds and HTTP-date form, capped at an hour), so
659
- a caller can tell a 429 from a 5xx without parsing strings. Error text is
660
- unchanged.
661
-
662
- **`ClientConfig.extraHeaders`.** Headers attached to every request, spread
663
- before auth so they can never clobber it. Self-host has nothing to put here;
664
- it exists so CoinRithm's own hosted scheduler can present its attestation
665
- channel.
666
-
667
- **Model names corrected throughout.** The retired Llama 3.x line is gone from
668
- the README, the runtime defaults and the `quant-reference` example, which is
669
- relocked onto `nvidia/nemotron-3-nano-30b-a3b`.
670
-
671
- ## 0.7.6
672
-
673
- Agent capability release: universe discovery, first-class behavioral guards,
674
- and the hosted prose budget made visible. Additive — no tool renamed or
675
- removed. Contract moves to **1.7.0** (two keyless paths declared).
676
-
677
- **New: agents can look beyond their own watchlist.**
678
-
679
- - **`get_crypto_movers` tool.** Keyless scan of the tracked coin universe for
680
- the biggest 24h gainers or losers. Rows carry `coinId`, `symbol`, `name`,
681
- `slug`, `change24hPct`, `priceUsd`.
682
- - **`universe_scan` capability** for the self-host runner. Each cycle it pulls
683
- the top movers, promotes the strongest few into full watch entries marked
684
- `discovered: true`, and passes the remainder as compact context. Watchlist
685
- and blocklist symbols are excluded up front, so a discovered row can never
686
- duplicate a configured pair or bypass the deny list.
687
- - **Both now carry the coinId through.** The movers row's `ucid` IS the
688
- `coinId` that `get_candles` / `get_market_context` / the futures quote path
689
- take. It was previously stripped from the tool response and re-derived from
690
- the SYMBOL via a resolve round-trip — a wasted call per discovered mover and
691
- a real correctness hazard, because symbols collide across listings and the
692
- resolver could return a different coin than the one that actually moved.
693
-
694
- **New: contract declares the endpoints the tools call.**
695
-
696
- - `/api/coins/top-gainers` and `/api/coins/top-losers` are now in
697
- `openapi.yaml` (tag `public-crypto-data`), so both SDKs can reach the
698
- surface `get_crypto_movers` uses. Probe-verified against prod: bare array,
699
- no envelope; `change24h` / `currentPrice` are decimal STRINGS; default
700
- `limit` is 3 and out-of-range values return 400 rather than clamping.
701
-
702
- **New: personality and boundaries are configurable, and documented.**
703
-
704
- - **`character/guards.md`** — first-class hard behavioral guards, merged into
705
- the strategy prose as a distinct section rather than buried in the thesis.
706
- - **`examples/agents/pia-pump-fader`** — a full bundle demonstrating
707
- capabilities plus boundary configuration (watchlist/blocklist interaction,
708
- the five-point risk gate, re-entry discipline).
709
- - **`examples/agents/FORKING.md`** — a file-by-file map of what is strategy
710
- and what is plumbing, so a fork knows what it is allowed to change.
711
- - **QUICKSTART** documents capabilities, and a docs-drift tripwire fails the
712
- suite when a capability ships undocumented (`universe_scan` shipped
713
- invisible in every user surface once; that cannot recur silently).
714
-
715
- **Fixed.**
716
-
717
- - **Hosted prose budget is validated, not discovered at deploy.**
718
- `coinrithm-agent validate --hosted` now checks the 8,000-character merged
719
- prose budget and reports the exact overage. A bundle could previously
720
- validate clean and still be undeployable. YAML frontmatter is stripped
721
- before the count (and before the model sees it — it was being fed in as if
722
- it were strategy). `pia-pump-fader` was rebuilt to fit at 7,932.
723
- - **Permanent failures stop being revived.** A disabled agent whose model is
724
- gone or whose key is invalid is no longer resurrected by the scheduler's
725
- revive pass; only transient failures are retried.
726
- - **Fresh scaffolds are no longer bricked** by the capabilities field, and
727
- action-confidence tolerance was widened to match what models actually emit.
728
- - **False market-data licensing assertion corrected** in both READMEs.
729
-
730
- ⚠ Publishing to npm remains a **manual** step — `publish-mcp.yml` pushes
731
- `server.json` to the MCP registry only.
732
-
733
- ## 0.7.5
734
-
735
- **Release-hygiene bump. Everything below was already merged but never
736
- reached npm** — the 0.7.4 tarball was published 2026-07-26T23:01:11Z and
737
- five commits landed after that instant without a version bump, so the
738
- repository's 0.7.4 and the published 0.7.4 were different code under one
739
- version number. This release makes the published artifact match the
740
- source again.
741
-
742
- - **Security.** MCP dependency audit fixes, 6 findings to 0 (`da65e9e`).
743
- Anyone on published 0.7.4 is running the pre-audit dependency set.
744
- - **`pm_data` Gemini exposure** for agents (`3ab04ae`).
745
- - **Venue methodology and health** exposed as tools (`74cc495`).
746
- - **Reproducible decision receipts** persisted by the agent runner
747
- (`8bebc9e`).
748
- - **Docs.** Contract version drift corrected and the placeholder SDK
749
- README replaced, so the docs stop advertising an install that 404s
750
- (`6d61b92`).
751
-
752
- No tool was renamed or removed; this is additive plus a dependency
753
- refresh.
754
-
755
- ⚠ Publishing this package is a **manual** step — `publish-mcp.yml` only
756
- pushes `server.json` to the MCP registry, it does not run `npm publish`.
757
- That asymmetry is exactly how the drift above accumulated unnoticed.
758
-
759
- ## 0.7.4
760
-
761
- Docs-only. No tool behavior change, no API-surface change.
762
-
763
- - **Acceptable Use of Market Data.** The README (root and this package) and
764
- `openapi.yaml` (`info.termsOfService`, `info.description`, and the
765
- `public-pm-data` tag) now reference and summarize CoinRithm's licensing
766
- flow-down restriction on Market Data from third-party prediction-market
767
- venues: read-only use for paper-trading context and settled-outcome
768
- scoring only — no model training/fine-tuning/benchmarking, no
769
- redistribution or bulk-extraction, no use to build a competing product.
770
- Full terms: <https://www.coinrithm.com/en/terms-of-use>
771
-
772
- ## 0.7.3
773
-
774
- Quality-engine surfaces + independent forecasts. Additive; no breaking change.
775
-
776
- - **Quality verdicts in tool responses.** `discover_pm_markets`, `pm_quote`, and
777
- the `pm_data_*` tools now surface the persisted truth-engine `quality` object
778
- (`decisionEligible`, warning/block reason codes, `policyVersion`, `assessedAt`).
779
- Markets with critical failures stay visible but cannot drive paper opens or
780
- alerts.
781
- - **`openBlocked` preview on `pm_quote`.** Quotes preview the open-time quality
782
- gate (`openBlocked` + `openBlockReasons`), so an agent can skip a market that
783
- would 422 before burning the open attempt. The self-host runner
784
- (`coinrithm-agent`) does this skip automatically.
785
- - **Independent forecasts in the runner.** The self-host agent runner elicits the
786
- model's OWN probability (judged from the question/resolution criteria/deadline,
787
- never anchored to the market price) and submits it as `forecastProbability` on
788
- PM opens — feeding the public calibration dataset with proper-scoring-rule
789
- forecasts. Clamped to [1,99]; omitted (never faked) when the model does not
790
- produce one; `HOUSE_AGENT_FORECAST_ENABLED=false` disables.
791
- - **`crossPlatform` on event lists** documented in the API contract: sibling
792
- venues pricing the same question, on list rows.
793
- - **ForecastEx venue truth.** Public MCP discovery copy and registry metadata
794
- now describe all 11 live venues, including ForecastEx.
795
- - **Contract synchronization.** Runner templates and example bundles pin the
796
- served OpenAPI 1.6.0 contract; canonical scorecard paths are unambiguous.
797
-
798
- ## 0.7.2
799
-
800
- Docs-truth + privacy release. No tool behavior change, no API-surface change.
801
-
802
- - **Ten venues in the public listing.** `pm_data_*` tool copy, the README, and
803
- `server.json` now name all ten venues (adds Futuur and Myriad). npm `0.7.1` was
804
- published before those landed, so the registry listing still advertised "eight
805
- venues"; npm versions are immutable, so correcting the public listing required
806
- a new release.
807
- - **`source` parameter description** on `pm_data_events` / `pm_data_event_detail`
808
- now enumerates all ten venue slugs. Accepted values are unchanged — this is
809
- description text only, which is why it is a patch and not a minor.
810
- - **Privacy.** Raw model output is no longer persisted, enforcing the package's
811
- no-chain-of-thought promise.
812
- - **New tripwire.** `server.json` (the MCP-registry listing) is now guarded
813
- against version and venue-count drift; it had no guard, which is how it went
814
- stale in the first place.
815
- - Refreshed stale Arena-gate example copy.
816
-
817
- ## 0.7.1
818
-
819
- Docs + registry-metadata release; no tool behavior changes.
820
-
821
- - **README refresh**: the keyless `pm_data_*` data surface is now front and
822
- center — 8 venues (Polymarket, Kalshi, Smarkets, Limitless, Manifold,
823
- Metaculus, PredictIt, Rothera — the "seven venues" line predated Rothera),
824
- the anonymous hosted-endpoint path, and the `referenceProbability` /
825
- `volumeHistory` fields the data tools return.
826
- - **`server.json`**: hosted endpoint's `Authorization` header marked optional
827
- (the `pm_data_*` tools work anonymously — verified live) and the server
828
- description now leads with the keyless data surface.
829
- - Ships the post-0.7.0 commits: `pm_data_event` advertises `volumeHistory`,
830
- `pm_data_events` advertises `referenceProbability` on list items, and the
831
- hosted MCP root (`GET /`) serves a self-describing JSON landing (with a
832
- 405 + hint on `GET /mcp`).
833
-
834
- ## 0.7.0
835
-
836
- (Retroactive entry — released 2026-07-05 without a changelog note.)
837
-
838
- - **Four keyless `pm_data_*` tools** — CoinRithm's free public cross-venue
839
- prediction-market dataset over MCP, no API key required and yours is never
840
- attached: `pm_data_overview` (market-wide stats), `pm_data_events`
841
- (cross-venue event list), `pm_data_event` (detail incl.
842
- `crossSourceMatches` + resolution evidence), `pm_data_whales`
843
- (large-trade tape).
844
-
845
- ## 0.5.0
846
-
847
- Agent-runner quality + reliability release. `coinrithm-agent` got materially
848
- smarter and less noisy; `coinrithm-mcp` is unchanged in shape. Bundles the work
849
- since 0.4.0.
850
-
851
- - **Prediction markets are a first-class venue** in the decide prompt: a short
852
- `pmN` ref so small models trade PM reliably, eligible-outcome filtering (only
853
- backend-openable outcomes reach the model), and futures-capped agents steered
854
- to PM (a separate budget) instead of re-rejecting.
855
- - **PM anti-churn — now actually effective.** The candidate list is pre-filtered
856
- to exclude markets the agent already holds, and the runner + server both block
857
- re-betting a held market+outcome (no more one-agent, 25-identical-bets churn).
858
- An earlier version read the wrong `/positions/pm` fields and was silently dead;
859
- fixed.
860
- - **Settlement-feedback learning loop.** The agent sees how its own recent bets
861
- actually resolved (win/loss/void + realized PnL) as reflective context, so it
862
- learns from outcomes across cycles.
863
- - **Per-trade reasoning stays honest about the market.** A multi-action decision
864
- no longer stamps its primary rationale onto a secondary trade about a different
865
- market — the trade's public Arena "why" always matches the market it's on.
866
- - **Futures reliability.** The model is unblinded to per-position mark /
867
- liquidation / stop / take-profit prices; take-profit is auto-clamped to a valid
868
- R:R target off the stop (kills the `take_profit_not_*_mark` reject waves); and a
869
- marking-down PM book now trips the equity-drawdown kill-switch too.
870
- - **News capability.** Recent high-importance news for the watchlist coins is fed
871
- into the decide context as a market-catalyst layer.
872
- - **Robustness + contract accuracy.** Scheduler/runner hardening, flat-state
873
- prompt steers (weak models stop hallucinating closes), manage-enum
874
- normalization, and the PM contract now documents real entry friction rather
875
- than a disclose-only stance.
876
- - **Security.** `hono` bumped to 4.12.27 (high-severity advisories: serve-static
877
- path traversal, CORS wildcard-with-credentials, body-limit bypass).
878
- - **Docs.** The npm README leads with value / free / OKF / Studio; stale
879
- scheduler and `minDecidedTrades` claims corrected.
880
-
881
- ## 0.4.0
882
-
883
- - **Deterministic scorecard engine (`computeScorecard`).** The reproducible-
884
- evaluation engine for `coinrithm.agent.scorecard.v1` — pure math over an
885
- agent's realized track record (no network, no model): realized PnL, win rate,
886
- expectancy, profit factor, reward-to-risk, Sharpe, Sortino, deflated /
887
- probabilistic Sharpe (Bailey & López de Prado — skill vs luck with a multiple-
888
- testing penalty), max drawdown, and Brier + ECE calibration for probabilistic
889
- calls. Same inputs → identical metrics **and** a sha256 `contentHash` of the
890
- canonicalized result, so a scorecard whose hash doesn't reproduce isn't
891
- trusted. Metrics are computed AFTER the run from immutable evidence (leakage-
892
- separation), so tuning-to-the-metric is structurally impossible. Returns
893
- `null` for thin records — never a fabricated number.
894
- - **Resolver: committable file metadata + functionality pin.** The OKF resolver
895
- now carries per-file metadata and pins functionality through resolution, so a
896
- bundle's behavior is reproducible from its committed files.
897
-
898
- ## 0.3.0
899
-
900
- - **Agent risk config: coin deny-list (`blocklist`).** `risk.blocklist` lets an
901
- agent name symbols it must never open, even if they are on the watchlist —
902
- deny wins over allow. Enforced in the runner's decision validator (rejects
903
- `futures_open` / `spot_order` on a denied symbol) and surfaced in the system
904
- prompt, so the model is told the boundary and the runner re-checks it.
905
- - **Docs: Open Knowledge Format positioning.** Clarified that a CoinRithm agent
906
- is an OKF bundle — a portable directory of markdown + frontmatter that is
907
- model-agnostic (run the same definition on any model). Develop and prove it
908
- free on paper, then run it anywhere.
909
- - npm keywords refreshed (`open-knowledge-format`, `okf`, `model-agnostic`,
910
- `gemini`) for registry discovery.
911
-
912
- ## 0.2.0
913
-
914
- - Added the **`coinrithm-agent`** self-host runner binary alongside the MCP
915
- server: a folder-as-architecture (OKF) agent you bring your own model key to,
916
- with caps enforced by the runner (not the model), dry-run by default,
917
- paper-only.
918
-
919
- ## 0.1.x
920
-
921
- - Initial `coinrithm-mcp` MCP server: reads, quotes, scoped spot/futures/PM
922
- writes, ledger export, and Agent Arena integration over a user-minted API key.
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.11.0`).
7
+
8
+ ## 0.7.20 (2026-10-16)
9
+
10
+ MCP server: eight keyless data tools, so the default surface grows from 41
11
+ to 49 tools (23 keyless). Each uses compact projections by default.
12
+
13
+ - `instrument_markets`: prediction-market strike ladders written on a coin
14
+ or TradFi instrument's price, by horizon.
15
+ - `pm_data_price_history` (sampled to `maxPoints`, first and last kept) and
16
+ `pm_data_orderbook` (depth 1-50) for one event outcome.
17
+ - `pm_data_resolved`, `pm_data_expiring` and `pm_data_surprises`.
18
+ - `tradfi_references`: the TradFi reference catalog (asset-class filter and
19
+ paging) or one ticker's detail.
20
+ - `crypto_price`: one coin's price, change, market cap, volume and
21
+ freshness, with optional merged candles; `fiatApplied` is false when the
22
+ API fell back to USD.
23
+
24
+ The hosted server forwards each caller's address on keyless calls, so
25
+ anonymous users get their own API rate bucket. Generated against API
26
+ contract 1.11.0.
27
+
28
+ ## 0.7.19 (2026-10-16)
29
+
30
+ MCP server:
31
+
32
+ - The local stdio server starts without `COINRITHM_API_KEY` in data-only
33
+ mode, like the hosted server: `npx -y @coinrithm/mcp-trading` works with no
34
+ account. Keyless data tools (`pm_data_*`, `get_arena_*`,
35
+ `get_crypto_movers`) answer; every keyed tool returns the structured
36
+ `missing_api_key` result, which now also names `COINRITHM_API_KEY` for the
37
+ local server. `server.json` marks the key optional.
38
+ - Upstream requests time out after 35 s and report `upstream_timeout`
39
+ instead of hanging the tool call.
40
+ - Hosted HTTP entry: per-client admission (120 requests a minute) and an
41
+ in-flight cap (64), answered as JSON-RPC 429/503 with `Retry-After`; a stop
42
+ signal drains open requests for up to 8 s while `/healthz` answers 503;
43
+ `/health` and `/healthz` report `version`.
44
+
45
+ The default surface stays at 41 tools. Generated against API contract 1.9.0.
46
+
47
+ ## 0.7.18 (2026-10-15)
48
+
49
+ MCP server:
50
+
51
+ - `get_arena_leaderboard` and `get_arena_agent` describe `arena-ranking-v2`
52
+ (live since 2026-10-14): the score is realized PnL plus open losses
53
+ (min(0, unrealized)); open gains never raise a rank; an agent with more
54
+ than 10% of its start balance in unpriced open positions is rank pending.
55
+ A decided trade is one futures position or one spot round trip.
56
+ - Prediction-market comparison output ranks rows that are not traded on both
57
+ legs (`bothSidesTraded: false`) last, so an untraded pair is never the
58
+ headline gap.
59
+ - Tool descriptions name consensus probability v3 (open-interest weights
60
+ where every venue reports open interest, else the liquidity rule; the
61
+ basis is returned as `weightBasis`).
62
+
63
+ The default surface stays at 41 tools. Generated against API contract 1.9.0.
64
+
65
+ ## 0.7.17 (2026-10-13)
66
+
67
+ MCP server:
68
+
69
+ - Opt-in PM paper v2 tools. `COINRITHM_PM_PAPER_V2_TOOLS_ENABLED=true` adds
70
+ `discover_pm_paper_v2_markets` (`GET /api/agent/pm/v2/discover`, scope
71
+ `read`), `open_pm_paper_v2` (`POST /api/agent/pm/v2/open`, scope `trade:pm`),
72
+ `close_pm_paper_v2` (`POST /api/agent/pm/v2/close`, scope `trade:pm`) and
73
+ `get_pm_paper_v2_positions` (`GET /api/agent/pm/v2/positions`, scope `read`).
74
+ They serve separately configured house keys only. `maxCashBudget` is an exact
75
+ decimal total that includes entry fees. `open_pm_paper_v2` requires
76
+ `forecastProbability` for the bought side (percent above 1 and below 100, or
77
+ a fraction below 1; exactly 1 is refused, matching the API). A close can
78
+ return HTTP 202
79
+ (accepted, still pending); only `executed: true` confirms the exit.
80
+ - Opt-in spot reference tool. `COINRITHM_SPOT_REFERENCE_TOOLS_ENABLED=true` adds
81
+ `get_spot_reference` (`GET /api/agent/spot/reference/:coinId`, scope `read`):
82
+ a Binance spot last-ticker reference (USDT) with a stored REST consensus
83
+ fallback (USD), each with its own status and expiry. It is not an executable
84
+ quote and does not change market context, quotes or fills.
85
+ - Both flags are off by default. The default surface stays at 41 tools; with
86
+ both flags on it is 46.
87
+ - API clients add `discoverPmPaperV2`, `openPmPaperV2`, `replayPmPaperV2Open`,
88
+ `closePmPaperV2`, `pmPaperV2Positions` and `getSpotReference`.
89
+
90
+ Agent runner and engine:
91
+
92
+ - Capital-sizing agents: a correct-side futures take-profit that sits inside
93
+ the agent's own `capitalSizing.minRewardRisk` floor is widened to that floor
94
+ (fees included) instead of the open being refused as
95
+ `capital_quote_reward_risk_too_low`. A target at or beyond the floor is never
96
+ changed; agents without a capital policy are unaffected. Each repair is
97
+ logged and persisted as `takeProfitRepair` (requested target, applied target
98
+ and reason: `missing`, `wrong_side` or `below_reward_risk_floor`). Economics
99
+ that cannot produce a finite target fail closed.
100
+ - `capitalSizing.highConviction` (opt-in, `equity_fraction_v1`): a
101
+ `futures_open` whose confidence is at or above `minConfidence` is sized and
102
+ rechecked with its own `perTicketCapitalPct` and `futuresRiskPct` instead of
103
+ the base ones. Total allocation, cash reserve, open-margin and reward:risk
104
+ caps still apply; prediction-market and spot sizing never read confidence.
105
+ Leo and Mia opt in (0.85 / 50% / 5%); the other house agents are unchanged.
106
+ - The runner now shows the agent its last decision's refused actions (action,
107
+ rejection code and a short reason) in the next prompt, so it fixes the cause
108
+ instead of resubmitting the same action. The list is kept in the persisted
109
+ run state, capped at five, replaced by every validated decision and cleared
110
+ when the model chooses to skip.
111
+ Explicit server refusals of stop/target updates are included when the mark
112
+ moves after local validation. Network and server failures remain uncertain
113
+ outcomes; they are not described as confirmed refusals.
114
+ - Prompts list each open futures position's stop-loss side of the observed mark
115
+ for `futures_set_sltp`, including whether a stop at the entry price would be
116
+ refused.
117
+ - Prompts mark watched coins whose perpetual reference is stale or unavailable
118
+ as blocked for a NEW `futures_open` and give the remaining
119
+ `futuresEntryChoices`. When no candidate remains, the prompt does not offer
120
+ `futures_open` for that cycle. Runner validation, existing positions, closes
121
+ and stop/target updates keep their rules.
122
+ - Futures closes answered with the `hl_paper_v2` execution model: an accepted
123
+ but unfilled exit (HTTP 202) is recorded as pending, not as executed or
124
+ failed, and does not advance the reject or failure kill-switch counters.
125
+ Replayed responses do not consume write budget or repeat journal entries.
126
+ Legacy responses keep their existing meaning.
127
+ - PM paper v2 houses now fail closed locally on a missing or invalid
128
+ `forecastProbability`: the decision schema and the structured-output JSON
129
+ schema require it, so such a decision is rejected (`pm_v2_invalid_decision`)
130
+ before any checkpoint or API request, instead of reaching the API's
131
+ `forecast_required` refusal. The prompt states the accepted range. Stored
132
+ pending requests from earlier versions still replay unchanged. The hosted
133
+ scheduler picks this up through its `../mcp-trading` dependency.
134
+ - Engine exports for hosted, explicitly enrolled PM paper v2 houses:
135
+ `runPmPaperCycle`, `readPmHousePolicies`, `selectPmHousePolicy` and
136
+ `parseDecisionForContract`. The `coinrithm-agent` CLI does not run this
137
+ cycle, and existing agents keep the legacy decision contract.
138
+
139
+ ## 0.7.16 (published 2026-10-07)
140
+
141
+ - Preserve independently timed funding-by-venue context in watchlist and
142
+ discovered entries, including regular and compact prompts. Keep raw rates,
143
+ interval normalization and unknown source/next-funding times distinct from
144
+ settlement funding.
145
+ - Bench reports retain up to two safe route attempts with response source,
146
+ failure class, actions-string diagnostic and admission categories. Legacy
147
+ missing evidence remains unknown; error text, latency, prompts and raw model
148
+ output are excluded. Record explicit truncation for nonstandard providers.
149
+ - Carry open interest, positioning, sampled liquidations, macro proxies,
150
+ chain TVL, stablecoin supply and sampled order-book depth through the runner
151
+ with their separate freshness, coverage and provenance limits.
152
+ - Keep news source URLs/categories and every related PM coin in context; add
153
+ the opt-in per-coin-horizon PM cap. Objective guidance stays within the
154
+ authored strategy and hard caps. Use the supported MCP SDK 1.31 dependency.
155
+
156
+ - Bench: the PM baselines now preserve the recorded agent's PM board policy
157
+ (for house agents: depth 30, churn removed), the original opportunity set.
158
+ Before, they asked for the uncurated 12-row page a live mechanical agent
159
+ reads, and a cassette recorded without it (house Mia) reported the market
160
+ as missing. Originally mechanical recordings keep their uncurated board;
161
+ live mechanical agents are unchanged. New recordings need only the original
162
+ pass and mark PM baseline readiness after successful PM reads, rather than
163
+ assuming that an enabled PM venue guarantees recorded evidence.
164
+ - Bench: two more PM baselines, `baseline:base-rate` (uninformative 50%) and
165
+ `baseline:random` (seeded 20-80%), next to `baseline:skip` and
166
+ `baseline:market`. They replay the same recorded market pass, so existing
167
+ corpora need no re-recording; futures/spot-only corpora still get skip only.
168
+ - Add `coinrithm-agent label --corpus <dir> [--horizon-hours 24] [--overwrite]`:
169
+ writes `labels/<cassetteId>.json` price bars from candles published after
170
+ each cassette's asOf (reads only). It waits for the horizon to elapse, uses
171
+ the finest bar size the cassette's age still allows, keeps existing PM and
172
+ funding labels, and writes PM settlement only from the public event
173
+ verdict (settlement-eligible + "settle" + a provider won/lost outcome
174
+ result; anything else stays unlabelled). Only
175
+ bars that close by the horizon are stored, and an existing file for
176
+ another horizon is reported (`horizon_mismatch`), never kept silently.
177
+ - Bench futures scoring walks only bars that open after asOf and close by
178
+ the horizon end; a horizon off the bar grid stops at the last full bar
179
+ before it (`horizonFlooredToBar`), so no price after the horizon is used.
180
+ - Add optional per-agent `signals` thresholds (`rsiOversold`, `rsiOverbought`,
181
+ `strongMovePct`, `leanMovePct`, `minStrength`) and a `data.indicatorRange`
182
+ data diet (`1D` 5m bars, `1W` 15m, `1M` 1h, `3M` 4h). They change the setup
183
+ shortlist AND the gate that decides when the model is called, so personality
184
+ changes what an agent notices. Absent blocks keep the previous constants and
185
+ the 1D range exactly. Both are validated fail-closed, strict-linted and
186
+ `$ref`-able; the prompt names the agent's bar size and RSI levels.
187
+
188
+ - Every watch entry now carries perpetual open interest when the API serves it
189
+ (`openInterest`: single-side USD over Bybit and OKX, 1h and 24h change,
190
+ `asOf`, `stale`), read from the existing `/api/agent/market` call. The prompt
191
+ explains how to read it with price; it is context, never a trade rule. Older
192
+ APIs without the block leave entries unchanged.
193
+
194
+ - Add an agent test bench: `coinrithm-agent record` saves the read inputs of
195
+ dry-run cycles as cassettes (writes refused, no model call), and
196
+ `coinrithm-agent bench` replays them through the production runner for
197
+ several agent variants and repeats, next to skip and market-implied
198
+ baselines. The deterministic report gives reject codes, action overlap,
199
+ repeat consistency, seeded paired bootstrap CIs, a calibrated A/A null
200
+ rate, a chronological holdout and optional label scoring. Quotes are
201
+ synthesized and counted; see "Bench" in docs/agent-runner.md for the limits.
202
+
203
+ - Add an optional `universe` block (market boundaries): a market-cap rank
204
+ band, a minimum 24h volume, stablecoins in or out, curated sectors and chain
205
+ ecosystems in or out, and the sort that defines an opportunity. Each cycle
206
+ the runner asks `GET /api/agent/universe` for rows inside those boundaries,
207
+ resolves the top `resolveTop` (max 10) into full `discovered` watch entries
208
+ and passes the rest as context. Rows are re-checked client-side, so a server
209
+ can narrow the set but never widen it; the blocklist still wins and every
210
+ cap applies. A failed screener degrades to the watchlist only. The block
211
+ can live in its own file via `$ref`. Without it, `universe_scan` keeps the
212
+ previous top-gainers scan exactly. Needs backend-v2 with the screener.
213
+
214
+ - Add three optional, runner-enforced prediction-market policy fields, so
215
+ numbers that strategies stated only in prose become executable. Absent keeps
216
+ the previous behaviour exactly; malformed values fail closed.
217
+ - `risk.pmMinEdgeGapPct` (0..100): the forecast must beat the fee-inclusive
218
+ cost by that share of the room left to 100 (16 means cost 50 needs 58). It
219
+ never lowers the global minimum edge, and with it set a `pm_open` without
220
+ `forecastProbability` is rejected (`pm_forecast_required`,
221
+ `pm_edge_below_gap_rule`). Mechanical benchmarks are exempt.
222
+ - `risk.pmMaxEdgePoints` (0..100): overconfidence guard; the forecast may
223
+ beat the fee-inclusive cost by at most that many points, and a forecast
224
+ becomes mandatory (`pm_edge_overconfident`). This is an optional action
225
+ constraint; its effect on future performance requires separate evaluation.
226
+ - `risk.pmMaxOpenPerEvent` (1..50): open bets per event (source + slug),
227
+ counting held positions and opens accepted this cycle (`pm_event_cap`).
228
+ - `risk.pmMaxOpenPerCoinHorizon` (1..50): open bets on the same directly
229
+ linked coin whose events end within 24 h of each other, across different
230
+ events, counting held positions and opens accepted this cycle
231
+ (`pm_coin_horizon_cap`; a value outside 1..50 fails closed). Every linked
232
+ coin is kept. Reads the additive discover `relatedCoins` and
233
+ `/positions/pm` `relatedCoins` / `eventEndDate`; a missing coin, or an end
234
+ that is missing, past or over 5 years out, never blocks. A count cap, not
235
+ a correlation model, over the open positions the feed returns (at most
236
+ 200, newest first).
237
+ - `risk.pmMinMinutesToClose` (0..10080): reject a market whose known close is
238
+ nearer than that to the later of `observation.asOf` and the validation
239
+ clock after the model call (`pm_closes_too_soon`). An unknown or
240
+ unparseable close never blocks.
241
+
242
+ - Keep repeated provider 404/410 availability failures out of the generic model
243
+ failure kill-switch. BYO and self-hosted agents retain their configured model
244
+ and provider holds without entering a disable/revive loop. Transient failures
245
+ and invalid decisions still count toward the existing kill-switch.
246
+ - Keep rejected model text out of retained parser errors: JSON syntax errors
247
+ omit input excerpts, and schema errors omit rejected enum values and unknown
248
+ field names. Useful field/type diagnostics remain; validation is unchanged.
249
+ - Reject OpenAI-compatible and Anthropic responses that explicitly end at the
250
+ output token limit, and Anthropic responses stopped at the context-window
251
+ limit, even if their partial decision text happens to be valid JSON. No action
252
+ from that incomplete response reaches execution. Preserve reported token usage
253
+ and the hosted router's existing bounded malformed-response fallback. A
254
+ truncated direct-provider retry also retains its malformed classification.
255
+ - Classify rejected actions strings with bounded, fixed diagnostic categories.
256
+ JSON5 is used only for diagnostics; string-valued actions remain rejected.
257
+ No raw model output is retained by this diagnostic path.
258
+
259
+ ## 0.7.15 (published 2026-10-02)
260
+
261
+ The verified release includes source changes through 1 October 2026. Its public
262
+ archive and MCP Registry delivery are recorded in the repository publishing log.
263
+
264
+ - PM board rows carry event settlement context from discovery's optional
265
+ `resolution`. Where `scope` is `per_outcome`, each row also carries its own
266
+ provider-bound `outcomeRule`, preserving exact primary/secondary terms or
267
+ explicit unknown status. Event-level text does not substitute for another
268
+ outcome's rule. Missing fields on older APIs remain unknown.
269
+ - Futures agents see `futuresCapacity` in the user prompt: open vs maximum
270
+ positions, slots left and margin headroom, computed exactly as the runner
271
+ validates. With no slot or no margin left, the prompt says plainly that no
272
+ futures_open (new or add) can pass. Production showed agents at 3 of 3
273
+ positions proposing a new open on most cycles (max_positions 222 and
274
+ open_margin_exceeds_cap 116 rejections in 6h), each a wasted model call.
275
+ The validator still enforces both caps.
276
+ - The PM system prompt no longer claims a "genuine information edge" on crypto
277
+ price markets or makes a PM bet REQUIRED. It says the market already prices
278
+ the same public data, that short-dated price markets are usually efficient,
279
+ and that a bet needs a probability gap larger than costs plus a named reason;
280
+ skipping PM is always valid. The ref anti-hallucination rule is unchanged.
281
+ - Every non-mechanical agent (not only `objective.primary: calibration`) gets
282
+ the micro-contract churn filter and the deeper 30-row discovery page,
283
+ including the Bitcoin fallback. Mechanical baselines keep the unmodified
284
+ 12-row universe.
285
+ - PM board rows carry the discover event's optional `referenceProbability` as
286
+ event-level `consensus` (`prob` 0..1, `venues`, `spreadPts`, `kind`,
287
+ `outcome`), never mapped to or flipped for a specific outcome. Absent or
288
+ unusable stays unknown.
289
+ - Non-mechanical PM agents see their own settled forecast record
290
+ (`pmCalibration` from `GET /api/agent/performance`) when it has at least 20
291
+ settled forecasts. It is read at most once per 30 minutes per credential,
292
+ without retries, and omitted on any failure.
293
+
294
+ - Preflight new futures entries using informational reference eligibility;
295
+ validate the available position and margin capacity across actions in the
296
+ same cycle. Adds/exits retain their separate rules, and the API rechecks
297
+ execution-time eligibility. Preserve reported capacity and spot fill
298
+ receipts in decision evidence without claiming full historical replay.
299
+ - Describe forecasts as market-aware, not price-blinded. A capacity-limited
300
+ agent may still exit or adjust protection. Withheld-action diagnostics are
301
+ attributed to the provider response that produced them.
302
+ - Add `get_news` for scored crypto news, bringing the source MCP surface to
303
+ 41 tools. Arena reads work without a key; discovery defaults to open
304
+ markets. Default event results remain compact, with `detail: "full"` for
305
+ the complete event response. Preserve event subtitles and per-outcome
306
+ price basis in bounded output.
307
+
308
+ - The hosted HTTP server recovers the pasted-markdown descriptor link
309
+ (`/mcp` followed by `](`, literal or percent-encoded): GET/HEAD redirect to
310
+ the service descriptor and POST runs the same MCP handler as `POST /mcp`.
311
+ Every other unknown path stays 404 and `GET /mcp` stays 405.
312
+ - `pm_data_canonical` documents the canonical `consensus` (or null) and the
313
+ labelled `consensusHistory`, and names orientation `flipped` as the API does.
314
+
315
+ - Preserve optional observed-price flags and bounded source provenance in public
316
+ market summaries, including the exact sides of venue comparisons. A missing
317
+ observed price remains distinct from an observed zero and unknown provenance.
318
+ This source change is not included in published npm `0.7.14`.
319
+
320
+ - Hosted scheduler rollout supports the opt-in `whale_context` runner capability. After the deterministic
321
+ gate fires for a PM-scoped, non-mechanical cycle, it attaches bounded public
322
+ tape context and up to two validated wallet movement summaries to the
323
+ observation. Reads are best effort with explicit availability status and do
324
+ not widen candidates or change risk/write gates. The observation fingerprint
325
+ includes this context; the existing partial persisted audit projection does
326
+ not store raw whale or wallet samples. Published MCP `0.7.14` remains unchanged.
327
+
328
+ - Preserve full public `walletAddress` values in whale tape and default event
329
+ summaries for direct wallet-tool follow-up on Polymarket, Limitless and Myriad.
330
+ Anonymous/null and absent identities remain unchanged. This source fix is not
331
+ included in the published npm `0.7.14` package.
332
+ - Record explicit zero model calls, tokens, inference cost and action writes for
333
+ cycles that return before inference due to a kill switch, observed drawdown,
334
+ failed account reads or an empty market selection. Historical records remain
335
+ unchanged; failures after a possible provider call retain unknown evidence.
336
+
337
+ ## 0.7.14
338
+
339
+ - Scope permanent model-error streaks to the attempted provider/model. Discard
340
+ legacy unattributed streaks and reset availability failures on a successful
341
+ provider response, including malformed decisions. Old-route failures cannot
342
+ request an early hold on a replacement model; agent risk limits are unchanged.
343
+ - Attribute a routed permanent-error hold to the attempt that produced the error,
344
+ even when a later fallback is rate-limited; keep actual-call metering unchanged.
345
+ - Preflight futures protection updates against observed side, mark and liquidation
346
+ prices, including retained triggers. Reject known invalid end-states with an
347
+ actionable reason before a write; the API remains authoritative as prices move.
348
+ - Add the optional `risk.pmMinEntryProbabilityPct` policy (0..100 points): the
349
+ runner rejects `pm_open` when the chosen outcome's raw market probability at
350
+ entry is below the floor, with a reason that names both numbers. Fees stay
351
+ in the forecast-edge check, so a 19-point outcome fails a 20-point floor even
352
+ when fees lift its cost above 20. Absent keeps today's behaviour; a set floor
353
+ with no quoted probability fails closed. The floor is rendered in the prompt's
354
+ hard caps.
355
+ - Retain candle timestamps and compact coverage/interval evidence alongside
356
+ indicators, separately from market-price freshness. Missing timestamps stay
357
+ unknown; nominal five-minute cadence does not imply current or regular bars.
358
+ Model input and private decision evidence retain the same context.
359
+ - Load optional `character/entries.md`, `exits.md`, `sizing.md` and `research.md`
360
+ from local bundles so Studio strategy sections reach the model, manifest and
361
+ compiled definition. Existing bundles without these files are unchanged.
362
+ - Include the exact compiled strategy definition and its digest in local
363
+ inspection; expose the same snapshot builder to engine consumers.
364
+ - Add `run --expect-definition` to reject a changed baseline before model or
365
+ account access. The digest is not a full replay record or broker adapter.
366
+ - Hosted validation accepts `limits.maxDailyLossMusd: 0` as no daily loss cap,
367
+ matching the runner and the hosted API; negative and non-finite values are
368
+ still rejected.
369
+ - Tactic cap merges treat 0 as unlimited for `maxTradesPerDay` and
370
+ `maxDailyLossMusd`: a tactic may tighten 0 to a positive cap but can no
371
+ longer turn a positive cap into 0. Writes and margins keep lower-is-tighter.
372
+
373
+ Publication and hosted deployment are verified separately. See the repository's
374
+ [release status](https://github.com/CoinRithm/coinrithm-agent-trading#version-clarity)
375
+ for registry availability and the hosted runtime evidence.
376
+
377
+ ## 0.7.13
378
+
379
+ - Preserve optional per-outcome venue terms in compact prediction-market output,
380
+ including explicit unavailable values and valid false/zero facts.
381
+ - Include candle volume coverage in agent fundamentals: positive counts identify
382
+ missing expected venues; unknown coverage stays unknown. Preserve measured zero
383
+ volume and keep each volume paired with its own coverage.
384
+ - Classify provider capacity failures consistently, including HTTP 503
385
+ resource exhaustion, in runner results and configured same-model retries.
386
+ - Export `classifyProviderFailure` from the supported engine entry point.
387
+ Retry counts and trading behavior are unchanged.
388
+ - Surface signed cumulative futures funding and its applied-through timestamp to
389
+ the agent observation so funding already reflected in balances is not counted twice.
390
+ - Add public whale-wallet context to the 40-tool surface: bounded 7-day or
391
+ 30-day wallet activity and source/wallet movement detail, with provenance and
392
+ provider-reported context kept distinct from CoinRithm's observed trade flow.
393
+ - Clarify `pm_data_calibration` as market-price calibration: the primary lane
394
+ uses one complete-book snapshot in the inclusive 20–28 hour pre-resolution
395
+ window, with event-weighted ECE and separate `finalPrice`/`ownCapture` lanes.
396
+
397
+ Publication and hosted deployment are verified separately. See the repository's
398
+ [release status](https://github.com/CoinRithm/coinrithm-agent-trading#version-clarity)
399
+ for registry availability and the hosted runtime evidence.
400
+
401
+ ## 0.7.12 — 2026-09-15
402
+
403
+ Clarify `whoami`, `cancel_spot_order` and `report_pm_opportunity` descriptions,
404
+ removing execution-cost prose unrelated to these operations. Document actual
405
+ authentication, side effects, result fields and retry behavior.
406
+
407
+ Spot cancellation now advertises its existing idempotent behavior. Opportunity
408
+ reporting no longer advertises unconditional idempotency: duplicate protection
409
+ requires `decisionId` (or `agentTrace.decisionId`) under the same API key; the
410
+ first stored record wins. Reporting remains a write despite requiring only the
411
+ `read` scope, and its evidence remains explicitly self-reported.
412
+
413
+ Tool names, accepted inputs and execution behavior are unchanged. Published on
414
+ npm and deployed to hosted MCP on 2026-09-15; registry and GitHub downloads match
415
+ the CI archive. A clean registry installation passed startup and tool metadata
416
+ checks. See the [release record](https://github.com/CoinRithm/coinrithm-agent-trading/releases/tag/mcp-trading-v0.7.12).
417
+ Glama's evaluation score is separate from package delivery.
418
+
419
+ ## 0.7.11 — 2026-09-15
420
+
421
+ Fix opportunity reporting that previously treated resolved API failures as
422
+ successful submissions. Only `ok: true` confirms a report. HTTP errors remain
423
+ unconfirmed; transport failures and exceptions have an unknown delivery outcome.
424
+
425
+ `CycleResult.opportunity` now contains confirmed reports only. The additive
426
+ `opportunityReport` field preserves the attempted payload, outcome and status,
427
+ without API error bodies or exception details. Existing consumers should use
428
+ this field when they need attempted rather than confirmed evidence.
429
+
430
+ The reporter retains its one-invocation-per-cycle latch and adds no retries.
431
+ Focused regressions compare successful and failed reporting in skip/act cycles
432
+ and verify unchanged trading results and runner state. SDK versions are unchanged.
433
+ This source entry does not establish registry publication or hosted deployment.
434
+
435
+ ## 0.7.10 — 2026-09-15
436
+
437
+ Source changes following the published 0.7.9 release. The TypeScript SDK remains
438
+ 0.3.1 and Python remains 1.8.1; their runtime source is unchanged.
439
+
440
+ - Persist file-backed run identity before execution so a first-cycle process
441
+ crash cannot discard the idempotency identity. Transport uncertainty is still
442
+ not automatically replayed or recorded as a completed trade.
443
+ - Fix runner startup on Node 18: use the imported Node crypto API instead of
444
+ depending on a global crypto object. The installed-package matrix reproduced
445
+ this failure on Linux, Windows and macOS.
446
+ - Add the supported `@coinrithm/mcp-trading/engine` entry point, preserving
447
+ existing deep imports, and separate observation accounting and opportunity
448
+ reporting from cycle ordering.
449
+ - Add opt-in, machine-checked crypto return predicates and visible warnings for
450
+ inactive/reserved configuration. Existing agents are not automatically opted in.
451
+ - Serialize scheduler migrations in a bounded transaction; add an offline
452
+ credential-rotation helper and interruption/recovery rehearsal.
453
+ - Pin workflow actions and verify release-tool checksums. Add installed-package
454
+ compatibility and restart smoke checks across operating systems and runtimes.
455
+
456
+ 0.7.10 was published and deployed on 2026-09-15. Registry and GitHub downloads
457
+ matched the CI-tested archive; hosted MCP and scheduler deployments finished.
458
+ See the [release record](https://github.com/CoinRithm/coinrithm-agent-trading/releases/tag/mcp-trading-v0.7.10).
459
+
460
+ ## 0.7.9 - 2026-09-15
461
+
462
+ Published on npm and verified on 2026-09-15: the registry archive matches the
463
+ reviewed artifact and passes fresh-install checks. See the
464
+ [combined release notes](https://github.com/CoinRithm/coinrithm-agent-trading/releases/tag/mcp-trading-v0.7.9)
465
+ for source provenance, verification and community acknowledgments.
466
+
467
+ Public market-data fidelity and runner reliability release. No MCP tool was
468
+ renamed or removed, and the API **contract stays 1.7.0**.
469
+
470
+ **PM evaluation budget.** Event-driven periodic prediction-market evaluations
471
+ now respect `maxLlmCallsPerHour` after their cooldown elapses. Budget skips make
472
+ no provider call and consume no call allowance. PM keeps its own cooldown;
473
+ open-position management and explicit always-on behavior retain their existing
474
+ exemptions. This runner gate is separate from hosted provider-capacity admission.
475
+
476
+ **Retry-After parsing.** Missing, blank or malformed headers no longer become
477
+ zero-delay retries. The runner API client uses its existing five-second fallback;
478
+ explicit zero, numeric seconds and HTTP dates remain supported. Model-provider
479
+ cooldowns share the parser and retain their existing one-hour cap.
480
+
481
+ **API request deadlines.** Each runner API operation now has a 30-second total
482
+ deadline covering response headers, body reads and all 429 retry waits. The
483
+ same client serves the hosted scheduler. Embedded callers can set a finite
484
+ `requestTimeoutMs` and supply an `AbortSignal`. A timeout or cancellation returns
485
+ an uncertain transport result without automatically replaying a trading write.
486
+ Timers and listeners are removed when the operation finishes.
487
+
488
+ **State persistence.** Self-host state is serialized to a private temporary file
489
+ and atomically renamed over the previous state. A failed serialization or rename
490
+ leaves the prior state intact. This is atomic replacement, not a claim of durable
491
+ storage across power loss.
492
+
493
+ **Agent conversion.** `coinrithm-agent eject` preserves explicit `triggerPolicy`
494
+ and `capitalSizing` blocks. Previously conversion could restore default hourly
495
+ budgets and drop equity sizing.
496
+
497
+ **Release verification.** All-source coverage gates, mandatory PostgreSQL CI,
498
+ dependency updates and corrected client setup docs are included. See the
499
+ [reliability record](https://github.com/CoinRithm/coinrithm-agent-trading/blob/main/docs/RELIABILITY.md).
500
+
501
+ **Confirmed-action journal.** Completed-action memory now requires an action
502
+ to be both accepted and executed. Failed writes and uncertain transport results
503
+ retain their attempt evidence without becoming completed moves in the next
504
+ decision prompt. Dry-run proposals remain unexecuted.
505
+
506
+ **Direct NVIDIA retry.** One complete HTTP 500/502/503/504 response can be
507
+ retried once on the identical direct NVIDIA route within the original deadline.
508
+ Both attempts are retained. This does not retry trading writes or change the
509
+ hosted shared-pool routing policy.
510
+
511
+ **Capital reconciliation.** Frozen-balance rounding residue down to -1e-8 is
512
+ normalized only in the sizing calculation after the independent reads agree.
513
+ Negative spendable cash still fails closed; wallet balances are not changed.
514
+
515
+ **Private decision input evidence.** The bounded numeric projection includes
516
+ nested indicator inputs and context movers, with legacy v1 records still readable.
517
+ It does not retain hidden reasoning or raw model output.
518
+
519
+ **Compact prediction-market evidence.** Discovery and compact event-detail
520
+ responses now retain the API's `source.quoteScale`, `source.methodology` and
521
+ `source.supportsMarketMetrics`, plus `spreadPoints`, `probabilityBook` and
522
+ each retained outcome's `normalizedProbability`. Venue-native bid/ask quotes
523
+ are never rescaled or interpreted from magnitude. Normalization remains the
524
+ API's calculation over the original full book, not the truncated top-five
525
+ outcome list. Existing payload bounds and explicit `detail: full` behavior
526
+ are unchanged.
527
+
528
+ **Settlement-time provenance.** Compact events retain `resolvedAtBasis` and
529
+ `settlementWindowClosedAt`, keeping provider expiration distinct from an
530
+ announced settlement time. Null and absent upstream evidence stay null and
531
+ absent; the MCP does not infer missing values.
532
+
533
+ **Candle semantics.** The `get_candles` description now states that these are
534
+ sampled composite-price bars. Each bar's `v` is a mean rolling 24-hour
535
+ quote-volume observation in USD, not volume traded during the candle, and
536
+ must not be summed across bars.
537
+
538
+ **HTTP completion diagnostics.** The hosted HTTP
539
+ entry now has a bounded, stderr-only completion observer with final SDK-result
540
+ and finish/abort accounting. Initialization, discovery, tool failures and
541
+ successful delivery are distinct; unknown tool names are normalized. Records
542
+ contain no arguments, bodies, credentials, caller/RPC IDs or caller-origin labels.
543
+ Credential presence is not authentication. Durations describe the HTTP request,
544
+ shared by batch members; server finish does not prove client receipt or use.
545
+ Stdio, tools, authentication and dependency versions are unchanged. See
546
+ `DEPLOY.md` for the measurement and retention limits. Hosted source/image
547
+ `18a0bb6a8a0665e91cebc10225fec6f7ebcdaaf7` passed a bounded anonymous smoke on
548
+ 2026-09-13. Hosted verification and npm publication are separate release steps.
549
+
550
+ **Deployment boundaries.** Hosted scheduler admission reasons are private
551
+ scheduler telemetry, not a new SDK or MCP response field. The API's corrected
552
+ comparison probabilities and enriched spread names use the existing response
553
+ shape and reach current clients through fresh API reads. Outcome display names
554
+ may change; use source/event/outcome identifiers for identity, never summed
555
+ prices or matching labels alone. These fixes do not establish trading returns.
556
+
557
+ ## 0.7.8
558
+
559
+ Runner decision-quality, evidence and paper-capital release. Additive: no MCP
560
+ tool was renamed or removed, and the API **contract stays 1.7.0**. This release
561
+ contains all package changes since published 0.7.7 (`gitHead` `80d0cae`), not
562
+ just the previously listed thesis work.
563
+
564
+ **Thesis exits.** Every opening action (`futures_open`, `spot_order`,
565
+ `pm_open`) now carries a `thesis`: a one-sentence summary plus an
566
+ `invalidation` with at least one machine-checkable condition (`priceBelow` /
567
+ `priceAbove` for coins, `probabilityBelow` / `probabilityAbove` for prediction
568
+ markets, a `maxHoldMinutes` time stop, and a free-text `catalyst` the model
569
+ re-judges itself). The runner binds the thesis to the position the server
570
+ returns, sanitized side-aware (a rising price never invalidates a long; a
571
+ wrong-side level is dropped rather than re-signed; the time stop is clamped to
572
+ 60 minutes .. 30 days), persists it in the run state (`RunState.theses`, the
573
+ same state file / `agent_state` JSON as before, no schema change) and
574
+ re-evaluates it every cycle. A futures position whose price level or time stop
575
+ is breached is closed by the runner before the model is asked anything, logged
576
+ as a `thesis_invalidated` exit with its own idempotency key, after the
577
+ kill-switch and drawdown checks and never instead of them. Prediction-market
578
+ positions have no close endpoint, so a broken PM thesis is surfaced to the
579
+ model instead (do not add, let it settle). The parser is tolerant (a malformed
580
+ thesis never fails the open; a thesis copied onto a close is ignored) and the
581
+ structured-output schema requires it, so schema-enforced hosted models always
582
+ emit one.
583
+
584
+ **Fundamentals in the observation.** Each watch entry now carries
585
+ `fundamentals` sourced only from calls the runner already makes: `categories`,
586
+ `marketCapRank` and `marketCapUsd` from the market context; `volume24hUsd` from
587
+ the candles the `indicators` capability already fetches (live-probed
588
+ 2026-09-02: each bar's `v` is a rolling 24h volume, so the latest bar is the
589
+ 24h figure, never the sum); and up to three `headlines` with `publishedAt`
590
+ timestamps from the one `news` call, attributed through the curated coin-news
591
+ graph. Discovered PM markets carry `endDate` and `liquidityUsd`; open PM
592
+ positions carry their title, side, entry and current probability and
593
+ `openedAt`; open futures positions carry `openedAt`. The system prompt states
594
+ the thesis contract, the runner-enforced exit and how to grade a trade on the
595
+ fundamentals. Not carried, because no agent endpoint serves them: an "about"
596
+ text per coin, a 24h probability change and a cross-venue divergence per PM
597
+ market.
598
+
599
+ **Fix:** the public movers feed serializes `change24h` / `currentPrice` as
600
+ decimal strings; the universe-scan context rows read them strictly as numbers
601
+ and shipped `undefined` for every mover.
602
+
603
+ **Opt-in equity-based paper sizing.** A runner can size entries from a
604
+ conservative fraction of its independently attributed paper book instead of a
605
+ fixed stake/margin. The book is accepted only when wallet identity, cash
606
+ partitions, held-position attribution and spot-mark coverage reconcile. Quotes
607
+ then enforce per-entry, per-symbol, deployed-capital and daily-entry limits;
608
+ fee buffers and the API's fee-inclusive quote evidence are included. Any
609
+ missing or inconsistent evidence fails closed. Legacy positions on a different
610
+ book remain visible for management but never inflate the current book's buying
611
+ power.
612
+
613
+ **Prediction-market decisions use executable economics.** PM opens now reject
614
+ an invalid raw probability and a model forecast that does not clear the quoted
615
+ entry price. Forecast edge is measured against the actual fee/slippage-adjusted
616
+ fill, not the headline market probability. Quote-expiry outcomes are recorded
617
+ separately from risk/balance rejection, and futures risk/reward validation uses
618
+ fee-inclusive entry and stop economics.
619
+
620
+ **Decision evidence is structured and bounded.** Cycles can expose a sanitized,
621
+ partial private decision-input record: configuration and observation
622
+ fingerprints, daily budget and guard state, plus bounded observation rows with
623
+ explicit omission counts. It is not a prompt, transcript, raw model output or
624
+ hidden reasoning record. The runner also reports quote/validation evidence for
625
+ abstained, forecast-only and quote-expired PM opportunities. Hosted persistence
626
+ and retention remain the caller's responsibility.
627
+
628
+ **Runtime controls are more faithful.** The model sees the remaining daily
629
+ entry/add budget rather than only static maxima. Entry caps still block new
630
+ risk, while closes and other risk-reducing actions remain available. Direct
631
+ provider HTTP 429 responses are capacity skips rather than model failures, so
632
+ BYO agents do not build a failure streak during ordinary quota pressure.
633
+ Structured-tool decisions remain required where the provider supports that
634
+ contract.
635
+
636
+ **Scorecard fix.** Maximum drawdown now measures decline from starting equity,
637
+ so an immediate loss is no longer hidden by treating the first post-trade point
638
+ as the high-water mark.
639
+
640
+ ## 0.7.7
641
+
642
+ Reliability release. Every change here came from a live production failure, not
643
+ from a roadmap. Additive: no tool renamed or removed, and the API **contract
644
+ stays 1.7.0** because nothing on the documented surface changed.
645
+
646
+ **Model requests are now built from a declared capability table, not
647
+ assumptions.** `providerCapabilities.ts` states, per model family, which
648
+ parameter carries the completion budget, whether a non-default temperature is
649
+ allowed, and what extra body fields the family needs. Two failures this fixes:
650
+
651
+ - **OpenAI's current models rejected our requests outright.** `gpt-5*` and
652
+ `o*` refuse `max_tokens` and any non-default `temperature`; they take
653
+ `max_completion_tokens`. The family is detected by MODEL id, not just the
654
+ provider name, so an OpenAI-compatible gateway serving `gpt-5` gets the same
655
+ shape. If you brought your own OpenAI key, this is why it now works.
656
+ - **NVIDIA Nemotron models emitted a think-chain where the JSON decision
657
+ belonged**, which failed every cycle. The `chat_template_kwargs.enable_thinking=false`
658
+ switch and the "detailed thinking off" system hint are now encoded as data
659
+ rather than re-learned by failing.
660
+
661
+ **New: `probeDecisionContract()`.** An HTTP 200 is not proof a route can run an
662
+ agent. Both production failure modes returned 200s: a think-chain in the JSON
663
+ slot, and an empty completion because a reasoning model spent its whole budget
664
+ before answering. The probe sends a canned mini-observation through the REAL
665
+ decision parser at a >=1024 completion allowance and classifies the result as
666
+ `http`, `empty` or `parse`. Use it before adopting any model id; provider
667
+ catalogs list ids that 404 on invoke.
668
+
669
+ **Provider trouble no longer disables an agent.** A permanent-looking model
670
+ error (404/410/decommissioned) used to disable the agent after a threshold. On
671
+ 2026-08-26 NVIDIA end-of-lifed an entire model line and 35 agents died on that
672
+ path. The runner now reports a hold and keeps retrying each cadence, recovering
673
+ by itself when the provider does. Disables remain for what deserves them:
674
+ revoked credentials, drawdown, kill-switch, user action.
675
+
676
+ **Failures carry structured metadata.** A failed `decide()` now returns
677
+ `status` and, when the provider sends one, `retryAfterMs` (parsed from
678
+ `Retry-After` in both delta-seconds and HTTP-date form, capped at an hour), so
679
+ a caller can tell a 429 from a 5xx without parsing strings. Error text is
680
+ unchanged.
681
+
682
+ **`ClientConfig.extraHeaders`.** Headers attached to every request, spread
683
+ before auth so they can never clobber it. Self-host has nothing to put here;
684
+ it exists so CoinRithm's own hosted scheduler can present its attestation
685
+ channel.
686
+
687
+ **Model names corrected throughout.** The retired Llama 3.x line is gone from
688
+ the README, the runtime defaults and the `quant-reference` example, which is
689
+ relocked onto `nvidia/nemotron-3-nano-30b-a3b`.
690
+
691
+ ## 0.7.6
692
+
693
+ Agent capability release: universe discovery, first-class behavioral guards,
694
+ and the hosted prose budget made visible. Additive — no tool renamed or
695
+ removed. Contract moves to **1.7.0** (two keyless paths declared).
696
+
697
+ **New: agents can look beyond their own watchlist.**
698
+
699
+ - **`get_crypto_movers` tool.** Keyless scan of the tracked coin universe for
700
+ the biggest 24h gainers or losers. Rows carry `coinId`, `symbol`, `name`,
701
+ `slug`, `change24hPct`, `priceUsd`.
702
+ - **`universe_scan` capability** for the self-host runner. Each cycle it pulls
703
+ the top movers, promotes the strongest few into full watch entries marked
704
+ `discovered: true`, and passes the remainder as compact context. Watchlist
705
+ and blocklist symbols are excluded up front, so a discovered row can never
706
+ duplicate a configured pair or bypass the deny list.
707
+ - **Both now carry the coinId through.** The movers row's `ucid` IS the
708
+ `coinId` that `get_candles` / `get_market_context` / the futures quote path
709
+ take. It was previously stripped from the tool response and re-derived from
710
+ the SYMBOL via a resolve round-trip — a wasted call per discovered mover and
711
+ a real correctness hazard, because symbols collide across listings and the
712
+ resolver could return a different coin than the one that actually moved.
713
+
714
+ **New: contract declares the endpoints the tools call.**
715
+
716
+ - `/api/coins/top-gainers` and `/api/coins/top-losers` are now in
717
+ `openapi.yaml` (tag `public-crypto-data`), so both SDKs can reach the
718
+ surface `get_crypto_movers` uses. Probe-verified against prod: bare array,
719
+ no envelope; `change24h` / `currentPrice` are decimal STRINGS; default
720
+ `limit` is 3 and out-of-range values return 400 rather than clamping.
721
+
722
+ **New: personality and boundaries are configurable, and documented.**
723
+
724
+ - **`character/guards.md`** — first-class hard behavioral guards, merged into
725
+ the strategy prose as a distinct section rather than buried in the thesis.
726
+ - **`examples/agents/pia-pump-fader`** — a full bundle demonstrating
727
+ capabilities plus boundary configuration (watchlist/blocklist interaction,
728
+ the five-point risk gate, re-entry discipline).
729
+ - **`examples/agents/FORKING.md`** — a file-by-file map of what is strategy
730
+ and what is plumbing, so a fork knows what it is allowed to change.
731
+ - **QUICKSTART** documents capabilities, and a docs-drift tripwire fails the
732
+ suite when a capability ships undocumented (`universe_scan` shipped
733
+ invisible in every user surface once; that cannot recur silently).
734
+
735
+ **Fixed.**
736
+
737
+ - **Hosted prose budget is validated, not discovered at deploy.**
738
+ `coinrithm-agent validate --hosted` now checks the 8,000-character merged
739
+ prose budget and reports the exact overage. A bundle could previously
740
+ validate clean and still be undeployable. YAML frontmatter is stripped
741
+ before the count (and before the model sees it — it was being fed in as if
742
+ it were strategy). `pia-pump-fader` was rebuilt to fit at 7,932.
743
+ - **Permanent failures stop being revived.** A disabled agent whose model is
744
+ gone or whose key is invalid is no longer resurrected by the scheduler's
745
+ revive pass; only transient failures are retried.
746
+ - **Fresh scaffolds are no longer bricked** by the capabilities field, and
747
+ action-confidence tolerance was widened to match what models actually emit.
748
+ - **False market-data licensing assertion corrected** in both READMEs.
749
+
750
+ ⚠ Publishing to npm remains a **manual** step — `publish-mcp.yml` pushes
751
+ `server.json` to the MCP registry only.
752
+
753
+ ## 0.7.5
754
+
755
+ **Release-hygiene bump. Everything below was already merged but never
756
+ reached npm** — the 0.7.4 tarball was published 2026-07-26T23:01:11Z and
757
+ five commits landed after that instant without a version bump, so the
758
+ repository's 0.7.4 and the published 0.7.4 were different code under one
759
+ version number. This release makes the published artifact match the
760
+ source again.
761
+
762
+ - **Security.** MCP dependency audit fixes, 6 findings to 0 (`da65e9e`).
763
+ Anyone on published 0.7.4 is running the pre-audit dependency set.
764
+ - **`pm_data` Gemini exposure** for agents (`3ab04ae`).
765
+ - **Venue methodology and health** exposed as tools (`74cc495`).
766
+ - **Reproducible decision receipts** persisted by the agent runner
767
+ (`8bebc9e`).
768
+ - **Docs.** Contract version drift corrected and the placeholder SDK
769
+ README replaced, so the docs stop advertising an install that 404s
770
+ (`6d61b92`).
771
+
772
+ No tool was renamed or removed; this is additive plus a dependency
773
+ refresh.
774
+
775
+ ⚠ Publishing this package is a **manual** step — `publish-mcp.yml` only
776
+ pushes `server.json` to the MCP registry, it does not run `npm publish`.
777
+ That asymmetry is exactly how the drift above accumulated unnoticed.
778
+
779
+ ## 0.7.4
780
+
781
+ Docs-only. No tool behavior change, no API-surface change.
782
+
783
+ - **Acceptable Use of Market Data.** The README (root and this package) and
784
+ `openapi.yaml` (`info.termsOfService`, `info.description`, and the
785
+ `public-pm-data` tag) now reference and summarize CoinRithm's licensing
786
+ flow-down restriction on Market Data from third-party prediction-market
787
+ venues: read-only use for paper-trading context and settled-outcome
788
+ scoring only — no model training/fine-tuning/benchmarking, no
789
+ redistribution or bulk-extraction, no use to build a competing product.
790
+ Full terms: <https://www.coinrithm.com/en/terms-of-use>
791
+
792
+ ## 0.7.3
793
+
794
+ Quality-engine surfaces + independent forecasts. Additive; no breaking change.
795
+
796
+ - **Quality verdicts in tool responses.** `discover_pm_markets`, `pm_quote`, and
797
+ the `pm_data_*` tools now surface the persisted truth-engine `quality` object
798
+ (`decisionEligible`, warning/block reason codes, `policyVersion`, `assessedAt`).
799
+ Markets with critical failures stay visible but cannot drive paper opens or
800
+ alerts.
801
+ - **`openBlocked` preview on `pm_quote`.** Quotes preview the open-time quality
802
+ gate (`openBlocked` + `openBlockReasons`), so an agent can skip a market that
803
+ would 422 before burning the open attempt. The self-host runner
804
+ (`coinrithm-agent`) does this skip automatically.
805
+ - **Independent forecasts in the runner.** The self-host agent runner elicits the
806
+ model's OWN probability (judged from the question/resolution criteria/deadline,
807
+ never anchored to the market price) and submits it as `forecastProbability` on
808
+ PM opens — feeding the public calibration dataset with proper-scoring-rule
809
+ forecasts. Clamped to [1,99]; omitted (never faked) when the model does not
810
+ produce one; `HOUSE_AGENT_FORECAST_ENABLED=false` disables.
811
+ - **`crossPlatform` on event lists** documented in the API contract: sibling
812
+ venues pricing the same question, on list rows.
813
+ - **ForecastEx venue truth.** Public MCP discovery copy and registry metadata
814
+ now describe all 11 live venues, including ForecastEx.
815
+ - **Contract synchronization.** Runner templates and example bundles pin the
816
+ served OpenAPI 1.6.0 contract; canonical scorecard paths are unambiguous.
817
+
818
+ ## 0.7.2
819
+
820
+ Docs-truth + privacy release. No tool behavior change, no API-surface change.
821
+
822
+ - **Ten venues in the public listing.** `pm_data_*` tool copy, the README, and
823
+ `server.json` now name all ten venues (adds Futuur and Myriad). npm `0.7.1` was
824
+ published before those landed, so the registry listing still advertised "eight
825
+ venues"; npm versions are immutable, so correcting the public listing required
826
+ a new release.
827
+ - **`source` parameter description** on `pm_data_events` / `pm_data_event_detail`
828
+ now enumerates all ten venue slugs. Accepted values are unchanged — this is
829
+ description text only, which is why it is a patch and not a minor.
830
+ - **Privacy.** Raw model output is no longer persisted, enforcing the package's
831
+ no-chain-of-thought promise.
832
+ - **New tripwire.** `server.json` (the MCP-registry listing) is now guarded
833
+ against version and venue-count drift; it had no guard, which is how it went
834
+ stale in the first place.
835
+ - Refreshed stale Arena-gate example copy.
836
+
837
+ ## 0.7.1
838
+
839
+ Docs + registry-metadata release; no tool behavior changes.
840
+
841
+ - **README refresh**: the keyless `pm_data_*` data surface is now front and
842
+ center — 8 venues (Polymarket, Kalshi, Smarkets, Limitless, Manifold,
843
+ Metaculus, PredictIt, Rothera — the "seven venues" line predated Rothera),
844
+ the anonymous hosted-endpoint path, and the `referenceProbability` /
845
+ `volumeHistory` fields the data tools return.
846
+ - **`server.json`**: hosted endpoint's `Authorization` header marked optional
847
+ (the `pm_data_*` tools work anonymously — verified live) and the server
848
+ description now leads with the keyless data surface.
849
+ - Ships the post-0.7.0 commits: `pm_data_event` advertises `volumeHistory`,
850
+ `pm_data_events` advertises `referenceProbability` on list items, and the
851
+ hosted MCP root (`GET /`) serves a self-describing JSON landing (with a
852
+ 405 + hint on `GET /mcp`).
853
+
854
+ ## 0.7.0
855
+
856
+ (Retroactive entry — released 2026-07-05 without a changelog note.)
857
+
858
+ - **Four keyless `pm_data_*` tools** — CoinRithm's free public cross-venue
859
+ prediction-market dataset over MCP, no API key required and yours is never
860
+ attached: `pm_data_overview` (market-wide stats), `pm_data_events`
861
+ (cross-venue event list), `pm_data_event` (detail incl.
862
+ `crossSourceMatches` + resolution evidence), `pm_data_whales`
863
+ (large-trade tape).
864
+
865
+ ## 0.5.0
866
+
867
+ Agent-runner quality + reliability release. `coinrithm-agent` got materially
868
+ smarter and less noisy; `coinrithm-mcp` is unchanged in shape. Bundles the work
869
+ since 0.4.0.
870
+
871
+ - **Prediction markets are a first-class venue** in the decide prompt: a short
872
+ `pmN` ref so small models trade PM reliably, eligible-outcome filtering (only
873
+ backend-openable outcomes reach the model), and futures-capped agents steered
874
+ to PM (a separate budget) instead of re-rejecting.
875
+ - **PM anti-churn — now actually effective.** The candidate list is pre-filtered
876
+ to exclude markets the agent already holds, and the runner + server both block
877
+ re-betting a held market+outcome (no more one-agent, 25-identical-bets churn).
878
+ An earlier version read the wrong `/positions/pm` fields and was silently dead;
879
+ fixed.
880
+ - **Settlement-feedback learning loop.** The agent sees how its own recent bets
881
+ actually resolved (win/loss/void + realized PnL) as reflective context, so it
882
+ learns from outcomes across cycles.
883
+ - **Per-trade reasoning stays honest about the market.** A multi-action decision
884
+ no longer stamps its primary rationale onto a secondary trade about a different
885
+ market — the trade's public Arena "why" always matches the market it's on.
886
+ - **Futures reliability.** The model is unblinded to per-position mark /
887
+ liquidation / stop / take-profit prices; take-profit is auto-clamped to a valid
888
+ R:R target off the stop (kills the `take_profit_not_*_mark` reject waves); and a
889
+ marking-down PM book now trips the equity-drawdown kill-switch too.
890
+ - **News capability.** Recent high-importance news for the watchlist coins is fed
891
+ into the decide context as a market-catalyst layer.
892
+ - **Robustness + contract accuracy.** Scheduler/runner hardening, flat-state
893
+ prompt steers (weak models stop hallucinating closes), manage-enum
894
+ normalization, and the PM contract now documents real entry friction rather
895
+ than a disclose-only stance.
896
+ - **Security.** `hono` bumped to 4.12.27 (high-severity advisories: serve-static
897
+ path traversal, CORS wildcard-with-credentials, body-limit bypass).
898
+ - **Docs.** The npm README leads with value / free / OKF / Studio; stale
899
+ scheduler and `minDecidedTrades` claims corrected.
900
+
901
+ ## 0.4.0
902
+
903
+ - **Deterministic scorecard engine (`computeScorecard`).** The reproducible-
904
+ evaluation engine for `coinrithm.agent.scorecard.v1` — pure math over an
905
+ agent's realized track record (no network, no model): realized PnL, win rate,
906
+ expectancy, profit factor, reward-to-risk, Sharpe, Sortino, deflated /
907
+ probabilistic Sharpe (Bailey & López de Prado — skill vs luck with a multiple-
908
+ testing penalty), max drawdown, and Brier + ECE calibration for probabilistic
909
+ calls. Same inputs → identical metrics **and** a sha256 `contentHash` of the
910
+ canonicalized result, so a scorecard whose hash doesn't reproduce isn't
911
+ trusted. Metrics are computed AFTER the run from immutable evidence (leakage-
912
+ separation), so tuning-to-the-metric is structurally impossible. Returns
913
+ `null` for thin records — never a fabricated number.
914
+ - **Resolver: committable file metadata + functionality pin.** The OKF resolver
915
+ now carries per-file metadata and pins functionality through resolution, so a
916
+ bundle's behavior is reproducible from its committed files.
917
+
918
+ ## 0.3.0
919
+
920
+ - **Agent risk config: coin deny-list (`blocklist`).** `risk.blocklist` lets an
921
+ agent name symbols it must never open, even if they are on the watchlist —
922
+ deny wins over allow. Enforced in the runner's decision validator (rejects
923
+ `futures_open` / `spot_order` on a denied symbol) and surfaced in the system
924
+ prompt, so the model is told the boundary and the runner re-checks it.
925
+ - **Docs: Open Knowledge Format positioning.** Clarified that a CoinRithm agent
926
+ is an OKF bundle — a portable directory of markdown + frontmatter that is
927
+ model-agnostic (run the same definition on any model). Develop and prove it
928
+ free on paper, then run it anywhere.
929
+ - npm keywords refreshed (`open-knowledge-format`, `okf`, `model-agnostic`,
930
+ `gemini`) for registry discovery.
931
+
932
+ ## 0.2.0
933
+
934
+ - Added the **`coinrithm-agent`** self-host runner binary alongside the MCP
935
+ server: a folder-as-architecture (OKF) agent you bring your own model key to,
936
+ with caps enforced by the runner (not the model), dry-run by default,
937
+ paper-only.
938
+
939
+ ## 0.1.x
940
+
941
+ - Initial `coinrithm-mcp` MCP server: reads, quotes, scoped spot/futures/PM
942
+ writes, ledger export, and Agent Arena integration over a user-minted API key.