From 047d33c50afd7afffc90b581dbdacf46d6716146 Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 31 Dec 2024 14:10:37 +0700 Subject: [PATCH 01/37] feat: use custom conditions for live monorepo types --- packages/adapter-postgres/package.json | 16 +++++++++++++++- packages/adapter-redis/package.json | 16 +++++++++++++++- packages/adapter-sqlite/package.json | 16 +++++++++++++++- packages/adapter-sqljs/package.json | 16 +++++++++++++++- packages/adapter-supabase/package.json | 16 +++++++++++++++- packages/client-auto/package.json | 16 +++++++++++++++- packages/client-direct/package.json | 14 ++++++++++++++ packages/client-discord/package.json | 16 +++++++++++++++- packages/client-farcaster/package.json | 16 +++++++++++++++- packages/client-github/package.json | 16 +++++++++++++++- packages/client-lens/package.json | 16 +++++++++++++++- packages/client-slack/package.json | 16 +++++++++++++++- packages/client-telegram/package.json | 16 +++++++++++++++- packages/client-twitter/package.json | 16 +++++++++++++++- packages/core/package.json | 18 ++++++++++++++++-- packages/core/tsconfig.json | 7 +++++-- packages/plugin-0g/package.json | 16 +++++++++++++++- packages/plugin-3d-generation/package.json | 16 +++++++++++++++- packages/plugin-abstract/package.json | 16 +++++++++++++++- packages/plugin-aptos/package.json | 16 +++++++++++++++- packages/plugin-avalanche/package.json | 16 +++++++++++++++- packages/plugin-bootstrap/package.json | 16 +++++++++++++++- packages/plugin-coinbase/package.json | 16 +++++++++++++++- packages/plugin-conflux/package.json | 16 +++++++++++++++- packages/plugin-cronoszkevm/package.json | 16 +++++++++++++++- packages/plugin-echochambers/package.json | 16 +++++++++++++++- packages/plugin-evm/package.json | 16 +++++++++++++++- packages/plugin-ferePro/package.json | 14 ++++++++++++++ packages/plugin-flow/package.json | 16 +++++++++++++++- packages/plugin-fuel/package.json | 16 +++++++++++++++- packages/plugin-gitbook/package.json | 11 ++++++++--- packages/plugin-goat/package.json | 16 +++++++++++++++- packages/plugin-icp/package.json | 16 +++++++++++++++- packages/plugin-image-generation/package.json | 16 +++++++++++++++- packages/plugin-intiface/package.json | 16 +++++++++++++++- packages/plugin-multiversx/package.json | 16 +++++++++++++++- packages/plugin-near/package.json | 16 +++++++++++++++- packages/plugin-nft-generation/package.json | 16 +++++++++++++++- packages/plugin-node/package.json | 13 ++++++++++++- packages/plugin-solana/package.json | 16 +++++++++++++++- packages/plugin-starknet/package.json | 16 +++++++++++++++- packages/plugin-story/package.json | 16 +++++++++++++++- packages/plugin-sui/package.json | 16 +++++++++++++++- packages/plugin-tee/package.json | 16 +++++++++++++++- packages/plugin-ton/package.json | 16 +++++++++++++++- packages/plugin-trustdb/package.json | 16 +++++++++++++++- packages/plugin-twitter/package.json | 16 +++++++++++++++- packages/plugin-video-generation/package.json | 16 +++++++++++++++- packages/plugin-web-search/package.json | 16 +++++++++++++++- packages/plugin-whatsapp/package.json | 15 +++++++++++++++ packages/plugin-zksync-era/package.json | 16 +++++++++++++++- 51 files changed, 744 insertions(+), 52 deletions(-) diff --git a/packages/adapter-postgres/package.json b/packages/adapter-postgres/package.json index 75c5a929a6..c475357bdd 100644 --- a/packages/adapter-postgres/package.json +++ b/packages/adapter-postgres/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/adapter-postgres", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@types/pg": "8.11.10", diff --git a/packages/adapter-redis/package.json b/packages/adapter-redis/package.json index 7c72b6380e..0c07d20858 100644 --- a/packages/adapter-redis/package.json +++ b/packages/adapter-redis/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/adapter-redis", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "ioredis": "5.4.2" diff --git a/packages/adapter-sqlite/package.json b/packages/adapter-sqlite/package.json index 5189a30740..c129476e69 100644 --- a/packages/adapter-sqlite/package.json +++ b/packages/adapter-sqlite/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/adapter-sqlite", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@types/better-sqlite3": "7.6.12", diff --git a/packages/adapter-sqljs/package.json b/packages/adapter-sqljs/package.json index 144dc16f90..e7cc40f221 100644 --- a/packages/adapter-sqljs/package.json +++ b/packages/adapter-sqljs/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/adapter-sqljs", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@types/sql.js": "1.4.9", diff --git a/packages/adapter-supabase/package.json b/packages/adapter-supabase/package.json index 158998e555..d5265c32c0 100644 --- a/packages/adapter-supabase/package.json +++ b/packages/adapter-supabase/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/adapter-supabase", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@supabase/supabase-js": "2.46.2" diff --git a/packages/client-auto/package.json b/packages/client-auto/package.json index 637d85f86d..3802a33d3a 100644 --- a/packages/client-auto/package.json +++ b/packages/client-auto/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/client-auto", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@types/body-parser": "1.19.5", diff --git a/packages/client-direct/package.json b/packages/client-direct/package.json index 69eb47e656..58fc4ea7cf 100644 --- a/packages/client-direct/package.json +++ b/packages/client-direct/package.json @@ -2,8 +2,22 @@ "name": "@elizaos/client-direct", "version": "0.1.7-alpha.2", "main": "dist/index.js", + "module": "dist/index.js", "type": "module", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-image-generation": "workspace:*", diff --git a/packages/client-discord/package.json b/packages/client-discord/package.json index f7e08d93e5..3a16500026 100644 --- a/packages/client-discord/package.json +++ b/packages/client-discord/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/client-discord", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-node": "workspace:*", diff --git a/packages/client-farcaster/package.json b/packages/client-farcaster/package.json index 9fdd14a988..b9a51a482e 100644 --- a/packages/client-farcaster/package.json +++ b/packages/client-farcaster/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/client-farcaster", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@neynar/nodejs-sdk": "^2.0.3" diff --git a/packages/client-github/package.json b/packages/client-github/package.json index d638f8453c..4e8b8c1982 100644 --- a/packages/client-github/package.json +++ b/packages/client-github/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/client-github", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@octokit/rest": "20.1.1", diff --git a/packages/client-lens/package.json b/packages/client-lens/package.json index 93bb1f1545..bed926b7c2 100644 --- a/packages/client-lens/package.json +++ b/packages/client-lens/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/client-lens", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@lens-protocol/client": "2.2.0", diff --git a/packages/client-slack/package.json b/packages/client-slack/package.json index 439dee852e..fa2ad98263 100644 --- a/packages/client-slack/package.json +++ b/packages/client-slack/package.json @@ -2,9 +2,23 @@ "name": "@elizaos/client-slack", "version": "0.1.7-alpha.2", "description": "Slack client plugin for Eliza framework", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "scripts": { "build": "tsup src/index.ts --format esm --dts", "test": "jest", diff --git a/packages/client-telegram/package.json b/packages/client-telegram/package.json index f7821e8205..e8b29f4a25 100644 --- a/packages/client-telegram/package.json +++ b/packages/client-telegram/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/client-telegram", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@telegraf/types": "7.1.0", diff --git a/packages/client-twitter/package.json b/packages/client-twitter/package.json index 08f2c81868..92138171de 100644 --- a/packages/client-twitter/package.json +++ b/packages/client-twitter/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/client-twitter", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "agent-twitter-client": "0.0.17", diff --git a/packages/core/package.json b/packages/core/package.json index e25b865ae1..109a039cf9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,10 +1,24 @@ { "name": "@elizaos/core", - "version": "0.1.7-alpha.2", + "version": "0.1.7-alpha.1", "description": "", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "scripts": { "build": "tsup --format esm --dts", "lint": "eslint --fix --cache .", diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json index f2e2793008..c19e06bb64 100644 --- a/packages/core/tsconfig.json +++ b/packages/core/tsconfig.json @@ -22,7 +22,10 @@ "checkJs": false, "noEmitOnError": false, "moduleDetection": "force", - "allowArbitraryExtensions": true + "allowArbitraryExtensions": true, + "customConditions": [ + "@elizaos/source" + ], }, "include": [ "src/**/*" @@ -33,4 +36,4 @@ "src/**/*.d.ts", "types/**/*.test.ts" ] -} \ No newline at end of file +} diff --git a/packages/plugin-0g/package.json b/packages/plugin-0g/package.json index d46a05b38d..b9e9b4ba46 100644 --- a/packages/plugin-0g/package.json +++ b/packages/plugin-0g/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-0g", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@0glabs/0g-ts-sdk": "0.2.1", "@elizaos/core": "workspace:*", diff --git a/packages/plugin-3d-generation/package.json b/packages/plugin-3d-generation/package.json index 30b4982c79..cbf4eff5b7 100644 --- a/packages/plugin-3d-generation/package.json +++ b/packages/plugin-3d-generation/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-3d-generation", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "tsup": "8.3.5", diff --git a/packages/plugin-abstract/package.json b/packages/plugin-abstract/package.json index ab9b49b789..a16268fb7e 100644 --- a/packages/plugin-abstract/package.json +++ b/packages/plugin-abstract/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-abstract", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "tsup": "^8.3.5", diff --git a/packages/plugin-aptos/package.json b/packages/plugin-aptos/package.json index bc1badd89b..520ae327d9 100644 --- a/packages/plugin-aptos/package.json +++ b/packages/plugin-aptos/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-aptos", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@aptos-labs/ts-sdk": "^1.26.0", diff --git a/packages/plugin-avalanche/package.json b/packages/plugin-avalanche/package.json index 088a63a6b3..fcbcd1437b 100644 --- a/packages/plugin-avalanche/package.json +++ b/packages/plugin-avalanche/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-avalanche", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "viem": "2.21.49" diff --git a/packages/plugin-bootstrap/package.json b/packages/plugin-bootstrap/package.json index ca8315d577..6b5a68ffe7 100644 --- a/packages/plugin-bootstrap/package.json +++ b/packages/plugin-bootstrap/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-bootstrap", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "tsup": "8.3.5" diff --git a/packages/plugin-coinbase/package.json b/packages/plugin-coinbase/package.json index d38fa91754..9444120567 100644 --- a/packages/plugin-coinbase/package.json +++ b/packages/plugin-coinbase/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-coinbase", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "coinbase-api": "1.0.5", diff --git a/packages/plugin-conflux/package.json b/packages/plugin-conflux/package.json index fae1c6606b..9e925d12d5 100644 --- a/packages/plugin-conflux/package.json +++ b/packages/plugin-conflux/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-conflux", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "cive": "0.7.1" diff --git a/packages/plugin-cronoszkevm/package.json b/packages/plugin-cronoszkevm/package.json index 4400a41a79..e1be0eee39 100644 --- a/packages/plugin-cronoszkevm/package.json +++ b/packages/plugin-cronoszkevm/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-cronoszkevm", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-trustdb": "workspace:*", diff --git a/packages/plugin-echochambers/package.json b/packages/plugin-echochambers/package.json index 0ba158d2f5..309e194a17 100644 --- a/packages/plugin-echochambers/package.json +++ b/packages/plugin-echochambers/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-echochambers", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-node": "workspace:*" diff --git a/packages/plugin-evm/package.json b/packages/plugin-evm/package.json index ce1c38085c..322c85aa9e 100644 --- a/packages/plugin-evm/package.json +++ b/packages/plugin-evm/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-evm", "version": "0.1.7-alpha.1", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-tee": "workspace:*", diff --git a/packages/plugin-ferePro/package.json b/packages/plugin-ferePro/package.json index c65e8e429f..d1a1679dee 100644 --- a/packages/plugin-ferePro/package.json +++ b/packages/plugin-ferePro/package.json @@ -2,8 +2,22 @@ "name": "@elizaos/plugin-ferepro", "version": "0.1.7-alpha.2", "main": "dist/index.js", + "module": "dist/index.js", "type": "module", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "^0.1.7-alpha.1", "tsup": "^8.3.5", diff --git a/packages/plugin-flow/package.json b/packages/plugin-flow/package.json index 60c6da7460..a7bec5c6d7 100644 --- a/packages/plugin-flow/package.json +++ b/packages/plugin-flow/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-flow", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@onflow/config": "1.5.1", diff --git a/packages/plugin-fuel/package.json b/packages/plugin-fuel/package.json index 0a2648cca2..3dd9ea1684 100644 --- a/packages/plugin-fuel/package.json +++ b/packages/plugin-fuel/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-fuel", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "fuels": "0.97.2", diff --git a/packages/plugin-gitbook/package.json b/packages/plugin-gitbook/package.json index 54ac0210c5..d4570243c2 100644 --- a/packages/plugin-gitbook/package.json +++ b/packages/plugin-gitbook/package.json @@ -1,13 +1,18 @@ { "name": "@elizaos/plugin-gitbook", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", "exports": { + "./package.json": "./package.json", ".": { - "import": "./dist/index.js", - "types": "./dist/index.d.ts" + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } } }, "files": [ diff --git a/packages/plugin-goat/package.json b/packages/plugin-goat/package.json index 931ad5287b..0f20e1b95a 100644 --- a/packages/plugin-goat/package.json +++ b/packages/plugin-goat/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-goat", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@goat-sdk/core": "0.3.8", diff --git a/packages/plugin-icp/package.json b/packages/plugin-icp/package.json index 411aa868e8..c0d4672f18 100644 --- a/packages/plugin-icp/package.json +++ b/packages/plugin-icp/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-icp", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@dfinity/agent": "2.1.3", diff --git a/packages/plugin-image-generation/package.json b/packages/plugin-image-generation/package.json index 369bd98299..2197217c76 100644 --- a/packages/plugin-image-generation/package.json +++ b/packages/plugin-image-generation/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-image-generation", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "tsup": "8.3.5" diff --git a/packages/plugin-intiface/package.json b/packages/plugin-intiface/package.json index 0dd3f6d53e..42b3060ac9 100644 --- a/packages/plugin-intiface/package.json +++ b/packages/plugin-intiface/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-intiface", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "buttplug": "3.2.2", diff --git a/packages/plugin-multiversx/package.json b/packages/plugin-multiversx/package.json index 92a86f9cbf..b62c89c1bf 100644 --- a/packages/plugin-multiversx/package.json +++ b/packages/plugin-multiversx/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-multiversx", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@multiversx/sdk-core": "13.15.0", diff --git a/packages/plugin-near/package.json b/packages/plugin-near/package.json index b7e74c07d2..003d11c863 100644 --- a/packages/plugin-near/package.json +++ b/packages/plugin-near/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-near", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@ref-finance/ref-sdk": "^1.4.6", diff --git a/packages/plugin-nft-generation/package.json b/packages/plugin-nft-generation/package.json index 80e55d0604..0c629aa0a8 100644 --- a/packages/plugin-nft-generation/package.json +++ b/packages/plugin-nft-generation/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-nft-generation", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-image-generation": "workspace:*", diff --git a/packages/plugin-node/package.json b/packages/plugin-node/package.json index 31d9d3fa5f..8f591f872d 100644 --- a/packages/plugin-node/package.json +++ b/packages/plugin-node/package.json @@ -1,9 +1,20 @@ { "name": "@elizaos/plugin-node", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, "files": [ "dist", "scripts", diff --git a/packages/plugin-solana/package.json b/packages/plugin-solana/package.json index 6f4fb1c9bb..25a5b274ff 100644 --- a/packages/plugin-solana/package.json +++ b/packages/plugin-solana/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-solana", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-trustdb": "workspace:*", diff --git a/packages/plugin-starknet/package.json b/packages/plugin-starknet/package.json index 05e90a1475..8a81e0f46d 100644 --- a/packages/plugin-starknet/package.json +++ b/packages/plugin-starknet/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-starknet", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-trustdb": "workspace:*", diff --git a/packages/plugin-story/package.json b/packages/plugin-story/package.json index a553f92394..e1d7f9b66d 100644 --- a/packages/plugin-story/package.json +++ b/packages/plugin-story/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-story", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-trustdb": "workspace:*", diff --git a/packages/plugin-sui/package.json b/packages/plugin-sui/package.json index 12d47ec71a..142a8fc097 100644 --- a/packages/plugin-sui/package.json +++ b/packages/plugin-sui/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-sui", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-trustdb": "workspace:*", diff --git a/packages/plugin-tee/package.json b/packages/plugin-tee/package.json index ac931632d3..5b7f85d860 100644 --- a/packages/plugin-tee/package.json +++ b/packages/plugin-tee/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-tee", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@phala/dstack-sdk": "0.1.6", diff --git a/packages/plugin-ton/package.json b/packages/plugin-ton/package.json index bda0e68bcf..337abf7423 100644 --- a/packages/plugin-ton/package.json +++ b/packages/plugin-ton/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-ton", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-trustdb": "workspace:*", diff --git a/packages/plugin-trustdb/package.json b/packages/plugin-trustdb/package.json index 57e2894cf4..972e355f8c 100644 --- a/packages/plugin-trustdb/package.json +++ b/packages/plugin-trustdb/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-trustdb", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "dompurify": "3.2.2", diff --git a/packages/plugin-twitter/package.json b/packages/plugin-twitter/package.json index 13dbc5cf04..3f5db83d29 100644 --- a/packages/plugin-twitter/package.json +++ b/packages/plugin-twitter/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-twitter", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "agent-twitter-client": "0.0.17", diff --git a/packages/plugin-video-generation/package.json b/packages/plugin-video-generation/package.json index b8c50d0f5f..9c9ac1105d 100644 --- a/packages/plugin-video-generation/package.json +++ b/packages/plugin-video-generation/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-video-generation", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "tsup": "8.3.5" diff --git a/packages/plugin-web-search/package.json b/packages/plugin-web-search/package.json index 1d87e98b91..6c9cafb857 100644 --- a/packages/plugin-web-search/package.json +++ b/packages/plugin-web-search/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-web-search", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "tsup": "8.3.5" diff --git a/packages/plugin-whatsapp/package.json b/packages/plugin-whatsapp/package.json index 38b1116469..8f7cc5696a 100644 --- a/packages/plugin-whatsapp/package.json +++ b/packages/plugin-whatsapp/package.json @@ -2,8 +2,23 @@ "name": "@elizaos/plugin-whatsapp", "version": "0.1.7-alpha.2", "description": "WhatsApp Cloud API plugin", + "type": "module", "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", diff --git a/packages/plugin-zksync-era/package.json b/packages/plugin-zksync-era/package.json index 9c730645f1..5f7b0a0dea 100644 --- a/packages/plugin-zksync-era/package.json +++ b/packages/plugin-zksync-era/package.json @@ -1,9 +1,23 @@ { "name": "@elizaos/plugin-zksync-era", "version": "0.1.7-alpha.2", - "main": "dist/index.js", "type": "module", + "main": "dist/index.js", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + "./package.json": "./package.json", + ".": { + "import": { + "@elizaos/source": "./src/index.ts", + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "files": [ + "dist" + ], "dependencies": { "@elizaos/core": "workspace:*", "@elizaos/plugin-trustdb": "workspace:*", From a1fe88961fd8f532447f16c59bd6f02aa665a647 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 07:11:00 -0500 Subject: [PATCH 02/37] add tokenization service --- packages/core/src/types.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index dfc19c2eb2..74d2d07c88 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -1226,6 +1226,14 @@ export interface IAwsS3Service extends Service { generateSignedUrl(fileName: string, expiresIn: number): Promise; } +export interface ITokenizationService extends Service { + trimTokens( + context: string, + maxTokens: number, + model?: string + ): Promise; +} + export type SearchResult = { title: string; url: string; @@ -1255,6 +1263,7 @@ export enum ServiceType { AWS_S3 = "aws_s3", BUTTPLUG = "buttplug", SLACK = "slack", + TOKENIZATION = "tokenization", } export enum LoggingLevel { @@ -1278,3 +1287,8 @@ export interface ActionResponse { export interface ISlackService extends Service { client: any; } + +export enum TokenizerType { + Auto = "auto", + TikToken = "tiktoken", +} From 0eaae1f7982b49886a97fbc0a3f55f713a8a0c86 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 07:11:53 -0500 Subject: [PATCH 03/37] add tokenization service --- .../plugin-node/src/services/tokenizer.ts | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 packages/plugin-node/src/services/tokenizer.ts diff --git a/packages/plugin-node/src/services/tokenizer.ts b/packages/plugin-node/src/services/tokenizer.ts new file mode 100644 index 0000000000..28f6bf7cb5 --- /dev/null +++ b/packages/plugin-node/src/services/tokenizer.ts @@ -0,0 +1,106 @@ +import { elizaLogger } from "@elizaos/core"; +import { Service } from "@elizaos/core"; +import { + IAgentRuntime, + ServiceType, + ITokenizationService, + TokenizerType, +} from "@elizaos/core"; +import { AutoTokenizer } from "@huggingface/transformers"; + +import { encodingForModel, TiktokenModel } from "js-tiktoken"; + +export class TokenizationService + extends Service + implements ITokenizationService +{ + static serviceType: ServiceType = ServiceType.TOKENIZATION; + + private runtime: IAgentRuntime | null = null; + + getInstance(): ITokenizationService { + return TokenizationService.getInstance(); + } + + async initialize(runtime: IAgentRuntime): Promise { + elizaLogger.log("Initializing TokenizationService"); + this.runtime = runtime; + } + + async trimTokens(context: string, maxTokens: number, model: string) { + const tokenizerModel = + this.runtime.getSetting("TOKENIZER_MODEL") || model; + const tokenizerType = this.runtime.getSetting("TOKENIZER_TYPE"); + + switch (tokenizerType) { + case TokenizerType.Auto: + return this.truncateAuto(tokenizerModel, context, maxTokens); + + case TokenizerType.TikToken: + return this.truncateTiktoken( + tokenizerModel as TiktokenModel, + context, + maxTokens + ); + + default: + return this.truncateTiktoken( + model as TiktokenModel, + context, + maxTokens + ); + } + } + + async truncateAuto(modelPath: string, context: string, maxTokens: number) { + try { + const tokenizer = await AutoTokenizer.from_pretrained(modelPath); + const tokens = tokenizer.encode(context); + + // If already within limits, return unchanged + if (tokens.length <= maxTokens) { + return context; + } + + // Keep the most recent tokens by slicing from the end + const truncatedTokens = tokens.slice(-maxTokens); + + // Decode back to text - js-tiktoken decode() returns a string directly + return tokenizer.decode(truncatedTokens); + } catch (error) { + console.error("Error in trimTokens:", error); + // Return truncated string if tokenization fails + return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token + } + } + + async truncateTiktoken( + model: TiktokenModel, + context: string, + maxTokens: number + ) { + const encoding = encodingForModel(model); + + try { + // Encode the text into tokens + const tokens = encoding.encode(context); + + // If already within limits, return unchanged + if (tokens.length <= maxTokens) { + return context; + } + + // Keep the most recent tokens by slicing from the end + const truncatedTokens = tokens.slice(-maxTokens); + + // Decode back to text - js-tiktoken decode() returns a string directly + return encoding.decode(truncatedTokens); + } catch (error) { + console.error("Error in trimTokens:", error); + // Return truncated string if tokenization fails + return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token + } + } +} + +export default TokenizationService; From 1d08e175b1e5affc899522b6a3df363459822e82 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 07:12:16 -0500 Subject: [PATCH 04/37] add tokenization service --- packages/plugin-node/src/index.ts | 2 ++ packages/plugin-node/src/services/index.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/plugin-node/src/index.ts b/packages/plugin-node/src/index.ts index 17ef56e4d5..3f605c1b3b 100644 --- a/packages/plugin-node/src/index.ts +++ b/packages/plugin-node/src/index.ts @@ -11,6 +11,7 @@ import { TranscriptionService, VideoService, AwsS3Service, + TokenizationService, } from "./services/index.ts"; import { describeImage } from "./actions/describe-image.ts"; @@ -29,6 +30,7 @@ export function createNodePlugin() { new TranscriptionService(), new VideoService(), new AwsS3Service(), + new TokenizationService(), ], actions: [describeImage], } as const satisfies Plugin; diff --git a/packages/plugin-node/src/services/index.ts b/packages/plugin-node/src/services/index.ts index 6e4be71cdf..09ba4dda88 100644 --- a/packages/plugin-node/src/services/index.ts +++ b/packages/plugin-node/src/services/index.ts @@ -6,6 +6,7 @@ import { SpeechService } from "./speech.ts"; import { TranscriptionService } from "./transcription.ts"; import { VideoService } from "./video.ts"; import { AwsS3Service } from "./awsS3.ts"; +import { TokenizationService } from "./tokenizer.ts"; export { BrowserService, @@ -16,4 +17,5 @@ export { TranscriptionService, VideoService, AwsS3Service, + TokenizationService, }; From 5687fe8b02c0472e7cdeab706fb7e15e1b8d0d69 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 07:13:35 -0500 Subject: [PATCH 05/37] use tokenization service to trim tokens --- packages/core/src/generation.ts | 135 +++++++++++++++++++------------- 1 file changed, 82 insertions(+), 53 deletions(-) diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 67ed1b664a..53cef21bc3 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -34,6 +34,7 @@ import { ServiceType, SearchResponse, ActionResponse, + ITokenizationService, } from "./types.ts"; import { fal } from "@fal-ai/client"; @@ -171,7 +172,15 @@ export async function generateText({ elizaLogger.debug( `Trimming context to max length of ${max_context_length} tokens.` ); - context = await trimTokens(context, max_context_length, "gpt-4o"); + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); + + context = await tokenizationService.trimTokens( + context, + max_context_length, + model + ); let response: string; @@ -905,9 +914,19 @@ export async function generateMessageResponse({ context: string; modelClass: string; }): Promise { - const max_context_length = - models[runtime.modelProvider].settings.maxInputTokens; - context = trimTokens(context, max_context_length, "gpt-4o"); + const provider = runtime.modelProvider; + const model = models[provider].model[modelClass]; + const max_context_length = models[provider].settings.maxInputTokens; + + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); + + context = await tokenizationService.trimTokens( + context, + max_context_length, + model + ); let retryLength = 1000; // exponential backoff while (true) { try { @@ -966,33 +985,35 @@ export const generateImage = async ( }); const apiKey = - runtime.imageModelProvider === runtime.modelProvider - ? runtime.token - : (() => { - // First try to match the specific provider - switch (runtime.imageModelProvider) { - case ModelProviderName.HEURIST: - return runtime.getSetting("HEURIST_API_KEY"); - case ModelProviderName.TOGETHER: - return runtime.getSetting("TOGETHER_API_KEY"); - case ModelProviderName.FAL: - return runtime.getSetting("FAL_API_KEY"); - case ModelProviderName.OPENAI: - return runtime.getSetting("OPENAI_API_KEY"); - case ModelProviderName.VENICE: - return runtime.getSetting("VENICE_API_KEY"); - case ModelProviderName.LIVEPEER: - return runtime.getSetting("LIVEPEER_GATEWAY_URL"); - default: - // If no specific match, try the fallback chain - return (runtime.getSetting("HEURIST_API_KEY") ?? - runtime.getSetting("TOGETHER_API_KEY") ?? - runtime.getSetting("FAL_API_KEY") ?? - runtime.getSetting("OPENAI_API_KEY") ?? - runtime.getSetting("VENICE_API_KEY"))?? - runtime.getSetting("LIVEPEER_GATEWAY_URL"); - } - })(); + runtime.imageModelProvider === runtime.modelProvider + ? runtime.token + : (() => { + // First try to match the specific provider + switch (runtime.imageModelProvider) { + case ModelProviderName.HEURIST: + return runtime.getSetting("HEURIST_API_KEY"); + case ModelProviderName.TOGETHER: + return runtime.getSetting("TOGETHER_API_KEY"); + case ModelProviderName.FAL: + return runtime.getSetting("FAL_API_KEY"); + case ModelProviderName.OPENAI: + return runtime.getSetting("OPENAI_API_KEY"); + case ModelProviderName.VENICE: + return runtime.getSetting("VENICE_API_KEY"); + case ModelProviderName.LIVEPEER: + return runtime.getSetting("LIVEPEER_GATEWAY_URL"); + default: + // If no specific match, try the fallback chain + return ( + runtime.getSetting("HEURIST_API_KEY") ?? + runtime.getSetting("TOGETHER_API_KEY") ?? + runtime.getSetting("FAL_API_KEY") ?? + runtime.getSetting("OPENAI_API_KEY") ?? + runtime.getSetting("VENICE_API_KEY") ?? + runtime.getSetting("LIVEPEER_GATEWAY_URL") + ); + } + })(); try { if (runtime.imageModelProvider === ModelProviderName.HEURIST) { const response = await fetch( @@ -1182,28 +1203,31 @@ export const generateImage = async ( }); return { success: true, data: base64s }; - } else if (runtime.imageModelProvider === ModelProviderName.LIVEPEER) { if (!apiKey) { throw new Error("Livepeer Gateway is not defined"); } try { const baseUrl = new URL(apiKey); - if (!baseUrl.protocol.startsWith('http')) { + if (!baseUrl.protocol.startsWith("http")) { throw new Error("Invalid Livepeer Gateway URL protocol"); } - const response = await fetch(`${baseUrl.toString()}text-to-image`, { - method: "POST", - headers: { - "Content-Type": "application/json" - }, - body: JSON.stringify({ - model_id: data.modelId || "ByteDance/SDXL-Lightning", - prompt: data.prompt, - width: data.width || 1024, - height: data.height || 1024 - }) - }); + const response = await fetch( + `${baseUrl.toString()}text-to-image`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + model_id: + data.modelId || "ByteDance/SDXL-Lightning", + prompt: data.prompt, + width: data.width || 1024, + height: data.height || 1024, + }), + } + ); const result = await response.json(); if (!result.images?.length) { throw new Error("No images generated"); @@ -1225,19 +1249,19 @@ export const generateImage = async ( } const blob = await imageResponse.blob(); const arrayBuffer = await blob.arrayBuffer(); - const base64 = Buffer.from(arrayBuffer).toString("base64"); + const base64 = + Buffer.from(arrayBuffer).toString("base64"); return `data:image/jpeg;base64,${base64}`; }) ); return { success: true, - data: base64Images + data: base64Images, }; } catch (error) { console.error(error); return { success: false, error: error }; } - } else { let targetSize = `${data.width}x${data.height}`; if ( @@ -1383,10 +1407,7 @@ export const generateObject = async ({ } const provider = runtime.modelProvider; - const model = models[provider].model[modelClass] as TiktokenModel; - if (!model) { - throw new Error(`Unsupported model class: ${modelClass}`); - } + const model = models[provider].model[modelClass]; const temperature = models[provider].settings.temperature; const frequency_penalty = models[provider].settings.frequency_penalty; const presence_penalty = models[provider].settings.presence_penalty; @@ -1395,7 +1416,15 @@ export const generateObject = async ({ const apiKey = runtime.token; try { - context = trimTokens(context, max_context_length, model); + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); + + context = await tokenizationService.trimTokens( + context, + max_context_length, + model + ); const modelOptions: ModelSettings = { prompt: context, From ddb1be5bd39ae500a5510c13f9585cb391ca8511 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 14:46:51 -0500 Subject: [PATCH 06/37] remove trimtokens function --- packages/core/src/generation.ts | 40 --------------------------------- 1 file changed, 40 deletions(-) diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 53cef21bc3..ba9d2f9c14 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -11,7 +11,6 @@ import { import { Buffer } from "buffer"; import { createOllama } from "ollama-ai-provider"; import OpenAI from "openai"; -import { encodingForModel, TiktokenModel } from "js-tiktoken"; import Together from "together-ai"; import { ZodSchema } from "zod"; import { elizaLogger } from "./index.ts"; @@ -594,45 +593,6 @@ export async function generateText({ } } -/** - * Truncate the context to the maximum length allowed by the model. - * @param context The text to truncate - * @param maxTokens Maximum number of tokens to keep - * @param model The tokenizer model to use - * @returns The truncated text - */ -export function trimTokens( - context: string, - maxTokens: number, - model: TiktokenModel -): string { - if (!context) return ""; - if (maxTokens <= 0) throw new Error("maxTokens must be positive"); - - // Get the tokenizer for the model - const encoding = encodingForModel(model); - - try { - // Encode the text into tokens - const tokens = encoding.encode(context); - - // If already within limits, return unchanged - if (tokens.length <= maxTokens) { - return context; - } - - // Keep the most recent tokens by slicing from the end - const truncatedTokens = tokens.slice(-maxTokens); - - // Decode back to text - js-tiktoken decode() returns a string directly - return encoding.decode(truncatedTokens); - } catch (error) { - console.error("Error in trimTokens:", error); - // Return truncated string if tokenization fails - return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token - } -} - /** * Sends a message to the model to determine if it should respond to the given context. * @param opts - The options for the generateText request From 12c7ad100ac03723887088aa76924901df9863d2 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 14:48:02 -0500 Subject: [PATCH 07/37] remove trimtokens test --- packages/core/src/tests/generation.test.ts | 60 +--------------------- 1 file changed, 1 insertion(+), 59 deletions(-) diff --git a/packages/core/src/tests/generation.test.ts b/packages/core/src/tests/generation.test.ts index f1ec8f9bc6..6eba5017d5 100644 --- a/packages/core/src/tests/generation.test.ts +++ b/packages/core/src/tests/generation.test.ts @@ -1,12 +1,7 @@ import { describe, expect, it, vi, beforeEach } from "vitest"; import { ModelProviderName, IAgentRuntime } from "../types"; import { models } from "../models"; -import { - generateText, - generateTrueOrFalse, - splitChunks, - trimTokens, -} from "../generation"; +import { generateText, generateTrueOrFalse, splitChunks } from "../generation"; import type { TiktokenModel } from "js-tiktoken"; // Mock the elizaLogger @@ -128,57 +123,4 @@ describe("Generation", () => { expect(chunks).toEqual([content]); }); }); - - describe("trimTokens", () => { - const model = "gpt-4" as TiktokenModel; - - it("should return empty string for empty input", () => { - const result = trimTokens("", 100, model); - expect(result).toBe(""); - }); - - it("should throw error for negative maxTokens", () => { - expect(() => trimTokens("test", -1, model)).toThrow( - "maxTokens must be positive" - ); - }); - - it("should return unchanged text if within token limit", () => { - const shortText = "This is a short text"; - const result = trimTokens(shortText, 10, model); - expect(result).toBe(shortText); - }); - - it("should truncate text to specified token limit", () => { - // Using a longer text that we know will exceed the token limit - const longText = - "This is a much longer text that will definitely exceed our very small token limit and need to be truncated to fit within the specified constraints."; - const result = trimTokens(longText, 5, model); - - // The exact result will depend on the tokenizer, but we can verify: - // 1. Result is shorter than original - expect(result.length).toBeLessThan(longText.length); - // 2. Result is not empty - expect(result.length).toBeGreaterThan(0); - // 3. Result is a proper substring of the original text - expect(longText.includes(result)).toBe(true); - }); - - it("should handle non-ASCII characters", () => { - const unicodeText = "Hello 👋 World 🌍"; - const result = trimTokens(unicodeText, 5, model); - expect(result.length).toBeGreaterThan(0); - }); - - it("should handle multiline text", () => { - const multilineText = `Line 1 - Line 2 - Line 3 - Line 4 - Line 5`; - const result = trimTokens(multilineText, 5, model); - expect(result.length).toBeGreaterThan(0); - expect(result.length).toBeLessThan(multilineText.length); - }); - }); }); From c3d188a78195489beb99991fafff17c2095b36ba Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 14:49:20 -0500 Subject: [PATCH 08/37] use tokenization service to trim token --- .../src/actions/chat_with_attachments.ts | 17 +++++++++++------ .../src/actions/summarize_conversation.ts | 18 ++++++++++++------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/packages/client-slack/src/actions/chat_with_attachments.ts b/packages/client-slack/src/actions/chat_with_attachments.ts index dd74af905a..303ec65476 100644 --- a/packages/client-slack/src/actions/chat_with_attachments.ts +++ b/packages/client-slack/src/actions/chat_with_attachments.ts @@ -1,7 +1,6 @@ import { composeContext, generateText, - trimTokens, parseJSONObjectFromText, } from "@elizaos/core"; import { models } from "@elizaos/core"; @@ -15,6 +14,8 @@ import { Memory, ModelClass, State, + ServiceType, + ITokenizationService, } from "@elizaos/core"; export const summarizationTemplate = `# Summarized so far (we are adding to this) @@ -200,13 +201,17 @@ const summarizeAction: Action = { currentState.attachmentsWithText = attachmentsWithText; currentState.objective = objective; + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); + const template = await tokenizationService.trimTokens( + summarizationTemplate, + chunkSize + 500, + model.model[ModelClass.SMALL] || "gpt-4o-mini" + ); const context = composeContext({ state: currentState, - template: trimTokens( - summarizationTemplate, - chunkSize + 500, - "gpt-4o-mini" - ), + template, }); const summary = await generateText({ diff --git a/packages/client-slack/src/actions/summarize_conversation.ts b/packages/client-slack/src/actions/summarize_conversation.ts index 880c6ab0af..0568be10bf 100644 --- a/packages/client-slack/src/actions/summarize_conversation.ts +++ b/packages/client-slack/src/actions/summarize_conversation.ts @@ -2,7 +2,6 @@ import { composeContext, generateText, splitChunks, - trimTokens, parseJSONObjectFromText, } from "@elizaos/core"; import { models } from "@elizaos/core"; @@ -18,6 +17,8 @@ import { ModelClass, State, elizaLogger, + ServiceType, + ITokenizationService, } from "@elizaos/core"; import { ISlackService, SLACK_SERVICE_TYPE } from "../types/slack-types"; @@ -272,6 +273,9 @@ const summarizeAction: Action = { currentState.memoriesWithAttachments = formattedMemories; currentState.objective = objective; + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); // Only process one chunk at a time and stop after getting a valid summary for (let i = 0; i < chunks.length; i++) { @@ -279,13 +283,15 @@ const summarizeAction: Action = { currentState.currentSummary = currentSummary; currentState.currentChunk = chunk; + const template = await tokenizationService.trimTokens( + summarizationTemplate, + chunkSize + 500, + model.model[ModelClass.SMALL] || "gpt-4o-mini" + ); + const context = composeContext({ state: currentState, - template: trimTokens( - summarizationTemplate, - chunkSize + 500, - "gpt-4o-mini" - ), + template, }); const summary = await generateText({ From 92077ffc93320ca76ec24e4bea542457dbdb0e52 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 14:49:44 -0500 Subject: [PATCH 09/37] use tokenization service to trim token --- packages/client-slack/src/attachments.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/packages/client-slack/src/attachments.ts b/packages/client-slack/src/attachments.ts index 79f8bcfe24..e181df14bd 100644 --- a/packages/client-slack/src/attachments.ts +++ b/packages/client-slack/src/attachments.ts @@ -1,8 +1,4 @@ -import { - generateText, - trimTokens, - parseJSONObjectFromText, -} from "@elizaos/core"; +import { generateText, parseJSONObjectFromText } from "@elizaos/core"; import { IAgentRuntime, IImageDescriptionService, @@ -12,6 +8,8 @@ import { Media, ModelClass, ServiceType, + ITokenizationService, + models, } from "@elizaos/core"; import { WebClient } from "@slack/web-api"; import ffmpeg from "fluent-ffmpeg"; @@ -21,7 +19,15 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { - text = trimTokens(text, 100000, "gpt-4o-mini"); + const model = models[runtime.character.modelProvider]; + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); + text = await tokenizationService.trimTokens( + text, + 100000, + model.model[ModelClass.SMALL] || "gpt-4o-mini" + ); const prompt = `Please generate a concise summary for the following text: From 9402599196cbaa38671d54964b98c2e44e51e75a Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 14:50:29 -0500 Subject: [PATCH 10/37] use tokenization service to trim token --- .../src/actions/chat_with_attachments.ts | 20 +++++++++++-------- .../src/actions/summarize_conversation.ts | 18 +++++++++++------ 2 files changed, 24 insertions(+), 14 deletions(-) diff --git a/packages/client-discord/src/actions/chat_with_attachments.ts b/packages/client-discord/src/actions/chat_with_attachments.ts index 61163651d9..3f5033ca31 100644 --- a/packages/client-discord/src/actions/chat_with_attachments.ts +++ b/packages/client-discord/src/actions/chat_with_attachments.ts @@ -1,5 +1,5 @@ import { composeContext } from "@elizaos/core"; -import { generateText, trimTokens } from "@elizaos/core"; +import { generateText } from "@elizaos/core"; import type { TiktokenModel } from "js-tiktoken"; import { models } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; @@ -12,6 +12,8 @@ import { Memory, ModelClass, State, + ServiceType, + ITokenizationService, } from "@elizaos/core"; import * as fs from "fs"; @@ -191,17 +193,19 @@ const summarizeAction = { state.attachmentsWithText = attachmentsWithText; state.objective = objective; - + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); + const template = await tokenizationService.trimTokens( + summarizationTemplate, + chunkSize + 500, + model.model[ModelClass.SMALL] || "gpt-4o-mini" + ); const context = composeContext({ state, // make sure it fits, we can pad the tokens a bit // Get the model's tokenizer based on the current model being used - template: trimTokens( - summarizationTemplate, - chunkSize + 500, - (model.model[ModelClass.SMALL] || - "gpt-4o-mini") as TiktokenModel // Use the same model as generation; Fallback if no SMALL model configured - ), + template, }); const summary = await generateText({ diff --git a/packages/client-discord/src/actions/summarize_conversation.ts b/packages/client-discord/src/actions/summarize_conversation.ts index 4a45673d78..deee8c041f 100644 --- a/packages/client-discord/src/actions/summarize_conversation.ts +++ b/packages/client-discord/src/actions/summarize_conversation.ts @@ -1,5 +1,5 @@ import { composeContext } from "@elizaos/core"; -import { generateText, splitChunks, trimTokens } from "@elizaos/core"; +import { generateText, splitChunks } from "@elizaos/core"; import { getActorDetails } from "@elizaos/core"; import { models } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; @@ -13,6 +13,8 @@ import { Memory, ModelClass, State, + ServiceType, + ITokenizationService, } from "@elizaos/core"; export const summarizationTemplate = `# Summarized so far (we are adding to this) {{currentSummary}} @@ -256,19 +258,23 @@ const summarizeAction = { state.memoriesWithAttachments = formattedMemories; state.objective = objective; + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); for (let i = 0; i < chunks.length; i++) { const chunk = chunks[i]; state.currentSummary = currentSummary; state.currentChunk = chunk; + const template = await tokenizationService.trimTokens( + summarizationTemplate, + chunkSize + 500, + model.model[ModelClass.SMALL] || "gpt-4o-mini" + ); const context = composeContext({ state, // make sure it fits, we can pad the tokens a bit - template: trimTokens( - summarizationTemplate, - chunkSize + 500, - "gpt-4o-mini" - ), + template, }); const summary = await generateText({ From b74194c997486ca14c76cb66322bb19e6616bbf1 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 14:51:12 -0500 Subject: [PATCH 11/37] use tokenization service to trim token --- packages/client-discord/src/attachments.ts | 14 ++++++++++++-- packages/client-discord/src/utils.ts | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/packages/client-discord/src/attachments.ts b/packages/client-discord/src/attachments.ts index 60a44cab2c..b9de535060 100644 --- a/packages/client-discord/src/attachments.ts +++ b/packages/client-discord/src/attachments.ts @@ -1,4 +1,4 @@ -import { generateText, trimTokens } from "@elizaos/core"; +import { generateText } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { IAgentRuntime, @@ -9,6 +9,8 @@ import { Media, ModelClass, ServiceType, + ITokenizationService, + models, } from "@elizaos/core"; import { Attachment, Collection } from "discord.js"; import ffmpeg from "fluent-ffmpeg"; @@ -18,8 +20,16 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { + const model = models[runtime.character.modelProvider]; + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); // make sure text is under 128k characters - text = trimTokens(text, 100000, "gpt-4o-mini"); // TODO: clean this up + text = await tokenizationService.trimTokens( + text, + 100000, + model.model[ModelClass.SMALL] || "gpt-4o-mini" + ); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/client-discord/src/utils.ts b/packages/client-discord/src/utils.ts index fad596b3c5..a3e47aa4f6 100644 --- a/packages/client-discord/src/utils.ts +++ b/packages/client-discord/src/utils.ts @@ -3,8 +3,10 @@ import { ModelClass, elizaLogger, generateText, - trimTokens, parseJSONObjectFromText, + ServiceType, + ITokenizationService, + models, } from "@elizaos/core"; import { ChannelType, @@ -47,7 +49,15 @@ export async function generateSummary( text: string ): Promise<{ title: string; description: string }> { // make sure text is under 128k characters - text = trimTokens(text, 100000, "gpt-4o-mini"); // TODO: clean this up + const model = models[runtime.character.modelProvider]; + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); + text = await tokenizationService.trimTokens( + text, + 100000, + model.model[ModelClass.SMALL] || "gpt-4o-mini" + ); const prompt = `Please generate a concise summary for the following text: From fc638e87623aae14ac57b89e16d2e4354faed6d5 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 14:52:50 -0500 Subject: [PATCH 12/37] use tokenization service to trim token --- packages/plugin-node/src/services/browser.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/packages/plugin-node/src/services/browser.ts b/packages/plugin-node/src/services/browser.ts index a083e2957c..08d063ba1b 100644 --- a/packages/plugin-node/src/services/browser.ts +++ b/packages/plugin-node/src/services/browser.ts @@ -1,4 +1,9 @@ -import { generateText, IBrowserService, trimTokens } from "@elizaos/core"; +import { + generateText, + IBrowserService, + ITokenizationService, + models, +} from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { Service } from "@elizaos/core"; import { settings } from "@elizaos/core"; @@ -12,8 +17,16 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { + const tokenizationService = runtime.getService( + ServiceType.TOKENIZATION + ); + const model = models[runtime.character.modelProvider]; // make sure text is under 128k characters - text = trimTokens(text, 100000, "gpt-4o-mini"); // TODO: clean this up + text = await tokenizationService.trimTokens( + text, + 100000, + model.model[ModelClass.SMALL] || "gpt-4o-mini" + ); const prompt = `Please generate a concise summary for the following text: From af97657523f1bea2b751a01b821d34575e7cf59b Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Tue, 31 Dec 2024 15:03:45 -0500 Subject: [PATCH 13/37] tokenizer setings --- .env.example | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.env.example b/.env.example index f54f552f6a..7ea2b9d103 100644 --- a/.env.example +++ b/.env.example @@ -356,3 +356,7 @@ CRONOSZKEVM_PRIVATE_KEY= # Fuel Ecosystem (FuelVM) FUEL_WALLET_PRIVATE_KEY= + +# Tokenizer Settings +TOKENIZER_MODEL= # Specify the tokenizer model to be used. +TOKENIZER_TYPE= # Options: tiktoken (for OpenAI models) or auto (AutoTokenizer from Hugging Face for non-OpenAI models). Default: tiktoken. From edcac596582a2c5abbe2595019644dc307e81091 Mon Sep 17 00:00:00 2001 From: Shakker Nerd Date: Fri, 3 Jan 2025 03:49:42 +0000 Subject: [PATCH 14/37] chore: pnpm lock file --- pnpm-lock.yaml | 932 ++++++++++++++++++++++++++----------------------- 1 file changed, 497 insertions(+), 435 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ee0f85cb10..fb36c5ef82 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -22,7 +22,7 @@ importers: version: 3.9.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) '@vitest/eslint-plugin': specifier: 1.0.1 - version: 1.0.1(@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + version: 1.0.1(@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) amqplib: specifier: 0.10.5 version: 0.10.5 @@ -47,7 +47,7 @@ importers: devDependencies: '@commitlint/cli': specifier: 18.6.1 - version: 18.6.1(@types/node@22.10.3)(typescript@5.6.3) + version: 18.6.1(@types/node@22.10.4)(typescript@5.6.3) '@commitlint/config-conventional': specifier: 18.6.3 version: 18.6.3 @@ -95,10 +95,10 @@ importers: version: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) vite: specifier: 5.4.11 - version: 5.4.11(@types/node@22.10.3)(terser@5.37.0) + version: 5.4.11(@types/node@22.10.4)(terser@5.37.0) vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) agent: dependencies: @@ -802,7 +802,7 @@ importers: version: 10.0.0 ai: specifier: 3.4.33 - version: 3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) + version: 3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) anthropic-vertex-ai: specifier: 1.0.2 version: 1.0.2(encoding@0.1.13)(zod@3.23.8) @@ -1032,7 +1032,7 @@ importers: version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1115,7 +1115,7 @@ importers: version: 4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) web3-plugin-zksync: specifier: ^1.0.8 - version: 1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.3)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1157,7 +1157,7 @@ importers: dependencies: '@elizaos/core': specifier: ^0.1.7-alpha.1 - version: 0.1.7-alpha.2(@google-cloud/vertexai@1.9.2(encoding@0.1.13))(@langchain/core@0.3.27(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.9)(encoding@0.1.13)(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0) + version: 0.1.7-alpha.2(@google-cloud/vertexai@1.9.2(encoding@0.1.13))(@langchain/core@0.3.27(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.9)(encoding@0.1.13)(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1) tsup: specifier: ^8.3.5 version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) @@ -1222,7 +1222,7 @@ importers: version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) packages/plugin-fuel: dependencies: @@ -1234,13 +1234,13 @@ importers: version: 4.0.1 fuels: specifier: 0.97.2 - version: 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + version: 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1261,7 +1261,7 @@ importers: version: link:../core '@goat-sdk/adapter-vercel-ai': specifier: 0.2.0 - version: 0.2.0(@goat-sdk/core@0.4.0)(ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8)) + version: 0.2.0(@goat-sdk/core@0.4.0)(ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8)) '@goat-sdk/core': specifier: 0.4.0 version: 0.4.0 @@ -1310,7 +1310,7 @@ importers: version: 29.5.14 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@22.10.3) + version: 29.7.0(@types/node@22.10.4) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) @@ -1373,7 +1373,7 @@ importers: version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1454,10 +1454,10 @@ importers: dependencies: '@aws-sdk/client-s3': specifier: ^3.705.0 - version: 3.717.0 + version: 3.721.0 '@aws-sdk/s3-request-presigner': specifier: ^3.705.0 - version: 3.717.0 + version: 3.721.0 '@cliqz/adblocker-playwright': specifier: 1.34.0 version: 1.34.0(playwright@1.48.2) @@ -1674,7 +1674,7 @@ importers: version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1707,7 +1707,7 @@ importers: version: 1.4.0(starknet@6.18.0(encoding@0.1.13)) vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1735,7 +1735,7 @@ importers: devDependencies: '@types/node': specifier: ^22.10.1 - version: 22.10.3 + version: 22.10.4 packages/plugin-sui: dependencies: @@ -1765,7 +1765,7 @@ importers: version: 8.3.5(@swc/core@1.10.4(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.4.49)(tsx@4.19.2)(typescript@5.6.3)(yaml@2.7.0) vitest: specifier: 2.1.4 - version: 2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1852,7 +1852,7 @@ importers: version: 11.0.3 vitest: specifier: 2.1.5 - version: 2.1.5(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + version: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -1944,7 +1944,7 @@ importers: version: 4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) web3-plugin-zksync: specifier: ^1.0.8 - version: 1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.3)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) + version: 1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) whatwg-url: specifier: 7.1.0 version: 7.1.0 @@ -2299,30 +2299,30 @@ packages: '@aws-crypto/util@5.2.0': resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==} - '@aws-sdk/client-polly@3.716.0': - resolution: {integrity: sha512-ZHO2S1ij0s2JOsZ7RJkNdNTghbJhGJb1F9mDRLgjipG5yyBlvWcnBTUB83CSGXSX/RcZ2tWI4LKypodo6tSMag==} + '@aws-sdk/client-polly@3.721.0': + resolution: {integrity: sha512-SCTx9DKOnfEKyWb6bx5J7aeowBig8QmiqOJlE0sMM/pbpF70YGC/ugk1/yFJAJlAkoDadtRvseFpwLvrg7N73Q==} engines: {node: '>=16.0.0'} - '@aws-sdk/client-s3@3.717.0': - resolution: {integrity: sha512-jzaH8IskAXVnqlZ3/H/ROwrB2HCnq/atlN7Hi7FIfjWvMPf5nfcJKfzJ1MXFX0EQR5qO6X4TbK7rgi7Bjw9NjQ==} + '@aws-sdk/client-s3@3.721.0': + resolution: {integrity: sha512-uCZC8elYhUFF21yq1yB5TrE/VYz8A4/VnttUHc65/jqnHReTDvEC0XAc756tJnjfrReyM1ws12FzBLHoW/NDjg==} engines: {node: '>=16.0.0'} - '@aws-sdk/client-sso-oidc@3.716.0': - resolution: {integrity: sha512-lA4IB9FzR2KjH7EVCo+mHGFKqdViVyeBQEIX9oVratL/l7P0bMS1fMwgfHOc3ACazqNxBxDES7x08ZCp32y6Lw==} + '@aws-sdk/client-sso-oidc@3.721.0': + resolution: {integrity: sha512-jwsgdUEbNJqs1O0AQtf9M6SI7hFIjxH+IKeKCMca0xVt+Tr1UqLr/qMK/6W8LoMtRFnE0lpBSHW6hvmLp2OCoQ==} engines: {node: '>=16.0.0'} peerDependencies: - '@aws-sdk/client-sts': ^3.716.0 + '@aws-sdk/client-sts': ^3.721.0 - '@aws-sdk/client-sso@3.716.0': - resolution: {integrity: sha512-5Nb0jJXce2TclbjG7WVPufwhgV1TRydz1QnsuBtKU0AdViEpr787YrZhPpGnNIM1Dx+R1H/tmAHZnOoohS6D8g==} + '@aws-sdk/client-sso@3.721.0': + resolution: {integrity: sha512-UrYAF4ilpO2cZBFddQmbETfo0xKP3CEcantcMQTc0xPY3quHLZhYuBiRae+McWi6yZpH4ErnFZIWeKSJ2OQgqQ==} engines: {node: '>=16.0.0'} - '@aws-sdk/client-sts@3.716.0': - resolution: {integrity: sha512-i4SVNsrdXudp8T4bkm7Fi3YWlRnvXCSwvNDqf6nLqSJxqr4CN3VlBELueDyjBK7TAt453/qSif+eNx+bHmwo4Q==} + '@aws-sdk/client-sts@3.721.0': + resolution: {integrity: sha512-1Pv8F02hQFmPZs7WtGfQNlnInbG1lLzyngJc/MlZ3Ld2fIoWjaWp7bJWgYAjnzHNEuDtCabWJvIfePdRqsbYoA==} engines: {node: '>=16.0.0'} - '@aws-sdk/client-transcribe-streaming@3.716.0': - resolution: {integrity: sha512-znbAcjWUaWsa0ULs0y6ZJH+EIarRQZX0pVANY9UQZHCc2EX/xKxpWA4VxbqXe9VlVjahP4wJBSGcW2uztL5iAQ==} + '@aws-sdk/client-transcribe-streaming@3.721.0': + resolution: {integrity: sha512-8imB8tEHfUW597yGM6/qRmBXyRYNPp7bddBg67g6AHzj/UG0xI1EQZzyBntUyy/sQzvMgcPoUoYdFHdfQWQ7vw==} engines: {node: '>=16.0.0'} '@aws-sdk/core@3.716.0': @@ -2337,22 +2337,22 @@ packages: resolution: {integrity: sha512-CZ04pl2z7igQPysQyH2xKZHM3fLwkemxQbKOlje3TmiS1NwXvcKvERhp9PE/H23kOL7beTM19NMRog/Fka/rlw==} engines: {node: '>=16.0.0'} - '@aws-sdk/credential-provider-ini@3.716.0': - resolution: {integrity: sha512-P37We2GtZvdROxiwP0zrpEL81/HuYK1qlYxp5VCj3uV+G4mG8UQN2gMIU/baYrpOQqa0h81RfyQGRFUjVaDVqw==} + '@aws-sdk/credential-provider-ini@3.721.0': + resolution: {integrity: sha512-8J/c2rI+4ZoduBCnPurfdblqs2DyRvL9ztqzzOWWEhLccoYZzYeAMwBapEAsiVsD1iNrIGY7LRDC4TsVmJBf6Q==} engines: {node: '>=16.0.0'} peerDependencies: - '@aws-sdk/client-sts': ^3.716.0 + '@aws-sdk/client-sts': ^3.721.0 - '@aws-sdk/credential-provider-node@3.716.0': - resolution: {integrity: sha512-FGQPK2uKfS53dVvoskN/s/t6m0Po24BGd1PzJdzHBFCOjxbZLM6+8mDMXeyi2hCLVVQOUcuW41kOgmJ0+zMbww==} + '@aws-sdk/credential-provider-node@3.721.0': + resolution: {integrity: sha512-D6xodzdMjVhF9xRhy9gNf0gqP0Dek9fQ6BDZzqO/i54d7CjWHVZTADcVcxjLQq6nyUNf0QPf8UXLaqi+w25GGQ==} engines: {node: '>=16.0.0'} '@aws-sdk/credential-provider-process@3.716.0': resolution: {integrity: sha512-0spcu2MWVVHSTHH3WE2E//ttUJPwXRM3BCp+WyI41xLzpNu1Fd8zjOrDpEo0SnGUzsSiRTIJWgkuu/tqv9NJ2A==} engines: {node: '>=16.0.0'} - '@aws-sdk/credential-provider-sso@3.716.0': - resolution: {integrity: sha512-J2IA3WuCpRGGoZm6VHZVFCnrxXP+41iUWb9Ct/1spljegTa1XjiaZ5Jf3+Ubj7WKiyvP9/dgz1L0bu2bYEjliw==} + '@aws-sdk/credential-provider-sso@3.721.0': + resolution: {integrity: sha512-v7npnYqfuY1vdcb0/F4Mcz+mcFyZaYry9qXhSRCPIbLPe2PRV4E4HXIaPKmir8PhuRLEGs0QJWhvIWr7u6holQ==} engines: {node: '>=16.0.0'} '@aws-sdk/credential-provider-web-identity@3.716.0': @@ -2365,8 +2365,8 @@ packages: resolution: {integrity: sha512-zCEegowS+LCrPdUgGUQPX8PBUFbyBifyOuA0VieZwKYH0kIjthGxuM9QdAD7bf1rgW+3bBEchWsIJqpIp4JQkg==} engines: {node: '>=16.0.0'} - '@aws-sdk/middleware-bucket-endpoint@3.714.0': - resolution: {integrity: sha512-I/xSOskiseJJ8i183Z522BgqbgYzLKP7jGcg2Qeib/IWoG2IP+9DH8pwqagKaPAycyswtnoKBJiiFXY43n0CkA==} + '@aws-sdk/middleware-bucket-endpoint@3.721.0': + resolution: {integrity: sha512-5UyoDoX3z3UhmetoqqqZulq2uF55Jyj9lUKAJWgTxVhDEG5TijTQS40LP9DqwRl0hJkoUUZKAwE0hwnUsiGXAg==} engines: {node: '>=16.0.0'} '@aws-sdk/middleware-eventstream@3.714.0': @@ -2409,8 +2409,8 @@ packages: resolution: {integrity: sha512-RkK8REAVwNUQmYbIDRw8eYbMJ8F1Rw4C9mlME4BBMhFlelGcD3ErU2ce24moQbDxBjNwHNESmIqgmdQk93CDCQ==} engines: {node: '>=16.0.0'} - '@aws-sdk/middleware-user-agent@3.716.0': - resolution: {integrity: sha512-FpAtT6nNKrYdkDZndutEraiRMf+TgDzAGvniqRtZ/YTPA+gIsWrsn+TwMKINR81lFC3nQfb9deS5CFtxd021Ew==} + '@aws-sdk/middleware-user-agent@3.721.0': + resolution: {integrity: sha512-Z3Vksb970ArsfLlARW4KVpqO+pQ1cvvGTrTQPxWDsmOzg1kU92t9oWXGW+1M/x6bHbMQlI/EulQ/D8ZE/Pu46Q==} engines: {node: '>=16.0.0'} '@aws-sdk/middleware-websocket@3.714.0': @@ -2421,19 +2421,19 @@ packages: resolution: {integrity: sha512-HJzsQxgMOAzZrbf/YIqEx30or4tZK1oNAk6Wm6xecUQx+23JXIaePRu1YFUOLBBERQ4QBPpISFurZWBMZ5ibAw==} engines: {node: '>=16.0.0'} - '@aws-sdk/s3-request-presigner@3.717.0': - resolution: {integrity: sha512-gpT310jVQiqVxE6Nh4yEABbYNVOfUC/DuMtp5/JAb+cz1nNLfA45KgaJ73UCPbimVszUH0Cb7RouC/zv1uB84w==} + '@aws-sdk/s3-request-presigner@3.721.0': + resolution: {integrity: sha512-2ibKGssj2TAQyfthNihhBqWdwowlol9bDpKybIi2T6D8l2L9g0ENGLNE50MYzSFAQ3LcjzcvLQ/GByRPiuK+pQ==} engines: {node: '>=16.0.0'} '@aws-sdk/signature-v4-multi-region@3.716.0': resolution: {integrity: sha512-k0goWotZKKz+kV6Ln0qeAMSeSVi4NipuIIz5R8A0uCF2zBK4CXWdZR7KeaIoLBhJwQnHj1UU7E+2MK74KIUBzA==} engines: {node: '>=16.0.0'} - '@aws-sdk/token-providers@3.714.0': - resolution: {integrity: sha512-vKN064aLE3kl+Zl16Ony3jltHnMddMBT7JRkP1L+lLywhA0PcAKxpdvComul/sTBWnbnwLnaS5NsDUhcWySH8A==} + '@aws-sdk/token-providers@3.721.0': + resolution: {integrity: sha512-cIZmKdLeEWUzPR+2lA+JcZHPvaFf/Ih+s3LXBa/uQwRFdK+o7WfGRf7Oqe6yLRekO2jJJl4LBJXxDOH++M9+ag==} engines: {node: '>=16.0.0'} peerDependencies: - '@aws-sdk/client-sso-oidc': ^3.714.0 + '@aws-sdk/client-sso-oidc': ^3.721.0 '@aws-sdk/types@3.714.0': resolution: {integrity: sha512-ZjpP2gYbSFlxxaUDa1Il5AVvfggvUPbjzzB/l3q0gIE5Thd6xKW+yzEpt2mLZ5s5UaYSABZbF94g8NUOF4CVGA==} @@ -2458,8 +2458,8 @@ packages: '@aws-sdk/util-user-agent-browser@3.714.0': resolution: {integrity: sha512-OdJJ03cP9/MgIVToPJPCPUImbpZzTcwdIgbXC0tUQPJhbD7b7cB4LdnkhNHko+MptpOrCq4CPY/33EpOjRdofw==} - '@aws-sdk/util-user-agent-node@3.716.0': - resolution: {integrity: sha512-3PqaXmQbxrtHKAsPCdp7kn5FrQktj8j3YyuNsqFZ8rWZeEQ88GWlsvE61PTsr2peYCKzpFqYVddef2x1axHU0w==} + '@aws-sdk/util-user-agent-node@3.721.0': + resolution: {integrity: sha512-5VsNdC3zQnjrt7KNEeFHWJl3FIamgIS0puG18BMvPsdzcKWEbWDih+yd1kMWrcpAu1Riez9co/gB9y99pBghDA==} engines: {node: '>=16.0.0'} peerDependencies: aws-crt: '>=1.0.0' @@ -5499,6 +5499,10 @@ packages: resolution: {integrity: sha512-UTMhXK9SeDhFJVrHeUJ5uZlI6ajXg10O6Ddocf9S6GjbSBVZsJo88HzKwXznNfGpMTRDyJkqMjNDPYgf0qFWnw==} engines: {node: ^14.21.3 || >=16} + '@noble/curves@1.8.0': + resolution: {integrity: sha512-j84kjAbzEnQHaSIhRPUmB3/eVXu2k3dKPl2LOrR8fSOIL+89U+7lV117EWHtq/GHM3ReGHM46iRBdZfpc4HRUQ==} + engines: {node: ^14.21.3 || >=16} + '@noble/ed25519@1.7.3': resolution: {integrity: sha512-iR8GBkDt0Q3GyaVcIu7mSsVIqnFbkbRzGLWlvhwunacoLwt4J3swfKhfaM6rN6WY+TBGoYT1GtT1mIh2/jGbRQ==} @@ -5532,6 +5536,10 @@ packages: resolution: {integrity: sha512-pq5D8h10hHBjyqX+cfBm0i8JUXJ0UhczFc4r74zbuT9XgewFo2E3J1cOaGtdZynILNmQ685YWGzGE1Zv6io50w==} engines: {node: ^14.21.3 || >=16} + '@noble/hashes@1.7.0': + resolution: {integrity: sha512-HXydb0DgzTpDPwbVeDGCG1gIu7X6+AuU6Zl6av/E/KG8LMsvPntvq+w17CHRpKBmN6Ybdrt1eP3k4cj8DJa78w==} + engines: {node: ^14.21.3 || >=16} + '@noble/secp256k1@1.7.1': resolution: {integrity: sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==} @@ -6892,6 +6900,9 @@ packages: '@scure/bip32@1.6.0': resolution: {integrity: sha512-82q1QfklrUUdXJzjuRU7iG7D7XiFx5PHYVS0+oeNKhyDLT7WPqs6pBcM2W5ZdwOwKCwoE1Vy1se+DHjcXwCYnA==} + '@scure/bip32@1.6.1': + resolution: {integrity: sha512-jSO+5Ud1E588Y+LFo8TaB8JVPNAZw/lGGao+1SepHDeTs2dFLurdNIAgUuDlwezqEjRjElkCJajVrtrZaBxvaQ==} + '@scure/bip39@1.1.1': resolution: {integrity: sha512-t+wDck2rVkh65Hmv280fYdVdY25J9YeEUIgn2LG1WM6gxFkGzcksoDiUkWVpVp3Oex9xGC68JU2dSbUfwZ2jPg==} @@ -6904,6 +6915,9 @@ packages: '@scure/bip39@1.5.0': resolution: {integrity: sha512-Dop+ASYhnrwm9+HA/HwXg7j2ZqM6yk2fyLWb5znexjctFY3+E+eU8cIWI0Pql0Qx4hPZCijlGq4OL71g+Uz30A==} + '@scure/bip39@1.5.1': + resolution: {integrity: sha512-GnlufVSP9UdAo/H2Patfv22VTtpNTyfi+I3qCKpvuB5l1KWzEYx+l2TNpBy9Ksh4xTs3Rn06tBlpWCi/1Vz8gw==} + '@scure/starknet@1.0.0': resolution: {integrity: sha512-o5J57zY0f+2IL/mq8+AYJJ4Xpc1fOtDhr+mFQKbHnYFmm3WQrC+8zj2HEgxak1a+x86mhmBC1Kq305KUpVf0wg==} @@ -7063,8 +7077,8 @@ packages: resolution: {integrity: sha512-Gr/qwzyPaTL1tZcq8WQyHhTZREER5R1Wytmz4WnVGL4onA3dNk6Btll55c8Vr58pLdvWZmtG8oZxJTw3t3q7Jg==} engines: {node: '>=16.0.0'} - '@smithy/core@2.5.6': - resolution: {integrity: sha512-w494xO+CPwG/5B/N2l0obHv2Fi9U4DAY+sTi1GWT3BVvGpZetJjJXAynIO9IHp4zS1PinGhXtRSZydUXbJO4ag==} + '@smithy/core@2.5.7': + resolution: {integrity: sha512-8olpW6mKCa0v+ibCjoCzgZHQx1SQmZuW/WkrdZo73wiTprTH6qhmskT60QLFdT9DRa5mXxjz89kQPZ7ZSsoqqg==} engines: {node: '>=16.0.0'} '@smithy/credential-provider-imds@3.2.8': @@ -7090,8 +7104,8 @@ packages: resolution: {integrity: sha512-L1Ib66+gg9uTnqp/18Gz4MDpJPKRE44geOjOQ2SVc0eiaO5l255ADziATZgjQjqumC7yPtp1XnjHlF1srcwjKw==} engines: {node: '>=16.0.0'} - '@smithy/fetch-http-handler@4.1.2': - resolution: {integrity: sha512-R7rU7Ae3ItU4rC0c5mB2sP5mJNbCfoDc8I5XlYjIZnquyUwec7fEo78F6DA3SmgJgkU1qTMcZJuGblxZsl10ZA==} + '@smithy/fetch-http-handler@4.1.3': + resolution: {integrity: sha512-6SxNltSncI8s689nvnzZQc/dPXcpHQ34KUj6gR/HBroytKOd/isMG3gJF/zBE1TBmTT18TXyzhg3O3SOOqGEhA==} '@smithy/hash-blob-browser@3.1.10': resolution: {integrity: sha512-elwslXOoNunmfS0fh55jHggyhccobFkexLYC1ZeZ1xP2BTSrcIBaHV2b4xUQOdctrSNOpMqOZH1r2XzWTEhyfA==} @@ -7122,12 +7136,12 @@ packages: resolution: {integrity: sha512-zfMhzojhFpIX3P5ug7jxTjfUcIPcGjcQYzB9t+rv0g1TX7B0QdwONW+ATouaLoD7h7LOw/ZlXfkq4xJ/g2TrIw==} engines: {node: '>=16.0.0'} - '@smithy/middleware-endpoint@3.2.7': - resolution: {integrity: sha512-GTxSKf280aJBANGN97MomUQhW1VNxZ6w7HAj/pvZM5MUHbMPOGnWOp1PRYKi4czMaHNj9bdiA+ZarmT3Wkdqiw==} + '@smithy/middleware-endpoint@3.2.8': + resolution: {integrity: sha512-OEJZKVUEhMOqMs3ktrTWp7UvvluMJEvD5XgQwRePSbDg1VvBaL8pX8mwPltFn6wk1GySbcVwwyldL8S+iqnrEQ==} engines: {node: '>=16.0.0'} - '@smithy/middleware-retry@3.0.32': - resolution: {integrity: sha512-v8gVA9HqibuZkFuFpfkC/EcHE8no/3Mv3JvRUGly63Axt4yyas1WDVOasFSdiqm2hZVpY7/k8mRT1Wd5k7r3Yw==} + '@smithy/middleware-retry@3.0.34': + resolution: {integrity: sha512-yVRr/AAtPZlUvwEkrq7S3x7Z8/xCd97m2hLDaqdz6ucP2RKHsBjEqaUA2ebNv2SsZoPEi+ZD0dZbOB1u37tGCA==} engines: {node: '>=16.0.0'} '@smithy/middleware-serde@3.0.11': @@ -7174,8 +7188,8 @@ packages: resolution: {integrity: sha512-5JWeMQYg81TgU4cG+OexAWdvDTs5JDdbEZx+Qr1iPbvo91QFGzjy0IkXAKaXUHqmKUJgSHK0ZxnCkgZpzkeNTA==} engines: {node: '>=16.0.0'} - '@smithy/smithy-client@3.5.2': - resolution: {integrity: sha512-h7xn+1wlpbXyLrtvo/teHR1SFGIIrQ3imzG0nz43zVLAJgvfC1Mtdwa1pFhoIOYrt/TiNjt4pD0gSYQEdZSBtg==} + '@smithy/smithy-client@3.7.0': + resolution: {integrity: sha512-9wYrjAZFlqWhgVo3C4y/9kpc68jgiSsKUnsFPzr/MSiRL93+QRDafGTfhhKAb2wsr69Ru87WTiqSfQusSmWipA==} engines: {node: '>=16.0.0'} '@smithy/types@3.7.2': @@ -7208,12 +7222,12 @@ packages: resolution: {integrity: sha512-pbjk4s0fwq3Di/ANL+rCvJMKM5bzAQdE5S/6RL5NXgMExFAi6UgQMPOm5yPaIWPpr+EOXKXRonJ3FoxKf4mCJQ==} engines: {node: '>=16.0.0'} - '@smithy/util-defaults-mode-browser@3.0.32': - resolution: {integrity: sha512-FAGsnm/xJ19SZeoqGyo9CosqjUlm+XJTmygDMktebvDKw3bKiIiZ40O1MA6Z52KLmekYU2GO7BEK7u6e7ZORKw==} + '@smithy/util-defaults-mode-browser@3.0.34': + resolution: {integrity: sha512-FumjjF631lR521cX+svMLBj3SwSDh9VdtyynTYDAiBDEf8YPP5xORNXKQ9j0105o5+ARAGnOOP/RqSl40uXddA==} engines: {node: '>= 10.0.0'} - '@smithy/util-defaults-mode-node@3.0.32': - resolution: {integrity: sha512-2CzKhkPFCVdd15f3+0D1rldNlvJME8pVRBtVVsea2hy7lcOn0bGB0dTVUwzgfM4LW/aU4IOg3jWf25ZWaxbOiw==} + '@smithy/util-defaults-mode-node@3.0.34': + resolution: {integrity: sha512-vN6aHfzW9dVVzkI0wcZoUXvfjkl4CSbM9nE//08lmUMyf00S75uuCpTrqF9uD4bD9eldIXlt53colrlwKAT8Gw==} engines: {node: '>= 10.0.0'} '@smithy/util-endpoints@2.1.7': @@ -7232,8 +7246,8 @@ packages: resolution: {integrity: sha512-hJUC6W7A3DQgaee3Hp9ZFcOxVDZzmBIRBPlUAk8/fSOEl7pE/aX7Dci0JycNOnm9Mfr0KV2XjIlUOcGWXQUdVQ==} engines: {node: '>=16.0.0'} - '@smithy/util-stream@3.3.3': - resolution: {integrity: sha512-bOm0YMMxRjbI3X6QkWwADPFkh2AH2xBMQIB1IQgCsCRqXXpSJatgjUR3oxHthpYwFkw3WPkOt8VgMpJxC0rFqg==} + '@smithy/util-stream@3.3.4': + resolution: {integrity: sha512-SGhGBG/KupieJvJSZp/rfHHka8BFgj56eek9px4pp7lZbOF+fRiVr4U7A3y3zJD8uGhxq32C5D96HxsTC9BckQ==} engines: {node: '>=16.0.0'} '@smithy/util-uri-escape@3.0.0': @@ -7697,8 +7711,8 @@ packages: '@types/acorn@4.0.6': resolution: {integrity: sha512-veQTnWP+1D/xbxVrPC3zHnCZRjSrKfhbMUlEA43iMZLu7EsnTtkJklIuwrCPbOi8YkvDQAiW05VQQFvvz9oieQ==} - '@types/aws-lambda@8.10.146': - resolution: {integrity: sha512-3BaDXYTh0e6UCJYL/jwV/3+GRslSc08toAiZSmleYtkAUyV5rtvdPYxrG/88uqvTuT6sb27WE9OS90ZNTIuQ0g==} + '@types/aws-lambda@8.10.147': + resolution: {integrity: sha512-nD0Z9fNIZcxYX5Mai2CTmFD7wX7UldCkW2ezCF8D1T5hdiLsnTWDGRpfRYntU6VjTdLQjOvyszru7I1c1oCQew==} '@types/babel__core@7.20.5': resolution: {integrity: sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==} @@ -8014,8 +8028,8 @@ packages: '@types/node@20.17.9': resolution: {integrity: sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==} - '@types/node@22.10.3': - resolution: {integrity: sha512-DifAyw4BkrufCILvD3ucnuN8eydUfc/C1GlyrnI+LK6543w5/L3VeVgf05o3B4fqSXP1dKYLOZsKfutpxPzZrw==} + '@types/node@22.10.4': + resolution: {integrity: sha512-99l6wv4HEzBQhvaU/UGoeBoCK61SCROQaCCGyQSgX2tEQ3rKkNZ2S7CEWnS/4s1LV+8ODdK21UeyR1fHP2mXug==} '@types/node@22.7.5': resolution: {integrity: sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==} @@ -10872,8 +10886,8 @@ packages: discord-api-types@0.37.100: resolution: {integrity: sha512-a8zvUI0GYYwDtScfRd/TtaNBDTXwP5DiDVX7K5OmE+DRT57gBqKnwtOC5Ol8z0mRW8KQfETIgiB8U0YZ9NXiCA==} - discord-api-types@0.37.114: - resolution: {integrity: sha512-9b9oOpktWSmE6ooToc46wfw151SHC/+idmnZvtwpEzW85BijUspQxj4W2uOmo+nZVTdEyb3fku58k+4rHKpdSQ==} + discord-api-types@0.37.115: + resolution: {integrity: sha512-ivPnJotSMrXW8HLjFu+0iCVs8zP6KSliMelhr7HgcB2ki1QzpORkb26m71l1pzSnnGfm7gb5n/VtRTtpw8kXFA==} discord-api-types@0.37.83: resolution: {integrity: sha512-urGGYeWtWNYMKnYlZnOnDHm8fVRffQs3U0SpE8RHeiuLKb/u92APS8HoQnPTFbnXmY1vVnXjXO4dOxcAn3J+DA==} @@ -11130,8 +11144,8 @@ packages: error-polyfill@0.1.3: resolution: {integrity: sha512-XHJk60ufE+TG/ydwp4lilOog549iiQF2OAPhkk9DdiYWMrltz5yhDz/xnKuenNwP7gy3dsibssO5QpVhkrSzzg==} - es-abstract@1.23.8: - resolution: {integrity: sha512-lfab8IzDn6EpI1ibZakcgS6WsfEBiB+43cuJo+wgylx1xKXf+Sp+YR3vFuQwC/u3sxYwV8Cxe3B0DpVUu/WiJQ==} + es-abstract@1.23.9: + resolution: {integrity: sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA==} engines: {node: '>= 0.4'} es-define-property@1.0.1: @@ -11918,8 +11932,8 @@ packages: resolution: {integrity: sha512-vpeMIQKxczTD/0s2CdEWHcb0eeJe6TFjxb+J5xgX7hScxqrGuyjmv4c1D4A/gelKfyox0gJJwIHF+fLjeaM8kQ==} engines: {node: '>=18'} - get-intrinsic@1.2.6: - resolution: {integrity: sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==} + get-intrinsic@1.2.7: + resolution: {integrity: sha512-VW6Pxhsrk0KAOqs3WEd0klDiF/+V7gQOpAvY1jVU/LHmaD/kQO4523aiJuikX/QAKYiW6x8Jh+RJej1almdtCA==} engines: {node: '>= 0.4'} get-nonce@1.0.1: @@ -11945,6 +11959,10 @@ packages: resolution: {integrity: sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==} engines: {node: '>=8'} + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-stdin@9.0.0: resolution: {integrity: sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==} engines: {node: '>=12'} @@ -12727,8 +12745,8 @@ packages: is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} - is-async-function@2.0.0: - resolution: {integrity: sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==} + is-async-function@2.1.0: + resolution: {integrity: sha512-GExz9MtyhlZyXYLxzlJRj5WUCE661zhDa1Yna52CN57AJsymh+DvXXjyveSioqSRdxvUrdKdvqB1b5cVKsNpWQ==} engines: {node: '>= 0.4'} is-bigint@1.1.0: @@ -12813,8 +12831,8 @@ packages: resolution: {integrity: sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==} engines: {node: '>=6'} - is-generator-function@1.0.10: - resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + is-generator-function@1.1.0: + resolution: {integrity: sha512-nPUB5km40q9e8UfN/Zc24eLlzdSf9OfKByBw9CIdw4H1giPMeA0OIJvbchsCu4npfI2QcMVBsGEBHKZ7wLTWmQ==} engines: {node: '>= 0.4'} is-glob@4.0.3: @@ -16773,8 +16791,8 @@ packages: reflect-metadata@0.2.2: resolution: {integrity: sha512-urBwgfrvVP/eAyXx4hluJivBKzuEbSQs9rKWCrCkbSxNv8mxPcUZKeuoF3Uy4mJl3Lwprp6yy5/39VWigZ4K6Q==} - reflect.getprototypeof@1.0.9: - resolution: {integrity: sha512-r0Ay04Snci87djAsI4U+WNRcSw5S4pOH7qFjd/veA5gC7TbqESR3tcj28ia95L/fYUDw11JKP7uqUKUAfVvV5Q==} + reflect.getprototypeof@1.0.10: + resolution: {integrity: sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw==} engines: {node: '>= 0.4'} regenerate-unicode-properties@10.2.0: @@ -16802,8 +16820,8 @@ packages: regex@5.1.1: resolution: {integrity: sha512-dN5I359AVGPnwzJm2jN1k0W9LPZ+ePvoOeVMMfqIMFz53sSwXkxaJoxr50ptnsC771lK95BnTrVSZxq0b9yCGw==} - regexp.prototype.flags@1.5.3: - resolution: {integrity: sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ==} + regexp.prototype.flags@1.5.4: + resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} engines: {node: '>= 0.4'} regexpu-core@6.2.0: @@ -17226,6 +17244,10 @@ packages: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} engines: {node: '>= 0.4'} + set-proto@1.0.0: + resolution: {integrity: sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==} + engines: {node: '>= 0.4'} + setimmediate@1.0.5: resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} @@ -17787,8 +17809,8 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - svelte@5.16.0: - resolution: {integrity: sha512-Ygqsiac6UogVED2ruKclU+pOeMThxWtp9LG+li7BXeDKC2paVIsRTMkNmcON4Zejerd1s5sZHWx6ZtU85xklVg==} + svelte@5.16.1: + resolution: {integrity: sha512-FsA1OjAKMAFSDob6j/Tv2ZV9rY4SeqPd1WXQlQkFkePAozSHLp6tbkU9qa1xJ+uTRzMSM2Vx3USdsYZBXd3H3g==} engines: {node: '>=18'} svg-parser@2.0.4: @@ -18378,8 +18400,8 @@ packages: typedarray-to-buffer@3.1.5: resolution: {integrity: sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==} - typedarray.prototype.slice@1.0.3: - resolution: {integrity: sha512-8WbVAQAUlENo1q3c3zZYuy5k9VzBQvp8AX9WOtbvyWlLM1v5JaSRmjubLjzHF4JFtptjH/5c/i95yaElvcjC0A==} + typedarray.prototype.slice@1.0.5: + resolution: {integrity: sha512-q7QNVDGTdl702bVFiI5eY4l/HkgCM6at9KhcFbgUAzezHFbOVy4+0O/lCjsABEQwbZPravVfBIiBVGo89yzHFg==} engines: {node: '>= 0.4'} typedarray@0.0.6: @@ -19694,13 +19716,13 @@ snapshots: transitivePeerDependencies: - zod - '@ai-sdk/svelte@0.0.57(svelte@5.16.0)(zod@3.23.8)': + '@ai-sdk/svelte@0.0.57(svelte@5.16.1)(zod@3.23.8)': dependencies: '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) - sswr: 2.1.0(svelte@5.16.0) + sswr: 2.1.0(svelte@5.16.1) optionalDependencies: - svelte: 5.16.0 + svelte: 5.16.1 transitivePeerDependencies: - zod @@ -19963,10 +19985,10 @@ snapshots: dependencies: '@aptos-labs/aptos-cli': 1.0.2 '@aptos-labs/aptos-client': 0.1.1 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - '@scure/bip32': 1.6.0 - '@scure/bip39': 1.5.0 + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 + '@scure/bip32': 1.6.1 + '@scure/bip39': 1.5.1 eventemitter3: 5.0.1 form-data: 4.0.1 js-base64: 3.7.7 @@ -20028,63 +20050,63 @@ snapshots: '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 - '@aws-sdk/client-polly@3.716.0': + '@aws-sdk/client-polly@3.721.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sso-oidc': 3.716.0(@aws-sdk/client-sts@3.716.0) - '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/client-sso-oidc': 3.721.0(@aws-sdk/client-sts@3.721.0) + '@aws-sdk/client-sts': 3.721.0 '@aws-sdk/core': 3.716.0 - '@aws-sdk/credential-provider-node': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/credential-provider-node': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))(@aws-sdk/client-sts@3.721.0) '@aws-sdk/middleware-host-header': 3.714.0 '@aws-sdk/middleware-logger': 3.714.0 '@aws-sdk/middleware-recursion-detection': 3.714.0 - '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/middleware-user-agent': 3.721.0 '@aws-sdk/region-config-resolver': 3.714.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-endpoints': 3.714.0 '@aws-sdk/util-user-agent-browser': 3.714.0 - '@aws-sdk/util-user-agent-node': 3.716.0 + '@aws-sdk/util-user-agent-node': 3.721.0 '@smithy/config-resolver': 3.0.13 - '@smithy/core': 2.5.6 - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/core': 2.5.7 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/hash-node': 3.0.11 '@smithy/invalid-dependency': 3.0.11 '@smithy/middleware-content-length': 3.0.13 - '@smithy/middleware-endpoint': 3.2.7 - '@smithy/middleware-retry': 3.0.32 + '@smithy/middleware-endpoint': 3.2.8 + '@smithy/middleware-retry': 3.0.34 '@smithy/middleware-serde': 3.0.11 '@smithy/middleware-stack': 3.0.11 '@smithy/node-config-provider': 3.1.12 '@smithy/node-http-handler': 3.3.3 '@smithy/protocol-http': 4.1.8 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/url-parser': 3.0.11 '@smithy/util-base64': 3.0.0 '@smithy/util-body-length-browser': 3.0.0 '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.32 - '@smithy/util-defaults-mode-node': 3.0.32 + '@smithy/util-defaults-mode-browser': 3.0.34 + '@smithy/util-defaults-mode-node': 3.0.34 '@smithy/util-endpoints': 2.1.7 '@smithy/util-middleware': 3.0.11 '@smithy/util-retry': 3.0.11 - '@smithy/util-stream': 3.3.3 + '@smithy/util-stream': 3.3.4 '@smithy/util-utf8': 3.0.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/client-s3@3.717.0': + '@aws-sdk/client-s3@3.721.0': dependencies: '@aws-crypto/sha1-browser': 5.2.0 '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sso-oidc': 3.716.0(@aws-sdk/client-sts@3.716.0) - '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/client-sso-oidc': 3.721.0(@aws-sdk/client-sts@3.721.0) + '@aws-sdk/client-sts': 3.721.0 '@aws-sdk/core': 3.716.0 - '@aws-sdk/credential-provider-node': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) - '@aws-sdk/middleware-bucket-endpoint': 3.714.0 + '@aws-sdk/credential-provider-node': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))(@aws-sdk/client-sts@3.721.0) + '@aws-sdk/middleware-bucket-endpoint': 3.721.0 '@aws-sdk/middleware-expect-continue': 3.714.0 '@aws-sdk/middleware-flexible-checksums': 3.717.0 '@aws-sdk/middleware-host-header': 3.714.0 @@ -20093,88 +20115,88 @@ snapshots: '@aws-sdk/middleware-recursion-detection': 3.714.0 '@aws-sdk/middleware-sdk-s3': 3.716.0 '@aws-sdk/middleware-ssec': 3.714.0 - '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/middleware-user-agent': 3.721.0 '@aws-sdk/region-config-resolver': 3.714.0 '@aws-sdk/signature-v4-multi-region': 3.716.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-endpoints': 3.714.0 '@aws-sdk/util-user-agent-browser': 3.714.0 - '@aws-sdk/util-user-agent-node': 3.716.0 + '@aws-sdk/util-user-agent-node': 3.721.0 '@aws-sdk/xml-builder': 3.709.0 '@smithy/config-resolver': 3.0.13 - '@smithy/core': 2.5.6 + '@smithy/core': 2.5.7 '@smithy/eventstream-serde-browser': 3.0.14 '@smithy/eventstream-serde-config-resolver': 3.0.11 '@smithy/eventstream-serde-node': 3.0.13 - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/hash-blob-browser': 3.1.10 '@smithy/hash-node': 3.0.11 '@smithy/hash-stream-node': 3.1.10 '@smithy/invalid-dependency': 3.0.11 '@smithy/md5-js': 3.0.11 '@smithy/middleware-content-length': 3.0.13 - '@smithy/middleware-endpoint': 3.2.7 - '@smithy/middleware-retry': 3.0.32 + '@smithy/middleware-endpoint': 3.2.8 + '@smithy/middleware-retry': 3.0.34 '@smithy/middleware-serde': 3.0.11 '@smithy/middleware-stack': 3.0.11 '@smithy/node-config-provider': 3.1.12 '@smithy/node-http-handler': 3.3.3 '@smithy/protocol-http': 4.1.8 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/url-parser': 3.0.11 '@smithy/util-base64': 3.0.0 '@smithy/util-body-length-browser': 3.0.0 '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.32 - '@smithy/util-defaults-mode-node': 3.0.32 + '@smithy/util-defaults-mode-browser': 3.0.34 + '@smithy/util-defaults-mode-node': 3.0.34 '@smithy/util-endpoints': 2.1.7 '@smithy/util-middleware': 3.0.11 '@smithy/util-retry': 3.0.11 - '@smithy/util-stream': 3.3.3 + '@smithy/util-stream': 3.3.4 '@smithy/util-utf8': 3.0.0 '@smithy/util-waiter': 3.2.0 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0)': + '@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0)': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/client-sts': 3.721.0 '@aws-sdk/core': 3.716.0 - '@aws-sdk/credential-provider-node': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/credential-provider-node': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))(@aws-sdk/client-sts@3.721.0) '@aws-sdk/middleware-host-header': 3.714.0 '@aws-sdk/middleware-logger': 3.714.0 '@aws-sdk/middleware-recursion-detection': 3.714.0 - '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/middleware-user-agent': 3.721.0 '@aws-sdk/region-config-resolver': 3.714.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-endpoints': 3.714.0 '@aws-sdk/util-user-agent-browser': 3.714.0 - '@aws-sdk/util-user-agent-node': 3.716.0 + '@aws-sdk/util-user-agent-node': 3.721.0 '@smithy/config-resolver': 3.0.13 - '@smithy/core': 2.5.6 - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/core': 2.5.7 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/hash-node': 3.0.11 '@smithy/invalid-dependency': 3.0.11 '@smithy/middleware-content-length': 3.0.13 - '@smithy/middleware-endpoint': 3.2.7 - '@smithy/middleware-retry': 3.0.32 + '@smithy/middleware-endpoint': 3.2.8 + '@smithy/middleware-retry': 3.0.34 '@smithy/middleware-serde': 3.0.11 '@smithy/middleware-stack': 3.0.11 '@smithy/node-config-provider': 3.1.12 '@smithy/node-http-handler': 3.3.3 '@smithy/protocol-http': 4.1.8 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/url-parser': 3.0.11 '@smithy/util-base64': 3.0.0 '@smithy/util-body-length-browser': 3.0.0 '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.32 - '@smithy/util-defaults-mode-node': 3.0.32 + '@smithy/util-defaults-mode-browser': 3.0.34 + '@smithy/util-defaults-mode-node': 3.0.34 '@smithy/util-endpoints': 2.1.7 '@smithy/util-middleware': 3.0.11 '@smithy/util-retry': 3.0.11 @@ -20183,7 +20205,7 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sso@3.716.0': + '@aws-sdk/client-sso@3.721.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 @@ -20191,33 +20213,33 @@ snapshots: '@aws-sdk/middleware-host-header': 3.714.0 '@aws-sdk/middleware-logger': 3.714.0 '@aws-sdk/middleware-recursion-detection': 3.714.0 - '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/middleware-user-agent': 3.721.0 '@aws-sdk/region-config-resolver': 3.714.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-endpoints': 3.714.0 '@aws-sdk/util-user-agent-browser': 3.714.0 - '@aws-sdk/util-user-agent-node': 3.716.0 + '@aws-sdk/util-user-agent-node': 3.721.0 '@smithy/config-resolver': 3.0.13 - '@smithy/core': 2.5.6 - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/core': 2.5.7 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/hash-node': 3.0.11 '@smithy/invalid-dependency': 3.0.11 '@smithy/middleware-content-length': 3.0.13 - '@smithy/middleware-endpoint': 3.2.7 - '@smithy/middleware-retry': 3.0.32 + '@smithy/middleware-endpoint': 3.2.8 + '@smithy/middleware-retry': 3.0.34 '@smithy/middleware-serde': 3.0.11 '@smithy/middleware-stack': 3.0.11 '@smithy/node-config-provider': 3.1.12 '@smithy/node-http-handler': 3.3.3 '@smithy/protocol-http': 4.1.8 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/url-parser': 3.0.11 '@smithy/util-base64': 3.0.0 '@smithy/util-body-length-browser': 3.0.0 '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.32 - '@smithy/util-defaults-mode-node': 3.0.32 + '@smithy/util-defaults-mode-browser': 3.0.34 + '@smithy/util-defaults-mode-node': 3.0.34 '@smithy/util-endpoints': 2.1.7 '@smithy/util-middleware': 3.0.11 '@smithy/util-retry': 3.0.11 @@ -20226,43 +20248,43 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-sts@3.716.0': + '@aws-sdk/client-sts@3.721.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sso-oidc': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/client-sso-oidc': 3.721.0(@aws-sdk/client-sts@3.721.0) '@aws-sdk/core': 3.716.0 - '@aws-sdk/credential-provider-node': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/credential-provider-node': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))(@aws-sdk/client-sts@3.721.0) '@aws-sdk/middleware-host-header': 3.714.0 '@aws-sdk/middleware-logger': 3.714.0 '@aws-sdk/middleware-recursion-detection': 3.714.0 - '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/middleware-user-agent': 3.721.0 '@aws-sdk/region-config-resolver': 3.714.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-endpoints': 3.714.0 '@aws-sdk/util-user-agent-browser': 3.714.0 - '@aws-sdk/util-user-agent-node': 3.716.0 + '@aws-sdk/util-user-agent-node': 3.721.0 '@smithy/config-resolver': 3.0.13 - '@smithy/core': 2.5.6 - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/core': 2.5.7 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/hash-node': 3.0.11 '@smithy/invalid-dependency': 3.0.11 '@smithy/middleware-content-length': 3.0.13 - '@smithy/middleware-endpoint': 3.2.7 - '@smithy/middleware-retry': 3.0.32 + '@smithy/middleware-endpoint': 3.2.8 + '@smithy/middleware-retry': 3.0.34 '@smithy/middleware-serde': 3.0.11 '@smithy/middleware-stack': 3.0.11 '@smithy/node-config-provider': 3.1.12 '@smithy/node-http-handler': 3.3.3 '@smithy/protocol-http': 4.1.8 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/url-parser': 3.0.11 '@smithy/util-base64': 3.0.0 '@smithy/util-body-length-browser': 3.0.0 '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.32 - '@smithy/util-defaults-mode-node': 3.0.32 + '@smithy/util-defaults-mode-browser': 3.0.34 + '@smithy/util-defaults-mode-node': 3.0.34 '@smithy/util-endpoints': 2.1.7 '@smithy/util-middleware': 3.0.11 '@smithy/util-retry': 3.0.11 @@ -20271,51 +20293,51 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/client-transcribe-streaming@3.716.0': + '@aws-sdk/client-transcribe-streaming@3.721.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/client-sso-oidc': 3.716.0(@aws-sdk/client-sts@3.716.0) - '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/client-sso-oidc': 3.721.0(@aws-sdk/client-sts@3.721.0) + '@aws-sdk/client-sts': 3.721.0 '@aws-sdk/core': 3.716.0 - '@aws-sdk/credential-provider-node': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/credential-provider-node': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))(@aws-sdk/client-sts@3.721.0) '@aws-sdk/eventstream-handler-node': 3.714.0 '@aws-sdk/middleware-eventstream': 3.714.0 '@aws-sdk/middleware-host-header': 3.714.0 '@aws-sdk/middleware-logger': 3.714.0 '@aws-sdk/middleware-recursion-detection': 3.714.0 '@aws-sdk/middleware-sdk-transcribe-streaming': 3.714.0 - '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/middleware-user-agent': 3.721.0 '@aws-sdk/middleware-websocket': 3.714.0 '@aws-sdk/region-config-resolver': 3.714.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-endpoints': 3.714.0 '@aws-sdk/util-user-agent-browser': 3.714.0 - '@aws-sdk/util-user-agent-node': 3.716.0 + '@aws-sdk/util-user-agent-node': 3.721.0 '@smithy/config-resolver': 3.0.13 - '@smithy/core': 2.5.6 + '@smithy/core': 2.5.7 '@smithy/eventstream-serde-browser': 3.0.14 '@smithy/eventstream-serde-config-resolver': 3.0.11 '@smithy/eventstream-serde-node': 3.0.13 - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/hash-node': 3.0.11 '@smithy/invalid-dependency': 3.0.11 '@smithy/middleware-content-length': 3.0.13 - '@smithy/middleware-endpoint': 3.2.7 - '@smithy/middleware-retry': 3.0.32 + '@smithy/middleware-endpoint': 3.2.8 + '@smithy/middleware-retry': 3.0.34 '@smithy/middleware-serde': 3.0.11 '@smithy/middleware-stack': 3.0.11 '@smithy/node-config-provider': 3.1.12 '@smithy/node-http-handler': 3.3.3 '@smithy/protocol-http': 4.1.8 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/url-parser': 3.0.11 '@smithy/util-base64': 3.0.0 '@smithy/util-body-length-browser': 3.0.0 '@smithy/util-body-length-node': 3.0.0 - '@smithy/util-defaults-mode-browser': 3.0.32 - '@smithy/util-defaults-mode-node': 3.0.32 + '@smithy/util-defaults-mode-browser': 3.0.34 + '@smithy/util-defaults-mode-node': 3.0.34 '@smithy/util-endpoints': 2.1.7 '@smithy/util-middleware': 3.0.11 '@smithy/util-retry': 3.0.11 @@ -20327,12 +20349,12 @@ snapshots: '@aws-sdk/core@3.716.0': dependencies: '@aws-sdk/types': 3.714.0 - '@smithy/core': 2.5.6 + '@smithy/core': 2.5.7 '@smithy/node-config-provider': 3.1.12 '@smithy/property-provider': 3.1.11 '@smithy/protocol-http': 4.1.8 '@smithy/signature-v4': 4.2.4 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/util-middleware': 3.0.11 fast-xml-parser: 4.4.1 @@ -20350,24 +20372,24 @@ snapshots: dependencies: '@aws-sdk/core': 3.716.0 '@aws-sdk/types': 3.714.0 - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/node-http-handler': 3.3.3 '@smithy/property-provider': 3.1.11 '@smithy/protocol-http': 4.1.8 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 - '@smithy/util-stream': 3.3.3 + '@smithy/util-stream': 3.3.4 tslib: 2.8.1 - '@aws-sdk/credential-provider-ini@3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0)': + '@aws-sdk/credential-provider-ini@3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))(@aws-sdk/client-sts@3.721.0)': dependencies: - '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/client-sts': 3.721.0 '@aws-sdk/core': 3.716.0 '@aws-sdk/credential-provider-env': 3.716.0 '@aws-sdk/credential-provider-http': 3.716.0 '@aws-sdk/credential-provider-process': 3.716.0 - '@aws-sdk/credential-provider-sso': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0)) - '@aws-sdk/credential-provider-web-identity': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/credential-provider-sso': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0)) + '@aws-sdk/credential-provider-web-identity': 3.716.0(@aws-sdk/client-sts@3.721.0) '@aws-sdk/types': 3.714.0 '@smithy/credential-provider-imds': 3.2.8 '@smithy/property-provider': 3.1.11 @@ -20378,14 +20400,14 @@ snapshots: - '@aws-sdk/client-sso-oidc' - aws-crt - '@aws-sdk/credential-provider-node@3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0)': + '@aws-sdk/credential-provider-node@3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))(@aws-sdk/client-sts@3.721.0)': dependencies: '@aws-sdk/credential-provider-env': 3.716.0 '@aws-sdk/credential-provider-http': 3.716.0 - '@aws-sdk/credential-provider-ini': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/credential-provider-ini': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))(@aws-sdk/client-sts@3.721.0) '@aws-sdk/credential-provider-process': 3.716.0 - '@aws-sdk/credential-provider-sso': 3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0)) - '@aws-sdk/credential-provider-web-identity': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/credential-provider-sso': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0)) + '@aws-sdk/credential-provider-web-identity': 3.716.0(@aws-sdk/client-sts@3.721.0) '@aws-sdk/types': 3.714.0 '@smithy/credential-provider-imds': 3.2.8 '@smithy/property-provider': 3.1.11 @@ -20406,11 +20428,11 @@ snapshots: '@smithy/types': 3.7.2 tslib: 2.8.1 - '@aws-sdk/credential-provider-sso@3.716.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))': + '@aws-sdk/credential-provider-sso@3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))': dependencies: - '@aws-sdk/client-sso': 3.716.0 + '@aws-sdk/client-sso': 3.721.0 '@aws-sdk/core': 3.716.0 - '@aws-sdk/token-providers': 3.714.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0)) + '@aws-sdk/token-providers': 3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0)) '@aws-sdk/types': 3.714.0 '@smithy/property-provider': 3.1.11 '@smithy/shared-ini-file-loader': 3.1.12 @@ -20420,9 +20442,9 @@ snapshots: - '@aws-sdk/client-sso-oidc' - aws-crt - '@aws-sdk/credential-provider-web-identity@3.716.0(@aws-sdk/client-sts@3.716.0)': + '@aws-sdk/credential-provider-web-identity@3.716.0(@aws-sdk/client-sts@3.721.0)': dependencies: - '@aws-sdk/client-sts': 3.716.0 + '@aws-sdk/client-sts': 3.721.0 '@aws-sdk/core': 3.716.0 '@aws-sdk/types': 3.714.0 '@smithy/property-provider': 3.1.11 @@ -20436,7 +20458,7 @@ snapshots: '@smithy/types': 3.7.2 tslib: 2.8.1 - '@aws-sdk/middleware-bucket-endpoint@3.714.0': + '@aws-sdk/middleware-bucket-endpoint@3.721.0': dependencies: '@aws-sdk/types': 3.714.0 '@aws-sdk/util-arn-parser': 3.693.0 @@ -20472,7 +20494,7 @@ snapshots: '@smithy/protocol-http': 4.1.8 '@smithy/types': 3.7.2 '@smithy/util-middleware': 3.0.11 - '@smithy/util-stream': 3.3.3 + '@smithy/util-stream': 3.3.4 '@smithy/util-utf8': 3.0.0 tslib: 2.8.1 @@ -20507,15 +20529,15 @@ snapshots: '@aws-sdk/core': 3.716.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-arn-parser': 3.693.0 - '@smithy/core': 2.5.6 + '@smithy/core': 2.5.7 '@smithy/node-config-provider': 3.1.12 '@smithy/protocol-http': 4.1.8 '@smithy/signature-v4': 4.2.4 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/util-config-provider': 3.0.0 '@smithy/util-middleware': 3.0.11 - '@smithy/util-stream': 3.3.3 + '@smithy/util-stream': 3.3.4 '@smithy/util-utf8': 3.0.0 tslib: 2.8.1 @@ -20536,12 +20558,12 @@ snapshots: '@smithy/types': 3.7.2 tslib: 2.8.1 - '@aws-sdk/middleware-user-agent@3.716.0': + '@aws-sdk/middleware-user-agent@3.721.0': dependencies: '@aws-sdk/core': 3.716.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-endpoints': 3.714.0 - '@smithy/core': 2.5.6 + '@smithy/core': 2.5.7 '@smithy/protocol-http': 4.1.8 '@smithy/types': 3.7.2 tslib: 2.8.1 @@ -20552,7 +20574,7 @@ snapshots: '@aws-sdk/util-format-url': 3.714.0 '@smithy/eventstream-codec': 3.1.10 '@smithy/eventstream-serde-browser': 3.0.14 - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/protocol-http': 4.1.8 '@smithy/signature-v4': 4.2.4 '@smithy/types': 3.7.2 @@ -20568,14 +20590,14 @@ snapshots: '@smithy/util-middleware': 3.0.11 tslib: 2.8.1 - '@aws-sdk/s3-request-presigner@3.717.0': + '@aws-sdk/s3-request-presigner@3.721.0': dependencies: '@aws-sdk/signature-v4-multi-region': 3.716.0 '@aws-sdk/types': 3.714.0 '@aws-sdk/util-format-url': 3.714.0 - '@smithy/middleware-endpoint': 3.2.7 + '@smithy/middleware-endpoint': 3.2.8 '@smithy/protocol-http': 4.1.8 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 tslib: 2.8.1 @@ -20588,9 +20610,9 @@ snapshots: '@smithy/types': 3.7.2 tslib: 2.8.1 - '@aws-sdk/token-providers@3.714.0(@aws-sdk/client-sso-oidc@3.716.0(@aws-sdk/client-sts@3.716.0))': + '@aws-sdk/token-providers@3.721.0(@aws-sdk/client-sso-oidc@3.721.0(@aws-sdk/client-sts@3.721.0))': dependencies: - '@aws-sdk/client-sso-oidc': 3.716.0(@aws-sdk/client-sts@3.716.0) + '@aws-sdk/client-sso-oidc': 3.721.0(@aws-sdk/client-sts@3.721.0) '@aws-sdk/types': 3.714.0 '@smithy/property-provider': 3.1.11 '@smithy/shared-ini-file-loader': 3.1.12 @@ -20631,9 +20653,9 @@ snapshots: bowser: 2.11.0 tslib: 2.8.1 - '@aws-sdk/util-user-agent-node@3.716.0': + '@aws-sdk/util-user-agent-node@3.721.0': dependencies: - '@aws-sdk/middleware-user-agent': 3.716.0 + '@aws-sdk/middleware-user-agent': 3.721.0 '@aws-sdk/types': 3.714.0 '@smithy/node-config-provider': 3.1.12 '@smithy/types': 3.7.2 @@ -21469,7 +21491,7 @@ snapshots: '@bigmi/core@0.0.4(bitcoinjs-lib@7.0.0-rc.0(typescript@5.6.3))(bs58@6.0.0)(viem@2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8))': dependencies: - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.0 bech32: 2.0.0 bitcoinjs-lib: 7.0.0-rc.0(typescript@5.6.3) bs58: 6.0.0 @@ -21529,7 +21551,7 @@ snapshots: '@coinbase/coinbase-sdk@0.10.0(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)': dependencies: - '@scure/bip32': 1.6.0 + '@scure/bip32': 1.6.1 abitype: 1.0.8(typescript@5.6.3)(zod@3.23.8) axios: 1.7.9(debug@4.4.0) axios-mock-adapter: 1.22.0(axios@1.7.9) @@ -21552,11 +21574,11 @@ snapshots: '@colors/colors@1.5.0': optional: true - '@commitlint/cli@18.6.1(@types/node@22.10.3)(typescript@5.6.3)': + '@commitlint/cli@18.6.1(@types/node@22.10.4)(typescript@5.6.3)': dependencies: '@commitlint/format': 18.6.1 '@commitlint/lint': 18.6.1 - '@commitlint/load': 18.6.1(@types/node@22.10.3)(typescript@5.6.3) + '@commitlint/load': 18.6.1(@types/node@22.10.4)(typescript@5.6.3) '@commitlint/read': 18.6.1 '@commitlint/types': 18.6.1 execa: 5.1.1 @@ -21606,7 +21628,7 @@ snapshots: '@commitlint/rules': 18.6.1 '@commitlint/types': 18.6.1 - '@commitlint/load@18.6.1(@types/node@22.10.3)(typescript@5.6.3)': + '@commitlint/load@18.6.1(@types/node@22.10.4)(typescript@5.6.3)': dependencies: '@commitlint/config-validator': 18.6.1 '@commitlint/execute-rule': 18.6.1 @@ -21614,7 +21636,7 @@ snapshots: '@commitlint/types': 18.6.1 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.6.3) - cosmiconfig-typescript-loader: 5.1.0(@types/node@22.10.3)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3) + cosmiconfig-typescript-loader: 5.1.0(@types/node@22.10.4)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -21670,7 +21692,7 @@ snapshots: '@coral-xyz/anchor@0.29.0(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)': dependencies: '@coral-xyz/borsh': 0.29.0(@solana/web3.js@1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.0 '@solana/web3.js': 1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) bn.js: 5.2.1 bs58: 4.0.1 @@ -21692,7 +21714,7 @@ snapshots: dependencies: '@coral-xyz/anchor-errors': 0.30.1 '@coral-xyz/borsh': 0.30.1(@solana/web3.js@1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.0 '@solana/web3.js': 1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) bn.js: 5.2.1 bs58: 4.0.1 @@ -22006,8 +22028,8 @@ snapshots: dependencies: '@dfinity/candid': 2.1.3(@dfinity/principal@2.1.3) '@dfinity/principal': 2.1.3 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 base64-arraybuffer: 0.2.0 borc: 2.1.2 buffer: 6.0.3 @@ -22021,21 +22043,21 @@ snapshots: dependencies: '@dfinity/agent': 2.1.3(@dfinity/candid@2.1.3(@dfinity/principal@2.1.3))(@dfinity/principal@2.1.3) '@dfinity/principal': 2.1.3 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 '@peculiar/webcrypto': 1.5.0 borc: 2.1.2 '@dfinity/principal@2.1.3': dependencies: - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.0 '@discordjs/builders@1.10.0': dependencies: '@discordjs/formatters': 0.6.0 '@discordjs/util': 1.1.1 '@sapphire/shapeshift': 4.0.0 - discord-api-types: 0.37.114 + discord-api-types: 0.37.115 fast-deep-equal: 3.1.3 ts-mixer: 6.0.4 tslib: 2.8.1 @@ -22050,7 +22072,7 @@ snapshots: '@discordjs/formatters@0.6.0': dependencies: - discord-api-types: 0.37.114 + discord-api-types: 0.37.115 '@discordjs/node-pre-gyp@0.4.5(encoding@0.1.13)': dependencies: @@ -22997,7 +23019,7 @@ snapshots: '@huggingface/jinja': 0.2.2 onnxruntime-node: 1.20.1 - '@elizaos/core@0.1.7-alpha.2(@google-cloud/vertexai@1.9.2(encoding@0.1.13))(@langchain/core@0.3.27(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.9)(encoding@0.1.13)(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0)': + '@elizaos/core@0.1.7-alpha.2(@google-cloud/vertexai@1.9.2(encoding@0.1.13))(@langchain/core@0.3.27(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.9)(encoding@0.1.13)(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)': dependencies: '@ai-sdk/anthropic': 0.0.56(zod@3.23.8) '@ai-sdk/google': 0.0.55(zod@3.23.8) @@ -23007,7 +23029,7 @@ snapshots: '@anthropic-ai/sdk': 0.30.1(encoding@0.1.13) '@fal-ai/client': 1.2.0 '@types/uuid': 10.0.0 - ai: 3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) + ai: 3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) anthropic-vertex-ai: 1.0.2(encoding@0.1.13)(zod@3.23.8) fastembed: 1.14.1 fastestsmallesttextencoderdecoder: 1.0.22 @@ -23732,23 +23754,23 @@ snapshots: '@floating-ui/utils@0.2.8': {} - '@fuel-ts/abi-coder@0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/abi-coder@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) type-fest: 4.31.0 transitivePeerDependencies: - vitest - '@fuel-ts/abi-typegen@0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/abi-typegen@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/versions': 0.97.2 commander: 12.1.0 glob: 10.4.5 @@ -23759,21 +23781,21 @@ snapshots: transitivePeerDependencies: - vitest - '@fuel-ts/account@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/account@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/versions': 0.97.2 '@fuels/vm-asm': 0.58.2 - '@noble/curves': 1.7.0 + '@noble/curves': 1.8.0 events: 3.3.0 graphql: 16.10.0 graphql-request: 6.1.0(encoding@0.1.13)(graphql@16.10.0) @@ -23783,30 +23805,30 @@ snapshots: - encoding - vitest - '@fuel-ts/address@0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/address@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@noble/hashes': 1.6.1 + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@noble/hashes': 1.7.0 bech32: 2.0.0 transitivePeerDependencies: - vitest - '@fuel-ts/contract@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/contract@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/versions': 0.97.2 '@fuels/vm-asm': 0.58.2 ramda: 0.30.1 @@ -23814,13 +23836,13 @@ snapshots: - encoding - vitest - '@fuel-ts/crypto@0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/crypto@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@noble/hashes': 1.6.1 + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@noble/hashes': 1.7.0 transitivePeerDependencies: - vitest @@ -23828,12 +23850,12 @@ snapshots: dependencies: '@fuel-ts/versions': 0.97.2 - '@fuel-ts/hasher@0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/hasher@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@noble/hashes': 1.6.1 + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@noble/hashes': 1.7.0 transitivePeerDependencies: - vitest @@ -23845,78 +23867,78 @@ snapshots: '@types/bn.js': 5.1.6 bn.js: 5.2.1 - '@fuel-ts/merkle@0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/merkle@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/math': 0.97.2 transitivePeerDependencies: - vitest - '@fuel-ts/program@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/program@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuels/vm-asm': 0.58.2 ramda: 0.30.1 transitivePeerDependencies: - encoding - vitest - '@fuel-ts/recipes@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/recipes@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/abi-typegen': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/contract': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-typegen': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/contract': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 - '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) transitivePeerDependencies: - encoding - vitest - '@fuel-ts/script@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/script@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) transitivePeerDependencies: - encoding - vitest - '@fuel-ts/transactions@0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/transactions@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) transitivePeerDependencies: - vitest - '@fuel-ts/utils@0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@fuel-ts/utils@0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: '@fuel-ts/errors': 0.97.2 '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 '@fuel-ts/versions': 0.97.2 fflate: 0.8.2 - vitest: 2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + vitest: 2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) '@fuel-ts/versions@0.97.2': dependencies: @@ -23925,10 +23947,10 @@ snapshots: '@fuels/vm-asm@0.58.2': {} - '@goat-sdk/adapter-vercel-ai@0.2.0(@goat-sdk/core@0.4.0)(ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8))': + '@goat-sdk/adapter-vercel-ai@0.2.0(@goat-sdk/core@0.4.0)(ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8))': dependencies: '@goat-sdk/core': 0.4.0 - ai: 3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) + ai: 3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) zod: 3.23.8 '@goat-sdk/core@0.4.0': @@ -24704,8 +24726,8 @@ snapshots: dependencies: '@bigmi/core': 0.0.4(bitcoinjs-lib@7.0.0-rc.0(typescript@5.6.3))(bs58@6.0.0)(viem@2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)) '@lifi/types': 16.3.0 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 '@solana/wallet-adapter-base': 0.9.23(@solana/web3.js@1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) '@solana/web3.js': 1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) bech32: 2.0.0 @@ -24998,7 +25020,7 @@ snapshots: dependencies: '@metaplex-foundation/umi': 0.9.2 '@metaplex-foundation/umi-web3js-adapters': 0.9.2(@metaplex-foundation/umi@0.9.2)(@solana/web3.js@1.95.5(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)) - '@noble/curves': 1.7.0 + '@noble/curves': 1.8.0 '@solana/web3.js': 1.95.5(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10) '@metaplex-foundation/umi-http-fetch@0.9.2(@metaplex-foundation/umi@0.9.2)(encoding@0.1.13)': @@ -25156,10 +25178,10 @@ snapshots: dependencies: '@graphql-typed-document-node/core': 3.2.0(graphql@16.10.0) '@mysten/bcs': 1.2.0 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - '@scure/bip32': 1.6.0 - '@scure/bip39': 1.5.0 + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 + '@scure/bip32': 1.6.1 + '@scure/bip39': 1.5.1 '@simplewebauthn/typescript-types': 7.4.0 '@suchipi/femver': 1.0.0 bech32: 2.0.0 @@ -25346,6 +25368,10 @@ snapshots: dependencies: '@noble/hashes': 1.6.0 + '@noble/curves@1.8.0': + dependencies: + '@noble/hashes': 1.7.0 + '@noble/ed25519@1.7.3': {} '@noble/hashes@1.2.0': {} @@ -25364,6 +25390,8 @@ snapshots: '@noble/hashes@1.6.1': {} + '@noble/hashes@1.7.0': {} + '@noble/secp256k1@1.7.1': {} '@node-llama-cpp/linux-arm64@3.1.1': @@ -25813,7 +25841,7 @@ snapshots: '@octokit/core': 6.1.2 '@octokit/oauth-authorization-url': 7.1.1 '@octokit/oauth-methods': 5.1.3 - '@types/aws-lambda': 8.10.146 + '@types/aws-lambda': 8.10.147 universal-user-agent: 7.0.2 '@octokit/oauth-authorization-url@7.1.1': {} @@ -27012,6 +27040,12 @@ snapshots: '@noble/hashes': 1.6.1 '@scure/base': 1.2.1 + '@scure/bip32@1.6.1': + dependencies: + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 + '@scure/base': 1.2.1 + '@scure/bip39@1.1.1': dependencies: '@noble/hashes': 1.2.0 @@ -27032,6 +27066,11 @@ snapshots: '@noble/hashes': 1.6.1 '@scure/base': 1.2.1 + '@scure/bip39@1.5.1': + dependencies: + '@noble/hashes': 1.7.0 + '@scure/base': 1.2.1 + '@scure/starknet@1.0.0': dependencies: '@noble/curves': 1.3.0 @@ -27259,14 +27298,14 @@ snapshots: '@smithy/util-middleware': 3.0.11 tslib: 2.8.1 - '@smithy/core@2.5.6': + '@smithy/core@2.5.7': dependencies: '@smithy/middleware-serde': 3.0.11 '@smithy/protocol-http': 4.1.8 '@smithy/types': 3.7.2 '@smithy/util-body-length-browser': 3.0.0 '@smithy/util-middleware': 3.0.11 - '@smithy/util-stream': 3.3.3 + '@smithy/util-stream': 3.3.4 '@smithy/util-utf8': 3.0.0 tslib: 2.8.1 @@ -27308,7 +27347,7 @@ snapshots: '@smithy/types': 3.7.2 tslib: 2.8.1 - '@smithy/fetch-http-handler@4.1.2': + '@smithy/fetch-http-handler@4.1.3': dependencies: '@smithy/protocol-http': 4.1.8 '@smithy/querystring-builder': 3.0.11 @@ -27361,9 +27400,9 @@ snapshots: '@smithy/types': 3.7.2 tslib: 2.8.1 - '@smithy/middleware-endpoint@3.2.7': + '@smithy/middleware-endpoint@3.2.8': dependencies: - '@smithy/core': 2.5.6 + '@smithy/core': 2.5.7 '@smithy/middleware-serde': 3.0.11 '@smithy/node-config-provider': 3.1.12 '@smithy/shared-ini-file-loader': 3.1.12 @@ -27372,12 +27411,12 @@ snapshots: '@smithy/util-middleware': 3.0.11 tslib: 2.8.1 - '@smithy/middleware-retry@3.0.32': + '@smithy/middleware-retry@3.0.34': dependencies: '@smithy/node-config-provider': 3.1.12 '@smithy/protocol-http': 4.1.8 '@smithy/service-error-classification': 3.0.11 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 '@smithy/util-middleware': 3.0.11 '@smithy/util-retry': 3.0.11 @@ -27450,14 +27489,14 @@ snapshots: '@smithy/util-utf8': 3.0.0 tslib: 2.8.1 - '@smithy/smithy-client@3.5.2': + '@smithy/smithy-client@3.7.0': dependencies: - '@smithy/core': 2.5.6 - '@smithy/middleware-endpoint': 3.2.7 + '@smithy/core': 2.5.7 + '@smithy/middleware-endpoint': 3.2.8 '@smithy/middleware-stack': 3.0.11 '@smithy/protocol-http': 4.1.8 '@smithy/types': 3.7.2 - '@smithy/util-stream': 3.3.3 + '@smithy/util-stream': 3.3.4 tslib: 2.8.1 '@smithy/types@3.7.2': @@ -27498,21 +27537,21 @@ snapshots: dependencies: tslib: 2.8.1 - '@smithy/util-defaults-mode-browser@3.0.32': + '@smithy/util-defaults-mode-browser@3.0.34': dependencies: '@smithy/property-provider': 3.1.11 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 bowser: 2.11.0 tslib: 2.8.1 - '@smithy/util-defaults-mode-node@3.0.32': + '@smithy/util-defaults-mode-node@3.0.34': dependencies: '@smithy/config-resolver': 3.0.13 '@smithy/credential-provider-imds': 3.2.8 '@smithy/node-config-provider': 3.1.12 '@smithy/property-provider': 3.1.11 - '@smithy/smithy-client': 3.5.2 + '@smithy/smithy-client': 3.7.0 '@smithy/types': 3.7.2 tslib: 2.8.1 @@ -27537,9 +27576,9 @@ snapshots: '@smithy/types': 3.7.2 tslib: 2.8.1 - '@smithy/util-stream@3.3.3': + '@smithy/util-stream@3.3.4': dependencies: - '@smithy/fetch-http-handler': 4.1.2 + '@smithy/fetch-http-handler': 4.1.3 '@smithy/node-http-handler': 3.3.3 '@smithy/types': 3.7.2 '@smithy/util-base64': 3.0.0 @@ -27767,8 +27806,8 @@ snapshots: '@solana/web3.js@1.95.5(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 '@solana/buffer-layout': 4.0.1 agentkeepalive: 4.6.0 bigint-buffer: 1.1.5 @@ -27789,8 +27828,8 @@ snapshots: '@solana/web3.js@1.95.8(bufferutil@4.0.9)(encoding@0.1.13)(utf-8-validate@5.0.10)': dependencies: '@babel/runtime': 7.26.0 - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 '@solana/buffer-layout': 4.0.1 agentkeepalive: 4.6.0 bigint-buffer: 1.1.5 @@ -27814,7 +27853,7 @@ snapshots: '@spruceid/siwe-parser@2.1.2': dependencies: - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.0 apg-js: 4.4.0 uri-js: 4.4.1 valid-url: 1.0.9 @@ -28190,7 +28229,7 @@ snapshots: dependencies: '@types/estree': 1.0.6 - '@types/aws-lambda@8.10.146': {} + '@types/aws-lambda@8.10.147': {} '@types/babel__core@7.20.5': dependencies: @@ -28575,7 +28614,7 @@ snapshots: dependencies: undici-types: 6.19.8 - '@types/node@22.10.3': + '@types/node@22.10.4': dependencies: undici-types: 6.20.0 @@ -28955,13 +28994,13 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': + '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0))': dependencies: eslint: 9.16.0(jiti@2.4.2) optionalDependencies: '@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) typescript: 5.6.3 - vitest: 2.1.5(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) + vitest: 2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0) '@vitest/expect@2.1.4': dependencies: @@ -28977,21 +29016,21 @@ snapshots: chai: 5.1.2 tinyrainbow: 1.2.0 - '@vitest/mocker@2.1.4(vite@5.4.11(@types/node@22.10.3)(terser@5.37.0))': + '@vitest/mocker@2.1.4(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0))': dependencies: '@vitest/spy': 2.1.4 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.11(@types/node@22.10.3)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) - '@vitest/mocker@2.1.5(vite@5.4.11(@types/node@22.10.3)(terser@5.37.0))': + '@vitest/mocker@2.1.5(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0))': dependencies: '@vitest/spy': 2.1.5 estree-walker: 3.0.3 magic-string: 0.30.17 optionalDependencies: - vite: 5.4.11(@types/node@22.10.3)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) '@vitest/pretty-format@2.1.4': dependencies: @@ -29689,13 +29728,13 @@ snapshots: clean-stack: 2.2.0 indent-string: 4.0.0 - ai@3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): + ai@3.4.33(openai@4.73.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): dependencies: '@ai-sdk/provider': 0.0.26 '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.23.8) '@ai-sdk/solid': 0.0.54(zod@3.23.8) - '@ai-sdk/svelte': 0.0.57(svelte@5.16.0)(zod@3.23.8) + '@ai-sdk/svelte': 0.0.57(svelte@5.16.1)(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) '@ai-sdk/vue': 0.0.59(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) '@opentelemetry/api': 1.9.0 @@ -29707,20 +29746,20 @@ snapshots: optionalDependencies: openai: 4.73.0(encoding@0.1.13)(zod@3.23.8) react: 18.3.1 - sswr: 2.1.0(svelte@5.16.0) - svelte: 5.16.0 + sswr: 2.1.0(svelte@5.16.1) + svelte: 5.16.1 zod: 3.23.8 transitivePeerDependencies: - solid-js - vue - ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.0))(svelte@5.16.0)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): + ai@3.4.33(openai@4.77.0(encoding@0.1.13)(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.16.1))(svelte@5.16.1)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): dependencies: '@ai-sdk/provider': 0.0.26 '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.23.8) '@ai-sdk/solid': 0.0.54(zod@3.23.8) - '@ai-sdk/svelte': 0.0.57(svelte@5.16.0)(zod@3.23.8) + '@ai-sdk/svelte': 0.0.57(svelte@5.16.1)(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) '@ai-sdk/vue': 0.0.59(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) '@opentelemetry/api': 1.9.0 @@ -29732,8 +29771,8 @@ snapshots: optionalDependencies: openai: 4.77.0(encoding@0.1.13)(zod@3.23.8) react: 18.3.1 - sswr: 2.1.0(svelte@5.16.0) - svelte: 5.16.0 + sswr: 2.1.0(svelte@5.16.1) + svelte: 5.16.1 zod: 3.23.8 transitivePeerDependencies: - solid-js @@ -29930,9 +29969,9 @@ snapshots: array-buffer-byte-length: 1.0.2 call-bind: 1.0.8 define-properties: 1.2.1 - es-abstract: 1.23.8 + es-abstract: 1.23.9 es-errors: 1.3.0 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 is-array-buffer: 3.0.5 arrify@1.0.1: {} @@ -30354,7 +30393,7 @@ snapshots: bip32@4.0.0: dependencies: - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.0 '@scure/base': 1.2.1 typeforce: 1.18.0 wif: 2.0.6 @@ -30372,7 +30411,7 @@ snapshots: bitcoinjs-lib@7.0.0-rc.0(typescript@5.6.3): dependencies: - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.0 bech32: 2.0.0 bip174: 3.0.0-rc.1 bs58check: 4.0.0 @@ -30653,7 +30692,7 @@ snapshots: bs58check@4.0.0: dependencies: - '@noble/hashes': 1.6.1 + '@noble/hashes': 1.7.0 bs58: 6.0.0 bser@2.1.1: @@ -30800,13 +30839,13 @@ snapshots: dependencies: call-bind-apply-helpers: 1.0.1 es-define-property: 1.0.1 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 set-function-length: 1.2.2 call-bound@1.0.3: dependencies: call-bind-apply-helpers: 1.0.1 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 callsites@3.1.0: {} @@ -31021,10 +31060,10 @@ snapshots: cive@0.7.1(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: - '@noble/curves': 1.7.0 - '@noble/hashes': 1.6.1 - '@scure/bip32': 1.6.0 - '@scure/bip39': 1.5.0 + '@noble/curves': 1.8.0 + '@noble/hashes': 1.7.0 + '@scure/bip32': 1.6.1 + '@scure/bip39': 1.5.1 viem: 2.21.58(bufferutil@4.0.9)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) zod: 3.23.8 transitivePeerDependencies: @@ -31474,9 +31513,9 @@ snapshots: dependencies: layout-base: 2.0.1 - cosmiconfig-typescript-loader@5.1.0(@types/node@22.10.3)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3): + cosmiconfig-typescript-loader@5.1.0(@types/node@22.10.4)(cosmiconfig@8.3.6(typescript@5.6.3))(typescript@5.6.3): dependencies: - '@types/node': 22.10.3 + '@types/node': 22.10.4 cosmiconfig: 8.3.6(typescript@5.6.3) jiti: 1.21.7 typescript: 5.6.3 @@ -31559,13 +31598,13 @@ snapshots: - supports-color - ts-node - create-jest@29.7.0(@types/node@22.10.3): + create-jest@29.7.0(@types/node@22.10.4): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.10.3) + jest-config: 29.7.0(@types/node@22.10.4) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -32325,7 +32364,7 @@ snapshots: discord-api-types@0.37.100: {} - discord-api-types@0.37.114: {} + discord-api-types@0.37.115: {} discord-api-types@0.37.83: {} @@ -32491,8 +32530,8 @@ snapshots: echogarden@2.0.7(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(encoding@0.1.13)(utf-8-validate@5.0.10)(zod@3.23.8): dependencies: - '@aws-sdk/client-polly': 3.716.0 - '@aws-sdk/client-transcribe-streaming': 3.716.0 + '@aws-sdk/client-polly': 3.721.0 + '@aws-sdk/client-transcribe-streaming': 3.721.0 '@echogarden/audio-io': 0.2.3 '@echogarden/espeak-ng-emscripten': 0.3.3 '@echogarden/fasttext-wasm': 0.1.0 @@ -32652,7 +32691,7 @@ snapshots: o3: 1.0.3 u3: 0.1.1 - es-abstract@1.23.8: + es-abstract@1.23.9: dependencies: array-buffer-byte-length: 1.0.2 arraybuffer.prototype.slice: 1.0.4 @@ -32668,7 +32707,8 @@ snapshots: es-set-tostringtag: 2.1.0 es-to-primitive: 1.3.0 function.prototype.name: 1.1.8 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 + get-proto: 1.0.1 get-symbol-description: 1.1.0 globalthis: 1.0.4 gopd: 1.2.0 @@ -32690,10 +32730,11 @@ snapshots: object-keys: 1.1.1 object.assign: 4.1.7 own-keys: 1.0.1 - regexp.prototype.flags: 1.5.3 + regexp.prototype.flags: 1.5.4 safe-array-concat: 1.1.3 safe-push-apply: 1.0.0 safe-regex-test: 1.1.0 + set-proto: 1.0.0 string.prototype.trim: 1.2.10 string.prototype.trimend: 1.0.9 string.prototype.trimstart: 1.0.8 @@ -32717,7 +32758,7 @@ snapshots: es-set-tostringtag@2.1.0: dependencies: es-errors: 1.3.0 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 has-tostringtag: 1.0.2 hasown: 2.0.2 @@ -33384,7 +33425,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.4.0(supports-color@8.1.1) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -33757,24 +33798,24 @@ snapshots: fsevents@2.3.3: optional: true - fuels@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)): + fuels@0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)): dependencies: - '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/abi-typegen': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/contract': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-coder': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/abi-typegen': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/account': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/address': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/contract': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/crypto': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/errors': 0.97.2 - '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/hasher': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/interfaces': 0.97.2 '@fuel-ts/math': 0.97.2 - '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/recipes': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/script': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) - '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/merkle': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/program': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/recipes': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/script': 0.97.2(encoding@0.1.13)(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/transactions': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) + '@fuel-ts/utils': 0.97.2(vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0)) '@fuel-ts/versions': 0.97.2 bundle-require: 5.1.0(esbuild@0.24.2) chalk: 4.1.2 @@ -33867,14 +33908,14 @@ snapshots: get-east-asian-width@1.3.0: {} - get-intrinsic@1.2.6: + get-intrinsic@1.2.7: dependencies: call-bind-apply-helpers: 1.0.1 - dunder-proto: 1.0.1 es-define-property: 1.0.1 es-errors: 1.3.0 es-object-atoms: 1.0.0 function-bind: 1.1.2 + get-proto: 1.0.1 gopd: 1.2.0 has-symbols: 1.1.0 hasown: 2.0.2 @@ -33909,6 +33950,11 @@ snapshots: get-port@5.1.1: {} + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.0.0 + get-stdin@9.0.0: {} get-stream@5.2.0: @@ -33925,7 +33971,7 @@ snapshots: dependencies: call-bound: 1.0.3 es-errors: 1.3.0 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 get-tsconfig@4.8.1: dependencies: @@ -34261,7 +34307,7 @@ snapshots: hard-rejection@2.1.0: {} - hardhat@2.22.17(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.3)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10): + hardhat@2.22.17(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: '@ethersproject/abi': 5.7.0 '@metamask/eth-sig-util': 4.0.1 @@ -34308,7 +34354,7 @@ snapshots: uuid: 8.3.2 ws: 7.5.10(bufferutil@4.0.9)(utf-8-validate@5.0.10) optionalDependencies: - ts-node: 10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.3)(typescript@5.6.3) + ts-node: 10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3) typescript: 5.6.3 transitivePeerDependencies: - bufferutil @@ -34978,15 +35024,18 @@ snapshots: dependencies: call-bind: 1.0.8 call-bound: 1.0.3 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 is-arrayish@0.2.1: {} is-arrayish@0.3.2: {} - is-async-function@2.0.0: + is-async-function@2.1.0: dependencies: + call-bound: 1.0.3 + get-proto: 1.0.1 has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 is-bigint@1.1.0: dependencies: @@ -35022,7 +35071,7 @@ snapshots: is-data-view@1.0.2: dependencies: call-bound: 1.0.3 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 is-typed-array: 1.1.15 is-date-object@1.1.0: @@ -35054,9 +35103,12 @@ snapshots: is-generator-fn@2.1.0: {} - is-generator-function@1.0.10: + is-generator-function@1.1.0: dependencies: + call-bound: 1.0.3 + get-proto: 1.0.1 has-tostringtag: 1.0.2 + safe-regex-test: 1.1.0 is-glob@4.0.3: dependencies: @@ -35222,7 +35274,7 @@ snapshots: is-weakset@2.0.4: dependencies: call-bound: 1.0.3 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 is-wsl@2.2.0: dependencies: @@ -35430,16 +35482,16 @@ snapshots: - supports-color - ts-node - jest-cli@29.7.0(@types/node@22.10.3): + jest-cli@29.7.0(@types/node@22.10.4): dependencies: '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.10.3) + create-jest: 29.7.0(@types/node@22.10.4) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.10.3) + jest-config: 29.7.0(@types/node@22.10.4) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -35592,7 +35644,7 @@ snapshots: - babel-plugin-macros - supports-color - jest-config@29.7.0(@types/node@22.10.3): + jest-config@29.7.0(@types/node@22.10.4): dependencies: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 @@ -35617,7 +35669,7 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.10.3 + '@types/node': 22.10.4 transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -35898,12 +35950,12 @@ snapshots: - supports-color - ts-node - jest@29.7.0(@types/node@22.10.3): + jest@29.7.0(@types/node@22.10.4): dependencies: '@jest/core': 29.7.0(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@20.17.9)(typescript@5.6.3)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.10.3) + jest-cli: 29.7.0(@types/node@22.10.4) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -38324,7 +38376,7 @@ snapshots: own-keys@1.0.1: dependencies: - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 object-keys: 1.1.1 safe-push-apply: 1.0.0 @@ -40275,15 +40327,15 @@ snapshots: reflect-metadata@0.2.2: {} - reflect.getprototypeof@1.0.9: + reflect.getprototypeof@1.0.10: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 - dunder-proto: 1.0.1 - es-abstract: 1.23.8 + es-abstract: 1.23.9 es-errors: 1.3.0 - get-intrinsic: 1.2.6 - gopd: 1.2.0 + es-object-atoms: 1.0.0 + get-intrinsic: 1.2.7 + get-proto: 1.0.1 which-builtin-type: 1.2.1 regenerate-unicode-properties@10.2.0: @@ -40311,11 +40363,13 @@ snapshots: dependencies: regex-utilities: 2.3.0 - regexp.prototype.flags@1.5.3: + regexp.prototype.flags@1.5.4: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 es-errors: 1.3.0 + get-proto: 1.0.1 + gopd: 1.2.0 set-function-name: 2.0.2 regexpu-core@6.2.0: @@ -40660,7 +40714,7 @@ snapshots: dependencies: call-bind: 1.0.8 call-bound: 1.0.3 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 has-symbols: 1.1.0 isarray: 2.0.5 @@ -40862,7 +40916,7 @@ snapshots: define-data-property: 1.1.4 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 gopd: 1.2.0 has-property-descriptors: 1.0.2 @@ -40873,6 +40927,12 @@ snapshots: functions-have-names: 1.2.3 has-property-descriptors: 1.0.2 + set-proto@1.0.0: + dependencies: + dunder-proto: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.0.0 + setimmediate@1.0.5: {} setprototypeof@1.1.0: {} @@ -40980,14 +41040,14 @@ snapshots: dependencies: call-bound: 1.0.3 es-errors: 1.3.0 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 object-inspect: 1.13.3 side-channel-weakmap@1.0.2: dependencies: call-bound: 1.0.3 es-errors: 1.3.0 - get-intrinsic: 1.2.6 + get-intrinsic: 1.2.7 object-inspect: 1.13.3 side-channel-map: 1.0.1 @@ -41271,9 +41331,9 @@ snapshots: dependencies: minipass: 7.1.2 - sswr@2.1.0(svelte@5.16.0): + sswr@2.1.0(svelte@5.16.1): dependencies: - svelte: 5.16.0 + svelte: 5.16.1 swrev: 4.0.0 stack-utils@2.0.6: @@ -41394,7 +41454,7 @@ snapshots: call-bound: 1.0.3 define-data-property: 1.1.4 define-properties: 1.2.1 - es-abstract: 1.23.8 + es-abstract: 1.23.9 es-object-atoms: 1.0.0 has-property-descriptors: 1.0.2 @@ -41541,7 +41601,7 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - svelte@5.16.0: + svelte@5.16.1: dependencies: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 @@ -41893,7 +41953,7 @@ snapshots: traverse@0.6.10: dependencies: gopd: 1.2.0 - typedarray.prototype.slice: 1.0.3 + typedarray.prototype.slice: 1.0.5 which-typed-array: 1.1.18 tree-kill@1.2.2: {} @@ -42018,14 +42078,14 @@ snapshots: optionalDependencies: '@swc/core': 1.10.4(@swc/helpers@0.5.15) - ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.3)(typescript@5.6.3): + ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.10.3 + '@types/node': 22.10.4 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 @@ -42227,7 +42287,7 @@ snapshots: gopd: 1.2.0 has-proto: 1.2.0 is-typed-array: 1.1.15 - reflect.getprototypeof: 1.0.9 + reflect.getprototypeof: 1.0.10 typed-array-length@1.0.7: dependencies: @@ -42236,7 +42296,7 @@ snapshots: gopd: 1.2.0 is-typed-array: 1.1.15 possible-typed-array-names: 1.0.0 - reflect.getprototypeof: 1.0.9 + reflect.getprototypeof: 1.0.10 typed-function@2.1.0: {} @@ -42244,12 +42304,14 @@ snapshots: dependencies: is-typedarray: 1.0.0 - typedarray.prototype.slice@1.0.3: + typedarray.prototype.slice@1.0.5: dependencies: call-bind: 1.0.8 define-properties: 1.2.1 - es-abstract: 1.23.8 + es-abstract: 1.23.9 es-errors: 1.3.0 + get-proto: 1.0.1 + math-intrinsics: 1.1.0 typed-array-buffer: 1.0.3 typed-array-byte-offset: 1.0.4 @@ -42628,7 +42690,7 @@ snapshots: dependencies: inherits: 2.0.4 is-arguments: 1.2.0 - is-generator-function: 1.0.10 + is-generator-function: 1.1.0 is-typed-array: 1.1.15 which-typed-array: 1.1.18 @@ -42778,12 +42840,12 @@ snapshots: - utf-8-validate - zod - vite-node@2.1.4(@types/node@22.10.3)(terser@5.37.0): + vite-node@2.1.4(@types/node@22.10.4)(terser@5.37.0): dependencies: cac: 6.7.14 debug: 4.4.0(supports-color@8.1.1) pathe: 1.1.2 - vite: 5.4.11(@types/node@22.10.3)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) transitivePeerDependencies: - '@types/node' - less @@ -42795,13 +42857,13 @@ snapshots: - supports-color - terser - vite-node@2.1.5(@types/node@22.10.3)(terser@5.37.0): + vite-node@2.1.5(@types/node@22.10.4)(terser@5.37.0): dependencies: cac: 6.7.14 debug: 4.4.0(supports-color@8.1.1) es-module-lexer: 1.6.0 pathe: 1.1.2 - vite: 5.4.11(@types/node@22.10.3)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) transitivePeerDependencies: - '@types/node' - less @@ -42845,13 +42907,13 @@ snapshots: dependencies: vite: link:client/@tanstack/router-plugin/vite - vite@5.4.11(@types/node@22.10.3)(terser@5.37.0): + vite@5.4.11(@types/node@22.10.4)(terser@5.37.0): dependencies: esbuild: 0.21.5 postcss: 8.4.49 rollup: 4.29.1 optionalDependencies: - '@types/node': 22.10.3 + '@types/node': 22.10.4 fsevents: 2.3.3 terser: 5.37.0 @@ -42865,10 +42927,10 @@ snapshots: fsevents: 2.3.3 terser: 5.37.0 - vitest@2.1.4(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): + vitest@2.1.4(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): dependencies: '@vitest/expect': 2.1.4 - '@vitest/mocker': 2.1.4(vite@5.4.11(@types/node@22.10.3)(terser@5.37.0)) + '@vitest/mocker': 2.1.4(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.4 '@vitest/snapshot': 2.1.4 @@ -42884,11 +42946,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@22.10.3)(terser@5.37.0) - vite-node: 2.1.4(@types/node@22.10.3)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) + vite-node: 2.1.4(@types/node@22.10.4)(terser@5.37.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.3 + '@types/node': 22.10.4 jsdom: 25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -42901,10 +42963,10 @@ snapshots: - supports-color - terser - vitest@2.1.5(@types/node@22.10.3)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): + vitest@2.1.5(@types/node@22.10.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): dependencies: '@vitest/expect': 2.1.5 - '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@22.10.3)(terser@5.37.0)) + '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.5 '@vitest/snapshot': 2.1.5 @@ -42920,11 +42982,11 @@ snapshots: tinyexec: 0.3.2 tinypool: 1.0.2 tinyrainbow: 1.2.0 - vite: 5.4.11(@types/node@22.10.3)(terser@5.37.0) - vite-node: 2.1.5(@types/node@22.10.3)(terser@5.37.0) + vite: 5.4.11(@types/node@22.10.4)(terser@5.37.0) + vite-node: 2.1.5(@types/node@22.10.4)(terser@5.37.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 22.10.3 + '@types/node': 22.10.4 jsdom: 25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10) transitivePeerDependencies: - less @@ -42940,7 +43002,7 @@ snapshots: vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.37.0): dependencies: '@vitest/expect': 2.1.5 - '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@22.10.3)(terser@5.37.0)) + '@vitest/mocker': 2.1.5(vite@5.4.11(@types/node@22.10.4)(terser@5.37.0)) '@vitest/pretty-format': 2.1.8 '@vitest/runner': 2.1.5 '@vitest/snapshot': 2.1.5 @@ -43188,10 +43250,10 @@ snapshots: - encoding - utf-8-validate - web3-plugin-zksync@1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.3)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)): + web3-plugin-zksync@1.0.8(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10)(web3@4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8)): dependencies: ethereum-cryptography: 2.2.1 - hardhat: 2.22.17(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.3)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) + hardhat: 2.22.17(bufferutil@4.0.9)(ts-node@10.9.2(@swc/core@1.10.4(@swc/helpers@0.5.15))(@types/node@22.10.4)(typescript@5.6.3))(typescript@5.6.3)(utf-8-validate@5.0.10) web3: 4.16.0(bufferutil@4.0.9)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)(zod@3.23.8) transitivePeerDependencies: - bufferutil @@ -43494,10 +43556,10 @@ snapshots: call-bound: 1.0.3 function.prototype.name: 1.1.8 has-tostringtag: 1.0.2 - is-async-function: 2.0.0 + is-async-function: 2.1.0 is-date-object: 1.1.0 is-finalizationregistry: 1.1.1 - is-generator-function: 1.0.10 + is-generator-function: 1.1.0 is-regex: 1.2.1 is-weakref: 1.1.0 isarray: 2.0.5 From 03596deb977722f1ecfa1530bb31edc992a3421a Mon Sep 17 00:00:00 2001 From: Shakker Nerd Date: Fri, 3 Jan 2025 04:22:41 +0000 Subject: [PATCH 15/37] chore: remove unused imports --- packages/plugin-sui/src/actions/transfer.ts | 1 - packages/plugin-sui/src/providers/wallet.ts | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/plugin-sui/src/actions/transfer.ts b/packages/plugin-sui/src/actions/transfer.ts index 721a27d5cf..d9471aaa5f 100644 --- a/packages/plugin-sui/src/actions/transfer.ts +++ b/packages/plugin-sui/src/actions/transfer.ts @@ -14,7 +14,6 @@ import { import { z } from "zod"; import { SuiClient, getFullnodeUrl } from "@mysten/sui/client"; -import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; import { Transaction } from "@mysten/sui/transactions"; import { SUI_DECIMALS } from "@mysten/sui/utils"; diff --git a/packages/plugin-sui/src/providers/wallet.ts b/packages/plugin-sui/src/providers/wallet.ts index 478fc2ce49..01e9c45fc1 100644 --- a/packages/plugin-sui/src/providers/wallet.ts +++ b/packages/plugin-sui/src/providers/wallet.ts @@ -7,7 +7,6 @@ import { } from "@elizaos/core"; import { getFullnodeUrl, SuiClient } from "@mysten/sui/client"; -import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; import { MIST_PER_SUI } from "@mysten/sui/utils"; import BigNumber from "bignumber.js"; From 7688f1c438a5dd93718950116ed8774062798568 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Thu, 2 Jan 2025 23:25:51 -0500 Subject: [PATCH 16/37] Default to TikToken truncation using the gpt-4o-mini model if tokenizer settings are not defined --- .../plugin-node/src/services/tokenizer.ts | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/plugin-node/src/services/tokenizer.ts b/packages/plugin-node/src/services/tokenizer.ts index 28f6bf7cb5..40d10cd7e0 100644 --- a/packages/plugin-node/src/services/tokenizer.ts +++ b/packages/plugin-node/src/services/tokenizer.ts @@ -28,28 +28,28 @@ export class TokenizationService } async trimTokens(context: string, maxTokens: number, model: string) { - const tokenizerModel = - this.runtime.getSetting("TOKENIZER_MODEL") || model; + const tokenizerModel = this.runtime.getSetting("TOKENIZER_MODEL"); const tokenizerType = this.runtime.getSetting("TOKENIZER_TYPE"); - switch (tokenizerType) { - case TokenizerType.Auto: - return this.truncateAuto(tokenizerModel, context, maxTokens); - - case TokenizerType.TikToken: - return this.truncateTiktoken( - tokenizerModel as TiktokenModel, - context, - maxTokens - ); - - default: - return this.truncateTiktoken( - model as TiktokenModel, - context, - maxTokens - ); + if (!tokenizerModel || !tokenizerType) { + // Default to TikToken truncation using the "gpt-4o-mini" model if tokenizer settings are not defined + return this.truncateTiktoken("gpt-4o-mini", context, maxTokens); } + + // Choose the truncation method based on tokenizer type + if (tokenizerType === TokenizerType.Auto) { + return this.truncateAuto(tokenizerModel, context, maxTokens); + } + + if (tokenizerType === TokenizerType.TikToken) { + return this.truncateTiktoken( + tokenizerModel as TiktokenModel, + context, + maxTokens + ); + } + + console.error(`Unsupported tokenizer type: ${tokenizerType}`); } async truncateAuto(modelPath: string, context: string, maxTokens: number) { From 70793535192fc47bc626977e5b4985a7c28700cf Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Thu, 2 Jan 2025 23:30:46 -0500 Subject: [PATCH 17/37] Remove 'model' parameter from trimTokens function; allow tokenizer model to be configured via environment settings --- packages/core/src/types.ts | 9 ++------- packages/plugin-node/src/services/tokenizer.ts | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 3187509c41..04d187dbb1 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -687,7 +687,6 @@ export type Character = { /** Image model provider to use, if different from modelProvider */ imageModelProvider?: ModelProviderName; - /** Image Vision model provider to use, if different from modelProvider */ imageVisionModelProvider?: ModelProviderName; @@ -1262,11 +1261,7 @@ export interface IAwsS3Service extends Service { } export interface ITokenizationService extends Service { - trimTokens( - context: string, - maxTokens: number, - model?: string - ): Promise; + trimTokens(context: string, maxTokens: number): Promise; } export type SearchImage = { @@ -1332,7 +1327,7 @@ export enum TokenizerType { Auto = "auto", TikToken = "tiktoken", } - + export enum TranscriptionProvider { OpenAI = "openai", Deepgram = "deepgram", diff --git a/packages/plugin-node/src/services/tokenizer.ts b/packages/plugin-node/src/services/tokenizer.ts index 40d10cd7e0..2b59040dec 100644 --- a/packages/plugin-node/src/services/tokenizer.ts +++ b/packages/plugin-node/src/services/tokenizer.ts @@ -27,7 +27,7 @@ export class TokenizationService this.runtime = runtime; } - async trimTokens(context: string, maxTokens: number, model: string) { + async trimTokens(context: string, maxTokens: number) { const tokenizerModel = this.runtime.getSetting("TOKENIZER_MODEL"); const tokenizerType = this.runtime.getSetting("TOKENIZER_TYPE"); From e97a9483e424f8d4d2d41def543433ef54ace6d7 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Thu, 2 Jan 2025 23:38:55 -0500 Subject: [PATCH 18/37] Remove model parameter --- .../src/actions/chat_with_attachments.ts | 3 +-- .../src/actions/summarize_conversation.ts | 3 +-- packages/client-discord/src/attachments.ts | 8 +------- packages/client-discord/src/utils.ts | 8 +------- .../src/actions/chat_with_attachments.ts | 3 +-- .../src/actions/summarize_conversation.ts | 3 +-- packages/client-slack/src/attachments.ts | 8 +------- packages/core/src/generation.ts | 16 +++++----------- packages/plugin-node/src/services/browser.ts | 6 +----- 9 files changed, 13 insertions(+), 45 deletions(-) diff --git a/packages/client-discord/src/actions/chat_with_attachments.ts b/packages/client-discord/src/actions/chat_with_attachments.ts index 3f5033ca31..f11d296fb0 100644 --- a/packages/client-discord/src/actions/chat_with_attachments.ts +++ b/packages/client-discord/src/actions/chat_with_attachments.ts @@ -198,8 +198,7 @@ const summarizeAction = { ); const template = await tokenizationService.trimTokens( summarizationTemplate, - chunkSize + 500, - model.model[ModelClass.SMALL] || "gpt-4o-mini" + chunkSize + 500 ); const context = composeContext({ state, diff --git a/packages/client-discord/src/actions/summarize_conversation.ts b/packages/client-discord/src/actions/summarize_conversation.ts index deee8c041f..f0b211e255 100644 --- a/packages/client-discord/src/actions/summarize_conversation.ts +++ b/packages/client-discord/src/actions/summarize_conversation.ts @@ -268,8 +268,7 @@ const summarizeAction = { state.currentChunk = chunk; const template = await tokenizationService.trimTokens( summarizationTemplate, - chunkSize + 500, - model.model[ModelClass.SMALL] || "gpt-4o-mini" + chunkSize + 500 ); const context = composeContext({ state, diff --git a/packages/client-discord/src/attachments.ts b/packages/client-discord/src/attachments.ts index b9de535060..f2ea49b615 100644 --- a/packages/client-discord/src/attachments.ts +++ b/packages/client-discord/src/attachments.ts @@ -10,7 +10,6 @@ import { ModelClass, ServiceType, ITokenizationService, - models, } from "@elizaos/core"; import { Attachment, Collection } from "discord.js"; import ffmpeg from "fluent-ffmpeg"; @@ -20,16 +19,11 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { - const model = models[runtime.character.modelProvider]; const tokenizationService = runtime.getService( ServiceType.TOKENIZATION ); // make sure text is under 128k characters - text = await tokenizationService.trimTokens( - text, - 100000, - model.model[ModelClass.SMALL] || "gpt-4o-mini" - ); + text = await tokenizationService.trimTokens(text, 100000); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/client-discord/src/utils.ts b/packages/client-discord/src/utils.ts index a3e47aa4f6..77d55f9da8 100644 --- a/packages/client-discord/src/utils.ts +++ b/packages/client-discord/src/utils.ts @@ -6,7 +6,6 @@ import { parseJSONObjectFromText, ServiceType, ITokenizationService, - models, } from "@elizaos/core"; import { ChannelType, @@ -49,15 +48,10 @@ export async function generateSummary( text: string ): Promise<{ title: string; description: string }> { // make sure text is under 128k characters - const model = models[runtime.character.modelProvider]; const tokenizationService = runtime.getService( ServiceType.TOKENIZATION ); - text = await tokenizationService.trimTokens( - text, - 100000, - model.model[ModelClass.SMALL] || "gpt-4o-mini" - ); + text = await tokenizationService.trimTokens(text, 100000); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/client-slack/src/actions/chat_with_attachments.ts b/packages/client-slack/src/actions/chat_with_attachments.ts index 303ec65476..d5592eeba5 100644 --- a/packages/client-slack/src/actions/chat_with_attachments.ts +++ b/packages/client-slack/src/actions/chat_with_attachments.ts @@ -206,8 +206,7 @@ const summarizeAction: Action = { ); const template = await tokenizationService.trimTokens( summarizationTemplate, - chunkSize + 500, - model.model[ModelClass.SMALL] || "gpt-4o-mini" + chunkSize + 500 ); const context = composeContext({ state: currentState, diff --git a/packages/client-slack/src/actions/summarize_conversation.ts b/packages/client-slack/src/actions/summarize_conversation.ts index 0568be10bf..9a84695b4e 100644 --- a/packages/client-slack/src/actions/summarize_conversation.ts +++ b/packages/client-slack/src/actions/summarize_conversation.ts @@ -285,8 +285,7 @@ const summarizeAction: Action = { const template = await tokenizationService.trimTokens( summarizationTemplate, - chunkSize + 500, - model.model[ModelClass.SMALL] || "gpt-4o-mini" + chunkSize + 500 ); const context = composeContext({ diff --git a/packages/client-slack/src/attachments.ts b/packages/client-slack/src/attachments.ts index e181df14bd..7d9d08d8c7 100644 --- a/packages/client-slack/src/attachments.ts +++ b/packages/client-slack/src/attachments.ts @@ -9,7 +9,6 @@ import { ModelClass, ServiceType, ITokenizationService, - models, } from "@elizaos/core"; import { WebClient } from "@slack/web-api"; import ffmpeg from "fluent-ffmpeg"; @@ -19,15 +18,10 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { - const model = models[runtime.character.modelProvider]; const tokenizationService = runtime.getService( ServiceType.TOKENIZATION ); - text = await tokenizationService.trimTokens( - text, - 100000, - model.model[ModelClass.SMALL] || "gpt-4o-mini" - ); + text = await tokenizationService.trimTokens(text, 100000); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 0724327157..f6f854b2ce 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -194,8 +194,7 @@ export async function generateText({ context = await tokenizationService.trimTokens( context, - max_context_length, - model + max_context_length ); let response: string; @@ -944,18 +943,13 @@ export async function generateMessageResponse({ modelClass: string; }): Promise { const provider = runtime.modelProvider; - const model = models[provider].model[modelClass]; const max_context_length = models[provider].settings.maxInputTokens; const tokenizationService = runtime.getService( ServiceType.TOKENIZATION ); - context = await tokenizationService.trimTokens( - context, - max_context_length, - model - ); + context = await tokenizationService.trimTokens(context, max_context_length); let retryLength = 1000; // exponential backoff while (true) { try { @@ -1429,7 +1423,8 @@ export const generateObject = async ({ const presence_penalty = models[provider].settings.presence_penalty; const max_context_length = models[provider].settings.maxInputTokens; const max_response_length = models[provider].settings.maxOutputTokens; - const experimental_telemetry = models[provider].settings.experimental_telemetry; + const experimental_telemetry = + models[provider].settings.experimental_telemetry; const apiKey = runtime.token; try { @@ -1439,8 +1434,7 @@ export const generateObject = async ({ context = await tokenizationService.trimTokens( context, - max_context_length, - model + max_context_length ); const modelOptions: ModelSettings = { diff --git a/packages/plugin-node/src/services/browser.ts b/packages/plugin-node/src/services/browser.ts index 08d063ba1b..22a2050a95 100644 --- a/packages/plugin-node/src/services/browser.ts +++ b/packages/plugin-node/src/services/browser.ts @@ -22,11 +22,7 @@ async function generateSummary( ); const model = models[runtime.character.modelProvider]; // make sure text is under 128k characters - text = await tokenizationService.trimTokens( - text, - 100000, - model.model[ModelClass.SMALL] || "gpt-4o-mini" - ); + text = await tokenizationService.trimTokens(text, 100000); const prompt = `Please generate a concise summary for the following text: From 237c849610866e9fcc73b818dd78cdd6f03fa5ac Mon Sep 17 00:00:00 2001 From: genesis0000 Date: Fri, 3 Jan 2025 13:53:31 +0700 Subject: [PATCH 19/37] feat: support for eternalai provider can write request/response --- characters/eternalai.character.json | 2 +- packages/core/src/generation.ts | 37 ++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/characters/eternalai.character.json b/characters/eternalai.character.json index da179cb3bf..890bcf3fa6 100644 --- a/characters/eternalai.character.json +++ b/characters/eternalai.character.json @@ -1,7 +1,7 @@ { "name": "TrollDetective.Exe", "plugins": [], - "clients": ["twitter"], + "clients": [], "modelProvider": "eternalai", "settings": { "secrets": {}, diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 67ed1b664a..d645e4b94d 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -183,7 +183,6 @@ export async function generateText({ switch (provider) { // OPENAI & LLAMACLOUD shared same structure. case ModelProviderName.OPENAI: - case ModelProviderName.ETERNALAI: case ModelProviderName.ALI_BAILIAN: case ModelProviderName.VOLENGINE: case ModelProviderName.LLAMACLOUD: @@ -216,6 +215,42 @@ export async function generateText({ break; } + case ModelProviderName.ETERNALAI: { + elizaLogger.debug("Initializing EternalAI model."); + const openai = createOpenAI({ + apiKey, + baseURL: endpoint, + fetch: async (url: string, options: any) => { + const fetching = await runtime.fetch(url, options); + if (process.env.ETERNAL_AI_LOG_REQUEST) { + elizaLogger.info("Request data: ", JSON.stringify(options, null, 2)); + const clonedResponse = fetching.clone(); + clonedResponse.json().then(data => { + elizaLogger.info("Response data: ", JSON.stringify(data, null, 2)); + }) + } + return fetching; + }, + }); + + const { text: openaiResponse } = await aiGenerateText({ + model: openai.languageModel(model), + prompt: context, + system: + runtime.character.system ?? + settings.SYSTEM_PROMPT ?? + undefined, + temperature: temperature, + maxTokens: max_response_length, + frequencyPenalty: frequency_penalty, + presencePenalty: presence_penalty, + }); + + response = openaiResponse; + elizaLogger.debug("Received response from EternalAI model."); + break; + } + case ModelProviderName.GOOGLE: { const google = createGoogleGenerativeAI({ fetch: runtime.fetch, From a70d8485706bf288ed9d22e79aeb8e2a35a0414a Mon Sep 17 00:00:00 2001 From: genesis0000 Date: Fri, 3 Jan 2025 13:53:36 +0700 Subject: [PATCH 20/37] feat: support for eternalai provider can write request/response --- .env.example | 1 + 1 file changed, 1 insertion(+) diff --git a/.env.example b/.env.example index f54f552f6a..8f23dd3906 100644 --- a/.env.example +++ b/.env.example @@ -20,6 +20,7 @@ IMAGE_OPENAI_MODEL= # Default: dall-e-3 ETERNALAI_URL= ETERNALAI_MODEL= # Default: "neuralmagic/Meta-Llama-3.1-405B-Instruct-quantized.w4a16" ETERNALAI_API_KEY= +ETERNAL_AI_LOG_REQUEST=false #Default: false GROK_API_KEY= # GROK API Key GROQ_API_KEY= # Starts with gsk_ From 148593a70099c0d015aec3aedea7eb6d74d56a33 Mon Sep 17 00:00:00 2001 From: genesis0000 Date: Fri, 3 Jan 2025 13:53:49 +0700 Subject: [PATCH 21/37] feat: support for eternalai provider can write request/response --- characters/eternalai.character.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/characters/eternalai.character.json b/characters/eternalai.character.json index 890bcf3fa6..da179cb3bf 100644 --- a/characters/eternalai.character.json +++ b/characters/eternalai.character.json @@ -1,7 +1,7 @@ { "name": "TrollDetective.Exe", "plugins": [], - "clients": [], + "clients": ["twitter"], "modelProvider": "eternalai", "settings": { "secrets": {}, From 94aa379fc660ad29e57a70fddc1c1f3b30f84942 Mon Sep 17 00:00:00 2001 From: sinecose Date: Fri, 3 Jan 2025 16:38:33 +0800 Subject: [PATCH 22/37] feat(near): replace console.log to elizaLogger --- packages/plugin-near/src/actions/swap.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/plugin-near/src/actions/swap.ts b/packages/plugin-near/src/actions/swap.ts index f11f6b134f..5d1ebbe3db 100644 --- a/packages/plugin-near/src/actions/swap.ts +++ b/packages/plugin-near/src/actions/swap.ts @@ -1,6 +1,7 @@ import { ActionExample, HandlerCallback, + elizaLogger, IAgentRuntime, Memory, ModelClass, @@ -34,7 +35,7 @@ async function checkStorageBalance( }); return balance !== null && balance.total !== "0"; } catch (error) { - console.log(`Error checking storage balance: ${error}`); + elizaLogger.log(`Error checking storage balance: ${error}`); return false; } } @@ -142,7 +143,7 @@ async function swapToken( return transactions; } catch (error) { - console.error("Error in swapToken:", error); + elizaLogger.error("Error in swapToken:", error); throw error; } } @@ -186,8 +187,8 @@ export const executeSwap: Action = { "TRADE_TOKENS_NEAR", "EXCHANGE_TOKENS_NEAR", ], - validate: async (runtime: IAgentRuntime, message: Memory) => { - console.log("Message:", message); + validate: async (_runtime: IAgentRuntime, message: Memory) => { + elizaLogger.log("Message:", message); return true; }, description: "Perform a token swap using Ref Finance.", @@ -221,14 +222,14 @@ export const executeSwap: Action = { modelClass: ModelClass.LARGE, }); - console.log("Response:", response); + elizaLogger.log("Response:", response); if ( !response.inputTokenId || !response.outputTokenId || !response.amount ) { - console.log("Missing required parameters, skipping swap"); + elizaLogger.log("Missing required parameters, skipping swap"); const responseMsg = { text: "I need the input token ID, output token ID, and amount to perform the swap", }; @@ -290,7 +291,7 @@ export const executeSwap: Action = { } } - console.log("Swap completed successfully!"); + elizaLogger.log("Swap completed successfully!"); const txHashes = results.map((r) => r.transaction.hash).join(", "); const responseMsg = { @@ -300,7 +301,7 @@ export const executeSwap: Action = { callback?.(responseMsg); return true; } catch (error) { - console.error("Error during token swap:", error); + elizaLogger.error("Error during token swap:", error); const responseMsg = { text: `Error during swap: ${error instanceof Error ? error.message : String(error)}`, }; From 1ff97b40e63c7527540d83915f1fb5cb1e684f42 Mon Sep 17 00:00:00 2001 From: sinecose Date: Fri, 3 Jan 2025 16:38:45 +0800 Subject: [PATCH 23/37] feat(near/transfer): replace console.log to elizaLogger --- packages/plugin-near/src/actions/transfer.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/plugin-near/src/actions/transfer.ts b/packages/plugin-near/src/actions/transfer.ts index f0a2d53b77..ab37f5030e 100644 --- a/packages/plugin-near/src/actions/transfer.ts +++ b/packages/plugin-near/src/actions/transfer.ts @@ -6,6 +6,7 @@ import { Memory, ModelClass, State, + elizaLogger, type Action, composeContext, generateObject, @@ -132,7 +133,7 @@ export const executeTransfer: Action = { // Validate transfer content if (!isTransferContent(runtime, content)) { - console.error("Invalid content for TRANSFER_NEAR action."); + elizaLogger.error("Invalid content for TRANSFER_NEAR action."); if (callback) { callback({ text: "Unable to process transfer request. Invalid content provided.", @@ -163,7 +164,7 @@ export const executeTransfer: Action = { return true; } catch (error) { - console.error("Error during NEAR transfer:", error); + elizaLogger.error("Error during NEAR transfer:", error); if (callback) { callback({ text: `Error transferring NEAR: ${error}`, From 953bc3d35534e37f7ee823312e2ba67174d9bae0 Mon Sep 17 00:00:00 2001 From: sinecose Date: Fri, 3 Jan 2025 16:38:59 +0800 Subject: [PATCH 24/37] feat(near/wallet): replace console.log to elizaLogger --- packages/plugin-near/src/providers/wallet.ts | 22 +++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/packages/plugin-near/src/providers/wallet.ts b/packages/plugin-near/src/providers/wallet.ts index 218398d397..a35a082148 100644 --- a/packages/plugin-near/src/providers/wallet.ts +++ b/packages/plugin-near/src/providers/wallet.ts @@ -1,4 +1,10 @@ -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import { + IAgentRuntime, + Memory, + Provider, + State, + elizaLogger, +} from "@elizaos/core"; import { KeyPair, keyStores, connect, Account, utils } from "near-api-js"; import BigNumber from "bignumber.js"; import { KeyPairString } from "near-api-js/lib/utils"; @@ -51,7 +57,7 @@ export class WalletProvider implements Provider { try { return await this.getFormattedPortfolio(runtime); } catch (error) { - console.error("Error in wallet provider:", error); + elizaLogger.error("Error in wallet provider:", error); return null; } } @@ -102,7 +108,7 @@ export class WalletProvider implements Provider { } return await response.json(); } catch (error) { - console.error(`Attempt ${i + 1} failed:`, error); + elizaLogger.error(`Attempt ${i + 1} failed:`, error); lastError = error as Error; if (i < PROVIDER_CONFIG.MAX_RETRIES - 1) { await new Promise((resolve) => @@ -125,7 +131,7 @@ export class WalletProvider implements Provider { const cachedValue = this.cache.get(cacheKey); if (cachedValue) { - console.log("Cache hit for fetchPortfolioValue"); + elizaLogger.log("Cache hit for fetchPortfolioValue"); return cachedValue; } @@ -160,7 +166,7 @@ export class WalletProvider implements Provider { this.cache.set(cacheKey, portfolio); return portfolio; } catch (error) { - console.error("Error fetching portfolio:", error); + elizaLogger.error("Error fetching portfolio:", error); throw error; } } @@ -181,7 +187,7 @@ export class WalletProvider implements Provider { this.cache.set(cacheKey, price); return price; } catch (error) { - console.error("Error fetching NEAR price:", error); + elizaLogger.error("Error fetching NEAR price:", error); return 0; } } @@ -214,7 +220,7 @@ export class WalletProvider implements Provider { const portfolio = await this.fetchPortfolioValue(runtime); return this.formatPortfolio(runtime, portfolio); } catch (error) { - console.error("Error generating portfolio report:", error); + elizaLogger.error("Error generating portfolio report:", error); return "Unable to fetch wallet information. Please try again later."; } } @@ -234,7 +240,7 @@ const walletProvider: Provider = { const provider = new WalletProvider(accountId); return await provider.getFormattedPortfolio(runtime); } catch (error) { - console.error("Error in wallet provider:", error); + elizaLogger.error("Error in wallet provider:", error); return null; } }, From 70d90abe5f210f8a8c0da682a51510ebe54a3444 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 07:12:58 -0500 Subject: [PATCH 25/37] use 4o as default model --- packages/plugin-node/src/services/tokenizer.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/plugin-node/src/services/tokenizer.ts b/packages/plugin-node/src/services/tokenizer.ts index 2b59040dec..b7df57fa4f 100644 --- a/packages/plugin-node/src/services/tokenizer.ts +++ b/packages/plugin-node/src/services/tokenizer.ts @@ -32,8 +32,8 @@ export class TokenizationService const tokenizerType = this.runtime.getSetting("TOKENIZER_TYPE"); if (!tokenizerModel || !tokenizerType) { - // Default to TikToken truncation using the "gpt-4o-mini" model if tokenizer settings are not defined - return this.truncateTiktoken("gpt-4o-mini", context, maxTokens); + // Default to TikToken truncation using the "gpt-4o" model if tokenizer settings are not defined + return this.truncateTiktoken("gpt-4o", context, maxTokens); } // Choose the truncation method based on tokenizer type @@ -49,7 +49,7 @@ export class TokenizationService ); } - console.error(`Unsupported tokenizer type: ${tokenizerType}`); + elizaLogger.error(`Unsupported tokenizer type: ${tokenizerType}`); } async truncateAuto(modelPath: string, context: string, maxTokens: number) { From be5319a72502b7b5fb90b78c3da0383fa19d3076 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 07:16:15 -0500 Subject: [PATCH 26/37] use elizaLogger --- packages/plugin-node/src/services/tokenizer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-node/src/services/tokenizer.ts b/packages/plugin-node/src/services/tokenizer.ts index b7df57fa4f..f3a62de80d 100644 --- a/packages/plugin-node/src/services/tokenizer.ts +++ b/packages/plugin-node/src/services/tokenizer.ts @@ -68,7 +68,7 @@ export class TokenizationService // Decode back to text - js-tiktoken decode() returns a string directly return tokenizer.decode(truncatedTokens); } catch (error) { - console.error("Error in trimTokens:", error); + elizaLogger.error("Error in trimTokens:", error); // Return truncated string if tokenization fails return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token } @@ -96,7 +96,7 @@ export class TokenizationService // Decode back to text - js-tiktoken decode() returns a string directly return encoding.decode(truncatedTokens); } catch (error) { - console.error("Error in trimTokens:", error); + elizaLogger.error("Error in trimTokens:", error); // Return truncated string if tokenization fails return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token } From e2dbeb3fce5e5c3e373a5742e9865ba64bebed5e Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 08:45:08 -0500 Subject: [PATCH 27/37] move trimTokens to core --- .../src/actions/chat_with_attachments.ts | 9 +- .../src/actions/summarize_conversation.ts | 9 +- packages/client-discord/src/attachments.ts | 7 +- packages/client-discord/src/utils.ts | 8 +- .../src/actions/chat_with_attachments.ts | 9 +- .../src/actions/summarize_conversation.ts | 9 +- packages/client-slack/src/attachments.ts | 7 +- packages/core/src/generation.ts | 112 ++++++++++++++---- packages/core/src/types.ts | 4 - packages/core/tsup.config.ts | 2 + packages/plugin-node/src/index.ts | 2 - packages/plugin-node/src/services/browser.ts | 13 +- packages/plugin-node/src/services/index.ts | 2 - 13 files changed, 112 insertions(+), 81 deletions(-) diff --git a/packages/client-discord/src/actions/chat_with_attachments.ts b/packages/client-discord/src/actions/chat_with_attachments.ts index f11d296fb0..303021bd29 100644 --- a/packages/client-discord/src/actions/chat_with_attachments.ts +++ b/packages/client-discord/src/actions/chat_with_attachments.ts @@ -12,8 +12,7 @@ import { Memory, ModelClass, State, - ServiceType, - ITokenizationService, + trimTokens, } from "@elizaos/core"; import * as fs from "fs"; @@ -193,10 +192,8 @@ const summarizeAction = { state.attachmentsWithText = attachmentsWithText; state.objective = objective; - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); - const template = await tokenizationService.trimTokens( + const template = await trimTokens( + runtime, summarizationTemplate, chunkSize + 500 ); diff --git a/packages/client-discord/src/actions/summarize_conversation.ts b/packages/client-discord/src/actions/summarize_conversation.ts index f0b211e255..112f0e600b 100644 --- a/packages/client-discord/src/actions/summarize_conversation.ts +++ b/packages/client-discord/src/actions/summarize_conversation.ts @@ -13,8 +13,7 @@ import { Memory, ModelClass, State, - ServiceType, - ITokenizationService, + trimTokens, } from "@elizaos/core"; export const summarizationTemplate = `# Summarized so far (we are adding to this) {{currentSummary}} @@ -258,15 +257,13 @@ const summarizeAction = { state.memoriesWithAttachments = formattedMemories; state.objective = objective; - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); for (let i = 0; i < chunks.length; i++) { const chunk = chunks[i]; state.currentSummary = currentSummary; state.currentChunk = chunk; - const template = await tokenizationService.trimTokens( + const template = await trimTokens( + runtime, summarizationTemplate, chunkSize + 500 ); diff --git a/packages/client-discord/src/attachments.ts b/packages/client-discord/src/attachments.ts index f2ea49b615..dd9b5afaf7 100644 --- a/packages/client-discord/src/attachments.ts +++ b/packages/client-discord/src/attachments.ts @@ -9,7 +9,7 @@ import { Media, ModelClass, ServiceType, - ITokenizationService, + trimTokens, } from "@elizaos/core"; import { Attachment, Collection } from "discord.js"; import ffmpeg from "fluent-ffmpeg"; @@ -19,11 +19,8 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); // make sure text is under 128k characters - text = await tokenizationService.trimTokens(text, 100000); + text = await trimTokens(runtime, text, 100000); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/client-discord/src/utils.ts b/packages/client-discord/src/utils.ts index 77d55f9da8..99fdac98cf 100644 --- a/packages/client-discord/src/utils.ts +++ b/packages/client-discord/src/utils.ts @@ -4,8 +4,7 @@ import { elizaLogger, generateText, parseJSONObjectFromText, - ServiceType, - ITokenizationService, + trimTokens, } from "@elizaos/core"; import { ChannelType, @@ -48,10 +47,7 @@ export async function generateSummary( text: string ): Promise<{ title: string; description: string }> { // make sure text is under 128k characters - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); - text = await tokenizationService.trimTokens(text, 100000); + text = await trimTokens(runtime, text, 100000); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/client-slack/src/actions/chat_with_attachments.ts b/packages/client-slack/src/actions/chat_with_attachments.ts index d5592eeba5..89ebf556e3 100644 --- a/packages/client-slack/src/actions/chat_with_attachments.ts +++ b/packages/client-slack/src/actions/chat_with_attachments.ts @@ -14,8 +14,7 @@ import { Memory, ModelClass, State, - ServiceType, - ITokenizationService, + trimTokens, } from "@elizaos/core"; export const summarizationTemplate = `# Summarized so far (we are adding to this) @@ -201,10 +200,8 @@ const summarizeAction: Action = { currentState.attachmentsWithText = attachmentsWithText; currentState.objective = objective; - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); - const template = await tokenizationService.trimTokens( + const template = await trimTokens( + runtime, summarizationTemplate, chunkSize + 500 ); diff --git a/packages/client-slack/src/actions/summarize_conversation.ts b/packages/client-slack/src/actions/summarize_conversation.ts index 9a84695b4e..498a8124a7 100644 --- a/packages/client-slack/src/actions/summarize_conversation.ts +++ b/packages/client-slack/src/actions/summarize_conversation.ts @@ -17,8 +17,7 @@ import { ModelClass, State, elizaLogger, - ServiceType, - ITokenizationService, + trimTokens, } from "@elizaos/core"; import { ISlackService, SLACK_SERVICE_TYPE } from "../types/slack-types"; @@ -273,9 +272,6 @@ const summarizeAction: Action = { currentState.memoriesWithAttachments = formattedMemories; currentState.objective = objective; - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); // Only process one chunk at a time and stop after getting a valid summary for (let i = 0; i < chunks.length; i++) { @@ -283,7 +279,8 @@ const summarizeAction: Action = { currentState.currentSummary = currentSummary; currentState.currentChunk = chunk; - const template = await tokenizationService.trimTokens( + const template = await trimTokens( + runtime, summarizationTemplate, chunkSize + 500 ); diff --git a/packages/client-slack/src/attachments.ts b/packages/client-slack/src/attachments.ts index 7d9d08d8c7..7540edbba6 100644 --- a/packages/client-slack/src/attachments.ts +++ b/packages/client-slack/src/attachments.ts @@ -8,7 +8,7 @@ import { Media, ModelClass, ServiceType, - ITokenizationService, + trimTokens, } from "@elizaos/core"; import { WebClient } from "@slack/web-api"; import ffmpeg from "fluent-ffmpeg"; @@ -18,10 +18,7 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); - text = await tokenizationService.trimTokens(text, 100000); + text = await trimTokens(runtime, text, 100000); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index f6f854b2ce..73b28b213a 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -35,15 +35,101 @@ import { ServiceType, SearchResponse, ActionResponse, - ITokenizationService, TelemetrySettings, + TokenizerType, } from "./types.ts"; import { fal } from "@fal-ai/client"; import { tavily } from "@tavily/core"; +import { AutoTokenizer } from "@huggingface/transformers"; + +import { encodingForModel, TiktokenModel } from "js-tiktoken"; type Tool = CoreTool; type StepResult = AIStepResult; +export async function trimTokens( + runtime: IAgentRuntime, + context: string, + maxTokens: number +) { + const tokenizerModel = runtime.getSetting("TOKENIZER_MODEL"); + const tokenizerType = runtime.getSetting("TOKENIZER_TYPE"); + + if (!tokenizerModel || !tokenizerType) { + // Default to TikToken truncation using the "gpt-4o" model if tokenizer settings are not defined + return truncateTiktoken("gpt-4o", context, maxTokens); + } + + // Choose the truncation method based on tokenizer type + if (tokenizerType === TokenizerType.Auto) { + return truncateAuto(tokenizerModel, context, maxTokens); + } + + if (tokenizerType === TokenizerType.TikToken) { + return truncateTiktoken( + tokenizerModel as TiktokenModel, + context, + maxTokens + ); + } + + elizaLogger.error(`Unsupported tokenizer type: ${tokenizerType}`); +} + +async function truncateAuto( + modelPath: string, + context: string, + maxTokens: number +) { + try { + const tokenizer = await AutoTokenizer.from_pretrained(modelPath); + const tokens = tokenizer.encode(context); + + // If already within limits, return unchanged + if (tokens.length <= maxTokens) { + return context; + } + + // Keep the most recent tokens by slicing from the end + const truncatedTokens = tokens.slice(-maxTokens); + + // Decode back to text - js-tiktoken decode() returns a string directly + return tokenizer.decode(truncatedTokens); + } catch (error) { + elizaLogger.error("Error in trimTokens:", error); + // Return truncated string if tokenization fails + return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token + } +} + +async function truncateTiktoken( + model: TiktokenModel, + context: string, + maxTokens: number +) { + const encoding = encodingForModel(model); + + try { + // Encode the text into tokens + const tokens = encoding.encode(context); + + // If already within limits, return unchanged + if (tokens.length <= maxTokens) { + return context; + } + + // Keep the most recent tokens by slicing from the end + const truncatedTokens = tokens.slice(-maxTokens); + + // Decode back to text - js-tiktoken decode() returns a string directly + return encoding.decode(truncatedTokens); + } catch (error) { + elizaLogger.error("Error in trimTokens:", error); + // Return truncated string if tokenization fails + return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token + } +} + /** * Send a message to the model for a text generateText - receive a string back and parse how you'd like * @param opts - The options for the generateText request. @@ -188,14 +274,7 @@ export async function generateText({ `Trimming context to max length of ${max_context_length} tokens.` ); - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); - - context = await tokenizationService.trimTokens( - context, - max_context_length - ); + context = await trimTokens(runtime, context, max_context_length); let response: string; @@ -945,11 +1024,7 @@ export async function generateMessageResponse({ const provider = runtime.modelProvider; const max_context_length = models[provider].settings.maxInputTokens; - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); - - context = await tokenizationService.trimTokens(context, max_context_length); + context = await trimTokens(runtime, context, max_context_length); let retryLength = 1000; // exponential backoff while (true) { try { @@ -1428,14 +1503,7 @@ export const generateObject = async ({ const apiKey = runtime.token; try { - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); - - context = await tokenizationService.trimTokens( - context, - max_context_length - ); + context = await trimTokens(runtime, context, max_context_length); const modelOptions: ModelSettings = { prompt: context, diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 04d187dbb1..f66a81bb77 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -1260,10 +1260,6 @@ export interface IAwsS3Service extends Service { generateSignedUrl(fileName: string, expiresIn: number): Promise; } -export interface ITokenizationService extends Service { - trimTokens(context: string, maxTokens: number): Promise; -} - export type SearchImage = { url: string; description?: string; diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts index cca094e999..234178fcd5 100644 --- a/packages/core/tsup.config.ts +++ b/packages/core/tsup.config.ts @@ -19,5 +19,7 @@ export default defineConfig({ "https", // Add other modules you want to externalize "@tavily/core", + "onnxruntime-node", + "sharp", ], }); diff --git a/packages/plugin-node/src/index.ts b/packages/plugin-node/src/index.ts index 3f605c1b3b..17ef56e4d5 100644 --- a/packages/plugin-node/src/index.ts +++ b/packages/plugin-node/src/index.ts @@ -11,7 +11,6 @@ import { TranscriptionService, VideoService, AwsS3Service, - TokenizationService, } from "./services/index.ts"; import { describeImage } from "./actions/describe-image.ts"; @@ -30,7 +29,6 @@ export function createNodePlugin() { new TranscriptionService(), new VideoService(), new AwsS3Service(), - new TokenizationService(), ], actions: [describeImage], } as const satisfies Plugin; diff --git a/packages/plugin-node/src/services/browser.ts b/packages/plugin-node/src/services/browser.ts index 22a2050a95..7abfe816d5 100644 --- a/packages/plugin-node/src/services/browser.ts +++ b/packages/plugin-node/src/services/browser.ts @@ -1,9 +1,4 @@ -import { - generateText, - IBrowserService, - ITokenizationService, - models, -} from "@elizaos/core"; +import { generateText, IBrowserService, trimTokens } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { Service } from "@elizaos/core"; import { settings } from "@elizaos/core"; @@ -17,12 +12,8 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { - const tokenizationService = runtime.getService( - ServiceType.TOKENIZATION - ); - const model = models[runtime.character.modelProvider]; // make sure text is under 128k characters - text = await tokenizationService.trimTokens(text, 100000); + text = await trimTokens(runtime, text, 100000); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/plugin-node/src/services/index.ts b/packages/plugin-node/src/services/index.ts index 09ba4dda88..6e4be71cdf 100644 --- a/packages/plugin-node/src/services/index.ts +++ b/packages/plugin-node/src/services/index.ts @@ -6,7 +6,6 @@ import { SpeechService } from "./speech.ts"; import { TranscriptionService } from "./transcription.ts"; import { VideoService } from "./video.ts"; import { AwsS3Service } from "./awsS3.ts"; -import { TokenizationService } from "./tokenizer.ts"; export { BrowserService, @@ -17,5 +16,4 @@ export { TranscriptionService, VideoService, AwsS3Service, - TokenizationService, }; From 5555f85c59e898d0efad5b79ba89073932152e12 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 08:55:11 -0500 Subject: [PATCH 28/37] clean code --- .../src/actions/chat_with_attachments.ts | 7 +++---- .../src/actions/summarize_conversation.ts | 7 +++---- packages/client-discord/src/attachments.ts | 5 ++--- packages/client-discord/src/utils.ts | 4 ++-- .../src/actions/chat_with_attachments.ts | 6 +++--- .../src/actions/summarize_conversation.ts | 6 +++--- packages/client-slack/src/attachments.ts | 9 ++++++--- packages/core/src/generation.ts | 15 +++++++-------- packages/plugin-node/src/services/browser.ts | 2 +- 9 files changed, 30 insertions(+), 31 deletions(-) diff --git a/packages/client-discord/src/actions/chat_with_attachments.ts b/packages/client-discord/src/actions/chat_with_attachments.ts index 303021bd29..832acd58ae 100644 --- a/packages/client-discord/src/actions/chat_with_attachments.ts +++ b/packages/client-discord/src/actions/chat_with_attachments.ts @@ -1,5 +1,5 @@ import { composeContext } from "@elizaos/core"; -import { generateText } from "@elizaos/core"; +import { generateText, trimTokens } from "@elizaos/core"; import type { TiktokenModel } from "js-tiktoken"; import { models } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; @@ -12,7 +12,6 @@ import { Memory, ModelClass, State, - trimTokens, } from "@elizaos/core"; import * as fs from "fs"; @@ -193,9 +192,9 @@ const summarizeAction = { state.attachmentsWithText = attachmentsWithText; state.objective = objective; const template = await trimTokens( - runtime, summarizationTemplate, - chunkSize + 500 + chunkSize + 500, + runtime ); const context = composeContext({ state, diff --git a/packages/client-discord/src/actions/summarize_conversation.ts b/packages/client-discord/src/actions/summarize_conversation.ts index 112f0e600b..d9c9be6f42 100644 --- a/packages/client-discord/src/actions/summarize_conversation.ts +++ b/packages/client-discord/src/actions/summarize_conversation.ts @@ -1,5 +1,5 @@ import { composeContext } from "@elizaos/core"; -import { generateText, splitChunks } from "@elizaos/core"; +import { generateText, splitChunks, trimTokens } from "@elizaos/core"; import { getActorDetails } from "@elizaos/core"; import { models } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; @@ -13,7 +13,6 @@ import { Memory, ModelClass, State, - trimTokens, } from "@elizaos/core"; export const summarizationTemplate = `# Summarized so far (we are adding to this) {{currentSummary}} @@ -263,9 +262,9 @@ const summarizeAction = { state.currentSummary = currentSummary; state.currentChunk = chunk; const template = await trimTokens( - runtime, summarizationTemplate, - chunkSize + 500 + chunkSize + 500, + runtime ); const context = composeContext({ state, diff --git a/packages/client-discord/src/attachments.ts b/packages/client-discord/src/attachments.ts index dd9b5afaf7..4c8ba7903e 100644 --- a/packages/client-discord/src/attachments.ts +++ b/packages/client-discord/src/attachments.ts @@ -1,4 +1,4 @@ -import { generateText } from "@elizaos/core"; +import { generateText, trimTokens } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { IAgentRuntime, @@ -9,7 +9,6 @@ import { Media, ModelClass, ServiceType, - trimTokens, } from "@elizaos/core"; import { Attachment, Collection } from "discord.js"; import ffmpeg from "fluent-ffmpeg"; @@ -20,7 +19,7 @@ async function generateSummary( text: string ): Promise<{ title: string; description: string }> { // make sure text is under 128k characters - text = await trimTokens(runtime, text, 100000); + text = await trimTokens(text, 100000, runtime); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/client-discord/src/utils.ts b/packages/client-discord/src/utils.ts index 99fdac98cf..40f08a392a 100644 --- a/packages/client-discord/src/utils.ts +++ b/packages/client-discord/src/utils.ts @@ -3,8 +3,8 @@ import { ModelClass, elizaLogger, generateText, - parseJSONObjectFromText, trimTokens, + parseJSONObjectFromText, } from "@elizaos/core"; import { ChannelType, @@ -47,7 +47,7 @@ export async function generateSummary( text: string ): Promise<{ title: string; description: string }> { // make sure text is under 128k characters - text = await trimTokens(runtime, text, 100000); + text = await trimTokens(text, 100000, runtime); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/client-slack/src/actions/chat_with_attachments.ts b/packages/client-slack/src/actions/chat_with_attachments.ts index 89ebf556e3..169add1222 100644 --- a/packages/client-slack/src/actions/chat_with_attachments.ts +++ b/packages/client-slack/src/actions/chat_with_attachments.ts @@ -1,6 +1,7 @@ import { composeContext, generateText, + trimTokens, parseJSONObjectFromText, } from "@elizaos/core"; import { models } from "@elizaos/core"; @@ -14,7 +15,6 @@ import { Memory, ModelClass, State, - trimTokens, } from "@elizaos/core"; export const summarizationTemplate = `# Summarized so far (we are adding to this) @@ -201,9 +201,9 @@ const summarizeAction: Action = { currentState.objective = objective; const template = await trimTokens( - runtime, summarizationTemplate, - chunkSize + 500 + chunkSize + 500, + runtime ); const context = composeContext({ state: currentState, diff --git a/packages/client-slack/src/actions/summarize_conversation.ts b/packages/client-slack/src/actions/summarize_conversation.ts index 498a8124a7..ec98e1f10d 100644 --- a/packages/client-slack/src/actions/summarize_conversation.ts +++ b/packages/client-slack/src/actions/summarize_conversation.ts @@ -2,6 +2,7 @@ import { composeContext, generateText, splitChunks, + trimTokens, parseJSONObjectFromText, } from "@elizaos/core"; import { models } from "@elizaos/core"; @@ -17,7 +18,6 @@ import { ModelClass, State, elizaLogger, - trimTokens, } from "@elizaos/core"; import { ISlackService, SLACK_SERVICE_TYPE } from "../types/slack-types"; @@ -280,9 +280,9 @@ const summarizeAction: Action = { currentState.currentChunk = chunk; const template = await trimTokens( - runtime, summarizationTemplate, - chunkSize + 500 + chunkSize + 500, + runtime ); const context = composeContext({ diff --git a/packages/client-slack/src/attachments.ts b/packages/client-slack/src/attachments.ts index 7540edbba6..225ece61d4 100644 --- a/packages/client-slack/src/attachments.ts +++ b/packages/client-slack/src/attachments.ts @@ -1,4 +1,8 @@ -import { generateText, parseJSONObjectFromText } from "@elizaos/core"; +import { + generateText, + trimTokens, + parseJSONObjectFromText, +} from "@elizaos/core"; import { IAgentRuntime, IImageDescriptionService, @@ -8,7 +12,6 @@ import { Media, ModelClass, ServiceType, - trimTokens, } from "@elizaos/core"; import { WebClient } from "@slack/web-api"; import ffmpeg from "fluent-ffmpeg"; @@ -18,7 +21,7 @@ async function generateSummary( runtime: IAgentRuntime, text: string ): Promise<{ title: string; description: string }> { - text = await trimTokens(runtime, text, 100000); + text = await trimTokens(text, 100000, runtime); const prompt = `Please generate a concise summary for the following text: diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 73b28b213a..15abab548b 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -13,6 +13,8 @@ import { import { Buffer } from "buffer"; import { createOllama } from "ollama-ai-provider"; import OpenAI from "openai"; +import { encodingForModel, TiktokenModel } from "js-tiktoken"; +import { AutoTokenizer } from "@huggingface/transformers"; import Together from "together-ai"; import { ZodSchema } from "zod"; import { elizaLogger } from "./index.ts"; @@ -40,17 +42,14 @@ import { } from "./types.ts"; import { fal } from "@fal-ai/client"; import { tavily } from "@tavily/core"; -import { AutoTokenizer } from "@huggingface/transformers"; - -import { encodingForModel, TiktokenModel } from "js-tiktoken"; type Tool = CoreTool; type StepResult = AIStepResult; export async function trimTokens( - runtime: IAgentRuntime, context: string, - maxTokens: number + maxTokens: number, + runtime: IAgentRuntime ) { const tokenizerModel = runtime.getSetting("TOKENIZER_MODEL"); const tokenizerType = runtime.getSetting("TOKENIZER_TYPE"); @@ -274,7 +273,7 @@ export async function generateText({ `Trimming context to max length of ${max_context_length} tokens.` ); - context = await trimTokens(runtime, context, max_context_length); + context = await trimTokens(context, max_context_length, runtime); let response: string; @@ -1024,7 +1023,7 @@ export async function generateMessageResponse({ const provider = runtime.modelProvider; const max_context_length = models[provider].settings.maxInputTokens; - context = await trimTokens(runtime, context, max_context_length); + context = await trimTokens(context, max_context_length, runtime); let retryLength = 1000; // exponential backoff while (true) { try { @@ -1503,7 +1502,7 @@ export const generateObject = async ({ const apiKey = runtime.token; try { - context = await trimTokens(runtime, context, max_context_length); + context = await trimTokens(context, max_context_length, runtime); const modelOptions: ModelSettings = { prompt: context, diff --git a/packages/plugin-node/src/services/browser.ts b/packages/plugin-node/src/services/browser.ts index 7abfe816d5..863b3de4ac 100644 --- a/packages/plugin-node/src/services/browser.ts +++ b/packages/plugin-node/src/services/browser.ts @@ -13,7 +13,7 @@ async function generateSummary( text: string ): Promise<{ title: string; description: string }> { // make sure text is under 128k characters - text = await trimTokens(runtime, text, 100000); + text = await trimTokens(text, 100000, runtime); const prompt = `Please generate a concise summary for the following text: From 3bd36224002fc688921939d9e91756ea321c52fb Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 08:59:36 -0500 Subject: [PATCH 29/37] restore test --- packages/core/src/tests/generation.test.ts | 60 +++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/packages/core/src/tests/generation.test.ts b/packages/core/src/tests/generation.test.ts index 6eba5017d5..f1ec8f9bc6 100644 --- a/packages/core/src/tests/generation.test.ts +++ b/packages/core/src/tests/generation.test.ts @@ -1,7 +1,12 @@ import { describe, expect, it, vi, beforeEach } from "vitest"; import { ModelProviderName, IAgentRuntime } from "../types"; import { models } from "../models"; -import { generateText, generateTrueOrFalse, splitChunks } from "../generation"; +import { + generateText, + generateTrueOrFalse, + splitChunks, + trimTokens, +} from "../generation"; import type { TiktokenModel } from "js-tiktoken"; // Mock the elizaLogger @@ -123,4 +128,57 @@ describe("Generation", () => { expect(chunks).toEqual([content]); }); }); + + describe("trimTokens", () => { + const model = "gpt-4" as TiktokenModel; + + it("should return empty string for empty input", () => { + const result = trimTokens("", 100, model); + expect(result).toBe(""); + }); + + it("should throw error for negative maxTokens", () => { + expect(() => trimTokens("test", -1, model)).toThrow( + "maxTokens must be positive" + ); + }); + + it("should return unchanged text if within token limit", () => { + const shortText = "This is a short text"; + const result = trimTokens(shortText, 10, model); + expect(result).toBe(shortText); + }); + + it("should truncate text to specified token limit", () => { + // Using a longer text that we know will exceed the token limit + const longText = + "This is a much longer text that will definitely exceed our very small token limit and need to be truncated to fit within the specified constraints."; + const result = trimTokens(longText, 5, model); + + // The exact result will depend on the tokenizer, but we can verify: + // 1. Result is shorter than original + expect(result.length).toBeLessThan(longText.length); + // 2. Result is not empty + expect(result.length).toBeGreaterThan(0); + // 3. Result is a proper substring of the original text + expect(longText.includes(result)).toBe(true); + }); + + it("should handle non-ASCII characters", () => { + const unicodeText = "Hello 👋 World 🌍"; + const result = trimTokens(unicodeText, 5, model); + expect(result.length).toBeGreaterThan(0); + }); + + it("should handle multiline text", () => { + const multilineText = `Line 1 + Line 2 + Line 3 + Line 4 + Line 5`; + const result = trimTokens(multilineText, 5, model); + expect(result.length).toBeGreaterThan(0); + expect(result.length).toBeLessThan(multilineText.length); + }); + }); }); From 7c45e2aeafb66b5390ae65f2f0e76abded4dfbb3 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 09:01:45 -0500 Subject: [PATCH 30/37] clean code --- packages/core/src/types.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index f66a81bb77..3687ded5e0 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -1294,7 +1294,6 @@ export enum ServiceType { AWS_S3 = "aws_s3", BUTTPLUG = "buttplug", SLACK = "slack", - TOKENIZATION = "tokenization", } export enum LoggingLevel { From 2365b54a56200dfe788c914c1ad3ef9ac58b4531 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 09:05:58 -0500 Subject: [PATCH 31/37] remove tokenizer service --- .../plugin-node/src/services/tokenizer.ts | 106 ------------------ 1 file changed, 106 deletions(-) delete mode 100644 packages/plugin-node/src/services/tokenizer.ts diff --git a/packages/plugin-node/src/services/tokenizer.ts b/packages/plugin-node/src/services/tokenizer.ts deleted file mode 100644 index f3a62de80d..0000000000 --- a/packages/plugin-node/src/services/tokenizer.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { elizaLogger } from "@elizaos/core"; -import { Service } from "@elizaos/core"; -import { - IAgentRuntime, - ServiceType, - ITokenizationService, - TokenizerType, -} from "@elizaos/core"; -import { AutoTokenizer } from "@huggingface/transformers"; - -import { encodingForModel, TiktokenModel } from "js-tiktoken"; - -export class TokenizationService - extends Service - implements ITokenizationService -{ - static serviceType: ServiceType = ServiceType.TOKENIZATION; - - private runtime: IAgentRuntime | null = null; - - getInstance(): ITokenizationService { - return TokenizationService.getInstance(); - } - - async initialize(runtime: IAgentRuntime): Promise { - elizaLogger.log("Initializing TokenizationService"); - this.runtime = runtime; - } - - async trimTokens(context: string, maxTokens: number) { - const tokenizerModel = this.runtime.getSetting("TOKENIZER_MODEL"); - const tokenizerType = this.runtime.getSetting("TOKENIZER_TYPE"); - - if (!tokenizerModel || !tokenizerType) { - // Default to TikToken truncation using the "gpt-4o" model if tokenizer settings are not defined - return this.truncateTiktoken("gpt-4o", context, maxTokens); - } - - // Choose the truncation method based on tokenizer type - if (tokenizerType === TokenizerType.Auto) { - return this.truncateAuto(tokenizerModel, context, maxTokens); - } - - if (tokenizerType === TokenizerType.TikToken) { - return this.truncateTiktoken( - tokenizerModel as TiktokenModel, - context, - maxTokens - ); - } - - elizaLogger.error(`Unsupported tokenizer type: ${tokenizerType}`); - } - - async truncateAuto(modelPath: string, context: string, maxTokens: number) { - try { - const tokenizer = await AutoTokenizer.from_pretrained(modelPath); - const tokens = tokenizer.encode(context); - - // If already within limits, return unchanged - if (tokens.length <= maxTokens) { - return context; - } - - // Keep the most recent tokens by slicing from the end - const truncatedTokens = tokens.slice(-maxTokens); - - // Decode back to text - js-tiktoken decode() returns a string directly - return tokenizer.decode(truncatedTokens); - } catch (error) { - elizaLogger.error("Error in trimTokens:", error); - // Return truncated string if tokenization fails - return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token - } - } - - async truncateTiktoken( - model: TiktokenModel, - context: string, - maxTokens: number - ) { - const encoding = encodingForModel(model); - - try { - // Encode the text into tokens - const tokens = encoding.encode(context); - - // If already within limits, return unchanged - if (tokens.length <= maxTokens) { - return context; - } - - // Keep the most recent tokens by slicing from the end - const truncatedTokens = tokens.slice(-maxTokens); - - // Decode back to text - js-tiktoken decode() returns a string directly - return encoding.decode(truncatedTokens); - } catch (error) { - elizaLogger.error("Error in trimTokens:", error); - // Return truncated string if tokenization fails - return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token - } - } -} - -export default TokenizationService; From fbb97e2a4954d80628d25be079a19e10a5797ca5 Mon Sep 17 00:00:00 2001 From: "gmh5225.eth" <13917777+gmh5225@users.noreply.github.com> Date: Fri, 3 Jan 2025 22:19:00 +0800 Subject: [PATCH 32/37] fix(client): improve Windows compatibility for Vite dev server - Add host configuration to allow IP access - Use explicit IP address instead of localhost - Support dynamic server port from environment variables --- client/vite.config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/vite.config.ts b/client/vite.config.ts index 32d1e1b9fd..1cf014840e 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -27,9 +27,10 @@ export default defineConfig({ }, }, server: { + host: true, proxy: { "/api": { - target: `http://localhost:${process.env.SERVER_PORT || 3000}`, + target: `http://127.0.0.1:${process.env.SERVER_PORT || 3000}`, changeOrigin: true, rewrite: (path) => path.replace(/^\/api/, ""), }, From 930f91e77105dd47231c163d4e65eb13953e828b Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 09:20:17 -0500 Subject: [PATCH 33/37] fall back if unsupported type --- packages/core/src/generation.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 15abab548b..a423d6eebf 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -72,7 +72,8 @@ export async function trimTokens( ); } - elizaLogger.error(`Unsupported tokenizer type: ${tokenizerType}`); + elizaLogger.warn(`Unsupported tokenizer type: ${tokenizerType}`); + return truncateTiktoken("gpt-4o", context, maxTokens); } async function truncateAuto( From 94caa7e08cfd27cf164e7e5af7135d2bcadd52a7 Mon Sep 17 00:00:00 2001 From: Ting Chien Meng Date: Fri, 3 Jan 2025 09:27:34 -0500 Subject: [PATCH 34/37] Move encoding into try block to handle potential errors during model encoding. --- packages/core/src/generation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index a423d6eebf..8a79705a9b 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -107,9 +107,9 @@ async function truncateTiktoken( context: string, maxTokens: number ) { - const encoding = encodingForModel(model); - try { + const encoding = encodingForModel(model); + // Encode the text into tokens const tokens = encoding.encode(context); From 226cd652aba7bba757aab368caf0d7a8e9d8334f Mon Sep 17 00:00:00 2001 From: Shakker Nerd Date: Fri, 3 Jan 2025 14:58:51 +0000 Subject: [PATCH 35/37] feat: add JsDoc to trimTokens function --- packages/core/src/generation.ts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 8a79705a9b..5dac60d5c9 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -46,6 +46,27 @@ import { tavily } from "@tavily/core"; type Tool = CoreTool; type StepResult = AIStepResult; +/** + * Trims the provided text context to a specified token limit using a tokenizer model and type. + * + * The function dynamically determines the truncation method based on the tokenizer settings + * provided by the runtime. If no tokenizer settings are defined, it defaults to using the + * TikToken truncation method with the "gpt-4o" model. + * + * @async + * @function trimTokens + * @param {string} context - The text to be tokenized and trimmed. + * @param {number} maxTokens - The maximum number of tokens allowed after truncation. + * @param {IAgentRuntime} runtime - The runtime interface providing tokenizer settings. + * + * @returns {Promise} A promise that resolves to the trimmed text. + * + * @throws {Error} Throws an error if the runtime settings are invalid or missing required fields. + * + * @example + * const trimmedText = await trimTokens("This is an example text", 50, runtime); + * console.log(trimmedText); // Output will be a truncated version of the input text. + */ export async function trimTokens( context: string, maxTokens: number, From 616ca1f87bbde34334bf3dac79bf590f89f44744 Mon Sep 17 00:00:00 2001 From: Shakker Nerd Date: Fri, 3 Jan 2025 15:08:58 +0000 Subject: [PATCH 36/37] feat: add validation to trimTokens --- packages/core/src/generation.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 5dac60d5c9..aab54d0170 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -72,6 +72,9 @@ export async function trimTokens( maxTokens: number, runtime: IAgentRuntime ) { + if (!context) return ""; + if (maxTokens <= 0) throw new Error("maxTokens must be positive"); + const tokenizerModel = runtime.getSetting("TOKENIZER_MODEL"); const tokenizerType = runtime.getSetting("TOKENIZER_TYPE"); From 7cb04dcbbc801ac878b488863ea18259b5f5ce5d Mon Sep 17 00:00:00 2001 From: Shakker Nerd Date: Fri, 3 Jan 2025 16:46:52 +0000 Subject: [PATCH 37/37] fix: handle env using runtime getSetting function --- packages/core/src/generation.ts | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 2ceeceebdf..5db5b8e70a 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -353,12 +353,22 @@ export async function generateText({ baseURL: endpoint, fetch: async (url: string, options: any) => { const fetching = await runtime.fetch(url, options); - if (process.env.ETERNAL_AI_LOG_REQUEST) { - elizaLogger.info("Request data: ", JSON.stringify(options, null, 2)); + if ( + parseBooleanFromText( + runtime.getSetting("ETERNAL_AI_LOG_REQUEST") + ) + ) { + elizaLogger.info( + "Request data: ", + JSON.stringify(options, null, 2) + ); const clonedResponse = fetching.clone(); - clonedResponse.json().then(data => { - elizaLogger.info("Response data: ", JSON.stringify(data, null, 2)); - }) + clonedResponse.json().then((data) => { + elizaLogger.info( + "Response data: ", + JSON.stringify(data, null, 2) + ); + }); } return fetching; },