@fullstackcraftllc/codevideo-mcp 1.0.2 → 1.1.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 (44) hide show
  1. package/README.md +98 -5
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +3370 -1935
  4. package/dist/index.js.map +7 -0
  5. package/package.json +40 -33
  6. package/bin/darwin-arm64/codevideo-cli +0 -0
  7. package/bin/darwin-x64/codevideo-cli +0 -0
  8. package/bin/linux-x64/codevideo-cli +0 -0
  9. package/bin/win32-x64/codevideo-cli.exe +0 -0
  10. package/dist/src/constants/Constants.d.ts +0 -2
  11. package/dist/src/index.d.ts +0 -2
  12. package/dist/src/prompts/instructions_to_create_a_course.d.ts +0 -1
  13. package/dist/src/prompts/instructions_to_create_lesson_actions.d.ts +0 -1
  14. package/dist/src/prompts/instructions_to_create_lesson_video.d.ts +0 -1
  15. package/dist/src/prompts/instructions_to_translate_actions.d.ts +0 -2
  16. package/dist/src/resources/get_action_names.d.ts +0 -4
  17. package/dist/src/resources/get_example_actions_array_by_keyword.d.ts +0 -1
  18. package/dist/src/resources/get_example_lessons_by_keyword.d.ts +0 -1
  19. package/dist/src/rest-server/index.d.ts +0 -24
  20. package/dist/src/rest-server/job-manager.d.ts +0 -56
  21. package/dist/src/rest-server/mcp-client.d.ts +0 -23
  22. package/dist/src/rest-server/rest-server.d.ts +0 -24
  23. package/dist/src/rest-server/server.d.ts +0 -4
  24. package/dist/src/tools/add_actions_to_lesson.d.ts +0 -2
  25. package/dist/src/tools/add_final_snapshot_to_lesson.d.ts +0 -2
  26. package/dist/src/tools/add_initial_snapshot_to_lesson.d.ts +0 -2
  27. package/dist/src/tools/add_lesson_to_course.d.ts +0 -2
  28. package/dist/src/tools/create_course_with_initial_metadata.d.ts +0 -1
  29. package/dist/src/tools/critique_video_using_gemini.d.ts +0 -2
  30. package/dist/src/tools/get_current_actions.d.ts +0 -3
  31. package/dist/src/tools/get_current_lesson.d.ts +0 -3
  32. package/dist/src/tools/get_empty_lesson_snapshot.d.ts +0 -1
  33. package/dist/src/tools/get_final_lesson_snapshot.d.ts +0 -2
  34. package/dist/src/tools/get_initial_lesson_state_from_github_repo.d.ts +0 -1
  35. package/dist/src/tools/get_initial_lesson_state_from_local_repo.d.ts +0 -1
  36. package/dist/src/tools/is_repeatable_action.d.ts +0 -2
  37. package/dist/src/tools/make_blog_post.d.ts +0 -2
  38. package/dist/src/tools/make_html_web_page.d.ts +0 -2
  39. package/dist/src/tools/make_video_from_actions.d.ts +0 -8
  40. package/dist/src/tools/make_video_from_lesson.d.ts +0 -8
  41. package/dist/src/tools/set_current_actions.d.ts +0 -2
  42. package/dist/src/tools/set_current_lesson.d.ts +0 -2
  43. package/dist/src/tools/validate_actions.d.ts +0 -6
  44. package/dist/src/utils/getBinaryPath.d.ts +0 -1
