@battlegrid/mcp-server 3.0.0 → 3.0.1
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 +75 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -194,7 +194,7 @@ Strategies are authored through one strict, whole-plan workflow. **Compilation w
|
|
|
194
194
|
- **UPDATE** supplies at least one changed axis and `expectedRevision`.
|
|
195
195
|
- **RESTORE** targets an owned inactive revision (with any repair axes).
|
|
196
196
|
4. **Review before confirming.** Inspect the returned `approvedPlan` (complete post-state, proposed revision, diff, bound-agent impact, expiry) and `reviewContext` (column contracts, point-in-time report preview, open positions, quota/name admission). The plan token expires after five minutes; recompile after expiry or drift.
|
|
197
|
-
5. **Apply only the exact reviewed plan.** After explicit user approval, call `apply_strategy_plan({ request: {
|
|
197
|
+
5. **Apply only the exact reviewed plan.** After explicit user approval, call `apply_strategy_plan({ request: { plan, planToken, confirm: true } })`. Build `plan` from the compiled `approvedPlan` by copying, byte-identical: `operation`; `postState.id` as `strategyId`; `expiresAt`; `expectedRevision` for UPDATE/RESTORE; `explicitRuleOverrides` as `rules`; and from `postState` — `name`, `description`, `tagline`, `timeframe`, `regimeAutoDerive`, `regimeTimeframe`, `marketReadText`, `sections` (including every generated `custom:` key), `minAggregateScore`, `minRequiredCount`, `minAtrPct`. Send nothing else — the server re-derives the scorecard, diff, viability, mismatches, seed, revision, and bound-agent impact, and rejects `diff`, `viability`, `mismatches`, `signalRules`, `creationSeed`, `proposedRevision`, `bindingImpact`, `authoringCatalogDigest`, and `reviewContext` as unknown keys. Changed configuration propagates to every bound agent immediately.
|
|
198
198
|
|
|
199
199
|
`update_strategy_signal_rule({ request })` is the thin, focused one-rule edit. In multi-account mode every one of these calls uses the `{ account, request }` sibling envelope.
|
|
200
200
|
|
|
@@ -222,7 +222,80 @@ Tools, prompts, and resources are **discovered live** from the connected server
|
|
|
222
222
|
|---------|---------|
|
|
223
223
|
| 1.x | Single/multi-account stdio proxy, identity discovery, connection retry, capability discovery |
|
|
224
224
|
| 2.0.0 | Default `BATTLEGRID_API_URL` moved to the `/mcp` suffix |
|
|
225
|
-
|
|
|
225
|
+
| 3.0.0 | Strategy-authoring major: strict `{ account, request }` authoring envelopes with strip-only-account routing, compile → review → apply workflow, strategy-bound agent creation, and removal of the retired `create_strategy` operation |
|
|
226
|
+
| **3.0.1** | Docs only — `apply_strategy_plan` now takes `{ plan, planToken, confirm }` instead of `{ approvedPlan, … }`; the server re-derives every planner-derived field and rejects resubmitted ones as unknown keys. No proxy behavior change |
|
|
227
|
+
|
|
228
|
+
## Maintainer release procedure
|
|
229
|
+
|
|
230
|
+
> [`.github/workflows/publish.yml`](.github/workflows/publish.yml) is the executable release authority. If this recipe and the workflow diverge, correct them together before creating a release tag.
|
|
231
|
+
|
|
232
|
+
Publishing runs only in GitHub-hosted Actions. Never run `npm publish` from the BattleGrid application VM or a maintainer workstation. The maintainer's shell prepares and pushes one immutable tag; the workflow checks out that pinned commit, tests, builds, packs, and publishes it with npm provenance.
|
|
233
|
+
|
|
234
|
+
### Release environments and prerequisites
|
|
235
|
+
|
|
236
|
+
| Responsibility | Environment |
|
|
237
|
+
|---|---|
|
|
238
|
+
| Confirm npm publishing trust | npmjs.com package settings |
|
|
239
|
+
| Verify the release and push its tag | Clean `battlegrid-mcp` checkout with GitHub write access |
|
|
240
|
+
| Build, test, pack, and publish | GitHub-hosted `ubuntu-latest`, Node 24 |
|
|
241
|
+
| Verify registry publication | Any shell |
|
|
242
|
+
|
|
243
|
+
Before tagging:
|
|
244
|
+
|
|
245
|
+
- Merge the complete release into `main`; never release a feature-branch commit.
|
|
246
|
+
- Use Node 22 or 24 locally. CI uses Node 24; odd-numbered Node releases are not supported by the test toolchain.
|
|
247
|
+
- Ensure `package.json`, `package-lock.json`, and `src/index.ts`'s exported `VERSION` all contain the intended version.
|
|
248
|
+
- Confirm npm's Trusted Publisher for `@battlegrid/mcp-server` is GitHub Actions with organization `playbattlegrid`, repository `battlegrid-mcp`, workflow filename `publish.yml`, no environment name, and `npm publish` allowed. The workflow uses short-lived OIDC credentials; do not add a long-lived `NPM_TOKEN`.
|
|
249
|
+
|
|
250
|
+
### Verify and tag the merged commit
|
|
251
|
+
|
|
252
|
+
Run from a clean `battlegrid-mcp` checkout, substituting the intended unused version:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
release_version=3.0.1
|
|
256
|
+
release_tag="mcp-server@${release_version}"
|
|
257
|
+
|
|
258
|
+
git fetch origin --tags
|
|
259
|
+
git switch main
|
|
260
|
+
git pull --ff-only origin main
|
|
261
|
+
|
|
262
|
+
test -z "$(git status --porcelain)"
|
|
263
|
+
test "$(node -p "require('./package.json').version")" = "$release_version"
|
|
264
|
+
test "$(node -p "require('./package-lock.json').version")" = "$release_version"
|
|
265
|
+
test "$(node -p "require('fs').readFileSync('src/index.ts','utf8').match(/VERSION = '([^']+)'/)[1]")" = "$release_version"
|
|
266
|
+
test -z "$(git tag --list "$release_tag")"
|
|
267
|
+
|
|
268
|
+
npm ci
|
|
269
|
+
npm test
|
|
270
|
+
npm run build
|
|
271
|
+
npm pack --dry-run
|
|
272
|
+
|
|
273
|
+
release_commit="$(git rev-parse HEAD)"
|
|
274
|
+
git tag -a "$release_tag" "$release_commit" -m "Publish @battlegrid/mcp-server $release_version"
|
|
275
|
+
git show --no-patch --decorate "$release_tag"
|
|
276
|
+
git push origin "$release_tag"
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
A tag matching `mcp-server@*` starts the [publish workflow](https://github.com/playbattlegrid/battlegrid-mcp/actions/workflows/publish.yml). Wait for that exact tag run to complete successfully before querying npm; a temporary registry `E404` while the workflow is still running is not a publication failure.
|
|
280
|
+
|
|
281
|
+
The workflow fails closed unless the tag version, package version, lockfile version, and source handshake version are identical. It then runs the test suite, TypeScript build, and package dry run before `npm publish --access public --provenance`.
|
|
282
|
+
|
|
283
|
+
### Verify publication
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
npm view "@battlegrid/mcp-server@${release_version}" version dist.integrity \
|
|
287
|
+
--json --registry=https://registry.npmjs.org/
|
|
288
|
+
|
|
289
|
+
npm view @battlegrid/mcp-server dist-tags \
|
|
290
|
+
--json --registry=https://registry.npmjs.org/
|
|
291
|
+
|
|
292
|
+
npm view "@battlegrid/mcp-server@${release_version}" dist.attestations \
|
|
293
|
+
--json --registry=https://registry.npmjs.org/
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Require the exact version, `latest` pointing at that version, and a provenance attestation. Record the release tag and commit. Restart/reconnect running proxies and rediscover `tools/list`, `prompts/list`, and `resources/list`; publication alone does not refresh their startup cache.
|
|
297
|
+
|
|
298
|
+
If publishing fails, inspect the tag's workflow before taking action. An `ENEEDAUTH` failure means the npm Trusted Publisher fields do not match the workflow. Fix the publisher configuration and rerun the failed job without moving the tag. Never retarget or reuse a published tag, and never mutate a tagged release with `npm audit fix`; dependency remediation goes through a new reviewed commit and version.
|
|
226
299
|
|
|
227
300
|
## Skills
|
|
228
301
|
|
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
*/
|
|
33
33
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
34
34
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
35
|
-
export declare const VERSION = "3.0.
|
|
35
|
+
export declare const VERSION = "3.0.1";
|
|
36
36
|
export declare const DEFAULT_URL = "https://mcp.battlegrid.trade/mcp";
|
|
37
37
|
export interface EnvConfig {
|
|
38
38
|
apiKeys: string[];
|
package/dist/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
36
36
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
37
37
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
38
38
|
import { ListToolsRequestSchema, CallToolRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
39
|
-
export const VERSION = '3.0.
|
|
39
|
+
export const VERSION = '3.0.1';
|
|
40
40
|
export const DEFAULT_URL = 'https://mcp.battlegrid.trade/mcp';
|
|
41
41
|
const MAX_RETRIES = 3;
|
|
42
42
|
const RETRY_DELAYS_MS = [2000, 4000, 8000];
|