@battlegrid/mcp-server 31.2.72 → 31.2.74

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
@@ -24,6 +24,98 @@ Seeing package `31.x` alongside handshake `battlegrid@33.x` — the package **be
24
24
 
25
25
  **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.
26
26
 
27
+ ## Contract history — v92 (every section you read is the JSON the agent reads)
28
+
29
+ **Breaking at v92: the section fields are reshaped, the report preview's default narrows, and its size is measured
30
+ in characters.** v92 is the contract on top of v91. Every tool that published a section as markdown text publishes
31
+ it as the JSON object the agent reads, and `preview_strategy_report` takes a detail level.
32
+
33
+ ### Reshaped output — a section is its JSON
34
+
35
+ A **section read** is `{ shape: "table", section }` — `{ id, title, notes, provenance?, anchorTf, groups, columns,
36
+ rows, addendum? }`, rows positional and every cell its raw value, each column stating its `unit`, `precision`, bar
37
+ set (`bars`) and, on a rank column, the ranked set's `universe`, with a key absent where the column has nothing to
38
+ say — or `{ shape: "facts", section }`, `{ id, title, facts, glossary }`. It replaces:
39
+
40
+ - **`preview_strategy_report.renderedSections[]`**: `{ sectionKey, section: { title, text }, structure,
41
+ authoredNote }` → `{ sectionKey }` and a section read, or `{ sectionKey, shape: "skipped" }` for a row that
42
+ rendered nothing. A custom section's authored note is its section's `notes`.
43
+ - **`get_market_context.sections[]`**: `{ kind, title, content, structure }` → `{ kind }` and a section read.
44
+ - **`get_context_source_full_preview.content`** → **`read`**, a section read or `null`.
45
+ - **`get_context_sources_preview`**: each source's `value` → **`section`**, a section read or `null`, a coin-row
46
+ table sampled to its first five coins.
47
+ - **`get_signal_log.reportSections[]`**: a section read, `skipped`, or `{ sectionKey, shape: "text", title, text }`
48
+ — a row stored before custom sections carried a structure, kept as its agent read it.
49
+ - **`preview_strategy_report.conditionsTableText`** and **`.tradeConditionsBlockText`** → **`gridConditions`** and
50
+ **`tradeConditions`**, each `{ glossary, register }`: the glossary prose and the register object the text carried
51
+ as one JSON line. Each is `null` where its text was.
52
+
53
+ ### Widened output — the register names what decided the verdict
54
+
55
+ - **`decidedBy`** joins the conditions register: on each `GRID` coin and on the `TRADE` register, the key of the
56
+ condition the `verdict` came from, `null` when no single condition made the call. It reaches you in
57
+ `gridConditions.register`, `tradeConditions.register`, and the register `get_agent_prompt_context_preview` shows,
58
+ and the conditions glossary gains the sentence defining it.
59
+
60
+ ### Narrowed default, new input — `preview_strategy_report` `detail`
61
+
62
+ - **`detail`** is `"concise"` (the default) or `"detailed"`. A concise preview is exactly what the agent reads.
63
+ - **`conditionColumns`** and **`conditionOutcomes`** leave the top level. With each row's `headerBindings`
64
+ (`{ sectionKey, columnIndexByHeader }`) they make up **`authoring`**, served only at `"detailed"` and `null`
65
+ otherwise. If you read either field, ask for `"detailed"` and read it under `authoring`.
66
+ - **`marketReadMarkers[]`** lose `resolvedName` and `resolvedValue`.
67
+
68
+ ### Result size in characters
69
+
70
+ - **`tokenCountModel`** and **`budgetUsage.estimatedTokens`** leave the preview. **`budgetUsage.resultChars`** is
71
+ the exact `JSON.stringify` length of the response that carries it, its own digits included, against the cap.
72
+ - **`list_strategy_vocabulary`** drops `budgets.estimatedTokens`, and `previewExecutionLimits.maxResultBytes` is
73
+ renamed **`maxResultChars`**.
74
+ - A preview over the cap is refused with **`PREVIEW_LIMIT_EXCEEDED`** and `limit: "result_chars"`;
75
+ `estimated_tokens` and `mcp_result_bytes` are retired. Every preview refusal now carries its `previewErrorCode`
76
+ and its bound (`deadlineMs`, or `limit`, `actual` and `maximum`) in the error's details.
77
+ - **`preview_strategy_report`**, **`get_market_context`** and **`get_context_sources_preview`** declare the cap as
78
+ `_meta["anthropic/maxResultSizeChars"]`, so Claude Code keeps a large result inline.
79
+
80
+ Something read at v91 is reshaped or gone at v92, and a default narrows — hence the MAJOR.
81
+
82
+ ## Contract history — v91 (every data block an agent reads is one JSON object)
83
+
84
+ **Breaking at v91: one output field is removed, and the published text that is the agent's prompt carries JSON.**
85
+ v91 is the contract on top of v90. Every data block BattleGrid's trading agents read — the strategy's resolved
86
+ conditions, fact sections, and the trade-decision blocks — is one JSON object naming itself with `id` and `title`.
87
+ Instructions stay prose under their `## Title`. The tools that show you the prompt therefore show that JSON.
88
+
89
+ ### Removed output — something you read is gone
90
+
91
+ - **`promptDataSerialization`** leaves `get_signal_log`'s owner detail. There is one serialization, so a trade
92
+ record stores none. `reportSections` and `missingData` are unchanged, and a trade recorded before capture still
93
+ serves both as `null`.
94
+
95
+ ### Reshaped output — the same fields, carrying JSON
96
+
97
+ - **`preview_strategy_report.conditionsTableText`** is the conditions glossary as a `## Strategy Conditions
98
+ Glossary` instruction, then the conditions register as one JSON line: `surface: "GRID"`, and `coins[]` each with
99
+ `outcomes` keyed by condition and `verdict` by display name (`null` when the strategy declares no verdict). It was a
100
+ markdown table followed by the glossary.
101
+ - **`preview_strategy_report.tradeConditionsBlockText`** is the trade glossary, a blank line, then the target coin's
102
+ register as one JSON line: `surface: "TRADE"`, `verdict` as `{ name, description }`, and `conditions[]` each with
103
+ `outcome`, `required`, `provisional`, `counts`, `exitRule` and the evaluator's `evidence`. It was a
104
+ `## STRATEGY CONDITIONS` heading, a table and evidence bullets.
105
+ - **A fact section's text is its JSON**, `{ id, title, facts, glossary }` with `facts` keyed by label, in
106
+ `get_market_context.sections[].content`, `get_context_source_full_preview.content`,
107
+ `preview_strategy_report.renderedSections[].section.text`, and the `get_signal_log` report of trades recorded
108
+ from v91 on. The session field is a fact section. A table section's text is still its markdown.
109
+ - **`get_agent_prompt_context_preview.promptSections[].content`** is each section as the agent reads it: a data
110
+ section's JSON, a table's included, and an instruction's prose.
111
+
112
+ ### Widened enum
113
+
114
+ - **`get_agent_prompt_context_preview.promptSections[].kind`** gains `strategy-conditions-glossary`, the instruction
115
+ read before the conditions register. The market-context reads exclude it, as they exclude the register.
116
+
117
+ Something read at v90 is gone or reshaped at v91 — hence the MAJOR.
118
+
27
119
  ## Contract history — v90 (Arena and radar deployments join the draft lifecycle)
