Imported from bare git on Zurich
Go to file
nyk 3c96623e0f
feat(refactor): ready for manual QA after main sync (#274)
* fix: preserve gateway token query in websocket URLs

* fix: classify secure-context device identity handshake errors

* fix: normalize trailing dot in host allowlist checks

* fix: support proxied gateway websocket paths and tailnet host normalization

* fix: auto-connect startup to primary configured gateway

* fix: keep gateway tokens server-side only

* fix: allow authenticated viewers to resolve gateway connect credentials

* fix: identify mission control as operator gateway client

* fix: redirect remote http sessions to https for gateway auth

* fix: support URL-style gateway hosts in health probes

* fix: resolve primary gateway credentials from detected openclaw runtime

* fix: hide duplicate gateway connection summary when managed

* refactor: remove super admin and workspaces panels from UI navigation

* fix: treat configured gateways as full-mode capability

* refactor: move promo banner copy into subtle footer note

* fix: stabilize gateway websocket connect protocol detection

* test: cover https forwarded proto for gateway websocket url

* fix: load canonical agent files and memory in detail panel

* fix: resolve agent files from openclaw workspace conventions

* fix: persist websocket client across route remounts

* feat: allow deleting agents with optional workspace removal

* feat: refresh mission control branding and favicon assets

* feat: complete github parity sync implementation

* chore: remove e2e temp artifacts from repo

* feat: add embedded /chat panel with shared chat workspace

* feat: unify sessions navigation into chat panel

* feat: show local Claude/Codex sessions in chat list

* feat: enable local session continuation and chat tagging

* fix: correct local codex session recency detection

* fix: refresh local session age and anchor chat composer

* refactor: make chat provider-session-first by mode

* fix: add local provider and MC health rows in overview

* feat: finalize tenant-scoped workspaces and full e2e coverage

* feat: improve session workbench controls and smoke coverage

* refactor: extract SaaS code to separate pro repo

- Add registerAuthResolver() hook to auth.ts
- Add registerMigrations() hook to migrations.ts
- Remove saas config block, SaaS modules, Pro API routes
- Keep adapters, super-admin routes, migration 032

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add framework adapters and self-update mechanism

- Framework adapter layer for multi-agent registration (autogen, crewai, langgraph, claude-sdk, openclaw, generic)
- Self-update API endpoint (admin-only git pull + install + build)
- Update banner UI component showing available versions with dismiss

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: update README stats, remove stale Super Admin refs, improve self-update

- Panel count 28→32, API routes 66→95, migrations 21→30
- Remove Super Admin from UI-facing docs (APIs remain)
- Document framework adapters and self-update mechanism
- Mark workspace isolation, adapters, projects as completed in roadmap
- Self-update now uses tag-based checkout instead of branch pull
- Plugin hook comments: "Pro" → "extensions"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add skills hub with registry integration, bidirectional sync, and local agent discovery

- Bidirectional disk↔DB skill sync via scheduler (60s interval, SHA-256 change detection, disk-wins conflict resolution)
- ClawdHub + skills.sh registry proxy with search, install, and security scanning (9 rules: prompt injection, credential leaks, data exfiltration, obfuscated content)
- Local agent discovery from ~/.agents/, ~/.codex/agents/, ~/.claude/agents/ with bidirectional sync
- DB-backed skills API with filesystem fallback, admin-only install, rate limiting
- Skills panel: installed/registry tabs, security badges, friendly source labels, OpenClaw gateway support
- Agent panel: local sync button, source badges (local/gateway)
- Migrations 033 (skills table) and 034 (agents source/hash/workspace columns)
- Full test coverage: 24 unit tests, 34 E2E tests (286 total suite green)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add per-agent rate limiting and agent self-registration

- Per-agent rate limiter keyed on x-agent-name header (falls back to IP)
- Agent heartbeat: 30 req/min per agent, task polling: 20 req/min per agent
- Rate limit response headers (Retry-After, X-RateLimit-*) for agent backoff
- POST /api/agents/register: self-service registration with viewer-level auth
- Idempotent registration (re-registering updates last_seen, returns existing)
- Name validation, role whitelist, capabilities/framework in config
- Self-registration rate-limited to 5/min per IP
- 9 E2E tests for self-registration (295 total suite green)
- README: updated API route count (97), test counts, new endpoints

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: enhance agent cost panel, OAuth approval UI, and framework adapter gateway

- Agent Cost Panel: add task cost attribution drill-down, cost share
  percentages, bar chart comparison, 5th summary card for task-attributed
  costs, 30s auto-refresh, and tabbed expanded view (tasks/models)
- OAuth Approval UI: replace window.prompt() with inline role selector
  and note input, add avatar display, show animated pending count badge,
  add dedicated "awaiting approval" state on login page
- Framework Adapter Gateway: wire GenericAdapter.getAssignments() to
  query task queue, add POST /api/adapters route for framework-agnostic
  agent actions (register, heartbeat, report, assignments, disconnect)
- Clean up dead api-keys import and DB-backed key resolution from
  auth.ts (moved to Pro repo)
- Resolve README merge conflicts, update route count to 98

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: complete free-tier functionality — adapters, workspace CRUD, agent sync, and UI polish

- Implement all 5 framework adapter stubs (claude-sdk, crewai, langgraph, autogen, openclaw)
  with shared queryPendingAssignments() helper to eliminate SQL duplication
- Add recurring gateway_agent_sync scheduler task (was startup-only)
- Add workspace CRUD API: POST/PUT/DELETE /api/workspaces with tenant isolation
- Add local agent discovery for flat .md files (Claude Code agent format with YAML frontmatter)
- Add per-agent cost breakdown API (GET /api/tokens/by-agent)
- Add API key rotation endpoint (GET/POST /api/tokens/rotate)
- Add Google OAuth disconnect endpoint
- Polish login page with inline Google Sign-In button
- Enhance settings panel with Security tab (API key management, OAuth)
- Enhance agent cost panel with per-agent DB view
- Add Awesome OpenClaw as third skill registry source
- Add integration connectivity test fallback

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: include session-message component (required by chat-workspace)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: gateway dot color should reflect live connection state

When WebSocket is connected, show green dot regardless of stored
probe status. Prevents misleading red dot + green CONNECTED badge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: agent creation progress modal and openclaw CLI flag

- Remove invalid --name flag from openclaw agents add CLI invocation
- Add multi-step progress UI to CreateAgentModal showing DB insert,
  gateway write, and workspace provisioning steps with animated status
- Progress view replaces review content during creation with spinner,
  checkmark, and error states per step
- Auto-close on success after 1.5s, retry/close buttons on error
- Squad panel: add status-based card edge colors and glow styles

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: task dispatch — scheduler polls assigned tasks and runs agents via openclaw CLI

Adds a task_dispatch scheduler job that picks up tasks in 'assigned' status,
executes them via `openclaw agent --local --json`, and moves them to 'review'
with the agent's response as resolution + comment.

* feat: link dispatched tasks to agent sessions — view session from task detail

- task-dispatch: extract sessionId from openclaw JSON response, store in task metadata
- task detail modal: "View Session" button navigates to /chat with the agent's session transcript
- shows pulsing "Live" indicator when task is in_progress
- agent squad panel: show quality_review and done counts in task stats

* feat: automated Aegis quality review — scheduler polls review tasks and approves/rejects

- aegis_review scheduler job picks up tasks in 'review' status every 60s
- runs openclaw agent to evaluate task resolution quality
- approved → done, rejected → in_progress with feedback as comment
- quality-review API: rejected reviews now push task back to in_progress
- approved reviews work for any reviewer (not just aegis)

* feat: natural language recurring tasks + Claude Code task bridge

Add NL schedule parser (zero deps) for creating recurring tasks via
"every morning at 9am" style input. Template-clone pattern spawns dated
child tasks on cron schedule with Aegis quality gates per instance.

Read-only bridge surfaces Claude Code team tasks and configs from
~/.claude/tasks/ and ~/.claude/teams/ on the MC dashboard.

New files: schedule-parser.ts, recurring-tasks.ts, claude-tasks.ts,
API routes for /claude-tasks and /schedule-parse.
Modified: scheduler.ts (recurring_task_spawn), migrations.ts (036),
task-board-panel.tsx (schedule UI + badges + CC section),
cron-management-panel.tsx (CC teams section).

* docs: update README with recurring tasks and Claude Code task bridge

Add sections for natural language recurring tasks, Claude Code task
bridge, new API endpoints, architecture tree entries, and roadmap items.

* fix: agent card redesign, gateway badge tooltip, and ws:// for localhost gateways

- Compact agent cards: remove 4 colored stat boxes, show inline task stats,
  display model name from config, remove session info box, remove Busy button
- Gateway ConnectionBadge: rich hover tooltip with host, latency, WS/SSE status
- Fix gateway connect over Tailscale/HTTPS: use ws:// for localhost gateway
  hosts since they have no TLS (browsers allow mixed content for localhost)
- Extract agent-card-helpers.ts with formatModelName, buildTaskStatParts,
  extractWsHost for testability
- Add 16 tests for agent card helpers, update 12 gateway-url tests
- Sanitize test fixtures to remove personal Tailscale hostnames

* fix: gateway auto-connect via Tailscale Serve and informative mode badge

- Detect Tailscale Serve mode from OpenClaw config and build
  wss://<dashboard-host>/gw URL for remote browser connections
- Replace static mode badge with ModeBadge showing live WS status,
  latency, and rich hover tooltip (host, WS/SSE, retries)
- Fall back to host rewrite for non-Tailscale remote access

* feat: discover OS-level gateways and show in Gateway Manager

- Add GET /api/gateways/discover — scans /home/*/.openclaw/openclaw.json
  for gateway configs and checks if they're listening (via ss)
- Show discovered gateways in Gateway Manager with user, port, bind mode,
  active status, and Tailscale mode badge
- One-click Register button to add discovered gateways to the DB
- Refine Tailscale Serve detection in connect route with config caching

* fix: GitHub sync panel loading hang and gateway discovery via systemd

- GitHub panel: use Promise.allSettled + AbortSignal.timeout(8000) to
  prevent indefinite loading spinner when any API call hangs
- Show helpful "not configured" notice when GITHUB_TOKEN is missing
- Always render Sync History and Linked Tasks sections with empty states
- Gateway discover: rewrite to use systemctl + ss for port detection
  instead of reading other users' config files (permission-denied)
- Gateway panel: filter discovered gateways that are already registered

* feat: complete audit trail action type coverage with grouped filters

Add labels, colors, and icons for 22 new action types (agents, workspaces,
system, config, auth). Replace flat filter dropdown with optgroup categories.
Extend formatDetail() for settings, backups, heartbeats, cleanup, and export.

* refactor: consolidate spawn into task board and editable sub-agent config

- Move spawn form into collapsible section in task board header
- Make sub-agent config editable in agent detail ConfigTab
- Remove /spawn as standalone page and nav item
- Use violet color for sub-agents to distinguish from agents (blue)

* refactor: remove agent comms panel from agents page

* refactor: redesign agent detail modal — minimal header, compact overview, model selector

- Compact modal header with inline status badge and underline tabs
- Delete actions moved to hover dropdown (trash icon)
- Overview tab: two-column layout with key fields + message panel
- Added model selector to agent overview (editable, saved via PUT /api/agents)
- Status controls as compact pill buttons instead of bulky cards
- Heartbeat shown as inline compact bar instead of full card
- Task stats as horizontal row instead of grid

* feat: add memory knowledge graph visualization for gateway mode

Add interactive ReactFlow-based node graph showing OpenClaw per-agent
memory topology. New /api/memory/graph endpoint reads SQLite memory
databases and returns chunk/file statistics per agent. Graph tab in
Memory Browser (gateway mode only) shows agent hub nodes sized by
chunk count with drill-down to file-level views.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update README for spawn consolidation, modal redesign, test count

* fix: harden agent-comms session threads and runtime tool visibility

* refactor: remove orphaned agent-spawn-panel after spawn/task unification

Spawn functionality now lives inline in task-board-panel and sub-agent
config is in agent-detail-tabs. This file had no imports anywhere.

* fix: exclude /brand/ assets from auth middleware matcher

The login page logo was broken because requests to /brand/mc-logo-128.png
were intercepted by the auth gate and redirected to /login.

* fix: redesign cron calendar — aggregate by job, add detail table

Calendar was broken: each cron occurrence was rendered individually,
causing 135+ jobs * N daily runs = thousands of entries per day cell
(all showing 00:00). Now:

- Week/month cells show unique jobs per day with run counts
- Agent color coding for visual distinction
- Human-readable frequency labels (every 5m, hourly at :00, etc.)
- Selected day panel shows job summaries not raw occurrences
- Agenda view capped at 500 entries (was unlimited)
- Job list replaced with compact sortable table
- Job detail panel redesigned: config, command, timing, logs in 2-col

* fix: clean agent payload in task comments, deduplicate sidebar Agents

Comments:
- Display-side: parse OpenClaw JSON payloads, extract text, strip ANSI
  codes, show model/tokens/duration as compact badge
- API-side: normalize agent result JSON on ingestion — store clean text
  with optional metadata footer instead of raw payload dump

Sidebar:
- Move Agent Costs and Memory as children under core Agents item
- Remove duplicate "Agents" group from Observe section

* fix: make Agents nav item clickable + split parent/chevron, move Memory standalone

- Clicking "Agents" label navigates to agents page and auto-expands children
- Chevron is a separate toggle button for expand/collapse
- Active indicator shown when on agents page
- Memory moved to standalone item below Skills in core nav
- Agent Costs remains as child under Agents

* refactor: move Office panel to Observe nav category

* feat: Obsidian-style memory graph + browser panel redesign

- Replace React Flow with d3-force canvas renderer for memory graph
- Force-directed physics: node repulsion, link attraction, organic settling
- Canvas rendering for 500+ node performance at 60fps
- Drag/pin nodes, hover highlighting, zoom/pan, search glow
- Redesign memory browser panel with Obsidian-inspired layout:
  - Slim 240px collapsible sidebar file tree
  - Top bar with Files/Graph view switcher
  - Dense mono-font file items with text-char icons
  - Graph view as default landing
  - Improved markdown renderer with code block support
- Add d3-force dependency

* fix: memory panel sidebar scroll overflow + graph canvas blank on mount

- Add min-h-0 to sidebar flex container so file tree scrolls within bounds
- Guard ResizeObserver callback against 0×0 dimensions to prevent invisible canvas
- Add requestAnimationFrame re-measure to catch post-paint layout
- Set minHeight floor on canvas container to prevent flex collapse
- Propagate flex height through page → panel → graph component chain

* fix: memory panel viewport height — use calc(100vh) instead of h-full

h-full doesn't resolve in a scrollable parent. Use explicit viewport
calc matching the pattern from chat-page-panel.

* fix: memory panel overflow — add overflow-hidden to prevent page scroll

* fix: agent detail crash when model is object instead of string

React error #31 — agent.model can be { primary: "..." } object,
not a string. Handle both shapes in the display fallback.

* fix: agent squad panel crash on unknown agent status

statusCardStyles only covered offline/idle/busy/error but agents can
have other statuses (active, online). Fall back to default style.

* fix: handle double-nested model.primary in agent config

The testdev agent had config.model.primary stored as an object
{ primary: "anthropic/..." } instead of a plain string. Defend
against this at all render and initialization sites.

* test: add E2E tests for onboarding, security-scan, diagnostics, and injection guard endpoints

- onboarding-api.spec.ts: 11 tests covering GET/POST auth, step completion, skip, reset, full lifecycle
- security-scan-api.spec.ts: 5 tests covering auth, response shape, score range, categories
- diagnostics-api.spec.ts: 7 tests covering auth, all response sections and field types
- injection-guard-endpoints.spec.ts: 7 tests verifying 422 blocking on workflows, spawn, agent message, chat forward
- auth-guards.spec.ts: added 3 new endpoints to protected GET list

* feat: phases 1-8 — Docker hardening, diagnostics, installer, skills, security, onboarding, injection guard

- Docker: hardened compose override, non-root user, read-only fs, health checks
- Diagnostics API: system info, security checks, database stats, gateway probe
- Installer: interactive install.sh, generate-env.sh, station-doctor.sh
- Skills: mission-control-installer and mission-control-manage OpenClaw skills
- Security: proxy hardening (HSTS, CSP, host allowlist), cookie improvements,
  security-scan API with 5 categories, security-audit.sh script
- Onboarding: wizard UI components, onboarding API with step tracking
- Injection guard: prompt/command injection scanning on workflows, spawn,
  agent messages, and chat forwarding endpoints (42 unit tests)
- Status API: enhanced with agent/session/gateway diagnostics
- Settings: onboarding integration in settings panel
- Docs: security hardening guide, landing page handoff, hardening guide

* fix: remove duplicate GW badges and optimize header for smaller screens

- Remove ConnectionBadge and MobileConnectionDot (ModeBadge covers all sizes)
- Lower stats breakpoint from 2xl to xl (visible at ≥1280px)
- Move DigitalClock into stats group
- Remove redundant Chat button (accessible from sidebar)

* feat: agent-optimized onboarding wizard with live capability detection

Rewrite wizard step content for human + agent dual audience:
- Welcome: live status chips (sessions, gateway, agents), mode-adaptive capability cards
- Credentials: explain impact on both dashboard access and agent self-registration
- Agent Setup: comprehensive feature explainer with descriptions per mode
- Security: agent-security framing with category tags before auto-scan
- Get Started: highlighted primary CTA, detailed feature descriptions, self-register tip

Add SystemCapabilities fetch on mount (parallel /api/status + /api/agents).
Show step titles below progress dots. Rename API step titles.

* feat: Google Workspace integration + TUI-style agent comms feed

Add Google Workspace CLI as a productivity integration with gws binary
detection. Rewrite agent-comms-panel to a TUI-style feed with
FeedCategory taxonomy (chat/tools/trace/system/safety) matching the
OpenClaw CLI. Extract inline loading spinners into shared Loader
component. Add autoScan and copy-fix to security scan card. Bump to
v2.0.0.

* fix: cross-codebase audit — SSRF hardening, race conditions, spawn security, memory leaks

- Expand SSRF blocklist with IPv4 CIDR matching for private ranges (10/8, 172.16/12, 192.168/16, 169.254/16, 127/8) while allowlisting user-configured gateway hosts
- Add 1MB file size limit on agent workspace file reads to prevent OOM
- Reorder agent config write-back: DB first (transactional), then gateway file
- Wrap gateway health DB updates in a single transaction
- Add 60s TTL to Tailscale Serve detection cache
- Expand injection guard to scan spawn label field
- Narrow spawn compatibility fallback to only retry on tools/profile schema errors
- Add audit logging for spawn operations
- Cap WebSocket ping timestamp map at 10 entries to prevent memory leak
- Apply rate limiting to GET /api/spawn history endpoint

* fix: cap unbounded store arrays, add fetch cleanup, add missing rate limits

- Cap spawnRequests (500), notifications (500), tokenUsage (2000) in Zustand store to prevent memory leaks in long-running browser sessions
- Add cancellation flag to sidebar fetch to prevent state updates after unmount
- Add error handling to notifications panel markRead/markAllRead operations
- Add missing mutationLimiter to PUT/DELETE /api/workflows endpoints

* fix: multi-tenancy isolation — scope search, export, SSE, webhooks, agent files

- Scope search endpoint: messages and webhooks filtered by workspace_id, audit search restricted to admin role, pipelines filtered by workspace_id
- Scope export endpoint: pipeline_runs export filtered by workspace_id, audit export annotated as intentionally instance-global (admin-only)
- Filter SSE events by workspace_id to prevent cross-workspace data leakage
- Add SSRF blocklist to webhook URL validation (private IPs, localhost, cloud metadata)
- Add 1MB file size limit to agent workspace file writes

* fix: auth timing attack, session revocation, validation bounds, cleanup scoping

- Prevent timing-based username enumeration by always running verifyPassword
  against a dummy hash when user not found or ineligible
- Revoke all sessions on password change and issue fresh session cookie
- Add loginLimiter rate limiting to Google OAuth POST endpoint
- Tighten Zod schemas: bound timestamps, cap arrays at 50, limit string
  items, constrain numeric fields (hours, timeout, template_id)
- Scope cleanup retention deletes by workspace_id (activities, notifications,
  pipeline_runs); audit_log remains instance-global by design
- Clamp config retention values to [0, 3650] days and gateway port to
  [1, 65535] with NaN fallback to defaults

* feat: plugin capabilities system + Hyperbrowser integration

- Add plugin registry (src/lib/plugins.ts) with registries for
  integrations, categories, nav items, panels, and tool providers
- Add Hyperbrowser as built-in integration with API key test handler
- Wire plugin hooks into integrations route, content router, nav rail,
  and agent template tool groups
- Add plugin loader stub and example plugin file

* feat: Ars Contexta-inspired memory knowledge system

Add wiki-link connections, schema enforcement, processing pipeline,
MOC generation, health diagnostics, and context injection to the
memory subsystem. Includes 4 new API routes (/api/memory/links,
/health, /context, /process), a shared utility library, enhanced
memory browser panel with graph/health/pipeline views, 15 unit
tests, and 14 E2E tests.

* feat: composable dashboard widgets, new panels, boot sequence loader

Refactor monolithic dashboard into composable widget grid with 10
extracted widgets (metric cards, task flow, event stream, gateway
health, etc.). Add channels, debug, exec-approval, and nodes panels
with corresponding API routes. Improve boot loader with stepped
init sequence. Enhance token dashboard, websocket reconnect, and
message bubble rendering.

* feat: security audit panel, agent eval framework, optimization endpoint

- Add security event logging (auth failures, rate limits, injection attempts, secret exposures)
- Add secret scanner with regex patterns for AWS keys, GitHub tokens, Stripe keys, JWTs, private keys, DB URIs
- Add MCP call auditing with tool-use frequency and success/failure tracking
- Add agent trust scoring with weighted recalculation
- Add four-layer agent eval stack (output, trace, component, drift detection)
- Add agent optimization engine (token efficiency, tool patterns, fleet benchmarks)
- Add hook profiles (minimal/standard/strict) for security strictness control
- Add security audit panel with posture gauge, timeline, trust scores, MCP audit charts
- Add API endpoints: /api/security-audit, /api/agents/optimize, /api/agents/evals
- Wire security events into auth, rate-limit, injection-guard, agent messages
- Add 3 DB migrations (security_events, agent_trust_scores, mcp_call_log, eval tables, session costs)
- Add unit tests (60 tests) and e2e tests for all new endpoints

* docs: update README and security hardening guide for security audit, evals, optimization

- Update panel count (32), API route count (101), migration count (39), test count (282)
- Add security audit panel, agent eval framework, optimization endpoint to features list
- Add architecture tree entries for new libraries
- Add Security & Evals API reference section
- Add feature descriptions for security audit, eval framework, agent optimization
- Update SECURITY-HARDENING.md with security event system, hook profiles, eval framework docs
- Renumber hardening sections to accommodate new content

* docs: add onboarding wizard to README features and API reference

* feat: OpenClaw auto-update detection with version banner

Add /api/openclaw/version endpoint that checks installed OpenClaw version
against latest GitHub release, with 1-hour ISR cache. Cyan-themed banner
displays when an update is available, with copy-to-clipboard for the
update command and per-version dismiss persistence via localStorage.

* fix: add dark class to SSR html element to prevent white login flash

The html element was rendered without any class in SSR, causing the
:root (white) CSS variables to apply until client-side scripts added
the dark class. Setting className="dark" as the server default ensures
dark theme renders immediately. The FOUC script and next-themes will
adjust for light theme users on hydration.

* fix: login button stays disabled with browser autofill

Browser autofill populates input values without firing React onChange,
so the controlled state stays empty and the disabled check fails.
Remove the username/password emptiness check from disabled — HTML
required attributes already prevent empty submission.

* fix: login fails with browser autofill due to empty React state

When browser autofills credentials, React onChange never fires so state
stays empty. Read actual DOM input values on form submit as fallback.

* fix: login redirect fails due to router.push race with cookie

Replace router.push('/') + router.refresh() with window.location.href
to force a full page reload after login. The soft navigation could
race with the RSC payload cache, causing /api/auth/me to fire before
the session cookie was available.

* fix: CSP nonce blocks inline scripts, breaking theme and login

The CSP had both 'unsafe-inline' and a nonce in script-src. Per the
CSP spec, browsers ignore 'unsafe-inline' when a nonce is present.
Since no scripts actually use the nonce attribute, all inline scripts
(FOUC prevention, next-themes) were blocked — causing white flash
and broken client-side behavior. Remove the unused nonce so
'unsafe-inline' is respected.

* feat: OpenClaw update-now button triggers server-side update

Add POST /api/openclaw/update endpoint that runs `openclaw update
--channel stable` with 5-minute timeout, audit logs the version
change, and returns the new version. Banner now shows Update Now
button with updating/success/error states alongside the existing
Copy Command and View Release actions.

* feat: security scan auto-fix, gateway session chat, boot loader improvements

- Add POST /api/security-scan/fix endpoint with per-issue and fix-all support
  - Accepts optional { ids: ["check_id"] } to fix specific issues
  - Handles env permissions, host allowlist, HSTS, cookies, API key,
    OpenClaw config (auth, bind, elevated, DM, exec), world-writable files
  - Audit logs all fixes
- Add "Fix All Issues" button and per-check "Fix" buttons to security scan card
  - Auto-re-scans after fixes complete
- Add GET /api/sessions/transcript/gateway for fetching gateway session messages
  - Proxies to OpenClaw gateway HTTP API with format normalization
- Enable chat input for gateway sessions (forwards via chat messages API)
- Move boot loader state to Zustand store (bootComplete) so it only shows
  after login, not on every panel navigation
- Add sessionKey and agent fields to Conversation session metadata

* feat: add OpenClaw security hardening checks to security scan

New checks aligned with `openclaw security audit`:
- Control UI device auth (dangerouslyDisableDeviceAuth)
- Control UI insecure auth (allowInsecureAuth)
- Filesystem workspace isolation (tools.fs.workspaceOnly)
- Dangerous tool groups deny list
- Log redaction (logging.redactSensitive)
- Agent sandbox mode (agents.defaults.sandbox.mode)
- Safe bins interpreter profiling

Auto-fix support for control_ui_device_auth, control_ui_insecure_auth,
fs_workspace_only, and log_redaction.

* fix: read gateway session transcripts from JSONL files on disk

The gateway doesn't expose an HTTP API for session messages.
OpenClaw stores transcripts as JSONL files at:
  {STATE_DIR}/agents/{agent}/sessions/{sessionId}.jsonl

Rewrote the endpoint to:
1. Extract agent name from session key
2. Look up sessionId from agent's sessions.json
3. Read and parse the JSONL transcript file directly
4. Extract type:"message" entries with Claude API content format

* feat: merge agent costs and token dashboard into unified Cost Tracker panel

- New CostTrackerPanel with 4 tabs: Overview, Agents, Sessions, Tasks
- Combines data from both /api/tokens and /api/tokens/by-agent endpoints
- Flat sidebar entry under OBSERVE (replaces Tokens), no dropdown
- Old routes (tokens, agent-costs) still resolve to new panel
- Removed agent-costs child from Agents nav item

* fix: use correct openclaw CLI command for agent deletion

`openclaw agents remove` doesn't exist — the correct command is
`openclaw agents delete <id> --force`.

* fix: click-based delete dropdown and progress loaders for agent CRUD

Replace CSS group-hover dropdown with click toggle + click-outside
listener so the delete menu stays open. Add spinner loaders for
save and delete operations.

* fix: channels auth, chat send, task UX, skills defaults, memory graph

- Channels: add Bearer token auth headers to gateway API calls
- Chat: add missing `from` field in gateway session message send
- Tasks: remove setLoading(true) on refresh to prevent full-page skeleton
- Skills: pre-select openclaw source when in gateway mode
- Memory graph: add delayed resize retries for flex layout settling
- Memory graph API: drop SUM(LENGTH(text)) for faster query (17 DBs)

* fix: memory graph auto-fit to view and faster API query

- Add fitToView() that computes bounding box and auto-zooms to fit
  all nodes after 60 simulation ticks
- Drop SUM(LENGTH(text)) from graph API for faster queries across
  17 SQLite databases (523 MB total)
- Add delayed resize retries for flex layout settling

* fix: resolve security audit crash and sidebar scroll jump

- Transform authEvents object to array before rendering to prevent
  .map() crash on security audit panel
- Remove pathname from boot effect deps to prevent sidebar scroll
  reset on panel navigation

* fix: always merge session-derived token data instead of fallback-only

The token data pipeline treated gateway session data as a last-resort
fallback, only used when both DB and JSON file were empty. Stale e2e
test records in the JSON file prevented real session data from ever
appearing. Now all three sources (DB, file, sessions) are always merged
and deduplicated.

* refactor: merge Activity Feed and Agent History into unified Activity panel

Consolidates two panels that shared the same /api/activities data source.
The merged panel shows a flat feed when "All" is selected and switches
to a day-grouped timeline with agent sidebar when a specific agent is
picked. Removes the History nav entry and AgentHistoryPanel import.

* fix: agent comms feed stream, clickable session/agent chips, target selector

- Add agent_% pattern to comms SQL predicate so chat messages appear in feed
- Make SessionChip and agent bar chips clickable to select message target
- Replace hardcoded "Admin -> Coordinator" label with dismissible target chip
- Route messages to selected target with correct conversation_id and sessionKey

* fix: gateway dispatch, inline session feed, and header z-index

- Switch task dispatch and Aegis reviews from `openclaw agent` CLI to
  gateway two-step pattern (call agent → agent.wait) matching the
  proven chat route invocation path
- Include previous Aegis rejection feedback in re-dispatch prompts
- Add tags to task dispatch prompts
- Replace navigate-away "View Session" button with inline Session tab
  in task detail modal, with auto-refresh, live indicator, and
  SessionMessage rendering
- Fix header z-index so theme dropdown renders above page content

* fix: normalize all security audit API fields to match frontend types

Transform agentTrust, secretAlerts, toolAudit, rateLimits,
injectionAttempts, and timeline from nested API objects into the flat
arrays the UI components expect, preventing .map() crashes.

* feat: animated OpenClaw + Claude converging logos on loading screen

Replace static PNG logo with inline SVG OpenClaw and Claude marks that
animate inward from opposite sides, converging at center with a glow
burst. Includes prefers-reduced-motion support.

* feat: onboarding wizard shows both modes with mode-themed colors

- Add modeColors() helper returning amber (local) or cyan (gateway) classes
- StepWelcome: two side-by-side mode cards with active/inactive styling
- StepGateway: both feature columns always visible, inactive dimmed + locked
- All steps: progress bar, dots, and buttons themed to detected mode
- Thread isGateway prop to StepCredentials and StepSecurity
- Remove unused CapabilityCard and FeatureItem components

* fix: channels panel gateway status, response transform, and boot improvements

- Transform gateway's rich channel data model into flat ChannelAccount[] the frontend expects
- Fall back to /api/health check when /api/channels/status fails, avoiding false "disconnected"
- Use Zustand WebSocket connection state as fallback for gateway status in channels panel
- Show context-aware empty state messages (connected vs disconnected)
- Preload workspace data (agents, sessions, projects) during boot sequence
- Add anti-self-XSS console warning on boot
- Forward explicit sessionKey in chat message dispatch

* fix: move useMissionControl hook before early returns in channels panel

Hook was called after conditional returns (loading/error), violating
Rules of Hooks and causing React error #310.

* fix: loading screen uses real OpenClaw logo, converge→MC mark animation

- Replace placeholder talon SVG with actual OpenClaw favicon (green gradient claw)
- Add MissionControlMark SVG (network graph matching app icon)
- Animation: OpenClaw + Claude converge → pair fades out → MC mark emerges
- Progress steps fade in after logo animation, completed steps collapse away
- Add reduced-motion fallback for new animations

* fix: use real OpenClaw lobster logo and MC brand mark on loading screen

- Replace SVG approximations with actual brand assets (img tags)
- OpenClaw: lobster character from x.com/openclaw profile
- Mission Control: network graph mark from /brand/mc-logo-128.png
- Animation: OpenClaw + Claude converge → fade out → MC mark emerges

* feat: aggregate all gateway session transcripts into agent-feed

Add /api/sessions/transcript/aggregate endpoint that fans out to all
active session JSONL files on disk and returns a merged chronological
event stream. Agent-comms panel now merges transcript events as a third
data source alongside WS logs and DB comms, with deduplication and
category classification (tools, trace, chat, system).

Extract shared JSONL parsing logic into src/lib/transcript-parser.ts
to avoid duplication between gateway and aggregate routes.

* fix: replace collapsing step list with single active label on loading screen

Eliminates layout shifts by replacing the collapsing step list with a
fixed-height single active step label that crossfades between steps.
Progress section now appears at 2.4s delay to let the brand mark land.

* feat: agent-feed send error details, memory activity events, chat height cap

- Parse injection (422) and auth (403) errors from chat send endpoint
  with specific user-facing messages instead of generic "Failed to send"
- Log memory file save/create/delete operations to activities table
- Support comma-separated type filter on activities endpoint (IN query)
- Poll memory activity events at 30s cadence and merge into agent-feed
- Cap feed stream container at max-h-[500px] with existing scroll

* feat: replace memory graph Canvas 2D + d3-force with reagraph WebGL

- Rewrite memory-graph.tsx to use reagraph GraphCanvas with Obsidian-style
  dark theme (glow effects, connected-node highlighting, force-directed layout)
- Fix parent layout overflow-auto → overflow-hidden to prevent height collapse
- Add next/dynamic SSR-safe import for WebGL/Three.js compatibility
- Remove d3-force dependency, add reagraph

* fix: use infrastructure scan for security audit posture score

The security audit page scored ~95 based only on event history (no
incidents = high score). Now it runs the full infrastructure scan
(credentials, network, OpenClaw, runtime, OS) and blends it 70/30
with event history, matching what the onboarding security scan shows.

- Extract scan logic to shared src/lib/security-scan.ts
- Simplify /api/security-scan route to use shared lib
- Add scan data + expandable categories to security audit panel
- Blended score: 70% infrastructure config, 30% event history

* fix: add worker-src CSP directive and persist panel data across tab switches

Add worker-src 'self' blob: to CSP so reagraph WebGL force layout workers
are not blocked. Move agents, skills, and memory graph data from component
local state into zustand store so data survives tab switches without refetch.

* fix: add worker-src to proxy middleware CSP (mirrors next.config.js)

The middleware in proxy.ts was overwriting the next.config.js CSP header
without the worker-src directive, blocking reagraph blob: workers.

* fix: add blob: to script-src CSP for worker importScripts

worker-src allows worker creation but importScripts() inside workers
falls back to script-src, which also needs blob: for reagraph's
workerize-transferable chain.

* fix: allow cdn.jsdelivr.net in connect-src for reagraph font loading

troika-three-text (used by reagraph for WebGL text) fetches unicode font
resolver data from cdn.jsdelivr.net at runtime.

* feat: obsidian-style memory graph with hover tooltips and breadcrumb nav

- Full-bleed graph canvas with Catppuccin Mocha color palette
- Floating glass-morphism overlays: breadcrumb nav, stats, legend
- Hover tooltip shows file path, chunk count, and text size
- Click hub to drill in, click breadcrumb or hub again to go back
- Color legend for file categories (sessions, memory, knowledge, etc.)

* fix: auto-fit memory graph into view after layout settles

Calls fitNodesInView at 800ms and 2000ms after nodes change to ensure
the graph is visible without needing a manual zoom.

* feat: prefetch memory graph and skills data on app boot

Add memory graph and skills API fetches to the existing Promise.all
block so data is warm before the user navigates to those panels.

* feat: rewrite onboarding copy with mothership/docking narrative

Reframe all 6 onboarding steps to use consistent station/docking
metaphor: Mission Control is the mothership, agents dock here to
gain capabilities. Replaces generic SaaS copy with agent-centric
language (docking credentials, solo/fleet station, skills hangar).

Copy-only changes — no structural, layout, or API changes.

* feat: add essential/full interface mode toggle

- Add interfaceMode to store (essential | full)
- Filter nav-rail items by essential flag in essential mode
- Persist preference via general.interface_mode setting
- Add toggle button to sidebar footer and settings panel
- Redirect to overview if current panel hidden when switching
- Add changelog toggle to openclaw update banner

* fix: scope comms panel auto-scroll to its own container

scrollIntoView was bubbling up to the page-level <main>, causing the
overview page to scroll to the bottom on load. Use scrollTo on the
feed container ref instead.

* refactor: replace ad-hoc spinners with shared Loader component

Standardize loading states across 12 panel files to use the shared
Loader component (panel variant for full-panel states, inline variant
for section-level states) instead of individual animate-spin spinners.

* refactor: move interface mode toggle into user dropdown menu

Remove standalone toggle button from sidebar footer and integrate it
as a segmented control inside the ContextSwitcher dropdown. Add
Settings and Activity quick-nav links to the dropdown.

* feat: add gateway state backup via `openclaw backup create`

Add ?target=gateway variant to POST /api/backup that runs
`openclaw backup create` (60s timeout) and logs an openclaw.backup
audit event. The existing MC SQLite backup remains the default.

Surface both backup actions in Settings panel under a new Backups
row so admins can trigger either backup type with one click.

* refactor: use shared Loader in log viewer panel

Replace ad-hoc spinner with the shared Loader component,
consistent with the rest of the codebase.

* fix: write gateway backup to MC backup dir to avoid path conflict

openclaw backup create writes archives to CWD by default, which is
the state dir — causing a "must not be written inside a source path"
error. Use --output to write to the MC backup directory instead.

* fix: handle openclaw backup non-zero exit with successful output

openclaw backup create may exit non-zero in some environments even
when the archive is successfully created. Check for "Created" in
the combined output before treating it as a failure.

* feat: add global exec approval overlay modal + refactor panel

- Add fixed overlay modal (ExecApprovalOverlay) that shows pending
  exec approvals regardless of active panel, matching OpenClaw
  reference UI pattern
- Decisions sent via WebSocket RPC (exec.approval.resolve) with
  HTTP fallback
- Handle both exec.approval and exec.approval.requested/resolved
  event variants for gateway compatibility
- Refactor ExecApprovalPanel to read from Zustand store (populated
  by WebSocket) instead of its own HTTP polling loop
- Add cwd, host, resolvedPath fields to ExecApprovalRequest type

* feat: streamline onboarding wizard to 3 steps + add persistent checklist

- Reduce wizard from 6 steps to 3 (welcome, interface mode, credentials)
- Remove agent setup, security scan, and next steps from blocking modal
- Add "Station Online" completion animation with endowed progress bar
- Add persistent onboarding checklist widget to dashboard (6 items, 3 pre-checked)
- Checklist auto-detects completion from store data and auto-dismisses
- Add "Replay Onboarding" button in settings panel
- Improve empty states in agent, cost tracker, and task board panels

* feat: enhance security scanner with severity scoring, new checks, and agent endpoint

- Add CheckSeverity and FixSafety types with severity-weighted scoring
- Add ~20 new platform-specific checks (Linux, macOS, Windows hardening)
- Add cachedExec and tryExecBatch helpers for batching OS checks
- Consolidate auth_pass_set/auth_pass_strong into single auth_pass ID
- Add POST /api/security-scan/agent endpoint with scan/fix/scan-and-fix
  actions, fix scope control, dry-run mode, and structured response
- Add fixSafety field to fix route responses
- Add 10 new secret patterns (Slack/Discord webhooks, OpenAI, Anthropic,
  Twilio, SendGrid, Mailgun, GCP, Azure, SSH key content)
- Add 3 new injection guard rules (SSRF, template injection, SQL injection)
- Show severity badges and fix safety warnings in onboarding and audit UI
- Sort failing checks by severity in audit panel
- Add tests for new fields, patterns, injection rules, and agent endpoint

* feat: close OpenClaw UI gap analysis — schema config, channels, chat, devices, sessions, cron, usage, agents, exec approval, websocket, logs

Phase 1 (Critical):
- Config editor: schema-driven form with typed fields, section sidebar, search, hot-apply, hash concurrency
- Channels: per-platform cards (WhatsApp QR, Telegram bot, Discord guilds, Slack workspace, Nostr profile editor)
- Chat: file attachments (picker/drag-drop/paste), abort generation, focus mode, scroll indicator, RTL detection, compaction/fallback toasts
- Devices: approve/reject pending pairing, token rotation/revocation with confirmation
- WebSocket: event sequence tracking with gap detection, caps negotiation, 1.7x backoff (15s cap), protocol error codes

Phase 2 (Important):
- Usage dashboard: filter chips, client-side CSV export, cache tokens, timezone selector, cost-by-provider chart
- Sessions: thinking/verbose/reasoning level controls, editable labels, deletion, time window filtering
- Agents: 5 new tabs (files browser+editor, tools allow/deny, channels, cron, model fallback chain)
- Cron: clone job, force/due run modes, run history browser, schedule/enabled filters, field validation, stagger
- Exec approval: per-agent command allowlist editor with glob pattern matching preview

Phase 3 (Nice-to-have):
- Log viewer: export .log/JSON, buffer truncation indicator, log file path display

* test: add unit + E2E tests for gap analysis features

Unit tests (vitest, 132 new tests):
- websocket-utils: error codes, backoff calculation, sequence gaps (23 tests)
- config-schema-utils: schema normalization, field type inference, tags (29 tests)
- chat-utils: RTL detection, attachment validation, file size formatting (18 tests)
- cron-utils: schedule description, expression validation, clone names (26 tests)
- token-utils: provider detection, CSV generation, timezone offsets (17 tests)
- exec-approval-utils: glob pattern matching, multi-pattern search (19 tests)

E2E tests (playwright, 53 new tests):
- gateway-config: GET/PUT config, schema, hash concurrency, auth (5 tests)
- channels-api: list, probe, action validation, auth (4 tests)
- device-management: nodes, approve/reject/rotate/revoke validation (11 tests)
- session-controls: thinking/verbose/reasoning/label/delete, auth (12 tests)
- cron-operations: list, clone, trigger modes, history, auth (13 tests)
- exec-approval-allowlist: CRUD, round-trip, hash concurrency, auth (8 tests)

Refactor: extracted pure logic into standalone utility modules for testability

* feat: integrate Hermes task/cron system and memory into MC observability

- Add read-only cron job scanner (hermes-tasks.ts) with 30s throttled cache
- Add read-only memory scanner (hermes-memory.ts) for MEMORY.md/USER.md
- Add /api/hermes/tasks and /api/hermes/memory API routes
- Enrich /api/hermes GET with cronJobCount and memoryEntries
- Add HermesCronSection to task board (collapsible, purple accent)
- Add Hermes memory tab to memory browser with capacity bars
- Add cron/memory stat badges to settings panel Hermes section
- Enrich dashboard Hermes card subtitle with cron count

* feat: add Hermes observability, branded loader, and conversation UX improvements

* feat: register MC as default dashboard and add gateway onboarding step

Auto-writes gateway.controlUi.dashboardUrl and allowedOrigins to
openclaw.json on capabilities check. Adds a dynamic "Gateway Link"
step to the onboarding wizard when a gateway is detected.

* fix: disable device auth when registering MC as dashboard

MC authenticates via gateway token — device pairing is unnecessary
and causes "pairing required" WebSocket errors. Auto-set
dangerouslyDisableDeviceAuth when writing dashboardUrl.

* fix: remove invalid dashboardUrl write that crashes gateway

The gateway validates its config strictly — unknown keys like
`dashboardUrl` cause startup failures. registerMcAsDashboard() now
only manages valid keys: allowedOrigins and dangerouslyDisableDeviceAuth.

Updated onboarding wizard text to reflect origin registration
instead of dashboard URL configuration.

* fix: auto-detect Tailscale Serve /gw route instead of relying on gateway config

The previous approach read gateway.tailscale.mode from openclaw.json, but
setting mode to "off" (to stop gateway from auto-managing routes) also broke
MC's WebSocket URL resolution. Now checks `tailscale serve status --json`
directly for a /gw handler, with the config check as a legacy fallback.

* fix: retry gateway websocket without stale device identity

* feat: use real codex and hermes session logos

* feat: update hermes session logo

* fix: make standalone deploys include static assets

* fix: wait for standalone server and bind explicit host

* fix: harden nextjs image and typed client boundaries

* refactor: reduce nextjs image and jsx lint debt

* refactor: fix react compiler and channels typing

* fix(refactor): onboarding/walkthrough hardening (#272)

* docs(plan): add onboarding walkthrough hardening plan

* fix(onboarding): harden wizard step flow and keyboard navigation

feat(loader): use real brand logo assets for Claude/OpenClaw/Codex/Hermes

* fix(onboarding): harden API state transitions and reset semantics

* test(onboarding): align e2e API spec with current step model

* test(e2e): isolate openclaw harness gateway port and fail fast on startup errors (#273)

* fix: restore agent key auth and actor attribution regressions

* fix: replay onboarding once per fresh browser session

* Add support section with donation links to README

Added a section to encourage support for the project, including donation links.

* fix: restore memory panel and onboarding scanner

* fix: accept gateway config hash in validation schema

* fix: refine onboarding overlay and boot loader

* fix: harden gateway config updates and nav latency

* fix: add openclaw doctor warning and fix banner

* fix: fallback to openclaw cli for channel status

* fix: align channels and chat with gateway rpc

* fix: speed memory tree and scroll doctor details

* fix: clarify security scan autofix results

* fix: correct runtime data directory resolution

* fix: isolate deploy builds from runtime sqlite

* fix: migrate sqlite data with backup

* fix: trust dynamic self hostnames in proxy

* fix: preserve active hosts in security autofix

* fix: pin mission control node runtime

* fix: make doctor warnings template-safe

* fix: isolate build database overrides

* fix: scope doctor warnings to active state dir

* fix: auto-resolve doctor session drift

* fix: harden standalone deploy restart

* fix: detect standalone listener on jarv

* fix: preserve e2e env after security autofix

* fix: scope onboarding to users and sessions

* docs: clarify node 22 support

* fix: load hermes local session transcripts

* fix: fully remove deleted agents from openclaw state

* fix: normalize openclaw model config writes

* fix: isolate e2e runtime state

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 19:09:24 +07:00
.github feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
docs feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
ops feat: initial open-source release 2026-02-23 02:00:44 +07:00
public feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
scripts feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
skills feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
src feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
tests feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
wiki feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
.dockerignore feat: add Docker support, session controls, model catalog, API rate limiting 2026-02-27 20:56:02 +07:00
.env.example feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
.env.test fix: prevent Docker build failure when pnpm lockfile is missing (#130) 2026-03-04 08:33:09 +07:00
.gitignore feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
.node-version feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
.npmrc feat: initial open-source release 2026-02-23 02:00:44 +07:00
.nvmrc feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
CHANGELOG.md chore: bump version to 1.3.0 and update changelog/readme for release (#72) 2026-03-02 23:58:49 +07:00
CODE_OF_CONDUCT.md chore: CODE_OF_CONDUCT, issue templates, DELETE patterns, limit caps, CSRF origin check 2026-02-27 14:04:09 +07:00
CONTRIBUTING.md feat: initial open-source release 2026-02-23 02:00:44 +07:00
Dockerfile feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
LICENSE feat: initial open-source release 2026-02-23 02:00:44 +07:00
README.md feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
SECURITY.md feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
SKILL.md feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
docker-compose.hardened.yml feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
docker-compose.yml feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
eslint.config.mjs feat: initial open-source release 2026-02-23 02:00:44 +07:00
install.sh feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
next.config.js feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
openapi.json Merge pull request #204 from builderz-labs/fix/188-task-queue 2026-03-05 13:35:44 +07:00
openclaw_hardening_guide.md feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
package.json feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
playwright.config.ts feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
playwright.openclaw.gateway.config.ts merge: resolve PR conflicts and add OpenClaw offline E2E harness 2026-03-04 23:11:59 +07:00
playwright.openclaw.local.config.ts merge: resolve PR conflicts and add OpenClaw offline E2E harness 2026-03-04 23:11:59 +07:00
pnpm-lock.yaml feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
postcss.config.js feat: initial open-source release 2026-02-23 02:00:44 +07:00
tailwind.config.js feat(refactor): ready for manual QA after main sync (#274) 2026-03-11 19:09:24 +07:00
tsconfig.json fix: strict mode, test stubs, pagination counts, N+1 queries, CSP hardening 2026-02-27 14:02:52 +07:00
vitest.config.ts feat: audit hardening, webhook retry, and local Claude session tracking (#68) 2026-03-02 22:17:35 +07:00

README.md

Mission Control

The open-source dashboard for AI agent orchestration.

Manage agent fleets, track tasks, monitor costs, and orchestrate workflows — all from a single pane of glass.

License: MIT Next.js 16 React 19 TypeScript SQLite

Mission Control Dashboard


Alpha Software — Mission Control is under active development. APIs, database schemas, and configuration formats may change between releases. Review the known limitations and security considerations before deploying to production.

Why Mission Control?

Running AI agents at scale means juggling sessions, tasks, costs, and reliability across multiple models and channels. Mission Control gives you:

  • 32 panels — Tasks, agents, skills, logs, tokens, memory, security, cron, alerts, webhooks, pipelines, and more
  • Real-time everything — WebSocket + SSE push updates, smart polling that pauses when you're away
  • Zero external dependencies — SQLite database, single pnpm start to run, no Redis/Postgres/Docker required
  • Role-based access — Viewer, operator, and admin roles with session + API key auth
  • Quality gates — Built-in Aegis review system that blocks task completion without sign-off
  • Recurring tasks — Natural language scheduling ("every morning at 9am") with cron-based template spawning
  • Claude Code bridge — Read-only integration surfaces Claude Code team tasks and configs on the dashboard
  • Skills Hub — Browse, install, and security-scan agent skills from ClawdHub and skills.sh registries
  • Multi-gateway — Connect to multiple agent gateways simultaneously (OpenClaw, and more coming soon)

Quick Start

One-Command Install (Docker)

git clone https://github.com/builderz-labs/mission-control.git
cd mission-control
bash install.sh --docker

The installer auto-generates secure credentials, starts the container, and runs an OpenClaw fleet health check. Open http://localhost:3000 and log in with the printed credentials.

One-Command Install (Local)

git clone https://github.com/builderz-labs/mission-control.git
cd mission-control
bash install.sh --local

Requires Node.js 22.x (LTS) and pnpm (auto-installed via corepack if missing).

Manual Setup

Requires pnpm and Node.js 22.x (LTS). Mission Control is validated against Node 22 across local dev, CI, Docker, and standalone deploys. Use nvm use 22 (or your version manager equivalent) before installing or starting the app.

git clone https://github.com/builderz-labs/mission-control.git
cd mission-control
nvm use 22
pnpm install
cp .env.example .env    # edit with your values
pnpm dev                # http://localhost:3000

Initial login is seeded from AUTH_USER / AUTH_PASS on first run. If AUTH_PASS contains #, quote it (e.g. AUTH_PASS="my#password") or use AUTH_PASS_B64.

Docker Hardening (Production)

For production deployments, use the hardened compose overlay:

docker compose -f docker-compose.yml -f docker-compose.hardened.yml up -d

This adds read-only filesystem, capability dropping, log rotation, HSTS, and network isolation. See Security Hardening for the full checklist.

Station Doctor

Run diagnostics on your installation:

bash scripts/station-doctor.sh
bash scripts/security-audit.sh

Project Status

What Works

  • Agent management with full lifecycle (register, heartbeat, wake, retire)
  • Kanban task board with drag-and-drop, priorities, assignments, and comments
  • Real-time monitoring via WebSocket + SSE with smart polling
  • Token usage and cost tracking with per-model breakdowns
  • Multi-gateway connection management
  • Role-based access control (viewer, operator, admin)
  • Background scheduler for automated tasks
  • Outbound webhooks with delivery history, retry with exponential backoff, and circuit breaker
  • Webhook signature verification (HMAC-SHA256 with constant-time comparison)
  • Local Claude Code session tracking (auto-discovers from ~/.claude/projects/)
  • Quality review gates for task sign-off
  • Pipeline orchestration with workflow templates
  • Ed25519 device identity for secure gateway handshake
  • Agent SOUL system with workspace file sync and templates
  • Agent inter-agent messaging and comms
  • Skills Hub with ClawdHub and skills.sh registry integration (search, install, security scan)
  • Bidirectional skill sync — disk ↔ DB with SHA-256 change detection
  • Local agent discovery from ~/.agents/, ~/.codex/agents/, ~/.claude/agents/
  • Natural language recurring tasks — schedule parser converts "every 2 hours" to cron, spawns dated child tasks
  • Claude Code task bridge — read-only scanner surfaces team tasks and configs from ~/.claude/tasks/ and ~/.claude/teams/
  • Skill security scanner (prompt injection, credential leaks, data exfiltration, obfuscated content)
  • Update available banner with GitHub release check and one-click self-update
  • Framework adapter layer for multi-agent registration (OpenClaw, CrewAI, LangGraph, AutoGen, Claude SDK, generic)
  • Multi-project task organization with per-project ticket prefixes
  • Per-agent rate limiting with x-agent-name identity-based quotas
  • Agent self-registration endpoint for autonomous agent onboarding
  • Security audit panel with posture scoring, secret detection, trust scoring, and MCP call auditing
  • Four-layer agent eval framework (output, trace, component, drift detection)
  • Agent optimization endpoint with token efficiency, tool patterns, and fleet benchmarks
  • Hook profiles (minimal/standard/strict) for tunable security strictness
  • Guided onboarding wizard with credential setup, agent discovery, and security scan

Known Limitations

  • CSP still includes unsafe-inlineunsafe-eval has been removed, but inline styles remain for framework compatibility

Security Considerations

  • Change all default credentials (AUTH_USER, AUTH_PASS, API_KEY) before deploying
  • Deploy behind a reverse proxy with TLS (e.g., Caddy, nginx) for any network-accessible deployment
  • Review SECURITY.md for the vulnerability reporting process
  • Do not expose the dashboard to the public internet without configuring MC_ALLOWED_HOSTS and TLS

Features

Agent Management

Monitor agent status, configure models, view heartbeats, and manage the full agent lifecycle from registration to retirement. Agent detail modal with compact overview, inline model selector, and editable sub-agent configuration.

Task Board

Kanban board with six columns (inbox → assigned → in progress → review → quality review → done), drag-and-drop, priority levels, assignments, threaded comments, and inline sub-agent spawning.

Real-time Monitoring

Live activity feed, session inspector, and log viewer with filtering. WebSocket connection to OpenClaw gateway for instant event delivery.

Cost Tracking

Token usage dashboard with per-model breakdowns, trend charts, and cost analysis powered by Recharts.

Background Automation

Scheduled tasks for database backups, stale record cleanup, agent heartbeat monitoring, and recurring task spawning. Configurable via UI or API.

Natural Language Recurring Tasks

Create recurring tasks with natural language like "every morning at 9am" or "every 2 hours". The built-in schedule parser (zero dependencies) converts expressions to cron and stores them in task metadata. A template-clone pattern keeps the original task as a template and spawns dated child tasks (e.g., "Daily Report - Mar 07") on schedule. Each spawned task gets its own Aegis quality gate.

Direct CLI Integration

Connect Claude Code, Codex, or any CLI tool directly to Mission Control without requiring a gateway. Register connections, send heartbeats with inline token reporting, and auto-register agents.

Claude Code Session Tracking

Automatically discovers and tracks local Claude Code sessions by scanning ~/.claude/projects/. Extracts token usage, model info, message counts, cost estimates, and active status from JSONL transcripts. Scans every 60 seconds via the background scheduler.

Claude Code Task Bridge

Read-only integration that surfaces Claude Code team tasks and team configs on the Mission Control dashboard. Scans ~/.claude/tasks/<team>/<N>.json for structured task data (subject, status, owner, blockers) and ~/.claude/teams/<name>/config.json for team metadata (members, lead agent, model assignments). Visible in both the Task Board (collapsible section) and Cron Management (teams overview) panels.

GitHub Issues Sync

Inbound sync from GitHub repositories with label and assignee mapping. Synced issues appear on the task board alongside agent-created tasks.

Skills Hub

Browse, install, and manage agent skills from local directories and external registries (ClawdHub, skills.sh). Bidirectional sync detects manual additions on disk and pushes UI edits back to SKILL.md files. Built-in security scanner checks for prompt injection, credential leaks, data exfiltration, obfuscated content, and dangerous shell commands before installation. Supports 5 skill roots: ~/.agents/skills, ~/.codex/skills, project-local .agents/skills and .codex/skills, and ~/.openclaw/skills for gateway mode.

Local Agent Discovery

Automatically discovers agent definitions from ~/.agents/, ~/.codex/agents/, and ~/.claude/agents/ directories. Detection looks for marker files (AGENT.md, soul.md, identity.md, config.json). Discovered agents sync bidirectionally — edit in the UI and changes write back to disk.

Agent SOUL System

Define agent personality, capabilities, and behavioral guidelines via SOUL markdown files. Edit in the UI or directly in workspace soul.md files — changes sync bidirectionally between disk and database.

Agent Messaging

Session-threaded inter-agent communication via the comms API (a2a:*, coord:*, session:*) with coordinator inbox support and runtime tool-call visibility in the agent-comms feed.

Onboarding Wizard

Guided first-run setup wizard that walks new users through five steps: Welcome (system capabilities detection), Credentials (verify AUTH_PASS and API_KEY strength), Agent Setup (gateway connection or local Claude Code discovery), Security Scan (automated configuration audit with pass/fail checks), and Get Started (quick links to key panels). Automatically appears on first login and can be re-launched from Settings. Progress is persisted per-user so you can resume where you left off.

Security Audit & Agent Trust

Dedicated security audit panel with real-time posture scoring (0-100), secret detection across agent messages, MCP tool call auditing, injection attempt tracking, and per-agent trust scores. Hook profiles (minimal/standard/strict) let operators tune security strictness per deployment. Auth failures, rate limit hits, and injection attempts are logged automatically as security events.

Agent Eval Framework

Four-layer evaluation stack for agent quality: output evals (task completion scoring against golden datasets), trace evals (convergence scoring — >3.0 indicates looping), component evals (tool reliability with p50/p95/p99 latency from MCP call logs), and drift detection (10% threshold vs 4-week rolling baseline). Manage golden datasets and trigger eval runs via API or UI.

Agent Optimization

API endpoint agents can call for self-improvement recommendations. Analyzes token efficiency (tokens/task vs fleet average), tool usage patterns (success/failure rates, redundant calls), and generates prioritized recommendations. Fleet benchmarks provide percentile rankings across all agents.

Integrations

Outbound webhooks with delivery history, configurable alert rules with cooldowns, and multi-gateway connection management. Optional 1Password CLI integration for secret management.

Workspace Management

Workspaces (tenant instances) are managed via the /api/super/* API endpoints. Admins can:

  • Create new client instances (slug, display name, Linux user, gateway port, plan tier)
  • Monitor provisioning jobs and their step-by-step progress
  • Decommission tenants with optional cleanup of state directories and Linux users

Each workspace gets its own isolated environment with a dedicated OpenClaw gateway, state directory, and workspace root.

Update Checker

Automatic GitHub release check notifies you when a new version is available, displayed as a banner in the dashboard. Admins can trigger a one-click update directly from the banner — the server runs git pull, pnpm install, and pnpm build, then prompts for a restart. Dirty working trees are rejected, and all updates are logged to the audit trail.

Framework Adapters

Built-in adapter layer for multi-agent registration across frameworks. Supported adapters: OpenClaw, CrewAI, LangGraph, AutoGen, Claude SDK, and a generic fallback. Each adapter normalizes agent registration, heartbeats, and task reporting to a common interface.

Architecture

mission-control/
├── src/
│   ├── proxy.ts               # Auth gate + CSRF + network access control
│   ├── app/
│   │   ├── page.tsx           # SPA shell — routes all panels
│   │   ├── login/page.tsx     # Login page
│   │   └── api/               # 101 REST API routes
│   ├── components/
│   │   ├── layout/            # NavRail, HeaderBar, LiveFeed
│   │   ├── dashboard/         # Overview dashboard
│   │   ├── panels/            # 32 feature panels
│   │   └── chat/              # Agent chat UI
│   ├── lib/
│   │   ├── auth.ts            # Session + API key auth, RBAC
│   │   ├── db.ts              # SQLite (better-sqlite3, WAL mode)
│   │   ├── claude-sessions.ts  # Local Claude Code session scanner
│   │   ├── claude-tasks.ts     # Claude Code team task/config scanner
│   │   ├── schedule-parser.ts  # Natural language → cron expression parser
│   │   ├── recurring-tasks.ts  # Recurring task template spawner
│   │   ├── migrations.ts      # 39 schema migrations
│   │   ├── scheduler.ts       # Background task scheduler
│   │   ├── webhooks.ts        # Outbound webhook delivery
│   │   ├── websocket.ts       # Gateway WebSocket client
│   │   ├── device-identity.ts # Ed25519 device identity for gateway auth
│   │   ├── agent-sync.ts      # OpenClaw config → MC database sync
│   │   ├── skill-sync.ts      # Bidirectional disk ↔ DB skill sync
│   │   ├── skill-registry.ts  # ClawdHub + skills.sh registry client & security scanner
│   │   ├── local-agent-sync.ts # Local agent discovery from ~/.agents, ~/.codex, ~/.claude
│   │   ├── secret-scanner.ts   # Regex-based secret detection (AWS, GitHub, Stripe, JWT, PEM, DB URIs)
│   │   ├── security-events.ts  # Security event logger + agent trust scoring
│   │   ├── mcp-audit.ts        # MCP tool call auditing
│   │   ├── agent-evals.ts      # Four-layer agent eval framework
│   │   ├── agent-optimizer.ts  # Agent optimization engine
│   │   ├── hook-profiles.ts    # Security strictness profiles (minimal/standard/strict)
│   │   └── adapters/          # Framework adapters (openclaw, crewai, langgraph, autogen, claude-sdk, generic)
│   └── store/index.ts         # Zustand state management
└── .data/                     # Runtime data (SQLite DB, token logs)

Tech Stack

Layer Technology
Framework Next.js 16 (App Router)
UI React 19, Tailwind CSS 3.4
Language TypeScript 5.7
Database SQLite via better-sqlite3 (WAL mode)
State Zustand 5
Charts Recharts 3
Real-time WebSocket + Server-Sent Events
Auth scrypt hashing, session tokens, RBAC
Validation Zod 4
Testing Vitest (282 unit) + Playwright (295 E2E)

Authentication

Three auth methods, three roles:

Method Details
Session cookie POST /api/auth/login sets mc-session (7-day expiry)
API key x-api-key header matches API_KEY env var
Google Sign-In OAuth with admin approval workflow
Role Access
viewer Read-only
operator Read + write (tasks, agents, chat)
admin Full access (users, settings, system ops)

API Reference

All endpoints require authentication unless noted. Full reference below.

Auth
Method Path Description
POST /api/auth/login Login with username/password
POST /api/auth/google Google Sign-In
POST /api/auth/logout Destroy session
GET /api/auth/me Current user info
GET /api/auth/access-requests List pending access requests (admin)
POST /api/auth/access-requests Approve/reject requests (admin)
Core Resources
Method Path Role Description
GET /api/agents viewer List agents with task stats
POST /api/agents operator Register/update agent
GET /api/agents/[id] viewer Agent details
GET /api/agents/[id]/attribution viewer Self-scope attribution/audit/cost report (?privileged=1 admin override)
POST /api/agents/sync operator Sync agents from openclaw.json or local disk (?source=local)
POST /api/agents/register viewer Agent self-registration (idempotent, rate-limited)
GET/POST /api/adapters viewer/operator List adapters / Framework-agnostic agent action dispatch
GET/PUT /api/agents/[id]/soul operator Agent SOUL content (reads from workspace, writes to both)
GET/POST /api/agents/comms operator Agent inter-agent communication
POST /api/agents/message operator Send message to agent
GET /api/tasks viewer List tasks (filter: ?status=, ?assigned_to=, ?priority=)
POST /api/tasks operator Create task
GET /api/tasks/queue operator Poll next task for an agent (?agent=, optional ?max_capacity=)
GET /api/tasks/[id] viewer Task details
PUT /api/tasks/[id] operator Update task
DELETE /api/tasks/[id] admin Delete task
GET /api/tasks/[id]/comments viewer Task comments
POST /api/tasks/[id]/comments operator Add comment
POST /api/tasks/[id]/broadcast operator Broadcast task to agents

Attribution Contract (/api/agents/[id]/attribution)

  • Self-scope by default: requester identity must match target agent via x-agent-name (or matching authenticated username).
  • Admin override requires explicit ?privileged=1.
  • Query params:
    • hours: integer window 1..720 (default 24)
    • section: comma-separated subset of identity,audit,mutations,cost (default all)
Security & Evals
Method Path Role Description
GET /api/security-audit admin Security posture, events, trust scores, MCP audit (?timeframe=day)
GET /api/security-scan admin Static security configuration scan
GET /api/agents/optimize operator Agent optimization recommendations (?agent=&hours=24)
GET /api/agents/evals operator Agent eval results (?agent=, ?action=history&weeks=4)
POST /api/agents/evals operator Trigger eval run (action: 'run') or manage golden datasets (action: 'golden-set')
Monitoring
Method Path Role Description
GET /api/status viewer System status (uptime, memory, disk)
GET /api/activities viewer Activity feed
GET /api/notifications viewer Notifications for recipient
GET /api/sessions viewer Active gateway sessions
GET /api/tokens viewer Token usage and cost data
GET /api/standup viewer Standup report history
POST /api/standup operator Generate standup
GET /api/releases/check viewer Check for new GitHub releases
Configuration
Method Path Role Description
GET/PUT /api/settings admin App settings
GET/PUT /api/gateway-config admin OpenClaw gateway config
GET/POST /api/cron admin Cron management
GET/POST /api/onboarding viewer Onboarding wizard state and step progression
Operations
Method Path Role Description
GET/POST /api/scheduler admin Background task scheduler
GET /api/audit admin Audit log
GET /api/logs viewer Agent log browser
GET /api/memory viewer Memory file browser/search
GET /api/search viewer Global search
GET /api/export admin CSV export
POST /api/backup admin Database backup
POST /api/cleanup admin Stale data cleanup
Integrations
Method Path Role Description
GET/POST/PUT/DELETE /api/webhooks admin Webhook CRUD
POST /api/webhooks/test admin Test delivery
POST /api/webhooks/retry admin Manual retry a failed delivery
GET /api/webhooks/verify-docs viewer Signature verification docs
GET /api/webhooks/deliveries admin Delivery history
GET/POST/PUT/DELETE /api/alerts admin Alert rules
GET/POST/PUT/DELETE /api/gateways admin Gateway connections
POST /api/gateways/connect operator Resolve websocket URL + token for selected gateway
GET/PUT/DELETE/POST /api/integrations admin Integration management
POST /api/github admin Trigger GitHub Issues sync
Workspace/Tenant Management
Method Path Role Description
GET /api/super/tenants admin List all tenants with latest provisioning status
POST /api/super/tenants admin Create tenant and queue bootstrap job
POST /api/super/tenants/[id]/decommission admin Queue tenant decommission job
GET /api/super/provision-jobs admin List provisioning jobs (filter: ?tenant_id=, ?status=)
POST /api/super/provision-jobs admin Queue additional job for existing tenant
POST /api/super/provision-jobs/[id]/action admin Approve, reject, or cancel a provisioning job
Skills
Method Path Role Description
GET /api/skills viewer List skills (DB-backed with filesystem fallback)
GET /api/skills?mode=content&source=…&name=… viewer Read SKILL.md content with inline security report
GET /api/skills?mode=check&source=…&name=… viewer On-demand security scan
POST /api/skills operator Create skill
PUT /api/skills operator Update skill content
DELETE /api/skills operator Delete skill
GET /api/skills/registry?source=…&q=… viewer Search external registry (ClawdHub, skills.sh)
POST /api/skills/registry admin Install skill from registry
PUT /api/skills/registry viewer Security-check content without installing
Direct CLI
Method Path Role Description
POST /api/connect operator Register direct CLI connection
GET /api/connect viewer List active connections
DELETE /api/connect operator Disconnect CLI session
Chat & Real-time
Method Path Description
GET /api/events SSE stream of DB changes
GET/POST /api/chat/conversations Conversation CRUD
GET/POST /api/chat/messages Message CRUD
Agent Lifecycle
Method Path Role Description
POST /api/spawn operator Spawn agent session
POST /api/agents/[id]/heartbeat operator Agent heartbeat
POST /api/agents/[id]/wake operator Wake sleeping agent
POST /api/quality-review operator Submit quality review
Claude Code Sessions
Method Path Role Description
GET /api/claude/sessions viewer List discovered sessions (filter: ?active=1, ?project=)
POST /api/claude/sessions operator Trigger manual session scan
GET /api/claude-tasks viewer List Claude Code team tasks and configs (?force=true to bypass cache)
GET /api/schedule-parse viewer Parse natural language schedule (?input=every+2+hours)
Pipelines
Method Path Role Description
GET /api/pipelines viewer List pipeline runs
POST /api/pipelines/run operator Start pipeline
GET/POST /api/workflows viewer/admin Workflow templates

Environment Variables

See .env.example for the complete list. Key variables:

Variable Required Description
AUTH_USER No Initial admin username (default: admin)
AUTH_PASS No Initial admin password
AUTH_PASS_B64 No Base64-encoded admin password (overrides AUTH_PASS if set)
API_KEY No API key for headless access
OPENCLAW_CONFIG_PATH Yes* Absolute path to openclaw.json (preferred)
OPENCLAW_STATE_DIR Yes* OpenClaw state root (default: ~/.openclaw)
OPENCLAW_HOME No Legacy alias for state dir (fallback if OPENCLAW_STATE_DIR unset)
OPENCLAW_GATEWAY_HOST No Gateway host (default: 127.0.0.1)
OPENCLAW_GATEWAY_PORT No Gateway WebSocket port (default: 18789)
OPENCLAW_GATEWAY_TOKEN No Server-side gateway auth token
OPENCLAW_TOOLS_PROFILE No Tools profile for sessions_spawn (recommended: coding)
NEXT_PUBLIC_GATEWAY_TOKEN No Browser-side gateway auth token (must use NEXT_PUBLIC_ prefix)
NEXT_PUBLIC_GATEWAY_CLIENT_ID No Gateway UI client ID for websocket handshake (default: openclaw-control-ui)
OPENCLAW_MEMORY_DIR No Memory browser root (see note below)
MC_CLAUDE_HOME No Path to ~/.claude directory (default: ~/.claude)
MC_TRUSTED_PROXIES No Comma-separated trusted proxy IPs for XFF parsing
MC_ALLOWED_HOSTS No Host allowlist for production

*Memory browser, log viewer, and gateway config require OpenClaw config/state resolution (OPENCLAW_CONFIG_PATH and/or OPENCLAW_STATE_DIR).

Memory Browser note: OpenClaw does not store agent memory markdown files under $OPENCLAW_STATE_DIR/memory/ — that directory does not exist by default. Agent memory lives in each agent's workspace (e.g. ~/clawd-agents/{agent}/memory/). Set OPENCLAW_MEMORY_DIR to your agents root directory to make the Memory Browser show daily logs, MEMORY.md, and other markdown files:

OPENCLAW_MEMORY_DIR=/home/you/clawd-agents

Workspace Creation Flow

To add a new workspace/client instance, use the /api/super/tenants endpoint or the Workspaces panel (if enabled):

  1. Provide tenant/workspace fields (slug, display_name, optional ports/gateway owner).
  2. The system queues a bootstrap provisioning job.
  3. Approve/run the provisioning job via /api/super/provision-jobs/[id]/action.

Projects and Ticket Prefixes

Mission Control supports multi-project task organization per workspace:

  • Create/manage projects via Task Board → Projects.
  • Each project has its own ticket prefix and counter.
  • New tasks receive project-scoped ticket refs like PA-001, PA-002.
  • Task board supports filtering by project.

Memory Scope Clarification

  • Agent profile → Memory tab: per-agent working memory stored in Mission Control DB (working_memory).
  • Memory Browser page: workspace/local filesystem memory tree under OPENCLAW_MEMORY_DIR.

Deployment

# Build
pnpm install --frozen-lockfile
pnpm build

# Run
OPENCLAW_CONFIG_PATH=/path/to/.openclaw/openclaw.json OPENCLAW_STATE_DIR=/path/to/.openclaw pnpm start

Network access is restricted by default in production. Set MC_ALLOWED_HOSTS (comma-separated) or MC_ALLOW_ANY_HOST=1 to control access.

Development

pnpm dev              # Dev server
pnpm build            # Production build
pnpm typecheck        # TypeScript check
pnpm lint             # ESLint
pnpm test             # Vitest unit tests
pnpm test:e2e         # Playwright E2E
pnpm quality:gate     # All checks

Workload Signals Contract

GET /api/workload returns a workload snapshot and one recommendation:

  • normal: system healthy, submit freely
  • throttle: reduce submission rate / defer non-critical work
  • shed: submit only critical work
  • pause: hold submissions until capacity returns

Low-signal behavior:

  • capacity.error_rate_5m is clamped to [0,1]
  • queue.estimated_wait_confidence is calculated or unknown
  • queue breakdown maps include stable keys even when counts are zero

Runtime-tunable thresholds:

  • MC_WORKLOAD_QUEUE_DEPTH_NORMAL
  • MC_WORKLOAD_QUEUE_DEPTH_THROTTLE
  • MC_WORKLOAD_QUEUE_DEPTH_SHED
  • MC_WORKLOAD_BUSY_RATIO_THROTTLE
  • MC_WORKLOAD_BUSY_RATIO_SHED
  • MC_WORKLOAD_ERROR_RATE_THROTTLE
  • MC_WORKLOAD_ERROR_RATE_SHED
  • MC_WORKLOAD_RECENT_WINDOW_SECONDS

Agent Diagnostics Contract

GET /api/agents/{id}/diagnostics is self-scoped by default.

  • Self access:
    • Session user where username === agent.name, or
    • API-key request with x-agent-name matching {id} agent name
  • Cross-agent access:
    • Allowed only with explicit ?privileged=1 and admin auth
  • Query validation:
    • hours must be an integer between 1 and 720
    • section must be a comma-separated subset of summary,tasks,errors,activity,trends,tokens

Trend alerts in the trends.alerts response are derived from current-vs-previous window comparisons:

  • warning: error spikes or severe activity drop
  • info: throughput drops or potential stall patterns

Roadmap

See open issues for planned work and the v1.0.0 release notes for what shipped.

Completed:

  • Dockerfile and docker-compose.yml (#34)

  • Implement session control actions — monitor/pause/terminate are stub buttons (#35)

  • Dynamic model catalog — replace hardcoded pricing across 3 files (#36)

  • API-wide rate limiting (#37)

  • React error boundaries around panels (#38)

  • Structured logging with pino (#39)

  • Accessibility improvements — WCAG 2.1 AA (#40)

  • HSTS header for TLS deployments (#41)

  • Input validation with zod schemas (#42)

  • Export endpoint row limits (#43)

  • Fill in Vitest unit test stubs with real assertions

  • Direct CLI integration — connect tools like Codex, Claude Code, or custom CLIs directly without requiring a gateway (#61)

  • OpenAPI 3.1 documentation with Scalar UI (#60)

  • GitHub Issues sync — inbound sync with label/assignee mapping (#63)

  • Webhook retry with exponential backoff and circuit breaker

  • Webhook signature verification (HMAC-SHA256 with constant-time comparison)

  • Local Claude Code session tracking — auto-discover sessions from ~/.claude/projects/

  • Rate limiter IP extraction hardening with trusted proxy support

  • Ed25519 device identity for WebSocket challenge-response handshake (#85)

  • Agent SOUL workspace sync — bidirectional sync between soul.md files and database (#95)

  • Update available banner with GitHub release check (#94)

  • Side panel navigation synced with URL routes (#87)

  • Task board SSE wiring, priority enum, and auto-advance (#89)

Up next:

  • Workspace isolation for multi-team usage (#75)
  • Framework adapter layer — multi-agent registration across OpenClaw, CrewAI, LangGraph, AutoGen, Claude SDK, and generic
  • Self-update mechanism — admin-only one-click update with audit logging
  • Multi-project task organization with per-project ticket prefixes
  • Skills Hub — browse, install, and security-scan skills from ClawdHub and skills.sh registries
  • Bidirectional skill sync — disk ↔ DB with SHA-256 change detection (60s scheduler)
  • Local agent discovery — auto-detect agents from ~/.agents/, ~/.codex/agents/, ~/.claude/agents/
  • Natural language recurring tasks with cron-based template spawning
  • Claude Code task bridge — read-only team task and config integration
  • Agent-agnostic gateway support — connect any orchestration framework (OpenClaw, ZeroClaw, OpenFang, NeoBot, IronClaw, etc.), not just OpenClaw
  • Flight Deck — native desktop companion app (Tauri v2) with real PTY terminal grid, stall inbox with native OS notifications, and system tray HUD. Currently in private beta.
  • First-class per-agent cost breakdowns — dedicated panel with per-agent token usage and spend (currently derivable from per-session data)
  • OAuth approval UI improvements
  • API token rotation UI

Contributing

Contributions are welcome. See CONTRIBUTING.md for setup instructions and guidelines.

Security

To report a vulnerability, see SECURITY.md.

❤️ Support the Project

If you find this project useful, consider supporting my open-source work.

Buy Me A Coffee

Solana donations

BYLu8XD8hGDUtdRBWpGWu5HKoiPrWqCxYFSh4oxXuvPg

License

MIT © 2026 Builderz Labs