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.

feat(plugins): compatible plugin marketplace schema

nirholase56a4839a856
diff --git a/api/_lib/schema.sql b/api/_lib/schema.sql
index 9704edd0b..652cfb22d 100644
--- a/api/_lib/schema.sql
+++ b/api/_lib/schema.sql
@@ -924,3 +924,37 @@ create table if not exists gate_nonces (
create index if not exists gate_nonces_expiry on gate_nonces(expires_at);
create index if not exists gate_nonces_gate_id on gate_nonces(gate_id);
+
+-- ── plugins — LobeHub/pai-chat compatible plugin marketplace ─────────────────
+-- manifest_json matches ToolManifest from pai-chat:
+-- { identifier, meta:{title,...}, api[], systemRole?, type?, settings?, ... }
+create table if not exists plugins (
+ id uuid primary key default gen_random_uuid(),
+ author_id uuid references users(id) on delete set null,
+ identifier text not null,
+ manifest_url text,
+ manifest_json jsonb not null,
+ name text not null,
+ description text not null default '',
+ category text not null default 'tools',
+ tags text[] not null default '{}',
+ is_public boolean not null default true,
+ install_count integer not null default 0,
+ avg_rating numeric(3,2) not null default 0,
+ rating_count integer not null default 0,
+ deleted_at timestamptz,
+ created_at timestamptz not null default now(),
+ updated_at timestamptz not null default now(),
+ unique (identifier, author_id)
+);
+
+create index if not exists plugins_category_idx on plugins(category);
+create index if not exists plugins_author_idx on plugins(author_id);
+create index if not exists plugins_popular_idx on plugins(install_count desc);
+create index if not exists plugins_new_idx on plugins(created_at desc);
+create index if not exists plugins_identifier_idx on plugins(identifier);
+
+do $$ begin
+ create trigger plugins_set_updated_at before update on plugins
+ for each row execute function set_updated_at();
+exception when duplicate_object then null; end $$;
diff --git a/publish/agent-3d.js b/publish/agent-3d.js
index 1fda16536..5530b6855 100644
--- a/publish/agent-3d.js
+++ b/publish/agent-3d.js
@@ -48031,6 +48031,10 @@ const ZL = `
text-shadow: none;
}
`;
+function _parsePx(val) {
+ const n = parseFloat(val);
+ return n > 0 && typeof val === "string" && val.trim().endsWith("px") ? n : 0;
+}
class c_ extends HTMLElement {
static get observedAttributes() {
return [