28
120
 
29
121
  **Breaking at v90: input is refused and reshaped, output is reshaped, five error codes are removed.** v90 is the
package/dist/index.d.ts CHANGED
@@ -49,7 +49,7 @@ import { type Implementation, type Prompt, type Resource } from '@modelcontextpr
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 declare const PACKAGE_VERSION = "31.2.72";
52
+ export declare const PACKAGE_VERSION = "31.2.74";
53
53
  export declare const DEFAULT_URL = "https://mcp.battlegrid.trade/mcp";
54
54
  export interface EnvConfig {
55
55
  apiKeys: string[];
package/dist/index.js CHANGED
@@ -52,7 +52,7 @@ import { ListToolsRequestSchema, CallToolRequestSchema, ListPromptsRequestSchema
52
52
  * being asked. Move it for a change to THIS package — a proxy fix, a dependency bump, a docs
53
53
  * correction. Never move it to track the server.
54
54
  */
55
- export const PACKAGE_VERSION = '31.2.72';
55
+ export const PACKAGE_VERSION = '31.2.74';
56
56
  export const DEFAULT_URL = 'https://mcp.battlegrid.trade/mcp';
57
57
  const MAX_RETRIES = 3;
58
58
  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": "31.2.72",
3
+ "version": "31.2.74",
4
4
  "description": "BattleGrid MCP server — play crypto prediction games from AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",