huaweicloud-devkit 1.1.1-next.11 → 1.1.1-next.12

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.
@@ -17,6 +17,25 @@ if (!cwd.startsWith(profilesRoot)) {
17
17
 
18
18
  // ── Inside a DSH profile: copy skills to ~/.dsh/skills/ ──
19
19
  const packageRoot = path.resolve(__dirname, '..');
20
+
21
+ // Rewrite the bundled patch's relative MCP server path to the absolute package
22
+ // path. Relative paths resolve against the DSH process cwd and break when DSH
23
+ // is started outside the profile directory. Idempotent: absolute paths are kept.
24
+ const bundledPatch = path.join(packageRoot, 'cordis.patch.yml');
25
+ if (fs.existsSync(bundledPatch)) {
26
+ const relativeArg = './node_modules/huaweicloud-devkit/plugins/huaweicloud-core/src/mcp-server.mjs';
27
+ const absoluteArg = path
28
+ .join(packageRoot, 'plugins', 'huaweicloud-core', 'src', 'mcp-server.mjs')
29
+ .replace(/\\/g, '/')
30
+ .replace(/'/g, "''");
31
+ const patch = fs.readFileSync(bundledPatch, 'utf8');
32
+ const updated = patch.split(`'${relativeArg}'`).join(`'${absoluteArg}'`);
33
+ if (updated !== patch) {
34
+ fs.writeFileSync(bundledPatch, updated);
35
+ console.log('HuaweiCloud DevKit: rewrote DSH patch MCP path to absolute package path');
36
+ }
37
+ }
38
+
20
39
  const skillsSrc = path.join(packageRoot, 'plugins', 'huaweicloud-core', 'skills');
21
40
  const skillsDest = path.join(dshHome, 'skills');
22
41
 
package/cordis.patch.yml CHANGED
@@ -1,7 +1,5 @@
1
1
  - insert:
2
2
  - id: huaweicloud-devkit
3
- name: huaweicloud-devkit
4
- - id: mcp-huaweicloud
5
3
  name: '@deepseek-ai/dsh-mcp-client'
6
4
  config:
7
5
  serverName: huaweicloud
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
- "version": "1.1.1-next.11",
3
+ "version": "1.1.1-next.12",
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.11",
20
+ "version": "1.1.1-next.12",
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.11",
23
+ "version": "1.1.1-next.12",
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.11",
20
+ "version": "1.1.1-next.12",
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.11",
3
+ "version": "1.1.1-next.12",
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.11",
3
+ "version": "1.1.1-next.12",
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.11",
5
+ "version": "1.1.1-next.12",
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.",
@@ -100,7 +100,7 @@ function dshRegistered() {
100
100
  try {
101
101
  const patch = readFileSync(patchPath, 'utf8');
102
102
  return (
103
- patch.includes('id: mcp-huaweicloud') &&
103
+ (patch.includes('id: huaweicloud-devkit') || patch.includes('id: mcp-huaweicloud')) &&
104
104
  patch.includes('@deepseek-ai/dsh-mcp-client') &&
105
105
  patch.includes('serverName: huaweicloud')
106
106
  );
@@ -1708,7 +1708,7 @@ function dshPatchBlock() {
1708
1708
  return [
1709
1709
  DSH_MCP_PATCH_START,
1710
1710
  '- insert:',
1711
- ' - id: mcp-huaweicloud',
1711
+ ' - id: huaweicloud-devkit',
1712
1712
  " name: '@deepseek-ai/dsh-mcp-client'",
1713
1713
  ' config:',
1714
1714
  ' serverName: huaweicloud',
@@ -1811,7 +1811,7 @@ function dshPatchConfigured() {
1811
1811
  try {
1812
1812
  const patch = readFileSync(patchFile, 'utf8');
1813
1813
  return (
1814
- patch.includes('id: mcp-huaweicloud') &&
1814
+ (patch.includes('id: huaweicloud-devkit') || patch.includes('id: mcp-huaweicloud')) &&
1815
1815
  patch.includes('@deepseek-ai/dsh-mcp-client') &&
1816
1816
  patch.includes('serverName: huaweicloud')
1817
1817
  );