@vue-skuilder/cli 0.1.11-26 → 0.1.11-28
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/CLAUDE.md +14 -5
- package/dist/mcp-server.js +3 -1
- package/dist/mcp-server.js.map +1 -1
- package/dist/standalone-ui-template/package.json +1 -1
- package/dist/studio-ui-src/package.json +2 -1
- package/dist/studio-ui-src/utils/courseConfigRegistration.ts +24 -4
- package/package.json +9 -9
- package/src/mcp-server.ts +3 -1
package/CLAUDE.md
CHANGED
|
@@ -16,9 +16,11 @@ npx @vue-skuilder/cli pack my-course
|
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Build System
|
|
19
|
-
- **TypeScript**: Direct compilation to
|
|
19
|
+
- **TypeScript**: Direct compilation to ES module in `dist/`
|
|
20
20
|
- **Binary Entry**: `dist/cli.js` with executable shebang
|
|
21
21
|
- **Module Type**: ES module with `.js` extension
|
|
22
|
+
- **Asset Embedding**: Templates and UI source files embedded during build
|
|
23
|
+
- **Complex Build**: Multi-step process with template copying and path adjustments
|
|
22
24
|
|
|
23
25
|
## CLI Commands
|
|
24
26
|
|
|
@@ -35,8 +37,14 @@ npx @vue-skuilder/cli pack my-course
|
|
|
35
37
|
- `inquirer` - Interactive prompts and wizards
|
|
36
38
|
- `chalk` - Terminal color output
|
|
37
39
|
|
|
38
|
-
### Vue-Skuilder Integration
|
|
40
|
+
### Vue-Skuilder Integration (All Workspace Packages)
|
|
41
|
+
- `@vue-skuilder/common` - Shared types and utilities
|
|
42
|
+
- `@vue-skuilder/common-ui` - Base UI components
|
|
43
|
+
- `@vue-skuilder/courseware` - Course content types and question implementations
|
|
39
44
|
- `@vue-skuilder/db` - Database utilities for course packaging
|
|
45
|
+
- `@vue-skuilder/edit-ui` - Course editing interface components
|
|
46
|
+
- `@vue-skuilder/express` - Express server for API endpoints
|
|
47
|
+
- `@vue-skuilder/mcp` - Model Context Protocol server integration
|
|
40
48
|
- `@vue-skuilder/standalone-ui` - Standalone player for packaged courses
|
|
41
49
|
|
|
42
50
|
### File Management
|
|
@@ -63,11 +71,12 @@ npx @vue-skuilder/cli pack my-course
|
|
|
63
71
|
- **Optimization**: Minifies and optimizes course assets
|
|
64
72
|
- **Packaging**: Creates deployable course bundle
|
|
65
73
|
|
|
66
|
-
### MCP Server
|
|
67
|
-
- **Protocol Implementation**:
|
|
74
|
+
### MCP Server Integration
|
|
75
|
+
- **Protocol Implementation**: Leverages `@vue-skuilder/mcp` package for full server functionality
|
|
68
76
|
- **Course Access**: Direct CourseDBInterface integration for real-time data
|
|
69
|
-
- **Content Generation**: AI-powered card creation and content authoring
|
|
77
|
+
- **Content Generation**: AI-powered card creation and content authoring via Claude Code
|
|
70
78
|
- **ELO Integration**: Native support for difficulty rating system
|
|
79
|
+
- **Studio Command**: Launches MCP server alongside development environment
|
|
71
80
|
|
|
72
81
|
## Utilities
|
|
73
82
|
|
package/dist/mcp-server.js
CHANGED
|
@@ -44,7 +44,9 @@ async function main() {
|
|
|
44
44
|
await server.start(transport);
|
|
45
45
|
console.error('MCP Server started successfully!');
|
|
46
46
|
console.error(`Course: ${courseId}`);
|
|
47
|
-
console.error('Available resources: course://config, cards://all,
|
|
47
|
+
console.error('Available resources: course://config, cards://all, cards://tag/{tagName}, cards://shape/{shapeName}, cards://elo/{eloRange}');
|
|
48
|
+
console.error(' shapes://all, shapes://{shapeName}, schema://{dataShapeName}');
|
|
49
|
+
console.error(' tags://all, tags://stats, tags://{tagName}, tags://union/{tags}, tags://intersect/{tags}, tags://exclusive/{tags}, tags://distribution');
|
|
48
50
|
console.error('Available tools: create_card, update_card, tag_card, delete_card');
|
|
49
51
|
console.error('Available prompts: fill-in-card-authoring, elo-scoring-guidance');
|
|
50
52
|
console.error('Ready for MCP client connections via stdio');
|
package/dist/mcp-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server.js","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[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AE;YACrC,mBAAmB,EAAE,IAAI;YACzB,gBAAgB,EAAE,EAAE;YACpB,MAAM,EAAE,aAAa;SACtB,CAAC,CAAC;QAEH,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC7C,MAAM,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QAE9B,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;QAClD,OAAO,CAAC,KAAK,CAAC,WAAW,QAAQ,EAAE,CAAC,CAAC;QACrC,OAAO,CAAC,KAAK,CAAC,6HAA6H,CAAC,CAAC;QAC7I,OAAO,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;QACnG,OAAO,CAAC,KAAK,CAAC,6JAA6J,CAAC,CAAC;QAC7K,OAAO,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;QAClF,OAAO,CAAC,KAAK,CAAC,iEAAiE,CAAC,CAAC;QACjF,OAAO,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAC9D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,6BAA6B,EAAE,KAAK,CAAC,CAAC;QACpD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAC;IACzC,mBAAmB;AACrB,CAAC,CAAC,CAAC"}
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.1.11-
|
|
6
|
+
"version": "0.1.11-28",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"dev": "vite",
|
|
10
10
|
"build": "vite build",
|
|
11
|
+
"type-check": "vue-tsc --noEmit",
|
|
11
12
|
"preview": "vite preview",
|
|
12
13
|
"lint": "eslint . --fix",
|
|
13
14
|
"lint:check": "eslint ."
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CourseConfig, DataShape, NameSpacer } from '@vue-skuilder/common';
|
|
1
|
+
import { CourseConfig, DataShape, NameSpacer, toZodJSON } from '@vue-skuilder/common';
|
|
2
2
|
import { CourseDBInterface } from '@vue-skuilder/db';
|
|
3
3
|
import { Displayable, getCurrentUser, ViewComponent } from '@vue-skuilder/common-ui';
|
|
4
4
|
import { CourseWare } from '@vue-skuilder/courseware';
|
|
@@ -42,7 +42,7 @@ export interface ProcessedDataShape {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Check if a data shape is already registered in the course config
|
|
45
|
+
* Check if a data shape is already registered in the course config with valid schema
|
|
46
46
|
*/
|
|
47
47
|
export function isDataShapeRegistered(
|
|
48
48
|
dataShape: ProcessedDataShape,
|
|
@@ -53,7 +53,10 @@ export function isDataShapeRegistered(
|
|
|
53
53
|
course: dataShape.course,
|
|
54
54
|
});
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
const existingDataShape = courseConfig.dataShapes.find((ds) => ds.name === namespacedName);
|
|
57
|
+
|
|
58
|
+
// Must exist AND have serialized schema to be considered "registered"
|
|
59
|
+
return existingDataShape !== undefined && existingDataShape.serializedZodSchema !== undefined;
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
/**
|
|
@@ -122,7 +125,7 @@ export function registerDataShape(
|
|
|
122
125
|
): boolean {
|
|
123
126
|
if (isDataShapeRegistered(dataShape, courseConfig)) {
|
|
124
127
|
console.log(
|
|
125
|
-
` ℹ️ DataShape '${dataShape.name}' from '${dataShape.course}' already registered`
|
|
128
|
+
` ℹ️ DataShape '${dataShape.name}' from '${dataShape.course}' already registered with schema`
|
|
126
129
|
);
|
|
127
130
|
return false;
|
|
128
131
|
}
|
|
@@ -132,9 +135,26 @@ export function registerDataShape(
|
|
|
132
135
|
course: dataShape.course,
|
|
133
136
|
});
|
|
134
137
|
|
|
138
|
+
// Generate JSON Schema for the DataShape
|
|
139
|
+
let serializedZodSchema: string | undefined;
|
|
140
|
+
try {
|
|
141
|
+
serializedZodSchema = toZodJSON(dataShape.dataShape);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
console.warn(` ⚠️ Failed to generate schema for ${namespacedName}:`, error);
|
|
144
|
+
serializedZodSchema = undefined;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Check if entry exists but without schema (legacy entry) - remove it
|
|
148
|
+
const existingIndex = courseConfig.dataShapes.findIndex((ds) => ds.name === namespacedName);
|
|
149
|
+
if (existingIndex !== -1) {
|
|
150
|
+
console.log(` 🔧 Replacing legacy DataShape entry: ${namespacedName}`);
|
|
151
|
+
courseConfig.dataShapes.splice(existingIndex, 1);
|
|
152
|
+
}
|
|
153
|
+
|
|
135
154
|
courseConfig.dataShapes.push({
|
|
136
155
|
name: namespacedName,
|
|
137
156
|
questionTypes: [],
|
|
157
|
+
serializedZodSchema,
|
|
138
158
|
});
|
|
139
159
|
|
|
140
160
|
console.log(` ✅ Registered DataShape: ${namespacedName}`);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.1.11-
|
|
6
|
+
"version": "0.1.11-28",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"description": "CLI scaffolding tool for vue-skuilder projects",
|
|
9
9
|
"bin": {
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@mdi/font": "^7.3.67",
|
|
41
|
-
"@vue-skuilder/common": "0.1.11-
|
|
42
|
-
"@vue-skuilder/common-ui": "0.1.11-
|
|
43
|
-
"@vue-skuilder/courseware": "0.1.11-
|
|
44
|
-
"@vue-skuilder/db": "0.1.11-
|
|
45
|
-
"@vue-skuilder/edit-ui": "0.1.11-
|
|
46
|
-
"@vue-skuilder/express": "0.1.11-
|
|
47
|
-
"@vue-skuilder/mcp": "0.1.11-
|
|
41
|
+
"@vue-skuilder/common": "0.1.11-28",
|
|
42
|
+
"@vue-skuilder/common-ui": "0.1.11-28",
|
|
43
|
+
"@vue-skuilder/courseware": "0.1.11-28",
|
|
44
|
+
"@vue-skuilder/db": "0.1.11-28",
|
|
45
|
+
"@vue-skuilder/edit-ui": "0.1.11-28",
|
|
46
|
+
"@vue-skuilder/express": "0.1.11-28",
|
|
47
|
+
"@vue-skuilder/mcp": "0.1.11-28",
|
|
48
48
|
"chalk": "^5.3.0",
|
|
49
49
|
"commander": "^11.0.0",
|
|
50
50
|
"fs-extra": "^11.2.0",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@types/node": "^20.0.0",
|
|
64
64
|
"@types/serve-static": "^1.15.0",
|
|
65
65
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
66
|
-
"@vue-skuilder/studio-ui": "0.1.11-
|
|
66
|
+
"@vue-skuilder/studio-ui": "0.1.11-28",
|
|
67
67
|
"typescript": "~5.7.2",
|
|
68
68
|
"vite": "^6.0.9",
|
|
69
69
|
"vue-tsc": "^1.8.0"
|
package/src/mcp-server.ts
CHANGED
|
@@ -56,7 +56,9 @@ async function main() {
|
|
|
56
56
|
|
|
57
57
|
console.error('MCP Server started successfully!');
|
|
58
58
|
console.error(`Course: ${courseId}`);
|
|
59
|
-
console.error('Available resources: course://config, cards://all,
|
|
59
|
+
console.error('Available resources: course://config, cards://all, cards://tag/{tagName}, cards://shape/{shapeName}, cards://elo/{eloRange}');
|
|
60
|
+
console.error(' shapes://all, shapes://{shapeName}, schema://{dataShapeName}');
|
|
61
|
+
console.error(' tags://all, tags://stats, tags://{tagName}, tags://union/{tags}, tags://intersect/{tags}, tags://exclusive/{tags}, tags://distribution');
|
|
60
62
|
console.error('Available tools: create_card, update_card, tag_card, delete_card');
|
|
61
63
|
console.error('Available prompts: fill-in-card-authoring, elo-scoring-guidance');
|
|
62
64
|
console.error('Ready for MCP client connections via stdio');
|