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.
JavaScript 3d-generationai-agentsanimationavatardigital-humangenerative-aiglbgltfimage-to-3dllmmcpmcp-servermodel-context-protocolsolanatext-to-3dthreejsweb-componentswebglwebxrx402
feat(agenc): export the AgenCError alias the README tells callers to catch
nirholas41ce7713c731
diff --git a/packages/agenc/src/index.d.ts b/packages/agenc/src/index.d.tsindex ab9e95a9d..5993e1295 100644--- a/packages/agenc/src/index.d.ts+++ b/packages/agenc/src/index.d.ts@@ -13,6 +13,9 @@ export declare class PaymentRequiredError extends ThreeWsError {accepts: unknown | null;}+/** Ergonomic alias for ThreeWsError, matching the README's error reference. */+export declare const AgenCError: typeof ThreeWsError;+export declare const DEFAULT_BASE_URL: string;export type Cluster = 'mainnet' | 'devnet';diff --git a/packages/agenc/src/index.js b/packages/agenc/src/index.jsindex f40bbc028..7428bbf34 100644--- a/packages/agenc/src/index.js+++ b/packages/agenc/src/index.js@@ -8,6 +8,11 @@ import { createHttp, ThreeWsError } from './http.js';export { ThreeWsError, PaymentRequiredError, DEFAULT_BASE_URL } from './http.js';+// The README documents reads that reject with a typed `AgenCError` carrying a+// `.code`. That is the platform's shared ThreeWsError under an ergonomic name,+// re-exported so `instanceof AgenCError` and `instanceof ThreeWsError` both hold.+export { ThreeWsError as AgenCError } from './http.js';+const CLUSTERS = ['mainnet', 'devnet'];// Base58 alphabet (no 0, O, I, l). The bridge ultimately validates pubkeys, butdiff --git a/packages/agenc/test/agenc.test.js b/packages/agenc/test/agenc.test.jsindex 698d0d454..a9505de85 100644--- a/packages/agenc/test/agenc.test.js+++ b/packages/agenc/test/agenc.test.js@@ -1,6 +1,6 @@import { test } from 'node:test';import assert from 'node:assert/strict';-import { createAgenc, ThreeWsError } from '../src/index.js';+import { createAgenc, ThreeWsError, AgenCError } from '../src/index.js';// A scripted fetch double: each call shifts the next queued response and records// the request. No network, no real endpoints — we assert on request shaping and@@ -171,6 +171,7 @@ test('a 404 from the bridge surfaces as a typed not_found ThreeWsError', async (const client = createAgenc({ fetch });await assert.rejects(() => client.getTask('TaskPdaMissing1111111111111111111111111111'), (e) => {assert.ok(e instanceof ThreeWsError);+ assert.ok(e instanceof AgenCError, 'the README-documented AgenCError alias must match thrown errors');assert.equal(e.code, 'not_found');assert.equal(e.status, 404);return true;