@battlegrid/mcp-server 32.0.40 → 32.0.43

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
@@ -38,6 +38,70 @@ Seeing package `31.x` alongside handshake `battlegrid@33.x` — the package **be
38
38
 
39
39
  **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.
40
40
 
41
+ ## Contract history — v137.3 (the bar's traded notional in USD)
42
+
43
+ **Additive at v137.3: three metrics and one chart-axis family.** v137.3 is the contract on top of v137.2. Nothing a client
44
+ sends is refused that v137.2 accepted. Reconnect the proxy, or restart it, so discovery reads the widened vocabulary.
45
+
46
+ ### Widened input — new metrics
47
+
48
+ - **`QUOTE_VOL`** (`quoteVol`): the bar's traded notional in USD, the sum of each trade's price × size from the live tape.
49
+ - **`BUY_QUOTE_VOL` and `SELL_QUOTE_VOL`** (`buyQuoteVol`, `sellQuoteVol`): the same, per taker side. The total is
50
+ always the two sides added.
51
+ - **Each ranks exchange-wide**: one dollar is one dollar on every coin. The metric-key enum and the ranked-metric enum
52
+ widen on every input and output that carries them.
53
+ - **A bar holding a minute the live tape did not cover reads each one absent, never zero.** An MDS restart opens such a
54
+ minute, so the bars around one read absent for now.
55
+
56
+ ### Widened output enum
57
+
58
+ - **The chart-axis family gains `notional`**, the three metrics' own scale, on the output that carries it
59
+ (`get_agent_coin_qualification`'s `axisFamily`).
60
+
61
+ ### Digest move
62
+
63
+ - **`vocabularyDigest` and the authoring catalog digest move** with the three metrics. A client caching vocabulary
64
+ against either re-reads `list_strategy_vocabulary`.
65
+
66
+ ## Contract history — v137.2 (the anchored VWAP family with σ bands, and week and month profiles)
67
+
68
+ **Additive at v137.2: sixty-six metrics and five studies, one value withdrawn, and the metric vocabulary named once per
69
+ schema.** v137.2 is the contract on top of v137.1. Nothing a client sends is refused that v137.1 accepted. Reconnect the
70
+ proxy, or restart it, so discovery reads the widened vocabulary.
71
+
72
+ ### Widened input — new metrics and studies
73
+
74
+ - **The anchored VWAP family**, each computed over the column's own timeframe as TradingView's `ta.vwap(hlc3)` computes it
75
+ on that chart: `VWAP_WEEK` (`vwapW`, from Monday 00:00 UTC), `VWAP_MONTH` (`vwapM`), `VWAP_TRADING_SESSION` (`vwapTs`),
76
+ `VWAP_ROLLING_1H`, `VWAP_ROLLING_4H` and `VWAP_ROLLING_24H` (`rvwap1h`, `rvwap4h`, `rvwap24h`), and `VWAP_SWING_HIGH`
77
+ and `VWAP_SWING_LOW` (`avwapSwHi`, `avwapSwLo`, anchored at the latest decided swing pivot).
78
+ - **±1/2/3σ bands** `<LINE>_UB1..3` and `<LINE>_LB1..3` on `VWAP` and on each of the six new calendar and rolling lines
79
+ (42 metrics): `line ± k·σ`, with σ the volume-weighted standard deviation over the same bars. Each takes every transform
80
+ a price level takes, `levelInteraction` included.
81
+ - **Week and month profiles**, summed from each period's UTC-day profiles on one grid: `WEEK_TPO_POC`/`VAH`/`VAL` and
82
+ `MONTH_TPO_POC`/`VAH`/`VAL` (the current period), `PRIOR_WEEK_TPO_*` and `PRIOR_MONTH_TPO_*`, and the previous
83
+ completed period's high and low, `PWH`/`PWL` and `PMH`/`PML`. A prior level read across its period's roll is absent.
84
+ - **The studies** `vwap`, `weekProfile`, `priorWeek`, `monthProfile` and `priorMonth` join the vocabulary. The metric-key
85
+ enum widens on every input and output that carries it.
86
+ - **Ranking.** The eight new VWAP lines rank exchange-wide by distance; the bands do not.
87
+
88
+ ### Changed values — the same schema serves a different number
89
+
90
+ - **`VWAP` on `1d` reads null.** A UTC-day VWAP on a bar as long as the UTC day is only that bar's own typical price. On
91
+ every other timeframe `VWAP` is unchanged. Each anchored line is likewise absent on a timeframe whose bar is as long as
92
+ its anchor's period.
93
+
94
+ ### Schema respelling
95
+
96
+ - **The metric vocabulary is one named shape, `metricKey`**, published once in each schema's root `$defs` and referenced
97
+ as `#/$defs/metricKey` wherever a metric is named, where it was inlined at each site. What a schema accepts does not
98
+ move; every authoring schema shrinks. `toolCount` stays 149.
99
+
100
+ ### Digest move
101
+
102
+ - **`vocabularyDigest` and the authoring catalog digest move** with the sixty-six metrics and five studies. A client
103
+ caching vocabulary against either re-reads `list_strategy_vocabulary`.
104
+
41
105
  ## Contract history — v137.1 (a condition exit's evidence and slippage)
42
106
 
43
107
  **Additive at v137.1: one owner output field, and one served value moves.** v137.1 is the contract on top of v137.
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.40";
50
+ export declare const PACKAGE_VERSION = "32.0.43";
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.40';
52
+ export const PACKAGE_VERSION = '32.0.43';
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.40",
3
+ "version": "32.0.43",
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": "136.1.0",
3
+ "contractVersion": "137.2.0",
4
4
  "files": {
5
5
  "battlegrid-agent-management/SKILL.md": "91d1be4de1e33d54e1852c970af66ad176068fd16c30b4326e49053b7a35eb32",
6
6
  "battlegrid-agent-management/references/agent-stage-examples.md": "dffcc353d61dfc7b5bb6a2b3077fc6bf8c760a34c287cafb3b59b99306f24195",
@@ -18,7 +18,7 @@
18
18
  "battlegrid-strategy-examples/SKILL.md": "cbbc7a7271aaa9f530a11d91511f4bf35a9632aa3ab67ecd996975c65ae72625",
19
19
  "battlegrid-strategy-examples/references/playbooks.md": "59996c37eea08e7ce398e49304171939e55c968400a1603597d6737faf9e1771",
20
20
  "battlegrid-strategy-examples/references/recipes.md": "e1fbd1a3d1b2ef1408fef8642032c3e131954aedec6bdcefa3af6a655948e392",
21
- "battlegrid-strategy-examples/references/tradingview-ports.md": "00f2ba287ff8fadf356273f61ad19630cceb3a706018c2088be40570ff1a899d",
21
+ "battlegrid-strategy-examples/references/tradingview-ports.md": "bc63e26b16458fd17b7bc567541fc9889ee857b444ccb2d3f011545635758d8f",
22
22
  "battlegrid-trade-analysis/SKILL.md": "140d847f24e98845736d4f0c2e72b318a4d235413f72f072d2fe6d0daa5f64db",
23
23
  "battlegrid-trade-proposal/SKILL.md": "bf8f3794478cdecc989020bd775c3c91744f72b440b1a90f88f6700c9a61ca24"
24
24
  }
@@ -61,7 +61,9 @@ rules about the columns themselves, not about porting — they live in the skill
61
61
  column, never as the substitute for the gate.
62
62
  - **VWAP reversion** → `dist_VWAP` band + `dist_VWAP_rank_far lte 5` for board-relative
63
63
  stretch; required `NOT [ADX14_state in ["trending","extreme"]]` veto; scalp geometry +
64
- aggressive timeDecay (VWAP anchors daily at 00:00 UTC).
64
+ aggressive timeDecay (`VWAP` anchors daily at 00:00 UTC; `VWAP_WEEK`, `VWAP_MONTH`, `VWAP_TRADING_SESSION` and
65
+ the rolling `VWAP_ROLLING_1H`/`4H`/`24H` are the other anchors, each with ±1/2/3σ bands `_UB<k>`/`_LB<k>` — a
66
+ band-touch entry reads `CLOSE × spread(VWAP_LB2)` rather than a hand-computed σ).
65
67
  - **Donchian / Turtle breakout** (`close > ta.highest(high, 20)[1]`) → `dist_donchianHiPrior20 crossesAbove 0`
66
68
  over `DONCHIAN_UPPER_PRIOR × distance` (the breakout bar; `dist_donchianHiPrior20 gt 0` holds on every
67
69
  close of the run) + `RVOL20 gte 1.5`; turtle exits = trend preset (trail from 1R, giveback 50). Mirror with
@@ -117,8 +119,8 @@ rules about the columns themselves, not about porting — they live in the skill
117
119
  `MACD_LINE × crossDetect`, and the signal-line cross is `MACD_HIST × crossDetect`, the histogram being
118
120
  line minus signal), the 15-bar rate of change (`ROC15`), the Donchian break memory
