huaweicloud-devkit 1.1.1-next.13 → 1.1.1-next.14

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": "1.1.1-next.13",
3
+ "version": "1.1.1-next.14",
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": [
@@ -17,7 +17,7 @@
17
17
  "mcpServers": "./.mcp.json",
18
18
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
19
19
  "skills": "./skills/",
20
- "version": "1.1.1-next.13",
20
+ "version": "1.1.1-next.14",
21
21
  "author": {
22
22
  "name": "HuaweiCloud Mate",
23
23
  "url": "https://github.com/huaweicloud"
@@ -20,7 +20,7 @@
20
20
  "mcpServers": "./.mcp.json",
21
21
  "description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
22
22
  "skills": "./skills/",
23
- "version": "1.1.1-next.13",
23
+ "version": "1.1.1-next.14",
24
24
  "author": {
25
25
  "name": "HuaweiCloud Mate",
26
26
  "url": "https://github.com/huaweicloud"
@@ -17,7 +17,7 @@
17
17
  "mcpServers": "./.mcp.json",
18
18
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
19
19
  "skills": "./skills/",
20
- "version": "1.1.1-next.13",
20
+ "version": "1.1.1-next.14",
21
21
  "author": {
22
22
  "name": "HuaweiCloud Mate",
23
23
  "url": "https://github.com/huaweicloud"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
- "version": "1.1.1-next.13",
3
+ "version": "1.1.1-next.14",
4
4
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
5
  "author": {
6
6
  "name": "HuaweiCloud Mate",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
- "version": "1.1.1-next.13",
3
+ "version": "1.1.1-next.14",
4
4
  "description": "Guide coding agents to use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities with safer execution and less context.",
5
5
  "author": {
6
6
  "name": "HuaweiCloud Mate",
@@ -2,7 +2,7 @@
2
2
  "name": "huaweicloud-devkit",
3
3
  "id": "huaweicloud-devkit",
4
4
  "displayName": "HuaweiCloud DevKit",
5
- "version": "1.1.1-next.13",
5
+ "version": "1.1.1-next.14",
6
6
  "family": "bundle-plugin",
7
7
  "bundleFormat": "codex",
8
8
  "description": "Guide coding agents to use Huawei Cloud safely — KooCLI, APIs, SDKs, 28 MCP tools, skills, and safety guardrails.",
@@ -2743,11 +2743,32 @@ function parseTarget() {
2743
2743
  process.exit(1);
2744
2744
  }
2745
2745
 
2746
+ function checkForUpdate() {
2747
+ if (pkgVersion === '0.0.0') return;
2748
+ const tag = /-next\.\d+/.test(pkgVersion) ? 'next' : 'latest';
2749
+ let latest = null;
2750
+ try {
2751
+ const npmBin = process.platform === 'win32' ? 'npm.cmd' : 'npm';
2752
+ const r = spawnSync(npmBin, ['view', `huaweicloud-devkit@${tag}`, 'version'], {
2753
+ encoding: 'utf8',
2754
+ timeout: 5000,
2755
+ windowsHide: true,
2756
+ });
2757
+ if (r.status === 0) latest = (r.stdout || '').trim().split('\n').pop().trim();
2758
+ } catch {}
2759
+ if (latest && latest !== pkgVersion) {
2760
+ console.log(
2761
+ `\n\x1b[33mℹ️ 检测到新版本:${latest}(当前 ${pkgVersion},${tag} 频道)。建议运行 \`npx huaweicloud-devkit@${tag} update\` 更新。\x1b[0m`,
2762
+ );
2763
+ }
2764
+ }
2765
+
2746
2766
  async function cmdInstall() {
2747
2767
  const target = parseTarget();
2748
2768
  console.log(BANNER);
2749
2769
  console.log(`Installing HuaweiCloud DevKit${target !== 'opencode' ? ` for ${target}` : ''}...\n`);
2750
2770
  checkNode();
2771
+ checkForUpdate();
2751
2772
 
2752
2773
  if (target === 'opencode' || target === 'all') {
2753
2774
  console.log('[OpenCode]');
@@ -3450,6 +3471,7 @@ async function cmdDoctor() {
3450
3471
  async function cmdUpdate() {
3451
3472
  console.log(BANNER);
3452
3473
  const target = parseTarget();
3474
+ checkForUpdate();
3453
3475
 
3454
3476
  if (target === 'opencode') {
3455
3477
  if (!existsSync(join(opencodePluginsDir(), 'src', 'mcp-server.mjs'))) {