From a952fa798ce7c656643cada6a85e7466e9dc7feb Mon Sep 17 00:00:00 2001 From: antpb Date: Fri, 29 Nov 2024 23:34:39 -0600 Subject: [PATCH] migrates tiktoken implementation to js-tiktoken --- packages/core/package.json | 2 +- packages/core/src/generation.ts | 12 +- packages/core/src/tests/generation.test.ts | 53 ++- pnpm-lock.yaml | 435 ++++++++++++++++----- 4 files changed, 401 insertions(+), 101 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 76d8e7762c..0be7c3c37d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -69,10 +69,10 @@ "gaxios": "6.7.1", "glob": "11.0.0", "js-sha1": "0.7.0", + "js-tiktoken": "^1.0.15", "langchain": "0.3.6", "ollama-ai-provider": "0.16.1", "openai": "4.73.0", - "tiktoken": "1.0.17", "tinyld": "1.3.4", "together-ai": "0.7.0", "unique-names-generator": "4.7.1", diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index 2ba4571c90..b70c6dd69f 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -11,7 +11,7 @@ import { import { Buffer } from "buffer"; import { createOllama } from "ollama-ai-provider"; import OpenAI from "openai"; -import { encoding_for_model, TiktokenModel } from "tiktoken"; +import { encodingForModel, TiktokenModel } from "js-tiktoken"; import Together from "together-ai"; import { ZodSchema } from "zod"; import { elizaLogger } from "./index.ts"; @@ -429,7 +429,7 @@ export function trimTokens( if (maxTokens <= 0) throw new Error("maxTokens must be positive"); // Get the tokenizer for the model - const encoding = encoding_for_model(model); + const encoding = encodingForModel(model); try { // Encode the text into tokens @@ -443,16 +443,12 @@ export function trimTokens( // Keep the most recent tokens by slicing from the end const truncatedTokens = tokens.slice(-maxTokens); - // Decode back to text and convert to string - const decodedText = encoding.decode(truncatedTokens); - return new TextDecoder().decode(decodedText); + // Decode back to text - js-tiktoken decode() returns a string directly + return encoding.decode(truncatedTokens); } catch (error) { console.error("Error in trimTokens:", error); // Return truncated string if tokenization fails return context.slice(-maxTokens * 4); // Rough estimate of 4 chars per token - } finally { - // Clean up tokenizer resources - encoding.free(); } } diff --git a/packages/core/src/tests/generation.test.ts b/packages/core/src/tests/generation.test.ts index d90b370fcb..f28705c4a9 100644 --- a/packages/core/src/tests/generation.test.ts +++ b/packages/core/src/tests/generation.test.ts @@ -1,7 +1,8 @@ import { describe, expect, it, vi, beforeEach } from "vitest"; import { ModelProviderName, IAgentRuntime } from "../types"; import { models } from "../models"; -import { generateText, generateTrueOrFalse, splitChunks } from "../generation"; +import { generateText, generateTrueOrFalse, splitChunks, trimTokens } from "../generation"; +import type { TiktokenModel } from "js-tiktoken"; // Mock the elizaLogger vi.mock("../index.ts", () => ({ @@ -120,4 +121,54 @@ describe("Generation", () => { expect(chunks).toEqual([content]); }); }); + + describe("trimTokens", () => { + const model = "gpt-4" as TiktokenModel; + + it("should return empty string for empty input", () => { + const result = trimTokens("", 100, model); + expect(result).toBe(""); + }); + + it("should throw error for negative maxTokens", () => { + expect(() => trimTokens("test", -1, model)).toThrow("maxTokens must be positive"); + }); + + it("should return unchanged text if within token limit", () => { + const shortText = "This is a short text"; + const result = trimTokens(shortText, 10, model); + expect(result).toBe(shortText); + }); + + it("should truncate text to specified token limit", () => { + // Using a longer text that we know will exceed the token limit + const longText = "This is a much longer text that will definitely exceed our very small token limit and need to be truncated to fit within the specified constraints." + const result = trimTokens(longText, 5, model); + + // The exact result will depend on the tokenizer, but we can verify: + // 1. Result is shorter than original + expect(result.length).toBeLessThan(longText.length); + // 2. Result is not empty + expect(result.length).toBeGreaterThan(0); + // 3. Result is a proper substring of the original text + expect(longText.includes(result)).toBe(true); + }); + + it("should handle non-ASCII characters", () => { + const unicodeText = "Hello 👋 World 🌍"; + const result = trimTokens(unicodeText, 5, model); + expect(result.length).toBeGreaterThan(0); + }); + + it("should handle multiline text", () => { + const multilineText = `Line 1 + Line 2 + Line 3 + Line 4 + Line 5`; + const result = trimTokens(multilineText, 5, model); + expect(result.length).toBeGreaterThan(0); + expect(result.length).toBeLessThan(multilineText.length); + }); + }); }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 710be60146..b3e66959ea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -755,6 +755,9 @@ importers: js-sha1: specifier: 0.7.0 version: 0.7.0 + js-tiktoken: + specifier: ^1.0.15 + version: 1.0.15 langchain: specifier: 0.3.6 version: 0.3.6(@langchain/core@0.3.19(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(encoding@0.1.13)(handlebars@4.7.8)(openai@4.73.0(encoding@0.1.13)(zod@3.23.8)) @@ -764,9 +767,6 @@ importers: openai: specifier: 4.73.0 version: 4.73.0(encoding@0.1.13)(zod@3.23.8) - tiktoken: - specifier: 1.0.17 - version: 1.0.17 tinyld: specifier: 1.3.4 version: 1.3.4 @@ -872,7 +872,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))(jest@29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@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(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)))(typescript@5.6.3) ts-node: specifier: 10.9.2 version: 10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3) @@ -1539,6 +1539,109 @@ importers: specifier: ^5.0.0 version: 5.6.3 + web-agent: + dependencies: + '@ai16z/adapter-sqljs': + specifier: workspace:* + version: link:../packages/adapter-sqljs + '@ai16z/eliza': + specifier: workspace:* + version: link:../packages/core + '@ai16z/plugin-bootstrap': + specifier: workspace:* + version: link:../packages/plugin-bootstrap + '@radix-ui/react-dialog': + specifier: 1.1.2 + version: 1.1.2(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-separator': + specifier: 1.1.0 + version: 1.1.0(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@radix-ui/react-slot': + specifier: 1.1.0 + version: 1.1.0(@types/react@18.3.12)(react@18.3.1) + '@radix-ui/react-tooltip': + specifier: 1.1.4 + version: 1.1.4(@types/react-dom@18.3.1)(@types/react@18.3.12)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@tanstack/react-query': + specifier: 5.61.0 + version: 5.61.0(react@18.3.1) + class-variance-authority: + specifier: 0.7.0 + version: 0.7.0 + clsx: + specifier: 2.1.0 + version: 2.1.0 + lucide-react: + specifier: 0.460.0 + version: 0.460.0(react@18.3.1) + react: + specifier: 18.3.1 + version: 18.3.1 + react-dom: + specifier: 18.3.1 + version: 18.3.1(react@18.3.1) + react-router-dom: + specifier: 6.22.1 + version: 6.22.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + tailwind-merge: + specifier: 2.5.4 + version: 2.5.4 + tailwindcss-animate: + specifier: 1.0.7 + version: 1.0.7(tailwindcss@3.4.15(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3))) + vite-plugin-top-level-await: + specifier: 1.4.4 + version: 1.4.4(@swc/helpers@0.5.15)(rollup@4.27.4)(vite@web-agent+@tanstack+router-plugin+vite) + vite-plugin-wasm: + specifier: 3.3.0 + version: 3.3.0(vite@web-agent+@tanstack+router-plugin+vite) + devDependencies: + '@eslint/js': + specifier: 9.15.0 + version: 9.15.0 + '@types/node': + specifier: 22.8.4 + version: 22.8.4 + '@types/react': + specifier: 18.3.12 + version: 18.3.12 + '@types/react-dom': + specifier: 18.3.1 + version: 18.3.1 + '@vitejs/plugin-react': + specifier: 4.3.3 + version: 4.3.3(vite@web-agent+@tanstack+router-plugin+vite) + autoprefixer: + specifier: 10.4.20 + version: 10.4.20(postcss@8.4.49) + eslint: + specifier: 9.13.0 + version: 9.13.0(jiti@2.4.0) + eslint-plugin-react-hooks: + specifier: 5.0.0 + version: 5.0.0(eslint@9.13.0(jiti@2.4.0)) + eslint-plugin-react-refresh: + specifier: 0.4.14 + version: 0.4.14(eslint@9.13.0(jiti@2.4.0)) + globals: + specifier: 15.11.0 + version: 15.11.0 + postcss: + specifier: 8.4.49 + version: 8.4.49 + tailwindcss: + specifier: 3.4.15 + version: 3.4.15(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) + typescript: + specifier: ~5.6.2 + version: 5.6.3 + typescript-eslint: + specifier: 8.11.0 + version: 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + vite: + specifier: link:@tanstack/router-plugin/vite + version: link:@tanstack/router-plugin/vite + packages: '@0glabs/0g-ts-sdk@0.2.1': @@ -3854,10 +3957,18 @@ packages: resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@eslint/config-array@0.18.0': + resolution: {integrity: sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-array@0.19.0': resolution: {integrity: sha512-zdHg2FPIFNKPdcHWtiNT+jEFCHYVplAXRDlQDyqy0zGx/q2parwh7brGJSiTxRk/TSMkbM//zt/f5CHgyTyaSQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@0.7.0': + resolution: {integrity: sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@0.9.0': resolution: {integrity: sha512-7ATR9F0e4W85D/0w7cU0SNj7qkAexMG+bAHEZOjo9akvGuhHE2m7umzWzfnpa0XAg5Kxc1BWmtPMV67jJ+9VUg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -3866,6 +3977,10 @@ packages: resolution: {integrity: sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.13.0': + resolution: {integrity: sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@9.15.0': resolution: {integrity: sha512-tMTqrY+EzbXmKJR5ToI8lxu7jaN5EdmrBFJpQk5JmSlyLsx6o4t27r883K5xsLuCYCpfKBCGswMSWXsM+jB7lg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -9118,6 +9233,16 @@ packages: resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint@9.13.0: + resolution: {integrity: sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + hasBin: true + peerDependencies: + jiti: '*' + peerDependenciesMeta: + jiti: + optional: true + eslint@9.16.0: resolution: {integrity: sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -16263,7 +16388,7 @@ snapshots: - utf-8-validate - vue - '@ai16z/adapter-sqljs@0.1.4-alpha.3(@google-cloud/vertexai@1.9.0(encoding@0.1.13))(@langchain/core@0.3.19(openai@4.69.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(bufferutil@4.0.8)(encoding@0.1.13)(handlebars@4.7.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.11))(svelte@5.2.11)(utf-8-validate@5.0.10)(whatwg-url@14.0.0)': + '@ai16z/adapter-sqljs@0.1.4-alpha.3(@google-cloud/vertexai@1.9.0(encoding@0.1.13))(@langchain/core@0.3.19(openai@4.69.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(encoding@0.1.13)(handlebars@4.7.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.11))(svelte@5.2.11)(whatwg-url@14.0.0)': dependencies: '@ai16z/eliza': 0.1.4-alpha.3(@google-cloud/vertexai@1.9.0(encoding@0.1.13))(@langchain/core@0.3.19(openai@4.69.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(bufferutil@4.0.8)(encoding@0.1.13)(handlebars@4.7.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.11))(svelte@5.2.11)(utf-8-validate@5.0.10)(whatwg-url@14.0.0) '@types/sql.js': 1.4.9 @@ -16282,7 +16407,6 @@ snapshots: - '@langchain/mistralai' - '@langchain/ollama' - axios - - bufferutil - cheerio - encoding - handlebars @@ -16293,7 +16417,6 @@ snapshots: - supports-color - svelte - typeorm - - utf-8-validate - vue '@ai16z/adapter-supabase@0.1.4-alpha.3(@google-cloud/vertexai@1.9.0(encoding@0.1.13))(@langchain/core@0.3.19(openai@4.69.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(bufferutil@4.0.8)(encoding@0.1.13)(handlebars@4.7.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.11))(svelte@5.2.11)(utf-8-validate@5.0.10)(whatwg-url@14.0.0)': @@ -16335,7 +16458,7 @@ snapshots: '@ai-sdk/groq': 0.0.3(zod@3.23.8) '@ai-sdk/openai': 1.0.0-canary.3(zod@3.23.8) '@ai16z/adapter-sqlite': 0.1.4-alpha.3(@google-cloud/vertexai@1.9.0(encoding@0.1.13))(@langchain/core@0.3.19(openai@4.69.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(bufferutil@4.0.8)(encoding@0.1.13)(handlebars@4.7.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.11))(svelte@5.2.11)(utf-8-validate@5.0.10)(whatwg-url@14.0.0) - '@ai16z/adapter-sqljs': 0.1.4-alpha.3(@google-cloud/vertexai@1.9.0(encoding@0.1.13))(@langchain/core@0.3.19(openai@4.69.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(bufferutil@4.0.8)(encoding@0.1.13)(handlebars@4.7.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.11))(svelte@5.2.11)(utf-8-validate@5.0.10)(whatwg-url@14.0.0) + '@ai16z/adapter-sqljs': 0.1.4-alpha.3(@google-cloud/vertexai@1.9.0(encoding@0.1.13))(@langchain/core@0.3.19(openai@4.69.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(encoding@0.1.13)(handlebars@4.7.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.11))(svelte@5.2.11)(whatwg-url@14.0.0) '@ai16z/adapter-supabase': 0.1.4-alpha.3(@google-cloud/vertexai@1.9.0(encoding@0.1.13))(@langchain/core@0.3.19(openai@4.69.0(encoding@0.1.13)(zod@3.23.8)))(axios@1.7.8)(bufferutil@4.0.8)(encoding@0.1.13)(handlebars@4.7.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.11))(svelte@5.2.11)(utf-8-validate@5.0.10)(whatwg-url@14.0.0) '@anthropic-ai/sdk': 0.30.1(encoding@0.1.13) '@types/uuid': 10.0.0 @@ -19654,6 +19777,11 @@ snapshots: '@esbuild/win32-x64@0.24.0': optional: true + '@eslint-community/eslint-utils@4.4.1(eslint@9.13.0(jiti@2.4.0))': + dependencies: + eslint: 9.13.0(jiti@2.4.0) + eslint-visitor-keys: 3.4.3 + '@eslint-community/eslint-utils@4.4.1(eslint@9.16.0(jiti@2.4.0))': dependencies: eslint: 9.16.0(jiti@2.4.0) @@ -19661,6 +19789,14 @@ snapshots: '@eslint-community/regexpp@4.12.1': {} + '@eslint/config-array@0.18.0': + dependencies: + '@eslint/object-schema': 2.1.4 + debug: 4.3.7(supports-color@5.5.0) + minimatch: 3.1.2 + transitivePeerDependencies: + - supports-color + '@eslint/config-array@0.19.0': dependencies: '@eslint/object-schema': 2.1.4 @@ -19669,6 +19805,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/core@0.7.0': {} + '@eslint/core@0.9.0': {} '@eslint/eslintrc@3.2.0': @@ -19685,6 +19823,8 @@ snapshots: transitivePeerDependencies: - supports-color + '@eslint/js@9.13.0': {} + '@eslint/js@9.15.0': {} '@eslint/js@9.16.0': {} @@ -19956,7 +20096,7 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -19969,14 +20109,14 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) + jest-config: 29.7.0(@types/node@20.17.9)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -20001,7 +20141,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -20019,7 +20159,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.8.4 + '@types/node': 20.17.9 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -20041,7 +20181,7 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.8.4 + '@types/node': 20.17.9 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 @@ -20111,7 +20251,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -22506,7 +22646,7 @@ snapshots: '@types/bonjour@3.5.13': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/chrome@0.0.278': dependencies: @@ -22516,11 +22656,11 @@ snapshots: '@types/connect-history-api-fallback@1.5.4': dependencies: '@types/express-serve-static-core': 5.0.2 - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/connect@3.4.38': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/cors@2.8.17': dependencies: @@ -22673,14 +22813,14 @@ snapshots: '@types/express-serve-static-core@4.19.6': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 '@types/express-serve-static-core@5.0.2': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/qs': 6.9.17 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -22720,7 +22860,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/gtag.js@0.0.12': {} @@ -22744,7 +22884,7 @@ snapshots: '@types/http-proxy@1.17.15': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/istanbul-lib-coverage@2.0.6': {} @@ -22783,12 +22923,12 @@ snapshots: '@types/node-fetch@2.6.12': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 form-data: 4.0.1 '@types/node-forge@1.3.11': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/node@10.17.60': {} @@ -22873,12 +23013,12 @@ snapshots: '@types/sax@1.2.7': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/send@0.17.4': dependencies: '@types/mime': 1.3.5 - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/serve-index@1.9.4': dependencies: @@ -22887,12 +23027,12 @@ snapshots: '@types/serve-static@1.15.7': dependencies: '@types/http-errors': 2.0.4 - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/send': 0.17.4 '@types/sockjs@0.3.36': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/sql.js@1.4.9': dependencies: @@ -22923,11 +23063,11 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/ws@8.5.13': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 '@types/yargs-parser@21.0.3': {} @@ -22937,9 +23077,27 @@ snapshots: '@types/yauzl@2.10.3': dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 optional: true + '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)': + dependencies: + '@eslint-community/regexpp': 4.12.1 + '@typescript-eslint/parser': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/type-utils': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.11.0 + eslint: 9.13.0(jiti@2.4.0) + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.4.3(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/eslint-plugin@8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.16.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.0))(typescript@5.6.3)': dependencies: '@eslint-community/regexpp': 4.12.1 @@ -22994,6 +23152,19 @@ snapshots: transitivePeerDependencies: - supports-color + '@typescript-eslint/parser@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)': + dependencies: + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) + '@typescript-eslint/visitor-keys': 8.11.0 + debug: 4.3.7(supports-color@5.5.0) + eslint: 9.13.0(jiti@2.4.0) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - supports-color + '@typescript-eslint/parser@8.11.0(eslint@9.16.0(jiti@2.4.0))(typescript@5.6.3)': dependencies: '@typescript-eslint/scope-manager': 8.11.0 @@ -23053,6 +23224,18 @@ snapshots: '@typescript-eslint/types': 8.16.0 '@typescript-eslint/visitor-keys': 8.16.0 + '@typescript-eslint/type-utils@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)': + dependencies: + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + debug: 4.3.7(supports-color@5.5.0) + ts-api-utils: 1.4.3(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - eslint + - supports-color + '@typescript-eslint/type-utils@8.11.0(eslint@9.16.0(jiti@2.4.0))(typescript@5.6.3)': dependencies: '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) @@ -23168,6 +23351,17 @@ snapshots: - supports-color - typescript + '@typescript-eslint/utils@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3)': + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0(jiti@2.4.0)) + '@typescript-eslint/scope-manager': 8.11.0 + '@typescript-eslint/types': 8.11.0 + '@typescript-eslint/typescript-estree': 8.11.0(typescript@5.6.3) + eslint: 9.13.0(jiti@2.4.0) + transitivePeerDependencies: + - supports-color + - typescript + '@typescript-eslint/utils@8.11.0(eslint@9.16.0(jiti@2.4.0))(typescript@5.6.3)': dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.0)) @@ -23262,6 +23456,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitejs/plugin-react@4.3.3(vite@web-agent+@tanstack+router-plugin+vite)': + dependencies: + '@babel/core': 7.26.0 + '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.0) + '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.0) + '@types/babel__core': 7.20.5 + react-refresh: 0.14.2 + vite: link:web-agent/@tanstack/router-plugin/vite + transitivePeerDependencies: + - supports-color + '@vitest/coverage-v8@2.1.5(vitest@2.1.5(@types/node@22.8.4)(jsdom@25.0.1(bufferutil@4.0.8)(canvas@2.11.2(encoding@0.1.13))(utf-8-validate@5.0.10))(terser@5.36.0))': dependencies: '@ampproject/remapping': 2.3.0 @@ -23934,6 +24139,15 @@ snapshots: transitivePeerDependencies: - debug + axios@1.7.8: + dependencies: + follow-redirects: 1.15.9(debug@4.3.7) + form-data: 4.0.1 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + optional: true + axios@1.7.8(debug@4.3.7): dependencies: follow-redirects: 1.15.9(debug@4.3.7) @@ -25038,7 +25252,7 @@ snapshots: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.17.9) + jest-config: 29.7.0(@types/node@20.17.9)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -26121,10 +26335,18 @@ snapshots: '@types/eslint': 9.6.1 eslint-config-prettier: 9.1.0(eslint@9.16.0(jiti@2.4.0)) + eslint-plugin-react-hooks@5.0.0(eslint@9.13.0(jiti@2.4.0)): + dependencies: + eslint: 9.13.0(jiti@2.4.0) + eslint-plugin-react-hooks@5.0.0(eslint@9.16.0(jiti@2.4.0)): dependencies: eslint: 9.16.0(jiti@2.4.0) + eslint-plugin-react-refresh@0.4.14(eslint@9.13.0(jiti@2.4.0)): + dependencies: + eslint: 9.13.0(jiti@2.4.0) + eslint-plugin-react-refresh@0.4.14(eslint@9.16.0(jiti@2.4.0)): dependencies: eslint: 9.16.0(jiti@2.4.0) @@ -26176,6 +26398,48 @@ snapshots: eslint-visitor-keys@4.2.0: {} + eslint@9.13.0(jiti@2.4.0): + dependencies: + '@eslint-community/eslint-utils': 4.4.1(eslint@9.13.0(jiti@2.4.0)) + '@eslint-community/regexpp': 4.12.1 + '@eslint/config-array': 0.18.0 + '@eslint/core': 0.7.0 + '@eslint/eslintrc': 3.2.0 + '@eslint/js': 9.13.0 + '@eslint/plugin-kit': 0.2.3 + '@humanfs/node': 0.16.6 + '@humanwhocodes/module-importer': 1.0.1 + '@humanwhocodes/retry': 0.3.1 + '@types/estree': 1.0.6 + '@types/json-schema': 7.0.15 + ajv: 6.12.6 + chalk: 4.1.2 + cross-spawn: 7.0.6 + debug: 4.3.7(supports-color@5.5.0) + escape-string-regexp: 4.0.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 + esutils: 2.0.3 + fast-deep-equal: 3.1.3 + file-entry-cache: 8.0.0 + find-up: 5.0.0 + glob-parent: 6.0.2 + ignore: 5.3.2 + imurmurhash: 0.1.4 + is-glob: 4.0.3 + json-stable-stringify-without-jsonify: 1.0.1 + lodash.merge: 4.6.2 + minimatch: 3.1.2 + natural-compare: 1.4.0 + optionator: 0.9.4 + text-table: 0.2.0 + optionalDependencies: + jiti: 2.4.0 + transitivePeerDependencies: + - supports-color + eslint@9.16.0(jiti@2.4.0): dependencies: '@eslint-community/eslint-utils': 4.4.1(eslint@9.16.0(jiti@2.4.0)) @@ -26313,7 +26577,7 @@ snapshots: eval@0.1.8: dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 require-like: 0.1.2 event-emitter@0.3.5: @@ -27942,7 +28206,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -27971,7 +28235,7 @@ snapshots: create-jest: 29.7.0(@types/node@20.17.9) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@20.17.9) + jest-config: 29.7.0(@types/node@20.17.9)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -28019,7 +28283,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@20.17.9): + jest-config@29.7.0(@types/node@20.17.9)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)): dependencies: '@babel/core': 7.26.0 '@jest/test-sequencer': 29.7.0 @@ -28045,6 +28309,7 @@ snapshots: strip-json-comments: 3.1.1 optionalDependencies: '@types/node': 20.17.9 + ts-node: 10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -28104,7 +28369,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -28114,7 +28379,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.8.4 + '@types/node': 20.17.9 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -28153,7 +28418,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -28188,7 +28453,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -28216,7 +28481,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 chalk: 4.1.2 cjs-module-lexer: 1.4.1 collect-v8-coverage: 1.0.2 @@ -28262,7 +28527,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -28281,7 +28546,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.8.4 + '@types/node': 20.17.9 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -28290,13 +28555,13 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.8.4 + '@types/node': 20.17.9 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -28590,7 +28855,7 @@ snapshots: zod: 3.23.8 zod-to-json-schema: 3.23.5(zod@3.23.8) optionalDependencies: - axios: 1.7.8(debug@4.3.7) + axios: 1.7.8 handlebars: 4.7.8 transitivePeerDependencies: - encoding @@ -28911,7 +29176,7 @@ snapshots: log-symbols@4.1.0: dependencies: - chalk: 4.1.0 + chalk: 4.1.2 is-unicode-supported: 0.1.0 log-symbols@6.0.0: @@ -30435,7 +30700,7 @@ snapshots: ora@5.3.0: dependencies: bl: 4.1.0 - chalk: 4.1.0 + chalk: 4.1.2 cli-cursor: 3.1.0 cli-spinners: 2.6.1 is-interactive: 1.0.0 @@ -31728,7 +31993,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 22.8.4 + '@types/node': 20.17.9 long: 5.2.3 protocols@2.0.1: {} @@ -32227,44 +32492,6 @@ snapshots: dependencies: esprima: 4.0.1 -<<<<<<< HEAD - ref-struct@1.1.0: - dependencies: - debug: 2.6.9 - ref: 1.3.5 - transitivePeerDependencies: - - supports-color - optional: true - - ref@1.3.5: - dependencies: - bindings: 1.5.0 - debug: 2.6.9 - nan: 2.22.0 - transitivePeerDependencies: - - supports-color - optional: true - -||||||| parent of c5168df3 (chore: pnpm-lock.yaml) -======= - ref-struct@1.1.0: - dependencies: - debug: 2.6.9 - ref: 1.3.5 - transitivePeerDependencies: - - supports-color - optional: true - - ref@1.3.5: - dependencies: - bindings: 1.2.1 - debug: 2.6.9 - nan: 2.22.0 - transitivePeerDependencies: - - supports-color - optional: true - ->>>>>>> c5168df3 (chore: pnpm-lock.yaml) reflect-metadata@0.2.2: {} regenerate-unicode-properties@10.2.0: @@ -33651,12 +33878,12 @@ snapshots: 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))(jest@29.7.0(@types/node@20.17.9))(typescript@5.6.3): + 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(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@20.17.9) + jest: 29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -33669,13 +33896,14 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 babel-jest: 29.7.0(@babel/core@7.26.0) + esbuild: 0.24.0 - ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)))(typescript@5.6.3): + ts-jest@29.2.5(@babel/core@7.26.0)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.26.0))(jest@29.7.0(@types/node@20.17.9))(typescript@5.6.3): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.8.4)(ts-node@10.9.2(@swc/core@1.9.3(@swc/helpers@0.5.15))(@types/node@22.8.4)(typescript@5.6.3)) + jest: 29.7.0(@types/node@20.17.9) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -33853,6 +34081,17 @@ snapshots: typeforce@1.18.0: {} + typescript-eslint@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + '@typescript-eslint/parser': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + '@typescript-eslint/utils': 8.11.0(eslint@9.13.0(jiti@2.4.0))(typescript@5.6.3) + optionalDependencies: + typescript: 5.6.3 + transitivePeerDependencies: + - eslint + - supports-color + typescript-eslint@8.11.0(eslint@9.16.0(jiti@2.4.0))(typescript@5.6.3): dependencies: '@typescript-eslint/eslint-plugin': 8.11.0(@typescript-eslint/parser@8.11.0(eslint@9.16.0(jiti@2.4.0))(typescript@5.6.3))(eslint@9.16.0(jiti@2.4.0))(typescript@5.6.3) @@ -34280,10 +34519,24 @@ snapshots: - '@swc/helpers' - rollup + vite-plugin-top-level-await@1.4.4(@swc/helpers@0.5.15)(rollup@4.27.4)(vite@web-agent+@tanstack+router-plugin+vite): + dependencies: + '@rollup/plugin-virtual': 3.0.2(rollup@4.27.4) + '@swc/core': 1.9.3(@swc/helpers@0.5.15) + uuid: 10.0.0 + vite: link:web-agent/@tanstack/router-plugin/vite + transitivePeerDependencies: + - '@swc/helpers' + - rollup + vite-plugin-wasm@3.3.0(vite@client+@tanstack+router-plugin+vite): dependencies: vite: link:client/@tanstack/router-plugin/vite + vite-plugin-wasm@3.3.0(vite@web-agent+@tanstack+router-plugin+vite): + dependencies: + vite: link:web-agent/@tanstack/router-plugin/vite + vite@5.4.11(@types/node@20.17.9)(terser@5.36.0): dependencies: esbuild: 0.21.5