@fewangsit/wangsvue-gsts 2.0.0-alpha.4 → 2.0.0-alpha.5
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/assets/scanner.worker-Bk2e5hSA.js.map +1 -0
- package/dialogconfirm/index.d.ts +1 -0
- package/icon/index.d.ts +2 -0
- package/mcp/components.json +35 -44
- package/mcp/components.summary.txt +4 -7
- package/mcp/main.js +60 -60
- package/mcp/package.json +6 -6
- package/mcp/skills/api-service-generator/SKILL.md +93 -93
- package/mcp/skills/committing-changes/SKILL.md +38 -38
- package/mcp/skills/figma-datatable-generator/SKILL.md +93 -93
- package/mcp/skills/figma-to-code/SKILL.md +117 -117
- package/mcp/skills/import-validator/SKILL.md +54 -54
- package/mcp/skills/wangsvue-code-review/SKILL.md +70 -70
- package/mcp/skills/wangsvue-workflow/SKILL.md +91 -91
- package/package.json +1 -1
- package/stats.html +1 -1
- package/style.css +1 -1
- package/wangsvue-gsts.es.js +1799 -1785
- package/wangsvue-gsts.es.js.map +1 -1
- package/wangsvue-gsts.system.js +36 -36
- package/wangsvue-gsts.system.js.map +1 -1
- package/assets/scanner.worker-DQsz7oT_.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scanner.worker-Bk2e5hSA.js","sources":["../../../library/components/buttonscan/workers/scanner.worker.ts"],"sourcesContent":["interface ConnectionOption {\n onopen: (ws: WebSocket, connectionState: ConnectionState) => void;\n onmessage: (event: MessageEvent) => void;\n onerror: (error: Event) => void;\n timeout?: number;\n}\n\ninterface WorkerMessage {\n command: string;\n sessionId: string;\n scanCommand?: string;\n userId?: string;\n companyCode?: string;\n serialNumber?: string;\n jenisDevice?: string;\n}\n\ntype ConnectionState = 'established' | 'reused';\n\nlet socket: WebSocket | null = null;\nlet timeoutId: NodeJS.Timeout | null = null; // Stores timeout ID for idle socket connection\nlet currentUserId: string | undefined;\nlet currentCompanyCode: string | undefined;\nlet sessionId: string = ''; // The unique session ID for the current connection\n\nself.onmessage = (event): void => {\n const message: WorkerMessage = event.data;\n currentCompanyCode = message.companyCode;\n\n switch (message.command) {\n case 'sync':\n sync(message);\n break;\n case 'connect':\n connect(message);\n break;\n case 'scan':\n scan(message);\n break;\n case 'stopscan':\n stopScan(message);\n break;\n default:\n break;\n }\n};\n\n/**\n * Opens a WebSocket connection if not already open.\n * If the connection is open, the `onopen` callback is immediately called.\n * @returns {WebSocket} The WebSocket instance.\n */\nconst openConnection = (opt: ConnectionOption): void => {\n let connectionState: ConnectionState = 'established';\n if (socket && socket.readyState === WebSocket.OPEN) {\n // If the socket is already open, immediately call the onopen callback\n connectionState = 'reused';\n opt.onopen(socket, connectionState);\n resetTimeOut(opt.timeout);\n } else {\n // If the socket is not open or undefined, create a new connection\n socket = new WebSocket(`${import.meta.env.VITE_APP_READER_API}`);\n }\n\n // Handle successful connection\n socket.onopen = (): void => {\n sessionId =\n Math.random().toString(36).substring(2, 15) +\n Math.random().toString(36).substring(2, 15); // Generate a random session ID\n\n connectionState = 'established';\n\n if (socket) opt.onopen(socket, connectionState); // Execute the onopen callback once the connection is established\n resetTimeOut(opt.timeout);\n };\n\n socket.onmessage = (event): void => {\n opt.onmessage(event);\n resetTimeOut(opt.timeout);\n };\n\n socket.onerror = (error): void => {\n console.error('🚀 ~ Scanner Worker: openConnection ~ error:', error);\n opt.onerror(error);\n socket?.close();\n socket = null;\n if (timeoutId) clearTimeout(timeoutId);\n };\n};\n\nconst handleSocketTimeout = (): void => {\n stopScan({ userId: currentUserId });\n currentUserId = undefined;\n if (socket) socket.close();\n socket = null;\n if (timeoutId) clearTimeout(timeoutId);\n console.info('Socket connection has been closed!');\n};\n\nconst resetTimeOut = (timeout = 0): void => {\n if (timeout) {\n // Adding this conditional to disable timout, may be sometimes it need to be enable, simpli remove the condition\n if (timeoutId) clearTimeout(timeoutId);\n timeoutId = setTimeout(handleSocketTimeout, timeout); // Timed out after 3 Minutes\n }\n};\n\nconst sync = ({ userId }: WorkerMessage): void => {\n currentUserId = userId;\n\n openConnection({\n onopen: (ws: WebSocket): void => {\n ws.send(\n JSON.stringify({\n data: {\n command: 'connect',\n userId,\n sessionId,\n companyCode: currentCompanyCode,\n source: 'app',\n },\n event: 'reader',\n }),\n );\n },\n\n onmessage: (event): void => {\n postMessage({ status: 'synced', ...JSON.parse(event.data) });\n },\n\n onerror: (error): void => {\n postMessage({ status: 'sync_error', error });\n },\n });\n};\n\nconst connect = ({ userId }: WorkerMessage): void => {\n currentUserId = userId;\n\n openConnection({\n onopen: (ws: WebSocket, state): void => {\n if (state === 'established') {\n ws.send(\n JSON.stringify({\n data: {\n command: 'connect',\n userId,\n source: 'app',\n sessionId,\n companyCode: currentCompanyCode,\n },\n event: 'reader',\n }),\n );\n } else {\n postMessage({\n status: 'connection_reused',\n });\n }\n },\n\n onmessage: (event): void => {\n postMessage({\n status: 'connection_established',\n ...JSON.parse(event.data),\n });\n },\n\n onerror: (error): void => {\n postMessage({ status: 'error_connecting', error });\n },\n });\n};\n\nconst scan = ({\n scanCommand,\n userId,\n serialNumber,\n jenisDevice,\n}: WorkerMessage): void => {\n currentUserId = userId;\n\n openConnection({\n onopen: (ws: WebSocket): void => {\n ws.send(\n JSON.stringify({\n data: {\n command: scanCommand,\n userId,\n sessionId,\n companyCode: currentCompanyCode,\n source: 'app',\n serialNumber,\n jenisDevice,\n },\n event: 'reader',\n }),\n );\n\n postMessage({ status: 'scan_started' });\n },\n\n onmessage: (event): void => {\n postMessage({ status: 'scanned', ...JSON.parse(event.data) });\n },\n\n onerror: (error): void => {\n postMessage({ status: 'scan_error', error });\n },\n });\n};\n\n/**\n * Single Scan:\n * - Stop Scan will be invoked on socket timeout\n *\n * Bulk Scan:\n * - Stop Scan will also be invoked on stopScan by user interaction\n */\nconst stopScan = ({ userId }: Partial<WorkerMessage>): void => {\n if (socket && socket.readyState === WebSocket.OPEN) {\n socket.send(\n JSON.stringify({\n data: {\n command: 'stopscan',\n userId,\n source: 'app',\n sessionId,\n companyCode: currentCompanyCode,\n },\n event: 'reader',\n }),\n );\n\n postMessage({ status: 'scan_stopped' });\n console.info('Scan Process Stopped!');\n }\n};\n"],"names":["socket","timeoutId","currentUserId","currentCompanyCode","sessionId","event","message","sync","connect","scan","stopScan","openConnection","opt","connectionState","resetTimeOut","error","handleSocketTimeout","timeout","userId","ws","state","scanCommand","serialNumber","jenisDevice"],"mappings":"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"}
|
package/dialogconfirm/index.d.ts
CHANGED
package/icon/index.d.ts
CHANGED
|
@@ -188,6 +188,7 @@ export type WangsIcons =
|
|
|
188
188
|
| 'add-line' // Preferred
|
|
189
189
|
| 'arrow-down-s-line' // Preferred
|
|
190
190
|
| 'arrow-drop-down-line' // Preferred
|
|
191
|
+
| 'folder-line' // Preferred
|
|
191
192
|
| 'arrow-left-double-line' // Preferred
|
|
192
193
|
| 'arrow-left-line' // Preferred
|
|
193
194
|
| 'arrow-up-down-line' // Preferred
|
|
@@ -214,6 +215,7 @@ export type WangsIcons =
|
|
|
214
215
|
| 'file-list-2-line' // Preferred
|
|
215
216
|
| 'file-settings-line' // Preferred
|
|
216
217
|
| 'group-line' // Preferred
|
|
218
|
+
| 'global-line' // Preferred
|
|
217
219
|
| 'hand-coin-line' // Preferred
|
|
218
220
|
| 'history-line' // Preferred
|
|
219
221
|
| 'image-add-line' // Preferred
|
package/mcp/components.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"metadata": {
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-04-24T06:44:51.242Z",
|
|
4
4
|
"version": "1.0.0",
|
|
5
5
|
"totalComponents": 68,
|
|
6
6
|
"packagePath": "../../packages/globalsettings-tagsamurai"
|
|
@@ -1915,31 +1915,39 @@
|
|
|
1915
1915
|
"responsive": false
|
|
1916
1916
|
},
|
|
1917
1917
|
{
|
|
1918
|
-
"id": "inputotp
|
|
1919
|
-
"name": "
|
|
1920
|
-
"description": "
|
|
1921
|
-
"category": "
|
|
1918
|
+
"id": "inputotp",
|
|
1919
|
+
"name": "Inputotp",
|
|
1920
|
+
"description": "Inputotp component",
|
|
1921
|
+
"category": "input",
|
|
1922
1922
|
"tags": [
|
|
1923
|
-
"
|
|
1924
|
-
"
|
|
1923
|
+
"input",
|
|
1924
|
+
"form"
|
|
1925
1925
|
],
|
|
1926
1926
|
"source": "unknown",
|
|
1927
1927
|
"overridesBase": false,
|
|
1928
1928
|
"overrideType": "none",
|
|
1929
|
-
"overrideSummary": "",
|
|
1930
|
-
"inheritanceChain": [
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1929
|
+
"overrideSummary": "No override detected",
|
|
1930
|
+
"inheritanceChain": [
|
|
1931
|
+
{
|
|
1932
|
+
"componentName": "Inputotp",
|
|
1933
|
+
"source": "base",
|
|
1934
|
+
"definitionPath": "library/components/inputotp/Inputotp.vue.d.ts",
|
|
1935
|
+
"childComponents": [],
|
|
1936
|
+
"overrideLevel": 0
|
|
1937
|
+
}
|
|
1938
|
+
],
|
|
1939
|
+
"inheritanceReport": "Base: Inputotp (library/components/inputotp/Inputotp.vue.d.ts)",
|
|
1940
|
+
"vueFilePath": "library/components/inputotp/Inputotp.vue",
|
|
1941
|
+
"definitionFilePath": "inputotp/index.d.ts",
|
|
1934
1942
|
"importInfo": {
|
|
1935
1943
|
"packageName": "@fewangsit/wangsvue-gsts",
|
|
1936
|
-
"importPath": "import {
|
|
1944
|
+
"importPath": "import { Inputotp } from '@fewangsit/wangsvue-gsts'",
|
|
1937
1945
|
"treeshakable": true
|
|
1938
1946
|
},
|
|
1939
1947
|
"examples": [],
|
|
1940
1948
|
"useCases": [],
|
|
1941
1949
|
"dependencies": [],
|
|
1942
|
-
"status": "
|
|
1950
|
+
"status": "stable",
|
|
1943
1951
|
"accessibility": {
|
|
1944
1952
|
"ariaSupport": false,
|
|
1945
1953
|
"keyboardNavigation": false,
|
|
@@ -2891,8 +2899,7 @@
|
|
|
2891
2899
|
"Paginator",
|
|
2892
2900
|
"TagType",
|
|
2893
2901
|
"ToggleSwitch",
|
|
2894
|
-
"UserName"
|
|
2895
|
-
"inputotp"
|
|
2902
|
+
"UserName"
|
|
2896
2903
|
],
|
|
2897
2904
|
"navigation": [
|
|
2898
2905
|
"Breadcrumb",
|
|
@@ -2919,6 +2926,7 @@
|
|
|
2919
2926
|
"InputRangeNumber",
|
|
2920
2927
|
"InputText",
|
|
2921
2928
|
"InputURL",
|
|
2929
|
+
"Inputotp",
|
|
2922
2930
|
"InvisibleField",
|
|
2923
2931
|
"Textarea"
|
|
2924
2932
|
],
|
|
@@ -3246,7 +3254,7 @@
|
|
|
3246
3254
|
"inputrangenumber"
|
|
3247
3255
|
],
|
|
3248
3256
|
"inputotp": [
|
|
3249
|
-
"inputotp
|
|
3257
|
+
"inputotp"
|
|
3250
3258
|
],
|
|
3251
3259
|
"inputpassword": [
|
|
3252
3260
|
"inputpassword"
|
|
@@ -3428,6 +3436,7 @@
|
|
|
3428
3436
|
"inputcurrency",
|
|
3429
3437
|
"inputemail",
|
|
3430
3438
|
"inputnumber",
|
|
3439
|
+
"inputotp",
|
|
3431
3440
|
"inputpassword",
|
|
3432
3441
|
"inputphonenumber",
|
|
3433
3442
|
"inputrangenumber",
|
|
@@ -3439,17 +3448,12 @@
|
|
|
3439
3448
|
"inputcurrency",
|
|
3440
3449
|
"inputemail",
|
|
3441
3450
|
"inputnumber",
|
|
3451
|
+
"inputotp",
|
|
3442
3452
|
"inputpassword",
|
|
3443
3453
|
"inputphonenumber",
|
|
3444
3454
|
"inputrangenumber",
|
|
3445
3455
|
"inputtext",
|
|
3446
3456
|
"inputurl"
|
|
3447
|
-
],
|
|
3448
|
-
"fallback": [
|
|
3449
|
-
"inputotp-fallback"
|
|
3450
|
-
],
|
|
3451
|
-
"parsing-error": [
|
|
3452
|
-
"inputotp-fallback"
|
|
3453
3457
|
]
|
|
3454
3458
|
},
|
|
3455
3459
|
"byCategory": {
|
|
@@ -3470,7 +3474,6 @@
|
|
|
3470
3474
|
"editor",
|
|
3471
3475
|
"fileupload",
|
|
3472
3476
|
"icon",
|
|
3473
|
-
"inputotp-fallback",
|
|
3474
3477
|
"litedropdown",
|
|
3475
3478
|
"multiselect",
|
|
3476
3479
|
"paginator",
|
|
@@ -3498,6 +3501,7 @@
|
|
|
3498
3501
|
"inputbadge",
|
|
3499
3502
|
"inputemail",
|
|
3500
3503
|
"inputnumber",
|
|
3504
|
+
"inputotp",
|
|
3501
3505
|
"inputpassword",
|
|
3502
3506
|
"inputphonenumber",
|
|
3503
3507
|
"inputrangenumber",
|
|
@@ -3581,7 +3585,7 @@
|
|
|
3581
3585
|
"inlinemessage",
|
|
3582
3586
|
"inputbadge",
|
|
3583
3587
|
"inputcurrency",
|
|
3584
|
-
"inputotp
|
|
3588
|
+
"inputotp",
|
|
3585
3589
|
"invisiblefield",
|
|
3586
3590
|
"languageswitcher",
|
|
3587
3591
|
"litedropdown",
|
|
@@ -4503,23 +4507,7 @@
|
|
|
4503
4507
|
"inputemail"
|
|
4504
4508
|
],
|
|
4505
4509
|
"inputotp": [
|
|
4506
|
-
"inputotp
|
|
4507
|
-
],
|
|
4508
|
-
"fallback": [
|
|
4509
|
-
"inputotp-fallback"
|
|
4510
|
-
],
|
|
4511
|
-
"metadata": [
|
|
4512
|
-
"inputotp-fallback"
|
|
4513
|
-
],
|
|
4514
|
-
"due": [
|
|
4515
|
-
"inputotp-fallback"
|
|
4516
|
-
],
|
|
4517
|
-
"parsing": [
|
|
4518
|
-
"inputotp-fallback"
|
|
4519
|
-
],
|
|
4520
|
-
"error": [
|
|
4521
|
-
"inputotp-fallback",
|
|
4522
|
-
"validatormessage"
|
|
4510
|
+
"inputotp"
|
|
4523
4511
|
],
|
|
4524
4512
|
"password": [
|
|
4525
4513
|
"inputpassword"
|
|
@@ -4730,15 +4718,18 @@
|
|
|
4730
4718
|
],
|
|
4731
4719
|
"validatormessage": [
|
|
4732
4720
|
"validatormessage"
|
|
4721
|
+
],
|
|
4722
|
+
"error": [
|
|
4723
|
+
"validatormessage"
|
|
4733
4724
|
]
|
|
4734
4725
|
}
|
|
4735
4726
|
},
|
|
4736
4727
|
"statistics": {
|
|
4737
4728
|
"totalComponents": 68,
|
|
4738
4729
|
"componentsByCategory": {
|
|
4739
|
-
"utility":
|
|
4730
|
+
"utility": 22,
|
|
4740
4731
|
"navigation": 3,
|
|
4741
|
-
"input":
|
|
4732
|
+
"input": 22,
|
|
4742
4733
|
"integration": 1,
|
|
4743
4734
|
"data-display": 6,
|
|
4744
4735
|
"overlay": 5,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Component Data Source Summary
|
|
2
|
-
Generated: 2026-
|
|
2
|
+
Generated: 2026-04-24T06:44:51.242Z
|
|
3
3
|
Version: 1.0.0
|
|
4
4
|
Total Components: 68
|
|
5
5
|
Package: ../../packages/globalsettings-tagsamurai
|
|
@@ -9,12 +9,12 @@ Statistics:
|
|
|
9
9
|
- Overrides: 7
|
|
10
10
|
- Accessible Components: 0
|
|
11
11
|
- Total Examples: 0
|
|
12
|
-
- Unresolved Components:
|
|
12
|
+
- Unresolved Components: 0
|
|
13
13
|
|
|
14
14
|
Components by Category:
|
|
15
|
-
- utility:
|
|
15
|
+
- utility: 22
|
|
16
16
|
- navigation: 3
|
|
17
|
-
- input:
|
|
17
|
+
- input: 22
|
|
18
18
|
- integration: 1
|
|
19
19
|
- data-display: 6
|
|
20
20
|
- overlay: 5
|
|
@@ -22,6 +22,3 @@ Components by Category:
|
|
|
22
22
|
- layout: 1
|
|
23
23
|
- feedback: 3
|
|
24
24
|
- localization: 2
|
|
25
|
-
|
|
26
|
-
Unresolved Components (Fallback):
|
|
27
|
-
- inputotp-fallback
|
package/mcp/main.js
CHANGED
|
@@ -9,66 +9,66 @@ import ul from "os";
|
|
|
9
9
|
import ll from "crypto";
|
|
10
10
|
import * as wt from "typescript";
|
|
11
11
|
import ea from "node:process";
|
|
12
|
-
const dl = `# Wangsvue AI Agent: Master Operating Directive
|
|
13
|
-
|
|
14
|
-
## 1. Role & Identity
|
|
15
|
-
|
|
16
|
-
You are the **Senior Wangsvue Systems Architect**. Your primary mission is to deliver production-ready Vue 3 + TypeScript code perfectly aligned with the Wangsit ecosystem
|
|
17
|
-
|
|
18
|
-
## 2. Core Principles
|
|
19
|
-
|
|
20
|
-
### 🌟 The Golden Rule
|
|
21
|
-
|
|
22
|
-
**NEVER guess.** Use the **Knowledge Base (MD Files)** for architectural standards and the **MCP Toolchain** for technical specifications. If internal training data conflicts with these sources, the provided MD files and MCP results always win
|
|
23
|
-
|
|
24
|
-
### 🔒 Total Wangsvue Exclusivity
|
|
25
|
-
|
|
26
|
-
**FORGET ANY DESIGN SYSTEM OR COMPONENT LIBRARY OUTSIDE WANGSVUE.** You are strictly prohibited from referencing or assuming patterns from PrimeVue, Element Plus, Vuetify, or any other library. You MUST ONLY use the props, slots, events, and patterns defined in the Wangsvue MCP or Knowledge Base
|
|
27
|
-
|
|
28
|
-
### 🚫 Zero Assumption Policy
|
|
29
|
-
|
|
30
|
-
**NEVER assume** a prop name, slot name, icon name, or enum value exists. If it's not in the MCP result, it doesn't exist
|
|
31
|
-
|
|
32
|
-
### ✅ MCP-First Verification
|
|
33
|
-
|
|
34
|
-
Every single line of code involving a component MUST be verified by \`analyze_component\` and \`resolve_type_definition\` first
|
|
35
|
-
|
|
36
|
-
## 3. The Two-MCP Toolchain
|
|
37
|
-
|
|
38
|
-
| MCP Tool | Purpose | Source of Truth For...
|
|
39
|
-
| :------------------ | :---------------- | :-----------------------------------------------------------------------------------
|
|
40
|
-
| **\`wangsvue-mcp\`** | **Technical API** | Component IDs, Inheritance, Import paths, and Props/Slots/Emits types (TOON format).
|
|
41
|
-
| **\`wangsvue-docs\`** | **Functional** | Real-world implementation examples, component sections, and variants.
|
|
42
|
-
|
|
43
|
-
## 4. Architectural Standards
|
|
44
|
-
|
|
45
|
-
### View Architecture
|
|
46
|
-
|
|
47
|
-
- **Lightweight Views:** Views must only import and compose from modules
|
|
48
|
-
- **Logic Separation:** Business logic, data, columns, and handlers belong in \`components/modules/\`, NOT in views
|
|
49
|
-
- **No App.vue Logic:** \`App.vue\` must only contain \`<router-view />\`, except for some case when the project not using Vue Router
|
|
50
|
-
|
|
51
|
-
### Design System Compliance
|
|
52
|
-
|
|
53
|
-
- **Trust Component Styling:** NEVER add styling to Wangsvue components. Trust the built-in design system
|
|
54
|
-
- **No Manual CSS:** Do not use generic HTML (e.g., \`div.bg-white\`) when a specialized component (e.g., \`Card\`) exists
|
|
55
|
-
- **Exact Values:** Preserve exact pixel values from design (e.g., 21px). Do not round
|
|
56
|
-
|
|
57
|
-
### Color System
|
|
58
|
-
|
|
59
|
-
- **Tailwind Tokens Only:** NEVER use CSS variables or hex colors directly
|
|
60
|
-
- **Mapping:** ALWAYS map hex codes to Tailwind tokens (e.g., \`general-50\`, \`primary-500\`) from config files
|
|
61
|
-
|
|
62
|
-
## 5. Operational Skills
|
|
63
|
-
|
|
64
|
-
Use the following skills to execute specific tasks. These skills contain the detailed step-by-step protocols
|
|
65
|
-
|
|
66
|
-
- **\`wangsvue-workflow\`**: **MANDATORY** for starting any task. Enforces the 5-step development workflow and component discovery
|
|
67
|
-
- **\`wangsvue-code-review\`**: **MANDATORY** for validating generated code against architectural principles
|
|
68
|
-
- **\`import-validator\`**: Enforces strict import protocols and type definitions
|
|
69
|
-
- **\`figma-to-code\`**: specialized logic for converting Figma/React designs to Wangsvue
|
|
70
|
-
- **\`api-service-generator\`**: Generates API services from OpenAPI specs
|
|
71
|
-
- **\`committing-changes\`**: Enforces commit message standards
|
|
12
|
+
const dl = `# Wangsvue AI Agent: Master Operating Directive
|
|
13
|
+
|
|
14
|
+
## 1. Role & Identity
|
|
15
|
+
|
|
16
|
+
You are the **Senior Wangsvue Systems Architect**. Your primary mission is to deliver production-ready Vue 3 + TypeScript code perfectly aligned with the Wangsit ecosystem.
|
|
17
|
+
|
|
18
|
+
## 2. Core Principles
|
|
19
|
+
|
|
20
|
+
### 🌟 The Golden Rule
|
|
21
|
+
|
|
22
|
+
**NEVER guess.** Use the **Knowledge Base (MD Files)** for architectural standards and the **MCP Toolchain** for technical specifications. If internal training data conflicts with these sources, the provided MD files and MCP results always win.
|
|
23
|
+
|
|
24
|
+
### 🔒 Total Wangsvue Exclusivity
|
|
25
|
+
|
|
26
|
+
**FORGET ANY DESIGN SYSTEM OR COMPONENT LIBRARY OUTSIDE WANGSVUE.** You are strictly prohibited from referencing or assuming patterns from PrimeVue, Element Plus, Vuetify, or any other library. You MUST ONLY use the props, slots, events, and patterns defined in the Wangsvue MCP or Knowledge Base.
|
|
27
|
+
|
|
28
|
+
### 🚫 Zero Assumption Policy
|
|
29
|
+
|
|
30
|
+
**NEVER assume** a prop name, slot name, icon name, or enum value exists. If it's not in the MCP result, it doesn't exist.
|
|
31
|
+
|
|
32
|
+
### ✅ MCP-First Verification
|
|
33
|
+
|
|
34
|
+
Every single line of code involving a component MUST be verified by \`analyze_component\` and \`resolve_type_definition\` first.
|
|
35
|
+
|
|
36
|
+
## 3. The Two-MCP Toolchain
|
|
37
|
+
|
|
38
|
+
| MCP Tool | Purpose | Source of Truth For... |
|
|
39
|
+
| :------------------ | :---------------- | :----------------------------------------------------------------------------------- |
|
|
40
|
+
| **\`wangsvue-mcp\`** | **Technical API** | Component IDs, Inheritance, Import paths, and Props/Slots/Emits types (TOON format). |
|
|
41
|
+
| **\`wangsvue-docs\`** | **Functional** | Real-world implementation examples, component sections, and variants. |
|
|
42
|
+
|
|
43
|
+
## 4. Architectural Standards
|
|
44
|
+
|
|
45
|
+
### View Architecture
|
|
46
|
+
|
|
47
|
+
- **Lightweight Views:** Views must only import and compose from modules.
|
|
48
|
+
- **Logic Separation:** Business logic, data, columns, and handlers belong in \`components/modules/\`, NOT in views.
|
|
49
|
+
- **No App.vue Logic:** \`App.vue\` must only contain \`<router-view />\`, except for some case when the project not using Vue Router.
|
|
50
|
+
|
|
51
|
+
### Design System Compliance
|
|
52
|
+
|
|
53
|
+
- **Trust Component Styling:** NEVER add styling to Wangsvue components. Trust the built-in design system.
|
|
54
|
+
- **No Manual CSS:** Do not use generic HTML (e.g., \`div.bg-white\`) when a specialized component (e.g., \`Card\`) exists.
|
|
55
|
+
- **Exact Values:** Preserve exact pixel values from design (e.g., 21px). Do not round.
|
|
56
|
+
|
|
57
|
+
### Color System
|
|
58
|
+
|
|
59
|
+
- **Tailwind Tokens Only:** NEVER use CSS variables or hex colors directly.
|
|
60
|
+
- **Mapping:** ALWAYS map hex codes to Tailwind tokens (e.g., \`general-50\`, \`primary-500\`) from config files.
|
|
61
|
+
|
|
62
|
+
## 5. Operational Skills
|
|
63
|
+
|
|
64
|
+
Use the following skills to execute specific tasks. These skills contain the detailed step-by-step protocols:
|
|
65
|
+
|
|
66
|
+
- **\`wangsvue-workflow\`**: **MANDATORY** for starting any task. Enforces the 5-step development workflow and component discovery.
|
|
67
|
+
- **\`wangsvue-code-review\`**: **MANDATORY** for validating generated code against architectural principles.
|
|
68
|
+
- **\`import-validator\`**: Enforces strict import protocols and type definitions.
|
|
69
|
+
- **\`figma-to-code\`**: specialized logic for converting Figma/React designs to Wangsvue.
|
|
70
|
+
- **\`api-service-generator\`**: Generates API services from OpenAPI specs.
|
|
71
|
+
- **\`committing-changes\`**: Enforces commit message standards.
|
|
72
72
|
`, fl = ns(import.meta.url), ta = tr(fl), hl = "https://fewangsit.gitbook.io", pl = "https://fewangsit.gitbook.io/vue/llms.txt", ra = {
|
|
73
73
|
trae: {
|
|
74
74
|
output_dir: ".trae",
|
package/mcp/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fewangsit/wangsvue-gsts-mcp",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.4",
|
|
4
4
|
"description": "MCP Server for @fewangsit/wangsvue-gsts",
|
|
5
5
|
"main": "main.js",
|
|
6
6
|
"type": "module",
|
|
@@ -10,18 +10,18 @@
|
|
|
10
10
|
"buildContext": {
|
|
11
11
|
"package": {
|
|
12
12
|
"name": "@fewangsit/wangsvue-gsts",
|
|
13
|
-
"version": "2.0.0-alpha.
|
|
13
|
+
"version": "2.0.0-alpha.4",
|
|
14
14
|
"description": "Global Settings Tagsamurai VueJS Component Library",
|
|
15
15
|
"repository": "https://github.com/fewangsit/wangsvue",
|
|
16
16
|
"workspace": "wangsvue-gsts"
|
|
17
17
|
},
|
|
18
18
|
"build": {
|
|
19
|
-
"timestamp": "2026-
|
|
19
|
+
"timestamp": "2026-04-24T06:44:52.269Z",
|
|
20
20
|
"gitInfo": {
|
|
21
|
-
"head": "
|
|
21
|
+
"head": "99e73c6ef4dc03e059b12f9701e28dde0626d23c",
|
|
22
22
|
"branch": "dev",
|
|
23
|
-
"repository": "
|
|
24
|
-
"timestamp": "2026-
|
|
23
|
+
"repository": "https://github.com/fewangsit/wangsvue.git",
|
|
24
|
+
"timestamp": "2026-04-24T06:44:52.029Z"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 'api-service-generator'
|
|
3
|
-
description: 'Generates production-ready API Services, DTOs, and Response Types from OpenAPI specifications. Invoke when user provides an OpenAPI spec or asks to create API services.'
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# API Service Generator
|
|
7
|
-
|
|
8
|
-
This skill automates the creation of API services, request DTOs, and response types based on an OpenAPI (Swagger) specification, following the project's architectural standards.
|
|
9
|
-
|
|
10
|
-
## When to Use
|
|
11
|
-
|
|
12
|
-
- Invoke when the user provides an OpenAPI specification (YAML or JSON).
|
|
13
|
-
- Invoke when the user asks to "create API services" or "implement endpoints" from a spec.
|
|
14
|
-
- Invoke when updating existing services based on a new API version.
|
|
15
|
-
|
|
16
|
-
## Standards & Patterns
|
|
17
|
-
|
|
18
|
-
### 1. File Structure
|
|
19
|
-
|
|
20
|
-
- **Services**: `src/services/<serviceName>.service.ts`
|
|
21
|
-
- **Request DTOs**: `src/dto/<serviceName>.dto.ts`
|
|
22
|
-
- **Response Types**: `src/types/<serviceName>.type.ts`
|
|
23
|
-
|
|
24
|
-
### 2. Service Object
|
|
25
|
-
|
|
26
|
-
- Use **PascalCase** for the service object name (e.g., `AuthService`).
|
|
27
|
-
- Use **camelCase** for methods (e.g., `postLogin`).
|
|
28
|
-
- Methods should follow the naming: `[httpMethod][ActionName]` (e.g., `getDetail`, `postCreate`).
|
|
29
|
-
- Return type: `Promise<AxiosResponse<ResponseType>>`.
|
|
30
|
-
- Single line spacing between methods.
|
|
31
|
-
|
|
32
|
-
### 3. Instance Creation
|
|
33
|
-
|
|
34
|
-
```typescript
|
|
35
|
-
import { AxiosResponse } from 'axios';
|
|
36
|
-
import createAxiosInstance from './createInstance';
|
|
37
|
-
|
|
38
|
-
const API = createAxiosInstance({
|
|
39
|
-
env: 'VITE_API_BASE_URL',
|
|
40
|
-
prefix: '/v2/iam',
|
|
41
|
-
});
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### 4. DTOs & Types
|
|
45
|
-
|
|
46
|
-
- **DTOs**: Interfaces for request bodies and query params.
|
|
47
|
-
- **Types**: Interfaces for response bodies.
|
|
48
|
-
- Use clear, descriptive noun-based names (e.g., `LoginBody`, `LoginResponse`).
|
|
49
|
-
- Use `UserProfileResponse` instead of `GetUserProfileResponse`.
|
|
50
|
-
|
|
51
|
-
## Workflow
|
|
52
|
-
|
|
53
|
-
1. **Parse the Spec**: Identify paths, methods, request schemas, and response schemas.
|
|
54
|
-
2. **Group by Module**: Group endpoints by their primary path segment (e.g., `/auth/*` -> `AuthService`).
|
|
55
|
-
3. **Generate Interfaces**:
|
|
56
|
-
- Create `src/dto/<module>.dto.ts` for all request-related interfaces.
|
|
57
|
-
- Create `src/types/<module>.type.ts` for all response-related interfaces.
|
|
58
|
-
4. **Generate Service**:
|
|
59
|
-
- Create `src/services/<module>.service.ts`.
|
|
60
|
-
- Implement methods for each endpoint in the group.
|
|
61
|
-
5. **Register Service**:
|
|
62
|
-
- Export the service from `src/main.ts` for global availability.
|
|
63
|
-
|
|
64
|
-
## Example Transformation
|
|
65
|
-
|
|
66
|
-
**Input (OpenAPI):**
|
|
67
|
-
|
|
68
|
-
```yaml
|
|
69
|
-
/auth/login:
|
|
70
|
-
post:
|
|
71
|
-
summary: Login
|
|
72
|
-
requestBody:
|
|
73
|
-
content:
|
|
74
|
-
application/json:
|
|
75
|
-
schema:
|
|
76
|
-
$ref: '#/components/schemas/LoginRequest'
|
|
77
|
-
responses:
|
|
78
|
-
'200':
|
|
79
|
-
content:
|
|
80
|
-
application/json:
|
|
81
|
-
schema:
|
|
82
|
-
$ref: '#/components/schemas/LoginResponse'
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
**Output (Service):**
|
|
86
|
-
|
|
87
|
-
```typescript
|
|
88
|
-
const AuthService = {
|
|
89
|
-
postLogin: (body: LoginRequest): Promise<AxiosResponse<LoginResponse>> => {
|
|
90
|
-
return API.post('/auth/login', body);
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: 'api-service-generator'
|
|
3
|
+
description: 'Generates production-ready API Services, DTOs, and Response Types from OpenAPI specifications. Invoke when user provides an OpenAPI spec or asks to create API services.'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# API Service Generator
|
|
7
|
+
|
|
8
|
+
This skill automates the creation of API services, request DTOs, and response types based on an OpenAPI (Swagger) specification, following the project's architectural standards.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- Invoke when the user provides an OpenAPI specification (YAML or JSON).
|
|
13
|
+
- Invoke when the user asks to "create API services" or "implement endpoints" from a spec.
|
|
14
|
+
- Invoke when updating existing services based on a new API version.
|
|
15
|
+
|
|
16
|
+
## Standards & Patterns
|
|
17
|
+
|
|
18
|
+
### 1. File Structure
|
|
19
|
+
|
|
20
|
+
- **Services**: `src/services/<serviceName>.service.ts`
|
|
21
|
+
- **Request DTOs**: `src/dto/<serviceName>.dto.ts`
|
|
22
|
+
- **Response Types**: `src/types/<serviceName>.type.ts`
|
|
23
|
+
|
|
24
|
+
### 2. Service Object
|
|
25
|
+
|
|
26
|
+
- Use **PascalCase** for the service object name (e.g., `AuthService`).
|
|
27
|
+
- Use **camelCase** for methods (e.g., `postLogin`).
|
|
28
|
+
- Methods should follow the naming: `[httpMethod][ActionName]` (e.g., `getDetail`, `postCreate`).
|
|
29
|
+
- Return type: `Promise<AxiosResponse<ResponseType>>`.
|
|
30
|
+
- Single line spacing between methods.
|
|
31
|
+
|
|
32
|
+
### 3. Instance Creation
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
import { AxiosResponse } from 'axios';
|
|
36
|
+
import createAxiosInstance from './createInstance';
|
|
37
|
+
|
|
38
|
+
const API = createAxiosInstance({
|
|
39
|
+
env: 'VITE_API_BASE_URL',
|
|
40
|
+
prefix: '/v2/iam',
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### 4. DTOs & Types
|
|
45
|
+
|
|
46
|
+
- **DTOs**: Interfaces for request bodies and query params.
|
|
47
|
+
- **Types**: Interfaces for response bodies.
|
|
48
|
+
- Use clear, descriptive noun-based names (e.g., `LoginBody`, `LoginResponse`).
|
|
49
|
+
- Use `UserProfileResponse` instead of `GetUserProfileResponse`.
|
|
50
|
+
|
|
51
|
+
## Workflow
|
|
52
|
+
|
|
53
|
+
1. **Parse the Spec**: Identify paths, methods, request schemas, and response schemas.
|
|
54
|
+
2. **Group by Module**: Group endpoints by their primary path segment (e.g., `/auth/*` -> `AuthService`).
|
|
55
|
+
3. **Generate Interfaces**:
|
|
56
|
+
- Create `src/dto/<module>.dto.ts` for all request-related interfaces.
|
|
57
|
+
- Create `src/types/<module>.type.ts` for all response-related interfaces.
|
|
58
|
+
4. **Generate Service**:
|
|
59
|
+
- Create `src/services/<module>.service.ts`.
|
|
60
|
+
- Implement methods for each endpoint in the group.
|
|
61
|
+
5. **Register Service**:
|
|
62
|
+
- Export the service from `src/main.ts` for global availability.
|
|
63
|
+
|
|
64
|
+
## Example Transformation
|
|
65
|
+
|
|
66
|
+
**Input (OpenAPI):**
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
/auth/login:
|
|
70
|
+
post:
|
|
71
|
+
summary: Login
|
|
72
|
+
requestBody:
|
|
73
|
+
content:
|
|
74
|
+
application/json:
|
|
75
|
+
schema:
|
|
76
|
+
$ref: '#/components/schemas/LoginRequest'
|
|
77
|
+
responses:
|
|
78
|
+
'200':
|
|
79
|
+
content:
|
|
80
|
+
application/json:
|
|
81
|
+
schema:
|
|
82
|
+
$ref: '#/components/schemas/LoginResponse'
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Output (Service):**
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
const AuthService = {
|
|
89
|
+
postLogin: (body: LoginRequest): Promise<AxiosResponse<LoginResponse>> => {
|
|
90
|
+
return API.post('/auth/login', body);
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
```
|