@battlegrid/mcp-server 31.2.35 → 31.2.37

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,49 @@ 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 — v63.2
28
+
29
+ Purely additive again, and smaller: **one optional input field.** Drafts now cover a strategy that
30
+ does not exist yet, so a playbook you author in chat survives between compiles instead of starting
31
+ over each time.
32
+
33
+ ### Wider input — one optional field on one tool
34
+
35
+ - **`compile_strategy_plan`'s CREATE arm gains an optional `strategyId`**, naming the create draft
36
+ this compile continues. Omit it and the server mints an id exactly as it always has, so nothing
37
+ you send today breaks.
38
+
39
+ - **Send it to accumulate; omit it to start fresh.** A first CREATE names nothing and mints; stage
40
+ that plan and the draft opens at the minted id, which `list_strategy_drafts` and the plan itself
41
+ both report. Name that id on the next CREATE and the second plan carries the same identity, so the
42
+ one draft accumulates rather than a second opening beside it.
43
+
44
+ - **WHY YOU HAVE TO SAY IT.** The server will not choose for you. A compile knows only who you are —
45
+ it has no conversation id — and you may hold several create drafts, so picking one could write this
46
+ playbook's values over another's. A compile that names none mints a third id rather than guessing.
47
+
48
+ - **It names a draft; it does not choose an id.** It is accepted only as the identity of a create
49
+ draft you own. An id naming no such draft is refused, as is one naming a draft for a strategy that
50
+ already exists.
51
+
52
+ ### Behaviour changes behind unchanged schemas
53
+
54
+ - **`stage_strategy_plan` admits a CREATE plan**, opening the create draft at the plan's own id when
55
+ none exists yet. Its input is still `{ planToken }` alone, and the contested-axis refusal applies
56
+ identically.
57
+
58
+ - **`list_strategy_drafts` rows gain `baseRevision`.** It is `null` for a create draft — a strategy
59
+ that does not exist has no committed revision to be based on — and that null is the only thing that
60
+ distinguishes one. There is no `kind`, `isNew` or `status` field beside it.
61
+
62
+ - **A create draft reserves nothing.** It consumes no quota and holds no name, so both are decided
63
+ when the strategy is actually created. Holding drafts past your limit is legal; creating past it is
64
+ not.
65
+
66
+ ### Vocabulary
67
+
68
+ `axes.create` gains `strategyId`. No domain gains a value, and `toolCount` stays 122.
69
+
27
70
  ## Contract history — v63.1
28
71
 
