From 855c322da603a9a488f7e497128e172985e4a4e8 Mon Sep 17 00:00:00 2001 From: Saket Aryan Date: Fri, 30 May 2025 09:51:01 +0530 Subject: [PATCH] deps(ts-sdk): Updates Google SDK Peer Dependency Version (#2878) --- docs/changelog.mdx | 5 + mem0-ts/package.json | 4 +- mem0-ts/pnpm-lock.yaml | 682 +++++++++++++++++++++++++- mem0-ts/src/client/mem0.ts | 5 +- mem0-ts/src/oss/src/config/manager.ts | 2 +- mem0-ts/src/oss/src/llms/openai.ts | 5 +- 6 files changed, 685 insertions(+), 18 deletions(-) diff --git a/docs/changelog.mdx b/docs/changelog.mdx index cc6ab63a..7e4a2d0b 100644 --- a/docs/changelog.mdx +++ b/docs/changelog.mdx @@ -288,6 +288,11 @@ mode: "wide" + +**Improvements:** +- **SDK:** Update Google SDK Peer Dependency Version. + + **Improvements:** - **OSS:** Added baseURL param in LLM Config. diff --git a/mem0-ts/package.json b/mem0-ts/package.json index 7c53677c..5f985576 100644 --- a/mem0-ts/package.json +++ b/mem0-ts/package.json @@ -1,6 +1,6 @@ { "name": "mem0ai", - "version": "2.1.27", + "version": "2.1.28", "description": "The Memory Layer For Your AI Apps", "main": "./dist/index.js", "module": "./dist/index.mjs", @@ -98,7 +98,7 @@ }, "peerDependencies": { "@anthropic-ai/sdk": "^0.40.1", - "@google/genai": "^0.7.0", + "@google/genai": "^1.2.0", "@mistralai/mistralai": "^1.5.2", "@qdrant/js-client-rest": "1.13.0", "@supabase/supabase-js": "^2.49.1", diff --git a/mem0-ts/pnpm-lock.yaml b/mem0-ts/pnpm-lock.yaml index 1212314a..fc222716 100644 --- a/mem0-ts/pnpm-lock.yaml +++ b/mem0-ts/pnpm-lock.yaml @@ -8,11 +8,11 @@ importers: .: dependencies: "@anthropic-ai/sdk": - specifier: 0.40.1 + specifier: ^0.40.1 version: 0.40.1(encoding@0.1.13) "@google/genai": - specifier: ^0.7.0 - version: 0.7.0(encoding@0.1.13) + specifier: ^1.2.0 + version: 1.2.0(@modelcontextprotocol/sdk@1.12.1)(encoding@0.1.13) "@langchain/core": specifier: ^0.3.44 version: 0.3.44(openai@4.93.0(encoding@0.1.13)(ws@8.18.1)(zod@3.24.2)) @@ -630,12 +630,14 @@ packages: integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==, } - "@google/genai@0.7.0": + "@google/genai@1.2.0": resolution: { - integrity: sha512-r+Fwj/emnXZN5R+4JCxDXboY4AGTmTn7+Wnori5dgyJiStP0P82f9YYL0CVsCnDIumNY2i0UIcZ1zGZdtHJ34w==, + integrity: sha512-jAYhzG7UrLJxeQr5cfL87O4AcyEu+E7AA7MJDYPrDWI3Hl25EAdx5mA4AuNfSXZO31LnSyrIkEzkmJOAdlPKOA==, } - engines: { node: ">=18.0.0" } + engines: { node: ">=20.0.0" } + peerDependencies: + "@modelcontextprotocol/sdk": ^1.11.0 "@isaacs/cliui@8.0.2": resolution: @@ -820,6 +822,13 @@ packages: peerDependencies: zod: ">= 3" + "@modelcontextprotocol/sdk@1.12.1": + resolution: + { + integrity: sha512-KG1CZhZfWg+u8pxeM/mByJDScJSrjjxLc8fwQqbsS8xCjBmQfMNEBTotYdNanKekepnfRI85GtgQlctLFpcYPw==, + } + engines: { node: ">=18" } + "@nodelib/fs.scandir@2.1.5": resolution: { @@ -1340,6 +1349,13 @@ packages: } engines: { node: ">=6.5" } + accepts@2.0.0: + resolution: + { + integrity: sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==, + } + engines: { node: ">= 0.6" } + acorn-walk@8.3.4: resolution: { @@ -1383,6 +1399,12 @@ packages: } engines: { node: ">=8" } + ajv@6.12.6: + resolution: + { + integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==, + } + ansi-escapes@4.3.2: resolution: { @@ -1545,6 +1567,7 @@ packages: { integrity: sha512-JocpCSOixzy5XFJi2ub6IMmV/G9i8Lrm2lZvwBv9xPdglmZM0ufDVBbjbrfU/zuLvBfD7Bv2eYxz9i+OHTgkew==, } + deprecated: pkg version number incorrect binary-extensions@2.3.0: resolution: @@ -1565,6 +1588,13 @@ packages: integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==, } + body-parser@2.2.0: + resolution: + { + integrity: sha512-02qvAaxv8tp7fBa/mw1ga98OGm+eCbqzJOKoRt70sLmfEEi+jyBYVTDGfCL/k06/4EMk/z01gCe7HoCH/f2LTg==, + } + engines: { node: ">=18" } + brace-expansion@1.1.11: resolution: { @@ -1645,6 +1675,13 @@ packages: peerDependencies: esbuild: ">=0.18" + bytes@3.1.2: + resolution: + { + integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==, + } + engines: { node: ">= 0.8" } + cac@6.7.14: resolution: { @@ -1666,6 +1703,13 @@ packages: } engines: { node: ">= 0.4" } + call-bound@1.0.4: + resolution: + { + integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==, + } + engines: { node: ">= 0.4" } + callsites@3.1.0: resolution: { @@ -1846,12 +1890,47 @@ packages: integrity: sha512-wKGOQRRvdnd89pCeH96e2Fn4wkbenSP6LMHfjfyNLMbGuHEFbMqQNuxXqd0oXG9caIOQ1FTvc5Uijp9/4jujnQ==, } + content-disposition@1.0.0: + resolution: + { + integrity: sha512-Au9nRL8VNUut/XSzbQA38+M78dzP4D+eqg3gfJHMIHHYa3bg067xj1KxMUWj+VULbiZMowKngFFbKczUrNJ1mg==, + } + engines: { node: ">= 0.6" } + + content-type@1.0.5: + resolution: + { + integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==, + } + engines: { node: ">= 0.6" } + convert-source-map@2.0.0: resolution: { integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==, } + cookie-signature@1.2.2: + resolution: + { + integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==, + } + engines: { node: ">=6.6.0" } + + cookie@0.7.2: + resolution: + { + integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==, + } + engines: { node: ">= 0.6" } + + cors@2.8.5: + resolution: + { + integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==, + } + engines: { node: ">= 0.10" } + create-jest@29.7.0: resolution: { @@ -1943,6 +2022,13 @@ packages: integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==, } + depd@2.0.0: + resolution: + { + integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==, + } + engines: { node: ">= 0.8" } + detect-libc@2.0.3: resolution: { @@ -2003,6 +2089,12 @@ packages: integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==, } + ee-first@1.1.1: + resolution: + { + integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==, + } + ejs@3.1.10: resolution: { @@ -2036,6 +2128,13 @@ packages: integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==, } + encodeurl@2.0.0: + resolution: + { + integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==, + } + engines: { node: ">= 0.8" } + encoding@0.1.13: resolution: { @@ -2110,6 +2209,12 @@ packages: } engines: { node: ">=6" } + escape-html@1.0.3: + resolution: + { + integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==, + } + escape-string-regexp@2.0.0: resolution: { @@ -2125,6 +2230,13 @@ packages: engines: { node: ">=4" } hasBin: true + etag@1.8.1: + resolution: + { + integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==, + } + engines: { node: ">= 0.6" } + event-target-shim@5.0.1: resolution: { @@ -2138,6 +2250,20 @@ packages: integrity: sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==, } + eventsource-parser@3.0.2: + resolution: + { + integrity: sha512-6RxOBZ/cYgd8usLwsEl+EC09Au/9BcmCKYF2/xbml6DNczf7nv0MQb+7BA2F+li6//I+28VNlQR37XfQtcAJuA==, + } + engines: { node: ">=18.0.0" } + + eventsource@3.0.7: + resolution: + { + integrity: sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==, + } + engines: { node: ">=18.0.0" } + execa@5.1.1: resolution: { @@ -2166,12 +2292,34 @@ packages: } engines: { node: ^14.15.0 || ^16.10.0 || >=18.0.0 } + express-rate-limit@7.5.0: + resolution: + { + integrity: sha512-eB5zbQh5h+VenMPM3fh+nw1YExi5nMr6HUCR62ELSP11huvxm/Uir1H1QEyTkk5QX6A58pX6NmaTMceKZ0Eodg==, + } + engines: { node: ">= 16" } + peerDependencies: + express: ^4.11 || 5 || ^5.0.0-beta.1 + + express@5.1.0: + resolution: + { + integrity: sha512-DT9ck5YIRU+8GYzzU5kT3eHGA5iL+1Zd0EutOmTE9Dtk+Tvuzd23VBU+ec7HPNSTxXYO55gPV/hq4pSBJDjFpA==, + } + engines: { node: ">= 18" } + extend@3.0.2: resolution: { integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==, } + fast-deep-equal@3.1.3: + resolution: + { + integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==, + } + fast-glob@3.3.3: resolution: { @@ -2227,6 +2375,13 @@ packages: } engines: { node: ">=8" } + finalhandler@2.1.0: + resolution: + { + integrity: sha512-/t88Ty3d5JWQbWYgaOGCCYfXRwV1+be02WqYYlL6h0lEiUAMPM8o8qKGO01YIkOHzka2up08wvgYD0mDiI+q3Q==, + } + engines: { node: ">= 0.8" } + find-up@4.1.0: resolution: { @@ -2280,6 +2435,20 @@ packages: } engines: { node: ">= 12.20" } + forwarded@0.2.0: + resolution: + { + integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==, + } + engines: { node: ">= 0.6" } + + fresh@2.0.0: + resolution: + { + integrity: sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==, + } + engines: { node: ">= 0.8" } + fs-constants@1.0.0: resolution: { @@ -2518,6 +2687,13 @@ packages: integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==, } + http-errors@2.0.0: + resolution: + { + integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==, + } + engines: { node: ">= 0.8" } + http-proxy-agent@4.0.1: resolution: { @@ -2625,6 +2801,13 @@ packages: } engines: { node: ">= 12" } + ipaddr.js@1.9.1: + resolution: + { + integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==, + } + engines: { node: ">= 0.10" } + is-arrayish@0.2.1: resolution: { @@ -2692,6 +2875,12 @@ packages: } engines: { node: ">=0.12.0" } + is-promise@4.0.0: + resolution: + { + integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==, + } + is-stream@2.0.1: resolution: { @@ -3027,6 +3216,12 @@ packages: } engines: { node: ^14.17.0 || ^16.13.0 || >=18.0.0 } + json-schema-traverse@0.4.1: + resolution: + { + integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==, + } + json5@2.2.3: resolution: { @@ -3182,6 +3377,20 @@ packages: integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==, } + media-typer@1.1.0: + resolution: + { + integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==, + } + engines: { node: ">= 0.8" } + + merge-descriptors@2.0.0: + resolution: + { + integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==, + } + engines: { node: ">=18" } + merge-stream@2.0.0: resolution: { @@ -3209,6 +3418,13 @@ packages: } engines: { node: ">= 0.6" } + mime-db@1.54.0: + resolution: + { + integrity: sha512-aU5EJuIN2WDemCcAp2vFBfp/m4EAhWJnUNSSw0ixs7/kXbd6Pg64EmwJkNdFhB8aWt1sH2CTXrLxo/iAGV3oPQ==, + } + engines: { node: ">= 0.6" } + mime-types@2.1.35: resolution: { @@ -3216,6 +3432,13 @@ packages: } engines: { node: ">= 0.6" } + mime-types@3.0.1: + resolution: + { + integrity: sha512-xRc4oEhT6eaBpU1XF7AjpOFD+xQmXNB5OVKwp4tqCuBpHLS/ZbBDrc07mYTDqVMg6PfxUjjNp85O6Cd2Z/5HWA==, + } + engines: { node: ">= 0.6" } + mimic-fn@2.1.0: resolution: { @@ -3379,6 +3602,13 @@ packages: } engines: { node: ">= 0.6" } + negotiator@1.0.0: + resolution: + { + integrity: sha512-8Ofs/AUQh8MaEcrlq5xOX0CQ9ypTF5dl78mjlMNfOK08fzpgTHQRQPBxcPlEtIw0yRpws+Zo/3r+5WRby7u3Gg==, + } + engines: { node: ">= 0.6" } + neo4j-driver-bolt-connection@5.28.1: resolution: { @@ -3501,6 +3731,13 @@ packages: } engines: { node: ">=0.10.0" } + object-inspect@1.13.4: + resolution: + { + integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==, + } + engines: { node: ">= 0.4" } + obuf@1.1.2: resolution: { @@ -3513,6 +3750,13 @@ packages: integrity: sha512-pvOuEYa2WkkAumxzJP0RdEYHkbZ64AYyyUszXVX7ruLvk5L+EiO2G71da2GqEQ4IAk4j6eLoUbGk5arzFT1wJA==, } + on-finished@2.4.1: + resolution: + { + integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==, + } + engines: { node: ">= 0.8" } + once@1.4.0: resolution: { @@ -3630,6 +3874,13 @@ packages: } engines: { node: ">=16" } + parseurl@1.3.3: + resolution: + { + integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==, + } + engines: { node: ">= 0.8" } + path-exists@4.0.0: resolution: { @@ -3664,6 +3915,13 @@ packages: } engines: { node: ">=16 || 14 >=14.18" } + path-to-regexp@8.2.0: + resolution: + { + integrity: sha512-TdrF7fW9Rphjq4RjrW0Kp2AW0Ahwu9sRGTkS6bvDi0SCwZlEZYmcfDbEsTz8RVk0EHIS/Vd1bv3JhG+1xZuAyQ==, + } + engines: { node: ">=16" } + pg-cloudflare@1.1.1: resolution: { @@ -3763,6 +4021,13 @@ packages: } engines: { node: ">= 6" } + pkce-challenge@5.0.0: + resolution: + { + integrity: sha512-ueGLflrrnvwB3xuo/uGob5pd5FN7l0MsLf0Z87o/UQmRtwjvfylfc9MurIxRAWywCYTgrvpXBcqjV4OfCYGCIQ==, + } + engines: { node: ">=16.20.0" } + pkg-dir@4.2.0: resolution: { @@ -3908,6 +4173,13 @@ packages: } engines: { node: ">= 6" } + proxy-addr@2.0.7: + resolution: + { + integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==, + } + engines: { node: ">= 0.10" } + proxy-from-env@1.1.0: resolution: { @@ -3939,12 +4211,33 @@ packages: integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==, } + qs@6.14.0: + resolution: + { + integrity: sha512-YWWTjgABSKcvs/nWBi9PycY/JiPJqOD4JA6o9Sej2AtvSGarXxKC3OQSk4pAarbdQlKAh5D4FCQkJNkW+GAn3w==, + } + engines: { node: ">=0.6" } + queue-microtask@1.2.3: resolution: { integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==, } + range-parser@1.2.1: + resolution: + { + integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==, + } + engines: { node: ">= 0.6" } + + raw-body@3.0.0: + resolution: + { + integrity: sha512-RmkhL8CAyCRPXCE28MMH0z2PNWQBNk2Q09ZdxM9IOOXwxwZbN+qbWaatPkdkWIKL2ZVDImrN/pK5HTRz2PcS4g==, + } + engines: { node: ">= 0.8" } + rc@1.2.8: resolution: { @@ -4072,6 +4365,13 @@ packages: engines: { node: ">=18.0.0", npm: ">=8.0.0" } hasBin: true + router@2.2.0: + resolution: + { + integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==, + } + engines: { node: ">= 18" } + run-parallel@1.2.0: resolution: { @@ -4111,12 +4411,32 @@ packages: engines: { node: ">=10" } hasBin: true + send@1.2.0: + resolution: + { + integrity: sha512-uaW0WwXKpL9blXE2o0bRhoL2EGXIrZxQ2ZQ4mgcfoBxdFmQold+qWsD2jLrfZ0trjKL6vOw0j//eAwcALFjKSw==, + } + engines: { node: ">= 18" } + + serve-static@2.2.0: + resolution: + { + integrity: sha512-61g9pCh0Vnh7IutZjtLGGpTA355+OPn2TyDv/6ivP2h/AdAVX9azsoxmg2/M6nZeQZNYBEwIcsne1mJd9oQItQ==, + } + engines: { node: ">= 18" } + set-blocking@2.0.0: resolution: { integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==, } + setprototypeof@1.2.0: + resolution: + { + integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==, + } + shebang-command@2.0.0: resolution: { @@ -4131,6 +4451,34 @@ packages: } engines: { node: ">=8" } + side-channel-list@1.0.0: + resolution: + { + integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==, + } + engines: { node: ">= 0.4" } + + side-channel-map@1.0.1: + resolution: + { + integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==, + } + engines: { node: ">= 0.4" } + + side-channel-weakmap@1.0.2: + resolution: + { + integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==, + } + engines: { node: ">= 0.4" } + + side-channel@1.1.0: + resolution: + { + integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==, + } + engines: { node: ">= 0.4" } + signal-exit@3.0.7: resolution: { @@ -4293,6 +4641,13 @@ packages: } engines: { node: ">=10" } + statuses@2.0.1: + resolution: + { + integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==, + } + engines: { node: ">= 0.8" } + string-length@4.0.2: resolution: { @@ -4464,6 +4819,13 @@ packages: } engines: { node: ">=8.0" } + toidentifier@1.0.1: + resolution: + { + integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==, + } + engines: { node: ">=0.6" } + touch@3.1.1: resolution: { @@ -4602,6 +4964,13 @@ packages: } engines: { node: ">=16" } + type-is@2.0.1: + resolution: + { + integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==, + } + engines: { node: ">= 0.6" } + typescript@5.5.4: resolution: { @@ -4647,6 +5016,13 @@ packages: integrity: sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==, } + unpipe@1.0.0: + resolution: + { + integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==, + } + engines: { node: ">= 0.8" } + update-browserslist-db@1.1.3: resolution: { @@ -4656,6 +5032,12 @@ packages: peerDependencies: browserslist: ">= 4.21.0" + uri-js@4.4.1: + resolution: + { + integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==, + } + util-deprecate@1.0.2: resolution: { @@ -4695,6 +5077,13 @@ packages: integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==, } + vary@1.1.2: + resolution: + { + integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==, + } + engines: { node: ">= 0.8" } + walker@1.0.8: resolution: { @@ -5160,10 +5549,13 @@ snapshots: "@gar/promisify@1.1.3": optional: true - "@google/genai@0.7.0(encoding@0.1.13)": + "@google/genai@1.2.0(@modelcontextprotocol/sdk@1.12.1)(encoding@0.1.13)": dependencies: + "@modelcontextprotocol/sdk": 1.12.1 google-auth-library: 9.15.1(encoding@0.1.13) ws: 8.18.1 + zod: 3.24.2 + zod-to-json-schema: 3.24.5(zod@3.24.2) transitivePeerDependencies: - bufferutil - encoding @@ -5395,6 +5787,22 @@ snapshots: zod: 3.24.2 zod-to-json-schema: 3.24.5(zod@3.24.2) + "@modelcontextprotocol/sdk@1.12.1": + dependencies: + ajv: 6.12.6 + content-type: 1.0.5 + cors: 2.8.5 + cross-spawn: 7.0.6 + eventsource: 3.0.7 + express: 5.1.0 + express-rate-limit: 7.5.0(express@5.1.0) + pkce-challenge: 5.0.0 + raw-body: 3.0.0 + zod: 3.24.2 + zod-to-json-schema: 3.24.5(zod@3.24.2) + transitivePeerDependencies: + - supports-color + "@nodelib/fs.scandir@2.1.5": dependencies: "@nodelib/fs.stat": 2.0.5 @@ -5676,6 +6084,11 @@ snapshots: dependencies: event-target-shim: 5.0.1 + accepts@2.0.0: + dependencies: + mime-types: 3.0.1 + negotiator: 1.0.0 + acorn-walk@8.3.4: dependencies: acorn: 8.14.0 @@ -5701,6 +6114,13 @@ snapshots: indent-string: 4.0.0 optional: true + ajv@6.12.6: + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + ansi-escapes@4.3.2: dependencies: type-fest: 0.21.3 @@ -5826,6 +6246,20 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 + body-parser@2.2.0: + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 4.4.0(supports-color@5.5.0) + http-errors: 2.0.0 + iconv-lite: 0.6.3 + on-finished: 2.4.1 + qs: 6.14.0 + raw-body: 3.0.0 + type-is: 2.0.1 + transitivePeerDependencies: + - supports-color + brace-expansion@1.1.11: dependencies: balanced-match: 1.0.2 @@ -5875,6 +6309,8 @@ snapshots: esbuild: 0.25.1 load-tsconfig: 0.2.5 + bytes@3.1.2: {} + cac@6.7.14: {} cacache@15.3.0: @@ -5906,6 +6342,11 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 + call-bound@1.0.4: + dependencies: + call-bind-apply-helpers: 1.0.2 + get-intrinsic: 1.3.0 + callsites@3.1.0: {} camelcase@5.3.1: {} @@ -5988,8 +6429,23 @@ snapshots: dependencies: simple-wcswidth: 1.0.1 + content-disposition@1.0.0: + dependencies: + safe-buffer: 5.2.1 + + content-type@1.0.5: {} + convert-source-map@2.0.0: {} + cookie-signature@1.2.2: {} + + cookie@0.7.2: {} + + cors@2.8.5: + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + create-jest@29.7.0(@types/node@22.13.5)(ts-node@10.9.2(@types/node@22.13.5)(typescript@5.5.4)): dependencies: "@jest/types": 29.6.3 @@ -6038,6 +6494,8 @@ snapshots: delegates@1.0.0: optional: true + depd@2.0.0: {} + detect-libc@2.0.3: {} detect-newline@3.1.0: {} @@ -6065,6 +6523,8 @@ snapshots: dependencies: safe-buffer: 5.2.1 + ee-first@1.1.1: {} + ejs@3.1.10: dependencies: jake: 10.9.2 @@ -6077,6 +6537,8 @@ snapshots: emoji-regex@9.2.2: {} + encodeurl@2.0.0: {} + encoding@0.1.13: dependencies: iconv-lite: 0.6.3 @@ -6141,14 +6603,24 @@ snapshots: escalade@3.2.0: {} + escape-html@1.0.3: {} + escape-string-regexp@2.0.0: {} esprima@4.0.1: {} + etag@1.8.1: {} + event-target-shim@5.0.1: {} eventemitter3@4.0.7: {} + eventsource-parser@3.0.2: {} + + eventsource@3.0.7: + dependencies: + eventsource-parser: 3.0.2 + execa@5.1.1: dependencies: cross-spawn: 7.0.6 @@ -6173,8 +6645,46 @@ snapshots: jest-message-util: 29.7.0 jest-util: 29.7.0 + express-rate-limit@7.5.0(express@5.1.0): + dependencies: + express: 5.1.0 + + express@5.1.0: + dependencies: + accepts: 2.0.0 + body-parser: 2.2.0 + content-disposition: 1.0.0 + content-type: 1.0.5 + cookie: 0.7.2 + cookie-signature: 1.2.2 + debug: 4.4.0(supports-color@5.5.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.1 + 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.2.0 + serve-static: 2.2.0 + statuses: 2.0.1 + type-is: 2.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + extend@3.0.2: {} + fast-deep-equal@3.1.3: {} + fast-glob@3.3.3: dependencies: "@nodelib/fs.stat": 2.0.5 @@ -6207,6 +6717,17 @@ snapshots: dependencies: to-regex-range: 5.0.1 + finalhandler@2.1.0: + dependencies: + debug: 4.4.0(supports-color@5.5.0) + encodeurl: 2.0.0 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -6240,6 +6761,10 @@ snapshots: node-domexception: 1.0.0 web-streams-polyfill: 4.0.0-beta.3 + forwarded@0.2.0: {} + + fresh@2.0.0: {} + fs-constants@1.0.0: {} fs-minipass@2.1.0: @@ -6405,6 +6930,14 @@ snapshots: http-cache-semantics@4.1.1: optional: true + http-errors@2.0.0: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + http-proxy-agent@4.0.1: dependencies: "@tootallnate/once": 1.1.2 @@ -6438,7 +6971,6 @@ snapshots: iconv-lite@0.6.3: dependencies: safer-buffer: 2.1.2 - optional: true ieee754@1.2.1: {} @@ -6472,6 +7004,8 @@ snapshots: sprintf-js: 1.1.3 optional: true + ipaddr.js@1.9.1: {} + is-arrayish@0.2.1: {} is-binary-path@2.1.0: @@ -6499,6 +7033,8 @@ snapshots: is-number@7.0.0: {} + is-promise@4.0.0: {} + is-stream@2.0.1: {} isexe@2.0.0: {} @@ -6892,6 +7428,8 @@ snapshots: json-parse-even-better-errors@3.0.2: {} + json-schema-traverse@0.4.1: {} + json5@2.2.3: {} jwa@2.0.0: @@ -6991,6 +7529,10 @@ snapshots: crypt: 0.0.2 is-buffer: 1.1.6 + media-typer@1.1.0: {} + + merge-descriptors@2.0.0: {} + merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -7002,10 +7544,16 @@ snapshots: mime-db@1.52.0: {} + mime-db@1.54.0: {} + mime-types@2.1.35: dependencies: mime-db: 1.52.0 + mime-types@3.0.1: + dependencies: + mime-db: 1.54.0 + mimic-fn@2.1.0: {} mimic-response@3.1.0: {} @@ -7090,6 +7638,8 @@ snapshots: negotiator@0.6.4: optional: true + negotiator@1.0.0: {} + neo4j-driver-bolt-connection@5.28.1: dependencies: buffer: 6.0.3 @@ -7179,12 +7729,18 @@ snapshots: object-assign@4.1.1: {} + object-inspect@1.13.4: {} + obuf@1.1.2: {} ollama@0.5.14: dependencies: whatwg-fetch: 3.6.20 + on-finished@2.4.1: + dependencies: + ee-first: 1.1.1 + once@1.4.0: dependencies: wrappy: 1.0.2 @@ -7262,6 +7818,8 @@ snapshots: lines-and-columns: 2.0.4 type-fest: 3.13.1 + parseurl@1.3.3: {} + path-exists@4.0.0: {} path-is-absolute@1.0.1: {} @@ -7275,6 +7833,8 @@ snapshots: lru-cache: 10.4.3 minipass: 7.1.2 + path-to-regexp@8.2.0: {} + pg-cloudflare@1.1.1: optional: true @@ -7332,6 +7892,8 @@ snapshots: pirates@4.0.6: {} + pkce-challenge@5.0.0: {} + pkg-dir@4.2.0: dependencies: find-up: 4.1.0 @@ -7408,6 +7970,11 @@ snapshots: kleur: 3.0.3 sisteransi: 1.0.5 + proxy-addr@2.0.7: + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + proxy-from-env@1.1.0: {} pstree.remy@1.1.8: {} @@ -7421,8 +7988,21 @@ snapshots: pure-rand@6.1.0: {} + qs@6.14.0: + dependencies: + side-channel: 1.1.0 + queue-microtask@1.2.3: {} + range-parser@1.2.1: {} + + raw-body@3.0.0: + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.6.3 + unpipe: 1.0.0 + rc@1.2.8: dependencies: deep-extend: 0.6.0 @@ -7518,6 +8098,16 @@ snapshots: "@rollup/rollup-win32-x64-msvc": 4.37.0 fsevents: 2.3.3 + router@2.2.0: + dependencies: + debug: 4.4.0(supports-color@5.5.0) + depd: 2.0.0 + is-promise: 4.0.0 + parseurl: 1.3.3 + path-to-regexp: 8.2.0 + transitivePeerDependencies: + - supports-color + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 @@ -7528,22 +8118,76 @@ snapshots: safe-buffer@5.2.1: {} - safer-buffer@2.1.2: - optional: true + safer-buffer@2.1.2: {} semver@6.3.1: {} semver@7.7.1: {} + send@1.2.0: + dependencies: + debug: 4.4.0(supports-color@5.5.0) + 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 + transitivePeerDependencies: + - supports-color + + serve-static@2.2.0: + dependencies: + encodeurl: 2.0.0 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 1.2.0 + transitivePeerDependencies: + - supports-color + set-blocking@2.0.0: optional: true + setprototypeof@1.2.0: {} + shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 shebang-regex@3.0.0: {} + side-channel-list@1.0.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + + side-channel-map@1.0.1: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + + side-channel-weakmap@1.0.2: + dependencies: + call-bound: 1.0.4 + es-errors: 1.3.0 + get-intrinsic: 1.3.0 + object-inspect: 1.13.4 + side-channel-map: 1.0.1 + + side-channel@1.1.0: + dependencies: + es-errors: 1.3.0 + object-inspect: 1.13.4 + side-channel-list: 1.0.0 + side-channel-map: 1.0.1 + side-channel-weakmap: 1.0.2 + signal-exit@3.0.7: {} signal-exit@4.1.0: {} @@ -7640,6 +8284,8 @@ snapshots: dependencies: escape-string-regexp: 2.0.0 + statuses@2.0.1: {} + string-length@4.0.2: dependencies: char-regex: 1.0.2 @@ -7752,6 +8398,8 @@ snapshots: dependencies: is-number: 7.0.0 + toidentifier@1.0.1: {} + touch@3.1.1: {} tr46@0.0.3: {} @@ -7843,6 +8491,12 @@ snapshots: type-fest@4.35.0: {} + type-is@2.0.1: + dependencies: + content-type: 1.0.5 + media-typer: 1.1.0 + mime-types: 3.0.1 + typescript@5.5.4: {} undefsafe@2.0.5: {} @@ -7865,12 +8519,18 @@ snapshots: imurmurhash: 0.1.4 optional: true + unpipe@1.0.0: {} + update-browserslist-db@1.1.3(browserslist@4.24.4): dependencies: browserslist: 4.24.4 escalade: 3.2.0 picocolors: 1.1.1 + uri-js@4.4.1: + dependencies: + punycode: 2.3.1 + util-deprecate@1.0.2: {} uuid@10.0.0: {} @@ -7890,6 +8550,8 @@ snapshots: spdx-correct: 3.2.0 spdx-expression-parse: 3.0.1 + vary@1.1.2: {} + walker@1.0.8: dependencies: makeerror: 1.0.12 diff --git a/mem0-ts/src/client/mem0.ts b/mem0-ts/src/client/mem0.ts index 7de835c6..cff41c0c 100644 --- a/mem0-ts/src/client/mem0.ts +++ b/mem0-ts/src/client/mem0.ts @@ -159,10 +159,7 @@ export default class MemoryClient { return jsonResponse; } - _preparePayload( - messages: Array, - options: MemoryOptions, - ): object { + _preparePayload(messages: Array, options: MemoryOptions): object { const payload: any = {}; payload.messages = messages; return { ...payload, ...options }; diff --git a/mem0-ts/src/oss/src/config/manager.ts b/mem0-ts/src/oss/src/config/manager.ts index 01996e0f..1911cbaf 100644 --- a/mem0-ts/src/oss/src/config/manager.ts +++ b/mem0-ts/src/oss/src/config/manager.ts @@ -78,7 +78,7 @@ export class ConfigManager { } else if (userConf?.model && typeof userConf.model === "string") { finalModel = userConf.model; } - + return { baseURL: userConf?.baseURL || defaultConf.baseURL, apiKey: diff --git a/mem0-ts/src/oss/src/llms/openai.ts b/mem0-ts/src/oss/src/llms/openai.ts index 2d448fb3..bc995f7b 100644 --- a/mem0-ts/src/oss/src/llms/openai.ts +++ b/mem0-ts/src/oss/src/llms/openai.ts @@ -7,7 +7,10 @@ export class OpenAILLM implements LLM { private model: string; constructor(config: LLMConfig) { - this.openai = new OpenAI({ apiKey: config.apiKey, baseURL: config.baseURL }); + this.openai = new OpenAI({ + apiKey: config.apiKey, + baseURL: config.baseURL, + }); this.model = config.model || "gpt-4o-mini"; }