vantage-peers-mcp 2.3.3 → 2.3.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,34 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.3.5 — 2026-05-28
4
+
5
+ **Critical hotfix** — v2.3.3 (PR #539) shipped the backend filters `createdBy` + `updatedSince` and the Zod schema exports but did NOT wire those params into the 4 list MCP tool args blocks. Pi pull-cycle quickstart `list_tasks createdBy="pi" status="review" fields="lite"` was silently dropping `createdBy` at the MCP boundary and returning all visible tasks. Auto-clamp safeguard (Day 83) also could not trigger because Zod `.default(50)` / `.default(20)` on `limit` overrode the absent-value signal before it reached the backend.
6
+
7
+ Fixes:
8
+ - `mcp-server/src/tools.ts` : 4 list tools now expose `createdBy` (`list_tasks` + `list_tasks_by_mission` only — `list_missions` + `list_briefing_notes` do not accept it backend-side) and `updatedSince` (all 4).
9
+ - Removed `.default(50)` (3 tools) and `.default(20)` (1 tool) on `limit` so absent value reaches the backend, enabling the v2.3.3 auto-clamp safeguard.
10
+
11
+ Tests : 8 new boundary-forwarding cases (`src/__tests__/list-queries-v2.3.5-wire-createdby-updatedsince.test.ts`) — verify MCP layer actually forwards new params to `convex.query` instead of dropping them. 0 regression on existing suites.
12
+
13
+ Detection : Vantage-Bridge architecture review Sigma scope Day 84 — direct `grep`/`sed` inspection of `tools.ts` confirmed the gap. Backend already correct since v2.3.3 (`convex/tasks.ts:354-357`).
14
+
15
+ Fix-pattern (Day 84 capitalize) : when adding a new param across backend + MCP wrapper, the test suite MUST cover not only schema validation but also the tool-handler→convex.query forwarding boundary. Schema-only tests passed cleanly in v2.3.3 while the actual feature was broken in prod.
16
+
17
+ VP task : `k177tsvdxzase5sjy2qm9fdvp187kbwr`. Predecessor v2.3.3 PR #539 (`k1796s5j6jfkvkx0tn5n926ftd87jx9p`).
18
+
19
+ ## v2.3.4 — 2026-05-28
20
+
21
+ **Security fix** — DCR (Dynamic Client Registration) self-registration now defaults to tenant-scope only. Master scope requires explicit admin authorization (`ADMIN_DCR_TOKEN` / `BEARER_SECRET_MASTER` env var). Closes beta blocker for Marie/Iris RH onboarding identified in VP Cloud audit Day 84.
22
+
23
+ Changes:
24
+ - `convex/oauth.ts`: `registerPublicClient` now explicitly rejects `scopeProfile="master"` with a `ScopeViolation` error. Previously only the HTTP server enforced this; the Convex-layer was bypassable via direct internal call.
25
+ - `mcp-server/src/auth.ts`: bearer layer 3 (DCR token path) no longer maps `mcp:full` scope string to `scopeProfile="master"`. DCR tokens now always resolve to `client-generic` (deny-by-default). The `mcp:full` label in the legacy `oauthTokens` table was a scope label, not an authorization grant.
26
+ - `convex/oauthDcr.ts`: added security documentation clarifying the legacy table is no longer an escalation path; the auth middleware fix is the primary gate.
27
+
28
+ Tests: 5 new Convex security tests (`convex/oauth-dcr-security.test.ts`) + 5 new MCP scope enforcement tests (`mcp-server/src/__tests__/dcr-scope-enforcement.test.ts`), 0 regression on existing suites.
29
+
30
+ VP task: k17218rvqyncs1v6rwj3qdzfsn87jj4n. Beta unblock chain: DCR fix → 5 quick wins onboarding (seed-profiles + marie-iris-rh client + README VP Cloud + runbook + email).
31
+
3
32
  ## v2.3.3 — 2026-05-28
4
33
 
5
34
  **Follow-up to v2.3.2 (Day 84 scope élargi)** — Extend list queries with `createdBy` + `updatedSince` filters + auto-clamp safeguard.
package/dist/src/auth.js CHANGED
@@ -231,10 +231,18 @@ export function bearerAuthMiddleware() {
231
231
  console.error("[auth] CONVEX_URL_INTERNAL not set — cannot route DCR OAuth token");
232
232
  return c.json({ error: "Server misconfigured: internal deployment URL missing" }, 500);
233
233
  }
234
- // Map DCR single-scope string OAuthContext fields.
235
- // DCR tokens always carry "mcp:full" which maps to full access.
234
+ // SECURITY FIX: DCR tokens from the legacy oauthDcr path (oauthTokens
235
+ // table) carry "mcp:full" as a scope string. Previously this was mapped
236
+ // to scopeProfile="master" which granted cross-tenant, full-access.
237
+ // This is the DCR master-scope leak identified in VP Cloud audit Day 84.
238
+ //
239
+ // Fix: DCR self-registered clients ALWAYS resolve to "client-generic"
240
+ // (deny-by-default). "mcp:full" in the legacy table is a scope label, NOT
241
+ // an authorization to bypass namespace isolation. Master scope is only
242
+ // granted via the master bearer token path (layer 1) or via the
243
+ // oauth_access_tokens table with an admin-provisioned scopeProfile
244
+ // (layer 2). The DCR layer (layer 3) never grants master access.
236
245
  const scopes = dcrResult.scope.split(/\s+/).filter(Boolean);
237
- const isFull = scopes.includes("mcp:full");
238
246
  c.set("tenant", {
239
247
  tenantName: `dcr:${dcrResult.clientId}`,
240
248
  convexUrl: internalUrl,
@@ -243,10 +251,11 @@ export function bearerAuthMiddleware() {
243
251
  clientId: dcrResult.clientId,
244
252
  userId: dcrResult.clientId,
245
253
  scopes,
246
- scopeProfile: isFull ? "master" : "client-generic",
247
- fromAllowList: isFull ? ["*"] : [],
248
- namespaceReadPrefixes: isFull ? ["*"] : [],
249
- namespaceWritePrefixes: isFull ? ["*"] : [],
254
+ // Always tenant-scoped — never master regardless of scope string value.
255
+ scopeProfile: "client-generic",
256
+ fromAllowList: [],
257
+ namespaceReadPrefixes: [],
258
+ namespaceWritePrefixes: [],
250
259
  expiresAt: dcrResult.expiresAt,
251
260
  isMaster: false,
252
261
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vantage-peers-mcp",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "description": "MCP server for VantagePeers — shared memory, messaging, and task coordination for AI agent teams",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",