@battlegrid/mcp-server 31.2.38 → 31.2.40

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,124 @@ 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 — v64.1
28
+
29
+ Purely additive in schema, with **one refusal behind an unchanged one.** An agent's unsaved
30
+ configuration now has a server home — the same owner-scoped *draft* strategies gained in v63.1 — so
31
+ the agent form, Telegram and a connected client all see one set of unsaved values. These tools are
32
+ how a conversation reaches it, and the two agent committers now step aside while it is open.
33
+
34
+ ### Wider surface — four tools added
35
+
36
+ - **`stage_agent_draft({ request: { agentId?, axes } })`** writes proposed axes into the player's
37
+ draft for an agent and commits **nothing**: the values become the agent's configuration only when
38
+ the player saves. Unlike `stage_strategy_plan` it takes the axis *values* — `IDENTITY`,
39
+ `BEHAVIOR`, `MODEL`, `TRADING_CONFIG`, and for an agent not yet created `STRATEGY_BINDING` — each
40
+ written **whole**, so `BEHAVIOR` carries all three of risk, outlook and conviction and
41
+ `TRADING_CONFIG` the complete agent-owned configuration. Axes you omit keep their values.
42
+ Structure is checked on the way in; ranges are checked only when the player saves.
43
+
44
+ - **Omit `agentId` to open a create draft.** The server mints the id and the response carries it;
45
+ name that id on every later call so one draft accumulates rather than a second opening beside it.
46
+
47
+ - **`get_agent_draft({ request: { agentId } })`** reads one draft, or answers `{ draft: null }` —
48
+ not part-way through that agent is a value, not an error. `baseRevision` is `null` for an agent not
49
+ yet created, and `baseMoved` reports an agent committed past the revision the draft was written
50
+ against.
51
+
52
+ - **`list_agent_drafts({ request: { cursor? } })`** answers "what am I part-way through?" for a
53
+ conversation holding no agent id, newest first. Offer to continue one of these before starting a
54
+ second.
55
+
56
+ - **`discard_agent_draft({ request: { agentId, confirm } })`** destroys one draft on the player's
57
+ word. Called with `confirm: false` it destroys nothing and is refused with when the draft was last
58
+ written and which surface wrote it — tell the player that, then ask.
59
+
60
+ ### Refusals worth knowing before you stage or save
61
+
62
+ - **A staged proposal refuses the axes the player typed after your call read the draft.** The
63
+ refusal names the axes; read the draft again and propose against what they now have. Another
64
+ surface's write to a *different* axis is retried once for you, then reported as a conflict.
65
+
66
+ - **`STRATEGY_BINDING` is refused on an agent that exists.** Rebinding replaces an agent's
67
+ configuration and stays its own confirmed call, `rebind_intelligence_agent`.
68
+
69
+ - **`update_intelligence_agent` and `rebind_intelligence_agent` answer `CONFLICT` while the player
70
+ holds a draft for that agent**, naming staging as the act available. Nothing about their input or
71
+ output changed, and a caller whose player holds no draft is unaffected — this is the one change
72
+ existing code can observe.
73
+
74
+ ### Vocabulary
75
+
76
+ `toolCount` 122 → 126. No input or output schema of an existing tool moves.
77
+
78
+ ## Contract history — v64
79
+
80
+ **Breaking, and it is a removal you will feel on two tools.** A vocabulary that never depended on
81
+ your draft was being re-serialized into every preview result; it now lives on discovery and the
82
+ preview names it.
83
+
84
+ ### Reshaped output — `preview_strategy_report`
85
+
86
+ - **`conditionColumns` covers only the sections your report RENDERS.** It used to cover every
87
+ section the server's header inventory holds, which meant every report-level scalar on every
88
+ preview whether or not its module was placed — 36,652 bytes of payload, with each metric's gloss
89
+ repeated once per scope (11 market-breadth sentences published as 99). If you read
90
+ `session-field`, `market-breadth` or `reference-pairs` groups off a preview, they are gone.
91
+
92
+ - **Nothing stopped resolving.** The header inventory is unchanged, so a condition naming
93
+ `mktBreadth_crypto` resolves exactly as it did. What changed is where you read its prose from.
94
+
95
+ - **`vocabularyDigest` is new** — the sha256 identity of the authoring catalog that render described
96
+ its columns against, and the same digest a plan token binds as `authoringCatalogDigest`. Resolve
97
+ the vocabulary once, cache it against this string, and re-resolve when it moves.
98
+
99
+ - **`structure.columns[].meaning` is gone.** It was a positional per-header string that neither
100
+ serialization ever rendered — the glossary paragraph in `section.text` is built from
101
+ `spanFragments`, and the structured arm always omitted `meaning`. `spanFragments` is unchanged.
102
+
103
+ - **`budgetUsage.estimatedTokens` now measures the whole served payload**, not the rendered module
104
+ text inside it. Existing drafts read several times higher against the same cap. That is the fix,
105
+ not a regression: the byte cap is measured on the serialized result and cannot be reported inside
106
+ it, so this is the only meter that can warn you before a refusal — and it was counting about a
107
+ tenth of what actually refuses.
108
+
109
+ ### Wider output — `list_strategy_vocabulary`
110
+
111
+ - **`scalarFamilies` is where the vocabulary went.** Every report-level scalar family with its
112
+ section, and one entry per METRIC carrying its gloss, legal condition operators, closed label
113
+ vocabulary, read contract (`closesReadable` / `developingRead`) and the scopes it is measured at.
114
+ One gloss per metric with its scopes named against it, never one per pair.
115
+
116
+ - **Served whole under every category.** A scalar describes the report, not a metric family, so it
117
+ is not filtered by the `category` you asked for. The ambient session family carries
118
+ `moduleKey: null` — it places no module and its operands are nameable all the same.
119
+
120
+ ### Reshaped output — `compile_strategy_plan`
121
+
122
+ - **`reviewContext.columns` is gone.** It recompiled a full column contract per authored custom
123
+ column — about 2,100 bytes for a five-header trajectory — describing columns the embedded
124
+ `reportPreview.conditionColumns` already describes per rendered header. Ask
125
+ `get_strategy_column_contract` when you want a column's exact normalized contract.
126
+
127
+ - **`approvedPlan.creationSeed` is gone.** It was the dense 84-rule scorecard *before* the
128
+ overrides, published beside a `postState.signalRules` that is the same list *after* them and an
129
+ `explicitRuleOverrides` naming exactly what differs. Apply never saw it either.
130
+
131
+ ### Wider input acceptance
132
+
133
+ - **The section array and a custom section's column array lose their `maxItems: 64`.** That bound
134
+ restated a configured cap of 32 as a looser 64 that never refused anything. `budgets.sections` and
135
+ `budgets.sectionColumns` from discovery are the published values, and the server enforces them
136
+ before it reads any market data.
137
+
138
+ ### What to do
139
+
140
+ Call `list_strategy_vocabulary` once for the scalar vocabulary, key your cache on the preview's
141
+ `vocabularyDigest`, and drop any code that reads scalar groups off `conditionColumns`,
142
+ `structure.columns[].meaning`, `reviewContext.columns` or `approvedPlan.creationSeed`. A preview's
143
+ size now tracks the report and cohort you composed rather than the size of the platform's catalog.
144
+
27
145
  ## Contract history — v63.2
28
146
 
29
147
  Purely additive again, and smaller: **one optional input field.** Drafts now cover a strategy that
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.38";
52
+ export declare const PACKAGE_VERSION = "31.2.40";
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.38';
55
+ export const PACKAGE_VERSION = '31.2.40';
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.38",
3
+ "version": "31.2.40",
4
4
  "description": "BattleGrid MCP server — play crypto prediction games from AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",