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
Add compressed CSS file for chat assets
nirholasd7cc9f4df90b
diff --git a/api/agents/[id].js b/api/agents/[id].jsindex 4b3957e7e..bd060816a 100644--- a/api/agents/[id].js+++ b/api/agents/[id].js@@ -72,5 +72,10 @@ export default wrap(async function handler(req, res) {return mod.handleUsage(req, res, id);}+ if (sub === 'memories') {+ const mod = await import('./_sub.js');+ return mod.handleMemories(req, res, id, action);+ }+return handleGetOne(req, res, id);});diff --git a/api/agents/[id]/_sub.js b/api/agents/[id]/_sub.jsindex 8ebf1d2e7..27343f4b6 100644--- a/api/agents/[id]/_sub.js+++ b/api/agents/[id]/_sub.js@@ -221,3 +221,56 @@ export const handleUsage = wrap(async (req, res, id) => {return json(res, 200, { agentId: id, monthlyQuota, currentMonthCalls: monthRow?.total ?? 0, dailyBreakdown: dailyRows.map((r) => ({ day: r.day, calls: r.calls })) });});++// ── memories ──────────────────────────────────────────────────────────────────++const memoryBodySchema = z.object({+ type: z.enum(['user', 'feedback', 'project', 'reference']),+ content: z.string().trim().min(1).max(4000),+ tags: z.array(z.string().trim().max(100)).max(20).optional().default([]),+ salience: z.number().min(0).max(1).optional(),+ expiresAt: z.string().datetime().optional().nullable(),+});++export const handleMemories = wrap(async (req, res, id, memoryId) => {+ if (cors(req, res, { methods: 'GET,POST,DELETE,OPTIONS', credentials: true })) return;+ if (!method(req, res, ['GET', 'POST', 'DELETE'])) return;++ const session = await getSessionUser(req);+ const bearer = session ? null : await authenticateBearer(extractBearer(req));+ const userId = session?.id ?? bearer?.userId;+ if (!userId) return error(res, 401, 'unauthorized', 'sign in required');++ const [agent] = await sql`SELECT id FROM agent_identities WHERE id = ${id} AND user_id = ${userId} AND deleted_at IS NULL`;+ if (!agent) return error(res, 404, 'not_found', 'agent not found');++ if (req.method === 'GET') {+ const rows = await sql`+ SELECT id, type, content, tags, salience, expires_at, created_at+ FROM agent_memories+ WHERE agent_id = ${id}+ AND (expires_at IS NULL OR expires_at > now())+ ORDER BY created_at DESC+ LIMIT 200+ `;+ return json(res, 200, { data: rows });+ }++ if (req.method === 'DELETE') {+ if (!memoryId) return error(res, 400, 'bad_request', 'memory id required');+ await sql`DELETE FROM agent_memories WHERE id = ${memoryId} AND agent_id = ${id}`;+ return json(res, 200, { deleted: true });+ }++ // POST+ const rl = await limits.authIp(clientIp(req));+ if (!rl.success) return error(res, 429, 'rate_limited', 'too many requests');++ const body = parse(memoryBodySchema, await readJson(req));+ const [row] = await sql`+ INSERT INTO agent_memories (id, agent_id, type, content, tags, salience, expires_at)+ VALUES (gen_random_uuid(), ${id}, ${body.type}, ${body.content}, ${body.tags}, ${body.salience ?? 0.5}, ${body.expiresAt ?? null})+ RETURNING id+ `;+ return json(res, 201, { id: row.id });+});diff --git a/character-studio/package-lock.json b/character-studio/package-lock.jsonindex 8bdaf0e6b..c81b0f5d8 100644--- a/character-studio/package-lock.json+++ b/character-studio/package-lock.json@@ -26,7 +26,7 @@"axios": "^1.13.6","bs58": "^6.0.0","buffer": "^6.0.3",- "ethers": "^5.7.0",+ "ethers": "^6.0.0","events": "^3.3.0","gsap": "^3.14.2","html2canvas": "^1.4.1",@@ -82,6 +82,12 @@"dev": true,"license": "MIT"},+ "node_modules/@adraffy/ens-normalize": {+ "version": "1.10.1",+ "resolved": "https://registry.npmjs.org/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz",+ "integrity": "sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==",+ "license": "MIT"+ },"node_modules/@ampproject/remapping": {"version": "2.3.0","resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz",@@ -842,7 +848,6 @@"cpu": ["ppc64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -859,7 +864,6 @@"cpu": ["arm"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -876,7 +880,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -893,7 +896,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -910,7 +912,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -927,7 +928,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -944,7 +944,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -961,7 +960,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -978,7 +976,6 @@"cpu": ["arm"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -995,7 +992,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1012,7 +1008,6 @@"cpu": ["ia32"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1029,7 +1024,6 @@"cpu": ["loong64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1046,7 +1040,6 @@"cpu": ["mips64el"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1063,7 +1056,6 @@"cpu": ["ppc64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1080,7 +1072,6 @@"cpu": ["riscv64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1097,7 +1088,6 @@"cpu": ["s390x"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1114,7 +1104,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1131,7 +1120,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1148,7 +1136,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1165,7 +1152,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1182,7 +1168,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1199,7 +1184,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1216,7 +1200,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1233,7 +1216,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1250,7 +1232,6 @@"cpu": ["ia32"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1267,7 +1248,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -1895,30 +1875,6 @@"hash.js": "1.1.7"}},- "node_modules/@ethersproject/solidity": {- "version": "5.8.0",- "resolved": "https://registry.npmjs.org/@ethersproject/solidity/-/solidity-5.8.0.tgz",- "integrity": "sha512-4CxFeCgmIWamOHwYN9d+QWGxye9qQLilpgTU0XhYs1OahkclF+ewO+3V1U0mvpiuQxm5EHHmv8f7ClVII8EHsA==",- "funding": [- {- "type": "individual",- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"- },- {- "type": "individual",- "url": "https://www.buymeacoffee.com/ricmoo"- }- ],- "license": "MIT",- "dependencies": {- "@ethersproject/bignumber": "^5.8.0",- "@ethersproject/bytes": "^5.8.0",- "@ethersproject/keccak256": "^5.8.0",- "@ethersproject/logger": "^5.8.0",- "@ethersproject/sha2": "^5.8.0",- "@ethersproject/strings": "^5.8.0"- }- },"node_modules/@ethersproject/strings": {"version": "5.8.0","resolved": "https://registry.npmjs.org/@ethersproject/strings/-/strings-5.8.0.tgz",@@ -1967,27 +1923,6 @@"@ethersproject/signing-key": "^5.8.0"}},- "node_modules/@ethersproject/units": {- "version": "5.8.0",- "resolved": "https://registry.npmjs.org/@ethersproject/units/-/units-5.8.0.tgz",- "integrity": "sha512-lxq0CAnc5kMGIiWW4Mr041VT8IhNM+Pn5T3haO74XZWFulk7wH1Gv64HqE96hT4a7iiNMdOCFEBgaxWuk8ETKQ==",- "funding": [- {- "type": "individual",- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"- },- {- "type": "individual",- "url": "https://www.buymeacoffee.com/ricmoo"- }- ],- "license": "MIT",- "dependencies": {- "@ethersproject/bignumber": "^5.8.0",- "@ethersproject/constants": "^5.8.0",- "@ethersproject/logger": "^5.8.0"- }- },"node_modules/@ethersproject/wallet": {"version": "5.8.0","resolved": "https://registry.npmjs.org/@ethersproject/wallet/-/wallet-5.8.0.tgz",@@ -3556,7 +3491,6 @@"version": "2.5.1","resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.5.1.tgz","integrity": "sha512-dfUnCxiN9H4ap84DvD2ubjw+3vUNpstxa0TneY/Paat8a3R4uQZDLSvWjmznAY/DoahqTHl9V46HF/Zs3F29pg==",- "dev": true,"hasInstallScript": true,"license": "MIT","optional": true,@@ -3596,7 +3530,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3617,7 +3550,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3638,7 +3570,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3659,7 +3590,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3680,7 +3610,6 @@"cpu": ["arm"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3701,7 +3630,6 @@"cpu": ["arm"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3722,7 +3650,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3743,7 +3670,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3764,7 +3690,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3785,7 +3710,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3806,7 +3730,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3827,7 +3750,6 @@"cpu": ["ia32"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3848,7 +3770,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -3866,7 +3787,6 @@"version": "7.1.1","resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz","integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==",- "dev": true,"license": "MIT","optional": true},@@ -4140,6 +4060,87 @@"dev": true,"license": "MIT"},+ "node_modules/@react-three/fiber": {+ "version": "9.6.1",+ "resolved": "https://registry.npmjs.org/@react-three/fiber/-/fiber-9.6.1.tgz",+ "integrity": "sha512-zF0rsKcVYpcJwbFEnv2HkHX9cvOEgsfQo/X8lwmR2dn13S4qEQJXir9fxf5js2LQFoXqxOY7MDkOkYx2uZ4gSg==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "@babel/runtime": "^7.17.8",+ "@types/webxr": "*",+ "base64-js": "^1.5.1",+ "buffer": "^6.0.3",+ "its-fine": "^2.0.0",+ "react-use-measure": "^2.1.7",+ "scheduler": "^0.27.0",+ "suspend-react": "^0.1.3",+ "use-sync-external-store": "^1.4.0",+ "zustand": "^5.0.3"+ },+ "peerDependencies": {+ "expo": ">=43.0",+ "expo-asset": ">=8.4",+ "expo-file-system": ">=11.0",+ "expo-gl": ">=11.0",+ "react": ">=19 <19.3",+ "react-dom": ">=19 <19.3",+ "react-native": ">=0.78",+ "three": ">=0.156"+ },+ "peerDependenciesMeta": {+ "expo": {+ "optional": true+ },+ "expo-asset": {+ "optional": true+ },+ "expo-file-system": {+ "optional": true+ },+ "expo-gl": {+ "optional": true+ },+ "react-dom": {+ "optional": true+ },+ "react-native": {+ "optional": true+ }+ }+ },+ "node_modules/@react-three/fiber/node_modules/zustand": {+ "version": "5.0.12",+ "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.12.tgz",+ "integrity": "sha512-i77ae3aZq4dhMlRhJVCYgMLKuSiZAaUPAct2AksxQ+gOtimhGMdXljRT21P5BNpeT4kXlLIckvkPM029OljD7g==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "engines": {+ "node": ">=12.20.0"+ },+ "peerDependencies": {+ "@types/react": ">=18.0.0",+ "immer": ">=9.0.6",+ "react": ">=18.0.0",+ "use-sync-external-store": ">=1.2.0"+ },+ "peerDependenciesMeta": {+ "@types/react": {+ "optional": true+ },+ "immer": {+ "optional": true+ },+ "react": {+ "optional": true+ },+ "use-sync-external-store": {+ "optional": true+ }+ }+ },"node_modules/@rolldown/pluginutils": {"version": "1.0.0-beta.19","resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.19.tgz",@@ -4216,19 +4217,6 @@"dev": true,"license": "MIT"},- "node_modules/@rollup/pluginutils/node_modules/picomatch": {- "version": "4.0.2",- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/jonschlinkert"- }- },"node_modules/@rollup/rollup-android-arm-eabi": {"version": "4.59.0","resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz",@@ -4236,7 +4224,6 @@"cpu": ["arm"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4250,7 +4237,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4264,7 +4250,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4278,7 +4263,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4292,7 +4276,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4306,7 +4289,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4320,7 +4302,6 @@"cpu": ["arm"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4334,7 +4315,6 @@"cpu": ["arm"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4348,7 +4328,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4362,7 +4341,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4376,7 +4354,6 @@"cpu": ["loong64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4390,7 +4367,6 @@"cpu": ["loong64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4404,7 +4380,6 @@"cpu": ["ppc64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4418,7 +4393,6 @@"cpu": ["ppc64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4432,7 +4406,6 @@"cpu": ["riscv64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4446,7 +4419,6 @@"cpu": ["riscv64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4460,7 +4432,6 @@"cpu": ["s390x"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4474,7 +4445,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4488,7 +4458,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4502,7 +4471,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4516,7 +4484,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4530,7 +4497,6 @@"cpu": ["arm64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4544,7 +4510,6 @@"cpu": ["ia32"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4558,7 +4523,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -4572,7 +4536,6 @@"cpu": ["x64"],- "dev": true,"license": "MIT","optional": true,"os": [@@ -5410,7 +5373,6 @@"version": "1.0.8","resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz","integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",- "dev": true,"license": "MIT"},"node_modules/@types/json5": {@@ -5435,6 +5397,27 @@"integrity": "sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==","license": "MIT"},+ "node_modules/@types/react": {+ "version": "19.2.14",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.14.tgz",+ "integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "csstype": "^3.2.2"+ }+ },+ "node_modules/@types/react-reconciler": {+ "version": "0.28.9",+ "resolved": "https://registry.npmjs.org/@types/react-reconciler/-/react-reconciler-0.28.9.tgz",+ "integrity": "sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "peerDependencies": {+ "@types/react": "*"+ }+ },"node_modules/@types/react-transition-group": {"version": "4.4.12","resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.12.tgz",@@ -5450,6 +5433,14 @@"integrity": "sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw==","license": "MIT"},+ "node_modules/@types/webxr": {+ "version": "0.5.24",+ "resolved": "https://registry.npmjs.org/@types/webxr/-/webxr-0.5.24.tgz",+ "integrity": "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg==",+ "dev": true,+ "license": "MIT",+ "peer": true+ },"node_modules/@types/ws": {"version": "7.4.7","resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz",@@ -5979,6 +5970,17 @@"base-x": "^3.0.2"}},+ "node_modules/arconnect": {+ "version": "0.4.2",+ "resolved": "https://registry.npmjs.org/arconnect/-/arconnect-0.4.2.tgz",+ "integrity": "sha512-Jkpd4QL3TVqnd3U683gzXmZUVqBUy17DdJDuL/3D9rkysLgX6ymJ2e+sR+xyZF5Rh42CBqDXWNMmCjBXeP7Gbw==",+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "arweave": "^1.10.13"+ }+ },"node_modules/argparse": {"version": "2.0.1","resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz",@@ -6166,6 +6168,23 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/arweave": {+ "version": "1.15.7",+ "resolved": "https://registry.npmjs.org/arweave/-/arweave-1.15.7.tgz",+ "integrity": "sha512-F+Y4iWU1qea9IsKQ/YNmLsY4DHQVsaJBuhEbFxQn9cfGHOmtXE+bwo14oY8xqymsqSNf/e1PeIfLk7G7qN/hVA==",+ "license": "MIT",+ "optional": true,+ "peer": true,+ "dependencies": {+ "arconnect": "^0.4.2",+ "asn1.js": "^5.4.1",+ "base64-js": "^1.5.1",+ "bignumber.js": "^9.0.2"+ },+ "engines": {+ "node": ">=18"+ }+ },"node_modules/arweave-stream-tx": {"version": "1.2.2","resolved": "https://registry.npmjs.org/arweave-stream-tx/-/arweave-stream-tx-1.2.2.tgz",@@ -6303,6 +6322,18 @@"styled-components": ">= 2"}},+ "node_modules/babel-plugin-styled-components/node_modules/picomatch": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",+ "license": "MIT",+ "engines": {+ "node": ">=8.6"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },"node_modules/balanced-match": {"version": "1.0.2","resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",@@ -6524,7 +6555,7 @@"version": "3.0.3","resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz","integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",- "dev": true,+ "devOptional": true,"license": "MIT","dependencies": {"fill-range": "^7.1.1"@@ -6887,7 +6918,7 @@"version": "4.0.3","resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz","integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==",- "dev": true,+ "devOptional": true,"license": "MIT","dependencies": {"readdirp": "^4.0.1"@@ -7244,9 +7275,9 @@}},"node_modules/csstype": {- "version": "3.1.3",- "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz",- "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==",+ "version": "3.2.3",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==","license": "MIT"},"node_modules/csv": {@@ -7493,7 +7524,6 @@"version": "1.0.3","resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz","integrity": "sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==",- "dev": true,"license": "Apache-2.0","optional": true,"bin": {@@ -7858,7 +7888,6 @@"version": "0.27.4","resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.4.tgz","integrity": "sha512-Rq4vbHnYkK5fws5NF7MYTU68FPRE1ajX7heQ/8QXXWqNgqqJ/GkmmyxIzUnf2Sr/bakf8l54716CcMGHYhMrrQ==",- "dev": true,"hasInstallScript": true,"license": "MIT","bin": {@@ -8384,13 +8413,13 @@}},"node_modules/ethers": {- "version": "5.8.0",- "resolved": "https://registry.npmjs.org/ethers/-/ethers-5.8.0.tgz",- "integrity": "sha512-DUq+7fHrCg1aPDFCHx6UIPb3nmt2XMpM7Y/g2gLhsl3lIBqeAfOJIl1qEvRf2uq3BiKxmh6Fh5pfp2ieyek7Kg==",+ "version": "6.16.0",+ "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.16.0.tgz",+ "integrity": "sha512-U1wulmetNymijEhpSEQ7Ct/P/Jw9/e7R1j5XIbPRydgV2DjLVMsULDlNksq3RQnFgKoLlZf88ijYtWEXcPa07A==","funding": [{"type": "individual",- "url": "https://gitcoin.co/grants/13/ethersjs-complete-simple-and-tiny-2"+ "url": "https://github.com/sponsors/ethers-io/"},{"type": "individual",@@ -8399,36 +8428,88 @@],"license": "MIT","dependencies": {- "@ethersproject/abi": "5.8.0",- "@ethersproject/abstract-provider": "5.8.0",- "@ethersproject/abstract-signer": "5.8.0",- "@ethersproject/address": "5.8.0",- "@ethersproject/base64": "5.8.0",- "@ethersproject/basex": "5.8.0",- "@ethersproject/bignumber": "5.8.0",- "@ethersproject/bytes": "5.8.0",- "@ethersproject/constants": "5.8.0",- "@ethersproject/contracts": "5.8.0",- "@ethersproject/hash": "5.8.0",- "@ethersproject/hdnode": "5.8.0",- "@ethersproject/json-wallets": "5.8.0",- "@ethersproject/keccak256": "5.8.0",- "@ethersproject/logger": "5.8.0",- "@ethersproject/networks": "5.8.0",- "@ethersproject/pbkdf2": "5.8.0",- "@ethersproject/properties": "5.8.0",- "@ethersproject/providers": "5.8.0",- "@ethersproject/random": "5.8.0",- "@ethersproject/rlp": "5.8.0",- "@ethersproject/sha2": "5.8.0",- "@ethersproject/signing-key": "5.8.0",- "@ethersproject/solidity": "5.8.0",- "@ethersproject/strings": "5.8.0",- "@ethersproject/transactions": "5.8.0",- "@ethersproject/units": "5.8.0",- "@ethersproject/wallet": "5.8.0",- "@ethersproject/web": "5.8.0",- "@ethersproject/wordlists": "5.8.0"+ "@adraffy/ens-normalize": "1.10.1",+ "@noble/curves": "1.2.0",+ "@noble/hashes": "1.3.2",+ "@types/node": "22.7.5",+ "aes-js": "4.0.0-beta.5",+ "tslib": "2.7.0",+ "ws": "8.17.1"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/ethers/node_modules/@noble/curves": {+ "version": "1.2.0",+ "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz",+ "integrity": "sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==",+ "license": "MIT",+ "dependencies": {+ "@noble/hashes": "1.3.2"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/ethers/node_modules/@noble/hashes": {+ "version": "1.3.2",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.2.tgz",+ "integrity": "sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==",+ "license": "MIT",+ "engines": {+ "node": ">= 16"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },+ "node_modules/ethers/node_modules/@types/node": {+ "version": "22.7.5",+ "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.5.tgz",+ "integrity": "sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==",+ "license": "MIT",+ "dependencies": {+ "undici-types": "~6.19.2"+ }+ },+ "node_modules/ethers/node_modules/aes-js": {+ "version": "4.0.0-beta.5",+ "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz",+ "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==",+ "license": "MIT"+ },+ "node_modules/ethers/node_modules/tslib": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz",+ "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==",+ "license": "0BSD"+ },+ "node_modules/ethers/node_modules/undici-types": {+ "version": "6.19.8",+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz",+ "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==",+ "license": "MIT"+ },+ "node_modules/ethers/node_modules/ws": {+ "version": "8.17.1",+ "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz",+ "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==",+ "license": "MIT",+ "engines": {+ "node": ">=10.0.0"+ },+ "peerDependencies": {+ "bufferutil": "^4.0.1",+ "utf-8-validate": ">=5.0.2"+ },+ "peerDependenciesMeta": {+ "bufferutil": {+ "optional": true+ },+ "utf-8-validate": {+ "optional": true+ }}},"node_modules/ethjs-unit": {@@ -8577,6 +8658,13 @@],"license": "BSD-3-Clause"},+ "node_modules/fastestsmallesttextencoderdecoder": {+ "version": "1.0.22",+ "resolved": "https://registry.npmjs.org/fastestsmallesttextencoderdecoder/-/fastestsmallesttextencoderdecoder-1.0.22.tgz",+ "integrity": "sha512-Pb8d48e+oIuY4MaM64Cd7OW1gt4nxCHs7/ddPPZ/Ic3sg8yVGM7O9wDvZ7us6ScaUupzM+pfBolwtYhN1IxBIw==",+ "license": "CC0-1.0",+ "peer": true+ },"node_modules/fastq": {"version": "1.19.1","resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz",@@ -8591,7 +8679,6 @@"version": "6.5.0","resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz","integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",- "dev": true,"license": "MIT","engines": {"node": ">=12.0.0"@@ -8680,7 +8767,7 @@"version": "7.1.1","resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz","integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",- "dev": true,+ "devOptional": true,"license": "MIT","dependencies": {"to-regex-range": "^5.0.1"@@ -9437,7 +9524,7 @@"version": "5.1.5","resolved": "https://registry.npmjs.org/immutable/-/immutable-5.1.5.tgz","integrity": "sha512-t7xcm2siw+hlUM68I+UEOK+z84RzmN59as9DZ7P1l0994DKUWV7UXBMQZVxaoMSRQ+PBZbHCOoBt7a2wxOMt+A==",- "dev": true,+ "devOptional": true,"license": "MIT"},"node_modules/import-fresh": {@@ -9747,7 +9834,7 @@"version": "2.1.1","resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz","integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",- "dev": true,+ "devOptional": true,"license": "MIT","engines": {"node": ">=0.10.0"@@ -9801,7 +9888,7 @@"version": "4.0.3","resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz","integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",- "dev": true,+ "devOptional": true,"license": "MIT","dependencies": {"is-extglob": "^2.1.1"@@ -9876,7 +9963,7 @@"version": "7.0.0","resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz","integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",- "dev": true,+ "devOptional": true,"license": "MIT","engines": {"node": ">=0.12.0"@@ -10122,6 +10209,20 @@"node": ">= 0.4"}},+ "node_modules/its-fine": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/its-fine/-/its-fine-2.0.0.tgz",+ "integrity": "sha512-KLViCmWx94zOvpLwSlsx6yOCeMhZYaxrJV87Po5k/FoZzcPSahvK5qJ7fYhS61sZi5ikmh2S3Hz55A2l3U69ng==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "dependencies": {+ "@types/react-reconciler": "^0.28.9"+ },+ "peerDependencies": {+ "react": "^19.0.0"+ }+ },"node_modules/jayson": {"version": "4.2.0","resolved": "https://registry.npmjs.org/jayson/-/jayson-4.2.0.tgz",@@ -10713,7 +10814,7 @@"version": "4.0.8","resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz","integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",- "dev": true,+ "devOptional": true,"license": "MIT","dependencies": {"braces": "^3.0.3",@@ -10723,6 +10824,19 @@"node": ">=8.6"}},+ "node_modules/micromatch/node_modules/picomatch": {+ "version": "2.3.2",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",+ "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",+ "devOptional": true,+ "license": "MIT",+ "engines": {+ "node": ">=8.6"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },"node_modules/miller-rabin": {"version": "4.0.1","resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz",@@ -10918,7 +11032,6 @@"version": "3.3.11","resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz","integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",- "dev": true,"funding": [{"type": "github",@@ -11666,12 +11779,12 @@"license": "ISC"},"node_modules/picomatch": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",- "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",+ "version": "4.0.4",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz",+ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==","license": "MIT","engines": {- "node": ">=8.6"+ "node": ">=12"},"funding": {"url": "https://github.com/sponsors/jonschlinkert"@@ -11759,7 +11872,6 @@"version": "8.5.6","resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz","integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",- "dev": true,"funding": [{"type": "opencollective",@@ -12026,12 +12138,6 @@"react": "^19.2.4"}},- "node_modules/react-dom/node_modules/scheduler": {- "version": "0.27.0",- "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",- "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",- "license": "MIT"- },"node_modules/react-i18next": {"version": "12.3.1","resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-12.3.1.tgz",@@ -12054,6 +12160,13 @@}}},+ "node_modules/react-is": {+ "version": "19.2.5",+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.5.tgz",+ "integrity": "sha512-Dn0t8IQhCmeIT3wu+Apm1/YVsJXsGWi6k4sPdnBIdqMVtHtv0IGi6dcpNpNkNac0zB2uUAqNX3MHzN8c+z2rwQ==",+ "license": "MIT",+ "peer": true+ },"node_modules/react-refresh": {"version": "0.17.0","resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz",@@ -12100,6 +12213,23 @@"react-dom": ">=16.6.0"}},+ "node_modules/react-use-measure": {+ "version": "2.1.7",+ "resolved": "https://registry.npmjs.org/react-use-measure/-/react-use-measure-2.1.7.tgz",+ "integrity": "sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "peerDependencies": {+ "react": ">=16.13",+ "react-dom": ">=16.13"+ },+ "peerDependenciesMeta": {+ "react-dom": {+ "optional": true+ }+ }+ },"node_modules/reactcss": {"version": "1.2.3","resolved": "https://registry.npmjs.org/reactcss/-/reactcss-1.2.3.tgz",@@ -12134,7 +12264,7 @@"version": "4.1.2","resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz","integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==",- "dev": true,+ "devOptional": true,"license": "MIT","engines": {"node": ">= 14.18.0"@@ -12308,7 +12438,6 @@"version": "4.59.0","resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz","integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==",- "dev": true,"license": "MIT","dependencies": {"@types/estree": "1.0.8"@@ -12558,7 +12687,7 @@"version": "1.98.0","resolved": "https://registry.npmjs.org/sass/-/sass-1.98.0.tgz","integrity": "sha512-+4N/u9dZ4PrgzGgPlKnaaRQx64RO0JBKs9sDhQ2pLgN6JQZ25uPQZKQYaBJU48Kd5BxgXoJ4e09Dq7nMcOUW3A==",- "dev": true,+ "devOptional": true,"license": "MIT","dependencies": {"chokidar": "^4.0.0",@@ -12588,6 +12717,12 @@"node": ">=v12.22.7"}},+ "node_modules/scheduler": {+ "version": "0.27.0",+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",+ "license": "MIT"+ },"node_modules/scrypt-js": {"version": "3.0.1","resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-3.0.1.tgz",@@ -12929,7 +13064,6 @@"version": "1.2.1","resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz","integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",- "dev": true,"license": "BSD-3-Clause","engines": {"node": ">=0.10.0"@@ -13370,6 +13504,17 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/suspend-react": {+ "version": "0.1.3",+ "resolved": "https://registry.npmjs.org/suspend-react/-/suspend-react-0.1.3.tgz",+ "integrity": "sha512-aqldKgX9aZqpoDp3e8/BZ8Dm7x1pJl+qI3ZKxDN0i/IQTWUwBx/ManmlVJ3wowqbno6c2bmiIfs+Um6LbsjJyQ==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "peerDependencies": {+ "react": ">=17.0"+ }+ },"node_modules/symbol-tree": {"version": "3.2.4","resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz",@@ -13468,7 +13613,6 @@"version": "0.2.15","resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz","integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",- "dev": true,"license": "MIT","dependencies": {"fdir": "^6.5.0",@@ -13481,19 +13625,6 @@"url": "https://github.com/sponsors/SuperchupuDev"}},- "node_modules/tinyglobby/node_modules/picomatch": {- "version": "4.0.3",- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/jonschlinkert"- }- },"node_modules/tinypool": {"version": "1.1.1","resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz",@@ -13587,7 +13718,7 @@"version": "5.0.1","resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz","integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",- "dev": true,+ "devOptional": true,"license": "MIT","dependencies": {"is-number": "^7.0.0"@@ -13811,6 +13942,20 @@"url": "https://github.com/sponsors/ljharb"}},+ "node_modules/typescript": {+ "version": "6.0.3",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz",+ "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",+ "license": "Apache-2.0",+ "peer": true,+ "bin": {+ "tsc": "bin/tsc",+ "tsserver": "bin/tsserver"+ },+ "engines": {+ "node": ">=14.17"+ }+ },"node_modules/typescript-collections": {"version": "1.3.3","resolved": "https://registry.npmjs.org/typescript-collections/-/typescript-collections-1.3.3.tgz",@@ -13947,6 +14092,17 @@"react": ">=16.8"}},+ "node_modules/use-sync-external-store": {+ "version": "1.6.0",+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.6.0.tgz",+ "integrity": "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w==",+ "dev": true,+ "license": "MIT",+ "peer": true,+ "peerDependencies": {+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"+ }+ },"node_modules/utf-8-validate": {"version": "5.0.10","resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.10.tgz",@@ -14009,7 +14165,6 @@"version": "7.3.1","resolved": "https://registry.npmjs.org/vite/-/vite-7.3.1.tgz","integrity": "sha512-w+N7Hifpc3gRjZ63vYBXA56dvvRlNWRczTdmCBBa+CotUzAPf5b7YMdMR/8CQoeYE5LX3W4wj6RYTgonm1b9DA==",- "dev": true,"license": "MIT","dependencies": {"esbuild": "^0.27.0",@@ -14153,19 +14308,6 @@"vite": ">2.0.0-0"}},- "node_modules/vite/node_modules/picomatch": {- "version": "4.0.3",- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",- "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/jonschlinkert"- }- },"node_modules/vitest": {"version": "3.2.4","resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.4.tgz",@@ -14249,19 +14391,6 @@"@jridgewell/sourcemap-codec": "^1.5.0"}},- "node_modules/vitest/node_modules/picomatch": {- "version": "4.0.2",- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",- "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",- "dev": true,- "license": "MIT",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/jonschlinkert"- }- },"node_modules/vlq": {"version": "2.0.4","resolved": "https://registry.npmjs.org/vlq/-/vlq-2.0.4.tgz",diff --git a/character-studio/package.json b/character-studio/package.jsonindex 38d77283c..17e9be408 100644--- a/character-studio/package.json+++ b/character-studio/package.json@@ -36,7 +36,7 @@"axios": "^1.13.6","bs58": "^6.0.0","buffer": "^6.0.3",- "ethers": "^5.7.0",+ "ethers": "^6.0.0","events": "^3.3.0","gsap": "^3.14.2","html2canvas": "^1.4.1",diff --git a/character-studio/src/Main.jsx b/character-studio/src/Main.jsxindex ed503e53a..5094b824f 100644--- a/character-studio/src/Main.jsx+++ b/character-studio/src/Main.jsx@@ -1,3 +1,5 @@+// TODO: @web3-react/core v6 requires @ethersproject/providers (ethers v5 fork).+// Upgrade to @web3-react/core v8 to fully support ethers v6 BrowserProvider.import { Web3Provider } from "@ethersproject/providers"import { Web3ReactProvider } from "@web3-react/core"import React, { Suspense } from "react"diff --git a/character-studio/src/library/mint-utils.js b/character-studio/src/library/mint-utils.jsindex e2c89ff9b..4772263ce 100644--- a/character-studio/src/library/mint-utils.js+++ b/character-studio/src/library/mint-utils.js@@ -1,4 +1,4 @@-import { BigNumber, ethers } from "ethers"+import { ethers } from "ethers"import { getVRMBlobData } from "./download-utils"import { CharacterContract, EternalProxyContract, webaverseGenesisAddress } from "../components/Contract"import { SolanaManager } from "./solanaManager"@@ -40,7 +40,7 @@ async function getContract(address) {];const key = await import.meta.env.ALCHEMY_API_KEY;- const defaultProvider = new ethers.providers.AlchemyProvider('mainnet', key);+ const defaultProvider = new ethers.AlchemyProvider('mainnet', key);//const defaultProvider = new ethers.providers.AlchemyProvider('mainnet', key);// Use Ethereum mainnet provider@@ -66,10 +66,10 @@ async function getContract(address) {async function getTokenPrice(){if (tokenPrice != null)return tokenPrice- const defaultProvider = new ethers.providers.StaticJsonRpcProvider('https://polygon-rpc.com/')+ const defaultProvider = new ethers.JsonRpcProvider('https://polygon-rpc.com/')const contract = new ethers.Contract(CharacterContract.address, CharacterContract.abi, defaultProvider)const tp = await contract.tokenPrice()- tokenPrice = BigNumber.from(tp).mul(1);+ tokenPrice = BigInt(tp);return tokenPrice}@@ -493,9 +493,7 @@ export async function mintAsset(avatar, screenshot, model, name, needCheckOT){let price = await getTokenPrice()- const signer = new ethers.providers.Web3Provider(- window.ethereum,- ).getSigner()+ const signer = await new ethers.BrowserProvider(window.ethereum).getSigner()const contract = new ethers.Contract(CharacterContract.address, CharacterContract.abi, signer)try {const options = {diff --git a/character-studio/src/pages/Load.jsx b/character-studio/src/pages/Load.jsxindex bb89ebc0a..5cff860e1 100644--- a/character-studio/src/pages/Load.jsx+++ b/character-studio/src/pages/Load.jsx@@ -1,6 +1,8 @@import React, { useEffect, useState } from 'react';import styles from './Load.module.css';import { ethers } from 'ethers';+// TODO: @web3-react/core v6 + InjectedConnector are incompatible with ethers v6.+// Upgrade to @web3-react/core v8 (and replace library with BrowserProvider) to resolve.import { useWeb3React } from '@web3-react/core';import { InjectedConnector } from "@web3-react/injected-connector"import { ViewContext, ViewMode } from '../context/ViewContext';diff --git a/chat/server/files.go b/chat/server/files.goindex c829e36a5..977f1cef4 100644--- a/chat/server/files.go+++ b/chat/server/files.go@@ -1,7 +1,6 @@package mainimport (- "encoding/json""io/ioutil""net/http""os"@@ -54,37 +53,29 @@ func getFileTree(path string, rootFlag string) (FileInfo, error) {// ListDirectory handles the /list_directory endpoint requestfunc ListDirectory(w http.ResponseWriter, r *http.Request) {- // Get absolute path of the directoryabsFilesPath, err := filepath.Abs(*filesPath)if err != nil {- http.Error(w, "Error getting absolute path: "+err.Error(), http.StatusInternalServerError)+ writeJSON(w, http.StatusInternalServerError, map[string]any{"error": "Error getting absolute path: " + err.Error()})return}- // Verify the directory existsinfo, err := os.Stat(absFilesPath)if err != nil {- http.Error(w, "Error accessing directory: "+err.Error(), http.StatusInternalServerError)+ writeJSON(w, http.StatusInternalServerError, map[string]any{"error": "Error accessing directory: " + err.Error()})return}if !info.IsDir() {- http.Error(w, absFilesPath+" is not a directory", http.StatusInternalServerError)+ writeJSON(w, http.StatusInternalServerError, map[string]any{"error": absFilesPath + " is not a directory"})return}- // Use the absolute path for getFileTreetree, err := getFileTree(absFilesPath, absFilesPath)if err != nil {- http.Error(w, "Failed to build tree: "+err.Error(), http.StatusInternalServerError)+ writeJSON(w, http.StatusInternalServerError, map[string]any{"error": "Failed to build tree: " + err.Error()})return}- w.Header().Set("Content-Type", "application/json")- encoder := json.NewEncoder(w)- encoder.SetIndent("", " ") // Pretty print JSON- if err := encoder.Encode(tree); err != nil {- http.Error(w, "Failed to encode JSON: "+err.Error(), http.StatusInternalServerError)- }+ writeJSON(w, http.StatusOK, tree)}func ReadFile(w http.ResponseWriter, r *http.Request) {diff --git a/chat/server/main.go b/chat/server/main.goindex 7cccf83ad..7972c11c9 100644--- a/chat/server/main.go+++ b/chat/server/main.go@@ -77,14 +77,17 @@ func authMiddleware(next http.Handler) http.Handler {})}+func writeJSON(w http.ResponseWriter, status int, v any) {+ w.Header().Set("Content-Type", "application/json")+ w.WriteHeader(status)+ json.NewEncoder(w).Encode(v)+}+type ToolHandler struct {Groups []*toolfns.Group}func (tr *ToolHandler) ToolSchema(w http.ResponseWriter, r *http.Request) {- enc := json.NewEncoder(w)- enc.SetIndent("", " ")-type encodedGroup struct {Name string `json:"name"`Schema []schema.Function `json:"schema"`@@ -97,11 +100,7 @@ func (tr *ToolHandler) ToolSchema(w http.ResponseWriter, r *http.Request) {Schema: group.Repo.Schema(),})}- err := enc.Encode(encodedGroups)- if err != nil {- http.Error(w, err.Error(), http.StatusInternalServerError)- return- }+ writeJSON(w, http.StatusOK, encodedGroups)}func (tr *ToolHandler) InvokeTool(w http.ResponseWriter, r *http.Request) {@@ -111,28 +110,22 @@ func (tr *ToolHandler) InvokeTool(w http.ResponseWriter, r *http.Request) {Args map[string]any `json:"arguments"`}if err := json.NewDecoder(io.TeeReader(r.Body, os.Stdout)).Decode(&call); err != nil {- http.Error(w, err.Error(), http.StatusBadRequest)+ writeJSON(w, http.StatusBadRequest, map[string]any{"error": err.Error()})return}- var err errorfor _, group := range tr.Groups {- var out any- out, err = group.Repo.Invoke(nil, call.Name, call.Args)+ out, err := group.Repo.Invoke(nil, call.Name, call.Args)if err != nil {if strings.HasPrefix(err.Error(), "tool not found") {continue}- json.NewEncoder(w).Encode(map[string]any{- "error": err.Error(),- })+ writeJSON(w, http.StatusInternalServerError, map[string]any{"error": err.Error()})return}- json.NewEncoder(w).Encode(out)+ writeJSON(w, http.StatusOK, out)return}- if err != nil {- http.Error(w, err.Error(), http.StatusBadRequest)- }+ writeJSON(w, http.StatusNotFound, map[string]any{"error": "tool not found: " + call.Name})}diff --git a/chat/src/App.svelte b/chat/src/App.svelteindex 0cb79f1a1..76062d5d1 100644--- a/chat/src/App.svelte+++ b/chat/src/App.svelte@@ -22,7 +22,8 @@} from './providers.js';import ModelSelector from './ModelSelector.svelte';import CompanyLogo from './CompanyLogo.svelte';- import { controller, remoteServer, config, params, toolSchema, syncServer, brandConfig, ttsEnabled, localAgentId, activeAgent, talkingHeadEnabled, route, mode, websiteCategory, loadCurrentUser } from './stores.js';+ import { controller, remoteServer, config, params, toolSchema, syncServer, brandConfig, ttsEnabled, localAgentId, activeAgent, talkingHeadEnabled, route, mode, websiteCategory, loadCurrentUser, notify } from './stores.js';+ import Notifications from './Notifications.svelte';import AuthPage from './manus/pages/AuthPage.svelte';import Pricing from './manus/pages/Pricing.svelte';import MarketingPage from './manus/pages/MarketingPage.svelte';@@ -43,6 +44,7 @@feChevronLeft,feChevronRight,feCpu,+ feDownload,feEdit2,feMenu,feTerminal,@@ -161,6 +163,7 @@transaction.onerror = () => {console.error('Message save failed', transaction.error);+ notify('Failed to save — your changes may be lost. Check browser storage settings.');};}, 500);@@ -340,6 +343,7 @@transaction.onerror = () => {console.error('Conversation save failed', transaction.error);+ notify('Failed to save — your changes may be lost. Check browser storage settings.');};}, 500);@@ -363,6 +367,7 @@transaction.onerror = () => {console.error('Conversation delete failed', transaction.error);+ notify('Failed to delete conversation. Check browser storage settings.');};}@@ -381,6 +386,7 @@transaction.onerror = () => {console.error('Message delete failed', transaction.error);+ notify('Failed to delete message. Check browser storage settings.');};}@@ -404,7 +410,25 @@historyBuckets.sort((a, b) => b.convos[0].time - a.convos[0].time);}+ let searchQuery = '';+ $: filteredConvos = searchQuery.trim()+ ? Object.values(convos).filter(+ (c) =>+ !c.shared &&+ (c.messages.some(+ (m) =>+ typeof m.content === 'string' &&+ m.content.toLowerCase().includes(searchQuery.toLowerCase())+ ) ||+ (c.title || '').toLowerCase().includes(searchQuery.toLowerCase()) ||+ (c.messages.find((m) => m.role === 'user')?.content || '')+ .toLowerCase()+ .includes(searchQuery.toLowerCase()))+ )+ : null;+let generating = false;+ let editingTitleId = null;let historyOpen = false;let knobsOpen = false;@@ -733,6 +757,8 @@}submitCompletion();+ } else {+ generateTitle();}return;@@ -949,6 +975,53 @@}}+ let exportOpen = false;++ function downloadFile(content, filename, type) {+ const blob = new Blob([content], { type });+ const url = URL.createObjectURL(blob);+ const a = document.createElement('a');+ a.href = url;+ a.download = filename;+ a.click();+ URL.revokeObjectURL(url);+ }++ function exportConvoAsMarkdown() {+ exportOpen = false;+ const lines = [];+ for (const msg of convo.messages) {+ if (msg.role === 'system') continue;+ if (!msg.content && !msg.toolcalls?.length) continue;+ const role = msg.role === 'user' ? '**You**' : '**Assistant**';+ let body = msg.content || '';+ if (msg.toolcalls?.length) {+ const names = msg.toolcalls.map((tc) => tc.name || 'tool').join(', ');+ body += (body ? '\n\n' : '') + `*[used tool: ${names}]*`;+ }+ lines.push(`${role}\n\n${body}\n\n---\n`);+ }+ downloadFile(lines.join('\n'), `conversation-${convo.id.slice(0, 8)}.md`, 'text/markdown');+ }++ function exportConvoAsJSON() {+ exportOpen = false;+ const data = {+ id: convo.id,+ time: convo.time,+ models: convo.models,+ messages: convo.messages+ .filter((m) => m.role !== 'system')+ .map((m) => ({+ role: m.role,+ content: m.content,+ model: m.model,+ time: m.time,+ })),+ };+ downloadFile(JSON.stringify(data, null, 2), `conversation-${convo.id.slice(0, 8)}.json`, 'application/json');+ }+async function restoreConversation() {const params = new URLSearchParams(window.location.search);let share;@@ -1313,6 +1386,56 @@pendingSpeak = null;}}++ async function generateTitle() {+ if (convo.title) return;+ const msgs = convo.messages.filter((m) => m.role === 'user' || m.role === 'assistant');+ if (msgs.length < 2) return;++ const model = convo.models[0];+ if (!model?.id) return;+ const provider = providers.find((p) => p.name === model.provider);+ if (!provider) return;++ const context = msgs+ .slice(0, 4)+ .map((m) => `${m.role}: ${(typeof m.content === 'string' ? m.content : '').slice(0, 300)}`)+ .join('\n');++ try {+ const response = await fetch(`${provider.url}${provider.completionUrl}`, {+ method: 'POST',+ headers: {+ 'Content-Type': 'application/json',+ ...(model.provider === 'Anthropic'+ ? { 'x-api-key': provider.apiKeyFn(), 'anthropic-version': '2023-06-01' }+ : { Authorization: `Bearer ${provider.apiKeyFn()}` }),+ },+ body: JSON.stringify({+ model: model.id,+ stream: false,+ max_tokens: 20,+ messages: [+ {+ role: 'user',+ content: `Summarize this conversation in 4-6 words as a title. No quotes, no punctuation.\n\n${context}`,+ },+ ],+ }),+ });+ if (!response.ok) return;+ const data = await response.json();+ const title =+ data?.choices?.[0]?.message?.content?.trim() || data?.content?.[0]?.text?.trim();+ if (title) {+ convo.title = title;+ saveConversation(convo);+ convos = { ...convos, [convo.id]: convo };+ }+ } catch {+ // Non-critical, fail silently+ }+ }</script><svelte:window@@ -1444,71 +1567,164 @@New chat</button></div>+ <input+ type="search"+ placeholder="Search conversations..."+ bind:value={searchQuery}+ class="mx-2 my-2 w-[calc(100%-16px)] rounded-md border border-slate-200 bg-white px-3 py-1.5 text-sm outline-none focus:border-indigo-400"+ /><ol- class="flex list-none flex-col overflow-y-auto pb-3 pr-3 pt-3 scrollbar-invisible scrollbar-slim hover:scrollbar-white"+ class="flex list-none flex-col overflow-y-auto pb-3 pr-3 pt-1 scrollbar-invisible scrollbar-slim hover:scrollbar-white">- {#each historyBuckets as { relativeDate, convos: historyConvos } (relativeDate)}- <li class="mb-1 ml-3 text-[11px] font-medium text-ink-soft [&:not(:first-child)]:mt-5">- {relativeDate}- </li>- {#each historyConvos as historyConvo (historyConvo.id)}- <li class="group relative">- <button- on:click={() => {- handleAbort();-- historyOpen = false;- activeToolcall = null;-- $convoId = historyConvo.id;- convo = convos[$convoId];-- cleanShareLink();-- tick().then(() => {- scrollToBottom();- });- }}- class="{$convoId === historyConvo.id- ? 'bg-paper-deep'- : ''} flex h-9 w-full items-center rounded-md px-3 text-left text-sm text-ink hover:bg-paper-deep"- >- <span class="line-clamp-1">- {historyConvo.messages.length === 0- ? 'New conversation'- : historyConvo.messages- .find((m) => m.role === 'user')- ?.content.split(' ')- .slice(0, 5)- .join(' ') || 'Untitled'}- </span>- </button>- <button- on:click={() => {- if ($convoId === historyConvo.id) {- const newId = Object.values(convos).find(- (e) => e.id !== historyConvo.id && !e.shared- )?.id;- if (!newId) {- newConversation();- } else {- $convoId = newId;+ {#if filteredConvos}+ {#if filteredConvos.length === 0}+ <li class="px-3 py-4 text-center text-sm text-slate-400">No conversations found</li>+ {:else}+ {#each filteredConvos.sort((a, b) => b.time - a.time) as historyConvo (historyConvo.id)}+ {@const matchingMsg = historyConvo.messages.find(+ (m) =>+ typeof m.content === 'string' &&+ m.content.toLowerCase().includes(searchQuery.toLowerCase())+ )}+ <li class="group relative">+ <button+ on:click={() => {+ handleAbort();+ historyOpen = false;+ activeToolcall = null;+ searchQuery = '';+ $convoId = historyConvo.id;+ convo = convos[$convoId];+ cleanShareLink();+ tick().then(() => { scrollToBottom(); });+ }}+ class="{$convoId === historyConvo.id+ ? 'bg-paper-deep'+ : ''} flex w-full flex-col rounded-md px-3 py-1.5 text-left text-sm text-ink hover:bg-paper-deep"+ >+ <span class="line-clamp-1">+ {historyConvo.title || (historyConvo.messages.length === 0+ ? 'New conversation'+ : historyConvo.messages+ .find((m) => m.role === 'user')+ ?.content?.split(' ')+ .slice(0, 5)+ .join(' ') || 'New conversation')}+ </span>+ {#if matchingMsg}+ <p class="truncate text-xs text-slate-400">+ ...{matchingMsg.content.slice(+ Math.max(0, matchingMsg.content.toLowerCase().indexOf(searchQuery.toLowerCase()) - 20),+ matchingMsg.content.toLowerCase().indexOf(searchQuery.toLowerCase()) + 60+ )}...+ </p>+ {/if}+ </button>+ <button+ on:click={() => {+ if ($convoId === historyConvo.id) {+ const newId = Object.values(convos).find(+ (e) => e.id !== historyConvo.id && !e.shared+ )?.id;+ if (!newId) {+ newConversation();+ } else {+ $convoId = newId;+ }}- }- delete convos[historyConvo.id];- convos = convos;- deleteConversation(historyConvo);- }}- class="z-1 absolute right-0 top-0 flex h-full w-12 rounded-br-md rounded-tr-md bg-gradient-to-l {$convoId ===- historyConvo.id- ? 'from-paper-deep'- : 'from-paper group-hover:from-paper-deep'} from-65% to-transparent pr-3 transition-opacity sm:from-paper-deep sm:opacity-0 sm:group-hover:opacity-100"- >- <Icon icon={feTrash} class="m-auto mr-0 h-3 w-3 shrink-0 text-ink-soft" />- </button>+ delete convos[historyConvo.id];+ convos = convos;+ deleteConversation(historyConvo);+ }}+ class="z-1 absolute right-0 top-0 flex h-full w-12 rounded-br-md rounded-tr-md bg-gradient-to-l {$convoId ===+ historyConvo.id+ ? 'from-paper-deep'+ : 'from-paper group-hover:from-paper-deep'} from-65% to-transparent pr-3 transition-opacity sm:from-paper-deep sm:opacity-0 sm:group-hover:opacity-100"+ >+ <Icon icon={feTrash} class="m-auto mr-0 h-3 w-3 shrink-0 text-ink-soft" />+ </button>+ </li>+ {/each}+ {/if}+ {:else}+ {#each historyBuckets as { relativeDate, convos: historyConvos } (relativeDate)}+ <li class="mb-1 ml-3 text-[11px] font-medium text-ink-soft [&:not(:first-child)]:mt-5">+ {relativeDate}</li>+ {#each historyConvos as historyConvo (historyConvo.id)}+ <li class="group relative">+ {#if editingTitleId === historyConvo.id}+ <div class="{$convoId === historyConvo.id ? 'bg-paper-deep' : ''} flex h-9 w-full items-center rounded-md px-3">+ <input+ class="w-full bg-transparent text-sm text-ink outline-none"+ bind:value={historyConvo.title}+ on:blur={() => { saveConversation(historyConvo); convos = { ...convos }; editingTitleId = null; }}+ on:keydown={(e) => e.key === 'Enter' && e.target.blur()}+ autofocus+ />+ </div>+ {:else}+ <button+ on:click={() => {+ handleAbort();++ historyOpen = false;+ activeToolcall = null;++ $convoId = historyConvo.id;+ convo = convos[$convoId];++ cleanShareLink();++ tick().then(() => {+ scrollToBottom();+ });+ }}+ class="{$convoId === historyConvo.id+ ? 'bg-paper-deep'+ : ''} flex h-9 w-full items-center rounded-md px-3 text-left text-sm text-ink hover:bg-paper-deep"+ >+ <span+ class="line-clamp-1"+ on:dblclick|stopPropagation={() => { editingTitleId = historyConvo.id; }}+ >+ {historyConvo.title || (historyConvo.messages.length === 0+ ? 'New conversation'+ : historyConvo.messages+ .find((m) => m.role === 'user')+ ?.content?.split(' ')+ .slice(0, 5)+ .join(' ') || 'New conversation')}+ </span>+ </button>+ {/if}+ <button+ on:click={() => {+ if ($convoId === historyConvo.id) {+ const newId = Object.values(convos).find(+ (e) => e.id !== historyConvo.id && !e.shared+ )?.id;+ if (!newId) {+ newConversation();+ } else {+ $convoId = newId;+ }+ }+ delete convos[historyConvo.id];+ convos = convos;+ deleteConversation(historyConvo);+ }}+ class="z-1 absolute right-0 top-0 flex h-full w-12 rounded-br-md rounded-tr-md bg-gradient-to-l {$convoId ===+ historyConvo.id+ ? 'from-paper-deep'+ : 'from-paper group-hover:from-paper-deep'} from-65% to-transparent pr-3 transition-opacity sm:from-paper-deep sm:opacity-0 sm:group-hover:opacity-100"+ >+ <Icon icon={feTrash} class="m-auto mr-0 h-3 w-3 shrink-0 text-ink-soft" />+ </button>+ </li>+ {/each}{/each}- {/each}+ {/if}</ol><div class="settings-trigger-container -ml-3 mt-auto flex pb-3">@@ -1734,6 +1950,8 @@</Modal>{/if}+<Notifications />+{#if installToastMsg}<div transition:fade={{ duration: 200 }} class="fixed bottom-16 left-1/2 z-[200] -translate-x-1/2 rounded-lg border border-green-200 bg-green-50 px-4 py-2 text-sm text-green-800 shadow-md">{installToastMsg}diff --git a/chat/src/Notifications.svelte b/chat/src/Notifications.sveltenew file mode 100644index 000000000..327c9cb0f--- /dev/null+++ b/chat/src/Notifications.svelte@@ -0,0 +1,14 @@+<script>+ import { notifications } from './stores.js';+</script>++{#if $notifications.length > 0}+ <div class="fixed bottom-16 left-1/2 z-[200] flex -translate-x-1/2 flex-col gap-2">+ {#each $notifications as n (n.id)}+ <div class="rounded-lg px-4 py-2 text-sm text-white shadow-lg+ {n.type === 'error' ? 'bg-red-600' : 'bg-slate-800'}">+ {n.message}+ </div>+ {/each}+ </div>+{/if}diff --git a/chat/src/convo.js b/chat/src/convo.jsindex afc7dcd12..653dbb1d8 100644--- a/chat/src/convo.js+++ b/chat/src/convo.js@@ -3,6 +3,7 @@ import { controller, params, toolSchema } from './stores.js';import { headersForFetch, providers } from './providers.js';export async function complete(convo, onupdate, onabort) {+ try {controller.set(new AbortController());const model = convo.models[0];@@ -141,12 +142,21 @@ export async function complete(convo, onupdate, onabort) {};const response = await completions(get(controller).signal);+ if (!response.ok) {+ let msg = `API error ${response.status}`;+ try { const e = await response.json(); msg = e?.error?.message || e?.message || msg; } catch {}+ throw new Error(msg);+ }if (stream) {streamResponse(model.provider, response.body, onupdate, onabort);} else {const responseBody = await response.json();onupdate(responseBody);}+ } catch (err) {+ if (err.name === 'AbortError') return;+ onabort?.(err.message || String(err));+ }}export async function completeConsensus(convo, onupdate, onabort) {@@ -197,7 +207,13 @@ export async function completeConsensus(convo, onupdate, onabort) {}),});- const result = await response.json();+ let result;+ try { result = await response.json(); } catch {+ throw new Error(`Invalid JSON from ${model.id}`);+ }+ if (!result?.choices?.[0]?.message?.content) {+ throw new Error(`Unexpected response shape from ${model.id}`);+ }return {model: model.id,response: result.choices[0].message.content,@@ -571,6 +587,11 @@ export async function generateImage(convo, { oncomplete }) {size: '1024x1024',}),});+ if (!resp.ok) {+ let msg = `Image API error ${resp.status}`;+ try { const e = await resp.json(); msg = e?.error?.message || e?.message || msg; } catch {}+ throw new Error(msg);+ }const json = await resp.json();oncomplete(json);}diff --git a/chat/src/stores.js b/chat/src/stores.jsindex 6c4657923..6f1ed6764 100644--- a/chat/src/stores.js+++ b/chat/src/stores.js@@ -86,6 +86,14 @@ export const flowSecondary = persisted('flowSecondary', {});export const appPlatforms = writable(new Set(['macOS']));export const designModel = writable('gpt-image-2');+export const notifications = writable([]);++export function notify(message, type = 'error') {+ const id = Math.random().toString(36).slice(2);+ notifications.update(n => [...n, { id, message, type }]);+ setTimeout(() => notifications.update(n => n.filter(x => x.id !== id)), 5000);+}+export const currentUser = writable(null);export async function loadCurrentUser() {diff --git a/public/chat/index.html b/public/chat/index.htmlindex a54d77bb3..7e8c39048 100644--- a/public/chat/index.html+++ b/public/chat/index.html@@ -43,8 +43,8 @@}}</script>- <script type="module" crossorigin src="/chat/assets/index-CyOvkWX9.js"></script>- <link rel="stylesheet" crossorigin href="/chat/assets/index-CJygAP8J.css">+ <script type="module" crossorigin src="/chat/assets/index-BQNPWbBp.js"></script>+ <link rel="stylesheet" crossorigin href="/chat/assets/index-BcxH7WFG.css"></head><body><div id="app"></div>diff --git a/src/agent-memory.js b/src/agent-memory.jsindex 8a702eceb..7a21c5395 100644--- a/src/agent-memory.js+++ b/src/agent-memory.js@@ -156,8 +156,8 @@ export class AgentMemory {this._entries = [];}- // Backend sync — merge newer entries from server- if (this.backendSync) this._syncFromBackend();+ // Backend sync — hydrate from server (async, non-blocking)+ if (this.backendSync && this.agentId) this._hydrateFromBackend();}_persist() {@@ -184,50 +184,58 @@ export class AgentMemory {_scheduleSync(entry) {this._persist();- if (!this.backendSync) return;- clearTimeout(this._syncTimer);- this._syncTimer = setTimeout(() => this._syncToBackend(entry), 1500);- }-- async _syncToBackend(entry) {- try {- await fetch(`/api/agent-memory`, {- method: 'POST',- headers: { 'content-type': 'application/json' },- credentials: 'include',- body: JSON.stringify({ agentId: this.agentId, entry }),- });- } catch {- /* non-critical — localStorage is authoritative */- }+ if (!this.backendSync || !this.agentId) return;+ fetch(`/api/agents/${this.agentId}/memories`, {+ method: 'POST',+ headers: { 'content-type': 'application/json' },+ credentials: 'include',+ body: JSON.stringify({+ type: entry.type,+ content: entry.content,+ tags: entry.tags,+ salience: entry.salience,+ expiresAt: entry.expiresAt,+ }),+ }).catch(() => {});}async _syncForget(id) {try {- await fetch(`/api/agent-memory/${id}`, {+ await fetch(`/api/agents/${this.agentId}/memories/${id}`, {method: 'DELETE',credentials: 'include',});} catch {}}- async _syncFromBackend() {+ async _hydrateFromBackend() {try {- const resp = await fetch(`/api/agent-memory?agentId=${this.agentId}`, {+ const resp = await fetch(`/api/agents/${this.agentId}/memories`, {credentials: 'include',});if (!resp.ok) return;- const { entries } = await resp.json();- if (!Array.isArray(entries)) return;+ const { data } = await resp.json();+ if (!Array.isArray(data)) return;- // Merge: backend entries that don't exist locally winconst localIds = new Set(this._entries.map((m) => m.id));- const newEntries = entries.filter((m) => !localIds.has(m.id));- if (newEntries.length) {- this._entries.push(...newEntries);- this._persist();+ for (const row of data) {+ if (!localIds.has(row.id)) {+ this._entries.push({+ id: row.id,+ type: row.type,+ content: row.content,+ tags: row.tags || [],+ context: {},+ salience: row.salience || 0.5,+ createdAt: new Date(row.created_at).getTime(),+ expiresAt: row.expires_at ? new Date(row.expires_at).getTime() : null,+ });+ }}- } catch {}+ this._persist();+ } catch {+ /* Backend unavailable — localStorage data is the fallback */+ }}}diff --git a/src/element.js b/src/element.jsindex 9ca7c703a..8c685a9c3 100644--- a/src/element.js+++ b/src/element.js@@ -947,7 +947,7 @@ class Agent3DElement extends HTMLElement {this.dispatchEvent(new CustomEvent(ev, { detail: e.detail, bubbles: true, composed: true }),);- if (ev === 'brain:message' && this._chatEl) {+ if (ev === 'brain:message') {// Transfer sentiment from the most recent tool call to// this assistant message so the bubble tints correctly.const detail = { ...e.detail };@@ -959,11 +959,21 @@ class Agent3DElement extends HTMLElement {detail.sentiment = this._lastToolSentiment;this._lastToolSentiment = undefined;}- this._renderMessage(detail);+ if (detail.role === 'assistant' && detail.content) {+ protocol.emit({+ type: ACTION_TYPES.SPEAK,+ payload: { text: detail.content, sentiment: detail.sentiment ?? 0 },+ });+ }+ if (this._chatEl) this._renderMessage(detail);}- if (ev === 'brain:thinking' && this._toolIndicatorEl) {- if (e.detail?.thinking) this._setToolIndicator('thinking');- else this._clearToolIndicator();+ if (ev === 'brain:thinking') {+ if (this._toolIndicatorEl) {+ if (e.detail?.thinking) this._setToolIndicator('thinking');+ else this._clearToolIndicator();+ }+ protocol.emit({ type: ACTION_TYPES.THINK, payload: { thought: 'processing your message...' } });+ protocol.emit({ type: ACTION_TYPES.EMOTE, payload: { trigger: 'patience', weight: 0.5 } });}if (ev === 'skill:tool-called') {const { tool, result } = e.detail || {};@@ -1412,7 +1422,16 @@ class Agent3DElement extends HTMLElement {async say(text, opts = {}) {if (!this._runtime) await this._waitForReady();- return this._runtime.send(text, { voice: opts.voice ?? this.hasAttribute('voice') });+ protocol.emit({ type: ACTION_TYPES.LOOK_AT, payload: { target: 'user' } });+ protocol.emit({ type: ACTION_TYPES.EMOTE, payload: { trigger: 'curiosity', weight: 0.6 } });+ protocol.emit({ type: ACTION_TYPES.THINK, payload: { thought: 'processing your message...' } });+ protocol.emit({ type: ACTION_TYPES.EMOTE, payload: { trigger: 'patience', weight: 0.5 } });+ try {+ return await this._runtime.send(text, { voice: opts.voice ?? this.hasAttribute('voice') });+ } catch (err) {+ protocol.emit({ type: ACTION_TYPES.EMOTE, payload: { trigger: 'concern', weight: 0.8 } });+ throw err;+ }}// Play speak animation — tries 'talk', falls back to 'yes', then 'wave'.diff --git a/vercel.json b/vercel.jsonindex 9c5186831..b2c519423 100644--- a/vercel.json+++ b/vercel.json@@ -93,6 +93,8 @@{ "src": "/api/agents/([^/]+)/manifest", "dest": "/api/agents/[id]" },{ "src": "/api/agents/([^/]+)/actions", "dest": "/api/agents/[id]" },{ "src": "/api/agents/([^/]+)/usage", "dest": "/api/agents/[id]" },+ { "src": "/api/agents/([^/]+)/memories/([^/]+)", "dest": "/api/agents/[id]" },+ { "src": "/api/agents/([^/]+)/memories", "dest": "/api/agents/[id]" },{ "src": "/api/agents/pumpfun-feed", "dest": "/api/agents/pumpfun?_handler=feed" },{ "src": "/api/agents/pumpfun-metadata", "dest": "/api/agents/pumpfun?_handler=metadata" },{ "src": "/api/agents/pumpfun", "dest": "/api/agents/pumpfun" },