- Add OPENCLAW_GATEWAY_PORT env var support (default 18789) — auto-detected
from openclaw.json during setup, all API routes use gatewayBaseUrl() helper
- Redesign AI Cost Analysis as "Agent Optimizer" with action chips, structured
prompts for Max plan users, and follow-up suggestions
- Fix renderMarkdown to handle fenced code blocks (extract before escape,
reinsert after rules)
- Rewrite buildCostAnalysisPrompt: throughput-focused, structured response
format, 350 word cap
- Fix efficiency score using effective input (input + cache tokens)
- Unified OptimizationCard with UUID resolution and responsive layout
- Update all docs and in-app help to mention configurable port
- Remove auto-scroll from cost analysis chat
- Change insight button from "Fix" to "How to fix"
Closes#9
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
If PORT is set in .env.local (or environment), clawport dev/start
automatically passes --port to Next.js. Explicit --port/-p flags
take precedence. Doctor command also respects PORT for its port check.
Inspired by stoXmod's PR #7.
Co-Authored-By: stoXmod <nisharasenadheera2@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When clawport-ui is installed globally (e.g. npm install -g), the package
lives in a system path like /usr/lib/node_modules/clawport-ui which is
not writable by normal users. clawport setup would then fail with EACCES
when writing .env.local.
- setup.mjs: if target dir is not writable, write .env.local to
~/.config/clawport-ui/ instead and create that dir if needed
- bin/clawport.mjs: load .env.local from package root or, if missing,
from ~/.config/clawport-ui so dev/start/status/doctor work with
global installs
Fixes EACCES when running 'clawport setup' after global install.
Made-with: Cursor
Agent registry now auto-discovers agents from $WORKSPACE_PATH/agents/
instead of requiring a manual agents.json or falling back to bundled
defaults. Resolution: user override -> auto-discover -> bundled fallback.
Cron-to-agent matching is now dynamic (by agent ID prefix) instead of
using a hardcoded PREFIX_MAP tied to the developer's specific agents.
Also includes: kanban robustness (timeouts, concurrent limits, input
validation, dedup, stale work recovery), onboarding name input moved
to step 1, operator name on settings page, agent profile image upload,
TTS speaker icon removed, npm install troubleshooting docs.
298 tests passing (up from 288).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npx inside a global install triggers pnpm to reinstall dependencies,
creating duplicate React copies and breaking hooks. Use the next binary
from the package's own node_modules/.bin/ instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Users can now run ClawPort after `npm install -g clawport-ui` via the
`clawport` command (dev, start, setup, status, help). The CLI resolves
its own package root so commands work from any directory.
- Add bin/clawport.mjs with subcommands
- Add bin field to package.json
- Add --cwd flag to scripts/setup.mjs for CLI usage
- Update README, SETUP, CLAUDE.md, and in-app docs
- Add BestPracticesSection and npm troubleshooting to docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>