From 8eed83c566f08038c9f8910eeccb3e8dcec76cd7 Mon Sep 17 00:00:00 2001 From: Sero <69639595+Seroxdesign@users.noreply.github.com> Date: Fri, 17 Jan 2025 06:32:11 -0500 Subject: [PATCH 1/7] remove eslint, and prettier. replace with biome-js --- .eslintrc.json | 36 --- .github/workflows/ci.yaml | 7 +- biome.json | 34 +++ client/eslint.config.js | 28 -- docs/.prettierrc.json | 1 - eslint.config.mjs | 71 ----- package.json | 16 +- packages/_examples/plugin/eslint.config.mjs | 3 - packages/adapter-pglite/eslint.config.mjs | 3 - packages/adapter-postgres/eslint.config.mjs | 3 - packages/adapter-redis/eslint.config.mjs | 3 - packages/adapter-sqlite/eslint.config.mjs | 3 - packages/adapter-sqljs/eslint.config.mjs | 3 - packages/adapter-supabase/eslint.config.mjs | 3 - packages/client-auto/eslint.config.mjs | 3 - packages/client-direct/eslint.config.mjs | 3 - packages/client-discord/eslint.config.mjs | 3 - packages/client-github/eslint.config.mjs | 3 - packages/client-instagram/eslint.config.mjs | 3 - packages/client-slack/eslint.config.mjs | 3 - packages/client-telegram/eslint.config.mjs | 3 - packages/client-twitter/eslint.config.mjs | 3 - packages/core/eslint.config.mjs | 17 -- packages/create-eliza-app/eslint.config.mjs | 3 - .../plugin-3d-generation/eslint.config.mjs | 3 - packages/plugin-akash/.eslintrc.js | 29 -- packages/plugin-akash/eslint.config.mjs | 3 - packages/plugin-allora/eslint.config.mjs | 3 - packages/plugin-anyone/eslint.config.mjs | 3 - packages/plugin-aptos/eslint.config.mjs | 3 - packages/plugin-arthera/eslint.config.mjs | 3 - packages/plugin-asterai/eslint.config.mjs | 3 - packages/plugin-autonome/eslint.config.mjs | 3 - packages/plugin-avail/eslint.config.mjs | 3 - packages/plugin-avalanche/eslint.config.mjs | 3 - packages/plugin-b2/eslint.config.mjs | 3 - packages/plugin-binance/eslint.config.mjs | 3 - packages/plugin-birdeye/eslint.config.mjs | 3 - packages/plugin-bootstrap/eslint.config.mjs | 3 - .../advanced-sdk-ts/.eslintrc.js | 21 -- .../advanced-sdk-ts/.prettierrc | 5 - packages/plugin-coinbase/eslint.config.mjs | 3 - packages/plugin-cosmos/eslint.config.mjs | 3 - packages/plugin-depin/eslint.config.mjs | 3 - packages/plugin-dexscreener/eslint.config.mjs | 3 - packages/plugin-evm/eslint.config.mjs | 3 - packages/plugin-flow/eslint.config.mjs | 3 - packages/plugin-fuel/eslint.config.mjs | 3 - packages/plugin-genlayer/eslint.config.mjs | 3 - packages/plugin-giphy/eslint.config.mjs | 3 - packages/plugin-gitbook/eslint.config.mjs | 3 - .../plugin-gitcoin-passport/eslint.config.mjs | 3 - packages/plugin-goplus/eslint.config.mjs | 3 - packages/plugin-hyperliquid/eslint.config.mjs | 3 - .../plugin-image-generation/eslint.config.mjs | 3 - packages/plugin-injective/eslint.config.mjs | 3 - .../injective-sdk-client-ts/.eslintrc.js | 23 -- .../injective-sdk-client-ts/eslint.config.mjs | 37 --- packages/plugin-iq6900/eslint.config.mjs | 3 - packages/plugin-irys/eslint.config.mjs | 3 - packages/plugin-letzai/eslint.config.mjs | 3 - packages/plugin-massa/eslint.config.mjs | 3 - packages/plugin-movement/eslint.config.mjs | 3 - packages/plugin-multiversx/eslint.config.mjs | 3 - packages/plugin-near/eslint.config.mjs | 3 - .../plugin-nft-collections/.eslintrc.json | 8 - packages/plugin-nft-collections/.prettierrc | 7 - .../plugin-nft-collections/eslint.config.mjs | 3 - .../plugin-nft-generation/eslint.config.mjs | 3 - packages/plugin-node/eslint.config.mjs | 3 - packages/plugin-obsidian/eslint.config.mjs | 3 - packages/plugin-opacity/eslint.config.mjs | 3 - .../plugin-open-weather/eslint.config.mjs | 3 - packages/plugin-sgx/eslint.config.mjs | 3 - .../plugin-solana-agentkit/eslint.config.mjs | 3 - packages/plugin-solana/eslint.config.mjs | 3 - packages/plugin-spheron/eslint.config.mjs | 3 - .../plugin-squid-router/eslint.config.mjs | 3 - packages/plugin-starknet/eslint.config.mjs | 3 - packages/plugin-sui/eslint.config.mjs | 3 - packages/plugin-tee-log/eslint.config.mjs | 3 - packages/plugin-tee-marlin/eslint.config.mjs | 3 - .../eslint.config.mjs | 3 - packages/plugin-tee/eslint.config.mjs | 3 - packages/plugin-thirdweb/eslint.config.mjs | 3 - packages/plugin-trustdb/eslint.config.mjs | 3 - packages/plugin-tts/eslint.config.mjs | 3 - .../plugin-video-generation/eslint.config.mjs | 3 - packages/plugin-whatsapp/eslint.config.mjs | 9 - pnpm-lock.yaml | 260 +++++++----------- prettier.config.cjs | 13 - scripts/lint.sh | 44 +-- 92 files changed, 146 insertions(+), 739 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 biome.json delete mode 100644 client/eslint.config.js delete mode 100644 docs/.prettierrc.json delete mode 100644 eslint.config.mjs delete mode 100644 packages/_examples/plugin/eslint.config.mjs delete mode 100644 packages/adapter-pglite/eslint.config.mjs delete mode 100644 packages/adapter-postgres/eslint.config.mjs delete mode 100644 packages/adapter-redis/eslint.config.mjs delete mode 100644 packages/adapter-sqlite/eslint.config.mjs delete mode 100644 packages/adapter-sqljs/eslint.config.mjs delete mode 100644 packages/adapter-supabase/eslint.config.mjs delete mode 100644 packages/client-auto/eslint.config.mjs delete mode 100644 packages/client-direct/eslint.config.mjs delete mode 100644 packages/client-discord/eslint.config.mjs delete mode 100644 packages/client-github/eslint.config.mjs delete mode 100644 packages/client-instagram/eslint.config.mjs delete mode 100644 packages/client-slack/eslint.config.mjs delete mode 100644 packages/client-telegram/eslint.config.mjs delete mode 100644 packages/client-twitter/eslint.config.mjs delete mode 100644 packages/core/eslint.config.mjs delete mode 100644 packages/create-eliza-app/eslint.config.mjs delete mode 100644 packages/plugin-3d-generation/eslint.config.mjs delete mode 100644 packages/plugin-akash/.eslintrc.js delete mode 100644 packages/plugin-akash/eslint.config.mjs delete mode 100644 packages/plugin-allora/eslint.config.mjs delete mode 100644 packages/plugin-anyone/eslint.config.mjs delete mode 100644 packages/plugin-aptos/eslint.config.mjs delete mode 100644 packages/plugin-arthera/eslint.config.mjs delete mode 100644 packages/plugin-asterai/eslint.config.mjs delete mode 100644 packages/plugin-autonome/eslint.config.mjs delete mode 100644 packages/plugin-avail/eslint.config.mjs delete mode 100644 packages/plugin-avalanche/eslint.config.mjs delete mode 100644 packages/plugin-b2/eslint.config.mjs delete mode 100644 packages/plugin-binance/eslint.config.mjs delete mode 100644 packages/plugin-birdeye/eslint.config.mjs delete mode 100644 packages/plugin-bootstrap/eslint.config.mjs delete mode 100644 packages/plugin-coinbase/advanced-sdk-ts/.eslintrc.js delete mode 100644 packages/plugin-coinbase/advanced-sdk-ts/.prettierrc delete mode 100644 packages/plugin-coinbase/eslint.config.mjs delete mode 100644 packages/plugin-cosmos/eslint.config.mjs delete mode 100644 packages/plugin-depin/eslint.config.mjs delete mode 100644 packages/plugin-dexscreener/eslint.config.mjs delete mode 100644 packages/plugin-evm/eslint.config.mjs delete mode 100644 packages/plugin-flow/eslint.config.mjs delete mode 100644 packages/plugin-fuel/eslint.config.mjs delete mode 100644 packages/plugin-genlayer/eslint.config.mjs delete mode 100644 packages/plugin-giphy/eslint.config.mjs delete mode 100644 packages/plugin-gitbook/eslint.config.mjs delete mode 100644 packages/plugin-gitcoin-passport/eslint.config.mjs delete mode 100644 packages/plugin-goplus/eslint.config.mjs delete mode 100644 packages/plugin-hyperliquid/eslint.config.mjs delete mode 100644 packages/plugin-image-generation/eslint.config.mjs delete mode 100644 packages/plugin-injective/eslint.config.mjs delete mode 100644 packages/plugin-injective/injective-sdk-client-ts/.eslintrc.js delete mode 100644 packages/plugin-injective/injective-sdk-client-ts/eslint.config.mjs delete mode 100644 packages/plugin-iq6900/eslint.config.mjs delete mode 100644 packages/plugin-irys/eslint.config.mjs delete mode 100644 packages/plugin-letzai/eslint.config.mjs delete mode 100644 packages/plugin-massa/eslint.config.mjs delete mode 100644 packages/plugin-movement/eslint.config.mjs delete mode 100644 packages/plugin-multiversx/eslint.config.mjs delete mode 100644 packages/plugin-near/eslint.config.mjs delete mode 100644 packages/plugin-nft-collections/.eslintrc.json delete mode 100644 packages/plugin-nft-collections/.prettierrc delete mode 100644 packages/plugin-nft-collections/eslint.config.mjs delete mode 100644 packages/plugin-nft-generation/eslint.config.mjs delete mode 100644 packages/plugin-node/eslint.config.mjs delete mode 100644 packages/plugin-obsidian/eslint.config.mjs delete mode 100644 packages/plugin-opacity/eslint.config.mjs delete mode 100644 packages/plugin-open-weather/eslint.config.mjs delete mode 100644 packages/plugin-sgx/eslint.config.mjs delete mode 100644 packages/plugin-solana-agentkit/eslint.config.mjs delete mode 100644 packages/plugin-solana/eslint.config.mjs delete mode 100644 packages/plugin-spheron/eslint.config.mjs delete mode 100644 packages/plugin-squid-router/eslint.config.mjs delete mode 100644 packages/plugin-starknet/eslint.config.mjs delete mode 100644 packages/plugin-sui/eslint.config.mjs delete mode 100644 packages/plugin-tee-log/eslint.config.mjs delete mode 100644 packages/plugin-tee-marlin/eslint.config.mjs delete mode 100644 packages/plugin-tee-verifiable-log/eslint.config.mjs delete mode 100644 packages/plugin-tee/eslint.config.mjs delete mode 100644 packages/plugin-thirdweb/eslint.config.mjs delete mode 100644 packages/plugin-trustdb/eslint.config.mjs delete mode 100644 packages/plugin-tts/eslint.config.mjs delete mode 100644 packages/plugin-video-generation/eslint.config.mjs delete mode 100644 packages/plugin-whatsapp/eslint.config.mjs delete mode 100644 prettier.config.cjs diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 33527e7c354..00000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "plugins": ["@stylistic"], - "extends": [ - "next/core-web-vitals", - "plugin:@stylistic/recommended-extends" - ], - "rules": { - "@stylistic/indent": [ - "error", - 4, - { - "SwitchCase": 1 - } - ], - "@stylistic/no-tabs": "error", - "@stylistic/member-delimiter-style": [ - "error", - { - "multiline": { - "delimiter": "semi", - "requireLast": true - }, - "singleline": { - "delimiter": "semi", - "requireLast": false - } - } - ], - "@stylistic/eol-last": ["error", "always"], - "@stylistic/multiline-ternary": "off", - "@stylistic/semi": ["error", "always"], - "@stylistic/quotes": "off", - "@stylistic/comma-dangle": "off", - "@stylistic/brace-style": ["error", "1tbs"] - } -} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 45a4b4b3673..551a016700e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,11 +22,8 @@ jobs: - name: Install dependencies run: pnpm install -r --no-frozen-lockfile - - name: Run Prettier - run: pnpm run prettier --check . - - - name: Run Linter - run: pnpm run lint + - name: Run Biome Check + run: pnpm run check - name: Create test env file run: | diff --git a/biome.json b/biome.json new file mode 100644 index 00000000000..e8cf11dedaf --- /dev/null +++ b/biome.json @@ -0,0 +1,34 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.5.3/schema.json", + "organizeImports": { + "enabled": true + }, + "linter": { + "enabled": true, + "rules": { + "recommended": true, + "suspicious": { + "noExplicitAny": "warn" + }, + "style": { + "useConst": "warn" + } + } + }, + "formatter": { + "enabled": true, + "formatWithErrors": false, + "indentStyle": "space", + "indentWidth": 4, + "lineWidth": 80, + "lineEnding": "lf", + "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**"] + }, + "javascript": { + "formatter": { + "quoteStyle": "double", + "trailingComma": "es5", + "semicolons": "always" + } + } + } \ No newline at end of file diff --git a/client/eslint.config.js b/client/eslint.config.js deleted file mode 100644 index 9d1c0c63b18..00000000000 --- a/client/eslint.config.js +++ /dev/null @@ -1,28 +0,0 @@ -import js from "@eslint/js"; -import globals from "globals"; -import reactHooks from "eslint-plugin-react-hooks"; -import reactRefresh from "eslint-plugin-react-refresh"; -import tseslint from "typescript-eslint"; - -export default tseslint.config( - { ignores: ["dist"] }, - { - extends: [js.configs.recommended, ...tseslint.configs.recommended], - files: ["**/*.{ts,tsx}"], - languageOptions: { - ecmaVersion: 2020, - globals: globals.browser, - }, - plugins: { - "react-hooks": reactHooks, - "react-refresh": reactRefresh, - }, - rules: { - ...reactHooks.configs.recommended.rules, - "react-refresh/only-export-components": [ - "warn", - { allowConstantExport: true }, - ], - }, - } -); diff --git a/docs/.prettierrc.json b/docs/.prettierrc.json deleted file mode 100644 index 0967ef424bc..00000000000 --- a/docs/.prettierrc.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/eslint.config.mjs b/eslint.config.mjs deleted file mode 100644 index 5067cc96d81..00000000000 --- a/eslint.config.mjs +++ /dev/null @@ -1,71 +0,0 @@ -import eslint from "@eslint/js"; -import tseslint from "@typescript-eslint/eslint-plugin"; -import typescript from "@typescript-eslint/parser"; -import prettier from "eslint-config-prettier"; -import vitest from "@vitest/eslint-plugin"; // Add Vitest plugin - -export default [ - // JavaScript and TypeScript files - { - files: ["src/**/*.js", "src/**/*.cjs", "src/**/*.mjs", "src/**/*.ts"], - languageOptions: { - parser: typescript, - parserOptions: { - ecmaVersion: "latest", - sourceType: "module", - project: "./tsconfig.json", // Make sure your tsconfig includes @types/node - }, - globals: { - // Add Node.js globals - NodeJS: "readonly", - console: "readonly", - process: "readonly", - Buffer: "readonly", - __dirname: "readonly", - __filename: "readonly", - module: "readonly", - require: "readonly", - }, - }, - plugins: { - "@typescript-eslint": tseslint, - }, - rules: { - ...eslint.configs.recommended.rules, - ...tseslint.configs.recommended.rules, - "prefer-const": "warn", - "no-constant-binary-expression": "error", - - // Disable no-undef as TypeScript handles this better - "no-undef": "off", - "@typescript-eslint/no-unsafe-function-type": "off", - // Customize TypeScript rules - "@typescript-eslint/no-explicit-any": "warn", - "@typescript-eslint/no-unused-vars": [ - "error", - { - argsIgnorePattern: "^_", - varsIgnorePattern: "^_", - ignoreRestSiblings: true, - }, - ], - }, - }, - // Vitest configuration - { - files: [ - "src/**/*.test.js", - "src/**/*.test.ts", - "src/**/*.spec.js", - "src/**/*.spec.ts", - ], - plugins: { - vitest, // Register Vitest plugin - }, - rules: { - ...vitest.configs.recommended.rules, - }, - }, - // Add prettier as the last config to override other formatting rules - prettier, -]; diff --git a/package.json b/package.json index 657c3eec6e3..f45a3a190c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,9 @@ { "name": "eliza", "scripts": { + "format": "biome format --write .", + "lint": "biome lint .", + "check": "biome check --apply .", "preinstall": "npx only-allow pnpm", "build": "turbo run build --filter=!eliza-docs", "build-docker": "turbo run build", @@ -10,10 +13,7 @@ "start:client": "pnpm --dir client dev", "start:debug": "cross-env NODE_ENV=development VERBOSE=true DEBUG=eliza:* pnpm --filter \"@elizaos/agent\" start --isRoot", "dev": "bash ./scripts/dev.sh", - "lint": "bash ./scripts/lint.sh", - "prettier-check": "npx prettier --check --cache .", - "prettier": "npx prettier --write --cache .", - "release": "pnpm build && pnpm prettier && npx lerna publish --no-private --force-publish", + "release": "pnpm build && pnpm format && npx lerna publish --no-private --force-publish", "clean": "bash ./scripts/clean.sh", "docker:build": "bash ./scripts/docker.sh build", "docker:run": "bash ./scripts/docker.sh run", @@ -25,22 +25,16 @@ "integrationTests": "bash ./scripts/integrationTests.sh" }, "devDependencies": { + "@biomejs/biome": "^1.9.4", "@commitlint/cli": "18.6.1", "@commitlint/config-conventional": "18.6.3", "@types/jest": "^29.5.11", - "@typescript-eslint/eslint-plugin": "8.16.0", - "@typescript-eslint/parser": "8.16.0", - "@vitest/eslint-plugin": "1.1.13", "concurrently": "9.1.0", "cross-env": "7.0.3", - "eslint": "9.16.0", - "eslint-config-prettier": "9.1.0", "husky": "9.1.7", "jest": "^29.7.0", "lerna": "8.1.5", "only-allow": "1.2.1", - "prettier": "3.4.1", - "ts-jest": "^29.1.1", "turbo": "2.3.3", "typedoc": "0.26.11", "typescript": "5.6.3", diff --git a/packages/_examples/plugin/eslint.config.mjs b/packages/_examples/plugin/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/_examples/plugin/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/adapter-pglite/eslint.config.mjs b/packages/adapter-pglite/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/adapter-pglite/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/adapter-postgres/eslint.config.mjs b/packages/adapter-postgres/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/adapter-postgres/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/adapter-redis/eslint.config.mjs b/packages/adapter-redis/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/adapter-redis/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/adapter-sqlite/eslint.config.mjs b/packages/adapter-sqlite/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/adapter-sqlite/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/adapter-sqljs/eslint.config.mjs b/packages/adapter-sqljs/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/adapter-sqljs/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/adapter-supabase/eslint.config.mjs b/packages/adapter-supabase/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/adapter-supabase/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/client-auto/eslint.config.mjs b/packages/client-auto/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/client-auto/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/client-direct/eslint.config.mjs b/packages/client-direct/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/client-direct/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/client-discord/eslint.config.mjs b/packages/client-discord/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/client-discord/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/client-github/eslint.config.mjs b/packages/client-github/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/client-github/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/client-instagram/eslint.config.mjs b/packages/client-instagram/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/client-instagram/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/client-slack/eslint.config.mjs b/packages/client-slack/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/client-slack/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/client-telegram/eslint.config.mjs b/packages/client-telegram/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/client-telegram/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/client-twitter/eslint.config.mjs b/packages/client-twitter/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/client-twitter/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/core/eslint.config.mjs b/packages/core/eslint.config.mjs deleted file mode 100644 index 67614d246e9..00000000000 --- a/packages/core/eslint.config.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [ - { - ignores: [ - "**/node_modules/*", - "**/coverage/*", - "**/dist/*", - "**/types/*", - "**/scripts/concatenated-output.ts", - "rollup.config.js", - "jest.config.js", - "docs/", - ], - }, - ...eslintGlobalConfig, -]; diff --git a/packages/create-eliza-app/eslint.config.mjs b/packages/create-eliza-app/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/create-eliza-app/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-3d-generation/eslint.config.mjs b/packages/plugin-3d-generation/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-3d-generation/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-akash/.eslintrc.js b/packages/plugin-akash/.eslintrc.js deleted file mode 100644 index e476cac57e6..00000000000 --- a/packages/plugin-akash/.eslintrc.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - parserOptions: { - project: './tsconfig.json', - tsconfigRootDir: __dirname, - ecmaVersion: 2020, - sourceType: 'module', - }, - plugins: ['@typescript-eslint'], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', - ], - rules: { - '@typescript-eslint/no-explicit-any': 'warn', - '@typescript-eslint/no-unused-vars': ['error', { - argsIgnorePattern: '^_', - varsIgnorePattern: '^_', - ignoreRestSiblings: true, - }], - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-non-null-assertion': 'warn', - 'no-console': ['error', { allow: ['warn', 'error'] }], - }, - ignorePatterns: ['dist/', 'node_modules/', '*.js', '*.mjs', '*.cjs'], -}; \ No newline at end of file diff --git a/packages/plugin-akash/eslint.config.mjs b/packages/plugin-akash/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-akash/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-allora/eslint.config.mjs b/packages/plugin-allora/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-allora/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-anyone/eslint.config.mjs b/packages/plugin-anyone/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-anyone/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-aptos/eslint.config.mjs b/packages/plugin-aptos/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-aptos/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-arthera/eslint.config.mjs b/packages/plugin-arthera/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-arthera/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-asterai/eslint.config.mjs b/packages/plugin-asterai/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-asterai/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-autonome/eslint.config.mjs b/packages/plugin-autonome/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-autonome/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-avail/eslint.config.mjs b/packages/plugin-avail/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-avail/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-avalanche/eslint.config.mjs b/packages/plugin-avalanche/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-avalanche/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-b2/eslint.config.mjs b/packages/plugin-b2/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-b2/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-binance/eslint.config.mjs b/packages/plugin-binance/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-binance/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-birdeye/eslint.config.mjs b/packages/plugin-birdeye/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-birdeye/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-bootstrap/eslint.config.mjs b/packages/plugin-bootstrap/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-bootstrap/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-coinbase/advanced-sdk-ts/.eslintrc.js b/packages/plugin-coinbase/advanced-sdk-ts/.eslintrc.js deleted file mode 100644 index eccc4a85d41..00000000000 --- a/packages/plugin-coinbase/advanced-sdk-ts/.eslintrc.js +++ /dev/null @@ -1,21 +0,0 @@ -/** @type {import('eslint').Linter.Config} */ -module.exports = { - parser: '@typescript-eslint/parser', - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier', - 'plugin:prettier/recommended', - ], - plugins: ['prettier'], - rules: { - 'prettier/prettier': 'error', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - }, - ignorePatterns: ['**/dist/**', '**/node_modules/**', '**/*.md'], - env: { - node: true, // Add this line to recognize Node.js globals - es2021: true, // Optionally include modern JavaScript features - }, -}; diff --git a/packages/plugin-coinbase/advanced-sdk-ts/.prettierrc b/packages/plugin-coinbase/advanced-sdk-ts/.prettierrc deleted file mode 100644 index d0cb5a51be9..00000000000 --- a/packages/plugin-coinbase/advanced-sdk-ts/.prettierrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "semi": true, - "singleQuote": true, - "trailingComma": "es5" -} diff --git a/packages/plugin-coinbase/eslint.config.mjs b/packages/plugin-coinbase/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-coinbase/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-cosmos/eslint.config.mjs b/packages/plugin-cosmos/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-cosmos/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-depin/eslint.config.mjs b/packages/plugin-depin/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-depin/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-dexscreener/eslint.config.mjs b/packages/plugin-dexscreener/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-dexscreener/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-evm/eslint.config.mjs b/packages/plugin-evm/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-evm/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-flow/eslint.config.mjs b/packages/plugin-flow/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-flow/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-fuel/eslint.config.mjs b/packages/plugin-fuel/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-fuel/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-genlayer/eslint.config.mjs b/packages/plugin-genlayer/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-genlayer/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-giphy/eslint.config.mjs b/packages/plugin-giphy/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-giphy/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-gitbook/eslint.config.mjs b/packages/plugin-gitbook/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-gitbook/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-gitcoin-passport/eslint.config.mjs b/packages/plugin-gitcoin-passport/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-gitcoin-passport/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-goplus/eslint.config.mjs b/packages/plugin-goplus/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-goplus/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-hyperliquid/eslint.config.mjs b/packages/plugin-hyperliquid/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-hyperliquid/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-image-generation/eslint.config.mjs b/packages/plugin-image-generation/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-image-generation/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-injective/eslint.config.mjs b/packages/plugin-injective/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-injective/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-injective/injective-sdk-client-ts/.eslintrc.js b/packages/plugin-injective/injective-sdk-client-ts/.eslintrc.js deleted file mode 100644 index 2688cb34e7a..00000000000 --- a/packages/plugin-injective/injective-sdk-client-ts/.eslintrc.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = { - "root": true, - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended" - ], - "rules": { - // TypeScript-specific rules - "@typescript-eslint/no-explicit-any": "warn", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }], - - // General ESLint rules - "no-console": "warn", - "eqeqeq": "error", - "no-duplicate-imports": "error", - "prefer-const": "warn" - } -} \ No newline at end of file diff --git a/packages/plugin-injective/injective-sdk-client-ts/eslint.config.mjs b/packages/plugin-injective/injective-sdk-client-ts/eslint.config.mjs deleted file mode 100644 index 2415fb89f50..00000000000 --- a/packages/plugin-injective/injective-sdk-client-ts/eslint.config.mjs +++ /dev/null @@ -1,37 +0,0 @@ -import globals from "globals"; -import pluginJs from "@eslint/js"; -import tseslint from "typescript-eslint"; - -export default [ - { - files: ["**/*.{js,mjs,cjs,ts}"], - languageOptions: { - globals: { - ...globals.browser, - ...globals.node - }, - parserOptions: { - ecmaVersion: "latest", - sourceType: "module" - } - } - }, - pluginJs.configs.recommended, - ...tseslint.configs.recommended, - { - rules: { - // Customize rules as needed - "no-unused-vars": "warn", - "@typescript-eslint/no-explicit-any": "warn", - "no-console": "warn" - } - }, - { - ignores: [ - "node_modules/", - "dist/", - "build/", - "**/*.d.ts" - ] - } -]; \ No newline at end of file diff --git a/packages/plugin-iq6900/eslint.config.mjs b/packages/plugin-iq6900/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-iq6900/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-irys/eslint.config.mjs b/packages/plugin-irys/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-irys/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-letzai/eslint.config.mjs b/packages/plugin-letzai/eslint.config.mjs deleted file mode 100644 index 2e45884b6cb..00000000000 --- a/packages/plugin-letzai/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-massa/eslint.config.mjs b/packages/plugin-massa/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-massa/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-movement/eslint.config.mjs b/packages/plugin-movement/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-movement/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-multiversx/eslint.config.mjs b/packages/plugin-multiversx/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-multiversx/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-near/eslint.config.mjs b/packages/plugin-near/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-near/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-nft-collections/.eslintrc.json b/packages/plugin-nft-collections/.eslintrc.json deleted file mode 100644 index eb6b1760de8..00000000000 --- a/packages/plugin-nft-collections/.eslintrc.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "../../.eslintrc.json", - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], - "root": true -} \ No newline at end of file diff --git a/packages/plugin-nft-collections/.prettierrc b/packages/plugin-nft-collections/.prettierrc deleted file mode 100644 index 3c4f9def446..00000000000 --- a/packages/plugin-nft-collections/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "tabWidth": 4, - "semi": true, - "singleQuote": false, - "trailingComma": "es5", - "printWidth": 80 -} diff --git a/packages/plugin-nft-collections/eslint.config.mjs b/packages/plugin-nft-collections/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-nft-collections/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-nft-generation/eslint.config.mjs b/packages/plugin-nft-generation/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-nft-generation/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-node/eslint.config.mjs b/packages/plugin-node/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-node/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-obsidian/eslint.config.mjs b/packages/plugin-obsidian/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-obsidian/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-opacity/eslint.config.mjs b/packages/plugin-opacity/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-opacity/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-open-weather/eslint.config.mjs b/packages/plugin-open-weather/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-open-weather/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-sgx/eslint.config.mjs b/packages/plugin-sgx/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-sgx/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-solana-agentkit/eslint.config.mjs b/packages/plugin-solana-agentkit/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-solana-agentkit/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-solana/eslint.config.mjs b/packages/plugin-solana/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-solana/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-spheron/eslint.config.mjs b/packages/plugin-spheron/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-spheron/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-squid-router/eslint.config.mjs b/packages/plugin-squid-router/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-squid-router/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-starknet/eslint.config.mjs b/packages/plugin-starknet/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-starknet/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-sui/eslint.config.mjs b/packages/plugin-sui/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-sui/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-tee-log/eslint.config.mjs b/packages/plugin-tee-log/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-tee-log/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-tee-marlin/eslint.config.mjs b/packages/plugin-tee-marlin/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-tee-marlin/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-tee-verifiable-log/eslint.config.mjs b/packages/plugin-tee-verifiable-log/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-tee-verifiable-log/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-tee/eslint.config.mjs b/packages/plugin-tee/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-tee/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-thirdweb/eslint.config.mjs b/packages/plugin-thirdweb/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-thirdweb/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-trustdb/eslint.config.mjs b/packages/plugin-trustdb/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-trustdb/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-tts/eslint.config.mjs b/packages/plugin-tts/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-tts/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-video-generation/eslint.config.mjs b/packages/plugin-video-generation/eslint.config.mjs deleted file mode 100644 index 92fe5bbebef..00000000000 --- a/packages/plugin-video-generation/eslint.config.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [...eslintGlobalConfig]; diff --git a/packages/plugin-whatsapp/eslint.config.mjs b/packages/plugin-whatsapp/eslint.config.mjs deleted file mode 100644 index d0d3c523f83..00000000000 --- a/packages/plugin-whatsapp/eslint.config.mjs +++ /dev/null @@ -1,9 +0,0 @@ -import eslintGlobalConfig from "../../eslint.config.mjs"; - -export default [ - ...eslintGlobalConfig, - { - files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"], - ignores: ["**/node_modules/**", "**/dist/**"], - }, -]; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 47a685fef1a..c1db1ef6270 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,7 +26,7 @@ importers: version: 1.14.33(@types/react@19.0.7)(bufferutil@4.0.9)(react-dom@19.0.0(react@19.0.0))(react@19.0.0)(utf-8-validate@6.0.5) '@vitest/eslint-plugin': specifier: 1.0.1 - version: 1.0.1(@typescript-eslint/utils@8.20.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.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0)) + version: 1.0.1(@typescript-eslint/utils@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0)) amqplib: specifier: 0.10.5 version: 0.10.5 @@ -52,6 +52,9 @@ importers: specifier: 4.9.3 version: 4.9.3 devDependencies: + '@biomejs/biome': + specifier: ^1.9.4 + version: 1.9.4 '@commitlint/cli': specifier: 18.6.1 version: 18.6.1(@types/node@22.10.7)(typescript@5.6.3) @@ -61,24 +64,12 @@ importers: '@types/jest': specifier: ^29.5.11 version: 29.5.14 - '@typescript-eslint/eslint-plugin': - specifier: 8.16.0 - version: 8.16.0(@typescript-eslint/parser@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) - '@typescript-eslint/parser': - specifier: 8.16.0 - version: 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) concurrently: specifier: 9.1.0 version: 9.1.0 cross-env: specifier: 7.0.3 version: 7.0.3 - eslint: - specifier: 9.16.0 - version: 9.16.0(jiti@2.4.2) - eslint-config-prettier: - specifier: 9.1.0 - version: 9.1.0(eslint@9.16.0(jiti@2.4.2)) husky: specifier: 9.1.7 version: 9.1.7 @@ -91,12 +82,6 @@ importers: only-allow: specifier: 1.2.1 version: 1.2.1 - prettier: - specifier: 3.4.1 - version: 3.4.1 - ts-jest: - specifier: ^29.1.1 - version: 29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.7)(babel-plugin-macros@3.1.0))(typescript@5.6.3) turbo: specifier: 2.3.3 version: 2.3.3 @@ -1919,7 +1904,7 @@ importers: version: link:../core genlayer-js: specifier: 0.4.7 - version: 0.4.7(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(bufferutil@4.0.9)(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)(utf-8-validate@6.0.5)(zod@3.24.1) + version: 0.4.7(bufferutil@4.0.9)(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)(utf-8-validate@6.0.5)(zod@3.24.1) tsup: specifier: 8.3.5 version: 8.3.5(@swc/core@1.10.7(@swc/helpers@0.5.15))(jiti@2.4.2)(postcss@8.5.1)(tsx@4.19.2)(typescript@5.7.3)(yaml@2.7.0) @@ -4500,6 +4485,59 @@ packages: resolution: {integrity: sha512-qWswMYRywaYOzH3ISVsvk2V0nkcpJT91sRohln2isPryMtHqxXPqiJ4GU8G9fKVL0Pcz8CfctKvqQx4gB3DGHA==} engines: {node: '>=12.22.3', npm: '>=6.14.13'} + '@biomejs/biome@1.9.4': + resolution: {integrity: sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==} + engines: {node: '>=14.21.3'} + hasBin: true + + '@biomejs/cli-darwin-arm64@1.9.4': + resolution: {integrity: sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [darwin] + + '@biomejs/cli-darwin-x64@1.9.4': + resolution: {integrity: sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [darwin] + + '@biomejs/cli-linux-arm64-musl@1.9.4': + resolution: {integrity: sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-arm64@1.9.4': + resolution: {integrity: sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [linux] + + '@biomejs/cli-linux-x64-musl@1.9.4': + resolution: {integrity: sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-linux-x64@1.9.4': + resolution: {integrity: sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [linux] + + '@biomejs/cli-win32-arm64@1.9.4': + resolution: {integrity: sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==} + engines: {node: '>=14.21.3'} + cpu: [arm64] + os: [win32] + + '@biomejs/cli-win32-x64@1.9.4': + resolution: {integrity: sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==} + engines: {node: '>=14.21.3'} + cpu: [x64] + os: [win32] + '@bitcoinerlab/secp256k1@1.2.0': resolution: {integrity: sha512-jeujZSzb3JOZfmJYI0ph1PVpCRV5oaexCgy+RvCXV8XlY+XFB/2n3WOcvBsKLsOw78KYgnQrQWb2HrKE4be88Q==} @@ -14175,12 +14213,6 @@ packages: engines: {node: '>=6.0'} hasBin: true - eslint-config-prettier@9.1.0: - resolution: {integrity: sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==} - hasBin: true - peerDependencies: - eslint: '>=7.0.0' - eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} @@ -25552,6 +25584,41 @@ snapshots: - debug - utf-8-validate + '@biomejs/biome@1.9.4': + optionalDependencies: + '@biomejs/cli-darwin-arm64': 1.9.4 + '@biomejs/cli-darwin-x64': 1.9.4 + '@biomejs/cli-linux-arm64': 1.9.4 + '@biomejs/cli-linux-arm64-musl': 1.9.4 + '@biomejs/cli-linux-x64': 1.9.4 + '@biomejs/cli-linux-x64-musl': 1.9.4 + '@biomejs/cli-win32-arm64': 1.9.4 + '@biomejs/cli-win32-x64': 1.9.4 + + '@biomejs/cli-darwin-arm64@1.9.4': + optional: true + + '@biomejs/cli-darwin-x64@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-arm64@1.9.4': + optional: true + + '@biomejs/cli-linux-x64-musl@1.9.4': + optional: true + + '@biomejs/cli-linux-x64@1.9.4': + optional: true + + '@biomejs/cli-win32-arm64@1.9.4': + optional: true + + '@biomejs/cli-win32-x64@1.9.4': + optional: true + '@bitcoinerlab/secp256k1@1.2.0': dependencies: '@noble/curves': 1.8.0 @@ -35649,24 +35716,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@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)': - dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/type-utils': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) - '@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.16.0 - eslint: 9.16.0(jiti@2.4.2) - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.4.3(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/eslint-plugin@8.16.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.7.3))(eslint@9.16.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -35733,19 +35782,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)': - dependencies: - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) - '@typescript-eslint/visitor-keys': 8.16.0 - debug: 4.4.0(supports-color@5.5.0) - eslint: 9.16.0(jiti@2.4.2) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@typescript-eslint/scope-manager': 8.16.0 @@ -35811,18 +35847,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)': - dependencies: - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) - '@typescript-eslint/utils': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) - debug: 4.4.0(supports-color@5.5.0) - eslint: 9.16.0(jiti@2.4.2) - ts-api-utils: 1.4.3(typescript@5.6.3) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/type-utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.7.3) @@ -35937,18 +35961,6 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.2)) - '@typescript-eslint/scope-manager': 8.16.0 - '@typescript-eslint/types': 8.16.0 - '@typescript-eslint/typescript-estree': 8.16.0(typescript@5.6.3) - eslint: 9.16.0(jiti@2.4.2) - optionalDependencies: - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - '@typescript-eslint/utils@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.7.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.2)) @@ -35973,18 +35985,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.20.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3)': - dependencies: - '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.2)) - '@typescript-eslint/scope-manager': 8.20.0 - '@typescript-eslint/types': 8.20.0 - '@typescript-eslint/typescript-estree': 8.20.0(typescript@5.6.3) - eslint: 9.16.0(jiti@2.4.2) - typescript: 5.6.3 - transitivePeerDependencies: - - supports-color - optional: true - '@typescript-eslint/utils@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.18.0(jiti@2.4.2)) @@ -36106,11 +36106,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.20.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.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0))': + '@vitest/eslint-plugin@1.0.1(@typescript-eslint/utils@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3)(vitest@2.1.5(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0))': dependencies: - eslint: 9.16.0(jiti@2.4.2) + eslint: 9.18.0(jiti@2.4.2) optionalDependencies: - '@typescript-eslint/utils': 8.20.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) + '@typescript-eslint/utils': 8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3) typescript: 5.6.3 vitest: 2.1.5(@types/node@22.10.7)(jsdom@25.0.1(bufferutil@4.0.9)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@6.0.5))(terser@5.37.0) @@ -40827,10 +40827,6 @@ snapshots: optionalDependencies: source-map: 0.6.1 - eslint-config-prettier@9.1.0(eslint@9.16.0(jiti@2.4.2)): - dependencies: - eslint: 9.16.0(jiti@2.4.2) - eslint-import-resolver-node@0.3.9: dependencies: debug: 3.2.7 @@ -40855,16 +40851,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@9.18.0(jiti@2.4.2)): - dependencies: - debug: 3.2.7 - optionalDependencies: - '@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) - eslint: 9.18.0(jiti@2.4.2) - eslint-import-resolver-node: 0.3.9 - transitivePeerDependencies: - - supports-color - eslint-module-utils@2.12.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@9.18.0(jiti@2.4.2)): dependencies: debug: 3.2.7 @@ -40876,35 +40862,6 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.18.0(jiti@2.4.2)): - dependencies: - '@rtsao/scc': 1.1.0 - array-includes: 3.1.8 - array.prototype.findlastindex: 1.2.5 - array.prototype.flat: 1.3.3 - array.prototype.flatmap: 1.3.3 - debug: 3.2.7 - doctrine: 2.1.0 - eslint: 9.18.0(jiti@2.4.2) - eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint-import-resolver-node@0.3.9)(eslint@9.18.0(jiti@2.4.2)) - hasown: 2.0.2 - is-core-module: 2.16.1 - is-glob: 4.0.3 - minimatch: 3.1.2 - object.fromentries: 2.0.8 - object.groupby: 1.0.3 - object.values: 1.2.1 - semver: 6.3.1 - string.prototype.trimend: 1.0.9 - tsconfig-paths: 3.15.0 - optionalDependencies: - '@typescript-eslint/parser': 8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3) - transitivePeerDependencies: - - eslint-import-resolver-typescript - - eslint-import-resolver-webpack - - supports-color - eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.18.0(jiti@2.4.2)): dependencies: '@rtsao/scc': 1.1.0 @@ -41591,7 +41548,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.3.4 + debug: 4.4.0(supports-color@5.5.0) get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -42106,9 +42063,9 @@ snapshots: dependencies: is-property: 1.0.2 - genlayer-js@0.4.7(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(bufferutil@4.0.9)(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)(utf-8-validate@6.0.5)(zod@3.24.1): + genlayer-js@0.4.7(bufferutil@4.0.9)(eslint@9.18.0(jiti@2.4.2))(typescript@5.7.3)(utf-8-validate@6.0.5)(zod@3.24.1): dependencies: - eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.16.0(eslint@9.16.0(jiti@2.4.2))(typescript@5.6.3))(eslint@9.18.0(jiti@2.4.2)) + eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.20.0(eslint@9.18.0(jiti@2.4.2))(typescript@5.6.3))(eslint-import-resolver-typescript@3.7.0)(eslint@9.18.0(jiti@2.4.2)) typescript-parsec: 0.3.4 viem: 2.21.58(bufferutil@4.0.9)(typescript@5.7.3)(utf-8-validate@6.0.5)(zod@3.24.1) transitivePeerDependencies: @@ -50865,25 +50822,6 @@ snapshots: babel-jest: 29.7.0(@babel/core@7.26.0) esbuild: 0.24.2 - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.10.7)(babel-plugin-macros@3.1.0))(typescript@5.6.3): - dependencies: - bs-logger: 0.2.6 - ejs: 3.1.10 - fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.10.7)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@22.10.7)(typescript@5.7.3)) - jest-util: 29.7.0 - json5: 2.2.3 - lodash.memoize: 4.1.2 - make-error: 1.3.6 - semver: 7.6.3 - typescript: 5.6.3 - yargs-parser: 21.1.1 - optionalDependencies: - '@babel/core': 7.26.0 - '@jest/transform': 29.7.0 - '@jest/types': 29.6.3 - babel-jest: 29.7.0(@babel/core@7.26.0) - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.8.4)(babel-plugin-macros@3.1.0)(ts-node@10.9.2(@swc/core@1.10.7(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 diff --git a/prettier.config.cjs b/prettier.config.cjs deleted file mode 100644 index dacb378702f..00000000000 --- a/prettier.config.cjs +++ /dev/null @@ -1,13 +0,0 @@ -/** @type {import('prettier').Config} */ -module.exports = { - endOfLine: "lf", - semi: true, - singleQuote: false, - tabWidth: 4, - trailingComma: "es5", - bracketSpacing: true, - printWidth: 80, - useTabs: false, // Add this to enforce spaces - indent: 4, // Add this to match tabWidth - trimTrailingWhitespace: true, // Add this for trailing spaces -}; diff --git a/scripts/lint.sh b/scripts/lint.sh index 98e28991fa3..38043fddfd2 100644 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -12,45 +12,13 @@ fi # Navigate to the script's directory cd "$(dirname "$0")"/.. -# Check if the packages directory exists -if [ ! -d "packages" ]; then - echo "Error: 'packages' directory not found." +# Run Biome lint for the entire project +echo -e "\033[1mRunning Biome lint\033[0m" +if pnpm lint; then + echo -e "\033[1;32mLint completed successfully\033[0m" +else + echo -e "\033[1;31mLint failed\033[0m" exit 1 fi -# Find all packages under the packages directory -PACKAGES=( $(find packages -mindepth 1 -maxdepth 1 -type d -exec basename {} \;) ) - -# lint packages in specified order -for package in "${PACKAGES[@]}"; do - package_path="packages/$package" - - if [ ! -d "$package_path" ]; then - echo -e "\033[1mPackage directory '$package' not found, skipping...\033[0m" - continue - fi - - echo -e "\033[1mLinting package: $package\033[0m" - cd "$package_path" || continue - - if [ -f "package.json" ]; then - # Run lint if available - if npm run | grep -q " lint"; then - echo -e "\033[1mRunning lint for package: $package\033[0m" - if npm run lint; then - echo -e "\033[1;32mSuccessfully linted $package\033[0m\n" - else - echo -e "\033[1;31mLint failed for $package\033[0m" - exit 1 # Exit immediately if lint fails - fi - else - echo "No lint script found in $package, skipping lint..." - fi - else - echo "No package.json found in $package, skipping..." - fi - - cd - > /dev/null || exit -done - echo -e "\033[1mLint process completed.😎\033[0m" From 32209be7c5fcb6c3362d9a99f5ebeba6cd33c78d Mon Sep 17 00:00:00 2001 From: Sero <69639595+Seroxdesign@users.noreply.github.com> Date: Fri, 17 Jan 2025 06:58:10 -0500 Subject: [PATCH 2/7] full lint and biome switch --- biome.json | 70 +++++++++++++++++-- .../src/canisters/pick-pump/index.did.ts | 1 - .../src/canisters/token-icrc1/index.did.d.ts | 1 - .../src/canisters/token-icrc1/index.did.ts | 3 +- .../src/utils/common/types/variant.ts | 1 - 5 files changed, 66 insertions(+), 10 deletions(-) diff --git a/biome.json b/biome.json index e8cf11dedaf..e876eb80662 100644 --- a/biome.json +++ b/biome.json @@ -8,12 +8,73 @@ "rules": { "recommended": true, "suspicious": { - "noExplicitAny": "warn" + "noExplicitAny": "off", + "noArrayIndexKey": "off", + "noPrototypeBuiltins": "off", + "noDuplicateObjectKeys": "off", + "noGlobalIsNan": "off", + "noDuplicateFontNames": "off", + "noSelfCompare": "off", + "noDoubleEquals": "off", + "noImplicitAnyLet": "off", + "noAssignInExpressions": "off", + "noExportsInTest": "off", + "noConstEnum": "off", + "noEmptyInterface": "off" + }, + "correctness": { + "noUnusedVariables": "off", + "noUnreachable": "off", + "useExhaustiveDependencies": "off", + "noSwitchDeclarations": "off", + "noUnnecessaryContinue": "off", + "noInnerDeclarations": "off" }, "style": { - "useConst": "warn" + "useConst": "off", + "useTemplate": "off", + "useImportType": "off", + "useNodejsImportProtocol": "off", + "noUselessElse": "off", + "useSelfClosingElements": "off", + "useNumberNamespace": "off", + "noUnusedTemplateLiteral": "off", + "noInferrableTypes": "off", + "noNonNullAssertion": "off", + "noParameterAssign": "off", + "useDefaultParameterLast": "off", + "useExponentiationOperator": "off", + "noVar": "off", + "useSingleVarDeclarator": "off", + "useExportType": "off" + }, + "a11y": { + "useAltText": "off", + "useFocusableInteractive": "off", + "useMediaCaption": "off", + "noSvgWithoutTitle": "off", + "useKeyWithClickEvents": "off" + }, + "complexity": { + "noForEach": "off", + "useOptionalChain": "off", + "useArrowFunction": "off", + "useFlatMap": "off", + "useLiteralKeys": "off", + "noBannedTypes": "off", + "noStaticOnlyClass": "off", + "noThisInStatic": "off", + "noUselessConstructor": "off", + "noUselessTernary": "off", + "noUselessSwitchCase": "off", + "noUselessCatch": "off" + }, + "performance": { + "noDelete": "off", + "noAccumulatingSpread": "off" } - } + }, + "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**", "**/*.json"] }, "formatter": { "enabled": true, @@ -22,12 +83,11 @@ "indentWidth": 4, "lineWidth": 80, "lineEnding": "lf", - "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**"] + "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**", "**/*.json"] }, "javascript": { "formatter": { "quoteStyle": "double", - "trailingComma": "es5", "semicolons": "always" } } diff --git a/packages/plugin-icp/src/canisters/pick-pump/index.did.ts b/packages/plugin-icp/src/canisters/pick-pump/index.did.ts index 58572078c21..fff97ff365e 100644 --- a/packages/plugin-icp/src/canisters/pick-pump/index.did.ts +++ b/packages/plugin-icp/src/canisters/pick-pump/index.did.ts @@ -1,4 +1,3 @@ -// biome-ignore lint/suspicious/noExplicitAny: export const idlFactory = ({ IDL }: { IDL: any }) => { const Result = IDL.Variant({ Ok: IDL.Nat, Err: IDL.Text }); const CreateMemeTokenArg = IDL.Record({ diff --git a/packages/plugin-icp/src/canisters/token-icrc1/index.did.d.ts b/packages/plugin-icp/src/canisters/token-icrc1/index.did.d.ts index cc7a97dc23f..f8027b963fe 100644 --- a/packages/plugin-icp/src/canisters/token-icrc1/index.did.d.ts +++ b/packages/plugin-icp/src/canisters/token-icrc1/index.did.d.ts @@ -294,7 +294,6 @@ export interface _SERVICE { send_dfx: ActorMethod<[SendArgs], bigint>; symbol: ActorMethod<[], Symbol>; transfer: ActorMethod<[TransferArgs], Result_5>; - // biome-ignore lint/complexity/noBannedTypes: transfer_fee: ActorMethod<[{}], TransferFee>; } export declare const idlFactory: IDL.InterfaceFactory; diff --git a/packages/plugin-icp/src/canisters/token-icrc1/index.did.ts b/packages/plugin-icp/src/canisters/token-icrc1/index.did.ts index 459d2476983..8432e6af332 100644 --- a/packages/plugin-icp/src/canisters/token-icrc1/index.did.ts +++ b/packages/plugin-icp/src/canisters/token-icrc1/index.did.ts @@ -1,4 +1,3 @@ -// biome-ignore lint/suspicious/noExplicitAny: export const idlFactory = ({ IDL }: { IDL: any }) => { const Account = IDL.Record({ owner: IDL.Principal, @@ -294,7 +293,7 @@ export const idlFactory = ({ IDL }: { IDL: any }) => { transfer_fee: IDL.Func([IDL.Record({})], [TransferFee], ["query"]), }); }; -// biome-ignore lint/suspicious/noExplicitAny: + export const init = ({ IDL }: { IDL: any }) => { const Account = IDL.Record({ owner: IDL.Principal, diff --git a/packages/plugin-icp/src/utils/common/types/variant.ts b/packages/plugin-icp/src/utils/common/types/variant.ts index 9b28eec128a..cb63399409f 100644 --- a/packages/plugin-icp/src/utils/common/types/variant.ts +++ b/packages/plugin-icp/src/utils/common/types/variant.ts @@ -17,7 +17,6 @@ type Variant6 = Record< >; // Unwrap and extract only the key -// biome-ignore lint/suspicious/noExplicitAny: export const unwrapVariantKey = ( v: Record ): T => { From 34135d91de6070fb7c0ad9eb6f0b12e9696bfeff Mon Sep 17 00:00:00 2001 From: Sero <69639595+Seroxdesign@users.noreply.github.com> Date: Fri, 17 Jan 2025 07:04:32 -0500 Subject: [PATCH 3/7] lint check fix --- biome.json | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/biome.json b/biome.json index e876eb80662..d50b7025544 100644 --- a/biome.json +++ b/biome.json @@ -1,7 +1,7 @@ { "$schema": "https://biomejs.dev/schemas/1.5.3/schema.json", "organizeImports": { - "enabled": true + "enabled": false }, "linter": { "enabled": true, @@ -77,13 +77,7 @@ "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**", "**/*.json"] }, "formatter": { - "enabled": true, - "formatWithErrors": false, - "indentStyle": "space", - "indentWidth": 4, - "lineWidth": 80, - "lineEnding": "lf", - "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**", "**/*.json"] + "enabled": false }, "javascript": { "formatter": { From f7b6117883be64e4ed042b09f1d6a75f5b2af285 Mon Sep 17 00:00:00 2001 From: Sero <69639595+Seroxdesign@users.noreply.github.com> Date: Fri, 17 Jan 2025 07:09:54 -0500 Subject: [PATCH 4/7] warn --- .../client-type-identification.test.ts | 2 +- agent/src/index.ts | 30 ++--- biome.json | 108 +++++++-------- client/src/App.tsx | 2 +- client/src/components/app-sidebar.tsx | 2 +- client/src/components/audio-recorder.tsx | 2 +- client/src/components/chat.tsx | 4 +- client/src/components/overview.tsx | 2 +- client/src/components/ui/badge.tsx | 2 +- client/src/components/ui/chat/chat-bubble.tsx | 2 +- .../components/ui/chat/expandable-chat.tsx | 3 +- client/src/components/ui/sidebar.tsx | 2 +- client/src/components/ui/toaster.tsx | 8 +- client/src/lib/api.ts | 2 +- client/src/routes/chat.tsx | 2 +- client/src/routes/home.tsx | 2 +- client/src/routes/overview.tsx | 2 +- docs/community/components/Accordion.tsx | 2 +- docs/community/components/Contributions.tsx | 3 +- docs/community/components/Contributor.tsx | 5 +- docs/community/components/Contributors.tsx | 3 +- docs/community/components/StatCard.tsx | 4 +- docs/community/components/utils.tsx | 2 +- docs/docusaurus.config.js | 4 +- .../plugin/src/actions/sampleAction.ts | 10 +- .../plugin/src/evaluators/sampleEvalutor.ts | 8 +- .../plugin/src/plugins/samplePlugin.ts | 2 +- .../plugin/src/providers/sampleProvider.ts | 8 +- .../plugin/src/services/sampleService.ts | 2 +- packages/adapter-pglite/src/index.ts | 16 +-- packages/adapter-postgres/src/index.ts | 14 +- packages/adapter-redis/src/index.ts | 2 +- packages/adapter-sqlite/src/index.ts | 16 +-- packages/adapter-sqlite/src/sqlite_vec.ts | 2 +- packages/adapter-sqljs/src/index.ts | 14 +- packages/adapter-supabase/src/index.ts | 17 ++- packages/client-auto/src/index.ts | 2 +- packages/client-direct/src/api.ts | 12 +- packages/client-direct/src/index.ts | 28 ++-- .../client-direct/src/verifiable-log-api.ts | 8 +- .../src/actions/chat_with_attachments.ts | 14 +- .../src/actions/download_media.ts | 16 +-- .../client-discord/src/actions/joinvoice.ts | 20 +-- .../client-discord/src/actions/leavevoice.ts | 8 +- .../src/actions/summarize_conversation.ts | 26 ++-- .../src/actions/transcribe_media.ts | 14 +- packages/client-discord/src/attachments.ts | 14 +- packages/client-discord/src/environment.ts | 2 +- packages/client-discord/src/index.ts | 12 +- packages/client-discord/src/messages.ts | 30 ++--- .../src/providers/channelState.ts | 6 +- .../src/providers/voiceState.ts | 4 +- packages/client-discord/src/utils.ts | 15 +-- packages/client-discord/src/voice.ts | 44 +++--- packages/client-farcaster/src/client.ts | 8 +- packages/client-farcaster/src/environment.ts | 4 +- packages/client-farcaster/src/index.ts | 4 +- packages/client-farcaster/src/interactions.ts | 8 +- packages/client-farcaster/src/memory.ts | 4 +- packages/client-farcaster/src/post.ts | 4 +- packages/client-farcaster/src/prompts.ts | 2 +- .../__tests__/environment.test.ts | 2 +- .../client-github/__tests__/index.test.ts | 6 +- packages/client-github/src/environment.ts | 2 +- packages/client-github/src/index.ts | 8 +- packages/client-instagram/src/environment.ts | 10 +- packages/client-instagram/src/index.ts | 2 +- packages/client-instagram/src/lib/actions.ts | 4 +- packages/client-instagram/src/lib/auth.ts | 6 +- packages/client-instagram/src/lib/media.ts | 8 +- packages/client-instagram/src/lib/profile.ts | 6 +- packages/client-instagram/src/lib/state.ts | 2 +- .../src/services/interaction.ts | 12 +- .../client-instagram/src/services/post.ts | 14 +- packages/client-lens/src/actions.ts | 4 +- packages/client-lens/src/client.ts | 16 +-- packages/client-lens/src/index.ts | 2 +- packages/client-lens/src/interactions.ts | 12 +- packages/client-lens/src/memory.ts | 6 +- packages/client-lens/src/post.ts | 6 +- packages/client-lens/src/prompts.ts | 4 +- .../src/providers/StorjProvider.ts | 8 +- packages/client-lens/src/utils.ts | 2 +- .../__tests__/message-manager.test.ts | 4 +- .../__tests__/slack-client.provider.test.ts | 4 +- .../__tests__/slack-client.test.ts | 2 +- .../src/actions/chat_with_attachments.ts | 16 +-- .../src/actions/send-message.action.ts | 2 +- .../src/actions/summarize_conversation.ts | 20 +-- .../src/actions/transcribe_media.ts | 16 +-- packages/client-slack/src/attachments.ts | 14 +- packages/client-slack/src/environment.ts | 4 +- packages/client-slack/src/events.ts | 6 +- .../src/examples/standalone-attachment.ts | 2 +- .../src/examples/standalone-example.ts | 4 +- .../src/examples/standalone-summarize.ts | 2 +- .../src/examples/standalone-transcribe.ts | 2 +- packages/client-slack/src/index.ts | 4 +- packages/client-slack/src/messages.ts | 14 +- .../src/providers/channelState.ts | 2 +- .../src/providers/slack-client.provider.ts | 4 +- .../src/services/slack.service.ts | 4 +- .../client-slack/src/types/slack-types.ts | 4 +- .../client-slack/src/utils/slack-utils.ts | 2 +- .../__tests__/messageManager.test.ts | 4 +- .../__tests__/telegramClient.test.ts | 2 +- packages/client-telegram/src/environment.ts | 2 +- packages/client-telegram/src/index.ts | 2 +- .../client-telegram/src/messageManager.ts | 20 +-- .../client-telegram/src/telegramClient.ts | 4 +- packages/client-telegram/src/utils.ts | 2 +- .../client-twitter/__tests__/base.test.ts | 4 +- .../__tests__/environment.test.ts | 2 +- .../client-twitter/__tests__/post.test.ts | 4 +- packages/client-twitter/src/base.ts | 24 ++-- packages/client-twitter/src/environment.ts | 4 +- packages/client-twitter/src/index.ts | 4 +- packages/client-twitter/src/interactions.ts | 22 +-- .../src/plugins/SttTtsSpacesPlugin.ts | 6 +- packages/client-twitter/src/post.ts | 28 ++-- packages/client-twitter/src/search.ts | 12 +- packages/client-twitter/src/spaces.ts | 12 +- packages/client-twitter/src/utils.ts | 14 +- packages/core/__tests__/actions.test.ts | 2 +- packages/core/__tests__/context.test.ts | 6 +- packages/core/__tests__/database.test.ts | 14 +- packages/core/__tests__/embedding.test.ts | 2 +- packages/core/__tests__/evaluators.test.ts | 18 +-- packages/core/__tests__/goals.test.ts | 126 +++++++++--------- packages/core/__tests__/knowledge.test.ts | 4 +- packages/core/__tests__/memory.test.ts | 2 +- packages/core/__tests__/messages.test.ts | 2 +- packages/core/__tests__/posts.test.ts | 2 +- packages/core/__tests__/providers.test.ts | 8 +- packages/core/__tests__/relationships.test.ts | 2 +- packages/core/__tests__/runtime.test.ts | 8 +- packages/core/__tests__/uuid.test.ts | 2 +- .../core/__tests__/videoGeneration.test.ts | 2 +- packages/core/src/actions.ts | 2 +- packages/core/src/context.ts | 2 +- packages/core/src/database.ts | 10 +- packages/core/src/database/CircuitBreaker.ts | 4 +- packages/core/src/defaultCharacter.ts | 2 +- packages/core/src/embedding.ts | 2 +- packages/core/src/evaluators.ts | 2 +- packages/core/src/generation.ts | 32 ++--- packages/core/src/goals.ts | 8 +- packages/core/src/knowledge.ts | 8 +- packages/core/src/memory.ts | 6 +- packages/core/src/messages.ts | 10 +- packages/core/src/models.ts | 8 +- packages/core/src/parsing.ts | 2 +- packages/core/src/providers.ts | 2 +- packages/core/src/ragknowledge.ts | 8 +- packages/core/src/relationships.ts | 2 +- packages/core/src/runtime.ts | 39 +++--- packages/core/src/test_resources/constants.ts | 2 +- .../core/src/test_resources/createRuntime.ts | 6 +- packages/core/src/types.ts | 6 +- packages/core/src/uuid.ts | 4 +- packages/plugin-0g/src/actions/upload.ts | 18 +-- packages/plugin-0g/src/index.ts | 2 +- packages/plugin-3d-generation/src/index.ts | 2 +- .../src/actions/transferAction.ts | 14 +- packages/plugin-abstract/src/environment.ts | 2 +- .../src/hooks/useGetAccount.ts | 2 +- packages/plugin-abstract/src/index.ts | 2 +- .../src/utils/validateContext.ts | 2 +- packages/plugin-agentkit/src/actions.ts | 2 +- packages/plugin-agentkit/src/provider.ts | 4 +- .../src/actions/closeDeployment.ts | 4 +- .../src/actions/createCertificate.ts | 6 +- .../src/actions/createDeployment.ts | 6 +- .../plugin-akash/src/actions/estimateGas.ts | 6 +- .../src/actions/getDeploymentApi.ts | 4 +- .../src/actions/getDeploymentStatus.ts | 4 +- .../plugin-akash/src/actions/getGPUPricing.ts | 10 +- .../plugin-akash/src/actions/getManifest.ts | 6 +- .../src/actions/getProviderInfo.ts | 4 +- .../src/actions/getProvidersList.ts | 4 +- packages/plugin-akash/src/environment.ts | 4 +- packages/plugin-akash/src/error/error.ts | 6 +- packages/plugin-akash/src/index.ts | 2 +- packages/plugin-akash/src/providers/wallet.ts | 6 +- packages/plugin-akash/src/types.ts | 12 +- .../plugin-allora/src/actions/getInference.ts | 12 +- packages/plugin-allora/src/index.ts | 2 +- .../plugin-allora/src/providers/topics.ts | 10 +- .../plugin-allora/src/tests/topics.test.ts | 2 +- .../plugin-anyone/src/actions/startAnyone.ts | 4 +- .../plugin-anyone/src/actions/stopAnyone.ts | 4 +- packages/plugin-anyone/src/index.ts | 2 +- packages/plugin-aptos/src/actions/transfer.ts | 14 +- packages/plugin-aptos/src/enviroment.ts | 2 +- packages/plugin-aptos/src/index.ts | 2 +- packages/plugin-aptos/src/providers/wallet.ts | 6 +- .../plugin-arthera/src/actions/transfer.ts | 12 +- .../plugin-arthera/src/tests/transfer.test.ts | 2 +- .../plugin-arthera/src/tests/wallet.test.ts | 2 +- packages/plugin-asterai/src/environment.ts | 2 +- .../src/providers/asterai.provider.ts | 8 +- .../src/actions/launchAgent.ts | 12 +- packages/plugin-autonome/src/index.ts | 2 +- .../plugin-avail/src/actions/submitData.ts | 16 +-- packages/plugin-avail/src/actions/transfer.ts | 16 +-- packages/plugin-avail/src/environment.ts | 2 +- .../src/actions/tokenMillCreate.ts | 14 +- .../plugin-avalanche/src/actions/transfer.ts | 16 +-- .../src/actions/yakStrategy.ts | 16 +-- .../plugin-avalanche/src/actions/yakSwap.ts | 16 +-- packages/plugin-avalanche/src/environment.ts | 2 +- packages/plugin-avalanche/src/index.ts | 2 +- .../src/providers/strategies.ts | 8 +- .../plugin-avalanche/src/providers/tokens.ts | 8 +- .../plugin-avalanche/src/providers/wallet.ts | 8 +- packages/plugin-avalanche/src/types/index.ts | 2 +- .../plugin-avalanche/src/utils/constants.ts | 2 +- packages/plugin-avalanche/src/utils/index.ts | 8 +- .../plugin-avalanche/src/utils/tokenMill.ts | 6 +- packages/plugin-b2/src/actions/stake.ts | 18 +-- packages/plugin-b2/src/actions/transfer.ts | 18 +-- packages/plugin-b2/src/actions/unstake.ts | 18 +-- packages/plugin-b2/src/actions/withdraw.ts | 18 +-- packages/plugin-b2/src/environment.ts | 2 +- packages/plugin-b2/src/index.ts | 2 +- packages/plugin-b2/src/providers/index.ts | 24 ++-- packages/plugin-b2/src/tests/stake.test.ts | 2 +- packages/plugin-b2/src/tests/transfer.test.ts | 2 +- packages/plugin-b2/src/tests/unstake.test.ts | 2 +- packages/plugin-b2/src/tests/withdraw.test.ts | 2 +- packages/plugin-b2/src/utils/constants.ts | 2 +- packages/plugin-b2/src/utils/index.ts | 6 +- .../plugin-binance/src/actions/priceCheck.ts | 10 +- .../plugin-binance/src/actions/spotBalance.ts | 12 +- .../plugin-binance/src/actions/spotTrade.ts | 12 +- packages/plugin-binance/src/environment.ts | 2 +- packages/plugin-binance/src/index.ts | 2 +- .../plugin-binance/src/services/account.ts | 8 +- packages/plugin-binance/src/services/base.ts | 2 +- packages/plugin-binance/src/services/index.ts | 2 +- packages/plugin-binance/src/services/price.ts | 6 +- packages/plugin-binance/src/services/trade.ts | 8 +- .../plugin-binance/src/types/api/trade.ts | 2 +- .../src/actions/test-all-endpoints.ts | 4 +- .../src/actions/token-search-address.ts | 14 +- .../src/actions/token-search-symbol.ts | 12 +- .../src/actions/wallet-search-address.ts | 14 +- packages/plugin-birdeye/src/birdeye.ts | 16 +-- packages/plugin-birdeye/src/index.ts | 2 +- .../src/providers/agent-portfolio-provider.ts | 2 +- .../plugin-birdeye/src/tests/birdeye.test.ts | 4 +- .../plugin-birdeye/src/types/api/common.ts | 12 +- packages/plugin-birdeye/src/types/api/defi.ts | 2 +- packages/plugin-birdeye/src/types/api/pair.ts | 2 +- .../plugin-birdeye/src/types/api/search.ts | 2 +- .../plugin-birdeye/src/types/api/token.ts | 2 +- packages/plugin-birdeye/src/types/shared.ts | 2 +- packages/plugin-birdeye/src/utils.ts | 14 +- .../plugin-bootstrap/src/actions/continue.ts | 14 +- .../src/actions/followRoom.ts | 10 +- .../plugin-bootstrap/src/actions/ignore.ts | 4 +- .../plugin-bootstrap/src/actions/muteRoom.ts | 10 +- packages/plugin-bootstrap/src/actions/none.ts | 4 +- .../src/actions/unfollowRoom.ts | 10 +- .../src/actions/unmuteRoom.ts | 10 +- .../plugin-bootstrap/src/evaluators/fact.ts | 8 +- .../plugin-bootstrap/src/evaluators/goal.ts | 8 +- packages/plugin-bootstrap/src/index.ts | 2 +- .../plugin-bootstrap/src/providers/boredom.ts | 2 +- .../plugin-bootstrap/src/providers/facts.ts | 2 +- .../plugin-bootstrap/src/providers/time.ts | 2 +- .../__tests__/commerce.test.ts | 2 +- .../advanced-sdk-ts/src/rest/accounts.ts | 4 +- .../advanced-sdk-ts/src/rest/converts.ts | 4 +- .../advanced-sdk-ts/src/rest/dataAPI.ts | 4 +- .../advanced-sdk-ts/src/rest/errors.ts | 2 +- .../advanced-sdk-ts/src/rest/fees.ts | 4 +- .../advanced-sdk-ts/src/rest/futures.ts | 4 +- .../advanced-sdk-ts/src/rest/orders.ts | 4 +- .../advanced-sdk-ts/src/rest/payments.ts | 4 +- .../advanced-sdk-ts/src/rest/perpetuals.ts | 4 +- .../advanced-sdk-ts/src/rest/portfolios.ts | 4 +- .../advanced-sdk-ts/src/rest/products.ts | 4 +- .../advanced-sdk-ts/src/rest/public.ts | 4 +- .../advanced-sdk-ts/src/rest/rest-base.ts | 4 +- .../src/rest/types/accounts-types.ts | 2 +- .../src/rest/types/converts-types.ts | 2 +- .../src/rest/types/dataAPI-types.ts | 2 +- .../src/rest/types/fees-types.ts | 2 +- .../src/rest/types/futures-types.ts | 2 +- .../src/rest/types/orders-types.ts | 2 +- .../src/rest/types/payments-types.ts | 2 +- .../src/rest/types/perpetuals-types.ts | 2 +- .../src/rest/types/portfolios-types.ts | 2 +- .../src/rest/types/products-types.ts | 2 +- .../src/rest/types/public-types.ts | 2 +- .../src/plugins/advancedTrade.ts | 20 +-- .../plugin-coinbase/src/plugins/commerce.ts | 6 +- .../src/plugins/massPayments.ts | 22 +-- .../src/plugins/tokenContract.ts | 14 +- packages/plugin-coinbase/src/plugins/trade.ts | 20 +-- .../plugin-coinbase/src/plugins/webhooks.ts | 16 +-- packages/plugin-coinbase/src/types.ts | 4 +- packages/plugin-coinbase/src/utils.ts | 16 +-- .../src/actions/getMarkets.ts | 12 +- .../plugin-coingecko/src/actions/getPrice.ts | 12 +- .../src/actions/getPricePerAddress.ts | 12 +- .../src/actions/getTopGainersLosers.ts | 12 +- .../src/actions/getTrending.ts | 12 +- packages/plugin-coingecko/src/environment.ts | 2 +- packages/plugin-coingecko/src/index.ts | 2 +- .../src/providers/categoriesProvider.ts | 2 +- .../src/providers/coinsProvider.ts | 10 +- .../src/actions/getPrice/examples.ts | 2 +- .../src/actions/getPrice/index.ts | 10 +- .../src/actions/getPrice/service.ts | 2 +- .../src/actions/getPrice/types.ts | 2 +- .../src/actions/getPrice/validation.ts | 2 +- .../plugin-coinmarketcap/src/environment.ts | 2 +- packages/plugin-coinmarketcap/src/index.ts | 2 +- packages/plugin-coinmarketcap/src/types.ts | 2 +- .../src/actions/bridgeTransfer.ts | 2 +- .../plugin-conflux/src/actions/confiPump.ts | 14 +- .../plugin-conflux/src/actions/transfer.ts | 2 +- packages/plugin-conflux/src/index.ts | 2 +- .../src/actions/transfer/index.ts | 8 +- .../src/actions/transfer/types.ts | 4 +- packages/plugin-cosmos/src/index.ts | 2 +- .../src/providers/wallet/index.ts | 4 +- .../src/providers/wallet/utils.ts | 2 +- .../cosmos-transaction-fee-estimator.test.ts | 4 +- .../cosmos-transfer-action-service.test.ts | 2 +- .../tests/cosmos-wallet-chains-data.test.ts | 4 +- .../src/actions/transferAction.ts | 14 +- packages/plugin-cronoszkevm/src/enviroment.ts | 2 +- .../src/hooks/useGetAccount.ts | 2 +- packages/plugin-cronoszkevm/src/index.ts | 2 +- .../src/utils/validateContext.ts | 2 +- .../plugin-depin/src/actions/depinProjects.ts | 10 +- .../plugin-depin/src/actions/sentientai.ts | 2 +- .../plugin-depin/src/providers/depinData.ts | 6 +- .../src/actions/tokenAction.ts | 2 +- .../src/actions/trendsAction.ts | 10 +- .../src/evaluators/tokenEvaluator.ts | 2 +- packages/plugin-dexscreener/src/index.ts | 2 +- .../src/providers/tokenProvider.ts | 12 +- .../src/echoChamberClient.ts | 4 +- .../plugin-echochambers/src/environment.ts | 2 +- packages/plugin-echochambers/src/index.ts | 4 +- .../plugin-echochambers/src/interactions.ts | 12 +- packages/plugin-evm/src/actions/bridge.ts | 4 +- .../plugin-evm/src/actions/gov-execute.ts | 10 +- .../plugin-evm/src/actions/gov-propose.ts | 10 +- packages/plugin-evm/src/actions/gov-queue.ts | 10 +- packages/plugin-evm/src/actions/gov-vote.ts | 8 +- packages/plugin-evm/src/actions/swap.ts | 4 +- packages/plugin-evm/src/actions/transfer.ts | 14 +- packages/plugin-evm/src/providers/wallet.ts | 2 +- packages/plugin-evm/src/tests/gov.test.ts | 14 +- .../plugin-evm/src/tests/transfer.test.ts | 2 +- packages/plugin-evm/src/tests/wallet.test.ts | 2 +- packages/plugin-flow/src/actions/transfer.ts | 6 +- packages/plugin-flow/src/environment.ts | 2 +- .../src/providers/connector.provider.ts | 10 +- .../src/providers/utils/flow.connector.ts | 2 +- .../src/providers/wallet.provider.ts | 10 +- packages/plugin-flow/src/queries.ts | 8 +- packages/plugin-flow/src/types/fcl.d.ts | 4 +- packages/plugin-flow/src/types/index.ts | 2 +- packages/plugin-fuel/src/actions/transfer.ts | 8 +- packages/plugin-fuel/src/index.ts | 2 +- packages/plugin-fuel/src/providers/wallet.ts | 2 +- .../src/actions/deployContract.ts | 12 +- .../src/actions/getContractSchema.ts | 8 +- .../src/actions/getCurrentNonce.ts | 8 +- .../src/actions/getTransaction.ts | 12 +- .../src/actions/readContract.ts | 4 +- .../src/actions/waitForTransactionReceipt.ts | 10 +- .../src/actions/writeContract.ts | 12 +- packages/plugin-genlayer/src/index.ts | 2 +- .../plugin-genlayer/src/providers/client.ts | 6 +- packages/plugin-genlayer/src/types/index.ts | 2 +- packages/plugin-genlayer/src/utils/llm.ts | 8 +- packages/plugin-giphy/src/actions/sendGif.ts | 12 +- packages/plugin-giphy/src/environment.ts | 2 +- packages/plugin-giphy/src/index.ts | 2 +- packages/plugin-gitbook/src/index.ts | 2 +- .../plugin-gitbook/src/providers/gitbook.ts | 10 +- .../src/actions/getScore.ts | 10 +- packages/plugin-goat/src/actions.ts | 2 +- packages/plugin-goat/src/wallet.ts | 2 +- packages/plugin-goplus/src/index.ts | 2 +- .../src/services/GoplusSecurityService.ts | 4 +- .../src/actions/cancelOrders.ts | 12 +- .../src/actions/priceCheck.ts | 12 +- .../src/actions/spotTrade.ts | 12 +- packages/plugin-hyperliquid/src/index.ts | 2 +- .../plugin-icp/src/actions/createToken.ts | 14 +- packages/plugin-icp/src/apis/uploadFile.ts | 2 +- packages/plugin-icp/src/index.ts | 2 +- packages/plugin-icp/src/providers/wallet.ts | 12 +- .../src/environment.ts | 2 +- packages/plugin-image-generation/src/index.ts | 12 +- .../src/modules/Ibc.ts | 8 +- .../src/modules/auction.ts | 6 +- .../src/modules/auth.ts | 4 +- .../src/modules/authz.ts | 6 +- .../src/modules/bank.ts | 6 +- .../src/modules/distribution.ts | 6 +- .../src/modules/exchange.ts | 10 +- .../src/modules/explorer.ts | 6 +- .../src/modules/gov.ts | 8 +- .../src/modules/index.ts | 2 +- .../src/modules/insurance.ts | 8 +- .../src/modules/mint.ts | 4 +- .../src/modules/mito.ts | 4 +- .../src/modules/oracle.ts | 4 +- .../src/modules/peggy.ts | 8 +- .../src/modules/permissions.ts | 6 +- .../src/modules/staking.ts | 6 +- .../src/modules/token-factory.ts | 6 +- .../src/modules/wasm.ts | 6 +- .../src/modules/wasmx.ts | 4 +- .../injective-sdk-client-ts/src/types/auth.ts | 4 +- .../injective-sdk-client-ts/src/types/bank.ts | 6 +- .../injective-sdk-client-ts/src/types/base.ts | 2 +- .../src/types/distribution.ts | 2 +- .../src/types/exchange.ts | 18 +-- .../src/types/explorer.ts | 6 +- .../injective-sdk-client-ts/src/types/gov.ts | 6 +- .../injective-sdk-client-ts/src/types/ibc.ts | 6 +- .../src/types/insurance.ts | 4 +- .../injective-sdk-client-ts/src/types/mint.ts | 2 +- .../injective-sdk-client-ts/src/types/mito.ts | 4 +- .../src/types/permissions.ts | 4 +- .../src/types/staking.ts | 4 +- .../src/types/token-factory.ts | 4 +- .../injective-sdk-client-ts/src/types/wasm.ts | 8 +- packages/plugin-injective/src/action/base.ts | 10 +- packages/plugin-injective/src/index.ts | 2 +- packages/plugin-intiface/src/environment.ts | 2 +- .../plugin-intiface/test/fake-buttplug.ts | 6 +- packages/plugin-intiface/test/simulate.ts | 2 +- .../src/functions/bringIQData.ts | 4 +- packages/plugin-iq6900/src/index.ts | 2 +- packages/plugin-irys/src/index.ts | 2 +- .../plugin-irys/src/services/irysService.ts | 16 +-- .../src/actions/transfer.ts | 14 +- .../plugin-lensNetwork/src/environment.ts | 2 +- packages/plugin-lensNetwork/src/index.ts | 2 +- packages/plugin-letzai/src/environment.ts | 2 +- packages/plugin-letzai/src/index.ts | 4 +- packages/plugin-massa/src/actions/transfer.ts | 12 +- packages/plugin-massa/src/utils/mns.ts | 2 +- .../plugin-movement/src/actions/transfer.ts | 12 +- packages/plugin-movement/src/environment.ts | 2 +- packages/plugin-movement/src/index.ts | 2 +- .../plugin-movement/src/providers/wallet.ts | 4 +- .../src/actions/createToken.ts | 12 +- .../plugin-multiversx/src/actions/transfer.ts | 12 +- packages/plugin-multiversx/src/enviroment.ts | 2 +- packages/plugin-multiversx/src/index.ts | 2 +- .../plugin-multiversx/src/providers/wallet.ts | 2 +- packages/plugin-near/src/actions/swap.ts | 12 +- packages/plugin-near/src/actions/transfer.ts | 14 +- packages/plugin-near/src/environment.ts | 4 +- packages/plugin-near/src/index.ts | 2 +- packages/plugin-near/src/providers/wallet.ts | 14 +- .../src/__tests__/reservoir.test.ts | 2 +- .../src/actions/get-collections.ts | 6 +- .../src/actions/list-nft.ts | 8 +- .../src/actions/sweep-floor.ts | 8 +- .../src/evaluators/nft-knowledge.ts | 4 +- packages/plugin-nft-collections/src/index.ts | 2 +- .../src/providers/nft-collections.ts | 8 +- .../src/services/cache-manager.ts | 2 +- .../src/services/market-intelligence.ts | 6 +- .../src/services/rate-limiter.ts | 6 +- .../src/services/reservoir.ts | 12 +- .../src/services/social-analytics.ts | 6 +- .../src/templates/floor-sweep.ts | 2 +- .../src/templates/market-stats.ts | 2 +- .../src/templates/nft-listing.ts | 2 +- .../src/templates/social-analytics.ts | 2 +- .../src/tests/actions.test.ts | 4 +- .../src/tests/providers.test.ts | 4 +- .../src/tests/services.test.ts | 2 +- packages/plugin-nft-collections/src/types.ts | 2 +- .../src/utils/error-handler.ts | 4 +- .../src/utils/performance.ts | 8 +- .../src/utils/response-enhancer.ts | 4 +- .../src/actions/mintNFTAction.ts | 12 +- .../src/actions/nftCollectionGeneration.ts | 10 +- packages/plugin-nft-generation/src/api.ts | 2 +- .../src/handlers/createNFT.ts | 6 +- .../src/handlers/createSolanaCollection.ts | 6 +- .../src/handlers/verifyNFT.ts | 2 +- packages/plugin-nft-generation/src/index.ts | 4 +- .../src/provider/wallet/walletSolana.ts | 6 +- packages/plugin-nft-generation/src/types.ts | 2 +- .../plugin-node/src/actions/describe-image.ts | 14 +- packages/plugin-node/src/environment.ts | 2 +- packages/plugin-node/src/index.ts | 2 +- .../plugin-node/src/services/audioUtils.ts | 4 +- packages/plugin-node/src/services/awsS3.ts | 20 +-- packages/plugin-node/src/services/browser.ts | 6 +- packages/plugin-node/src/services/image.ts | 14 +- packages/plugin-node/src/services/llama.ts | 30 ++--- packages/plugin-node/src/services/pdf.ts | 8 +- packages/plugin-node/src/services/speech.ts | 12 +- .../plugin-node/src/services/transcription.ts | 10 +- packages/plugin-node/src/services/video.ts | 10 +- .../plugin-obsidian/src/actions/activeNote.ts | 12 +- .../src/actions/createKnowledge.ts | 10 +- packages/plugin-obsidian/src/actions/file.ts | 10 +- .../plugin-obsidian/src/actions/listNotes.ts | 10 +- packages/plugin-obsidian/src/actions/note.ts | 12 +- .../src/actions/noteTraversal.ts | 12 +- .../plugin-obsidian/src/actions/openFile.ts | 10 +- .../plugin-obsidian/src/actions/saveFile.ts | 10 +- .../plugin-obsidian/src/actions/search.ts | 10 +- .../plugin-obsidian/src/actions/updateFile.ts | 10 +- packages/plugin-obsidian/src/actions/vault.ts | 10 +- .../src/actions/vaultDirectory.ts | 10 +- packages/plugin-obsidian/src/enviroment.ts | 2 +- packages/plugin-obsidian/src/helper.ts | 6 +- .../src/providers/obsidianClient.ts | 20 +-- .../src/tests/obsidianClient.test.ts | 4 +- packages/plugin-opacity/src/index.ts | 6 +- .../src/actions/getCurrentWeather.ts | 12 +- .../plugin-open-weather/src/environment.ts | 2 +- packages/plugin-open-weather/src/examples.ts | 2 +- packages/plugin-open-weather/src/index.ts | 2 +- packages/plugin-open-weather/src/services.ts | 2 +- .../src/actions/postTweetAction.ts | 8 +- .../src/adapter/primusAdapter.ts | 10 +- packages/plugin-primus/src/index.ts | 2 +- .../src/providers/tokenPriceProvider.ts | 2 +- .../src/providers/tweetProvider.ts | 2 +- packages/plugin-primus/src/util/primusUtil.ts | 2 +- packages/plugin-quai/src/actions/transfer.ts | 12 +- packages/plugin-quai/src/index.ts | 2 +- packages/plugin-quai/src/utils/index.ts | 2 +- .../src/actions/analyzeTrade.ts | 2 +- .../plugin-rabbi-trader/src/dexscreener.ts | 2 +- .../src/evaluators/trust.ts | 2 +- packages/plugin-rabbi-trader/src/index.ts | 4 +- .../src/providers/token.ts | 2 +- .../src/providers/trustScoreProvider.ts | 2 +- .../src/services/twitter.ts | 2 +- packages/plugin-rabbi-trader/src/swap.ts | 4 +- packages/plugin-rabbi-trader/src/utils.ts | 2 +- packages/plugin-rabbi-trader/src/wallet.ts | 2 +- packages/plugin-sgx/src/plugins/sgxPlugin.ts | 2 +- .../src/providers/sgxAttestationProvider.ts | 4 +- .../src/actions/createToken.ts | 12 +- packages/plugin-solana-agentkit/src/index.ts | 2 +- packages/plugin-solana/src/actions/fomo.ts | 16 +-- packages/plugin-solana/src/actions/pumpfun.ts | 16 +-- packages/plugin-solana/src/actions/swap.ts | 12 +- packages/plugin-solana/src/actions/swapDao.ts | 8 +- .../plugin-solana/src/actions/swapUtils.ts | 10 +- .../plugin-solana/src/actions/takeOrder.ts | 8 +- .../plugin-solana/src/actions/transfer.ts | 12 +- packages/plugin-solana/src/environment.ts | 2 +- .../plugin-solana/src/evaluators/trust.ts | 10 +- packages/plugin-solana/src/index.ts | 2 +- packages/plugin-solana/src/keypairUtils.ts | 4 +- .../plugin-solana/src/providers/orderBook.ts | 2 +- .../src/providers/simulationSellingService.ts | 8 +- packages/plugin-solana/src/providers/token.ts | 18 +-- .../plugin-solana/src/providers/tokenUtils.ts | 2 +- .../src/providers/trustScoreProvider.ts | 26 ++-- .../plugin-solana/src/providers/wallet.ts | 8 +- .../plugin-spheron/src/actions/deployment.ts | 14 +- packages/plugin-spheron/src/actions/escrow.ts | 14 +- packages/plugin-spheron/src/environment.ts | 2 +- packages/plugin-spheron/src/index.ts | 2 +- .../src/providers/deployment.ts | 8 +- .../plugin-spheron/src/providers/tokens.ts | 8 +- packages/plugin-spheron/src/types/index.ts | 2 +- packages/plugin-spheron/src/utils/index.ts | 6 +- packages/plugin-spheron/src/utils/template.ts | 2 +- .../src/actions/xChainSwap.ts | 8 +- .../plugin-squid-router/src/helpers/utils.ts | 4 +- .../src/providers/squidRouter.ts | 8 +- .../src/tests/router.test.ts | 2 +- .../plugin-squid-router/src/types/index.ts | 2 +- .../src/actions/getCollectionStats.ts | 10 +- .../src/actions/getLatestNFT.ts | 10 +- .../src/actions/getTokenSales.ts | 12 +- packages/plugin-stargaze/src/environment.ts | 2 +- packages/plugin-stargaze/src/index.ts | 2 +- .../plugin-starknet/src/actions/subdomain.ts | 12 +- packages/plugin-starknet/src/actions/swap.ts | 14 +- .../plugin-starknet/src/actions/takeOrder.ts | 10 +- .../plugin-starknet/src/actions/transfer.ts | 12 +- .../plugin-starknet/src/actions/unruggable.ts | 12 +- packages/plugin-starknet/src/environment.ts | 2 +- packages/plugin-starknet/src/index.ts | 2 +- .../src/providers/portfolioProvider.ts | 10 +- .../plugin-starknet/src/providers/token.ts | 12 +- .../src/providers/trustScoreProvider.ts | 22 +-- .../plugin-starknet/src/providers/utils.ts | 2 +- packages/plugin-starknet/src/types/trustDB.ts | 2 +- .../plugin-starknet/src/utils/ERC20Token.ts | 6 +- packages/plugin-starknet/src/utils/index.ts | 4 +- .../plugin-starknet/src/utils/starknetId.ts | 2 +- .../plugin-story/src/actions/attachTerms.ts | 12 +- .../src/actions/getAvailableLicenses.ts | 12 +- .../plugin-story/src/actions/getIPDetails.ts | 12 +- .../plugin-story/src/actions/licenseIP.ts | 12 +- .../plugin-story/src/actions/registerIP.ts | 12 +- .../src/functions/uploadJSONToIPFS.ts | 2 +- packages/plugin-story/src/index.ts | 2 +- packages/plugin-story/src/lib/api.ts | 10 +- packages/plugin-story/src/lib/utils.ts | 2 +- packages/plugin-story/src/providers/wallet.ts | 8 +- packages/plugin-story/src/queries.ts | 2 +- packages/plugin-story/src/types/api.ts | 2 +- packages/plugin-sui/src/actions/transfer.ts | 12 +- packages/plugin-sui/src/enviroment.ts | 2 +- packages/plugin-sui/src/index.ts | 2 +- packages/plugin-sui/src/providers/wallet.ts | 4 +- packages/plugin-sui/src/utils.ts | 2 +- .../plugin-tee-log/src/adapters/sqliteDAO.ts | 4 +- .../src/plugins/teeLogPlugin.ts | 2 +- .../src/services/teeLogManager.ts | 4 +- .../src/services/teeLogService.ts | 8 +- packages/plugin-tee-marlin/src/index.ts | 2 +- .../src/adapters/sqliteVerifiableDAO.ts | 10 +- .../plugin-tee-verifiable-log/src/index.ts | 6 +- .../src/providers/verifiableLogProvider.ts | 8 +- .../src/test/providers.test.ts | 2 +- .../src/actions/remoteAttestation.ts | 4 +- packages/plugin-tee/src/index.ts | 2 +- .../src/providers/deriveKeyProvider.ts | 14 +- .../providers/remoteAttestationProvider.ts | 12 +- .../src/providers/walletProvider.ts | 12 +- packages/plugin-thirdweb/src/actions/chat.ts | 8 +- packages/plugin-thirdweb/src/index.ts | 2 +- packages/plugin-ton/src/actions/transfer.ts | 6 +- packages/plugin-ton/src/enviroment.ts | 2 +- packages/plugin-ton/src/index.ts | 2 +- packages/plugin-ton/src/providers/wallet.ts | 6 +- packages/plugin-ton/src/tests/wallet.test.ts | 2 +- .../src/adapters/trustScoreDatabase.ts | 2 +- packages/plugin-tts/src/index.ts | 2 +- .../plugin-twitter/__tests__/post.test.ts | 4 +- packages/plugin-twitter/src/actions/post.ts | 8 +- packages/plugin-twitter/src/index.ts | 2 +- packages/plugin-video-generation/src/index.ts | 2 +- .../src/actions/webSearch.ts | 14 +- packages/plugin-web-search/src/index.ts | 2 +- .../src/services/webSearchService.ts | 4 +- packages/plugin-web-search/src/types.ts | 2 +- packages/plugin-whatsapp/src/client.ts | 4 +- .../src/handlers/message.handler.ts | 4 +- .../src/handlers/webhook.handler.ts | 4 +- packages/plugin-whatsapp/src/index.ts | 4 +- .../plugin-whatsapp/src/utils/validators.ts | 2 +- .../src/actions/transferAction.ts | 14 +- packages/plugin-zksync-era/src/enviroment.ts | 2 +- .../src/hooks/useGetAccount.ts | 2 +- packages/plugin-zksync-era/src/index.ts | 2 +- .../src/utils/validateContext.ts | 2 +- .../src/AIService/AIService.ts | 4 +- .../generators/FullDocumentationGenerator.ts | 8 +- .../src/AIService/types/index.ts | 2 +- .../src/AIService/utils/CodeFormatter.ts | 4 +- .../src/AIService/utils/DocumentOrganizer.ts | 4 +- scripts/jsdoc-automation/src/Configuration.ts | 16 +-- .../src/DirectoryTraversal.ts | 2 +- .../src/DocumentationGenerator.ts | 20 +-- scripts/jsdoc-automation/src/GitManager.ts | 2 +- .../jsdoc-automation/src/JSDocValidator.ts | 4 +- scripts/jsdoc-automation/src/JsDocAnalyzer.ts | 8 +- .../jsdoc-automation/src/JsDocGenerator.ts | 4 +- .../src/PluginDocumentationGenerator.ts | 8 +- .../jsdoc-automation/src/TypeScriptParser.ts | 4 +- scripts/jsdoc-automation/src/types/index.ts | 2 +- scripts/jsdoc-automation/src/utils/prompts.ts | 2 +- 682 files changed, 2351 insertions(+), 2358 deletions(-) diff --git a/agent/src/__tests__/client-type-identification.test.ts b/agent/src/__tests__/client-type-identification.test.ts index 07424d07dd5..831d25433a3 100644 --- a/agent/src/__tests__/client-type-identification.test.ts +++ b/agent/src/__tests__/client-type-identification.test.ts @@ -1,4 +1,4 @@ -import { Client, IAgentRuntime } from "@elizaos/core"; +import type { Client, IAgentRuntime } from "@elizaos/core"; import { describe, it, expect } from "@jest/globals"; // Helper function to identify client types diff --git a/agent/src/index.ts b/agent/src/index.ts index 3c4fd00d8f3..4b29dd7a38d 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -19,17 +19,17 @@ import { AgentRuntime, CacheManager, CacheStore, - Character, - Client, + type Character, + type Client, Clients, DbCacheAdapter, defaultCharacter, elizaLogger, FsCacheAdapter, - IAgentRuntime, - ICacheManager, - IDatabaseAdapter, - IDatabaseCacheAdapter, + type IAgentRuntime, + type ICacheManager, + type IDatabaseAdapter, + type IDatabaseCacheAdapter, ModelProviderName, parseBooleanFromText, settings, @@ -115,7 +115,7 @@ import yargs from "yargs"; const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file const __dirname = path.dirname(__filename); // get the name of the directory -export const wait = (minTime: number = 1000, maxTime: number = 3000) => { +export const wait = (minTime = 1000, maxTime = 3000) => { const waitTime = Math.floor(Math.random() * (maxTime - minTime + 1)) + minTime; return new Promise((resolve) => setTimeout(resolve, waitTime)); @@ -299,7 +299,7 @@ async function loadCharacter(filePath: string): Promise { if (!content) { throw new Error(`Character file not found: ${filePath}`); } - let character = JSON.parse(content); + const character = JSON.parse(content); return jsonToCharacter(filePath, character); } @@ -310,7 +310,7 @@ function commaSeparatedStringToArray(commaSeparated: string): string[] { export async function loadCharacters( charactersArg: string ): Promise { - let characterPaths = commaSeparatedStringToArray(charactersArg); + const characterPaths = commaSeparatedStringToArray(charactersArg); const loadedCharacters: Character[] = []; if (characterPaths?.length > 0) { @@ -384,7 +384,7 @@ export async function loadCharacters( if (hasValidRemoteUrls()) { elizaLogger.info("Loading characters from remote URLs"); - let characterUrls = commaSeparatedStringToArray( + const characterUrls = commaSeparatedStringToArray( process.env.REMOTE_CHARACTER_URLS ); for (const characterUrl of characterUrls) { @@ -1186,9 +1186,9 @@ const hasValidRemoteUrls = () => const startAgents = async () => { const directClient = new DirectClient(); - let serverPort = parseInt(settings.SERVER_PORT || "3000"); + let serverPort = Number.parseInt(settings.SERVER_PORT || "3000"); const args = parseArguments(); - let charactersArg = args.characters || args.character; + const charactersArg = args.characters || args.character; let characters = [defaultCharacter]; if (process.env.IQ_WALLET_ADDRESS && process.env.IQSOlRPC) { @@ -1226,7 +1226,7 @@ const startAgents = async () => { directClient.start(serverPort); - if (serverPort !== parseInt(settings.SERVER_PORT || "3000")) { + if (serverPort !== Number.parseInt(settings.SERVER_PORT || "3000")) { elizaLogger.log(`Server started on alternate port ${serverPort}`); } @@ -1246,12 +1246,12 @@ if ( parseBooleanFromText(process.env.PREVENT_UNHANDLED_EXIT) ) { // Handle uncaught exceptions to prevent the process from crashing - process.on("uncaughtException", function (err) { + process.on("uncaughtException", (err) => { console.error("uncaughtException", err); }); // Handle unhandled rejections to prevent the process from crashing - process.on("unhandledRejection", function (err) { + process.on("unhandledRejection", (err) => { console.error("unhandledRejection", err); }); } diff --git a/biome.json b/biome.json index d50b7025544..d84744d33b7 100644 --- a/biome.json +++ b/biome.json @@ -8,70 +8,70 @@ "rules": { "recommended": true, "suspicious": { - "noExplicitAny": "off", - "noArrayIndexKey": "off", - "noPrototypeBuiltins": "off", - "noDuplicateObjectKeys": "off", - "noGlobalIsNan": "off", - "noDuplicateFontNames": "off", - "noSelfCompare": "off", - "noDoubleEquals": "off", - "noImplicitAnyLet": "off", - "noAssignInExpressions": "off", - "noExportsInTest": "off", - "noConstEnum": "off", - "noEmptyInterface": "off" + "noExplicitAny": "warn", + "noArrayIndexKey": "warn", + "noPrototypeBuiltins": "warn", + "noDuplicateObjectKeys": "warn", + "noGlobalIsNan": "warn", + "noDuplicateFontNames": "warn", + "noSelfCompare": "warn", + "noDoubleEquals": "warn", + "noImplicitAnyLet": "warn", + "noAssignInExpressions": "warn", + "noExportsInTest": "warn", + "noConstEnum": "warn", + "noEmptyInterface": "warn" }, "correctness": { - "noUnusedVariables": "off", - "noUnreachable": "off", - "useExhaustiveDependencies": "off", - "noSwitchDeclarations": "off", - "noUnnecessaryContinue": "off", - "noInnerDeclarations": "off" + "noUnusedVariables": "warn", + "noUnreachable": "warn", + "useExhaustiveDependencies": "warn", + "noSwitchDeclarations": "warn", + "noUnnecessaryContinue": "warn", + "noInnerDeclarations": "warn" }, "style": { - "useConst": "off", - "useTemplate": "off", - "useImportType": "off", - "useNodejsImportProtocol": "off", - "noUselessElse": "off", - "useSelfClosingElements": "off", - "useNumberNamespace": "off", - "noUnusedTemplateLiteral": "off", - "noInferrableTypes": "off", - "noNonNullAssertion": "off", - "noParameterAssign": "off", - "useDefaultParameterLast": "off", - "useExponentiationOperator": "off", - "noVar": "off", - "useSingleVarDeclarator": "off", - "useExportType": "off" + "useConst": "warn", + "useTemplate": "warn", + "useImportType": "warn", + "useNodejsImportProtocol": "warn", + "noUselessElse": "warn", + "useSelfClosingElements": "warn", + "useNumberNamespace": "warn", + "noUnusedTemplateLiteral": "warn", + "noInferrableTypes": "warn", + "noNonNullAssertion": "warn", + "noParameterAssign": "warn", + "useDefaultParameterLast": "warn", + "useExponentiationOperator": "warn", + "noVar": "warn", + "useSingleVarDeclarator": "warn", + "useExportType": "warn" }, "a11y": { - "useAltText": "off", - "useFocusableInteractive": "off", - "useMediaCaption": "off", - "noSvgWithoutTitle": "off", - "useKeyWithClickEvents": "off" + "useAltText": "warn", + "useFocusableInteractive": "warn", + "useMediaCaption": "warn", + "noSvgWithoutTitle": "warn", + "useKeyWithClickEvents": "warn" }, "complexity": { - "noForEach": "off", - "useOptionalChain": "off", - "useArrowFunction": "off", - "useFlatMap": "off", - "useLiteralKeys": "off", - "noBannedTypes": "off", - "noStaticOnlyClass": "off", - "noThisInStatic": "off", - "noUselessConstructor": "off", - "noUselessTernary": "off", - "noUselessSwitchCase": "off", - "noUselessCatch": "off" + "noForEach": "warn", + "useOptionalChain": "warn", + "useArrowFunction": "warn", + "useFlatMap": "warn", + "useLiteralKeys": "warn", + "noBannedTypes": "warn", + "noStaticOnlyClass": "warn", + "noThisInStatic": "warn", + "noUselessConstructor": "warn", + "noUselessTernary": "warn", + "noUselessSwitchCase": "warn", + "noUselessCatch": "warn" }, "performance": { - "noDelete": "off", - "noAccumulatingSpread": "off" + "noDelete": "warn", + "noAccumulatingSpread": "warn" } }, "ignore": ["**/dist/**", "**/node_modules/**", "**/coverage/**", "**/*.json"] diff --git a/client/src/App.tsx b/client/src/App.tsx index e7c13846c4f..a0ab33c5cd6 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -13,7 +13,7 @@ import useVersion from "./hooks/use-version"; const queryClient = new QueryClient({ defaultOptions: { queries: { - staleTime: Infinity, + staleTime: Number.POSITIVE_INFINITY, }, }, }); diff --git a/client/src/components/app-sidebar.tsx b/client/src/components/app-sidebar.tsx index 1f7f949ca72..9edfce84d2d 100644 --- a/client/src/components/app-sidebar.tsx +++ b/client/src/components/app-sidebar.tsx @@ -15,7 +15,7 @@ import { } from "@/components/ui/sidebar"; import { apiClient } from "@/lib/api"; import { NavLink, useLocation } from "react-router"; -import { type UUID } from "@elizaos/core"; +import type { UUID } from "@elizaos/core"; import { Book, Cog, User } from "lucide-react"; import ConnectionStatus from "./connection-status"; diff --git a/client/src/components/audio-recorder.tsx b/client/src/components/audio-recorder.tsx index 4cfc7558d56..673dc5dc30b 100644 --- a/client/src/components/audio-recorder.tsx +++ b/client/src/components/audio-recorder.tsx @@ -9,7 +9,7 @@ import { Ellipsis, Mic, Send, Trash } from "lucide-react"; import { cn } from "@/lib/utils"; import { useToast } from "@/hooks/use-toast"; import { useMutation } from "@tanstack/react-query"; -import { UUID } from "@elizaos/core"; +import type { UUID } from "@elizaos/core"; import { apiClient } from "@/lib/api"; type Props = { diff --git a/client/src/components/chat.tsx b/client/src/components/chat.tsx index 8173e99da55..9dac3ecf9cd 100644 --- a/client/src/components/chat.tsx +++ b/client/src/components/chat.tsx @@ -9,7 +9,7 @@ import { ChatMessageList } from "@/components/ui/chat/chat-message-list"; import { useTransition, animated } from "@react-spring/web"; import { Paperclip, Send, X } from "lucide-react"; import { useEffect, useRef, useState } from "react"; -import { Content, UUID } from "@elizaos/core"; +import type { Content, UUID } from "@elizaos/core"; import { useMutation, useQueryClient } from "@tanstack/react-query"; import { apiClient } from "@/lib/api"; import { cn, moment } from "@/lib/utils"; @@ -19,7 +19,7 @@ import ChatTtsButton from "./ui/chat/chat-tts-button"; import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip"; import { useToast } from "@/hooks/use-toast"; import AIWriter from "react-aiwriter"; -import { IAttachment } from "@/types"; +import type { IAttachment } from "@/types"; import { AudioRecorder } from "./audio-recorder"; import { Badge } from "./ui/badge"; diff --git a/client/src/components/overview.tsx b/client/src/components/overview.tsx index 8f544ca42d1..68b77baec22 100644 --- a/client/src/components/overview.tsx +++ b/client/src/components/overview.tsx @@ -1,4 +1,4 @@ -import { Character } from "@elizaos/core"; +import type { Character } from "@elizaos/core"; import ArrayInput from "@/components/array-input"; import InputCopy from "@/components/input-copy"; import PageTitle from "./page-title"; diff --git a/client/src/components/ui/badge.tsx b/client/src/components/ui/badge.tsx index d9a4dd51bdb..5cb108e8ecf 100644 --- a/client/src/components/ui/badge.tsx +++ b/client/src/components/ui/badge.tsx @@ -1,4 +1,4 @@ -import * as React from "react" +import type * as React from "react" import { cva, type VariantProps } from "class-variance-authority" import { cn } from "@/lib/utils" diff --git a/client/src/components/ui/chat/chat-bubble.tsx b/client/src/components/ui/chat/chat-bubble.tsx index 01a67cb5ea6..76820bb816e 100644 --- a/client/src/components/ui/chat/chat-bubble.tsx +++ b/client/src/components/ui/chat/chat-bubble.tsx @@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority"; import { cn } from "@/lib/utils"; import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; import MessageLoading from "./message-loading"; -import { Button, ButtonProps } from "../button"; +import { Button, type ButtonProps } from "../button"; // ChatBubble const chatBubbleVariant = cva( diff --git a/client/src/components/ui/chat/expandable-chat.tsx b/client/src/components/ui/chat/expandable-chat.tsx index b41add0f7fb..90832474a49 100644 --- a/client/src/components/ui/chat/expandable-chat.tsx +++ b/client/src/components/ui/chat/expandable-chat.tsx @@ -1,4 +1,5 @@ -import React, { useRef, useState } from "react"; +import type React from "react"; +import { useRef, useState } from "react"; import { X, MessageCircle } from "lucide-react"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; diff --git a/client/src/components/ui/sidebar.tsx b/client/src/components/ui/sidebar.tsx index d659620936c..8c70ab77ed9 100644 --- a/client/src/components/ui/sidebar.tsx +++ b/client/src/components/ui/sidebar.tsx @@ -1,6 +1,6 @@ import * as React from "react"; import { Slot } from "@radix-ui/react-slot"; -import { VariantProps, cva } from "class-variance-authority"; +import { type VariantProps, cva } from "class-variance-authority"; import { PanelLeft } from "lucide-react"; import { useIsMobile } from "@/hooks/use-mobile"; import { cn } from "@/lib/utils"; diff --git a/client/src/components/ui/toaster.tsx b/client/src/components/ui/toaster.tsx index 45bf9f6854e..e9b4ffd8f39 100644 --- a/client/src/components/ui/toaster.tsx +++ b/client/src/components/ui/toaster.tsx @@ -13,14 +13,13 @@ export function Toaster() { return ( - {toasts.map(function ({ + {toasts.map(({ id, title, description, action, ...props - }) { - return ( + }) => (
{title && {title}} @@ -33,8 +32,7 @@ export function Toaster() { {action} - ); - })} + ))} ); diff --git a/client/src/lib/api.ts b/client/src/lib/api.ts index 703a5181bf1..ce7758e6664 100644 --- a/client/src/lib/api.ts +++ b/client/src/lib/api.ts @@ -1,4 +1,4 @@ -import { type UUID, type Character } from "@elizaos/core"; +import type { UUID, Character } from "@elizaos/core"; const BASE_URL = `http://localhost:${import.meta.env.VITE_SERVER_PORT}`; diff --git a/client/src/routes/chat.tsx b/client/src/routes/chat.tsx index 60a322a96b7..8ad8a7dc93a 100644 --- a/client/src/routes/chat.tsx +++ b/client/src/routes/chat.tsx @@ -1,6 +1,6 @@ import { useParams } from "react-router"; import Chat from "@/components/chat"; -import { UUID } from "@elizaos/core"; +import type { UUID } from "@elizaos/core"; export default function AgentRoute() { const { agentId } = useParams<{ agentId: UUID }>(); diff --git a/client/src/routes/home.tsx b/client/src/routes/home.tsx index 387b733d901..341c3ebc8f7 100644 --- a/client/src/routes/home.tsx +++ b/client/src/routes/home.tsx @@ -11,7 +11,7 @@ import { } from "@/components/ui/card"; import { apiClient } from "@/lib/api"; import { NavLink } from "react-router"; -import { UUID } from "@elizaos/core"; +import type { UUID } from "@elizaos/core"; import { formatAgentName } from "@/lib/utils"; export default function Home() { diff --git a/client/src/routes/overview.tsx b/client/src/routes/overview.tsx index 81cb6e60ef5..77bffb299f1 100644 --- a/client/src/routes/overview.tsx +++ b/client/src/routes/overview.tsx @@ -2,7 +2,7 @@ import { useQuery } from "@tanstack/react-query"; import { apiClient } from "@/lib/api"; import Overview from "@/components/overview"; import { useParams } from "react-router"; -import { type UUID } from "@elizaos/core"; +import type { UUID } from "@elizaos/core"; export default function AgentRoute() { const { agentId } = useParams<{ agentId: UUID }>(); diff --git a/docs/community/components/Accordion.tsx b/docs/community/components/Accordion.tsx index 9b4748089ed..e3ab7be7b01 100644 --- a/docs/community/components/Accordion.tsx +++ b/docs/community/components/Accordion.tsx @@ -1,5 +1,5 @@ import React, { useState, useRef, useEffect } from "react"; -import { GitHubItem } from "./Contributions"; +import type { GitHubItem } from "./Contributions"; import { GITHUB_PAGE_LIMIT } from "./Contributors"; interface AccordionProps { diff --git a/docs/community/components/Contributions.tsx b/docs/community/components/Contributions.tsx index 0bdaf6bf24b..e5451446841 100644 --- a/docs/community/components/Contributions.tsx +++ b/docs/community/components/Contributions.tsx @@ -1,4 +1,5 @@ -import React, { useState, useEffect } from "react"; +import type React from "react"; +import { useState, useEffect } from "react"; import { Accordion } from "./Accordion"; import { StatCard } from "./StatCard"; import { THEME_COLORS } from "./Contributors"; diff --git a/docs/community/components/Contributor.tsx b/docs/community/components/Contributor.tsx index 45efcb551e4..6e6a1979494 100644 --- a/docs/community/components/Contributor.tsx +++ b/docs/community/components/Contributor.tsx @@ -1,5 +1,6 @@ -import React, { useState } from "react"; -import { ContributorProps } from "./Contributors"; +import type React from "react"; +import { useState } from "react"; +import type { ContributorProps } from "./Contributors"; import { THEME_COLORS } from "./Contributors"; import { hexToRgb } from "./utils"; import ScoreIcon from "./ScoreIcon"; diff --git a/docs/community/components/Contributors.tsx b/docs/community/components/Contributors.tsx index ad154561631..6c7dce19236 100644 --- a/docs/community/components/Contributors.tsx +++ b/docs/community/components/Contributors.tsx @@ -1,4 +1,5 @@ -import React, { useEffect, useState, useRef } from "react"; +import type React from "react"; +import { useEffect, useState, useRef } from "react"; import ContributorCard from "./Contributor"; import Contributions from "./Contributions"; import { useColorMode } from "@docusaurus/theme-common"; diff --git a/docs/community/components/StatCard.tsx b/docs/community/components/StatCard.tsx index d812de946fc..6a72ce2b99a 100644 --- a/docs/community/components/StatCard.tsx +++ b/docs/community/components/StatCard.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import { StatCardProps } from "./Contributions"; +import type React from "react"; +import type { StatCardProps } from "./Contributions"; export const StatCard: React.FC = ({ title, value, style }) => { return ( diff --git a/docs/community/components/utils.tsx b/docs/community/components/utils.tsx index bd660f59591..391e7e41d30 100644 --- a/docs/community/components/utils.tsx +++ b/docs/community/components/utils.tsx @@ -2,7 +2,7 @@ import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; export function hexToRgb(hex: string) { hex = hex.replace("#", ""); - const bigint = parseInt(hex, 16); + const bigint = Number.parseInt(hex, 16); const r = (bigint >> 16) & 255; const g = (bigint >> 8) & 255; const b = bigint & 255; diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 9640c32feba..c3d6b60aabd 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -31,10 +31,10 @@ const config = { id: "community", path: "community", routeBasePath: "community", - sidebarItemsGenerator: async function ({ + sidebarItemsGenerator: async ({ defaultSidebarItemsGenerator, ...args - }) { + }) => { const sidebarItems = await defaultSidebarItemsGenerator(args); return sidebarItems diff --git a/packages/_examples/plugin/src/actions/sampleAction.ts b/packages/_examples/plugin/src/actions/sampleAction.ts index 7f835dac0a5..1d9b3c1bd30 100644 --- a/packages/_examples/plugin/src/actions/sampleAction.ts +++ b/packages/_examples/plugin/src/actions/sampleAction.ts @@ -1,9 +1,9 @@ import { - Action, - IAgentRuntime, - Memory, - HandlerCallback, - State, + type Action, + type IAgentRuntime, + type Memory, + type HandlerCallback, + type State, composeContext, generateObject, ModelClass, diff --git a/packages/_examples/plugin/src/evaluators/sampleEvalutor.ts b/packages/_examples/plugin/src/evaluators/sampleEvalutor.ts index c6d48b07153..538ec5fbecf 100644 --- a/packages/_examples/plugin/src/evaluators/sampleEvalutor.ts +++ b/packages/_examples/plugin/src/evaluators/sampleEvalutor.ts @@ -1,8 +1,8 @@ import { - Evaluator, - IAgentRuntime, - Memory, - State, + type Evaluator, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; diff --git a/packages/_examples/plugin/src/plugins/samplePlugin.ts b/packages/_examples/plugin/src/plugins/samplePlugin.ts index 2a3b29888b2..afaefca6a3b 100644 --- a/packages/_examples/plugin/src/plugins/samplePlugin.ts +++ b/packages/_examples/plugin/src/plugins/samplePlugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { createResourceAction } from "../actions/sampleAction"; import { sampleProvider } from "../providers/sampleProvider"; import { sampleEvaluator } from "../evaluators/sampleEvalutor"; diff --git a/packages/_examples/plugin/src/providers/sampleProvider.ts b/packages/_examples/plugin/src/providers/sampleProvider.ts index d16f3ba6ddf..29644676793 100644 --- a/packages/_examples/plugin/src/providers/sampleProvider.ts +++ b/packages/_examples/plugin/src/providers/sampleProvider.ts @@ -1,8 +1,8 @@ import { - Provider, - IAgentRuntime, - Memory, - State, + type Provider, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; diff --git a/packages/_examples/plugin/src/services/sampleService.ts b/packages/_examples/plugin/src/services/sampleService.ts index 07561c5bde5..be86c41c84e 100644 --- a/packages/_examples/plugin/src/services/sampleService.ts +++ b/packages/_examples/plugin/src/services/sampleService.ts @@ -1,7 +1,7 @@ import { Service, ServiceType, - IAgentRuntime, + type IAgentRuntime, // Memory, // State, elizaLogger, diff --git a/packages/adapter-pglite/src/index.ts b/packages/adapter-pglite/src/index.ts index eb6f8d405d5..35de44c7ea1 100644 --- a/packages/adapter-pglite/src/index.ts +++ b/packages/adapter-pglite/src/index.ts @@ -1,29 +1,29 @@ import { v4 } from "uuid"; import { - Account, - Actor, - GoalStatus, + type Account, + type Actor, + type GoalStatus, type Goal, type Memory, type Relationship, type UUID, type IDatabaseCacheAdapter, - Participant, + type Participant, elizaLogger, getEmbeddingConfig, DatabaseAdapter, EmbeddingProvider, - RAGKnowledgeItem, + type RAGKnowledgeItem, } from "@elizaos/core"; import fs from "fs"; import { fileURLToPath } from "url"; import path from "path"; import { PGlite, - PGliteOptions, - Results, - Transaction, + type PGliteOptions, + type Results, + type Transaction, } from "@electric-sql/pglite"; import { vector } from "@electric-sql/pglite/vector"; import { fuzzystrmatch } from "@electric-sql/pglite/contrib/fuzzystrmatch"; diff --git a/packages/adapter-postgres/src/index.ts b/packages/adapter-postgres/src/index.ts index 7d3c34dccc0..14b82400200 100644 --- a/packages/adapter-postgres/src/index.ts +++ b/packages/adapter-postgres/src/index.ts @@ -5,13 +5,13 @@ import pg from "pg"; type Pool = pg.Pool; import { - Account, - Actor, + type Account, + type Actor, DatabaseAdapter, EmbeddingProvider, - GoalStatus, - Participant, - RAGKnowledgeItem, + type GoalStatus, + type Participant, + type RAGKnowledgeItem, elizaLogger, getEmbeddingConfig, type Goal, @@ -22,7 +22,7 @@ import { } from "@elizaos/core"; import fs from "fs"; import path from "path"; -import { +import type { QueryConfig, QueryConfigValues, QueryResult, @@ -1323,7 +1323,7 @@ export class PostgresDatabaseAdapter } const { rows } = await this.pool.query(sql, [tableName, roomId]); - return parseInt(rows[0].count); + return Number.parseInt(rows[0].count); }, "countMemories"); } diff --git a/packages/adapter-redis/src/index.ts b/packages/adapter-redis/src/index.ts index b9a4aac391f..c993d8cec14 100644 --- a/packages/adapter-redis/src/index.ts +++ b/packages/adapter-redis/src/index.ts @@ -1,5 +1,5 @@ import Redis from "ioredis"; -import { IDatabaseCacheAdapter, UUID, elizaLogger } from "@elizaos/core"; +import { type IDatabaseCacheAdapter, type UUID, elizaLogger } from "@elizaos/core"; export class RedisClient implements IDatabaseCacheAdapter { private client: Redis; diff --git a/packages/adapter-sqlite/src/index.ts b/packages/adapter-sqlite/src/index.ts index b18289be3c5..fb56d29d6c6 100644 --- a/packages/adapter-sqlite/src/index.ts +++ b/packages/adapter-sqlite/src/index.ts @@ -4,21 +4,21 @@ export * from "./sqlite_vec.ts"; import { DatabaseAdapter, elizaLogger, - IDatabaseCacheAdapter, + type IDatabaseCacheAdapter, } from "@elizaos/core"; -import { +import type { Account, Actor, GoalStatus, Participant, - type Goal, - type Memory, - type Relationship, - type UUID, + Goal, + Memory, + Relationship, + UUID, RAGKnowledgeItem, - type ChunkRow, + ChunkRow, } from "@elizaos/core"; -import { Database } from "better-sqlite3"; +import type { Database } from "better-sqlite3"; import { v4 } from "uuid"; import { load } from "./sqlite_vec.ts"; import { sqliteTables } from "./sqliteTables.ts"; diff --git a/packages/adapter-sqlite/src/sqlite_vec.ts b/packages/adapter-sqlite/src/sqlite_vec.ts index 71e1a6ee79b..75699c32054 100644 --- a/packages/adapter-sqlite/src/sqlite_vec.ts +++ b/packages/adapter-sqlite/src/sqlite_vec.ts @@ -1,5 +1,5 @@ import * as sqliteVec from "sqlite-vec"; -import { Database } from "better-sqlite3"; +import type { Database } from "better-sqlite3"; import { elizaLogger } from "@elizaos/core"; // Loads the sqlite-vec extensions into the provided SQLite database diff --git a/packages/adapter-sqljs/src/index.ts b/packages/adapter-sqljs/src/index.ts index 0de00fd7e60..6aa6990fbbf 100644 --- a/packages/adapter-sqljs/src/index.ts +++ b/packages/adapter-sqljs/src/index.ts @@ -2,22 +2,22 @@ export * from "./sqliteTables.ts"; export * from "./types.ts"; import { - Account, - Actor, + type Account, + type Actor, DatabaseAdapter, - GoalStatus, - IDatabaseCacheAdapter, - Participant, + type GoalStatus, + type IDatabaseCacheAdapter, + type Participant, type Goal, type Memory, type Relationship, type UUID, - RAGKnowledgeItem, + type RAGKnowledgeItem, elizaLogger, } from "@elizaos/core"; import { v4 } from "uuid"; import { sqliteTables } from "./sqliteTables.ts"; -import { Database } from "./types.ts"; +import type { Database } from "./types.ts"; export class SqlJsDatabaseAdapter extends DatabaseAdapter diff --git a/packages/adapter-supabase/src/index.ts b/packages/adapter-supabase/src/index.ts index 5392b49d59a..5f65935490f 100644 --- a/packages/adapter-supabase/src/index.ts +++ b/packages/adapter-supabase/src/index.ts @@ -3,13 +3,13 @@ import { type Memory, type Goal, type Relationship, - Actor, - GoalStatus, - Account, + type Actor, + type GoalStatus, + type Account, type UUID, - Participant, - Room, - RAGKnowledgeItem, + type Participant, + type Room, + type RAGKnowledgeItem, elizaLogger, } from "@elizaos/core"; import { DatabaseAdapter } from "@elizaos/core"; @@ -187,7 +187,7 @@ export class SupabaseDatabaseAdapter extends DatabaseAdapter { const { data } = response; return data - .map((room) => + .flatMap((room) => room.participants.map((participant) => { const user = participant.account as unknown as Actor; return { @@ -197,8 +197,7 @@ export class SupabaseDatabaseAdapter extends DatabaseAdapter { username: user?.username, }; }) - ) - .flat(); + ); } catch (error) { elizaLogger.error("error", error); throw error; diff --git a/packages/client-auto/src/index.ts b/packages/client-auto/src/index.ts index 05d4058dd66..1eae8637197 100644 --- a/packages/client-auto/src/index.ts +++ b/packages/client-auto/src/index.ts @@ -1,4 +1,4 @@ -import { Client, IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type Client, type IAgentRuntime, elizaLogger } from "@elizaos/core"; export class AutoClient { interval: NodeJS.Timeout; diff --git a/packages/client-direct/src/api.ts b/packages/client-direct/src/api.ts index ff97d23f0e7..8e581343e61 100644 --- a/packages/client-direct/src/api.ts +++ b/packages/client-direct/src/api.ts @@ -3,17 +3,17 @@ import bodyParser from "body-parser"; import cors from "cors"; import { - AgentRuntime, + type AgentRuntime, elizaLogger, getEnvVariable, - UUID, + type UUID, validateCharacterConfig, ServiceType, } from "@elizaos/core"; -import { TeeLogQuery, TeeLogService } from "@elizaos/plugin-tee-log"; +import type { TeeLogQuery, TeeLogService } from "@elizaos/plugin-tee-log"; import { REST, Routes } from "discord.js"; -import { DirectClient } from "."; +import type { DirectClient } from "."; import { validateUuid } from "@elizaos/core"; interface UUIDParams { @@ -321,8 +321,8 @@ export function createApiRouter( async (req: express.Request, res: express.Response) => { try { const query = req.body.query || {}; - const page = parseInt(req.body.page) || 1; - const pageSize = parseInt(req.body.pageSize) || 10; + const page = Number.parseInt(req.body.page) || 1; + const pageSize = Number.parseInt(req.body.pageSize) || 10; const teeLogQuery: TeeLogQuery = { agentId: query.agentId || "", diff --git a/packages/client-direct/src/index.ts b/packages/client-direct/src/index.ts index 15d80181088..87871029501 100644 --- a/packages/client-direct/src/index.ts +++ b/packages/client-direct/src/index.ts @@ -1,26 +1,26 @@ import bodyParser from "body-parser"; import cors from "cors"; -import express, { Request as ExpressRequest } from "express"; +import express, { type Request as ExpressRequest } from "express"; import multer from "multer"; import { z } from "zod"; import { - AgentRuntime, + type AgentRuntime, elizaLogger, messageCompletionFooter, generateCaption, generateImage, - Media, + type Media, getEmbeddingZeroVector, composeContext, generateMessageResponse, generateObject, - Content, - Memory, + type Content, + type Memory, ModelClass, - Client, + type Client, stringToUuid, settings, - IAgentRuntime, + type IAgentRuntime, } from "@elizaos/core"; import { createApiRouter } from "./api.ts"; import * as fs from "fs"; @@ -853,14 +853,14 @@ export class DirectClient { process.env.ELEVENLABS_MODEL_ID || "eleven_multilingual_v2", voice_settings: { - stability: parseFloat( + stability: Number.parseFloat( process.env.ELEVENLABS_VOICE_STABILITY || "0.5" ), - similarity_boost: parseFloat( + similarity_boost: Number.parseFloat( process.env.ELEVENLABS_VOICE_SIMILARITY_BOOST || "0.9" ), - style: parseFloat( + style: Number.parseFloat( process.env.ELEVENLABS_VOICE_STYLE || "0.66" ), use_speaker_boost: @@ -927,14 +927,14 @@ export class DirectClient { process.env.ELEVENLABS_MODEL_ID || "eleven_multilingual_v2", voice_settings: { - stability: parseFloat( + stability: Number.parseFloat( process.env.ELEVENLABS_VOICE_STABILITY || "0.5" ), - similarity_boost: parseFloat( + similarity_boost: Number.parseFloat( process.env.ELEVENLABS_VOICE_SIMILARITY_BOOST || "0.9" ), - style: parseFloat( + style: Number.parseFloat( process.env.ELEVENLABS_VOICE_STYLE || "0.66" ), use_speaker_boost: @@ -1025,7 +1025,7 @@ export const DirectClientInterface: Client = { start: async (_runtime: IAgentRuntime) => { elizaLogger.log("DirectClientInterface start"); const client = new DirectClient(); - const serverPort = parseInt(settings.SERVER_PORT || "3000"); + const serverPort = Number.parseInt(settings.SERVER_PORT || "3000"); client.start(serverPort); return client; }, diff --git a/packages/client-direct/src/verifiable-log-api.ts b/packages/client-direct/src/verifiable-log-api.ts index dd0054029f5..e6dcdb502c5 100644 --- a/packages/client-direct/src/verifiable-log-api.ts +++ b/packages/client-direct/src/verifiable-log-api.ts @@ -2,8 +2,8 @@ import express from "express"; import bodyParser from "body-parser"; import cors from "cors"; -import { AgentRuntime, elizaLogger, ServiceType } from "@elizaos/core"; -import { +import { type AgentRuntime, elizaLogger, ServiceType } from "@elizaos/core"; +import type { VerifiableLogService, VerifiableLogQuery, } from "@elizaos/plugin-tee-verifiable-log"; @@ -80,8 +80,8 @@ export function createVerifiableLogApiRouter( async (req: express.Request, res: express.Response) => { try { const query = req.body.query || {}; - const page = parseInt(req.body.page) || 1; - const pageSize = parseInt(req.body.pageSize) || 10; + const page = Number.parseInt(req.body.page) || 1; + const pageSize = Number.parseInt(req.body.pageSize) || 10; const verifiableLogQuery: VerifiableLogQuery = { idEq: query.idEq || "", diff --git a/packages/client-discord/src/actions/chat_with_attachments.ts b/packages/client-discord/src/actions/chat_with_attachments.ts index 8f62a775100..ba050706ae2 100644 --- a/packages/client-discord/src/actions/chat_with_attachments.ts +++ b/packages/client-discord/src/actions/chat_with_attachments.ts @@ -2,14 +2,14 @@ import { composeContext, getModelSettings } from "@elizaos/core"; import { generateText, trimTokens } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { - Action, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import * as fs from "fs"; diff --git a/packages/client-discord/src/actions/download_media.ts b/packages/client-discord/src/actions/download_media.ts index 0dcf1453e48..273a1523905 100644 --- a/packages/client-discord/src/actions/download_media.ts +++ b/packages/client-discord/src/actions/download_media.ts @@ -2,16 +2,16 @@ import path from "path"; import { composeContext } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { - Action, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - IVideoService, - Memory, + type Action, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type IVideoService, + type Memory, ModelClass, ServiceType, - State, + type State, } from "@elizaos/core"; import { generateText } from "@elizaos/core"; diff --git a/packages/client-discord/src/actions/joinvoice.ts b/packages/client-discord/src/actions/joinvoice.ts index 71c879712af..1371dcb29e3 100644 --- a/packages/client-discord/src/actions/joinvoice.ts +++ b/packages/client-discord/src/actions/joinvoice.ts @@ -2,22 +2,22 @@ // @ts-nocheck // src/actions/joinVoice import { - Action, - ActionExample, + type Action, + type ActionExample, composeContext, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, generateText, ModelClass, } from "@elizaos/core"; import { - Channel, + type Channel, ChannelType, - Client, - Message as DiscordMessage, - Guild, - GuildMember, + type Client, + type Message as DiscordMessage, + type Guild, + type GuildMember, } from "discord.js"; import { joinVoiceChannel } from "@discordjs/voice"; diff --git a/packages/client-discord/src/actions/leavevoice.ts b/packages/client-discord/src/actions/leavevoice.ts index 6fea10d950a..20419b754bd 100644 --- a/packages/client-discord/src/actions/leavevoice.ts +++ b/packages/client-discord/src/actions/leavevoice.ts @@ -1,12 +1,12 @@ // src/actions/leaveVoice import { getVoiceConnection } from "@discordjs/voice"; import { - Channel, + type Channel, ChannelType, - Client, - Message as DiscordMessage, + type Client, + type Message as DiscordMessage, } from "discord.js"; -import { +import type { Action, ActionExample, IAgentRuntime, diff --git a/packages/client-discord/src/actions/summarize_conversation.ts b/packages/client-discord/src/actions/summarize_conversation.ts index af0163e00e7..5c4dca4ba13 100644 --- a/packages/client-discord/src/actions/summarize_conversation.ts +++ b/packages/client-discord/src/actions/summarize_conversation.ts @@ -3,15 +3,15 @@ import { generateText, splitChunks, trimTokens } from "@elizaos/core"; import { getActorDetails } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { - Action, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Media, - Memory, + type Action, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Media, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; export const summarizationTemplate = `# Summarized so far (we are adding to this) {{currentSummary}} @@ -98,10 +98,10 @@ const getDateRange = async ( )?.[0]; const startInteger = startIntegerString - ? parseInt(startIntegerString) + ? Number.parseInt(startIntegerString) : 0; const endInteger = endIntegerString - ? parseInt(endIntegerString) + ? Number.parseInt(endIntegerString) : 0; // multiply by multiplier @@ -220,8 +220,8 @@ const summarizeAction = { const memories = await runtime.messageManager.getMemories({ roomId, // subtract start from current time - start: parseInt(start as string), - end: parseInt(end as string), + start: Number.parseInt(start as string), + end: Number.parseInt(end as string), count: 10000, unique: false, }); @@ -307,7 +307,7 @@ ${currentSummary.trim()} await callback( { ...callbackData, - text: `I've attached the summary of the conversation from \`${new Date(parseInt(start as string)).toString()}\` to \`${new Date(parseInt(end as string)).toString()}\` as a text file.`, + text: `I've attached the summary of the conversation from \`${new Date(Number.parseInt(start as string)).toString()}\` to \`${new Date(Number.parseInt(end as string)).toString()}\` as a text file.`, }, [summaryFilename] ); diff --git a/packages/client-discord/src/actions/transcribe_media.ts b/packages/client-discord/src/actions/transcribe_media.ts index 0de01014424..da9323bb1c5 100644 --- a/packages/client-discord/src/actions/transcribe_media.ts +++ b/packages/client-discord/src/actions/transcribe_media.ts @@ -2,14 +2,14 @@ import { composeContext } from "@elizaos/core"; import { generateText } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { - Action, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; export const transcriptionTemplate = `# Transcription of media file diff --git a/packages/client-discord/src/attachments.ts b/packages/client-discord/src/attachments.ts index 4c8ba7903e2..3bdaed4f818 100644 --- a/packages/client-discord/src/attachments.ts +++ b/packages/client-discord/src/attachments.ts @@ -1,16 +1,16 @@ import { generateText, trimTokens } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { - IAgentRuntime, - IImageDescriptionService, - IPdfService, - ITranscriptionService, - IVideoService, - Media, + type IAgentRuntime, + type IImageDescriptionService, + type IPdfService, + type ITranscriptionService, + type IVideoService, + type Media, ModelClass, ServiceType, } from "@elizaos/core"; -import { Attachment, Collection } from "discord.js"; +import { type Attachment, Collection } from "discord.js"; import ffmpeg from "fluent-ffmpeg"; import fs from "fs"; diff --git a/packages/client-discord/src/environment.ts b/packages/client-discord/src/environment.ts index f93fcb3b1e7..71f4b3cbeb3 100644 --- a/packages/client-discord/src/environment.ts +++ b/packages/client-discord/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const discordEnvSchema = z.object({ diff --git a/packages/client-discord/src/index.ts b/packages/client-discord/src/index.ts index 45b5cc0f652..5aac95fed23 100644 --- a/packages/client-discord/src/index.ts +++ b/packages/client-discord/src/index.ts @@ -2,18 +2,18 @@ import { getEmbeddingZeroVector, stringToUuid, elizaLogger, - Character, - Client as ElizaClient, - IAgentRuntime, + type Character, + type Client as ElizaClient, + type IAgentRuntime, } from "@elizaos/core"; import { Client, Events, GatewayIntentBits, - Guild, - MessageReaction, + type Guild, + type MessageReaction, Partials, - User, + type User, } from "discord.js"; import { EventEmitter } from "events"; import chat_with_attachments from "./actions/chat_with_attachments.ts"; diff --git a/packages/client-discord/src/messages.ts b/packages/client-discord/src/messages.ts index 22cb237461e..0a6de7afb61 100644 --- a/packages/client-discord/src/messages.ts +++ b/packages/client-discord/src/messages.ts @@ -1,29 +1,29 @@ import { composeContext, composeRandomUser } from "@elizaos/core"; import { generateMessageResponse, generateShouldRespond } from "@elizaos/core"; import { - Content, - HandlerCallback, - IAgentRuntime, - IBrowserService, - ISpeechService, - IVideoService, - Media, - Memory, + type Content, + type HandlerCallback, + type IAgentRuntime, + type IBrowserService, + type ISpeechService, + type IVideoService, + type Media, + type Memory, ModelClass, ServiceType, - State, - UUID, + type State, + type UUID, } from "@elizaos/core"; import { stringToUuid, getEmbeddingZeroVector } from "@elizaos/core"; import { ChannelType, - Client, - Message as DiscordMessage, - TextChannel, + type Client, + type Message as DiscordMessage, + type TextChannel, } from "discord.js"; import { elizaLogger } from "@elizaos/core"; import { AttachmentManager } from "./attachments.ts"; -import { VoiceManager } from "./voice.ts"; +import type { VoiceManager } from "./voice.ts"; import { discordShouldRespondTemplate, discordMessageHandlerTemplate, @@ -503,7 +503,7 @@ export class MessageManager { } } - async cacheMessages(channel: TextChannel, count: number = 20) { + async cacheMessages(channel: TextChannel, count = 20) { const messages = await channel.messages.fetch({ limit: count }); // TODO: This is throwing an error but seems to work? diff --git a/packages/client-discord/src/providers/channelState.ts b/packages/client-discord/src/providers/channelState.ts index 7540dbebe07..08a24f6d59b 100644 --- a/packages/client-discord/src/providers/channelState.ts +++ b/packages/client-discord/src/providers/channelState.ts @@ -1,9 +1,9 @@ import { ChannelType, - Message as DiscordMessage, - TextChannel, + type Message as DiscordMessage, + type TextChannel, } from "discord.js"; -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; const channelStateProvider: Provider = { get: async (runtime: IAgentRuntime, message: Memory, state?: State) => { diff --git a/packages/client-discord/src/providers/voiceState.ts b/packages/client-discord/src/providers/voiceState.ts index e353dbfacf9..283bcb14bab 100644 --- a/packages/client-discord/src/providers/voiceState.ts +++ b/packages/client-discord/src/providers/voiceState.ts @@ -1,6 +1,6 @@ import { getVoiceConnection } from "@discordjs/voice"; -import { ChannelType, Message as DiscordMessage } from "discord.js"; -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import { ChannelType, type Message as DiscordMessage } from "discord.js"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; const voiceStateProvider: Provider = { get: async (runtime: IAgentRuntime, message: Memory, state?: State) => { diff --git a/packages/client-discord/src/utils.ts b/packages/client-discord/src/utils.ts index 40f08a392a7..d415639b38e 100644 --- a/packages/client-discord/src/utils.ts +++ b/packages/client-discord/src/utils.ts @@ -1,5 +1,5 @@ import { - IAgentRuntime, + type IAgentRuntime, ModelClass, elizaLogger, generateText, @@ -8,17 +8,17 @@ import { } from "@elizaos/core"; import { ChannelType, - Message as DiscordMessage, + type Message as DiscordMessage, PermissionsBitField, - TextChannel, + type TextChannel, ThreadChannel, } from "discord.js"; export function getWavHeader( audioLength: number, sampleRate: number, - channelCount: number = 1, - bitsPerSample: number = 16 + channelCount = 1, + bitsPerSample = 16 ): Buffer { const wavHeader = Buffer.alloc(44); wavHeader.write("RIFF", 0); @@ -133,7 +133,7 @@ function splitMessage(content: string): string[] { const rawLines = content?.split("\n") || []; // split all lines into MAX_MESSAGE_LENGTH chunks so any long lines are split const lines = rawLines - .map((line) => { + .flatMap((line) => { const chunks = []; while (line.length > MAX_MESSAGE_LENGTH) { chunks.push(line.slice(0, MAX_MESSAGE_LENGTH)); @@ -141,8 +141,7 @@ function splitMessage(content: string): string[] { } chunks.push(line); return chunks; - }) - .flat(); + }); for (const line of lines) { if (currentMessage.length + line.length + 1 > MAX_MESSAGE_LENGTH) { diff --git a/packages/client-discord/src/voice.ts b/packages/client-discord/src/voice.ts index 036806f610b..715826e128b 100644 --- a/packages/client-discord/src/voice.ts +++ b/packages/client-discord/src/voice.ts @@ -1,12 +1,12 @@ import { - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, ServiceType, - State, - UUID, + type State, + type UUID, composeContext, composeRandomUser, elizaLogger, @@ -14,15 +14,15 @@ import { generateMessageResponse, stringToUuid, generateShouldRespond, - ITranscriptionService, - ISpeechService, + type ITranscriptionService, + type ISpeechService, } from "@elizaos/core"; import { - AudioPlayer, - AudioReceiveStream, + type AudioPlayer, + type AudioReceiveStream, NoSubscriberBehavior, StreamType, - VoiceConnection, + type VoiceConnection, VoiceConnectionStatus, createAudioPlayer, createAudioResource, @@ -31,18 +31,18 @@ import { entersState, } from "@discordjs/voice"; import { - BaseGuildVoiceChannel, + type BaseGuildVoiceChannel, ChannelType, - Client, - Guild, - GuildMember, - VoiceChannel, - VoiceState, + type Client, + type Guild, + type GuildMember, + type VoiceChannel, + type VoiceState, } from "discord.js"; import EventEmitter from "events"; import prism from "prism-media"; -import { Readable, pipeline } from "stream"; -import { DiscordClient } from "./index.ts"; +import { type Readable, pipeline } from "stream"; +import type { DiscordClient } from "./index.ts"; import { discordShouldRespondTemplate, discordVoiceHandlerTemplate, @@ -57,8 +57,8 @@ export class AudioMonitor { private readable: Readable; private buffers: Buffer[] = []; private maxSize: number; - private lastFlagged: number = -1; - private ended: boolean = false; + private lastFlagged = -1; + private ended = false; constructor( readable: Readable, @@ -139,7 +139,7 @@ export class AudioMonitor { } export class VoiceManager extends EventEmitter { - private processingVoice: boolean = false; + private processingVoice = false; private transcriptionTimeout: NodeJS.Timeout | null = null; private userStates: Map< string, diff --git a/packages/client-farcaster/src/client.ts b/packages/client-farcaster/src/client.ts index ba569dbe808..38902a2054f 100644 --- a/packages/client-farcaster/src/client.ts +++ b/packages/client-farcaster/src/client.ts @@ -1,7 +1,7 @@ -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; -import { NeynarAPIClient, isApiErrorResponse } from "@neynar/nodejs-sdk"; -import { NeynarCastResponse, Cast, Profile, FidRequest, CastId } from "./types"; -import { FarcasterConfig } from "./environment"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type NeynarAPIClient, isApiErrorResponse } from "@neynar/nodejs-sdk"; +import type { NeynarCastResponse, Cast, Profile, FidRequest, CastId } from "./types"; +import type { FarcasterConfig } from "./environment"; export class FarcasterClient { runtime: IAgentRuntime; diff --git a/packages/client-farcaster/src/environment.ts b/packages/client-farcaster/src/environment.ts index 442ac811093..8276f65d31a 100644 --- a/packages/client-farcaster/src/environment.ts +++ b/packages/client-farcaster/src/environment.ts @@ -1,6 +1,6 @@ import { parseBooleanFromText, - IAgentRuntime, + type IAgentRuntime, ActionTimelineType, } from "@elizaos/core"; import { z, ZodError } from "zod"; @@ -36,7 +36,7 @@ function safeParseInt( defaultValue: number ): number { if (!value) return defaultValue; - const parsed = parseInt(value, 10); + const parsed = Number.parseInt(value, 10); return Number.isNaN(parsed) ? defaultValue : Math.max(1, parsed); } diff --git a/packages/client-farcaster/src/index.ts b/packages/client-farcaster/src/index.ts index 14295890d28..fbfad4d1962 100644 --- a/packages/client-farcaster/src/index.ts +++ b/packages/client-farcaster/src/index.ts @@ -1,9 +1,9 @@ -import { Client, IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type Client, type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { FarcasterClient } from "./client"; import { FarcasterPostManager } from "./post"; import { FarcasterInteractionManager } from "./interactions"; import { Configuration, NeynarAPIClient } from "@neynar/nodejs-sdk"; -import { validateFarcasterConfig, FarcasterConfig } from "./environment"; +import { validateFarcasterConfig, type FarcasterConfig } from "./environment"; /** * A manager that orchestrates all Farcaster operations: diff --git a/packages/client-farcaster/src/interactions.ts b/packages/client-farcaster/src/interactions.ts index eea862df182..7ce5711b9ae 100644 --- a/packages/client-farcaster/src/interactions.ts +++ b/packages/client-farcaster/src/interactions.ts @@ -2,18 +2,18 @@ import { composeContext, generateMessageResponse, generateShouldRespond, - Memory, + type Memory, ModelClass, stringToUuid, elizaLogger, - HandlerCallback, - Content, + type HandlerCallback, + type Content, type IAgentRuntime, } from "@elizaos/core"; import type { FarcasterClient } from "./client"; import { toHex } from "viem"; import { buildConversationThread, createCastMemory } from "./memory"; -import { Cast, Profile } from "./types"; +import type { Cast, Profile } from "./types"; import { formatCast, formatTimeline, diff --git a/packages/client-farcaster/src/memory.ts b/packages/client-farcaster/src/memory.ts index f12d408a501..ba77478d1fe 100644 --- a/packages/client-farcaster/src/memory.ts +++ b/packages/client-farcaster/src/memory.ts @@ -1,7 +1,7 @@ import { elizaLogger, getEmbeddingZeroVector, - IAgentRuntime, + type IAgentRuntime, stringToUuid, type Memory, type UUID, @@ -9,7 +9,7 @@ import { import type { Cast } from "./types"; import { toHex } from "viem"; import { castUuid } from "./utils"; -import { FarcasterClient } from "./client"; +import type { FarcasterClient } from "./client"; export function createCastMemory({ roomId, diff --git a/packages/client-farcaster/src/post.ts b/packages/client-farcaster/src/post.ts index f099a447921..afcfa4b1cf3 100644 --- a/packages/client-farcaster/src/post.ts +++ b/packages/client-farcaster/src/post.ts @@ -1,12 +1,12 @@ import { composeContext, generateText, - IAgentRuntime, + type IAgentRuntime, ModelClass, stringToUuid, elizaLogger, } from "@elizaos/core"; -import { FarcasterClient } from "./client"; +import type { FarcasterClient } from "./client"; import { formatTimeline, postTemplate } from "./prompts"; import { castUuid, MAX_CAST_LENGTH } from "./utils"; import { createCastMemory } from "./memory"; diff --git a/packages/client-farcaster/src/prompts.ts b/packages/client-farcaster/src/prompts.ts index b52bcd98eb0..3459087f316 100644 --- a/packages/client-farcaster/src/prompts.ts +++ b/packages/client-farcaster/src/prompts.ts @@ -1,5 +1,5 @@ import { - Character, + type Character, messageCompletionFooter, shouldRespondFooter, } from "@elizaos/core"; diff --git a/packages/client-github/__tests__/environment.test.ts b/packages/client-github/__tests__/environment.test.ts index 5efb2836bff..1062dba6372 100644 --- a/packages/client-github/__tests__/environment.test.ts +++ b/packages/client-github/__tests__/environment.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, vi } from 'vitest'; import { validateGithubConfig, githubEnvSchema } from '../src/environment'; -import { IAgentRuntime } from '@elizaos/core'; +import type { IAgentRuntime } from '@elizaos/core'; describe('GitHub Environment Configuration', () => { const mockRuntime: IAgentRuntime = { diff --git a/packages/client-github/__tests__/index.test.ts b/packages/client-github/__tests__/index.test.ts index 68723df9146..71ea056a9f7 100644 --- a/packages/client-github/__tests__/index.test.ts +++ b/packages/client-github/__tests__/index.test.ts @@ -1,10 +1,10 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { GitHubClient, GitHubClientInterface } from '../src'; -import { AgentRuntime, IAgentRuntime } from '@elizaos/core'; +import type { AgentRuntime, IAgentRuntime } from '@elizaos/core'; import { Octokit } from '@octokit/rest'; import simpleGit from 'simple-git'; -import fs from 'fs'; -import fsPromises from 'fs/promises'; +import type fs from 'fs'; +import type fsPromises from 'fs/promises'; // Mock external dependencies vi.mock('@octokit/rest', () => ({ diff --git a/packages/client-github/src/environment.ts b/packages/client-github/src/environment.ts index f7982d80f71..c78159c6146 100644 --- a/packages/client-github/src/environment.ts +++ b/packages/client-github/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const githubEnvSchema = z.object({ diff --git a/packages/client-github/src/index.ts b/packages/client-github/src/index.ts index 3ed9ffa6abe..8afc75e3d69 100644 --- a/packages/client-github/src/index.ts +++ b/packages/client-github/src/index.ts @@ -1,15 +1,15 @@ import { Octokit } from "@octokit/rest"; import { glob } from "glob"; -import simpleGit, { SimpleGit } from "simple-git"; +import simpleGit, { type SimpleGit } from "simple-git"; import path from "path"; import fs from "fs/promises"; import { existsSync } from "fs"; import { createHash } from "crypto"; import { elizaLogger, - AgentRuntime, - Client, - IAgentRuntime, + type AgentRuntime, + type Client, + type IAgentRuntime, knowledge, stringToUuid, } from "@elizaos/core"; diff --git a/packages/client-instagram/src/environment.ts b/packages/client-instagram/src/environment.ts index 67951248764..fe6534a7dd1 100644 --- a/packages/client-instagram/src/environment.ts +++ b/packages/client-instagram/src/environment.ts @@ -1,5 +1,5 @@ import { - IAgentRuntime, + type IAgentRuntime, parseBooleanFromText, } from "@elizaos/core"; import { z } from "zod"; @@ -75,14 +75,14 @@ export async function validateInstagramConfig( INSTAGRAM_BUSINESS_ACCOUNT_ID: runtime.getSetting("INSTAGRAM_BUSINESS_ACCOUNT_ID") || process.env.INSTAGRAM_BUSINESS_ACCOUNT_ID, - INSTAGRAM_POST_INTERVAL_MIN: parseInt( + INSTAGRAM_POST_INTERVAL_MIN: Number.parseInt( runtime.getSetting("INSTAGRAM_POST_INTERVAL_MIN") || process.env.INSTAGRAM_POST_INTERVAL_MIN || DEFAULT_POST_INTERVAL_MIN.toString(), 10 ), - INSTAGRAM_POST_INTERVAL_MAX: parseInt( + INSTAGRAM_POST_INTERVAL_MAX: Number.parseInt( runtime.getSetting("INSTAGRAM_POST_INTERVAL_MAX") || process.env.INSTAGRAM_POST_INTERVAL_MAX || DEFAULT_POST_INTERVAL_MAX.toString(), @@ -94,14 +94,14 @@ export async function validateInstagramConfig( process.env.INSTAGRAM_ENABLE_ACTION_PROCESSING ) ?? false, - INSTAGRAM_ACTION_INTERVAL: parseInt( + INSTAGRAM_ACTION_INTERVAL: Number.parseInt( runtime.getSetting("INSTAGRAM_ACTION_INTERVAL") || process.env.INSTAGRAM_ACTION_INTERVAL || DEFAULT_ACTION_INTERVAL.toString(), 10 ), - INSTAGRAM_MAX_ACTIONS: parseInt( + INSTAGRAM_MAX_ACTIONS: Number.parseInt( runtime.getSetting("MAX_ACTIONS_PROCESSING") || process.env.MAX_ACTIONS_PROCESSING || DEFAULT_MAX_ACTIONS.toString(), diff --git a/packages/client-instagram/src/index.ts b/packages/client-instagram/src/index.ts index f322d78c7ea..39b836961c9 100644 --- a/packages/client-instagram/src/index.ts +++ b/packages/client-instagram/src/index.ts @@ -1,5 +1,5 @@ // src/index.ts -import { Client, IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type Client, type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { validateInstagramConfig } from "./environment"; import { initializeClient } from "./lib/auth"; import { InstagramInteractionService } from "./services/interaction"; diff --git a/packages/client-instagram/src/lib/actions.ts b/packages/client-instagram/src/lib/actions.ts index 0d134890b7b..16e54887bd8 100644 --- a/packages/client-instagram/src/lib/actions.ts +++ b/packages/client-instagram/src/lib/actions.ts @@ -1,6 +1,6 @@ // src/lib/actions.ts import { elizaLogger } from "@elizaos/core"; -import { Comment } from "../types"; +import type { Comment } from "../types"; import { getIgClient } from "./state"; /** @@ -8,7 +8,7 @@ import { getIgClient } from "./state"; */ export async function fetchComments( mediaId: string, - count: number = 20 + count = 20 ): Promise { const ig = getIgClient(); diff --git a/packages/client-instagram/src/lib/auth.ts b/packages/client-instagram/src/lib/auth.ts index 307547996cf..1f77564edbe 100644 --- a/packages/client-instagram/src/lib/auth.ts +++ b/packages/client-instagram/src/lib/auth.ts @@ -1,8 +1,8 @@ // src/lib/auth.ts -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { IgLoginTwoFactorRequiredError } from "instagram-private-api"; -import { InstagramConfig } from "../environment"; -import { InstagramState } from "../types"; +import type { InstagramConfig } from "../environment"; +import type { InstagramState } from "../types"; import { fetchProfile } from "./profile"; import { createInitialState, getIgClient } from "./state"; diff --git a/packages/client-instagram/src/lib/media.ts b/packages/client-instagram/src/lib/media.ts index 05d9532cc19..7a65c0c58c9 100644 --- a/packages/client-instagram/src/lib/media.ts +++ b/packages/client-instagram/src/lib/media.ts @@ -1,12 +1,12 @@ -import { elizaLogger, IAgentRuntime } from "@elizaos/core"; -import { InstagramConfig } from "../environment"; -import { MediaItem } from "../types"; +import { elizaLogger, type IAgentRuntime } from "@elizaos/core"; +import type { InstagramConfig } from "../environment"; +import type { MediaItem } from "../types"; import { getIgClient } from "./state"; export async function fetchRecentMedia( runtime: IAgentRuntime, config: InstagramConfig, - count: number = 10 + count = 10 ): Promise { const ig = getIgClient(); diff --git a/packages/client-instagram/src/lib/profile.ts b/packages/client-instagram/src/lib/profile.ts index a7b7fe9053a..b414f6bd6ff 100644 --- a/packages/client-instagram/src/lib/profile.ts +++ b/packages/client-instagram/src/lib/profile.ts @@ -1,6 +1,6 @@ -import { elizaLogger, IAgentRuntime } from "@elizaos/core"; -import { InstagramConfig } from "../environment"; -import { InstagramProfile } from "../types"; +import { elizaLogger, type IAgentRuntime } from "@elizaos/core"; +import type { InstagramConfig } from "../environment"; +import type { InstagramProfile } from "../types"; import { getIgClient } from "./state"; export async function fetchProfile( diff --git a/packages/client-instagram/src/lib/state.ts b/packages/client-instagram/src/lib/state.ts index 0f756f38ccb..66b12add6a6 100644 --- a/packages/client-instagram/src/lib/state.ts +++ b/packages/client-instagram/src/lib/state.ts @@ -1,5 +1,5 @@ import { IgApiClient } from 'instagram-private-api'; -import { InstagramState } from '../types'; +import type { InstagramState } from '../types'; // Create a singleton for the Instagram API client let igClient: IgApiClient | null = null; diff --git a/packages/client-instagram/src/services/interaction.ts b/packages/client-instagram/src/services/interaction.ts index 5b80fdee9c1..736c58942f3 100644 --- a/packages/client-instagram/src/services/interaction.ts +++ b/packages/client-instagram/src/services/interaction.ts @@ -3,14 +3,14 @@ import { elizaLogger, generateText, getEmbeddingZeroVector, - IAgentRuntime, + type IAgentRuntime, ModelClass, stringToUuid, - UUID + type UUID } from "@elizaos/core"; import { fetchComments, likeMedia, postComment } from "../lib/actions"; import { getIgClient } from "../lib/state"; -import { InstagramState } from "../types"; +import type { InstagramState } from "../types"; // Templates const instagramCommentTemplate = ` @@ -61,8 +61,8 @@ import { InstagramState } from "../types"; export class InstagramInteractionService { private runtime: IAgentRuntime; private state: InstagramState; - private isProcessing: boolean = false; - private stopProcessing: boolean = false; + private isProcessing = false; + private stopProcessing = false; constructor(runtime: IAgentRuntime, state: InstagramState) { this.runtime = runtime; @@ -75,7 +75,7 @@ import { InstagramState } from "../types"; if (!this.stopProcessing) { setTimeout( handleInteractionsLoop, - parseInt(this.runtime.getSetting('ACTION_INTERVAL') || '300', 10) * 1000 + Number.parseInt(this.runtime.getSetting('ACTION_INTERVAL') || '300', 10) * 1000 ); } }; diff --git a/packages/client-instagram/src/services/post.ts b/packages/client-instagram/src/services/post.ts index 67b8cb78abe..edcf6b1604f 100644 --- a/packages/client-instagram/src/services/post.ts +++ b/packages/client-instagram/src/services/post.ts @@ -1,6 +1,6 @@ // src/services/post.ts import { - IAgentRuntime, + type IAgentRuntime, ModelClass, composeContext, elizaLogger, @@ -13,7 +13,7 @@ import { promises as fs } from "fs"; import path from "path"; import sharp from "sharp"; import { getIgClient } from "../lib/state"; -import { InstagramState } from "../types"; +import type { InstagramState } from "../types"; // Template for generating Instagram posts const instagramPostTemplate = ` @@ -48,9 +48,9 @@ interface PostOptions { export class InstagramPostService { private runtime: IAgentRuntime; private state: InstagramState; - private isProcessing: boolean = false; - private lastPostTime: number = 0; - private stopProcessing: boolean = false; + private isProcessing = false; + private lastPostTime = 0; + private stopProcessing = false; constructor(runtime: IAgentRuntime, state: InstagramState) { this.runtime = runtime; @@ -64,11 +64,11 @@ export class InstagramPostService { }>("instagram/lastPost"); const lastPostTimestamp = lastPost?.timestamp ?? 0; - const minMinutes = parseInt( + const minMinutes = Number.parseInt( this.runtime.getSetting("POST_INTERVAL_MIN") || "90", 10 ); - const maxMinutes = parseInt( + const maxMinutes = Number.parseInt( this.runtime.getSetting("POST_INTERVAL_MAX") || "180", 10 ); diff --git a/packages/client-lens/src/actions.ts b/packages/client-lens/src/actions.ts index 54631c21f90..4890bb7fc83 100644 --- a/packages/client-lens/src/actions.ts +++ b/packages/client-lens/src/actions.ts @@ -8,8 +8,8 @@ import { } from "@elizaos/core"; import { textOnly } from "@lens-protocol/metadata"; import { createPublicationMemory } from "./memory"; -import { AnyPublicationFragment } from "@lens-protocol/client"; -import StorjProvider from "./providers/StorjProvider"; +import type { AnyPublicationFragment } from "@lens-protocol/client"; +import type StorjProvider from "./providers/StorjProvider"; export async function sendPublication({ client, diff --git a/packages/client-lens/src/client.ts b/packages/client-lens/src/client.ts index 07b8b2df6ea..99cf0773628 100644 --- a/packages/client-lens/src/client.ts +++ b/packages/client-lens/src/client.ts @@ -1,17 +1,17 @@ -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { - AnyPublicationFragment, + type AnyPublicationFragment, LensClient as LensClientCore, production, LensTransactionStatusType, LimitType, NotificationType, - ProfileFragment, + type ProfileFragment, PublicationType, FeedEventItemType, } from "@lens-protocol/client"; -import { Profile, BroadcastResult } from "./types"; -import { PrivateKeyAccount } from "viem"; +import type { Profile, BroadcastResult } from "./types"; +import type { PrivateKeyAccount } from "viem"; import { getProfilePictureUri, handleBroadcastResult, omit } from "./utils"; export class LensClient { @@ -69,7 +69,7 @@ export class LensClient { async createPublication( contentURI: string, - onchain: boolean = false, + onchain = false, commentOn?: string ): Promise { try { @@ -129,7 +129,7 @@ export class LensClient { async getPublicationsFor( profileId: string, - limit: number = 50 + limit = 50 ): Promise { const timeline: AnyPublicationFragment[] = []; let next: any | undefined = undefined; @@ -226,7 +226,7 @@ export class LensClient { async getTimeline( profileId: string, - limit: number = 10 + limit = 10 ): Promise { try { if (!this.authenticated) { diff --git a/packages/client-lens/src/index.ts b/packages/client-lens/src/index.ts index 1a6ed828d8e..05049d2e4fc 100644 --- a/packages/client-lens/src/index.ts +++ b/packages/client-lens/src/index.ts @@ -1,4 +1,4 @@ -import { Client, IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type Client, type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { privateKeyToAccount } from "viem/accounts"; import { LensClient } from "./client"; import { LensPostManager } from "./post"; diff --git a/packages/client-lens/src/interactions.ts b/packages/client-lens/src/interactions.ts index b42e632cdda..899b4fcea49 100644 --- a/packages/client-lens/src/interactions.ts +++ b/packages/client-lens/src/interactions.ts @@ -2,12 +2,12 @@ import { composeContext, generateMessageResponse, generateShouldRespond, - Memory, + type Memory, ModelClass, stringToUuid, elizaLogger, - HandlerCallback, - Content, + type HandlerCallback, + type Content, type IAgentRuntime, } from "@elizaos/core"; import type { LensClient } from "./client"; @@ -21,9 +21,9 @@ import { } from "./prompts"; import { publicationUuid } from "./utils"; import { sendPublication } from "./actions"; -import { AnyPublicationFragment } from "@lens-protocol/client"; -import { Profile } from "./types"; -import StorjProvider from "./providers/StorjProvider"; +import type { AnyPublicationFragment } from "@lens-protocol/client"; +import type { Profile } from "./types"; +import type StorjProvider from "./providers/StorjProvider"; export class LensInteractionManager { private timeout: NodeJS.Timeout | undefined; diff --git a/packages/client-lens/src/memory.ts b/packages/client-lens/src/memory.ts index 705f61fa728..26b8c57ebe7 100644 --- a/packages/client-lens/src/memory.ts +++ b/packages/client-lens/src/memory.ts @@ -1,14 +1,14 @@ import { elizaLogger, getEmbeddingZeroVector, - IAgentRuntime, + type IAgentRuntime, stringToUuid, type Memory, type UUID, } from "@elizaos/core"; import { publicationUuid } from "./utils"; -import { LensClient } from "./client"; -import { AnyPublicationFragment } from "@lens-protocol/client"; +import type { LensClient } from "./client"; +import type { AnyPublicationFragment } from "@lens-protocol/client"; export function createPublicationMemory({ roomId, diff --git a/packages/client-lens/src/post.ts b/packages/client-lens/src/post.ts index 3c2b2a78a60..a7ffdb7f59f 100644 --- a/packages/client-lens/src/post.ts +++ b/packages/client-lens/src/post.ts @@ -1,17 +1,17 @@ import { composeContext, generateText, - IAgentRuntime, + type IAgentRuntime, ModelClass, stringToUuid, elizaLogger, } from "@elizaos/core"; -import { LensClient } from "./client"; +import type { LensClient } from "./client"; import { formatTimeline, postTemplate } from "./prompts"; import { publicationUuid } from "./utils"; import { createPublicationMemory } from "./memory"; import { sendPublication } from "./actions"; -import StorjProvider from "./providers/StorjProvider"; +import type StorjProvider from "./providers/StorjProvider"; export class LensPostManager { private timeout: NodeJS.Timeout | undefined; diff --git a/packages/client-lens/src/prompts.ts b/packages/client-lens/src/prompts.ts index 112aa86aa0c..f9a0ccc0661 100644 --- a/packages/client-lens/src/prompts.ts +++ b/packages/client-lens/src/prompts.ts @@ -1,9 +1,9 @@ import { - Character, + type Character, messageCompletionFooter, shouldRespondFooter, } from "@elizaos/core"; -import { AnyPublicationFragment } from "@lens-protocol/client"; +import type { AnyPublicationFragment } from "@lens-protocol/client"; export const formatPublication = (publication: AnyPublicationFragment) => { return `ID: ${publication.id} diff --git a/packages/client-lens/src/providers/StorjProvider.ts b/packages/client-lens/src/providers/StorjProvider.ts index b63fb57633e..bdd2aa5ede1 100644 --- a/packages/client-lens/src/providers/StorjProvider.ts +++ b/packages/client-lens/src/providers/StorjProvider.ts @@ -1,10 +1,10 @@ -import axios, { AxiosInstance } from "axios"; +import axios, { type AxiosInstance } from "axios"; import FormData from "form-data"; import type { IAgentRuntime } from "@elizaos/core"; // ipfs pinning service: https://storj.dev/dcs/api/storj-ipfs-pinning class StorjProvider { - private STORJ_API_URL: string = "https://www.storj-ipfs.com"; + private STORJ_API_URL = "https://www.storj-ipfs.com"; private STORJ_API_USERNAME: string; private STORJ_API_PASSWORD: string; private baseURL: string; @@ -73,8 +73,8 @@ class StorjProvider { headers: { "Content-Type": `multipart/form-data; boundary=${formData.getBoundary()}`, }, - maxContentLength: Infinity, - maxBodyLength: Infinity, + maxContentLength: Number.POSITIVE_INFINITY, + maxBodyLength: Number.POSITIVE_INFINITY, }); return this.gatewayURL(response.data.Hash); diff --git a/packages/client-lens/src/utils.ts b/packages/client-lens/src/utils.ts index 70d5d048f31..d9818a00a85 100644 --- a/packages/client-lens/src/utils.ts +++ b/packages/client-lens/src/utils.ts @@ -1,5 +1,5 @@ import { stringToUuid } from "@elizaos/core"; -import { BroadcastResult } from "./types"; +import type { BroadcastResult } from "./types"; export function publicationId({ pubId, diff --git a/packages/client-slack/__tests__/message-manager.test.ts b/packages/client-slack/__tests__/message-manager.test.ts index 765355663e6..f7a948f6464 100644 --- a/packages/client-slack/__tests__/message-manager.test.ts +++ b/packages/client-slack/__tests__/message-manager.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { MessageManager } from '../src/messages'; -import { WebClient } from '@slack/web-api'; -import { IAgentRuntime } from '@elizaos/core'; +import type { WebClient } from '@slack/web-api'; +import type { IAgentRuntime } from '@elizaos/core'; // Mock dependencies vi.mock('@slack/web-api'); diff --git a/packages/client-slack/__tests__/slack-client.provider.test.ts b/packages/client-slack/__tests__/slack-client.provider.test.ts index 144a22c89f6..75ee32c0c96 100644 --- a/packages/client-slack/__tests__/slack-client.provider.test.ts +++ b/packages/client-slack/__tests__/slack-client.provider.test.ts @@ -1,7 +1,7 @@ import { describe, expect, test, beforeEach, vi } from "vitest"; import { SlackClientProvider } from "../src/providers/slack-client.provider"; -import { SlackConfig } from "../src/types/slack-types"; -import { WebClient } from "@slack/web-api"; +import type { SlackConfig } from "../src/types/slack-types"; +import type { WebClient } from "@slack/web-api"; import type { AuthTestResponse, ChatPostMessageResponse, diff --git a/packages/client-slack/__tests__/slack-client.test.ts b/packages/client-slack/__tests__/slack-client.test.ts index 24de649fd6f..8eaa9dbdc6d 100644 --- a/packages/client-slack/__tests__/slack-client.test.ts +++ b/packages/client-slack/__tests__/slack-client.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { SlackClient } from '../src/index'; import { WebClient } from '@slack/web-api'; -import { IAgentRuntime, Character } from '@elizaos/core'; +import type { IAgentRuntime, Character } from '@elizaos/core'; // Mock dependencies vi.mock('@slack/web-api'); diff --git a/packages/client-slack/src/actions/chat_with_attachments.ts b/packages/client-slack/src/actions/chat_with_attachments.ts index b40353020d7..3a9392acbe3 100644 --- a/packages/client-slack/src/actions/chat_with_attachments.ts +++ b/packages/client-slack/src/actions/chat_with_attachments.ts @@ -6,15 +6,15 @@ import { getModelSettings, } from "@elizaos/core"; import { - Action, - ActionExample, - Content, - HandlerCallback, - Handler, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type Content, + type HandlerCallback, + type Handler, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; export const summarizationTemplate = `# Summarized so far (we are adding to this) diff --git a/packages/client-slack/src/actions/send-message.action.ts b/packages/client-slack/src/actions/send-message.action.ts index fa252f1a533..7cc90751e3b 100644 --- a/packages/client-slack/src/actions/send-message.action.ts +++ b/packages/client-slack/src/actions/send-message.action.ts @@ -1,4 +1,4 @@ -import { SlackClientContext, SlackMessage } from "../types/slack-types"; +import type { SlackClientContext, SlackMessage } from "../types/slack-types"; // Cache to store recently sent messages const recentMessages = new Map(); diff --git a/packages/client-slack/src/actions/summarize_conversation.ts b/packages/client-slack/src/actions/summarize_conversation.ts index 14649521222..35cfb7b694d 100644 --- a/packages/client-slack/src/actions/summarize_conversation.ts +++ b/packages/client-slack/src/actions/summarize_conversation.ts @@ -8,18 +8,18 @@ import { } from "@elizaos/core"; import { getActorDetails } from "@elizaos/core"; import { - Action, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Media, - Memory, + type Action, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Media, + type Memory, ModelClass, - State, + type State, elizaLogger, } from "@elizaos/core"; -import { ISlackService, SLACK_SERVICE_TYPE } from "../types/slack-types"; +import { type ISlackService, SLACK_SERVICE_TYPE } from "../types/slack-types"; export const summarizationTemplate = `# Summarized so far (we are adding to this) {{currentSummary}} @@ -95,7 +95,7 @@ const getDateRange = async ( if (!match) return null; const [_, amount, unit] = match; - const value = parseInt(amount); + const value = Number.parseInt(amount); if (isNaN(value)) return null; diff --git a/packages/client-slack/src/actions/transcribe_media.ts b/packages/client-slack/src/actions/transcribe_media.ts index abba39f0cb1..49249b5a005 100644 --- a/packages/client-slack/src/actions/transcribe_media.ts +++ b/packages/client-slack/src/actions/transcribe_media.ts @@ -4,15 +4,15 @@ import { parseJSONObjectFromText, } from "@elizaos/core"; import { - Action, - ActionExample, - Content, - HandlerCallback, - Handler, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type Content, + type HandlerCallback, + type Handler, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; export const transcriptionTemplate = `# Transcription of media file diff --git a/packages/client-slack/src/attachments.ts b/packages/client-slack/src/attachments.ts index 225ece61d4e..d8e6111ee40 100644 --- a/packages/client-slack/src/attachments.ts +++ b/packages/client-slack/src/attachments.ts @@ -4,16 +4,16 @@ import { parseJSONObjectFromText, } from "@elizaos/core"; import { - IAgentRuntime, - IImageDescriptionService, - IPdfService, - ITranscriptionService, - IVideoService, - Media, + type IAgentRuntime, + type IImageDescriptionService, + type IPdfService, + type ITranscriptionService, + type IVideoService, + type Media, ModelClass, ServiceType, } from "@elizaos/core"; -import { WebClient } from "@slack/web-api"; +import type { WebClient } from "@slack/web-api"; import ffmpeg from "fluent-ffmpeg"; import fs from "fs"; diff --git a/packages/client-slack/src/environment.ts b/packages/client-slack/src/environment.ts index dcaa2373735..0abbb9d2901 100644 --- a/packages/client-slack/src/environment.ts +++ b/packages/client-slack/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { elizaLogger } from "@elizaos/core"; import { z } from "zod"; @@ -14,7 +14,7 @@ export const slackEnvSchema = z.object({ SLACK_SERVER_PORT: z .string() .optional() - .transform((val) => (val ? parseInt(val) : 3000)), + .transform((val) => (val ? Number.parseInt(val) : 3000)), }); export type SlackConfig = z.infer; diff --git a/packages/client-slack/src/events.ts b/packages/client-slack/src/events.ts index c1c050fcb73..a17eaf8f822 100644 --- a/packages/client-slack/src/events.ts +++ b/packages/client-slack/src/events.ts @@ -1,7 +1,7 @@ import { createEventAdapter } from "@slack/events-api"; -import { WebClient } from "@slack/web-api"; -import { SlackConfig } from "./types/slack-types"; -import { MessageManager } from "./messages"; +import type { WebClient } from "@slack/web-api"; +import type { SlackConfig } from "./types/slack-types"; +import type { MessageManager } from "./messages"; import { elizaLogger } from "@elizaos/core"; export class EventHandler { diff --git a/packages/client-slack/src/examples/standalone-attachment.ts b/packages/client-slack/src/examples/standalone-attachment.ts index b8d78b59faa..4214af226a2 100644 --- a/packages/client-slack/src/examples/standalone-attachment.ts +++ b/packages/client-slack/src/examples/standalone-attachment.ts @@ -1,7 +1,7 @@ import { config } from "dotenv"; import { SlackClientProvider } from "../providers/slack-client.provider"; import { AttachmentManager } from "../attachments"; -import { SlackConfig } from "../types/slack-types"; +import type { SlackConfig } from "../types/slack-types"; import path from "path"; import { elizaLogger } from "@elizaos/core"; diff --git a/packages/client-slack/src/examples/standalone-example.ts b/packages/client-slack/src/examples/standalone-example.ts index accbd7caaf9..53ae672b7b8 100644 --- a/packages/client-slack/src/examples/standalone-example.ts +++ b/packages/client-slack/src/examples/standalone-example.ts @@ -1,5 +1,5 @@ import { SlackClientProvider } from "../providers/slack-client.provider"; -import { SlackConfig } from "../types/slack-types"; +import type { SlackConfig } from "../types/slack-types"; import { EventHandler } from "../events"; import { config } from "dotenv"; import { resolve } from "path"; @@ -107,7 +107,7 @@ async function runExample() { // Create Express app const app = express(); - const basePort = parseInt(process.env.PORT || "3000"); + const basePort = Number.parseInt(process.env.PORT || "3000"); // Mount the event handler app.use("/slack/events", events.expressMiddleware()); diff --git a/packages/client-slack/src/examples/standalone-summarize.ts b/packages/client-slack/src/examples/standalone-summarize.ts index e817a00eb85..1d78c721f6b 100644 --- a/packages/client-slack/src/examples/standalone-summarize.ts +++ b/packages/client-slack/src/examples/standalone-summarize.ts @@ -1,5 +1,5 @@ import { SlackClientProvider } from "../providers/slack-client.provider"; -import { SlackConfig } from "../types/slack-types"; +import type { SlackConfig } from "../types/slack-types"; import { config } from "dotenv"; import { resolve } from "path"; import { elizaLogger } from "@elizaos/core"; diff --git a/packages/client-slack/src/examples/standalone-transcribe.ts b/packages/client-slack/src/examples/standalone-transcribe.ts index 05bb24c5c03..99d90c529f6 100644 --- a/packages/client-slack/src/examples/standalone-transcribe.ts +++ b/packages/client-slack/src/examples/standalone-transcribe.ts @@ -1,5 +1,5 @@ import { SlackClientProvider } from "../providers/slack-client.provider"; -import { SlackConfig } from "../types/slack-types"; +import type { SlackConfig } from "../types/slack-types"; import { config } from "dotenv"; import { resolve } from "path"; import { elizaLogger } from "@elizaos/core"; diff --git a/packages/client-slack/src/index.ts b/packages/client-slack/src/index.ts index a3d8ee8199a..092486b283b 100644 --- a/packages/client-slack/src/index.ts +++ b/packages/client-slack/src/index.ts @@ -1,7 +1,7 @@ -import { Character, Client as ElizaClient, IAgentRuntime } from "@elizaos/core"; +import type { Character, Client as ElizaClient, IAgentRuntime } from "@elizaos/core"; import { elizaLogger } from "@elizaos/core"; import { WebClient } from "@slack/web-api"; -import express, { Request } from "express"; +import express, { type Request } from "express"; import { EventEmitter } from "events"; import { MessageManager } from "./messages"; import { validateSlackConfig } from "./environment"; diff --git a/packages/client-slack/src/messages.ts b/packages/client-slack/src/messages.ts index 8b7c76ace66..4b94c759f30 100644 --- a/packages/client-slack/src/messages.ts +++ b/packages/client-slack/src/messages.ts @@ -5,18 +5,18 @@ import { generateMessageResponse, generateShouldRespond, ModelClass, - Memory, - Content, - State, + type Memory, + type Content, + type State, elizaLogger, - HandlerCallback, + type HandlerCallback, } from "@elizaos/core"; import { slackMessageHandlerTemplate, slackShouldRespondTemplate, } from "./templates"; -import { WebClient } from "@slack/web-api"; -import { IAgentRuntime } from "@elizaos/core"; +import type { WebClient } from "@slack/web-api"; +import type { IAgentRuntime } from "@elizaos/core"; export class MessageManager { private client: WebClient; @@ -276,7 +276,7 @@ export class MessageManager { agentId: this.runtime.agentId, roomId, content, - createdAt: new Date(parseFloat(event.ts) * 1000).getTime(), + createdAt: new Date(Number.parseFloat(event.ts) * 1000).getTime(), embedding: getEmbeddingZeroVector(), }; diff --git a/packages/client-slack/src/providers/channelState.ts b/packages/client-slack/src/providers/channelState.ts index bf4afb95677..f058b14acaa 100644 --- a/packages/client-slack/src/providers/channelState.ts +++ b/packages/client-slack/src/providers/channelState.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; interface SlackEvent { channel: string; diff --git a/packages/client-slack/src/providers/slack-client.provider.ts b/packages/client-slack/src/providers/slack-client.provider.ts index 2517835700c..3f13a55b8f3 100644 --- a/packages/client-slack/src/providers/slack-client.provider.ts +++ b/packages/client-slack/src/providers/slack-client.provider.ts @@ -1,6 +1,6 @@ import { WebClient } from "@slack/web-api"; -import { SlackConfig, SlackClientContext } from "../types/slack-types"; -import { SlackUtils, RetryOptions } from "../utils/slack-utils"; +import type { SlackConfig, SlackClientContext } from "../types/slack-types"; +import { SlackUtils, type RetryOptions } from "../utils/slack-utils"; import { elizaLogger } from "@elizaos/core"; export class SlackClientProvider { diff --git a/packages/client-slack/src/services/slack.service.ts b/packages/client-slack/src/services/slack.service.ts index 5a1a6aa30d2..dccbde940bd 100644 --- a/packages/client-slack/src/services/slack.service.ts +++ b/packages/client-slack/src/services/slack.service.ts @@ -1,6 +1,6 @@ -import { Service, IAgentRuntime, ServiceType } from "@elizaos/core"; +import { Service, type IAgentRuntime, ServiceType } from "@elizaos/core"; import { WebClient } from "@slack/web-api"; -import { ISlackService } from "../types/slack-types"; +import type { ISlackService } from "../types/slack-types"; export class SlackService extends Service implements ISlackService { public client: WebClient; diff --git a/packages/client-slack/src/types/slack-types.ts b/packages/client-slack/src/types/slack-types.ts index 6773b9f4675..a39f4d08bff 100644 --- a/packages/client-slack/src/types/slack-types.ts +++ b/packages/client-slack/src/types/slack-types.ts @@ -1,5 +1,5 @@ -import { WebClient } from "@slack/web-api"; -import { Service, ServiceType } from "@elizaos/core"; +import type { WebClient } from "@slack/web-api"; +import { type Service, ServiceType } from "@elizaos/core"; export interface SlackConfig { appId: string; diff --git a/packages/client-slack/src/utils/slack-utils.ts b/packages/client-slack/src/utils/slack-utils.ts index 04afd2384b7..3ec7c3e6d1e 100644 --- a/packages/client-slack/src/utils/slack-utils.ts +++ b/packages/client-slack/src/utils/slack-utils.ts @@ -1,4 +1,4 @@ -import { WebClient } from "@slack/web-api"; +import type { WebClient } from "@slack/web-api"; export interface RetryOptions { maxRetries?: number; diff --git a/packages/client-telegram/__tests__/messageManager.test.ts b/packages/client-telegram/__tests__/messageManager.test.ts index 2b4323368e9..4d2b39bdbf0 100644 --- a/packages/client-telegram/__tests__/messageManager.test.ts +++ b/packages/client-telegram/__tests__/messageManager.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { MessageManager } from '../src/messageManager'; -import { IAgentRuntime } from '@elizaos/core'; -import { Context, Telegraf } from 'telegraf'; +import type { IAgentRuntime } from '@elizaos/core'; +import { type Context, Telegraf } from 'telegraf'; import { Message } from '@telegraf/types'; // Mock Telegraf diff --git a/packages/client-telegram/__tests__/telegramClient.test.ts b/packages/client-telegram/__tests__/telegramClient.test.ts index fdc4a60687a..c40785ed927 100644 --- a/packages/client-telegram/__tests__/telegramClient.test.ts +++ b/packages/client-telegram/__tests__/telegramClient.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { TelegramClient } from '../src/telegramClient'; -import { IAgentRuntime } from '@elizaos/core'; +import type { IAgentRuntime } from '@elizaos/core'; // Mock Telegraf vi.mock('telegraf', () => { diff --git a/packages/client-telegram/src/environment.ts b/packages/client-telegram/src/environment.ts index ef2739a23cf..9ae9c8de55a 100644 --- a/packages/client-telegram/src/environment.ts +++ b/packages/client-telegram/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const telegramEnvSchema = z.object({ diff --git a/packages/client-telegram/src/index.ts b/packages/client-telegram/src/index.ts index 61e9d091ae1..8f065a1c263 100644 --- a/packages/client-telegram/src/index.ts +++ b/packages/client-telegram/src/index.ts @@ -1,5 +1,5 @@ import { elizaLogger } from "@elizaos/core"; -import { Client, IAgentRuntime } from "@elizaos/core"; +import type { Client, IAgentRuntime } from "@elizaos/core"; import { TelegramClient } from "./telegramClient.ts"; import { validateTelegramConfig } from "./environment.ts"; diff --git a/packages/client-telegram/src/messageManager.ts b/packages/client-telegram/src/messageManager.ts index 3daf8f42eb9..34f0b69a009 100644 --- a/packages/client-telegram/src/messageManager.ts +++ b/packages/client-telegram/src/messageManager.ts @@ -1,5 +1,5 @@ -import { Message } from "@telegraf/types"; -import { Context, Telegraf } from "telegraf"; +import type { Message } from "@telegraf/types"; +import type { Context, Telegraf } from "telegraf"; import { composeContext, elizaLogger, @@ -8,15 +8,15 @@ import { } from "@elizaos/core"; import { getEmbeddingZeroVector } from "@elizaos/core"; import { - Content, - HandlerCallback, - IAgentRuntime, - IImageDescriptionService, - Memory, + type Content, + type HandlerCallback, + type IAgentRuntime, + type IImageDescriptionService, + type Memory, ModelClass, - State, - UUID, - Media, + type State, + type UUID, + type Media, } from "@elizaos/core"; import { stringToUuid } from "@elizaos/core"; diff --git a/packages/client-telegram/src/telegramClient.ts b/packages/client-telegram/src/telegramClient.ts index feeeb1848e3..3d02441e75d 100644 --- a/packages/client-telegram/src/telegramClient.ts +++ b/packages/client-telegram/src/telegramClient.ts @@ -1,6 +1,6 @@ -import { Context, Telegraf } from "telegraf"; +import { type Context, Telegraf } from "telegraf"; import { message } from "telegraf/filters"; -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { MessageManager } from "./messageManager.ts"; import { getOrCreateRecommenderInBe } from "./getOrCreateRecommenderInBe.ts"; diff --git a/packages/client-telegram/src/utils.ts b/packages/client-telegram/src/utils.ts index 185f6e833fa..0232eae931e 100644 --- a/packages/client-telegram/src/utils.ts +++ b/packages/client-telegram/src/utils.ts @@ -119,7 +119,7 @@ export function escapeMarkdown(text: string): string { /** * Splits a message into chunks that fit within Telegram's message length limit */ -export function splitMessage(text: string, maxLength: number = 4096): string[] { +export function splitMessage(text: string, maxLength = 4096): string[] { const chunks: string[] = []; let currentChunk = ""; diff --git a/packages/client-twitter/__tests__/base.test.ts b/packages/client-twitter/__tests__/base.test.ts index 59a15c33c9a..e42c7dabc08 100644 --- a/packages/client-twitter/__tests__/base.test.ts +++ b/packages/client-twitter/__tests__/base.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { ClientBase } from '../src/base'; -import { IAgentRuntime } from '@elizaos/core'; -import { TwitterConfig } from '../src/environment'; +import type { IAgentRuntime } from '@elizaos/core'; +import type { TwitterConfig } from '../src/environment'; describe('Twitter Client Base', () => { let mockRuntime: IAgentRuntime; diff --git a/packages/client-twitter/__tests__/environment.test.ts b/packages/client-twitter/__tests__/environment.test.ts index dccfd0584b1..16c1f2f22d9 100644 --- a/packages/client-twitter/__tests__/environment.test.ts +++ b/packages/client-twitter/__tests__/environment.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, vi } from 'vitest'; import { validateTwitterConfig } from '../src/environment'; -import { IAgentRuntime } from '@elizaos/core'; +import type { IAgentRuntime } from '@elizaos/core'; describe('Twitter Environment Configuration', () => { const mockRuntime: IAgentRuntime = { diff --git a/packages/client-twitter/__tests__/post.test.ts b/packages/client-twitter/__tests__/post.test.ts index 7459b68d626..db8aae69df5 100644 --- a/packages/client-twitter/__tests__/post.test.ts +++ b/packages/client-twitter/__tests__/post.test.ts @@ -1,8 +1,8 @@ import { describe, it, expect, vi } from 'vitest'; import { TwitterPostClient } from '../src/post'; import { ClientBase } from '../src/base'; -import { IAgentRuntime } from '@elizaos/core'; -import { TwitterConfig } from '../src/environment'; +import type { IAgentRuntime } from '@elizaos/core'; +import type { TwitterConfig } from '../src/environment'; describe('Twitter Post Client', () => { let mockRuntime: IAgentRuntime; diff --git a/packages/client-twitter/src/base.ts b/packages/client-twitter/src/base.ts index f49516dc8c4..d8b4dc042e2 100644 --- a/packages/client-twitter/src/base.ts +++ b/packages/client-twitter/src/base.ts @@ -1,23 +1,23 @@ import { - Content, - IAgentRuntime, - IImageDescriptionService, - Memory, - State, - UUID, + type Content, + type IAgentRuntime, + type IImageDescriptionService, + type Memory, + type State, + type UUID, getEmbeddingZeroVector, elizaLogger, stringToUuid, ActionTimelineType, } from "@elizaos/core"; import { - QueryTweetsResponse, + type QueryTweetsResponse, Scraper, SearchMode, - Tweet, + type Tweet, } from "agent-twitter-client"; import { EventEmitter } from "events"; -import { TwitterConfig } from "./environment.ts"; +import type { TwitterConfig } from "./environment.ts"; export function extractAnswer(text: string): string { const startIndex = text.indexOf("Answer: ") + 8; @@ -35,7 +35,7 @@ type TwitterProfile = { class RequestQueue { private queue: (() => Promise)[] = []; - private processing: boolean = false; + private processing = false; async add(request: () => Promise): Promise { return new Promise((resolve, reject) => { @@ -91,7 +91,7 @@ export class ClientBase extends EventEmitter { directions: string; lastCheckedTweetId: bigint | null = null; imageDescriptionService: IImageDescriptionService; - temperature: number = 0.5; + temperature = 0.5; requestQueue: RequestQueue = new RequestQueue(); @@ -263,7 +263,7 @@ export class ClientBase extends EventEmitter { ? await this.twitterClient.fetchFollowingTimeline(count, []) : await this.twitterClient.fetchHomeTimeline(count, []); - elizaLogger.debug(homeTimeline, { depth: Infinity }); + elizaLogger.debug(homeTimeline, { depth: Number.POSITIVE_INFINITY }); const processedTimeline = homeTimeline .filter((t) => t.__typename !== "TweetWithVisibilityResults") // what's this about? .map((tweet) => { diff --git a/packages/client-twitter/src/environment.ts b/packages/client-twitter/src/environment.ts index 77ed24b5596..4a75a7c5dfa 100644 --- a/packages/client-twitter/src/environment.ts +++ b/packages/client-twitter/src/environment.ts @@ -1,6 +1,6 @@ import { parseBooleanFromText, - IAgentRuntime, + type IAgentRuntime, ActionTimelineType, } from "@elizaos/core"; import { z, ZodError } from "zod"; @@ -98,7 +98,7 @@ function safeParseInt( defaultValue: number ): number { if (!value) return defaultValue; - const parsed = parseInt(value, 10); + const parsed = Number.parseInt(value, 10); return isNaN(parsed) ? defaultValue : Math.max(1, parsed); } diff --git a/packages/client-twitter/src/index.ts b/packages/client-twitter/src/index.ts index 1b6e533e8d2..52957c1878b 100644 --- a/packages/client-twitter/src/index.ts +++ b/packages/client-twitter/src/index.ts @@ -1,6 +1,6 @@ -import { Client, elizaLogger, IAgentRuntime } from "@elizaos/core"; +import { type Client, elizaLogger, type IAgentRuntime } from "@elizaos/core"; import { ClientBase } from "./base.ts"; -import { validateTwitterConfig, TwitterConfig } from "./environment.ts"; +import { validateTwitterConfig, type TwitterConfig } from "./environment.ts"; import { TwitterInteractionClient } from "./interactions.ts"; import { TwitterPostClient } from "./post.ts"; import { TwitterSearchClient } from "./search.ts"; diff --git a/packages/client-twitter/src/interactions.ts b/packages/client-twitter/src/interactions.ts index e95a2f211e6..1c32911c50c 100644 --- a/packages/client-twitter/src/interactions.ts +++ b/packages/client-twitter/src/interactions.ts @@ -1,23 +1,23 @@ -import { SearchMode, Tweet } from "agent-twitter-client"; +import { SearchMode, type Tweet } from "agent-twitter-client"; import { composeContext, generateMessageResponse, generateShouldRespond, messageCompletionFooter, shouldRespondFooter, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, stringToUuid, elizaLogger, getEmbeddingZeroVector, - IImageDescriptionService, + type IImageDescriptionService, ServiceType } from "@elizaos/core"; -import { ClientBase } from "./base"; +import type { ClientBase } from "./base"; import { buildConversationThread, sendTweet, wait } from "./utils.ts"; export const twitterMessageHandlerTemplate = @@ -160,7 +160,7 @@ export class TwitterInteractionClient { const validTweets = userTweets.filter((tweet) => { const isUnprocessed = !this.client.lastCheckedTweetId || - parseInt(tweet.id) > + Number.parseInt(tweet.id) > this.client.lastCheckedTweetId; const isRecent = Date.now() - tweet.timestamp * 1000 < @@ -522,12 +522,12 @@ export class TwitterInteractionClient { async buildConversationThread( tweet: Tweet, - maxReplies: number = 10 + maxReplies = 10 ): Promise { const thread: Tweet[] = []; const visited: Set = new Set(); - async function processThread(currentTweet: Tweet, depth: number = 0) { + async function processThread(currentTweet: Tweet, depth = 0) { elizaLogger.log("Processing tweet:", { id: currentTweet.id, inReplyToStatusId: currentTweet.inReplyToStatusId, diff --git a/packages/client-twitter/src/plugins/SttTtsSpacesPlugin.ts b/packages/client-twitter/src/plugins/SttTtsSpacesPlugin.ts index b23a25d79c2..767f96fad42 100644 --- a/packages/client-twitter/src/plugins/SttTtsSpacesPlugin.ts +++ b/packages/client-twitter/src/plugins/SttTtsSpacesPlugin.ts @@ -1,9 +1,9 @@ // src/plugins/SttTtsPlugin.ts import { spawn } from "child_process"; -import { ITranscriptionService, elizaLogger } from "@elizaos/core"; -import { Space, JanusClient, AudioDataWithUser } from "agent-twitter-client"; -import { Plugin } from "@elizaos/core"; +import { type ITranscriptionService, elizaLogger } from "@elizaos/core"; +import type { Space, JanusClient, AudioDataWithUser } from "agent-twitter-client"; +import type { Plugin } from "@elizaos/core"; interface PluginConfig { openAiApiKey?: string; // for STT & ChatGPT diff --git a/packages/client-twitter/src/post.ts b/packages/client-twitter/src/post.ts index 93d89930259..f8a22b8f687 100644 --- a/packages/client-twitter/src/post.ts +++ b/packages/client-twitter/src/post.ts @@ -1,20 +1,20 @@ -import { Tweet } from "agent-twitter-client"; +import type { Tweet } from "agent-twitter-client"; import { composeContext, generateText, getEmbeddingZeroVector, - IAgentRuntime, + type IAgentRuntime, ModelClass, stringToUuid, - TemplateType, - UUID, + type TemplateType, + type UUID, truncateToCompleteSentence, } from "@elizaos/core"; import { elizaLogger } from "@elizaos/core"; -import { ClientBase } from "./base.ts"; +import type { ClientBase } from "./base.ts"; import { postActionResponseFooter } from "@elizaos/core"; import { generateTweetActions } from "@elizaos/core"; -import { IImageDescriptionService, ServiceType } from "@elizaos/core"; +import { type IImageDescriptionService, ServiceType } from "@elizaos/core"; import { buildConversationThread } from "./utils.ts"; import { twitterMessageHandlerTemplate } from "./interactions.ts"; import { DEFAULT_MAX_TWEET_LENGTH } from "./environment.ts"; @@ -25,8 +25,8 @@ import { TextChannel, Partials, } from "discord.js"; -import { State } from "@elizaos/core"; -import { ActionResponse } from "@elizaos/core"; +import type { State } from "@elizaos/core"; +import type { ActionResponse } from "@elizaos/core"; const MAX_TIMELINES_TO_FETCH = 15; @@ -93,12 +93,12 @@ export class TwitterPostClient { client: ClientBase; runtime: IAgentRuntime; twitterUsername: string; - private isProcessing: boolean = false; - private lastProcessTime: number = 0; - private stopProcessingActions: boolean = false; + private isProcessing = false; + private lastProcessTime = 0; + private stopProcessingActions = false; private isDryRun: boolean; private discordClientForApproval: Client; - private approvalRequired: boolean = false; + private approvalRequired = false; private discordApprovalChannelId: string; private approvalCheckInterval: number; @@ -155,7 +155,7 @@ export class TwitterPostClient { ); const APPROVAL_CHECK_INTERVAL = - parseInt( + Number.parseInt( this.runtime.getSetting("TWITTER_APPROVAL_CHECK_INTERVAL") ) || 5 * 60 * 1000; // 5 minutes @@ -647,7 +647,7 @@ export class TwitterPostClient { } // Helper method to ensure tweet length compliance - private trimTweetLength(text: string, maxLength: number = 280): string { + private trimTweetLength(text: string, maxLength = 280): string { if (text.length <= maxLength) return text; // Try to cut at last sentence diff --git a/packages/client-twitter/src/search.ts b/packages/client-twitter/src/search.ts index 9da1be9fe6c..01ed6e68277 100644 --- a/packages/client-twitter/src/search.ts +++ b/packages/client-twitter/src/search.ts @@ -3,16 +3,16 @@ import { composeContext, elizaLogger } from "@elizaos/core"; import { generateMessageResponse, generateText } from "@elizaos/core"; import { messageCompletionFooter } from "@elizaos/core"; import { - Content, - HandlerCallback, - IAgentRuntime, - IImageDescriptionService, + type Content, + type HandlerCallback, + type IAgentRuntime, + type IImageDescriptionService, ModelClass, ServiceType, - State, + type State, } from "@elizaos/core"; import { stringToUuid } from "@elizaos/core"; -import { ClientBase } from "./base"; +import type { ClientBase } from "./base"; import { buildConversationThread, sendTweet, wait } from "./utils.ts"; const twitterSearchTemplate = diff --git a/packages/client-twitter/src/spaces.ts b/packages/client-twitter/src/spaces.ts index 831f42fd2c1..44f679c3298 100644 --- a/packages/client-twitter/src/spaces.ts +++ b/packages/client-twitter/src/spaces.ts @@ -1,20 +1,20 @@ import { elizaLogger, - IAgentRuntime, + type IAgentRuntime, composeContext, generateText, ModelClass, ServiceType, - ITranscriptionService, + type ITranscriptionService, } from "@elizaos/core"; -import { ClientBase } from "./base"; +import type { ClientBase } from "./base"; import { - Scraper, + type Scraper, Space, - SpaceConfig, + type SpaceConfig, RecordToDiskPlugin, IdleMonitorPlugin, - SpeakerRequest, + type SpeakerRequest, } from "agent-twitter-client"; import { SttTtsPlugin } from "./plugins/SttTtsSpacesPlugin.ts"; diff --git a/packages/client-twitter/src/utils.ts b/packages/client-twitter/src/utils.ts index 0f2c125ed12..d12bc9c4d17 100644 --- a/packages/client-twitter/src/utils.ts +++ b/packages/client-twitter/src/utils.ts @@ -1,14 +1,14 @@ -import { Tweet } from "agent-twitter-client"; +import type { Tweet } from "agent-twitter-client"; import { getEmbeddingZeroVector } from "@elizaos/core"; -import { Content, Memory, UUID } from "@elizaos/core"; +import type { Content, Memory, UUID } from "@elizaos/core"; import { stringToUuid } from "@elizaos/core"; -import { ClientBase } from "./base"; +import type { ClientBase } from "./base"; import { elizaLogger } from "@elizaos/core"; -import { Media } from "@elizaos/core"; +import type { Media } from "@elizaos/core"; import fs from "fs"; import path from "path"; -export const wait = (minTime: number = 1000, maxTime: number = 3000) => { +export const wait = (minTime = 1000, maxTime = 3000) => { const waitTime = Math.floor(Math.random() * (maxTime - minTime + 1)) + minTime; return new Promise((resolve) => setTimeout(resolve, waitTime)); @@ -32,12 +32,12 @@ export const isValidTweet = (tweet: Tweet): boolean => { export async function buildConversationThread( tweet: Tweet, client: ClientBase, - maxReplies: number = 10 + maxReplies = 10 ): Promise { const thread: Tweet[] = []; const visited: Set = new Set(); - async function processThread(currentTweet: Tweet, depth: number = 0) { + async function processThread(currentTweet: Tweet, depth = 0) { elizaLogger.debug("Processing tweet:", { id: currentTweet.id, inReplyToStatusId: currentTweet.inReplyToStatusId, diff --git a/packages/core/__tests__/actions.test.ts b/packages/core/__tests__/actions.test.ts index 311f996e7f1..346e55a8d5d 100644 --- a/packages/core/__tests__/actions.test.ts +++ b/packages/core/__tests__/actions.test.ts @@ -4,7 +4,7 @@ import { formatActionNames, formatActions, } from "../src/actions"; -import { Action } from "../src/types"; +import type { Action } from "../src/types"; describe("Actions", () => { const mockActions: Action[] = [ diff --git a/packages/core/__tests__/context.test.ts b/packages/core/__tests__/context.test.ts index c598c861bba..b0f88172573 100644 --- a/packages/core/__tests__/context.test.ts +++ b/packages/core/__tests__/context.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from "vitest"; import { composeContext } from "../src/context.ts"; import handlebars from "handlebars"; -import { State } from "../src/types.ts"; +import type { State } from "../src/types.ts"; describe("composeContext", () => { const baseState: State = { @@ -217,9 +217,7 @@ describe("composeContext", () => { it("should handle complex handlebars template", () => { // Register the 'gt' helper before running tests - handlebars.registerHelper("gt", function (a, b) { - return a > b; - }); + handlebars.registerHelper("gt", (a, b) => a > b); const state = { ...baseState, diff --git a/packages/core/__tests__/database.test.ts b/packages/core/__tests__/database.test.ts index 1c149d3cf44..d297d8defdb 100644 --- a/packages/core/__tests__/database.test.ts +++ b/packages/core/__tests__/database.test.ts @@ -1,14 +1,14 @@ /* eslint-disable no-dupe-class-members */ import { DatabaseAdapter } from "../src/database.ts"; import { - Memory, - Actor, - Account, - Goal, + type Memory, + type Actor, + type Account, + type Goal, GoalStatus, - Participant, - Relationship, - UUID, + type Participant, + type Relationship, + type UUID, } from "../src/types.ts"; class MockDatabaseAdapter extends DatabaseAdapter { diff --git a/packages/core/__tests__/embedding.test.ts b/packages/core/__tests__/embedding.test.ts index 465c6ca3a61..dcca8ad0572 100644 --- a/packages/core/__tests__/embedding.test.ts +++ b/packages/core/__tests__/embedding.test.ts @@ -5,7 +5,7 @@ import { getEmbeddingType, getEmbeddingZeroVector, } from "../src/embedding.ts"; -import { IAgentRuntime, ModelProviderName } from "../types.ts"; +import { type IAgentRuntime, ModelProviderName } from "../types.ts"; import settings from "../src/settings.ts"; // Mock environment-related settings diff --git a/packages/core/__tests__/evaluators.test.ts b/packages/core/__tests__/evaluators.test.ts index c459cad63b4..5050856a2d5 100644 --- a/packages/core/__tests__/evaluators.test.ts +++ b/packages/core/__tests__/evaluators.test.ts @@ -4,7 +4,7 @@ import { formatEvaluatorExamples, formatEvaluatorExampleDescriptions, } from "../src/evaluators"; -import { +import type { Evaluator, HandlerCallback, IAgentRuntime, @@ -31,20 +31,20 @@ const mockEvaluators: Evaluator[] = [ }, ], similes: [], - handler: function ( + handler: ( _runtime: IAgentRuntime, _message: Memory, _state?: State, _options?: { [key: string]: unknown }, _callback?: HandlerCallback - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - validate: function ( + validate: ( _runtime: IAgentRuntime, _message: Memory, _state?: State - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, }, @@ -65,20 +65,20 @@ const mockEvaluators: Evaluator[] = [ }, ], similes: [], - handler: function ( + handler: ( _runtime: IAgentRuntime, _message: Memory, _state?: State, _options?: { [key: string]: unknown }, _callback?: HandlerCallback - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - validate: function ( + validate: ( _runtime: IAgentRuntime, _message: Memory, _state?: State - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, }, diff --git a/packages/core/__tests__/goals.test.ts b/packages/core/__tests__/goals.test.ts index 8eda026c40b..be6a7f27305 100644 --- a/packages/core/__tests__/goals.test.ts +++ b/packages/core/__tests__/goals.test.ts @@ -5,14 +5,14 @@ import { createGoal, } from "../src/goals.ts"; import { - Goal, + type Goal, GoalStatus, - IAgentRuntime, - Memory, - State, - UUID, - Service, - ServiceType, + type IAgentRuntime, + type Memory, + type State, + type UUID, + type Service, + type ServiceType, } from "../src/types.ts"; import { CacheManager, MemoryCacheAdapter } from "../src/cache.ts"; import { describe, expect, vi, beforeEach } from "vitest"; @@ -34,34 +34,34 @@ export const mockRuntime: IAgentRuntime = { serverUrl: "", token: null, messageManager: { - addEmbeddingToMemory: function (_memory: Memory): Promise { + addEmbeddingToMemory: (_memory: Memory): Promise => { throw new Error("Function not implemented."); }, - getMemories: function (_opts: { + getMemories: (_opts: { roomId: UUID; count?: number; unique?: boolean; agentId?: UUID; start?: number; end?: number; - }): Promise { + }): Promise => { throw new Error("Function not implemented."); }, - getCachedEmbeddings: function ( + getCachedEmbeddings: ( _content: string - ): Promise<{ embedding: number[]; levenshtein_score: number }[]> { + ): Promise<{ embedding: number[]; levenshtein_score: number }[]> => { throw new Error("Function not implemented."); }, - getMemoryById: function (_id: UUID): Promise { + getMemoryById: (_id: UUID): Promise => { throw new Error("Function not implemented."); }, - getMemoriesByRoomIds: function (_params: { + getMemoriesByRoomIds: (_params: { roomIds: UUID[]; agentId?: UUID; - }): Promise { + }): Promise => { throw new Error("Function not implemented."); }, - searchMemoriesByEmbedding: function ( + searchMemoriesByEmbedding: ( _embedding: number[], _opts: { match_threshold?: number; @@ -70,57 +70,57 @@ export const mockRuntime: IAgentRuntime = { unique?: boolean; agentId?: UUID; } - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - createMemory: function ( + createMemory: ( _memory: Memory, _unique?: boolean - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - removeMemory: function (_memoryId: UUID): Promise { + removeMemory: (_memoryId: UUID): Promise => { throw new Error("Function not implemented."); }, - removeAllMemories: function (_roomId: UUID): Promise { + removeAllMemories: (_roomId: UUID): Promise => { throw new Error("Function not implemented."); }, - countMemories: function ( + countMemories: ( _roomId: UUID, _unique?: boolean - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, }, descriptionManager: { - addEmbeddingToMemory: function (_memory: Memory): Promise { + addEmbeddingToMemory: (_memory: Memory): Promise => { throw new Error("Function not implemented."); }, - getMemories: function (_opts: { + getMemories: (_opts: { roomId: UUID; count?: number; unique?: boolean; agentId?: UUID; start?: number; end?: number; - }): Promise { + }): Promise => { throw new Error("Function not implemented."); }, - getCachedEmbeddings: function ( + getCachedEmbeddings: ( _content: string - ): Promise<{ embedding: number[]; levenshtein_score: number }[]> { + ): Promise<{ embedding: number[]; levenshtein_score: number }[]> => { throw new Error("Function not implemented."); }, - getMemoryById: function (_id: UUID): Promise { + getMemoryById: (_id: UUID): Promise => { throw new Error("Function not implemented."); }, - getMemoriesByRoomIds: function (_params: { + getMemoriesByRoomIds: (_params: { roomIds: UUID[]; agentId?: UUID; - }): Promise { + }): Promise => { throw new Error("Function not implemented."); }, - searchMemoriesByEmbedding: function ( + searchMemoriesByEmbedding: ( _embedding: number[], _opts: { match_threshold?: number; @@ -129,57 +129,57 @@ export const mockRuntime: IAgentRuntime = { unique?: boolean; agentId?: UUID; } - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - createMemory: function ( + createMemory: ( _memory: Memory, _unique?: boolean - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - removeMemory: function (_memoryId: UUID): Promise { + removeMemory: (_memoryId: UUID): Promise => { throw new Error("Function not implemented."); }, - removeAllMemories: function (_roomId: UUID): Promise { + removeAllMemories: (_roomId: UUID): Promise => { throw new Error("Function not implemented."); }, - countMemories: function ( + countMemories: ( _roomId: UUID, _unique?: boolean - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, }, loreManager: { - addEmbeddingToMemory: function (_memory: Memory): Promise { + addEmbeddingToMemory: (_memory: Memory): Promise => { throw new Error("Function not implemented."); }, - getMemories: function (_opts: { + getMemories: (_opts: { roomId: UUID; count?: number; unique?: boolean; agentId?: UUID; start?: number; end?: number; - }): Promise { + }): Promise => { throw new Error("Function not implemented."); }, - getCachedEmbeddings: function ( + getCachedEmbeddings: ( _content: string - ): Promise<{ embedding: number[]; levenshtein_score: number }[]> { + ): Promise<{ embedding: number[]; levenshtein_score: number }[]> => { throw new Error("Function not implemented."); }, - getMemoryById: function (_id: UUID): Promise { + getMemoryById: (_id: UUID): Promise => { throw new Error("Function not implemented."); }, - getMemoriesByRoomIds: function (_params: { + getMemoriesByRoomIds: (_params: { roomIds: UUID[]; agentId?: UUID; - }): Promise { + }): Promise => { throw new Error("Function not implemented."); }, - searchMemoriesByEmbedding: function ( + searchMemoriesByEmbedding: ( _embedding: number[], _opts: { match_threshold?: number; @@ -188,47 +188,45 @@ export const mockRuntime: IAgentRuntime = { unique?: boolean; agentId?: UUID; } - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - createMemory: function ( + createMemory: ( _memory: Memory, _unique?: boolean - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - removeMemory: function (_memoryId: UUID): Promise { + removeMemory: (_memoryId: UUID): Promise => { throw new Error("Function not implemented."); }, - removeAllMemories: function (_roomId: UUID): Promise { + removeAllMemories: (_roomId: UUID): Promise => { throw new Error("Function not implemented."); }, - countMemories: function ( + countMemories: ( _roomId: UUID, _unique?: boolean - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, }, - ensureRoomExists: function (_roomId: UUID): Promise { + ensureRoomExists: (_roomId: UUID): Promise => { throw new Error("Function not implemented."); }, - composeState: function ( + composeState: ( _message: Memory, _additionalKeys?: { [key: string]: unknown } - ): Promise { + ): Promise => { throw new Error("Function not implemented."); }, - updateRecentMessageState: function (_state: State): Promise { + updateRecentMessageState: (_state: State): Promise => { throw new Error("Function not implemented."); }, - getService: function ( + getService: ( serviceType: ServiceType - ): T | null { - return (services.get(serviceType) as T) || null; - }, + ): T | null => (services.get(serviceType) as T) || null, plugins: [], - initialize: function (): Promise { + initialize: (): Promise => { throw new Error("Function not implemented."); }, }; diff --git a/packages/core/__tests__/knowledge.test.ts b/packages/core/__tests__/knowledge.test.ts index daf2882ab61..286fcbcd940 100644 --- a/packages/core/__tests__/knowledge.test.ts +++ b/packages/core/__tests__/knowledge.test.ts @@ -1,7 +1,7 @@ import { describe, it, expect, vi, beforeEach } from "vitest"; import knowledge from "../src/knowledge"; -import { AgentRuntime } from "../src/runtime"; -import { KnowledgeItem, Memory } from "../src/types"; +import type { AgentRuntime } from "../src/runtime"; +import { KnowledgeItem, type Memory } from "../src/types"; // Mock dependencies vi.mock("../embedding", () => ({ diff --git a/packages/core/__tests__/memory.test.ts b/packages/core/__tests__/memory.test.ts index fec3f007ab9..498ba2cafd8 100644 --- a/packages/core/__tests__/memory.test.ts +++ b/packages/core/__tests__/memory.test.ts @@ -1,7 +1,7 @@ import { MemoryManager } from "../src/memory"; import { CacheManager, MemoryCacheAdapter } from "../src/cache"; import { describe, expect, it, vi, beforeEach } from "vitest"; -import { IAgentRuntime, Memory, UUID } from "../src/types"; +import type { IAgentRuntime, Memory, UUID } from "../src/types"; describe("MemoryManager", () => { let memoryManager: MemoryManager; diff --git a/packages/core/__tests__/messages.test.ts b/packages/core/__tests__/messages.test.ts index ad12a38e52e..fe2fba28f50 100644 --- a/packages/core/__tests__/messages.test.ts +++ b/packages/core/__tests__/messages.test.ts @@ -4,7 +4,7 @@ import { getActorDetails, formatTimestamp, } from "../src/messages.ts"; -import { IAgentRuntime, Actor, Content, Memory, UUID } from "../src/types.ts"; +import type { IAgentRuntime, Actor, Content, Memory, UUID } from "../src/types.ts"; import { describe, test, expect, vi, beforeAll } from "vitest"; describe("Messages Library", () => { diff --git a/packages/core/__tests__/posts.test.ts b/packages/core/__tests__/posts.test.ts index ee0b25acd34..ae445c7ad70 100644 --- a/packages/core/__tests__/posts.test.ts +++ b/packages/core/__tests__/posts.test.ts @@ -1,5 +1,5 @@ import { formatPosts } from "../src/posts.ts"; -import { Actor, Memory } from "../src/types.ts"; +import type { Actor, Memory } from "../src/types.ts"; // Mocked data with consistent conversation IDs const mockActors: Actor[] = [ diff --git a/packages/core/__tests__/providers.test.ts b/packages/core/__tests__/providers.test.ts index 023963ec286..c6ee6ec2f11 100644 --- a/packages/core/__tests__/providers.test.ts +++ b/packages/core/__tests__/providers.test.ts @@ -1,9 +1,9 @@ import { getProviders } from "../src/providers.ts"; -import { +import type { IAgentRuntime, - type Memory, - type State, - type Provider, + Memory, + State, + Provider, UUID, } from "../src/types.ts"; diff --git a/packages/core/__tests__/relationships.test.ts b/packages/core/__tests__/relationships.test.ts index 1da63f4a7ee..b0b525eb58e 100644 --- a/packages/core/__tests__/relationships.test.ts +++ b/packages/core/__tests__/relationships.test.ts @@ -4,7 +4,7 @@ import { getRelationships, formatRelationships, } from "../src/relationships"; -import { IAgentRuntime, type Relationship, type UUID } from "../src/types"; +import type { IAgentRuntime, Relationship, UUID } from "../src/types"; import { describe, expect, vi } from "vitest"; // Mock runtime and databaseAdapter diff --git a/packages/core/__tests__/runtime.test.ts b/packages/core/__tests__/runtime.test.ts index 5d862d653e8..5c63277b077 100644 --- a/packages/core/__tests__/runtime.test.ts +++ b/packages/core/__tests__/runtime.test.ts @@ -1,11 +1,11 @@ import { describe, it, expect, beforeEach, vi } from "vitest"; import { AgentRuntime } from "../src/runtime"; import { - IDatabaseAdapter, + type IDatabaseAdapter, ModelProviderName, - Action, - Memory, - UUID, + type Action, + type Memory, + type UUID, } from "../src/types"; import { defaultCharacter } from "../src/defaultCharacter"; diff --git a/packages/core/__tests__/uuid.test.ts b/packages/core/__tests__/uuid.test.ts index f737acea0b0..4e199ed2cd1 100644 --- a/packages/core/__tests__/uuid.test.ts +++ b/packages/core/__tests__/uuid.test.ts @@ -79,7 +79,7 @@ describe("UUID Module", () => { it("should set correct variant bits (RFC4122)", () => { const uuid = stringToUuid(testString) as UUID; - const variantByte = parseInt( + const variantByte = Number.parseInt( uuid.split("-")[3].slice(0, 2), 16 ); diff --git a/packages/core/__tests__/videoGeneration.test.ts b/packages/core/__tests__/videoGeneration.test.ts index 7033a46da6b..e0545876fdf 100644 --- a/packages/core/__tests__/videoGeneration.test.ts +++ b/packages/core/__tests__/videoGeneration.test.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, State } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State } from "@elizaos/core"; import { describe, it, expect, beforeEach, vi } from "vitest"; // Mock the fetch function diff --git a/packages/core/src/actions.ts b/packages/core/src/actions.ts index 7df740f9b18..5da6017997c 100644 --- a/packages/core/src/actions.ts +++ b/packages/core/src/actions.ts @@ -1,5 +1,5 @@ import { names, uniqueNamesGenerator } from "unique-names-generator"; -import { Action, ActionExample } from "./types.ts"; +import type { Action, ActionExample } from "./types.ts"; /** * Composes a set of example conversations based on provided actions and a specified count. diff --git a/packages/core/src/context.ts b/packages/core/src/context.ts index 059e302d625..37012b5d28f 100644 --- a/packages/core/src/context.ts +++ b/packages/core/src/context.ts @@ -1,5 +1,5 @@ import handlebars from "handlebars"; -import { type State, type TemplateType } from "./types.ts"; +import type { State, TemplateType } from "./types.ts"; import { names, uniqueNamesGenerator } from "unique-names-generator"; /** diff --git a/packages/core/src/database.ts b/packages/core/src/database.ts index 4491d5cf2f1..8fa44b03cbc 100644 --- a/packages/core/src/database.ts +++ b/packages/core/src/database.ts @@ -1,11 +1,11 @@ -import { +import type { Account, Actor, GoalStatus, - type Goal, - type Memory, - type Relationship, - type UUID, + Goal, + Memory, + Relationship, + UUID, RAGKnowledgeItem, Participant, IDatabaseAdapter, diff --git a/packages/core/src/database/CircuitBreaker.ts b/packages/core/src/database/CircuitBreaker.ts index 728cdf99b4c..bc9b347a0a2 100644 --- a/packages/core/src/database/CircuitBreaker.ts +++ b/packages/core/src/database/CircuitBreaker.ts @@ -2,9 +2,9 @@ export type CircuitBreakerState = "CLOSED" | "OPEN" | "HALF_OPEN"; export class CircuitBreaker { private state: CircuitBreakerState = "CLOSED"; - private failureCount: number = 0; + private failureCount = 0; private lastFailureTime?: number; - private halfOpenSuccesses: number = 0; + private halfOpenSuccesses = 0; private readonly failureThreshold: number; private readonly resetTimeout: number; diff --git a/packages/core/src/defaultCharacter.ts b/packages/core/src/defaultCharacter.ts index 8faaa64f2b4..adb0b12a00f 100644 --- a/packages/core/src/defaultCharacter.ts +++ b/packages/core/src/defaultCharacter.ts @@ -1,4 +1,4 @@ -import { Character, ModelProviderName } from "./types.ts"; +import { type Character, ModelProviderName } from "./types.ts"; export const defaultCharacter: Character = { name: "Eliza", diff --git a/packages/core/src/embedding.ts b/packages/core/src/embedding.ts index ce2d00b21b7..5fb7d75ede2 100644 --- a/packages/core/src/embedding.ts +++ b/packages/core/src/embedding.ts @@ -1,5 +1,5 @@ import { getEmbeddingModelSettings, getEndpoint } from "./models.ts"; -import { IAgentRuntime, ModelProviderName } from "./types.ts"; +import { type IAgentRuntime, ModelProviderName } from "./types.ts"; import settings from "./settings.ts"; import elizaLogger from "./logger.ts"; import LocalEmbeddingModelManager from "./localembeddingManager.ts"; diff --git a/packages/core/src/evaluators.ts b/packages/core/src/evaluators.ts index 426d452af3d..b83604e5c0e 100644 --- a/packages/core/src/evaluators.ts +++ b/packages/core/src/evaluators.ts @@ -1,5 +1,5 @@ import { names, uniqueNamesGenerator } from "unique-names-generator"; -import { ActionExample, type Evaluator } from "./types.ts"; +import type { ActionExample, Evaluator } from "./types.ts"; import { stringArrayFooter } from "./parsing.ts"; /** diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 4c3d51fae70..1b2174afca3 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -7,17 +7,17 @@ import { RecursiveCharacterTextSplitter } from "langchain/text_splitter"; import { generateObject as aiGenerateObject, generateText as aiGenerateText, - CoreTool, - GenerateObjectResult, - StepResult as AIStepResult, + type CoreTool, + type GenerateObjectResult, + type StepResult as AIStepResult, } from "ai"; import { Buffer } from "buffer"; import { createOllama } from "ollama-ai-provider"; import OpenAI from "openai"; -import { encodingForModel, TiktokenModel } from "js-tiktoken"; +import { encodingForModel, type TiktokenModel } from "js-tiktoken"; import { AutoTokenizer } from "@huggingface/transformers"; import Together from "together-ai"; -import { ZodSchema } from "zod"; +import type { ZodSchema } from "zod"; import { elizaLogger } from "./index.ts"; import { models, @@ -34,19 +34,19 @@ import { } from "./parsing.ts"; import settings from "./settings.ts"; import { - Content, - IAgentRuntime, - IImageDescriptionService, - ITextGenerationService, + type Content, + type IAgentRuntime, + type IImageDescriptionService, + type ITextGenerationService, ModelClass, ModelProviderName, ServiceType, - ActionResponse, - IVerifiableInferenceAdapter, - VerifiableInferenceOptions, - VerifiableInferenceResult, + type ActionResponse, + type IVerifiableInferenceAdapter, + type VerifiableInferenceOptions, + type VerifiableInferenceResult, //VerifiableInferenceProvider, - TelemetrySettings, + type TelemetrySettings, TokenizerType, } from "./types.ts"; import { fal } from "@fal-ai/client"; @@ -1322,8 +1322,8 @@ export async function generateShouldRespond({ */ export async function splitChunks( content: string, - chunkSize: number = 512, - bleed: number = 20 + chunkSize = 512, + bleed = 20 ): Promise { elizaLogger.debug(`[splitChunks] Starting text split`); diff --git a/packages/core/src/goals.ts b/packages/core/src/goals.ts index 17cfd5a24dd..305d39b9ffd 100644 --- a/packages/core/src/goals.ts +++ b/packages/core/src/goals.ts @@ -1,8 +1,8 @@ -import { +import type { IAgentRuntime, - type Goal, - type Objective, - type UUID, + Goal, + Objective, + UUID, } from "./types.ts"; export const getGoals = async ({ diff --git a/packages/core/src/knowledge.ts b/packages/core/src/knowledge.ts index 96a78514c67..1b4debf3696 100644 --- a/packages/core/src/knowledge.ts +++ b/packages/core/src/knowledge.ts @@ -1,6 +1,6 @@ -import { AgentRuntime } from "./runtime.ts"; +import type { AgentRuntime } from "./runtime.ts"; import { embed, getEmbeddingZeroVector } from "./embedding.ts"; -import { KnowledgeItem, UUID, type Memory } from "./types.ts"; +import type { KnowledgeItem, UUID, Memory } from "./types.ts"; import { stringToUuid } from "./uuid.ts"; import { splitChunks } from "./generation.ts"; import elizaLogger from "./logger.ts"; @@ -67,8 +67,8 @@ async function get( async function set( runtime: AgentRuntime, item: KnowledgeItem, - chunkSize: number = 512, - bleed: number = 20 + chunkSize = 512, + bleed = 20 ) { await runtime.documentsManager.createMemory({ id: item.id, diff --git a/packages/core/src/memory.ts b/packages/core/src/memory.ts index 698c1c63376..ce8cfaa0175 100644 --- a/packages/core/src/memory.ts +++ b/packages/core/src/memory.ts @@ -1,10 +1,10 @@ import { embed, getEmbeddingZeroVector } from "./embedding.ts"; import elizaLogger from "./logger.ts"; -import { +import type { IAgentRuntime, IMemoryManager, - type Memory, - type UUID, + Memory, + UUID, } from "./types.ts"; const defaultMatchThreshold = 0.1; diff --git a/packages/core/src/messages.ts b/packages/core/src/messages.ts index b098198c4f6..4ddc2ae9aff 100644 --- a/packages/core/src/messages.ts +++ b/packages/core/src/messages.ts @@ -1,9 +1,9 @@ -import { +import type { IAgentRuntime, - type Actor, - type Content, - type Memory, - type UUID, + Actor, + Content, + Memory, + UUID, } from "./types.ts"; /** diff --git a/packages/core/src/models.ts b/packages/core/src/models.ts index af6faf44fa2..52371c47942 100644 --- a/packages/core/src/models.ts +++ b/packages/core/src/models.ts @@ -1,11 +1,11 @@ import settings from "./settings.ts"; import { - EmbeddingModelSettings, - ImageModelSettings, + type EmbeddingModelSettings, + type ImageModelSettings, ModelClass, ModelProviderName, - Models, - ModelSettings, + type Models, + type ModelSettings, } from "./types.ts"; export const models: Models = { diff --git a/packages/core/src/parsing.ts b/packages/core/src/parsing.ts index 331cd30a13b..0d9b5defe55 100644 --- a/packages/core/src/parsing.ts +++ b/packages/core/src/parsing.ts @@ -1,4 +1,4 @@ -import { ActionResponse } from "./types.ts"; +import type { ActionResponse } from "./types.ts"; const jsonBlockPattern = /```json\n([\s\S]*?)\n```/; export const messageCompletionFooter = `\nResponse format should be formatted in a JSON block like this: diff --git a/packages/core/src/providers.ts b/packages/core/src/providers.ts index d6335b97e10..326956715ca 100644 --- a/packages/core/src/providers.ts +++ b/packages/core/src/providers.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, State, type Memory } from "./types.ts"; +import type { IAgentRuntime, State, Memory } from "./types.ts"; /** * Formats provider outputs into a string which can be injected into the context. diff --git a/packages/core/src/ragknowledge.ts b/packages/core/src/ragknowledge.ts index 5c7cdb5cd84..3d6be4ab42c 100644 --- a/packages/core/src/ragknowledge.ts +++ b/packages/core/src/ragknowledge.ts @@ -2,10 +2,10 @@ import { embed } from "./embedding.ts"; import { splitChunks } from "./generation.ts"; import elizaLogger from "./logger.ts"; import { - IAgentRuntime, - IRAGKnowledgeManager, - RAGKnowledgeItem, - UUID, + type IAgentRuntime, + type IRAGKnowledgeManager, + type RAGKnowledgeItem, + type UUID, KnowledgeScope, } from "./types.ts"; import { stringToUuid } from "./uuid.ts"; diff --git a/packages/core/src/relationships.ts b/packages/core/src/relationships.ts index ac79987ae70..73320d84d75 100644 --- a/packages/core/src/relationships.ts +++ b/packages/core/src/relationships.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, type Relationship, type UUID } from "./types.ts"; +import type { IAgentRuntime, Relationship, UUID } from "./types.ts"; export async function createRelationship({ runtime, diff --git a/packages/core/src/runtime.ts b/packages/core/src/runtime.ts index 80f7987747b..371e4e45061 100644 --- a/packages/core/src/runtime.ts +++ b/packages/core/src/runtime.ts @@ -27,31 +27,31 @@ import { getProviders } from "./providers.ts"; import { RAGKnowledgeManager } from "./ragknowledge.ts"; import settings from "./settings.ts"; import { - Character, - Goal, - HandlerCallback, - IAgentRuntime, - ICacheManager, - IDatabaseAdapter, - IMemoryManager, - IRAGKnowledgeManager, - IVerifiableInferenceAdapter, - KnowledgeItem, + type Character, + type Goal, + type HandlerCallback, + type IAgentRuntime, + type ICacheManager, + type IDatabaseAdapter, + type IMemoryManager, + type IRAGKnowledgeManager, + type IVerifiableInferenceAdapter, + type KnowledgeItem, // RAGKnowledgeItem, //Media, ModelClass, ModelProviderName, - Plugin, - Provider, - Service, - ServiceType, - State, - UUID, + type Plugin, + type Provider, + type Service, + type ServiceType, + type State, + type UUID, type Action, type Actor, type Evaluator, type Memory, - DirectoryItem, + type DirectoryItem, } from "./types.ts"; import { stringToUuid } from "./uuid.ts"; import { glob } from "glob"; @@ -1256,7 +1256,7 @@ export class AgentRuntime implements IAgentRuntime { allAttachments = recentMessagesData .reverse() - .map((msg) => { + .flatMap((msg) => { const msgTime = msg.createdAt ?? Date.now(); const isWithinTime = msgTime >= oneHourBeforeLastMessage; @@ -1267,8 +1267,7 @@ export class AgentRuntime implements IAgentRuntime { }); } return attachments; - }) - .flat(); + }); } } diff --git a/packages/core/src/test_resources/constants.ts b/packages/core/src/test_resources/constants.ts index 5681992485e..6d4b628baf5 100644 --- a/packages/core/src/test_resources/constants.ts +++ b/packages/core/src/test_resources/constants.ts @@ -1,4 +1,4 @@ -import { type UUID } from "@elizaos/core"; +import type { UUID } from "@elizaos/core"; export const SERVER_URL = "http://localhost:7998"; export const SUPABASE_URL = "https://pronvzrzfwsptkojvudd.supabase.co"; diff --git a/packages/core/src/test_resources/createRuntime.ts b/packages/core/src/test_resources/createRuntime.ts index ffc3b5f4413..52cee4f51ef 100644 --- a/packages/core/src/test_resources/createRuntime.ts +++ b/packages/core/src/test_resources/createRuntime.ts @@ -5,10 +5,10 @@ import { import { SqlJsDatabaseAdapter } from "@elizaos/adapter-sqljs"; import { SupabaseDatabaseAdapter } from "@elizaos/adapter-supabase"; import { PGLiteDatabaseAdapter } from "@elizaos/adapter-pglite"; -import { DatabaseAdapter } from "../database.ts"; +import type { DatabaseAdapter } from "../database.ts"; import { getEndpoint } from "../models.ts"; import { AgentRuntime } from "../runtime.ts"; -import { Action, Evaluator, ModelProviderName, Provider } from "../types.ts"; +import { type Action, type Evaluator, ModelProviderName, type Provider } from "../types.ts"; import { SUPABASE_ANON_KEY, SUPABASE_URL, @@ -16,7 +16,7 @@ import { TEST_PASSWORD, zeroUuid, } from "./constants.ts"; -import { User } from "./types.ts"; +import type { User } from "./types.ts"; /** * Creates a runtime environment for the agent. diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index e34da93d06b..c1feaf6a644 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -1,4 +1,4 @@ -import { Readable } from "stream"; +import type { Readable } from "stream"; /** * Represents a UUID string in the format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" @@ -1384,13 +1384,13 @@ export interface GraphQLTag { values: any[]; } -export const enum IrysMessageType { +export enum IrysMessageType { REQUEST = "REQUEST", DATA_STORAGE = "DATA_STORAGE", REQUEST_RESPONSE = "REQUEST_RESPONSE", } -export const enum IrysDataType { +export enum IrysDataType { FILE = "FILE", IMAGE = "IMAGE", OTHER = "OTHER", diff --git a/packages/core/src/uuid.ts b/packages/core/src/uuid.ts index dee5decfff2..7baef4290ff 100644 --- a/packages/core/src/uuid.ts +++ b/packages/core/src/uuid.ts @@ -1,5 +1,5 @@ import { sha1 } from "js-sha1"; -import { UUID } from "./types.ts"; +import type { UUID } from "./types.ts"; import { z } from "zod"; export const uuidSchema = z.string().uuid() as z.ZodType; @@ -42,7 +42,7 @@ export function stringToUuid(target: string | number): UUID { const hash = sha1(buffer); const hashBuffer = new Uint8Array(hash.length / 2); for (let i = 0; i < hash.length; i += 2) { - hashBuffer[i / 2] = parseInt(hash.slice(i, i + 2), 16); + hashBuffer[i / 2] = Number.parseInt(hash.slice(i, i + 2), 16); } return (_uint8ArrayToHex(hashBuffer.slice(0, 4)) + diff --git a/packages/plugin-0g/src/actions/upload.ts b/packages/plugin-0g/src/actions/upload.ts index 13b72f1652b..ae260cb8030 100644 --- a/packages/plugin-0g/src/actions/upload.ts +++ b/packages/plugin-0g/src/actions/upload.ts @@ -1,12 +1,12 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, ModelClass, - Content, - ActionExample, + type Content, + type ActionExample, generateObject, elizaLogger, } from "@elizaos/core"; @@ -76,7 +76,7 @@ export const zgUpload: Action = { } const config = { - maxFileSize: parseInt(runtime.getSetting("ZEROG_MAX_FILE_SIZE") || "10485760"), + maxFileSize: Number.parseInt(runtime.getSetting("ZEROG_MAX_FILE_SIZE") || "10485760"), allowedExtensions: runtime.getSetting("ZEROG_ALLOWED_EXTENSIONS")?.split(",") || [".pdf", ".png", ".jpg", ".jpeg", ".doc", ".docx"], uploadDirectory: runtime.getSetting("ZEROG_UPLOAD_DIR") || "/tmp/zerog-uploads", enableVirusScan: runtime.getSetting("ZEROG_ENABLE_VIRUS_SCAN") === "true" @@ -188,7 +188,7 @@ export const zgUpload: Action = { // Initialize security validator const securityConfig = { - maxFileSize: parseInt(runtime.getSetting("ZEROG_MAX_FILE_SIZE") || "10485760"), + maxFileSize: Number.parseInt(runtime.getSetting("ZEROG_MAX_FILE_SIZE") || "10485760"), allowedExtensions: runtime.getSetting("ZEROG_ALLOWED_EXTENSIONS")?.split(",") || [".pdf", ".png", ".jpg", ".jpeg", ".doc", ".docx"], uploadDirectory: runtime.getSetting("ZEROG_UPLOAD_DIR") || "/tmp/zerog-uploads", enableVirusScan: runtime.getSetting("ZEROG_ENABLE_VIRUS_SCAN") === "true" diff --git a/packages/plugin-0g/src/index.ts b/packages/plugin-0g/src/index.ts index 959b3cf192d..70ede43647d 100644 --- a/packages/plugin-0g/src/index.ts +++ b/packages/plugin-0g/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { zgUpload } from "./actions/upload"; export const zgPlugin: Plugin = { diff --git a/packages/plugin-3d-generation/src/index.ts b/packages/plugin-3d-generation/src/index.ts index 529782daca4..f0d2bb2e5db 100644 --- a/packages/plugin-3d-generation/src/index.ts +++ b/packages/plugin-3d-generation/src/index.ts @@ -1,5 +1,5 @@ import { elizaLogger } from "@elizaos/core"; -import { +import type { Action, HandlerCallback, IAgentRuntime, diff --git a/packages/plugin-abstract/src/actions/transferAction.ts b/packages/plugin-abstract/src/actions/transferAction.ts index 3ea3141f2a0..95228f298fb 100644 --- a/packages/plugin-abstract/src/actions/transferAction.ts +++ b/packages/plugin-abstract/src/actions/transferAction.ts @@ -1,12 +1,12 @@ import type { Action } from "@elizaos/core"; import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, elizaLogger, composeContext, generateObject, @@ -14,7 +14,7 @@ import { import { validateAbstractConfig } from "../environment"; import { - Address, + type Address, erc20Abi, http, parseEther, diff --git a/packages/plugin-abstract/src/environment.ts b/packages/plugin-abstract/src/environment.ts index 31310524399..4061e22f0c3 100644 --- a/packages/plugin-abstract/src/environment.ts +++ b/packages/plugin-abstract/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { isAddress } from "viem"; import { z } from "zod"; diff --git a/packages/plugin-abstract/src/hooks/useGetAccount.ts b/packages/plugin-abstract/src/hooks/useGetAccount.ts index e458ca9b9ca..7e2285dc0a6 100644 --- a/packages/plugin-abstract/src/hooks/useGetAccount.ts +++ b/packages/plugin-abstract/src/hooks/useGetAccount.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import type { PrivateKeyAccount } from "viem/accounts"; import { privateKeyToAccount } from "viem/accounts"; diff --git a/packages/plugin-abstract/src/index.ts b/packages/plugin-abstract/src/index.ts index 9407876c191..b58043d3abe 100644 --- a/packages/plugin-abstract/src/index.ts +++ b/packages/plugin-abstract/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { transferAction } from "./actions"; diff --git a/packages/plugin-abstract/src/utils/validateContext.ts b/packages/plugin-abstract/src/utils/validateContext.ts index ded9ce2640e..b024a2a0498 100644 --- a/packages/plugin-abstract/src/utils/validateContext.ts +++ b/packages/plugin-abstract/src/utils/validateContext.ts @@ -1,4 +1,4 @@ -import { TransferContent } from "../actions"; +import type { TransferContent } from "../actions"; import { isAddress } from "viem"; export class ValidateContext { diff --git a/packages/plugin-agentkit/src/actions.ts b/packages/plugin-agentkit/src/actions.ts index 5d1c721c93a..5c36b26c0bc 100644 --- a/packages/plugin-agentkit/src/actions.ts +++ b/packages/plugin-agentkit/src/actions.ts @@ -9,7 +9,7 @@ import { composeContext, generateObject, } from "@elizaos/core"; -import { CdpAgentkit } from "@coinbase/cdp-agentkit-core"; +import type { CdpAgentkit } from "@coinbase/cdp-agentkit-core"; import { CdpToolkit, type Tool } from "@coinbase/cdp-langchain"; type GetAgentKitActionsParams = { diff --git a/packages/plugin-agentkit/src/provider.ts b/packages/plugin-agentkit/src/provider.ts index 685469b09ed..b8f03cd677a 100644 --- a/packages/plugin-agentkit/src/provider.ts +++ b/packages/plugin-agentkit/src/provider.ts @@ -1,11 +1,11 @@ -import { type Provider, type IAgentRuntime } from "@elizaos/core"; +import type { Provider, IAgentRuntime } from "@elizaos/core"; import { CdpAgentkit } from "@coinbase/cdp-agentkit-core"; import * as fs from "fs"; const WALLET_DATA_FILE = "wallet_data.txt"; export async function getClient( - networkId: string = "base-sepolia" + networkId = "base-sepolia" ): Promise { let walletDataStr: string | null = null; diff --git a/packages/plugin-akash/src/actions/closeDeployment.ts b/packages/plugin-akash/src/actions/closeDeployment.ts index ee50e0067da..47c7e17a64b 100644 --- a/packages/plugin-akash/src/actions/closeDeployment.ts +++ b/packages/plugin-akash/src/actions/closeDeployment.ts @@ -1,5 +1,5 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { DirectSecp256k1HdWallet, Registry } from "@cosmjs/proto-signing"; import { SigningStargateClient } from "@cosmjs/stargate"; import { getAkashTypeRegistry, getTypeUrl } from "@akashnetwork/akashjs/build/stargate"; diff --git a/packages/plugin-akash/src/actions/createCertificate.ts b/packages/plugin-akash/src/actions/createCertificate.ts index 67058e2d168..6e026596629 100644 --- a/packages/plugin-akash/src/actions/createCertificate.ts +++ b/packages/plugin-akash/src/actions/createCertificate.ts @@ -1,10 +1,10 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { SigningStargateClient } from "@cosmjs/stargate"; import * as cert from "@akashnetwork/akashjs/build/certificates"; import { certificateManager } from "@akashnetwork/akashjs/build/certificates/certificate-manager"; -import { CertificatePem } from "@akashnetwork/akashjs/build/certificates/certificate-manager/CertificateManager"; +import type { CertificatePem } from "@akashnetwork/akashjs/build/certificates/certificate-manager/CertificateManager"; import { getAkashTypeRegistry } from "@akashnetwork/akashjs/build/stargate"; import { validateAkashConfig } from "../environment"; import { AkashError, AkashErrorCode, withRetry } from "../error/error"; diff --git a/packages/plugin-akash/src/actions/createDeployment.ts b/packages/plugin-akash/src/actions/createDeployment.ts index d64c5a6ebca..2032961fe44 100644 --- a/packages/plugin-akash/src/actions/createDeployment.ts +++ b/packages/plugin-akash/src/actions/createDeployment.ts @@ -1,5 +1,5 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { MsgCreateDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta3"; import { QueryClientImpl as QueryProviderClient, QueryProviderRequest } from "@akashnetwork/akash-api/akash/provider/v1beta3"; import { QueryBidsRequest, QueryClientImpl as QueryMarketClient, MsgCreateLease, BidID } from "@akashnetwork/akash-api/akash/market/v1beta4"; @@ -7,7 +7,7 @@ import * as cert from "@akashnetwork/akashjs/build/certificates"; import { getRpc } from "@akashnetwork/akashjs/build/rpc"; import { SDL } from "@akashnetwork/akashjs/build/sdl"; import { getAkashTypeRegistry } from "@akashnetwork/akashjs/build/stargate"; -import { CertificatePem } from "@akashnetwork/akashjs/build/certificates/certificate-manager/CertificateManager"; +import type { CertificatePem } from "@akashnetwork/akashjs/build/certificates/certificate-manager/CertificateManager"; import { certificateManager } from "@akashnetwork/akashjs/build/certificates/certificate-manager"; import { DirectSecp256k1HdWallet, Registry } from "@cosmjs/proto-signing"; import { SigningStargateClient } from "@cosmjs/stargate"; diff --git a/packages/plugin-akash/src/actions/estimateGas.ts b/packages/plugin-akash/src/actions/estimateGas.ts index 309c6c2c817..192684151b5 100644 --- a/packages/plugin-akash/src/actions/estimateGas.ts +++ b/packages/plugin-akash/src/actions/estimateGas.ts @@ -1,6 +1,6 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; -import { DirectSecp256k1HdWallet, Registry, EncodeObject } from "@cosmjs/proto-signing"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { DirectSecp256k1HdWallet, Registry, type EncodeObject } from "@cosmjs/proto-signing"; import { SigningStargateClient } from "@cosmjs/stargate"; import { MsgCloseDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta3"; import { getAkashTypeRegistry, getTypeUrl } from "@akashnetwork/akashjs/build/stargate"; diff --git a/packages/plugin-akash/src/actions/getDeploymentApi.ts b/packages/plugin-akash/src/actions/getDeploymentApi.ts index 417a9fc508a..503be32530e 100644 --- a/packages/plugin-akash/src/actions/getDeploymentApi.ts +++ b/packages/plugin-akash/src/actions/getDeploymentApi.ts @@ -1,5 +1,5 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { validateAkashConfig } from "../environment"; import { AkashError, AkashErrorCode } from "../error/error"; diff --git a/packages/plugin-akash/src/actions/getDeploymentStatus.ts b/packages/plugin-akash/src/actions/getDeploymentStatus.ts index 98a90dccf99..b927a8961df 100644 --- a/packages/plugin-akash/src/actions/getDeploymentStatus.ts +++ b/packages/plugin-akash/src/actions/getDeploymentStatus.ts @@ -1,5 +1,5 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { QueryDeploymentRequest, QueryClientImpl as DeploymentQueryClient } from "@akashnetwork/akash-api/akash/deployment/v1beta3"; import { getRpc } from "@akashnetwork/akashjs/build/rpc"; diff --git a/packages/plugin-akash/src/actions/getGPUPricing.ts b/packages/plugin-akash/src/actions/getGPUPricing.ts index 35e407f00f1..a3a4073a2ea 100644 --- a/packages/plugin-akash/src/actions/getGPUPricing.ts +++ b/packages/plugin-akash/src/actions/getGPUPricing.ts @@ -1,5 +1,5 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { getConfig } from "../environment"; interface GetGPUPricingContent extends Content { @@ -23,9 +23,9 @@ interface PricingResponse { // Get configuration with defaults const config = getConfig(process.env.AKASH_ENV); const PRICING_API_URL = config.AKASH_PRICING_API_URL; -const DEFAULT_CPU = parseInt(config.AKASH_DEFAULT_CPU || "1000"); -const DEFAULT_MEMORY = parseInt(config.AKASH_DEFAULT_MEMORY || "1000000000"); -const DEFAULT_STORAGE = parseInt(config.AKASH_DEFAULT_STORAGE || "1000000000"); +const DEFAULT_CPU = Number.parseInt(config.AKASH_DEFAULT_CPU || "1000"); +const DEFAULT_MEMORY = Number.parseInt(config.AKASH_DEFAULT_MEMORY || "1000000000"); +const DEFAULT_STORAGE = Number.parseInt(config.AKASH_DEFAULT_STORAGE || "1000000000"); // Custom error class for GPU pricing errors class GPUPricingError extends Error { diff --git a/packages/plugin-akash/src/actions/getManifest.ts b/packages/plugin-akash/src/actions/getManifest.ts index 5d6e116f9e9..099ae0f412d 100644 --- a/packages/plugin-akash/src/actions/getManifest.ts +++ b/packages/plugin-akash/src/actions/getManifest.ts @@ -1,5 +1,5 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { SDL } from "@akashnetwork/akashjs/build/sdl"; import { validateAkashConfig } from "../environment"; import { AkashError, AkashErrorCode } from "../error/error"; @@ -90,7 +90,7 @@ const loadSDLFromFile = (filePath: string): string => { } }; -const validateSDL = (sdlContent: string, validationLevel: string = "strict"): boolean => { +const validateSDL = (sdlContent: string, validationLevel = "strict"): boolean => { try { // First try to parse as YAML const parsed = yaml.load(sdlContent); diff --git a/packages/plugin-akash/src/actions/getProviderInfo.ts b/packages/plugin-akash/src/actions/getProviderInfo.ts index 0203a4a62f9..1848fa73fa7 100644 --- a/packages/plugin-akash/src/actions/getProviderInfo.ts +++ b/packages/plugin-akash/src/actions/getProviderInfo.ts @@ -1,5 +1,5 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { QueryProviderRequest, QueryClientImpl as ProviderQueryClient } from "@akashnetwork/akash-api/akash/provider/v1beta3"; import { getRpc } from "@akashnetwork/akashjs/build/rpc"; import { AkashError, AkashErrorCode } from "../error/error"; diff --git a/packages/plugin-akash/src/actions/getProvidersList.ts b/packages/plugin-akash/src/actions/getProvidersList.ts index 52e3c0fe911..8a01783fd27 100644 --- a/packages/plugin-akash/src/actions/getProvidersList.ts +++ b/packages/plugin-akash/src/actions/getProvidersList.ts @@ -1,5 +1,5 @@ -import { Action, elizaLogger } from "@elizaos/core"; -import { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; +import { type Action, elizaLogger } from "@elizaos/core"; +import type { IAgentRuntime, Memory, State, HandlerCallback, Content, ActionExample } from "@elizaos/core"; import { AkashError, AkashErrorCode } from "../error/error"; import { validateAkashConfig } from "../environment"; diff --git a/packages/plugin-akash/src/environment.ts b/packages/plugin-akash/src/environment.ts index 12a8332b087..652caf22c27 100644 --- a/packages/plugin-akash/src/environment.ts +++ b/packages/plugin-akash/src/environment.ts @@ -1,8 +1,8 @@ -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { z } from "zod"; // Add ENV variable at the top -let ENV: string = "mainnet"; +let ENV = "mainnet"; // Log environment information elizaLogger.info("Environment sources", { diff --git a/packages/plugin-akash/src/error/error.ts b/packages/plugin-akash/src/error/error.ts index fb6d56416b3..0ddbdc603ee 100644 --- a/packages/plugin-akash/src/error/error.ts +++ b/packages/plugin-akash/src/error/error.ts @@ -98,7 +98,7 @@ export class AkashError extends Error { message: string, public code: AkashErrorCode, public details?: Record, - public category: string = "akash" + public category = "akash" ) { super(message); this.name = "AkashError"; @@ -107,8 +107,8 @@ export class AkashError extends Error { export async function withRetry( fn: () => Promise, - maxRetries: number = 3, - delay: number = 1000 + maxRetries = 3, + delay = 1000 ): Promise { let lastError: Error | undefined; for (let i = 0; i < maxRetries; i++) { diff --git a/packages/plugin-akash/src/index.ts b/packages/plugin-akash/src/index.ts index ffa07f75f6b..52e8438d5c6 100644 --- a/packages/plugin-akash/src/index.ts +++ b/packages/plugin-akash/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin} from "@elizaos/core"; +import type { Plugin} from "@elizaos/core"; import { createDeploymentAction } from "./actions/createDeployment"; import { closeDeploymentAction } from "./actions/closeDeployment"; import { getProviderInfoAction } from "./actions/getProviderInfo"; diff --git a/packages/plugin-akash/src/providers/wallet.ts b/packages/plugin-akash/src/providers/wallet.ts index 397c37ba5a0..d944ebe4627 100644 --- a/packages/plugin-akash/src/providers/wallet.ts +++ b/packages/plugin-akash/src/providers/wallet.ts @@ -1,12 +1,12 @@ import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; import { SigningStargateClient } from "@cosmjs/stargate"; -import { elizaLogger, IAgentRuntime, Memory } from "@elizaos/core"; +import { elizaLogger, type IAgentRuntime, type Memory } from "@elizaos/core"; // import { IAgentRuntime, Memory } from "@elizaos/core/src/types"; import { validateAkashConfig } from "../environment"; import { getAkashTypeRegistry } from "@akashnetwork/akashjs/build/stargate"; import { - AkashProvider, - AkashWalletState, + type AkashProvider, + type AkashWalletState, AkashError, AKASH_ERROR_CODES, } from "../types"; diff --git a/packages/plugin-akash/src/types.ts b/packages/plugin-akash/src/types.ts index b784290b499..9e79d59eb01 100644 --- a/packages/plugin-akash/src/types.ts +++ b/packages/plugin-akash/src/types.ts @@ -1,10 +1,10 @@ -import { DirectSecp256k1HdWallet} from "@cosmjs/proto-signing"; -import { SigningStargateClient } from "@cosmjs/stargate"; +import type { DirectSecp256k1HdWallet} from "@cosmjs/proto-signing"; +import type { SigningStargateClient } from "@cosmjs/stargate"; // import { Provider } from "@elizaos/core"; -import { IAgentRuntime, Memory } from "@elizaos/core"; -import { SDL } from "@akashnetwork/akashjs/build/sdl"; -import { MsgCreateDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta3"; -import { MsgCreateLease} from "@akashnetwork/akash-api/akash/market/v1beta4"; +import type { IAgentRuntime, Memory } from "@elizaos/core"; +import type { SDL } from "@akashnetwork/akashjs/build/sdl"; +import type { MsgCreateDeployment } from "@akashnetwork/akash-api/akash/deployment/v1beta3"; +import type { MsgCreateLease} from "@akashnetwork/akash-api/akash/market/v1beta4"; // Core wallet state type export interface AkashWalletState { diff --git a/packages/plugin-allora/src/actions/getInference.ts b/packages/plugin-allora/src/actions/getInference.ts index 92587d7ac39..8decfd27262 100644 --- a/packages/plugin-allora/src/actions/getInference.ts +++ b/packages/plugin-allora/src/actions/getInference.ts @@ -1,19 +1,19 @@ import { - ActionExample, + type ActionExample, composeContext, elizaLogger, generateObject, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { z } from "zod"; import { topicsProvider } from "../providers/topics"; import { getInferenceTemplate } from "../templates"; -import { AlloraAPIClient, ChainSlug } from "@alloralabs/allora-sdk"; +import { AlloraAPIClient, type ChainSlug } from "@alloralabs/allora-sdk"; interface InferenceFields { topicId: number | null; diff --git a/packages/plugin-allora/src/index.ts b/packages/plugin-allora/src/index.ts index 436735b4a01..1e5a13464cd 100644 --- a/packages/plugin-allora/src/index.ts +++ b/packages/plugin-allora/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { getInferenceAction } from "./actions/getInference.ts"; import { topicsProvider } from "./providers/topics.ts"; diff --git a/packages/plugin-allora/src/providers/topics.ts b/packages/plugin-allora/src/providers/topics.ts index 43e7e8839da..6dd72da36ac 100644 --- a/packages/plugin-allora/src/providers/topics.ts +++ b/packages/plugin-allora/src/providers/topics.ts @@ -1,12 +1,12 @@ import { elizaLogger, - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, } from "@elizaos/core"; import NodeCache from "node-cache"; -import { AlloraAPIClient, AlloraTopic, ChainSlug } from "@alloralabs/allora-sdk"; +import { AlloraAPIClient, type AlloraTopic, type ChainSlug } from "@alloralabs/allora-sdk"; export class TopicsProvider implements Provider { private cache: NodeCache; diff --git a/packages/plugin-allora/src/tests/topics.test.ts b/packages/plugin-allora/src/tests/topics.test.ts index 09cbd174abd..0c434ec7865 100644 --- a/packages/plugin-allora/src/tests/topics.test.ts +++ b/packages/plugin-allora/src/tests/topics.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, beforeEach, vi } from "vitest"; import { TopicsProvider } from "../../src/providers/topics"; -import { Memory, State } from "@elizaos/core"; +import type { Memory, State } from "@elizaos/core"; describe("TopicsProvider", () => { let topicsProvider: TopicsProvider; diff --git a/packages/plugin-anyone/src/actions/startAnyone.ts b/packages/plugin-anyone/src/actions/startAnyone.ts index 855837c4f8b..c9313f45fa0 100644 --- a/packages/plugin-anyone/src/actions/startAnyone.ts +++ b/packages/plugin-anyone/src/actions/startAnyone.ts @@ -1,10 +1,10 @@ -import { +import type { ActionExample, HandlerCallback, IAgentRuntime, Memory, State, - type Action, + Action, } from "@elizaos/core"; import { AnyoneClientService } from "../services/AnyoneClientService"; import { AnyoneProxyService } from "../services/AnyoneProxyService"; diff --git a/packages/plugin-anyone/src/actions/stopAnyone.ts b/packages/plugin-anyone/src/actions/stopAnyone.ts index 41aa339608f..e556074b3ed 100644 --- a/packages/plugin-anyone/src/actions/stopAnyone.ts +++ b/packages/plugin-anyone/src/actions/stopAnyone.ts @@ -1,10 +1,10 @@ -import { +import type { ActionExample, HandlerCallback, IAgentRuntime, Memory, State, - type Action, + Action, } from "@elizaos/core"; import { AnyoneClientService } from "../services/AnyoneClientService"; import { AnyoneProxyService } from "../services/AnyoneProxyService"; diff --git a/packages/plugin-anyone/src/index.ts b/packages/plugin-anyone/src/index.ts index 1c2e500c57a..509463f4d0c 100644 --- a/packages/plugin-anyone/src/index.ts +++ b/packages/plugin-anyone/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { startAnyone } from "./actions/startAnyone.ts"; import { stopAnyone } from "./actions/stopAnyone.ts"; export * as actions from "./actions"; diff --git a/packages/plugin-aptos/src/actions/transfer.ts b/packages/plugin-aptos/src/actions/transfer.ts index 2fd4f29b681..111ea17892a 100644 --- a/packages/plugin-aptos/src/actions/transfer.ts +++ b/packages/plugin-aptos/src/actions/transfer.ts @@ -1,12 +1,12 @@ import { elizaLogger } from "@elizaos/core"; import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { composeContext } from "@elizaos/core"; @@ -16,7 +16,7 @@ import { Aptos, AptosConfig, Ed25519PrivateKey, - Network, + type Network, PrivateKey, PrivateKeyVariants, } from "@aptos-labs/ts-sdk"; diff --git a/packages/plugin-aptos/src/enviroment.ts b/packages/plugin-aptos/src/enviroment.ts index 59719eaab06..e94e629e8a0 100644 --- a/packages/plugin-aptos/src/enviroment.ts +++ b/packages/plugin-aptos/src/enviroment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const aptosEnvSchema = z.object({ diff --git a/packages/plugin-aptos/src/index.ts b/packages/plugin-aptos/src/index.ts index 6fe294c2824..79b4d413f01 100644 --- a/packages/plugin-aptos/src/index.ts +++ b/packages/plugin-aptos/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import transferToken from "./actions/transfer.ts"; import { WalletProvider, walletProvider } from "./providers/wallet.ts"; diff --git a/packages/plugin-aptos/src/providers/wallet.ts b/packages/plugin-aptos/src/providers/wallet.ts index fbb209c3ac4..226365c8571 100644 --- a/packages/plugin-aptos/src/providers/wallet.ts +++ b/packages/plugin-aptos/src/providers/wallet.ts @@ -1,4 +1,4 @@ -import { +import type { IAgentRuntime, ICacheManager, Memory, @@ -10,7 +10,7 @@ import { Aptos, AptosConfig, Ed25519PrivateKey, - Network, + type Network, PrivateKey, PrivateKeyVariants, } from "@aptos-labs/ts-sdk"; @@ -36,7 +36,7 @@ interface Prices { export class WalletProvider { private cache: NodeCache; - private cacheKey: string = "aptos/wallet"; + private cacheKey = "aptos/wallet"; constructor( private aptosClient: Aptos, diff --git a/packages/plugin-arthera/src/actions/transfer.ts b/packages/plugin-arthera/src/actions/transfer.ts index 2ad25281de5..807a2d6b7e3 100644 --- a/packages/plugin-arthera/src/actions/transfer.ts +++ b/packages/plugin-arthera/src/actions/transfer.ts @@ -1,15 +1,15 @@ -import { ByteArray, formatEther, parseEther, type Hex } from "viem"; +import { type ByteArray, formatEther, parseEther, type Hex } from "viem"; import { composeContext, generateObjectDeprecated, - HandlerCallback, + type HandlerCallback, ModelClass, type IAgentRuntime, type Memory, type State, } from "@elizaos/core"; -import { initWalletProvider, WalletProvider } from "../providers/wallet"; +import { initWalletProvider, type WalletProvider } from "../providers/wallet"; import type { Transaction, TransferParams } from "../types"; import { transferTemplate } from "../templates"; @@ -39,13 +39,13 @@ export class TransferAction { value: parseEther(params.amount), data: params.data as Hex, kzg: { - blobToKzgCommitment: function (_: ByteArray): ByteArray { + blobToKzgCommitment: (_: ByteArray): ByteArray => { throw new Error("Function not implemented."); }, - computeBlobKzgProof: function ( + computeBlobKzgProof: ( _blob: ByteArray, _commitment: ByteArray - ): ByteArray { + ): ByteArray => { throw new Error("Function not implemented."); }, }, diff --git a/packages/plugin-arthera/src/tests/transfer.test.ts b/packages/plugin-arthera/src/tests/transfer.test.ts index aaecf38d7c7..efb9935e989 100644 --- a/packages/plugin-arthera/src/tests/transfer.test.ts +++ b/packages/plugin-arthera/src/tests/transfer.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, beforeEach } from "vitest"; import { generatePrivateKey } from "viem/accounts"; -import { Chain } from "viem"; +import type { Chain } from "viem"; import { getEnvVariable } from "@elizaos/core"; import { TransferAction } from "../actions/transfer"; diff --git a/packages/plugin-arthera/src/tests/wallet.test.ts b/packages/plugin-arthera/src/tests/wallet.test.ts index 07cb1494ed3..dec22d57051 100644 --- a/packages/plugin-arthera/src/tests/wallet.test.ts +++ b/packages/plugin-arthera/src/tests/wallet.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, beforeAll, beforeEach } from "vitest"; import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; -import { arthera, Chain } from "viem/chains"; +import { arthera, type Chain } from "viem/chains"; import { WalletProvider } from "../providers/wallet"; diff --git a/packages/plugin-asterai/src/environment.ts b/packages/plugin-asterai/src/environment.ts index a15c6f919bf..016186c590e 100644 --- a/packages/plugin-asterai/src/environment.ts +++ b/packages/plugin-asterai/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; const envSchema = z.object({ diff --git a/packages/plugin-asterai/src/providers/asterai.provider.ts b/packages/plugin-asterai/src/providers/asterai.provider.ts index f8bfc0084a6..b9d70036b3b 100644 --- a/packages/plugin-asterai/src/providers/asterai.provider.ts +++ b/packages/plugin-asterai/src/providers/asterai.provider.ts @@ -1,9 +1,9 @@ import { elizaLogger, - IAgentRuntime, - Memory, - Provider, - State, UUID, + type IAgentRuntime, + type Memory, + type Provider, + type State, type UUID, } from "@elizaos/core"; import {validateAsteraiConfig} from "../environment.ts"; import {getInitAsteraiClient} from "../index.ts"; diff --git a/packages/plugin-autonome/src/actions/launchAgent.ts b/packages/plugin-autonome/src/actions/launchAgent.ts index f53eaddc5f5..08e34ce6baf 100644 --- a/packages/plugin-autonome/src/actions/launchAgent.ts +++ b/packages/plugin-autonome/src/actions/launchAgent.ts @@ -1,15 +1,15 @@ import axios from "axios"; import { - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; diff --git a/packages/plugin-autonome/src/index.ts b/packages/plugin-autonome/src/index.ts index bbf49808982..0173ecb1270 100644 --- a/packages/plugin-autonome/src/index.ts +++ b/packages/plugin-autonome/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import launchAgent from "./actions/launchAgent"; export const autonomePlugin: Plugin = { diff --git a/packages/plugin-avail/src/actions/submitData.ts b/packages/plugin-avail/src/actions/submitData.ts index e90622105ad..024da1ff782 100644 --- a/packages/plugin-avail/src/actions/submitData.ts +++ b/packages/plugin-avail/src/actions/submitData.ts @@ -1,11 +1,11 @@ import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, elizaLogger, composeContext, @@ -17,8 +17,8 @@ import { initialize, getKeyringFromSeed, } from "avail-js-sdk"; -import { ISubmittableResult } from "@polkadot/types/types/extrinsic"; -import { H256 } from "@polkadot/types/interfaces/runtime"; +import type { ISubmittableResult } from "@polkadot/types/types/extrinsic"; +import type { H256 } from "@polkadot/types/interfaces/runtime"; export interface DataContent extends Content { data: string; diff --git a/packages/plugin-avail/src/actions/transfer.ts b/packages/plugin-avail/src/actions/transfer.ts index 8745048a964..cfa5cdc2836 100644 --- a/packages/plugin-avail/src/actions/transfer.ts +++ b/packages/plugin-avail/src/actions/transfer.ts @@ -1,11 +1,11 @@ import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, elizaLogger, composeContext, @@ -19,8 +19,8 @@ import { getKeyringFromSeed, isValidAddress, } from "avail-js-sdk"; -import { ISubmittableResult } from "@polkadot/types/types/extrinsic"; -import { H256 } from "@polkadot/types/interfaces/runtime"; +import type { ISubmittableResult } from "@polkadot/types/types/extrinsic"; +import type { H256 } from "@polkadot/types/interfaces/runtime"; export interface TransferContent extends Content { recipient: string; diff --git a/packages/plugin-avail/src/environment.ts b/packages/plugin-avail/src/environment.ts index 819ce81f935..68b71152681 100644 --- a/packages/plugin-avail/src/environment.ts +++ b/packages/plugin-avail/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const availEnvSchema = z.object({ diff --git a/packages/plugin-avalanche/src/actions/tokenMillCreate.ts b/packages/plugin-avalanche/src/actions/tokenMillCreate.ts index 27c3d8d9b4c..7cec5198095 100644 --- a/packages/plugin-avalanche/src/actions/tokenMillCreate.ts +++ b/packages/plugin-avalanche/src/actions/tokenMillCreate.ts @@ -1,15 +1,15 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, generateObject, ModelClass, - Content, + type Content, } from "@elizaos/core"; import { validateAvalancheConfig } from "../environment"; import { createMarketAndToken } from "../utils/tokenMill"; diff --git a/packages/plugin-avalanche/src/actions/transfer.ts b/packages/plugin-avalanche/src/actions/transfer.ts index 301f4f8f943..e1aac808be5 100644 --- a/packages/plugin-avalanche/src/actions/transfer.ts +++ b/packages/plugin-avalanche/src/actions/transfer.ts @@ -1,18 +1,18 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, generateObject, ModelClass, - Content, + type Content, } from "@elizaos/core"; import { getTxReceipt, sendNativeAsset, sendToken } from "../utils"; -import { Address } from "viem"; +import type { Address } from "viem"; import { validateAvalancheConfig } from "../environment"; import { TOKEN_ADDRESSES } from "../utils/constants"; diff --git a/packages/plugin-avalanche/src/actions/yakStrategy.ts b/packages/plugin-avalanche/src/actions/yakStrategy.ts index 49ac4a9e7d1..56d5ebaee84 100644 --- a/packages/plugin-avalanche/src/actions/yakStrategy.ts +++ b/packages/plugin-avalanche/src/actions/yakStrategy.ts @@ -1,18 +1,18 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, generateObject, ModelClass, - Content, + type Content, } from "@elizaos/core"; import { approve, deposit, getTxReceipt } from "../utils"; -import { Address } from "viem"; +import type { Address } from "viem"; import { validateAvalancheConfig } from "../environment"; import { STRATEGY_ADDRESSES, TOKEN_ADDRESSES } from "../utils/constants"; diff --git a/packages/plugin-avalanche/src/actions/yakSwap.ts b/packages/plugin-avalanche/src/actions/yakSwap.ts index e037b558424..a1e733d52a0 100644 --- a/packages/plugin-avalanche/src/actions/yakSwap.ts +++ b/packages/plugin-avalanche/src/actions/yakSwap.ts @@ -1,18 +1,18 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, generateObject, ModelClass, - Content, + type Content, } from "@elizaos/core"; import { approve, getTxReceipt, swap, getQuote } from "../utils"; -import { Address } from "viem"; +import type { Address } from "viem"; import { validateAvalancheConfig } from "../environment"; import { TOKEN_ADDRESSES, YAK_SWAP_CONFIG } from "../utils/constants"; diff --git a/packages/plugin-avalanche/src/environment.ts b/packages/plugin-avalanche/src/environment.ts index 86f0b2d0d97..6a544454e29 100644 --- a/packages/plugin-avalanche/src/environment.ts +++ b/packages/plugin-avalanche/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const avalancheEnvSchema = z.object({ diff --git a/packages/plugin-avalanche/src/index.ts b/packages/plugin-avalanche/src/index.ts index fdd49441493..4f6c683da7c 100644 --- a/packages/plugin-avalanche/src/index.ts +++ b/packages/plugin-avalanche/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import tokenMillCreate from "./actions/tokenMillCreate"; import transfer from "./actions/transfer"; import yakSwap from "./actions/yakSwap"; diff --git a/packages/plugin-avalanche/src/providers/strategies.ts b/packages/plugin-avalanche/src/providers/strategies.ts index 8b7a3a8da6d..496f8115099 100644 --- a/packages/plugin-avalanche/src/providers/strategies.ts +++ b/packages/plugin-avalanche/src/providers/strategies.ts @@ -1,8 +1,8 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; import { STRATEGY_ADDRESSES } from "../utils/constants"; diff --git a/packages/plugin-avalanche/src/providers/tokens.ts b/packages/plugin-avalanche/src/providers/tokens.ts index 7fa467b19ce..0f6ef9734ad 100644 --- a/packages/plugin-avalanche/src/providers/tokens.ts +++ b/packages/plugin-avalanche/src/providers/tokens.ts @@ -1,8 +1,8 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; import { TOKEN_ADDRESSES } from "../utils/constants"; diff --git a/packages/plugin-avalanche/src/providers/wallet.ts b/packages/plugin-avalanche/src/providers/wallet.ts index 762451950b7..6f0f2a44c49 100644 --- a/packages/plugin-avalanche/src/providers/wallet.ts +++ b/packages/plugin-avalanche/src/providers/wallet.ts @@ -1,8 +1,8 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; import { formatUnits } from "viem"; diff --git a/packages/plugin-avalanche/src/types/index.ts b/packages/plugin-avalanche/src/types/index.ts index b9ae274aca1..b1104592eac 100644 --- a/packages/plugin-avalanche/src/types/index.ts +++ b/packages/plugin-avalanche/src/types/index.ts @@ -1,4 +1,4 @@ -import { Address } from "viem"; +import type { Address } from "viem"; interface YakSwapQuote { amounts: bigint[]; diff --git a/packages/plugin-avalanche/src/utils/constants.ts b/packages/plugin-avalanche/src/utils/constants.ts index 2d50d0873c7..815a8a2f26f 100644 --- a/packages/plugin-avalanche/src/utils/constants.ts +++ b/packages/plugin-avalanche/src/utils/constants.ts @@ -1,4 +1,4 @@ -import { Address } from "viem"; +import type { Address } from "viem"; const TOKEN_ADDRESSES: Record = { AVAX: "0x0000000000000000000000000000000000000000", diff --git a/packages/plugin-avalanche/src/utils/index.ts b/packages/plugin-avalanche/src/utils/index.ts index 6fc5c98ba76..efa1b461a3c 100644 --- a/packages/plugin-avalanche/src/utils/index.ts +++ b/packages/plugin-avalanche/src/utils/index.ts @@ -1,15 +1,15 @@ -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { createPublicClient, createWalletClient, - Hash, + type Hash, http, - Address, + type Address, parseUnits, } from "viem"; import { privateKeyToAccount } from "viem/accounts"; import { avalanche } from "viem/chains"; -import { YakSwapQuote } from "../types"; +import type { YakSwapQuote } from "../types"; import { YAK_SWAP_CONFIG } from "./constants"; export const getAccount = (runtime: IAgentRuntime) => { diff --git a/packages/plugin-avalanche/src/utils/tokenMill.ts b/packages/plugin-avalanche/src/utils/tokenMill.ts index d78dc28ce07..df9be21366a 100644 --- a/packages/plugin-avalanche/src/utils/tokenMill.ts +++ b/packages/plugin-avalanche/src/utils/tokenMill.ts @@ -1,8 +1,8 @@ import { getAccount, getWalletClient, getPublicClient } from "./index"; import { TOKEN_ADDRESSES, TOKEN_MILL_CONFIG } from "./constants"; -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; -import { TokenMillMarketCreationParameters } from "../types"; -import { Address, encodeAbiParameters, parseUnits } from "viem"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; +import type { TokenMillMarketCreationParameters } from "../types"; +import { type Address, encodeAbiParameters, parseUnits } from "viem"; export const createMarketAndToken = async ( runtime: IAgentRuntime, diff --git a/packages/plugin-b2/src/actions/stake.ts b/packages/plugin-b2/src/actions/stake.ts index 7fc543fa8ca..1d605c874ed 100644 --- a/packages/plugin-b2/src/actions/stake.ts +++ b/packages/plugin-b2/src/actions/stake.ts @@ -1,21 +1,21 @@ import { - Action, - ActionExample, - IAgentRuntime, + type Action, + type ActionExample, + type IAgentRuntime, generateObjectDeprecated, - Memory, - State, - HandlerCallback, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, ModelClass, } from "@elizaos/core"; import { getTxReceipt, depositBTC } from "../utils"; -import { Hash } from "viem"; +import type { Hash } from "viem"; import { validateB2NetworkConfig } from "../environment"; import { stakeTemplate } from "../templates"; -import { WalletProvider } from "../providers"; -import { StakeParams } from "../types"; +import type { WalletProvider } from "../providers"; +import type { StakeParams } from "../types"; import { initWalletProvider } from "../providers"; import { FARM_ADDRESS } from "../utils/constants"; diff --git a/packages/plugin-b2/src/actions/transfer.ts b/packages/plugin-b2/src/actions/transfer.ts index 52106bc8cc9..27a1f5bce7a 100644 --- a/packages/plugin-b2/src/actions/transfer.ts +++ b/packages/plugin-b2/src/actions/transfer.ts @@ -1,21 +1,21 @@ import { - Action, - ActionExample, - IAgentRuntime, + type Action, + type ActionExample, + type IAgentRuntime, generateObjectDeprecated, - Memory, - State, - HandlerCallback, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, ModelClass, } from "@elizaos/core"; import { getTxReceipt, sendNativeAsset, sendToken } from "../utils"; -import { Address, Hash } from "viem"; +import type { Address, Hash } from "viem"; import { validateB2NetworkConfig } from "../environment"; import { transferTemplate } from "../templates"; -import { WalletProvider } from "../providers"; -import { Transaction, TransferParams } from "../types"; +import type { WalletProvider } from "../providers"; +import type { Transaction, TransferParams } from "../types"; import { initWalletProvider } from "../providers"; import { TOKEN_ADDRESSES } from "../utils/constants" // Exported for tests diff --git a/packages/plugin-b2/src/actions/unstake.ts b/packages/plugin-b2/src/actions/unstake.ts index 7e6f6fd58a0..10876f77591 100644 --- a/packages/plugin-b2/src/actions/unstake.ts +++ b/packages/plugin-b2/src/actions/unstake.ts @@ -1,21 +1,21 @@ import { - Action, - ActionExample, - IAgentRuntime, + type Action, + type ActionExample, + type IAgentRuntime, generateObjectDeprecated, - Memory, - State, - HandlerCallback, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, ModelClass, } from "@elizaos/core"; import { getTxReceipt, unstake } from "../utils"; -import { Hash } from "viem"; +import type { Hash } from "viem"; import { validateB2NetworkConfig } from "../environment"; import { unstakeTemplate } from "../templates"; -import { WalletProvider } from "../providers"; -import { UnstakeParams } from "../types"; +import type { WalletProvider } from "../providers"; +import type { UnstakeParams } from "../types"; import { initWalletProvider } from "../providers"; import { FARM_ADDRESS } from "../utils/constants"; diff --git a/packages/plugin-b2/src/actions/withdraw.ts b/packages/plugin-b2/src/actions/withdraw.ts index d1e2ecb9193..2e40e4cd8d0 100644 --- a/packages/plugin-b2/src/actions/withdraw.ts +++ b/packages/plugin-b2/src/actions/withdraw.ts @@ -1,21 +1,21 @@ import { - Action, - ActionExample, - IAgentRuntime, + type Action, + type ActionExample, + type IAgentRuntime, generateObjectDeprecated, - Memory, - State, - HandlerCallback, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, ModelClass, } from "@elizaos/core"; import { getTxReceipt, withdraw } from "../utils"; -import { Hash } from "viem"; +import type { Hash } from "viem"; import { validateB2NetworkConfig } from "../environment"; import { withdrawTemplate } from "../templates"; -import { WalletProvider } from "../providers"; -import { WithdrawParams } from "../types"; +import type { WalletProvider } from "../providers"; +import type { WithdrawParams } from "../types"; import { initWalletProvider } from "../providers"; import { FARM_ADDRESS } from "../utils/constants"; diff --git a/packages/plugin-b2/src/environment.ts b/packages/plugin-b2/src/environment.ts index 637f5dacde9..b6d4cb50d90 100644 --- a/packages/plugin-b2/src/environment.ts +++ b/packages/plugin-b2/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const b2NetworkEnvSchema = z.object({ diff --git a/packages/plugin-b2/src/index.ts b/packages/plugin-b2/src/index.ts index 54c1a188b41..a5d670d8f03 100644 --- a/packages/plugin-b2/src/index.ts +++ b/packages/plugin-b2/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { transferAction } from "./actions/transfer"; import { stakeAction } from "./actions/stake"; import { unstakeAction } from "./actions/unstake"; diff --git a/packages/plugin-b2/src/providers/index.ts b/packages/plugin-b2/src/providers/index.ts index 34149ee555c..5c825372b22 100644 --- a/packages/plugin-b2/src/providers/index.ts +++ b/packages/plugin-b2/src/providers/index.ts @@ -1,24 +1,24 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; import { privateKeyToAccount } from "viem/accounts"; import { formatUnits, - Address, - Chain, - Account, - WalletClient, - PrivateKeyAccount, + type Address, + type Chain, + type Account, + type WalletClient, + type PrivateKeyAccount, http, createPublicClient, createWalletClient, - PublicClient, - Transport, - RpcSchema, + type PublicClient, + type Transport, + type RpcSchema, } from "viem"; import { TOKEN_ADDRESSES } from "../utils/constants"; import { b2Network } from "../utils/chains"; diff --git a/packages/plugin-b2/src/tests/stake.test.ts b/packages/plugin-b2/src/tests/stake.test.ts index f2cb0429afc..4d9523adf15 100644 --- a/packages/plugin-b2/src/tests/stake.test.ts +++ b/packages/plugin-b2/src/tests/stake.test.ts @@ -3,7 +3,7 @@ import { generatePrivateKey } from "viem/accounts"; import { StakeAction } from "../actions/stake"; import { WalletProvider } from "../providers"; -import { StakeParams } from "../types"; +import type { StakeParams } from "../types"; describe("Stake Action", () => { let wp: WalletProvider; diff --git a/packages/plugin-b2/src/tests/transfer.test.ts b/packages/plugin-b2/src/tests/transfer.test.ts index a48a59ffeaf..e200a68057b 100644 --- a/packages/plugin-b2/src/tests/transfer.test.ts +++ b/packages/plugin-b2/src/tests/transfer.test.ts @@ -4,7 +4,7 @@ import { getEnvVariable } from "@elizaos/core"; import { TransferAction } from "../actions/transfer"; import { WalletProvider } from "../providers"; -import { TransferParams } from "../types"; +import type { TransferParams } from "../types"; import { TOKEN_ADDRESSES } from "../utils/constants"; describe("Transfer Action", () => { diff --git a/packages/plugin-b2/src/tests/unstake.test.ts b/packages/plugin-b2/src/tests/unstake.test.ts index 332b992febb..774f31dcd41 100644 --- a/packages/plugin-b2/src/tests/unstake.test.ts +++ b/packages/plugin-b2/src/tests/unstake.test.ts @@ -3,7 +3,7 @@ import { generatePrivateKey } from "viem/accounts"; import { UnstakeAction } from "../actions/unstake"; import { WalletProvider } from "../providers"; -import { UnstakeParams } from "../types"; +import type { UnstakeParams } from "../types"; describe("Unstake Action", () => { let wp: WalletProvider; diff --git a/packages/plugin-b2/src/tests/withdraw.test.ts b/packages/plugin-b2/src/tests/withdraw.test.ts index 69404237479..98ba61f567b 100644 --- a/packages/plugin-b2/src/tests/withdraw.test.ts +++ b/packages/plugin-b2/src/tests/withdraw.test.ts @@ -2,7 +2,7 @@ import { describe, it, expect, beforeEach } from "vitest"; import { generatePrivateKey } from "viem/accounts"; import { WithdrawAction } from "../actions/withdraw"; import { WalletProvider } from "../providers"; -import { WithdrawParams } from "../types"; +import type { WithdrawParams } from "../types"; describe("Withdraw Action", () => { let wp: WalletProvider; diff --git a/packages/plugin-b2/src/utils/constants.ts b/packages/plugin-b2/src/utils/constants.ts index 23fec41ee6e..2aa2e63c2ba 100644 --- a/packages/plugin-b2/src/utils/constants.ts +++ b/packages/plugin-b2/src/utils/constants.ts @@ -1,4 +1,4 @@ -import { Address } from "viem"; +import type { Address } from "viem"; const TOKEN_ADDRESSES: Record = { "B2-BTC": "0x0000000000000000000000000000000000000000", diff --git a/packages/plugin-b2/src/utils/index.ts b/packages/plugin-b2/src/utils/index.ts index 27453b2c658..d3b52149954 100644 --- a/packages/plugin-b2/src/utils/index.ts +++ b/packages/plugin-b2/src/utils/index.ts @@ -1,12 +1,12 @@ import { elizaLogger } from "@elizaos/core"; import { - Hash, - Address, + type Hash, + type Address, parseUnits, encodeFunctionData, } from "viem"; import { b2Network } from "./chains"; -import { WalletProvider } from "../providers"; +import type { WalletProvider } from "../providers"; import { TOKEN_ADDRESSES } from "./constants"; export const getTxReceipt = async (walletProvider: WalletProvider, tx: Hash) => { diff --git a/packages/plugin-binance/src/actions/priceCheck.ts b/packages/plugin-binance/src/actions/priceCheck.ts index 7c91ebd75af..b1ab87d1bed 100644 --- a/packages/plugin-binance/src/actions/priceCheck.ts +++ b/packages/plugin-binance/src/actions/priceCheck.ts @@ -1,13 +1,13 @@ import { - ActionExample, + type ActionExample, composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { BinanceService } from "../services"; diff --git a/packages/plugin-binance/src/actions/spotBalance.ts b/packages/plugin-binance/src/actions/spotBalance.ts index c4f5364e17f..b7f8f42b21e 100644 --- a/packages/plugin-binance/src/actions/spotBalance.ts +++ b/packages/plugin-binance/src/actions/spotBalance.ts @@ -1,18 +1,18 @@ import { - ActionExample, + type ActionExample, composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { validateBinanceConfig } from "../environment"; import { BinanceService } from "../services"; -import { BalanceCheckRequest } from "../types"; +import type { BalanceCheckRequest } from "../types"; const spotBalanceTemplate = `Look at ONLY your LAST RESPONSE message in this conversation, where you just confirmed which cryptocurrency balance to check. Based on ONLY that last message, extract the cryptocurrency symbol. diff --git a/packages/plugin-binance/src/actions/spotTrade.ts b/packages/plugin-binance/src/actions/spotTrade.ts index 04fcb538ac5..c7ea860b9d0 100644 --- a/packages/plugin-binance/src/actions/spotTrade.ts +++ b/packages/plugin-binance/src/actions/spotTrade.ts @@ -1,13 +1,13 @@ import { - ActionExample, + type ActionExample, composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { BinanceService } from "../services"; @@ -76,7 +76,7 @@ export const spotTrade: Action = { // Convert quantity to number if it's a string if (content && typeof content.quantity === "string") { - content.quantity = parseFloat(content.quantity); + content.quantity = Number.parseFloat(content.quantity); } const parseResult = SpotTradeSchema.safeParse(content); diff --git a/packages/plugin-binance/src/environment.ts b/packages/plugin-binance/src/environment.ts index 9d56e3e7d9a..31f88503c86 100644 --- a/packages/plugin-binance/src/environment.ts +++ b/packages/plugin-binance/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const binanceEnvSchema = z.object({ diff --git a/packages/plugin-binance/src/index.ts b/packages/plugin-binance/src/index.ts index 90a54d39c2e..e11b6fc48dc 100644 --- a/packages/plugin-binance/src/index.ts +++ b/packages/plugin-binance/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { priceCheck } from "./actions/priceCheck"; import { spotBalance } from "./actions/spotBalance"; import { spotTrade } from "./actions/spotTrade"; diff --git a/packages/plugin-binance/src/services/account.ts b/packages/plugin-binance/src/services/account.ts index 2bf51590731..b495920fc51 100644 --- a/packages/plugin-binance/src/services/account.ts +++ b/packages/plugin-binance/src/services/account.ts @@ -1,5 +1,5 @@ -import { BinanceAccountInfo, BinanceBalance } from "../types/api/account"; -import { BalanceCheckRequest, BalanceResponse } from "../types/internal/config"; +import type { BinanceAccountInfo, BinanceBalance } from "../types/api/account"; +import type { BalanceCheckRequest, BalanceResponse } from "../types/internal/config"; import { BaseService } from "./base"; /** @@ -42,7 +42,7 @@ export class AccountService extends BaseService { ): BinanceBalance[] { return balances.filter( (balance) => - parseFloat(balance.free) > 0 || parseFloat(balance.locked) > 0 + Number.parseFloat(balance.free) > 0 || Number.parseFloat(balance.locked) > 0 ); } @@ -84,7 +84,7 @@ export class AccountService extends BaseService { return false; } - const available = parseFloat(balance.free); + const available = Number.parseFloat(balance.free); return available >= required; } catch (error) { throw this.handleError(error, `Balance check for ${asset}`); diff --git a/packages/plugin-binance/src/services/base.ts b/packages/plugin-binance/src/services/base.ts index 37bdb9ac755..6edb5440e80 100644 --- a/packages/plugin-binance/src/services/base.ts +++ b/packages/plugin-binance/src/services/base.ts @@ -2,7 +2,7 @@ import { Spot } from "@binance/connector"; import { elizaLogger } from "@elizaos/core"; import { API_DEFAULTS } from "../constants/api"; import { ERROR_MESSAGES } from "../constants/errors"; -import { BinanceConfig, ServiceOptions } from "../types/internal/config"; +import type { BinanceConfig, ServiceOptions } from "../types/internal/config"; import { ApiError, AuthenticationError, diff --git a/packages/plugin-binance/src/services/index.ts b/packages/plugin-binance/src/services/index.ts index cf22c908255..13abe994fed 100644 --- a/packages/plugin-binance/src/services/index.ts +++ b/packages/plugin-binance/src/services/index.ts @@ -1,4 +1,4 @@ -import { BinanceConfig } from "../types/internal/config"; +import type { BinanceConfig } from "../types/internal/config"; import { AccountService } from "./account"; import { PriceService } from "./price"; import { TradeService } from "./trade"; diff --git a/packages/plugin-binance/src/services/price.ts b/packages/plugin-binance/src/services/price.ts index f549c883000..3f86bd1f6cb 100644 --- a/packages/plugin-binance/src/services/price.ts +++ b/packages/plugin-binance/src/services/price.ts @@ -1,7 +1,7 @@ import { VALIDATION } from "../constants/defaults"; import { ERROR_MESSAGES } from "../constants/errors"; -import { BinanceTickerResponse } from "../types/api/price"; -import { PriceCheckRequest, PriceResponse } from "../types/internal/config"; +import type { BinanceTickerResponse } from "../types/api/price"; +import type { PriceCheckRequest, PriceResponse } from "../types/internal/config"; import { BinanceError } from "../types/internal/error"; import { BaseService } from "./base"; @@ -47,7 +47,7 @@ export class PriceService extends BaseService { * Format price for display */ static formatPrice(price: number | string): string { - const numPrice = typeof price === "string" ? parseFloat(price) : price; + const numPrice = typeof price === "string" ? Number.parseFloat(price) : price; return new Intl.NumberFormat("en-US", { style: "decimal", minimumFractionDigits: 2, diff --git a/packages/plugin-binance/src/services/trade.ts b/packages/plugin-binance/src/services/trade.ts index 24ac5e0f51f..1b431abedae 100644 --- a/packages/plugin-binance/src/services/trade.ts +++ b/packages/plugin-binance/src/services/trade.ts @@ -1,15 +1,15 @@ import { ORDER_TYPES, TIME_IN_FORCE } from "../constants/api"; import { ERROR_MESSAGES } from "../constants/errors"; -import { +import type { BinanceExchangeInfo, BinanceSymbolFilter, BinanceSymbolInfo, } from "../types/api/price"; -import { +import type { BinanceNewOrderParams, BinanceOrderResponse, } from "../types/api/trade"; -import { SpotTradeRequest, TradeResponse } from "../types/internal/config"; +import type { SpotTradeRequest, TradeResponse } from "../types/internal/config"; import { InvalidSymbolError, MinNotionalError } from "../types/internal/error"; import { BaseService } from "./base"; @@ -107,7 +107,7 @@ export class TradeService extends BaseService { const notionalValue = price ? quantity * price : quantity; // For market orders, quantity is in quote currency - if (parseFloat(minNotional) > notionalValue) { + if (Number.parseFloat(minNotional) > notionalValue) { throw new MinNotionalError(minNotional); } } diff --git a/packages/plugin-binance/src/types/api/trade.ts b/packages/plugin-binance/src/types/api/trade.ts index 5abb3fe43f3..2ce3346fb7e 100644 --- a/packages/plugin-binance/src/types/api/trade.ts +++ b/packages/plugin-binance/src/types/api/trade.ts @@ -1,4 +1,4 @@ -import { ORDER_SIDES, ORDER_TYPES, TIME_IN_FORCE } from "../../constants/api"; +import type { ORDER_SIDES, ORDER_TYPES, TIME_IN_FORCE } from "../../constants/api"; export type OrderType = (typeof ORDER_TYPES)[keyof typeof ORDER_TYPES]; export type OrderSide = (typeof ORDER_SIDES)[keyof typeof ORDER_SIDES]; diff --git a/packages/plugin-birdeye/src/actions/test-all-endpoints.ts b/packages/plugin-birdeye/src/actions/test-all-endpoints.ts index a2ed8758758..1f4b299e555 100644 --- a/packages/plugin-birdeye/src/actions/test-all-endpoints.ts +++ b/packages/plugin-birdeye/src/actions/test-all-endpoints.ts @@ -1,6 +1,6 @@ import { - Action, - ActionExample, + type Action, + type ActionExample, elizaLogger, type IAgentRuntime, type Memory, diff --git a/packages/plugin-birdeye/src/actions/token-search-address.ts b/packages/plugin-birdeye/src/actions/token-search-address.ts index 783e5ae06d7..c15cbcc817b 100644 --- a/packages/plugin-birdeye/src/actions/token-search-address.ts +++ b/packages/plugin-birdeye/src/actions/token-search-address.ts @@ -1,20 +1,20 @@ import { - Action, - ActionExample, + type Action, + type ActionExample, elizaLogger, formatTimestamp, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import { BirdeyeProvider } from "../birdeye"; -import { +import type { TokenMarketDataResponse, TokenOverviewResponse, TokenSecurityResponse, TokenTradeDataSingleResponse, } from "../types/api/token"; -import { BaseAddress } from "../types/shared"; +import type { BaseAddress } from "../types/shared"; import { extractAddresses, formatPercentChange, diff --git a/packages/plugin-birdeye/src/actions/token-search-symbol.ts b/packages/plugin-birdeye/src/actions/token-search-symbol.ts index bcf7e33c6d3..bf2392dc64c 100644 --- a/packages/plugin-birdeye/src/actions/token-search-symbol.ts +++ b/packages/plugin-birdeye/src/actions/token-search-symbol.ts @@ -1,13 +1,13 @@ import { - Action, - ActionExample, + type Action, + type ActionExample, elizaLogger, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import { BirdeyeProvider } from "../birdeye"; -import { TokenResult } from "../types/api/search"; +import type { TokenResult } from "../types/api/search"; import { extractSymbols, formatPercentChange, diff --git a/packages/plugin-birdeye/src/actions/wallet-search-address.ts b/packages/plugin-birdeye/src/actions/wallet-search-address.ts index 1ec2fc20eec..d9f4f09095f 100644 --- a/packages/plugin-birdeye/src/actions/wallet-search-address.ts +++ b/packages/plugin-birdeye/src/actions/wallet-search-address.ts @@ -1,14 +1,14 @@ import { - Action, - ActionExample, + type Action, + type ActionExample, elizaLogger, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import { BirdeyeProvider } from "../birdeye"; -import { WalletPortfolioResponse } from "../types/api/wallet"; -import { BaseAddress } from "../types/shared"; +import type { WalletPortfolioResponse } from "../types/api/wallet"; +import type { BaseAddress } from "../types/shared"; import { extractAddresses } from "../utils"; export const walletSearchAddressAction = { diff --git a/packages/plugin-birdeye/src/birdeye.ts b/packages/plugin-birdeye/src/birdeye.ts index a1e55bce88e..43ede454af4 100644 --- a/packages/plugin-birdeye/src/birdeye.ts +++ b/packages/plugin-birdeye/src/birdeye.ts @@ -1,4 +1,4 @@ -import { elizaLogger, ICacheManager, settings } from "@elizaos/core"; +import { elizaLogger, type ICacheManager, settings } from "@elizaos/core"; import NodeCache from "node-cache"; import * as path from "path"; import { @@ -8,8 +8,8 @@ import { DEFAULT_SUPPORTED_SYMBOLS, RETRY_DELAY_MS, } from "./constants"; -import { BirdeyeApiParams, BirdeyeApiResponse } from "./types/api/common"; -import { +import type { BirdeyeApiParams, BirdeyeApiResponse } from "./types/api/common"; +import type { BaseQuoteParams, BaseQuoteResponse, DefiHistoryPriceParams, @@ -31,7 +31,7 @@ import { PriceVolumeParams, PriceVolumeResponse, } from "./types/api/defi"; -import { +import type { OHLCVPairParams, OHLCVPairResponse, PairOverviewMultiParams, @@ -39,11 +39,11 @@ import { PairOverviewSingleParams, PairOverviewSingleResponse, } from "./types/api/pair"; -import { +import type { TokenMarketSearchParams, TokenMarketSearchResponse, } from "./types/api/search"; -import { +import type { AllMarketsParams, AllMarketsResponse, MintBurnParams, @@ -76,13 +76,13 @@ import { TopTradersParams, TopTradersResponse, } from "./types/api/token"; -import { +import type { GainersLosersParams, GainersLosersResponse, TraderTransactionsSeekParams, TraderTransactionsSeekResponse, } from "./types/api/trader"; -import { +import type { WalletPortfolioMultichainParams, WalletPortfolioMultichainResponse, WalletPortfolioParams, diff --git a/packages/plugin-birdeye/src/index.ts b/packages/plugin-birdeye/src/index.ts index 15983520228..7ee67c2665b 100644 --- a/packages/plugin-birdeye/src/index.ts +++ b/packages/plugin-birdeye/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { tokenSearchAddressAction } from "./actions/token-search-address"; import { tokenSearchSymbolAction } from "./actions/token-search-symbol"; import { walletSearchAddressAction } from "./actions/wallet-search-address"; diff --git a/packages/plugin-birdeye/src/providers/agent-portfolio-provider.ts b/packages/plugin-birdeye/src/providers/agent-portfolio-provider.ts index 04460780f2a..d2d842ff851 100644 --- a/packages/plugin-birdeye/src/providers/agent-portfolio-provider.ts +++ b/packages/plugin-birdeye/src/providers/agent-portfolio-provider.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; import { BirdeyeProvider } from "../birdeye"; import { extractChain, formatPortfolio } from "../utils"; diff --git a/packages/plugin-birdeye/src/tests/birdeye.test.ts b/packages/plugin-birdeye/src/tests/birdeye.test.ts index cb9ac8d9f87..5df51c7f561 100644 --- a/packages/plugin-birdeye/src/tests/birdeye.test.ts +++ b/packages/plugin-birdeye/src/tests/birdeye.test.ts @@ -1,5 +1,5 @@ -import { ICacheManager } from "@elizaos/core"; -import { afterEach, beforeEach, describe, expect, it, Mock, vi } from "vitest"; +import type { ICacheManager } from "@elizaos/core"; +import { afterEach, beforeEach, describe, expect, it, type Mock, vi } from "vitest"; import { BirdeyeProvider } from "../birdeye"; import { API_BASE_URL, diff --git a/packages/plugin-birdeye/src/types/api/common.ts b/packages/plugin-birdeye/src/types/api/common.ts index 59b5d9903b9..f220b648498 100644 --- a/packages/plugin-birdeye/src/types/api/common.ts +++ b/packages/plugin-birdeye/src/types/api/common.ts @@ -1,4 +1,4 @@ -import { +import type { BaseQuoteParams, DefiHistoryPriceParams, DefiMultiPriceParams, @@ -8,14 +8,14 @@ import { OHLCVParams, PriceVolumeParams, } from "./defi"; -import { +import type { OHLCVPairParams, PairOverviewMultiParams, PairOverviewSingleParams, PairTradesParams, } from "./pair"; -import { TokenMarketSearchParams } from "./search"; -import { +import type { TokenMarketSearchParams } from "./search"; +import type { AllMarketsParams, MintBurnParams, NewListingParams, @@ -32,8 +32,8 @@ import { TokenTradesParams, TopTradersParams, } from "./token"; -import { GainersLosersParams, TraderTransactionsSeekParams } from "./trader"; -import { +import type { GainersLosersParams, TraderTransactionsSeekParams } from "./trader"; +import type { WalletPortfolioMultichainParams, WalletPortfolioParams, WalletSimulationParams, diff --git a/packages/plugin-birdeye/src/types/api/defi.ts b/packages/plugin-birdeye/src/types/api/defi.ts index 896991df6c3..ca505ae1d8e 100644 --- a/packages/plugin-birdeye/src/types/api/defi.ts +++ b/packages/plugin-birdeye/src/types/api/defi.ts @@ -1,4 +1,4 @@ -import { TimeInterval } from "./common"; +import type { TimeInterval } from "./common"; // Network Types export interface DefiNetworksResponse { diff --git a/packages/plugin-birdeye/src/types/api/pair.ts b/packages/plugin-birdeye/src/types/api/pair.ts index 91a89c9c36b..d678f53ace5 100644 --- a/packages/plugin-birdeye/src/types/api/pair.ts +++ b/packages/plugin-birdeye/src/types/api/pair.ts @@ -1,4 +1,4 @@ -import { TimeInterval } from "./common"; +import type { TimeInterval } from "./common"; // Pair Trades Types export interface PairTradesParams { diff --git a/packages/plugin-birdeye/src/types/api/search.ts b/packages/plugin-birdeye/src/types/api/search.ts index bdfd5410ef2..0d1043ca321 100644 --- a/packages/plugin-birdeye/src/types/api/search.ts +++ b/packages/plugin-birdeye/src/types/api/search.ts @@ -1,4 +1,4 @@ -import { BirdeyeSupportedChain } from "../shared"; +import type { BirdeyeSupportedChain } from "../shared"; // Search Types export interface TokenMarketSearchParams { diff --git a/packages/plugin-birdeye/src/types/api/token.ts b/packages/plugin-birdeye/src/types/api/token.ts index 6922ee22350..179892e5f89 100644 --- a/packages/plugin-birdeye/src/types/api/token.ts +++ b/packages/plugin-birdeye/src/types/api/token.ts @@ -1,4 +1,4 @@ -import { TimeInterval, TokenTradeData } from "./common"; +import type { TimeInterval, TokenTradeData } from "./common"; // Token Trades Types export interface TokenTradesParams { diff --git a/packages/plugin-birdeye/src/types/shared.ts b/packages/plugin-birdeye/src/types/shared.ts index 190945b31f4..811745c44a4 100644 --- a/packages/plugin-birdeye/src/types/shared.ts +++ b/packages/plugin-birdeye/src/types/shared.ts @@ -1,4 +1,4 @@ -import { BIRDEYE_SUPPORTED_CHAINS } from "../utils"; +import type { BIRDEYE_SUPPORTED_CHAINS } from "../utils"; // Types export type BirdeyeSupportedChain = (typeof BIRDEYE_SUPPORTED_CHAINS)[number]; diff --git a/packages/plugin-birdeye/src/utils.ts b/packages/plugin-birdeye/src/utils.ts index 024c5258029..a7588d85e68 100644 --- a/packages/plugin-birdeye/src/utils.ts +++ b/packages/plugin-birdeye/src/utils.ts @@ -1,9 +1,9 @@ import { elizaLogger } from "@elizaos/core"; -import { BirdeyeApiParams } from "./types/api/common"; -import { TokenMarketSearchResponse, TokenResult } from "./types/api/search"; -import { TokenMetadataSingleResponse } from "./types/api/token"; -import { WalletPortfolioResponse } from "./types/api/wallet"; -import { BaseAddress, BirdeyeSupportedChain } from "./types/shared"; +import type { BirdeyeApiParams } from "./types/api/common"; +import type { TokenMarketSearchResponse, TokenResult } from "./types/api/search"; +import type { TokenMetadataSingleResponse } from "./types/api/token"; +import type { WalletPortfolioResponse } from "./types/api/wallet"; +import type { BaseAddress, BirdeyeSupportedChain } from "./types/shared"; // Constants export const BASE_URL = "https://public-api.birdeye.so"; @@ -220,7 +220,7 @@ export const extractTimeRange = ( const timeRegex = /(\d+)\s*(second|minute|hour|day|week|month)s?\s*ago/i; const match = text.match(timeRegex); if (match) { - const amount = parseInt(match[1]); + const amount = Number.parseInt(match[1]); const unit = match[2].toLowerCase() as TimeUnit; const start = now - amount * TIME_UNITS[unit]; return { start, end: now }; @@ -266,7 +266,7 @@ export const extractLimit = (text: string): number => { /\b(show|display|get|fetch|limit)\s+(\d+)\b/i ); if (limitMatch) { - const limit = parseInt(limitMatch[2]); + const limit = Number.parseInt(limitMatch[2]); return Math.min(Math.max(limit, 1), 100); // Clamp between 1 and 100 } diff --git a/packages/plugin-bootstrap/src/actions/continue.ts b/packages/plugin-bootstrap/src/actions/continue.ts index dbc6b1cc5c7..062dd1dfb04 100644 --- a/packages/plugin-bootstrap/src/actions/continue.ts +++ b/packages/plugin-bootstrap/src/actions/continue.ts @@ -2,14 +2,14 @@ import { composeContext, elizaLogger } from "@elizaos/core"; import { generateMessageResponse, generateTrueOrFalse } from "@elizaos/core"; import { booleanFooter, messageCompletionFooter } from "@elizaos/core"; import { - Action, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; const maxContinuesInARow = 3; diff --git a/packages/plugin-bootstrap/src/actions/followRoom.ts b/packages/plugin-bootstrap/src/actions/followRoom.ts index efcf7833010..625ab534bef 100644 --- a/packages/plugin-bootstrap/src/actions/followRoom.ts +++ b/packages/plugin-bootstrap/src/actions/followRoom.ts @@ -2,12 +2,12 @@ import { composeContext } from "@elizaos/core"; import { generateTrueOrFalse } from "@elizaos/core"; import { booleanFooter } from "@elizaos/core"; import { - Action, - ActionExample, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; export const shouldFollowTemplate = diff --git a/packages/plugin-bootstrap/src/actions/ignore.ts b/packages/plugin-bootstrap/src/actions/ignore.ts index aaf4003a090..61115addfba 100644 --- a/packages/plugin-bootstrap/src/actions/ignore.ts +++ b/packages/plugin-bootstrap/src/actions/ignore.ts @@ -1,8 +1,8 @@ -import { +import type { ActionExample, IAgentRuntime, Memory, - type Action, + Action, } from "@elizaos/core"; export const ignoreAction: Action = { diff --git a/packages/plugin-bootstrap/src/actions/muteRoom.ts b/packages/plugin-bootstrap/src/actions/muteRoom.ts index a452a651adf..f1401ac95a1 100644 --- a/packages/plugin-bootstrap/src/actions/muteRoom.ts +++ b/packages/plugin-bootstrap/src/actions/muteRoom.ts @@ -2,12 +2,12 @@ import { composeContext } from "@elizaos/core"; import { generateTrueOrFalse } from "@elizaos/core"; import { booleanFooter } from "@elizaos/core"; import { - Action, - ActionExample, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; export const shouldMuteTemplate = diff --git a/packages/plugin-bootstrap/src/actions/none.ts b/packages/plugin-bootstrap/src/actions/none.ts index 932351cff91..4c70b2b2c8e 100644 --- a/packages/plugin-bootstrap/src/actions/none.ts +++ b/packages/plugin-bootstrap/src/actions/none.ts @@ -1,8 +1,8 @@ -import { +import type { ActionExample, IAgentRuntime, Memory, - type Action, + Action, } from "@elizaos/core"; export const noneAction: Action = { diff --git a/packages/plugin-bootstrap/src/actions/unfollowRoom.ts b/packages/plugin-bootstrap/src/actions/unfollowRoom.ts index 8dac937ccb2..8fab358da29 100644 --- a/packages/plugin-bootstrap/src/actions/unfollowRoom.ts +++ b/packages/plugin-bootstrap/src/actions/unfollowRoom.ts @@ -2,12 +2,12 @@ import { composeContext } from "@elizaos/core"; import { generateTrueOrFalse } from "@elizaos/core"; import { booleanFooter } from "@elizaos/core"; import { - Action, - ActionExample, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; const shouldUnfollowTemplate = diff --git a/packages/plugin-bootstrap/src/actions/unmuteRoom.ts b/packages/plugin-bootstrap/src/actions/unmuteRoom.ts index 54976c9e6b8..17730a44dd4 100644 --- a/packages/plugin-bootstrap/src/actions/unmuteRoom.ts +++ b/packages/plugin-bootstrap/src/actions/unmuteRoom.ts @@ -2,12 +2,12 @@ import { composeContext } from "@elizaos/core"; import { generateTrueOrFalse } from "@elizaos/core"; import { booleanFooter } from "@elizaos/core"; import { - Action, - ActionExample, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; export const shouldUnmuteTemplate = diff --git a/packages/plugin-bootstrap/src/evaluators/fact.ts b/packages/plugin-bootstrap/src/evaluators/fact.ts index b2ad61e7d24..c1ed56c7ccd 100644 --- a/packages/plugin-bootstrap/src/evaluators/fact.ts +++ b/packages/plugin-bootstrap/src/evaluators/fact.ts @@ -2,11 +2,11 @@ import { composeContext } from "@elizaos/core"; import { generateObjectArray } from "@elizaos/core"; import { MemoryManager } from "@elizaos/core"; import { - ActionExample, - IAgentRuntime, - Memory, + type ActionExample, + type IAgentRuntime, + type Memory, ModelClass, - Evaluator, + type Evaluator, } from "@elizaos/core"; export const formatFacts = (facts: Memory[]) => { diff --git a/packages/plugin-bootstrap/src/evaluators/goal.ts b/packages/plugin-bootstrap/src/evaluators/goal.ts index 90bb35dd41a..ad94786abc4 100644 --- a/packages/plugin-bootstrap/src/evaluators/goal.ts +++ b/packages/plugin-bootstrap/src/evaluators/goal.ts @@ -3,13 +3,13 @@ import { generateText } from "@elizaos/core"; import { getGoals } from "@elizaos/core"; import { parseJsonArrayFromText } from "@elizaos/core"; import { - IAgentRuntime, - Memory, + type IAgentRuntime, + type Memory, ModelClass, - Objective, + type Objective, type Goal, type State, - Evaluator, + type Evaluator, } from "@elizaos/core"; const goalsTemplate = `TASK: Update Goal diff --git a/packages/plugin-bootstrap/src/index.ts b/packages/plugin-bootstrap/src/index.ts index 86522bf3b97..54793a1d55e 100644 --- a/packages/plugin-bootstrap/src/index.ts +++ b/packages/plugin-bootstrap/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { continueAction } from "./actions/continue.ts"; import { followRoomAction } from "./actions/followRoom.ts"; import { ignoreAction } from "./actions/ignore.ts"; diff --git a/packages/plugin-bootstrap/src/providers/boredom.ts b/packages/plugin-bootstrap/src/providers/boredom.ts index cbe64eddfdf..82cea8c85cc 100644 --- a/packages/plugin-bootstrap/src/providers/boredom.ts +++ b/packages/plugin-bootstrap/src/providers/boredom.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; const boredomLevels = [ { diff --git a/packages/plugin-bootstrap/src/providers/facts.ts b/packages/plugin-bootstrap/src/providers/facts.ts index 20829d9fed4..874ca6d21c6 100644 --- a/packages/plugin-bootstrap/src/providers/facts.ts +++ b/packages/plugin-bootstrap/src/providers/facts.ts @@ -2,7 +2,7 @@ import { embed, MemoryManager, formatMessages, - AgentRuntime as IAgentRuntime, + type AgentRuntime as IAgentRuntime, } from "@elizaos/core"; import type { Memory, Provider, State } from "@elizaos/core"; import { formatFacts } from "../evaluators/fact.ts"; diff --git a/packages/plugin-bootstrap/src/providers/time.ts b/packages/plugin-bootstrap/src/providers/time.ts index 24138db01d0..079f4334ca3 100644 --- a/packages/plugin-bootstrap/src/providers/time.ts +++ b/packages/plugin-bootstrap/src/providers/time.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; const timeProvider: Provider = { get: async (_runtime: IAgentRuntime, _message: Memory, _state?: State) => { diff --git a/packages/plugin-coinbase/__tests__/commerce.test.ts b/packages/plugin-coinbase/__tests__/commerce.test.ts index 3556dc62ea3..bdb0ddceb77 100644 --- a/packages/plugin-coinbase/__tests__/commerce.test.ts +++ b/packages/plugin-coinbase/__tests__/commerce.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; import { coinbaseCommercePlugin, createCharge } from '../src/plugins/commerce'; -import { IAgentRuntime, Memory, State } from '@elizaos/core'; +import { IAgentRuntime, type Memory, State } from '@elizaos/core'; // Mock fetch global.fetch = vi.fn(); diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/accounts.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/accounts.ts index 965c8b62c19..6fbf9e7c2bb 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/accounts.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/accounts.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { GetAccountRequest, GetAccountResponse, ListAccountsRequest, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/converts.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/converts.ts index 910d3521618..590886ef7e3 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/converts.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/converts.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { CommitConvertTradeRequest, CommitConvertTradeResponse, CreateConvertQuoteRequest, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/dataAPI.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/dataAPI.ts index 34c34290e3c..299e5430a5e 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/dataAPI.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/dataAPI.ts @@ -1,8 +1,8 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; +import type { RESTBase } from './rest-base'; import { method } from './types/request-types'; -import { GetAPIKeyPermissionsResponse } from './types/dataAPI-types'; +import type { GetAPIKeyPermissionsResponse } from './types/dataAPI-types'; // [GET] Get API Key Permissions // Official Documentation: https://docs.cdp.coinbase.com/advanced-trade/reference/retailbrokerageapi_getapikeypermissions diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/errors.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/errors.ts index 19d041a8ed7..e03addb6225 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/errors.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/errors.ts @@ -1,4 +1,4 @@ -import { Response } from 'node-fetch'; +import type { Response } from 'node-fetch'; class CoinbaseError extends Error { statusCode: number; diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/fees.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/fees.ts index 9279ef109bb..365b48b9c17 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/fees.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/fees.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { GetTransactionsSummaryRequest, GetTransactionsSummaryResponse, } from './types/fees-types'; diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/futures.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/futures.ts index a91f2d26be8..bd4dd6e4dd3 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/futures.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/futures.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { CancelPendingFuturesSweep, GetCurrentMarginWindowRequest, GetCurrentMarginWindowResponse, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/orders.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/orders.ts index 336db21a110..bf1d6b55d67 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/orders.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/orders.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { CancelOrdersRequest, CancelOrdersResponse, ClosePositionRequest, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/payments.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/payments.ts index e7deaec0890..acb4bcbe0a6 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/payments.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/payments.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { GetPaymentMethodRequest, GetPaymentMethodResponse, ListPaymentMethodsResponse, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/perpetuals.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/perpetuals.ts index 37160dbad1b..50c9fb553f8 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/perpetuals.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/perpetuals.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { AllocatePortfolioRequest, AllocatePortfolioResponse, GetPerpetualsPortfolioSummaryRequest, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/portfolios.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/portfolios.ts index 41044e403e1..df71f69aaad 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/portfolios.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/portfolios.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { CreatePortfolioRequest, CreatePortfolioResponse, DeletePortfolioRequest, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/products.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/products.ts index d04f1863f71..1e65a792153 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/products.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/products.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { GetBestBidAskRequest, GetBestBidAskResponse, GetMarketTradesRequest, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/public.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/public.ts index d235794f30c..a96b0ac5848 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/public.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/public.ts @@ -1,6 +1,6 @@ import { API_PREFIX } from '../constants'; -import { RESTBase } from './rest-base'; -import { +import type { RESTBase } from './rest-base'; +import type { GetPublicMarketTradesRequest, GetPublicMarketTradesResponse, GetPublicProductBookRequest, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/rest-base.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/rest-base.ts index a2f89f7c85f..a431c5394aa 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/rest-base.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/rest-base.ts @@ -1,7 +1,7 @@ import { generateToken } from '../jwt-generator'; -import fetch, { Headers, RequestInit, Response } from 'node-fetch'; +import fetch, { Headers, type RequestInit, type Response } from 'node-fetch'; import { BASE_URL, USER_AGENT } from '../constants'; -import { RequestOptions } from './types/request-types'; +import type { RequestOptions } from './types/request-types'; import { handleException } from './errors'; export class RESTBase { diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/accounts-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/accounts-types.ts index c5939a6a1fa..e51901e2598 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/accounts-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/accounts-types.ts @@ -1,4 +1,4 @@ -import { Account } from './common-types'; +import type { Account } from './common-types'; // Get Account export type GetAccountRequest = { diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/converts-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/converts-types.ts index a17abb8a911..edda3d9f7a0 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/converts-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/converts-types.ts @@ -1,5 +1,5 @@ // Create Convert Quote -import { RatConvertTrade, TradeIncentiveMetadata } from './common-types'; +import type { RatConvertTrade, TradeIncentiveMetadata } from './common-types'; export type CreateConvertQuoteRequest = { // Body Params diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/dataAPI-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/dataAPI-types.ts index 0037bf3ae55..6e1eaecfb4f 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/dataAPI-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/dataAPI-types.ts @@ -1,4 +1,4 @@ -import { PortfolioType } from './common-types'; +import type { PortfolioType } from './common-types'; // Get API Key Permissions export type GetAPIKeyPermissionsResponse = { diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/fees-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/fees-types.ts index 5e1805b84ef..a8169546667 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/fees-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/fees-types.ts @@ -1,4 +1,4 @@ -import { ContractExpiryType, ProductType, ProductVenue } from './common-types'; +import type { ContractExpiryType, ProductType, ProductVenue } from './common-types'; // Get Transactions Summary export type GetTransactionsSummaryRequest = { diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/futures-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/futures-types.ts index 190ee6275b6..65412b81019 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/futures-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/futures-types.ts @@ -1,4 +1,4 @@ -import { +import type { FCMBalanceSummary, FCMPosition, FCMSweep, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/orders-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/orders-types.ts index 09e5452339b..501b81aedc2 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/orders-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/orders-types.ts @@ -1,4 +1,4 @@ -import { +import type { CancelOrderObject, ContractExpiryType, MarginType, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/payments-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/payments-types.ts index ff00e2b166b..e85cd9f63a4 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/payments-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/payments-types.ts @@ -1,4 +1,4 @@ -import { PaymentMethod } from './common-types'; +import type { PaymentMethod } from './common-types'; // List Payment Methods export type ListPaymentMethodsResponse = { diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/perpetuals-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/perpetuals-types.ts index 2314953c657..045b494ce99 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/perpetuals-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/perpetuals-types.ts @@ -1,4 +1,4 @@ -import { +import type { PerpetualPortfolio, PortfolioBalance, PortfolioSummary, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/portfolios-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/portfolios-types.ts index bd6c503c4f9..38a997f998c 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/portfolios-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/portfolios-types.ts @@ -1,4 +1,4 @@ -import { Portfolio, PortfolioBreakdown, PortfolioType } from './common-types'; +import type { Portfolio, PortfolioBreakdown, PortfolioType } from './common-types'; // List Portfolios export type ListPortfoliosRequest = { diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/products-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/products-types.ts index 501a4f407ee..5123bf2e263 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/products-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/products-types.ts @@ -1,4 +1,4 @@ -import { +import type { Candles, ContractExpiryType, ExpiringContractStatus, diff --git a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/public-types.ts b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/public-types.ts index 7d18f270485..0593a8a5e2e 100644 --- a/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/public-types.ts +++ b/packages/plugin-coinbase/advanced-sdk-ts/src/rest/types/public-types.ts @@ -1,4 +1,4 @@ -import { +import type { Candles, ContractExpiryType, ExpiringContractStatus, diff --git a/packages/plugin-coinbase/src/plugins/advancedTrade.ts b/packages/plugin-coinbase/src/plugins/advancedTrade.ts index 3e26e78ac08..b2f0bf8e8e5 100644 --- a/packages/plugin-coinbase/src/plugins/advancedTrade.ts +++ b/packages/plugin-coinbase/src/plugins/advancedTrade.ts @@ -1,16 +1,16 @@ import { RESTClient } from "../../advanced-sdk-ts/src/rest"; import { - Action, - Plugin, + type Action, + type Plugin, elizaLogger, - IAgentRuntime, - Memory, - HandlerCallback, - State, + type IAgentRuntime, + type Memory, + type HandlerCallback, + type State, composeContext, generateObject, ModelClass, - Provider, + type Provider, } from "@elizaos/core"; import { advancedTradeTemplate } from "../templates"; import { isAdvancedTradeContent, AdvancedTradeSchema } from "../types"; @@ -22,9 +22,9 @@ import fs from "fs"; import { createArrayCsvWriter } from "csv-writer"; import { OrderSide, - OrderConfiguration, + type OrderConfiguration, } from "../../advanced-sdk-ts/src/rest/types/common-types"; -import { CreateOrderResponse } from "../../advanced-sdk-ts/src/rest/types/orders-types"; +import type { CreateOrderResponse } from "../../advanced-sdk-ts/src/rest/types/orders-types"; // File path setup remains the same const __filename = fileURLToPath(import.meta.url); @@ -165,7 +165,7 @@ async function hasEnoughBalance( return false; } - const available = parseFloat(account.available_balance.value); + const available = Number.parseFloat(account.available_balance.value); // Add buffer for fees only on USD purchases const requiredAmount = side === "BUY" ? amount * 1.01 : amount; elizaLogger.info( diff --git a/packages/plugin-coinbase/src/plugins/commerce.ts b/packages/plugin-coinbase/src/plugins/commerce.ts index ca249b53d68..38ab0875bb4 100644 --- a/packages/plugin-coinbase/src/plugins/commerce.ts +++ b/packages/plugin-coinbase/src/plugins/commerce.ts @@ -3,9 +3,9 @@ import { elizaLogger, generateObject, ModelClass, - Provider, + type Provider, } from "@elizaos/core"; -import { +import type { Action, HandlerCallback, IAgentRuntime, @@ -13,7 +13,7 @@ import { Plugin, State, } from "@elizaos/core"; -import { ChargeContent, ChargeSchema, isChargeContent } from "../types"; +import { type ChargeContent, ChargeSchema, isChargeContent } from "../types"; import { chargeTemplate, getChargeTemplate } from "../templates"; import { getWalletDetails } from "../utils"; import { Coinbase } from "@coinbase/coinbase-sdk"; diff --git a/packages/plugin-coinbase/src/plugins/massPayments.ts b/packages/plugin-coinbase/src/plugins/massPayments.ts index 70e65d17fc8..68d8319fe9c 100644 --- a/packages/plugin-coinbase/src/plugins/massPayments.ts +++ b/packages/plugin-coinbase/src/plugins/massPayments.ts @@ -1,22 +1,22 @@ -import { Coinbase, Wallet } from "@coinbase/coinbase-sdk"; +import { Coinbase, type Wallet } from "@coinbase/coinbase-sdk"; import { composeContext, elizaLogger, generateObject, ModelClass, - Action, - IAgentRuntime, - Memory, - Provider, - State, - HandlerCallback, - Plugin, + type Action, + type IAgentRuntime, + type Memory, + type Provider, + type State, + type HandlerCallback, + type Plugin, } from "@elizaos/core"; import { TransferSchema, isTransferContent, - TransferContent, - Transaction, + type TransferContent, + type Transaction, } from "../types"; import { transferTemplate } from "../templates"; import { readFile } from "fs/promises"; @@ -86,7 +86,7 @@ export const massPayoutProvider: Provider = { return { currentTransactions: records.map((record: any) => ({ address: record["Address"] || undefined, - amount: parseFloat(record["Amount"]) || undefined, + amount: Number.parseFloat(record["Amount"]) || undefined, status: record["Status"] || undefined, errorCode: record["Error Code"] || "", transactionUrl: record["Transaction URL"] || "", diff --git a/packages/plugin-coinbase/src/plugins/tokenContract.ts b/packages/plugin-coinbase/src/plugins/tokenContract.ts index 861f67ba235..f621f0c457d 100644 --- a/packages/plugin-coinbase/src/plugins/tokenContract.ts +++ b/packages/plugin-coinbase/src/plugins/tokenContract.ts @@ -1,12 +1,12 @@ -import { Coinbase, readContract, SmartContract } from "@coinbase/coinbase-sdk"; +import { Coinbase, readContract, type SmartContract } from "@coinbase/coinbase-sdk"; import { - Action, - Plugin, + type Action, + type Plugin, elizaLogger, - IAgentRuntime, - Memory, - HandlerCallback, - State, + type IAgentRuntime, + type Memory, + type HandlerCallback, + type State, composeContext, generateObject, ModelClass, diff --git a/packages/plugin-coinbase/src/plugins/trade.ts b/packages/plugin-coinbase/src/plugins/trade.ts index 5858d70f1ad..bb1ca4599cb 100644 --- a/packages/plugin-coinbase/src/plugins/trade.ts +++ b/packages/plugin-coinbase/src/plugins/trade.ts @@ -1,20 +1,20 @@ import { Coinbase } from "@coinbase/coinbase-sdk"; import { - Action, - Plugin, + type Action, + type Plugin, elizaLogger, - IAgentRuntime, - Memory, - HandlerCallback, - State, + type IAgentRuntime, + type Memory, + type HandlerCallback, + type State, composeContext, generateObject, ModelClass, - Provider, + type Provider, } from "@elizaos/core"; import { executeTradeAndCharityTransfer, getWalletDetails } from "../utils"; import { tradeTemplate } from "../templates"; -import { isTradeContent, TradeContent, TradeSchema } from "../types"; +import { isTradeContent, type TradeContent, TradeSchema } from "../types"; import { readFile } from "fs/promises"; import { parse } from "csv-parse/sync"; import path from "path"; @@ -75,9 +75,9 @@ export const tradeProvider: Provider = { return { currentTrades: records.map((record: any) => ({ network: record["Network"] || undefined, - amount: parseFloat(record["From Amount"]) || undefined, + amount: Number.parseFloat(record["From Amount"]) || undefined, sourceAsset: record["Source Asset"] || undefined, - toAmount: parseFloat(record["To Amount"]) || undefined, + toAmount: Number.parseFloat(record["To Amount"]) || undefined, targetAsset: record["Target Asset"] || undefined, status: record["Status"] || undefined, transactionUrl: record["Transaction URL"] || "", diff --git a/packages/plugin-coinbase/src/plugins/webhooks.ts b/packages/plugin-coinbase/src/plugins/webhooks.ts index 62dd40de223..3bfffc35e0d 100644 --- a/packages/plugin-coinbase/src/plugins/webhooks.ts +++ b/packages/plugin-coinbase/src/plugins/webhooks.ts @@ -1,18 +1,18 @@ import { Coinbase, Webhook } from "@coinbase/coinbase-sdk"; import { - Action, - Plugin, + type Action, + type Plugin, elizaLogger, - IAgentRuntime, - Memory, - HandlerCallback, - State, + type IAgentRuntime, + type Memory, + type HandlerCallback, + type State, composeContext, generateObject, ModelClass, - Provider, + type Provider, } from "@elizaos/core"; -import { WebhookSchema, isWebhookContent, WebhookContent } from "../types"; +import { WebhookSchema, isWebhookContent, type WebhookContent } from "../types"; import { webhookTemplate } from "../templates"; import { appendWebhooksToCsv } from "../utils"; diff --git a/packages/plugin-coinbase/src/types.ts b/packages/plugin-coinbase/src/types.ts index 5fd9c620d88..4733402671c 100644 --- a/packages/plugin-coinbase/src/types.ts +++ b/packages/plugin-coinbase/src/types.ts @@ -2,8 +2,8 @@ import { Coinbase } from "@coinbase/coinbase-sdk"; import { z } from "zod"; import { WebhookEventType, - WebhookEventFilter, - WebhookEventTypeFilter, + type WebhookEventFilter, + type WebhookEventTypeFilter, } from "@coinbase/coinbase-sdk/dist/client"; export const ChargeSchema = z.object({ diff --git a/packages/plugin-coinbase/src/utils.ts b/packages/plugin-coinbase/src/utils.ts index a3f05334f98..7a1873066bf 100644 --- a/packages/plugin-coinbase/src/utils.ts +++ b/packages/plugin-coinbase/src/utils.ts @@ -1,18 +1,18 @@ import { Coinbase, - Trade, - Transfer, + type Trade, + type Transfer, Wallet, - WalletData, - Webhook, + type WalletData, + type Webhook, } from "@coinbase/coinbase-sdk"; -import { elizaLogger, IAgentRuntime, settings } from "@elizaos/core"; +import { elizaLogger, type IAgentRuntime, settings } from "@elizaos/core"; import fs from "fs"; import path from "path"; -import { EthereumTransaction } from "@coinbase/coinbase-sdk/dist/client"; +import type { EthereumTransaction } from "@coinbase/coinbase-sdk/dist/client"; import { fileURLToPath } from "url"; import { createArrayCsvWriter } from "csv-writer"; -import { Transaction } from "./types"; +import type { Transaction } from "./types"; // Dynamically resolve the file path to the src/plugins directory const __filename = fileURLToPath(import.meta.url); @@ -513,7 +513,7 @@ export async function executeTransfer( */ export function getCharityAddress( network: string, - isCharitable: boolean = false + isCharitable = false ): string | null { // Check both environment variable and passed parameter const isCharityEnabled = diff --git a/packages/plugin-coingecko/src/actions/getMarkets.ts b/packages/plugin-coingecko/src/actions/getMarkets.ts index 5a32ad903ce..2d7d85e9abb 100644 --- a/packages/plugin-coingecko/src/actions/getMarkets.ts +++ b/packages/plugin-coingecko/src/actions/getMarkets.ts @@ -1,14 +1,14 @@ import { - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObject, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action } from "@elizaos/core"; import axios from "axios"; diff --git a/packages/plugin-coingecko/src/actions/getPrice.ts b/packages/plugin-coingecko/src/actions/getPrice.ts index 7e47db4f3f2..316fe9f4eca 100644 --- a/packages/plugin-coingecko/src/actions/getPrice.ts +++ b/packages/plugin-coingecko/src/actions/getPrice.ts @@ -1,14 +1,14 @@ import { - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObject, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import axios from "axios"; diff --git a/packages/plugin-coingecko/src/actions/getPricePerAddress.ts b/packages/plugin-coingecko/src/actions/getPricePerAddress.ts index ad07a3f057e..29871b14725 100644 --- a/packages/plugin-coingecko/src/actions/getPricePerAddress.ts +++ b/packages/plugin-coingecko/src/actions/getPricePerAddress.ts @@ -1,14 +1,14 @@ import { - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObject, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import axios from "axios"; diff --git a/packages/plugin-coingecko/src/actions/getTopGainersLosers.ts b/packages/plugin-coingecko/src/actions/getTopGainersLosers.ts index c8b8b67fb9b..5f26073a4c0 100644 --- a/packages/plugin-coingecko/src/actions/getTopGainersLosers.ts +++ b/packages/plugin-coingecko/src/actions/getTopGainersLosers.ts @@ -1,14 +1,14 @@ import { - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObject, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action } from "@elizaos/core"; import axios from "axios"; diff --git a/packages/plugin-coingecko/src/actions/getTrending.ts b/packages/plugin-coingecko/src/actions/getTrending.ts index cb2e1c12150..03ae552493d 100644 --- a/packages/plugin-coingecko/src/actions/getTrending.ts +++ b/packages/plugin-coingecko/src/actions/getTrending.ts @@ -1,14 +1,14 @@ import { - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObject, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action } from "@elizaos/core"; import axios from "axios"; diff --git a/packages/plugin-coingecko/src/environment.ts b/packages/plugin-coingecko/src/environment.ts index d7733bbd537..d8212f4afd6 100644 --- a/packages/plugin-coingecko/src/environment.ts +++ b/packages/plugin-coingecko/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; const coingeckoConfigSchema = z.object({ diff --git a/packages/plugin-coingecko/src/index.ts b/packages/plugin-coingecko/src/index.ts index 0404c14f131..6dcdf9e43ec 100644 --- a/packages/plugin-coingecko/src/index.ts +++ b/packages/plugin-coingecko/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import getMarkets from "./actions/getMarkets"; import getPrice from "./actions/getPrice"; import getPricePerAddress from "./actions/getPricePerAddress"; diff --git a/packages/plugin-coingecko/src/providers/categoriesProvider.ts b/packages/plugin-coingecko/src/providers/categoriesProvider.ts index 6264b642ead..d661b830ccc 100644 --- a/packages/plugin-coingecko/src/providers/categoriesProvider.ts +++ b/packages/plugin-coingecko/src/providers/categoriesProvider.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, Provider, State, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, type Memory, type Provider, type State, elizaLogger } from "@elizaos/core"; import axios from 'axios'; import { getApiConfig, validateCoingeckoConfig } from '../environment'; diff --git a/packages/plugin-coingecko/src/providers/coinsProvider.ts b/packages/plugin-coingecko/src/providers/coinsProvider.ts index b45d93e06b7..3d8156141e0 100644 --- a/packages/plugin-coingecko/src/providers/coinsProvider.ts +++ b/packages/plugin-coingecko/src/providers/coinsProvider.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, Provider, State, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, type Memory, type Provider, type State, elizaLogger } from "@elizaos/core"; import axios from 'axios'; import { getApiConfig, validateCoingeckoConfig } from '../environment'; @@ -12,7 +12,7 @@ const CACHE_KEY = 'coingecko:coins'; const CACHE_TTL = 5 * 60; // 5 minutes const MAX_RETRIES = 3; -async function fetchCoins(runtime: IAgentRuntime, includePlatform: boolean = false): Promise { +async function fetchCoins(runtime: IAgentRuntime, includePlatform = false): Promise { const config = await validateCoingeckoConfig(runtime); const { baseUrl, apiKey } = getApiConfig(config); @@ -37,7 +37,7 @@ async function fetchCoins(runtime: IAgentRuntime, includePlatform: boolean = fal return response.data; } -async function fetchWithRetry(runtime: IAgentRuntime, includePlatform: boolean = false): Promise { +async function fetchWithRetry(runtime: IAgentRuntime, includePlatform = false): Promise { let lastError: Error | null = null; for (let i = 0; i < MAX_RETRIES; i++) { @@ -53,7 +53,7 @@ async function fetchWithRetry(runtime: IAgentRuntime, includePlatform: boolean = throw lastError || new Error("Failed to fetch coins after multiple attempts"); } -async function getCoins(runtime: IAgentRuntime, includePlatform: boolean = false): Promise { +async function getCoins(runtime: IAgentRuntime, includePlatform = false): Promise { try { // Try to get from cache first const cached = await runtime.cacheManager.get(CACHE_KEY); @@ -109,6 +109,6 @@ export const coinsProvider: Provider = { }; // Helper function for actions to get raw coins data -export async function getCoinsData(runtime: IAgentRuntime, includePlatform: boolean = false): Promise { +export async function getCoinsData(runtime: IAgentRuntime, includePlatform = false): Promise { return getCoins(runtime, includePlatform); } \ No newline at end of file diff --git a/packages/plugin-coinmarketcap/src/actions/getPrice/examples.ts b/packages/plugin-coinmarketcap/src/actions/getPrice/examples.ts index 5a6713b566f..701993902cf 100644 --- a/packages/plugin-coinmarketcap/src/actions/getPrice/examples.ts +++ b/packages/plugin-coinmarketcap/src/actions/getPrice/examples.ts @@ -1,4 +1,4 @@ -import { ActionExample } from "@elizaos/core"; +import type { ActionExample } from "@elizaos/core"; export const priceExamples: ActionExample[][] = [ [ diff --git a/packages/plugin-coinmarketcap/src/actions/getPrice/index.ts b/packages/plugin-coinmarketcap/src/actions/getPrice/index.ts index 61ca090c021..53cdcdf0a6b 100644 --- a/packages/plugin-coinmarketcap/src/actions/getPrice/index.ts +++ b/packages/plugin-coinmarketcap/src/actions/getPrice/index.ts @@ -2,18 +2,18 @@ import { composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { validateCoinMarketCapConfig } from "../../environment"; import { priceExamples } from "./examples"; import { createPriceService } from "./service"; import { getPriceTemplate } from "./template"; -import { GetPriceContent } from "./types"; +import type { GetPriceContent } from "./types"; import { isGetPriceContent } from "./validation"; export default { diff --git a/packages/plugin-coinmarketcap/src/actions/getPrice/service.ts b/packages/plugin-coinmarketcap/src/actions/getPrice/service.ts index 2b2d9170926..df716b50c30 100644 --- a/packages/plugin-coinmarketcap/src/actions/getPrice/service.ts +++ b/packages/plugin-coinmarketcap/src/actions/getPrice/service.ts @@ -1,5 +1,5 @@ import axios from "axios"; -import { ApiResponse, PriceData } from "./types"; +import type { ApiResponse, PriceData } from "./types"; const BASE_URL = "https://pro-api.coinmarketcap.com/v1"; diff --git a/packages/plugin-coinmarketcap/src/actions/getPrice/types.ts b/packages/plugin-coinmarketcap/src/actions/getPrice/types.ts index 7b84dde3420..8290b77daf5 100644 --- a/packages/plugin-coinmarketcap/src/actions/getPrice/types.ts +++ b/packages/plugin-coinmarketcap/src/actions/getPrice/types.ts @@ -1,4 +1,4 @@ -import { Content } from "@elizaos/core"; +import type { Content } from "@elizaos/core"; export interface GetPriceContent extends Content { symbol: string; diff --git a/packages/plugin-coinmarketcap/src/actions/getPrice/validation.ts b/packages/plugin-coinmarketcap/src/actions/getPrice/validation.ts index 16bbf67d617..7ef2a878fbe 100644 --- a/packages/plugin-coinmarketcap/src/actions/getPrice/validation.ts +++ b/packages/plugin-coinmarketcap/src/actions/getPrice/validation.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { GetPriceContent } from "./types"; +import type { GetPriceContent } from "./types"; export const GetPriceSchema = z.object({ symbol: z.string(), diff --git a/packages/plugin-coinmarketcap/src/environment.ts b/packages/plugin-coinmarketcap/src/environment.ts index d21d13bfdf7..8f7a1faadc7 100644 --- a/packages/plugin-coinmarketcap/src/environment.ts +++ b/packages/plugin-coinmarketcap/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const coinmarketcapEnvSchema = z.object({ diff --git a/packages/plugin-coinmarketcap/src/index.ts b/packages/plugin-coinmarketcap/src/index.ts index 5da30cf5abe..dc2d24dea87 100644 --- a/packages/plugin-coinmarketcap/src/index.ts +++ b/packages/plugin-coinmarketcap/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import getPrice from "./actions/getPrice"; export const coinmarketcapPlugin: Plugin = { diff --git a/packages/plugin-coinmarketcap/src/types.ts b/packages/plugin-coinmarketcap/src/types.ts index 7b84dde3420..8290b77daf5 100644 --- a/packages/plugin-coinmarketcap/src/types.ts +++ b/packages/plugin-coinmarketcap/src/types.ts @@ -1,4 +1,4 @@ -import { Content } from "@elizaos/core"; +import type { Content } from "@elizaos/core"; export interface GetPriceContent extends Content { symbol: string; diff --git a/packages/plugin-conflux/src/actions/bridgeTransfer.ts b/packages/plugin-conflux/src/actions/bridgeTransfer.ts index 3e1cccbbf49..3e6ae4b799b 100644 --- a/packages/plugin-conflux/src/actions/bridgeTransfer.ts +++ b/packages/plugin-conflux/src/actions/bridgeTransfer.ts @@ -1,4 +1,4 @@ -import { +import type { Action, IAgentRuntime, Memory, diff --git a/packages/plugin-conflux/src/actions/confiPump.ts b/packages/plugin-conflux/src/actions/confiPump.ts index 7ebae978855..dc3c67f4381 100644 --- a/packages/plugin-conflux/src/actions/confiPump.ts +++ b/packages/plugin-conflux/src/actions/confiPump.ts @@ -1,9 +1,9 @@ import { - Action, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, } from "@elizaos/core"; import { generateObject, composeContext, ModelClass } from "@elizaos/core"; @@ -13,8 +13,8 @@ import { http, parseEther, encodeFunctionData, - WalletClient, - Account, + type WalletClient, + type Account, } from "viem"; import { privateKeyToAccount } from "viem/accounts"; import { confluxESpaceTestnet } from "viem/chains"; diff --git a/packages/plugin-conflux/src/actions/transfer.ts b/packages/plugin-conflux/src/actions/transfer.ts index fa5237d08fe..4e392a0bf36 100644 --- a/packages/plugin-conflux/src/actions/transfer.ts +++ b/packages/plugin-conflux/src/actions/transfer.ts @@ -1,4 +1,4 @@ -import { +import type { Action, IAgentRuntime, Memory, diff --git a/packages/plugin-conflux/src/index.ts b/packages/plugin-conflux/src/index.ts index 1dacd879ca5..fc7ef20d1c1 100644 --- a/packages/plugin-conflux/src/index.ts +++ b/packages/plugin-conflux/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { transfer } from "./actions/transfer"; import { bridgeTransfer } from "./actions/bridgeTransfer"; import { confiPump } from "./actions/confiPump"; diff --git a/packages/plugin-cosmos/src/actions/transfer/index.ts b/packages/plugin-cosmos/src/actions/transfer/index.ts index efb9051b129..67db6333f80 100644 --- a/packages/plugin-cosmos/src/actions/transfer/index.ts +++ b/packages/plugin-cosmos/src/actions/transfer/index.ts @@ -1,11 +1,11 @@ import { composeContext, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { initWalletChainsData } from "../../providers/wallet/utils"; import { cosmosTransferTemplate } from "../../templates"; diff --git a/packages/plugin-cosmos/src/actions/transfer/types.ts b/packages/plugin-cosmos/src/actions/transfer/types.ts index 0857aa2608e..0d2dd26678f 100644 --- a/packages/plugin-cosmos/src/actions/transfer/types.ts +++ b/packages/plugin-cosmos/src/actions/transfer/types.ts @@ -1,4 +1,4 @@ -import { z } from "zod"; -import { cosmosTransferParamsSchema } from "./schema"; +import type { z } from "zod"; +import type { cosmosTransferParamsSchema } from "./schema"; export type CosmosTransferParams = z.infer; diff --git a/packages/plugin-cosmos/src/index.ts b/packages/plugin-cosmos/src/index.ts index 10c83120128..03ed5e9ac46 100644 --- a/packages/plugin-cosmos/src/index.ts +++ b/packages/plugin-cosmos/src/index.ts @@ -1,7 +1,7 @@ import type { Plugin } from "@elizaos/core"; import { createTransferAction } from "./actions/transfer"; import { createCosmosWalletProvider } from "./providers/wallet"; -import { ICosmosPluginOptions } from "./shared/interfaces"; +import type { ICosmosPluginOptions } from "./shared/interfaces"; export const createCosmosPlugin = ( pluginOptions?: ICosmosPluginOptions diff --git a/packages/plugin-cosmos/src/providers/wallet/index.ts b/packages/plugin-cosmos/src/providers/wallet/index.ts index a1f3b9dfeaf..7d07cf6924f 100644 --- a/packages/plugin-cosmos/src/providers/wallet/index.ts +++ b/packages/plugin-cosmos/src/providers/wallet/index.ts @@ -1,11 +1,11 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { convertBaseUnitToDisplayUnit, getSymbolByDenom, } from "@chain-registry/utils"; import { assets } from "chain-registry"; import { initWalletChainsData } from "./utils"; -import { ICosmosPluginOptions } from "../../shared/interfaces"; +import type { ICosmosPluginOptions } from "../../shared/interfaces"; import { getAvailableAssets } from "../../shared/helpers/cosmos-assets"; export const createCosmosWalletProvider = ( diff --git a/packages/plugin-cosmos/src/providers/wallet/utils.ts b/packages/plugin-cosmos/src/providers/wallet/utils.ts index 9163e16bb39..19df8799678 100644 --- a/packages/plugin-cosmos/src/providers/wallet/utils.ts +++ b/packages/plugin-cosmos/src/providers/wallet/utils.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { CosmosWalletChains } from "../../shared/entities/cosmos-wallet-chains-data"; export const initWalletChainsData = async (runtime: IAgentRuntime) => { diff --git a/packages/plugin-cosmos/src/tests/cosmos-transaction-fee-estimator.test.ts b/packages/plugin-cosmos/src/tests/cosmos-transaction-fee-estimator.test.ts index bbbd3cc55ef..1c9ab9f1711 100644 --- a/packages/plugin-cosmos/src/tests/cosmos-transaction-fee-estimator.test.ts +++ b/packages/plugin-cosmos/src/tests/cosmos-transaction-fee-estimator.test.ts @@ -1,5 +1,5 @@ -import { describe, it, expect, vi, beforeEach, Mock } from "vitest"; -import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate"; +import { describe, it, expect, vi, beforeEach, type Mock } from "vitest"; +import type { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate"; import { CosmosTransactionFeeEstimator } from "../shared/services/cosmos-transaction-fee-estimator"; vi.mock("@cosmjs/cosmwasm-stargate", () => ({ diff --git a/packages/plugin-cosmos/src/tests/cosmos-transfer-action-service.test.ts b/packages/plugin-cosmos/src/tests/cosmos-transfer-action-service.test.ts index 1fb4c1be97e..ff392352359 100644 --- a/packages/plugin-cosmos/src/tests/cosmos-transfer-action-service.test.ts +++ b/packages/plugin-cosmos/src/tests/cosmos-transfer-action-service.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, vi, beforeEach } from "vitest"; import { CosmosTransferActionService } from "../actions/transfer/services/cosmos-transfer-action-service.ts"; -import { AssetList } from "@chain-registry/types"; +import type { AssetList } from "@chain-registry/types"; vi.mock("@cosmjs/cosmwasm-stargate", () => ({ SigningCosmWasmClient: { diff --git a/packages/plugin-cosmos/src/tests/cosmos-wallet-chains-data.test.ts b/packages/plugin-cosmos/src/tests/cosmos-wallet-chains-data.test.ts index 7fbcf9806b8..43951613358 100644 --- a/packages/plugin-cosmos/src/tests/cosmos-wallet-chains-data.test.ts +++ b/packages/plugin-cosmos/src/tests/cosmos-wallet-chains-data.test.ts @@ -1,5 +1,5 @@ -import { vi, expect, it, describe, beforeEach, Mock } from "vitest"; -import { Chain } from "@chain-registry/types"; +import { vi, expect, it, describe, beforeEach, type Mock } from "vitest"; +import type { Chain } from "@chain-registry/types"; import { getChainByChainName } from "@chain-registry/utils"; import { CosmosWallet } from "../shared/entities/cosmos-wallet.ts"; import { getAvailableChains } from "../shared/helpers/cosmos-chains.ts"; diff --git a/packages/plugin-cronoszkevm/src/actions/transferAction.ts b/packages/plugin-cronoszkevm/src/actions/transferAction.ts index 4ddabbdd119..5486113a471 100644 --- a/packages/plugin-cronoszkevm/src/actions/transferAction.ts +++ b/packages/plugin-cronoszkevm/src/actions/transferAction.ts @@ -1,12 +1,12 @@ import type { Action } from "@elizaos/core"; import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, elizaLogger, composeContext, generateObject, @@ -14,7 +14,7 @@ import { import { validateCronosZkevmConfig } from "../enviroment"; import { - Address, + type Address, createPublicClient, erc20Abi, http, diff --git a/packages/plugin-cronoszkevm/src/enviroment.ts b/packages/plugin-cronoszkevm/src/enviroment.ts index fe21205b3a1..4fbdf54d904 100644 --- a/packages/plugin-cronoszkevm/src/enviroment.ts +++ b/packages/plugin-cronoszkevm/src/enviroment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { isAddress } from "viem"; import { z } from "zod"; diff --git a/packages/plugin-cronoszkevm/src/hooks/useGetAccount.ts b/packages/plugin-cronoszkevm/src/hooks/useGetAccount.ts index 229a031892a..0870986b809 100644 --- a/packages/plugin-cronoszkevm/src/hooks/useGetAccount.ts +++ b/packages/plugin-cronoszkevm/src/hooks/useGetAccount.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import type { PrivateKeyAccount } from "viem/accounts"; import { privateKeyToAccount } from "viem/accounts"; diff --git a/packages/plugin-cronoszkevm/src/index.ts b/packages/plugin-cronoszkevm/src/index.ts index b1a67fd8807..1ac9a17d982 100644 --- a/packages/plugin-cronoszkevm/src/index.ts +++ b/packages/plugin-cronoszkevm/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { TransferAction } from "./actions"; diff --git a/packages/plugin-cronoszkevm/src/utils/validateContext.ts b/packages/plugin-cronoszkevm/src/utils/validateContext.ts index ded9ce2640e..b024a2a0498 100644 --- a/packages/plugin-cronoszkevm/src/utils/validateContext.ts +++ b/packages/plugin-cronoszkevm/src/utils/validateContext.ts @@ -1,4 +1,4 @@ -import { TransferContent } from "../actions"; +import type { TransferContent } from "../actions"; import { isAddress } from "viem"; export class ValidateContext { diff --git a/packages/plugin-depin/src/actions/depinProjects.ts b/packages/plugin-depin/src/actions/depinProjects.ts index 79e70acaaf3..ebbbb4ee793 100644 --- a/packages/plugin-depin/src/actions/depinProjects.ts +++ b/packages/plugin-depin/src/actions/depinProjects.ts @@ -1,12 +1,12 @@ import { - Action, + type Action, composeContext, generateText, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { projectsTemplate } from "../template"; diff --git a/packages/plugin-depin/src/actions/sentientai.ts b/packages/plugin-depin/src/actions/sentientai.ts index 68f2440e0c5..2a3133cf4db 100644 --- a/packages/plugin-depin/src/actions/sentientai.ts +++ b/packages/plugin-depin/src/actions/sentientai.ts @@ -1,4 +1,4 @@ -import { +import type { Action, HandlerCallback, IAgentRuntime, diff --git a/packages/plugin-depin/src/providers/depinData.ts b/packages/plugin-depin/src/providers/depinData.ts index 4f94d5c9f06..a8eeb9d0be9 100644 --- a/packages/plugin-depin/src/providers/depinData.ts +++ b/packages/plugin-depin/src/providers/depinData.ts @@ -4,7 +4,7 @@ import { type Memory, type State, elizaLogger, - ICacheManager, + type ICacheManager, } from "@elizaos/core"; import NodeCache from "node-cache"; import * as path from "path"; @@ -17,7 +17,7 @@ export const DEPIN_PROJECTS_URL = "https://metrics-api.w3bstream.com/project"; export class DePINScanProvider { private cache: NodeCache; - private cacheKey: string = "depin/metrics"; + private cacheKey = "depin/metrics"; constructor(private cacheManager: ICacheManager) { this.cache = new NodeCache({ stdTTL: 3600 }); @@ -102,7 +102,7 @@ export class DePINScanProvider { num = value; } else if (typeof value === "string") { // Parse string to number - num = parseFloat(value); + num = Number.parseFloat(value); } else { return ""; // Handle unexpected types gracefully } diff --git a/packages/plugin-dexscreener/src/actions/tokenAction.ts b/packages/plugin-dexscreener/src/actions/tokenAction.ts index 0c5ec25dc1f..e820f276d8c 100644 --- a/packages/plugin-dexscreener/src/actions/tokenAction.ts +++ b/packages/plugin-dexscreener/src/actions/tokenAction.ts @@ -1,4 +1,4 @@ -import { Action, IAgentRuntime, Memory, State, HandlerCallback } from "@elizaos/core"; +import type { Action, IAgentRuntime, Memory, State, HandlerCallback } from "@elizaos/core"; import { TokenPriceProvider } from "../providers/tokenProvider"; export const priceTemplate = `Determine if this is a token price request. If it is one of the specified situations, perform the corresponding action: diff --git a/packages/plugin-dexscreener/src/actions/trendsAction.ts b/packages/plugin-dexscreener/src/actions/trendsAction.ts index 1e2cda301f9..16dda471fbe 100644 --- a/packages/plugin-dexscreener/src/actions/trendsAction.ts +++ b/packages/plugin-dexscreener/src/actions/trendsAction.ts @@ -1,9 +1,9 @@ import { - Action, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, getEmbeddingZeroVector, } from "@elizaos/core"; diff --git a/packages/plugin-dexscreener/src/evaluators/tokenEvaluator.ts b/packages/plugin-dexscreener/src/evaluators/tokenEvaluator.ts index 44e293d519c..cda3b1fa9bd 100644 --- a/packages/plugin-dexscreener/src/evaluators/tokenEvaluator.ts +++ b/packages/plugin-dexscreener/src/evaluators/tokenEvaluator.ts @@ -1,4 +1,4 @@ -import { Evaluator, IAgentRuntime, Memory, State } from "@elizaos/core"; +import type { Evaluator, IAgentRuntime, Memory, State } from "@elizaos/core"; export class TokenPriceEvaluator implements Evaluator { name = "TOKEN_PRICE_EVALUATOR"; diff --git a/packages/plugin-dexscreener/src/index.ts b/packages/plugin-dexscreener/src/index.ts index b5d3508da88..e6e3c4f6a3d 100644 --- a/packages/plugin-dexscreener/src/index.ts +++ b/packages/plugin-dexscreener/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { TokenPriceAction } from "./actions/tokenAction"; import { TokenPriceEvaluator } from "./evaluators/tokenEvaluator"; import { TokenPriceProvider } from "./providers/tokenProvider"; diff --git a/packages/plugin-dexscreener/src/providers/tokenProvider.ts b/packages/plugin-dexscreener/src/providers/tokenProvider.ts index 49e8e495b49..78cf81aa9c8 100644 --- a/packages/plugin-dexscreener/src/providers/tokenProvider.ts +++ b/packages/plugin-dexscreener/src/providers/tokenProvider.ts @@ -1,4 +1,4 @@ -import { Provider, IAgentRuntime, Memory, State } from "@elizaos/core"; +import type { Provider, IAgentRuntime, Memory, State } from "@elizaos/core"; /* interface TokenPriceData { @@ -95,19 +95,19 @@ export class TokenPriceProvider implements Provider { private getBestPair(pairs: any[]): any { return pairs.reduce((best, current) => { - const bestLiquidity = parseFloat(best.liquidity?.usd || "0"); - const currentLiquidity = parseFloat(current.liquidity?.usd || "0"); + const bestLiquidity = Number.parseFloat(best.liquidity?.usd || "0"); + const currentLiquidity = Number.parseFloat(current.liquidity?.usd || "0"); return currentLiquidity > bestLiquidity ? current : best; }, pairs[0]); } private formatPriceData(pair: any): string { - const price = parseFloat(pair.priceUsd).toFixed(6); + const price = Number.parseFloat(pair.priceUsd).toFixed(6); //const change24h = pair.priceChange?.h24?.toFixed(2) || "0.00"; - const liquidity = parseFloat( + const liquidity = Number.parseFloat( pair.liquidity?.usd || "0" ).toLocaleString(); - const volume = parseFloat(pair.volume?.h24 || "0").toLocaleString(); + const volume = Number.parseFloat(pair.volume?.h24 || "0").toLocaleString(); return ` The price of ${pair.baseToken.symbol} is $${price} USD, with liquidity of $${liquidity} and 24h volume of $${volume}.`; diff --git a/packages/plugin-echochambers/src/echoChamberClient.ts b/packages/plugin-echochambers/src/echoChamberClient.ts index 72556500a78..9ec41ceb7d3 100644 --- a/packages/plugin-echochambers/src/echoChamberClient.ts +++ b/packages/plugin-echochambers/src/echoChamberClient.ts @@ -1,5 +1,5 @@ -import { elizaLogger, IAgentRuntime } from "@elizaos/core"; -import { +import { elizaLogger, type IAgentRuntime } from "@elizaos/core"; +import type { ChatMessage, ChatRoom, EchoChamberConfig, diff --git a/packages/plugin-echochambers/src/environment.ts b/packages/plugin-echochambers/src/environment.ts index b8a852b09e0..b78e4aa66ba 100644 --- a/packages/plugin-echochambers/src/environment.ts +++ b/packages/plugin-echochambers/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; export async function validateEchoChamberConfig( runtime: IAgentRuntime diff --git a/packages/plugin-echochambers/src/index.ts b/packages/plugin-echochambers/src/index.ts index cc2cbbc617a..f69d702943a 100644 --- a/packages/plugin-echochambers/src/index.ts +++ b/packages/plugin-echochambers/src/index.ts @@ -1,7 +1,7 @@ -import { elizaLogger, Client, IAgentRuntime, Plugin } from "@elizaos/core"; +import { elizaLogger, type Client, type IAgentRuntime, type Plugin } from "@elizaos/core"; import { EchoChamberClient } from "./echoChamberClient"; import { InteractionClient } from "./interactions"; -import { EchoChamberConfig } from "./types"; +import type { EchoChamberConfig } from "./types"; import { validateEchoChamberConfig } from "./environment"; export const EchoChamberClientInterface: Client = { diff --git a/packages/plugin-echochambers/src/interactions.ts b/packages/plugin-echochambers/src/interactions.ts index 5e9be716d62..a211454f2ff 100644 --- a/packages/plugin-echochambers/src/interactions.ts +++ b/packages/plugin-echochambers/src/interactions.ts @@ -4,18 +4,18 @@ import { generateShouldRespond, messageCompletionFooter, shouldRespondFooter, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, State, stringToUuid, elizaLogger, getEmbeddingZeroVector, } from "@elizaos/core"; -import { EchoChamberClient } from "./echoChamberClient"; -import { ChatMessage, ChatRoom } from "./types"; +import type { EchoChamberClient } from "./echoChamberClient"; +import type { ChatMessage, ChatRoom } from "./types"; function createMessageTemplate(currentRoom: string, roomTopic: string) { return ( diff --git a/packages/plugin-evm/src/actions/bridge.ts b/packages/plugin-evm/src/actions/bridge.ts index d5d8816e25a..9d5215bd045 100644 --- a/packages/plugin-evm/src/actions/bridge.ts +++ b/packages/plugin-evm/src/actions/bridge.ts @@ -7,11 +7,11 @@ import { import { createConfig, executeRoute, - ExtendedChain, + type ExtendedChain, getRoutes, } from "@lifi/sdk"; -import { initWalletProvider, WalletProvider } from "../providers/wallet"; +import { initWalletProvider, type WalletProvider } from "../providers/wallet"; import { bridgeTemplate } from "../templates"; import type { BridgeParams, Transaction } from "../types"; import { parseEther } from "viem"; diff --git a/packages/plugin-evm/src/actions/gov-execute.ts b/packages/plugin-evm/src/actions/gov-execute.ts index 2aa52807168..654c80785fc 100644 --- a/packages/plugin-evm/src/actions/gov-execute.ts +++ b/packages/plugin-evm/src/actions/gov-execute.ts @@ -4,8 +4,8 @@ import { executeProposalTemplate } from "../templates"; import type { ExecuteProposalParams, Transaction } from "../types"; import governorArtifacts from "../contracts/artifacts/OZGovernor.json"; import { - ByteArray, - Hex, + type ByteArray, + type Hex, encodeFunctionData, keccak256, stringToHex, @@ -51,13 +51,13 @@ export class ExecuteAction { data: txData as Hex, chain: chainConfig, kzg: { - blobToKzgCommitment: function (_blob: ByteArray): ByteArray { + blobToKzgCommitment: (_blob: ByteArray): ByteArray => { throw new Error("Function not implemented."); }, - computeBlobKzgProof: function ( + computeBlobKzgProof: ( _blob: ByteArray, _commitment: ByteArray - ): ByteArray { + ): ByteArray => { throw new Error("Function not implemented."); }, }, diff --git a/packages/plugin-evm/src/actions/gov-propose.ts b/packages/plugin-evm/src/actions/gov-propose.ts index bc6e618990b..36d7dc6a6af 100644 --- a/packages/plugin-evm/src/actions/gov-propose.ts +++ b/packages/plugin-evm/src/actions/gov-propose.ts @@ -4,8 +4,8 @@ import { proposeTemplate } from "../templates"; import type { ProposeProposalParams, Transaction } from "../types"; import governorArtifacts from "../contracts/artifacts/OZGovernor.json"; import { - ByteArray, - Hex, + type ByteArray, + type Hex, encodeFunctionData, } from "viem"; @@ -47,13 +47,13 @@ export class ProposeAction { data: txData as Hex, chain: chainConfig, kzg: { - blobToKzgCommitment: function (_blob: ByteArray): ByteArray { + blobToKzgCommitment: (_blob: ByteArray): ByteArray => { throw new Error("Function not implemented."); }, - computeBlobKzgProof: function ( + computeBlobKzgProof: ( _blob: ByteArray, _commitment: ByteArray - ): ByteArray { + ): ByteArray => { throw new Error("Function not implemented."); }, }, diff --git a/packages/plugin-evm/src/actions/gov-queue.ts b/packages/plugin-evm/src/actions/gov-queue.ts index c54816185d6..ccb529cdbfb 100644 --- a/packages/plugin-evm/src/actions/gov-queue.ts +++ b/packages/plugin-evm/src/actions/gov-queue.ts @@ -4,8 +4,8 @@ import { queueProposalTemplate } from "../templates"; import type { QueueProposalParams, Transaction } from "../types"; import governorArtifacts from "../contracts/artifacts/OZGovernor.json"; import { - ByteArray, - Hex, + type ByteArray, + type Hex, encodeFunctionData, keccak256, stringToHex, @@ -51,13 +51,13 @@ export class QueueAction { data: txData as Hex, chain: chainConfig, kzg: { - blobToKzgCommitment: function (_blob: ByteArray): ByteArray { + blobToKzgCommitment: (_blob: ByteArray): ByteArray => { throw new Error("Function not implemented."); }, - computeBlobKzgProof: function ( + computeBlobKzgProof: ( _blob: ByteArray, _commitment: ByteArray - ): ByteArray { + ): ByteArray => { throw new Error("Function not implemented."); }, }, diff --git a/packages/plugin-evm/src/actions/gov-vote.ts b/packages/plugin-evm/src/actions/gov-vote.ts index becd1319cdf..0607218cfda 100644 --- a/packages/plugin-evm/src/actions/gov-vote.ts +++ b/packages/plugin-evm/src/actions/gov-vote.ts @@ -3,7 +3,7 @@ import { WalletProvider } from "../providers/wallet"; import { voteTemplate } from "../templates"; import type { Transaction, VoteParams } from "../types"; import governorArtifacts from "../contracts/artifacts/OZGovernor.json"; -import { ByteArray, Hex, encodeFunctionData } from "viem"; +import { type ByteArray, type Hex, encodeFunctionData } from "viem"; export { voteTemplate }; @@ -41,13 +41,13 @@ export class VoteAction { data: txData as Hex, chain: chainConfig, kzg: { - blobToKzgCommitment: function (_blob: ByteArray): ByteArray { + blobToKzgCommitment: (_blob: ByteArray): ByteArray => { throw new Error("Function not implemented."); }, - computeBlobKzgProof: function ( + computeBlobKzgProof: ( _blob: ByteArray, _commitment: ByteArray - ): ByteArray { + ): ByteArray => { throw new Error("Function not implemented."); }, }, diff --git a/packages/plugin-evm/src/actions/swap.ts b/packages/plugin-evm/src/actions/swap.ts index a43dca6cbd8..339edcb8887 100644 --- a/packages/plugin-evm/src/actions/swap.ts +++ b/packages/plugin-evm/src/actions/swap.ts @@ -7,11 +7,11 @@ import { import { createConfig, executeRoute, - ExtendedChain, + type ExtendedChain, getRoutes, } from "@lifi/sdk"; -import { initWalletProvider, WalletProvider } from "../providers/wallet"; +import { initWalletProvider, type WalletProvider } from "../providers/wallet"; import { swapTemplate } from "../templates"; import type { SwapParams, Transaction } from "../types"; import { parseEther } from "viem"; diff --git a/packages/plugin-evm/src/actions/transfer.ts b/packages/plugin-evm/src/actions/transfer.ts index 51c3b27eada..67237d0d8a6 100644 --- a/packages/plugin-evm/src/actions/transfer.ts +++ b/packages/plugin-evm/src/actions/transfer.ts @@ -1,16 +1,16 @@ -import { ByteArray, formatEther, parseEther, type Hex } from "viem"; +import { type ByteArray, formatEther, parseEther, type Hex } from "viem"; import { - Action, + type Action, composeContext, generateObjectDeprecated, - HandlerCallback, + type HandlerCallback, ModelClass, type IAgentRuntime, type Memory, type State, } from "@elizaos/core"; -import { initWalletProvider, WalletProvider } from "../providers/wallet"; +import { initWalletProvider, type WalletProvider } from "../providers/wallet"; import type { Transaction, TransferParams } from "../types"; import { transferTemplate } from "../templates"; @@ -40,13 +40,13 @@ export class TransferAction { value: parseEther(params.amount), data: params.data as Hex, kzg: { - blobToKzgCommitment: function (_: ByteArray): ByteArray { + blobToKzgCommitment: (_: ByteArray): ByteArray => { throw new Error("Function not implemented."); }, - computeBlobKzgProof: function ( + computeBlobKzgProof: ( _blob: ByteArray, _commitment: ByteArray - ): ByteArray { + ): ByteArray => { throw new Error("Function not implemented."); }, }, diff --git a/packages/plugin-evm/src/providers/wallet.ts b/packages/plugin-evm/src/providers/wallet.ts index 90a3b89b5bf..60bfdbebbcf 100644 --- a/packages/plugin-evm/src/providers/wallet.ts +++ b/packages/plugin-evm/src/providers/wallet.ts @@ -35,7 +35,7 @@ import type { SupportedChain } from "../types"; export class WalletProvider { private cache: NodeCache; - private cacheKey: string = "evm/wallet"; + private cacheKey = "evm/wallet"; private currentChain: SupportedChain = "mainnet"; private CACHE_EXPIRY_SEC = 5; chains: Record = { ...viemChains }; diff --git a/packages/plugin-evm/src/tests/gov.test.ts b/packages/plugin-evm/src/tests/gov.test.ts index 89821e9688c..d72145bb1a4 100644 --- a/packages/plugin-evm/src/tests/gov.test.ts +++ b/packages/plugin-evm/src/tests/gov.test.ts @@ -1,14 +1,14 @@ import { describe, it, expect, beforeEach } from "vitest"; import { generatePrivateKey } from "viem/accounts"; import { - Address, - Chain, + type Address, + type Chain, encodeFunctionData, getContract, - Hash, - PublicClient, - TestClient, - WalletClient, + type Hash, + type PublicClient, + type TestClient, + type WalletClient, decodeEventLog, keccak256, stringToHex, @@ -21,7 +21,7 @@ import governorArtifacts from "../contracts/artifacts/OZGovernor.json"; import voteTokenArtifacts from "../contracts/artifacts/VoteToken.json"; import timelockArtifacts from "../contracts/artifacts/TimelockController.json"; import { QueueAction } from "../actions/gov-queue"; -import { Proposal } from "../types"; +import type { Proposal } from "../types"; import { ExecuteAction } from "../actions/gov-execute"; import { ProposeAction } from "../actions/gov-propose"; diff --git a/packages/plugin-evm/src/tests/transfer.test.ts b/packages/plugin-evm/src/tests/transfer.test.ts index ff2a0887776..9c81b284f5b 100644 --- a/packages/plugin-evm/src/tests/transfer.test.ts +++ b/packages/plugin-evm/src/tests/transfer.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, beforeEach, vi, afterEach } from "vitest"; import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; -import { Account, Chain } from "viem"; +import type { Account, Chain } from "viem"; import { TransferAction } from "../actions/transfer"; import { WalletProvider } from "../providers/wallet"; diff --git a/packages/plugin-evm/src/tests/wallet.test.ts b/packages/plugin-evm/src/tests/wallet.test.ts index a4fe0a92d00..d4fe2a389b4 100644 --- a/packages/plugin-evm/src/tests/wallet.test.ts +++ b/packages/plugin-evm/src/tests/wallet.test.ts @@ -8,7 +8,7 @@ import { afterEach, } from "vitest"; import { generatePrivateKey, privateKeyToAccount } from "viem/accounts"; -import { mainnet, iotex, arbitrum, Chain } from "viem/chains"; +import { mainnet, iotex, arbitrum, type Chain } from "viem/chains"; import { WalletProvider } from "../providers/wallet"; diff --git a/packages/plugin-flow/src/actions/transfer.ts b/packages/plugin-flow/src/actions/transfer.ts index 1b1dcc34296..118525b1631 100644 --- a/packages/plugin-flow/src/actions/transfer.ts +++ b/packages/plugin-flow/src/actions/transfer.ts @@ -1,6 +1,6 @@ import { composeContext, - Content, + type Content, elizaLogger, generateObjectArray, ModelClass, @@ -21,7 +21,7 @@ import { } from "../providers/wallet.provider"; import { transferTemplate } from "../templates"; import { validateFlowConfig } from "../environment"; -import { TransactionResponse } from "../types"; +import type { TransactionResponse } from "../types"; import { transactions } from "../assets/transaction.defs"; import * as queries from "../queries"; @@ -135,7 +135,7 @@ export class TransferAction { const amount = typeof content.amount === "number" ? content.amount - : parseFloat(content.amount); + : Number.parseFloat(content.amount); // Check if the wallet has enough balance to transfer const accountInfo = await queries.queryAccountBalanceInfo( diff --git a/packages/plugin-flow/src/environment.ts b/packages/plugin-flow/src/environment.ts index ce740856e4b..faab872bdc5 100644 --- a/packages/plugin-flow/src/environment.ts +++ b/packages/plugin-flow/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; const FLOW_MAINNET_PUBLIC_RPC = "https://mainnet.onflow.org"; diff --git a/packages/plugin-flow/src/providers/connector.provider.ts b/packages/plugin-flow/src/providers/connector.provider.ts index 1bcafebf788..7a043046b81 100644 --- a/packages/plugin-flow/src/providers/connector.provider.ts +++ b/packages/plugin-flow/src/providers/connector.provider.ts @@ -1,12 +1,12 @@ import { elizaLogger, - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, } from "@elizaos/core"; -import FlowConnector, { NetworkType } from "./utils/flow.connector"; +import FlowConnector, { type NetworkType } from "./utils/flow.connector"; // Here is the configuration file for fixes. import flowJSON from "../../flow.json" assert { type: "json" }; diff --git a/packages/plugin-flow/src/providers/utils/flow.connector.ts b/packages/plugin-flow/src/providers/utils/flow.connector.ts index 45cb01fc4e5..ba0628b8cfb 100644 --- a/packages/plugin-flow/src/providers/utils/flow.connector.ts +++ b/packages/plugin-flow/src/providers/utils/flow.connector.ts @@ -1,6 +1,6 @@ import * as fcl from "@onflow/fcl"; import type { Account, TransactionStatus } from "@onflow/typedefs"; -import { IFlowScriptExecutor } from "../../types"; +import type { IFlowScriptExecutor } from "../../types"; import Exception from "../../types/exception"; export type NetworkType = "mainnet" | "testnet" | "emulator"; diff --git a/packages/plugin-flow/src/providers/wallet.provider.ts b/packages/plugin-flow/src/providers/wallet.provider.ts index abc3dc58436..fd1b09eadc2 100644 --- a/packages/plugin-flow/src/providers/wallet.provider.ts +++ b/packages/plugin-flow/src/providers/wallet.provider.ts @@ -1,15 +1,15 @@ import { elizaLogger, - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, } from "@elizaos/core"; import NodeCache from "node-cache"; import * as fcl from "@onflow/fcl"; import type { CompositeSignature, Account } from "@onflow/typedefs"; import type { FlowConnector } from "./utils/flow.connector"; -import { IFlowScriptExecutor, IFlowSigner } from "../types"; +import type { IFlowScriptExecutor, IFlowSigner } from "../types"; import { getFlowConnectorInstance } from "./connector.provider"; import PureSigner from "./utils/pure.signer"; import Exception from "../types/exception"; diff --git a/packages/plugin-flow/src/queries.ts b/packages/plugin-flow/src/queries.ts index 9bdae7dc01b..938a53607d5 100644 --- a/packages/plugin-flow/src/queries.ts +++ b/packages/plugin-flow/src/queries.ts @@ -1,5 +1,5 @@ import { scripts } from "./assets/script.defs"; -import { FlowAccountBalanceInfo, IFlowScriptExecutor } from "./types"; +import type { FlowAccountBalanceInfo, IFlowScriptExecutor } from "./types"; /** * Query the balance of an EVM ERC20 token @@ -34,7 +34,7 @@ export async function queryEvmERC20Decimals( (arg, t) => [arg(evmContractAddress, t.String)], "0" ); - return parseInt(ret); + return Number.parseInt(ret); } /** @@ -73,8 +73,8 @@ export async function queryAccountBalanceInfo( } return { address: ret.address, - balance: parseFloat(ret.balance), + balance: Number.parseFloat(ret.balance), coaAddress: ret.coaAddress, - coaBalance: ret.coaBalance ? parseFloat(ret.coaBalance) : undefined, + coaBalance: ret.coaBalance ? Number.parseFloat(ret.coaBalance) : undefined, }; } diff --git a/packages/plugin-flow/src/types/fcl.d.ts b/packages/plugin-flow/src/types/fcl.d.ts index dbfe105dee8..668e3514249 100644 --- a/packages/plugin-flow/src/types/fcl.d.ts +++ b/packages/plugin-flow/src/types/fcl.d.ts @@ -21,8 +21,8 @@ declare module "@onflow/config" { /* eslint-disable @typescript-eslint/no-explicit-any */ declare module "@onflow/fcl" { - import * as ftypes from "@onflow/types"; - import { FlowConfig } from "@onflow/config"; + import type * as ftypes from "@onflow/types"; + import type { FlowConfig } from "@onflow/config"; import type { Account, CompositeSignature, diff --git a/packages/plugin-flow/src/types/index.ts b/packages/plugin-flow/src/types/index.ts index 14a35b5ea3c..87e7aa4ac77 100644 --- a/packages/plugin-flow/src/types/index.ts +++ b/packages/plugin-flow/src/types/index.ts @@ -1,4 +1,4 @@ -import * as fcl from "@onflow/fcl"; +import type * as fcl from "@onflow/fcl"; import type { Account } from "@onflow/typedefs"; export interface IFlowScriptExecutor { diff --git a/packages/plugin-fuel/src/actions/transfer.ts b/packages/plugin-fuel/src/actions/transfer.ts index 9ff5e2b9140..bafea9dd812 100644 --- a/packages/plugin-fuel/src/actions/transfer.ts +++ b/packages/plugin-fuel/src/actions/transfer.ts @@ -1,12 +1,12 @@ import { - Action, + type Action, composeContext, generateObjectDeprecated, - IAgentRuntime, + type IAgentRuntime, ModelClass, - State, + type State, } from "@elizaos/core"; -import { initWalletProvider, WalletProvider } from "../providers/wallet"; +import { initWalletProvider, type WalletProvider } from "../providers/wallet"; import { bn } from "fuels"; import { transferTemplate } from "../templates"; diff --git a/packages/plugin-fuel/src/index.ts b/packages/plugin-fuel/src/index.ts index 3cfc05997e0..9c8f0fffcec 100644 --- a/packages/plugin-fuel/src/index.ts +++ b/packages/plugin-fuel/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { transferAction } from "./actions/transfer"; import { fuelWalletProvider } from "./providers/wallet"; diff --git a/packages/plugin-fuel/src/providers/wallet.ts b/packages/plugin-fuel/src/providers/wallet.ts index 3b428c4c2ef..4401be2e133 100644 --- a/packages/plugin-fuel/src/providers/wallet.ts +++ b/packages/plugin-fuel/src/providers/wallet.ts @@ -1,5 +1,5 @@ import type { IAgentRuntime, Provider, Memory, State } from "@elizaos/core"; -import { Provider as FuelProvider, Wallet, WalletUnlocked } from "fuels"; +import { Provider as FuelProvider, Wallet, type WalletUnlocked } from "fuels"; export class WalletProvider { wallet: WalletUnlocked; diff --git a/packages/plugin-genlayer/src/actions/deployContract.ts b/packages/plugin-genlayer/src/actions/deployContract.ts index b6392a4c485..621fb533feb 100644 --- a/packages/plugin-genlayer/src/actions/deployContract.ts +++ b/packages/plugin-genlayer/src/actions/deployContract.ts @@ -1,13 +1,13 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; import fs from "fs"; -import { DeployContractParams } from "../types"; +import type { DeployContractParams } from "../types"; import { ClientProvider } from "../providers/client"; import { getParamsWithLLM } from "../utils/llm"; diff --git a/packages/plugin-genlayer/src/actions/getContractSchema.ts b/packages/plugin-genlayer/src/actions/getContractSchema.ts index 5ec168efc79..d81c63ad250 100644 --- a/packages/plugin-genlayer/src/actions/getContractSchema.ts +++ b/packages/plugin-genlayer/src/actions/getContractSchema.ts @@ -1,8 +1,8 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, elizaLogger, } from "@elizaos/core"; import { ClientProvider } from "../providers/client"; diff --git a/packages/plugin-genlayer/src/actions/getCurrentNonce.ts b/packages/plugin-genlayer/src/actions/getCurrentNonce.ts index 4ae35c4d3d9..20f1c725048 100644 --- a/packages/plugin-genlayer/src/actions/getCurrentNonce.ts +++ b/packages/plugin-genlayer/src/actions/getCurrentNonce.ts @@ -1,8 +1,8 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, elizaLogger, } from "@elizaos/core"; import { ClientProvider } from "../providers/client"; diff --git a/packages/plugin-genlayer/src/actions/getTransaction.ts b/packages/plugin-genlayer/src/actions/getTransaction.ts index 673350a40ff..3b3f9f07ad7 100644 --- a/packages/plugin-genlayer/src/actions/getTransaction.ts +++ b/packages/plugin-genlayer/src/actions/getTransaction.ts @@ -1,12 +1,12 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; -import { TransactionHash } from "genlayer-js/types"; +import type { TransactionHash } from "genlayer-js/types"; import { ClientProvider } from "../providers/client"; import { getParamsWithLLM } from "../utils/llm"; diff --git a/packages/plugin-genlayer/src/actions/readContract.ts b/packages/plugin-genlayer/src/actions/readContract.ts index 2b3f2806cbd..7ca847089d4 100644 --- a/packages/plugin-genlayer/src/actions/readContract.ts +++ b/packages/plugin-genlayer/src/actions/readContract.ts @@ -1,11 +1,11 @@ -import { +import type { Action, HandlerCallback, IAgentRuntime, Memory, State, } from "@elizaos/core"; -import { ReadContractParams } from "../types"; +import type { ReadContractParams } from "../types"; import { ClientProvider } from "../providers/client"; import { getParamsWithLLM } from "../utils/llm"; diff --git a/packages/plugin-genlayer/src/actions/waitForTransactionReceipt.ts b/packages/plugin-genlayer/src/actions/waitForTransactionReceipt.ts index bc92446bde6..5be78455172 100644 --- a/packages/plugin-genlayer/src/actions/waitForTransactionReceipt.ts +++ b/packages/plugin-genlayer/src/actions/waitForTransactionReceipt.ts @@ -1,11 +1,11 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, elizaLogger, } from "@elizaos/core"; -import { TransactionHash } from "genlayer-js/types"; +import type { TransactionHash } from "genlayer-js/types"; import { ClientProvider } from "../providers/client"; export const waitForTransactionReceiptAction: Action = { diff --git a/packages/plugin-genlayer/src/actions/writeContract.ts b/packages/plugin-genlayer/src/actions/writeContract.ts index 33c849ab707..4ee32df9ddb 100644 --- a/packages/plugin-genlayer/src/actions/writeContract.ts +++ b/packages/plugin-genlayer/src/actions/writeContract.ts @@ -1,12 +1,12 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; -import { WriteContractParams } from "../types"; +import type { WriteContractParams } from "../types"; import { ClientProvider } from "../providers/client"; import { getParamsWithLLM } from "../utils/llm"; diff --git a/packages/plugin-genlayer/src/index.ts b/packages/plugin-genlayer/src/index.ts index af7b4072ce7..cf40c85694c 100644 --- a/packages/plugin-genlayer/src/index.ts +++ b/packages/plugin-genlayer/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { clientProvider } from "./providers/client"; import { readContractAction } from "./actions/readContract"; import { writeContractAction } from "./actions/writeContract"; diff --git a/packages/plugin-genlayer/src/providers/client.ts b/packages/plugin-genlayer/src/providers/client.ts index b67b3b83429..e99967a6878 100644 --- a/packages/plugin-genlayer/src/providers/client.ts +++ b/packages/plugin-genlayer/src/providers/client.ts @@ -1,10 +1,10 @@ -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; import { createClient } from "genlayer-js"; import { simulator } from "genlayer-js/chains"; -import { GenLayerClient, SimulatorChain } from "genlayer-js/types"; +import type { GenLayerClient, SimulatorChain } from "genlayer-js/types"; import { privateKeyToAccount } from "viem/accounts"; -import { Account } from "viem"; +import type { Account } from "viem"; function instantiateClient(account?: Account, rpcUrl?: string) { const rpcUrlToUse = rpcUrl ?? "https://studio.genlayer.com:8443/api"; diff --git a/packages/plugin-genlayer/src/types/index.ts b/packages/plugin-genlayer/src/types/index.ts index f4684116b7d..370d1e29dfd 100644 --- a/packages/plugin-genlayer/src/types/index.ts +++ b/packages/plugin-genlayer/src/types/index.ts @@ -1,4 +1,4 @@ -import { +import type { Address, CalldataEncodable, TransactionHash, diff --git a/packages/plugin-genlayer/src/utils/llm.ts b/packages/plugin-genlayer/src/utils/llm.ts index 3bf755e0e07..47f5f8f904d 100644 --- a/packages/plugin-genlayer/src/utils/llm.ts +++ b/packages/plugin-genlayer/src/utils/llm.ts @@ -1,11 +1,11 @@ import { composeContext, generateText, - IAgentRuntime, - Memory, + type IAgentRuntime, + type Memory, ModelClass, parseJSONObjectFromText, - State, + type State, } from "@elizaos/core"; export async function getParamsWithLLM( @@ -13,7 +13,7 @@ export async function getParamsWithLLM( message: Memory, template: string, state: State = null, - maxAttempts: number = 5 + maxAttempts = 5 ): Promise { const context = composeContext({ state: { diff --git a/packages/plugin-giphy/src/actions/sendGif.ts b/packages/plugin-giphy/src/actions/sendGif.ts index e8818021ed4..ae733a123dd 100644 --- a/packages/plugin-giphy/src/actions/sendGif.ts +++ b/packages/plugin-giphy/src/actions/sendGif.ts @@ -3,20 +3,20 @@ import { ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import axios from "axios"; import { debugLog } from "../utils/debug"; import { validateGiphyConfig } from "../environment"; -import { GifResponse, Gif } from "../types"; +import type { GifResponse, Gif } from "../types"; import fs from "fs"; import path from "path"; import crypto from "crypto"; diff --git a/packages/plugin-giphy/src/environment.ts b/packages/plugin-giphy/src/environment.ts index fc914c06706..dcb93ca7d7c 100644 --- a/packages/plugin-giphy/src/environment.ts +++ b/packages/plugin-giphy/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const giphyEnvSchema = z.object({ diff --git a/packages/plugin-giphy/src/index.ts b/packages/plugin-giphy/src/index.ts index bcff921748e..b69e64d952c 100644 --- a/packages/plugin-giphy/src/index.ts +++ b/packages/plugin-giphy/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import sendGif from "./actions/sendGif"; export const giphyPlugin: Plugin = { diff --git a/packages/plugin-gitbook/src/index.ts b/packages/plugin-gitbook/src/index.ts index 8d3d56724d0..42d84d824dd 100644 --- a/packages/plugin-gitbook/src/index.ts +++ b/packages/plugin-gitbook/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { gitbookProvider } from "./providers/gitbook"; export const gitbookPlugin: Plugin = { diff --git a/packages/plugin-gitbook/src/providers/gitbook.ts b/packages/plugin-gitbook/src/providers/gitbook.ts index abd407f4f3c..5d86ae0b9a6 100644 --- a/packages/plugin-gitbook/src/providers/gitbook.ts +++ b/packages/plugin-gitbook/src/providers/gitbook.ts @@ -1,11 +1,11 @@ import { - Provider, - IAgentRuntime, - Memory, - State, + type Provider, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; -import { GitBookResponse, GitBookClientConfig } from "../types"; +import type { GitBookResponse, GitBookClientConfig } from "../types"; function cleanText(text: string): string { const cleaned = text diff --git a/packages/plugin-gitcoin-passport/src/actions/getScore.ts b/packages/plugin-gitcoin-passport/src/actions/getScore.ts index 5a86009258d..d5eff5c1e41 100644 --- a/packages/plugin-gitcoin-passport/src/actions/getScore.ts +++ b/packages/plugin-gitcoin-passport/src/actions/getScore.ts @@ -1,10 +1,10 @@ import { - Action, + type Action, elizaLogger, - IAgentRuntime, - Memory, - HandlerCallback, - State, + type IAgentRuntime, + type Memory, + type HandlerCallback, + type State, getEmbeddingZeroVector, composeContext, generateMessageResponse, diff --git a/packages/plugin-goat/src/actions.ts b/packages/plugin-goat/src/actions.ts index 08ac3b2a830..4ccc97bedaa 100644 --- a/packages/plugin-goat/src/actions.ts +++ b/packages/plugin-goat/src/actions.ts @@ -2,7 +2,7 @@ import { getOnChainTools } from "@goat-sdk/adapter-vercel-ai"; import { MODE, USDC, erc20 } from "@goat-sdk/plugin-erc20"; import { kim } from "@goat-sdk/plugin-kim"; import { sendETH } from "@goat-sdk/wallet-evm"; -import { WalletClientBase } from "@goat-sdk/core"; +import type { WalletClientBase } from "@goat-sdk/core"; import { generateText, diff --git a/packages/plugin-goat/src/wallet.ts b/packages/plugin-goat/src/wallet.ts index 0916abfa9bb..ac3a7cc3c2d 100644 --- a/packages/plugin-goat/src/wallet.ts +++ b/packages/plugin-goat/src/wallet.ts @@ -1,4 +1,4 @@ -import { WalletClientBase } from "@goat-sdk/core"; +import type { WalletClientBase } from "@goat-sdk/core"; import { viem } from "@goat-sdk/wallet-viem"; import { createWalletClient, http } from "viem"; import { privateKeyToAccount } from "viem/accounts"; diff --git a/packages/plugin-goplus/src/index.ts b/packages/plugin-goplus/src/index.ts index 3af4f756270..71198803663 100644 --- a/packages/plugin-goplus/src/index.ts +++ b/packages/plugin-goplus/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import GoplusSecurityService from "./services/GoplusSecurityService"; export * from "./services/GoplusSecurityService"; diff --git a/packages/plugin-goplus/src/services/GoplusSecurityService.ts b/packages/plugin-goplus/src/services/GoplusSecurityService.ts index e23151e2be4..9a72014942d 100644 --- a/packages/plugin-goplus/src/services/GoplusSecurityService.ts +++ b/packages/plugin-goplus/src/services/GoplusSecurityService.ts @@ -1,5 +1,5 @@ -import { IAgentRuntime, ModelClass, Service, ServiceType, elizaLogger, generateObjectDeprecated, generateText } from "@elizaos/core"; -import { GoPlusManage, GoPlusParamType, GoPlusType } from "../lib/GoPlusManage"; +import { type IAgentRuntime, ModelClass, Service, ServiceType, elizaLogger, generateObjectDeprecated, generateText } from "@elizaos/core"; +import { GoPlusManage, type GoPlusParamType, GoPlusType } from "../lib/GoPlusManage"; import { requestPrompt, responsePrompt } from "../templates"; export interface IGoplusSecurityService extends Service { diff --git a/packages/plugin-hyperliquid/src/actions/cancelOrders.ts b/packages/plugin-hyperliquid/src/actions/cancelOrders.ts index 7c315ce5362..e77de09ed3f 100644 --- a/packages/plugin-hyperliquid/src/actions/cancelOrders.ts +++ b/packages/plugin-hyperliquid/src/actions/cancelOrders.ts @@ -1,10 +1,10 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, } from "@elizaos/core"; import { Hyperliquid } from "hyperliquid"; diff --git a/packages/plugin-hyperliquid/src/actions/priceCheck.ts b/packages/plugin-hyperliquid/src/actions/priceCheck.ts index 8a7b6469a74..1142f9ce70b 100644 --- a/packages/plugin-hyperliquid/src/actions/priceCheck.ts +++ b/packages/plugin-hyperliquid/src/actions/priceCheck.ts @@ -1,10 +1,10 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, composeContext, elizaLogger, generateObjectDeprecated, diff --git a/packages/plugin-hyperliquid/src/actions/spotTrade.ts b/packages/plugin-hyperliquid/src/actions/spotTrade.ts index cdc3e3e1004..a3af5711150 100644 --- a/packages/plugin-hyperliquid/src/actions/spotTrade.ts +++ b/packages/plugin-hyperliquid/src/actions/spotTrade.ts @@ -1,10 +1,10 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, composeContext, elizaLogger, generateObjectDeprecated, diff --git a/packages/plugin-hyperliquid/src/index.ts b/packages/plugin-hyperliquid/src/index.ts index a5e282f539d..b66e087e72a 100644 --- a/packages/plugin-hyperliquid/src/index.ts +++ b/packages/plugin-hyperliquid/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { spotTrade } from "./actions/spotTrade"; import { priceCheck } from "./actions/priceCheck"; import { cancelOrders } from "./actions/cancelOrders"; diff --git a/packages/plugin-icp/src/actions/createToken.ts b/packages/plugin-icp/src/actions/createToken.ts index c199b00aac3..bc927ec1291 100644 --- a/packages/plugin-icp/src/actions/createToken.ts +++ b/packages/plugin-icp/src/actions/createToken.ts @@ -5,17 +5,17 @@ import { generateObjectDeprecated, } from "@elizaos/core"; import { - ActionExample, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { idlFactory } from "../canisters/pick-pump/index.did"; -import { _SERVICE } from "../canisters/pick-pump/index.did.d"; -import { ActorCreator, CreateMemeTokenArg } from "../types"; +import type { _SERVICE } from "../canisters/pick-pump/index.did.d"; +import type { ActorCreator, CreateMemeTokenArg } from "../types"; import { unwrapOption, wrapOption } from "../utils/common/types/options"; import { unwrapRustResultMap } from "../utils/common/types/results"; import { icpWalletProvider } from "../providers/wallet"; diff --git a/packages/plugin-icp/src/apis/uploadFile.ts b/packages/plugin-icp/src/apis/uploadFile.ts index 24161ad6d85..bcae3ec173c 100644 --- a/packages/plugin-icp/src/apis/uploadFile.ts +++ b/packages/plugin-icp/src/apis/uploadFile.ts @@ -16,7 +16,7 @@ interface UploadResponse { export async function uploadFileToWeb3Storage( base64Data: string, - fileName: string = "image.png" + fileName = "image.png" ): Promise { try { // Remove base64 URL prefix (if exists) diff --git a/packages/plugin-icp/src/index.ts b/packages/plugin-icp/src/index.ts index dfe6d497c81..e0d7a260b6a 100644 --- a/packages/plugin-icp/src/index.ts +++ b/packages/plugin-icp/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { icpWalletProvider } from "./providers/wallet"; import { executeCreateToken } from "./actions/createToken"; diff --git a/packages/plugin-icp/src/providers/wallet.ts b/packages/plugin-icp/src/providers/wallet.ts index 2e5ecd2584e..f5062c856ad 100644 --- a/packages/plugin-icp/src/providers/wallet.ts +++ b/packages/plugin-icp/src/providers/wallet.ts @@ -1,16 +1,16 @@ // src/providers/wallet.ts -import { Actor, ActorSubclass, HttpAgent } from "@dfinity/agent"; +import { Actor, type ActorSubclass, HttpAgent } from "@dfinity/agent"; import { Ed25519KeyIdentity } from "@dfinity/identity"; -import { IDL } from "@dfinity/candid"; -import { Principal } from "@dfinity/principal"; -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { IDL } from "@dfinity/candid"; +import type { Principal } from "@dfinity/principal"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; export class WalletProvider { private privateKey: string; private identity: Ed25519KeyIdentity; private host: string; - constructor(privateKey: string, host: string = "https://ic0.app") { + constructor(privateKey: string, host = "https://ic0.app") { this.privateKey = privateKey; this.host = host; this.identity = this.createIdentity(); @@ -102,7 +102,7 @@ export const icpWalletProvider: Provider = { export const createAnonymousActor = async ( idlFactory: IDL.InterfaceFactory, canisterId: string, - host: string = "https://ic0.app", + host = "https://ic0.app", fetchRootKey = false ): Promise> => { const anonymousAgent = new HttpAgent({ diff --git a/packages/plugin-image-generation/src/environment.ts b/packages/plugin-image-generation/src/environment.ts index 35ce50f5249..6ac334615e8 100644 --- a/packages/plugin-image-generation/src/environment.ts +++ b/packages/plugin-image-generation/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const imageGenEnvSchema = z diff --git a/packages/plugin-image-generation/src/index.ts b/packages/plugin-image-generation/src/index.ts index 1e2c7944a21..4d37bfb6519 100644 --- a/packages/plugin-image-generation/src/index.ts +++ b/packages/plugin-image-generation/src/index.ts @@ -1,11 +1,11 @@ import { elizaLogger, generateText } from "@elizaos/core"; import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - Plugin, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type Plugin, + type State, ModelClass, } from "@elizaos/core"; import { generateImage } from "@elizaos/core"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/Ibc.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/Ibc.ts index 6b990c78b1e..b4ec0814315 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/Ibc.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/Ibc.ts @@ -1,9 +1,9 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base.js"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base.js"; import { PaginationOption } from "@injectivelabs/ts-types"; -import { MsgTransfer, TxResponse } from "@injectivelabs/sdk-ts"; -import * as IBCTypes from "../types/ibc"; // Assuming IBC types are in ibc.ts +import { MsgTransfer, type TxResponse } from "@injectivelabs/sdk-ts"; +import type * as IBCTypes from "../types/ibc"; // Assuming IBC types are in ibc.ts import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/auction.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/auction.ts index 8b0454acfcb..2a9084e75bd 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/auction.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/auction.ts @@ -1,8 +1,8 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgBid } from "@injectivelabs/sdk-ts"; -import * as AuctionTypes from "../types/auction"; +import type * as AuctionTypes from "../types/auction"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/auth.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/auth.ts index 9ea8258a638..09de39b9ee5 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/auth.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/auth.ts @@ -1,6 +1,6 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/authz.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/authz.ts index f6c1379f258..0f44c958dbb 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/authz.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/authz.ts @@ -1,8 +1,8 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgGrant, MsgRevoke, MsgAuthzExec } from "@injectivelabs/sdk-ts"; -import * as AuthzTypes from "../types/auth"; +import type * as AuthzTypes from "../types/auth"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/bank.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/bank.ts index cf6af2dc3fd..43569374910 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/bank.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/bank.ts @@ -1,8 +1,8 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgSend, MsgMultiSend } from "@injectivelabs/sdk-ts"; -import * as BankTypes from "../types/bank"; +import type * as BankTypes from "../types/bank"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/distribution.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/distribution.ts index 8c1d740f339..fed27ef7f28 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/distribution.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/distribution.ts @@ -1,11 +1,11 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgWithdrawDelegatorReward, MsgWithdrawValidatorCommission, } from "@injectivelabs/sdk-ts"; -import * as DistributionTypes from "../types/distribution"; +import type * as DistributionTypes from "../types/distribution"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/exchange.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/exchange.ts index 014a8296bb8..81ab948e6f6 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/exchange.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/exchange.ts @@ -1,4 +1,4 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { BinaryOptionsMarket, DerivativeLimitOrder, @@ -8,12 +8,12 @@ import { DerivativeTrade, FundingPayment, FundingRate, - ExchangePagination, + type ExchangePagination, SubaccountTransfer, SpotLimitOrder, SpotOrderHistory, SpotTrade, - AtomicSwap, + type AtomicSwap, MsgAdminUpdateBinaryOptionsMarket, MsgBatchCancelBinaryOptionsOrders, MsgBatchCancelDerivativeOrders, @@ -38,9 +38,9 @@ import { MsgWithdraw, MsgExternalTransfer, } from "@injectivelabs/sdk-ts"; -import * as ExchangeTypes from "../types/exchange"; +import type * as ExchangeTypes from "../types/exchange"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/explorer.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/explorer.ts index 5464a51d070..13f002d1347 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/explorer.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/explorer.ts @@ -1,7 +1,7 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; -import * as ExplorerTypes from "../types/explorer"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type * as ExplorerTypes from "../types/explorer"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/gov.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/gov.ts index 06ea77fc279..f987eeaa110 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/gov.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/gov.ts @@ -1,4 +1,4 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgSubmitProposalExpiryFuturesMarketLaunch, MsgSubmitProposalSpotMarketLaunch, @@ -8,11 +8,11 @@ import { MsgSubmitProposalSpotMarketParamUpdate, MsgSubmitGenericProposal, MsgGovDeposit, - TxResponse, + type TxResponse, } from "@injectivelabs/sdk-ts"; -import * as GovernanceTypes from "../types/gov"; +import type * as GovernanceTypes from "../types/gov"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/index.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/index.ts index 446d888ee7e..74718d44f78 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/index.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/index.ts @@ -1,5 +1,5 @@ import { InjectiveGrpcBase } from "../grpc/grpc-base"; -import { Network } from "@injectivelabs/networks"; +import type { Network } from "@injectivelabs/networks"; import * as AuctionModule from "./auction"; import * as AuthModule from "./auth"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/insurance.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/insurance.ts index c266fe16ba6..07aba77bad8 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/insurance.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/insurance.ts @@ -1,11 +1,11 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgCreateInsuranceFund, MsgRequestRedemption, MsgUnderwrite, - TxResponse, + type TxResponse, } from "@injectivelabs/sdk-ts"; -import { +import type { MsgCreateInsuranceFundParams, MsgRequestRedemptionParams, MsgUnderwriteParams, @@ -14,7 +14,7 @@ import { GetPendingRedemptionsParams, } from "../types/insurance"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/mint.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/mint.ts index d4e381245a1..a35a40b5d72 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/mint.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/mint.ts @@ -1,6 +1,6 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/mito.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/mito.ts index 7bad58676fa..6880e02b3d8 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/mito.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/mito.ts @@ -1,7 +1,7 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import * as MitoTypes from "../types/mito"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/oracle.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/oracle.ts index 168877c28c3..4e8b69df982 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/oracle.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/oracle.ts @@ -1,6 +1,6 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/peggy.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/peggy.ts index a1d1164f66c..43605367434 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/peggy.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/peggy.ts @@ -1,12 +1,12 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { PeggyModuleParams, MsgSendToEth, - TxResponse, + type TxResponse, } from "@injectivelabs/sdk-ts"; -import { MsgSendToEthParams } from "../types/peggy"; +import type { MsgSendToEthParams } from "../types/peggy"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/permissions.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/permissions.ts index d805b73f135..99846243f49 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/permissions.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/permissions.ts @@ -1,7 +1,7 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; -import * as PermissionsType from "../types/permissions"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type * as PermissionsType from "../types/permissions"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/staking.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/staking.ts index 2688dbf851b..6f407df86b2 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/staking.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/staking.ts @@ -1,4 +1,4 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgBeginRedelegate, MsgDelegate, @@ -7,9 +7,9 @@ import { MsgEditValidator, MsgCancelUnbondingDelegation, } from "@injectivelabs/sdk-ts"; -import * as StakingTypes from "../types/staking"; +import type * as StakingTypes from "../types/staking"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/token-factory.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/token-factory.ts index 7f74b048b3c..cd6d489806e 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/token-factory.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/token-factory.ts @@ -1,4 +1,4 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgBurn, MsgChangeAdmin, @@ -6,9 +6,9 @@ import { MsgMint, MsgSetDenomMetadata, } from "@injectivelabs/sdk-ts"; -import * as TokenFactoryTypes from "../types/token-factory"; +import type * as TokenFactoryTypes from "../types/token-factory"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/wasm.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/wasm.ts index 5fedbd40f1a..519abbdf59b 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/wasm.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/wasm.ts @@ -1,4 +1,4 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { MsgStoreCode, MsgUpdateAdmin, @@ -8,9 +8,9 @@ import { MsgExecuteContractCompat, MsgPrivilegedExecuteContract, } from "@injectivelabs/sdk-ts"; -import * as WasmTypes from "../types/wasm"; +import type * as WasmTypes from "../types/wasm"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/modules/wasmx.ts b/packages/plugin-injective/injective-sdk-client-ts/src/modules/wasmx.ts index 1fb8b2cab83..86663cd53f5 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/modules/wasmx.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/modules/wasmx.ts @@ -1,6 +1,6 @@ -import { InjectiveGrpcBase } from "../grpc/grpc-base"; +import type { InjectiveGrpcBase } from "../grpc/grpc-base"; import { - StandardResponse, + type StandardResponse, createSuccessResponse, createErrorResponse, } from "../types/index"; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/auth.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/auth.ts index 5f9c4acd8e4..020928eb9eb 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/auth.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/auth.ts @@ -1,11 +1,11 @@ -import { +import type { PaginationOption, GrantWithDecodedAuthorization, GrantAuthorizationWithDecodedAuthorization, Pagination, Msgs, } from "@injectivelabs/sdk-ts"; -import { AddressParams } from "./base"; +import type { AddressParams } from "./base"; // Auth Module Params // Start of Get Auth Module Request Parameters export interface AuthAccountParams extends AddressParams { diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/bank.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/bank.ts index 8fb6b2c8a1f..b007c5f47d9 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/bank.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/bank.ts @@ -1,6 +1,6 @@ -import { PaginationOption, Pagination, Coin } from "@injectivelabs/sdk-ts"; -import { CosmosBaseV1Beta1Coin } from "@injectivelabs/core-proto-ts"; -import { DenomParam } from "./base"; +import type { PaginationOption, Pagination, Coin } from "@injectivelabs/sdk-ts"; +import type { CosmosBaseV1Beta1Coin } from "@injectivelabs/core-proto-ts"; +import type { DenomParam } from "./base"; // Bank Module Params // Start of Get Bank Request Parameters export interface GetBankBalanceParams { diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/base.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/base.ts index 2e7da0044af..89f550dcbbb 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/base.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/base.ts @@ -1,4 +1,4 @@ -import { PaginationOption } from "@injectivelabs/sdk-ts"; +import type { PaginationOption } from "@injectivelabs/sdk-ts"; export interface PaginationParams { pagination?: PaginationOption; } diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/distribution.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/distribution.ts index 60750f0ef80..ce34df50148 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/distribution.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/distribution.ts @@ -1,7 +1,7 @@ // Distribution Module Params // Start of Get Distribution Module Parameters -import { +import type { DistributionModuleParams, ValidatorRewards, Coin, diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/exchange.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/exchange.ts index 4d8a5f5307c..dc07963d10b 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/exchange.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/exchange.ts @@ -1,4 +1,4 @@ -import { +import type { PaginationOption, TradeDirection, TradeExecutionType, @@ -7,12 +7,12 @@ import { MarketType, GridStrategyType, } from "@injectivelabs/sdk-ts"; -import { PaginationParams, TimeRangeParams } from "./base"; -import { +import type { PaginationParams, TimeRangeParams } from "./base"; +import type { InjectiveExchangeV1Beta1Exchange, InjectiveOracleV1Beta1Oracle, } from "@injectivelabs/core-proto-ts"; -import { OrderSide, OrderState } from "@injectivelabs/ts-types"; +import type { OrderSide, OrderState } from "@injectivelabs/ts-types"; export interface MarketIdParam { marketId: string; @@ -23,17 +23,17 @@ export interface SubaccountIdParam { } // Exchange Module // Start of Get Exchange Module Params -export interface GetModuleParamsParams {} +export type GetModuleParamsParams = {} -export interface GetModuleStateParams {} +export type GetModuleStateParams = {} -export interface GetFeeDiscountScheduleParams {} +export type GetFeeDiscountScheduleParams = {} export interface GetFeeDiscountAccountInfoParams { injAddress: string; } -export interface GetTradingRewardsCampaignParams {} +export type GetTradingRewardsCampaignParams = {} export interface GetTradeRewardPointsParams { injectiveAddresses: string[]; @@ -43,7 +43,7 @@ export interface GetPendingTradeRewardPointsParams { injectiveAddresses: string[]; } -export interface GetExchangePositionsParams {} +export type GetExchangePositionsParams = {} export interface GetSubaccountTradeNonceParams { subaccountId: string; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/explorer.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/explorer.ts index 2a11e2dba65..b6b8c71d65e 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/explorer.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/explorer.ts @@ -1,4 +1,4 @@ -import { +import type { Transaction, ExplorerValidator, ValidatorUptime, @@ -8,8 +8,8 @@ import { ExplorerStats, ExchangePagination, } from "@injectivelabs/sdk-ts"; -import { InjectiveExplorerRpc } from "@injectivelabs/indexer-proto-ts"; -import { TimeRangeParams } from "./base"; +import type { InjectiveExplorerRpc } from "@injectivelabs/indexer-proto-ts"; +import type { TimeRangeParams } from "./base"; /// Explorer Module Params export interface GetTxByHashParams { hash: string; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/gov.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/gov.ts index 2b2a074be63..638cca975b8 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/gov.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/gov.ts @@ -1,4 +1,4 @@ -import { +import type { PaginationOption, Pagination, Msgs, @@ -8,8 +8,8 @@ import { Vote, TallyResult, } from "@injectivelabs/sdk-ts"; -import { PaginationParams } from "./base"; -import { +import type { PaginationParams } from "./base"; +import type { CosmosGovV1Gov, InjectiveExchangeV1Beta1Exchange, InjectiveOracleV1Beta1Oracle, diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/ibc.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/ibc.ts index 582c5c35f57..3a9b1b23cd7 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/ibc.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/ibc.ts @@ -1,6 +1,6 @@ -import { PaginationOption } from "@injectivelabs/sdk-ts"; -import { DenomTrace } from "@injectivelabs/core-proto-ts/cjs/ibc/applications/transfer/v1/transfer.js"; -import { PaginationParams } from "./base"; +import type { PaginationOption } from "@injectivelabs/sdk-ts"; +import type { DenomTrace } from "@injectivelabs/core-proto-ts/cjs/ibc/applications/transfer/v1/transfer.js"; +import type { PaginationParams } from "./base"; //IBC params export interface GetDenomTraceParams { hash: string; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/insurance.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/insurance.ts index 242067a87d4..289f5ad7a9d 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/insurance.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/insurance.ts @@ -1,5 +1,5 @@ -import { InsuranceFund, InsuranceModuleParams } from "@injectivelabs/sdk-ts"; -import { InjectiveOracleV1Beta1Oracle } from "@injectivelabs/core-proto-ts"; +import type { InsuranceFund, InsuranceModuleParams } from "@injectivelabs/sdk-ts"; +import type { InjectiveOracleV1Beta1Oracle } from "@injectivelabs/core-proto-ts"; // Insurance Fund Module Params export interface GetInsuranceFundParams { diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/mint.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/mint.ts index 18e0bba08cf..62a4973a28a 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/mint.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/mint.ts @@ -1,4 +1,4 @@ -import { MinModuleParams } from "@injectivelabs/sdk-ts"; +import type { MinModuleParams } from "@injectivelabs/sdk-ts"; // Mint module params // Response interfaces export interface MintModuleParamsResponse { diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/mito.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/mito.ts index e9aa45f2072..cc198caa328 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/mito.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/mito.ts @@ -1,4 +1,4 @@ -import { +import type { Coin, MitoVault, MitoPagination, @@ -20,7 +20,7 @@ import { MitoWhitelistAccount, MitoClaimReference, } from "@injectivelabs/sdk-ts"; -import { PaginationParams, TimeRangeParams, AddressParams } from "./base"; +import type { PaginationParams, TimeRangeParams, AddressParams } from "./base"; // Mito Module Params // Param interfaces diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/permissions.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/permissions.ts index 4b2e9fa105a..d74a3527275 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/permissions.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/permissions.ts @@ -1,9 +1,9 @@ -import { +import type { Coin, PermissionsModuleParams, Namespace, } from "@injectivelabs/sdk-ts"; -import { AddressParams } from "./base"; +import type { AddressParams } from "./base"; // Base parameter interfaces // Permissions Module Params diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/staking.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/staking.ts index 366a48144ee..aadc1245dd0 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/staking.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/staking.ts @@ -1,4 +1,4 @@ -import { +import type { PaginationOption, Pagination, StakingModuleParams, @@ -8,7 +8,7 @@ import { UnBondingDelegation, ReDelegation, } from "@injectivelabs/sdk-ts"; -import { PaginationParams } from "./base"; +import type { PaginationParams } from "./base"; // Staking Module Params // Param interfaces diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/token-factory.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/token-factory.ts index 7c4e56e2c7c..baf8cf81fba 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/token-factory.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/token-factory.ts @@ -1,9 +1,9 @@ -import { +import type { AuthorityMetadata, TokenFactoryModuleParams, TokenFactoryModuleState, } from "@injectivelabs/sdk-ts"; -import { CosmosBankV1Beta1Bank } from "@injectivelabs/core-proto-ts"; +import type { CosmosBankV1Beta1Bank } from "@injectivelabs/core-proto-ts"; // Token Factory Module Params// Param interfaces export interface GetDenomsFromCreatorParams { creator: string; diff --git a/packages/plugin-injective/injective-sdk-client-ts/src/types/wasm.ts b/packages/plugin-injective/injective-sdk-client-ts/src/types/wasm.ts index 68fd78d4bc9..f176ecec1fa 100644 --- a/packages/plugin-injective/injective-sdk-client-ts/src/types/wasm.ts +++ b/packages/plugin-injective/injective-sdk-client-ts/src/types/wasm.ts @@ -1,4 +1,4 @@ -import { +import type { PaginationOption, Pagination, ExecArgs, @@ -9,9 +9,9 @@ import { ContractCodeHistoryEntry, CodeInfoResponse, } from "@injectivelabs/sdk-ts"; -import { CosmwasmWasmV1Query } from "@injectivelabs/core-proto-ts"; -import { AccessConfig } from "@injectivelabs/core-proto-ts/cjs/cosmwasm/wasm/v1/types"; -import { PaginationParams } from "./base"; +import type { CosmwasmWasmV1Query } from "@injectivelabs/core-proto-ts"; +import type { AccessConfig } from "@injectivelabs/core-proto-ts/cjs/cosmwasm/wasm/v1/types"; +import type { PaginationParams } from "./base"; // Wasm Module Params // Param interfaces export interface GetContractAccountsBalanceParams { diff --git a/packages/plugin-injective/src/action/base.ts b/packages/plugin-injective/src/action/base.ts index 73933aeaafb..077de8c9d4f 100644 --- a/packages/plugin-injective/src/action/base.ts +++ b/packages/plugin-injective/src/action/base.ts @@ -1,11 +1,11 @@ // createGenericAction.ts -import { ActionExample } from "@elizaos/core"; +import type { ActionExample } from "@elizaos/core"; import { - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, elizaLogger, composeContext, type Action, diff --git a/packages/plugin-injective/src/index.ts b/packages/plugin-injective/src/index.ts index c0d5e1e49dd..8e95784db8e 100644 --- a/packages/plugin-injective/src/index.ts +++ b/packages/plugin-injective/src/index.ts @@ -1,5 +1,5 @@ import InjectiveActions from "./action"; -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; export const injectivePlugin: Plugin = { name: "injective", description: "A plugin for interacting with the Injective blockchain", diff --git a/packages/plugin-intiface/src/environment.ts b/packages/plugin-intiface/src/environment.ts index 85458f0f7c4..c2bfd06bd3b 100644 --- a/packages/plugin-intiface/src/environment.ts +++ b/packages/plugin-intiface/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const intifaceEnvSchema = z diff --git a/packages/plugin-intiface/test/fake-buttplug.ts b/packages/plugin-intiface/test/fake-buttplug.ts index e14bc8dfc24..1d801e84a2a 100644 --- a/packages/plugin-intiface/test/fake-buttplug.ts +++ b/packages/plugin-intiface/test/fake-buttplug.ts @@ -100,7 +100,7 @@ export class LovenseNora extends SimulatedDevice { private vibrateCmdLog: Record = {}; private rotateCmdLog: Record = {}; - constructor(port: number = 54817) { + constructor(port = 54817) { super(port, "Lovense Nora", "696969696969"); } @@ -117,7 +117,7 @@ export class LovenseNora extends SimulatedDevice { } else if (message.startsWith("Vibrate:")) { const match = message.match(/Vibrate:(\d+);/); if (match) { - const speed = parseInt(match[1]); + const speed = Number.parseInt(match[1]); if ( speed === 0 && Object.keys(this.vibrateCmdLog).length === 0 @@ -132,7 +132,7 @@ export class LovenseNora extends SimulatedDevice { } else if (message.startsWith("Rotate:")) { const match = message.match(/Rotate:(\d+);/); if (match) { - const speed = parseInt(match[1]); + const speed = Number.parseInt(match[1]); if ( speed === 0 && Object.keys(this.rotateCmdLog).length === 0 diff --git a/packages/plugin-intiface/test/simulate.ts b/packages/plugin-intiface/test/simulate.ts index 116e9710e2a..9f33001814d 100644 --- a/packages/plugin-intiface/test/simulate.ts +++ b/packages/plugin-intiface/test/simulate.ts @@ -1,7 +1,7 @@ import { ButtplugClient, ButtplugNodeWebsocketClientConnector, - ButtplugClientDevice, + type ButtplugClientDevice, } from "buttplug"; import { LovenseNora } from "./fake-buttplug"; diff --git a/packages/plugin-iq6900/src/functions/bringIQData.ts b/packages/plugin-iq6900/src/functions/bringIQData.ts index 28000d0e1b8..0faeed8a6d7 100644 --- a/packages/plugin-iq6900/src/functions/bringIQData.ts +++ b/packages/plugin-iq6900/src/functions/bringIQData.ts @@ -31,7 +31,7 @@ async function fetchDBPDA(): Promise { async function convertTextToEmoji(text: string) { return text.replace(/\/u([0-9A-Fa-f]{4,6})/g, (match, code) => { - return String.fromCodePoint(parseInt(code, 16)); + return String.fromCodePoint(Number.parseInt(code, 16)); }); } @@ -95,7 +95,7 @@ async function bringCode(dataTxid: string) { const tail_tx = txInfo.tail_tx || "null"; const offset = txInfo.offset || "null"; - let chunks = []; + const chunks = []; let before_tx = tail_tx; if (before_tx == "null") return { diff --git a/packages/plugin-iq6900/src/index.ts b/packages/plugin-iq6900/src/index.ts index 4d382878143..a0ecc6ac944 100644 --- a/packages/plugin-iq6900/src/index.ts +++ b/packages/plugin-iq6900/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; export { onchainJson } from "./types/iq.ts"; export const elizaCodeinPlugin: Plugin = { diff --git a/packages/plugin-irys/src/index.ts b/packages/plugin-irys/src/index.ts index 0cf83ac3ec0..998c02807bf 100644 --- a/packages/plugin-irys/src/index.ts +++ b/packages/plugin-irys/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import IrysService from "./services/irysService"; const irysPlugin: Plugin = { diff --git a/packages/plugin-irys/src/services/irysService.ts b/packages/plugin-irys/src/services/irysService.ts index 24f4038e0a8..547891ad542 100644 --- a/packages/plugin-irys/src/services/irysService.ts +++ b/packages/plugin-irys/src/services/irysService.ts @@ -1,16 +1,16 @@ import { - IAgentRuntime, + type IAgentRuntime, Service, ServiceType, - IIrysService, - UploadIrysResult, - DataIrysFetchedFromGQL, - GraphQLTag, + type IIrysService, + type UploadIrysResult, + type DataIrysFetchedFromGQL, + type GraphQLTag, IrysMessageType, generateMessageResponse, ModelClass, IrysDataType, - IrysTimestamp, + type IrysTimestamp, } from "@elizaos/core"; import { Uploader } from "@irys/upload"; import { BaseEth } from "@irys/upload-ethereum"; @@ -44,8 +44,8 @@ export class IrysService extends Service implements IIrysService { private runtime: IAgentRuntime | null = null; private irysUploader: any | null = null; - private endpointForTransactionId: string = "https://uploader.irys.xyz/graphql"; - private endpointForData: string = "https://gateway.irys.xyz"; + private endpointForTransactionId = "https://uploader.irys.xyz/graphql"; + private endpointForData = "https://gateway.irys.xyz"; async initialize(runtime: IAgentRuntime): Promise { console.log("Initializing IrysService"); diff --git a/packages/plugin-lensNetwork/src/actions/transfer.ts b/packages/plugin-lensNetwork/src/actions/transfer.ts index 84bb54309c5..9419bb79dd9 100644 --- a/packages/plugin-lensNetwork/src/actions/transfer.ts +++ b/packages/plugin-lensNetwork/src/actions/transfer.ts @@ -1,11 +1,11 @@ import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, elizaLogger, composeContext, @@ -16,7 +16,7 @@ import { getDefaultProvider, Network, Wallet } from "@lens-network/sdk/ethers"; import { ethers, formatEther } from "ethers"; import { - Address, + type Address, createWalletClient, erc20Abi, http, diff --git a/packages/plugin-lensNetwork/src/environment.ts b/packages/plugin-lensNetwork/src/environment.ts index 823fb3b8925..4821202810b 100644 --- a/packages/plugin-lensNetwork/src/environment.ts +++ b/packages/plugin-lensNetwork/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const lensEnvSchema = z.object({ diff --git a/packages/plugin-lensNetwork/src/index.ts b/packages/plugin-lensNetwork/src/index.ts index 953b1ddaf87..91e221e05e6 100644 --- a/packages/plugin-lensNetwork/src/index.ts +++ b/packages/plugin-lensNetwork/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import transfer from "./actions/transfer.ts"; diff --git a/packages/plugin-letzai/src/environment.ts b/packages/plugin-letzai/src/environment.ts index c47438cd948..379734de045 100644 --- a/packages/plugin-letzai/src/environment.ts +++ b/packages/plugin-letzai/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const imageGenEnvSchema = z diff --git a/packages/plugin-letzai/src/index.ts b/packages/plugin-letzai/src/index.ts index 5bb4dd0db2d..36d52837527 100644 --- a/packages/plugin-letzai/src/index.ts +++ b/packages/plugin-letzai/src/index.ts @@ -1,5 +1,5 @@ -import { elizaLogger, HandlerCallback, IAgentRuntime, Plugin, State } from "@elizaos/core"; -import { Memory } from "@elizaos/core"; +import { elizaLogger, type HandlerCallback, type IAgentRuntime, type Plugin, type State } from "@elizaos/core"; +import type { Memory } from "@elizaos/core"; /* diff --git a/packages/plugin-massa/src/actions/transfer.ts b/packages/plugin-massa/src/actions/transfer.ts index 7bcfaf26e71..eaada0fbe56 100644 --- a/packages/plugin-massa/src/actions/transfer.ts +++ b/packages/plugin-massa/src/actions/transfer.ts @@ -2,16 +2,16 @@ import { type Action, - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { validateConfig } from "../enviroment"; import { getMnsTarget } from "../utils/mns"; diff --git a/packages/plugin-massa/src/utils/mns.ts b/packages/plugin-massa/src/utils/mns.ts index bfabe015bf3..c17e70d9f9d 100644 --- a/packages/plugin-massa/src/utils/mns.ts +++ b/packages/plugin-massa/src/utils/mns.ts @@ -1,4 +1,4 @@ -import { CHAIN_ID, MNS, MNS_CONTRACTS, Provider } from "@massalabs/massa-web3"; +import { CHAIN_ID, MNS, MNS_CONTRACTS, type Provider } from "@massalabs/massa-web3"; export const getMnsTarget = async ( provider: Provider, diff --git a/packages/plugin-movement/src/actions/transfer.ts b/packages/plugin-movement/src/actions/transfer.ts index 43490fbcb65..470086cfd88 100644 --- a/packages/plugin-movement/src/actions/transfer.ts +++ b/packages/plugin-movement/src/actions/transfer.ts @@ -1,12 +1,12 @@ import { elizaLogger } from "@elizaos/core"; import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { composeContext } from "@elizaos/core"; diff --git a/packages/plugin-movement/src/environment.ts b/packages/plugin-movement/src/environment.ts index 96081dbe97d..51b4225657e 100644 --- a/packages/plugin-movement/src/environment.ts +++ b/packages/plugin-movement/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const movementEnvSchema = z.object({ diff --git a/packages/plugin-movement/src/index.ts b/packages/plugin-movement/src/index.ts index d8d54ba2438..62b7827f664 100644 --- a/packages/plugin-movement/src/index.ts +++ b/packages/plugin-movement/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import transferToken from "./actions/transfer"; import { WalletProvider, walletProvider } from "./providers/wallet"; diff --git a/packages/plugin-movement/src/providers/wallet.ts b/packages/plugin-movement/src/providers/wallet.ts index 90b6d1ac21e..fa824d65cd8 100644 --- a/packages/plugin-movement/src/providers/wallet.ts +++ b/packages/plugin-movement/src/providers/wallet.ts @@ -1,4 +1,4 @@ -import { +import type { IAgentRuntime, ICacheManager, Memory, @@ -36,7 +36,7 @@ interface Prices { export class WalletProvider { private cache: NodeCache; - private cacheKey: string = "movement/wallet"; + private cacheKey = "movement/wallet"; constructor( private aptosClient: Aptos, diff --git a/packages/plugin-multiversx/src/actions/createToken.ts b/packages/plugin-multiversx/src/actions/createToken.ts index c4e6d136420..2634d886f7d 100644 --- a/packages/plugin-multiversx/src/actions/createToken.ts +++ b/packages/plugin-multiversx/src/actions/createToken.ts @@ -1,12 +1,12 @@ import { elizaLogger, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, generateObject, composeContext, type Action, diff --git a/packages/plugin-multiversx/src/actions/transfer.ts b/packages/plugin-multiversx/src/actions/transfer.ts index 765fdc04602..d0f02e0e5a9 100644 --- a/packages/plugin-multiversx/src/actions/transfer.ts +++ b/packages/plugin-multiversx/src/actions/transfer.ts @@ -1,12 +1,12 @@ import { elizaLogger, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, composeContext, generateObject, type Action, diff --git a/packages/plugin-multiversx/src/enviroment.ts b/packages/plugin-multiversx/src/enviroment.ts index a257cc10cd7..077130e7de9 100644 --- a/packages/plugin-multiversx/src/enviroment.ts +++ b/packages/plugin-multiversx/src/enviroment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const multiversxEnvSchema = z.object({ diff --git a/packages/plugin-multiversx/src/index.ts b/packages/plugin-multiversx/src/index.ts index ab9b0a50e49..91421c6b3ca 100644 --- a/packages/plugin-multiversx/src/index.ts +++ b/packages/plugin-multiversx/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import transfer from "./actions/transfer"; import createToken from "./actions/createToken"; diff --git a/packages/plugin-multiversx/src/providers/wallet.ts b/packages/plugin-multiversx/src/providers/wallet.ts index a3273eada15..0a6dc115bb5 100644 --- a/packages/plugin-multiversx/src/providers/wallet.ts +++ b/packages/plugin-multiversx/src/providers/wallet.ts @@ -9,7 +9,7 @@ import { TransferTransactionsFactory, TransactionsFactoryConfig, Token, - Transaction, + type Transaction, TokenManagementTransactionsFactory, } from "@multiversx/sdk-core"; import { denominateAmount } from "../utils/amount"; diff --git a/packages/plugin-near/src/actions/swap.ts b/packages/plugin-near/src/actions/swap.ts index bf2b466fdcc..a9464143265 100644 --- a/packages/plugin-near/src/actions/swap.ts +++ b/packages/plugin-near/src/actions/swap.ts @@ -1,11 +1,11 @@ import { - ActionExample, - HandlerCallback, + type ActionExample, + type HandlerCallback, elizaLogger, - IAgentRuntime, - Memory, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, composeContext, generateObject, @@ -21,7 +21,7 @@ import { ONE_YOCTO_NEAR, } from "@ref-finance/ref-sdk"; import { walletProvider } from "../providers/wallet"; -import { KeyPairString } from "near-api-js/lib/utils"; +import type { KeyPairString } from "near-api-js/lib/utils"; async function checkStorageBalance( account: any, diff --git a/packages/plugin-near/src/actions/transfer.ts b/packages/plugin-near/src/actions/transfer.ts index 02444358e47..16879c0c0fe 100644 --- a/packages/plugin-near/src/actions/transfer.ts +++ b/packages/plugin-near/src/actions/transfer.ts @@ -1,18 +1,18 @@ import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, elizaLogger, type Action, composeContext, generateObject, } from "@elizaos/core"; import { connect, keyStores, utils } from "near-api-js"; -import { KeyPairString } from "near-api-js/lib/utils"; +import type { KeyPairString } from "near-api-js/lib/utils"; import { utils as nearUtils } from "near-api-js"; // import BigNumber from "bignumber.js"; diff --git a/packages/plugin-near/src/environment.ts b/packages/plugin-near/src/environment.ts index b8cfb8050f7..76950d90a2f 100644 --- a/packages/plugin-near/src/environment.ts +++ b/packages/plugin-near/src/environment.ts @@ -1,8 +1,8 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; // Add ENV variable at the top -let ENV: string = "testnet"; +let ENV = "testnet"; export const nearEnvSchema = z.object({ NEAR_WALLET_SECRET_KEY: z.string().min(1, "Wallet secret key is required"), diff --git a/packages/plugin-near/src/index.ts b/packages/plugin-near/src/index.ts index c6832ba5d5d..42843629417 100644 --- a/packages/plugin-near/src/index.ts +++ b/packages/plugin-near/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core/src/types"; +import type { Plugin } from "@elizaos/core/src/types"; import { walletProvider } from "./providers/wallet"; // import { executeCreateToken } from "./actions/createToken"; import { executeSwap } from "./actions/swap"; diff --git a/packages/plugin-near/src/providers/wallet.ts b/packages/plugin-near/src/providers/wallet.ts index 0a2e81c7546..76580e6b0fb 100644 --- a/packages/plugin-near/src/providers/wallet.ts +++ b/packages/plugin-near/src/providers/wallet.ts @@ -1,13 +1,13 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; -import { KeyPair, keyStores, connect, Account, utils } from "near-api-js"; +import { KeyPair, keyStores, connect, type Account, utils } from "near-api-js"; import BigNumber from "bignumber.js"; -import { KeyPairString } from "near-api-js/lib/utils"; +import type { KeyPairString } from "near-api-js/lib/utils"; import NodeCache from "node-cache"; const PROVIDER_CONFIG = { @@ -20,7 +20,7 @@ const PROVIDER_CONFIG = { explorerUrl: `https://${process.env.NEAR_NETWORK || "testnet"}.nearblocks.io`, MAX_RETRIES: 3, RETRY_DELAY: 2000, - SLIPPAGE: process.env.NEAR_SLIPPAGE ? parseInt(process.env.NEAR_SLIPPAGE) : 1, + SLIPPAGE: process.env.NEAR_SLIPPAGE ? Number.parseInt(process.env.NEAR_SLIPPAGE) : 1, }; export interface NearToken { diff --git a/packages/plugin-nft-collections/src/__tests__/reservoir.test.ts b/packages/plugin-nft-collections/src/__tests__/reservoir.test.ts index 60ad8530e18..e5d5da5c167 100644 --- a/packages/plugin-nft-collections/src/__tests__/reservoir.test.ts +++ b/packages/plugin-nft-collections/src/__tests__/reservoir.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, vi, beforeEach } from "vitest"; -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { ReservoirService } from "../services/reservoir"; import { MemoryCacheManager } from "../services/cache-manager"; import { RateLimiter } from "../services/rate-limiter"; diff --git a/packages/plugin-nft-collections/src/actions/get-collections.ts b/packages/plugin-nft-collections/src/actions/get-collections.ts index 5a601f52163..c288d488683 100644 --- a/packages/plugin-nft-collections/src/actions/get-collections.ts +++ b/packages/plugin-nft-collections/src/actions/get-collections.ts @@ -1,6 +1,6 @@ -import { State } from "@elizaos/core"; -import { HandlerCallback } from "@elizaos/core"; -import { Action, IAgentRuntime, Memory, Provider } from "@elizaos/core"; +import type { State } from "@elizaos/core"; +import type { HandlerCallback } from "@elizaos/core"; +import type { Action, IAgentRuntime, Memory, Provider } from "@elizaos/core"; export const getCollectionsAction = ( nftCollectionProvider: Provider diff --git a/packages/plugin-nft-collections/src/actions/list-nft.ts b/packages/plugin-nft-collections/src/actions/list-nft.ts index 857939577d5..64feb2a85e1 100644 --- a/packages/plugin-nft-collections/src/actions/list-nft.ts +++ b/packages/plugin-nft-collections/src/actions/list-nft.ts @@ -1,6 +1,6 @@ -import { Action, IAgentRuntime, Memory, State } from "@elizaos/core"; -import { ReservoirService } from "../services/reservoir"; -import { HandlerCallback } from "@elizaos/core"; +import type { Action, IAgentRuntime, Memory, State } from "@elizaos/core"; +import type { ReservoirService } from "../services/reservoir"; +import type { HandlerCallback } from "@elizaos/core"; // Helper function to extract NFT listing details from the message function extractListingDetails(text: string): { @@ -15,7 +15,7 @@ function extractListingDetails(text: string): { return { collectionAddress: addressMatch ? addressMatch[1] : null, tokenId: tokenIdMatch ? tokenIdMatch[1] : null, - price: priceMatch ? parseFloat(priceMatch[1]) : undefined, + price: priceMatch ? Number.parseFloat(priceMatch[1]) : undefined, }; } diff --git a/packages/plugin-nft-collections/src/actions/sweep-floor.ts b/packages/plugin-nft-collections/src/actions/sweep-floor.ts index 13557da3353..592d38780db 100644 --- a/packages/plugin-nft-collections/src/actions/sweep-floor.ts +++ b/packages/plugin-nft-collections/src/actions/sweep-floor.ts @@ -1,6 +1,6 @@ -import { Action, IAgentRuntime, Memory, State } from "@elizaos/core"; -import { ReservoirService } from "../services/reservoir"; -import { HandlerCallback } from "@elizaos/core"; +import type { Action, IAgentRuntime, Memory, State } from "@elizaos/core"; +import type { ReservoirService } from "../services/reservoir"; +import type { HandlerCallback } from "@elizaos/core"; // Helper function to extract NFT details from the message function extractNFTDetails(text: string): { @@ -12,7 +12,7 @@ function extractNFTDetails(text: string): { return { collectionAddress: addressMatch ? addressMatch[0] : null, - quantity: quantityMatch ? parseInt(quantityMatch[0]) : 1, + quantity: quantityMatch ? Number.parseInt(quantityMatch[0]) : 1, }; } diff --git a/packages/plugin-nft-collections/src/evaluators/nft-knowledge.ts b/packages/plugin-nft-collections/src/evaluators/nft-knowledge.ts index c8f78720038..1c28c69b432 100644 --- a/packages/plugin-nft-collections/src/evaluators/nft-knowledge.ts +++ b/packages/plugin-nft-collections/src/evaluators/nft-knowledge.ts @@ -1,5 +1,5 @@ -import { Evaluator, IAgentRuntime, Memory, State } from "@elizaos/core"; -import { NFTKnowledge } from "../types"; +import type { Evaluator, IAgentRuntime, Memory, State } from "@elizaos/core"; +import type { NFTKnowledge } from "../types"; export const nftKnowledgeEvaluator: Evaluator = { name: "nft-collection-evaluator", diff --git a/packages/plugin-nft-collections/src/index.ts b/packages/plugin-nft-collections/src/index.ts index bbd7f5df614..ce38ce50a50 100644 --- a/packages/plugin-nft-collections/src/index.ts +++ b/packages/plugin-nft-collections/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { createNftCollectionProvider } from "./providers/nft-collections"; import { getCollectionsAction } from "./actions/get-collections"; import { listNFTAction } from "./actions/list-nft"; diff --git a/packages/plugin-nft-collections/src/providers/nft-collections.ts b/packages/plugin-nft-collections/src/providers/nft-collections.ts index b55e6fe64bb..85775de4cc7 100644 --- a/packages/plugin-nft-collections/src/providers/nft-collections.ts +++ b/packages/plugin-nft-collections/src/providers/nft-collections.ts @@ -1,7 +1,7 @@ -import { Provider, type IAgentRuntime, type Memory } from "@elizaos/core"; -import { ReservoirService } from "../services/reservoir"; -import { MarketIntelligenceService } from "../services/market-intelligence"; -import { SocialAnalyticsService } from "../services/social-analytics"; +import type { Provider, IAgentRuntime, Memory } from "@elizaos/core"; +import type { ReservoirService } from "../services/reservoir"; +import type { MarketIntelligenceService } from "../services/market-intelligence"; +import type { SocialAnalyticsService } from "../services/social-analytics"; export const createNftCollectionProvider = ( nftService: ReservoirService, diff --git a/packages/plugin-nft-collections/src/services/cache-manager.ts b/packages/plugin-nft-collections/src/services/cache-manager.ts index 097dddb7599..10b1fd9fb9f 100644 --- a/packages/plugin-nft-collections/src/services/cache-manager.ts +++ b/packages/plugin-nft-collections/src/services/cache-manager.ts @@ -44,7 +44,7 @@ export class MemoryCacheManager { return entry.data; } - async set(key: string, value: T, priority: number = 0): Promise { + async set(key: string, value: T, priority = 0): Promise { const ttl = this.getExpirationTime(key); const entry: CacheEntry = { data: value, diff --git a/packages/plugin-nft-collections/src/services/market-intelligence.ts b/packages/plugin-nft-collections/src/services/market-intelligence.ts index 08890a283a4..2e41eaf3647 100644 --- a/packages/plugin-nft-collections/src/services/market-intelligence.ts +++ b/packages/plugin-nft-collections/src/services/market-intelligence.ts @@ -1,6 +1,6 @@ -import { MemoryCacheManager } from "./cache-manager"; -import { RateLimiter } from "./rate-limiter"; -import { MarketData } from "../utils/validation"; +import type { MemoryCacheManager } from "./cache-manager"; +import type { RateLimiter } from "./rate-limiter"; +import type { MarketData } from "../utils/validation"; interface MarketIntelligenceConfig { cacheManager?: MemoryCacheManager; diff --git a/packages/plugin-nft-collections/src/services/rate-limiter.ts b/packages/plugin-nft-collections/src/services/rate-limiter.ts index b3a7cb658d6..e34f649923e 100644 --- a/packages/plugin-nft-collections/src/services/rate-limiter.ts +++ b/packages/plugin-nft-collections/src/services/rate-limiter.ts @@ -21,7 +21,7 @@ export class RateLimiter { this.retryDelay = config.retryDelay || 1000; } - async consume(key: string, points: number = 1): Promise { + async consume(key: string, points = 1): Promise { try { await this.limiter.consume(key, points); } catch (error: any) { @@ -38,7 +38,7 @@ export class RateLimiter { async executeWithRetry( key: string, operation: () => Promise, - points: number = 1 + points = 1 ): Promise { let lastError: Error | null = null; let retries = 0; @@ -52,7 +52,7 @@ export class RateLimiter { retries++; if (error.message?.includes("Rate limit exceeded")) { - const retryAfter = parseInt( + const retryAfter = Number.parseInt( error.message.match(/\d+/)?.[0] || "1", 10 ); diff --git a/packages/plugin-nft-collections/src/services/reservoir.ts b/packages/plugin-nft-collections/src/services/reservoir.ts index afc4038e062..bc2ec669aa4 100644 --- a/packages/plugin-nft-collections/src/services/reservoir.ts +++ b/packages/plugin-nft-collections/src/services/reservoir.ts @@ -7,10 +7,10 @@ import { ErrorType, ErrorCode, } from "../utils/error-handler"; -import { MemoryCacheManager } from "./cache-manager"; -import { RateLimiter } from "./rate-limiter"; -import { MarketStats, NFTCollection } from "../types"; -import { IAgentRuntime } from "@elizaos/core"; +import type { MemoryCacheManager } from "./cache-manager"; +import type { RateLimiter } from "./rate-limiter"; +import type { MarketStats, NFTCollection } from "../types"; +import type { IAgentRuntime } from "@elizaos/core"; interface ReservoirServiceConfig { cacheManager?: MemoryCacheManager; @@ -43,7 +43,7 @@ export class ReservoirService { async makeRequest( endpoint: string, params: Record = {}, - priority: number = 0, + priority = 0, runtime: IAgentRuntime ): Promise { const endOperation = this.performanceMonitor.startOperation( @@ -138,7 +138,7 @@ export class ReservoirService { async getTopCollections( runtime: IAgentRuntime, - limit: number = 10 + limit = 10 ): Promise { const endOperation = this.performanceMonitor.startOperation( "getTopCollections", diff --git a/packages/plugin-nft-collections/src/services/social-analytics.ts b/packages/plugin-nft-collections/src/services/social-analytics.ts index 483ff4dcdce..4279bb8cddc 100644 --- a/packages/plugin-nft-collections/src/services/social-analytics.ts +++ b/packages/plugin-nft-collections/src/services/social-analytics.ts @@ -1,6 +1,6 @@ -import { MemoryCacheManager } from "./cache-manager"; -import { RateLimiter } from "./rate-limiter"; -import { SocialMetrics } from "../utils/validation"; +import type { MemoryCacheManager } from "./cache-manager"; +import type { RateLimiter } from "./rate-limiter"; +import type { SocialMetrics } from "../utils/validation"; interface SocialAnalyticsConfig { cacheManager?: MemoryCacheManager; diff --git a/packages/plugin-nft-collections/src/templates/floor-sweep.ts b/packages/plugin-nft-collections/src/templates/floor-sweep.ts index 1c3cb54ade0..1741d9e5f8a 100644 --- a/packages/plugin-nft-collections/src/templates/floor-sweep.ts +++ b/packages/plugin-nft-collections/src/templates/floor-sweep.ts @@ -1,4 +1,4 @@ -import { NFTCollection } from "../types"; +import type { NFTCollection } from "../types"; export const floorSweepTemplates = { successfulSweep: ({ diff --git a/packages/plugin-nft-collections/src/templates/market-stats.ts b/packages/plugin-nft-collections/src/templates/market-stats.ts index e58eee1865c..9f1181366e4 100644 --- a/packages/plugin-nft-collections/src/templates/market-stats.ts +++ b/packages/plugin-nft-collections/src/templates/market-stats.ts @@ -1,4 +1,4 @@ -import { NFTCollection, MarketIntelligence, MarketStats } from "../types"; +import type { NFTCollection, MarketIntelligence, MarketStats } from "../types"; export const marketStatsTemplates = { collectionOverview: ({ diff --git a/packages/plugin-nft-collections/src/templates/nft-listing.ts b/packages/plugin-nft-collections/src/templates/nft-listing.ts index b908b7effe1..b0fd5f379b6 100644 --- a/packages/plugin-nft-collections/src/templates/nft-listing.ts +++ b/packages/plugin-nft-collections/src/templates/nft-listing.ts @@ -1,4 +1,4 @@ -import { NFTCollection } from "../types"; +import type { NFTCollection } from "../types"; export const listingTemplates = { successfulListing: ({ diff --git a/packages/plugin-nft-collections/src/templates/social-analytics.ts b/packages/plugin-nft-collections/src/templates/social-analytics.ts index c4ec4b5cba1..b2d4ed59fb2 100644 --- a/packages/plugin-nft-collections/src/templates/social-analytics.ts +++ b/packages/plugin-nft-collections/src/templates/social-analytics.ts @@ -1,4 +1,4 @@ -import { NFTCollection, SocialMetrics, CommunityMetrics } from "../types"; +import type { NFTCollection, SocialMetrics, CommunityMetrics } from "../types"; export const socialAnalyticsTemplates = { socialOverview: ({ diff --git a/packages/plugin-nft-collections/src/tests/actions.test.ts b/packages/plugin-nft-collections/src/tests/actions.test.ts index 037eab62e69..14c3f363207 100644 --- a/packages/plugin-nft-collections/src/tests/actions.test.ts +++ b/packages/plugin-nft-collections/src/tests/actions.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest"; import { listNFTAction } from "../actions/list-nft"; -import { IAgentRuntime, Memory } from "@elizaos/core"; -import { NFTService } from "../types"; +import type { IAgentRuntime, Memory } from "@elizaos/core"; +import type { NFTService } from "../types"; describe("NFT Actions", () => { describe("List NFT Action", () => { diff --git a/packages/plugin-nft-collections/src/tests/providers.test.ts b/packages/plugin-nft-collections/src/tests/providers.test.ts index eef25d06802..895ac28cd44 100644 --- a/packages/plugin-nft-collections/src/tests/providers.test.ts +++ b/packages/plugin-nft-collections/src/tests/providers.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it, vi } from "vitest"; import { nftCollectionProvider } from "../providers/nft-collections"; -import { IAgentRuntime, Memory } from "@elizaos/core"; -import { NFTService } from "../types"; +import type { IAgentRuntime, Memory } from "@elizaos/core"; +import type { NFTService } from "../types"; describe("NFT Collections Provider", () => { const mockRuntime = { diff --git a/packages/plugin-nft-collections/src/tests/services.test.ts b/packages/plugin-nft-collections/src/tests/services.test.ts index 9169d05edd1..bb5af42fe5d 100644 --- a/packages/plugin-nft-collections/src/tests/services.test.ts +++ b/packages/plugin-nft-collections/src/tests/services.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, vi, beforeEach } from "vitest"; -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { ReservoirService } from "../services/reservoir"; import { MarketIntelligenceService } from "../services/market-intelligence"; import { SocialAnalyticsService } from "../services/social-analytics"; diff --git a/packages/plugin-nft-collections/src/types.ts b/packages/plugin-nft-collections/src/types.ts index 4c14722b4ca..205f732fe65 100644 --- a/packages/plugin-nft-collections/src/types.ts +++ b/packages/plugin-nft-collections/src/types.ts @@ -1,4 +1,4 @@ -import { Service } from "@elizaos/core"; +import type { Service } from "@elizaos/core"; declare module "@elizaos/core" { interface ServiceTypeMap { diff --git a/packages/plugin-nft-collections/src/utils/error-handler.ts b/packages/plugin-nft-collections/src/utils/error-handler.ts index 81d1ac4a41a..d897db84193 100644 --- a/packages/plugin-nft-collections/src/utils/error-handler.ts +++ b/packages/plugin-nft-collections/src/utils/error-handler.ts @@ -53,7 +53,7 @@ export class NFTErrorFactory { code: ErrorCode, message: string, details?: Record, - retryable: boolean = false + retryable = false ): NFTError { return ErrorSchema.parse({ type, @@ -169,7 +169,7 @@ export function shouldRetry( export function getRetryDelay( attempt: number, - baseDelay: number = 1000 + baseDelay = 1000 ): number { return Math.min(baseDelay * Math.pow(2, attempt), 30000); // Max 30 seconds } diff --git a/packages/plugin-nft-collections/src/utils/performance.ts b/packages/plugin-nft-collections/src/utils/performance.ts index de4dced28db..38a4a07319f 100644 --- a/packages/plugin-nft-collections/src/utils/performance.ts +++ b/packages/plugin-nft-collections/src/utils/performance.ts @@ -71,7 +71,7 @@ export class PerformanceMonitor extends EventEmitter { } // Get average latency for an operation - getAverageLatency(operation: string, timeWindowMs: number = 60000): number { + getAverageLatency(operation: string, timeWindowMs = 60000): number { const relevantMetrics = this.getRecentMetrics(operation, timeWindowMs); if (relevantMetrics.length === 0) return 0; @@ -83,7 +83,7 @@ export class PerformanceMonitor extends EventEmitter { } // Get error rate for an operation - getErrorRate(operation: string, timeWindowMs: number = 60000): number { + getErrorRate(operation: string, timeWindowMs = 60000): number { const relevantMetrics = this.getRecentMetrics(operation, timeWindowMs); if (relevantMetrics.length === 0) return 0; @@ -94,13 +94,13 @@ export class PerformanceMonitor extends EventEmitter { } // Get throughput (operations per second) - getThroughput(operation: string, timeWindowMs: number = 60000): number { + getThroughput(operation: string, timeWindowMs = 60000): number { const relevantMetrics = this.getRecentMetrics(operation, timeWindowMs); return (relevantMetrics.length / timeWindowMs) * 1000; } // Get performance summary - getPerformanceSummary(timeWindowMs: number = 60000): Record< + getPerformanceSummary(timeWindowMs = 60000): Record< string, { averageLatency: number; diff --git a/packages/plugin-nft-collections/src/utils/response-enhancer.ts b/packages/plugin-nft-collections/src/utils/response-enhancer.ts index c32532e52ac..8a721e1fb7a 100644 --- a/packages/plugin-nft-collections/src/utils/response-enhancer.ts +++ b/packages/plugin-nft-collections/src/utils/response-enhancer.ts @@ -1,5 +1,5 @@ -import { State } from "@elizaos/core"; -import { NFTKnowledge } from "../types"; +import type { State } from "@elizaos/core"; +import type { NFTKnowledge } from "../types"; export function enhanceResponse(response: string, state: State): string { const nftKnowledge = state.nftKnowledge as NFTKnowledge; diff --git a/packages/plugin-nft-generation/src/actions/mintNFTAction.ts b/packages/plugin-nft-generation/src/actions/mintNFTAction.ts index ab268b5fd33..cd09706d316 100644 --- a/packages/plugin-nft-generation/src/actions/mintNFTAction.ts +++ b/packages/plugin-nft-generation/src/actions/mintNFTAction.ts @@ -1,13 +1,13 @@ import { - Action, + type Action, composeContext, elizaLogger, generateObject, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { createNFT } from "../handlers/createNFT.ts"; import { verifyNFT } from "../handlers/verifyNFT.ts"; @@ -15,7 +15,7 @@ import { sleep } from "../index.ts"; import WalletSolana from "../provider/wallet/walletSolana.ts"; import { PublicKey } from "@solana/web3.js"; import { mintNFTTemplate } from "../templates.ts"; -import { MintNFTContent, MintNFTSchema } from "../types.ts"; +import { type MintNFTContent, MintNFTSchema } from "../types.ts"; import * as viemChains from "viem/chains"; import { createPublicClient, createWalletClient, http } from "viem"; import { privateKeyToAccount } from "viem/accounts"; diff --git a/packages/plugin-nft-generation/src/actions/nftCollectionGeneration.ts b/packages/plugin-nft-generation/src/actions/nftCollectionGeneration.ts index daaf29f5e33..793ef1892d6 100644 --- a/packages/plugin-nft-generation/src/actions/nftCollectionGeneration.ts +++ b/packages/plugin-nft-generation/src/actions/nftCollectionGeneration.ts @@ -1,13 +1,13 @@ import { - Action, + type Action, composeContext, elizaLogger, generateObject, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { createCollectionMetadata } from "../handlers/createSolanaCollection.ts"; import { CreateCollectionSchema } from "../types.ts"; diff --git a/packages/plugin-nft-generation/src/api.ts b/packages/plugin-nft-generation/src/api.ts index 002ec506910..f67f78ee787 100644 --- a/packages/plugin-nft-generation/src/api.ts +++ b/packages/plugin-nft-generation/src/api.ts @@ -1,6 +1,6 @@ import express from "express"; -import { AgentRuntime } from "@elizaos/core"; +import type { AgentRuntime } from "@elizaos/core"; import { createSolanaCollection } from "./handlers/createSolanaCollection.ts"; import { createNFT, createNFTMetadata } from "./handlers/createNFT.ts"; import { verifyNFT } from "./handlers/verifyNFT.ts"; diff --git a/packages/plugin-nft-generation/src/handlers/createNFT.ts b/packages/plugin-nft-generation/src/handlers/createNFT.ts index c839ecbf978..e1853bdde65 100644 --- a/packages/plugin-nft-generation/src/handlers/createNFT.ts +++ b/packages/plugin-nft-generation/src/handlers/createNFT.ts @@ -1,12 +1,12 @@ -import { AwsS3Service } from "@elizaos/plugin-node"; +import type { AwsS3Service } from "@elizaos/plugin-node"; import { composeContext, elizaLogger, generateImage, generateText, getEmbeddingZeroVector, - IAgentRuntime, - Memory, + type IAgentRuntime, + type Memory, ModelClass, ServiceType, stringToUuid, diff --git a/packages/plugin-nft-generation/src/handlers/createSolanaCollection.ts b/packages/plugin-nft-generation/src/handlers/createSolanaCollection.ts index 17ddd376ede..37197d6e4ba 100644 --- a/packages/plugin-nft-generation/src/handlers/createSolanaCollection.ts +++ b/packages/plugin-nft-generation/src/handlers/createSolanaCollection.ts @@ -1,11 +1,11 @@ -import { AwsS3Service } from "@elizaos/plugin-node"; +import type { AwsS3Service } from "@elizaos/plugin-node"; import { composeContext, elizaLogger, generateImage, getEmbeddingZeroVector, - IAgentRuntime, - Memory, + type IAgentRuntime, + type Memory, ServiceType, stringToUuid, } from "@elizaos/core"; diff --git a/packages/plugin-nft-generation/src/handlers/verifyNFT.ts b/packages/plugin-nft-generation/src/handlers/verifyNFT.ts index 8b7fae6946e..960bd249715 100644 --- a/packages/plugin-nft-generation/src/handlers/verifyNFT.ts +++ b/packages/plugin-nft-generation/src/handlers/verifyNFT.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { PublicKey } from "@solana/web3.js"; import WalletSolana from "../provider/wallet/walletSolana.ts"; diff --git a/packages/plugin-nft-generation/src/index.ts b/packages/plugin-nft-generation/src/index.ts index 55f3fe0e3e2..d89b3d2acc0 100644 --- a/packages/plugin-nft-generation/src/index.ts +++ b/packages/plugin-nft-generation/src/index.ts @@ -1,11 +1,11 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import nftCollectionGeneration from "./actions/nftCollectionGeneration.ts"; import mintNFTAction from "./actions/mintNFTAction.ts"; export * from "./provider/wallet/walletSolana.ts"; export * from "./api.ts"; -export async function sleep(ms: number = 3000) { +export async function sleep(ms = 3000) { return new Promise((resolve) => { setTimeout(resolve, ms); }); diff --git a/packages/plugin-nft-generation/src/provider/wallet/walletSolana.ts b/packages/plugin-nft-generation/src/provider/wallet/walletSolana.ts index 74a605c9c2b..29cf57a4833 100644 --- a/packages/plugin-nft-generation/src/provider/wallet/walletSolana.ts +++ b/packages/plugin-nft-generation/src/provider/wallet/walletSolana.ts @@ -1,10 +1,10 @@ import NodeCache from "node-cache"; import { - Cluster, + type Cluster, clusterApiUrl, Connection, LAMPORTS_PER_SOL, - PublicKey, + type PublicKey, } from "@solana/web3.js"; import { createNft, @@ -22,7 +22,7 @@ import { publicKey, // sol, TransactionBuilder, - Umi, + type Umi, } from "@metaplex-foundation/umi"; import { getExplorerLink } from "@solana-developers/helpers"; // import { transferSol } from "@metaplex-foundation/mpl-toolbox"; diff --git a/packages/plugin-nft-generation/src/types.ts b/packages/plugin-nft-generation/src/types.ts index 99b74b1b0fd..1de838d2886 100644 --- a/packages/plugin-nft-generation/src/types.ts +++ b/packages/plugin-nft-generation/src/types.ts @@ -1,5 +1,5 @@ import { z } from "zod"; -import { Content } from "@elizaos/core"; +import type { Content } from "@elizaos/core"; import * as viemChains from "viem/chains"; const _SupportedChainList = Object.keys(viemChains); diff --git a/packages/plugin-node/src/actions/describe-image.ts b/packages/plugin-node/src/actions/describe-image.ts index 6dad46240ad..74dbf26fd60 100644 --- a/packages/plugin-node/src/actions/describe-image.ts +++ b/packages/plugin-node/src/actions/describe-image.ts @@ -1,16 +1,16 @@ import { - Action, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, composeContext, generateObject, - ActionExample, + type ActionExample, ModelClass, elizaLogger, ServiceType, - IImageDescriptionService, + type IImageDescriptionService, } from "@elizaos/core"; import { getFileLocationTemplate } from "../templates"; import { FileLocationResultSchema, isFileLocationResult } from "../types"; diff --git a/packages/plugin-node/src/environment.ts b/packages/plugin-node/src/environment.ts index 87a55c5da0c..f4fed912987 100644 --- a/packages/plugin-node/src/environment.ts +++ b/packages/plugin-node/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const nodeEnvSchema = z.object({ diff --git a/packages/plugin-node/src/index.ts b/packages/plugin-node/src/index.ts index ec67170b721..cea1d6c0f30 100644 --- a/packages/plugin-node/src/index.ts +++ b/packages/plugin-node/src/index.ts @@ -1,6 +1,6 @@ export * from "./services/index.ts"; -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { describeImage } from "./actions/describe-image.ts"; import { diff --git a/packages/plugin-node/src/services/audioUtils.ts b/packages/plugin-node/src/services/audioUtils.ts index 0916c48cd3c..303e196d743 100644 --- a/packages/plugin-node/src/services/audioUtils.ts +++ b/packages/plugin-node/src/services/audioUtils.ts @@ -1,8 +1,8 @@ export function getWavHeader( audioLength: number, sampleRate: number, - channelCount: number = 1, - bitsPerSample: number = 16 + channelCount = 1, + bitsPerSample = 16 ): Buffer { const wavHeader = Buffer.alloc(44); wavHeader.write("RIFF", 0); diff --git a/packages/plugin-node/src/services/awsS3.ts b/packages/plugin-node/src/services/awsS3.ts index 988d2f6d12f..6d2441de05b 100644 --- a/packages/plugin-node/src/services/awsS3.ts +++ b/packages/plugin-node/src/services/awsS3.ts @@ -1,6 +1,6 @@ import { - IAgentRuntime, - IAwsS3Service, + type IAgentRuntime, + type IAwsS3Service, Service, ServiceType, elizaLogger, @@ -28,8 +28,8 @@ export class AwsS3Service extends Service implements IAwsS3Service { static serviceType: ServiceType = ServiceType.AWS_S3; private s3Client: S3Client | null = null; - private bucket: string = ""; - private fileUploadPath: string = ""; + private bucket = ""; + private fileUploadPath = ""; private runtime: IAgentRuntime | null = null; async initialize(runtime: IAgentRuntime): Promise { @@ -81,9 +81,9 @@ export class AwsS3Service extends Service implements IAwsS3Service { async uploadFile( filePath: string, - subDirectory: string = "", - useSignedUrl: boolean = false, - expiresIn: number = 900 + subDirectory = "", + useSignedUrl = false, + expiresIn = 900 ): Promise { try { if (!(await this.initializeS3Client())) { @@ -159,7 +159,7 @@ export class AwsS3Service extends Service implements IAwsS3Service { */ async generateSignedUrl( fileName: string, - expiresIn: number = 900 + expiresIn = 900 ): Promise { if (!(await this.initializeS3Client())) { throw new Error("AWS S3 credentials not configured"); @@ -197,8 +197,8 @@ export class AwsS3Service extends Service implements IAwsS3Service { jsonData: any, fileName?: string, subDirectory?: string, - useSignedUrl: boolean = false, - expiresIn: number = 900 + useSignedUrl = false, + expiresIn = 900 ): Promise { try { if (!(await this.initializeS3Client())) { diff --git a/packages/plugin-node/src/services/browser.ts b/packages/plugin-node/src/services/browser.ts index 4a482f295bd..dac8d12a320 100644 --- a/packages/plugin-node/src/services/browser.ts +++ b/packages/plugin-node/src/services/browser.ts @@ -1,12 +1,12 @@ -import { generateText, IBrowserService, trimTokens } from "@elizaos/core"; +import { generateText, type IBrowserService, trimTokens } from "@elizaos/core"; import { parseJSONObjectFromText } from "@elizaos/core"; import { Service } from "@elizaos/core"; import { settings } from "@elizaos/core"; -import { IAgentRuntime, ModelClass, ServiceType } from "@elizaos/core"; +import { type IAgentRuntime, ModelClass, ServiceType } from "@elizaos/core"; import { stringToUuid } from "@elizaos/core"; import { PlaywrightBlocker } from "@cliqz/adblocker-playwright"; import CaptchaSolver from "capsolver-npm"; -import { Browser, BrowserContext, chromium, Page } from "playwright"; +import { type Browser, type BrowserContext, chromium, type Page } from "playwright"; import { elizaLogger } from "@elizaos/core"; async function generateSummary( diff --git a/packages/plugin-node/src/services/image.ts b/packages/plugin-node/src/services/image.ts index 29ce240c583..4d9ba53c2e6 100644 --- a/packages/plugin-node/src/services/image.ts +++ b/packages/plugin-node/src/services/image.ts @@ -1,8 +1,8 @@ import { elizaLogger, getEndpoint, - IAgentRuntime, - IImageDescriptionService, + type IAgentRuntime, + type IImageDescriptionService, ModelProviderName, models, Service, @@ -13,9 +13,9 @@ import { AutoTokenizer, env, Florence2ForConditionalGeneration, - Florence2Processor, - PreTrainedModel, - PreTrainedTokenizer, + type Florence2Processor, + type PreTrainedModel, + type PreTrainedTokenizer, RawImage, type Tensor, } from "@huggingface/transformers"; @@ -69,7 +69,7 @@ class LocalImageProvider implements ImageProvider { private model: PreTrainedModel | null = null; private processor: Florence2Processor | null = null; private tokenizer: PreTrainedTokenizer | null = null; - private modelId: string = "onnx-community/Florence-2-base-ft"; + private modelId = "onnx-community/Florence-2-base-ft"; async initialize(): Promise { env.allowLocalModels = false; @@ -284,7 +284,7 @@ export class ImageDescriptionService { static serviceType: ServiceType = ServiceType.IMAGE_DESCRIPTION; - private initialized: boolean = false; + private initialized = false; private runtime: IAgentRuntime | null = null; private provider: ImageProvider | null = null; diff --git a/packages/plugin-node/src/services/llama.ts b/packages/plugin-node/src/services/llama.ts index 3bfbaafd91a..26c01a18885 100644 --- a/packages/plugin-node/src/services/llama.ts +++ b/packages/plugin-node/src/services/llama.ts @@ -1,6 +1,6 @@ import { elizaLogger, - IAgentRuntime, + type IAgentRuntime, ServiceType, ModelProviderName, } from "@elizaos/core"; @@ -8,17 +8,17 @@ import { Service } from "@elizaos/core"; import fs from "fs"; import https from "https"; import { - GbnfJsonSchema, + type GbnfJsonSchema, getLlama, - Llama, + type Llama, LlamaChatSession, - LlamaChatSessionRepeatPenalty, - LlamaContext, - LlamaContextSequence, - LlamaContextSequenceRepeatPenalty, + type LlamaChatSessionRepeatPenalty, + type LlamaContext, + type LlamaContextSequence, + type LlamaContextSequenceRepeatPenalty, LlamaJsonSchemaGrammar, - LlamaModel, - Token, + type LlamaModel, + type Token, } from "node-llama-cpp"; import path from "path"; import si from "systeminformation"; @@ -174,8 +174,8 @@ export class LlamaService extends Service { private ollamaModel: string | undefined; private messageQueue: QueuedMessage[] = []; - private isProcessing: boolean = false; - private modelInitialized: boolean = false; + private isProcessing = false; + private modelInitialized = false; private runtime: IAgentRuntime | undefined; static serviceType: ServiceType = ServiceType.TEXT_GENERATION; @@ -309,7 +309,7 @@ export class LlamaService extends Service { return; } - totalSize = parseInt( + totalSize = Number.parseInt( response.headers["content-length"] || "0", 10 ); @@ -556,8 +556,7 @@ export class LlamaService extends Service { }); const wordsToPunishTokens = wordsToPunish - .map((word) => this.model!.tokenize(word)) - .flat(); + .flatMap((word) => this.model!.tokenize(word)); const repeatPenalty: LlamaChatSessionRepeatPenalty = { punishTokensFilter: () => wordsToPunishTokens, @@ -738,8 +737,7 @@ export class LlamaService extends Service { // tokenize the words to punish const wordsToPunishTokens = wordsToPunish - .map((word) => this.model!.tokenize(word)) - .flat(); + .flatMap((word) => this.model!.tokenize(word)); const repeatPenalty: LlamaContextSequenceRepeatPenalty = { punishTokens: () => wordsToPunishTokens, diff --git a/packages/plugin-node/src/services/pdf.ts b/packages/plugin-node/src/services/pdf.ts index 206b7f93390..49924842722 100644 --- a/packages/plugin-node/src/services/pdf.ts +++ b/packages/plugin-node/src/services/pdf.ts @@ -1,11 +1,11 @@ import { - IAgentRuntime, - IPdfService, + type IAgentRuntime, + type IPdfService, Service, ServiceType, } from "@elizaos/core"; -import { getDocument, PDFDocumentProxy } from "pdfjs-dist"; -import { TextItem, TextMarkedContent } from "pdfjs-dist/types/src/display/api"; +import { getDocument, type PDFDocumentProxy } from "pdfjs-dist"; +import type { TextItem, TextMarkedContent } from "pdfjs-dist/types/src/display/api"; export class PdfService extends Service implements IPdfService { static serviceType: ServiceType = ServiceType.PDF; diff --git a/packages/plugin-node/src/services/speech.ts b/packages/plugin-node/src/services/speech.ts index dcf568967ed..67212c7730a 100644 --- a/packages/plugin-node/src/services/speech.ts +++ b/packages/plugin-node/src/services/speech.ts @@ -1,7 +1,7 @@ import { PassThrough } from "stream"; import { Readable } from "node:stream"; import { ReadableStream } from "node:stream/web"; -import { IAgentRuntime, ISpeechService, ServiceType } from "@elizaos/core"; +import { type IAgentRuntime, type ISpeechService, ServiceType } from "@elizaos/core"; import { getWavHeader } from "./audioUtils.ts"; import { Service } from "@elizaos/core"; import { validateNodeConfig } from "../environment.ts"; @@ -12,8 +12,8 @@ function prependWavHeader( readable: Readable, audioLength: number, sampleRate: number, - channelCount: number = 1, - bitsPerSample: number = 16 + channelCount = 1, + bitsPerSample = 16 ): Readable { const wavHeader = getWavHeader( audioLength, @@ -23,14 +23,14 @@ function prependWavHeader( ); let pushedHeader = false; const passThrough = new PassThrough(); - readable.on("data", function (data) { + readable.on("data", (data) => { if (!pushedHeader) { passThrough.push(wavHeader); pushedHeader = true; } passThrough.push(data); }); - readable.on("end", function () { + readable.on("end", () => { passThrough.end(); }); return passThrough; @@ -149,7 +149,7 @@ async function textToSpeech(runtime: IAgentRuntime, text: string) { .getSetting("ELEVENLABS_OUTPUT_FORMAT") .startsWith("pcm_") ) { - const sampleRate = parseInt( + const sampleRate = Number.parseInt( runtime.getSetting("ELEVENLABS_OUTPUT_FORMAT").substring(4) ); const withHeader = prependWavHeader( diff --git a/packages/plugin-node/src/services/transcription.ts b/packages/plugin-node/src/services/transcription.ts index 5627f86f064..68977c06797 100644 --- a/packages/plugin-node/src/services/transcription.ts +++ b/packages/plugin-node/src/services/transcription.ts @@ -1,7 +1,7 @@ import { elizaLogger, - IAgentRuntime, - ITranscriptionService, + type IAgentRuntime, + type ITranscriptionService, settings, TranscriptionProvider, } from "@elizaos/core"; @@ -15,7 +15,7 @@ import os from "os"; import path from "path"; import { fileURLToPath } from "url"; import { promisify } from "util"; -import { createClient, DeepgramClient } from "@deepgram/sdk"; +import { createClient, type DeepgramClient } from "@deepgram/sdk"; // const __dirname = path.dirname(new URL(import.meta.url).pathname); #compatibility issues with windows const __filename = fileURLToPath(import.meta.url); @@ -32,7 +32,7 @@ export class TranscriptionService private CONTENT_CACHE_DIR: string; private DEBUG_AUDIO_DIR: string; private TARGET_SAMPLE_RATE = 16000; // Common sample rate for speech recognition - private isCudaAvailable: boolean = false; + private isCudaAvailable = false; /** * CHANGED: We now use TranscriptionProvider instead of separate flags/strings. @@ -47,7 +47,7 @@ export class TranscriptionService * We keep the queue and processing logic as is. */ private queue: { audioBuffer: ArrayBuffer; resolve: Function }[] = []; - private processing: boolean = false; + private processing = false; /** * CHANGED: initialize() now checks: diff --git a/packages/plugin-node/src/services/video.ts b/packages/plugin-node/src/services/video.ts index 8efe36a62b1..3437603eadc 100644 --- a/packages/plugin-node/src/services/video.ts +++ b/packages/plugin-node/src/services/video.ts @@ -1,8 +1,8 @@ import { - IAgentRuntime, - ITranscriptionService, - IVideoService, - Media, + type IAgentRuntime, + type ITranscriptionService, + type IVideoService, + type Media, Service, ServiceType, stringToUuid, @@ -20,7 +20,7 @@ export class VideoService extends Service implements IVideoService { private dataDir = "./content_cache"; private queue: string[] = []; - private processing: boolean = false; + private processing = false; constructor() { super(); diff --git a/packages/plugin-obsidian/src/actions/activeNote.ts b/packages/plugin-obsidian/src/actions/activeNote.ts index 40902fb9974..7b15f49bef9 100644 --- a/packages/plugin-obsidian/src/actions/activeNote.ts +++ b/packages/plugin-obsidian/src/actions/activeNote.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, composeContext, ModelClass, @@ -11,7 +11,7 @@ import { trimTokens, generateText, } from "@elizaos/core"; -import { NoteContent } from "../types"; +import type { NoteContent } from "../types"; import { baseSummaryTemplate } from "../templates/summary"; import { getObsidian } from "../helper"; diff --git a/packages/plugin-obsidian/src/actions/createKnowledge.ts b/packages/plugin-obsidian/src/actions/createKnowledge.ts index 935f4cc6c04..db3756850ac 100644 --- a/packages/plugin-obsidian/src/actions/createKnowledge.ts +++ b/packages/plugin-obsidian/src/actions/createKnowledge.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; import { getObsidian } from "../helper"; diff --git a/packages/plugin-obsidian/src/actions/file.ts b/packages/plugin-obsidian/src/actions/file.ts index 7e11b95ac31..6f52f8e0d95 100644 --- a/packages/plugin-obsidian/src/actions/file.ts +++ b/packages/plugin-obsidian/src/actions/file.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, composeContext, generateObject, diff --git a/packages/plugin-obsidian/src/actions/listNotes.ts b/packages/plugin-obsidian/src/actions/listNotes.ts index d8c6e2fd4d3..f12724d5d99 100644 --- a/packages/plugin-obsidian/src/actions/listNotes.ts +++ b/packages/plugin-obsidian/src/actions/listNotes.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; import { getObsidian } from "../helper"; diff --git a/packages/plugin-obsidian/src/actions/note.ts b/packages/plugin-obsidian/src/actions/note.ts index 32d1f3bb324..68100407624 100644 --- a/packages/plugin-obsidian/src/actions/note.ts +++ b/packages/plugin-obsidian/src/actions/note.ts @@ -1,15 +1,15 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, composeContext, generateObject, ModelClass } from "@elizaos/core"; -import { NoteContent, noteSchema, isValidNote } from "../types"; +import { type NoteContent, noteSchema, isValidNote } from "../types"; import { getObsidian } from "../helper"; import { noteTemplate } from "../templates/note"; diff --git a/packages/plugin-obsidian/src/actions/noteTraversal.ts b/packages/plugin-obsidian/src/actions/noteTraversal.ts index 7c83d35523b..3e8d369a744 100644 --- a/packages/plugin-obsidian/src/actions/noteTraversal.ts +++ b/packages/plugin-obsidian/src/actions/noteTraversal.ts @@ -1,15 +1,15 @@ import { - Action, - HandlerCallback, - AgentRuntime as IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type AgentRuntime as IAgentRuntime, + type Memory, + type State, elizaLogger, composeContext, generateObject, ModelClass } from "@elizaos/core"; -import { NoteContent, NoteHierarchy, isValidNoteHierarchy, noteHierarchySchema } from "../types"; +import { type NoteContent, type NoteHierarchy, isValidNoteHierarchy, noteHierarchySchema } from "../types"; import { getObsidian, extractLinks, storeHierarchyInMemory, retrieveHierarchyFromMemory } from "../helper"; import { traversalTemplate } from "../templates/traversal"; diff --git a/packages/plugin-obsidian/src/actions/openFile.ts b/packages/plugin-obsidian/src/actions/openFile.ts index 33ddec7254e..7f4994bfb1e 100644 --- a/packages/plugin-obsidian/src/actions/openFile.ts +++ b/packages/plugin-obsidian/src/actions/openFile.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, composeContext, generateObject, diff --git a/packages/plugin-obsidian/src/actions/saveFile.ts b/packages/plugin-obsidian/src/actions/saveFile.ts index 019998a2a08..a898ff86cf1 100644 --- a/packages/plugin-obsidian/src/actions/saveFile.ts +++ b/packages/plugin-obsidian/src/actions/saveFile.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, composeContext, generateObject, diff --git a/packages/plugin-obsidian/src/actions/search.ts b/packages/plugin-obsidian/src/actions/search.ts index 4e730f78ffb..02ca6e7877a 100644 --- a/packages/plugin-obsidian/src/actions/search.ts +++ b/packages/plugin-obsidian/src/actions/search.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; import { getObsidian, markdownToPlaintext, processUserInput } from "../helper"; diff --git a/packages/plugin-obsidian/src/actions/updateFile.ts b/packages/plugin-obsidian/src/actions/updateFile.ts index 3c76ecf50b8..d6a93b3db4d 100644 --- a/packages/plugin-obsidian/src/actions/updateFile.ts +++ b/packages/plugin-obsidian/src/actions/updateFile.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, composeContext, generateObject, diff --git a/packages/plugin-obsidian/src/actions/vault.ts b/packages/plugin-obsidian/src/actions/vault.ts index 715d7ba1c03..80da8c3f855 100644 --- a/packages/plugin-obsidian/src/actions/vault.ts +++ b/packages/plugin-obsidian/src/actions/vault.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; import { getObsidian } from "../helper"; diff --git a/packages/plugin-obsidian/src/actions/vaultDirectory.ts b/packages/plugin-obsidian/src/actions/vaultDirectory.ts index 735e76f9c30..d9ab16decb3 100644 --- a/packages/plugin-obsidian/src/actions/vaultDirectory.ts +++ b/packages/plugin-obsidian/src/actions/vaultDirectory.ts @@ -1,9 +1,9 @@ import { - Action, - HandlerCallback, - AgentRuntime as IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type AgentRuntime as IAgentRuntime, + type Memory, + type State, elizaLogger, } from "@elizaos/core"; import { getObsidian } from "../helper"; diff --git a/packages/plugin-obsidian/src/enviroment.ts b/packages/plugin-obsidian/src/enviroment.ts index ebcacb36c94..0ab9c453c20 100644 --- a/packages/plugin-obsidian/src/enviroment.ts +++ b/packages/plugin-obsidian/src/enviroment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const obsidianEnvSchema = z diff --git a/packages/plugin-obsidian/src/helper.ts b/packages/plugin-obsidian/src/helper.ts index eb55df79f11..bf24f7011ba 100644 --- a/packages/plugin-obsidian/src/helper.ts +++ b/packages/plugin-obsidian/src/helper.ts @@ -1,10 +1,10 @@ -import { IAgentRuntime, AgentRuntime, ModelClass, Memory, MemoryManager } from "@elizaos/core"; +import { type IAgentRuntime, type AgentRuntime, ModelClass, type Memory, MemoryManager } from "@elizaos/core"; import { elizaLogger, composeContext, generateObject, stringToUuid } from "@elizaos/core"; //import fileTypeChecker from "file-type-checker"; import { lookup } from 'mrmime'; import { ObsidianProvider } from "./providers/obsidianClient"; import { validateObsidianConfig } from "./enviroment"; -import { searchQuerySchema, NoteHierarchy, NoteContent } from "./types"; +import { searchQuerySchema, type NoteHierarchy, type NoteContent } from "./types"; let obsidianInstance: ObsidianProvider | undefined; @@ -14,7 +14,7 @@ export async function getObsidian(runtime: IAgentRuntime): Promise { if (!this.instance) { this.instance = new ObsidianProvider(port, token, host_url); @@ -182,7 +182,7 @@ export class ObsidianProvider { async saveNote( path: string, content: string, - createDirectories: boolean = true + createDirectories = true ): Promise { if (!this.connected) { await this.connect(); @@ -355,7 +355,7 @@ export class ObsidianProvider { async saveFile( path: string, content: string, - createDirectories: boolean = true + createDirectories = true ): Promise { if (!this.connected) { await this.connect(); @@ -394,7 +394,7 @@ export class ObsidianProvider { async patchFile( path: string, content: string, - lineNumber: number = 0 + lineNumber = 0 ): Promise { if (!this.connected) { await this.connect(); @@ -600,7 +600,7 @@ export class ObsidianProvider { */ async searchKeywords( query: string, - contextLength: number = 100 + contextLength = 100 ): Promise { if (!this.connected) { await this.connect(); @@ -660,7 +660,7 @@ export class ObsidianProvider { * @param directory - The directory to scan, empty string for root * @returns Array of file paths in format 'directory/file.md' */ - private async scanDirectoryRecursively(directory: string = ''): Promise { + private async scanDirectoryRecursively(directory = ''): Promise { const allFiles: string[] = []; const dirsToProcess: string[] = [directory]; const processedDirs = new Set(); diff --git a/packages/plugin-obsidian/src/tests/obsidianClient.test.ts b/packages/plugin-obsidian/src/tests/obsidianClient.test.ts index d477185a1fd..72bc2586ab5 100644 --- a/packages/plugin-obsidian/src/tests/obsidianClient.test.ts +++ b/packages/plugin-obsidian/src/tests/obsidianClient.test.ts @@ -2,9 +2,9 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { ObsidianProvider } from '../providers/obsidianClient'; import { elizaLogger, - AgentRuntime + type AgentRuntime } from "@elizaos/core"; -import { NoteContent, ResultNoteApi, ServerInfo } from '../types'; +import type { NoteContent, ResultNoteApi, ServerInfo } from '../types'; // Mock fetch globally const fetchMock = vi.fn(); diff --git a/packages/plugin-opacity/src/index.ts b/packages/plugin-opacity/src/index.ts index 09ec0e830d4..777f56b93a1 100644 --- a/packages/plugin-opacity/src/index.ts +++ b/packages/plugin-opacity/src/index.ts @@ -1,7 +1,7 @@ import { - IVerifiableInferenceAdapter, - VerifiableInferenceOptions, - VerifiableInferenceResult, + type IVerifiableInferenceAdapter, + type VerifiableInferenceOptions, + type VerifiableInferenceResult, VerifiableInferenceProvider, ModelProviderName, models, diff --git a/packages/plugin-open-weather/src/actions/getCurrentWeather.ts b/packages/plugin-open-weather/src/actions/getCurrentWeather.ts index 6fdd6e8fc67..f2921a1c315 100644 --- a/packages/plugin-open-weather/src/actions/getCurrentWeather.ts +++ b/packages/plugin-open-weather/src/actions/getCurrentWeather.ts @@ -1,13 +1,13 @@ import { composeContext, elizaLogger } from "@elizaos/core"; import { generateMessageResponse } from "@elizaos/core"; import { - Action, - ActionExample, - HandlerCallback, - IAgentRuntime, - Memory, + type Action, + type ActionExample, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { validateOpenWeatherConfig } from "../environment"; import { getCurrentWeatherTemplate } from "../templates"; diff --git a/packages/plugin-open-weather/src/environment.ts b/packages/plugin-open-weather/src/environment.ts index 06b2ad8aa33..8f16d1cf75c 100644 --- a/packages/plugin-open-weather/src/environment.ts +++ b/packages/plugin-open-weather/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const openWeatherEnvSchema = z.object({ diff --git a/packages/plugin-open-weather/src/examples.ts b/packages/plugin-open-weather/src/examples.ts index 8fa00b4f556..97a414f4448 100644 --- a/packages/plugin-open-weather/src/examples.ts +++ b/packages/plugin-open-weather/src/examples.ts @@ -1,4 +1,4 @@ -import { ActionExample } from "@elizaos/core"; +import type { ActionExample } from "@elizaos/core"; export const getCurrentWeatherExamples: ActionExample[][] = [ [ diff --git a/packages/plugin-open-weather/src/index.ts b/packages/plugin-open-weather/src/index.ts index 8f2555e6200..e33bd402ae6 100644 --- a/packages/plugin-open-weather/src/index.ts +++ b/packages/plugin-open-weather/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { getCurrentWeatherAction } from "./actions/getCurrentWeather"; export * as actions from "./actions"; diff --git a/packages/plugin-open-weather/src/services.ts b/packages/plugin-open-weather/src/services.ts index c846fb1a1f7..11c4f0a76d8 100644 --- a/packages/plugin-open-weather/src/services.ts +++ b/packages/plugin-open-weather/src/services.ts @@ -1,4 +1,4 @@ -import { WeatherResponse } from "./types"; +import type { WeatherResponse } from "./types"; const BASE_URL = "https://api.openweathermap.org/data/2.5"; diff --git a/packages/plugin-primus/src/actions/postTweetAction.ts b/packages/plugin-primus/src/actions/postTweetAction.ts index a186eda4c60..3933cfc7858 100644 --- a/packages/plugin-primus/src/actions/postTweetAction.ts +++ b/packages/plugin-primus/src/actions/postTweetAction.ts @@ -1,9 +1,9 @@ import { - Action, + type Action, elizaLogger, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import { TwitterScraper } from "../util/twitterScraper.ts"; import {tokenPriceProvider} from "../providers/tokenPriceProvider.ts"; diff --git a/packages/plugin-primus/src/adapter/primusAdapter.ts b/packages/plugin-primus/src/adapter/primusAdapter.ts index 6c54ffbc2d9..400b4cfb22f 100644 --- a/packages/plugin-primus/src/adapter/primusAdapter.ts +++ b/packages/plugin-primus/src/adapter/primusAdapter.ts @@ -1,8 +1,8 @@ import { PrimusCoreTLS } from "@primuslabs/zktls-core-sdk"; import { - IVerifiableInferenceAdapter, - VerifiableInferenceOptions, - VerifiableInferenceResult, + type IVerifiableInferenceAdapter, + type VerifiableInferenceOptions, + type VerifiableInferenceResult, VerifiableInferenceProvider, ModelProviderName, models, @@ -63,7 +63,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { }; try { - let body = { + const body = { model: model.name, messages: [{ role: "user", content: context }], temperature: @@ -74,7 +74,7 @@ export class PrimusAdapter implements IVerifiableInferenceAdapter { elizaLogger.log(`model attestation:`, attestation); const responseData = JSON.parse(attestation.data); - let text = JSON.parse(responseData.content); + const text = JSON.parse(responseData.content); return { text, proof: attestation, diff --git a/packages/plugin-primus/src/index.ts b/packages/plugin-primus/src/index.ts index 8b9d13b1c06..a1d94cce80b 100644 --- a/packages/plugin-primus/src/index.ts +++ b/packages/plugin-primus/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { postTweetAction } from "./actions/postTweetAction.ts"; import {PrimusAdapter} from "./adapter/primusAdapter.ts"; diff --git a/packages/plugin-primus/src/providers/tokenPriceProvider.ts b/packages/plugin-primus/src/providers/tokenPriceProvider.ts index 0dedddbc477..382754ddc8c 100644 --- a/packages/plugin-primus/src/providers/tokenPriceProvider.ts +++ b/packages/plugin-primus/src/providers/tokenPriceProvider.ts @@ -1,4 +1,4 @@ -import {elizaLogger, IAgentRuntime, Memory, Provider, State} from "@elizaos/core"; +import {elizaLogger, type IAgentRuntime, type Memory, type Provider, type State} from "@elizaos/core"; import {generateProof, verifyProof} from "../util/primusUtil.ts"; const tokenPriceProvider: Provider = { diff --git a/packages/plugin-primus/src/providers/tweetProvider.ts b/packages/plugin-primus/src/providers/tweetProvider.ts index 299ac89be5f..7539c1b51aa 100644 --- a/packages/plugin-primus/src/providers/tweetProvider.ts +++ b/packages/plugin-primus/src/providers/tweetProvider.ts @@ -1,4 +1,4 @@ -import {elizaLogger, IAgentRuntime, Memory, Provider, State} from "@elizaos/core"; +import {elizaLogger, type IAgentRuntime, type Memory, type Provider, type State} from "@elizaos/core"; import {TwitterScraper} from "../util/twitterScraper.ts"; const tweetProvider: Provider = { diff --git a/packages/plugin-primus/src/util/primusUtil.ts b/packages/plugin-primus/src/util/primusUtil.ts index 30ccfce7a22..14f88bac216 100644 --- a/packages/plugin-primus/src/util/primusUtil.ts +++ b/packages/plugin-primus/src/util/primusUtil.ts @@ -1,4 +1,4 @@ -import { PrimusCoreTLS,Attestation } from "@primuslabs/zktls-core-sdk"; +import { PrimusCoreTLS,type Attestation } from "@primuslabs/zktls-core-sdk"; export const generateProof = async ( endpoint: string, diff --git a/packages/plugin-quai/src/actions/transfer.ts b/packages/plugin-quai/src/actions/transfer.ts index 62d869fd241..0c268058232 100644 --- a/packages/plugin-quai/src/actions/transfer.ts +++ b/packages/plugin-quai/src/actions/transfer.ts @@ -1,10 +1,10 @@ import { - ActionExample, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, composeContext, generateObject, @@ -14,7 +14,7 @@ import { isTransferContent, validateSettings, } from "../utils"; -import { formatUnits, TransactionRequest } from "quais"; +import { formatUnits, type TransactionRequest } from "quais"; const transferTemplate = `Respond with a JSON markdown block containing only the extracted values. Use null for any values that cannot be determined. diff --git a/packages/plugin-quai/src/index.ts b/packages/plugin-quai/src/index.ts index 558924317c9..016696f4e62 100644 --- a/packages/plugin-quai/src/index.ts +++ b/packages/plugin-quai/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import transfer from "./actions/transfer"; export const quaiPlugin: Plugin = { diff --git a/packages/plugin-quai/src/utils/index.ts b/packages/plugin-quai/src/utils/index.ts index d9832e3303c..78f389745ac 100644 --- a/packages/plugin-quai/src/utils/index.ts +++ b/packages/plugin-quai/src/utils/index.ts @@ -1,4 +1,4 @@ -import { Content, IAgentRuntime } from "@elizaos/core"; +import type { Content, IAgentRuntime } from "@elizaos/core"; import { JsonRpcProvider, Wallet } from "quais"; export const validateSettings = (runtime: IAgentRuntime) => { diff --git a/packages/plugin-rabbi-trader/src/actions/analyzeTrade.ts b/packages/plugin-rabbi-trader/src/actions/analyzeTrade.ts index 12fc6fd8365..2f816ed49f6 100644 --- a/packages/plugin-rabbi-trader/src/actions/analyzeTrade.ts +++ b/packages/plugin-rabbi-trader/src/actions/analyzeTrade.ts @@ -1,5 +1,5 @@ import { - Action, + type Action, composeContext, elizaLogger, generateText, diff --git a/packages/plugin-rabbi-trader/src/dexscreener.ts b/packages/plugin-rabbi-trader/src/dexscreener.ts index db8bb8d714d..7d55569a2e2 100644 --- a/packages/plugin-rabbi-trader/src/dexscreener.ts +++ b/packages/plugin-rabbi-trader/src/dexscreener.ts @@ -74,7 +74,7 @@ export function analyzePair(pair: DexScreenerResponse['pairs'][0]) { if (Math.abs(pair.priceChange.h1) > priceChangeThreshold) { return { symbol: pair.baseToken.symbol, - price: parseFloat(pair.priceUsd), + price: Number.parseFloat(pair.priceUsd), priceChange: pair.priceChange.h1, volume24h: pair.volume.h24, buyCount: pair.txns.h1.buys, diff --git a/packages/plugin-rabbi-trader/src/evaluators/trust.ts b/packages/plugin-rabbi-trader/src/evaluators/trust.ts index 553ac9e155a..b80b8213655 100644 --- a/packages/plugin-rabbi-trader/src/evaluators/trust.ts +++ b/packages/plugin-rabbi-trader/src/evaluators/trust.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, Evaluator, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, type Memory, type Evaluator, elizaLogger } from "@elizaos/core"; import { TrustScoreProvider } from "../providers/trustScoreProvider"; export const trustEvaluator: Evaluator = { diff --git a/packages/plugin-rabbi-trader/src/index.ts b/packages/plugin-rabbi-trader/src/index.ts index 8eefeb50757..feab7ddbe19 100644 --- a/packages/plugin-rabbi-trader/src/index.ts +++ b/packages/plugin-rabbi-trader/src/index.ts @@ -33,7 +33,7 @@ import { getWalletBalance, getWalletKeypair, } from "./wallet"; -import { ProcessedTokenData } from "./types"; +import type { ProcessedTokenData } from "./types"; import { analyzeTradeAction } from "./actions/analyzeTrade"; // Update Balance interface to include formatted @@ -482,7 +482,7 @@ async function createRabbiTraderPlugin( } elizaLogger.log("Initializing Solana connection..."); - let walletProvider: ExtendedWalletProvider = { + const walletProvider: ExtendedWalletProvider = { connection, getChain: () => ({ type: "solana" }), getAddress: () => keypair.publicKey.toBase58(), diff --git a/packages/plugin-rabbi-trader/src/providers/token.ts b/packages/plugin-rabbi-trader/src/providers/token.ts index a6631fb7565..1bc38691eb2 100644 --- a/packages/plugin-rabbi-trader/src/providers/token.ts +++ b/packages/plugin-rabbi-trader/src/providers/token.ts @@ -1,6 +1,6 @@ import { elizaLogger } from "@elizaos/core"; import NodeCache from "node-cache"; -import { ProcessedTokenData, TokenSecurityData, TokenTradeData, DexScreenerPair } from "../types/token"; +import type { ProcessedTokenData, TokenSecurityData, TokenTradeData, DexScreenerPair } from "../types/token"; import { toBN } from "../utils/bignumber"; export class TokenProvider { diff --git a/packages/plugin-rabbi-trader/src/providers/trustScoreProvider.ts b/packages/plugin-rabbi-trader/src/providers/trustScoreProvider.ts index 66caa287df4..945b06f1d51 100644 --- a/packages/plugin-rabbi-trader/src/providers/trustScoreProvider.ts +++ b/packages/plugin-rabbi-trader/src/providers/trustScoreProvider.ts @@ -1,6 +1,6 @@ import { elizaLogger } from "@elizaos/core"; import { TokenProvider } from "./token"; -import { ProcessedTokenData } from "../types/token"; +import type { ProcessedTokenData } from "../types/token"; export class TrustScoreProvider { private tokenProviders: Map = new Map(); diff --git a/packages/plugin-rabbi-trader/src/services/twitter.ts b/packages/plugin-rabbi-trader/src/services/twitter.ts index 67d649cca83..224d4b106ff 100644 --- a/packages/plugin-rabbi-trader/src/services/twitter.ts +++ b/packages/plugin-rabbi-trader/src/services/twitter.ts @@ -1,7 +1,7 @@ import { z } from "zod"; import { elizaLogger } from "@elizaos/core"; import { MAX_TWEETS_PER_HOUR } from "../constants"; -import { MarketData } from "../types"; +import type { MarketData } from "../types"; export const TwitterConfigSchema = z.object({ enabled: z.boolean(), diff --git a/packages/plugin-rabbi-trader/src/swap.ts b/packages/plugin-rabbi-trader/src/swap.ts index 8b309b6007c..d199918c505 100644 --- a/packages/plugin-rabbi-trader/src/swap.ts +++ b/packages/plugin-rabbi-trader/src/swap.ts @@ -1,8 +1,8 @@ import { - Connection, + type Connection, PublicKey, Transaction, - TransactionInstruction, + type TransactionInstruction, SystemProgram, LAMPORTS_PER_SOL, } from "@solana/web3.js"; diff --git a/packages/plugin-rabbi-trader/src/utils.ts b/packages/plugin-rabbi-trader/src/utils.ts index 50d56c58094..064047af812 100644 --- a/packages/plugin-rabbi-trader/src/utils.ts +++ b/packages/plugin-rabbi-trader/src/utils.ts @@ -1,4 +1,4 @@ -import { elizaLogger, IAgentRuntime, settings, State } from "@elizaos/core"; +import { elizaLogger, type IAgentRuntime, settings, type State } from "@elizaos/core"; import { PublicKey } from "@solana/web3.js"; import { PROVIDER_CONFIG } from "./config"; import { ANALYSIS_HISTORY_EXPIRY } from "./constants"; diff --git a/packages/plugin-rabbi-trader/src/wallet.ts b/packages/plugin-rabbi-trader/src/wallet.ts index 47ec0b79ec0..c09161ab5d5 100644 --- a/packages/plugin-rabbi-trader/src/wallet.ts +++ b/packages/plugin-rabbi-trader/src/wallet.ts @@ -1,4 +1,4 @@ -import { elizaLogger, IAgentRuntime } from "@elizaos/core"; +import { elizaLogger, type IAgentRuntime } from "@elizaos/core"; import { Connection, Keypair, VersionedTransaction } from "@solana/web3.js"; import { decodeBase58 } from "./utils"; import { SAFETY_LIMITS } from "./constants"; diff --git a/packages/plugin-sgx/src/plugins/sgxPlugin.ts b/packages/plugin-sgx/src/plugins/sgxPlugin.ts index 4e54dcee03d..61cc448d6e1 100644 --- a/packages/plugin-sgx/src/plugins/sgxPlugin.ts +++ b/packages/plugin-sgx/src/plugins/sgxPlugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { sgxAttestationProvider } from "../providers/sgxAttestationProvider"; export const sgxPlugin: Plugin = { diff --git a/packages/plugin-sgx/src/providers/sgxAttestationProvider.ts b/packages/plugin-sgx/src/providers/sgxAttestationProvider.ts index 7ed7891a8ee..1e8852d62c6 100644 --- a/packages/plugin-sgx/src/providers/sgxAttestationProvider.ts +++ b/packages/plugin-sgx/src/providers/sgxAttestationProvider.ts @@ -1,5 +1,5 @@ -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; -import { SgxAttestation } from "../types/attestation"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { SgxAttestation } from "../types/attestation"; import { promises as fs } from 'fs'; import { createHash } from 'crypto'; diff --git a/packages/plugin-solana-agentkit/src/actions/createToken.ts b/packages/plugin-solana-agentkit/src/actions/createToken.ts index 50c0cbdf94f..5743651e425 100644 --- a/packages/plugin-solana-agentkit/src/actions/createToken.ts +++ b/packages/plugin-solana-agentkit/src/actions/createToken.ts @@ -1,14 +1,14 @@ import { - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; diff --git a/packages/plugin-solana-agentkit/src/index.ts b/packages/plugin-solana-agentkit/src/index.ts index 2d1e3a43fae..0aa9dd0ba00 100644 --- a/packages/plugin-solana-agentkit/src/index.ts +++ b/packages/plugin-solana-agentkit/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import createToken from "./actions/createToken.ts"; export const solanaAgentkitPlugin: Plugin = { diff --git a/packages/plugin-solana/src/actions/fomo.ts b/packages/plugin-solana/src/actions/fomo.ts index 42c0ab6b021..98adf054ded 100644 --- a/packages/plugin-solana/src/actions/fomo.ts +++ b/packages/plugin-solana/src/actions/fomo.ts @@ -2,21 +2,21 @@ import { generateImage, elizaLogger } from "@elizaos/core"; import { Connection, Keypair, - PublicKey, + type PublicKey, VersionedTransaction, } from "@solana/web3.js"; -import { Fomo, PurchaseCurrency } from "fomo-sdk-solana"; +import { Fomo, type PurchaseCurrency } from "fomo-sdk-solana"; import { getAssociatedTokenAddressSync } from "@solana/spl-token"; import bs58 from "bs58"; import { settings, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, generateObject, composeContext, type Action, diff --git a/packages/plugin-solana/src/actions/pumpfun.ts b/packages/plugin-solana/src/actions/pumpfun.ts index 4f7c68ec48f..7423f10460b 100644 --- a/packages/plugin-solana/src/actions/pumpfun.ts +++ b/packages/plugin-solana/src/actions/pumpfun.ts @@ -1,19 +1,19 @@ import { AnchorProvider } from "@coral-xyz/anchor"; import { Wallet } from "@coral-xyz/anchor"; import { generateImage } from "@elizaos/core"; -import { Connection, Keypair, PublicKey } from "@solana/web3.js"; -import { CreateTokenMetadata, PriorityFee, PumpFunSDK } from "pumpdotfun-sdk"; +import { Connection, Keypair, type PublicKey } from "@solana/web3.js"; +import { type CreateTokenMetadata, type PriorityFee, PumpFunSDK } from "pumpdotfun-sdk"; import { getAssociatedTokenAddressSync } from "@solana/spl-token"; import { settings, - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, generateObjectDeprecated, composeContext, type Action, diff --git a/packages/plugin-solana/src/actions/swap.ts b/packages/plugin-solana/src/actions/swap.ts index 87006cb3773..cb03d2a2c19 100644 --- a/packages/plugin-solana/src/actions/swap.ts +++ b/packages/plugin-solana/src/actions/swap.ts @@ -1,17 +1,17 @@ import { - ActionExample, + type ActionExample, composeContext, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, settings, - State, + type State, type Action, elizaLogger, } from "@elizaos/core"; -import { Connection, PublicKey, VersionedTransaction } from "@solana/web3.js"; +import { Connection, type PublicKey, VersionedTransaction } from "@solana/web3.js"; import BigNumber from "bignumber.js"; import { getWalletKey } from "../keypairUtils.ts"; import { walletProvider, WalletProvider } from "../providers/wallet.ts"; diff --git a/packages/plugin-solana/src/actions/swapDao.ts b/packages/plugin-solana/src/actions/swapDao.ts index 0ebaa8569ec..785433462a9 100644 --- a/packages/plugin-solana/src/actions/swapDao.ts +++ b/packages/plugin-solana/src/actions/swapDao.ts @@ -1,11 +1,11 @@ import { - ActionExample, - IAgentRuntime, - Memory, + type ActionExample, + type IAgentRuntime, + type Memory, type Action, elizaLogger, } from "@elizaos/core"; -import { Connection, Keypair, PublicKey, Transaction } from "@solana/web3.js"; +import { Connection, type Keypair, PublicKey, Transaction } from "@solana/web3.js"; import { getQuote } from "./swapUtils.ts"; import { getWalletKey } from "../keypairUtils.ts"; diff --git a/packages/plugin-solana/src/actions/swapUtils.ts b/packages/plugin-solana/src/actions/swapUtils.ts index 8324ac2bbf4..8f30703e69f 100644 --- a/packages/plugin-solana/src/actions/swapUtils.ts +++ b/packages/plugin-solana/src/actions/swapUtils.ts @@ -1,12 +1,12 @@ import { getAssociatedTokenAddress } from "@solana/spl-token"; import { - BlockhashWithExpiryBlockHeight, + type BlockhashWithExpiryBlockHeight, Connection, - Keypair, + type Keypair, PublicKey, - RpcResponseAndContext, - SimulatedTransactionResponse, - TokenAmount, + type RpcResponseAndContext, + type SimulatedTransactionResponse, + type TokenAmount, VersionedTransaction, } from "@solana/web3.js"; import { settings, elizaLogger } from "@elizaos/core"; diff --git a/packages/plugin-solana/src/actions/takeOrder.ts b/packages/plugin-solana/src/actions/takeOrder.ts index 83e21c7daf3..0ba211d3ae2 100644 --- a/packages/plugin-solana/src/actions/takeOrder.ts +++ b/packages/plugin-solana/src/actions/takeOrder.ts @@ -1,8 +1,8 @@ import { - Action, - IAgentRuntime, - Memory, - Content, + type Action, + type IAgentRuntime, + type Memory, + type Content, ModelClass, composeContext, generateText, diff --git a/packages/plugin-solana/src/actions/transfer.ts b/packages/plugin-solana/src/actions/transfer.ts index 4c0b40e339d..a2d728ecb63 100644 --- a/packages/plugin-solana/src/actions/transfer.ts +++ b/packages/plugin-solana/src/actions/transfer.ts @@ -12,13 +12,13 @@ import { } from "@solana/web3.js"; import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import { composeContext } from "@elizaos/core"; diff --git a/packages/plugin-solana/src/environment.ts b/packages/plugin-solana/src/environment.ts index de7aa6e6e00..5a536ced6fb 100644 --- a/packages/plugin-solana/src/environment.ts +++ b/packages/plugin-solana/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const solanaEnvSchema = z diff --git a/packages/plugin-solana/src/evaluators/trust.ts b/packages/plugin-solana/src/evaluators/trust.ts index 0feadb653ac..29d219ea403 100644 --- a/packages/plugin-solana/src/evaluators/trust.ts +++ b/packages/plugin-solana/src/evaluators/trust.ts @@ -1,14 +1,14 @@ import { - ActionExample, + type ActionExample, booleanFooter, composeContext, - Content, + type Content, elizaLogger, - Evaluator, + type Evaluator, generateObjectArray, generateTrueOrFalse, - IAgentRuntime, - Memory, + type IAgentRuntime, + type Memory, MemoryManager, ModelClass, } from "@elizaos/core"; diff --git a/packages/plugin-solana/src/index.ts b/packages/plugin-solana/src/index.ts index ecfe801ef32..573b4f27124 100644 --- a/packages/plugin-solana/src/index.ts +++ b/packages/plugin-solana/src/index.ts @@ -3,7 +3,7 @@ export * from "./providers/wallet.ts"; export * from "./providers/trustScoreProvider.ts"; export * from "./evaluators/trust.ts"; -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { executeSwap } from "./actions/swap.ts"; import take_order from "./actions/takeOrder"; import pumpfun from "./actions/pumpfun.ts"; diff --git a/packages/plugin-solana/src/keypairUtils.ts b/packages/plugin-solana/src/keypairUtils.ts index f8405424bc1..80e22684845 100644 --- a/packages/plugin-solana/src/keypairUtils.ts +++ b/packages/plugin-solana/src/keypairUtils.ts @@ -1,7 +1,7 @@ import { Keypair, PublicKey } from "@solana/web3.js"; import { DeriveKeyProvider, TEEMode } from "@elizaos/plugin-tee"; import bs58 from "bs58"; -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; export interface KeypairResult { keypair?: Keypair; @@ -16,7 +16,7 @@ export interface KeypairResult { */ export async function getWalletKey( runtime: IAgentRuntime, - requirePrivateKey: boolean = true + requirePrivateKey = true ): Promise { const teeMode = runtime.getSetting("TEE_MODE") || TEEMode.OFF; diff --git a/packages/plugin-solana/src/providers/orderBook.ts b/packages/plugin-solana/src/providers/orderBook.ts index ac4577e012f..4af7832a860 100644 --- a/packages/plugin-solana/src/providers/orderBook.ts +++ b/packages/plugin-solana/src/providers/orderBook.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; interface Order { userId: string; ticker: string; diff --git a/packages/plugin-solana/src/providers/simulationSellingService.ts b/packages/plugin-solana/src/providers/simulationSellingService.ts index 8c023569ed6..5b4e3eb4db5 100644 --- a/packages/plugin-solana/src/providers/simulationSellingService.ts +++ b/packages/plugin-solana/src/providers/simulationSellingService.ts @@ -1,4 +1,4 @@ -import { +import type { TrustScoreDatabase, TokenPerformance, // TradePerformance, @@ -8,10 +8,10 @@ import { Connection, PublicKey } from "@solana/web3.js"; // Assuming TokenProvider and IAgentRuntime are available import { TokenProvider } from "./token.ts"; // import { settings } from "@elizaos/core"; -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { WalletProvider } from "./wallet.ts"; import * as amqp from "amqplib"; -import { ProcessedTokenData } from "../types/token.ts"; +import type { ProcessedTokenData } from "../types/token.ts"; import { getWalletKey } from "../keypairUtils.ts"; interface SellDetails { @@ -365,7 +365,7 @@ export class SimulationSellingService { await tokenProvider.getProcessedTokenData(); const prices = await this.walletProvider.fetchPrices(null); const solPrice = prices.solana.usd; - const sellSol = sellDetails.sell_amount / parseFloat(solPrice); + const sellSol = sellDetails.sell_amount / Number.parseFloat(solPrice); const sell_value_usd = sellDetails.sell_amount * processedData.tradeData.price; const trade = await this.trustScoreDb.getLatestTradePerformance( diff --git a/packages/plugin-solana/src/providers/token.ts b/packages/plugin-solana/src/providers/token.ts index 273185dffd4..d98533ce50f 100644 --- a/packages/plugin-solana/src/providers/token.ts +++ b/packages/plugin-solana/src/providers/token.ts @@ -1,13 +1,13 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, - ICacheManager, + type ICacheManager, settings, } from "@elizaos/core"; -import { +import type { DexScreenerData, DexScreenerPair, HolderData, @@ -21,7 +21,7 @@ import { import NodeCache from "node-cache"; import * as path from "path"; import { toBN } from "../bignumber.ts"; -import { WalletProvider, Item } from "./wallet.ts"; +import { WalletProvider, type Item } from "./wallet.ts"; import { Connection } from "@solana/web3.js"; import { getWalletKey } from "../keypairUtils.ts"; @@ -44,7 +44,7 @@ const PROVIDER_CONFIG = { export class TokenProvider { private cache: NodeCache; - private cacheKey: string = "solana/tokens"; + private cacheKey = "solana/tokens"; private NETWORK_ID = 1399811149; private GRAPHQL_ENDPOINT = "https://graph.codex.io/graphql"; @@ -818,7 +818,7 @@ export class TokenProvider { data.result.token_accounts.forEach((account: any) => { const owner = account.owner; - const balance = parseFloat(account.amount); + const balance = Number.parseFloat(account.amount); if (allHoldersMap.has(owner)) { allHoldersMap.set( diff --git a/packages/plugin-solana/src/providers/tokenUtils.ts b/packages/plugin-solana/src/providers/tokenUtils.ts index 8a717f4c41f..a9b5733683d 100644 --- a/packages/plugin-solana/src/providers/tokenUtils.ts +++ b/packages/plugin-solana/src/providers/tokenUtils.ts @@ -1,5 +1,5 @@ import { getAccount, getAssociatedTokenAddress } from "@solana/spl-token"; -import { Connection, PublicKey } from "@solana/web3.js"; +import { type Connection, PublicKey } from "@solana/web3.js"; import { elizaLogger } from "@elizaos/core"; export async function getTokenPriceInSol(tokenSymbol: string): Promise { diff --git a/packages/plugin-solana/src/providers/trustScoreProvider.ts b/packages/plugin-solana/src/providers/trustScoreProvider.ts index 2cc40b09523..7eeb2a99eee 100644 --- a/packages/plugin-solana/src/providers/trustScoreProvider.ts +++ b/packages/plugin-solana/src/providers/trustScoreProvider.ts @@ -1,24 +1,24 @@ import { elizaLogger, - IAgentRuntime, - Memory, - Provider, + type IAgentRuntime, + type Memory, + type Provider, settings, - State, + type State, } from "@elizaos/core"; import { - RecommenderMetrics, - TokenPerformance, - TokenRecommendation, - TradePerformance, + type RecommenderMetrics, + type TokenPerformance, + type TokenRecommendation, + type TradePerformance, TrustScoreDatabase, } from "@elizaos/plugin-trustdb"; import { getAssociatedTokenAddress } from "@solana/spl-token"; import { Connection, PublicKey } from "@solana/web3.js"; import { v4 as uuidv4 } from "uuid"; -import { ProcessedTokenData, TokenSecurityData } from "../types/token.ts"; +import type { ProcessedTokenData, TokenSecurityData } from "../types/token.ts"; import { SimulationSellingService } from "./simulationSellingService.ts"; -import { TokenProvider } from "./token.ts"; +import type { TokenProvider } from "./token.ts"; import { WalletProvider } from "./wallet.ts"; const Wallet = settings.MAIN_WALLET_ADDRESS; @@ -90,7 +90,7 @@ export class TrustScoreManager { const tokenBalInfo = await this.connection.getTokenAccountBalance(tokenAta); const tokenBalance = tokenBalInfo.value.amount; - const balance = parseFloat(tokenBalance); + const balance = Number.parseFloat(tokenBalance); return balance; } catch (error) { elizaLogger.error("Error fetching balance", error); @@ -374,7 +374,7 @@ export class TrustScoreManager { let tokensBalance = 0; const prices = await wallet.fetchPrices(runtime); const solPrice = prices.solana.usd; - const buySol = data.buy_amount / parseFloat(solPrice); + const buySol = data.buy_amount / Number.parseFloat(solPrice); const buy_value_usd = data.buy_amount * processedData.tradeData.price; const token = await this.tokenProvider.fetchTokenTradeData(); const tokenCodex = await this.tokenProvider.fetchTokenCodex(); @@ -547,7 +547,7 @@ export class TrustScoreManager { ); const prices = await wallet.fetchPrices(runtime); const solPrice = prices.solana.usd; - const sellSol = sellDetails.sell_amount / parseFloat(solPrice); + const sellSol = sellDetails.sell_amount / Number.parseFloat(solPrice); const sell_value_usd = sellDetails.sell_amount * processedData.tradeData.price; const trade = await this.trustScoreDb.getLatestTradePerformance( diff --git a/packages/plugin-solana/src/providers/wallet.ts b/packages/plugin-solana/src/providers/wallet.ts index d3912c8b0bd..cf2290004dc 100644 --- a/packages/plugin-solana/src/providers/wallet.ts +++ b/packages/plugin-solana/src/providers/wallet.ts @@ -1,8 +1,8 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; import { Connection, PublicKey } from "@solana/web3.js"; diff --git a/packages/plugin-spheron/src/actions/deployment.ts b/packages/plugin-spheron/src/actions/deployment.ts index 25048430cf2..ba4b607fa46 100644 --- a/packages/plugin-spheron/src/actions/deployment.ts +++ b/packages/plugin-spheron/src/actions/deployment.ts @@ -1,10 +1,10 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, ModelClass, @@ -17,7 +17,7 @@ import { closeDeployment, startDeployment, } from "../utils/index.ts"; -import { DeploymentContent } from "../types/index.ts"; +import type { DeploymentContent } from "../types/index.ts"; import { AVAILABLE_GPU_MODELS } from "../utils/constants.ts"; import { DEPLOYMENT_TEMPLATES } from "../utils/template.ts"; diff --git a/packages/plugin-spheron/src/actions/escrow.ts b/packages/plugin-spheron/src/actions/escrow.ts index b29fe8de68d..919e09d89d3 100644 --- a/packages/plugin-spheron/src/actions/escrow.ts +++ b/packages/plugin-spheron/src/actions/escrow.ts @@ -1,10 +1,10 @@ import { - Action, - ActionExample, - IAgentRuntime, - Memory, - State, - HandlerCallback, + type Action, + type ActionExample, + type IAgentRuntime, + type Memory, + type State, + type HandlerCallback, elizaLogger, composeContext, ModelClass, @@ -16,7 +16,7 @@ import { getUserBalance, withdrawBalance, } from "../utils/index.ts"; -import { EscrowContent } from "../types/index.ts"; +import type { EscrowContent } from "../types/index.ts"; import { SUPPORTED_TOKENS } from "../utils/constants.ts"; function isEscrowContent(content: any): content is EscrowContent { diff --git a/packages/plugin-spheron/src/environment.ts b/packages/plugin-spheron/src/environment.ts index 66e6a0bc898..28c4e1d40ac 100644 --- a/packages/plugin-spheron/src/environment.ts +++ b/packages/plugin-spheron/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const spheronEnvSchema = z.object({ diff --git a/packages/plugin-spheron/src/index.ts b/packages/plugin-spheron/src/index.ts index bb2fcc3d86f..190cae8b039 100644 --- a/packages/plugin-spheron/src/index.ts +++ b/packages/plugin-spheron/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import escrow from "./actions/escrow.ts"; import deployment from "./actions/deployment.ts"; import { tokensProvider } from "./providers/tokens.ts"; diff --git a/packages/plugin-spheron/src/providers/deployment.ts b/packages/plugin-spheron/src/providers/deployment.ts index a2a066e4d90..fcfaf1a1448 100644 --- a/packages/plugin-spheron/src/providers/deployment.ts +++ b/packages/plugin-spheron/src/providers/deployment.ts @@ -1,8 +1,8 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; import { DEPLOYMENT_CONFIGS } from "../utils/constants.ts"; diff --git a/packages/plugin-spheron/src/providers/tokens.ts b/packages/plugin-spheron/src/providers/tokens.ts index d44a55b9e05..77470f89b51 100644 --- a/packages/plugin-spheron/src/providers/tokens.ts +++ b/packages/plugin-spheron/src/providers/tokens.ts @@ -1,8 +1,8 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; import { SUPPORTED_TOKENS } from "../utils/constants.ts"; diff --git a/packages/plugin-spheron/src/types/index.ts b/packages/plugin-spheron/src/types/index.ts index 489c5050255..4d74edeab2c 100644 --- a/packages/plugin-spheron/src/types/index.ts +++ b/packages/plugin-spheron/src/types/index.ts @@ -1,4 +1,4 @@ -import { Content } from "@elizaos/core"; +import type { Content } from "@elizaos/core"; export interface SpheronComputeConfig { name: string; diff --git a/packages/plugin-spheron/src/utils/index.ts b/packages/plugin-spheron/src/utils/index.ts index a129b771d77..f33e01b08d3 100644 --- a/packages/plugin-spheron/src/utils/index.ts +++ b/packages/plugin-spheron/src/utils/index.ts @@ -1,7 +1,7 @@ -import { IAgentRuntime, elizaLogger } from "@elizaos/core"; +import { type IAgentRuntime, elizaLogger } from "@elizaos/core"; import { SpheronSDK } from "@spheron/protocol-sdk"; import { validateSpheronConfig } from "../environment.ts"; -import { +import type { BalanceInfo, DeploymentDetails, SpheronComputeConfig, @@ -352,7 +352,7 @@ function parseDuration(duration: string): number { } const [, value, unit] = match; - const numValue = parseFloat(value); + const numValue = Number.parseFloat(value); switch (unit) { case "min": diff --git a/packages/plugin-spheron/src/utils/template.ts b/packages/plugin-spheron/src/utils/template.ts index 7ff0fb6c77a..490ac414159 100644 --- a/packages/plugin-spheron/src/utils/template.ts +++ b/packages/plugin-spheron/src/utils/template.ts @@ -1,4 +1,4 @@ -import { Customizations, SpheronComputeConfig } from "../types/index.ts"; +import type { Customizations, SpheronComputeConfig } from "../types/index.ts"; interface TemplateDefinition { description: string; diff --git a/packages/plugin-squid-router/src/actions/xChainSwap.ts b/packages/plugin-squid-router/src/actions/xChainSwap.ts index 778ad68a2f9..8065780b34f 100644 --- a/packages/plugin-squid-router/src/actions/xChainSwap.ts +++ b/packages/plugin-squid-router/src/actions/xChainSwap.ts @@ -2,11 +2,11 @@ import { composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State + type State } from "@elizaos/core"; import {xChainSwapTemplate} from "../templates"; import {convertToWei, isXChainSwapContent, validateSquidRouterConfig} from "../helpers/utils.ts"; diff --git a/packages/plugin-squid-router/src/helpers/utils.ts b/packages/plugin-squid-router/src/helpers/utils.ts index f8e69882d38..75627cb49d4 100644 --- a/packages/plugin-squid-router/src/helpers/utils.ts +++ b/packages/plugin-squid-router/src/helpers/utils.ts @@ -1,7 +1,7 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from 'zod'; import { ethers } from 'ethers'; -import {SquidToken, XChainSwapContent} from "../types"; +import type {SquidToken, XChainSwapContent} from "../types"; export function convertToWei(amount: string | number, token: SquidToken): string { if (typeof token.decimals !== 'number' || token.decimals < 0 || token.decimals > 255) { diff --git a/packages/plugin-squid-router/src/providers/squidRouter.ts b/packages/plugin-squid-router/src/providers/squidRouter.ts index c37f62c0520..430f66f3033 100644 --- a/packages/plugin-squid-router/src/providers/squidRouter.ts +++ b/packages/plugin-squid-router/src/providers/squidRouter.ts @@ -1,10 +1,10 @@ -import {IAgentRuntime, Memory, Provider, State} from "@elizaos/core"; +import type {IAgentRuntime, Memory, Provider, State} from "@elizaos/core"; import {Squid} from "@0xsquid/sdk"; import {ethers} from "ethers"; -import {ChainData, ChainType, RouteRequest, RouteResponse, Token} from "@0xsquid/squid-types"; +import {type ChainData, ChainType, type RouteRequest, type RouteResponse, type Token} from "@0xsquid/squid-types"; import {validateSquidRouterConfig} from "../helpers/utils.ts"; -import {ExecuteRoute, TransactionResponses} from "@0xsquid/sdk/dist/types"; -import {nativeTokenConstant, SquidToken} from "../types"; +import type {ExecuteRoute, TransactionResponses} from "@0xsquid/sdk/dist/types"; +import {nativeTokenConstant, type SquidToken} from "../types"; const getSDK = (baseUrl: string, integratorId: string): Squid => { const squid = new Squid({ diff --git a/packages/plugin-squid-router/src/tests/router.test.ts b/packages/plugin-squid-router/src/tests/router.test.ts index a1eeaf99cdd..bdaa0e9884b 100644 --- a/packages/plugin-squid-router/src/tests/router.test.ts +++ b/packages/plugin-squid-router/src/tests/router.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, beforeEach, vi, afterEach } from "vitest"; import { defaultCharacter } from "@elizaos/core"; -import { initSquidRouterProvider, SquidRouterProvider } from "../providers/squidRouter.ts"; +import { initSquidRouterProvider, type SquidRouterProvider } from "../providers/squidRouter.ts"; import {ChainType} from "@0xsquid/squid-types"; // Mock Squid module diff --git a/packages/plugin-squid-router/src/types/index.ts b/packages/plugin-squid-router/src/types/index.ts index 518eefce05f..6ba85904dd6 100644 --- a/packages/plugin-squid-router/src/types/index.ts +++ b/packages/plugin-squid-router/src/types/index.ts @@ -1,4 +1,4 @@ -import {Content} from "@elizaos/core"; +import type {Content} from "@elizaos/core"; export const nativeTokenConstant = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE"; diff --git a/packages/plugin-stargaze/src/actions/getCollectionStats.ts b/packages/plugin-stargaze/src/actions/getCollectionStats.ts index d6e718f7efb..cc3ca4b363b 100644 --- a/packages/plugin-stargaze/src/actions/getCollectionStats.ts +++ b/packages/plugin-stargaze/src/actions/getCollectionStats.ts @@ -1,14 +1,14 @@ import { ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import axios from "axios"; diff --git a/packages/plugin-stargaze/src/actions/getLatestNFT.ts b/packages/plugin-stargaze/src/actions/getLatestNFT.ts index c80728df23a..bbf52276153 100644 --- a/packages/plugin-stargaze/src/actions/getLatestNFT.ts +++ b/packages/plugin-stargaze/src/actions/getLatestNFT.ts @@ -1,14 +1,14 @@ import { ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import axios from "axios"; diff --git a/packages/plugin-stargaze/src/actions/getTokenSales.ts b/packages/plugin-stargaze/src/actions/getTokenSales.ts index 360a4dbc405..5c21701a8d8 100644 --- a/packages/plugin-stargaze/src/actions/getTokenSales.ts +++ b/packages/plugin-stargaze/src/actions/getTokenSales.ts @@ -1,20 +1,20 @@ import { ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, } from "@elizaos/core"; import axios from "axios"; import { debugLog } from "../utils/debug"; import { validateStargazeConfig } from "../environment"; -import { TokenSale, TokenSalesResponse } from "../types"; +import type { TokenSale, TokenSalesResponse } from "../types"; const getTokenSalesTemplate = `Given the message, extract the collection address for fetching Stargaze sales data. diff --git a/packages/plugin-stargaze/src/environment.ts b/packages/plugin-stargaze/src/environment.ts index 2567ded46e6..49c126abe12 100644 --- a/packages/plugin-stargaze/src/environment.ts +++ b/packages/plugin-stargaze/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const stargazeEnvSchema = z.object({ diff --git a/packages/plugin-stargaze/src/index.ts b/packages/plugin-stargaze/src/index.ts index f48bb1c1437..30fbc01ada9 100644 --- a/packages/plugin-stargaze/src/index.ts +++ b/packages/plugin-stargaze/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import getLatestNFT from "./actions/getLatestNFT"; import getCollectionStats from "./actions/getCollectionStats"; import getTokenSales from "./actions/getTokenSales"; diff --git a/packages/plugin-starknet/src/actions/subdomain.ts b/packages/plugin-starknet/src/actions/subdomain.ts index 829b642b3b8..de92342330f 100644 --- a/packages/plugin-starknet/src/actions/subdomain.ts +++ b/packages/plugin-starknet/src/actions/subdomain.ts @@ -1,16 +1,16 @@ // It should just transfer subdomain from the root domain owned by the agent's wallet to the recipient. import { - ActionExample, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, type Action, composeContext, generateObjectDeprecated, - Content, + type Content, elizaLogger, } from "@elizaos/core"; import { getStarknetAccount } from "../utils"; diff --git a/packages/plugin-starknet/src/actions/swap.ts b/packages/plugin-starknet/src/actions/swap.ts index 86e77e00e5f..29db4330a8e 100644 --- a/packages/plugin-starknet/src/actions/swap.ts +++ b/packages/plugin-starknet/src/actions/swap.ts @@ -1,19 +1,19 @@ import { - Action, - ActionExample, + type Action, + type ActionExample, composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { executeSwap as executeAvnuSwap, fetchQuotes, - QuoteRequest, + type QuoteRequest, } from "@avnu/avnu-sdk"; import { getStarknetAccount } from "../utils/index.ts"; diff --git a/packages/plugin-starknet/src/actions/takeOrder.ts b/packages/plugin-starknet/src/actions/takeOrder.ts index b4ba87554ff..3cbaf1421a7 100644 --- a/packages/plugin-starknet/src/actions/takeOrder.ts +++ b/packages/plugin-starknet/src/actions/takeOrder.ts @@ -1,11 +1,11 @@ import { - Action, - ActionExample, + type Action, + type ActionExample, composeContext, - Content, + type Content, generateText, - IAgentRuntime, - Memory, + type IAgentRuntime, + type Memory, ModelClass, settings, } from "@elizaos/core"; diff --git a/packages/plugin-starknet/src/actions/transfer.ts b/packages/plugin-starknet/src/actions/transfer.ts index 59d438d2a11..534f5788ab2 100644 --- a/packages/plugin-starknet/src/actions/transfer.ts +++ b/packages/plugin-starknet/src/actions/transfer.ts @@ -3,16 +3,16 @@ import { type Action, - ActionExample, + type ActionExample, composeContext, - Content, + type Content, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { getStarknetAccount } from "../utils"; import { ERC20Token } from "../utils/ERC20Token"; diff --git a/packages/plugin-starknet/src/actions/unruggable.ts b/packages/plugin-starknet/src/actions/unruggable.ts index c5920fc8aa6..2cc0d1e6645 100644 --- a/packages/plugin-starknet/src/actions/unruggable.ts +++ b/packages/plugin-starknet/src/actions/unruggable.ts @@ -1,14 +1,14 @@ import { type Action, - ActionExample, + type ActionExample, composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, - IAgentRuntime, - Memory, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, } from "@elizaos/core"; import { Percent } from "@uniswap/sdk-core"; import { createMemecoin, launchOnEkubo } from "unruggable-sdk"; @@ -47,7 +47,7 @@ export function isDeployTokenContent(content: DeployTokenContent) { const validAddresses = content.name.length > 2 && content.symbol.length > 2 && - parseInt(content.initialSupply) > 0 && + Number.parseInt(content.initialSupply) > 0 && content.owner.startsWith("0x") && content.owner.length === 66; diff --git a/packages/plugin-starknet/src/environment.ts b/packages/plugin-starknet/src/environment.ts index ed4fd86fb5b..d776c743ce6 100644 --- a/packages/plugin-starknet/src/environment.ts +++ b/packages/plugin-starknet/src/environment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; const STARKNET_PUBLIC_RPC = "https://starknet-mainnet.public.blastapi.io"; diff --git a/packages/plugin-starknet/src/index.ts b/packages/plugin-starknet/src/index.ts index bd73cc4ea10..3fbf44f2224 100644 --- a/packages/plugin-starknet/src/index.ts +++ b/packages/plugin-starknet/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { executeSwap } from "./actions/swap"; import transfer from "./actions/transfer"; import { deployToken } from "./actions/unruggable"; diff --git a/packages/plugin-starknet/src/providers/portfolioProvider.ts b/packages/plugin-starknet/src/providers/portfolioProvider.ts index 95ed4b524f1..ae19926a337 100644 --- a/packages/plugin-starknet/src/providers/portfolioProvider.ts +++ b/packages/plugin-starknet/src/providers/portfolioProvider.ts @@ -1,9 +1,9 @@ import { elizaLogger, - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, } from "@elizaos/core"; import { fetchWithRetry, getStarknetAccount } from "../utils"; @@ -119,4 +119,4 @@ const walletProvider: Provider = { }, }; -export { walletProvider, TokenBalances }; +export { walletProvider, type TokenBalances }; diff --git a/packages/plugin-starknet/src/providers/token.ts b/packages/plugin-starknet/src/providers/token.ts index 96ac18ac5e0..8af8de152bd 100644 --- a/packages/plugin-starknet/src/providers/token.ts +++ b/packages/plugin-starknet/src/providers/token.ts @@ -2,8 +2,8 @@ // Look for the TODOs to see what needs to be updated import { settings } from "@elizaos/core"; -import { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; -import { +import type { IAgentRuntime, Memory, Provider, State } from "@elizaos/core"; +import type { DexScreenerData, DexScreenerPair, HolderData, @@ -12,16 +12,16 @@ import { CalculatedBuyAmounts, Prices, } from "../types/trustDB.ts"; -import { WalletProvider, TokenBalances } from "./portfolioProvider.ts"; +import { WalletProvider, type TokenBalances } from "./portfolioProvider.ts"; import { num } from "starknet"; import { analyzeHighSupplyHolders, evaluateTokenTrading, - TokenMetrics, + type TokenMetrics, } from "./utils.ts"; import { PROVIDER_CONFIG } from "../index.ts"; import { Cache } from "../utils/cache.ts"; -import { TokenInfo } from "../types/token.ts"; +import type { TokenInfo } from "../types/token.ts"; export const PORTFOLIO_TOKENS = { // Coingecko IDs src: @@ -580,7 +580,7 @@ export class TokenProvider { data.result.token_accounts.forEach((account: any) => { const owner = account.owner; - const balance = parseFloat(account.amount); + const balance = Number.parseFloat(account.amount); if (allHoldersMap.has(owner)) { allHoldersMap.set( diff --git a/packages/plugin-starknet/src/providers/trustScoreProvider.ts b/packages/plugin-starknet/src/providers/trustScoreProvider.ts index d44a990868a..ff84353aa17 100644 --- a/packages/plugin-starknet/src/providers/trustScoreProvider.ts +++ b/packages/plugin-starknet/src/providers/trustScoreProvider.ts @@ -1,24 +1,24 @@ -import { ProcessedTokenData, TokenSecurityData } from "../types/trustDB.ts"; +import type { ProcessedTokenData, TokenSecurityData } from "../types/trustDB.ts"; // import { Connection, PublicKey } from "@solana/web3.js"; // import { getAssociatedTokenAddress } from "@solana/spl-token"; // import { TokenProvider } from "./token.ts"; import { elizaLogger, - IAgentRuntime, - Memory, - Provider, + type IAgentRuntime, + type Memory, + type Provider, settings, - State, + type State, } from "@elizaos/core"; import { - RecommenderMetrics, - TokenPerformance, - TokenRecommendation, - TradePerformance, + type RecommenderMetrics, + type TokenPerformance, + type TokenRecommendation, + type TradePerformance, TrustScoreDatabase, } from "@elizaos/plugin-trustdb"; import { getTokenBalance } from "../utils/index.ts"; -import { TokenProvider } from "./token.ts"; +import type { TokenProvider } from "./token.ts"; import { WalletProvider } from "./portfolioProvider.ts"; const _Wallet = settings.MAIN_WALLET_ADDRESS; @@ -82,7 +82,7 @@ export class TrustScoreManager { this.runtime, recommenderWallet ); - const balance = parseFloat(tokenBalance); + const balance = Number.parseFloat(tokenBalance); return balance; } catch (error) { elizaLogger.error("Error fetching balance", error); diff --git a/packages/plugin-starknet/src/providers/utils.ts b/packages/plugin-starknet/src/providers/utils.ts index afa5b9b2a8e..1e51978728f 100644 --- a/packages/plugin-starknet/src/providers/utils.ts +++ b/packages/plugin-starknet/src/providers/utils.ts @@ -1,5 +1,5 @@ import { num } from "starknet"; -import { HolderData } from "../types/trustDB"; +import type { HolderData } from "../types/trustDB"; export interface TokenMetrics { liquidityUsd: bigint; diff --git a/packages/plugin-starknet/src/types/trustDB.ts b/packages/plugin-starknet/src/types/trustDB.ts index 9ee767b8bc3..720ecb126f9 100644 --- a/packages/plugin-starknet/src/types/trustDB.ts +++ b/packages/plugin-starknet/src/types/trustDB.ts @@ -1,4 +1,4 @@ -import { TokenInfo } from "./token"; +import type { TokenInfo } from "./token"; export interface TokenSecurityData { ownerBalance: string; diff --git a/packages/plugin-starknet/src/utils/ERC20Token.ts b/packages/plugin-starknet/src/utils/ERC20Token.ts index e52ec086c12..5225a658f44 100644 --- a/packages/plugin-starknet/src/utils/ERC20Token.ts +++ b/packages/plugin-starknet/src/utils/ERC20Token.ts @@ -1,10 +1,10 @@ import { - AccountInterface, + type AccountInterface, cairo, CallData, - Calldata, + type Calldata, Contract, - ProviderInterface, + type ProviderInterface, } from "starknet"; import erc20Abi from "./erc20.json"; diff --git a/packages/plugin-starknet/src/utils/index.ts b/packages/plugin-starknet/src/utils/index.ts index cc73684d8e0..cdf89e80035 100644 --- a/packages/plugin-starknet/src/utils/index.ts +++ b/packages/plugin-starknet/src/utils/index.ts @@ -1,5 +1,5 @@ -import { elizaLogger, IAgentRuntime } from "@elizaos/core"; -import { Fraction, Percent } from "@uniswap/sdk-core"; +import { elizaLogger, type IAgentRuntime } from "@elizaos/core"; +import { type Fraction, Percent } from "@uniswap/sdk-core"; import { Account, Contract, RpcProvider } from "starknet"; export const getTokenBalance = async ( diff --git a/packages/plugin-starknet/src/utils/starknetId.ts b/packages/plugin-starknet/src/utils/starknetId.ts index a274f30bfaa..8f8b68f3c5b 100644 --- a/packages/plugin-starknet/src/utils/starknetId.ts +++ b/packages/plugin-starknet/src/utils/starknetId.ts @@ -1,4 +1,4 @@ -import { Account, starknetId } from "starknet"; +import { type Account, starknetId } from "starknet"; export const isStarkDomain = (domain: string): boolean => { return /^(?:[a-z0-9-]{1,48}(?:[a-z0-9-]{1,48}[a-z0-9-])?\.)*[a-z0-9-]{1,48}\.stark$/.test( diff --git a/packages/plugin-story/src/actions/attachTerms.ts b/packages/plugin-story/src/actions/attachTerms.ts index 3486c6489ad..a7f01ec1f23 100644 --- a/packages/plugin-story/src/actions/attachTerms.ts +++ b/packages/plugin-story/src/actions/attachTerms.ts @@ -2,20 +2,20 @@ import { composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, + type HandlerCallback, ModelClass, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import { WalletProvider } from "../providers/wallet"; import { attachTermsTemplate } from "../templates"; -import { +import type { AttachLicenseTermsResponse, LicenseTerms, RegisterPILResponse, } from "@story-protocol/core-sdk"; -import { AttachTermsParams } from "../types"; +import type { AttachTermsParams } from "../types"; import { zeroAddress } from "viem"; export { attachTermsTemplate }; diff --git a/packages/plugin-story/src/actions/getAvailableLicenses.ts b/packages/plugin-story/src/actions/getAvailableLicenses.ts index 466100084bd..6df7b5e5ec5 100644 --- a/packages/plugin-story/src/actions/getAvailableLicenses.ts +++ b/packages/plugin-story/src/actions/getAvailableLicenses.ts @@ -2,15 +2,15 @@ import { composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, + type HandlerCallback, ModelClass, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import { getAvailableLicensesTemplate, licenseIPTemplate } from "../templates"; -import { Address } from "viem"; -import { IPLicenseDetails, RESOURCE_TYPE } from "../types/api"; +import type { Address } from "viem"; +import { type IPLicenseDetails, RESOURCE_TYPE } from "../types/api"; import { API_KEY, API_URL } from "../lib/api"; import { storyOdyssey } from "viem/chains"; diff --git a/packages/plugin-story/src/actions/getIPDetails.ts b/packages/plugin-story/src/actions/getIPDetails.ts index 68d7f132875..4876a41d5d0 100644 --- a/packages/plugin-story/src/actions/getIPDetails.ts +++ b/packages/plugin-story/src/actions/getIPDetails.ts @@ -2,15 +2,15 @@ import { composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, + type HandlerCallback, ModelClass, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import { getIPDetailsTemplate } from "../templates"; -import { Address } from "viem"; -import { Asset, RESOURCE_TYPE } from "../types/api"; +import type { Address } from "viem"; +import { type Asset, RESOURCE_TYPE } from "../types/api"; import { API_URL, getResource } from "../lib/api"; export { getIPDetailsTemplate }; diff --git a/packages/plugin-story/src/actions/licenseIP.ts b/packages/plugin-story/src/actions/licenseIP.ts index 1d834136cec..9a780468742 100644 --- a/packages/plugin-story/src/actions/licenseIP.ts +++ b/packages/plugin-story/src/actions/licenseIP.ts @@ -2,16 +2,16 @@ import { composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, + type HandlerCallback, ModelClass, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import { WalletProvider } from "../providers/wallet"; import { licenseIPTemplate } from "../templates"; -import { LicenseIPParams } from "../types"; -import { MintLicenseTokensResponse } from "@story-protocol/core-sdk"; +import type { LicenseIPParams } from "../types"; +import type { MintLicenseTokensResponse } from "@story-protocol/core-sdk"; import { hasIpAttachedLicenseTerms } from "../queries"; export { licenseIPTemplate }; diff --git a/packages/plugin-story/src/actions/registerIP.ts b/packages/plugin-story/src/actions/registerIP.ts index ae579ca074c..4b9860be910 100644 --- a/packages/plugin-story/src/actions/registerIP.ts +++ b/packages/plugin-story/src/actions/registerIP.ts @@ -2,19 +2,19 @@ import { composeContext, elizaLogger, generateObjectDeprecated, - HandlerCallback, + type HandlerCallback, ModelClass, - IAgentRuntime, - Memory, - State, + type IAgentRuntime, + type Memory, + type State, } from "@elizaos/core"; import pinataSDK from "@pinata/sdk"; -import { RegisterIpResponse } from "@story-protocol/core-sdk"; +import type { RegisterIpResponse } from "@story-protocol/core-sdk"; import { createHash } from "crypto"; import { uploadJSONToIPFS } from "../functions/uploadJSONToIPFS"; import { WalletProvider } from "../providers/wallet"; import { registerIPTemplate } from "../templates"; -import { RegisterIPParams } from "../types"; +import type { RegisterIPParams } from "../types"; export { registerIPTemplate }; diff --git a/packages/plugin-story/src/functions/uploadJSONToIPFS.ts b/packages/plugin-story/src/functions/uploadJSONToIPFS.ts index dc8cb010735..668e231b2b3 100644 --- a/packages/plugin-story/src/functions/uploadJSONToIPFS.ts +++ b/packages/plugin-story/src/functions/uploadJSONToIPFS.ts @@ -1,4 +1,4 @@ -import PinataClient from "@pinata/sdk"; +import type PinataClient from "@pinata/sdk"; export async function uploadJSONToIPFS( pinata: PinataClient, diff --git a/packages/plugin-story/src/index.ts b/packages/plugin-story/src/index.ts index 9012e1f5a34..c81413f45d5 100644 --- a/packages/plugin-story/src/index.ts +++ b/packages/plugin-story/src/index.ts @@ -6,7 +6,7 @@ export * from "./actions/getIPDetails"; export * from "./providers/wallet"; export * from "./types"; -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { storyWalletProvider } from "./providers/wallet"; import { registerIPAction } from "./actions/registerIP"; import { licenseIPAction } from "./actions/licenseIP"; diff --git a/packages/plugin-story/src/lib/api.ts b/packages/plugin-story/src/lib/api.ts index 114ef1643c4..aff0176d388 100644 --- a/packages/plugin-story/src/lib/api.ts +++ b/packages/plugin-story/src/lib/api.ts @@ -1,12 +1,12 @@ import { - IPLicenseTerms, - PILTerms, + type IPLicenseTerms, + type PILTerms, QUERY_ORDER_BY, QUERY_ORDER_DIRECTION, - QueryOptions, + type QueryOptions, RESOURCE_TYPE, - ResourceType, - Trait, + type ResourceType, + type Trait, } from "../types/api"; import { elizaLogger } from "@elizaos/core"; diff --git a/packages/plugin-story/src/lib/utils.ts b/packages/plugin-story/src/lib/utils.ts index f0464e17e51..99b52a6d452 100644 --- a/packages/plugin-story/src/lib/utils.ts +++ b/packages/plugin-story/src/lib/utils.ts @@ -1,5 +1,5 @@ export function camelize(str: string) { - return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, function (match, index) { + return str.replace(/(?:^\w|[A-Z]|\b\w|\s+)/g, (match, index) => { if (+match === 0) return ""; // or if (/\s+/.test(match)) for white spaces return index === 0 ? match.toLowerCase() : match.toUpperCase(); }); diff --git a/packages/plugin-story/src/providers/wallet.ts b/packages/plugin-story/src/providers/wallet.ts index 097cfe16684..2abba8dc3d3 100644 --- a/packages/plugin-story/src/providers/wallet.ts +++ b/packages/plugin-story/src/providers/wallet.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime, Provider, Memory, State } from "@elizaos/core"; +import type { IAgentRuntime, Provider, Memory, State } from "@elizaos/core"; import { createPublicClient, createWalletClient, @@ -9,13 +9,13 @@ import { type Chain, type HttpTransport, type Address, - Account, - Transport, + type Account, + type Transport, } from "viem"; import { storyOdyssey } from "viem/chains"; import type { SupportedChain, ChainMetadata } from "../types"; import { privateKeyToAccount } from "viem/accounts"; -import { StoryClient, StoryConfig } from "@story-protocol/core-sdk"; +import { StoryClient, type StoryConfig } from "@story-protocol/core-sdk"; export const DEFAULT_CHAIN_CONFIGS: Record = { odyssey: { diff --git a/packages/plugin-story/src/queries.ts b/packages/plugin-story/src/queries.ts index 080b8f12318..5d103eb7f27 100644 --- a/packages/plugin-story/src/queries.ts +++ b/packages/plugin-story/src/queries.ts @@ -1,4 +1,4 @@ -import { Account, HttpTransport, Chain, Address, PublicClient } from "viem"; +import type { Account, HttpTransport, Chain, Address, PublicClient } from "viem"; type LicenseRegistryHasIpAttachedLicenseTermsRequest = { ipId: Address; diff --git a/packages/plugin-story/src/types/api.ts b/packages/plugin-story/src/types/api.ts index 5ff30f7960e..8e413e7c0a8 100644 --- a/packages/plugin-story/src/types/api.ts +++ b/packages/plugin-story/src/types/api.ts @@ -1,4 +1,4 @@ -import { Address, Hash } from "viem"; +import type { Address, Hash } from "viem"; export enum ACTION_RESPONSE_TYPE { SET = "SET", diff --git a/packages/plugin-sui/src/actions/transfer.ts b/packages/plugin-sui/src/actions/transfer.ts index d9471aaa5f2..e19ef2b742e 100644 --- a/packages/plugin-sui/src/actions/transfer.ts +++ b/packages/plugin-sui/src/actions/transfer.ts @@ -1,11 +1,11 @@ import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, composeContext, elizaLogger, generateObject, diff --git a/packages/plugin-sui/src/enviroment.ts b/packages/plugin-sui/src/enviroment.ts index 6c041d29f90..c25bbcc72d3 100644 --- a/packages/plugin-sui/src/enviroment.ts +++ b/packages/plugin-sui/src/enviroment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const suiEnvSchema = z.object({ diff --git a/packages/plugin-sui/src/index.ts b/packages/plugin-sui/src/index.ts index 5f69381fda0..6bbacef9a59 100644 --- a/packages/plugin-sui/src/index.ts +++ b/packages/plugin-sui/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import transferToken from "./actions/transfer.ts"; import { WalletProvider, walletProvider } from "./providers/wallet.ts"; diff --git a/packages/plugin-sui/src/providers/wallet.ts b/packages/plugin-sui/src/providers/wallet.ts index 5c12093566f..a129f5994ed 100644 --- a/packages/plugin-sui/src/providers/wallet.ts +++ b/packages/plugin-sui/src/providers/wallet.ts @@ -1,4 +1,4 @@ -import { +import type { IAgentRuntime, ICacheManager, Memory, @@ -33,7 +33,7 @@ type SuiNetwork = "mainnet" | "testnet" | "devnet" | "localnet"; export class WalletProvider { private cache: NodeCache; - private cacheKey: string = "sui/wallet"; + private cacheKey = "sui/wallet"; constructor( private suiClient: SuiClient, diff --git a/packages/plugin-sui/src/utils.ts b/packages/plugin-sui/src/utils.ts index 4db8623eb1f..7264ffa7054 100644 --- a/packages/plugin-sui/src/utils.ts +++ b/packages/plugin-sui/src/utils.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519"; const parseAccount = (runtime: IAgentRuntime): Ed25519Keypair => { diff --git a/packages/plugin-tee-log/src/adapters/sqliteDAO.ts b/packages/plugin-tee-log/src/adapters/sqliteDAO.ts index ae1c5adde2e..ce910bb458d 100644 --- a/packages/plugin-tee-log/src/adapters/sqliteDAO.ts +++ b/packages/plugin-tee-log/src/adapters/sqliteDAO.ts @@ -1,5 +1,5 @@ -import { Database } from "better-sqlite3"; -import { TeeLogDAO, TeeAgent, TeeLog, TeeLogQuery, PageQuery } from "../types.ts"; +import type { Database } from "better-sqlite3"; +import { TeeLogDAO, type TeeAgent, type TeeLog, type TeeLogQuery, type PageQuery } from "../types.ts"; import { sqliteTables } from "./sqliteTables.ts"; export class SqliteTeeLogDAO extends TeeLogDAO { diff --git a/packages/plugin-tee-log/src/plugins/teeLogPlugin.ts b/packages/plugin-tee-log/src/plugins/teeLogPlugin.ts index d8416864d57..9bf55440132 100644 --- a/packages/plugin-tee-log/src/plugins/teeLogPlugin.ts +++ b/packages/plugin-tee-log/src/plugins/teeLogPlugin.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { TeeLogService } from "../services/teeLogService"; export const teeLogPlugin: Plugin = { diff --git a/packages/plugin-tee-log/src/services/teeLogManager.ts b/packages/plugin-tee-log/src/services/teeLogManager.ts index f6c867aee13..db7a95fe4ae 100644 --- a/packages/plugin-tee-log/src/services/teeLogManager.ts +++ b/packages/plugin-tee-log/src/services/teeLogManager.ts @@ -1,9 +1,9 @@ import { - TEEMode, + type TEEMode, RemoteAttestationProvider as TdxAttestationProvider, } from "@elizaos/plugin-tee"; import { SgxAttestationProvider } from "@elizaos/plugin-sgx"; -import { TeeType, TeeLogDAO, TeeAgent, TeeLog, TeeLogQuery, PageQuery } from "../types"; +import { TeeType, type TeeLogDAO, type TeeAgent, type TeeLog, type TeeLogQuery, type PageQuery } from "../types"; import elliptic from "elliptic"; import { v4 } from "uuid"; diff --git a/packages/plugin-tee-log/src/services/teeLogService.ts b/packages/plugin-tee-log/src/services/teeLogService.ts index d63d40f66f2..c52360a9b49 100644 --- a/packages/plugin-tee-log/src/services/teeLogService.ts +++ b/packages/plugin-tee-log/src/services/teeLogService.ts @@ -1,15 +1,15 @@ -import { IAgentRuntime, Service, ServiceType, ITeeLogService } from "@elizaos/core"; +import { type IAgentRuntime, Service, ServiceType, type ITeeLogService } from "@elizaos/core"; import { TEEMode } from "@elizaos/plugin-tee"; import { SqliteTeeLogDAO } from "../adapters/sqliteDAO"; -import { TeeType, TeeLogDAO, TeeAgent, TeeLog, TeeLogQuery, PageQuery } from "../types"; +import { TeeType, type TeeLogDAO, type TeeAgent, type TeeLog, type TeeLogQuery, type PageQuery } from "../types"; import { TeeLogManager } from "./teeLogManager"; import Database from "better-sqlite3"; export class TeeLogService extends Service implements ITeeLogService { private readonly dbPath = "./data/tee_log.sqlite"; - private initialized: boolean = false; - private enableTeeLog: boolean = false; + private initialized = false; + private enableTeeLog = false; private teeType: TeeType; private teeMode: TEEMode = TEEMode.OFF; // Only used for plugin-tee with TDX dstack diff --git a/packages/plugin-tee-marlin/src/index.ts b/packages/plugin-tee-marlin/src/index.ts index bc8e905efa8..e1540ab8477 100644 --- a/packages/plugin-tee-marlin/src/index.ts +++ b/packages/plugin-tee-marlin/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { remoteAttestationAction } from "./actions/remoteAttestation"; export const teeMarlinPlugin: Plugin = { diff --git a/packages/plugin-tee-verifiable-log/src/adapters/sqliteVerifiableDAO.ts b/packages/plugin-tee-verifiable-log/src/adapters/sqliteVerifiableDAO.ts index 0002b97dfcc..24a18336f44 100644 --- a/packages/plugin-tee-verifiable-log/src/adapters/sqliteVerifiableDAO.ts +++ b/packages/plugin-tee-verifiable-log/src/adapters/sqliteVerifiableDAO.ts @@ -1,11 +1,11 @@ -import { Database } from "better-sqlite3"; +import type { Database } from "better-sqlite3"; import { v4 as uuidv4 } from "uuid"; import { - VerifiableLog, - VerifiableAgent, + type VerifiableLog, + type VerifiableAgent, VerifiableDAO, - VerifiableLogQuery, - PageQuery, + type VerifiableLogQuery, + type PageQuery, } from "../types/logTypes.ts"; export class SQLite3VerifiableDAO extends VerifiableDAO { diff --git a/packages/plugin-tee-verifiable-log/src/index.ts b/packages/plugin-tee-verifiable-log/src/index.ts index 7670b90fba6..c9b42c904b7 100644 --- a/packages/plugin-tee-verifiable-log/src/index.ts +++ b/packages/plugin-tee-verifiable-log/src/index.ts @@ -1,10 +1,10 @@ -import { IAgentRuntime, type Plugin, Service, ServiceType } from "@elizaos/core"; +import { type IAgentRuntime, type Plugin, Service, ServiceType } from "@elizaos/core"; import { VerifiableLogProvider } from "./providers/verifiableLogProvider.ts"; import { SQLite3VerifiableDAO } from "./adapters/sqliteVerifiableDAO.ts"; import { PageQuery, VerifiableAgent, - VerifiableDAO, + type VerifiableDAO, VerifiableLog, VerifiableLogQuery, } from "./types/logTypes.ts"; @@ -25,7 +25,7 @@ export class VerifiableLogService extends Service { private verifiableDAO: VerifiableDAO; private teeMode: string; - private vlogOpen: boolean = false; + private vlogOpen = false; // Add abstract initialize method that must be implemented by derived classes async initialize(runtime: IAgentRuntime): Promise { diff --git a/packages/plugin-tee-verifiable-log/src/providers/verifiableLogProvider.ts b/packages/plugin-tee-verifiable-log/src/providers/verifiableLogProvider.ts index 248e71ddcf2..f925c8161e0 100644 --- a/packages/plugin-tee-verifiable-log/src/providers/verifiableLogProvider.ts +++ b/packages/plugin-tee-verifiable-log/src/providers/verifiableLogProvider.ts @@ -1,5 +1,5 @@ import { elizaLogger } from "@elizaos/core"; -import { +import type { IVerifiableLogProvider, VerifiableAgent, VerifiableDAO, @@ -8,12 +8,12 @@ import { import { DeriveKeyProvider, RemoteAttestationProvider, - RemoteAttestationQuote, + type RemoteAttestationQuote, } from "@elizaos/plugin-tee"; export class VerifiableLogProvider implements IVerifiableLogProvider { private dao: VerifiableDAO; - private keyPath: string = "/keys/verifiable_key"; + private keyPath = "/keys/verifiable_key"; private remoteAttestationProvider: RemoteAttestationProvider; private provider: DeriveKeyProvider; @@ -33,7 +33,7 @@ export class VerifiableLogProvider implements IVerifiableLogProvider { }, subject: string ): Promise { - let singed: string = ""; + let singed = ""; try { const evmKeypair = await this.provider.deriveEcdsaKeypair( diff --git a/packages/plugin-tee-verifiable-log/src/test/providers.test.ts b/packages/plugin-tee-verifiable-log/src/test/providers.test.ts index b3d75200d1a..3e93720e95c 100644 --- a/packages/plugin-tee-verifiable-log/src/test/providers.test.ts +++ b/packages/plugin-tee-verifiable-log/src/test/providers.test.ts @@ -5,7 +5,7 @@ import type { Database as DatabaseType } from "better-sqlite3"; import { v4 as uuidv4 } from "uuid"; import os from "os"; import path from "path"; -import { +import type { VerifiableAgent, VerifiableLog, VerifiableLogQuery, diff --git a/packages/plugin-tee/src/actions/remoteAttestation.ts b/packages/plugin-tee/src/actions/remoteAttestation.ts index 40f05b901fc..dd80e051c80 100644 --- a/packages/plugin-tee/src/actions/remoteAttestation.ts +++ b/packages/plugin-tee/src/actions/remoteAttestation.ts @@ -1,7 +1,7 @@ import type { IAgentRuntime, Memory, State, HandlerCallback } from "@elizaos/core"; import { RemoteAttestationProvider } from "../providers/remoteAttestationProvider"; import { fetch, type BodyInit } from "undici"; -import { RemoteAttestationMessage } from "../types/tee"; +import type { RemoteAttestationMessage } from "../types/tee"; function hexToUint8Array(hex: string) { hex = hex.trim(); @@ -17,7 +17,7 @@ function hexToUint8Array(hex: string) { const array = new Uint8Array(hex.length / 2); for (let i = 0; i < hex.length; i += 2) { - const byte = parseInt(hex.slice(i, i + 2), 16); + const byte = Number.parseInt(hex.slice(i, i + 2), 16); if (isNaN(byte)) { throw new Error("Invalid hex string"); } diff --git a/packages/plugin-tee/src/index.ts b/packages/plugin-tee/src/index.ts index 4ebc26b1b7e..09880da52fe 100644 --- a/packages/plugin-tee/src/index.ts +++ b/packages/plugin-tee/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { remoteAttestationProvider } from "./providers/remoteAttestationProvider"; import { deriveKeyProvider } from "./providers/deriveKeyProvider"; import { remoteAttestationAction } from "./actions/remoteAttestation"; diff --git a/packages/plugin-tee/src/providers/deriveKeyProvider.ts b/packages/plugin-tee/src/providers/deriveKeyProvider.ts index cf6cfd45929..8c533adea59 100644 --- a/packages/plugin-tee/src/providers/deriveKeyProvider.ts +++ b/packages/plugin-tee/src/providers/deriveKeyProvider.ts @@ -1,17 +1,17 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; import { Keypair } from "@solana/web3.js"; import crypto from "crypto"; -import { DeriveKeyResponse, TappdClient } from "@phala/dstack-sdk"; +import { type DeriveKeyResponse, TappdClient } from "@phala/dstack-sdk"; import { privateKeyToAccount } from "viem/accounts"; -import { PrivateKeyAccount, keccak256 } from "viem"; +import { type PrivateKeyAccount, keccak256 } from "viem"; import { RemoteAttestationProvider } from "./remoteAttestationProvider"; -import { TEEMode, RemoteAttestationQuote, DeriveKeyAttestationData } from "../types/tee"; +import { TEEMode, type RemoteAttestationQuote, type DeriveKeyAttestationData } from "../types/tee"; class DeriveKeyProvider { private client: TappdClient; diff --git a/packages/plugin-tee/src/providers/remoteAttestationProvider.ts b/packages/plugin-tee/src/providers/remoteAttestationProvider.ts index fb9c174713d..478ff26a5f9 100644 --- a/packages/plugin-tee/src/providers/remoteAttestationProvider.ts +++ b/packages/plugin-tee/src/providers/remoteAttestationProvider.ts @@ -1,12 +1,12 @@ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; -import { TdxQuoteResponse, TappdClient, TdxQuoteHashAlgorithms } from "@phala/dstack-sdk"; -import { RemoteAttestationQuote, TEEMode, RemoteAttestationMessage } from "../types/tee"; +import { type TdxQuoteResponse, TappdClient, type TdxQuoteHashAlgorithms } from "@phala/dstack-sdk"; +import { type RemoteAttestationQuote, TEEMode, type RemoteAttestationMessage } from "../types/tee"; class RemoteAttestationProvider { private client: TappdClient; diff --git a/packages/plugin-tee/src/providers/walletProvider.ts b/packages/plugin-tee/src/providers/walletProvider.ts index 0d08c0e07bf..5177a7dd703 100644 --- a/packages/plugin-tee/src/providers/walletProvider.ts +++ b/packages/plugin-tee/src/providers/walletProvider.ts @@ -1,16 +1,16 @@ /* This is an example of how WalletProvider can use DeriveKeyProvider to generate a Solana Keypair */ import { - IAgentRuntime, - Memory, - Provider, - State, + type IAgentRuntime, + type Memory, + type Provider, + type State, elizaLogger, } from "@elizaos/core"; -import { Connection, Keypair, PublicKey } from "@solana/web3.js"; +import { Connection, type Keypair, type PublicKey } from "@solana/web3.js"; import BigNumber from "bignumber.js"; import NodeCache from "node-cache"; import { DeriveKeyProvider } from "./deriveKeyProvider"; -import { RemoteAttestationQuote } from "../types/tee"; +import type { RemoteAttestationQuote } from "../types/tee"; // Provider configuration const PROVIDER_CONFIG = { BIRDEYE_API: "https://public-api.birdeye.so", diff --git a/packages/plugin-thirdweb/src/actions/chat.ts b/packages/plugin-thirdweb/src/actions/chat.ts index 16d558a4e19..9b0f12be195 100644 --- a/packages/plugin-thirdweb/src/actions/chat.ts +++ b/packages/plugin-thirdweb/src/actions/chat.ts @@ -1,9 +1,9 @@ import { elizaLogger, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, type Action, } from "@elizaos/core"; diff --git a/packages/plugin-thirdweb/src/index.ts b/packages/plugin-thirdweb/src/index.ts index 49bbe528abb..6d5e0659e2e 100644 --- a/packages/plugin-thirdweb/src/index.ts +++ b/packages/plugin-thirdweb/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { blockchainChatAction } from "./actions/chat"; export * as actions from "./actions/index.ts"; diff --git a/packages/plugin-ton/src/actions/transfer.ts b/packages/plugin-ton/src/actions/transfer.ts index 15d039742a5..1ae56b1f206 100644 --- a/packages/plugin-ton/src/actions/transfer.ts +++ b/packages/plugin-ton/src/actions/transfer.ts @@ -1,8 +1,8 @@ import { elizaLogger, composeContext, - Content, - HandlerCallback, + type Content, + type HandlerCallback, ModelClass, generateObject, type IAgentRuntime, @@ -13,7 +13,7 @@ import { z } from "zod"; import { initWalletProvider, - WalletProvider, + type WalletProvider, nativeWalletProvider, } from "../providers/wallet"; import { internal } from "@ton/ton"; diff --git a/packages/plugin-ton/src/enviroment.ts b/packages/plugin-ton/src/enviroment.ts index 47c883d9721..41ef0bbe31c 100644 --- a/packages/plugin-ton/src/enviroment.ts +++ b/packages/plugin-ton/src/enviroment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { z } from "zod"; export const envSchema = z.object({ diff --git a/packages/plugin-ton/src/index.ts b/packages/plugin-ton/src/index.ts index 36527b5d3d0..ef576da962e 100644 --- a/packages/plugin-ton/src/index.ts +++ b/packages/plugin-ton/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import transferAction from "./actions/transfer.ts"; import { WalletProvider, nativeWalletProvider } from "./providers/wallet.ts"; diff --git a/packages/plugin-ton/src/providers/wallet.ts b/packages/plugin-ton/src/providers/wallet.ts index a06e986a752..17a822199c0 100644 --- a/packages/plugin-ton/src/providers/wallet.ts +++ b/packages/plugin-ton/src/providers/wallet.ts @@ -1,4 +1,4 @@ -import { +import type { IAgentRuntime, ICacheManager, Memory, @@ -7,7 +7,7 @@ import { } from "@elizaos/core"; import { TonClient, WalletContractV4 } from "@ton/ton"; -import { KeyPair, mnemonicToPrivateKey } from "@ton/crypto"; +import { type KeyPair, mnemonicToPrivateKey } from "@ton/crypto"; import NodeCache from "node-cache"; import * as path from "path"; @@ -39,7 +39,7 @@ export class WalletProvider { keypair: KeyPair; wallet: WalletContractV4; private cache: NodeCache; - private cacheKey: string = "ton/wallet"; + private cacheKey = "ton/wallet"; // reqiure hex private key constructor( diff --git a/packages/plugin-ton/src/tests/wallet.test.ts b/packages/plugin-ton/src/tests/wallet.test.ts index 2d9226c3343..37c8fa3a287 100644 --- a/packages/plugin-ton/src/tests/wallet.test.ts +++ b/packages/plugin-ton/src/tests/wallet.test.ts @@ -12,7 +12,7 @@ import { import BigNumber from "bignumber.js"; import { WalletProvider } from "../providers/wallet"; -import { mnemonicNew, mnemonicToPrivateKey, KeyPair } from "@ton/crypto"; +import { mnemonicNew, mnemonicToPrivateKey, type KeyPair } from "@ton/crypto"; // Mock NodeCache vi.mock("node-cache", () => { diff --git a/packages/plugin-trustdb/src/adapters/trustScoreDatabase.ts b/packages/plugin-trustdb/src/adapters/trustScoreDatabase.ts index d612cecc577..6388c3fa813 100644 --- a/packages/plugin-trustdb/src/adapters/trustScoreDatabase.ts +++ b/packages/plugin-trustdb/src/adapters/trustScoreDatabase.ts @@ -1,4 +1,4 @@ -import { Database } from "better-sqlite3"; +import type { Database } from "better-sqlite3"; import { v4 as uuidv4 } from "uuid"; export interface Recommender { diff --git a/packages/plugin-tts/src/index.ts b/packages/plugin-tts/src/index.ts index 0206ae8fb34..68357815528 100644 --- a/packages/plugin-tts/src/index.ts +++ b/packages/plugin-tts/src/index.ts @@ -1,5 +1,5 @@ import { elizaLogger } from "@elizaos/core"; -import { +import type { Action, HandlerCallback, IAgentRuntime, diff --git a/packages/plugin-twitter/__tests__/post.test.ts b/packages/plugin-twitter/__tests__/post.test.ts index fe6a6be3e6f..0bb2e6affc8 100644 --- a/packages/plugin-twitter/__tests__/post.test.ts +++ b/packages/plugin-twitter/__tests__/post.test.ts @@ -1,9 +1,9 @@ import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest'; import { postAction } from '../src/actions/post'; -import { ModelClass, IAgentRuntime, Memory, State, generateObject } from '@elizaos/core'; +import { ModelClass, type IAgentRuntime, type Memory, type State, generateObject } from '@elizaos/core'; import { TweetContent, TweetSchema } from '../src/types'; import { tweetTemplate } from '../src/templates'; -import { UUID } from '../../core/src/types'; +import type { UUID } from '../../core/src/types'; // Mock @elizaos/core vi.mock('@elizaos/core', async () => { diff --git a/packages/plugin-twitter/src/actions/post.ts b/packages/plugin-twitter/src/actions/post.ts index 4bd3e86e80f..666530eda19 100644 --- a/packages/plugin-twitter/src/actions/post.ts +++ b/packages/plugin-twitter/src/actions/post.ts @@ -1,8 +1,8 @@ import { - Action, - IAgentRuntime, - Memory, - State, + type Action, + type IAgentRuntime, + type Memory, + type State, composeContext, elizaLogger, ModelClass, diff --git a/packages/plugin-twitter/src/index.ts b/packages/plugin-twitter/src/index.ts index ec979236ab0..908fb0a8078 100644 --- a/packages/plugin-twitter/src/index.ts +++ b/packages/plugin-twitter/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { postAction } from "./actions/post"; export const twitterPlugin: Plugin = { diff --git a/packages/plugin-video-generation/src/index.ts b/packages/plugin-video-generation/src/index.ts index edadaa486f7..6697ad8829b 100644 --- a/packages/plugin-video-generation/src/index.ts +++ b/packages/plugin-video-generation/src/index.ts @@ -1,5 +1,5 @@ import { elizaLogger } from "@elizaos/core"; -import { +import type { Action, HandlerCallback, IAgentRuntime, diff --git a/packages/plugin-web-search/src/actions/webSearch.ts b/packages/plugin-web-search/src/actions/webSearch.ts index 1cee2215090..9bc69d79fa5 100644 --- a/packages/plugin-web-search/src/actions/webSearch.ts +++ b/packages/plugin-web-search/src/actions/webSearch.ts @@ -1,14 +1,14 @@ import { - Action, - HandlerCallback, - IAgentRuntime, - Memory, - State, + type Action, + type HandlerCallback, + type IAgentRuntime, + type Memory, + type State, elizaLogger } from "@elizaos/core"; -import { encodingForModel, TiktokenModel } from "js-tiktoken"; +import { encodingForModel, type TiktokenModel } from "js-tiktoken"; import { WebSearchService } from "../services/webSearchService"; -import { SearchResult } from "../types"; +import type { SearchResult } from "../types"; const DEFAULT_MAX_WEB_SEARCH_TOKENS = 4000; const DEFAULT_MODEL_ENCODING = "gpt-3.5-turbo"; diff --git a/packages/plugin-web-search/src/index.ts b/packages/plugin-web-search/src/index.ts index 7d412611ec6..4fbd6ce0259 100644 --- a/packages/plugin-web-search/src/index.ts +++ b/packages/plugin-web-search/src/index.ts @@ -1,5 +1,5 @@ import { webSearch } from "./actions/webSearch"; -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { WebSearchService } from "./services/webSearchService"; export const webSearchPlugin: Plugin = { diff --git a/packages/plugin-web-search/src/services/webSearchService.ts b/packages/plugin-web-search/src/services/webSearchService.ts index bf55329ba88..12ece8080a6 100644 --- a/packages/plugin-web-search/src/services/webSearchService.ts +++ b/packages/plugin-web-search/src/services/webSearchService.ts @@ -1,10 +1,10 @@ import { Service, - IAgentRuntime, + type IAgentRuntime, ServiceType, } from "@elizaos/core"; import { tavily } from "@tavily/core"; -import { IWebSearchService, SearchOptions, SearchResponse } from "../types"; +import type { IWebSearchService, SearchOptions, SearchResponse } from "../types"; export type TavilyClient = ReturnType; // declaring manually because orginal package does not export its types diff --git a/packages/plugin-web-search/src/types.ts b/packages/plugin-web-search/src/types.ts index e782b9979a3..1e098057b18 100644 --- a/packages/plugin-web-search/src/types.ts +++ b/packages/plugin-web-search/src/types.ts @@ -1,4 +1,4 @@ -import { Service } from "@elizaos/core"; +import type { Service } from "@elizaos/core"; export interface IWebSearchService extends Service { search( diff --git a/packages/plugin-whatsapp/src/client.ts b/packages/plugin-whatsapp/src/client.ts index 0656b639083..072acfec5ec 100644 --- a/packages/plugin-whatsapp/src/client.ts +++ b/packages/plugin-whatsapp/src/client.ts @@ -1,5 +1,5 @@ -import axios, { AxiosInstance } from "axios"; -import { WhatsAppConfig, WhatsAppMessage } from "./types"; +import axios, { type AxiosInstance } from "axios"; +import type { WhatsAppConfig, WhatsAppMessage } from "./types"; export class WhatsAppClient { private client: AxiosInstance; diff --git a/packages/plugin-whatsapp/src/handlers/message.handler.ts b/packages/plugin-whatsapp/src/handlers/message.handler.ts index c0ac08e8559..f7d1fe91204 100644 --- a/packages/plugin-whatsapp/src/handlers/message.handler.ts +++ b/packages/plugin-whatsapp/src/handlers/message.handler.ts @@ -1,5 +1,5 @@ -import { WhatsAppClient } from "../client"; -import { WhatsAppMessage } from "../types"; +import type { WhatsAppClient } from "../client"; +import type { WhatsAppMessage } from "../types"; export class MessageHandler { constructor(private client: WhatsAppClient) {} diff --git a/packages/plugin-whatsapp/src/handlers/webhook.handler.ts b/packages/plugin-whatsapp/src/handlers/webhook.handler.ts index cf7dc73ae18..e1e336b0d12 100644 --- a/packages/plugin-whatsapp/src/handlers/webhook.handler.ts +++ b/packages/plugin-whatsapp/src/handlers/webhook.handler.ts @@ -1,5 +1,5 @@ -import { WhatsAppClient } from "../client"; -import { WhatsAppWebhookEvent } from "../types"; +import type { WhatsAppClient } from "../client"; +import type { WhatsAppWebhookEvent } from "../types"; export class WebhookHandler { constructor(private client: WhatsAppClient) {} diff --git a/packages/plugin-whatsapp/src/index.ts b/packages/plugin-whatsapp/src/index.ts index b4c12ac458f..82a20ffd41e 100644 --- a/packages/plugin-whatsapp/src/index.ts +++ b/packages/plugin-whatsapp/src/index.ts @@ -1,6 +1,6 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { WhatsAppClient } from "./client"; -import { WhatsAppConfig, WhatsAppMessage, WhatsAppWebhookEvent } from "./types"; +import type { WhatsAppConfig, WhatsAppMessage, WhatsAppWebhookEvent } from "./types"; import { MessageHandler, WebhookHandler } from "./handlers"; export class WhatsAppPlugin implements Plugin { diff --git a/packages/plugin-whatsapp/src/utils/validators.ts b/packages/plugin-whatsapp/src/utils/validators.ts index f76f5496916..17f7a753f42 100644 --- a/packages/plugin-whatsapp/src/utils/validators.ts +++ b/packages/plugin-whatsapp/src/utils/validators.ts @@ -1,4 +1,4 @@ -import { WhatsAppMessage, WhatsAppTemplate, WhatsAppConfig } from "../types"; +import type { WhatsAppMessage, WhatsAppTemplate, WhatsAppConfig } from "../types"; export function validateConfig(config: WhatsAppConfig): void { if (!config.accessToken) { diff --git a/packages/plugin-zksync-era/src/actions/transferAction.ts b/packages/plugin-zksync-era/src/actions/transferAction.ts index cab5279ea2d..968fa0112b8 100644 --- a/packages/plugin-zksync-era/src/actions/transferAction.ts +++ b/packages/plugin-zksync-era/src/actions/transferAction.ts @@ -1,12 +1,12 @@ import type { Action } from "@elizaos/core"; import { - ActionExample, - Content, - HandlerCallback, - IAgentRuntime, - Memory, + type ActionExample, + type Content, + type HandlerCallback, + type IAgentRuntime, + type Memory, ModelClass, - State, + type State, elizaLogger, composeContext, generateObject, @@ -14,7 +14,7 @@ import { import { validateZKsyncConfig } from "../enviroment"; import { - Address, + type Address, erc20Abi, http, isAddress, diff --git a/packages/plugin-zksync-era/src/enviroment.ts b/packages/plugin-zksync-era/src/enviroment.ts index b5da1b1202e..4bfb2c0e0f9 100644 --- a/packages/plugin-zksync-era/src/enviroment.ts +++ b/packages/plugin-zksync-era/src/enviroment.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import { isAddress } from "viem"; import { z } from "zod"; diff --git a/packages/plugin-zksync-era/src/hooks/useGetAccount.ts b/packages/plugin-zksync-era/src/hooks/useGetAccount.ts index d719a0928cc..14f0f10ff88 100644 --- a/packages/plugin-zksync-era/src/hooks/useGetAccount.ts +++ b/packages/plugin-zksync-era/src/hooks/useGetAccount.ts @@ -1,4 +1,4 @@ -import { IAgentRuntime } from "@elizaos/core"; +import type { IAgentRuntime } from "@elizaos/core"; import type { PrivateKeyAccount } from "viem/accounts"; import { privateKeyToAccount } from "viem/accounts"; diff --git a/packages/plugin-zksync-era/src/index.ts b/packages/plugin-zksync-era/src/index.ts index 69bc73df2e9..222f839f505 100644 --- a/packages/plugin-zksync-era/src/index.ts +++ b/packages/plugin-zksync-era/src/index.ts @@ -1,4 +1,4 @@ -import { Plugin } from "@elizaos/core"; +import type { Plugin } from "@elizaos/core"; import { TransferAction } from "./actions/"; diff --git a/packages/plugin-zksync-era/src/utils/validateContext.ts b/packages/plugin-zksync-era/src/utils/validateContext.ts index 7b6133403ae..72e19a906de 100644 --- a/packages/plugin-zksync-era/src/utils/validateContext.ts +++ b/packages/plugin-zksync-era/src/utils/validateContext.ts @@ -1,4 +1,4 @@ -import { TransferContent } from "../actions/"; +import type { TransferContent } from "../actions/"; import { isAddress } from "viem"; export class ValidateContext { diff --git a/scripts/jsdoc-automation/src/AIService/AIService.ts b/scripts/jsdoc-automation/src/AIService/AIService.ts index ee6582766c0..22628bc8e2b 100644 --- a/scripts/jsdoc-automation/src/AIService/AIService.ts +++ b/scripts/jsdoc-automation/src/AIService/AIService.ts @@ -1,6 +1,6 @@ import { ChatOpenAI } from "@langchain/openai"; import dotenv from "dotenv"; -import { Configuration } from "../Configuration.js"; +import type { Configuration } from "../Configuration.js"; import { TypeScriptParser } from "../TypeScriptParser.js"; import { CodeFormatter } from "./utils/CodeFormatter.js"; import { DocumentOrganizer } from "./utils/DocumentOrganizer.js"; @@ -39,7 +39,7 @@ export class AIService { * @param {string} prompt - The prompt for which to generate a comment * @returns {Promise} The generated comment */ - public async generateComment(prompt: string, isFAQ: boolean = false): Promise { + public async generateComment(prompt: string, isFAQ = false): Promise { try { // First try with generous limit let finalPrompt = prompt; diff --git a/scripts/jsdoc-automation/src/AIService/generators/FullDocumentationGenerator.ts b/scripts/jsdoc-automation/src/AIService/generators/FullDocumentationGenerator.ts index 2adc503f643..7f6675b4420 100644 --- a/scripts/jsdoc-automation/src/AIService/generators/FullDocumentationGenerator.ts +++ b/scripts/jsdoc-automation/src/AIService/generators/FullDocumentationGenerator.ts @@ -1,11 +1,11 @@ -import { ASTQueueItem, EnvUsage, PluginDocumentation, TodoItem, TodoSection } from "../../types"; -import { Configuration } from "../../Configuration.js"; +import type { ASTQueueItem, EnvUsage, PluginDocumentation, TodoItem, TodoSection } from "../../types"; +import type { Configuration } from "../../Configuration.js"; import { TypeScriptParser } from "../../TypeScriptParser.js"; import { CodeFormatter } from "../utils/CodeFormatter.js"; import { DocumentOrganizer } from "../utils/DocumentOrganizer.js"; import path from "path"; import { PROMPT_TEMPLATES } from "../../utils/prompts"; -import { FileDocsGroup, OrganizedDocs } from "../types"; +import type { FileDocsGroup, OrganizedDocs } from "../types"; import { AIService } from "../AIService.js"; import { promises as fs } from "fs"; @@ -169,7 +169,7 @@ export class FullDocumentationGenerator { this.configuration.absolutePath, "src/index.ts" ); - let mainExport = "plugin"; + const mainExport = "plugin"; let exportName = packageJson.name.split("/").pop() + "Plugin"; try { diff --git a/scripts/jsdoc-automation/src/AIService/types/index.ts b/scripts/jsdoc-automation/src/AIService/types/index.ts index 060c2fffb56..7d830904c0d 100644 --- a/scripts/jsdoc-automation/src/AIService/types/index.ts +++ b/scripts/jsdoc-automation/src/AIService/types/index.ts @@ -1,4 +1,4 @@ -import { ASTQueueItem } from "../../types"; +import type { ASTQueueItem } from "../../types"; export interface FileDocsGroup { filePath: string; diff --git a/scripts/jsdoc-automation/src/AIService/utils/CodeFormatter.ts b/scripts/jsdoc-automation/src/AIService/utils/CodeFormatter.ts index 6fb7cfac9d3..2d1fa1febe6 100644 --- a/scripts/jsdoc-automation/src/AIService/utils/CodeFormatter.ts +++ b/scripts/jsdoc-automation/src/AIService/utils/CodeFormatter.ts @@ -1,4 +1,4 @@ -import { FileDocsGroup } from "../types"; +import type { FileDocsGroup } from "../types"; export class CodeFormatter { @@ -154,7 +154,7 @@ export class CodeFormatter { return docSection; } - public truncateCodeBlock(code: string, maxLength: number = 8000): string { + public truncateCodeBlock(code: string, maxLength = 8000): string { if (code.length <= maxLength) return code; // Extract code blocks diff --git a/scripts/jsdoc-automation/src/AIService/utils/DocumentOrganizer.ts b/scripts/jsdoc-automation/src/AIService/utils/DocumentOrganizer.ts index 9b0c78c00de..bd05575a5cb 100644 --- a/scripts/jsdoc-automation/src/AIService/utils/DocumentOrganizer.ts +++ b/scripts/jsdoc-automation/src/AIService/utils/DocumentOrganizer.ts @@ -1,5 +1,5 @@ -import { ASTQueueItem } from "../../types"; -import { FileDocsGroup, OrganizedDocs } from "../types"; +import type { ASTQueueItem } from "../../types"; +import type { FileDocsGroup, OrganizedDocs } from "../types"; export class DocumentOrganizer { diff --git a/scripts/jsdoc-automation/src/Configuration.ts b/scripts/jsdoc-automation/src/Configuration.ts index f8f4de5803d..fb74b5c13ab 100644 --- a/scripts/jsdoc-automation/src/Configuration.ts +++ b/scripts/jsdoc-automation/src/Configuration.ts @@ -4,7 +4,7 @@ import * as yaml from "yaml"; import * as path from "path"; import { fileURLToPath } from "url"; import { dirname, join } from "path"; -import { Repository } from "./types/index.js"; +import type { Repository } from "./types/index.js"; const __dirname = dirname(fileURLToPath(import.meta.url)); @@ -38,9 +38,9 @@ interface ConfigurationData { export class Configuration implements Omit { private _rootDirectory!: ConfigurationData["rootDirectory"]; private readonly repoRoot: string; - private _branch: string = "develop"; - private _generateJsDoc: boolean = true; - private _generateReadme: boolean = false; + private _branch = "develop"; + private _generateJsDoc = true; + private _generateReadme = false; public excludedDirectories: string[] = []; public repository: Repository = { @@ -48,9 +48,9 @@ export class Configuration implements Omit { name: "eliza", pullNumber: undefined, }; - public commitMessage: string = "Generated JSDoc comments"; - public pullRequestTitle: string = "JSDoc Generation"; - public pullRequestDescription: string = + public commitMessage = "Generated JSDoc comments"; + public pullRequestTitle = "JSDoc Generation"; + public pullRequestDescription = "Automated JSDoc generation for the codebase"; public pullRequestLabels: string[] = ["documentation", "automated-pr"]; public pullRequestReviewers: string[] = []; @@ -171,7 +171,7 @@ export class Configuration implements Omit { "Setting pull number from env:", process.env.INPUT_PULL_NUMBER ); - this.repository.pullNumber = parseInt( + this.repository.pullNumber = Number.parseInt( process.env.INPUT_PULL_NUMBER ); } diff --git a/scripts/jsdoc-automation/src/DirectoryTraversal.ts b/scripts/jsdoc-automation/src/DirectoryTraversal.ts index a4860fcdf0b..7b80e400714 100644 --- a/scripts/jsdoc-automation/src/DirectoryTraversal.ts +++ b/scripts/jsdoc-automation/src/DirectoryTraversal.ts @@ -1,6 +1,6 @@ import * as fs from "fs"; import * as path from "path"; -import { Configuration } from "./Configuration.js"; +import type { Configuration } from "./Configuration.js"; /** * DirectoryTraversal class for traversing through directories and files. diff --git a/scripts/jsdoc-automation/src/DocumentationGenerator.ts b/scripts/jsdoc-automation/src/DocumentationGenerator.ts index 275019f516a..4de6fc837b5 100644 --- a/scripts/jsdoc-automation/src/DocumentationGenerator.ts +++ b/scripts/jsdoc-automation/src/DocumentationGenerator.ts @@ -1,20 +1,20 @@ -import { DirectoryTraversal } from "./DirectoryTraversal.js"; -import { TypeScriptParser } from "./TypeScriptParser.js"; -import { JsDocAnalyzer } from "./JsDocAnalyzer.js"; -import { JsDocGenerator } from "./JsDocGenerator.js"; +import type { DirectoryTraversal } from "./DirectoryTraversal.js"; +import type { TypeScriptParser } from "./TypeScriptParser.js"; +import type { JsDocAnalyzer } from "./JsDocAnalyzer.js"; +import type { JsDocGenerator } from "./JsDocGenerator.js"; import type { TSESTree } from "@typescript-eslint/types"; -import { +import type { ASTQueueItem, EnvUsage, FullModeFileChange, PrModeFileChange, TodoItem, } from "./types/index.js"; -import { GitManager } from "./GitManager.js"; +import type { GitManager } from "./GitManager.js"; import fs from "fs"; -import { Configuration } from "./Configuration.js"; +import type { Configuration } from "./Configuration.js"; import path from "path"; -import { AIService } from "./AIService/AIService.js"; +import type { AIService } from "./AIService/AIService.js"; import { PluginDocumentationGenerator } from "./PluginDocumentationGenerator.js"; import { JSDocValidator } from "./JSDocValidator.js"; @@ -25,9 +25,9 @@ import { JSDocValidator } from "./JSDocValidator.js"; export class DocumentationGenerator { public missingJsDocQueue: ASTQueueItem[] = []; public existingJsDocQueue: ASTQueueItem[] = []; - private hasChanges: boolean = false; + private hasChanges = false; private fileContents: Map = new Map(); - public branchName: string = ""; + public branchName = ""; private fileOffsets: Map = new Map(); private typeScriptFiles: string[] = []; private jsDocValidator: JSDocValidator; diff --git a/scripts/jsdoc-automation/src/GitManager.ts b/scripts/jsdoc-automation/src/GitManager.ts index 0c8f8fac4b4..7eec959e95e 100644 --- a/scripts/jsdoc-automation/src/GitManager.ts +++ b/scripts/jsdoc-automation/src/GitManager.ts @@ -1,5 +1,5 @@ import { Octokit } from "@octokit/rest"; -import { PrModeFileChange, Repository } from "./types/index.js"; +import type { PrModeFileChange, Repository } from "./types/index.js"; import dotenv from "dotenv"; dotenv.config(); diff --git a/scripts/jsdoc-automation/src/JSDocValidator.ts b/scripts/jsdoc-automation/src/JSDocValidator.ts index fdba99b8e6e..e7beba3fa48 100644 --- a/scripts/jsdoc-automation/src/JSDocValidator.ts +++ b/scripts/jsdoc-automation/src/JSDocValidator.ts @@ -1,5 +1,5 @@ -import { parse, ParserOptions } from "@typescript-eslint/parser"; -import { AIService } from "./AIService/AIService.js"; +import { parse, type ParserOptions } from "@typescript-eslint/parser"; +import type { AIService } from "./AIService/AIService.js"; export class JSDocValidator { private parserOptions: ParserOptions = { diff --git a/scripts/jsdoc-automation/src/JsDocAnalyzer.ts b/scripts/jsdoc-automation/src/JsDocAnalyzer.ts index 4915ece1869..46a18b3c470 100644 --- a/scripts/jsdoc-automation/src/JsDocAnalyzer.ts +++ b/scripts/jsdoc-automation/src/JsDocAnalyzer.ts @@ -1,6 +1,6 @@ import type { TSESTree } from "@typescript-eslint/types"; -import { TypeScriptParser } from "./TypeScriptParser.js"; -import { ASTQueueItem, EnvUsage, TodoItem } from "./types/index.js"; +import type { TypeScriptParser } from "./TypeScriptParser.js"; +import type { ASTQueueItem, EnvUsage, TodoItem } from "./types/index.js"; type AST_NODE_TYPES = { ClassDeclaration: "ClassDeclaration"; @@ -79,7 +79,7 @@ export class JsDocAnalyzer { /** * Checks if a node spans more than the specified number of lines */ - private isLongEnough(node: TSESTree.Node, minLines: number = 10): boolean { + private isLongEnough(node: TSESTree.Node, minLines = 10): boolean { if (!node.loc) return false; return (node.loc.end.line - node.loc.start.line) > minLines; } @@ -755,7 +755,7 @@ export class JsDocAnalyzer { lineNumber: number ): TSESTree.Node | undefined { let nearestNode: TSESTree.Node | undefined; - let smallestDistance = Infinity; + let smallestDistance = Number.POSITIVE_INFINITY; const traverse = (node: TSESTree.Node | null) => { if (!node) return; diff --git a/scripts/jsdoc-automation/src/JsDocGenerator.ts b/scripts/jsdoc-automation/src/JsDocGenerator.ts index 164c8cc9285..32516eef314 100644 --- a/scripts/jsdoc-automation/src/JsDocGenerator.ts +++ b/scripts/jsdoc-automation/src/JsDocGenerator.ts @@ -1,5 +1,5 @@ -import { AIService } from "./AIService/AIService.js"; -import { ASTQueueItem } from "./types/index.js"; +import type { AIService } from "./AIService/AIService.js"; +import type { ASTQueueItem } from "./types/index.js"; /** * A class that generates JSDoc comments for code snippets and classes. diff --git a/scripts/jsdoc-automation/src/PluginDocumentationGenerator.ts b/scripts/jsdoc-automation/src/PluginDocumentationGenerator.ts index ac81b624fbd..8ba5d5d8d60 100644 --- a/scripts/jsdoc-automation/src/PluginDocumentationGenerator.ts +++ b/scripts/jsdoc-automation/src/PluginDocumentationGenerator.ts @@ -1,12 +1,12 @@ -import { +import type { ASTQueueItem, PluginDocumentation, TodoItem, EnvUsage, } from "./types/index.js"; -import { AIService } from "./AIService/AIService.js"; -import { GitManager } from "./GitManager.js"; -import { Configuration } from "./Configuration.js"; +import type { AIService } from "./AIService/AIService.js"; +import type { GitManager } from "./GitManager.js"; +import type { Configuration } from "./Configuration.js"; import { FullDocumentationGenerator } from "./AIService/generators/FullDocumentationGenerator.js"; import fs from "fs"; import path from "path"; diff --git a/scripts/jsdoc-automation/src/TypeScriptParser.ts b/scripts/jsdoc-automation/src/TypeScriptParser.ts index db36fc86338..e19ceed9d86 100644 --- a/scripts/jsdoc-automation/src/TypeScriptParser.ts +++ b/scripts/jsdoc-automation/src/TypeScriptParser.ts @@ -1,6 +1,6 @@ import * as fs from "fs"; -import { parse, ParserOptions } from "@typescript-eslint/parser"; -import { ActionBounds, ActionMetadata } from "./types"; +import { parse, type ParserOptions } from "@typescript-eslint/parser"; +import { type ActionBounds, ActionMetadata } from "./types"; /** * A class for parsing TypeScript files. diff --git a/scripts/jsdoc-automation/src/types/index.ts b/scripts/jsdoc-automation/src/types/index.ts index 4453630f38f..86a2f0369ce 100644 --- a/scripts/jsdoc-automation/src/types/index.ts +++ b/scripts/jsdoc-automation/src/types/index.ts @@ -1,4 +1,4 @@ -import { TSESTree } from "@typescript-eslint/types"; +import type { TSESTree } from "@typescript-eslint/types"; export interface ASTQueueItem { name: string; diff --git a/scripts/jsdoc-automation/src/utils/prompts.ts b/scripts/jsdoc-automation/src/utils/prompts.ts index f1b35e5368c..5a7ac0a589f 100644 --- a/scripts/jsdoc-automation/src/utils/prompts.ts +++ b/scripts/jsdoc-automation/src/utils/prompts.ts @@ -1,4 +1,4 @@ -import { OrganizedDocs } from "../AIService/types"; +import type { OrganizedDocs } from "../AIService/types"; export const PROMPT_TEMPLATES = { overview: (packageJson: any, docs: OrganizedDocs) => ` From bdf7bfdf01e392fe448a0767de08f1386863c407 Mon Sep 17 00:00:00 2001 From: Sero <69639595+Seroxdesign@users.noreply.github.com> Date: Fri, 17 Jan 2025 07:16:45 -0500 Subject: [PATCH 5/7] warn --- packages/_examples/plugin/package.json | 3 +-- packages/adapter-pglite/package.json | 3 +-- packages/adapter-postgres/package.json | 3 +-- packages/adapter-redis/package.json | 3 +-- packages/adapter-sqlite/package.json | 3 +-- packages/adapter-sqljs/package.json | 3 +-- packages/adapter-supabase/package.json | 3 +-- packages/client-auto/package.json | 3 +-- packages/client-direct/package.json | 3 +-- packages/client-discord/package.json | 1 - packages/client-github/package.json | 1 - packages/client-slack/package.json | 1 - packages/client-telegram/package.json | 1 - packages/client-twitter/package.json | 1 - packages/core/package.json | 1 - packages/create-eliza-app/package.json | 1 - packages/plugin-3d-generation/package.json | 3 +-- packages/plugin-allora/package.json | 1 - packages/plugin-anyone/package.json | 3 +-- packages/plugin-aptos/package.json | 1 - packages/plugin-arthera/package.json | 3 +-- packages/plugin-asterai/package.json | 3 +-- packages/plugin-autonome/package.json | 1 - packages/plugin-avail/package.json | 3 +-- packages/plugin-avalanche/package.json | 3 +-- packages/plugin-b2/package.json | 1 - packages/plugin-birdeye/package.json | 1 - packages/plugin-bootstrap/package.json | 3 +-- packages/plugin-coinbase/package.json | 1 - packages/plugin-cosmos/package.json | 1 - packages/plugin-depin/package.json | 3 +-- packages/plugin-dexscreener/package.json | 3 +-- packages/plugin-evm/package.json | 3 +-- packages/plugin-flow/package.json | 1 - packages/plugin-fuel/package.json | 1 - packages/plugin-gitbook/package.json | 3 +-- packages/plugin-gitcoin-passport/package.json | 3 +-- packages/plugin-goplus/package.json | 3 +-- packages/plugin-hyperliquid/package.json | 3 +-- packages/plugin-image-generation/package.json | 3 +-- packages/plugin-injective/package.json | 1 - packages/plugin-iq6900/package.json | 3 +-- packages/plugin-irys/package.json | 1 - packages/plugin-letzai/package.json | 3 +-- packages/plugin-node/package.json | 1 - packages/plugin-open-weather/package.json | 3 +-- packages/plugin-sgx/package.json | 3 +-- packages/plugin-solana-agentkit/package.json | 1 - packages/plugin-solana/package.json | 1 - packages/plugin-squid-router/package.json | 3 +-- packages/plugin-starknet/package.json | 3 +-- packages/plugin-tee-log/package.json | 3 +-- packages/plugin-tee/package.json | 1 - packages/plugin-thirdweb/package.json | 3 +-- packages/plugin-trustdb/package.json | 3 +-- packages/plugin-tts/package.json | 3 +-- packages/plugin-video-generation/package.json | 3 +-- packages/plugin-whatsapp/package.json | 3 +-- scripts/update-biome-rules.mjs | 10 ++++++++++ 59 files changed, 46 insertions(+), 94 deletions(-) create mode 100644 scripts/update-biome-rules.mjs diff --git a/packages/_examples/plugin/package.json b/packages/_examples/plugin/package.json index b31f26179c5..dff917e5080 100644 --- a/packages/_examples/plugin/package.json +++ b/packages/_examples/plugin/package.json @@ -13,7 +13,6 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" } } diff --git a/packages/adapter-pglite/package.json b/packages/adapter-pglite/package.json index 746e4d9ad1f..0ab5513bc4e 100644 --- a/packages/adapter-pglite/package.json +++ b/packages/adapter-pglite/package.json @@ -27,8 +27,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/adapter-postgres/package.json b/packages/adapter-postgres/package.json index 6f60b6e37d5..b404005c3cb 100644 --- a/packages/adapter-postgres/package.json +++ b/packages/adapter-postgres/package.json @@ -30,7 +30,6 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" } } diff --git a/packages/adapter-redis/package.json b/packages/adapter-redis/package.json index 141233e7999..77d82f9360a 100644 --- a/packages/adapter-redis/package.json +++ b/packages/adapter-redis/package.json @@ -28,8 +28,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/adapter-sqlite/package.json b/packages/adapter-sqlite/package.json index 0381e3a4341..672f1d4748b 100644 --- a/packages/adapter-sqlite/package.json +++ b/packages/adapter-sqlite/package.json @@ -29,8 +29,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/adapter-sqljs/package.json b/packages/adapter-sqljs/package.json index 6701bae1784..72241baebb0 100644 --- a/packages/adapter-sqljs/package.json +++ b/packages/adapter-sqljs/package.json @@ -29,8 +29,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/adapter-supabase/package.json b/packages/adapter-supabase/package.json index 0ea64f5ac94..0805e2135a3 100644 --- a/packages/adapter-supabase/package.json +++ b/packages/adapter-supabase/package.json @@ -27,8 +27,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/client-auto/package.json b/packages/client-auto/package.json index 8f0774315eb..b19dd762f96 100644 --- a/packages/client-auto/package.json +++ b/packages/client-auto/package.json @@ -32,8 +32,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/client-direct/package.json b/packages/client-direct/package.json index f5dcd191964..7b93b2fc7a5 100644 --- a/packages/client-direct/package.json +++ b/packages/client-direct/package.json @@ -39,8 +39,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/client-discord/package.json b/packages/client-discord/package.json index a9cf164c4f5..84cbfb37310 100644 --- a/packages/client-discord/package.json +++ b/packages/client-discord/package.json @@ -36,7 +36,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "trustedDependencies": { diff --git a/packages/client-github/package.json b/packages/client-github/package.json index a740dc7fa59..724315b4b93 100644 --- a/packages/client-github/package.json +++ b/packages/client-github/package.json @@ -33,7 +33,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run", "test:watch": "vitest" } diff --git a/packages/client-slack/package.json b/packages/client-slack/package.json index 95d58c0f701..580bd6d6e45 100644 --- a/packages/client-slack/package.json +++ b/packages/client-slack/package.json @@ -23,7 +23,6 @@ "build": "tsup src/index.ts --format esm --dts", "test": "vitest run", "test:watch": "vitest", - "lint": "eslint --fix --cache .", "clean": "rimraf dist", "dev": "tsup src/index.ts --watch", "example": "ts-node src/examples/standalone-example.ts", diff --git a/packages/client-telegram/package.json b/packages/client-telegram/package.json index e75ae83c64f..3b72b555c3f 100644 --- a/packages/client-telegram/package.json +++ b/packages/client-telegram/package.json @@ -31,7 +31,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run", "test:watch": "vitest" } diff --git a/packages/client-twitter/package.json b/packages/client-twitter/package.json index 8345c09a7c5..caa9fea228d 100644 --- a/packages/client-twitter/package.json +++ b/packages/client-twitter/package.json @@ -33,7 +33,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run", "test:coverage": "vitest run --coverage" }, diff --git a/packages/core/package.json b/packages/core/package.json index 7d5598a0f89..f26b98b6859 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -21,7 +21,6 @@ ], "scripts": { "build": "tsup --format esm --dts", - "lint": "eslint --fix --cache .", "watch": "tsc --watch", "dev": "tsup --format esm --dts --watch", "build:docs": "cd docs && pnpm run build", diff --git a/packages/create-eliza-app/package.json b/packages/create-eliza-app/package.json index 368af499df2..5ad9730b437 100644 --- a/packages/create-eliza-app/package.json +++ b/packages/create-eliza-app/package.json @@ -12,7 +12,6 @@ }, "scripts": { "build": "unbuild", - "lint": "eslint --fix --cache .", "start": "node ./dist/index.cjs", "automd": "automd" }, diff --git a/packages/plugin-3d-generation/package.json b/packages/plugin-3d-generation/package.json index 5ff3b0941f5..b2b82e5a7da 100644 --- a/packages/plugin-3d-generation/package.json +++ b/packages/plugin-3d-generation/package.json @@ -25,8 +25,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-allora/package.json b/packages/plugin-allora/package.json index 287794d035a..afedaec9382 100644 --- a/packages/plugin-allora/package.json +++ b/packages/plugin-allora/package.json @@ -14,7 +14,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-anyone/package.json b/packages/plugin-anyone/package.json index 132ba2b94cd..946545fccec 100644 --- a/packages/plugin-anyone/package.json +++ b/packages/plugin-anyone/package.json @@ -12,8 +12,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-aptos/package.json b/packages/plugin-aptos/package.json index f0c0115a165..d4110619baa 100644 --- a/packages/plugin-aptos/package.json +++ b/packages/plugin-aptos/package.json @@ -29,7 +29,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-arthera/package.json b/packages/plugin-arthera/package.json index bd0abe44c79..7dcec07be98 100644 --- a/packages/plugin-arthera/package.json +++ b/packages/plugin-arthera/package.json @@ -12,8 +12,7 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "test": "vitest run", - "lint": "eslint --fix --cache ." + "test": "vitest run" }, "devDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-asterai/package.json b/packages/plugin-asterai/package.json index 27425ae808c..5024f4bf400 100644 --- a/packages/plugin-asterai/package.json +++ b/packages/plugin-asterai/package.json @@ -37,8 +37,7 @@ "scripts": { "lines": "find . \\( -name '*.cdc' -o -name '*.ts' \\) -not -path '*/node_modules/*' -not -path '*/tests/*' -not -path '*/deps/*' -not -path '*/dist/*' -not -path '*/imports*' | xargs wc -l", "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-autonome/package.json b/packages/plugin-autonome/package.json index c0af90d4d77..a82f5519c54 100644 --- a/packages/plugin-autonome/package.json +++ b/packages/plugin-autonome/package.json @@ -14,7 +14,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-avail/package.json b/packages/plugin-avail/package.json index 4d91cd4af40..d2a9e15b9e3 100644 --- a/packages/plugin-avail/package.json +++ b/packages/plugin-avail/package.json @@ -14,7 +14,6 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" } } diff --git a/packages/plugin-avalanche/package.json b/packages/plugin-avalanche/package.json index f614a99e79b..6d14670e94a 100644 --- a/packages/plugin-avalanche/package.json +++ b/packages/plugin-avalanche/package.json @@ -25,8 +25,7 @@ "tsup": "8.3.5" }, "scripts": { - "build": "tsup src/index.ts --format esm --no-dts", - "lint": "eslint --fix --cache ." + "build": "tsup src/index.ts --format esm --no-dts" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-b2/package.json b/packages/plugin-b2/package.json index 915c4034dda..8f3de1edfb1 100644 --- a/packages/plugin-b2/package.json +++ b/packages/plugin-b2/package.json @@ -28,7 +28,6 @@ "scripts": { "build": "tsup src/index.ts --format esm --no-dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-birdeye/package.json b/packages/plugin-birdeye/package.json index f8200dbc9b1..8779603b42c 100644 --- a/packages/plugin-birdeye/package.json +++ b/packages/plugin-birdeye/package.json @@ -21,7 +21,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-bootstrap/package.json b/packages/plugin-bootstrap/package.json index 54e370a1e92..55918709764 100644 --- a/packages/plugin-bootstrap/package.json +++ b/packages/plugin-bootstrap/package.json @@ -24,8 +24,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-coinbase/package.json b/packages/plugin-coinbase/package.json index be214da89c5..6dd1b50e326 100644 --- a/packages/plugin-coinbase/package.json +++ b/packages/plugin-coinbase/package.json @@ -34,7 +34,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run", "test:watch": "vitest" } diff --git a/packages/plugin-cosmos/package.json b/packages/plugin-cosmos/package.json index 1d25b8fb915..59880abedc0 100644 --- a/packages/plugin-cosmos/package.json +++ b/packages/plugin-cosmos/package.json @@ -19,7 +19,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "devDependencies": { diff --git a/packages/plugin-depin/package.json b/packages/plugin-depin/package.json index 377b6f1639c..1b3b59609dc 100644 --- a/packages/plugin-depin/package.json +++ b/packages/plugin-depin/package.json @@ -12,8 +12,7 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "test": "vitest run", - "lint": "eslint --fix --cache ." + "test": "vitest run" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-dexscreener/package.json b/packages/plugin-dexscreener/package.json index e7975df4805..b226216e756 100644 --- a/packages/plugin-dexscreener/package.json +++ b/packages/plugin-dexscreener/package.json @@ -10,8 +10,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-evm/package.json b/packages/plugin-evm/package.json index af16ae692ad..a5dc625c71e 100644 --- a/packages/plugin-evm/package.json +++ b/packages/plugin-evm/package.json @@ -29,8 +29,7 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "test": "vitest run", - "lint": "eslint --fix --cache ." + "test": "vitest run" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-flow/package.json b/packages/plugin-flow/package.json index beeea276ab1..3be1f58920d 100644 --- a/packages/plugin-flow/package.json +++ b/packages/plugin-flow/package.json @@ -41,7 +41,6 @@ "lines": "find . \\( -name '*.cdc' -o -name '*.ts' \\) -not -path '*/node_modules/*' -not -path '*/tests/*' -not -path '*/deps/*' -not -path '*/dist/*' -not -path '*/imports*' | xargs wc -l", "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-fuel/package.json b/packages/plugin-fuel/package.json index 3aa6f23dae5..d51e575b451 100644 --- a/packages/plugin-fuel/package.json +++ b/packages/plugin-fuel/package.json @@ -27,7 +27,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-gitbook/package.json b/packages/plugin-gitbook/package.json index 4f5162cb8b1..43b083f19e7 100644 --- a/packages/plugin-gitbook/package.json +++ b/packages/plugin-gitbook/package.json @@ -25,7 +25,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "test": "vitest", - "lint": "eslint --fix --cache ." + "test": "vitest" } } diff --git a/packages/plugin-gitcoin-passport/package.json b/packages/plugin-gitcoin-passport/package.json index b8a53a658a5..9161a1466d8 100644 --- a/packages/plugin-gitcoin-passport/package.json +++ b/packages/plugin-gitcoin-passport/package.json @@ -11,8 +11,7 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "test": "vitest run", - "lint": "eslint --fix --cache ." + "test": "vitest run" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-goplus/package.json b/packages/plugin-goplus/package.json index e60f48e8865..c6d261daa11 100644 --- a/packages/plugin-goplus/package.json +++ b/packages/plugin-goplus/package.json @@ -11,8 +11,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsx watch src/index.ts", - "lint": "eslint --fix --cache ." + "dev": "tsx watch src/index.ts" }, "devDependencies": { "@types/ws": "^8.5.13", diff --git a/packages/plugin-hyperliquid/package.json b/packages/plugin-hyperliquid/package.json index 5172b00efc3..ce1acdca858 100644 --- a/packages/plugin-hyperliquid/package.json +++ b/packages/plugin-hyperliquid/package.json @@ -15,7 +15,6 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" } } diff --git a/packages/plugin-image-generation/package.json b/packages/plugin-image-generation/package.json index 5f4b7a98556..6fbf72e22c0 100644 --- a/packages/plugin-image-generation/package.json +++ b/packages/plugin-image-generation/package.json @@ -24,8 +24,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-injective/package.json b/packages/plugin-injective/package.json index 13ba85ddf8f..ea06e7e2e10 100644 --- a/packages/plugin-injective/package.json +++ b/packages/plugin-injective/package.json @@ -8,7 +8,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "jest", "test:watch": "jest --watch", "format": "prettier --write \"src/**/*.ts\"", diff --git a/packages/plugin-iq6900/package.json b/packages/plugin-iq6900/package.json index e2f4550c3ac..61921a48085 100644 --- a/packages/plugin-iq6900/package.json +++ b/packages/plugin-iq6900/package.json @@ -14,7 +14,6 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" } } diff --git a/packages/plugin-irys/package.json b/packages/plugin-irys/package.json index e2f52cebc51..ce7ee468cd8 100644 --- a/packages/plugin-irys/package.json +++ b/packages/plugin-irys/package.json @@ -17,7 +17,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" } } diff --git a/packages/plugin-letzai/package.json b/packages/plugin-letzai/package.json index 791c51382c1..d1633a92350 100644 --- a/packages/plugin-letzai/package.json +++ b/packages/plugin-letzai/package.json @@ -12,7 +12,6 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" } } diff --git a/packages/plugin-node/package.json b/packages/plugin-node/package.json index ba53c2943dd..757c5989be8 100644 --- a/packages/plugin-node/package.json +++ b/packages/plugin-node/package.json @@ -85,7 +85,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "postinstall": "node scripts/postinstall.js" }, "peerDependencies": { diff --git a/packages/plugin-open-weather/package.json b/packages/plugin-open-weather/package.json index e8fc95bf786..0a78694aca8 100644 --- a/packages/plugin-open-weather/package.json +++ b/packages/plugin-open-weather/package.json @@ -25,8 +25,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-sgx/package.json b/packages/plugin-sgx/package.json index 09a7859daf8..5695f48155a 100644 --- a/packages/plugin-sgx/package.json +++ b/packages/plugin-sgx/package.json @@ -13,7 +13,6 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" } } diff --git a/packages/plugin-solana-agentkit/package.json b/packages/plugin-solana-agentkit/package.json index 8f5d72faea3..b55af623e67 100644 --- a/packages/plugin-solana-agentkit/package.json +++ b/packages/plugin-solana-agentkit/package.json @@ -24,7 +24,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-solana/package.json b/packages/plugin-solana/package.json index 1d716cdc263..bdf2be58439 100644 --- a/packages/plugin-solana/package.json +++ b/packages/plugin-solana/package.json @@ -36,7 +36,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-squid-router/package.json b/packages/plugin-squid-router/package.json index 33b46fbccb6..fb63a57f73d 100644 --- a/packages/plugin-squid-router/package.json +++ b/packages/plugin-squid-router/package.json @@ -16,8 +16,7 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "test": "vitest run", - "lint": "eslint --fix --cache ." + "test": "vitest run" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-starknet/package.json b/packages/plugin-starknet/package.json index 1b309b743ac..d043a872dae 100644 --- a/packages/plugin-starknet/package.json +++ b/packages/plugin-starknet/package.json @@ -33,8 +33,7 @@ "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", "test": "vitest run", - "test:watch": "vitest", - "lint": "eslint --fix --cache ." + "test:watch": "vitest" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-tee-log/package.json b/packages/plugin-tee-log/package.json index 1e1b3b66e17..f0cdec4ba7e 100644 --- a/packages/plugin-tee-log/package.json +++ b/packages/plugin-tee-log/package.json @@ -17,7 +17,6 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" } } diff --git a/packages/plugin-tee/package.json b/packages/plugin-tee/package.json index 616233692c3..9864b6ec47a 100644 --- a/packages/plugin-tee/package.json +++ b/packages/plugin-tee/package.json @@ -32,7 +32,6 @@ "scripts": { "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache .", "test": "vitest run" }, "peerDependencies": { diff --git a/packages/plugin-thirdweb/package.json b/packages/plugin-thirdweb/package.json index 1165fd389a7..1846e32ef8b 100644 --- a/packages/plugin-thirdweb/package.json +++ b/packages/plugin-thirdweb/package.json @@ -11,8 +11,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-trustdb/package.json b/packages/plugin-trustdb/package.json index fbc877abde1..cc09951af28 100644 --- a/packages/plugin-trustdb/package.json +++ b/packages/plugin-trustdb/package.json @@ -29,8 +29,7 @@ "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", "test": "vitest run", - "test:watch": "vitest", - "lint": "eslint --fix --cache ." + "test:watch": "vitest" }, "devDependencies": { "@types/dompurify": "3.2.0" diff --git a/packages/plugin-tts/package.json b/packages/plugin-tts/package.json index d8b03daaf6d..33136d20356 100644 --- a/packages/plugin-tts/package.json +++ b/packages/plugin-tts/package.json @@ -26,8 +26,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-video-generation/package.json b/packages/plugin-video-generation/package.json index 97423e37d0c..4699cb9a963 100644 --- a/packages/plugin-video-generation/package.json +++ b/packages/plugin-video-generation/package.json @@ -24,8 +24,7 @@ }, "scripts": { "build": "tsup --format esm --dts", - "dev": "tsup --format esm --dts --watch", - "lint": "eslint --fix --cache ." + "dev": "tsup --format esm --dts --watch" }, "peerDependencies": { "whatwg-url": "7.1.0" diff --git a/packages/plugin-whatsapp/package.json b/packages/plugin-whatsapp/package.json index 29eceae404b..eae55a51589 100644 --- a/packages/plugin-whatsapp/package.json +++ b/packages/plugin-whatsapp/package.json @@ -23,8 +23,7 @@ "build": "tsup --format esm --dts", "dev": "tsup --format esm --dts --watch", "test": "vitest run", - "coverage": "vitest run --coverage", - "lint": "eslint --fix --cache ." + "coverage": "vitest run --coverage" }, "dependencies": { "@elizaos/core": "workspace:*", diff --git a/scripts/update-biome-rules.mjs b/scripts/update-biome-rules.mjs new file mode 100644 index 00000000000..ca724af6cd6 --- /dev/null +++ b/scripts/update-biome-rules.mjs @@ -0,0 +1,10 @@ +import fs from 'fs'; + +const biomePath = './biome.json'; +const content = fs.readFileSync(biomePath, 'utf8'); + +// Replace all "off" with "warn" but only within rule definitions +const updated = content.replace(/: "off"/g, ': "warn"'); + +fs.writeFileSync(biomePath, updated); +console.log('Updated biome.json rules from "off" to "warn"'); \ No newline at end of file From 144842fc4e10a0b33ca114183d58fc4fce9f4a0e Mon Sep 17 00:00:00 2001 From: Sero <69639595+Seroxdesign@users.noreply.github.com> Date: Sat, 18 Jan 2025 02:32:07 -0500 Subject: [PATCH 6/7] biome ci --- .github/workflows/ci.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 551a016700e..88f8a8ed576 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,8 +22,13 @@ jobs: - name: Install dependencies run: pnpm install -r --no-frozen-lockfile + - name: Setup Biome + uses: biomejs/setup-biome@v2 + with: + token: ${{ github.token }} + - name: Run Biome Check - run: pnpm run check + run: biome ci . - name: Create test env file run: | From 138dde798174da2c86845004d8bc9ffd107fea16 Mon Sep 17 00:00:00 2001 From: Sayo Date: Sat, 18 Jan 2025 13:07:03 +0530 Subject: [PATCH 7/7] Update ci.yaml --- .github/workflows/ci.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 88f8a8ed576..712025712dd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,13 +22,13 @@ jobs: - name: Install dependencies run: pnpm install -r --no-frozen-lockfile - - name: Setup Biome + - name: Setup Biome CLI uses: biomejs/setup-biome@v2 with: - token: ${{ github.token }} + version: latest - - name: Run Biome Check - run: biome ci . + - name: Run Biome + run: biome ci - name: Create test env file run: |