@trainheroic-unofficial/athlete-mcp 3.7.2 → 4.0.0

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.
Files changed (2) hide show
  1. package/dist/server.mjs +15 -3
  2. package/package.json +3 -3
package/dist/server.mjs CHANGED
@@ -733,14 +733,26 @@ const exerciseSpecSchema = z.object({
733
733
  z.number(),
734
734
  z.string(),
735
735
  z.array(z.union([z.number(), z.string()]))
736
- ]).optional(),
736
+ ]).optional().describe("Primary slot values; may be reps, distance, or time. State primaryUnit."),
737
737
  sets: z.number().optional(),
738
- weight: z.union([z.number(), z.array(z.number())]).optional(),
738
+ weight: z.union([z.number(), z.array(z.number())]).optional().describe("Secondary slot values; may be weight or time. State secondaryUnit."),
739
+ primaryUnit: z.string().trim().min(1).optional().describe("Intended primary unit from exercise_resolve, such as reps, m, mi, or sec."),
740
+ secondaryUnit: z.string().trim().min(1).optional().describe("Intended secondary unit from exercise_resolve, such as lb or sec."),
739
741
  rpe: z.union([z.number(), z.string()]).optional(),
740
742
  instr: z.string().optional(),
741
743
  param_1_type: z.number().optional(),
742
744
  param_2_type: z.number().optional()
743
745
  }).superRefine((exercise, ctx) => {
746
+ if (exercise.reps !== void 0 && exercise.primaryUnit === void 0) ctx.addIssue({
747
+ code: "custom",
748
+ message: "primaryUnit is required when reps contains primary slot values.",
749
+ path: ["primaryUnit"]
750
+ });
751
+ if (exercise.weight !== void 0 && exercise.secondaryUnit === void 0) ctx.addIssue({
752
+ code: "custom",
753
+ message: "secondaryUnit is required when weight contains secondary slot values.",
754
+ path: ["secondaryUnit"]
755
+ });
744
756
  if (Array.isArray(exercise.reps) && Array.isArray(exercise.weight) && exercise.reps.length !== exercise.weight.length) ctx.addIssue({
745
757
  code: "custom",
746
758
  message: `Per-set reps and weight arrays must have the same length; received ${exercise.reps.length} reps and ${exercise.weight.length} weights.`,
@@ -3213,7 +3225,7 @@ function registerAthleteTrainingTools(server, ctx) {
3213
3225
  }
3214
3226
  //#endregion
3215
3227
  //#region package.json
3216
- var version = "3.7.2";
3228
+ var version = "4.0.0";
3217
3229
  //#endregion
3218
3230
  //#region src/server.ts
3219
3231
  function main() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trainheroic-unofficial/athlete-mcp",
3
- "version": "3.7.2",
3
+ "version": "4.0.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,8 +21,8 @@
21
21
  "dependencies": {
22
22
  "@modelcontextprotocol/server": "2.0.0",
23
23
  "zod": "^4.6.3",
24
- "@trainheroic-unofficial/core": "3.7.2",
25
- "@trainheroic-unofficial/js": "3.7.2"
24
+ "@trainheroic-unofficial/core": "4.0.0",
25
+ "@trainheroic-unofficial/js": "4.0.0"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^26.5.1",