diff --git a/composio/docker-compose.yaml b/composio/docker-compose.yaml new file mode 100644 index 0000000..9174eff --- /dev/null +++ b/composio/docker-compose.yaml @@ -0,0 +1,27 @@ +name: restack-composio-example +services: + restack_engine: + image: ghcr.io/restackio/restack:main + ports: + - "5233:5233" + - "6233:6233" + - "7233:7233" + environment: + - RESTACK_ENGINE_ID + - RESTACK_ENGINE_ADDRESS + - RESTACK_ENGINE_API_KEY + composio: + image: composio + build: + context: . + dockerfile: Dockerfile + ports: + - "4000:4000" + environment: + - COMPOSIO_API_KEY + - OPENAI_API_KEY + - RESTACK_ENGINE_ID + - RESTACK_ENGINE_ADDRESS + - RESTACK_ENGINE_API_KEY + depends_on: + - restack_engine \ No newline at end of file diff --git a/composio/package.json b/composio/package.json index 9d84a1c..1ec53b5 100644 --- a/composio/package.json +++ b/composio/package.json @@ -3,13 +3,14 @@ "version": "1.0.0", "description": "Basic Gemini example", "scripts": { - "start": "ts-node src/services.ts", - "start.watch": "nodemon src/services.ts", - "dev": "pnpm start.watch", + "dev": "tsx watch --include src src/services.ts", "build": "tsc --build", + "schedule-workflow": "tsx scheduleWorkflow.ts", "clean": "rm -rf node_modules", - "schedule": "ts-node ./scheduleWorkflow.ts", - "restack-up": "node restack_up.mjs" + "restack-engine": "docker run -d --pull always --name restack -p 5233:5233 -p 6233:6233 -p 7233:7233 ghcr.io/restackio/restack:main", + "docker:build": "docker build -t composio .", + "docker:run": "docker run -d -p 4000:4000 composio", + "restack-up": "dotenv -e .env tsx restack_up.mjs" }, "nodemonConfig": { "execMap": { @@ -21,16 +22,20 @@ ] }, "dependencies": { - "@restackio/ai": "^0.0.85", - "@restackio/integrations-composio": "^0.0.6", - "@temporalio/workflow": "^1.11.2", - "dotenv": "^16.4.5" + "@restackio/ai": "0.0.86", + "@temporalio/workflow": "1.11.2", + "dotenv": "16.4.5", + "composio-core": "0.2.9-10-1", + "install": "^0.13.0", + "openai": "4.73.1" }, "devDependencies": { - "@restackio/cloud": "^1.0.19", - "@types/node": "^20.16.9", - "nodemon": "^2.0.22", - "ts-node": "^10.9.2", - "typescript": "^5.6.3" + "@restackio/cloud": "1.0.21", + "@types/node": "20.16.9", + "dotenv-cli": "^7.4.4", + "nodemon": "2.0.22", + "ts-node": "10.9.2", + "tsx": "4.19.2", + "typescript": "5.6.3" } } diff --git a/composio/pnpm-lock.yaml b/composio/pnpm-lock.yaml index ebb127f..6440ed1 100644 --- a/composio/pnpm-lock.yaml +++ b/composio/pnpm-lock.yaml @@ -9,33 +9,45 @@ importers: .: dependencies: '@restackio/ai': - specifier: ^0.0.85 - version: 0.0.85 - '@restackio/integrations-composio': - specifier: ^0.0.6 - version: 0.0.6(@swc/core@1.9.3)(@types/node@20.17.7)(bufferutil@4.0.8)(react@18.3.1)(sswr@2.1.0(svelte@5.1.4))(svelte@5.1.4)(typescript@5.7.2)(utf-8-validate@6.0.5)(vue@3.5.12(typescript@5.7.2))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5))(zod@3.23.8) + specifier: 0.0.86 + version: 0.0.86 '@temporalio/workflow': - specifier: ^1.11.2 - version: 1.11.5 + specifier: 1.11.2 + version: 1.11.2 + composio-core: + specifier: 0.2.9-10-1 + version: 0.2.9-10-1(@swc/core@1.9.3)(@types/node@20.16.9)(bufferutil@4.0.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.7))(svelte@5.2.7)(typescript@5.6.3)(utf-8-validate@6.0.5)(vue@3.5.13(typescript@5.6.3))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)) dotenv: - specifier: ^16.4.5 + specifier: 16.4.5 version: 16.4.5 + install: + specifier: ^0.13.0 + version: 0.13.0 + openai: + specifier: 4.73.1 + version: 4.73.1(zod@3.23.8) devDependencies: '@restackio/cloud': - specifier: ^1.0.19 - version: 1.0.19 + specifier: 1.0.21 + version: 1.0.21 '@types/node': - specifier: ^20.16.9 - version: 20.17.7 + specifier: 20.16.9 + version: 20.16.9 + dotenv-cli: + specifier: ^7.4.4 + version: 7.4.4 nodemon: - specifier: ^2.0.22 + specifier: 2.0.22 version: 2.0.22 ts-node: - specifier: ^10.9.2 - version: 10.9.2(@swc/core@1.9.3)(@types/node@20.17.7)(typescript@5.7.2) + specifier: 10.9.2 + version: 10.9.2(@swc/core@1.9.3)(@types/node@20.16.9)(typescript@5.6.3) + tsx: + specifier: 4.19.2 + version: 4.19.2 typescript: - specifier: ^5.6.3 - version: 5.7.2 + specifier: 5.6.3 + version: 5.6.3 integrations/openai: dependencies: @@ -191,6 +203,150 @@ packages: engines: {node: '>=18'} deprecated: 'The package @e2b/sdk has been renamed to e2b. Please uninstall the old one and install the new by running following command: npm uninstall @e2b/sdk && npm install e2b' + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@faker-js/faker@8.4.1': resolution: {integrity: sha512-XQ3cU+Q8Uqmrbf2e0cIC/QN43sTBSC8KF12u29Mb47tWrt2hAgBXSgpZMj4Ao8Uk0iJcU99QsOCaIL8934obCg==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0, npm: '>=6.14.13'} @@ -208,8 +364,8 @@ packages: engines: {node: '>=6'} hasBin: true - '@hey-api/client-axios@0.2.10': - resolution: {integrity: sha512-EXTf9WcZCyzRIi1JEbKbJ4JvB+TLy9WsSaBKRUwd7d8c6PYQ+MRJCTnkzGJk1wXkeBLqJEwyf2IZH/qmCkDhqg==} + '@hey-api/client-axios@0.2.11': + resolution: {integrity: sha512-jyJAsEkdi5ybAGTSfZD8gaKRCVid25h3qWQQ+BzgmBmlw2X5dIQaXXXnOxAQJxLD9Q+FWUh2MspLKIZ16MQ3Dw==} peerDependencies: axios: '>= 1.0.0 < 2' @@ -386,20 +542,14 @@ packages: resolution: {integrity: sha512-IlfnMo8c6qHBRag2K6OnUwP6OflQYuzDk1XlocpvnbwPwDnni8Zgzz1f4xRJvcfxpJETKIHCscWXSGMjVLNfvg==} engines: {node: '>=20'} - '@restackio/ai@0.0.85': - resolution: {integrity: sha512-UWDcywhNjcTn7TbgqJL1ahzpf722RZV57rnR/b5s48eMgUHZNNxMJWDvCYIW5IZKEvzLp124iu0FNrV9UbKTpA==} + '@restackio/ai@0.0.86': + resolution: {integrity: sha512-i4krGAb6mGRhk+5+H81uUK+mfu8DDBGtqb+HaSDq2uXDflrmbO+CrNbMfv5WMQKH6GMjM/RNw5CO7f6be48CsA==} engines: {node: '>=20'} - '@restackio/cloud@1.0.19': - resolution: {integrity: sha512-UJNfM4di6qGa3EqAZzUdcrGjK6tIj2YmQbGZouBZjpHDqG3kbzMZkgNPcW/UsCp0HYCKS36pUmDy6m1GkMFgNQ==} + '@restackio/cloud@1.0.21': + resolution: {integrity: sha512-KZTl9vww0eGoAVf7TKmOIk9fJ+OIlLzwjLzJb2tILFsye08nvmEvVM5KW8oCxyeXxtAyATYsysqs626XND5p1g==} engines: {node: '>=18'} - '@restackio/integrations-composio@0.0.6': - resolution: {integrity: sha512-cHF1PtOa6oU9LcQemEKWLzyx0niSaM6kTTwgA43cGYt+lENabWRHmMwo9D5bFzzIaGpeMDVVvJLkYMYbILzM4w==} - - '@restackio/integrations-openai@0.0.32': - resolution: {integrity: sha512-nGPCCqm4xzlmzCtMcr+kvks5WkexPb8z+dGP7Eom10ELZXVeGLzdmEEBS8V2DUpkTJPP7Zfqufb2LVHfkTuXzA==} - '@swc/core-darwin-arm64@1.7.2': resolution: {integrity: sha512-Zb8KiGaESzOgh5HBnp6Vhs2fRpngHIT81JOfIo0oaGlzAckamnG7UAXC/yK6cQ8q2KXc78utJ/yq/NM2yVKLqw==} engines: {node: '>=10'} @@ -631,6 +781,9 @@ packages: '@temporalio/common@1.11.1': resolution: {integrity: sha512-8fQwmYHMakSbqMX26FNfiLwBwVwsMNbGmVfGaFOqy72QZuUiXxgmImXQhK6ir1ieeH8bLyY5laAosB4W6VPBAA==} + '@temporalio/common@1.11.2': + resolution: {integrity: sha512-2bUDFGhxWG7uLROkA0aP5oy6NPSmL+mPttObecMAXQqOs7Hb4s1o9uBQ98nojy25zauzvx5btIO/H+5UxUXfOQ==} + '@temporalio/common@1.11.5': resolution: {integrity: sha512-6cgGTAT+jSKKwCPOoUDIseJuDroP7cEIAX/pYpNBRGvfj+lpU8GitSVsPEZTVoMQ400otzBa1n80aH8bnOLVTw==} @@ -643,6 +796,9 @@ packages: '@temporalio/proto@1.11.1': resolution: {integrity: sha512-qTNSsU88IOJbv6lhWyW0qAHAYg4euEW/NNPgAp5ohfPkqaw+/j51QABO9E6m/KQwMZ6x43z2JjQRS37aC6Psiw==} + '@temporalio/proto@1.11.2': + resolution: {integrity: sha512-h7Iw5hmUf8dGaozpk3WyRuOB5ZzBaFensfocK2eGui15ocNvtAb/aLFsxVJ6xOtryOsHTkgRam5BBZi0NOj+cA==} + '@temporalio/proto@1.11.5': resolution: {integrity: sha512-LjRGQdLRpRxDp2NSyNyhCp7JLaUlMY2T+hAeGfueR5cOVZxHXTO8TXnnjimi0UM1knyA6sW3yNJCNieKlCcASg==} @@ -657,6 +813,9 @@ packages: '@temporalio/workflow@1.11.1': resolution: {integrity: sha512-aTfoHPc6O/7UioOSe+PHmpzLZveG2qn0VI/snlclPFs8VO8r5hcbXb5jYeuzCi26mm7Z+Dxmf2hCK77tJlPeKg==} + '@temporalio/workflow@1.11.2': + resolution: {integrity: sha512-2E9hNKkeboOcdOddC/hd/bXL5kCfw2BgxskuPX8ipr6o8nQ7DaVFQapn+jEuw0pn7A5mLpPuNqF94vnZ4E37gQ==} + '@temporalio/workflow@1.11.5': resolution: {integrity: sha512-U0kGoQ6bttEiT59km+cpeSxVr2Bq8ZHmlurP2N+9nQdxa10RsMqrp5YQrJQfg7KrfrYbeY1HyJBQ7Ljy1FrOtQ==} @@ -696,23 +855,14 @@ packages: '@types/node-fetch@2.6.11': resolution: {integrity: sha512-24xFj9R5+rfQJLRyM56qh+wnVSYhyXC2tkoBndtY0U+vubqNsYXGjufB2nn8Q6gt0LrARwL6UBtMCSVCwl4B1g==} - '@types/node-fetch@2.6.12': - resolution: {integrity: sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA==} - '@types/node@14.18.63': resolution: {integrity: sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==} '@types/node@18.19.42': resolution: {integrity: sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==} - '@types/node@18.19.65': - resolution: {integrity: sha512-Ay5BZuO1UkTmVHzZJNvZKw/E+iB3GQABb6kijEz89w2JrfhNA+M/ebp18pfz9Gqe9ywhMC8AA8yC01lZq48J+Q==} - - '@types/node@20.16.10': - resolution: {integrity: sha512-vQUKgWTjEIRFCvK6CyriPH3MZYiYlNy0fKiEYHWbcoWLEgs4opurGGKlebrTLqdSMIbXImH6XExNiIyNUv3WpA==} - - '@types/node@20.17.7': - resolution: {integrity: sha512-sZXXnpBFMKbao30dUAvzKbdwA2JM1fwUtVEq/kxKuPI5mMwZiRElCpTXb0Biq/LMEVpXDZL5G5V0RPnxKeyaYg==} + '@types/node@20.16.9': + resolution: {integrity: sha512-rkvIVJxsOfBejxK7I0FO5sa2WxFmJCzoDwcd88+fq/CUfynNywTo/1/T6hyFz22CyztsnLS9nVlHOnTI36RH5w==} '@types/node@22.9.3': resolution: {integrity: sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw==} @@ -729,34 +879,34 @@ packages: '@types/wrap-ansi@3.0.0': resolution: {integrity: sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==} - '@vue/compiler-core@3.5.12': - resolution: {integrity: sha512-ISyBTRMmMYagUxhcpyEH0hpXRd/KqDU4ymofPgl2XAkY9ZhQ+h0ovEZJIiPop13UmR/54oA2cgMDjgroRelaEw==} + '@vue/compiler-core@3.5.13': + resolution: {integrity: sha512-oOdAkwqUfW1WqpwSYJce06wvt6HljgY3fGeM9NcVA1HaYOij3mZG9Rkysn0OHuyUAGMbEbARIpsG+LPVlBJ5/Q==} - '@vue/compiler-dom@3.5.12': - resolution: {integrity: sha512-9G6PbJ03uwxLHKQ3P42cMTi85lDRvGLB2rSGOiQqtXELat6uI4n8cNz9yjfVHRPIu+MsK6TE418Giruvgptckg==} + '@vue/compiler-dom@3.5.13': + resolution: {integrity: sha512-ZOJ46sMOKUjO3e94wPdCzQ6P1Lx/vhp2RSvfaab88Ajexs0AHeV0uasYhi99WPaogmBlRHNRuly8xV75cNTMDA==} - '@vue/compiler-sfc@3.5.12': - resolution: {integrity: sha512-2k973OGo2JuAa5+ZlekuQJtitI5CgLMOwgl94BzMCsKZCX/xiqzJYzapl4opFogKHqwJk34vfsaKpfEhd1k5nw==} + '@vue/compiler-sfc@3.5.13': + resolution: {integrity: sha512-6VdaljMpD82w6c2749Zhf5T9u5uLBWKnVue6XWxprDobftnletJ8+oel7sexFfM3qIxNmVE7LSFGTpv6obNyaQ==} - '@vue/compiler-ssr@3.5.12': - resolution: {integrity: sha512-eLwc7v6bfGBSM7wZOGPmRavSWzNFF6+PdRhE+VFJhNCgHiF8AM7ccoqcv5kBXA2eWUfigD7byekvf/JsOfKvPA==} + '@vue/compiler-ssr@3.5.13': + resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} - '@vue/reactivity@3.5.12': - resolution: {integrity: sha512-UzaN3Da7xnJXdz4Okb/BGbAaomRHc3RdoWqTzlvd9+WBR5m3J39J1fGcHes7U3za0ruYn/iYy/a1euhMEHvTAg==} + '@vue/reactivity@3.5.13': + resolution: {integrity: sha512-NaCwtw8o48B9I6L1zl2p41OHo/2Z4wqYGGIK1Khu5T7yxrn+ATOixn/Udn2m+6kZKB/J7cuT9DbWWhRxqixACg==} - '@vue/runtime-core@3.5.12': - resolution: {integrity: sha512-hrMUYV6tpocr3TL3Ad8DqxOdpDe4zuQY4HPY3X/VRh+L2myQO8MFXPAMarIOSGNu0bFAjh1yBkMPXZBqCk62Uw==} + '@vue/runtime-core@3.5.13': + resolution: {integrity: sha512-Fj4YRQ3Az0WTZw1sFe+QDb0aXCerigEpw418pw1HBUKFtnQHWzwojaukAs2X/c9DQz4MQ4bsXTGlcpGxU/RCIw==} - '@vue/runtime-dom@3.5.12': - resolution: {integrity: sha512-q8VFxR9A2MRfBr6/55Q3umyoN7ya836FzRXajPB6/Vvuv0zOPL+qltd9rIMzG/DbRLAIlREmnLsplEF/kotXKA==} + '@vue/runtime-dom@3.5.13': + resolution: {integrity: sha512-dLaj94s93NYLqjLiyFzVs9X6dWhTdAlEAciC3Moq7gzAc13VJUdCnjjRurNM6uTLFATRHexHCTu/Xp3eW6yoog==} - '@vue/server-renderer@3.5.12': - resolution: {integrity: sha512-I3QoeDDeEPZm8yR28JtY+rk880Oqmj43hreIBVTicisFTx/Dl7JpG72g/X7YF8hnQD3IFhkky5i2bPonwrTVPg==} + '@vue/server-renderer@3.5.13': + resolution: {integrity: sha512-wAi4IRJV/2SAW3htkTlB+dHeRmpTiVIK1OGLWV1yeStVSebSQQOwGwIq0D3ZIoBj2C2qpgz5+vX9iEBkTdk5YA==} peerDependencies: - vue: 3.5.12 + vue: 3.5.13 - '@vue/shared@3.5.12': - resolution: {integrity: sha512-L2RPSAwUFbgZH20etwrXyVyCBu9OxRSi8T/38QsvnkJyvq2LufW2lDCOzm7t/U9C1mkhJGWYfCuFBCmIuNivrg==} + '@vue/shared@3.5.13': + resolution: {integrity: sha512-/hnE/qP5ZoGpol0a5mDi45bOd7t3tjYJBjsgCsivow7D48cJeV5l05RD82lPqi7gRiphZM37rnhW1l6ZoCNNnQ==} '@webassemblyjs/ast@1.12.1': resolution: {integrity: sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==} @@ -1111,8 +1261,8 @@ packages: commander@2.20.3: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} - composio-core@0.2.9: - resolution: {integrity: sha512-fMVVu30wBY3uBn3pRs647+SUJImQ/pY/+CsdJyw0G2EyIRVws0XGnNYxMDzXe8mHXwpBB0Xy0BpFVWmCmM8TDg==} + composio-core@0.2.9-10-1: + resolution: {integrity: sha512-EQp+NFmQwXhdQkkIGVMgKw89zQvKyuEqb+jiaTqO1YG27yz/Wd8QLaUxLYObGVKIp0WQgaPFRSLrksrC4MOxTw==} hasBin: true concat-map@0.0.1: @@ -1125,6 +1275,10 @@ packages: create-require@1.1.1: resolution: {integrity: sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} @@ -1184,6 +1338,14 @@ packages: resolution: {integrity: sha512-9wM1BVpVMFr2Pw3eJNXrYYt6DT9k0xMcsSCjtPvyQ+xa1iPg/Mo3T/gUcwI0B2cczqCeCYRPF8yFYDwtFXT0+w==} engines: {node: '>= 8.0'} + dotenv-cli@7.4.4: + resolution: {integrity: sha512-XkBYCG0tPIes+YZr4SpfFv76SQrV/LeCE8CI7JSEMi3VR9MvTihCGTOtbIexD6i2mXF+6px7trb1imVCXSNMDw==} + hasBin: true + + dotenv-expand@10.0.0: + resolution: {integrity: sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==} + engines: {node: '>=12'} + dotenv@16.4.5: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} @@ -1221,6 +1383,11 @@ packages: es-module-lexer@1.5.4: resolution: {integrity: sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==} + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} @@ -1301,10 +1468,6 @@ packages: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} - form-data@4.0.1: - resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} - engines: {node: '>= 6'} - formdata-node@4.4.1: resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} engines: {node: '>= 12.20'} @@ -1324,6 +1487,9 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1346,8 +1512,8 @@ packages: resolution: {integrity: sha512-kUGoI3p7u6B41z/dp33G6OaL7J4DRqRYwVmeIlwLClx7yaaAy7hoDExnuejTKtuDwfcatGmddHDEOjf6EyIxtQ==} engines: {node: '>=10.0.0'} - hono@4.6.11: - resolution: {integrity: sha512-f0LwJQFKdUUrCUAVowxSvNCjyzI7ZLt8XWYU/EApyeq5FfOvHFarBaE5rjU9HTNFk4RI0FkdB2edb3p/7xZjzQ==} + hono@4.6.12: + resolution: {integrity: sha512-eHtf4kSDNw6VVrdbd5IQi16r22m3s7mWPLd7xOMhg1a/Yyb1A0qpUFq8xYMX4FMuDe1nTKeMX5rTx7Nmw+a+Ag==} engines: {node: '>=16.9.0'} humanize-ms@1.2.1: @@ -1435,6 +1601,9 @@ packages: resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} engines: {node: '>=16'} + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + isexe@3.1.1: resolution: {integrity: sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==} engines: {node: '>=16'} @@ -1716,6 +1885,9 @@ packages: minimatch@3.1.2: resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} @@ -1802,8 +1974,8 @@ packages: zod: optional: true - openai@4.73.0: - resolution: {integrity: sha512-NZstV77w3CEol9KQTRBRQ15+Sw6nxVTicAULSjYO4wn9E5gw72Mtp3fAVaBFXyyVPws4241YmFG6ya4L8v03tA==} + openai@4.73.1: + resolution: {integrity: sha512-nWImDJBcUsqrhy7yJScXB4+iqjzbUEgzfA3un/6UnHFdwWhjX24oztj69Ped/njABfOdLcO/F7CeWTI5dt8Xmg==} hasBin: true peerDependencies: zod: ^3.23.8 @@ -1841,6 +2013,10 @@ packages: path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + path-root-regex@0.1.2: resolution: {integrity: sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==} engines: {node: '>=0.10.0'} @@ -1916,6 +2092,9 @@ packages: resolution: {integrity: sha512-SRpNAPW4kewOaNUt8VPqhJ0UMxawMwzJD8V7m1cJfdSTK9ieZwS6K7Dabsm4bmLFM96Z5Y/UznrpG5kt1im8yA==} engines: {node: '>= 12'} + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} + retry@0.13.1: resolution: {integrity: sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg==} engines: {node: '>= 4'} @@ -1964,6 +2143,14 @@ packages: serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -2037,8 +2224,8 @@ packages: resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} engines: {node: '>=10'} - svelte@5.1.4: - resolution: {integrity: sha512-qgHDV7AyvBZa2pbf+V0tnvWrN1LKD8LdUsBkR/SSYVVN6zXexiXnOy5Pjcjft2y/2NJJVa8ORUHFVn3oiWCLVQ==} + svelte@5.2.7: + resolution: {integrity: sha512-cEhPGuLHiH2+Z8B1FwQgiZJgA39uUmJR4516TKrM5zrp0/cuwJkfhUfcTxhAkznanAF5fXUKzvYR4o+Ksx3ZCQ==} engines: {node: '>=18'} swc-loader@0.2.6: @@ -2161,6 +2348,11 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsx@4.19.2: + resolution: {integrity: sha512-pOUl6Vo2LUq/bSa8S5q7b91cgNSjctn9ugq/+Mvow99qW6x/UZYwzxy/3NmqoT66eHYfCVvFvACC58UBPFf28g==} + engines: {node: '>=18.0.0'} + hasBin: true + tweetnacl@0.14.5: resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==} @@ -2180,8 +2372,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - typescript@5.7.2: - resolution: {integrity: sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==} + typescript@5.6.3: + resolution: {integrity: sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==} engines: {node: '>=14.17'} hasBin: true @@ -2235,8 +2427,8 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - vue@3.5.12: - resolution: {integrity: sha512-CLVZtXtn2ItBIi/zHZ0Sg1Xkb7+PU32bJJ8Bmy7ts3jxXTcbfsEfBivFYYWz1Hur+lalqGAh65Coin0r+HRUfg==} + vue@3.5.13: + resolution: {integrity: sha512-wmeiSMxkZCSc+PM2w2VRsOYAZC8GdipNFRTsLSfodVqI9mbejKeXEGr8SckuLnrQPGe3oJN5c3K0vpoU9q/wCQ==} peerDependencies: typescript: '*' peerDependenciesMeta: @@ -2281,6 +2473,11 @@ packages: whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + which@4.0.0: resolution: {integrity: sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==} engines: {node: ^16.13.0 || >=18.0.0} @@ -2407,13 +2604,13 @@ snapshots: transitivePeerDependencies: - zod - '@ai-sdk/svelte@0.0.57(svelte@5.1.4)(zod@3.23.8)': + '@ai-sdk/svelte@0.0.57(svelte@5.2.7)(zod@3.23.8)': dependencies: '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) - sswr: 2.1.0(svelte@5.1.4) + sswr: 2.1.0(svelte@5.2.7) optionalDependencies: - svelte: 5.1.4 + svelte: 5.2.7 transitivePeerDependencies: - zod @@ -2427,13 +2624,13 @@ snapshots: optionalDependencies: zod: 3.23.8 - '@ai-sdk/vue@0.0.59(vue@3.5.12(typescript@5.7.2))(zod@3.23.8)': + '@ai-sdk/vue@0.0.59(vue@3.5.13(typescript@5.6.3))(zod@3.23.8)': dependencies: '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) - swrv: 1.0.4(vue@3.5.12(typescript@5.7.2)) + swrv: 1.0.4(vue@3.5.13(typescript@5.6.3)) optionalDependencies: - vue: 3.5.12(typescript@5.7.2) + vue: 3.5.13(typescript@5.6.3) transitivePeerDependencies: - zod @@ -2490,6 +2687,78 @@ snapshots: bufferutil: 4.0.8 utf-8-validate: 6.0.5 + '@esbuild/aix-ppc64@0.23.1': + optional: true + + '@esbuild/android-arm64@0.23.1': + optional: true + + '@esbuild/android-arm@0.23.1': + optional: true + + '@esbuild/android-x64@0.23.1': + optional: true + + '@esbuild/darwin-arm64@0.23.1': + optional: true + + '@esbuild/darwin-x64@0.23.1': + optional: true + + '@esbuild/freebsd-arm64@0.23.1': + optional: true + + '@esbuild/freebsd-x64@0.23.1': + optional: true + + '@esbuild/linux-arm64@0.23.1': + optional: true + + '@esbuild/linux-arm@0.23.1': + optional: true + + '@esbuild/linux-ia32@0.23.1': + optional: true + + '@esbuild/linux-loong64@0.23.1': + optional: true + + '@esbuild/linux-mips64el@0.23.1': + optional: true + + '@esbuild/linux-ppc64@0.23.1': + optional: true + + '@esbuild/linux-riscv64@0.23.1': + optional: true + + '@esbuild/linux-s390x@0.23.1': + optional: true + + '@esbuild/linux-x64@0.23.1': + optional: true + + '@esbuild/netbsd-x64@0.23.1': + optional: true + + '@esbuild/openbsd-arm64@0.23.1': + optional: true + + '@esbuild/openbsd-x64@0.23.1': + optional: true + + '@esbuild/sunos-x64@0.23.1': + optional: true + + '@esbuild/win32-arm64@0.23.1': + optional: true + + '@esbuild/win32-ia32@0.23.1': + optional: true + + '@esbuild/win32-x64@0.23.1': + optional: true + '@faker-js/faker@8.4.1': {} '@grpc/grpc-js@1.11.2': @@ -2509,13 +2778,13 @@ snapshots: protobufjs: 7.4.0 yargs: 17.7.2 - '@hey-api/client-axios@0.2.10(axios@1.7.7)': + '@hey-api/client-axios@0.2.11(axios@1.7.7)': dependencies: axios: 1.7.7 - '@hono/node-server@1.13.7(hono@4.6.11)': + '@hono/node-server@1.13.7(hono@4.6.12)': dependencies: - hono: 4.6.11 + hono: 4.6.12 '@inquirer/checkbox@2.5.0': dependencies: @@ -2690,13 +2959,13 @@ snapshots: '@kwsites/promise-deferred@1.1.1': {} - '@langchain/core@0.2.36(openai@4.73.0(zod@3.23.8))': + '@langchain/core@0.2.36(openai@4.73.1(zod@3.23.8))': dependencies: ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.15 - langsmith: 0.1.68(openai@4.73.0(zod@3.23.8)) + langsmith: 0.1.68(openai@4.73.1(zod@3.23.8)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -2708,17 +2977,17 @@ snapshots: '@langchain/openai@0.2.11': dependencies: - '@langchain/core': 0.2.36(openai@4.73.0(zod@3.23.8)) + '@langchain/core': 0.2.36(openai@4.73.1(zod@3.23.8)) js-tiktoken: 1.0.15 - openai: 4.73.0(zod@3.23.8) + openai: 4.73.1(zod@3.23.8) zod: 3.23.8 zod-to-json-schema: 3.23.5(zod@3.23.8) transitivePeerDependencies: - encoding - '@langchain/textsplitters@0.0.3(openai@4.73.0(zod@3.23.8))': + '@langchain/textsplitters@0.0.3(openai@4.73.1(zod@3.23.8))': dependencies: - '@langchain/core': 0.2.36(openai@4.73.0(zod@3.23.8)) + '@langchain/core': 0.2.36(openai@4.73.1(zod@3.23.8)) js-tiktoken: 1.0.15 transitivePeerDependencies: - openai @@ -2760,7 +3029,7 @@ snapshots: - uglify-js - webpack-cli - '@restackio/ai@0.0.85': + '@restackio/ai@0.0.86': dependencies: '@temporalio/activity': 1.11.5 '@temporalio/client': 1.11.5 @@ -2772,7 +3041,7 @@ snapshots: - uglify-js - webpack-cli - '@restackio/cloud@1.0.19': + '@restackio/cloud@1.0.21': dependencies: chalk: 4.1.2 dotenv: 16.4.5 @@ -2783,92 +3052,6 @@ snapshots: transitivePeerDependencies: - supports-color - '@restackio/integrations-composio@0.0.6(@swc/core@1.9.3)(@types/node@20.17.7)(bufferutil@4.0.8)(react@18.3.1)(sswr@2.1.0(svelte@5.1.4))(svelte@5.1.4)(typescript@5.7.2)(utf-8-validate@6.0.5)(vue@3.5.12(typescript@5.7.2))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5))(zod@3.23.8)': - dependencies: - '@restackio/integrations-openai': 0.0.32(zod@3.23.8) - composio-core: 0.2.9(@swc/core@1.9.3)(@types/node@20.17.7)(bufferutil@4.0.8)(react@18.3.1)(sswr@2.1.0(svelte@5.1.4))(svelte@5.1.4)(typescript@5.7.2)(utf-8-validate@6.0.5)(vue@3.5.12(typescript@5.7.2))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)) - install: 0.13.0 - transitivePeerDependencies: - - '@aws-sdk/client-s3' - - '@aws-sdk/client-sagemaker-runtime' - - '@aws-sdk/client-sfn' - - '@aws-sdk/credential-provider-node' - - '@azure/storage-blob' - - '@browserbasehq/sdk' - - '@gomomento/sdk' - - '@gomomento/sdk-core' - - '@gomomento/sdk-web' - - '@langchain/anthropic' - - '@langchain/aws' - - '@langchain/cohere' - - '@langchain/google-genai' - - '@langchain/google-vertexai' - - '@langchain/groq' - - '@langchain/mistralai' - - '@langchain/ollama' - - '@mendable/firecrawl-js' - - '@notionhq/client' - - '@pinecone-database/pinecone' - - '@supabase/supabase-js' - - '@swc/core' - - '@swc/wasm' - - '@types/node' - - '@vercel/kv' - - '@xata.io/client' - - apify-client - - assemblyai - - bufferutil - - cheerio - - chromadb - - convex - - couchbase - - d3-dsv - - debug - - encoding - - epub2 - - faiss-node - - fast-xml-parser - - handlebars - - html-to-text - - ignore - - ioredis - - jsdom - - mammoth - - mongodb - - node-llama-cpp - - notion-to-md - - officeparser - - pdf-parse - - peggy - - playwright - - puppeteer - - pyodide - - react - - redis - - solid-js - - sonix-speech-recognition - - srt-parser-2 - - sswr - - supports-color - - svelte - - typeorm - - typescript - - utf-8-validate - - vue - - weaviate-ts-client - - web-auth-library - - ws - - youtube-transcript - - youtubei.js - - zod - - '@restackio/integrations-openai@0.0.32(zod@3.23.8)': - dependencies: - openai: 4.73.0(zod@3.23.8) - transitivePeerDependencies: - - encoding - - zod - '@swc/core-darwin-arm64@1.7.2': optional: true @@ -3053,6 +3236,13 @@ snapshots: ms: 3.0.0-canary.1 proto3-json-serializer: 2.0.2 + '@temporalio/common@1.11.2': + dependencies: + '@temporalio/proto': 1.11.2 + long: 5.2.3 + ms: 3.0.0-canary.1 + proto3-json-serializer: 2.0.2 + '@temporalio/common@1.11.5': dependencies: '@temporalio/proto': 1.11.5 @@ -3079,6 +3269,11 @@ snapshots: long: 5.2.3 protobufjs: 7.4.0 + '@temporalio/proto@1.11.2': + dependencies: + long: 5.2.3 + protobufjs: 7.4.0 + '@temporalio/proto@1.11.5': dependencies: long: 5.2.3 @@ -3139,6 +3334,11 @@ snapshots: '@temporalio/common': 1.11.1 '@temporalio/proto': 1.11.1 + '@temporalio/workflow@1.11.2': + dependencies: + '@temporalio/common': 1.11.2 + '@temporalio/proto': 1.11.2 + '@temporalio/workflow@1.11.5': dependencies: '@temporalio/common': 1.11.5 @@ -3172,33 +3372,20 @@ snapshots: '@types/mute-stream@0.0.4': dependencies: - '@types/node': 20.17.7 + '@types/node': 20.16.9 '@types/node-fetch@2.6.11': dependencies: - '@types/node': 20.16.10 + '@types/node': 20.16.9 form-data: 4.0.0 - '@types/node-fetch@2.6.12': - dependencies: - '@types/node': 20.17.7 - form-data: 4.0.1 - '@types/node@14.18.63': {} '@types/node@18.19.42': dependencies: undici-types: 5.26.5 - '@types/node@18.19.65': - dependencies: - undici-types: 5.26.5 - - '@types/node@20.16.10': - dependencies: - undici-types: 6.19.8 - - '@types/node@20.17.7': + '@types/node@20.16.9': dependencies: undici-types: 6.19.8 @@ -3214,59 +3401,59 @@ snapshots: '@types/wrap-ansi@3.0.0': {} - '@vue/compiler-core@3.5.12': + '@vue/compiler-core@3.5.13': dependencies: '@babel/parser': 7.26.2 - '@vue/shared': 3.5.12 + '@vue/shared': 3.5.13 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.1 - '@vue/compiler-dom@3.5.12': + '@vue/compiler-dom@3.5.13': dependencies: - '@vue/compiler-core': 3.5.12 - '@vue/shared': 3.5.12 + '@vue/compiler-core': 3.5.13 + '@vue/shared': 3.5.13 - '@vue/compiler-sfc@3.5.12': + '@vue/compiler-sfc@3.5.13': dependencies: '@babel/parser': 7.26.2 - '@vue/compiler-core': 3.5.12 - '@vue/compiler-dom': 3.5.12 - '@vue/compiler-ssr': 3.5.12 - '@vue/shared': 3.5.12 + '@vue/compiler-core': 3.5.13 + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 estree-walker: 2.0.2 magic-string: 0.30.13 postcss: 8.4.49 source-map-js: 1.2.1 - '@vue/compiler-ssr@3.5.12': + '@vue/compiler-ssr@3.5.13': dependencies: - '@vue/compiler-dom': 3.5.12 - '@vue/shared': 3.5.12 + '@vue/compiler-dom': 3.5.13 + '@vue/shared': 3.5.13 - '@vue/reactivity@3.5.12': + '@vue/reactivity@3.5.13': dependencies: - '@vue/shared': 3.5.12 + '@vue/shared': 3.5.13 - '@vue/runtime-core@3.5.12': + '@vue/runtime-core@3.5.13': dependencies: - '@vue/reactivity': 3.5.12 - '@vue/shared': 3.5.12 + '@vue/reactivity': 3.5.13 + '@vue/shared': 3.5.13 - '@vue/runtime-dom@3.5.12': + '@vue/runtime-dom@3.5.13': dependencies: - '@vue/reactivity': 3.5.12 - '@vue/runtime-core': 3.5.12 - '@vue/shared': 3.5.12 + '@vue/reactivity': 3.5.13 + '@vue/runtime-core': 3.5.13 + '@vue/shared': 3.5.13 csstype: 3.1.3 - '@vue/server-renderer@3.5.12(vue@3.5.12(typescript@5.7.2))': + '@vue/server-renderer@3.5.13(vue@3.5.13(typescript@5.6.3))': dependencies: - '@vue/compiler-ssr': 3.5.12 - '@vue/shared': 3.5.12 - vue: 3.5.12(typescript@5.7.2) + '@vue/compiler-ssr': 3.5.13 + '@vue/shared': 3.5.13 + vue: 3.5.13(typescript@5.6.3) - '@vue/shared@3.5.12': {} + '@vue/shared@3.5.13': {} '@webassemblyjs/ast@1.12.1': dependencies: @@ -3452,15 +3639,15 @@ snapshots: dependencies: humanize-ms: 1.2.1 - ai@3.4.33(openai@4.73.0(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.1.4))(svelte@5.1.4)(vue@3.5.12(typescript@5.7.2))(zod@3.23.8): + ai@3.4.33(openai@4.73.1(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.2.7))(svelte@5.2.7)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8): dependencies: '@ai-sdk/provider': 0.0.26 '@ai-sdk/provider-utils': 1.0.22(zod@3.23.8) '@ai-sdk/react': 0.0.70(react@18.3.1)(zod@3.23.8) '@ai-sdk/solid': 0.0.54(zod@3.23.8) - '@ai-sdk/svelte': 0.0.57(svelte@5.1.4)(zod@3.23.8) + '@ai-sdk/svelte': 0.0.57(svelte@5.2.7)(zod@3.23.8) '@ai-sdk/ui-utils': 0.0.50(zod@3.23.8) - '@ai-sdk/vue': 0.0.59(vue@3.5.12(typescript@5.7.2))(zod@3.23.8) + '@ai-sdk/vue': 0.0.59(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) '@opentelemetry/api': 1.9.0 eventsource-parser: 1.1.2 json-schema: 0.4.0 @@ -3468,10 +3655,10 @@ snapshots: secure-json-parse: 2.7.0 zod-to-json-schema: 3.23.5(zod@3.23.8) optionalDependencies: - openai: 4.73.0(zod@3.23.8) + openai: 4.73.1(zod@3.23.8) react: 18.3.1 - sswr: 2.1.0(svelte@5.1.4) - svelte: 5.1.4 + sswr: 2.1.0(svelte@5.2.7) + svelte: 5.2.7 zod: 3.23.8 transitivePeerDependencies: - solid-js @@ -3524,7 +3711,7 @@ snapshots: axios@1.7.7: dependencies: follow-redirects: 1.15.9 - form-data: 4.0.1 + form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug @@ -3675,17 +3862,17 @@ snapshots: commander@2.20.3: {} - composio-core@0.2.9(@swc/core@1.9.3)(@types/node@20.17.7)(bufferutil@4.0.8)(react@18.3.1)(sswr@2.1.0(svelte@5.1.4))(svelte@5.1.4)(typescript@5.7.2)(utf-8-validate@6.0.5)(vue@3.5.12(typescript@5.7.2))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)): + composio-core@0.2.9-10-1(@swc/core@1.9.3)(@types/node@20.16.9)(bufferutil@4.0.8)(react@18.3.1)(sswr@2.1.0(svelte@5.2.7))(svelte@5.2.7)(typescript@5.6.3)(utf-8-validate@6.0.5)(vue@3.5.13(typescript@5.6.3))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)): dependencies: '@ai-sdk/openai': 0.0.36(zod@3.23.8) '@e2b/code-interpreter': 0.0.8(bufferutil@4.0.8)(utf-8-validate@6.0.5) '@e2b/sdk': 0.16.2 '@faker-js/faker': 8.4.1 - '@hey-api/client-axios': 0.2.10(axios@1.7.7) - '@hono/node-server': 1.13.7(hono@4.6.11) - '@langchain/core': 0.2.36(openai@4.73.0(zod@3.23.8)) + '@hey-api/client-axios': 0.2.11(axios@1.7.7) + '@hono/node-server': 1.13.7(hono@4.6.12) + '@langchain/core': 0.2.36(openai@4.73.1(zod@3.23.8)) '@langchain/openai': 0.2.11 - ai: 3.4.33(openai@4.73.0(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.1.4))(svelte@5.1.4)(vue@3.5.12(typescript@5.7.2))(zod@3.23.8) + ai: 3.4.33(openai@4.73.1(zod@3.23.8))(react@18.3.1)(sswr@2.1.0(svelte@5.2.7))(svelte@5.2.7)(vue@3.5.13(typescript@5.6.3))(zod@3.23.8) axios: 1.7.7 chalk: 4.1.2 cli-progress: 3.12.0 @@ -3694,14 +3881,14 @@ snapshots: dockerode: 4.0.2 e2b: 0.16.2 enumify: 2.0.0 - hono: 4.6.11 + hono: 4.6.12 inquirer: 10.2.2 - langchain: 0.2.20(axios@1.7.7)(openai@4.73.0(zod@3.23.8))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)) + langchain: 0.2.20(axios@1.7.7)(openai@4.73.1(zod@3.23.8))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)) open: 8.4.2 - openai: 4.73.0(zod@3.23.8) + openai: 4.73.1(zod@3.23.8) pusher-js: 8.4.0-rc2 resolve-package-path: 4.0.3 - ts-node: 10.9.2(@swc/core@1.9.3)(@types/node@20.17.7)(typescript@5.7.2) + ts-node: 10.9.2(@swc/core@1.9.3)(@types/node@20.16.9)(typescript@5.6.3) uuid: 10.0.0 winston: 3.17.0 zod: 3.23.8 @@ -3789,6 +3976,12 @@ snapshots: create-require@1.1.1: {} + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + csstype@3.1.3: {} debug@3.2.7(supports-color@5.5.0): @@ -3837,6 +4030,15 @@ snapshots: transitivePeerDependencies: - supports-color + dotenv-cli@7.4.4: + dependencies: + cross-spawn: 7.0.6 + dotenv: 16.4.5 + dotenv-expand: 10.0.0 + minimist: 1.2.8 + + dotenv-expand@10.0.0: {} + dotenv@16.4.5: {} e2b@0.16.2: @@ -3874,6 +4076,33 @@ snapshots: es-module-lexer@1.5.4: {} + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + escalade@3.2.0: {} eslint-scope@5.1.1: @@ -3934,12 +4163,6 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 - form-data@4.0.1: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - mime-types: 2.1.35 - formdata-node@4.4.1: dependencies: node-domexception: 1.0.0 @@ -3954,6 +4177,10 @@ snapshots: get-caller-file@2.0.5: {} + get-tsconfig@4.8.1: + dependencies: + resolve-pkg-maps: 1.0.0 + glob-parent@5.1.2: dependencies: is-glob: 4.0.3 @@ -3968,7 +4195,7 @@ snapshots: heap-js@2.5.0: {} - hono@4.6.11: {} + hono@4.6.12: {} humanize-ms@1.2.1: dependencies: @@ -4041,6 +4268,8 @@ snapshots: dependencies: is-inside-container: 1.0.0 + isexe@2.0.0: {} + isexe@3.1.1: {} isomorphic-ws@5.0.0(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)): @@ -4049,7 +4278,7 @@ snapshots: jest-worker@27.5.1: dependencies: - '@types/node': 20.17.7 + '@types/node': 20.16.9 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -4079,16 +4308,16 @@ snapshots: kuler@2.0.0: {} - langchain@0.2.20(axios@1.7.7)(openai@4.73.0(zod@3.23.8))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)): + langchain@0.2.20(axios@1.7.7)(openai@4.73.1(zod@3.23.8))(ws@8.18.0(bufferutil@4.0.8)(utf-8-validate@6.0.5)): dependencies: - '@langchain/core': 0.2.36(openai@4.73.0(zod@3.23.8)) + '@langchain/core': 0.2.36(openai@4.73.1(zod@3.23.8)) '@langchain/openai': 0.2.11 - '@langchain/textsplitters': 0.0.3(openai@4.73.0(zod@3.23.8)) + '@langchain/textsplitters': 0.0.3(openai@4.73.1(zod@3.23.8)) binary-extensions: 2.3.0 js-tiktoken: 1.0.15 js-yaml: 4.1.0 jsonpointer: 5.0.1 - langsmith: 0.1.68(openai@4.73.0(zod@3.23.8)) + langsmith: 0.1.68(openai@4.73.1(zod@3.23.8)) openapi-types: 12.1.3 p-retry: 4.6.2 uuid: 10.0.0 @@ -4102,7 +4331,7 @@ snapshots: - encoding - openai - langsmith@0.1.68(openai@4.73.0(zod@3.23.8)): + langsmith@0.1.68(openai@4.73.1(zod@3.23.8)): dependencies: '@types/uuid': 10.0.0 commander: 10.0.1 @@ -4111,7 +4340,7 @@ snapshots: semver: 7.6.3 uuid: 10.0.0 optionalDependencies: - openai: 4.73.0(zod@3.23.8) + openai: 4.73.1(zod@3.23.8) loader-runner@4.3.0: {} @@ -4166,6 +4395,8 @@ snapshots: dependencies: brace-expansion: 1.1.11 + minimist@1.2.8: {} + mkdirp-classic@0.5.3: {} ms@2.1.3: {} @@ -4246,10 +4477,10 @@ snapshots: transitivePeerDependencies: - encoding - openai@4.73.0(zod@3.23.8): + openai@4.73.1(zod@3.23.8): dependencies: - '@types/node': 18.19.65 - '@types/node-fetch': 2.6.12 + '@types/node': 18.19.42 + '@types/node-fetch': 2.6.11 abort-controller: 3.0.0 agentkeepalive: 4.5.0 form-data-encoder: 1.7.2 @@ -4284,6 +4515,8 @@ snapshots: path-browserify@1.0.1: {} + path-key@3.1.1: {} + path-root-regex@0.1.2: {} path-root@0.1.1: @@ -4322,7 +4555,7 @@ snapshots: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 20.17.7 + '@types/node': 20.16.9 long: 5.2.3 proxy-from-env@1.1.0: {} @@ -4364,6 +4597,8 @@ snapshots: dependencies: path-root: 0.1.1 + resolve-pkg-maps@1.0.0: {} + retry@0.13.1: {} run-applescript@7.0.0: {} @@ -4398,6 +4633,12 @@ snapshots: dependencies: randombytes: 2.1.0 + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + signal-exit@4.1.0: {} simple-git@3.27.0: @@ -4449,9 +4690,9 @@ snapshots: cpu-features: 0.0.10 nan: 2.22.0 - sswr@2.1.0(svelte@5.1.4): + sswr@2.1.0(svelte@5.2.7): dependencies: - svelte: 5.1.4 + svelte: 5.2.7 swrev: 4.0.0 stack-trace@0.0.10: {} @@ -4482,7 +4723,7 @@ snapshots: dependencies: has-flag: 4.0.0 - svelte@5.1.4: + svelte@5.2.7: dependencies: '@ampproject/remapping': 2.3.0 '@jridgewell/sourcemap-codec': 1.5.0 @@ -4518,9 +4759,9 @@ snapshots: swrev@4.0.0: {} - swrv@1.0.4(vue@3.5.12(typescript@5.7.2)): + swrv@1.0.4(vue@3.5.13(typescript@5.6.3)): dependencies: - vue: 3.5.12(typescript@5.7.2) + vue: 3.5.13(typescript@5.6.3) tapable@2.2.1: {} @@ -4633,21 +4874,21 @@ snapshots: optionalDependencies: '@swc/core': 1.7.2 - ts-node@10.9.2(@swc/core@1.9.3)(@types/node@20.17.7)(typescript@5.7.2): + ts-node@10.9.2(@swc/core@1.9.3)(@types/node@20.16.9)(typescript@5.6.3): 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': 20.17.7 + '@types/node': 20.16.9 acorn: 8.14.0 acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.7.2 + typescript: 5.6.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 optionalDependencies: @@ -4657,6 +4898,13 @@ snapshots: tslib@2.8.1: {} + tsx@4.19.2: + dependencies: + esbuild: 0.23.1 + get-tsconfig: 4.8.1 + optionalDependencies: + fsevents: 2.3.3 + tweetnacl@0.14.5: {} tweetnacl@1.0.3: {} @@ -4667,7 +4915,7 @@ snapshots: typescript@4.9.5: {} - typescript@5.7.2: {} + typescript@5.6.3: {} undefsafe@2.0.5: {} @@ -4712,15 +4960,15 @@ snapshots: v8-compile-cache-lib@3.0.1: {} - vue@3.5.12(typescript@5.7.2): + vue@3.5.13(typescript@5.6.3): dependencies: - '@vue/compiler-dom': 3.5.12 - '@vue/compiler-sfc': 3.5.12 - '@vue/runtime-dom': 3.5.12 - '@vue/server-renderer': 3.5.12(vue@3.5.12(typescript@5.7.2)) - '@vue/shared': 3.5.12 + '@vue/compiler-dom': 3.5.13 + '@vue/compiler-sfc': 3.5.13 + '@vue/runtime-dom': 3.5.13 + '@vue/server-renderer': 3.5.13(vue@3.5.13(typescript@5.6.3)) + '@vue/shared': 3.5.13 optionalDependencies: - typescript: 5.7.2 + typescript: 5.6.3 watchpack@2.4.2: dependencies: @@ -4798,6 +5046,10 @@ snapshots: tr46: 0.0.3 webidl-conversions: 3.0.1 + which@2.0.2: + dependencies: + isexe: 2.0.0 + which@4.0.0: dependencies: isexe: 3.1.1 diff --git a/composio/readme.md b/composio/readme.md index 8bc5838..8485d75 100644 --- a/composio/readme.md +++ b/composio/readme.md @@ -1,6 +1,6 @@ # Overview -The gemini example showcases how you can use the Restack AI Composio integration. A workflow has been created that will create an even on the google calendar of the provided entity. +The Composio example showcases how you can use the Restack AI together with [Composio](https://composio.dev). A workflow has been created that will create an even on the google calendar of the provided entity. # Requirements diff --git a/composio/restack_up.mjs b/composio/restack_up.mjs index 45db051..388f0b4 100644 --- a/composio/restack_up.mjs +++ b/composio/restack_up.mjs @@ -28,14 +28,37 @@ const main = async () => { name: "COMPOSIO_API_KEY", value: process.env.COMPOSIO_API_KEY, }, + { + name: "OPENAI_API_KEY", + value: process.env.OPENAI_API_KEY, + }, ...restackEngineEnvs, ], }; + const engine = { + name: "restack_engine", + image: "ghcr.io/restackio/restack:main", + portMapping: [ + { + port: 5233, + path: '/', + name: 'engine-frontend', + }, + { + port: 6233, + path: '/api', + name: 'engine-api', + }, + ], + environmentVariables: [ + ...restackEngineEnvs, + ], + }; await restackCloudClient.stack({ name: "composio development environment", previewEnabled: false, - applications: [servicesApp], + applications: [servicesApp, engine], }); await restackCloudClient.up(); diff --git a/composio/scheduleWorkflow.ts b/composio/scheduleWorkflow.ts index ebab568..b61db30 100644 --- a/composio/scheduleWorkflow.ts +++ b/composio/scheduleWorkflow.ts @@ -28,6 +28,6 @@ async function scheduleWorkflow(input: InputSchedule) { } scheduleWorkflow({ - entityId: "jessicai", + entityId: "default", calendarInstruction: `Create a 1 hour meeting event at 5:30PM tomorrow. Today's date is ${today}`, }); diff --git a/composio/src/functions/composio/createCalendarEvent.ts b/composio/src/functions/composio/createCalendarEvent.ts new file mode 100644 index 0000000..5522805 --- /dev/null +++ b/composio/src/functions/composio/createCalendarEvent.ts @@ -0,0 +1,30 @@ +import { openaiChatCompletionsBase } from "../openai"; + +import { openAiToolsetClient } from "./utils/toolsets"; + +export async function createCalendarEvent({ + entityId, + composioApiKey, + calendarInstruction, +}: { + entityId?: string; + composioApiKey?: string; + calendarInstruction: string; +}) { + const composioOpenAiClient = openAiToolsetClient({ + composioApiKey, + entityId, + }); + + const tools = await composioOpenAiClient.getTools({ + actions: ["googlecalendar_create_event"], + }); + + const { result } = await openaiChatCompletionsBase({ + userContent: calendarInstruction, + tools, + toolChoice: "auto", + }); + + return composioOpenAiClient.handleToolCall(result); +} diff --git a/composio/src/functions/composio/getEntity.ts b/composio/src/functions/composio/getEntity.ts new file mode 100644 index 0000000..6580999 --- /dev/null +++ b/composio/src/functions/composio/getEntity.ts @@ -0,0 +1,21 @@ +import { FunctionFailure } from "@restackio/ai/function"; +import { Entity } from "composio-core/lib/src/sdk/models/Entity"; + +import { composioClient } from "./utils/client"; + +export async function getEntity({ + composioApiKey, + entityId, +}: { + composioApiKey?: string; + entityId: string; +}): Promise { + const client = composioClient({ composioApiKey }); + console.log("client", client); + try { + const entity = client.getEntity(entityId); + return entity; + } catch (error) { + throw FunctionFailure.nonRetryable(`Error getting entity: ${error}`); + } +} diff --git a/composio/src/functions/composio/getEntityConnections.ts b/composio/src/functions/composio/getEntityConnections.ts new file mode 100644 index 0000000..7f5ed1a --- /dev/null +++ b/composio/src/functions/composio/getEntityConnections.ts @@ -0,0 +1,13 @@ +import { openAiToolsetClient } from "./utils/toolsets"; + +export async function getEntityConnections({ + entityId, + composioApiKey, +}: { + entityId: string; + composioApiKey?: string; +}) { + const toolSetClient = openAiToolsetClient({ composioApiKey, entityId }); + const connections = await toolSetClient.client.connectedAccounts.list({}); + return connections; +} \ No newline at end of file diff --git a/composio/src/functions/composio/getExpectedParamsForUser.ts b/composio/src/functions/composio/getExpectedParamsForUser.ts new file mode 100644 index 0000000..d08741c --- /dev/null +++ b/composio/src/functions/composio/getExpectedParamsForUser.ts @@ -0,0 +1,28 @@ +import { openAiToolsetClient } from "./utils/toolsets"; + +export async function getExpectedParamsForUser({ + composioApiKey, + app, + authScheme, + entityId, +}: { + composioApiKey?: string; + app: string; + authScheme?: + | "OAUTH2" + | "OAUTH1" + | "API_KEY" + | "BASIC" + | "BEARER_TOKEN" + | "BASIC_WITH_JWT"; + entityId?: string; +}) { + const toolset = openAiToolsetClient({ composioApiKey, entityId }); + const response = await toolset.getExpectedParamsForUser({ + app, + ...(authScheme && { authScheme }), + ...(entityId && { entityId }), + }); + + return response.expectedInputFields; +} diff --git a/composio/src/functions/composio/index.ts b/composio/src/functions/composio/index.ts new file mode 100644 index 0000000..612fe84 --- /dev/null +++ b/composio/src/functions/composio/index.ts @@ -0,0 +1,5 @@ +export * from "./getEntity"; +export * from "./initiateConnection"; +export * from "./createCalendarEvent"; +export * from "./getEntityConnections"; +export * from "./getExpectedParamsForUser"; diff --git a/composio/src/functions/composio/initiateConnection.ts b/composio/src/functions/composio/initiateConnection.ts new file mode 100644 index 0000000..fafba5f --- /dev/null +++ b/composio/src/functions/composio/initiateConnection.ts @@ -0,0 +1,57 @@ +import { FunctionFailure, log } from "@restackio/ai/function"; + +import { getEntity } from "./getEntity"; + +export async function initiateConnection({ + entityId, + appName, + composioApiKey, + waitUntilActive, +}: { + entityId: string; + appName: string; + composioApiKey?: string; + waitUntilActive?: number; +}) { + const entity = await getEntity({ composioApiKey, entityId }); + + const entityAppConnection = await entity.getConnection(appName); + + if (entityAppConnection) { + return { + authenticated: true, + message: `Already connected to ${appName}`, + redirectUrl: entityAppConnection.redirectUrl, + }; + } + + const connection = await entity.initiateConnection(appName); + + if (!waitUntilActive) { + return { + authenticated: false, + message: `User needs to follow redirect URL to authenticate: ${connection.redirectUrl}`, + redirectUrl: connection.redirectUrl, + }; + } + + try { + await connection.waitUntilActive(waitUntilActive); + return { + authenticated: true, + message: `Connected to ${appName}`, + redirectUrl: connection.redirectUrl, + }; + } catch (error) { + log.error("User did not authenticate in time for application", { + appName, + error, + }); + + return { + authenticated: false, + message: `User did not authenticate in time for application: ${appName}`, + redirectUrl: connection.redirectUrl, + }; + } +} diff --git a/composio/src/functions/composio/utils/client.ts b/composio/src/functions/composio/utils/client.ts new file mode 100644 index 0000000..e51ba05 --- /dev/null +++ b/composio/src/functions/composio/utils/client.ts @@ -0,0 +1,9 @@ +import { Composio } from "composio-core"; + +export const composioClient = ({ + composioApiKey = process.env.COMPOSIO_API_KEY, +}: { + composioApiKey?: string; +}) => { + return new Composio(composioApiKey); +}; diff --git a/composio/src/functions/composio/utils/toolsets.ts b/composio/src/functions/composio/utils/toolsets.ts new file mode 100644 index 0000000..daad9e5 --- /dev/null +++ b/composio/src/functions/composio/utils/toolsets.ts @@ -0,0 +1,14 @@ +import { OpenAIToolSet } from "composio-core"; + +export function openAiToolsetClient({ + composioApiKey = process.env.COMPOSIO_API_KEY, + entityId, +}: { + composioApiKey?: string; + entityId?: string; +}) { + return new OpenAIToolSet({ + apiKey: composioApiKey, + entityId, + }); +} diff --git a/composio/src/functions/index.ts b/composio/src/functions/index.ts new file mode 100644 index 0000000..7438a5c --- /dev/null +++ b/composio/src/functions/index.ts @@ -0,0 +1,2 @@ +export * from "./composio"; +export * from "./openai"; \ No newline at end of file diff --git a/composio/src/functions/openai/chat/completionsBase.ts b/composio/src/functions/openai/chat/completionsBase.ts new file mode 100644 index 0000000..0889059 --- /dev/null +++ b/composio/src/functions/openai/chat/completionsBase.ts @@ -0,0 +1,92 @@ +import { FunctionFailure, log } from "@restackio/ai/function"; +import OpenAI from "openai/index"; +import { ChatCompletionCreateParamsNonStreaming } from "openai/resources/chat/completions"; +import { openaiClient } from "../utils/client"; +import { openaiCost, Price } from "../utils/cost"; +import { ChatCompletion, ChatModel } from "openai/resources/index"; + +export type UsageOutput = { tokens: number; cost: number }; + +export type OpenAIChatInput = { + userContent: string; + systemContent?: string; + model?: ChatModel; + jsonSchema?: { + name: string; + schema: Record; + }; + price?: Price; + apiKey?: string; + params?: ChatCompletionCreateParamsNonStreaming; + tools?: OpenAI.Chat.Completions.ChatCompletionTool[]; + toolChoice?: OpenAI.Chat.Completions.ChatCompletionToolChoiceOption; +}; + +export const openaiChatCompletionsBase = async ({ + userContent, + systemContent = "", + model = "gpt-4o-mini", + jsonSchema, + price, + apiKey, + params, + tools, + toolChoice, +}: OpenAIChatInput): Promise<{ result: ChatCompletion; cost?: number }> => { + try { + const openai = openaiClient({ apiKey }); + + const isO1Model = model.startsWith("o1-"); + + const o1ModelParams = { + temperature: 1, + top_p: 1, + frequency_penalty: 0, + presence_penalty: 0, + }; + + const chatParams: ChatCompletionCreateParamsNonStreaming = { + messages: [ + ...(systemContent ? [{ role: "system" as const, content: systemContent }] : []), + { role: "user" as const, content: userContent }, + ...(params?.messages ?? []), + ], + ...(jsonSchema && { + response_format: { + type: "json_schema", + json_schema: { + name: jsonSchema.name, + strict: true, + schema: jsonSchema.schema, + }, + }, + }), + model, + ...(tools && { tools }), + ...(toolChoice && { tool_choice: toolChoice }), + ...params, + ...(isO1Model && o1ModelParams), + }; + + log.debug("OpenAI chat completion params", { + chatParams, + }); + + const completion = await openai.chat.completions.create(chatParams); + + return { + result: completion, + cost: + price && + openaiCost({ + price, + tokensCount: { + input: completion.usage?.prompt_tokens ?? 0, + output: completion.usage?.completion_tokens ?? 0, + }, + }), + }; + } catch (error) { + throw FunctionFailure.nonRetryable(`Error OpenAI chat: ${error}`); + } +}; \ No newline at end of file diff --git a/composio/src/functions/openai/chat/completionsStream.ts b/composio/src/functions/openai/chat/completionsStream.ts new file mode 100644 index 0000000..bcd9097 --- /dev/null +++ b/composio/src/functions/openai/chat/completionsStream.ts @@ -0,0 +1,193 @@ +import OpenAI from "openai/index"; +import { ChatCompletionChunk } from "openai/resources/chat/completions"; + +import Restack from "@restackio/ai"; +import { currentWorkflow, log } from "@restackio/ai/function"; + +import { StreamEvent, ToolCallEvent } from "../types/events"; + +import { aggregateStreamChunks } from "../utils/aggregateStream"; +import { mergeToolCalls } from "../utils/mergeToolCalls"; +import { openaiClient } from "../utils/client"; +import { openaiCost, Price } from "../utils/cost"; +import { SendWorkflowEvent } from "@restackio/ai/event"; +import { ChatModel } from "openai/resources/index"; + +export async function openaiChatCompletionsStream({ + model = "gpt-4o-mini", + userName, + newMessage, + assistantName, + messages = [], + tools, + toolEvent, + streamAtCharacter, + streamEvent, + apiKey, + price, +}: { + model?: ChatModel; + userName?: string; + newMessage?: string; + assistantName?: string; + messages?: OpenAI.Chat.Completions.ChatCompletionMessageParam[]; + tools?: OpenAI.Chat.Completions.ChatCompletionTool[]; + toolEvent?: { + workflowEventName: string; + workflow?: SendWorkflowEvent["workflow"]; + }; + streamAtCharacter?: string; + streamEvent?: { + workflowEventName: string; + workflow?: SendWorkflowEvent["workflow"]; + }; + apiKey?: string; + price?: Price; +}) { + const restack = new Restack(); + const workflow = currentWorkflow().workflowExecution; + + log.debug("workflow", { workflow }); + + if (newMessage) { + messages.push({ + role: "user", + name: userName, + content: newMessage, + }); + } + + const openai = openaiClient({ apiKey }); + const chatStream = await openai.chat.completions.create({ + model: model, + messages, + tools, + stream: true, + stream_options: { + include_usage: true, + }, + }); + + const [stream, streamEnd] = chatStream.tee(); + const readableStream = streamEnd.toReadableStream() as unknown as ReadableStream; + const aggregatedStream = await aggregateStreamChunks(readableStream); + + let finishReason: ChatCompletionChunk.Choice["finish_reason"]; + let response: ChatCompletionChunk.Choice.Delta["content"] = ""; + let tokensCountInput = 0; + let tokensCountOutput = 0; + + for await (const chunk of stream) { + let content = chunk.choices[0]?.delta?.content || ""; + finishReason = chunk.choices[0]?.finish_reason; + tokensCountInput += chunk.usage?.prompt_tokens ?? 0; + tokensCountOutput += chunk.usage?.completion_tokens ?? 0; + + if (finishReason === "tool_calls") { + const { toolCalls } = mergeToolCalls(aggregatedStream); + await Promise.all( + toolCalls.map((toolCall) => { + if (toolEvent) { + const functionArguments = JSON.parse( + toolCall.function?.arguments ?? "" + ); + + const input: ToolCallEvent = { + ...toolCall, + function: { + name: toolCall.function?.name ?? "", + input: functionArguments, + }, + assistantName, + }; + + if (toolEvent) { + const workflowEvent = { + event: { + name: toolEvent.workflowEventName, + input, + }, + workflow: { + ...workflow, + ...toolEvent.workflow, + }, + }; + log.debug("toolEvent sendWorkflowEvent", { workflowEvent }); + + restack.sendWorkflowEvent(workflowEvent); + } + } + }) + ); + return { + result: { + messages, + toolCalls, + }, + cost: + price && + openaiCost({ + price, + tokensCount: { + input: tokensCountInput, + output: tokensCountOutput, + }, + }), + }; + } else { + response += content; + if ( + content.trim().slice(-1) === streamAtCharacter || + finishReason === "stop" + ) { + if (response.length) { + const input: StreamEvent = { + chunkId: chunk.id, + response, + assistantName, + isLast: finishReason === "stop", + }; + if (streamEvent) { + const workflowEvent = { + event: { + name: streamEvent.workflowEventName, + input, + }, + workflow: { + ...workflow, + ...streamEvent.workflow, + }, + }; + log.debug("streamEvent sendWorkflowEvent", { workflowEvent }); + restack.sendWorkflowEvent(workflowEvent); + } + } + } + + if (finishReason === "stop") { + const newMessage: OpenAI.Chat.Completions.ChatCompletionMessageParam = { + content: response, + role: "assistant", + name: assistantName, + }; + + messages.push(newMessage); + + return { + result: { + messages, + }, + cost: + price && + openaiCost({ + price, + tokensCount: { + input: tokensCountInput, + output: tokensCountOutput, + }, + }), + }; + } + } + } +} diff --git a/composio/src/functions/openai/chat/index.ts b/composio/src/functions/openai/chat/index.ts new file mode 100644 index 0000000..3cb4077 --- /dev/null +++ b/composio/src/functions/openai/chat/index.ts @@ -0,0 +1,2 @@ +export * from "./completionsBase"; +export * from "./completionsStream"; diff --git a/composio/src/functions/openai/index.ts b/composio/src/functions/openai/index.ts new file mode 100644 index 0000000..6a947d6 --- /dev/null +++ b/composio/src/functions/openai/index.ts @@ -0,0 +1,2 @@ +export * from "./chat"; +export * from "./thread"; diff --git a/composio/src/functions/openai/thread/createAssistant.ts b/composio/src/functions/openai/thread/createAssistant.ts new file mode 100644 index 0000000..f893399 --- /dev/null +++ b/composio/src/functions/openai/thread/createAssistant.ts @@ -0,0 +1,34 @@ +import { ChatModel } from "openai/resources/index"; +import { FunctionFailure } from "@restackio/ai/function"; +import { Assistant, AssistantTool } from "openai/resources/beta/index"; + +import { openaiClient } from "../utils/client"; + +export async function createAssistant({ + apiKey, + name, + instructions, + model = "gpt-4o-mini", + tools = [], +}: { + apiKey: string; + name: string; + instructions: string; + tools?: AssistantTool[]; + model: ChatModel; +}): Promise { + try { + const openai = openaiClient({ apiKey }); + + const assistant = await openai.beta.assistants.create({ + name, + instructions, + model, + tools, + }); + + return assistant; + } catch (error) { + throw FunctionFailure.nonRetryable(`Error creating assistant: ${error}`); + } +} diff --git a/composio/src/functions/openai/thread/createMessageOnThread.ts b/composio/src/functions/openai/thread/createMessageOnThread.ts new file mode 100644 index 0000000..63b4a24 --- /dev/null +++ b/composio/src/functions/openai/thread/createMessageOnThread.ts @@ -0,0 +1,28 @@ +import OpenAI from "openai/index"; +import { FunctionFailure } from "@restackio/ai/function"; + +import { openaiClient } from "../utils/client"; + +export async function createMessageOnThread({ + apiKey, + threadId, + content, + role, +}: { + apiKey: string; + threadId: string; + content: string; + role: OpenAI.Beta.Threads.MessageCreateParams["role"]; +}) { + try { + const openai = openaiClient({ apiKey }); + await openai.beta.threads.messages.create(threadId, { + role, + content, + }); + } catch (error) { + throw FunctionFailure.nonRetryable( + `Error creating message thread: ${error}` + ); + } +} diff --git a/composio/src/functions/openai/thread/createThread.ts b/composio/src/functions/openai/thread/createThread.ts new file mode 100644 index 0000000..5d29652 --- /dev/null +++ b/composio/src/functions/openai/thread/createThread.ts @@ -0,0 +1,19 @@ +import { FunctionFailure } from "@restackio/ai/function"; +import { Thread } from "openai/resources/beta/index"; + +import { openaiClient } from "../utils/client"; + +export async function createThread({ + apiKey, +}: { + apiKey: string; +}): Promise { + try { + const openai = openaiClient({ apiKey }); + const thread = await openai.beta.threads.create(); + + return thread; + } catch (error) { + throw FunctionFailure.nonRetryable(`Error creating thread: ${error}`); + } +} diff --git a/composio/src/functions/openai/thread/index.ts b/composio/src/functions/openai/thread/index.ts new file mode 100644 index 0000000..0ef24eb --- /dev/null +++ b/composio/src/functions/openai/thread/index.ts @@ -0,0 +1,4 @@ +export * from "./createAssistant"; +export * from "./createMessageOnThread"; +export * from "./createThread"; +export * from "./runThread"; diff --git a/composio/src/functions/openai/thread/runThread.ts b/composio/src/functions/openai/thread/runThread.ts new file mode 100644 index 0000000..57d17e6 --- /dev/null +++ b/composio/src/functions/openai/thread/runThread.ts @@ -0,0 +1,31 @@ +import { FunctionFailure } from "@restackio/ai/function"; +import { Stream } from "openai/streaming"; +import { AssistantStreamEvent } from "openai/resources/beta/index"; +import { Run } from "openai/resources/beta/threads/runs/index"; + +import { openaiClient } from "../utils/client"; + +export async function runThread({ + apiKey, + threadId, + assistantId, + stream = false, +}: { + apiKey: string; + threadId: string; + assistantId: string; + stream: boolean; +}): Promise | Run> { + try { + const openai = openaiClient({ apiKey }); + + const run = await openai.beta.threads.runs.create(threadId, { + assistant_id: assistantId, + ...(stream && { stream }), + }); + + return run; + } catch (error) { + throw FunctionFailure.nonRetryable(`Error running thread: ${error}`); + } +} \ No newline at end of file diff --git a/composio/src/functions/openai/types/events.ts b/composio/src/functions/openai/types/events.ts new file mode 100644 index 0000000..44b071b --- /dev/null +++ b/composio/src/functions/openai/types/events.ts @@ -0,0 +1,17 @@ +import OpenAI from "openai/index"; + +export type StreamEvent = { + chunkId?: string; + response: string; + assistantName?: string; + isLast: boolean; +}; + +export type ToolCallEvent = + OpenAI.Chat.Completions.ChatCompletionChunk.Choice.Delta.ToolCall & { + function: { + name: string; + input: JSON; + }; + assistantName?: string; + }; diff --git a/composio/src/functions/openai/types/index.ts b/composio/src/functions/openai/types/index.ts new file mode 100644 index 0000000..1784004 --- /dev/null +++ b/composio/src/functions/openai/types/index.ts @@ -0,0 +1 @@ +export * from "./events"; diff --git a/composio/src/functions/openai/utils/aggregateStream.ts b/composio/src/functions/openai/utils/aggregateStream.ts new file mode 100644 index 0000000..18a7d74 --- /dev/null +++ b/composio/src/functions/openai/utils/aggregateStream.ts @@ -0,0 +1,26 @@ +export async function aggregateStreamChunks(stream: ReadableStream) { + const reader = stream.getReader(); + const chunks: Uint8Array[] = []; + + while (true) { + const { done, value } = await reader.read(); + if (done) break; + if (value) chunks.push(value); + } + + const aggregated = new Uint8Array( + chunks.reduce((acc, chunk) => acc + chunk.length, 0) + ); + let offset = 0; + for (const chunk of chunks) { + aggregated.set(chunk, offset); + offset += chunk.length; + } + + const textContent = new TextDecoder().decode(aggregated); + const jsonObjects = textContent + .split("\n") + .filter((line) => line.trim()) + .map((line) => JSON.parse(line)); + return jsonObjects; +} diff --git a/composio/src/functions/openai/utils/client.ts b/composio/src/functions/openai/utils/client.ts new file mode 100644 index 0000000..77fd385 --- /dev/null +++ b/composio/src/functions/openai/utils/client.ts @@ -0,0 +1,21 @@ +import OpenAI from "openai/index"; +import "dotenv/config"; + +let openaiInstance: OpenAI | null = null; + +export const openaiClient = ({ + apiKey = process.env.OPENAI_API_KEY, +}: { + apiKey?: string; +}): OpenAI => { + if (!apiKey) { + throw new Error("API key is required to create OpenAI client."); + } + + if (!openaiInstance) { + openaiInstance = new OpenAI({ + apiKey, + }); + } + return openaiInstance; +}; diff --git a/composio/src/functions/openai/utils/cost.ts b/composio/src/functions/openai/utils/cost.ts new file mode 100644 index 0000000..2724ab6 --- /dev/null +++ b/composio/src/functions/openai/utils/cost.ts @@ -0,0 +1,24 @@ +export type TokensCount = { + input: number; + output: number; +}; + +export type Price = { + input: number; + output: number; +}; +export const openaiCost = ({ + tokensCount, + price, +}: { + tokensCount: TokensCount; + price: Price; +}): number => { + let cost = 0; + const { input: inputTokens, output: outputTokens } = tokensCount; + const { input: inputPrice, output: outputPrice } = price; + + cost = inputTokens * inputPrice + outputTokens * outputPrice; + + return cost; +}; diff --git a/composio/src/functions/openai/utils/index.ts b/composio/src/functions/openai/utils/index.ts new file mode 100644 index 0000000..0707ebb --- /dev/null +++ b/composio/src/functions/openai/utils/index.ts @@ -0,0 +1,4 @@ +export * from "./aggregateStream"; +export * from "./client"; +export * from "./cost"; +export * from "./mergeToolCalls"; diff --git a/composio/src/functions/openai/utils/mergeToolCalls.ts b/composio/src/functions/openai/utils/mergeToolCalls.ts new file mode 100644 index 0000000..600170f --- /dev/null +++ b/composio/src/functions/openai/utils/mergeToolCalls.ts @@ -0,0 +1,31 @@ +import OpenAI from "openai/index"; +import { ChatCompletionChunk } from "openai/resources/chat/completions.mjs"; + +export function mergeToolCalls(aggregatedStream: ChatCompletionChunk[]) { + const toolCalls: OpenAI.Chat.Completions.ChatCompletionChunk.Choice.Delta.ToolCall[] = + []; + + aggregatedStream.forEach((chunk) => { + chunk.choices.forEach((choice) => { + if (choice.delta.tool_calls) { + choice.delta.tool_calls.forEach((toolCall) => { + const lastToolCall = toolCalls[toolCalls.length - 1]; + if (toolCall.id) { + toolCalls.push({ + ...toolCall, + function: { ...toolCall.function, arguments: "" }, + }); + } else if ( + lastToolCall && + lastToolCall.function && + toolCall.function?.arguments + ) { + lastToolCall.function.arguments += toolCall.function.arguments; + } + }); + } + }); + }); + + return { toolCalls }; +} diff --git a/composio/src/services.ts b/composio/src/services.ts index 7ec69f9..146cd53 100644 --- a/composio/src/services.ts +++ b/composio/src/services.ts @@ -1,5 +1,4 @@ -import { composioService } from "@restackio/integrations-composio"; - +import { createCalendarEvent, initiateConnection, getExpectedParamsForUser, getEntityConnections, getEntity } from "./functions"; import { client } from "./client"; async function services() { @@ -11,7 +10,16 @@ async function services() { workflowsPath, }), // Start the composio service - composioService({ client }), + client.startService({ + taskQueue: "composio", + functions: { + createCalendarEvent, + initiateConnection, + getExpectedParamsForUser, + getEntityConnections, + getEntity, + }, + }), ]); console.log("Services running successfully."); diff --git a/composio/src/workflows/createCalendarEvent.ts b/composio/src/workflows/createCalendarEvent.ts index 0224908..367fa52 100644 --- a/composio/src/workflows/createCalendarEvent.ts +++ b/composio/src/workflows/createCalendarEvent.ts @@ -1,6 +1,5 @@ import { step, log } from "@restackio/ai/workflow"; -import * as composioFunctions from "@restackio/integrations-composio/functions"; -import { composioTaskQueue } from "@restackio/integrations-composio/taskQueue"; +import * as functions from "../functions"; export async function createCalendarEventWorkflow({ entityId, @@ -9,11 +8,11 @@ export async function createCalendarEventWorkflow({ entityId: string; calendarInstruction: string; }) { - const connection = await step({ - taskQueue: composioTaskQueue, + const connection = await step({ + taskQueue: "composio", }).initiateConnection({ entityId, - appName: "googlecalendar", + appName: 'googlecalendar', }); if (!connection.authenticated) { @@ -23,12 +22,12 @@ export async function createCalendarEventWorkflow({ return connection; } - await step({ - taskQueue: composioTaskQueue, + const calendarEvent = await step({ + taskQueue: "composio", }).createCalendarEvent({ entityId, calendarInstruction, }); - return true; + return calendarEvent; }