openclaw-agent-dashboard 1.0.4 → 1.0.6

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
@@ -48,16 +48,35 @@ brew install python3
48
48
 
49
49
  ## 快速安装
50
50
 
51
- ### 方式一:一键安装(推荐)
51
+ ### 方式一:npx 安装(推荐,全平台)
52
52
 
53
53
  ```bash
54
- # 一键安装(需已安装 openclaw:npm install -g openclaw)
55
- curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/main/scripts/install.sh | bash
54
+ npx openclaw-agent-dashboard
55
+ ```
56
+
57
+ 一行搞定,自动从 GitHub Release 下载最新版并安装。升级也是同一行命令。
58
+
59
+ **可选参数**:
60
+
61
+ ```powershell
62
+ # 指定版本
63
+ npx openclaw-agent-dashboard --version 1.0.4
64
+
65
+ # 跳过 Python 依赖安装
66
+ npx openclaw-agent-dashboard --skip-python
67
+
68
+ # 显示详细输出(调试用)
69
+ npx openclaw-agent-dashboard --verbose
70
+
71
+ # 预览安装过程(不执行实际安装)
72
+ npx openclaw-agent-dashboard --dry-run
56
73
  ```
57
74
 
58
- 安装完成后,执行任意 `openclaw` 命令时 Dashboard 会自动启动。
75
+ ### 方式二:一键脚本(Linux / macOS)
59
76
 
60
- 访问地址: http://localhost:38271
77
+ ```bash
78
+ curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/main/scripts/install.sh | bash
79
+ ```
61
80
 
62
81
  **可选参数**:
63
82
 
@@ -65,20 +84,14 @@ curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/m
65
84
  # 安装指定版本
66
85
  DASHBOARD_VERSION=1.0.0 curl -fsSL https://raw.githubusercontent.com/Umarchen/openclaw-agent-dashboard/main/scripts/install.sh | bash
67
86
 
68
- # 使用自定义下载地址
69
- DASHBOARD_RELEASE_URL=https://example.com/openclaw-agent-dashboard-v1.0.0.tgz curl -fsSL ... | bash
70
-
71
87
  # 跳过 Python 依赖安装
72
88
  DASHBOARD_SKIP_PYTHON=1 curl -fsSL ... | bash
73
89
 
74
90
  # 显示详细输出(调试用)
75
91
  VERBOSE=1 curl -fsSL ... | bash
76
-
77
- # 预览安装过程(不执行实际安装)
78
- DRY_RUN=1 curl -fsSL ... | bash
79
92
  ```
80
93
 
81
- ### 方式二:从源码安装
94
+ ### 方式三:从源码安装
82
95
 
83
96
  ```bash
84
97
  # 克隆仓库
@@ -100,7 +113,7 @@ cd openclaw-agent-dashboard
100
113
  npm run deploy
101
114
  ```
102
115
 
103
- ### 方式三:手动下载安装
116
+ ### 方式四:手动下载安装
104
117
 
105
118
  从 [GitHub Releases](https://github.com/Umarchen/openclaw-agent-dashboard/releases) 下载 tgz 包:
106
119
 
@@ -111,12 +124,15 @@ curl -LO https://github.com/Umarchen/openclaw-agent-dashboard/releases/download/
111
124
  # 安装
112
125
  openclaw plugins install openclaw-agent-dashboard-v1.0.0.tgz
113
126
 
114
- # 安装 Python 依赖(Debian/Ubuntu 请用 venv,避免 PEP 668 报错)
127
+ # 安装 Python 依赖
115
128
  cd ~/.openclaw/extensions/openclaw-agent-dashboard/dashboard
116
129
  python3 -m venv .venv
117
130
  .venv/bin/pip install -r requirements.txt
118
131
  ```
119
132
 
133
+ > 安装完成后,执行任意 `openclaw` 命令时 Dashboard 会自动启动。
134
+ > 访问地址: http://localhost:38271
135
+
120
136
  ## 命令说明
121
137
 
