From b280a443b65bd095553b332c7d43999d30a4d908 Mon Sep 17 00:00:00 2001 From: Daniel Campagnoli Date: Tue, 3 Sep 2024 01:14:48 +0800 Subject: [PATCH] Project outline doc generation. SWE-bench runner. Initial Slack chatbot WIP. Aider updates --- CHANGELOG.md | 24 + package-lock.json | 1218 +++++++++++++++++++-- package.json | 4 +- src/agent/agentContext.test.ts | 7 +- src/agent/agentContext.ts | 27 +- src/agent/agentRunner.ts | 11 +- src/agent/humanInTheLoop.ts | 2 +- src/agent/python-agent-system-prompt | 13 +- src/agent/pythonAgentRunner.test.ts | 2 +- src/agent/pythonAgentRunner.ts | 77 +- src/agent/pythonAgentUtils.ts | 71 ++ src/chat/DOCS.md | 3 + src/chatBot/DOCS.md | 4 + src/chatBot/chatBotService.ts | 5 + src/cli/cli.ts | 6 +- src/cli/gaia.ts | 6 +- src/cli/slack.ts | 16 + src/cli/swebench.ts | 2 +- src/cli/util.ts | 2 +- src/functionRegistry.ts | 6 +- src/functions/scm/gitlab.ts | 30 +- src/functions/storage/filesystem.ts | 4 +- src/functions/toolType.ts | 6 +- src/functions/util.ts | 4 +- src/llm/llm.ts | 2 +- src/llm/llmCallService/llmCall.ts | 9 + src/llm/models/anthropic-vertex.ts | 2 +- src/{functions => modules/slack}/slack.ts | 0 src/modules/slack/slackChatBotService.ts | 167 +++ src/sre/README.md | 5 + src/sre/buildFailureAgent.ts | 19 + src/swe/codeEditor.ts | 15 +- src/swe/lang/nodejs/typescriptTools.ts | 3 +- tsconfig.json | 1 + variables/local.env.example | 5 + 35 files changed, 1533 insertions(+), 245 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 src/agent/pythonAgentUtils.ts create mode 100644 src/chat/DOCS.md create mode 100644 src/chatBot/DOCS.md create mode 100644 src/chatBot/chatBotService.ts create mode 100644 src/cli/slack.ts rename src/{functions => modules/slack}/slack.ts (100%) create mode 100644 src/modules/slack/slackChatBotService.ts create mode 100644 src/sre/README.md create mode 100644 src/sre/buildFailureAgent.ts diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..6d85a9ed --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ + +# August 2024 + +Added initial SWE-bench runner. Also working on inference using the containerised environments at https://github.com/TrafficGuard/SWE-bench/blob/main/swebench/harness/run_inference.py + +Added a process to generate documentation for a project.This is a bottom-up process which generates a one sentence and one-paragraph summary for each file +starting in the leaf folders, then generates the summary for the folder, and then iteratively moves up to the root node. + +Prototyping new generateText methods on the LLM interface which have a message history to support both chatbots, and +setting the cache_control flag where the message history may be used like a stack for agentic workflows. + +Add initial Slack chatbot integration. + +Update the Aider wrapper to support editing Python projects in other directories, and to support using Vertex AI. + +Fixes to GitHub integration. + +Add LLM service integration tests. + +Update CI build to run frontend and backend in parallel. + +Fix Anthropic LLM service. + +Add getFileSystemTreeStructure functions and other fixes to the FileSystem service. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 2a42cd9b..35093c23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,7 @@ "@opentelemetry/sdk-trace-base": "^1.23.0", "@opentelemetry/semantic-conventions": "^1.17.1", "@sinclair/typebox": "^0.32.20", + "@slack/bolt": "^3.21.1", "@types/axios": "^0.14.0", "@types/chai": "^4.3.16", "@types/pg": "^8.11.4", @@ -4352,6 +4353,192 @@ "dev": true, "license": "(Unlicense OR Apache-2.0)" }, + "node_modules/@slack/bolt": { + "version": "3.21.1", + "resolved": "https://registry.npmjs.org/@slack/bolt/-/bolt-3.21.1.tgz", + "integrity": "sha512-cql+f8DypIE96mgFTREslP1DfsTUMyVR76whdepcQ1BpP2vXO1TZJxwJHnDKcnJ+NTg8KNGfPIjDfHZUMETCKw==", + "dependencies": { + "@slack/logger": "^4.0.0", + "@slack/oauth": "^2.6.3", + "@slack/socket-mode": "^1.3.6", + "@slack/types": "^2.11.0", + "@slack/web-api": "^6.12.1", + "@types/express": "^4.16.1", + "@types/promise.allsettled": "^1.0.3", + "@types/tsscmp": "^1.0.0", + "axios": "^1.7.4", + "express": "^4.16.4", + "path-to-regexp": "^6.2.1", + "please-upgrade-node": "^3.2.0", + "promise.allsettled": "^1.0.2", + "raw-body": "^2.3.3", + "tsscmp": "^1.0.6" + }, + "engines": { + "node": ">=12.13.0", + "npm": ">=6.12.0" + } + }, + "node_modules/@slack/bolt/node_modules/path-to-regexp": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", + "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==" + }, + "node_modules/@slack/logger": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@slack/logger/-/logger-4.0.0.tgz", + "integrity": "sha512-Wz7QYfPAlG/DR+DfABddUZeNgoeY7d1J39OCR2jR+v7VBsB8ezulDK5szTnDDPDwLH5IWhLvXIHlCFZV7MSKgA==", + "dependencies": { + "@types/node": ">=18.0.0" + }, + "engines": { + "node": ">= 18", + "npm": ">= 8.6.0" + } + }, + "node_modules/@slack/oauth": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/@slack/oauth/-/oauth-2.6.3.tgz", + "integrity": "sha512-1amXs6xRkJpoH6zSgjVPgGEJXCibKNff9WNDijcejIuVy1HFAl1adh7lehaGNiHhTWfQkfKxBiF+BGn56kvoFw==", + "dependencies": { + "@slack/logger": "^3.0.0", + "@slack/web-api": "^6.12.1", + "@types/jsonwebtoken": "^8.3.7", + "@types/node": ">=12", + "jsonwebtoken": "^9.0.0", + "lodash.isstring": "^4.0.1" + }, + "engines": { + "node": ">=12.13.0", + "npm": ">=6.12.0" + } + }, + "node_modules/@slack/oauth/node_modules/@slack/logger": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@slack/logger/-/logger-3.0.0.tgz", + "integrity": "sha512-DTuBFbqu4gGfajREEMrkq5jBhcnskinhr4+AnfJEk48zhVeEv3XnUKGIX98B74kxhYsIMfApGGySTn7V3b5yBA==", + "dependencies": { + "@types/node": ">=12.0.0" + }, + "engines": { + "node": ">= 12.13.0", + "npm": ">= 6.12.0" + } + }, + "node_modules/@slack/oauth/node_modules/@types/jsonwebtoken": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-8.5.9.tgz", + "integrity": "sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@slack/socket-mode": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/@slack/socket-mode/-/socket-mode-1.3.6.tgz", + "integrity": "sha512-G+im7OP7jVqHhiNSdHgv2VVrnN5U7KY845/5EZimZkrD4ZmtV0P3BiWkgeJhPtdLuM7C7i6+M6h6Bh+S4OOalA==", + "dependencies": { + "@slack/logger": "^3.0.0", + "@slack/web-api": "^6.12.1", + "@types/node": ">=12.0.0", + "@types/ws": "^7.4.7", + "eventemitter3": "^5", + "finity": "^0.5.4", + "ws": "^7.5.3" + }, + "engines": { + "node": ">=12.13.0", + "npm": ">=6.12.0" + } + }, + "node_modules/@slack/socket-mode/node_modules/@slack/logger": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@slack/logger/-/logger-3.0.0.tgz", + "integrity": "sha512-DTuBFbqu4gGfajREEMrkq5jBhcnskinhr4+AnfJEk48zhVeEv3XnUKGIX98B74kxhYsIMfApGGySTn7V3b5yBA==", + "dependencies": { + "@types/node": ">=12.0.0" + }, + "engines": { + "node": ">= 12.13.0", + "npm": ">= 6.12.0" + } + }, + "node_modules/@slack/socket-mode/node_modules/ws": { + "version": "7.5.10", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz", + "integrity": "sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/@slack/types": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/@slack/types/-/types-2.12.0.tgz", + "integrity": "sha512-yFewzUomYZ2BYaGJidPuIgjoYj5wqPDmi7DLSaGIkf+rCi4YZ2Z3DaiYIbz7qb/PL2NmamWjCvB7e9ArI5HkKg==", + "engines": { + "node": ">= 12.13.0", + "npm": ">= 6.12.0" + } + }, + "node_modules/@slack/web-api": { + "version": "6.12.1", + "resolved": "https://registry.npmjs.org/@slack/web-api/-/web-api-6.12.1.tgz", + "integrity": "sha512-dXHyHkvvziqkDdZlPRnUl/H2uvnUmdJ5B7kxiH1HIgHe18vcbUk1zjU/XCZgJFhxGeq5Zwa95Z+SbNW9mbRhtw==", + "dependencies": { + "@slack/logger": "^3.0.0", + "@slack/types": "^2.11.0", + "@types/is-stream": "^1.1.0", + "@types/node": ">=12.0.0", + "axios": "^1.7.4", + "eventemitter3": "^3.1.0", + "form-data": "^2.5.0", + "is-electron": "2.2.2", + "is-stream": "^1.1.0", + "p-queue": "^6.6.1", + "p-retry": "^4.0.0" + }, + "engines": { + "node": ">= 12.13.0", + "npm": ">= 6.12.0" + } + }, + "node_modules/@slack/web-api/node_modules/@slack/logger": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@slack/logger/-/logger-3.0.0.tgz", + "integrity": "sha512-DTuBFbqu4gGfajREEMrkq5jBhcnskinhr4+AnfJEk48zhVeEv3XnUKGIX98B74kxhYsIMfApGGySTn7V3b5yBA==", + "dependencies": { + "@types/node": ">=12.0.0" + }, + "engines": { + "node": ">= 12.13.0", + "npm": ">= 6.12.0" + } + }, + "node_modules/@slack/web-api/node_modules/eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==" + }, + "node_modules/@slack/web-api/node_modules/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@swc/cli": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/@swc/cli/-/cli-0.3.9.tgz", @@ -4949,6 +5136,14 @@ "@types/node": "*" } }, + "node_modules/@types/is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@types/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha512-jkZatu4QVbR60mpIzjINmtS1ZF4a/FqdTUTBeQDVOQ2PYyidtwFKr0B5G6ERukKwliq+7mIXvxyppwzG5EgRYg==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/jsdom": { "version": "21.1.6", "resolved": "https://registry.npmjs.org/@types/jsdom/-/jsdom-21.1.6.tgz", @@ -5180,6 +5375,11 @@ "atomic-sleep": "^1.0.0" } }, + "node_modules/@types/promise.allsettled": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/promise.allsettled/-/promise.allsettled-1.0.6.tgz", + "integrity": "sha512-wA0UT0HeT2fGHzIFV9kWpYz5mdoyLxKrTgMdZQM++5h6pYAFH73HXcQhefg24nD1yivUFEn5KU+EF4b+CXJ4Wg==" + }, "node_modules/@types/qs": { "version": "6.9.14", "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.14.tgz", @@ -5214,6 +5414,11 @@ "@types/node": "*" } }, + "node_modules/@types/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==" + }, "node_modules/@types/sax": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/@types/sax/-/sax-1.2.7.tgz", @@ -5308,6 +5513,19 @@ "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==", "dev": true }, + "node_modules/@types/tsscmp": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@types/tsscmp/-/tsscmp-1.0.2.tgz", + "integrity": "sha512-cy7BRSU8GYYgxjcx0Py+8lo5MthuDhlyu076KUcYzVNXL23luYgRHkMG2fIFEc6neckeh/ntP82mw+U4QjZq+g==" + }, + "node_modules/@types/ws": { + "version": "7.4.7", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-7.4.7.tgz", + "integrity": "sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/xmldom": { "version": "0.1.34", "resolved": "https://registry.npmjs.org/@types/xmldom/-/xmldom-0.1.34.tgz", @@ -5647,7 +5865,6 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, "dependencies": { "mime-types": "~2.1.34", "negotiator": "0.6.3" @@ -6184,11 +6401,25 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "license": "Python-2.0" }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", + "integrity": "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg==", + "dependencies": { + "call-bind": "^1.0.5", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", - "dev": true + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" }, "node_modules/array-union": { "version": "2.1.0", @@ -6200,6 +6431,46 @@ "node": ">=8" } }, + "node_modules/array.prototype.map": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.7.tgz", + "integrity": "sha512-XpcFfLoBEAhezrrNw1V+yLXkE7M6uR7xJEsxbG6c/V9v043qurwVJB9r9UTnoSioFDoz1i1VOydpWGmJpfVZbg==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-array-method-boxes-properly": "^1.0.0", + "es-object-atoms": "^1.0.0", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.3.tgz", + "integrity": "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A==", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "es-abstract": "^1.22.3", + "es-errors": "^1.2.1", + "get-intrinsic": "^1.2.3", + "is-array-buffer": "^3.0.4", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/arrify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", @@ -6289,6 +6560,20 @@ "node": ">=8.0.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/avvio": { "version": "8.3.0", "resolved": "https://registry.npmjs.org/avvio/-/avvio-8.3.0.tgz", @@ -6302,9 +6587,9 @@ } }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.5.tgz", + "integrity": "sha512-fZu86yCo+svH3uqJ/yTdQ0QHpQu5oL+/QE+QPSv6BZSkDAoky9vytxp7u5qk83OJFS3kEBcesWni9WTZAv3tSw==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -6624,7 +6909,6 @@ "version": "1.20.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", - "dev": true, "dependencies": { "bytes": "3.1.2", "content-type": "~1.0.5", @@ -6648,7 +6932,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -6657,7 +6940,6 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -6668,14 +6950,12 @@ "node_modules/body-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/body-parser/node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, "dependencies": { "side-channel": "^1.0.4" }, @@ -7932,8 +8212,7 @@ "node_modules/cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", - "dev": true + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" }, "node_modules/copy-anything": { "version": "3.0.5", @@ -8321,6 +8600,54 @@ "node": ">=18" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/datauri": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/datauri/-/datauri-4.1.0.tgz", @@ -8476,16 +8803,19 @@ } }, "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "license": "MIT", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", "dependencies": { - "object-keys": "^1.0.12" + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/degenerator": { @@ -8528,7 +8858,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, "engines": { "node": ">= 0.8", "npm": "1.2.8000 || >= 1.4.16" @@ -9016,8 +9345,7 @@ "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" }, "node_modules/electron-to-chromium": { "version": "1.4.702", @@ -9041,7 +9369,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -9112,23 +9439,56 @@ } }, "node_modules/es-abstract": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.4.tgz", - "integrity": "sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==", - "dev": true, - "license": "MIT", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.3.tgz", + "integrity": "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A==", "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.3", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.1.5", - "is-regex": "^1.0.5", - "object-inspect": "^1.7.0", + "function.prototype.name": "^1.1.6", + "get-intrinsic": "^1.2.4", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.0.3", + "has-symbols": "^1.0.3", + "hasown": "^2.0.2", + "internal-slot": "^1.0.7", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.1", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.0.7", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.0.2", + "object-inspect": "^1.13.1", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimleft": "^2.1.1", - "string.prototype.trimright": "^2.1.1" + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.2", + "safe-array-concat": "^1.1.2", + "safe-regex-test": "^1.0.3", + "string.prototype.trim": "^1.2.9", + "string.prototype.trimend": "^1.0.8", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.6", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -9137,6 +9497,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==" + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -9158,11 +9523,58 @@ "node": ">= 0.4" } }, + "node_modules/es-get-iterator": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.3.tgz", + "integrity": "sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "has-symbols": "^1.0.3", + "is-arguments": "^1.1.1", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.7", + "isarray": "^2.0.5", + "stop-iteration-iterator": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-get-iterator/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, "license": "MIT", "dependencies": { "is-callable": "^1.1.4", @@ -9670,7 +10082,6 @@ "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -9712,8 +10123,7 @@ "node_modules/eventemitter3": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", - "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", - "dev": true + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==" }, "node_modules/events": { "version": "3.3.0", @@ -9980,7 +10390,6 @@ "version": "4.19.2", "resolved": "https://registry.npmjs.org/express/-/express-4.19.2.tgz", "integrity": "sha512-5T6nhjsT+EOMzuck8JjBHARTHfMht0POzlA60WV2pMD3gyXw2LZnZ+ueGdNxG+0calOJcWKbpFcuzLZ91YWq9Q==", - "dev": true, "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", @@ -10022,7 +10431,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -10030,20 +10438,17 @@ "node_modules/express/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/express/node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", - "dev": true + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" }, "node_modules/express/node_modules/qs": { "version": "6.11.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, "dependencies": { "side-channel": "^1.0.4" }, @@ -10635,7 +11040,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, "dependencies": { "debug": "2.6.9", "encodeurl": "~1.0.2", @@ -10653,7 +11057,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -10661,8 +11064,7 @@ "node_modules/finalhandler/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/find-cache-dir": { "version": "3.3.2", @@ -10763,6 +11165,11 @@ } } }, + "node_modules/finity": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/finity/-/finity-0.5.4.tgz", + "integrity": "sha512-3l+5/1tuw616Lgb0QBimxfdd2TqaDGpfCBpfX6EqtFmqUV3FtQnVEX4Aa62DagYEqnsTIjZcTfbq9msDbXYgyA==" + }, "node_modules/firebase-admin": { "version": "12.1.0", "resolved": "https://registry.npmjs.org/firebase-admin/-/firebase-admin-12.1.0.tgz", @@ -11159,6 +11566,14 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", @@ -11294,7 +11709,6 @@ "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -11367,11 +11781,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functional-red-black-tree": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==" }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/fuzzy": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/fuzzy/-/fuzzy-0.1.3.tgz", @@ -11533,6 +11972,22 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/get-tsconfig": { "version": "4.7.3", "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.3.tgz", @@ -11685,6 +12140,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -12210,6 +12680,14 @@ "node": ">=0.10.0" } }, + "node_modules/has-bigints": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -12255,6 +12733,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-yarn": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz", @@ -12265,10 +12757,9 @@ } }, "node_modules/hasown": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.1.tgz", - "integrity": "sha512-1/th4MHjnwncwXsIW6QMzlvYL9kG5e/CpVvLRZe4XPa8TOUNbCELqmvhDmnkNsAjwaG4+I8gJJL0JBvTTLO9qA==", - "license": "MIT", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dependencies": { "function-bind": "^1.1.2" }, @@ -12708,6 +13199,19 @@ "save-to-github-cache": "bin/save-to-github-cache.js" } }, + "node_modules/internal-slot": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", + "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "dependencies": { + "es-errors": "^1.3.0", + "hasown": "^2.0.0", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/ip-address": { "version": "9.0.5", "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", @@ -12752,12 +13256,53 @@ "integrity": "sha512-UtilS7hLRu++wb/WBAw9bNuP1Eg04Ivn1vERJck8zJthEvXCBEBpGR/33u/xLKWEQf95803oalHrVDptcAvFdQ==", "license": "MIT" }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-array-buffer": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.4.tgz", + "integrity": "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==", + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "license": "MIT" }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -12771,6 +13316,21 @@ "node": ">=8" } }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", @@ -12778,11 +13338,9 @@ "license": "MIT" }, "node_modules/is-callable": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.5.tgz", - "integrity": "sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==", - "dev": true, - "license": "MIT", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "engines": { "node": ">= 0.4" }, @@ -12814,11 +13372,24 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.1.tgz", + "integrity": "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w==", + "dependencies": { + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" @@ -12827,6 +13398,11 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-electron": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-electron/-/is-electron-2.2.2.tgz", + "integrity": "sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==" + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -12895,6 +13471,28 @@ "dev": true, "optional": true }, + "node_modules/is-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.3.tgz", + "integrity": "sha512-1Qed0/Hr2m+YqxnM09CjA2d/i6YZNfF6R2oRAOj36eUdS6qIV/huPJNSEpKbupewFs+ZsJlxsjjPbc0/afW6Lw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-npm": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz", @@ -12915,6 +13513,20 @@ "node": ">=0.12.0" } }, + "node_modules/is-number-object": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-obj": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", @@ -12965,13 +13577,12 @@ "license": "MIT" }, "node_modules/is-regex": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.5.tgz", - "integrity": "sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==", - "dev": true, - "license": "MIT", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", "dependencies": { - "has": "^1.0.3" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -12992,6 +13603,31 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-set": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.3.tgz", + "integrity": "sha512-iPAjerrse27/ygGLxw+EBR9agv9Y6uLeYVJMu+QNCoouJ1/1ri0mGrcWpfCqFZuzzx3WjtwxG098X+n4OuRkPg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-shared-array-buffer": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.3.tgz", + "integrity": "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", @@ -13003,16 +13639,29 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/is-stream-ended": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", - "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" - }, + "node_modules/is-stream-ended": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-stream-ended/-/is-stream-ended-0.1.4.tgz", + "integrity": "sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw==" + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-symbol": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", - "dev": true, "license": "MIT", "dependencies": { "has-symbols": "^1.0.1" @@ -13024,6 +13673,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -13048,6 +13711,17 @@ "integrity": "sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww==", "dev": true }, + "node_modules/is-weakref": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", + "dependencies": { + "call-bind": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-what": { "version": "4.1.16", "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", @@ -13129,6 +13803,26 @@ "url": "https://bevry.me/fund" } }, + "node_modules/iterate-iterator": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.2.tgz", + "integrity": "sha512-t91HubM4ZDQ70M9wqp+pcNpu8OyJ9UAtXntT/Bcsvp5tZMnz9vRa+IunKXeI8AnfZMTv0jNuVEmGeLSMjVvfPw==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "dependencies": { + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/jackspeak": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.1.2.tgz", @@ -14748,7 +15442,6 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -14793,8 +15486,7 @@ "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==", - "dev": true + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" }, "node_modules/merge-stream": { "version": "2.0.0", @@ -14815,7 +15507,6 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -15475,7 +16166,6 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -16243,26 +16933,26 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, "license": "MIT", "engines": { "node": ">= 0.4" } }, "node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "license": "MIT", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/obliterator": { @@ -16286,7 +16976,6 @@ "version": "2.4.1", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, "dependencies": { "ee-first": "1.1.1" }, @@ -16571,6 +17260,38 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", + "dependencies": { + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-queue/node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==" + }, + "node_modules/p-retry": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz", + "integrity": "sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ==", + "dependencies": { + "@types/retry": "0.12.0", + "retry": "^0.13.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/p-throttle": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/p-throttle/-/p-throttle-5.1.0.tgz", @@ -16583,6 +17304,17 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/p-try": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", @@ -16726,7 +17458,6 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, "engines": { "node": ">= 0.8" } @@ -17225,6 +17956,14 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/please-upgrade-node": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/please-upgrade-node/-/please-upgrade-node-3.2.0.tgz", + "integrity": "sha512-gQR3WpIgNIKwBMVLkpMUeR3e1/E1y42bqDQZfql+kDeXd8COYfM8PQA4X6y7a8u9Ua9FHmsrrmirW2vHs45hWg==", + "dependencies": { + "semver-compare": "^1.0.0" + } + }, "node_modules/pluralize": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", @@ -17278,6 +18017,14 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/postgres-array": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/postgres-array/-/postgres-array-3.0.2.tgz", @@ -17453,6 +18200,25 @@ "node": ">= 4" } }, + "node_modules/promise.allsettled": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.7.tgz", + "integrity": "sha512-hezvKvQQmsFkOdrZfYxUxkyxl8mgFQeT259Ajj9PXdbg9VzBCWrItOev72JyWxkCD5VSSqAeHmlN3tWx4DlmsA==", + "dependencies": { + "array.prototype.map": "^1.0.5", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1", + "iterate-value": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/prompts": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", @@ -17847,7 +18613,6 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, "engines": { "node": ">= 0.6" } @@ -18072,6 +18837,23 @@ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", "license": "MIT" }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz", + "integrity": "sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==", + "dependencies": { + "call-bind": "^1.0.6", + "define-properties": "^1.2.1", + "es-errors": "^1.3.0", + "set-function-name": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/registry-auth-token": { "version": "5.0.2", "resolved": "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-5.0.2.tgz", @@ -18397,6 +19179,28 @@ "tslib": "^2.1.0" } }, + "node_modules/safe-array-concat": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.2.tgz", + "integrity": "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q==", + "dependencies": { + "call-bind": "^1.0.7", + "get-intrinsic": "^1.2.4", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -18417,6 +19221,22 @@ ], "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.3.tgz", + "integrity": "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-regex": "^1.1.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-regex2": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-2.0.0.tgz", @@ -18655,6 +19475,11 @@ "semver": "bin/semver" } }, + "node_modules/semver-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", + "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==" + }, "node_modules/semver-diff": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz", @@ -18725,7 +19550,6 @@ "version": "0.18.0", "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, "dependencies": { "debug": "2.6.9", "depd": "2.0.0", @@ -18749,7 +19573,6 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, "dependencies": { "ms": "2.0.0" } @@ -18757,14 +19580,12 @@ "node_modules/send/node_modules/debug/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" }, "node_modules/send/node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, "bin": { "mime": "cli.js" }, @@ -18775,8 +19596,7 @@ "node_modules/send/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==", - "dev": true + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, "node_modules/serialize-javascript": { "version": "6.0.0", @@ -18798,7 +19618,6 @@ "version": "1.15.0", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, "dependencies": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", @@ -18832,6 +19651,20 @@ "node": ">= 0.4" } }, + "node_modules/set-function-name": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.2.tgz", + "integrity": "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==", + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "functions-have-names": "^1.2.3", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/setprototypeof": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", @@ -19295,6 +20128,17 @@ "node": ">= 0.8" } }, + "node_modules/stop-iteration-iterator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz", + "integrity": "sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ==", + "dependencies": { + "internal-slot": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/stream-chain": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/stream-chain/-/stream-chain-2.2.5.tgz", @@ -19419,15 +20263,15 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/string.prototype.trimleft": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz", - "integrity": "sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==", - "dev": true, - "license": "MIT", + "node_modules/string.prototype.trim": { + "version": "1.2.9", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", + "integrity": "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw==", "dependencies": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.0", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -19436,15 +20280,27 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/string.prototype.trimright": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz", - "integrity": "sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==", - "dev": true, - "license": "MIT", + "node_modules/string.prototype.trimend": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.8.tgz", + "integrity": "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ==", "dependencies": { - "define-properties": "^1.1.3", - "function-bind": "^1.1.1" + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -20411,6 +21267,14 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", "license": "0BSD" }, + "node_modules/tsscmp": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", + "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", + "engines": { + "node": ">=0.6.x" + } + }, "node_modules/tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -20476,7 +21340,6 @@ "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dev": true, "dependencies": { "media-typer": "0.3.0", "mime-types": "~2.1.24" @@ -20485,6 +21348,75 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.2.tgz", + "integrity": "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.6.tgz", + "integrity": "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g==", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -20517,6 +21449,20 @@ "integrity": "sha512-qz3o9CHXmJJPGBdqzab7qAYuW8kQGKNEuoHFYrBwV6hWIMcpAmxDLXojcHfFr9US1Pe6zUswEIJIbLI610fuqA==", "license": "ISC" }, + "node_modules/unbox-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", + "dependencies": { + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/unbzip2-stream": { "version": "1.4.3", "resolved": "https://registry.npmjs.org/unbzip2-stream/-/unbzip2-stream-1.4.3.tgz", @@ -20774,7 +21720,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, "engines": { "node": ">= 0.4.0" } @@ -20992,6 +21937,39 @@ "which": "bin/which" } }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/widest-line": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", diff --git a/package.json b/package.json index a097a086..c8dd232b 100644 --- a/package.json +++ b/package.json @@ -15,9 +15,10 @@ "gaia": " node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/gaia.ts", "py": " node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/py.ts", "code": " node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/code.ts", + "scrape": " node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/scrape.ts", + "slack": " node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/slack.ts", "swe": " node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/swe.ts", "swebench": "node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/swebench.ts", - "scrape": " node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/scrape.ts", "research": "node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/research.ts", "util": " node --env-file=variables/local.env -r ts-node/register -r tsconfig-paths/register src/cli/util.ts", "build": " tsc", @@ -69,6 +70,7 @@ "@opentelemetry/sdk-trace-base": "^1.23.0", "@opentelemetry/semantic-conventions": "^1.17.1", "@sinclair/typebox": "^0.32.20", + "@slack/bolt": "^3.21.1", "@types/axios": "^0.14.0", "@types/chai": "^4.3.16", "@types/pg": "^8.11.4", diff --git a/src/agent/agentContext.test.ts b/src/agent/agentContext.test.ts index a97e2cd6..327f4442 100644 --- a/src/agent/agentContext.test.ts +++ b/src/agent/agentContext.test.ts @@ -4,7 +4,7 @@ import { LlmFunctions } from '#agent/LlmFunctions'; import { AgentContext, createContext, deserializeAgentContext, serializeContext } from '#agent/agentContext'; import { RunAgentConfig } from '#agent/agentRunner'; import { FileSystem } from '#functions/storage/filesystem'; -import { UtilFunctions } from '#functions/util'; +import { LlmTools } from '#functions/util'; import { GPT4o } from '#llm/models/openai'; import { appContext } from '../app'; import { functionRegistry } from '../functionRegistry'; @@ -24,7 +24,7 @@ describe('agentContext', () => { xhard: GPT4o(), }; // We want to check that the FileSystem gets re-added by the resetFileSystemFunction function - const functions = new LlmFunctions(UtilFunctions, FileSystem); + const functions = new LlmFunctions(LlmTools, FileSystem); const config: RunAgentConfig = { agentName: 'SWE', @@ -32,6 +32,7 @@ describe('agentContext', () => { functions, user: appContext().userService.getSingleUser(), initialPrompt: 'question', + metadata: { 'metadata-key': 'metadata-value' }, }; const agentContext: AgentContext = createContext(config); agentContext.fileSystem.setWorkingDirectory('./workingDir'); @@ -55,7 +56,7 @@ describe('agentContext', () => { expect(serializedToString).to.include('easy'); expect(serializedToString).to.include('medium'); expect(serializedToString).to.include('workingDir'); - expect(serializedToString).to.include('UtilFunctions'); + expect(serializedToString).to.include('LlmTools'); const deserialised = await deserializeAgentContext(serialized); const reserialised = serializeContext(deserialised); diff --git a/src/agent/agentContext.ts b/src/agent/agentContext.ts index 01204ccb..dfb133df 100644 --- a/src/agent/agentContext.ts +++ b/src/agent/agentContext.ts @@ -55,6 +55,17 @@ export type AgentRunningState = | 'child_agents' | 'timeout'; +export type AgentType = 'xml' | 'python' | 'cachingPython'; + +export interface Message { + role: 'user' | 'assistant'; + text: string; +} + +export function isExecuting(agent: AgentContext): boolean { + return agent.state !== 'completed' && agent.state !== 'feedback' && agent.state !== 'hil' && agent.state !== 'error'; +} + /** * The state of an agent. */ @@ -92,10 +103,18 @@ export interface AgentContext { /** Time of the last database write of the state */ lastUpdate: number; + metadata: Record; + + // ChatBot properties ---------------- + + messages: Message[]; + /** Messages sent by users while the agent is still processing the last message */ + pendingMessages: Message[]; + // Autonomous agent specific properties -------------------- /** The type of autonomous agent function calling.*/ - type: 'xml' | 'python'; + type: AgentType; /** The number of completed iterations of the agent control loop */ iterations: number; /** The function calls the agent is about to call (xml only) */ @@ -176,6 +195,7 @@ export function createContext(config: RunAgentConfig): AgentContext { agentId: config.resumeAgentId || randomUUID(), executionId: randomUUID(), traceId: '', + metadata: config.metadata ?? {}, name: config.agentName, type: config.type ?? 'python', user: config.user ?? currentUser(), @@ -184,6 +204,8 @@ export function createContext(config: RunAgentConfig): AgentContext { state: 'agent', iterations: 0, functionCallHistory: [], + messages: [], + pendingMessages: [], callStack: [], notes: [], hilBudget, @@ -223,7 +245,7 @@ export function serializeContext(context: AgentContext): Record { serialized[key] = context[key].toJSON(); } // Handle Maps (must only contain primitive/simple object values) - else if (key === 'memory') { + else if (key === 'memory' || key === 'metadata') { serialized[key] = context[key]; } else if (key === 'llms') { serialized[key] = { @@ -259,6 +281,7 @@ export async function deserializeAgentContext(serialized: Record): resetFileSystemFunction(context as AgentContext); // TODO add a test for this context.memory = serialized.memory; + context.metadata = serialized.metadata; context.llms = deserializeLLMs(serialized.llms); const user = currentUser(); diff --git a/src/agent/agentRunner.ts b/src/agent/agentRunner.ts index 7228a3a0..a089d367 100644 --- a/src/agent/agentRunner.ts +++ b/src/agent/agentRunner.ts @@ -1,7 +1,7 @@ -import { Agent } from 'node:http'; import { LlmFunctions } from '#agent/LlmFunctions'; -import { AgentContext, AgentLLMs, createContext, llms } from '#agent/agentContext'; +import { AgentContext, AgentLLMs, AgentType, createContext, llms } from '#agent/agentContext'; import { AGENT_REQUEST_FEEDBACK } from '#agent/agentFunctions'; +import { runCachingPythonAgent } from '#agent/cachingPythonAgentRunner'; import { runPythonAgent } from '#agent/pythonAgentRunner'; import { runXmlAgent } from '#agent/xmlAgentRunner'; import { FUNC_SEP } from '#functionSchema/functions'; @@ -25,7 +25,7 @@ export interface RunAgentConfig { /** The name of this agent */ agentName: string; /** The type of autonomous agent function calling. Defaults to python/dynamic */ - type?: 'xml' | 'python'; + type?: AgentType; /** The function classes the agent has available to call */ functions: LlmFunctions | Array any>; /** The user prompt */ @@ -40,6 +40,8 @@ export interface RunAgentConfig { resumeAgentId?: string; /** The base path of the context FileSystem. Defaults to the process working directory */ fileSystemPath?: string; + /** Additional details for the agent */ + metadata?: Record; } /** @@ -64,6 +66,9 @@ async function runAgent(agent: AgentContext): Promise { case 'python': execution = await runPythonAgent(agent); break; + case 'cachingPython': + execution = await runCachingPythonAgent(agent); + break; default: throw new Error(`Invalid agent type ${agent.type}`); } diff --git a/src/agent/humanInTheLoop.ts b/src/agent/humanInTheLoop.ts index 0a21bbaa..76934e87 100644 --- a/src/agent/humanInTheLoop.ts +++ b/src/agent/humanInTheLoop.ts @@ -1,6 +1,6 @@ import readline from 'readline'; import { AgentContext } from '#agent/agentContext'; -import { Slack } from '#functions/slack'; +import { Slack } from '#modules/slack/slack'; import { logger } from '#o11y/logger'; /** * Adding a human in the loop, so it doesn't consume all of your budget diff --git a/src/agent/python-agent-system-prompt b/src/agent/python-agent-system-prompt index ebf51154..3e831092 100644 --- a/src/agent/python-agent-system-prompt +++ b/src/agent/python-agent-system-prompt @@ -133,6 +133,7 @@ As you progress through the task, you may need to: 3. Manage memory: Call Agent_addMemory to store key information (e.g., identifiers, summaries) required for future steps or function calls. Call Agent_deleteMemory to delete entries no longer required for future steps or completing the user request. + Complex analysis of data can be performed in subsequent iterations if necessary. 4. Seek clarification: Call Agent_requestFeedback when facing uncertainty or needing additional information to proceed. @@ -140,7 +141,7 @@ As you progress through the task, you may need to: ## Important Considerations - Information retention: After updating the plan, you won't have access to complete function results, so include all necessary information in the plan or memory. - Continuous application of reasoning: Apply relevant reasoning techniques at each step of the process. - +- Step-by-step processing: Avoid trying to complete complex tasks in a single step. Instead, focus on retrieving necessary data and returning it for further analysis in subsequent steps. # Example request/response @@ -271,6 +272,7 @@ Provide a concise details of the most probable next steps of the plan (i.e. func Then applying logic reasoning, taking into account all of the provided context, explain which are the most appropriate choice(s). List the possible functions from the section which are relevant to complete the next step, along with the parameter descriptions. Select the function(s) to best complete the next step. You may call more than one function. Call the Agent.requestFeedback if more details/decisions are required, or Agent.completed if the request is complete. +Otherwise return any values to analyse further. --> @@ -290,8 +292,9 @@ Select the function(s) to best complete the next step. You may call more than on # When calling Agent_completed or Agent_requestFeedback you must directly return its result. (Ensure any required information has already been stored to memory) # This script may be running on repositories where the source code files are TypeScript, Java, Terraform, PHP, C#, C++, Ruby etc. Do not assume Python files. # The files projectInfo.json and CONVENTIONS.md may possibly exists to tell you more about a code project. -# You can directly analyze contents in memory. If you need to analyze unstructured data you can return it to view in the next step. +# You can directly analyze contents in memory. If you need to analyze unstructured data then include it to a return Dict value to view in the next step. # All maths must be done in Python code +# Do NOT assume anything about the structure of the results from functions. Return values that require further analysis # Example: # Check if the desired content is in memory from a previous step. Result: (None found/Found ...) # Get the two lists asked for in the next step details @@ -301,9 +304,7 @@ print("list1.length " + len(list1)) # list1 is unchanged so do not re-save to memory result2: List[str] = await FunctionClass2_returnStringList() print("result2.length " + len(result2)) -# The user task wanted the combined list of both values -# We have the information so we can now complete the task with it -note: str = "The combined results are: " + json.dumps(result1 + list1) -return await Agent_complete(note) +# Do not assume the structure/styles values, return the values for further analysis +return { list1: list1, list2: list2} diff --git a/src/agent/pythonAgentRunner.test.ts b/src/agent/pythonAgentRunner.test.ts index 7a9f18b8..87384a83 100644 --- a/src/agent/pythonAgentRunner.test.ts +++ b/src/agent/pythonAgentRunner.test.ts @@ -12,7 +12,7 @@ import { startAgent, startAgentAndWait, } from '#agent/agentRunner'; -import { PY_AGENT_SPAN, convertTypeScriptToPython } from '#agent/pythonAgentRunner'; +import { convertTypeScriptToPython } from '#agent/pythonAgentUtils'; import { TEST_FUNC_NOOP, TEST_FUNC_SKY_COLOUR, TEST_FUNC_SUM, TEST_FUNC_THROW_ERROR, THROW_ERROR_TEXT, TestFunctions } from '#functions/testFunctions'; import { MockLLM, mockLLM, mockLLMs } from '#llm/models/mock-llm'; import { logger } from '#o11y/logger'; diff --git a/src/agent/pythonAgentRunner.ts b/src/agent/pythonAgentRunner.ts index 8fe73b72..f6b06f60 100644 --- a/src/agent/pythonAgentRunner.ts +++ b/src/agent/pythonAgentRunner.ts @@ -5,6 +5,7 @@ import { AGENT_COMPLETED_NAME, AGENT_REQUEST_FEEDBACK, AGENT_SAVE_MEMORY_CONTENT import { buildFunctionCallHistoryPrompt, buildMemoryPrompt, buildToolStatePrompt, updateFunctionSchemas } from '#agent/agentPromptUtils'; import { AgentExecution, formatFunctionError, formatFunctionResult, notificationMessage } from '#agent/agentRunner'; import { agentHumanInTheLoop, notifySupervisor } from '#agent/humanInTheLoop'; +import { convertJsonToPythonDeclaration, extractPythonCode } from '#agent/pythonAgentUtils'; import { getServiceName } from '#fastify/trace-init/trace-init'; import { FUNC_SEP, FunctionParameter, FunctionSchema, getAllFunctionSchemas } from '#functionSchema/functions'; import { logger } from '#o11y/logger'; @@ -183,16 +184,16 @@ export async function runPythonAgent(agent: AgentContext): Promise llmPythonCode.includes(`${pkg}.`)) .map((pkg) => `import ${pkg}\n`) .join(); - + logger.info(`Allowed imports: ${pythonScript}`); pythonScript += ` -from typing import List, Dict, Tuple, Optional, Union +from typing import Any, List, Dict, Tuple, Optional, Union async def main(): ${llmPythonCode @@ -289,73 +290,3 @@ str(await main())`.trim(); }); return { agentId: agent.agentId, execution }; } - -/** - * Converts the JSON function schemas to Python function declarations with docString - * @param jsonDefinitions The JSON object containing function schemas - * @returns A string containing the functions - */ -function convertJsonToPythonDeclaration(jsonDefinitions: FunctionSchema[]): string { - let functions = ''; - - for (const def of jsonDefinitions) { - functions += ` -fun ${def.name}(${def.parameters.map((p) => `${p.name}: ${p.optional ? `Optional[${type(p)}]` : type(p)}`).join(', ')}) -> ${ - def.returnType ? convertTypeScriptToPython(def.returnType) : 'None' - } - """ - ${def.description} - - Args: - ${def.parameters.map((p) => `${p.name}: ${p.description}`).join('\n ')} - ${def.returns ? `Returns:\n ${def.returns}\n """` : '"""'} - `; - } - functions += '\n'; - // arg and return typings. Shouldn't need to duplicate in the docstring - // (${p.optional ? `Optional[${type(p)}]` : type(p)}): - // ${def.returnType}: - return functions; -} - -export function convertTypeScriptToPython(tsType: string): string { - const typeMappings: { [key: string]: string } = { - string: 'str', - number: 'float', - boolean: 'bool', - any: 'Any', - void: 'None', - undefined: 'None', - null: 'None', - // Include generics mapping as well - 'Array<': 'List<', - }; - - let pyType = tsType; - - for (const [tsType, pyTypeEquivalent] of Object.entries(typeMappings)) { - const regex = new RegExp(`\\b${tsType}\\b`, 'g'); // Boundary to match whole words - pyType = pyType.replace(regex, pyTypeEquivalent); - } - return pyType; -} - -function type(param: FunctionParameter): string { - return convertTypeScriptToPython(param.type); -} - -/** - * Extracts the text within tags - * @param llmResponse response from the LLM - */ -export function extractPythonCode(llmResponse: string): string { - const index = llmResponse.lastIndexOf(''); - if (index < 0) throw new Error('Could not find in response'); - const resultText = llmResponse.slice(index); - const regexXml = /(.*)<\/python-code>/is; - const matchXml = regexXml.exec(resultText); - - if (!matchXml) throw new Error(`Could not find in the response \n${resultText}`); - - return matchXml[1].trim(); -} diff --git a/src/agent/pythonAgentUtils.ts b/src/agent/pythonAgentUtils.ts new file mode 100644 index 00000000..7937d2c2 --- /dev/null +++ b/src/agent/pythonAgentUtils.ts @@ -0,0 +1,71 @@ +import { FunctionParameter, FunctionSchema } from '#functionSchema/functions'; + +/** + * Converts the JSON function schemas to Python function declarations with docString + * @param jsonDefinitions The JSON object containing function schemas + * @returns A string containing the functions + */ +export function convertJsonToPythonDeclaration(jsonDefinitions: FunctionSchema[]): string { + let functions = ''; + + for (const def of jsonDefinitions) { + functions += ` +fun ${def.name}(${def.parameters.map((p) => `${p.name}: ${p.optional ? `Optional[${pythonType(p)}]` : pythonType(p)}`).join(', ')}) -> ${ + def.returnType ? convertTypeScriptToPython(def.returnType) : 'None' + } + """ + ${def.description} + + Args: + ${def.parameters.map((p) => `${p.name}: ${p.description}`).join('\n ')} + ${def.returns ? `Returns:\n ${def.returns}\n """` : '"""'} + `; + } + functions += '\n'; + // arg and return typings. Shouldn't need to duplicate in the docstring + // (${p.optional ? `Optional[${type(p)}]` : type(p)}): + // ${def.returnType}: + return functions; +} + +export function convertTypeScriptToPython(tsType: string): string { + const typeMappings: { [key: string]: string } = { + string: 'str', + number: 'float', + boolean: 'bool', + any: 'Any', + void: 'None', + undefined: 'None', + null: 'None', + // Include generics mapping as well + 'Array<': 'List<', + }; + + let pyType = tsType; + + for (const [tsType, pyTypeEquivalent] of Object.entries(typeMappings)) { + const regex = new RegExp(`\\b${tsType}\\b`, 'g'); // Boundary to match whole words + pyType = pyType.replace(regex, pyTypeEquivalent); + } + return pyType; +} + +export function pythonType(param: FunctionParameter): string { + return convertTypeScriptToPython(param.type); +} + +/** + * Extracts the text within tags + * @param llmResponse response from the LLM + */ +export function extractPythonCode(llmResponse: string): string { + const index = llmResponse.lastIndexOf(''); + if (index < 0) throw new Error('Could not find in response'); + const resultText = llmResponse.slice(index); + const regexXml = /(.*)<\/python-code>/is; + const matchXml = regexXml.exec(resultText); + + if (!matchXml) throw new Error(`Could not find in the response \n${resultText}`); + + return matchXml[1].trim(); +} diff --git a/src/chat/DOCS.md b/src/chat/DOCS.md new file mode 100644 index 00000000..e53645c8 --- /dev/null +++ b/src/chat/DOCS.md @@ -0,0 +1,3 @@ +# Chat + +Chat is for simple request/response chats as on clade.ai, chat.openai.com and gemini.google.com/app \ No newline at end of file diff --git a/src/chatBot/DOCS.md b/src/chatBot/DOCS.md new file mode 100644 index 00000000..ab28b4b5 --- /dev/null +++ b/src/chatBot/DOCS.md @@ -0,0 +1,4 @@ +# ChatBots + +ChatBots are agents with tools which respond to a chat thread that might be on a 3rd party platform like Slack, WhatsApp etc or the +basic chat in this platform. \ No newline at end of file diff --git a/src/chatBot/chatBotService.ts b/src/chatBot/chatBotService.ts new file mode 100644 index 00000000..975cea75 --- /dev/null +++ b/src/chatBot/chatBotService.ts @@ -0,0 +1,5 @@ +import { AgentContext, AgentRunningState } from '#agent/agentContext'; + +export interface ChatBotService { + sendMessage(agent: AgentContext, message: string): Promise; +} diff --git a/src/cli/cli.ts b/src/cli/cli.ts index afab958a..e5ec3e24 100644 --- a/src/cli/cli.ts +++ b/src/cli/cli.ts @@ -13,7 +13,7 @@ export function parseProcessArgs(): CliOptions { const scriptPath = process.argv[1]; let scriptName = scriptPath.split(path.sep).at(-1); scriptName = scriptName.substring(0, scriptName.length - 3); - return parseUserCliArgs(scriptName, process.argv.toSpliced(2)); + return parseUserCliArgs(scriptName, process.argv.splice(2)); } export function parseUserCliArgs(scriptName: string, args: string[]): CliOptions { @@ -28,11 +28,15 @@ export function parseUserCliArgs(scriptName: string, args: string[]): CliOptions } let initialPrompt = args.slice(i).join(' '); + logger.info(initialPrompt); + // If not prompt provided then load from file if (!initialPrompt.trim()) { if (existsSync(`src/cli/${scriptName}-in`)) initialPrompt = readFileSync(`src/cli/${scriptName}-in`, 'utf-8'); } + logger.info(initialPrompt); + const resumeAgentId = resumeLastRun ? getLastRunAgentId(scriptName) : undefined; return { scriptName, resumeAgentId, initialPrompt }; diff --git a/src/cli/gaia.ts b/src/cli/gaia.ts index c9e8fbcd..6050eac9 100644 --- a/src/cli/gaia.ts +++ b/src/cli/gaia.ts @@ -5,7 +5,7 @@ import { AgentLLMs } from '#agent/agentContext'; import { AGENT_COMPLETED_PARAM_NAME } from '#agent/agentFunctions'; import { startAgent, startAgentAndWait } from '#agent/agentRunner'; import { FileSystem } from '#functions/storage/filesystem'; -import { UtilFunctions } from '#functions/util'; +import { LlmTools } from '#functions/util'; import { Perplexity } from '#functions/web/perplexity'; import { PublicWeb } from '#functions/web/web'; import { LlmCall } from '#llm/llmCallService/llmCall'; @@ -101,7 +101,7 @@ async function answerGaiaQuestion(task: GaiaQuestion): Promise { budget, count: 100, }, - functions: [PublicWeb, Perplexity, FileSystem, UtilFunctions], + functions: [PublicWeb, Perplexity, FileSystem, LlmTools], }); const agent = await appContext().agentStateService.load(agentId); @@ -138,7 +138,7 @@ async function main() { llms = ClaudeLLMs(); } - const args = process.argv.toSpliced(2); + const args = process.argv.splice(2); const questions = JSON.parse(readFileSync(tasksFile).toString()) as GaiaQuestion[]; if (args.length === 0) { logger.info('Running entire Gaia benchmark...'); diff --git a/src/cli/slack.ts b/src/cli/slack.ts new file mode 100644 index 00000000..ee707335 --- /dev/null +++ b/src/cli/slack.ts @@ -0,0 +1,16 @@ +import { ClaudeLLMs } from '#llm/models/anthropic'; +import { ClaudeVertexLLMs } from '#llm/models/anthropic-vertex'; +import { SlackChatBotService } from '#modules/slack/slackChatBotService'; +import { sleep } from '#utils/async-utils'; +import { initFirestoreApplicationContext } from '../app'; + +async function main() { + if (process.env.GCLOUD_PROJECT) { + await initFirestoreApplicationContext(); + } + const chatbot = new SlackChatBotService(); + await chatbot.initSlack(); + await sleep(60000); +} + +main().then(() => console.log('done'), console.error); diff --git a/src/cli/swebench.ts b/src/cli/swebench.ts index 8a2cc97f..14dbd488 100644 --- a/src/cli/swebench.ts +++ b/src/cli/swebench.ts @@ -8,7 +8,7 @@ import { runAgentWorkflow } from '#agent/agentWorkflowRunner'; import { shutdownTrace } from '#fastify/trace-init/trace-init'; import { GitLab } from '#functions/scm/gitlab'; import { FileSystem } from '#functions/storage/filesystem'; -import { UtilFunctions } from '#functions/util'; +import { LlmTools } from '#functions/util'; import { Perplexity } from '#functions/web/perplexity'; import { PublicWeb } from '#functions/web/web'; import { LlmCall } from '#llm/llmCallService/llmCall'; diff --git a/src/cli/util.ts b/src/cli/util.ts index 5079486c..d297720e 100644 --- a/src/cli/util.ts +++ b/src/cli/util.ts @@ -4,7 +4,7 @@ import { LlmFunctions } from '#agent/LlmFunctions'; import { AgentContext, AgentLLMs, agentContextStorage, createContext, getFileSystem, llms } from '#agent/agentContext'; import { Jira } from '#functions/jira'; import { GitLab } from '#functions/scm/gitlab'; -import { Slack } from '#functions/slack'; + import { FileSystem } from '#functions/storage/filesystem'; import { Claude3_Opus, ClaudeLLMs } from '#llm/models/anthropic'; import { Claude3_5_Sonnet_Vertex, Claude3_Haiku_Vertex, Claude3_Sonnet_Vertex, ClaudeVertexLLMs } from '#llm/models/anthropic-vertex'; diff --git a/src/functionRegistry.ts b/src/functionRegistry.ts index c55df08f..38d00b84 100644 --- a/src/functionRegistry.ts +++ b/src/functionRegistry.ts @@ -3,12 +3,12 @@ import { ImageGen } from '#functions/image'; import { Jira } from '#functions/jira'; import { GitHub } from '#functions/scm/github'; import { GitLab } from '#functions/scm/gitlab'; -import { Slack } from '#functions/slack'; import { FileSystem } from '#functions/storage/filesystem'; import { LocalFileStore } from '#functions/storage/localFileStore'; -import { UtilFunctions } from '#functions/util'; +import { LlmTools } from '#functions/util'; import { Perplexity } from '#functions/web/perplexity'; import { PublicWeb } from '#functions/web/web'; +import { Slack } from '#modules/slack/slack'; import { CodeEditingAgent } from '#swe/codeEditingAgent'; import { SoftwareDeveloperAgent } from '#swe/softwareDeveloperAgent'; @@ -28,7 +28,7 @@ export function functionRegistry(): Array any> { Perplexity, Slack, SoftwareDeveloperAgent, - UtilFunctions, + LlmTools, ImageGen, PublicWeb, // Add your own classes below this line diff --git a/src/functions/scm/gitlab.ts b/src/functions/scm/gitlab.ts index 8e3b0bbb..d99a3b39 100644 --- a/src/functions/scm/gitlab.ts +++ b/src/functions/scm/gitlab.ts @@ -20,7 +20,7 @@ import { envVar } from '#utils/env-var'; import { execCommand, failOnError, shellEscape } from '#utils/exec'; import { appContext } from '../../app'; import { cacheRetry } from '../../cache/cacheRetry'; -import { UtilFunctions } from '../util'; +import { LlmTools } from '../util'; import { GitProject } from './gitProject'; import { SourceControlManagement } from './sourceControlManagement'; @@ -115,7 +115,7 @@ export class GitLab implements SourceControlManagement { /** * @returns the details of all the projects available (name, description, git URL etc) */ - // @cacheRetry({ scope: 'global' }) + @func() async getProjects(): Promise { const resultProjects: GitProject[] = []; for (const group of this.config().topLevelGroups) { @@ -226,7 +226,7 @@ export class GitLab implements SourceControlManagement { const { exitCode, stdout, stderr } = await execCommand(cmd); if (exitCode > 0) throw new Error(`${stdout}\n${stderr}`); - const url = await new UtilFunctions().processText(stdout, 'Respond only with the URL where the merge request is.'); + const url = await new LlmTools().processText(stdout, 'Respond only with the URL where the merge request is.'); if (URL.canParse(url) && url.includes(this.config().host)) { // TODO add the current user as a reviewer @@ -399,20 +399,20 @@ Response only in JSON format. Do not wrap the JSON in any tags. const project = await this.api().Projects.show(projectPath); const job = await this.api().Jobs.show(project.id, jobId); - console.log('pipeline ---------------------------'); - console.log(job.pipeline); - console.log('commit -----------------------------'); - console.log(job.commit); - console.log('diff -----------------------------'); - const commitDetails: CommitDiffSchema[] = await this.api().Commits.showDiff(projectPath, job.commit.id); - for (const commit of commitDetails) { - console.log(commit.diff); - } - console.log('logs -------------------------------'); - const logs = await this.api().Jobs.showLog(project.id, job.id); + return await this.api().Jobs.showLog(project.id, job.id); + } + + @func() + async getJobCommitDiff(projectPath: string, jobId: string): Promise { + if (!projectPath) throw new Error('Parameter "projectPath" must be truthy'); + if (!jobId) throw new Error('Parameter "jobId" must be truthy'); + + const project = await this.api().Projects.show(projectPath); + const job = await this.api().Jobs.show(project.id, jobId); - return logs; + const commitDetails: CommitDiffSchema[] = await this.api().Commits.showDiff(projectPath, job.commit.id); + return commitDetails.map((commitDiff) => commitDiff.diff).join('\n'); } } diff --git a/src/functions/storage/filesystem.ts b/src/functions/storage/filesystem.ts index 3722a068..a3aee676 100644 --- a/src/functions/storage/filesystem.ts +++ b/src/functions/storage/filesystem.ts @@ -11,7 +11,7 @@ import { func, funcClass } from '#functionSchema/functionDecorators'; import { parseArrayParameterValue } from '#functionSchema/functionUtils'; import { Git } from '#functions/scm/git'; import { VersionControlSystem } from '#functions/scm/versionControlSystem'; -import { UtilFunctions } from '#functions/util'; +import { LlmTools } from '#functions/util'; import { logger } from '#o11y/logger'; import { spawnCommand } from '#utils/exec'; import { CDATA_END, CDATA_START } from '#utils/xml-utils'; @@ -411,7 +411,7 @@ export class FileSystem { @func() async editFileContents(filePath: string, descriptionOfChanges: string): Promise { const contents = await this.readFile(filePath); - const updatedContent = await new UtilFunctions().processText(contents, descriptionOfChanges); + const updatedContent = await new LlmTools().processText(contents, descriptionOfChanges); await this.writeFile(filePath, updatedContent); } diff --git a/src/functions/toolType.ts b/src/functions/toolType.ts index b0edee13..c2a29e2b 100644 --- a/src/functions/toolType.ts +++ b/src/functions/toolType.ts @@ -1,4 +1,8 @@ -export type ToolType = 'filestore' | 'notification' | 'scm'; +export type ToolType = + | 'filestore' // blob store, locally or S3, Cloud Storage etc + | 'notification' // Sends notification the agent supervisor + | 'scm' // Source Control Management, GitHub, GitLab + | 'chat'; // For a chatbot to reply to a conversation /** * @param object function class instance diff --git a/src/functions/util.ts b/src/functions/util.ts index 8d49805a..77bea155 100644 --- a/src/functions/util.ts +++ b/src/functions/util.ts @@ -2,9 +2,9 @@ import { llms } from '#agent/agentContext'; import { func, funcClass } from '#functionSchema/functionDecorators'; @funcClass(__filename) -export class UtilFunctions { +export class LlmTools { /** - * Uses a large language model to make changes to the input content by applying the provided natural language instruction + * Uses a large language model to transform the input content by applying the provided natural language instruction * @param text the input text * @param descriptionOfChanges a description of the changes/processing to apply to the text * @returns the processed text diff --git a/src/llm/llm.ts b/src/llm/llm.ts index dd471b9e..1f2c5673 100644 --- a/src/llm/llm.ts +++ b/src/llm/llm.ts @@ -70,7 +70,7 @@ export function assistant(text: string): LlmMessage { } export interface LLM { - generateText2(messages: LlmMessage[]): Promise; + generateText2(messages: LlmMessage[], opts?: GenerateTextOptions): Promise; /* Generates a response that is expected to be in JSON format, and returns the object */ generateJson2(messages: LlmMessage[], opts?: GenerateJsonOptions): Promise; diff --git a/src/llm/llmCallService/llmCall.ts b/src/llm/llmCallService/llmCall.ts index 358acae5..6ead875d 100644 --- a/src/llm/llmCallService/llmCall.ts +++ b/src/llm/llmCallService/llmCall.ts @@ -1,3 +1,4 @@ +import { LlmMessage } from '#llm/llm'; import { CallerId } from '#llm/llmCallService/llmCallService'; export interface LlmRequest { @@ -5,8 +6,12 @@ export interface LlmRequest { id: string; /** From the GenerateTextOptions.id field */ description?: string; + /** Legacy simple prompting */ systemPrompt?: string; + /** Legacy simple prompting */ userPrompt: string; + + messages?: LlmMessage[]; /** Populated when called by an agent */ agentId?: string; /** Populated when called by a user through the UI */ @@ -29,6 +34,10 @@ export interface LlmCall extends LlmRequest { cost?: number; inputTokens?: number; outputTokens?: number; + /** Anthropic context cache stats */ + cacheCreationInputTokens?: number; + /** Anthropic context cache stats */ + cacheReadInputTokens?: number; } export type CreateLlmRequest = Omit; diff --git a/src/llm/models/anthropic-vertex.ts b/src/llm/models/anthropic-vertex.ts index 97acdcfc..cc002c2e 100644 --- a/src/llm/models/anthropic-vertex.ts +++ b/src/llm/models/anthropic-vertex.ts @@ -215,7 +215,7 @@ class AnthropicVertexLLM extends BaseLLM { @cacheRetry({ backOffMs: 5000 }) // @logTextGeneration async generateText2(messages: LlmMessage[], opts?: GenerateTextOptions): Promise { - return await withActiveSpan(`generateText ${opts?.id ?? ''}`, async (span) => { + return await withActiveSpan(`generateText2 ${opts?.id ?? ''}`, async (span) => { const maxOutputTokens = 4096; let systemPrompt: string | undefined; diff --git a/src/functions/slack.ts b/src/modules/slack/slack.ts similarity index 100% rename from src/functions/slack.ts rename to src/modules/slack/slack.ts diff --git a/src/modules/slack/slackChatBotService.ts b/src/modules/slack/slackChatBotService.ts new file mode 100644 index 00000000..13dd21ce --- /dev/null +++ b/src/modules/slack/slackChatBotService.ts @@ -0,0 +1,167 @@ +import { App, SayFn } from '@slack/bolt'; +import { StringIndexed } from '@slack/bolt/dist/types/helpers'; +import { LlmFunctions } from '#agent/LlmFunctions'; +import { AgentContext, AgentRunningState, isExecuting } from '#agent/agentContext'; +import { AGENT_COMPLETED_PARAM_NAME, REQUEST_FEEDBACK_PARAM_NAME } from '#agent/agentFunctions'; +import { resumeCompleted, startAgent } from '#agent/agentRunner'; +import { GoogleCloud } from '#functions/cloud/google-cloud'; +import { GitLab } from '#functions/scm/gitlab'; +import { LlmTools } from '#functions/util'; +import { Perplexity } from '#functions/web/perplexity'; +import { ClaudeVertexLLMs } from '#llm/models/anthropic-vertex'; +import { logger } from '#o11y/logger'; +import { sleep } from '#utils/async-utils'; +import { appContext } from '../../app'; +import { ChatBotService } from '../../chatBot/chatBotService'; + +let slackApp: App | undefined; +/** + * Slack implementation of ChatBotService + */ +export class SlackChatBotService implements ChatBotService { + /** + * Sends a message to the chat thread the agent is a chatbot for. + * @param agent + * @param message + */ + async sendMessage(agent: AgentContext, message: string): Promise { + if (!slackApp) { + throw new Error('Slack app is not initialized. Call initSlack() first.'); + } + + const threadId = agent.agentId.replace('Slack-', ''); + + try { + const result = await slackApp.client.chat.postMessage({ + text: message, + thread_ts: threadId, + channel: agent.metadata.channel, + }); + + if (!result.ok) { + throw new Error(`Failed to send message to Slack: ${result.error}`); + } + } catch (error) { + logger.error(error, 'Error sending message to Slack'); + throw error; + } + } + + async initSlack(): Promise { + if (slackApp) return; + + const botToken = process.env.SLACK_BOT_TOKEN; + const signingSecret = process.env.SLACK_SIGNING_SECRET; + const channels = process.env.SLACK_CHANNELS; + const appToken = process.env.SLACK_APP_TOKEN; + + if (!botToken || !signingSecret || !channels) { + logger.error('Slack chatbot requires environment variables SLACK_BOT_TOKEN, SLACK_SIGNING_SECRET and SLACK_CHANNELS'); + } + + // Initializes your app with your bot token and signing secret + slackApp = new App({ + token: botToken, + signingSecret: signingSecret, + socketMode: true, // enable to use socket mode + appToken: appToken, + }); + + const slackChannels = new Set(channels.split(',').map((s) => s.trim())); + + // Listen for messages in channels + slackApp.event('message', async ({ event, say }) => { + // biomejs formatter changes event['property'] to event.property which doesn't compile + const _event: any = event; + console.log('Event received for message'); + logger.info(event); + logger.info('say'); + logger.info(say); + // logger.info(await (say['message'])) + const _say: SayFn = say; + // Check if the message is in the desired channel + if (!slackChannels.has(event.channel)) { + logger.info(`Channel ${event.channel} not configured`); + return; + } + console.log(`Message received in channel: ${_event.text}`); + + const agentService = appContext().agentStateService; + + // If the message is not a reply in a thread, then we will start a new agent to handle the first message in the thread + if (!_event.thread_ts) { + const threadId = event.ts; + logger.info(`New thread ${event.ts}`); + + const text = _event.text; + + try { + const ackResult = await say({ + text: "One moment, I'm analysing your request", + thread_ts: threadId, + channel: event.channel, + }); + if (!ackResult.ok) { + logger.error(ackResult.error, 'Error sending Slack acknowledgement'); + } + } catch (e) { + logger.error(e, 'Error sending Slack acknowledgement'); + } + + try { + const agentExec = await startAgent({ + resumeAgentId: `Slack-${threadId}`, + initialPrompt: text, + llms: ClaudeVertexLLMs(), + functions: [GitLab, GoogleCloud, Perplexity, LlmTools], + agentName: `Slack-${threadId}`, + systemPrompt: 'You are an AI support agent called Sophia. You are responding to support requests on the company Slack account', + metadata: { channel: event.channel }, + }); + await agentExec.execution; + const agent: AgentContext = await appContext().agentStateService.load(agentExec.agentId); + if (agent.state !== 'completed' && agent.state !== 'feedback') { + logger.error(`Agent did not complete. State was ${agent.state}`); + return; + } + + const response = agent.functionCallHistory.at(-1).parameters[agent.state === 'completed' ? AGENT_COMPLETED_PARAM_NAME : REQUEST_FEEDBACK_PARAM_NAME]; + const sayResult = await say({ + text: response, + thread_ts: threadId, + channel: event.channel, + }); + if (!sayResult.ok) { + logger.error(sayResult.error, 'Error replying'); + } + } catch (e) { + logger.error(e, 'Error handling new Slack thread'); + } + } else { + // Otherwise this is a reply to a thread + const agentId = `Slack-${_event.thread_ts}`; + const agent = await agentService.load(agentId); + if (isExecuting(agent)) { + // TODO make this transactional + agent.pendingMessages.push(); + await agentService.save(agent); + return; + } + await resumeCompleted(agentId, agent.executionId, _event.text); + } + // Respond or process the message as needed + }); + + slackApp.event('app_mention', async ({ event, say }) => { + console.log('app_mention received'); + // logger.info(event) + // logger.info(say) + }); + + await slackApp.start(); + + logger.info('Registered event listener'); + + await sleep(300000); + } +} diff --git a/src/sre/README.md b/src/sre/README.md new file mode 100644 index 00000000..6681c9a9 --- /dev/null +++ b/src/sre/README.md @@ -0,0 +1,5 @@ +# SRE + +This folder contains agents and related functionality to perform DevOps/SRE/DevSecOps related work. + +For example analysing build failures, triaging production incidents, etc. diff --git a/src/sre/buildFailureAgent.ts b/src/sre/buildFailureAgent.ts new file mode 100644 index 00000000..6609a589 --- /dev/null +++ b/src/sre/buildFailureAgent.ts @@ -0,0 +1,19 @@ +import { func, funcClass } from '#functionSchema/functionDecorators'; +import { GitLab } from '#functions/scm/gitlab'; + +@funcClass(__filename) +export class BuildFailureAgent { + @func() + async analyseGitLabBuildFailure(buildUrl: string): Promise { + const gitlab: GitLab = new GitLab(); + + // https://gitlab.example.com/group/subgroup/projectName/-/jobs/12345 + const parts = buildUrl.split('/'); + const projectPath = parts.slice(3, parts.indexOf('-')).join('/'); + const jobNumber = parts.at(-1); + const logs = await gitlab.getJobLogs(projectPath, jobNumber); + + // If previous pipelines on the merge request/branch have failed then we need to look at the first failing pipeline diff + const diff = await gitlab.getJobCommitDiff(projectPath, jobNumber); + } +} diff --git a/src/swe/codeEditor.ts b/src/swe/codeEditor.ts index 1250ed97..e619c30a 100644 --- a/src/swe/codeEditor.ts +++ b/src/swe/codeEditor.ts @@ -7,6 +7,7 @@ import { addCost, agentContext, getFileSystem } from '#agent/agentContext'; import { func, funcClass } from '#functionSchema/functionDecorators'; import { LLM } from '#llm/llm'; import { Anthropic, Claude3_5_Sonnet } from '#llm/models/anthropic'; +import { Claude3_5_Sonnet_Vertex } from '#llm/models/anthropic-vertex'; import { DeepseekLLM, deepseekCoder } from '#llm/models/deepseek'; import { GPT4o } from '#llm/models/openai'; import { logger } from '#o11y/logger'; @@ -45,7 +46,12 @@ export class CodeEditor { let llm: LLM; - if (anthropicKey) { + if (process.env.GCLOUD_PROJECT && process.env.GCLOUD_CLAUDE_REGION) { + llm = Claude3_5_Sonnet_Vertex(); + modelArg = `--model vertex_ai/${llm.getModel()}`; + span.setAttribute('model', 'sonnet'); + env = { VERTEXAI_PROJECT: process.env.GCLOUD_PROJECT, VERTEXAI_LOCATION: process.env.GCLOUD_CLAUDE_REGION }; + } else if (anthropicKey) { modelArg = '--sonnet'; env = { ANTHROPIC_API_KEY: anthropicKey }; span.setAttribute('model', 'sonnet'); @@ -62,7 +68,9 @@ export class CodeEditor { span.setAttribute('model', 'openai'); llm = GPT4o(); } else { - throw new Error('Aider code editing requires a key for Anthropic, Deepseek or OpenAI'); + throw new Error( + 'Aider code editing requires either GCLOUD_PROJECT and GCLOUD_CLAUDE_REGION env vars set or else a key for Anthropic, Deepseek or OpenAI', + ); } // User a folder in Nous process directory, not the FileSystem working directory @@ -80,9 +88,10 @@ export class CodeEditor { throw error; } + // Due to limitations in the provider APIs, caching statistics and costs are not available when streaming responses. // --map-tokens=2048 // Use the Python from the Nous .python-version as it will have aider installed - const cmd = `${getPythonPath()} -m aider --no-check-update --yes ${modelArg} --llm-history-file="${llmHistoryFile}" --message-file=${messageFilePath} ${filesToEdit + const cmd = `${getPythonPath()} -m aider --no-check-update --no-stream --yes ${modelArg} --llm-history-file="${llmHistoryFile}" --message-file=${messageFilePath} ${filesToEdit .map((file) => `"${file}"`) .join(' ')}`; diff --git a/src/swe/lang/nodejs/typescriptTools.ts b/src/swe/lang/nodejs/typescriptTools.ts index a4aa15c9..107c8fcf 100644 --- a/src/swe/lang/nodejs/typescriptTools.ts +++ b/src/swe/lang/nodejs/typescriptTools.ts @@ -13,10 +13,11 @@ export class TypescriptTools implements LanguageTools { /** * Runs the command `npm run