Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

778 B
Raw Blame
// Tiny structured logger: one line per event, scoped, with an ISO timestamp.
type Level = 'info' | 'warn' | 'error';

function line(level: Level, scope: string, msg: string, extra?: unknown): void {
  const tail = extra === undefined ? '' : ` ${extra instanceof Error ? extra.message : JSON.stringify(extra)}`;
  const out = `${new Date().toISOString()} ${level.toUpperCase().padEnd(5)} [${scope}] ${msg}${tail}`;
  if (level === 'info') console.log(out);
  else console.error(out);
}

export function logger(scope: string) {
  return {
    info: (msg: string, extra?: unknown) => line('info', scope, msg, extra),
    warn: (msg: string, extra?: unknown) => line('warn', scope, msg, extra),
    error: (msg: string, extra?: unknown) => line('error', scope, msg, extra),
  };
}