122
138
  | 命令 | 说明 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-agent-dashboard",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
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.4",
5
+ "version": "1.0.6",
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.4",
3
+ "version": "1.0.6",
4
4
  "description": "多 Agent 可视化看板 - OpenClaw 插件",
5
5
  "main": "index.js",
6
6
  "openclaw": {
@@ -56,12 +56,24 @@ function parseArgs() {
56
56
  // Python 环境检测
57
57
  // ============================================
58
58
 
59
+ /**
60
+ * 获取 Python 命令(跨平台)
61
+ * Windows 通常是 python,Linux/macOS 通常是 python3
62
+ * @returns {string}
63
+ */
64
+ function getPythonCmd() {
65
+ if (runCommand('python3', ['--version'], { silent: true }).success) return 'python3';
66
+ if (runCommand('python', ['--version'], { silent: true }).success) return 'python';
67
+ return 'python3'; // 默认
68
+ }
69
+
59
70
  /**
60
71
  * 检查 venv 模块是否可用
61
72
  * @returns {boolean}
62
73
  */
63
74
  function checkVenvModule() {
64
- const result = runCommand('python3', ['-c', 'import venv'], { silent: true });
75
+ const pythonCmd = getPythonCmd();
76
+ const result = runCommand(pythonCmd, ['-c', 'import venv'], { silent: true });
65
77
  return result.success;
66
78
  }
67
79
 
@@ -70,14 +82,13 @@ function checkVenvModule() {
70
82
  * @returns {boolean}
71
83
  */
72
84
  function checkPipModule() {
73
- // 尝试 python3 -m pip
74
- let result = runCommand('python3', ['-m', 'pip', '--version'], { silent: true });
85
+ const pythonCmd = getPythonCmd();
86
+ // 尝试 python -m pip
87
+ let result = runCommand(pythonCmd, ['-m', 'pip', '--version'], { silent: true });
75
88
  if (result.success) return true;
76
89
 
77
- // 尝试 pip3
90
+ // 尝试 pip3 / pip
78
91
  if (commandExists('pip3')) return true;
79
-
80
- // 尝试 pip
81
92
  if (commandExists('pip')) return true;
82
93
 
83
94
  return false;
@@ -121,7 +132,8 @@ function installWithVenv(reqFile, venvDir, silent) {
121
132
 
122
133
  // 创建 venv
123
134
  logInfo(' 创建虚拟环境...');
124
- const createResult = runCommand('python3', ['-m', 'venv', venvDir], { silent });
135
+ const pythonCmd = getPythonCmd();
136
+ const createResult = runCommand(pythonCmd, ['-m', 'venv', venvDir], { silent });
125
137
  if (!createResult.success) {
126
138
  logWarn(' venv 创建失败');
127
139
  if (!silent) {
@@ -169,8 +181,8 @@ function installWithPipUser(reqFile, silent) {
169
181
  logInfo(' 尝试: pip --user(PEP 668 兜底)');
170
182
 
171
183
  const pipCommands = [
172
- { cmd: 'python3', args: ['-m', 'pip', 'install', '-r', reqFile, '-q', '--user'], name: 'python3 -m pip --user' },
173
- { cmd: 'python3', args: ['-m', 'pip', 'install', '-r', reqFile, '-q'], name: 'python3 -m pip' },
184
+ { cmd: getPythonCmd(), args: ['-m', 'pip', 'install', '-r', reqFile, '-q', '--user'], name: 'pip --user' },
185
+ { cmd: getPythonCmd(), args: ['-m', 'pip', 'install', '-r', reqFile, '-q'], name: 'pip' },
174
186
  { cmd: 'pip', args: ['install', '-r', reqFile, '-q', '--user'], name: 'pip --user' },
175
187
  { cmd: 'pip3', args: ['install', '-r', reqFile, '-q', '--user'], name: 'pip3 --user' },
176
188
  ];
@@ -3,3 +3,4 @@ uvicorn[standard]==0.27.0
3
3
  pydantic==2.5.0
4
4
  python-multipart==0.0.6
5
5
  watchdog>=3.0.0
6
+ tzdata