fix(governance): Rename AgentStatus to AgentGovStatus to avoid conflict

Conflicts with existing AgentStatus from agents.ts
This commit is contained in:
Apple
2025-11-29 16:43:07 -08:00
parent ec9ff3e633
commit beed5308f1
2 changed files with 9 additions and 9 deletions

View File

@@ -2,12 +2,12 @@
import { Shield, User, Users, Briefcase, Star, Crown, Building2, Landmark } from 'lucide-react'; import { Shield, User, Users, Briefcase, Star, Crown, Building2, Landmark } from 'lucide-react';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
import type { AgentGovLevel, AgentStatus } from '@/lib/types/governance'; import type { AgentGovLevel, AgentGovStatus } from '@/lib/types/governance';
import { GOV_LEVEL_LABELS, AGENT_STATUS_LABELS } from '@/lib/types/governance'; import { GOV_LEVEL_LABELS, AGENT_GOV_STATUS_LABELS } from '@/lib/types/governance';
interface GovernanceLevelBadgeProps { interface GovernanceLevelBadgeProps {
level: AgentGovLevel; level: AgentGovLevel;
status?: AgentStatus; status?: AgentGovStatus;
showLabel?: boolean; showLabel?: boolean;
size?: 'sm' | 'md' | 'lg'; size?: 'sm' | 'md' | 'lg';
className?: string; className?: string;
@@ -126,7 +126,7 @@ export function GovernanceLevelBadge({
status === 'revoked' && 'bg-red-500/20 text-red-400' status === 'revoked' && 'bg-red-500/20 text-red-400'
)} )}
> >
{AGENT_STATUS_LABELS[status]} {AGENT_GOV_STATUS_LABELS[status]}
</span> </span>
)} )}
</div> </div>

View File

@@ -53,12 +53,12 @@ export const GOV_LEVEL_COLORS: Record<AgentGovLevel, string> = {
}; };
// ============================================================================ // ============================================================================
// AGENT STATUS // AGENT GOVERNANCE STATUS
// ============================================================================ // ============================================================================
export type AgentStatus = 'active' | 'suspended' | 'revoked'; export type AgentGovStatus = 'active' | 'suspended' | 'revoked';
export const AGENT_STATUS_LABELS: Record<AgentStatus, string> = { export const AGENT_GOV_STATUS_LABELS: Record<AgentGovStatus, string> = {
active: 'Активний', active: 'Активний',
suspended: 'Призупинено', suspended: 'Призупинено',
revoked: 'Заблоковано', revoked: 'Заблоковано',
@@ -234,7 +234,7 @@ export interface GovernanceEvent {
export interface AgentRolesResponse { export interface AgentRolesResponse {
level: AgentGovLevel; level: AgentGovLevel;
status: AgentStatus; status: AgentGovStatus;
powers: GovernancePower[]; powers: GovernancePower[];
assignments: Array<{ assignments: Array<{
microdaoId: string; microdaoId: string;
@@ -295,7 +295,7 @@ export interface GovernanceAgent {
displayName: string; displayName: string;
avatarUrl?: string; avatarUrl?: string;
govLevel: AgentGovLevel; govLevel: AgentGovLevel;
status: AgentStatus; status: AgentGovStatus;
homeMicrodaoId?: string; homeMicrodaoId?: string;
homeMicrodaoName?: string; homeMicrodaoName?: string;
} }