@composio/core 0.1.20 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs +3 -5
- package/dist/index.d.cts +28 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +3 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ interface ComposioConfig {
|
|
|
56
56
|
allowTracking?: boolean; // Enable/disable telemetry (default: true)
|
|
57
57
|
allowTracing?: boolean; // Enable/disable tracing (default: true)
|
|
58
58
|
provider?: TProvider; // Custom provider (default: OpenAIProvider)
|
|
59
|
-
|
|
59
|
+
host?: string; // Name of the host service which is using the SDK, this is for telemetry.
|
|
60
60
|
}
|
|
61
61
|
```
|
|
62
62
|
|
package/dist/index.cjs
CHANGED
|
@@ -837,7 +837,7 @@ var TelemetryTransport = class {
|
|
|
837
837
|
this.telemetryMetadata = metadata;
|
|
838
838
|
this.isTelemetryDisabled = false;
|
|
839
839
|
this.telemetrySource = {
|
|
840
|
-
|
|
840
|
+
host: this.telemetryMetadata?.host ?? this.telemetrySourceName,
|
|
841
841
|
service: this.telemetryServiceName,
|
|
842
842
|
language: this.telemetryLanguage,
|
|
843
843
|
version: this.telemetryMetadata?.version,
|
|
@@ -4926,7 +4926,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
4926
4926
|
};
|
|
4927
4927
|
|
|
4928
4928
|
// package.json
|
|
4929
|
-
var version = "0.1.
|
|
4929
|
+
var version = "0.1.21";
|
|
4930
4930
|
|
|
4931
4931
|
// src/composio.ts
|
|
4932
4932
|
var Composio = class _Composio {
|
|
@@ -5011,13 +5011,11 @@ var Composio = class _Composio {
|
|
|
5011
5011
|
telemetry.setup({
|
|
5012
5012
|
apiKey: apiKeyParsed ?? "",
|
|
5013
5013
|
baseUrl: baseURLParsed ?? "",
|
|
5014
|
-
frameworkRuntime: this.provider?.name ?? "unknown",
|
|
5015
5014
|
isAgentic: this.provider?._isAgentic || false,
|
|
5016
|
-
source: "composio-sdk-typescript",
|
|
5017
5015
|
version,
|
|
5018
|
-
sdkType: "Typescript-V3",
|
|
5019
5016
|
isBrowser: typeof window !== "undefined",
|
|
5020
5017
|
provider: this.provider?.name ?? "openai",
|
|
5018
|
+
host: this.config.host,
|
|
5021
5019
|
// @TODO: Users might want to pass their own session id
|
|
5022
5020
|
// @TODO: We shouldn't be doing this as people might always have one session id throughout the process in server
|
|
5023
5021
|
sessionId: this.config.allowTracing ? getRandomUUID() : void 0
|
package/dist/index.d.cts
CHANGED
|
@@ -41495,11 +41495,39 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
|
|
|
41495
41495
|
type ComposioRequestHeaders = Record<string, string>;
|
|
41496
41496
|
|
|
41497
41497
|
type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown> = OpenAIProvider> = {
|
|
41498
|
+
/**
|
|
41499
|
+
* The API key for the Composio API.
|
|
41500
|
+
* @example 'sk-1234567890'
|
|
41501
|
+
*/
|
|
41498
41502
|
apiKey?: string | null;
|
|
41503
|
+
/**
|
|
41504
|
+
* The base URL of the Composio API.
|
|
41505
|
+
* @example 'https://backend.composio.dev'
|
|
41506
|
+
*/
|
|
41499
41507
|
baseURL?: string | null;
|
|
41508
|
+
/**
|
|
41509
|
+
* Whether to allow tracking for the Composio instance.
|
|
41510
|
+
* @example true, false
|
|
41511
|
+
* @default true
|
|
41512
|
+
*/
|
|
41500
41513
|
allowTracking?: boolean;
|
|
41514
|
+
/**
|
|
41515
|
+
* Whether to allow tracing for the Composio instance.
|
|
41516
|
+
* @example true, false
|
|
41517
|
+
* @default true
|
|
41518
|
+
*/
|
|
41501
41519
|
allowTracing?: boolean;
|
|
41520
|
+
/**
|
|
41521
|
+
* The tool provider to use for this Composio instance.
|
|
41522
|
+
* @example new OpenAIProvider()
|
|
41523
|
+
*/
|
|
41502
41524
|
provider?: TProvider;
|
|
41525
|
+
/**
|
|
41526
|
+
* The host service name of the SDK where the SDK is running.
|
|
41527
|
+
* This is used to identify the host for telemetry. Ignore it if you are not using telemetry.
|
|
41528
|
+
* @example 'mcp', 'apollo', ' etc
|
|
41529
|
+
*/
|
|
41530
|
+
host?: string;
|
|
41503
41531
|
/**
|
|
41504
41532
|
* Request options to be passed to the Composio API client.
|
|
41505
41533
|
* This is useful for passing in a custom fetch implementation.
|
package/dist/index.d.ts
CHANGED
|
@@ -41495,11 +41495,39 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
|
|
|
41495
41495
|
type ComposioRequestHeaders = Record<string, string>;
|
|
41496
41496
|
|
|
41497
41497
|
type ComposioConfig<TProvider extends BaseComposioProvider<unknown, unknown> = OpenAIProvider> = {
|
|
41498
|
+
/**
|
|
41499
|
+
* The API key for the Composio API.
|
|
41500
|
+
* @example 'sk-1234567890'
|
|
41501
|
+
*/
|
|
41498
41502
|
apiKey?: string | null;
|
|
41503
|
+
/**
|
|
41504
|
+
* The base URL of the Composio API.
|
|
41505
|
+
* @example 'https://backend.composio.dev'
|
|
41506
|
+
*/
|
|
41499
41507
|
baseURL?: string | null;
|
|
41508
|
+
/**
|
|
41509
|
+
* Whether to allow tracking for the Composio instance.
|
|
41510
|
+
* @example true, false
|
|
41511
|
+
* @default true
|
|
41512
|
+
*/
|
|
41500
41513
|
allowTracking?: boolean;
|
|
41514
|
+
/**
|
|
41515
|
+
* Whether to allow tracing for the Composio instance.
|
|
41516
|
+
* @example true, false
|
|
41517
|
+
* @default true
|
|
41518
|
+
*/
|
|
41501
41519
|
allowTracing?: boolean;
|
|
41520
|
+
/**
|
|
41521
|
+
* The tool provider to use for this Composio instance.
|
|
41522
|
+
* @example new OpenAIProvider()
|
|
41523
|
+
*/
|
|
41502
41524
|
provider?: TProvider;
|
|
41525
|
+
/**
|
|
41526
|
+
* The host service name of the SDK where the SDK is running.
|
|
41527
|
+
* This is used to identify the host for telemetry. Ignore it if you are not using telemetry.
|
|
41528
|
+
* @example 'mcp', 'apollo', ' etc
|
|
41529
|
+
*/
|
|
41530
|
+
host?: string;
|
|
41503
41531
|
/**
|
|
41504
41532
|
* Request options to be passed to the Composio API client.
|
|
41505
41533
|
* This is useful for passing in a custom fetch implementation.
|
package/dist/index.js
CHANGED
|
@@ -711,7 +711,7 @@ var TelemetryTransport = class {
|
|
|
711
711
|
this.telemetryMetadata = metadata;
|
|
712
712
|
this.isTelemetryDisabled = false;
|
|
713
713
|
this.telemetrySource = {
|
|
714
|
-
|
|
714
|
+
host: this.telemetryMetadata?.host ?? this.telemetrySourceName,
|
|
715
715
|
service: this.telemetryServiceName,
|
|
716
716
|
language: this.telemetryLanguage,
|
|
717
717
|
version: this.telemetryMetadata?.version,
|
|
@@ -4800,7 +4800,7 @@ var OpenAIProvider = class extends BaseNonAgenticProvider {
|
|
|
4800
4800
|
};
|
|
4801
4801
|
|
|
4802
4802
|
// package.json
|
|
4803
|
-
var version = "0.1.
|
|
4803
|
+
var version = "0.1.21";
|
|
4804
4804
|
|
|
4805
4805
|
// src/composio.ts
|
|
4806
4806
|
var Composio = class _Composio {
|
|
@@ -4885,13 +4885,11 @@ var Composio = class _Composio {
|
|
|
4885
4885
|
telemetry.setup({
|
|
4886
4886
|
apiKey: apiKeyParsed ?? "",
|
|
4887
4887
|
baseUrl: baseURLParsed ?? "",
|
|
4888
|
-
frameworkRuntime: this.provider?.name ?? "unknown",
|
|
4889
4888
|
isAgentic: this.provider?._isAgentic || false,
|
|
4890
|
-
source: "composio-sdk-typescript",
|
|
4891
4889
|
version,
|
|
4892
|
-
sdkType: "Typescript-V3",
|
|
4893
4890
|
isBrowser: typeof window !== "undefined",
|
|
4894
4891
|
provider: this.provider?.name ?? "openai",
|
|
4892
|
+
host: this.config.host,
|
|
4895
4893
|
// @TODO: Users might want to pass their own session id
|
|
4896
4894
|
// @TODO: We shouldn't be doing this as people might always have one session id throughout the process in server
|
|
4897
4895
|
sessionId: this.config.allowTracing ? getRandomUUID() : void 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@composio/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@composio/client": "0.1.0-alpha.22",
|
|
34
|
-
"@composio/json-schema-to-zod": "0.1.
|
|
34
|
+
"@composio/json-schema-to-zod": "0.1.9",
|
|
35
35
|
"chalk": "^5.4.1",
|
|
36
36
|
"openai": "^4.94.0",
|
|
37
37
|
"pusher-js": "^8.4.0",
|