119
121
  (`DONCHIAN_BROKEN_HI`/`DONCHIAN_BROKEN_LO`), daily pivots
120
- (`PIVOT_P`/`PIVOT_R1`–`R3`/`PIVOT_S1`–`S3`), Williams %R (`WILLR14`), Stochastic RSI
121
- (`STOCH_RSI14`), the TTM squeeze (`KC_SQUEEZE`), Connors RSI-2 (`RSI2`), the 8/9/21/50 EMAs
122
+ (`PIVOT_P`/`PIVOT_R1`–`R3`/`PIVOT_S1`–`S3`), Williams %R (`WILLR14`), Stoch RSI
123
+ (`STOCH_RSI_K`/`STOCH_RSI_D` — TradingView's "Stoch RSI" %K and %D at 3, 3, 14, 14, on 0–100), the TTM squeeze (`KC_SQUEEZE`), Connors RSI-2 (`RSI2`), the 8/9/21/50 EMAs
122
124
  (`EMA8`/`EMA9`/`EMA21`/`EMA50` — `ta.ema(close, 8)` is `EMA8`, its distance `dist_EMA8`), literal
123
125
  previous-UTC-day levels (`PDH`/`PDL`/`PDO`), fractal swing structure
124
126
  (`SWING_FRACTAL_HIGH`/`SWING_FRACTAL_LOW`/`SWING_FRACTAL_LABEL`, the prior pivots