@battlegrid/mcp-server 31.2.14 → 31.2.15

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
@@ -413,6 +413,58 @@ refuse is now stored. Listed because a client that special-cased the refusal can
413
413
  a stored result" and "the signal did not fire" are different states, and leaving the key off that
414
414
  arm makes conflating them a type error rather than a convention.
415
415
 
416
+ ### Additive in the same span
417
+
418
+ - **Two tools join the catalog for the agent trade flow** (52.1.0, `add-mcp-agent-trade-flow`).
419
+ `scan_agent_coins` evaluates every active coin against one of your agents in a single call and
420
+ returns them server-ranked, on the same use case, buckets and ranking the app's own TRADE-tab scan
421
+ serves. `propose_entry_decision` runs the conversational trade turn headlessly for one (agent,
422
+ coin) and returns its terminal in the stream's own vocabulary: `type: recommendation` carrying the
423
+ PROPOSED `TradingEntryDecisionDTO` row that `get_entry_decision` and `list_pending_approvals`
424
+ already publish, `type: no_trade`, or `type: error` carrying the turn's `TradeConvError` verbatim.
425
+ Nothing narrows and no existing schema hash moves; the 12-ticker `get_agent_coin_qualification`
426
+ stays as the spot-check probe.
427
+
428
+ **`idempotencyKey` is REQUIRED on `propose_entry_decision`** — it is the turn's own key, and a
429
+ same-key retry replays the recorded terminal rather than paying for a second inference. That
430
+ includes a post-billing `LLM_FAILURE`, which is returned as a value for precisely that reason.
431
+ Pre-engine faults are typed errors instead: `RATE_LIMITED`, `NOT_FOUND`, `CONFLICT` for a same-key
432
+ call still in flight, and `SERVICE_UNAVAILABLE` when the surface is switched off. Both tools
433
+ refuse with `RATE_LIMITED` carrying `retryAfterSeconds` under the same per-(user, agent) limit the
434
+ app itself enforces, so a scan is never served stale or partial.
435
+
436
+ - **`get_regime_snapshot` publishes the evidence behind the verdict** (47.1.0,
437
+ `publish-regime-classification-evidence`). The snapshot gains `evidence`: the quantities the
438
+ classifier read, the gates it tested them against, the signed margin to the gate deciding whether
439
+ the current label survives, and the two decision facts only the classifier holds — `gateState`
440
+ (`cleared` / `held` / `dropped`) and `directionSource` (`di` / `ema`). Nothing narrows; a client
441
+ that ignores the field is unaffected.
442
+
443
+ Read `gateState` before you trust a trend label: **`held` means the ADX hysteresis buffer is
444
+ carrying the PREVIOUS bar's label rather than this bar re-confirming it** — a materially weaker
445
+ claim wearing the same word, and one no client could previously detect. `directionSource: 'ema'`
446
+ is the same shape of warning: the direction came from the fallback that fires precisely when the
447
+ DI spread is indecisive. The margin is signed so **positive always means "the current label
448
+ survives by this much"**, in every gate state, so it is safe to branch on its sign.
449
+
450
+ `conviction` is a BRANCH DISCRIMINATOR, not a confidence: it encodes *which* rule in the priority
451
+ ladder matched, not how comfortably it matched. The margins carry comfort. A client reading
452
+ conviction as a strength score is reading it wrong, and always was — this release just makes the
453
+ alternative available.
454
+
455
+ - **Thirteen metric keys join the catalog** (47.1.0) — the `regime` family gains `REGIME_STATE`,
456
+ `REGIME_CONVICTION`, `REGIME_RUN_BARS`, `REGIME_TREND_GATE`, `REGIME_TREND_MARGIN`,
457
+ `REGIME_TREND_SOURCE`, `REGIME_DI_SPREAD`, `REGIME_VOL_ATR_RATIO`, `REGIME_VOL_BBW_RATIO`,
458
+ `REGIME_MOM_BULL_VOTES`, `REGIME_MOM_BEAR_VOTES`, `REGIME_CRASH_MARGIN` and `REGIME_CRASH_LATCH`,
459
+ making the composite regime and its evidence addressable in a report column or condition for the
460
+ first time. Only a client that switches exhaustively on `MetricKey` needs new branches.
461
+
462
+ Not a contract change, but worth knowing if you author conditions: the report grammar's regime
463
+ metrics now resolve from the **confirmed close** on every path. They previously resolved from the
464
+ forming bar when a report was rendered and the confirmed close when the scan swept, so the same
465
+ condition could read differently in preview than in production. Same wire shape; same bar
466
+ everywhere now.
467
+
416
468
  ## Contract history — v12 → v36
