feat: distinguish agent re-registration from first registration
Detect when an agent instance already exists in the registry and record a RE_REGISTERED event with route count and capabilities instead of a generic REGISTERED event. UI shows a refresh icon for re-registrations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { FeedEvent } from '@cameleer/design-system';
|
||||
import type { LogEntry } from '@cameleer/design-system';
|
||||
import { UserPlus, UserMinus, Play, Square, Clock, Skull, HeartPulse, Route, Send, Activity } from 'lucide-react';
|
||||
import { UserPlus, UserMinus, RefreshCw, Play, Square, Clock, Skull, HeartPulse, Route, Send, Activity } from 'lucide-react';
|
||||
import { createElement } from 'react';
|
||||
|
||||
export function formatUptime(seconds?: number): string {
|
||||
@@ -31,6 +31,7 @@ export function eventSeverity(type: string): FeedEvent['severity'] {
|
||||
case 'WENT_STALE': return 'warning';
|
||||
case 'RECOVERED':
|
||||
case 'REGISTERED':
|
||||
case 'RE_REGISTERED':
|
||||
case 'AGENT_STARTED': return 'success';
|
||||
default: return 'running';
|
||||
}
|
||||
@@ -39,6 +40,7 @@ export function eventSeverity(type: string): FeedEvent['severity'] {
|
||||
export function eventIcon(type: string) {
|
||||
switch (type) {
|
||||
case 'REGISTERED': return createElement(UserPlus, { size: 14 });
|
||||
case 'RE_REGISTERED': return createElement(RefreshCw, { size: 14 });
|
||||
case 'DEREGISTERED': return createElement(UserMinus, { size: 14 });
|
||||
case 'AGENT_STARTED': return createElement(Play, { size: 14 });
|
||||
case 'AGENT_STOPPED': return createElement(Square, { size: 14 });
|
||||
|
||||
Reference in New Issue
Block a user