@battlegrid/mcp-server 32.0.93 → 32.0.94
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 +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/skills/EXPORT.json +4 -4
- package/skills/battlegrid-strategy-authoring/SKILL.md +12 -3
- package/skills/battlegrid-strategy-authoring/references/strategy-stage-examples.md +27 -7
- package/skills/battlegrid-strategy-examples/SKILL.md +40 -22
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.
|
|
50
|
+
export declare const PACKAGE_VERSION = "32.0.94";
|
|
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.
|
|
52
|
+
export const PACKAGE_VERSION = '32.0.94';
|
|
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
package/skills/EXPORT.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generator": "battlegrid-app/server/scripts/export-mcp-skills.mjs",
|
|
3
|
-
"contractVersion": "
|
|
3
|
+
"contractVersion": "170.0.0",
|
|
4
4
|
"files": {
|
|
5
5
|
"battlegrid-agent-management/SKILL.md": "324ef8181bfcfc99b955d9644ed543c6ab91071153d43f77ccf0a4979b896b09",
|
|
6
6
|
"battlegrid-agent-management/references/agent-stage-examples.md": "dffcc353d61dfc7b5bb6a2b3077fc6bf8c760a34c287cafb3b59b99306f24195",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"battlegrid-radar-deployment/SKILL.md": "bffe54bb209ccaf1f6df3bf86a811e6768db0d11c52ae0c460cbe1494a459e43",
|
|
14
14
|
"battlegrid-radar-deployment/references/arena-stage-examples.md": "65af54b67c3248c53fb8911df769ad32824e1f1f1d83ffc007b42a888d5e3076",
|
|
15
15
|
"battlegrid-radar-deployment/references/radar-stage-examples.md": "6d898a49c42861d6efb5d1b136996e6fb64beca7cac8b8c5dba7fed17a1c3bf5",
|
|
16
|
-
"battlegrid-strategy-authoring/SKILL.md": "
|
|
17
|
-
"battlegrid-strategy-authoring/references/strategy-stage-examples.md": "
|
|
16
|
+
"battlegrid-strategy-authoring/SKILL.md": "f1375d1de10433161291c6c0f1c58f1abfe42bec8ecc6af6967c7086f0e77a79",
|
|
17
|
+
"battlegrid-strategy-authoring/references/strategy-stage-examples.md": "0eb41edd013f95092f5822a922c7cdd731584892ed90da575dbb65c93a1a00b6",
|
|
18
18
|
"battlegrid-strategy-doctor/SKILL.md": "133fe2ff3e8ca634822e02c7e30032c59c8b37b0b685023bfb98d280a678b5ae",
|
|
19
|
-
"battlegrid-strategy-examples/SKILL.md": "
|
|
19
|
+
"battlegrid-strategy-examples/SKILL.md": "906a64e881f8bad0fd5fc8ec9bdb5f090c94c9b85cd80933183311ef49cc98d5",
|
|
20
20
|
"battlegrid-strategy-examples/references/playbooks.md": "3134fde92a6ce6fecc6d610629d02450f92e47f3a1a1f33d456658267b5ce123",
|
|
21
21
|
"battlegrid-strategy-examples/references/recipes.md": "e24483ec52cbcedba08ed6fa7f2a28b0fde170b2d4b1876162d180538cd789f2",
|
|
22
22
|
"battlegrid-strategy-examples/references/tradingview-ports.md": "5d65b5299ddfddd80f413a0301de25861607aeb0840b89416c3f0603a4b7cb37",
|
|
@@ -344,9 +344,18 @@ changing; send no other axis.
|
|
|
344
344
|
stage carrying all four of its dials — `minStopLossAtrMultiple`, `maxStopLossAtrMultiple`,
|
|
345
345
|
`minRiskRewardRatio` and `minAtrPct` — and its `tradeLevelMenu`, everything you are not changing exactly as it stands
|
|
346
346
|
now: read them from the draft's TRADE_LEVEL_POLICY when the draft holds it, otherwise from
|
|
347
|
-
`get_strategy`.
|
|
348
|
-
|
|
349
|
-
|
|
347
|
+
`get_strategy`. The menu lists stops and **exit plans**: a plan is 1–4 targets, each closing a whole-number share of the
|
|
348
|
+
position, and what it does not close is the **runner**, which only Trailing exits — a plan that leaves one is refused
|
|
349
|
+
while `trailingEnabled` is false, and switching Trailing off under one is refused too. A plan's risk-reward is
|
|
350
|
+
share-weighted: each share at its target, the runner at the last target that closes a share; a last target closing 0%
|
|
351
|
+
is the **trail objective**, which sets how far the runner's trail measures and earns no reward. Raising
|
|
352
|
+
`minRiskRewardRatio` above an all-R plan's risk-reward is refused until that plan changes or leaves the menu, so a
|
|
353
|
+
raise restates the menu without it. The `strategy-examples` skill's *Trade levels* section carries the menu's
|
|
354
|
+
options, how pairs are built and what the save refuses. Before committing a TRADE_LEVEL_POLICY change, show the
|
|
355
|
+
player `preview_strategy_trade_levels({ coinTicker, source: { kind: "DRAFT", strategyId, draftVersion } })`: every
|
|
356
|
+
stop with its verdict and its distance in ATR, the pairs that survive with each target's price and close %, each
|
|
357
|
+
runner's trail distance in ATR and R, the pairs refused and why, and the reachable stop band, per direction. An R
|
|
358
|
+
target there is measured from its own pair's stop; `minRiskRewardRatio` judges each pair's plan risk-reward. The same holds for a condition: CONDITIONS carries every condition, each with its
|
|
350
359
|
`required` flag and verdict as they stand. Never set `required` or a verdict from memory, and never
|
|
351
360
|
change either unless the player asked: a wrong value there is how a building block silently becomes
|
|
352
361
|
a mandatory trade gate, or a gate silently disappears.
|
|
@@ -36,9 +36,14 @@ and TIMEFRAME_PROFILE before it can be created.
|
|
|
36
36
|
|
|
37
37
|
TRADE_LEVEL_POLICY is sent whole: all four dials and the menu, even when only one changes. `minAtrPct` is the ATR%
|
|
38
38
|
volatility floor a coin must clear before any condition is read; the next three are the stop-loss band and the
|
|
39
|
-
reward-to-risk floor; `tradeLevelMenu` lists, per trade direction, the stop and
|
|
40
|
-
from.
|
|
41
|
-
|
|
39
|
+
reward-to-risk floor; `tradeLevelMenu` lists, per trade direction, the stop options and the exit plans the agent picks
|
|
40
|
+
a stop × plan pair from. An exit plan is 1–4 targets, nearest first, each closing a whole-number `closePct` of the
|
|
41
|
+
position; whatever the plan does not close is the runner, which only Trailing exits, so a plan that leaves one needs
|
|
42
|
+
`trailingEnabled`. A last target closing `0` is the trail objective: it places no order and only sets how far the
|
|
43
|
+
runner's trail measures. A level option names a level the strategy's report yields — here the platform
|
|
44
|
+
support/resistance section's Donchian edges. The LONG list below offers a scale-out (half at 1R, half at 3R — it pays
|
|
45
|
+
2R), the channel edge closing everything, and a runner plan (half at 2R, the rest trailed towards 6R — it pays 2R:
|
|
46
|
+
the trail objective earns nothing).
|
|
42
47
|
|
|
43
48
|
```json stage_strategy_draft
|
|
44
49
|
{
|
|
@@ -60,14 +65,29 @@ Donchian edges.
|
|
|
60
65
|
"bufferAtrMultiple": 0.25
|
|
61
66
|
}
|
|
62
67
|
],
|
|
63
|
-
"
|
|
64
|
-
{
|
|
65
|
-
|
|
68
|
+
"exitPlans": [
|
|
69
|
+
{
|
|
70
|
+
"targets": [
|
|
71
|
+
{ "method": { "kind": "R_MULTIPLE", "multiple": 1 }, "closePct": 50 },
|
|
72
|
+
{ "method": { "kind": "R_MULTIPLE", "multiple": 3 }, "closePct": 50 }
|
|
73
|
+
]
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"targets": [
|
|
77
|
+
{ "method": { "kind": "LEVEL", "level": { "metric": "DONCHIAN_UPPER", "timeframe": { "rel": "anchor" }, "bars": null, "offset": 0, "knobs": {}, "windowExtreme": null } }, "closePct": 100 }
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"targets": [
|
|
82
|
+
{ "method": { "kind": "R_MULTIPLE", "multiple": 2 }, "closePct": 50 },
|
|
83
|
+
{ "method": { "kind": "R_MULTIPLE", "multiple": 6 }, "closePct": 0 }
|
|
84
|
+
]
|
|
85
|
+
}
|
|
66
86
|
]
|
|
67
87
|
},
|
|
68
88
|
"SHORT": {
|
|
69
89
|
"stops": [{ "kind": "PERCENT", "percent": 2 }],
|
|
70
|
-
"targets": [{ "kind": "R_MULTIPLE", "multiple": 2 }]
|
|
90
|
+
"exitPlans": [{ "targets": [{ "method": { "kind": "R_MULTIPLE", "multiple": 2 }, "closePct": 100 }] }]
|
|
71
91
|
}
|
|
72
92
|
}
|
|
73
93
|
}
|
|
@@ -888,7 +888,7 @@ header is. Worked sections and conditions: `references/recipes.md`, *Market and
|
|
|
888
888
|
## Trade levels
|
|
889
889
|
|
|
890
890
|
`{ minStopLossAtrMultiple, maxStopLossAtrMultiple, minRiskRewardRatio, minAtrPct, tradeLevelMenu }` — where stops
|
|
891
|
-
and targets may sit, which stops and
|
|
891
|
+
and targets may sit, which stops and exit plans the agent may choose from, and how much a coin must move before it is
|
|
892
892
|
worth trading at all. `minStopLossAtrMultiple < maxStopLossAtrMultiple` (≤ the 5×ATR structural cap),
|
|
893
893
|
`minRiskRewardRatio` within the served range. `minAtrPct` is the ATR floor: a coin whose ATR% sits below it is refused
|
|
894
894
|
(`ATR_VOLATILITY_BELOW_MIN`) before any condition is read, with bounds from
|
|
@@ -896,34 +896,52 @@ worth trading at all. `minStopLossAtrMultiple < maxStopLossAtrMultiple` (≤ the
|
|
|
896
896
|
a high floor with a wide stop needs more capital per trade. The axis is staged whole — all five keys.
|
|
897
897
|
Sizing is risk-budget based — a wider stop means a smaller position, never more risk.
|
|
898
898
|
|
|
899
|
-
**The menu: the author lists the options, the agent picks a pair.** `tradeLevelMenu` is `{ "LONG": { stops,
|
|
900
|
-
"SHORT": { stops,
|
|
899
|
+
**The menu: the author lists the options, the agent picks a pair.** `tradeLevelMenu` is `{ "LONG": { stops, exitPlans },
|
|
900
|
+
"SHORT": { stops, exitPlans } }` — each direction authored on its own, never mirrored, each list 1–8 entries. Every ATR
|
|
901
901
|
below is the strategy timeframe's.
|
|
902
902
|
|
|
903
903
|
- A **stop** option is one of `{ "kind": "ATR", "atrMultiple": m }` (0 < m ≤ 5), `{ "kind": "LEVEL", "level": <level
|
|
904
904
|
reference>, "bufferAtrMultiple": b }` (0 ≤ b ≤ 5: the stop sits b × ATR beyond the level on the loss side), or
|
|
905
905
|
`{ "kind": "PERCENT", "percent": p }` (0 < p < 100, a fixed percent from entry).
|
|
906
|
-
-
|
|
907
|
-
|
|
906
|
+
- An **exit plan** is `{ "targets": [ { "method": <target option>, "closePct": c }, … ] }` — 1–4 targets, nearest
|
|
907
|
+
first, each closing a whole-number `closePct` of the position. A **target** option is
|
|
908
|
+
`{ "kind": "R_MULTIPLE", "multiple": r }` (0 < r ≤ 10) or `{ "kind": "LEVEL", "level": <level reference> }`.
|
|
909
|
+
|
|
910
|
+
**Shares, the runner and the trail objective.** The shares sum to at most 100; the first target closes a share; every
|
|
911
|
+
closing target closes at least 5%. What the plan does not close is the **runner**, 0% or at least 5%: no take-profit
|
|
912
|
+
order rests for it, and only Trailing exits it, so a plan that leaves a runner is refused while `trailingEnabled` is
|
|
913
|
+
false. A `closePct` of 0 is allowed only on the last target of a plan that leaves a runner and closes a share before it:
|
|
914
|
+
that target is the **trail objective** — it places no order and only sets how far the runner's trail measures.
|
|
915
|
+
`[2R closing 50%, 6R closing 0%]` banks half at 2R and trails the rest with a trail sized to 6R. One target closing
|
|
916
|
+
100% is today's single take-profit.
|
|
908
917
|
|
|
909
918
|
A level reference is the same shape the entry axis names, and must be a level the report yields. At each decision the
|
|
910
|
-
platform pairs every stop with every
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
919
|
+
platform pairs every stop with every exit plan and prices each target on the decided bar beside that stop. It drops a
|
|
920
|
+
pair whose stop is not on the loss side of entry, a stop tighter than `minStopLossAtrMultiple` or wider than
|
|
921
|
+
`maxStopLossAtrMultiple` (or the 5×ATR cap), a plan whose targets do not run away from entry in plan order beside that
|
|
922
|
+
stop, a pair whose plan risk-reward is under `minRiskRewardRatio`, and — for an agent — a plan one of whose target
|
|
923
|
+
legs would fall under the exchange's minimum order value at the smallest order the agent can place. A level with no
|
|
924
|
+
reading on the bar drops the plans that name it; nothing is stretched, merged or substituted. Pairs that land on the
|
|
925
|
+
same stop, target prices and shares are one setup naming every option and plan that made it. The agent chooses one
|
|
926
|
+
setup; a one-entry list is a fixed choice.
|
|
927
|
+
|
|
928
|
+
**R is the pair's own risk; the plan's risk-reward is share-weighted.** An `R_MULTIPLE` target sits `r × |entry −
|
|
929
|
+
stop|` from entry for the stop it is paired with, so 2R beside a 2×ATR stop is twice as far as 2R beside a 1×ATR stop.
|
|
930
|
+
A plan's risk-reward is each share at its target's distance plus the runner at the distance of the last target that
|
|
931
|
+
closes a share, over the stop's risk; a trail objective adds nothing. `[1R closing 50%, 3R closing 50%]` pays 2.0 and
|
|
932
|
+
`[1R closing 50%]` pays 1.0. An all-R plan has the same risk-reward beside every stop, so the save refuses one below
|
|
933
|
+
`minRiskRewardRatio` (it could never trade) rather than dropping it per trade; a plan's early target may sit below
|
|
934
|
+
the minimum when the plan as a whole clears it.
|
|
935
|
+
|
|
936
|
+
**What the save refuses, per direction** (each naming its field): a list outside 1–8 entries; an option outside its
|
|
937
|
+
bounds; a plan that breaks a share rule above; consecutive R targets whose multiples do not increase, or one level
|
|
938
|
+
named twice in a plan; a level the report does not yield; an all-R plan below `minRiskRewardRatio`; a plan that leaves
|
|
939
|
+
a runner while Trailing is off (an update that only switches Trailing off is refused the same way); a target level that
|
|
940
|
+
is the direction's entry level (no reward); and one level in both the stop list and an exit plan. The entry level may
|
|
941
|
+
also be a stop. A CREATE that stages no menu opens with the seed — stops ATR 1× / 1.5× / 2× plus the Donchian edge and
|
|
942
|
+
Bollinger band on the loss side, one-target plans closing 100% at 1.5R / 2R / 3R (those at or above the minimum) plus
|
|
943
|
+
the Donchian edge and Bollinger band on the profit side, never a target at its own entry level — keeping only the
|
|
944
|
+
levels its report yields.
|
|
927
945
|
|
|
928
946
|
## Position management
|
|
929
947
|
|