openclaw-agent-dashboard 1.0.7 → 1.0.8

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": "openclaw-agent-dashboard",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "多 Agent 可视化看板 - 状态、任务、API、工作流、协作流程",
5
5
  "bin": {
6
6
  "openclaw-agent-dashboard": "scripts/install.js"
@@ -2,7 +2,7 @@
2
2
  "id": "openclaw-agent-dashboard",
3
3
  "name": "OpenClaw Agent Dashboard",
4
4
  "description": "多 Agent 可视化看板 - 状态、任务、API、工作流、协作流程",
5
- "version": "1.0.7",
5
+ "version": "1.0.8",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-agent-dashboard",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "多 Agent 可视化看板 - OpenClaw 插件",
5
5
  "main": "index.js",
6
6
  "openclaw": {
@@ -191,10 +191,24 @@ function shellEscape(arg) {
191
191
  */
192
192
  function runCommand(cmd, args = [], options = {}) {
193
193
  const { cwd, silent = true, timeout = 120000 } = options;
194
+ const isWin = process.platform === 'win32';
194
195
 
195
196
  try {
196
- // 构建命令字符串,对参数进行转义
197
- const cmdStr = [cmd, ...args.map(shellEscape)].join(' ');
197
+ // Windows 用双引号,Unix 用单引号
198
+ const esc = (arg) => {
199
+ if (!arg) return '""';
200
+ if (isWin) {
201
+ // Windows: 用双引号包裹含空格/特殊字符的路径
202
+ if (/[^a-zA-Z0-9_\-./:=@]/.test(arg)) {
203
+ return '"' + arg.replace(/"/g, '""') + '"';
204
+ }
205
+ return arg;
206
+ } else {
207
+ return shellEscape(arg);
208
+ }
209
+ };
210
+
211
+ const cmdStr = [cmd, ...args.map(esc)].join(' ');
198
212
 
199
213
  const result = execSync(
200
214
  cmdStr,
@@ -203,7 +217,7 @@ function runCommand(cmd, args = [], options = {}) {
203
217
  encoding: 'utf8',
204
218
  timeout,
205
219
  stdio: silent ? ['ignore', 'pipe', 'pipe'] : 'inherit',
206
- shell: process.platform === 'win32',
220
+ shell: true,
207
221
  }
208
222
  );
209
223
  return { success: true, code: 0, output: result || '' };