Skip to content

armgit / pibot

Public Imported from GitHub
0

Open-source, local-first AI agent team for your desktop: multi-agent group chats, computer use, browser, MCP, routines and approvals. macOS, Windows, Linux + Android. Built on pi.

339 B
Raw Blame
import type { TranslationKey } from "@pibot/i18n";
import type { Peer } from "../../rpc/context.ts";
export class SetupError extends Error {
  constructor(readonly key: TranslationKey) {
    super(key);
  }
}

export function requirePeer(peer: Peer | null): Peer {
  if (!peer) throw new SetupError("setup.disconnected");
  return peer;
}