package/package.json CHANGED
@@ -1,29 +1,42 @@
1
1
  {
2
2
  "name": "@fullstackcraftllc/codevideo-mcp",
3
- "version": "1.0.2",
3
+ "version": "1.1.0",
4
4
  "description": "The MCP server for CodeVideo. Create software educational content using natural language.",
5
5
  "type": "module",
6
- "main": "dist/index.cjs.js",
7
- "module": "dist/index.esm.js",
6
+ "main": "dist/index.js",
8
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
9
14
  "files": [
10
15
  "dist/",
11
- "bin/",
12
16
  "README.md"
13
17
  ],
14
18
  "bin": {
15
- "codevideo-mcp": "dist/index.cjs.js"
19
+ "codevideo-mcp": "dist/index.js"
20
+ },
21
+ "engines": {
22
+ "node": ">=22.13"
16
23
  },
17
24
  "scripts": {
18
25
  "clean": "rimraf dist",
19
- "build": "npm run clean && rollup -c",
26
+ "build": "npm run clean && node scripts/build.mjs",
20
27
  "build-typescript": "tsc",
21
- "test": "jest",
28
+ "test": "node --import tsx --test test/*.test.ts",
22
29
  "type-check": "tsc --noEmit",
30
+ "prepack": "npm run build",
31
+ "prepublishOnly": "npm run release:check",
32
+ "verify-package": "node scripts/verify-package.mjs",
33
+ "smoke:packed": "node scripts/smoke-packed.mjs",
34
+ "release:check": "npm run type-check && npm test && npm run build && npm run verify-package && npm run smoke:packed && npm audit --omit=dev --audit-level=critical",
23
35
  "download-binaries": "tsx scripts/download-binaries.ts",
24
36
  "rest-server": "tsx src/rest-server/server.ts",
25
37
  "rest-server:dev": "tsx --watch src/rest-server/server.ts",
26
38
  "client:example": "tsx examples/rest-client.ts",
39
+ "client:agent-example": "tsx examples/agent-client.ts",
27
40
  "examples:curl": "./examples/curl-examples.sh"
28
41
  },
29
42
  "repository": {
@@ -44,36 +57,30 @@
44
57
  "homepage": "https://github.com/codevideo/codevideo-mcp#readme",
45
58
  "dependencies": {
46
59
  "@fullstackcraftllc/codevideo-adapters": "^1.0.12",
47
- "@fullstackcraftllc/codevideo-exporters": "^0.0.9",
48
- "@fullstackcraftllc/codevideo-types": "^2.1.26",
49
- "@google/genai": "^0.14.1",
50
- "@modelcontextprotocol/sdk": "^1.10.0",
51
- "@types/better-sqlite3": "^7.6.13",
52
- "better-sqlite3": "^11.10.0",
53
- "cors": "^2.8.5",
60
+ "@fullstackcraftllc/codevideo-cli": "~0.0.13",
61
+ "@fullstackcraftllc/codevideo-dynamic-ast": "^1.0.5",
62
+ "@fullstackcraftllc/codevideo-exporters": "^0.0.15",
63
+ "@fullstackcraftllc/codevideo-types": "^2.6.2",
64
+ "@fullstackcraftllc/codevideo-virtual-ide": "^1.0.43",
65
+ "@google/genai": "^2.10.0",
66
+ "@modelcontextprotocol/sdk": "^1.32.2",
54
67
  "dotenv": "^16.5.0",
55
- "express": "^4.21.2",
56
- "node-fetch": "^3.3.2",
57
- "socket.io": "^4.8.1",
58
- "uuid": "^9.0.1",
59
- "ws": "^8.18.2"
68
+ "uuid": "^11.1.1",
69
+ "zod": "^3.25.76"
60
70
  },
61
71
  "devDependencies": {
62
- "@rollup/plugin-commonjs": "^28.0.3",
63
- "@rollup/plugin-json": "^6.1.0",
64
- "@rollup/plugin-node-resolve": "^16.0.1",
65
- "@rollup/plugin-typescript": "^12.1.2",
66
72
  "@types/cors": "^2.8.19",
67
- "@types/express": "^4.17.23",
68
- "@types/node": "^22.14.1",
69
- "@types/uuid": "^9.0.8",
73
+ "@types/express": "^4.17.25",
74
+ "@types/node": "^22.20.0",
70
75
  "@types/ws": "^8.18.1",
71
- "rimraf": "^6.0.1",
72
- "rollup": "^4.40.0",
73
- "rollup-plugin-dts": "^6.2.1",
74
- "rollup-plugin-typescript2": "^0.36.0",
75
- "tslib": "^2.8.1",
76
- "tsx": "^4.19.4",
77
- "typescript": "^5.8.3"
76
+ "cors": "^2.8.6",
77
+ "esbuild": "^0.28.1",
78
+ "express": "^4.22.3",
79
+ "node-fetch": "^3.3.2",
80
+ "rimraf": "^6.1.3",
81
+ "socket.io": "^4.8.4",
82
+ "tsx": "^4.22.4",
83
+ "typescript": "^5.9.3",
84
+ "ws": "^8.22.1"
78
85
  }
79
86
  }
Binary file
Binary file
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- export declare const CURRENT_ACTIONS_KEY = "current_actions";
2
- export declare const CURRENT_LESSON_KEY = "current_lesson";
@@ -1,2 +0,0 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- export declare function createMcpServer(): McpServer;
@@ -1 +0,0 @@
1
- export declare const instructionsToCreateACourse: (additionalContext: string) => string;
@@ -1 +0,0 @@
1
- export declare const instructionsToCreateLessonActions: (additionalContext: string) => string;
@@ -1 +0,0 @@
1
- export declare const instructionsToCreateLessonVideo: (additionalContext: string) => string;
@@ -1,2 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const instructionsToTranslateActions: (actionsToTranslation: Array<IAction> | undefined, targetLanguage: string) => string;
@@ -1,4 +0,0 @@
1
- /**
2
- * Returns all action names exported by the codevideo-types package, joined by commas.
3
- */
4
- export declare const getActionNames: () => string;
@@ -1 +0,0 @@
1
- export declare const getExampleActionsArrayByKeyword: (keyword: string | string[]) => string;
@@ -1 +0,0 @@
1
- export declare const getExampleLessonByKeyword: (keyword: string | string[]) => string;
@@ -1,24 +0,0 @@
1
- import express from 'express';
2
- declare class RestMcpServer {
3
- app: express.Application;
4
- private httpServer;
5
- private io;
6
- private jobManager;
7
- private mcpServer;
8
- private mcpClient;
9
- private mcpTransport;
10
- private tasks;
11
- private port;
12
- constructor(port?: number);
13
- private setupMiddleware;
14
- private initializeMcpServer;
15
- private setupRoutes;
16
- private setupWebSocket;
17
- private processRequest;
18
- private processPrompt;
19
- private processTool;
20
- private notifyTaskUpdate;
21
- start(): void;
22
- stop(): void;
23
- }
24
- export { RestMcpServer };
@@ -1,56 +0,0 @@
1
- import { EventEmitter } from 'events';
2
- interface Job {
3
- id: string;
4
- taskId: string;
5
- type: string;
6
- data: any;
7
- status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
8
- createdAt: Date;
9
- startedAt?: Date;
10
- completedAt?: Date;
11
- retryCount: number;
12
- maxRetries: number;
13
- priority: number;
14
- timeout?: number;
15
- }
16
- export declare class JobManager extends EventEmitter {
17
- private jobs;
18
- private queue;
19
- private workers;
20
- private isRunning;
21
- private maxConcurrentJobs;
22
- private pollInterval;
23
- constructor(maxConcurrentJobs?: number);
24
- addJob(taskId: string, type: string, data: any, options?: {
25
- priority?: number;
26
- maxRetries?: number;
27
- timeout?: number;
28
- }): string;
29
- getJob(jobId: string): Job | undefined;
30
- cancelJob(taskId: string): boolean;
31
- getQueueStatus(): {
32
- pending: number;
33
- running: number;
34
- completed: number;
35
- failed: number;
36
- cancelled: number;
37
- };
38
- getQueueInfo(): {
39
- queueLength: number;
40
- activeWorkers: number;
41
- totalJobs: number;
42
- status: {
43
- [key: string]: number;
44
- };
45
- };
46
- private enqueue;
47
- private processNextJob;
48
- private executeJob;
49
- private getJobExecutionTime;
50
- private handleJobTimeout;
51
- private start;
52
- private processQueue;
53
- shutdown(): void;
54
- clearCompleted(): number;
55
- }
56
- export {};
@@ -1,23 +0,0 @@
1
- import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- interface McpToolCall {
3
- name: string;
4
- arguments: any;
5
- }
6
- interface McpResponse {
7
- content: any[];
8
- isError?: boolean;
9
- }
10
- export declare class McpClient {
11
- private server;
12
- private isConnected;
13
- constructor(server: McpServer);
14
- connect(): Promise<void>;
15
- listTools(): Promise<any[]>;
16
- callTool(toolCall: McpToolCall): Promise<McpResponse>;
17
- getPrompts(): Promise<any[]>;
18
- getPrompt(name: string, args?: any): Promise<any>;
19
- getResources(): Promise<any[]>;
20
- readResource(uri: string): Promise<any>;
21
- disconnect(): void;
22
- }
23
- export {};
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env node
2
- import express from 'express';
3
- declare class RestMcpServer {
4
- app: express.Application;
5
- private httpServer;
6
- private io;
7
- private jobManager;
8
- private mcpServer;
9
- private mcpClient;
10
- private tasks;
11
- private port;
12
- constructor(port?: number);
13
- private setupMiddleware;
14
- private initializeMcpServer;
15
- private setupRoutes;
16
- private setupWebSocket;
17
- private processRequest;
18
- private processPrompt;
19
- private processTool;
20
- private notifyTaskUpdate;
21
- start(): void;
22
- stop(): void;
23
- }
24
- export { RestMcpServer };
@@ -1,4 +0,0 @@
1
- import { RestMcpServer } from './rest-server';
2
- import { McpClient } from './mcp-client';
3
- export declare function createRestServerFromMcp(): RestMcpServer;
4
- export { RestMcpServer, McpClient };
@@ -1,2 +0,0 @@
1
- import { ILesson, IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const addActionsToLesson: (lesson: ILesson, actions: IAction[]) => string;
@@ -1,2 +0,0 @@
1
- import { ICourseSnapshot, ILesson } from "@fullstackcraftllc/codevideo-types";
2
- export declare const addFinalSnapshotToLesson: (lesson: ILesson, finalSnapshot: ICourseSnapshot) => string;
@@ -1,2 +0,0 @@
1
- import { ICourseSnapshot, ILesson } from "@fullstackcraftllc/codevideo-types";
2
- export declare const addInitialSnapshotToLesson: (lesson: ILesson, initialSnapshot: ICourseSnapshot) => string;
@@ -1,2 +0,0 @@
1
- import { ICourse } from "@fullstackcraftllc/codevideo-types";
2
- export declare const addLessonToCourse: (course: ICourse, id: string, name: string, description: string) => string;
@@ -1 +0,0 @@
1
- export declare const createCourseWithInitialMetadata: (id: string, name: string, description: string, primaryLanguage: string) => string;
@@ -1,2 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const critiqueVideoUsingGemini: (videoPath: string, actions?: Array<IAction>) => Promise<string>;
@@ -1,3 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const getCurrentActions: () => IAction[] | null;
3
- export declare const getCurrentActionsOrThrow: () => IAction[];
@@ -1,3 +0,0 @@
1
- import { ILesson } from "@fullstackcraftllc/codevideo-types";
2
- export declare const getCurrentLesson: () => ILesson | null;
3
- export declare const getCurrentLessonOrThrow: () => ILesson;
@@ -1 +0,0 @@
1
- export declare const getEmptyLessonSnapshot: () => string;
@@ -1,2 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const getFinalLessonSnapshot: (actions?: Array<IAction>) => string;
@@ -1 +0,0 @@
1
- export declare const getInitialLessonStateFromGitHubRepo: (repoUrl: string) => Promise<string>;
@@ -1 +0,0 @@
1
- export declare const getInitialLessonStateFromLocalCodebase: (repoLocation: string) => Promise<string>;
@@ -1,2 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const isRepeatable: (action: IAction) => string;
@@ -1,2 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const makeBlogPost: (actions?: Array<IAction>) => string;
@@ -1,2 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const makeHTMLWebPage: (actions?: Array<IAction>) => Promise<string>;
@@ -1,8 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export interface VideoResult {
3
- outputPath: string;
4
- stdout: string;
5
- stderr: string;
6
- error?: any;
7
- }
8
- export declare const makeVideoFromActions: (actions?: IAction[]) => Promise<VideoResult>;
@@ -1,8 +0,0 @@
1
- import { ILesson } from "@fullstackcraftllc/codevideo-types";
2
- export interface VideoResult {
3
- outputPath: string;
4
- stdout: string;
5
- stderr: string;
6
- error?: any;
7
- }
8
- export declare const makeVideoFromLesson: (lesson?: ILesson) => Promise<VideoResult>;
@@ -1,2 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- export declare const setCurrentActions: (actions: IAction[]) => string;
@@ -1,2 +0,0 @@
1
- import { ILesson } from "@fullstackcraftllc/codevideo-types";
2
- export declare const setCurrentLesson: (lesson: ILesson) => string;
@@ -1,6 +0,0 @@
1
- import { IAction } from "@fullstackcraftllc/codevideo-types";
2
- /**
3
- * Validates the actions so the LLM can correct any mistakes it makes
4
- *
5
- */
6
- export declare const validateActions: (actions?: Array<IAction>) => string;
@@ -1 +0,0 @@
1
- export declare function getBinaryPath(): string;