417
469
 
418
470
  > **The number in this heading is a CONTRACT version, not this package's version.** The npm badge at the top
@@ -565,38 +617,6 @@ Nothing in the proxy changes. No configuration, no environment variable, no call
565
617
 
566
618
  ### Additive in the same span
567
619
 
568
- - **`get_regime_snapshot` publishes the evidence behind the verdict** (47.1.0,
569
- `publish-regime-classification-evidence`). The snapshot gains `evidence`: the quantities the
570
- classifier read, the gates it tested them against, the signed margin to the gate deciding whether
571
- the current label survives, and the two decision facts only the classifier holds — `gateState`
572
- (`cleared` / `held` / `dropped`) and `directionSource` (`di` / `ema`). Nothing narrows; a client
573
- that ignores the field is unaffected.
574
-
575
- Read `gateState` before you trust a trend label: **`held` means the ADX hysteresis buffer is
576
- carrying the PREVIOUS bar's label rather than this bar re-confirming it** — a materially weaker
577
- claim wearing the same word, and one no client could previously detect. `directionSource: 'ema'`
578
- is the same shape of warning: the direction came from the fallback that fires precisely when the
579
- DI spread is indecisive. The margin is signed so **positive always means "the current label
580
- survives by this much"**, in every gate state, so it is safe to branch on its sign.
581
-
582
- `conviction` is a BRANCH DISCRIMINATOR, not a confidence: it encodes *which* rule in the priority
583
- ladder matched, not how comfortably it matched. The margins carry comfort. A client reading
584
- conviction as a strength score is reading it wrong, and always was — this release just makes the
585
- alternative available.
586
-
587
- - **Thirteen metric keys join the catalog** (47.1.0) — the `regime` family gains `REGIME_STATE`,
588
- `REGIME_CONVICTION`, `REGIME_RUN_BARS`, `REGIME_TREND_GATE`, `REGIME_TREND_MARGIN`,
589
- `REGIME_TREND_SOURCE`, `REGIME_DI_SPREAD`, `REGIME_VOL_ATR_RATIO`, `REGIME_VOL_BBW_RATIO`,
590
- `REGIME_MOM_BULL_VOTES`, `REGIME_MOM_BEAR_VOTES`, `REGIME_CRASH_MARGIN` and `REGIME_CRASH_LATCH`,
591
- making the composite regime and its evidence addressable in a report column or condition for the
592
- first time. Only a client that switches exhaustively on `MetricKey` needs new branches.
593
-
594
- Not a contract change, but worth knowing if you author conditions: the report grammar's regime
595
- metrics now resolve from the **confirmed close** on every path. They previously resolved from the
596
- forming bar when a report was rendered and the confirmed close when the scan swept, so the same
597
- condition could read differently in preview than in production. Same wire shape; same bar
598
- everywhere now.
599
-
600
620
  `27.1.0` exit-policy authoring input on `compile_strategy_plan` · `19.2.0` `get_account_state` account identity · `19.1.0` Standing Orders marker authoring · `18.4.0` `list_gate_blocks` summary groups · `18.3.0` radar maintenance pause · `18.1.0` protection geometry · `17.2.0` break-even/trailing status · `17.1.0` `get_signal_log` condition evaluation · `13.1.0` four owner-scoped read tools · `12.1.0` cross-venue spot price metrics · `11.1.0` discoverable rate limit.
601
621
 
602
622
  ## v11 and earlier — contract history (v6 → v11)
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.14";
52
+ export declare const PACKAGE_VERSION = "31.2.15";
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.14';
55
+ export const PACKAGE_VERSION = '31.2.15';
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];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@battlegrid/mcp-server",
3
- "version": "31.2.14",
3
+ "version": "31.2.15",
4
4
  "description": "BattleGrid MCP server — play crypto prediction games from AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",