export type AgentStatus = 'REGISTERING' | 'CONNECTING' | 'ACTIVE' | 'STOPPED' | 'IDLE' | 'DEGRADED' | 'OFFLINE' | 'DELETED'; export interface AgentTagAssignment { id: string; tagId: string; tag?: { id: string; key?: string | null; label?: string | null; color?: string | null; } | null; } export interface Agent { id: string; workspaceId: string; name: string; hostname: string; platform: string; architecture: string; version: string; isActive: boolean; status: AgentStatus; lastHeartbeat: string | null; tunnelUrl: string | null; tunnelStatus: string | null; aiContext: string | null; configuration: Record; capabilities: string[]; metadata: Record; createdAt: string; updatedAt: string; /** * Owner of the machine — the user who added it. Null only for agents created * by an app/service actor (mesh deploy, CLI app token), which have no human * owner (BOFF-6394). */ ownerUserId?: string | null; /** * Who inside the workspace can see and use this agent (BOFF-6394). * `PRIVATE` = the owner only, the default for a user-added agent. * `WORKSPACE` = every member with the matching permission. */ visibility?: 'PRIVATE' | 'WORKSPACE' | null; /** Structured tag assignments from wspace-tags-svc, populated by list queries. */ tagAssignments?: AgentTagAssignment[]; /** * Live deep-health probe error message when the agent is reachable * but reports a degraded component (ttyd/tunnel/session). Populated * from `vibecontrolsAgentHealthProbes` in the list query, surfaced * as a tooltip on the status badge so operators can see *why* the * badge isn't green. */ healthError?: string | null; } export interface AgentFilter { workspaceId?: string; isActive?: boolean; status?: AgentStatus; platform?: string; search?: string; } export interface CreateAgentInput { workspaceId: string; name: string; hostname: string; platform: string; architecture: string; version: string; tunnelUrl?: string; /** * Operator-input long-lived API key — only used by the Add-Agent * wizard (CreateAgentInput → addVibecontrolsAgentFromTunnel). The * deprecated `agentApiKey` field on `VibecontrolsAgent` was dropped * by the svc; reads must use `vibecontrolsAgentSecretReveal` or * `mintAgentCapability` instead. */ agentApiKey?: string; configuration?: Record; capabilities?: string[]; metadata?: Record; } export interface UpdateAgentInput { name?: string; tunnelUrl?: string; aiContext?: string | null; configuration?: Record; capabilities?: string[]; metadata?: Record; }