Add --json flag to `openclaw memory status --deep` call and handle the
new array-of-agents response format. Previously the missing --json flag
caused JSON.parse to fail, always falling back to indexed: false. Now
correctly derives indexed state from status.files > 0 && !dirty across
all agents, sums chunks for totalEntries, and reads provider/vector
from the primary agent. Bumps to v0.8.9.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
getCrons() now returns [] instead of throwing when OPENCLAW_BIN is
missing, the CLI binary is not found, or the command fails. This
prevents a 500 on /api/crons for users who haven't configured crons
or are missing the OpenClaw binary. The cron tab simply shows empty
state instead of an error. Bumps to v0.8.7.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When OpenClaw CLI prints debug log lines (e.g. "[plugins] [debug] ...")
to stdout before JSON, extractJson() failed because bracketed log lines
look like JSON array starts. Now tries each candidate position until one
actually parses. Also fixes the onboarding wizard to show a specific
"CLI log output" error instead of the misleading "Could not reach
gateway" message when /api/crons fails due to JSON parsing. Bumps to
v0.8.6.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
Add 5s in-memory TTL cache to loadRegistry() and getCrons() to eliminate
duplicate execSync CLI calls on page load. Memoize dagre layout in OrgMap
so agent selection changes only restyle nodes instead of recomputing
positions. Includes agents-provider, useAgents hook, fingerprint API,
and GlobalSearch refactors. Bumps to v0.8.4.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add click-and-drag repositioning to the LiveStreamWidget with position
persistence via localStorage settings. Add dashboard screenshots to
README from the marketing site.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add model: string | null to Agent type, enriched from openclaw agents
list --json. Chat routes use agent.model with claude-sonnet-4-6 fallback.
Model badge shown on agent detail, chat header, and org map nodes when
CLI data is available.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces 4 equal stat cards with a single HealthHero component (prominent
health score + compact stat pills). Moves Memory Advisor to position #2
(right after hero) so users see actionable AI guidance immediately. Pushes
timeline down below health checks. Removes redundant StaleDailyLogsCard.
Adds vector-search-disabled health check that flags when OpenClaw vector
search is not enabled, with advisor guidance on how to set it up.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a complete memory health system with 9 health checks (MEMORY.md line count,
file sizes, stale daily logs, total size, unindexed vector search, stale index,
stale evergreen files, missing config, temporal decay disabled), editing hints,
server-side file writing, and a reindex API endpoint.
Add AI Memory Advisor panel (v2.1) to the Overview tab — streams actionable
guidance for each health check via the same Agent Optimizer pattern used on the
Costs page. Health check rows now have "How to fix", "View", and "Reindex now"
action buttons. Inline chat supports follow-up questions with full context.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
JSONL-based conversation storage (mirrors kanban chat-store pattern) with
background merge on load and fire-and-forget writes. Conversations now sync
across devices automatically. Includes cross-device onboarding flag, "Synced"
indicator in chat header, and "Clear Server Data" button in settings.
Based on #8 by @raphfeuer with review fixes applied: agent ID validation in
lib layer, Promise.all for parallel fetches, unlinkSync for cleanup,
lightweight listAgentIds, MAX_MESSAGES cap, and 26 new tests.
Co-Authored-By: raphfeuer <raphfeuer@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 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>
- Break CostsPage (1500 lines) into 8 sub-components under components/costs/
- Add sidebar usage widget showing Claude Code 5-hour and weekly utilization
- Fix usage API: never cache zeros, retry on 429 with backoff, hide when unavailable
- Remove system theme option (dark/glass/color/light only)
- Compact sidebar nav (36px items, scrollable nav area, pinned footer)
- LiveStreamWidget: always visible as collapsed pill, play/pause on pill
- Live logs: add search bar and level filter pills (INF/WRN/ERR/DBG)
- Rename "Live Stream" to "Live Logs" throughout
- Weekly cap shows reset day instead of countdown
- Add PipelineDetailPanel and pipelines API route
- Add cron-utils with parseCronExpression and tests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add real-time subscription utilization (5-hour window + weekly cap)
via SSE stream from Anthropic OAuth API. Collapse insights to top 2
with expand toggle, and apply Apple HIG polish (hover lift, chart
depth, tabular-nums, mobile responsive usage cards).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds optimization scoring (cache, tiering, anomaly, efficiency), actionable
insights with projected savings, inline AI cost analysis with streaming chat,
and "Fix" buttons that send targeted prompts to the root agent. 12 new tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add inline chat below health check results so users can discuss findings
with the root agent without leaving the panel (same SSE pattern as
PipelineDetailPanel)
- Thread agent ownership into health check prompt -- each job shows its
owning agent name or "UNOWNED", and the AI flags unowned jobs
- Add "Clear Pipelines" button to reset to the empty/setup state
- Improve streaming UX: spinner + skeleton before first chunk, pulsing dot
in header, green "Complete" badge when done
- Add pipeline-utils with tests (56 tests covering layout, prompt builder,
context builder, ownership)
- Update CLAUDE.md with pipeline architecture docs, new component table,
API routes, and updated test counts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduce client-side slash commands (/clear, /help, /info, /soul,
/tools, /crons) with an autocomplete dropdown in the chat input.
- New lib/slash-commands.ts with command registry, parser, matcher,
and executor
- Autocomplete dropdown appears when typing "/" with keyboard
navigation (arrow keys, Enter/Tab to select, Escape to dismiss)
- System messages render as accent-bordered cards, filtered from
API calls so they never reach the gateway
- 35 new tests covering all parser and executor paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace all crypto.randomUUID() calls with generateId() helper that
falls back to a Math.random-based UUID in non-secure contexts (HTTP,
older browsers). Fixes#1. Also sets the ClawPort logo as the default
sidebar icon in place of the lobster emoji.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the Activity page's Feed tab with a global floating widget
that persists across page navigation. Clean top-level view with
level pills (INF/WRN/ERR/DBG) and truncated messages; click any
row to expand the raw JSON payload. Widget states: hidden, collapsed
pill, and expanded panel with play/pause, copy, and auto-scroll.
- Create components/LiveStreamWidget.tsx (global floating widget)
- Mount in app/layout.tsx alongside OnboardingWizard
- Simplify Activity page: remove tabs, render LogBrowser directly,
add "Open Live Stream" button dispatching custom DOM event
- Delete components/activity/ActivityFeed.tsx (replaced by widget)
- Add raw field to LiveLogLine type for expandable detail view
- Add lib/sse.ts (SSE buffer parser, client-safe)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two-tab Activity Console for real-time gateway monitoring and historical
log browsing. Live Feed streams via SSE from `openclaw logs --follow --json`.
Log Browser parses cron run + config audit JSONL files with filter pills,
text search, and expandable detail rows. Includes 21 unit tests.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agents in subdirectories (outpost/scout/SOUL.md, outpost/mirror/SOUL.md)
were invisible to the scanner. Root-matching directories (agents/jarvis/)
were skipped entirely, hiding their sub-agents. Data dirs (briefs/, JSON
files) could be misidentified as agents.
- Add scanSubdirAgents() helper for SOUL.md-driven child directory scanning
- Fix root-matching directory to scan sub-agents instead of blindly skipping
- Add deduplication guards for flat + subdir agent ID collisions
- 4 new tests covering all 3 bug scenarios
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrote CLI agent discovery to match the actual `openclaw agents list
--json` output (identityName, identityEmoji, workspace fields). Each
CLI agent's workspace is now scanned with discoverAgents() for proper
hierarchy detection. Added 31 tests for teams.ts and expanded CLI
discovery tests to cover multi-workspace merging, deduplication, and
graceful failure handling.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Agents defined in openclaw.json but without filesystem directories
under agents/ were invisible to ClawPort. Now loadRegistry() calls
`openclaw agents list --json` and merges any missing agents into the
filesystem-discovered set. Fixes issue where users only see the
default root agent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace flat BFS org map with dagre-based auto-layout. Two modes:
Hierarchy (full tree) and Teams (grouped columns with labels).
Richer agent cards show description, tool count, reports, cron health.
Extract shared buildTeams() into lib/teams.ts for GridView + OrgMap reuse.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When IDENTITY.md names the root agent (e.g. "Jarvis"), the root gets
id "jarvis". If agents/jarvis/ also exists, the directory scan would
create a second entry with the same id, causing React duplicate key
warnings and rendering issues. Now skips agent dirs matching rootId.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract testable detection logic from setup.mjs into lib/setup-detection.ts
and add 59 tests covering fresh, partial, existing, and transition user
scenarios across all subsystems (agents, memory, crons, pipelines, env).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Moved loadPipelines() (which uses Node fs) to cron-pipelines.server.ts.
Types and pure utility functions stay in cron-pipelines.ts so client
components can import them without triggering "Can't resolve 'fs'" errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Parses IDENTITY.md for root agent name/emoji, strips SOUL.md prefixes
from headings, discovers sub-agents in sub-agents/ and members/ dirs,
and handles agent dirs without SOUL.md. Adds 19 new tests (317 total).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
- Add MIT LICENSE file
- Rename ManorMap.tsx → OrgMap.tsx and update all imports
- Fix package.json repository/bugs URLs to JohnRiceML/clawport-ui
- Fix README clone URL to match actual repo
- Null out all ElevenLabs voice IDs in bundled agents.json (move to
workspace override for custom voices)
- Update BRANDING.md references
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add missing icons to every actionable button across the app for a more
polished feel. Also introduce dynamic text contrast on accent-colored
backgrounds so dark accents (red, purple, indigo) get white text
automatically via WCAG luminance calculation.
- ErrorState: RotateCcw icon on Try Again, add focus-ring + btn-scale
- Memory: RefreshCw, Copy/Check, Download icons on toolbar buttons
- Crons: RefreshCw refresh, BarChart3/Calendar/GitBranch tab icons,
Copy/Check on error copy buttons
- Home: Map/LayoutGrid/List view switcher icons, X close icon,
MessageSquare + btn-scale on Message, User + btn-scale on Profile
- Kanban: Plus icon on New Ticket, add btn-scale
- Settings: RotateCcw on Reset to Default + Re-run Setup, Trash2 on
Reset All Settings, btn-scale on CTAs
- Onboarding: ArrowLeft/ArrowRight/Rocket/RotateCcw on nav buttons
- New hexToContrastText() in lib/settings.ts (WCAG 2.0 luminance)
- --accent-contrast CSS var set in all 5 theme blocks + settings provider
- All hardcoded #000 on accent backgrounds replaced with var(--accent-contrast)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
Voice messages were broken because buildApiContent() wrapped audio-only
messages in a ContentPart[] array instead of returning a plain string.
Since audio attachments are skipped (transcript is already in msg.content
via Whisper), the gateway received [{type:'text', text:'...'}] instead
of a simple string, which it couldn't handle properly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add Map/Grid/Feed view switcher to the Manor Map page with a floating
segmented control. GridView shows agents grouped by team in card columns
with colored accents and hierarchy. FeedView shows a reverse-chronological
cron activity timeline with stat cards and filter pills.
Add emoji-only avatar toggle and logo background toggle to Settings >
Branding. Add DynamicFavicon component that syncs the manor logo to the
browser tab icon. Fix light theme text readability by bumping tertiary
and quaternary text opacity. Fix SSR hydration mismatch by deferring
localStorage reads to useEffect. Fix detail panel positioning with
explicit inline styles.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace localStorage-based chat storage with per-ticket JSONL files at
~/.openclaw/kanban/chats/{ticketId}.jsonl, eliminating the 5MB cap and
surviving browser data clears.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a full settings page (/settings) with four sections:
- Accent Color: 12 preset swatches + custom color picker, overrides CSS vars
- Branding: custom name, subtitle, emoji, and icon image for the sidebar
- Agent Customization: per-agent emoji and profile image overrides
- Reset All: destructive reset to defaults
New files: SettingsProvider context, AgentAvatar component, settings
types/helpers with tests. Replaces hardcoded gold accent rgba values
in globals.css and button.tsx with CSS var references. All settings
persist in localStorage (manor-settings key).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full kanban board (backlog/todo/in-progress/review/done) with drag-and-drop,
agent chat, and automated agent work. Assigning an agent and moving a ticket
to "To Do" triggers the agent to auto-pick it up, stream role-based work
(Lead Dev/UX-UI/QA), save the result to the ticket, and move to "Review".
Work result displays prominently in the detail panel's top section.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chat.send returns immediately with {runId, status: "started"}.
The previous approach expected the CLI to block until the agent responded.
Now: send via chat.send, then poll chat.history every 2s until the
assistant's response appears (matched by timestamp > sendTs).
Verified end-to-end: send → 5s wait → poll → response received.
153 tests passing, 0 type errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Resize images to 1200px max before base64 encoding (fits 1MB ARG_MAX)
- Revert sendViaOpenClaw from broken WebSocket to execFile CLI approach
(WebSocket requires device keypair auth for operator.write scope)
- Only check latest user message for images, not full history
(prevents text messages from routing through image path after an image was sent)
- Add clear chat button, TDD tests for sendViaOpenClaw (6 new tests)
- Minor Tailwind class consolidation in layout components
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Base64 image data exceeds OS argument size limits when passed to the
openclaw CLI. Now connects directly to the gateway WebSocket to send
chat.send with image attachments — no temp files, no arg limits.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Images sent in chat now go through the gateway's WebSocket agent pipeline
(chat.send + chat.history) instead of the /v1/chat/completions endpoint
which strips multimodal content. This is the same path Discord/Telegram
use, requires only the gateway token -- no separate Anthropic API key.
Also adds transcription module (lib/transcribe.ts) with clear fallback
messaging when Whisper fails, and integration tests for the full image
pipeline.
146 tests passing, 0 type errors.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract buildApiContent to lib/multimodal.ts for testability. Add 43 new
tests covering: multimodal message building (images, files, audio, mixed
media, text file inlining), validation of content parts and legacy wrapper,
and audio-recorder utilities (formatDuration, estimateStorageSize).
111 tests total, all passing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Images attached by users are now sent to the agent as OpenAI vision
content parts so the model can actually see them. Text files are inlined,
binary files described. Validation updated to accept multimodal content arrays.
Added /api/tts endpoint (OpenAI TTS via gateway) and a speaker button on
assistant messages for on-demand text-to-speech playback.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Voice recording with waveform playback (tap-to-record, cancel/send buttons),
file attachment bubbles with type icons and download, image paste/drag-and-drop,
pre-send attachment preview strip, and base64 persistence for all media types.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>