huaweicloud-devkit 0.1.19 → 0.1.21-dev.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "huaweicloud-devkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21-dev.0",
|
|
4
4
|
"description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -336,10 +336,11 @@ async function cmdInstall() {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
console.log(`\n\x1b[32mInstallation complete!\x1b[0m`);
|
|
339
|
-
console.log(`\n\x1b[1m\x1b[33m
|
|
340
|
-
console.log(
|
|
341
|
-
console.log(
|
|
342
|
-
console.log(
|
|
339
|
+
console.log(`\n\x1b[1m\x1b[33m╔══════════════════════════════════════════════════════╗`);
|
|
340
|
+
console.log(`\x1b[1m\x1b[33m║ MCP 工具在重启 OpenCode 会话后才生效 ║`);
|
|
341
|
+
console.log(`\x1b[1m\x1b[33m║ 关闭当前会话 → 重新打开,直接描述华为云任务即可 ║`);
|
|
342
|
+
console.log(`\x1b[1m\x1b[33m║ 重启前请勿执行 hcloud 命令,避免 AK/SK 泄露 ║`);
|
|
343
|
+
console.log(`\x1b[1m\x1b[33m╚══════════════════════════════════════════════════════╝\x1b[0m`);
|
|
343
344
|
|
|
344
345
|
const hcloudOk = checkHcloud();
|
|
345
346
|
if (!hcloudOk) {
|
|
@@ -350,8 +351,11 @@ async function cmdInstall() {
|
|
|
350
351
|
}
|
|
351
352
|
|
|
352
353
|
console.log(`\nAfter restart + hcloud setup, run: npx huaweicloud-devkit doctor`);
|
|
354
|
+
|
|
355
|
+
// Write install marker for doctor to detect
|
|
356
|
+
writeFileSync(join(opencodePluginsDir(), '.installed'), new Date().toISOString());
|
|
353
357
|
if (target === 'opencode' || target === 'all') {
|
|
354
|
-
console.log('Or
|
|
358
|
+
console.log('Or describe your Huawei Cloud task in OpenCode');
|
|
355
359
|
}
|
|
356
360
|
if (target === 'codex' || target === 'all') {
|
|
357
361
|
console.log('Or mention @huaweicloud-core in Codex');
|
|
@@ -481,7 +485,16 @@ async function cmdDoctor() {
|
|
|
481
485
|
console.log('\x1b[33mFix failures above, then restart your OpenCode / Codex session.\x1b[0m');
|
|
482
486
|
}
|
|
483
487
|
if (fail === 0 && mcpConfigured) {
|
|
484
|
-
console.log('\n\x1b[32mAll checks passed.\x1b[0m Restart OpenCode
|
|
488
|
+
console.log('\n\x1b[32mAll checks passed.\x1b[0m Restart OpenCode, then describe your Huawei Cloud task');
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// Detect "installed but not restarted" scenario
|
|
492
|
+
const installedMarker = join(opencodePluginsDir(), '.installed');
|
|
493
|
+
if (mcpConfigured && existsSync(installedMarker)) {
|
|
494
|
+
console.log(`\n\x1b[1m\x1b[31m╔══════════════════════════════════════════╗`);
|
|
495
|
+
console.log(`\x1b[1m\x1b[31m║ 请重启 OpenCode!MCP 工具尚未激活 ║`);
|
|
496
|
+
console.log(`\x1b[1m\x1b[31m║ 关闭当前会话 → 重新打开即可 ║`);
|
|
497
|
+
console.log(`\x1b[1m\x1b[31m╚══════════════════════════════════════════╝\x1b[0m`);
|
|
485
498
|
}
|
|
486
499
|
}
|
|
487
500
|
|