@trainheroic-unofficial/coach-mcp 3.3.0 → 3.3.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.
- package/dist/server.mjs +20 -10
- package/package.json +3 -3
package/dist/server.mjs
CHANGED
|
@@ -4122,16 +4122,20 @@ function registerTeamTools(server, ctx) {
|
|
|
4122
4122
|
}, ({ title }) => apiCall(ctx, "POST", "/1.0/coach/team/createWithTitleAndCode", { body: { title } }));
|
|
4123
4123
|
server.registerTool("team_update", {
|
|
4124
4124
|
title: "Update a team",
|
|
4125
|
-
description: "Update a team's title and/or reassign its calendar (PUT /v5/teams/{teamId}). Pass groupProgram (a program/calendar id — typically another team's group_program from list_teams, or get_team) to point this team at an existing parent program. At least one of title or groupProgram is required; when only groupProgram is set the current title is preserved.",
|
|
4125
|
+
description: "Update a team's title and/or reassign its calendar (PUT /v5/teams/{teamId}). Pass groupProgram (a program/calendar id — typically another team's group_program from list_teams, or get_team) to point this team at an existing parent program. At least one of title or groupProgram is required; when only groupProgram is set the current title is preserved. Requires confirmation (elicitation, or confirm:true).",
|
|
4126
4126
|
inputSchema: {
|
|
4127
4127
|
teamId: idParam,
|
|
4128
4128
|
title: z.string().min(1).optional(),
|
|
4129
|
-
groupProgram: idParam.optional()
|
|
4129
|
+
groupProgram: idParam.optional(),
|
|
4130
|
+
confirm: z.boolean().optional()
|
|
4130
4131
|
},
|
|
4131
4132
|
outputSchema: opaqueOutputSchema,
|
|
4132
|
-
annotations:
|
|
4133
|
-
}, ({ teamId, title, groupProgram }) => attempt(async () => {
|
|
4134
|
-
const
|
|
4133
|
+
annotations: DESTRUCTIVE
|
|
4134
|
+
}, ({ teamId, title, groupProgram, confirm }, extra) => attempt(async () => {
|
|
4135
|
+
const id = toId(teamId);
|
|
4136
|
+
const blocked = confirmGate(extra, `Update team ${id}? This overwrites its live title and/or calendar assignment.`, confirm);
|
|
4137
|
+
if (blocked) return blocked;
|
|
4138
|
+
const args = { teamId: id };
|
|
4135
4139
|
if (title !== void 0) args.title = title;
|
|
4136
4140
|
if (groupProgram !== void 0) args.groupProgram = toId(groupProgram);
|
|
4137
4141
|
return jsonResult(await updateTeam(ctx.client, args));
|
|
@@ -4278,14 +4282,20 @@ function registerAnalyticsTools(server, ctx) {
|
|
|
4278
4282
|
function registerExerciseUpdate(server, index) {
|
|
4279
4283
|
server.registerTool("exercise_update", {
|
|
4280
4284
|
title: "Update custom exercise",
|
|
4281
|
-
description: "Update a custom exercise (POST /2.0/coach/exercise/update/{id}) and write it through to the mirror. Same body as exercise_create. Only works for exercises with can_edit:1.",
|
|
4285
|
+
description: "Update a custom exercise (POST /2.0/coach/exercise/update/{id}) and write it through to the mirror. Same body as exercise_create. Only works for exercises with can_edit:1. Requires confirmation (elicitation, or confirm:true).",
|
|
4282
4286
|
inputSchema: {
|
|
4283
4287
|
id: idParam,
|
|
4284
|
-
exercise: exerciseCreateSchema
|
|
4288
|
+
exercise: exerciseCreateSchema,
|
|
4289
|
+
confirm: z.boolean().optional()
|
|
4285
4290
|
},
|
|
4286
4291
|
outputSchema: toolOutputSchema(exerciseCreatedOutputSchema),
|
|
4287
|
-
annotations:
|
|
4288
|
-
}, ({ id, exercise }) => attempt(async () =>
|
|
4292
|
+
annotations: DESTRUCTIVE
|
|
4293
|
+
}, ({ id, exercise, confirm }, extra) => attempt(async () => {
|
|
4294
|
+
const exerciseId = toId(id);
|
|
4295
|
+
const blocked = confirmGate(extra, `Update custom exercise ${exerciseId}? This overwrites its live TrainHeroic definition.`, confirm);
|
|
4296
|
+
if (blocked) return blocked;
|
|
4297
|
+
return jsonResult(await index.update(exerciseId, exercise));
|
|
4298
|
+
}));
|
|
4289
4299
|
}
|
|
4290
4300
|
function registerExerciseDelete(server, index) {
|
|
4291
4301
|
server.registerTool("exercise_delete", {
|
|
@@ -4683,7 +4693,7 @@ var JsonFileLibraryCache = class {
|
|
|
4683
4693
|
};
|
|
4684
4694
|
//#endregion
|
|
4685
4695
|
//#region package.json
|
|
4686
|
-
var version = "3.3.
|
|
4696
|
+
var version = "3.3.1";
|
|
4687
4697
|
//#endregion
|
|
4688
4698
|
//#region src/server.ts
|
|
4689
4699
|
function main() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/coach-mcp",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.1",
|
|
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.4.3",
|
|
24
|
-
"@trainheroic-unofficial/core": "3.3.
|
|
25
|
-
"@trainheroic-unofficial/js": "3.3.
|
|
24
|
+
"@trainheroic-unofficial/core": "3.3.1",
|
|
25
|
+
"@trainheroic-unofficial/js": "3.3.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^26.2.0",
|