@devries-cameron20 / composio-1 / commits / e67ab9ccb
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.

Fix telemetry instance property mapping

haxzie committed Apr 23, 2025 at 13:25 UTC e67ab9ccb8276664ba038e7df574a673af93a288
3 files changed +2 -5
packages/core/src/telemetry/Telemetry.ts
+2 -2
@@ -79,10 +79,10 @@ export class Telemetry<U extends InstrumentedInstance> {
79 });
80
81 for (const name of methodNames) {
82 - const originalMethod = (instance as InstrumentedInstance)[name] as (
82 + const originalMethod = (instance as unknown as Record<string, Function>)[name] as (
83 ...args: unknown[]
84 ) => Promise<unknown>;
85 - (instance as InstrumentedInstance)[name] = async (...args: unknown[]) => {
85 + (instance as unknown as Record<string, Function>)[name] = async (...args: unknown[]) => {
86 const telemetryPayload: TelemetryPayload = {
87 eventName: TELEMETRY_EVENTS.SDK_METHOD_INVOKED,
88 data: {
packages/core/src/toolset/BaseToolset.ts
-1
@@ -19,7 +19,6 @@ export abstract class BaseComposioToolset<TToolCollection, TTool>
19 protected client: Composio<this> | undefined;
20 abstract FILE_NAME: string;
21 protected DEFAULT_ENTITY_ID = 'default';
22 - [key: string]: unknown; // This is used for type inference
22
23 /**
24 * Set the client for the toolset. This is automatically done by the Composio class.
packages/core/src/types/telemetry.types.ts
-2
@@ -13,8 +13,6 @@ export type TelemetryEvent = (typeof TELEMETRY_EVENTS)[keyof typeof TELEMETRY_EV
13 */
14 export interface InstrumentedInstance {
15 FILE_NAME: string;
16 - // eslint-disable-next-line @typescript-eslint/no-explicit-any
17 - [key: string]: any;
16 }
17
18 /**