@coinrithm/mcp-trading 0.7.16 → 0.7.17

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