Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Fix typos

haxzieace633edeb60
diff --git a/packages/core/src/composio.ts b/packages/core/src/composio.ts
index 965725371..b9ce07f28 100644
--- a/packages/core/src/composio.ts
+++ b/packages/core/src/composio.ts
@@ -114,7 +114,7 @@ export class Composio<TProvider extends BaseComposioProvider<unknown, unknown> =
{
apiKey: apiKeyParsed ?? '',
baseUrl: baseURLParsed ?? '',
- frameworkRuntime: this.provider?.name || 'unknown',
+ frameworkRuntime: this.provider?.name ?? 'unknown',
isAgentic: this.provider?._isAgentic || false,
source: 'javascript',
version: version,
diff --git a/packages/core/src/models/Tools.ts b/packages/core/src/models/Tools.ts
index 23631fe68..8db3ed467 100644
--- a/packages/core/src/models/Tools.ts
+++ b/packages/core/src/models/Tools.ts
@@ -295,7 +295,7 @@ export class Tools<
if (modifier) {
if (typeof modifier === 'function') {
modifiedTools = modifiedTools.map(tool => {
- return modifier(tool.slug, tool.toolkit?.slug || 'unkown', tool);
+ return modifier(tool.slug, tool.toolkit?.slug ?? 'unknown', tool);
});
} else {
throw new ComposioInvalidModifierError('Invalid schema modifier. Not a function.');
@@ -337,16 +337,16 @@ export class Tools<
}
// change the case of the tool to camel case
- let modifiedToool = this.transformToolCases(tool);
+ let modifiedTool = this.transformToolCases(tool);
// apply local modifiers if they are provided
if (modifier) {
if (typeof modifier === 'function') {
- modifiedToool = modifier(slug, modifiedToool.toolkit?.slug || 'unkown', modifiedToool);
+ modifiedTool = modifier(slug, modifiedTool.toolkit?.slug ?? 'unknown', modifiedTool);
} else {
throw new ComposioInvalidModifierError('Invalid schema modifier. Not a function.');
}
}
- return modifiedToool;
+ return modifiedTool;
}
/**
@@ -472,7 +472,7 @@ export class Tools<
): Promise<ToolExecuteResponse> {
if (modifiers?.beforeExecute) {
if (typeof modifiers.beforeExecute === 'function') {
- body = modifiers.beforeExecute(tool.slug, 'unkown', body);
+ body = modifiers.beforeExecute(tool.slug, 'unknown', body);
} else {
throw new ComposioInvalidModifierError('Invalid beforeExecute modifier. Not a function.');
}
@@ -485,7 +485,7 @@ export class Tools<
if (modifiers?.afterExecute) {
if (typeof modifiers.afterExecute === 'function') {
- result = modifiers.afterExecute(tool.slug, 'unkown', result);
+ result = modifiers.afterExecute(tool.slug, 'unknown', result);
} else {
throw new ComposioInvalidModifierError('Invalid afterExecute modifier. Not a function.');
}
@@ -509,7 +509,7 @@ export class Tools<
): Promise<ToolExecuteResponse> {
if (modifiers?.beforeExecute) {
if (typeof modifiers.beforeExecute === 'function') {
- body = modifiers.beforeExecute(tool.slug, tool.toolkit?.slug || 'unkown', body);
+ body = modifiers.beforeExecute(tool.slug, tool.toolkit?.slug ?? 'unknown', body);
} else {
throw new ComposioInvalidModifierError('Invalid beforeExecute modifier. Not a function.');
}
@@ -536,7 +536,7 @@ export class Tools<
// apply local modifiers if they are provided
if (modifiers?.afterExecute) {
if (typeof modifiers.afterExecute === 'function') {
- result = modifiers.afterExecute(tool.slug, tool.toolkit?.slug || 'unkown', result);
+ result = modifiers.afterExecute(tool.slug, tool.toolkit?.slug ?? 'unknown', result);
} else {
throw new ComposioInvalidModifierError('Invalid afterExecute modifier. Not a function.');
}
diff --git a/packages/core/src/provider/BaseProvider.ts b/packages/core/src/provider/BaseProvider.ts
index 36bba8dbf..1183586cb 100644
--- a/packages/core/src/provider/BaseProvider.ts
+++ b/packages/core/src/provider/BaseProvider.ts
@@ -38,7 +38,7 @@ abstract class BaseProvider {
/**
* @public
- * Gloabl function to execute a tool.
+ * Global function to execute a tool.
* This function is used by provider providers to implement helper functions to execute tools.
* This is a 1:1 mapping of the `execute` method in the `Tools` class.
* @param {string} toolSlug - The slug of the tool to execute.
diff --git a/packages/core/src/telemetry/Telemetry.ts b/packages/core/src/telemetry/Telemetry.ts
index 86d9cfdfc..435071ac2 100644
--- a/packages/core/src/telemetry/Telemetry.ts
+++ b/packages/core/src/telemetry/Telemetry.ts
@@ -93,7 +93,7 @@ export class TelemetryService {
);
});
// use the constructor name if available, otherwise use the file name
- const instrumentedClassName = instance.constructor?.name || fileName || 'unknown';
+ const instrumentedClassName = (instance.constructor?.name || fileName) ?? 'unknown';
for (const name of methodNames) {
const originalMethod = (instance as unknown as Record<string, Function>)[name] as (