@trainheroic-unofficial/core 0.4.1 → 0.4.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/index.d.mts +12 -1
- package/dist/index.mjs +12 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -59,6 +59,17 @@ declare const NOT_CONFIRMED = "Not confirmed. Re-run with confirm:true, or conne
|
|
|
59
59
|
*/
|
|
60
60
|
declare function confirmGate(server: McpServer, requestId: string | number | undefined, message: string, confirmArg: boolean | undefined): Promise<boolean>;
|
|
61
61
|
//#endregion
|
|
62
|
+
//#region src/instructions.d.ts
|
|
63
|
+
/**
|
|
64
|
+
* Server-level guidance passed as the MCP `instructions` string. The host model receives it
|
|
65
|
+
* in the initialize result and treats it like a system hint. Its job is to stop tool-layer
|
|
66
|
+
* implementation details from leaking into user-facing replies: by default a model narrates
|
|
67
|
+
* capability using the raw snake_case tool name (e.g. `athlete_session_create`), and the tool
|
|
68
|
+
* descriptions here reference each other by name to drive correct chaining, which primes that
|
|
69
|
+
* leak further. This tells the host to keep that wiring internal and speak in app terms.
|
|
70
|
+
*/
|
|
71
|
+
declare const SERVER_INSTRUCTIONS: string;
|
|
72
|
+
//#endregion
|
|
62
73
|
//#region src/tools/reads.d.ts
|
|
63
74
|
/** Read-only coach/athlete queries. Exercise lookups live in the exercise store tools. */
|
|
64
75
|
declare function registerReadTools(server: McpServer, ctx: ToolContext): void;
|
|
@@ -116,4 +127,4 @@ declare function registerWorkoutTools(server: McpServer, ctx: ToolContext): void
|
|
|
116
127
|
/** Live messaging: list/read conversations, draft a message, and the gated send/delete. */
|
|
117
128
|
declare function registerMessagingTools(server: McpServer, ctx: ToolContext): void;
|
|
118
129
|
//#endregion
|
|
119
|
-
export { AthleteContext, BudgetHint, DEFAULT_RESULT_BUDGET, DESTRUCTIVE, NOT_CONFIRMED, READ, SYNC, ToolContext, apiCall, attempt, boundedSerialize, confirmGate, errorResult, idParam, jsonResult, registerAnalyticsTools, registerAthleteTools, registerAthleteTrainingTools, registerExerciseTools, registerMessagingTools, registerReadTools, registerTeamTools, registerWorkoutTools, resultBudget, toId };
|
|
130
|
+
export { AthleteContext, BudgetHint, DEFAULT_RESULT_BUDGET, DESTRUCTIVE, NOT_CONFIRMED, READ, SERVER_INSTRUCTIONS, SYNC, ToolContext, apiCall, attempt, boundedSerialize, confirmGate, errorResult, idParam, jsonResult, registerAnalyticsTools, registerAthleteTools, registerAthleteTrainingTools, registerExerciseTools, registerMessagingTools, registerReadTools, registerTeamTools, registerWorkoutTools, resultBudget, toId };
|
package/dist/index.mjs
CHANGED
|
@@ -188,6 +188,17 @@ async function confirmGate(server, requestId, message, confirmArg) {
|
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
190
|
//#endregion
|
|
191
|
+
//#region src/instructions.ts
|
|
192
|
+
/**
|
|
193
|
+
* Server-level guidance passed as the MCP `instructions` string. The host model receives it
|
|
194
|
+
* in the initialize result and treats it like a system hint. Its job is to stop tool-layer
|
|
195
|
+
* implementation details from leaking into user-facing replies: by default a model narrates
|
|
196
|
+
* capability using the raw snake_case tool name (e.g. `athlete_session_create`), and the tool
|
|
197
|
+
* descriptions here reference each other by name to drive correct chaining, which primes that
|
|
198
|
+
* leak further. This tells the host to keep that wiring internal and speak in app terms.
|
|
199
|
+
*/
|
|
200
|
+
const SERVER_INSTRUCTIONS = "Speak to the user in plain, everyday language about their training. Describe what you are doing in the TrainHeroic app's own terms (for example, say you are creating a workout rather than naming a tool). Do not surface internal tool names (the snake_case identifiers such as athlete_session_create), raw parameter names, or numeric ids in your replies unless the user explicitly asks for them; they are implementation details. The tool descriptions cross-reference each other by name only so you can chain them correctly. Keep that wiring to yourself.";
|
|
201
|
+
//#endregion
|
|
191
202
|
//#region src/tools/reads.ts
|
|
192
203
|
function enc(value) {
|
|
193
204
|
return encodeURIComponent(String(value));
|
|
@@ -1087,4 +1098,4 @@ function registerMessagingTools(server, ctx) {
|
|
|
1087
1098
|
registerWrites(server, ctx);
|
|
1088
1099
|
}
|
|
1089
1100
|
//#endregion
|
|
1090
|
-
export { DEFAULT_RESULT_BUDGET, DESTRUCTIVE, NOT_CONFIRMED, READ, SYNC, apiCall, attempt, boundedSerialize, confirmGate, errorResult, idParam, jsonResult, registerAnalyticsTools, registerAthleteTools, registerAthleteTrainingTools, registerExerciseTools, registerMessagingTools, registerReadTools, registerTeamTools, registerWorkoutTools, resultBudget, toId };
|
|
1101
|
+
export { DEFAULT_RESULT_BUDGET, DESTRUCTIVE, NOT_CONFIRMED, READ, SERVER_INSTRUCTIONS, SYNC, apiCall, attempt, boundedSerialize, confirmGate, errorResult, idParam, jsonResult, registerAnalyticsTools, registerAthleteTools, registerAthleteTrainingTools, registerExerciseTools, registerMessagingTools, registerReadTools, registerTeamTools, registerWorkoutTools, resultBudget, toId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/core",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"@cfworker/json-schema": "^4.1.1",
|
|
26
26
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
27
27
|
"zod": "^4.4.3",
|
|
28
|
-
"@trainheroic-unofficial/dto": "0.4.
|
|
29
|
-
"@trainheroic-unofficial/js": "0.4.
|
|
28
|
+
"@trainheroic-unofficial/dto": "0.4.2",
|
|
29
|
+
"@trainheroic-unofficial/js": "0.4.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^26.0.0",
|