huaweicloud-devkit 1.1.2 → 1.1.3-next.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,7 +1,7 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
3
  "mcpName": "io.github.huaweicloud/huaweicloud-devkit",
4
- "version": "1.1.2",
4
+ "version": "1.1.3-next.0",
5
5
  "kooCliVersion": "7.2.12",
6
6
  "description": "Agent toolkit that helps coding agents use Huawei Cloud Skills, KooCLI, APIs, SDKs, and future MCP capabilities safely and accurately.",
7
7
  "type": "module",
@@ -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.2",
20
+ "version": "1.1.3-next.0",
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.2",
23
+ "version": "1.1.3-next.0",
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.2",
20
+ "version": "1.1.3-next.0",
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.2",
3
+ "version": "1.1.3-next.0",
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.2",
3
+ "version": "1.1.3-next.0",
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.2",
5
+ "version": "1.1.3-next.0",
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.",
@@ -12,7 +12,7 @@ Huawei Cloud comprises 200+ services. This skill is the entry point for ANY acti
12
12
 
13
13
  ## 会话启动
14
14
 
15
- 首次操作前必须先调用 `huaweicloud_check_update` 检查插件版本:
15
+ 首次操作前先调用 `huaweicloud_check_update` 检查插件版本;若未先行检查,插件会在使用中收到服务端升级提示。
16
16
 
17
17
  1. 如果 `updateAvailable == true` 且 `dismissed == false`,先询问用户是否升级
18
18
  2. 用户同意 → 调用 `huaweicloud_upgrade`,完成后提示重启会话
@@ -1,6 +1,7 @@
1
1
  import { getCredentials } from './hwlink-api.mjs';
2
2
  import { getProxyDispatcher } from '../proxy/proxy-agent.mjs';
3
3
  import { cacheUserHash } from '../telemetry/telemetry.mjs';
4
+ import { readInstalledVersion } from '../update-check.mjs';
4
5
 
5
6
  function getHdkitBaseUrl() {
6
7
  return process.env.HDKITSERVICE_ENDPOINT || 'https://devkit.huaweicloud.com/rest/developer/server/hdkitservice/';
@@ -19,6 +20,7 @@ async function hdkitRequest(method, path, body, timeoutMs = 300000) {
19
20
  'Content-Type': 'application/json',
20
21
  'X-HW-AK': ak,
21
22
  'X-HW-SK': sk,
23
+ 'X-HW-Client-Version': readInstalledVersion() || '0.0.0',
22
24
  };
23
25
  if (securitytoken) {
24
26
  headers['X-HW-Security-Token'] = securitytoken;
@@ -3120,10 +3120,6 @@ async function cmdInstall() {
3120
3120
  if (target === 'codearts-work' || target === 'all') {
3121
3121
  await runInstallStep('codearts-work', '\n[CodeArts Work]', installCodeArtsWork);
3122
3122
  }
3123
- if (target === 'codearts-work' || target === 'all') {
3124
- console.log('\n[CodeArts Work]');
3125
- await installCodeArtsWork();
3126
- }
3127
3123
  if (target === 'workbuddy' || target === 'all') {
3128
3124
  await runInstallStep('workbuddy', '\n[WorkBuddy]', installWorkBuddy);
3129
3125
  }
@@ -3142,26 +3138,6 @@ async function cmdInstall() {
3142
3138
  if (target === 'atomcode' || target === 'all') {
3143
3139
  await runInstallStep('atomcode', '\n[AtomCode]', installAtomCode);
3144
3140
  }
3145
- if (target === 'dsh' || target === 'all') {
3146
- console.log('\n[DSH]');
3147
- await installDsh();
3148
- }
3149
- if (target === 'officeace' || target === 'all') {
3150
- console.log('\n[OfficeAce]');
3151
- await installOfficeAce();
3152
- }
3153
- if (target === 'hermes' || target === 'all') {
3154
- console.log('\n[Hermes Agent]');
3155
- await installHermes();
3156
- }
3157
- if (target === 'openclaw' || target === 'all') {
3158
- console.log('\n[OpenClaw]');
3159
- await installOpenClaw();
3160
- }
3161
- if (target === 'atomcode' || target === 'all') {
3162
- console.log('\n[AtomCode]');
3163
- await installAtomCode();
3164
- }
3165
3141
  if (target === 'codex' || target === 'all') {
3166
3142
  await runInstallStep('codex', '\n[Codex]', () => {
3167
3143
  if (!hasCodexCLI()) {
@@ -4075,10 +4051,6 @@ async function cmdUpdate() {
4075
4051
  console.log(`\x1b[33mMCP 工具在重启各 agent 会话后才生效。\x1b[0m`);
4076
4052
  return;
4077
4053
  }
4078
-
4079
- await cmdUninstall();
4080
- console.log('');
4081
- await cmdInstall();
4082
4054
  }
4083
4055
 
4084
4056
  async function cmdReinstall() {
@@ -68,7 +68,7 @@ export const AGENTS = [
68
68
  id: 'officeace',
69
69
  pathPatterns: ['/.office-claw/', '/.officeace/'],
70
70
  envVars: ['OFFICEACE_SESSION_ID', 'OFFICE_CLAW_CONFIG_ROOT'],
71
- clientNames: ['office-claw-mcp-connector-probe'],
71
+ clientNames: ['office-claw-mcp-connector-probe', 'officeace-agent'],
72
72
  version: { type: 'officeace' },
73
73
  },
74
74
  {
@@ -94,6 +94,7 @@ export const AGENTS = [
94
94
  id: 'cursor',
95
95
  pathPatterns: ['/.cursor/', '/cursor/'],
96
96
  envVars: ['CURSOR_SESSION_ID', 'CURSOR_GIT_WORKDIR'],
97
+ clientNames: ['cursor-vscode'],
97
98
  version: null,
98
99
  },
99
100
  {
@@ -323,9 +323,7 @@ export async function upgradePackage({ target = 'all', version = 'latest' } = {}
323
323
  return { success: false, error: 'version 参数仅支持 latest。目标版本由插件自动判定。' };
324
324
  }
325
325
  const { doQuery = queryDistTags, spawnFn = defaultSpawn } = options;
326
- // Tests inject currentVersion explicitly - the repo package.json version changes
327
- // between prerelease and stable lines, which must not flip the upgrade-tag logic.
328
- const previousVersion = options.currentVersion || readInstalledVersion();
326
+ const previousVersion = readInstalledVersion();
329
327
  let distTags;
330
328
  try {
331
329
  distTags = await doQuery();