@modality-counter/core 1.5.0 → 1.5.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.
@@ -14,13 +14,20 @@ export type PartyMode = z.infer<typeof partyModeSchema>;
14
14
  * HACK: some MCP clients (e.g. certain Gemini tool runtimes, Copilot CLI) flatten
15
15
  * a nested `params` object into dotted top-level keys on the wire — sending
16
16
  * `{ "params.reference": "x" }` instead of `{ params: { reference: "x" } }`.
17
- * Fold any `params.*` keys back into a nested `params` object so downstream
18
- * code (and Zod's object-strip) sees the intended shape instead of dropping it.
17
+ * This preprocessor folds any `params.*` keys back into a nested `params` object
18
+ * before Zod's z.object() sees the input — otherwise the dotted keys would be
19
+ * treated as unknown top-level keys and silently dropped under Zod's default
20
+ * strip mode.
19
21
  *
20
- * This function is required by Copilot CLI and similar MCP clients. Removing it
21
- * will break reference loading and method execution for those clients.
22
- * NEVER remove this function or the z.preprocess(liftDottedParams, …) wrapper
23
- * on heroMethodSchema.
22
+ * Preprocess trigger (both paths are needed):
23
+ * 1. MCP framework: the server passes raw JSON-RPC args straight through
24
+ * to execute(). The inputSchema is NOT auto-parsed.
25
+ * 2. executeMethod(): always calls heroMethodSchema.parse(props) before
26
+ * destructuring, so the preprocess fires on every call path.
27
+ *
28
+ * Removing this function or the z.preprocess(liftDottedParams, …) wrapper
29
+ * on heroMethodSchema will break reference loading and method execution for
30
+ * any client that sends flattened wire format.
24
31
  */
25
32
  export declare function liftDottedParams(input: unknown): unknown;
26
33
  export declare const heroMethodSchema: z.ZodPreprocess<z.ZodObject<{
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.0",
2
+ "version": "1.5.1",
3
3
  "name": "@modality-counter/core",
4
4
  "repository": {
5
5
  "type": "git",