clawport-ui 0.6.4 → 0.6.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 +3 -3
- package/bin/clawport.mjs +12 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -122,7 +122,7 @@ All AI calls -- chat, vision, TTS, transcription -- route through the gateway. O
|
|
|
122
122
|
|
|
123
123
|
| Variable | Description | How to find it |
|
|
124
124
|
|----------|-------------|----------------|
|
|
125
|
-
| `WORKSPACE_PATH` | Path to your OpenClaw workspace | Default: `~/.openclaw/workspace` |
|
|
125
|
+
| `WORKSPACE_PATH` | Path to your OpenClaw workspace | Default: `~/.openclaw/agents/main/workspace` (or legacy `~/.openclaw/workspace`) |
|
|
126
126
|
| `OPENCLAW_BIN` | Path to the `openclaw` binary | Run `which openclaw` |
|
|
127
127
|
| `OPENCLAW_GATEWAY_TOKEN` | Gateway auth token | Run `openclaw gateway status` |
|
|
128
128
|
|
|
@@ -132,7 +132,7 @@ All AI calls -- chat, vision, TTS, transcription -- route through the gateway. O
|
|
|
132
132
|
|----------|-------------|
|
|
133
133
|
| `ELEVENLABS_API_KEY` | ElevenLabs API key for voice indicators on agent profiles |
|
|
134
134
|
|
|
135
|
-
Running `clawport setup` auto-detects all required values and writes `.env.local`. See [SETUP.md](SETUP.md) for manual configuration, agent customization, and troubleshooting.
|
|
135
|
+
Running `clawport setup` auto-detects all required values and writes `.env.local`. When installed globally, if the package directory isn't writable, setup writes to `~/.config/clawport-ui/.env.local` instead. See [SETUP.md](SETUP.md) for manual configuration, agent customization, and troubleshooting.
|
|
136
136
|
|
|
137
137
|
---
|
|
138
138
|
|
|
@@ -171,7 +171,7 @@ clawport help # Show usage
|
|
|
171
171
|
## Testing
|
|
172
172
|
|
|
173
173
|
```bash
|
|
174
|
-
npm test #
|
|
174
|
+
npm test # 536 tests across 24 suites (Vitest)
|
|
175
175
|
npx tsc --noEmit # Type-check (zero errors)
|
|
176
176
|
npx next build # Production build
|
|
177
177
|
```
|
package/bin/clawport.mjs
CHANGED
|
@@ -150,9 +150,15 @@ ${dim(`Package root: ${PKG_ROOT}`)}
|
|
|
150
150
|
`)
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
+
function portArgs() {
|
|
154
|
+
const hasPort = extraArgs.some((a) => a === '--port' || a.startsWith('--port=') || a === '-p')
|
|
155
|
+
if (!hasPort && process.env.PORT) return ['--port', process.env.PORT]
|
|
156
|
+
return []
|
|
157
|
+
}
|
|
158
|
+
|
|
153
159
|
function cmdDev() {
|
|
154
160
|
console.log(`\n ${bold('Starting ClawPort dev server...')}\n`)
|
|
155
|
-
run(NEXT_BIN, ['dev', ...extraArgs])
|
|
161
|
+
run(NEXT_BIN, ['dev', ...portArgs(), ...extraArgs])
|
|
156
162
|
}
|
|
157
163
|
|
|
158
164
|
function cmdStart() {
|
|
@@ -164,7 +170,7 @@ function cmdStart() {
|
|
|
164
170
|
})
|
|
165
171
|
build.on('close', (code) => {
|
|
166
172
|
if (code !== 0) process.exit(code)
|
|
167
|
-
run(NEXT_BIN, ['start', ...extraArgs])
|
|
173
|
+
run(NEXT_BIN, ['start', ...portArgs(), ...extraArgs])
|
|
168
174
|
})
|
|
169
175
|
}
|
|
170
176
|
|
|
@@ -286,9 +292,10 @@ async function cmdDoctor() {
|
|
|
286
292
|
}
|
|
287
293
|
check(workspaceOk, 'Workspace structure', workspaceFix)
|
|
288
294
|
|
|
289
|
-
// 7. Port
|
|
290
|
-
const
|
|
291
|
-
|
|
295
|
+
// 7. Port available
|
|
296
|
+
const port = Number(process.env.PORT) || 3000
|
|
297
|
+
const portFree = await checkPort(port)
|
|
298
|
+
check(portFree, `Port ${port} available`, `Port ${port} is in use. Use: clawport dev --port ${port + 1}`)
|
|
292
299
|
|
|
293
300
|
// Summary
|
|
294
301
|
console.log()
|