From 64342eaeb001121d8fb71281e0289b08079ab0e6 Mon Sep 17 00:00:00 2001 From: Maksym Zub Date: Tue, 24 Dec 2024 16:26:59 +0100 Subject: [PATCH] Add anthropic image description --- packages/plugin-node/package.json | 3 +- packages/plugin-node/src/services/image.ts | 98 ++++++++- .../plugin-node/src/services/imageUtils.ts | 79 +++++++ pnpm-lock.yaml | 207 ++++++++++++------ 4 files changed, 314 insertions(+), 73 deletions(-) create mode 100644 packages/plugin-node/src/services/imageUtils.ts diff --git a/packages/plugin-node/package.json b/packages/plugin-node/package.json index cdec1c0414..253a464db1 100644 --- a/packages/plugin-node/package.json +++ b/packages/plugin-node/package.json @@ -12,13 +12,13 @@ "tsup.config.ts" ], "dependencies": { - "@elizaos/core": "workspace:*", "@aws-sdk/client-s3": "^3.705.0", "@aws-sdk/s3-request-presigner": "^3.705.0", "@cliqz/adblocker-playwright": "1.34.0", "@echogarden/espeak-ng-emscripten": "0.3.3", "@echogarden/kissfft-wasm": "0.2.0", "@echogarden/speex-resampler-wasm": "0.2.1", + "@elizaos/core": "workspace:*", "@huggingface/transformers": "3.0.2", "@opendocsg/pdf2md": "0.1.32", "@types/uuid": "10.0.0", @@ -32,6 +32,7 @@ "echogarden": "2.0.7", "espeak-ng": "1.0.2", "ffmpeg-static": "5.2.0", + "file-type": "^19.6.0", "fluent-ffmpeg": "2.1.3", "formdata-node": "6.0.3", "fs-extra": "11.2.0", diff --git a/packages/plugin-node/src/services/image.ts b/packages/plugin-node/src/services/image.ts index d1702a0679..4319a3c1b7 100644 --- a/packages/plugin-node/src/services/image.ts +++ b/packages/plugin-node/src/services/image.ts @@ -21,6 +21,7 @@ import fs from "fs"; import gifFrames from "gif-frames"; import os from "os"; import path from "path"; +import { resizeImageBuffer } from "./imageUtils"; export class ImageDescriptionService extends Service @@ -97,11 +98,13 @@ export class ImageDescriptionService if (model === models[ModelProviderName.LLAMALOCAL]) { await this.initializeLocalModel(); + } else if (model === models[ModelProviderName.ANTHROPIC]) { + this.modelId = "claude-3-haiku-20240307"; + this.device = "cloud"; } else { this.modelId = "gpt-4o-mini"; this.device = "cloud"; } - this.initialized = true; } @@ -111,7 +114,7 @@ export class ImageDescriptionService "Runtime is required for OpenAI image recognition" ); } - return this.recognizeWithOpenAI(imageUrl); + return this.recognizeWithCloud(imageUrl); } this.queue.push(imageUrl); @@ -130,7 +133,7 @@ export class ImageDescriptionService }); } - private async recognizeWithOpenAI( + private async recognizeWithCloud( imageUrl: string ): Promise<{ title: string; description: string }> { const isGif = imageUrl.toLowerCase().endsWith(".gif"); @@ -157,12 +160,15 @@ export class ImageDescriptionService const prompt = "Describe this image and give it a title. The first line should be the title, and then a line break, then a detailed description of the image. Respond with the format 'title\ndescription'"; - const text = await this.requestOpenAI( - imageUrl, - imageData, - prompt, - isGif - ); + const text = + this.runtime.imageModelProvider === ModelProviderName.ANTHROPIC + ? await this.requestAnthropic(imageData, prompt) + : await this.requestOpenAI( + imageUrl, + imageData, + prompt, + isGif + ); const [title, ...descriptionParts] = text.split("\n"); return { @@ -206,7 +212,7 @@ export class ImageDescriptionService Authorization: `Bearer ${this.runtime.getSetting("OPENAI_API_KEY")}`, }, body: JSON.stringify({ - model: "gpt-4o-mini", + model: this.modelId, messages: [{ role: "user", content }], max_tokens: isGif ? 500 : 300, }), @@ -231,6 +237,78 @@ export class ImageDescriptionService ); } + private async requestAnthropic( + imageData: Buffer, + prompt: string + ): Promise { + for (let attempt = 0; attempt < 3; attempt++) { + try { + const endpoint = + models[this.runtime.imageModelProvider].endpoint ?? + "https://api.anthropic.com/v1"; + + // Resize image to 400x400 max, keeping the token count ~ 213 + const resizedImage = await resizeImageBuffer( + imageData, + 400, + 400 + ); + + const response = await fetch(endpoint + "/messages", { + method: "POST", + headers: { + "Content-Type": "application/json", + "x-api-key": `${this.runtime.getSetting("ANTHROPIC_API_KEY")}`, + "anthropic-version": "2023-06-01", + }, + body: JSON.stringify({ + model: this.modelId, + max_tokens: 300, + messages: [ + { + role: "user", + content: [ + { + type: "image", + source: { + type: "base64", + media_type: resizedImage.mimeType, + data: resizedImage.buffer.toString( + "base64" + ), + }, + }, + { + type: "text", + text: prompt, + }, + ], + }, + ], + }), + }); + + if (!response.ok) { + throw new Error( + `HTTP error! status: ${await response.text()}` + ); + } + + const data = await response.json(); + return data.content[0].text; + } catch (error) { + elizaLogger.error( + `Anthropic request failed (attempt ${attempt + 1}):`, + error + ); + if (attempt === 2) throw error; + } + } + throw new Error( + "Failed to recognize image with Anthropic after 3 attempts" + ); + } + private async processQueue(): Promise { if (this.processing || this.queue.length === 0) return; diff --git a/packages/plugin-node/src/services/imageUtils.ts b/packages/plugin-node/src/services/imageUtils.ts new file mode 100644 index 0000000000..020ff47ce5 --- /dev/null +++ b/packages/plugin-node/src/services/imageUtils.ts @@ -0,0 +1,79 @@ +import sharp from "sharp"; +import * as FileType from "file-type/core"; + +interface ImageDimensions { + width: number; + height: number; +} + +interface ProcessedImage { + buffer: Buffer; + mimeType: string; + dimensions: { + original: ImageDimensions; + resized: ImageDimensions; + }; +} + +export async function resizeImageBuffer( + imageBuffer: Buffer, + maxWidth: number, + maxHeight: number +): Promise { + // Detect MIME type + try { + // Detect MIME type + const fileTypeResult = await FileType.fileTypeFromBuffer(imageBuffer); + if (!fileTypeResult || !fileTypeResult.mime.startsWith("image/")) { + throw new Error("Invalid image format"); + } + + // Get original image metadata + const metadata = await sharp(imageBuffer).metadata(); + if (!metadata.width || !metadata.height) { + throw new Error("Could not get image dimensions"); + } + + // Calculate new dimensions maintaining aspect ratio + let width = metadata.width; + let height = metadata.height; + + if (width > maxWidth) { + height = Math.round((maxWidth * height) / width); + width = maxWidth; + } + + if (height > maxHeight) { + width = Math.round((maxHeight * width) / height); + height = maxHeight; + } + + // Process the image + const resizedBuffer = await sharp(imageBuffer) + .resize(width, height, { + fit: "inside", + withoutEnlargement: true, + }) + .toBuffer(); + + return { + buffer: resizedBuffer, + mimeType: fileTypeResult.mime, + dimensions: { + original: { + width: metadata.width, + height: metadata.height, + }, + resized: { + width, + height, + }, + }, + }; + } catch (error) { + if (error instanceof Error) { + throw new Error(`Image processing failed: ${error.message}`); + } + throw new Error("Image processing failed with unknown error"); + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6f0e904aa4..d5f38091c5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -541,12 +541,6 @@ importers: packages/client-discord: dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core - '@elizaos/plugin-node': - specifier: workspace:* - version: link:../plugin-node '@discordjs/opus': specifier: github:discordjs/opus version: https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13) @@ -556,6 +550,12 @@ importers: '@discordjs/voice': specifier: 0.17.0 version: 0.17.0(@discordjs/opus@https://codeload.github.com/discordjs/opus/tar.gz/31da49d8d2cc6c5a2ab1bfd332033ff7d5f9fb02(encoding@0.1.13))(bufferutil@4.0.8)(ffmpeg-static@5.2.0)(utf-8-validate@5.0.10) + '@elizaos/core': + specifier: workspace:* + version: link:../core + '@elizaos/plugin-node': + specifier: workspace:* + version: link:../plugin-node discord.js: specifier: 14.16.3 version: 14.16.3(bufferutil@4.0.8)(utf-8-validate@5.0.10) @@ -943,12 +943,12 @@ importers: packages/plugin-aptos: dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core '@aptos-labs/ts-sdk': specifier: ^1.26.0 version: 1.33.1 + '@elizaos/core': + specifier: workspace:* + version: link:../core bignumber: specifier: 1.1.0 version: 1.1.0 @@ -1134,9 +1134,6 @@ importers: packages/plugin-icp: dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core '@dfinity/agent': specifier: 2.1.3 version: 2.1.3(@dfinity/candid@2.1.3(@dfinity/principal@2.1.3))(@dfinity/principal@2.1.3) @@ -1149,6 +1146,9 @@ importers: '@dfinity/principal': specifier: 2.1.3 version: 2.1.3 + '@elizaos/core': + specifier: workspace:* + version: link:../core devDependencies: '@types/jest': specifier: 29.5.14 @@ -1297,9 +1297,6 @@ importers: packages/plugin-node: dependencies: - '@elizaos/core': - specifier: workspace:* - version: link:../core '@aws-sdk/client-s3': specifier: ^3.705.0 version: 3.713.0 @@ -1318,6 +1315,9 @@ importers: '@echogarden/speex-resampler-wasm': specifier: 0.2.1 version: 0.2.1 + '@elizaos/core': + specifier: workspace:* + version: link:../core '@huggingface/transformers': specifier: 3.0.2 version: 3.0.2 @@ -1357,6 +1357,9 @@ importers: ffmpeg-static: specifier: 5.2.0 version: 5.2.0 + file-type: + specifier: ^19.6.0 + version: 19.6.0 fluent-ffmpeg: specifier: 2.1.3 version: 2.1.3 @@ -1475,6 +1478,9 @@ importers: packages/plugin-solana: dependencies: + '@coral-xyz/anchor': + specifier: 0.30.1 + version: 0.30.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@elizaos/core': specifier: workspace:* version: link:../core @@ -1484,9 +1490,6 @@ importers: '@elizaos/plugin-trustdb': specifier: workspace:* version: link:../plugin-trustdb - '@coral-xyz/anchor': - specifier: 0.30.1 - version: 0.30.1(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10) '@solana/spl-token': specifier: 0.4.9 version: 0.4.9(@solana/web3.js@1.95.8(bufferutil@4.0.8)(encoding@0.1.13)(utf-8-validate@5.0.10))(bufferutil@4.0.8)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)(utf-8-validate@5.0.10) @@ -1526,15 +1529,15 @@ importers: packages/plugin-starknet: dependencies: + '@avnu/avnu-sdk': + specifier: 2.1.1 + version: 2.1.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(qs@6.13.1)(starknet@6.18.0(encoding@0.1.13)) '@elizaos/core': specifier: workspace:* version: link:../core '@elizaos/plugin-trustdb': specifier: workspace:* version: link:../plugin-trustdb - '@avnu/avnu-sdk': - specifier: 2.1.1 - version: 2.1.1(ethers@6.13.4(bufferutil@4.0.8)(utf-8-validate@5.0.10))(qs@6.13.1)(starknet@6.18.0(encoding@0.1.13)) '@uniswap/sdk-core': specifier: 6.0.0 version: 6.0.0 @@ -6481,6 +6484,9 @@ packages: '@scure/starknet@1.0.0': resolution: {integrity: sha512-o5J57zY0f+2IL/mq8+AYJJ4Xpc1fOtDhr+mFQKbHnYFmm3WQrC+8zj2HEgxak1a+x86mhmBC1Kq305KUpVf0wg==} + '@sec-ant/readable-stream@0.4.1': + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + '@selderee/plugin-htmlparser2@0.11.0': resolution: {integrity: sha512-P33hHGdldxGabLFjPPpaTxVolMrzrcegejx+0GxjrIb9Zv48D8yAIA/QTDR2dFl7Uz7urX8aX6+5bCZslr+gWQ==} @@ -7212,6 +7218,9 @@ packages: resolution: {integrity: sha512-crXw1txzrS36huQOyQGYFvhTeLeG0Si1xu+/l6kXUVYpE0TjFjEZRqTbuadQLfKGZ0jaI+jJoRyqaWwxOSHW2g==} engines: {node: '>=12.20.0'} + '@tokenizer/token@0.3.0': + resolution: {integrity: sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A==} + '@ton/core@0.59.0': resolution: {integrity: sha512-LSIkGst7BoY7fMWshejzcH0UJnoW21JGlRrW0ch+6A7Xb/7EuekxgdKym7fHxcry6OIf6FoeFg97lJ960N/Ghg==} peerDependencies: @@ -11161,6 +11170,10 @@ packages: peerDependencies: webpack: ^4.0.0 || ^5.0.0 + file-type@19.6.0: + resolution: {integrity: sha512-VZR5I7k5wkD0HgFnMsq5hOsSc710MJMu5Nc5QYsbe38NN5iPV/XTObYLc/cpttRTf6lX538+5uO1ZQRhYibiZQ==} + engines: {node: '>=18'} + file-uri-to-path@1.0.0: resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} @@ -11487,6 +11500,10 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} + get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} + get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} engines: {node: '>= 0.4'} @@ -12505,6 +12522,10 @@ packages: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + is-string@1.1.1: resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} engines: {node: '>= 0.4'} @@ -14868,6 +14889,10 @@ packages: peberminta@0.9.0: resolution: {integrity: sha512-XIxfHpEuSJbITd1H3EeQwpcZbTLHc+VVr8ANI9t5sit565tsI4/xK3KWTUFE2e6QiangUkh3B0jihzmGnNrRsQ==} + peek-readable@5.3.1: + resolution: {integrity: sha512-GVlENSDW6KHaXcd9zkZltB7tCLosKB/4Hg0fqBJkAoBgYG2Tn1xtMgXtSUuMU9AK/gCm/tTdT8mgAeF4YNeeqw==} + engines: {node: '>=14.16'} + pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} @@ -17238,6 +17263,10 @@ packages: engines: {node: '>=4'} hasBin: true + strtok3@9.1.1: + resolution: {integrity: sha512-FhwotcEqjr241ZbjFzjlIYg6c5/L/s4yBGWSMvJ9UoExiSqL+FnFA/CaeZx17WGaZMS/4SOZp8wH18jSS4R4lw==} + engines: {node: '>=16'} + style-to-object@0.4.4: resolution: {integrity: sha512-HYNoHZa2GorYNyqiCaBgsxvcJIn7OHq6inEga+E6Ke3m5JkoqpQbnFssk4jwe+K7AhGa2fcha4wSOf1Kn01dMg==} @@ -17579,6 +17608,10 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} + token-types@6.0.0: + resolution: {integrity: sha512-lbDrTLVsHhOMljPscd0yitpozq7Ga2M5Cvez5AjGg8GASBjtt6iERCAJ93yommPmz62fb45oFIXHEZ3u9bfJEA==} + engines: {node: '>=14.16'} + toml@3.0.0: resolution: {integrity: sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==} @@ -17936,6 +17969,10 @@ packages: resolution: {integrity: sha512-u3xV3X7uzvi5b1MncmZo3i2Aw222Zk1keqLA1YkHldREkAhAqi65wuPfe7lHx8H/Wzy+8CE7S7uS3jekIM5s8g==} engines: {node: '>=8'} + uint8array-extras@1.4.0: + resolution: {integrity: sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ==} + engines: {node: '>=18'} + uint8array-tools@0.0.8: resolution: {integrity: sha512-xS6+s8e0Xbx++5/0L+yyexukU7pz//Yg6IHg3BKhXotg1JcYtgxVcUctQ0HxLByiJzpAkNFawz1Nz5Xadzo82g==} engines: {node: '>=14.0.0'} @@ -19072,7 +19109,7 @@ snapshots: '@acuminous/bitsyntax@0.1.2': dependencies: buffer-more-ints: 1.0.0 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 safe-buffer: 5.1.2 transitivePeerDependencies: - supports-color @@ -21005,7 +21042,7 @@ snapshots: dependencies: '@scure/bip32': 1.6.0 abitype: 1.0.7(typescript@5.6.3)(zod@3.23.8) - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 axios-mock-adapter: 1.22.0(axios@1.7.9) axios-retry: 4.5.0(axios@1.7.9) bip32: 4.0.0 @@ -22711,7 +22748,7 @@ snapshots: '@eslint/config-array@0.19.1': dependencies: '@eslint/object-schema': 2.1.5 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -22737,7 +22774,7 @@ snapshots: '@eslint/eslintrc@3.2.0': dependencies: ajv: 6.12.6 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 espree: 10.3.0 globals: 14.0.0 ignore: 5.3.2 @@ -23526,7 +23563,7 @@ snapshots: '@kwsites/file-exists@1.1.1': dependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -25468,7 +25505,7 @@ snapshots: '@pm2/pm2-version-check@1.0.4': dependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -26085,6 +26122,8 @@ snapshots: '@noble/curves': 1.3.0 '@noble/hashes': 1.3.3 + '@sec-ant/readable-stream@0.4.1': {} + '@selderee/plugin-htmlparser2@0.11.0': dependencies: domhandler: 5.0.3 @@ -27169,6 +27208,8 @@ snapshots: '@tinyhttp/content-disposition@2.2.2': {} + '@tokenizer/token@0.3.0': {} + '@ton/core@0.59.0(@ton/crypto@3.3.0)': dependencies: '@ton/crypto': 3.3.0 @@ -27818,7 +27859,7 @@ snapshots: '@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@8.1.1) + debug: 4.4.0 eslint: 9.16.0(jiti@2.4.2) optionalDependencies: typescript: 5.6.3 @@ -27851,7 +27892,7 @@ snapshots: 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@8.1.1) + debug: 4.4.0 eslint: 9.16.0(jiti@2.4.2) ts-api-utils: 1.4.3(typescript@5.6.3) optionalDependencies: @@ -27882,7 +27923,7 @@ snapshots: dependencies: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 @@ -28632,7 +28673,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -28981,13 +29022,13 @@ snapshots: axios-mock-adapter@1.22.0(axios@1.7.9): dependencies: - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 fast-deep-equal: 3.1.3 is-buffer: 2.0.5 axios-retry@4.5.0(axios@1.7.9): dependencies: - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 is-retry-allowed: 2.2.0 axios@0.21.4: @@ -28998,7 +29039,7 @@ snapshots: axios@0.27.2: dependencies: - follow-redirects: 1.15.9(debug@4.4.0) + follow-redirects: 1.15.9 form-data: 4.0.1 transitivePeerDependencies: - debug @@ -29027,6 +29068,14 @@ snapshots: transitivePeerDependencies: - debug + axios@1.7.9: + dependencies: + follow-redirects: 1.15.9 + form-data: 4.0.1 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + axios@1.7.9(debug@4.4.0): dependencies: follow-redirects: 1.15.9(debug@4.4.0) @@ -30086,7 +30135,7 @@ snapshots: cmake-js@7.3.0: dependencies: axios: 1.7.9(debug@4.4.0) - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 fs-extra: 11.2.0 lodash.isplainobject: 4.0.6 memory-stream: 1.0.0 @@ -31032,7 +31081,7 @@ snapshots: debug-fabulous@2.0.2: dependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 memoizee: 0.4.17 transitivePeerDependencies: - supports-color @@ -31062,6 +31111,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.4.0: + dependencies: + ms: 2.1.3 + debug@4.4.0(supports-color@5.5.0): dependencies: ms: 2.1.3 @@ -31924,7 +31977,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.6 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 escape-string-regexp: 4.0.0 eslint-scope: 8.2.0 eslint-visitor-keys: 4.2.0 @@ -32191,7 +32244,7 @@ snapshots: execa@5.0.0: dependencies: cross-spawn: 7.0.6 - get-stream: 6.0.0 + get-stream: 6.0.1 human-signals: 2.1.0 is-stream: 2.0.1 merge-stream: 2.0.0 @@ -32294,7 +32347,7 @@ snapshots: extract-zip@2.0.1: dependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 get-stream: 5.2.0 yauzl: 2.10.0 optionalDependencies: @@ -32420,6 +32473,13 @@ snapshots: schema-utils: 3.3.0 webpack: 5.97.1(@swc/core@1.10.1(@swc/helpers@0.5.15)) + file-type@19.6.0: + dependencies: + get-stream: 9.0.1 + strtok3: 9.1.1 + token-types: 6.0.0 + uint8array-extras: 1.4.0 + file-uri-to-path@1.0.0: {} filelist@1.0.4: @@ -32507,13 +32567,15 @@ snapshots: async: 0.2.10 which: 1.3.1 + follow-redirects@1.15.9: {} + follow-redirects@1.15.9(debug@4.3.7): optionalDependencies: debug: 4.3.7 follow-redirects@1.15.9(debug@4.4.0): optionalDependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 fomo-sdk-solana@1.3.2(bufferutil@4.0.8)(encoding@0.1.13)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: @@ -32791,6 +32853,11 @@ snapshots: get-stream@8.0.1: {} + get-stream@9.0.1: + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 + get-symbol-description@1.0.2: dependencies: call-bind: 1.0.8 @@ -32801,7 +32868,7 @@ snapshots: dependencies: basic-ftp: 5.0.5 data-uri-to-buffer: 6.0.2 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -33539,7 +33606,7 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -33590,21 +33657,21 @@ snapshots: https-proxy-agent@4.0.0: dependencies: agent-base: 5.1.1 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -34050,6 +34117,8 @@ snapshots: is-stream@3.0.0: {} + is-stream@4.0.1: {} + is-string@1.1.1: dependencies: call-bound: 1.0.3 @@ -36922,7 +36991,7 @@ snapshots: '@yarnpkg/lockfile': 1.1.0 '@yarnpkg/parsers': 3.0.0-rc.46 '@zkochan/js-yaml': 0.0.7 - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 @@ -37281,7 +37350,7 @@ snapshots: dependencies: '@tootallnate/quickjs-emscripten': 0.23.0 agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 get-uri: 6.0.4 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 @@ -37515,6 +37584,8 @@ snapshots: peberminta@0.9.0: {} + peek-readable@5.3.1: {} + pend@1.2.0: {} perfect-debounce@1.0.0: {} @@ -37646,7 +37717,7 @@ snapshots: pm2-axon-rpc@0.7.1: dependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -37654,7 +37725,7 @@ snapshots: dependencies: amp: 0.3.1 amp-message: 0.1.2 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 escape-string-regexp: 4.0.0 transitivePeerDependencies: - supports-color @@ -37671,7 +37742,7 @@ snapshots: pm2-sysmonit@1.2.8: dependencies: async: 3.2.6 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 pidusage: 2.0.21 systeminformation: 5.23.5 tx2: 1.0.5 @@ -37693,7 +37764,7 @@ snapshots: commander: 2.15.1 croner: 4.1.97 dayjs: 1.11.13 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 enquirer: 2.3.6 eventemitter2: 5.0.1 fclone: 1.0.11 @@ -38550,7 +38621,7 @@ snapshots: proxy-agent@6.3.1: dependencies: agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.6 lru-cache: 7.18.3 @@ -38644,7 +38715,7 @@ snapshots: puppeteer-extra-plugin-capsolver@2.0.1(bufferutil@4.0.8)(encoding@0.1.13)(puppeteer-core@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10))(typescript@5.6.3)(utf-8-validate@5.0.10): dependencies: - axios: 1.7.9(debug@4.4.0) + axios: 1.7.9 capsolver-npm: 2.0.2 puppeteer: 19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10) puppeteer-extra: 3.3.6(puppeteer-core@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10))(puppeteer@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)) @@ -38663,7 +38734,7 @@ snapshots: puppeteer-extra-plugin@3.2.3(puppeteer-extra@3.3.6(puppeteer-core@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10))(puppeteer@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10))): dependencies: '@types/debug': 4.1.12 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 merge-deep: 3.0.3 optionalDependencies: puppeteer-extra: 3.3.6(puppeteer-core@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10))(puppeteer@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)) @@ -38673,7 +38744,7 @@ snapshots: puppeteer-extra@3.3.6(puppeteer-core@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10))(puppeteer@19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10)): dependencies: '@types/debug': 4.1.12 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 deepmerge: 4.3.1 optionalDependencies: puppeteer: 19.11.1(bufferutil@4.0.8)(encoding@0.1.13)(typescript@5.6.3)(utf-8-validate@5.0.10) @@ -39298,7 +39369,7 @@ snapshots: require-in-the-middle@5.2.0: dependencies: - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 module-details-from-path: 1.0.3 resolve: 1.22.9 transitivePeerDependencies: @@ -39858,7 +39929,7 @@ snapshots: dependencies: '@kwsites/file-exists': 1.1.1 '@kwsites/promise-deferred': 1.1.1 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 transitivePeerDependencies: - supports-color @@ -39931,7 +40002,7 @@ snapshots: socks-proxy-agent@8.0.5: dependencies: agent-base: 7.1.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 socks: 2.8.3 transitivePeerDependencies: - supports-color @@ -40299,6 +40370,11 @@ snapshots: minimist: 1.2.8 through: 2.3.8 + strtok3@9.1.1: + dependencies: + '@tokenizer/token': 0.3.0 + peek-readable: 5.3.1 + style-to-object@0.4.4: dependencies: inline-style-parser: 0.1.1 @@ -40676,6 +40752,11 @@ snapshots: toidentifier@1.0.1: {} + token-types@6.0.0: + dependencies: + '@tokenizer/token': 0.3.0 + ieee754: 1.2.1 + toml@3.0.0: {} totalist@3.0.1: {} @@ -40881,7 +40962,7 @@ snapshots: cac: 6.7.14 chokidar: 4.0.2 consola: 3.2.3 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 esbuild: 0.24.0 joycon: 3.1.1 picocolors: 1.1.1 @@ -40908,7 +40989,7 @@ snapshots: tuf-js@2.2.1: dependencies: '@tufjs/models': 2.0.1 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 make-fetch-happen: 13.0.1 transitivePeerDependencies: - supports-color @@ -41083,6 +41164,8 @@ snapshots: dependencies: '@lukeed/csprng': 1.1.0 + uint8array-extras@1.4.0: {} + uint8array-tools@0.0.8: {} uint8array-tools@0.0.9: {} @@ -41565,7 +41648,7 @@ snapshots: vite-node@2.1.5(@types/node@22.10.2)(terser@5.37.0): dependencies: cac: 6.7.14 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 es-module-lexer: 1.5.4 pathe: 1.1.2 vite: 5.4.11(@types/node@22.10.2)(terser@5.37.0) @@ -41678,7 +41761,7 @@ snapshots: '@vitest/spy': 2.1.5 '@vitest/utils': 2.1.5 chai: 5.1.2 - debug: 4.4.0(supports-color@8.1.1) + debug: 4.4.0 expect-type: 1.1.0 magic-string: 0.30.17 pathe: 1.1.2