Commit Graph

23 Commits

Author SHA1 Message Date
Manus
8096ce4dfd true message 2026-03-26 05:41:44 -04:00
Manus
d396004294 Checkpoint: Phase 16 complete: entrypoint.sh with drizzle-kit auto-migrate, nodeMetrics table, metrics-collector background job (CPU/MEM every 30s, alerts CPU>80% or unhealthy with 15min cooldown), Sparkline SVG component in Nodes.tsx, nodes.metricsHistory + nodes.allMetricsLatest tRPC endpoints. 104 vitest tests pass. 2026-03-24 12:46:21 -04:00
Manus
ac5634b2ec Checkpoint: Bug fix: agents.list tRPC procedure now uses getAllAgents() instead of getUserAgents(SYSTEM_USER_ID=1). Root cause was userId mismatch: seed creates agents with userId=0 but router queried userId=1. Added getAllAgents() and getSystemAgents() helpers. Rebuilt Docker image without cache. Verified: 6 agents visible on production (GoClaw Orchestrator, Browser Agent, Tool Builder, Agent Compiler, Coder Agent, Researcher). 86 tests pass. 2026-03-20 21:26:29 -04:00
Manus
0959c90d36 Checkpoint: Fix: agents.list tRPC procedure now uses getAllAgents() instead of getUserAgents(SYSTEM_USER_ID=1). Root cause: seed creates agents with userId=0 but router queried userId=1. Added getAllAgents() and getSystemAgents() helpers. 86 tests pass. 2026-03-20 21:15:55 -04:00
Manus
72404773ae Checkpoint: Phase 14 complete: header metrics (UPTIME/NODES/AGENTS/CPU/MEM) now show real data from production — nodes=6/6, agents=6, CPU=0.2%, MEM=645MB. Seed fixed for isSystem idempotency. 82 tests pass. Deployed to production server. 2026-03-20 21:09:10 -04:00
Manus
16b101537c Checkpoint: Phase 14: Fixed hardcoded header metrics (UPTIME/NODES/AGENTS/CPU/MEM) — connected to real tRPC dashboard.stats endpoint with 30s polling. Fixed seed idempotency — now checks by isSystem=true instead of total count. Added dashboard.test.ts with 13 new tests. All 82 tests pass. 2026-03-20 21:00:51 -04:00
Manus
cbb93a8fdb Checkpoint: Phase 13 complete: Seed data for agents and orchestrator
- server/seed.ts: 6 default system agents seeded on first startup
- server/seed.test.ts: 18 vitest tests (69 total, all pass)
- server/_core/index.ts: seedDefaults() integrated into startup
- Deployed to production 2.59.219.61: all 6 agents confirmed in DB
- Gitea: committed and pushed (73a26d8)
- DB schema: all missing tables created (agentHistory, agentMetrics, agents, toolDefinitions + isSystem/isOrchestrator columns)
2026-03-20 20:52:18 -04:00
Manus
73a26d8a8a Checkpoint: Phase 13: Seed data for agents and orchestrator
- server/seed.ts: 6 default system agents (Orchestrator, Browser, Tool Builder, Agent Compiler, Coder, Researcher)
- Idempotent: runs only when agents table is empty
- Integrated into server/_core/index.ts startup
- server/seed.test.ts: 18 vitest tests, all pass
- Total: 69 tests pass (7 test files)
2026-03-20 20:39:08 -04:00
NW
b1a3a994bc fix: upgrade Docker API version from v1.41 to v1.44 2026-03-20 20:19:54 -04:00
NW
6a033c2db0 fix: run gateway as root for docker.sock access (read-only Docker API) 2026-03-20 20:18:39 -04:00
NW
4a3530feb7 fix: add docker group to gateway container for docker.sock access 2026-03-20 20:17:43 -04:00
Manus
0dcae37a78 Checkpoint: Phase 12: Real-time Docker Swarm monitoring for /nodes page
Реализовано:
- gateway/internal/docker/client.go: Docker API клиент через unix socket (/var/run/docker.sock)
  - IsSwarmActive(), GetSwarmInfo(), ListNodes(), ListContainers(), GetContainerStats()
  - CalcCPUPercent() для расчёта CPU%
- gateway/internal/api/handlers.go: новые endpoints
  - GET /api/nodes: список Swarm нод или standalone Docker хост
  - GET /api/nodes/stats: live CPU/RAM статистика контейнеров
  - POST /api/tools/execute: выполнение инструментов
- gateway/cmd/gateway/main.go: зарегистрированы новые маршруты
- server/gateway-proxy.ts: добавлены getGatewayNodes() и getGatewayNodeStats()
- server/routers.ts: добавлен nodes router (nodes.list, nodes.stats)
- client/src/pages/Nodes.tsx: полностью переписан на реальные данные
  - Auto-refresh: 10s для нод, 15s для статистики контейнеров
  - Swarm mode: показывает все ноды кластера
  - Standalone mode: показывает локальный Docker хост + контейнеры
  - CPU/RAM gauges из реальных docker stats
  - Error state при недоступном Gateway
  - Loading skeleton
