huaweicloud-devkit 1.1.0-next.12 → 1.1.0-next.13

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/README.md CHANGED
@@ -133,7 +133,7 @@ npx --yes huaweicloud-devkit uninstall --target hermes
133
133
  > **Uninstall notes**: On Linux, run `rm -rf ~/.npm/_npx/* && npm cache clean --force` after uninstall to ensure a clean slate. On Windows, close all Hermes sessions first to release file locks, then after uninstall check `%LOCALAPPDATA%\hermes\config.yaml` for YAML corruption and manually remove `%LOCALAPPDATA%\hermes\huaweicloud-plugins` if any files remain.
134
134
  > **Safety hooks**: The installer configures Hermes shell hooks (`config.yaml` → `hooks.pre_tool_call`) to intercept unsafe terminal commands such as credential file reads, environment variable dumps, and unapproved `hcloud` write operations. Hermes shows a consent prompt the first time; approve it or set `hooks_auto_accept: true` in `config.yaml` to auto-accept.
135
135
  > **MCP Python SDK**: The installer automatically installs the `mcp` Python package required by Hermes for MCP tool discovery. If you see `[FAIL] Hermes MCP Python SDK` in `doctor`, run `pip3 install mcp` manually.
136
- > **Windows**: Hermes on Windows stores data under `%LOCALAPPDATA%\hermes` instead of `~/.hermes`. The installer detects this automatically.
136
+ > **Windows**: See [docs/hermes-windows.md](docs/hermes-windows.md) for known issues and workarounds.
137
137
 
138
138
  ### OpenClaw
139
139
 
package/README.zh-CN.md CHANGED
@@ -133,7 +133,7 @@ npx --yes huaweicloud-devkit uninstall --target hermes
133
133
  > **卸载说明**:Linux 上卸载后执行 `rm -rf ~/.npm/_npx/* && npm cache clean --force` 确保下次全新安装。Windows 上先关闭所有 Hermes 会话(释放文件锁),卸载后检查 `%LOCALAPPDATA%\hermes\config.yaml` 是否有 YAML 损坏,如有残留文件手动删除 `%LOCALAPPDATA%\hermes\huaweicloud-plugins`。
134
134
  > **安全钩子(Safety hooks)**:安装器会在 `config.yaml` 中写入 shell hooks 配置(`hooks.pre_tool_call`),拦截不安全的终端命令,如读取凭据文件、导出环境变量、未审批的 `hcloud` 写操作。Hermes 首次使用时会弹出同意提示,可批准或设置 `hooks_auto_accept: true` 自动批准。
135
135
  > **MCP Python SDK**:安装器会自动安装 Hermes 所需的 `mcp` Python 包。如果 doctor 显示 `[FAIL] Hermes MCP Python SDK`,手动执行 `pip3 install mcp`。
136
- > **Windows**:Hermes 在 Windows 上数据存储在 `%LOCALAPPDATA%\hermes` 而非 `~/.hermes`,安装器会自动检测适配。
136
+ > **Windows**:参见 [docs/hermes-windows.md](docs/hermes-windows.md) 了解已知问题和解决方法。
137
137
 
138
138
  ### OpenClaw
139
139
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huaweicloud-devkit",
3
- "version": "1.1.0-next.12",
3
+ "version": "1.1.0-next.13",
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.0-next.12",
20
+ "version": "1.1.0-next.13",
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.0-next.12",
23
+ "version": "1.1.0-next.13",
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.0-next.12",
20
+ "version": "1.1.0-next.13",
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.0-next.12",
3
+ "version": "1.1.0-next.13",
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.0-next.12",
3
+ "version": "1.1.0-next.13",
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.0-next.12",
5
+ "version": "1.1.0-next.13",
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.",
@@ -49,12 +49,28 @@ for (const base of [pluginRoot, packageRoot]) {
49
49
  let buffer = Buffer.alloc(0);
50
50
  let useContentLengthFraming = true;
51
51
 
52
- // Prevent process exit on Windows when stdin is closed by the parent process.
53
- // Node.js event loop exits when no active handles remain; stdin 'data' listener
54
- // is the only handle. On Windows, Hermes may close the stdin pipe after the
55
- // initial handshake, causing the process to exit silently (code 0).
56
- // A lightweight non-unref timer ensures the loop stays alive.
57
- setInterval(() => {}, 3600000);
52
+ // Keep the event loop alive after stdin is closed (Windows Hermes workaround).
53
+ // Node.js exits when no active handles remain; the stdin 'data' listener is
54
+ // the only handle. On Windows, Hermes may close the stdin pipe after the
55
+ // initial handshake, causing the process to exit silently (exit 0).
56
+ //
57
+ // When stdin closes, start a keepalive timer. When stdout also closes (normal
58
+ // shutdown signal from OfficeAce or other agents), clear the timer and exit.
59
+ let keepAlive = null;
60
+ function onStdinClose() {
61
+ if (keepAlive) return;
62
+ keepAlive = setInterval(() => {}, 60000);
63
+ }
64
+ function onStdoutClose() {
65
+ if (keepAlive) {
66
+ clearInterval(keepAlive);
67
+ keepAlive = null;
68
+ }
69
+ process.exitCode = 0;
70
+ }
71
+ stdin.on('close', onStdinClose);
72
+ stdin.on('end', onStdinClose);
73
+ stdout.on('close', onStdoutClose);
58
74
 
59
75
  stdin.on('data', (chunk) => {
60
76
  buffer = Buffer.concat([buffer, chunk]);