hevy-mcp 4.1.1 → 4.1.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/dist/cli.mjs CHANGED
@@ -4,12 +4,12 @@
4
4
  (function() {
5
5
  try {
6
6
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
7
- e.SENTRY_RELEASE = { id: "hevy-mcp@4.1.1" };
7
+ e.SENTRY_RELEASE = { id: "hevy-mcp@4.1.2" };
8
8
  var n = new e.Error().stack;
9
9
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "625c4c9c-e20d-40b3-96b1-4e799ef130f3", e._sentryDebugIdIdentifier = "sentry-dbid-625c4c9c-e20d-40b3-96b1-4e799ef130f3");
10
10
  } catch (e) {}
11
11
  })();
12
- import { a as createSafeErrorDiagnostic, i as MissingHevyApiKeyError, n as runServer, o as flushTelemetry } from "./src-BPbLELQf.mjs";
12
+ import { a as createSafeErrorDiagnostic, i as MissingHevyApiKeyError, n as runServer, o as flushTelemetry } from "./src-Wa4VP4Na.mjs";
13
13
  //#region src/cli.ts
14
14
  runServer().catch(async (error) => {
15
15
  if (error instanceof MissingHevyApiKeyError) console.error(error.message);
package/dist/index.mjs CHANGED
@@ -4,10 +4,10 @@
4
4
  (function() {
5
5
  try {
6
6
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
7
- e.SENTRY_RELEASE = { id: "hevy-mcp@4.1.1" };
7
+ e.SENTRY_RELEASE = { id: "hevy-mcp@4.1.2" };
8
8
  var n = new e.Error().stack;
9
9
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "e9496b31-626b-4ad1-9416-47ba4ffd2995", e._sentryDebugIdIdentifier = "sentry-dbid-e9496b31-626b-4ad1-9416-47ba4ffd2995");
10
10
  } catch (e) {}
11
11
  })();
12
- import { n as runServer, r as runStdioServer, t as createNodeMcpServer } from "./src-BPbLELQf.mjs";
12
+ import { n as runServer, r as runStdioServer, t as createNodeMcpServer } from "./src-Wa4VP4Na.mjs";
13
13
  export { createNodeMcpServer, runServer, runStdioServer };
@@ -4,9 +4,9 @@
4
4
  (function() {
5
5
  try {
6
6
  var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
7
- e.SENTRY_RELEASE = { id: "hevy-mcp@4.1.1" };
7
+ e.SENTRY_RELEASE = { id: "hevy-mcp@4.1.2" };
8
8
  var n = new e.Error().stack;
9
- n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "3ad9084e-6d6c-4681-ad27-9168114359ab", e._sentryDebugIdIdentifier = "sentry-dbid-3ad9084e-6d6c-4681-ad27-9168114359ab");
9
+ n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "b064b429-35aa-4617-a2a9-779c7c2ed596", e._sentryDebugIdIdentifier = "sentry-dbid-b064b429-35aa-4617-a2a9-779c7c2ed596");
10
10
  } catch (e) {}
11
11
  })();
12
12
  import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
