@devries-cameron20 / composio Mirror · read-only / commits / ace633ede
Fork 0

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, 01:45 UTC

Fix typos

haxzie committed May 26, 2025 at 17:30 UTC ace633edeb6083b9b100d8ceeaac354814740b95
4 files changed +11 -11
packages/core/src/composio.ts
+1 -1
@@ -114,7 +114,7 @@ export class Composio<TProvider extends BaseComposioProvider<unknown, unknown> =
114 {
115 apiKey: apiKeyParsed ?? '',
116 baseUrl: baseURLParsed ?? '',
117 - frameworkRuntime: this.provider?.name || 'unknown',
117 + frameworkRuntime: this.provider?.name ?? 'unknown',
118 isAgentic: this.provider?._isAgentic || false,
119 source: 'javascript',
120 version: version,
packages/core/src/models/Tools.ts
+8 -8
@@ -295,7 +295,7 @@ export class Tools<
295 if (modifier) {
296 if (typeof modifier === 'function') {
297 modifiedTools = modifiedTools.map(tool => {
298 - return modifier(tool.slug, tool.toolkit?.slug || 'unkown', tool);
298 + return modifier(tool.slug, tool.toolkit?.slug ?? 'unknown', tool);
299 });
300 } else {
301 throw new ComposioInvalidModifierError('Invalid schema modifier. Not a function.');
@@ -337,16 +337,16 @@ export class Tools<
337 }
338
339 // change the case of the tool to camel case
340 - let modifiedToool = this.transformToolCases(tool);
340 + let modifiedTool = this.transformToolCases(tool);
341 // apply local modifiers if they are provided
342 if (modifier) {
343 if (typeof modifier === 'function') {
344 - modifiedToool = modifier(slug, modifiedToool.toolkit?.slug || 'unkown', modifiedToool);
344 + modifiedTool = modifier(slug, modifiedTool.toolkit?.slug ?? 'unknown', modifiedTool);
345 } else {
346 throw new ComposioInvalidModifierError('Invalid schema modifier. Not a function.');
347 }
348 }
349 - return modifiedToool;
349 + return modifiedTool;
350 }
351
352 /**
@@ -472,7 +472,7 @@ export class Tools<
472 ): Promise<ToolExecuteResponse> {
473 if (modifiers?.beforeExecute) {
474 if (typeof modifiers.beforeExecute === 'function') {
475 - body = modifiers.beforeExecute(tool.slug, 'unkown', body);
475 + body = modifiers.beforeExecute(tool.slug, 'unknown', body);
476 } else {
477 throw new ComposioInvalidModifierError('Invalid beforeExecute modifier. Not a function.');
478 }
@@ -485,7 +485,7 @@ export class Tools<
485
486 if (modifiers?.afterExecute) {
487 if (typeof modifiers.afterExecute === 'function') {
488 - result = modifiers.afterExecute(tool.slug, 'unkown', result);
488 + result = modifiers.afterExecute(tool.slug, 'unknown', result);
489 } else {
490 throw new ComposioInvalidModifierError('Invalid afterExecute modifier. Not a function.');
491 }
@@ -509,7 +509,7 @@ export class Tools<
509 ): Promise<ToolExecuteResponse> {
510 if (modifiers?.beforeExecute) {
511 if (typeof modifiers.beforeExecute === 'function') {
512 - body = modifiers.beforeExecute(tool.slug, tool.toolkit?.slug || 'unkown', body);
512 + body = modifiers.beforeExecute(tool.slug, tool.toolkit?.slug ?? 'unknown', body);
513 } else {
514 throw new ComposioInvalidModifierError('Invalid beforeExecute modifier. Not a function.');
515 }
@@ -536,7 +536,7 @@ export class Tools<
536 // apply local modifiers if they are provided
537 if (modifiers?.afterExecute) {
538 if (typeof modifiers.afterExecute === 'function') {
539 - result = modifiers.afterExecute(tool.slug, tool.toolkit?.slug || 'unkown', result);
539 + result = modifiers.afterExecute(tool.slug, tool.toolkit?.slug ?? 'unknown', result);
540 } else {
541 throw new ComposioInvalidModifierError('Invalid afterExecute modifier. Not a function.');
542 }
packages/core/src/provider/BaseProvider.ts
+1 -1
@@ -38,7 +38,7 @@ abstract class BaseProvider {
38
39 /**
40 * @public
41 - * Gloabl function to execute a tool.
41 + * Global function to execute a tool.
42 * This function is used by provider providers to implement helper functions to execute tools.
43 * This is a 1:1 mapping of the `execute` method in the `Tools` class.
44 * @param {string} toolSlug - The slug of the tool to execute.
packages/core/src/telemetry/Telemetry.ts
+1 -1
@@ -93,7 +93,7 @@ export class TelemetryService {
93 );
94 });
95 // use the constructor name if available, otherwise use the file name
96 - const instrumentedClassName = instance.constructor?.name || fileName || 'unknown';
96 + const instrumentedClassName = (instance.constructor?.name || fileName) ?? 'unknown';
97
98 for (const name of methodNames) {
99 const originalMethod = (instance as unknown as Record<string, Function>)[name] as (