Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 23, 03:00 UTC
Cleanup unused variables
haxzie committed
May 13, 2025 at 14:26 UTC
4d1faae75f903a7ae10213ecf6c1c5f085353a05
4 files changed
+4
-10
packages/core/src/composio.ts
+1
-1
@@ -151,7 +151,7 @@ export class Composio<TToolset extends BaseComposioToolset<unknown, unknown> = O
151
}
152
153
// Check for the latest version of the Composio SDK from NPM.
154
- checkForLatestVersionFromNPM();
154
+ checkForLatestVersionFromNPM(version);
155
}
156
157
/**
packages/core/src/toolset/OpenAIToolset.ts
+1
-5
@@ -12,11 +12,7 @@ import { Stream } from 'openai/streaming';
12
import { BaseNonAgenticToolset } from './BaseToolset';
13
import { Tool, ToolListParams } from '../types/tool.types';
14
import logger from '../utils/logger';
15
-import {
16
- ExecuteToolModifiersParams,
17
- ModifiersParams,
18
- SchemaModifiersParams,
19
-} from '../types/modifiers.types';
15
+import { ExecuteToolModifiersParams, SchemaModifiersParams } from '../types/modifiers.types';
16
17
export type OpenAiTool = OpenAI.ChatCompletionTool;
18
export type OpenAiToolCollection = Array<OpenAiTool>;
packages/core/src/types/toolset.types.ts
-1
@@ -1,4 +1,3 @@
1
-import { Composio } from '../composio';
1
import { Tool, ToolListParams } from './tool.types';
2
3
/**
packages/core/src/utils/version.ts
+2
-3
@@ -1,6 +1,5 @@
1
import logger from './logger';
2
import { IS_DEVELOPMENT_OR_CI } from './constants';
3
-import { version } from '../../package.json';
3
4
/**
5
* Compares two semantic versions and returns true if the first version is newer than the second.
@@ -23,10 +22,10 @@ export function isNewerVersion(version1: string, version2: string): boolean {
22
* Checks for the latest version of the Composio SDK from NPM.
23
* If a newer version is available, it logs a warning to the console.
24
*/
26
-export async function checkForLatestVersionFromNPM() {
25
+export async function checkForLatestVersionFromNPM(currentVersion: string) {
26
try {
27
const packageName = 'composio-core';
29
- const currentVersionFromPackageJson = version;
28
+ const currentVersionFromPackageJson = currentVersion;
29
30
// @TODO: Check if fetch is available, if not use node-fetch
31
const response = await fetch(`https://registry.npmjs.org/${packageName}/latest`);