huaweicloud-devkit 1.0.2-next.17 → 1.0.2-next.18

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.0.2-next.17",
3
+ "version": "1.0.2-next.18",
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.0.2-next.17",
20
+ "version": "1.0.2-next.18",
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-core",
3
- "version": "1.0.2-next.17",
3
+ "version": "1.0.2-next.18",
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",
@@ -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.0.2-next.17",
20
+ "version": "1.0.2-next.18",
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-core",
3
- "version": "1.0.2-next.17",
3
+ "version": "1.0.2-next.18",
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,7 +1,7 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
3
  "displayName": "HuaweiCloud DevKit",
4
- "version": "1.0.2-next.16",
4
+ "version": "1.0.2-next.18",
5
5
  "family": "bundle-plugin",
6
6
  "bundleFormat": "codex",
7
7
  "description": "Guide coding agents to use Huawei Cloud safely — KooCLI, APIs, SDKs, 28 MCP tools, skills, and safety guardrails.",
@@ -30,9 +30,15 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
30
30
  const pluginRoot = resolve(__dirname, '..');
31
31
  const packageRoot = resolve(pluginRoot, '..', '..');
32
32
  let pkgVersion = '0.0.0';
33
- try {
34
- pkgVersion = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf8')).version;
35
- } catch {}
33
+ for (const base of [pluginRoot, packageRoot]) {
34
+ try {
35
+ const version = JSON.parse(readFileSync(join(base, 'package.json'), 'utf8')).version;
36
+ if (version) {
37
+ pkgVersion = version;
38
+ break;
39
+ }
40
+ } catch {}
41
+ }
36
42
 
37
43
  let buffer = Buffer.alloc(0);
38
44
  let useContentLengthFraming = true;
@@ -405,7 +405,12 @@ function copyDir(src, dest) {
405
405
  }
406
406
 
407
407
  function installRuntimeDeps(pluginsDir) {
408
- const pkgJson = { type: 'module', dependencies: { undici: '^8.10.0' } };
408
+ const pkgJson = {
409
+ name: 'huaweicloud-plugins',
410
+ version: pkgVersion,
411
+ type: 'module',
412
+ dependencies: { undici: '^8.10.0' },
413
+ };
409
414
  mkdirSync(pluginsDir, { recursive: true });
410
415
  writeFileSync(join(pluginsDir, 'package.json'), JSON.stringify(pkgJson, null, 2));
411
416
  const r = spawnSync('npm', ['install', '--omit=dev'], {
@@ -1427,6 +1432,7 @@ async function installOfficeAce() {
1427
1432
  copyDir(safetyDir, join(pluginDest, 'safety'));
1428
1433
  console.log(` Safety Policy -> ${join(pluginDest, 'safety')}`);
1429
1434
 
1435
+ installRuntimeDeps(pluginDest);
1430
1436
  ensureOfficeaceMcpInSqlite();
1431
1437
  registerOfficeaceSkillEntries();
1432
1438
  }
@@ -1444,6 +1450,7 @@ async function updateOfficeAce() {
1444
1450
  console.log(` MCP Server updated -> ${join(pluginDest, 'src')}`);
1445
1451
  copyDir(safetyDir, join(pluginDest, 'safety'));
1446
1452
  console.log(` Safety Policy updated -> ${join(pluginDest, 'safety')}`);
1453
+ installRuntimeDeps(pluginDest);
1447
1454
  ensureOfficeaceMcpInSqlite();
1448
1455
  registerOfficeaceSkillEntries();
1449
1456
  mkdirSync(pluginDest, { recursive: true });