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.

490 B
Raw Blame
export async function resolve(specifier, context, nextResolve) {
  try {
    return await nextResolve(specifier, context)
  } catch (error) {
    if (!shouldRetryWithTypeScriptExtension(specifier, error)) throw error
    return nextResolve(`${specifier}.ts`, context)
  }
}

function shouldRetryWithTypeScriptExtension(specifier, error) {
  return error?.code === 'ERR_MODULE_NOT_FOUND'
    && (specifier.startsWith('./') || specifier.startsWith('../'))
    && !specifier.endsWith('.ts')
}