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.

1.1 KB
Raw Blame
-- VRoid Hub import (work order 092-partners-09): a new avatars.source value
-- so an avatar pulled in through /import/vroid carries clear provenance,
-- same pattern as 'readyplayer', 'forge' and 'fork' before it. The license
-- fields and creator credit live in source_meta (jsonb), not new columns:
-- the shape already varies by provider (see api/_lib/vroid/license.js) and
-- jsonb is where every other provider's import metadata already lives.

-- Databases without avatars_source_check already accept any source value, so
-- the constraint is only widened where it exists.
DO $$
BEGIN
    IF EXISTS (SELECT 1 FROM pg_constraint
               WHERE conrelid = 'avatars'::regclass AND conname = 'avatars_source_check') THEN
        ALTER TABLE avatars
            DROP CONSTRAINT avatars_source_check,
            ADD CONSTRAINT avatars_source_check
            CHECK (source = ANY (ARRAY[
                'upload', 'avaturn', 'readyplayer', 'import',
                'direct-upload', 'reconstruct', 'studio', 'forge', 'fork', 'vroid_hub'
            ]));
    END IF;
END $$;