@battlegrid/mcp-server 32.0.19 → 32.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -38,6 +38,294 @@ Seeing package `31.x` alongside handshake `battlegrid@33.x` — the package **be
38
38
 
39
39
  **What this changes for you:** nothing about how you call anything. Upgrading the package no longer waits on a server deploy, and a server deploy no longer strands you on a package that names the wrong contract — reconnect and the announcement follows. **Contract breaking-change notes are no longer keyed to package versions**, since a contract move is no longer a release here; the v11-and-earlier notes below are kept as history, and the live vocabulary is always discovery.
40
40
 
41
+ ## Contract history — v129 (every record list takes one time window)
42
+
43
+ **Breaking at v129: `get_public_agent_realized_trades` renames its `timeframe` input to `window`, and sixteen list
44
+ tools accept the same window.** v129 is the contract on top of v128.1. No output moves. Reconnect the proxy, or
45
+ restart it, so discovery reads the new schemas.
46
+
47
+ ### Rejected input — a key you sent is refused
48
+
49
+ - **`get_public_agent_realized_trades` no longer takes `timeframe`.** Send the same value as `window` (`1D`, `7D`,
50
+ `30D` or `LIFETIME`; default `LIFETIME`). The input is strict: a call that still sends `timeframe` is refused as
51
+ invalid arguments.
52
+
53
+ ### Widened input — a window you can now ask for
54
+
55
+ - **One window on every record list paged by `cursor`:** `list_signal_logs`, `list_agent_trades`, `list_gate_blocks`,
56
+ `get_radar_activity`, `get_radar_close_decisions`, `get_public_agent_signal_logs`,
57
+ `get_public_agent_realized_trades`, `get_agent_thought_log`, `get_agent_activity_feed`,
58
+ `list_my_market_grid_entries`, and `list_strategy_drafts`, `list_agent_drafts`, `list_radar_deployment_drafts`,
59
+ `list_deployment_policy_drafts`, `list_officer_drafts` and `list_market_grid_entry_drafts`.
60
+ - **Either a trailing preset or explicit bounds, never both.** `window: '1D' | '7D' | '30D'` is the last 24 hours,
61
+ 7 days or 30 days, measured by the server on every page you read. Or leave `window` at `LIFETIME` and send
62
+ `since` (inclusive) and/or `until` (exclusive), each an ISO-8601 date-time with an offset (`Z` or `±hh:mm`).
63
+ - **The window is over the instant the list is ordered by:** a signal log's or thought's creation, a trade's close,
64
+ a radar event's occurrence, a close decision's bar open, an entry's original submission, a draft's last update.
65
+ - **Refused before any read, naming the field:** `since` not strictly before `until` (names `since`); a preset other
66
+ than `LIFETIME` beside `since` or `until` (names `window`); a bound with no offset, or before year 0001 (names the
67
+ bound).
68
+ - **Summaries follow the window.** `list_agent_trades`' `summary` and `resultSummary`, `list_signal_logs`' `summary`,
69
+ `list_gate_blocks`' `summary` and `list_my_market_grid_entries`' facets cover the windowed scope, not all history.
70
+ - **Cursors are unchanged.** A `nextCursor` you already hold still pages. Read the next page with the same window;
71
+ a cursor read under a different window serves the rows after its key that lie inside the window you send now.
72
+
73
+ ### Not windowed
74
+
75
+ `list_market_grid_sessions`, `list_officer_reviews`, the live-state reads (positions, open orders), catalogs,
76
+ rankings and bar series take no window; sending `window` to them is refused as an unknown input, as before.
77
+
78
+ ## Contract history — v128.1 (a signal's debrief reads through MCP)
79
+
80
+ **Additive at v128.1: two read tools.** v128.1 is the contract on top of v128. Nothing a client sends
81
+ is refused and nothing it reads is reshaped.
82
+
83
+ ### Added tools
84
+
85
+ - **`get_signal_debrief`** — `{ agentId, logId }`: the debrief of a signal log of your own agent.
86
+ - **`get_public_agent_signal_debrief`** — `{ agentId, logId }`: the same debrief for a signal log on an
87
+ agent's public profile.
88
+
89
+ Both answer `{ debrief }`, a `DecisionDebriefDTO` or `null`. The debrief's verdict is `null` until its
90
+ 24-hour mark resolves; read again after that.
91
+
92
+ ## Contract history — v128 (an agent's stop and take-profit move through the agent's own protection)
93
+
94
+ **Breaking at v128: `override_agent_protection` takes new input and returns a new answer, and two tools announce
95
+ that they are destructive and reach the exchange.** v128 is the contract on top of v127. Reconnect the proxy, or
96
+ restart it, so discovery reads the new schemas and annotations.
97
+
98
+ ### Rejected input — a key you sent is refused
99
+
100
+ - **`override_agent_protection` no longer takes `effectiveStopLoss` or `effectiveStopLossOrderId`.** Send
101
+ `{ decisionId, stopLossPrice?, takeProfitPrice? }` — each price a positive decimal string, at least one of the two.
102
+ The input is strict: a call that still sends `effectiveStopLossOrderId` is refused as invalid arguments. You name
103
+ levels, never orders; the server finds the live leg itself.
104
+ - **A level the live mark has already crossed is refused** — a stop must sit on the loss side of the mark and a
105
+ take-profit on its profit side. Read `decisionId`, `effectiveStopLoss` and `effectiveTakeProfit` from
106
+ `list_user_active_positions` or `get_agent_decision_context`. To exit now, call `close_agent_position`.
107
+
108
+ ### Reshaped output — the answer you read changed
109
+
110
+ - **`override_agent_protection` answers `{ decisionId, success, result }`.** `success` is true only when every leg you
111
+ asked to move committed. `result.kind` is one of:
112
+ - `level-crossed` — `{ leg, markPrice }`: that leg (`SL` or `TP`) would fill at once against the mark; nothing was
113
+ written;
114
+ - `mark-unavailable` — the live mark is stale or missing; nothing was written;
115
+ - `rate-limited` — `{ retryAfter }` seconds; nothing was written;
116
+ - `dispatched` — `{ stopLoss, takeProfit }`, each leg's own outcome (`null` for a leg you did not send).
117
+ - **Read each leg on its own.** Only `committed` moved the leg. A stop can come back `queued`: it is recorded and will
118
+ be placed as soon as the amendment in progress finishes. A take-profit with no resting leg is `execution-not-open`
119
+ with `observedStatus: "MISSING_TAKE_PROFIT"`. The never-produced `stale-order` outcome is gone. A committed stop is
120
+ never rolled back because the take-profit failed.
121
+ - **The take-profit moves too.** The tool used to move the stop only.
122
+
123
+ ### Changed annotations
124
+
125
+ - `close_agent_position` and `override_agent_protection` declare `destructiveHint: true` and `openWorldHint: true`.
126
+ A client that asks before destructive or open-world calls now asks before both.
127
+
128
+ ## Contract history — v127 (a read serves what its code computes, and says so)
129
+
130
+ **Breaking at v127: two answers narrow for calls you could already make, and every radar journal row gains one
131
+ field.** v127 is the contract on top of v126. No input you could send is refused. Reconnect the proxy, or restart it,
132
+ so discovery reads the new descriptions and schemas.
133
+
134
+ ### Narrowed answer — a call you made now returns less
135
+
136
+ - **`get_trade_chart` and `get_public_agent_trade_chart` return `UNAVAILABLE` for a CLOSED trade with no stored
137
+ chart.** A read used to capture the chart on the spot and answer `READY`; it no longer writes anything or fetches
138
+ candles. The chart is captured once, by a background job after the trade closes (it retries for about two and a
139
+ half hours). `UNAVAILABLE` now covers: no entry decision or no position; a position that has not closed; and a
140
+ closed position whose capture is still waiting out its delay, failed, or predates capture. Trades closed before
141
+ 2026-07-28 without a chart stay `UNAVAILABLE`.
142
+ - **`get_agent_explorer` returns 25 entries by default** (was 100). `limit` still accepts 1-100; pass it to ask for
143
+ more. A result over the result cap is refused with `nextAct: narrow` — ask again with a smaller `limit`.
144
+
145
+ ### Added output — a field you can read
146
+
147
+ - **`signalLogId` on every `get_radar_activity` row and every `get_radar_activity_summary` recent row.** On a
148
+ `FIRE_DISPOSITION` row whose disposition is `FIRED`, it names the signal log that fire's evaluation wrote — open it
149
+ with `get_signal_log({ agentId, logId })`. It is `null` when that evaluation wrote none (screened out or blocked
150
+ before a log existed) and on every other row. A strict-schema client accepts the new key on each variant.
151
+
152
+ ### Corrected answers — same shape, true values
153
+
154
+ - **`get_intelligence_agent`** and the receipts of create, update, activate and archive serve your rolling-24h LLM
155
+ spend on the agent (`last24hCostUsd`), your own active Arena deployments of it (`activeGameCount` — another
156
+ user's deployments of a platform agent are not counted) and `hasActiveAssignments`, the values
157
+ `list_intelligence_agents` serves. They used to serve `0`, `0` and `false`.
158
+ - **`get_agent_decision_context`** serves the open position's real `signalLogId` (it served `''`). It answers only
159
+ for an agent position that is OPEN on the coin; for a coin that did not trade, read `list_gate_blocks` and
160
+ `get_radar_activity_summary`.
161
+ - **`get_radar_activity`'s `FIRES` filter** keeps each fire's `EVALUATION_OUTCOME` row beside its disposition — the
162
+ only record of a fire refused before it wrote a signal log.
163
+
164
+ ### Declared sizes — the result cap is announced
165
+
166
+ - `get_radar_activity` (narrow with `limit`, `detail` or `includeCurve`), `get_agent_explorer` (narrow with `limit`),
167
+ `get_public_agent_signal_log_detail` and `list_radar_deployments` (read one coin with `get_radar_deployment`)
168
+ carry `_meta["anthropic/maxResultSizeChars"]`.
169
+
170
+ ### Corrected descriptions
171
+
172
+ `get_signal_log` names every block with its null case; `get_public_agent_signal_log_detail` states that a FAILED log
173
+ returns `log: null`; `get_radar_deployment` says a null `minConviction` is no floor (never inherited) and
174
+ `resolvedConviction` is the slot's own bar; `get_radar_activity_summary` names `ENTRY_VOID` and its 168-hour window;
175
+ `list_radar_deployments` names `summary.radarPaused`; `get_regime_snapshot`'s 4h is a default only — a Radar slot
176
+ reads its agent's own regime timeframe.
177
+
178
+ ## Contract history — v126 (a queued entry executes at its close; nothing waits for an approval)
179
+
180
+ **Breaking at v126: three entry-decision tools leave the catalog you discover, two outputs narrow, and one status
181
+ value is renamed.** v126 is the contract on top of v125. Reconnect the proxy, or restart it, so discovery reads the
182
+ new catalog.
183
+
184
+ A request you queue with `propose_entry_decision` is now an entry the player has already consented to: at the
185
+ agent's decided strategy-bar close, a qualifying entry is placed at once, sized by the agent's own risk budget, with
186
+ no further step. Confirm with the player before calling it — their ask to trade that coin with that agent, or a
187
+ standing instruction to trade for them, is the consent. The `mcp:wager` grant is that standing permission for an MCP
188
+ client, and the consent screen says so.
189
+
190
+ ### Removed tools — something you called is gone
191
+
192
+ A call naming one is answered as an unknown tool; there is no alias, and none has a replacement call.
193
+
194
+ - **`accept_entry_decision`**: nothing waits to be accepted. The entry executes at its decided close; consent comes
195
+ before `propose_entry_decision`.
196
+ - **`cancel_entry_decision`**: a decided entry is not cancelled. Withdraw a queued request with
197
+ `cancel_entry_request({ requestId })` until its close fires.
198
+ - **`list_pending_approvals`**: read a pending request with `get_entry_request({ requestId })`, and placing and live
199
+ positions with `list_user_active_positions()`.
200
+
201
+ ### Narrowed output — a shape you read has fewer members
202
+
203
+ - **`propose_entry_decision`** (now titled *Queue Entry*) returns `result` as `queued | error`. The `recommendation`
204
+ and `no_trade` members are gone; a decided close's answer lands in the request's conversation, read with
205
+ `get_trade_conversation`.
206
+ - **`get_agents_hub`** publishes no approval: `hubStatus` is `IN_TRADE`, `RADAR_ARMED`, `ARENA_DEPLOYED` or `IDLE`
207
+ (in that precedence), rows have no `pendingApprovalCount`, and the summary has no `totalPendingApprovalCount`.
208
+
209
+ ### Renamed value — a word you matched changed
210
+
211
+ - The execution status **`AWAITING_APPROVAL` is `PROPOSED`** wherever it is published (`get_signal_log`,
212
+ `get_public_agent_signal_log_detail`): a position whose order is being placed. Match `PROPOSED` where you matched
213
+ `AWAITING_APPROVAL`.
214
+
215
+ ### Re-specified behavior
216
+
217
+ - **A queued request's entry executes at its decided close.** Its conversation's `recommendation` card is the entry
218
+ locator: it names the decision (`get_entry_decision`) and the position the request placed.
219
+ - **Every request that is not withdrawn is answered once.** A request whose deadline passed unanswered is answered by
220
+ the next sweep — `close_missed` for its bar, or the engine's `EVALUATION_FAULTED` for a fired one whose decision job
221
+ is gone — and reads as pending through `get_entry_request` until then.
222
+
223
+ ## Contract history — v125 (MCP serves the read the client shows)
224
+
225
+ **Breaking at v125: nine trade and signal tools leave the catalog you discover, one tool joins it, two outputs
226
+ reshape, one tool refuses three inputs, one output field and three ack fields are gone.** v125 is the contract on top
227
+ of v124. Reconnect the proxy, or restart it, so discovery reads the new catalog.
228
+
229
+ ### Removed tools — something you called is gone
230
+
231
+ Each was a parallel, narrower or dead read beside the one the web client shows. A call naming one is answered as an
232
+ unknown tool; there is no alias.
233
+
234
+ - **`list_trade_outcomes`**: call `list_agent_trades({ agentId })`, then
235
+ `get_trade_outcome_by_decision({ decisionId })` for a trade's fills, fees, gross P&L, slippage, leverage,
236
+ `closedBy`, duration, excursion and `exitRepriceSource`.
237
+ - **`get_signal_performance`**: call `get_public_agent_signal_performance({ agentId })`. The owner's slice is
238
+ `list_signal_logs({ agentId }).summary` and `list_agent_trades({ agentId }).summary`.
239
+ - **`get_agent_open_positions`**: call `get_public_agent_open_positions({ agentId, filter: { coinTicker: [...] } })`.
240
+ - **`get_public_agent_unrealized_pnl`**: call `get_public_agent_open_positions({ agentId, filter: { signalSource } })`;
241
+ its `unrealizedPnlUsd` is the figure.
242
+ - **`list_session_agent_positions`**: call `list_user_active_positions()`; each position carries
243
+ `marketGridSessionId`.
244
+ - **`get_order_status`**: call `list_agent_open_orders()` for the platform's record, `get_open_orders()` for the
245
+ venue's.
246
+ - **`get_decision_order_attribution`**: call `list_agent_open_orders()`, `list_user_active_positions()` and
247
+ `list_agent_trades()`; each row names its `decisionId`.
248
+ - **`list_entry_decisions`**: call `list_signal_logs({ agentId })`, then `get_signal_log({ agentId, logId })`.
249
+ - **`get_agent_fund_allocation`**: call `get_agent_budget({ agentId })` for `haltedAt`, `haltReason` and
250
+ `perTradePushEnabled`.
251
+
252
+ ### Added tool and fields
253
+
254
+ - **`get_public_agent_open_positions({ agentId, filter })`** serves an agent's open book, newest open first. Each
255
+ row carries its decided `stopLoss` and `takeProfit` and its live `mark` (`unrealizedPnlUsd`, `movePercent`,
256
+ `roePercent`; `null` when the coin has no usable mark), beside the marked rows' `unrealizedPnlUsd` and an
257
+ `unpricedPositionCount`. The row's open instant is `openedAt`; `leverage` and `signalLogId` are never null, and
258
+ there is no `timeHorizon`. An archived or unknown agent reads as no positions.
259
+ - **`list_agent_trades`** rows carry `decisionId`, the key `get_trade_outcome_by_decision` takes. The tool accepts
260
+ `q` (1–64 characters after trimming).
261
+ - **`list_agent_open_orders`** rows carry `exchangeOrderId` (`null` until the venue acknowledges), `cloid` and
262
+ `decisionId`, so an agent order joins `get_open_orders` and chains to its decision.
263
+
264
+ ### Reshaped output — something you read moved
265
+
266
+ - **`list_signal_logs`** serves the My Agents Signals tab's read: `{ signals, nextCursor, summary }` across every one
267
+ of your agents unless `agentId` narrows it. Each row names its agent and carries `rejection`, the reason and detail
268
+ of the signal's rejected agent position, `null` otherwise.
269
+ - **`list_user_active_positions`** serves every position once, in `positions`. Each `agents` entry keeps its group
270
+ figures and loses its nested `positions`.
271
+
272
+ ### Rejected input — a key you sent is refused
273
+
274
+ - **`list_signal_logs`** refuses `direction`, `terminalStatus` and `signalSource` as unrecognised keys. Its `agentId`
275
+ is optional, and it accepts `coinTicker`, `q`, `cursor` and `limit` (1–50, default 10).
276
+
277
+ ### Removed fields — a value you read is gone
278
+
279
+ - **`skippedCount`** leaves `get_public_agent_signal_performance`; it was always `0`. `skipCount` counts the SKIP
280
+ decisions, and `blockedCount` counts the agent's ineligible attempts.
281
+ - **`availableUsd`, `lifetimeAllocatedUsd` and `lifetimeRecalledUsd`** leave the `allocation` that
282
+ `halt_intelligence_agent`, `resume_intelligence_agent` and `set_agent_per_trade_push` return; it is now
283
+ `{ agentId, haltedAt, perTradePushEnabled }`. The three figures were zero on every agent.
284
+
285
+ ### Declared result size
286
+
287
+ - **`list_signal_logs` and `list_agent_trades` declare the configured result cap.** A page past it is refused with
288
+ `nextAct: narrow`; ask again with a smaller `limit`.
289
+
290
+ ## Contract history — v124 (an agent's record is its thought log and its activity feed)
291
+
292
+ **Breaking at v124: three agent-record tools leave the catalog you discover, and a thought-log entry loses a
293
+ field.** v124 is the contract on top of v123.2.0. Reconnect the proxy, or restart it, so discovery reads the new
294
+ catalog.
295
+
296
+ ### Removed tools — something you called is gone
297
+
298
+ Each was a duplicate door onto the two per-agent reads. A call naming one is answered as an unknown tool; there is
299
+ no alias.
300
+
301
+ - **`get_agent_journal({ agentId, limit })`**: call `get_agent_thought_log({ agentId, limit })` and
302
+ `get_agent_activity_feed({ agentId, limit })`. Read the owner's `username` from `get_account_state()`.
303
+ - **`get_user_thought_log`**: call `get_agent_thought_log({ agentId })` for each agent
304
+ `list_intelligence_agents()` lists. Read a trade's reasoning from `get_signal_log`, and an arena entry's reasoning
305
+ from `list_my_market_grid_entries` and `get_my_market_grid_entry`.
306
+ - **`get_user_activity_feed`**: call `get_agent_activity_feed({ agentId })` for each agent
307
+ `list_intelligence_agents()` lists.
308
+
309
+ ### Reshaped output — a field you read is gone
310
+
311
+ - **`get_agent_thought_log` entries no longer carry `marketSnapshot`.** For an arena decision it held the agent's
312
+ whole resolved prompt, larger than the result cap, so a page holding one could not be served at all, even at
313
+ `limit: 1`, and no later entry could be reached. Each entry still carries its outcome, written reasoning, grid pick
314
+ and parsed picks, confidence and the floor enforced against it, its usage-event link and its creation instant.
315
+
316
+ ### Declared result size
317
+
318
+ - **`get_agent_thought_log` declares the configured result cap.** A page past it is refused with
319
+ `nextAct: narrow`; ask again with a smaller `limit`.
320
+
321
+ ### Descriptions
322
+
323
+ - `get_agent_thought_log` names both decisions it records: an arena grid decision and a trade thesis
324
+ (`AGENT_TRADE_THESIS`, whose full pipeline is `get_signal_log`).
325
+ - `get_agent_activity_feed` names the event families its rows carry: arena auto-submit triggers and grid outcomes,
326
+ cost-limit and insufficient-funds blocks, funds committed to a trade or a wager, halts and admission blocks, and
327
+ lifecycle events.
328
+
41
329
  ## Contract history — v122 (only an officer's own turn records a review)
42
330
 
43
331
  **Breaking at v122: two officer review tools leave the catalog you discover.** v122 is the contract on top of v121.
package/dist/index.d.ts CHANGED
@@ -47,7 +47,7 @@ import { Client, StreamableHTTPClientTransport } from '@modelcontextprotocol/cli
47
47
  * being asked. Move it for a change to THIS package — a proxy fix, a dependency bump, a docs
48
48
  * correction. Never move it to track the server.
49
49
  */
50
- export declare const PACKAGE_VERSION = "32.0.19";
50
+ export declare const PACKAGE_VERSION = "32.0.22";
51
51
  export declare const DEFAULT_URL = "https://mcp.battlegrid.trade/mcp";
52
52
  export interface EnvConfig {
53
53
  apiKeys: string[];
package/dist/index.js CHANGED
@@ -49,7 +49,7 @@ import { Client, SdkHttpError, StreamableHTTPClientTransport } from '@modelconte
49
49
  * being asked. Move it for a change to THIS package — a proxy fix, a dependency bump, a docs
50
50
  * correction. Never move it to track the server.
51
51
  */
52
- export const PACKAGE_VERSION = '32.0.19';
52
+ export const PACKAGE_VERSION = '32.0.22';
53
53
  export const DEFAULT_URL = 'https://mcp.battlegrid.trade/mcp';
54
54
  const MAX_RETRIES = 3;
55
55
  const RETRY_DELAYS_MS = [2000, 4000, 8000];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@battlegrid/mcp-server",
3
- "version": "32.0.19",
3
+ "version": "32.0.22",
4
4
  "description": "BattleGrid MCP server — play crypto prediction games from AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",