diff --git a/agent/index.ts b/agent/index.ts new file mode 100644 index 00000000..5b1e684b --- /dev/null +++ b/agent/index.ts @@ -0,0 +1,124 @@ +import { + Character, + createAgentRuntime, + createDirectRuntime, + DirectClient, + getTokenForProvider, + IAgentRuntime, + initializeClients, + initializeDatabase, + loadCharacters, + parseArguments, +} from "@eliza/core"; +import { Arguments } from "@eliza/core/src/types"; +import readline from "readline"; + +let argv: Arguments = parseArguments(); +let basePath = "./"; +// if argv.isroot is true, then set the base path to "../" +if (argv.isRoot) { + basePath = "../"; +} + +// if the path doesnt start with a /, add the base path to the beginning of the path +if (!argv.characters?.startsWith("/")) { + argv.characters = `${basePath}${argv.characters}`; +} + +let characters = loadCharacters(argv.characters); +if (!characters || characters.length === 0) { + console.error("No characters loaded. Please check the characters file."); + process.exit(1); +} + +characters.forEach((char, index) => { + if (!char.name || !char.modelProvider) { + console.error( + `Character at index ${index} is missing required fields.` + ); + process.exit(1); + } +}); + +const directClient = new DirectClient(); + +const serverPort = parseInt(process.env.SERVER_PORT || "3000"); +directClient.start(serverPort); + +async function startAgent(character: Character) { + try { + const token = getTokenForProvider(character.modelProvider, character); + const db = initializeDatabase(); + + const runtime = await createAgentRuntime(character, db, token); + const directRuntime = createDirectRuntime(character, db, token); + + const clients = await initializeClients( + character, + runtime as IAgentRuntime + ); + directClient.registerAgent(await directRuntime); + + return clients; + } catch (error) { + console.error( + `Error starting agent for character ${character.name}:`, + error + ); + throw error; // Re-throw after logging + } +} + +const startAgents = async () => { + try { + for (const character of characters) { + await startAgent(character); + } + } catch (error) { + console.error("Error starting agents:", error); + } +}; + +startAgents().catch((error) => { + console.error("Unhandled error in startAgents:", error); + process.exit(1); // Exit the process after logging +}); + +const rl = readline.createInterface({ + input: process.stdin, + output: process.stdout, +}); + +function chat() { + rl.question("You: ", async (input) => { + if (input.toLowerCase() === "exit") { + rl.close(); + return; + } + + const agentId = characters[0].name.toLowerCase(); + const response = await fetch( + `http://localhost:3000/${agentId}/message`, + { + method: "POST", + headers: { + "Content-Type": "application/json", + }, + body: JSON.stringify({ + text: input, + userId: "user", + userName: "User", + }), + } + ); + + const data = await response.json(); + for (const message of data) { + console.log(`${characters[0].name}: ${message.text}`); + } + chat(); + }); +} + +console.log("Chat started. Type 'exit' to quit."); +chat(); diff --git a/agent/package.json b/agent/package.json new file mode 100644 index 00000000..c1760ab4 --- /dev/null +++ b/agent/package.json @@ -0,0 +1,18 @@ +{ + "name": "@eliza/agent", + "version": "0.0.1", + "main": "index.ts", + "type": "module", + "scripts": { + "build": "tsup --format esm --dts", + "start": "node --loader ts-node/esm index.ts --characters=\"../characters/blobert.character.json\"" + }, + "dependencies": { + "@eliza/core": "workspace:*", + "readline": "^1.3.0", + "tsup": "^8.3.5" + }, + "devDependencies": { + "ts-node": "10.9.2" + } +} diff --git a/agent/tsconfig.json b/agent/tsconfig.json new file mode 100644 index 00000000..06ee6c7b --- /dev/null +++ b/agent/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "../tsconfig.json", + "compilerOptions": { + "outDir": "dist" + }, + "include": ["."] +} diff --git a/agent/tsup.config.ts b/agent/tsup.config.ts new file mode 100644 index 00000000..c5f46341 --- /dev/null +++ b/agent/tsup.config.ts @@ -0,0 +1,8 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["index.ts"], + outDir: "dist", + sourcemap: true, + clean: true, +}); diff --git a/core/package.json b/core/package.json index ee3f10e7..f73398dd 100644 --- a/core/package.json +++ b/core/package.json @@ -1,14 +1,14 @@ { - "name": "eliza", + "name": "@eliza/core", "version": "1.0.0", "description": "", "main": "dist/index.js", "type": "module", "types": "dist/index.d.ts", "scripts": { - "build": "tsc -p tsconfig.json", + "build": "tsup --format esm --dts", "lint": "eslint . --fix", - "start": "node --loader ts-node/esm src/index.ts", + "start": "node --loader ts-node/esm src/index.ts --characters=\"../characters/blobert.character.json\"", "start:arok": "node --loader ts-node/esm src/index.ts --characters=\"../characters/arok.character.json\"", "start:service:ruby": "pm2 start pnpm --name=\"ruby\" --restart-delay=3000 --max-restarts=10 -- run start:ruby", "stop:service:ruby": "pm2 stop ruby", @@ -84,8 +84,8 @@ "@anthropic-ai/sdk": "^0.30.1", "@cliqz/adblocker-playwright": "1.34.0", "@coral-xyz/anchor": "^0.30.1", - "@discordjs/rest": "2.4.0", "@discordjs/opus": "github:discordjs/opus", + "@discordjs/rest": "2.4.0", "@discordjs/voice": "0.17.0", "@echogarden/espeak-ng-emscripten": "0.3.0", "@echogarden/kissfft-wasm": "0.2.0", @@ -163,6 +163,7 @@ "tiktoken": "1.0.17", "tinyld": "1.3.4", "together-ai": "^0.7.0", + "tsup": "^8.3.5", "unique-names-generator": "4.7.1", "uuid": "11.0.2", "wav": "1.0.2", diff --git a/core/src/actions/imageGeneration.ts b/core/src/actions/imageGeneration.ts index 3d48b4e8..e7ff3574 100644 --- a/core/src/actions/imageGeneration.ts +++ b/core/src/actions/imageGeneration.ts @@ -5,7 +5,7 @@ import { State, Action, } from "../core/types.ts"; -import { prettyConsole } from "../index.ts"; +import { elizaLog } from "../index.ts"; import { generateCaption, generateImage } from "./imageGenerationUtils.ts"; export const imageGeneration: Action = { @@ -27,19 +27,19 @@ export const imageGeneration: Action = { options: any, callback: HandlerCallback ) => { - prettyConsole.log("Composing state for message:", message); + elizaLog.log("Composing state for message:", message); state = (await runtime.composeState(message)) as State; const userId = runtime.agentId; - prettyConsole.log("User ID:", userId); + elizaLog.log("User ID:", userId); const imagePrompt = message.content.text; - prettyConsole.log("Image prompt received:", imagePrompt); + elizaLog.log("Image prompt received:", imagePrompt); // TODO: Generate a prompt for the image const res: { image: string; caption: string }[] = []; - prettyConsole.log("Generating image with prompt:", imagePrompt); + elizaLog.log("Generating image with prompt:", imagePrompt); const images = await generateImage( { prompt: imagePrompt, @@ -51,13 +51,13 @@ export const imageGeneration: Action = { ); if (images.success && images.data && images.data.length > 0) { - prettyConsole.log( + elizaLog.log( "Image generation successful, number of images:", images.data.length ); for (let i = 0; i < images.data.length; i++) { const image = images.data[i]; - prettyConsole.log(`Processing image ${i + 1}:`, image); + elizaLog.log(`Processing image ${i + 1}:`, image); const caption = await generateCaption( { @@ -66,7 +66,7 @@ export const imageGeneration: Action = { runtime ); - prettyConsole.log( + elizaLog.log( `Generated caption for image ${i + 1}:`, caption.title ); @@ -90,7 +90,7 @@ export const imageGeneration: Action = { ); } } else { - prettyConsole.error("Image generation failed or returned no data."); + elizaLog.error("Image generation failed or returned no data."); } }, examples: [ diff --git a/core/src/adapters/sqlite/sqlite_vec.ts b/core/src/adapters/sqlite/sqlite_vec.ts index 2f159d22..93015a5f 100644 --- a/core/src/adapters/sqlite/sqlite_vec.ts +++ b/core/src/adapters/sqlite/sqlite_vec.ts @@ -1,15 +1,15 @@ import * as sqliteVec from "sqlite-vec"; import { Database } from "better-sqlite3"; -import { prettyConsole } from "../../index.ts"; +import { elizaLog } from "../../index.ts"; // Loads the sqlite-vec extensions into the provided SQLite database export function loadVecExtensions(db: Database): void { try { // Load sqlite-vec extensions sqliteVec.load(db); - prettyConsole.log("sqlite-vec extensions loaded successfully."); + elizaLog.log("sqlite-vec extensions loaded successfully."); } catch (error) { - prettyConsole.error("Failed to load sqlite-vec extensions:", error); + elizaLog.error("Failed to load sqlite-vec extensions:", error); throw error; } } diff --git a/core/src/cli/colors.ts b/core/src/cli/colors.ts index 86209c1e..ef634bac 100644 --- a/core/src/cli/colors.ts +++ b/core/src/cli/colors.ts @@ -1,4 +1,4 @@ -export class PrettyConsole { +export class elizaLog { closeByNewLine = true; useIcons = true; logsTitle = "LOGS"; diff --git a/core/src/cli/config.ts b/core/src/cli/config.ts index 7162f8e1..96bcc97a 100644 --- a/core/src/cli/config.ts +++ b/core/src/cli/config.ts @@ -3,7 +3,7 @@ import yaml from "js-yaml"; import path from "path"; import { fileURLToPath } from "url"; import { Action } from "../core/types"; -import { prettyConsole } from "../index.ts"; +import { elizaLog } from "../index.ts"; const ROOT_DIR = path.resolve(fileURLToPath(import.meta.url), "../../../src"); @@ -30,13 +30,13 @@ export async function loadCustomActions( for (const config of actionConfigs) { const resolvedPath = path.resolve(ROOT_DIR, config.path); - prettyConsole.log(`Importing action from: ${resolvedPath}`); // Debugging log + elizaLog.log(`Importing action from: ${resolvedPath}`); // Debugging log try { const actionModule = await import(resolvedPath); actions.push(actionModule[config.name]); } catch (error) { - prettyConsole.error( + elizaLog.error( `Failed to import action from ${resolvedPath}:`, error ); diff --git a/core/src/cli/index.ts b/core/src/cli/index.ts index a2e60391..e96b0a8a 100644 --- a/core/src/cli/index.ts +++ b/core/src/cli/index.ts @@ -14,7 +14,7 @@ import { AgentRuntime } from "../core/runtime.ts"; import { defaultActions } from "../core/actions.ts"; import { Arguments } from "../types/index.ts"; import { loadActionConfigs, loadCustomActions } from "./config.ts"; -import { prettyConsole } from "../index.ts"; +import { elizaLog } from "../index.ts"; export async function initializeClients( character: Character, @@ -76,7 +76,6 @@ export function loadCharacters(charactersArg: string): Character[] { return path; }); - const loadedCharacters = []; if (characterPaths?.length > 0) { @@ -210,11 +209,11 @@ export async function startTelegram( runtime: IAgentRuntime, character: Character ) { - prettyConsole.log("🔍 Attempting to start Telegram bot..."); + elizaLog.log("🔍 Attempting to start Telegram bot..."); const botToken = runtime.getSetting("TELEGRAM_BOT_TOKEN"); if (!botToken) { - prettyConsole.error( + elizaLog.error( `❌ Telegram bot token is not set for character ${character.name}.` ); return null; @@ -223,12 +222,12 @@ export async function startTelegram( try { const telegramClient = new Client.TelegramClient(runtime, botToken); await telegramClient.start(); - prettyConsole.success( + elizaLog.success( `✅ Telegram client successfully started for character ${character.name}` ); return telegramClient; } catch (error) { - prettyConsole.error( + elizaLog.error( `❌ Error creating/starting Telegram client for ${character.name}:`, error ); @@ -237,7 +236,7 @@ export async function startTelegram( } export async function startTwitter(runtime: IAgentRuntime) { - prettyConsole.log("Starting Twitter clients..."); + elizaLog.log("Starting Twitter clients..."); const twitterSearchClient = new Client.TwitterSearchClient(runtime); await wait(); const twitterInteractionClient = new Client.TwitterInteractionClient( diff --git a/core/src/clients/discord/index.ts b/core/src/clients/discord/index.ts index 2a4e84d1..b7f1ed1e 100644 --- a/core/src/clients/discord/index.ts +++ b/core/src/clients/discord/index.ts @@ -24,7 +24,7 @@ import { MessageManager } from "./messages.ts"; import channelStateProvider from "./providers/channelState.ts"; import voiceStateProvider from "./providers/voiceState.ts"; import { VoiceManager } from "./voice.ts"; -import { prettyConsole } from "../../index.ts"; +import { elizaLog } from "../../index.ts"; export class DiscordClient extends EventEmitter { apiToken: string; @@ -130,16 +130,16 @@ export class DiscordClient extends EventEmitter { } private async onClientReady(readyClient: { user: { tag: any; id: any } }) { - prettyConsole.success(`Logged in as ${readyClient.user?.tag}`); - prettyConsole.success("Use this URL to add the bot to your server:"); - prettyConsole.success( + elizaLog.success(`Logged in as ${readyClient.user?.tag}`); + elizaLog.success("Use this URL to add the bot to your server:"); + elizaLog.success( `https://discord.com/api/oauth2/authorize?client_id=${readyClient.user?.id}&permissions=0&scope=bot%20applications.commands` ); await this.onReady(); } async handleReactionAdd(reaction: MessageReaction, user: User) { - prettyConsole.log("Reaction added"); + elizaLog.log("Reaction added"); // if (user.bot) return; let emoji = reaction.emoji.name; @@ -168,7 +168,9 @@ export class DiscordClient extends EventEmitter { const reactionMessage = `*<${emoji}>: "${truncatedContent}"*`; - const roomId = stringToUuid(reaction.message.channel.id + "-" + this.runtime.agentId); + const roomId = stringToUuid( + reaction.message.channel.id + "-" + this.runtime.agentId + ); const userIdUUID = stringToUuid(user.id + "-" + this.runtime.agentId); // Generate a unique UUID for the reaction @@ -200,7 +202,9 @@ export class DiscordClient extends EventEmitter { content: { text: reactionMessage, source: "discord", - inReplyTo: stringToUuid(reaction.message.id + "-" + this.runtime.agentId), // This is the ID of the original message + inReplyTo: stringToUuid( + reaction.message.id + "-" + this.runtime.agentId + ), // This is the ID of the original message }, roomId, createdAt: Date.now(), @@ -238,7 +242,9 @@ export class DiscordClient extends EventEmitter { const reactionMessage = `*Removed <${emoji} emoji> from: "${truncatedContent}"*`; - const roomId = stringToUuid(reaction.message.channel.id + "-" + this.runtime.agentId); + const roomId = stringToUuid( + reaction.message.channel.id + "-" + this.runtime.agentId + ); const userIdUUID = stringToUuid(user.id); // Generate a unique UUID for the reaction removal @@ -266,7 +272,9 @@ export class DiscordClient extends EventEmitter { content: { text: reactionMessage, source: "discord", - inReplyTo: stringToUuid(reaction.message.id + "-" + this.runtime.agentId), // This is the ID of the original message + inReplyTo: stringToUuid( + reaction.message.id + "-" + this.runtime.agentId + ), // This is the ID of the original message }, roomId, createdAt: Date.now(), diff --git a/core/src/clients/discord/messages.ts b/core/src/clients/discord/messages.ts index 32c4c04d..e30595a4 100644 --- a/core/src/clients/discord/messages.ts +++ b/core/src/clients/discord/messages.ts @@ -29,7 +29,7 @@ import { AttachmentManager } from "./attachments.ts"; import { messageHandlerTemplate, shouldRespondTemplate } from "./templates.ts"; import { InterestChannels } from "./types.ts"; import { VoiceManager } from "./voice.ts"; -import { prettyConsole } from "../../index.ts"; +import { elizaLog } from "../../index.ts"; const MAX_MESSAGE_LENGTH = 1900; @@ -39,11 +39,9 @@ export async function sendMessageInChunks( inReplyTo: string, files: any[] ): Promise { - const sentMessages: DiscordMessage[] = []; const messages = splitMessage(content); try { - for (let i = 0; i < messages.length; i++) { const message = messages[i]; if ( @@ -71,7 +69,7 @@ export async function sendMessageInChunks( } } } catch (error) { - prettyConsole.error("Error sending message:", error); + elizaLog.error("Error sending message:", error); } return sentMessages; @@ -110,14 +108,13 @@ function splitMessage(content: string): string[] { return messages; } - function canSendMessage(channel) { console.log("canSendMessage", channel); // if it is a DM channel, we can always send messages if (channel.type === ChannelType.DM) { return { canSend: true, - reason: null + reason: null, }; } const botMember = channel.guild?.members.cache.get(channel.client.user.id); @@ -125,7 +122,7 @@ function canSendMessage(channel) { if (!botMember) { return { canSend: false, - reason: 'Not a guild channel or bot member not found' + reason: "Not a guild channel or bot member not found", }; } @@ -133,12 +130,14 @@ function canSendMessage(channel) { const requiredPermissions = [ PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages, - PermissionsBitField.Flags.ReadMessageHistory + PermissionsBitField.Flags.ReadMessageHistory, ]; // Add thread-specific permission if it's a thread if (channel instanceof ThreadChannel) { - requiredPermissions.push(PermissionsBitField.Flags.SendMessagesInThreads); + requiredPermissions.push( + PermissionsBitField.Flags.SendMessagesInThreads + ); } // Check permissions @@ -147,19 +146,22 @@ function canSendMessage(channel) { if (!permissions) { return { canSend: false, - reason: 'Could not retrieve permissions' + reason: "Could not retrieve permissions", }; } // Check each required permission - const missingPermissions = requiredPermissions.filter(perm => !permissions.has(perm)); + const missingPermissions = requiredPermissions.filter( + (perm) => !permissions.has(perm) + ); return { canSend: missingPermissions.length === 0, missingPermissions: missingPermissions, - reason: missingPermissions.length > 0 - ? `Missing permissions: ${missingPermissions.map(p => String(p)).join(', ')}` - : null + reason: + missingPermissions.length > 0 + ? `Missing permissions: ${missingPermissions.map((p) => String(p)).join(", ")}` + : null, }; } @@ -183,7 +185,7 @@ export class MessageManager { if ( message.interaction || message.author.id === - this.client.user?.id /* || message.author?.bot*/ + this.client.user?.id /* || message.author?.bot*/ ) return; const userId = message.author.id as UUID; @@ -217,7 +219,9 @@ export class MessageManager { "discord" ); - const messageId = stringToUuid(message.id + "-" + this.runtime.agentId); + const messageId = stringToUuid( + message.id + "-" + this.runtime.agentId + ); let shouldIgnore = false; let shouldRespond = true; @@ -228,7 +232,11 @@ export class MessageManager { source: "discord", url: message.url, inReplyTo: message.reference?.messageId - ? stringToUuid(message.reference.messageId + "-" + this.runtime.agentId) + ? stringToUuid( + message.reference.messageId + + "-" + + this.runtime.agentId + ) : undefined, }; @@ -263,10 +271,12 @@ export class MessageManager { })) as State; if (!canSendMessage(message.channel).canSend) { - return prettyConsole.warn(`Cannot send message to channel ${message.channel}`, canSendMessage(message.channel)); + return elizaLog.warn( + `Cannot send message to channel ${message.channel}`, + canSendMessage(message.channel) + ); } - if (!shouldIgnore) { shouldIgnore = await this._shouldIgnore(message); } @@ -322,7 +332,9 @@ export class MessageManager { console.log("Response content:", responseContent); responseContent.text = responseContent.text?.trim(); - responseContent.inReplyTo = stringToUuid(message.id + "-" + this.runtime.agentId); + responseContent.inReplyTo = stringToUuid( + message.id + "-" + this.runtime.agentId + ); if (!responseContent.text) { return; @@ -334,7 +346,9 @@ export class MessageManager { ) => { try { if (message.id && !content.inReplyTo) { - content.inReplyTo = stringToUuid(message.id + "-" + this.runtime.agentId); + content.inReplyTo = stringToUuid( + message.id + "-" + this.runtime.agentId + ); } if (message.channel.type === ChannelType.GuildVoice) { // For voice channels, use text-to-speech @@ -348,7 +362,9 @@ export class MessageManager { audioStream ); const memory: Memory = { - id: stringToUuid(message.id + "-" + this.runtime.agentId), + id: stringToUuid( + message.id + "-" + this.runtime.agentId + ), userId: this.runtime.agentId, agentId: this.runtime.agentId, content, @@ -378,7 +394,9 @@ export class MessageManager { } const memory: Memory = { - id: stringToUuid(m.id + "-" + this.runtime.agentId), + id: stringToUuid( + m.id + "-" + this.runtime.agentId + ), userId: this.runtime.agentId, agentId: this.runtime.agentId, content: { diff --git a/core/src/clients/telegram/src/index.ts b/core/src/clients/telegram/src/index.ts index c378db8c..92fe7edd 100644 --- a/core/src/clients/telegram/src/index.ts +++ b/core/src/clients/telegram/src/index.ts @@ -2,7 +2,7 @@ import { Context, Telegraf } from "telegraf"; import { IAgentRuntime } from "../../../core/types.ts"; import { MessageManager } from "./messageManager.ts"; -import { prettyConsole } from "../../../index.ts"; +import { elizaLog } from "../../../index.ts"; export class TelegramClient { private bot: Telegraf; @@ -10,18 +10,18 @@ export class TelegramClient { private messageManager: MessageManager; constructor(runtime: IAgentRuntime, botToken: string) { - prettyConsole.log("📱 Constructing new TelegramClient..."); + elizaLog.log("📱 Constructing new TelegramClient..."); this.runtime = runtime; this.bot = new Telegraf(botToken); this.messageManager = new MessageManager(this.bot, this.runtime); - prettyConsole.log("Setting up message handler..."); + elizaLog.log("Setting up message handler..."); this.bot.on("message", async (ctx) => { try { - prettyConsole.log("📥 Received message:", ctx.message); + elizaLog.log("📥 Received message:", ctx.message); await this.messageManager.handleMessage(ctx); } catch (error) { - prettyConsole.error("❌ Error handling message:", error); + elizaLog.error("❌ Error handling message:", error); await ctx.reply( "An error occurred while processing your message." ); @@ -30,51 +30,48 @@ export class TelegramClient { // Handle specific message types for better logging this.bot.on("photo", (ctx) => { - prettyConsole.log( + elizaLog.log( "📸 Received photo message with caption:", ctx.message.caption ); }); this.bot.on("document", (ctx) => { - prettyConsole.log( + elizaLog.log( "📎 Received document message:", ctx.message.document.file_name ); }); this.bot.catch((err, ctx) => { - prettyConsole.error( - `❌ Telegram Error for ${ctx.updateType}:`, - err - ); + elizaLog.error(`❌ Telegram Error for ${ctx.updateType}:`, err); ctx.reply("An unexpected error occurred. Please try again later."); }); - prettyConsole.log("✅ TelegramClient constructor completed"); + elizaLog.log("✅ TelegramClient constructor completed"); } public async start(): Promise { - prettyConsole.log("🚀 Starting Telegram bot..."); + elizaLog.log("🚀 Starting Telegram bot..."); try { this.bot.launch({ dropPendingUpdates: true, }); - prettyConsole.log( + elizaLog.log( "✨ Telegram bot successfully launched and is running!" ); - prettyConsole.log(`Bot username: @${this.bot.botInfo?.username}`); + elizaLog.log(`Bot username: @${this.bot.botInfo?.username}`); // Graceful shutdown handlers const shutdownHandler = async (signal: string) => { - prettyConsole.log( + elizaLog.log( `⚠️ Received ${signal}. Shutting down Telegram bot gracefully...` ); try { await this.stop(); - prettyConsole.log("🛑 Telegram bot stopped gracefully"); + elizaLog.log("🛑 Telegram bot stopped gracefully"); } catch (error) { - prettyConsole.error( + elizaLog.error( "❌ Error during Telegram bot shutdown:", error ); @@ -86,14 +83,14 @@ export class TelegramClient { process.once("SIGTERM", () => shutdownHandler("SIGTERM")); process.once("SIGHUP", () => shutdownHandler("SIGHUP")); } catch (error) { - prettyConsole.error("❌ Failed to launch Telegram bot:", error); + elizaLog.error("❌ Failed to launch Telegram bot:", error); throw error; } } public async stop(): Promise { - prettyConsole.log("Stopping Telegram bot..."); + elizaLog.log("Stopping Telegram bot..."); await this.bot.stop(); - prettyConsole.log("Telegram bot stopped"); + elizaLog.log("Telegram bot stopped"); } } diff --git a/core/src/clients/twitter/base.ts b/core/src/clients/twitter/base.ts index 51e62347..32ce9cca 100644 --- a/core/src/clients/twitter/base.ts +++ b/core/src/clients/twitter/base.ts @@ -21,7 +21,7 @@ import ImageDescriptionService from "../../services/image.ts"; import { glob } from "glob"; import { stringToUuid } from "../../core/uuid.ts"; -import { prettyConsole } from "../../index.ts"; +import { elizaLog } from "../../index.ts"; export function extractAnswer(text: string): string { const startIndex = text.indexOf("Answer: ") + 8; @@ -382,7 +382,9 @@ export class ClientBase extends EventEmitter { await this.runtime.messageManager.getMemoriesByRoomIds({ agentId: this.runtime.agentId, roomIds: cachedResults.map((tweet) => - stringToUuid(tweet.conversationId + "-" + this.runtime.agentId) + stringToUuid( + tweet.conversationId + "-" + this.runtime.agentId + ) ), }); @@ -426,11 +428,15 @@ export class ClientBase extends EventEmitter { url: tweet.permanentUrl, source: "twitter", inReplyTo: tweet.inReplyToStatusId - ? stringToUuid(tweet.inReplyToStatusId + "-" + this.runtime.agentId) + ? stringToUuid( + tweet.inReplyToStatusId + + "-" + + this.runtime.agentId + ) : undefined, } as Content; - prettyConsole.log("Creating memory for tweet", tweet.id); + elizaLog.log("Creating memory for tweet", tweet.id); // check if it already exists const memory = @@ -438,7 +444,7 @@ export class ClientBase extends EventEmitter { stringToUuid(tweet.id + "-" + this.runtime.agentId) ); if (memory) { - prettyConsole.log( + elizaLog.log( "Memory already exists, skipping timeline population" ); break; @@ -455,7 +461,7 @@ export class ClientBase extends EventEmitter { }); } - prettyConsole.log( + elizaLog.log( `Populated ${tweetsToSave.length} missing tweets from the cache.` ); return; @@ -499,7 +505,10 @@ export class ClientBase extends EventEmitter { // Filter out the tweets that already exist in the database const tweetsToSave = allTweets.filter( - (tweet) => !existingMemoryIds.has(stringToUuid(tweet.id + "-" + this.runtime.agentId)) + (tweet) => + !existingMemoryIds.has( + stringToUuid(tweet.id + "-" + this.runtime.agentId) + ) ); await this.runtime.ensureUserExists( diff --git a/core/src/clients/twitter/utils.ts b/core/src/clients/twitter/utils.ts index 7ed50478..dc62a03f 100644 --- a/core/src/clients/twitter/utils.ts +++ b/core/src/clients/twitter/utils.ts @@ -3,7 +3,7 @@ import { embeddingZeroVector } from "../../core/memory.ts"; import { Content, Memory, UUID } from "../../core/types.ts"; import { stringToUuid } from "../../core/uuid.ts"; import { ClientBase } from "./base.ts"; -import { prettyConsole } from "../../index.ts"; +import { elizaLog } from "../../index.ts"; const MAX_TWEET_LENGTH = 240; @@ -37,7 +37,7 @@ export async function buildConversationThread( async function processThread(currentTweet: Tweet) { if (!currentTweet) { - prettyConsole.log("No current tweet found"); + elizaLog.log("No current tweet found"); return; } // check if the current tweet has already been saved @@ -45,8 +45,10 @@ export async function buildConversationThread( stringToUuid(currentTweet.id + "-" + client.runtime.agentId) ); if (!memory) { - prettyConsole.log("Creating memory for tweet", currentTweet.id); - const roomId = stringToUuid(currentTweet.conversationId + "-" + client.runtime.agentId); + elizaLog.log("Creating memory for tweet", currentTweet.id); + const roomId = stringToUuid( + currentTweet.conversationId + "-" + client.runtime.agentId + ); const userId = stringToUuid(currentTweet.userId); await client.runtime.ensureConnection( @@ -58,14 +60,20 @@ export async function buildConversationThread( ); client.runtime.messageManager.createMemory({ - id: stringToUuid(currentTweet.id + "-" + client.runtime.agentId), + id: stringToUuid( + currentTweet.id + "-" + client.runtime.agentId + ), agentId: client.runtime.agentId, content: { text: currentTweet.text, source: "twitter", url: currentTweet.permanentUrl, inReplyTo: currentTweet.inReplyToStatusId - ? stringToUuid(currentTweet.inReplyToStatusId + "-" + client.runtime.agentId) + ? stringToUuid( + currentTweet.inReplyToStatusId + + "-" + + client.runtime.agentId + ) : undefined, }, createdAt: currentTweet.timestamp * 1000, @@ -143,7 +151,9 @@ export async function sendTweetChunks( source: "twitter", url: tweet.permanentUrl, inReplyTo: tweet.inReplyToStatusId - ? stringToUuid(tweet.inReplyToStatusId + "-" + client.runtime.agentId) + ? stringToUuid( + tweet.inReplyToStatusId + "-" + client.runtime.agentId + ) : undefined, }, roomId, diff --git a/core/src/core/generation.ts b/core/src/core/generation.ts index bfd1fdd9..566ce867 100644 --- a/core/src/core/generation.ts +++ b/core/src/core/generation.ts @@ -14,7 +14,7 @@ import models from "./models.ts"; import { generateText as aiGenerateText } from "ai"; import { createAnthropic } from "@ai-sdk/anthropic"; -import { prettyConsole } from "../index.ts"; +import { elizaLog } from "../index.ts"; /** * Send a message to the model for a text generateText - receive a string back and parse how you'd like @@ -56,7 +56,7 @@ export async function generateText({ const apiKey = runtime.token; try { - prettyConsole.log( + elizaLog.log( `Trimming context to max length of ${max_context_length} tokens.` ); context = await trimTokens(context, max_context_length, "gpt-4o"); @@ -64,17 +64,17 @@ export async function generateText({ let response: string; const _stop = stop || models[provider].settings.stop; - prettyConsole.log( + elizaLog.log( `Using provider: ${provider}, model: ${model}, temperature: ${temperature}, max response length: ${max_response_length}` ); switch (provider) { case ModelProvider.OPENAI: case ModelProvider.LLAMACLOUD: { - prettyConsole.log("Initializing OpenAI model."); + elizaLog.log("Initializing OpenAI model."); const openai = createOpenAI({ apiKey }); - console.log('****** CONTEXT\n', context) + console.log("****** CONTEXT\n", context); const { text: openaiResponse } = await aiGenerateText({ model: openai.languageModel(model), @@ -88,12 +88,12 @@ export async function generateText({ console.log("****** RESPONSE\n", openaiResponse); response = openaiResponse; - prettyConsole.log("Received response from OpenAI model."); + elizaLog.log("Received response from OpenAI model."); break; } case ModelProvider.ANTHROPIC: { - prettyConsole.log("Initializing Anthropic model."); + elizaLog.log("Initializing Anthropic model."); const anthropic = createAnthropic({ apiKey }); @@ -107,12 +107,12 @@ export async function generateText({ }); response = anthropicResponse; - prettyConsole.log("Received response from Anthropic model."); + elizaLog.log("Received response from Anthropic model."); break; } case ModelProvider.GROK: { - prettyConsole.log("Initializing Grok model."); + elizaLog.log("Initializing Grok model."); const grok = createGroq({ apiKey }); const { text: grokResponse } = await aiGenerateText({ @@ -127,7 +127,7 @@ export async function generateText({ }); response = grokResponse; - prettyConsole.log("Received response from Grok model."); + elizaLog.log("Received response from Grok model."); break; } @@ -150,28 +150,26 @@ export async function generateText({ } case ModelProvider.LLAMALOCAL: { - prettyConsole.log( - "Using local Llama model for text completion." - ); + elizaLog.log("Using local Llama model for text completion."); response = await runtime.llamaService.queueTextCompletion( - context, - temperature, - _stop, - frequency_penalty, - presence_penalty, - max_response_length + context, + temperature, + _stop, + frequency_penalty, + presence_penalty, + max_response_length ); - prettyConsole.log("Received response from local Llama model."); + elizaLog.log("Received response from local Llama model."); break; } case ModelProvider.REDPILL: { - prettyConsole.log("Initializing RedPill model."); + elizaLog.log("Initializing RedPill model."); const serverUrl = models[provider].endpoint; const openai = createOpenAI({ apiKey, baseURL: serverUrl }); - console.log('****** MODEL\n', model) - console.log('****** CONTEXT\n', context) + console.log("****** MODEL\n", model); + console.log("****** CONTEXT\n", context); const { text: openaiResponse } = await aiGenerateText({ model: openai.languageModel(model), @@ -185,20 +183,20 @@ export async function generateText({ console.log("****** RESPONSE\n", openaiResponse); response = openaiResponse; - prettyConsole.log("Received response from OpenAI model."); + elizaLog.log("Received response from OpenAI model."); break; } default: { const errorMessage = `Unsupported provider: ${provider}`; - prettyConsole.error(errorMessage); + elizaLog.error(errorMessage); throw new Error(errorMessage); } } return response; } catch (error) { - prettyConsole.error("Error in generateText:", error); + elizaLog.error("Error in generateText:", error); throw error; } } @@ -248,37 +246,34 @@ export async function generateShouldRespond({ let retryDelay = 1000; while (true) { try { - prettyConsole.log( - "Attempting to generate text with context:", - context - ); + elizaLog.log("Attempting to generate text with context:", context); const response = await generateText({ runtime, context, modelClass, }); - prettyConsole.log("Received response from generateText:", response); + elizaLog.log("Received response from generateText:", response); const parsedResponse = parseShouldRespondFromText(response.trim()); if (parsedResponse) { - prettyConsole.log("Parsed response:", parsedResponse); + elizaLog.log("Parsed response:", parsedResponse); return parsedResponse; } else { - prettyConsole.log("generateShouldRespond no response"); + elizaLog.log("generateShouldRespond no response"); } } catch (error) { - prettyConsole.error("Error in generateShouldRespond:", error); + elizaLog.error("Error in generateShouldRespond:", error); if ( error instanceof TypeError && error.message.includes("queueTextCompletion") ) { - prettyConsole.error( + elizaLog.error( "TypeError: Cannot read properties of null (reading 'queueTextCompletion')" ); } } - prettyConsole.log(`Retrying in ${retryDelay}ms...`); + elizaLog.log(`Retrying in ${retryDelay}ms...`); await new Promise((resolve) => setTimeout(resolve, retryDelay)); retryDelay *= 2; } @@ -369,7 +364,7 @@ export async function generateTrueOrFalse({ return parsedResponse; } } catch (error) { - prettyConsole.error("Error in generateTrueOrFalse:", error); + elizaLog.error("Error in generateTrueOrFalse:", error); } await new Promise((resolve) => setTimeout(resolve, retryDelay)); @@ -402,7 +397,7 @@ export async function generateTextArray({ modelClass: string; }): Promise { if (!context) { - prettyConsole.error("generateTextArray context is empty"); + elizaLog.error("generateTextArray context is empty"); return []; } let retryDelay = 1000; @@ -420,7 +415,7 @@ export async function generateTextArray({ return parsedResponse; } } catch (error) { - prettyConsole.error("Error in generateTextArray:", error); + elizaLog.error("Error in generateTextArray:", error); } await new Promise((resolve) => setTimeout(resolve, retryDelay)); @@ -438,7 +433,7 @@ export async function generateObject({ modelClass: string; }): Promise { if (!context) { - prettyConsole.error("generateObject context is empty"); + elizaLog.error("generateObject context is empty"); return null; } let retryDelay = 1000; @@ -447,16 +442,16 @@ export async function generateObject({ try { // this is slightly different than generateObjectArray, in that we parse object, not object array const response = await generateText({ - runtime, - context, - modelClass, - }); - const parsedResponse = parseJSONObjectFromText(response); - if (parsedResponse) { + runtime, + context, + modelClass, + }); + const parsedResponse = parseJSONObjectFromText(response); + if (parsedResponse) { return parsedResponse; } } catch (error) { - prettyConsole.error("Error in generateObject:", error); + elizaLog.error("Error in generateObject:", error); } await new Promise((resolve) => setTimeout(resolve, retryDelay)); @@ -474,7 +469,7 @@ export async function generateObjectArray({ modelClass: string; }): Promise { if (!context) { - prettyConsole.error("generateObjectArray context is empty"); + elizaLog.error("generateObjectArray context is empty"); return []; } let retryDelay = 1000; @@ -492,7 +487,7 @@ export async function generateObjectArray({ return parsedResponse; } } catch (error) { - prettyConsole.error("Error in generateTextArray:", error); + elizaLog.error("Error in generateTextArray:", error); } await new Promise((resolve) => setTimeout(resolve, retryDelay)); @@ -535,17 +530,17 @@ export async function generateMessageResponse({ // try parsing the response as JSON, if null then try again const parsedContent = parseJSONObjectFromText(response) as Content; if (!parsedContent) { - prettyConsole.log("parsedContent is null, retrying"); + elizaLog.log("parsedContent is null, retrying"); continue; } return parsedContent; } catch (error) { - prettyConsole.error("ERROR:", error); + elizaLog.error("ERROR:", error); // wait for 2 seconds retryLength *= 2; await new Promise((resolve) => setTimeout(resolve, retryLength)); - prettyConsole.log("Retrying..."); + elizaLog.log("Retrying..."); } } } diff --git a/core/src/core/imageGenModels.ts b/core/src/core/imageGenModels.ts index 86bbe422..78969edd 100644 --- a/core/src/core/imageGenModels.ts +++ b/core/src/core/imageGenModels.ts @@ -3,7 +3,7 @@ export enum ImageGenModel { Dalle = "Dalle", } -const imageGenModels = { +export const imageGenModels = { [ImageGenModel.TogetherAI]: { steps: 4, subModel: "black-forest-labs/FLUX.1-schnell", diff --git a/core/src/core/runtime.ts b/core/src/core/runtime.ts index 7ad605b7..76907ba9 100644 --- a/core/src/core/runtime.ts +++ b/core/src/core/runtime.ts @@ -55,7 +55,7 @@ import settings from "./settings.ts"; import { UUID, type Actor } from "./types.ts"; import { stringToUuid } from "./uuid.ts"; import { ImageGenModel } from "./imageGenModels.ts"; -import { prettyConsole } from "../index.ts"; +import { elizaLog } from "../index.ts"; /** * Represents the runtime environment for an agent, handling message processing, @@ -405,7 +405,7 @@ export class AgentRuntime implements IAgentRuntime { * @param action The action to register. */ registerAction(action: Action) { - prettyConsole.success(`Registering action: ${action.name}`); + elizaLog.success(`Registering action: ${action.name}`); this.actions.push(action); } @@ -437,7 +437,7 @@ export class AgentRuntime implements IAgentRuntime { callback?: HandlerCallback ): Promise { if (!responses[0].content?.action) { - prettyConsole.warn("No action found in the response content."); + elizaLog.warn("No action found in the response content."); return; } @@ -445,7 +445,7 @@ export class AgentRuntime implements IAgentRuntime { .toLowerCase() .replace("_", ""); - prettyConsole.success(`Normalized action: ${normalizedAction}`); + elizaLog.success(`Normalized action: ${normalizedAction}`); let action = this.actions.find( (a: { name: string }) => @@ -457,7 +457,7 @@ export class AgentRuntime implements IAgentRuntime { ); if (!action) { - prettyConsole.info("Attempting to find action in similes."); + elizaLog.info("Attempting to find action in similes."); for (const _action of this.actions) { const simileAction = _action.similes.find( (simile) => @@ -471,28 +471,23 @@ export class AgentRuntime implements IAgentRuntime { ); if (simileAction) { action = _action; - prettyConsole.success( - `Action found in similes: ${action.name}` - ); + elizaLog.success(`Action found in similes: ${action.name}`); break; } } } if (!action) { - prettyConsole.error( - "No action found for", - responses[0].content.action - ); + elizaLog.error("No action found for", responses[0].content.action); return; } if (!action.handler) { - prettyConsole.error(`Action ${action.name} has no handler.`); + elizaLog.error(`Action ${action.name} has no handler.`); return; } - prettyConsole.success(`Executing handler for action: ${action.name}`); + elizaLog.success(`Executing handler for action: ${action.name}`); await action.handler(this, message, state, {}, callback); } @@ -598,7 +593,7 @@ export class AgentRuntime implements IAgentRuntime { email: email || (userName || "Bot") + "@" + source || "Unknown", // Temporary details: { summary: "" }, }); - prettyConsole.success(`User ${userName} created successfully.`); + elizaLog.success(`User ${userName} created successfully.`); } } @@ -607,7 +602,7 @@ export class AgentRuntime implements IAgentRuntime { await this.databaseAdapter.getParticipantsForRoom(roomId); if (!participants.includes(userId)) { await this.databaseAdapter.addParticipant(userId, roomId); - prettyConsole.log( + elizaLog.log( `User ${userId} linked to room ${roomId} successfully.` ); } @@ -653,7 +648,7 @@ export class AgentRuntime implements IAgentRuntime { const room = await this.databaseAdapter.getRoom(roomId); if (!room) { await this.databaseAdapter.createRoom(roomId); - prettyConsole.log(`Room ${roomId} created successfully.`); + elizaLog.log(`Room ${roomId} created successfully.`); } } diff --git a/core/src/core/settings.ts b/core/src/core/settings.ts index d9918af9..9455091e 100644 --- a/core/src/core/settings.ts +++ b/core/src/core/settings.ts @@ -1,5 +1,5 @@ -import dotenv from "dotenv"; -dotenv.config(); +import { config } from "dotenv"; +config(); const settings = process.env; diff --git a/core/src/index.ts b/core/src/index.ts index 54597239..c6161f40 100644 --- a/core/src/index.ts +++ b/core/src/index.ts @@ -3,107 +3,14 @@ export * from "./actions/index.ts"; export * from "./clients/index.ts"; export * from "./adapters/index.ts"; export * from "./providers/index.ts"; +export * from "./core/types.ts"; +export * from "./core/imageGenModels.ts"; +export * from "./cli/index.ts"; -import * as Client from "./clients/index.ts"; +import { elizaLog as Logging } from "./cli/colors.ts"; -import { Character } from "./core/types.ts"; - -import readline from "readline"; -import { Arguments } from "./types/index.ts"; -import { - createAgentRuntime, - createDirectRuntime, - getTokenForProvider, - initializeClients, - initializeDatabase, - loadCharacters, - parseArguments, -} from "./cli/index.ts"; -import { PrettyConsole } from "./cli/colors.ts"; - -let argv: Arguments = parseArguments(); -let basePath = "./"; -// if argv.isroot is true, then set the base path to "../" -if (argv.isRoot) { - basePath = "../"; -} - -// if the path doesnt start with a /, add the base path to the beginning of the path -if (!argv.characters?.startsWith("/")) { - argv.characters = `${basePath}${argv.characters}`; -} - -let characters = loadCharacters(argv.characters); - -const directClient = new Client.DirectClient(); - -// Initialize the pretty console -export const prettyConsole = new PrettyConsole(); -prettyConsole.clear(); -prettyConsole.closeByNewLine = true; -prettyConsole.useIcons = true; - -// Start the direct client -const serverPort = parseInt(process.env.SERVER_PORT || "3000"); -directClient.start(serverPort); - -async function startAgent(character: Character) { - prettyConsole.success(`Starting agent for character ${character.name}`); - const token = getTokenForProvider(character.modelProvider, character); - const db = initializeDatabase(); - - const runtime = await createAgentRuntime(character, db, token); - const directRuntime = createDirectRuntime(character, db, token); - - const clients = await initializeClients(character, runtime); - directClient.registerAgent(await directRuntime); - - return clients; -} - -const startAgents = async () => { - for (const character of characters) { - await startAgent(character); - } -}; - -startAgents(); - -const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, -}); - -function chat() { - rl.question("You: ", async (input) => { - if (input.toLowerCase() === "exit") { - rl.close(); - return; - } - - const agentId = characters[0].name.toLowerCase(); - const response = await fetch( - `http://localhost:3000/${agentId}/message`, - { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - text: input, - userId: "user", - userName: "User", - }), - } - ); - - const data = await response.json(); - for (const message of data) { - console.log(`${characters[0].name}: ${message.text}`); - } - chat(); - }); -} - -console.log("Chat started. Type 'exit' to quit."); -chat(); +// // Initialize the pretty console +export const elizaLog = new Logging(); +elizaLog.clear(); +elizaLog.closeByNewLine = true; +elizaLog.useIcons = true; diff --git a/core/src/test_resources/cache.ts b/core/src/test_resources/cache.ts index b8fbef0b..3f42011e 100644 --- a/core/src/test_resources/cache.ts +++ b/core/src/test_resources/cache.ts @@ -1,8 +1,7 @@ // getCachedEmbeddings // check cache.json for embedding where the key is a stringified version of the memory and the value is a number array +import fs from "fs"; export const getCachedEmbeddings = async (text: string) => { - const fs = await import("fs"); - if (!fs.existsSync("./embedding-cache.json")) { fs.writeFileSync("./embedding-cache.json", "{}"); } @@ -20,8 +19,6 @@ export const writeCachedEmbedding = async ( text: string, embedding: number[] ) => { - const fs = await import("fs"); - // check if ./embedding-cache.json exists, if it doesn't, write {} to it if (!fs.existsSync("./embedding-cache.json")) { fs.writeFileSync("./embedding-cache.json", "{}"); diff --git a/core/src/test_resources/report.ts b/core/src/test_resources/report.ts index 70d4a37c..7e10e600 100644 --- a/core/src/test_resources/report.ts +++ b/core/src/test_resources/report.ts @@ -1,3 +1,5 @@ +import fs from "fs"; + interface TestResult { testName: string; attempts: number; @@ -6,7 +8,7 @@ interface TestResult { } export async function deleteReport() { - const { existsSync, unlinkSync } = await import("fs"); + const { existsSync, unlinkSync } = fs; // Define the path to the test-report.json file const reportPath = "./test-report.json"; @@ -24,7 +26,7 @@ export async function addToReport( successful: number, successRate: number ) { - const { existsSync, readFileSync, writeFileSync } = await import("fs"); + const { existsSync, readFileSync, writeFileSync } = fs; // Define the path to the test-report.json file const reportPath = "./test-report.json"; @@ -65,7 +67,7 @@ export async function addToReport( } export async function logReport() { - const { existsSync, readFileSync } = await import("fs"); + const { existsSync, readFileSync } = fs; const colors = await import("ansi-colors"); // Define the path to the test-report.json file diff --git a/core/tsconfig.json b/core/tsconfig.json index f10a566a..1c75df86 100644 --- a/core/tsconfig.json +++ b/core/tsconfig.json @@ -1,26 +1,12 @@ { + "extends": "../tsconfig.json", "compilerOptions": { - "target": "ESNext", - "module": "ESNext", - "lib": ["ESNext", "dom"], - "moduleResolution": "Bundler", - "outDir": "./dist", - "rootDir": "./src", - "strict": false, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": false, - "allowImportingTsExtensions": true, - "declaration": true, - "emitDeclarationOnly": true, - "resolveJsonModule": true, - "noImplicitAny": false, - "allowJs": true, - "checkJs": false, - "noEmitOnError": false, - "moduleDetection": "force", - "allowArbitraryExtensions": true, - "typeRoots": ["./node_modules/@types", "./types", "./node_modules/jest/types"] + "typeRoots": [ + "./node_modules/@types", + "./types", + "./node_modules/jest/types" + ], + "rootDir": "./src" }, "include": ["src/**/*"], "exclude": ["node_modules", "dist", "src/**/*.d.ts", "types/**/*.test.ts"] diff --git a/core/tsup.config.ts b/core/tsup.config.ts new file mode 100644 index 00000000..a4e76a43 --- /dev/null +++ b/core/tsup.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from "tsup"; + +export default defineConfig({ + entry: ["src/index.ts"], + outDir: "dist", + sourcemap: true, + clean: true, + format: ["cjs"], // Ensure you're targeting CommonJS + external: [ + "dotenv", // Externalize dotenv to prevent bundling + "fs", // Externalize fs to use Node.js built-in module + "path", // Externalize other built-ins if necessary + // Add other modules you want to externalize + ], +}); diff --git a/core/types/index.d.ts b/core/types/index.d.ts deleted file mode 100644 index 9cea1ee1..00000000 --- a/core/types/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare global { - interface Buffer extends Uint8Array { - } -} -export {}; diff --git a/core/types/index.ts b/core/types/index.ts deleted file mode 100644 index e2e35b58..00000000 --- a/core/types/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare global { - interface Buffer extends Uint8Array {} -} - -export {}; diff --git a/docs/docs/api/globals.md b/docs/docs/api/globals.md index 121ab97e..25d924d0 100644 --- a/docs/docs/api/globals.md +++ b/docs/docs/api/globals.md @@ -29,7 +29,7 @@ - [muteRoom](variables/muteRoom.md) - [none](variables/none.md) - [orderBookProvider](variables/orderBookProvider.md) -- [prettyConsole](variables/prettyConsole.md) +- [elizaLog](variables/elizaLog.md) - [shouldContinueTemplate](variables/shouldContinueTemplate.md) - [shouldFollowTemplate](variables/shouldFollowTemplate.md) - [shouldMuteTemplate](variables/shouldMuteTemplate.md) diff --git a/docs/docs/api/typedoc-sidebar.cjs b/docs/docs/api/typedoc-sidebar.cjs index 0dc05f69..c476a9a7 100644 --- a/docs/docs/api/typedoc-sidebar.cjs +++ b/docs/docs/api/typedoc-sidebar.cjs @@ -1,4 +1,172 @@ // @ts-check /** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */ -const typedocSidebar = { items: [{"type":"category","label":"Classes","items":[{"type":"doc","id":"api/classes/DirectClient","label":"DirectClient"},{"type":"doc","id":"api/classes/DiscordClient","label":"DiscordClient"},{"type":"doc","id":"api/classes/PostgresDatabaseAdapter","label":"PostgresDatabaseAdapter"},{"type":"doc","id":"api/classes/SqliteDatabaseAdapter","label":"SqliteDatabaseAdapter"},{"type":"doc","id":"api/classes/TelegramClient","label":"TelegramClient"},{"type":"doc","id":"api/classes/TokenProvider","label":"TokenProvider"},{"type":"doc","id":"api/classes/TwitterGenerationClient","label":"TwitterGenerationClient"},{"type":"doc","id":"api/classes/TwitterInteractionClient","label":"TwitterInteractionClient"},{"type":"doc","id":"api/classes/TwitterSearchClient","label":"TwitterSearchClient"}]},{"type":"category","label":"Interfaces","items":[{"type":"doc","id":"api/interfaces/CreateAndBuyContent","label":"CreateAndBuyContent"}]},{"type":"category","label":"Variables","items":[{"type":"doc","id":"api/variables/askClaude","label":"askClaude"},{"type":"doc","id":"api/variables/boredomProvider","label":"boredomProvider"},{"type":"doc","id":"api/variables/claudeHandlerTemplate","label":"claudeHandlerTemplate"},{"type":"doc","id":"api/variables/continueAction","label":"continueAction"},{"type":"doc","id":"api/variables/executeSwap","label":"executeSwap"},{"type":"doc","id":"api/variables/followRoom","label":"followRoom"},{"type":"doc","id":"api/variables/ignore","label":"ignore"},{"type":"doc","id":"api/variables/imageGeneration","label":"imageGeneration"},{"type":"doc","id":"api/variables/muteRoom","label":"muteRoom"},{"type":"doc","id":"api/variables/none","label":"none"},{"type":"doc","id":"api/variables/orderBookProvider","label":"orderBookProvider"},{"type":"doc","id":"api/variables/prettyConsole","label":"prettyConsole"},{"type":"doc","id":"api/variables/shouldContinueTemplate","label":"shouldContinueTemplate"},{"type":"doc","id":"api/variables/shouldFollowTemplate","label":"shouldFollowTemplate"},{"type":"doc","id":"api/variables/shouldMuteTemplate","label":"shouldMuteTemplate"},{"type":"doc","id":"api/variables/shouldUnmuteTemplate","label":"shouldUnmuteTemplate"},{"type":"doc","id":"api/variables/timeProvider","label":"timeProvider"},{"type":"doc","id":"api/variables/tokenProvider","label":"tokenProvider"},{"type":"doc","id":"api/variables/unfollowRoom","label":"unfollowRoom"},{"type":"doc","id":"api/variables/unmuteRoom","label":"unmuteRoom"},{"type":"doc","id":"api/variables/walletProvider","label":"walletProvider"}]},{"type":"category","label":"Functions","items":[{"type":"doc","id":"api/functions/buyToken","label":"buyToken"},{"type":"doc","id":"api/functions/createAndBuyToken","label":"createAndBuyToken"},{"type":"doc","id":"api/functions/generateCaption","label":"generateCaption"},{"type":"doc","id":"api/functions/generateImage","label":"generateImage"},{"type":"doc","id":"api/functions/isCreateAndBuyContent","label":"isCreateAndBuyContent"},{"type":"doc","id":"api/functions/sellToken","label":"sellToken"}]}]}; -module.exports = typedocSidebar.items; \ No newline at end of file +const typedocSidebar = { + items: [ + { + type: "category", + label: "Classes", + items: [ + { type: "doc", id: "api/classes/DirectClient", label: "DirectClient" }, + { + type: "doc", + id: "api/classes/DiscordClient", + label: "DiscordClient", + }, + { + type: "doc", + id: "api/classes/PostgresDatabaseAdapter", + label: "PostgresDatabaseAdapter", + }, + { + type: "doc", + id: "api/classes/SqliteDatabaseAdapter", + label: "SqliteDatabaseAdapter", + }, + { + type: "doc", + id: "api/classes/TelegramClient", + label: "TelegramClient", + }, + { + type: "doc", + id: "api/classes/TokenProvider", + label: "TokenProvider", + }, + { + type: "doc", + id: "api/classes/TwitterGenerationClient", + label: "TwitterGenerationClient", + }, + { + type: "doc", + id: "api/classes/TwitterInteractionClient", + label: "TwitterInteractionClient", + }, + { + type: "doc", + id: "api/classes/TwitterSearchClient", + label: "TwitterSearchClient", + }, + ], + }, + { + type: "category", + label: "Interfaces", + items: [ + { + type: "doc", + id: "api/interfaces/CreateAndBuyContent", + label: "CreateAndBuyContent", + }, + ], + }, + { + type: "category", + label: "Variables", + items: [ + { type: "doc", id: "api/variables/askClaude", label: "askClaude" }, + { + type: "doc", + id: "api/variables/boredomProvider", + label: "boredomProvider", + }, + { + type: "doc", + id: "api/variables/claudeHandlerTemplate", + label: "claudeHandlerTemplate", + }, + { + type: "doc", + id: "api/variables/continueAction", + label: "continueAction", + }, + { type: "doc", id: "api/variables/executeSwap", label: "executeSwap" }, + { type: "doc", id: "api/variables/followRoom", label: "followRoom" }, + { type: "doc", id: "api/variables/ignore", label: "ignore" }, + { + type: "doc", + id: "api/variables/imageGeneration", + label: "imageGeneration", + }, + { type: "doc", id: "api/variables/muteRoom", label: "muteRoom" }, + { type: "doc", id: "api/variables/none", label: "none" }, + { + type: "doc", + id: "api/variables/orderBookProvider", + label: "orderBookProvider", + }, + { type: "doc", id: "api/variables/elizaLog", label: "elizaLog" }, + { + type: "doc", + id: "api/variables/shouldContinueTemplate", + label: "shouldContinueTemplate", + }, + { + type: "doc", + id: "api/variables/shouldFollowTemplate", + label: "shouldFollowTemplate", + }, + { + type: "doc", + id: "api/variables/shouldMuteTemplate", + label: "shouldMuteTemplate", + }, + { + type: "doc", + id: "api/variables/shouldUnmuteTemplate", + label: "shouldUnmuteTemplate", + }, + { + type: "doc", + id: "api/variables/timeProvider", + label: "timeProvider", + }, + { + type: "doc", + id: "api/variables/tokenProvider", + label: "tokenProvider", + }, + { + type: "doc", + id: "api/variables/unfollowRoom", + label: "unfollowRoom", + }, + { type: "doc", id: "api/variables/unmuteRoom", label: "unmuteRoom" }, + { + type: "doc", + id: "api/variables/walletProvider", + label: "walletProvider", + }, + ], + }, + { + type: "category", + label: "Functions", + items: [ + { type: "doc", id: "api/functions/buyToken", label: "buyToken" }, + { + type: "doc", + id: "api/functions/createAndBuyToken", + label: "createAndBuyToken", + }, + { + type: "doc", + id: "api/functions/generateCaption", + label: "generateCaption", + }, + { + type: "doc", + id: "api/functions/generateImage", + label: "generateImage", + }, + { + type: "doc", + id: "api/functions/isCreateAndBuyContent", + label: "isCreateAndBuyContent", + }, + { type: "doc", id: "api/functions/sellToken", label: "sellToken" }, + ], + }, + ], +}; +module.exports = typedocSidebar.items; diff --git a/docs/docs/api/variables/prettyConsole.md b/docs/docs/api/variables/prettyConsole.md index 016da3f8..05d9fb59 100644 --- a/docs/docs/api/variables/prettyConsole.md +++ b/docs/docs/api/variables/prettyConsole.md @@ -1,6 +1,6 @@ -# Variable: prettyConsole +# Variable: elizaLog -> `const` **prettyConsole**: `PrettyConsole` +> `const` **elizaLog**: `elizaLog` ## Defined in diff --git a/packages/plugin-image-generation/package.json b/packages/plugin-image-generation/package.json new file mode 100644 index 00000000..c66347f4 --- /dev/null +++ b/packages/plugin-image-generation/package.json @@ -0,0 +1,9 @@ +{ + "name": "plugin-image-generation", + "version": "0.0.1", + "main": "index.ts", + "type": "module", + "dependencies": { + "@eliza/core": "workspace:*" + } +} diff --git a/packages/plugin-image-generation/src/index.ts b/packages/plugin-image-generation/src/index.ts new file mode 100644 index 00000000..806c58dd --- /dev/null +++ b/packages/plugin-image-generation/src/index.ts @@ -0,0 +1,165 @@ +import { + HandlerCallback, + IAgentRuntime, + Memory, + State, + Action, +} from "@eliza/core"; +import { elizaLog } from "@eliza/core"; +import { generateCaption, generateImage } from "./utils.ts"; + +export const imageGeneration: Action = { + name: "GENERATE_IMAGE", + similes: ["IMAGE_GENERATION", "IMAGE_GEN", "CREATE_IMAGE", "MAKE_PICTURE"], + description: "Generate an image to go along with the message.", + validate: async (runtime: IAgentRuntime, message: Memory) => { + const anthropicApiKeyOk = !!runtime.getSetting("ANTHROPIC_API_KEY"); + const togetherApiKeyOk = !!runtime.getSetting("TOGETHER_API_KEY"); + + // TODO: Add openai DALL-E generation as well + + return anthropicApiKeyOk && togetherApiKeyOk; + }, + handler: async ( + runtime: IAgentRuntime, + message: Memory, + state: State, + options: any, + callback: HandlerCallback + ) => { + elizaLog.log("Composing state for message:", message); + state = (await runtime.composeState(message)) as State; + const userId = runtime.agentId; + elizaLog.log("User ID:", userId); + + const imagePrompt = message.content.text; + elizaLog.log("Image prompt received:", imagePrompt); + + // TODO: Generate a prompt for the image + + const res: { image: string; caption: string }[] = []; + + elizaLog.log("Generating image with prompt:", imagePrompt); + const images = await generateImage( + { + prompt: imagePrompt, + width: 1024, + height: 1024, + count: 1, + }, + runtime + ); + + if (images.success && images.data && images.data.length > 0) { + elizaLog.log( + "Image generation successful, number of images:", + images.data.length + ); + for (let i = 0; i < images.data.length; i++) { + const image = images.data[i]; + elizaLog.log(`Processing image ${i + 1}:`, image); + + const caption = await generateCaption( + { + imageUrl: image, + }, + runtime + ); + + elizaLog.log( + `Generated caption for image ${i + 1}:`, + caption.title + ); + res.push({ image: image, caption: caption.title }); + + callback( + { + text: caption.description, + attachments: [ + { + id: crypto.randomUUID(), + url: image, + title: "Generated image", + source: "imageGeneration", + description: caption.title, + text: caption.description, + }, + ], + }, + [] + ); + } + } else { + elizaLog.error("Image generation failed or returned no data."); + } + }, + examples: [ + // TODO: We want to generate images in more abstract ways, not just when asked to generate an image + + [ + { + user: "{{user1}}", + content: { text: "Generate an image of a cat" }, + }, + { + user: "{{agentName}}", + content: { + text: "Here's an image of a cat", + action: "GENERATE_IMAGE", + }, + }, + ], + [ + { + user: "{{user1}}", + content: { text: "Generate an image of a dog" }, + }, + { + user: "{{agentName}}", + content: { + text: "Here's an image of a dog", + action: "GENERATE_IMAGE", + }, + }, + ], + [ + { + user: "{{user1}}", + content: { text: "Create an image of a cat with a hat" }, + }, + { + user: "{{agentName}}", + content: { + text: "Here's an image of a cat with a hat", + action: "GENERATE_IMAGE", + }, + }, + ], + [ + { + user: "{{user1}}", + content: { text: "Make an image of a dog with a hat" }, + }, + { + user: "{{agentName}}", + content: { + text: "Here's an image of a dog with a hat", + action: "GENERATE_IMAGE", + }, + }, + ], + [ + { + user: "{{user1}}", + content: { text: "Paint an image of a cat with a hat" }, + }, + { + user: "{{agentName}}", + content: { + text: "Here's an image of a cat with a hat", + action: "GENERATE_IMAGE", + }, + }, + ], + ], +} as Action; diff --git a/packages/plugin-image-generation/src/utils.ts b/packages/plugin-image-generation/src/utils.ts new file mode 100644 index 00000000..06f098f1 --- /dev/null +++ b/packages/plugin-image-generation/src/utils.ts @@ -0,0 +1,104 @@ +// TODO: Replace with the vercel ai sdk and support all providers +import { Buffer } from "buffer"; +import Together from "together-ai"; +import { IAgentRuntime } from "eliza"; +import { getModel, ImageGenModel } from "eliza"; + +import OpenAI from "openai"; + +export const generateImage = async ( + data: { + prompt: string; + width: number; + height: number; + count?: number; + }, + runtime: IAgentRuntime +): Promise<{ + success: boolean; + data?: string[]; + error?: any; +}> => { + const { prompt, width, height } = data; + let { count } = data; + if (!count) { + count = 1; + } + + const imageGenModel = runtime.imageGenModel; + const model = getModel(imageGenModel); + const apiKey = + imageGenModel === ImageGenModel.TogetherAI + ? runtime.getSetting("TOGETHER_API_KEY") + : runtime.getSetting("OPENAI_API_KEY"); + + try { + if (imageGenModel === ImageGenModel.TogetherAI) { + const together = new Together({ apiKey: apiKey as string }); + const response = await together.images.create({ + model: "black-forest-labs/FLUX.1-schnell", + prompt, + width, + height, + steps: model.steps, + n: count, + }); + const urls: string[] = []; + for (let i = 0; i < response.data.length; i++) { + //@ts-ignore + const url = response.data[i].url; + urls.push(url); + } + const base64s = await Promise.all( + urls.map(async (url) => { + const response = await fetch(url); + const blob = await response.blob(); + const buffer = await blob.arrayBuffer(); + let base64 = Buffer.from(buffer).toString("base64"); + base64 = "data:image/jpeg;base64," + base64; + return base64; + }) + ); + return { success: true, data: base64s }; + } else { + let targetSize = `${width}x${height}`; + if ( + targetSize !== "1024x1024" && + targetSize !== "1792x1024" && + targetSize !== "1024x1792" + ) { + targetSize = "1024x1024"; + } + const openai = new OpenAI({ apiKey: apiKey as string }); + const response = await openai.images.generate({ + model: model.subModel, + prompt, + size: targetSize as "1024x1024" | "1792x1024" | "1024x1792", + n: count, + response_format: "b64_json", + }); + const base64s = response.data.map( + (image) => `data:image/png;base64,${image.b64_json}` + ); + return { success: true, data: base64s }; + } + } catch (error) { + console.error(error); + return { success: false, error: error }; + } +}; + +export const generateCaption = async ( + data: { imageUrl: string }, + runtime: IAgentRuntime +): Promise<{ + title: string; + description: string; +}> => { + const { imageUrl } = data; + const resp = await runtime.imageDescriptionService.describeImage(imageUrl); + return { + title: resp.title.trim(), + description: resp.description.trim(), + }; +}; diff --git a/packages/plugin-image-generation/tsconfig.json b/packages/plugin-image-generation/tsconfig.json new file mode 100644 index 00000000..eaa78145 --- /dev/null +++ b/packages/plugin-image-generation/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "dist", + "rootDir": "./src" + }, + "include": ["src"] +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bb1df0c6..80dda77e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -28,6 +28,22 @@ importers: specifier: ^0.26.11 version: 0.26.11(typescript@5.6.3) + agent: + dependencies: + '@eliza/core': + specifier: workspace:* + version: link:../core + readline: + specifier: ^1.3.0 + version: 1.3.0 + tsup: + specifier: ^8.3.5 + version: 8.3.5(jiti@1.21.6)(postcss@8.4.47)(typescript@5.6.3)(yaml@2.6.0) + devDependencies: + ts-node: + specifier: 10.9.2 + version: 10.9.2(@types/node@22.8.4)(typescript@5.6.3) + core: dependencies: '@ai-sdk/anthropic': @@ -291,6 +307,9 @@ importers: together-ai: specifier: ^0.7.0 version: 0.7.0(encoding@0.1.13) + tsup: + specifier: ^8.3.5 + version: 8.3.5(jiti@1.21.6)(postcss@8.4.47)(typescript@5.6.3)(yaml@2.6.0) unique-names-generator: specifier: 4.7.1 version: 4.7.1 @@ -402,7 +421,7 @@ importers: version: 2.79.2 ts-jest: specifier: 29.2.5 - 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))(esbuild@0.17.19)(jest@29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@types/node@22.8.4)(typescript@5.6.3)))(typescript@5.6.3) + 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))(esbuild@0.24.0)(jest@29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@types/node@22.8.4)(typescript@5.6.3)))(typescript@5.6.3) ts-node: specifier: 10.9.2 version: 10.9.2(@types/node@22.8.4)(typescript@5.6.3) @@ -468,6 +487,12 @@ importers: specifier: 4.2.9 version: 4.2.9(typedoc@0.26.11(typescript@5.6.3)) + packages/plugin-image-generation: + dependencies: + '@eliza/core': + specifier: workspace:* + version: link:../../core + packages: '@ai-sdk/anthropic@0.0.53': @@ -1817,138 +1842,282 @@ packages: peerDependencies: esbuild: '*' + '@esbuild/aix-ppc64@0.24.0': + resolution: {integrity: sha512-WtKdFM7ls47zkKHFVzMz8opM7LkcsIp9amDUBIAWirg70RM71WRSjdILPsY5Uv1D42ZpUfaPILDlfactHgsRkw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.17.19': resolution: {integrity: sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==} engines: {node: '>=12'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.24.0': + resolution: {integrity: sha512-Vsm497xFM7tTIPYK9bNTYJyF/lsP590Qc1WxJdlB6ljCbdZKU9SY8i7+Iin4kyhV/KV5J2rOKsBQbB77Ab7L/w==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.17.19': resolution: {integrity: sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==} engines: {node: '>=12'} cpu: [arm] os: [android] + '@esbuild/android-arm@0.24.0': + resolution: {integrity: sha512-arAtTPo76fJ/ICkXWetLCc9EwEHKaeya4vMrReVlEIUCAUncH7M4bhMQ+M9Vf+FFOZJdTNMXNBrWwW+OXWpSew==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.17.19': resolution: {integrity: sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==} engines: {node: '>=12'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.24.0': + resolution: {integrity: sha512-t8GrvnFkiIY7pa7mMgJd7p8p8qqYIz1NYiAoKc75Zyv73L3DZW++oYMSHPRarcotTKuSs6m3hTOa5CKHaS02TQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.17.19': resolution: {integrity: sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.24.0': + resolution: {integrity: sha512-CKyDpRbK1hXwv79soeTJNHb5EiG6ct3efd/FTPdzOWdbZZfGhpbcqIpiD0+vwmpu0wTIL97ZRPZu8vUt46nBSw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.17.19': resolution: {integrity: sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==} engines: {node: '>=12'} cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.24.0': + resolution: {integrity: sha512-rgtz6flkVkh58od4PwTRqxbKH9cOjaXCMZgWD905JOzjFKW+7EiUObfd/Kav+A6Gyud6WZk9w+xu6QLytdi2OA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.17.19': resolution: {integrity: sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.24.0': + resolution: {integrity: sha512-6Mtdq5nHggwfDNLAHkPlyLBpE5L6hwsuXZX8XNmHno9JuL2+bg2BX5tRkwjyfn6sKbxZTq68suOjgWqCicvPXA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.17.19': resolution: {integrity: sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.24.0': + resolution: {integrity: sha512-D3H+xh3/zphoX8ck4S2RxKR6gHlHDXXzOf6f/9dbFt/NRBDIE33+cVa49Kil4WUjxMGW0ZIYBYtaGCa2+OsQwQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.17.19': resolution: {integrity: sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.24.0': + resolution: {integrity: sha512-TDijPXTOeE3eaMkRYpcy3LarIg13dS9wWHRdwYRnzlwlA370rNdZqbcp0WTyyV/k2zSxfko52+C7jU5F9Tfj1g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.17.19': resolution: {integrity: sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==} engines: {node: '>=12'} cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.24.0': + resolution: {integrity: sha512-gJKIi2IjRo5G6Glxb8d3DzYXlxdEj2NlkixPsqePSZMhLudqPhtZ4BUrpIuTjJYXxvF9njql+vRjB2oaC9XpBw==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.17.19': resolution: {integrity: sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==} engines: {node: '>=12'} cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.24.0': + resolution: {integrity: sha512-K40ip1LAcA0byL05TbCQ4yJ4swvnbzHscRmUilrmP9Am7//0UjPreh4lpYzvThT2Quw66MhjG//20mrufm40mA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.17.19': resolution: {integrity: sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.24.0': + resolution: {integrity: sha512-0mswrYP/9ai+CU0BzBfPMZ8RVm3RGAN/lmOMgW4aFUSOQBjA31UP8Mr6DDhWSuMwj7jaWOT0p0WoZ6jeHhrD7g==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.17.19': resolution: {integrity: sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.24.0': + resolution: {integrity: sha512-hIKvXm0/3w/5+RDtCJeXqMZGkI2s4oMUGj3/jM0QzhgIASWrGO5/RlzAzm5nNh/awHE0A19h/CvHQe6FaBNrRA==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.17.19': resolution: {integrity: sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.24.0': + resolution: {integrity: sha512-HcZh5BNq0aC52UoocJxaKORfFODWXZxtBaaZNuN3PUX3MoDsChsZqopzi5UupRhPHSEHotoiptqikjN/B77mYQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.17.19': resolution: {integrity: sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.24.0': + resolution: {integrity: sha512-bEh7dMn/h3QxeR2KTy1DUszQjUrIHPZKyO6aN1X4BCnhfYhuQqedHaa5MxSQA/06j3GpiIlFGSsy1c7Gf9padw==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.17.19': resolution: {integrity: sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.24.0': + resolution: {integrity: sha512-ZcQ6+qRkw1UcZGPyrCiHHkmBaj9SiCD8Oqd556HldP+QlpUIe2Wgn3ehQGVoPOvZvtHm8HPx+bH20c9pvbkX3g==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.17.19': resolution: {integrity: sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==} engines: {node: '>=12'} cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.24.0': + resolution: {integrity: sha512-vbutsFqQ+foy3wSSbmjBXXIJ6PL3scghJoM8zCL142cGaZKAdCZHyf+Bpu/MmX9zT9Q0zFBVKb36Ma5Fzfa8xA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-x64@0.17.19': resolution: {integrity: sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.24.0': + resolution: {integrity: sha512-hjQ0R/ulkO8fCYFsG0FZoH+pWgTTDreqpqY7UnQntnaKv95uP5iW3+dChxnx7C3trQQU40S+OgWhUVwCjVFLvg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.24.0': + resolution: {integrity: sha512-MD9uzzkPQbYehwcN583yx3Tu5M8EIoTD+tUgKF982WYL9Pf5rKy9ltgD0eUgs8pvKnmizxjXZyLt0z6DC3rRXg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.17.19': resolution: {integrity: sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.24.0': + resolution: {integrity: sha512-4ir0aY1NGUhIC1hdoCzr1+5b43mw99uNwVzhIq1OY3QcEwPDO3B7WNXBzaKY5Nsf1+N11i1eOfFcq+D/gOS15Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.17.19': resolution: {integrity: sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==} engines: {node: '>=12'} cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.24.0': + resolution: {integrity: sha512-jVzdzsbM5xrotH+W5f1s+JtUy1UWgjU0Cf4wMvffTB8m6wP5/kx0KiaLHlbJO+dMgtxKV8RQ/JvtlFcdZ1zCPA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.17.19': resolution: {integrity: sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==} engines: {node: '>=12'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.24.0': + resolution: {integrity: sha512-iKc8GAslzRpBytO2/aN3d2yb2z8XTVfNV0PjGlCxKo5SgWmNXx82I/Q3aG1tFfS+A2igVCY97TJ8tnYwpUWLCA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.17.19': resolution: {integrity: sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==} engines: {node: '>=12'} cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.24.0': + resolution: {integrity: sha512-vQW36KZolfIudCcTnaTpmLQ24Ha1RjygBo39/aLkM2kmjkWmZGEJ5Gn9l5/7tzXA42QGIoWbICfg6KLLkIw6yw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.17.19': resolution: {integrity: sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==} engines: {node: '>=12'} cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.24.0': + resolution: {integrity: sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@eslint-community/eslint-utils@4.4.1': resolution: {integrity: sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -2890,6 +3059,96 @@ packages: rollup: optional: true + '@rollup/rollup-android-arm-eabi@4.24.4': + resolution: {integrity: sha512-jfUJrFct/hTA0XDM5p/htWKoNNTbDLY0KRwEt6pyOA6k2fmk0WVwl65PdUdJZgzGEHWx+49LilkcSaumQRyNQw==} + cpu: [arm] + os: [android] + + '@rollup/rollup-android-arm64@4.24.4': + resolution: {integrity: sha512-j4nrEO6nHU1nZUuCfRKoCcvh7PIywQPUCBa2UsootTHvTHIoIu2BzueInGJhhvQO/2FTRdNYpf63xsgEqH9IhA==} + cpu: [arm64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.24.4': + resolution: {integrity: sha512-GmU/QgGtBTeraKyldC7cDVVvAJEOr3dFLKneez/n7BvX57UdhOqDsVwzU7UOnYA7AAOt+Xb26lk79PldDHgMIQ==} + cpu: [arm64] + os: [darwin] + + '@rollup/rollup-darwin-x64@4.24.4': + resolution: {integrity: sha512-N6oDBiZCBKlwYcsEPXGDE4g9RoxZLK6vT98M8111cW7VsVJFpNEqvJeIPfsCzbf0XEakPslh72X0gnlMi4Ddgg==} + cpu: [x64] + os: [darwin] + + '@rollup/rollup-freebsd-arm64@4.24.4': + resolution: {integrity: sha512-py5oNShCCjCyjWXCZNrRGRpjWsF0ic8f4ieBNra5buQz0O/U6mMXCpC1LvrHuhJsNPgRt36tSYMidGzZiJF6mw==} + cpu: [arm64] + os: [freebsd] + + '@rollup/rollup-freebsd-x64@4.24.4': + resolution: {integrity: sha512-L7VVVW9FCnTTp4i7KrmHeDsDvjB4++KOBENYtNYAiYl96jeBThFfhP6HVxL74v4SiZEVDH/1ILscR5U9S4ms4g==} + cpu: [x64] + os: [freebsd] + + '@rollup/rollup-linux-arm-gnueabihf@4.24.4': + resolution: {integrity: sha512-10ICosOwYChROdQoQo589N5idQIisxjaFE/PAnX2i0Zr84mY0k9zul1ArH0rnJ/fpgiqfu13TFZR5A5YJLOYZA==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.24.4': + resolution: {integrity: sha512-ySAfWs69LYC7QhRDZNKqNhz2UKN8LDfbKSMAEtoEI0jitwfAG2iZwVqGACJT+kfYvvz3/JgsLlcBP+WWoKCLcw==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm64-gnu@4.24.4': + resolution: {integrity: sha512-uHYJ0HNOI6pGEeZ/5mgm5arNVTI0nLlmrbdph+pGXpC9tFHFDQmDMOEqkmUObRfosJqpU8RliYoGz06qSdtcjg==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-arm64-musl@4.24.4': + resolution: {integrity: sha512-38yiWLemQf7aLHDgTg85fh3hW9stJ0Muk7+s6tIkSUOMmi4Xbv5pH/5Bofnsb6spIwD5FJiR+jg71f0CH5OzoA==} + cpu: [arm64] + os: [linux] + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.4': + resolution: {integrity: sha512-q73XUPnkwt9ZNF2xRS4fvneSuaHw2BXuV5rI4cw0fWYVIWIBeDZX7c7FWhFQPNTnE24172K30I+dViWRVD9TwA==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.24.4': + resolution: {integrity: sha512-Aie/TbmQi6UXokJqDZdmTJuZBCU3QBDA8oTKRGtd4ABi/nHgXICulfg1KI6n9/koDsiDbvHAiQO3YAUNa/7BCw==} + cpu: [riscv64] + os: [linux] + + '@rollup/rollup-linux-s390x-gnu@4.24.4': + resolution: {integrity: sha512-P8MPErVO/y8ohWSP9JY7lLQ8+YMHfTI4bAdtCi3pC2hTeqFJco2jYspzOzTUB8hwUWIIu1xwOrJE11nP+0JFAQ==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.24.4': + resolution: {integrity: sha512-K03TljaaoPK5FOyNMZAAEmhlyO49LaE4qCsr0lYHUKyb6QacTNF9pnfPpXnFlFD3TXuFbFbz7tJ51FujUXkXYA==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-linux-x64-musl@4.24.4': + resolution: {integrity: sha512-VJYl4xSl/wqG2D5xTYncVWW+26ICV4wubwN9Gs5NrqhJtayikwCXzPL8GDsLnaLU3WwhQ8W02IinYSFJfyo34Q==} + cpu: [x64] + os: [linux] + + '@rollup/rollup-win32-arm64-msvc@4.24.4': + resolution: {integrity: sha512-ku2GvtPwQfCqoPFIJCqZ8o7bJcj+Y54cZSr43hHca6jLwAiCbZdBUOrqE6y29QFajNAzzpIOwsckaTFmN6/8TA==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.24.4': + resolution: {integrity: sha512-V3nCe+eTt/W6UYNr/wGvO1fLpHUrnlirlypZfKCT1fG6hWfqhPgQV/K/mRBXBpxc0eKLIF18pIOFVPh0mqHjlg==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.24.4': + resolution: {integrity: sha512-LTw1Dfd0mBIEqUVCxbvTE/LLo+9ZxVC9k99v1v4ahg9Aak6FpqOfNu5kRkeTAn0wphoC4JU7No1/rL+bBCEwhg==} + cpu: [x64] + os: [win32] + '@sapphire/async-queue@1.5.4': resolution: {integrity: sha512-id65RxAx34DCk8KAVTPWwcephJSkStiS9M15F87+zvK2gK47wf7yeRIo8WiuKeXQS6bsyo/uQ/t0QW1cLmSb+A==} engines: {node: '>=v14.0.0', npm: '>=7.0.0'} @@ -3947,6 +4206,9 @@ packages: peerDependencies: zod: ^3.0.0 + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -4312,6 +4574,12 @@ packages: resolution: {integrity: sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==} engines: {node: '>=6.14.2'} + bundle-require@5.0.0: + resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.18' + busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} engines: {node: '>=10.16.0'} @@ -4328,6 +4596,10 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + cacache@18.0.4: resolution: {integrity: sha512-B+L5iIa9mgcjLbliir2th36yEwPftrzteHYujzsx3dFP/31GCHcIeS8f5MGd80odLOjaOvSpU3EEAmRQptkxLQ==} engines: {node: ^16.14.0 || >=18.0.0} @@ -4449,6 +4721,10 @@ packages: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} + chokidar@4.0.1: + resolution: {integrity: sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==} + engines: {node: '>= 14.16.0'} + chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -4642,6 +4918,10 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + commander@5.1.0: resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} engines: {node: '>= 6'} @@ -5598,6 +5878,11 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.24.0: + resolution: {integrity: sha512-FuLPevChGDshgSicjisSooU0cemp/sGXR841D5LHMB7mTVOmsEHcAxaH3irL53+8YDIeVNQEySh4DaYU/iuPqQ==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -5905,6 +6190,14 @@ packages: fd-slicer@1.1.0: resolution: {integrity: sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==} + fdir@6.4.2: + resolution: {integrity: sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + feed@4.2.2: resolution: {integrity: sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ==} engines: {node: '>=0.4.0'} @@ -7175,6 +7468,10 @@ packages: joi@17.13.3: resolution: {integrity: sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==} + joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + jpeg-js@0.3.7: resolution: {integrity: sha512-9IXdWudL61npZjvLuVe/ktHiA41iE8qFyLB+4VDTblEsWBzeg8WQTlktdUK4CdncUqtUgUg0bbOmTE2bKBKaBQ==} @@ -7408,6 +7705,10 @@ packages: resolution: {integrity: sha512-gUD/epcRms75Cw8RT1pUdHugZYM5ce64ucs2GEISABwkRsOQr0q2wm/MV2TKThycIe5e0ytRweW2RZxclogCdQ==} engines: {node: '>=8'} + load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + loader-runner@4.3.0: resolution: {integrity: sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==} engines: {node: '>=6.11.5'} @@ -7468,6 +7769,9 @@ packages: lodash.snakecase@4.1.1: resolution: {integrity: sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==} + lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + lodash.uniq@4.5.0: resolution: {integrity: sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==} @@ -8059,6 +8363,9 @@ packages: resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + nan@2.22.0: resolution: {integrity: sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==} @@ -8907,6 +9214,24 @@ packages: peerDependencies: postcss: ^8.4.31 + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} + peerDependencies: + jiti: '>=1.21.0' + postcss: '>=8.0.9' + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + jiti: + optional: true + postcss: + optional: true + tsx: + optional: true + yaml: + optional: true + postcss-loader@7.3.4: resolution: {integrity: sha512-iW5WTTBSC5BfsBJ9daFMPVrLT36MrNiC6fqOZTTaHjBNX6Pfd5p+hSBqe/fEeNd7pc13QiAyGt7VdGMw4eRC4A==} engines: {node: '>= 14.15.0'} @@ -9516,6 +9841,10 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + readdirp@4.0.2: + resolution: {integrity: sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==} + engines: {node: '>= 14.16.0'} + reading-time@1.5.0: resolution: {integrity: sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==} @@ -9523,6 +9852,9 @@ packages: resolution: {integrity: sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==} engines: {node: '>= 0.8.0'} + readline@1.3.0: + resolution: {integrity: sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg==} + rechoir@0.6.2: resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} engines: {node: '>= 0.10'} @@ -9740,6 +10072,11 @@ packages: engines: {node: '>=10.0.0'} hasBin: true + rollup@4.24.4: + resolution: {integrity: sha512-vGorVWIsWfX3xbcyAS+I047kFKapHYivmkaT63Smj77XwvLSJos6M1xGqZnBPFQFBRZDOcG1QnYEIxAvTr/HjA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + roughjs@4.6.6: resolution: {integrity: sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==} @@ -10045,6 +10382,10 @@ packages: resolution: {integrity: sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==} engines: {node: '>= 8'} + source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + sourcemap-codec@1.4.8: resolution: {integrity: sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==} deprecated: Please use @jridgewell/sourcemap-codec instead @@ -10280,6 +10621,11 @@ packages: stylis@4.3.4: resolution: {integrity: sha512-osIBl6BGUmSfDkyH2mB7EFvCJntXDrLhKjHTRj/rK6xLH0yuPrHULDRQzKokSOD4VoorhtKpfcfW1GAntu8now==} + sucrase@3.35.0: + resolution: {integrity: sha512-8EbVDiu9iN/nESwxeSxDKe0dunta1GOlHufmSSXxMD2z2/tMZpDMpvXQGsc+ajGo8y2uYUmixaSRUc/QPoQ0GA==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + super-regex@1.0.0: resolution: {integrity: sha512-CY8u7DtbvucKuquCmOFEKhr9Besln7n9uN8eFbwcoGYWXOMW07u2o8njWaiXt11ylS3qoGF55pILjRmPlbodyg==} engines: {node: '>=18'} @@ -10418,6 +10764,13 @@ packages: text-table@0.2.0: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + throttleit@2.1.0: resolution: {integrity: sha512-nt6AMGKW1p/70DF/hGBdJB57B8Tspmbp5gfJ8ilhLnt7kkr2ye7hzD6NVG8GGErk2HWF34igrL2CXmNIkzKqKw==} engines: {node: '>=18'} @@ -10451,6 +10804,10 @@ packages: tinyexec@0.3.1: resolution: {integrity: sha512-WiCJLEECkO18gwqIp6+hJg0//p23HXp4S+gGtAKu3mI2F2/sXC4FvHvXvB0zJVVaTPhx1/tOwdbRsa1sOBIKqQ==} + tinyglobby@0.2.10: + resolution: {integrity: sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==} + engines: {node: '>=12.0.0'} + tinyld@1.3.4: resolution: {integrity: sha512-u26CNoaInA4XpDU+8s/6Cq8xHc2T5M4fXB3ICfXPokUQoLzmPgSZU02TAkFwFMJCWTjk53gtkS8pETTreZwCqw==} engines: {node: '>= 12.10.0', npm: '>= 6.12.0', yarn: '>= 1.20.0'} @@ -10513,6 +10870,13 @@ packages: tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + + tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + treeverse@3.0.0: resolution: {integrity: sha512-gcANaAnd2QDZFmHFEOF4k7uc1J/6a6z3DJMd/QwEyxLoKGiptJRwid582r7QIsFlFMIZ3SnxfS52S4hm2DHkuQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} @@ -10544,6 +10908,9 @@ packages: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} + ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + ts-jest@29.2.5: resolution: {integrity: sha512-KD8zB2aAZrcKIdGk4OwpJggeLcH1FgrICqDSROWqlnJXGCXK4Mn6FcdK2B6670Xr73lHMG1kHw8R87A0ecZ+vA==} engines: {node: ^14.15.0 || ^16.10.0 || ^18.0.0 || >=20.0.0} @@ -10595,6 +10962,25 @@ packages: tslib@2.8.0: resolution: {integrity: sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==} + tsup@8.3.5: + resolution: {integrity: sha512-Tunf6r6m6tnZsG9GYWndg0z8dEV7fD733VBFzFJ5Vcm1FtlXB8xBD/rtrBi2a3YKEV7hHtxiZtW5EAVADoe1pA==} + engines: {node: '>=18'} + hasBin: true + peerDependencies: + '@microsoft/api-extractor': ^7.36.0 + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: '>=4.5.0' + peerDependenciesMeta: + '@microsoft/api-extractor': + optional: true + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + tuf-js@2.2.1: resolution: {integrity: sha512-GwIJau9XaA8nLVbUXsN3IlFi7WmQ48gBUrl3FTkkL/XLu/POhBzfmX9hd33FNMX1qAsfl6ozO1iMmW9NC8YniA==} engines: {node: ^16.14.0 || >=18.0.0} @@ -11007,6 +11393,9 @@ packages: webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + webpack-bundle-analyzer@4.10.2: resolution: {integrity: sha512-vJptkMm9pk5si4Bv922ZbKLV8UTT4zib4FPgXMhgzUny0bfDDkLXAVQs3ly3fS4/TN9ROFtb0NFrm04UXFE/Vw==} engines: {node: '>= 10.13.0'} @@ -11076,6 +11465,9 @@ packages: whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + which-pm-runs@1.1.0: resolution: {integrity: sha512-n1brCuqClxfFfq/Rb0ICg9giSZqCS+pLtccdag6C2HyufBrh3fBOiy9nb6ggRMvWOVH5GrdJskj5iGTZNxd7SA==} engines: {node: '>=4'} @@ -13782,72 +14174,144 @@ snapshots: escape-string-regexp: 4.0.0 rollup-plugin-node-polyfills: 0.2.1 + '@esbuild/aix-ppc64@0.24.0': + optional: true + '@esbuild/android-arm64@0.17.19': optional: true + '@esbuild/android-arm64@0.24.0': + optional: true + '@esbuild/android-arm@0.17.19': optional: true + '@esbuild/android-arm@0.24.0': + optional: true + '@esbuild/android-x64@0.17.19': optional: true + '@esbuild/android-x64@0.24.0': + optional: true + '@esbuild/darwin-arm64@0.17.19': optional: true + '@esbuild/darwin-arm64@0.24.0': + optional: true + '@esbuild/darwin-x64@0.17.19': optional: true + '@esbuild/darwin-x64@0.24.0': + optional: true + '@esbuild/freebsd-arm64@0.17.19': optional: true + '@esbuild/freebsd-arm64@0.24.0': + optional: true + '@esbuild/freebsd-x64@0.17.19': optional: true + '@esbuild/freebsd-x64@0.24.0': + optional: true + '@esbuild/linux-arm64@0.17.19': optional: true + '@esbuild/linux-arm64@0.24.0': + optional: true + '@esbuild/linux-arm@0.17.19': optional: true + '@esbuild/linux-arm@0.24.0': + optional: true + '@esbuild/linux-ia32@0.17.19': optional: true + '@esbuild/linux-ia32@0.24.0': + optional: true + '@esbuild/linux-loong64@0.17.19': optional: true + '@esbuild/linux-loong64@0.24.0': + optional: true + '@esbuild/linux-mips64el@0.17.19': optional: true + '@esbuild/linux-mips64el@0.24.0': + optional: true + '@esbuild/linux-ppc64@0.17.19': optional: true + '@esbuild/linux-ppc64@0.24.0': + optional: true + '@esbuild/linux-riscv64@0.17.19': optional: true + '@esbuild/linux-riscv64@0.24.0': + optional: true + '@esbuild/linux-s390x@0.17.19': optional: true + '@esbuild/linux-s390x@0.24.0': + optional: true + '@esbuild/linux-x64@0.17.19': optional: true + '@esbuild/linux-x64@0.24.0': + optional: true + '@esbuild/netbsd-x64@0.17.19': optional: true + '@esbuild/netbsd-x64@0.24.0': + optional: true + + '@esbuild/openbsd-arm64@0.24.0': + optional: true + '@esbuild/openbsd-x64@0.17.19': optional: true + '@esbuild/openbsd-x64@0.24.0': + optional: true + '@esbuild/sunos-x64@0.17.19': optional: true + '@esbuild/sunos-x64@0.24.0': + optional: true + '@esbuild/win32-arm64@0.17.19': optional: true + '@esbuild/win32-arm64@0.24.0': + optional: true + '@esbuild/win32-ia32@0.17.19': optional: true + '@esbuild/win32-ia32@0.24.0': + optional: true + '@esbuild/win32-x64@0.17.19': optional: true + '@esbuild/win32-x64@0.24.0': + optional: true + '@eslint-community/eslint-utils@4.4.1(eslint@9.13.0(jiti@1.21.6))': dependencies: eslint: 9.13.0(jiti@1.21.6) @@ -15071,6 +15535,60 @@ snapshots: optionalDependencies: rollup: 2.79.2 + '@rollup/rollup-android-arm-eabi@4.24.4': + optional: true + + '@rollup/rollup-android-arm64@4.24.4': + optional: true + + '@rollup/rollup-darwin-arm64@4.24.4': + optional: true + + '@rollup/rollup-darwin-x64@4.24.4': + optional: true + + '@rollup/rollup-freebsd-arm64@4.24.4': + optional: true + + '@rollup/rollup-freebsd-x64@4.24.4': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.24.4': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.24.4': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.24.4': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.24.4': + optional: true + + '@rollup/rollup-linux-powerpc64le-gnu@4.24.4': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.24.4': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.24.4': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.24.4': + optional: true + + '@rollup/rollup-linux-x64-musl@4.24.4': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.24.4': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.24.4': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.24.4': + optional: true + '@sapphire/async-queue@1.5.4': {} '@sapphire/shapeshift@4.0.0': @@ -16423,6 +16941,8 @@ snapshots: - encoding - supports-color + any-promise@1.3.0: {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -16849,6 +17369,11 @@ snapshots: node-gyp-build: 4.8.2 optional: true + bundle-require@5.0.0(esbuild@0.24.0): + dependencies: + esbuild: 0.24.0 + load-tsconfig: 0.2.5 + busboy@1.6.0: dependencies: streamsearch: 1.1.0 @@ -16859,6 +17384,8 @@ snapshots: bytes@3.1.2: {} + cac@6.7.14: {} + cacache@18.0.4: dependencies: '@npmcli/fs': 3.1.1 @@ -17028,6 +17555,10 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@4.0.1: + dependencies: + readdirp: 4.0.2 + chownr@1.1.4: {} chownr@2.0.0: {} @@ -17199,6 +17730,8 @@ snapshots: commander@2.20.3: {} + commander@4.1.1: {} + commander@5.1.0: {} commander@7.2.0: {} @@ -18244,6 +18777,33 @@ snapshots: '@esbuild/win32-ia32': 0.17.19 '@esbuild/win32-x64': 0.17.19 + esbuild@0.24.0: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.0 + '@esbuild/android-arm': 0.24.0 + '@esbuild/android-arm64': 0.24.0 + '@esbuild/android-x64': 0.24.0 + '@esbuild/darwin-arm64': 0.24.0 + '@esbuild/darwin-x64': 0.24.0 + '@esbuild/freebsd-arm64': 0.24.0 + '@esbuild/freebsd-x64': 0.24.0 + '@esbuild/linux-arm': 0.24.0 + '@esbuild/linux-arm64': 0.24.0 + '@esbuild/linux-ia32': 0.24.0 + '@esbuild/linux-loong64': 0.24.0 + '@esbuild/linux-mips64el': 0.24.0 + '@esbuild/linux-ppc64': 0.24.0 + '@esbuild/linux-riscv64': 0.24.0 + '@esbuild/linux-s390x': 0.24.0 + '@esbuild/linux-x64': 0.24.0 + '@esbuild/netbsd-x64': 0.24.0 + '@esbuild/openbsd-arm64': 0.24.0 + '@esbuild/openbsd-x64': 0.24.0 + '@esbuild/sunos-x64': 0.24.0 + '@esbuild/win32-arm64': 0.24.0 + '@esbuild/win32-ia32': 0.24.0 + '@esbuild/win32-x64': 0.24.0 + escalade@3.2.0: {} escape-goat@4.0.0: {} @@ -18617,6 +19177,10 @@ snapshots: dependencies: pend: 1.2.0 + fdir@6.4.2(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + feed@4.2.2: dependencies: xml-js: 1.6.11 @@ -20242,6 +20806,8 @@ snapshots: '@sideway/formula': 3.0.1 '@sideway/pinpoint': 2.0.0 + joycon@3.1.1: {} + jpeg-js@0.3.7: {} js-git@0.7.8: @@ -20577,6 +21143,8 @@ snapshots: strip-bom: 4.0.0 type-fest: 0.6.0 + load-tsconfig@0.2.5: {} + loader-runner@4.3.0: {} loader-utils@2.0.4: @@ -20630,6 +21198,8 @@ snapshots: lodash.snakecase@4.1.1: {} + lodash.sortby@4.7.0: {} + lodash.uniq@4.5.0: {} lodash@4.17.21: {} @@ -21549,6 +22119,12 @@ snapshots: mute-stream@1.0.0: {} + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + nan@2.22.0: optional: true @@ -22555,6 +23131,14 @@ snapshots: postcss: 8.4.47 postcss-selector-parser: 6.1.2 + postcss-load-config@6.0.1(jiti@1.21.6)(postcss@8.4.47)(yaml@2.6.0): + dependencies: + lilconfig: 3.1.2 + optionalDependencies: + jiti: 1.21.6 + postcss: 8.4.47 + yaml: 2.6.0 + postcss-loader@7.3.4(postcss@8.4.47)(typescript@5.6.3)(webpack@5.96.1): dependencies: cosmiconfig: 8.3.6(typescript@5.6.3) @@ -23246,10 +23830,14 @@ snapshots: dependencies: picomatch: 2.3.1 + readdirp@4.0.2: {} + reading-time@1.5.0: {} readline-sync@1.4.10: {} + readline@1.3.0: {} + rechoir@0.6.2: dependencies: resolve: 1.22.8 @@ -23546,6 +24134,30 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + rollup@4.24.4: + dependencies: + '@types/estree': 1.0.6 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.24.4 + '@rollup/rollup-android-arm64': 4.24.4 + '@rollup/rollup-darwin-arm64': 4.24.4 + '@rollup/rollup-darwin-x64': 4.24.4 + '@rollup/rollup-freebsd-arm64': 4.24.4 + '@rollup/rollup-freebsd-x64': 4.24.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.24.4 + '@rollup/rollup-linux-arm-musleabihf': 4.24.4 + '@rollup/rollup-linux-arm64-gnu': 4.24.4 + '@rollup/rollup-linux-arm64-musl': 4.24.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.24.4 + '@rollup/rollup-linux-riscv64-gnu': 4.24.4 + '@rollup/rollup-linux-s390x-gnu': 4.24.4 + '@rollup/rollup-linux-x64-gnu': 4.24.4 + '@rollup/rollup-linux-x64-musl': 4.24.4 + '@rollup/rollup-win32-arm64-msvc': 4.24.4 + '@rollup/rollup-win32-ia32-msvc': 4.24.4 + '@rollup/rollup-win32-x64-msvc': 4.24.4 + fsevents: 2.3.3 + roughjs@4.6.6: dependencies: hachure-fill: 0.5.2 @@ -23957,6 +24569,10 @@ snapshots: source-map@0.7.4: {} + source-map@0.8.0-beta.0: + dependencies: + whatwg-url: 7.1.0 + sourcemap-codec@1.4.8: {} space-separated-tokens@1.1.5: {} @@ -24200,6 +24816,16 @@ snapshots: stylis@4.3.4: {} + sucrase@3.35.0: + dependencies: + '@jridgewell/gen-mapping': 0.3.5 + commander: 4.1.1 + glob: 10.4.5 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.6 + ts-interface-checker: 0.1.13 + super-regex@1.0.0: dependencies: function-timeout: 1.0.2 @@ -24367,6 +24993,14 @@ snapshots: text-table@0.2.0: {} + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 + throttleit@2.1.0: {} through2@2.0.5: @@ -24395,6 +25029,11 @@ snapshots: tinyexec@0.3.1: {} + tinyglobby@0.2.10: + dependencies: + fdir: 6.4.2(picomatch@4.0.2) + picomatch: 4.0.2 + tinyld@1.3.4: {} tinyspawn@1.3.3: {} @@ -24456,6 +25095,12 @@ snapshots: tr46@0.0.3: {} + tr46@1.0.1: + dependencies: + punycode: 2.3.1 + + tree-kill@1.2.2: {} + treeverse@3.0.0: {} trim-lines@3.0.1: {} @@ -24474,7 +25119,9 @@ snapshots: ts-dedent@2.2.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))(esbuild@0.17.19)(jest@29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@types/node@22.8.4)(typescript@5.6.3)))(typescript@5.6.3): + ts-interface-checker@0.1.13: {} + + 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))(esbuild@0.24.0)(jest@29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@types/node@22.8.4)(typescript@5.6.3)))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 @@ -24492,7 +25139,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.26.0) - esbuild: 0.17.19 + esbuild: 0.24.0 ts-mixer@6.0.4: {} @@ -24524,6 +25171,33 @@ snapshots: tslib@2.8.0: {} + tsup@8.3.5(jiti@1.21.6)(postcss@8.4.47)(typescript@5.6.3)(yaml@2.6.0): + dependencies: + bundle-require: 5.0.0(esbuild@0.24.0) + cac: 6.7.14 + chokidar: 4.0.1 + consola: 3.2.3 + debug: 4.3.7(supports-color@5.5.0) + esbuild: 0.24.0 + joycon: 3.1.1 + picocolors: 1.1.1 + postcss-load-config: 6.0.1(jiti@1.21.6)(postcss@8.4.47)(yaml@2.6.0) + resolve-from: 5.0.0 + rollup: 4.24.4 + source-map: 0.8.0-beta.0 + sucrase: 3.35.0 + tinyexec: 0.3.1 + tinyglobby: 0.2.10 + tree-kill: 1.2.2 + optionalDependencies: + postcss: 8.4.47 + typescript: 5.6.3 + transitivePeerDependencies: + - jiti + - supports-color + - tsx + - yaml + tuf-js@2.2.1: dependencies: '@tufjs/models': 2.0.1 @@ -24936,6 +25610,8 @@ snapshots: webidl-conversions@3.0.1: {} + webidl-conversions@4.0.2: {} + webpack-bundle-analyzer@4.10.2(bufferutil@4.0.8)(utf-8-validate@5.0.10): dependencies: '@discoveryjs/json-ext': 0.5.7 @@ -25080,6 +25756,12 @@ snapshots: tr46: 0.0.3 webidl-conversions: 3.0.1 + whatwg-url@7.1.0: + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + which-pm-runs@1.1.0: {} which@1.3.1: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4d03833b..642d22a6 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,3 +1,5 @@ packages: - "docs" - "core" + - "packages/*" + - "agent" diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..dd7a9886 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "lib": ["ESNext", "dom"], + "moduleResolution": "Bundler", + "outDir": "./dist", + "rootDir": ".", + "strict": false, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": false, + "allowImportingTsExtensions": true, + "declaration": true, + "emitDeclarationOnly": true, + "resolveJsonModule": true, + "noImplicitAny": false, + "allowJs": true, + "checkJs": false, + "noEmitOnError": false, + "moduleDetection": "force", + "allowArbitraryExtensions": true + } +}