- server/nodes.test.ts: 14 новых vitest тестов
- Все 51 тест пройдены
2026-03-20 20:12:57 -04:00
Manus
2f87e18e85 Checkpoint: Phase 11 complete: Frontend connected to Go Gateway. All orchestrator/ollama tRPC calls go through gateway-proxy.ts with Node.js fallback. 37 vitest tests pass. End-to-end verified: chat, tool calling, health via Go Gateway. 2026-03-20 19:38:27 -04:00
Manus
dda99d7056 Checkpoint: Phase 10: LLM Provider Configuration — Ollama Cloud как дефолт, локальный Ollama закомментирован (GPU only), docker-compose/stack обновлены, .env.example с 4 провайдерами 2026-03-20 19:16:44 -04:00
Manus
02742f836c Checkpoint: Phase 9: Go Gateway — полный перенос оркестратора и tool executor на Go. Добавлены gateway/ (Go), docker/ (docker-compose + stack + Dockerfiles), server/gateway-proxy.ts 2026-03-20 18:43:49 -04:00
Manus
46e384c341 Checkpoint: Phase 8 Complete: Fix Orchestrator Chat
Исправлено:
- Chat.tsx: убрана хардкодированная модель "qwen2.5:7b" из мутации — теперь оркестратор использует модель из конфига БД (minimax-m2.7)
- Chat.tsx: добавлен Streamdown для markdown рендеринга ответов оркестратора
- Подтверждено: tool calling работает — команда "Покажи файлы проекта" вызывает file_list и возвращает структуру проекта
- Подтверждено: model в header показывает "minimax-m2.7" из БД
- TypeScript: 0 ошибок (pnpm tsc --noEmit)
- Тесты: 24/24 passed
2026-03-20 18:20:37 -04:00
Manus
7aa8eee2ca Checkpoint: Phase 7 complete: Orchestrator Agent добавлен в /agents с меткой CROWN/SYSTEM, кнопками Configure и Open Chat. /chat читает конфиг оркестратора из БД (модель, промпт, инструменты). AgentDetailModal поддерживает isOrchestrator. 24 теста пройдены. 2026-03-20 17:48:21 -04:00
Manus
c2fdfdbf72 true message 2026-03-20 17:34:20 -04:00
Manus
86a1ee9062 Checkpoint: Full Development Complete: All 4 Phases
## Phase 1 (Fixed): Agent Management UI
- Исправлена авторизация: agents переведены на publicProcedure
- AgentDetailModal: 5 вкладок (General, LLM Params, Tools, History, Stats)
- Полное редактирование: model, provider, temperature, topP, maxTokens, frequencyPenalty, presencePenalty, systemPrompt
- Управление allowedTools и allowedDomains через теги
- AgentCreateModal: создание агентов с выбором модели из Ollama API
- Кнопка Metrics на каждой карточке агента

## Phase 2+3: Tool Binding System
- server/tools.ts: реестр из 10 инструментов (http_get, http_post, shell_exec, file_read, file_write, docker_list, docker_exec, docker_logs, browser_navigate, browser_screenshot)
- Безопасное выполнение: проверка allowedTools агента, accessControl из БД
- tools.execute tRPC endpoint
- Tools.tsx: страница управления инструментами с тест-выполнением
- Добавлен пункт "Инструменты" в sidebar навигацию

## Phase 4: Metrics & History
- AgentMetrics.tsx: детальная страница метрик по агенту
- Request Timeline: bar chart по часам (success/error)
- Conversation Log: история диалогов с пагинацией
- Raw Metrics Table: все метрики с токенами и временем
- Time range selector: 6h/24h/48h/7d
- Маршрут /agents/:id/metrics

## Tests: 24/24 passed
- server/auth.logout.test.ts (1)
- server/agents.test.ts (7)
- server/tools.test.ts (13)
- server/ollama.test.ts (3)
2026-03-20 16:52:27 -04:00
Manus
159a89a156 true message 2026-03-20 16:39:29 -04:00
Manus
b18e6e244f Checkpoint: Интеграция реального Ollama Cloud API: серверный прокси (tRPC), Dashboard с live-статусом подключения и количеством моделей, Chat с реальными ответами LLM и выбором модели, Settings с живым списком 34 моделей. Все 4 vitest теста пройдены. 2026-03-20 16:03:01 -04:00
Manus
ac674815f2 Checkpoint: GoClaw Control Center v0.1 — полнофункциональный веб-интерфейс для мониторинга и управления GoClaw Swarm Cloud. Включает: Dashboard с метриками кластера, панель управления агентами, мониторинг Swarm-нод, терминальный чат с оркестратором, настройки API-ключей и провайдеров моделей, конфигурацию коннекторов (Telegram). Дизайн: Mission Control (космический центр управления), тёмная тема с неоновыми индикаторами. 2026-03-20 15:38:12 -04:00
Manus
351be6cad6 Initial project bootstrap 2026-03-20 15:24:10 -04:00