@muhaven/mcp 0.2.0 → 0.2.2

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
@@ -7,6 +7,107 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.2.2] — 2026-05-23
11
+
12
+ ### Fixed
13
+
14
+ - **`tools/list.inputSchema` now exposes the per-field shape, not a
15
+ bare `{type:'object', additionalProperties:false}` placeholder.**
16
+ The 0.2.1 (and earlier) `toJsonInputSchema` was a stub: it returned
17
+ the object envelope with `additionalProperties:false` but no
18
+ `properties` block. JSON-Schema-compliant MCP hosts (Claude Code's
19
+ tool-call validator) interpret that combination as "no properties
20
+ allowed" and silently strip every argument before dispatch — every
21
+ call landed at the server as `{}`. Surfaced 2026-05-23 by an
22
+ operator-side `Buy TBILL1 $1` smoke. Fix: wire `zod-to-json-schema`
23
+ (`target: 'jsonSchema7'`, `$refStrategy: 'none'`,
24
+ `removeAdditionalStrategy: 'strict'`) so the real per-field shape
25
+ reaches the host. Drops the top-level `$schema` URL (host noise).
26
+ Added 14 unit + 48 registry-wide regression cases pinning the
27
+ contract per tool, plus a recursive nested-strict walker that fails
28
+ if a future contributor adds a nested `z.object(...)` without
29
+ `.strict()` (Security Engineer MED, absorbed inline).
30
+
31
+ ### Dependencies
32
+
33
+ - **Added `zod-to-json-schema@^3.24.0`** as a runtime dep (~30KB, zero
34
+ transitive deps). Required by the inputSchema fix above; previously
35
+ the converter was a placeholder stub per the original commit's note
36
+ to "avoid runtime dep for hackathon scope."
37
+ - **Bumped `zod` dep range from `^3.24.0` to `^3.25.0`** to match
38
+ `@modelcontextprotocol/sdk@^1.0.4`'s peer-dep declaration
39
+ (`zod: ^3.25 || ^4.0`). The installed tree already resolves to
40
+ 3.25.x so prod runtime is unchanged, but the declared range avoids
41
+ a peer-dep warning for consumers running `npm i @muhaven/mcp` with
42
+ an older zod hoisted in their tree (Code Reviewer HIGH, absorbed
43
+ inline).
44
+
45
+ ### Notes
46
+
47
+ - **`tool-hashes.json` does NOT need regenerating for 0.2.2.** The
48
+ hashed surface is the tool descriptor (name + description +
49
+ sensitive flag, see `descriptions.ts::hashToolDescriptor`); the
50
+ JSON-Schema export is downstream of that and not part of the hash.
51
+ `pnpm verify-tool-hashes -- --check` continues to pass against the
52
+ existing pin from 0.2.0.
53
+
54
+ ### Added — Wave 5 Path D Slice 1 (in flight)
55
+
56
+ - **Broker protocol verb `get_active_session_id`** (additive over 0.4.0).
57
+ Narrow "which session is live?" probe — returns the sessionId of the
58
+ single non-expired snapshot bound to the broker's loaded signer, or
59
+ null on zero / 2+ matches. Backs the MCP server's bootstrap of Path
60
+ D's broker-side signing path before Slice 2's backend-mirror
61
+ `agent_scoped_sessions` table lands. Intentionally narrower than
62
+ `list()` so RD-3 (no IPC enumeration) stays honoured.
63
+ - **`BrokerClient.preflight()` + semver gate (Backend Architect H-2).**
64
+ Detects stale 0.3.x daemons before any sign_userop call, surfacing
65
+ `version_too_old` / `session_key_unavailable` / `broker_unreachable`
66
+ with structured remediation hints instead of an opaque
67
+ `unsupported_type`.
68
+ - **`BundlerClient` (NEW, `src/clients/bundler-client.ts`).** ERC-4337
69
+ v0.7 JSON-RPC client surface — `sendUserOp` + `getReceipt` +
70
+ `waitForReceipt` + `assertChainId`. Lives MCP-server-side (network
71
+ egress), not in the broker (R-1 zero-egress invariant preserved).
72
+ Configured via new `MUHAVEN_BUNDLER_URL` + `MUHAVEN_CHAIN_ID` env
73
+ vars (manifest.json user_config block extended). The UserOp BUILD +
74
+ SIGN path remains DEFERRED to a later release (FHE encrypt + kernel-
75
+ execute encode have unresolved design points); the bundler-client
76
+ surface ships now with full test coverage.
77
+ - **`positionBuy` Path D probe.** When BOTH bundler and broker are
78
+ configured, the handler runs a preflight chain
79
+ (preflight → getActiveSessionId → getPolicySnapshot → selector-cap
80
+ match → shares cap) BEFORE building the Path C deep-link. Every gate
81
+ failure surfaces as a structured non-retryable
82
+ `pathDFallbackReason` in the echo while still returning a valid
83
+ Path C URL — single affordance for the user, full structured
84
+ observability for the LLM. The "all gates pass" terminal state
85
+ returns `path_d_userop_build_pending` until the UserOp build path
86
+ lands.
87
+ - **`/agent/policy/state` extension** (backend): top-level
88
+ `accountAddress` field (= JWT subject = kernel smart-account
89
+ address). Backward-compatible; older callers ignore the new field.
90
+ Lays foundation for the Commit 3.5 UserOp builder's kernel-address
91
+ lookup without needing a separate /me endpoint.
92
+
93
+ ### Internal — Wave 5 Path D Slice 1
94
+
95
+ - `IPolicyStore.activeSessionId(activeSignerAddress, nowSec)` method —
96
+ enumerates daemon-internal snapshots, returns the unique active
97
+ sessionId or null. File-backed + memory implementations both honour
98
+ the same "zero or ambiguous → null" semantics.
99
+ - 65 new vitest cases across protocol / policy-snapshot / daemon-handler
100
+ / bundler-client / broker-client-preflight / position-deeplink test
101
+ files. Total 474 MCP vitest cases (up from 409). Three-agent parallel
102
+ pre-commit review (Code Reviewer + MCP Builder + Security Engineer
103
+ fresh) absorbed: 4 HIGH addressed inline (BrokerClientError gains
104
+ typed `brokerCode` field with `unsupported_type → version_too_old`
105
+ remap; `attemptPathD` adds signer-mismatch guard + splits
106
+ selector-uncapped vs selector-not-in-snapshot; test stubs replaced
107
+ with Proxy-based throw-on-unstubbed-access); MED-1 closed (semverGte
108
+ regex tightened to reject leading zeros per SemVer 2.0 §2). Security
109
+ Engineer approved with no HIGH findings.
110
+
10
111
  ## [0.2.0] — 2026-05-18
11
112
 
12
113
  **Minor bump signals a breaking change to `position.buy`'s input