diff --git a/package.json b/package.json index 4c1f5f3..746b71d 100644 --- a/package.json +++ b/package.json @@ -31,11 +31,12 @@ ], "license": "ISC", "dependencies": { - "@abearxiong/router": "0.0.1-alpha.33", + "@abearxiong/router": "0.0.1-alpha.34", "@abearxiong/use-config": "^0.0.2", "@babel/core": "^7.25.2", "@babel/preset-env": "^7.25.4", "@babel/preset-typescript": "^7.24.7", + "@kevisual/ai-graph": "workspace:^", "@types/semver": "^7.5.8", "dayjs": "^1.11.13", "dts-bundle-generator": "^9.5.1", @@ -45,6 +46,9 @@ "lodash-es": "^4.17.21", "minio": "^8.0.1", "nanoid": "^5.0.7", + "neo4j-driver": "^5.24.1", + "neode": "^0.4.9", + "ollama": "^0.5.9", "pg": "^8.13.0", "semver": "^7.6.3", "sequelize": "^6.37.3", @@ -58,9 +62,10 @@ "@types/jest": "^29.5.13", "@types/jsonwebtoken": "^9.0.7", "@types/lodash-es": "^4.17.12", - "@types/node": "^22.5.5", + "@types/node": "^22.6.1", "@types/superagent": "^8.1.9", "@types/supertest": "^6.0.2", + "@types/uuid": "^10.0.0", "@types/webpack-env": "^1.18.5", "concurrently": "^9.0.1", "copy-webpack-plugin": "^12.0.2", @@ -79,5 +84,10 @@ "webpack-cli": "^5.1.4", "webpack-node-externals": "^3.0.0" }, + "resolutions": { + "glob": "latest", + "inflight": "latest", + "rimraf": "latest" + }, "pnpm": {} } \ No newline at end of file diff --git a/packages/ai-graph b/packages/ai-graph index 492d1b0..d1e2306 160000 --- a/packages/ai-graph +++ b/packages/ai-graph @@ -1 +1 @@ -Subproject commit 492d1b0e7ccfce266caa5ea38d6cc8162e4ef11f +Subproject commit d1e2306233fde79b510dec614a95f867d686243d diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 74439c2..19722e2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,13 +4,18 @@ settings: autoInstallPeers: true excludeLinksFromLockfile: false +overrides: + glob: latest + inflight: latest + rimraf: latest + importers: .: dependencies: '@abearxiong/router': - specifier: 0.0.1-alpha.33 - version: 0.0.1-alpha.33 + specifier: 0.0.1-alpha.34 + version: 0.0.1-alpha.34 '@abearxiong/use-config': specifier: ^0.0.2 version: 0.0.2 @@ -23,6 +28,9 @@ importers: '@babel/preset-typescript': specifier: ^7.24.7 version: 7.24.7(@babel/core@7.25.2) + '@kevisual/ai-graph': + specifier: workspace:^ + version: link:packages/ai-graph '@types/semver': specifier: ^7.5.8 version: 7.5.8 @@ -50,6 +58,15 @@ importers: nanoid: specifier: ^5.0.7 version: 5.0.7 + neo4j-driver: + specifier: ^5.24.1 + version: 5.24.1 + neode: + specifier: ^0.4.9 + version: 0.4.9 + ollama: + specifier: ^0.5.9 + version: 0.5.9 pg: specifier: ^8.13.0 version: 8.13.0 @@ -85,14 +102,17 @@ importers: specifier: ^4.17.12 version: 4.17.12 '@types/node': - specifier: ^22.5.5 - version: 22.5.5 + specifier: ^22.6.1 + version: 22.6.1 '@types/superagent': specifier: ^8.1.9 version: 8.1.9 '@types/supertest': specifier: ^6.0.2 version: 6.0.2 + '@types/uuid': + specifier: ^10.0.0 + version: 10.0.0 '@types/webpack-env': specifier: ^1.18.5 version: 1.18.5 @@ -110,7 +130,7 @@ importers: version: 9.0.2(typescript@5.6.2)(webpack@5.94.0(webpack-cli@5.1.4)) jest: specifier: ^29.7.0 - version: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + version: 29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) nodemon: specifier: ^3.1.7 version: 3.1.7 @@ -125,13 +145,13 @@ importers: version: 7.0.0 ts-jest: specifier: ^29.2.5 - version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)))(typescript@5.6.2) + version: 29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)))(typescript@5.6.2) ts-loader: specifier: ^9.5.1 version: 9.5.1(typescript@5.6.2)(webpack@5.94.0(webpack-cli@5.1.4)) ts-node: specifier: ^10.9.2 - version: 10.9.2(@types/node@22.5.5)(typescript@5.6.2) + version: 10.9.2(@types/node@22.6.1)(typescript@5.6.2) typescript: specifier: ^5.6.2 version: 5.6.2 @@ -145,10 +165,16 @@ importers: specifier: ^3.0.0 version: 3.0.0 + packages/ai-graph: + dependencies: + ollama: + specifier: ^0.5.9 + version: 0.5.9 + packages: - '@abearxiong/router@0.0.1-alpha.33': - resolution: {integrity: sha512-e2ownDhKsRfyjeuxtuThkRWys7cMLN3aLNdMOZKY3XVy2CYy1dZNzI1Mg3z2OY/hdmBtwovASUwJd1peRDPiiQ==, tarball: https://npm.pkg.github.com/download/@abearxiong/router/0.0.1-alpha.33/a36a6d5b5a4d0b28094854a048c438f274a82e47} + '@abearxiong/router@0.0.1-alpha.34': + resolution: {integrity: sha512-gvW+XmSfkG2pJzUPGb6Mlo54EL44Hd1vXRnDCw5yZ6RxUnPxvD1hjYT9RezBCy6xxQmeceHdikP3OyhxQEBgYA==, tarball: https://npm.pkg.github.com/download/@abearxiong/router/0.0.1-alpha.34/99fe7cfefd3b92b6bf37d2abc5289699efefeea6} '@abearxiong/use-config@0.0.2': resolution: {integrity: sha512-IBOmeP46ykbDlkplFS65UsAHjyPDKnvS2oqbkpLWhbSwDbF5zhBnD4ibsFZKPCyc3lMlPeRqYva4x6puX3E/qQ==, tarball: https://npm.pkg.github.com/download/@abearxiong/use-config/0.0.2/59fbeec8c8e086ec48e55024fe39020b079e6fa5} @@ -769,9 +795,33 @@ packages: resolution: {integrity: sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==} engines: {node: '>=10.0.0'} + '@hapi/address@2.1.4': + resolution: {integrity: sha512-QD1PhQk+s31P1ixsX0H0Suoupp3VMXzIVMSwobR3F3MSUO2YCV0B7xqLcUw/Bh8yuvd3LhpyqLQWTNcRmp6IdQ==} + deprecated: Moved to 'npm install @sideway/address' + + '@hapi/bourne@1.3.2': + resolution: {integrity: sha512-1dVNHT76Uu5N3eJNTYcvxee+jzX4Z9lfciqRRHCU27ihbUcYi+iSc2iml5Ke1LXe1SyJCLA0+14Jh4tXJgOppA==} + deprecated: This version has been deprecated and is no longer supported or maintained + + '@hapi/hoek@8.5.1': + resolution: {integrity: sha512-yN7kbciD87WzLGc5539Tn0sApjyiGHAJgKvG9W8C7O+6c7qmoQMfVs0W4bX17eqz6C78QJqqFrtgdK5EWf6Qow==} + deprecated: This version has been deprecated and is no longer supported or maintained + + '@hapi/joi@15.1.1': + resolution: {integrity: sha512-entf8ZMOK8sc+8YfeOlM8pCfg3b5+WZIKBfUaaJT8UsjAAPjartzxIYm3TIbjvA4u+u++KbcXD38k682nVHDAQ==} + deprecated: Switch to 'npm install joi' + + '@hapi/topo@3.1.6': + resolution: {integrity: sha512-tAag0jEcjwH+P2quUfipd7liWCNX2F8NvYjQp2wtInsZxnMlypdw0FtAOLxtvvkO+GSRRbmNi8m/5y42PQJYCQ==} + deprecated: This version has been deprecated and is no longer supported or maintained + '@ioredis/commands@1.2.0': resolution: {integrity: sha512-Sx1pU8EM64o2BrqNpEO1CNLtKQwyhuXuqyfH7oGKCk+1a33d2r5saW8zNwm3j6BTExtjrv2BxTgzzkMwts6vGg==} + '@isaacs/cliui@8.0.2': + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + '@istanbuljs/load-nyc-config@1.1.0': resolution: {integrity: sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==} engines: {node: '>=8'} @@ -973,8 +1023,8 @@ packages: '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} - '@types/node@22.5.5': - resolution: {integrity: sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==} + '@types/node@22.6.1': + resolution: {integrity: sha512-V48tCfcKb/e6cVUigLAaJDAILdMP0fUW6BidkPK4GpGjXcfbnoHasCZDwz3N3yVt5we2RHm4XTQCpv0KJz9zqw==} '@types/semver@7.5.8': resolution: {integrity: sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ==} @@ -988,6 +1038,9 @@ packages: '@types/supertest@6.0.2': resolution: {integrity: sha512-137ypx2lk/wTQbW6An6safu9hXmajAifU/s7szAHLN/FeIm5w7yR0Wkl9fdJMRSHwOn4HLAI0DaB2TOORuhPDg==} + '@types/uuid@10.0.0': + resolution: {integrity: sha512-7gqG38EyHgyP1S+7+xomFtL+ZNHcKv6DwNaCZmJmo1vgMugyF3TCnXVg4t1uk89mLNwnLtnY3TpOpCOyp1/xHQ==} + '@types/validator@13.12.2': resolution: {integrity: sha512-6SlHBzUW8Jhf3liqrGGXyTJSIFe4nqlJ5A5KaMZ2l/vbM3Wh3KSybots/wfWVzNLK4D1NZluDlSQIbIEPx6oyA==} @@ -1148,6 +1201,10 @@ packages: resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==} engines: {node: '>=10'} + ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} engines: {node: '>= 8'} @@ -1221,6 +1278,9 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + base64id@2.0.0: resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} engines: {node: ^4.5.0 || >= 5.9} @@ -1267,6 +1327,9 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer@6.0.3: + resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -1474,6 +1537,10 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} + dotenv@4.0.0: + resolution: {integrity: sha512-XcaMACOr3JMVcEv0Y/iUM2XaOsATRZ3U1In41/1jjK6vJZ2PZbQ1bzCG8uvaByfaBpl9gqc9QWJovpUGBXLLYQ==} + engines: {node: '>=4.6.0'} + dottie@2.0.6: resolution: {integrity: sha512-iGCHkfUc5kFekGiqhe8B/mdaurD+lakO9txNnTvKtA6PISrw86LgqHvRzWYPyoE2Ph5aMIrCw9/uko6XHTKCwA==} @@ -1482,6 +1549,9 @@ packages: engines: {node: '>=14.0.0'} hasBin: true + eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + ecdsa-sig-formatter@1.0.11: resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} @@ -1500,6 +1570,9 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} + engine.io-parser@5.2.3: resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} engines: {node: '>=10.0.0'} @@ -1642,6 +1715,10 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + engines: {node: '>=14'} + fork-ts-checker-webpack-plugin@9.0.2: resolution: {integrity: sha512-Uochze2R8peoN1XqlSi/rGUkDQpRogtLFocP9+PGu68zk1BDAKXfdeCdyVZpgTk8V8WFVQXdEz426VKjXLO1Gg==} engines: {node: '>=12.13.0', yarn: '>=1.0.0'} @@ -1667,9 +1744,6 @@ packages: fs-monkey@1.0.6: resolution: {integrity: sha512-b1FMfwetIKymC0eioW7mTywihSQE4oLzQn1dB6rZB5fx/3NpNEdAWeCSMB+60/AeT0TCXsxzAlcYVEFCTAksWg==} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} - fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1709,9 +1783,10 @@ packages: glob-to-regexp@0.4.1: resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Glob versions prior to v9 are no longer supported + glob@11.0.0: + resolution: {integrity: sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==} + engines: {node: 20 || >=22} + hasBin: true globals@11.12.0: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} @@ -1765,6 +1840,9 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} + ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + ignore-by-default@1.0.1: resolution: {integrity: sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==} @@ -1789,10 +1867,6 @@ packages: resolution: {integrity: sha512-6I/HUDeYFfuNCVS3td055BaXBwKYuzw7K3ExVMStBowKo9oOAMJIXIHvdyR3iboTCp1b+1i5DSkIZTcwIktuDw==} engines: {'0': node >= 0.4.0} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -1906,6 +1980,10 @@ packages: resolution: {integrity: sha512-BewmUXImeuRk2YY0PVbxgKAysvhRPUQE0h5QRM++nVWyubKGV0l8qQ5op8+B2DOmwSe63Jivj0BjkPQVf8fP5g==} engines: {node: '>=8'} + jackspeak@4.0.2: + resolution: {integrity: sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==} + engines: {node: 20 || >=22} + jake@10.9.2: resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} engines: {node: '>=10'} @@ -2163,6 +2241,10 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + lru-cache@11.0.1: + resolution: {integrity: sha512-CgeuL5uom6j/ZVrg7G/+1IXqRY8JXX4Hghfy5YE0EhoYQWvndP1kufu58cmZLNIDKnRhZrXfdS9urVWx98AipQ==} + engines: {node: 20 || >=22} + lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} @@ -2212,6 +2294,10 @@ packages: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} engines: {node: '>=6'} + minimatch@10.0.1: + resolution: {integrity: sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==} + engines: {node: 20 || >=22} + minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} @@ -2226,6 +2312,10 @@ packages: resolution: {integrity: sha512-FzDO6yGnqLtm8sp3mXafWtiRUOslJSSg/aI0v9YbN5vjw5KLoODKAROCyi766NIvTSxcfHBrbhCSGk1A+MOzDg==} engines: {node: ^16 || ^18 || >=20} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + engines: {node: '>=16 || 14 >=14.17'} + moment-timezone@0.5.45: resolution: {integrity: sha512-HIWmqA86KcmCAhnMAN0wuDOARV/525R2+lOLotuGFzn4HO+FH+/645z2wx0Dt3iDv6/p61SIvKnDstISainhLQ==} @@ -2250,6 +2340,27 @@ packages: neo-async@2.6.2: resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} + neo4j-driver-bolt-connection@4.4.11: + resolution: {integrity: sha512-2sCgx3Lpg7fnYAU/kb9wOKY8ResUeur88MhLNUWyINxa+CMP7aB+t70zBcOlJ7hcCf6ghEiz6ZXhd9WikGW9bA==} + + neo4j-driver-bolt-connection@5.24.1: + resolution: {integrity: sha512-5xS93jPqpeTh5+62r6fizxQdOMGMpUcuNKTOP4Pn0OPVMM0IMlemJhSUEQf7k1yJmsZNn6InKRBAmPjZm5+2dw==} + + neo4j-driver-core@4.4.11: + resolution: {integrity: sha512-7+7Ue9RNsg5TAwkPvl4/st2ZdktN3qH8A/MYmJkZ6Ait8MuXP8ppTvZ3ugPxbrSOJEwvZYpKqV+FNZ17mOSfcQ==} + + neo4j-driver-core@5.24.1: + resolution: {integrity: sha512-nPPAXnEypaE4HloM2x8GggF5YT7e+LpcEuyYt7ELuax25/SH7ZtdkemnH0voAVfqBwQXSWP9CFpPFznDOU6T5A==} + + neo4j-driver@4.4.11: + resolution: {integrity: sha512-1dhThyuNZt4FIwAlmzsbYNnSn28avjO2TVairuFO3P/aql5iPnwTNGmQJc/MB8BlrzDhOo1+jfAO4pc49XHh1Q==} + + neo4j-driver@5.24.1: + resolution: {integrity: sha512-ziTNnesM24liI/fPpykLQtO7Hu4Mq5QxiePwPBSZtmylwzJWs/apLg3RiTioyXAZytKbdmldyUwmJSBnxbjLCw==} + + neode@0.4.9: + resolution: {integrity: sha512-3RufLD2cmTXrPpvsgkEAqS3maRjXJ89vjbyYmyqJMJl5uv6gcUa32N6hRwHcqfjWRWUaFKaoGLEJLaOQobs4eA==} + node-abort-controller@3.1.1: resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==} @@ -2284,6 +2395,9 @@ packages: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} + ollama@0.5.9: + resolution: {integrity: sha512-F/KZuDRC+ZsVCuMvcOYuQ6zj42/idzCkkuknGyyGVmNStMZ/sU3jQpvhnl4SyC0+zBzLiKNZJnJeuPFuieWZvQ==} + once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} @@ -2315,6 +2429,9 @@ packages: resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + parent-module@1.0.1: resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} engines: {node: '>=6'} @@ -2332,10 +2449,6 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -2343,6 +2456,10 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-scurry@2.0.0: + resolution: {integrity: sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==} + engines: {node: 20 || >=22} + path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -2534,14 +2651,18 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rimraf@2.7.1: - resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} - deprecated: Rimraf versions prior to v4 are no longer supported + rimraf@6.0.1: + resolution: {integrity: sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==} + engines: {node: 20 || >=22} hasBin: true run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + rxjs@6.6.7: + resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} + engines: {npm: '>=2.0.0'} + rxjs@7.8.1: resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==} @@ -2634,6 +2755,10 @@ packages: signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + simple-update-notifier@2.0.0: resolution: {integrity: sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==} engines: {node: '>=10'} @@ -2714,6 +2839,10 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + string_decoder@1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} @@ -2867,6 +2996,9 @@ packages: '@swc/wasm': optional: true + tslib@1.14.1: + resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==} + tslib@2.7.0: resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} @@ -2932,6 +3064,11 @@ packages: resolution: {integrity: sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==} hasBin: true + uuid@3.4.0: + resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} + deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. + hasBin: true + uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true @@ -3000,6 +3137,9 @@ packages: webpack-cli: optional: true + whatwg-fetch@3.6.20: + resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} + which-typed-array@1.1.15: resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} engines: {node: '>= 0.4'} @@ -3019,6 +3159,10 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} @@ -3095,7 +3239,7 @@ packages: snapshots: - '@abearxiong/router@0.0.1-alpha.33': + '@abearxiong/router@0.0.1-alpha.34': dependencies: ws: 8.18.0 transitivePeerDependencies: @@ -3915,8 +4059,34 @@ snapshots: '@discoveryjs/json-ext@0.5.7': {} + '@hapi/address@2.1.4': {} + + '@hapi/bourne@1.3.2': {} + + '@hapi/hoek@8.5.1': {} + + '@hapi/joi@15.1.1': + dependencies: + '@hapi/address': 2.1.4 + '@hapi/bourne': 1.3.2 + '@hapi/hoek': 8.5.1 + '@hapi/topo': 3.1.6 + + '@hapi/topo@3.1.6': + dependencies: + '@hapi/hoek': 8.5.1 + '@ioredis/commands@1.2.0': {} + '@isaacs/cliui@8.0.2': + dependencies: + string-width: 5.1.2 + string-width-cjs: string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: wrap-ansi@7.0.0 + '@istanbuljs/load-nyc-config@1.1.0': dependencies: camelcase: 5.3.1 @@ -3930,27 +4100,27 @@ snapshots: '@jest/console@29.7.0': dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 slash: 3.0.0 - '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2))': + '@jest/core@29.7.0(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2))': dependencies: '@jest/console': 29.7.0 '@jest/reporters': 29.7.0 '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.9.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + jest-config: 29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -3975,7 +4145,7 @@ snapshots: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 jest-mock: 29.7.0 '@jest/expect-utils@29.7.0': @@ -3993,7 +4163,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.3.0 - '@types/node': 22.5.5 + '@types/node': 22.6.1 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4015,11 +4185,11 @@ snapshots: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.25 - '@types/node': 22.5.5 + '@types/node': 22.6.1 chalk: 4.1.2 collect-v8-coverage: 1.0.2 exit: 0.1.2 - glob: 7.2.3 + glob: 11.0.0 graceful-fs: 4.2.11 istanbul-lib-coverage: 3.2.2 istanbul-lib-instrument: 6.0.3 @@ -4085,7 +4255,7 @@ snapshots: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-reports': 3.0.4 - '@types/node': 22.5.5 + '@types/node': 22.6.1 '@types/yargs': 17.0.33 chalk: 4.1.2 @@ -4177,7 +4347,7 @@ snapshots: '@types/cors@2.8.17': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.6.1 '@types/crypto-js@4.2.2': {} @@ -4189,7 +4359,7 @@ snapshots: '@types/graceful-fs@4.1.9': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.6.1 '@types/istanbul-lib-coverage@2.0.6': {} @@ -4210,7 +4380,7 @@ snapshots: '@types/jsonwebtoken@9.0.7': dependencies: - '@types/node': 22.5.5 + '@types/node': 22.6.1 '@types/lodash-es@4.17.12': dependencies: @@ -4222,7 +4392,7 @@ snapshots: '@types/ms@0.7.34': {} - '@types/node@22.5.5': + '@types/node@22.6.1': dependencies: undici-types: 6.19.8 @@ -4234,7 +4404,7 @@ snapshots: dependencies: '@types/cookiejar': 2.1.5 '@types/methods': 1.1.4 - '@types/node': 22.5.5 + '@types/node': 22.6.1 form-data: 4.0.0 '@types/supertest@6.0.2': @@ -4242,6 +4412,8 @@ snapshots: '@types/methods': 1.1.4 '@types/superagent': 8.1.9 + '@types/uuid@10.0.0': {} + '@types/validator@13.12.2': {} '@types/webpack-env@1.18.5': {} @@ -4412,6 +4584,8 @@ snapshots: ansi-styles@5.2.0: {} + ansi-styles@6.2.1: {} + anymatch@3.1.3: dependencies: normalize-path: 3.0.0 @@ -4518,6 +4692,8 @@ snapshots: balanced-match@1.0.2: {} + base64-js@1.5.1: {} + base64id@2.0.0: {} binary-extensions@2.3.0: {} @@ -4562,6 +4738,11 @@ snapshots: buffer-from@1.1.2: {} + buffer@6.0.3: + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 @@ -4697,13 +4878,13 @@ snapshots: optionalDependencies: typescript: 5.6.2 - create-jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)): + create-jest@29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)): dependencies: '@jest/types': 29.6.3 chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + jest-config: 29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -4759,6 +4940,8 @@ snapshots: diff@4.0.2: {} + dotenv@4.0.0: {} + dottie@2.0.6: {} dts-bundle-generator@9.5.1: @@ -4766,6 +4949,8 @@ snapshots: typescript: 5.6.2 yargs: 17.7.2 + eastasianwidth@0.2.0: {} + ecdsa-sig-formatter@1.0.11: dependencies: safe-buffer: 5.2.1 @@ -4780,13 +4965,15 @@ snapshots: emoji-regex@8.0.0: {} + emoji-regex@9.2.2: {} + engine.io-parser@5.2.3: {} engine.io@6.6.1: dependencies: '@types/cookie': 0.4.1 '@types/cors': 2.8.17 - '@types/node': 22.5.5 + '@types/node': 22.6.1 accepts: 1.3.8 base64id: 2.0.0 cookie: 0.4.2 @@ -4922,6 +5109,11 @@ snapshots: dependencies: is-callable: 1.2.7 + foreground-child@3.3.0: + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + fork-ts-checker-webpack-plugin@9.0.2(typescript@5.6.2)(webpack@5.94.0(webpack-cli@5.1.4)): dependencies: '@babel/code-frame': 7.24.7 @@ -4966,8 +5158,6 @@ snapshots: fs-monkey@1.0.6: {} - fs.realpath@1.0.0: {} - fsevents@2.3.3: optional: true @@ -4999,14 +5189,14 @@ snapshots: glob-to-regexp@0.4.1: {} - glob@7.2.3: + glob@11.0.0: dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.2 - once: 1.4.0 - path-is-absolute: 1.0.1 + foreground-child: 3.3.0 + jackspeak: 4.0.2 + minimatch: 10.0.1 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 2.0.0 globals@11.12.0: {} @@ -5051,6 +5241,8 @@ snapshots: human-signals@2.1.0: {} + ieee754@1.2.1: {} + ignore-by-default@1.0.1: {} ignore@5.3.2: {} @@ -5069,11 +5261,6 @@ snapshots: inflection@1.13.4: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - inherits@2.0.4: {} interpret@3.1.1: {} @@ -5190,6 +5377,10 @@ snapshots: html-escaper: 2.0.2 istanbul-lib-report: 3.0.1 + jackspeak@4.0.2: + dependencies: + '@isaacs/cliui': 8.0.2 + jake@10.9.2: dependencies: async: 3.2.6 @@ -5209,7 +5400,7 @@ snapshots: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.3 @@ -5229,16 +5420,16 @@ snapshots: - babel-plugin-macros - supports-color - jest-cli@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)): + jest-cli@29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.1.2 - create-jest: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + create-jest: 29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) exit: 0.1.2 import-local: 3.2.0 - jest-config: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + jest-config: 29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.7.2 @@ -5248,7 +5439,7 @@ snapshots: - supports-color - ts-node - jest-config@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)): + jest-config@29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)): dependencies: '@babel/core': 7.25.2 '@jest/test-sequencer': 29.7.0 @@ -5257,7 +5448,7 @@ snapshots: chalk: 4.1.2 ci-info: 3.9.0 deepmerge: 4.3.1 - glob: 7.2.3 + glob: 11.0.0 graceful-fs: 4.2.11 jest-circus: 29.7.0 jest-environment-node: 29.7.0 @@ -5273,8 +5464,8 @@ snapshots: slash: 3.0.0 strip-json-comments: 3.1.1 optionalDependencies: - '@types/node': 22.5.5 - ts-node: 10.9.2(@types/node@22.5.5)(typescript@5.6.2) + '@types/node': 22.6.1 + ts-node: 10.9.2(@types/node@22.6.1)(typescript@5.6.2) transitivePeerDependencies: - babel-plugin-macros - supports-color @@ -5303,7 +5494,7 @@ snapshots: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -5313,7 +5504,7 @@ snapshots: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 22.5.5 + '@types/node': 22.6.1 anymatch: 3.1.3 fb-watchman: 2.0.2 graceful-fs: 4.2.11 @@ -5352,7 +5543,7 @@ snapshots: jest-mock@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 jest-util: 29.7.0 jest-pnp-resolver@1.2.3(jest-resolve@29.7.0): @@ -5387,7 +5578,7 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -5415,11 +5606,11 @@ snapshots: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 chalk: 4.1.2 cjs-module-lexer: 1.4.1 collect-v8-coverage: 1.0.2 - glob: 7.2.3 + glob: 11.0.0 graceful-fs: 4.2.11 jest-haste-map: 29.7.0 jest-message-util: 29.7.0 @@ -5461,7 +5652,7 @@ snapshots: jest-util@29.7.0: dependencies: '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 chalk: 4.1.2 ci-info: 3.9.0 graceful-fs: 4.2.11 @@ -5480,7 +5671,7 @@ snapshots: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 22.5.5 + '@types/node': 22.6.1 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -5489,23 +5680,23 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 22.5.5 + '@types/node': 22.6.1 merge-stream: 2.0.0 supports-color: 8.1.1 jest-worker@29.7.0: dependencies: - '@types/node': 22.5.5 + '@types/node': 22.6.1 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 - jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)): + jest@29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)): dependencies: - '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + '@jest/core': 29.7.0(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) '@jest/types': 29.6.3 import-local: 3.2.0 - jest-cli: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + jest-cli: 29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -5618,6 +5809,8 @@ snapshots: lodash@4.17.21: {} + lru-cache@11.0.1: {} + lru-cache@5.1.1: dependencies: yallist: 3.1.1 @@ -5657,6 +5850,10 @@ snapshots: mimic-fn@2.1.0: {} + minimatch@10.0.1: + dependencies: + brace-expansion: 2.0.1 + minimatch@3.1.2: dependencies: brace-expansion: 1.1.11 @@ -5684,6 +5881,8 @@ snapshots: web-encoding: 1.1.5 xml2js: 0.5.0 + minipass@7.1.2: {} + moment-timezone@0.5.45: dependencies: moment: 2.30.1 @@ -5700,6 +5899,42 @@ snapshots: neo-async@2.6.2: {} + neo4j-driver-bolt-connection@4.4.11: + dependencies: + buffer: 6.0.3 + neo4j-driver-core: 4.4.11 + string_decoder: 1.3.0 + + neo4j-driver-bolt-connection@5.24.1: + dependencies: + buffer: 6.0.3 + neo4j-driver-core: 5.24.1 + string_decoder: 1.3.0 + + neo4j-driver-core@4.4.11: {} + + neo4j-driver-core@5.24.1: {} + + neo4j-driver@4.4.11: + dependencies: + '@babel/runtime': 7.25.6 + neo4j-driver-bolt-connection: 4.4.11 + neo4j-driver-core: 4.4.11 + rxjs: 6.6.7 + + neo4j-driver@5.24.1: + dependencies: + neo4j-driver-bolt-connection: 5.24.1 + neo4j-driver-core: 5.24.1 + rxjs: 7.8.1 + + neode@0.4.9: + dependencies: + '@hapi/joi': 15.1.1 + dotenv: 4.0.0 + neo4j-driver: 4.4.11 + uuid: 3.4.0 + node-abort-controller@3.1.1: {} node-int64@0.4.0: {} @@ -5731,6 +5966,10 @@ snapshots: object-keys@1.1.1: {} + ollama@0.5.9: + dependencies: + whatwg-fetch: 3.6.20 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -5760,6 +5999,8 @@ snapshots: p-try@2.2.0: {} + package-json-from-dist@1.0.0: {} + parent-module@1.0.1: dependencies: callsites: 3.1.0 @@ -5783,7 +6024,7 @@ snapshots: klaw-sync: 6.0.0 minimist: 1.2.8 open: 7.4.2 - rimraf: 2.7.1 + rimraf: 6.0.1 semver: 7.6.3 slash: 2.0.0 tmp: 0.0.33 @@ -5791,12 +6032,15 @@ snapshots: path-exists@4.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-parse@1.0.7: {} + path-scurry@2.0.0: + dependencies: + lru-cache: 11.0.1 + minipass: 7.1.2 + path-type@4.0.0: {} path-type@5.0.0: {} @@ -5965,14 +6209,19 @@ snapshots: reusify@1.0.4: {} - rimraf@2.7.1: + rimraf@6.0.1: dependencies: - glob: 7.2.3 + glob: 11.0.0 + package-json-from-dist: 1.0.0 run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 + rxjs@6.6.7: + dependencies: + tslib: 1.14.1 + rxjs@7.8.1: dependencies: tslib: 2.7.0 @@ -6057,6 +6306,8 @@ snapshots: signal-exit@3.0.7: {} + signal-exit@4.1.0: {} + simple-update-notifier@2.0.0: dependencies: semver: 7.6.3 @@ -6144,6 +6395,12 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + string-width@5.1.2: + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + string_decoder@1.3.0: dependencies: safe-buffer: 5.2.1 @@ -6220,7 +6477,7 @@ snapshots: test-exclude@6.0.0: dependencies: '@istanbuljs/schema': 0.1.3 - glob: 7.2.3 + glob: 11.0.0 minimatch: 3.1.2 through2@4.0.2: @@ -6245,12 +6502,12 @@ snapshots: tree-kill@1.2.2: {} - ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)))(typescript@5.6.2): + ts-jest@29.2.5(@babel/core@7.25.2)(@jest/transform@29.7.0)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.25.2))(jest@29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)))(typescript@5.6.2): dependencies: bs-logger: 0.2.6 ejs: 3.1.10 fast-json-stable-stringify: 2.1.0 - jest: 29.7.0(@types/node@22.5.5)(ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2)) + jest: 29.7.0(@types/node@22.6.1)(ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2)) jest-util: 29.7.0 json5: 2.2.3 lodash.memoize: 4.1.2 @@ -6274,14 +6531,14 @@ snapshots: typescript: 5.6.2 webpack: 5.94.0(webpack-cli@5.1.4) - ts-node@10.9.2(@types/node@22.5.5)(typescript@5.6.2): + ts-node@10.9.2(@types/node@22.6.1)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 22.5.5 + '@types/node': 22.6.1 acorn: 8.12.1 acorn-walk: 8.3.4 arg: 4.1.3 @@ -6292,6 +6549,8 @@ snapshots: v8-compile-cache-lib: 3.0.1 yn: 3.1.1 + tslib@1.14.1: {} + tslib@2.7.0: {} type-detect@4.0.8: {} @@ -6341,6 +6600,8 @@ snapshots: uuid@10.0.0: {} + uuid@3.4.0: {} + uuid@8.3.2: {} v8-compile-cache-lib@3.0.1: {} @@ -6429,6 +6690,8 @@ snapshots: - esbuild - uglify-js + whatwg-fetch@3.6.20: {} + which-typed-array@1.1.15: dependencies: available-typed-arrays: 1.0.7 @@ -6445,7 +6708,7 @@ snapshots: wkx@0.5.0: dependencies: - '@types/node': 22.5.5 + '@types/node': 22.6.1 wrap-ansi@7.0.0: dependencies: @@ -6453,6 +6716,12 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + wrap-ansi@8.1.0: + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + wrappy@1.0.2: {} write-file-atomic@4.0.2: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 0000000..4340350 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +packages: + - 'packages/*' \ No newline at end of file diff --git a/src/admin/dashboard/load.ts b/src/admin/dashboard/load.ts index 5b2960e..253e9bd 100644 --- a/src/admin/dashboard/load.ts +++ b/src/admin/dashboard/load.ts @@ -12,7 +12,7 @@ export type CodeManager = { fn?: any; status?: CodeStatus; errorMsg?: string; - lock?: boolean; // 是否锁定 + lock?: boolean; // 是否锁定 } & Partial; const codeDemoRun = `async function run(ctx) { @@ -64,7 +64,11 @@ export const loadOne = async (item: RouterCodeModel) => { } }; export const load = async function () { - const codes = await RouterCodeModel.findAll(); + const codes = await RouterCodeModel.findAll({ + logging: (sql, timing) => { + console.log('manager load database router codeModel'); + }, + }); const codeManager: CodeManager[] = codes.map((item) => { const { path, key, id, code, exec, project, active, middleware } = item.toJSON(); if (!active) { diff --git a/src/admin/router.ts b/src/admin/router.ts index 40d56f6..9a52042 100644 --- a/src/admin/router.ts +++ b/src/admin/router.ts @@ -1,6 +1,6 @@ // admin router manger -import { Route } from '@abearxiong/router'; +import { CustomError, Route } from '@abearxiong/router'; import { router } from '../modules/router.ts'; import { manager, updateNewCode, removeCode, stopCode, startCode } from './dashboard/manager.ts'; import { loadOne } from './dashboard/load.ts'; @@ -143,9 +143,8 @@ updateRouter.run = async (ctx) => { await newCodeRouter.save(); codeRouter = newCodeRouter; } catch (e) { - ctx.body = e.message.toString(); - ctx.code = 500; - return ctx; + console.error('updateRouter', e); + throw new CustomError(e.message.toString()); } } diff --git a/src/app.ts b/src/app.ts index 9277b12..3129bd1 100644 --- a/src/app.ts +++ b/src/app.ts @@ -1,12 +1,15 @@ import { App } from '@abearxiong/router'; import { useConfig } from '@abearxiong/use-config'; import { dynamicImport } from './lib/dynamic-import.ts'; -import { redisPublisher, redisSubscriber } from './modules/redis.ts'; - +import { redisPublisher, redisSubscriber, redis } from './modules/redis.ts'; +import { neode } from './modules/neo4j.ts'; +import { minioClient } from './modules/minio.ts'; +import { sequelize } from './modules/sequelize.ts'; useConfig(); export const emit = (channel: string, message?: any) => { redisPublisher.publish(channel, JSON.stringify(message)); }; +export { neode, redis, minioClient, sequelize }; export const app = new App<{ import: any; emit: typeof emit }>({ serverOptions: { diff --git a/src/models/code.ts b/src/models/code.ts index 6b5c81d..deb5da5 100644 --- a/src/models/code.ts +++ b/src/models/code.ts @@ -41,7 +41,7 @@ RouterCodeModel.init( type: DataTypes.UUID, primaryKey: true, defaultValue: DataTypes.UUIDV4, - comment: '用户id', + comment: '用户code id', }, path: { type: DataTypes.STRING, @@ -60,11 +60,11 @@ RouterCodeModel.init( defaultValue: 'default', }, code: { - type: DataTypes.STRING, + type: DataTypes.TEXT, defaultValue: '', }, exec: { - type: DataTypes.STRING, // 对代码进行编译后的代码 + type: DataTypes.TEXT, // 对代码进行编译后的代码 defaultValue: '', }, type: { @@ -93,5 +93,7 @@ RouterCodeModel.init( tableName: 'cf_router_code', }, ); -// RouterCodeModel.sync({ alter: true }); +RouterCodeModel.sync({ alter: true, logging: false }).catch((e) => { + console.error('RouterCodeModel sync', e); +}); // RouterCodeModel.sync({force: true}); diff --git a/src/models/prompt.ts b/src/models/prompt.ts new file mode 100644 index 0000000..484a924 --- /dev/null +++ b/src/models/prompt.ts @@ -0,0 +1,18 @@ +import { neode } from '@/app.ts'; + +export const PromptNeo = neode.model('Prompt', { + id: { + type: 'uuid', + primary: true, + }, + title: { + type: 'string', + }, + description: 'string', + // profile: { type: 'object', optional: true }, // 用于存储 JSON 对象 + prompt: 'string', + // inputVariables: { type: 'array', item }, + // tags: { type: 'array', items: 'string', optional: true } // 定义字符串数组 + inputVariables: { type: 'string', default: JSON.stringify([]) }, + localVariables: { type: 'string', default: JSON.stringify([]) }, +}); diff --git a/src/modules/neo4j.ts b/src/modules/neo4j.ts new file mode 100644 index 0000000..daddc1c --- /dev/null +++ b/src/modules/neo4j.ts @@ -0,0 +1,29 @@ +import Neode from 'neode'; +import { useConfig } from '@abearxiong/use-config'; + +type NeodeConfig = { + uri: string; + username: string; + password: string; +}; +const { neo4j } = useConfig<{ neo4j: NeodeConfig }>('neo4j'); + +const { uri, username, password } = neo4j; +// 设置连接配置 +// const neode = new Neode('bolt://localhost:7687', 'neo4j', 'your_password'); +export const neode = new Neode(uri, username, password); + +const testConnect = async () => { + // 连接成功 + // 尝试执行简单的 Cypher 查询以测试连接 + neode + .cypher('RETURN 1', {}) + .then(() => { + console.log('connect neo4j success'); + }) + .catch((err) => { + console.error('Failed to connect:', err); + }); +}; + +testConnect(); diff --git a/src/modules/ollama.ts b/src/modules/ollama.ts new file mode 100644 index 0000000..93ea2ae --- /dev/null +++ b/src/modules/ollama.ts @@ -0,0 +1,30 @@ +import { useConfig } from '@abearxiong/use-config'; +import { Ollama, Message, ChatRequest } from 'ollama'; + +const config = useConfig<{ ollama: Ollama['config'] & { model: string } }>(); + +const { host } = config.ollama; + +export const ollama = new Ollama({ host }); + +export type ChatMessage = { + content: string; +} & Message; + +type ChatOpts = { + model?: string; + messages?: ChatMessage[]; + options?: ChatRequest['options']; +} & ChatRequest; +export const chat = (messages: ChatMessage[], chatOpts?: ChatOpts) => { + const { options, stream, ...rest } = chatOpts || {}; + return ollama.chat({ + messages, + model: config.model, + options: { + temperature: 0, + ...chatOpts?.options, + }, + ...rest, + }); +}; diff --git a/src/modules/redis.ts b/src/modules/redis.ts index 7eea365..1c38238 100644 --- a/src/modules/redis.ts +++ b/src/modules/redis.ts @@ -5,7 +5,7 @@ const config = useConfig<{ redis: ConstructorParameters; }>(); // 配置 Redis 连接 -const redis = new Redis({ +export const redis = new Redis({ host: 'localhost', // Redis 服务器的主机名或 IP 地址 port: 6379, // Redis 服务器的端口号 // password: 'your_password', // Redis 的密码 (如果有) diff --git a/src/routes/container/models/index.ts b/src/routes/container/models/index.ts index e27ec77..d899ec5 100644 --- a/src/routes/container/models/index.ts +++ b/src/routes/container/models/index.ts @@ -26,10 +26,6 @@ export class ContainerModel extends Model { declare data: ContainerData; declare publish: ContainerPublish; declare uid: string; - - // timestamps - public readonly createdAt!: Date; - public readonly updatedAt!: Date; } ContainerModel.init( { diff --git a/src/routes/index.ts b/src/routes/index.ts index 658fc15..97a14bc 100644 --- a/src/routes/index.ts +++ b/src/routes/index.ts @@ -3,3 +3,5 @@ import './container/index.ts'; import './page/index.ts'; import './resource/index.ts'; + +import './prompt-graph/index.ts'; \ No newline at end of file diff --git a/src/routes/prompt-graph/index.ts b/src/routes/prompt-graph/index.ts new file mode 100644 index 0000000..9166f9d --- /dev/null +++ b/src/routes/prompt-graph/index.ts @@ -0,0 +1 @@ +import './list.ts' \ No newline at end of file diff --git a/src/routes/prompt-graph/list.ts b/src/routes/prompt-graph/list.ts new file mode 100644 index 0000000..48ea06d --- /dev/null +++ b/src/routes/prompt-graph/list.ts @@ -0,0 +1,76 @@ +import { PromptNeo } from '@/models/prompt.ts'; +import { app } from '@/app.ts'; +import { v4 } from 'uuid'; +app + .route('prompt', 'list') + .define(async (ctx) => { + const prompts = await PromptNeo.all(); + const json = await prompts.toJson(); + console.log('json', json); + ctx.body = json; + }) + .addTo(app); + +app + .route('prompt', 'update') + .define(async (ctx) => { + const { id, title, description, prompt, inputVariables, localVariables } = ctx.query; + const promptNode = await PromptNeo.first('id', id); + + if (!promptNode) { + const promptData = { + id: v4(), + title, + description, + prompt, + inputVariables: JSON.stringify(inputVariables), + localVariables: JSON.stringify(localVariables), + }; + const _prompt = await PromptNeo.create(promptData); + ctx.body = await _prompt.toJson(); + return; + } + + await promptNode.update({ title, description, prompt, inputVariables, localVariables }); + ctx.body = await promptNode.toJson(); + }) + .addTo(app); + +app + .route('prompt', 'delete') + .define(async (ctx) => { + const { id, title } = ctx.query; + const promptNode = await PromptNeo.first('id', id); + if (!promptNode) { + ctx.body = 'prompt not found'; + return; + } + await promptNode.delete(); + ctx.body = 'delete success'; + }) + .addTo(app); +app + .route('prompt', 'deleteAll') + .define(async (ctx) => { + const prompts = await PromptNeo.all(); + for (const prompt of prompts) { + await prompt.delete(); + } + ctx.body = 'delete all success'; + }) + .addTo(app); +app + .route('prompt', 'createDemo') + .define(async (ctx) => { + const promptData = { + id: v4(), + title: 'test', + description: '这是测试保存prompt的数据', + prompt: '这是测试保存prompt的数据', + inputVariables: JSON.stringify([{ key: 'test', value: 'test' }]), + localVariables: JSON.stringify([{ key: 'test', value: 'test' }]), + }; + const prompt = await PromptNeo.create(promptData); + ctx.body = await prompt.toJson(); + }) + .addTo(app);