Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

416 B
Raw Blame
declare global {
  var __clients: Record<string, any>;
  var __mockClient: typeof registerClient;
}

/** During development and E2E testing, allow clients to be mocked/replaced */
export function registerClient<T>(key: string, cli: T) {
  if (import.meta.env.DEV) {
    globalThis.__clients ??= {};
    globalThis.__clients[key] = cli;
  }
}

if (import.meta.env.DEV) {
  globalThis.__mockClient = registerClient;
}