feat: migrate UI to @cameleer/design-system, add backend endpoints
Backend: - Add agent_events table (V5) and lifecycle event recording - Add route catalog endpoint (GET /routes/catalog) - Add route metrics endpoint (GET /routes/metrics) - Add agent events endpoint (GET /agents/events-log) - Enrich AgentInstanceResponse with tps, errorRate, activeRoutes, uptimeSeconds - Add TimescaleDB retention/compression policies (V6) Frontend: - Replace custom Mission Control UI with @cameleer/design-system components - Rebuild all pages: Dashboard, ExchangeDetail, RoutesMetrics, AgentHealth, AgentInstance, RBAC, AuditLog, OIDC, DatabaseAdmin, OpenSearchAdmin, Swagger - New LayoutShell with design system AppShell, Sidebar, TopBar, CommandPalette - Consume design system from Gitea npm registry (@cameleer/design-system@0.0.1) - Add .npmrc for scoped registry, update Dockerfile with REGISTRY_TOKEN arg CI: - Pass REGISTRY_TOKEN build-arg to UI Docker build step Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package com.cameleer3.server.core.agent;
|
||||
|
||||
import java.time.Instant;
|
||||
|
||||
public record AgentEventRecord(
|
||||
long id,
|
||||
String agentId,
|
||||
String appId,
|
||||
String eventType,
|
||||
String detail,
|
||||
Instant timestamp
|
||||
) {}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.cameleer3.server.core.agent;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
public interface AgentEventRepository {
|
||||
|
||||
void insert(String agentId, String appId, String eventType, String detail);
|
||||
|
||||
List<AgentEventRecord> query(String appId, String agentId, Instant from, Instant to, int limit);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.cameleer3.server.core.agent;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.time.Instant;
|
||||
import java.util.List;
|
||||
|
||||
public class AgentEventService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(AgentEventService.class);
|
||||
|
||||
private final AgentEventRepository repository;
|
||||
|
||||
public AgentEventService(AgentEventRepository repository) {
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
public void recordEvent(String agentId, String appId, String eventType, String detail) {
|
||||
log.debug("Recording agent event: agent={}, app={}, type={}", agentId, appId, eventType);
|
||||
repository.insert(agentId, appId, eventType, detail);
|
||||
}
|
||||
|
||||
public List<AgentEventRecord> queryEvents(String appId, String agentId, Instant from, Instant to, int limit) {
|
||||
return repository.query(appId, agentId, from, to, limit);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user