@battlegrid/mcp-server 31.2.71 → 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 +152 -0
- package/SKILL.md +9 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,6 +24,158 @@ 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
|
+
|
|
119
|
+
## Contract history — v90 (Arena and radar deployments join the draft lifecycle)
|
|
120
|
+
|
|
121
|
+
**Breaking at v90: input is refused and reshaped, output is reshaped, five error codes are removed.** v90 is the
|
|
122
|
+
contract on top of v89. The Arena and radar deployment drafts now run the same five-tool lifecycle as agents and
|
|
123
|
+
strategies, and the preview token is retired: a deployment commits on the draft version and the revision you read.
|
|
124
|
+
|
|
125
|
+
### Rejected input — something you send is no longer accepted
|
|
126
|
+
|
|
127
|
+
- **`previewToken` and `confirm`** leave `commit_deployment_policy_draft`, `commit_radar_deployment_draft`,
|
|
128
|
+
`resume_deployment_policy` and `resume_radar_deployment`.
|
|
129
|
+
- **`confirm`** leaves `delete_deployment_policy`, `delete_radar_deployment`, `discard_deployment_policy_draft` and
|
|
130
|
+
`discard_radar_deployment_draft`.
|
|
131
|
+
- Every input is strict, so a call naming either key is refused as an unrecognised key.
|
|
132
|
+
|
|
133
|
+
### Reshaped input
|
|
134
|
+
|
|
135
|
+
- **The commits** take `{ request: { presetId | coinId, draftVersion, expectedRevision } }`: exactly the
|
|
136
|
+
`draftVersion` and `committedRevision` the kind's `get_*_draft` returned (`expectedRevision: null` for a first
|
|
137
|
+
deployment).
|
|
138
|
+
- **The resumes** take `{ presetId | coinId, expectedPolicyId, expectedRevision }`: the `policyId` and `revision` a
|
|
139
|
+
`COMMITTED` preview returned. Any other deployment or revision is a `CONFLICT`, and nothing is armed.
|
|
140
|
+
- **`delete_radar_deployment`** gains `expectedPolicyId` beside `expectedRevision`, as `delete_deployment_policy`
|
|
141
|
+
already took. A delete naming a policy since removed and redeployed matches nothing.
|
|
142
|
+
- **The discards** take `{ request: { presetId | coinId, draftVersion } }` with no dry run. A draft that moved, or
|
|
143
|
+
none, is `DRAFT_VERSION_MOVED`.
|
|
144
|
+
|
|
145
|
+
### Reshaped output — something you read has a new shape
|
|
146
|
+
|
|
147
|
+
- **`stage_deployment_policy_draft` and `stage_radar_deployment_draft`** gain `diagnostics`.
|
|
148
|
+
- **`get_deployment_policy_draft` and `get_radar_deployment_draft`** answer the lifecycle read
|
|
149
|
+
`{ draft, draftVersion, committedRevision, diff, diagnostics, impact }`, where they answered `{ draft }`. `impact`
|
|
150
|
+
is the resolution the commit would arm and whether it plays (`enabledAfterCommit`), plus a radar first
|
|
151
|
+
deployment's coin-cap reading (`admission`); it is null when a diagnostic refuses.
|
|
152
|
+
- **The commits** answer `{ presetId | coinId, revision, draftVersion }`. The radar commit answered `{ revision }`.
|
|
153
|
+
- **The discards** answer `discarded: true`, never `false`.
|
|
154
|
+
- **`preview_deployment_resolution` and `preview_radar_resolution`** lose `previewToken` and gain `policyId` and
|
|
155
|
+
`revision`: the deployment the preview resolved over, null for `SLOTS` and a first deployment.
|
|
156
|
+
|
|
157
|
+
### Removed error codes
|
|
158
|
+
|
|
159
|
+
`TOKEN_EXPIRED`, `TOKEN_BINDING_MISMATCH`, `INVALID_TOKEN_SIGNATURE`, `INVALID_TOKEN_FORMAT` and `INVALID_TOKEN_CLAIMS`
|
|
160
|
+
leave the error vocabulary and every draft diagnostic's code enum — so the stage and get outputs of the agent and
|
|
161
|
+
strategy drafts move too.
|
|
162
|
+
|
|
163
|
+
### Behaviour behind the new schemas
|
|
164
|
+
|
|
165
|
+
- **A retried commit replays its receipt.** Both commits are destructive and idempotent on
|
|
166
|
+
`<presetId | coinId>:<draftVersion>`, as the agent and strategy commits are.
|
|
167
|
+
- **Refusals name the next act.** A moved draft or revision carries `details.nextAct: "get_draft"`; a refusal the
|
|
168
|
+
draft can repair (`INVALID_DEPLOYMENT_POLICY`, or the radar's `VALIDATION_ERROR`) carries `"stage"`; a retired arena
|
|
169
|
+
carries none and names the remedy.
|
|
170
|
+
- **A revision conflict names the revision that won** in `details.actualRevision`, null when no deployment remains.
|
|
171
|
+
- **A `DRAFT` preview at a version the draft is not at** is `DRAFT_VERSION_MOVED`.
|
|
172
|
+
- **A draft whose arena or coin can no longer be deployed is still served**, with the refusal in its diagnostics and
|
|
173
|
+
a null impact, so you can show it and discard it.
|
|
174
|
+
- **A radar resume of a policy already trading** answers its revision and changes nothing.
|
|
175
|
+
- **The radar per-user coin cap is `FORBIDDEN`**, with no `nextAct`, where it was `VALIDATION_ERROR`.
|
|
176
|
+
|
|
177
|
+
Something accepted at v89 is refused at v90 — hence the MAJOR.
|
|
178
|
+
|
|
27
179
|
## Contract history — v89 (a new strategy is held to today's operator bounds)
|
|
28
180
|
|
|
29
181
|
**Breaking at v89: acceptance narrows behind unchanged schemas.** v89 is the contract on top of v88.1.
|
package/SKILL.md
CHANGED
|
@@ -58,15 +58,19 @@ than about authoring:
|
|
|
58
58
|
|
|
59
59
|
- **The envelope is `{ request }`, or `{ account, request }` on a multi-account proxy** (see above).
|
|
60
60
|
It applies to every draft lifecycle tool and to `get_strategy_section_template`.
|
|
61
|
-
- **Every change goes through the entity's draft
|
|
62
|
-
draftVersion, axes } })` writes proposed axes
|
|
63
|
-
|
|
61
|
+
- **Every change goes through the entity's draft** — an agent's, a strategy's, and an Arena or radar
|
|
62
|
+
deployment's. `stage_<kind>_draft({ request: { <id>?, draftVersion, axes } })` writes proposed axes
|
|
63
|
+
into the player's unsaved draft and commits nothing. For an agent or a strategy, omit the id to open a
|
|
64
|
+
new create draft, whose minted id the response carries; a deployment draft is keyed by its `presetId`
|
|
65
|
+
or `coinId`, which every call names.
|
|
64
66
|
`get_<kind>_draft({ request: { <id> } })` returns the draft, its `draftVersion`, the live
|
|
65
67
|
`committedRevision`, a per-axis `diff`, `diagnostics` and `impact`.
|
|
66
68
|
- **A commit names exactly the two numbers that read returned.**
|
|
67
69
|
`commit_<kind>_draft({ request: { <id>, draftVersion, expectedRevision } })` — `expectedRevision`
|
|
68
70
|
is `null` for an entity not created yet. Commit only after the player has seen the diff and impact
|
|
69
|
-
and said yes. `discard_<kind>_draft({ request: { <id>, draftVersion } })` is the same fence.
|
|
71
|
+
and said yes. `discard_<kind>_draft({ request: { <id>, draftVersion } })` is the same fence. The two
|
|
72
|
+
deployment commits arm wagers and require `mcp:wager`; a deployment's resume and delete name the
|
|
73
|
+
`expectedPolicyId` and `expectedRevision` a `COMMITTED` preview returned.
|
|
70
74
|
- **The proxy forwards numbers and `null` unchanged.** It never fills in a version, never retries a
|
|
71
75
|
refused call and never rebuilds a request. A `DRAFT_VERSION_MOVED` or `DRAFT_AXIS_CONTESTED` refusal
|
|
72
76
|
carries `details.nextAct` from every tool, and a revision `CONFLICT` or validation refusal carries it
|
|
@@ -89,7 +93,7 @@ The `play-market-grid` prompt (discover via `prompts/list`) provides a guided en
|
|
|
89
93
|
|
|
90
94
|
## Retired operations
|
|
91
95
|
|
|
92
|
-
`create_strategy`, the plan tools (`compile_strategy_plan`, `stage_strategy_plan`, `apply_strategy_plan`), `update_strategy_signal_rule`, and the direct agent writers (`create_intelligence_agent`, `update_intelligence_agent`, `rebind_intelligence_agent`) are **retired** — they are absent from discovery and cannot be invoked. Stage into the entity's draft, read it back, and commit the version you read; a signal rule is a row of the strategy draft's `SIGNAL_RULES` axis, and a strategy binding is the agent draft's `STRATEGY_BINDING` axis. Do not attempt flat legacy payloads; the server enforces a closed-world request root and the proxy never reconstructs them.
|
|
96
|
+
`create_strategy`, the plan tools (`compile_strategy_plan`, `stage_strategy_plan`, `apply_strategy_plan`), `update_strategy_signal_rule`, and the direct agent writers (`create_intelligence_agent`, `update_intelligence_agent`, `rebind_intelligence_agent`) are **retired** — they are absent from discovery and cannot be invoked. Stage into the entity's draft, read it back, and commit the version you read; a signal rule is a row of the strategy draft's `SIGNAL_RULES` axis, and a strategy binding is the agent draft's `STRATEGY_BINDING` axis. A deployment preview's `previewToken`, and the `confirm` on a deployment commit, resume, delete or draft discard, are retired the same way: a strict input refuses either key. Do not attempt flat legacy payloads; the server enforces a closed-world request root and the proxy never reconstructs them.
|
|
93
97
|
|
|
94
98
|
## Common errors
|
|
95
99
|
|
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.
|
|
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.
|
|
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];
|