10 Commits
Author SHA1 Message Date
JohnRiceMLandClaude Opus 4.6 a51ac3cbe0 fix: lazy OpenAI client + canonical workspace detection from openclaw.json
Move OpenAI client initialization from module top-level to a lazy
singleton (lib/openai.ts) called inside route handlers. Prevents build
errors when gateway env vars aren't set. Also adds openclaw.json
agents.defaults.workspace as the first workspace detection source,
before falling back to filesystem paths.

Inspired by PR #21 (cherry-picked the good parts, skipped the fragile
cli-utils rewrite and the agents-registry simplification that dropped
sub-agents). Bumps to v0.8.8.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-23 10:36:17 -05:00
JohnRiceMLandClaude Opus 4.6 6b61daa6f6 fix: resilient CLI JSON parsing + multi-workspace path detection
Strip OpenClaw validation warnings from CLI stdout before JSON.parse()
so ClawPort works with OpenClaw versions that print "Unrecognized key"
warnings (fixes #16). Add workspace-<agentId> path format detection to
setup scripts for multi-agent workspaces (fixes #18). Bumps to v0.8.5.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 09:36:09 -05:00
JohnRiceMLandClaude Opus 4.6 be523cee72 feat: v0.8.0 — configurable gateway port, Agent Optimizer redesign, markdown code blocks
- 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>
2026-03-10 09:25:07 -05:00
JohnRiceMLandClaude Opus 4.6 9f58fe2090 Fix workspace path detection for current OpenClaw layout
detectWorkspacePath() now checks ~/.openclaw/agents/main/workspace
first (current layout), falling back to ~/.openclaw/workspace (legacy).
Fixes #3.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 17:04:24 -06:00
Mark Mercado ff0951d5d3 fix: use ~/.config/clawport-ui for .env.local when package dir not writable
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
2026-03-07 10:25:54 -05:00
JohnRiceMLandClaude Opus 4.6 ac604b8afa fix: detect and auto-enable gateway HTTP endpoint during setup
The OpenClaw gateway disables /v1/chat/completions by default. Setup
now detects this and offers to enable it. Chat route shows a clear
error message on 405 instead of a generic failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 23:24:32 -06:00
JohnRiceMLandClaude Opus 4.6 8a754144b8 feat: auto-discover agents from OpenClaw workspace + kanban hardening
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>
2026-03-03 22:39:57 -06:00
JohnRiceMLandClaude Opus 4.6 7d4fc586a3 feat: add CLI entry point and bump to v0.2.0
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>
2026-03-03 18:16:07 -06:00
JohnRiceMLandClaude Opus 4.6 f20984620e rebrand: rename from Agent Claw / Manor UI to ClawPort
Full product rebrand across the entire codebase:

- User-facing strings: "Agent Claw" -> "ClawPort" everywhere (title,
  sidebar, search, onboarding wizard, chat header, setup script)
- TypeScript interfaces: ManorSettings -> ClawPortSettings, ManorMap ->
  OrgMap, ManorPage -> HomePage
- Settings fields: manorName -> portalName, manorSubtitle ->
  portalSubtitle, manorEmoji -> portalEmoji, manorIcon -> portalIcon
  (with matching setters)
- localStorage keys: manor-settings -> clawport-settings (with legacy
  migration), manor-theme -> clawport-theme, manor-onboarded ->
  clawport-onboarded, manor-conversations -> clawport-conversations,
  manor-kanban -> clawport-kanban
- Custom events: manor:open-search -> clawport:open-search
- API keys: agent:main:manor-ui -> agent:main:clawport
- Workspace paths: $WORKSPACE_PATH/manor/ -> $WORKSPACE_PATH/clawport/
- Package name: manor-ui -> clawport
- All documentation (README, SETUP, CLAUDE.md, BRANDING, docs/)
- All test files updated to match new keys and field names
- 288/288 tests passing, tsc --noEmit clean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 11:25:39 -06:00
JohnRiceMLandClaude Opus 4.6 8da78b3519 feat: add onboarding wizard, rebrand to Agent Claw, open-source readiness
7-step onboarding wizard (welcome, system check, naming, theme, accent,
voice input, overview) with live previews and OpenClaw health checks.

Add operatorName to settings — replaces all hardcoded "John Rice" references
in sidebar, chat prompts, and system messages with dynamic operator name.

Rebrand user-facing strings from "Manor" to "Agent Claw" with BRANDING.md
documenting every reference for future rebranding.

Open-source readiness: configurable agent registry (workspace override),
requireEnv() for safe env access, npm run setup auto-detection script,
SETUP.md guide, and comprehensive developer documentation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 09:58:39 -06:00