@battlegrid/mcp-server 32.0.75 → 32.0.78

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
@@ -58,6 +58,58 @@ hash moves.
58
58
  64 `equalBars` serves up to 935 (was 467), and 799 at a cap of 200; above 200 an equal column is still refused.
59
59
  `swingLength` keeps its ceiling of 100.
60
60
 
61
+ ## Contract history — v147 to v147.2 (an arena deployment's member is chosen at the bell, agents leave Radar, an entry's fate is journaled)
62
+
63
+ **v147 is MAJOR: published results narrow for inputs v146.14 accepted, and one tool refuses a call it answered.**
64
+ v147.1 and v147.2 are MINOR. Nothing either refuses was accepted by the version before it.
65
+
66
+ ### Reshaped output — one reason v147 is MAJOR
67
+
68
+ - **A deployment resolution names its on-duty members, not one agent.** The RESOLVED arm drops `agentId`,
69
+ `agentDisplayName`, `agentAvatarUrl`, `matchedSlotPriority`, `matchedIsDefault`, `minConfidencePercent` and
70
+ `resolved` for `members`, a non-empty array of those fields: every matching rule on duty in priority order, the
71
+ default only when none matches. Which member plays is decided at the Opening Bell. This moves in
72
+ `preview_deployment_resolution`, `test_generate_deployment_grid`, `get_deployment_policy`,
73
+ `list_deployment_policies` and `get_deployment_policy_draft`.
74
+ - **A test generation reports the members it tried.** `test_generate_deployment_grid`'s RESOLVED result gains
75
+ `tried` (`agentId`, `agentDisplayName`, `admittedCount`, `gridSize`, `stoodAside` per member), and its
76
+ `generation` is null when every on-duty member stood aside.
77
+
78
+ ### New refusals — the other reason v147 is MAJOR
79
+
80
+ - **`generate_agent_grid` refuses an agent whose strategy admits too few coins.** When the strategy admits fewer
81
+ pool coins than the grid needs, the call is a `BAD_REQUEST` with details `{admittedCount, gridSize}`, and a
82
+ pending grid cached for that agent and session is discarded.
83
+ - **A draft slot naming an agent the caller cannot access is refused** by `preview_deployment_resolution` and
84
+ `test_generate_deployment_grid`, in any slot, not only the winning one.
85
+
86
+ ### Added tools — v147.1
87
+
88
+ - **`get_agent_radar_holdings`** (`mcp:read`) serves every Radar deployment of the caller that holds one agent,
89
+ enabled or paused, each with its server-decided withdraw `effect`.
90
+ - **`withdraw_agent_from_radar`** (`mcp:wager`) takes the agent off the holdings it names, each at the policy and
91
+ revision that read returned, and answers one outcome per holding.
92
+
93
+ ### Widened refusal — v147.1
94
+
95
+ - **A `CONFLICT`'s `details.reason` gains `RADAR_WITHDRAW_REFUSED`**, carried with `details.refusals`: one entry
96
+ per refused holding, with its own code and message.
97
+
98
+ ### Widened enum — `get_agent_activity_feed`'s `eventType`
99
+
100
+ - **v147 adds `GRID_STOOD_ASIDE`**: the agent's strategy admitted fewer coins than a grid needs, so it stood aside
101
+ before any spend. A `GRID_SKIPPED` row's `reason` is now a code from one closed vocabulary, not refusal text.
102
+ - **v147.2 adds `GRID_ENTRY_RESOLVED`**: settlement's later word on an agent's entry, with `metadata.resolution`
103
+ `ENTERED` (the fee confirmed after the submit returned), `RELEASED` (the entry could no longer be entered) or
104
+ `REFUND_REQUESTED` (a released entry's landed fee is being returned). A `GRID_SUBMITTED` row's `metadata` also
105
+ carries `entryStatus`: `ENTERED`, or `PAYMENT_PENDING` while the fee is still confirming.
106
+
107
+ ### Re-worded text — v147
108
+
109
+ - The `preview_deployment_resolution` and `test_generate_deployment_grid` descriptions state the on-duty set and
110
+ the member trial. `stage_strategy_draft`'s CONDITIONS axis and the strategies workflow card state that a
111
+ strategy without an entry condition never enters the arena.
112
+
61
113
  ## Contract history — v146.13 (market structure follows LuxAlgo's leg, EQH / EQL read `true`)
62
114
 
63
115
  **Nothing refused at v146.13 that v146.12 accepted at the shipped lookback cap.** One MINOR moves served values
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.75";
50
+ export declare const PACKAGE_VERSION = "32.0.78";
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.75';
52
+ export const PACKAGE_VERSION = '32.0.78';
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.75",
3
+ "version": "32.0.78",
4
4
  "description": "BattleGrid MCP server — play crypto prediction games from AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "generator": "battlegrid-app/server/scripts/export-mcp-skills.mjs",
3
- "contractVersion": "147.0.0",
3
+ "contractVersion": "147.2.0",
4
4
  "files": {
5
5
  "battlegrid-agent-management/SKILL.md": "324ef8181bfcfc99b955d9644ed543c6ab91071153d43f77ccf0a4979b896b09",
6
6
  "battlegrid-agent-management/references/agent-stage-examples.md": "dffcc353d61dfc7b5bb6a2b3077fc6bf8c760a34c287cafb3b59b99306f24195",
@@ -10,7 +10,7 @@
10
10
  "battlegrid-officers/SKILL.md": "0ac2173d0026b7329171fe24d38185e7717196340778d402c7af1aa74ea34bc8",
11
11
  "battlegrid-officers/references/officer-stage-examples.md": "ef46ba26f4b36c9964b5bde95fdf98e5952c3786b77be5f136056cac792f0aec",
12
12
  "battlegrid-onboarding/SKILL.md": "e6b078cfdf13f6c66d2d964d2c0e6b9635f26adb164a8e0914849ef5671b9e3b",
13
- "battlegrid-radar-deployment/SKILL.md": "ef291ec096461ed2b78915adbfa41000b959b5803ae4ebef3084bff4c1e1a746",
13
+ "battlegrid-radar-deployment/SKILL.md": "cf0eeaf9408ad57867415370872c1308b8ebdb9e8c73c0c6d2e34b6caef5599f",
14
14
  "battlegrid-radar-deployment/references/arena-stage-examples.md": "65af54b67c3248c53fb8911df769ad32824e1f1f1d83ffc007b42a888d5e3076",
15
15
  "battlegrid-radar-deployment/references/radar-stage-examples.md": "7a4195011aa764b106567606f7a2a8ae8e9b2bf74c36b3c74a72379969d70af8",
16
16
  "battlegrid-strategy-authoring/SKILL.md": "43b6b41e605096ca5db06417961436fd62d7e96cb80a931581910c4a23c1878d",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: battlegrid-radar-deployment
3
- description: Deploy the player's agents to standing duty — Radar deployments, each one team's watch on one coin, that put every matching rule's agent on duty and fire real trades at confirmed closes, and per-preset Arena deployment policies that enter sessions automatically. Reads what is deployed now, stages a change into the player's draft, previews what it would actually resolve to, commits it only after the player has seen that preview, and un-deploys with the blast radius stated. Activate whenever the player wants an agent put on duty, wants to change or pause a deployment, asks what would fire right now or why nothing is firing, or wants to stop a coin or a preset being traded automatically.
3
+ description: Deploy the player's agents to standing duty — Radar deployments, each one team's watch on one coin, that put every matching rule's agent on duty and fire real trades at confirmed closes, one agent onto several coins at once, and per-preset Arena deployment policies that enter sessions automatically. Reads what is deployed now, stages a change into the player's draft, previews what it would actually resolve to, commits it only after the player has seen that preview, and un-deploys with the blast radius stated. Activate whenever the player wants an agent put on duty, wants to change or pause a deployment, asks what would fire right now or why nothing is firing, wants to stop a coin or a preset being traded automatically, or wants an agent taken off the radar — including when an archive or delete is refused for RADAR_DEPLOYED.
4
4
  ---
5
5
 
6
6
  # Radar & Deployment
@@ -167,6 +167,25 @@ When the ask maps to no single row, or a refusal rules out the construction the
167
167
  ask the player which construction they mean, naming the rows that fit — never stage one they did not
168
168
  choose. Complete stage payloads for every row are in `references/radar-stage-examples.md`.
169
169
 
170
+ **One agent onto several Radar coins** — when the player wants the same agent on more than one coin,
171
+ always on or under one rule. Never stage it coin by coin: one preview and one write cover every coin,
172
+ on the team the agent trades on (the preview names it; there is no `teamId` to pass).
173
+
174
+ 1. `preview_agent_radar_deploy({ agentId, slot, coinIds })`, with `slot` either
175
+ `{ kind: "DEFAULT", minConviction }` (always on: the agent is on duty whenever no rule matches) or
176
+ `{ kind: "RULE", minConviction, conditions }` (one rule, conditions shaped as a staged rule's), and
177
+ `coinIds` resolved through the coin-metadata read. It writes nothing. Each coin is `PLACED` with its
178
+ served `placement`, rule `priority` and `enabledAfterCommit`, or `REFUSED` with the reason a Save of
179
+ that coin would give; `admission` is the plan's coin cap for the new coins.
180
+ 2. Read every coin's placement — never work it out yourself:
181
+ - `FIRST_DEPLOYMENT`: a new, active deployment holding just this slot;
182
+ - `ADD_DEFAULT`: the coin had no default, so the agent now covers the windows it sat out;
183
+ - `APPEND_RULE`: one rule below the coin's existing rules — **while it matches, the coin's default
184
+ is off duty**; name that default by `defaultAgentDisplayName` when it is non-null.
185
+ A coin refused for "already has a default" can still take the agent as a rule: offer that as a
186
+ second preview, never silently.
187
+ 3. Confirm as step 3 says for a batch, then one `deploy_agent_to_radar({ agentId, slot, coins })`.
188
+
170
189
  **Arena** — the same shape, keyed on `presetId`:
171
190
 
172
191
  1. `stage_deployment_policy_draft` with `draftVersion` = the `version` you read (0 when there was no
@@ -298,6 +317,17 @@ Then:
298
317
  reports beforehand.
299
318
  - **Arena** → `commit_deployment_policy_draft({ presetId, draftVersion, expectedRevision })`,
300
319
  the same way.
320
+ - **One agent onto several Radar coins** → the confirmation groups the coins by served placement and
321
+ names every coin, with its priority and whether it will trade (a paused coin stays paused); how duty
322
+ moves on each `APPEND_RULE` and `ADD_DEFAULT` coin, naming the default's holder; every refused coin
323
+ with its reason; and the `admission`. When `admission.fits` is false, do not offer the deploy: the
324
+ player drops new coins and you preview again. On an explicit confirming pick, call
325
+ `deploy_agent_to_radar({ agentId, slot, coins })` with the same `slot`, naming **only the PLACED
326
+ coins**, each with the `expectedPolicyId` and `expectedRevision` the preview returned (both null for a
327
+ coin with no policy). A refusal whose `details.reason` is `RADAR_DEPLOY_REFUSED` wrote **nothing**:
328
+ report each of `details.refusals`, then preview and confirm again. Otherwise there is one outcome per
329
+ coin; a `CONFLICT` outcome is a coin that changed after the check and is unchanged — name it and
330
+ offer a fresh preview, never a blind retry.
301
331
 
302
332
  **On `DRAFT_VERSION_MOVED` or a CONFLICT: re-read, re-preview, re-confirm.** In that order, and all
303
333
  three. The draft or the deployment changed under you, so the state your preview resolved and the
@@ -348,6 +378,30 @@ an explicit confirming pick.
348
378
  `pause_radar_deployment` for Radar and `pause_deployment_policy` for Arena. Offer that
349
379
  whenever the ask sounds like "pause", "stop for now", or "take it off duty for a while".
350
380
 
381
+ **Take one agent off the radar** — when the player wants an agent off its coins, or the agent's
382
+ archive or delete is refused with a `RADAR_DEPLOYED` blocker. Never do it coin
383
+ by coin through stage, commit or delete: one read and one write cover every coin.
384
+
385
+ 1. `get_agent_radar_holdings({ agentId })` — every deployment holding the agent, **paused ones
386
+ included**: exactly what the archive refusal counts.
387
+ 2. Show every holding — its coin, team, whether it is paused — with its served `effect`, never one you
388
+ work out:
389
+ - `UNDEPLOY`: the agent holds every slot, so the coin is un-deployed, and its unsaved draft ends;
390
+ - `REMOVE_SLOTS`: the agent's rules go, and **the coin's remaining rules and default take duty in the
391
+ windows those rules held** — say so, because another agent may then trade there;
392
+ - `REMOVE_DEFAULT`: the agent's default goes with it; only other agents' rules stay, and the coin
393
+ sits out whenever none matches.
394
+ 3. Confirm with `ask_user`, letting the player leave coins out.
395
+ 4. One `withdraw_agent_from_radar({ agentId, holdings })`, naming each confirmed holding as the read
396
+ returned it: `teamId`, `coinId`, its `policyId` as `expectedPolicyId` and its `revision` as
397
+ `expectedRevision`.
398
+
399
+ A refusal whose `details.reason` is `RADAR_WITHDRAW_REFUSED` wrote **nothing**: report each of
400
+ `details.refusals` — its coin and why — and do not call again without a fresh read and a fresh confirm.
401
+ Otherwise there is one outcome per holding. A `CONFLICT` outcome is a coin that changed after the check
402
+ and is unchanged: name it and offer to read the holdings again — never call the withdraw again
403
+ unprompted. After a refused archive, archive again only on the player's word.
404
+
351
405
  ### 5. "Why isn't it firing?" — state, then pattern, then the bar, then rows
352
406
 
353
407
  Four reads, cheapest first. Stop as soon as the player's question is answered.