29
72
  Purely additive: **four new tools, nothing you send today changes.** A strategy now has an
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.35";
52
+ export declare const PACKAGE_VERSION = "31.2.37";
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.35';
55
+ export const PACKAGE_VERSION = '31.2.37';
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,7 +1,7 @@
1
1
  {
2
2
  "name": "@battlegrid/mcp-server",
3
- "version": "31.2.35",
4
- "description": "BattleGrid MCP server \u2014 play crypto prediction games from AI agents",
3
+ "version": "31.2.37",
4
+ "description": "BattleGrid MCP server — play crypto prediction games from AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "generator": "battlegrid-app/server/scripts/export-mcp-skills.mjs",
3
- "contractVersion": "63.0.0",
3
+ "contractVersion": "63.2.0",
4
4
  "files": {
5
5
  "battlegrid-agent-management/SKILL.md": "d56834fa2016ec9371994999fa13a3dbb69906efc54db522e10fd2eb0ebb6044",
6
6
  "battlegrid-arena-play/SKILL.md": "4cfaa92a8d0dcaf477b227abd774e7aa8642c185d72108dfd401be0cf8aecd7f",
7
7
  "battlegrid-market-analysis/SKILL.md": "22fde9c4eac0261c89a8056ab8b20b66fcbe1fd58447fa0ac84fd410b4d134d7",
8
8
  "battlegrid-radar-deployment/SKILL.md": "d2a012b154e1e529db19529bd7c3d75d069f4e410d5804add51165f0f0902b2e",
9
- "battlegrid-strategy-authoring/SKILL.md": "66ed78d8e83401586b6d0ec33ce59b0fdc8b22b04a3db0ab529cc77779bfe1c9",
9
+ "battlegrid-strategy-authoring/SKILL.md": "2ad66540d406fdf447118396821aa2aeb3510045a79d397846b83c7c797f33a1",
10
10
  "battlegrid-strategy-doctor/SKILL.md": "d0b9e9e07648246d5a23b0c17183278b70b5bcbb5f472ac7da13d03e42a6c6c6",
11
11
  "battlegrid-strategy-examples/SKILL.md": "17e8cf8040813622bd5b82165c7af82e03287fee1f6aac974e0b6c584580dd27",
12
12
  "battlegrid-strategy-examples/references/playbooks.md": "35c543c090d00ba19e4bcf0a80502afac7a4954643fc535de0b24381c91ecbf4",
@@ -52,6 +52,18 @@ conversation has changed it. A re-read returns the same bytes, and both copies t
52
52
  later step, so the player pays for the same payload twice and keeps paying for it. If you need a
53
53
  detail you did not keep, scroll back rather than re-fetching.
54
54
 
55
+ **Drafts are carved out of that rule.** A draft is the player's unsaved work, and another surface —
56
+ their builder, another device, an earlier plan you staged — can change it while you work. Read it
57
+ again whenever you are about to act on it.
58
+
59
+ **Start from what they are already part-way through.**
60
+
61
+ - Holding no strategy id? Call `list_strategy_drafts` first. If a draft comes back, say what it is,
62
+ when it was last touched and which surface touched it, and offer to continue it — never start a
63
+ second edit beside one the player has open.
64
+ - Holding an id? Call `get_strategy_draft` before you propose anything. A draft means the player is
65
+ mid-edit.
66
+
55
67
  ### 2. Lock the spec before you build anything
56
68
 
57
69
  **First, check the ask is expressible at all — and note that you cannot know until you have looked.**
@@ -187,9 +199,30 @@ returned, as numbers, not buried in prose.
187
199
  There is no backtest here and no expected-frequency figure. Do not imply one. What you have is a
188
200
  point-in-time reading, and you say so.
189
201
 
190
- ### 6. Confirm, then apply
202
+ ### 6. Stage or apply
203
+
204
+ **A draft decides which of the two you are doing.**
205
+
206
+ - **The player holds a draft for this strategy** → call `stage_strategy_plan` with the compile's
207
+ `planToken` and nothing else. The plan's own changed values land in their draft as proposed
208
+ changes, and *their* save is the consent. Committing instead would end a session they are in the
209
+ middle of. Staging does not spend the plan: the same token still applies while it lives.
210
+ - **They hold none** → compile → confirm → apply, as below.
211
+
212
+ When you compile over a draft, the diff names **every** axis the plan would commit, including
213
+ unsaved work the draft already carried before your compile. Read that list out in the
214
+ confirmation as the plan's own: the player is approving all of it, not only what you proposed.
215
+
216
+ If a staging call is refused as contested, it names the axes the player's own hand changed after
217
+ your compile. Do not retry it and do not work around it — compile again so the new plan absorbs
218
+ those edits, then stage that one.
219
+
220
+ **Offer to discard a draft only on the player's explicit word**, never on your own judgement that
221
+ it looks stale, and never batched into another act. State when it was last touched and which
222
+ surface touched it, ask, and call `discard_strategy_draft` with `confirm: true` only if they say
223
+ so. The unsaved values are gone afterwards and there is no other copy.
191
224
 
192
- **In a conversation the Strategy Builder hosts, this section does not apply: compile and stop.**
225
+ **In a conversation the Strategy Builder hosts, the apply half does not apply: compile and stop.**
193
226
  The compiled plan lands on the player's rail as unsaved changes and their Review & save is the one
194
227
  consent. Report that it is staged, name the axes, and present no apply confirmation — the server
195
228
  refuses `apply_strategy_plan` from such a conversation as a tool error, so calling it spends an op