@epic-web/workshop-mcp 6.63.1 → 6.64.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/index.js CHANGED
@@ -22,9 +22,6 @@ if (env.EPICSHOP_IS_PUBLISHED && env.SENTRY_DSN) {
22
22
  const server = new McpServer({
23
23
  name: 'epicshop',
24
24
  version: '1.0.0',
25
- capabilities: {
26
- tools: {},
27
- },
28
25
  },
29
26
  // TODO: add some common workflows to the instructions
30
27
  {
package/dist/prompts.d.ts CHANGED
@@ -1,12 +1,11 @@
1
1
  import { type McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { type GetPromptResult } from '@modelcontextprotocol/sdk/types.js';
3
- import { z } from 'zod';
4
- export declare const quizMeInputSchema: {
5
- workshopDirectory: z.ZodString;
6
- exerciseNumber: z.ZodOptional<z.ZodString>;
7
- };
3
+ import { z } from 'zod/v3';
4
+ type PromptInputSchema = Record<string, z.ZodTypeAny>;
5
+ export declare const quizMeInputSchema: PromptInputSchema;
8
6
  export declare function quizMe({ workshopDirectory, exerciseNumber: providedExerciseNumber, }: {
9
7
  workshopDirectory: string;
10
8
  exerciseNumber?: string;
11
9
  }): Promise<GetPromptResult>;
12
10
  export declare function initPrompts(server: McpServer): void;
11
+ export {};
package/dist/prompts.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { getExercises } from '@epic-web/workshop-utils/apps.server';
2
2
  import { getWorkshopConfig } from '@epic-web/workshop-utils/config.server';
3
- import { z } from 'zod';
3
+ import { z } from 'zod/v3';
4
4
  import { exerciseContextResource } from "./resources.js";
5
5
  import { formatPromptDescription, promptDocs } from "./server-metadata.js";
6
6
  import { handleWorkshopDirectory, workshopDirectoryInputSchema, } from "./utils.js";
@@ -49,7 +49,8 @@ Please use this context to provide quiz questions, one at a time, to me to help
49
49
  };
50
50
  }
51
51
  export function initPrompts(server) {
52
- server.registerPrompt('quiz_me', {
52
+ const registerPrompt = server.registerPrompt.bind(server);
53
+ registerPrompt('quiz_me', {
53
54
  title: promptDocs.quiz_me.title,
54
55
  description: formatPromptDescription(promptDocs.quiz_me),
55
56
  argsSchema: quizMeInputSchema,
@@ -1,6 +1,6 @@
1
1
  import { type McpServer, ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { type ReadResourceResult } from '@modelcontextprotocol/sdk/types.js';
3
- import { z } from 'zod';
3
+ import { z } from 'zod/v3';
4
4
  import { type InputSchemaType } from "./utils.js";
5
5
  export declare const getWorkshopContextInputSchema: {
6
6
  workshopDirectory: z.ZodString;
package/dist/resources.js CHANGED
@@ -4,7 +4,7 @@ import { extractNumbersAndTypeFromAppNameOrPath, findSolutionDir, getApps, getEx
4
4
  import { getAuthInfo } from '@epic-web/workshop-utils/db.server';
5
5
  import { getEpicVideoInfos, userHasAccessToWorkshop, getUserInfo, getProgress, } from '@epic-web/workshop-utils/epic-api.server';
6
6
  import { ResourceTemplate, } from '@modelcontextprotocol/sdk/server/mcp.js';
7
- import { z } from 'zod';
7
+ import { z } from 'zod/v3';
8
8
  import { resourceDocs } from "./server-metadata.js";
9
9
  import { handleWorkshopDirectory, readInWorkshop, safeReadFile, workshopDirectoryInputSchema, } from "./utils.js";
10
10
  export const getWorkshopContextInputSchema = {
package/dist/tools.js CHANGED
@@ -9,7 +9,7 @@ import { getProgress, getUserInfo, updateProgress, } from '@epic-web/workshop-ut
9
9
  import { launchEditor } from '@epic-web/workshop-utils/launch-editor.server';
10
10
  import { createUIResource } from '@mcp-ui/server';
11
11
  import * as client from 'openid-client';
12
- import { z } from 'zod';
12
+ import { z } from 'zod/v3';
13
13
  import { quizMe, quizMeInputSchema } from "./prompts.js";
14
14
  import { diffBetweenAppsResource, exerciseContextResource, exerciseStepContextResource, exerciseStepProgressDiffResource, userAccessResource, userInfoResource, userProgressResource, workshopContextResource, } from "./resources.js";
15
15
  import { formatToolDescription, toolDocs, } from "./server-metadata.js";
@@ -72,7 +72,7 @@ function formatSavedPlaygroundTimestamp(createdAt) {
72
72
  }).format(createdAtDate);
73
73
  }
74
74
  function parseResourceText(resource) {
75
- if (typeof resource.text === 'string') {
75
+ if ('text' in resource && typeof resource.text === 'string') {
76
76
  try {
77
77
  return JSON.parse(resource.text);
78
78
  }
@@ -916,14 +916,20 @@ function getEmbeddedResourceContent(resource) {
916
916
  resource,
917
917
  };
918
918
  }
919
- else if (typeof resource.text === 'string') {
919
+ else if ('text' in resource && typeof resource.text === 'string') {
920
920
  return {
921
921
  type: 'text',
922
922
  text: resource.text,
923
923
  };
924
924
  }
925
+ else if ('blob' in resource) {
926
+ return {
927
+ type: 'text',
928
+ text: `Binary resource ${resource.uri} (${resource.mimeType ?? 'unknown'})`,
929
+ };
930
+ }
925
931
  else {
926
- throw new Error(`Unknown resource type: ${resource.type} for ${resource.uri}`);
932
+ throw new Error(`Unknown resource content for ${resource.uri}`);
927
933
  }
928
934
  }
929
935
  function createText(text) {
package/dist/utils.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import { z } from 'zod/v3';
2
2
  export declare const workshopDirectoryInputSchema: z.ZodString;
3
3
  export declare function handleWorkshopDirectory(workshopDirectory: string): Promise<string>;
4
4
  export declare const inWorkshop: (...d: Array<string>) => string;
package/dist/utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import fs from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { getWorkshopRoot, init as initApps, } from '@epic-web/workshop-utils/apps.server';
4
- import { z } from 'zod';
4
+ import { z } from 'zod/v3';
5
5
  export const workshopDirectoryInputSchema = z
6
6
  .string()
7
7
  .describe('Absolute path to the workshop root directory. Passing a /playground path is allowed and will be normalized to the workshop root.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epic-web/workshop-mcp",
3
- "version": "6.63.1",
3
+ "version": "6.64.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -8,6 +8,9 @@
8
8
  "type": "module",
9
9
  "zshy": {
10
10
  "cjs": false,
11
+ "conditions": {
12
+ "import": "esm"
13
+ },
11
14
  "exports": {
12
15
  "./package.json": "./package.json",
13
16
  ".": "./src/index.ts"
@@ -17,8 +20,9 @@
17
20
  "exports": {
18
21
  "./package.json": "./package.json",
19
22
  ".": {
23
+ "import": "./dist/index.js",
20
24
  "types": "./dist/index.d.ts",
21
- "import": "./dist/index.js"
25
+ "default": "./dist/index.js"
22
26
  }
23
27
  },
24
28
  "files": [
@@ -35,20 +39,20 @@
35
39
  },
36
40
  "dependencies": {
37
41
  "@epic-web/invariant": "^1.0.0",
38
- "@epic-web/workshop-utils": "6.63.1",
39
- "@mcp-ui/server": "^5.13.1",
40
- "@modelcontextprotocol/sdk": "^1.21.1",
41
- "@sentry/node": "^10.25.0",
42
+ "@epic-web/workshop-utils": "6.64.1",
43
+ "@mcp-ui/server": "^5.16.3",
44
+ "@modelcontextprotocol/sdk": "^1.25.2",
45
+ "@sentry/node": "^10.35.0",
42
46
  "openid-client": "^6.8.1",
43
- "zod": "^3.25.76"
47
+ "zod": "^4.3.5"
44
48
  },
45
49
  "devDependencies": {
46
- "@modelcontextprotocol/inspector": "^0.17.2",
47
- "@types/node": "^24.10.0",
48
- "zshy": "^0.3.0",
49
- "tsx": "^4.20.6",
50
+ "@modelcontextprotocol/inspector": "^0.18.0",
51
+ "@types/node": "^25.0.9",
52
+ "tsx": "^4.21.0",
50
53
  "typescript": "^5.9.3",
51
- "vitest": "^4.0.8"
54
+ "vitest": "^4.0.17",
55
+ "zshy": "^0.7.0"
52
56
  },
53
57
  "repository": {
54
58
  "type": "git",