From 97e7de63637e1163dd225a90cb146b68a2036493 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 14:57:10 +0000 Subject: [PATCH 01/16] =?UTF-8?q?feat:=20=E2=9E=95=20add=20Anthropic=20AI?= =?UTF-8?q?=20SDK=20dependency?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cli/package.json | 217 +++++++++++++++++---------------- packages/core/src/anthropic.ts | 3 +- 2 files changed, 111 insertions(+), 109 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index d5af483a9e..e51753480a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,110 +1,111 @@ { - "name": "genaiscript", - "version": "1.82.0", - "main": "built/genaiscript.cjs", - "type": "commonjs", - "bin": { - "genaiscript": "built/genaiscript.cjs" - }, - "files": [ - "built/genaiscript.cjs" - ], - "publisher": "Microsoft", - "repository": { - "type": "git", - "url": "git+https://github.com/microsoft/genaiscript.git" - }, - "homepage": "https://microsoft.github.io/genaiscript", - "keywords": [ - "genai", - "ai", - "agentic", - "agent", - "cli", - "prompt", - "llm", - "generative ai", - "gpt4", - "chatgpt", - "ollama", - "llamacpp", - "chatgpt" - ], - "description": "A CLI for GenAIScript, a generative AI scripting framework.", - "license": "MIT", - "dependencies": { - "@azure/identity": "^4.5.0", - "@inquirer/prompts": "^7.1.0", - "@modelcontextprotocol/sdk": "^1.0.3", - "@octokit/plugin-paginate-rest": "^11.3.6", - "@octokit/plugin-retry": "^7.1.2", - "@octokit/plugin-throttling": "^9.3.2", - "@octokit/rest": "^21.0.2", - "dockerode": "^4.0.2", - "gpt-tokenizer": "^2.7.0", - "html-to-text": "^9.0.5", - "jimp": "^1.6.0", - "mammoth": "^1.8.0", - "mathjs": "^14.0.0", - "tabletojson": "^4.1.5", - "tsx": "^4.19.2", - "turndown": "^7.2.0", - "turndown-plugin-gfm": "^1.0.2", - "typescript": "5.7.2", - "vectra": "^0.9.0", - "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz" - }, - "optionalDependencies": { - "@huggingface/transformers": "^3.1.1", - "@lvce-editor/ripgrep": "^1.4.0", - "pdfjs-dist": "4.9.124", - "playwright": "^1.49.0", - "skia-canvas": "^2.0.0", - "tree-sitter-wasms": "^0.1.11", - "web-tree-sitter": "0.22.2" - }, - "engines": { - "node": ">=20.0.0" - }, - "peerDependencies": { - "promptfoo": "0.100.3" - }, - "devDependencies": { - "@types/diff": "^6.0.0", - "@types/dockerode": "^3.3.32", - "@types/fs-extra": "^11.0.4", - "@types/memorystream": "^0.3.4", - "@types/node": "^22.10.1", - "@types/papaparse": "^5.3.15", - "@types/prompts": "^2.4.9", - "@types/replace-ext": "^2.0.2", - "@types/ws": "^8.5.13", - "commander": "^12.1.0", - "diff": "^7.0.0", - "dotenv": "^16.4.7", - "es-toolkit": "^1.29.0", - "esbuild": "^0.24.0", - "execa": "^9.5.1", - "fs-extra": "^11.2.0", - "glob": "^11.0.0", - "memorystream": "^0.3.1", - "node-sarif-builder": "^3.2.0", - "octokit": "^4.0.2", - "openai": "^4.75.0", - "pretty-bytes": "^6.1.1", - "replace-ext": "^2.0.0", - "ws": "^8.18.0", - "zx": "^8.2.4" - }, - "scripts": { - "compile": "esbuild src/main.ts --metafile=./esbuild.meta.json --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo --external:typescript --external:@lvce-editor/ripgrep --external:gpt-3-encoder --external:mammoth --external:xlsx --external:mathjs --external:@azure/identity --external:gpt-tokenizer --external:playwright --external:@inquirer/prompts --external:jimp --external:turndown --external:turndown-plugin-gfm --external:vectra --external:tabletojson --external:html-to-text --external:@octokit/rest --external:@octokit/plugin-throttling --external:@octokit/plugin-retry --external:@octokit/plugin-paginate-rest --external:skia-canvas --external:@huggingface/transformers --external:@modelcontextprotocol/sdk && node ../../scripts/patch-cli.mjs", - "compile-debug": "esbuild src/main.ts --sourcemap --metafile=./esbuild.meta.json --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo --external:typescript --external:@lvce-editor/ripgrep --external:gpt-3-encoder --external:mammoth --external:xlsx --external:mathjs --external:@azure/identity --external:gpt-tokenizer --external:playwright --external:@inquirer/prompts --external:jimp --external:turndown --external:turndown-plugin-gfm --external:vectra --external:tabletojson --external:html-to-text --external:@octokit/rest --external:@octokit/plugin-throttling --external:@octokit/plugin-retry --external:@octokit/plugin-paginate-rest --external:skia-canvas --external:@huggingface/transformers --external:@modelcontextprotocol/sdk", - "postcompile": "node built/genaiscript.cjs info help > ../../docs/src/content/docs/reference/cli/commands.md", - "vis:treemap": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.treemap.html", - "vis:network": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.network.html --template network", - "go": "yarn compile && node built/genaiscript.cjs", - "test": "node --import tsx --test src/**.test.ts", - "typecheck": "tsc -p src", - "lint": "npx --yes publint" - } + "name": "genaiscript", + "version": "1.82.0", + "main": "built/genaiscript.cjs", + "type": "commonjs", + "bin": { + "genaiscript": "built/genaiscript.cjs" + }, + "files": [ + "built/genaiscript.cjs" + ], + "publisher": "Microsoft", + "repository": { + "type": "git", + "url": "git+https://github.com/microsoft/genaiscript.git" + }, + "homepage": "https://microsoft.github.io/genaiscript", + "keywords": [ + "genai", + "ai", + "agentic", + "agent", + "cli", + "prompt", + "llm", + "generative ai", + "gpt4", + "chatgpt", + "ollama", + "llamacpp", + "chatgpt" + ], + "description": "A CLI for GenAIScript, a generative AI scripting framework.", + "license": "MIT", + "dependencies": { + "@anthropic-ai/sdk": "^0.32.1", + "@azure/identity": "^4.5.0", + "@inquirer/prompts": "^7.1.0", + "@modelcontextprotocol/sdk": "^1.0.3", + "@octokit/plugin-paginate-rest": "^11.3.6", + "@octokit/plugin-retry": "^7.1.2", + "@octokit/plugin-throttling": "^9.3.2", + "@octokit/rest": "^21.0.2", + "dockerode": "^4.0.2", + "gpt-tokenizer": "^2.7.0", + "html-to-text": "^9.0.5", + "jimp": "^1.6.0", + "mammoth": "^1.8.0", + "mathjs": "^14.0.0", + "tabletojson": "^4.1.5", + "tsx": "^4.19.2", + "turndown": "^7.2.0", + "turndown-plugin-gfm": "^1.0.2", + "typescript": "5.7.2", + "vectra": "^0.9.0", + "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz" + }, + "optionalDependencies": { + "@huggingface/transformers": "^3.1.1", + "@lvce-editor/ripgrep": "^1.4.0", + "pdfjs-dist": "4.9.124", + "playwright": "^1.49.0", + "skia-canvas": "^2.0.0", + "tree-sitter-wasms": "^0.1.11", + "web-tree-sitter": "0.22.2" + }, + "engines": { + "node": ">=20.0.0" + }, + "peerDependencies": { + "promptfoo": "0.100.3" + }, + "devDependencies": { + "@types/diff": "^6.0.0", + "@types/dockerode": "^3.3.32", + "@types/fs-extra": "^11.0.4", + "@types/memorystream": "^0.3.4", + "@types/node": "^22.10.1", + "@types/papaparse": "^5.3.15", + "@types/prompts": "^2.4.9", + "@types/replace-ext": "^2.0.2", + "@types/ws": "^8.5.13", + "commander": "^12.1.0", + "diff": "^7.0.0", + "dotenv": "^16.4.7", + "es-toolkit": "^1.29.0", + "esbuild": "^0.24.0", + "execa": "^9.5.1", + "fs-extra": "^11.2.0", + "glob": "^11.0.0", + "memorystream": "^0.3.1", + "node-sarif-builder": "^3.2.0", + "octokit": "^4.0.2", + "openai": "^4.75.0", + "pretty-bytes": "^6.1.1", + "replace-ext": "^2.0.0", + "ws": "^8.18.0", + "zx": "^8.2.4" + }, + "scripts": { + "compile": "esbuild src/main.ts --metafile=./esbuild.meta.json --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo --external:typescript --external:@lvce-editor/ripgrep --external:gpt-3-encoder --external:mammoth --external:xlsx --external:mathjs --external:@azure/identity --external:gpt-tokenizer --external:playwright --external:@inquirer/prompts --external:jimp --external:turndown --external:turndown-plugin-gfm --external:vectra --external:tabletojson --external:html-to-text --external:@octokit/rest --external:@octokit/plugin-throttling --external:@octokit/plugin-retry --external:@octokit/plugin-paginate-rest --external:skia-canvas --external:@huggingface/transformers --external:@modelcontextprotocol/sdk --external:@anthropic-ai/sdk && node ../../scripts/patch-cli.mjs", + "compile-debug": "esbuild src/main.ts --sourcemap --metafile=./esbuild.meta.json --bundle --platform=node --target=node20 --outfile=built/genaiscript.cjs --external:tsx --external:esbuild --external:get-tsconfig --external:resolve-pkg-maps --external:dockerode --external:pdfjs-dist --external:web-tree-sitter --external:tree-sitter-wasms --external:promptfoo --external:typescript --external:@lvce-editor/ripgrep --external:gpt-3-encoder --external:mammoth --external:xlsx --external:mathjs --external:@azure/identity --external:gpt-tokenizer --external:playwright --external:@inquirer/prompts --external:jimp --external:turndown --external:turndown-plugin-gfm --external:vectra --external:tabletojson --external:html-to-text --external:@octokit/rest --external:@octokit/plugin-throttling --external:@octokit/plugin-retry --external:@octokit/plugin-paginate-rest --external:skia-canvas --external:@huggingface/transformers --external:@modelcontextprotocol/sdk --external:@anthropic-ai/sdk", + "postcompile": "node built/genaiscript.cjs info help > ../../docs/src/content/docs/reference/cli/commands.md", + "vis:treemap": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.treemap.html", + "vis:network": "npx --yes esbuild-visualizer --metadata esbuild.meta.json --filename esbuild.network.html --template network", + "go": "yarn compile && node built/genaiscript.cjs", + "test": "node --import tsx --test src/**.test.ts", + "typecheck": "tsc -p src", + "lint": "npx --yes publint" + } } diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index d54f0efcb8..405e6e3fd4 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -5,7 +5,7 @@ import { parseModelIdentifier } from "./models" import { NotSupportedError, serializeError } from "./error" import { estimateTokens } from "./tokens" import { resolveTokenEncoder } from "./encoders" -import Anthropic from "@anthropic-ai/sdk" +import type { Anthropic } from "@anthropic-ai/sdk" import { ChatCompletionResponse, @@ -199,6 +199,7 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( const { model } = parseModelIdentifier(req.model) const { encode: encoder } = await resolveTokenEncoder(model) + const Anthropic = (await import("@anthropic-ai/sdk")).default const anthropic = new Anthropic({ baseURL: cfg.base, apiKey: cfg.token, From 31ba6298fde341a0ab9a78dbf97b4ad69ce52df0 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 15:06:18 +0000 Subject: [PATCH 02/16] =?UTF-8?q?feat:=20=F0=9F=94=A7=20update=20deps=20&?= =?UTF-8?q?=20add=20proxy=20support=20for=20HTTP=20agents?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- THIRD_PARTY_LICENSES.md | 282 ++++++++++++++++++++--- docs/yarn.lock | 364 +++++++++++++++-------------- packages/cli/package.json | 4 +- packages/core/package.json | 6 +- packages/core/src/anthropic.ts | 5 +- packages/core/src/fetch.ts | 11 +- packages/core/src/proxy.ts | 14 ++ packages/sample/package.json | 2 +- slides/yarn.lock | 408 +++++++++++++++++---------------- yarn.lock | 305 ++++++++++++------------ 10 files changed, 840 insertions(+), 561 deletions(-) create mode 100644 packages/core/src/proxy.ts diff --git a/THIRD_PARTY_LICENSES.md b/THIRD_PARTY_LICENSES.md index 9d04e3ba9d..e8127059b0 100644 --- a/THIRD_PARTY_LICENSES.md +++ b/THIRD_PARTY_LICENSES.md @@ -188,7 +188,7 @@ Apache License The following npm packages may be included in this product: - - @huggingface/transformers@3.1.1 + - @huggingface/transformers@3.1.2 - flatbuffers@1.12.0 - long@5.2.3 @@ -1943,7 +1943,9 @@ limitations under the License. The following npm packages may be included in this product: - @types/http-cache-semantics@4.0.4 + - @types/node-fetch@2.6.12 - @types/node@16.9.1 + - @types/node@18.19.67 - @types/node@22.10.1 - @types/turndown@5.0.5 - @types/yauzl@2.10.3 @@ -1976,7 +1978,7 @@ MIT License The following npm package may be included in this product: - - genaiscript-vscode@1.80.10 + - genaiscript-vscode@1.82.0 This package contains the following license: @@ -2156,8 +2158,8 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE The following npm packages may be included in this product: - - agent-base@7.1.1 - - https-proxy-agent@7.0.5 + - agent-base@7.1.3 + - https-proxy-agent@7.0.6 These packages each contain the following license: @@ -2346,7 +2348,7 @@ THE SOFTWARE. The following npm package may be included in this product: - - debug@4.3.7 + - debug@4.4.0 This package contains the following license: @@ -4390,19 +4392,19 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The following npm packages may be included in this product: - - @inquirer/checkbox@4.0.2 - - @inquirer/confirm@5.0.2 - - @inquirer/core@10.1.0 - - @inquirer/editor@4.1.0 - - @inquirer/expand@4.0.2 + - @inquirer/checkbox@4.0.3 + - @inquirer/confirm@5.1.0 + - @inquirer/core@10.1.1 + - @inquirer/editor@4.2.0 + - @inquirer/expand@4.0.3 - @inquirer/figures@1.0.8 - - @inquirer/input@4.0.2 - - @inquirer/number@3.0.2 - - @inquirer/password@4.0.2 - - @inquirer/prompts@7.1.0 - - @inquirer/rawlist@4.0.2 - - @inquirer/search@3.0.2 - - @inquirer/select@4.0.2 + - @inquirer/input@4.1.0 + - @inquirer/number@3.0.3 + - @inquirer/password@4.0.3 + - @inquirer/prompts@7.2.0 + - @inquirer/rawlist@4.0.3 + - @inquirer/search@3.0.3 + - @inquirer/select@4.0.3 - @inquirer/type@3.0.1 These packages each contain the following license: @@ -4811,6 +4813,22 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI ----------- +The following npm package may be included in this product: + + - @anthropic-ai/sdk@0.32.1 + +This package contains the following license: + +Copyright 2023 Anthropic, PBC. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----------- + The following npm package may be included in this product: - mkdirp@1.0.4 @@ -5825,22 +5843,24 @@ The following npm packages may be included in this product: - @tokenizer/token@0.3.0 - agent-base@6.0.2 - eastasianwidth@0.2.0 - - genaiscript-core-internal@1.80.10 - - genaiscript-sample@1.80.10 - - genaiscript@1.80.10 + - genaiscript-core-internal@1.82.0 + - genaiscript-sample@1.82.0 + - genaiscript@1.82.0 - https-proxy-agent@5.0.1 - isarray@1.0.0 - javascript-natural-sort@0.7.1 - keyv@4.5.4 - omggif@1.0.10 - onnxruntime-common@1.20.1 + - onnxruntime-common@1.21.0-dev.20241205-6ed77cc374 - onnxruntime-node@1.20.1 - - onnxruntime-web@1.20.1 + - onnxruntime-web@1.21.0-dev.20241205-d27fecd3d3 - parse-bmfont-ascii@1.0.6 - readable-web-to-node-stream@3.0.2 - seedrandom@3.0.5 - string-split-by@1.0.0 - tr46@0.0.3 + - undici-types@5.26.5 These packages each contain the following license: @@ -6121,6 +6141,36 @@ SOFTWARE. ----------- +The following npm package may be included in this product: + + - abort-controller@3.0.0 + +This package contains the following license: + +MIT License + +Copyright (c) 2017 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following npm package may be included in this product: - safer-buffer@2.1.2 @@ -6363,7 +6413,7 @@ SOFTWARE. The following npm package may be included in this product: - - skia-canvas@2.0.0 + - skia-canvas@2.0.1 This package contains the following license: @@ -6511,6 +6561,36 @@ SOFTWARE. ----------- +The following npm package may be included in this product: + + - node-domexception@1.0.0 + +This package contains the following license: + +MIT License + +Copyright (c) 2021 Jimmy Wärting + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following npm package may be included in this product: - cargo-cp-artifact@0.1.9 @@ -6663,7 +6743,7 @@ SOFTWARE. The following npm package may be included in this product: - - @lvce-editor/ripgrep@1.4.0 + - @lvce-editor/ripgrep@1.5.0 This package contains the following license: @@ -6693,7 +6773,7 @@ SOFTWARE. The following npm package may be included in this product: - - gpt-tokenizer@2.7.0 + - gpt-tokenizer@2.8.1 This package contains the following license: @@ -6950,7 +7030,7 @@ The following npm packages may be included in this product: - ansi-styles@6.2.1 - crypto-random-string@4.0.0 - decompress-response@6.0.0 - - execa@9.5.1 + - execa@9.5.2 - figures@6.1.0 - file-type@16.5.4 - get-stream@5.2.0 @@ -7405,6 +7485,32 @@ IN THE SOFTWARE. ----------- +The following npm package may be included in this product: + + - humanize-ms@1.2.1 + +This package contains the following license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +----------- + The following npm package may be included in this product: - pngjs@7.0.0 @@ -8197,6 +8303,38 @@ THE SOFTWARE. ----------- +The following npm package may be included in this product: + + - agentkeepalive@4.5.0 + +This package contains the following license: + +The MIT License + +Copyright(c) node-modules and other contributors. +Copyright(c) 2012 - 2015 fengmk2 + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +----------- + The following npm package may be included in this product: - exif-parser@0.1.12 @@ -8794,6 +8932,36 @@ SOFTWARE. ----------- +The following npm package may be included in this product: + + - event-target-shim@5.0.1 + +This package contains the following license: + +The MIT License (MIT) + +Copyright (c) 2015 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following npm package may be included in this product: - whatwg-url@5.0.0 @@ -8974,6 +9142,36 @@ SOFTWARE. ----------- +The following npm package may be included in this product: + + - formdata-node@4.4.1 + +This package contains the following license: + +The MIT License (MIT) + +Copyright (c) 2017-present Nick K. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + The following npm package may be included in this product: - nan@2.22.0 @@ -9211,12 +9409,44 @@ SOFTWARE. The following npm package may be included in this product: - - form-data-encoder@4.0.2 + - web-streams-polyfill@4.0.0-beta.3 This package contains the following license: The MIT License (MIT) +Copyright (c) 2021 Mattias Buelens +Copyright (c) 2016 Diwank Singh Tomer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +----------- + +The following npm packages may be included in this product: + + - form-data-encoder@1.7.2 + - form-data-encoder@4.0.2 + +These packages each contain the following license: + +The MIT License (MIT) + Copyright (c) 2021-present Nick K. Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/docs/yarn.lock b/docs/yarn.lock index 6ba1569481..46328ea48b 100644 --- a/docs/yarn.lock +++ b/docs/yarn.lock @@ -10,7 +10,7 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@antfu/install-pkg@^0.4.0": +"@antfu/install-pkg@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.4.1.tgz#d1d7f3be96ecdb41581629cafe8626d1748c0cf1" integrity sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw== @@ -335,9 +335,9 @@ "@babel/types" "^7.25.9" "@babel/traverse@^7.25.9": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.3.tgz#1ebfc75bd748d8f96b3cc63af5e82ebd4c37ba35" - integrity sha512-yTmc8J+Sj8yLzwr4PD5Xb/WF3bOYu2C2OoSZPzbuqRm4n98XirsbzaX+GloeO376UnSYIYJ4NCanwV5/ugZkwA== + version "7.26.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd" + integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== dependencies: "@babel/code-frame" "^7.26.2" "@babel/generator" "^7.26.3" @@ -611,17 +611,18 @@ integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== "@iconify/utils@^2.1.32": - version "2.1.33" - resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.1.33.tgz#cbf7242a52fd0ec58c42d37d28e4406b5327e8c0" - integrity sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw== + version "2.2.0" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.2.0.tgz#f1c516093157a682e0bdf080f5f35700ebb3e0ae" + integrity sha512-9A5eZQV9eKlNCXlI/SgYsGRS7YmGmB1oAsRpNVIYBmIzGJRgH+hfG+lo4069s+GFWFNnBAtDg10c53vQZBLfnA== dependencies: - "@antfu/install-pkg" "^0.4.0" + "@antfu/install-pkg" "^0.4.1" "@antfu/utils" "^0.7.10" "@iconify/types" "^2.0.0" - debug "^4.3.6" + debug "^4.4.0" + globals "^15.13.0" kolorist "^1.8.0" - local-pkg "^0.5.0" - mlly "^1.7.1" + local-pkg "^0.5.1" + mlly "^1.7.3" "@img/sharp-darwin-arm64@0.33.5": version "0.33.5" @@ -870,129 +871,134 @@ estree-walker "^2.0.2" picomatch "^4.0.2" -"@rollup/rollup-android-arm-eabi@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.0.tgz#462e7ecdd60968bc9eb95a20d185e74f8243ec1b" - integrity sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ== - -"@rollup/rollup-android-arm64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.0.tgz#78a2b8a8a55f71a295eb860a654ae90a2b168f40" - integrity sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA== - -"@rollup/rollup-darwin-arm64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.0.tgz#5b783af714f434f1e66e3cdfa3817e0b99216d84" - integrity sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q== - -"@rollup/rollup-darwin-x64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.0.tgz#f72484e842521a5261978034e18e20f778a2850d" - integrity sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w== - -"@rollup/rollup-freebsd-arm64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.0.tgz#3c919dff72b2fe344811a609c674a8347b033f62" - integrity sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ== - -"@rollup/rollup-freebsd-x64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.0.tgz#b62a3a8365b363b3fdfa6da11a9188b6ab4dca7c" - integrity sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA== - -"@rollup/rollup-linux-arm-gnueabihf@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.0.tgz#0d02cc55bd229bd8ca5c54f65f916ba5e0591c94" - integrity sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w== - -"@rollup/rollup-linux-arm-musleabihf@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.0.tgz#c51d379263201e88a60e92bd8e90878f0c044425" - integrity sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg== - -"@rollup/rollup-linux-arm64-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.0.tgz#93ce2addc337b5cfa52b84f8e730d2e36eb4339b" - integrity sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg== - -"@rollup/rollup-linux-arm64-musl@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.0.tgz#730af6ddc091a5ba5baac28a3510691725dc808b" - integrity sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw== - -"@rollup/rollup-linux-powerpc64le-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.0.tgz#b5565aac20b4de60ca1e557f525e76478b5436af" - integrity sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ== - -"@rollup/rollup-linux-riscv64-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.0.tgz#d488290bf9338bad4ae9409c4aa8a1728835a20b" - integrity sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g== - -"@rollup/rollup-linux-s390x-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.0.tgz#eb2e3f3a06acf448115045c11a5a96868c95a556" - integrity sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw== - -"@rollup/rollup-linux-x64-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.0.tgz#065952ef2aea7e837dc7e02aa500feeaff4fc507" - integrity sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw== - -"@rollup/rollup-linux-x64-musl@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.0.tgz#3435d484d05f5c4d1ffd54541b4facce2887103a" - integrity sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw== - -"@rollup/rollup-win32-arm64-msvc@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.0.tgz#69682a2a10d9fedc334f87583cfca83c39c08077" - integrity sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg== - -"@rollup/rollup-win32-ia32-msvc@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.0.tgz#b64470f9ac79abb386829c56750b9a4711be3332" - integrity sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A== - -"@rollup/rollup-win32-x64-msvc@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.0.tgz#cb313feef9ac6e3737067fdf34f42804ac65a6f2" - integrity sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ== - -"@shikijs/core@1.24.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.24.0.tgz#5a90301df89f3a60d5ed9610d6537631fcd1c506" - integrity sha512-6pvdH0KoahMzr6689yh0QJ3rCgF4j1XsXRHNEeEN6M4xJTfQ6QPWrmHzIddotg+xPJUPEPzYzYCKzpYyhTI6Gw== - dependencies: - "@shikijs/engine-javascript" "1.24.0" - "@shikijs/engine-oniguruma" "1.24.0" - "@shikijs/types" "1.24.0" +"@rollup/rollup-android-arm-eabi@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz#7f4c4d8cd5ccab6e95d6750dbe00321c1f30791e" + integrity sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ== + +"@rollup/rollup-android-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz#17ea71695fb1518c2c324badbe431a0bd1879f2d" + integrity sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA== + +"@rollup/rollup-darwin-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz#dac0f0d0cfa73e7d5225ae6d303c13c8979e7999" + integrity sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ== + +"@rollup/rollup-darwin-x64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz#8f63baa1d31784904a380d2e293fa1ddf53dd4a2" + integrity sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ== + +"@rollup/rollup-freebsd-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz#30ed247e0df6e8858cdc6ae4090e12dbeb8ce946" + integrity sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA== + +"@rollup/rollup-freebsd-x64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz#57846f382fddbb508412ae07855b8a04c8f56282" + integrity sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ== + +"@rollup/rollup-linux-arm-gnueabihf@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz#378ca666c9dae5e6f94d1d351e7497c176e9b6df" + integrity sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA== + +"@rollup/rollup-linux-arm-musleabihf@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz#a692eff3bab330d5c33a5d5813a090c15374cddb" + integrity sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg== + +"@rollup/rollup-linux-arm64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz#6b1719b76088da5ac1ae1feccf48c5926b9e3db9" + integrity sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA== + +"@rollup/rollup-linux-arm64-musl@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz#865baf5b6f5ff67acb32e5a359508828e8dc5788" + integrity sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A== + +"@rollup/rollup-linux-loongarch64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz#23c6609ba0f7fa7a7f2038b6b6a08555a5055a87" + integrity sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz#652ef0d9334a9f25b9daf85731242801cb0fc41c" + integrity sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A== + +"@rollup/rollup-linux-riscv64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz#1eb6651839ee6ebca64d6cc64febbd299e95e6bd" + integrity sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA== + +"@rollup/rollup-linux-s390x-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz#015c52293afb3ff2a293cf0936b1d43975c1e9cd" + integrity sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg== + +"@rollup/rollup-linux-x64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz#b83001b5abed2bcb5e2dbeec6a7e69b194235c1e" + integrity sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw== + +"@rollup/rollup-linux-x64-musl@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz#6cc7c84cd4563737f8593e66f33b57d8e228805b" + integrity sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g== + +"@rollup/rollup-win32-arm64-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz#631ffeee094d71279fcd1fe8072bdcf25311bc11" + integrity sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A== + +"@rollup/rollup-win32-ia32-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz#06d1d60d5b9f718e8a6c4a43f82e3f9e3254587f" + integrity sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA== + +"@rollup/rollup-win32-x64-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz#4dff5c4259ebe6c5b4a8f2c5bc3829b7a8447ff0" + integrity sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA== + +"@shikijs/core@1.24.1": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.24.1.tgz#c1204bcfb5cb37e869dbcf054ff46c95a59d9686" + integrity sha512-3q/9oarMVcLqJ+NQOdKL40dJVq/UKCsiWXz3QRQPBglHqa8dDJ0p6TuMuk2gHphy5FZcvFtg4UHBgpW0JtZ8+A== + dependencies: + "@shikijs/engine-javascript" "1.24.1" + "@shikijs/engine-oniguruma" "1.24.1" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" "@types/hast" "^3.0.4" hast-util-to-html "^9.0.3" -"@shikijs/engine-javascript@1.24.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.24.0.tgz#7f7f7afd3210601ba9c7d966f00c7a167f9f6453" - integrity sha512-ZA6sCeSsF3Mnlxxr+4wGEJ9Tto4RHmfIS7ox8KIAbH0MTVUkw3roHPHZN+LlJMOHJJOVupe6tvuAzRpN8qK1vA== +"@shikijs/engine-javascript@1.24.1": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.24.1.tgz#57504fe997c47a84ff464ed1c565914f75a9b825" + integrity sha512-lNgUSHYDYaQ6daj4lJJqcY2Ru9LgHwpFoposJkRVRPh21Yg4kaPFRhzaWoSg3PliwcDOpDuMy3xsmQaJp201Fg== dependencies: - "@shikijs/types" "1.24.0" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" oniguruma-to-es "0.7.0" -"@shikijs/engine-oniguruma@1.24.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.0.tgz#4e6f49413fbc96dabfa30cb232ca1acf5ca1a446" - integrity sha512-Eua0qNOL73Y82lGA4GF5P+G2+VXX9XnuUxkiUuwcxQPH4wom+tE39kZpBFXfUuwNYxHSkrSxpB1p4kyRW0moSg== +"@shikijs/engine-oniguruma@1.24.1": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.1.tgz#cf9f74867987a786057dbf599f571800f7ec5b30" + integrity sha512-KdrTIBIONWd+Xs61eh8HdIpfigtrseat9dpARvaOe2x0g/FNTbwbkGr3y92VSOVD1XotzEskh3v/nCzyWjkf7g== dependencies: - "@shikijs/types" "1.24.0" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" -"@shikijs/types@1.24.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.24.0.tgz#a1755b125cb8fb1780a876a0a57242939eafd79f" - integrity sha512-aptbEuq1Pk88DMlCe+FzXNnBZ17LCiLIGWAeCWhoFDzia5Q5Krx3DgnULLiouSdd6+LUM39XwXGppqYE0Ghtug== +"@shikijs/types@1.24.1": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.24.1.tgz#669c7165f9ee3caa475fadd61f7ed4ca0009e848" + integrity sha512-ZwZFbShFY/APfKNt3s9Gv8rhTm29GodSKsOW66X6N+HGsZuaHalE1VUEX4fv93UXHTZTLjb3uxn63F96RhGfXw== dependencies: "@shikijs/vscode-textmate" "^9.3.0" "@types/hast" "^3.0.4" @@ -1285,9 +1291,9 @@ "@types/node" "*" "@types/geojson@*": - version "7946.0.14" - resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" - integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== + version "7946.0.15" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.15.tgz#f9d55fd5a0aa2de9dc80b1b04e437538b7298868" + integrity sha512-9oSxFzDCT2Rj6DfcHF8G++jxBKS7mBqXl5xrRW+Kbvjry6Uduya2iiwqHPhVXpasAVMBYKkEPGgKhd3+/HZ6xA== "@types/hast@^3.0.0", "@types/hast@^3.0.4": version "3.0.4" @@ -1362,9 +1368,9 @@ integrity sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA== "@ungap/structured-clone@^1.0.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + version "1.2.1" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.1.tgz#28fa185f67daaf7b7a1a8c1d445132c5d979f8bd" + integrity sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA== "@volar/kit@~2.4.7": version "2.4.10" @@ -1679,9 +1685,9 @@ camelcase@^8.0.0: integrity sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA== caniuse-lite@^1.0.30001669: - version "1.0.30001686" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz#0e04b8d90de8753188e93c9989d56cb19d902670" - integrity sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA== + version "1.0.30001687" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz#d0ac634d043648498eedf7a3932836beba90ebae" + integrity sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ== ccount@^2.0.0: version "2.0.1" @@ -2170,10 +2176,10 @@ dayjs@^1.11.10: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c" integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg== -debug@^4.0.0, debug@^4.1.0, debug@^4.3.1, debug@^4.3.4, debug@^4.3.6, debug@^4.3.7: - version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== +debug@^4.0.0, debug@^4.1.0, debug@^4.3.1, debug@^4.3.4, debug@^4.3.7, debug@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: ms "^2.1.3" @@ -2236,9 +2242,9 @@ dlv@^1.1.3: integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== dompurify@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.2.tgz#6c0518745e81686c74a684f5af1e5613e7cc0246" - integrity sha512-YMM+erhdZ2nkZ4fTNRTSI94mb7VG7uVF5vj5Zde7tImgnhZE3R6YW/IACGIHb2ux+QkEXMhe591N+5jWOmL4Zw== + version "3.2.3" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.3.tgz#05dd2175225324daabfca6603055a09b2382a4cd" + integrity sha512-U1U5Hzc2MO0oW3DF+G9qYN0aT7atAou4AgI0XjWz061nyBPbdxkfdhfy5uMgGn6+oLFCfn44ZGbdDqCzVmlOWA== optionalDependencies: "@types/trusted-types" "^2.0.7" @@ -2248,9 +2254,9 @@ dset@^3.1.3, dset@^3.1.4: integrity sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA== electron-to-chromium@^1.5.41: - version "1.5.70" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.70.tgz#8be2f92e54a3d069c0eefcf766a48bf0f78d93e0" - integrity sha512-P6FPqAWIZrC3sHDAwBitJBs7N7IF58m39XVny7DFseQXK2eiMn7nNQizFf63mWDDUnFvaqsM8FI0+ZZfLkdUGA== + version "1.5.71" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.71.tgz#d8b5dba1e55b320f2f4e9b1ca80738f53fcfec2b" + integrity sha512-dB68l59BI75W1BUGVTAEJy45CEVuEGy9qPVVQ8pnHyHMn36PLPPoE1mjLH+lo9rKulO3HC2OhbACI/8tCqJBcA== emmet@^2.4.3: version "2.4.11" @@ -2540,6 +2546,11 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^15.13.0: + version "15.13.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.13.0.tgz#bbec719d69aafef188ecd67954aae76a696010fc" + integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g== + graceful-fs@^4.1.5: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" @@ -3023,9 +3034,9 @@ jsonc-parser@^3.0.0: integrity sha512-HUgH65KyejrUFPvHFPbqOY0rsFip3Bo5wb4ngvdi1EpCYWUQDC5V+Y7mZws+DLkr4M//zQJoanu1SP+87Dv1oQ== katex@^0.16.9: - version "0.16.11" - resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.11.tgz#4bc84d5584f996abece5f01c6ad11304276a33f5" - integrity sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ== + version "0.16.14" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.14.tgz#888e230b82403425f3ddf1d26b34f7f894ce1a98" + integrity sha512-tnUUAL/S+f/w8KrRpCFcCW/msuIlBkOmVnTmvdEK6WCkx6uDPRj3d9SBAP+qB5x0MCeOyUbdbIMtT5cUJD8aRw== dependencies: commander "^8.3.0" @@ -3085,7 +3096,7 @@ load-yaml-file@^0.2.0: pify "^4.0.1" strip-bom "^3.0.0" -local-pkg@^0.5.0: +local-pkg@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.5.1.tgz#69658638d2a95287534d4c2fff757980100dbb6d" integrity sha512-9rrA30MRRP3gBD3HTGnC6cDFpaE1kVDWxWgqWJUN0RvDNAo+Nz/9GxB+nHOH0ifbVFy0hSA1V6vFDvnx54lTEQ== @@ -3836,7 +3847,7 @@ mini-svg-data-uri@^1.0.0: resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939" integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg== -mlly@^1.7.1, mlly@^1.7.2, mlly@^1.7.3: +mlly@^1.7.2, mlly@^1.7.3: version "1.7.3" resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.7.3.tgz#d86c0fcd8ad8e16395eb764a5f4b831590cee48c" integrity sha512-xUsx5n/mN0uQf4V548PKQ+YShA4/IW0KI1dZhrNrPCLG+xizETbHTkOa1f8/xut9JRPp8kQuMnz0oqwkTiLo/A== @@ -4430,30 +4441,31 @@ robust-predicates@^3.0.2: integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== rollup@^4.20.0: - version "4.28.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.28.0.tgz#eb8d28ed43ef60a18f21d0734d230ee79dd0de77" - integrity sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ== + version "4.28.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.28.1.tgz#7718ba34d62b449dfc49adbfd2f312b4fe0df4de" + integrity sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg== dependencies: "@types/estree" "1.0.6" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.28.0" - "@rollup/rollup-android-arm64" "4.28.0" - "@rollup/rollup-darwin-arm64" "4.28.0" - "@rollup/rollup-darwin-x64" "4.28.0" - "@rollup/rollup-freebsd-arm64" "4.28.0" - "@rollup/rollup-freebsd-x64" "4.28.0" - "@rollup/rollup-linux-arm-gnueabihf" "4.28.0" - "@rollup/rollup-linux-arm-musleabihf" "4.28.0" - "@rollup/rollup-linux-arm64-gnu" "4.28.0" - "@rollup/rollup-linux-arm64-musl" "4.28.0" - "@rollup/rollup-linux-powerpc64le-gnu" "4.28.0" - "@rollup/rollup-linux-riscv64-gnu" "4.28.0" - "@rollup/rollup-linux-s390x-gnu" "4.28.0" - "@rollup/rollup-linux-x64-gnu" "4.28.0" - "@rollup/rollup-linux-x64-musl" "4.28.0" - "@rollup/rollup-win32-arm64-msvc" "4.28.0" - "@rollup/rollup-win32-ia32-msvc" "4.28.0" - "@rollup/rollup-win32-x64-msvc" "4.28.0" + "@rollup/rollup-android-arm-eabi" "4.28.1" + "@rollup/rollup-android-arm64" "4.28.1" + "@rollup/rollup-darwin-arm64" "4.28.1" + "@rollup/rollup-darwin-x64" "4.28.1" + "@rollup/rollup-freebsd-arm64" "4.28.1" + "@rollup/rollup-freebsd-x64" "4.28.1" + "@rollup/rollup-linux-arm-gnueabihf" "4.28.1" + "@rollup/rollup-linux-arm-musleabihf" "4.28.1" + "@rollup/rollup-linux-arm64-gnu" "4.28.1" + "@rollup/rollup-linux-arm64-musl" "4.28.1" + "@rollup/rollup-linux-loongarch64-gnu" "4.28.1" + "@rollup/rollup-linux-powerpc64le-gnu" "4.28.1" + "@rollup/rollup-linux-riscv64-gnu" "4.28.1" + "@rollup/rollup-linux-s390x-gnu" "4.28.1" + "@rollup/rollup-linux-x64-gnu" "4.28.1" + "@rollup/rollup-linux-x64-musl" "4.28.1" + "@rollup/rollup-win32-arm64-msvc" "4.28.1" + "@rollup/rollup-win32-ia32-msvc" "4.28.1" + "@rollup/rollup-win32-x64-msvc" "4.28.1" fsevents "~2.3.2" roughjs@^4.6.6: @@ -4536,14 +4548,14 @@ sharp@^0.33.3: "@img/sharp-win32-x64" "0.33.5" shiki@^1.22.0, shiki@^1.22.2, shiki@^1.23.1: - version "1.24.0" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.24.0.tgz#ea374523cbf32df0141ad3e5f79d16aea901ab69" - integrity sha512-qIneep7QRwxRd5oiHb8jaRzH15V/S8F3saCXOdjwRLgozZJr5x2yeBhQtqkO3FSzQDwYEFAYuifg4oHjpDghrg== - dependencies: - "@shikijs/core" "1.24.0" - "@shikijs/engine-javascript" "1.24.0" - "@shikijs/engine-oniguruma" "1.24.0" - "@shikijs/types" "1.24.0" + version "1.24.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.24.1.tgz#d3cb1a1ca1db1b3538f0e5ed08247de178cedfbd" + integrity sha512-/qByWMg05+POb63c/OvnrU17FcCUa34WU4F6FCrd/mjDPEDPl8YUNRkRMbo8l3iYMLydfCgxi1r37JFoSw8A4A== + dependencies: + "@shikijs/core" "1.24.1" + "@shikijs/engine-javascript" "1.24.1" + "@shikijs/engine-oniguruma" "1.24.1" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" "@types/hast" "^3.0.4" diff --git a/packages/cli/package.json b/packages/cli/package.json index e51753480a..0dcbe2bfaf 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -56,7 +56,7 @@ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz" }, "optionalDependencies": { - "@huggingface/transformers": "^3.1.1", + "@huggingface/transformers": "^3.1.2", "@lvce-editor/ripgrep": "^1.4.0", "pdfjs-dist": "4.9.124", "playwright": "^1.49.0", @@ -91,7 +91,7 @@ "memorystream": "^0.3.1", "node-sarif-builder": "^3.2.0", "octokit": "^4.0.2", - "openai": "^4.75.0", + "openai": "^4.76.0", "pretty-bytes": "^6.1.1", "replace-ext": "^2.0.0", "ws": "^8.18.0", diff --git a/packages/core/package.json b/packages/core/package.json index d60258dda3..f432e7cb3a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -21,7 +21,7 @@ "@anthropic-ai/sdk": "^0.32.1", "@azure/identity": "^4.5.0", "@huggingface/jinja": "^0.3.2", - "@huggingface/transformers": "^3.1.1", + "@huggingface/transformers": "^3.1.2", "@modelcontextprotocol/sdk": "^1.0.3", "@octokit/plugin-paginate-rest": "^11.3.6", "@octokit/plugin-retry": "^7.1.2", @@ -54,7 +54,7 @@ "gpt-tokenizer": "^2.7.0", "html-escaper": "^3.0.3", "html-to-text": "^9.0.5", - "https-proxy-agent": "^7.0.5", + "https-proxy-agent": "^7.0.6", "ignore": "^6.0.2", "inflection": "^3.0.0", "ini": "^5.0.0", @@ -70,7 +70,7 @@ "minisearch": "^7.1.1", "mustache": "^4.2.0", "object-inspect": "^1.13.3", - "openai": "^4.75.0", + "openai": "^4.76.0", "p-limit": "^6.1.0", "parse-diff": "^0.11.1", "prettier": "^3.4.2", diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index 405e6e3fd4..97db9b73d1 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -22,6 +22,7 @@ import { } from "./chattypes" import { logError } from "./util" +import { resolveHttpProxyAgent } from "./proxy" const convertFinishReason = ( stopReason: Anthropic.Message["stop_reason"] @@ -199,10 +200,12 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( const { model } = parseModelIdentifier(req.model) const { encode: encoder } = await resolveTokenEncoder(model) - const Anthropic = (await import("@anthropic-ai/sdk")).default + const { default: Anthropic } = await import("@anthropic-ai/sdk") + const httpAgent = resolveHttpProxyAgent() const anthropic = new Anthropic({ baseURL: cfg.base, apiKey: cfg.token, + httpAgent, }) trace.itemValue(`url`, `[${anthropic.baseURL}](${anthropic.baseURL})`) diff --git a/packages/core/src/fetch.ts b/packages/core/src/fetch.ts index 5ff5810e61..516827ef47 100644 --- a/packages/core/src/fetch.ts +++ b/packages/core/src/fetch.ts @@ -11,7 +11,7 @@ import { errorMessage } from "./error" import { logVerbose, roundWithPrecision, toStringList } from "./util" import { CancellationToken } from "./cancellation" import { readText } from "./fs" -import { HttpsProxyAgent } from "https-proxy-agent" +import { resolveHttpProxyAgent } from "./proxy" /** * Creates a fetch function with retry logic. @@ -42,14 +42,7 @@ export async function createFetch( } = options || {} // We create a proxy based on Node.js environment variables. - const proxy = - process.env.GENAISCRIPT_HTTPS_PROXY || - process.env.GENAISCRIPT_HTTP_PROXY || - process.env.HTTPS_PROXY || - process.env.HTTP_PROXY || - process.env.https_proxy || - process.env.http_proxy - const agent = proxy ? new HttpsProxyAgent(proxy) : null + const agent = resolveHttpProxyAgent() // We enrich crossFetch with the proxy. const crossFetchWithProxy: typeof fetch = agent diff --git a/packages/core/src/proxy.ts b/packages/core/src/proxy.ts new file mode 100644 index 0000000000..92c945ca52 --- /dev/null +++ b/packages/core/src/proxy.ts @@ -0,0 +1,14 @@ +import { HttpsProxyAgent } from "https-proxy-agent" + +export function resolveHttpProxyAgent() { + // We create a proxy based on Node.js environment variables. + const proxy = + process.env.GENAISCRIPT_HTTPS_PROXY || + process.env.GENAISCRIPT_HTTP_PROXY || + process.env.HTTPS_PROXY || + process.env.HTTP_PROXY || + process.env.https_proxy || + process.env.http_proxy + const agent = proxy ? new HttpsProxyAgent(proxy) : null + return agent +} diff --git a/packages/sample/package.json b/packages/sample/package.json index 82648ef244..c87a147c06 100644 --- a/packages/sample/package.json +++ b/packages/sample/package.json @@ -20,7 +20,7 @@ "@agentic/weather": "^7.2.0", "@azure/identity": "^4.5.0", "@azure/storage-blob": "^12.26.0", - "@huggingface/transformers": "^3.1.1", + "@huggingface/transformers": "^3.1.2", "@modelcontextprotocol/sdk": "^1.0.3", "@tidyjs/tidy": "^2.5.2", "p-all": "^5.0.0", diff --git a/slides/yarn.lock b/slides/yarn.lock index 9e91b207b0..0fb92f2f6a 100644 --- a/slides/yarn.lock +++ b/slides/yarn.lock @@ -10,7 +10,7 @@ "@jridgewell/gen-mapping" "^0.3.5" "@jridgewell/trace-mapping" "^0.3.24" -"@antfu/install-pkg@^0.4.0", "@antfu/install-pkg@^0.4.1": +"@antfu/install-pkg@^0.4.1": version "0.4.1" resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.4.1.tgz#d1d7f3be96ecdb41581629cafe8626d1748c0cf1" integrity sha512-T7yB5QNG29afhWVkVq7XeIMBa5U/vs9mX69YqayXypPRmYzUmzwnYltplHmPtZ4HPCn+sQKeXW8I47wCbuBOjw== @@ -215,9 +215,9 @@ "@babel/plugin-syntax-typescript" "^7.25.9" "@babel/standalone@^7.25.7": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.26.3.tgz#8d398e97524d9194c1b5e740d3998a0c63954414" - integrity sha512-igZRkDAv14+pqOCUIXjJG/ammWHmUIp+JBvMJ3/KnolyjxOF35B6mN5IRdryhaYZ9R9nibsFkStPsAKTThgF3A== + version "7.26.4" + resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.26.4.tgz#440d8046929174b463e2c6294fc8f6d49fdea550" + integrity sha512-SF+g7S2mhTT1b7CHyfNjDkPU1corxg4LPYsyP0x5KuCl+EbtBQHRLqr9N3q7e7+x7NQ5LYxQf8mJ2PmzebLr0A== "@babel/template@^7.25.0", "@babel/template@^7.25.9": version "7.25.9" @@ -229,9 +229,9 @@ "@babel/types" "^7.25.9" "@babel/traverse@^7.25.6", "@babel/traverse@^7.25.9": - version "7.26.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.3.tgz#1ebfc75bd748d8f96b3cc63af5e82ebd4c37ba35" - integrity sha512-yTmc8J+Sj8yLzwr4PD5Xb/WF3bOYu2C2OoSZPzbuqRm4n98XirsbzaX+GloeO376UnSYIYJ4NCanwV5/ugZkwA== + version "7.26.4" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.26.4.tgz#ac3a2a84b908dde6d463c3bfa2c5fdc1653574bd" + integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== dependencies: "@babel/code-frame" "^7.26.2" "@babel/generator" "^7.26.3" @@ -572,17 +572,18 @@ integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== "@iconify/utils@^2.1.29", "@iconify/utils@^2.1.32", "@iconify/utils@^2.1.33": - version "2.1.33" - resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.1.33.tgz#cbf7242a52fd0ec58c42d37d28e4406b5327e8c0" - integrity sha512-jP9h6v/g0BIZx0p7XGJJVtkVnydtbgTgt9mVNcGDYwaa7UhdHdI9dvoq+gKj9sijMSJKxUPEG2JyjsgXjxL7Kw== + version "2.2.0" + resolved "https://registry.yarnpkg.com/@iconify/utils/-/utils-2.2.0.tgz#f1c516093157a682e0bdf080f5f35700ebb3e0ae" + integrity sha512-9A5eZQV9eKlNCXlI/SgYsGRS7YmGmB1oAsRpNVIYBmIzGJRgH+hfG+lo4069s+GFWFNnBAtDg10c53vQZBLfnA== dependencies: - "@antfu/install-pkg" "^0.4.0" + "@antfu/install-pkg" "^0.4.1" "@antfu/utils" "^0.7.10" "@iconify/types" "^2.0.0" - debug "^4.3.6" + debug "^4.4.0" + globals "^15.13.0" kolorist "^1.8.0" - local-pkg "^0.5.0" - mlly "^1.7.1" + local-pkg "^0.5.1" + mlly "^1.7.3" "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" @@ -758,170 +759,175 @@ estree-walker "^2.0.2" picomatch "^4.0.2" -"@rollup/rollup-android-arm-eabi@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.0.tgz#462e7ecdd60968bc9eb95a20d185e74f8243ec1b" - integrity sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ== - -"@rollup/rollup-android-arm64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.0.tgz#78a2b8a8a55f71a295eb860a654ae90a2b168f40" - integrity sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA== - -"@rollup/rollup-darwin-arm64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.0.tgz#5b783af714f434f1e66e3cdfa3817e0b99216d84" - integrity sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q== - -"@rollup/rollup-darwin-x64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.0.tgz#f72484e842521a5261978034e18e20f778a2850d" - integrity sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w== - -"@rollup/rollup-freebsd-arm64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.0.tgz#3c919dff72b2fe344811a609c674a8347b033f62" - integrity sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ== - -"@rollup/rollup-freebsd-x64@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.0.tgz#b62a3a8365b363b3fdfa6da11a9188b6ab4dca7c" - integrity sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA== - -"@rollup/rollup-linux-arm-gnueabihf@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.0.tgz#0d02cc55bd229bd8ca5c54f65f916ba5e0591c94" - integrity sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w== - -"@rollup/rollup-linux-arm-musleabihf@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.0.tgz#c51d379263201e88a60e92bd8e90878f0c044425" - integrity sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg== - -"@rollup/rollup-linux-arm64-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.0.tgz#93ce2addc337b5cfa52b84f8e730d2e36eb4339b" - integrity sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg== - -"@rollup/rollup-linux-arm64-musl@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.0.tgz#730af6ddc091a5ba5baac28a3510691725dc808b" - integrity sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw== - -"@rollup/rollup-linux-powerpc64le-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.0.tgz#b5565aac20b4de60ca1e557f525e76478b5436af" - integrity sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ== - -"@rollup/rollup-linux-riscv64-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.0.tgz#d488290bf9338bad4ae9409c4aa8a1728835a20b" - integrity sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g== - -"@rollup/rollup-linux-s390x-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.0.tgz#eb2e3f3a06acf448115045c11a5a96868c95a556" - integrity sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw== - -"@rollup/rollup-linux-x64-gnu@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.0.tgz#065952ef2aea7e837dc7e02aa500feeaff4fc507" - integrity sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw== - -"@rollup/rollup-linux-x64-musl@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.0.tgz#3435d484d05f5c4d1ffd54541b4facce2887103a" - integrity sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw== - -"@rollup/rollup-win32-arm64-msvc@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.0.tgz#69682a2a10d9fedc334f87583cfca83c39c08077" - integrity sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg== - -"@rollup/rollup-win32-ia32-msvc@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.0.tgz#b64470f9ac79abb386829c56750b9a4711be3332" - integrity sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A== - -"@rollup/rollup-win32-x64-msvc@4.28.0": - version "4.28.0" - resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.0.tgz#cb313feef9ac6e3737067fdf34f42804ac65a6f2" - integrity sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ== - -"@shikijs/core@1.24.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.24.0.tgz#5a90301df89f3a60d5ed9610d6537631fcd1c506" - integrity sha512-6pvdH0KoahMzr6689yh0QJ3rCgF4j1XsXRHNEeEN6M4xJTfQ6QPWrmHzIddotg+xPJUPEPzYzYCKzpYyhTI6Gw== - dependencies: - "@shikijs/engine-javascript" "1.24.0" - "@shikijs/engine-oniguruma" "1.24.0" - "@shikijs/types" "1.24.0" +"@rollup/rollup-android-arm-eabi@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.1.tgz#7f4c4d8cd5ccab6e95d6750dbe00321c1f30791e" + integrity sha512-2aZp8AES04KI2dy3Ss6/MDjXbwBzj+i0GqKtWXgw2/Ma6E4jJvujryO6gJAghIRVz7Vwr9Gtl/8na3nDUKpraQ== + +"@rollup/rollup-android-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.1.tgz#17ea71695fb1518c2c324badbe431a0bd1879f2d" + integrity sha512-EbkK285O+1YMrg57xVA+Dp0tDBRB93/BZKph9XhMjezf6F4TpYjaUSuPt5J0fZXlSag0LmZAsTmdGGqPp4pQFA== + +"@rollup/rollup-darwin-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.1.tgz#dac0f0d0cfa73e7d5225ae6d303c13c8979e7999" + integrity sha512-prduvrMKU6NzMq6nxzQw445zXgaDBbMQvmKSJaxpaZ5R1QDM8w+eGxo6Y/jhT/cLoCvnZI42oEqf9KQNYz1fqQ== + +"@rollup/rollup-darwin-x64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.1.tgz#8f63baa1d31784904a380d2e293fa1ddf53dd4a2" + integrity sha512-WsvbOunsUk0wccO/TV4o7IKgloJ942hVFK1CLatwv6TJspcCZb9umQkPdvB7FihmdxgaKR5JyxDjWpCOp4uZlQ== + +"@rollup/rollup-freebsd-arm64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.1.tgz#30ed247e0df6e8858cdc6ae4090e12dbeb8ce946" + integrity sha512-HTDPdY1caUcU4qK23FeeGxCdJF64cKkqajU0iBnTVxS8F7H/7BewvYoG+va1KPSL63kQ1PGNyiwKOfReavzvNA== + +"@rollup/rollup-freebsd-x64@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.1.tgz#57846f382fddbb508412ae07855b8a04c8f56282" + integrity sha512-m/uYasxkUevcFTeRSM9TeLyPe2QDuqtjkeoTpP9SW0XxUWfcYrGDMkO/m2tTw+4NMAF9P2fU3Mw4ahNvo7QmsQ== + +"@rollup/rollup-linux-arm-gnueabihf@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.1.tgz#378ca666c9dae5e6f94d1d351e7497c176e9b6df" + integrity sha512-QAg11ZIt6mcmzpNE6JZBpKfJaKkqTm1A9+y9O+frdZJEuhQxiugM05gnCWiANHj4RmbgeVJpTdmKRmH/a+0QbA== + +"@rollup/rollup-linux-arm-musleabihf@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.1.tgz#a692eff3bab330d5c33a5d5813a090c15374cddb" + integrity sha512-dRP9PEBfolq1dmMcFqbEPSd9VlRuVWEGSmbxVEfiq2cs2jlZAl0YNxFzAQS2OrQmsLBLAATDMb3Z6MFv5vOcXg== + +"@rollup/rollup-linux-arm64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.1.tgz#6b1719b76088da5ac1ae1feccf48c5926b9e3db9" + integrity sha512-uGr8khxO+CKT4XU8ZUH1TTEUtlktK6Kgtv0+6bIFSeiSlnGJHG1tSFSjm41uQ9sAO/5ULx9mWOz70jYLyv1QkA== + +"@rollup/rollup-linux-arm64-musl@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.1.tgz#865baf5b6f5ff67acb32e5a359508828e8dc5788" + integrity sha512-QF54q8MYGAqMLrX2t7tNpi01nvq5RI59UBNx+3+37zoKX5KViPo/gk2QLhsuqok05sSCRluj0D00LzCwBikb0A== + +"@rollup/rollup-linux-loongarch64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.28.1.tgz#23c6609ba0f7fa7a7f2038b6b6a08555a5055a87" + integrity sha512-vPul4uodvWvLhRco2w0GcyZcdyBfpfDRgNKU+p35AWEbJ/HPs1tOUrkSueVbBS0RQHAf/A+nNtDpvw95PeVKOA== + +"@rollup/rollup-linux-powerpc64le-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.1.tgz#652ef0d9334a9f25b9daf85731242801cb0fc41c" + integrity sha512-pTnTdBuC2+pt1Rmm2SV7JWRqzhYpEILML4PKODqLz+C7Ou2apEV52h19CR7es+u04KlqplggmN9sqZlekg3R1A== + +"@rollup/rollup-linux-riscv64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.1.tgz#1eb6651839ee6ebca64d6cc64febbd299e95e6bd" + integrity sha512-vWXy1Nfg7TPBSuAncfInmAI/WZDd5vOklyLJDdIRKABcZWojNDY0NJwruY2AcnCLnRJKSaBgf/GiJfauu8cQZA== + +"@rollup/rollup-linux-s390x-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.1.tgz#015c52293afb3ff2a293cf0936b1d43975c1e9cd" + integrity sha512-/yqC2Y53oZjb0yz8PVuGOQQNOTwxcizudunl/tFs1aLvObTclTwZ0JhXF2XcPT/zuaymemCDSuuUPXJJyqeDOg== + +"@rollup/rollup-linux-x64-gnu@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.1.tgz#b83001b5abed2bcb5e2dbeec6a7e69b194235c1e" + integrity sha512-fzgeABz7rrAlKYB0y2kSEiURrI0691CSL0+KXwKwhxvj92VULEDQLpBYLHpF49MSiPG4sq5CK3qHMnb9tlCjBw== + +"@rollup/rollup-linux-x64-musl@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.1.tgz#6cc7c84cd4563737f8593e66f33b57d8e228805b" + integrity sha512-xQTDVzSGiMlSshpJCtudbWyRfLaNiVPXt1WgdWTwWz9n0U12cI2ZVtWe/Jgwyv/6wjL7b66uu61Vg0POWVfz4g== + +"@rollup/rollup-win32-arm64-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.1.tgz#631ffeee094d71279fcd1fe8072bdcf25311bc11" + integrity sha512-wSXmDRVupJstFP7elGMgv+2HqXelQhuNf+IS4V+nUpNVi/GUiBgDmfwD0UGN3pcAnWsgKG3I52wMOBnk1VHr/A== + +"@rollup/rollup-win32-ia32-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.1.tgz#06d1d60d5b9f718e8a6c4a43f82e3f9e3254587f" + integrity sha512-ZkyTJ/9vkgrE/Rk9vhMXhf8l9D+eAhbAVbsGsXKy2ohmJaWg0LPQLnIxRdRp/bKyr8tXuPlXhIoGlEB5XpJnGA== + +"@rollup/rollup-win32-x64-msvc@4.28.1": + version "4.28.1" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.1.tgz#4dff5c4259ebe6c5b4a8f2c5bc3829b7a8447ff0" + integrity sha512-ZvK2jBafvttJjoIdKm/Q/Bh7IJ1Ose9IBOwpOXcOvW3ikGTQGmKDgxTC6oCAzW6PynbkKP8+um1du81XJHZ0JA== + +"@shikijs/core@1.24.1": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/core/-/core-1.24.1.tgz#c1204bcfb5cb37e869dbcf054ff46c95a59d9686" + integrity sha512-3q/9oarMVcLqJ+NQOdKL40dJVq/UKCsiWXz3QRQPBglHqa8dDJ0p6TuMuk2gHphy5FZcvFtg4UHBgpW0JtZ8+A== + dependencies: + "@shikijs/engine-javascript" "1.24.1" + "@shikijs/engine-oniguruma" "1.24.1" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" "@types/hast" "^3.0.4" hast-util-to-html "^9.0.3" -"@shikijs/engine-javascript@1.24.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.24.0.tgz#7f7f7afd3210601ba9c7d966f00c7a167f9f6453" - integrity sha512-ZA6sCeSsF3Mnlxxr+4wGEJ9Tto4RHmfIS7ox8KIAbH0MTVUkw3roHPHZN+LlJMOHJJOVupe6tvuAzRpN8qK1vA== +"@shikijs/engine-javascript@1.24.1": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/engine-javascript/-/engine-javascript-1.24.1.tgz#57504fe997c47a84ff464ed1c565914f75a9b825" + integrity sha512-lNgUSHYDYaQ6daj4lJJqcY2Ru9LgHwpFoposJkRVRPh21Yg4kaPFRhzaWoSg3PliwcDOpDuMy3xsmQaJp201Fg== dependencies: - "@shikijs/types" "1.24.0" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" oniguruma-to-es "0.7.0" -"@shikijs/engine-oniguruma@1.24.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.0.tgz#4e6f49413fbc96dabfa30cb232ca1acf5ca1a446" - integrity sha512-Eua0qNOL73Y82lGA4GF5P+G2+VXX9XnuUxkiUuwcxQPH4wom+tE39kZpBFXfUuwNYxHSkrSxpB1p4kyRW0moSg== +"@shikijs/engine-oniguruma@1.24.1": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.1.tgz#cf9f74867987a786057dbf599f571800f7ec5b30" + integrity sha512-KdrTIBIONWd+Xs61eh8HdIpfigtrseat9dpARvaOe2x0g/FNTbwbkGr3y92VSOVD1XotzEskh3v/nCzyWjkf7g== dependencies: - "@shikijs/types" "1.24.0" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" "@shikijs/markdown-it@^1.14.1": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/markdown-it/-/markdown-it-1.24.0.tgz#4436857b3b0f4a010cffb833b3e4c4f3763dfc43" - integrity sha512-YjYg8jJoTO0cUXUNlFHTZWWFt4wSDOcRd2nM2aB1rnX5RqRlcqwfS2x1vQjlPqmUisv+/GHClvz7uKHeK7ZDBw== + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/markdown-it/-/markdown-it-1.24.1.tgz#34161de6d488d4977382bc046abcf40e9a3b7877" + integrity sha512-on33IGJwwmKNQOdhRKP0fBq2jymiCBGRA4tJf5bR708+fzUAW7W0qA+kUiVyU/FYUHv+fttQpx7gTjsh9L10wQ== dependencies: markdown-it "^14.1.0" - shiki "1.24.0" + shiki "1.24.1" "@shikijs/monaco@^1.14.1": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/monaco/-/monaco-1.24.0.tgz#7f84413fca9556e8510e0e6510cf8c165d23f582" - integrity sha512-1TRmREuCf+tBR12cC89tFLVJV1JhnD/Z14Bwta+XwP2INlzpxn5csvvD+o1jdBmdQJsVRbboESgaSpDRS5PUqA== + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/monaco/-/monaco-1.24.1.tgz#cbfec6232d610a2e2ddb3286d573a697377a3f97" + integrity sha512-ShXRDBSQljIjp6joZdudvVddNIDjx+Q9QZqVoNKUk/+Be4YtA2voJcQiHSz3qc7KLuk6YnMK7lflyhFHXajLaA== dependencies: - "@shikijs/core" "1.24.0" - "@shikijs/types" "1.24.0" + "@shikijs/core" "1.24.1" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" "@shikijs/twoslash@", "@shikijs/twoslash@^1.14.1": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/twoslash/-/twoslash-1.24.0.tgz#062fd12df5005c77eb8336dbb780a63c66f8cd17" - integrity sha512-ELyIoD54dFDlb4eGt5sy54WhFeJ39N1hR9W7ADwHWn3XH7cOPjj320EPCh2t76fIoLb0auD46tVLQVVMn93qsA== + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/twoslash/-/twoslash-1.24.1.tgz#5875eb9121635495e2afb1b818681de423696386" + integrity sha512-TbXYtUREusATSCAWLw5dSwmc54Ga9wYF1gTfrOTEQJB3iFejtjA6VFZSpIGnmnQemVr4NNBTK6+4yxcFIZXD7A== dependencies: - "@shikijs/core" "1.24.0" - "@shikijs/types" "1.24.0" + "@shikijs/core" "1.24.1" + "@shikijs/types" "1.24.1" twoslash "^0.2.12" -"@shikijs/types@1.24.0": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.24.0.tgz#a1755b125cb8fb1780a876a0a57242939eafd79f" - integrity sha512-aptbEuq1Pk88DMlCe+FzXNnBZ17LCiLIGWAeCWhoFDzia5Q5Krx3DgnULLiouSdd6+LUM39XwXGppqYE0Ghtug== +"@shikijs/types@1.24.1": + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/types/-/types-1.24.1.tgz#669c7165f9ee3caa475fadd61f7ed4ca0009e848" + integrity sha512-ZwZFbShFY/APfKNt3s9Gv8rhTm29GodSKsOW66X6N+HGsZuaHalE1VUEX4fv93UXHTZTLjb3uxn63F96RhGfXw== dependencies: "@shikijs/vscode-textmate" "^9.3.0" "@types/hast" "^3.0.4" "@shikijs/vitepress-twoslash@^1.14.1": - version "1.24.0" - resolved "https://registry.yarnpkg.com/@shikijs/vitepress-twoslash/-/vitepress-twoslash-1.24.0.tgz#664e13aaa24927a03a54ad645f2b910488e2df17" - integrity sha512-uqAzAHZkg0yzOtVxA3H+xz+tNgFO2f328EfKOIeX98HgI7V1YNm/a+uUqiVuTYY03N9nBMJbdrCHcw7HIc/C3A== + version "1.24.1" + resolved "https://registry.yarnpkg.com/@shikijs/vitepress-twoslash/-/vitepress-twoslash-1.24.1.tgz#06b7afd963458a48870a970adbbc55165744950a" + integrity sha512-85xpDj8fr0Gl4TJG+Q3F7+FAoPv9RO+ZwdU49fqqW1beYPPcJecvvCeb928fRhziD7k9KSkkiaOav1eif0WIig== dependencies: "@shikijs/twoslash" "" floating-vue "^5.2.2" mdast-util-from-markdown "^2.0.2" mdast-util-gfm "^3.0.0" mdast-util-to-hast "^13.2.0" - shiki "1.24.0" + shiki "1.24.1" twoslash "^0.2.12" twoslash-vue "^0.2.12" vue "^3.5.13" @@ -1347,9 +1353,9 @@ "@types/node" "*" "@types/geojson@*": - version "7946.0.14" - resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.14.tgz#319b63ad6df705ee2a65a73ef042c8271e696613" - integrity sha512-WCfD5Ht3ZesJUsONdhvm84dmzWOiOzOAqOncN0++w0lBw1o8OuDNJF2McvvCef/yBqb/HYRahp1BYtODFQ8bRg== + version "7946.0.15" + resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.15.tgz#f9d55fd5a0aa2de9dc80b1b04e437538b7298868" + integrity sha512-9oSxFzDCT2Rj6DfcHF8G++jxBKS7mBqXl5xrRW+Kbvjry6Uduya2iiwqHPhVXpasAVMBYKkEPGgKhd3+/HZ6xA== "@types/hast@^3.0.0", "@types/hast@^3.0.4": version "3.0.4" @@ -1442,9 +1448,9 @@ debug "^4.1.1" "@ungap/structured-clone@^1.0.0": - version "1.2.0" - resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406" - integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== + version "1.2.1" + resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.1.tgz#28fa185f67daaf7b7a1a8c1d445132c5d979f8bd" + integrity sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA== "@unhead/dom@1.11.13": version "1.11.13" @@ -2061,9 +2067,9 @@ cacheable-request@^10.2.8: responselike "^3.0.0" caniuse-lite@^1.0.30001669: - version "1.0.30001686" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001686.tgz#0e04b8d90de8753188e93c9989d56cb19d902670" - integrity sha512-Y7deg0Aergpa24M3qLC5xjNklnKnhsmSyR/V89dLZ1n0ucJIFNs7PgR2Yfa/Zf6W79SbBicgtGxZr2juHkEUIA== + version "1.0.30001687" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001687.tgz#d0ac634d043648498eedf7a3932836beba90ebae" + integrity sha512-0S/FDhf4ZiqrTUiQ39dKeUjYRjkv7lOZU1Dgif2rIqrTzX/1wV2hfKu9TOm1IHkdSijfLswxTFzl/cvir+SLSQ== ccount@^2.0.0: version "2.0.1" @@ -2601,10 +2607,10 @@ debug@2.6.9: dependencies: ms "2.0.0" -debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7: - version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== +debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.4, debug@^4.3.5, debug@^4.3.6, debug@^4.3.7, debug@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: ms "^2.1.3" @@ -2720,9 +2726,9 @@ domhandler@^5.0.2, domhandler@^5.0.3: domelementtype "^2.3.0" dompurify@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.2.tgz#6c0518745e81686c74a684f5af1e5613e7cc0246" - integrity sha512-YMM+erhdZ2nkZ4fTNRTSI94mb7VG7uVF5vj5Zde7tImgnhZE3R6YW/IACGIHb2ux+QkEXMhe591N+5jWOmL4Zw== + version "3.2.3" + resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-3.2.3.tgz#05dd2175225324daabfca6603055a09b2382a4cd" + integrity sha512-U1U5Hzc2MO0oW3DF+G9qYN0aT7atAou4AgI0XjWz061nyBPbdxkfdhfy5uMgGn6+oLFCfn44ZGbdDqCzVmlOWA== optionalDependencies: "@types/trusted-types" "^2.0.7" @@ -2758,9 +2764,9 @@ ee-first@1.1.1: integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== electron-to-chromium@^1.5.41: - version "1.5.70" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.70.tgz#8be2f92e54a3d069c0eefcf766a48bf0f78d93e0" - integrity sha512-P6FPqAWIZrC3sHDAwBitJBs7N7IF58m39XVny7DFseQXK2eiMn7nNQizFf63mWDDUnFvaqsM8FI0+ZZfLkdUGA== + version "1.5.71" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.5.71.tgz#d8b5dba1e55b320f2f4e9b1ca80738f53fcfec2b" + integrity sha512-dB68l59BI75W1BUGVTAEJy45CEVuEGy9qPVVQ8pnHyHMn36PLPPoE1mjLH+lo9rKulO3HC2OhbACI/8tCqJBcA== emoji-regex-xs@^1.0.0: version "1.0.0" @@ -3083,6 +3089,11 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== +globals@^15.13.0: + version "15.13.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-15.13.0.tgz#bbec719d69aafef188ecd67954aae76a696010fc" + integrity sha512-49TewVEz0UxZjr1WYYsWpPrhyC/B/pA8Bq0fUmet2n+eR7yn0IvNzNaoBwnK6mdkzcN+se7Ez9zUgULTz2QH4g== + globby@^14.0.2: version "14.0.2" resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.2.tgz#06554a54ccfe9264e5a9ff8eded46aa1e306482f" @@ -3467,9 +3478,9 @@ jszip@^3.7.1: setimmediate "^1.0.5" katex@^0.16.11, katex@^0.16.9: - version "0.16.11" - resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.11.tgz#4bc84d5584f996abece5f01c6ad11304276a33f5" - integrity sha512-RQrI8rlHY92OLf3rho/Ts8i/XvjgguEjOkO1BEXcU3N8BqPpSzBNwV/G0Ukr+P/l3ivvJUE/Fa/CwbS6HesGNQ== + version "0.16.14" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.16.14.tgz#888e230b82403425f3ddf1d26b34f7f894ce1a98" + integrity sha512-tnUUAL/S+f/w8KrRpCFcCW/msuIlBkOmVnTmvdEK6WCkx6uDPRj3d9SBAP+qB5x0MCeOyUbdbIMtT5cUJD8aRw== dependencies: commander "^8.3.0" @@ -4532,30 +4543,31 @@ robust-predicates@^3.0.2: integrity sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg== rollup@^4.20.0: - version "4.28.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.28.0.tgz#eb8d28ed43ef60a18f21d0734d230ee79dd0de77" - integrity sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ== + version "4.28.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.28.1.tgz#7718ba34d62b449dfc49adbfd2f312b4fe0df4de" + integrity sha512-61fXYl/qNVinKmGSTHAZ6Yy8I3YIJC/r2m9feHo6SwVAVcLT5MPwOUFe7EuURA/4m0NR8lXG4BBXuo/IZEsjMg== dependencies: "@types/estree" "1.0.6" optionalDependencies: - "@rollup/rollup-android-arm-eabi" "4.28.0" - "@rollup/rollup-android-arm64" "4.28.0" - "@rollup/rollup-darwin-arm64" "4.28.0" - "@rollup/rollup-darwin-x64" "4.28.0" - "@rollup/rollup-freebsd-arm64" "4.28.0" - "@rollup/rollup-freebsd-x64" "4.28.0" - "@rollup/rollup-linux-arm-gnueabihf" "4.28.0" - "@rollup/rollup-linux-arm-musleabihf" "4.28.0" - "@rollup/rollup-linux-arm64-gnu" "4.28.0" - "@rollup/rollup-linux-arm64-musl" "4.28.0" - "@rollup/rollup-linux-powerpc64le-gnu" "4.28.0" - "@rollup/rollup-linux-riscv64-gnu" "4.28.0" - "@rollup/rollup-linux-s390x-gnu" "4.28.0" - "@rollup/rollup-linux-x64-gnu" "4.28.0" - "@rollup/rollup-linux-x64-musl" "4.28.0" - "@rollup/rollup-win32-arm64-msvc" "4.28.0" - "@rollup/rollup-win32-ia32-msvc" "4.28.0" - "@rollup/rollup-win32-x64-msvc" "4.28.0" + "@rollup/rollup-android-arm-eabi" "4.28.1" + "@rollup/rollup-android-arm64" "4.28.1" + "@rollup/rollup-darwin-arm64" "4.28.1" + "@rollup/rollup-darwin-x64" "4.28.1" + "@rollup/rollup-freebsd-arm64" "4.28.1" + "@rollup/rollup-freebsd-x64" "4.28.1" + "@rollup/rollup-linux-arm-gnueabihf" "4.28.1" + "@rollup/rollup-linux-arm-musleabihf" "4.28.1" + "@rollup/rollup-linux-arm64-gnu" "4.28.1" + "@rollup/rollup-linux-arm64-musl" "4.28.1" + "@rollup/rollup-linux-loongarch64-gnu" "4.28.1" + "@rollup/rollup-linux-powerpc64le-gnu" "4.28.1" + "@rollup/rollup-linux-riscv64-gnu" "4.28.1" + "@rollup/rollup-linux-s390x-gnu" "4.28.1" + "@rollup/rollup-linux-x64-gnu" "4.28.1" + "@rollup/rollup-linux-x64-musl" "4.28.1" + "@rollup/rollup-win32-arm64-msvc" "4.28.1" + "@rollup/rollup-win32-ia32-msvc" "4.28.1" + "@rollup/rollup-win32-x64-msvc" "4.28.1" fsevents "~2.3.2" roughjs@^4.6.6: @@ -4643,15 +4655,15 @@ shiki-magic-move@^0.4.4: diff-match-patch-es "^0.1.0" ohash "^1.1.4" -shiki@1.24.0, shiki@^1.14.1: - version "1.24.0" - resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.24.0.tgz#ea374523cbf32df0141ad3e5f79d16aea901ab69" - integrity sha512-qIneep7QRwxRd5oiHb8jaRzH15V/S8F3saCXOdjwRLgozZJr5x2yeBhQtqkO3FSzQDwYEFAYuifg4oHjpDghrg== +shiki@1.24.1, shiki@^1.14.1: + version "1.24.1" + resolved "https://registry.yarnpkg.com/shiki/-/shiki-1.24.1.tgz#d3cb1a1ca1db1b3538f0e5ed08247de178cedfbd" + integrity sha512-/qByWMg05+POb63c/OvnrU17FcCUa34WU4F6FCrd/mjDPEDPl8YUNRkRMbo8l3iYMLydfCgxi1r37JFoSw8A4A== dependencies: - "@shikijs/core" "1.24.0" - "@shikijs/engine-javascript" "1.24.0" - "@shikijs/engine-oniguruma" "1.24.0" - "@shikijs/types" "1.24.0" + "@shikijs/core" "1.24.1" + "@shikijs/engine-javascript" "1.24.1" + "@shikijs/engine-oniguruma" "1.24.1" + "@shikijs/types" "1.24.1" "@shikijs/vscode-textmate" "^9.3.0" "@types/hast" "^3.0.4" @@ -4949,9 +4961,9 @@ unicorn-magic@^0.1.0: integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ== unimport@^3.13.2: - version "3.14.3" - resolved "https://registry.yarnpkg.com/unimport/-/unimport-3.14.3.tgz#43d9b59463520e9b6afb15fe8261a7cc8305f15c" - integrity sha512-yEJps4GW7jBdoQlxEV0ElBCJsJmH8FdZtk4oog0y++8hgLh0dGnDpE4oaTc0Lfx4N5rRJiGFUWHrBqC8CyUBmQ== + version "3.14.4" + resolved "https://registry.yarnpkg.com/unimport/-/unimport-3.14.4.tgz#5e9ad35be88518eee990d5fc8e9e9afdd18a7757" + integrity sha512-90jQsiS2D0vIrWg4U58do7B5Hr4q0qt9o/rS0TrDMzrvNuAQ7XF1sQ47Pe2zjVlvFWNkoPBb/2l2GJFy5XjqDg== dependencies: "@rollup/pluginutils" "^5.1.3" acorn "^8.14.0" diff --git a/yarn.lock b/yarn.lock index b97344f534..892839a93b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -488,14 +488,14 @@ resolved "https://registry.yarnpkg.com/@huggingface/jinja/-/jinja-0.3.2.tgz#c1967f0685c69657c2d3b169459f72d5c6acbdec" integrity sha512-F2FvuIc+w1blGsaqJI/OErRbWH6bVJDCBI8Rm5D86yZ2wlwrGERsfIaru7XUv9eYC3DMP3ixDRRtF0h6d8AZcQ== -"@huggingface/transformers@^3.1.1": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@huggingface/transformers/-/transformers-3.1.1.tgz#ee629a1078ef03956f2ff880ffd95f6d2aa00edf" - integrity sha512-/OpCiSKIowo5w5rJAOH3pgZKvpT6DOfDYw9br9Fp8w3qm4oyxc6dOhrxdRLVrmqLbE8rp5dKCePUW34ZBsinsg== +"@huggingface/transformers@^3.1.2": + version "3.1.2" + resolved "https://registry.yarnpkg.com/@huggingface/transformers/-/transformers-3.1.2.tgz#c358560fe8158b6ee33745bdf8adf14bd67975d9" + integrity sha512-+YKHashFDkZbjqTKPyhfRHiIxe1fl5/KqOr3zIHzXmUKhDSH4pwQ2Q58iXT5CUL6iSaZd93x+ep4VmvW6dLAlw== dependencies: "@huggingface/jinja" "^0.3.2" onnxruntime-node "1.20.1" - onnxruntime-web "1.20.1" + onnxruntime-web "1.21.0-dev.20241205-d27fecd3d3" sharp "^0.33.5" "@img/sharp-darwin-arm64@0.33.5": @@ -611,29 +611,29 @@ resolved "https://registry.yarnpkg.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz#56f00962ff0c4e0eb93d34a047d29fa995e3e342" integrity sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg== -"@inquirer/checkbox@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/checkbox/-/checkbox-4.0.2.tgz#e45e0ad2611f2cb2d337ba36c7d955b53f195914" - integrity sha512-+gznPl8ip8P8HYHYecDtUtdsh1t2jvb+sWCD72GAiZ9m45RqwrLmReDaqdC0umQfamtFXVRoMVJ2/qINKGm9Tg== +"@inquirer/checkbox@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@inquirer/checkbox/-/checkbox-4.0.3.tgz#cbd9694e925964f5b0432cc84ab107a8d7a8202d" + integrity sha512-CEt9B4e8zFOGtc/LYeQx5m8nfqQeG/4oNNv0PUvXGG0mys+wR/WbJ3B4KfSQ4Fcr3AQfpiuFOi3fVvmPfvNbxw== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/figures" "^1.0.8" "@inquirer/type" "^3.0.1" ansi-escapes "^4.3.2" yoctocolors-cjs "^2.1.2" -"@inquirer/confirm@^5.0.2": - version "5.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.0.2.tgz#2b9dcf6b7da5f518c74abe4aeaf3173253d83c93" - integrity sha512-KJLUHOaKnNCYzwVbryj3TNBxyZIrr56fR5N45v6K9IPrbT6B7DcudBMfylkV1A8PUdJE15mybkEQyp2/ZUpxUA== +"@inquirer/confirm@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@inquirer/confirm/-/confirm-5.1.0.tgz#061cd0790c8debe092353589a501211b0d6c53ef" + integrity sha512-osaBbIMEqVFjTX5exoqPXs6PilWQdjaLhGtMDXMXg/yxkHXNq43GlxGyTA35lK2HpzUgDN+Cjh/2AmqCN0QJpw== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/type" "^3.0.1" -"@inquirer/core@^10.1.0": - version "10.1.0" - resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.1.0.tgz#c5fdc34c4cafd7248da29a3c3b3120fe6e1c45be" - integrity sha512-I+ETk2AL+yAVbvuKx5AJpQmoaWhpiTFOg/UJb7ZkMAK4blmtG8ATh5ct+T/8xNld0CZG/2UhtkdMwpgvld92XQ== +"@inquirer/core@^10.1.1": + version "10.1.1" + resolved "https://registry.yarnpkg.com/@inquirer/core/-/core-10.1.1.tgz#801e82649fb64bcb2b5e4667397ff8c25bccebab" + integrity sha512-rmZVXy9iZvO3ZStEe/ayuuwIJ23LSF13aPMlLMTQARX6lGUBDHGV8UB5i9MRrfy0+mZwt5/9bdy8llszSD3NQA== dependencies: "@inquirer/figures" "^1.0.8" "@inquirer/type" "^3.0.1" @@ -645,21 +645,21 @@ wrap-ansi "^6.2.0" yoctocolors-cjs "^2.1.2" -"@inquirer/editor@^4.1.0": - version "4.1.0" - resolved "https://registry.yarnpkg.com/@inquirer/editor/-/editor-4.1.0.tgz#bc1a8bebe5897d4b44b0bfab1aeb1b5172f8d812" - integrity sha512-K1gGWsxEqO23tVdp5MT3H799OZ4ER1za7Dlc8F4um0W7lwSv0KGR/YyrUEyimj0g7dXZd8XknM/5QA2/Uy+TbA== +"@inquirer/editor@^4.2.0": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@inquirer/editor/-/editor-4.2.0.tgz#469a00e876afebcfc574bf8114e40c40795688c1" + integrity sha512-Z3LeGsD3WlItDqLxTPciZDbGtm0wrz7iJGS/uUxSiQxef33ZrBq7LhsXg30P7xrWz1kZX4iGzxxj5SKZmJ8W+w== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/type" "^3.0.1" external-editor "^3.1.0" -"@inquirer/expand@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/expand/-/expand-4.0.2.tgz#7b5c332ad604d7d076e7052b8e5006a3b61c3274" - integrity sha512-WdgCX1cUtinz+syKyZdJomovULYlKUWZbVYZzhf+ZeeYf4htAQ3jLymoNs3koIAKfZZl3HUBb819ClCBfyznaw== +"@inquirer/expand@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@inquirer/expand/-/expand-4.0.3.tgz#7593b841d9355c4e7a047071b33e5a58f202ac96" + integrity sha512-MDszqW4HYBpVMmAoy/FA9laLrgo899UAga0itEjsYrBthKieDZNc0e16gdn7N3cQ0DSf/6zsTBZMuDYDQU4ktg== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/type" "^3.0.1" yoctocolors-cjs "^2.1.2" @@ -668,72 +668,72 @@ resolved "https://registry.yarnpkg.com/@inquirer/figures/-/figures-1.0.8.tgz#d9e414a1376a331a0e71b151fea27c48845788b0" integrity sha512-tKd+jsmhq21AP1LhexC0pPwsCxEhGgAkg28byjJAd+xhmIs8LUX8JbUc3vBf3PhLxWiB5EvyBE5X7JSPAqMAqg== -"@inquirer/input@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-4.0.2.tgz#be77b79a1ed182444a6eef2d850309639aa9df22" - integrity sha512-yCLCraigU085EcdpIVEDgyfGv4vBiE4I+k1qRkc9C5dMjWF42ADMGy1RFU94+eZlz4YlkmFsiyHZy0W1wdhaNg== +"@inquirer/input@^4.1.0": + version "4.1.0" + resolved "https://registry.yarnpkg.com/@inquirer/input/-/input-4.1.0.tgz#54b484550c3ecb2e7bf62149a14e9784f08efe6b" + integrity sha512-16B8A9hY741yGXzd8UJ9R8su/fuuyO2e+idd7oVLYjP23wKJ6ILRIIHcnXe8/6AoYgwRS2zp4PNsW/u/iZ24yg== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/type" "^3.0.1" -"@inquirer/number@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/number/-/number-3.0.2.tgz#7e8315b41601d377cc09802b66f32b481e14fd68" - integrity sha512-MKQhYofdUNk7eqJtz52KvM1dH6R93OMrqHduXCvuefKrsiMjHiMwjc3NZw5Imm2nqY7gWd9xdhYrtcHMJQZUxA== +"@inquirer/number@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@inquirer/number/-/number-3.0.3.tgz#e3dd7520e21e9708fea9465b73d20ac851f5f60d" + integrity sha512-HA/W4YV+5deKCehIutfGBzNxWH1nhvUC67O4fC9ufSijn72yrYnRmzvC61dwFvlXIG1fQaYWi+cqNE9PaB9n6Q== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/type" "^3.0.1" -"@inquirer/password@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-4.0.2.tgz#5913e2818b3de1ee6f63ec1b0891a43c1d4bdca9" - integrity sha512-tQXGSu7IO07gsYlGy3VgXRVsbOWqFBMbqAUrJSc1PDTQQ5Qdm+QVwkP0OC0jnUZ62D19iPgXOMO+tnWG+HhjNQ== +"@inquirer/password@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@inquirer/password/-/password-4.0.3.tgz#17af6d8983e2e5c0f231b382ef5c78a8b4b63e95" + integrity sha512-3qWjk6hS0iabG9xx0U1plwQLDBc/HA/hWzLFFatADpR6XfE62LqPr9GpFXBkLU0KQUaIXZ996bNG+2yUvocH8w== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/type" "^3.0.1" ansi-escapes "^4.3.2" "@inquirer/prompts@^7.1.0": - version "7.1.0" - resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-7.1.0.tgz#a55ee589c0eed0ca2ee0fbc7fc63f42f4c31a24e" - integrity sha512-5U/XiVRH2pp1X6gpNAjWOglMf38/Ys522ncEHIKT1voRUvSj/DQnR22OVxHnwu5S+rCFaUiPQ57JOtMFQayqYA== - dependencies: - "@inquirer/checkbox" "^4.0.2" - "@inquirer/confirm" "^5.0.2" - "@inquirer/editor" "^4.1.0" - "@inquirer/expand" "^4.0.2" - "@inquirer/input" "^4.0.2" - "@inquirer/number" "^3.0.2" - "@inquirer/password" "^4.0.2" - "@inquirer/rawlist" "^4.0.2" - "@inquirer/search" "^3.0.2" - "@inquirer/select" "^4.0.2" - -"@inquirer/rawlist@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/rawlist/-/rawlist-4.0.2.tgz#78a58294505bed2a5e133153340f187967916702" - integrity sha512-3XGcskMoVF8H0Dl1S5TSZ3rMPPBWXRcM0VeNVsS4ByWeWjSeb0lPqfnBg6N7T0608I1B2bSVnbi2cwCrmOD1Yw== + version "7.2.0" + resolved "https://registry.yarnpkg.com/@inquirer/prompts/-/prompts-7.2.0.tgz#15010df2257a243866480513d36f3e19c98d7fb1" + integrity sha512-ZXYZ5oGVrb+hCzcglPeVerJ5SFwennmDOPfXq1WyeZIrPGySLbl4W6GaSsBFvu3WII36AOK5yB8RMIEEkBjf8w== + dependencies: + "@inquirer/checkbox" "^4.0.3" + "@inquirer/confirm" "^5.1.0" + "@inquirer/editor" "^4.2.0" + "@inquirer/expand" "^4.0.3" + "@inquirer/input" "^4.1.0" + "@inquirer/number" "^3.0.3" + "@inquirer/password" "^4.0.3" + "@inquirer/rawlist" "^4.0.3" + "@inquirer/search" "^3.0.3" + "@inquirer/select" "^4.0.3" + +"@inquirer/rawlist@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@inquirer/rawlist/-/rawlist-4.0.3.tgz#9964521d3470e153e7e11f228a53cf0afefb217c" + integrity sha512-5MhinSzfmOiZlRoPezfbJdfVCZikZs38ja3IOoWe7H1dxL0l3Z2jAUgbBldeyhhOkELdGvPlBfQaNbeLslib1w== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/type" "^3.0.1" yoctocolors-cjs "^2.1.2" -"@inquirer/search@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/search/-/search-3.0.2.tgz#71fccc766045f2ec37afc402d72ce31838768281" - integrity sha512-Zv4FC7w4dJ13BOJfKRQCICQfShinGjb1bCEIHxTSnjj2telu3+3RHwHubPG9HyD4aix5s+lyAMEK/wSFD75HLA== +"@inquirer/search@^3.0.3": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@inquirer/search/-/search-3.0.3.tgz#791f19a4ee87d65816fd3bb17bd8d76bc11bff07" + integrity sha512-mQTCbdNolTGvGGVCJSI6afDwiSGTV+fMLPEIMDJgIV6L/s3+RYRpxt6t0DYnqMQmemnZ/Zq0vTIRwoHT1RgcTg== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/figures" "^1.0.8" "@inquirer/type" "^3.0.1" yoctocolors-cjs "^2.1.2" -"@inquirer/select@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-4.0.2.tgz#c38ef154524a6859de4a1af11a90ad3f9638c9f2" - integrity sha512-uSWUzaSYAEj0hlzxa1mUB6VqrKaYx0QxGBLZzU4xWFxaSyGaXxsSE4OSOwdU24j0xl8OajgayqFXW0l2bkl2kg== +"@inquirer/select@^4.0.3": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@inquirer/select/-/select-4.0.3.tgz#24a9d744685608ff26262fccb41fa93b4dac615f" + integrity sha512-OZfKDtDE8+J54JYAFTUGZwvKNfC7W/gFCjDkcsO7HnTH/wljsZo9y/FJquOxMy++DY0+9l9o/MOZ8s5s1j5wmw== dependencies: - "@inquirer/core" "^10.1.0" + "@inquirer/core" "^10.1.1" "@inquirer/figures" "^1.0.8" "@inquirer/type" "^3.0.1" ansi-escapes "^4.3.2" @@ -1042,20 +1042,20 @@ integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== "@lvce-editor/ripgrep@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@lvce-editor/ripgrep/-/ripgrep-1.4.0.tgz#0c3ab77061a4f5daf65802d4192354f1b722e5d1" - integrity sha512-DAOmNa8aBE5xW4bJk8z4fqQBE9Rqgums7jrIF2Hs5qnQVGysN7OSal9wyjp756rh/9OVD7c5vT/HcOicKybsww== + version "1.5.0" + resolved "https://registry.yarnpkg.com/@lvce-editor/ripgrep/-/ripgrep-1.5.0.tgz#ebc3648fa33a68e74dc977c6c6443878b47f5c27" + integrity sha512-r6Iokwj9AjqDwZ413KtzaOQjgZ3CpvRtTPRRcxeZyTUH6BRXuClBSVuoOz7uQ3lEpN8QNFhLcYm6JxJrCRNf6Q== dependencies: - "@lvce-editor/verror" "^1.4.0" + "@lvce-editor/verror" "^1.6.0" execa "^9.5.1" extract-zip "^2.0.1" fs-extra "^11.2.0" - got "^14.4.3" + got "^14.4.5" path-exists "^5.0.0" tempy "^3.1.0" xdg-basedir "^5.1.0" -"@lvce-editor/verror@^1.4.0": +"@lvce-editor/verror@^1.6.0": version "1.6.0" resolved "https://registry.yarnpkg.com/@lvce-editor/verror/-/verror-1.6.0.tgz#3eb11604f0d3d2522ac258f912cfdae324e7db56" integrity sha512-/+z23uEXBgJCu8skpdtS3fxr94sI/ss2R85j3OMNoutIFFGJ97gRqJm5rZwMGPap5VcsTnf840InuV5oaVbKdw== @@ -1859,12 +1859,10 @@ agent-base@6: dependencies: debug "4" -agent-base@^7.0.2, agent-base@^7.1.0: - version "7.1.1" - resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.1.tgz#bdbded7dfb096b751a2a087eeeb9664725b2e317" - integrity sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA== - dependencies: - debug "^4.3.4" +agent-base@^7.1.0, agent-base@^7.1.2: + version "7.1.3" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-7.1.3.tgz#29435eb821bc4194633a5b89e5bc4703bafc25a1" + integrity sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw== agentkeepalive@^4.2.1: version "4.5.0" @@ -2187,16 +2185,23 @@ cacheable-request@^12.0.1: normalize-url "^8.0.1" responselike "^3.0.0" -call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.7.tgz#06016599c40c56498c18769d2730be242b6fa3b9" - integrity sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w== +call-bind-apply-helpers@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz#32e5892e6361b29b0b545ba6f7763378daca2840" + integrity sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g== dependencies: - es-define-property "^1.0.0" es-errors "^1.3.0" function-bind "^1.1.2" + +call-bind@^1.0.0, call-bind@^1.0.2, call-bind@^1.0.5, call-bind@^1.0.7: + version "1.0.8" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.8.tgz#0736a9660f537e3388826f440d5ec45f744eaa4c" + integrity sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-define-property "^1.0.0" get-intrinsic "^1.2.4" - set-function-length "^1.2.1" + set-function-length "^1.2.2" caller-callsite@^2.0.0: version "2.0.0" @@ -2498,9 +2503,9 @@ d@1, d@^1.0.1, d@^1.0.2: type "^2.7.2" debug@4, debug@^4.1.1, debug@^4.3.4: - version "4.3.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.7.tgz#87945b4151a011d76d95a198d7111c865c360a52" - integrity sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ== + version "4.4.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.4.0.tgz#2b3f2aea2ffeb776477460267377dc8710faba8a" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: ms "^2.1.3" @@ -2687,6 +2692,15 @@ duck@^0.1.12: dependencies: underscore "^1.13.1" +dunder-proto@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/dunder-proto/-/dunder-proto-1.0.0.tgz#c2fce098b3c8f8899554905f4377b6d85dabaa80" + integrity sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A== + dependencies: + call-bind-apply-helpers "^1.0.0" + es-errors "^1.3.0" + gopd "^1.2.0" + eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" @@ -2736,12 +2750,10 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.0.tgz#c7faefbdff8b2696cf5f46921edfb77cc4ba3845" - integrity sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ== - dependencies: - get-intrinsic "^1.2.4" +es-define-property@^1.0.0, es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/es-define-property/-/es-define-property-1.0.1.tgz#983eb2f9a6724e9303f61addf011c72e09e0b0fa" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== es-errors@^1.3.0: version "1.3.0" @@ -2894,9 +2906,9 @@ events@^3.0.0: integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== execa@^9.5.1: - version "9.5.1" - resolved "https://registry.yarnpkg.com/execa/-/execa-9.5.1.tgz#ab9b68073245e1111bba359962a34fcdb28deef2" - integrity sha512-QY5PPtSonnGwhhHDNI7+3RvY285c7iuJFFB+lU+oEzMY/gEGJ808owqJsrr8Otd1E/x07po1LkUBmdAc5duPAg== + version "9.5.2" + resolved "https://registry.yarnpkg.com/execa/-/execa-9.5.2.tgz#a4551034ee0795e241025d2f987dab3f4242dff2" + integrity sha512-EHlpxMCpHWSAh1dgS6bVeoLAXGnJNdR93aabr4QCGbzOM73o5XmRfM/e5FUqsw3aagP8S8XEWUWFAxnRBnAF0Q== dependencies: "@sindresorhus/merge-streams" "^4.0.0" cross-spawn "^7.0.3" @@ -3174,15 +3186,18 @@ get-caller-file@^2.0.5: integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== get-intrinsic@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.4.tgz#e385f5a4b5227d449c3eabbad05494ef0abbeadd" - integrity sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ== + version "1.2.5" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.5.tgz#dfe7dd1b30761b464fe51bf4bb00ac7c37b681e7" + integrity sha512-Y4+pKa7XeRUPWFNvOOYHkRYrfzW07oraURSvjDmRVOJ748OrVmeXtpE4+GCEHncjCjkTxPNRt8kEbxDhsn6VTg== dependencies: + call-bind-apply-helpers "^1.0.0" + dunder-proto "^1.0.0" + es-define-property "^1.0.1" es-errors "^1.3.0" function-bind "^1.1.2" - has-proto "^1.0.1" - has-symbols "^1.0.3" - hasown "^2.0.0" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" get-stream@^5.1.0: version "5.2.0" @@ -3274,12 +3289,12 @@ globby@^11.0.0: merge2 "^1.4.1" slash "^3.0.0" -gopd@^1.0.1: +gopd@^1.0.1, gopd@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.2.0.tgz#89f56b8217bdbc8802bd299df6d7f1081d7e51a1" integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== -got@^14.4.3: +got@^14.4.5: version "14.4.5" resolved "https://registry.yarnpkg.com/got/-/got-14.4.5.tgz#49a8b49a49a851d658b19e2d1b97e50ef8903f17" integrity sha512-sq+uET8TnNKRNnjEOPJzMcxeI0irT8BBNmf+GtZcJpmhYsQM1DSKmCROUjPWKsXZ5HzwD5Cf5/RV+QD9BSTxJg== @@ -3302,9 +3317,9 @@ gpt-3-encoder@1.1.4: integrity sha512-fSQRePV+HUAhCn7+7HL7lNIXNm6eaFWFbNLOOGtmSJ0qJycyQvj60OvRlH7mee8xAMjBDNRdMXlMwjAbMTDjkg== gpt-tokenizer@^2.7.0: - version "2.7.0" - resolved "https://registry.yarnpkg.com/gpt-tokenizer/-/gpt-tokenizer-2.7.0.tgz#30cb445dd3102ca921c446db300f97a4a9d8a577" - integrity sha512-QjxaGgCZgKp8ecZzy7AmrCbYs+DD+y7GWSRwbe2ZiHPBs1EaK8xUIrt8irnmkAQcNMflpD27tk5yF4m9ig3wgw== + version "2.8.1" + resolved "https://registry.yarnpkg.com/gpt-tokenizer/-/gpt-tokenizer-2.8.1.tgz#505d5d05ed8db9871ad6f50adcbb87111654134c" + integrity sha512-8+a9ojzqfgiF3TK4oivGYjlycD8g5igLt8NQw3ndOIgLVKSGJDhUDNAfYSbtyyuTkha3R/R9F8XrwC7/B5TKfQ== graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.11" @@ -3333,14 +3348,7 @@ has-property-descriptors@^1.0.0, has-property-descriptors@^1.0.2: dependencies: es-define-property "^1.0.0" -has-proto@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.1.0.tgz#deb10494cbbe8809bce168a3b961f42969f5ed43" - integrity sha512-QLdzI9IIO1Jg7f9GT1gXpPpXArAn6cS31R1eEZqz08Gc+uQ8/XiqHWt17Fiw+2p6oTTIq5GXEpQkAlA88YRl/Q== - dependencies: - call-bind "^1.0.7" - -has-symbols@^1.0.3: +has-symbols@^1.0.3, has-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.1.0.tgz#fc9c6a783a084951d0b971fe1018de813707a338" integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== @@ -3357,7 +3365,7 @@ has-unicode@^2.0.1: resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== -hasown@^2.0.0, hasown@^2.0.2: +hasown@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/hasown/-/hasown-2.0.2.tgz#003eaf91be7adc372e84ec59dc37252cedb80003" integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== @@ -3452,12 +3460,12 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" -https-proxy-agent@^7.0.0, https-proxy-agent@^7.0.5: - version "7.0.5" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz#9e8b5013873299e11fab6fd548405da2d6c602b2" - integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== +https-proxy-agent@^7.0.0, https-proxy-agent@^7.0.6: + version "7.0.6" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz#da8dfeac7da130b05c2ba4b59c9b6cd66611a6b9" + integrity sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw== dependencies: - agent-base "^7.0.2" + agent-base "^7.1.2" debug "4" human-signals@^8.0.0: @@ -4537,6 +4545,11 @@ onnxruntime-common@1.20.1: resolved "https://registry.yarnpkg.com/onnxruntime-common/-/onnxruntime-common-1.20.1.tgz#b42e317d4d6728745b9e8089617c8cd938d312dc" integrity sha512-YiU0s0IzYYC+gWvqD1HzLc46Du1sXpSiwzKb63PACIJr6LfL27VsXSXQvt68EzD3V0D5Bc0vyJTjmMxp0ylQiw== +onnxruntime-common@1.21.0-dev.20241205-6ed77cc374: + version "1.21.0-dev.20241205-6ed77cc374" + resolved "https://registry.yarnpkg.com/onnxruntime-common/-/onnxruntime-common-1.21.0-dev.20241205-6ed77cc374.tgz#ee61a9cd63235b028fde3bc2194b0d565c2d0bfc" + integrity sha512-U4DGq/dZiboIEK0Zv1KUuWJesJ/txUALpWSXwI8kqOCSxe8GrI65xfRFeMbqYFhPVGAWZPsBpT1zo1s4ksrlrg== + onnxruntime-common@~1.14.0: version "1.14.0" resolved "https://registry.yarnpkg.com/onnxruntime-common/-/onnxruntime-common-1.14.0.tgz#2bb5dac5261269779aa5fb6536ca379657de8bf6" @@ -4569,15 +4582,15 @@ onnxruntime-web@1.14.0: onnxruntime-common "~1.14.0" platform "^1.3.6" -onnxruntime-web@1.20.1: - version "1.20.1" - resolved "https://registry.yarnpkg.com/onnxruntime-web/-/onnxruntime-web-1.20.1.tgz#71dc4495bb75cdd56a9dc981cf27723a599189f7" - integrity sha512-TePF6XVpLL1rWVMIl5Y9ACBQcyCNFThZON/jgElNd9Txb73CIEGlklhYR3UEr1cp5r0rbGI6nDwwrs79g7WjoA== +onnxruntime-web@1.21.0-dev.20241205-d27fecd3d3: + version "1.21.0-dev.20241205-d27fecd3d3" + resolved "https://registry.yarnpkg.com/onnxruntime-web/-/onnxruntime-web-1.21.0-dev.20241205-d27fecd3d3.tgz#7b6402e1791ddc5114601443c970396d7d1f6323" + integrity sha512-neeC9mv1sFWjUFrTaDl7enufNxbtSSTwR5V2i35ga4yXWS6r1MbpUwWwD1X+VKANujbSG8M5pk/ohRAOm2QhMQ== dependencies: flatbuffers "^1.12.0" guid-typescript "^1.0.9" long "^5.2.3" - onnxruntime-common "1.20.1" + onnxruntime-common "1.21.0-dev.20241205-6ed77cc374" platform "^1.3.6" protobufjs "^7.2.4" @@ -4603,7 +4616,7 @@ openai@^3.2.1: axios "^0.26.0" form-data "^4.0.0" -openai@^4.75.0: +openai@^4.76.0: version "4.76.0" resolved "https://registry.yarnpkg.com/openai/-/openai-4.76.0.tgz#0ba135ff6452eadbce980c604f98799dfa239325" integrity sha512-QBGIetjX1C9xDp5XGa/3mPnfKI9BgAe2xHQX6PmO98wuW9qQaurBaumcYptQWc9LHZZq7cH/Y1Rjnsr6uUDdVw== @@ -4672,9 +4685,9 @@ p-map@^6.0.0: integrity sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw== p-map@^7.0.2: - version "7.0.2" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-7.0.2.tgz#7c5119fada4755660f70199a66aa3fe2f85a1fe8" - integrity sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q== + version "7.0.3" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-7.0.3.tgz#7ac210a2d36f81ec28b736134810f7ba4418cdb6" + integrity sha512-VkndIv2fIB99swvQoA65bm+fsmt6UNdGeIB0oxBs+WhAhdh08QA04JXpI7rbB9r08/nkbysKoya9rtDERYOYMA== p-throttle@^6.2.0: version "6.2.0" @@ -5305,7 +5318,7 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== -set-function-length@^1.2.1: +set-function-length@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/set-function-length/-/set-function-length-1.2.2.tgz#aac72314198eaed975cf77b2c3b6b880695e5449" integrity sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg== @@ -5434,9 +5447,9 @@ simple-xml-to-json@^1.2.2: integrity sha512-kWJDCr9EWtZ+/EYYM5MareWj2cRnZGF93YDNpH4jQiHB+hBIZnfPFSQiVMzZOdk+zXWqTZ/9fTeQNu2DqeiudA== skia-canvas@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/skia-canvas/-/skia-canvas-2.0.0.tgz#e459eef1818779a817a616018fe13c56668d5c2a" - integrity sha512-wpYkmr9mCxBme5HAnlm6YOEiuaN9tIm9CL+HN8e5AFD4K2FAJXCcWiWvc9+LM8jUXt+AyYXgiwUTBxdQ6P+PEg== + version "2.0.1" + resolved "https://registry.yarnpkg.com/skia-canvas/-/skia-canvas-2.0.1.tgz#a9d317a32940d379137fb9ebdccdef2b90b22e09" + integrity sha512-19uIv6uAywwU4iJSPD5TmRYTSfrdParx80c9T/1yuzTAEBvOfF7wWDllrE+LumetNooQhWsBJlnTvp8iOseGNQ== dependencies: "@mapbox/node-pre-gyp" "^1.0.11" cargo-cp-artifact "^0.1" @@ -5780,9 +5793,11 @@ tempy@^3.1.0: unique-string "^3.0.0" text-decoder@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.2.1.tgz#e173f5121d97bfa3ff8723429ad5ba92e1ead67e" - integrity sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ== + version "1.2.2" + resolved "https://registry.yarnpkg.com/text-decoder/-/text-decoder-1.2.2.tgz#63dd2401c43895cecb292e2407db184b50ad60ac" + integrity sha512-/MDslo7ZyWTA2vnk1j7XoDVfXsGk3tp+zFEJHJGm0UjIlQifonVFwlVbQDFh8KJzTBnT8ie115TYqir6bclddA== + dependencies: + b4a "^1.6.4" tiny-emitter@^2.1.0: version "2.1.0" From 3c324a5465049da1a829e2dda6ec2c9ded3e16e5 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 15:12:11 +0000 Subject: [PATCH 03/16] =?UTF-8?q?refactor:=20update=20message=20param=20ty?= =?UTF-8?q?pes=20for=20beta=20caching=20=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/anthropic.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index 97db9b73d1..d72fe3b59e 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -64,7 +64,7 @@ const adjustUsage = ( const convertMessages = ( messages: ChatCompletionMessageParam[] -): Array => { +): Array => { return messages.map(convertSingleMessage) } @@ -93,7 +93,7 @@ const convertSingleMessage = ( const convertToolCallMessage = ( msg: ChatCompletionAssistantMessageParam -): Anthropic.Messages.MessageParam => { +): Anthropic.Beta.PromptCaching.PromptCachingBetaMessageParam => { return { role: "assistant", content: msg.tool_calls.map((tool) => ({ @@ -107,7 +107,7 @@ const convertToolCallMessage = ( const convertToolResultMessage = ( msg: ChatCompletionToolMessageParam -): Anthropic.Messages.MessageParam => { +): Anthropic.Beta.PromptCaching.PromptCachingBetaMessageParam => { return { role: "user", content: [ @@ -125,7 +125,7 @@ const convertStandardMessage = ( | ChatCompletionSystemMessageParam | ChatCompletionAssistantMessageParam | ChatCompletionUserMessageParam -): Anthropic.Messages.MessageParam => { +): Anthropic.Beta.PromptCaching.PromptCachingBetaMessageParam => { const role = msg.role === "assistant" ? "assistant" : "user" if (Array.isArray(msg.content)) { return { @@ -159,7 +159,7 @@ const convertStandardMessage = ( const convertImageUrlBlock = ( block: ChatCompletionContentPartImage -): Anthropic.Messages.ImageBlockParam => { +): Anthropic.Beta.PromptCaching.PromptCachingBetaImageBlockParam => { return { type: "image", source: { @@ -219,14 +219,14 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( const toolCalls: ChatCompletionToolCall[] = [] try { - const stream = anthropic.messages.stream({ + const stream = anthropic.beta.promptCaching.messages.stream({ model, + tools: convertTools(req.tools), messages, max_tokens: req.max_tokens || ANTHROPIC_MAX_TOKEN, temperature: req.temperature, top_p: req.top_p, stream: true, - tools: convertTools(req.tools), ...headers, }) From eaf1c541afe10cf2746bd8812f6c97c6d9b8be09 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 16:32:44 +0000 Subject: [PATCH 04/16] =?UTF-8?q?feat:=20=F0=9F=9A=80=20add=20prompt=20cac?= =?UTF-8?q?hing=20support=20and=20improve=20handling?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../content/docs/reference/scripts/context.md | 10 ++- .../docs/reference/scripts/prompt-caching.mdx | 37 ++++++++++ packages/core/src/chat.ts | 74 ++++++++++++------- packages/core/src/chattypes.ts | 27 +++++-- packages/core/src/openai.ts | 1 + packages/core/src/promptdom.ts | 61 +++++---------- packages/core/src/runpromptcontext.ts | 10 ++- packages/core/src/transformers.ts | 4 +- packages/core/src/types/prompt_template.d.ts | 11 +++ 9 files changed, 155 insertions(+), 80 deletions(-) create mode 100644 docs/src/content/docs/reference/scripts/prompt-caching.mdx diff --git a/docs/src/content/docs/reference/scripts/context.md b/docs/src/content/docs/reference/scripts/context.md index 725f9c6f7f..dd6241cd4e 100644 --- a/docs/src/content/docs/reference/scripts/context.md +++ b/docs/src/content/docs/reference/scripts/context.md @@ -200,13 +200,19 @@ def("FILE", env.files, { sliceSample: 100 }) ### Prompt Caching -You can specify `ephemeral: true` to enable prompt caching optimization. In particular, a `def` with `ephemeral` will be rendered at the back of the prompt -to persist the [cache prefix](https://openai.com/index/api-prompt-caching/). +You can use `cacheControl: "ephemeral"` to specify that the prompt can be cached +for a short amount of time, and enable prompt caching optimization, which is supported (differently) by various LLM providers. + +```js "ephemeral: true" +$`...`.cacheControl("ephemeral") +``` ```js "ephemeral: true" def("FILE", env.files, { ephemeral: true }) ``` +Read more about [prompt caching](/genaiscript/reference/scripts/prompt-caching). + ### Safety: Prompt Injection detection You can schedule a check for prompt injection/jai break with your configured [content safety](/genaiscript/reference/scripts/content-safety) provider. diff --git a/docs/src/content/docs/reference/scripts/prompt-caching.mdx b/docs/src/content/docs/reference/scripts/prompt-caching.mdx new file mode 100644 index 0000000000..13e6914692 --- /dev/null +++ b/docs/src/content/docs/reference/scripts/prompt-caching.mdx @@ -0,0 +1,37 @@ +--- +title: Prompt Caching +sidebar: + order: 80 +--- + +Prompt caching is a feature that can reduce processing time and costs for repetitive prompts. +It is supported by various LLM providers, but the implementation may vary. + +- OpenAI implements an automatic [cache prefix](https://openai.com/index/api-prompt-caching/). +- Anthropic supports settting [cache breakpoints](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching) + +## `ephemeral` + +You can mark `def` section or `$` function with `cacheControl` set as `"ephemeral"` to enable prompt caching optimization. This essentially means that it +is acceptable for the LLM provider to cache the prompt for a short amount of time. + +```js +def("FILE", env.files, { cacheControl: "ephemeral" }) +``` + +```js +$`Some very cool prompt`.cacheControl("ephemeral") +``` + +## LLM provider supporet + +In most cases, the `ephemeral` hint is ignored by LLM providers. However, the following are supported + +### OpenAI, Azure OpenAI + +[Prompt caching](https://platform.openai.com/docs/guides/prompt-caching) of the prompt prefix +is automatically enabled by OpenAI. + +### Anthropic + +- Anthropic: it is translated into a `'cache-control': { ... }` field in the message object diff --git a/packages/core/src/chat.ts b/packages/core/src/chat.ts index fcec008f57..1ff738bada 100644 --- a/packages/core/src/chat.ts +++ b/packages/core/src/chat.ts @@ -343,9 +343,9 @@ ${fenceMD(content, " ")} appendUserMessage( messages, `- ${call.name}(${JSON.stringify(call.arguments || {})}) -\`\`\`\`\` + ${toolResult.join("\n\n")} -\`\`\`\`\` + ` ) else @@ -407,12 +407,12 @@ schema: ${f.args?.schema || ""}, error: ${f.validation.schemaError}` ) .join("\n\n") - const repairMsg = dedent`DATA_FORMAT_ISSUES: -\`\`\` + const repairMsg = +` ${repair} -\`\`\` + -Repair the DATA_FORMAT_ISSUES. THIS IS IMPORTANT.` +Repair the . THIS IS IMPORTANT.` trace.fence(repairMsg, "markdown") messages.push({ role: "user", @@ -962,43 +962,68 @@ export function tracePromptResult(trace: MarkdownTrace, resp: RunPromptResult) { export function appendUserMessage( messages: ChatCompletionMessageParam[], - content: string + content: string, + options?: { ephemeral?: boolean } ) { if (!content) return - const last = messages.at(-1) as ChatCompletionUserMessageParam - if (last?.role === "user") last.content += "\n" + content - else - messages.push({ + const { ephemeral } = options || {} + let last = messages.at(-1) as ChatCompletionUserMessageParam + if ( + last?.role !== "user" || + !!ephemeral !== (last?.cacheControl === "ephemeral") + ) { + last = { role: "user", - content, - } as ChatCompletionUserMessageParam) + content: "", + } satisfies ChatCompletionUserMessageParam + if (ephemeral) last.cacheControl = "ephemeral" + messages.push(last) + } + if (last.content) last.content += "\n" + content + else last.content = content } export function appendAssistantMessage( messages: ChatCompletionMessageParam[], - content: string + content: string, + options?: { ephemeral?: boolean } ) { if (!content) return - const last = messages.at(-1) as ChatCompletionAssistantMessageParam - if (last?.role === "assistant") last.content += "\n" + content - else - messages.push({ + const { ephemeral } = options || {} + let last = messages.at(-1) as ChatCompletionAssistantMessageParam + if ( + last?.role !== "assistant" || + !!ephemeral !== (last?.cacheControl === "ephemeral") + ) { + last = { role: "assistant", - content, - } satisfies ChatCompletionAssistantMessageParam) + content: "", + } satisfies ChatCompletionAssistantMessageParam + if (ephemeral) last.cacheControl = "ephemeral" + messages.push(last) + } + if (last.content) last.content += "\n" + content + else last.content = content } export function appendSystemMessage( messages: ChatCompletionMessageParam[], - content: string + content: string, + options?: { ephemeral?: boolean } ) { if (!content) return + const { ephemeral } = options || {} + let last = messages[0] as ChatCompletionSystemMessageParam - if (last?.role !== "system") { + if ( + last?.role !== "system" || + !!ephemeral !== (last?.cacheControl === "ephemeral") + ) { last = { role: "system", content: "", } as ChatCompletionSystemMessageParam + if (ephemeral) last.cacheControl = "ephemeral" messages.unshift(last) } if (last.content) last.content += SYSTEM_FENCE @@ -1012,10 +1037,9 @@ export function addToolDefinitionsMessage( appendSystemMessage( messages, ` -TOOLS: -\`\`\`yaml + ${YAMLStringify(tools.map((t) => t.spec))} -\`\`\` + ` ) } diff --git a/packages/core/src/chattypes.ts b/packages/core/src/chattypes.ts index f96cca3094..4c463180b6 100644 --- a/packages/core/src/chattypes.ts +++ b/packages/core/src/chattypes.ts @@ -10,7 +10,7 @@ import OpenAI from "openai" /** * Interface representing a custom AI Chat Interface request. */ -export interface AICIRequest { +export interface AICIRequest extends ChatCompletionMessageParamCacheControl { role: "aici" // The role for this type of request content?: string // Optional content of the request error?: unknown // Optional error information @@ -44,19 +44,32 @@ export type ChatCompletionTokenLogprob = OpenAI.ChatCompletionTokenLogprob export type ChatCompletion = OpenAI.Chat.Completions.ChatCompletion export type ChatCompletionChoice = OpenAI.Chat.Completions.ChatCompletion.Choice +export interface ChatCompletionMessageParamCacheControl { + cacheControl?: PromptCacheControlType +} + // Parameters for a system message in a chat completion export type ChatCompletionSystemMessageParam = - OpenAI.Chat.Completions.ChatCompletionSystemMessageParam + OpenAI.Chat.Completions.ChatCompletionSystemMessageParam & + ChatCompletionMessageParamCacheControl // Parameters for a tool message in a chat completion export type ChatCompletionToolMessageParam = - OpenAI.Chat.Completions.ChatCompletionToolMessageParam + OpenAI.Chat.Completions.ChatCompletionToolMessageParam & + ChatCompletionMessageParamCacheControl +export type ChatCompletionFunctionMessageParam = + OpenAI.Chat.Completions.ChatCompletionFunctionMessageParam & + ChatCompletionMessageParamCacheControl /** * Type representing parameters for chat completion messages, including custom AICIRequest. */ export type ChatCompletionMessageParam = - | OpenAI.Chat.Completions.ChatCompletionMessageParam + | ChatCompletionSystemMessageParam + | ChatCompletionUserMessageParam + | ChatCompletionAssistantMessageParam + | ChatCompletionToolMessageParam + | ChatCompletionFunctionMessageParam | AICIRequest /** @@ -75,11 +88,13 @@ export type CreateChatCompletionRequest = Omit< // Parameters for an assistant message in a chat completion export type ChatCompletionAssistantMessageParam = - OpenAI.Chat.Completions.ChatCompletionAssistantMessageParam + OpenAI.Chat.Completions.ChatCompletionAssistantMessageParam & + ChatCompletionMessageParamCacheControl // Parameters for a user message in a chat completion export type ChatCompletionUserMessageParam = - OpenAI.Chat.Completions.ChatCompletionUserMessageParam + OpenAI.Chat.Completions.ChatCompletionUserMessageParam & + ChatCompletionMessageParamCacheControl // Image content part of a chat completion export type ChatCompletionContentPartImage = diff --git a/packages/core/src/openai.ts b/packages/core/src/openai.ts index 63f5ff4d37..9084619ae2 100644 --- a/packages/core/src/openai.ts +++ b/packages/core/src/openai.ts @@ -124,6 +124,7 @@ export const OpenAIChatCompletion: ChatCompletionHandler = async ( const postReq = structuredClone({ ...req, + messages: req.messages.map(({ cacheControl, ...rest }) => ({ ...rest })), stream: true, stream_options: { include_usage: true }, model, diff --git a/packages/core/src/promptdom.ts b/packages/core/src/promptdom.ts index e1f06464f5..fe612d6396 100644 --- a/packages/core/src/promptdom.ts +++ b/packages/core/src/promptdom.ts @@ -75,7 +75,8 @@ export interface PromptNode extends ContextExpansionOptions { error?: unknown // Error information if present tokens?: number // Token count for the node /** - * This text is likely to change within 5 to 10 minutes. + * Definte a prompt caching breakpoint. + * This prompt prefix (including this text) is cacheable for a short amount of time. */ ephemeral?: boolean @@ -478,7 +479,7 @@ export function createDefData( options?: DefDataOptions ) { if (data === undefined) return undefined - let { format, headers, priority } = options || {} + let { format, headers, priority, ephemeral } = options || {} if ( !format && Array.isArray(data) && @@ -512,7 +513,7 @@ ${trimNewlines(text)} ${trimNewlines(text)} ` // TODO maxTokens does not work well with data - return createTextNode(value, { priority }) + return createTextNode(value, { priority, ephemeral }) } // Function to append a child node to a parent node. @@ -616,28 +617,6 @@ export interface PromptNodeRender { disposables: AsyncDisposable[] // Disposables } -/** - * To optimize chat caching with openai, move defs to the back of the prompt - * @see https://platform.openai.com/docs/guides/prompt-caching - * @param mode - * @param root - */ -async function layoutPromptNode(root: PromptNode) { - let changed = false - await visitNode(root, { - node: (n) => { - // sort children - const before = n.children?.map((c) => c.preview)?.join("\n") - n.children?.sort( - (a, b) => (a.ephemeral ? 1 : -1) - (b.ephemeral ? 1 : -1) - ) - const after = n.children?.map((c) => c.preview)?.join("\n") - changed = changed || before !== after - }, - }) - return changed -} - export function resolveFenceFormat(modelid: string): FenceFormat { return DEFAULT_FENCE_FORMAT } @@ -1105,9 +1084,6 @@ export async function renderPromptNode( if (await deduplicatePromptNode(trace, node)) await tracePromptNode(trace, node, { label: "deduplicate" }) - if (await layoutPromptNode(node)) - await tracePromptNode(trace, node, { label: "layout" }) - if (flexTokens) await flexPromptNode(node, { ...options, @@ -1121,11 +1097,14 @@ export async function renderPromptNode( if (safety) await tracePromptNode(trace, node, { label: "safety" }) const messages: ChatCompletionMessageParam[] = [] - const appendSystem = (content: string) => - appendSystemMessage(messages, content) - const appendUser = (content: string) => appendUserMessage(messages, content) - const appendAssistant = (content: string) => - appendAssistantMessage(messages, content) + const appendSystem = (content: string, options: { ephemeral?: boolean }) => + appendSystemMessage(messages, content, options) + const appendUser = (content: string, options: { ephemeral?: boolean }) => + appendUserMessage(messages, content, options) + const appendAssistant = ( + content: string, + options: { ephemeral?: boolean } + ) => appendAssistantMessage(messages, content, options) const images: PromptImage[] = [] const errors: unknown[] = [] @@ -1144,8 +1123,8 @@ export async function renderPromptNode( errors.push(n.error) }, text: async (n) => { - if (n.resolved !== undefined) appendUser(n.resolved) - else if (typeof n.value === "string") appendUser(n.value) + if (n.resolved !== undefined) appendUser(n.resolved, n) + else if (typeof n.value === "string") appendUser(n.value, n) }, def: async (n) => { const value = n.resolved @@ -1162,19 +1141,19 @@ export async function renderPromptNode( }, assistant: async (n) => { const value = await n.resolved - if (value != undefined) appendAssistant(value) + if (value != undefined) appendAssistant(value, n) }, system: async (n) => { const value = await n.resolved - if (value != undefined) appendSystem(value) + if (value != undefined) appendSystem(value, n) }, stringTemplate: async (n) => { const value = n.resolved const role = n.role || "user" if (value != undefined) { - if (role === "system") appendSystem(value) - else if (role === "assistant") appendAssistant(value) - else appendUser(value) + if (role === "system") appendSystem(value, n) + else if (role === "assistant") appendAssistant(value, n) + else appendUser(value, n) } }, image: async (n) => { @@ -1214,7 +1193,7 @@ export async function renderPromptNode( \`\`\`${format + "-schema"} ${trimNewlines(schemaText)} \`\`\`` - appendUser(text) + appendUser(text, n) n.tokens = estimateTokens(text, encoder) if (trace && format !== "json") trace.detailsFenced( diff --git a/packages/core/src/runpromptcontext.ts b/packages/core/src/runpromptcontext.ts index 9cc558bd44..f0a76f220c 100644 --- a/packages/core/src/runpromptcontext.ts +++ b/packages/core/src/runpromptcontext.ts @@ -141,9 +141,7 @@ export function createChatTurnGenerationContext( $: (strings, ...args) => { const current = createStringTemplateNode(strings, args) appendChild(node, current) - const res: PromptTemplateString = Object.freeze(< - PromptTemplateString - >{ + const res: PromptTemplateString = Object.freeze({ priority: (priority) => { current.priority = priority return res @@ -168,7 +166,11 @@ export function createChatTurnGenerationContext( current.role = r return res }, - }) + cacheControl: (cc) => { + current.ephemeral = cc === "ephemeral" + return res + } + } satisfies PromptTemplateString) return res }, def: (name, body, defOptions) => { diff --git a/packages/core/src/transformers.ts b/packages/core/src/transformers.ts index d151c49365..f9b70845c9 100644 --- a/packages/core/src/transformers.ts +++ b/packages/core/src/transformers.ts @@ -24,7 +24,7 @@ import { PLimitPromiseQueue } from "./concurrency" function progressBar(): ProgressCallback { const progress: Record = {} return (cb: ProgressInfo) => { - switch (cb.status as string) { + switch (cb.status) { case "progress": const p = progress[cb.file] || 0 const cp = Math.floor(cb.progress) @@ -34,7 +34,7 @@ function progressBar(): ProgressCallback { } break case "ready": { - logVerbose(`model ${(cb as any).model} ready`) + logVerbose(`model ${cb.model} ready`) logVerbose(``) break } diff --git a/packages/core/src/types/prompt_template.d.ts b/packages/core/src/types/prompt_template.d.ts index b4ddd9220d..9b73b2eb59 100644 --- a/packages/core/src/types/prompt_template.d.ts +++ b/packages/core/src/types/prompt_template.d.ts @@ -903,16 +903,19 @@ interface ContextExpansionOptions { * Specifies an maximum of estimated tokens for this entry; after which it will be truncated. */ maxTokens?: number + /* * Value that is conceptually similar to a zIndex (higher number == higher priority). * If a rendered prompt has more message tokens than can fit into the available context window, the prompt renderer prunes messages with the lowest priority from the ChatMessages result, preserving the order in which they were declared. This means your extension code can safely declare TSX components for potentially large pieces of context like conversation history and codebase context. */ priority?: number + /** * Controls the proportion of tokens allocated from the container's budget to this element. * It defaults to 1 on all elements. */ flex?: number + /** * This text is likely to change and will probably break the prefix cache. */ @@ -2431,6 +2434,8 @@ interface ImportTemplateOptions { allowExtraArguments?: boolean } +type PromptCacheControlType = "ephemeral" + interface PromptTemplateString { /** * Set a priority similar to CSS z-index @@ -2462,6 +2467,12 @@ interface PromptTemplateString { * Updates the role of the message */ role(role: ChatMessageRole): PromptTemplateString + + /** + * Configure the cacheability of the prompt. + * @param value cache control type + */ + cacheControl(value: PromptCacheControlType): PromptTemplateString } type ImportTemplateArgumentType = From a0e559444a036659edfa3b486f50830b8cb50749 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 16:50:14 +0000 Subject: [PATCH 05/16] =?UTF-8?q?feat:=20=E2=9C=A8=20Add=20cache=20control?= =?UTF-8?q?=20to=20message=20conversion=20functions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/anthropic.ts | 75 ++++++++++++++++++++++++---------- 1 file changed, 53 insertions(+), 22 deletions(-) diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index d72fe3b59e..5242e9186d 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -21,7 +21,7 @@ import { ChatCompletionToolMessageParam, } from "./chattypes" -import { logError } from "./util" +import { deleteUndefinedValues, logError } from "./util" import { resolveHttpProxyAgent } from "./proxy" const convertFinishReason = ( @@ -91,17 +91,27 @@ const convertSingleMessage = ( return convertStandardMessage(msg) } +function toCacheControl(msg: ChatCompletionMessageParam): { + type: "ephemeral" +} { + return msg.cacheControl === "ephemeral" ? { type: "ephemeral" } : undefined +} + const convertToolCallMessage = ( msg: ChatCompletionAssistantMessageParam ): Anthropic.Beta.PromptCaching.PromptCachingBetaMessageParam => { return { role: "assistant", - content: msg.tool_calls.map((tool) => ({ - type: "tool_use", - id: tool.id, - input: JSON.parse(tool.function.arguments), - name: tool.function.name, - })), + content: msg.tool_calls.map( + (tool) => + deleteUndefinedValues({ + type: "tool_use", + id: tool.id, + input: JSON.parse(tool.function.arguments), + name: tool.function.name, + cache_control: toCacheControl(msg), + }) satisfies Anthropic.Beta.PromptCaching.PromptCachingBetaToolUseBlockParam + ), } } @@ -111,11 +121,12 @@ const convertToolResultMessage = ( return { role: "user", content: [ - { + deleteUndefinedValues({ type: "tool_result", tool_use_id: msg.tool_call_id, content: msg.content, - }, + cache_control: toCacheControl(msg), + } satisfies Anthropic.Beta.PromptCaching.PromptCachingBetaToolResultBlockParam), ], } } @@ -130,29 +141,44 @@ const convertStandardMessage = ( if (Array.isArray(msg.content)) { return { role, - content: msg.content.map( - ( - block - ): - | Anthropic.Messages.TextBlockParam - | Anthropic.Messages.ImageBlockParam => { + content: msg.content + .map((block) => { + const cache_control = toCacheControl(msg) if (typeof block === "string") { - return { type: "text", text: block } + return { + type: "text", + text: block, + cache_control, + } satisfies Anthropic.Beta.PromptCaching.Messages.PromptCachingBetaTextBlockParam } else if (block.type === "text") { - return { type: "text", text: block.text } + return { + type: "text", + text: block.text, + cache_control, + } satisfies Anthropic.Beta.PromptCaching.Messages.PromptCachingBetaTextBlockParam } else if (block.type === "image_url") { return convertImageUrlBlock(block) } // audio? // Handle other types or return a default - else return { type: "text", text: JSON.stringify(block) } - } - ), + else + return { + type: "text", + text: JSON.stringify(block), + } satisfies Anthropic.Beta.PromptCaching.Messages.PromptCachingBetaTextBlockParam + }) + .map(deleteUndefinedValues), } } else { return { role, - content: [{ type: "text", text: msg.content }], + content: [ + deleteUndefinedValues({ + type: "text", + text: msg.content, + cache_control: toCacheControl(msg), + }) satisfies Anthropic.Beta.PromptCaching.Messages.PromptCachingBetaTextBlockParam, + ], } } } @@ -210,6 +236,8 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( trace.itemValue(`url`, `[${anthropic.baseURL}](${anthropic.baseURL})`) const messages = convertMessages(req.messages) + const caching = req.messages.some((m) => m.cacheControl === "ephemeral") + trace.itemValue(`caching`, caching) let numTokens = 0 let chatResp = "" @@ -219,7 +247,10 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( const toolCalls: ChatCompletionToolCall[] = [] try { - const stream = anthropic.beta.promptCaching.messages.stream({ + const messagesApi = caching + ? anthropic.beta.promptCaching.messages + : anthropic.messages + const stream = messagesApi.stream({ model, tools: convertTools(req.tools), messages, From 3fe86d6f5909d88974a8cad0d3895e9311278e3f Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 17:00:03 +0000 Subject: [PATCH 06/16] =?UTF-8?q?feat:=20=E2=9C=A8=20add=20summary=20scrip?= =?UTF-8?q?t=20with=20caching?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/anthropic.ts | 2 ++ .../genaisrc/summarize-cached.genai.mjs | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 packages/sample/genaisrc/summarize-cached.genai.mjs diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index 5242e9186d..4b050da58a 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -246,6 +246,8 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( let usage: ChatCompletionResponse["usage"] | undefined const toolCalls: ChatCompletionToolCall[] = [] + trace.appendContent("\n") + try { const messagesApi = caching ? anthropic.beta.promptCaching.messages diff --git a/packages/sample/genaisrc/summarize-cached.genai.mjs b/packages/sample/genaisrc/summarize-cached.genai.mjs new file mode 100644 index 0000000000..c911fef5ef --- /dev/null +++ b/packages/sample/genaisrc/summarize-cached.genai.mjs @@ -0,0 +1,20 @@ +script({ + title: "summarize all files", + model: "small", + files: "src/rag/markdown.md", + tests: [ + { + files: "src/rag/markdown.md", + keywords: "markdown", + }, + ], +}) + +def("FILE", env.files, { ephemeral: true }) + +$` +Summarize all files in FILE in a single paragraph. +- Keep it short. +- At most 3 paragraphs. +- Consider all files at once, do NOT summarize files individually. +`.cacheControl("ephemeral") From aaec8d45e2e9d0865757962853c2a99210b2cf6e Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 17:07:40 +0000 Subject: [PATCH 07/16] =?UTF-8?q?feat:=20=F0=9F=94=84=20update=20model=20c?= =?UTF-8?q?onstants=20to=20claude-2.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/constants.ts | 4 ++-- packages/core/src/types/prompt_template.d.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/core/src/constants.ts b/packages/core/src/constants.ts index fe92ef9e7b..35f4e4c000 100644 --- a/packages/core/src/constants.ts +++ b/packages/core/src/constants.ts @@ -61,7 +61,7 @@ export const DEFAULT_MODEL_CANDIDATES = [ "azure_serverless:gpt-4o", DEFAULT_MODEL, "google:gemini-1.5-pro-002", - "anthropic:claude-2", + "anthropic:claude-2.1", "mistral:mistral-large-latest", "github:gpt-4o", "client:gpt-4", @@ -72,7 +72,7 @@ export const DEFAULT_VISION_MODEL_CANDIDATES = [ "azure_serverless:gpt-4o", DEFAULT_MODEL, "google:gemini-1.5-pro-002", - "anthropic:claude-2", + "anthropic:claude-2.1", "github:gpt-4o", ] export const DEFAULT_SMALL_MODEL = "openai:gpt-4o-mini" diff --git a/packages/core/src/types/prompt_template.d.ts b/packages/core/src/types/prompt_template.d.ts index 9b73b2eb59..4e78a2849b 100644 --- a/packages/core/src/types/prompt_template.d.ts +++ b/packages/core/src/types/prompt_template.d.ts @@ -148,7 +148,6 @@ type ModelType = OptionsOrString< | "anthropic:claude-3-sonnet-20240229" | "anthropic:claude-3-haiku-20240307" | "anthropic:claude-2.1" - | "anthropic:claude-2.0" | "anthropic:claude-instant-1.2" | "huggingface:microsoft/Phi-3-mini-4k-instruct" | "google:gemini-1.5-flash" From d2a7c52b15bdbdcbf50e52d0951bc8e408c0ed8a Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 17:14:51 +0000 Subject: [PATCH 08/16] add anthropic github action --- .github/workflows/anthropic.yml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/anthropic.yml diff --git a/.github/workflows/anthropic.yml b/.github/workflows/anthropic.yml new file mode 100644 index 0000000000..f64653b58c --- /dev/null +++ b/.github/workflows/anthropic.yml @@ -0,0 +1,38 @@ +name: anthropic tests +on: + workflow_dispatch: + pull_request: + paths: + - yarn.lock + - ".github/workflows/anthropic.yml" + - "packages/core/**/*" + - "packages/cli/**/*" + - "packages/samples/**/*" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-ollama + cancel-in-progress: true +jobs: + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: "recursive" + fetch-depth: 0 + - uses: actions/setup-node@v4 + with: + node-version: "20" + cache: yarn + - run: yarn install --frozen-lockfile + - name: typecheck + run: yarn typecheck + - name: compile + run: yarn compile + - name: poem + run: yarn run:script poem --model anthropic:claude-3-5-sonnet-20240620 --out-trace $GITHUB_STEP_SUMMARY + env: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + - name: cache + run: yarn test:scripts summarize-cached --model anthropic:claude-3-5-sonnet-20240620 --out-trace $GITHUB_STEP_SUMMARY + env: + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} From 110200f19e4e76e2620f1691fa3437b017318415 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 17:31:19 +0000 Subject: [PATCH 09/16] typo --- .github/workflows/anthropic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/anthropic.yml b/.github/workflows/anthropic.yml index f64653b58c..f1e9b354df 100644 --- a/.github/workflows/anthropic.yml +++ b/.github/workflows/anthropic.yml @@ -33,6 +33,6 @@ jobs: env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - name: cache - run: yarn test:scripts summarize-cached --model anthropic:claude-3-5-sonnet-20240620 --out-trace $GITHUB_STEP_SUMMARY + run: yarn test:scripts summarize-cached --models anthropic:claude-3-5-sonnet-20240620 --out-trace $GITHUB_STEP_SUMMARY env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} From 3ff69d3722d8cb173504c8e0b668fa910d9637f7 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 17:34:27 +0000 Subject: [PATCH 10/16] =?UTF-8?q?docs:=20update=20prompt=20caching=20detai?= =?UTF-8?q?ls=20and=20links=20=F0=9F=94=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docs/reference/scripts/prompt-caching.mdx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/docs/src/content/docs/reference/scripts/prompt-caching.mdx b/docs/src/content/docs/reference/scripts/prompt-caching.mdx index 13e6914692..92e35ed464 100644 --- a/docs/src/content/docs/reference/scripts/prompt-caching.mdx +++ b/docs/src/content/docs/reference/scripts/prompt-caching.mdx @@ -7,9 +7,6 @@ sidebar: Prompt caching is a feature that can reduce processing time and costs for repetitive prompts. It is supported by various LLM providers, but the implementation may vary. -- OpenAI implements an automatic [cache prefix](https://openai.com/index/api-prompt-caching/). -- Anthropic supports settting [cache breakpoints](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching) - ## `ephemeral` You can mark `def` section or `$` function with `cacheControl` set as `"ephemeral"` to enable prompt caching optimization. This essentially means that it @@ -30,8 +27,14 @@ In most cases, the `ephemeral` hint is ignored by LLM providers. However, the fo ### OpenAI, Azure OpenAI [Prompt caching](https://platform.openai.com/docs/guides/prompt-caching) of the prompt prefix -is automatically enabled by OpenAI. +is automatically enabled by OpenAI. All ephemeral annotations are removed. + +- [OpenAI Documentation](https://openai.com/index/api-prompt-caching/). ### Anthropic -- Anthropic: it is translated into a `'cache-control': { ... }` field in the message object +The `ephemeral` annotation is converted into `'cache-control': { ... }` field in the message object. + +Note that prompt caching is still marked as beta and not supported in all models (specially the older ones). + +- [Anthropic Documentation](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching) From 9bcc90280ea5653ec258deb6d17a9f6865bd9d4d Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 17:36:50 +0000 Subject: [PATCH 11/16] =?UTF-8?q?feat:=20enhance=20caching=20logic=20with?= =?UTF-8?q?=20model=20pattern=20regex=20=F0=9F=8E=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/anthropic.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index 4b050da58a..857b5137d2 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -236,7 +236,10 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( trace.itemValue(`url`, `[${anthropic.baseURL}](${anthropic.baseURL})`) const messages = convertMessages(req.messages) - const caching = req.messages.some((m) => m.cacheControl === "ephemeral") + // https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching#how-to-implement-prompt-caching + const caching = + /sonnet|haiku|opus/i.test(model) && + req.messages.some((m) => m.cacheControl === "ephemeral") trace.itemValue(`caching`, caching) let numTokens = 0 From 96d47a6278701211f06b101465ff5dd7e2307785 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 17:39:40 +0000 Subject: [PATCH 12/16] =?UTF-8?q?feat:=20=F0=9F=8E=A8=20update=20usage=20t?= =?UTF-8?q?oken=20calculation=20logic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/anthropic.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index 857b5137d2..96916f0e7e 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -42,11 +42,16 @@ const convertFinishReason = ( } const convertUsage = ( - usage: Anthropic.Usage | undefined + usage: + | Anthropic.Beta.PromptCaching.Messages.PromptCachingBetaUsage + | undefined ): ChatCompletionUsage | undefined => { if (!usage) return undefined return { - prompt_tokens: usage.input_tokens, + prompt_tokens: + usage.input_tokens + + (usage.cache_creation_input_tokens || 0) + + (usage.cache_read_input_tokens || 0), completion_tokens: usage.output_tokens, total_tokens: usage.input_tokens + usage.output_tokens, } satisfies ChatCompletionUsage From 23d851f01b16f6666563c45190a13346ab2f86fc Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 17:47:47 +0000 Subject: [PATCH 13/16] =?UTF-8?q?feat:=20improve=20usage=20handling=20&=20?= =?UTF-8?q?add=20new=20pricing=20=F0=9F=9B=A0=EF=B8=8F=F0=9F=92=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/anthropic.ts | 14 +++++++++++--- packages/core/src/pricing.json | 5 +++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index 96916f0e7e..c19830bae3 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -47,14 +47,19 @@ const convertUsage = ( | undefined ): ChatCompletionUsage | undefined => { if (!usage) return undefined - return { + const res = { prompt_tokens: usage.input_tokens + (usage.cache_creation_input_tokens || 0) + (usage.cache_read_input_tokens || 0), completion_tokens: usage.output_tokens, total_tokens: usage.input_tokens + usage.output_tokens, - } satisfies ChatCompletionUsage + } as ChatCompletionUsage + if (usage.cache_read_input_tokens) + res.prompt_tokens_details = { + cached_tokens: usage.cache_read_input_tokens, + } + return res } const adjustUsage = ( usage: ChatCompletionUsage, @@ -279,7 +284,10 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( switch (chunk.type) { case "message_start": - usage = convertUsage(chunk.message.usage) + usage = convertUsage( + chunk.message + .usage as Anthropic.Beta.PromptCaching.Messages.PromptCachingBetaUsage + ) break case "content_block_start": diff --git a/packages/core/src/pricing.json b/packages/core/src/pricing.json index 15276f390d..b2ebf0944f 100644 --- a/packages/core/src/pricing.json +++ b/packages/core/src/pricing.json @@ -347,5 +347,10 @@ "mistral:mistral-nemo": { "price_per_million_input_tokens": 0.2, "price_per_million_output_tokens": 0.6 + }, + "anthropic:claude-3-5-sonnet-20240620": { + "price_per_million_input_tokens": 3, + "price_per_million_output_tokens": 15, + "input_cache_token_rebate": 0.1 } } From 7bf07b500845271b4c9d6af0960551305b951d77 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 19:23:35 +0000 Subject: [PATCH 14/16] =?UTF-8?q?ci:=20=F0=9F=94=A7=20remove=20output=20tr?= =?UTF-8?q?ace=20from=20cache=20command?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/anthropic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/anthropic.yml b/.github/workflows/anthropic.yml index f1e9b354df..8b630a2f03 100644 --- a/.github/workflows/anthropic.yml +++ b/.github/workflows/anthropic.yml @@ -33,6 +33,6 @@ jobs: env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - name: cache - run: yarn test:scripts summarize-cached --models anthropic:claude-3-5-sonnet-20240620 --out-trace $GITHUB_STEP_SUMMARY + run: yarn test:scripts summarize-cached --models anthropic:claude-3-5-sonnet-20240620 env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} From 44f113e39d608c7ed940bc2035d3b9a904c636a3 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 19:29:09 +0000 Subject: [PATCH 15/16] =?UTF-8?q?feat:=20=F0=9F=94=84=20add=20caching=20fo?= =?UTF-8?q?r=20chat=20completion=20requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/anthropic.ts | 54 ++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 2 deletions(-) diff --git a/packages/core/src/anthropic.ts b/packages/core/src/anthropic.ts index c19830bae3..330fda2afe 100644 --- a/packages/core/src/anthropic.ts +++ b/packages/core/src/anthropic.ts @@ -23,6 +23,10 @@ import { import { deleteUndefinedValues, logError } from "./util" import { resolveHttpProxyAgent } from "./proxy" +import { + ChatCompletionRequestCacheKey, + getChatCompletionCache, +} from "./chatcache" const convertFinishReason = ( stopReason: Anthropic.Message["stop_reason"] @@ -231,11 +235,49 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( options, trace ) => { - const { requestOptions, partialCb, cancellationToken, inner } = options + const { + requestOptions, + partialCb, + cancellationToken, + inner, + cacheName, + cache: cacheOrName, + } = options const { headers } = requestOptions || {} + const { token, source, ...cfgNoToken } = cfg const { model } = parseModelIdentifier(req.model) const { encode: encoder } = await resolveTokenEncoder(model) + const cache = !!cacheOrName || !!cacheName + const cacheStore = getChatCompletionCache( + typeof cacheOrName === "string" ? cacheOrName : cacheName + ) + const cachedKey = cache + ? { + ...req, + ...cfgNoToken, + model: req.model, + temperature: req.temperature, + top_p: req.top_p, + max_tokens: req.max_tokens, + logit_bias: req.logit_bias, + } + : undefined + trace.itemValue(`caching`, cache) + trace.itemValue(`cache`, cacheStore?.name) + const { text: cached, finishReason: cachedFinishReason } = + (await cacheStore.get(cachedKey)) || {} + if (cached !== undefined) { + partialCb?.({ + tokensSoFar: estimateTokens(cached, encoder), + responseSoFar: cached, + responseChunk: cached, + inner, + }) + trace.itemValue(`cache hit`, await cacheStore.getKeySHA(cachedKey)) + return { text: cached, finishReason: cachedFinishReason, cached: true } + } + const { default: Anthropic } = await import("@anthropic-ai/sdk") const httpAgent = resolveHttpProxyAgent() const anthropic = new Anthropic({ @@ -342,13 +384,21 @@ export const AnthropicChatCompletion: ChatCompletionHandler = async ( trace.appendContent("\n\n") trace.itemValue(`🏁 finish reason`, finishReason) + if (usage) { + trace.itemValue( + `🪙 tokens`, + `${usage.total_tokens} total, ${usage.prompt_tokens} prompt, ${usage.completion_tokens} completion` + ) + } + if (finishReason === "stop") + await cacheStore.set(cachedKey, { text: chatResp, finishReason }) return { text: chatResp, finishReason, usage, toolCalls: toolCalls.filter((x) => x !== undefined), - } + } satisfies ChatCompletionResponse } async function listModels( From 2cbd3d67bf2e5314d776b2cefc41a97de442509f Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Mon, 9 Dec 2024 19:34:30 +0000 Subject: [PATCH 16/16] =?UTF-8?q?ci:=20=F0=9F=94=84=20fix=20model=20flag?= =?UTF-8?q?=20in=20anthropic.yml=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/anthropic.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/anthropic.yml b/.github/workflows/anthropic.yml index 8b630a2f03..b1836a564d 100644 --- a/.github/workflows/anthropic.yml +++ b/.github/workflows/anthropic.yml @@ -33,6 +33,6 @@ jobs: env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - name: cache - run: yarn test:scripts summarize-cached --models anthropic:claude-3-5-sonnet-20240620 + run: yarn test:scripts summarize-cached --model anthropic:claude-3-5-sonnet-20240620 env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}