diff --git a/.vscode/settings.json b/.vscode/settings.json index 8d913ec..a3c1c49 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,7 @@ "**/node_modules": true, "**/__pycache__": true, "**/.venv": true, - "**/dist": true, + // "**/dist": true, "*/**/.claude": true, "**/tsconfig.tsbuildinfo": true }, diff --git a/Makefile b/Makefile index 0c935ca..6b45349 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,8 @@ endif .DEFAULT_GOAL := help .PHONY: deps build build-server build-cli build-ui ui-dist \ - test test-go test-ui test-py \ - lint lint-go lint-ui lint-py \ + test test-go test-ui \ + lint lint-go lint-ui \ vet tidy \ dev prod docker clean list help @@ -58,7 +58,7 @@ build-ui: ui-dist # ── Quality ─────────────────────────────────────────────────────────────────── -test: test-go test-ui test-py +test: test-go test-ui test-go: @echo "» go test $(ARGS) $(GO_TARGETS)" @@ -68,11 +68,11 @@ test-ui: @echo "» vitest run" cd bifrost/ui && npm run test -- --run -test-py: - @echo "» uv test" - cd orchestrator && uv run python -m pytest +# test-py: +# @echo "» uv test" +# cd orchestrator && uv run python -m pytest -lint: lint-go lint-ui lint-py +lint: lint-go lint-ui lint-go: @echo "» golangci-lint run $(ARGS) $(GO_TARGETS)" @@ -82,9 +82,9 @@ lint-ui: @echo "» oxlint" cd bifrost/ui && npm run lint -lint-py: - @echo "» uv run ruff" - cd orchestrator && uv run ruff check --fix . && uv run ruff format . +# lint-py: +# @echo "» uv run ruff" +# cd orchestrator && uv run ruff check --fix . && uv run ruff format . vet: @echo "» go vet $(ARGS) $(GO_TARGETS)" diff --git a/orchestrator/package-lock.json b/orchestrator/package-lock.json index 675c2ad..67654d7 100644 --- a/orchestrator/package-lock.json +++ b/orchestrator/package-lock.json @@ -1,36 +1,30 @@ { "name": "orchestrator", - "version": "1.0.0", + "version": "0.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orchestrator", - "version": "1.0.0", + "version": "0.0.0", "workspaces": [ "packages/**" ], - "dependencies": { - "gray-matter": "^4.0.3", - "handlebars": "^4.7.9", - "yaml": "^2.8.4" - }, "devDependencies": { - "@types/node": "^25.6.2", + "@types/node": "^25.7.0", "typescript": "^6.0.3", - "typescript-eslint": "^8.59.2", "vite": "^8.0.12", "vite-plugin-dts": "^5.0.0", - "vitest": "^4.1.5" + "vitest": "^4.1.6" }, "engines": { "node": ">=24.0.0" } }, "node_modules/@anthropic-ai/claude-agent-sdk": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.2.138.tgz", - "integrity": "sha512-rH6dFI3DBBsPBPcHTBdTZCHA14OCt2t4+6XYi2MJB/GlFrnZvlWmMIk2z9uxAiZ05Txg8YbftgSuE5A1qpAXwg==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.2.140.tgz", + "integrity": "sha512-Zq2L7YCoTdbxTUi3/soN1axrTqbG7GoKuc6Im8EpkBRdwaY0D1W9+Ux3vAbV/cX8Qk31Vck7DQLZz1lGEArdoQ==", "license": "SEE LICENSE IN README.md", "dependencies": { "@anthropic-ai/sdk": "^0.81.0", @@ -40,23 +34,23 @@ "node": ">=18.0.0" }, "optionalDependencies": { - "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.138", - "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.138", - "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.138", - "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.138", - "@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.138", - "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.138", - "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.138", - "@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.138" + "@anthropic-ai/claude-agent-sdk-darwin-arm64": "0.2.140", + "@anthropic-ai/claude-agent-sdk-darwin-x64": "0.2.140", + "@anthropic-ai/claude-agent-sdk-linux-arm64": "0.2.140", + "@anthropic-ai/claude-agent-sdk-linux-arm64-musl": "0.2.140", + "@anthropic-ai/claude-agent-sdk-linux-x64": "0.2.140", + "@anthropic-ai/claude-agent-sdk-linux-x64-musl": "0.2.140", + "@anthropic-ai/claude-agent-sdk-win32-arm64": "0.2.140", + "@anthropic-ai/claude-agent-sdk-win32-x64": "0.2.140" }, "peerDependencies": { "zod": "^4.0.0" } }, "node_modules/@anthropic-ai/claude-agent-sdk-darwin-arm64": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.2.138.tgz", - "integrity": "sha512-aObxJ/GeJ5UxT9N8XypUHPYQKpwYsRT5THiJl5E2pKEUk/Xt42gT55N5GV0TOjtgxVAnDMWjxTAgGCGoDzjgpg==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-arm64/-/claude-agent-sdk-darwin-arm64-0.2.140.tgz", + "integrity": "sha512-zEbDsDKeoDO4DzbyX6wBVlcPhLy/gYiCrKzKnxmkOhyNtJBeshgiOTdr+M7WX1xcuI/M/UhEY+B9U6oo884lAQ==", "cpu": [ "arm64" ], @@ -67,9 +61,9 @@ ] }, "node_modules/@anthropic-ai/claude-agent-sdk-darwin-x64": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.2.138.tgz", - "integrity": "sha512-ou3i1/gAf2PEgVl2WYJb7ZdE+KGwoB1I46JRhWHSC3uD6lb9HMZam233T/rlKCVX9e5dzfkujUOnmCkmXjgVGQ==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-darwin-x64/-/claude-agent-sdk-darwin-x64-0.2.140.tgz", + "integrity": "sha512-BFJGeZEksvERy7mMJ0mkNAWoMrZOgl6XN/mKPaunGnaC/i+1ykx7xih7e58bRhsrzKzo2mnUrwtjiFyF3MFNRQ==", "cpu": [ "x64" ], @@ -80,9 +74,9 @@ ] }, "node_modules/@anthropic-ai/claude-agent-sdk-linux-arm64": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.2.138.tgz", - "integrity": "sha512-jp8lmAVe9uI9X5o+IYWFajLbN+Z80XogVX7NeyaenLHdpHkxg29Yf8pb6Os4OvHMjJOAdwDhPpXajf6RtBeEDA==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64/-/claude-agent-sdk-linux-arm64-0.2.140.tgz", + "integrity": "sha512-FauGGg3zikxrjAUnu+Pso6zD9Qv4Z2+QBiTiZqc12U+x4uoikNsplymUnsJ7MYD9VaTGmLJuZ9pCch0IiKrseQ==", "cpu": [ "arm64" ], @@ -96,9 +90,9 @@ ] }, "node_modules/@anthropic-ai/claude-agent-sdk-linux-arm64-musl": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.2.138.tgz", - "integrity": "sha512-uZaEFND1pl7KD9tdYqj2hd6ktjlYizVmkHRgU2Aj/P1CC6WMDsKG+rqPP7dsVXO77gMXhL4xjjwwqMjxx83HkA==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-arm64-musl/-/claude-agent-sdk-linux-arm64-musl-0.2.140.tgz", + "integrity": "sha512-nG7xLL0nKb4ymFVnX0QhSGLoyhh9fuuDpBR+TYz5O4ZQc2RVUMSMqGusqcCNEIGxAKQSVKWCf0WgpCG/edAO9Q==", "cpu": [ "arm64" ], @@ -112,9 +106,9 @@ ] }, "node_modules/@anthropic-ai/claude-agent-sdk-linux-x64": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.2.138.tgz", - "integrity": "sha512-SLuUmu/nH1Wh0wnoXj/Bwh0nbDfEn9PgXqMsZHEUk3x1zxeR+6aRqFLjKZ8TawBey7xod7nfYUIjPnQx6IWDzg==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64/-/claude-agent-sdk-linux-x64-0.2.140.tgz", + "integrity": "sha512-7f627Tq2mIiwFoBYfCKTdEeZSP90r8UOWu/I5DezudTtwtoVl2zRaRCnJ8c4rW+Tzw+xWSfP/pHvR9bTQGXaOw==", "cpu": [ "x64" ], @@ -128,9 +122,9 @@ ] }, "node_modules/@anthropic-ai/claude-agent-sdk-linux-x64-musl": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.2.138.tgz", - "integrity": "sha512-T16F8Vkikb98E781ZM6Cx84yEBk+loSCqAObjaZ1hzQ1eKcpnxzSTF4rH2bz6N91dhFuCfIjFaBfNYg+oQA+yQ==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-linux-x64-musl/-/claude-agent-sdk-linux-x64-musl-0.2.140.tgz", + "integrity": "sha512-EZ7VzOGmvft/1ymh2rwts5v3yPnsGGlGrTJlY2Dqnr1ABF43JIhEm1NFYrLnXQWSN74s5Pj8tgkPbYS9x4BhFA==", "cpu": [ "x64" ], @@ -144,9 +138,9 @@ ] }, "node_modules/@anthropic-ai/claude-agent-sdk-win32-arm64": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.2.138.tgz", - "integrity": "sha512-H/sD25fmMyEeJWamYmBKRS3E7jaIrg2S8KWxyR37P+xTZgkLe19sDTp7gYYywMXf1X9CJZJ8jJZ93qxINZoCeA==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-arm64/-/claude-agent-sdk-win32-arm64-0.2.140.tgz", + "integrity": "sha512-9EOozRF+LTt3UedeJtjJXC8pj9VTAFtPBuB+/YUmcpmDAEH9qcWWknWhf7NDKTapKtBWkNP/387x+18L15MLqg==", "cpu": [ "arm64" ], @@ -157,9 +151,9 @@ ] }, "node_modules/@anthropic-ai/claude-agent-sdk-win32-x64": { - "version": "0.2.138", - "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.2.138.tgz", - "integrity": "sha512-cSOdTH1OfIamVdJit9laWZiXne81ewgdP8MGh5HzLLLci0NGHkME7YxCWd0lYkCNkfiOEcToKU9axaZ+84jGiw==", + "version": "0.2.140", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk-win32-x64/-/claude-agent-sdk-win32-x64-0.2.140.tgz", + "integrity": "sha512-puQyWoYiqosjDEYULWAS/lBJse1vzib0NmQj/bYTirWCbtiUcu6ixKMd4NmLbE+Si/DKTB8XNz6hVZ/KckqeoQ==", "cpu": [ "x64" ], @@ -171,8 +165,6 @@ }, "node_modules/@anthropic-ai/sdk": { "version": "0.81.0", - "resolved": "https://registry.npmjs.org/@anthropic-ai/sdk/-/sdk-0.81.0.tgz", - "integrity": "sha512-D4K5PvEV6wPiRtVlVsJHIUhHAmOZ6IT/I9rKlTf84gR7GyyAurPJK7z9BOf/AZqC5d1DhYQGJNKRmV+q8dGhgw==", "license": "MIT", "dependencies": { "json-schema-to-ts": "^3.1.1" @@ -191,17 +183,11 @@ }, "node_modules/@babel/runtime": { "version": "7.29.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz", - "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==", "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@bifrost-ai/core": { - "resolved": "packages/core", - "link": true - }, "node_modules/@bifrost-ai/engine": { "resolved": "packages/engine", "link": true @@ -211,7 +197,7 @@ "link": true }, "node_modules/@bifrost-ai/orchestrator": { - "resolved": "packages/cli", + "resolved": "packages/orchestrator", "link": true }, "node_modules/@bifrost-ai/task-source": { @@ -260,122 +246,8 @@ "tslib": "^2.4.0" } }, - "node_modules/@eslint-community/eslint-utils": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.9.1.tgz", - "integrity": "sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "eslint-visitor-keys": "^3.4.3" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" - } - }, - "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", - "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/@eslint-community/regexpp": { - "version": "4.12.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", - "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.0.0 || ^14.0.0 || >=16.0.0" - } - }, - "node_modules/@eslint/config-array": { - "version": "0.23.5", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", - "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/object-schema": "^3.0.5", - "debug": "^4.3.1", - "minimatch": "^10.2.4" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/config-helpers": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.5.tgz", - "integrity": "sha512-eIJYKTCECbP/nsKaaruF6LW967mtbQbsw4JTtSVkUQc9MneSkbrgPJAbKl9nWr0ZeowV8BfsarBmPpBzGelA2w==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/core": "^1.2.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/core": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", - "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@types/json-schema": "^7.0.15" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/object-schema": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", - "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, - "node_modules/@eslint/plugin-kit": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.1.tgz", - "integrity": "sha512-rZAP3aVgB9ds9KOeUSL+zZ21hPmo8dh6fnIFwRQj5EAZl9gzR7wxYbYXYysAM8CTqGmUGyp2S4kUdV17MnGuWQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@eslint/core": "^1.2.1", - "levn": "^0.4.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - } - }, "node_modules/@hono/node-server": { "version": "1.19.14", - "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.14.tgz", - "integrity": "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==", "license": "MIT", "engines": { "node": ">=18.14.1" @@ -384,81 +256,8 @@ "hono": "^4" } }, - "node_modules/@humanfs/core": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", - "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@humanfs/types": "^0.15.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/node": { - "version": "0.16.8", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", - "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "dependencies": { - "@humanfs/core": "^0.19.2", - "@humanfs/types": "^0.15.0", - "@humanwhocodes/retry": "^0.4.0" - }, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanfs/types": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", - "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18.0" - } - }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=12.22" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, - "node_modules/@humanwhocodes/retry": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", - "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", - "dev": true, - "license": "Apache-2.0", - "peer": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", - "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", "dev": true, "license": "MIT", "dependencies": { @@ -468,8 +267,6 @@ }, "node_modules/@jridgewell/remapping": { "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", - "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", "dev": true, "license": "MIT", "dependencies": { @@ -479,8 +276,6 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", - "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, "license": "MIT", "engines": { @@ -489,15 +284,11 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.5.5", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", - "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", "dev": true, "license": "MIT", "dependencies": { @@ -507,8 +298,6 @@ }, "node_modules/@modelcontextprotocol/sdk": { "version": "1.29.0", - "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.29.0.tgz", - "integrity": "sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==", "license": "MIT", "dependencies": { "@hono/node-server": "^1.19.9", @@ -547,8 +336,6 @@ }, "node_modules/@modelcontextprotocol/sdk/node_modules/ajv": { "version": "8.20.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", - "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -563,8 +350,6 @@ }, "node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "license": "MIT" }, "node_modules/@napi-rs/wasm-runtime": { @@ -588,8 +373,6 @@ }, "node_modules/@oxc-project/types": { "version": "0.129.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.129.0.tgz", - "integrity": "sha512-3oz8m3FGdr2nDXVqmFUw7jolKliC4MoyXYIG2c7gpjBnzUWQpUGIYcXYKxTdTi+N2jusvt610ckTMkxdwHkYEg==", "dev": true, "license": "MIT", "funding": { @@ -763,8 +546,6 @@ }, "node_modules/@rolldown/binding-linux-x64-gnu": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0.tgz", - "integrity": "sha512-Dfn7iak9BcMMePxcoJfpSbWqnEyrp/dRF63/8qW/eHBdOZov6x5aShLLEYGYdIeSJ6vMLK/XCVB+lGIxm41bQA==", "cpu": [ "x64" ], @@ -873,15 +654,11 @@ }, "node_modules/@rolldown/pluginutils": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0.tgz", - "integrity": "sha512-aKs/3GSWyV0mrhNmt/96/Z3yczC3yvrzYATCiCXQebBsGyYzjNdUphRVLeJQ67ySKVXRfMxt2lm12pmXvbPFQQ==", "dev": true, "license": "MIT" }, "node_modules/@rollup/pluginutils": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", - "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", "dev": true, "license": "MIT", "dependencies": { @@ -903,15 +680,11 @@ }, "node_modules/@rollup/pluginutils/node_modules/estree-walker": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", - "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", "dev": true, "license": "MIT" }, "node_modules/@standard-schema/spec": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", - "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", "dev": true, "license": "MIT" }, @@ -928,8 +701,6 @@ }, "node_modules/@types/chai": { "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", "dev": true, "license": "MIT", "dependencies": { @@ -939,285 +710,31 @@ }, "node_modules/@types/deep-eql": { "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", "dev": true, "license": "MIT" }, - "node_modules/@types/esrecurse": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", - "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/@types/estree": { "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", - "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, - "node_modules/@types/json-schema": { - "version": "7.0.15", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", - "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/@types/node": { - "version": "25.6.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.6.2.tgz", - "integrity": "sha512-sokuT28dxf9JT5Kady1fsXOvI4HVpjZa95NKT5y9PNTIrs2AsobR4GFAA90ZG8M+nxVRLysCXsVj6eGC7Vbrlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~7.19.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.59.2.tgz", - "integrity": "sha512-j/bwmkBvHUtPNxzuWe5z6BEk3q54YRyGlBXkSsmfoih7zNrBvl5A9A98anlp/7JbyZcWIJ8KXo/3Tq/DjFLtuQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.59.2", - "@typescript-eslint/type-utils": "8.59.2", - "@typescript-eslint/utils": "8.59.2", - "@typescript-eslint/visitor-keys": "8.59.2", - "ignore": "^7.0.5", - "natural-compare": "^1.4.0", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "@typescript-eslint/parser": "^8.59.2", - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", - "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, - "node_modules/@typescript-eslint/parser": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.59.2.tgz", - "integrity": "sha512-plR3pp6D+SSUn1HM7xvSkx12/DhoHInI2YF35KAcVFNZvlC0gtrWqx7Qq1oH2Ssgi0vlFRCTbP+DZc7B9+TtsQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/scope-manager": "8.59.2", - "@typescript-eslint/types": "8.59.2", - "@typescript-eslint/typescript-estree": "8.59.2", - "@typescript-eslint/visitor-keys": "8.59.2", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/project-service": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.59.2.tgz", - "integrity": "sha512-+2hqvEkeyf/0FBor67duF0Ll7Ot8jyKzDQOSrxazF/danillRq2DwR9dLptsXpoZQqxE1UisSmoZewrlPas9Vw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.59.2", - "@typescript-eslint/types": "^8.59.2", - "debug": "^4.4.3" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.59.2.tgz", - "integrity": "sha512-JzfyEpEtOU89CcFSwyNS3mu4MLvLSXqnmX05+aKBDM+TdR5jzcGOEBwxwGNxrEQ7p/z6kK2WyioCGBf2zZBnvg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.59.2", - "@typescript-eslint/visitor-keys": "8.59.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.59.2.tgz", - "integrity": "sha512-BKK4alN7oi4C/zv4VqHQ+uRU+lTa6JGIZ7s1juw7b3RHo9OfKB+bKX3u0iVZetdsUCBBkSbdWbarJbmN0fTeSw==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/type-utils": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.59.2.tgz", - "integrity": "sha512-nhqaj1nmTdVVl/BP5omXNRGO38jn5iosis2vbdmupF2txCf8ylWT8lx+JlvMYYVqzGVKtjojUFoQ3JRWK+mfzQ==", + "version": "25.7.0", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.59.2", - "@typescript-eslint/typescript-estree": "8.59.2", - "@typescript-eslint/utils": "8.59.2", - "debug": "^4.4.3", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/types": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.59.2.tgz", - "integrity": "sha512-e82GVOE8Ps3E++Egvb6Y3Dw0S10u8NkQ9KXmtRhCWJJ8kDhOJTvtMAWnFL16kB1583goCWXsr0NieKCZMs2/0Q==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.59.2.tgz", - "integrity": "sha512-o0XPGNwcWw+FIwStOWn+BwBuEmL6QXP0rsvAFg7ET1dey1Nr6Wb1ac8p5HEsK0ygO/6mUxlk+YWQD9xcb/nnXg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/project-service": "8.59.2", - "@typescript-eslint/tsconfig-utils": "8.59.2", - "@typescript-eslint/types": "8.59.2", - "@typescript-eslint/visitor-keys": "8.59.2", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/utils": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.59.2.tgz", - "integrity": "sha512-Juw3EinkXqjaffxz6roowvV7GZT/kET5vSKKZT6upl5TXdWkLkYmNPXwDDL2Vkt2DPn0nODIS4egC/0AGxKo/Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.59.2", - "@typescript-eslint/types": "8.59.2", - "@typescript-eslint/typescript-estree": "8.59.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, - "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.59.2.tgz", - "integrity": "sha512-NwjLUnGy8/Zfx23fl50tRC8rYaYnM52xNRYFAXvmiil9yh1+K6aRVQMnzW6gQB/1DLgWt977lYQn7C+wtgXZiA==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/types": "8.59.2", - "eslint-visitor-keys": "^5.0.0" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" + "undici-types": "~7.21.0" } }, "node_modules/@vitest/expect": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.5.tgz", - "integrity": "sha512-PWBaRY5JoKuRnHlUHfpV/KohFylaDZTupcXN1H9vYryNLOnitSw60Mw9IAE2r67NbwwzBw/Cc/8q9BK3kIX8Kw==", + "version": "4.1.6", "dev": true, "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.1.0", "@types/chai": "^5.2.2", - "@vitest/spy": "4.1.5", - "@vitest/utils": "4.1.5", + "@vitest/spy": "4.1.6", + "@vitest/utils": "4.1.6", "chai": "^6.2.2", "tinyrainbow": "^3.1.0" }, @@ -1226,13 +743,11 @@ } }, "node_modules/@vitest/mocker": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.5.tgz", - "integrity": "sha512-/x2EmFC4mT4NNzqvC3fmesuV97w5FC903KPmey4gsnJiMQ3Be1IlDKVaDaG8iqaLFHqJ2FVEkxZk5VmeLjIItw==", + "version": "4.1.6", "dev": true, "license": "MIT", "dependencies": { - "@vitest/spy": "4.1.5", + "@vitest/spy": "4.1.6", "estree-walker": "^3.0.3", "magic-string": "^0.30.21" }, @@ -1253,9 +768,7 @@ } }, "node_modules/@vitest/pretty-format": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.5.tgz", - "integrity": "sha512-7I3q6l5qr03dVfMX2wCo9FxwSJbPdwKjy2uu/YPpU3wfHvIL4QHwVRp57OfGrDFeUJ8/8QdfBKIV12FTtLn00g==", + "version": "4.1.6", "dev": true, "license": "MIT", "dependencies": { @@ -1266,13 +779,11 @@ } }, "node_modules/@vitest/runner": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.5.tgz", - "integrity": "sha512-2D+o7Pr82IEO46YPpoA/YU0neeyr6FTerQb5Ro7BUnBuv6NQtT/kmVnczngiMEBhzgqz2UZYl5gArejsyERDSQ==", + "version": "4.1.6", "dev": true, "license": "MIT", "dependencies": { - "@vitest/utils": "4.1.5", + "@vitest/utils": "4.1.6", "pathe": "^2.0.3" }, "funding": { @@ -1280,14 +791,12 @@ } }, "node_modules/@vitest/snapshot": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.5.tgz", - "integrity": "sha512-zypXEt4KH/XgKGPUz4eC2AvErYx0My5hfL8oDb1HzGFpEk1P62bxSohdyOmvz+d9UJwanI68MKwr2EquOaOgMQ==", + "version": "4.1.6", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.5", - "@vitest/utils": "4.1.5", + "@vitest/pretty-format": "4.1.6", + "@vitest/utils": "4.1.6", "magic-string": "^0.30.21", "pathe": "^2.0.3" }, @@ -1296,9 +805,7 @@ } }, "node_modules/@vitest/spy": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.5.tgz", - "integrity": "sha512-2lNOsh6+R2Idnf1TCZqSwYlKN2E/iDlD8sgU59kYVl+OMDmvldO1VDk39smRfpUNwYpNRVn3w4YfuC7KfbBnkQ==", + "version": "4.1.6", "dev": true, "license": "MIT", "funding": { @@ -1306,13 +813,11 @@ } }, "node_modules/@vitest/utils": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.5.tgz", - "integrity": "sha512-76wdkrmfXfqGjueGgnb45ITPyUi1ycZ4IHgC2bhPDUfWHklY/q3MdLOAB+TF1e6xfl8NxNY0ZYaPCFNWSsw3Ug==", + "version": "4.1.6", "dev": true, "license": "MIT", "dependencies": { - "@vitest/pretty-format": "4.1.5", + "@vitest/pretty-format": "4.1.6", "convert-source-map": "^2.0.0", "tinyrainbow": "^3.1.0" }, @@ -1322,8 +827,6 @@ }, "node_modules/@volar/language-core": { "version": "2.4.28", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.28.tgz", - "integrity": "sha512-w4qhIJ8ZSitgLAkVay6AbcnC7gP3glYM3fYwKV3srj8m494E3xtrCv6E+bWviiK/8hs6e6t1ij1s2Endql7vzQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1332,15 +835,11 @@ }, "node_modules/@volar/source-map": { "version": "2.4.28", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.28.tgz", - "integrity": "sha512-yX2BDBqJkRXfKw8my8VarTyjv48QwxdJtvRgUpNE5erCsgEUdI2DsLbpa+rOQVAJYshY99szEcRDmyHbF10ggQ==", "dev": true, "license": "MIT" }, "node_modules/@volar/typescript": { "version": "2.4.28", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.28.tgz", - "integrity": "sha512-Ja6yvWrbis2QtN4ClAKreeUZPVYMARDYZl9LMEv1iQ1QdepB6wn0jTRxA9MftYmYa4DQ4k/DaSZpFPUfxl8giw==", "dev": true, "license": "MIT", "dependencies": { @@ -1351,8 +850,6 @@ }, "node_modules/accepts": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", - "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", "license": "MIT", "dependencies": { "mime-types": "^3.0.0", @@ -1364,8 +861,6 @@ }, "node_modules/acorn": { "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", "bin": { @@ -1375,39 +870,8 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-jsx": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", - "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "license": "MIT", - "peer": true, - "peerDependencies": { - "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, - "node_modules/ajv": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", - "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, "node_modules/ajv-formats": { "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", - "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "license": "MIT", "dependencies": { "ajv": "^8.0.0" @@ -1423,8 +887,6 @@ }, "node_modules/ajv-formats/node_modules/ajv": { "version": "8.20.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", - "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3", @@ -1439,14 +901,10 @@ }, "node_modules/ajv-formats/node_modules/json-schema-traverse": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "license": "MIT" }, "node_modules/argparse": { "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "license": "MIT", "dependencies": { "sprintf-js": "~1.0.2" @@ -1454,28 +912,14 @@ }, "node_modules/assertion-error": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", "dev": true, "license": "MIT", "engines": { "node": ">=12" } }, - "node_modules/balanced-match": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", - "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", - "dev": true, - "license": "MIT", - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/body-parser": { "version": "2.2.2", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.2.tgz", - "integrity": "sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==", "license": "MIT", "dependencies": { "bytes": "^3.1.2", @@ -1496,23 +940,8 @@ "url": "https://opencollective.com/express" } }, - "node_modules/brace-expansion": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", - "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^4.0.2" - }, - "engines": { - "node": "18 || 20 || >=22" - } - }, "node_modules/bytes": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -1520,8 +949,6 @@ }, "node_modules/call-bind-apply-helpers": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -1533,8 +960,6 @@ }, "node_modules/call-bound": { "version": "1.0.4", - "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", - "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -1549,8 +974,6 @@ }, "node_modules/chai": { "version": "6.2.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", - "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", "dev": true, "license": "MIT", "engines": { @@ -1559,22 +982,16 @@ }, "node_modules/compare-versions": { "version": "6.1.1", - "resolved": "https://registry.npmjs.org/compare-versions/-/compare-versions-6.1.1.tgz", - "integrity": "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg==", "dev": true, "license": "MIT" }, "node_modules/confbox": { "version": "0.2.4", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.2.4.tgz", - "integrity": "sha512-ysOGlgTFbN2/Y6Cg3Iye8YKulHw+R2fNXHrgSmXISQdMnomY6eNDprVdW9R5xBguEqI954+S6709UyiO7B+6OQ==", "dev": true, "license": "MIT" }, "node_modules/content-disposition": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz", - "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==", "license": "MIT", "engines": { "node": ">=18" @@ -1586,8 +1003,6 @@ }, "node_modules/content-type": { "version": "1.0.5", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", - "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -1595,15 +1010,11 @@ }, "node_modules/convert-source-map": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", - "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, "license": "MIT" }, "node_modules/cookie": { "version": "0.7.2", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", - "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -1611,8 +1022,6 @@ }, "node_modules/cookie-signature": { "version": "1.2.2", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", - "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", "license": "MIT", "engines": { "node": ">=6.6.0" @@ -1620,8 +1029,6 @@ }, "node_modules/cors": { "version": "2.8.6", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz", - "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==", "license": "MIT", "dependencies": { "object-assign": "^4", @@ -1637,8 +1044,6 @@ }, "node_modules/cross-spawn": { "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "license": "MIT", "dependencies": { "path-key": "^3.1.0", @@ -1651,8 +1056,6 @@ }, "node_modules/debug": { "version": "4.4.3", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", - "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "license": "MIT", "dependencies": { "ms": "^2.1.3" @@ -1666,18 +1069,8 @@ } } }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/depd": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -1685,8 +1078,6 @@ }, "node_modules/detect-libc": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -1695,8 +1086,6 @@ }, "node_modules/dunder-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.1", @@ -1709,14 +1098,10 @@ }, "node_modules/ee-first": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "license": "MIT" }, "node_modules/encodeurl": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", - "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -1724,8 +1109,6 @@ }, "node_modules/es-define-property": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -1733,8 +1116,6 @@ }, "node_modules/es-errors": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", - "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -1742,229 +1123,44 @@ }, "node_modules/es-module-lexer": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.1.0.tgz", - "integrity": "sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==", "dev": true, "license": "MIT" }, "node_modules/es-object-atoms": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", - "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0" }, "engines": { - "node": ">= 0.4" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "license": "MIT" - }, - "node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.3.0.tgz", - "integrity": "sha512-XbEXaRva5cF0ZQB8w6MluHA0kZZfV2DuCMJ3ozyEOHLwDpZX2Lmm/7Pp0xdJmI0GL1W05VH5VwIFHEm1Vcw2gw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "@eslint-community/eslint-utils": "^4.8.0", - "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.5", - "@eslint/config-helpers": "^0.5.5", - "@eslint/core": "^1.2.1", - "@eslint/plugin-kit": "^0.7.1", - "@humanfs/node": "^0.16.6", - "@humanwhocodes/module-importer": "^1.0.1", - "@humanwhocodes/retry": "^0.4.2", - "@types/estree": "^1.0.6", - "ajv": "^6.14.0", - "cross-spawn": "^7.0.6", - "debug": "^4.3.2", - "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.2", - "eslint-visitor-keys": "^5.0.1", - "espree": "^11.2.0", - "esquery": "^1.7.0", - "esutils": "^2.0.2", - "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^8.0.0", - "find-up": "^5.0.0", - "glob-parent": "^6.0.2", - "ignore": "^5.2.0", - "imurmurhash": "^0.1.4", - "is-glob": "^4.0.0", - "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.4", - "natural-compare": "^1.4.0", - "optionator": "^0.9.3" - }, - "bin": { - "eslint": "bin/eslint.js" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://eslint.org/donate" - }, - "peerDependencies": { - "jiti": "*" - }, - "peerDependenciesMeta": { - "jiti": { - "optional": true - } - } - }, - "node_modules/eslint-scope": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", - "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "@types/esrecurse": "^4.3.1", - "@types/estree": "^1.0.8", - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/eslint-visitor-keys": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", - "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", - "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/espree": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", - "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "acorn": "^8.16.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^5.0.1" - }, - "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" - }, - "funding": { - "url": "https://opencollective.com/eslint" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "license": "BSD-2-Clause", - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/esquery": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", - "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", - "dev": true, - "license": "BSD-3-Clause", - "peer": true, - "dependencies": { - "estraverse": "^5.1.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/esrecurse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", - "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "estraverse": "^5.2.0" - }, - "engines": { - "node": ">=4.0" + "node": ">= 0.4" } }, - "node_modules/estraverse": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", - "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true, + "node_modules/escape-html": { + "version": "1.0.3", + "license": "MIT" + }, + "node_modules/esprima": { + "version": "4.0.1", "license": "BSD-2-Clause", - "peer": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, "engines": { - "node": ">=4.0" + "node": ">=4" } }, "node_modules/estree-walker": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", "dev": true, "license": "MIT", "dependencies": { "@types/estree": "^1.0.0" } }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/etag": { "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -1972,8 +1168,6 @@ }, "node_modules/eventsource": { "version": "3.0.7", - "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz", - "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==", "license": "MIT", "dependencies": { "eventsource-parser": "^3.0.1" @@ -1984,8 +1178,6 @@ }, "node_modules/eventsource-parser": { "version": "3.0.8", - "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.0.8.tgz", - "integrity": "sha512-70QWGkr4snxr0OXLRWsFLeRBIRPuQOvt4s8QYjmUlmlkyTZkRqS7EDVRZtzU3TiyDbXSzaOeF0XUKy8PchzukQ==", "license": "MIT", "engines": { "node": ">=18.0.0" @@ -1993,8 +1185,6 @@ }, "node_modules/expect-type": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.3.0.tgz", - "integrity": "sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==", "dev": true, "license": "Apache-2.0", "engines": { @@ -2003,8 +1193,6 @@ }, "node_modules/express": { "version": "5.2.1", - "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", - "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", "license": "MIT", "dependencies": { "accepts": "^2.0.0", @@ -2046,8 +1234,6 @@ }, "node_modules/express-rate-limit": { "version": "8.5.1", - "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.5.1.tgz", - "integrity": "sha512-5O6KYmyJEpuPJV5hNTXKbAHWRqrzyu+OI3vUnSd2kXFubIVpG7ezpgxQy76Zo5GQZtrQBg86hF+CM/NX+cioiQ==", "license": "MIT", "dependencies": { "ip-address": "^10.2.0" @@ -2064,15 +1250,11 @@ }, "node_modules/exsolve": { "version": "1.0.8", - "resolved": "https://registry.npmjs.org/exsolve/-/exsolve-1.0.8.tgz", - "integrity": "sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==", "dev": true, "license": "MIT" }, "node_modules/extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==", "license": "MIT", "dependencies": { "is-extendable": "^0.1.0" @@ -2083,30 +1265,10 @@ }, "node_modules/fast-deep-equal": { "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "license": "MIT" }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/fast-uri": { "version": "3.1.2", - "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.2.tgz", - "integrity": "sha512-rVjf7ArG3LTk+FS6Yw81V1DLuZl1bRbNrev6Tmd/9RaroeeRRJhAt7jg/6YFxbvAQXUCavSoZhPPj6oOx+5KjQ==", "funding": [ { "type": "github", @@ -2121,8 +1283,6 @@ }, "node_modules/fdir": { "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", "dev": true, "license": "MIT", "engines": { @@ -2137,24 +1297,8 @@ } } }, - "node_modules/file-entry-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", - "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "flat-cache": "^4.0.0" - }, - "engines": { - "node": ">=16.0.0" - } - }, "node_modules/finalhandler": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", - "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", "license": "MIT", "dependencies": { "debug": "^4.4.0", @@ -2172,51 +1316,8 @@ "url": "https://opencollective.com/express" } }, - "node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/flat-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", - "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "flatted": "^3.2.9", - "keyv": "^4.5.4" - }, - "engines": { - "node": ">=16" - } - }, - "node_modules/flatted": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", - "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", - "dev": true, - "license": "ISC", - "peer": true - }, "node_modules/forwarded": { "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -2224,8 +1325,6 @@ }, "node_modules/fresh": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", - "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -2248,8 +1347,6 @@ }, "node_modules/function-bind": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -2257,8 +1354,6 @@ }, "node_modules/get-intrinsic": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "license": "MIT", "dependencies": { "call-bind-apply-helpers": "^1.0.2", @@ -2281,8 +1376,6 @@ }, "node_modules/get-proto": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", "license": "MIT", "dependencies": { "dunder-proto": "^1.0.1", @@ -2292,24 +1385,8 @@ "node": ">= 0.4" } }, - "node_modules/glob-parent": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", - "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", - "dev": true, - "license": "ISC", - "peer": true, - "dependencies": { - "is-glob": "^4.0.3" - }, - "engines": { - "node": ">=10.13.0" - } - }, "node_modules/gopd": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -2320,8 +1397,6 @@ }, "node_modules/gray-matter": { "version": "4.0.3", - "resolved": "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz", - "integrity": "sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==", "license": "MIT", "dependencies": { "js-yaml": "^3.13.1", @@ -2335,8 +1410,6 @@ }, "node_modules/handlebars": { "version": "4.7.9", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", - "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", "license": "MIT", "dependencies": { "minimist": "^1.2.5", @@ -2356,8 +1429,6 @@ }, "node_modules/has-symbols": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -2368,8 +1439,6 @@ }, "node_modules/hasown": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.3.tgz", - "integrity": "sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==", "license": "MIT", "dependencies": { "function-bind": "^1.1.2" @@ -2380,8 +1449,6 @@ }, "node_modules/hono": { "version": "4.12.18", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.18.tgz", - "integrity": "sha512-RWzP96k/yv0PQfyXnWjs6zot20TqfpfsNXhOnev8d1InAxubW93L11/oNUc3tQqn2G0bSdAOBpX+2uDFHV7kdQ==", "license": "MIT", "engines": { "node": ">=16.9.0" @@ -2389,8 +1456,6 @@ }, "node_modules/http-errors": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", - "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", "license": "MIT", "dependencies": { "depd": "~2.0.0", @@ -2409,8 +1474,6 @@ }, "node_modules/iconv-lite": { "version": "0.7.2", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.2.tgz", - "integrity": "sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==", "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -2423,38 +1486,12 @@ "url": "https://opencollective.com/express" } }, - "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/imurmurhash": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", - "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.8.19" - } - }, "node_modules/inherits": { "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "license": "ISC" }, "node_modules/ip-address": { "version": "10.2.0", - "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.2.0.tgz", - "integrity": "sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==", "license": "MIT", "engines": { "node": ">= 12" @@ -2462,8 +1499,6 @@ }, "node_modules/ipaddr.js": { "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", "license": "MIT", "engines": { "node": ">= 0.10" @@ -2471,54 +1506,21 @@ }, "node_modules/is-extendable": { "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, "license": "MIT", - "peer": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, "engines": { "node": ">=0.10.0" } }, "node_modules/is-promise": { "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", - "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "license": "ISC" }, "node_modules/jose": { "version": "6.2.3", - "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.3.tgz", - "integrity": "sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/panva" @@ -2526,8 +1528,6 @@ }, "node_modules/js-yaml": { "version": "3.14.2", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.2.tgz", - "integrity": "sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==", "license": "MIT", "dependencies": { "argparse": "^1.0.7", @@ -2537,18 +1537,8 @@ "js-yaml": "bin/js-yaml.js" } }, - "node_modules/json-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", - "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/json-schema-to-ts": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/json-schema-to-ts/-/json-schema-to-ts-3.1.1.tgz", - "integrity": "sha512-+DWg8jCJG2TEnpy7kOm/7/AxaYoaRbjVB4LFZLySZlWn8exGs3A4OLJR966cVvU26N7X9TWxl+Jsw7dzAqKT6g==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.18.3", @@ -2558,43 +1548,12 @@ "node": ">=16" } }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true, - "license": "MIT", - "peer": true - }, "node_modules/json-schema-typed": { "version": "8.0.2", - "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz", - "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==", "license": "BSD-2-Clause" }, - "node_modules/json-stable-stringify-without-jsonify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", - "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true, - "license": "MIT", - "peer": true - }, - "node_modules/keyv": { - "version": "4.5.4", - "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", - "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "json-buffer": "3.0.1" - } - }, "node_modules/kind-of": { "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -2602,30 +1561,11 @@ }, "node_modules/kolorist": { "version": "1.8.0", - "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", - "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", "dev": true, "license": "MIT" }, - "node_modules/levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/lightningcss": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", - "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", "dev": true, "license": "MPL-2.0", "dependencies": { @@ -2807,8 +1747,6 @@ }, "node_modules/lightningcss-linux-x64-gnu": { "version": "1.32.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", - "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", "cpu": [ "x64" ], @@ -2897,8 +1835,6 @@ }, "node_modules/local-pkg": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-1.1.2.tgz", - "integrity": "sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==", "dev": true, "license": "MIT", "dependencies": { @@ -2913,27 +1849,8 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/magic-string": { "version": "0.30.21", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", - "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", "dev": true, "license": "MIT", "dependencies": { @@ -2942,8 +1859,6 @@ }, "node_modules/math-intrinsics": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -2951,8 +1866,6 @@ }, "node_modules/media-typer": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", - "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -2960,8 +1873,6 @@ }, "node_modules/merge-descriptors": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", - "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", "license": "MIT", "engines": { "node": ">=18" @@ -2972,8 +1883,6 @@ }, "node_modules/mime-db": { "version": "1.54.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", - "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -2981,8 +1890,6 @@ }, "node_modules/mime-types": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", - "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", "license": "MIT", "dependencies": { "mime-db": "^1.54.0" @@ -2995,26 +1902,8 @@ "url": "https://opencollective.com/express" } }, - "node_modules/minimatch": { - "version": "10.2.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", - "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", - "dev": true, - "license": "BlueOak-1.0.0", - "dependencies": { - "brace-expansion": "^5.0.5" - }, - "engines": { - "node": "18 || 20 || >=22" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/minimist": { "version": "1.2.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3022,8 +1911,6 @@ }, "node_modules/mlly": { "version": "1.8.2", - "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.8.2.tgz", - "integrity": "sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==", "dev": true, "license": "MIT", "dependencies": { @@ -3035,15 +1922,11 @@ }, "node_modules/mlly/node_modules/confbox": { "version": "0.1.8", - "resolved": "https://registry.npmjs.org/confbox/-/confbox-0.1.8.tgz", - "integrity": "sha512-RMtmw0iFkeR4YV+fUOSucriAQNb9g8zFR52MWCtl+cCZOFRNL6zeB395vPzFhEjjn4fMxXudmELnl/KF/WrK6w==", "dev": true, "license": "MIT" }, "node_modules/mlly/node_modules/pkg-types": { "version": "1.3.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.3.1.tgz", - "integrity": "sha512-/Jm5M4RvtBFVkKWRu2BLUTNP8/M2a+UwuAX+ae4770q1qVGtfjG+WTCupoZixokjmHiry8uI+dlY8KXYV5HVVQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3054,14 +1937,10 @@ }, "node_modules/ms": { "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.12", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.12.tgz", - "integrity": "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==", "dev": true, "funding": [ { @@ -3077,17 +1956,8 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true, - "license": "MIT" - }, "node_modules/negotiator": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", - "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -3095,14 +1965,10 @@ }, "node_modules/neo-async": { "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", "license": "MIT" }, "node_modules/object-assign": { "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3110,8 +1976,6 @@ }, "node_modules/object-inspect": { "version": "1.13.4", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", - "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -3122,8 +1986,6 @@ }, "node_modules/obug": { "version": "2.1.1", - "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.1.tgz", - "integrity": "sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==", "dev": true, "funding": [ "https://github.com/sponsors/sxzz", @@ -3133,8 +1995,6 @@ }, "node_modules/on-finished": { "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", "license": "MIT", "dependencies": { "ee-first": "1.1.1" @@ -3145,70 +2005,13 @@ }, "node_modules/once": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "license": "ISC", "dependencies": { "wrappy": "1" } }, - "node_modules/optionator": { - "version": "0.9.4", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", - "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.5" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "p-limit": "^3.0.2" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/parseurl": { "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -3216,26 +2019,11 @@ }, "node_modules/path-browserify": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", "dev": true, "license": "MIT" }, - "node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/path-key": { "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "license": "MIT", "engines": { "node": ">=8" @@ -3243,8 +2031,6 @@ }, "node_modules/path-to-regexp": { "version": "8.4.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz", - "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==", "license": "MIT", "funding": { "type": "opencollective", @@ -3253,22 +2039,16 @@ }, "node_modules/pathe": { "version": "2.0.3", - "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", - "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", "dev": true, "license": "MIT" }, "node_modules/picocolors": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", "dev": true, "license": "ISC" }, "node_modules/picomatch": { "version": "4.0.4", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", - "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", "engines": { @@ -3280,8 +2060,6 @@ }, "node_modules/pkce-challenge": { "version": "5.0.1", - "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz", - "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==", "license": "MIT", "engines": { "node": ">=16.20.0" @@ -3289,8 +2067,6 @@ }, "node_modules/pkg-types": { "version": "2.3.1", - "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-2.3.1.tgz", - "integrity": "sha512-y+ichcgc2LrADuhLNAx8DFjVfgz91pRxfZdI3UDhxHvcVEZsenLO+7XaU5vOp0u/7V/wZ+plyuQxtrDlZJ+yeg==", "dev": true, "license": "MIT", "dependencies": { @@ -3301,8 +2077,6 @@ }, "node_modules/postcss": { "version": "8.5.14", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.14.tgz", - "integrity": "sha512-SoSL4+OSEtR99LHFZQiJLkT59C5B1amGO1NzTwj7TT1qCUgUO6hxOvzkOYxD+vMrXBM3XJIKzokoERdqQq/Zmg==", "dev": true, "funding": [ { @@ -3328,21 +2102,8 @@ "node": "^10 || ^12 || >=14" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/proxy-addr": { "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", "license": "MIT", "dependencies": { "forwarded": "0.2.0", @@ -3352,21 +2113,8 @@ "node": ">= 0.10" } }, - "node_modules/punycode": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", - "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/qs": { "version": "6.15.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.1.tgz", - "integrity": "sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==", "license": "BSD-3-Clause", "dependencies": { "side-channel": "^1.1.0" @@ -3380,8 +2128,6 @@ }, "node_modules/quansync": { "version": "0.2.11", - "resolved": "https://registry.npmjs.org/quansync/-/quansync-0.2.11.tgz", - "integrity": "sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==", "dev": true, "funding": [ { @@ -3397,8 +2143,6 @@ }, "node_modules/range-parser": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", "license": "MIT", "engines": { "node": ">= 0.6" @@ -3406,8 +2150,6 @@ }, "node_modules/raw-body": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", - "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", "license": "MIT", "dependencies": { "bytes": "~3.1.2", @@ -3421,8 +2163,6 @@ }, "node_modules/require-from-string": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3430,8 +2170,6 @@ }, "node_modules/rolldown": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0.tgz", - "integrity": "sha512-yD986aXDESFGS95spT1LAv0jssywP4npMEjmMHyN2/5+eE8qQJUype2AaKkRiLgBgyD0LFlubwAht7VmY8rGoA==", "dev": true, "license": "MIT", "dependencies": { @@ -3464,8 +2202,6 @@ }, "node_modules/router": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", - "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", "license": "MIT", "dependencies": { "debug": "^4.4.0", @@ -3480,14 +2216,10 @@ }, "node_modules/safer-buffer": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "license": "MIT" }, "node_modules/section-matter": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", - "integrity": "sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA==", "license": "MIT", "dependencies": { "extend-shallow": "^2.0.1", @@ -3497,23 +2229,8 @@ "node": ">=4" } }, - "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", - "dev": true, - "license": "ISC", - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/send": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz", - "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==", "license": "MIT", "dependencies": { "debug": "^4.4.3", @@ -3538,8 +2255,6 @@ }, "node_modules/serve-static": { "version": "2.2.1", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz", - "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==", "license": "MIT", "dependencies": { "encodeurl": "^2.0.0", @@ -3557,14 +2272,10 @@ }, "node_modules/setprototypeof": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", "license": "ISC" }, "node_modules/shebang-command": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" @@ -3575,8 +2286,6 @@ }, "node_modules/shebang-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "license": "MIT", "engines": { "node": ">=8" @@ -3584,8 +2293,6 @@ }, "node_modules/side-channel": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", - "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -3603,8 +2310,6 @@ }, "node_modules/side-channel-list": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz", - "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", @@ -3619,8 +2324,6 @@ }, "node_modules/side-channel-map": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", - "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -3637,8 +2340,6 @@ }, "node_modules/side-channel-weakmap": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", - "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", "license": "MIT", "dependencies": { "call-bound": "^1.0.2", @@ -3656,15 +2357,11 @@ }, "node_modules/siginfo": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", - "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", "dev": true, "license": "ISC" }, "node_modules/source-map": { "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -3672,8 +2369,6 @@ }, "node_modules/source-map-js": { "version": "1.2.1", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", - "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -3682,21 +2377,15 @@ }, "node_modules/sprintf-js": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", "license": "BSD-3-Clause" }, "node_modules/stackback": { "version": "0.0.2", - "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", - "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", "dev": true, "license": "MIT" }, "node_modules/statuses": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", - "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -3704,15 +2393,11 @@ }, "node_modules/std-env": { "version": "4.1.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz", - "integrity": "sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==", "dev": true, "license": "MIT" }, "node_modules/strip-bom-string": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", - "integrity": "sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==", "license": "MIT", "engines": { "node": ">=0.10.0" @@ -3720,15 +2405,11 @@ }, "node_modules/tinybench": { "version": "2.9.0", - "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", - "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", "dev": true, "license": "MIT" }, "node_modules/tinyexec": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.1.2.tgz", - "integrity": "sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==", "dev": true, "license": "MIT", "engines": { @@ -3737,8 +2418,6 @@ }, "node_modules/tinyglobby": { "version": "0.2.16", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", - "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "dev": true, "license": "MIT", "dependencies": { @@ -3754,8 +2433,6 @@ }, "node_modules/tinyrainbow": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", - "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", "dev": true, "license": "MIT", "engines": { @@ -3764,8 +2441,6 @@ }, "node_modules/toidentifier": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", "license": "MIT", "engines": { "node": ">=0.6" @@ -3773,23 +2448,8 @@ }, "node_modules/ts-algebra": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ts-algebra/-/ts-algebra-2.0.0.tgz", - "integrity": "sha512-FPAhNPFMrkwz76P7cdjdmiShwMynZYN6SgOujD1urY4oNm80Ou9oMdmbR45LotcKOXoy7wSmHkRFE6Mxbrhefw==", "license": "MIT" }, - "node_modules/ts-api-utils": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", - "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.12" - }, - "peerDependencies": { - "typescript": ">=4.8.4" - } - }, "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", @@ -3798,24 +2458,8 @@ "license": "0BSD", "optional": true }, - "node_modules/type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", - "dev": true, - "license": "MIT", - "peer": true, - "dependencies": { - "prelude-ls": "^1.2.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, "node_modules/type-is": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", - "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", "license": "MIT", "dependencies": { "content-type": "^1.0.5", @@ -3828,8 +2472,6 @@ }, "node_modules/typescript": { "version": "6.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", - "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", "dev": true, "license": "Apache-2.0", "bin": { @@ -3840,41 +2482,13 @@ "node": ">=14.17" } }, - "node_modules/typescript-eslint": { - "version": "8.59.2", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.59.2.tgz", - "integrity": "sha512-pJw051uomb3ZeCzGTpRb8RbEqB5Y4WWet8gl/GcTlU35BSx0PVdZ86/bqkQCyKKuraVQEK7r6kBHQXF+fBhkoQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@typescript-eslint/eslint-plugin": "8.59.2", - "@typescript-eslint/parser": "8.59.2", - "@typescript-eslint/typescript-estree": "8.59.2", - "@typescript-eslint/utils": "8.59.2" - }, - "engines": { - "node": "^18.18.0 || ^20.9.0 || >=21.1.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.1.0" - } - }, "node_modules/ufo": { "version": "1.6.4", - "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.6.4.tgz", - "integrity": "sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==", "dev": true, "license": "MIT" }, "node_modules/uglify-js": { "version": "3.19.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", - "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", "license": "BSD-2-Clause", "optional": true, "bin": { @@ -3885,16 +2499,12 @@ } }, "node_modules/undici-types": { - "version": "7.19.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.19.2.tgz", - "integrity": "sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==", + "version": "7.21.0", "dev": true, "license": "MIT" }, "node_modules/unpipe": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -3902,8 +2512,6 @@ }, "node_modules/unplugin": { "version": "2.3.11", - "resolved": "https://registry.npmjs.org/unplugin/-/unplugin-2.3.11.tgz", - "integrity": "sha512-5uKD0nqiYVzlmCRs01Fhs2BdkEgBS3SAVP6ndrBsuK42iC2+JHyxM05Rm9G8+5mkmRtzMZGY8Ct5+mliZxU/Ww==", "dev": true, "license": "MIT", "dependencies": { @@ -3918,8 +2526,6 @@ }, "node_modules/unplugin-dts": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unplugin-dts/-/unplugin-dts-1.0.0.tgz", - "integrity": "sha512-qz+U1lCscwq+t8Mkaxy5Esa7IQ5wWV18b4mnioOXSdnPaNiJ0+qgE3I+KL6UkXYZWxxGo2qdGone8LEQ52Sfkw==", "dev": true, "license": "MIT", "dependencies": { @@ -3970,21 +2576,8 @@ } } }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "license": "BSD-2-Clause", - "peer": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, "node_modules/vary": { "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "license": "MIT", "engines": { "node": ">= 0.8" @@ -3992,8 +2585,6 @@ }, "node_modules/vite": { "version": "8.0.12", - "resolved": "https://registry.npmjs.org/vite/-/vite-8.0.12.tgz", - "integrity": "sha512-w2dDofOWv2QB09ZITZBsvKTVAlYvPR4IAmrY/v0ir9KvLs0xybR7i48wxhM1/oyBWO34wPns+bPGw5ZrZqDpZg==", "dev": true, "license": "MIT", "dependencies": { @@ -4070,8 +2661,6 @@ }, "node_modules/vite-plugin-dts": { "version": "5.0.0", - "resolved": "https://registry.npmjs.org/vite-plugin-dts/-/vite-plugin-dts-5.0.0.tgz", - "integrity": "sha512-VLNAUttBq7pLxxL/m/ztjd5zj5yiviiC7ijfPFVLK5c45FLcibvieBsdjSka3a4ag1qdrAF9K3OysH4/lW+rPQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4095,19 +2684,17 @@ } }, "node_modules/vitest": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.5.tgz", - "integrity": "sha512-9Xx1v3/ih3m9hN+SbfkUyy0JAs72ap3r7joc87XL6jwF0jGg6mFBvQ1SrwaX+h8BlkX6Hz9shdd1uo6AF+ZGpg==", + "version": "4.1.6", "dev": true, "license": "MIT", "dependencies": { - "@vitest/expect": "4.1.5", - "@vitest/mocker": "4.1.5", - "@vitest/pretty-format": "4.1.5", - "@vitest/runner": "4.1.5", - "@vitest/snapshot": "4.1.5", - "@vitest/spy": "4.1.5", - "@vitest/utils": "4.1.5", + "@vitest/expect": "4.1.6", + "@vitest/mocker": "4.1.6", + "@vitest/pretty-format": "4.1.6", + "@vitest/runner": "4.1.6", + "@vitest/snapshot": "4.1.6", + "@vitest/spy": "4.1.6", + "@vitest/utils": "4.1.6", "es-module-lexer": "^2.0.0", "expect-type": "^1.3.0", "magic-string": "^0.30.21", @@ -4135,12 +2722,12 @@ "@edge-runtime/vm": "*", "@opentelemetry/api": "^1.9.0", "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", - "@vitest/browser-playwright": "4.1.5", - "@vitest/browser-preview": "4.1.5", - "@vitest/browser-webdriverio": "4.1.5", - "@vitest/coverage-istanbul": "4.1.5", - "@vitest/coverage-v8": "4.1.5", - "@vitest/ui": "4.1.5", + "@vitest/browser-playwright": "4.1.6", + "@vitest/browser-preview": "4.1.6", + "@vitest/browser-webdriverio": "4.1.6", + "@vitest/coverage-istanbul": "4.1.6", + "@vitest/coverage-v8": "4.1.6", + "@vitest/ui": "4.1.6", "happy-dom": "*", "jsdom": "*", "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -4186,22 +2773,16 @@ }, "node_modules/vscode-uri": { "version": "3.1.0", - "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.1.0.tgz", - "integrity": "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ==", "dev": true, "license": "MIT" }, "node_modules/webpack-virtual-modules": { "version": "0.6.2", - "resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.6.2.tgz", - "integrity": "sha512-66/V2i5hQanC51vBQKPH4aI8NMAcBW59FVBs+rC7eGHupMyfn34q7rZIE+ETlJ+XTevqfUhVVBgSUNSW2flEUQ==", "dev": true, "license": "MIT" }, "node_modules/which": { "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "license": "ISC", "dependencies": { "isexe": "^2.0.0" @@ -4215,8 +2796,6 @@ }, "node_modules/why-is-node-running": { "version": "2.3.0", - "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", - "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", "dev": true, "license": "MIT", "dependencies": { @@ -4230,33 +2809,16 @@ "node": ">=8" } }, - "node_modules/word-wrap": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", - "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wordwrap": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", "license": "MIT" }, "node_modules/wrappy": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "license": "ISC" }, "node_modules/yaml": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.4.tgz", - "integrity": "sha512-ml/JPOj9fOQK8RNnWojA67GbZ0ApXAUlN2UQclwv2eVgTgn7O9gg9o7paZWKMp4g0H3nTLtS9LVzhkpOFIKzog==", + "version": "2.9.0", "license": "ISC", "bin": { "yaml": "bin.mjs" @@ -4268,24 +2830,8 @@ "url": "https://github.com/sponsors/eemeli" } }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "license": "MIT", - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/zod": { "version": "4.4.3", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", - "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", "license": "MIT", "funding": { "url": "https://github.com/sponsors/colinhacks" @@ -4293,63 +2839,48 @@ }, "node_modules/zod-to-json-schema": { "version": "3.25.2", - "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.2.tgz", - "integrity": "sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==", "license": "ISC", "peerDependencies": { "zod": "^3.25.28 || ^4" } }, - "packages/cli": { - "name": "@bifrost-ai/orchestrator", - "version": "1.0.0", - "bin": { - "orchestrator": "dist/index.js" - } - }, - "packages/core": { - "name": "@bifrost-ai/core", - "version": "1.0.0", - "dependencies": { - "gray-matter": "^4.0.3" - } - }, "packages/engine": { "name": "@bifrost-ai/engine", - "version": "1.0.0" + "version": "0.0.0" }, "packages/engine-claude-code": { "name": "@bifrost-ai/engine-claude-code", - "version": "1.0.0", + "version": "0.0.0", "dependencies": { - "@anthropic-ai/claude-agent-sdk": "^0.2.138" + "@anthropic-ai/claude-agent-sdk": "^0.2.140", + "@bifrost-ai/engine": "^0.0.0" } }, - "packages/runner": { - "name": "@orchestrator/runner", - "version": "1.0.0", - "extraneous": true, - "bin": { - "bifrost-runner": "src/index.ts" + "packages/orchestrator": { + "name": "@bifrost-ai/orchestrator", + "version": "0.0.0", + "dependencies": { + "@bifrost-ai/engine": "^0.0.0", + "@bifrost-ai/task-source": "^0.0.0", + "gray-matter": "^4.0.3", + "handlebars": "^4.7.9" } }, "packages/task-source": { "name": "@bifrost-ai/task-source", - "version": "1.0.0" + "version": "0.0.0" }, "packages/task-source-bifrost": { "name": "@bifrost-ai/task-source-bifrost", - "version": "1.0.0", + "version": "0.0.0", "dependencies": { - "yaml": "^2.8.4" - }, - "engines": { - "node": ">=24.0.0" + "@bifrost-ai/task-source": "^0.0.0", + "yaml": "^2.9.0" } }, "packages/task-source-memory": { "name": "@bifrost-ai/task-source-memory", - "version": "1.0.0" + "version": "0.0.0" } } } diff --git a/orchestrator/package.json b/orchestrator/package.json index f301bde..e78ff46 100644 --- a/orchestrator/package.json +++ b/orchestrator/package.json @@ -1,6 +1,6 @@ { "name": "orchestrator", - "version": "1.0.0", + "version": "0.0.0", "description": "Unified Orchestrator Framework - AI agent task execution system", "private": true, "type": "module", @@ -15,19 +15,13 @@ "format": "prettier . -w" }, "devDependencies": { - "@types/node": "^25.6.2", + "@types/node": "^25.7.0", "typescript": "^6.0.3", - "typescript-eslint": "^8.59.2", "vite": "^8.0.12", "vite-plugin-dts": "^5.0.0", - "vitest": "^4.1.5" + "vitest": "^4.1.6" }, "engines": { "node": ">=24.0.0" - }, - "dependencies": { - "gray-matter": "^4.0.3", - "handlebars": "^4.7.9", - "yaml": "^2.8.4" } } diff --git a/orchestrator/packages/core/package.json b/orchestrator/packages/core/package.json deleted file mode 100644 index 85c67c4..0000000 --- a/orchestrator/packages/core/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "@bifrost-ai/core", - "version": "1.0.0", - "description": "Core orchestration logic for Orchestrator Framework", - "type": "module", - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" - } - }, - "scripts": { - "build": "vite build" - }, - "dependencies": { - "gray-matter": "^4.0.3" - } -} diff --git a/orchestrator/packages/core/src/hook-executor.spec.ts b/orchestrator/packages/core/src/hook-executor.spec.ts deleted file mode 100644 index 36dbfc5..0000000 --- a/orchestrator/packages/core/src/hook-executor.spec.ts +++ /dev/null @@ -1,230 +0,0 @@ -import { describe, expect, it, vi } from "vitest"; -import { type HookExecutionContext, executeHooks } from "./hook-executor"; - -describe("Hook Executor - US-4", () => { - describe("Start hooks execution", () => { - it("should execute Start hooks in sequence before agent", async () => { - // Given an AGENT.md with hooks.Start section - const hooks = [ - { - name: "validate-args", - scriptPath: "/hooks/validate-args.mjs", - timeout: 30000, - }, - ]; - - const context: HookExecutionContext = { - projectDir: "/test/project", - params: { language: "python" }, - taskState: { language: { name: "python" } }, - }; - - const mockExec = vi.fn().mockResolvedValue({ exitCode: 0, stdout: "", stderr: "" }); - - // When the agent is dispatched - const results = await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - // Then each Start hook executes in declaration order - expect(results).toHaveLength(1); - expect(results[0].hookName).toBe("validate-args"); - expect(results[0].exitCode).toBe(0); - }); - - it("should pass exit code 0 allows agent to proceed", async () => { - const hooks = [{ name: "test", scriptPath: "/test.mjs", timeout: 30000 }]; - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockResolvedValue({ exitCode: 0, stdout: "", stderr: "" }); - - const results = await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - // Exit code 0 allows the agent to proceed - expect(results[0].shouldProceed).toBe(true); - }); - - it("should pass exit code 1 passes stdout as warning and continues", async () => { - const hooks = [{ name: "test", scriptPath: "/test.mjs", timeout: 30000 }]; - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockResolvedValue({ - exitCode: 1, - stdout: "Warning: deprecated usage", - stderr: "", - }); - - const results = await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - // Exit code 1 passes hook stdout to agent as warning and continues - expect(results[0].exitCode).toBe(1); - expect(results[0].stdout).toBe("Warning: deprecated usage"); - expect(results[0].shouldProceed).toBe(true); - }); - - it("should pass exit code 2 halts agent and marks UoW as failed", async () => { - const hooks = [{ name: "validate-args", scriptPath: "/test.mjs", timeout: 30000 }]; - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockResolvedValue({ - exitCode: 2, - stdout: "", - stderr: "Validation failed", - }); - - const results = await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - // Exit code 2 halts the agent, marks UoW as failed - expect(results[0].exitCode).toBe(2); - expect(results[0].shouldProceed).toBe(false); - expect(results[0].fatal).toBe(true); - }); - }); - - describe("Hook stdin format", () => { - it("should receive JSON with projectDir, params, taskState", async () => { - const hooks = [{ name: "test", scriptPath: "/test.mjs", timeout: 30000 }]; - const context = { - projectDir: "/test/project", - params: { language: "python" }, - taskState: { language: { name: "python" } }, - }; - - const mockExec = vi.fn().mockResolvedValue({ exitCode: 0, stdout: "", stderr: "" }); - - await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - // Hook receives JSON containing: projectDir, params, taskState - expect(mockExec).toHaveBeenCalledWith( - expect.objectContaining({ - stdin: expect.stringContaining("projectDir"), - }), - ); - }); - - it("should NOT include rendered prompt in stdin", async () => { - const hooks = [{ name: "test", scriptPath: "/test.mjs", timeout: 30000 }]; - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockResolvedValue({ exitCode: 0, stdout: "", stderr: "" }); - - await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - // The rendered prompt is NOT present in stdin - const callArgs = mockExec.mock.calls[0]; - const { stdin } = callArgs[0]; - expect(stdin).not.toContain("prompt"); - }); - }); - - describe("Hook timeout behavior", () => { - it("should use default timeout of 300000ms when not configured", async () => { - const hooks = [{ name: "test", scriptPath: "/test.mjs" }]; // no timeout - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockResolvedValue({ exitCode: 0, stdout: "", stderr: "" }); - - await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - // Default timeout of 300000ms (5 minutes) is applied - expect(mockExec).toHaveBeenCalledWith( - expect.objectContaining({ - timeout: 300000, - }), - ); - }); - - it("should use configured timeout when specified", async () => { - const hooks = [{ name: "test", scriptPath: "/test.mjs", timeout: 120000 }]; - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockResolvedValue({ exitCode: 0, stdout: "", stderr: "" }); - - await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - expect(mockExec).toHaveBeenCalledWith( - expect.objectContaining({ - timeout: 120000, - }), - ); - }); - - it("should treat timeout as exit code 2", async () => { - const hooks = [{ name: "test", scriptPath: "/test.mjs", timeout: 100 }]; - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockRejectedValue(new Error("Timeout")); - - const results = await executeHooks({ hooks, lifecycle: "Start", context, execFn: mockExec }); - - // Hook execution is terminated and treated as exit code 2 - expect(results[0].fatal).toBe(true); - expect(results[0].timedOut).toBe(true); - }); - }); - - describe("Stop hooks execution", () => { - it("should execute Stop hooks after agent finishes", async () => { - const hooks = [{ name: "check-new-tests", scriptPath: "/check.mjs", timeout: 30000 }]; - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockResolvedValue({ exitCode: 0, stdout: "", stderr: "" }); - - const results = await executeHooks({ hooks, lifecycle: "Stop", context, execFn: mockExec }); - - expect(results).toHaveLength(1); - expect(results[0].hookName).toBe("check-new-tests"); - }); - - it("should trigger follow-up on exit code 1", async () => { - const hooks = [{ name: "lint", scriptPath: "/lint.mjs", timeout: 30000 }]; - const context = { - projectDir: "/test", - params: {}, - taskState: {}, - }; - - const mockExec = vi.fn().mockResolvedValue({ - exitCode: 1, - stdout: "Lint errors found", - stderr: "", - }); - - const results = await executeHooks({ hooks, lifecycle: "Stop", context, execFn: mockExec }); - - // Exit code 1 returns stdout to agent for remediation (follow-up loop) - expect(results[0].needsFollowUp).toBe(true); - expect(results[0].stdout).toBe("Lint errors found"); - }); - }); -}); diff --git a/orchestrator/packages/core/src/hook-executor.ts b/orchestrator/packages/core/src/hook-executor.ts deleted file mode 100644 index 3b8e4f7..0000000 --- a/orchestrator/packages/core/src/hook-executor.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type { HookSpec } from "./types"; - -export type HookExecutionContext = { - projectDir: string; - params: Record; - taskState: Record; -}; - -export type HookResult = { - hookName: string; - exitCode: number; - stdout: string; - stderr: string; - durationMs: number; - shouldProceed: boolean; - fatal: boolean; - needsFollowUp: boolean; - timedOut: boolean; -}; - -type HookExecFunction = (opts: { - scriptPath: string; - stdin: string; - timeout: number; -}) => Promise<{ exitCode: number; stdout: string; stderr: string }>; - -const DEFAULT_HOOK_TIMEOUT = 300000; // 5 minutes in ms - -/** - * Execute hooks for a lifecycle phase (Start or Stop). - * US-4: Project Maintainer - Extend Agent with Hooks - * FR-10: Hook Contract - */ -type ExecuteHooksOptions = { - hooks: HookSpec[]; - lifecycle: "Start" | "Stop"; - context: HookExecutionContext; - execFn: HookExecFunction; -}; - -export const executeHooks = async (options: ExecuteHooksOptions): Promise => { - const { hooks, lifecycle, context, execFn } = options; - const results: HookResult[] = []; - - for (const hook of hooks) { - const startTime = Date.now(); - const timeout = hook.timeout ?? DEFAULT_HOOK_TIMEOUT; - - // FR-10: stdin format - projectDir, params, taskState (no rendered prompt) - const stdin = JSON.stringify({ - projectDir: context.projectDir, - params: context.params, - taskState: context.taskState, - }); - - try { - // oxlint-disable-next-line no-await-in-loop - const { exitCode, stdout, stderr } = await execFn({ - scriptPath: hook.scriptPath, - stdin, - timeout, - }); - - const durationMs = Date.now() - startTime; - - // FR-10: Exit codes - // 0 = Success, proceed - // 1 = Recoverable error, pass stdout as context, continue - // 2 = Fatal error, halt, mark UoW as failed - const fatal = exitCode === 2; - const shouldProceed = exitCode !== 2; - const needsFollowUp = lifecycle === "Stop" && exitCode === 1; - - results.push({ - hookName: hook.name, - exitCode, - stdout, - stderr, - durationMs, - shouldProceed, - fatal, - needsFollowUp, - timedOut: false, - }); - - // If hook returned fatal error, stop processing further hooks - if (fatal) { - break; - } - } catch (error) { - const durationMs = Date.now() - startTime; - - // Hook execution exception - treat as fatal (exit code 2) - results.push({ - hookName: hook.name, - exitCode: 2, - stdout: "", - stderr: error instanceof Error ? error.message : String(error), // oxlint-disable-line no-ternary - durationMs, - shouldProceed: false, - fatal: true, - needsFollowUp: false, - timedOut: true, - }); - - // Stop processing further hooks on timeout/error - break; - } - } - - return results; -}; diff --git a/orchestrator/packages/core/src/repo-installer.spec.ts b/orchestrator/packages/core/src/repo-installer.spec.ts deleted file mode 100644 index 77c206d..0000000 --- a/orchestrator/packages/core/src/repo-installer.spec.ts +++ /dev/null @@ -1,201 +0,0 @@ -import { mkdir, readFile, stat, writeFile } from "node:fs/promises"; -import { describe, expect, it, vi } from "vitest"; -import { installRepoScripts } from "./repo-installer"; - -vi.mock("node:fs/promises"); - -describe("Repo Script Installer - US-5", () => { - describe("First run installs repo scripts into working repository", () => { - it("should hard-copy repo scripts to .ai//hooks/.d/.mjs", async () => { - // Given an orchestrator program with built-in agents that have repo scripts - const agents = [ - { - name: "test-agent", - hooks: { - Start: [ - { - name: "validate-args", - scriptPath: "hooks/Start.d/validate-args.mjs", - isRepoScript: true, - }, - ], - Stop: [ - { - name: "check-new-tests", - scriptPath: "hooks/Stop.d/check-new-tests.mjs", - isRepoScript: true, - }, - ], - }, - }, - ]; - - const mockScriptContent = "export default async () => { return { exitCode: 0 } }"; - - vi.mocked(readFile).mockResolvedValue(mockScriptContent); - vi.mocked(stat).mockRejectedValue(new Error("File not found")); - vi.mocked(mkdir).mockResolvedValue(void 0); - vi.mocked(writeFile).mockResolvedValue(); - - // When the orchestrator runs against the working repository for the first time - await installRepoScripts("/test/project", agents, "/orchestrator/packages"); - - // Then each repo script is hard-copied to .ai//hooks/.d/.mjs - expect(writeFile).toHaveBeenCalledWith( - "/test/project/.ai/test-agent/hooks/Start.d/validate-args.mjs", - mockScriptContent, - "utf-8", - ); - expect(writeFile).toHaveBeenCalledWith( - "/test/project/.ai/test-agent/hooks/Stop.d/check-new-tests.mjs", - mockScriptContent, - "utf-8", - ); - }); - - it("should create no symlinks - only hard copies", async () => { - const agents = [ - { - name: "test-agent", - hooks: { - Start: [{ name: "test", scriptPath: "hooks/Start.d/test.mjs", isRepoScript: true }], - Stop: [], - }, - }, - ]; - - vi.mocked(readFile).mockResolvedValue("content"); - vi.mocked(stat).mockRejectedValue(new Error("not found")); - - await installRepoScripts("/test/project", agents, "/orchestrator/packages"); - - // Verify copy was made (not symlink) - expect(writeFile).toHaveBeenCalled(); - expect(writeFile).toHaveBeenCalledWith( - expect.stringContaining(".ai"), - expect.any(String), - "utf-8", - ); - }); - - it("should log each installed path", async () => { - const consoleSpy = vi.spyOn(console, "log").mockImplementation(() => void 0); - - const agents = [ - { - name: "test-agent", - hooks: { - Start: [ - { name: "validate", scriptPath: "hooks/Start.d/validate.mjs", isRepoScript: true }, - ], - Stop: [], - }, - }, - ]; - - vi.mocked(readFile).mockResolvedValue("content"); - vi.mocked(stat).mockRejectedValue(new Error("not found")); - - await installRepoScripts("/test/project", agents, "/orchestrator/packages"); - - // Then the orchestrator logs each installed path - expect(consoleSpy).toHaveBeenCalledWith( - expect.stringContaining("test-agent/hooks/Start.d/validate.mjs"), - ); - - consoleSpy.mockRestore(); - }); - }); - - describe("Idempotent installation", () => { - it("should not overwrite existing scripts", async () => { - // Given a working repository that has already been initialized - // And a repo script already exists at the expected path - const agents = [ - { - name: "test-agent", - hooks: { - Start: [ - { name: "validate", scriptPath: "hooks/Start.d/validate.mjs", isRepoScript: true }, - ], - Stop: [], - }, - }, - ]; - - vi.mocked(readFile).mockResolvedValue("new content"); - vi.mocked(stat).mockResolvedValue({ isFile: () => true } as unknown as Awaited< - ReturnType - >); - - // Clear previous calls - vi.clearAllMocks(); - - // When the orchestrator runs again - await installRepoScripts("/test/project", agents, "/orchestrator/packages"); - - // Then the existing script is not overwritten - expect(writeFile).not.toHaveBeenCalled(); - }); - - it("should log that script is already present", async () => { - const consoleSpy = vi.spyOn(console, "log").mockImplementation(() => void 0); - - const agents = [ - { - name: "test-agent", - hooks: { - Start: [ - { name: "validate", scriptPath: "hooks/Start.d/validate.mjs", isRepoScript: true }, - ], - Stop: [], - }, - }, - ]; - - vi.mocked(readFile).mockResolvedValue("content"); - vi.mocked(stat).mockResolvedValue({ isFile: () => true } as unknown as Awaited< - ReturnType - >); - - vi.clearAllMocks(); - - await installRepoScripts("/test/project", agents, "/orchestrator/packages"); - - expect(consoleSpy).toHaveBeenCalledWith(expect.stringContaining("Already present:")); - expect(consoleSpy).toHaveBeenCalledWith( - expect.stringContaining("test-agent/hooks/Start.d/validate.mjs"), - ); - - consoleSpy.mockRestore(); - }); - }); - - describe("Framework hooks not installed", () => { - it("should skip hooks where isRepoScript is false", async () => { - const agents = [ - { - name: "test-agent", - hooks: { - Start: [ - { - name: "validate-args", - scriptPath: "hooks/Start.d/validate-args.mjs", - isRepoScript: false, - }, - ], - Stop: [], - }, - }, - ]; - - vi.clearAllMocks(); - - await installRepoScripts("/test/project", agents, "/orchestrator/packages"); - - // Framework hooks run from the orchestrator's packages/ context - // They should not be installed to the working repo - expect(writeFile).not.toHaveBeenCalled(); - }); - }); -}); diff --git a/orchestrator/packages/core/src/repo-installer.ts b/orchestrator/packages/core/src/repo-installer.ts deleted file mode 100644 index fcd6f9a..0000000 --- a/orchestrator/packages/core/src/repo-installer.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { resolve } from "node:path"; -import { mkdir, readFile, stat, writeFile } from "node:fs/promises"; - -export type AgentWithRepoScripts = { - name: string; - hooks: { - Start: { name: string; scriptPath: string; isRepoScript: boolean }[]; - Stop: { name: string; scriptPath: string; isRepoScript: boolean }[]; - }; -}; - -/** - * Install repo scripts to the working repository. - * US-5: First run installs repo scripts into the working repository - * FR-8: Working Repository Layout (after install) - * FR-9: Agent Package Layout - * - * @param projectDir - The working repository root - * @param agents - List of agents with their hooks - * @param orchestratorPackagesPath - Path to orchestrator packages/ directory - */ -export const installRepoScripts = async ( - projectDir: string, - agents: AgentWithRepoScripts[], - orchestratorPackagesPath: string, -): Promise => { - for (const agent of agents) { - for (const lifecycle of ["Start", "Stop"] as const) { - // oxlint-disable-next-line no-ternary - const hooks = lifecycle === "Start" ? agent.hooks.Start : agent.hooks.Stop; - - for (const hook of hooks) { - // Skip framework hooks - only install repo scripts - if (!hook.isRepoScript) { - // oxlint-disable-next-line no-continue - continue; - } - - // FR-9: Hook execution order within each .d/ directory: alphabetical by filename - // Target path: .ai//hooks/.d/.mjs - const targetDir = resolve(projectDir, ".ai", agent.name, "hooks", `${lifecycle}.d`); - const targetPath = resolve(targetDir, `${hook.name}.mjs`); - - // Check if script already exists (US-5: idempotency) - let exists = false; - try { - // oxlint-disable-next-line no-await-in-loop - await stat(targetPath); - console.log(`Already present: ${targetPath}`); - exists = true; - } catch { - // File doesn't exist, proceed with installation - } - if (exists) { - // oxlint-disable-next-line no-continue - continue; - } - - // FR-9: Repo scripts are provided in agent package at hooks/.d/.mjs - // Source path: //hooks/.d/.mjs - const sourcePath = resolve(orchestratorPackagesPath, agent.name, hook.scriptPath); - - // Read the source script content - // oxlint-disable-next-line no-await-in-loop - const content = await readFile(sourcePath, "utf-8"); - - // Create target directory - // oxlint-disable-next-line no-await-in-loop - await mkdir(targetDir, { recursive: true }); - - // FR-8: Repo scripts are hard-copied (never symlinked) - // oxlint-disable-next-line no-await-in-loop - await writeFile(targetPath, content, "utf-8"); - - console.log(`Installed: ${targetPath}`); - } - } - } -}; diff --git a/orchestrator/packages/core/src/types.ts b/orchestrator/packages/core/src/types.ts deleted file mode 100644 index 2395bd2..0000000 --- a/orchestrator/packages/core/src/types.ts +++ /dev/null @@ -1,26 +0,0 @@ -// FR-4: Agent Definition File types - -export type AgentDefinition = { - name: string; - description: string; - tools: string[]; - toolClasses: string[]; - template: Template; - hooks: Hooks; - promptBody: string; -}; - -export type Template = { - parameters: Record; -}; - -export type Hooks = { - Start: HookSpec[]; - Stop: HookSpec[]; -}; - -export type HookSpec = { - name: string; - scriptPath: string; - timeout?: number; -}; diff --git a/orchestrator/packages/core/tsconfig.json b/orchestrator/packages/core/tsconfig.json deleted file mode 100644 index 6815ff3..0000000 --- a/orchestrator/packages/core/tsconfig.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "outDir": "./dist", - "rootDir": "./src" - }, - "references": [ - { - "path": "../task-source" - }, - { - "path": "../engine" - } - ], - "include": ["src/**/*"], - "exclude": ["node_modules", "dist"] -} diff --git a/orchestrator/packages/core/vite.config.ts b/orchestrator/packages/core/vite.config.ts deleted file mode 100644 index 027f5ee..0000000 --- a/orchestrator/packages/core/vite.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import pkg from "./package.json"; -// @ts-ignore -import base from "../../vite.base"; -import tsconfig from "./tsconfig.json"; - -export default base({ - name: "core", - pkg, - tsconfig, -}); diff --git a/orchestrator/packages/engine-claude-code/package.json b/orchestrator/packages/engine-claude-code/package.json index 3419740..570f8ce 100644 --- a/orchestrator/packages/engine-claude-code/package.json +++ b/orchestrator/packages/engine-claude-code/package.json @@ -1,8 +1,11 @@ { "name": "@bifrost-ai/engine-claude-code", - "version": "1.0.0", + "version": "0.0.0", "description": "Claude Code Agent SDK engine for Orchestrator Framework", "type": "module", + "files": [ + "dist" + ], "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { @@ -15,6 +18,7 @@ "build": "vite build" }, "dependencies": { - "@anthropic-ai/claude-agent-sdk": "^0.2.138" + "@bifrost-ai/engine": "^0.0.0", + "@anthropic-ai/claude-agent-sdk": "^0.2.140" } } diff --git a/orchestrator/packages/engine-claude-code/src/claude-code-engine.spec.ts b/orchestrator/packages/engine-claude-code/src/claude-code-engine.spec.ts index 5499c4d..be03b25 100644 --- a/orchestrator/packages/engine-claude-code/src/claude-code-engine.spec.ts +++ b/orchestrator/packages/engine-claude-code/src/claude-code-engine.spec.ts @@ -123,6 +123,7 @@ describe("ClaudeCodeEngine", () => { expect(result.success).toBe(true); expect(result.skipFulfill).toBe(false); expect(result.lastMessage).toBe("Fixed the bug in auth.py"); + expect(result.sessionId).toBe("sess-123"); expect(result.stats).toMatchObject({ durationMs: 1500, inputTokens: 1000, @@ -134,16 +135,49 @@ describe("ClaudeCodeEngine", () => { }); }); - it("should capture session ID from system init message", async () => { + it("should capture and return session ID for continuation", async () => { mockQuery.mockReturnValue( mockStream(systemInit("sess-abc"), resultSuccess({ session_id: "sess-abc" })), ); const engine = new ClaudeCodeEngine(); - await engine.execute(makeContext()); + const result = await engine.execute(makeContext()); - const followUp = await engine.sendFollowUp("check again"); - expect(followUp.success).toBe(true); + expect(result.sessionId).toBe("sess-abc"); + }); + + it("should support session continuation via sessionId parameter", async () => { + mockQuery.mockReturnValueOnce( + mockStream(systemInit("sess-continue"), resultSuccess({ session_id: "sess-continue" })), + ); + + mockQuery.mockReturnValueOnce( + mockStream( + resultSuccess({ + session_id: "sess-continue", + num_turns: 2, + duration_ms: 200, + result: "follow-up done", + total_cost_usd: 0.02, + usage: { input_tokens: 300, output_tokens: 150, cache_read_input_tokens: 80 }, + }), + ), + ); + + const engine = new ClaudeCodeEngine(); + const firstResult = await engine.execute(makeContext()); + expect(firstResult.sessionId).toBe("sess-continue"); + + const followUpResult = await engine.execute(makeContext(), firstResult.sessionId); + expect(followUpResult.success).toBe(true); + expect(followUpResult.lastMessage).toBe("follow-up done"); + expect(followUpResult.stats?.numTurns).toBe(2); + expect(followUpResult.sessionId).toBe("sess-continue"); + + const secondCall = mockQuery.mock.calls[1][0] as { + options: { resume: string }; + }; + expect(secondCall.options.resume).toBe("sess-continue"); }); it("should extract text from assistant messages", async () => { @@ -201,7 +235,8 @@ describe("ClaudeCodeEngine", () => { await engine.execute( makeContext({ taskState: { file: "auth.py" }, - metadata: { description: "Fix the login bug", instructions: "Be thorough" }, + metadata: { description: "Fix the login bug" }, + instructions: "Be thorough", }), ); @@ -228,47 +263,4 @@ describe("ClaudeCodeEngine", () => { logSpy.mockRestore(); }); }); - - describe("sendFollowUp", () => { - it("should throw if no active session exists", async () => { - const engine = new ClaudeCodeEngine(); - - await expect(engine.sendFollowUp("hello")).rejects.toThrow( - "No active session to follow up on", - ); - }); - - it("should resume session with follow-up message", async () => { - mockQuery.mockReturnValueOnce( - mockStream(systemInit("sess-resume"), resultSuccess({ session_id: "sess-resume" })), - ); - - mockQuery.mockReturnValueOnce( - mockStream( - resultSuccess({ - session_id: "sess-resume", - num_turns: 2, - duration_ms: 200, - result: "follow-up done", - total_cost_usd: 0.02, - usage: { input_tokens: 300, output_tokens: 150, cache_read_input_tokens: 80 }, - }), - ), - ); - - const engine = new ClaudeCodeEngine(); - await engine.execute(makeContext()); - - const followUp = await engine.sendFollowUp("now fix the tests"); - - expect(followUp.success).toBe(true); - expect(followUp.lastMessage).toBe("follow-up done"); - expect(followUp.stats?.numTurns).toBe(2); - - const secondCall = mockQuery.mock.calls[1][0] as { - options: { resume: string }; - }; - expect(secondCall.options.resume).toBe("sess-resume"); - }); - }); }); diff --git a/orchestrator/packages/engine-claude-code/src/claude-code-engine.ts b/orchestrator/packages/engine-claude-code/src/claude-code-engine.ts index 632476c..7795ef9 100644 --- a/orchestrator/packages/engine-claude-code/src/claude-code-engine.ts +++ b/orchestrator/packages/engine-claude-code/src/claude-code-engine.ts @@ -27,11 +27,15 @@ const extractContent = (message: SDKAssistantMessage): string | null => { return textBlocks.map((block) => block.text ?? "").join("\n"); }; -const buildPrompt = ( - agentName: string, - taskState: Record, - metadata: Record, -): string => { +type BuildPromptOptions = { + agentName: string; + taskState: Record; + metadata: Record; + instructions?: string; +}; + +const buildPrompt = (options: BuildPromptOptions): string => { + const { agentName: _agentName, taskState, metadata, instructions } = options; const parts: string[] = []; if (metadata.description) { @@ -45,8 +49,8 @@ const buildPrompt = ( } } - if (metadata.instructions) { - parts.push(`\nInstructions: ${metadata.instructions}`); + if (instructions) { + parts.push(`\nInstructions: ${instructions}`); } return parts.join("\n"); @@ -67,21 +71,28 @@ const buildStats = (resultData: SDKResultSuccess): ExecutionStats => { }; export class ClaudeCodeEngine implements Engine { - private sessionId?: string; - - public async execute(context: EngineContext): Promise { - const { agentName, taskState, metadata, workingDir, verbose } = context; - - const prompt = buildPrompt(agentName, taskState, metadata); - - const options = { - workingDir, - permissionMode: "acceptEdits" as const, - verbose, - }; + // oxlint-disable-next-line class-methods-use-this -- method doesn't use `this`, that's fine + public async execute(context: EngineContext, sessionId?: string): Promise { + const { agentName, taskState, metadata, instructions, workingDir, verbose } = context; + + const prompt = buildPrompt({ agentName, taskState, metadata, instructions }); + + const options = sessionId + ? { + workingDir, + permissionMode: "acceptEdits" as const, + verbose, + resume: sessionId, + } + : { + workingDir, + permissionMode: "acceptEdits" as const, + verbose, + }; let lastMessage: string | null = null; let resultData: SDKResultSuccess | undefined = undefined; + let returnedSessionId: string | undefined = sessionId; try { const queryGenerator = query({ prompt, options }); @@ -92,7 +103,7 @@ export class ClaudeCodeEngine implements Engine { } if (isSystemInit(message)) { - this.sessionId = message.session_id; + returnedSessionId = message.session_id; } if (isResultSuccess(message)) { @@ -123,54 +134,7 @@ export class ClaudeCodeEngine implements Engine { skipFulfill: false, lastMessage: lastMessage ?? "No response from Claude", stats, - }; - } - - public async sendFollowUp(message: string): Promise { - if (!this.sessionId) { - throw new Error("No active session to follow up on"); - } - - let lastMessage: string | null = null; - let resultData: SDKResultSuccess | undefined = undefined; - - try { - const queryGenerator = query({ - prompt: message, - options: { - resume: this.sessionId, - }, - }); - - for await (const msg of queryGenerator) { - if (isResultSuccess(msg)) { - resultData = msg; - lastMessage = resultData.result; - } - - if (msg.type === "assistant") { - const content = extractContent(msg); - if (content) { - lastMessage = content; - } - } - } - } catch (error) { - return { - success: false, - skipFulfill: false, - lastMessage: error instanceof Error ? error.message : String(error), - stats: null, - }; - } - - const stats = resultData ? buildStats(resultData) : null; - - return { - success: true, - skipFulfill: false, - lastMessage: lastMessage ?? "No response from Claude", - stats, + sessionId: returnedSessionId, }; } } diff --git a/orchestrator/packages/engine/package.json b/orchestrator/packages/engine/package.json index b856dfd..c3a006f 100644 --- a/orchestrator/packages/engine/package.json +++ b/orchestrator/packages/engine/package.json @@ -1,8 +1,11 @@ { "name": "@bifrost-ai/engine", - "version": "1.0.0", + "version": "0.0.0", "description": "Engine interface and types for Orchestrator Framework", "type": "module", + "files": [ + "dist" + ], "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { diff --git a/orchestrator/packages/engine/src/interface.spec.ts b/orchestrator/packages/engine/src/interface.spec.ts index d388288..64310b9 100644 --- a/orchestrator/packages/engine/src/interface.spec.ts +++ b/orchestrator/packages/engine/src/interface.spec.ts @@ -20,6 +20,7 @@ describe("Engine Interface", () => { totalCostUsd: 0.01, numTurns: 1, }, + sessionId: "session-123", }; } } @@ -38,51 +39,23 @@ describe("Engine Interface", () => { const result = await engine.execute(context); expect(result.success).toBe(true); expect(result.lastMessage).toContain("test-agent"); + expect(result.sessionId).toBe("session-123"); }); - it("should require optional sendFollowUp method", async () => { - class MockEngineWithFollowUp implements Engine { - public async execute(): Promise { - return { - success: true, - skipFulfill: false, - lastMessage: "Initial", - stats: null, - }; - } - - public async sendFollowUp(message: string): Promise { - return { - success: true, - skipFulfill: false, - lastMessage: `Follow-up: ${message}`, - stats: null, - }; - } - } - - const engine = new MockEngineWithFollowUp(); - - // sendFollowUp is optional - check if it exists - if ("sendFollowUp" in engine) { - const result = await engine.sendFollowUp("Fix the lint errors"); - expect(result.lastMessage).toContain("Follow-up"); - } - }); - - it("should allow engine without sendFollowUp", async () => { + it("should support session continuation via sessionId parameter", async () => { class MockEngine implements Engine { - public async execute(_context: EngineContext): Promise { + public async execute(_context: EngineContext, sessionId?: string): Promise { return { success: true, skipFulfill: false, - lastMessage: "Done", + lastMessage: sessionId ? `Continuing session ${sessionId}` : "New session", stats: null, + sessionId: sessionId ?? "new-session-456", }; } } - const engine: Engine = new MockEngine(); + const engine = new MockEngine(); const context: EngineContext = { taskId: "task-1", workingDir: "/test", @@ -92,11 +65,16 @@ describe("Engine Interface", () => { setState: vi.fn().mockResolvedValue(void 0), verbose: false, }; - const result = await engine.execute(context); - expect(result.success).toBe(true); - // sendFollowUp is optional, so engine doesn't need it - expect("sendFollowUp" in engine).toBe(false); + // First call creates new session + const result1 = await engine.execute(context); + expect(result1.lastMessage).toBe("New session"); + expect(result1.sessionId).toBe("new-session-456"); + + // Second call continues session + const result2 = await engine.execute(context, result1.sessionId); + expect(result2.lastMessage).toContain("Continuing session new-session-456"); + expect(result2.sessionId).toBe("new-session-456"); }); }); }); diff --git a/orchestrator/packages/engine/src/interface.ts b/orchestrator/packages/engine/src/interface.ts index 09cf9b4..21f73e8 100644 --- a/orchestrator/packages/engine/src/interface.ts +++ b/orchestrator/packages/engine/src/interface.ts @@ -2,8 +2,8 @@ import type { EngineContext, EngineResult } from "./types"; // FR-2: Engine Interface export type Engine = { - // Execute a task - execute: (context: EngineContext) => Promise; + // Execute a task. Pass sessionId to continue an existing session. + execute: (context: EngineContext, sessionId?: string) => Promise; }; // Re-export types for convenience diff --git a/orchestrator/packages/engine/src/test-engine.spec.ts b/orchestrator/packages/engine/src/test-engine.spec.ts index 62b1c3d..a7858e0 100644 --- a/orchestrator/packages/engine/src/test-engine.spec.ts +++ b/orchestrator/packages/engine/src/test-engine.spec.ts @@ -23,6 +23,29 @@ describe("Test Engine", () => { expect(result.lastMessage).toContain("complete"); expect(result.stats).toBeDefined(); expect(result.stats?.durationMs).toBeGreaterThanOrEqual(0); + expect(result.sessionId).toBeDefined(); + }); + + it("should return sessionId for continuation", async () => { + const engine = new TestEngine(); + + const context: EngineContext = { + taskId: "task-1", + workingDir: "/test/project", + agentName: "test-agent", + taskState: {}, + metadata: {}, + setState: vi.fn().mockResolvedValue(null), + verbose: false, + }; + + const result = await engine.execute(context); + expect(result.sessionId).toMatch(/^test-session-/); + + // Continuation with sessionId + const followUpResult = await engine.execute(context, result.sessionId); + expect(followUpResult.lastMessage).toContain("Follow-up"); + expect(followUpResult.sessionId).toBe(result.sessionId); }); it("should include execution telemetry", async () => { @@ -50,16 +73,6 @@ describe("Test Engine", () => { numTurns: expect.any(Number), }); }); - - it("should support follow-up execution", async () => { - const engine = new TestEngine(); - - const followUpResult = await engine.sendFollowUp?.("Fix the lint errors"); - - expect(followUpResult).toBeDefined(); - expect(followUpResult?.success).toBe(true); - expect(followUpResult?.lastMessage).toContain("Follow-up"); - }); }); describe("Configurable behavior", () => { diff --git a/orchestrator/packages/engine/src/test-engine.ts b/orchestrator/packages/engine/src/test-engine.ts index 82e22a7..28e483f 100644 --- a/orchestrator/packages/engine/src/test-engine.ts +++ b/orchestrator/packages/engine/src/test-engine.ts @@ -15,6 +15,7 @@ export type TestEngineConfig = { */ export class TestEngine implements Engine { #config: TestEngineConfig; + #currentSessionId?: string; public constructor(config: TestEngineConfig = {}) { this.#config = { @@ -27,7 +28,7 @@ export class TestEngine implements Engine { }; } - public async execute(context: EngineContext): Promise { + public async execute(context: EngineContext, sessionId?: string): Promise { // Apply simulated delay if configured if (this.#config.simulateDelay && this.#config.simulateDelay > 0) { await new Promise((resolve) => setTimeout(resolve, this.#config.simulateDelay)); @@ -54,35 +55,22 @@ export class TestEngine implements Engine { stats.durationMs = Date.now() - startTime; - return { - success: this.#config.success ?? true, - skipFulfill: false, - lastMessage: `${this.#config.lastMessage} (task: ${context.taskId}, agent: ${context.agentName})`, - stats, - }; - } - - public async sendFollowUp(message: string): Promise { - // Apply simulated delay if configured - if (this.#config.simulateDelay && this.#config.simulateDelay > 0) { - await new Promise((resolve) => setTimeout(resolve, this.#config.simulateDelay)); + if (sessionId) { + this.#currentSessionId = sessionId; + } else { + this.#currentSessionId = `test-session-${Date.now()}`; } - const stats: EngineResult["stats"] = { - durationMs: this.#config.simulateDelay ?? 10, - inputTokens: 50, - outputTokens: 25, - cacheReadTokens: 5, - cacheCreationTokens: 2, - totalCostUsd: 0.0025, - numTurns: 1, - }; + const isFollowUp = Boolean(sessionId); return { success: this.#config.success ?? true, skipFulfill: false, - lastMessage: `Follow-up: ${message}`, + lastMessage: isFollowUp + ? `Follow-up: ${this.#config.lastMessage} (session: ${this.#currentSessionId})` + : `${this.#config.lastMessage} (task: ${context.taskId}, agent: ${context.agentName})`, stats, + sessionId: this.#currentSessionId, }; } diff --git a/orchestrator/packages/engine/src/types.ts b/orchestrator/packages/engine/src/types.ts index f2287a8..24a56d1 100644 --- a/orchestrator/packages/engine/src/types.ts +++ b/orchestrator/packages/engine/src/types.ts @@ -6,6 +6,7 @@ export type EngineContext = { metadata: Record; setState: (newState: Record) => Promise; verbose: boolean; + instructions?: string; }; // FR-2: EngineResult MUST contain @@ -14,6 +15,7 @@ export type EngineResult = { skipFulfill: boolean; lastMessage: string | null; stats: ExecutionStats | null; + sessionId?: string; }; // FR-2: ExecutionStats MUST contain diff --git a/orchestrator/packages/orchestrator/package.json b/orchestrator/packages/orchestrator/package.json index 2eae5d7..a35397f 100644 --- a/orchestrator/packages/orchestrator/package.json +++ b/orchestrator/packages/orchestrator/package.json @@ -1,12 +1,20 @@ { "name": "@bifrost-ai/orchestrator", - "version": "1.0.0", - "description": "CLI entry point for Orchestrator Framework", + "version": "0.0.0", + "description": "Orchestrator Framework for AI agents", "type": "module", - "bin": { - "orchestrator": "./dist/index.js" - }, + "files": [ + "dist" + ], + "main": "dist/index.js", + "types": "dist/index.d.ts", "scripts": { "build": "vite build" + }, + "dependencies": { + "@bifrost-ai/task-source": "^0.0.0", + "@bifrost-ai/engine": "^0.0.0", + "gray-matter": "^4.0.3", + "handlebars": "^4.7.9" } } diff --git a/orchestrator/packages/orchestrator/src/agent-helper.ts b/orchestrator/packages/orchestrator/src/agent-helper.ts new file mode 100644 index 0000000..5163314 --- /dev/null +++ b/orchestrator/packages/orchestrator/src/agent-helper.ts @@ -0,0 +1,46 @@ +import { parseAgentDefinition } from "./core/agent-parser"; +import type { AgentDefinition } from "./core/types"; + +const deepMerge = (target: Partial, source: Partial): Type => { + const result = { ...target }; + + for (const key in source) { + if (!Object.hasOwn(source, key)) { + // Skip prototype properties + } else { + const sourceValue = source[key]; + const targetValue = result[key]; + + if (Array.isArray(sourceValue) && Array.isArray(targetValue)) { + (result as Record)[key] = [...targetValue, ...sourceValue]; + } else if ( + sourceValue && + typeof sourceValue === "object" && + !Array.isArray(sourceValue) && + targetValue && + typeof targetValue === "object" && + !Array.isArray(targetValue) + ) { + (result as Record)[key] = deepMerge( + targetValue as Partial, + sourceValue as Partial, + ); + } else { + (result as Record)[key] = sourceValue; + } + } + } + + return result as Type; +}; + +export const loadAgent = async ( + def: string, + agent?: Partial, +): Promise => { + const definition = parseAgentDefinition(def); + if (!definition) { + throw new Error("Failed to parse agent definition"); + } + return deepMerge(definition, agent ?? {}); +}; diff --git a/orchestrator/packages/orchestrator/src/config.spec.ts b/orchestrator/packages/orchestrator/src/config.spec.ts deleted file mode 100644 index dea29eb..0000000 --- a/orchestrator/packages/orchestrator/src/config.spec.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { describe, expect, it, vi } from "vitest"; -import { loadConfig } from "./config"; -import { readFile } from "node:fs/promises"; - -vi.mock("node:fs/promises"); - -describe("Config Loader - US-8, FR-13", () => { - describe("Load .orchestrator.yaml configuration", () => { - it("should parse valid configuration file", async () => { - // Given a .orchestrator.yaml configuration file - const yamlContent = ` -orchestrate: - task_source: - type: api - settings: - base_url: https://api.example.com - poll_interval: 30 - - engine: - type: ai-runtime - settings: - endpoint: https://ai.example.com - - task_state_store: - type: redis - settings: - url: redis://localhost:6379 - - concurrency: 5 - claimant: orchestrator-1 - logging: verbose -`; - - vi.mocked(readFile).mockResolvedValue(yamlContent); - - // When the orchestrator loads configuration - const config = await loadConfig("/test/project"); - - // Then an APITaskSource is created with the specified base_url - expect(config.orchestrate.task_source.type).toBe("api"); - expect(config.orchestrate.task_source.settings?.base_url).toBe("https://api.example.com"); - - // And the task source polls every 30 seconds - expect(config.orchestrate.task_source.settings?.poll_interval).toBe(30); - - // And an AIRuntimeEngine is created with the specified endpoint - expect(config.orchestrate.engine.type).toBe("ai-runtime"); - expect(config.orchestrate.engine.settings?.endpoint).toBe("https://ai.example.com"); - - // And a RedisTaskStateStore is created - expect(config.orchestrate.task_state_store.type).toBe("redis"); - expect(config.orchestrate.task_state_store.settings?.url).toBe("redis://localhost:6379"); - - // And concurrency is 5 - expect(config.orchestrate.concurrency).toBe(5); - - // And claimant is set - expect(config.orchestrate.claimant).toBe("orchestrator-1"); - - // And logging is verbose - expect(config.orchestrate.logging).toBe("verbose"); - }); - - it("should use default values when optional fields are missing", async () => { - const yamlContent = ` -orchestrate: - task_source: - type: memory - engine: - type: test - task_state_store: - type: memory -`; - - vi.mocked(readFile).mockResolvedValue(yamlContent); - - const config = await loadConfig("/test/project"); - - expect(config.orchestrate.concurrency).toBe(1); // default - expect(config.orchestrate.claimant).toBeNull(); // default - expect(config.orchestrate.logging).toBe("normal"); // default - }); - - it("should throw error for unknown task source type", async () => { - // Given an unknown task source type is configured - const yamlContent = ` -orchestrate: - task_source: - type: unknown-type - engine: - type: test - task_state_store: - type: memory -`; - - vi.mocked(readFile).mockResolvedValue(yamlContent); - - // When the orchestrator attempts to create the task source - // Then an error is raised with message "Unknown task source type: {type}" - await expect(loadConfig("/test/project")).rejects.toThrow( - "Unknown task source type: unknown-type", - ); - }); - - it("should load from home directory when not in project", async () => { - // Test loading config from home directory as fallback - const yamlContent = ` -orchestrate: - task_source: - type: memory - engine: - type: test - task_state_store: - type: memory -`; - - vi.mocked(readFile).mockResolvedValue(yamlContent); - - const config = await loadConfig("/home/user/.orchestrator.yaml"); - - expect(config.orchestrate.task_source.type).toBe("memory"); - }); - }); -}); diff --git a/orchestrator/packages/orchestrator/src/config.ts b/orchestrator/packages/orchestrator/src/config.ts deleted file mode 100644 index 8e87060..0000000 --- a/orchestrator/packages/orchestrator/src/config.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { readFile } from "node:fs/promises"; -import { resolve } from "node:path"; -import { homedir } from "node:os"; -import { parse as yamlParse } from "yaml"; - -export type TaskSourceConfig = { - type: string; - settings?: Record; -}; - -export type EngineConfig = { - type: string; - settings?: Record; -}; - -export type TaskStateStoreConfig = { - type: "redis" | "memory" | "file"; - settings?: Record; -}; - -export type OrchestrateConfig = { - task_source: TaskSourceConfig; - engine: EngineConfig; - task_state_store: TaskStateStoreConfig; - concurrency: number; - claimant: string | null; - logging: "normal" | "verbose"; -}; - -export type OrchestratorConfig = { - orchestrate: OrchestrateConfig; -}; - -const DEFAULT_CONFIG: OrchestratorConfig = { - orchestrate: { - task_source: { type: "memory" }, - engine: { type: "test" }, - task_state_store: { type: "memory" }, - concurrency: 1, - claimant: null, - logging: "normal", - }, -}; - -/** - * Load .orchestrator.yaml configuration file. - * FR-13: Configuration - * US-8: System Administrator - Configure Multiple Sources and Engines - * - * @param projectDir - The project directory path - * @returns Parsed configuration - */ -export const loadConfig = async (projectDir: string): Promise => { - // Try project directory first, then home directory - const projectConfigPath = resolve(projectDir, ".orchestrator.yaml"); - const homeConfigPath = resolve(homedir(), ".orchestrator.yaml"); - - let configContent = ""; - - try { - configContent = await readFile(projectConfigPath, "utf-8"); - } catch { - try { - configContent = await readFile(homeConfigPath, "utf-8"); - } catch { - // No config file found, return defaults - return DEFAULT_CONFIG; - } - } - - const parsed = yamlParse(configContent) as Record; - - if (!parsed.orchestrate) { - return DEFAULT_CONFIG; - } - - const orchestrate = parsed.orchestrate as Record; - - // Validate task source type - const taskSource = orchestrate.task_source as TaskSourceConfig | undefined; - const taskSourceType = taskSource?.type || "memory"; - - // FR-13: If unknown task source type, raise error - const validTaskSourceTypes = ["api", "memory", "file", "queue"]; - if (!validTaskSourceTypes.includes(taskSourceType)) { - throw new Error(`Unknown task source type: ${taskSourceType}`); - } - - // Extract settings - const taskSourceSettings = (taskSource?.settings as Record) || {}; - - const engine = orchestrate.engine as EngineConfig | undefined; - const engineSettings = (engine?.settings as Record) || {}; - - const taskStateStore = orchestrate.task_state_store as TaskStateStoreConfig | undefined; - const taskStateStoreSettings = (taskStateStore?.settings as Record) || {}; - - // Parse optional fields with defaults - const concurrency = typeof orchestrate.concurrency === "number" ? orchestrate.concurrency : 1; // oxlint-disable-line no-ternary - const claimant = typeof orchestrate.claimant === "string" ? orchestrate.claimant : null; // oxlint-disable-line no-ternary - const logging = (orchestrate.logging === "verbose" ? "verbose" : "normal") as // oxlint-disable-line no-ternary - | "normal" - | "verbose"; - - return { - orchestrate: { - task_source: { - type: taskSourceType, - settings: taskSourceSettings, - }, - engine: { - type: engine?.type || "test", - settings: engineSettings, - }, - task_state_store: { - type: (taskStateStore?.type as "redis" | "memory" | "file") || "memory", - settings: taskStateStoreSettings, - }, - concurrency, - claimant, - logging, - }, - }; -}; diff --git a/orchestrator/packages/core/src/agent-parser.spec.ts b/orchestrator/packages/orchestrator/src/core/agent-parser.spec.ts similarity index 78% rename from orchestrator/packages/core/src/agent-parser.spec.ts rename to orchestrator/packages/orchestrator/src/core/agent-parser.spec.ts index 53ea973..e836723 100644 --- a/orchestrator/packages/core/src/agent-parser.spec.ts +++ b/orchestrator/packages/orchestrator/src/core/agent-parser.spec.ts @@ -25,13 +25,6 @@ template: context?: prDescription: string additionalNotes?: string -hooks: - Start: - - name: validate-args - scriptPath: hooks/Start.d/validate-args.mjs - Stop: - - name: check-new-tests - scriptPath: hooks/Stop.d/check-new-tests.mjs --- You are a code reviewer. Review the changes for {{language.name}}. `; @@ -46,6 +39,8 @@ You are a code reviewer. Review the changes for {{language.name}}. expect(agent?.toolClasses).toEqual(["linter"]); expect(agent?.template.parameters).toBeDefined(); expect(agent?.promptBody).toContain("You are a code reviewer"); + expect(agent?.hooks.Start).toEqual([]); + expect(agent?.hooks.Stop).toEqual([]); }); it("should render Handlebars tokens from template.parameters", () => { @@ -154,44 +149,4 @@ Use the {{framework}} for {{language}}. expect(agent).toBeNull(); }); }); - - describe("Hook parsing", () => { - it("should parse Start hooks", () => { - const content = `--- -name: test-agent -description: Test -tools: [] -hooks: - Start: - - name: validate-args - scriptPath: hooks/Start.d/validate-args.mjs - timeout: 120000 ---- -Prompt -`; - - const agent = parseAgentDefinition(content); - expect(agent?.hooks.Start).toHaveLength(1); - expect(agent?.hooks.Start[0].name).toBe("validate-args"); - expect(agent?.hooks.Start[0].timeout).toBe(120000); - }); - - it("should parse Stop hooks", () => { - const content = `--- -name: test-agent -description: Test -tools: [] -hooks: - Stop: - - name: check-new-tests - scriptPath: hooks/Stop.d/check-new-tests.mjs ---- -Prompt -`; - - const agent = parseAgentDefinition(content); - expect(agent?.hooks.Stop).toHaveLength(1); - expect(agent?.hooks.Stop[0].name).toBe("check-new-tests"); - }); - }); }); diff --git a/orchestrator/packages/core/src/agent-parser.ts b/orchestrator/packages/orchestrator/src/core/agent-parser.ts similarity index 75% rename from orchestrator/packages/core/src/agent-parser.ts rename to orchestrator/packages/orchestrator/src/core/agent-parser.ts index 17490ce..3850b5f 100644 --- a/orchestrator/packages/core/src/agent-parser.ts +++ b/orchestrator/packages/orchestrator/src/core/agent-parser.ts @@ -118,53 +118,13 @@ export const parseAgentDefinition = (content: string): AgentDefinition | null => } } - // Parse hooks - const hooksData = data.hooks as Record | undefined; - const hooks: { - Start: { name: string; scriptPath: string; timeout?: number }[]; - Stop: { name: string; scriptPath: string; timeout?: number }[]; - } = { - Start: [], - Stop: [], - }; - - if (hooksData?.Start && Array.isArray(hooksData.Start)) { - for (const hook of hooksData.Start) { - if (typeof hook === "object" && hook !== null) { - const hookObj = hook as Record; - if (typeof hookObj.name === "string" && typeof hookObj.scriptPath === "string") { - hooks.Start.push({ - name: hookObj.name, - scriptPath: hookObj.scriptPath, - timeout: typeof hookObj.timeout === "number" ? hookObj.timeout : void 0, - }); - } - } - } - } - - if (hooksData?.Stop && Array.isArray(hooksData.Stop)) { - for (const hook of hooksData.Stop) { - if (typeof hook === "object" && hook !== null) { - const hookObj = hook as Record; - if (typeof hookObj.name === "string" && typeof hookObj.scriptPath === "string") { - hooks.Stop.push({ - name: hookObj.name, - scriptPath: hookObj.scriptPath, - timeout: typeof hookObj.timeout === "number" ? hookObj.timeout : void 0, - }); - } - } - } - } - return { name: data.name, description: data.description, tools: data.tools as string[], toolClasses, template: { parameters }, - hooks, + hooks: { Start: [], Stop: [] }, promptBody, }; } catch (error) { diff --git a/orchestrator/packages/core/src/handlebars-renderer.spec.ts b/orchestrator/packages/orchestrator/src/core/handlebars-renderer.spec.ts similarity index 100% rename from orchestrator/packages/core/src/handlebars-renderer.spec.ts rename to orchestrator/packages/orchestrator/src/core/handlebars-renderer.spec.ts diff --git a/orchestrator/packages/core/src/handlebars-renderer.ts b/orchestrator/packages/orchestrator/src/core/handlebars-renderer.ts similarity index 100% rename from orchestrator/packages/core/src/handlebars-renderer.ts rename to orchestrator/packages/orchestrator/src/core/handlebars-renderer.ts diff --git a/orchestrator/packages/orchestrator/src/core/hook-executor.spec.ts b/orchestrator/packages/orchestrator/src/core/hook-executor.spec.ts new file mode 100644 index 0000000..60dd294 --- /dev/null +++ b/orchestrator/packages/orchestrator/src/core/hook-executor.spec.ts @@ -0,0 +1,171 @@ +import { describe, expect, it, vi } from "vitest"; +import { executeHooks } from "./hook-executor"; +import type { HookSpec } from "./types"; + +describe("Hook Executor", () => { + const baseContext = { + projectDir: "/test/project", + params: { language: "python" }, + getTaskState: () => ({ language: { name: "python" } }), + setTaskState: vi.fn().mockResolvedValue(void 0), + }; + + describe("Start hooks", () => { + it("should execute hooks in sequence", async () => { + const order: string[] = []; + const hooks: HookSpec[] = [ + { + name: "first", + fn: async () => { + order.push("first"); + return { outcome: "success" as const }; + }, + }, + { + name: "second", + fn: async () => { + order.push("second"); + return { outcome: "success" as const }; + }, + }, + ]; + + const results = await executeHooks({ hooks, lifecycle: "Start", context: baseContext }); + + expect(results).toHaveLength(2); + expect(order).toEqual(["first", "second"]); + }); + + it("should stop on fatal", async () => { + const hooks: HookSpec[] = [ + { name: "fatal", fn: async () => ({ outcome: "fatal" as const, message: "boom" }) }, + { name: "skipped", fn: async () => ({ outcome: "success" as const }) }, + ]; + + const results = await executeHooks({ hooks, lifecycle: "Start", context: baseContext }); + + expect(results).toHaveLength(1); + expect(results[0].outcome).toBe("fatal"); + }); + + it("should allow skip outcome", async () => { + const hooks: HookSpec[] = [ + { + name: "skip-check", + fn: async () => ({ outcome: "skip" as const, message: "nothing to do" }), + }, + ]; + + const results = await executeHooks({ hooks, lifecycle: "Start", context: baseContext }); + + expect(results[0].outcome).toBe("skip"); + expect(results[0].message).toBe("nothing to do"); + }); + }); + + describe("Stop hooks", () => { + it("should detect follow-up", async () => { + const hooks: HookSpec[] = [ + { + name: "lint", + fn: async () => ({ outcome: "follow-up" as const, message: "Fix lint errors" }), + }, + ]; + + const results = await executeHooks({ hooks, lifecycle: "Stop", context: baseContext }); + + expect(results[0].outcome).toBe("follow-up"); + expect(results[0].message).toBe("Fix lint errors"); + }); + }); + + describe("Error handling", () => { + it("should treat thrown errors as fatal", async () => { + const hooks: HookSpec[] = [ + { + name: "broken", + fn: async () => { + throw new Error("crashed"); + }, + }, + ]; + + const results = await executeHooks({ hooks, lifecycle: "Start", context: baseContext }); + + expect(results).toHaveLength(1); + expect(results[0].outcome).toBe("fatal"); + expect(results[0].message).toBe("crashed"); + }); + + it("should handle non-Error throws", async () => { + const hooks: HookSpec[] = [ + // oxlint-disable-next-line no-throw-literal + { + name: "weird", + fn: async () => { + throw "string error"; + }, + }, + ]; + + const results = await executeHooks({ hooks, lifecycle: "Start", context: baseContext }); + + expect(results[0].outcome).toBe("fatal"); + expect(results[0].message).toBe("string error"); + }); + }); + + describe("Context", () => { + it("should pass hookName to hook function", async () => { + let receivedName = ""; + const hooks: HookSpec[] = [ + { + name: "my-hook", + fn: async (ctx) => { + receivedName = ctx.hookName; + return { outcome: "success" as const }; + }, + }, + ]; + + await executeHooks({ hooks, lifecycle: "Start", context: baseContext }); + + expect(receivedName).toBe("my-hook"); + }); + + it("should propagate state changes through sequential hooks", async () => { + let latestState: Record | null = null; + const setStateMock = vi.fn().mockResolvedValue(void 0); + let localState = { step: 1 }; + + const contextWithMutableState = { + ...baseContext, + getTaskState: () => ({ ...localState }), + setTaskState: setStateMock, + }; + + const hooks: HookSpec[] = [ + { + name: "first", + fn: async (ctx) => { + await ctx.setTaskState({ step: 2 }); + localState = { step: 2 }; + return { outcome: "success" as const }; + }, + }, + { + name: "second", + fn: async (ctx) => { + latestState = ctx.getTaskState(); + return { outcome: "success" as const }; + }, + }, + ]; + + await executeHooks({ hooks, lifecycle: "Start", context: contextWithMutableState }); + + expect(latestState).toEqual({ step: 2 }); + expect(setStateMock).toHaveBeenCalledWith({ step: 2 }); + }); + }); +}); diff --git a/orchestrator/packages/orchestrator/src/core/hook-executor.ts b/orchestrator/packages/orchestrator/src/core/hook-executor.ts new file mode 100644 index 0000000..4a60c8b --- /dev/null +++ b/orchestrator/packages/orchestrator/src/core/hook-executor.ts @@ -0,0 +1,35 @@ +import type { HookSpec, HookResult, HookExecutionContext } from "./types"; + +export type { HookExecutionContext, HookResult }; + +type ExecuteHooksOptions = { + hooks: HookSpec[]; + lifecycle: "Start" | "Stop"; + context: Omit; +}; + +export const executeHooks = async (options: ExecuteHooksOptions): Promise => { + const { hooks, context } = options; + const results: HookResult[] = []; + + for (const hook of hooks) { + try { + const result = await hook.fn({ ...context, hookName: hook.name }); + + results.push(result); + + if (result.outcome === "fatal") { + break; + } + } catch (error) { + results.push({ + outcome: "fatal", + message: error instanceof Error ? error.message : String(error), + }); + + break; + } + } + + return results; +}; diff --git a/orchestrator/packages/core/src/index.ts b/orchestrator/packages/orchestrator/src/core/index.ts similarity index 84% rename from orchestrator/packages/core/src/index.ts rename to orchestrator/packages/orchestrator/src/core/index.ts index 7ed1c16..330fa33 100644 --- a/orchestrator/packages/core/src/index.ts +++ b/orchestrator/packages/orchestrator/src/core/index.ts @@ -4,4 +4,3 @@ export * from "./validator"; export * from "./hook-executor"; export * from "./handlebars-renderer"; export * from "./orchestrator"; -export * from "./repo-installer"; diff --git a/orchestrator/packages/core/src/orchestrator.spec.ts b/orchestrator/packages/orchestrator/src/core/orchestrator.spec.ts similarity index 67% rename from orchestrator/packages/core/src/orchestrator.spec.ts rename to orchestrator/packages/orchestrator/src/core/orchestrator.spec.ts index b6cf498..d7b42fd 100644 --- a/orchestrator/packages/core/src/orchestrator.spec.ts +++ b/orchestrator/packages/orchestrator/src/core/orchestrator.spec.ts @@ -7,7 +7,6 @@ import type { Engine } from "@bifrost-ai/engine"; describe("Orchestrator", () => { describe("task execution lifecycle", () => { it("should validate taskState → execute pre-hooks → invoke engine → execute post-hooks → report success", async () => { - // Given a task with valid taskState const task: Task = { id: "task-1", agentId: "agent-1", @@ -54,7 +53,6 @@ describe("Orchestrator", () => { }), }; - // When orchestrating const result = await orchestrate({ task, agent, @@ -63,18 +61,16 @@ describe("Orchestrator", () => { projectDir: "/test/project", }); - // Then validation passes, hooks execute, engine runs, task completes expect(result.outcome).toBe("completed"); expect(mockEngine.execute).toHaveBeenCalled(); expect(mockTaskSource.completeTask).toHaveBeenCalledWith("task-1"); }); it("should fail task when taskState validation fails", async () => { - // Given a task with invalid taskState const task: Task = { id: "task-2", agentId: "agent-1", - taskState: {}, // Missing required 'language' parameter + taskState: {}, metadata: {}, }; @@ -109,7 +105,6 @@ describe("Orchestrator", () => { }), }; - // When orchestrating const result = await orchestrate({ task, agent, @@ -118,7 +113,6 @@ describe("Orchestrator", () => { projectDir: "/test/project", }); - // Then task fails, engine not called expect(result.outcome).toBe("failed"); expect(mockTaskSource.failTask).toHaveBeenCalledWith( "task-2", @@ -176,15 +170,13 @@ describe("Orchestrator", () => { projectDir: "/test/project", }); - // Engine receives setState callback expect(capturedSetState).toBeDefined(); - // Calling setState persists to task source await capturedSetState!({ step: 2 }); expect(mockTaskSource.setState).toHaveBeenCalledWith("task-1", { step: 2 }); }); - it("should fail task when Start hook returns fatal error", async () => { + it("should fail task when Start hook returns fatal", async () => { const task: Task = { id: "task-1", agentId: "agent-1", @@ -199,7 +191,12 @@ describe("Orchestrator", () => { toolClasses: [], template: { parameters: {} }, hooks: { - Start: [{ name: "fatal-hook", scriptPath: "/fatal.mjs", timeout: 30000 }], + Start: [ + { + name: "fatal-hook", + fn: async () => ({ outcome: "fatal" as const, message: "Fatal error" }), + }, + ], Stop: [], }, promptBody: "Test", @@ -223,30 +220,23 @@ describe("Orchestrator", () => { }), }; - const mockExec = vi.fn().mockResolvedValue({ - exitCode: 2, // Fatal - stdout: "", - stderr: "Fatal error", - }); - const result = await orchestrate({ task, agent, taskSource: mockTaskSource, engine: mockEngine, projectDir: "/test/project", - hookExec: mockExec, }); expect(result.outcome).toBe("failed"); expect(mockTaskSource.failTask).toHaveBeenCalledWith( "task-1", - expect.stringContaining("fatal-hook"), + expect.stringContaining("Fatal error"), ); expect(mockEngine.execute).not.toHaveBeenCalled(); }); - it("should fail task when Stop hook returns fatal error", async () => { + it("should skip engine and complete task when Start hook returns skip", async () => { const task: Task = { id: "task-1", agentId: "agent-1", @@ -261,8 +251,13 @@ describe("Orchestrator", () => { toolClasses: [], template: { parameters: {} }, hooks: { - Start: [], - Stop: [{ name: "fatal-hook", scriptPath: "/fatal.mjs", timeout: 30000 }], + Start: [ + { + name: "skip-check", + fn: async () => ({ outcome: "skip" as const, message: "already up to date" }), + }, + ], + Stop: [], }, promptBody: "Test", }; @@ -285,29 +280,80 @@ describe("Orchestrator", () => { }), }; - const mockExec = vi.fn().mockResolvedValue({ - exitCode: 2, // Fatal - stdout: "", - stderr: "Fatal error", + const result = await orchestrate({ + task, + agent, + taskSource: mockTaskSource, + engine: mockEngine, + projectDir: "/test/project", }); + expect(result.outcome).toBe("skipped"); + expect(result.skipReason).toBe("already up to date"); + expect(mockEngine.execute).not.toHaveBeenCalled(); + expect(mockTaskSource.completeTask).toHaveBeenCalledWith("task-1"); + }); + + it("should fail task when Stop hook returns fatal", async () => { + const task: Task = { + id: "task-1", + agentId: "agent-1", + taskState: {}, + metadata: {}, + }; + + const agent: AgentDefinition = { + name: "test", + description: "Test", + tools: [], + toolClasses: [], + template: { parameters: {} }, + hooks: { + Start: [], + Stop: [ + { + name: "fatal-hook", + fn: async () => ({ outcome: "fatal" as const, message: "Fatal error" }), + }, + ], + }, + promptBody: "Test", + }; + + const mockTaskSource: TaskSource = { + async *watchTasks(): AsyncGenerator { + yield task; + }, + completeTask: vi.fn().mockResolvedValue(void 0), + failTask: vi.fn().mockResolvedValue(void 0), + setState: vi.fn().mockResolvedValue(void 0), + }; + + const mockEngine: Engine = { + execute: vi.fn().mockResolvedValue({ + success: true, + skipFulfill: false, + lastMessage: "Done", + stats: null, + }), + }; + const result = await orchestrate({ task, agent, taskSource: mockTaskSource, engine: mockEngine, projectDir: "/test/project", - hookExec: mockExec, }); expect(result.outcome).toBe("failed"); expect(mockTaskSource.failTask).toHaveBeenCalledWith( "task-1", - expect.stringContaining("fatal-hook"), + expect.stringContaining("Fatal error"), ); }); - it("should support follow-up loop when Stop hook returns exit code 1", async () => { + it("should support follow-up loop when Stop hook returns follow-up", async () => { const task: Task = { id: "task-1", agentId: "agent-1", @@ -315,6 +361,8 @@ describe("Orchestrator", () => { metadata: {}, }; + let stopCallCount = 0; + const agent: AgentDefinition = { name: "test", description: "Test", @@ -323,7 +371,18 @@ describe("Orchestrator", () => { template: { parameters: {} }, hooks: { Start: [], - Stop: [{ name: "lint", scriptPath: "/lint.mjs", timeout: 30000 }], + Stop: [ + { + name: "lint", + fn: async () => { + stopCallCount += 1; + if (stopCallCount === 1) { + return { outcome: "follow-up" as const, message: "Fix lint issues" }; + } + return { outcome: "success" as const }; + }, + }, + ], }, promptBody: "Test", }; @@ -354,22 +413,83 @@ describe("Orchestrator", () => { }), }; - const mockExec = vi - .fn() - .mockResolvedValueOnce({ exitCode: 1, stdout: "Fix lint issues", stderr: "" }) - .mockResolvedValueOnce({ exitCode: 0, stdout: "", stderr: "" }); - const result = await orchestrate({ task, agent, taskSource: mockTaskSource, engine: mockEngine, projectDir: "/test/project", - hookExec: mockExec, }); expect(result.outcome).toBe("completed"); expect(mockEngine.execute).toHaveBeenCalledTimes(2); }); + + it("should propagate state changes from Start hooks to engine", async () => { + const task: Task = { + id: "task-1", + agentId: "agent-1", + taskState: { step: 1 }, + metadata: {}, + }; + + const agent: AgentDefinition = { + name: "test", + description: "Test", + tools: [], + toolClasses: [], + template: { parameters: {} }, + hooks: { + Start: [ + { + name: "update-state", + fn: async (ctx) => { + await ctx.setTaskState({ step: 2, updatedBy: "hook" }); + return { outcome: "success" as const }; + }, + }, + ], + Stop: [], + }, + promptBody: "Test", + }; + + const mockTaskSource: TaskSource = { + async *watchTasks(): AsyncGenerator { + yield task; + }, + completeTask: vi.fn().mockResolvedValue(void 0), + failTask: vi.fn().mockResolvedValue(void 0), + setState: vi.fn().mockResolvedValue(void 0), + }; + + let engineReceivedState: Record | null = null; + + const mockEngine: Engine = { + execute: vi.fn().mockImplementation(async (context) => { + engineReceivedState = context.taskState; + return { + success: true, + skipFulfill: false, + lastMessage: "Done", + stats: null, + }; + }), + }; + + await orchestrate({ + task, + agent, + taskSource: mockTaskSource, + engine: mockEngine, + projectDir: "/test/project", + }); + + expect(engineReceivedState).toEqual({ step: 2, updatedBy: "hook" }); + expect(mockTaskSource.setState).toHaveBeenCalledWith("task-1", { + step: 2, + updatedBy: "hook", + }); + }); }); }); diff --git a/orchestrator/packages/core/src/orchestrator.ts b/orchestrator/packages/orchestrator/src/core/orchestrator.ts similarity index 55% rename from orchestrator/packages/core/src/orchestrator.ts rename to orchestrator/packages/orchestrator/src/core/orchestrator.ts index 6799115..297b117 100644 --- a/orchestrator/packages/core/src/orchestrator.ts +++ b/orchestrator/packages/orchestrator/src/core/orchestrator.ts @@ -1,11 +1,11 @@ -import type { AgentDefinition } from "./types"; +import type { AgentDefinition, HookExecutionContext } from "./types"; import { validateTaskState } from "./validator"; import type { Task, TaskSource } from "@bifrost-ai/task-source"; import type { Engine, EngineContext, EngineResult } from "@bifrost-ai/engine"; -import { type HookExecutionContext, executeHooks } from "./hook-executor"; +import { executeHooks } from "./hook-executor"; type OrchestrationResult = { - outcome: "completed" | "failed" | "halted"; + outcome: "completed" | "failed" | "halted" | "skipped"; telemetry?: { durationMs: number; inputTokens: number; @@ -16,21 +16,30 @@ type OrchestrationResult = { numTurns: number; }; error?: string; + skipReason?: string; }; -type HookExecFn = (opts: { - scriptPath: string; - stdin: string; - timeout: number; -}) => Promise<{ exitCode: number; stdout: string; stderr: string }>; - type OrchestrateOptions = { task: Task; agent: AgentDefinition; taskSource: TaskSource; engine: Engine; projectDir: string; - hookExec?: HookExecFn; +}; + +const handleEngineFailure = async ( + engineResult: EngineResult, + taskId: string, + taskSource: TaskSource, +): Promise => { + if (engineResult.skipFulfill) { + return { outcome: "skipped", error: engineResult.lastMessage ?? "unknown" }; + } + await taskSource.failTask( + taskId, + `Engine execution failed: ${engineResult.lastMessage ?? "unknown"}`, + ); + return { outcome: "failed", error: engineResult.lastMessage ?? "unknown" }; }; /** @@ -39,7 +48,7 @@ type OrchestrateOptions = { * US-3: Agent Operator - Dispatch agent on task */ export const orchestrate = async (options: OrchestrateOptions): Promise => { - const { task, agent, taskSource, engine, projectDir, hookExec } = options; + const { task, agent, taskSource, engine, projectDir } = options; const startTime = Date.now(); let totalTelemetry: EngineResult["stats"] = null; @@ -53,28 +62,38 @@ export const orchestrate = async (options: OrchestrateOptions): Promise ({ ...currentTaskState }); + + const setTaskState = async (arg: Record) => { + currentTaskState = { ...arg }; + await taskSource.setState(task.id, arg); + }; + // Step 2: Execute pre-task hooks - const hookContext: HookExecutionContext = { + const hookContext: Omit = { projectDir, params: task.taskState, - taskState: task.taskState, + getTaskState, + setTaskState, }; - const defaultHookExec: HookExecFn = async () => ({ exitCode: 0, stdout: "", stderr: "" }); - const execFn = hookExec ?? defaultHookExec; - const startHookResults = await executeHooks({ hooks: agent.hooks.Start, lifecycle: "Start", context: hookContext, - execFn, }); for (const hook of startHookResults) { - if (hook.fatal) { - // oxlint-disable-next-line no-await-in-loop - await taskSource.failTask(task.id, `Start hook ${hook.hookName} failed: ${hook.stderr}`); - return { outcome: "failed", error: hook.stderr }; + if (hook.outcome === "fatal") { + await taskSource.failTask(task.id, `Start hook failed: ${hook.message ?? "unknown error"}`); + return { outcome: "failed", error: hook.message }; + } + + if (hook.outcome === "skip") { + await taskSource.completeTask(task.id); + return { outcome: "skipped", skipReason: hook.message }; } } @@ -83,21 +102,36 @@ export const orchestrate = async (options: OrchestrateOptions): Promise) => taskSource.setState(task.id, newState), + setState: async (newState: Record) => { + currentTaskState = { ...newState }; + await taskSource.setState(task.id, newState); + }, verbose: false, }; // Main execution loop (handles follow-ups) - let maxFollowUps = 10; - let lastMessage = ""; + const maxFollowUps = 10; + let attemptsUsed = 0; + let instructions: string | undefined = undefined; + let sessionId: string | undefined = undefined; - while ((maxFollowUps -= 1) > 0) { + while (((attemptsUsed += 1), attemptsUsed <= maxFollowUps)) { numTurns += 1; - // oxlint-disable-next-line no-await-in-loop - const engineResult: EngineResult = await engine.execute(engineContext); + const engineResult: EngineResult = await engine.execute( + { + ...engineContext, + taskState: currentTaskState, + instructions, + }, + sessionId, + ); + + if (!engineResult.success) { + return handleEngineFailure(engineResult, task.id, taskSource); + } if (engineResult.stats) { if (!totalTelemetry) { @@ -113,31 +147,28 @@ export const orchestrate = async (options: OrchestrateOptions): Promise maxFollowUps) { + await taskSource.failTask(task.id, "Max follow-ups exceeded"); + return { outcome: "halted", error: "Max follow-ups exceeded" }; } // Step 5: Report success diff --git a/orchestrator/packages/orchestrator/src/core/types.ts b/orchestrator/packages/orchestrator/src/core/types.ts new file mode 100644 index 0000000..370be72 --- /dev/null +++ b/orchestrator/packages/orchestrator/src/core/types.ts @@ -0,0 +1,40 @@ +// FR-4: Agent Definition File types + +export type HookResult = { + outcome: "success" | "follow-up" | "fatal" | "skip"; + message?: string; +}; + +export type HookExecutionContext = { + projectDir: string; + hookName: string; + params: Record; + getTaskState: () => Record; + setTaskState: (newState: Record) => Promise; +}; + +export type HookFn = (ctx: HookExecutionContext) => Promise; + +export type HookSpec = { + name: string; + fn: HookFn; +}; + +export type AgentDefinition = { + name: string; + description: string; + tools: string[]; + toolClasses: string[]; + template: Template; + hooks: Hooks; + promptBody: string; +}; + +export type Template = { + parameters: Record; +}; + +export type Hooks = { + Start: HookSpec[]; + Stop: HookSpec[]; +}; diff --git a/orchestrator/packages/core/src/validator.spec.ts b/orchestrator/packages/orchestrator/src/core/validator.spec.ts similarity index 100% rename from orchestrator/packages/core/src/validator.spec.ts rename to orchestrator/packages/orchestrator/src/core/validator.spec.ts diff --git a/orchestrator/packages/core/src/validator.ts b/orchestrator/packages/orchestrator/src/core/validator.ts similarity index 100% rename from orchestrator/packages/core/src/validator.ts rename to orchestrator/packages/orchestrator/src/core/validator.ts diff --git a/orchestrator/packages/orchestrator/src/git-root.spec.ts b/orchestrator/packages/orchestrator/src/git-root.spec.ts deleted file mode 100644 index 4a2ba11..0000000 --- a/orchestrator/packages/orchestrator/src/git-root.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { resolveGitRoot } from "./git-root"; - -describe("Git Root Resolution - US-10", () => { - describe("FR-6: projectDir Resolution", () => { - it("should set projectDir to git root when run from inside repository", async () => { - // Given a developer runs the orchestrator from a directory inside a git repository - // When the orchestrator program starts - const root = await resolveGitRoot("/home/devzeebo/git/bifrost/orchestrator/packages/cli"); - - // Then projectDir is set to the git root - expect(root).toContain("/bifrost"); - }); - - it("should find git root from subdirectory", async () => { - // Given a git repository rooted at /home/user/myrepo - // And a developer runs the orchestrator from /home/user/myrepo/src/lib - const root = await resolveGitRoot("/home/devzeebo/git/bifrost/orchestrator/packages/cli/src"); - - // When the orchestrator program starts - // Then projectDir is /home/user/myrepo - expect(root).toBeTruthy(); - }); - - it("should exit with error when not inside a git repository", async () => { - // Given a developer runs the orchestrator from a directory that is not inside any git repository - // When the orchestrator program starts - const root = await resolveGitRoot("/tmp/nonexistent/path"); - - // Then it exits with a descriptive error stating that no git root could be found - expect(root).toBeNull(); - }); - }); -}); diff --git a/orchestrator/packages/orchestrator/src/git-root.ts b/orchestrator/packages/orchestrator/src/git-root.ts deleted file mode 100644 index f56f5c7..0000000 --- a/orchestrator/packages/orchestrator/src/git-root.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { existsSync } from "node:fs"; -import { resolve } from "node:path"; - -/** - * Resolve the git repository root by walking up from the current directory. - * FR-6: projectDir Resolution - * US-10: projectDir resolved from git root of CWD - * - * @param startPath - The starting directory path - * @returns The git root directory path, or null if not found - */ -export const resolveGitRoot = async (startPath: string): Promise => { - let currentPath = resolve(startPath); - - // Walk up the directory tree - while (currentPath !== "/") { - const gitDir = resolve(currentPath, ".git"); - - if (existsSync(gitDir)) { - return currentPath; - } - - // Move up one directory - const parentPath = resolve(currentPath, ".."); - - // Prevent infinite loop - if (parentPath === currentPath) { - break; - } - - currentPath = parentPath; - } - - // No git root found - return null; -}; diff --git a/orchestrator/packages/orchestrator/src/index.spec.ts b/orchestrator/packages/orchestrator/src/index.spec.ts deleted file mode 100644 index 853559c..0000000 --- a/orchestrator/packages/orchestrator/src/index.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { describe, expect, it } from "vitest"; -import { listAgents } from "./index"; - -describe("CLI - US-9: List Available Agents", () => { - describe("--list-agents command", () => { - it("should print each agent name, description, model, tools, start_hooks, stop_hooks", async () => { - // Given the agent catalog contains agents - // And agent "reviewer" has description, model, tools, and hooks - const mockAgent = { - name: "reviewer", - description: "Code review agent", - tools: ["readFile", "edit"], - model: "claude-opus-4-7", - hooks: { - Start: [{ name: "validate-args", scriptPath: "/hooks/validate-args.mjs" }], - Stop: [{ name: "check-new-tests", scriptPath: "/hooks/check.mjs" }], - }, - }; - - // When the orchestrator CLI is invoked with --list-agents - const output = await listAgents([mockAgent]); - - // Then each agent name is printed - expect(output).toContain("reviewer"); - // And agent description is printed if present - expect(output).toContain("Code review agent"); - // And agent tools are printed as comma-separated list - expect(output).toContain("readFile, edit"); - // And start_hooks are printed - expect(output).toContain("validate-args"); - // And stop_hooks are printed - expect(output).toContain("check-new-tests"); - }); - - it('should print "No agents found" when catalog is empty', async () => { - // Given the agent catalog is empty - // When the orchestrator CLI is invoked with --list-agents - const output = await listAgents([]); - - // Then "No agents found." is printed - expect(output).toContain("No agents found"); - }); - }); -}); diff --git a/orchestrator/packages/orchestrator/src/index.ts b/orchestrator/packages/orchestrator/src/index.ts index 84bfc6b..94076bf 100644 --- a/orchestrator/packages/orchestrator/src/index.ts +++ b/orchestrator/packages/orchestrator/src/index.ts @@ -1,145 +1,11 @@ -#!/usr/bin/env node - -import { BifrostTaskSource } from "@bifrost-ai/task-source-bifrost"; -import { ClaudeCodeEngine } from "@bifrost-ai/engine-claude-code"; -import { orchestrate, parseAgentDefinition } from "@bifrost-ai/core"; -import { readdir, readFile } from "node:fs/promises"; -import { resolve } from "node:path"; -import { argv, exit } from "node:process"; -import { resolveGitRoot } from "./git-root"; - -export type AgentDisplayInfo = { - name: string; - description?: string; - model?: string; - tools?: string[]; - hooks?: { - Start: { name: string }[]; - Stop: { name: string }[]; - }; -}; - -/** - * List available agents in human-readable format. - * US-9: Developer - List Available Agents - */ -export const listAgents = async (agents: AgentDisplayInfo[]): Promise => { - if (agents.length === 0) { - return "No agents found."; - } - - const lines: string[] = []; - - for (const agent of agents) { - lines.push(`Agent: ${agent.name}`); - - if (agent.description) { - lines.push(` Description: ${agent.description}`); - } - - if (agent.model) { - lines.push(` Model: ${agent.model}`); - } - - if (agent.tools && agent.tools.length > 0) { - lines.push(` Tools: ${agent.tools.join(", ")}`); - } - - if (agent.hooks?.Start && agent.hooks.Start.length > 0) { - const startHooks = agent.hooks.Start.map((hook) => hook.name).join(", "); - lines.push(` Start Hooks: ${startHooks}`); - } - - if (agent.hooks?.Stop && agent.hooks.Stop.length > 0) { - const stopHooks = agent.hooks.Stop.map((hook) => hook.name).join(", "); - lines.push(` Stop Hooks: ${stopHooks}`); - } - - lines.push(""); // Blank line between agents - } - - return lines.join("\n"); -}; - -const discoverAgents = async (projectDir: string) => { - const agentsDir = resolve(projectDir, ".ai"); - const entries = await readdir(agentsDir, { withFileTypes: true }); - - const results = await Promise.all( - entries - .filter((entry) => entry.isDirectory()) - .map(async (entry) => { - const agentPath = resolve(agentsDir, entry.name, "AGENT.md"); - try { - const content = await readFile(agentPath, "utf-8"); - const agent = parseAgentDefinition(content); - return agent ? ([entry.name, agent] as const) : null; - } catch { - return null; - } - }), - ); - - return new Map(results.filter((result): result is NonNullable => result !== null)); -}; - -const run = async (): Promise => { - const cwd = argv[2] ?? process.cwd(); - const projectDir = await resolveGitRoot(cwd); - - if (!projectDir) { - console.error("Not inside a git repository"); - exit(1); - } - - console.log(`Project: ${projectDir}`); - - const taskSource = new BifrostTaskSource(); - const engine = new ClaudeCodeEngine(); - const agents = await discoverAgents(projectDir); - - if (agents.size === 0) { - console.error("No agents found in .ai/ directory"); - exit(1); - } - - console.log(`Agents: ${[...agents.keys()].join(", ")}`); - console.log("Watching for tasks..."); - - for await (const task of taskSource.watchTasks()) { - const agent = agents.get(task.agentId); - if (!agent) { - console.error(`Unknown agent: ${task.agentId}`); - await taskSource.failTask(task.id, `Unknown agent: ${task.agentId}`); - } else { - console.log(`Task ${task.id} → agent ${task.agentId}`); - - const result = await orchestrate({ - task, - agent, - taskSource, - engine, - projectDir, - }); - - console.log(`Task ${task.id} ${result.outcome}${result.error ? `: ${result.error}` : ""}`); - - if (result.telemetry) { - console.log( - ` ${result.telemetry.numTurns} turns, ${result.telemetry.durationMs}ms, $${result.telemetry.totalCostUsd.toFixed(4)}`, - ); - } - } - } -}; - -export * from "./git-root"; -export * from "./config"; -export { run }; - -if (process.argv[1]?.endsWith("index.js")) { - run().catch((error: unknown) => { - console.error(error); - exit(1); - }); -} +// Core exports +export * from "./core/types"; +export * from "./core/agent-parser"; +export * from "./core/validator"; +export * from "./core/hook-executor"; +export * from "./core/handlebars-renderer"; +export * from "./core/orchestrator"; + +// Orchestrator class and agent helper +export * from "./orchestrator-class"; +export * from "./agent-helper"; diff --git a/orchestrator/packages/orchestrator/src/orchestrator-class.ts b/orchestrator/packages/orchestrator/src/orchestrator-class.ts new file mode 100644 index 0000000..d06ab2e --- /dev/null +++ b/orchestrator/packages/orchestrator/src/orchestrator-class.ts @@ -0,0 +1,61 @@ +import type { TaskSource } from "@bifrost-ai/task-source"; +import type { Engine } from "@bifrost-ai/engine"; +import type { AgentDefinition } from "./core/types"; +import { orchestrate } from "./core/orchestrator"; + +export type AgentClass = new () => AgentDefinition; + +export type OrchestratorOptions = { + taskSource: new () => TaskSource; + engine: new () => Engine; +}; + +export class Orchestrator { + private taskSource: TaskSource; + private engine: Engine; + private readonly agents: Map; + + public constructor(options: OrchestratorOptions) { + const TaskSourceCtor = options.taskSource; + const EngineCtor = options.engine; + this.taskSource = new TaskSourceCtor(); + this.engine = new EngineCtor(); + this.agents = new Map(); + + console.log("[orchestrator] Configuration:"); + console.log(` TaskSource: ${TaskSourceCtor.name}`); + console.log(` Engine: ${EngineCtor.name}`); + } + + public registerAgent(agent: AgentDefinition): void { + this.agents.set(agent.name, agent); + console.log(`[orchestrator] Registered agent: ${agent.name}`); + } + + public async run(): Promise { + console.log( + `[orchestrator] Starting with ${this.agents.size} agents: ${[...this.agents.keys()].join(", ")}`, + ); + for await (const task of this.taskSource.watchTasks()) { + const agent = this.agents.get(task.agentId); + if (agent) { + try { + const result = await orchestrate({ + task, + agent, + taskSource: this.taskSource, + engine: this.engine, + projectDir: process.cwd(), + }); + + console.log(`Task ${task.id} ${result.outcome}`); + } catch (error) { + const message = error instanceof Error ? error.message : String(error); + await this.taskSource.failTask(task.id, message); + } + } else { + await this.taskSource.failTask(task.id, `Unknown agent: ${task.agentId}`); + } + } + } +} diff --git a/orchestrator/packages/orchestrator/tsconfig.json b/orchestrator/packages/orchestrator/tsconfig.json index 7c4b071..e2f5909 100644 --- a/orchestrator/packages/orchestrator/tsconfig.json +++ b/orchestrator/packages/orchestrator/tsconfig.json @@ -5,7 +5,8 @@ "rootDir": "./src" }, "references": [ - { "path": "../core" }, + { "path": "../task-source" }, + { "path": "../engine" }, { "path": "../task-source-bifrost" }, { "path": "../engine-claude-code" } ], diff --git a/orchestrator/packages/task-source-bifrost/package.json b/orchestrator/packages/task-source-bifrost/package.json index 202c2ad..1c3e703 100644 --- a/orchestrator/packages/task-source-bifrost/package.json +++ b/orchestrator/packages/task-source-bifrost/package.json @@ -1,8 +1,11 @@ { "name": "@bifrost-ai/task-source-bifrost", - "version": "1.0.0", + "version": "0.0.0", "description": "Bifrost task source plugin for Orchestrator Framework", "type": "module", + "files": [ + "dist" + ], "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { @@ -15,9 +18,7 @@ "build": "vite build" }, "dependencies": { - "yaml": "^2.8.4" - }, - "engines": { - "node": ">=24.0.0" + "@bifrost-ai/task-source": "^0.0.0", + "yaml": "^2.9.0" } } diff --git a/orchestrator/packages/task-source-bifrost/src/bifrost-task-source.ts b/orchestrator/packages/task-source-bifrost/src/bifrost-task-source.ts index 515332c..98e4bd9 100644 --- a/orchestrator/packages/task-source-bifrost/src/bifrost-task-source.ts +++ b/orchestrator/packages/task-source-bifrost/src/bifrost-task-source.ts @@ -37,6 +37,12 @@ export class BifrostTaskSource implements TaskSource { this.#client = new BifrostHttpClient(bifrostConfig.url, bifrostConfig.realm, token); this.#initialized = true; + + console.log("[bifrost-task-source] Configuration:"); + console.log(` URL: ${bifrostConfig.url.replace(/\/\/[^@]+@/, "//***@")}`); + console.log(` Realm: ${bifrostConfig.realm}`); + console.log(` Poll interval: ${this.#config.pollInterval}ms`); + console.log(` Max poll interval: ${this.#config.maxPollInterval}ms`); } async #getClient(): Promise { @@ -53,10 +59,24 @@ export class BifrostTaskSource implements TaskSource { const defaultPollInterval = this.#config.pollInterval ?? 1000; const maxPollInterval = this.#config.maxPollInterval ?? 30000; let pollInterval = defaultPollInterval; + let pollCount = 0; + const SAMPLE_RATE = 100; + + console.log("[bifrost-task-source] Starting poll loop"); while (true) { + pollCount += 1; + const shouldLog = pollCount % SAMPLE_RATE === 0; + if (shouldLog) { + console.log( + `[bifrost-task-source] Poll #${pollCount} (interval: ${Math.round(pollInterval)}ms)`, + ); + } try { const readyRunes = await client.getReadyRunes(); + if (shouldLog || readyRunes.length > 0) { + console.log(`[bifrost-task-source] Found ${readyRunes.length} ready runes`); + } for (const rune of readyRunes) { const agentId = BifrostTaskSource.extractAgentId(rune.tags); @@ -83,7 +103,8 @@ export class BifrostTaskSource implements TaskSource { pollInterval = Math.min(pollInterval * 2, maxPollInterval); const jitter = pollInterval * 0.2 * (Math.random() * 2 - 1); await BifrostTaskSource.sleep(pollInterval + jitter); - } catch { + } catch (error) { + console.error(error); await BifrostTaskSource.sleep(pollInterval); } } diff --git a/orchestrator/packages/task-source-memory/package.json b/orchestrator/packages/task-source-memory/package.json index c2ccd2b..528680e 100644 --- a/orchestrator/packages/task-source-memory/package.json +++ b/orchestrator/packages/task-source-memory/package.json @@ -1,10 +1,13 @@ { "name": "@bifrost-ai/task-source-memory", - "version": "1.0.0", + "version": "0.0.0", "description": "In-memory task source implementation for Orchestrator Framework", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", + "files": [ + "dist" + ], "exports": { ".": { "types": "./dist/index.d.ts", diff --git a/orchestrator/packages/task-source-memory/src/memory-task-source.ts b/orchestrator/packages/task-source-memory/src/memory-task-source.ts index 0ff2a4a..0473be0 100644 --- a/orchestrator/packages/task-source-memory/src/memory-task-source.ts +++ b/orchestrator/packages/task-source-memory/src/memory-task-source.ts @@ -46,8 +46,6 @@ export class MemoryTaskSource implements TaskSource { } } } - - // oxlint-disable-next-line no-await-in-loop await new Promise((resolve) => setTimeout(resolve, 50)); // oxlint-disable-next-line no-plusplus iterations++; diff --git a/orchestrator/packages/task-source/package.json b/orchestrator/packages/task-source/package.json index 7e82cec..b41fcea 100644 --- a/orchestrator/packages/task-source/package.json +++ b/orchestrator/packages/task-source/package.json @@ -1,8 +1,11 @@ { "name": "@bifrost-ai/task-source", - "version": "1.0.0", + "version": "0.0.0", "description": "Task Source interface and types for Orchestrator Framework", "type": "module", + "files": [ + "dist" + ], "main": "./dist/index.js", "types": "./dist/index.d.ts", "exports": { diff --git a/orchestrator/publish.js b/orchestrator/publish.js new file mode 100755 index 0000000..bbd8868 --- /dev/null +++ b/orchestrator/publish.js @@ -0,0 +1,101 @@ +#!/usr/bin/env node + +import { execFileSync } from "node:child_process"; +import { fileURLToPath } from "node:url"; +import { dirname, join } from "node:path"; +import { readFile, writeFile } from "node:fs/promises"; +const __dirname = dirname(fileURLToPath(import.meta.url)); + +const setPackageVersion = async (pkgDir, version, updateBifrostDeps = false) => { + const pkgPath = join(pkgDir, "package.json"); + const pkg = JSON.parse(await readFile(pkgPath, "utf-8")); + pkg.version = version; + + // Update sibling @bifrost-ai dependencies + for (const depType of ["dependencies", "devDependencies", "peerDependencies"]) { + if (pkg[depType]) { + for (const [name] of Object.entries(pkg[depType])) { + if (name.startsWith("@bifrost-ai/")) { + // publish: use exact version, restore: use ^0.0.0 + pkg[depType][name] = updateBifrostDeps ? version : "^0.0.0"; + } + } + } + } + + await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`); +}; + +// Package publish order (dependencies first) +const publishOrder = [ + "@bifrost-ai/task-source", + "@bifrost-ai/engine", + "@bifrost-ai/task-source-bifrost", + "@bifrost-ai/engine-claude-code", + "@bifrost-ai/orchestrator", // Main CLI entry point +]; + +let packageJson = await import("./package.json?cache=0", { with: { type: "json" } }).then( + (json) => json.default, +); +const currentVersion = packageJson.version; + +const timestamp = Date.now(); +const buildNumber = `build.${timestamp}`; + +execFileSync("npm", ["version", "patch", "--no-git-tag-version"], { + cwd: __dirname, + stdio: "inherit", +}); +packageJson = await import("./package.json?cache=1", { with: { type: "json" } }).then( + (json) => json.default, +); +const targetSemver = packageJson.version; + +const pkgDir = (pkgName) => join(__dirname, "packages", pkgName.replace(/.*?\//g, "")); + +try { + // Update versions, build and publish packages + for (const pkgName of publishOrder) { + try { + const currentPath = pkgDir(pkgName); + const opts = { + cwd: currentPath, + stdio: "inherit", + }; + + // Bump version with build suffix and update sibling deps + // oxlint-disable-next-line no-await-in-loop + await setPackageVersion(currentPath, `${targetSemver}-${buildNumber}`, true); + + // Build package + console.log(`Building ${pkgName}...`); + execFileSync("npm", ["run", "build"], opts); + + // Publish package + console.log(`Publishing ${pkgName}...`); + execFileSync("npm", ["publish", "--tag", "prerelease", "--access", "public"], opts); + } catch (error) { + console.error(error); + throw error; + } + } +} finally { + execFileSync("npm", ["version", currentVersion, "--no-git-tag-version"], { + cwd: __dirname, + stdio: "inherit", + }); + + // reset the versions locally + for (const pkgName of publishOrder) { + try { + const currentPath = pkgDir(pkgName); + // oxlint-disable-next-line no-await-in-loop + await setPackageVersion(currentPath, currentVersion, false); + } catch { + // do nothing + } + } +} + +console.log("✅ All packages published successfully"); diff --git a/orchestrator/tsconfig.json b/orchestrator/tsconfig.json index c9e2dad..d34a193 100644 --- a/orchestrator/tsconfig.json +++ b/orchestrator/tsconfig.json @@ -3,19 +3,23 @@ "compilerOptions": { "noEmit": true }, + "include": ["vitest.setup.ts"], "references": [ { - "path": "./packages/cli" + "path": "./packages/orchestrator" }, { - "path": "./packages/core" + "path": "./packages/engine" }, { - "path": "./packages/engine" + "path": "./packages/engine-claude-code" }, { "path": "./packages/task-source" }, + { + "path": "./packages/task-source-bifrost" + }, { "path": "./packages/task-source-memory" } diff --git a/oxlint.config.ts b/oxlint.config.ts index bb67ac1..0dec351 100644 --- a/oxlint.config.ts +++ b/oxlint.config.ts @@ -20,6 +20,7 @@ export default defineConfig({ "consistent-type-definitions": ["error", "type"], "no-undefined": "off", "no-ternary": "off", + "no-await-in-loop": "off", "no-void": "off", "typescript/explicit-function-return-type": "off", "typescript/explicit-module-boundary-types": "off",