Commit Graph

10 Commits

Author SHA1 Message Date
nyk 27f6a3d6c1
fix(tui): fix agent list access pattern for assign prompts (#474) 2026-03-22 17:58:15 +07:00
nyk 78b472a63a
feat: direct Claude API task dispatch (gateway-free) (#473)
* feat: direct Claude API task dispatch (gateway-free)

Add a built-in task executor that calls the Anthropic Messages API
directly when no OpenClaw gateway is available. This makes the full
task lifecycle work out of the box — tasks are actually executed by
Claude, not just tracked as metadata.

How it works:
- Scheduler checks: is a gateway registered? If yes, use gateway
  dispatch (existing path). If no, check for ANTHROPIC_API_KEY.
- When dispatching via direct API: builds prompt from task + agent
  SOUL, selects model by complexity (Opus/Sonnet/Haiku), calls
  Claude Messages API, stores response as resolution.
- Aegis reviews also work via direct API — same fallback logic.
- Token usage is recorded in the token_usage table.
- After dispatch, task moves to 'review' for Aegis quality check.

Setup: add ANTHROPIC_API_KEY=sk-ant-... to .env.local
No gateway, no OpenClaw, no extra dependencies needed.

* fix(tui): add missing ansi.blue color function
2026-03-22 17:50:16 +07:00
nyk 32447a4b08
feat(tui): multi-step task creation + assign/priority actions (#472)
* fix: add inline token editor to gateway card (#459)

The gateway card showed token status as read-only (set/none) with no
way to update it. Users with a registered gateway but missing token
had to delete and re-add the gateway.

Add [edit] link next to the token indicator that expands an inline
password input. Supports Enter to save, Escape to cancel. Calls
PUT /api/gateways with the token field (already supported by API).

* feat(tui): multi-step task creation + assign/priority actions

- [n]ew now prompts: title → description → priority → assign agent
  (Enter skips optional steps)
- [a]ssign key to assign selected task to an agent (shows available
  agent names)
- [p]riority key to change task priority (low/medium/high/critical)
- Updated help bar and usage text with new keybindings

* feat(tui): task detail view, activity feed, comments, priority column

- Enter on a task opens full detail view showing: status, priority,
  assignment, description, resolution, quality reviews, and comments
- Task detail supports [s]tatus, [a]ssign, [p]riority, [c]omment,
  [r]efresh actions
- Activity feed below task list shows recent task/agent events with
  timestamps and icons
- Priority column added to task list with color coding
- [e]dit key for title editing (moved from Enter)
2026-03-22 17:25:07 +07:00
Nyk 14a0eefd65 feat(tui): task management — create, edit, status change, delete
- [n] new task with inline title input
- [enter] edit task title on selected task
- [s] change task status (inbox/assigned/in_progress/done/failed)
- [d] delete task with y/n confirmation
- Full text input mode with backspace, esc cancel, enter submit
- Input bar renders at footer with context-aware hints
2026-03-22 00:16:28 +07:00
Nyk 531101dc2d fix(tui): only show last seen when agent actually heartbeated 2026-03-21 23:10:22 +07:00
Nyk e2e9560d1d fix(tui): last seen fallback, session cost aggregation, dark blue header
- Fall back to updated_at/created_at when last_seen is null
- Sum session estimatedCost when token_usage table is empty
- Dark navy blue header background (256-color 17)
2026-03-21 22:54:24 +07:00
Nyk 3ada2e5380 feat(tui): v2 with arrow navigation, agent detail, and chat viewer
- Arrow keys navigate agent/task lists with highlighted selection
- Tab switches between agents and tasks panels
- Enter on agent opens detail view with sessions list
- Enter on session loads chat transcript
- PgUp/PgDn scrolls chat history
- Esc goes back to dashboard
- Scrolling window keeps cursor visible in long lists
2026-03-21 22:48:32 +07:00
Nyk 404092e81d fix(tui): treat DB+Disk as essential health checks 2026-03-21 22:42:50 +07:00
Nyk aa65a1b0b2 fix(tui): alternate screen buffer + smarter health display
- Use alternate screen buffer so terminal doesn't scroll
- Show "healthy (no gateway)" when core checks pass but gateway is down
- Restore original terminal state on exit
2026-03-21 22:41:42 +07:00
Nyk 06cfb3d9db feat(tui): add terminal dashboard for Mission Control
Zero-dependency TUI using raw ANSI escape codes. Shows:
- System health status with connection indicator
- Agents panel (sorted by status, with last heartbeat)
- Tasks panel (recent tasks with status and assignee)
- Token costs summary (24h)

Keyboard controls:
- r: refresh now
- a: focus agents panel
- t: focus tasks panel
- w: wake first sleeping agent
- q/Esc: quit

Auto-refreshes every 5s (configurable with --refresh flag).
Uses same profile/auth system as CLI and MCP server.

Run with: pnpm mc:tui
2026-03-21 21:46:45 +07:00