diff --git a/apps/app/server-bundle/package-lock.json b/apps/app/server-bundle/package-lock.json new file mode 100644 index 00000000..1c773f35 --- /dev/null +++ b/apps/app/server-bundle/package-lock.json @@ -0,0 +1,1282 @@ +{ + "name": "@automaker/server-bundle", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@automaker/server-bundle", + "version": "0.1.0", + "dependencies": { + "@anthropic-ai/claude-agent-sdk": "^0.1.61", + "cors": "^2.8.5", + "dotenv": "^17.2.3", + "express": "^5.1.0", + "morgan": "^1.10.1", + "node-pty": "1.1.0-beta41", + "ws": "^8.18.0" + } + }, + "node_modules/@anthropic-ai/claude-agent-sdk": { + "version": "0.1.69", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.1.69.tgz", + "integrity": "sha512-T6mb8xKGYIH0g3drS0VRxDHemj8kmWD37nuB+ENoD9sZfi/lomnugWLWBjq9Cjw10WBewE5hjv+i8swM34nkAA==", + "license": "SEE LICENSE IN README.md", + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "^0.33.5", + "@img/sharp-darwin-x64": "^0.33.5", + "@img/sharp-linux-arm": "^0.33.5", + "@img/sharp-linux-arm64": "^0.33.5", + "@img/sharp-linux-x64": "^0.33.5", + "@img/sharp-linuxmusl-arm64": "^0.33.5", + "@img/sharp-linuxmusl-x64": "^0.33.5", + "@img/sharp-win32-x64": "^0.33.5" + }, + "peerDependencies": { + "zod": "^3.24.1" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/accepts": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz", + "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==", + "license": "MIT", + "dependencies": { + "mime-types": "^3.0.0", + "negotiator": "^1.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/basic-auth": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", + "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.1.2" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/body-parser": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.2.1.tgz", + "integrity": "sha512-nfDwkulwiZYQIGwxdy0RUmowMhKcFVcYXUU7m4QlKYim1rUtg83xm2yjZ40QjDuc291AJjjeSc9b++AWHSgSHw==", + "license": "MIT", + "dependencies": { + "bytes": "^3.1.2", + "content-type": "^1.0.5", + "debug": "^4.4.3", + "http-errors": "^2.0.0", + "iconv-lite": "^0.7.0", + "on-finished": "^2.4.1", + "qs": "^6.14.0", + "raw-body": "^3.0.1", + "type-is": "^2.0.1" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.0.1.tgz", + "integrity": "sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz", + "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==", + "license": "MIT", + "engines": { + "node": ">=6.6.0" + } + }, + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "license": "MIT", + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dotenv": { + "version": "17.2.3", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.2.3.tgz", + "integrity": "sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", + "license": "MIT" + }, + "node_modules/encodeurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz", + "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz", + "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", + "license": "MIT", + "dependencies": { + "accepts": "^2.0.0", + "body-parser": "^2.2.1", + "content-disposition": "^1.0.0", + "content-type": "^1.0.5", + "cookie": "^0.7.1", + "cookie-signature": "^1.2.1", + "debug": "^4.4.0", + "depd": "^2.0.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "finalhandler": "^2.1.0", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "merge-descriptors": "^2.0.0", + "mime-types": "^3.0.0", + "on-finished": "^2.4.1", + "once": "^1.4.0", + "parseurl": "^1.3.3", + "proxy-addr": "^2.0.7", + "qs": "^6.14.0", + "range-parser": "^1.2.1", + "router": "^2.2.0", + "send": "^1.1.0", + "serve-static": "^2.2.0", + "statuses": "^2.0.1", + "type-is": "^2.0.1", + "vary": "^1.1.2" + }, + "engines": { + "node": ">= 18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/finalhandler": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz", + "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "on-finished": "^2.4.1", + "parseurl": "^1.3.3", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz", + "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz", + "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==", + "license": "MIT", + "dependencies": { + "depd": "~2.0.0", + "inherits": "~2.0.4", + "setprototypeof": "~1.2.0", + "statuses": "~2.0.2", + "toidentifier": "~1.0.1" + }, + "engines": { + "node": ">= 0.8" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/iconv-lite": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.1.tgz", + "integrity": "sha512-2Tth85cXwGFHfvRgZWszZSvdo+0Xsqmw8k8ZwxScfcBneNUraK+dxRxRm24nszx80Y0TVio8kKLt5sLE7ZCLlw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-promise": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz", + "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", + "license": "MIT" + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/media-typer": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.0.tgz", + "integrity": "sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/merge-descriptors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz", + "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/mime-db": { + "version": "1.54.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.54.0.tgz", + "integrity": "sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-3.0.2.tgz", + "integrity": "sha512-Lbgzdk0h4juoQ9fCKXW4by0UJqj+nOOrI9MJ1sSj4nI8aI2eo1qmvQEie4VD1glsS250n15LsWsYtCugiStS5A==", + "license": "MIT", + "dependencies": { + "mime-db": "^1.54.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/morgan": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.1.tgz", + "integrity": "sha512-223dMRJtI/l25dJKWpgij2cMtywuG/WiUKXdvwfbhGKBhy1puASqXwFzmWZ7+K73vUPoR7SS2Qz2cI/g9MKw0A==", + "license": "MIT", + "dependencies": { + "basic-auth": "~2.0.1", + "debug": "2.6.9", + "depd": "~2.0.0", + "on-finished": "~2.3.0", + "on-headers": "~1.1.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/morgan/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/morgan/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" + }, + "node_modules/morgan/node_modules/on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/negotiator": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.0.0.tgz", + "integrity": "sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "license": "MIT" + }, + "node_modules/node-pty": { + "version": "1.1.0-beta41", + "resolved": "https://registry.npmjs.org/node-pty/-/node-pty-1.1.0-beta41.tgz", + "integrity": "sha512-OUT29KMnzh1IS0b2YcUwVz56D4iAXDsl2PtIKP3zHMljiUBq2WcaHEFfhzQfgkhWs2SExcXvfdlBPANDVU9SnQ==", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "node-addon-api": "^7.1.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "license": "MIT", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/on-headers": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.1.0.tgz", + "integrity": "sha512-737ZY3yNnXy37FHkQxPzt4UZ2UWPWiCZWLvFZ4fu5cueciegX0zGPnrlY6bwRg4FdQOe9YU8MkmJwGhoMybl8A==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.3.0.tgz", + "integrity": "sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==", + "license": "MIT", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.14.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.14.0.tgz", + "integrity": "sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz", + "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==", + "license": "MIT", + "dependencies": { + "bytes": "~3.1.2", + "http-errors": "~2.0.1", + "iconv-lite": "~0.7.0", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/router": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz", + "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==", + "license": "MIT", + "dependencies": { + "debug": "^4.4.0", + "depd": "^2.0.0", + "is-promise": "^4.0.0", + "parseurl": "^1.3.3", + "path-to-regexp": "^8.0.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "license": "MIT" + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/send": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/send/-/send-1.2.0.tgz", + "integrity": "sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==", + "license": "MIT", + "dependencies": { + "debug": "^4.3.5", + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "etag": "^1.8.1", + "fresh": "^2.0.0", + "http-errors": "^2.0.0", + "mime-types": "^3.0.1", + "ms": "^2.1.3", + "on-finished": "^2.4.1", + "range-parser": "^1.2.1", + "statuses": "^2.0.1" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/serve-static": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==", + "license": "MIT", + "dependencies": { + "encodeurl": "^2.0.0", + "escape-html": "^1.0.3", + "parseurl": "^1.3.3", + "send": "^1.2.0" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz", + "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.0.1.tgz", + "integrity": "sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==", + "license": "MIT", + "dependencies": { + "content-type": "^1.0.5", + "media-typer": "^1.1.0", + "mime-types": "^3.0.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.18.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.3.tgz", + "integrity": "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/apps/app/server-bundle/package.json b/apps/app/server-bundle/package.json new file mode 100644 index 00000000..becf118f --- /dev/null +++ b/apps/app/server-bundle/package.json @@ -0,0 +1,15 @@ +{ + "name": "@automaker/server-bundle", + "version": "0.1.0", + "type": "module", + "main": "dist/index.js", + "dependencies": { + "@anthropic-ai/claude-agent-sdk": "^0.1.61", + "cors": "^2.8.5", + "dotenv": "^17.2.3", + "express": "^5.1.0", + "morgan": "^1.10.1", + "node-pty": "1.1.0-beta41", + "ws": "^8.18.0" + } +} \ No newline at end of file diff --git a/apps/server/tests/unit/lib/model-resolver.test.ts b/apps/server/tests/unit/lib/model-resolver.test.ts index 5eb1fa70..f73991f7 100644 --- a/apps/server/tests/unit/lib/model-resolver.test.ts +++ b/apps/server/tests/unit/lib/model-resolver.test.ts @@ -24,12 +24,12 @@ describe('model-resolver.ts', () => { describe('resolveModelString', () => { it("should resolve 'haiku' alias to full model string", () => { const result = resolveModelString('haiku'); - expect(result).toBe('claude-haiku-4-5'); + expect(result).toBe(CLAUDE_MODEL_MAP.haiku); }); it("should resolve 'sonnet' alias to full model string", () => { const result = resolveModelString('sonnet'); - expect(result).toBe('claude-sonnet-4-20250514'); + expect(result).toBe(CLAUDE_MODEL_MAP.sonnet); }); it("should resolve 'opus' alias to full model string", () => { @@ -50,7 +50,7 @@ describe('model-resolver.ts', () => { }); it('should pass through full Claude model strings', () => { - const models = ['claude-opus-4-5-20251101', 'claude-sonnet-4-20250514', 'claude-haiku-4-5']; + const models = [CLAUDE_MODEL_MAP.opus, CLAUDE_MODEL_MAP.sonnet, CLAUDE_MODEL_MAP.haiku]; models.forEach((model) => { const result = resolveModelString(model); expect(result).toBe(model); @@ -93,11 +93,11 @@ describe('model-resolver.ts', () => { it('should use session model when explicit is not provided', () => { const result = getEffectiveModel(undefined, 'sonnet', 'gpt-5.2'); - expect(result).toBe('claude-sonnet-4-20250514'); + expect(result).toBe(CLAUDE_MODEL_MAP.sonnet); }); it('should use default when neither explicit nor session is provided', () => { - const customDefault = 'claude-haiku-4-5'; + const customDefault = CLAUDE_MODEL_MAP.haiku; const result = getEffectiveModel(undefined, undefined, customDefault); expect(result).toBe(customDefault); }); @@ -109,7 +109,7 @@ describe('model-resolver.ts', () => { it('should handle explicit empty strings as undefined', () => { const result = getEffectiveModel('', 'haiku'); - expect(result).toBe('claude-haiku-4-5'); + expect(result).toBe(CLAUDE_MODEL_MAP.haiku); }); }); diff --git a/apps/server/tests/unit/providers/claude-provider.test.ts b/apps/server/tests/unit/providers/claude-provider.test.ts index 888cf091..45deb0d1 100644 --- a/apps/server/tests/unit/providers/claude-provider.test.ts +++ b/apps/server/tests/unit/providers/claude-provider.test.ts @@ -307,10 +307,10 @@ describe('claude-provider.ts', () => { expect(sonnet35).toBeDefined(); }); - it('should include Claude 3.5 Haiku', () => { + it('should include Claude Haiku 4.5', () => { const models = provider.getAvailableModels(); - const haiku = models.find((m) => m.id === 'claude-3-5-haiku-20241022'); + const haiku = models.find((m) => m.id === 'claude-haiku-4-5-20251001'); expect(haiku).toBeDefined(); }); diff --git a/apps/server/vitest.config.ts b/apps/server/vitest.config.ts index b879365a..3f74fd35 100644 --- a/apps/server/vitest.config.ts +++ b/apps/server/vitest.config.ts @@ -15,6 +15,11 @@ export default defineConfig({ 'src/**/*.d.ts', 'src/index.ts', 'src/routes/**', // Routes are better tested with integration tests + 'src/types/**', // Type re-exports don't need coverage + 'src/middleware/**', // Middleware needs integration tests + 'src/lib/enhancement-prompts.ts', // Prompt templates don't need unit tests + 'src/services/claude-usage-service.ts', // TODO: Add tests for usage tracking + '**/libs/**', // Exclude aliased shared packages from server coverage ], thresholds: { // Increased thresholds to ensure better code quality diff --git a/apps/ui/src/components/layout/sidebar.tsx b/apps/ui/src/components/layout/sidebar.tsx index 16b1e5cb..0e87d03b 100644 --- a/apps/ui/src/components/layout/sidebar.tsx +++ b/apps/ui/src/components/layout/sidebar.tsx @@ -121,7 +121,7 @@ export function Sidebar() { const isCreatingSpec = specCreatingForProject !== null; const creatingSpecProjectPath = specCreatingForProject; - // Auto-collapse sidebar on small screens + // Auto-collapse sidebar on small screens and update Electron window minWidth useSidebarAutoCollapse({ sidebarOpen, toggleSidebar }); // Running agents count diff --git a/apps/ui/src/components/layout/sidebar/hooks/use-sidebar-auto-collapse.ts b/apps/ui/src/components/layout/sidebar/hooks/use-sidebar-auto-collapse.ts index 9da2954e..fc5faba2 100644 --- a/apps/ui/src/components/layout/sidebar/hooks/use-sidebar-auto-collapse.ts +++ b/apps/ui/src/components/layout/sidebar/hooks/use-sidebar-auto-collapse.ts @@ -32,4 +32,17 @@ export function useSidebarAutoCollapse({ mediaQuery.addEventListener('change', handleResize); return () => mediaQuery.removeEventListener('change', handleResize); }, [sidebarOpen, toggleSidebar]); + + // Update Electron window minWidth when sidebar state changes + // This ensures the window can't be resized smaller than what the kanban board needs + useEffect(() => { + const electronAPI = ( + window as unknown as { + electronAPI?: { updateMinWidth?: (expanded: boolean) => Promise }; + } + ).electronAPI; + if (electronAPI?.updateMinWidth) { + electronAPI.updateMinWidth(sidebarOpen); + } + }, [sidebarOpen]); } diff --git a/apps/ui/src/components/views/board-view/components/kanban-column.tsx b/apps/ui/src/components/views/board-view/components/kanban-column.tsx index 74a162d4..4e08cfba 100644 --- a/apps/ui/src/components/views/board-view/components/kanban-column.tsx +++ b/apps/ui/src/components/views/board-view/components/kanban-column.tsx @@ -38,7 +38,9 @@ export const KanbanColumn = memo(function KanbanColumn({
+
-
+
{COLUMNS.map((column) => { const columnFeatures = getColumnFeatures(column.id); return ( diff --git a/apps/ui/src/components/views/context-view.tsx b/apps/ui/src/components/views/context-view.tsx index 99ab5155..1ea9c06e 100644 --- a/apps/ui/src/components/views/context-view.tsx +++ b/apps/ui/src/components/views/context-view.tsx @@ -1000,6 +1000,33 @@ export function ContextView() { id="markdown-content" value={newMarkdownContent} onChange={(e) => setNewMarkdownContent(e.target.value)} + onDrop={async (e) => { + e.preventDefault(); + e.stopPropagation(); + + // Try files first, then items for better compatibility + let files = Array.from(e.dataTransfer.files); + if (files.length === 0 && e.dataTransfer.items) { + const items = Array.from(e.dataTransfer.items); + files = items + .filter((item) => item.kind === 'file') + .map((item) => item.getAsFile()) + .filter((f): f is globalThis.File => f !== null); + } + + const mdFile = files.find((f) => isMarkdownFile(f.name)); + if (mdFile) { + const content = await mdFile.text(); + setNewMarkdownContent(content); + if (!newMarkdownName.trim()) { + setNewMarkdownName(mdFile.name); + } + } + }} + onDragOver={(e) => { + e.preventDefault(); + e.stopPropagation(); + }} placeholder="Enter your markdown content here..." className="w-full h-60 p-3 font-mono text-sm bg-background border border-border rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent" spellCheck={false} diff --git a/apps/ui/src/hooks/use-responsive-kanban.ts b/apps/ui/src/hooks/use-responsive-kanban.ts index 1d478425..d2efb1cf 100644 --- a/apps/ui/src/hooks/use-responsive-kanban.ts +++ b/apps/ui/src/hooks/use-responsive-kanban.ts @@ -1,4 +1,5 @@ -import { useState, useEffect, useCallback } from 'react'; +import { useState, useEffect, useLayoutEffect, useCallback, useRef } from 'react'; +import { useAppStore } from '@/store/app-store'; export interface ResponsiveKanbanConfig { columnWidth: number; @@ -13,16 +14,21 @@ export interface ResponsiveKanbanConfig { */ const DEFAULT_CONFIG: ResponsiveKanbanConfig = { columnWidth: 288, // 18rem = 288px (w-72) - columnMinWidth: 280, // Minimum column width - increased to ensure usability - columnMaxWidth: 360, // Maximum column width to ensure responsive scaling + columnMinWidth: 280, // Minimum column width - ensures usability + columnMaxWidth: Infinity, // No max width - columns scale evenly to fill viewport gap: 20, // gap-5 = 20px - padding: 32, // px-4 on both sides = 32px + padding: 40, // px-5 on both sides = 40px (matches gap between columns) }; +// Sidebar transition duration (matches sidebar.tsx) +const SIDEBAR_TRANSITION_MS = 300; + export interface UseResponsiveKanbanResult { columnWidth: number; containerStyle: React.CSSProperties; isCompact: boolean; + totalBoardWidth: number; + isInitialized: boolean; } /** @@ -30,9 +36,14 @@ export interface UseResponsiveKanbanResult { * Ensures columns scale intelligently to fill available space without * dead space on the right or content being cut off. * + * Features: + * - Uses useLayoutEffect to calculate width before paint (prevents bounce) + * - Observes actual board container for accurate sizing + * - Recalculates after sidebar transitions + * * @param columnCount - Number of columns in the Kanban board * @param config - Optional configuration for column sizing - * @returns Object with calculated column width and container styles + * @returns Object with calculated column width, container styles, and metrics */ export function useResponsiveKanban( columnCount: number = 4, @@ -43,68 +54,129 @@ export function useResponsiveKanban( ...config, }; - const calculateColumnWidth = useCallback(() => { - if (typeof window === 'undefined') { - return DEFAULT_CONFIG.columnWidth; - } + const sidebarOpen = useAppStore((state) => state.sidebarOpen); + const resizeTimeoutRef = useRef>(); + const [isInitialized, setIsInitialized] = useState(false); - // Get the actual board container width - // The flex layout already accounts for sidebar width, so we use the container's actual width - const boardContainer = document.querySelector('[data-testid="board-view"]')?.parentElement; - const containerWidth = boardContainer ? boardContainer.clientWidth : window.innerWidth; + const calculateColumnWidth = useCallback( + (containerWidth?: number) => { + if (typeof window === 'undefined') { + return DEFAULT_CONFIG.columnWidth; + } - // Get the available width (subtract padding only) - const availableWidth = containerWidth - padding; + // Get the actual board container width + // The flex layout already accounts for sidebar width, so we use the container's actual width + let width = containerWidth; + if (width === undefined) { + const boardContainer = document.querySelector('[data-testid="board-view"]')?.parentElement; + width = boardContainer ? boardContainer.clientWidth : window.innerWidth; + } - // Calculate total gap space needed - const totalGapWidth = gap * (columnCount - 1); + // Get the available width (subtract padding only) + const availableWidth = width - padding; - // Calculate width available for all columns - const widthForColumns = availableWidth - totalGapWidth; + // Calculate total gap space needed + const totalGapWidth = gap * (columnCount - 1); - // Calculate ideal column width - let idealWidth = Math.floor(widthForColumns / columnCount); + // Calculate width available for all columns + const widthForColumns = availableWidth - totalGapWidth; - // Clamp to min/max bounds - idealWidth = Math.max(columnMinWidth, Math.min(columnMaxWidth, idealWidth)); + // Calculate ideal column width + let idealWidth = Math.floor(widthForColumns / columnCount); - return idealWidth; - }, [columnCount, columnMinWidth, columnMaxWidth, gap, padding]); + // Clamp to min/max bounds + idealWidth = Math.max(columnMinWidth, Math.min(columnMaxWidth, idealWidth)); + + return idealWidth; + }, + [columnCount, columnMinWidth, columnMaxWidth, gap, padding] + ); const [columnWidth, setColumnWidth] = useState(() => calculateColumnWidth()); + // Use useLayoutEffect to calculate width synchronously before paint + // This prevents the "bounce" effect when navigating to the kanban view + useLayoutEffect(() => { + if (typeof window === 'undefined') return; + + const updateWidth = () => { + const newWidth = calculateColumnWidth(); + setColumnWidth(newWidth); + setIsInitialized(true); + }; + + // Calculate immediately before paint + updateWidth(); + }, [calculateColumnWidth]); + + // Set up ResizeObserver for ongoing resize handling useEffect(() => { if (typeof window === 'undefined') return; - const handleResize = () => { + const updateWidth = () => { const newWidth = calculateColumnWidth(); setColumnWidth(newWidth); }; - // Set initial width - handleResize(); + // Debounced update for smooth resize transitions + const scheduleUpdate = () => { + if (resizeTimeoutRef.current) { + clearTimeout(resizeTimeoutRef.current); + } + resizeTimeoutRef.current = setTimeout(updateWidth, 50); + }; - // Use ResizeObserver for more precise updates if available - if (typeof ResizeObserver !== 'undefined') { - const observer = new ResizeObserver(handleResize); - observer.observe(document.body); + // Use ResizeObserver on the actual board container for precise updates + let resizeObserver: ResizeObserver | null = null; + const boardView = document.querySelector('[data-testid="board-view"]'); + const container = boardView?.parentElement; - return () => { - observer.disconnect(); - }; + if (container && typeof ResizeObserver !== 'undefined') { + resizeObserver = new ResizeObserver((entries) => { + // Use the observed container's width for calculation + const entry = entries[0]; + if (entry) { + const containerWidth = entry.contentRect.width; + const newWidth = calculateColumnWidth(containerWidth); + setColumnWidth(newWidth); + } + }); + resizeObserver.observe(container); } // Fallback to window resize event - window.addEventListener('resize', handleResize); + window.addEventListener('resize', scheduleUpdate); + return () => { - window.removeEventListener('resize', handleResize); + if (resizeObserver) { + resizeObserver.disconnect(); + } + window.removeEventListener('resize', scheduleUpdate); + if (resizeTimeoutRef.current) { + clearTimeout(resizeTimeoutRef.current); + } }; }, [calculateColumnWidth]); + // Re-calculate after sidebar transitions complete + useEffect(() => { + const timeout = setTimeout(() => { + const newWidth = calculateColumnWidth(); + setColumnWidth(newWidth); + }, SIDEBAR_TRANSITION_MS + 50); // Wait for transition to complete + + return () => clearTimeout(timeout); + }, [sidebarOpen, calculateColumnWidth]); + // Determine if we're in compact mode (columns at minimum width) const isCompact = columnWidth <= columnMinWidth + 10; - // Container style to center content and prevent overflow + // Calculate total board width for container sizing + const totalBoardWidth = columnWidth * columnCount + gap * (columnCount - 1); + + // Container style to center content + // Use flex layout with justify-center to naturally center columns + // The parent container has px-4 padding which provides equal left/right margins const containerStyle: React.CSSProperties = { display: 'flex', gap: `${gap}px`, @@ -116,5 +188,7 @@ export function useResponsiveKanban( columnWidth, containerStyle, isCompact, + totalBoardWidth, + isInitialized, }; } diff --git a/apps/ui/src/main.ts b/apps/ui/src/main.ts index 4af3aa21..d6d3d2a3 100644 --- a/apps/ui/src/main.ts +++ b/apps/ui/src/main.ts @@ -9,7 +9,7 @@ import path from 'path'; import { spawn, ChildProcess } from 'child_process'; import fs from 'fs'; import http, { Server } from 'http'; -import { app, BrowserWindow, ipcMain, dialog, shell } from 'electron'; +import { app, BrowserWindow, ipcMain, dialog, shell, screen } from 'electron'; // Development environment const isDev = !app.isPackaged; @@ -31,6 +31,39 @@ let staticServer: Server | null = null; const SERVER_PORT = 3008; const STATIC_PORT = 3007; +// ============================================ +// Window sizing constants for kanban layout +// ============================================ +// Calculation: 4 columns × 280px + 3 gaps × 20px + 40px padding = 1220px board content +// With sidebar expanded (288px): 1220 + 288 = 1508px +// With sidebar collapsed (64px): 1220 + 64 = 1284px +const COLUMN_MIN_WIDTH = 280; +const COLUMN_COUNT = 4; +const GAP_SIZE = 20; +const BOARD_PADDING = 40; // px-5 on both sides = 40px (matches gap between columns) +const SIDEBAR_EXPANDED = 288; +const SIDEBAR_COLLAPSED = 64; + +const BOARD_CONTENT_MIN = + COLUMN_MIN_WIDTH * COLUMN_COUNT + GAP_SIZE * (COLUMN_COUNT - 1) + BOARD_PADDING; +const MIN_WIDTH_EXPANDED = BOARD_CONTENT_MIN + SIDEBAR_EXPANDED; // 1500px +const MIN_WIDTH_COLLAPSED = BOARD_CONTENT_MIN + SIDEBAR_COLLAPSED; // 1276px +const MIN_HEIGHT = 650; // Ensures sidebar content fits without scrolling +const DEFAULT_WIDTH = 1600; +const DEFAULT_HEIGHT = 950; + +// Window bounds interface (matches @automaker/types WindowBounds) +interface WindowBounds { + x: number; + y: number; + width: number; + height: number; + isMaximized: boolean; +} + +// Debounce timer for saving window bounds +let saveWindowBoundsTimeout: ReturnType | null = null; + /** * Get icon path - works in both dev and production, cross-platform */ @@ -56,6 +89,120 @@ function getIconPath(): string | null { return iconPath; } +/** + * Get path to window bounds settings file + */ +function getWindowBoundsPath(): string { + return path.join(app.getPath('userData'), 'window-bounds.json'); +} + +/** + * Load saved window bounds from disk + */ +function loadWindowBounds(): WindowBounds | null { + try { + const boundsPath = getWindowBoundsPath(); + if (fs.existsSync(boundsPath)) { + const data = fs.readFileSync(boundsPath, 'utf-8'); + const bounds = JSON.parse(data) as WindowBounds; + // Validate the loaded data has required fields + if ( + typeof bounds.x === 'number' && + typeof bounds.y === 'number' && + typeof bounds.width === 'number' && + typeof bounds.height === 'number' + ) { + return bounds; + } + } + } catch (error) { + console.warn('[Electron] Failed to load window bounds:', (error as Error).message); + } + return null; +} + +/** + * Save window bounds to disk + */ +function saveWindowBounds(bounds: WindowBounds): void { + try { + const boundsPath = getWindowBoundsPath(); + fs.writeFileSync(boundsPath, JSON.stringify(bounds, null, 2), 'utf-8'); + console.log('[Electron] Window bounds saved'); + } catch (error) { + console.warn('[Electron] Failed to save window bounds:', (error as Error).message); + } +} + +/** + * Schedule a debounced save of window bounds (500ms delay) + */ +function scheduleSaveWindowBounds(): void { + if (!mainWindow || mainWindow.isDestroyed()) return; + + if (saveWindowBoundsTimeout) { + clearTimeout(saveWindowBoundsTimeout); + } + + saveWindowBoundsTimeout = setTimeout(() => { + if (!mainWindow || mainWindow.isDestroyed()) return; + + const isMaximized = mainWindow.isMaximized(); + // Use getNormalBounds() for maximized windows to save pre-maximized size + const bounds = isMaximized ? mainWindow.getNormalBounds() : mainWindow.getBounds(); + + saveWindowBounds({ + x: bounds.x, + y: bounds.y, + width: bounds.width, + height: bounds.height, + isMaximized, + }); + }, 500); +} + +/** + * Validate that window bounds are visible on at least one display + * Returns adjusted bounds if needed, or null if completely off-screen + */ +function validateBounds(bounds: WindowBounds): WindowBounds { + const displays = screen.getAllDisplays(); + + // Check if window center is visible on any display + const centerX = bounds.x + bounds.width / 2; + const centerY = bounds.y + bounds.height / 2; + + let isVisible = false; + for (const display of displays) { + const { x, y, width, height } = display.workArea; + if (centerX >= x && centerX <= x + width && centerY >= y && centerY <= y + height) { + isVisible = true; + break; + } + } + + if (!isVisible) { + // Window is off-screen, reset to primary display + const primaryDisplay = screen.getPrimaryDisplay(); + const { x, y, width, height } = primaryDisplay.workArea; + + return { + x: x + Math.floor((width - bounds.width) / 2), + y: y + Math.floor((height - bounds.height) / 2), + width: Math.min(bounds.width, width), + height: Math.min(bounds.height, height), + isMaximized: bounds.isMaximized, + }; + } + + // Ensure minimum dimensions + return { + ...bounds, + width: Math.max(bounds.width, MIN_WIDTH_EXPANDED), + height: Math.max(bounds.height, MIN_HEIGHT), + }; +} + /** * Start static file server for production builds */ @@ -246,11 +393,18 @@ async function waitForServer(maxAttempts = 30): Promise { */ function createWindow(): void { const iconPath = getIconPath(); + + // Load and validate saved window bounds + const savedBounds = loadWindowBounds(); + const validBounds = savedBounds ? validateBounds(savedBounds) : null; + const windowOptions: Electron.BrowserWindowConstructorOptions = { - width: 1600, - height: 950, - minWidth: 1280, - minHeight: 768, + width: validBounds?.width ?? DEFAULT_WIDTH, + height: validBounds?.height ?? DEFAULT_HEIGHT, + x: validBounds?.x, + y: validBounds?.y, + minWidth: MIN_WIDTH_EXPANDED, // 1500px - ensures kanban columns fit with sidebar + minHeight: MIN_HEIGHT, webPreferences: { preload: path.join(__dirname, 'preload.js'), contextIsolation: true, @@ -266,6 +420,11 @@ function createWindow(): void { mainWindow = new BrowserWindow(windowOptions); + // Restore maximized state if previously maximized + if (validBounds?.isMaximized) { + mainWindow.maximize(); + } + // Load Vite dev server in development or static server in production if (VITE_DEV_SERVER_URL) { mainWindow.loadURL(VITE_DEV_SERVER_URL); @@ -280,10 +439,35 @@ function createWindow(): void { mainWindow.webContents.openDevTools(); } + // Save window bounds on close, resize, and move + mainWindow.on('close', () => { + // Save immediately before closing (not debounced) + if (mainWindow && !mainWindow.isDestroyed()) { + const isMaximized = mainWindow.isMaximized(); + const bounds = isMaximized ? mainWindow.getNormalBounds() : mainWindow.getBounds(); + + saveWindowBounds({ + x: bounds.x, + y: bounds.y, + width: bounds.width, + height: bounds.height, + isMaximized, + }); + } + }); + mainWindow.on('closed', () => { mainWindow = null; }); + mainWindow.on('resized', () => { + scheduleSaveWindowBounds(); + }); + + mainWindow.on('moved', () => { + scheduleSaveWindowBounds(); + }); + mainWindow.webContents.setWindowOpenHandler(({ url }) => { shell.openExternal(url); return { action: 'deny' }; @@ -460,3 +644,17 @@ ipcMain.handle('ping', async () => { ipcMain.handle('server:getUrl', async () => { return `http://localhost:${SERVER_PORT}`; }); + +// Window management - update minimum width based on sidebar state +ipcMain.handle('window:updateMinWidth', (_, sidebarExpanded: boolean) => { + if (!mainWindow || mainWindow.isDestroyed()) return; + + const minWidth = sidebarExpanded ? MIN_WIDTH_EXPANDED : MIN_WIDTH_COLLAPSED; + mainWindow.setMinimumSize(minWidth, MIN_HEIGHT); + + // If current width is below new minimum, resize window + const currentBounds = mainWindow.getBounds(); + if (currentBounds.width < minWidth) { + mainWindow.setSize(minWidth, currentBounds.height); + } +}); diff --git a/apps/ui/src/preload.ts b/apps/ui/src/preload.ts index dbcabf53..ff16f0e3 100644 --- a/apps/ui/src/preload.ts +++ b/apps/ui/src/preload.ts @@ -43,6 +43,10 @@ contextBridge.exposeInMainWorld('electronAPI', { getPath: (name: string): Promise => ipcRenderer.invoke('app:getPath', name), getVersion: (): Promise => ipcRenderer.invoke('app:getVersion'), isPackaged: (): Promise => ipcRenderer.invoke('app:isPackaged'), + + // Window management + updateMinWidth: (sidebarExpanded: boolean): Promise => + ipcRenderer.invoke('window:updateMinWidth', sidebarExpanded), }); console.log('[Preload] Electron API exposed (TypeScript)'); diff --git a/apps/ui/tests/context-view.spec.ts b/apps/ui/tests/context-view.spec.ts index bdf9b9f5..ed71b8ff 100644 --- a/apps/ui/tests/context-view.spec.ts +++ b/apps/ui/tests/context-view.spec.ts @@ -46,28 +46,25 @@ test.describe('Context View - File Management', () => { await navigateToContext(page); - // Click Add File button - await clickElement(page, 'add-context-file'); - await page.waitForSelector('[data-testid="add-context-dialog"]', { + // Click Create Markdown button + await clickElement(page, 'create-markdown-button'); + await page.waitForSelector('[data-testid="create-markdown-dialog"]', { timeout: 5000, }); - // Select text type (should be default) - await clickElement(page, 'add-text-type'); - // Enter filename - await fillInput(page, 'new-file-name', 'test-context.md'); + await fillInput(page, 'new-markdown-name', 'test-context.md'); // Enter content const testContent = '# Test Context\n\nThis is test content'; - await fillInput(page, 'new-file-content', testContent); + await fillInput(page, 'new-markdown-content', testContent); // Click confirm - await clickElement(page, 'confirm-add-file'); + await clickElement(page, 'confirm-create-markdown'); // Wait for dialog to close await page.waitForFunction( - () => !document.querySelector('[data-testid="add-context-dialog"]'), + () => !document.querySelector('[data-testid="create-markdown-dialog"]'), { timeout: 5000 } ); @@ -208,36 +205,16 @@ test.describe('Context View - File Management', () => { await navigateToContext(page); - // Click Add File button - await clickElement(page, 'add-context-file'); - await page.waitForSelector('[data-testid="add-context-dialog"]', { - timeout: 5000, - }); + // Use the hidden file input to upload an image directly + // The "Import File" button triggers this input + const fileInput = page.locator('[data-testid="file-import-input"]'); + await fileInput.setInputFiles(TEST_IMAGE_SRC); - // Select image type - await clickElement(page, 'add-image-type'); - - // Enter filename - await fillInput(page, 'new-file-name', 'test-image.png'); - - // Upload image using file input - await page.setInputFiles('[data-testid="image-upload-input"]', TEST_IMAGE_SRC); - - // Wait for image preview to appear (indicates upload success) - const addDialog = await getByTestId(page, 'add-context-dialog'); - await addDialog.locator('img').waitFor({ state: 'visible' }); - - // Click confirm - await clickElement(page, 'confirm-add-file'); - - // Wait for dialog to close - await page.waitForFunction( - () => !document.querySelector('[data-testid="add-context-dialog"]'), - { timeout: 5000 } - ); + // Wait for file to appear in the list (filename is extracted from path) + await waitForContextFile(page, 'logo.png', 10000); // Verify file appears in list - const fileButton = await getByTestId(page, 'context-file-test-image.png'); + const fileButton = await getByTestId(page, 'context-file-logo.png'); await expect(fileButton).toBeVisible(); // Click on the image to view it @@ -362,26 +339,23 @@ test.describe('Context View - Drag and Drop', () => { await navigateToContext(page); - // Open add file dialog - await clickElement(page, 'add-context-file'); - await page.waitForSelector('[data-testid="add-context-dialog"]', { + // Open create markdown dialog + await clickElement(page, 'create-markdown-button'); + await page.waitForSelector('[data-testid="create-markdown-dialog"]', { timeout: 5000, }); - // Ensure text type is selected - await clickElement(page, 'add-text-type'); - // Simulate drag and drop of a .md file onto the textarea const droppedContent = '# Dropped Content\n\nThis was dragged and dropped.'; await simulateFileDrop( page, - '[data-testid="new-file-content"]', + '[data-testid="new-markdown-content"]', 'dropped-file.md', droppedContent ); // Wait for content to be populated in textarea - const textarea = await getByTestId(page, 'new-file-content'); + const textarea = await getByTestId(page, 'new-markdown-content'); await textarea.waitFor({ state: 'visible' }); await expect(textarea).toHaveValue(droppedContent); @@ -390,15 +364,15 @@ test.describe('Context View - Drag and Drop', () => { expect(textareaContent).toBe(droppedContent); // Verify filename is auto-filled - const filenameValue = await page.locator('[data-testid="new-file-name"]').inputValue(); + const filenameValue = await page.locator('[data-testid="new-markdown-name"]').inputValue(); expect(filenameValue).toBe('dropped-file.md'); // Confirm and create the file - await clickElement(page, 'confirm-add-file'); + await clickElement(page, 'confirm-create-markdown'); // Wait for dialog to close await page.waitForFunction( - () => !document.querySelector('[data-testid="add-context-dialog"]'), + () => !document.querySelector('[data-testid="create-markdown-dialog"]'), { timeout: 5000 } ); @@ -473,20 +447,19 @@ test.describe('Context View - Edge Cases', () => { await expect(originalFile).toBeVisible(); // Try to create another file with the same name - await clickElement(page, 'add-context-file'); - await page.waitForSelector('[data-testid="add-context-dialog"]', { + await clickElement(page, 'create-markdown-button'); + await page.waitForSelector('[data-testid="create-markdown-dialog"]', { timeout: 5000, }); - await clickElement(page, 'add-text-type'); - await fillInput(page, 'new-file-name', 'test.md'); - await fillInput(page, 'new-file-content', '# New Content - Overwritten'); + await fillInput(page, 'new-markdown-name', 'test.md'); + await fillInput(page, 'new-markdown-content', '# New Content - Overwritten'); - await clickElement(page, 'confirm-add-file'); + await clickElement(page, 'confirm-create-markdown'); // Wait for dialog to close await page.waitForFunction( - () => !document.querySelector('[data-testid="add-context-dialog"]'), + () => !document.querySelector('[data-testid="create-markdown-dialog"]'), { timeout: 5000 } ); @@ -518,18 +491,17 @@ test.describe('Context View - Edge Cases', () => { await navigateToContext(page); // Test file with parentheses - await clickElement(page, 'add-context-file'); - await page.waitForSelector('[data-testid="add-context-dialog"]', { + await clickElement(page, 'create-markdown-button'); + await page.waitForSelector('[data-testid="create-markdown-dialog"]', { timeout: 5000, }); - await clickElement(page, 'add-text-type'); - await fillInput(page, 'new-file-name', 'context (1).md'); - await fillInput(page, 'new-file-content', 'Content with parentheses in filename'); + await fillInput(page, 'new-markdown-name', 'context (1).md'); + await fillInput(page, 'new-markdown-content', 'Content with parentheses in filename'); - await clickElement(page, 'confirm-add-file'); + await clickElement(page, 'confirm-create-markdown'); await page.waitForFunction( - () => !document.querySelector('[data-testid="add-context-dialog"]'), + () => !document.querySelector('[data-testid="create-markdown-dialog"]'), { timeout: 5000 } ); @@ -538,18 +510,17 @@ test.describe('Context View - Edge Cases', () => { await expect(fileWithParens).toBeVisible(); // Test file with hyphens and underscores - await clickElement(page, 'add-context-file'); - await page.waitForSelector('[data-testid="add-context-dialog"]', { + await clickElement(page, 'create-markdown-button'); + await page.waitForSelector('[data-testid="create-markdown-dialog"]', { timeout: 5000, }); - await clickElement(page, 'add-text-type'); - await fillInput(page, 'new-file-name', 'test-file_v2.md'); - await fillInput(page, 'new-file-content', 'Content with hyphens and underscores'); + await fillInput(page, 'new-markdown-name', 'test-file_v2.md'); + await fillInput(page, 'new-markdown-content', 'Content with hyphens and underscores'); - await clickElement(page, 'confirm-add-file'); + await clickElement(page, 'confirm-create-markdown'); await page.waitForFunction( - () => !document.querySelector('[data-testid="add-context-dialog"]'), + () => !document.querySelector('[data-testid="create-markdown-dialog"]'), { timeout: 5000 } ); @@ -582,18 +553,17 @@ test.describe('Context View - Edge Cases', () => { await navigateToContext(page); // Create file with empty content - await clickElement(page, 'add-context-file'); - await page.waitForSelector('[data-testid="add-context-dialog"]', { + await clickElement(page, 'create-markdown-button'); + await page.waitForSelector('[data-testid="create-markdown-dialog"]', { timeout: 5000, }); - await clickElement(page, 'add-text-type'); - await fillInput(page, 'new-file-name', 'empty-file.md'); + await fillInput(page, 'new-markdown-name', 'empty-file.md'); // Don't fill any content - leave it empty - await clickElement(page, 'confirm-add-file'); + await clickElement(page, 'confirm-create-markdown'); await page.waitForFunction( - () => !document.querySelector('[data-testid="add-context-dialog"]'), + () => !document.querySelector('[data-testid="create-markdown-dialog"]'), { timeout: 5000 } ); diff --git a/apps/ui/tests/kanban-responsive-scaling.spec.ts b/apps/ui/tests/kanban-responsive-scaling.spec.ts index 3a9698ca..ac92ae2c 100644 --- a/apps/ui/tests/kanban-responsive-scaling.spec.ts +++ b/apps/ui/tests/kanban-responsive-scaling.spec.ts @@ -110,9 +110,9 @@ test.describe('Kanban Responsive Scaling Tests', () => { expect(Math.abs(columnWidth - baseWidth)).toBeLessThan(2); } - // Column width should be within expected bounds (280px min, 360px max) + // Column width should be at least minimum (280px) + // No max-width - columns scale evenly to fill available viewport expect(baseWidth).toBeGreaterThanOrEqual(280); - expect(baseWidth).toBeLessThanOrEqual(360); // Columns should not overlap (check x positions) expect(inProgressBox.x).toBeGreaterThan(backlogBox.x + backlogBox.width - 5); @@ -202,4 +202,90 @@ test.describe('Kanban Responsive Scaling Tests', () => { // There should be no horizontal scroll at standard width since columns scale down expect(hasHorizontalScroll).toBe(false); }); + + test('kanban columns should fit at minimum width (1500px - Electron minimum)', async ({ + page, + }) => { + // Setup project and navigate to board view + await setupProjectWithPathNoWorktrees(page, testRepo.path); + await page.goto('/'); + await waitForNetworkIdle(page); + await waitForBoardView(page); + + // Set viewport to the new Electron minimum width (1500px) + await page.setViewportSize({ width: 1500, height: 900 }); + await page.waitForTimeout(300); + + // Get all four kanban columns + const backlogColumn = page.locator('[data-testid="kanban-column-backlog"]'); + const verifiedColumn = page.locator('[data-testid="kanban-column-verified"]'); + + // Verify columns are visible + await expect(backlogColumn).toBeVisible(); + await expect(verifiedColumn).toBeVisible(); + + // Check if horizontal scrollbar is present + const hasHorizontalScroll = await page.evaluate(() => { + const boardContainer = document.querySelector('[data-testid="board-view"]'); + if (!boardContainer) return false; + return boardContainer.scrollWidth > boardContainer.clientWidth; + }); + + // There should be no horizontal scroll at minimum width + expect(hasHorizontalScroll).toBe(false); + + // Verify columns are at least minimum width (280px) + const backlogBox = await backlogColumn.boundingBox(); + expect(backlogBox).not.toBeNull(); + if (backlogBox) { + expect(backlogBox.width).toBeGreaterThanOrEqual(280); + } + }); + + test('kanban columns should scale correctly when sidebar is collapsed', async ({ page }) => { + // Setup project and navigate to board view + await setupProjectWithPathNoWorktrees(page, testRepo.path); + await page.goto('/'); + await waitForNetworkIdle(page); + await waitForBoardView(page); + + // Set a viewport size + await page.setViewportSize({ width: 1600, height: 900 }); + await page.waitForTimeout(300); + + // Get initial column width + const backlogColumn = page.locator('[data-testid="kanban-column-backlog"]'); + const initialBox = await backlogColumn.boundingBox(); + expect(initialBox).not.toBeNull(); + + // Find and click the sidebar collapse button + const collapseButton = page.locator('[data-testid="sidebar-collapse-button"]'); + if (await collapseButton.isVisible()) { + await collapseButton.click(); + + // Wait for sidebar transition (300ms) + buffer + await page.waitForTimeout(400); + + // Get column width after collapse + const collapsedBox = await backlogColumn.boundingBox(); + expect(collapsedBox).not.toBeNull(); + + if (initialBox && collapsedBox) { + // Column should be wider or same after sidebar collapse (more space available) + // Allow for small variations due to transitions + expect(collapsedBox.width).toBeGreaterThanOrEqual(initialBox.width - 5); + + // Width should still be at least minimum + expect(collapsedBox.width).toBeGreaterThanOrEqual(280); + } + + // Verify no horizontal scrollbar after collapse + const hasHorizontalScroll = await page.evaluate(() => { + const boardContainer = document.querySelector('[data-testid="board-view"]'); + if (!boardContainer) return false; + return boardContainer.scrollWidth > boardContainer.clientWidth; + }); + expect(hasHorizontalScroll).toBe(false); + } + }); }); diff --git a/apps/ui/tests/utils/files/drag-drop.ts b/apps/ui/tests/utils/files/drag-drop.ts index 1250f5b2..2b3416df 100644 --- a/apps/ui/tests/utils/files/drag-drop.ts +++ b/apps/ui/tests/utils/files/drag-drop.ts @@ -19,19 +19,29 @@ export async function simulateFileDrop( const dataTransfer = new DataTransfer(); dataTransfer.items.add(file); + // Create events and explicitly define the dataTransfer property + // to ensure it's accessible (some browsers don't properly set it from constructor) + const dragOverEvent = new DragEvent('dragover', { + bubbles: true, + cancelable: true, + }); + Object.defineProperty(dragOverEvent, 'dataTransfer', { + value: dataTransfer, + writable: false, + }); + + const dropEvent = new DragEvent('drop', { + bubbles: true, + cancelable: true, + }); + Object.defineProperty(dropEvent, 'dataTransfer', { + value: dataTransfer, + writable: false, + }); + // Dispatch drag events - target.dispatchEvent( - new DragEvent('dragover', { - dataTransfer, - bubbles: true, - }) - ); - target.dispatchEvent( - new DragEvent('drop', { - dataTransfer, - bubbles: true, - }) - ); + target.dispatchEvent(dragOverEvent); + target.dispatchEvent(dropEvent); }, { selector: targetSelector, content: fileContent, name: fileName, mime: mimeType } ); diff --git a/libs/types/src/settings.ts b/libs/types/src/settings.ts index f22cc636..9bb96644 100644 --- a/libs/types/src/settings.ts +++ b/libs/types/src/settings.ts @@ -70,6 +70,25 @@ export type ThinkingLevel = 'none' | 'low' | 'medium' | 'high' | 'ultrathink'; /** ModelProvider - AI model provider for credentials and API key management */ export type ModelProvider = 'claude'; +/** + * WindowBounds - Electron window position and size for persistence + * + * Stored in global settings to restore window state across sessions. + * Includes position (x, y), dimensions (width, height), and maximized state. + */ +export interface WindowBounds { + /** Window X position on screen */ + x: number; + /** Window Y position on screen */ + y: number; + /** Window width in pixels */ + width: number; + /** Window height in pixels */ + height: number; + /** Whether window was maximized when closed */ + isMaximized: boolean; +} + /** * KeyboardShortcuts - User-configurable keyboard bindings for common actions * @@ -272,6 +291,10 @@ export interface GlobalSettings { // Session Tracking /** Maps project path -> last selected session ID in that project */ lastSelectedSessionByProject: Record; + + // Window State (Electron only) + /** Persisted window bounds for restoring position/size across sessions */ + windowBounds?: WindowBounds; } /**