mcp-probe-kit 3.0.14 → 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/__tests__/gitnexus-bridge.unit.test.js +9 -1
- package/build/lib/gitnexus-bridge.d.ts +1 -0
- package/build/lib/gitnexus-bridge.js +29 -1
- 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 +4 -2
- package/docs/i18n/ja.json +4 -2
- package/docs/i18n/ko.json +4 -2
- package/docs/i18n/zh-CN.json +4 -2
- package/docs/pages/getting-started.html +3 -0
- 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": {
|
|
@@ -93,6 +93,8 @@
|
|
|
93
93
|
"item1": "The first cold start may take 20+ seconds while npx checks or downloads dependencies.",
|
|
94
94
|
"item2": "Some GitNexus dependencies use tree-sitter native modules and may require Visual Studio Build Tools.",
|
|
95
95
|
"item3": "If your MCP client supports env, prefer a preinstalled gitnexus CLI and raise GitNexus timeouts.",
|
|
96
|
+
"item4": "Quick install Build Tools on Windows: winget install Microsoft.VisualStudio.2022.BuildTools",
|
|
97
|
+
"quickInstallTitle": "Quick install command:",
|
|
96
98
|
"exampleTitle": "Example using a preinstalled gitnexus CLI:"
|
|
97
99
|
},
|
|
98
100
|
"source": {
|
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": {
|
|
@@ -93,6 +93,8 @@
|
|
|
93
93
|
"item1": "初回のコールドスタートでは、npx が依存関係を確認またはダウンロードするため 20 秒以上かかることがあります。",
|
|
94
94
|
"item2": "GitNexus の一部依存関係は tree-sitter ネイティブモジュールを使用しており、Windows では Visual Studio Build Tools が必要になる場合があります。",
|
|
95
95
|
"item3": "MCP クライアントが env をサポートしている場合は、プリインストール済みの gitnexus CLI を優先し、GitNexus のタイムアウトを引き上げてください。",
|
|
96
|
+
"item4": "Windows では winget で Build Tools をすばやくインストールできます:winget install Microsoft.VisualStudio.2022.BuildTools",
|
|
97
|
+
"quickInstallTitle": "クイックインストールコマンド:",
|
|
96
98
|
"exampleTitle": "プリインストール済み gitnexus CLI を使う設定例:"
|
|
97
99
|
},
|
|
98
100
|
"source": {
|
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": {
|
|
@@ -93,6 +93,8 @@
|
|
|
93
93
|
"item1": "첫 콜드 스타트에서는 npx 가 의존성을 확인하거나 다운로드하므로 20초 이상 걸릴 수 있습니다.",
|
|
94
94
|
"item2": "GitNexus 의 일부 의존성은 tree-sitter 네이티브 모듈을 사용하며 Windows 에서는 Visual Studio Build Tools 가 필요할 수 있습니다.",
|
|
95
95
|
"item3": "MCP 클라이언트가 env 를 지원하면, 미리 설치한 gitnexus CLI 를 우선 사용하고 GitNexus 타임아웃을 늘리세요.",
|
|
96
|
+
"item4": "Windows 에서 Build Tools 빠른 설치: winget install Microsoft.VisualStudio.2022.BuildTools",
|
|
97
|
+
"quickInstallTitle": "빠른 설치 명령:",
|
|
96
98
|
"exampleTitle": "미리 설치한 gitnexus CLI 를 사용하는 구성 예시:"
|
|
97
99
|
},
|
|
98
100
|
"source": {
|
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": {
|
|
@@ -93,6 +93,8 @@
|
|
|
93
93
|
"item1": "首次冷启动时,npx 可能检查或下载依赖,耗时可能超过 20 秒。",
|
|
94
94
|
"item2": "GitNexus 的部分依赖使用 tree-sitter 原生模块,在 Windows 上可能需要 Visual Studio Build Tools。",
|
|
95
95
|
"item3": "如果 MCP 客户端支持 env,优先使用预装的 gitnexus CLI,并适当增大 GitNexus 超时。",
|
|
96
|
+
"item4": "Windows 下可用 winget 快速安装 Build Tools:winget install Microsoft.VisualStudio.2022.BuildTools",
|
|
97
|
+
"quickInstallTitle": "快速安装命令:",
|
|
96
98
|
"exampleTitle": "使用预装 gitnexus CLI 的配置示例:"
|
|
97
99
|
},
|
|
98
100
|
"source": {
|
|
@@ -317,7 +317,10 @@ npm run build</code></pre>
|
|
|
317
317
|
<li data-i18n="gettingStarted.step1.windowsGraph.item1">The first cold start may take 20+ seconds while npx checks or downloads dependencies.</li>
|
|
318
318
|
<li data-i18n="gettingStarted.step1.windowsGraph.item2">Some GitNexus dependencies use tree-sitter native modules and may require Visual Studio Build Tools.</li>
|
|
319
319
|
<li data-i18n="gettingStarted.step1.windowsGraph.item3">If your MCP client supports env, prefer a preinstalled gitnexus CLI and raise GitNexus timeouts.</li>
|
|
320
|
+
<li data-i18n="gettingStarted.step1.windowsGraph.item4">Quick install Build Tools on Windows: winget install Microsoft.VisualStudio.2022.BuildTools</li>
|
|
320
321
|
</ul>
|
|
322
|
+
<p class="mb-2" data-i18n="gettingStarted.step1.windowsGraph.quickInstallTitle">Quick install command:</p>
|
|
323
|
+
<pre class="code-block mb-3 p-3 text-sm text-slate-200 bg-slate-900 rounded overflow-x-auto"><code>winget install Microsoft.VisualStudio.2022.BuildTools</code></pre>
|
|
321
324
|
<p class="mb-2" data-i18n="gettingStarted.step1.windowsGraph.exampleTitle">Example using a preinstalled gitnexus CLI:</p>
|
|
322
325
|
<div class="bg-slate-900 rounded-lg overflow-hidden">
|
|
323
326
|
<div class="flex items-center justify-between px-3 py-2 bg-slate-800">
|
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",
|