From cdc772a421cd2458e26af98a1b07a028d9443359 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Tue, 26 Aug 2025 19:17:32 -0500 Subject: [PATCH 01/24] Dependency updates, add package-lock.json --- backend/package-lock.json | 2843 ++++++++++++++++++++++++++++++++ backend/package.json | 30 +- backend/src/jippity-handler.ts | 7 +- 3 files changed, 2863 insertions(+), 17 deletions(-) create mode 100644 backend/package-lock.json diff --git a/backend/package-lock.json b/backend/package-lock.json new file mode 100644 index 0000000..0457a21 --- /dev/null +++ b/backend/package-lock.json @@ -0,0 +1,2843 @@ +{ + "name": "neuro-api-jippity", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "neuro-api-jippity", + "version": "1.0.0", + "dependencies": { + "ajv": "^8.17.1", + "dotenv": "^17.2.1", + "neverthrow": "^8.2.0", + "openai": "^5.16.0", + "winston": "^3.17.0", + "ws": "^8.18.3" + }, + "devDependencies": { + "@eslint/js": "^9.34.0", + "@types/ws": "^8.18.1", + "@typescript-eslint/eslint-plugin": "^8.41.0", + "@typescript-eslint/parser": "^8.41.0", + "eslint": "^9.34.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.4", + "prettier": "^3.6.2", + "tsx": "^4.20.5", + "typescript": "^5.9.2", + "typescript-eslint": "^8.41.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "license": "MIT", + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.34.0.tgz", + "integrity": "sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/core": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.48.1.tgz", + "integrity": "sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz", + "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz", + "integrity": "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/type-utils": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.41.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz", + "integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz", + "integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.41.0", + "@typescript-eslint/types": "^8.41.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz", + "integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz", + "integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.41.0.tgz", + "integrity": "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz", + "integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz", + "integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.41.0", + "@typescript-eslint/tsconfig-utils": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz", + "integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz", + "integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, + "node_modules/colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "license": "MIT", + "dependencies": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dotenv": { + "version": "17.2.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.1.tgz", + "integrity": "sha512-kQhDYKZecqnM0fCnzI5eIv5L4cAe/iRI+HqMbO/hbRdTAeXDG+M9FjipUxNfbARuEg4iHIbhnhs78BCHNbSxEQ==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.34.0.tgz", + "integrity": "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.34.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "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.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-prettier": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.11.7" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", + "license": "MIT" + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "license": "MIT" + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/logform": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", + "license": "MIT", + "dependencies": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/neverthrow": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/neverthrow/-/neverthrow-8.2.0.tgz", + "integrity": "sha512-kOCT/1MCPAxY5iUV3wytNFUMUolzuwd/VF/1KCx7kf6CutrOsTie+84zTGTpgQycjvfLdBBdvBvFLqFD2c0wkQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "^4.24.0" + } + }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "license": "MIT", + "dependencies": { + "fn.name": "1.x.x" + } + }, + "node_modules/openai": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/openai/-/openai-5.16.0.tgz", + "integrity": "sha512-hoEH8ZNvg1HXjU9mp88L/ZH8O082Z8r6FHCXGiWAzVRrEv443aI57qhch4snu07yQydj+AUAWLenAiBXhu89Tw==", + "license": "Apache-2.0", + "bin": { + "openai": "bin/cli" + }, + "peerDependencies": { + "ws": "^8.18.0", + "zod": "^3.23.8" + }, + "peerDependenciesMeta": { + "ws": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/synckit": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.2.9" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/synckit" + } + }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/triple-beam": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tsx": { + "version": "4.20.5", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.5.tgz", + "integrity": "sha512-+wKjMNU9w/EaQayHXb7WA7ZaHY6hN8WgfvHNQ3t1PnU91/7O8TcTnIhCDYTZwnt8JsO9IBqZ30Ln1r7pPF52Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.41.0.tgz", + "integrity": "sha512-n66rzs5OBXW3SFSnZHr2T685q1i4ODm2nulFJhMZBotaTavsS8TrI3d7bDlRSs9yWo7HmyWrN9qDu14Qv7Y0Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.41.0", + "@typescript-eslint/parser": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/winston": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", + "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", + "license": "MIT", + "dependencies": { + "@colors/colors": "^1.6.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.7.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.9.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", + "license": "MIT", + "dependencies": { + "logform": "^2.7.0", + "readable-stream": "^3.6.2", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/backend/package.json b/backend/package.json index 0a3771d..942887f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -11,24 +11,24 @@ }, "dependencies": { "ajv": "^8.17.1", - "dotenv": "^16.4.7", - "neverthrow": "^8.1.1", - "openai": "^4.76.3", + "dotenv": "^17.2.1", + "neverthrow": "^8.2.0", + "openai": "^5.16.0", "winston": "^3.17.0", - "ws": "^8.14.2" + "ws": "^8.18.3" }, "devDependencies": { - "@eslint/js": "^9.17.0", - "@types/ws": "^8.5.8", - "@typescript-eslint/eslint-plugin": "^8.18.1", - "@typescript-eslint/parser": "^8.18.1", - "eslint": "^9.17.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.2.1", - "prettier": "^3.4.2", - "tsx": "^4.19.2", - "typescript": "^5.7.2", - "typescript-eslint": "^8.18.1" + "@eslint/js": "^9.34.0", + "@types/ws": "^8.18.1", + "@typescript-eslint/eslint-plugin": "^8.41.0", + "@typescript-eslint/parser": "^8.41.0", + "eslint": "^9.34.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.4", + "prettier": "^3.6.2", + "tsx": "^4.20.5", + "typescript": "^5.9.2", + "typescript-eslint": "^8.41.0" }, "private": true } diff --git a/backend/src/jippity-handler.ts b/backend/src/jippity-handler.ts index b264083..8054d8d 100644 --- a/backend/src/jippity-handler.ts +++ b/backend/src/jippity-handler.ts @@ -141,8 +141,11 @@ export class JippityHandler { } }) .catch((error) => { - if (error instanceof OpenAI.APIError && error.request_id) { - log.error(`Error calling OpenAI API with request ID ${error.request_id} ->`, error); + if (error instanceof OpenAI.APIError && error.requestID) { + log.error( + `Error calling OpenAI API with request ID ${error.requestID} ->`, + error + ); } else { log.error("Error calling OpenAI API ->", error); } From 17621f0ea8b3aca316566d300f2ccdf45993279c Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Tue, 26 Aug 2025 19:52:11 -0500 Subject: [PATCH 02/24] Stop using neverthrow. Whose idea was it to add this dependency in the first place? (it was me) --- backend/package-lock.json | 26 --------------- backend/package.json | 1 - backend/src/api-types.ts | 58 +++++++++++++++++++--------------- backend/src/jippity-handler.ts | 24 ++++++++------ 4 files changed, 46 insertions(+), 63 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index 0457a21..1d18225 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -10,7 +10,6 @@ "dependencies": { "ajv": "^8.17.1", "dotenv": "^17.2.1", - "neverthrow": "^8.2.0", "openai": "^5.16.0", "winston": "^3.17.0", "ws": "^8.18.3" @@ -818,19 +817,6 @@ "url": "https://opencollective.com/pkgr" } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.48.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.48.1.tgz", - "integrity": "sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -2188,18 +2174,6 @@ "dev": true, "license": "MIT" }, - "node_modules/neverthrow": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/neverthrow/-/neverthrow-8.2.0.tgz", - "integrity": "sha512-kOCT/1MCPAxY5iUV3wytNFUMUolzuwd/VF/1KCx7kf6CutrOsTie+84zTGTpgQycjvfLdBBdvBvFLqFD2c0wkQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@rollup/rollup-linux-x64-gnu": "^4.24.0" - } - }, "node_modules/one-time": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", diff --git a/backend/package.json b/backend/package.json index 942887f..2c52268 100644 --- a/backend/package.json +++ b/backend/package.json @@ -12,7 +12,6 @@ "dependencies": { "ajv": "^8.17.1", "dotenv": "^17.2.1", - "neverthrow": "^8.2.0", "openai": "^5.16.0", "winston": "^3.17.0", "ws": "^8.18.3" diff --git a/backend/src/api-types.ts b/backend/src/api-types.ts index 71ff800..52f7797 100644 --- a/backend/src/api-types.ts +++ b/backend/src/api-types.ts @@ -1,5 +1,4 @@ import Ajv, { AnySchema, JSONSchemaType, ValidateFunction } from "ajv"; -import { err, ok, Result } from "neverthrow"; import { errorOrUndefined } from "./utils"; const ajv = new Ajv(); @@ -392,19 +391,26 @@ export const Validators: Record> = { action: ajv.compile(ActionMessageSchema) }; +/** + * Validate an object and cast it to the appropriate message type. + * + * @param obj the message object to validate and cast + * @param command the command property of the message (a key of {@link MessageTypeMapping}) + * @param validator the AJV validator function for the specific message type + * @return the validated and cast message object + * @throws {MessageDeserializationError} if validation fails + */ function validateAndCast( obj: unknown, command: T, validator: ValidateFunction -): Result { +): MessageTypeMapping[T] { if (validator(obj)) { - return ok(obj as MessageTypeMapping[T]); + return obj as MessageTypeMapping[T]; } // logValidationErrors(validator); - return err( - new MessageDeserializationError( - `Validation of command "${command}" failed: ${ajv.errorsText(validator.errors)}` - ) + throw new MessageDeserializationError( + `Validation of command "${command}" failed: ${ajv.errorsText(validator.errors)}` ); } @@ -412,46 +418,46 @@ function validateAndCast( * Deserialize a JSON string to a specific message type. * * **Does not validate action schemas for {@link RegisterActionsMessage}.** + * + * @param json the JSON string to deserialize + * @return the deserialized and validated message + * @throws {MessageDeserializationError} if deserialization or validation fails */ -export function deserializeMessage(json: string): Result { +export function deserializeMessage(json: string): Message { let obj; try { obj = JSON.parse(json); } catch (e) { - return err( - new MessageDeserializationError("Message is not valid JSON", errorOrUndefined(e)) - ); + throw new MessageDeserializationError("Message is not valid JSON", errorOrUndefined(e)); } - if (!obj.command) { - return err(new MessageDeserializationError('Message is missing the "command" property')); + throw new MessageDeserializationError('Message is missing the "command" property'); } - if (!(obj.command in Validators)) { - return err(new MessageDeserializationError(`Unknown command "${obj.command}"`)); + throw new MessageDeserializationError(`Unknown command "${obj.command}"`); } - const command: MessageType = obj.command as MessageType; const validator: ValidateFunction = Validators[command]; return validateAndCast(obj, command, validator); } -/** Validate an Action's schema property */ -export function validateActionSchema(action: Action): Result { +/** + * Validate an Action's schema property. + * + * @throws {MessageDeserializationError} if the schema is invalid. + */ +export function validateActionSchema(action: Action): void { if (!action.schema || Object.keys(action.schema).length === 0) { - // No schema to validate - return ok(null); + return; } if (!ajv.validateSchema(action.schema) as boolean) { const errorMessage = ajv.errorsText() ?? "Unknown error"; - return err( - new MessageDeserializationError( - "Invalid Action schema", - new MessageDeserializationError(errorMessage) - ) + throw new MessageDeserializationError( + "Invalid Action schema", + new MessageDeserializationError(errorMessage) ); } - return ok(null); + return; } export class MessageDeserializationError extends Error { diff --git a/backend/src/jippity-handler.ts b/backend/src/jippity-handler.ts index 8054d8d..d88c7b2 100644 --- a/backend/src/jippity-handler.ts +++ b/backend/src/jippity-handler.ts @@ -69,7 +69,7 @@ export class JippityHandler { top_p: 1, frequency_penalty: 0, presence_penalty: 0 - } + }; // Convert actions to tools if there are any if (this.actions.length > 0) { body.tools = this.actions.map(convertActionToTool); @@ -81,7 +81,9 @@ export class JippityHandler { return openai.chat.completions .create(body) .then((response) => { - log.debug(`Successful response from OpenAI API for request ID ${response._request_id}`); + log.debug( + `Successful response from OpenAI API for request ID ${response._request_id}` + ); assert(response.choices.length == 1); const choice = response.choices[0]; if (choice.finish_reason === "stop") { @@ -165,12 +167,13 @@ export class JippityHandler { // } public receiveMessage(dataStr: string): void { - const messageResult = deserializeMessage(dataStr); - if (messageResult.isErr()) { - log.error(`Failed to deserialize message: ${messageResult.error}`); + let message: Message; + try { + message = deserializeMessage(dataStr); + } catch (e) { + log.error(`Failed to deserialize message: ${e}`); return; } - const message = messageResult.value; switch (this.state.id) { case "state/waiting-for-game-startup": @@ -261,12 +264,13 @@ export class JippityHandler { ); continue; } - const actionSchemaValidationResult = validateActionSchema(action); - if (actionSchemaValidationResult.isErr()) { + try { + validateActionSchema(action); + log.debug(`Successfully validated schema for action "${action.name}"`); + } catch (e) { log.error( - `Attempted to register action "${action.name}" with an invalid schema: ${actionSchemaValidationResult.error}` + `Attempted to register action "${action.name}" with an invalid schema: ${e}` ); - continue; } this.actions.push(action); successfulRegistrations++; From df226fecdcf29636e492a87294d2b43bd466a8da Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Tue, 26 Aug 2025 19:17:32 -0500 Subject: [PATCH 03/24] Dependency updates, add package-lock.json. --- backend/package-lock.json | 2843 ++++++++++++++++++++++++++++++++ backend/package.json | 30 +- backend/src/jippity-handler.ts | 7 +- 3 files changed, 2863 insertions(+), 17 deletions(-) create mode 100644 backend/package-lock.json diff --git a/backend/package-lock.json b/backend/package-lock.json new file mode 100644 index 0000000..0457a21 --- /dev/null +++ b/backend/package-lock.json @@ -0,0 +1,2843 @@ +{ + "name": "neuro-api-jippity", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "neuro-api-jippity", + "version": "1.0.0", + "dependencies": { + "ajv": "^8.17.1", + "dotenv": "^17.2.1", + "neverthrow": "^8.2.0", + "openai": "^5.16.0", + "winston": "^3.17.0", + "ws": "^8.18.3" + }, + "devDependencies": { + "@eslint/js": "^9.34.0", + "@types/ws": "^8.18.1", + "@typescript-eslint/eslint-plugin": "^8.41.0", + "@typescript-eslint/parser": "^8.41.0", + "eslint": "^9.34.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.4", + "prettier": "^3.6.2", + "tsx": "^4.20.5", + "typescript": "^5.9.2", + "typescript-eslint": "^8.41.0" + } + }, + "node_modules/@colors/colors": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", + "license": "MIT", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/@dabh/diagnostics": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", + "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", + "license": "MIT", + "dependencies": { + "colorspace": "1.1.x", + "enabled": "2.0.x", + "kuler": "^2.0.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.9.tgz", + "integrity": "sha512-OaGtL73Jck6pBKjNIe24BnFE6agGl+6KxDtTfHhy1HmhthfKouEcOhqpSL64K4/0WCtbKFLOdzD/44cJ4k9opA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.9.tgz", + "integrity": "sha512-5WNI1DaMtxQ7t7B6xa572XMXpHAaI/9Hnhk8lcxF4zVN4xstUgTlvuGDorBguKEnZO70qwEcLpfifMLoxiPqHQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.9.tgz", + "integrity": "sha512-IDrddSmpSv51ftWslJMvl3Q2ZT98fUSL2/rlUXuVqRXHCs5EUF1/f+jbjF5+NG9UffUDMCiTyh8iec7u8RlTLg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.9.tgz", + "integrity": "sha512-I853iMZ1hWZdNllhVZKm34f4wErd4lMyeV7BLzEExGEIZYsOzqDWDf+y082izYUE8gtJnYHdeDpN/6tUdwvfiw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.9.tgz", + "integrity": "sha512-XIpIDMAjOELi/9PB30vEbVMs3GV1v2zkkPnuyRRURbhqjyzIINwj+nbQATh4H9GxUgH1kFsEyQMxwiLFKUS6Rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.9.tgz", + "integrity": "sha512-jhHfBzjYTA1IQu8VyrjCX4ApJDnH+ez+IYVEoJHeqJm9VhG9Dh2BYaJritkYK3vMaXrf7Ogr/0MQ8/MeIefsPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.9.tgz", + "integrity": "sha512-z93DmbnY6fX9+KdD4Ue/H6sYs+bhFQJNCPZsi4XWJoYblUqT06MQUdBCpcSfuiN72AbqeBFu5LVQTjfXDE2A6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.9.tgz", + "integrity": "sha512-mrKX6H/vOyo5v71YfXWJxLVxgy1kyt1MQaD8wZJgJfG4gq4DpQGpgTB74e5yBeQdyMTbgxp0YtNj7NuHN0PoZg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.9.tgz", + "integrity": "sha512-HBU2Xv78SMgaydBmdor38lg8YDnFKSARg1Q6AT0/y2ezUAKiZvc211RDFHlEZRFNRVhcMamiToo7bDx3VEOYQw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.9.tgz", + "integrity": "sha512-BlB7bIcLT3G26urh5Dmse7fiLmLXnRlopw4s8DalgZ8ef79Jj4aUcYbk90g8iCa2467HX8SAIidbL7gsqXHdRw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.9.tgz", + "integrity": "sha512-e7S3MOJPZGp2QW6AK6+Ly81rC7oOSerQ+P8L0ta4FhVi+/j/v2yZzx5CqqDaWjtPFfYz21Vi1S0auHrap3Ma3A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.9.tgz", + "integrity": "sha512-Sbe10Bnn0oUAB2AalYztvGcK+o6YFFA/9829PhOCUS9vkJElXGdphz0A3DbMdP8gmKkqPmPcMJmJOrI3VYB1JQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.9.tgz", + "integrity": "sha512-YcM5br0mVyZw2jcQeLIkhWtKPeVfAerES5PvOzaDxVtIyZ2NUBZKNLjC5z3/fUlDgT6w89VsxP2qzNipOaaDyA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.9.tgz", + "integrity": "sha512-++0HQvasdo20JytyDpFvQtNrEsAgNG2CY1CLMwGXfFTKGBGQT3bOeLSYE2l1fYdvML5KUuwn9Z8L1EWe2tzs1w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.9.tgz", + "integrity": "sha512-uNIBa279Y3fkjV+2cUjx36xkx7eSjb8IvnL01eXUKXez/CBHNRw5ekCGMPM0BcmqBxBcdgUWuUXmVWwm4CH9kg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.9.tgz", + "integrity": "sha512-Mfiphvp3MjC/lctb+7D287Xw1DGzqJPb/J2aHHcHxflUo+8tmN/6d4k6I2yFR7BVo5/g7x2Monq4+Yew0EHRIA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.9.tgz", + "integrity": "sha512-iSwByxzRe48YVkmpbgoxVzn76BXjlYFXC7NvLYq+b+kDjyyk30J0JY47DIn8z1MO3K0oSl9fZoRmZPQI4Hklzg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.9.tgz", + "integrity": "sha512-9jNJl6FqaUG+COdQMjSCGW4QiMHH88xWbvZ+kRVblZsWrkXlABuGdFJ1E9L7HK+T0Yqd4akKNa/lO0+jDxQD4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.9.tgz", + "integrity": "sha512-RLLdkflmqRG8KanPGOU7Rpg829ZHu8nFy5Pqdi9U01VYtG9Y0zOG6Vr2z4/S+/3zIyOxiK6cCeYNWOFR9QP87g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.9.tgz", + "integrity": "sha512-YaFBlPGeDasft5IIM+CQAhJAqS3St3nJzDEgsgFixcfZeyGPCd6eJBWzke5piZuZ7CtL656eOSYKk4Ls2C0FRQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.9.tgz", + "integrity": "sha512-1MkgTCuvMGWuqVtAvkpkXFmtL8XhWy+j4jaSO2wxfJtilVCi0ZE37b8uOdMItIHz4I6z1bWWtEX4CJwcKYLcuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.25.9.tgz", + "integrity": "sha512-4Xd0xNiMVXKh6Fa7HEJQbrpP3m3DDn43jKxMjxLLRjWnRsfxjORYJlXPO4JNcXtOyfajXorRKY9NkOpTHptErg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.9.tgz", + "integrity": "sha512-WjH4s6hzo00nNezhp3wFIAfmGZ8U7KtrJNlFMRKxiI9mxEK1scOMAaa9i4crUtu+tBr+0IN6JCuAcSBJZfnphw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.9.tgz", + "integrity": "sha512-mGFrVJHmZiRqmP8xFOc6b84/7xa5y5YvR1x8djzXpJBSv/UsNK6aqec+6JDjConTgvvQefdGhFDAs2DLAds6gQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.9.tgz", + "integrity": "sha512-b33gLVU2k11nVx1OhX3C8QQP6UHQK4ZtN56oFWvVXvz2VkDoe6fbG8TOgHFxEvqeqohmRnIHe5A1+HADk4OQww==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.9.tgz", + "integrity": "sha512-PPOl1mi6lpLNQxnGoyAfschAodRFYXJ+9fs6WHXz7CSWKbOqiMZsubC+BQsVKuul+3vKLuwTHsS2c2y9EoKwxQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.7.0.tgz", + "integrity": "sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==", + "dev": true, + "license": "MIT", + "dependencies": { + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/config-array": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.21.0.tgz", + "integrity": "sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/object-schema": "^2.1.6", + "debug": "^4.3.1", + "minimatch": "^3.1.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/config-helpers": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.3.1.tgz", + "integrity": "sha512-xR93k9WhrDYpXHORXpxVL5oHj3Era7wo6k/Wd8/IsQNnZUTzkGS29lyn3nAT05v6ltUuTFVCCYDEGfy2Or/sPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/core": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.15.2.tgz", + "integrity": "sha512-78Md3/Rrxh83gCxoUc0EiciuOHsIITzLy53m3d9UyiW8y9Dj2D29FeETqyKA+BRK76tnTp6RXWb3pCay8Oyomg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.3.1.tgz", + "integrity": "sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/@eslint/js": { + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.34.0.tgz", + "integrity": "sha512-EoyvqQnBNsV1CWaEJ559rxXL4c8V92gxirbawSmVUOWXlsRxxQXl6LmCpdUblgxgSkDIqKnhzba2SjRTI/A5Rw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + } + }, + "node_modules/@eslint/object-schema": { + "version": "2.1.6", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.6.tgz", + "integrity": "sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@eslint/plugin-kit": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.3.5.tgz", + "integrity": "sha512-Z5kJ+wU3oA7MMIqVR9tyZRtjYPr4OC004Q4Rw7pgOKUOKkJfZ3O24nz3WYfGRpMDNmcOi3TwQOmgm7B7Tpii0w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@eslint/core": "^0.15.2", + "levn": "^0.4.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } + }, + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@pkgr/core": { + "version": "0.2.9", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.2.9.tgz", + "integrity": "sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.48.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.48.1.tgz", + "integrity": "sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "24.3.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-24.3.0.tgz", + "integrity": "sha512-aPTXCrfwnDLj4VvXrm+UUCQjNEvJgNA8s5F1cvwQU+3KNltTOkBm1j30uNLyqqPNe7gE3KFzImYoZEfLhp4Yow==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~7.10.0" + } + }, + "node_modules/@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", + "license": "MIT" + }, + "node_modules/@types/ws": { + "version": "8.18.1", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.18.1.tgz", + "integrity": "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.41.0.tgz", + "integrity": "sha512-8fz6oa6wEKZrhXWro/S3n2eRJqlRcIa6SlDh59FXJ5Wp5XRZ8B9ixpJDcjadHq47hMx0u+HW6SNa6LjJQ6NLtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/regexpp": "^4.10.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/type-utils": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "graphemer": "^1.4.0", + "ignore": "^7.0.0", + "natural-compare": "^1.4.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^8.41.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.41.0.tgz", + "integrity": "sha512-gTtSdWX9xiMPA/7MV9STjJOOYtWwIJIYxkQxnSV1U3xcE+mnJSH3f6zI0RYP+ew66WSlZ5ed+h0VCxsvdC1jJg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.41.0.tgz", + "integrity": "sha512-b8V9SdGBQzQdjJ/IO3eDifGpDBJfvrNTp2QD9P2BeqWTGrRibgfgIlBSw6z3b6R7dPzg752tOs4u/7yCLxksSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.41.0", + "@typescript-eslint/types": "^8.41.0", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.41.0.tgz", + "integrity": "sha512-n6m05bXn/Cd6DZDGyrpXrELCPVaTnLdPToyhBoFkLIMznRUQUEQdSp96s/pcWSQdqOhrgR1mzJ+yItK7T+WPMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.41.0.tgz", + "integrity": "sha512-TDhxYFPUYRFxFhuU5hTIJk+auzM/wKvWgoNYOPcOf6i4ReYlOoYN8q1dV5kOTjNQNJgzWN3TUUQMtlLOcUgdUw==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.41.0.tgz", + "integrity": "sha512-63qt1h91vg3KsjVVonFJWjgSK7pZHSQFKH6uwqxAH9bBrsyRhO6ONoKyXxyVBzG1lJnFAJcKAcxLS54N1ee1OQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0", + "debug": "^4.3.4", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.41.0.tgz", + "integrity": "sha512-9EwxsWdVqh42afLbHP90n2VdHaWU/oWgbH2P0CfcNfdKL7CuKpwMQGjwev56vWu9cSKU7FWSu6r9zck6CVfnag==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.41.0.tgz", + "integrity": "sha512-D43UwUYJmGhuwHfY7MtNKRZMmfd8+p/eNSfFe6tH5mbVDto+VQCayeAt35rOx3Cs6wxD16DQtIKw/YXxt5E0UQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.41.0", + "@typescript-eslint/tsconfig-utils": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/visitor-keys": "8.41.0", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.41.0.tgz", + "integrity": "sha512-udbCVstxZ5jiPIXrdH+BZWnPatjlYwJuJkDA4Tbo3WyYLh8NvB+h/bKeSZHDOFKfphsZYJQqaFtLeXEqurQn1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.41.0", + "@typescript-eslint/types": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.41.0.tgz", + "integrity": "sha512-+GeGMebMCy0elMNg67LRNoVnUFPIm37iu5CmHESVx56/9Jsfdpsvbv605DQ81Pi/x11IdKUsS5nzgTYbCQU9fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.41.0", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/visitor-keys/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/acorn": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", + "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "license": "Python-2.0" + }, + "node_modules/async": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", + "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==", + "license": "MIT" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/color": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", + "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.3", + "color-string": "^1.6.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "license": "MIT", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "license": "MIT" + }, + "node_modules/colorspace": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", + "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", + "license": "MIT", + "dependencies": { + "color": "^3.1.3", + "text-hex": "1.0.x" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.1.tgz", + "integrity": "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dotenv": { + "version": "17.2.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.1.tgz", + "integrity": "sha512-kQhDYKZecqnM0fCnzI5eIv5L4cAe/iRI+HqMbO/hbRdTAeXDG+M9FjipUxNfbARuEg4iHIbhnhs78BCHNbSxEQ==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/enabled": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", + "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==", + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.25.9", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.9.tgz", + "integrity": "sha512-CRbODhYyQx3qp7ZEwzxOk4JBqmD/seJrzPa/cGjY1VtIn5E09Oi9/dB4JwctnfZ8Q8iT7rioVv5k/FNT/uf54g==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.25.9", + "@esbuild/android-arm": "0.25.9", + "@esbuild/android-arm64": "0.25.9", + "@esbuild/android-x64": "0.25.9", + "@esbuild/darwin-arm64": "0.25.9", + "@esbuild/darwin-x64": "0.25.9", + "@esbuild/freebsd-arm64": "0.25.9", + "@esbuild/freebsd-x64": "0.25.9", + "@esbuild/linux-arm": "0.25.9", + "@esbuild/linux-arm64": "0.25.9", + "@esbuild/linux-ia32": "0.25.9", + "@esbuild/linux-loong64": "0.25.9", + "@esbuild/linux-mips64el": "0.25.9", + "@esbuild/linux-ppc64": "0.25.9", + "@esbuild/linux-riscv64": "0.25.9", + "@esbuild/linux-s390x": "0.25.9", + "@esbuild/linux-x64": "0.25.9", + "@esbuild/netbsd-arm64": "0.25.9", + "@esbuild/netbsd-x64": "0.25.9", + "@esbuild/openbsd-arm64": "0.25.9", + "@esbuild/openbsd-x64": "0.25.9", + "@esbuild/openharmony-arm64": "0.25.9", + "@esbuild/sunos-x64": "0.25.9", + "@esbuild/win32-arm64": "0.25.9", + "@esbuild/win32-ia32": "0.25.9", + "@esbuild/win32-x64": "0.25.9" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "9.34.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.34.0.tgz", + "integrity": "sha512-RNCHRX5EwdrESy3Jc9o8ie8Bog+PeYvvSR8sDGoZxNFTvZ4dlxUB3WzQ3bQMztFrSRODGrLLj8g6OFuGY/aiQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.21.0", + "@eslint/config-helpers": "^0.3.1", + "@eslint/core": "^0.15.2", + "@eslint/eslintrc": "^3.3.1", + "@eslint/js": "9.34.0", + "@eslint/plugin-kit": "^0.3.5", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^8.4.0", + "eslint-visitor-keys": "^4.2.1", + "espree": "^10.4.0", + "esquery": "^1.5.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "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.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-config-prettier": { + "version": "10.1.8", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-10.1.8.tgz", + "integrity": "sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==", + "dev": true, + "license": "MIT", + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "funding": { + "url": "https://opencollective.com/eslint-config-prettier" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.5.4.tgz", + "integrity": "sha512-swNtI95SToIz05YINMA6Ox5R057IMAmWZ26GqPxusAp1TZzj+IdY9tXNWWD3vkF/wEqydCONcwjTFpxybBqZsg==", + "dev": true, + "license": "MIT", + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.11.7" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": ">= 7.0.0 <10.0.0 || >=10.1.0", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.4.0.tgz", + "integrity": "sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/eslint/node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/espree": { + "version": "10.4.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", + "integrity": "sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "acorn": "^8.15.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.1.tgz", + "integrity": "sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esquery": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fecha": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", + "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==", + "license": "MIT" + }, + "node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/flatted": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" + }, + "node_modules/fn.name": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", + "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==", + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/get-tsconfig": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.10.1.tgz", + "integrity": "sha512-auHyJ4AgMz7vgS8Hp3N6HXSmlMdUyhSUrfBF16w153rxtLIEOE+HGqaBppczZvnHLqQJfiHotCYpNhl0lUROFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "license": "MIT" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz", + "integrity": "sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==", + "license": "MIT" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/kuler": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", + "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==", + "license": "MIT" + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/logform": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.7.0.tgz", + "integrity": "sha512-TFYA4jnP7PVbmlBIfhlSe+WKxs9dklXMTEGcBCIvLhE/Tn3H6Gk1norupVW7m5Cnd4bLcr08AytbyV/xj7f/kQ==", + "license": "MIT", + "dependencies": { + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", + "fecha": "^4.2.0", + "ms": "^2.1.1", + "safe-stable-stringify": "^2.3.1", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/neverthrow": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/neverthrow/-/neverthrow-8.2.0.tgz", + "integrity": "sha512-kOCT/1MCPAxY5iUV3wytNFUMUolzuwd/VF/1KCx7kf6CutrOsTie+84zTGTpgQycjvfLdBBdvBvFLqFD2c0wkQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@rollup/rollup-linux-x64-gnu": "^4.24.0" + } + }, + "node_modules/one-time": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", + "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", + "license": "MIT", + "dependencies": { + "fn.name": "1.x.x" + } + }, + "node_modules/openai": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/openai/-/openai-5.16.0.tgz", + "integrity": "sha512-hoEH8ZNvg1HXjU9mp88L/ZH8O082Z8r6FHCXGiWAzVRrEv443aI57qhch4snu07yQydj+AUAWLenAiBXhu89Tw==", + "license": "Apache-2.0", + "bin": { + "openai": "bin/cli" + }, + "peerDependencies": { + "ws": "^8.18.0", + "zod": "^3.23.8" + }, + "peerDependenciesMeta": { + "ws": { + "optional": true + }, + "zod": { + "optional": true + } + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", + "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/semver": { + "version": "7.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.2.tgz", + "integrity": "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/synckit": { + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.11.tgz", + "integrity": "sha512-MeQTA1r0litLUf0Rp/iisCaL8761lKAZHaimlbGK4j0HysC4PLfqygQj9srcs0m2RdtDYnF8UuYyKpbjHYp7Jw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.2.9" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/synckit" + } + }, + "node_modules/text-hex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", + "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==", + "license": "MIT" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/triple-beam": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", + "license": "MIT", + "engines": { + "node": ">= 14.0.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, + "node_modules/tsx": { + "version": "4.20.5", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.20.5.tgz", + "integrity": "sha512-+wKjMNU9w/EaQayHXb7WA7ZaHY6hN8WgfvHNQ3t1PnU91/7O8TcTnIhCDYTZwnt8JsO9IBqZ30Ln1r7pPF52Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "~0.25.0", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/typescript": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.2.tgz", + "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/typescript-eslint": { + "version": "8.41.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.41.0.tgz", + "integrity": "sha512-n66rzs5OBXW3SFSnZHr2T685q1i4ODm2nulFJhMZBotaTavsS8TrI3d7bDlRSs9yWo7HmyWrN9qDu14Qv7Y0Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.41.0", + "@typescript-eslint/parser": "8.41.0", + "@typescript-eslint/typescript-estree": "8.41.0", + "@typescript-eslint/utils": "8.41.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/undici-types": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.10.0.tgz", + "integrity": "sha512-t5Fy/nfn+14LuOc2KNYg75vZqClpAiqscVvMygNnlsHBFpSXdJaYtXMcdNLpl/Qvc3P2cB3s6lOV51nqsFq4ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/winston": { + "version": "3.17.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.17.0.tgz", + "integrity": "sha512-DLiFIXYC5fMPxaRg832S6F5mJYvePtmO5G9v9IgUFPhXm9/GkXarH/TUrBAVzhTCzAj9anE/+GjrgXp/54nOgw==", + "license": "MIT", + "dependencies": { + "@colors/colors": "^1.6.0", + "@dabh/diagnostics": "^2.0.2", + "async": "^3.2.3", + "is-stream": "^2.0.0", + "logform": "^2.7.0", + "one-time": "^1.0.0", + "readable-stream": "^3.4.0", + "safe-stable-stringify": "^2.3.1", + "stack-trace": "0.0.x", + "triple-beam": "^1.3.0", + "winston-transport": "^4.9.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/winston-transport": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.9.0.tgz", + "integrity": "sha512-8drMJ4rkgaPo1Me4zD/3WLfI/zPdA9o2IipKODunnGDcuqbHwjsbB79ylv04LCGGzU0xQ6vTznOMpQGaLhhm6A==", + "license": "MIT", + "dependencies": { + "logform": "^2.7.0", + "readable-stream": "^3.6.2", + "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" + } + }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/backend/package.json b/backend/package.json index 0a3771d..942887f 100644 --- a/backend/package.json +++ b/backend/package.json @@ -11,24 +11,24 @@ }, "dependencies": { "ajv": "^8.17.1", - "dotenv": "^16.4.7", - "neverthrow": "^8.1.1", - "openai": "^4.76.3", + "dotenv": "^17.2.1", + "neverthrow": "^8.2.0", + "openai": "^5.16.0", "winston": "^3.17.0", - "ws": "^8.14.2" + "ws": "^8.18.3" }, "devDependencies": { - "@eslint/js": "^9.17.0", - "@types/ws": "^8.5.8", - "@typescript-eslint/eslint-plugin": "^8.18.1", - "@typescript-eslint/parser": "^8.18.1", - "eslint": "^9.17.0", - "eslint-config-prettier": "^9.1.0", - "eslint-plugin-prettier": "^5.2.1", - "prettier": "^3.4.2", - "tsx": "^4.19.2", - "typescript": "^5.7.2", - "typescript-eslint": "^8.18.1" + "@eslint/js": "^9.34.0", + "@types/ws": "^8.18.1", + "@typescript-eslint/eslint-plugin": "^8.41.0", + "@typescript-eslint/parser": "^8.41.0", + "eslint": "^9.34.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-prettier": "^5.5.4", + "prettier": "^3.6.2", + "tsx": "^4.20.5", + "typescript": "^5.9.2", + "typescript-eslint": "^8.41.0" }, "private": true } diff --git a/backend/src/jippity-handler.ts b/backend/src/jippity-handler.ts index b264083..8054d8d 100644 --- a/backend/src/jippity-handler.ts +++ b/backend/src/jippity-handler.ts @@ -141,8 +141,11 @@ export class JippityHandler { } }) .catch((error) => { - if (error instanceof OpenAI.APIError && error.request_id) { - log.error(`Error calling OpenAI API with request ID ${error.request_id} ->`, error); + if (error instanceof OpenAI.APIError && error.requestID) { + log.error( + `Error calling OpenAI API with request ID ${error.requestID} ->`, + error + ); } else { log.error("Error calling OpenAI API ->", error); } From 6e0f11bde30a490f5e7f48008c6e8a2e44d89e7f Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Tue, 26 Aug 2025 19:52:11 -0500 Subject: [PATCH 04/24] Stop using neverthrow. Whose idea was it to add this dependency in the first place? (it was me) --- backend/package-lock.json | 26 --------------- backend/package.json | 1 - backend/src/api-types.ts | 58 +++++++++++++++++++--------------- backend/src/jippity-handler.ts | 24 ++++++++------ 4 files changed, 46 insertions(+), 63 deletions(-) diff --git a/backend/package-lock.json b/backend/package-lock.json index 0457a21..1d18225 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -10,7 +10,6 @@ "dependencies": { "ajv": "^8.17.1", "dotenv": "^17.2.1", - "neverthrow": "^8.2.0", "openai": "^5.16.0", "winston": "^3.17.0", "ws": "^8.18.3" @@ -818,19 +817,6 @@ "url": "https://opencollective.com/pkgr" } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.48.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.48.1.tgz", - "integrity": "sha512-90taWXCWxTbClWuMZD0DKYohY1EovA+W5iytpE89oUPmT5O1HFdf8cuuVIylE6vCbrGdIGv85lVRzTcpTRZ+kA==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -2188,18 +2174,6 @@ "dev": true, "license": "MIT" }, - "node_modules/neverthrow": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/neverthrow/-/neverthrow-8.2.0.tgz", - "integrity": "sha512-kOCT/1MCPAxY5iUV3wytNFUMUolzuwd/VF/1KCx7kf6CutrOsTie+84zTGTpgQycjvfLdBBdvBvFLqFD2c0wkQ==", - "license": "MIT", - "engines": { - "node": ">=18" - }, - "optionalDependencies": { - "@rollup/rollup-linux-x64-gnu": "^4.24.0" - } - }, "node_modules/one-time": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", diff --git a/backend/package.json b/backend/package.json index 942887f..2c52268 100644 --- a/backend/package.json +++ b/backend/package.json @@ -12,7 +12,6 @@ "dependencies": { "ajv": "^8.17.1", "dotenv": "^17.2.1", - "neverthrow": "^8.2.0", "openai": "^5.16.0", "winston": "^3.17.0", "ws": "^8.18.3" diff --git a/backend/src/api-types.ts b/backend/src/api-types.ts index 71ff800..52f7797 100644 --- a/backend/src/api-types.ts +++ b/backend/src/api-types.ts @@ -1,5 +1,4 @@ import Ajv, { AnySchema, JSONSchemaType, ValidateFunction } from "ajv"; -import { err, ok, Result } from "neverthrow"; import { errorOrUndefined } from "./utils"; const ajv = new Ajv(); @@ -392,19 +391,26 @@ export const Validators: Record> = { action: ajv.compile(ActionMessageSchema) }; +/** + * Validate an object and cast it to the appropriate message type. + * + * @param obj the message object to validate and cast + * @param command the command property of the message (a key of {@link MessageTypeMapping}) + * @param validator the AJV validator function for the specific message type + * @return the validated and cast message object + * @throws {MessageDeserializationError} if validation fails + */ function validateAndCast( obj: unknown, command: T, validator: ValidateFunction -): Result { +): MessageTypeMapping[T] { if (validator(obj)) { - return ok(obj as MessageTypeMapping[T]); + return obj as MessageTypeMapping[T]; } // logValidationErrors(validator); - return err( - new MessageDeserializationError( - `Validation of command "${command}" failed: ${ajv.errorsText(validator.errors)}` - ) + throw new MessageDeserializationError( + `Validation of command "${command}" failed: ${ajv.errorsText(validator.errors)}` ); } @@ -412,46 +418,46 @@ function validateAndCast( * Deserialize a JSON string to a specific message type. * * **Does not validate action schemas for {@link RegisterActionsMessage}.** + * + * @param json the JSON string to deserialize + * @return the deserialized and validated message + * @throws {MessageDeserializationError} if deserialization or validation fails */ -export function deserializeMessage(json: string): Result { +export function deserializeMessage(json: string): Message { let obj; try { obj = JSON.parse(json); } catch (e) { - return err( - new MessageDeserializationError("Message is not valid JSON", errorOrUndefined(e)) - ); + throw new MessageDeserializationError("Message is not valid JSON", errorOrUndefined(e)); } - if (!obj.command) { - return err(new MessageDeserializationError('Message is missing the "command" property')); + throw new MessageDeserializationError('Message is missing the "command" property'); } - if (!(obj.command in Validators)) { - return err(new MessageDeserializationError(`Unknown command "${obj.command}"`)); + throw new MessageDeserializationError(`Unknown command "${obj.command}"`); } - const command: MessageType = obj.command as MessageType; const validator: ValidateFunction = Validators[command]; return validateAndCast(obj, command, validator); } -/** Validate an Action's schema property */ -export function validateActionSchema(action: Action): Result { +/** + * Validate an Action's schema property. + * + * @throws {MessageDeserializationError} if the schema is invalid. + */ +export function validateActionSchema(action: Action): void { if (!action.schema || Object.keys(action.schema).length === 0) { - // No schema to validate - return ok(null); + return; } if (!ajv.validateSchema(action.schema) as boolean) { const errorMessage = ajv.errorsText() ?? "Unknown error"; - return err( - new MessageDeserializationError( - "Invalid Action schema", - new MessageDeserializationError(errorMessage) - ) + throw new MessageDeserializationError( + "Invalid Action schema", + new MessageDeserializationError(errorMessage) ); } - return ok(null); + return; } export class MessageDeserializationError extends Error { diff --git a/backend/src/jippity-handler.ts b/backend/src/jippity-handler.ts index 8054d8d..d88c7b2 100644 --- a/backend/src/jippity-handler.ts +++ b/backend/src/jippity-handler.ts @@ -69,7 +69,7 @@ export class JippityHandler { top_p: 1, frequency_penalty: 0, presence_penalty: 0 - } + }; // Convert actions to tools if there are any if (this.actions.length > 0) { body.tools = this.actions.map(convertActionToTool); @@ -81,7 +81,9 @@ export class JippityHandler { return openai.chat.completions .create(body) .then((response) => { - log.debug(`Successful response from OpenAI API for request ID ${response._request_id}`); + log.debug( + `Successful response from OpenAI API for request ID ${response._request_id}` + ); assert(response.choices.length == 1); const choice = response.choices[0]; if (choice.finish_reason === "stop") { @@ -165,12 +167,13 @@ export class JippityHandler { // } public receiveMessage(dataStr: string): void { - const messageResult = deserializeMessage(dataStr); - if (messageResult.isErr()) { - log.error(`Failed to deserialize message: ${messageResult.error}`); + let message: Message; + try { + message = deserializeMessage(dataStr); + } catch (e) { + log.error(`Failed to deserialize message: ${e}`); return; } - const message = messageResult.value; switch (this.state.id) { case "state/waiting-for-game-startup": @@ -261,12 +264,13 @@ export class JippityHandler { ); continue; } - const actionSchemaValidationResult = validateActionSchema(action); - if (actionSchemaValidationResult.isErr()) { + try { + validateActionSchema(action); + log.debug(`Successfully validated schema for action "${action.name}"`); + } catch (e) { log.error( - `Attempted to register action "${action.name}" with an invalid schema: ${actionSchemaValidationResult.error}` + `Attempted to register action "${action.name}" with an invalid schema: ${e}` ); - continue; } this.actions.push(action); successfulRegistrations++; From b9b2136cd62a84b16a7ce470c02eb4773a5f28d2 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sat, 30 Aug 2025 19:10:59 -0500 Subject: [PATCH 05/24] The great dejanking (partial) (kinda) (not really) Some things still need to be (re)implemented, including - but probably not limited to - forced actions, request ID error logging, periodic wake-ups, minimum wait times, and various configuration options. I also want to rework how actions work, which is kinda big. --- backend/src/index.ts | 83 ++---- backend/src/jippity-handler.ts | 340 ----------------------- backend/src/jippity-types.ts | 90 ++++-- backend/src/jippity.md | 104 +++++++ backend/src/jippity.ts | 489 +++++++++++++++++++++++++++++++++ 5 files changed, 681 insertions(+), 425 deletions(-) delete mode 100644 backend/src/jippity-handler.ts create mode 100644 backend/src/jippity.md create mode 100644 backend/src/jippity.ts diff --git a/backend/src/index.ts b/backend/src/index.ts index 560def3..4059ec9 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -4,13 +4,11 @@ import "dotenv/config"; import { RawData, WebSocket, WebSocketServer } from "ws"; import util from "util"; import assert from "node:assert"; -import { Message } from "./api-types"; +import { deserializeMessage, Message } from "./api-types"; import OpenAI from "openai"; import { log } from "./logging"; import { ChatCompletionMessageParam } from "openai/resources/chat/completions"; -import { JippityHandler } from "./jippity-handler"; - -import { sleep } from "./utils"; +import { Jippity } from "./jippity"; // *************************** // * OpenAI API Client Setup * @@ -29,27 +27,24 @@ export const SYSTEM_MESSAGE: ChatCompletionMessageParam = { type: "text", text: "You are Jippity, an artificial intelligence designed to play video games on a livestream.\n" + - "The messages you receive contain information about what's happening in the game." + + "The messages you receive contain information about what's happening in the game. " + "You will use function calls to perform game actions. " + "Do not attempt to make in-game actions in your text responses. " + "Remember that you are the one playing the game, not the audience.\n" + "\n" + - "If you don't have any functions available or in-game actions you want to take, you can talk about your half-brother Randy and your cousin Neuro-sama." + - "If you are feeling lonely because no one is talking in chat, you can make up stories about Randy and Neuro." + - "Try to limit your monologues to a few sentences at a time." + "If you don't have any functions available or in-game actions you want to take, you can talk about your half-brother Randy and your cousin Neuro-sama. " + + "If you are feeling lonely because no one is talking in chat, you can make up stories about Randy and Neuro. " + + "Try to limit your monologues to a few sentences at a time. " + + "Avoid using line-breaks and non-ASCII chacters in your speech." } ] }; // Stores the state of the game and the AI -const jippityHandler = new JippityHandler(); - -// The time in milliseconds between activations of calls to OpenAI -// Defaults to 10 seconds, enforces a minimum of 1 second for the sake of your wallet -const jippityIntervalMs = Math.max( - parseInt(process.env.JIPPITY_INTERVAL_MS ?? "", 10) || 10_000, - 1_000 -); +const jippity = new Jippity(); +jippity.startMainLoop().then(() => { + log.info("Jippity main loop has exited"); +}); // ********************************************* // * WebSocketServer and WebSocket connections * @@ -90,10 +85,17 @@ wss.on("connection", (ws) => { } const dataStr = data.toString(); log.debug(`Message received: ${util.inspect(dataStr)}`); + let message: Message; + try { + message = deserializeMessage(dataStr); + } catch (e) { + log.error(`Failed to deserialize message: ${e}`); + return; + } try { - jippityHandler.receiveMessage(dataStr); + jippity.onMessageReceived(message); } catch (e) { - log.error("Error thrown from handleMessage", e); + log.error("Error thrown from jippity.onMessageReceived", e); return; } }); @@ -135,48 +137,3 @@ export function send(message: Message) { // } // jippityHandler.callOpenAI().catch((e: Error) => log.error("Error from callOpenAI:", e)); // }, jippityIntervalMs); - -async function main() { - const idleTime = 5_000; - - while (jippityHandler.state.id !== "state/exiting") { - switch (jippityHandler.state.id) { - case "state/thinking": - log.debug(`Jippity is thinking... (sleeping for ${idleTime / 1000} seconds)`); - await sleep(idleTime); - break; - case "state/waiting-for-game-startup": - log.debug(`Waiting for game startup... (sleeping for ${idleTime / 1000} seconds)`); - await sleep(idleTime); - break; - case "state/pending-action": - log.debug(`Waiting for action result... (sleeping for ${idleTime / 1000} seconds)`); - await sleep(idleTime); - break; - case "state/pending-forced-action": - log.debug( - `Waiting for forced action result... (sleeping for ${idleTime / 1000} seconds)` - ); - await sleep(idleTime); - break; - case "state/idle": - if (jippityHandler.messageQueue.isNotEmpty()) { - log.debug("Processing message queue..."); - jippityHandler.processMessageQueue(); - } else { - // TODO: Add a random chance for Jippity to talk - log.debug( - `Idle... (sleeping for ${idleTime / 1000} seconds then activating the AI)` - ); - await sleep(idleTime); - await jippityHandler.callOpenAI(); - } - break; - default: - log.error(`Unhandled state: ${JSON.stringify(jippityHandler.state)}`); - break; - } - } -} - -main().then(() => log.info("Main function completed")); diff --git a/backend/src/jippity-handler.ts b/backend/src/jippity-handler.ts deleted file mode 100644 index d88c7b2..0000000 --- a/backend/src/jippity-handler.ts +++ /dev/null @@ -1,340 +0,0 @@ -import { - Action, - ActionMessage, - ActionResultMessage, - deserializeMessage, - ForceActionMessage, - Message, - validateActionSchema -} from "./api-types"; -import { ChatCompletionMessageParam } from "openai/resources/chat/completions"; -import { openai, openaiModel, send, SYSTEM_MESSAGE } from "./index"; -import { log } from "./logging"; -import assert from "node:assert"; - -import { convertActionToTool, convertForcedActionMessageToOpenAIMessage } from "./utils"; -import { Queue } from "./queue"; -import { State } from "./jippity-types"; -import { ChatCompletionCreateParamsNonStreaming } from "openai/src/resources/chat/completions"; -import OpenAI from "openai"; - -// ****************************** -// * AI and Game State Tracking * -// ****************************** - -// Stores the state of the game and the AI -export class JippityHandler { - // isStarted: boolean = false; - game: string | undefined = undefined; - actions: Action[] = []; - openaiMessages: ChatCompletionMessageParam[] = [SYSTEM_MESSAGE]; - pendingActionId: string | null = null; - // If true, then no other requests to OpenAI will be made - // This is the closest thing I could find to a mutex lock - // Who knew JavaScript was single-threaded? Not me. - // openaiRequestInProgress = false; - - state: State = { id: "state/waiting-for-game-startup" }; - - /** Messages received while an OpenAI API request is pending will be added here */ - messageQueue = new Queue(); - - // ************************** - // * Calling the OpenAI API * - // ************************** - - public async callOpenAI(forceActionMessage?: ForceActionMessage): Promise { - assert( - this.state.id !== "state/waiting-for-game-startup", - "This method should not be called before the game has started" - ); - // assert( - // !this.openaiRequestInProgress, - // "This method should not be called while a request to the OpenAI API is in progress" - // ); - - const oldState = this.state; - this.state = { id: "state/thinking" }; - log.debug( - `callOpenAI() >> oldState: ${JSON.stringify(oldState)}, newState: ${JSON.stringify(this.state)}` - ); - const body: ChatCompletionCreateParamsNonStreaming = { - model: openaiModel, - messages: [...this.openaiMessages], - response_format: { - type: "text" - }, - temperature: 1, - max_completion_tokens: 2048, - top_p: 1, - frequency_penalty: 0, - presence_penalty: 0 - }; - // Convert actions to tools if there are any - if (this.actions.length > 0) { - body.tools = this.actions.map(convertActionToTool); - } - // Prevent the usage of multiple tools - if (body.tools) { - body.parallel_tool_calls = false; - } - return openai.chat.completions - .create(body) - .then((response) => { - log.debug( - `Successful response from OpenAI API for request ID ${response._request_id}` - ); - assert(response.choices.length == 1); - const choice = response.choices[0]; - if (choice.finish_reason === "stop") { - const content = choice.message.content; - assert( - content, - "Surely there would be content if the model stopped on its own" - ); - log.info(`Jippity says: ${content}`); - // this.openaiRequestInProgress = false; - this.state = { id: "state/idle" }; - return; - } else if (choice.finish_reason === "tool_calls") { - let toolCalls = choice.message.tool_calls; - assert( - toolCalls && toolCalls.length >= 1, - "Why would the stop reason be tool_calls if there were no tool calls?" - ); - if (toolCalls.length > 1) { - log.warn( - `OpenAI response finished with multiple tool calls. Only the first will be considered.` - ); - toolCalls = [toolCalls[0]]; - choice.message.tool_calls = [toolCalls[0]]; - } - const toolCall = toolCalls[0]; - assert(toolCall.type === "function"); - const action: ActionMessage = { - command: "action", - data: { - id: toolCall.id, - name: toolCall.function?.name, - data: toolCall.function?.arguments - } - }; - this.pendingActionId = toolCall.id; - if (forceActionMessage) { - this.state = { - id: "state/pending-forced-action", - action: action, - forcedAction: forceActionMessage - }; - } else { - this.state = { id: "state/pending-action", action: action }; - } - log.info(`Jippity wants to do the following action: ${JSON.stringify(action)}`); - this.openaiMessages.push(choice.message); - send(action); - return; - } else { - log.error( - `OpenAI response finished with the following reason: ${choice.finish_reason}` - ); - this.state = { id: "state/exiting", reason: "Error calling OpenAI API" }; - // this.openaiRequestInProgress = false; - throw new Error("I should be handling this case but I'm not"); // TODO: Handle this case - } - }) - .catch((error) => { - if (error instanceof OpenAI.APIError && error.requestID) { - log.error( - `Error calling OpenAI API with request ID ${error.requestID} ->`, - error - ); - } else { - log.error("Error calling OpenAI API ->", error); - } - this.state = { id: "state/exiting", reason: "Error calling OpenAI API" }; - }); - } - - // public enqueueMessage(dataStr: string) { - // const messageResult = deserializeMessage(dataStr); - // if (messageResult.isErr()) { - // log.error(`Failed to deserialize message: ${messageResult.error}`); - // return false; - // } - // const message = messageResult.value; - // - // this.messageQueue.offer(message); - // } - - public receiveMessage(dataStr: string): void { - let message: Message; - try { - message = deserializeMessage(dataStr); - } catch (e) { - log.error(`Failed to deserialize message: ${e}`); - return; - } - - switch (this.state.id) { - case "state/waiting-for-game-startup": - case "state/idle": - case "state/pending-action": - case "state/pending-forced-action": - this.handleMessage(message); - break; - default: - log.debug( - `Added message with "${message.command}" command to message queue (current state is ${this.state.id})` - ); - this.messageQueue.offer(message); - break; - } - } - - public handleMessage(message: Message): boolean { - if (this.state.id === "state/waiting-for-game-startup" && message.command !== "startup") { - log.error(`Received "${message.command}" command before receiving a "startup" command`); - return false; - } - - // If an action is pending, disallow all commands apart from action/result, actions/register, and actions/unregister - if ( - (this.state.id === "state/pending-action" || - this.state.id === "state/pending-forced-action") && - message.command !== "action/result" && - message.command !== "actions/register" && - message.command !== "actions/unregister" - ) { - log.error(`Received "${message.command}" command while waiting for an action result`); - return false; - } - - switch (message.command) { - case "startup": - this.state = { id: "state/idle" }; - this.game = message.game; - this.actions = []; - log.info(`Set game to "${message.game}" and cleared all registered actions`); - this.openaiMessages.push({ - role: "user", - content: `You are now playing ${message.game}` - } as ChatCompletionMessageParam); - this.callOpenAI(); - return true; - case "actions/register": - this.registerActions(message.data.actions); - return true; - case "actions/unregister": - this.unregisterActions(message.data.action_names); - return true; - case "context": - this.addContext(message.data.message, message.data.silent); - return true; - case "actions/force": - this.handleForcedAction(message); - return false; - case "action/result": - this.addActionResult(message); - return true; - case "action": - log.error( - 'The "action" command should be sent from the server (Neuro) to the client (the game), not the other way around.' - ); - return false; - } - } - - public processMessageQueue() { - while (this.messageQueue.isNotEmpty()) { - const message = this.messageQueue.poll(); - assert( - message, - "The message queue is not empty, but the poll operation returned undefined" - ); - this.handleMessage(message); - } - } - - private registerActions(actions: Action[]) { - let successfulRegistrations = 0; - for (const action of actions) { - if (this.actions.find((x) => x.name === action.name)) { - log.warn( - `Attempted to register action "${action.name}" when there is already an action with that name` - ); - continue; - } - try { - validateActionSchema(action); - log.debug(`Successfully validated schema for action "${action.name}"`); - } catch (e) { - log.error( - `Attempted to register action "${action.name}" with an invalid schema: ${e}` - ); - } - this.actions.push(action); - successfulRegistrations++; - } - if (successfulRegistrations > 0) { - log.info( - `Successfully registered ${successfulRegistrations} of ${actions.length} actions` - ); - } else { - log.error(`Failed to register any of the ${actions.length} actions`); - } - } - - private unregisterActions(action_names: string[]) { - this.actions = this.actions.filter((action) => !action_names.includes(action.name)); - log.info(`Unregistered actions: ${action_names}`); - } - - private handleForcedAction(message: ForceActionMessage) { - const openAIMessage = convertForcedActionMessageToOpenAIMessage(message, "before-result"); - this.openaiMessages.push(openAIMessage); - this.callOpenAI(); - } - - private addContext(message: string, silent: boolean) { - assert( - !this.pendingActionId, - "Received a context message while waiting for an action result" - ); - const context: ChatCompletionMessageParam = { - role: "user", - content: message - }; - this.openaiMessages.push(context); - if (!silent) { - this.callOpenAI(); - } - } - - private addActionResult(message: ActionResultMessage) { - assert( - this.state.id === "state/pending-action" || - this.state.id === "state/pending-forced-action", - `addActionResult() should not be called in the current state: ${this.state.id}` - ); - const pendingAction = this.state.action; - if (pendingAction.data.id !== message.data.id) { - log.error("Received an action result with an ID that doesn't match the pending action"); - return; - } - const content = { - success: message.data.success, - message: undefined as string | undefined - }; - if (message.data.message) { - content.message = message.data.message; - } - const actionResult: ChatCompletionMessageParam = { - role: "tool", - tool_call_id: message.data.id, - content: JSON.stringify(content) - }; - this.openaiMessages.push(actionResult); - this.pendingActionId = null; - this.callOpenAI(); - } -} diff --git a/backend/src/jippity-types.ts b/backend/src/jippity-types.ts index 29feb58..434b850 100644 --- a/backend/src/jippity-types.ts +++ b/backend/src/jippity-types.ts @@ -1,24 +1,31 @@ -import { ActionMessage, ForceActionMessage } from "./api-types"; +// Utility functions for state transitions +import { + ActionMessage, + ActionResultMessage, + ContextMessage, + ForceActionMessage +} from "./api-types"; +import { ChatCompletionMessage } from "openai/resources/chat/completions"; export type State = | WaitingForGameState | IdleState | ThinkingState | PendingActionState - | PendingForcedActionState - | TalkingState | ExitingState; interface BaseState { id: string; - description?: string; + since: Date; + game: string; } /** * Jippity is waiting for the game to start up. */ -export interface WaitingForGameState { +export interface WaitingForGameState extends BaseState { id: "state/waiting-for-game-startup"; + game: never; } /** @@ -33,6 +40,9 @@ export interface IdleState extends BaseState { */ export interface ThinkingState extends BaseState { id: "state/thinking"; + trigger?: ContextMessage | ForceActionMessage | ActionResultMessage; + // Even if the trigger is an ActionResultMessage, we need to know if it was a forced action. + forceAction?: ForceActionMessage; } /** @@ -41,23 +51,8 @@ export interface ThinkingState extends BaseState { export interface PendingActionState extends BaseState { id: "state/pending-action"; action: ActionMessage; -} - -/** - * Jippity is waiting for the result of an action that was forced by the game. - */ -export interface PendingForcedActionState extends BaseState { - id: "state/pending-forced-action"; - /** - * The action message Jippity sent to the game - */ - action: ActionMessage; - /** - * The message from the game that forced Jippity to take action. - * - * This is tracked because Jippity will need to retry the action if it fails. - */ - forcedAction: ForceActionMessage; + completion: ChatCompletionMessage; + forceAction?: ForceActionMessage; } /** @@ -76,3 +71,54 @@ export interface ExitingState extends BaseState { id: "state/exiting"; reason?: string; } + +// Utility functions for state transitions + +export function toWaitingForGameState(): WaitingForGameState { + return { + id: "state/waiting-for-game-startup", + since: new Date(), + game: undefined as never + }; +} + +export function toIdleState(prev: { game: string }): IdleState { + return { + id: "state/idle", + since: new Date(), + game: prev.game + }; +} + +export function toThinkingState( + prev: { game: string }, + trigger?: ContextMessage | ForceActionMessage | ActionResultMessage, + forceAction?: ForceActionMessage +): ThinkingState { + if (trigger && trigger.command === "actions/force" && !forceAction) { + forceAction = trigger; + } + return { + id: "state/thinking", + since: new Date(), + game: prev.game, + trigger, + forceAction + } as ThinkingState; +} + +export function toPendingActionState( + prev: { game: string }, + action: ActionMessage, + completion: ChatCompletionMessage, + forceAction?: ForceActionMessage +): PendingActionState { + return { + id: "state/pending-action", + since: new Date(), + game: prev.game, + action, + completion, + forceAction + }; +} diff --git a/backend/src/jippity.md b/backend/src/jippity.md new file mode 100644 index 0000000..d1f9457 --- /dev/null +++ b/backend/src/jippity.md @@ -0,0 +1,104 @@ +## API Messages + +```ts +export type Message = + | StartupMessage + | ContextMessage + | RegisterActionsMessage + | UnregisterActionsMessage + | ForceActionMessage + | ActionResultMessage + | ActionMessage; +``` + +See `api-types.ts` for details on each message type. + +## States + +```mermaid +flowchart TD + WaitingForGameState -->|StartupMessage| IdleState + IdleState -->|ContextMessage| ThinkingState + IdleState -->|ForceActionMessage| ThinkingState + IdleState -->|Idle timer| ThinkingState + ThinkingState -->|ActionMessage| PendingActionState + PendingActionState -->|ActionResultMessage| ThinkingState + ThinkingState -->|No action taken| IdleState + ThinkingState -->|Unrecoverable error| ExitingState +``` + +### `BaseState` + +```ts +interface BaseState { + id: string; + since: Date; + game: string; +} +``` + +The base type for all states. +Contains the `since: Date` field, representing the time the state was entered, +and the `game: string` field, the name of the game being played. + +### `WaitingForGameState` + +```ts +export interface WaitingForGameState extends BaseState { + id: "state/waiting-for-game-startup"; + game: never; +} +``` + +The initial state when Jippity starts up, waiting for a `StartupMessage`. +This is the only state for which the `game` field is `never`. + +When a `StartupMessage` is received, the state transitions to `IdleState`. + +### `IdleState` + +```ts +export interface IdleState extends BaseState { + id: "state/idle"; +} +``` + +The idle state represents downtime where the agent isn't thinking or waiting for an action result. + +When a `ContextMessage` is received with `data.silent == false`, the state transitions to `ThinkingState`. +When a `ForceActionMessage` is received, the state transitions to `ThinkingState`. +When an internal timer triggers the agent to think, the state transitions to `ThinkingState`. + +### `ThinkingState` + +```ts +import {ActionResultMessage} from "./api-types"; + +export interface ThinkingState extends BaseState { + id: "state/thinking"; + trigger: ContextMessage | ForceActionMessage | ActionResultMessage | null; +} +``` + +The thinking state represents the period where the LLM is generating a response. +The `trigger` field indicates what caused the agent to start thinking: + +- `ContextMessage`: The agent is reacting to new context from the game. +- `ForceActionMessage`: The agent received a `ForceActionMessage`, instructing it to take an action immediately. +- `ActionResultMessage`: The agent received an `ActionResultMessage`, indicating the result of its previous action. +- `null`: The agent is thinking without a specific trigger, possibly due to an internal timer. + +When the agent finishes thinking, the state transitions to... + +- `PendingActionState` with an `ActionMessage`, if the agent decided to take an action. +- `IdleState`, if the agent decided not to take any action. + +### `PendingActionState` + +```ts +export interface PendingActionState extends BaseState { + id: "state/pending-action"; + action: ActionMessage; + forceAction?: ForceActionMessage +} +```` \ No newline at end of file diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts new file mode 100644 index 0000000..ed123f7 --- /dev/null +++ b/backend/src/jippity.ts @@ -0,0 +1,489 @@ +import { + State, + ThinkingState, + toIdleState, + toPendingActionState, + toThinkingState, + toWaitingForGameState +} from "./jippity-types"; +import { + Action, + ActionMessage, + ActionResultMessage, + ContextMessage, + ForceActionMessage, + Message, + validateActionSchema +} from "./api-types"; +import { log } from "./logging"; +import assert from "node:assert"; +import { ChatCompletionCreateParamsNonStreaming } from "openai/src/resources/chat/completions"; +import { convertActionToTool } from "./utils"; +import { openai, openaiModel, send, SYSTEM_MESSAGE } from "./index"; +import { + ChatCompletionMessage, + ChatCompletionMessageFunctionToolCall, + ChatCompletionMessageParam, + ChatCompletionToolMessageParam +} from "openai/resources/chat/completions"; + +export class Jippity { + private isMainLoopRunning = false; + + state: State = toWaitingForGameState(); + + // Registered actions + actions: Action[] = []; + + // --- Message Queues --- + private contextBuffer: ContextMessage[] = []; + private reactionQueue: Message[] = []; + private reactionResolver: ((msg: Message) => void) | null = null; + + private actionResultResolver: ((result: ActionResultMessage) => void) | null = null; + + // The initial system message seen by the LLM + + private systemMessage = SYSTEM_MESSAGE; + // The messages sent to the LLM, excluding the system prompt and the pending tool call, if any + private llmMessages: ChatCompletionMessageParam[] = []; + + constructor() {} + + async startMainLoop() { + assert( + this.state.id === "state/waiting-for-game-startup", + "startMainLoop() should only be called when Jippity is first created" + ); + assert(!this.isMainLoopRunning, "startMainLoop() should only be called once"); + this.isMainLoopRunning = true; + + // Main FSM loop + log.debug("Jippity main loop starting..."); + while (true) { + switch (this.state.id) { + case "state/waiting-for-game-startup": { + // Wait for startup message + log.debug("Waiting for game startup message..."); + const msg = await this.receiveNextReactionMessage(); + if (msg.command === "startup") { + // Transition to idle state + this.state = toIdleState({ game: msg.game }); + log.debug( + `Game startup detected, transitioning to idle state: ${JSON.stringify(this.state)}` + ); + } + break; + } + case "state/idle": { + // Wait for a message that requires a reaction + const msg = await this.receiveNextReactionMessage(); + if (this.isForceActionMessage(msg)) { + // Transition to thinking state with force action + this.state = toThinkingState(this.state, msg); + // } else if (this.isContextMessage(msg) && !msg.data.silent) { + } else if (this.isContextMessage(msg)) { + // Transition to thinking state with context message + this.state = toThinkingState(this.state, msg); + } + break; + } + case "state/thinking": { + this.processContextBuffer(); + + this.trimLlmMessages(); + let chatCompletionMessage: ChatCompletionMessage; + let actionMessage: ActionMessage | undefined; + try { + const result = await this.maybeGenerateAction(this.state); + chatCompletionMessage = result.chatCompletionMessage; + actionMessage = result.actionMessage; + } catch (e) { + // Return to idle state on error + // TODO: make sure request_id is logged with the error + log.error("An error occurred when calling OpenAI", e); + this.state = toIdleState(this.state); + break; + } + + const content = chatCompletionMessage.content; + if (content && content.trim().length > 0) { + this.speak(content.trim()); + } + + if (actionMessage) { + // Transition to pending-action state + log.info(`Sending action to game: ${JSON.stringify(actionMessage)}`); + send(actionMessage); // TODO: handle send errors + this.state = toPendingActionState( + this.state, + actionMessage, + chatCompletionMessage, + this.state.forceAction + ); + } else { + // No action generated, add the message to the context window and return to idle state + this.llmMessages.push(chatCompletionMessage); + this.state = toIdleState(this.state); + } + + break; + } + case "state/pending-action": { + // Wait for action result message + const msg = await this.receiveActionResult(); + assert(msg.data.id === this.state.action.data.id, "Action result ID mismatch"); + const actionResultContent = msg.data.message + ? { success: msg.data.success, message: msg.data.message } + : { success: msg.data.success }; + const actionResultMessage: ChatCompletionToolMessageParam = { + role: "tool", + tool_call_id: msg.data.id, + content: JSON.stringify(actionResultContent) + }; + // Add the completion and action result to llmMessages + this.llmMessages.push(this.state.completion); + this.llmMessages.push(actionResultMessage); + + // Transition back to thinking state + // If the action was forced and failed, keep the forceAction in the new state + const newState = toThinkingState(this.state, msg); + if (this.state.forceAction && !msg.data.success) { + newState.forceAction = this.state.forceAction; + } + this.state = newState; + break; + } + default: { + // Unknown state, log and exit + log.error(`Invalid state: ${this.state}`); + return; + } + } + } + } + + private registerActions(actions: Action[]) { + let successfulRegistrations = 0; + for (const action of actions) { + if (this.actions.find((x) => x.name === action.name)) { + log.warn( + `Attempted to register action "${action.name}" when there is already an action with that name` + ); + continue; + } + try { + validateActionSchema(action); + log.debug(`Successfully validated schema for action "${action.name}"`); + } catch (e) { + log.error( + `Attempted to register action "${action.name}" with an invalid schema: ${e}` + ); + } + this.actions.push(action); + successfulRegistrations++; + } + if (successfulRegistrations > 0) { + log.info( + `Successfully registered ${successfulRegistrations} of ${actions.length} actions` + ); + } else { + log.error(`Failed to register any of the ${actions.length} actions`); + } + } + + private unregisterActions(action_names: string[]) { + this.actions = this.actions.filter((action) => !action_names.includes(action.name)); + log.info(`Unregistered actions: ${action_names}`); + } + + /** + * Call this when a new message is received from the game or API. + * This will buffer all messages for context, and only queue up messages that require a reaction. + */ + onMessageReceived(message: Message) { + // log.debug("onMessageReceived:", message); + + if (message.command === "startup") { + // TODO: Handle game restart + this.reactionQueue.push(message); + this.resolveReactionQueue(); + } + + // Handle action result messages immediately. + if (message.command === "action/result") { + if (this.state.id !== "state/pending-action") { + log.error( + `Received action/result message while current state is ${this.state.id}. Ignoring.` + ); + return; + } + if (message.data.id !== this.state.action.data.id) { + log.error( + `Received action/result message with id ${message.data.id} while waiting for result of action with id ${this.state.action.data.id}. Ignoring.` + ); + return; + } + log.info(`Received action result for action id ${message.data.id}.`); + // Resolve the pending action result promise + if (!this.actionResultResolver) { + log.error( + "Received an unexpected action/result message. " + + "This means there's either a bug in Jippity or in the game. " + + "Check to see if multiple action/result messages were sent for one action." + ); + return; + } + const resolver = this.actionResultResolver; + this.actionResultResolver = null; + resolver(message); + return; + } + + // Handle action registration and unregistration messages immediately. + if (message.command === "actions/register") { + this.registerActions(message.data.actions); + return; + } else if (message.command === "actions/unregister") { + this.unregisterActions(message.data.action_names); + return; + } + + if (message.command === "context") { + // If a ForceActionMessage is present in the reactionQueue, buffer this context message instead of queueing for reaction + const hasForceAction = this.reactionQueue.some(this.isForceActionMessage); + if (hasForceAction) { + this.contextBuffer.push(message); + return; + } + // Otherwise, add to reactionQueue + this.reactionQueue.push(message); + + while (this.reactionQueue.length > 2) { + const dropped = this.reactionQueue.shift(); + if (!dropped) { + break; + } + assert( + dropped?.command === "context", + "Only context messages should be dropped from reactionQueue" + ); + this.contextBuffer.push(dropped); + log.warn( + `Moved a ${dropped.command} message from reactionQueue to contextBuffer to reduce reactionQueue size.` + ); + } + + this.resolveReactionQueue(); + return; + } + + if (this.isForceActionMessage(message)) { + // Remove all ContextMessages from reactionQueue and buffer them + const remaining: Message[] = []; + for (const msg of this.reactionQueue) { + if (this.isContextMessage(msg)) { + this.contextBuffer.push(msg); + } else { + remaining.push(msg); + } + } + this.reactionQueue = remaining; + // Add the new ForceActionMessage + this.reactionQueue.push(message); + this.resolveReactionQueue(); + return; + } + } + + /** + * Returns the next message that requires a reaction. + * If no such message is available, returns a Promise that resolves when one arrives. + * If there are multiple messages in the queue, always process the oldest first. + */ + async receiveNextReactionMessage(): Promise { + if (this.reactionQueue.length > 0) { + log.debug( + `receiveNextReactionMessage: there are already ${this.reactionQueue.length} messages in reactionQueue` + ); + return this.reactionQueue.shift()!; + } + // Wait for a new reaction-required message + return new Promise((resolve) => { + if (this.reactionResolver) { + throw new Error("Multiple reactionResolvers detected!"); + } + this.reactionResolver = resolve; + }); + } + + async receiveActionResult(): Promise { + if (this.state.id !== "state/pending-action") { + throw new Error( + "Can only wait for an action result when the state is state/pending-action" + ); + } + if (this.actionResultResolver) { + throw new Error("receiveActionResult called with existing actionResultResolver"); + } + // Wait for the result of the pending action + return new Promise((resolve) => { + this.actionResultResolver = resolve; + }); + } + + /** + * Helper to resolve any pending reaction message promise. + */ + private resolveReactionQueue() { + if (!this.reactionResolver) { + log.debug("resolveReactionQueue: no pending reactionResolver to resolve"); + return; + } + // TODO: is this right? + while (this.reactionResolver && this.reactionQueue.length > 0) { + const msg = this.reactionQueue.shift()!; + const resolve = this.reactionResolver; + this.reactionResolver = null; + if (resolve) { + resolve(msg); + } else { + throw new Error("it shouldn't be possible for resolve to be null here"); + } + } + } + + // --- Message type guards --- + private isForceActionMessage(msg: Message): msg is ForceActionMessage { + return msg.command === "actions/force"; + } + private isContextMessage(msg: Message): msg is ContextMessage { + return msg.command === "context"; + } + + private async maybeGenerateAction( + state: ThinkingState + ): Promise<{ chatCompletionMessage: ChatCompletionMessage; actionMessage?: ActionMessage }> { + const messages: ChatCompletionMessageParam[] = [this.systemMessage, ...this.llmMessages]; + if (state.trigger?.command === "context") { + messages.push({ + role: "user", + content: `Context from ${state.trigger.game}:\n${state.trigger.data.message}` + }); + } + const body: ChatCompletionCreateParamsNonStreaming = { + model: openaiModel, + messages: messages, + response_format: { + type: "text" + }, + temperature: 1, + max_completion_tokens: 2048, + top_p: 1, + frequency_penalty: 0, + presence_penalty: 0 + }; + // Convert actions to tools if there are any + if (this.actions.length > 0) { + body.tools = this.actions.map(convertActionToTool); + } + // Prevent the usage of multiple tools + if (body.tools) { + body.parallel_tool_calls = false; + } + if (state.forceAction) { + const forcedActionNames = state.forceAction.data.action_names; + const forcedActions = this.actions.filter((a) => forcedActionNames.includes(a.name)); + const hasValidForcedActions = forcedActions.length > 0; + if (hasValidForcedActions) { + log.info( + `Forcing action from: ${forcedActions + .map((a) => a.name) + .join(", ")} due to forceAction message` + ); + body.tools = forcedActions.map(convertActionToTool); + body.tool_choice = "required"; + } else { + const forcedActionNamesStr = forcedActionNames.join(", "); + const availableActionNamesStr = this.actions.map((a) => a.name).join(", "); + log.warn( + `Received forceAction message with no valid action names: ${forcedActionNamesStr}. Currently available action names are ${availableActionNamesStr}. Jippity may or may not choose to take an action anyway.` + ); + body.tools = this.actions.map(convertActionToTool); + body.tool_choice = "auto"; + } + } + log.debug(`Sending request to OpenAI: ${JSON.stringify(body)}`); + const response = await openai.chat.completions.create(body); + log.debug(`Received response from OpenAI: ${JSON.stringify(response)}`); + if (response.choices.length === 0) { + throw new Error("OpenAI returned no choices"); + } + const choice = response.choices[0]; + + if (choice.message.tool_calls && choice.message.tool_calls.length > 0) { + if (choice.message.tool_calls.length > 1) { + log.error( + `Response from OpenAI contains ${choice.message.tool_calls.length} tool calls; only one is supported` + ); + } + assert( + choice.message.tool_calls[0].type === "function", + "Only function tool calls are supported" + ); + const toolCall: ChatCompletionMessageFunctionToolCall = choice.message.tool_calls[0]; + + // Check to see if the tool call matches a registered action + // We won't actually do anything if it doesn't, but we want to log it + const action = this.actions.find((a) => a.name === toolCall.function.name); + if (!action) { + log.warn( + `OpenAI chose unknown action "${toolCall.function.name}". The game will need to handle this.` + ); + } + + const actionMessage: ActionMessage = { + command: "action", + data: { + id: toolCall.id, + name: toolCall.function?.name, + data: toolCall.function?.arguments + } + }; + + return { chatCompletionMessage: choice.message, actionMessage }; + } + return { chatCompletionMessage: choice.message }; + } + + private processContextBuffer(): void { + log.debug(`processContextBuffer: ${this.contextBuffer.length} message(s) to process`); + if (this.contextBuffer.length === 0) { + return; + } + for (const msg of this.contextBuffer) { + this.llmMessages.push({ + role: "user", + content: `Context from ${msg.game}:\n${msg.data.message}` + }); + } + this.contextBuffer = []; + } + + private trimLlmMessages(): void { + // TODO: Implement better message trimming to fit within token limits + if (this.llmMessages.length > 15) { + this.llmMessages = this.llmMessages.slice(-10); + + const firstMessage = this.llmMessages[0]; + if (firstMessage.role === "tool") { + // Remove incomplete tool call from the start of the message list + this.llmMessages = this.llmMessages.slice(1); + } + } + } + + private speak(text: string): void { + log.info(`Jippity says: ${text}`); + } +} From 38f5f4a8a2e9c03f22ff5b8d8ca5c3bb60c2647c Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 10:50:05 -0500 Subject: [PATCH 06/24] Move Neuro Game API type guards to api-types.ts --- backend/src/api-types.ts | 28 ++++++++++++++++++++++++++++ backend/src/jippity.ts | 21 +++++++-------------- 2 files changed, 35 insertions(+), 14 deletions(-) diff --git a/backend/src/api-types.ts b/backend/src/api-types.ts index 52f7797..d07d479 100644 --- a/backend/src/api-types.ts +++ b/backend/src/api-types.ts @@ -69,6 +69,10 @@ export interface StartupMessage extends BaseMessage { game: string; } +export function isStartupMessage(msg: Message): msg is StartupMessage { + return msg.command === "startup"; +} + /** Schema for {@link StartupMessage} */ const StartupMessageSchema: JSONSchemaType = { type: "object", @@ -101,6 +105,10 @@ export interface ContextMessage extends BaseMessage { }; } +export function isContextMessage(msg: Message): msg is ContextMessage { + return msg.command === "context"; +} + /** Schema for {@link ContextMessage} */ const ContextMessageSchema: JSONSchemaType = { type: "object", @@ -136,6 +144,10 @@ export interface RegisterActionsMessage extends BaseMessage { }; } +export function isRegisterActionsMessage(msg: Message): msg is RegisterActionsMessage { + return msg.command === "actions/register"; +} + /** Schema for {@link RegisterActionsMessage} */ const RegisterActionsMessageSchema: JSONSchemaType = { type: "object", @@ -186,6 +198,10 @@ export interface UnregisterActionsMessage extends BaseMessage { }; } +export function isUnregisterActionsMessage(msg: Message): msg is UnregisterActionsMessage { + return msg.command === "actions/unregister"; +} + /** Schema for {@link UnregisterActionsMessage} */ const UnregisterActionsMessageSchema: JSONSchemaType = { type: "object", @@ -240,6 +256,10 @@ export interface ForceActionMessage extends BaseMessage { }; } +export function isForceActionMessage(msg: Message): msg is ForceActionMessage { + return msg.command === "actions/force"; +} + /** Schema for {@link ForceActionMessage} */ const ForceActionMessageSchema: JSONSchemaType = { type: "object", @@ -299,6 +319,10 @@ export interface ActionResultMessage extends BaseMessage { }; } +export function isActionResultMessage(msg: Message): msg is ActionResultMessage { + return msg.command === "action/result"; +} + /** Schema for {@link ActionResultMessage} */ const ActionResultMessageSchema: JSONSchemaType = { type: "object", @@ -348,6 +372,10 @@ export interface ActionMessage extends BaseMessage { }; } +export function isActionMessage(msg: Message): msg is ActionMessage { + return msg.command === "action"; +} + /** Schema for {@link ActionMessage} */ const ActionMessageSchema: JSONSchemaType = { type: "object", diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index ed123f7..b860196 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -11,7 +11,8 @@ import { ActionMessage, ActionResultMessage, ContextMessage, - ForceActionMessage, + isContextMessage, + isForceActionMessage, Message, validateActionSchema } from "./api-types"; @@ -78,11 +79,11 @@ export class Jippity { case "state/idle": { // Wait for a message that requires a reaction const msg = await this.receiveNextReactionMessage(); - if (this.isForceActionMessage(msg)) { + if (isForceActionMessage(msg)) { // Transition to thinking state with force action this.state = toThinkingState(this.state, msg); // } else if (this.isContextMessage(msg) && !msg.data.silent) { - } else if (this.isContextMessage(msg)) { + } else if (isContextMessage(msg)) { // Transition to thinking state with context message this.state = toThinkingState(this.state, msg); } @@ -251,7 +252,7 @@ export class Jippity { if (message.command === "context") { // If a ForceActionMessage is present in the reactionQueue, buffer this context message instead of queueing for reaction - const hasForceAction = this.reactionQueue.some(this.isForceActionMessage); + const hasForceAction = this.reactionQueue.some(isForceActionMessage); if (hasForceAction) { this.contextBuffer.push(message); return; @@ -278,11 +279,11 @@ export class Jippity { return; } - if (this.isForceActionMessage(message)) { + if (isForceActionMessage(message)) { // Remove all ContextMessages from reactionQueue and buffer them const remaining: Message[] = []; for (const msg of this.reactionQueue) { - if (this.isContextMessage(msg)) { + if (isContextMessage(msg)) { this.contextBuffer.push(msg); } else { remaining.push(msg); @@ -353,14 +354,6 @@ export class Jippity { } } - // --- Message type guards --- - private isForceActionMessage(msg: Message): msg is ForceActionMessage { - return msg.command === "actions/force"; - } - private isContextMessage(msg: Message): msg is ContextMessage { - return msg.command === "context"; - } - private async maybeGenerateAction( state: ThinkingState ): Promise<{ chatCompletionMessage: ChatCompletionMessage; actionMessage?: ActionMessage }> { From 183263f86d943aa473ca05237c3d1214be05f163 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 10:50:53 -0500 Subject: [PATCH 07/24] Ignore backend/dist --- backend/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/.gitignore b/backend/.gitignore index 8fc548c..7f1421d 100644 --- a/backend/.gitignore +++ b/backend/.gitignore @@ -1,5 +1,6 @@ /tmp /out-tsc +/dist /node_modules npm-debug.log* From 5cf56523e75e30fa7f3cb9128ebea12fde98c319 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 11:08:51 -0500 Subject: [PATCH 08/24] Add some comments --- backend/src/jippity.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index b860196..f51b7b4 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -449,6 +449,10 @@ export class Jippity { return { chatCompletionMessage: choice.message }; } + /** + * Process all messages in {@link contextBuffer} and add them to {@link llmMessages}. + * This may make {@link llmMessages} very large, so {@link trimLlmMessages} should typically be called after this. + */ private processContextBuffer(): void { log.debug(`processContextBuffer: ${this.contextBuffer.length} message(s) to process`); if (this.contextBuffer.length === 0) { @@ -463,8 +467,13 @@ export class Jippity { this.contextBuffer = []; } + /** + * Trim the {@link llmMessages} array to keep it within a reasonable size. + * This is a naive implementation that just keeps the last 10 messages if there are more than 15. + */ private trimLlmMessages(): void { // TODO: Implement better message trimming to fit within token limits + // TODO: Make these values configurable if (this.llmMessages.length > 15) { this.llmMessages = this.llmMessages.slice(-10); @@ -476,6 +485,10 @@ export class Jippity { } } + /** + * Simulate Jippity speaking by logging the text. + * This could be replaced with text-to-speech or other output methods if desired. + */ private speak(text: string): void { log.info(`Jippity says: ${text}`); } From 7216e033b8809bdfcb856c68043635a4a1d489ef Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 11:22:16 -0500 Subject: [PATCH 09/24] Use util.inspect instead of JSON.stringify for logging objects --- backend/src/jippity.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index f51b7b4..ce0b62f 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -27,6 +27,7 @@ import { ChatCompletionMessageParam, ChatCompletionToolMessageParam } from "openai/resources/chat/completions"; +import util from "util"; export class Jippity { private isMainLoopRunning = false; @@ -114,7 +115,9 @@ export class Jippity { if (actionMessage) { // Transition to pending-action state - log.info(`Sending action to game: ${JSON.stringify(actionMessage)}`); + log.info( + `Sending action to game: ${util.inspect(actionMessage, { breakLength: Infinity })}` + ); send(actionMessage); // TODO: handle send errors this.state = toPendingActionState( this.state, @@ -225,7 +228,9 @@ export class Jippity { ); return; } - log.info(`Received action result for action id ${message.data.id}.`); + log.info( + `Received action result from game: ${util.inspect(message.data, { breakLength: Infinity })}` + ); // Resolve the pending action result promise if (!this.actionResultResolver) { log.error( @@ -406,9 +411,11 @@ export class Jippity { body.tool_choice = "auto"; } } - log.debug(`Sending request to OpenAI: ${JSON.stringify(body)}`); + log.debug(`Sending request to OpenAI: ${util.inspect(body, { breakLength: Infinity })}}`); const response = await openai.chat.completions.create(body); - log.debug(`Received response from OpenAI: ${JSON.stringify(response)}`); + log.debug( + `Received response from OpenAI: ${util.inspect(response, { breakLength: Infinity })}` + ); if (response.choices.length === 0) { throw new Error("OpenAI returned no choices"); } From 4a2f05539e20a20bc4ba17bced2d25eb90359041 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 11:32:32 -0500 Subject: [PATCH 10/24] Keep action schema validation in apy-types.ts. I don't remember why I didn't do this to begin with. --- backend/src/api-types.ts | 30 ++++++++++++++++++++++++------ backend/src/jippity.ts | 11 +---------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/backend/src/api-types.ts b/backend/src/api-types.ts index d07d479..02be3e5 100644 --- a/backend/src/api-types.ts +++ b/backend/src/api-types.ts @@ -422,6 +422,8 @@ export const Validators: Record> = { /** * Validate an object and cast it to the appropriate message type. * + * If the message is a {@link RegisterActionsMessage}, also validates each action's schema. + * * @param obj the message object to validate and cast * @param command the command property of the message (a key of {@link MessageTypeMapping}) * @param validator the AJV validator function for the specific message type @@ -433,19 +435,35 @@ function validateAndCast( command: T, validator: ValidateFunction ): MessageTypeMapping[T] { + let validObj: MessageTypeMapping[T]; if (validator(obj)) { - return obj as MessageTypeMapping[T]; + validObj = obj as MessageTypeMapping[T]; + } else { + throw new MessageDeserializationError( + `Validation of command "${command}" failed: ${ajv.errorsText(validator.errors)}` + ); + } + // If this is a RegisterActionsMessage, validate each action's schema + if (isRegisterActionsMessage(validObj)) { + for (const action of validObj.data.actions) { + try { + validateActionSchema(action); + } catch (e) { + throw new MessageDeserializationError( + `Validation of action schema for action "${action.name}" failed: ${e}`, + errorOrUndefined(e) + ); + } + } } - // logValidationErrors(validator); - throw new MessageDeserializationError( - `Validation of command "${command}" failed: ${ajv.errorsText(validator.errors)}` - ); + return validObj; } /** * Deserialize a JSON string to a specific message type. * - * **Does not validate action schemas for {@link RegisterActionsMessage}.** + * If the message is a {@link RegisterActionsMessage}, also validates each action's schema. + * This was not the case in earlier versions. * * @param json the JSON string to deserialize * @return the deserialized and validated message diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index ce0b62f..754442d 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -13,8 +13,7 @@ import { ContextMessage, isContextMessage, isForceActionMessage, - Message, - validateActionSchema + Message } from "./api-types"; import { log } from "./logging"; import assert from "node:assert"; @@ -176,14 +175,6 @@ export class Jippity { ); continue; } - try { - validateActionSchema(action); - log.debug(`Successfully validated schema for action "${action.name}"`); - } catch (e) { - log.error( - `Attempted to register action "${action.name}" with an invalid schema: ${e}` - ); - } this.actions.push(action); successfulRegistrations++; } From cba8631552809077b9cc311382ebdc95a51a6627 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 11:46:50 -0500 Subject: [PATCH 11/24] Change target to es2024. I did this so I'd be able to use Promise.withResolvers(). --- backend/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/tsconfig.json b/backend/tsconfig.json index 556471c..7288e30 100644 --- a/backend/tsconfig.json +++ b/backend/tsconfig.json @@ -1,6 +1,6 @@ { "compilerOptions": { - "target": "es2022", + "target": "es2024", "module": "commonjs", "resolveJsonModule": true, "esModuleInterop": true, From cc04ef7e04a76f05acde4913f44849b04c549568 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 12:29:40 -0500 Subject: [PATCH 12/24] Fix typo in system prompt. How embarrassing... --- backend/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 4059ec9..c4d51f2 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -35,7 +35,7 @@ export const SYSTEM_MESSAGE: ChatCompletionMessageParam = { "If you don't have any functions available or in-game actions you want to take, you can talk about your half-brother Randy and your cousin Neuro-sama. " + "If you are feeling lonely because no one is talking in chat, you can make up stories about Randy and Neuro. " + "Try to limit your monologues to a few sentences at a time. " + - "Avoid using line-breaks and non-ASCII chacters in your speech." + "Avoid using line-breaks and non-ASCII characters in your speech." } ] }; From c6d02c9e70a7318b3c16a881c1b4c21eacdda921 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 12:59:25 -0500 Subject: [PATCH 13/24] Create ActionResultManager for easily await-ing an ActionResultMessage --- backend/src/action-result-manager.ts | 74 ++++++++++++++++++++++++++++ backend/src/jippity.ts | 39 ++++++--------- 2 files changed, 88 insertions(+), 25 deletions(-) create mode 100644 backend/src/action-result-manager.ts diff --git a/backend/src/action-result-manager.ts b/backend/src/action-result-manager.ts new file mode 100644 index 0000000..516a83d --- /dev/null +++ b/backend/src/action-result-manager.ts @@ -0,0 +1,74 @@ +import { ActionResultMessage } from "./api-types"; +import assert from "node:assert"; + +/** + * Internal type representing a {@link Promise} with its resolve and reject functions exposed and an optional timeout handle. + */ +type ActionResultResolver = PromiseWithResolvers & { + timeout?: NodeJS.Timeout; +}; + +/** + * Manages pending actions and their results. + * + * This class theoretically allows multiple actions to be pending at once, but this shouldn't happen in practice. + */ +export class ActionResultManager { + private resolvers: Map; + + constructor() { + this.resolvers = new Map(); + } + + /** + * Wait for an {@link ActionResultMessage} with the given action ID. + * @param actionId the action ID to wait for + * @param timeoutMs how long to wait before rejecting the promise (default: 5000 ms); use 0 or a negative number to disable timeout + * @returns a promise that resolves to the action result message + * @throws {Error} if an action with the same ID is already pending + */ + async getActionResult( + actionId: string, + timeoutMs: number = 5000 // 5 seconds + ): Promise { + if (this.resolvers.has(actionId)) { + throw new Error(`Action with ID ${actionId} is already pending`); + } + + const resolver: ActionResultResolver = Promise.withResolvers(); + if (timeoutMs > 0) { + resolver.timeout = setTimeout(() => { + assert( + this.resolvers.has(actionId), + `Timeout triggered for action ID ${actionId} but no resolver found` + ); + this.resolvers.delete(actionId); + resolver.reject( + new Error( + `Timeout waiting for action result for action ID ${actionId} (timeout = ${timeoutMs} ms)` + ) + ); + }, timeoutMs); + } + this.resolvers.set(actionId, resolver); + return resolver.promise; + } + + /** + * Resolve a pending action with the given {@link ActionResultMessage}. + * @param result the action result message + * @throws {Error} if no pending action is found for the given action ID + */ + resolvePendingAction(result: ActionResultMessage) { + const actionId = result.data.id; + const resolver = this.resolvers.get(actionId); + if (!resolver) { + throw new Error(`No pending action found for action ID ${actionId}`); + } + if (resolver.timeout) { + clearTimeout(resolver.timeout); + } + this.resolvers.delete(actionId); + resolver.resolve(result); + } +} diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index 754442d..3bf1561 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -27,6 +27,7 @@ import { ChatCompletionToolMessageParam } from "openai/resources/chat/completions"; import util from "util"; +import { ActionResultManager } from "./action-result-manager"; export class Jippity { private isMainLoopRunning = false; @@ -41,7 +42,7 @@ export class Jippity { private reactionQueue: Message[] = []; private reactionResolver: ((msg: Message) => void) | null = null; - private actionResultResolver: ((result: ActionResultMessage) => void) | null = null; + private actionResultManager = new ActionResultManager(); // The initial system message seen by the LLM @@ -134,7 +135,10 @@ export class Jippity { } case "state/pending-action": { // Wait for action result message - const msg = await this.receiveActionResult(); + // TODO: Catch exceptions thrown here + const msg: ActionResultMessage = await this.actionResultManager.getActionResult( + this.state.action.data.id + ); assert(msg.data.id === this.state.action.data.id, "Action result ID mismatch"); const actionResultContent = msg.data.message ? { success: msg.data.success, message: msg.data.message } @@ -222,18 +226,18 @@ export class Jippity { log.info( `Received action result from game: ${util.inspect(message.data, { breakLength: Infinity })}` ); - // Resolve the pending action result promise - if (!this.actionResultResolver) { + try { + this.actionResultManager.resolvePendingAction(message); + log.debug(`Resolved pending action for id ${message.data.id}`); + } catch (e) { log.error( - "Received an unexpected action/result message. " + + "Error resolving pending action. " + "This means there's either a bug in Jippity or in the game. " + - "Check to see if multiple action/result messages were sent for one action." + "Check to see if multiple action/result messages were sent for one action. " + + "Cause:", + e ); - return; } - const resolver = this.actionResultResolver; - this.actionResultResolver = null; - resolver(message); return; } @@ -314,21 +318,6 @@ export class Jippity { }); } - async receiveActionResult(): Promise { - if (this.state.id !== "state/pending-action") { - throw new Error( - "Can only wait for an action result when the state is state/pending-action" - ); - } - if (this.actionResultResolver) { - throw new Error("receiveActionResult called with existing actionResultResolver"); - } - // Wait for the result of the pending action - return new Promise((resolve) => { - this.actionResultResolver = resolve; - }); - } - /** * Helper to resolve any pending reaction message promise. */ From 03bddf2c2f1048ddb6376e7848ed006c01041ff1 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 13:05:36 -0500 Subject: [PATCH 14/24] Very minor system prompt update to make the LLM less confused. --- backend/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index c4d51f2..1f12665 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -30,7 +30,7 @@ export const SYSTEM_MESSAGE: ChatCompletionMessageParam = { "The messages you receive contain information about what's happening in the game. " + "You will use function calls to perform game actions. " + "Do not attempt to make in-game actions in your text responses. " + - "Remember that you are the one playing the game, not the audience.\n" + + "Remember that YOU are playing the game, not the audience.\n" + "\n" + "If you don't have any functions available or in-game actions you want to take, you can talk about your half-brother Randy and your cousin Neuro-sama. " + "If you are feeling lonely because no one is talking in chat, you can make up stories about Randy and Neuro. " + From 98204d6e8ae04a149b4a0bd9869572e066c54111 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 14:21:51 -0500 Subject: [PATCH 15/24] Ensure the request ID is logged when there's an error calling OpenAI. I verified that they get logged by trying to use an invalid API key. --- backend/src/jippity.ts | 13 ++++++++++--- backend/src/utils.ts | 19 ++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index 3bf1561..4121f9e 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -18,7 +18,7 @@ import { import { log } from "./logging"; import assert from "node:assert"; import { ChatCompletionCreateParamsNonStreaming } from "openai/src/resources/chat/completions"; -import { convertActionToTool } from "./utils"; +import { convertActionToTool, extractRequestIdFromError } from "./utils"; import { openai, openaiModel, send, SYSTEM_MESSAGE } from "./index"; import { ChatCompletionMessage, @@ -102,8 +102,15 @@ export class Jippity { actionMessage = result.actionMessage; } catch (e) { // Return to idle state on error - // TODO: make sure request_id is logged with the error - log.error("An error occurred when calling OpenAI", e); + const requestId = extractRequestIdFromError(e); + if (requestId) { + log.error( + `An error occurred when calling OpenAI (request ID: ${requestId}):`, + e + ); + } else { + log.error("An error occurred when calling OpenAI", e); + } this.state = toIdleState(this.state); break; } diff --git a/backend/src/utils.ts b/backend/src/utils.ts index f93d894..d68ccc8 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1,10 +1,7 @@ import OpenAI from "openai"; -import FunctionParameters = OpenAI.FunctionParameters; -import { - ChatCompletionTool, - ChatCompletionUserMessageParam -} from "openai/resources/chat/completions"; +import { ChatCompletionTool, ChatCompletionUserMessageParam } from "openai/resources/chat/completions"; import { Action, ForceActionMessage } from "./api-types"; +import FunctionParameters = OpenAI.FunctionParameters; /** * Return the given value if it is an `Error`, otherwise return `undefined`. @@ -63,3 +60,15 @@ export function convertForcedActionMessageToOpenAIMessage( content: content }; } + +/** + * Extract the request ID from an OpenAI API error, if available. + * @param error the error to extract the request ID from + * @returns the request ID, or `null` if not available + */ +export function extractRequestIdFromError(error: unknown): string | null { + if (error instanceof OpenAI.APIError) { + return error.requestID ?? null; + } + return null; +} From 465373659a8a95d68b1d52abb0203ad82294917c Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 14:24:13 -0500 Subject: [PATCH 16/24] Keep reactionQueue limited to at most one message. I need to rethink how things get queued up. Having a message backlog causes the LLM to receive outdated context. This might not matter for some games, but it makes Cookie Clicker really hard for the LLM to play. --- backend/src/jippity.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index 4121f9e..5d6e8c9 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -267,7 +267,7 @@ export class Jippity { // Otherwise, add to reactionQueue this.reactionQueue.push(message); - while (this.reactionQueue.length > 2) { + while (this.reactionQueue.length > 1) { const dropped = this.reactionQueue.shift(); if (!dropped) { break; From 521aeb96649419906db240ba15a9f768cd087285 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 14:39:44 -0500 Subject: [PATCH 17/24] Change how Jippity waits for a game startup message. This might seem like a step backward, but I have a plan. --- backend/src/jippity.ts | 47 +++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index 5d6e8c9..89d432e 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -13,7 +13,8 @@ import { ContextMessage, isContextMessage, isForceActionMessage, - Message + Message, + StartupMessage } from "./api-types"; import { log } from "./logging"; import assert from "node:assert"; @@ -42,6 +43,8 @@ export class Jippity { private reactionQueue: Message[] = []; private reactionResolver: ((msg: Message) => void) | null = null; + private startUpMessageResolver: PromiseWithResolvers | null = null; + private actionResultManager = new ActionResultManager(); // The initial system message seen by the LLM @@ -66,15 +69,14 @@ export class Jippity { switch (this.state.id) { case "state/waiting-for-game-startup": { // Wait for startup message - log.debug("Waiting for game startup message..."); - const msg = await this.receiveNextReactionMessage(); - if (msg.command === "startup") { - // Transition to idle state - this.state = toIdleState({ game: msg.game }); - log.debug( - `Game startup detected, transitioning to idle state: ${JSON.stringify(this.state)}` - ); - } + const msg = await this.waitForStartupMessage(); + assert(msg.command === "startup", "Expected startup message"); + // Transition to idle state + log.info(`Received game startup message with game "${msg.game}"`); + this.state = toIdleState({ game: msg.game }); + log.debug( + `Game startup detected, transitioning to idle state: ${JSON.stringify(this.state)}` + ); break; } case "state/idle": { @@ -212,8 +214,11 @@ export class Jippity { if (message.command === "startup") { // TODO: Handle game restart - this.reactionQueue.push(message); - this.resolveReactionQueue(); + assert(this.state.id === "state/waiting-for-game-startup"); + if (!this.startUpMessageResolver) { + this.startUpMessageResolver = Promise.withResolvers(); + } + this.startUpMessageResolver.resolve(message); } // Handle action result messages immediately. @@ -443,6 +448,24 @@ export class Jippity { return { chatCompletionMessage: choice.message }; } + private async waitForStartupMessage(): Promise { + assert( + this.state.id == "state/waiting-for-game-startup", + "waitForStartupMessage() can only be called in waiting-for-game-startup state" + ); + if (!this.startUpMessageResolver) { + log.debug( + "waitForStartupMessage: waiting for startup message; creating new resolver startUpMessageResolver" + ); + this.startUpMessageResolver = Promise.withResolvers(); + } else { + log.debug( + "waitForStartupMessage: waiting for startup message; startUpMessageResolver already exists" + ); + } + return this.startUpMessageResolver.promise; + } + /** * Process all messages in {@link contextBuffer} and add them to {@link llmMessages}. * This may make {@link llmMessages} very large, so {@link trimLlmMessages} should typically be called after this. From cdf3b45890409c7a559b45730892324bb7110d64 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 18:27:04 -0500 Subject: [PATCH 18/24] Add isNonSilentContextMessage and isSilentContextMessage to api-types.ts --- backend/src/api-types.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/src/api-types.ts b/backend/src/api-types.ts index 02be3e5..a95e6c6 100644 --- a/backend/src/api-types.ts +++ b/backend/src/api-types.ts @@ -109,6 +109,14 @@ export function isContextMessage(msg: Message): msg is ContextMessage { return msg.command === "context"; } +export function isNonSilentContextMessage(msg: Message): msg is ContextMessage { + return isContextMessage(msg) && !msg.data.silent; +} + +export function isSilentContextMessage(msg: Message): msg is ContextMessage { + return isContextMessage(msg) && msg.data.silent; +} + /** Schema for {@link ContextMessage} */ const ContextMessageSchema: JSONSchemaType = { type: "object", From 02ccc262bb910528aa23107ff8c179ceb545c0ea Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 18:28:11 -0500 Subject: [PATCH 19/24] Partial (but working) implementation of the "stimulus" system. Not yet sure if this is smart or way overcomplicating things. --- backend/src/jippity-types.ts | 23 ++ backend/src/jippity.ts | 570 ++++++++++++++++++++++------------- 2 files changed, 388 insertions(+), 205 deletions(-) diff --git a/backend/src/jippity-types.ts b/backend/src/jippity-types.ts index 434b850..b719d2f 100644 --- a/backend/src/jippity-types.ts +++ b/backend/src/jippity-types.ts @@ -122,3 +122,26 @@ export function toPendingActionState( forceAction }; } + +export type ReactionMessage = ContextMessage | ForceActionMessage; + +export interface IdleTimerStimulus { + type: "IdleTimer"; +} + +// Stimulus received when a non-silent context message +// or a force action message is received +export interface MessageStimulus { + type: "Message"; + message: ReactionMessage; +} + +export type Stimulus = IdleTimerStimulus | MessageStimulus; + +export function isIdleTimerStimulus(stimulus: Stimulus): stimulus is IdleTimerStimulus { + return stimulus.type === "IdleTimer"; +} + +export function isMessageStimulus(stimulus: Stimulus): stimulus is MessageStimulus { + return stimulus.type === "Message"; +} diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index 89d432e..cfdef87 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -1,18 +1,13 @@ -import { - State, - ThinkingState, - toIdleState, - toPendingActionState, - toThinkingState, - toWaitingForGameState -} from "./jippity-types"; +import { isIdleTimerStimulus, isMessageStimulus, ReactionMessage, Stimulus } from "./jippity-types"; import { Action, ActionMessage, - ActionResultMessage, ContextMessage, + ForceActionMessage, isContextMessage, isForceActionMessage, + isNonSilentContextMessage, + isSilentContextMessage, Message, StartupMessage } from "./api-types"; @@ -25,7 +20,8 @@ import { ChatCompletionMessage, ChatCompletionMessageFunctionToolCall, ChatCompletionMessageParam, - ChatCompletionToolMessageParam + ChatCompletionToolMessageParam, + ChatCompletionUserMessageParam } from "openai/resources/chat/completions"; import util from "util"; import { ActionResultManager } from "./action-result-manager"; @@ -33,15 +29,20 @@ import { ActionResultManager } from "./action-result-manager"; export class Jippity { private isMainLoopRunning = false; - state: State = toWaitingForGameState(); + // state: State = toWaitingForGameState(); + state: { id: string } = { id: "state/waiting-for-game-startup" }; + + game: string | null = null; // Registered actions actions: Action[] = []; // --- Message Queues --- private contextBuffer: ContextMessage[] = []; - private reactionQueue: Message[] = []; - private reactionResolver: ((msg: Message) => void) | null = null; + private reactionQueue: ReactionMessage[] = []; + // private reactionResolver: ((msg: Message) => void) | null = null; + + private stimulusResolver: PromiseWithResolvers | null = null; private startUpMessageResolver: PromiseWithResolvers | null = null; @@ -63,118 +64,44 @@ export class Jippity { assert(!this.isMainLoopRunning, "startMainLoop() should only be called once"); this.isMainLoopRunning = true; - // Main FSM loop + const startUpMessage = await this.waitForStartupMessage(); + assert(startUpMessage.command === "startup", "Expected startup message"); + this.state = { id: "state/idle" }; + this.game = startUpMessage.game; + log.info(`Game started: ${this.game}`); + + // Main loop log.debug("Jippity main loop starting..."); while (true) { - switch (this.state.id) { - case "state/waiting-for-game-startup": { - // Wait for startup message - const msg = await this.waitForStartupMessage(); - assert(msg.command === "startup", "Expected startup message"); - // Transition to idle state - log.info(`Received game startup message with game "${msg.game}"`); - this.state = toIdleState({ game: msg.game }); - log.debug( - `Game startup detected, transitioning to idle state: ${JSON.stringify(this.state)}` - ); - break; - } - case "state/idle": { - // Wait for a message that requires a reaction - const msg = await this.receiveNextReactionMessage(); - if (isForceActionMessage(msg)) { - // Transition to thinking state with force action - this.state = toThinkingState(this.state, msg); - // } else if (this.isContextMessage(msg) && !msg.data.silent) { - } else if (isContextMessage(msg)) { - // Transition to thinking state with context message - this.state = toThinkingState(this.state, msg); - } - break; - } - case "state/thinking": { - this.processContextBuffer(); - - this.trimLlmMessages(); - let chatCompletionMessage: ChatCompletionMessage; - let actionMessage: ActionMessage | undefined; - try { - const result = await this.maybeGenerateAction(this.state); - chatCompletionMessage = result.chatCompletionMessage; - actionMessage = result.actionMessage; - } catch (e) { - // Return to idle state on error - const requestId = extractRequestIdFromError(e); - if (requestId) { - log.error( - `An error occurred when calling OpenAI (request ID: ${requestId}):`, - e - ); - } else { - log.error("An error occurred when calling OpenAI", e); - } - this.state = toIdleState(this.state); - break; - } - - const content = chatCompletionMessage.content; - if (content && content.trim().length > 0) { - this.speak(content.trim()); - } - - if (actionMessage) { - // Transition to pending-action state - log.info( - `Sending action to game: ${util.inspect(actionMessage, { breakLength: Infinity })}` - ); - send(actionMessage); // TODO: handle send errors - this.state = toPendingActionState( - this.state, - actionMessage, - chatCompletionMessage, - this.state.forceAction - ); - } else { - // No action generated, add the message to the context window and return to idle state - this.llmMessages.push(chatCompletionMessage); - this.state = toIdleState(this.state); - } - - break; - } - case "state/pending-action": { - // Wait for action result message - // TODO: Catch exceptions thrown here - const msg: ActionResultMessage = await this.actionResultManager.getActionResult( - this.state.action.data.id + assert( + this.state.id !== "state/waiting-for-game-startup", + "Should not be in waiting-for-game-startup state in main loop" + ); + + const stimulus = await this.waitForStimulus(); + log.debug(`Received stimulus: ${util.inspect(stimulus, { breakLength: Infinity })}`); + + // Update the context window before thinking or acting + this.processContextBuffer(); + this.trimLlmMessages(); + + if (isIdleTimerStimulus(stimulus)) { + await this.thinkAndMaybeAct(); + } else if (isMessageStimulus(stimulus)) { + const message = stimulus.message; + if (isContextMessage(message)) { + assert( + !message.data.silent, + "Silent context messages should not count as stimuli" ); - assert(msg.data.id === this.state.action.data.id, "Action result ID mismatch"); - const actionResultContent = msg.data.message - ? { success: msg.data.success, message: msg.data.message } - : { success: msg.data.success }; - const actionResultMessage: ChatCompletionToolMessageParam = { - role: "tool", - tool_call_id: msg.data.id, - content: JSON.stringify(actionResultContent) - }; - // Add the completion and action result to llmMessages - this.llmMessages.push(this.state.completion); - this.llmMessages.push(actionResultMessage); - - // Transition back to thinking state - // If the action was forced and failed, keep the forceAction in the new state - const newState = toThinkingState(this.state, msg); - if (this.state.forceAction && !msg.data.success) { - newState.forceAction = this.state.forceAction; - } - this.state = newState; - break; - } - default: { - // Unknown state, log and exit - log.error(`Invalid state: ${this.state}`); - return; + await this.thinkAndMaybeAct(message); + } else if (isForceActionMessage(message)) { + await this.handleForceActionMessage(message); + } else { + throw new Error(`Unexpected message stimulus type: ${message}`); } + } else { + throw new Error(`Unexpected stimulus type: ${stimulus}`); } } } @@ -219,22 +146,11 @@ export class Jippity { this.startUpMessageResolver = Promise.withResolvers(); } this.startUpMessageResolver.resolve(message); + return; } // Handle action result messages immediately. if (message.command === "action/result") { - if (this.state.id !== "state/pending-action") { - log.error( - `Received action/result message while current state is ${this.state.id}. Ignoring.` - ); - return; - } - if (message.data.id !== this.state.action.data.id) { - log.error( - `Received action/result message with id ${message.data.id} while waiting for result of action with id ${this.state.action.data.id}. Ignoring.` - ); - return; - } log.info( `Received action result from game: ${util.inspect(message.data, { breakLength: Infinity })}` ); @@ -262,21 +178,36 @@ export class Jippity { return; } - if (message.command === "context") { + if (isSilentContextMessage(message)) { + // Silent context messages are only buffered for context, and do not trigger reactions + this.contextBuffer.push(message); + return; + } + + if (isNonSilentContextMessage(message)) { // If a ForceActionMessage is present in the reactionQueue, buffer this context message instead of queueing for reaction const hasForceAction = this.reactionQueue.some(isForceActionMessage); if (hasForceAction) { this.contextBuffer.push(message); return; } + + // If there is a pending stimulusResolver, resolve with this context message it immediately + if (this.reactionQueue.length === 0 && this.stimulusResolver) { + log.debug(`Resolving stimulusResolver with context message`); + const resolver = this.stimulusResolver; + this.stimulusResolver = null; + resolver.resolve({ type: "Message", message }); + return; + } + // Otherwise, add to reactionQueue this.reactionQueue.push(message); while (this.reactionQueue.length > 1) { const dropped = this.reactionQueue.shift(); - if (!dropped) { - break; - } + assert(dropped, "unreachable"); + // We checked before that there are no ForceActionMessages in the queue, so this must be a ContextMessage assert( dropped?.command === "context", "Only context messages should be dropped from reactionQueue" @@ -287,13 +218,21 @@ export class Jippity { ); } - this.resolveReactionQueue(); return; } if (isForceActionMessage(message)) { - // Remove all ContextMessages from reactionQueue and buffer them - const remaining: Message[] = []; + // If there is a pending stimulusResolver, resolve it with this ForceActionMessage immediately + if (this.reactionQueue.length === 0 && this.stimulusResolver) { + log.debug(`Resolving stimulusResolver with force action message`); + const resolver = this.stimulusResolver; + this.stimulusResolver = null; + resolver.resolve({ type: "Message", message }); + return; + } + + // Remove all ContextMessages from reactionQueue and put them in contextBuffer + const remaining: ForceActionMessage[] = []; for (const msg of this.reactionQueue) { if (isContextMessage(msg)) { this.contextBuffer.push(msg); @@ -304,63 +243,305 @@ export class Jippity { this.reactionQueue = remaining; // Add the new ForceActionMessage this.reactionQueue.push(message); - this.resolveReactionQueue(); return; } } - /** - * Returns the next message that requires a reaction. - * If no such message is available, returns a Promise that resolves when one arrives. - * If there are multiple messages in the queue, always process the oldest first. - */ - async receiveNextReactionMessage(): Promise { + private async waitForStimulus(): Promise { + // Implementation that waits for either an idle timer or a message if (this.reactionQueue.length > 0) { log.debug( - `receiveNextReactionMessage: there are already ${this.reactionQueue.length} messages in reactionQueue` + `waitForStimulus: there are already ${this.reactionQueue.length} messages in reactionQueue` + ); + const message = this.reactionQueue.shift()!; + log.debug( + `waitForStimulus: returning message stimulus from reactionQueue: ${message.command}` ); - return this.reactionQueue.shift()!; + return { type: "Message", message }; } - // Wait for a new reaction-required message - return new Promise((resolve) => { - if (this.reactionResolver) { - throw new Error("Multiple reactionResolvers detected!"); + if (this.stimulusResolver) { + log.error( + "waitForStimulus: stimulusResolver already exists; please tell the maintainer about this" + ); + throw new Error("stimulusResolver already exists"); + } + this.stimulusResolver = Promise.withResolvers(); + + let resolved = false; + const originalResolve = this.stimulusResolver.resolve; + const originalReject = this.stimulusResolver.reject; + + // Wrap resolve/reject to ensure only one call + this.stimulusResolver.resolve = (value) => { + if (!resolved) { + resolved = true; + this.stimulusResolver = null; + originalResolve(value); + } + }; + this.stimulusResolver.reject = (reason) => { + if (!resolved) { + resolved = true; + this.stimulusResolver = null; + originalReject(reason); + } + }; + + setTimeout(() => { + if (!resolved && this.stimulusResolver) { + log.debug("waitForStimulus: timeout reached, resolving with IdleTimer"); + this.stimulusResolver.resolve({ type: "IdleTimer" }); } - this.reactionResolver = resolve; - }); + }, 1000); + + return this.stimulusResolver.promise; } - /** - * Helper to resolve any pending reaction message promise. - */ - private resolveReactionQueue() { - if (!this.reactionResolver) { - log.debug("resolveReactionQueue: no pending reactionResolver to resolve"); - return; + private async thinkAndMaybeAct(message?: ContextMessage) { + const messages: ChatCompletionMessageParam[] = []; + if (message) { + messages.push({ + role: "user", + content: `Context from ${message.game}:\n${message.data.message}` + }); } - // TODO: is this right? - while (this.reactionResolver && this.reactionQueue.length > 0) { - const msg = this.reactionQueue.shift()!; - const resolve = this.reactionResolver; - this.reactionResolver = null; - if (resolve) { - resolve(msg); + + let result: { + chatCompletionMessage: ChatCompletionMessage; + actionMessage?: ActionMessage; + }; + try { + result = await this.maybeGenerateAction(messages); + } catch (e) { + const requestId = extractRequestIdFromError(e); + if (requestId) { + log.error( + `handleForceActionMessage: An error occurred when trying to generate a tool call (OpenAI request ID: ${requestId}):`, + e + ); } else { - throw new Error("it shouldn't be possible for resolve to be null here"); + log.error( + "handleForceActionMessage: An error occurred when trying to generate a tool call", + e + ); } + throw e; // TODO: Think of a more elegant way to handle this + } + + const { chatCompletionMessage, actionMessage } = result; + + if (chatCompletionMessage.content && chatCompletionMessage.content.trim().length > 0) { + this.speak(chatCompletionMessage.content.trim()); + } + + if (actionMessage) { + // Send the action to the game + log.info( + `Sending action to game: ${util.inspect(actionMessage.data, { + breakLength: Infinity + })}` + ); + send(actionMessage); + + const actionResult = await this.actionResultManager.getActionResult( + actionMessage.data.id + ); + assert(actionResult.data.id === actionMessage.data.id, "Action result ID mismatch"); + + // Add the context message that triggered this to llmMessages + this.llmMessages.push(...messages); + // Add the chat completion message (i.e., the tool call) to llmMessages + this.llmMessages.push(chatCompletionMessage); + // Add the action result to llmMessages as a tool message + const actionResultContent = actionResult.data.message + ? { success: actionResult.data.success, message: actionResult.data.message } + : { success: actionResult.data.success }; + const actionResultMessage: ChatCompletionToolMessageParam = { + role: "tool", + tool_call_id: actionResult.data.id, + content: JSON.stringify(actionResultContent) + }; + this.llmMessages.push(actionResultMessage); + } else { + // No action was generated, just add the context message and chat completion message to llmMessages + this.llmMessages.push(...messages); + this.llmMessages.push(chatCompletionMessage); } } + private async handleForceActionMessage(message: ForceActionMessage): Promise { + // Get the list of allowed actions + const allowedActionNames = message.data.action_names; + const allowedActions = this.actions.filter((a) => allowedActionNames.includes(a.name)); + if (allowedActions.length === 0) { + const availableActionNamesStr = this.actions.map((a) => a.name).join(", "); + const actionNamesStr = allowedActionNames.join(", "); + throw new Error( + `handleForceActionMessage: None of the specified actionNames are registered actions; specified action names: ${actionNamesStr}; registered action names: ${availableActionNamesStr}.` + ); + } + + const queryMessage: ChatCompletionUserMessageParam = { + role: "user", + content: `${message.data.query}\n\nYou must use one of the following tools: ${allowedActionNames.join(", ")}` + }; + + let result: { + chatCompletionMessage: ChatCompletionMessage; + actionMessage: ActionMessage; + } | null = null; + try { + result = await this.forceGenerateAction(allowedActions, [queryMessage]); + } catch (e) { + const requestId = extractRequestIdFromError(e); + if (requestId) { + log.error( + `handleForceActionMessage: An error occurred when trying to generate a tool call (OpenAI request ID: ${requestId}):`, + e + ); + } else { + log.error( + "handleForceActionMessage: An error occurred when trying to generate a tool call", + e + ); + } + throw e; // TODO: Think of a more elegant way to handle this + } + + const { chatCompletionMessage, actionMessage } = result; + + // Send the action to the game + log.info( + `Sending action to game: ${util.inspect(actionMessage.data, { + breakLength: Infinity + })}` + ); + send(actionMessage); + + const actionResult = await this.actionResultManager.getActionResult(actionMessage.data.id); + assert(actionResult.data.id === actionMessage.data.id, "Action result ID mismatch"); + + if (!actionResult.data.success) { + // TODO: Retry failed actions for force actions + log.warn( + `handleForceActionMessage: Action ${actionMessage.data.id} failed according to the game. Jippity should immediately retry this action, but this is not yet implemented.` + ); + return; + } + + // Add the query message to llmMessages unless ephemeral_context is true + if (!message.data.ephemeral_context) { + this.llmMessages.push(queryMessage); + } + // Add the chat completion message (i.e., the tool call) to llmMessages + this.llmMessages.push(chatCompletionMessage); + // Add the action result to llmMessages as a tool message + const actionResultContent = actionResult.data.message + ? { success: actionResult.data.success, message: actionResult.data.message } + : { success: actionResult.data.success }; + const actionResultMessage: ChatCompletionToolMessageParam = { + role: "tool", + tool_call_id: actionResult.data.id, + content: JSON.stringify(actionResultContent) + }; + this.llmMessages.push(actionResultMessage); + } + + private async forceGenerateAction( + allowedActions: Action[], + additionalMessages: ChatCompletionMessageParam[] = [] + ): Promise<{ chatCompletionMessage: ChatCompletionMessage; actionMessage: ActionMessage }> { + assert(allowedActions.length > 0, "forceGenerateAction: allowedActions must not be empty"); + + // Build messages + const messages: ChatCompletionMessageParam[] = [ + this.systemMessage, + ...this.llmMessages, + ...additionalMessages + ]; + const body: ChatCompletionCreateParamsNonStreaming = { + model: openaiModel, + messages: messages, + response_format: { + type: "text" + }, + temperature: 1, + max_completion_tokens: 4096, + frequency_penalty: 0, + presence_penalty: 0, + tools: allowedActions.map(convertActionToTool), + tool_choice: "required", + parallel_tool_calls: false + }; + log.debug( + `forceGenerateAction: Sending request to OpenAI: ${util.inspect(body, { breakLength: Infinity })}` + ); + const response = await openai.chat.completions.create(body); + log.debug( + `forceGenerateAction: Received response from OpenAI: ${util.inspect(response, { breakLength: Infinity })}` + ); + + if (response.choices.length === 0) { + throw new Error("OpenAI response included no choices"); + } else if (response.choices.length > 1) { + log.warn("OpenAI response included multiple choices; only the first will be used"); + } + + const choice = response.choices[0]; + + // Make sure there are actually tool calls in the response + if (choice.finish_reason !== "tool_calls") { + throw new Error( + `forceGenerateAction: OpenAI response does not include a tool call; finish_reason = ${choice.finish_reason}` + ); + } + const chatCompletionMessage = choice.message; + const outerToolCalls = chatCompletionMessage.tool_calls; + if (!outerToolCalls || outerToolCalls.length === 0) { + throw new Error( + "forceGenerateAction: OpenAI response includes no tool calls despite finish_reason being tool_calls" + ); + } else if (outerToolCalls.length > 1) { + log.warn( + "forceGenerateAction: OpenAI response includes multiple tool calls; only the first will be used" + ); + chatCompletionMessage.tool_calls = [outerToolCalls[0]]; + } + const toolCall = outerToolCalls[0]; + if (toolCall.type !== "function") { + throw new Error( + `forceGenerateAction: OpenAI response includes a non-function tool call of type ${toolCall.type}; only function tool calls are supported` + ); + } + + const actionMessage: ActionMessage = { + command: "action", + data: { + id: toolCall.id, + name: toolCall.function?.name, + data: toolCall.function?.arguments + } + }; + + const allowedActionNames = allowedActions.map((a) => a.name); + if (!(actionMessage.data.name in allowedActionNames)) { + log.warn( + `forceGenerateAction: OpenAI chose action "${actionMessage.data.name}" which was not in the list of allowed actions: ${allowedActionNames.join(", ")}; the game will need to handle this.` + ); + } + + return { chatCompletionMessage, actionMessage }; + } + private async maybeGenerateAction( - state: ThinkingState + additionalMessages: ChatCompletionMessageParam[] = [] ): Promise<{ chatCompletionMessage: ChatCompletionMessage; actionMessage?: ActionMessage }> { - const messages: ChatCompletionMessageParam[] = [this.systemMessage, ...this.llmMessages]; - if (state.trigger?.command === "context") { - messages.push({ - role: "user", - content: `Context from ${state.trigger.game}:\n${state.trigger.data.message}` - }); - } + const messages: ChatCompletionMessageParam[] = [ + this.systemMessage, + ...this.llmMessages, + ...additionalMessages + ]; + const body: ChatCompletionCreateParamsNonStreaming = { model: openaiModel, messages: messages, @@ -368,46 +549,24 @@ export class Jippity { type: "text" }, temperature: 1, - max_completion_tokens: 2048, - top_p: 1, + max_completion_tokens: 4096, frequency_penalty: 0, presence_penalty: 0 }; + // Convert actions to tools if there are any if (this.actions.length > 0) { body.tools = this.actions.map(convertActionToTool); - } - // Prevent the usage of multiple tools - if (body.tools) { + // Prevent the usage of multiple tools body.parallel_tool_calls = false; } - if (state.forceAction) { - const forcedActionNames = state.forceAction.data.action_names; - const forcedActions = this.actions.filter((a) => forcedActionNames.includes(a.name)); - const hasValidForcedActions = forcedActions.length > 0; - if (hasValidForcedActions) { - log.info( - `Forcing action from: ${forcedActions - .map((a) => a.name) - .join(", ")} due to forceAction message` - ); - body.tools = forcedActions.map(convertActionToTool); - body.tool_choice = "required"; - } else { - const forcedActionNamesStr = forcedActionNames.join(", "); - const availableActionNamesStr = this.actions.map((a) => a.name).join(", "); - log.warn( - `Received forceAction message with no valid action names: ${forcedActionNamesStr}. Currently available action names are ${availableActionNamesStr}. Jippity may or may not choose to take an action anyway.` - ); - body.tools = this.actions.map(convertActionToTool); - body.tool_choice = "auto"; - } - } + log.debug(`Sending request to OpenAI: ${util.inspect(body, { breakLength: Infinity })}}`); const response = await openai.chat.completions.create(body); log.debug( `Received response from OpenAI: ${util.inspect(response, { breakLength: Infinity })}` ); + if (response.choices.length === 0) { throw new Error("OpenAI returned no choices"); } @@ -418,6 +577,7 @@ export class Jippity { log.error( `Response from OpenAI contains ${choice.message.tool_calls.length} tool calls; only one is supported` ); + choice.message.tool_calls = [choice.message.tool_calls[0]]; } assert( choice.message.tool_calls[0].type === "function", From c97396c6ece3f17d9498ef073308087942b71131 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Sun, 31 Aug 2025 23:45:07 -0500 Subject: [PATCH 20/24] Move context trimming functionality to context-trimmers.ts --- backend/src/context-trimmers.ts | 162 ++++++++++++++++++++++++++++++++ backend/src/jippity.ts | 16 +--- 2 files changed, 167 insertions(+), 11 deletions(-) create mode 100644 backend/src/context-trimmers.ts diff --git a/backend/src/context-trimmers.ts b/backend/src/context-trimmers.ts new file mode 100644 index 0000000..85e86ae --- /dev/null +++ b/backend/src/context-trimmers.ts @@ -0,0 +1,162 @@ +import { ChatCompletionMessageParam } from "openai/src/resources/chat/completions/completions"; +import assert from "node:assert"; +import { log } from "./logging"; + +export interface ContextTrimmer { + /** + * Trim a list of messages to fit certain constraints. + * + * If there is a system message, it will be preserved, even if it means violating the constraints. + * + * It is assumed that the system message (if any) is the first message in the list. + * If there is a system message in any other position, or if there are multiple system messages, + * the behavior of this function is undefined. + * + * The returned list of messages will never start with a tool message. + * If trimming would result in a leading tool message, it will be removed. + * + * @param messages the list of messages to trim (won't be modified) + * @return a new list of messages that fits the constraints + */ + trimContext(messages: ChatCompletionMessageParam[]): ChatCompletionMessageParam[]; +} + +export class MessageCountContextTrimmer implements ContextTrimmer { + private readonly maxMessageCount: number; + + constructor(maxMessageCount: number = 10) { + assert(maxMessageCount > 0, "maxMessageCount must be greater than 0"); + this.maxMessageCount = maxMessageCount; + } + + trimContext(messages: ChatCompletionMessageParam[]): ChatCompletionMessageParam[] { + if (messages.length <= this.maxMessageCount) { + return Array.from(messages); + } + const trimmedMessages = trimContextBasedOnWeightFunction( + messages, + () => 1, + this.maxMessageCount + ); + removeOrphanedToolMessage(trimmedMessages); + log.debug( + `Trimmed context from ${messages.length} messages to ${trimmedMessages.length} messages` + ); + return trimmedMessages; + } +} + +/** + * A context trimmer that estimates the token count of messages and trims them to fit within a maximum token limit. + * The estimation is based on a simple heuristic: 1 token per 4 characters in the message content, plus 1 token for the role. + * + * Note the following edge cases: + * - It is possible that for the returned message list to be shorter than `minMessagesToKeep` + * if the earliest message in the trimmed list is a tool message. + * - If `minMessagesToKeep` is 0, the returned message list may be empty. + * This can happen if the most recent message is very long. + * - If `minMessagesToKeep` is non-0 the returned message list may have more than `maxTokens` tokens. + */ +export class EstimatedTokenCountContextTrimmer implements ContextTrimmer { + private readonly maxTokens: number; + private readonly minMessagesToKeep: number; + + constructor(maxTokens: number = 2000, minMessagesToKeep: number = 1) { + assert(maxTokens > 0, "maxTokens must be greater than 0"); + assert(minMessagesToKeep >= 0, "minMessagesToKeep must be non-negative"); + this.maxTokens = maxTokens; + this.minMessagesToKeep = minMessagesToKeep; + } + + trimContext(messages: ChatCompletionMessageParam[]): ChatCompletionMessageParam[] { + const weightFunction = (msg: ChatCompletionMessageParam): number => { + // Rough estimate: 1 token per 4 characters + 1 token for role + return Math.ceil((msg.content?.length ?? 0) / 4) + 1; + }; + const trimmedMessages = trimContextBasedOnWeightFunction( + messages, + weightFunction, + this.maxTokens, + this.minMessagesToKeep + ); + removeOrphanedToolMessage(trimmedMessages); + if (trimmedMessages.length < messages.length) { + log.debug( + `Trimmed context from ${messages.length} messages to ${trimmedMessages.length} messages based on estimated token count` + ); + } + return trimmedMessages; + } +} + +/** + * A context trimmer that simply returns a shallow copy of the input messages. + * Your software can't be considered enterprise-grade until it has a no-op implementation of every interface. + */ +export class NoOpContextTrimmer implements ContextTrimmer { + trimContext(messages: ChatCompletionMessageParam[]): ChatCompletionMessageParam[] { + return Array.from(messages); + } +} + +/** + * Modify a list of messages in place by removing a leading tool message if it exists. + * @param messages the list of messages to modify + */ +function removeOrphanedToolMessage(messages: ChatCompletionMessageParam[]): void { + if (messages.length === 0) { + return; + } + if (messages[0].role === "tool") { + messages.shift(); + } +} + +function trimContextBasedOnWeightFunction( + messages: ChatCompletionMessageParam[], + weightFunction: (msg: ChatCompletionMessageParam) => number, + maxWeight: number, + minMessagesToKeep: number = 0 +): ChatCompletionMessageParam[] { + let totalWeight = 0; + const trimmedMessages: ChatCompletionMessageParam[] = []; + + // Preserve the system message if it exists + let systemMessage: ChatCompletionMessageParam | null = null; + if (messages.length > 0 && messages[0].role === "system") { + systemMessage = messages[0]; + totalWeight += weightFunction(systemMessage); + } + messages = messages.slice(1); + + // Iterate from the end to the beginning to keep the most recent messages + for (let i = messages.length - 1; i >= 0; i--) { + const message = messages[i]; + const messageWeight = weightFunction(message); + + if ( + totalWeight + messageWeight <= maxWeight || + trimmedMessages.length < minMessagesToKeep + ) { + // If adding this message doesn't exceed the max weight, include it + trimmedMessages.push(message); + totalWeight += messageWeight; + } else { + // If it exceeds, stop adding more messages + break; + } + } + + // Add the system message back if there was one + if (systemMessage) { + trimmedMessages.push(systemMessage); + } + + // Since we iterated backwards, we need to reverse the result to maintain original order + trimmedMessages.reverse(); + + // Remove leading tool message if it exists + removeOrphanedToolMessage(trimmedMessages); + + return trimmedMessages; +} diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index cfdef87..bc25cae 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -25,6 +25,7 @@ import { } from "openai/resources/chat/completions"; import util from "util"; import { ActionResultManager } from "./action-result-manager"; +import { ContextTrimmer, EstimatedTokenCountContextTrimmer } from "./context-trimmers"; export class Jippity { private isMainLoopRunning = false; @@ -54,6 +55,9 @@ export class Jippity { // The messages sent to the LLM, excluding the system prompt and the pending tool call, if any private llmMessages: ChatCompletionMessageParam[] = []; + // TODO: Make this customizable + private contextTrimmer: ContextTrimmer = new EstimatedTokenCountContextTrimmer(2000, 1); + constructor() {} async startMainLoop() { @@ -649,17 +653,7 @@ export class Jippity { * This is a naive implementation that just keeps the last 10 messages if there are more than 15. */ private trimLlmMessages(): void { - // TODO: Implement better message trimming to fit within token limits - // TODO: Make these values configurable - if (this.llmMessages.length > 15) { - this.llmMessages = this.llmMessages.slice(-10); - - const firstMessage = this.llmMessages[0]; - if (firstMessage.role === "tool") { - // Remove incomplete tool call from the start of the message list - this.llmMessages = this.llmMessages.slice(1); - } - } + this.llmMessages = this.contextTrimmer.trimContext(this.llmMessages); } /** From 9040719f842f1a01d2680b7ccd2f886cbbeeecc0 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Mon, 1 Sep 2025 12:24:20 -0500 Subject: [PATCH 21/24] Try to make Jippity's speech shorter --- backend/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/index.ts b/backend/src/index.ts index 1f12665..534f565 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -34,7 +34,7 @@ export const SYSTEM_MESSAGE: ChatCompletionMessageParam = { "\n" + "If you don't have any functions available or in-game actions you want to take, you can talk about your half-brother Randy and your cousin Neuro-sama. " + "If you are feeling lonely because no one is talking in chat, you can make up stories about Randy and Neuro. " + - "Try to limit your monologues to a few sentences at a time. " + + "Try to limit your monologues to a sentence or two at a time. " + "Avoid using line-breaks and non-ASCII characters in your speech." } ] From e03932bceda567fdc6e78e3f0d232222e186e601 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Mon, 1 Sep 2025 12:26:03 -0500 Subject: [PATCH 22/24] Log OpenAI response time and token usage, adjust some parameters --- backend/src/jippity-types.ts | 124 +---------------------------------- backend/src/jippity.ts | 26 +++++--- backend/src/utils.ts | 16 ++++- 3 files changed, 34 insertions(+), 132 deletions(-) diff --git a/backend/src/jippity-types.ts b/backend/src/jippity-types.ts index b719d2f..a149b4c 100644 --- a/backend/src/jippity-types.ts +++ b/backend/src/jippity-types.ts @@ -1,127 +1,5 @@ // Utility functions for state transitions -import { - ActionMessage, - ActionResultMessage, - ContextMessage, - ForceActionMessage -} from "./api-types"; -import { ChatCompletionMessage } from "openai/resources/chat/completions"; - -export type State = - | WaitingForGameState - | IdleState - | ThinkingState - | PendingActionState - | ExitingState; - -interface BaseState { - id: string; - since: Date; - game: string; -} - -/** - * Jippity is waiting for the game to start up. - */ -export interface WaitingForGameState extends BaseState { - id: "state/waiting-for-game-startup"; - game: never; -} - -/** - * Jippity is idle while waiting for a message from the game. - */ -export interface IdleState extends BaseState { - id: "state/idle"; -} - -/** - * A request to the OpenAI API is in progress. - */ -export interface ThinkingState extends BaseState { - id: "state/thinking"; - trigger?: ContextMessage | ForceActionMessage | ActionResultMessage; - // Even if the trigger is an ActionResultMessage, we need to know if it was a forced action. - forceAction?: ForceActionMessage; -} - -/** - * Jippity is waiting for the result of an action. - */ -export interface PendingActionState extends BaseState { - id: "state/pending-action"; - action: ActionMessage; - completion: ChatCompletionMessage; - forceAction?: ForceActionMessage; -} - -/** - * Jippity is talking to the audience. - * - * This is currently unused. A future version of Jippity may artificially delay responses to simulate talking. - */ -export interface TalkingState extends BaseState { - id: "state/talking"; -} - -/** - * Jippity is in the process of shutting down. - */ -export interface ExitingState extends BaseState { - id: "state/exiting"; - reason?: string; -} - -// Utility functions for state transitions - -export function toWaitingForGameState(): WaitingForGameState { - return { - id: "state/waiting-for-game-startup", - since: new Date(), - game: undefined as never - }; -} - -export function toIdleState(prev: { game: string }): IdleState { - return { - id: "state/idle", - since: new Date(), - game: prev.game - }; -} - -export function toThinkingState( - prev: { game: string }, - trigger?: ContextMessage | ForceActionMessage | ActionResultMessage, - forceAction?: ForceActionMessage -): ThinkingState { - if (trigger && trigger.command === "actions/force" && !forceAction) { - forceAction = trigger; - } - return { - id: "state/thinking", - since: new Date(), - game: prev.game, - trigger, - forceAction - } as ThinkingState; -} - -export function toPendingActionState( - prev: { game: string }, - action: ActionMessage, - completion: ChatCompletionMessage, - forceAction?: ForceActionMessage -): PendingActionState { - return { - id: "state/pending-action", - since: new Date(), - game: prev.game, - action, - completion, - forceAction - }; -} +import { ContextMessage, ForceActionMessage } from "./api-types"; export type ReactionMessage = ContextMessage | ForceActionMessage; diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index bc25cae..f99ab37 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -14,7 +14,7 @@ import { import { log } from "./logging"; import assert from "node:assert"; import { ChatCompletionCreateParamsNonStreaming } from "openai/src/resources/chat/completions"; -import { convertActionToTool, extractRequestIdFromError } from "./utils"; +import { chatCompletionWithLogging, convertActionToTool, extractRequestIdFromError } from "./utils"; import { openai, openaiModel, send, SYSTEM_MESSAGE } from "./index"; import { ChatCompletionMessage, @@ -28,6 +28,9 @@ import { ActionResultManager } from "./action-result-manager"; import { ContextTrimmer, EstimatedTokenCountContextTrimmer } from "./context-trimmers"; export class Jippity { + // Things that should be configurable + private readonly MAX_COMPLETION_TOKENS = 4096; + private isMainLoopRunning = false; // state: State = toWaitingForGameState(); @@ -56,7 +59,7 @@ export class Jippity { private llmMessages: ChatCompletionMessageParam[] = []; // TODO: Make this customizable - private contextTrimmer: ContextTrimmer = new EstimatedTokenCountContextTrimmer(2000, 1); + private contextTrimmer: ContextTrimmer = new EstimatedTokenCountContextTrimmer(3072, 1); constructor() {} @@ -470,17 +473,20 @@ export class Jippity { type: "text" }, temperature: 1, - max_completion_tokens: 4096, + max_completion_tokens: this.MAX_COMPLETION_TOKENS, frequency_penalty: 0, presence_penalty: 0, tools: allowedActions.map(convertActionToTool), tool_choice: "required", - parallel_tool_calls: false + parallel_tool_calls: false, + reasoning_effort: "low" }; log.debug( `forceGenerateAction: Sending request to OpenAI: ${util.inspect(body, { breakLength: Infinity })}` ); - const response = await openai.chat.completions.create(body); + const response = await chatCompletionWithLogging(() => + openai.chat.completions.create(body) + ); log.debug( `forceGenerateAction: Received response from OpenAI: ${util.inspect(response, { breakLength: Infinity })}` ); @@ -553,9 +559,10 @@ export class Jippity { type: "text" }, temperature: 1, - max_completion_tokens: 4096, + max_completion_tokens: this.MAX_COMPLETION_TOKENS, frequency_penalty: 0, - presence_penalty: 0 + presence_penalty: 0, + reasoning_effort: "low" }; // Convert actions to tools if there are any @@ -566,7 +573,9 @@ export class Jippity { } log.debug(`Sending request to OpenAI: ${util.inspect(body, { breakLength: Infinity })}}`); - const response = await openai.chat.completions.create(body); + const response = await chatCompletionWithLogging(() => + openai.chat.completions.create(body) + ); log.debug( `Received response from OpenAI: ${util.inspect(response, { breakLength: Infinity })}` ); @@ -575,6 +584,7 @@ export class Jippity { throw new Error("OpenAI returned no choices"); } const choice = response.choices[0]; + log.debug(`OpenAI finish_reason: ${choice.finish_reason}`); if (choice.message.tool_calls && choice.message.tool_calls.length > 0) { if (choice.message.tool_calls.length > 1) { diff --git a/backend/src/utils.ts b/backend/src/utils.ts index d68ccc8..5231c38 100644 --- a/backend/src/utils.ts +++ b/backend/src/utils.ts @@ -1,6 +1,8 @@ import OpenAI from "openai"; -import { ChatCompletionTool, ChatCompletionUserMessageParam } from "openai/resources/chat/completions"; +import { ChatCompletion, ChatCompletionTool, ChatCompletionUserMessageParam } from "openai/resources/chat/completions"; import { Action, ForceActionMessage } from "./api-types"; +import { log } from "./logging"; +import util from "util"; import FunctionParameters = OpenAI.FunctionParameters; /** @@ -72,3 +74,15 @@ export function extractRequestIdFromError(error: unknown): string | null { } return null; } + +export async function chatCompletionWithLogging( + requestFunc: () => Promise +): Promise { + const startTime = Date.now(); + const response = await requestFunc(); + const duration = Date.now() - startTime; + log.info( + `OpenAI request completed in ${duration} ms, usage: ${util.inspect(response.usage, { breakLength: Infinity })}` + ); + return response; +} From 5d195f38f17a38156a13fb011bd3c524a49cd0ee Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Mon, 1 Sep 2025 12:42:04 -0500 Subject: [PATCH 23/24] Use constants for parameters that users will likely want to change --- backend/src/jippity.ts | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/backend/src/jippity.ts b/backend/src/jippity.ts index f99ab37..939ea83 100644 --- a/backend/src/jippity.ts +++ b/backend/src/jippity.ts @@ -26,11 +26,25 @@ import { import util from "util"; import { ActionResultManager } from "./action-result-manager"; import { ContextTrimmer, EstimatedTokenCountContextTrimmer } from "./context-trimmers"; +import { ReasoningEffort } from "openai/src/resources/shared"; export class Jippity { // Things that should be configurable + // ---------------------------------- + // Max tokens to generate in a single response + // If the model tries to generate more than this, the program will just crash. + // Let me know if you have an idea for a more graceful way to handle this. private readonly MAX_COMPLETION_TOKENS = 4096; - + // Adjust this to control how much effort the model puts into reasoning about its actions + // Set it to null to use the model's default, or if the model doesn't support this parameter + private readonly REASONING_EFFORT: ReasoningEffort = "low"; + // Context window management parameters + // See EstimatedTokenCountContextTrimmer for details + private readonly CONTEXT_MAX_TOKENS = 4096; + private readonly CONTEXT_MIN_MESSAGES_TO_KEEP = 2; // + // ---------------------------------- + + // Whether the main loop is running private isMainLoopRunning = false; // state: State = toWaitingForGameState(); @@ -59,7 +73,10 @@ export class Jippity { private llmMessages: ChatCompletionMessageParam[] = []; // TODO: Make this customizable - private contextTrimmer: ContextTrimmer = new EstimatedTokenCountContextTrimmer(3072, 1); + private contextTrimmer: ContextTrimmer = new EstimatedTokenCountContextTrimmer( + this.CONTEXT_MAX_TOKENS, + this.CONTEXT_MIN_MESSAGES_TO_KEEP + ); constructor() {} @@ -478,9 +495,11 @@ export class Jippity { presence_penalty: 0, tools: allowedActions.map(convertActionToTool), tool_choice: "required", - parallel_tool_calls: false, - reasoning_effort: "low" + parallel_tool_calls: false }; + if (this.REASONING_EFFORT) { + body.reasoning_effort = this.REASONING_EFFORT; + } log.debug( `forceGenerateAction: Sending request to OpenAI: ${util.inspect(body, { breakLength: Infinity })}` ); @@ -561,9 +580,11 @@ export class Jippity { temperature: 1, max_completion_tokens: this.MAX_COMPLETION_TOKENS, frequency_penalty: 0, - presence_penalty: 0, - reasoning_effort: "low" + presence_penalty: 0 }; + if (this.REASONING_EFFORT) { + body.reasoning_effort = this.REASONING_EFFORT; + } // Convert actions to tools if there are any if (this.actions.length > 0) { From 9b6034a137d7b8b7b3a4e75c0253e1f61ce71908 Mon Sep 17 00:00:00 2001 From: EnterpriseScratchDev <191910851+EnterpriseScratchDev@users.noreply.github.com> Date: Mon, 1 Sep 2025 12:42:56 -0500 Subject: [PATCH 24/24] Delete jippity.md. This was an initial design doc that I didn't intend to commit. It's mostly inaccurate by now. --- backend/src/jippity.md | 104 ----------------------------------------- 1 file changed, 104 deletions(-) delete mode 100644 backend/src/jippity.md diff --git a/backend/src/jippity.md b/backend/src/jippity.md deleted file mode 100644 index d1f9457..0000000 --- a/backend/src/jippity.md +++ /dev/null @@ -1,104 +0,0 @@ -## API Messages - -```ts -export type Message = - | StartupMessage - | ContextMessage - | RegisterActionsMessage - | UnregisterActionsMessage - | ForceActionMessage - | ActionResultMessage - | ActionMessage; -``` - -See `api-types.ts` for details on each message type. - -## States - -```mermaid -flowchart TD - WaitingForGameState -->|StartupMessage| IdleState - IdleState -->|ContextMessage| ThinkingState - IdleState -->|ForceActionMessage| ThinkingState - IdleState -->|Idle timer| ThinkingState - ThinkingState -->|ActionMessage| PendingActionState - PendingActionState -->|ActionResultMessage| ThinkingState - ThinkingState -->|No action taken| IdleState - ThinkingState -->|Unrecoverable error| ExitingState -``` - -### `BaseState` - -```ts -interface BaseState { - id: string; - since: Date; - game: string; -} -``` - -The base type for all states. -Contains the `since: Date` field, representing the time the state was entered, -and the `game: string` field, the name of the game being played. - -### `WaitingForGameState` - -```ts -export interface WaitingForGameState extends BaseState { - id: "state/waiting-for-game-startup"; - game: never; -} -``` - -The initial state when Jippity starts up, waiting for a `StartupMessage`. -This is the only state for which the `game` field is `never`. - -When a `StartupMessage` is received, the state transitions to `IdleState`. - -### `IdleState` - -```ts -export interface IdleState extends BaseState { - id: "state/idle"; -} -``` - -The idle state represents downtime where the agent isn't thinking or waiting for an action result. - -When a `ContextMessage` is received with `data.silent == false`, the state transitions to `ThinkingState`. -When a `ForceActionMessage` is received, the state transitions to `ThinkingState`. -When an internal timer triggers the agent to think, the state transitions to `ThinkingState`. - -### `ThinkingState` - -```ts -import {ActionResultMessage} from "./api-types"; - -export interface ThinkingState extends BaseState { - id: "state/thinking"; - trigger: ContextMessage | ForceActionMessage | ActionResultMessage | null; -} -``` - -The thinking state represents the period where the LLM is generating a response. -The `trigger` field indicates what caused the agent to start thinking: - -- `ContextMessage`: The agent is reacting to new context from the game. -- `ForceActionMessage`: The agent received a `ForceActionMessage`, instructing it to take an action immediately. -- `ActionResultMessage`: The agent received an `ActionResultMessage`, indicating the result of its previous action. -- `null`: The agent is thinking without a specific trigger, possibly due to an internal timer. - -When the agent finishes thinking, the state transitions to... - -- `PendingActionState` with an `ActionMessage`, if the agent decided to take an action. -- `IdleState`, if the agent decided not to take any action. - -### `PendingActionState` - -```ts -export interface PendingActionState extends BaseState { - id: "state/pending-action"; - action: ActionMessage; - forceAction?: ForceActionMessage -} -```` \ No newline at end of file