@battlegrid/mcp-server 31.2.34 → 31.2.36

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,90 @@ 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
+
70
+ ## Contract history — v63.1
71
+
72
+ Purely additive: **four new tools, nothing you send today changes.** A strategy now has an
73
+ owner-scoped *draft* — the unsaved authored values a player is part-way through — and these are how
74
+ an agent reads it, writes a compiled plan into it, and destroys one. The canonical record for every
75
+ contract move is `docs/architecture/MCP_CONTRACT_HISTORY.md` in `battlegrid-app`; the served version
76
+ is what the handshake announces.
77
+
78
+ ### Wider surface — four tools added
79
+
80
+ - **`stage_strategy_plan({ request: { planToken } })`** writes a compiled plan's own changed axes
81
+ into the owner's draft. It commits nothing and does **not** spend the plan, so the same token is
82
+ still directly applicable afterwards. `planToken` is the only member the request accepts.
83
+
84
+ - **`get_strategy_draft({ request: { strategyId } })`** reads one draft, or answers `{ draft: null }`
85
+ — "you are not part-way through this one" is a value, not an error. It reports `baseMoved` when the
86
+ strategy has been committed past the revision the draft was written against.
87
+
88
+ - **`list_strategy_drafts({ request: { cursor? } })`** answers "what am I part-way through?" for a
89
+ conversation holding no id. It includes a draft whose strategy you can no longer see, marked
90
+ `strategyExists: false`, because that is exactly the work a player has lost track of.
91
+
92
+ - **`discard_strategy_draft({ request: { strategyId, confirm: true } })`** destroys one draft. The
93
+ confirmation is required and unsaved values have no other copy; the strategy, its revisions and
94
+ your other drafts are untouched.
95
+
96
+ ### Refusals worth knowing before you stage
97
+
98
+ - **A staged plan refuses the axes you typed after it compiled.** `stage_strategy_plan` answers
99
+ `CONFLICT` naming `contestedAxes`, the version the plan compiled over and the draft's own version
100
+ per axis. Compile again so the plan absorbs those edits, then stage. A *previous staging* on the
101
+ same axis is not a contest — only the owner's own hand is.
102
+
103
+ - **An apply refuses a plan whose draft has moved since.** Moved, discarded and
104
+ already-committed-by-a-sibling are one answer with one recovery: compile again.
105
+
106
+ ### Vocabulary
107
+
108
+ `toolCount` 118 → 122. No input or output schema of an existing tool moves — the draft version a
109
+ plan was compiled over rides inside the opaque plan token, which no schema declares.
110
+
27
111
  ## Contract history — v61
28
112
 
29
113
  One part to read first: **the per-condition evidence clock is gone**, and what replaced it is not a
package/SKILL.md CHANGED
@@ -57,14 +57,16 @@ than about authoring:
57
57
 
58
58
  - **The envelope is `{ request }`, or `{ account, request }` on a multi-account proxy** (see above).
59
59
  It applies to `get_strategy_section_template`, `update_strategy_signal_rule`,
60
- `compile_strategy_plan` and `apply_strategy_plan`.
60
+ `compile_strategy_plan`, `apply_strategy_plan` and `stage_strategy_plan`.
61
61
  - **`planToken` is opaque and is forwarded byte-for-byte.** Never retype, paraphrase, abbreviate or
62
62
  rebuild it from memory — the proxy passes the bytes through unchanged, and a mangled token
63
63
  addresses no approved plan and is refused. It lives five minutes.
64
64
  - **`apply_strategy_plan` carries no `plan` member.** One is rejected as an unknown key: the server
65
65
  reads back the plan its own compile approved, so nothing is copied out of the compile response and
66
66
  nothing can be truncated or half-reconstructed in transit. Send
67
- `{ request: { planToken, confirm: true } }` and nothing else.
67
+ `{ request: { planToken, confirm: true } }` and nothing else. **`stage_strategy_plan` is the same
68
+ shape with the token alone** — it puts the plan into the player's unsaved draft for them to review
69
+ in the builder, commits nothing, and leaves the token still applicable.
68
70
 
69
71
  Agents bind to a strategy at creation (`create_intelligence_agent({ …, modelId, strategyId })`);
70
72
  there is no direct strategy-creation tool. **`battlegrid-agent-management`** carries commissioning,
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.34";
52
+ export declare const PACKAGE_VERSION = "31.2.36";
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.34';
55
+ export const PACKAGE_VERSION = '31.2.36';
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.34",
4
- "description": "BattleGrid MCP server — play crypto prediction games from AI agents",
3
+ "version": "31.2.36",
4
+ "description": "BattleGrid MCP server \u2014 play crypto prediction games from AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {