@battlegrid/mcp-server 32.0.31 → 32.0.32

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/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.31";
50
+ export declare const PACKAGE_VERSION = "32.0.32";
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.31';
52
+ export const PACKAGE_VERSION = '32.0.32';
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.31",
3
+ "version": "32.0.32",
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": "135.0.0",
3
+ "contractVersion": "135.1.0",
4
4
  "files": {
5
5
  "battlegrid-agent-management/SKILL.md": "91d1be4de1e33d54e1852c970af66ad176068fd16c30b4326e49053b7a35eb32",
6
6
  "battlegrid-agent-management/references/agent-stage-examples.md": "dffcc353d61dfc7b5bb6a2b3077fc6bf8c760a34c287cafb3b59b99306f24195",
@@ -9,16 +9,16 @@
9
9
  "battlegrid-market-analysis/SKILL.md": "fcbe98e30e1edce39bb170c224cdf20181934f62b5f3a26b293787c70eeb6229",
10
10
  "battlegrid-officers/SKILL.md": "0e5b4fd7a11fc1b6643eecd0008dfe1528b915ee00d0a99be9aca1e3934d57f7",
11
11
  "battlegrid-officers/references/officer-stage-examples.md": "ef46ba26f4b36c9964b5bde95fdf98e5952c3786b77be5f136056cac792f0aec",
12
- "battlegrid-radar-deployment/SKILL.md": "42900772033d799ce8eeeea9a433d76dd54fb5b153c83951753f73859dcfc021",
12
+ "battlegrid-radar-deployment/SKILL.md": "cd058d887e1342f42ce855708178d5f746400835a204e92238b63ec1fe57bf30",
13
13
  "battlegrid-radar-deployment/references/arena-stage-examples.md": "d27cfed1f4663f267c4a7ecebe4a6e65a450fc74bd14ce8987fb61af5bbf2ca5",
14
14
  "battlegrid-radar-deployment/references/radar-stage-examples.md": "13fc3f55d91d3da9754e1ed7fb27493b7b7ba4d40a6a7e8d1ee0365f90ea10de",
15
15
  "battlegrid-strategy-authoring/SKILL.md": "e2422b0e02de6d240bbab261ed1181b32d175bf877f499d7df556eca31ce5133",
16
16
  "battlegrid-strategy-authoring/references/strategy-stage-examples.md": "f10ecdc91f3660a708eee7a7bacefce2acbb46c9cf7e0ac1454bd54f839f39fd",
17
17
  "battlegrid-strategy-doctor/SKILL.md": "24c2208cf6832f1fc34e1b1c52acd8dae10f56b9860aaf27b450a62a9fb74634",
18
- "battlegrid-strategy-examples/SKILL.md": "0f652d0944b67bc8798d72779e98549ebbf5a3f183b16f1a79a549e6bb96e174",
18
+ "battlegrid-strategy-examples/SKILL.md": "cbbc7a7271aaa9f530a11d91511f4bf35a9632aa3ab67ecd996975c65ae72625",
19
19
  "battlegrid-strategy-examples/references/playbooks.md": "59996c37eea08e7ce398e49304171939e55c968400a1603597d6737faf9e1771",
20
20
  "battlegrid-strategy-examples/references/recipes.md": "95966649a68ec488a232b150328d94e9f80c45eff30be4da92caf305fba20fb0",
21
- "battlegrid-strategy-examples/references/tradingview-ports.md": "de7be328c5cfada8fde700793b0c1c095a6660d9bf240cb57fe0026fcb56fea8",
21
+ "battlegrid-strategy-examples/references/tradingview-ports.md": "00f2ba287ff8fadf356273f61ad19630cceb3a706018c2088be40570ff1a899d",
22
22
  "battlegrid-trade-analysis/SKILL.md": "140d847f24e98845736d4f0c2e72b318a4d235413f72f072d2fe6d0daa5f64db",
23
23
  "battlegrid-trade-proposal/SKILL.md": "bf8f3794478cdecc989020bd775c3c91744f72b440b1a90f88f6700c9a61ca24"
24
24
  }
@@ -127,6 +127,10 @@ from what the player asked for:
127
127
  | only in named hours and days | a rule with an hours condition |
128
128
  | in named regimes during named hours | a rule with one hours condition and one regime condition |
129
129
 
130
+ Radar's market hours answer *when may this agent trade*, and shift with daylight saving; a strategy's
131
+ `TRADING_SESSION` condition answers *which session is this bar in*, over fixed UTC windows — the two are
132
+ different questions, and a player asking for one is not asking for the other.
133
+
130
134
  When the player names an exchange session — New York, the New York open, London, the London open,
131
135
  the London–New York overlap, Tokyo, the Tokyo open — call `get_radar_market_hours` and stage that session's `hours`
132
136
  exactly as served, merged with any other session they name; never work session hours out yourself,
@@ -82,20 +82,30 @@ add. Either way you never invent one. To section-qualify a duplicated header, re
82
82
  `detail: "detailed"` preview's `authoring.conditionColumns` or from the qualified candidates a
83
83
  `CONDITION_COLUMN_AMBIGUOUS` refusal offers.
84
84
 
85
+ **A session window is an ordinary condition.** `TRADING_SESSION` (`asia` 00–08, `london` 08–13,
86
+ `newYork` 13–21, `late` 21–24 UTC) and `DAY_OF_WEEK` (0 = Sunday … 6 = Saturday, UTC) are bar facts of the
87
+ bar's open, fixed in UTC with no daylight-saving rule — their glosses state the windows. A weekday London
88
+ or New York window is `ALL(TRADING_SESSION in ["london","newYork"], DAY_OF_WEEK between 1 and 5)`, and a
89
+ weekend is `NOT(DAY_OF_WEEK between 1 and 5)`; no strategy setting expresses one.
90
+
85
91
  **Event columns print only on their event.** `MACDhist_cross` and `EMA5_13` (Bullish/Bearish) carry a
86
92
  value on the crossing bar and are null on every other one, and a null reads FALSE. Use an event
87
93
  column as a TRIGGER inside a carrier, and pair it with a persistent state — a spread sign,
88
94
  `MAalign` — for regime. A condition that treats an event column as a standing state reads FALSE on
89
95
  nearly every bar, so it is TRUE only on the crossing bar itself.
90
96
 
91
- **The previous-session levels are TIMELESS.** `PDH`, `PDL`, `PDO` and the seven floor pivots
92
- (`pivotP`, `pivotR1`–`R3`, `pivotS1`–`S3`) read the session profile, not a candle rung, so they take
97
+ **The previous-UTC-day levels are TIMELESS.** `PDH`, `PDL`, `PDO` and the seven floor pivots
98
+ (`pivotP`, `pivotR1`–`R3`, `pivotS1`–`S3`) read the UTC-day profile, not a candle rung, so they take
93
99
  no timeframe reference at all: bind them `{rel: 'anchor'}` — the default — and they serve the same
94
- previous UTC session from any anchor. An absolute reference is REFUSED at save, including `1d`,
100
+ previous UTC day from any anchor. The trading-session levels (`asiaHi`, `pLondonHi`, `nyOpen`, …) read
101
+ the trading-session profile the same way, each session fixed in UTC with the window its label names. An
102
+ absolute reference is REFUSED at save, including `1d`,
95
103
  because there is no rung for one to select. They are catalogued price levels, so `dist_PDH gte 0`
96
104
  composes directly. (`distance` still rejects an `offset`, and a clause still compares a column
97
105
  with a literal or with its own previous completed bar, never with another column; neither of those
98
- shapes is what a previous-session level needed.) The same holds
106
+ shapes is what a previous-UTC-day level needed.) A `spread` of a bar's own value against one of these
107
+ levels reads `null` on a bar outside the UTC day (or trading session) the level belongs to, so the first
108
+ bars after 00:00 UTC are never measured against the next day's level. The same holds
99
109
  for every timeless metric — these levels, funding, the regime and the other bundle
100
110
  reads: a `value` column over one accepts only `offset: 0`, and a larger offset is REFUSED at save,
101
111
  because there is no earlier bar to cut back to.
@@ -397,7 +407,7 @@ below when it closed at or under it. For a level computed from its own bar (a ba
397
407
  average, `ST_LINE`, `PSAR`, the Ichimoku conversion and base lines) that is the prior bar's level, so a
398
408
  level that moved between the two bars is judged on the bar it stood at; for a level whose price was fixed
399
409
  before the bar (a prior-bar Donchian rail, the break memory, a swing level, the displaced Ichimoku lines, a
400
- prior-session level or pivot) it is the bar's own level. From below: a bar that closes through the level is a break and reads `none`; a bar whose high
410
+ prior-UTC-day or previous trading-session level or pivot) it is the bar's own level. From below: a bar that closes through the level is a break and reads `none`; a bar whose high
401
411
  reached the level and whose close came back under it is `reject_from_below`; a bar whose high came
402
412
  within the buffer of the level is `touch_from_below`. From above is the mirror on the low.
403
413
 
@@ -414,12 +424,15 @@ within the buffer of the level is `touch_from_below`. From above is the mirror o
414
424
  `VWAP`, a moving average (`SMA20`, `EMA20`, …), `ST_LINE`, `PSAR`, the prior-bar Donchian rails
415
425
  (`DONCHIAN_UPPER_PRIOR`, `DONCHIAN_LOWER_PRIOR`), the Donchian break memory (`DONCHIAN_BROKEN_HI`,
416
426
  `DONCHIAN_BROKEN_LO`), the Ichimoku lines, the swing levels (`SWING_FRACTAL_HIGH`,
417
- `SWING_FRACTAL_LOW`) — reads its own value at each bar. A prior-session level or pivot (`PDH`, `PDL`,
418
- `PDO`, `PIVOT_P`, `PRIOR_TPO_POC`, …) has one reading for the session; a clause over it is a single
419
- read with no hold, because the session profile keeps no earlier reading. On `PSAR` a wick that
427
+ `SWING_FRACTAL_LOW`) — reads its own value at each bar. A prior-UTC-day level or pivot (`PDH`, `PDL`,
428
+ `PDO`, `PIVOT_P`, `PRIOR_TPO_POC`, …) or a previous trading-session level (`PRIOR_LONDON_HIGH`, …) has
429
+ one reading for its UTC day or session; a clause over it is a single read with no hold, because the
430
+ profile keeps no earlier reading, and on a bar outside that day or session it reads `null`, so the
431
+ day's last bar is never classified against the next day's level. On `PSAR` a wick that
420
432
  trades through the SAR flips it on that bar, so a rejection needs the low (high) to meet the SAR
421
433
  exactly and a touch needs a buffer; its flip is `dist_PSAR crossesAbove 0` / `crossesBelow 0`.
422
- - **Not offered:** a developing-session level (`TPO_POC`, `TPO_VAH`, …), the naked points of
434
+ - **Not offered:** a developing-UTC-day level (`TPO_POC`, `TPO_VAH`, …), the current trading
435
+ session's levels, the opening ranges and the IB extensions, the naked points of
423
436
  control and the single prints (`TPO_SINGLE_PRINT_ABOVE`/`_BELOW`, `NAKED_SINGLE_PRINT_ABOVE`/`_BELOW`),
424
437
  which move between bars with no earlier reading kept; and the same-bar Donchian rails
425
438
  (`DONCHIAN_UPPER`, `DONCHIAN_LOWER`), each the extreme of the window ending at the very bar it would
@@ -26,7 +26,7 @@ the thing itself. Most TV strategies run on the daily chart: carry that with the
26
26
  daily-strategy pattern above (pinned-1d thesis with `"bars": "closed"` at offset 0 on an intraday anchor), which
27
27
  binds decisions to daily closes while the studio keeps managing risk intraday.
28
28
 
29
- Event-column behaviour, state-vs-event, previous-session-level binding and the squeeze's anchor calibration are
29
+ Event-column behaviour, state-vs-event, previous-UTC-day-level binding and the squeeze's anchor calibration are
30
30
  rules about the columns themselves, not about porting — they live in the skill body's
31
31
  `## Header grammar` and `## Conditions`. Read those first; this document is the per-script recipes.
32
32
 
@@ -72,10 +72,19 @@ rules about the columns themselves, not about porting — they live in the skill
72
72
  **Daily-breakout variant on any anchor:** pin the rail at 1d — `dist_donchianHiPrior20_1d crossesAbove 0`
73
73
  (`gt 0` for the held state).
74
74
  **Literal previous-day levels are native**: `dist_PDH gte 0` composes directly. They are TIMELESS
75
- and take `{rel: 'anchor'}` — see `## Header grammar` in the skill body.
75
+ and take `{rel: 'anchor'}` — see `## Header grammar` in the skill body. The previous UTC day is the
76
+ 00:00–24:00 UTC day, and a level read against a bar of the next day is `null`.
77
+ - **Session highs / lows, opening range, IB extensions** → the trading-session levels are native:
78
+ `ASIA_HIGH`, `LONDON_LOW`, `NEW_YORK_OPEN` and their previous instances (`PRIOR_LONDON_HIGH`, …), each
79
+ session fixed in UTC (asia 00–08, london 08–13, newYork 13–21) with no daylight-saving rule, the UTC
80
+ day's opening ranges (`OR15_HIGH`/`OR15_LOW`, `OR30_HIGH`/`OR30_LOW`) and the IB extensions
81
+ (`IB_EXT_UP_150` … `IB_EXT_DOWN_200`). A session window (`TRADING_SESSION in ["london","newYork"]`,
82
+ `DAY_OF_WEEK between 1 and 5`) is an ordinary condition; the glosses state the windows.
76
83
  - **ICT / SMC (FVG + order blocks)** → `STRUCT_ZONES` is the native zone engine:
77
84
  `zones_htf_support_type` (`bullish FVG`/`bullish order block`), `zones_htf_support_dist
78
- between 0 1.5`, `_age_h gte 12`, HTF bias required via `MAalign_htf`. Liquidity sweeps, displacement, killzones and event *sequencing* are shapes the
85
+ between 0 1.5`, `_age_h gte 12`, HTF bias required via `MAalign_htf`. A killzone is a session window
86
+ (`TRADING_SESSION`, `UTC_HOUR`) and a sweep of a previous session's extreme is `PRIOR_<S>_HIGH_SWEPT` /
87
+ `_LOW_SWEPT`; displacement and event *sequencing* are shapes the
79
88
  grammar does not have — a clause compares one column with a literal or with its own previous
80
89
  completed bar, never with another column or an earlier event, so an ordered sequence of events
81
90
  cannot be stated at all. That is a grammar limit, not a missing metric; name it as
@@ -111,7 +120,7 @@ rules about the columns themselves, not about porting — they live in the skill
111
120
  (`PIVOT_P`/`PIVOT_R1`–`R3`/`PIVOT_S1`–`S3`), Williams %R (`WILLR14`), Stochastic RSI
112
121
  (`STOCH_RSI14`), the TTM squeeze (`KC_SQUEEZE`), Connors RSI-2 (`RSI2`), the 8/9/21/50 EMAs
113
122
  (`EMA8`/`EMA9`/`EMA21`/`EMA50` — `ta.ema(close, 8)` is `EMA8`, its distance `dist_EMA8`), literal
114
- previous-session levels (`PDH`/`PDL`/`PDO`), fractal swing structure
123
+ previous-UTC-day levels (`PDH`/`PDL`/`PDO`), fractal swing structure
115
124
  (`SWING_FRACTAL_HIGH`/`SWING_FRACTAL_LOW`/`SWING_FRACTAL_LABEL`, the prior pivots
116
125
  `PRIOR_SWING_FRACTAL_HIGH`/`PRIOR_SWING_FRACTAL_LOW` and their ages
117
126
  `SWING_FRACTAL_HIGH_BARS_AGO`/`SWING_FRACTAL_LOW_BARS_AGO`), and Chaikin Money Flow (`CMF20`). Port