@@ -81,11 +81,11 @@ function sanitizeSentryMcpSpan(span) {
81
81
  * OTel Collector → Honeycomb: performance traces, metrics
82
82
  */
83
83
  const name$1 = "hevy-mcp";
84
- const version$1 = "4.1.1";
84
+ const version$1 = "4.1.2";
85
85
  const telemetryEnabled = process.env.HEVY_MCP_TELEMETRY !== "0";
86
86
  const collectorToken = "NH9vOela-HYreQxAbJa68cjEmORoEKM57EvneUDVcOo";
87
87
  const COLLECTOR_ENDPOINT = "https://otel.chrisdoc.dev/v1";
88
- const sentryRelease = process.env.SENTRY_RELEASE ?? `hevy-mcp@4.1.1`;
88
+ const sentryRelease = process.env.SENTRY_RELEASE ?? `hevy-mcp@4.1.2`;
89
89
  const resource = resourceFromAttributes({
90
90
  "service.name": name$1,
91
91
  "service.version": version$1
@@ -220,10 +220,15 @@ function coerceNullishNumberInput(value) {
220
220
  }
221
221
  const zNullableInt = z.preprocess(coerceNullishNumberInput, z.number().int().nullable().optional());
222
222
  const zNullableNumber = z.preprocess((value) => value === "" ? void 0 : value, z.coerce.number().nullable().optional());
223
- const zOptionalRepRange = z.preprocess((value) => value === null ? void 0 : value, z.object({
223
+ const repRangeShape = {
224
224
  start: zNullableInt,
225
225
  end: zNullableInt
226
- }).optional());
226
+ };
227
+ function optionalRepRangeSchema(schema) {
228
+ return z.preprocess((value) => value === null ? void 0 : value, schema);
229
+ }
230
+ const zOptionalRepRange = optionalRepRangeSchema(z.object(repRangeShape).optional());
231
+ optionalRepRangeSchema(z.object(repRangeShape).strict().optional());
227
232
  const setTypeEnum = z.enum([
228
233
  "warmup",
229
234
  "normal",
@@ -2595,7 +2600,7 @@ function registerHevyResources(server, runtime) {
2595
2600
  //#endregion
2596
2601
  //#region ../core/src/server-metadata.ts
2597
2602
  const SERVER_NAME = "hevy-mcp";
2598
- const SERVER_VERSION = "4.1.1";
2603
+ const SERVER_VERSION = "4.1.2";
2599
2604
  const SERVER_INSTRUCTIONS = [
2600
2605
  "Hevy MCP connects clients to the authenticated user's Hevy workout-tracking data, including workouts, routines, exercise templates, routine folders, body measurements, and profile information. HEVY_API_KEY must contain a valid Hevy API key for local stdio use.",
2601
2606
  "Safety: all get-* and search-* tools are read-only. create-* and update-* tools mutate Hevy data. Creates are additive and non-idempotent, so repeating one can create duplicates. Updates can overwrite existing data. Delete operations are not available.",
@@ -2740,6 +2745,14 @@ function paginationShape({ defaultPageSize, maxPageSize, integerPage = true }) {
2740
2745
  };
2741
2746
  }
2742
2747
  const nonEmptyId = z.string().min(1);
2748
+ const exerciseTemplateInputShape = {
2749
+ title: z.string().min(1),
2750
+ exerciseType: exerciseTypeEnum,
2751
+ equipmentCategory: equipmentCategoryEnum,
2752
+ muscleGroup: muscleGroupEnum,
2753
+ otherMuscles: z.array(muscleGroupEnum).default([])
2754
+ };
2755
+ const routineFolderInputShape = { name: z.string().min(1) };
2743
2756
  const CALENDAR_DATE_MESSAGE = "Date must be in YYYY-MM-DD format";
2744
2757
  const calendarDate = z.string().regex(/^\d{4}-\d{2}-\d{2}$/, CALENDAR_DATE_MESSAGE).refine((value) => {
2745
2758
  const parsed = /* @__PURE__ */ new Date(`${value}T00:00:00.000Z`);
@@ -2940,6 +2953,18 @@ function buildMeasurementPayload(fields) {
2940
2953
  }
2941
2954
  return payload;
2942
2955
  }
2956
+ function buildExerciseTemplateRequest(input) {
2957
+ return { exercise: {
2958
+ title: input.title,
2959
+ exercise_type: input.exerciseType,
2960
+ equipment_category: input.equipmentCategory,
2961
+ muscle_group: input.muscleGroup,
2962
+ other_muscles: input.otherMuscles
2963
+ } };
2964
+ }
2965
+ function buildRoutineFolderRequest(input) {
2966
+ return { routine_folder: { title: input.name } };
2967
+ }
2943
2968
  //#endregion
2944
2969
  //#region ../core/src/utils/hevy-error-policy.ts
2945
2970
  const READ_RESOURCE_ENDPOINTS = /* @__PURE__ */ new Set([
@@ -3119,7 +3144,7 @@ const getRoutineFoldersSchema = paginationShape({
3119
3144
  maxPageSize: 10
3120
3145
  });
3121
3146
  const getRoutineFolderSchema = { folderId: nonEmptyId };
3122
- const createRoutineFolderSchema = { name: z.string().min(1) };
3147
+ const createRoutineFolderSchema = routineFolderInputShape;
3123
3148
  const folderToolDefinitions = [
3124
3149
  {
3125
3150
  name: "get-routine-folders",
@@ -3217,8 +3242,7 @@ const folderToolDefinitions = [
3217
3242
  kind: "write",
3218
3243
  responseContract: createRoutineFolderResponse,
3219
3244
  execute: async (runtime, args) => {
3220
- const { name } = args;
3221
- return runtime.getClient().createRoutineFolder({ routine_folder: { title: name } });
3245
+ return runtime.getClient().createRoutineFolder(buildRoutineFolderRequest(args));
3222
3246
  }
3223
3247
  }
3224
3248
  ];
@@ -3383,13 +3407,7 @@ const getExerciseHistorySchema = {
3383
3407
  startDate: z.string().datetime({ offset: true }).describe("ISO 8601 start date for filtering history").optional(),
3384
3408
  endDate: z.string().datetime({ offset: true }).describe("ISO 8601 end date for filtering history").optional()
3385
3409
  };
3386
- const createExerciseTemplateSchema = {
3387
- title: z.string().min(1),
3388
- exerciseType: exerciseTypeEnum,
3389
- equipmentCategory: equipmentCategoryEnum,
3390
- muscleGroup: muscleGroupEnum,
3391
- otherMuscles: z.array(muscleGroupEnum).default([])
3392
- };
3410
+ const createExerciseTemplateSchema = exerciseTemplateInputShape;
3393
3411
  const searchExerciseTemplatesSchema = {
3394
3412
  query: z.string().min(1).describe("Case-insensitive substring to match against exercise template titles"),
3395
3413
  primaryMuscleGroup: muscleGroupEnum.optional().describe("Optional filter to restrict results to a specific primary muscle group"),
@@ -3523,14 +3541,7 @@ const templateToolDefinitions = [
3523
3541
  kind: "write",
3524
3542
  responseContract: createExerciseTemplateResponse,
3525
3543
  execute: async (runtime, args) => {
3526
- const { title, exerciseType, equipmentCategory, muscleGroup, otherMuscles } = args;
3527
- return await runtime.getClient().createExerciseTemplate({ exercise: {
3528
- title,
3529
- exercise_type: exerciseType,
3530
- equipment_category: equipmentCategory,
3531
- muscle_group: muscleGroup,
3532
- other_muscles: otherMuscles
3533
- } });
3544
+ return runtime.getClient().createExerciseTemplate(buildExerciseTemplateRequest(args));
3534
3545
  }
3535
3546
  },
3536
3547
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-mcp",
3
- "version": "4.1.1",
3
+ "version": "4.1.2",
4
4
  "private": false,
5
5
  "description": "A Model Context Protocol (MCP) server implementation that interfaces with the Hevy fitness tracking app and its API.",
6
6
  "repository": {
@@ -35,24 +35,24 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@modelcontextprotocol/sdk": "^1.29.0",
38
- "@opentelemetry/api": "^1.9.0",
39
- "@opentelemetry/exporter-metrics-otlp-http": "^0.220.0",
40
- "@opentelemetry/exporter-trace-otlp-http": "^0.220.0",
41
- "@opentelemetry/resources": "^2.9.0",
42
- "@opentelemetry/sdk-metrics": "^2.9.0",
43
- "@opentelemetry/sdk-trace-base": "^2.9.0",
44
- "@opentelemetry/sdk-trace-node": "^2.9.0",
45
- "@sentry/node": "^10.58.0",
46
- "@sentry/opentelemetry": "^10.58.0",
38
+ "@opentelemetry/api": "^1.9.1",
39
+ "@opentelemetry/exporter-metrics-otlp-http": "^0.221.0",
40
+ "@opentelemetry/exporter-trace-otlp-http": "^0.221.0",
41
+ "@opentelemetry/resources": "^2.10.0",
42
+ "@opentelemetry/sdk-metrics": "^2.10.0",
43
+ "@opentelemetry/sdk-trace-base": "^2.10.0",
44
+ "@opentelemetry/sdk-trace-node": "^2.10.0",
45
+ "@sentry/node": "^10.68.0",
46
+ "@sentry/opentelemetry": "^10.68.0",
47
47
  "semver": "^7.8.5",
48
48
  "zod": "^4.4.3"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@hevy-mcp/core": "*",
52
52
  "@hevy-mcp/hevy-client": "*",
53
- "@types/node": "^26.0.0",
53
+ "@types/node": "^26.1.1",
54
54
  "cross-env": "^10.1.0",
55
- "tsdown": "^0.22.2",
55
+ "tsdown": "^0.22.14",
56
56
  "typescript": "^7.0.2"
57
57
  },
58
58
  "engines": {
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "url": "https://github.com/chrisdoc/hevy-mcp",
8
8
  "source": "github"
9
9
  },
10
- "version": "4.1.1",
10
+ "version": "4.1.2",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "hevy-mcp",
15
- "version": "4.1.1",
15
+ "version": "4.1.2",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },