@composio/core 0.16.0 → 0.17.0
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/dist/{CustomTool-Bk38kFp0.d.mts → CustomTool-Uip-fhPw.d.mts} +1 -1
- package/dist/{composio-DSs-1AhC.d.mts → composio-B27X6i6A.d.mts} +11 -10
- package/dist/{BaseProvider-D7p2OPEx.d.mts → customTool.types-B2Ava_j5.d.mts} +2874 -2
- package/dist/experimental/index.d.mts +2 -2
- package/dist/{fileUtils.node-BQ0fWge3.mjs → fileUtils.node-B1Wn848p.mjs} +2 -2
- package/dist/index.d.mts +5 -6
- package/dist/index.mjs +34 -90
- package/dist/models/Files.node.mjs +1 -1
- package/dist/{types-B4k-qoOf.d.mts → types-DdZJuMm2.d.mts} +2 -2
- package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -1
- package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
- package/dist/utils/modifiers/FileToolModifier.node.mjs +1 -1
- package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
- package/dist/utils/ssrfGuard.node.d.mts +11 -1
- package/dist/utils/ssrfGuard.node.mjs +11 -1
- package/dist/utils/ssrfGuard.workerd.d.mts +13 -1
- package/dist/utils/ssrfGuard.workerd.mjs +13 -1
- package/package.json +2 -2
- package/src/models/RemoteFile.ts +7 -2
- package/src/models/ToolRouterSessionFileMount.ts +14 -8
- package/src/provider/BaseProvider.ts +53 -1
- package/src/provider/OpenAIProvider.ts +43 -15
- package/src/types/provider.types.ts +15 -0
- package/src/utils/fileUtils.node.ts +8 -2
- package/src/utils/ssrfGuard.node.ts +11 -0
- package/src/utils/ssrfGuard.workerd.ts +16 -0
- package/dist/customTool.types-cGHcIBX-.d.mts +0 -2859
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as CreateCustomToolkitParams, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams, t as AnyZodSchema } from "./customTool.types-
|
|
1
|
+
import { a as CreateCustomToolkitParams, f as CustomToolkit, o as CustomTool, r as CreateCustomToolParams, t as AnyZodSchema } from "./customTool.types-B2Ava_j5.mjs";
|
|
2
2
|
import { SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
|
|
3
3
|
//#region src/models/CustomTool.d.ts
|
|
4
4
|
/**
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { D as Session, Dn as UpdateConnectedAccountAclParams, Ht as ConnectionRequest, M as SessionWithoutMcp, Vt as ComposioRequestOptions, an as ConnectedAccountRefreshOptions, bn as CreateConnectedAccountOptions, en as ConnectedAccountListParams, f as CustomToolkit, gn as CreateConnectedAccountLinkOptions, kn as UpdateConnectedAccountParams, nn as ConnectedAccountListResponse, o as CustomTool, q as ToolRouterSessionDeleteResponse, sn as ConnectedAccountRetrieveResponse, z as ToolRouterCreateSessionConfig } from "./customTool.types-cGHcIBX-.mjs";
|
|
1
|
+
import { $i as ToolExecuteResponse, D as Session, Dn as UpdateConnectedAccountAclParams, Er as McpServerGetResponse, Fr as ExecuteToolFnOptions, Ht as ConnectionRequest, Ji as Tool, M as SessionWithoutMcp, Mn as BaseComposioProvider, Ni as ProviderOptions, Nn as BaseNonAgenticProvider, Pi as SessionExecuteMetaModifiers, Vt as ComposioRequestOptions, Yi as ToolExecuteMetaParams, Zi as ToolExecuteParams, an as ConnectedAccountRefreshOptions, bn as CreateConnectedAccountOptions, ca as ToolRetrievalOptions, en as ConnectedAccountListParams, f as CustomToolkit, gn as CreateConnectedAccountLinkOptions, ha as ToolkitVersionParam, ji as ExecuteToolModifiers, jr as McpUrlResponse, kn as UpdateConnectedAccountParams, na as ToolListParams, nn as ConnectedAccountListResponse, o as CustomTool, oa as ToolProxyParams, q as ToolRouterSessionDeleteResponse, qi as SchemaModifierOptions, sn as ConnectedAccountRetrieveResponse, ta as ToolList, z as ToolRouterCreateSessionConfig, zr as ToolCallSession } from "./customTool.types-B2Ava_j5.mjs";
|
|
3
2
|
import ComposioClient, { Composio } from "@composio/client";
|
|
4
3
|
import z, { z as z$1 } from "zod/v3";
|
|
5
4
|
import { OpenAI } from "openai";
|
|
@@ -2030,13 +2029,13 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2030
2029
|
noOfConnections: number;
|
|
2031
2030
|
createdAt?: string | undefined;
|
|
2032
2031
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2032
|
+
isComposioManaged?: boolean | undefined;
|
|
2033
2033
|
credentials?: Record<string, unknown> | undefined;
|
|
2034
2034
|
toolAccessConfig?: {
|
|
2035
2035
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2036
2036
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2037
2037
|
} | undefined;
|
|
2038
2038
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2039
|
-
isComposioManaged?: boolean | undefined;
|
|
2040
2039
|
expectedInputFields?: unknown[] | undefined;
|
|
2041
2040
|
restrictToFollowingTools?: string[] | undefined;
|
|
2042
2041
|
createdBy?: string | undefined;
|
|
@@ -2052,13 +2051,13 @@ declare const AuthConfigRetrieveResponseSchema: z$1.ZodObject<{
|
|
|
2052
2051
|
noOfConnections: number;
|
|
2053
2052
|
createdAt?: string | undefined;
|
|
2054
2053
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2054
|
+
isComposioManaged?: boolean | undefined;
|
|
2055
2055
|
credentials?: Record<string, unknown> | undefined;
|
|
2056
2056
|
toolAccessConfig?: {
|
|
2057
2057
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2058
2058
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2059
2059
|
} | undefined;
|
|
2060
2060
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2061
|
-
isComposioManaged?: boolean | undefined;
|
|
2062
2061
|
expectedInputFields?: unknown[] | undefined;
|
|
2063
2062
|
restrictToFollowingTools?: string[] | undefined;
|
|
2064
2063
|
createdBy?: string | undefined;
|
|
@@ -2137,13 +2136,13 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2137
2136
|
noOfConnections: number;
|
|
2138
2137
|
createdAt?: string | undefined;
|
|
2139
2138
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2139
|
+
isComposioManaged?: boolean | undefined;
|
|
2140
2140
|
credentials?: Record<string, unknown> | undefined;
|
|
2141
2141
|
toolAccessConfig?: {
|
|
2142
2142
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2143
2143
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2144
2144
|
} | undefined;
|
|
2145
2145
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2146
|
-
isComposioManaged?: boolean | undefined;
|
|
2147
2146
|
expectedInputFields?: unknown[] | undefined;
|
|
2148
2147
|
restrictToFollowingTools?: string[] | undefined;
|
|
2149
2148
|
createdBy?: string | undefined;
|
|
@@ -2159,13 +2158,13 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2159
2158
|
noOfConnections: number;
|
|
2160
2159
|
createdAt?: string | undefined;
|
|
2161
2160
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2161
|
+
isComposioManaged?: boolean | undefined;
|
|
2162
2162
|
credentials?: Record<string, unknown> | undefined;
|
|
2163
2163
|
toolAccessConfig?: {
|
|
2164
2164
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2165
2165
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2166
2166
|
} | undefined;
|
|
2167
2167
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2168
|
-
isComposioManaged?: boolean | undefined;
|
|
2169
2168
|
expectedInputFields?: unknown[] | undefined;
|
|
2170
2169
|
restrictToFollowingTools?: string[] | undefined;
|
|
2171
2170
|
createdBy?: string | undefined;
|
|
@@ -2185,13 +2184,13 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2185
2184
|
noOfConnections: number;
|
|
2186
2185
|
createdAt?: string | undefined;
|
|
2187
2186
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2187
|
+
isComposioManaged?: boolean | undefined;
|
|
2188
2188
|
credentials?: Record<string, unknown> | undefined;
|
|
2189
2189
|
toolAccessConfig?: {
|
|
2190
2190
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2191
2191
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2192
2192
|
} | undefined;
|
|
2193
2193
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2194
|
-
isComposioManaged?: boolean | undefined;
|
|
2195
2194
|
expectedInputFields?: unknown[] | undefined;
|
|
2196
2195
|
restrictToFollowingTools?: string[] | undefined;
|
|
2197
2196
|
createdBy?: string | undefined;
|
|
@@ -2211,13 +2210,13 @@ declare const AuthConfigListResponseSchema: z$1.ZodObject<{
|
|
|
2211
2210
|
noOfConnections: number;
|
|
2212
2211
|
createdAt?: string | undefined;
|
|
2213
2212
|
authScheme?: "OAUTH1" | "OAUTH2" | "API_KEY" | "BASIC" | "BEARER_TOKEN" | "BILLCOM_AUTH" | "GOOGLE_SERVICE_ACCOUNT" | "NO_AUTH" | "BASIC_WITH_JWT" | "CALCOM_AUTH" | "SERVICE_ACCOUNT" | "SAML" | "DCR_OAUTH" | "S2S_OAUTH2" | undefined;
|
|
2213
|
+
isComposioManaged?: boolean | undefined;
|
|
2214
2214
|
credentials?: Record<string, unknown> | undefined;
|
|
2215
2215
|
toolAccessConfig?: {
|
|
2216
2216
|
toolsForConnectedAccountCreation?: string[] | undefined;
|
|
2217
2217
|
toolsAvailableForExecution?: string[] | undefined;
|
|
2218
2218
|
} | undefined;
|
|
2219
2219
|
isEnabledForToolRouter?: boolean | undefined;
|
|
2220
|
-
isComposioManaged?: boolean | undefined;
|
|
2221
2220
|
expectedInputFields?: unknown[] | undefined;
|
|
2222
2221
|
restrictToFollowingTools?: string[] | undefined;
|
|
2223
2222
|
createdBy?: string | undefined;
|
|
@@ -5029,7 +5028,7 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
|
|
|
5029
5028
|
* This method processes a tool call from OpenAI's chat completion API,
|
|
5030
5029
|
* executes the corresponding Composio tool, and returns the result.
|
|
5031
5030
|
*
|
|
5032
|
-
* @param {string}
|
|
5031
|
+
* @param {string | ToolCallSession} executionTarget - A user ID for direct tools or the session that produced session tools
|
|
5033
5032
|
* @param {OpenAI.ChatCompletionMessageToolCall} tool - The tool call from OpenAI
|
|
5034
5033
|
* @param {ExecuteToolFnOptions} [options] - Optional execution options
|
|
5035
5034
|
* @param {ExecuteToolModifiers} [modifiers] - Optional execution modifiers
|
|
@@ -5055,6 +5054,7 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
|
|
|
5055
5054
|
* console.log(JSON.parse(result));
|
|
5056
5055
|
* ```
|
|
5057
5056
|
*/
|
|
5057
|
+
executeToolCall(session: ToolCallSession, tool: OpenAI.ChatCompletionMessageFunctionToolCall): Promise<string>;
|
|
5058
5058
|
executeToolCall(userId: string, tool: OpenAI.ChatCompletionMessageFunctionToolCall, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<string>;
|
|
5059
5059
|
/**
|
|
5060
5060
|
* Handles tool calls from OpenAI's chat completion response.
|
|
@@ -5062,7 +5062,7 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
|
|
|
5062
5062
|
* This method processes tool calls from an OpenAI chat completion response,
|
|
5063
5063
|
* executes each tool call, and returns the results.
|
|
5064
5064
|
*
|
|
5065
|
-
* @param {string}
|
|
5065
|
+
* @param {string | ToolCallSession} executionTarget - A user ID for direct tools or the session that produced session tools
|
|
5066
5066
|
* @param {OpenAI.ChatCompletion} chatCompletion - The chat completion response from OpenAI
|
|
5067
5067
|
* @param {ExecuteToolFnOptions} [options] - Optional execution options
|
|
5068
5068
|
* @param {ExecuteToolModifiers} [modifiers] - Optional execution modifiers
|
|
@@ -5098,6 +5098,7 @@ declare class OpenAIProvider extends BaseNonAgenticProvider<OpenAiToolCollection
|
|
|
5098
5098
|
* console.log(results); // Array of tool execution results
|
|
5099
5099
|
* ```
|
|
5100
5100
|
*/
|
|
5101
|
+
handleToolCalls(session: ToolCallSession, chatCompletion: OpenAI.ChatCompletion): Promise<OpenAI.ChatCompletionToolMessageParam[]>;
|
|
5101
5102
|
handleToolCalls(userId: string, chatCompletion: OpenAI.ChatCompletion, options?: ExecuteToolFnOptions, modifiers?: ExecuteToolModifiers): Promise<OpenAI.ChatCompletionToolMessageParam[]>;
|
|
5102
5103
|
/**
|
|
5103
5104
|
* Handles all the tool calls from the OpenAI Assistant API.
|