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
refactor: update avatar-related styles and animations in home.css
nirholas933aaf423d05
diff --git a/.env.example b/.env.exampleindex 37283d21d..08edeeb3c 100644--- a/.env.example+++ b/.env.example@@ -4,7 +4,7 @@# ────────────────────────────────────────────────────────────────────────────# Public site origin (no trailing slash)-PUBLIC_APP_ORIGIN=https://3dagent.vercel.app+PUBLIC_APP_ORIGIN=https://three.ws# Postgres (Neon serverless driver — HTTPS connection string)DATABASE_URL=postgres://user:[email protected]/neondb?sslmode=requirediff --git a/assets/demo.svg b/assets/demo.svgindex 5f95641ab..8a85b7b3f 100644--- a/assets/demo.svg+++ b/assets/demo.svg@@ -115,5 +115,5 @@<text x="544" y="210" text-anchor="middle" font-family="SF Mono, Fira Code, monospace" font-size="8" fill="#2d3748" letter-spacing="2">dat.gui · three.js</text><!-- Bottom label -->- <text x="360" y="214" text-anchor="middle" font-family="SF Pro Text, Inter, sans-serif" font-size="9" fill="#2d3748" letter-spacing="1">live at 3dagent.vercel.app · 100% client-side · your files never leave your browser</text>+ <text x="360" y="214" text-anchor="middle" font-family="SF Pro Text, Inter, sans-serif" font-size="9" fill="#2d3748" letter-spacing="1">live at three.ws · 100% client-side · your files never leave your browser</text></svg>diff --git a/assets/tutorial-steps.svg b/assets/tutorial-steps.svgindex 6ac150971..ea964577d 100644--- a/assets/tutorial-steps.svg+++ b/assets/tutorial-steps.svg@@ -1,7 +1,7 @@<svg xmlns="http://www.w3.org/2000/svg" width="500" height="80" viewBox="0 0 500 80"><rect width="500" height="80" rx="10" fill="#0d0d14"/><text x="30" y="36" font-family="Inter, sans-serif" font-size="22" fill="#00d2ff">①</text>- <text x="60" y="36" font-family="Inter, sans-serif" font-size="13" fill="#ccc">Open 3dagent.vercel.app</text>+ <text x="60" y="36" font-family="Inter, sans-serif" font-size="13" fill="#ccc">Open three.ws</text><text x="200" y="36" font-family="Inter, sans-serif" font-size="22" fill="#7b2ff7">②</text><text x="230" y="36" font-family="Inter, sans-serif" font-size="13" fill="#ccc">Drop .glb file</text><text x="370" y="36" font-family="Inter, sans-serif" font-size="22" fill="#ff0080">③</text>diff --git a/dist-artifact/.well-known/openapi.yaml b/dist-artifact/.well-known/openapi.yamlindex 8f11e9580..279879ac0 100644--- a/dist-artifact/.well-known/openapi.yaml+++ b/dist-artifact/.well-known/openapi.yaml@@ -14,7 +14,7 @@ info:url: https://opensource.org/licenses/MITservers:- - url: https://3dagent.vercel.app+ - url: https://three.wstags:- name: Authdiff --git a/dist-artifact/.well-known/security.txt b/dist-artifact/.well-known/security.txtindex 7cb43dc04..f72a291c0 100644--- a/dist-artifact/.well-known/security.txt+++ b/dist-artifact/.well-known/security.txt@@ -1,4 +1,4 @@-# Security policy for 3dagent.vercel.app+# Security policy for three.ws# https://securitytxt.org/Contact: mailto:[email protected]diff --git a/dist-lib/.well-known/agent-card.json b/dist-lib/.well-known/agent-card.jsonindex 5e37d09e8..145a9920b 100644--- a/dist-lib/.well-known/agent-card.json+++ b/dist-lib/.well-known/agent-card.json@@ -1,10 +1,10 @@{"name": "three.ws","description": "AI-powered 3D model viewer and validation agent. Load glTF/GLB models, run validation, inspect materials, and manage avatar assets.",- "url": "https://3dagent.vercel.app",+ "url": "https://three.ws","provider": {"organization": "three.ws",- "url": "https://3dagent.vercel.app"+ "url": "https://three.ws"},"version": "1.5.1","capabilities": {diff --git a/dist-lib/.well-known/lobehub-plugin.json b/dist-lib/.well-known/lobehub-plugin.jsonindex ec99c7da0..85045faf3 100644--- a/dist-lib/.well-known/lobehub-plugin.json+++ b/dist-lib/.well-known/lobehub-plugin.json@@ -4,7 +4,7 @@"version": "1.0.0","author": "three.ws","createdAt": "2026-04-17",- "homepage": "https://3dagent.vercel.app",+ "homepage": "https://three.ws","meta": {"title": "three.ws","description": "Embed any on-chain or off-chain three.ws as an embodied avatar inside your chat.",diff --git a/dist-lib/.well-known/openapi.yaml b/dist-lib/.well-known/openapi.yamlindex 33cab9d3c..58dd99826 100644--- a/dist-lib/.well-known/openapi.yaml+++ b/dist-lib/.well-known/openapi.yaml@@ -14,7 +14,7 @@ info:url: https://opensource.org/licenses/MITservers:- - url: https://3dagent.vercel.app+ - url: https://three.wstags:- name: Authdiff --git a/dist-lib/.well-known/security.txt b/dist-lib/.well-known/security.txtindex 7cb43dc04..f72a291c0 100644--- a/dist-lib/.well-known/security.txt+++ b/dist-lib/.well-known/security.txt@@ -1,4 +1,4 @@-# Security policy for 3dagent.vercel.app+# Security policy for three.ws# https://securitytxt.org/Contact: mailto:[email protected]diff --git a/dist-lib/agent-3d.js b/dist-lib/agent-3d.jsindex b28ebaaae..43db5cf89 100644--- a/dist-lib/agent-3d.js+++ b/dist-lib/agent-3d.js@@ -51355,7 +51355,7 @@ class ny extends HTMLElement {);return;}- const d = ["3dagent.vercel.app", "localhost"], f = window.location.origin;+ const d = ["three.ws", "localhost"], f = window.location.origin;if (!f.startsWith("http://localhost") && !IP(f, u, d)) {this._fail("embed_denied_origin",diff --git a/dist-lib/agent-3d.umd.cjs b/dist-lib/agent-3d.umd.cjsindex 120d699a1..1e108d36a 100644--- a/dist-lib/agent-3d.umd.cjs+++ b/dist-lib/agent-3d.umd.cjs@@ -4189,7 +4189,7 @@ ${this.instructions}padding: 16px;font: 14px var(--agent-chat-font);}-`;class Gp extends HTMLElement{static get observedAttributes(){return["src","manifest","body","agent-id","mode","position","width","height","voice","api-key","key-proxy","responsive"]}constructor(){super(),this.attachShadow({mode:"open"}),this._viewer=null,this._scene=null,this._runtime=null,this._memory=null,this._skills=null,this._manifest=null,this._mounted=!1,this._booting=!1,this._listening=!1,this._pillActive=!1,this._mqNarrow=null,this._mqNarrowHandler=null,this._ro=null,this._outsideTapHandler=null,this._autoResolvedManifest=!1,this._suppressAttrChange=!1}connectedCallback(){this._renderShell(),this._applyLayout(),this._setupResponsive(),this._observeViewport(),this.hasAttribute("eager")&&this._boot()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){!this._mounted||this._suppressAttrChange||(["mode","position","width","height","responsive"].includes(e)&&this._applyLayout(),["src","manifest","body","agent-id"].includes(e)&&(this._teardown(),this._boot()))}_renderShell(){const e=document.createElement("style");e.textContent=G2,this.shadowRoot.appendChild(e);const t=document.createElement("div");t.className="stage",t.part="stage",this.shadowRoot.appendChild(t),this._stageEl=t;const n=document.createElement("div");n.className="poster",this.getAttribute("poster")&&(n.style.backgroundImage=`url(${this.getAttribute("poster")})`),this.shadowRoot.appendChild(n),this._posterEl=n;const s=document.createElement("div");s.className="loading",s.textContent="Loading...",s.hidden=!0,this.shadowRoot.appendChild(s),this._loadingEl=s;const r=document.createElement("button");r.className="pill-btn",r.setAttribute("aria-label","Open agent"),r.addEventListener("click",()=>this._expandPill()),r.addEventListener("keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this._expandPill())}),this.shadowRoot.appendChild(r),this._pillBtn=r;const a=document.createElement("div");if(a.className="pill-drag",this.shadowRoot.appendChild(a),this._pillDrag=a,!this.hasAttribute("kiosk")){const o=document.createElement("div");o.className="chrome",o.part="chrome";const c=document.createElement("div");c.className="chat",c.part="chat";const l=document.createElement("div");l.className="input-row";const h=document.createElement("input");h.type="text",h.placeholder="Say something...",h.addEventListener("keydown",d=>{if(d.key==="Enter"&&h.value.trim()){const f=h.value.trim();h.value="",this.say(f)}});const u=document.createElement("button");u.className="icon mic",u.title="Push to talk",u.innerHTML="🎙",u.addEventListener("click",()=>this._toggleMic()),l.appendChild(h),l.appendChild(u),o.appendChild(c),o.appendChild(l),this.shadowRoot.appendChild(o),this._chatEl=c,this._inputEl=h,this._micEl=u}}_isResponsive(){return this.getAttribute("responsive")!=="false"}_clampWidth(e){const t=_parsePx(e);if(!t)return e;const n=Math.round(Math.max(160,t*.65)),s=Math.round(t/1440*100);return`clamp(${n}px, ${s}vw, ${t}px)`}_clampHeight(e){const t=_parsePx(e);if(!t)return e;const n=Math.round(Math.max(200,t*.65)),s=Math.round(t/900*100);return`clamp(${n}px, ${s}vh, ${t}px)`}_applyLayout(){const e=this.getAttribute("mode")||"inline";if(!O2.includes(e))return;const t=this._isResponsive();if(e==="floating"){if(!this._pillActive){const r=this.getAttribute("position")||"bottom-right",a=(this.getAttribute("offset")||"24px 24px").split(/\s+/),[o,c]=[a[0],a[1]||a[0]];this.style.top=this.style.bottom=this.style.left=this.style.right="",r.includes("top")?this.style.top=o:this.style.bottom=o,r.includes("left")?this.style.left=c:r.includes("right")?this.style.right=c:r.includes("center")&&(this.style.left="50%",this.style.transform="translateX(-50%)")}const n=this.getAttribute("width")||"320px",s=this.getAttribute("height")||"420px";this.style.setProperty("--agent-width",t?this._clampWidth(n):n),this.style.setProperty("--agent-height",t?this._clampHeight(s):s)}else{this.style.top=this.style.bottom=this.style.left=this.style.right=this.style.transform="";const n=this.getAttribute("width"),s=this.getAttribute("height");e==="inline"&&(n&&(this.style.width=t?this._clampWidth(n):n),s?(this.style.height=s,this.removeAttribute("data-responsive")):t&&n&&(this.style.height="",this.setAttribute("data-responsive",""))),n&&this.style.setProperty("--agent-width",t?this._clampWidth(n):n),s&&this.style.setProperty("--agent-height",t?this._clampHeight(s):s)}}_setupResponsive(){const e=this.getAttribute("mode")||"inline";e==="inline"&&typeof ResizeObserver<"u"&&(this._ro=new ResizeObserver(()=>this._applyLayout()),this._ro.observe(this)),e==="floating"&&this._isResponsive()&&typeof window<"u"&&(this._mqNarrow=window.matchMedia("(max-width: 479px)"),this._mqNarrowHandler=n=>this._updatePillState(n.matches),this._mqNarrow.addEventListener("change",this._mqNarrowHandler),this._updatePillState(this._mqNarrow.matches));let t=0;this.shadowRoot.addEventListener("touchstart",n=>{t=n.touches[0].clientY},{passive:!0}),this.shadowRoot.addEventListener("touchend",n=>{n.changedTouches[0].clientY-t>60&&this._pillActive&&this.getAttribute("aria-expanded")==="true"&&this._collapsePill()},{passive:!0})}_updatePillState(e){e&&!this._pillActive?(this._pillActive=!0,this._collapsePill()):!e&&this._pillActive&&(this._pillActive=!1,this._restoreFromPill())}_collapsePill(){this.style.width="56px",this.style.height="56px",this.style.borderRadius="50%",this.setAttribute("aria-expanded","false"),this._pillBtn.style.display="block",this._pillDrag.style.display="none";const e=this.shadowRoot.querySelector(".chrome");e&&(e.style.display="none"),this._stageEl.style.display="none",this._outsideTapHandler&&(document.removeEventListener("pointerdown",this._outsideTapHandler),this._outsideTapHandler=null)}_expandPill(){if(!this._pillActive)return;this.style.width="100vw",this.style.height="70vh",this.style.borderRadius="16px 16px 0 0",this.style.bottom="0",this.style.top="auto",this.style.left="0",this.style.right="0",this.style.transform="none",this.setAttribute("aria-expanded","true"),this._pillBtn.style.display="none",this._pillDrag.style.display="block";const e=this.shadowRoot.querySelector(".chrome");e&&(e.style.display=""),this._stageEl.style.display="",this._outsideTapHandler=t=>{t.composedPath().includes(this)||this._collapsePill()},setTimeout(()=>document.addEventListener("pointerdown",this._outsideTapHandler),0)}_restoreFromPill(){this.removeAttribute("aria-expanded"),this._pillBtn.style.display="none",this._pillDrag.style.display="none";const e=this.shadowRoot.querySelector(".chrome");e&&(e.style.display=""),this._stageEl.style.display="",this.style.width=this.style.height=this.style.borderRadius="",this.style.bottom=this.style.top=this.style.left=this.style.right=this.style.transform="",this._applyLayout(),this._outsideTapHandler&&(document.removeEventListener("pointerdown",this._outsideTapHandler),this._outsideTapHandler=null)}_observeViewport(){if(!this.hasAttribute("eager")){if(typeof IntersectionObserver>"u"){this._boot();return}this._io=new IntersectionObserver(e=>{e.some(t=>t.isIntersecting)&&(this._io.disconnect(),this._boot())}),this._io.observe(this)}}async _boot(){if(!(this._booting||this._mounted)){this._booting=!0;try{this._loadingEl.hidden=!1,this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"manifest",pct:.1}}));const e=await this._resolveManifest();if(this._manifest=e,this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"manifest",pct:.3}})),typeof e.brain?.instructions=="string"&&e.brain.instructions.endsWith(".md")){const l=await ay(e,e.brain.instructions);l&&(e.instructions=H2(l))}else e.brain?.instructions&&(e.instructions=e.brain.instructions);const t=(()=>{const l=this.getAttribute("agent-id")||e.id?.agentId||"";return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(l)?l:null})();if(t)try{const l=uy||window.location.origin,h=await fetch(`${l}/api/agents/${t}/embed-policy`,{credentials:"omit"});if(h.ok){const{policy:u}=await h.json();if(u){if(u.surfaces?.script===!1){this._fail("embed_denied_surface","This agent disallows the script-tag embed.");return}const d=["3dagent.vercel.app","localhost"],f=window.location.origin;if(!f.startsWith("http://localhost")&&!Q2(f,u,d)){this._fail("embed_denied_origin",`This agent isn't permitted on ${f}.`);return}}}}catch(l){console.warn("[agent-3d] embed-policy fetch failed; continuing",l)}this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"body",pct:.45}}));const n=new Bf(this._stageEl,{kiosk:this.hasAttribute("kiosk")});this._viewer=n;const s=hs(e.body?.uri);s&&await n.load(s,"",new Map),this._scene=new $0(n),this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"memory",pct:.6}}));const r=e.id?.agentId||this.getAttribute("memory-key")||e.name||"anon";this._memory=await Bi.load({mode:this.getAttribute("memory")||e.memory?.mode||"local",namespace:r,manifestURI:e._baseURI+"manifest.json",fetchFn:fetch.bind(globalThis)}),this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"skills",pct:.75}})),this._skills=new ix({trust:this.getAttribute("skill-trust")||"owned-only",ownerAddress:e.id?.owner});const a=e.skills||[];for(const l of a)try{const h=await this._skills.install(l,{bundleBase:e._baseURI});this.dispatchEvent(new CustomEvent("skill:loaded",{detail:{name:h.name,uri:h.uri}}))}catch(h){console.warn("[agent-3d] skill load failed",l,h)}this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"brain",pct:.9}}));const o={apiKey:this.getAttribute("api-key")||void 0,proxyURL:this.getAttribute("key-proxy")||void 0,agentId:t||void 0,apiOrigin:uy||window.location.origin},c=this._parseTTSAttribute();c&&(e.voice=e.voice||{},e.voice.tts={...e.voice.tts||{},...c}),this._runtime=new Y0({manifest:e,viewer:this._scene,memory:this._memory,skills:this._skills,providerConfig:o});for(const l of["brain:thinking","brain:message","skill:tool-called","voice:speech-start","voice:speech-end","voice:transcript","voice:listen-start","memory:write"])this._runtime.addEventListener(l,h=>{this.dispatchEvent(new CustomEvent(l,{detail:h.detail,bubbles:!0,composed:!0})),l==="brain:message"&&this._chatEl&&this._renderMessage(h.detail)});this._mounted=!0,window!==window.parent&&(this._embedBridge=new P2({protocol:U2,manifest:this._manifest,window}),this._embedBridge.start()),this._loadingEl.hidden=!0,this._pillActive||(this._posterEl.style.opacity="0"),this.dispatchEvent(new CustomEvent("agent:ready",{detail:{agent:this,manifest:e},bubbles:!0,composed:!0}))}catch(e){if(console.error("[agent-3d] boot failed",e),this._loadingEl.hidden=!0,e instanceof Dn&&e.code==="not-found"){const t=document.createElement("div");t.className="agent-3d-error",t.textContent="Agent not found",this.shadowRoot.appendChild(t)}else this._showError(e);this.dispatchEvent(new CustomEvent("agent:error",{detail:{phase:"boot",error:e},bubbles:!0,composed:!0}))}finally{this._booting=!1}}}async _resolveManifest(){const e=this.getAttribute("src"),t=this.getAttribute("manifest"),n=this.getAttribute("body"),s=this.getAttribute("agent-id"),r=this.getAttribute("chain-id");if(e)return s&&console.warn("[agent-3d] both src and agent-id provided; using src"),Ec(e,{rpcURL:this.getAttribute("rpc-url"),registry:this.getAttribute("registry")});if(s){const a=r?{chainId:Number(r),agentId:s,registry:this.getAttribute("registry")||void 0}:s,o=cy(a);if(o){const l=await F2(o);if(l.error&&!l.glbUrl)throw new Error(`On-chain resolve failed: ${l.error}`);return N2(l)}if(t)return Ec(t);const c=await C2(s);return c?(this._autoResolvedManifest=!0,this.setAttribute("manifest",c),Ec(c)):I2(s)}if(t)return Ec(t);if(n){const a=this.getAttribute("instructions");return{spec:"agent-manifest/0.1",_baseURI:"",name:this.getAttribute("name")||"Agent",body:{uri:n,format:"gltf-binary"},brain:{provider:this.getAttribute("brain")?"anthropic":"none",model:this.getAttribute("brain")||void 0,instructions:a||"You are an embodied three.ws."},instructions:a||"You are an embodied three.ws.",voice:{tts:{provider:"browser"},stt:{provider:"browser"}},skills:(this.getAttribute("skills")||"").split(",").map(o=>o.trim()).filter(Boolean).map(o=>({uri:o})),memory:{mode:this.getAttribute("memory")||"local"},tools:["wave","lookAt","play_clip","setExpression","speak","remember"],version:"0.1.0"}}throw new Error("<agent-3d> requires src=, manifest=, or body= attribute")}_renderMessage({role:e,content:t}){if(!this._chatEl||!t)return;const n=document.createElement("div");n.className="msg",n.innerHTML=`<div class="role">${e}</div><div class="body"></div>`,n.querySelector(".body").textContent=t,this._chatEl.appendChild(n),this._chatEl.scrollTop=this._chatEl.scrollHeight}_showError(e){const t=document.createElement("div");t.className="error",t.textContent=`Couldn't load agent: ${e.message||e}`,this.shadowRoot.appendChild(t)}_fail(e,t){this._loadingEl.hidden=!0;const n=document.createElement("div");n.className="error",n.textContent=t,this.shadowRoot.appendChild(n),this.dispatchEvent(new CustomEvent("agent:error",{detail:{phase:"policy",error:{code:e,message:t}},bubbles:!0,composed:!0}))}async _toggleMic(){if(this._runtime){if(this._listening){this._runtime.stt?.stop(),this._listening=!1,this._micEl.dataset.listening="false";return}this._listening=!0,this._micEl.dataset.listening="true";try{const e=await this._runtime.listen();e&&await this.say(e,{voice:!0})}catch(e){console.warn("[agent-3d] listen failed",e)}finally{this._listening=!1,this._micEl.dataset.listening="false"}}}_teardown(){if(this._autoResolvedManifest){this._suppressAttrChange=!0;try{this.removeAttribute("manifest")}finally{this._suppressAttrChange=!1}this._autoResolvedManifest=!1}try{this._io?.disconnect()}catch{}try{this._ro?.disconnect()}catch{}try{this._mqNarrow&&this._mqNarrowHandler&&this._mqNarrow.removeEventListener("change",this._mqNarrowHandler)}catch{}this._outsideTapHandler&&(document.removeEventListener("pointerdown",this._outsideTapHandler),this._outsideTapHandler=null),this._embedBridge?.stop(),this._embedBridge=null;try{this._runtime?.destroy()}catch{}try{this._viewer?.dispose?.()}catch{}this._mounted=!1,this._pillActive=!1,this._runtime=this._viewer=this._scene=this._memory=this._skills=null}async say(e,t={}){return this._runtime||await this._waitForReady(),this._runtime.send(e,{voice:t.voice??this.hasAttribute("voice")})}speak(e,t={}){const n=Math.max(1.5,(e?.split(" ").length??3)*.3),s=this._scene;s&&(s.playAnimationByHint("talk",{duration:n})||s.playAnimationByHint("yes",{duration:n})||s.playAnimationByHint("wave",{duration:n}))}async ask(e,t={}){return(await this.say(e,t))?.text||""}clearConversation(){this._runtime?.clearConversation()}async wave(e){return this._scene?.playAnimationByHint("wave",e)}async lookAt(e){return this._scene?.lookAt(e)}async play(e,t){return this._scene?.playClipByName(e,t)}async installSkill(e){if(!this._skills)throw new Error("Agent not mounted");return this._skills.install({uri:e})}uninstallSkill(e){return this._skills?.uninstall(e)}get skills(){return this._skills?.all()||[]}get memory(){return this._memory}get manifest(){return this._manifest}get runtime(){return this._runtime}setMode(e){this.setAttribute("mode",e)}setPosition(e,t){this.setAttribute("position",e),t&&this.setAttribute("offset",t)}setSize(e,t){this.setAttribute("width",e),this.setAttribute("height",t)}pause(){this._runtime?.pause()}resume(){}destroy(){this._teardown()}_waitForReady(){return this._mounted?Promise.resolve():new Promise(e=>{const t=()=>{this.removeEventListener("agent:ready",t),e()};this.addEventListener("agent:ready",t),this._booting||this._boot()})}}function H2(i){const e=i.match(/^---\n[\s\S]*?\n---\n?([\s\S]*)$/);return e?e[1]:i}customElements.get("agent-3d")||customElements.define("agent-3d",Gp);const z2=["row","circle","freeform"],V2=`+`;class Gp extends HTMLElement{static get observedAttributes(){return["src","manifest","body","agent-id","mode","position","width","height","voice","api-key","key-proxy","responsive"]}constructor(){super(),this.attachShadow({mode:"open"}),this._viewer=null,this._scene=null,this._runtime=null,this._memory=null,this._skills=null,this._manifest=null,this._mounted=!1,this._booting=!1,this._listening=!1,this._pillActive=!1,this._mqNarrow=null,this._mqNarrowHandler=null,this._ro=null,this._outsideTapHandler=null,this._autoResolvedManifest=!1,this._suppressAttrChange=!1}connectedCallback(){this._renderShell(),this._applyLayout(),this._setupResponsive(),this._observeViewport(),this.hasAttribute("eager")&&this._boot()}disconnectedCallback(){this._teardown()}attributeChangedCallback(e,t,n){!this._mounted||this._suppressAttrChange||(["mode","position","width","height","responsive"].includes(e)&&this._applyLayout(),["src","manifest","body","agent-id"].includes(e)&&(this._teardown(),this._boot()))}_renderShell(){const e=document.createElement("style");e.textContent=G2,this.shadowRoot.appendChild(e);const t=document.createElement("div");t.className="stage",t.part="stage",this.shadowRoot.appendChild(t),this._stageEl=t;const n=document.createElement("div");n.className="poster",this.getAttribute("poster")&&(n.style.backgroundImage=`url(${this.getAttribute("poster")})`),this.shadowRoot.appendChild(n),this._posterEl=n;const s=document.createElement("div");s.className="loading",s.textContent="Loading...",s.hidden=!0,this.shadowRoot.appendChild(s),this._loadingEl=s;const r=document.createElement("button");r.className="pill-btn",r.setAttribute("aria-label","Open agent"),r.addEventListener("click",()=>this._expandPill()),r.addEventListener("keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),this._expandPill())}),this.shadowRoot.appendChild(r),this._pillBtn=r;const a=document.createElement("div");if(a.className="pill-drag",this.shadowRoot.appendChild(a),this._pillDrag=a,!this.hasAttribute("kiosk")){const o=document.createElement("div");o.className="chrome",o.part="chrome";const c=document.createElement("div");c.className="chat",c.part="chat";const l=document.createElement("div");l.className="input-row";const h=document.createElement("input");h.type="text",h.placeholder="Say something...",h.addEventListener("keydown",d=>{if(d.key==="Enter"&&h.value.trim()){const f=h.value.trim();h.value="",this.say(f)}});const u=document.createElement("button");u.className="icon mic",u.title="Push to talk",u.innerHTML="🎙",u.addEventListener("click",()=>this._toggleMic()),l.appendChild(h),l.appendChild(u),o.appendChild(c),o.appendChild(l),this.shadowRoot.appendChild(o),this._chatEl=c,this._inputEl=h,this._micEl=u}}_isResponsive(){return this.getAttribute("responsive")!=="false"}_clampWidth(e){const t=_parsePx(e);if(!t)return e;const n=Math.round(Math.max(160,t*.65)),s=Math.round(t/1440*100);return`clamp(${n}px, ${s}vw, ${t}px)`}_clampHeight(e){const t=_parsePx(e);if(!t)return e;const n=Math.round(Math.max(200,t*.65)),s=Math.round(t/900*100);return`clamp(${n}px, ${s}vh, ${t}px)`}_applyLayout(){const e=this.getAttribute("mode")||"inline";if(!O2.includes(e))return;const t=this._isResponsive();if(e==="floating"){if(!this._pillActive){const r=this.getAttribute("position")||"bottom-right",a=(this.getAttribute("offset")||"24px 24px").split(/\s+/),[o,c]=[a[0],a[1]||a[0]];this.style.top=this.style.bottom=this.style.left=this.style.right="",r.includes("top")?this.style.top=o:this.style.bottom=o,r.includes("left")?this.style.left=c:r.includes("right")?this.style.right=c:r.includes("center")&&(this.style.left="50%",this.style.transform="translateX(-50%)")}const n=this.getAttribute("width")||"320px",s=this.getAttribute("height")||"420px";this.style.setProperty("--agent-width",t?this._clampWidth(n):n),this.style.setProperty("--agent-height",t?this._clampHeight(s):s)}else{this.style.top=this.style.bottom=this.style.left=this.style.right=this.style.transform="";const n=this.getAttribute("width"),s=this.getAttribute("height");e==="inline"&&(n&&(this.style.width=t?this._clampWidth(n):n),s?(this.style.height=s,this.removeAttribute("data-responsive")):t&&n&&(this.style.height="",this.setAttribute("data-responsive",""))),n&&this.style.setProperty("--agent-width",t?this._clampWidth(n):n),s&&this.style.setProperty("--agent-height",t?this._clampHeight(s):s)}}_setupResponsive(){const e=this.getAttribute("mode")||"inline";e==="inline"&&typeof ResizeObserver<"u"&&(this._ro=new ResizeObserver(()=>this._applyLayout()),this._ro.observe(this)),e==="floating"&&this._isResponsive()&&typeof window<"u"&&(this._mqNarrow=window.matchMedia("(max-width: 479px)"),this._mqNarrowHandler=n=>this._updatePillState(n.matches),this._mqNarrow.addEventListener("change",this._mqNarrowHandler),this._updatePillState(this._mqNarrow.matches));let t=0;this.shadowRoot.addEventListener("touchstart",n=>{t=n.touches[0].clientY},{passive:!0}),this.shadowRoot.addEventListener("touchend",n=>{n.changedTouches[0].clientY-t>60&&this._pillActive&&this.getAttribute("aria-expanded")==="true"&&this._collapsePill()},{passive:!0})}_updatePillState(e){e&&!this._pillActive?(this._pillActive=!0,this._collapsePill()):!e&&this._pillActive&&(this._pillActive=!1,this._restoreFromPill())}_collapsePill(){this.style.width="56px",this.style.height="56px",this.style.borderRadius="50%",this.setAttribute("aria-expanded","false"),this._pillBtn.style.display="block",this._pillDrag.style.display="none";const e=this.shadowRoot.querySelector(".chrome");e&&(e.style.display="none"),this._stageEl.style.display="none",this._outsideTapHandler&&(document.removeEventListener("pointerdown",this._outsideTapHandler),this._outsideTapHandler=null)}_expandPill(){if(!this._pillActive)return;this.style.width="100vw",this.style.height="70vh",this.style.borderRadius="16px 16px 0 0",this.style.bottom="0",this.style.top="auto",this.style.left="0",this.style.right="0",this.style.transform="none",this.setAttribute("aria-expanded","true"),this._pillBtn.style.display="none",this._pillDrag.style.display="block";const e=this.shadowRoot.querySelector(".chrome");e&&(e.style.display=""),this._stageEl.style.display="",this._outsideTapHandler=t=>{t.composedPath().includes(this)||this._collapsePill()},setTimeout(()=>document.addEventListener("pointerdown",this._outsideTapHandler),0)}_restoreFromPill(){this.removeAttribute("aria-expanded"),this._pillBtn.style.display="none",this._pillDrag.style.display="none";const e=this.shadowRoot.querySelector(".chrome");e&&(e.style.display=""),this._stageEl.style.display="",this.style.width=this.style.height=this.style.borderRadius="",this.style.bottom=this.style.top=this.style.left=this.style.right=this.style.transform="",this._applyLayout(),this._outsideTapHandler&&(document.removeEventListener("pointerdown",this._outsideTapHandler),this._outsideTapHandler=null)}_observeViewport(){if(!this.hasAttribute("eager")){if(typeof IntersectionObserver>"u"){this._boot();return}this._io=new IntersectionObserver(e=>{e.some(t=>t.isIntersecting)&&(this._io.disconnect(),this._boot())}),this._io.observe(this)}}async _boot(){if(!(this._booting||this._mounted)){this._booting=!0;try{this._loadingEl.hidden=!1,this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"manifest",pct:.1}}));const e=await this._resolveManifest();if(this._manifest=e,this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"manifest",pct:.3}})),typeof e.brain?.instructions=="string"&&e.brain.instructions.endsWith(".md")){const l=await ay(e,e.brain.instructions);l&&(e.instructions=H2(l))}else e.brain?.instructions&&(e.instructions=e.brain.instructions);const t=(()=>{const l=this.getAttribute("agent-id")||e.id?.agentId||"";return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(l)?l:null})();if(t)try{const l=uy||window.location.origin,h=await fetch(`${l}/api/agents/${t}/embed-policy`,{credentials:"omit"});if(h.ok){const{policy:u}=await h.json();if(u){if(u.surfaces?.script===!1){this._fail("embed_denied_surface","This agent disallows the script-tag embed.");return}const d=["three.ws","localhost"],f=window.location.origin;if(!f.startsWith("http://localhost")&&!Q2(f,u,d)){this._fail("embed_denied_origin",`This agent isn't permitted on ${f}.`);return}}}}catch(l){console.warn("[agent-3d] embed-policy fetch failed; continuing",l)}this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"body",pct:.45}}));const n=new Bf(this._stageEl,{kiosk:this.hasAttribute("kiosk")});this._viewer=n;const s=hs(e.body?.uri);s&&await n.load(s,"",new Map),this._scene=new $0(n),this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"memory",pct:.6}}));const r=e.id?.agentId||this.getAttribute("memory-key")||e.name||"anon";this._memory=await Bi.load({mode:this.getAttribute("memory")||e.memory?.mode||"local",namespace:r,manifestURI:e._baseURI+"manifest.json",fetchFn:fetch.bind(globalThis)}),this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"skills",pct:.75}})),this._skills=new ix({trust:this.getAttribute("skill-trust")||"owned-only",ownerAddress:e.id?.owner});const a=e.skills||[];for(const l of a)try{const h=await this._skills.install(l,{bundleBase:e._baseURI});this.dispatchEvent(new CustomEvent("skill:loaded",{detail:{name:h.name,uri:h.uri}}))}catch(h){console.warn("[agent-3d] skill load failed",l,h)}this.dispatchEvent(new CustomEvent("agent:load-progress",{detail:{phase:"brain",pct:.9}}));const o={apiKey:this.getAttribute("api-key")||void 0,proxyURL:this.getAttribute("key-proxy")||void 0,agentId:t||void 0,apiOrigin:uy||window.location.origin},c=this._parseTTSAttribute();c&&(e.voice=e.voice||{},e.voice.tts={...e.voice.tts||{},...c}),this._runtime=new Y0({manifest:e,viewer:this._scene,memory:this._memory,skills:this._skills,providerConfig:o});for(const l of["brain:thinking","brain:message","skill:tool-called","voice:speech-start","voice:speech-end","voice:transcript","voice:listen-start","memory:write"])this._runtime.addEventListener(l,h=>{this.dispatchEvent(new CustomEvent(l,{detail:h.detail,bubbles:!0,composed:!0})),l==="brain:message"&&this._chatEl&&this._renderMessage(h.detail)});this._mounted=!0,window!==window.parent&&(this._embedBridge=new P2({protocol:U2,manifest:this._manifest,window}),this._embedBridge.start()),this._loadingEl.hidden=!0,this._pillActive||(this._posterEl.style.opacity="0"),this.dispatchEvent(new CustomEvent("agent:ready",{detail:{agent:this,manifest:e},bubbles:!0,composed:!0}))}catch(e){if(console.error("[agent-3d] boot failed",e),this._loadingEl.hidden=!0,e instanceof Dn&&e.code==="not-found"){const t=document.createElement("div");t.className="agent-3d-error",t.textContent="Agent not found",this.shadowRoot.appendChild(t)}else this._showError(e);this.dispatchEvent(new CustomEvent("agent:error",{detail:{phase:"boot",error:e},bubbles:!0,composed:!0}))}finally{this._booting=!1}}}async _resolveManifest(){const e=this.getAttribute("src"),t=this.getAttribute("manifest"),n=this.getAttribute("body"),s=this.getAttribute("agent-id"),r=this.getAttribute("chain-id");if(e)return s&&console.warn("[agent-3d] both src and agent-id provided; using src"),Ec(e,{rpcURL:this.getAttribute("rpc-url"),registry:this.getAttribute("registry")});if(s){const a=r?{chainId:Number(r),agentId:s,registry:this.getAttribute("registry")||void 0}:s,o=cy(a);if(o){const l=await F2(o);if(l.error&&!l.glbUrl)throw new Error(`On-chain resolve failed: ${l.error}`);return N2(l)}if(t)return Ec(t);const c=await C2(s);return c?(this._autoResolvedManifest=!0,this.setAttribute("manifest",c),Ec(c)):I2(s)}if(t)return Ec(t);if(n){const a=this.getAttribute("instructions");return{spec:"agent-manifest/0.1",_baseURI:"",name:this.getAttribute("name")||"Agent",body:{uri:n,format:"gltf-binary"},brain:{provider:this.getAttribute("brain")?"anthropic":"none",model:this.getAttribute("brain")||void 0,instructions:a||"You are an embodied three.ws."},instructions:a||"You are an embodied three.ws.",voice:{tts:{provider:"browser"},stt:{provider:"browser"}},skills:(this.getAttribute("skills")||"").split(",").map(o=>o.trim()).filter(Boolean).map(o=>({uri:o})),memory:{mode:this.getAttribute("memory")||"local"},tools:["wave","lookAt","play_clip","setExpression","speak","remember"],version:"0.1.0"}}throw new Error("<agent-3d> requires src=, manifest=, or body= attribute")}_renderMessage({role:e,content:t}){if(!this._chatEl||!t)return;const n=document.createElement("div");n.className="msg",n.innerHTML=`<div class="role">${e}</div><div class="body"></div>`,n.querySelector(".body").textContent=t,this._chatEl.appendChild(n),this._chatEl.scrollTop=this._chatEl.scrollHeight}_showError(e){const t=document.createElement("div");t.className="error",t.textContent=`Couldn't load agent: ${e.message||e}`,this.shadowRoot.appendChild(t)}_fail(e,t){this._loadingEl.hidden=!0;const n=document.createElement("div");n.className="error",n.textContent=t,this.shadowRoot.appendChild(n),this.dispatchEvent(new CustomEvent("agent:error",{detail:{phase:"policy",error:{code:e,message:t}},bubbles:!0,composed:!0}))}async _toggleMic(){if(this._runtime){if(this._listening){this._runtime.stt?.stop(),this._listening=!1,this._micEl.dataset.listening="false";return}this._listening=!0,this._micEl.dataset.listening="true";try{const e=await this._runtime.listen();e&&await this.say(e,{voice:!0})}catch(e){console.warn("[agent-3d] listen failed",e)}finally{this._listening=!1,this._micEl.dataset.listening="false"}}}_teardown(){if(this._autoResolvedManifest){this._suppressAttrChange=!0;try{this.removeAttribute("manifest")}finally{this._suppressAttrChange=!1}this._autoResolvedManifest=!1}try{this._io?.disconnect()}catch{}try{this._ro?.disconnect()}catch{}try{this._mqNarrow&&this._mqNarrowHandler&&this._mqNarrow.removeEventListener("change",this._mqNarrowHandler)}catch{}this._outsideTapHandler&&(document.removeEventListener("pointerdown",this._outsideTapHandler),this._outsideTapHandler=null),this._embedBridge?.stop(),this._embedBridge=null;try{this._runtime?.destroy()}catch{}try{this._viewer?.dispose?.()}catch{}this._mounted=!1,this._pillActive=!1,this._runtime=this._viewer=this._scene=this._memory=this._skills=null}async say(e,t={}){return this._runtime||await this._waitForReady(),this._runtime.send(e,{voice:t.voice??this.hasAttribute("voice")})}speak(e,t={}){const n=Math.max(1.5,(e?.split(" ").length??3)*.3),s=this._scene;s&&(s.playAnimationByHint("talk",{duration:n})||s.playAnimationByHint("yes",{duration:n})||s.playAnimationByHint("wave",{duration:n}))}async ask(e,t={}){return(await this.say(e,t))?.text||""}clearConversation(){this._runtime?.clearConversation()}async wave(e){return this._scene?.playAnimationByHint("wave",e)}async lookAt(e){return this._scene?.lookAt(e)}async play(e,t){return this._scene?.playClipByName(e,t)}async installSkill(e){if(!this._skills)throw new Error("Agent not mounted");return this._skills.install({uri:e})}uninstallSkill(e){return this._skills?.uninstall(e)}get skills(){return this._skills?.all()||[]}get memory(){return this._memory}get manifest(){return this._manifest}get runtime(){return this._runtime}setMode(e){this.setAttribute("mode",e)}setPosition(e,t){this.setAttribute("position",e),t&&this.setAttribute("offset",t)}setSize(e,t){this.setAttribute("width",e),this.setAttribute("height",t)}pause(){this._runtime?.pause()}resume(){}destroy(){this._teardown()}_waitForReady(){return this._mounted?Promise.resolve():new Promise(e=>{const t=()=>{this.removeEventListener("agent:ready",t),e()};this.addEventListener("agent:ready",t),this._booting||this._boot()})}}function H2(i){const e=i.match(/^---\n[\s\S]*?\n---\n?([\s\S]*)$/);return e?e[1]:i}customElements.get("agent-3d")||customElements.define("agent-3d",Gp);const z2=["row","circle","freeform"],V2=`:host {display: block;position: relative;diff --git a/dist-lib/artifact-example.html b/dist-lib/artifact-example.htmlindex c38945fec..e19ce37be 100644--- a/dist-lib/artifact-example.html+++ b/dist-lib/artifact-example.html@@ -15,7 +15,7 @@</head><body><!--- Replace "demo" with your agent's ID from https://3dagent.vercel.app.+ Replace "demo" with your agent's ID from https://three.ws.The agent's avatar must have visibility set to "public" or "unlisted".--><div data-agent-id="demo" style="width: 100%; height: 100vh"></div>diff --git a/dist-lib/artifact.js b/dist-lib/artifact.jsindex bea1ebc0a..8d78dcd57 100644--- a/dist-lib/artifact.js+++ b/dist-lib/artifact.js@@ -6,7 +6,7 @@import * as THREE from 'https://esm.sh/[email protected]';import { GLTFLoader } from 'https://esm.sh/[email protected]/examples/jsm/loaders/GLTFLoader.js';-const BASE = 'https://3dagent.vercel.app';+const BASE = 'https://three.ws';const REDUCED = window.matchMedia('(prefers-reduced-motion: reduce)').matches;const CSS = `diff --git a/dist-lib/artifact/index.html b/dist-lib/artifact/index.htmlindex 2157721b7..d840cd026 100644--- a/dist-lib/artifact/index.html+++ b/dist-lib/artifact/index.html@@ -130,7 +130,7 @@</div><div class="viewer-frame">- <div id="agent3d" data-origin="https://3dagent.vercel.app"></div>+ <div id="agent3d" data-origin="https://three.ws"></div></div><div class="controls">diff --git a/dist-lib/artifact/snippet.html b/dist-lib/artifact/snippet.htmlindex ea12c807b..1bcfcb60b 100644--- a/dist-lib/artifact/snippet.html+++ b/dist-lib/artifact/snippet.html@@ -1,7 +1,7 @@<!-- Paste this into a Claude Artifact to embed a three.ws --><script src="https://three.wsartifact.js"></script>-<div id="agent3d" data-agent-id="your-agent-id-here" data-origin="https://3dagent.vercel.app"></div>+<div id="agent3d" data-agent-id="your-agent-id-here" data-origin="https://three.ws"></div><style>#agent3d {diff --git a/dist-lib/dashboard/dashboard.js b/dist-lib/dashboard/dashboard.jsindex 1dcbf647a..30e4cd9f8 100644--- a/dist-lib/dashboard/dashboard.js+++ b/dist-lib/dashboard/dashboard.js@@ -1775,7 +1775,7 @@ function openShareModal(w) {<pre id="m-snip" style="margin:0"></pre></div><div class="row" style="justify-content:space-between; margin-top:14px">- <a class="muted" style="font-size:12px" href="mailto:[email protected]?subject=Report+widget+${encodeURIComponent(w.id)}">Report this widget</a>+ <a class="muted" style="font-size:12px" href="mailto:[email protected]?subject=Report+widget+${encodeURIComponent(w.id)}">Report this widget</a><button class="btn sec" id="m-close" type="button">Close</button></div></div>diff --git a/dist-lib/docs-widgets.html b/dist-lib/docs-widgets.htmlindex 1dab3bf52..825083ed8 100644--- a/dist-lib/docs-widgets.html+++ b/dist-lib/docs-widgets.html@@ -167,7 +167,7 @@<h2 id="quick-start">Quick start</h2><ol>- <li>Sign in at <a href="/">3dagent.vercel.app</a>.</li>+ <li>Sign in at <a href="/">three.ws</a>.</li><li>Open the <a href="/studio">Studio</a>.</li><li>Pick an avatar, pick a widget type, tweak brand colors and controls, click@@ -348,7 +348,7 @@</table><pre><code>window.addEventListener('message', (e) => {- if (e.origin !== 'https://3dagent.vercel.app') return;+ if (e.origin !== 'https://three.ws') return;if (e.data?.type === 'widget:ready') {console.log('Widget mounted:', e.data.id);}@@ -396,8 +396,8 @@<code>autoplay</code>, <code>xr-spatial-tracking</code>,<code>clipboard-write</code>. If your site uses strict CSP, allow:</p>- <pre><code>frame-src https://3dagent.vercel.app;-img-src https://3dagent.vercel.app data:;</code></pre>+ <pre><code>frame-src https://three.ws;+img-src https://three.ws data:;</code></pre><h2 id="privacy">Privacy & analytics</h2><p>diff --git a/dist-lib/embed.js b/dist-lib/embed.jsindex 6fec4e671..c7de5457f 100644--- a/dist-lib/embed.js+++ b/dist-lib/embed.js@@ -20,7 +20,7 @@var ORIGIN = (function () {try { return new URL(document.currentScript.src).origin; }- catch (e) { return 'https://3dagent.vercel.app'; }+ catch (e) { return 'https://three.ws'; }})();function attr(el, name, fallback) {diff --git a/dist-lib/lib-YDDmj7TG.js b/dist-lib/lib-YDDmj7TG.jsindex e29449456..5ae4e797e 100644--- a/dist-lib/lib-YDDmj7TG.js+++ b/dist-lib/lib-YDDmj7TG.js@@ -50493,7 +50493,7 @@ class Av extends HTMLElement {);return;}- const d = ["3dagent.vercel.app", "localhost"], f = window.location.origin;+ const d = ["three.ws", "localhost"], f = window.location.origin;if (!f.startsWith("http://localhost") && !RD(f, h, d)) {this._fail("embed_denied_origin",diff --git a/dist-lib/lobehub/plugin.json b/dist-lib/lobehub/plugin.jsonindex 0ab63782b..ad4190273 100644--- a/dist-lib/lobehub/plugin.json+++ b/dist-lib/lobehub/plugin.json@@ -3,7 +3,7 @@"identifier": "3d-agent","version": "0.1.0","author": "three.ws",- "homepage": "https://3dagent.vercel.app",+ "homepage": "https://three.ws","meta": {"title": "three.ws","description": "Embodied 3D avatar agent with continuous emotion blending. Renders a rigged glTF avatar inside chat, responds with gestures, speech, and on-chain ERC-8004 identity.",diff --git a/home.css b/home.cssindex 01be74324..17509d95d 100644--- a/home.css+++ b/home.css@@ -142,19 +142,19 @@pointer-events: auto;}-/* ── Scroll-driven float on the avatar column ───────────────────────────── */+/* ── Scroll-driven float on the avatar wrap ─────────────────────────────── */@supports (animation-timeline: scroll()) {- .h-hero-visual {- animation: hero-visual-float linear both;+ .h-avatar-wrap {+ animation: hero-avatar-float linear both;animation-timeline: scroll(nearest);animation-range: 0vh 160vh;}- @keyframes hero-visual-float {- 0% { transform: translateY(0) scale(1); }- 60% { transform: translateY(-28px) scale(1.02); }- 100% { transform: translateY(-60px) scale(0.96); opacity: 0.4; }+ @keyframes hero-avatar-float {+ 0% { transform: translateY(0) scale(1); }+ 60% { transform: translateY(-24px) scale(1.03); }+ 100% { transform: translateY(-56px) scale(0.94); opacity: 0.3; }}}@@ -1060,24 +1060,13 @@transform: none;}- .h-hero-sticky {+ .h-hero-text {position: relative;height: auto;margin-bottom: 0;}}-@media screen and (max-width: 1024px) {- .h-hero-sticky {- grid-template-columns: 1fr 1fr;- gap: var(--space-xl);- }-- .h-hero-visual {- max-width: 400px;- }-}-@media screen and (max-width: 768px) {.home-parallax {perspective: none;@@ -1095,25 +1084,30 @@position: absolute;}- .h-hero-sticky {+ .h-avatar-stage {+ position: relative;+ height: 55vw;+ min-height: 280px;+ }++ .h-avatar-wrap {+ width: clamp(240px, 70vw, 360px);+ }++ .h-hero-text {position: relative;height: auto;margin-bottom: 0;- grid-template-columns: 1fr;- min-height: 100vh;- padding: calc(var(--space-xl) + 1rem) var(--space-md) var(--space-xl);+ padding: var(--space-lg) var(--space-md) var(--space-xl);text-align: center;}- .h-hero-content {- order: 2;+ .h-cta-row {+ justify-content: center;}- .h-hero-visual {- order: 1;- max-width: 320px;- margin: 0 auto;- justify-self: center;+ .h-standards {+ justify-content: center;}.h-cta-row {diff --git a/lobehub-plugin/src/config-schema.ts b/lobehub-plugin/src/config-schema.tsindex 635268a7e..d194deaa0 100644--- a/lobehub-plugin/src/config-schema.ts+++ b/lobehub-plugin/src/config-schema.ts@@ -7,7 +7,7 @@ export interface PluginSettings {apiOrigin: string;}-export const DEFAULT_API_ORIGIN = 'https://3dagent.vercel.app';+export const DEFAULT_API_ORIGIN = 'https://three.ws';export const settingsSchema = {agentId: {diff --git a/public/.well-known/openapi.yaml b/public/.well-known/openapi.yamlindex 33cab9d3c..58dd99826 100644--- a/public/.well-known/openapi.yaml+++ b/public/.well-known/openapi.yaml@@ -14,7 +14,7 @@ info:url: https://opensource.org/licenses/MITservers:- - url: https://3dagent.vercel.app+ - url: https://three.wstags:- name: Authdiff --git a/public/.well-known/security.txt b/public/.well-known/security.txtindex 7cb43dc04..f72a291c0 100644--- a/public/.well-known/security.txt+++ b/public/.well-known/security.txt@@ -1,4 +1,4 @@-# Security policy for 3dagent.vercel.app+# Security policy for three.ws# https://securitytxt.org/Contact: mailto:[email protected]diff --git a/scripts/seed-agent.mjs b/scripts/seed-agent.mjsindex 0706d5381..64e528507 100644--- a/scripts/seed-agent.mjs+++ b/scripts/seed-agent.mjs@@ -13,7 +13,7 @@ const [user] = await sql`const [agent] = await sql`INSERT INTO agent_identities (user_id, name, description, home_url)- VALUES (${user.id}, 'Demo Agent', 'Seed agent for dev harness testing', 'https://3dagent.vercel.app')+ VALUES (${user.id}, 'Demo Agent', 'Seed agent for dev harness testing', 'https://three.ws')RETURNING id`;diff --git a/sdk/src/permissions.d.ts b/sdk/src/permissions.d.tsindex 354f08b76..29fc19b23 100644--- a/sdk/src/permissions.d.ts+++ b/sdk/src/permissions.d.ts@@ -95,7 +95,7 @@ export class PermissionError extends Error {// ---------------------------------------------------------------------------export interface PermissionsClientOptions {- /** API base URL (default: https://3dagent.vercel.app) */+ /** API base URL (default: https://three.ws) */baseUrl?: string;/** Bearer token for authenticated endpoints */bearer?: string;