mcp-probe-kit 3.0.15 → 3.0.16
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/README.md +17 -11
- package/build/lib/skill-bridge.d.ts +31 -0
- package/build/lib/skill-bridge.js +100 -0
- package/build/resources/ui-ux-data/charts.json +302 -0
- package/build/resources/ui-ux-data/colors.json +1058 -0
- package/build/resources/ui-ux-data/icons.json +1102 -0
- package/build/resources/ui-ux-data/landing.json +262 -0
- package/build/resources/ui-ux-data/metadata.json +6 -0
- package/build/resources/ui-ux-data/products.json +1058 -0
- package/build/resources/ui-ux-data/react-performance.json +574 -0
- package/build/resources/ui-ux-data/stacks/astro.json +266 -0
- package/build/resources/ui-ux-data/stacks/flutter.json +626 -0
- package/build/resources/ui-ux-data/stacks/html-tailwind.json +662 -0
- package/build/resources/ui-ux-data/stacks/jetpack-compose.json +626 -0
- package/build/resources/ui-ux-data/stacks/nextjs.json +218 -0
- package/build/resources/ui-ux-data/stacks/nuxt-ui.json +14 -0
- package/build/resources/ui-ux-data/stacks/nuxtjs.json +182 -0
- package/build/resources/ui-ux-data/stacks/react-native.json +350 -0
- package/build/resources/ui-ux-data/stacks/react.json +530 -0
- package/build/resources/ui-ux-data/stacks/shadcn.json +566 -0
- package/build/resources/ui-ux-data/stacks/svelte.json +134 -0
- package/build/resources/ui-ux-data/stacks/swiftui.json +26 -0
- package/build/resources/ui-ux-data/stacks/vue.json +170 -0
- package/build/resources/ui-ux-data/styles.json +1610 -0
- package/build/resources/ui-ux-data/typography.json +743 -0
- package/build/resources/ui-ux-data/ui-reasoning.json +1431 -0
- package/build/resources/ui-ux-data/ux-guidelines.json +1190 -0
- package/build/resources/ui-ux-data/web-interface.json +389 -0
- package/build/schemas/ui-ux-schemas.js +1 -1
- package/build/tools/start_product.js +8 -1
- package/build/tools/start_ui.js +14 -3
- package/build/tools/ui-ux-tools.js +21 -17
- package/build/utils/ui-data-loader.d.ts +18 -2
- package/build/utils/ui-data-loader.js +74 -12
- package/docs/i18n/en.json +2 -2
- package/docs/i18n/ja.json +2 -2
- package/docs/i18n/ko.json +2 -2
- package/docs/i18n/zh-CN.json +2 -2
- package/package.json +2 -1
|
@@ -4,15 +4,17 @@
|
|
|
4
4
|
* 三层数据策略:
|
|
5
5
|
* 1. 内嵌数据(构建时同步)
|
|
6
6
|
* 2. 缓存数据(运行时更新)
|
|
7
|
-
* 3.
|
|
7
|
+
* 3. 自动后台同步(当前会话不热切换,下次启动生效)
|
|
8
8
|
*/
|
|
9
9
|
import * as fs from 'fs';
|
|
10
10
|
import * as path from 'path';
|
|
11
11
|
import { fileURLToPath } from 'url';
|
|
12
12
|
import { CacheManager } from './cache-manager.js';
|
|
13
13
|
import { UISearchEngine } from './ui-search-engine.js';
|
|
14
|
+
import { syncUIDataToCache } from './ui-sync.js';
|
|
14
15
|
const __filename = fileURLToPath(import.meta.url);
|
|
15
16
|
const __dirname = path.dirname(__filename);
|
|
17
|
+
const AUTO_SYNC_FAILURE_COOLDOWN_MS = 30 * 60 * 1000;
|
|
16
18
|
/**
|
|
17
19
|
* UI/UX 数据加载器
|
|
18
20
|
*/
|
|
@@ -20,11 +22,19 @@ export class UIDataLoader {
|
|
|
20
22
|
cacheManager;
|
|
21
23
|
searchEngine;
|
|
22
24
|
useCache;
|
|
25
|
+
autoUpdate;
|
|
23
26
|
loaded = false;
|
|
27
|
+
autoSyncRunning = false;
|
|
28
|
+
autoSyncFailureUntil = 0;
|
|
29
|
+
sessionInfo = {
|
|
30
|
+
source: 'embedded',
|
|
31
|
+
hasPendingUpdate: false,
|
|
32
|
+
};
|
|
24
33
|
constructor(options = {}) {
|
|
25
34
|
this.useCache = options.useCache ?? true;
|
|
35
|
+
this.autoUpdate = options.autoUpdate ?? true;
|
|
26
36
|
this.cacheManager = new CacheManager({
|
|
27
|
-
autoUpdate:
|
|
37
|
+
autoUpdate: this.autoUpdate,
|
|
28
38
|
});
|
|
29
39
|
this.searchEngine = new UISearchEngine();
|
|
30
40
|
}
|
|
@@ -39,18 +49,30 @@ export class UIDataLoader {
|
|
|
39
49
|
if (this.useCache && this.cacheManager.hasCache()) {
|
|
40
50
|
try {
|
|
41
51
|
await this.loadFromCache();
|
|
52
|
+
const metadata = this.cacheManager.getMetadata();
|
|
53
|
+
this.sessionInfo = {
|
|
54
|
+
source: 'cache',
|
|
55
|
+
activeVersion: metadata?.version,
|
|
56
|
+
hasPendingUpdate: false,
|
|
57
|
+
};
|
|
42
58
|
this.loaded = true;
|
|
43
|
-
// 后台检查更新
|
|
44
|
-
this.checkUpdateInBackground();
|
|
45
|
-
return;
|
|
46
59
|
}
|
|
47
60
|
catch (error) {
|
|
48
61
|
console.error('Failed to load from cache, falling back to embedded data:', error);
|
|
49
62
|
}
|
|
50
63
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
64
|
+
if (!this.loaded) {
|
|
65
|
+
// 从内嵌数据加载
|
|
66
|
+
await this.loadFromEmbedded();
|
|
67
|
+
this.sessionInfo = {
|
|
68
|
+
source: 'embedded',
|
|
69
|
+
activeVersion: this.readEmbeddedVersion(),
|
|
70
|
+
hasPendingUpdate: false,
|
|
71
|
+
};
|
|
72
|
+
this.loaded = true;
|
|
73
|
+
}
|
|
74
|
+
// 后台自动检查并下载更新,当前会话保持版本锁定
|
|
75
|
+
void this.checkUpdateInBackground();
|
|
54
76
|
}
|
|
55
77
|
/**
|
|
56
78
|
* 从缓存加载数据
|
|
@@ -110,6 +132,20 @@ export class UIDataLoader {
|
|
|
110
132
|
walk(dataDir);
|
|
111
133
|
this.searchEngine.loadDatasets(datasets);
|
|
112
134
|
}
|
|
135
|
+
readEmbeddedVersion() {
|
|
136
|
+
try {
|
|
137
|
+
const metadataPath = path.join(__dirname, '..', 'resources', 'ui-ux-data', 'metadata.json');
|
|
138
|
+
if (!fs.existsSync(metadataPath)) {
|
|
139
|
+
return undefined;
|
|
140
|
+
}
|
|
141
|
+
const content = fs.readFileSync(metadataPath, 'utf-8');
|
|
142
|
+
const metadata = JSON.parse(content);
|
|
143
|
+
return metadata.version;
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
113
149
|
/**
|
|
114
150
|
* 提取类别名称
|
|
115
151
|
*/
|
|
@@ -127,15 +163,35 @@ export class UIDataLoader {
|
|
|
127
163
|
* 后台检查更新
|
|
128
164
|
*/
|
|
129
165
|
async checkUpdateInBackground() {
|
|
166
|
+
if (!this.autoUpdate) {
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (this.autoSyncRunning) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
if (Date.now() < this.autoSyncFailureUntil) {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.autoSyncRunning = true;
|
|
130
176
|
try {
|
|
131
177
|
const updateInfo = await this.cacheManager.checkUpdate();
|
|
178
|
+
this.sessionInfo.lastCheckedAt = new Date().toISOString();
|
|
132
179
|
if (updateInfo.hasUpdate) {
|
|
133
|
-
|
|
134
|
-
console.log(
|
|
180
|
+
const current = updateInfo.currentVersion || this.sessionInfo.activeVersion || 'none';
|
|
181
|
+
console.log(`UI/UX data update available: ${current} -> ${updateInfo.latestVersion}`);
|
|
182
|
+
await syncUIDataToCache(false, false);
|
|
183
|
+
this.sessionInfo.pendingVersion = updateInfo.latestVersion;
|
|
184
|
+
this.sessionInfo.hasPendingUpdate = true;
|
|
185
|
+
console.log(`UI/UX data ${updateInfo.latestVersion} downloaded. It will apply on next restart.`);
|
|
135
186
|
}
|
|
136
187
|
}
|
|
137
188
|
catch (error) {
|
|
138
|
-
|
|
189
|
+
this.autoSyncFailureUntil = Date.now() + AUTO_SYNC_FAILURE_COOLDOWN_MS;
|
|
190
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
191
|
+
console.log(`UI/UX background sync skipped: ${message}`);
|
|
192
|
+
}
|
|
193
|
+
finally {
|
|
194
|
+
this.autoSyncRunning = false;
|
|
139
195
|
}
|
|
140
196
|
}
|
|
141
197
|
/**
|
|
@@ -154,7 +210,13 @@ export class UIDataLoader {
|
|
|
154
210
|
return this.cacheManager;
|
|
155
211
|
}
|
|
156
212
|
/**
|
|
157
|
-
*
|
|
213
|
+
* 获取当前会话的数据状态
|
|
214
|
+
*/
|
|
215
|
+
getSessionInfo() {
|
|
216
|
+
return { ...this.sessionInfo };
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* 重新加载数据(手动触发时使用)
|
|
158
220
|
*/
|
|
159
221
|
async reload() {
|
|
160
222
|
this.searchEngine.clear();
|
package/docs/i18n/en.json
CHANGED
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"hero": {
|
|
15
15
|
"title": "🚀 MCP Probe Kit",
|
|
16
16
|
"subtitle": "AI Development Enhancement Toolkit · Documentation Center",
|
|
17
|
-
"version": "v3.0.
|
|
17
|
+
"version": "v3.0.16",
|
|
18
18
|
"quickStart": "Quick Start",
|
|
19
19
|
"visitMainSite": "Visit ByteZoneX"
|
|
20
20
|
},
|
|
21
21
|
"sections": {
|
|
22
22
|
"quickStart": {
|
|
23
23
|
"title": "Quick Start",
|
|
24
|
-
"description": "Get started with MCP Probe Kit v3.0.
|
|
24
|
+
"description": "Get started with MCP Probe Kit v3.0.16 in 5 minutes",
|
|
25
25
|
"installConfig": "Installation & Configuration"
|
|
26
26
|
},
|
|
27
27
|
"tools": {
|
package/docs/i18n/ja.json
CHANGED
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"hero": {
|
|
15
15
|
"title": "🚀 MCP Probe Kit",
|
|
16
16
|
"subtitle": "AI開発強化ツールキット · ドキュメントセンター",
|
|
17
|
-
"version": "v3.0.
|
|
17
|
+
"version": "v3.0.16",
|
|
18
18
|
"quickStart": "クイックスタート",
|
|
19
19
|
"visitMainSite": "ByteZoneXを訪問"
|
|
20
20
|
},
|
|
21
21
|
"sections": {
|
|
22
22
|
"quickStart": {
|
|
23
23
|
"title": "クイックスタート",
|
|
24
|
-
"description": "5分でMCP Probe Kit v3.0.
|
|
24
|
+
"description": "5分でMCP Probe Kit v3.0.16を始める",
|
|
25
25
|
"installConfig": "インストールと設定"
|
|
26
26
|
},
|
|
27
27
|
"tools": {
|
package/docs/i18n/ko.json
CHANGED
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"hero": {
|
|
15
15
|
"title": "🚀 MCP Probe Kit",
|
|
16
16
|
"subtitle": "AI 개발 강화 툴킷 · 문서 센터",
|
|
17
|
-
"version": "v3.0.
|
|
17
|
+
"version": "v3.0.16",
|
|
18
18
|
"quickStart": "빠른 시작",
|
|
19
19
|
"visitMainSite": "ByteZoneX 방문"
|
|
20
20
|
},
|
|
21
21
|
"sections": {
|
|
22
22
|
"quickStart": {
|
|
23
23
|
"title": "빠른 시작",
|
|
24
|
-
"description": "5분 안에 MCP Probe Kit v3.0.
|
|
24
|
+
"description": "5분 안에 MCP Probe Kit v3.0.16 시작하기",
|
|
25
25
|
"installConfig": "설치 및 구성"
|
|
26
26
|
},
|
|
27
27
|
"tools": {
|
package/docs/i18n/zh-CN.json
CHANGED
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"hero": {
|
|
15
15
|
"title": "🚀 MCP Probe Kit",
|
|
16
16
|
"subtitle": "AI 开发增强工具集 · 文档中心",
|
|
17
|
-
"version": "v3.0.
|
|
17
|
+
"version": "v3.0.16",
|
|
18
18
|
"quickStart": "快速开始",
|
|
19
19
|
"visitMainSite": "访问主站 ByteZoneX"
|
|
20
20
|
},
|
|
21
21
|
"sections": {
|
|
22
22
|
"quickStart": {
|
|
23
23
|
"title": "快速开始",
|
|
24
|
-
"description": "5 分钟快速上手 MCP Probe Kit v3.0.
|
|
24
|
+
"description": "5 分钟快速上手 MCP Probe Kit v3.0.16",
|
|
25
25
|
"installConfig": "安装配置"
|
|
26
26
|
},
|
|
27
27
|
"tools": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-probe-kit",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.16",
|
|
4
4
|
"description": "AI-Powered Development Toolkit - MCP Server with 22 tools covering code quality, development efficiency, project management, and UI/UX design. Features: Structured Output, Workflow Orchestration, UI/UX Pro Max, and Requirements Interview.",
|
|
5
5
|
"mcpName": "io.github.mybolide/mcp-probe-kit",
|
|
6
6
|
"type": "module",
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
},
|
|
11
11
|
"scripts": {
|
|
12
12
|
"build": "tsc",
|
|
13
|
+
"postbuild": "node scripts/copy-ui-embedded-data.mjs",
|
|
13
14
|
"watch": "tsc --watch",
|
|
14
15
|
"dev": "tsc && node build/index.js",
|
|
15
16
|
"test": "vitest --run",
|