@trainheroic-unofficial/core 3.3.1 → 3.3.3
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 +4 -4
- package/dist/index.mjs +13 -7
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -9,23 +9,23 @@ declare function toId(value: string | number): number;
|
|
|
9
9
|
declare const READ: {
|
|
10
10
|
readonly readOnlyHint: true;
|
|
11
11
|
readonly destructiveHint: false;
|
|
12
|
-
readonly openWorldHint:
|
|
12
|
+
readonly openWorldHint: false;
|
|
13
13
|
};
|
|
14
14
|
declare const ADDITIVE: {
|
|
15
15
|
readonly readOnlyHint: false;
|
|
16
16
|
readonly destructiveHint: false;
|
|
17
|
-
readonly openWorldHint:
|
|
17
|
+
readonly openWorldHint: false;
|
|
18
18
|
};
|
|
19
19
|
declare const SYNC: {
|
|
20
20
|
readonly readOnlyHint: false;
|
|
21
21
|
readonly idempotentHint: true;
|
|
22
22
|
readonly destructiveHint: false;
|
|
23
|
-
readonly openWorldHint:
|
|
23
|
+
readonly openWorldHint: false;
|
|
24
24
|
};
|
|
25
25
|
declare const DESTRUCTIVE: {
|
|
26
26
|
readonly readOnlyHint: false;
|
|
27
27
|
readonly destructiveHint: true;
|
|
28
|
-
readonly openWorldHint:
|
|
28
|
+
readonly openWorldHint: false;
|
|
29
29
|
};
|
|
30
30
|
/** Everything a tool handler needs: the authenticated client and the exercise index. */
|
|
31
31
|
type ToolContext = {
|
package/dist/index.mjs
CHANGED
|
@@ -11,23 +11,23 @@ function toId(value) {
|
|
|
11
11
|
const READ = {
|
|
12
12
|
readOnlyHint: true,
|
|
13
13
|
destructiveHint: false,
|
|
14
|
-
openWorldHint:
|
|
14
|
+
openWorldHint: false
|
|
15
15
|
};
|
|
16
16
|
const ADDITIVE = {
|
|
17
17
|
readOnlyHint: false,
|
|
18
18
|
destructiveHint: false,
|
|
19
|
-
openWorldHint:
|
|
19
|
+
openWorldHint: false
|
|
20
20
|
};
|
|
21
21
|
const SYNC = {
|
|
22
22
|
readOnlyHint: false,
|
|
23
23
|
idempotentHint: true,
|
|
24
24
|
destructiveHint: false,
|
|
25
|
-
openWorldHint:
|
|
25
|
+
openWorldHint: false
|
|
26
26
|
};
|
|
27
27
|
const DESTRUCTIVE = {
|
|
28
28
|
readOnlyHint: false,
|
|
29
29
|
destructiveHint: true,
|
|
30
|
-
openWorldHint:
|
|
30
|
+
openWorldHint: false
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
33
33
|
* Run a tool body, converting thrown errors into an in-band tool error. Generic so a caller that
|
|
@@ -979,7 +979,10 @@ function registerAthleteTools(server, ctx) {
|
|
|
979
979
|
confirm: z.boolean().optional()
|
|
980
980
|
},
|
|
981
981
|
outputSchema: toolOutputSchema(athleteInviteOutputSchema),
|
|
982
|
-
annotations:
|
|
982
|
+
annotations: {
|
|
983
|
+
...DESTRUCTIVE,
|
|
984
|
+
openWorldHint: true
|
|
985
|
+
}
|
|
983
986
|
}, ({ teamId, emails, message, confirm }, extra) => attempt(async () => {
|
|
984
987
|
const list = asEmailList(emails);
|
|
985
988
|
if (list.length === 0) return errorResult("Provide at least one email address to invite.");
|
|
@@ -1020,7 +1023,7 @@ function registerAthleteTools(server, ctx) {
|
|
|
1020
1023
|
readOnlyHint: false,
|
|
1021
1024
|
idempotentHint: true,
|
|
1022
1025
|
destructiveHint: false,
|
|
1023
|
-
openWorldHint:
|
|
1026
|
+
openWorldHint: false
|
|
1024
1027
|
}
|
|
1025
1028
|
}, ({ athleteIds }) => apiCall(ctx, "PUT", "/v5/athletes/restore", { body: { athleteIds: athleteIds.map(toId) } }));
|
|
1026
1029
|
registerAthleteLogTools(server, ctx);
|
|
@@ -1667,7 +1670,10 @@ function registerWrites(server, ctx) {
|
|
|
1667
1670
|
confirm: z.boolean().optional()
|
|
1668
1671
|
},
|
|
1669
1672
|
outputSchema: toolOutputSchema(messageSentOutputSchema),
|
|
1670
|
-
annotations:
|
|
1673
|
+
annotations: {
|
|
1674
|
+
...DESTRUCTIVE,
|
|
1675
|
+
openWorldHint: true
|
|
1676
|
+
}
|
|
1671
1677
|
}, ({ streamId, text, replyTo, confirm }, extra) => attempt(async () => {
|
|
1672
1678
|
const id = toId(streamId);
|
|
1673
1679
|
const blocked = confirmGate(extra, `Send this message to stream ${id}? It is athlete-facing and immediate.`, confirm);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trainheroic-unofficial/core",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
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/server": "2.0.0",
|
|
27
27
|
"zod": "^4.4.3",
|
|
28
|
-
"@trainheroic-unofficial/dto": "3.3.
|
|
29
|
-
"@trainheroic-unofficial/js": "3.3.
|
|
28
|
+
"@trainheroic-unofficial/dto": "3.3.3",
|
|
29
|
+
"@trainheroic-unofficial/js": "3.3.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^26.2.0",
|