diff --git a/.gitignore b/.gitignore index 43b4f418..cbe82fba 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,10 @@ web_modules/ *.d.ts *.d.cts *.d.mts +# Authored JavaScript, not compile output: workflow examples, project workflows, e2e fixtures. +!examples/workflows/*.js +!tests/e2e/fixtures/*.js +!.pi/workflows/*.js # Hand-written declarations for committed .mjs helpers !/pi-packages.d.mts !/scripts/*.d.mts @@ -151,13 +155,13 @@ vite.config.js.timestamp-* vite.config.ts.timestamp-* .vite/ -# package-lock.json committed for reproducible CI installs (excluded from publish) - # pi-schematic local config (credentials, API keys) .chunkhound.json .chunkhound/ .mcp.json -.pi/ +# Local pi state is ignored, except authored project workflows (see exception above). +.pi/* +!.pi/workflows/ # macOS .DS_Store diff --git a/package-lock.json b/package-lock.json index d85529ef..e57c41e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -88,17 +88,17 @@ } }, "node_modules/@aws-sdk/core": { - "version": "3.980.1", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.980.1.tgz", - "integrity": "sha512-W7jDWUPucezIUjFZpr8MudQQtz/m6yPMyAFrOyyQcHjuF4UrZdcCdP8eV1js06U9sH3dxp0AbhN+s9uHwQyXzQ==", + "version": "3.978.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.978.1.tgz", + "integrity": "sha512-LbY9aGsEiznDWmUc30Nwv3aIX/+dbwTx8KfS0yOC3NPYMO+O91e6jkT1azf34FwjOndq8/Q+RcVVZz5xnerwdg==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "^3.975.0", - "@aws-sdk/xml-builder": "^3.972.42", + "@aws-sdk/types": "^3.974.6", + "@aws-sdk/xml-builder": "^3.972.41", "@aws/lambda-invoke-store": "^0.3.0", - "@smithy/core": "^3.38.0", - "@smithy/signature-v4": "^5.7.5", + "@smithy/core": "^3.35.0", + "@smithy/signature-v4": "^5.7.3", "@smithy/types": "^4.19.0", "bowser": "^2.11.0", "tslib": "^2.6.2" @@ -108,15 +108,15 @@ } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.972.82", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.82.tgz", - "integrity": "sha512-sAfysgoFWKg/CJvufYM7lhvMUfJpTsuwjCLzp843Vtw8NlQh2PW9/+upUFrsoQK46pJcv3u1a+st7qJ4jfSODw==", + "version": "3.972.72", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.72.tgz", + "integrity": "sha512-xTKO/FWJPozTIXbozVnVGoNBhaGba8TBcx+KyUjRVeOlXE+dUc7GTR1cLvu0uTdIdmemzaFbqqCshXeZA1fZew==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -125,17 +125,17 @@ } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.972.84", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.84.tgz", - "integrity": "sha512-6xFe7tGPZedfak01TLUxuExU2Xhqw0VtoVvcS/+1OLjPB8If5vulTpCaR0TKTA/J6sAhTOjZHb6+4R1e1KRMKg==", + "version": "3.972.74", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.74.tgz", + "integrity": "sha512-u91E/hT8f4d1xy0Jl7VG4nVKJ3lxbrZkoBTeSVoJdWBiSEUMwMS/9+e0H/aJVQV//Lt5wuzP+E69v4aRSsNTmw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", - "@smithy/node-http-handler": "^4.14.0", + "@smithy/node-http-handler": "^4.12.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -143,38 +143,23 @@ "node": ">=20.0.0" } }, - "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.14.2.tgz", - "integrity": "sha512-i1uORV1v3qBqP43ayRKzIdm1q5x14tf8N4Dd06/QUX1Szm6VxHMrTsu20X5E63UFsaNZCRjI4SXG0jDmqYa+3w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.39.0", - "@smithy/types": "^4.20.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.973.27", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.973.27.tgz", - "integrity": "sha512-geyao3+s46HIo8C0vyLz7cQ1qaOM1H6wrP/nNWTr5SoR4r97qlWrubi+a7Sg128KmvRZIFbwXTvkbKawBeysqg==", + "version": "3.973.17", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.973.17.tgz", + "integrity": "sha512-ged4KXdBkvIC81bLvNHHuQKdKak/VXhQTR1NWYTTqW0474nlmsxy9O/vlgTIohDDWH3xpBdtVMZRyjb+DnocDA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/credential-provider-env": "^3.972.82", - "@aws-sdk/credential-provider-http": "^3.972.84", - "@aws-sdk/credential-provider-login": "^3.972.89", - "@aws-sdk/credential-provider-process": "^3.972.82", - "@aws-sdk/credential-provider-sso": "^3.973.26", - "@aws-sdk/credential-provider-web-identity": "^3.972.88", - "@aws-sdk/nested-clients": "^3.998.1", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/credential-provider-env": "^3.972.72", + "@aws-sdk/credential-provider-http": "^3.972.74", + "@aws-sdk/credential-provider-login": "^3.972.79", + "@aws-sdk/credential-provider-process": "^3.972.72", + "@aws-sdk/credential-provider-sso": "^3.973.16", + "@aws-sdk/credential-provider-web-identity": "^3.972.78", + "@aws-sdk/nested-clients": "^3.997.46", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/credential-provider-imds": "^4.5.2", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" @@ -184,16 +169,16 @@ } }, "node_modules/@aws-sdk/credential-provider-login": { - "version": "3.972.89", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.89.tgz", - "integrity": "sha512-5kcIZkMMs6eYvU6psqZkmeWsS3EGES53S6xUJFCC6eoJak3BQCCaF8yLU1bN6LTAOr2a9RWw+m1XBGen7Jcq+Q==", + "version": "3.972.79", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.79.tgz", + "integrity": "sha512-L+Z85anONJd8MaiuraO4wRxATCdEejBZ3K3eymzWI5JPXa9sOS9CkIm72PBKqXKX+Z9p9NGMX5AIMXm0LEflgw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/nested-clients": "^3.998.1", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/nested-clients": "^3.997.46", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -202,20 +187,20 @@ } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.972.94", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.94.tgz", - "integrity": "sha512-qZzjRq45j0S0rI4XjHKGL63gGSFGPDYRe18Crp7l4Zk3Yr6PG4PjIixZEtsGIliOjtZ/h+ATExgjE54JQJeZMQ==", + "version": "3.972.84", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.84.tgz", + "integrity": "sha512-oHt854odINVwzwsh+c5x69j0ajm4DbqqqVJ+O1ECsCIZeMDAbzFpXItaqP7UZstJj/ATdTk/KFSH0LaNAgV+kA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/credential-provider-env": "^3.972.82", - "@aws-sdk/credential-provider-http": "^3.972.84", - "@aws-sdk/credential-provider-ini": "^3.973.27", - "@aws-sdk/credential-provider-process": "^3.972.82", - "@aws-sdk/credential-provider-sso": "^3.973.26", - "@aws-sdk/credential-provider-web-identity": "^3.972.88", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/credential-provider-env": "^3.972.72", + "@aws-sdk/credential-provider-http": "^3.972.74", + "@aws-sdk/credential-provider-ini": "^3.973.17", + "@aws-sdk/credential-provider-process": "^3.972.72", + "@aws-sdk/credential-provider-sso": "^3.973.16", + "@aws-sdk/credential-provider-web-identity": "^3.972.78", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/credential-provider-imds": "^4.5.2", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" @@ -225,15 +210,15 @@ } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.972.82", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.82.tgz", - "integrity": "sha512-VsFOXU7gYDWqYwRis7Rif3CrE+c7xMNxp0L3XqGPuvF6JO2K93FYjhLlEphW5uEMpHEXkOOutZ5USGErgfKaog==", + "version": "3.972.72", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.72.tgz", + "integrity": "sha512-rLIp2xbMjX/k9/od7APpqq1ZgXXnV0pOL1Th3ZsL8Wu0TRtBsDTVS8iPqcfRFcHakFxPvR04OSTv2ka2qOb/2A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -242,17 +227,17 @@ } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.973.26", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.973.26.tgz", - "integrity": "sha512-IIrqv0iFNwO8Cd5EigbwILsnsvmprCAw5/BPfRvP/EiLQtBfv3PI9KpyUj2+qsJhYcpmKad+ugaS0+izle8OqQ==", + "version": "3.973.16", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.973.16.tgz", + "integrity": "sha512-IGihaJfFZYacJJr/odqILCoK7W/mvrZ7cuK7ECn3sAu4vLC6u0V8bS7mCGbdugJ8Aum2tnvqmx0F2MRFp2rn9g==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/nested-clients": "^3.998.1", - "@aws-sdk/token-providers": "3.1164.0", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/nested-clients": "^3.997.46", + "@aws-sdk/token-providers": "3.1138.0", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -261,16 +246,16 @@ } }, "node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers": { - "version": "3.1164.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1164.0.tgz", - "integrity": "sha512-9LPRWfev5QZH1EnNn9O/Y++iCRpfxrJs4EIsJuOAKYZ0DY/kZ3aOx0qWzmN1OUOd8JlUk6Mjy1tJ8b7ul5tuVw==", + "version": "3.1138.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.1138.0.tgz", + "integrity": "sha512-GpyAr0DD63YOEmYFM6Df+gJuIgC92MMTiBK4FTKfxii5MJ9ge20epR7LyroulscYlG89J+ZB2ivFDPjvfQhzdw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/nested-clients": "^3.998.1", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/nested-clients": "^3.997.46", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -279,16 +264,16 @@ } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.972.88", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.88.tgz", - "integrity": "sha512-RmeE04naP7gWzux9l1vqNQPzuo2OkH0Ca9WDtX5Zf4NERoBLeWZNU2g1ka7aJ4Fc9fqBxBLtGL89vYEfFP1LHw==", + "version": "3.972.78", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.78.tgz", + "integrity": "sha512-/y9WvNtlcPBGLR0qc1a+9J/xtYZfVczvLUOuXaVWylzttH7ewsxwHtjmiJSolNrVSDorIxHGHMU61CbonRkmwA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/nested-clients": "^3.998.1", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/nested-clients": "^3.997.46", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -297,14 +282,14 @@ } }, "node_modules/@aws-sdk/eventstream-handler-node": { - "version": "3.972.40", - "resolved": "https://registry.npmjs.org/@aws-sdk/eventstream-handler-node/-/eventstream-handler-node-3.972.40.tgz", - "integrity": "sha512-LR2mRKFb9EMlGHmJNXMtuMPvVQqN1b9/v68A1UQaE72pb8pHqiHxTtS++vaab8844YesGVzBVrloAis7+EXq/w==", + "version": "3.972.35", + "resolved": "https://registry.npmjs.org/@aws-sdk/eventstream-handler-node/-/eventstream-handler-node-3.972.35.tgz", + "integrity": "sha512-a8xilRoRaalvSPZdfrs0VY3/BPc0uYhXW56Z/k6nmZ5Vk430LHeowf9APIPq8utM3tMJSNGSSuJMlB9YrPsN+A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -313,14 +298,14 @@ } }, "node_modules/@aws-sdk/middleware-eventstream": { - "version": "3.972.36", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-eventstream/-/middleware-eventstream-3.972.36.tgz", - "integrity": "sha512-OkV+alDzmJ3DOs2mRPLSM9FUVSul7G1wkpKrbO+tyxxGOT7qLMPZHOlj4Ipjw9OayRmU7nMVPSFo7hvUqOSeJg==", + "version": "3.972.30", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-eventstream/-/middleware-eventstream-3.972.30.tgz", + "integrity": "sha512-B6gvZlcnRBNWraKgyEjKsbhv+VjtbyHmpU7hmtTHzXpDSxHPpCJnYLpglEOOsF+SFne20DbZC5IVC1aNr2Pb4A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -329,17 +314,17 @@ } }, "node_modules/@aws-sdk/middleware-websocket": { - "version": "3.972.64", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-websocket/-/middleware-websocket-3.972.64.tgz", - "integrity": "sha512-qhsyjMHfYZ+G7ejfs/Sq5P/ZUCi9SPVN/UpgeYxWvVa3WVjuFXPHTSKSxgXhLuRAUUcamFYEVUM7iQ4EPqtyig==", + "version": "3.972.54", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-websocket/-/middleware-websocket-3.972.54.tgz", + "integrity": "sha512-bhESdru8u8KosziH8jcVta/NM/dNreeRz2+2aU86si5bfBYOiJ6IiqD+9U4URUcU5WJO3Yw+jO3GLDIHlscXMQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", - "@smithy/signature-v4": "^5.7.5", + "@smithy/signature-v4": "^5.7.3", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -348,18 +333,18 @@ } }, "node_modules/@aws-sdk/nested-clients": { - "version": "3.998.1", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.998.1.tgz", - "integrity": "sha512-KPw5W6LN3waUskfDCRXRcyBEHAev5PVlMOjMq74OIivFYbgPvq39QeFege7IOFPncO425/AQK0qxdfaoeGejYQ==", + "version": "3.997.46", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.997.46.tgz", + "integrity": "sha512-oRxtBcka/JGHGs9l9p9IVajGoTP8vTPmoAzdHGy4Qcy9P5vPnDf6nhIeM/COQNY9k/OahImTRaLkHftoXvfcmQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "^3.980.1", - "@aws-sdk/signature-v4-multi-region": "^3.996.51", - "@aws-sdk/types": "^3.975.0", - "@smithy/core": "^3.38.0", + "@aws-sdk/core": "^3.978.1", + "@aws-sdk/signature-v4-multi-region": "^3.996.47", + "@aws-sdk/types": "^3.974.6", + "@smithy/core": "^3.35.0", "@smithy/fetch-http-handler": "^5.8.0", - "@smithy/node-http-handler": "^4.14.0", + "@smithy/node-http-handler": "^4.12.1", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -367,30 +352,15 @@ "node": ">=20.0.0" } }, - "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler": { - "version": "4.14.2", - "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.14.2.tgz", - "integrity": "sha512-i1uORV1v3qBqP43ayRKzIdm1q5x14tf8N4Dd06/QUX1Szm6VxHMrTsu20X5E63UFsaNZCRjI4SXG0jDmqYa+3w==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@smithy/core": "^3.39.0", - "@smithy/types": "^4.20.0", - "tslib": "^2.6.2" - }, - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/@aws-sdk/signature-v4-multi-region": { - "version": "3.996.51", - "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.51.tgz", - "integrity": "sha512-+aHvUugVBuMPXxgkPfWnTMyGdE/yWS8GHi5+qQ37HowS0YqzrbuaDLznj+Dtmtu5jgCdqz36gXmujOToUhNNWw==", + "version": "3.996.47", + "resolved": "https://registry.npmjs.org/@aws-sdk/signature-v4-multi-region/-/signature-v4-multi-region-3.996.47.tgz", + "integrity": "sha512-Zk08macMvQTHzQJCLJVkOlviVoqwYMrpXv4lmLN7b7sAbiMoOK7Go0NYdR5UeF+MW8LIbRmwrNy9u/5VvX1U5g==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "^3.975.0", - "@smithy/signature-v4": "^5.7.5", + "@aws-sdk/types": "^3.974.6", + "@smithy/signature-v4": "^5.7.3", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -417,9 +387,9 @@ } }, "node_modules/@aws-sdk/types": { - "version": "3.975.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.975.0.tgz", - "integrity": "sha512-WQlhs6juByzWOzj5fwxOx0mPJaEqMcG/sDpl3Id61B3XhKE63xY+0QWcnG+sWR/sCfprmreyUo1lM7IKZmHMzw==", + "version": "3.974.6", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.974.6.tgz", + "integrity": "sha512-v/clNZzZnDxGyvpHMOGpJKVXFAExJzUNAAjaWGdcx8QAcXLGwTaOkw33p5SHAi0YAioK32xB3hWwOekRVfmfKg==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -431,9 +401,9 @@ } }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.972.42", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.42.tgz", - "integrity": "sha512-smX8/gNP8Kjq+CWTBMZQLQ912vOQjiWExzwzvMO+eujPB5RY8IbtF0AGdUUXHKN7KoDWK9dIcuW0WG269kiP6w==", + "version": "3.972.41", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.41.tgz", + "integrity": "sha512-ctjVSyCMegrWfXlx6VqzSBFI6UqmQ5ZlnfMhdLIiWmhoH8UAQxSCP5N3OpG7X3k4LnS7ou74C4mt20+bfTW2aQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -491,9 +461,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.29.13", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.13.tgz", - "integrity": "sha512-v+oN26xP4YIlQsbQ/CbTH1WG5m/l/DjKKZNy/Kp3f/AFvbgt7Em/D0FeMM3O2hX0YzeN2M16W8lOpyhIkfCBcQ==", + "version": "7.29.10", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.10.tgz", + "integrity": "sha512-NpugTzbKgGrNe45Ui32cN8vCFFMxVtP/9rtfwv0nP5FRDAjvYBxJcLVpYA9mr1jxP6cnIT7x9LUzuDTbWYYNRA==", "dev": true, "license": "MIT", "engines": { @@ -588,9 +558,9 @@ } }, "node_modules/@earendil-works/pi-codemode": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-codemode/-/pi-codemode-1.5.2.tgz", - "integrity": "sha512-HoZQ40a9RgdZ1VgmrX6x8887cNXedaRJT1l+Ie5YRIMK4gY7v0EpsiNqf6dmixrKylZlTgUSyR+vE8xhjfkr+w==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@earendil-works/pi-codemode/-/pi-codemode-1.6.0.tgz", + "integrity": "sha512-GAgAy7iJCVbeiuqq2dTIuNj3aXTMUeTF8Nu8LZs72e8ueGGDU5L3/D8VxzTHALIpQ1/q8u1tfmB3iYS2Nopchw==", "dev": true, "license": "MIT", "dependencies": { @@ -637,10 +607,111 @@ "node": ">=22.19.0" } }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/@silvia-odwyer/photon-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@silvia-odwyer/photon-node/-/photon-node-0.3.4.tgz", + "integrity": "sha512-bnly4BKB3KDTFxrUIcgCLbaeVVS8lrAkri1pEzskpmxu9MdfGQTy8b8EgcD83ywD3RPMsIulY8xJH5Awa+t9fA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/chalk": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-6.0.0.tgz", + "integrity": "sha512-2uNTXIuTTxk7ciZgAU1BQcgnchcG0xXnrs6jzkQfj9SsRa9M2s5zE8WT96hS6KmG4MzWHSrvH43DF1m4XRkrFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/grok-mermaid": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/grok-mermaid/-/grok-mermaid-0.2.3.tgz", + "integrity": "sha512-/4KopAbsjvuRP9MdPtlDjOHUmUVEohOX73JNcsWpzAtFxh+bq5+Dhb6gzvRieLDwIPQIR3/vy8V1NNTuz4Zsmg==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=18" + } + }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/highlight.js": { + "version": "10.7.3", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", + "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": "*" + } + }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/hosted-git-info": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.3.tgz", + "integrity": "sha512-Hc+ghLoSt6QaYZUv0WBiIvmMDZuZZ7oaDvdH8MbfOO4lOsxdXLEvuC6ePoGs9H1X9oCLyq6+NVN0MKqD+ydxyg==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^11.1.0" + }, + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/lru-cache": { + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.4.0.tgz", + "integrity": "sha512-W+R+kFL4HgVxONq2bhXPi3bGpzGe/yEhVOp233qw9wCRtgncJ15P3bC+e4zZMu4Cq7d+WAJjXGW0uUkifhcatA==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/minimatch": { + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "brace-expansion": "^5.0.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/proper-lockfile": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", + "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "retry": "^0.12.0", + "signal-exit": "^3.0.2" + } + }, + "node_modules/@earendil-works/pi-coding-agent/node_modules/proper-lockfile/node_modules/retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@earendil-works/pi-mcp": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-mcp/-/pi-mcp-1.5.2.tgz", - "integrity": "sha512-zU1UgeXDlbixPqGEWD7Ql0brEMIpYr7aEWjoEE5h5enJbM/kQ2jIr7lN8JoR80oUnq1fJSU7SC8kLx2Fx/IZYg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@earendil-works/pi-mcp/-/pi-mcp-1.6.0.tgz", + "integrity": "sha512-dhqAR6MP8Fp3b8LEcBFOyxMZpGSozUAdzF0Dbl7OvojsjZrQsDV3ZKn85WRbwjHb4WjQUCVBsIZXwoyQxXeunw==", "dev": true, "license": "MIT", "dependencies": { @@ -651,9 +722,9 @@ } }, "node_modules/@earendil-works/pi-telemetry": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-1.5.2.tgz", - "integrity": "sha512-m+cumjIqNh1aMISi/9ttcG3ZOwIdriPbz/eMyWmRMJCGa/WcgY1RX4lrb7HvsHhSfI/JUeBESA4nOCr8C3y5ow==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@earendil-works/pi-telemetry/-/pi-telemetry-1.6.0.tgz", + "integrity": "sha512-MNL0TvtpgoSfX7mBLSVgzxTW6yvT8VLEpHvbWnZsIp92FtqVvx+4q9DxWZdX8KvcQqBs0GseAgVnLdVFinjN9Q==", "dev": true, "license": "MIT", "engines": { @@ -747,19 +818,6 @@ "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.3", "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.3.tgz", @@ -771,15 +829,15 @@ } }, "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==", + "version": "0.23.6", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.6.tgz", + "integrity": "sha512-WrTH7nioI9QPY4NZGnsywmecswJdgeq4BCM76qok9VgjTO29ZgUzUvcuJLVPYVQM4uDbaPBU0M33R9DIxI8X3w==", "dev": true, "license": "Apache-2.0", "dependencies": { "@eslint/object-schema": "^3.0.5", "debug": "^4.3.1", - "minimatch": "^10.2.4" + "minimatch": "^11.0.5" }, "engines": { "node": "^20.19.0 || ^22.13.0 || >=24" @@ -926,10 +984,17 @@ "url": "https://github.com/sponsors/nzakas" } }, + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "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==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", "dev": true, "license": "MIT", "engines": { @@ -1719,9 +1784,9 @@ "license": "BSD-3-Clause" }, "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.18.tgz", - "integrity": "sha512-ubTG+4KlidvioxjOFdsdEa2F6JVGZb8m2ByJUqQ7fYzUeT1cEn194POcsQ10PKH4p//q0YQn4SB3YpSuzcA1Yg==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.19.tgz", + "integrity": "sha512-e+Ebe0WT+9tbXmNKPIiC8YrWAHYwug3m6i4p3rZGGulfZri1jtI4HslT+OZnFf/OIHowWF71DTlHwXBP2SiA7A==", "cpu": [ "arm" ], @@ -1736,9 +1801,9 @@ } }, "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.18.tgz", - "integrity": "sha512-2Xa1t/JeFGTZn5TbzgPppcCftF8sCVnTNvrIvoSdcZhoFzAuVy1L3xxQUQ4sfWDtwVzg1u6Yi1R3SlJugRNV2Q==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.19.tgz", + "integrity": "sha512-hOombrTJ+szt2ciEzS7oCA78lMPBgF5UMQWCJIyNfnrI7GLl8HYoFqCnpL2gcPOaXMqryGCU5ExdQKyDDcC+yA==", "cpu": [ "arm64" ], @@ -1753,9 +1818,9 @@ } }, "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.18.tgz", - "integrity": "sha512-iUzw9HshVvrWci9gVXjxWS7/M/IcLvNo67vu2c/w9zKBz4hIvPRixdUpIW/iCfhldLaq9ER2hecsI9UY5z0/yA==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.19.tgz", + "integrity": "sha512-XoMA2pwCKGTQzUjPgtRwkedH4WmXhdIPKT6l6oOxd1PUbNodGI6DcBekgN7EC//+x3pfBYX/qL1gNmZAqivw5g==", "cpu": [ "arm64" ], @@ -1770,9 +1835,9 @@ } }, "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.18.tgz", - "integrity": "sha512-XuDHFzbFEtZl0QGJi92+fmG67tfnp1iZ9VOeDkwasGyTq2VG3/5PnJnvAr+MTzFh/rNScJ3VhN+XpZyyGsN7Jw==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.19.tgz", + "integrity": "sha512-zo8EsSSwMZCY/e+fRnGaX02YGgvJD0yvhNi/9hpGPA2MJ9ZF8dPCw75UGfpI6OpQ/myR/dIYmogRvqiZD0TrXg==", "cpu": [ "x64" ], @@ -1787,9 +1852,9 @@ } }, "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.18.tgz", - "integrity": "sha512-MM8opLfsLK15oEXDz6iBc0t3ahu+ew9jsAmha+ovZ33hSwYgqo7YmpRITqFTfW7xA71BLEQ3jJdTsaCmhB1c9w==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.19.tgz", + "integrity": "sha512-O8ISAOfI1nj7AuBPd30FSF47z7f7lzlk5poQVGgiikvQuGEBFYvW8ki+UEnT+YJPnNGjQzn304klt4O9FUE7mA==", "cpu": [ "x64" ], @@ -1804,9 +1869,9 @@ } }, "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.18.tgz", - "integrity": "sha512-J6EoCWiy5RnFQzHrKyHXXevZ9lukQfGpnchX/zG/k/WC2nc9O9XyS1JgA8kI9VxMFggMbCPjpv7LcikriXfehw==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.19.tgz", + "integrity": "sha512-/lYCba5NO0yq4S0jGMH8QTBtkvQxoXjoQWzF5BcWp9MjB9jxVRD1GQDNofkVjcOj30DWyhLIN/4Oe60JKzaONw==", "cpu": [ "arm" ], @@ -1821,9 +1886,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.18.tgz", - "integrity": "sha512-HIkFuLF7CdDeki+1aCZLLbLq0hk/PHntb+z4/YCTo47JbksTD6jJEELIz92tYROmDmvMrNqUMqBi71BkJLDR+A==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.19.tgz", + "integrity": "sha512-pm/apFMBnSbFb3O6nG5pHO1iqHhZrjGDFEjSm+ot9J17XXPvH9L90y5h+jgfHCE+Qdlsvy8qKEcU4VKxgjD+vA==", "cpu": [ "arm64" ], @@ -1841,9 +1906,9 @@ } }, "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.18.tgz", - "integrity": "sha512-4oqWItLLYt7IceOnElCct8T2ek5p7PmD7LN04TRJRXGo5f3HtKTgGH6PhYRFK4C2ICkq/LMUU0BVPvvlAKhm8g==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.19.tgz", + "integrity": "sha512-K1SmQp3FFichn8oqrNIwvFoZ5wcvjC7goBzpaMNvLf9FZc+QB/QvLmnpJZgAAGHiD980tP8FZZnXk2K94rvlxg==", "cpu": [ "arm64" ], @@ -1861,9 +1926,9 @@ } }, "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.18.tgz", - "integrity": "sha512-+AkRly5SrCEgnPhGRfub7pucASYEC2fTsxZg7VCcnozpA2+Wn/gCYy1t7LuJS67/xyJu/7noYBJncDUkbwgw2A==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.19.tgz", + "integrity": "sha512-I0xwD57jP/3A7+5UPZin2w8Y7XHEmEM5zqpYZOcQ45MlNW6tUJUziymV3yRr7rL4vwyfEcRsRksC4a7Kc08p5Q==", "cpu": [ "ppc64" ], @@ -1881,9 +1946,9 @@ } }, "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.18.tgz", - "integrity": "sha512-Ttg1r9vVykMnQrE/GwYO9icKtXiuiMfRe/w74xJkeoVuvhRG+WtT6LEMOf58Yl63yd77lhHzO8Y55R8CC3XALA==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.19.tgz", + "integrity": "sha512-BrtEHT24SNXj9HiXqy+s/kXiSiQGt6EKCPUlRirAoIioVxKGnbXBUEkbZASAei7iZJB0/Ynm+0JP00Ipx7AnSw==", "cpu": [ "s390x" ], @@ -1901,9 +1966,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.18.tgz", - "integrity": "sha512-xX1Tt4o5jUMma0vJsXp5eRZA9nOuyigb2dKJMMzZRmzMxLYGE9PaKKSqHPzPvSQgM8ZOEacSTQwDQcwWfh0xmQ==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.19.tgz", + "integrity": "sha512-rm75/9DkHKeU2WnA8w4X94WGYgLlDCFCfkQC+4bguVJmC/jvDRv2B+2wLOYhyE0fVuv7//Ckk39OoOufyCu76Q==", "cpu": [ "x64" ], @@ -1921,9 +1986,9 @@ } }, "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.18.tgz", - "integrity": "sha512-4VVlGI5K2kociZlW3lSN8VjG3TW5yQIlAcfCdBXMgGjJxZll15Fa4ocRHXHvIVVnwlibCw/NQajJrNDiqqpiiw==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.19.tgz", + "integrity": "sha512-irh/4+iYFM4GAzpluDErgjz89bj6NDtqqMAG/6O1LG38Ed3NpyebzCpcVNkFW8uhy+/3/BocUvnXDR33CXWe9A==", "cpu": [ "x64" ], @@ -1941,9 +2006,9 @@ } }, "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.18.tgz", - "integrity": "sha512-PApTsgH1jLYuyy3tSCz9De82Gq5qXwi7vImVZhEzTgX1C4150Cp5M2ZfL3pLvbCvbEHL0oJeC6pd6podtv8Y5w==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.19.tgz", + "integrity": "sha512-+KWTWNoPt+CfSq94CiceWu3yPE+QzkaG+phPyz9G60tmZLwfQkcA4AeksafzvJAw4pvg1mcd5a1TkUqVv0s4JA==", "cpu": [ "arm64" ], @@ -1957,10 +2022,85 @@ "node": "^20.19.0 || >=22.12.0" } }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.2.19.tgz", + "integrity": "sha512-7EH+skOsl5qpWnK0vzamgJFhOv1cwxQpsxm8tI883K9fur5c27p8q87fzEO6BbBPabA2/+s/zR63/pLc137iOg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "2.0.0-beta.2", + "@emnapi/runtime": "2.0.0-beta.2", + "@napi-rs/wasm-runtime": "1.2.6" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/core": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.2.tgz", + "integrity": "sha512-MzCVoWtcg4Pm2B3je5mMvYMvj3MmBKw+fU7vbsJc9/iT8ip6/eYIHo/Dsm/mr+wsHB6SEyJDuxB09Yy6r/8+4A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "2.2.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/runtime": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.2.tgz", + "integrity": "sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@emnapi/wasi-threads": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz", + "integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi/node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.6.tgz", + "integrity": "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", + "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" + } + }, "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.18.tgz", - "integrity": "sha512-J2XjWjx/SP+4x0H4r6dz3Vzb5WVkg7re40Do9K7HJ3sK2/xcmZrWwakXlSwaMvOkvruLJCD4CL/3wqsIR/thgg==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.19.tgz", + "integrity": "sha512-3Q1Yg1Q7tEvBWoZf5rFvG/GKZQPgwfru+p4wBajDfJFBs0SHCpL++dfTjW9gyAKd1T7ZpIYvdaUax7Pa/IhFVQ==", "cpu": [ "arm64" ], @@ -1975,9 +2115,9 @@ } }, "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.18.tgz", - "integrity": "sha512-XwRJxRQvkuEtS0hIIt29QrqPJ+JzMJSNYHJw4ae/mc6uEarfRG1ceyg4HmmWiBdL/YCb6g7N5BLbSvmRJRYZHw==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.19.tgz", + "integrity": "sha512-y/sqRRc6d7hECzOFc5n3LSeqctmIp9mMjY1Kq4s14uLPd/LZ4z7i1zrW6fMtp2mPeuQIC4e6ULMcwQzMomqQag==", "cpu": [ "x64" ], @@ -1992,27 +2132,20 @@ } }, "node_modules/@rolldown/pluginutils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", - "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", + "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", "dev": true, "license": "MIT" }, - "node_modules/@silvia-odwyer/photon-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@silvia-odwyer/photon-node/-/photon-node-0.3.4.tgz", - "integrity": "sha512-bnly4BKB3KDTFxrUIcgCLbaeVVS8lrAkri1pEzskpmxu9MdfGQTy8b8EgcD83ywD3RPMsIulY8xJH5Awa+t9fA==", - "dev": true, - "license": "Apache-2.0" - }, "node_modules/@smithy/core": { - "version": "3.39.0", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.39.0.tgz", - "integrity": "sha512-JJ/46AWQ4ipS1N2eZmUj7yzIhH8NhQIfAE+dce7NSB6dmFh+7hvD4pbofcoT4I0Xzfy/LNhZx3V2QhwYyAiqdg==", + "version": "3.35.1", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.35.1.tgz", + "integrity": "sha512-i4YPS4B6ts7bjn7UwLnGjiZdprOvHvgGobFZsYK3GIY3E5hIqtj0rReU69BcTpGp+fvtraSNXeG1l+jtJvF55w==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.20.0", + "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, "engines": { @@ -2035,14 +2168,14 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.8.1.tgz", - "integrity": "sha512-h8BdMUrUBhMhMaeK7QqAdINRZezCGuYOCpcOZZ1ewxbHST9rdTd09xwNpvLTYfzDRehxQiReK4SKbdYZxBA+ew==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.8.0.tgz", + "integrity": "sha512-ycSJu3tFAQ4v04CBB0agqFMVsSQ1iG3yw+SpgxRqKfaURpQD4CZ8Wn0zPMmSnOuTpTh65Vz+EA0rMrw089wvkA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.39.0", - "@smithy/types": "^4.20.0", + "@smithy/core": "^3.33.3", + "@smithy/types": "^4.18.0", "tslib": "^2.6.2" }, "engines": { @@ -2065,13 +2198,13 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "5.7.5", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.7.5.tgz", - "integrity": "sha512-WPjdr5oWOk1LArpI4pavu+fSo+/evi0Re1olxGvqwuZopd4gYR1UGCi+Soyn/IjmafqbWs+ZC+3AKxJS3ZpwUg==", + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.7.4.tgz", + "integrity": "sha512-tHy0K0VtqNd5Y7Y41h0a0Lhh0L1GzC08dTWg0F7vRJWFtTENg7IZikf3wQkanYIRdb7ngoIPMTmqgUi401fEeQ==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.38.0", + "@smithy/core": "^3.35.0", "@smithy/types": "^4.19.0", "tslib": "^2.6.2" }, @@ -2080,9 +2213,9 @@ } }, "node_modules/@smithy/types": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.20.0.tgz", - "integrity": "sha512-lCA6QG22dPk9ecHbv91jDQZsmtPUjdS1aE2Il6NNPqe7DrYc0dZQi6DhcESk2KYXH2sp5xbAcGdYMZDFnuzA2A==", + "version": "4.19.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.19.0.tgz", + "integrity": "sha512-r7jh49VJxGerfAcTQA6gXcKc+98zOp/tqRwzYjgOE+iSQsP6cEU1hq2QzbuipmP68QtYdY9wKEhiCQZIzHgZ4Q==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2100,9 +2233,9 @@ "license": "MIT" }, "node_modules/@tybys/wasm-util": { - "version": "0.10.4", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.4.tgz", - "integrity": "sha512-W3c4gRigFS0T/Ma4qIYF3GDAc5AQdHb1yL5znJT1Zv1YaD9Kitx656wBjvr19qbiosmZT8lWDM5BEMynUqX65A==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.5.tgz", + "integrity": "sha512-dOGOPxlaNV+G046mZzN+9C0dAcQZeSKcXiVaM0TYy/LM4ttTmgSBDxYfovcYI8Em3+eAbiAYpvWLOv8+ZVRJKA==", "dev": true, "license": "MIT", "optional": true, @@ -2167,17 +2300,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.72.2.tgz", - "integrity": "sha512-222PKFXKihmFpi/pS5njoBgdAqsPhj2/GBmFbrNw8Tq8gEG9Sv+kSlKFy4u2q+mJv9ZzJgM2Gkv/bUzRZwZw5g==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.73.0.tgz", + "integrity": "sha512-UkygMFer53Yzn29MCYFTHf34hGXf5KJhiDWfIm1tXtXRrym1CS6l5H9Y3yCtPWChpC0/f93H88gdj8tN0dd4kw==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.72.2", - "@typescript-eslint/type-utils": "8.72.2", - "@typescript-eslint/utils": "8.72.2", - "@typescript-eslint/visitor-keys": "8.72.2", + "@typescript-eslint/scope-manager": "8.73.0", + "@typescript-eslint/type-utils": "8.73.0", + "@typescript-eslint/utils": "8.73.0", + "@typescript-eslint/visitor-keys": "8.73.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -2190,22 +2323,22 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.72.2", + "@typescript-eslint/parser": "^8.73.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/parser": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.72.2.tgz", - "integrity": "sha512-llP+T1YuJOLlxEciP6OyQGtz5SMxyn+9LA2BvZw5RmToGVa1y4beEDVQL6Gje7T5WFYh19WREjDCN9Ev4gm5AA==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.73.0.tgz", + "integrity": "sha512-AuL45bVcmssHfZ3Di3cs9Q0l4gBm4ZFVrJOQEE7VpqW+PVgQaEwSwazz4TVIiFabXkk6U51EprYDwqw+HR8ePw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.72.2", - "@typescript-eslint/types": "8.72.2", - "@typescript-eslint/typescript-estree": "8.72.2", - "@typescript-eslint/visitor-keys": "8.72.2", + "@typescript-eslint/scope-manager": "8.73.0", + "@typescript-eslint/types": "8.73.0", + "@typescript-eslint/typescript-estree": "8.73.0", + "@typescript-eslint/visitor-keys": "8.73.0", "debug": "^4.4.3" }, "engines": { @@ -2220,15 +2353,49 @@ "typescript": ">=4.8.4 <6.1.0" } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.73.0.tgz", + "integrity": "sha512-InjlBkSdWceIwIBWSwS3ENUp+i0O02PGX3Zv2wnihWJC1WDVGvG7mTHuf8b57uAaITj94d6tRPDH+sUEtXdRQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.73.0", + "@typescript-eslint/tsconfig-utils": "8.73.0", + "@typescript-eslint/types": "8.73.0", + "@typescript-eslint/visitor-keys": "8.73.0", + "debug": "^4.4.3", + "minimatch": "^11.0.1", + "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/native": "npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev", + "typescript": ">=4.8.4 <6.1.0" + }, + "peerDependenciesMeta": { + "@typescript/native": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/project-service": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.72.2.tgz", - "integrity": "sha512-6y5dLTZdHhI8Eh3yIQ/bfQhRKwn5e+TpJj64o18Cngc0iW/BCrVvrr6zGYqXPnYH31u6YXAYiFh0+qxX5mybJw==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.73.0.tgz", + "integrity": "sha512-/pEf8Rc4Mjk+qJnY0uO1+Gadeal8uv50xpuic+srG2vIVatA0XxvWMUeMtFvs6OCHqftiQ7/+qH4aehG5stzIA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.72.2", - "@typescript-eslint/types": "^8.72.2", + "@typescript-eslint/tsconfig-utils": "^8.73.0", + "@typescript-eslint/types": "^8.73.0", "debug": "^4.4.3" }, "engines": { @@ -2243,14 +2410,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.72.2.tgz", - "integrity": "sha512-iIoMJ6/8c1/QpFNyFjU0d1YzPco4MsZjQw0k3V+vfzNWAFmUmvhlyMoYEoYYDQZXc+J6Gi1X5XcxlzW2taIIGQ==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.73.0.tgz", + "integrity": "sha512-/TjD738Iq2rzj5z0ixVOi+TsvgjAzZPLPaH1yWdDBytR/HTR5gMpyYWZeCe5WTQZLwk3ho8AV7U3muoQCRtXBQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.72.2", - "@typescript-eslint/visitor-keys": "8.72.2" + "@typescript-eslint/types": "8.73.0", + "@typescript-eslint/visitor-keys": "8.73.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2261,9 +2428,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.72.2.tgz", - "integrity": "sha512-+h3iCgZXuTNtoLXcnnjP12ZUHLMqoUcIHPfQrFEXTUqvb9dF8QK9b5nv5VtSo5fLkdHuks8ehbTzZj3rImAm9w==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.73.0.tgz", + "integrity": "sha512-lmtCFOfYaJfpqZywGuXi4FpNtE+NQ+YLe3T0K9rtEDcW8ZuGWvfI++pj8r05sYMI8vWT2CYK4rWyedmD6Rp4og==", "dev": true, "license": "MIT", "engines": { @@ -2278,15 +2445,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.72.2.tgz", - "integrity": "sha512-STfkR38qIdhfkLpgtXnUjAzsNy4xouqiBO0lrVc/Wpk9Kem5/aHXUx1J8dGC16zpdYN1+yc2ILQ28er1kXX7ag==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.73.0.tgz", + "integrity": "sha512-MOC9i4xy1F7KcDde7Ip8jf1SrRiALb2Km4UWxGNjUE2YlhjIEo1ayE27GHIwIQyfWuHTmEonQT14uyurlyC6aA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.72.2", - "@typescript-eslint/typescript-estree": "8.72.2", - "@typescript-eslint/utils": "8.72.2", + "@typescript-eslint/types": "8.73.0", + "@typescript-eslint/typescript-estree": "8.73.0", + "@typescript-eslint/utils": "8.73.0", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -2302,10 +2469,44 @@ "typescript": ">=4.8.4 <6.1.0" } }, + "node_modules/@typescript-eslint/type-utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.73.0.tgz", + "integrity": "sha512-InjlBkSdWceIwIBWSwS3ENUp+i0O02PGX3Zv2wnihWJC1WDVGvG7mTHuf8b57uAaITj94d6tRPDH+sUEtXdRQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.73.0", + "@typescript-eslint/tsconfig-utils": "8.73.0", + "@typescript-eslint/types": "8.73.0", + "@typescript-eslint/visitor-keys": "8.73.0", + "debug": "^4.4.3", + "minimatch": "^11.0.1", + "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/native": "npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev", + "typescript": ">=4.8.4 <6.1.0" + }, + "peerDependenciesMeta": { + "@typescript/native": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/types": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.72.2.tgz", - "integrity": "sha512-Xfn37OLZx03+PCU7qWx9DTv2FCRh1E6fk2+wONeNY15HXIwtcwuveaSwVpGAUptkNmPQegRxW5JyRel9T7wrog==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.73.0.tgz", + "integrity": "sha512-O/1ytYzflF16QDKXx4/qOXg1IuZp+n7hr9t+S0nv7N/2Tl8rJiNCshztV1gcSUvHbPtoX3+zmNbtSAyVbzxVfw==", "dev": true, "license": "MIT", "engines": { @@ -2316,22 +2517,17 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.72.2.tgz", - "integrity": "sha512-pQEGqIK/cqEvKivVWaFLYpe7XYejFxfuAOi4mu1oAWFvIo36aRHI9esRFTUxcIy/z8N482RJyH+LpZB0ZIU7Ow==", + "node_modules/@typescript-eslint/utils": { + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.73.0.tgz", + "integrity": "sha512-j2SVJJvVkXdUL0WcEzo4vEH1mO1vIi8KlVukcYA2MgMZvYN2LlZR4PmsW+GTSxSW24j6Q/EP7+MOifLtg5hmsA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.72.2", - "@typescript-eslint/tsconfig-utils": "8.72.2", - "@typescript-eslint/types": "8.72.2", - "@typescript-eslint/visitor-keys": "8.72.2", - "debug": "^4.4.3", - "minimatch": "^10.2.2", - "semver": "^7.7.3", - "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.5.0" + "@eslint-community/eslint-utils": "^4.9.1", + "@typescript-eslint/scope-manager": "8.73.0", + "@typescript-eslint/types": "8.73.0", + "@typescript-eslint/typescript-estree": "8.73.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -2341,20 +2537,26 @@ "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/utils": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.72.2.tgz", - "integrity": "sha512-hv3eRYbpPbbpezuax1EfGrzpa3C4ySgNZkPUkLOWOAjU8HsOKowEDAr8C7nsNl1C+SBSKDpvno6VKHnlhvp9iA==", + "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.73.0.tgz", + "integrity": "sha512-InjlBkSdWceIwIBWSwS3ENUp+i0O02PGX3Zv2wnihWJC1WDVGvG7mTHuf8b57uAaITj94d6tRPDH+sUEtXdRQQ==", "dev": true, "license": "MIT", "dependencies": { - "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.72.2", - "@typescript-eslint/types": "8.72.2", - "@typescript-eslint/typescript-estree": "8.72.2" + "@typescript-eslint/project-service": "8.73.0", + "@typescript-eslint/tsconfig-utils": "8.73.0", + "@typescript-eslint/types": "8.73.0", + "@typescript-eslint/visitor-keys": "8.73.0", + "debug": "^4.4.3", + "minimatch": "^11.0.1", + "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" @@ -2364,18 +2566,23 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", + "@typescript/native": "npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev", "typescript": ">=4.8.4 <6.1.0" + }, + "peerDependenciesMeta": { + "@typescript/native": { + "optional": true + } } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.72.2.tgz", - "integrity": "sha512-NAGrjn0Pitjqzq/GkgMC4kBYm233PQ8GffyQ9+kTA3AlNQYEzOf25EIM02BAHZv5FRJSpHpJk+OGUxVkOB93GQ==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.73.0.tgz", + "integrity": "sha512-k4lsFVpRZICbltkIEEH4hZRkwXkqDF1GHBpClKQOHQY+RkoZAAuyc1ci3I6p+CB6v3U4jaHIUshc4RzzQXZWLg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.72.2", + "@typescript-eslint/types": "8.73.0", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -2386,6 +2593,19 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript-eslint/visitor-keys/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/@typescript/native": { "name": "typescript", "version": "7.0.2", @@ -2422,21 +2642,6 @@ "@typescript/typescript-win32-x64": "7.0.2" } }, - "node_modules/@typescript/old": { - "name": "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": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/@typescript/typescript-aix-ppc64": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", @@ -3162,9 +3367,9 @@ } }, "node_modules/@vitest/istanbul-lib-coverage": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-2.1.0.tgz", - "integrity": "sha512-WOjuS+xcjSIy7ruYBQ+9BUcV7XZQ0FyVcbWbWxW9TRx/kLGx5SQaeFRIFDJxjNplb6YsT7SpKo2zuXXUo91OIQ==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-2.1.1.tgz", + "integrity": "sha512-pF9nMHHuyQzyEXdkWX3d4wElEKjymfL5TEoofegJn/jK2WjmTLOcJKfJ7/YwYGYdbZf8Ebrt4VDUoBPiTuO9zg==", "dev": true, "license": "MIT", "engines": { @@ -3172,13 +3377,13 @@ } }, "node_modules/@vitest/istanbul-lib-report": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-2.1.0.tgz", - "integrity": "sha512-+ZFta25nWtGCOBG9/IET8w1RO5Oawsd6H8Uf6AJ9EA/StFuKVtKAEJEJ6uRt84OH+T4YkI0ASmIHAhRA+0KVxw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-2.1.1.tgz", + "integrity": "sha512-Qba+8OpQQAbWrmq3u1olh6jqE/vyW4OYJe6TLrrTBpXhjJhbY7Os69wyVvMQmNA64KJhGd5nQ/c7l4io8tPCHQ==", "dev": true, "license": "MIT", "dependencies": { - "@vitest/istanbul-lib-coverage": "2.1.0" + "@vitest/istanbul-lib-coverage": "2.1.1" }, "engines": { "node": ">=22" @@ -3403,9 +3608,9 @@ } }, "node_modules/bowser": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.15.0.tgz", - "integrity": "sha512-xic6KSZglg/I4ymp45fdM4GWfYpBK79Fxd/TOvJktlaPgQqqDxvmGwOPZl2V0dyeS3Lj5c180bLhXF43iyAjZQ==", + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz", + "integrity": "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==", "dev": true, "license": "MIT" }, @@ -3453,19 +3658,6 @@ "node": ">=18" } }, - "node_modules/chalk": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-6.0.0.tgz", - "integrity": "sha512-2uNTXIuTTxk7ciZgAU1BQcgnchcG0xXnrs6jzkQfj9SsRa9M2s5zE8WT96hS6KmG4MzWHSrvH43DF1m4XRkrFg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=22" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/cjs-module-lexer": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.3.0.tgz", @@ -3657,9 +3849,9 @@ } }, "node_modules/eslint": { - "version": "10.14.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.14.0.tgz", - "integrity": "sha512-T0pNsxkb9IKmtQjhpK3d7nWOpFv+YHuMbTJnSVMoQblF0onvXfErrtp4V1jHtsQPan7dKaGVD0q1WCXnzMF31A==", + "version": "10.15.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.15.0.tgz", + "integrity": "sha512-+5Wg4p+ze3sG1WErYgUO/3H1IQIfFBymVUA0Fo/XTeBOLS6UQIUekpSJ8sdRkn7O7wjh84b55w/roqavH2aScg==", "dev": true, "license": "MIT", "workspaces": [ @@ -3668,7 +3860,7 @@ "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.5", + "@eslint/config-array": "^0.23.6", "@eslint/config-helpers": "^0.7.0", "@eslint/core": "^1.2.1", "@eslint/plugin-kit": "^0.7.3", @@ -3693,7 +3885,7 @@ "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.6", + "minimatch": "^11.0.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, @@ -3853,9 +4045,9 @@ } }, "node_modules/eslint-plugin-import-x/node_modules/es-module-lexer": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-3.0.4.tgz", - "integrity": "sha512-BldNY5mwkVu+cQ5Ymn3e6hB9Sx8XHx4ZevWbiUyZbfKxJxYO27Hf0wfzkxIaD5CAJMaGl3YspKELj0ff/7nCMA==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-3.0.5.tgz", + "integrity": "sha512-RNq2lKJw53c7z9QRHeiKeA6Ez0oikOqiBGdmxQhKDxEiOX1g5QJR4IoFVwicn8uCZcRWNrXC3NZaJihgK7aEbg==", "dev": true, "license": "MIT" }, @@ -3939,6 +4131,19 @@ } }, "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/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==", @@ -3979,6 +4184,19 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/espree/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/esquery": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", @@ -4069,9 +4287,9 @@ "license": "MIT" }, "node_modules/fast-check": { - "version": "4.10.2", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.10.2.tgz", - "integrity": "sha512-iK2f+YrcmoeGqk6fA0ea2bptcu/itMIm4NfEozq6N25+aG6h7s5HZbB/k1aV7b5w5sFLMCbbtRUsTVR+BgC3xw==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.8.0.tgz", + "integrity": "sha512-GOJ158CUMnN6cSahsv4+ExARvIDuzzinFjkp0E9WtiBa5zcVeLozVkWaE4IzFcc+Y48Wp1EDlUZsXRyAztQcSg==", "dev": true, "funding": [ { @@ -4421,21 +4639,11 @@ } }, "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", - "dev": true, - "license": "ISC" - }, - "node_modules/grok-mermaid": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/grok-mermaid/-/grok-mermaid-0.2.3.tgz", - "integrity": "sha512-/4KopAbsjvuRP9MdPtlDjOHUmUVEohOX73JNcsWpzAtFxh+bq5+Dhb6gzvRieLDwIPQIR3/vy8V1NNTuz4Zsmg==", + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz", + "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": ">=18" - } + "license": "BlueOak-1.0.0" }, "node_modules/hashery": { "version": "1.5.1", @@ -4450,16 +4658,6 @@ "node": ">=20" } }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true, - "license": "BSD-3-Clause", - "engines": { - "node": "*" - } - }, "node_modules/hookified": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz", @@ -4467,19 +4665,6 @@ "dev": true, "license": "MIT" }, - "node_modules/hosted-git-info": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-9.0.3.tgz", - "integrity": "sha512-Hc+ghLoSt6QaYZUv0WBiIvmMDZuZZ7oaDvdH8MbfOO4lOsxdXLEvuC6ePoGs9H1X9oCLyq6+NVN0MKqD+ydxyg==", - "dev": true, - "license": "ISC", - "dependencies": { - "lru-cache": "^11.1.0" - }, - "engines": { - "node": "^20.17.0 || >=22.9.0" - } - }, "node_modules/http-proxy-agent": { "version": "9.1.0", "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-9.1.0.tgz", @@ -4749,9 +4934,9 @@ } }, "node_modules/knip": { - "version": "6.45.1", - "resolved": "https://registry.npmjs.org/knip/-/knip-6.45.1.tgz", - "integrity": "sha512-zp3zXKy2cZWiIttdlWU5fisKxVQaLSU6471ej0KGz1GdHdaHxpzTAO/LIyFNc3gU3v1W7LJaqvYumoO3l/u+6A==", + "version": "6.47.0", + "resolved": "https://registry.npmjs.org/knip/-/knip-6.47.0.tgz", + "integrity": "sha512-nYmQnk0YqDXIJrYViJz88c8xw3tBDkpuAmofo58EkVPnKr6DnRKYtf6oIqcGVHZvXDE+gtmFuYx277/QsWng+A==", "dev": true, "funding": [ { @@ -5111,16 +5296,6 @@ "dev": true, "license": "Apache-2.0" }, - "node_modules/lru-cache": { - "version": "11.5.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", - "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", - "dev": true, - "license": "BlueOak-1.0.0", - "engines": { - "node": "20 || >=22" - } - }, "node_modules/magic-string": { "version": "1.4.5", "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", @@ -5164,16 +5339,17 @@ } }, "node_modules/minimatch": { - "version": "10.2.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", - "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", + "version": "11.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz", + "integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.8" + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -5521,9 +5697,9 @@ } }, "node_modules/postcss": { - "version": "8.5.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.32.tgz", - "integrity": "sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==", + "version": "8.5.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", + "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", "dev": true, "funding": [ { @@ -5560,9 +5736,9 @@ } }, "node_modules/prettier": { - "version": "3.9.10", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.10.tgz", - "integrity": "sha512-skGHTH1Yb9QvaTC4hWnRTzEYtCpApF0UMBPz+t/0ZPzP8ihefo/btKd+QA7pUE0fEwA1SbS/NmhyEcstdXOIdA==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.10.1.tgz", + "integrity": "sha512-70vp3ZUYoPlFbF9uiTdXHUUCGEIp7d4+6p+8DYbkm2jP7x/3i/paXVF6dopSI3zd/CEitrZN1rc4i85xWmmXlg==", "dev": true, "license": "MIT", "bin": { @@ -5575,28 +5751,6 @@ "url": "https://github.com/prettier/prettier?sponsor=1" } }, - "node_modules/proper-lockfile": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/proper-lockfile/-/proper-lockfile-4.1.2.tgz", - "integrity": "sha512-TjNPblN4BwAWMXU8s9AEz4JmQxnD1NNL7bNOY/AKUzyamc379FWASUhc/K1pL2noVb+XmZKLL68cjzLsiOAMaA==", - "dev": true, - "license": "MIT", - "dependencies": { - "graceful-fs": "^4.2.4", - "retry": "^0.12.0", - "signal-exit": "^3.0.2" - } - }, - "node_modules/proper-lockfile/node_modules/retry": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", - "integrity": "sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 4" - } - }, "node_modules/protobufjs": { "version": "7.6.6", "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.6.6.tgz", @@ -5650,9 +5804,9 @@ } }, "node_modules/pure-rand": { - "version": "8.4.2", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.2.tgz", - "integrity": "sha512-vvuOGgcuPJAirlHvuQw1TrOiw7ptaIXXmIbNuiNOY6lNGJJH49PQ1Kj4nd783nPdQhQdicgOjVI2yI/9BD6/Ng==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.0.tgz", + "integrity": "sha512-IoM8YF/jY0hiugFo/wOWqfmarlE6J0wc6fDK1PhftMk7MGhVZl88sZimmqBBFomLOCSmcCCpsfj7wXASCpvK9A==", "dev": true, "funding": [ { @@ -5749,9 +5903,9 @@ } }, "node_modules/rolldown": { - "version": "1.2.18", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.18.tgz", - "integrity": "sha512-C1uuT3UR60SShuCaPQFAAZyefJCWZlAKB02BV3BuPE2Rs4fevRQltEKoFO2tV5W9/eJhU5RieV6vJj3euulfNQ==", + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.19.tgz", + "integrity": "sha512-QIiV1J9d0pzN4jeeTH4sjPy0AZ6cAy2cG0ExeoE1+U8Rvj+hR3gYkokx0YbeUNGlZqiQJJ2utcETe0oKXwzsuA==", "dev": true, "license": "MIT", "dependencies": { @@ -5765,21 +5919,22 @@ "node": "^20.19.0 || >=22.12.0" }, "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.18", - "@rolldown/binding-android-arm64": "1.2.18", - "@rolldown/binding-darwin-arm64": "1.2.18", - "@rolldown/binding-darwin-x64": "1.2.18", - "@rolldown/binding-freebsd-x64": "1.2.18", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.18", - "@rolldown/binding-linux-arm64-gnu": "1.2.18", - "@rolldown/binding-linux-arm64-musl": "1.2.18", - "@rolldown/binding-linux-ppc64-gnu": "1.2.18", - "@rolldown/binding-linux-s390x-gnu": "1.2.18", - "@rolldown/binding-linux-x64-gnu": "1.2.18", - "@rolldown/binding-linux-x64-musl": "1.2.18", - "@rolldown/binding-openharmony-arm64": "1.2.18", - "@rolldown/binding-win32-arm64-msvc": "1.2.18", - "@rolldown/binding-win32-x64-msvc": "1.2.18" + "@rolldown/binding-android-arm-eabi": "1.2.19", + "@rolldown/binding-android-arm64": "1.2.19", + "@rolldown/binding-darwin-arm64": "1.2.19", + "@rolldown/binding-darwin-x64": "1.2.19", + "@rolldown/binding-freebsd-x64": "1.2.19", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.19", + "@rolldown/binding-linux-arm64-gnu": "1.2.19", + "@rolldown/binding-linux-arm64-musl": "1.2.19", + "@rolldown/binding-linux-ppc64-gnu": "1.2.19", + "@rolldown/binding-linux-s390x-gnu": "1.2.19", + "@rolldown/binding-linux-x64-gnu": "1.2.19", + "@rolldown/binding-linux-x64-musl": "1.2.19", + "@rolldown/binding-openharmony-arm64": "1.2.19", + "@rolldown/binding-wasm32-wasi": "1.2.19", + "@rolldown/binding-win32-arm64-msvc": "1.2.19", + "@rolldown/binding-win32-x64-msvc": "1.2.19" } }, "node_modules/safe-buffer": { @@ -5860,13 +6015,13 @@ } }, "node_modules/source-map-js": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", - "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.4.tgz", + "integrity": "sha512-J7ZjMvHd9O1fcT/5V09QWaaSl2BbWx3F6O08spde82Namf9UB0GxRVIPiNbVsdKkoizHiSpTodo3vp2bAy91MA==", "dev": true, "license": "BSD-3-Clause", "engines": { - "node": ">=0.10.0" + "node": ">=6.0.0" } }, "node_modules/split": { @@ -5973,9 +6128,9 @@ } }, "node_modules/tapable": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", - "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.4.tgz", + "integrity": "sha512-NHFiWnAbMJxNNpBwiO7jJVGDuqMxT9/oV8v57RR+fgBQShkJil5inGD8/xWy0hjLyHQyX1tu27QANhlz3KBqCg==", "dev": true, "license": "MIT", "engines": { @@ -6071,9 +6226,9 @@ } }, "node_modules/tslib": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", - "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", "dev": true, "license": "0BSD" }, @@ -6098,30 +6253,30 @@ "license": "MIT" }, "node_modules/typescript": { - "name": "@typescript/typescript6", - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@typescript/typescript6/-/typescript6-6.0.2.tgz", - "integrity": "sha512-mbCddXd+jm7hfx7w2YU64/Av4/NqqeG3GoRZgxPcgoTxYjhrcfJRw9ULch71SS4G+Q3bOXFhRvPqjguN0Hyp5w==", + "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", - "dependencies": { - "@typescript/old": "npm:typescript@^6" - }, "bin": { - "tsc6": "bin/tsc6" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" } }, "node_modules/typescript-eslint": { - "version": "8.72.2", - "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.72.2.tgz", - "integrity": "sha512-c/+AKMW1KB81r28Sp0AAdcyXj5dzNmAsZFcsrxKbZTKmcBK2xIwBR31dcSYSDu3bKmzXe8GKrSxO+eDQ401Uzg==", + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.73.0.tgz", + "integrity": "sha512-+EnKy9rkYPun4l+kG2bDuYWQ6y1tGVgdR/tY1U9AC6h21CjEwOoc7gsjwe0FXB8uWFzk4QiCFbuRWgX758PiAg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/eslint-plugin": "8.72.2", - "@typescript-eslint/parser": "8.72.2", - "@typescript-eslint/typescript-estree": "8.72.2", - "@typescript-eslint/utils": "8.72.2" + "@typescript-eslint/eslint-plugin": "8.73.0", + "@typescript-eslint/parser": "8.73.0", + "@typescript-eslint/typescript-estree": "8.73.0", + "@typescript-eslint/utils": "8.73.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -6135,6 +6290,40 @@ "typescript": ">=4.8.4 <6.1.0" } }, + "node_modules/typescript-eslint/node_modules/@typescript-eslint/typescript-estree": { + "version": "8.73.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.73.0.tgz", + "integrity": "sha512-InjlBkSdWceIwIBWSwS3ENUp+i0O02PGX3Zv2wnihWJC1WDVGvG7mTHuf8b57uAaITj94d6tRPDH+sUEtXdRQQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.73.0", + "@typescript-eslint/tsconfig-utils": "8.73.0", + "@typescript-eslint/types": "8.73.0", + "@typescript-eslint/visitor-keys": "8.73.0", + "debug": "^4.4.3", + "minimatch": "^11.0.1", + "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/native": "npm:typescript@>=7.1.0-dev.20261009.1 || >=7.1.0-beta <7.1.0-dev", + "typescript": ">=4.8.4 <6.1.0" + }, + "peerDependenciesMeta": { + "@typescript/native": { + "optional": true + } + } + }, "node_modules/unbash": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/unbash/-/unbash-6.0.4.tgz", @@ -6454,9 +6643,9 @@ } }, "node_modules/ws": { - "version": "8.22.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.2.tgz", - "integrity": "sha512-/rEZ2ejown2N5gxVTHUu9bVVC7ttu0/Tgzf5hbTOixR3Fs7mbbXgn2DbdbcKgJOmpQMtrIUWivtYuVMnp/W/yA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.22.0.tgz", + "integrity": "sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index c25249a3..943103bd 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "@earendil-works/pi-tui": ">=1.2.0", "typebox": ">=1.3.27" }, + "dependencies": {}, "scripts": { "prepare": "husky", "test": "vitest run --project unit", diff --git a/spawn/index.ts b/spawn/index.ts index 5e6e2a70..750dfb5d 100644 --- a/spawn/index.ts +++ b/spawn/index.ts @@ -255,7 +255,7 @@ function getInheritableParentToolNames(parentToolNames: string[], availableTools * Local child custom tools are added separately. Parent-only custom tools are * intentionally excluded so the child never advertises a tool it cannot execute. * - * handoff and spawn never carry into children. + * handoff, spawn and the run-scoped workflow_output never carry into children. */ export function buildChildToolNames( parentToolNames: string[], @@ -484,7 +484,12 @@ export function executeSpawn( provider: route.provider, modelId: route.modelId, } - : { status: "inherited" }; + : { status: "inherited", provider: route.provider, modelId: route.modelId }; + + // WHY: capture the run-owned sink before any await. A late flush after this run ends + // must write to the run that spawned the child, never the next run's sink. + const childUsageSink = state.childUsageSink; + const childProvider = route.provider; const childSessionEpoch = state.childSessionEpoch; const isStale = () => state.childSessionEpoch !== childSessionEpoch; @@ -541,6 +546,17 @@ export function executeSpawn( // public session value so child details describe what actually runs. The // fallback keeps intentionally partial session test doubles compatible. const effectiveChildThinking = () => session.thinkingLevel ?? requestedChildThinking; + // Child spend belongs to the run ledger from the moment it is incurred. Flushing + // cumulative usage on every message_end keeps live cost attributed to the child's + // model, so an aborted run cannot leave a model-less residual; cumulative (not + // delta) makes the settle flush idempotent. + const flushChildSpend = () => { + if (!childUsageSink) { + return; + } + childUsageSink(toolCallId, childProvider, childModel.id, collectChildAccounting(session).usage); + }; + let unsubscribeChildEvents: (() => void) | undefined; const buildBaseDetails = (truncated: boolean, outcome: SpawnOutcome): SpawnResultDetails => ({ model: childModel.id, thinking: effectiveChildThinking(), @@ -570,8 +586,26 @@ export function executeSpawn( throw new Error(describeAbort(abortedSignal.reason)); }; + // The subscription is UI-independent; a failure loses live flushes only, and + // the settle flush below still runs, so it never fails the spawn. + if (typeof session.subscribe === "function") { + try { + unsubscribeChildEvents = session.subscribe((event) => { + if (event.type === "message_end") { + flushChildSpend(); + } + }); + } catch (error) { + const issue = `Spawn event subscription failed: ${failureMessage(error)}`; + if (ctx.hasUI) { + ctx.ui.notify(issue, "warning"); + } + } + } + const runChild = async (): Promise => { let primary: { error: unknown } | undefined; + try { if (isStale()) { await abortAndInvalidate(); @@ -664,6 +698,10 @@ export function executeSpawn( primary = { error }; throw error; } finally { + unsubscribeChildEvents?.(); + // Last flush before dispose: covers headless runs, missed message_end events + // and abort paths. + flushChildSpend(); clearChildSession(); try { // AgentSession always provides dispose(); the guard keeps intentionally diff --git a/spawn/renderer.ts b/spawn/renderer.ts index 3f43d1e8..13c68639 100644 --- a/spawn/renderer.ts +++ b/spawn/renderer.ts @@ -108,8 +108,14 @@ function normalizeRoute(value: unknown): SpawnRouteDetails | undefined { if (!isRecord(value)) { return undefined; } + // Accept both the persisted `{status:"inherited"}` and the current shape with + // provider/modelId; the extra identity is preserved when present. if (value.status === "inherited") { - return { status: "inherited" }; + return { + status: "inherited", + ...(typeof value.provider === "string" ? { provider: value.provider } : {}), + ...(typeof value.modelId === "string" ? { modelId: value.modelId } : {}), + }; } if (value.status === "routed" && typeof value.group === "string" && typeof value.provider === "string" && typeof value.modelId === "string") { return { status: "routed", group: value.group, provider: value.provider, modelId: value.modelId }; diff --git a/spawn/shared.ts b/spawn/shared.ts index 97a0b979..77e1a8e7 100644 --- a/spawn/shared.ts +++ b/spawn/shared.ts @@ -3,8 +3,12 @@ import type { AgentSession } from "@earendil-works/pi-coding-agent"; export type SpawnOutcome = "running" | "success" | "aborted" | "error"; +/** Advisory spawn notice type (event-subscription failure). Informational, never a run + * error, so it must not reuse the workflow error entry type. */ export type SpawnRouteDetails = - | { status: "inherited" } + // provider/modelId are optional only to read sessions persisted before they were added; + // every new write sets them so the spend ledger never splits one model across two rows. + | { status: "inherited"; provider?: string; modelId?: string } | { status: "routed"; group: string; provider: string; modelId: string } | { status: "unknown-fallback"; requestedGroup: string; provider: string; modelId: string }; diff --git a/state.ts b/state.ts index 94a9fc90..11623205 100644 --- a/state.ts +++ b/state.ts @@ -6,10 +6,19 @@ */ import type { AgentSession } from "@earendil-works/pi-coding-agent"; +import type { Usage } from "@earendil-works/pi-ai"; import type { ModelGroupsBootValidation, ResolvedModelGroup } from "./model-groups/types.js"; import type { FrontmatterEntry, FrontmatterIssue } from "./frontmatter-cache.js"; import type { NotebookTopicBoundaryHint } from "./notebook/topic.js"; +/** + * Run-scoped sink for live child spend. The active workflow host installs it, and the + * spawn tool flushes each child's cumulative usage on every message_end and at settle. + * Null outside a workflow run; only host dispose uninstalls it, never resetState, because + * a run survives `workflow.new`. + */ +type ChildUsageSink = (toolCallId: string, provider: string | null, model: string, usage: Usage) => void; + /** A handoff accepted by the tool, kept until its turn_end boundary is confirmed or failed. */ export interface StagedHandoff { /** Written to the cut's and the successor's details; identifies the cut on the branch. */ @@ -128,6 +137,12 @@ export interface SchematicState { /** One abort promise per child session, shared by signal and reset cleanup. WeakMap entries are GC'd with the session; no manual clear needed. */ childAbortPromises: WeakMap>; + /** Live child-spend sink installed by the active workflow host; see {@link ChildUsageSink}. */ + childUsageSink: ChildUsageSink | null; + + /** True while a workflow run owns the input channel (serial-run invariant, see docs/workflows.md). */ + inputSuppressed: boolean; + /** Whether readonly mode is active — write/edit/powershell blocked; handoff needs explicit /handoff or a human topic boundary; bash writes limited to temp. */ readonlyEnabled: boolean; @@ -205,6 +220,8 @@ export function createState(): SchematicState { liveChildSessions, childSessionEpoch: 0, childAbortPromises: new WeakMap(), + childUsageSink: null, + inputSuppressed: false, readonlyEnabled: false, readonlyNudgePending: false, readonlyNudgeRearmAtSettle: false, diff --git a/tests/unit/spawn.test.ts b/tests/unit/spawn.test.ts index 7229086a..02162f02 100644 --- a/tests/unit/spawn.test.ts +++ b/tests/unit/spawn.test.ts @@ -346,7 +346,7 @@ test("spawn forwards requested thinking and reports the session effective thinki expect(seenConfig?.thinkingLevel, "requested thinking is forwarded unchanged").toBe("max"); expect(runningDetails.thinking, "running details report Pi's effective thinking").toBe("off"); expect(result.details.thinking, "final details report Pi's effective thinking").toBe("off"); - expect(result.details.route).toStrictEqual({ status: "inherited" }); + expect(result.details.route).toStrictEqual({ status: "inherited", provider: "test", modelId: "non-reasoning-model" }); }); test("spawn execute composes Model Group routing with readonly child guards", async () => { @@ -871,7 +871,13 @@ test("spawn execute derives result stats from the child entries", async () => { expect(updates).toStrictEqual([ { content: [], - details: { model: "mock-model", thinking: "high", truncated: false, outcome: "running", route: { status: "inherited" } }, + details: { + model: "mock-model", + thinking: "high", + truncated: false, + outcome: "running", + route: { status: "inherited", provider: "test", modelId: "mock-model" }, + }, }, ]); expect(result.content[0].text).toBe("child result"); @@ -1434,7 +1440,7 @@ function failedSpawnResult(text: string) { thinking: "high", truncated: false, outcome: "error", - route: { status: "inherited" }, + route: { status: "inherited", provider: "test", modelId: "mock-model" }, stats: { inputTokens: 80, outputTokens: 4, cacheReadTokens: 10, cacheWriteTokens: 1, totalTokens: 95, cost: 13, turns: 2 }, }, usage: FAILED_CHILD_USAGE, @@ -1570,7 +1576,7 @@ test("a parent abort between child creation and the prompt returns an aborted re thinking: "high", truncated: false, outcome: "aborted", - route: { status: "inherited" }, + route: { status: "inherited", provider: "test", modelId: "mock-model" }, stats: { inputTokens: 80, outputTokens: 4, cacheReadTokens: 10, cacheWriteTokens: 1, totalTokens: 95, cost: 13, turns: 2 }, }); expect(result.content[0].text).toBe("Child agent aborted: aborted before start"); @@ -2195,7 +2201,7 @@ test("executeSpawn forwards inherited constraints to routing and succeeds when s sessionFactory, ); expect(result.details.outcome).toBe("success"); - expect(result.details.route).toStrictEqual({ status: "inherited" }); + expect(result.details.route).toStrictEqual({ status: "inherited", provider: "openai", modelId: "parent" }); expect(sessionFactory, "inherited route with satisfied requirements creates one child").toHaveBeenCalledOnce(); }); diff --git a/tests/unit/usage.test.ts b/tests/unit/usage.test.ts new file mode 100644 index 00000000..f91d6e22 --- /dev/null +++ b/tests/unit/usage.test.ts @@ -0,0 +1,182 @@ +// SSOT contract: one cost derivation feeds every surface, and the run's child ledger +// owns each child's spend exactly once. +import { expect, test } from "vitest"; +import type { SessionEntry } from "@earendil-works/pi-coding-agent"; +import type { Usage } from "@earendil-works/pi-ai"; +import { + UNATTRIBUTED_MODEL, + addModelSpend, + addUsage, + collectUsage, + mergeModelSpend, + sessionStatsToUsage, + spendRowsTotal, + usageByModel, + ZERO_USAGE, + type ModelSpend, +} from "../../usage.js"; + +const usd = (total: number): Usage => ({ + input: 10, + output: 5, + cacheRead: 0, + cacheWrite: 0, + totalTokens: 15, + cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total }, +}); + +test("addUsage sums every usage field including cost", () => { + const total = addUsage(ZERO_USAGE, usd(0.5)); + expect(total.input).toBe(10); + expect(total.cost.total).toBe(0.5); + expect(addUsage(total, usd(0.25)).cost).toStrictEqual({ input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0.75 }); +}); + +test("collectUsage reads usage entries, assistant messages, and tool results", () => { + const entries: SessionEntry[] = [ + { + type: "usage", + id: "us1", + parentId: null, + timestamp: "", + kind: "classifier", + provider: "p", + model: "m", + usage: usd(0.1), + }, + modelAssistant("a1", "p", "m", 0.2), + childToolResult("t1", "c1", 0.3), + { + type: "message", + id: "u1", + parentId: null, + timestamp: "2026-10-07T00:00:02.000Z", + message: { role: "user", content: "no usage", timestamp: 0 }, + }, + ]; + expect(Math.abs(collectUsage(entries).cost.total - 0.6) < 1e-9).toBe(true); +}); + +test("sessionStatsToUsage reads token totals and the authoritative session cost", () => { + const usage = sessionStatsToUsage({ + tokens: { input: 3, output: 4, cacheRead: 5, cacheWrite: 6, total: 18 }, + cost: 0.42, + }); + expect(usage.totalTokens).toBe(18); + expect(usage.cost.total).toBe(0.42); +}); + +function modelAssistant(id: string, provider: string, model: string, total: number): SessionEntry { + // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- fixture literal matches SessionMessageEntry without carrying the SDK's full union + return { + type: "message", + id, + parentId: null, + timestamp: "2026-10-07T00:00:00.000Z", + message: { role: "assistant", provider, model, content: [{ type: "text", text: "x" }], timestamp: 0, usage: usd(total) }, + } as unknown as SessionEntry; +} + +function childToolResult(id: string, toolCallId: string, total: number): SessionEntry { + // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- fixture literal matches SessionMessageEntry without carrying the SDK's full union + return { + type: "message", + id, + parentId: null, + timestamp: "2026-10-07T00:00:00.000Z", + message: { + role: "toolResult", + toolName: "spawn", + toolCallId, + content: "done", + timestamp: 0, + usage: usd(total), + details: { model: "haiku", route: { provider: "anthropic" } }, + }, + } as unknown as SessionEntry; +} + +// SSOT contract: the overview's spend rows come from the same entries as collectUsage, +// so every model is named and the rows sum to the authoritative total. +test("usageByModel attributes assistant, usage-entry, spawned-child, and model-less spend", () => { + const entries: SessionEntry[] = [ + modelAssistant("a1", "anthropic", "opus", 0.5), + { + type: "usage", + id: "u1", + parentId: null, + timestamp: "2026-10-07T00:00:01.000Z", + kind: "cache_warm", + provider: "typesafe", + model: "jev", + usage: usd(0.1), + }, + childToolResult("t1", "c1", 0.2), + { + type: "compaction", + id: "c1", + parentId: null, + timestamp: "2026-10-07T00:00:03.000Z", + summary: "sum", + firstKeptEntryId: "a1", + tokensBefore: 1, + usage: usd(0.05), + }, + ]; + const spend = usageByModel(entries); + expect(spend.get("anthropic/opus")?.costUsd).toBe(0.5); + expect(spend.get("typesafe/jev")?.costUsd).toBe(0.1); + expect(spend.get("anthropic/haiku")?.costUsd).toBe(0.2); + expect(spend.get(UNATTRIBUTED_MODEL)?.costUsd).toBe(0.05); + // The rows partition the branch's usage exactly. + const sum = [...spend.values()].reduce((total, row) => total + row.costUsd, 0); + expect(Math.abs(sum - collectUsage(entries).cost.total) < 1e-9, "rows sum to collected usage").toBe(true); +}); + +// SSOT contract: the child ledger is the single owner of child-owned tool results, so +// `usageByModel` must skip exactly the tool calls the ledger already folds. +test("usageByModel skips a child-owned tool result when claimed, and counts it otherwise", () => { + const entries: SessionEntry[] = [childToolResult("t1", "c1", 0.2)]; + const claimed = usageByModel(entries, { skip: new Set(["c1"]) }); + expect(claimed.size, "claimed child tool result is excluded").toBe(0); + + const unclaimed = usageByModel(entries); + expect(unclaimed.get("anthropic/haiku")?.costUsd, "unclaimed tool result is attributed").toBe(0.2); +}); + +// SSOT contract: an empty entry id is never matched against `skip` (only a non-empty id +// or the tool-call id can claim an entry), preserving spendIdentity's fallback. +test("usageByModel ignores an empty entry id and skips by tool-call id only", () => { + const entries: SessionEntry[] = [childToolResult("", "c1", 0.2)]; + expect(usageByModel(entries, { skip: new Set(["c1"]) }).size, "empty-id entry skipped via tool-call id").toBe(0); + expect(usageByModel(entries, { skip: new Set([""]) }).get("anthropic/haiku")?.costUsd, "empty id is never matched").toBe(0.2); + expect(usageByModel(entries).get("anthropic/haiku")?.costUsd, "unclaimed empty-id entry attributed").toBe(0.2); +}); + +// SSOT contract: the run-scoped spend scan drops the conversation that predates the run, +// so only entries kept by the run's id-exclusion set reach the cost rows. +test("usageByModel omits every entry whose id is excluded", () => { + const entries: SessionEntry[] = [modelAssistant("a1", "anthropic", "opus", 0.5), modelAssistant("a2", "anthropic", "opus", 0.25)]; + const kept = usageByModel(entries, { skip: new Set(["a1"]) }); + expect(kept.get("anthropic/opus")?.costUsd, "excluded entry is omitted").toBe(0.25); + expect(kept.get("anthropic/opus")?.calls).toBe(1); + expect(usageByModel(entries).get("anthropic/opus")?.costUsd, "omitting the option keeps every entry").toBe(0.75); +}); + +test("spendRowsTotal equals the exact row sum", () => { + const rows = new Map(); + addModelSpend(rows, "anthropic", "opus", usd(0.5)); + addModelSpend(rows, null, "widget", usd(0.4)); + expect(Math.abs(spendRowsTotal(rows) - 0.9) < 1e-9).toBe(true); + expect(spendRowsTotal(new Map())).toBe(0); +}); + +test("mergeModelSpend sums rows from every source without mutating its inputs", () => { + const baseline = usageByModel([modelAssistant("a1", "anthropic", "opus", 0.5)]); + const current = usageByModel([modelAssistant("a2", "anthropic", "opus", 0.25), modelAssistant("a3", "typesafe", "jev", 0.1)]); + const merged = mergeModelSpend(baseline, current); + expect(merged.get("anthropic/opus")?.costUsd).toBe(0.75); + expect(merged.get("anthropic/opus")?.calls).toBe(2); + expect(merged.get("typesafe/jev")?.costUsd).toBe(0.1); + expect(baseline.get("anthropic/opus")?.costUsd, "input map untouched").toBe(0.5); +}); diff --git a/tests/unit/workflow-helpers-usage.test.ts b/tests/unit/workflow-helpers-usage.test.ts new file mode 100644 index 00000000..d1383a7f --- /dev/null +++ b/tests/unit/workflow-helpers-usage.test.ts @@ -0,0 +1,155 @@ +// Attribution and accumulation rules of the usage helpers, read through their public +// outputs. Whole-branch totals are covered by usage.test.ts. +import { expect, test } from "vitest"; +import type { SessionEntry } from "@earendil-works/pi-coding-agent"; +import type { Usage } from "@earendil-works/pi-ai"; +import { + UNATTRIBUTED_MODEL, + addModelSpend, + addUsage, + assistantCount, + collectUsage, + mergeModelSpend, + usageByModel, + ZERO_USAGE, + type ModelSpend, +} from "../../usage.js"; + +function usd(total: number): Usage { + return { + input: 10, + output: 5, + cacheRead: 1, + cacheWrite: 2, + totalTokens: 18, + cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total }, + }; +} + +function assistant(id: string, fields: Record): SessionEntry { + // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- fixture literal matches SessionMessageEntry without carrying the SDK's full union + return { + type: "message", + id, + parentId: null, + timestamp: "2026-10-07T00:00:00.000Z", + message: { role: "assistant", content: [{ type: "text", text: "x" }], timestamp: 0, ...fields }, + } as unknown as SessionEntry; +} + +function userMessage(id: string): SessionEntry { + return { + type: "message", + id, + parentId: null, + timestamp: "2026-10-07T00:00:00.000Z", + message: { role: "user", content: "hi", timestamp: 0 }, + }; +} + +test("addModelSpend keeps the provider-less and provider-scoped rows of one model apart", () => { + const map = new Map(); + addModelSpend(map, null, "widget", usd(0.1)); + addModelSpend(map, "acme", "widget", usd(0.2)); + expect(map.get("widget")?.costUsd).toBe(0.1); + expect(map.get("acme/widget")?.costUsd).toBe(0.2); + expect(map.get("acme/widget")?.provider).toBe("acme"); +}); + +test("addModelSpend accumulates every field and counts one call per usage record", () => { + const map = new Map(); + addModelSpend(map, "acme", "widget", usd(0.1)); + addModelSpend(map, "acme", "widget", usd(0.2)); + expect(map.get("acme/widget")).toStrictEqual({ + key: "acme/widget", + provider: "acme", + model: "widget", + costUsd: 0.1 + 0.2, + totalTokens: 36, + inputTokens: 20, + outputTokens: 10, + cacheReadTokens: 2, + cacheWriteTokens: 4, + calls: 2, + }); +}); + +test("usageByModel attributes an assistant turn without a model to the unattributed bucket", () => { + const spend = usageByModel([assistant("a1", { usage: usd(0.3) })]); + expect(spend.get(UNATTRIBUTED_MODEL)?.costUsd).toBe(0.3); + expect(spend.get(UNATTRIBUTED_MODEL)?.provider).toBeNull(); +}); + +test("usageByModel keys a provider-less assistant turn by its bare model name", () => { + const spend = usageByModel([assistant("a1", { model: "widget", usage: usd(0.3) })]); + expect([...spend.keys()]).toStrictEqual(["widget"]); +}); + +test("usageByModel ignores turns without usage and entries of other types", () => { + const spend = usageByModel([assistant("a1", { provider: "acme", model: "widget" }), userMessage("u1")]); + expect(spend.size).toBe(0); +}); + +test("usageByModel attributes a tool result without a child model to the unattributed bucket", () => { + // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion -- fixture literal matches SessionMessageEntry without carrying the SDK's full union + const toolResult = { + type: "message", + id: "t1", + parentId: null, + timestamp: "2026-10-07T00:00:00.000Z", + message: { role: "toolResult", toolName: "bash", toolCallId: "c1", content: "ok", timestamp: 0, usage: usd(0.4) }, + } as unknown as SessionEntry; + expect(usageByModel([toolResult]).get(UNATTRIBUTED_MODEL)?.costUsd).toBe(0.4); +}); + +test("assistantCount counts every assistant message, with or without usage, and nothing else", () => { + const entries: SessionEntry[] = [ + userMessage("u1"), + assistant("a1", { provider: "acme", model: "widget", usage: usd(0.1) }), + assistant("a2", {}), + { + type: "usage", + id: "us1", + parentId: null, + timestamp: "", + kind: "classifier", + provider: "acme", + model: "widget", + usage: usd(0.1), + }, + ]; + expect(assistantCount(entries)).toBe(2); + expect(assistantCount([])).toBe(0); +}); + +test("mergeModelSpend with no sources yields an empty map", () => { + expect(mergeModelSpend().size).toBe(0); +}); + +test("mergeModelSpend returns row copies so mutating the result leaves its sources untouched", () => { + const source = usageByModel([assistant("a1", { provider: "acme", model: "widget", usage: usd(0.5) })]); + const merged = mergeModelSpend(source); + for (const row of merged.values()) { + row.costUsd = 99; + } + expect(source.get("acme/widget")?.costUsd).toBe(0.5); +}); + +test("addUsage returns a new record and leaves both operands unchanged", () => { + const left = usd(0.1); + const right = usd(0.2); + const sum = addUsage(left, right); + expect(sum).not.toBe(left); + expect(left.cost.total).toBe(0.1); + expect(right.cost.total).toBe(0.2); + expect(sum.cacheWrite).toBe(4); +}); + +test("ZERO_USAGE is frozen so a shared zero cannot be corrupted by a caller", () => { + expect(Object.isFrozen(ZERO_USAGE)).toBe(true); + expect(Object.isFrozen(ZERO_USAGE.cost)).toBe(true); +}); + +test("collectUsage over an empty branch equals the zero record", () => { + expect(collectUsage([])).toStrictEqual(ZERO_USAGE); +}); diff --git a/usage.ts b/usage.ts new file mode 100644 index 00000000..a1905465 --- /dev/null +++ b/usage.ts @@ -0,0 +1,255 @@ +// WHY: One module derives usage/cost from the run's attributed sources — the settled +// session branch, the child ledger, and classifier calls — so the workflow budget and +// the run overview read the same rows and can never drift. +import type { Usage } from "@earendil-works/pi-ai"; +import type { SessionEntry } from "@earendil-works/pi-coding-agent"; +import type { SpawnRouteDetails } from "./spawn/shared.js"; + +/** AgentMessage widens to custom roles; usage reads only these optional fields. */ +interface AnyMessage { + usage?: Usage; + role?: string; + provider?: string; + model?: string; + /** Identifies a tool result so child-owned spend can be skipped via the tool-call id. */ + toolCallId?: string; + /** Tool-result details; the spawn tool records the child model and its route here. */ + details?: { model?: string; route?: SpawnRouteDetails }; +} + +/** Narrow a session message to the optional usage-bearing fields without a type assertion. */ +function isAnyMessage(message: unknown): message is AnyMessage { + return typeof message === "object" && message !== null; +} + +/** The usage-bearing view of a message entry, or undefined for non-message entries. */ +function messageOf(entry: SessionEntry): AnyMessage | undefined { + if (entry.type !== "message") { + return undefined; + } + return isAnyMessage(entry.message) ? entry.message : undefined; +} + +/** Bucket for usage pi records without a model: compaction and branch summaries. */ +export const UNATTRIBUTED_MODEL = "unattributed"; + +/** One model's share of a session's spend; the run overview renders exactly these rows. */ +export interface ModelSpend { + /** `provider/model`, or {@link UNATTRIBUTED_MODEL} when no entry names a model. */ + key: string; + provider: string | null; + model: string; + costUsd: number; + totalTokens: number; + inputTokens: number; + outputTokens: number; + cacheReadTokens: number; + cacheWriteTokens: number; + /** Usage-bearing entries attributed to this model. */ + calls: number; +} + +function spendKey(provider: string | null, model: string): string { + if (provider !== null && provider !== "") { + return `${provider}/${model}`; + } + return model; +} + +/** Additive fields of one spend row; the single accumulator both usage paths share. */ +type SpendDelta = Pick; + +function accumulateSpend(existing: ModelSpend, delta: SpendDelta): void { + existing.costUsd += delta.costUsd; + existing.totalTokens += delta.totalTokens; + existing.inputTokens += delta.inputTokens; + existing.outputTokens += delta.outputTokens; + existing.cacheReadTokens += delta.cacheReadTokens; + existing.cacheWriteTokens += delta.cacheWriteTokens; + existing.calls += delta.calls; +} + +function usageDelta(usage: Usage): SpendDelta { + return { + costUsd: usage.cost.total, + totalTokens: usage.totalTokens, + inputTokens: usage.input, + outputTokens: usage.output, + cacheReadTokens: usage.cacheRead, + cacheWriteTokens: usage.cacheWrite, + calls: 1, + }; +} + +/** Accumulate one usage record into a model's spend row; the only per-call accumulator. */ +export function addModelSpend(map: Map, provider: string | null, model: string, usage: Usage): void { + const key = spendKey(provider, model); + const existing = map.get(key); + if (existing) { + accumulateSpend(existing, usageDelta(usage)); + return; + } + map.set(key, { key, provider, model, ...usageDelta(usage) }); +} + +/** Whether `skip` already owns this entry. Checks the entry id and the tool-call id: the + * child ledger is keyed by the latter, and a tool result may carry a distinct pi id. An + * empty entry id is never matched, preserving the fallback to the tool-call id. */ +function isClaimed(entry: SessionEntry, skip: ReadonlySet): boolean { + const toolCallId = messageOf(entry)?.toolCallId; + if (entry.id && skip.has(entry.id)) { + return true; + } + return toolCallId !== undefined && skip.has(toolCallId); +} + +/** + * Attribute a branch's usage to models. The run's spend rows are this map plus the child + * ledger and classifier calls. Assistant turns carry provider/model, `usage` entries carry + * provider/model, and model-less usage (compaction and branch summaries) falls into + * {@link UNATTRIBUTED_MODEL} with its tokens. Child-owned tool results are skipped so the + * child ledger is their single owner and a settled child is counted once. + * Entries whose spend identity (the entry id when pi assigned one, else the tool-call id) is + * in `skip` are omitted entirely. The run-scoped scan drops pre-run and already-committed + * entries, and the child ledger claims its tool results, so no entry is counted twice. + */ +export function usageByModel(entries: readonly SessionEntry[], options?: { skip?: ReadonlySet }): Map { + const map = new Map(); + const skip = options?.skip; + for (const entry of entries) { + if (skip && isClaimed(entry, skip)) { + continue; + } + if (entry.type === "message") { + const message = messageOf(entry); + if (!message) { + continue; + } + const usage = message.usage; + if (!usage) { + continue; + } + if (message.role === "assistant") { + addModelSpend(map, message.provider ?? null, message.model ?? UNATTRIBUTED_MODEL, usage); + } else { + const child = message.role === "toolResult" ? message.details?.model : undefined; + addModelSpend(map, message.details?.route?.provider ?? null, child ?? UNATTRIBUTED_MODEL, usage); + } + continue; + } + if (entry.type === "usage") { + addModelSpend(map, entry.provider, entry.model, entry.usage); + continue; + } + if (entry.type === "compaction" || entry.type === "branch_summary") { + if (entry.usage) { + addModelSpend(map, null, UNATTRIBUTED_MODEL, entry.usage); + } + } + } + return map; +} + +/** Count assistant messages in a branch: each is one model round-trip (a "turn"). + * Excludes tool results and child sessions, which are not parent-conversation model turns. */ +export function assistantCount(entries: readonly SessionEntry[]): number { + let count = 0; + for (const entry of entries) { + if (entry.type === "message" && messageOf(entry)?.role === "assistant") { + count += 1; + } + } + return count; +} + +/** Fold spend rows from several sources into one new map; never mutates its inputs. */ +export function mergeModelSpend(...maps: ReadonlyMap[]): Map { + const merged = new Map(); + for (const map of maps) { + for (const spend of map.values()) { + const existing = merged.get(spend.key); + if (!existing) { + merged.set(spend.key, { ...spend }); + continue; + } + accumulateSpend(existing, spend); + } + } + return merged; +} + +/** Total USD of a spend map. The run's cost is always this sum, never a parallel snapshot. */ +export function spendRowsTotal(rows: ReadonlyMap): number { + let total = 0; + for (const row of rows.values()) { + total += row.costUsd; + } + return total; +} + +/** Shape of pi's whole-session `getSessionStats()` totals; only these fields are read. */ +export interface SessionStatsLike { + tokens?: { input?: number; output?: number; cacheRead?: number; cacheWrite?: number; total?: number }; + cost?: number; +} + +// Frozen: a shared mutable zero would corrupt every future aggregate on accidental mutation. +export const ZERO_USAGE: Usage = Object.freeze({ + input: 0, + output: 0, + cacheRead: 0, + cacheWrite: 0, + totalTokens: 0, + cost: Object.freeze({ input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: 0 }), +}); + +export function addUsage(a: Usage, b: Usage): Usage { + return { + input: a.input + b.input, + output: a.output + b.output, + cacheRead: a.cacheRead + b.cacheRead, + cacheWrite: a.cacheWrite + b.cacheWrite, + totalTokens: a.totalTokens + b.totalTokens, + cost: { + input: a.cost.input + b.cost.input, + output: a.cost.output + b.cost.output, + cacheRead: a.cost.cacheRead + b.cost.cacheRead, + cacheWrite: a.cost.cacheWrite + b.cost.cacheWrite, + total: a.cost.total + b.cost.total, + }, + }; +} + +/** Usage carried by one entry: usage entries, summaries, and assistant/tool messages. */ +function usageFromEntry(entry: SessionEntry): Usage | null { + if (entry.type === "usage") { + return entry.usage; + } + if (entry.type === "compaction" || entry.type === "branch_summary") { + return entry.usage ?? null; + } + if (entry.type === "message") { + return messageOf(entry)?.usage ?? null; + } + return null; +} + +export function collectUsage(entries: readonly SessionEntry[]): Usage { + return entries.reduce((acc, entry) => { + const usage = usageFromEntry(entry); + return usage ? addUsage(acc, usage) : acc; + }, ZERO_USAGE); +} + +// Pi exposes whole-session cost as one number; every consumer reads cost.total, +// so the per-component costs stay zero and the total is authoritative. +export function sessionStatsToUsage(stats: SessionStatsLike): Usage { + return { + input: stats.tokens?.input ?? 0, + output: stats.tokens?.output ?? 0, + cacheRead: stats.tokens?.cacheRead ?? 0, + cacheWrite: stats.tokens?.cacheWrite ?? 0, + totalTokens: stats.tokens?.total ?? 0, + cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, total: stats.cost ?? 0 }, + }; +}