Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

843 B
Raw Blame
import type { ApiContextType, VibeAgentBrief } from '../../context/ApiContext';

export async function loadHarnessAgentCatalog(
  api: Pick<ApiContextType, 'listVibeAgents'>,
): Promise<Record<string, VibeAgentBrief>> {
  const result = await api.listVibeAgents({
    includeDisabled: true,
    includeArchived: true,
    cache: false,
  });
  return Object.fromEntries(result.agents.map((agent) => [agent.name, agent]));
}

/** How a run names its Agent: the Agent's own display name, else the raw name it
 *  was dispatched under, else an em dash. An Agent renamed or archived after the
 *  run still reads back under the name the run actually used. */
export function agentDisplayName(
  agentName: string | null | undefined,
  agent?: Pick<VibeAgentBrief, 'display_name'>,
): string {
  return agent?.display_name || agentName || '—';
}